From e55713fe16484b0c807f51649925410ee4f1cc59 Mon Sep 17 00:00:00 2001 From: Mirabellensaft Date: Fri, 10 Mar 2023 13:49:09 +0100 Subject: [PATCH 01/42] code to enable uarte0 --- down-the-stack/apps/Cargo.toml | 1 + down-the-stack/apps/src/bin/uarte_enable.rs | 38 +++++++++++++++++++++ 2 files changed, 39 insertions(+) create mode 100644 down-the-stack/apps/src/bin/uarte_enable.rs diff --git a/down-the-stack/apps/Cargo.toml b/down-the-stack/apps/Cargo.toml index 6449d12..cbb3cc1 100644 --- a/down-the-stack/apps/Cargo.toml +++ b/down-the-stack/apps/Cargo.toml @@ -9,6 +9,7 @@ version = "0.0.0" cortex-m = {version = "0.7.6", features = ["critical-section-single-core"]} cortex-m-rt = "0.7.2" dk_bsc = { path = "../dk_bsc" } +dk_pac = { path = "../dk_pac" } heapless = "0.7.16" panic-probe = { version = "0.3.0", features = ["print-defmt"] } defmt = "0.3.2" diff --git a/down-the-stack/apps/src/bin/uarte_enable.rs b/down-the-stack/apps/src/bin/uarte_enable.rs new file mode 100644 index 0000000..434f114 --- /dev/null +++ b/down-the-stack/apps/src/bin/uarte_enable.rs @@ -0,0 +1,38 @@ +#![no_main] +#![no_std] + +use cortex_m::asm; +use cortex_m_rt::entry; +use dk_pac; + +// this imports `down-the-stack/apps/lib.rs` to retrieve our global logger + panicking-behavior +use apps as _; +use defmt; +use defmt_rtt as _; // global logger + + +#[entry] +fn main() -> ! { + // to enable more verbose logs, go to your `Cargo.toml` and set defmt logging levels + // to `defmt-trace` by changing the `default = []` entry in `[features]` + unsafe { + let periph = dk_pac::Peripherals::steal(); + let uarte = periph.UARTE0; + + uarte.enable.write(|w| w.enable().enabled()); + + if uarte.enable.read().bits() != 0 { + defmt::println!("Uarte0 is enabled"); + + } else { + defmt::println!("Uarte0 is disabled"); + } + + } + + + // this program does not `exit`; use Ctrl+C to terminate it + loop { + asm::nop(); + } +} \ No newline at end of file From 7a8e94e87efb101b69037c4f57b29766b6ce2e70 Mon Sep 17 00:00:00 2001 From: Mirabellensaft Date: Fri, 10 Mar 2023 13:50:05 +0100 Subject: [PATCH 02/42] cargo.toml for pac --- down-the-stack/dk_pac/Cargo.toml | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 down-the-stack/dk_pac/Cargo.toml diff --git a/down-the-stack/dk_pac/Cargo.toml b/down-the-stack/dk_pac/Cargo.toml new file mode 100644 index 0000000..ff30c08 --- /dev/null +++ b/down-the-stack/dk_pac/Cargo.toml @@ -0,0 +1,22 @@ +[package] +authors = ["Tanks Transfeld Date: Fri, 10 Mar 2023 13:51:34 +0100 Subject: [PATCH 03/42] nrf svd with writeonce -> writeOnce --- down-the-stack/dk_pac/nrf52.svd | 47016 ++++++++++++++++++++++++++++++ 1 file changed, 47016 insertions(+) create mode 100644 down-the-stack/dk_pac/nrf52.svd diff --git a/down-the-stack/dk_pac/nrf52.svd b/down-the-stack/dk_pac/nrf52.svd new file mode 100644 index 0000000..e1c17a0 --- /dev/null +++ b/down-the-stack/dk_pac/nrf52.svd @@ -0,0 +1,47016 @@ + + + + Nordic Semiconductor + Nordic + nrf52 + nrf52 + 1 + nRF52 reference description for radio MCU with ARM 32-bit Cortex-M4 Microcontroller + +Copyright (c) 2010 - 2022, Nordic Semiconductor ASA All rights reserved. + +SPDX-License-Identifier: BSD-3-Clause + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + +3. Neither the name of Nordic Semiconductor ASA nor the names of its + contributors may be used to endorse or promote products derived from this + software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY, AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL NORDIC SEMICONDUCTOR ASA OR CONTRIBUTORS BE +LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +POSSIBILITY OF SUCH DAMAGE. + + 8 + 32 + 32 + 0x00000000 + 0xFFFFFFFF + + CM4 + r0p1 + little + 1 + 1 + 3 + 0 + + system_nrf52 + NRF_ + + 2048 + 2048 + 112 + + + + FICR + Factory Information Configuration Registers + 0x10000000 + + 0 + 0x1000 + registers + + FICR + 0x20 + + + CODEPAGESIZE + Code memory page size + 0x010 + read-only + 0xFFFFFFFF + + + CODEPAGESIZE + Code memory page size + 0 + 31 + + + + + CODESIZE + Code memory size + 0x014 + read-only + 0xFFFFFFFF + + + CODESIZE + Code memory size in number of pages + 0 + 31 + + + + + 0x2 + 0x4 + DEVICEID[%s] + Description collection: Device identifier + 0x060 + read-only + 0xFFFFFFFF + + + DEVICEID + 64 bit unique device identifier + 0 + 31 + + + + + 0x4 + 0x4 + ER[%s] + Description collection: Encryption Root, word n + 0x080 + read-only + 0xFFFFFFFF + + + ER + Encryption Root, word n + 0 + 31 + + + + + 0x4 + 0x4 + IR[%s] + Description collection: Identity Root, word n + 0x090 + read-only + 0xFFFFFFFF + + + IR + Identity Root, word n + 0 + 31 + + + + + DEVICEADDRTYPE + Device address type + 0x0A0 + read-only + 0xFFFFFFFF + + + DEVICEADDRTYPE + Device address type + 0 + 0 + + + Public + Public address + 0 + + + Random + Random address + 1 + + + + + + + 0x2 + 0x4 + DEVICEADDR[%s] + Description collection: Device address n + 0x0A4 + read-only + 0xFFFFFFFF + + + DEVICEADDR + 48 bit device address + 0 + 31 + + + + + INFO + Device info + FICR_INFO + read-write + 0x100 + + PART + Part code + 0x000 + read-only + 0x00052832 + + + PART + Part code + 0 + 31 + + + N52832 + nRF52832 + 0x52832 + + + Unspecified + Unspecified + 0xFFFFFFFF + + + + + + + VARIANT + Part Variant, Hardware version and Production configuration + 0x004 + read-only + 0x41414142 + + + VARIANT + Part Variant, Hardware version and Production configuration, encoded as ASCII + 0 + 31 + + + AAAA + AAAA + 0x41414141 + + + AAAC + AAAC + 0x41414143 + + + AABA + AABA + 0x41414241 + + + AABB + AABB + 0x41414242 + + + AAB0 + AAB0 + 0x41414230 + + + ABB0 + ABB0 + 0x41424230 + + + AAE0 + AAE0 + 0x41414530 + + + ABE0 + ABE0 + 0x41424530 + + + AAGB + AAGB + 0x41414742 + + + ABGB + ABGB + 0x41424742 + + + AAG0 + AAG0 + 0x41414730 + + + ABG0 + ABG0 + 0x41424730 + + + Unspecified + Unspecified + 0xFFFFFFFF + + + + + + + PACKAGE + Package option + 0x008 + read-only + 0x00002000 + + + PACKAGE + Package option + 0 + 31 + + + QF + QFxx - 48-pin QFN + 0x2000 + + + CH + CHxx - 7x8 WLCSP 56 balls + 0x2001 + + + CI + CIxx - 7x8 WLCSP 56 balls + 0x2002 + + + CK + CKxx - 7x8 WLCSP 56 balls with backside coating for light protection + 0x2005 + + + Unspecified + Unspecified + 0xFFFFFFFF + + + + + + + RAM + RAM variant + 0x00C + read-only + 0x00000040 + + + RAM + RAM variant + 0 + 31 + + + K16 + 16 kByte RAM + 0x10 + + + K32 + 32 kByte RAM + 0x20 + + + K64 + 64 kByte RAM + 0x40 + + + Unspecified + Unspecified + 0xFFFFFFFF + + + + + + + FLASH + Flash variant + 0x010 + read-only + 0x00000200 + + + FLASH + Flash variant + 0 + 31 + + + K128 + 128 kByte FLASH + 0x80 + + + K256 + 256 kByte FLASH + 0x100 + + + K512 + 512 kByte FLASH + 0x200 + + + Unspecified + Unspecified + 0xFFFFFFFF + + + + + + + + TEMP + Registers storing factory TEMP module linearization coefficients + FICR_TEMP + read-write + 0x404 + + A0 + Slope definition A0. + 0x000 + read-only + 0x00000320 + + + A + A (slope definition) register. + 0 + 11 + + + + + A1 + Slope definition A1. + 0x004 + read-only + 0x00000343 + + + A + A (slope definition) register. + 0 + 11 + + + + + A2 + Slope definition A2. + 0x008 + read-only + 0x0000035D + + + A + A (slope definition) register. + 0 + 11 + + + + + A3 + Slope definition A3. + 0x00C + read-only + 0x00000400 + + + A + A (slope definition) register. + 0 + 11 + + + + + A4 + Slope definition A4. + 0x010 + read-only + 0x00000452 + + + A + A (slope definition) register. + 0 + 11 + + + + + A5 + Slope definition A5. + 0x014 + read-only + 0x0000037B + + + A + A (slope definition) register. + 0 + 11 + + + + + B0 + y-intercept B0. + 0x018 + read-only + 0x00003FCC + + + B + B (y-intercept) + 0 + 13 + + + + + B1 + y-intercept B1. + 0x01C + read-only + 0x00003F98 + + + B + B (y-intercept) + 0 + 13 + + + + + B2 + y-intercept B2. + 0x020 + read-only + 0x00003F98 + + + B + B (y-intercept) + 0 + 13 + + + + + B3 + y-intercept B3. + 0x024 + read-only + 0x00000012 + + + B + B (y-intercept) + 0 + 13 + + + + + B4 + y-intercept B4. + 0x028 + read-only + 0x0000004D + + + B + B (y-intercept) + 0 + 13 + + + + + B5 + y-intercept B5. + 0x02C + read-only + 0x00003E10 + + + B + B (y-intercept) + 0 + 13 + + + + + T0 + Segment end T0. + 0x030 + read-only + 0x000000E2 + + + T + T (segment end)register. + 0 + 7 + + + + + T1 + Segment end T1. + 0x034 + read-only + 0x00000000 + + + T + T (segment end)register. + 0 + 7 + + + + + T2 + Segment end T2. + 0x038 + read-only + 0x00000014 + + + T + T (segment end)register. + 0 + 7 + + + + + T3 + Segment end T3. + 0x03C + read-only + 0x00000019 + + + T + T (segment end)register. + 0 + 7 + + + + + T4 + Segment end T4. + 0x040 + read-only + 0x00000050 + + + T + T (segment end)register. + 0 + 7 + + + + + + NFC + Unspecified + FICR_NFC + read-write + 0x450 + + TAGHEADER0 + Default header for NFC Tag. Software can read these values to populate NFCID1_3RD_LAST, NFCID1_2ND_LAST and NFCID1_LAST. + 0x000 + read-only + 0xFFFFFF5F + + + MFGID + Default Manufacturer ID: Nordic Semiconductor ASA has ICM 0x5F + 0 + 7 + + + UD1 + Unique identifier byte 1 + 8 + 15 + + + UD2 + Unique identifier byte 2 + 16 + 23 + + + UD3 + Unique identifier byte 3 + 24 + 31 + + + + + TAGHEADER1 + Default header for NFC Tag. Software can read these values to populate NFCID1_3RD_LAST, NFCID1_2ND_LAST and NFCID1_LAST. + 0x004 + read-only + 0xFFFFFFFF + + + UD4 + Unique identifier byte 4 + 0 + 7 + + + UD5 + Unique identifier byte 5 + 8 + 15 + + + UD6 + Unique identifier byte 6 + 16 + 23 + + + UD7 + Unique identifier byte 7 + 24 + 31 + + + + + TAGHEADER2 + Default header for NFC Tag. Software can read these values to populate NFCID1_3RD_LAST, NFCID1_2ND_LAST and NFCID1_LAST. + 0x008 + read-only + 0xFFFFFFFF + + + UD8 + Unique identifier byte 8 + 0 + 7 + + + UD9 + Unique identifier byte 9 + 8 + 15 + + + UD10 + Unique identifier byte 10 + 16 + 23 + + + UD11 + Unique identifier byte 11 + 24 + 31 + + + + + TAGHEADER3 + Default header for NFC Tag. Software can read these values to populate NFCID1_3RD_LAST, NFCID1_2ND_LAST and NFCID1_LAST. + 0x00C + read-only + 0xFFFFFFFF + + + UD12 + Unique identifier byte 12 + 0 + 7 + + + UD13 + Unique identifier byte 13 + 8 + 15 + + + UD14 + Unique identifier byte 14 + 16 + 23 + + + UD15 + Unique identifier byte 15 + 24 + 31 + + + + + + + + UICR + User Information Configuration Registers + 0x10001000 + + 0 + 0x1000 + registers + + UICR + 0x20 + + + 0xF + 0x4 + NRFFW[%s] + Description collection: Reserved for Nordic firmware design + 0x014 + read-write + 0xFFFFFFFF + + + NRFFW + Reserved for Nordic firmware design + 0 + 31 + + + + + 0xC + 0x4 + NRFHW[%s] + Description collection: Reserved for Nordic hardware design + 0x050 + read-write + 0xFFFFFFFF + + + NRFHW + Reserved for Nordic hardware design + 0 + 31 + + + + + 0x20 + 0x4 + CUSTOMER[%s] + Description collection: Reserved for customer + 0x080 + read-write + 0xFFFFFFFF + + + CUSTOMER + Reserved for customer + 0 + 31 + + + + + 0x2 + 0x4 + PSELRESET[%s] + Description collection: Mapping of the nRESET function (see POWER chapter for details) + 0x200 + read-write + 0xFFFFFFFF + + + PIN + GPIO number P0.n onto which Reset is exposed + 0 + 5 + + + CONNECT + Connection + 31 + 31 + + + Disconnected + Disconnect + 1 + + + Connected + Connect + 0 + + + + + + + APPROTECT + Access port protection + 0x208 + read-write + 0xFFFFFFFF + + + PALL + Enable or disable access port protection. + 0 + 7 + + + Disabled + Hardware disable of access port protection for devices where access port protection is controlled by hardware + 0xFF + + + HwDisabled + Hardware disable of access port protection for devices where access port protection is controlled by hardware and software + 0x5A + + + Enabled + Enable + 0x00 + + + + + + + NFCPINS + Setting of pins dedicated to NFC functionality: NFC antenna or GPIO + 0x20C + read-write + 0xFFFFFFFF + + + PROTECT + Setting of pins dedicated to NFC functionality + 0 + 0 + + + Disabled + Operation as GPIO pins. Same protection as normal GPIO pins. + 0 + + + NFC + Operation as NFC antenna pins. Configures the protection for NFC operation. + 1 + + + + + + + + + APPROTECT + Access Port Protection + 0x40000000 + + 0 + 0x1000 + registers + + APPROTECT + 0x20 + + + FORCEPROTECT + Software force enable APPROTECT mechanism until next reset. This register can only be written once. + 0x550 + read-writeOnce + 0xFFFFFFFF + + + FORCEPROTECT + Write 0x0 to force enable APPROTECT mechanism + 0 + 7 + + write + + Force + Software force enable APPROTECT mechanism + 0x0 + + + + + + + DISABLE + Software disable APPROTECT mechanism + 0x558 + read-write + 0x00000000 + + + DISABLE + Software disable APPROTECT mechanism + 0 + 7 + + + SwDisable + Software disable APPROTECT mechanism + 0x5A + + + + + + + + + BPROT + Block Protect + 0x40000000 + APPROTECT + + 0 + 0x1000 + registers + + BPROT + 0x20 + + + CONFIG0 + Block protect configuration register 0 + 0x600 + read-write + + + REGION0 + Enable protection for region 0. Write '0' has no effect. + 0 + 0 + + + Disabled + Protection disabled + 0 + + + Enabled + Protection enable + 1 + + + + + REGION1 + Enable protection for region 1. Write '0' has no effect. + 1 + 1 + + + Disabled + Protection disabled + 0 + + + Enabled + Protection enable + 1 + + + + + REGION2 + Enable protection for region 2. Write '0' has no effect. + 2 + 2 + + + Disabled + Protection disabled + 0 + + + Enabled + Protection enable + 1 + + + + + REGION3 + Enable protection for region 3. Write '0' has no effect. + 3 + 3 + + + Disabled + Protection disabled + 0 + + + Enabled + Protection enable + 1 + + + + + REGION4 + Enable protection for region 4. Write '0' has no effect. + 4 + 4 + + + Disabled + Protection disabled + 0 + + + Enabled + Protection enable + 1 + + + + + REGION5 + Enable protection for region 5. Write '0' has no effect. + 5 + 5 + + + Disabled + Protection disabled + 0 + + + Enabled + Protection enable + 1 + + + + + REGION6 + Enable protection for region 6. Write '0' has no effect. + 6 + 6 + + + Disabled + Protection disabled + 0 + + + Enabled + Protection enable + 1 + + + + + REGION7 + Enable protection for region 7. Write '0' has no effect. + 7 + 7 + + + Disabled + Protection disabled + 0 + + + Enabled + Protection enable + 1 + + + + + REGION8 + Enable protection for region 8. Write '0' has no effect. + 8 + 8 + + + Disabled + Protection disabled + 0 + + + Enabled + Protection enable + 1 + + + + + REGION9 + Enable protection for region 9. Write '0' has no effect. + 9 + 9 + + + Disabled + Protection disabled + 0 + + + Enabled + Protection enable + 1 + + + + + REGION10 + Enable protection for region 10. Write '0' has no effect. + 10 + 10 + + + Disabled + Protection disabled + 0 + + + Enabled + Protection enable + 1 + + + + + REGION11 + Enable protection for region 11. Write '0' has no effect. + 11 + 11 + + + Disabled + Protection disabled + 0 + + + Enabled + Protection enable + 1 + + + + + REGION12 + Enable protection for region 12. Write '0' has no effect. + 12 + 12 + + + Disabled + Protection disabled + 0 + + + Enabled + Protection enable + 1 + + + + + REGION13 + Enable protection for region 13. Write '0' has no effect. + 13 + 13 + + + Disabled + Protection disabled + 0 + + + Enabled + Protection enable + 1 + + + + + REGION14 + Enable protection for region 14. Write '0' has no effect. + 14 + 14 + + + Disabled + Protection disabled + 0 + + + Enabled + Protection enable + 1 + + + + + REGION15 + Enable protection for region 15. Write '0' has no effect. + 15 + 15 + + + Disabled + Protection disabled + 0 + + + Enabled + Protection enable + 1 + + + + + REGION16 + Enable protection for region 16. Write '0' has no effect. + 16 + 16 + + + Disabled + Protection disabled + 0 + + + Enabled + Protection enable + 1 + + + + + REGION17 + Enable protection for region 17. Write '0' has no effect. + 17 + 17 + + + Disabled + Protection disabled + 0 + + + Enabled + Protection enable + 1 + + + + + REGION18 + Enable protection for region 18. Write '0' has no effect. + 18 + 18 + + + Disabled + Protection disabled + 0 + + + Enabled + Protection enable + 1 + + + + + REGION19 + Enable protection for region 19. Write '0' has no effect. + 19 + 19 + + + Disabled + Protection disabled + 0 + + + Enabled + Protection enable + 1 + + + + + REGION20 + Enable protection for region 20. Write '0' has no effect. + 20 + 20 + + + Disabled + Protection disabled + 0 + + + Enabled + Protection enable + 1 + + + + + REGION21 + Enable protection for region 21. Write '0' has no effect. + 21 + 21 + + + Disabled + Protection disabled + 0 + + + Enabled + Protection enable + 1 + + + + + REGION22 + Enable protection for region 22. Write '0' has no effect. + 22 + 22 + + + Disabled + Protection disabled + 0 + + + Enabled + Protection enable + 1 + + + + + REGION23 + Enable protection for region 23. Write '0' has no effect. + 23 + 23 + + + Disabled + Protection disabled + 0 + + + Enabled + Protection enable + 1 + + + + + REGION24 + Enable protection for region 24. Write '0' has no effect. + 24 + 24 + + + Disabled + Protection disabled + 0 + + + Enabled + Protection enable + 1 + + + + + REGION25 + Enable protection for region 25. Write '0' has no effect. + 25 + 25 + + + Disabled + Protection disabled + 0 + + + Enabled + Protection enable + 1 + + + + + REGION26 + Enable protection for region 26. Write '0' has no effect. + 26 + 26 + + + Disabled + Protection disabled + 0 + + + Enabled + Protection enable + 1 + + + + + REGION27 + Enable protection for region 27. Write '0' has no effect. + 27 + 27 + + + Disabled + Protection disabled + 0 + + + Enabled + Protection enable + 1 + + + + + REGION28 + Enable protection for region 28. Write '0' has no effect. + 28 + 28 + + + Disabled + Protection disabled + 0 + + + Enabled + Protection enable + 1 + + + + + REGION29 + Enable protection for region 29. Write '0' has no effect. + 29 + 29 + + + Disabled + Protection disabled + 0 + + + Enabled + Protection enable + 1 + + + + + REGION30 + Enable protection for region 30. Write '0' has no effect. + 30 + 30 + + + Disabled + Protection disabled + 0 + + + Enabled + Protection enable + 1 + + + + + REGION31 + Enable protection for region 31. Write '0' has no effect. + 31 + 31 + + + Disabled + Protection disabled + 0 + + + Enabled + Protection enable + 1 + + + + + + + CONFIG1 + Block protect configuration register 1 + 0x604 + read-write + + + REGION32 + Enable protection for region 32. Write '0' has no effect. + 0 + 0 + + + Disabled + Protection disabled + 0 + + + Enabled + Protection enabled + 1 + + + + + REGION33 + Enable protection for region 33. Write '0' has no effect. + 1 + 1 + + + Disabled + Protection disabled + 0 + + + Enabled + Protection enabled + 1 + + + + + REGION34 + Enable protection for region 34. Write '0' has no effect. + 2 + 2 + + + Disabled + Protection disabled + 0 + + + Enabled + Protection enabled + 1 + + + + + REGION35 + Enable protection for region 35. Write '0' has no effect. + 3 + 3 + + + Disabled + Protection disabled + 0 + + + Enabled + Protection enabled + 1 + + + + + REGION36 + Enable protection for region 36. Write '0' has no effect. + 4 + 4 + + + Disabled + Protection disabled + 0 + + + Enabled + Protection enabled + 1 + + + + + REGION37 + Enable protection for region 37. Write '0' has no effect. + 5 + 5 + + + Disabled + Protection disabled + 0 + + + Enabled + Protection enabled + 1 + + + + + REGION38 + Enable protection for region 38. Write '0' has no effect. + 6 + 6 + + + Disabled + Protection disabled + 0 + + + Enabled + Protection enabled + 1 + + + + + REGION39 + Enable protection for region 39. Write '0' has no effect. + 7 + 7 + + + Disabled + Protection disabled + 0 + + + Enabled + Protection enabled + 1 + + + + + REGION40 + Enable protection for region 40. Write '0' has no effect. + 8 + 8 + + + Disabled + Protection disabled + 0 + + + Enabled + Protection enabled + 1 + + + + + REGION41 + Enable protection for region 41. Write '0' has no effect. + 9 + 9 + + + Disabled + Protection disabled + 0 + + + Enabled + Protection enabled + 1 + + + + + REGION42 + Enable protection for region 42. Write '0' has no effect. + 10 + 10 + + + Disabled + Protection disabled + 0 + + + Enabled + Protection enabled + 1 + + + + + REGION43 + Enable protection for region 43. Write '0' has no effect. + 11 + 11 + + + Disabled + Protection disabled + 0 + + + Enabled + Protection enabled + 1 + + + + + REGION44 + Enable protection for region 44. Write '0' has no effect. + 12 + 12 + + + Disabled + Protection disabled + 0 + + + Enabled + Protection enabled + 1 + + + + + REGION45 + Enable protection for region 45. Write '0' has no effect. + 13 + 13 + + + Disabled + Protection disabled + 0 + + + Enabled + Protection enabled + 1 + + + + + REGION46 + Enable protection for region 46. Write '0' has no effect. + 14 + 14 + + + Disabled + Protection disabled + 0 + + + Enabled + Protection enabled + 1 + + + + + REGION47 + Enable protection for region 47. Write '0' has no effect. + 15 + 15 + + + Disabled + Protection disabled + 0 + + + Enabled + Protection enabled + 1 + + + + + REGION48 + Enable protection for region 48. Write '0' has no effect. + 16 + 16 + + + Disabled + Protection disabled + 0 + + + Enabled + Protection enabled + 1 + + + + + REGION49 + Enable protection for region 49. Write '0' has no effect. + 17 + 17 + + + Disabled + Protection disabled + 0 + + + Enabled + Protection enabled + 1 + + + + + REGION50 + Enable protection for region 50. Write '0' has no effect. + 18 + 18 + + + Disabled + Protection disabled + 0 + + + Enabled + Protection enabled + 1 + + + + + REGION51 + Enable protection for region 51. Write '0' has no effect. + 19 + 19 + + + Disabled + Protection disabled + 0 + + + Enabled + Protection enabled + 1 + + + + + REGION52 + Enable protection for region 52. Write '0' has no effect. + 20 + 20 + + + Disabled + Protection disabled + 0 + + + Enabled + Protection enabled + 1 + + + + + REGION53 + Enable protection for region 53. Write '0' has no effect. + 21 + 21 + + + Disabled + Protection disabled + 0 + + + Enabled + Protection enabled + 1 + + + + + REGION54 + Enable protection for region 54. Write '0' has no effect. + 22 + 22 + + + Disabled + Protection disabled + 0 + + + Enabled + Protection enabled + 1 + + + + + REGION55 + Enable protection for region 55. Write '0' has no effect. + 23 + 23 + + + Disabled + Protection disabled + 0 + + + Enabled + Protection enabled + 1 + + + + + REGION56 + Enable protection for region 56. Write '0' has no effect. + 24 + 24 + + + Disabled + Protection disabled + 0 + + + Enabled + Protection enabled + 1 + + + + + REGION57 + Enable protection for region 57. Write '0' has no effect. + 25 + 25 + + + Disabled + Protection disabled + 0 + + + Enabled + Protection enabled + 1 + + + + + REGION58 + Enable protection for region 58. Write '0' has no effect. + 26 + 26 + + + Disabled + Protection disabled + 0 + + + Enabled + Protection enabled + 1 + + + + + REGION59 + Enable protection for region 59. Write '0' has no effect. + 27 + 27 + + + Disabled + Protection disabled + 0 + + + Enabled + Protection enabled + 1 + + + + + REGION60 + Enable protection for region 60. Write '0' has no effect. + 28 + 28 + + + Disabled + Protection disabled + 0 + + + Enabled + Protection enabled + 1 + + + + + REGION61 + Enable protection for region 61. Write '0' has no effect. + 29 + 29 + + + Disabled + Protection disabled + 0 + + + Enabled + Protection enabled + 1 + + + + + REGION62 + Enable protection for region 62. Write '0' has no effect. + 30 + 30 + + + Disabled + Protection disabled + 0 + + + Enabled + Protection enabled + 1 + + + + + REGION63 + Enable protection for region 63. Write '0' has no effect. + 31 + 31 + + + Disabled + Protection disabled + 0 + + + Enabled + Protection enabled + 1 + + + + + + + DISABLEINDEBUG + Disable protection mechanism in debug interface mode + 0x608 + read-write + 0x00000001 + + + DISABLEINDEBUG + Disable the protection mechanism for NVM regions while in debug interface mode. This register will only disable the protection mechanism if the device is in debug interface mode. + 0 + 0 + + + Disabled + Disable in debug + 1 + + + Enabled + Enable in debug + 0 + + + + + + + CONFIG2 + Block protect configuration register 2 + 0x610 + read-write + + + REGION64 + Enable protection for region 64. Write '0' has no effect. + 0 + 0 + + + Disabled + Protection disabled + 0 + + + Enabled + Protection enabled + 1 + + + + + REGION65 + Enable protection for region 65. Write '0' has no effect. + 1 + 1 + + + Disabled + Protection disabled + 0 + + + Enabled + Protection enabled + 1 + + + + + REGION66 + Enable protection for region 66. Write '0' has no effect. + 2 + 2 + + + Disabled + Protection disabled + 0 + + + Enabled + Protection enabled + 1 + + + + + REGION67 + Enable protection for region 67. Write '0' has no effect. + 3 + 3 + + + Disabled + Protection disabled + 0 + + + Enabled + Protection enabled + 1 + + + + + REGION68 + Enable protection for region 68. Write '0' has no effect. + 4 + 4 + + + Disabled + Protection disabled + 0 + + + Enabled + Protection enabled + 1 + + + + + REGION69 + Enable protection for region 69. Write '0' has no effect. + 5 + 5 + + + Disabled + Protection disabled + 0 + + + Enabled + Protection enabled + 1 + + + + + REGION70 + Enable protection for region 70. Write '0' has no effect. + 6 + 6 + + + Disabled + Protection disabled + 0 + + + Enabled + Protection enabled + 1 + + + + + REGION71 + Enable protection for region 71. Write '0' has no effect. + 7 + 7 + + + Disabled + Protection disabled + 0 + + + Enabled + Protection enabled + 1 + + + + + REGION72 + Enable protection for region 72. Write '0' has no effect. + 8 + 8 + + + Disabled + Protection disabled + 0 + + + Enabled + Protection enabled + 1 + + + + + REGION73 + Enable protection for region 73. Write '0' has no effect. + 9 + 9 + + + Disabled + Protection disabled + 0 + + + Enabled + Protection enabled + 1 + + + + + REGION74 + Enable protection for region 74. Write '0' has no effect. + 10 + 10 + + + Disabled + Protection disabled + 0 + + + Enabled + Protection enabled + 1 + + + + + REGION75 + Enable protection for region 75. Write '0' has no effect. + 11 + 11 + + + Disabled + Protection disabled + 0 + + + Enabled + Protection enabled + 1 + + + + + REGION76 + Enable protection for region 76. Write '0' has no effect. + 12 + 12 + + + Disabled + Protection disabled + 0 + + + Enabled + Protection enabled + 1 + + + + + REGION77 + Enable protection for region 77. Write '0' has no effect. + 13 + 13 + + + Disabled + Protection disabled + 0 + + + Enabled + Protection enabled + 1 + + + + + REGION78 + Enable protection for region 78. Write '0' has no effect. + 14 + 14 + + + Disabled + Protection disabled + 0 + + + Enabled + Protection enabled + 1 + + + + + REGION79 + Enable protection for region 79. Write '0' has no effect. + 15 + 15 + + + Disabled + Protection disabled + 0 + + + Enabled + Protection enabled + 1 + + + + + REGION80 + Enable protection for region 80. Write '0' has no effect. + 16 + 16 + + + Disabled + Protection disabled + 0 + + + Enabled + Protection enabled + 1 + + + + + REGION81 + Enable protection for region 81. Write '0' has no effect. + 17 + 17 + + + Disabled + Protection disabled + 0 + + + Enabled + Protection enabled + 1 + + + + + REGION82 + Enable protection for region 82. Write '0' has no effect. + 18 + 18 + + + Disabled + Protection disabled + 0 + + + Enabled + Protection enabled + 1 + + + + + REGION83 + Enable protection for region 83. Write '0' has no effect. + 19 + 19 + + + Disabled + Protection disabled + 0 + + + Enabled + Protection enabled + 1 + + + + + REGION84 + Enable protection for region 84. Write '0' has no effect. + 20 + 20 + + + Disabled + Protection disabled + 0 + + + Enabled + Protection enabled + 1 + + + + + REGION85 + Enable protection for region 85. Write '0' has no effect. + 21 + 21 + + + Disabled + Protection disabled + 0 + + + Enabled + Protection enabled + 1 + + + + + REGION86 + Enable protection for region 86. Write '0' has no effect. + 22 + 22 + + + Disabled + Protection disabled + 0 + + + Enabled + Protection enabled + 1 + + + + + REGION87 + Enable protection for region 87. Write '0' has no effect. + 23 + 23 + + + Disabled + Protection disabled + 0 + + + Enabled + Protection enabled + 1 + + + + + REGION88 + Enable protection for region 88. Write '0' has no effect. + 24 + 24 + + + Disabled + Protection disabled + 0 + + + Enabled + Protection enabled + 1 + + + + + REGION89 + Enable protection for region 89. Write '0' has no effect. + 25 + 25 + + + Disabled + Protection disabled + 0 + + + Enabled + Protection enabled + 1 + + + + + REGION90 + Enable protection for region 90. Write '0' has no effect. + 26 + 26 + + + Disabled + Protection disabled + 0 + + + Enabled + Protection enabled + 1 + + + + + REGION91 + Enable protection for region 91. Write '0' has no effect. + 27 + 27 + + + Disabled + Protection disabled + 0 + + + Enabled + Protection enabled + 1 + + + + + REGION92 + Enable protection for region 92. Write '0' has no effect. + 28 + 28 + + + Disabled + Protection disabled + 0 + + + Enabled + Protection enabled + 1 + + + + + REGION93 + Enable protection for region 93. Write '0' has no effect. + 29 + 29 + + + Disabled + Protection disabled + 0 + + + Enabled + Protection enabled + 1 + + + + + REGION94 + Enable protection for region 94. Write '0' has no effect. + 30 + 30 + + + Disabled + Protection disabled + 0 + + + Enabled + Protection enabled + 1 + + + + + REGION95 + Enable protection for region 95. Write '0' has no effect. + 31 + 31 + + + Disabled + Protection disabled + 0 + + + Enabled + Protection enabled + 1 + + + + + + + CONFIG3 + Block protect configuration register 3 + 0x614 + read-write + + + REGION96 + Enable protection for region 96. Write '0' has no effect. + 0 + 0 + + + Disabled + Protection disabled + 0 + + + Enabled + Protection enabled + 1 + + + + + REGION97 + Enable protection for region 97. Write '0' has no effect. + 1 + 1 + + + Disabled + Protection disabled + 0 + + + Enabled + Protection enabled + 1 + + + + + REGION98 + Enable protection for region 98. Write '0' has no effect. + 2 + 2 + + + Disabled + Protection disabled + 0 + + + Enabled + Protection enabled + 1 + + + + + REGION99 + Enable protection for region 99. Write '0' has no effect. + 3 + 3 + + + Disabled + Protection disabled + 0 + + + Enabled + Protection enabled + 1 + + + + + REGION100 + Enable protection for region 100. Write '0' has no effect. + 4 + 4 + + + Disabled + Protection disabled + 0 + + + Enabled + Protection enabled + 1 + + + + + REGION101 + Enable protection for region 101. Write '0' has no effect. + 5 + 5 + + + Disabled + Protection disabled + 0 + + + Enabled + Protection enabled + 1 + + + + + REGION102 + Enable protection for region 102. Write '0' has no effect. + 6 + 6 + + + Disabled + Protection disabled + 0 + + + Enabled + Protection enabled + 1 + + + + + REGION103 + Enable protection for region 103. Write '0' has no effect. + 7 + 7 + + + Disabled + Protection disabled + 0 + + + Enabled + Protection enabled + 1 + + + + + REGION104 + Enable protection for region 104. Write '0' has no effect. + 8 + 8 + + + Disabled + Protection disabled + 0 + + + Enabled + Protection enabled + 1 + + + + + REGION105 + Enable protection for region 105. Write '0' has no effect. + 9 + 9 + + + Disabled + Protection disabled + 0 + + + Enabled + Protection enabled + 1 + + + + + REGION106 + Enable protection for region 106. Write '0' has no effect. + 10 + 10 + + + Disabled + Protection disabled + 0 + + + Enabled + Protection enabled + 1 + + + + + REGION107 + Enable protection for region 107. Write '0' has no effect. + 11 + 11 + + + Disabled + Protection disabled + 0 + + + Enabled + Protection enabled + 1 + + + + + REGION108 + Enable protection for region 108. Write '0' has no effect. + 12 + 12 + + + Disabled + Protection disabled + 0 + + + Enabled + Protection enabled + 1 + + + + + REGION109 + Enable protection for region 109. Write '0' has no effect. + 13 + 13 + + + Disabled + Protection disabled + 0 + + + Enabled + Protection enabled + 1 + + + + + REGION110 + Enable protection for region 110. Write '0' has no effect. + 14 + 14 + + + Disabled + Protection disabled + 0 + + + Enabled + Protection enabled + 1 + + + + + REGION111 + Enable protection for region 111. Write '0' has no effect. + 15 + 15 + + + Disabled + Protection disabled + 0 + + + Enabled + Protection enabled + 1 + + + + + REGION112 + Enable protection for region 112. Write '0' has no effect. + 16 + 16 + + + Disabled + Protection disabled + 0 + + + Enabled + Protection enabled + 1 + + + + + REGION113 + Enable protection for region 113. Write '0' has no effect. + 17 + 17 + + + Disabled + Protection disabled + 0 + + + Enabled + Protection enabled + 1 + + + + + REGION114 + Enable protection for region 114. Write '0' has no effect. + 18 + 18 + + + Disabled + Protection disabled + 0 + + + Enabled + Protection enabled + 1 + + + + + REGION115 + Enable protection for region 115. Write '0' has no effect. + 19 + 19 + + + Disabled + Protection disabled + 0 + + + Enabled + Protection enabled + 1 + + + + + REGION116 + Enable protection for region 116. Write '0' has no effect. + 20 + 20 + + + Disabled + Protection disabled + 0 + + + Enabled + Protection enabled + 1 + + + + + REGION117 + Enable protection for region 117. Write '0' has no effect. + 21 + 21 + + + Disabled + Protection disabled + 0 + + + Enabled + Protection enabled + 1 + + + + + REGION118 + Enable protection for region 118. Write '0' has no effect. + 22 + 22 + + + Disabled + Protection disabled + 0 + + + Enabled + Protection enabled + 1 + + + + + REGION119 + Enable protection for region 119. Write '0' has no effect. + 23 + 23 + + + Disabled + Protection disabled + 0 + + + Enabled + Protection enabled + 1 + + + + + REGION120 + Enable protection for region 120. Write '0' has no effect. + 24 + 24 + + + Disabled + Protection disabled + 0 + + + Enabled + Protection enabled + 1 + + + + + REGION121 + Enable protection for region 121. Write '0' has no effect. + 25 + 25 + + + Disabled + Protection disabled + 0 + + + Enabled + Protection enabled + 1 + + + + + REGION122 + Enable protection for region 122. Write '0' has no effect. + 26 + 26 + + + Disabled + Protection disabled + 0 + + + Enabled + Protection enabled + 1 + + + + + REGION123 + Enable protection for region 123. Write '0' has no effect. + 27 + 27 + + + Disabled + Protection disabled + 0 + + + Enabled + Protection enabled + 1 + + + + + REGION124 + Enable protection for region 124. Write '0' has no effect. + 28 + 28 + + + Disabled + Protection disabled + 0 + + + Enabled + Protection enabled + 1 + + + + + REGION125 + Enable protection for region 125. Write '0' has no effect. + 29 + 29 + + + Disabled + Protection disabled + 0 + + + Enabled + Protection enabled + 1 + + + + + REGION126 + Enable protection for region 126. Write '0' has no effect. + 30 + 30 + + + Disabled + Protection disabled + 0 + + + Enabled + Protection enabled + 1 + + + + + REGION127 + Enable protection for region 127. Write '0' has no effect. + 31 + 31 + + + Disabled + Protection disabled + 0 + + + Enabled + Protection enabled + 1 + + + + + + + + + CLOCK + Clock control + 0x40000000 + APPROTECT + + 0 + 0x1000 + registers + + + POWER_CLOCK + 0 + + CLOCK + 0x20 + + + TASKS_HFCLKSTART + Start HFCLK crystal oscillator + 0x000 + write-only + + + TASKS_HFCLKSTART + Start HFCLK crystal oscillator + 0 + 0 + + + Trigger + Trigger task + 1 + + + + + + + TASKS_HFCLKSTOP + Stop HFCLK crystal oscillator + 0x004 + write-only + + + TASKS_HFCLKSTOP + Stop HFCLK crystal oscillator + 0 + 0 + + + Trigger + Trigger task + 1 + + + + + + + TASKS_LFCLKSTART + Start LFCLK source + 0x008 + write-only + + + TASKS_LFCLKSTART + Start LFCLK source + 0 + 0 + + + Trigger + Trigger task + 1 + + + + + + + TASKS_LFCLKSTOP + Stop LFCLK source + 0x00C + write-only + + + TASKS_LFCLKSTOP + Stop LFCLK source + 0 + 0 + + + Trigger + Trigger task + 1 + + + + + + + TASKS_CAL + Start calibration of LFRC oscillator + 0x010 + write-only + + + TASKS_CAL + Start calibration of LFRC oscillator + 0 + 0 + + + Trigger + Trigger task + 1 + + + + + + + TASKS_CTSTART + Start calibration timer + 0x014 + write-only + + + TASKS_CTSTART + Start calibration timer + 0 + 0 + + + Trigger + Trigger task + 1 + + + + + + + TASKS_CTSTOP + Stop calibration timer + 0x018 + write-only + + + TASKS_CTSTOP + Stop calibration timer + 0 + 0 + + + Trigger + Trigger task + 1 + + + + + + + EVENTS_HFCLKSTARTED + HFCLK oscillator started + 0x100 + read-write + + + EVENTS_HFCLKSTARTED + HFCLK oscillator started + 0 + 0 + + + NotGenerated + Event not generated + 0 + + + Generated + Event generated + 1 + + + + + + + EVENTS_LFCLKSTARTED + LFCLK started + 0x104 + read-write + + + EVENTS_LFCLKSTARTED + LFCLK started + 0 + 0 + + + NotGenerated + Event not generated + 0 + + + Generated + Event generated + 1 + + + + + + + EVENTS_DONE + Calibration of LFCLK RC oscillator complete event + 0x10C + read-write + + + EVENTS_DONE + Calibration of LFCLK RC oscillator complete event + 0 + 0 + + + NotGenerated + Event not generated + 0 + + + Generated + Event generated + 1 + + + + + + + EVENTS_CTTO + Calibration timer timeout + 0x110 + read-write + + + EVENTS_CTTO + Calibration timer timeout + 0 + 0 + + + NotGenerated + Event not generated + 0 + + + Generated + Event generated + 1 + + + + + + + INTENSET + Enable interrupt + 0x304 + read-write + + + HFCLKSTARTED + Write '1' to enable interrupt for event HFCLKSTARTED + 0 + 0 + + read + + Disabled + Read: Disabled + 0 + + + Enabled + Read: Enabled + 1 + + + + write + + Set + Enable + 1 + + + + + LFCLKSTARTED + Write '1' to enable interrupt for event LFCLKSTARTED + 1 + 1 + + read + + Disabled + Read: Disabled + 0 + + + Enabled + Read: Enabled + 1 + + + + write + + Set + Enable + 1 + + + + + DONE + Write '1' to enable interrupt for event DONE + 3 + 3 + + read + + Disabled + Read: Disabled + 0 + + + Enabled + Read: Enabled + 1 + + + + write + + Set + Enable + 1 + + + + + CTTO + Write '1' to enable interrupt for event CTTO + 4 + 4 + + read + + Disabled + Read: Disabled + 0 + + + Enabled + Read: Enabled + 1 + + + + write + + Set + Enable + 1 + + + + + + + INTENCLR + Disable interrupt + 0x308 + read-write + + + HFCLKSTARTED + Write '1' to disable interrupt for event HFCLKSTARTED + 0 + 0 + + read + + Disabled + Read: Disabled + 0 + + + Enabled + Read: Enabled + 1 + + + + write + + Clear + Disable + 1 + + + + + LFCLKSTARTED + Write '1' to disable interrupt for event LFCLKSTARTED + 1 + 1 + + read + + Disabled + Read: Disabled + 0 + + + Enabled + Read: Enabled + 1 + + + + write + + Clear + Disable + 1 + + + + + DONE + Write '1' to disable interrupt for event DONE + 3 + 3 + + read + + Disabled + Read: Disabled + 0 + + + Enabled + Read: Enabled + 1 + + + + write + + Clear + Disable + 1 + + + + + CTTO + Write '1' to disable interrupt for event CTTO + 4 + 4 + + read + + Disabled + Read: Disabled + 0 + + + Enabled + Read: Enabled + 1 + + + + write + + Clear + Disable + 1 + + + + + + + HFCLKRUN + Status indicating that HFCLKSTART task has been triggered + 0x408 + read-only + + + STATUS + HFCLKSTART task triggered or not + 0 + 0 + + + NotTriggered + Task not triggered + 0 + + + Triggered + Task triggered + 1 + + + + + + + HFCLKSTAT + HFCLK status + 0x40C + read-only + + + SRC + Source of HFCLK + 0 + 0 + + + RC + 64 MHz internal oscillator (HFINT) + 0 + + + Xtal + 64 MHz crystal oscillator (HFXO) + 1 + + + + + STATE + HFCLK state + 16 + 16 + + + NotRunning + HFCLK not running + 0 + + + Running + HFCLK running + 1 + + + + + + + LFCLKRUN + Status indicating that LFCLKSTART task has been triggered + 0x414 + read-only + + + STATUS + LFCLKSTART task triggered or not + 0 + 0 + + + NotTriggered + Task not triggered + 0 + + + Triggered + Task triggered + 1 + + + + + + + LFCLKSTAT + LFCLK status + 0x418 + read-only + + + SRC + Source of LFCLK + 0 + 1 + + + RC + 32.768 kHz RC oscillator + 0 + + + Xtal + 32.768 kHz crystal oscillator + 1 + + + Synth + 32.768 kHz synthesized from HFCLK + 2 + + + + + STATE + LFCLK state + 16 + 16 + + + NotRunning + LFCLK not running + 0 + + + Running + LFCLK running + 1 + + + + + + + LFCLKSRCCOPY + Copy of LFCLKSRC register, set when LFCLKSTART task was triggered + 0x41C + read-only + + + SRC + Clock source + 0 + 1 + + + RC + 32.768 kHz RC oscillator + 0 + + + Xtal + 32.768 kHz crystal oscillator + 1 + + + Synth + 32.768 kHz synthesized from HFCLK + 2 + + + + + + + LFCLKSRC + Clock source for the LFCLK + 0x518 + read-write + + + SRC + Clock source + 0 + 1 + + + RC + 32.768 kHz RC oscillator + 0 + + + Xtal + 32.768 kHz crystal oscillator + 1 + + + Synth + 32.768 kHz synthesized from HFCLK + 2 + + + + + BYPASS + Enable or disable bypass of LFCLK crystal oscillator with external clock source + 16 + 16 + + + Disabled + Disable (use with Xtal or low-swing external source) + 0 + + + Enabled + Enable (use with rail-to-rail external source) + 1 + + + + + EXTERNAL + Enable or disable external source for LFCLK + 17 + 17 + + + Disabled + Disable external source (use with Xtal) + 0 + + + Enabled + Enable use of external source instead of Xtal (SRC needs to be set to Xtal) + 1 + + + + + + + CTIV + Calibration timer interval + 0x538 + read-write + + + CTIV + Calibration timer interval in multiple of 0.25 seconds. Range: 0.25 seconds to 31.75 seconds. + 0 + 6 + + + + + TRACECONFIG + Clocking options for the Trace Port debug interface + 0x55C + read-write + 0x00000000 + + + TRACEPORTSPEED + Speed of Trace Port clock. Note that the TRACECLK pin will output this clock divided by two. + 0 + 1 + + + 32MHz + 32 MHz Trace Port clock (TRACECLK = 16 MHz) + 0 + + + 16MHz + 16 MHz Trace Port clock (TRACECLK = 8 MHz) + 1 + + + 8MHz + 8 MHz Trace Port clock (TRACECLK = 4 MHz) + 2 + + + 4MHz + 4 MHz Trace Port clock (TRACECLK = 2 MHz) + 3 + + + + + TRACEMUX + Pin multiplexing of trace signals. + 16 + 17 + + + GPIO + GPIOs multiplexed onto all trace-pins + 0 + + + Serial + SWO multiplexed onto P0.18, GPIO multiplexed onto other trace pins + 1 + + + Parallel + TRACECLK and TRACEDATA multiplexed onto P0.20, P0.18, P0.16, P0.15 and P0.14. + 2 + + + + + + + + + POWER + Power control + 0x40000000 + APPROTECT + + 0 + 0x1000 + registers + + + POWER_CLOCK + 0 + + POWER + 0x20 + + + TASKS_CONSTLAT + Enable constant latency mode + 0x78 + write-only + + + TASKS_CONSTLAT + Enable constant latency mode + 0 + 0 + + + Trigger + Trigger task + 1 + + + + + + + TASKS_LOWPWR + Enable low power mode (variable latency) + 0x7C + write-only + + + TASKS_LOWPWR + Enable low power mode (variable latency) + 0 + 0 + + + Trigger + Trigger task + 1 + + + + + + + EVENTS_POFWARN + Power failure warning + 0x108 + read-write + + + EVENTS_POFWARN + Power failure warning + 0 + 0 + + + NotGenerated + Event not generated + 0 + + + Generated + Event generated + 1 + + + + + + + EVENTS_SLEEPENTER + CPU entered WFI/WFE sleep + 0x114 + read-write + + + EVENTS_SLEEPENTER + CPU entered WFI/WFE sleep + 0 + 0 + + + NotGenerated + Event not generated + 0 + + + Generated + Event generated + 1 + + + + + + + EVENTS_SLEEPEXIT + CPU exited WFI/WFE sleep + 0x118 + read-write + + + EVENTS_SLEEPEXIT + CPU exited WFI/WFE sleep + 0 + 0 + + + NotGenerated + Event not generated + 0 + + + Generated + Event generated + 1 + + + + + + + INTENSET + Enable interrupt + 0x304 + read-write + + + POFWARN + Write '1' to enable interrupt for event POFWARN + 2 + 2 + + read + + Disabled + Read: Disabled + 0 + + + Enabled + Read: Enabled + 1 + + + + write + + Set + Enable + 1 + + + + + SLEEPENTER + Write '1' to enable interrupt for event SLEEPENTER + 5 + 5 + + read + + Disabled + Read: Disabled + 0 + + + Enabled + Read: Enabled + 1 + + + + write + + Set + Enable + 1 + + + + + SLEEPEXIT + Write '1' to enable interrupt for event SLEEPEXIT + 6 + 6 + + read + + Disabled + Read: Disabled + 0 + + + Enabled + Read: Enabled + 1 + + + + write + + Set + Enable + 1 + + + + + + + INTENCLR + Disable interrupt + 0x308 + read-write + + + POFWARN + Write '1' to disable interrupt for event POFWARN + 2 + 2 + + read + + Disabled + Read: Disabled + 0 + + + Enabled + Read: Enabled + 1 + + + + write + + Clear + Disable + 1 + + + + + SLEEPENTER + Write '1' to disable interrupt for event SLEEPENTER + 5 + 5 + + read + + Disabled + Read: Disabled + 0 + + + Enabled + Read: Enabled + 1 + + + + write + + Clear + Disable + 1 + + + + + SLEEPEXIT + Write '1' to disable interrupt for event SLEEPEXIT + 6 + 6 + + read + + Disabled + Read: Disabled + 0 + + + Enabled + Read: Enabled + 1 + + + + write + + Clear + Disable + 1 + + + + + + + RESETREAS + Reset reason + 0x400 + read-write + + + RESETPIN + Reset from pin-reset detected + 0 + 0 + + + NotDetected + Not detected + 0 + + + Detected + Detected + 1 + + + + + DOG + Reset from watchdog detected + 1 + 1 + + + NotDetected + Not detected + 0 + + + Detected + Detected + 1 + + + + + SREQ + Reset from soft reset detected + 2 + 2 + + + NotDetected + Not detected + 0 + + + Detected + Detected + 1 + + + + + LOCKUP + Reset from CPU lock-up detected + 3 + 3 + + + NotDetected + Not detected + 0 + + + Detected + Detected + 1 + + + + + OFF + Reset due to wake up from System OFF mode when wakeup is triggered from DETECT signal from GPIO + 16 + 16 + + + NotDetected + Not detected + 0 + + + Detected + Detected + 1 + + + + + LPCOMP + Reset due to wake up from System OFF mode when wakeup is triggered from ANADETECT signal from LPCOMP + 17 + 17 + + + NotDetected + Not detected + 0 + + + Detected + Detected + 1 + + + + + DIF + Reset due to wake up from System OFF mode when wakeup is triggered from entering into debug interface mode + 18 + 18 + + + NotDetected + Not detected + 0 + + + Detected + Detected + 1 + + + + + NFC + Reset due to wake up from System OFF mode by NFC field detect + 19 + 19 + + + NotDetected + Not detected + 0 + + + Detected + Detected + 1 + + + + + + + RAMSTATUS + Deprecated register - RAM status register + 0x428 + read-only + 0x00000000 + + + RAMBLOCK0 + RAM block 0 is on or off/powering up + 0 + 0 + + + Off + Off + 0 + + + On + On + 1 + + + + + RAMBLOCK1 + RAM block 1 is on or off/powering up + 1 + 1 + + + Off + Off + 0 + + + On + On + 1 + + + + + RAMBLOCK2 + RAM block 2 is on or off/powering up + 2 + 2 + + + Off + Off + 0 + + + On + On + 1 + + + + + RAMBLOCK3 + RAM block 3 is on or off/powering up + 3 + 3 + + + Off + Off + 0 + + + On + On + 1 + + + + + + + SYSTEMOFF + System OFF register + 0x500 + write-only + + + SYSTEMOFF + Enable System OFF mode + 0 + 0 + + + Enter + Enable System OFF mode + 1 + + + + + + + POFCON + Power failure comparator configuration + 0x510 + read-write + + + POF + Enable or disable power failure comparator + 0 + 0 + + + Disabled + Disable + 0 + + + Enabled + Enable + 1 + + + + + THRESHOLD + Power failure comparator threshold setting + 1 + 4 + + + V17 + Set threshold to 1.7 V + 4 + + + V18 + Set threshold to 1.8 V + 5 + + + V19 + Set threshold to 1.9 V + 6 + + + V20 + Set threshold to 2.0 V + 7 + + + V21 + Set threshold to 2.1 V + 8 + + + V22 + Set threshold to 2.2 V + 9 + + + V23 + Set threshold to 2.3 V + 10 + + + V24 + Set threshold to 2.4 V + 11 + + + V25 + Set threshold to 2.5 V + 12 + + + V26 + Set threshold to 2.6 V + 13 + + + V27 + Set threshold to 2.7 V + 14 + + + V28 + Set threshold to 2.8 V + 15 + + + + + + + GPREGRET + General purpose retention register + 0x51C + read-write + + + GPREGRET + General purpose retention register + 0 + 7 + + + + + GPREGRET2 + General purpose retention register + 0x520 + read-write + + + GPREGRET + General purpose retention register + 0 + 7 + + + + + RAMON + Deprecated register - RAM on/off register (this register is retained) + 0x524 + read-write + 0x00000003 + + + ONRAM0 + Keep RAM block 0 on or off in system ON Mode + 0 + 0 + + + RAM0Off + Off + 0 + + + RAM0On + On + 1 + + + + + ONRAM1 + Keep RAM block 1 on or off in system ON Mode + 1 + 1 + + + RAM1Off + Off + 0 + + + RAM1On + On + 1 + + + + + OFFRAM0 + Keep retention on RAM block 0 when RAM block is switched off + 16 + 16 + + + RAM0Off + Off + 0 + + + RAM0On + On + 1 + + + + + OFFRAM1 + Keep retention on RAM block 1 when RAM block is switched off + 17 + 17 + + + RAM1Off + Off + 0 + + + RAM1On + On + 1 + + + + + + + RAMONB + Deprecated register - RAM on/off register (this register is retained) + 0x554 + read-write + 0x00000003 + + + ONRAM2 + Keep RAM block 2 on or off in system ON Mode + 0 + 0 + + + RAM2Off + Off + 0 + + + RAM2On + On + 1 + + + + + ONRAM3 + Keep RAM block 3 on or off in system ON Mode + 1 + 1 + + + RAM3Off + Off + 0 + + + RAM3On + On + 1 + + + + + OFFRAM2 + Keep retention on RAM block 2 when RAM block is switched off + 16 + 16 + + + RAM2Off + Off + 0 + + + RAM2On + On + 1 + + + + + OFFRAM3 + Keep retention on RAM block 3 when RAM block is switched off + 17 + 17 + + + RAM3Off + Off + 0 + + + RAM3On + On + 1 + + + + + + + DCDCEN + DC/DC enable register + 0x578 + read-write + + + DCDCEN + Enable or disable DC/DC converter + 0 + 0 + + + Disabled + Disable + 0 + + + Enabled + Enable + 1 + + + + + + + 8 + 0x010 + RAM[%s] + Unspecified + POWER_RAM + read-write + 0x900 + + POWER + Description cluster: RAMn power control register + 0x000 + read-write + 0x0000FFFF + + + S0POWER + Keep RAM section S0 ON or OFF in System ON mode. + 0 + 0 + + + Off + Off + 0 + + + On + On + 1 + + + + + S1POWER + Keep RAM section S1 ON or OFF in System ON mode. + 1 + 1 + + + Off + Off + 0 + + + On + On + 1 + + + + + S0RETENTION + Keep retention on RAM section S0 when RAM section is in OFF + 16 + 16 + + + Off + Off + 0 + + + On + On + 1 + + + + + S1RETENTION + Keep retention on RAM section S1 when RAM section is in OFF + 17 + 17 + + + Off + Off + 0 + + + On + On + 1 + + + + + + + POWERSET + Description cluster: RAMn power control set register + 0x004 + write-only + 0x0000FFFF + + + S0POWER + Keep RAM section S0 of RAMn on or off in System ON mode + 0 + 0 + + + On + On + 1 + + + + + S1POWER + Keep RAM section S1 of RAMn on or off in System ON mode + 1 + 1 + + + On + On + 1 + + + + + S0RETENTION + Keep retention on RAM section S0 when RAM section is switched off + 16 + 16 + + + On + On + 1 + + + + + S1RETENTION + Keep retention on RAM section S1 when RAM section is switched off + 17 + 17 + + + On + On + 1 + + + + + + + POWERCLR + Description cluster: RAMn power control clear register + 0x008 + write-only + 0x0000FFFF + + + S0POWER + Keep RAM section S0 of RAMn on or off in System ON mode + 0 + 0 + + + Off + Off + 1 + + + + + S1POWER + Keep RAM section S1 of RAMn on or off in System ON mode + 1 + 1 + + + Off + Off + 1 + + + + + S0RETENTION + Keep retention on RAM section S0 when RAM section is switched off + 16 + 16 + + + Off + Off + 1 + + + + + S1RETENTION + Keep retention on RAM section S1 when RAM section is switched off + 17 + 17 + + + Off + Off + 1 + + + + + + + + + + P0 + GPIO Port 1 + 0x50000000 + GPIO + + 0 + 0x1000 + registers + + GPIO + 0x20 + + + OUT + Write GPIO port + 0x504 + read-write + + + PIN0 + Pin 0 + 0 + 0 + + + Low + Pin driver is low + 0 + + + High + Pin driver is high + 1 + + + + + PIN1 + Pin 1 + 1 + 1 + + + Low + Pin driver is low + 0 + + + High + Pin driver is high + 1 + + + + + PIN2 + Pin 2 + 2 + 2 + + + Low + Pin driver is low + 0 + + + High + Pin driver is high + 1 + + + + + PIN3 + Pin 3 + 3 + 3 + + + Low + Pin driver is low + 0 + + + High + Pin driver is high + 1 + + + + + PIN4 + Pin 4 + 4 + 4 + + + Low + Pin driver is low + 0 + + + High + Pin driver is high + 1 + + + + + PIN5 + Pin 5 + 5 + 5 + + + Low + Pin driver is low + 0 + + + High + Pin driver is high + 1 + + + + + PIN6 + Pin 6 + 6 + 6 + + + Low + Pin driver is low + 0 + + + High + Pin driver is high + 1 + + + + + PIN7 + Pin 7 + 7 + 7 + + + Low + Pin driver is low + 0 + + + High + Pin driver is high + 1 + + + + + PIN8 + Pin 8 + 8 + 8 + + + Low + Pin driver is low + 0 + + + High + Pin driver is high + 1 + + + + + PIN9 + Pin 9 + 9 + 9 + + + Low + Pin driver is low + 0 + + + High + Pin driver is high + 1 + + + + + PIN10 + Pin 10 + 10 + 10 + + + Low + Pin driver is low + 0 + + + High + Pin driver is high + 1 + + + + + PIN11 + Pin 11 + 11 + 11 + + + Low + Pin driver is low + 0 + + + High + Pin driver is high + 1 + + + + + PIN12 + Pin 12 + 12 + 12 + + + Low + Pin driver is low + 0 + + + High + Pin driver is high + 1 + + + + + PIN13 + Pin 13 + 13 + 13 + + + Low + Pin driver is low + 0 + + + High + Pin driver is high + 1 + + + + + PIN14 + Pin 14 + 14 + 14 + + + Low + Pin driver is low + 0 + + + High + Pin driver is high + 1 + + + + + PIN15 + Pin 15 + 15 + 15 + + + Low + Pin driver is low + 0 + + + High + Pin driver is high + 1 + + + + + PIN16 + Pin 16 + 16 + 16 + + + Low + Pin driver is low + 0 + + + High + Pin driver is high + 1 + + + + + PIN17 + Pin 17 + 17 + 17 + + + Low + Pin driver is low + 0 + + + High + Pin driver is high + 1 + + + + + PIN18 + Pin 18 + 18 + 18 + + + Low + Pin driver is low + 0 + + + High + Pin driver is high + 1 + + + + + PIN19 + Pin 19 + 19 + 19 + + + Low + Pin driver is low + 0 + + + High + Pin driver is high + 1 + + + + + PIN20 + Pin 20 + 20 + 20 + + + Low + Pin driver is low + 0 + + + High + Pin driver is high + 1 + + + + + PIN21 + Pin 21 + 21 + 21 + + + Low + Pin driver is low + 0 + + + High + Pin driver is high + 1 + + + + + PIN22 + Pin 22 + 22 + 22 + + + Low + Pin driver is low + 0 + + + High + Pin driver is high + 1 + + + + + PIN23 + Pin 23 + 23 + 23 + + + Low + Pin driver is low + 0 + + + High + Pin driver is high + 1 + + + + + PIN24 + Pin 24 + 24 + 24 + + + Low + Pin driver is low + 0 + + + High + Pin driver is high + 1 + + + + + PIN25 + Pin 25 + 25 + 25 + + + Low + Pin driver is low + 0 + + + High + Pin driver is high + 1 + + + + + PIN26 + Pin 26 + 26 + 26 + + + Low + Pin driver is low + 0 + + + High + Pin driver is high + 1 + + + + + PIN27 + Pin 27 + 27 + 27 + + + Low + Pin driver is low + 0 + + + High + Pin driver is high + 1 + + + + + PIN28 + Pin 28 + 28 + 28 + + + Low + Pin driver is low + 0 + + + High + Pin driver is high + 1 + + + + + PIN29 + Pin 29 + 29 + 29 + + + Low + Pin driver is low + 0 + + + High + Pin driver is high + 1 + + + + + PIN30 + Pin 30 + 30 + 30 + + + Low + Pin driver is low + 0 + + + High + Pin driver is high + 1 + + + + + PIN31 + Pin 31 + 31 + 31 + + + Low + Pin driver is low + 0 + + + High + Pin driver is high + 1 + + + + + + + OUTSET + Set individual bits in GPIO port + 0x508 + read-write + oneToSet + + + PIN0 + Pin 0 + 0 + 0 + + read + + Low + Read: pin driver is low + 0 + + + High + Read: pin driver is high + 1 + + + + write + + Set + Write: writing a '1' sets the pin high; writing a '0' has no effect + 1 + + + + + PIN1 + Pin 1 + 1 + 1 + + read + + Low + Read: pin driver is low + 0 + + + High + Read: pin driver is high + 1 + + + + write + + Set + Write: writing a '1' sets the pin high; writing a '0' has no effect + 1 + + + + + PIN2 + Pin 2 + 2 + 2 + + read + + Low + Read: pin driver is low + 0 + + + High + Read: pin driver is high + 1 + + + + write + + Set + Write: writing a '1' sets the pin high; writing a '0' has no effect + 1 + + + + + PIN3 + Pin 3 + 3 + 3 + + read + + Low + Read: pin driver is low + 0 + + + High + Read: pin driver is high + 1 + + + + write + + Set + Write: writing a '1' sets the pin high; writing a '0' has no effect + 1 + + + + + PIN4 + Pin 4 + 4 + 4 + + read + + Low + Read: pin driver is low + 0 + + + High + Read: pin driver is high + 1 + + + + write + + Set + Write: writing a '1' sets the pin high; writing a '0' has no effect + 1 + + + + + PIN5 + Pin 5 + 5 + 5 + + read + + Low + Read: pin driver is low + 0 + + + High + Read: pin driver is high + 1 + + + + write + + Set + Write: writing a '1' sets the pin high; writing a '0' has no effect + 1 + + + + + PIN6 + Pin 6 + 6 + 6 + + read + + Low + Read: pin driver is low + 0 + + + High + Read: pin driver is high + 1 + + + + write + + Set + Write: writing a '1' sets the pin high; writing a '0' has no effect + 1 + + + + + PIN7 + Pin 7 + 7 + 7 + + read + + Low + Read: pin driver is low + 0 + + + High + Read: pin driver is high + 1 + + + + write + + Set + Write: writing a '1' sets the pin high; writing a '0' has no effect + 1 + + + + + PIN8 + Pin 8 + 8 + 8 + + read + + Low + Read: pin driver is low + 0 + + + High + Read: pin driver is high + 1 + + + + write + + Set + Write: writing a '1' sets the pin high; writing a '0' has no effect + 1 + + + + + PIN9 + Pin 9 + 9 + 9 + + read + + Low + Read: pin driver is low + 0 + + + High + Read: pin driver is high + 1 + + + + write + + Set + Write: writing a '1' sets the pin high; writing a '0' has no effect + 1 + + + + + PIN10 + Pin 10 + 10 + 10 + + read + + Low + Read: pin driver is low + 0 + + + High + Read: pin driver is high + 1 + + + + write + + Set + Write: writing a '1' sets the pin high; writing a '0' has no effect + 1 + + + + + PIN11 + Pin 11 + 11 + 11 + + read + + Low + Read: pin driver is low + 0 + + + High + Read: pin driver is high + 1 + + + + write + + Set + Write: writing a '1' sets the pin high; writing a '0' has no effect + 1 + + + + + PIN12 + Pin 12 + 12 + 12 + + read + + Low + Read: pin driver is low + 0 + + + High + Read: pin driver is high + 1 + + + + write + + Set + Write: writing a '1' sets the pin high; writing a '0' has no effect + 1 + + + + + PIN13 + Pin 13 + 13 + 13 + + read + + Low + Read: pin driver is low + 0 + + + High + Read: pin driver is high + 1 + + + + write + + Set + Write: writing a '1' sets the pin high; writing a '0' has no effect + 1 + + + + + PIN14 + Pin 14 + 14 + 14 + + read + + Low + Read: pin driver is low + 0 + + + High + Read: pin driver is high + 1 + + + + write + + Set + Write: writing a '1' sets the pin high; writing a '0' has no effect + 1 + + + + + PIN15 + Pin 15 + 15 + 15 + + read + + Low + Read: pin driver is low + 0 + + + High + Read: pin driver is high + 1 + + + + write + + Set + Write: writing a '1' sets the pin high; writing a '0' has no effect + 1 + + + + + PIN16 + Pin 16 + 16 + 16 + + read + + Low + Read: pin driver is low + 0 + + + High + Read: pin driver is high + 1 + + + + write + + Set + Write: writing a '1' sets the pin high; writing a '0' has no effect + 1 + + + + + PIN17 + Pin 17 + 17 + 17 + + read + + Low + Read: pin driver is low + 0 + + + High + Read: pin driver is high + 1 + + + + write + + Set + Write: writing a '1' sets the pin high; writing a '0' has no effect + 1 + + + + + PIN18 + Pin 18 + 18 + 18 + + read + + Low + Read: pin driver is low + 0 + + + High + Read: pin driver is high + 1 + + + + write + + Set + Write: writing a '1' sets the pin high; writing a '0' has no effect + 1 + + + + + PIN19 + Pin 19 + 19 + 19 + + read + + Low + Read: pin driver is low + 0 + + + High + Read: pin driver is high + 1 + + + + write + + Set + Write: writing a '1' sets the pin high; writing a '0' has no effect + 1 + + + + + PIN20 + Pin 20 + 20 + 20 + + read + + Low + Read: pin driver is low + 0 + + + High + Read: pin driver is high + 1 + + + + write + + Set + Write: writing a '1' sets the pin high; writing a '0' has no effect + 1 + + + + + PIN21 + Pin 21 + 21 + 21 + + read + + Low + Read: pin driver is low + 0 + + + High + Read: pin driver is high + 1 + + + + write + + Set + Write: writing a '1' sets the pin high; writing a '0' has no effect + 1 + + + + + PIN22 + Pin 22 + 22 + 22 + + read + + Low + Read: pin driver is low + 0 + + + High + Read: pin driver is high + 1 + + + + write + + Set + Write: writing a '1' sets the pin high; writing a '0' has no effect + 1 + + + + + PIN23 + Pin 23 + 23 + 23 + + read + + Low + Read: pin driver is low + 0 + + + High + Read: pin driver is high + 1 + + + + write + + Set + Write: writing a '1' sets the pin high; writing a '0' has no effect + 1 + + + + + PIN24 + Pin 24 + 24 + 24 + + read + + Low + Read: pin driver is low + 0 + + + High + Read: pin driver is high + 1 + + + + write + + Set + Write: writing a '1' sets the pin high; writing a '0' has no effect + 1 + + + + + PIN25 + Pin 25 + 25 + 25 + + read + + Low + Read: pin driver is low + 0 + + + High + Read: pin driver is high + 1 + + + + write + + Set + Write: writing a '1' sets the pin high; writing a '0' has no effect + 1 + + + + + PIN26 + Pin 26 + 26 + 26 + + read + + Low + Read: pin driver is low + 0 + + + High + Read: pin driver is high + 1 + + + + write + + Set + Write: writing a '1' sets the pin high; writing a '0' has no effect + 1 + + + + + PIN27 + Pin 27 + 27 + 27 + + read + + Low + Read: pin driver is low + 0 + + + High + Read: pin driver is high + 1 + + + + write + + Set + Write: writing a '1' sets the pin high; writing a '0' has no effect + 1 + + + + + PIN28 + Pin 28 + 28 + 28 + + read + + Low + Read: pin driver is low + 0 + + + High + Read: pin driver is high + 1 + + + + write + + Set + Write: writing a '1' sets the pin high; writing a '0' has no effect + 1 + + + + + PIN29 + Pin 29 + 29 + 29 + + read + + Low + Read: pin driver is low + 0 + + + High + Read: pin driver is high + 1 + + + + write + + Set + Write: writing a '1' sets the pin high; writing a '0' has no effect + 1 + + + + + PIN30 + Pin 30 + 30 + 30 + + read + + Low + Read: pin driver is low + 0 + + + High + Read: pin driver is high + 1 + + + + write + + Set + Write: writing a '1' sets the pin high; writing a '0' has no effect + 1 + + + + + PIN31 + Pin 31 + 31 + 31 + + read + + Low + Read: pin driver is low + 0 + + + High + Read: pin driver is high + 1 + + + + write + + Set + Write: writing a '1' sets the pin high; writing a '0' has no effect + 1 + + + + + + + OUTCLR + Clear individual bits in GPIO port + 0x50C + read-write + oneToClear + + + PIN0 + Pin 0 + 0 + 0 + + read + + Low + Read: pin driver is low + 0 + + + High + Read: pin driver is high + 1 + + + + write + + Clear + Write: writing a '1' sets the pin low; writing a '0' has no effect + 1 + + + + + PIN1 + Pin 1 + 1 + 1 + + read + + Low + Read: pin driver is low + 0 + + + High + Read: pin driver is high + 1 + + + + write + + Clear + Write: writing a '1' sets the pin low; writing a '0' has no effect + 1 + + + + + PIN2 + Pin 2 + 2 + 2 + + read + + Low + Read: pin driver is low + 0 + + + High + Read: pin driver is high + 1 + + + + write + + Clear + Write: writing a '1' sets the pin low; writing a '0' has no effect + 1 + + + + + PIN3 + Pin 3 + 3 + 3 + + read + + Low + Read: pin driver is low + 0 + + + High + Read: pin driver is high + 1 + + + + write + + Clear + Write: writing a '1' sets the pin low; writing a '0' has no effect + 1 + + + + + PIN4 + Pin 4 + 4 + 4 + + read + + Low + Read: pin driver is low + 0 + + + High + Read: pin driver is high + 1 + + + + write + + Clear + Write: writing a '1' sets the pin low; writing a '0' has no effect + 1 + + + + + PIN5 + Pin 5 + 5 + 5 + + read + + Low + Read: pin driver is low + 0 + + + High + Read: pin driver is high + 1 + + + + write + + Clear + Write: writing a '1' sets the pin low; writing a '0' has no effect + 1 + + + + + PIN6 + Pin 6 + 6 + 6 + + read + + Low + Read: pin driver is low + 0 + + + High + Read: pin driver is high + 1 + + + + write + + Clear + Write: writing a '1' sets the pin low; writing a '0' has no effect + 1 + + + + + PIN7 + Pin 7 + 7 + 7 + + read + + Low + Read: pin driver is low + 0 + + + High + Read: pin driver is high + 1 + + + + write + + Clear + Write: writing a '1' sets the pin low; writing a '0' has no effect + 1 + + + + + PIN8 + Pin 8 + 8 + 8 + + read + + Low + Read: pin driver is low + 0 + + + High + Read: pin driver is high + 1 + + + + write + + Clear + Write: writing a '1' sets the pin low; writing a '0' has no effect + 1 + + + + + PIN9 + Pin 9 + 9 + 9 + + read + + Low + Read: pin driver is low + 0 + + + High + Read: pin driver is high + 1 + + + + write + + Clear + Write: writing a '1' sets the pin low; writing a '0' has no effect + 1 + + + + + PIN10 + Pin 10 + 10 + 10 + + read + + Low + Read: pin driver is low + 0 + + + High + Read: pin driver is high + 1 + + + + write + + Clear + Write: writing a '1' sets the pin low; writing a '0' has no effect + 1 + + + + + PIN11 + Pin 11 + 11 + 11 + + read + + Low + Read: pin driver is low + 0 + + + High + Read: pin driver is high + 1 + + + + write + + Clear + Write: writing a '1' sets the pin low; writing a '0' has no effect + 1 + + + + + PIN12 + Pin 12 + 12 + 12 + + read + + Low + Read: pin driver is low + 0 + + + High + Read: pin driver is high + 1 + + + + write + + Clear + Write: writing a '1' sets the pin low; writing a '0' has no effect + 1 + + + + + PIN13 + Pin 13 + 13 + 13 + + read + + Low + Read: pin driver is low + 0 + + + High + Read: pin driver is high + 1 + + + + write + + Clear + Write: writing a '1' sets the pin low; writing a '0' has no effect + 1 + + + + + PIN14 + Pin 14 + 14 + 14 + + read + + Low + Read: pin driver is low + 0 + + + High + Read: pin driver is high + 1 + + + + write + + Clear + Write: writing a '1' sets the pin low; writing a '0' has no effect + 1 + + + + + PIN15 + Pin 15 + 15 + 15 + + read + + Low + Read: pin driver is low + 0 + + + High + Read: pin driver is high + 1 + + + + write + + Clear + Write: writing a '1' sets the pin low; writing a '0' has no effect + 1 + + + + + PIN16 + Pin 16 + 16 + 16 + + read + + Low + Read: pin driver is low + 0 + + + High + Read: pin driver is high + 1 + + + + write + + Clear + Write: writing a '1' sets the pin low; writing a '0' has no effect + 1 + + + + + PIN17 + Pin 17 + 17 + 17 + + read + + Low + Read: pin driver is low + 0 + + + High + Read: pin driver is high + 1 + + + + write + + Clear + Write: writing a '1' sets the pin low; writing a '0' has no effect + 1 + + + + + PIN18 + Pin 18 + 18 + 18 + + read + + Low + Read: pin driver is low + 0 + + + High + Read: pin driver is high + 1 + + + + write + + Clear + Write: writing a '1' sets the pin low; writing a '0' has no effect + 1 + + + + + PIN19 + Pin 19 + 19 + 19 + + read + + Low + Read: pin driver is low + 0 + + + High + Read: pin driver is high + 1 + + + + write + + Clear + Write: writing a '1' sets the pin low; writing a '0' has no effect + 1 + + + + + PIN20 + Pin 20 + 20 + 20 + + read + + Low + Read: pin driver is low + 0 + + + High + Read: pin driver is high + 1 + + + + write + + Clear + Write: writing a '1' sets the pin low; writing a '0' has no effect + 1 + + + + + PIN21 + Pin 21 + 21 + 21 + + read + + Low + Read: pin driver is low + 0 + + + High + Read: pin driver is high + 1 + + + + write + + Clear + Write: writing a '1' sets the pin low; writing a '0' has no effect + 1 + + + + + PIN22 + Pin 22 + 22 + 22 + + read + + Low + Read: pin driver is low + 0 + + + High + Read: pin driver is high + 1 + + + + write + + Clear + Write: writing a '1' sets the pin low; writing a '0' has no effect + 1 + + + + + PIN23 + Pin 23 + 23 + 23 + + read + + Low + Read: pin driver is low + 0 + + + High + Read: pin driver is high + 1 + + + + write + + Clear + Write: writing a '1' sets the pin low; writing a '0' has no effect + 1 + + + + + PIN24 + Pin 24 + 24 + 24 + + read + + Low + Read: pin driver is low + 0 + + + High + Read: pin driver is high + 1 + + + + write + + Clear + Write: writing a '1' sets the pin low; writing a '0' has no effect + 1 + + + + + PIN25 + Pin 25 + 25 + 25 + + read + + Low + Read: pin driver is low + 0 + + + High + Read: pin driver is high + 1 + + + + write + + Clear + Write: writing a '1' sets the pin low; writing a '0' has no effect + 1 + + + + + PIN26 + Pin 26 + 26 + 26 + + read + + Low + Read: pin driver is low + 0 + + + High + Read: pin driver is high + 1 + + + + write + + Clear + Write: writing a '1' sets the pin low; writing a '0' has no effect + 1 + + + + + PIN27 + Pin 27 + 27 + 27 + + read + + Low + Read: pin driver is low + 0 + + + High + Read: pin driver is high + 1 + + + + write + + Clear + Write: writing a '1' sets the pin low; writing a '0' has no effect + 1 + + + + + PIN28 + Pin 28 + 28 + 28 + + read + + Low + Read: pin driver is low + 0 + + + High + Read: pin driver is high + 1 + + + + write + + Clear + Write: writing a '1' sets the pin low; writing a '0' has no effect + 1 + + + + + PIN29 + Pin 29 + 29 + 29 + + read + + Low + Read: pin driver is low + 0 + + + High + Read: pin driver is high + 1 + + + + write + + Clear + Write: writing a '1' sets the pin low; writing a '0' has no effect + 1 + + + + + PIN30 + Pin 30 + 30 + 30 + + read + + Low + Read: pin driver is low + 0 + + + High + Read: pin driver is high + 1 + + + + write + + Clear + Write: writing a '1' sets the pin low; writing a '0' has no effect + 1 + + + + + PIN31 + Pin 31 + 31 + 31 + + read + + Low + Read: pin driver is low + 0 + + + High + Read: pin driver is high + 1 + + + + write + + Clear + Write: writing a '1' sets the pin low; writing a '0' has no effect + 1 + + + + + + + IN + Read GPIO port + 0x510 + read-only + + + PIN0 + Pin 0 + 0 + 0 + + + Low + Pin input is low + 0 + + + High + Pin input is high + 1 + + + + + PIN1 + Pin 1 + 1 + 1 + + + Low + Pin input is low + 0 + + + High + Pin input is high + 1 + + + + + PIN2 + Pin 2 + 2 + 2 + + + Low + Pin input is low + 0 + + + High + Pin input is high + 1 + + + + + PIN3 + Pin 3 + 3 + 3 + + + Low + Pin input is low + 0 + + + High + Pin input is high + 1 + + + + + PIN4 + Pin 4 + 4 + 4 + + + Low + Pin input is low + 0 + + + High + Pin input is high + 1 + + + + + PIN5 + Pin 5 + 5 + 5 + + + Low + Pin input is low + 0 + + + High + Pin input is high + 1 + + + + + PIN6 + Pin 6 + 6 + 6 + + + Low + Pin input is low + 0 + + + High + Pin input is high + 1 + + + + + PIN7 + Pin 7 + 7 + 7 + + + Low + Pin input is low + 0 + + + High + Pin input is high + 1 + + + + + PIN8 + Pin 8 + 8 + 8 + + + Low + Pin input is low + 0 + + + High + Pin input is high + 1 + + + + + PIN9 + Pin 9 + 9 + 9 + + + Low + Pin input is low + 0 + + + High + Pin input is high + 1 + + + + + PIN10 + Pin 10 + 10 + 10 + + + Low + Pin input is low + 0 + + + High + Pin input is high + 1 + + + + + PIN11 + Pin 11 + 11 + 11 + + + Low + Pin input is low + 0 + + + High + Pin input is high + 1 + + + + + PIN12 + Pin 12 + 12 + 12 + + + Low + Pin input is low + 0 + + + High + Pin input is high + 1 + + + + + PIN13 + Pin 13 + 13 + 13 + + + Low + Pin input is low + 0 + + + High + Pin input is high + 1 + + + + + PIN14 + Pin 14 + 14 + 14 + + + Low + Pin input is low + 0 + + + High + Pin input is high + 1 + + + + + PIN15 + Pin 15 + 15 + 15 + + + Low + Pin input is low + 0 + + + High + Pin input is high + 1 + + + + + PIN16 + Pin 16 + 16 + 16 + + + Low + Pin input is low + 0 + + + High + Pin input is high + 1 + + + + + PIN17 + Pin 17 + 17 + 17 + + + Low + Pin input is low + 0 + + + High + Pin input is high + 1 + + + + + PIN18 + Pin 18 + 18 + 18 + + + Low + Pin input is low + 0 + + + High + Pin input is high + 1 + + + + + PIN19 + Pin 19 + 19 + 19 + + + Low + Pin input is low + 0 + + + High + Pin input is high + 1 + + + + + PIN20 + Pin 20 + 20 + 20 + + + Low + Pin input is low + 0 + + + High + Pin input is high + 1 + + + + + PIN21 + Pin 21 + 21 + 21 + + + Low + Pin input is low + 0 + + + High + Pin input is high + 1 + + + + + PIN22 + Pin 22 + 22 + 22 + + + Low + Pin input is low + 0 + + + High + Pin input is high + 1 + + + + + PIN23 + Pin 23 + 23 + 23 + + + Low + Pin input is low + 0 + + + High + Pin input is high + 1 + + + + + PIN24 + Pin 24 + 24 + 24 + + + Low + Pin input is low + 0 + + + High + Pin input is high + 1 + + + + + PIN25 + Pin 25 + 25 + 25 + + + Low + Pin input is low + 0 + + + High + Pin input is high + 1 + + + + + PIN26 + Pin 26 + 26 + 26 + + + Low + Pin input is low + 0 + + + High + Pin input is high + 1 + + + + + PIN27 + Pin 27 + 27 + 27 + + + Low + Pin input is low + 0 + + + High + Pin input is high + 1 + + + + + PIN28 + Pin 28 + 28 + 28 + + + Low + Pin input is low + 0 + + + High + Pin input is high + 1 + + + + + PIN29 + Pin 29 + 29 + 29 + + + Low + Pin input is low + 0 + + + High + Pin input is high + 1 + + + + + PIN30 + Pin 30 + 30 + 30 + + + Low + Pin input is low + 0 + + + High + Pin input is high + 1 + + + + + PIN31 + Pin 31 + 31 + 31 + + + Low + Pin input is low + 0 + + + High + Pin input is high + 1 + + + + + + + DIR + Direction of GPIO pins + 0x514 + read-write + + + PIN0 + Pin 0 + 0 + 0 + + + Input + Pin set as input + 0 + + + Output + Pin set as output + 1 + + + + + PIN1 + Pin 1 + 1 + 1 + + + Input + Pin set as input + 0 + + + Output + Pin set as output + 1 + + + + + PIN2 + Pin 2 + 2 + 2 + + + Input + Pin set as input + 0 + + + Output + Pin set as output + 1 + + + + + PIN3 + Pin 3 + 3 + 3 + + + Input + Pin set as input + 0 + + + Output + Pin set as output + 1 + + + + + PIN4 + Pin 4 + 4 + 4 + + + Input + Pin set as input + 0 + + + Output + Pin set as output + 1 + + + + + PIN5 + Pin 5 + 5 + 5 + + + Input + Pin set as input + 0 + + + Output + Pin set as output + 1 + + + + + PIN6 + Pin 6 + 6 + 6 + + + Input + Pin set as input + 0 + + + Output + Pin set as output + 1 + + + + + PIN7 + Pin 7 + 7 + 7 + + + Input + Pin set as input + 0 + + + Output + Pin set as output + 1 + + + + + PIN8 + Pin 8 + 8 + 8 + + + Input + Pin set as input + 0 + + + Output + Pin set as output + 1 + + + + + PIN9 + Pin 9 + 9 + 9 + + + Input + Pin set as input + 0 + + + Output + Pin set as output + 1 + + + + + PIN10 + Pin 10 + 10 + 10 + + + Input + Pin set as input + 0 + + + Output + Pin set as output + 1 + + + + + PIN11 + Pin 11 + 11 + 11 + + + Input + Pin set as input + 0 + + + Output + Pin set as output + 1 + + + + + PIN12 + Pin 12 + 12 + 12 + + + Input + Pin set as input + 0 + + + Output + Pin set as output + 1 + + + + + PIN13 + Pin 13 + 13 + 13 + + + Input + Pin set as input + 0 + + + Output + Pin set as output + 1 + + + + + PIN14 + Pin 14 + 14 + 14 + + + Input + Pin set as input + 0 + + + Output + Pin set as output + 1 + + + + + PIN15 + Pin 15 + 15 + 15 + + + Input + Pin set as input + 0 + + + Output + Pin set as output + 1 + + + + + PIN16 + Pin 16 + 16 + 16 + + + Input + Pin set as input + 0 + + + Output + Pin set as output + 1 + + + + + PIN17 + Pin 17 + 17 + 17 + + + Input + Pin set as input + 0 + + + Output + Pin set as output + 1 + + + + + PIN18 + Pin 18 + 18 + 18 + + + Input + Pin set as input + 0 + + + Output + Pin set as output + 1 + + + + + PIN19 + Pin 19 + 19 + 19 + + + Input + Pin set as input + 0 + + + Output + Pin set as output + 1 + + + + + PIN20 + Pin 20 + 20 + 20 + + + Input + Pin set as input + 0 + + + Output + Pin set as output + 1 + + + + + PIN21 + Pin 21 + 21 + 21 + + + Input + Pin set as input + 0 + + + Output + Pin set as output + 1 + + + + + PIN22 + Pin 22 + 22 + 22 + + + Input + Pin set as input + 0 + + + Output + Pin set as output + 1 + + + + + PIN23 + Pin 23 + 23 + 23 + + + Input + Pin set as input + 0 + + + Output + Pin set as output + 1 + + + + + PIN24 + Pin 24 + 24 + 24 + + + Input + Pin set as input + 0 + + + Output + Pin set as output + 1 + + + + + PIN25 + Pin 25 + 25 + 25 + + + Input + Pin set as input + 0 + + + Output + Pin set as output + 1 + + + + + PIN26 + Pin 26 + 26 + 26 + + + Input + Pin set as input + 0 + + + Output + Pin set as output + 1 + + + + + PIN27 + Pin 27 + 27 + 27 + + + Input + Pin set as input + 0 + + + Output + Pin set as output + 1 + + + + + PIN28 + Pin 28 + 28 + 28 + + + Input + Pin set as input + 0 + + + Output + Pin set as output + 1 + + + + + PIN29 + Pin 29 + 29 + 29 + + + Input + Pin set as input + 0 + + + Output + Pin set as output + 1 + + + + + PIN30 + Pin 30 + 30 + 30 + + + Input + Pin set as input + 0 + + + Output + Pin set as output + 1 + + + + + PIN31 + Pin 31 + 31 + 31 + + + Input + Pin set as input + 0 + + + Output + Pin set as output + 1 + + + + + + + DIRSET + DIR set register + 0x518 + read-write + oneToSet + + + PIN0 + Set as output pin 0 + 0 + 0 + + read + + Input + Read: pin set as input + 0 + + + Output + Read: pin set as output + 1 + + + + write + + Set + Write: writing a '1' sets pin to output; writing a '0' has no effect + 1 + + + + + PIN1 + Set as output pin 1 + 1 + 1 + + read + + Input + Read: pin set as input + 0 + + + Output + Read: pin set as output + 1 + + + + write + + Set + Write: writing a '1' sets pin to output; writing a '0' has no effect + 1 + + + + + PIN2 + Set as output pin 2 + 2 + 2 + + read + + Input + Read: pin set as input + 0 + + + Output + Read: pin set as output + 1 + + + + write + + Set + Write: writing a '1' sets pin to output; writing a '0' has no effect + 1 + + + + + PIN3 + Set as output pin 3 + 3 + 3 + + read + + Input + Read: pin set as input + 0 + + + Output + Read: pin set as output + 1 + + + + write + + Set + Write: writing a '1' sets pin to output; writing a '0' has no effect + 1 + + + + + PIN4 + Set as output pin 4 + 4 + 4 + + read + + Input + Read: pin set as input + 0 + + + Output + Read: pin set as output + 1 + + + + write + + Set + Write: writing a '1' sets pin to output; writing a '0' has no effect + 1 + + + + + PIN5 + Set as output pin 5 + 5 + 5 + + read + + Input + Read: pin set as input + 0 + + + Output + Read: pin set as output + 1 + + + + write + + Set + Write: writing a '1' sets pin to output; writing a '0' has no effect + 1 + + + + + PIN6 + Set as output pin 6 + 6 + 6 + + read + + Input + Read: pin set as input + 0 + + + Output + Read: pin set as output + 1 + + + + write + + Set + Write: writing a '1' sets pin to output; writing a '0' has no effect + 1 + + + + + PIN7 + Set as output pin 7 + 7 + 7 + + read + + Input + Read: pin set as input + 0 + + + Output + Read: pin set as output + 1 + + + + write + + Set + Write: writing a '1' sets pin to output; writing a '0' has no effect + 1 + + + + + PIN8 + Set as output pin 8 + 8 + 8 + + read + + Input + Read: pin set as input + 0 + + + Output + Read: pin set as output + 1 + + + + write + + Set + Write: writing a '1' sets pin to output; writing a '0' has no effect + 1 + + + + + PIN9 + Set as output pin 9 + 9 + 9 + + read + + Input + Read: pin set as input + 0 + + + Output + Read: pin set as output + 1 + + + + write + + Set + Write: writing a '1' sets pin to output; writing a '0' has no effect + 1 + + + + + PIN10 + Set as output pin 10 + 10 + 10 + + read + + Input + Read: pin set as input + 0 + + + Output + Read: pin set as output + 1 + + + + write + + Set + Write: writing a '1' sets pin to output; writing a '0' has no effect + 1 + + + + + PIN11 + Set as output pin 11 + 11 + 11 + + read + + Input + Read: pin set as input + 0 + + + Output + Read: pin set as output + 1 + + + + write + + Set + Write: writing a '1' sets pin to output; writing a '0' has no effect + 1 + + + + + PIN12 + Set as output pin 12 + 12 + 12 + + read + + Input + Read: pin set as input + 0 + + + Output + Read: pin set as output + 1 + + + + write + + Set + Write: writing a '1' sets pin to output; writing a '0' has no effect + 1 + + + + + PIN13 + Set as output pin 13 + 13 + 13 + + read + + Input + Read: pin set as input + 0 + + + Output + Read: pin set as output + 1 + + + + write + + Set + Write: writing a '1' sets pin to output; writing a '0' has no effect + 1 + + + + + PIN14 + Set as output pin 14 + 14 + 14 + + read + + Input + Read: pin set as input + 0 + + + Output + Read: pin set as output + 1 + + + + write + + Set + Write: writing a '1' sets pin to output; writing a '0' has no effect + 1 + + + + + PIN15 + Set as output pin 15 + 15 + 15 + + read + + Input + Read: pin set as input + 0 + + + Output + Read: pin set as output + 1 + + + + write + + Set + Write: writing a '1' sets pin to output; writing a '0' has no effect + 1 + + + + + PIN16 + Set as output pin 16 + 16 + 16 + + read + + Input + Read: pin set as input + 0 + + + Output + Read: pin set as output + 1 + + + + write + + Set + Write: writing a '1' sets pin to output; writing a '0' has no effect + 1 + + + + + PIN17 + Set as output pin 17 + 17 + 17 + + read + + Input + Read: pin set as input + 0 + + + Output + Read: pin set as output + 1 + + + + write + + Set + Write: writing a '1' sets pin to output; writing a '0' has no effect + 1 + + + + + PIN18 + Set as output pin 18 + 18 + 18 + + read + + Input + Read: pin set as input + 0 + + + Output + Read: pin set as output + 1 + + + + write + + Set + Write: writing a '1' sets pin to output; writing a '0' has no effect + 1 + + + + + PIN19 + Set as output pin 19 + 19 + 19 + + read + + Input + Read: pin set as input + 0 + + + Output + Read: pin set as output + 1 + + + + write + + Set + Write: writing a '1' sets pin to output; writing a '0' has no effect + 1 + + + + + PIN20 + Set as output pin 20 + 20 + 20 + + read + + Input + Read: pin set as input + 0 + + + Output + Read: pin set as output + 1 + + + + write + + Set + Write: writing a '1' sets pin to output; writing a '0' has no effect + 1 + + + + + PIN21 + Set as output pin 21 + 21 + 21 + + read + + Input + Read: pin set as input + 0 + + + Output + Read: pin set as output + 1 + + + + write + + Set + Write: writing a '1' sets pin to output; writing a '0' has no effect + 1 + + + + + PIN22 + Set as output pin 22 + 22 + 22 + + read + + Input + Read: pin set as input + 0 + + + Output + Read: pin set as output + 1 + + + + write + + Set + Write: writing a '1' sets pin to output; writing a '0' has no effect + 1 + + + + + PIN23 + Set as output pin 23 + 23 + 23 + + read + + Input + Read: pin set as input + 0 + + + Output + Read: pin set as output + 1 + + + + write + + Set + Write: writing a '1' sets pin to output; writing a '0' has no effect + 1 + + + + + PIN24 + Set as output pin 24 + 24 + 24 + + read + + Input + Read: pin set as input + 0 + + + Output + Read: pin set as output + 1 + + + + write + + Set + Write: writing a '1' sets pin to output; writing a '0' has no effect + 1 + + + + + PIN25 + Set as output pin 25 + 25 + 25 + + read + + Input + Read: pin set as input + 0 + + + Output + Read: pin set as output + 1 + + + + write + + Set + Write: writing a '1' sets pin to output; writing a '0' has no effect + 1 + + + + + PIN26 + Set as output pin 26 + 26 + 26 + + read + + Input + Read: pin set as input + 0 + + + Output + Read: pin set as output + 1 + + + + write + + Set + Write: writing a '1' sets pin to output; writing a '0' has no effect + 1 + + + + + PIN27 + Set as output pin 27 + 27 + 27 + + read + + Input + Read: pin set as input + 0 + + + Output + Read: pin set as output + 1 + + + + write + + Set + Write: writing a '1' sets pin to output; writing a '0' has no effect + 1 + + + + + PIN28 + Set as output pin 28 + 28 + 28 + + read + + Input + Read: pin set as input + 0 + + + Output + Read: pin set as output + 1 + + + + write + + Set + Write: writing a '1' sets pin to output; writing a '0' has no effect + 1 + + + + + PIN29 + Set as output pin 29 + 29 + 29 + + read + + Input + Read: pin set as input + 0 + + + Output + Read: pin set as output + 1 + + + + write + + Set + Write: writing a '1' sets pin to output; writing a '0' has no effect + 1 + + + + + PIN30 + Set as output pin 30 + 30 + 30 + + read + + Input + Read: pin set as input + 0 + + + Output + Read: pin set as output + 1 + + + + write + + Set + Write: writing a '1' sets pin to output; writing a '0' has no effect + 1 + + + + + PIN31 + Set as output pin 31 + 31 + 31 + + read + + Input + Read: pin set as input + 0 + + + Output + Read: pin set as output + 1 + + + + write + + Set + Write: writing a '1' sets pin to output; writing a '0' has no effect + 1 + + + + + + + DIRCLR + DIR clear register + 0x51C + read-write + oneToClear + + + PIN0 + Set as input pin 0 + 0 + 0 + + read + + Input + Read: pin set as input + 0 + + + Output + Read: pin set as output + 1 + + + + write + + Clear + Write: writing a '1' sets pin to input; writing a '0' has no effect + 1 + + + + + PIN1 + Set as input pin 1 + 1 + 1 + + read + + Input + Read: pin set as input + 0 + + + Output + Read: pin set as output + 1 + + + + write + + Clear + Write: writing a '1' sets pin to input; writing a '0' has no effect + 1 + + + + + PIN2 + Set as input pin 2 + 2 + 2 + + read + + Input + Read: pin set as input + 0 + + + Output + Read: pin set as output + 1 + + + + write + + Clear + Write: writing a '1' sets pin to input; writing a '0' has no effect + 1 + + + + + PIN3 + Set as input pin 3 + 3 + 3 + + read + + Input + Read: pin set as input + 0 + + + Output + Read: pin set as output + 1 + + + + write + + Clear + Write: writing a '1' sets pin to input; writing a '0' has no effect + 1 + + + + + PIN4 + Set as input pin 4 + 4 + 4 + + read + + Input + Read: pin set as input + 0 + + + Output + Read: pin set as output + 1 + + + + write + + Clear + Write: writing a '1' sets pin to input; writing a '0' has no effect + 1 + + + + + PIN5 + Set as input pin 5 + 5 + 5 + + read + + Input + Read: pin set as input + 0 + + + Output + Read: pin set as output + 1 + + + + write + + Clear + Write: writing a '1' sets pin to input; writing a '0' has no effect + 1 + + + + + PIN6 + Set as input pin 6 + 6 + 6 + + read + + Input + Read: pin set as input + 0 + + + Output + Read: pin set as output + 1 + + + + write + + Clear + Write: writing a '1' sets pin to input; writing a '0' has no effect + 1 + + + + + PIN7 + Set as input pin 7 + 7 + 7 + + read + + Input + Read: pin set as input + 0 + + + Output + Read: pin set as output + 1 + + + + write + + Clear + Write: writing a '1' sets pin to input; writing a '0' has no effect + 1 + + + + + PIN8 + Set as input pin 8 + 8 + 8 + + read + + Input + Read: pin set as input + 0 + + + Output + Read: pin set as output + 1 + + + + write + + Clear + Write: writing a '1' sets pin to input; writing a '0' has no effect + 1 + + + + + PIN9 + Set as input pin 9 + 9 + 9 + + read + + Input + Read: pin set as input + 0 + + + Output + Read: pin set as output + 1 + + + + write + + Clear + Write: writing a '1' sets pin to input; writing a '0' has no effect + 1 + + + + + PIN10 + Set as input pin 10 + 10 + 10 + + read + + Input + Read: pin set as input + 0 + + + Output + Read: pin set as output + 1 + + + + write + + Clear + Write: writing a '1' sets pin to input; writing a '0' has no effect + 1 + + + + + PIN11 + Set as input pin 11 + 11 + 11 + + read + + Input + Read: pin set as input + 0 + + + Output + Read: pin set as output + 1 + + + + write + + Clear + Write: writing a '1' sets pin to input; writing a '0' has no effect + 1 + + + + + PIN12 + Set as input pin 12 + 12 + 12 + + read + + Input + Read: pin set as input + 0 + + + Output + Read: pin set as output + 1 + + + + write + + Clear + Write: writing a '1' sets pin to input; writing a '0' has no effect + 1 + + + + + PIN13 + Set as input pin 13 + 13 + 13 + + read + + Input + Read: pin set as input + 0 + + + Output + Read: pin set as output + 1 + + + + write + + Clear + Write: writing a '1' sets pin to input; writing a '0' has no effect + 1 + + + + + PIN14 + Set as input pin 14 + 14 + 14 + + read + + Input + Read: pin set as input + 0 + + + Output + Read: pin set as output + 1 + + + + write + + Clear + Write: writing a '1' sets pin to input; writing a '0' has no effect + 1 + + + + + PIN15 + Set as input pin 15 + 15 + 15 + + read + + Input + Read: pin set as input + 0 + + + Output + Read: pin set as output + 1 + + + + write + + Clear + Write: writing a '1' sets pin to input; writing a '0' has no effect + 1 + + + + + PIN16 + Set as input pin 16 + 16 + 16 + + read + + Input + Read: pin set as input + 0 + + + Output + Read: pin set as output + 1 + + + + write + + Clear + Write: writing a '1' sets pin to input; writing a '0' has no effect + 1 + + + + + PIN17 + Set as input pin 17 + 17 + 17 + + read + + Input + Read: pin set as input + 0 + + + Output + Read: pin set as output + 1 + + + + write + + Clear + Write: writing a '1' sets pin to input; writing a '0' has no effect + 1 + + + + + PIN18 + Set as input pin 18 + 18 + 18 + + read + + Input + Read: pin set as input + 0 + + + Output + Read: pin set as output + 1 + + + + write + + Clear + Write: writing a '1' sets pin to input; writing a '0' has no effect + 1 + + + + + PIN19 + Set as input pin 19 + 19 + 19 + + read + + Input + Read: pin set as input + 0 + + + Output + Read: pin set as output + 1 + + + + write + + Clear + Write: writing a '1' sets pin to input; writing a '0' has no effect + 1 + + + + + PIN20 + Set as input pin 20 + 20 + 20 + + read + + Input + Read: pin set as input + 0 + + + Output + Read: pin set as output + 1 + + + + write + + Clear + Write: writing a '1' sets pin to input; writing a '0' has no effect + 1 + + + + + PIN21 + Set as input pin 21 + 21 + 21 + + read + + Input + Read: pin set as input + 0 + + + Output + Read: pin set as output + 1 + + + + write + + Clear + Write: writing a '1' sets pin to input; writing a '0' has no effect + 1 + + + + + PIN22 + Set as input pin 22 + 22 + 22 + + read + + Input + Read: pin set as input + 0 + + + Output + Read: pin set as output + 1 + + + + write + + Clear + Write: writing a '1' sets pin to input; writing a '0' has no effect + 1 + + + + + PIN23 + Set as input pin 23 + 23 + 23 + + read + + Input + Read: pin set as input + 0 + + + Output + Read: pin set as output + 1 + + + + write + + Clear + Write: writing a '1' sets pin to input; writing a '0' has no effect + 1 + + + + + PIN24 + Set as input pin 24 + 24 + 24 + + read + + Input + Read: pin set as input + 0 + + + Output + Read: pin set as output + 1 + + + + write + + Clear + Write: writing a '1' sets pin to input; writing a '0' has no effect + 1 + + + + + PIN25 + Set as input pin 25 + 25 + 25 + + read + + Input + Read: pin set as input + 0 + + + Output + Read: pin set as output + 1 + + + + write + + Clear + Write: writing a '1' sets pin to input; writing a '0' has no effect + 1 + + + + + PIN26 + Set as input pin 26 + 26 + 26 + + read + + Input + Read: pin set as input + 0 + + + Output + Read: pin set as output + 1 + + + + write + + Clear + Write: writing a '1' sets pin to input; writing a '0' has no effect + 1 + + + + + PIN27 + Set as input pin 27 + 27 + 27 + + read + + Input + Read: pin set as input + 0 + + + Output + Read: pin set as output + 1 + + + + write + + Clear + Write: writing a '1' sets pin to input; writing a '0' has no effect + 1 + + + + + PIN28 + Set as input pin 28 + 28 + 28 + + read + + Input + Read: pin set as input + 0 + + + Output + Read: pin set as output + 1 + + + + write + + Clear + Write: writing a '1' sets pin to input; writing a '0' has no effect + 1 + + + + + PIN29 + Set as input pin 29 + 29 + 29 + + read + + Input + Read: pin set as input + 0 + + + Output + Read: pin set as output + 1 + + + + write + + Clear + Write: writing a '1' sets pin to input; writing a '0' has no effect + 1 + + + + + PIN30 + Set as input pin 30 + 30 + 30 + + read + + Input + Read: pin set as input + 0 + + + Output + Read: pin set as output + 1 + + + + write + + Clear + Write: writing a '1' sets pin to input; writing a '0' has no effect + 1 + + + + + PIN31 + Set as input pin 31 + 31 + 31 + + read + + Input + Read: pin set as input + 0 + + + Output + Read: pin set as output + 1 + + + + write + + Clear + Write: writing a '1' sets pin to input; writing a '0' has no effect + 1 + + + + + + + LATCH + Latch register indicating what GPIO pins that have met the criteria set in the PIN_CNF[n].SENSE registers + 0x520 + read-write + + + PIN0 + Status on whether PIN0 has met criteria set in PIN_CNF0.SENSE register. Write '1' to clear. + 0 + 0 + + + NotLatched + Criteria has not been met + 0 + + + Latched + Criteria has been met + 1 + + + + + PIN1 + Status on whether PIN1 has met criteria set in PIN_CNF1.SENSE register. Write '1' to clear. + 1 + 1 + + + NotLatched + Criteria has not been met + 0 + + + Latched + Criteria has been met + 1 + + + + + PIN2 + Status on whether PIN2 has met criteria set in PIN_CNF2.SENSE register. Write '1' to clear. + 2 + 2 + + + NotLatched + Criteria has not been met + 0 + + + Latched + Criteria has been met + 1 + + + + + PIN3 + Status on whether PIN3 has met criteria set in PIN_CNF3.SENSE register. Write '1' to clear. + 3 + 3 + + + NotLatched + Criteria has not been met + 0 + + + Latched + Criteria has been met + 1 + + + + + PIN4 + Status on whether PIN4 has met criteria set in PIN_CNF4.SENSE register. Write '1' to clear. + 4 + 4 + + + NotLatched + Criteria has not been met + 0 + + + Latched + Criteria has been met + 1 + + + + + PIN5 + Status on whether PIN5 has met criteria set in PIN_CNF5.SENSE register. Write '1' to clear. + 5 + 5 + + + NotLatched + Criteria has not been met + 0 + + + Latched + Criteria has been met + 1 + + + + + PIN6 + Status on whether PIN6 has met criteria set in PIN_CNF6.SENSE register. Write '1' to clear. + 6 + 6 + + + NotLatched + Criteria has not been met + 0 + + + Latched + Criteria has been met + 1 + + + + + PIN7 + Status on whether PIN7 has met criteria set in PIN_CNF7.SENSE register. Write '1' to clear. + 7 + 7 + + + NotLatched + Criteria has not been met + 0 + + + Latched + Criteria has been met + 1 + + + + + PIN8 + Status on whether PIN8 has met criteria set in PIN_CNF8.SENSE register. Write '1' to clear. + 8 + 8 + + + NotLatched + Criteria has not been met + 0 + + + Latched + Criteria has been met + 1 + + + + + PIN9 + Status on whether PIN9 has met criteria set in PIN_CNF9.SENSE register. Write '1' to clear. + 9 + 9 + + + NotLatched + Criteria has not been met + 0 + + + Latched + Criteria has been met + 1 + + + + + PIN10 + Status on whether PIN10 has met criteria set in PIN_CNF10.SENSE register. Write '1' to clear. + 10 + 10 + + + NotLatched + Criteria has not been met + 0 + + + Latched + Criteria has been met + 1 + + + + + PIN11 + Status on whether PIN11 has met criteria set in PIN_CNF11.SENSE register. Write '1' to clear. + 11 + 11 + + + NotLatched + Criteria has not been met + 0 + + + Latched + Criteria has been met + 1 + + + + + PIN12 + Status on whether PIN12 has met criteria set in PIN_CNF12.SENSE register. Write '1' to clear. + 12 + 12 + + + NotLatched + Criteria has not been met + 0 + + + Latched + Criteria has been met + 1 + + + + + PIN13 + Status on whether PIN13 has met criteria set in PIN_CNF13.SENSE register. Write '1' to clear. + 13 + 13 + + + NotLatched + Criteria has not been met + 0 + + + Latched + Criteria has been met + 1 + + + + + PIN14 + Status on whether PIN14 has met criteria set in PIN_CNF14.SENSE register. Write '1' to clear. + 14 + 14 + + + NotLatched + Criteria has not been met + 0 + + + Latched + Criteria has been met + 1 + + + + + PIN15 + Status on whether PIN15 has met criteria set in PIN_CNF15.SENSE register. Write '1' to clear. + 15 + 15 + + + NotLatched + Criteria has not been met + 0 + + + Latched + Criteria has been met + 1 + + + + + PIN16 + Status on whether PIN16 has met criteria set in PIN_CNF16.SENSE register. Write '1' to clear. + 16 + 16 + + + NotLatched + Criteria has not been met + 0 + + + Latched + Criteria has been met + 1 + + + + + PIN17 + Status on whether PIN17 has met criteria set in PIN_CNF17.SENSE register. Write '1' to clear. + 17 + 17 + + + NotLatched + Criteria has not been met + 0 + + + Latched + Criteria has been met + 1 + + + + + PIN18 + Status on whether PIN18 has met criteria set in PIN_CNF18.SENSE register. Write '1' to clear. + 18 + 18 + + + NotLatched + Criteria has not been met + 0 + + + Latched + Criteria has been met + 1 + + + + + PIN19 + Status on whether PIN19 has met criteria set in PIN_CNF19.SENSE register. Write '1' to clear. + 19 + 19 + + + NotLatched + Criteria has not been met + 0 + + + Latched + Criteria has been met + 1 + + + + + PIN20 + Status on whether PIN20 has met criteria set in PIN_CNF20.SENSE register. Write '1' to clear. + 20 + 20 + + + NotLatched + Criteria has not been met + 0 + + + Latched + Criteria has been met + 1 + + + + + PIN21 + Status on whether PIN21 has met criteria set in PIN_CNF21.SENSE register. Write '1' to clear. + 21 + 21 + + + NotLatched + Criteria has not been met + 0 + + + Latched + Criteria has been met + 1 + + + + + PIN22 + Status on whether PIN22 has met criteria set in PIN_CNF22.SENSE register. Write '1' to clear. + 22 + 22 + + + NotLatched + Criteria has not been met + 0 + + + Latched + Criteria has been met + 1 + + + + + PIN23 + Status on whether PIN23 has met criteria set in PIN_CNF23.SENSE register. Write '1' to clear. + 23 + 23 + + + NotLatched + Criteria has not been met + 0 + + + Latched + Criteria has been met + 1 + + + + + PIN24 + Status on whether PIN24 has met criteria set in PIN_CNF24.SENSE register. Write '1' to clear. + 24 + 24 + + + NotLatched + Criteria has not been met + 0 + + + Latched + Criteria has been met + 1 + + + + + PIN25 + Status on whether PIN25 has met criteria set in PIN_CNF25.SENSE register. Write '1' to clear. + 25 + 25 + + + NotLatched + Criteria has not been met + 0 + + + Latched + Criteria has been met + 1 + + + + + PIN26 + Status on whether PIN26 has met criteria set in PIN_CNF26.SENSE register. Write '1' to clear. + 26 + 26 + + + NotLatched + Criteria has not been met + 0 + + + Latched + Criteria has been met + 1 + + + + + PIN27 + Status on whether PIN27 has met criteria set in PIN_CNF27.SENSE register. Write '1' to clear. + 27 + 27 + + + NotLatched + Criteria has not been met + 0 + + + Latched + Criteria has been met + 1 + + + + + PIN28 + Status on whether PIN28 has met criteria set in PIN_CNF28.SENSE register. Write '1' to clear. + 28 + 28 + + + NotLatched + Criteria has not been met + 0 + + + Latched + Criteria has been met + 1 + + + + + PIN29 + Status on whether PIN29 has met criteria set in PIN_CNF29.SENSE register. Write '1' to clear. + 29 + 29 + + + NotLatched + Criteria has not been met + 0 + + + Latched + Criteria has been met + 1 + + + + + PIN30 + Status on whether PIN30 has met criteria set in PIN_CNF30.SENSE register. Write '1' to clear. + 30 + 30 + + + NotLatched + Criteria has not been met + 0 + + + Latched + Criteria has been met + 1 + + + + + PIN31 + Status on whether PIN31 has met criteria set in PIN_CNF31.SENSE register. Write '1' to clear. + 31 + 31 + + + NotLatched + Criteria has not been met + 0 + + + Latched + Criteria has been met + 1 + + + + + + + DETECTMODE + Select between default DETECT signal behaviour and LDETECT mode + 0x524 + read-write + + + DETECTMODE + Select between default DETECT signal behaviour and LDETECT mode + 0 + 0 + + + Default + DETECT directly connected to PIN DETECT signals + 0 + + + LDETECT + Use the latched LDETECT behaviour + 1 + + + + + + + 0x20 + 0x4 + PIN_CNF[%s] + Description collection: Configuration of GPIO pins + 0x700 + read-write + 0x00000002 + + + DIR + Pin direction. Same physical register as DIR register + 0 + 0 + + + Input + Configure pin as an input pin + 0 + + + Output + Configure pin as an output pin + 1 + + + + + INPUT + Connect or disconnect input buffer + 1 + 1 + + + Connect + Connect input buffer + 0 + + + Disconnect + Disconnect input buffer + 1 + + + + + PULL + Pull configuration + 2 + 3 + + + Disabled + No pull + 0 + + + Pulldown + Pull down on pin + 1 + + + Pullup + Pull up on pin + 3 + + + + + DRIVE + Drive configuration + 8 + 10 + + + S0S1 + Standard '0', standard '1' + 0 + + + H0S1 + High drive '0', standard '1' + 1 + + + S0H1 + Standard '0', high drive '1' + 2 + + + H0H1 + High drive '0', high 'drive '1'' + 3 + + + D0S1 + Disconnect '0' standard '1' (normally used for wired-or connections) + 4 + + + D0H1 + Disconnect '0', high drive '1' (normally used for wired-or connections) + 5 + + + S0D1 + Standard '0'. disconnect '1' (normally used for wired-and connections) + 6 + + + H0D1 + High drive '0', disconnect '1' (normally used for wired-and connections) + 7 + + + + + SENSE + Pin sensing mechanism + 16 + 17 + + + Disabled + Disabled + 0 + + + High + Sense for high level + 2 + + + Low + Sense for low level + 3 + + + + + + + + + RADIO + 2.4 GHz Radio + 0x40001000 + + 0 + 0x1000 + registers + + + RADIO + 1 + + RADIO + 0x20 + + + TASKS_TXEN + Enable RADIO in TX mode + 0x000 + write-only + + + TASKS_TXEN + Enable RADIO in TX mode + 0 + 0 + + + Trigger + Trigger task + 1 + + + + + + + TASKS_RXEN + Enable RADIO in RX mode + 0x004 + write-only + + + TASKS_RXEN + Enable RADIO in RX mode + 0 + 0 + + + Trigger + Trigger task + 1 + + + + + + + TASKS_START + Start RADIO + 0x008 + write-only + + + TASKS_START + Start RADIO + 0 + 0 + + + Trigger + Trigger task + 1 + + + + + + + TASKS_STOP + Stop RADIO + 0x00C + write-only + + + TASKS_STOP + Stop RADIO + 0 + 0 + + + Trigger + Trigger task + 1 + + + + + + + TASKS_DISABLE + Disable RADIO + 0x010 + write-only + + + TASKS_DISABLE + Disable RADIO + 0 + 0 + + + Trigger + Trigger task + 1 + + + + + + + TASKS_RSSISTART + Start the RSSI and take one single sample of the receive signal strength. + 0x014 + write-only + + + TASKS_RSSISTART + Start the RSSI and take one single sample of the receive signal strength. + 0 + 0 + + + Trigger + Trigger task + 1 + + + + + + + TASKS_RSSISTOP + Stop the RSSI measurement + 0x018 + write-only + + + TASKS_RSSISTOP + Stop the RSSI measurement + 0 + 0 + + + Trigger + Trigger task + 1 + + + + + + + TASKS_BCSTART + Start the bit counter + 0x01C + write-only + + + TASKS_BCSTART + Start the bit counter + 0 + 0 + + + Trigger + Trigger task + 1 + + + + + + + TASKS_BCSTOP + Stop the bit counter + 0x020 + write-only + + + TASKS_BCSTOP + Stop the bit counter + 0 + 0 + + + Trigger + Trigger task + 1 + + + + + + + EVENTS_READY + RADIO has ramped up and is ready to be started + 0x100 + read-write + + + EVENTS_READY + RADIO has ramped up and is ready to be started + 0 + 0 + + + NotGenerated + Event not generated + 0 + + + Generated + Event generated + 1 + + + + + + + EVENTS_ADDRESS + Address sent or received + 0x104 + read-write + + + EVENTS_ADDRESS + Address sent or received + 0 + 0 + + + NotGenerated + Event not generated + 0 + + + Generated + Event generated + 1 + + + + + + + EVENTS_PAYLOAD + Packet payload sent or received + 0x108 + read-write + + + EVENTS_PAYLOAD + Packet payload sent or received + 0 + 0 + + + NotGenerated + Event not generated + 0 + + + Generated + Event generated + 1 + + + + + + + EVENTS_END + Packet sent or received + 0x10C + read-write + + + EVENTS_END + Packet sent or received + 0 + 0 + + + NotGenerated + Event not generated + 0 + + + Generated + Event generated + 1 + + + + + + + EVENTS_DISABLED + RADIO has been disabled + 0x110 + read-write + + + EVENTS_DISABLED + RADIO has been disabled + 0 + 0 + + + NotGenerated + Event not generated + 0 + + + Generated + Event generated + 1 + + + + + + + EVENTS_DEVMATCH + A device address match occurred on the last received packet + 0x114 + read-write + + + EVENTS_DEVMATCH + A device address match occurred on the last received packet + 0 + 0 + + + NotGenerated + Event not generated + 0 + + + Generated + Event generated + 1 + + + + + + + EVENTS_DEVMISS + No device address match occurred on the last received packet + 0x118 + read-write + + + EVENTS_DEVMISS + No device address match occurred on the last received packet + 0 + 0 + + + NotGenerated + Event not generated + 0 + + + Generated + Event generated + 1 + + + + + + + EVENTS_RSSIEND + Sampling of receive signal strength complete. + 0x11C + read-write + + + EVENTS_RSSIEND + Sampling of receive signal strength complete. + 0 + 0 + + + NotGenerated + Event not generated + 0 + + + Generated + Event generated + 1 + + + + + + + EVENTS_BCMATCH + Bit counter reached bit count value. + 0x128 + read-write + + + EVENTS_BCMATCH + Bit counter reached bit count value. + 0 + 0 + + + NotGenerated + Event not generated + 0 + + + Generated + Event generated + 1 + + + + + + + EVENTS_CRCOK + Packet received with CRC ok + 0x130 + read-write + + + EVENTS_CRCOK + Packet received with CRC ok + 0 + 0 + + + NotGenerated + Event not generated + 0 + + + Generated + Event generated + 1 + + + + + + + EVENTS_CRCERROR + Packet received with CRC error + 0x134 + read-write + + + EVENTS_CRCERROR + Packet received with CRC error + 0 + 0 + + + NotGenerated + Event not generated + 0 + + + Generated + Event generated + 1 + + + + + + + SHORTS + Shortcuts between local events and tasks + 0x200 + read-write + + + READY_START + Shortcut between event READY and task START + 0 + 0 + + + Disabled + Disable shortcut + 0 + + + Enabled + Enable shortcut + 1 + + + + + END_DISABLE + Shortcut between event END and task DISABLE + 1 + 1 + + + Disabled + Disable shortcut + 0 + + + Enabled + Enable shortcut + 1 + + + + + DISABLED_TXEN + Shortcut between event DISABLED and task TXEN + 2 + 2 + + + Disabled + Disable shortcut + 0 + + + Enabled + Enable shortcut + 1 + + + + + DISABLED_RXEN + Shortcut between event DISABLED and task RXEN + 3 + 3 + + + Disabled + Disable shortcut + 0 + + + Enabled + Enable shortcut + 1 + + + + + ADDRESS_RSSISTART + Shortcut between event ADDRESS and task RSSISTART + 4 + 4 + + + Disabled + Disable shortcut + 0 + + + Enabled + Enable shortcut + 1 + + + + + END_START + Shortcut between event END and task START + 5 + 5 + + + Disabled + Disable shortcut + 0 + + + Enabled + Enable shortcut + 1 + + + + + ADDRESS_BCSTART + Shortcut between event ADDRESS and task BCSTART + 6 + 6 + + + Disabled + Disable shortcut + 0 + + + Enabled + Enable shortcut + 1 + + + + + DISABLED_RSSISTOP + Shortcut between event DISABLED and task RSSISTOP + 8 + 8 + + + Disabled + Disable shortcut + 0 + + + Enabled + Enable shortcut + 1 + + + + + + + INTENSET + Enable interrupt + 0x304 + read-write + + + READY + Write '1' to enable interrupt for event READY + 0 + 0 + + read + + Disabled + Read: Disabled + 0 + + + Enabled + Read: Enabled + 1 + + + + write + + Set + Enable + 1 + + + + + ADDRESS + Write '1' to enable interrupt for event ADDRESS + 1 + 1 + + read + + Disabled + Read: Disabled + 0 + + + Enabled + Read: Enabled + 1 + + + + write + + Set + Enable + 1 + + + + + PAYLOAD + Write '1' to enable interrupt for event PAYLOAD + 2 + 2 + + read + + Disabled + Read: Disabled + 0 + + + Enabled + Read: Enabled + 1 + + + + write + + Set + Enable + 1 + + + + + END + Write '1' to enable interrupt for event END + 3 + 3 + + read + + Disabled + Read: Disabled + 0 + + + Enabled + Read: Enabled + 1 + + + + write + + Set + Enable + 1 + + + + + DISABLED + Write '1' to enable interrupt for event DISABLED + 4 + 4 + + read + + Disabled + Read: Disabled + 0 + + + Enabled + Read: Enabled + 1 + + + + write + + Set + Enable + 1 + + + + + DEVMATCH + Write '1' to enable interrupt for event DEVMATCH + 5 + 5 + + read + + Disabled + Read: Disabled + 0 + + + Enabled + Read: Enabled + 1 + + + + write + + Set + Enable + 1 + + + + + DEVMISS + Write '1' to enable interrupt for event DEVMISS + 6 + 6 + + read + + Disabled + Read: Disabled + 0 + + + Enabled + Read: Enabled + 1 + + + + write + + Set + Enable + 1 + + + + + RSSIEND + Write '1' to enable interrupt for event RSSIEND + 7 + 7 + + read + + Disabled + Read: Disabled + 0 + + + Enabled + Read: Enabled + 1 + + + + write + + Set + Enable + 1 + + + + + BCMATCH + Write '1' to enable interrupt for event BCMATCH + 10 + 10 + + read + + Disabled + Read: Disabled + 0 + + + Enabled + Read: Enabled + 1 + + + + write + + Set + Enable + 1 + + + + + CRCOK + Write '1' to enable interrupt for event CRCOK + 12 + 12 + + read + + Disabled + Read: Disabled + 0 + + + Enabled + Read: Enabled + 1 + + + + write + + Set + Enable + 1 + + + + + CRCERROR + Write '1' to enable interrupt for event CRCERROR + 13 + 13 + + read + + Disabled + Read: Disabled + 0 + + + Enabled + Read: Enabled + 1 + + + + write + + Set + Enable + 1 + + + + + + + INTENCLR + Disable interrupt + 0x308 + read-write + + + READY + Write '1' to disable interrupt for event READY + 0 + 0 + + read + + Disabled + Read: Disabled + 0 + + + Enabled + Read: Enabled + 1 + + + + write + + Clear + Disable + 1 + + + + + ADDRESS + Write '1' to disable interrupt for event ADDRESS + 1 + 1 + + read + + Disabled + Read: Disabled + 0 + + + Enabled + Read: Enabled + 1 + + + + write + + Clear + Disable + 1 + + + + + PAYLOAD + Write '1' to disable interrupt for event PAYLOAD + 2 + 2 + + read + + Disabled + Read: Disabled + 0 + + + Enabled + Read: Enabled + 1 + + + + write + + Clear + Disable + 1 + + + + + END + Write '1' to disable interrupt for event END + 3 + 3 + + read + + Disabled + Read: Disabled + 0 + + + Enabled + Read: Enabled + 1 + + + + write + + Clear + Disable + 1 + + + + + DISABLED + Write '1' to disable interrupt for event DISABLED + 4 + 4 + + read + + Disabled + Read: Disabled + 0 + + + Enabled + Read: Enabled + 1 + + + + write + + Clear + Disable + 1 + + + + + DEVMATCH + Write '1' to disable interrupt for event DEVMATCH + 5 + 5 + + read + + Disabled + Read: Disabled + 0 + + + Enabled + Read: Enabled + 1 + + + + write + + Clear + Disable + 1 + + + + + DEVMISS + Write '1' to disable interrupt for event DEVMISS + 6 + 6 + + read + + Disabled + Read: Disabled + 0 + + + Enabled + Read: Enabled + 1 + + + + write + + Clear + Disable + 1 + + + + + RSSIEND + Write '1' to disable interrupt for event RSSIEND + 7 + 7 + + read + + Disabled + Read: Disabled + 0 + + + Enabled + Read: Enabled + 1 + + + + write + + Clear + Disable + 1 + + + + + BCMATCH + Write '1' to disable interrupt for event BCMATCH + 10 + 10 + + read + + Disabled + Read: Disabled + 0 + + + Enabled + Read: Enabled + 1 + + + + write + + Clear + Disable + 1 + + + + + CRCOK + Write '1' to disable interrupt for event CRCOK + 12 + 12 + + read + + Disabled + Read: Disabled + 0 + + + Enabled + Read: Enabled + 1 + + + + write + + Clear + Disable + 1 + + + + + CRCERROR + Write '1' to disable interrupt for event CRCERROR + 13 + 13 + + read + + Disabled + Read: Disabled + 0 + + + Enabled + Read: Enabled + 1 + + + + write + + Clear + Disable + 1 + + + + + + + CRCSTATUS + CRC status + 0x400 + read-only + + + CRCSTATUS + CRC status of packet received + 0 + 0 + + + CRCError + Packet received with CRC error + 0 + + + CRCOk + Packet received with CRC ok + 1 + + + + + + + RXMATCH + Received address + 0x408 + read-only + + + RXMATCH + Received address + 0 + 2 + + + + + RXCRC + CRC field of previously received packet + 0x40C + read-only + + + RXCRC + CRC field of previously received packet + 0 + 23 + + + + + DAI + Device address match index + 0x410 + read-only + + + DAI + Device address match index + 0 + 2 + + + + + PACKETPTR + Packet pointer + 0x504 + read-write + + + PACKETPTR + Packet pointer + 0 + 31 + + + + + FREQUENCY + Frequency + 0x508 + read-write + 0x00000002 + + + FREQUENCY + Radio channel frequency + 0 + 6 + + + MAP + Channel map selection. + 8 + 8 + + + Default + Channel map between 2400 MHZ .. 2500 MHz + 0 + + + Low + Channel map between 2360 MHZ .. 2460 MHz + 1 + + + + + + + TXPOWER + Output power + 0x50C + read-write + + + TXPOWER + RADIO output power. + 0 + 7 + + + Pos4dBm + +4 dBm + 0x04 + + + Pos3dBm + +3 dBm + 0x03 + + + 0dBm + 0 dBm + 0x00 + + + Neg4dBm + -4 dBm + 0xFC + + + Neg8dBm + -8 dBm + 0xF8 + + + Neg12dBm + -12 dBm + 0xF4 + + + Neg16dBm + -16 dBm + 0xF0 + + + Neg20dBm + -20 dBm + 0xEC + + + Neg30dBm + Deprecated enumerator - -40 dBm + 0xFF + + + Neg40dBm + -40 dBm + 0xD8 + + + + + + + MODE + Data rate and modulation + 0x510 + read-write + + + MODE + Radio data rate and modulation setting. The radio supports Frequency-shift Keying (FSK) modulation. + 0 + 3 + + + Nrf_1Mbit + 1 Mbit/s Nordic proprietary radio mode + 0 + + + Nrf_2Mbit + 2 Mbit/s Nordic proprietary radio mode + 1 + + + Nrf_250Kbit + Deprecated enumerator - 250 kbit/s Nordic proprietary radio mode + 2 + + + Ble_1Mbit + 1 Mbit/s Bluetooth Low Energy + 3 + + + Ble_2Mbit + 2 Mbit/s Bluetooth Low Energy + 4 + + + + + + + PCNF0 + Packet configuration register 0 + 0x514 + read-write + + + LFLEN + Length on air of LENGTH field in number of bits. + 0 + 3 + + + S0LEN + Length on air of S0 field in number of bytes. + 8 + 8 + + + S1LEN + Length on air of S1 field in number of bits. + 16 + 19 + + + S1INCL + Include or exclude S1 field in RAM + 20 + 20 + + + Automatic + Include S1 field in RAM only if S1LEN &gt; 0 + 0 + + + Include + Always include S1 field in RAM independent of S1LEN + 1 + + + + + PLEN + Length of preamble on air. Decision point: TASKS_START task + 24 + 24 + + + 8bit + 8-bit preamble + 0 + + + 16bit + 16-bit preamble + 1 + + + + + + + PCNF1 + Packet configuration register 1 + 0x518 + read-write + + + MAXLEN + Maximum length of packet payload. If the packet payload is larger than MAXLEN, the radio will truncate the payload to MAXLEN. + 0 + 7 + + + STATLEN + Static length in number of bytes + 8 + 15 + + + BALEN + Base address length in number of bytes + 16 + 18 + + + ENDIAN + On air endianness of packet, this applies to the S0, LENGTH, S1 and the PAYLOAD fields. + 24 + 24 + + + Little + Least Significant bit on air first + 0 + + + Big + Most significant bit on air first + 1 + + + + + WHITEEN + Enable or disable packet whitening + 25 + 25 + + + Disabled + Disable + 0 + + + Enabled + Enable + 1 + + + + + + + BASE0 + Base address 0 + 0x51C + read-write + + + BASE0 + Base address 0 + 0 + 31 + + + + + BASE1 + Base address 1 + 0x520 + read-write + + + BASE1 + Base address 1 + 0 + 31 + + + + + PREFIX0 + Prefixes bytes for logical addresses 0-3 + 0x524 + read-write + + + AP0 + Address prefix 0. + 0 + 7 + + + AP1 + Address prefix 1. + 8 + 15 + + + AP2 + Address prefix 2. + 16 + 23 + + + AP3 + Address prefix 3. + 24 + 31 + + + + + PREFIX1 + Prefixes bytes for logical addresses 4-7 + 0x528 + read-write + + + AP4 + Address prefix 4. + 0 + 7 + + + AP5 + Address prefix 5. + 8 + 15 + + + AP6 + Address prefix 6. + 16 + 23 + + + AP7 + Address prefix 7. + 24 + 31 + + + + + TXADDRESS + Transmit address select + 0x52C + read-write + + + TXADDRESS + Transmit address select + 0 + 2 + + + + + RXADDRESSES + Receive address select + 0x530 + read-write + + + ADDR0 + Enable or disable reception on logical address 0. + 0 + 0 + + + Disabled + Disable + 0 + + + Enabled + Enable + 1 + + + + + ADDR1 + Enable or disable reception on logical address 1. + 1 + 1 + + + Disabled + Disable + 0 + + + Enabled + Enable + 1 + + + + + ADDR2 + Enable or disable reception on logical address 2. + 2 + 2 + + + Disabled + Disable + 0 + + + Enabled + Enable + 1 + + + + + ADDR3 + Enable or disable reception on logical address 3. + 3 + 3 + + + Disabled + Disable + 0 + + + Enabled + Enable + 1 + + + + + ADDR4 + Enable or disable reception on logical address 4. + 4 + 4 + + + Disabled + Disable + 0 + + + Enabled + Enable + 1 + + + + + ADDR5 + Enable or disable reception on logical address 5. + 5 + 5 + + + Disabled + Disable + 0 + + + Enabled + Enable + 1 + + + + + ADDR6 + Enable or disable reception on logical address 6. + 6 + 6 + + + Disabled + Disable + 0 + + + Enabled + Enable + 1 + + + + + ADDR7 + Enable or disable reception on logical address 7. + 7 + 7 + + + Disabled + Disable + 0 + + + Enabled + Enable + 1 + + + + + + + CRCCNF + CRC configuration + 0x534 + read-write + + + LEN + CRC length in number of bytes. + 0 + 1 + + + Disabled + CRC length is zero and CRC calculation is disabled + 0 + + + One + CRC length is one byte and CRC calculation is enabled + 1 + + + Two + CRC length is two bytes and CRC calculation is enabled + 2 + + + Three + CRC length is three bytes and CRC calculation is enabled + 3 + + + + + SKIPADDR + Include or exclude packet address field out of CRC calculation. + 8 + 8 + + + Include + CRC calculation includes address field + 0 + + + Skip + CRC calculation does not include address field. The CRC calculation will start at the first byte after the address. + 1 + + + + + + + CRCPOLY + CRC polynomial + 0x538 + read-write + 0x00000000 + + + CRCPOLY + CRC polynomial + 0 + 23 + + + + + CRCINIT + CRC initial value + 0x53C + read-write + + + CRCINIT + CRC initial value + 0 + 23 + + + + + TIFS + Inter Frame Spacing in us + 0x544 + read-write + + + TIFS + Inter Frame Spacing in us + 0 + 7 + + + + + RSSISAMPLE + RSSI sample + 0x548 + read-only + + + RSSISAMPLE + RSSI sample + 0 + 6 + + + + + STATE + Current radio state + 0x550 + read-only + + + STATE + Current radio state + 0 + 3 + + + Disabled + RADIO is in the Disabled state + 0 + + + RxRu + RADIO is in the RXRU state + 1 + + + RxIdle + RADIO is in the RXIDLE state + 2 + + + Rx + RADIO is in the RX state + 3 + + + RxDisable + RADIO is in the RXDISABLED state + 4 + + + TxRu + RADIO is in the TXRU state + 9 + + + TxIdle + RADIO is in the TXIDLE state + 10 + + + Tx + RADIO is in the TX state + 11 + + + TxDisable + RADIO is in the TXDISABLED state + 12 + + + + + + + DATAWHITEIV + Data whitening initial value + 0x554 + read-write + 0x00000040 + + + DATAWHITEIV + Data whitening initial value. Bit 6 is hard-wired to '1', writing '0' to it has no effect, and it will always be read back and used by the device as '1'. + 0 + 6 + + + + + BCC + Bit counter compare + 0x560 + read-write + + + BCC + Bit counter compare + 0 + 31 + + + + + 0x8 + 0x4 + DAB[%s] + Description collection: Device address base segment n + 0x600 + read-write + + + DAB + Device address base segment n + 0 + 31 + + + + + 0x8 + 0x4 + DAP[%s] + Description collection: Device address prefix n + 0x620 + read-write + + + DAP + Device address prefix n + 0 + 15 + + + + + DACNF + Device address match configuration + 0x640 + read-write + + + ENA0 + Enable or disable device address matching using device address 0 + 0 + 0 + + + Disabled + Disabled + 0 + + + Enabled + Enabled + 1 + + + + + ENA1 + Enable or disable device address matching using device address 1 + 1 + 1 + + + Disabled + Disabled + 0 + + + Enabled + Enabled + 1 + + + + + ENA2 + Enable or disable device address matching using device address 2 + 2 + 2 + + + Disabled + Disabled + 0 + + + Enabled + Enabled + 1 + + + + + ENA3 + Enable or disable device address matching using device address 3 + 3 + 3 + + + Disabled + Disabled + 0 + + + Enabled + Enabled + 1 + + + + + ENA4 + Enable or disable device address matching using device address 4 + 4 + 4 + + + Disabled + Disabled + 0 + + + Enabled + Enabled + 1 + + + + + ENA5 + Enable or disable device address matching using device address 5 + 5 + 5 + + + Disabled + Disabled + 0 + + + Enabled + Enabled + 1 + + + + + ENA6 + Enable or disable device address matching using device address 6 + 6 + 6 + + + Disabled + Disabled + 0 + + + Enabled + Enabled + 1 + + + + + ENA7 + Enable or disable device address matching using device address 7 + 7 + 7 + + + Disabled + Disabled + 0 + + + Enabled + Enabled + 1 + + + + + TXADD0 + TxAdd for device address 0 + 8 + 8 + + + TXADD1 + TxAdd for device address 1 + 9 + 9 + + + TXADD2 + TxAdd for device address 2 + 10 + 10 + + + TXADD3 + TxAdd for device address 3 + 11 + 11 + + + TXADD4 + TxAdd for device address 4 + 12 + 12 + + + TXADD5 + TxAdd for device address 5 + 13 + 13 + + + TXADD6 + TxAdd for device address 6 + 14 + 14 + + + TXADD7 + TxAdd for device address 7 + 15 + 15 + + + + + MODECNF0 + Radio mode configuration register 0 + 0x650 + read-write + 0x00000200 + + + RU + Radio ramp-up time + 0 + 0 + + + Default + Default ramp-up time (tRXEN), compatible with firmware written for nRF51 + 0 + + + Fast + Fast ramp-up (tRXEN,FAST), see electrical specification for more information + 1 + + + + + DTX + Default TX value + 8 + 9 + + + B1 + Transmit '1' + 0 + + + B0 + Transmit '0' + 1 + + + Center + Transmit center frequency + 2 + + + + + + + POWER + Peripheral power control + 0xFFC + read-write + 0x00000001 + + + POWER + Peripheral power control. The peripheral and its registers will be reset to its initial state by switching the peripheral off and then back on again. + 0 + 0 + + + Disabled + Peripheral is powered off + 0 + + + Enabled + Peripheral is powered on + 1 + + + + + + + + + UART0 + Universal Asynchronous Receiver/Transmitter + 0x40002000 + UART + + 0 + 0x1000 + registers + + + UARTE0_UART0 + 2 + + UART + 0x20 + + + TASKS_STARTRX + Start UART receiver + 0x000 + write-only + + + TASKS_STARTRX + Start UART receiver + 0 + 0 + + + Trigger + Trigger task + 1 + + + + + + + TASKS_STOPRX + Stop UART receiver + 0x004 + write-only + + + TASKS_STOPRX + Stop UART receiver + 0 + 0 + + + Trigger + Trigger task + 1 + + + + + + + TASKS_STARTTX + Start UART transmitter + 0x008 + write-only + + + TASKS_STARTTX + Start UART transmitter + 0 + 0 + + + Trigger + Trigger task + 1 + + + + + + + TASKS_STOPTX + Stop UART transmitter + 0x00C + write-only + + + TASKS_STOPTX + Stop UART transmitter + 0 + 0 + + + Trigger + Trigger task + 1 + + + + + + + TASKS_SUSPEND + Suspend UART + 0x01C + write-only + + + TASKS_SUSPEND + Suspend UART + 0 + 0 + + + Trigger + Trigger task + 1 + + + + + + + EVENTS_CTS + CTS is activated (set low). Clear To Send. + 0x100 + read-write + + + EVENTS_CTS + CTS is activated (set low). Clear To Send. + 0 + 0 + + + NotGenerated + Event not generated + 0 + + + Generated + Event generated + 1 + + + + + + + EVENTS_NCTS + CTS is deactivated (set high). Not Clear To Send. + 0x104 + read-write + + + EVENTS_NCTS + CTS is deactivated (set high). Not Clear To Send. + 0 + 0 + + + NotGenerated + Event not generated + 0 + + + Generated + Event generated + 1 + + + + + + + EVENTS_RXDRDY + Data received in RXD + 0x108 + read-write + + + EVENTS_RXDRDY + Data received in RXD + 0 + 0 + + + NotGenerated + Event not generated + 0 + + + Generated + Event generated + 1 + + + + + + + EVENTS_TXDRDY + Data sent from TXD + 0x11C + read-write + + + EVENTS_TXDRDY + Data sent from TXD + 0 + 0 + + + NotGenerated + Event not generated + 0 + + + Generated + Event generated + 1 + + + + + + + EVENTS_ERROR + Error detected + 0x124 + read-write + + + EVENTS_ERROR + Error detected + 0 + 0 + + + NotGenerated + Event not generated + 0 + + + Generated + Event generated + 1 + + + + + + + EVENTS_RXTO + Receiver timeout + 0x144 + read-write + + + EVENTS_RXTO + Receiver timeout + 0 + 0 + + + NotGenerated + Event not generated + 0 + + + Generated + Event generated + 1 + + + + + + + SHORTS + Shortcuts between local events and tasks + 0x200 + read-write + + + CTS_STARTRX + Shortcut between event CTS and task STARTRX + 3 + 3 + + + Disabled + Disable shortcut + 0 + + + Enabled + Enable shortcut + 1 + + + + + NCTS_STOPRX + Shortcut between event NCTS and task STOPRX + 4 + 4 + + + Disabled + Disable shortcut + 0 + + + Enabled + Enable shortcut + 1 + + + + + + + INTENSET + Enable interrupt + 0x304 + read-write + + + CTS + Write '1' to enable interrupt for event CTS + 0 + 0 + + read + + Disabled + Read: Disabled + 0 + + + Enabled + Read: Enabled + 1 + + + + write + + Set + Enable + 1 + + + + + NCTS + Write '1' to enable interrupt for event NCTS + 1 + 1 + + read + + Disabled + Read: Disabled + 0 + + + Enabled + Read: Enabled + 1 + + + + write + + Set + Enable + 1 + + + + + RXDRDY + Write '1' to enable interrupt for event RXDRDY + 2 + 2 + + read + + Disabled + Read: Disabled + 0 + + + Enabled + Read: Enabled + 1 + + + + write + + Set + Enable + 1 + + + + + TXDRDY + Write '1' to enable interrupt for event TXDRDY + 7 + 7 + + read + + Disabled + Read: Disabled + 0 + + + Enabled + Read: Enabled + 1 + + + + write + + Set + Enable + 1 + + + + + ERROR + Write '1' to enable interrupt for event ERROR + 9 + 9 + + read + + Disabled + Read: Disabled + 0 + + + Enabled + Read: Enabled + 1 + + + + write + + Set + Enable + 1 + + + + + RXTO + Write '1' to enable interrupt for event RXTO + 17 + 17 + + read + + Disabled + Read: Disabled + 0 + + + Enabled + Read: Enabled + 1 + + + + write + + Set + Enable + 1 + + + + + + + INTENCLR + Disable interrupt + 0x308 + read-write + + + CTS + Write '1' to disable interrupt for event CTS + 0 + 0 + + read + + Disabled + Read: Disabled + 0 + + + Enabled + Read: Enabled + 1 + + + + write + + Clear + Disable + 1 + + + + + NCTS + Write '1' to disable interrupt for event NCTS + 1 + 1 + + read + + Disabled + Read: Disabled + 0 + + + Enabled + Read: Enabled + 1 + + + + write + + Clear + Disable + 1 + + + + + RXDRDY + Write '1' to disable interrupt for event RXDRDY + 2 + 2 + + read + + Disabled + Read: Disabled + 0 + + + Enabled + Read: Enabled + 1 + + + + write + + Clear + Disable + 1 + + + + + TXDRDY + Write '1' to disable interrupt for event TXDRDY + 7 + 7 + + read + + Disabled + Read: Disabled + 0 + + + Enabled + Read: Enabled + 1 + + + + write + + Clear + Disable + 1 + + + + + ERROR + Write '1' to disable interrupt for event ERROR + 9 + 9 + + read + + Disabled + Read: Disabled + 0 + + + Enabled + Read: Enabled + 1 + + + + write + + Clear + Disable + 1 + + + + + RXTO + Write '1' to disable interrupt for event RXTO + 17 + 17 + + read + + Disabled + Read: Disabled + 0 + + + Enabled + Read: Enabled + 1 + + + + write + + Clear + Disable + 1 + + + + + + + ERRORSRC + Error source + 0x480 + read-write + oneToClear + + + OVERRUN + Overrun error + 0 + 0 + + read + + NotPresent + Read: error not present + 0 + + + Present + Read: error present + 1 + + + + + PARITY + Parity error + 1 + 1 + + read + + NotPresent + Read: error not present + 0 + + + Present + Read: error present + 1 + + + + + FRAMING + Framing error occurred + 2 + 2 + + read + + NotPresent + Read: error not present + 0 + + + Present + Read: error present + 1 + + + + + BREAK + Break condition + 3 + 3 + + read + + NotPresent + Read: error not present + 0 + + + Present + Read: error present + 1 + + + + + + + ENABLE + Enable UART + 0x500 + read-write + + + ENABLE + Enable or disable UART + 0 + 3 + + + Disabled + Disable UART + 0 + + + Enabled + Enable UART + 4 + + + + + + + PSELRTS + Pin select for RTS + 0x508 + read-write + 0xFFFFFFFF + + + PSELRTS + Pin number configuration for UART RTS signal + 0 + 31 + + + Disconnected + Disconnect + 0xFFFFFFFF + + + + + + + PSELTXD + Pin select for TXD + 0x50C + read-write + 0xFFFFFFFF + + + PSELTXD + Pin number configuration for UART TXD signal + 0 + 31 + + + Disconnected + Disconnect + 0xFFFFFFFF + + + + + + + PSELCTS + Pin select for CTS + 0x510 + read-write + 0xFFFFFFFF + + + PSELCTS + Pin number configuration for UART CTS signal + 0 + 31 + + + Disconnected + Disconnect + 0xFFFFFFFF + + + + + + + PSELRXD + Pin select for RXD + 0x514 + read-write + 0xFFFFFFFF + + + PSELRXD + Pin number configuration for UART RXD signal + 0 + 31 + + + Disconnected + Disconnect + 0xFFFFFFFF + + + + + + + RXD + RXD register + 0x518 + read-only + + + RXD + RX data received in previous transfers, double buffered + 0 + 7 + + + + + TXD + TXD register + 0x51C + write-only + + + TXD + TX data to be transferred + 0 + 7 + + + + + BAUDRATE + Baud rate + 0x524 + read-write + 0x04000000 + + + BAUDRATE + Baud rate + 0 + 31 + + + Baud1200 + 1200 baud (actual rate: 1205) + 0x0004F000 + + + Baud2400 + 2400 baud (actual rate: 2396) + 0x0009D000 + + + Baud4800 + 4800 baud (actual rate: 4808) + 0x0013B000 + + + Baud9600 + 9600 baud (actual rate: 9598) + 0x00275000 + + + Baud14400 + 14400 baud (actual rate: 14414) + 0x003B0000 + + + Baud19200 + 19200 baud (actual rate: 19208) + 0x004EA000 + + + Baud28800 + 28800 baud (actual rate: 28829) + 0x0075F000 + + + Baud31250 + 31250 baud + 0x00800000 + + + Baud38400 + 38400 baud (actual rate: 38462) + 0x009D5000 + + + Baud56000 + 56000 baud (actual rate: 55944) + 0x00E50000 + + + Baud57600 + 57600 baud (actual rate: 57762) + 0x00EBF000 + + + Baud76800 + 76800 baud (actual rate: 76923) + 0x013A9000 + + + Baud115200 + 115200 baud (actual rate: 115942) + 0x01D7E000 + + + Baud230400 + 230400 baud (actual rate: 231884) + 0x03AFB000 + + + Baud250000 + 250000 baud + 0x04000000 + + + Baud460800 + 460800 baud (actual rate: 470588) + 0x075F7000 + + + Baud921600 + 921600 baud (actual rate: 941176) + 0x0EBED000 + + + Baud1M + 1Mega baud + 0x10000000 + + + + + + + CONFIG + Configuration of parity and hardware flow control + 0x56C + read-write + + + HWFC + Hardware flow control + 0 + 0 + + + Disabled + Disabled + 0 + + + Enabled + Enabled + 1 + + + + + PARITY + Parity + 1 + 3 + + + Excluded + Exclude parity bit + 0x0 + + + Included + Include parity bit + 0x7 + + + + + + + + + UARTE0 + UART with EasyDMA + 0x40002000 + UART0 + UARTE + + 0 + 0x1000 + registers + + + UARTE0_UART0 + 2 + + UARTE + 0x20 + + + TASKS_STARTRX + Start UART receiver + 0x000 + write-only + + + TASKS_STARTRX + Start UART receiver + 0 + 0 + + + Trigger + Trigger task + 1 + + + + + + + TASKS_STOPRX + Stop UART receiver + 0x004 + write-only + + + TASKS_STOPRX + Stop UART receiver + 0 + 0 + + + Trigger + Trigger task + 1 + + + + + + + TASKS_STARTTX + Start UART transmitter + 0x008 + write-only + + + TASKS_STARTTX + Start UART transmitter + 0 + 0 + + + Trigger + Trigger task + 1 + + + + + + + TASKS_STOPTX + Stop UART transmitter + 0x00C + write-only + + + TASKS_STOPTX + Stop UART transmitter + 0 + 0 + + + Trigger + Trigger task + 1 + + + + + + + TASKS_FLUSHRX + Flush RX FIFO into RX buffer + 0x02C + write-only + + + TASKS_FLUSHRX + Flush RX FIFO into RX buffer + 0 + 0 + + + Trigger + Trigger task + 1 + + + + + + + EVENTS_CTS + CTS is activated (set low). Clear To Send. + 0x100 + read-write + + + EVENTS_CTS + CTS is activated (set low). Clear To Send. + 0 + 0 + + + NotGenerated + Event not generated + 0 + + + Generated + Event generated + 1 + + + + + + + EVENTS_NCTS + CTS is deactivated (set high). Not Clear To Send. + 0x104 + read-write + + + EVENTS_NCTS + CTS is deactivated (set high). Not Clear To Send. + 0 + 0 + + + NotGenerated + Event not generated + 0 + + + Generated + Event generated + 1 + + + + + + + EVENTS_RXDRDY + Data received in RXD (but potentially not yet transferred to Data RAM) + 0x108 + read-write + + + EVENTS_RXDRDY + Data received in RXD (but potentially not yet transferred to Data RAM) + 0 + 0 + + + NotGenerated + Event not generated + 0 + + + Generated + Event generated + 1 + + + + + + + EVENTS_ENDRX + Receive buffer is filled up + 0x110 + read-write + + + EVENTS_ENDRX + Receive buffer is filled up + 0 + 0 + + + NotGenerated + Event not generated + 0 + + + Generated + Event generated + 1 + + + + + + + EVENTS_TXDRDY + Data sent from TXD + 0x11C + read-write + + + EVENTS_TXDRDY + Data sent from TXD + 0 + 0 + + + NotGenerated + Event not generated + 0 + + + Generated + Event generated + 1 + + + + + + + EVENTS_ENDTX + Last TX byte transmitted + 0x120 + read-write + + + EVENTS_ENDTX + Last TX byte transmitted + 0 + 0 + + + NotGenerated + Event not generated + 0 + + + Generated + Event generated + 1 + + + + + + + EVENTS_ERROR + Error detected + 0x124 + read-write + + + EVENTS_ERROR + Error detected + 0 + 0 + + + NotGenerated + Event not generated + 0 + + + Generated + Event generated + 1 + + + + + + + EVENTS_RXTO + Receiver timeout + 0x144 + read-write + + + EVENTS_RXTO + Receiver timeout + 0 + 0 + + + NotGenerated + Event not generated + 0 + + + Generated + Event generated + 1 + + + + + + + EVENTS_RXSTARTED + UART receiver has started + 0x14C + read-write + + + EVENTS_RXSTARTED + UART receiver has started + 0 + 0 + + + NotGenerated + Event not generated + 0 + + + Generated + Event generated + 1 + + + + + + + EVENTS_TXSTARTED + UART transmitter has started + 0x150 + read-write + + + EVENTS_TXSTARTED + UART transmitter has started + 0 + 0 + + + NotGenerated + Event not generated + 0 + + + Generated + Event generated + 1 + + + + + + + EVENTS_TXSTOPPED + Transmitter stopped + 0x158 + read-write + + + EVENTS_TXSTOPPED + Transmitter stopped + 0 + 0 + + + NotGenerated + Event not generated + 0 + + + Generated + Event generated + 1 + + + + + + + SHORTS + Shortcuts between local events and tasks + 0x200 + read-write + + + ENDRX_STARTRX + Shortcut between event ENDRX and task STARTRX + 5 + 5 + + + Disabled + Disable shortcut + 0 + + + Enabled + Enable shortcut + 1 + + + + + ENDRX_STOPRX + Shortcut between event ENDRX and task STOPRX + 6 + 6 + + + Disabled + Disable shortcut + 0 + + + Enabled + Enable shortcut + 1 + + + + + + + INTEN + Enable or disable interrupt + 0x300 + read-write + + + CTS + Enable or disable interrupt for event CTS + 0 + 0 + + + Disabled + Disable + 0 + + + Enabled + Enable + 1 + + + + + NCTS + Enable or disable interrupt for event NCTS + 1 + 1 + + + Disabled + Disable + 0 + + + Enabled + Enable + 1 + + + + + RXDRDY + Enable or disable interrupt for event RXDRDY + 2 + 2 + + + Disabled + Disable + 0 + + + Enabled + Enable + 1 + + + + + ENDRX + Enable or disable interrupt for event ENDRX + 4 + 4 + + + Disabled + Disable + 0 + + + Enabled + Enable + 1 + + + + + TXDRDY + Enable or disable interrupt for event TXDRDY + 7 + 7 + + + Disabled + Disable + 0 + + + Enabled + Enable + 1 + + + + + ENDTX + Enable or disable interrupt for event ENDTX + 8 + 8 + + + Disabled + Disable + 0 + + + Enabled + Enable + 1 + + + + + ERROR + Enable or disable interrupt for event ERROR + 9 + 9 + + + Disabled + Disable + 0 + + + Enabled + Enable + 1 + + + + + RXTO + Enable or disable interrupt for event RXTO + 17 + 17 + + + Disabled + Disable + 0 + + + Enabled + Enable + 1 + + + + + RXSTARTED + Enable or disable interrupt for event RXSTARTED + 19 + 19 + + + Disabled + Disable + 0 + + + Enabled + Enable + 1 + + + + + TXSTARTED + Enable or disable interrupt for event TXSTARTED + 20 + 20 + + + Disabled + Disable + 0 + + + Enabled + Enable + 1 + + + + + TXSTOPPED + Enable or disable interrupt for event TXSTOPPED + 22 + 22 + + + Disabled + Disable + 0 + + + Enabled + Enable + 1 + + + + + + + INTENSET + Enable interrupt + 0x304 + read-write + + + CTS + Write '1' to enable interrupt for event CTS + 0 + 0 + + read + + Disabled + Read: Disabled + 0 + + + Enabled + Read: Enabled + 1 + + + + write + + Set + Enable + 1 + + + + + NCTS + Write '1' to enable interrupt for event NCTS + 1 + 1 + + read + + Disabled + Read: Disabled + 0 + + + Enabled + Read: Enabled + 1 + + + + write + + Set + Enable + 1 + + + + + RXDRDY + Write '1' to enable interrupt for event RXDRDY + 2 + 2 + + read + + Disabled + Read: Disabled + 0 + + + Enabled + Read: Enabled + 1 + + + + write + + Set + Enable + 1 + + + + + ENDRX + Write '1' to enable interrupt for event ENDRX + 4 + 4 + + read + + Disabled + Read: Disabled + 0 + + + Enabled + Read: Enabled + 1 + + + + write + + Set + Enable + 1 + + + + + TXDRDY + Write '1' to enable interrupt for event TXDRDY + 7 + 7 + + read + + Disabled + Read: Disabled + 0 + + + Enabled + Read: Enabled + 1 + + + + write + + Set + Enable + 1 + + + + + ENDTX + Write '1' to enable interrupt for event ENDTX + 8 + 8 + + read + + Disabled + Read: Disabled + 0 + + + Enabled + Read: Enabled + 1 + + + + write + + Set + Enable + 1 + + + + + ERROR + Write '1' to enable interrupt for event ERROR + 9 + 9 + + read + + Disabled + Read: Disabled + 0 + + + Enabled + Read: Enabled + 1 + + + + write + + Set + Enable + 1 + + + + + RXTO + Write '1' to enable interrupt for event RXTO + 17 + 17 + + read + + Disabled + Read: Disabled + 0 + + + Enabled + Read: Enabled + 1 + + + + write + + Set + Enable + 1 + + + + + RXSTARTED + Write '1' to enable interrupt for event RXSTARTED + 19 + 19 + + read + + Disabled + Read: Disabled + 0 + + + Enabled + Read: Enabled + 1 + + + + write + + Set + Enable + 1 + + + + + TXSTARTED + Write '1' to enable interrupt for event TXSTARTED + 20 + 20 + + read + + Disabled + Read: Disabled + 0 + + + Enabled + Read: Enabled + 1 + + + + write + + Set + Enable + 1 + + + + + TXSTOPPED + Write '1' to enable interrupt for event TXSTOPPED + 22 + 22 + + read + + Disabled + Read: Disabled + 0 + + + Enabled + Read: Enabled + 1 + + + + write + + Set + Enable + 1 + + + + + + + INTENCLR + Disable interrupt + 0x308 + read-write + + + CTS + Write '1' to disable interrupt for event CTS + 0 + 0 + + read + + Disabled + Read: Disabled + 0 + + + Enabled + Read: Enabled + 1 + + + + write + + Clear + Disable + 1 + + + + + NCTS + Write '1' to disable interrupt for event NCTS + 1 + 1 + + read + + Disabled + Read: Disabled + 0 + + + Enabled + Read: Enabled + 1 + + + + write + + Clear + Disable + 1 + + + + + RXDRDY + Write '1' to disable interrupt for event RXDRDY + 2 + 2 + + read + + Disabled + Read: Disabled + 0 + + + Enabled + Read: Enabled + 1 + + + + write + + Clear + Disable + 1 + + + + + ENDRX + Write '1' to disable interrupt for event ENDRX + 4 + 4 + + read + + Disabled + Read: Disabled + 0 + + + Enabled + Read: Enabled + 1 + + + + write + + Clear + Disable + 1 + + + + + TXDRDY + Write '1' to disable interrupt for event TXDRDY + 7 + 7 + + read + + Disabled + Read: Disabled + 0 + + + Enabled + Read: Enabled + 1 + + + + write + + Clear + Disable + 1 + + + + + ENDTX + Write '1' to disable interrupt for event ENDTX + 8 + 8 + + read + + Disabled + Read: Disabled + 0 + + + Enabled + Read: Enabled + 1 + + + + write + + Clear + Disable + 1 + + + + + ERROR + Write '1' to disable interrupt for event ERROR + 9 + 9 + + read + + Disabled + Read: Disabled + 0 + + + Enabled + Read: Enabled + 1 + + + + write + + Clear + Disable + 1 + + + + + RXTO + Write '1' to disable interrupt for event RXTO + 17 + 17 + + read + + Disabled + Read: Disabled + 0 + + + Enabled + Read: Enabled + 1 + + + + write + + Clear + Disable + 1 + + + + + RXSTARTED + Write '1' to disable interrupt for event RXSTARTED + 19 + 19 + + read + + Disabled + Read: Disabled + 0 + + + Enabled + Read: Enabled + 1 + + + + write + + Clear + Disable + 1 + + + + + TXSTARTED + Write '1' to disable interrupt for event TXSTARTED + 20 + 20 + + read + + Disabled + Read: Disabled + 0 + + + Enabled + Read: Enabled + 1 + + + + write + + Clear + Disable + 1 + + + + + TXSTOPPED + Write '1' to disable interrupt for event TXSTOPPED + 22 + 22 + + read + + Disabled + Read: Disabled + 0 + + + Enabled + Read: Enabled + 1 + + + + write + + Clear + Disable + 1 + + + + + + + ERRORSRC + Error source + 0x480 + read-write + oneToClear + + + OVERRUN + Overrun error + 0 + 0 + + read + + NotPresent + Read: error not present + 0 + + + Present + Read: error present + 1 + + + + + PARITY + Parity error + 1 + 1 + + read + + NotPresent + Read: error not present + 0 + + + Present + Read: error present + 1 + + + + + FRAMING + Framing error occurred + 2 + 2 + + read + + NotPresent + Read: error not present + 0 + + + Present + Read: error present + 1 + + + + + BREAK + Break condition + 3 + 3 + + read + + NotPresent + Read: error not present + 0 + + + Present + Read: error present + 1 + + + + + + + ENABLE + Enable UART + 0x500 + read-write + + + ENABLE + Enable or disable UARTE + 0 + 3 + + + Disabled + Disable UARTE + 0 + + + Enabled + Enable UARTE + 8 + + + + + + + PSEL + Unspecified + UARTE_PSEL + read-write + 0x508 + + RTS + Pin select for RTS signal + 0x000 + read-write + 0xFFFFFFFF + + + PIN + Pin number + 0 + 4 + + + CONNECT + Connection + 31 + 31 + + + Disconnected + Disconnect + 1 + + + Connected + Connect + 0 + + + + + + + TXD + Pin select for TXD signal + 0x004 + read-write + 0xFFFFFFFF + + + PIN + Pin number + 0 + 4 + + + CONNECT + Connection + 31 + 31 + + + Disconnected + Disconnect + 1 + + + Connected + Connect + 0 + + + + + + + CTS + Pin select for CTS signal + 0x008 + read-write + 0xFFFFFFFF + + + PIN + Pin number + 0 + 4 + + + CONNECT + Connection + 31 + 31 + + + Disconnected + Disconnect + 1 + + + Connected + Connect + 0 + + + + + + + RXD + Pin select for RXD signal + 0x00C + read-write + 0xFFFFFFFF + + + PIN + Pin number + 0 + 4 + + + CONNECT + Connection + 31 + 31 + + + Disconnected + Disconnect + 1 + + + Connected + Connect + 0 + + + + + + + + BAUDRATE + Baud rate. Accuracy depends on the HFCLK source selected. + 0x524 + read-write + 0x04000000 + + + BAUDRATE + Baud rate + 0 + 31 + + + Baud1200 + 1200 baud (actual rate: 1205) + 0x0004F000 + + + Baud2400 + 2400 baud (actual rate: 2396) + 0x0009D000 + + + Baud4800 + 4800 baud (actual rate: 4808) + 0x0013B000 + + + Baud9600 + 9600 baud (actual rate: 9598) + 0x00275000 + + + Baud14400 + 14400 baud (actual rate: 14401) + 0x003AF000 + + + Baud19200 + 19200 baud (actual rate: 19208) + 0x004EA000 + + + Baud28800 + 28800 baud (actual rate: 28777) + 0x0075C000 + + + Baud31250 + 31250 baud + 0x00800000 + + + Baud38400 + 38400 baud (actual rate: 38369) + 0x009D0000 + + + Baud56000 + 56000 baud (actual rate: 55944) + 0x00E50000 + + + Baud57600 + 57600 baud (actual rate: 57554) + 0x00EB0000 + + + Baud76800 + 76800 baud (actual rate: 76923) + 0x013A9000 + + + Baud115200 + 115200 baud (actual rate: 115108) + 0x01D60000 + + + Baud230400 + 230400 baud (actual rate: 231884) + 0x03B00000 + + + Baud250000 + 250000 baud + 0x04000000 + + + Baud460800 + 460800 baud (actual rate: 457143) + 0x07400000 + + + Baud921600 + 921600 baud (actual rate: 941176) + 0x0F000000 + + + Baud1M + 1Mega baud + 0x10000000 + + + + + + + RXD + RXD EasyDMA channel + UARTE_RXD + read-write + 0x534 + + PTR + Data pointer + 0x000 + read-write + + + PTR + Data pointer + 0 + 31 + + + + + MAXCNT + Maximum number of bytes in receive buffer + 0x004 + read-write + + + MAXCNT + Maximum number of bytes in receive buffer + 0 + 7 + + + + + AMOUNT + Number of bytes transferred in the last transaction + 0x008 + read-only + + + AMOUNT + Number of bytes transferred in the last transaction + 0 + 7 + + + + + + TXD + TXD EasyDMA channel + UARTE_TXD + read-write + 0x544 + + PTR + Data pointer + 0x000 + read-write + + + PTR + Data pointer + 0 + 31 + + + + + MAXCNT + Maximum number of bytes in transmit buffer + 0x004 + read-write + + + MAXCNT + Maximum number of bytes in transmit buffer + 0 + 7 + + + + + AMOUNT + Number of bytes transferred in the last transaction + 0x008 + read-only + + + AMOUNT + Number of bytes transferred in the last transaction + 0 + 7 + + + + + + CONFIG + Configuration of parity and hardware flow control + 0x56C + read-write + + + HWFC + Hardware flow control + 0 + 0 + + + Disabled + Disabled + 0 + + + Enabled + Enabled + 1 + + + + + PARITY + Parity + 1 + 3 + + + Excluded + Exclude parity bit + 0x0 + + + Included + Include parity bit + 0x7 + + + + + + + + + SPI0 + Serial Peripheral Interface 0 + 0x40003000 + SPI + + 0 + 0x1000 + registers + + + SPIM0_SPIS0_TWIM0_TWIS0_SPI0_TWI0 + 3 + + SPI + 0x20 + + + EVENTS_READY + TXD byte sent and RXD byte received + 0x108 + read-write + + + EVENTS_READY + TXD byte sent and RXD byte received + 0 + 0 + + + NotGenerated + Event not generated + 0 + + + Generated + Event generated + 1 + + + + + + + INTENSET + Enable interrupt + 0x304 + read-write + + + READY + Write '1' to enable interrupt for event READY + 2 + 2 + + read + + Disabled + Read: Disabled + 0 + + + Enabled + Read: Enabled + 1 + + + + write + + Set + Enable + 1 + + + + + + + INTENCLR + Disable interrupt + 0x308 + read-write + + + READY + Write '1' to disable interrupt for event READY + 2 + 2 + + read + + Disabled + Read: Disabled + 0 + + + Enabled + Read: Enabled + 1 + + + + write + + Clear + Disable + 1 + + + + + + + ENABLE + Enable SPI + 0x500 + read-write + + + ENABLE + Enable or disable SPI + 0 + 3 + + + Disabled + Disable SPI + 0 + + + Enabled + Enable SPI + 1 + + + + + + + PSEL + Unspecified + SPI_PSEL + read-write + 0x508 + + SCK + Pin select for SCK + 0x000 + read-write + 0xFFFFFFFF + + + PSELSCK + Pin number configuration for SPI SCK signal + 0 + 31 + + + Disconnected + Disconnect + 0xFFFFFFFF + + + + + + + MOSI + Pin select for MOSI + 0x004 + read-write + 0xFFFFFFFF + + + PSELMOSI + Pin number configuration for SPI MOSI signal + 0 + 31 + + + Disconnected + Disconnect + 0xFFFFFFFF + + + + + + + MISO + Pin select for MISO + 0x008 + read-write + 0xFFFFFFFF + + + PSELMISO + Pin number configuration for SPI MISO signal + 0 + 31 + + + Disconnected + Disconnect + 0xFFFFFFFF + + + + + + + + RXD + RXD register + 0x518 + read-only + + + RXD + RX data received. Double buffered + 0 + 7 + + + + + TXD + TXD register + 0x51C + read-write + + + TXD + TX data to send. Double buffered + 0 + 7 + + + + + FREQUENCY + SPI frequency + 0x524 + read-write + 0x04000000 + + + FREQUENCY + SPI master data rate + 0 + 31 + + + K125 + 125 kbps + 0x02000000 + + + K250 + 250 kbps + 0x04000000 + + + K500 + 500 kbps + 0x08000000 + + + M1 + 1 Mbps + 0x10000000 + + + M2 + 2 Mbps + 0x20000000 + + + M4 + 4 Mbps + 0x40000000 + + + M8 + 8 Mbps + 0x80000000 + + + + + + + CONFIG + Configuration register + 0x554 + read-write + + + ORDER + Bit order + 0 + 0 + + + MsbFirst + Most significant bit shifted out first + 0 + + + LsbFirst + Least significant bit shifted out first + 1 + + + + + CPHA + Serial clock (SCK) phase + 1 + 1 + + + Leading + Sample on leading edge of clock, shift serial data on trailing edge + 0 + + + Trailing + Sample on trailing edge of clock, shift serial data on leading edge + 1 + + + + + CPOL + Serial clock (SCK) polarity + 2 + 2 + + + ActiveHigh + Active high + 0 + + + ActiveLow + Active low + 1 + + + + + + + + + SPIM0 + Serial Peripheral Interface Master with EasyDMA 0 + 0x40003000 + SPI0 + SPIM + + 0 + 0x1000 + registers + + + SPIM0_SPIS0_TWIM0_TWIS0_SPI0_TWI0 + 3 + + SPIM + 0x20 + + + TASKS_START + Start SPI transaction + 0x010 + write-only + + + TASKS_START + Start SPI transaction + 0 + 0 + + + Trigger + Trigger task + 1 + + + + + + + TASKS_STOP + Stop SPI transaction + 0x014 + write-only + + + TASKS_STOP + Stop SPI transaction + 0 + 0 + + + Trigger + Trigger task + 1 + + + + + + + TASKS_SUSPEND + Suspend SPI transaction + 0x01C + write-only + + + TASKS_SUSPEND + Suspend SPI transaction + 0 + 0 + + + Trigger + Trigger task + 1 + + + + + + + TASKS_RESUME + Resume SPI transaction + 0x020 + write-only + + + TASKS_RESUME + Resume SPI transaction + 0 + 0 + + + Trigger + Trigger task + 1 + + + + + + + EVENTS_STOPPED + SPI transaction has stopped + 0x104 + read-write + + + EVENTS_STOPPED + SPI transaction has stopped + 0 + 0 + + + NotGenerated + Event not generated + 0 + + + Generated + Event generated + 1 + + + + + + + EVENTS_ENDRX + End of RXD buffer reached + 0x110 + read-write + + + EVENTS_ENDRX + End of RXD buffer reached + 0 + 0 + + + NotGenerated + Event not generated + 0 + + + Generated + Event generated + 1 + + + + + + + EVENTS_END + End of RXD buffer and TXD buffer reached + 0x118 + read-write + + + EVENTS_END + End of RXD buffer and TXD buffer reached + 0 + 0 + + + NotGenerated + Event not generated + 0 + + + Generated + Event generated + 1 + + + + + + + EVENTS_ENDTX + End of TXD buffer reached + 0x120 + read-write + + + EVENTS_ENDTX + End of TXD buffer reached + 0 + 0 + + + NotGenerated + Event not generated + 0 + + + Generated + Event generated + 1 + + + + + + + EVENTS_STARTED + Transaction started + 0x14C + read-write + + + EVENTS_STARTED + Transaction started + 0 + 0 + + + NotGenerated + Event not generated + 0 + + + Generated + Event generated + 1 + + + + + + + SHORTS + Shortcuts between local events and tasks + 0x200 + read-write + + + END_START + Shortcut between event END and task START + 17 + 17 + + + Disabled + Disable shortcut + 0 + + + Enabled + Enable shortcut + 1 + + + + + + + INTENSET + Enable interrupt + 0x304 + read-write + + + STOPPED + Write '1' to enable interrupt for event STOPPED + 1 + 1 + + read + + Disabled + Read: Disabled + 0 + + + Enabled + Read: Enabled + 1 + + + + write + + Set + Enable + 1 + + + + + ENDRX + Write '1' to enable interrupt for event ENDRX + 4 + 4 + + read + + Disabled + Read: Disabled + 0 + + + Enabled + Read: Enabled + 1 + + + + write + + Set + Enable + 1 + + + + + END + Write '1' to enable interrupt for event END + 6 + 6 + + read + + Disabled + Read: Disabled + 0 + + + Enabled + Read: Enabled + 1 + + + + write + + Set + Enable + 1 + + + + + ENDTX + Write '1' to enable interrupt for event ENDTX + 8 + 8 + + read + + Disabled + Read: Disabled + 0 + + + Enabled + Read: Enabled + 1 + + + + write + + Set + Enable + 1 + + + + + STARTED + Write '1' to enable interrupt for event STARTED + 19 + 19 + + read + + Disabled + Read: Disabled + 0 + + + Enabled + Read: Enabled + 1 + + + + write + + Set + Enable + 1 + + + + + + + INTENCLR + Disable interrupt + 0x308 + read-write + + + STOPPED + Write '1' to disable interrupt for event STOPPED + 1 + 1 + + read + + Disabled + Read: Disabled + 0 + + + Enabled + Read: Enabled + 1 + + + + write + + Clear + Disable + 1 + + + + + ENDRX + Write '1' to disable interrupt for event ENDRX + 4 + 4 + + read + + Disabled + Read: Disabled + 0 + + + Enabled + Read: Enabled + 1 + + + + write + + Clear + Disable + 1 + + + + + END + Write '1' to disable interrupt for event END + 6 + 6 + + read + + Disabled + Read: Disabled + 0 + + + Enabled + Read: Enabled + 1 + + + + write + + Clear + Disable + 1 + + + + + ENDTX + Write '1' to disable interrupt for event ENDTX + 8 + 8 + + read + + Disabled + Read: Disabled + 0 + + + Enabled + Read: Enabled + 1 + + + + write + + Clear + Disable + 1 + + + + + STARTED + Write '1' to disable interrupt for event STARTED + 19 + 19 + + read + + Disabled + Read: Disabled + 0 + + + Enabled + Read: Enabled + 1 + + + + write + + Clear + Disable + 1 + + + + + + + ENABLE + Enable SPIM + 0x500 + read-write + + + ENABLE + Enable or disable SPIM + 0 + 3 + + + Disabled + Disable SPIM + 0 + + + Enabled + Enable SPIM + 7 + + + + + + + PSEL + Unspecified + SPIM_PSEL + read-write + 0x508 + + SCK + Pin select for SCK + 0x000 + read-write + 0xFFFFFFFF + + + PIN + Pin number + 0 + 4 + + + CONNECT + Connection + 31 + 31 + + + Disconnected + Disconnect + 1 + + + Connected + Connect + 0 + + + + + + + MOSI + Pin select for MOSI signal + 0x004 + read-write + 0xFFFFFFFF + + + PIN + Pin number + 0 + 4 + + + CONNECT + Connection + 31 + 31 + + + Disconnected + Disconnect + 1 + + + Connected + Connect + 0 + + + + + + + MISO + Pin select for MISO signal + 0x008 + read-write + 0xFFFFFFFF + + + PIN + Pin number + 0 + 4 + + + CONNECT + Connection + 31 + 31 + + + Disconnected + Disconnect + 1 + + + Connected + Connect + 0 + + + + + + + + FREQUENCY + SPI frequency. Accuracy depends on the HFCLK source selected. + 0x524 + read-write + 0x04000000 + + + FREQUENCY + SPI master data rate + 0 + 31 + + + K125 + 125 kbps + 0x02000000 + + + K250 + 250 kbps + 0x04000000 + + + K500 + 500 kbps + 0x08000000 + + + M1 + 1 Mbps + 0x10000000 + + + M2 + 2 Mbps + 0x20000000 + + + M4 + 4 Mbps + 0x40000000 + + + M8 + 8 Mbps + 0x80000000 + + + + + + + RXD + RXD EasyDMA channel + SPIM_RXD + read-write + 0x534 + + PTR + Data pointer + 0x000 + read-write + + + PTR + Data pointer + 0 + 31 + + + + + MAXCNT + Maximum number of bytes in receive buffer + 0x004 + read-write + + + MAXCNT + Maximum number of bytes in receive buffer + 0 + 7 + + + + + AMOUNT + Number of bytes transferred in the last transaction + 0x008 + read-only + + + AMOUNT + Number of bytes transferred in the last transaction + 0 + 7 + + + + + LIST + EasyDMA list type + 0x00C + read-write + + + LIST + List type + 0 + 2 + + + Disabled + Disable EasyDMA list + 0 + + + ArrayList + Use array list + 1 + + + + + + + + TXD + TXD EasyDMA channel + SPIM_TXD + read-write + 0x544 + + PTR + Data pointer + 0x000 + read-write + + + PTR + Data pointer + 0 + 31 + + + + + MAXCNT + Maximum number of bytes in transmit buffer + 0x004 + read-write + + + MAXCNT + Maximum number of bytes in transmit buffer + 0 + 7 + + + + + AMOUNT + Number of bytes transferred in the last transaction + 0x008 + read-only + + + AMOUNT + Number of bytes transferred in the last transaction + 0 + 7 + + + + + LIST + EasyDMA list type + 0x00C + read-write + + + LIST + List type + 0 + 2 + + + Disabled + Disable EasyDMA list + 0 + + + ArrayList + Use array list + 1 + + + + + + + + CONFIG + Configuration register + 0x554 + read-write + + + ORDER + Bit order + 0 + 0 + + + MsbFirst + Most significant bit shifted out first + 0 + + + LsbFirst + Least significant bit shifted out first + 1 + + + + + CPHA + Serial clock (SCK) phase + 1 + 1 + + + Leading + Sample on leading edge of clock, shift serial data on trailing edge + 0 + + + Trailing + Sample on trailing edge of clock, shift serial data on leading edge + 1 + + + + + CPOL + Serial clock (SCK) polarity + 2 + 2 + + + ActiveHigh + Active high + 0 + + + ActiveLow + Active low + 1 + + + + + + + ORC + Over-read character. Character clocked out in case and over-read of the TXD buffer. + 0x5C0 + read-write + + + ORC + Over-read character. Character clocked out in case and over-read of the TXD buffer. + 0 + 7 + + + + + + + SPIS0 + SPI Slave 0 + 0x40003000 + SPI0 + SPIS + + 0 + 0x1000 + registers + + + SPIM0_SPIS0_TWIM0_TWIS0_SPI0_TWI0 + 3 + + SPIS + 0x20 + + + TASKS_ACQUIRE + Acquire SPI semaphore + 0x024 + write-only + + + TASKS_ACQUIRE + Acquire SPI semaphore + 0 + 0 + + + Trigger + Trigger task + 1 + + + + + + + TASKS_RELEASE + Release SPI semaphore, enabling the SPI slave to acquire it + 0x028 + write-only + + + TASKS_RELEASE + Release SPI semaphore, enabling the SPI slave to acquire it + 0 + 0 + + + Trigger + Trigger task + 1 + + + + + + + EVENTS_END + Granted transaction completed + 0x104 + read-write + + + EVENTS_END + Granted transaction completed + 0 + 0 + + + NotGenerated + Event not generated + 0 + + + Generated + Event generated + 1 + + + + + + + EVENTS_ENDRX + End of RXD buffer reached + 0x110 + read-write + + + EVENTS_ENDRX + End of RXD buffer reached + 0 + 0 + + + NotGenerated + Event not generated + 0 + + + Generated + Event generated + 1 + + + + + + + EVENTS_ACQUIRED + Semaphore acquired + 0x128 + read-write + + + EVENTS_ACQUIRED + Semaphore acquired + 0 + 0 + + + NotGenerated + Event not generated + 0 + + + Generated + Event generated + 1 + + + + + + + SHORTS + Shortcuts between local events and tasks + 0x200 + read-write + + + END_ACQUIRE + Shortcut between event END and task ACQUIRE + 2 + 2 + + + Disabled + Disable shortcut + 0 + + + Enabled + Enable shortcut + 1 + + + + + + + INTENSET + Enable interrupt + 0x304 + read-write + + + END + Write '1' to enable interrupt for event END + 1 + 1 + + read + + Disabled + Read: Disabled + 0 + + + Enabled + Read: Enabled + 1 + + + + write + + Set + Enable + 1 + + + + + ENDRX + Write '1' to enable interrupt for event ENDRX + 4 + 4 + + read + + Disabled + Read: Disabled + 0 + + + Enabled + Read: Enabled + 1 + + + + write + + Set + Enable + 1 + + + + + ACQUIRED + Write '1' to enable interrupt for event ACQUIRED + 10 + 10 + + read + + Disabled + Read: Disabled + 0 + + + Enabled + Read: Enabled + 1 + + + + write + + Set + Enable + 1 + + + + + + + INTENCLR + Disable interrupt + 0x308 + read-write + + + END + Write '1' to disable interrupt for event END + 1 + 1 + + read + + Disabled + Read: Disabled + 0 + + + Enabled + Read: Enabled + 1 + + + + write + + Clear + Disable + 1 + + + + + ENDRX + Write '1' to disable interrupt for event ENDRX + 4 + 4 + + read + + Disabled + Read: Disabled + 0 + + + Enabled + Read: Enabled + 1 + + + + write + + Clear + Disable + 1 + + + + + ACQUIRED + Write '1' to disable interrupt for event ACQUIRED + 10 + 10 + + read + + Disabled + Read: Disabled + 0 + + + Enabled + Read: Enabled + 1 + + + + write + + Clear + Disable + 1 + + + + + + + SEMSTAT + Semaphore status register + 0x400 + read-only + 0x00000001 + + + SEMSTAT + Semaphore status + 0 + 1 + + + Free + Semaphore is free + 0 + + + CPU + Semaphore is assigned to CPU + 1 + + + SPIS + Semaphore is assigned to SPI slave + 2 + + + CPUPending + Semaphore is assigned to SPI but a handover to the CPU is pending + 3 + + + + + + + STATUS + Status from last transaction + 0x440 + read-write + + + OVERREAD + TX buffer over-read detected, and prevented + 0 + 0 + + read + + NotPresent + Read: error not present + 0 + + + Present + Read: error present + 1 + + + + write + + Clear + Write: clear error on writing '1' + 1 + + + + + OVERFLOW + RX buffer overflow detected, and prevented + 1 + 1 + + read + + NotPresent + Read: error not present + 0 + + + Present + Read: error present + 1 + + + + write + + Clear + Write: clear error on writing '1' + 1 + + + + + + + ENABLE + Enable SPI slave + 0x500 + read-write + + + ENABLE + Enable or disable SPI slave + 0 + 3 + + + Disabled + Disable SPI slave + 0 + + + Enabled + Enable SPI slave + 2 + + + + + + + PSEL + Unspecified + SPIS_PSEL + read-write + 0x508 + + SCK + Pin select for SCK + 0x000 + read-write + 0xFFFFFFFF + + + PIN + Pin number + 0 + 4 + + + CONNECT + Connection + 31 + 31 + + + Disconnected + Disconnect + 1 + + + Connected + Connect + 0 + + + + + + + MISO + Pin select for MISO signal + 0x004 + read-write + 0xFFFFFFFF + + + PIN + Pin number + 0 + 4 + + + CONNECT + Connection + 31 + 31 + + + Disconnected + Disconnect + 1 + + + Connected + Connect + 0 + + + + + + + MOSI + Pin select for MOSI signal + 0x008 + read-write + 0xFFFFFFFF + + + PIN + Pin number + 0 + 4 + + + CONNECT + Connection + 31 + 31 + + + Disconnected + Disconnect + 1 + + + Connected + Connect + 0 + + + + + + + CSN + Pin select for CSN signal + 0x00C + read-write + 0xFFFFFFFF + + + PIN + Pin number + 0 + 4 + + + CONNECT + Connection + 31 + 31 + + + Disconnected + Disconnect + 1 + + + Connected + Connect + 0 + + + + + + + + RXD + Unspecified + SPIS_RXD + read-write + 0x534 + + PTR + RXD data pointer + 0x000 + read-write + + + PTR + RXD data pointer + 0 + 31 + + + + + MAXCNT + Maximum number of bytes in receive buffer + 0x004 + read-write + + + MAXCNT + Maximum number of bytes in receive buffer + 0 + 7 + + + + + AMOUNT + Number of bytes received in last granted transaction + 0x008 + read-only + + + AMOUNT + Number of bytes received in the last granted transaction + 0 + 7 + + + + + + TXD + Unspecified + SPIS_TXD + read-write + 0x544 + + PTR + TXD data pointer + 0x000 + read-write + + + PTR + TXD data pointer + 0 + 31 + + + + + MAXCNT + Maximum number of bytes in transmit buffer + 0x004 + read-write + + + MAXCNT + Maximum number of bytes in transmit buffer + 0 + 7 + + + + + AMOUNT + Number of bytes transmitted in last granted transaction + 0x008 + read-only + + + AMOUNT + Number of bytes transmitted in last granted transaction + 0 + 7 + + + + + + CONFIG + Configuration register + 0x554 + read-write + + + ORDER + Bit order + 0 + 0 + + + MsbFirst + Most significant bit shifted out first + 0 + + + LsbFirst + Least significant bit shifted out first + 1 + + + + + CPHA + Serial clock (SCK) phase + 1 + 1 + + + Leading + Sample on leading edge of clock, shift serial data on trailing edge + 0 + + + Trailing + Sample on trailing edge of clock, shift serial data on leading edge + 1 + + + + + CPOL + Serial clock (SCK) polarity + 2 + 2 + + + ActiveHigh + Active high + 0 + + + ActiveLow + Active low + 1 + + + + + + + DEF + Default character. Character clocked out in case of an ignored transaction. + 0x55C + read-write + + + DEF + Default character. Character clocked out in case of an ignored transaction. + 0 + 7 + + + + + ORC + Over-read character + 0x5C0 + read-write + + + ORC + Over-read character. Character clocked out after an over-read of the transmit buffer. + 0 + 7 + + + + + + + TWI0 + I2C compatible Two-Wire Interface 0 + 0x40003000 + SPI0 + TWI + + 0 + 0x1000 + registers + + + SPIM0_SPIS0_TWIM0_TWIS0_SPI0_TWI0 + 3 + + TWI + 0x20 + + + TASKS_STARTRX + Start TWI receive sequence + 0x000 + write-only + + + TASKS_STARTRX + Start TWI receive sequence + 0 + 0 + + + Trigger + Trigger task + 1 + + + + + + + TASKS_STARTTX + Start TWI transmit sequence + 0x008 + write-only + + + TASKS_STARTTX + Start TWI transmit sequence + 0 + 0 + + + Trigger + Trigger task + 1 + + + + + + + TASKS_STOP + Stop TWI transaction + 0x014 + write-only + + + TASKS_STOP + Stop TWI transaction + 0 + 0 + + + Trigger + Trigger task + 1 + + + + + + + TASKS_SUSPEND + Suspend TWI transaction + 0x01C + write-only + + + TASKS_SUSPEND + Suspend TWI transaction + 0 + 0 + + + Trigger + Trigger task + 1 + + + + + + + TASKS_RESUME + Resume TWI transaction + 0x020 + write-only + + + TASKS_RESUME + Resume TWI transaction + 0 + 0 + + + Trigger + Trigger task + 1 + + + + + + + EVENTS_STOPPED + TWI stopped + 0x104 + read-write + + + EVENTS_STOPPED + TWI stopped + 0 + 0 + + + NotGenerated + Event not generated + 0 + + + Generated + Event generated + 1 + + + + + + + EVENTS_RXDREADY + TWI RXD byte received + 0x108 + read-write + + + EVENTS_RXDREADY + TWI RXD byte received + 0 + 0 + + + NotGenerated + Event not generated + 0 + + + Generated + Event generated + 1 + + + + + + + EVENTS_TXDSENT + TWI TXD byte sent + 0x11C + read-write + + + EVENTS_TXDSENT + TWI TXD byte sent + 0 + 0 + + + NotGenerated + Event not generated + 0 + + + Generated + Event generated + 1 + + + + + + + EVENTS_ERROR + TWI error + 0x124 + read-write + + + EVENTS_ERROR + TWI error + 0 + 0 + + + NotGenerated + Event not generated + 0 + + + Generated + Event generated + 1 + + + + + + + EVENTS_BB + TWI byte boundary, generated before each byte that is sent or received + 0x138 + read-write + + + EVENTS_BB + TWI byte boundary, generated before each byte that is sent or received + 0 + 0 + + + NotGenerated + Event not generated + 0 + + + Generated + Event generated + 1 + + + + + + + EVENTS_SUSPENDED + TWI entered the suspended state + 0x148 + read-write + + + EVENTS_SUSPENDED + TWI entered the suspended state + 0 + 0 + + + NotGenerated + Event not generated + 0 + + + Generated + Event generated + 1 + + + + + + + SHORTS + Shortcuts between local events and tasks + 0x200 + read-write + + + BB_SUSPEND + Shortcut between event BB and task SUSPEND + 0 + 0 + + + Disabled + Disable shortcut + 0 + + + Enabled + Enable shortcut + 1 + + + + + BB_STOP + Shortcut between event BB and task STOP + 1 + 1 + + + Disabled + Disable shortcut + 0 + + + Enabled + Enable shortcut + 1 + + + + + + + INTENSET + Enable interrupt + 0x304 + read-write + + + STOPPED + Write '1' to enable interrupt for event STOPPED + 1 + 1 + + read + + Disabled + Read: Disabled + 0 + + + Enabled + Read: Enabled + 1 + + + + write + + Set + Enable + 1 + + + + + RXDREADY + Write '1' to enable interrupt for event RXDREADY + 2 + 2 + + read + + Disabled + Read: Disabled + 0 + + + Enabled + Read: Enabled + 1 + + + + write + + Set + Enable + 1 + + + + + TXDSENT + Write '1' to enable interrupt for event TXDSENT + 7 + 7 + + read + + Disabled + Read: Disabled + 0 + + + Enabled + Read: Enabled + 1 + + + + write + + Set + Enable + 1 + + + + + ERROR + Write '1' to enable interrupt for event ERROR + 9 + 9 + + read + + Disabled + Read: Disabled + 0 + + + Enabled + Read: Enabled + 1 + + + + write + + Set + Enable + 1 + + + + + BB + Write '1' to enable interrupt for event BB + 14 + 14 + + read + + Disabled + Read: Disabled + 0 + + + Enabled + Read: Enabled + 1 + + + + write + + Set + Enable + 1 + + + + + SUSPENDED + Write '1' to enable interrupt for event SUSPENDED + 18 + 18 + + read + + Disabled + Read: Disabled + 0 + + + Enabled + Read: Enabled + 1 + + + + write + + Set + Enable + 1 + + + + + + + INTENCLR + Disable interrupt + 0x308 + read-write + + + STOPPED + Write '1' to disable interrupt for event STOPPED + 1 + 1 + + read + + Disabled + Read: Disabled + 0 + + + Enabled + Read: Enabled + 1 + + + + write + + Clear + Disable + 1 + + + + + RXDREADY + Write '1' to disable interrupt for event RXDREADY + 2 + 2 + + read + + Disabled + Read: Disabled + 0 + + + Enabled + Read: Enabled + 1 + + + + write + + Clear + Disable + 1 + + + + + TXDSENT + Write '1' to disable interrupt for event TXDSENT + 7 + 7 + + read + + Disabled + Read: Disabled + 0 + + + Enabled + Read: Enabled + 1 + + + + write + + Clear + Disable + 1 + + + + + ERROR + Write '1' to disable interrupt for event ERROR + 9 + 9 + + read + + Disabled + Read: Disabled + 0 + + + Enabled + Read: Enabled + 1 + + + + write + + Clear + Disable + 1 + + + + + BB + Write '1' to disable interrupt for event BB + 14 + 14 + + read + + Disabled + Read: Disabled + 0 + + + Enabled + Read: Enabled + 1 + + + + write + + Clear + Disable + 1 + + + + + SUSPENDED + Write '1' to disable interrupt for event SUSPENDED + 18 + 18 + + read + + Disabled + Read: Disabled + 0 + + + Enabled + Read: Enabled + 1 + + + + write + + Clear + Disable + 1 + + + + + + + ERRORSRC + Error source + 0x4C4 + read-write + oneToClear + + + OVERRUN + Overrun error + 0 + 0 + + read + + NotPresent + Read: no overrun occured + 0 + + + Present + Read: overrun occured + 1 + + + + write + + Clear + Write: clear error on writing '1' + 1 + + + + + ANACK + NACK received after sending the address (write '1' to clear) + 1 + 1 + + read + + NotPresent + Read: error not present + 0 + + + Present + Read: error present + 1 + + + + write + + Clear + Write: clear error on writing '1' + 1 + + + + + DNACK + NACK received after sending a data byte (write '1' to clear) + 2 + 2 + + read + + NotPresent + Read: error not present + 0 + + + Present + Read: error present + 1 + + + + write + + Clear + Write: clear error on writing '1' + 1 + + + + + + + ENABLE + Enable TWI + 0x500 + read-write + + + ENABLE + Enable or disable TWI + 0 + 3 + + + Disabled + Disable TWI + 0 + + + Enabled + Enable TWI + 5 + + + + + + + PSELSCL + Pin select for SCL + 0x508 + read-write + 0xFFFFFFFF + + + PSELSCL + Pin number configuration for TWI SCL signal + 0 + 31 + + + Disconnected + Disconnect + 0xFFFFFFFF + + + + + + + PSELSDA + Pin select for SDA + 0x50C + read-write + 0xFFFFFFFF + + + PSELSDA + Pin number configuration for TWI SDA signal + 0 + 31 + + + Disconnected + Disconnect + 0xFFFFFFFF + + + + + + + RXD + RXD register + 0x518 + read-only + + + RXD + RXD register + 0 + 7 + + + + + TXD + TXD register + 0x51C + read-write + + + TXD + TXD register + 0 + 7 + + + + + FREQUENCY + TWI frequency + 0x524 + read-write + 0x04000000 + + + FREQUENCY + TWI master clock frequency + 0 + 31 + + + K100 + 100 kbps + 0x01980000 + + + K250 + 250 kbps + 0x04000000 + + + K400 + 400 kbps (actual rate 410.256 kbps) + 0x06680000 + + + + + + + ADDRESS + Address used in the TWI transfer + 0x588 + read-write + + + ADDRESS + Address used in the TWI transfer + 0 + 6 + + + + + + + TWIM0 + I2C compatible Two-Wire Master Interface with EasyDMA 0 + 0x40003000 + SPI0 + TWIM + + 0 + 0x1000 + registers + + + SPIM0_SPIS0_TWIM0_TWIS0_SPI0_TWI0 + 3 + + TWIM + 0x20 + + + TASKS_STARTRX + Start TWI receive sequence + 0x000 + write-only + + + TASKS_STARTRX + Start TWI receive sequence + 0 + 0 + + + Trigger + Trigger task + 1 + + + + + + + TASKS_STARTTX + Start TWI transmit sequence + 0x008 + write-only + + + TASKS_STARTTX + Start TWI transmit sequence + 0 + 0 + + + Trigger + Trigger task + 1 + + + + + + + TASKS_STOP + Stop TWI transaction. Must be issued while the TWI master is not suspended. + 0x014 + write-only + + + TASKS_STOP + Stop TWI transaction. Must be issued while the TWI master is not suspended. + 0 + 0 + + + Trigger + Trigger task + 1 + + + + + + + TASKS_SUSPEND + Suspend TWI transaction + 0x01C + write-only + + + TASKS_SUSPEND + Suspend TWI transaction + 0 + 0 + + + Trigger + Trigger task + 1 + + + + + + + TASKS_RESUME + Resume TWI transaction + 0x020 + write-only + + + TASKS_RESUME + Resume TWI transaction + 0 + 0 + + + Trigger + Trigger task + 1 + + + + + + + EVENTS_STOPPED + TWI stopped + 0x104 + read-write + + + EVENTS_STOPPED + TWI stopped + 0 + 0 + + + NotGenerated + Event not generated + 0 + + + Generated + Event generated + 1 + + + + + + + EVENTS_ERROR + TWI error + 0x124 + read-write + + + EVENTS_ERROR + TWI error + 0 + 0 + + + NotGenerated + Event not generated + 0 + + + Generated + Event generated + 1 + + + + + + + EVENTS_SUSPENDED + Last byte has been sent out after the SUSPEND task has been issued, TWI traffic is now suspended. + 0x148 + read-write + + + EVENTS_SUSPENDED + Last byte has been sent out after the SUSPEND task has been issued, TWI traffic is now suspended. + 0 + 0 + + + NotGenerated + Event not generated + 0 + + + Generated + Event generated + 1 + + + + + + + EVENTS_RXSTARTED + Receive sequence started + 0x14C + read-write + + + EVENTS_RXSTARTED + Receive sequence started + 0 + 0 + + + NotGenerated + Event not generated + 0 + + + Generated + Event generated + 1 + + + + + + + EVENTS_TXSTARTED + Transmit sequence started + 0x150 + read-write + + + EVENTS_TXSTARTED + Transmit sequence started + 0 + 0 + + + NotGenerated + Event not generated + 0 + + + Generated + Event generated + 1 + + + + + + + EVENTS_LASTRX + Byte boundary, starting to receive the last byte + 0x15C + read-write + + + EVENTS_LASTRX + Byte boundary, starting to receive the last byte + 0 + 0 + + + NotGenerated + Event not generated + 0 + + + Generated + Event generated + 1 + + + + + + + EVENTS_LASTTX + Byte boundary, starting to transmit the last byte + 0x160 + read-write + + + EVENTS_LASTTX + Byte boundary, starting to transmit the last byte + 0 + 0 + + + NotGenerated + Event not generated + 0 + + + Generated + Event generated + 1 + + + + + + + SHORTS + Shortcuts between local events and tasks + 0x200 + read-write + + + LASTTX_STARTRX + Shortcut between event LASTTX and task STARTRX + 7 + 7 + + + Disabled + Disable shortcut + 0 + + + Enabled + Enable shortcut + 1 + + + + + LASTTX_SUSPEND + Shortcut between event LASTTX and task SUSPEND + 8 + 8 + + + Disabled + Disable shortcut + 0 + + + Enabled + Enable shortcut + 1 + + + + + LASTTX_STOP + Shortcut between event LASTTX and task STOP + 9 + 9 + + + Disabled + Disable shortcut + 0 + + + Enabled + Enable shortcut + 1 + + + + + LASTRX_STARTTX + Shortcut between event LASTRX and task STARTTX + 10 + 10 + + + Disabled + Disable shortcut + 0 + + + Enabled + Enable shortcut + 1 + + + + + LASTRX_STOP + Shortcut between event LASTRX and task STOP + 12 + 12 + + + Disabled + Disable shortcut + 0 + + + Enabled + Enable shortcut + 1 + + + + + + + INTEN + Enable or disable interrupt + 0x300 + read-write + + + STOPPED + Enable or disable interrupt for event STOPPED + 1 + 1 + + + Disabled + Disable + 0 + + + Enabled + Enable + 1 + + + + + ERROR + Enable or disable interrupt for event ERROR + 9 + 9 + + + Disabled + Disable + 0 + + + Enabled + Enable + 1 + + + + + SUSPENDED + Enable or disable interrupt for event SUSPENDED + 18 + 18 + + + Disabled + Disable + 0 + + + Enabled + Enable + 1 + + + + + RXSTARTED + Enable or disable interrupt for event RXSTARTED + 19 + 19 + + + Disabled + Disable + 0 + + + Enabled + Enable + 1 + + + + + TXSTARTED + Enable or disable interrupt for event TXSTARTED + 20 + 20 + + + Disabled + Disable + 0 + + + Enabled + Enable + 1 + + + + + LASTRX + Enable or disable interrupt for event LASTRX + 23 + 23 + + + Disabled + Disable + 0 + + + Enabled + Enable + 1 + + + + + LASTTX + Enable or disable interrupt for event LASTTX + 24 + 24 + + + Disabled + Disable + 0 + + + Enabled + Enable + 1 + + + + + + + INTENSET + Enable interrupt + 0x304 + read-write + + + STOPPED + Write '1' to enable interrupt for event STOPPED + 1 + 1 + + read + + Disabled + Read: Disabled + 0 + + + Enabled + Read: Enabled + 1 + + + + write + + Set + Enable + 1 + + + + + ERROR + Write '1' to enable interrupt for event ERROR + 9 + 9 + + read + + Disabled + Read: Disabled + 0 + + + Enabled + Read: Enabled + 1 + + + + write + + Set + Enable + 1 + + + + + SUSPENDED + Write '1' to enable interrupt for event SUSPENDED + 18 + 18 + + read + + Disabled + Read: Disabled + 0 + + + Enabled + Read: Enabled + 1 + + + + write + + Set + Enable + 1 + + + + + RXSTARTED + Write '1' to enable interrupt for event RXSTARTED + 19 + 19 + + read + + Disabled + Read: Disabled + 0 + + + Enabled + Read: Enabled + 1 + + + + write + + Set + Enable + 1 + + + + + TXSTARTED + Write '1' to enable interrupt for event TXSTARTED + 20 + 20 + + read + + Disabled + Read: Disabled + 0 + + + Enabled + Read: Enabled + 1 + + + + write + + Set + Enable + 1 + + + + + LASTRX + Write '1' to enable interrupt for event LASTRX + 23 + 23 + + read + + Disabled + Read: Disabled + 0 + + + Enabled + Read: Enabled + 1 + + + + write + + Set + Enable + 1 + + + + + LASTTX + Write '1' to enable interrupt for event LASTTX + 24 + 24 + + read + + Disabled + Read: Disabled + 0 + + + Enabled + Read: Enabled + 1 + + + + write + + Set + Enable + 1 + + + + + + + INTENCLR + Disable interrupt + 0x308 + read-write + + + STOPPED + Write '1' to disable interrupt for event STOPPED + 1 + 1 + + read + + Disabled + Read: Disabled + 0 + + + Enabled + Read: Enabled + 1 + + + + write + + Clear + Disable + 1 + + + + + ERROR + Write '1' to disable interrupt for event ERROR + 9 + 9 + + read + + Disabled + Read: Disabled + 0 + + + Enabled + Read: Enabled + 1 + + + + write + + Clear + Disable + 1 + + + + + SUSPENDED + Write '1' to disable interrupt for event SUSPENDED + 18 + 18 + + read + + Disabled + Read: Disabled + 0 + + + Enabled + Read: Enabled + 1 + + + + write + + Clear + Disable + 1 + + + + + RXSTARTED + Write '1' to disable interrupt for event RXSTARTED + 19 + 19 + + read + + Disabled + Read: Disabled + 0 + + + Enabled + Read: Enabled + 1 + + + + write + + Clear + Disable + 1 + + + + + TXSTARTED + Write '1' to disable interrupt for event TXSTARTED + 20 + 20 + + read + + Disabled + Read: Disabled + 0 + + + Enabled + Read: Enabled + 1 + + + + write + + Clear + Disable + 1 + + + + + LASTRX + Write '1' to disable interrupt for event LASTRX + 23 + 23 + + read + + Disabled + Read: Disabled + 0 + + + Enabled + Read: Enabled + 1 + + + + write + + Clear + Disable + 1 + + + + + LASTTX + Write '1' to disable interrupt for event LASTTX + 24 + 24 + + read + + Disabled + Read: Disabled + 0 + + + Enabled + Read: Enabled + 1 + + + + write + + Clear + Disable + 1 + + + + + + + ERRORSRC + Error source + 0x4C4 + read-write + oneToClear + + + OVERRUN + Overrun error + 0 + 0 + + + NotReceived + Error did not occur + 0 + + + Received + Error occurred + 1 + + + + + ANACK + NACK received after sending the address (write '1' to clear) + 1 + 1 + + + NotReceived + Error did not occur + 0 + + + Received + Error occurred + 1 + + + + + DNACK + NACK received after sending a data byte (write '1' to clear) + 2 + 2 + + + NotReceived + Error did not occur + 0 + + + Received + Error occurred + 1 + + + + + + + ENABLE + Enable TWIM + 0x500 + read-write + + + ENABLE + Enable or disable TWIM + 0 + 3 + + + Disabled + Disable TWIM + 0 + + + Enabled + Enable TWIM + 6 + + + + + + + PSEL + Unspecified + TWIM_PSEL + read-write + 0x508 + + SCL + Pin select for SCL signal + 0x000 + read-write + 0xFFFFFFFF + + + PIN + Pin number + 0 + 4 + + + CONNECT + Connection + 31 + 31 + + + Disconnected + Disconnect + 1 + + + Connected + Connect + 0 + + + + + + + SDA + Pin select for SDA signal + 0x004 + read-write + 0xFFFFFFFF + + + PIN + Pin number + 0 + 4 + + + CONNECT + Connection + 31 + 31 + + + Disconnected + Disconnect + 1 + + + Connected + Connect + 0 + + + + + + + + FREQUENCY + TWI frequency + 0x524 + read-write + 0x04000000 + + + FREQUENCY + TWI master clock frequency + 0 + 31 + + + K100 + 100 kbps + 0x01980000 + + + K250 + 250 kbps + 0x04000000 + + + K400 + 400 kbps + 0x06400000 + + + + + + + RXD + RXD EasyDMA channel + TWIM_RXD + read-write + 0x534 + + PTR + Data pointer + 0x000 + read-write + + + PTR + Data pointer + 0 + 31 + + + + + MAXCNT + Maximum number of bytes in receive buffer + 0x004 + read-write + + + MAXCNT + Maximum number of bytes in receive buffer + 0 + 7 + + + + + AMOUNT + Number of bytes transferred in the last transaction + 0x008 + read-only + + + AMOUNT + Number of bytes transferred in the last transaction. In case of NACK error, includes the NACK'ed byte. + 0 + 7 + + + + + LIST + EasyDMA list type + 0x00C + read-write + + + LIST + List type + 0 + 2 + + + Disabled + Disable EasyDMA list + 0 + + + ArrayList + Use array list + 1 + + + + + + + + TXD + TXD EasyDMA channel + TWIM_TXD + read-write + 0x544 + + PTR + Data pointer + 0x000 + read-write + + + PTR + Data pointer + 0 + 31 + + + + + MAXCNT + Maximum number of bytes in transmit buffer + 0x004 + read-write + + + MAXCNT + Maximum number of bytes in transmit buffer + 0 + 7 + + + + + AMOUNT + Number of bytes transferred in the last transaction + 0x008 + read-only + + + AMOUNT + Number of bytes transferred in the last transaction. In case of NACK error, includes the NACK'ed byte. + 0 + 7 + + + + + LIST + EasyDMA list type + 0x00C + read-write + + + LIST + List type + 0 + 2 + + + Disabled + Disable EasyDMA list + 0 + + + ArrayList + Use array list + 1 + + + + + + + + ADDRESS + Address used in the TWI transfer + 0x588 + read-write + + + ADDRESS + Address used in the TWI transfer + 0 + 6 + + + + + + + TWIS0 + I2C compatible Two-Wire Slave Interface with EasyDMA 0 + 0x40003000 + SPI0 + TWIS + + 0 + 0x1000 + registers + + + SPIM0_SPIS0_TWIM0_TWIS0_SPI0_TWI0 + 3 + + TWIS + 0x20 + + + TASKS_STOP + Stop TWI transaction + 0x014 + write-only + + + TASKS_STOP + Stop TWI transaction + 0 + 0 + + + Trigger + Trigger task + 1 + + + + + + + TASKS_SUSPEND + Suspend TWI transaction + 0x01C + write-only + + + TASKS_SUSPEND + Suspend TWI transaction + 0 + 0 + + + Trigger + Trigger task + 1 + + + + + + + TASKS_RESUME + Resume TWI transaction + 0x020 + write-only + + + TASKS_RESUME + Resume TWI transaction + 0 + 0 + + + Trigger + Trigger task + 1 + + + + + + + TASKS_PREPARERX + Prepare the TWI slave to respond to a write command + 0x030 + write-only + + + TASKS_PREPARERX + Prepare the TWI slave to respond to a write command + 0 + 0 + + + Trigger + Trigger task + 1 + + + + + + + TASKS_PREPARETX + Prepare the TWI slave to respond to a read command + 0x034 + write-only + + + TASKS_PREPARETX + Prepare the TWI slave to respond to a read command + 0 + 0 + + + Trigger + Trigger task + 1 + + + + + + + EVENTS_STOPPED + TWI stopped + 0x104 + read-write + + + EVENTS_STOPPED + TWI stopped + 0 + 0 + + + NotGenerated + Event not generated + 0 + + + Generated + Event generated + 1 + + + + + + + EVENTS_ERROR + TWI error + 0x124 + read-write + + + EVENTS_ERROR + TWI error + 0 + 0 + + + NotGenerated + Event not generated + 0 + + + Generated + Event generated + 1 + + + + + + + EVENTS_RXSTARTED + Receive sequence started + 0x14C + read-write + + + EVENTS_RXSTARTED + Receive sequence started + 0 + 0 + + + NotGenerated + Event not generated + 0 + + + Generated + Event generated + 1 + + + + + + + EVENTS_TXSTARTED + Transmit sequence started + 0x150 + read-write + + + EVENTS_TXSTARTED + Transmit sequence started + 0 + 0 + + + NotGenerated + Event not generated + 0 + + + Generated + Event generated + 1 + + + + + + + EVENTS_WRITE + Write command received + 0x164 + read-write + + + EVENTS_WRITE + Write command received + 0 + 0 + + + NotGenerated + Event not generated + 0 + + + Generated + Event generated + 1 + + + + + + + EVENTS_READ + Read command received + 0x168 + read-write + + + EVENTS_READ + Read command received + 0 + 0 + + + NotGenerated + Event not generated + 0 + + + Generated + Event generated + 1 + + + + + + + SHORTS + Shortcuts between local events and tasks + 0x200 + read-write + + + WRITE_SUSPEND + Shortcut between event WRITE and task SUSPEND + 13 + 13 + + + Disabled + Disable shortcut + 0 + + + Enabled + Enable shortcut + 1 + + + + + READ_SUSPEND + Shortcut between event READ and task SUSPEND + 14 + 14 + + + Disabled + Disable shortcut + 0 + + + Enabled + Enable shortcut + 1 + + + + + + + INTEN + Enable or disable interrupt + 0x300 + read-write + + + STOPPED + Enable or disable interrupt for event STOPPED + 1 + 1 + + + Disabled + Disable + 0 + + + Enabled + Enable + 1 + + + + + ERROR + Enable or disable interrupt for event ERROR + 9 + 9 + + + Disabled + Disable + 0 + + + Enabled + Enable + 1 + + + + + RXSTARTED + Enable or disable interrupt for event RXSTARTED + 19 + 19 + + + Disabled + Disable + 0 + + + Enabled + Enable + 1 + + + + + TXSTARTED + Enable or disable interrupt for event TXSTARTED + 20 + 20 + + + Disabled + Disable + 0 + + + Enabled + Enable + 1 + + + + + WRITE + Enable or disable interrupt for event WRITE + 25 + 25 + + + Disabled + Disable + 0 + + + Enabled + Enable + 1 + + + + + READ + Enable or disable interrupt for event READ + 26 + 26 + + + Disabled + Disable + 0 + + + Enabled + Enable + 1 + + + + + + + INTENSET + Enable interrupt + 0x304 + read-write + + + STOPPED + Write '1' to enable interrupt for event STOPPED + 1 + 1 + + read + + Disabled + Read: Disabled + 0 + + + Enabled + Read: Enabled + 1 + + + + write + + Set + Enable + 1 + + + + + ERROR + Write '1' to enable interrupt for event ERROR + 9 + 9 + + read + + Disabled + Read: Disabled + 0 + + + Enabled + Read: Enabled + 1 + + + + write + + Set + Enable + 1 + + + + + RXSTARTED + Write '1' to enable interrupt for event RXSTARTED + 19 + 19 + + read + + Disabled + Read: Disabled + 0 + + + Enabled + Read: Enabled + 1 + + + + write + + Set + Enable + 1 + + + + + TXSTARTED + Write '1' to enable interrupt for event TXSTARTED + 20 + 20 + + read + + Disabled + Read: Disabled + 0 + + + Enabled + Read: Enabled + 1 + + + + write + + Set + Enable + 1 + + + + + WRITE + Write '1' to enable interrupt for event WRITE + 25 + 25 + + read + + Disabled + Read: Disabled + 0 + + + Enabled + Read: Enabled + 1 + + + + write + + Set + Enable + 1 + + + + + READ + Write '1' to enable interrupt for event READ + 26 + 26 + + read + + Disabled + Read: Disabled + 0 + + + Enabled + Read: Enabled + 1 + + + + write + + Set + Enable + 1 + + + + + + + INTENCLR + Disable interrupt + 0x308 + read-write + + + STOPPED + Write '1' to disable interrupt for event STOPPED + 1 + 1 + + read + + Disabled + Read: Disabled + 0 + + + Enabled + Read: Enabled + 1 + + + + write + + Clear + Disable + 1 + + + + + ERROR + Write '1' to disable interrupt for event ERROR + 9 + 9 + + read + + Disabled + Read: Disabled + 0 + + + Enabled + Read: Enabled + 1 + + + + write + + Clear + Disable + 1 + + + + + RXSTARTED + Write '1' to disable interrupt for event RXSTARTED + 19 + 19 + + read + + Disabled + Read: Disabled + 0 + + + Enabled + Read: Enabled + 1 + + + + write + + Clear + Disable + 1 + + + + + TXSTARTED + Write '1' to disable interrupt for event TXSTARTED + 20 + 20 + + read + + Disabled + Read: Disabled + 0 + + + Enabled + Read: Enabled + 1 + + + + write + + Clear + Disable + 1 + + + + + WRITE + Write '1' to disable interrupt for event WRITE + 25 + 25 + + read + + Disabled + Read: Disabled + 0 + + + Enabled + Read: Enabled + 1 + + + + write + + Clear + Disable + 1 + + + + + READ + Write '1' to disable interrupt for event READ + 26 + 26 + + read + + Disabled + Read: Disabled + 0 + + + Enabled + Read: Enabled + 1 + + + + write + + Clear + Disable + 1 + + + + + + + ERRORSRC + Error source + 0x4D0 + read-write + oneToClear + + + OVERFLOW + RX buffer overflow detected, and prevented + 0 + 0 + + + NotDetected + Error did not occur + 0 + + + Detected + Error occurred + 1 + + + + + DNACK + NACK sent after receiving a data byte + 2 + 2 + + + NotReceived + Error did not occur + 0 + + + Received + Error occurred + 1 + + + + + OVERREAD + TX buffer over-read detected, and prevented + 3 + 3 + + + NotDetected + Error did not occur + 0 + + + Detected + Error occurred + 1 + + + + + + + MATCH + Status register indicating which address had a match + 0x4D4 + read-only + + + MATCH + Which of the addresses in {ADDRESS} matched the incoming address + 0 + 0 + + + + + ENABLE + Enable TWIS + 0x500 + read-write + + + ENABLE + Enable or disable TWIS + 0 + 3 + + + Disabled + Disable TWIS + 0 + + + Enabled + Enable TWIS + 9 + + + + + + + PSEL + Unspecified + TWIS_PSEL + read-write + 0x508 + + SCL + Pin select for SCL signal + 0x000 + read-write + 0xFFFFFFFF + + + PIN + Pin number + 0 + 4 + + + CONNECT + Connection + 31 + 31 + + + Disconnected + Disconnect + 1 + + + Connected + Connect + 0 + + + + + + + SDA + Pin select for SDA signal + 0x004 + read-write + 0xFFFFFFFF + + + PIN + Pin number + 0 + 4 + + + CONNECT + Connection + 31 + 31 + + + Disconnected + Disconnect + 1 + + + Connected + Connect + 0 + + + + + + + + RXD + RXD EasyDMA channel + TWIS_RXD + read-write + 0x534 + + PTR + RXD Data pointer + 0x000 + read-write + + + PTR + RXD Data pointer + 0 + 31 + + + + + MAXCNT + Maximum number of bytes in RXD buffer + 0x004 + read-write + + + MAXCNT + Maximum number of bytes in RXD buffer + 0 + 7 + + + + + AMOUNT + Number of bytes transferred in the last RXD transaction + 0x008 + read-only + + + AMOUNT + Number of bytes transferred in the last RXD transaction + 0 + 7 + + + + + + TXD + TXD EasyDMA channel + TWIS_TXD + read-write + 0x544 + + PTR + TXD Data pointer + 0x000 + read-write + + + PTR + TXD Data pointer + 0 + 31 + + + + + MAXCNT + Maximum number of bytes in TXD buffer + 0x004 + read-write + + + MAXCNT + Maximum number of bytes in TXD buffer + 0 + 7 + + + + + AMOUNT + Number of bytes transferred in the last TXD transaction + 0x008 + read-only + + + AMOUNT + Number of bytes transferred in the last TXD transaction + 0 + 7 + + + + + + 0x2 + 0x4 + ADDRESS[%s] + Description collection: TWI slave address n + 0x588 + read-write + + + ADDRESS + TWI slave address + 0 + 6 + + + + + CONFIG + Configuration register for the address match mechanism + 0x594 + read-write + 0x00000001 + + + ADDRESS0 + Enable or disable address matching on ADDRESS[0] + 0 + 0 + + + Disabled + Disabled + 0 + + + Enabled + Enabled + 1 + + + + + ADDRESS1 + Enable or disable address matching on ADDRESS[1] + 1 + 1 + + + Disabled + Disabled + 0 + + + Enabled + Enabled + 1 + + + + + + + ORC + Over-read character. Character sent out in case of an over-read of the transmit buffer. + 0x5C0 + read-write + + + ORC + Over-read character. Character sent out in case of an over-read of the transmit buffer. + 0 + 7 + + + + + + + SPI1 + Serial Peripheral Interface 1 + 0x40004000 + + SPIM1_SPIS1_TWIM1_TWIS1_SPI1_TWI1 + 4 + + + + SPIM1 + Serial Peripheral Interface Master with EasyDMA 1 + 0x40004000 + SPI1 + + SPIM1_SPIS1_TWIM1_TWIS1_SPI1_TWI1 + 4 + + + + SPIS1 + SPI Slave 1 + 0x40004000 + SPI1 + + SPIM1_SPIS1_TWIM1_TWIS1_SPI1_TWI1 + 4 + + + + TWI1 + I2C compatible Two-Wire Interface 1 + 0x40004000 + SPI1 + + SPIM1_SPIS1_TWIM1_TWIS1_SPI1_TWI1 + 4 + + + + TWIM1 + I2C compatible Two-Wire Master Interface with EasyDMA 1 + 0x40004000 + SPI1 + + SPIM1_SPIS1_TWIM1_TWIS1_SPI1_TWI1 + 4 + + + + TWIS1 + I2C compatible Two-Wire Slave Interface with EasyDMA 1 + 0x40004000 + SPI1 + + SPIM1_SPIS1_TWIM1_TWIS1_SPI1_TWI1 + 4 + + + + NFCT + NFC-A compatible radio + 0x40005000 + + 0 + 0x1000 + registers + + + NFCT + 5 + + NFCT + 0x20 + + + TASKS_ACTIVATE + Activate NFC peripheral for incoming and outgoing frames, change state to activated + 0x000 + write-only + + + TASKS_ACTIVATE + Activate NFC peripheral for incoming and outgoing frames, change state to activated + 0 + 0 + + + Trigger + Trigger task + 1 + + + + + + + TASKS_DISABLE + Disable NFC peripheral + 0x004 + write-only + + + TASKS_DISABLE + Disable NFC peripheral + 0 + 0 + + + Trigger + Trigger task + 1 + + + + + + + TASKS_SENSE + Enable NFC sense field mode, change state to sense mode + 0x008 + write-only + + + TASKS_SENSE + Enable NFC sense field mode, change state to sense mode + 0 + 0 + + + Trigger + Trigger task + 1 + + + + + + + TASKS_STARTTX + Start transmission of a outgoing frame, change state to transmit + 0x00C + write-only + + + TASKS_STARTTX + Start transmission of a outgoing frame, change state to transmit + 0 + 0 + + + Trigger + Trigger task + 1 + + + + + + + TASKS_ENABLERXDATA + Initializes the EasyDMA for receive. + 0x01C + write-only + + + TASKS_ENABLERXDATA + Initializes the EasyDMA for receive. + 0 + 0 + + + Trigger + Trigger task + 1 + + + + + + + TASKS_GOIDLE + Force state machine to IDLE state + 0x024 + write-only + + + TASKS_GOIDLE + Force state machine to IDLE state + 0 + 0 + + + Trigger + Trigger task + 1 + + + + + + + TASKS_GOSLEEP + Force state machine to SLEEP_A state + 0x028 + write-only + + + TASKS_GOSLEEP + Force state machine to SLEEP_A state + 0 + 0 + + + Trigger + Trigger task + 1 + + + + + + + EVENTS_READY + The NFC peripheral is ready to receive and send frames + 0x100 + read-write + + + EVENTS_READY + The NFC peripheral is ready to receive and send frames + 0 + 0 + + + NotGenerated + Event not generated + 0 + + + Generated + Event generated + 1 + + + + + + + EVENTS_FIELDDETECTED + Remote NFC field detected + 0x104 + read-write + + + EVENTS_FIELDDETECTED + Remote NFC field detected + 0 + 0 + + + NotGenerated + Event not generated + 0 + + + Generated + Event generated + 1 + + + + + + + EVENTS_FIELDLOST + Remote NFC field lost + 0x108 + read-write + + + EVENTS_FIELDLOST + Remote NFC field lost + 0 + 0 + + + NotGenerated + Event not generated + 0 + + + Generated + Event generated + 1 + + + + + + + EVENTS_TXFRAMESTART + Marks the start of the first symbol of a transmitted frame + 0x10C + read-write + + + EVENTS_TXFRAMESTART + Marks the start of the first symbol of a transmitted frame + 0 + 0 + + + NotGenerated + Event not generated + 0 + + + Generated + Event generated + 1 + + + + + + + EVENTS_TXFRAMEEND + Marks the end of the last transmitted on-air symbol of a frame + 0x110 + read-write + + + EVENTS_TXFRAMEEND + Marks the end of the last transmitted on-air symbol of a frame + 0 + 0 + + + NotGenerated + Event not generated + 0 + + + Generated + Event generated + 1 + + + + + + + EVENTS_RXFRAMESTART + Marks the end of the first symbol of a received frame + 0x114 + read-write + + + EVENTS_RXFRAMESTART + Marks the end of the first symbol of a received frame + 0 + 0 + + + NotGenerated + Event not generated + 0 + + + Generated + Event generated + 1 + + + + + + + EVENTS_RXFRAMEEND + Received data have been checked (CRC, parity) and transferred to RAM, and EasyDMA has ended accessing the RX buffer + 0x118 + read-write + + + EVENTS_RXFRAMEEND + Received data have been checked (CRC, parity) and transferred to RAM, and EasyDMA has ended accessing the RX buffer + 0 + 0 + + + NotGenerated + Event not generated + 0 + + + Generated + Event generated + 1 + + + + + + + EVENTS_ERROR + NFC error reported. The ERRORSTATUS register contains details on the source of the error. + 0x11C + read-write + + + EVENTS_ERROR + NFC error reported. The ERRORSTATUS register contains details on the source of the error. + 0 + 0 + + + NotGenerated + Event not generated + 0 + + + Generated + Event generated + 1 + + + + + + + EVENTS_RXERROR + NFC RX frame error reported. The FRAMESTATUS.RX register contains details on the source of the error. + 0x128 + read-write + + + EVENTS_RXERROR + NFC RX frame error reported. The FRAMESTATUS.RX register contains details on the source of the error. + 0 + 0 + + + NotGenerated + Event not generated + 0 + + + Generated + Event generated + 1 + + + + + + + EVENTS_ENDRX + RX buffer (as defined by PACKETPTR and MAXLEN) in Data RAM full. + 0x12C + read-write + + + EVENTS_ENDRX + RX buffer (as defined by PACKETPTR and MAXLEN) in Data RAM full. + 0 + 0 + + + NotGenerated + Event not generated + 0 + + + Generated + Event generated + 1 + + + + + + + EVENTS_ENDTX + Transmission of data in RAM has ended, and EasyDMA has ended accessing the TX buffer + 0x130 + read-write + + + EVENTS_ENDTX + Transmission of data in RAM has ended, and EasyDMA has ended accessing the TX buffer + 0 + 0 + + + NotGenerated + Event not generated + 0 + + + Generated + Event generated + 1 + + + + + + + EVENTS_AUTOCOLRESSTARTED + Auto collision resolution process has started + 0x138 + read-write + + + EVENTS_AUTOCOLRESSTARTED + Auto collision resolution process has started + 0 + 0 + + + NotGenerated + Event not generated + 0 + + + Generated + Event generated + 1 + + + + + + + EVENTS_COLLISION + NFC Auto collision resolution error reported. + 0x148 + read-write + + + EVENTS_COLLISION + NFC Auto collision resolution error reported. + 0 + 0 + + + NotGenerated + Event not generated + 0 + + + Generated + Event generated + 1 + + + + + + + EVENTS_SELECTED + NFC Auto collision resolution successfully completed + 0x14C + read-write + + + EVENTS_SELECTED + NFC Auto collision resolution successfully completed + 0 + 0 + + + NotGenerated + Event not generated + 0 + + + Generated + Event generated + 1 + + + + + + + EVENTS_STARTED + EasyDMA is ready to receive or send frames. + 0x150 + read-write + + + EVENTS_STARTED + EasyDMA is ready to receive or send frames. + 0 + 0 + + + NotGenerated + Event not generated + 0 + + + Generated + Event generated + 1 + + + + + + + SHORTS + Shortcuts between local events and tasks + 0x200 + read-write + + + FIELDDETECTED_ACTIVATE + Shortcut between event FIELDDETECTED and task ACTIVATE + 0 + 0 + + + Disabled + Disable shortcut + 0 + + + Enabled + Enable shortcut + 1 + + + + + FIELDLOST_SENSE + Shortcut between event FIELDLOST and task SENSE + 1 + 1 + + + Disabled + Disable shortcut + 0 + + + Enabled + Enable shortcut + 1 + + + + + + + INTEN + Enable or disable interrupt + 0x300 + read-write + + + READY + Enable or disable interrupt for event READY + 0 + 0 + + + Disabled + Disable + 0 + + + Enabled + Enable + 1 + + + + + FIELDDETECTED + Enable or disable interrupt for event FIELDDETECTED + 1 + 1 + + + Disabled + Disable + 0 + + + Enabled + Enable + 1 + + + + + FIELDLOST + Enable or disable interrupt for event FIELDLOST + 2 + 2 + + + Disabled + Disable + 0 + + + Enabled + Enable + 1 + + + + + TXFRAMESTART + Enable or disable interrupt for event TXFRAMESTART + 3 + 3 + + + Disabled + Disable + 0 + + + Enabled + Enable + 1 + + + + + TXFRAMEEND + Enable or disable interrupt for event TXFRAMEEND + 4 + 4 + + + Disabled + Disable + 0 + + + Enabled + Enable + 1 + + + + + RXFRAMESTART + Enable or disable interrupt for event RXFRAMESTART + 5 + 5 + + + Disabled + Disable + 0 + + + Enabled + Enable + 1 + + + + + RXFRAMEEND + Enable or disable interrupt for event RXFRAMEEND + 6 + 6 + + + Disabled + Disable + 0 + + + Enabled + Enable + 1 + + + + + ERROR + Enable or disable interrupt for event ERROR + 7 + 7 + + + Disabled + Disable + 0 + + + Enabled + Enable + 1 + + + + + RXERROR + Enable or disable interrupt for event RXERROR + 10 + 10 + + + Disabled + Disable + 0 + + + Enabled + Enable + 1 + + + + + ENDRX + Enable or disable interrupt for event ENDRX + 11 + 11 + + + Disabled + Disable + 0 + + + Enabled + Enable + 1 + + + + + ENDTX + Enable or disable interrupt for event ENDTX + 12 + 12 + + + Disabled + Disable + 0 + + + Enabled + Enable + 1 + + + + + AUTOCOLRESSTARTED + Enable or disable interrupt for event AUTOCOLRESSTARTED + 14 + 14 + + + Disabled + Disable + 0 + + + Enabled + Enable + 1 + + + + + COLLISION + Enable or disable interrupt for event COLLISION + 18 + 18 + + + Disabled + Disable + 0 + + + Enabled + Enable + 1 + + + + + SELECTED + Enable or disable interrupt for event SELECTED + 19 + 19 + + + Disabled + Disable + 0 + + + Enabled + Enable + 1 + + + + + STARTED + Enable or disable interrupt for event STARTED + 20 + 20 + + + Disabled + Disable + 0 + + + Enabled + Enable + 1 + + + + + + + INTENSET + Enable interrupt + 0x304 + read-write + + + READY + Write '1' to enable interrupt for event READY + 0 + 0 + + read + + Disabled + Read: Disabled + 0 + + + Enabled + Read: Enabled + 1 + + + + write + + Set + Enable + 1 + + + + + FIELDDETECTED + Write '1' to enable interrupt for event FIELDDETECTED + 1 + 1 + + read + + Disabled + Read: Disabled + 0 + + + Enabled + Read: Enabled + 1 + + + + write + + Set + Enable + 1 + + + + + FIELDLOST + Write '1' to enable interrupt for event FIELDLOST + 2 + 2 + + read + + Disabled + Read: Disabled + 0 + + + Enabled + Read: Enabled + 1 + + + + write + + Set + Enable + 1 + + + + + TXFRAMESTART + Write '1' to enable interrupt for event TXFRAMESTART + 3 + 3 + + read + + Disabled + Read: Disabled + 0 + + + Enabled + Read: Enabled + 1 + + + + write + + Set + Enable + 1 + + + + + TXFRAMEEND + Write '1' to enable interrupt for event TXFRAMEEND + 4 + 4 + + read + + Disabled + Read: Disabled + 0 + + + Enabled + Read: Enabled + 1 + + + + write + + Set + Enable + 1 + + + + + RXFRAMESTART + Write '1' to enable interrupt for event RXFRAMESTART + 5 + 5 + + read + + Disabled + Read: Disabled + 0 + + + Enabled + Read: Enabled + 1 + + + + write + + Set + Enable + 1 + + + + + RXFRAMEEND + Write '1' to enable interrupt for event RXFRAMEEND + 6 + 6 + + read + + Disabled + Read: Disabled + 0 + + + Enabled + Read: Enabled + 1 + + + + write + + Set + Enable + 1 + + + + + ERROR + Write '1' to enable interrupt for event ERROR + 7 + 7 + + read + + Disabled + Read: Disabled + 0 + + + Enabled + Read: Enabled + 1 + + + + write + + Set + Enable + 1 + + + + + RXERROR + Write '1' to enable interrupt for event RXERROR + 10 + 10 + + read + + Disabled + Read: Disabled + 0 + + + Enabled + Read: Enabled + 1 + + + + write + + Set + Enable + 1 + + + + + ENDRX + Write '1' to enable interrupt for event ENDRX + 11 + 11 + + read + + Disabled + Read: Disabled + 0 + + + Enabled + Read: Enabled + 1 + + + + write + + Set + Enable + 1 + + + + + ENDTX + Write '1' to enable interrupt for event ENDTX + 12 + 12 + + read + + Disabled + Read: Disabled + 0 + + + Enabled + Read: Enabled + 1 + + + + write + + Set + Enable + 1 + + + + + AUTOCOLRESSTARTED + Write '1' to enable interrupt for event AUTOCOLRESSTARTED + 14 + 14 + + read + + Disabled + Read: Disabled + 0 + + + Enabled + Read: Enabled + 1 + + + + write + + Set + Enable + 1 + + + + + COLLISION + Write '1' to enable interrupt for event COLLISION + 18 + 18 + + read + + Disabled + Read: Disabled + 0 + + + Enabled + Read: Enabled + 1 + + + + write + + Set + Enable + 1 + + + + + SELECTED + Write '1' to enable interrupt for event SELECTED + 19 + 19 + + read + + Disabled + Read: Disabled + 0 + + + Enabled + Read: Enabled + 1 + + + + write + + Set + Enable + 1 + + + + + STARTED + Write '1' to enable interrupt for event STARTED + 20 + 20 + + read + + Disabled + Read: Disabled + 0 + + + Enabled + Read: Enabled + 1 + + + + write + + Set + Enable + 1 + + + + + + + INTENCLR + Disable interrupt + 0x308 + read-write + + + READY + Write '1' to disable interrupt for event READY + 0 + 0 + + read + + Disabled + Read: Disabled + 0 + + + Enabled + Read: Enabled + 1 + + + + write + + Clear + Disable + 1 + + + + + FIELDDETECTED + Write '1' to disable interrupt for event FIELDDETECTED + 1 + 1 + + read + + Disabled + Read: Disabled + 0 + + + Enabled + Read: Enabled + 1 + + + + write + + Clear + Disable + 1 + + + + + FIELDLOST + Write '1' to disable interrupt for event FIELDLOST + 2 + 2 + + read + + Disabled + Read: Disabled + 0 + + + Enabled + Read: Enabled + 1 + + + + write + + Clear + Disable + 1 + + + + + TXFRAMESTART + Write '1' to disable interrupt for event TXFRAMESTART + 3 + 3 + + read + + Disabled + Read: Disabled + 0 + + + Enabled + Read: Enabled + 1 + + + + write + + Clear + Disable + 1 + + + + + TXFRAMEEND + Write '1' to disable interrupt for event TXFRAMEEND + 4 + 4 + + read + + Disabled + Read: Disabled + 0 + + + Enabled + Read: Enabled + 1 + + + + write + + Clear + Disable + 1 + + + + + RXFRAMESTART + Write '1' to disable interrupt for event RXFRAMESTART + 5 + 5 + + read + + Disabled + Read: Disabled + 0 + + + Enabled + Read: Enabled + 1 + + + + write + + Clear + Disable + 1 + + + + + RXFRAMEEND + Write '1' to disable interrupt for event RXFRAMEEND + 6 + 6 + + read + + Disabled + Read: Disabled + 0 + + + Enabled + Read: Enabled + 1 + + + + write + + Clear + Disable + 1 + + + + + ERROR + Write '1' to disable interrupt for event ERROR + 7 + 7 + + read + + Disabled + Read: Disabled + 0 + + + Enabled + Read: Enabled + 1 + + + + write + + Clear + Disable + 1 + + + + + RXERROR + Write '1' to disable interrupt for event RXERROR + 10 + 10 + + read + + Disabled + Read: Disabled + 0 + + + Enabled + Read: Enabled + 1 + + + + write + + Clear + Disable + 1 + + + + + ENDRX + Write '1' to disable interrupt for event ENDRX + 11 + 11 + + read + + Disabled + Read: Disabled + 0 + + + Enabled + Read: Enabled + 1 + + + + write + + Clear + Disable + 1 + + + + + ENDTX + Write '1' to disable interrupt for event ENDTX + 12 + 12 + + read + + Disabled + Read: Disabled + 0 + + + Enabled + Read: Enabled + 1 + + + + write + + Clear + Disable + 1 + + + + + AUTOCOLRESSTARTED + Write '1' to disable interrupt for event AUTOCOLRESSTARTED + 14 + 14 + + read + + Disabled + Read: Disabled + 0 + + + Enabled + Read: Enabled + 1 + + + + write + + Clear + Disable + 1 + + + + + COLLISION + Write '1' to disable interrupt for event COLLISION + 18 + 18 + + read + + Disabled + Read: Disabled + 0 + + + Enabled + Read: Enabled + 1 + + + + write + + Clear + Disable + 1 + + + + + SELECTED + Write '1' to disable interrupt for event SELECTED + 19 + 19 + + read + + Disabled + Read: Disabled + 0 + + + Enabled + Read: Enabled + 1 + + + + write + + Clear + Disable + 1 + + + + + STARTED + Write '1' to disable interrupt for event STARTED + 20 + 20 + + read + + Disabled + Read: Disabled + 0 + + + Enabled + Read: Enabled + 1 + + + + write + + Clear + Disable + 1 + + + + + + + ERRORSTATUS + NFC Error Status register + 0x404 + read-write + oneToClear + + + FRAMEDELAYTIMEOUT + No STARTTX task triggered before expiration of the time set in FRAMEDELAYMAX + 0 + 0 + + + NFCFIELDTOOSTRONG + Field level is too high at max load resistance + 2 + 2 + + + NFCFIELDTOOWEAK + Field level is too low at min load resistance + 3 + 3 + + + + + FRAMESTATUS + Unspecified + NFCT_FRAMESTATUS + read-write + 0x40C + + RX + Result of last incoming frames + 0x000 + read-write + oneToClear + + + CRCERROR + No valid End of Frame detected + 0 + 0 + + + CRCCorrect + Valid CRC detected + 0 + + + CRCError + CRC received does not match local check + 1 + + + + + PARITYSTATUS + Parity status of received frame + 2 + 2 + + + ParityOK + Frame received with parity OK + 0 + + + ParityError + Frame received with parity error + 1 + + + + + OVERRUN + Overrun detected + 3 + 3 + + + NoOverrun + No overrun detected + 0 + + + Overrun + Overrun error + 1 + + + + + + + + CURRENTLOADCTRL + Current value driven to the NFC Load Control + 0x430 + read-only + 0x00000000 + + + CURRENTLOADCTRL + Current value driven to the NFC Load Control + 0 + 5 + + + + + FIELDPRESENT + Indicates the presence or not of a valid field + 0x43C + read-only + + + FIELDPRESENT + Indicates the presence or not of a valid field. Available only in the activated state. + 0 + 0 + + + NoField + No valid field detected + 0 + + + FieldPresent + Valid field detected + 1 + + + + + LOCKDETECT + Indicates if the low level has locked to the field + 1 + 1 + + + NotLocked + Not locked to field + 0 + + + Locked + Locked to field + 1 + + + + + + + FRAMEDELAYMIN + Minimum frame delay + 0x504 + read-write + 0x00000480 + + + FRAMEDELAYMIN + Minimum frame delay in number of 13.56 MHz clocks + 0 + 15 + + + + + FRAMEDELAYMAX + Maximum frame delay + 0x508 + read-write + 0x00001000 + + + FRAMEDELAYMAX + Maximum frame delay in number of 13.56 MHz clocks + 0 + 15 + + + + + FRAMEDELAYMODE + Configuration register for the Frame Delay Timer + 0x50C + read-write + 0x00000001 + + + FRAMEDELAYMODE + Configuration register for the Frame Delay Timer + 0 + 1 + + + FreeRun + Transmission is independent of frame timer and will start when the STARTTX task is triggered. No timeout. + 0 + + + Window + Frame is transmitted between FRAMEDELAYMIN and FRAMEDELAYMAX + 1 + + + ExactVal + Frame is transmitted exactly at FRAMEDELAYMAX + 2 + + + WindowGrid + Frame is transmitted on a bit grid between FRAMEDELAYMIN and FRAMEDELAYMAX + 3 + + + + + + + PACKETPTR + Packet pointer for TXD and RXD data storage in Data RAM + 0x510 + read-write + 0x00000000 + + + PTR + Packet pointer for TXD and RXD data storage in Data RAM. This address is a byte aligned RAM address. + 0 + 31 + + + + + MAXLEN + Size of allocated for TXD and RXD data storage buffer in Data RAM + 0x514 + read-write + + + MAXLEN + Size of allocated for TXD and RXD data storage buffer in Data RAM + 0 + 8 + + + + + TXD + Unspecified + NFCT_TXD + read-write + 0x518 + + FRAMECONFIG + Configuration of outgoing frames + 0x000 + read-write + 0x00000017 + + + PARITY + Adding parity or not in the frame + 0 + 0 + + + NoParity + Parity is not added in TX frames + 0 + + + Parity + Parity is added TX frames + 1 + + + + + DISCARDMODE + Discarding unused bits in start or at end of a Frame + 1 + 1 + + + DiscardEnd + Unused bits is discarded at end of frame + 0 + + + DiscardStart + Unused bits is discarded at start of frame + 1 + + + + + SOF + Adding SoF or not in TX frames + 2 + 2 + + + NoSoF + Start of Frame symbol not added + 0 + + + SoF + Start of Frame symbol added + 1 + + + + + CRCMODETX + CRC mode for outgoing frames + 4 + 4 + + + NoCRCTX + CRC is not added to the frame + 0 + + + CRC16TX + 16 bit CRC added to the frame based on all the data read from RAM that is used in the frame + 1 + + + + + + + AMOUNT + Size of outgoing frame + 0x004 + read-write + + + TXDATABITS + Number of bits in the last or first byte read from RAM that shall be included in the frame (excluding parity bit). + 0 + 2 + + + TXDATABYTES + Number of complete bytes that shall be included in the frame, excluding CRC, parity and framing + 3 + 11 + + + + + + RXD + Unspecified + NFCT_RXD + read-write + 0x520 + + FRAMECONFIG + Configuration of incoming frames + 0x000 + read-write + 0x00000015 + + + PARITY + Parity expected or not in RX frame + 0 + 0 + + + NoParity + Parity is not expected in RX frames + 0 + + + Parity + Parity is expected in RX frames + 1 + + + + + SOF + SoF expected or not in RX frames + 2 + 2 + + + NoSoF + Start of Frame symbol is not expected in RX frames + 0 + + + SoF + Start of Frame symbol is expected in RX frames + 1 + + + + + CRCMODERX + CRC mode for incoming frames + 4 + 4 + + + NoCRCRX + CRC is not expected in RX frames + 0 + + + CRC16RX + Last 16 bits in RX frame is CRC, CRC is checked and CRCSTATUS updated + 1 + + + + + + + AMOUNT + Size of last incoming frame + 0x004 + read-only + + + RXDATABITS + Number of bits in the last byte in the frame, if less than 8 (including CRC, but excluding parity and SoF/EoF framing). + 0 + 2 + + + RXDATABYTES + Number of complete bytes received in the frame (including CRC, but excluding parity and SoF/EoF framing) + 3 + 11 + + + + + + NFCID1_LAST + Last NFCID1 part (4, 7 or 10 bytes ID) + 0x590 + read-write + 0x00006363 + + + NFCID1_Z + NFCID1 byte Z (very last byte sent) + 0 + 7 + + + NFCID1_Y + NFCID1 byte Y + 8 + 15 + + + NFCID1_X + NFCID1 byte X + 16 + 23 + + + NFCID1_W + NFCID1 byte W + 24 + 31 + + + + + NFCID1_2ND_LAST + Second last NFCID1 part (7 or 10 bytes ID) + 0x594 + read-write + + + NFCID1_V + NFCID1 byte V + 0 + 7 + + + NFCID1_U + NFCID1 byte U + 8 + 15 + + + NFCID1_T + NFCID1 byte T + 16 + 23 + + + + + NFCID1_3RD_LAST + Third last NFCID1 part (10 bytes ID) + 0x598 + read-write + + + NFCID1_S + NFCID1 byte S + 0 + 7 + + + NFCID1_R + NFCID1 byte R + 8 + 15 + + + NFCID1_Q + NFCID1 byte Q + 16 + 23 + + + + + SENSRES + NFC-A SENS_RES auto-response settings + 0x5A0 + read-write + 0x00000001 + + + BITFRAMESDD + Bit frame SDD as defined by the b5:b1 of byte 1 in SENS_RES response in the NFC Forum, NFC Digital Protocol Technical Specification + 0 + 4 + + + SDD00000 + SDD pattern 00000 + 0 + + + SDD00001 + SDD pattern 00001 + 1 + + + SDD00010 + SDD pattern 00010 + 2 + + + SDD00100 + SDD pattern 00100 + 4 + + + SDD01000 + SDD pattern 01000 + 8 + + + SDD10000 + SDD pattern 10000 + 16 + + + + + RFU5 + Reserved for future use. Shall be 0. + 5 + 5 + + + NFCIDSIZE + NFCID1 size. This value is used by the Auto collision resolution engine. + 6 + 7 + + + NFCID1Single + NFCID1 size: single (4 bytes) + 0 + + + NFCID1Double + NFCID1 size: double (7 bytes) + 1 + + + NFCID1Triple + NFCID1 size: triple (10 bytes) + 2 + + + + + PLATFCONFIG + Tag platform configuration as defined by the b4:b1 of byte 2 in SENS_RES response in the NFC Forum, NFC Digital Protocol Technical Specification + 8 + 11 + + + RFU74 + Reserved for future use. Shall be 0. + 12 + 15 + + + + + SELRES + NFC-A SEL_RES auto-response settings + 0x5A4 + read-write + + + RFU10 + Reserved for future use. Shall be 0. + 0 + 1 + + + CASCADE + Cascade bit (controlled by hardware, write has no effect) + 2 + 2 + + + Complete + NFCID1 complete + 0 + + + NotComplete + NFCID1 not complete + 1 + + + + + RFU43 + Reserved for future use. Shall be 0. + 3 + 4 + + + PROTOCOL + Protocol as defined by the b7:b6 of SEL_RES response in the NFC Forum, NFC Digital Protocol Technical Specification + 5 + 6 + + + RFU7 + Reserved for future use. Shall be 0. + 7 + 7 + + + + + + + GPIOTE + GPIO Tasks and Events + 0x40006000 + + 0 + 0x1000 + registers + + + GPIOTE + 6 + + GPIOTE + 0x20 + + + 0x8 + 0x4 + TASKS_OUT[%s] + Description collection: Task for writing to pin specified in CONFIG[n].PSEL. Action on pin is configured in CONFIG[n].POLARITY. + 0x000 + write-only + + + TASKS_OUT + Task for writing to pin specified in CONFIG[n].PSEL. Action on pin is configured in CONFIG[n].POLARITY. + 0 + 0 + + + Trigger + Trigger task + 1 + + + + + + + 0x8 + 0x4 + TASKS_SET[%s] + Description collection: Task for writing to pin specified in CONFIG[n].PSEL. Action on pin is to set it high. + 0x030 + write-only + + + TASKS_SET + Task for writing to pin specified in CONFIG[n].PSEL. Action on pin is to set it high. + 0 + 0 + + + Trigger + Trigger task + 1 + + + + + + + 0x8 + 0x4 + TASKS_CLR[%s] + Description collection: Task for writing to pin specified in CONFIG[n].PSEL. Action on pin is to set it low. + 0x060 + write-only + + + TASKS_CLR + Task for writing to pin specified in CONFIG[n].PSEL. Action on pin is to set it low. + 0 + 0 + + + Trigger + Trigger task + 1 + + + + + + + 0x8 + 0x4 + EVENTS_IN[%s] + Description collection: Event generated from pin specified in CONFIG[n].PSEL + 0x100 + read-write + + + EVENTS_IN + Event generated from pin specified in CONFIG[n].PSEL + 0 + 0 + + + NotGenerated + Event not generated + 0 + + + Generated + Event generated + 1 + + + + + + + EVENTS_PORT + Event generated from multiple input GPIO pins with SENSE mechanism enabled + 0x17C + read-write + + + EVENTS_PORT + Event generated from multiple input GPIO pins with SENSE mechanism enabled + 0 + 0 + + + NotGenerated + Event not generated + 0 + + + Generated + Event generated + 1 + + + + + + + INTENSET + Enable interrupt + 0x304 + read-write + + + IN0 + Write '1' to enable interrupt for event IN[0] + 0 + 0 + + read + + Disabled + Read: Disabled + 0 + + + Enabled + Read: Enabled + 1 + + + + write + + Set + Enable + 1 + + + + + IN1 + Write '1' to enable interrupt for event IN[1] + 1 + 1 + + read + + Disabled + Read: Disabled + 0 + + + Enabled + Read: Enabled + 1 + + + + write + + Set + Enable + 1 + + + + + IN2 + Write '1' to enable interrupt for event IN[2] + 2 + 2 + + read + + Disabled + Read: Disabled + 0 + + + Enabled + Read: Enabled + 1 + + + + write + + Set + Enable + 1 + + + + + IN3 + Write '1' to enable interrupt for event IN[3] + 3 + 3 + + read + + Disabled + Read: Disabled + 0 + + + Enabled + Read: Enabled + 1 + + + + write + + Set + Enable + 1 + + + + + IN4 + Write '1' to enable interrupt for event IN[4] + 4 + 4 + + read + + Disabled + Read: Disabled + 0 + + + Enabled + Read: Enabled + 1 + + + + write + + Set + Enable + 1 + + + + + IN5 + Write '1' to enable interrupt for event IN[5] + 5 + 5 + + read + + Disabled + Read: Disabled + 0 + + + Enabled + Read: Enabled + 1 + + + + write + + Set + Enable + 1 + + + + + IN6 + Write '1' to enable interrupt for event IN[6] + 6 + 6 + + read + + Disabled + Read: Disabled + 0 + + + Enabled + Read: Enabled + 1 + + + + write + + Set + Enable + 1 + + + + + IN7 + Write '1' to enable interrupt for event IN[7] + 7 + 7 + + read + + Disabled + Read: Disabled + 0 + + + Enabled + Read: Enabled + 1 + + + + write + + Set + Enable + 1 + + + + + PORT + Write '1' to enable interrupt for event PORT + 31 + 31 + + read + + Disabled + Read: Disabled + 0 + + + Enabled + Read: Enabled + 1 + + + + write + + Set + Enable + 1 + + + + + + + INTENCLR + Disable interrupt + 0x308 + read-write + + + IN0 + Write '1' to disable interrupt for event IN[0] + 0 + 0 + + read + + Disabled + Read: Disabled + 0 + + + Enabled + Read: Enabled + 1 + + + + write + + Clear + Disable + 1 + + + + + IN1 + Write '1' to disable interrupt for event IN[1] + 1 + 1 + + read + + Disabled + Read: Disabled + 0 + + + Enabled + Read: Enabled + 1 + + + + write + + Clear + Disable + 1 + + + + + IN2 + Write '1' to disable interrupt for event IN[2] + 2 + 2 + + read + + Disabled + Read: Disabled + 0 + + + Enabled + Read: Enabled + 1 + + + + write + + Clear + Disable + 1 + + + + + IN3 + Write '1' to disable interrupt for event IN[3] + 3 + 3 + + read + + Disabled + Read: Disabled + 0 + + + Enabled + Read: Enabled + 1 + + + + write + + Clear + Disable + 1 + + + + + IN4 + Write '1' to disable interrupt for event IN[4] + 4 + 4 + + read + + Disabled + Read: Disabled + 0 + + + Enabled + Read: Enabled + 1 + + + + write + + Clear + Disable + 1 + + + + + IN5 + Write '1' to disable interrupt for event IN[5] + 5 + 5 + + read + + Disabled + Read: Disabled + 0 + + + Enabled + Read: Enabled + 1 + + + + write + + Clear + Disable + 1 + + + + + IN6 + Write '1' to disable interrupt for event IN[6] + 6 + 6 + + read + + Disabled + Read: Disabled + 0 + + + Enabled + Read: Enabled + 1 + + + + write + + Clear + Disable + 1 + + + + + IN7 + Write '1' to disable interrupt for event IN[7] + 7 + 7 + + read + + Disabled + Read: Disabled + 0 + + + Enabled + Read: Enabled + 1 + + + + write + + Clear + Disable + 1 + + + + + PORT + Write '1' to disable interrupt for event PORT + 31 + 31 + + read + + Disabled + Read: Disabled + 0 + + + Enabled + Read: Enabled + 1 + + + + write + + Clear + Disable + 1 + + + + + + + 0x8 + 0x4 + CONFIG[%s] + Description collection: Configuration for OUT[n], SET[n] and CLR[n] tasks and IN[n] event + 0x510 + read-write + + + MODE + Mode + 0 + 1 + + + Disabled + Disabled. Pin specified by PSEL will not be acquired by the GPIOTE module. + 0 + + + Event + Event mode + 1 + + + Task + Task mode + 3 + + + + + PSEL + GPIO number associated with SET[n], CLR[n] and OUT[n] tasks and IN[n] event + 8 + 12 + + + POLARITY + When In task mode: Operation to be performed on output when OUT[n] task is triggered. When In event mode: Operation on input that shall trigger IN[n] event. + 16 + 17 + + + None + Task mode: No effect on pin from OUT[n] task. Event mode: no IN[n] event generated on pin activity. + 0 + + + LoToHi + Task mode: Set pin from OUT[n] task. Event mode: Generate IN[n] event when rising edge on pin. + 1 + + + HiToLo + Task mode: Clear pin from OUT[n] task. Event mode: Generate IN[n] event when falling edge on pin. + 2 + + + Toggle + Task mode: Toggle pin from OUT[n]. Event mode: Generate IN[n] when any change on pin. + 3 + + + + + OUTINIT + When in task mode: Initial value of the output when the GPIOTE channel is configured. When in event mode: No effect. + 20 + 20 + + + Low + Task mode: Initial value of pin before task triggering is low + 0 + + + High + Task mode: Initial value of pin before task triggering is high + 1 + + + + + + + + + SAADC + Analog to Digital Converter + 0x40007000 + + 0 + 0x1000 + registers + + + SAADC + 7 + + SAADC + 0x20 + + + TASKS_START + Start the ADC and prepare the result buffer in RAM + 0x000 + write-only + + + TASKS_START + Start the ADC and prepare the result buffer in RAM + 0 + 0 + + + Trigger + Trigger task + 1 + + + + + + + TASKS_SAMPLE + Take one ADC sample, if scan is enabled all channels are sampled + 0x004 + write-only + + + TASKS_SAMPLE + Take one ADC sample, if scan is enabled all channels are sampled + 0 + 0 + + + Trigger + Trigger task + 1 + + + + + + + TASKS_STOP + Stop the ADC and terminate any on-going conversion + 0x008 + write-only + + + TASKS_STOP + Stop the ADC and terminate any on-going conversion + 0 + 0 + + + Trigger + Trigger task + 1 + + + + + + + TASKS_CALIBRATEOFFSET + Starts offset auto-calibration + 0x00C + write-only + + + TASKS_CALIBRATEOFFSET + Starts offset auto-calibration + 0 + 0 + + + Trigger + Trigger task + 1 + + + + + + + EVENTS_STARTED + The ADC has started + 0x100 + read-write + + + EVENTS_STARTED + The ADC has started + 0 + 0 + + + NotGenerated + Event not generated + 0 + + + Generated + Event generated + 1 + + + + + + + EVENTS_END + The ADC has filled up the Result buffer + 0x104 + read-write + + + EVENTS_END + The ADC has filled up the Result buffer + 0 + 0 + + + NotGenerated + Event not generated + 0 + + + Generated + Event generated + 1 + + + + + + + EVENTS_DONE + A conversion task has been completed. Depending on the mode, multiple conversions might be needed for a result to be transferred to RAM. + 0x108 + read-write + + + EVENTS_DONE + A conversion task has been completed. Depending on the mode, multiple conversions might be needed for a result to be transferred to RAM. + 0 + 0 + + + NotGenerated + Event not generated + 0 + + + Generated + Event generated + 1 + + + + + + + EVENTS_RESULTDONE + A result is ready to get transferred to RAM. + 0x10C + read-write + + + EVENTS_RESULTDONE + A result is ready to get transferred to RAM. + 0 + 0 + + + NotGenerated + Event not generated + 0 + + + Generated + Event generated + 1 + + + + + + + EVENTS_CALIBRATEDONE + Calibration is complete + 0x110 + read-write + + + EVENTS_CALIBRATEDONE + Calibration is complete + 0 + 0 + + + NotGenerated + Event not generated + 0 + + + Generated + Event generated + 1 + + + + + + + EVENTS_STOPPED + The ADC has stopped + 0x114 + read-write + + + EVENTS_STOPPED + The ADC has stopped + 0 + 0 + + + NotGenerated + Event not generated + 0 + + + Generated + Event generated + 1 + + + + + + + 8 + 0x008 + EVENTS_CH[%s] + Peripheral events. + SAADC_EVENTS_CH + read-write + 0x118 + + LIMITH + Description cluster: Last results is equal or above CH[n].LIMIT.HIGH + 0x000 + read-write + + + LIMITH + Last results is equal or above CH[n].LIMIT.HIGH + 0 + 0 + + + NotGenerated + Event not generated + 0 + + + Generated + Event generated + 1 + + + + + + + LIMITL + Description cluster: Last results is equal or below CH[n].LIMIT.LOW + 0x004 + read-write + + + LIMITL + Last results is equal or below CH[n].LIMIT.LOW + 0 + 0 + + + NotGenerated + Event not generated + 0 + + + Generated + Event generated + 1 + + + + + + + + INTEN + Enable or disable interrupt + 0x300 + read-write + + + STARTED + Enable or disable interrupt for event STARTED + 0 + 0 + + + Disabled + Disable + 0 + + + Enabled + Enable + 1 + + + + + END + Enable or disable interrupt for event END + 1 + 1 + + + Disabled + Disable + 0 + + + Enabled + Enable + 1 + + + + + DONE + Enable or disable interrupt for event DONE + 2 + 2 + + + Disabled + Disable + 0 + + + Enabled + Enable + 1 + + + + + RESULTDONE + Enable or disable interrupt for event RESULTDONE + 3 + 3 + + + Disabled + Disable + 0 + + + Enabled + Enable + 1 + + + + + CALIBRATEDONE + Enable or disable interrupt for event CALIBRATEDONE + 4 + 4 + + + Disabled + Disable + 0 + + + Enabled + Enable + 1 + + + + + STOPPED + Enable or disable interrupt for event STOPPED + 5 + 5 + + + Disabled + Disable + 0 + + + Enabled + Enable + 1 + + + + + CH0LIMITH + Enable or disable interrupt for event CH0LIMITH + 6 + 6 + + + Disabled + Disable + 0 + + + Enabled + Enable + 1 + + + + + CH0LIMITL + Enable or disable interrupt for event CH0LIMITL + 7 + 7 + + + Disabled + Disable + 0 + + + Enabled + Enable + 1 + + + + + CH1LIMITH + Enable or disable interrupt for event CH1LIMITH + 8 + 8 + + + Disabled + Disable + 0 + + + Enabled + Enable + 1 + + + + + CH1LIMITL + Enable or disable interrupt for event CH1LIMITL + 9 + 9 + + + Disabled + Disable + 0 + + + Enabled + Enable + 1 + + + + + CH2LIMITH + Enable or disable interrupt for event CH2LIMITH + 10 + 10 + + + Disabled + Disable + 0 + + + Enabled + Enable + 1 + + + + + CH2LIMITL + Enable or disable interrupt for event CH2LIMITL + 11 + 11 + + + Disabled + Disable + 0 + + + Enabled + Enable + 1 + + + + + CH3LIMITH + Enable or disable interrupt for event CH3LIMITH + 12 + 12 + + + Disabled + Disable + 0 + + + Enabled + Enable + 1 + + + + + CH3LIMITL + Enable or disable interrupt for event CH3LIMITL + 13 + 13 + + + Disabled + Disable + 0 + + + Enabled + Enable + 1 + + + + + CH4LIMITH + Enable or disable interrupt for event CH4LIMITH + 14 + 14 + + + Disabled + Disable + 0 + + + Enabled + Enable + 1 + + + + + CH4LIMITL + Enable or disable interrupt for event CH4LIMITL + 15 + 15 + + + Disabled + Disable + 0 + + + Enabled + Enable + 1 + + + + + CH5LIMITH + Enable or disable interrupt for event CH5LIMITH + 16 + 16 + + + Disabled + Disable + 0 + + + Enabled + Enable + 1 + + + + + CH5LIMITL + Enable or disable interrupt for event CH5LIMITL + 17 + 17 + + + Disabled + Disable + 0 + + + Enabled + Enable + 1 + + + + + CH6LIMITH + Enable or disable interrupt for event CH6LIMITH + 18 + 18 + + + Disabled + Disable + 0 + + + Enabled + Enable + 1 + + + + + CH6LIMITL + Enable or disable interrupt for event CH6LIMITL + 19 + 19 + + + Disabled + Disable + 0 + + + Enabled + Enable + 1 + + + + + CH7LIMITH + Enable or disable interrupt for event CH7LIMITH + 20 + 20 + + + Disabled + Disable + 0 + + + Enabled + Enable + 1 + + + + + CH7LIMITL + Enable or disable interrupt for event CH7LIMITL + 21 + 21 + + + Disabled + Disable + 0 + + + Enabled + Enable + 1 + + + + + + + INTENSET + Enable interrupt + 0x304 + read-write + + + STARTED + Write '1' to enable interrupt for event STARTED + 0 + 0 + + read + + Disabled + Read: Disabled + 0 + + + Enabled + Read: Enabled + 1 + + + + write + + Set + Enable + 1 + + + + + END + Write '1' to enable interrupt for event END + 1 + 1 + + read + + Disabled + Read: Disabled + 0 + + + Enabled + Read: Enabled + 1 + + + + write + + Set + Enable + 1 + + + + + DONE + Write '1' to enable interrupt for event DONE + 2 + 2 + + read + + Disabled + Read: Disabled + 0 + + + Enabled + Read: Enabled + 1 + + + + write + + Set + Enable + 1 + + + + + RESULTDONE + Write '1' to enable interrupt for event RESULTDONE + 3 + 3 + + read + + Disabled + Read: Disabled + 0 + + + Enabled + Read: Enabled + 1 + + + + write + + Set + Enable + 1 + + + + + CALIBRATEDONE + Write '1' to enable interrupt for event CALIBRATEDONE + 4 + 4 + + read + + Disabled + Read: Disabled + 0 + + + Enabled + Read: Enabled + 1 + + + + write + + Set + Enable + 1 + + + + + STOPPED + Write '1' to enable interrupt for event STOPPED + 5 + 5 + + read + + Disabled + Read: Disabled + 0 + + + Enabled + Read: Enabled + 1 + + + + write + + Set + Enable + 1 + + + + + CH0LIMITH + Write '1' to enable interrupt for event CH0LIMITH + 6 + 6 + + read + + Disabled + Read: Disabled + 0 + + + Enabled + Read: Enabled + 1 + + + + write + + Set + Enable + 1 + + + + + CH0LIMITL + Write '1' to enable interrupt for event CH0LIMITL + 7 + 7 + + read + + Disabled + Read: Disabled + 0 + + + Enabled + Read: Enabled + 1 + + + + write + + Set + Enable + 1 + + + + + CH1LIMITH + Write '1' to enable interrupt for event CH1LIMITH + 8 + 8 + + read + + Disabled + Read: Disabled + 0 + + + Enabled + Read: Enabled + 1 + + + + write + + Set + Enable + 1 + + + + + CH1LIMITL + Write '1' to enable interrupt for event CH1LIMITL + 9 + 9 + + read + + Disabled + Read: Disabled + 0 + + + Enabled + Read: Enabled + 1 + + + + write + + Set + Enable + 1 + + + + + CH2LIMITH + Write '1' to enable interrupt for event CH2LIMITH + 10 + 10 + + read + + Disabled + Read: Disabled + 0 + + + Enabled + Read: Enabled + 1 + + + + write + + Set + Enable + 1 + + + + + CH2LIMITL + Write '1' to enable interrupt for event CH2LIMITL + 11 + 11 + + read + + Disabled + Read: Disabled + 0 + + + Enabled + Read: Enabled + 1 + + + + write + + Set + Enable + 1 + + + + + CH3LIMITH + Write '1' to enable interrupt for event CH3LIMITH + 12 + 12 + + read + + Disabled + Read: Disabled + 0 + + + Enabled + Read: Enabled + 1 + + + + write + + Set + Enable + 1 + + + + + CH3LIMITL + Write '1' to enable interrupt for event CH3LIMITL + 13 + 13 + + read + + Disabled + Read: Disabled + 0 + + + Enabled + Read: Enabled + 1 + + + + write + + Set + Enable + 1 + + + + + CH4LIMITH + Write '1' to enable interrupt for event CH4LIMITH + 14 + 14 + + read + + Disabled + Read: Disabled + 0 + + + Enabled + Read: Enabled + 1 + + + + write + + Set + Enable + 1 + + + + + CH4LIMITL + Write '1' to enable interrupt for event CH4LIMITL + 15 + 15 + + read + + Disabled + Read: Disabled + 0 + + + Enabled + Read: Enabled + 1 + + + + write + + Set + Enable + 1 + + + + + CH5LIMITH + Write '1' to enable interrupt for event CH5LIMITH + 16 + 16 + + read + + Disabled + Read: Disabled + 0 + + + Enabled + Read: Enabled + 1 + + + + write + + Set + Enable + 1 + + + + + CH5LIMITL + Write '1' to enable interrupt for event CH5LIMITL + 17 + 17 + + read + + Disabled + Read: Disabled + 0 + + + Enabled + Read: Enabled + 1 + + + + write + + Set + Enable + 1 + + + + + CH6LIMITH + Write '1' to enable interrupt for event CH6LIMITH + 18 + 18 + + read + + Disabled + Read: Disabled + 0 + + + Enabled + Read: Enabled + 1 + + + + write + + Set + Enable + 1 + + + + + CH6LIMITL + Write '1' to enable interrupt for event CH6LIMITL + 19 + 19 + + read + + Disabled + Read: Disabled + 0 + + + Enabled + Read: Enabled + 1 + + + + write + + Set + Enable + 1 + + + + + CH7LIMITH + Write '1' to enable interrupt for event CH7LIMITH + 20 + 20 + + read + + Disabled + Read: Disabled + 0 + + + Enabled + Read: Enabled + 1 + + + + write + + Set + Enable + 1 + + + + + CH7LIMITL + Write '1' to enable interrupt for event CH7LIMITL + 21 + 21 + + read + + Disabled + Read: Disabled + 0 + + + Enabled + Read: Enabled + 1 + + + + write + + Set + Enable + 1 + + + + + + + INTENCLR + Disable interrupt + 0x308 + read-write + + + STARTED + Write '1' to disable interrupt for event STARTED + 0 + 0 + + read + + Disabled + Read: Disabled + 0 + + + Enabled + Read: Enabled + 1 + + + + write + + Clear + Disable + 1 + + + + + END + Write '1' to disable interrupt for event END + 1 + 1 + + read + + Disabled + Read: Disabled + 0 + + + Enabled + Read: Enabled + 1 + + + + write + + Clear + Disable + 1 + + + + + DONE + Write '1' to disable interrupt for event DONE + 2 + 2 + + read + + Disabled + Read: Disabled + 0 + + + Enabled + Read: Enabled + 1 + + + + write + + Clear + Disable + 1 + + + + + RESULTDONE + Write '1' to disable interrupt for event RESULTDONE + 3 + 3 + + read + + Disabled + Read: Disabled + 0 + + + Enabled + Read: Enabled + 1 + + + + write + + Clear + Disable + 1 + + + + + CALIBRATEDONE + Write '1' to disable interrupt for event CALIBRATEDONE + 4 + 4 + + read + + Disabled + Read: Disabled + 0 + + + Enabled + Read: Enabled + 1 + + + + write + + Clear + Disable + 1 + + + + + STOPPED + Write '1' to disable interrupt for event STOPPED + 5 + 5 + + read + + Disabled + Read: Disabled + 0 + + + Enabled + Read: Enabled + 1 + + + + write + + Clear + Disable + 1 + + + + + CH0LIMITH + Write '1' to disable interrupt for event CH0LIMITH + 6 + 6 + + read + + Disabled + Read: Disabled + 0 + + + Enabled + Read: Enabled + 1 + + + + write + + Clear + Disable + 1 + + + + + CH0LIMITL + Write '1' to disable interrupt for event CH0LIMITL + 7 + 7 + + read + + Disabled + Read: Disabled + 0 + + + Enabled + Read: Enabled + 1 + + + + write + + Clear + Disable + 1 + + + + + CH1LIMITH + Write '1' to disable interrupt for event CH1LIMITH + 8 + 8 + + read + + Disabled + Read: Disabled + 0 + + + Enabled + Read: Enabled + 1 + + + + write + + Clear + Disable + 1 + + + + + CH1LIMITL + Write '1' to disable interrupt for event CH1LIMITL + 9 + 9 + + read + + Disabled + Read: Disabled + 0 + + + Enabled + Read: Enabled + 1 + + + + write + + Clear + Disable + 1 + + + + + CH2LIMITH + Write '1' to disable interrupt for event CH2LIMITH + 10 + 10 + + read + + Disabled + Read: Disabled + 0 + + + Enabled + Read: Enabled + 1 + + + + write + + Clear + Disable + 1 + + + + + CH2LIMITL + Write '1' to disable interrupt for event CH2LIMITL + 11 + 11 + + read + + Disabled + Read: Disabled + 0 + + + Enabled + Read: Enabled + 1 + + + + write + + Clear + Disable + 1 + + + + + CH3LIMITH + Write '1' to disable interrupt for event CH3LIMITH + 12 + 12 + + read + + Disabled + Read: Disabled + 0 + + + Enabled + Read: Enabled + 1 + + + + write + + Clear + Disable + 1 + + + + + CH3LIMITL + Write '1' to disable interrupt for event CH3LIMITL + 13 + 13 + + read + + Disabled + Read: Disabled + 0 + + + Enabled + Read: Enabled + 1 + + + + write + + Clear + Disable + 1 + + + + + CH4LIMITH + Write '1' to disable interrupt for event CH4LIMITH + 14 + 14 + + read + + Disabled + Read: Disabled + 0 + + + Enabled + Read: Enabled + 1 + + + + write + + Clear + Disable + 1 + + + + + CH4LIMITL + Write '1' to disable interrupt for event CH4LIMITL + 15 + 15 + + read + + Disabled + Read: Disabled + 0 + + + Enabled + Read: Enabled + 1 + + + + write + + Clear + Disable + 1 + + + + + CH5LIMITH + Write '1' to disable interrupt for event CH5LIMITH + 16 + 16 + + read + + Disabled + Read: Disabled + 0 + + + Enabled + Read: Enabled + 1 + + + + write + + Clear + Disable + 1 + + + + + CH5LIMITL + Write '1' to disable interrupt for event CH5LIMITL + 17 + 17 + + read + + Disabled + Read: Disabled + 0 + + + Enabled + Read: Enabled + 1 + + + + write + + Clear + Disable + 1 + + + + + CH6LIMITH + Write '1' to disable interrupt for event CH6LIMITH + 18 + 18 + + read + + Disabled + Read: Disabled + 0 + + + Enabled + Read: Enabled + 1 + + + + write + + Clear + Disable + 1 + + + + + CH6LIMITL + Write '1' to disable interrupt for event CH6LIMITL + 19 + 19 + + read + + Disabled + Read: Disabled + 0 + + + Enabled + Read: Enabled + 1 + + + + write + + Clear + Disable + 1 + + + + + CH7LIMITH + Write '1' to disable interrupt for event CH7LIMITH + 20 + 20 + + read + + Disabled + Read: Disabled + 0 + + + Enabled + Read: Enabled + 1 + + + + write + + Clear + Disable + 1 + + + + + CH7LIMITL + Write '1' to disable interrupt for event CH7LIMITL + 21 + 21 + + read + + Disabled + Read: Disabled + 0 + + + Enabled + Read: Enabled + 1 + + + + write + + Clear + Disable + 1 + + + + + + + STATUS + Status + 0x400 + read-only + + + STATUS + Status + 0 + 0 + + + Ready + ADC is ready. No on-going conversion. + 0 + + + Busy + ADC is busy. Conversion in progress. + 1 + + + + + + + ENABLE + Enable or disable ADC + 0x500 + read-write + + + ENABLE + Enable or disable ADC + 0 + 0 + + + Disabled + Disable ADC + 0 + + + Enabled + Enable ADC + 1 + + + + + + + 8 + 0x010 + CH[%s] + Unspecified + SAADC_CH + read-write + 0x510 + + PSELP + Description cluster: Input positive pin selection for CH[n] + 0x000 + read-write + 0x00000000 + + + PSELP + Analog positive input channel + 0 + 4 + + + NC + Not connected + 0 + + + AnalogInput0 + AIN0 + 1 + + + AnalogInput1 + AIN1 + 2 + + + AnalogInput2 + AIN2 + 3 + + + AnalogInput3 + AIN3 + 4 + + + AnalogInput4 + AIN4 + 5 + + + AnalogInput5 + AIN5 + 6 + + + AnalogInput6 + AIN6 + 7 + + + AnalogInput7 + AIN7 + 8 + + + VDD + VDD + 9 + + + + + + + PSELN + Description cluster: Input negative pin selection for CH[n] + 0x004 + read-write + 0x00000000 + + + PSELN + Analog negative input, enables differential channel + 0 + 4 + + + NC + Not connected + 0 + + + AnalogInput0 + AIN0 + 1 + + + AnalogInput1 + AIN1 + 2 + + + AnalogInput2 + AIN2 + 3 + + + AnalogInput3 + AIN3 + 4 + + + AnalogInput4 + AIN4 + 5 + + + AnalogInput5 + AIN5 + 6 + + + AnalogInput6 + AIN6 + 7 + + + AnalogInput7 + AIN7 + 8 + + + VDD + VDD + 9 + + + + + + + CONFIG + Description cluster: Input configuration for CH[n] + 0x008 + read-write + 0x00020000 + + + RESP + Positive channel resistor control + 0 + 1 + + + Bypass + Bypass resistor ladder + 0 + + + Pulldown + Pull-down to GND + 1 + + + Pullup + Pull-up to VDD + 2 + + + VDD1_2 + Set input at VDD/2 + 3 + + + + + RESN + Negative channel resistor control + 4 + 5 + + + Bypass + Bypass resistor ladder + 0 + + + Pulldown + Pull-down to GND + 1 + + + Pullup + Pull-up to VDD + 2 + + + VDD1_2 + Set input at VDD/2 + 3 + + + + + GAIN + Gain control + 8 + 10 + + + Gain1_6 + 1/6 + 0 + + + Gain1_5 + 1/5 + 1 + + + Gain1_4 + 1/4 + 2 + + + Gain1_3 + 1/3 + 3 + + + Gain1_2 + 1/2 + 4 + + + Gain1 + 1 + 5 + + + Gain2 + 2 + 6 + + + Gain4 + 4 + 7 + + + + + REFSEL + Reference control + 12 + 12 + + + Internal + Internal reference (0.6 V) + 0 + + + VDD1_4 + VDD/4 as reference + 1 + + + + + TACQ + Acquisition time, the time the ADC uses to sample the input voltage + 16 + 18 + + + 3us + 3 us + 0 + + + 5us + 5 us + 1 + + + 10us + 10 us + 2 + + + 15us + 15 us + 3 + + + 20us + 20 us + 4 + + + 40us + 40 us + 5 + + + + + MODE + Enable differential mode + 20 + 20 + + + SE + Single ended, PSELN will be ignored, negative input to ADC shorted to GND + 0 + + + Diff + Differential + 1 + + + + + BURST + Enable burst mode + 24 + 24 + + + Disabled + Burst mode is disabled (normal operation) + 0 + + + Enabled + Burst mode is enabled. SAADC takes 2^OVERSAMPLE number of samples as fast as it can, and sends the average to Data RAM. + 1 + + + + + + + LIMIT + Description cluster: High/low limits for event monitoring a channel + 0x00C + read-write + 0x7FFF8000 + + + LOW + Low level limit + 0 + 15 + + + HIGH + High level limit + 16 + 31 + + + + + + RESOLUTION + Resolution configuration + 0x5F0 + read-write + 0x00000001 + + + VAL + Set the resolution + 0 + 2 + + + 8bit + 8 bit + 0 + + + 10bit + 10 bit + 1 + + + 12bit + 12 bit + 2 + + + 14bit + 14 bit + 3 + + + + + + + OVERSAMPLE + Oversampling configuration. OVERSAMPLE should not be combined with SCAN. The RESOLUTION is applied before averaging, thus for high OVERSAMPLE a higher RESOLUTION should be used. + 0x5F4 + read-write + + + OVERSAMPLE + Oversample control + 0 + 3 + + + Bypass + Bypass oversampling + 0 + + + Over2x + Oversample 2x + 1 + + + Over4x + Oversample 4x + 2 + + + Over8x + Oversample 8x + 3 + + + Over16x + Oversample 16x + 4 + + + Over32x + Oversample 32x + 5 + + + Over64x + Oversample 64x + 6 + + + Over128x + Oversample 128x + 7 + + + Over256x + Oversample 256x + 8 + + + + + + + SAMPLERATE + Controls normal or continuous sample rate + 0x5F8 + read-write + + + CC + Capture and compare value. Sample rate is 16 MHz/CC + 0 + 10 + + + MODE + Select mode for sample rate control + 12 + 12 + + + Task + Rate is controlled from SAMPLE task + 0 + + + Timers + Rate is controlled from local timer (use CC to control the rate) + 1 + + + + + + + RESULT + RESULT EasyDMA channel + SAADC_RESULT + read-write + 0x62C + + PTR + Data pointer + 0x000 + read-write + + + PTR + Data pointer + 0 + 31 + + + + + MAXCNT + Maximum number of buffer words to transfer + 0x004 + read-write + + + MAXCNT + Maximum number of buffer words to transfer + 0 + 14 + + + + + AMOUNT + Number of buffer words transferred since last START + 0x008 + read-only + + + AMOUNT + Number of buffer words transferred since last START. This register can be read after an END or STOPPED event. + 0 + 14 + + + + + + + + TIMER0 + Timer/Counter 0 + 0x40008000 + TIMER + + 0 + 0x1000 + registers + + + TIMER0 + 8 + + TIMER + 0x20 + + + TASKS_START + Start Timer + 0x000 + write-only + + + TASKS_START + Start Timer + 0 + 0 + + + Trigger + Trigger task + 1 + + + + + + + TASKS_STOP + Stop Timer + 0x004 + write-only + + + TASKS_STOP + Stop Timer + 0 + 0 + + + Trigger + Trigger task + 1 + + + + + + + TASKS_COUNT + Increment Timer (Counter mode only) + 0x008 + write-only + + + TASKS_COUNT + Increment Timer (Counter mode only) + 0 + 0 + + + Trigger + Trigger task + 1 + + + + + + + TASKS_CLEAR + Clear time + 0x00C + write-only + + + TASKS_CLEAR + Clear time + 0 + 0 + + + Trigger + Trigger task + 1 + + + + + + + TASKS_SHUTDOWN + Deprecated register - Shut down timer + 0x010 + write-only + + + TASKS_SHUTDOWN + Deprecated field - Shut down timer + 0 + 0 + + + Trigger + Trigger task + 1 + + + + + + + 0x6 + 0x4 + TASKS_CAPTURE[%s] + Description collection: Capture Timer value to CC[n] register + 0x040 + write-only + + + TASKS_CAPTURE + Capture Timer value to CC[n] register + 0 + 0 + + + Trigger + Trigger task + 1 + + + + + + + 0x6 + 0x4 + EVENTS_COMPARE[%s] + Description collection: Compare event on CC[n] match + 0x140 + read-write + + + EVENTS_COMPARE + Compare event on CC[n] match + 0 + 0 + + + NotGenerated + Event not generated + 0 + + + Generated + Event generated + 1 + + + + + + + SHORTS + Shortcuts between local events and tasks + 0x200 + read-write + + + COMPARE0_CLEAR + Shortcut between event COMPARE[0] and task CLEAR + 0 + 0 + + + Disabled + Disable shortcut + 0 + + + Enabled + Enable shortcut + 1 + + + + + COMPARE1_CLEAR + Shortcut between event COMPARE[1] and task CLEAR + 1 + 1 + + + Disabled + Disable shortcut + 0 + + + Enabled + Enable shortcut + 1 + + + + + COMPARE2_CLEAR + Shortcut between event COMPARE[2] and task CLEAR + 2 + 2 + + + Disabled + Disable shortcut + 0 + + + Enabled + Enable shortcut + 1 + + + + + COMPARE3_CLEAR + Shortcut between event COMPARE[3] and task CLEAR + 3 + 3 + + + Disabled + Disable shortcut + 0 + + + Enabled + Enable shortcut + 1 + + + + + COMPARE4_CLEAR + Shortcut between event COMPARE[4] and task CLEAR + 4 + 4 + + + Disabled + Disable shortcut + 0 + + + Enabled + Enable shortcut + 1 + + + + + COMPARE5_CLEAR + Shortcut between event COMPARE[5] and task CLEAR + 5 + 5 + + + Disabled + Disable shortcut + 0 + + + Enabled + Enable shortcut + 1 + + + + + COMPARE0_STOP + Shortcut between event COMPARE[0] and task STOP + 8 + 8 + + + Disabled + Disable shortcut + 0 + + + Enabled + Enable shortcut + 1 + + + + + COMPARE1_STOP + Shortcut between event COMPARE[1] and task STOP + 9 + 9 + + + Disabled + Disable shortcut + 0 + + + Enabled + Enable shortcut + 1 + + + + + COMPARE2_STOP + Shortcut between event COMPARE[2] and task STOP + 10 + 10 + + + Disabled + Disable shortcut + 0 + + + Enabled + Enable shortcut + 1 + + + + + COMPARE3_STOP + Shortcut between event COMPARE[3] and task STOP + 11 + 11 + + + Disabled + Disable shortcut + 0 + + + Enabled + Enable shortcut + 1 + + + + + COMPARE4_STOP + Shortcut between event COMPARE[4] and task STOP + 12 + 12 + + + Disabled + Disable shortcut + 0 + + + Enabled + Enable shortcut + 1 + + + + + COMPARE5_STOP + Shortcut between event COMPARE[5] and task STOP + 13 + 13 + + + Disabled + Disable shortcut + 0 + + + Enabled + Enable shortcut + 1 + + + + + + + INTENSET + Enable interrupt + 0x304 + read-write + + + COMPARE0 + Write '1' to enable interrupt for event COMPARE[0] + 16 + 16 + + read + + Disabled + Read: Disabled + 0 + + + Enabled + Read: Enabled + 1 + + + + write + + Set + Enable + 1 + + + + + COMPARE1 + Write '1' to enable interrupt for event COMPARE[1] + 17 + 17 + + read + + Disabled + Read: Disabled + 0 + + + Enabled + Read: Enabled + 1 + + + + write + + Set + Enable + 1 + + + + + COMPARE2 + Write '1' to enable interrupt for event COMPARE[2] + 18 + 18 + + read + + Disabled + Read: Disabled + 0 + + + Enabled + Read: Enabled + 1 + + + + write + + Set + Enable + 1 + + + + + COMPARE3 + Write '1' to enable interrupt for event COMPARE[3] + 19 + 19 + + read + + Disabled + Read: Disabled + 0 + + + Enabled + Read: Enabled + 1 + + + + write + + Set + Enable + 1 + + + + + COMPARE4 + Write '1' to enable interrupt for event COMPARE[4] + 20 + 20 + + read + + Disabled + Read: Disabled + 0 + + + Enabled + Read: Enabled + 1 + + + + write + + Set + Enable + 1 + + + + + COMPARE5 + Write '1' to enable interrupt for event COMPARE[5] + 21 + 21 + + read + + Disabled + Read: Disabled + 0 + + + Enabled + Read: Enabled + 1 + + + + write + + Set + Enable + 1 + + + + + + + INTENCLR + Disable interrupt + 0x308 + read-write + + + COMPARE0 + Write '1' to disable interrupt for event COMPARE[0] + 16 + 16 + + read + + Disabled + Read: Disabled + 0 + + + Enabled + Read: Enabled + 1 + + + + write + + Clear + Disable + 1 + + + + + COMPARE1 + Write '1' to disable interrupt for event COMPARE[1] + 17 + 17 + + read + + Disabled + Read: Disabled + 0 + + + Enabled + Read: Enabled + 1 + + + + write + + Clear + Disable + 1 + + + + + COMPARE2 + Write '1' to disable interrupt for event COMPARE[2] + 18 + 18 + + read + + Disabled + Read: Disabled + 0 + + + Enabled + Read: Enabled + 1 + + + + write + + Clear + Disable + 1 + + + + + COMPARE3 + Write '1' to disable interrupt for event COMPARE[3] + 19 + 19 + + read + + Disabled + Read: Disabled + 0 + + + Enabled + Read: Enabled + 1 + + + + write + + Clear + Disable + 1 + + + + + COMPARE4 + Write '1' to disable interrupt for event COMPARE[4] + 20 + 20 + + read + + Disabled + Read: Disabled + 0 + + + Enabled + Read: Enabled + 1 + + + + write + + Clear + Disable + 1 + + + + + COMPARE5 + Write '1' to disable interrupt for event COMPARE[5] + 21 + 21 + + read + + Disabled + Read: Disabled + 0 + + + Enabled + Read: Enabled + 1 + + + + write + + Clear + Disable + 1 + + + + + + + MODE + Timer mode selection + 0x504 + read-write + + + MODE + Timer mode + 0 + 1 + + + Timer + Select Timer mode + 0 + + + Counter + Deprecated enumerator - Select Counter mode + 1 + + + LowPowerCounter + Select Low Power Counter mode + 2 + + + + + + + BITMODE + Configure the number of bits used by the TIMER + 0x508 + read-write + + + BITMODE + Timer bit width + 0 + 1 + + + 16Bit + 16 bit timer bit width + 0 + + + 08Bit + 8 bit timer bit width + 1 + + + 24Bit + 24 bit timer bit width + 2 + + + 32Bit + 32 bit timer bit width + 3 + + + + + + + PRESCALER + Timer prescaler register + 0x510 + read-write + 0x00000004 + + + PRESCALER + Prescaler value + 0 + 3 + + + + + 0x6 + 0x4 + CC[%s] + Description collection: Capture/Compare register n + 0x540 + read-write + + + CC + Capture/Compare value + 0 + 31 + + + + + + + TIMER1 + Timer/Counter 1 + 0x40009000 + + TIMER1 + 9 + + + + TIMER2 + Timer/Counter 2 + 0x4000A000 + + TIMER2 + 10 + + + + RTC0 + Real time counter 0 + 0x4000B000 + RTC + + 0 + 0x1000 + registers + + + RTC0 + 11 + + RTC + 0x20 + + + TASKS_START + Start RTC COUNTER + 0x000 + write-only + + + TASKS_START + Start RTC COUNTER + 0 + 0 + + + Trigger + Trigger task + 1 + + + + + + + TASKS_STOP + Stop RTC COUNTER + 0x004 + write-only + + + TASKS_STOP + Stop RTC COUNTER + 0 + 0 + + + Trigger + Trigger task + 1 + + + + + + + TASKS_CLEAR + Clear RTC COUNTER + 0x008 + write-only + + + TASKS_CLEAR + Clear RTC COUNTER + 0 + 0 + + + Trigger + Trigger task + 1 + + + + + + + TASKS_TRIGOVRFLW + Set COUNTER to 0xFFFFF0 + 0x00C + write-only + + + TASKS_TRIGOVRFLW + Set COUNTER to 0xFFFFF0 + 0 + 0 + + + Trigger + Trigger task + 1 + + + + + + + EVENTS_TICK + Event on COUNTER increment + 0x100 + read-write + + + EVENTS_TICK + Event on COUNTER increment + 0 + 0 + + + NotGenerated + Event not generated + 0 + + + Generated + Event generated + 1 + + + + + + + EVENTS_OVRFLW + Event on COUNTER overflow + 0x104 + read-write + + + EVENTS_OVRFLW + Event on COUNTER overflow + 0 + 0 + + + NotGenerated + Event not generated + 0 + + + Generated + Event generated + 1 + + + + + + + 0x4 + 0x4 + EVENTS_COMPARE[%s] + Description collection: Compare event on CC[n] match + 0x140 + read-write + + + EVENTS_COMPARE + Compare event on CC[n] match + 0 + 0 + + + NotGenerated + Event not generated + 0 + + + Generated + Event generated + 1 + + + + + + + INTENSET + Enable interrupt + 0x304 + read-write + + + TICK + Write '1' to enable interrupt for event TICK + 0 + 0 + + read + + Disabled + Read: Disabled + 0 + + + Enabled + Read: Enabled + 1 + + + + write + + Set + Enable + 1 + + + + + OVRFLW + Write '1' to enable interrupt for event OVRFLW + 1 + 1 + + read + + Disabled + Read: Disabled + 0 + + + Enabled + Read: Enabled + 1 + + + + write + + Set + Enable + 1 + + + + + COMPARE0 + Write '1' to enable interrupt for event COMPARE[0] + 16 + 16 + + read + + Disabled + Read: Disabled + 0 + + + Enabled + Read: Enabled + 1 + + + + write + + Set + Enable + 1 + + + + + COMPARE1 + Write '1' to enable interrupt for event COMPARE[1] + 17 + 17 + + read + + Disabled + Read: Disabled + 0 + + + Enabled + Read: Enabled + 1 + + + + write + + Set + Enable + 1 + + + + + COMPARE2 + Write '1' to enable interrupt for event COMPARE[2] + 18 + 18 + + read + + Disabled + Read: Disabled + 0 + + + Enabled + Read: Enabled + 1 + + + + write + + Set + Enable + 1 + + + + + COMPARE3 + Write '1' to enable interrupt for event COMPARE[3] + 19 + 19 + + read + + Disabled + Read: Disabled + 0 + + + Enabled + Read: Enabled + 1 + + + + write + + Set + Enable + 1 + + + + + + + INTENCLR + Disable interrupt + 0x308 + read-write + + + TICK + Write '1' to disable interrupt for event TICK + 0 + 0 + + read + + Disabled + Read: Disabled + 0 + + + Enabled + Read: Enabled + 1 + + + + write + + Clear + Disable + 1 + + + + + OVRFLW + Write '1' to disable interrupt for event OVRFLW + 1 + 1 + + read + + Disabled + Read: Disabled + 0 + + + Enabled + Read: Enabled + 1 + + + + write + + Clear + Disable + 1 + + + + + COMPARE0 + Write '1' to disable interrupt for event COMPARE[0] + 16 + 16 + + read + + Disabled + Read: Disabled + 0 + + + Enabled + Read: Enabled + 1 + + + + write + + Clear + Disable + 1 + + + + + COMPARE1 + Write '1' to disable interrupt for event COMPARE[1] + 17 + 17 + + read + + Disabled + Read: Disabled + 0 + + + Enabled + Read: Enabled + 1 + + + + write + + Clear + Disable + 1 + + + + + COMPARE2 + Write '1' to disable interrupt for event COMPARE[2] + 18 + 18 + + read + + Disabled + Read: Disabled + 0 + + + Enabled + Read: Enabled + 1 + + + + write + + Clear + Disable + 1 + + + + + COMPARE3 + Write '1' to disable interrupt for event COMPARE[3] + 19 + 19 + + read + + Disabled + Read: Disabled + 0 + + + Enabled + Read: Enabled + 1 + + + + write + + Clear + Disable + 1 + + + + + + + EVTEN + Enable or disable event routing + 0x340 + read-write + + + TICK + Enable or disable event routing for event TICK + 0 + 0 + + + Disabled + Disable + 0 + + + Enabled + Enable + 1 + + + + + OVRFLW + Enable or disable event routing for event OVRFLW + 1 + 1 + + + Disabled + Disable + 0 + + + Enabled + Enable + 1 + + + + + COMPARE0 + Enable or disable event routing for event COMPARE[0] + 16 + 16 + + + Disabled + Disable + 0 + + + Enabled + Enable + 1 + + + + + COMPARE1 + Enable or disable event routing for event COMPARE[1] + 17 + 17 + + + Disabled + Disable + 0 + + + Enabled + Enable + 1 + + + + + COMPARE2 + Enable or disable event routing for event COMPARE[2] + 18 + 18 + + + Disabled + Disable + 0 + + + Enabled + Enable + 1 + + + + + COMPARE3 + Enable or disable event routing for event COMPARE[3] + 19 + 19 + + + Disabled + Disable + 0 + + + Enabled + Enable + 1 + + + + + + + EVTENSET + Enable event routing + 0x344 + read-write + + + TICK + Write '1' to enable event routing for event TICK + 0 + 0 + + read + + Disabled + Read: Disabled + 0 + + + Enabled + Read: Enabled + 1 + + + + write + + Set + Enable + 1 + + + + + OVRFLW + Write '1' to enable event routing for event OVRFLW + 1 + 1 + + read + + Disabled + Read: Disabled + 0 + + + Enabled + Read: Enabled + 1 + + + + write + + Set + Enable + 1 + + + + + COMPARE0 + Write '1' to enable event routing for event COMPARE[0] + 16 + 16 + + read + + Disabled + Read: Disabled + 0 + + + Enabled + Read: Enabled + 1 + + + + write + + Set + Enable + 1 + + + + + COMPARE1 + Write '1' to enable event routing for event COMPARE[1] + 17 + 17 + + read + + Disabled + Read: Disabled + 0 + + + Enabled + Read: Enabled + 1 + + + + write + + Set + Enable + 1 + + + + + COMPARE2 + Write '1' to enable event routing for event COMPARE[2] + 18 + 18 + + read + + Disabled + Read: Disabled + 0 + + + Enabled + Read: Enabled + 1 + + + + write + + Set + Enable + 1 + + + + + COMPARE3 + Write '1' to enable event routing for event COMPARE[3] + 19 + 19 + + read + + Disabled + Read: Disabled + 0 + + + Enabled + Read: Enabled + 1 + + + + write + + Set + Enable + 1 + + + + + + + EVTENCLR + Disable event routing + 0x348 + read-write + + + TICK + Write '1' to disable event routing for event TICK + 0 + 0 + + read + + Disabled + Read: Disabled + 0 + + + Enabled + Read: Enabled + 1 + + + + write + + Clear + Disable + 1 + + + + + OVRFLW + Write '1' to disable event routing for event OVRFLW + 1 + 1 + + read + + Disabled + Read: Disabled + 0 + + + Enabled + Read: Enabled + 1 + + + + write + + Clear + Disable + 1 + + + + + COMPARE0 + Write '1' to disable event routing for event COMPARE[0] + 16 + 16 + + read + + Disabled + Read: Disabled + 0 + + + Enabled + Read: Enabled + 1 + + + + write + + Clear + Disable + 1 + + + + + COMPARE1 + Write '1' to disable event routing for event COMPARE[1] + 17 + 17 + + read + + Disabled + Read: Disabled + 0 + + + Enabled + Read: Enabled + 1 + + + + write + + Clear + Disable + 1 + + + + + COMPARE2 + Write '1' to disable event routing for event COMPARE[2] + 18 + 18 + + read + + Disabled + Read: Disabled + 0 + + + Enabled + Read: Enabled + 1 + + + + write + + Clear + Disable + 1 + + + + + COMPARE3 + Write '1' to disable event routing for event COMPARE[3] + 19 + 19 + + read + + Disabled + Read: Disabled + 0 + + + Enabled + Read: Enabled + 1 + + + + write + + Clear + Disable + 1 + + + + + + + COUNTER + Current COUNTER value + 0x504 + read-only + + + COUNTER + Counter value + 0 + 23 + + + + + PRESCALER + 12 bit prescaler for COUNTER frequency (32768/(PRESCALER+1)).Must be written when RTC is stopped + 0x508 + read-write + + + PRESCALER + Prescaler value + 0 + 11 + + + + + 0x4 + 0x4 + CC[%s] + Description collection: Compare register n + 0x540 + read-write + + + COMPARE + Compare value + 0 + 23 + + + + + + + TEMP + Temperature Sensor + 0x4000C000 + + 0 + 0x1000 + registers + + + TEMP + 12 + + TEMP + 0x20 + + + TASKS_START + Start temperature measurement + 0x000 + write-only + + + TASKS_START + Start temperature measurement + 0 + 0 + + + Trigger + Trigger task + 1 + + + + + + + TASKS_STOP + Stop temperature measurement + 0x004 + write-only + + + TASKS_STOP + Stop temperature measurement + 0 + 0 + + + Trigger + Trigger task + 1 + + + + + + + EVENTS_DATARDY + Temperature measurement complete, data ready + 0x100 + read-write + + + EVENTS_DATARDY + Temperature measurement complete, data ready + 0 + 0 + + + NotGenerated + Event not generated + 0 + + + Generated + Event generated + 1 + + + + + + + INTENSET + Enable interrupt + 0x304 + read-write + + + DATARDY + Write '1' to enable interrupt for event DATARDY + 0 + 0 + + read + + Disabled + Read: Disabled + 0 + + + Enabled + Read: Enabled + 1 + + + + write + + Set + Enable + 1 + + + + + + + INTENCLR + Disable interrupt + 0x308 + read-write + + + DATARDY + Write '1' to disable interrupt for event DATARDY + 0 + 0 + + read + + Disabled + Read: Disabled + 0 + + + Enabled + Read: Enabled + 1 + + + + write + + Clear + Disable + 1 + + + + + + + TEMP + Temperature in degC (0.25deg steps) + 0x508 + read-only + int32_t + + + TEMP + Temperature in degC (0.25deg steps) + 0 + 31 + + + + + A0 + Slope of 1st piece wise linear function + 0x520 + read-write + 0x00000320 + + + A0 + Slope of 1st piece wise linear function + 0 + 11 + + + + + A1 + Slope of 2nd piece wise linear function + 0x524 + read-write + 0x00000343 + + + A1 + Slope of 2nd piece wise linear function + 0 + 11 + + + + + A2 + Slope of 3rd piece wise linear function + 0x528 + read-write + 0x0000035D + + + A2 + Slope of 3rd piece wise linear function + 0 + 11 + + + + + A3 + Slope of 4th piece wise linear function + 0x52C + read-write + 0x00000400 + + + A3 + Slope of 4th piece wise linear function + 0 + 11 + + + + + A4 + Slope of 5th piece wise linear function + 0x530 + read-write + 0x0000047F + + + A4 + Slope of 5th piece wise linear function + 0 + 11 + + + + + A5 + Slope of 6th piece wise linear function + 0x534 + read-write + 0x0000037B + + + A5 + Slope of 6th piece wise linear function + 0 + 11 + + + + + B0 + y-intercept of 1st piece wise linear function + 0x540 + read-write + 0x00003FCC + + + B0 + y-intercept of 1st piece wise linear function + 0 + 13 + + + + + B1 + y-intercept of 2nd piece wise linear function + 0x544 + read-write + 0x00003F98 + + + B1 + y-intercept of 2nd piece wise linear function + 0 + 13 + + + + + B2 + y-intercept of 3rd piece wise linear function + 0x548 + read-write + 0x00003F98 + + + B2 + y-intercept of 3rd piece wise linear function + 0 + 13 + + + + + B3 + y-intercept of 4th piece wise linear function + 0x54C + read-write + 0x00000012 + + + B3 + y-intercept of 4th piece wise linear function + 0 + 13 + + + + + B4 + y-intercept of 5th piece wise linear function + 0x550 + read-write + 0x0000006A + + + B4 + y-intercept of 5th piece wise linear function + 0 + 13 + + + + + B5 + y-intercept of 6th piece wise linear function + 0x554 + read-write + 0x00003DD0 + + + B5 + y-intercept of 6th piece wise linear function + 0 + 13 + + + + + T0 + End point of 1st piece wise linear function + 0x560 + read-write + 0x000000E2 + + + T0 + End point of 1st piece wise linear function + 0 + 7 + + + + + T1 + End point of 2nd piece wise linear function + 0x564 + read-write + 0x00000000 + + + T1 + End point of 2nd piece wise linear function + 0 + 7 + + + + + T2 + End point of 3rd piece wise linear function + 0x568 + read-write + 0x00000014 + + + T2 + End point of 3rd piece wise linear function + 0 + 7 + + + + + T3 + End point of 4th piece wise linear function + 0x56C + read-write + 0x00000019 + + + T3 + End point of 4th piece wise linear function + 0 + 7 + + + + + T4 + End point of 5th piece wise linear function + 0x570 + read-write + 0x00000050 + + + T4 + End point of 5th piece wise linear function + 0 + 7 + + + + + + + RNG + Random Number Generator + 0x4000D000 + + 0 + 0x1000 + registers + + + RNG + 13 + + RNG + 0x20 + + + TASKS_START + Task starting the random number generator + 0x000 + write-only + + + TASKS_START + Task starting the random number generator + 0 + 0 + + + Trigger + Trigger task + 1 + + + + + + + TASKS_STOP + Task stopping the random number generator + 0x004 + write-only + + + TASKS_STOP + Task stopping the random number generator + 0 + 0 + + + Trigger + Trigger task + 1 + + + + + + + EVENTS_VALRDY + Event being generated for every new random number written to the VALUE register + 0x100 + read-write + + + EVENTS_VALRDY + Event being generated for every new random number written to the VALUE register + 0 + 0 + + + NotGenerated + Event not generated + 0 + + + Generated + Event generated + 1 + + + + + + + SHORTS + Shortcuts between local events and tasks + 0x200 + read-write + + + VALRDY_STOP + Shortcut between event VALRDY and task STOP + 0 + 0 + + + Disabled + Disable shortcut + 0 + + + Enabled + Enable shortcut + 1 + + + + + + + INTENSET + Enable interrupt + 0x304 + read-write + + + VALRDY + Write '1' to enable interrupt for event VALRDY + 0 + 0 + + read + + Disabled + Read: Disabled + 0 + + + Enabled + Read: Enabled + 1 + + + + write + + Set + Enable + 1 + + + + + + + INTENCLR + Disable interrupt + 0x308 + read-write + + + VALRDY + Write '1' to disable interrupt for event VALRDY + 0 + 0 + + read + + Disabled + Read: Disabled + 0 + + + Enabled + Read: Enabled + 1 + + + + write + + Clear + Disable + 1 + + + + + + + CONFIG + Configuration register + 0x504 + read-write + + + DERCEN + Bias correction + 0 + 0 + + + Disabled + Disabled + 0 + + + Enabled + Enabled + 1 + + + + + + + VALUE + Output random number + 0x508 + read-only + + + VALUE + Generated random number + 0 + 7 + + + + + + + ECB + AES ECB Mode Encryption + 0x4000E000 + + 0 + 0x1000 + registers + + + ECB + 14 + + ECB + 0x20 + + + TASKS_STARTECB + Start ECB block encrypt + 0x000 + write-only + + + TASKS_STARTECB + Start ECB block encrypt + 0 + 0 + + + Trigger + Trigger task + 1 + + + + + + + TASKS_STOPECB + Abort a possible executing ECB operation + 0x004 + write-only + + + TASKS_STOPECB + Abort a possible executing ECB operation + 0 + 0 + + + Trigger + Trigger task + 1 + + + + + + + EVENTS_ENDECB + ECB block encrypt complete + 0x100 + read-write + + + EVENTS_ENDECB + ECB block encrypt complete + 0 + 0 + + + NotGenerated + Event not generated + 0 + + + Generated + Event generated + 1 + + + + + + + EVENTS_ERRORECB + ECB block encrypt aborted because of a STOPECB task or due to an error + 0x104 + read-write + + + EVENTS_ERRORECB + ECB block encrypt aborted because of a STOPECB task or due to an error + 0 + 0 + + + NotGenerated + Event not generated + 0 + + + Generated + Event generated + 1 + + + + + + + INTENSET + Enable interrupt + 0x304 + read-write + + + ENDECB + Write '1' to enable interrupt for event ENDECB + 0 + 0 + + read + + Disabled + Read: Disabled + 0 + + + Enabled + Read: Enabled + 1 + + + + write + + Set + Enable + 1 + + + + + ERRORECB + Write '1' to enable interrupt for event ERRORECB + 1 + 1 + + read + + Disabled + Read: Disabled + 0 + + + Enabled + Read: Enabled + 1 + + + + write + + Set + Enable + 1 + + + + + + + INTENCLR + Disable interrupt + 0x308 + read-write + + + ENDECB + Write '1' to disable interrupt for event ENDECB + 0 + 0 + + read + + Disabled + Read: Disabled + 0 + + + Enabled + Read: Enabled + 1 + + + + write + + Clear + Disable + 1 + + + + + ERRORECB + Write '1' to disable interrupt for event ERRORECB + 1 + 1 + + read + + Disabled + Read: Disabled + 0 + + + Enabled + Read: Enabled + 1 + + + + write + + Clear + Disable + 1 + + + + + + + ECBDATAPTR + ECB block encrypt memory pointers + 0x504 + read-write + + + ECBDATAPTR + Pointer to the ECB data structure (see Table 1 ECB data structure overview) + 0 + 31 + + + + + + + AAR + Accelerated Address Resolver + 0x4000F000 + + 0 + 0x1000 + registers + + + CCM_AAR + 15 + + AAR + 0x20 + + + TASKS_START + Start resolving addresses based on IRKs specified in the IRK data structure + 0x000 + write-only + + + TASKS_START + Start resolving addresses based on IRKs specified in the IRK data structure + 0 + 0 + + + Trigger + Trigger task + 1 + + + + + + + TASKS_STOP + Stop resolving addresses + 0x008 + write-only + + + TASKS_STOP + Stop resolving addresses + 0 + 0 + + + Trigger + Trigger task + 1 + + + + + + + EVENTS_END + Address resolution procedure complete + 0x100 + read-write + + + EVENTS_END + Address resolution procedure complete + 0 + 0 + + + NotGenerated + Event not generated + 0 + + + Generated + Event generated + 1 + + + + + + + EVENTS_RESOLVED + Address resolved + 0x104 + read-write + + + EVENTS_RESOLVED + Address resolved + 0 + 0 + + + NotGenerated + Event not generated + 0 + + + Generated + Event generated + 1 + + + + + + + EVENTS_NOTRESOLVED + Address not resolved + 0x108 + read-write + + + EVENTS_NOTRESOLVED + Address not resolved + 0 + 0 + + + NotGenerated + Event not generated + 0 + + + Generated + Event generated + 1 + + + + + + + INTENSET + Enable interrupt + 0x304 + read-write + + + END + Write '1' to enable interrupt for event END + 0 + 0 + + read + + Disabled + Read: Disabled + 0 + + + Enabled + Read: Enabled + 1 + + + + write + + Set + Enable + 1 + + + + + RESOLVED + Write '1' to enable interrupt for event RESOLVED + 1 + 1 + + read + + Disabled + Read: Disabled + 0 + + + Enabled + Read: Enabled + 1 + + + + write + + Set + Enable + 1 + + + + + NOTRESOLVED + Write '1' to enable interrupt for event NOTRESOLVED + 2 + 2 + + read + + Disabled + Read: Disabled + 0 + + + Enabled + Read: Enabled + 1 + + + + write + + Set + Enable + 1 + + + + + + + INTENCLR + Disable interrupt + 0x308 + read-write + + + END + Write '1' to disable interrupt for event END + 0 + 0 + + read + + Disabled + Read: Disabled + 0 + + + Enabled + Read: Enabled + 1 + + + + write + + Clear + Disable + 1 + + + + + RESOLVED + Write '1' to disable interrupt for event RESOLVED + 1 + 1 + + read + + Disabled + Read: Disabled + 0 + + + Enabled + Read: Enabled + 1 + + + + write + + Clear + Disable + 1 + + + + + NOTRESOLVED + Write '1' to disable interrupt for event NOTRESOLVED + 2 + 2 + + read + + Disabled + Read: Disabled + 0 + + + Enabled + Read: Enabled + 1 + + + + write + + Clear + Disable + 1 + + + + + + + STATUS + Resolution status + 0x400 + read-only + + + STATUS + The IRK that was used last time an address was resolved + 0 + 3 + + + + + ENABLE + Enable AAR + 0x500 + read-write + + + ENABLE + Enable or disable AAR + 0 + 1 + + + Disabled + Disable + 0 + + + Enabled + Enable + 3 + + + + + + + NIRK + Number of IRKs + 0x504 + read-write + 0x00000001 + + + NIRK + Number of Identity root keys available in the IRK data structure + 0 + 4 + + + + + IRKPTR + Pointer to IRK data structure + 0x508 + read-write + + + IRKPTR + Pointer to the IRK data structure + 0 + 31 + + + + + ADDRPTR + Pointer to the resolvable address + 0x510 + read-write + + + ADDRPTR + Pointer to the resolvable address (6-bytes) + 0 + 31 + + + + + SCRATCHPTR + Pointer to data area used for temporary storage + 0x514 + read-write + + + SCRATCHPTR + Pointer to a scratch data area used for temporary storage during resolution.A space of minimum 3 bytes must be reserved. + 0 + 31 + + + + + + + CCM + AES CCM Mode Encryption + 0x4000F000 + AAR + + 0 + 0x1000 + registers + + + CCM_AAR + 15 + + CCM + 0x20 + + + TASKS_KSGEN + Start generation of key-stream. This operation will stop by itself when completed. + 0x000 + write-only + + + TASKS_KSGEN + Start generation of key-stream. This operation will stop by itself when completed. + 0 + 0 + + + Trigger + Trigger task + 1 + + + + + + + TASKS_CRYPT + Start encryption/decryption. This operation will stop by itself when completed. + 0x004 + write-only + + + TASKS_CRYPT + Start encryption/decryption. This operation will stop by itself when completed. + 0 + 0 + + + Trigger + Trigger task + 1 + + + + + + + TASKS_STOP + Stop encryption/decryption + 0x008 + write-only + + + TASKS_STOP + Stop encryption/decryption + 0 + 0 + + + Trigger + Trigger task + 1 + + + + + + + EVENTS_ENDKSGEN + Key-stream generation complete + 0x100 + read-write + + + EVENTS_ENDKSGEN + Key-stream generation complete + 0 + 0 + + + NotGenerated + Event not generated + 0 + + + Generated + Event generated + 1 + + + + + + + EVENTS_ENDCRYPT + Encrypt/decrypt complete + 0x104 + read-write + + + EVENTS_ENDCRYPT + Encrypt/decrypt complete + 0 + 0 + + + NotGenerated + Event not generated + 0 + + + Generated + Event generated + 1 + + + + + + + EVENTS_ERROR + CCM error event + 0x108 + read-write + + + EVENTS_ERROR + CCM error event + 0 + 0 + + + NotGenerated + Event not generated + 0 + + + Generated + Event generated + 1 + + + + + + + SHORTS + Shortcuts between local events and tasks + 0x200 + read-write + + + ENDKSGEN_CRYPT + Shortcut between event ENDKSGEN and task CRYPT + 0 + 0 + + + Disabled + Disable shortcut + 0 + + + Enabled + Enable shortcut + 1 + + + + + + + INTENSET + Enable interrupt + 0x304 + read-write + + + ENDKSGEN + Write '1' to enable interrupt for event ENDKSGEN + 0 + 0 + + read + + Disabled + Read: Disabled + 0 + + + Enabled + Read: Enabled + 1 + + + + write + + Set + Enable + 1 + + + + + ENDCRYPT + Write '1' to enable interrupt for event ENDCRYPT + 1 + 1 + + read + + Disabled + Read: Disabled + 0 + + + Enabled + Read: Enabled + 1 + + + + write + + Set + Enable + 1 + + + + + ERROR + Write '1' to enable interrupt for event ERROR + 2 + 2 + + read + + Disabled + Read: Disabled + 0 + + + Enabled + Read: Enabled + 1 + + + + write + + Set + Enable + 1 + + + + + + + INTENCLR + Disable interrupt + 0x308 + read-write + + + ENDKSGEN + Write '1' to disable interrupt for event ENDKSGEN + 0 + 0 + + read + + Disabled + Read: Disabled + 0 + + + Enabled + Read: Enabled + 1 + + + + write + + Clear + Disable + 1 + + + + + ENDCRYPT + Write '1' to disable interrupt for event ENDCRYPT + 1 + 1 + + read + + Disabled + Read: Disabled + 0 + + + Enabled + Read: Enabled + 1 + + + + write + + Clear + Disable + 1 + + + + + ERROR + Write '1' to disable interrupt for event ERROR + 2 + 2 + + read + + Disabled + Read: Disabled + 0 + + + Enabled + Read: Enabled + 1 + + + + write + + Clear + Disable + 1 + + + + + + + MICSTATUS + MIC check result + 0x400 + read-only + + + MICSTATUS + The result of the MIC check performed during the previous decryption operation + 0 + 0 + + + CheckFailed + MIC check failed + 0 + + + CheckPassed + MIC check passed + 1 + + + + + + + ENABLE + Enable + 0x500 + read-write + + + ENABLE + Enable or disable CCM + 0 + 1 + + + Disabled + Disable + 0 + + + Enabled + Enable + 2 + + + + + + + MODE + Operation mode + 0x504 + read-write + 0x00000001 + + + MODE + The mode of operation to be used + 0 + 0 + + + Encryption + AES CCM packet encryption mode + 0 + + + Decryption + AES CCM packet decryption mode + 1 + + + + + DATARATE + Data rate that the CCM shall run in synch with + 16 + 16 + + + 1Mbit + In synch with 1 Mbit data rate + 0 + + + 2Mbit + In synch with 2 Mbit data rate + 1 + + + + + LENGTH + Packet length configuration + 24 + 24 + + + Default + Default length. Effective length of LENGTH field is 5-bit + 0 + + + Extended + Extended length. Effective length of LENGTH field is 8-bit + 1 + + + + + + + CNFPTR + Pointer to data structure holding AES key and NONCE vector + 0x508 + read-write + + + CNFPTR + Pointer to the data structure holding the AES key and the CCM NONCE vector (see Table 1 CCM data structure overview) + 0 + 31 + + + + + INPTR + Input pointer + 0x50C + read-write + + + INPTR + Input pointer + 0 + 31 + + + + + OUTPTR + Output pointer + 0x510 + read-write + + + OUTPTR + Output pointer + 0 + 31 + + + + + SCRATCHPTR + Pointer to data area used for temporary storage + 0x514 + read-write + + + SCRATCHPTR + Pointer to a scratch data area used for temporary storage during key-stream generation, + MIC generation and encryption/decryption. + 0 + 31 + + + + + + + WDT + Watchdog Timer + 0x40010000 + + 0 + 0x1000 + registers + + + WDT + 16 + + WDT + 0x20 + + + TASKS_START + Start the watchdog + 0x000 + write-only + + + TASKS_START + Start the watchdog + 0 + 0 + + + Trigger + Trigger task + 1 + + + + + + + EVENTS_TIMEOUT + Watchdog timeout + 0x100 + read-write + + + EVENTS_TIMEOUT + Watchdog timeout + 0 + 0 + + + NotGenerated + Event not generated + 0 + + + Generated + Event generated + 1 + + + + + + + INTENSET + Enable interrupt + 0x304 + read-write + + + TIMEOUT + Write '1' to enable interrupt for event TIMEOUT + 0 + 0 + + read + + Disabled + Read: Disabled + 0 + + + Enabled + Read: Enabled + 1 + + + + write + + Set + Enable + 1 + + + + + + + INTENCLR + Disable interrupt + 0x308 + read-write + + + TIMEOUT + Write '1' to disable interrupt for event TIMEOUT + 0 + 0 + + read + + Disabled + Read: Disabled + 0 + + + Enabled + Read: Enabled + 1 + + + + write + + Clear + Disable + 1 + + + + + + + RUNSTATUS + Run status + 0x400 + read-only + + + RUNSTATUS + Indicates whether or not the watchdog is running + 0 + 0 + + + NotRunning + Watchdog not running + 0 + + + Running + Watchdog is running + 1 + + + + + + + REQSTATUS + Request status + 0x404 + read-only + 0x00000001 + + + RR0 + Request status for RR[0] register + 0 + 0 + + + DisabledOrRequested + RR[0] register is not enabled, or are already requesting reload + 0 + + + EnabledAndUnrequested + RR[0] register is enabled, and are not yet requesting reload + 1 + + + + + RR1 + Request status for RR[1] register + 1 + 1 + + + DisabledOrRequested + RR[1] register is not enabled, or are already requesting reload + 0 + + + EnabledAndUnrequested + RR[1] register is enabled, and are not yet requesting reload + 1 + + + + + RR2 + Request status for RR[2] register + 2 + 2 + + + DisabledOrRequested + RR[2] register is not enabled, or are already requesting reload + 0 + + + EnabledAndUnrequested + RR[2] register is enabled, and are not yet requesting reload + 1 + + + + + RR3 + Request status for RR[3] register + 3 + 3 + + + DisabledOrRequested + RR[3] register is not enabled, or are already requesting reload + 0 + + + EnabledAndUnrequested + RR[3] register is enabled, and are not yet requesting reload + 1 + + + + + RR4 + Request status for RR[4] register + 4 + 4 + + + DisabledOrRequested + RR[4] register is not enabled, or are already requesting reload + 0 + + + EnabledAndUnrequested + RR[4] register is enabled, and are not yet requesting reload + 1 + + + + + RR5 + Request status for RR[5] register + 5 + 5 + + + DisabledOrRequested + RR[5] register is not enabled, or are already requesting reload + 0 + + + EnabledAndUnrequested + RR[5] register is enabled, and are not yet requesting reload + 1 + + + + + RR6 + Request status for RR[6] register + 6 + 6 + + + DisabledOrRequested + RR[6] register is not enabled, or are already requesting reload + 0 + + + EnabledAndUnrequested + RR[6] register is enabled, and are not yet requesting reload + 1 + + + + + RR7 + Request status for RR[7] register + 7 + 7 + + + DisabledOrRequested + RR[7] register is not enabled, or are already requesting reload + 0 + + + EnabledAndUnrequested + RR[7] register is enabled, and are not yet requesting reload + 1 + + + + + + + CRV + Counter reload value + 0x504 + read-write + 0xFFFFFFFF + + + CRV + Counter reload value in number of cycles of the 32.768 kHz clock + 0 + 31 + + + + + RREN + Enable register for reload request registers + 0x508 + read-write + 0x00000001 + + + RR0 + Enable or disable RR[0] register + 0 + 0 + + + Disabled + Disable RR[0] register + 0 + + + Enabled + Enable RR[0] register + 1 + + + + + RR1 + Enable or disable RR[1] register + 1 + 1 + + + Disabled + Disable RR[1] register + 0 + + + Enabled + Enable RR[1] register + 1 + + + + + RR2 + Enable or disable RR[2] register + 2 + 2 + + + Disabled + Disable RR[2] register + 0 + + + Enabled + Enable RR[2] register + 1 + + + + + RR3 + Enable or disable RR[3] register + 3 + 3 + + + Disabled + Disable RR[3] register + 0 + + + Enabled + Enable RR[3] register + 1 + + + + + RR4 + Enable or disable RR[4] register + 4 + 4 + + + Disabled + Disable RR[4] register + 0 + + + Enabled + Enable RR[4] register + 1 + + + + + RR5 + Enable or disable RR[5] register + 5 + 5 + + + Disabled + Disable RR[5] register + 0 + + + Enabled + Enable RR[5] register + 1 + + + + + RR6 + Enable or disable RR[6] register + 6 + 6 + + + Disabled + Disable RR[6] register + 0 + + + Enabled + Enable RR[6] register + 1 + + + + + RR7 + Enable or disable RR[7] register + 7 + 7 + + + Disabled + Disable RR[7] register + 0 + + + Enabled + Enable RR[7] register + 1 + + + + + + + CONFIG + Configuration register + 0x50C + read-write + 0x00000001 + + + SLEEP + Configure the watchdog to either be paused, or kept running, while the CPU is sleeping + 0 + 0 + + + Pause + Pause watchdog while the CPU is sleeping + 0 + + + Run + Keep the watchdog running while the CPU is sleeping + 1 + + + + + HALT + Configure the watchdog to either be paused, or kept running, while the CPU is halted by the debugger + 3 + 3 + + + Pause + Pause watchdog while the CPU is halted by the debugger + 0 + + + Run + Keep the watchdog running while the CPU is halted by the debugger + 1 + + + + + + + 0x8 + 0x4 + RR[%s] + Description collection: Reload request n + 0x600 + write-only + + + RR + Reload request register + 0 + 31 + + + Reload + Value to request a reload of the watchdog timer + 0x6E524635 + + + + + + + + + RTC1 + Real time counter 1 + 0x40011000 + + RTC1 + 17 + + + + QDEC + Quadrature Decoder + 0x40012000 + + 0 + 0x1000 + registers + + + QDEC + 18 + + QDEC + 0x20 + + + TASKS_START + Task starting the quadrature decoder + 0x000 + write-only + + + TASKS_START + Task starting the quadrature decoder + 0 + 0 + + + Trigger + Trigger task + 1 + + + + + + + TASKS_STOP + Task stopping the quadrature decoder + 0x004 + write-only + + + TASKS_STOP + Task stopping the quadrature decoder + 0 + 0 + + + Trigger + Trigger task + 1 + + + + + + + TASKS_READCLRACC + Read and clear ACC and ACCDBL + 0x008 + write-only + + + TASKS_READCLRACC + Read and clear ACC and ACCDBL + 0 + 0 + + + Trigger + Trigger task + 1 + + + + + + + TASKS_RDCLRACC + Read and clear ACC + 0x00C + write-only + + + TASKS_RDCLRACC + Read and clear ACC + 0 + 0 + + + Trigger + Trigger task + 1 + + + + + + + TASKS_RDCLRDBL + Read and clear ACCDBL + 0x010 + write-only + + + TASKS_RDCLRDBL + Read and clear ACCDBL + 0 + 0 + + + Trigger + Trigger task + 1 + + + + + + + EVENTS_SAMPLERDY + Event being generated for every new sample value written to the SAMPLE register + 0x100 + read-write + + + EVENTS_SAMPLERDY + Event being generated for every new sample value written to the SAMPLE register + 0 + 0 + + + NotGenerated + Event not generated + 0 + + + Generated + Event generated + 1 + + + + + + + EVENTS_REPORTRDY + Non-null report ready + 0x104 + read-write + + + EVENTS_REPORTRDY + Non-null report ready + 0 + 0 + + + NotGenerated + Event not generated + 0 + + + Generated + Event generated + 1 + + + + + + + EVENTS_ACCOF + ACC or ACCDBL register overflow + 0x108 + read-write + + + EVENTS_ACCOF + ACC or ACCDBL register overflow + 0 + 0 + + + NotGenerated + Event not generated + 0 + + + Generated + Event generated + 1 + + + + + + + EVENTS_DBLRDY + Double displacement(s) detected + 0x10C + read-write + + + EVENTS_DBLRDY + Double displacement(s) detected + 0 + 0 + + + NotGenerated + Event not generated + 0 + + + Generated + Event generated + 1 + + + + + + + EVENTS_STOPPED + QDEC has been stopped + 0x110 + read-write + + + EVENTS_STOPPED + QDEC has been stopped + 0 + 0 + + + NotGenerated + Event not generated + 0 + + + Generated + Event generated + 1 + + + + + + + SHORTS + Shortcuts between local events and tasks + 0x200 + read-write + + + REPORTRDY_READCLRACC + Shortcut between event REPORTRDY and task READCLRACC + 0 + 0 + + + Disabled + Disable shortcut + 0 + + + Enabled + Enable shortcut + 1 + + + + + SAMPLERDY_STOP + Shortcut between event SAMPLERDY and task STOP + 1 + 1 + + + Disabled + Disable shortcut + 0 + + + Enabled + Enable shortcut + 1 + + + + + REPORTRDY_RDCLRACC + Shortcut between event REPORTRDY and task RDCLRACC + 2 + 2 + + + Disabled + Disable shortcut + 0 + + + Enabled + Enable shortcut + 1 + + + + + REPORTRDY_STOP + Shortcut between event REPORTRDY and task STOP + 3 + 3 + + + Disabled + Disable shortcut + 0 + + + Enabled + Enable shortcut + 1 + + + + + DBLRDY_RDCLRDBL + Shortcut between event DBLRDY and task RDCLRDBL + 4 + 4 + + + Disabled + Disable shortcut + 0 + + + Enabled + Enable shortcut + 1 + + + + + DBLRDY_STOP + Shortcut between event DBLRDY and task STOP + 5 + 5 + + + Disabled + Disable shortcut + 0 + + + Enabled + Enable shortcut + 1 + + + + + SAMPLERDY_READCLRACC + Shortcut between event SAMPLERDY and task READCLRACC + 6 + 6 + + + Disabled + Disable shortcut + 0 + + + Enabled + Enable shortcut + 1 + + + + + + + INTENSET + Enable interrupt + 0x304 + read-write + + + SAMPLERDY + Write '1' to enable interrupt for event SAMPLERDY + 0 + 0 + + read + + Disabled + Read: Disabled + 0 + + + Enabled + Read: Enabled + 1 + + + + write + + Set + Enable + 1 + + + + + REPORTRDY + Write '1' to enable interrupt for event REPORTRDY + 1 + 1 + + read + + Disabled + Read: Disabled + 0 + + + Enabled + Read: Enabled + 1 + + + + write + + Set + Enable + 1 + + + + + ACCOF + Write '1' to enable interrupt for event ACCOF + 2 + 2 + + read + + Disabled + Read: Disabled + 0 + + + Enabled + Read: Enabled + 1 + + + + write + + Set + Enable + 1 + + + + + DBLRDY + Write '1' to enable interrupt for event DBLRDY + 3 + 3 + + read + + Disabled + Read: Disabled + 0 + + + Enabled + Read: Enabled + 1 + + + + write + + Set + Enable + 1 + + + + + STOPPED + Write '1' to enable interrupt for event STOPPED + 4 + 4 + + read + + Disabled + Read: Disabled + 0 + + + Enabled + Read: Enabled + 1 + + + + write + + Set + Enable + 1 + + + + + + + INTENCLR + Disable interrupt + 0x308 + read-write + + + SAMPLERDY + Write '1' to disable interrupt for event SAMPLERDY + 0 + 0 + + read + + Disabled + Read: Disabled + 0 + + + Enabled + Read: Enabled + 1 + + + + write + + Clear + Disable + 1 + + + + + REPORTRDY + Write '1' to disable interrupt for event REPORTRDY + 1 + 1 + + read + + Disabled + Read: Disabled + 0 + + + Enabled + Read: Enabled + 1 + + + + write + + Clear + Disable + 1 + + + + + ACCOF + Write '1' to disable interrupt for event ACCOF + 2 + 2 + + read + + Disabled + Read: Disabled + 0 + + + Enabled + Read: Enabled + 1 + + + + write + + Clear + Disable + 1 + + + + + DBLRDY + Write '1' to disable interrupt for event DBLRDY + 3 + 3 + + read + + Disabled + Read: Disabled + 0 + + + Enabled + Read: Enabled + 1 + + + + write + + Clear + Disable + 1 + + + + + STOPPED + Write '1' to disable interrupt for event STOPPED + 4 + 4 + + read + + Disabled + Read: Disabled + 0 + + + Enabled + Read: Enabled + 1 + + + + write + + Clear + Disable + 1 + + + + + + + ENABLE + Enable the quadrature decoder + 0x500 + read-write + + + ENABLE + Enable or disable the quadrature decoder + 0 + 0 + + + Disabled + Disable + 0 + + + Enabled + Enable + 1 + + + + + + + LEDPOL + LED output pin polarity + 0x504 + read-write + + + LEDPOL + LED output pin polarity + 0 + 0 + + + ActiveLow + Led active on output pin low + 0 + + + ActiveHigh + Led active on output pin high + 1 + + + + + + + SAMPLEPER + Sample period + 0x508 + read-write + + + SAMPLEPER + Sample period. The SAMPLE register will be updated for every new sample + 0 + 3 + + + 128us + 128 us + 0 + + + 256us + 256 us + 1 + + + 512us + 512 us + 2 + + + 1024us + 1024 us + 3 + + + 2048us + 2048 us + 4 + + + 4096us + 4096 us + 5 + + + 8192us + 8192 us + 6 + + + 16384us + 16384 us + 7 + + + 32ms + 32768 us + 8 + + + 65ms + 65536 us + 9 + + + 131ms + 131072 us + 10 + + + + + + + SAMPLE + Motion sample value + 0x50C + read-only + int32_t + + + SAMPLE + Last motion sample + 0 + 31 + + + + + REPORTPER + Number of samples to be taken before REPORTRDY and DBLRDY events can be generated + 0x510 + read-write + + + REPORTPER + Specifies the number of samples to be accumulated in the ACC register before the REPORTRDY and DBLRDY events can be generated + 0 + 3 + + + 10Smpl + 10 samples / report + 0 + + + 40Smpl + 40 samples / report + 1 + + + 80Smpl + 80 samples / report + 2 + + + 120Smpl + 120 samples / report + 3 + + + 160Smpl + 160 samples / report + 4 + + + 200Smpl + 200 samples / report + 5 + + + 240Smpl + 240 samples / report + 6 + + + 280Smpl + 280 samples / report + 7 + + + 1Smpl + 1 sample / report + 8 + + + + + + + ACC + Register accumulating the valid transitions + 0x514 + read-only + int32_t + + + ACC + Register accumulating all valid samples (not double transition) read from the SAMPLE register + 0 + 31 + + + + + ACCREAD + Snapshot of the ACC register, updated by the READCLRACC or RDCLRACC task + 0x518 + read-only + int32_t + + + ACCREAD + Snapshot of the ACC register. + 0 + 31 + + + + + PSEL + Unspecified + QDEC_PSEL + read-write + 0x51C + + LED + Pin select for LED signal + 0x000 + read-write + 0xFFFFFFFF + + + PIN + Pin number + 0 + 4 + + + CONNECT + Connection + 31 + 31 + + + Disconnected + Disconnect + 1 + + + Connected + Connect + 0 + + + + + + + A + Pin select for A signal + 0x004 + read-write + 0xFFFFFFFF + + + PIN + Pin number + 0 + 4 + + + CONNECT + Connection + 31 + 31 + + + Disconnected + Disconnect + 1 + + + Connected + Connect + 0 + + + + + + + B + Pin select for B signal + 0x008 + read-write + 0xFFFFFFFF + + + PIN + Pin number + 0 + 4 + + + CONNECT + Connection + 31 + 31 + + + Disconnected + Disconnect + 1 + + + Connected + Connect + 0 + + + + + + + + DBFEN + Enable input debounce filters + 0x528 + read-write + + + DBFEN + Enable input debounce filters + 0 + 0 + + + Disabled + Debounce input filters disabled + 0 + + + Enabled + Debounce input filters enabled + 1 + + + + + + + LEDPRE + Time period the LED is switched ON prior to sampling + 0x540 + read-write + 0x00000010 + + + LEDPRE + Period in us the LED is switched on prior to sampling + 0 + 8 + + + + + ACCDBL + Register accumulating the number of detected double transitions + 0x544 + read-only + + + ACCDBL + Register accumulating the number of detected double or illegal transitions. ( SAMPLE = 2 ). + 0 + 3 + + + + + ACCDBLREAD + Snapshot of the ACCDBL, updated by the READCLRACC or RDCLRDBL task + 0x548 + read-only + + + ACCDBLREAD + Snapshot of the ACCDBL register. This field is updated when the READCLRACC or RDCLRDBL task is triggered. + 0 + 3 + + + + + + + COMP + Comparator + 0x40013000 + + 0 + 0x1000 + registers + + + COMP_LPCOMP + 19 + + COMP + 0x20 + + + TASKS_START + Start comparator + 0x000 + write-only + + + TASKS_START + Start comparator + 0 + 0 + + + Trigger + Trigger task + 1 + + + + + + + TASKS_STOP + Stop comparator + 0x004 + write-only + + + TASKS_STOP + Stop comparator + 0 + 0 + + + Trigger + Trigger task + 1 + + + + + + + TASKS_SAMPLE + Sample comparator value + 0x008 + write-only + + + TASKS_SAMPLE + Sample comparator value + 0 + 0 + + + Trigger + Trigger task + 1 + + + + + + + EVENTS_READY + COMP is ready and output is valid + 0x100 + read-write + + + EVENTS_READY + COMP is ready and output is valid + 0 + 0 + + + NotGenerated + Event not generated + 0 + + + Generated + Event generated + 1 + + + + + + + EVENTS_DOWN + Downward crossing + 0x104 + read-write + + + EVENTS_DOWN + Downward crossing + 0 + 0 + + + NotGenerated + Event not generated + 0 + + + Generated + Event generated + 1 + + + + + + + EVENTS_UP + Upward crossing + 0x108 + read-write + + + EVENTS_UP + Upward crossing + 0 + 0 + + + NotGenerated + Event not generated + 0 + + + Generated + Event generated + 1 + + + + + + + EVENTS_CROSS + Downward or upward crossing + 0x10C + read-write + + + EVENTS_CROSS + Downward or upward crossing + 0 + 0 + + + NotGenerated + Event not generated + 0 + + + Generated + Event generated + 1 + + + + + + + SHORTS + Shortcuts between local events and tasks + 0x200 + read-write + + + READY_SAMPLE + Shortcut between event READY and task SAMPLE + 0 + 0 + + + Disabled + Disable shortcut + 0 + + + Enabled + Enable shortcut + 1 + + + + + READY_STOP + Shortcut between event READY and task STOP + 1 + 1 + + + Disabled + Disable shortcut + 0 + + + Enabled + Enable shortcut + 1 + + + + + DOWN_STOP + Shortcut between event DOWN and task STOP + 2 + 2 + + + Disabled + Disable shortcut + 0 + + + Enabled + Enable shortcut + 1 + + + + + UP_STOP + Shortcut between event UP and task STOP + 3 + 3 + + + Disabled + Disable shortcut + 0 + + + Enabled + Enable shortcut + 1 + + + + + CROSS_STOP + Shortcut between event CROSS and task STOP + 4 + 4 + + + Disabled + Disable shortcut + 0 + + + Enabled + Enable shortcut + 1 + + + + + + + INTEN + Enable or disable interrupt + 0x300 + read-write + + + READY + Enable or disable interrupt for event READY + 0 + 0 + + + Disabled + Disable + 0 + + + Enabled + Enable + 1 + + + + + DOWN + Enable or disable interrupt for event DOWN + 1 + 1 + + + Disabled + Disable + 0 + + + Enabled + Enable + 1 + + + + + UP + Enable or disable interrupt for event UP + 2 + 2 + + + Disabled + Disable + 0 + + + Enabled + Enable + 1 + + + + + CROSS + Enable or disable interrupt for event CROSS + 3 + 3 + + + Disabled + Disable + 0 + + + Enabled + Enable + 1 + + + + + + + INTENSET + Enable interrupt + 0x304 + read-write + + + READY + Write '1' to enable interrupt for event READY + 0 + 0 + + read + + Disabled + Read: Disabled + 0 + + + Enabled + Read: Enabled + 1 + + + + write + + Set + Enable + 1 + + + + + DOWN + Write '1' to enable interrupt for event DOWN + 1 + 1 + + read + + Disabled + Read: Disabled + 0 + + + Enabled + Read: Enabled + 1 + + + + write + + Set + Enable + 1 + + + + + UP + Write '1' to enable interrupt for event UP + 2 + 2 + + read + + Disabled + Read: Disabled + 0 + + + Enabled + Read: Enabled + 1 + + + + write + + Set + Enable + 1 + + + + + CROSS + Write '1' to enable interrupt for event CROSS + 3 + 3 + + read + + Disabled + Read: Disabled + 0 + + + Enabled + Read: Enabled + 1 + + + + write + + Set + Enable + 1 + + + + + + + INTENCLR + Disable interrupt + 0x308 + read-write + + + READY + Write '1' to disable interrupt for event READY + 0 + 0 + + read + + Disabled + Read: Disabled + 0 + + + Enabled + Read: Enabled + 1 + + + + write + + Clear + Disable + 1 + + + + + DOWN + Write '1' to disable interrupt for event DOWN + 1 + 1 + + read + + Disabled + Read: Disabled + 0 + + + Enabled + Read: Enabled + 1 + + + + write + + Clear + Disable + 1 + + + + + UP + Write '1' to disable interrupt for event UP + 2 + 2 + + read + + Disabled + Read: Disabled + 0 + + + Enabled + Read: Enabled + 1 + + + + write + + Clear + Disable + 1 + + + + + CROSS + Write '1' to disable interrupt for event CROSS + 3 + 3 + + read + + Disabled + Read: Disabled + 0 + + + Enabled + Read: Enabled + 1 + + + + write + + Clear + Disable + 1 + + + + + + + RESULT + Compare result + 0x400 + read-only + + + RESULT + Result of last compare. Decision point SAMPLE task. + 0 + 0 + + + Below + Input voltage is below the threshold (VIN+ &lt; VIN-) + 0 + + + Above + Input voltage is above the threshold (VIN+ &gt; VIN-) + 1 + + + + + + + ENABLE + COMP enable + 0x500 + read-write + + + ENABLE + Enable or disable COMP + 0 + 1 + + + Disabled + Disable + 0 + + + Enabled + Enable + 2 + + + + + + + PSEL + Pin select + 0x504 + read-write + + + PSEL + Analog pin select + 0 + 2 + + + AnalogInput0 + AIN0 selected as analog input + 0 + + + AnalogInput1 + AIN1 selected as analog input + 1 + + + AnalogInput2 + AIN2 selected as analog input + 2 + + + AnalogInput3 + AIN3 selected as analog input + 3 + + + AnalogInput4 + AIN4 selected as analog input + 4 + + + AnalogInput5 + AIN5 selected as analog input + 5 + + + AnalogInput6 + AIN6 selected as analog input + 6 + + + AnalogInput7 + AIN7 selected as analog input + 7 + + + + + + + REFSEL + Reference source select for single-ended mode + 0x508 + read-write + 0x00000004 + + + REFSEL + Reference select + 0 + 2 + + + Int1V2 + VREF = internal 1.2 V reference (VDD &gt;= 1.7 V) + 0 + + + Int1V8 + VREF = internal 1.8 V reference (VDD &gt;= VREF + 0.2 V) + 1 + + + Int2V4 + VREF = internal 2.4 V reference (VDD &gt;= VREF + 0.2 V) + 2 + + + VDD + VREF = VDD + 4 + + + ARef + VREF = AREF (VDD &gt;= VREF &gt;= AREFMIN) + 7 + + + + + + + EXTREFSEL + External reference select + 0x50C + read-write + + + EXTREFSEL + External analog reference select + 0 + 2 + + + AnalogReference0 + Use AIN0 as external analog reference + 0 + + + AnalogReference1 + Use AIN1 as external analog reference + 1 + + + AnalogReference2 + Use AIN2 as external analog reference + 2 + + + AnalogReference3 + Use AIN3 as external analog reference + 3 + + + AnalogReference4 + Use AIN4 as external analog reference + 4 + + + AnalogReference5 + Use AIN5 as external analog reference + 5 + + + AnalogReference6 + Use AIN6 as external analog reference + 6 + + + AnalogReference7 + Use AIN7 as external analog reference + 7 + + + + + + + TH + Threshold configuration for hysteresis unit + 0x530 + read-write + 0x00000000 + + + THDOWN + VDOWN = (THDOWN+1)/64*VREF + 0 + 5 + + + THUP + VUP = (THUP+1)/64*VREF + 8 + 13 + + + + + MODE + Mode configuration + 0x534 + read-write + + + SP + Speed and power modes + 0 + 1 + + + Low + Low-power mode + 0 + + + Normal + Normal mode + 1 + + + High + High-speed mode + 2 + + + + + MAIN + Main operation modes + 8 + 8 + + + SE + Single-ended mode + 0 + + + Diff + Differential mode + 1 + + + + + + + HYST + Comparator hysteresis enable + 0x538 + read-write + + + HYST + Comparator hysteresis + 0 + 0 + + + NoHyst + Comparator hysteresis disabled + 0 + + + Hyst50mV + Comparator hysteresis enabled + 1 + + + + + + + ISOURCE + Current source select on analog input + 0x53C + read-write + + + ISOURCE + Comparator hysteresis + 0 + 1 + + + Off + Current source disabled + 0 + + + Ien2mA5 + Current source enabled (+/- 2.5 uA) + 1 + + + Ien5mA + Current source enabled (+/- 5 uA) + 2 + + + Ien10mA + Current source enabled (+/- 10 uA) + 3 + + + + + + + + + LPCOMP + Low Power Comparator + 0x40013000 + COMP + + 0 + 0x1000 + registers + + + COMP_LPCOMP + 19 + + LPCOMP + 0x20 + + + TASKS_START + Start comparator + 0x000 + write-only + + + TASKS_START + Start comparator + 0 + 0 + + + Trigger + Trigger task + 1 + + + + + + + TASKS_STOP + Stop comparator + 0x004 + write-only + + + TASKS_STOP + Stop comparator + 0 + 0 + + + Trigger + Trigger task + 1 + + + + + + + TASKS_SAMPLE + Sample comparator value + 0x008 + write-only + + + TASKS_SAMPLE + Sample comparator value + 0 + 0 + + + Trigger + Trigger task + 1 + + + + + + + EVENTS_READY + LPCOMP is ready and output is valid + 0x100 + read-write + + + EVENTS_READY + LPCOMP is ready and output is valid + 0 + 0 + + + NotGenerated + Event not generated + 0 + + + Generated + Event generated + 1 + + + + + + + EVENTS_DOWN + Downward crossing + 0x104 + read-write + + + EVENTS_DOWN + Downward crossing + 0 + 0 + + + NotGenerated + Event not generated + 0 + + + Generated + Event generated + 1 + + + + + + + EVENTS_UP + Upward crossing + 0x108 + read-write + + + EVENTS_UP + Upward crossing + 0 + 0 + + + NotGenerated + Event not generated + 0 + + + Generated + Event generated + 1 + + + + + + + EVENTS_CROSS + Downward or upward crossing + 0x10C + read-write + + + EVENTS_CROSS + Downward or upward crossing + 0 + 0 + + + NotGenerated + Event not generated + 0 + + + Generated + Event generated + 1 + + + + + + + SHORTS + Shortcuts between local events and tasks + 0x200 + read-write + + + READY_SAMPLE + Shortcut between event READY and task SAMPLE + 0 + 0 + + + Disabled + Disable shortcut + 0 + + + Enabled + Enable shortcut + 1 + + + + + READY_STOP + Shortcut between event READY and task STOP + 1 + 1 + + + Disabled + Disable shortcut + 0 + + + Enabled + Enable shortcut + 1 + + + + + DOWN_STOP + Shortcut between event DOWN and task STOP + 2 + 2 + + + Disabled + Disable shortcut + 0 + + + Enabled + Enable shortcut + 1 + + + + + UP_STOP + Shortcut between event UP and task STOP + 3 + 3 + + + Disabled + Disable shortcut + 0 + + + Enabled + Enable shortcut + 1 + + + + + CROSS_STOP + Shortcut between event CROSS and task STOP + 4 + 4 + + + Disabled + Disable shortcut + 0 + + + Enabled + Enable shortcut + 1 + + + + + + + INTENSET + Enable interrupt + 0x304 + read-write + + + READY + Write '1' to enable interrupt for event READY + 0 + 0 + + read + + Disabled + Read: Disabled + 0 + + + Enabled + Read: Enabled + 1 + + + + write + + Set + Enable + 1 + + + + + DOWN + Write '1' to enable interrupt for event DOWN + 1 + 1 + + read + + Disabled + Read: Disabled + 0 + + + Enabled + Read: Enabled + 1 + + + + write + + Set + Enable + 1 + + + + + UP + Write '1' to enable interrupt for event UP + 2 + 2 + + read + + Disabled + Read: Disabled + 0 + + + Enabled + Read: Enabled + 1 + + + + write + + Set + Enable + 1 + + + + + CROSS + Write '1' to enable interrupt for event CROSS + 3 + 3 + + read + + Disabled + Read: Disabled + 0 + + + Enabled + Read: Enabled + 1 + + + + write + + Set + Enable + 1 + + + + + + + INTENCLR + Disable interrupt + 0x308 + read-write + + + READY + Write '1' to disable interrupt for event READY + 0 + 0 + + read + + Disabled + Read: Disabled + 0 + + + Enabled + Read: Enabled + 1 + + + + write + + Clear + Disable + 1 + + + + + DOWN + Write '1' to disable interrupt for event DOWN + 1 + 1 + + read + + Disabled + Read: Disabled + 0 + + + Enabled + Read: Enabled + 1 + + + + write + + Clear + Disable + 1 + + + + + UP + Write '1' to disable interrupt for event UP + 2 + 2 + + read + + Disabled + Read: Disabled + 0 + + + Enabled + Read: Enabled + 1 + + + + write + + Clear + Disable + 1 + + + + + CROSS + Write '1' to disable interrupt for event CROSS + 3 + 3 + + read + + Disabled + Read: Disabled + 0 + + + Enabled + Read: Enabled + 1 + + + + write + + Clear + Disable + 1 + + + + + + + RESULT + Compare result + 0x400 + read-only + + + RESULT + Result of last compare. Decision point SAMPLE task. + 0 + 0 + + + Below + Input voltage is below the reference threshold (VIN+ &lt; VIN-). + 0 + + + Above + Input voltage is above the reference threshold (VIN+ &gt; VIN-). + 1 + + + + + + + ENABLE + Enable LPCOMP + 0x500 + read-write + + + ENABLE + Enable or disable LPCOMP + 0 + 1 + + + Disabled + Disable + 0 + + + Enabled + Enable + 1 + + + + + + + PSEL + Input pin select + 0x504 + read-write + + + PSEL + Analog pin select + 0 + 2 + + + AnalogInput0 + AIN0 selected as analog input + 0 + + + AnalogInput1 + AIN1 selected as analog input + 1 + + + AnalogInput2 + AIN2 selected as analog input + 2 + + + AnalogInput3 + AIN3 selected as analog input + 3 + + + AnalogInput4 + AIN4 selected as analog input + 4 + + + AnalogInput5 + AIN5 selected as analog input + 5 + + + AnalogInput6 + AIN6 selected as analog input + 6 + + + AnalogInput7 + AIN7 selected as analog input + 7 + + + + + + + REFSEL + Reference select + 0x508 + read-write + 0x00000004 + + + REFSEL + Reference select + 0 + 3 + + + Ref1_8Vdd + VDD * 1/8 selected as reference + 0 + + + Ref2_8Vdd + VDD * 2/8 selected as reference + 1 + + + Ref3_8Vdd + VDD * 3/8 selected as reference + 2 + + + Ref4_8Vdd + VDD * 4/8 selected as reference + 3 + + + Ref5_8Vdd + VDD * 5/8 selected as reference + 4 + + + Ref6_8Vdd + VDD * 6/8 selected as reference + 5 + + + Ref7_8Vdd + VDD * 7/8 selected as reference + 6 + + + ARef + External analog reference selected + 7 + + + Ref1_16Vdd + VDD * 1/16 selected as reference + 8 + + + Ref3_16Vdd + VDD * 3/16 selected as reference + 9 + + + Ref5_16Vdd + VDD * 5/16 selected as reference + 10 + + + Ref7_16Vdd + VDD * 7/16 selected as reference + 11 + + + Ref9_16Vdd + VDD * 9/16 selected as reference + 12 + + + Ref11_16Vdd + VDD * 11/16 selected as reference + 13 + + + Ref13_16Vdd + VDD * 13/16 selected as reference + 14 + + + Ref15_16Vdd + VDD * 15/16 selected as reference + 15 + + + + + + + EXTREFSEL + External reference select + 0x50C + read-write + + + EXTREFSEL + External analog reference select + 0 + 0 + + + AnalogReference0 + Use AIN0 as external analog reference + 0 + + + AnalogReference1 + Use AIN1 as external analog reference + 1 + + + + + + + ANADETECT + Analog detect configuration + 0x520 + read-write + + + ANADETECT + Analog detect configuration + 0 + 1 + + + Cross + Generate ANADETECT on crossing, both upward crossing and downward crossing + 0 + + + Up + Generate ANADETECT on upward crossing only + 1 + + + Down + Generate ANADETECT on downward crossing only + 2 + + + + + + + HYST + Comparator hysteresis enable + 0x538 + read-write + + + HYST + Comparator hysteresis enable + 0 + 0 + + + NoHyst + Comparator hysteresis disabled + 0 + + + Hyst50mV + Comparator hysteresis disabled (typ. 50 mV) + 1 + + + + + + + + + EGU0 + Event Generator Unit 0 + 0x40014000 + EGU + + 0 + 0x1000 + registers + + + SWI0_EGU0 + 20 + + EGU + 0x20 + + + 0x10 + 0x4 + TASKS_TRIGGER[%s] + Description collection: Trigger n for triggering the corresponding TRIGGERED[n] event + 0x000 + write-only + + + TASKS_TRIGGER + Trigger n for triggering the corresponding TRIGGERED[n] event + 0 + 0 + + + Trigger + Trigger task + 1 + + + + + + + 0x10 + 0x4 + EVENTS_TRIGGERED[%s] + Description collection: Event number n generated by triggering the corresponding TRIGGER[n] task + 0x100 + read-write + + + EVENTS_TRIGGERED + Event number n generated by triggering the corresponding TRIGGER[n] task + 0 + 0 + + + NotGenerated + Event not generated + 0 + + + Generated + Event generated + 1 + + + + + + + INTEN + Enable or disable interrupt + 0x300 + read-write + + + TRIGGERED0 + Enable or disable interrupt for event TRIGGERED[0] + 0 + 0 + + + Disabled + Disable + 0 + + + Enabled + Enable + 1 + + + + + TRIGGERED1 + Enable or disable interrupt for event TRIGGERED[1] + 1 + 1 + + + Disabled + Disable + 0 + + + Enabled + Enable + 1 + + + + + TRIGGERED2 + Enable or disable interrupt for event TRIGGERED[2] + 2 + 2 + + + Disabled + Disable + 0 + + + Enabled + Enable + 1 + + + + + TRIGGERED3 + Enable or disable interrupt for event TRIGGERED[3] + 3 + 3 + + + Disabled + Disable + 0 + + + Enabled + Enable + 1 + + + + + TRIGGERED4 + Enable or disable interrupt for event TRIGGERED[4] + 4 + 4 + + + Disabled + Disable + 0 + + + Enabled + Enable + 1 + + + + + TRIGGERED5 + Enable or disable interrupt for event TRIGGERED[5] + 5 + 5 + + + Disabled + Disable + 0 + + + Enabled + Enable + 1 + + + + + TRIGGERED6 + Enable or disable interrupt for event TRIGGERED[6] + 6 + 6 + + + Disabled + Disable + 0 + + + Enabled + Enable + 1 + + + + + TRIGGERED7 + Enable or disable interrupt for event TRIGGERED[7] + 7 + 7 + + + Disabled + Disable + 0 + + + Enabled + Enable + 1 + + + + + TRIGGERED8 + Enable or disable interrupt for event TRIGGERED[8] + 8 + 8 + + + Disabled + Disable + 0 + + + Enabled + Enable + 1 + + + + + TRIGGERED9 + Enable or disable interrupt for event TRIGGERED[9] + 9 + 9 + + + Disabled + Disable + 0 + + + Enabled + Enable + 1 + + + + + TRIGGERED10 + Enable or disable interrupt for event TRIGGERED[10] + 10 + 10 + + + Disabled + Disable + 0 + + + Enabled + Enable + 1 + + + + + TRIGGERED11 + Enable or disable interrupt for event TRIGGERED[11] + 11 + 11 + + + Disabled + Disable + 0 + + + Enabled + Enable + 1 + + + + + TRIGGERED12 + Enable or disable interrupt for event TRIGGERED[12] + 12 + 12 + + + Disabled + Disable + 0 + + + Enabled + Enable + 1 + + + + + TRIGGERED13 + Enable or disable interrupt for event TRIGGERED[13] + 13 + 13 + + + Disabled + Disable + 0 + + + Enabled + Enable + 1 + + + + + TRIGGERED14 + Enable or disable interrupt for event TRIGGERED[14] + 14 + 14 + + + Disabled + Disable + 0 + + + Enabled + Enable + 1 + + + + + TRIGGERED15 + Enable or disable interrupt for event TRIGGERED[15] + 15 + 15 + + + Disabled + Disable + 0 + + + Enabled + Enable + 1 + + + + + + + INTENSET + Enable interrupt + 0x304 + read-write + + + TRIGGERED0 + Write '1' to enable interrupt for event TRIGGERED[0] + 0 + 0 + + read + + Disabled + Read: Disabled + 0 + + + Enabled + Read: Enabled + 1 + + + + write + + Set + Enable + 1 + + + + + TRIGGERED1 + Write '1' to enable interrupt for event TRIGGERED[1] + 1 + 1 + + read + + Disabled + Read: Disabled + 0 + + + Enabled + Read: Enabled + 1 + + + + write + + Set + Enable + 1 + + + + + TRIGGERED2 + Write '1' to enable interrupt for event TRIGGERED[2] + 2 + 2 + + read + + Disabled + Read: Disabled + 0 + + + Enabled + Read: Enabled + 1 + + + + write + + Set + Enable + 1 + + + + + TRIGGERED3 + Write '1' to enable interrupt for event TRIGGERED[3] + 3 + 3 + + read + + Disabled + Read: Disabled + 0 + + + Enabled + Read: Enabled + 1 + + + + write + + Set + Enable + 1 + + + + + TRIGGERED4 + Write '1' to enable interrupt for event TRIGGERED[4] + 4 + 4 + + read + + Disabled + Read: Disabled + 0 + + + Enabled + Read: Enabled + 1 + + + + write + + Set + Enable + 1 + + + + + TRIGGERED5 + Write '1' to enable interrupt for event TRIGGERED[5] + 5 + 5 + + read + + Disabled + Read: Disabled + 0 + + + Enabled + Read: Enabled + 1 + + + + write + + Set + Enable + 1 + + + + + TRIGGERED6 + Write '1' to enable interrupt for event TRIGGERED[6] + 6 + 6 + + read + + Disabled + Read: Disabled + 0 + + + Enabled + Read: Enabled + 1 + + + + write + + Set + Enable + 1 + + + + + TRIGGERED7 + Write '1' to enable interrupt for event TRIGGERED[7] + 7 + 7 + + read + + Disabled + Read: Disabled + 0 + + + Enabled + Read: Enabled + 1 + + + + write + + Set + Enable + 1 + + + + + TRIGGERED8 + Write '1' to enable interrupt for event TRIGGERED[8] + 8 + 8 + + read + + Disabled + Read: Disabled + 0 + + + Enabled + Read: Enabled + 1 + + + + write + + Set + Enable + 1 + + + + + TRIGGERED9 + Write '1' to enable interrupt for event TRIGGERED[9] + 9 + 9 + + read + + Disabled + Read: Disabled + 0 + + + Enabled + Read: Enabled + 1 + + + + write + + Set + Enable + 1 + + + + + TRIGGERED10 + Write '1' to enable interrupt for event TRIGGERED[10] + 10 + 10 + + read + + Disabled + Read: Disabled + 0 + + + Enabled + Read: Enabled + 1 + + + + write + + Set + Enable + 1 + + + + + TRIGGERED11 + Write '1' to enable interrupt for event TRIGGERED[11] + 11 + 11 + + read + + Disabled + Read: Disabled + 0 + + + Enabled + Read: Enabled + 1 + + + + write + + Set + Enable + 1 + + + + + TRIGGERED12 + Write '1' to enable interrupt for event TRIGGERED[12] + 12 + 12 + + read + + Disabled + Read: Disabled + 0 + + + Enabled + Read: Enabled + 1 + + + + write + + Set + Enable + 1 + + + + + TRIGGERED13 + Write '1' to enable interrupt for event TRIGGERED[13] + 13 + 13 + + read + + Disabled + Read: Disabled + 0 + + + Enabled + Read: Enabled + 1 + + + + write + + Set + Enable + 1 + + + + + TRIGGERED14 + Write '1' to enable interrupt for event TRIGGERED[14] + 14 + 14 + + read + + Disabled + Read: Disabled + 0 + + + Enabled + Read: Enabled + 1 + + + + write + + Set + Enable + 1 + + + + + TRIGGERED15 + Write '1' to enable interrupt for event TRIGGERED[15] + 15 + 15 + + read + + Disabled + Read: Disabled + 0 + + + Enabled + Read: Enabled + 1 + + + + write + + Set + Enable + 1 + + + + + + + INTENCLR + Disable interrupt + 0x308 + read-write + + + TRIGGERED0 + Write '1' to disable interrupt for event TRIGGERED[0] + 0 + 0 + + read + + Disabled + Read: Disabled + 0 + + + Enabled + Read: Enabled + 1 + + + + write + + Clear + Disable + 1 + + + + + TRIGGERED1 + Write '1' to disable interrupt for event TRIGGERED[1] + 1 + 1 + + read + + Disabled + Read: Disabled + 0 + + + Enabled + Read: Enabled + 1 + + + + write + + Clear + Disable + 1 + + + + + TRIGGERED2 + Write '1' to disable interrupt for event TRIGGERED[2] + 2 + 2 + + read + + Disabled + Read: Disabled + 0 + + + Enabled + Read: Enabled + 1 + + + + write + + Clear + Disable + 1 + + + + + TRIGGERED3 + Write '1' to disable interrupt for event TRIGGERED[3] + 3 + 3 + + read + + Disabled + Read: Disabled + 0 + + + Enabled + Read: Enabled + 1 + + + + write + + Clear + Disable + 1 + + + + + TRIGGERED4 + Write '1' to disable interrupt for event TRIGGERED[4] + 4 + 4 + + read + + Disabled + Read: Disabled + 0 + + + Enabled + Read: Enabled + 1 + + + + write + + Clear + Disable + 1 + + + + + TRIGGERED5 + Write '1' to disable interrupt for event TRIGGERED[5] + 5 + 5 + + read + + Disabled + Read: Disabled + 0 + + + Enabled + Read: Enabled + 1 + + + + write + + Clear + Disable + 1 + + + + + TRIGGERED6 + Write '1' to disable interrupt for event TRIGGERED[6] + 6 + 6 + + read + + Disabled + Read: Disabled + 0 + + + Enabled + Read: Enabled + 1 + + + + write + + Clear + Disable + 1 + + + + + TRIGGERED7 + Write '1' to disable interrupt for event TRIGGERED[7] + 7 + 7 + + read + + Disabled + Read: Disabled + 0 + + + Enabled + Read: Enabled + 1 + + + + write + + Clear + Disable + 1 + + + + + TRIGGERED8 + Write '1' to disable interrupt for event TRIGGERED[8] + 8 + 8 + + read + + Disabled + Read: Disabled + 0 + + + Enabled + Read: Enabled + 1 + + + + write + + Clear + Disable + 1 + + + + + TRIGGERED9 + Write '1' to disable interrupt for event TRIGGERED[9] + 9 + 9 + + read + + Disabled + Read: Disabled + 0 + + + Enabled + Read: Enabled + 1 + + + + write + + Clear + Disable + 1 + + + + + TRIGGERED10 + Write '1' to disable interrupt for event TRIGGERED[10] + 10 + 10 + + read + + Disabled + Read: Disabled + 0 + + + Enabled + Read: Enabled + 1 + + + + write + + Clear + Disable + 1 + + + + + TRIGGERED11 + Write '1' to disable interrupt for event TRIGGERED[11] + 11 + 11 + + read + + Disabled + Read: Disabled + 0 + + + Enabled + Read: Enabled + 1 + + + + write + + Clear + Disable + 1 + + + + + TRIGGERED12 + Write '1' to disable interrupt for event TRIGGERED[12] + 12 + 12 + + read + + Disabled + Read: Disabled + 0 + + + Enabled + Read: Enabled + 1 + + + + write + + Clear + Disable + 1 + + + + + TRIGGERED13 + Write '1' to disable interrupt for event TRIGGERED[13] + 13 + 13 + + read + + Disabled + Read: Disabled + 0 + + + Enabled + Read: Enabled + 1 + + + + write + + Clear + Disable + 1 + + + + + TRIGGERED14 + Write '1' to disable interrupt for event TRIGGERED[14] + 14 + 14 + + read + + Disabled + Read: Disabled + 0 + + + Enabled + Read: Enabled + 1 + + + + write + + Clear + Disable + 1 + + + + + TRIGGERED15 + Write '1' to disable interrupt for event TRIGGERED[15] + 15 + 15 + + read + + Disabled + Read: Disabled + 0 + + + Enabled + Read: Enabled + 1 + + + + write + + Clear + Disable + 1 + + + + + + + + + SWI0 + Software interrupt 0 + 0x40014000 + EGU0 + SWI + + 0 + 0x1000 + registers + + + SWI0_EGU0 + 20 + + SWI + 0x20 + + + UNUSED + Unused. + 0x000 + 0x00000000 + read-only + + + + + EGU1 + Event Generator Unit 1 + 0x40015000 + + SWI1_EGU1 + 21 + + + + SWI1 + Software interrupt 1 + 0x40015000 + EGU1 + + SWI1_EGU1 + 21 + + + + EGU2 + Event Generator Unit 2 + 0x40016000 + + SWI2_EGU2 + 22 + + + + SWI2 + Software interrupt 2 + 0x40016000 + EGU2 + + SWI2_EGU2 + 22 + + + + EGU3 + Event Generator Unit 3 + 0x40017000 + + SWI3_EGU3 + 23 + + + + SWI3 + Software interrupt 3 + 0x40017000 + EGU3 + + SWI3_EGU3 + 23 + + + + EGU4 + Event Generator Unit 4 + 0x40018000 + + SWI4_EGU4 + 24 + + + + SWI4 + Software interrupt 4 + 0x40018000 + EGU4 + + SWI4_EGU4 + 24 + + + + EGU5 + Event Generator Unit 5 + 0x40019000 + + SWI5_EGU5 + 25 + + + + SWI5 + Software interrupt 5 + 0x40019000 + EGU5 + + SWI5_EGU5 + 25 + + + + TIMER3 + Timer/Counter 3 + 0x4001A000 + + TIMER3 + 26 + + + + TIMER4 + Timer/Counter 4 + 0x4001B000 + + TIMER4 + 27 + + + + PWM0 + Pulse Width Modulation Unit 0 + 0x4001C000 + PWM + + 0 + 0x1000 + registers + + + PWM0 + 28 + + PWM + 0x20 + + + TASKS_STOP + Stops PWM pulse generation on all channels at the end of current PWM period, and stops sequence playback + 0x004 + write-only + + + TASKS_STOP + Stops PWM pulse generation on all channels at the end of current PWM period, and stops sequence playback + 0 + 0 + + + Trigger + Trigger task + 1 + + + + + + + 0x2 + 0x4 + TASKS_SEQSTART[%s] + Description collection: Loads the first PWM value on all enabled channels from sequence n, and starts playing that sequence at the rate defined in SEQ[n]REFRESH and/or DECODER.MODE. Causes PWM generation to start it was not running. + 0x008 + write-only + + + TASKS_SEQSTART + Loads the first PWM value on all enabled channels from sequence n, and starts playing that sequence at the rate defined in SEQ[n]REFRESH and/or DECODER.MODE. Causes PWM generation to start it was not running. + 0 + 0 + + + Trigger + Trigger task + 1 + + + + + + + TASKS_NEXTSTEP + Steps by one value in the current sequence on all enabled channels if DECODER.MODE=NextStep. Does not cause PWM generation to start it was not running. + 0x010 + write-only + + + TASKS_NEXTSTEP + Steps by one value in the current sequence on all enabled channels if DECODER.MODE=NextStep. Does not cause PWM generation to start it was not running. + 0 + 0 + + + Trigger + Trigger task + 1 + + + + + + + EVENTS_STOPPED + Response to STOP task, emitted when PWM pulses are no longer generated + 0x104 + read-write + + + EVENTS_STOPPED + Response to STOP task, emitted when PWM pulses are no longer generated + 0 + 0 + + + NotGenerated + Event not generated + 0 + + + Generated + Event generated + 1 + + + + + + + 0x2 + 0x4 + EVENTS_SEQSTARTED[%s] + Description collection: First PWM period started on sequence n + 0x108 + read-write + + + EVENTS_SEQSTARTED + First PWM period started on sequence n + 0 + 0 + + + NotGenerated + Event not generated + 0 + + + Generated + Event generated + 1 + + + + + + + 0x2 + 0x4 + EVENTS_SEQEND[%s] + Description collection: Emitted at end of every sequence n, when last value from RAM has been applied to wave counter + 0x110 + read-write + + + EVENTS_SEQEND + Emitted at end of every sequence n, when last value from RAM has been applied to wave counter + 0 + 0 + + + NotGenerated + Event not generated + 0 + + + Generated + Event generated + 1 + + + + + + + EVENTS_PWMPERIODEND + Emitted at the end of each PWM period + 0x118 + read-write + + + EVENTS_PWMPERIODEND + Emitted at the end of each PWM period + 0 + 0 + + + NotGenerated + Event not generated + 0 + + + Generated + Event generated + 1 + + + + + + + EVENTS_LOOPSDONE + Concatenated sequences have been played the amount of times defined in LOOP.CNT + 0x11C + read-write + + + EVENTS_LOOPSDONE + Concatenated sequences have been played the amount of times defined in LOOP.CNT + 0 + 0 + + + NotGenerated + Event not generated + 0 + + + Generated + Event generated + 1 + + + + + + + SHORTS + Shortcuts between local events and tasks + 0x200 + read-write + + + SEQEND0_STOP + Shortcut between event SEQEND[0] and task STOP + 0 + 0 + + + Disabled + Disable shortcut + 0 + + + Enabled + Enable shortcut + 1 + + + + + SEQEND1_STOP + Shortcut between event SEQEND[1] and task STOP + 1 + 1 + + + Disabled + Disable shortcut + 0 + + + Enabled + Enable shortcut + 1 + + + + + LOOPSDONE_SEQSTART0 + Shortcut between event LOOPSDONE and task SEQSTART[0] + 2 + 2 + + + Disabled + Disable shortcut + 0 + + + Enabled + Enable shortcut + 1 + + + + + LOOPSDONE_SEQSTART1 + Shortcut between event LOOPSDONE and task SEQSTART[1] + 3 + 3 + + + Disabled + Disable shortcut + 0 + + + Enabled + Enable shortcut + 1 + + + + + LOOPSDONE_STOP + Shortcut between event LOOPSDONE and task STOP + 4 + 4 + + + Disabled + Disable shortcut + 0 + + + Enabled + Enable shortcut + 1 + + + + + + + INTEN + Enable or disable interrupt + 0x300 + read-write + + + STOPPED + Enable or disable interrupt for event STOPPED + 1 + 1 + + + Disabled + Disable + 0 + + + Enabled + Enable + 1 + + + + + SEQSTARTED0 + Enable or disable interrupt for event SEQSTARTED[0] + 2 + 2 + + + Disabled + Disable + 0 + + + Enabled + Enable + 1 + + + + + SEQSTARTED1 + Enable or disable interrupt for event SEQSTARTED[1] + 3 + 3 + + + Disabled + Disable + 0 + + + Enabled + Enable + 1 + + + + + SEQEND0 + Enable or disable interrupt for event SEQEND[0] + 4 + 4 + + + Disabled + Disable + 0 + + + Enabled + Enable + 1 + + + + + SEQEND1 + Enable or disable interrupt for event SEQEND[1] + 5 + 5 + + + Disabled + Disable + 0 + + + Enabled + Enable + 1 + + + + + PWMPERIODEND + Enable or disable interrupt for event PWMPERIODEND + 6 + 6 + + + Disabled + Disable + 0 + + + Enabled + Enable + 1 + + + + + LOOPSDONE + Enable or disable interrupt for event LOOPSDONE + 7 + 7 + + + Disabled + Disable + 0 + + + Enabled + Enable + 1 + + + + + + + INTENSET + Enable interrupt + 0x304 + read-write + + + STOPPED + Write '1' to enable interrupt for event STOPPED + 1 + 1 + + read + + Disabled + Read: Disabled + 0 + + + Enabled + Read: Enabled + 1 + + + + write + + Set + Enable + 1 + + + + + SEQSTARTED0 + Write '1' to enable interrupt for event SEQSTARTED[0] + 2 + 2 + + read + + Disabled + Read: Disabled + 0 + + + Enabled + Read: Enabled + 1 + + + + write + + Set + Enable + 1 + + + + + SEQSTARTED1 + Write '1' to enable interrupt for event SEQSTARTED[1] + 3 + 3 + + read + + Disabled + Read: Disabled + 0 + + + Enabled + Read: Enabled + 1 + + + + write + + Set + Enable + 1 + + + + + SEQEND0 + Write '1' to enable interrupt for event SEQEND[0] + 4 + 4 + + read + + Disabled + Read: Disabled + 0 + + + Enabled + Read: Enabled + 1 + + + + write + + Set + Enable + 1 + + + + + SEQEND1 + Write '1' to enable interrupt for event SEQEND[1] + 5 + 5 + + read + + Disabled + Read: Disabled + 0 + + + Enabled + Read: Enabled + 1 + + + + write + + Set + Enable + 1 + + + + + PWMPERIODEND + Write '1' to enable interrupt for event PWMPERIODEND + 6 + 6 + + read + + Disabled + Read: Disabled + 0 + + + Enabled + Read: Enabled + 1 + + + + write + + Set + Enable + 1 + + + + + LOOPSDONE + Write '1' to enable interrupt for event LOOPSDONE + 7 + 7 + + read + + Disabled + Read: Disabled + 0 + + + Enabled + Read: Enabled + 1 + + + + write + + Set + Enable + 1 + + + + + + + INTENCLR + Disable interrupt + 0x308 + read-write + + + STOPPED + Write '1' to disable interrupt for event STOPPED + 1 + 1 + + read + + Disabled + Read: Disabled + 0 + + + Enabled + Read: Enabled + 1 + + + + write + + Clear + Disable + 1 + + + + + SEQSTARTED0 + Write '1' to disable interrupt for event SEQSTARTED[0] + 2 + 2 + + read + + Disabled + Read: Disabled + 0 + + + Enabled + Read: Enabled + 1 + + + + write + + Clear + Disable + 1 + + + + + SEQSTARTED1 + Write '1' to disable interrupt for event SEQSTARTED[1] + 3 + 3 + + read + + Disabled + Read: Disabled + 0 + + + Enabled + Read: Enabled + 1 + + + + write + + Clear + Disable + 1 + + + + + SEQEND0 + Write '1' to disable interrupt for event SEQEND[0] + 4 + 4 + + read + + Disabled + Read: Disabled + 0 + + + Enabled + Read: Enabled + 1 + + + + write + + Clear + Disable + 1 + + + + + SEQEND1 + Write '1' to disable interrupt for event SEQEND[1] + 5 + 5 + + read + + Disabled + Read: Disabled + 0 + + + Enabled + Read: Enabled + 1 + + + + write + + Clear + Disable + 1 + + + + + PWMPERIODEND + Write '1' to disable interrupt for event PWMPERIODEND + 6 + 6 + + read + + Disabled + Read: Disabled + 0 + + + Enabled + Read: Enabled + 1 + + + + write + + Clear + Disable + 1 + + + + + LOOPSDONE + Write '1' to disable interrupt for event LOOPSDONE + 7 + 7 + + read + + Disabled + Read: Disabled + 0 + + + Enabled + Read: Enabled + 1 + + + + write + + Clear + Disable + 1 + + + + + + + ENABLE + PWM module enable register + 0x500 + read-write + 0x00000000 + + + ENABLE + Enable or disable PWM module + 0 + 0 + + + Disabled + Disabled + 0 + + + Enabled + Enable + 1 + + + + + + + MODE + Selects operating mode of the wave counter + 0x504 + read-write + 0x00000000 + + + UPDOWN + Selects up or up and down as wave counter mode + 0 + 0 + + + Up + Up counter - edge aligned PWM duty-cycle + 0 + + + UpAndDown + Up and down counter - center aligned PWM duty cycle + 1 + + + + + + + COUNTERTOP + Value up to which the pulse generator counter counts + 0x508 + read-write + 0x000003FF + + + COUNTERTOP + Value up to which the pulse generator counter counts. This register is ignored when DECODER.MODE=WaveForm and only values from RAM will be used. + 0 + 14 + + + + + PRESCALER + Configuration for PWM_CLK + 0x50C + read-write + 0x00000000 + + + PRESCALER + Pre-scaler of PWM_CLK + 0 + 2 + + + DIV_1 + Divide by 1 (16MHz) + 0 + + + DIV_2 + Divide by 2 ( 8MHz) + 1 + + + DIV_4 + Divide by 4 ( 4MHz) + 2 + + + DIV_8 + Divide by 8 ( 2MHz) + 3 + + + DIV_16 + Divide by 16 ( 1MHz) + 4 + + + DIV_32 + Divide by 32 ( 500kHz) + 5 + + + DIV_64 + Divide by 64 ( 250kHz) + 6 + + + DIV_128 + Divide by 128 ( 125kHz) + 7 + + + + + + + DECODER + Configuration of the decoder + 0x510 + read-write + 0x00000000 + + + LOAD + How a sequence is read from RAM and spread to the compare register + 0 + 1 + + + Common + 1st half word (16-bit) used in all PWM channels 0..3 + 0 + + + Grouped + 1st half word (16-bit) used in channel 0..1; 2nd word in channel 2..3 + 1 + + + Individual + 1st half word (16-bit) in ch.0; 2nd in ch.1; ...; 4th in ch.3 + 2 + + + WaveForm + 1st half word (16-bit) in ch.0; 2nd in ch.1; ...; 4th in COUNTERTOP + 3 + + + + + MODE + Selects source for advancing the active sequence + 8 + 8 + + + RefreshCount + SEQ[n].REFRESH is used to determine loading internal compare registers + 0 + + + NextStep + NEXTSTEP task causes a new value to be loaded to internal compare registers + 1 + + + + + + + LOOP + Amount of playback of a loop + 0x514 + read-write + 0x00000000 + + + CNT + Amount of playback of pattern cycles + 0 + 15 + + + Disabled + Looping disabled (stop at the end of the sequence) + 0 + + + + + + + 2 + 0x020 + SEQ[%s] + Unspecified + PWM_SEQ + read-write + 0x520 + + PTR + Description cluster: Beginning address in Data RAM of this sequence + 0x000 + read-write + 0x00000000 + + + PTR + Beginning address in Data RAM of this sequence + 0 + 31 + + + + + CNT + Description cluster: Amount of values (duty cycles) in this sequence + 0x004 + read-write + 0x00000000 + + + CNT + Amount of values (duty cycles) in this sequence + 0 + 14 + + + Disabled + Sequence is disabled, and shall not be started as it is empty + 0 + + + + + + + REFRESH + Description cluster: Amount of additional PWM periods between samples loaded into compare register + 0x008 + read-write + 0x00000001 + + + CNT + Amount of additional PWM periods between samples loaded into compare register (load every REFRESH.CNT+1 PWM periods) + 0 + 23 + + + Continuous + Update every PWM period + 0 + + + + + + + ENDDELAY + Description cluster: Time added after the sequence + 0x00C + read-write + 0x00000000 + + + CNT + Time added after the sequence in PWM periods + 0 + 23 + + + + + + PSEL + Unspecified + PWM_PSEL + read-write + 0x560 + + 0x4 + 0x4 + OUT[%s] + Description collection: Output pin select for PWM channel n + 0x000 + read-write + 0xFFFFFFFF + + + PIN + Pin number + 0 + 4 + + + CONNECT + Connection + 31 + 31 + + + Disconnected + Disconnect + 1 + + + Connected + Connect + 0 + + + + + + + + + + PDM + Pulse Density Modulation (Digital Microphone) Interface + 0x4001D000 + + 0 + 0x1000 + registers + + + PDM + 29 + + PDM + 0x20 + + + TASKS_START + Starts continuous PDM transfer + 0x000 + write-only + + + TASKS_START + Starts continuous PDM transfer + 0 + 0 + + + Trigger + Trigger task + 1 + + + + + + + TASKS_STOP + Stops PDM transfer + 0x004 + write-only + + + TASKS_STOP + Stops PDM transfer + 0 + 0 + + + Trigger + Trigger task + 1 + + + + + + + EVENTS_STARTED + PDM transfer has started + 0x100 + read-write + + + EVENTS_STARTED + PDM transfer has started + 0 + 0 + + + NotGenerated + Event not generated + 0 + + + Generated + Event generated + 1 + + + + + + + EVENTS_STOPPED + PDM transfer has finished + 0x104 + read-write + + + EVENTS_STOPPED + PDM transfer has finished + 0 + 0 + + + NotGenerated + Event not generated + 0 + + + Generated + Event generated + 1 + + + + + + + EVENTS_END + The PDM has written the last sample specified by SAMPLE.MAXCNT (or the last sample after a STOP task has been received) to Data RAM + 0x108 + read-write + + + EVENTS_END + The PDM has written the last sample specified by SAMPLE.MAXCNT (or the last sample after a STOP task has been received) to Data RAM + 0 + 0 + + + NotGenerated + Event not generated + 0 + + + Generated + Event generated + 1 + + + + + + + INTEN + Enable or disable interrupt + 0x300 + read-write + + + STARTED + Enable or disable interrupt for event STARTED + 0 + 0 + + + Disabled + Disable + 0 + + + Enabled + Enable + 1 + + + + + STOPPED + Enable or disable interrupt for event STOPPED + 1 + 1 + + + Disabled + Disable + 0 + + + Enabled + Enable + 1 + + + + + END + Enable or disable interrupt for event END + 2 + 2 + + + Disabled + Disable + 0 + + + Enabled + Enable + 1 + + + + + + + INTENSET + Enable interrupt + 0x304 + read-write + + + STARTED + Write '1' to enable interrupt for event STARTED + 0 + 0 + + read + + Disabled + Read: Disabled + 0 + + + Enabled + Read: Enabled + 1 + + + + write + + Set + Enable + 1 + + + + + STOPPED + Write '1' to enable interrupt for event STOPPED + 1 + 1 + + read + + Disabled + Read: Disabled + 0 + + + Enabled + Read: Enabled + 1 + + + + write + + Set + Enable + 1 + + + + + END + Write '1' to enable interrupt for event END + 2 + 2 + + read + + Disabled + Read: Disabled + 0 + + + Enabled + Read: Enabled + 1 + + + + write + + Set + Enable + 1 + + + + + + + INTENCLR + Disable interrupt + 0x308 + read-write + + + STARTED + Write '1' to disable interrupt for event STARTED + 0 + 0 + + read + + Disabled + Read: Disabled + 0 + + + Enabled + Read: Enabled + 1 + + + + write + + Clear + Disable + 1 + + + + + STOPPED + Write '1' to disable interrupt for event STOPPED + 1 + 1 + + read + + Disabled + Read: Disabled + 0 + + + Enabled + Read: Enabled + 1 + + + + write + + Clear + Disable + 1 + + + + + END + Write '1' to disable interrupt for event END + 2 + 2 + + read + + Disabled + Read: Disabled + 0 + + + Enabled + Read: Enabled + 1 + + + + write + + Clear + Disable + 1 + + + + + + + ENABLE + PDM module enable register + 0x500 + read-write + 0x00000000 + + + ENABLE + Enable or disable PDM module + 0 + 0 + + + Disabled + Disable + 0 + + + Enabled + Enable + 1 + + + + + + + PDMCLKCTRL + PDM clock generator control + 0x504 + read-write + 0x08400000 + + + FREQ + PDM_CLK frequency + 0 + 31 + + + 1000K + PDM_CLK = 32 MHz / 32 = 1.000 MHz + 0x08000000 + + + Default + PDM_CLK = 32 MHz / 31 = 1.032 MHz + 0x08400000 + + + 1067K + PDM_CLK = 32 MHz / 30 = 1.067 MHz + 0x08800000 + + + + + + + MODE + Defines the routing of the connected PDM microphones' signals + 0x508 + read-write + 0x00000000 + + + OPERATION + Mono or stereo operation + 0 + 0 + + + Stereo + Sample and store one pair (Left + Right) of 16bit samples per RAM word R=[31:16]; L=[15:0] + 0 + + + Mono + Sample and store two successive Left samples (16 bit each) per RAM word L1=[31:16]; L0=[15:0] + 1 + + + + + EDGE + Defines on which PDM_CLK edge Left (or mono) is sampled + 1 + 1 + + + LeftFalling + Left (or mono) is sampled on falling edge of PDM_CLK + 0 + + + LeftRising + Left (or mono) is sampled on rising edge of PDM_CLK + 1 + + + + + + + GAINL + Left output gain adjustment + 0x518 + read-write + 0x00000028 + + + GAINL + Left output gain adjustment, in 0.5 dB steps, around the default module gain (see electrical parameters) 0x00 -20 dB gain adjust 0x01 -19.5 dB gain adjust (...) 0x27 -0.5 dB gain adjust 0x28 0 dB gain adjust 0x29 +0.5 dB gain adjust (...) 0x4F +19.5 dB gain adjust 0x50 +20 dB gain adjust + 0 + 6 + + + MinGain + -20dB gain adjustment (minimum) + 0x00 + + + DefaultGain + 0dB gain adjustment ('2500 RMS' requirement) + 0x28 + + + MaxGain + +20dB gain adjustment (maximum) + 0x50 + + + + + + + GAINR + Right output gain adjustment + 0x51C + read-write + 0x00000028 + + + GAINR + Right output gain adjustment, in 0.5 dB steps, around the default module gain (see electrical parameters) + 0 + 7 + + + MinGain + -20dB gain adjustment (minimum) + 0x00 + + + DefaultGain + 0dB gain adjustment ('2500 RMS' requirement) + 0x28 + + + MaxGain + +20dB gain adjustment (maximum) + 0x50 + + + + + + + PSEL + Unspecified + PDM_PSEL + read-write + 0x540 + + CLK + Pin number configuration for PDM CLK signal + 0x000 + read-write + 0xFFFFFFFF + + + PIN + Pin number + 0 + 4 + + + CONNECT + Connection + 31 + 31 + + + Disconnected + Disconnect + 1 + + + Connected + Connect + 0 + + + + + + + DIN + Pin number configuration for PDM DIN signal + 0x004 + read-write + 0xFFFFFFFF + + + PIN + Pin number + 0 + 4 + + + CONNECT + Connection + 31 + 31 + + + Disconnected + Disconnect + 1 + + + Connected + Connect + 0 + + + + + + + + SAMPLE + Unspecified + PDM_SAMPLE + read-write + 0x560 + + PTR + RAM address pointer to write samples to with EasyDMA + 0x000 + read-write + + + SAMPLEPTR + Address to write PDM samples to over DMA + 0 + 31 + + + + + MAXCNT + Number of samples to allocate memory for in EasyDMA mode + 0x004 + read-write + + + BUFFSIZE + Length of DMA RAM allocation in number of samples + 0 + 14 + + + + + + + + NVMC + Non Volatile Memory Controller + 0x4001E000 + + 0 + 0x1000 + registers + + NVMC + 0x20 + + + READY + Ready flag + 0x400 + read-only + + + READY + NVMC is ready or busy + 0 + 0 + + + Busy + NVMC is busy (on-going write or erase operation) + 0 + + + Ready + NVMC is ready + 1 + + + + + + + CONFIG + Configuration register + 0x504 + read-write + + + WEN + Program memory access mode. It is strongly recommended to only activate erase and write modes when they are actively used. Enabling write or erase will invalidate the cache and keep it invalidated. + 0 + 1 + + + Ren + Read only access + 0 + + + Wen + Write Enabled + 1 + + + Een + Erase enabled + 2 + + + + + + + ERASEPAGE + Register for erasing a page in Code area + 0x508 + read-write + + + ERASEPAGE + Register for starting erase of a page in Code area + 0 + 31 + + + + + ERASEPCR1 + Deprecated register - Register for erasing a page in Code area. Equivalent to ERASEPAGE. + 0x508 + read-write + ERASEPAGE + + + ERASEPCR1 + Register for erasing a page in Code area. Equivalent to ERASEPAGE. + 0 + 31 + + + + + ERASEALL + Register for erasing all non-volatile user memory + 0x50C + read-write + + + ERASEALL + Erase all non-volatile memory including UICR registers. Note that code erase has to be enabled by CONFIG.EEN before the UICR can be erased. + 0 + 0 + + + NoOperation + No operation + 0 + + + Erase + Start chip erase + 1 + + + + + + + ERASEPCR0 + Deprecated register - Register for erasing a page in Code area. Equivalent to ERASEPAGE. + 0x510 + read-write + + + ERASEPCR0 + Register for starting erase of a page in Code area. Equivalent to ERASEPAGE. + 0 + 31 + + + + + ERASEUICR + Register for erasing User Information Configuration Registers + 0x514 + read-write + + + ERASEUICR + Register starting erase of all User Information Configuration Registers. Note that code erase has to be enabled by CONFIG.EEN before the UICR can be erased. + 0 + 0 + + + NoOperation + No operation + 0 + + + Erase + Start erase of UICR + 1 + + + + + + + ICACHECNF + I-Code cache configuration register. + 0x540 + read-write + 0x00000000 + + + CACHEEN + Cache enable + 0 + 0 + + + Disabled + Disable cache. Invalidates all cache entries. + 0 + + + Enabled + Enable cache + 1 + + + + + CACHEPROFEN + Cache profiling enable + 8 + 8 + + + Disabled + Disable cache profiling + 0 + + + Enabled + Enable cache profiling + 1 + + + + + + + IHIT + I-Code cache hit counter. + 0x548 + read-write + + + HITS + Number of cache hits + 0 + 31 + + + + + IMISS + I-Code cache miss counter. + 0x54C + read-write + + + MISSES + Number of cache misses + 0 + 31 + + + + + + + PPI + Programmable Peripheral Interconnect + 0x4001F000 + + 0 + 0x1000 + registers + + PPI + 0x20 + + + 6 + 0x008 + TASKS_CHG[%s] + Channel group tasks + PPI_TASKS_CHG + write-only + 0x000 + + EN + Description cluster: Enable channel group n + 0x000 + write-only + + + EN + Enable channel group n + 0 + 0 + + + Trigger + Trigger task + 1 + + + + + + + DIS + Description cluster: Disable channel group n + 0x004 + write-only + + + DIS + Disable channel group n + 0 + 0 + + + Trigger + Trigger task + 1 + + + + + + + + CHEN + Channel enable register + 0x500 + read-write + + + CH0 + Enable or disable channel 0 + 0 + 0 + + + Disabled + Disable channel + 0 + + + Enabled + Enable channel + 1 + + + + + CH1 + Enable or disable channel 1 + 1 + 1 + + + Disabled + Disable channel + 0 + + + Enabled + Enable channel + 1 + + + + + CH2 + Enable or disable channel 2 + 2 + 2 + + + Disabled + Disable channel + 0 + + + Enabled + Enable channel + 1 + + + + + CH3 + Enable or disable channel 3 + 3 + 3 + + + Disabled + Disable channel + 0 + + + Enabled + Enable channel + 1 + + + + + CH4 + Enable or disable channel 4 + 4 + 4 + + + Disabled + Disable channel + 0 + + + Enabled + Enable channel + 1 + + + + + CH5 + Enable or disable channel 5 + 5 + 5 + + + Disabled + Disable channel + 0 + + + Enabled + Enable channel + 1 + + + + + CH6 + Enable or disable channel 6 + 6 + 6 + + + Disabled + Disable channel + 0 + + + Enabled + Enable channel + 1 + + + + + CH7 + Enable or disable channel 7 + 7 + 7 + + + Disabled + Disable channel + 0 + + + Enabled + Enable channel + 1 + + + + + CH8 + Enable or disable channel 8 + 8 + 8 + + + Disabled + Disable channel + 0 + + + Enabled + Enable channel + 1 + + + + + CH9 + Enable or disable channel 9 + 9 + 9 + + + Disabled + Disable channel + 0 + + + Enabled + Enable channel + 1 + + + + + CH10 + Enable or disable channel 10 + 10 + 10 + + + Disabled + Disable channel + 0 + + + Enabled + Enable channel + 1 + + + + + CH11 + Enable or disable channel 11 + 11 + 11 + + + Disabled + Disable channel + 0 + + + Enabled + Enable channel + 1 + + + + + CH12 + Enable or disable channel 12 + 12 + 12 + + + Disabled + Disable channel + 0 + + + Enabled + Enable channel + 1 + + + + + CH13 + Enable or disable channel 13 + 13 + 13 + + + Disabled + Disable channel + 0 + + + Enabled + Enable channel + 1 + + + + + CH14 + Enable or disable channel 14 + 14 + 14 + + + Disabled + Disable channel + 0 + + + Enabled + Enable channel + 1 + + + + + CH15 + Enable or disable channel 15 + 15 + 15 + + + Disabled + Disable channel + 0 + + + Enabled + Enable channel + 1 + + + + + CH16 + Enable or disable channel 16 + 16 + 16 + + + Disabled + Disable channel + 0 + + + Enabled + Enable channel + 1 + + + + + CH17 + Enable or disable channel 17 + 17 + 17 + + + Disabled + Disable channel + 0 + + + Enabled + Enable channel + 1 + + + + + CH18 + Enable or disable channel 18 + 18 + 18 + + + Disabled + Disable channel + 0 + + + Enabled + Enable channel + 1 + + + + + CH19 + Enable or disable channel 19 + 19 + 19 + + + Disabled + Disable channel + 0 + + + Enabled + Enable channel + 1 + + + + + CH20 + Enable or disable channel 20 + 20 + 20 + + + Disabled + Disable channel + 0 + + + Enabled + Enable channel + 1 + + + + + CH21 + Enable or disable channel 21 + 21 + 21 + + + Disabled + Disable channel + 0 + + + Enabled + Enable channel + 1 + + + + + CH22 + Enable or disable channel 22 + 22 + 22 + + + Disabled + Disable channel + 0 + + + Enabled + Enable channel + 1 + + + + + CH23 + Enable or disable channel 23 + 23 + 23 + + + Disabled + Disable channel + 0 + + + Enabled + Enable channel + 1 + + + + + CH24 + Enable or disable channel 24 + 24 + 24 + + + Disabled + Disable channel + 0 + + + Enabled + Enable channel + 1 + + + + + CH25 + Enable or disable channel 25 + 25 + 25 + + + Disabled + Disable channel + 0 + + + Enabled + Enable channel + 1 + + + + + CH26 + Enable or disable channel 26 + 26 + 26 + + + Disabled + Disable channel + 0 + + + Enabled + Enable channel + 1 + + + + + CH27 + Enable or disable channel 27 + 27 + 27 + + + Disabled + Disable channel + 0 + + + Enabled + Enable channel + 1 + + + + + CH28 + Enable or disable channel 28 + 28 + 28 + + + Disabled + Disable channel + 0 + + + Enabled + Enable channel + 1 + + + + + CH29 + Enable or disable channel 29 + 29 + 29 + + + Disabled + Disable channel + 0 + + + Enabled + Enable channel + 1 + + + + + CH30 + Enable or disable channel 30 + 30 + 30 + + + Disabled + Disable channel + 0 + + + Enabled + Enable channel + 1 + + + + + CH31 + Enable or disable channel 31 + 31 + 31 + + + Disabled + Disable channel + 0 + + + Enabled + Enable channel + 1 + + + + + + + CHENSET + Channel enable set register + 0x504 + read-write + oneToSet + + + CH0 + Channel 0 enable set register. Writing '0' has no effect + 0 + 0 + + read + + Disabled + Read: channel disabled + 0 + + + Enabled + Read: channel enabled + 1 + + + + write + + Set + Write: Enable channel + 1 + + + + + CH1 + Channel 1 enable set register. Writing '0' has no effect + 1 + 1 + + read + + Disabled + Read: channel disabled + 0 + + + Enabled + Read: channel enabled + 1 + + + + write + + Set + Write: Enable channel + 1 + + + + + CH2 + Channel 2 enable set register. Writing '0' has no effect + 2 + 2 + + read + + Disabled + Read: channel disabled + 0 + + + Enabled + Read: channel enabled + 1 + + + + write + + Set + Write: Enable channel + 1 + + + + + CH3 + Channel 3 enable set register. Writing '0' has no effect + 3 + 3 + + read + + Disabled + Read: channel disabled + 0 + + + Enabled + Read: channel enabled + 1 + + + + write + + Set + Write: Enable channel + 1 + + + + + CH4 + Channel 4 enable set register. Writing '0' has no effect + 4 + 4 + + read + + Disabled + Read: channel disabled + 0 + + + Enabled + Read: channel enabled + 1 + + + + write + + Set + Write: Enable channel + 1 + + + + + CH5 + Channel 5 enable set register. Writing '0' has no effect + 5 + 5 + + read + + Disabled + Read: channel disabled + 0 + + + Enabled + Read: channel enabled + 1 + + + + write + + Set + Write: Enable channel + 1 + + + + + CH6 + Channel 6 enable set register. Writing '0' has no effect + 6 + 6 + + read + + Disabled + Read: channel disabled + 0 + + + Enabled + Read: channel enabled + 1 + + + + write + + Set + Write: Enable channel + 1 + + + + + CH7 + Channel 7 enable set register. Writing '0' has no effect + 7 + 7 + + read + + Disabled + Read: channel disabled + 0 + + + Enabled + Read: channel enabled + 1 + + + + write + + Set + Write: Enable channel + 1 + + + + + CH8 + Channel 8 enable set register. Writing '0' has no effect + 8 + 8 + + read + + Disabled + Read: channel disabled + 0 + + + Enabled + Read: channel enabled + 1 + + + + write + + Set + Write: Enable channel + 1 + + + + + CH9 + Channel 9 enable set register. Writing '0' has no effect + 9 + 9 + + read + + Disabled + Read: channel disabled + 0 + + + Enabled + Read: channel enabled + 1 + + + + write + + Set + Write: Enable channel + 1 + + + + + CH10 + Channel 10 enable set register. Writing '0' has no effect + 10 + 10 + + read + + Disabled + Read: channel disabled + 0 + + + Enabled + Read: channel enabled + 1 + + + + write + + Set + Write: Enable channel + 1 + + + + + CH11 + Channel 11 enable set register. Writing '0' has no effect + 11 + 11 + + read + + Disabled + Read: channel disabled + 0 + + + Enabled + Read: channel enabled + 1 + + + + write + + Set + Write: Enable channel + 1 + + + + + CH12 + Channel 12 enable set register. Writing '0' has no effect + 12 + 12 + + read + + Disabled + Read: channel disabled + 0 + + + Enabled + Read: channel enabled + 1 + + + + write + + Set + Write: Enable channel + 1 + + + + + CH13 + Channel 13 enable set register. Writing '0' has no effect + 13 + 13 + + read + + Disabled + Read: channel disabled + 0 + + + Enabled + Read: channel enabled + 1 + + + + write + + Set + Write: Enable channel + 1 + + + + + CH14 + Channel 14 enable set register. Writing '0' has no effect + 14 + 14 + + read + + Disabled + Read: channel disabled + 0 + + + Enabled + Read: channel enabled + 1 + + + + write + + Set + Write: Enable channel + 1 + + + + + CH15 + Channel 15 enable set register. Writing '0' has no effect + 15 + 15 + + read + + Disabled + Read: channel disabled + 0 + + + Enabled + Read: channel enabled + 1 + + + + write + + Set + Write: Enable channel + 1 + + + + + CH16 + Channel 16 enable set register. Writing '0' has no effect + 16 + 16 + + read + + Disabled + Read: channel disabled + 0 + + + Enabled + Read: channel enabled + 1 + + + + write + + Set + Write: Enable channel + 1 + + + + + CH17 + Channel 17 enable set register. Writing '0' has no effect + 17 + 17 + + read + + Disabled + Read: channel disabled + 0 + + + Enabled + Read: channel enabled + 1 + + + + write + + Set + Write: Enable channel + 1 + + + + + CH18 + Channel 18 enable set register. Writing '0' has no effect + 18 + 18 + + read + + Disabled + Read: channel disabled + 0 + + + Enabled + Read: channel enabled + 1 + + + + write + + Set + Write: Enable channel + 1 + + + + + CH19 + Channel 19 enable set register. Writing '0' has no effect + 19 + 19 + + read + + Disabled + Read: channel disabled + 0 + + + Enabled + Read: channel enabled + 1 + + + + write + + Set + Write: Enable channel + 1 + + + + + CH20 + Channel 20 enable set register. Writing '0' has no effect + 20 + 20 + + read + + Disabled + Read: channel disabled + 0 + + + Enabled + Read: channel enabled + 1 + + + + write + + Set + Write: Enable channel + 1 + + + + + CH21 + Channel 21 enable set register. Writing '0' has no effect + 21 + 21 + + read + + Disabled + Read: channel disabled + 0 + + + Enabled + Read: channel enabled + 1 + + + + write + + Set + Write: Enable channel + 1 + + + + + CH22 + Channel 22 enable set register. Writing '0' has no effect + 22 + 22 + + read + + Disabled + Read: channel disabled + 0 + + + Enabled + Read: channel enabled + 1 + + + + write + + Set + Write: Enable channel + 1 + + + + + CH23 + Channel 23 enable set register. Writing '0' has no effect + 23 + 23 + + read + + Disabled + Read: channel disabled + 0 + + + Enabled + Read: channel enabled + 1 + + + + write + + Set + Write: Enable channel + 1 + + + + + CH24 + Channel 24 enable set register. Writing '0' has no effect + 24 + 24 + + read + + Disabled + Read: channel disabled + 0 + + + Enabled + Read: channel enabled + 1 + + + + write + + Set + Write: Enable channel + 1 + + + + + CH25 + Channel 25 enable set register. Writing '0' has no effect + 25 + 25 + + read + + Disabled + Read: channel disabled + 0 + + + Enabled + Read: channel enabled + 1 + + + + write + + Set + Write: Enable channel + 1 + + + + + CH26 + Channel 26 enable set register. Writing '0' has no effect + 26 + 26 + + read + + Disabled + Read: channel disabled + 0 + + + Enabled + Read: channel enabled + 1 + + + + write + + Set + Write: Enable channel + 1 + + + + + CH27 + Channel 27 enable set register. Writing '0' has no effect + 27 + 27 + + read + + Disabled + Read: channel disabled + 0 + + + Enabled + Read: channel enabled + 1 + + + + write + + Set + Write: Enable channel + 1 + + + + + CH28 + Channel 28 enable set register. Writing '0' has no effect + 28 + 28 + + read + + Disabled + Read: channel disabled + 0 + + + Enabled + Read: channel enabled + 1 + + + + write + + Set + Write: Enable channel + 1 + + + + + CH29 + Channel 29 enable set register. Writing '0' has no effect + 29 + 29 + + read + + Disabled + Read: channel disabled + 0 + + + Enabled + Read: channel enabled + 1 + + + + write + + Set + Write: Enable channel + 1 + + + + + CH30 + Channel 30 enable set register. Writing '0' has no effect + 30 + 30 + + read + + Disabled + Read: channel disabled + 0 + + + Enabled + Read: channel enabled + 1 + + + + write + + Set + Write: Enable channel + 1 + + + + + CH31 + Channel 31 enable set register. Writing '0' has no effect + 31 + 31 + + read + + Disabled + Read: channel disabled + 0 + + + Enabled + Read: channel enabled + 1 + + + + write + + Set + Write: Enable channel + 1 + + + + + + + CHENCLR + Channel enable clear register + 0x508 + read-write + oneToClear + + + CH0 + Channel 0 enable clear register. Writing '0' has no effect + 0 + 0 + + read + + Disabled + Read: channel disabled + 0 + + + Enabled + Read: channel enabled + 1 + + + + write + + Clear + Write: disable channel + 1 + + + + + CH1 + Channel 1 enable clear register. Writing '0' has no effect + 1 + 1 + + read + + Disabled + Read: channel disabled + 0 + + + Enabled + Read: channel enabled + 1 + + + + write + + Clear + Write: disable channel + 1 + + + + + CH2 + Channel 2 enable clear register. Writing '0' has no effect + 2 + 2 + + read + + Disabled + Read: channel disabled + 0 + + + Enabled + Read: channel enabled + 1 + + + + write + + Clear + Write: disable channel + 1 + + + + + CH3 + Channel 3 enable clear register. Writing '0' has no effect + 3 + 3 + + read + + Disabled + Read: channel disabled + 0 + + + Enabled + Read: channel enabled + 1 + + + + write + + Clear + Write: disable channel + 1 + + + + + CH4 + Channel 4 enable clear register. Writing '0' has no effect + 4 + 4 + + read + + Disabled + Read: channel disabled + 0 + + + Enabled + Read: channel enabled + 1 + + + + write + + Clear + Write: disable channel + 1 + + + + + CH5 + Channel 5 enable clear register. Writing '0' has no effect + 5 + 5 + + read + + Disabled + Read: channel disabled + 0 + + + Enabled + Read: channel enabled + 1 + + + + write + + Clear + Write: disable channel + 1 + + + + + CH6 + Channel 6 enable clear register. Writing '0' has no effect + 6 + 6 + + read + + Disabled + Read: channel disabled + 0 + + + Enabled + Read: channel enabled + 1 + + + + write + + Clear + Write: disable channel + 1 + + + + + CH7 + Channel 7 enable clear register. Writing '0' has no effect + 7 + 7 + + read + + Disabled + Read: channel disabled + 0 + + + Enabled + Read: channel enabled + 1 + + + + write + + Clear + Write: disable channel + 1 + + + + + CH8 + Channel 8 enable clear register. Writing '0' has no effect + 8 + 8 + + read + + Disabled + Read: channel disabled + 0 + + + Enabled + Read: channel enabled + 1 + + + + write + + Clear + Write: disable channel + 1 + + + + + CH9 + Channel 9 enable clear register. Writing '0' has no effect + 9 + 9 + + read + + Disabled + Read: channel disabled + 0 + + + Enabled + Read: channel enabled + 1 + + + + write + + Clear + Write: disable channel + 1 + + + + + CH10 + Channel 10 enable clear register. Writing '0' has no effect + 10 + 10 + + read + + Disabled + Read: channel disabled + 0 + + + Enabled + Read: channel enabled + 1 + + + + write + + Clear + Write: disable channel + 1 + + + + + CH11 + Channel 11 enable clear register. Writing '0' has no effect + 11 + 11 + + read + + Disabled + Read: channel disabled + 0 + + + Enabled + Read: channel enabled + 1 + + + + write + + Clear + Write: disable channel + 1 + + + + + CH12 + Channel 12 enable clear register. Writing '0' has no effect + 12 + 12 + + read + + Disabled + Read: channel disabled + 0 + + + Enabled + Read: channel enabled + 1 + + + + write + + Clear + Write: disable channel + 1 + + + + + CH13 + Channel 13 enable clear register. Writing '0' has no effect + 13 + 13 + + read + + Disabled + Read: channel disabled + 0 + + + Enabled + Read: channel enabled + 1 + + + + write + + Clear + Write: disable channel + 1 + + + + + CH14 + Channel 14 enable clear register. Writing '0' has no effect + 14 + 14 + + read + + Disabled + Read: channel disabled + 0 + + + Enabled + Read: channel enabled + 1 + + + + write + + Clear + Write: disable channel + 1 + + + + + CH15 + Channel 15 enable clear register. Writing '0' has no effect + 15 + 15 + + read + + Disabled + Read: channel disabled + 0 + + + Enabled + Read: channel enabled + 1 + + + + write + + Clear + Write: disable channel + 1 + + + + + CH16 + Channel 16 enable clear register. Writing '0' has no effect + 16 + 16 + + read + + Disabled + Read: channel disabled + 0 + + + Enabled + Read: channel enabled + 1 + + + + write + + Clear + Write: disable channel + 1 + + + + + CH17 + Channel 17 enable clear register. Writing '0' has no effect + 17 + 17 + + read + + Disabled + Read: channel disabled + 0 + + + Enabled + Read: channel enabled + 1 + + + + write + + Clear + Write: disable channel + 1 + + + + + CH18 + Channel 18 enable clear register. Writing '0' has no effect + 18 + 18 + + read + + Disabled + Read: channel disabled + 0 + + + Enabled + Read: channel enabled + 1 + + + + write + + Clear + Write: disable channel + 1 + + + + + CH19 + Channel 19 enable clear register. Writing '0' has no effect + 19 + 19 + + read + + Disabled + Read: channel disabled + 0 + + + Enabled + Read: channel enabled + 1 + + + + write + + Clear + Write: disable channel + 1 + + + + + CH20 + Channel 20 enable clear register. Writing '0' has no effect + 20 + 20 + + read + + Disabled + Read: channel disabled + 0 + + + Enabled + Read: channel enabled + 1 + + + + write + + Clear + Write: disable channel + 1 + + + + + CH21 + Channel 21 enable clear register. Writing '0' has no effect + 21 + 21 + + read + + Disabled + Read: channel disabled + 0 + + + Enabled + Read: channel enabled + 1 + + + + write + + Clear + Write: disable channel + 1 + + + + + CH22 + Channel 22 enable clear register. Writing '0' has no effect + 22 + 22 + + read + + Disabled + Read: channel disabled + 0 + + + Enabled + Read: channel enabled + 1 + + + + write + + Clear + Write: disable channel + 1 + + + + + CH23 + Channel 23 enable clear register. Writing '0' has no effect + 23 + 23 + + read + + Disabled + Read: channel disabled + 0 + + + Enabled + Read: channel enabled + 1 + + + + write + + Clear + Write: disable channel + 1 + + + + + CH24 + Channel 24 enable clear register. Writing '0' has no effect + 24 + 24 + + read + + Disabled + Read: channel disabled + 0 + + + Enabled + Read: channel enabled + 1 + + + + write + + Clear + Write: disable channel + 1 + + + + + CH25 + Channel 25 enable clear register. Writing '0' has no effect + 25 + 25 + + read + + Disabled + Read: channel disabled + 0 + + + Enabled + Read: channel enabled + 1 + + + + write + + Clear + Write: disable channel + 1 + + + + + CH26 + Channel 26 enable clear register. Writing '0' has no effect + 26 + 26 + + read + + Disabled + Read: channel disabled + 0 + + + Enabled + Read: channel enabled + 1 + + + + write + + Clear + Write: disable channel + 1 + + + + + CH27 + Channel 27 enable clear register. Writing '0' has no effect + 27 + 27 + + read + + Disabled + Read: channel disabled + 0 + + + Enabled + Read: channel enabled + 1 + + + + write + + Clear + Write: disable channel + 1 + + + + + CH28 + Channel 28 enable clear register. Writing '0' has no effect + 28 + 28 + + read + + Disabled + Read: channel disabled + 0 + + + Enabled + Read: channel enabled + 1 + + + + write + + Clear + Write: disable channel + 1 + + + + + CH29 + Channel 29 enable clear register. Writing '0' has no effect + 29 + 29 + + read + + Disabled + Read: channel disabled + 0 + + + Enabled + Read: channel enabled + 1 + + + + write + + Clear + Write: disable channel + 1 + + + + + CH30 + Channel 30 enable clear register. Writing '0' has no effect + 30 + 30 + + read + + Disabled + Read: channel disabled + 0 + + + Enabled + Read: channel enabled + 1 + + + + write + + Clear + Write: disable channel + 1 + + + + + CH31 + Channel 31 enable clear register. Writing '0' has no effect + 31 + 31 + + read + + Disabled + Read: channel disabled + 0 + + + Enabled + Read: channel enabled + 1 + + + + write + + Clear + Write: disable channel + 1 + + + + + + + 20 + 0x008 + CH[%s] + PPI Channel + PPI_CH + read-write + 0x510 + + EEP + Description cluster: Channel n event end-point + 0x000 + read-write + + + EEP + Pointer to event register. Accepts only addresses to registers from the Event group. + 0 + 31 + + + + + TEP + Description cluster: Channel n task end-point + 0x004 + read-write + + + TEP + Pointer to task register. Accepts only addresses to registers from the Task group. + 0 + 31 + + + + + + 0x6 + 0x4 + CHG[%s] + Description collection: Channel group n + 0x800 + read-write + + + CH0 + Include or exclude channel 0 + 0 + 0 + + + Excluded + Exclude + 0 + + + Included + Include + 1 + + + + + CH1 + Include or exclude channel 1 + 1 + 1 + + + Excluded + Exclude + 0 + + + Included + Include + 1 + + + + + CH2 + Include or exclude channel 2 + 2 + 2 + + + Excluded + Exclude + 0 + + + Included + Include + 1 + + + + + CH3 + Include or exclude channel 3 + 3 + 3 + + + Excluded + Exclude + 0 + + + Included + Include + 1 + + + + + CH4 + Include or exclude channel 4 + 4 + 4 + + + Excluded + Exclude + 0 + + + Included + Include + 1 + + + + + CH5 + Include or exclude channel 5 + 5 + 5 + + + Excluded + Exclude + 0 + + + Included + Include + 1 + + + + + CH6 + Include or exclude channel 6 + 6 + 6 + + + Excluded + Exclude + 0 + + + Included + Include + 1 + + + + + CH7 + Include or exclude channel 7 + 7 + 7 + + + Excluded + Exclude + 0 + + + Included + Include + 1 + + + + + CH8 + Include or exclude channel 8 + 8 + 8 + + + Excluded + Exclude + 0 + + + Included + Include + 1 + + + + + CH9 + Include or exclude channel 9 + 9 + 9 + + + Excluded + Exclude + 0 + + + Included + Include + 1 + + + + + CH10 + Include or exclude channel 10 + 10 + 10 + + + Excluded + Exclude + 0 + + + Included + Include + 1 + + + + + CH11 + Include or exclude channel 11 + 11 + 11 + + + Excluded + Exclude + 0 + + + Included + Include + 1 + + + + + CH12 + Include or exclude channel 12 + 12 + 12 + + + Excluded + Exclude + 0 + + + Included + Include + 1 + + + + + CH13 + Include or exclude channel 13 + 13 + 13 + + + Excluded + Exclude + 0 + + + Included + Include + 1 + + + + + CH14 + Include or exclude channel 14 + 14 + 14 + + + Excluded + Exclude + 0 + + + Included + Include + 1 + + + + + CH15 + Include or exclude channel 15 + 15 + 15 + + + Excluded + Exclude + 0 + + + Included + Include + 1 + + + + + CH16 + Include or exclude channel 16 + 16 + 16 + + + Excluded + Exclude + 0 + + + Included + Include + 1 + + + + + CH17 + Include or exclude channel 17 + 17 + 17 + + + Excluded + Exclude + 0 + + + Included + Include + 1 + + + + + CH18 + Include or exclude channel 18 + 18 + 18 + + + Excluded + Exclude + 0 + + + Included + Include + 1 + + + + + CH19 + Include or exclude channel 19 + 19 + 19 + + + Excluded + Exclude + 0 + + + Included + Include + 1 + + + + + CH20 + Include or exclude channel 20 + 20 + 20 + + + Excluded + Exclude + 0 + + + Included + Include + 1 + + + + + CH21 + Include or exclude channel 21 + 21 + 21 + + + Excluded + Exclude + 0 + + + Included + Include + 1 + + + + + CH22 + Include or exclude channel 22 + 22 + 22 + + + Excluded + Exclude + 0 + + + Included + Include + 1 + + + + + CH23 + Include or exclude channel 23 + 23 + 23 + + + Excluded + Exclude + 0 + + + Included + Include + 1 + + + + + CH24 + Include or exclude channel 24 + 24 + 24 + + + Excluded + Exclude + 0 + + + Included + Include + 1 + + + + + CH25 + Include or exclude channel 25 + 25 + 25 + + + Excluded + Exclude + 0 + + + Included + Include + 1 + + + + + CH26 + Include or exclude channel 26 + 26 + 26 + + + Excluded + Exclude + 0 + + + Included + Include + 1 + + + + + CH27 + Include or exclude channel 27 + 27 + 27 + + + Excluded + Exclude + 0 + + + Included + Include + 1 + + + + + CH28 + Include or exclude channel 28 + 28 + 28 + + + Excluded + Exclude + 0 + + + Included + Include + 1 + + + + + CH29 + Include or exclude channel 29 + 29 + 29 + + + Excluded + Exclude + 0 + + + Included + Include + 1 + + + + + CH30 + Include or exclude channel 30 + 30 + 30 + + + Excluded + Exclude + 0 + + + Included + Include + 1 + + + + + CH31 + Include or exclude channel 31 + 31 + 31 + + + Excluded + Exclude + 0 + + + Included + Include + 1 + + + + + + + 32 + 0x004 + FORK[%s] + Fork + PPI_FORK + read-write + 0x910 + + TEP + Description cluster: Channel n task end-point + 0x000 + read-write + + + TEP + Pointer to task register + 0 + 31 + + + + + + + + MWU + Memory Watch Unit + 0x40020000 + + 0 + 0x1000 + registers + + + MWU + 32 + + MWU + 0x20 + + + 4 + 0x008 + EVENTS_REGION[%s] + Peripheral events. + MWU_EVENTS_REGION + read-write + 0x100 + + WA + Description cluster: Write access to region n detected + 0x000 + read-write + + + WA + Write access to region n detected + 0 + 0 + + + NotGenerated + Event not generated + 0 + + + Generated + Event generated + 1 + + + + + + + RA + Description cluster: Read access to region n detected + 0x004 + read-write + + + RA + Read access to region n detected + 0 + 0 + + + NotGenerated + Event not generated + 0 + + + Generated + Event generated + 1 + + + + + + + + 2 + 0x008 + EVENTS_PREGION[%s] + Peripheral events. + MWU_EVENTS_PREGION + read-write + 0x160 + + WA + Description cluster: Write access to peripheral region n detected + 0x000 + read-write + + + WA + Write access to peripheral region n detected + 0 + 0 + + + NotGenerated + Event not generated + 0 + + + Generated + Event generated + 1 + + + + + + + RA + Description cluster: Read access to peripheral region n detected + 0x004 + read-write + + + RA + Read access to peripheral region n detected + 0 + 0 + + + NotGenerated + Event not generated + 0 + + + Generated + Event generated + 1 + + + + + + + + INTEN + Enable or disable interrupt + 0x300 + read-write + + + REGION0WA + Enable or disable interrupt for event REGION0WA + 0 + 0 + + + Disabled + Disable + 0 + + + Enabled + Enable + 1 + + + + + REGION0RA + Enable or disable interrupt for event REGION0RA + 1 + 1 + + + Disabled + Disable + 0 + + + Enabled + Enable + 1 + + + + + REGION1WA + Enable or disable interrupt for event REGION1WA + 2 + 2 + + + Disabled + Disable + 0 + + + Enabled + Enable + 1 + + + + + REGION1RA + Enable or disable interrupt for event REGION1RA + 3 + 3 + + + Disabled + Disable + 0 + + + Enabled + Enable + 1 + + + + + REGION2WA + Enable or disable interrupt for event REGION2WA + 4 + 4 + + + Disabled + Disable + 0 + + + Enabled + Enable + 1 + + + + + REGION2RA + Enable or disable interrupt for event REGION2RA + 5 + 5 + + + Disabled + Disable + 0 + + + Enabled + Enable + 1 + + + + + REGION3WA + Enable or disable interrupt for event REGION3WA + 6 + 6 + + + Disabled + Disable + 0 + + + Enabled + Enable + 1 + + + + + REGION3RA + Enable or disable interrupt for event REGION3RA + 7 + 7 + + + Disabled + Disable + 0 + + + Enabled + Enable + 1 + + + + + PREGION0WA + Enable or disable interrupt for event PREGION0WA + 24 + 24 + + + Disabled + Disable + 0 + + + Enabled + Enable + 1 + + + + + PREGION0RA + Enable or disable interrupt for event PREGION0RA + 25 + 25 + + + Disabled + Disable + 0 + + + Enabled + Enable + 1 + + + + + PREGION1WA + Enable or disable interrupt for event PREGION1WA + 26 + 26 + + + Disabled + Disable + 0 + + + Enabled + Enable + 1 + + + + + PREGION1RA + Enable or disable interrupt for event PREGION1RA + 27 + 27 + + + Disabled + Disable + 0 + + + Enabled + Enable + 1 + + + + + + + INTENSET + Enable interrupt + 0x304 + read-write + + + REGION0WA + Write '1' to enable interrupt for event REGION0WA + 0 + 0 + + read + + Disabled + Read: Disabled + 0 + + + Enabled + Read: Enabled + 1 + + + + write + + Set + Enable + 1 + + + + + REGION0RA + Write '1' to enable interrupt for event REGION0RA + 1 + 1 + + read + + Disabled + Read: Disabled + 0 + + + Enabled + Read: Enabled + 1 + + + + write + + Set + Enable + 1 + + + + + REGION1WA + Write '1' to enable interrupt for event REGION1WA + 2 + 2 + + read + + Disabled + Read: Disabled + 0 + + + Enabled + Read: Enabled + 1 + + + + write + + Set + Enable + 1 + + + + + REGION1RA + Write '1' to enable interrupt for event REGION1RA + 3 + 3 + + read + + Disabled + Read: Disabled + 0 + + + Enabled + Read: Enabled + 1 + + + + write + + Set + Enable + 1 + + + + + REGION2WA + Write '1' to enable interrupt for event REGION2WA + 4 + 4 + + read + + Disabled + Read: Disabled + 0 + + + Enabled + Read: Enabled + 1 + + + + write + + Set + Enable + 1 + + + + + REGION2RA + Write '1' to enable interrupt for event REGION2RA + 5 + 5 + + read + + Disabled + Read: Disabled + 0 + + + Enabled + Read: Enabled + 1 + + + + write + + Set + Enable + 1 + + + + + REGION3WA + Write '1' to enable interrupt for event REGION3WA + 6 + 6 + + read + + Disabled + Read: Disabled + 0 + + + Enabled + Read: Enabled + 1 + + + + write + + Set + Enable + 1 + + + + + REGION3RA + Write '1' to enable interrupt for event REGION3RA + 7 + 7 + + read + + Disabled + Read: Disabled + 0 + + + Enabled + Read: Enabled + 1 + + + + write + + Set + Enable + 1 + + + + + PREGION0WA + Write '1' to enable interrupt for event PREGION0WA + 24 + 24 + + read + + Disabled + Read: Disabled + 0 + + + Enabled + Read: Enabled + 1 + + + + write + + Set + Enable + 1 + + + + + PREGION0RA + Write '1' to enable interrupt for event PREGION0RA + 25 + 25 + + read + + Disabled + Read: Disabled + 0 + + + Enabled + Read: Enabled + 1 + + + + write + + Set + Enable + 1 + + + + + PREGION1WA + Write '1' to enable interrupt for event PREGION1WA + 26 + 26 + + read + + Disabled + Read: Disabled + 0 + + + Enabled + Read: Enabled + 1 + + + + write + + Set + Enable + 1 + + + + + PREGION1RA + Write '1' to enable interrupt for event PREGION1RA + 27 + 27 + + read + + Disabled + Read: Disabled + 0 + + + Enabled + Read: Enabled + 1 + + + + write + + Set + Enable + 1 + + + + + + + INTENCLR + Disable interrupt + 0x308 + read-write + + + REGION0WA + Write '1' to disable interrupt for event REGION0WA + 0 + 0 + + read + + Disabled + Read: Disabled + 0 + + + Enabled + Read: Enabled + 1 + + + + write + + Clear + Disable + 1 + + + + + REGION0RA + Write '1' to disable interrupt for event REGION0RA + 1 + 1 + + read + + Disabled + Read: Disabled + 0 + + + Enabled + Read: Enabled + 1 + + + + write + + Clear + Disable + 1 + + + + + REGION1WA + Write '1' to disable interrupt for event REGION1WA + 2 + 2 + + read + + Disabled + Read: Disabled + 0 + + + Enabled + Read: Enabled + 1 + + + + write + + Clear + Disable + 1 + + + + + REGION1RA + Write '1' to disable interrupt for event REGION1RA + 3 + 3 + + read + + Disabled + Read: Disabled + 0 + + + Enabled + Read: Enabled + 1 + + + + write + + Clear + Disable + 1 + + + + + REGION2WA + Write '1' to disable interrupt for event REGION2WA + 4 + 4 + + read + + Disabled + Read: Disabled + 0 + + + Enabled + Read: Enabled + 1 + + + + write + + Clear + Disable + 1 + + + + + REGION2RA + Write '1' to disable interrupt for event REGION2RA + 5 + 5 + + read + + Disabled + Read: Disabled + 0 + + + Enabled + Read: Enabled + 1 + + + + write + + Clear + Disable + 1 + + + + + REGION3WA + Write '1' to disable interrupt for event REGION3WA + 6 + 6 + + read + + Disabled + Read: Disabled + 0 + + + Enabled + Read: Enabled + 1 + + + + write + + Clear + Disable + 1 + + + + + REGION3RA + Write '1' to disable interrupt for event REGION3RA + 7 + 7 + + read + + Disabled + Read: Disabled + 0 + + + Enabled + Read: Enabled + 1 + + + + write + + Clear + Disable + 1 + + + + + PREGION0WA + Write '1' to disable interrupt for event PREGION0WA + 24 + 24 + + read + + Disabled + Read: Disabled + 0 + + + Enabled + Read: Enabled + 1 + + + + write + + Clear + Disable + 1 + + + + + PREGION0RA + Write '1' to disable interrupt for event PREGION0RA + 25 + 25 + + read + + Disabled + Read: Disabled + 0 + + + Enabled + Read: Enabled + 1 + + + + write + + Clear + Disable + 1 + + + + + PREGION1WA + Write '1' to disable interrupt for event PREGION1WA + 26 + 26 + + read + + Disabled + Read: Disabled + 0 + + + Enabled + Read: Enabled + 1 + + + + write + + Clear + Disable + 1 + + + + + PREGION1RA + Write '1' to disable interrupt for event PREGION1RA + 27 + 27 + + read + + Disabled + Read: Disabled + 0 + + + Enabled + Read: Enabled + 1 + + + + write + + Clear + Disable + 1 + + + + + + + NMIEN + Enable or disable interrupt + 0x320 + read-write + + + REGION0WA + Enable or disable interrupt for event REGION0WA + 0 + 0 + + + Disabled + Disable + 0 + + + Enabled + Enable + 1 + + + + + REGION0RA + Enable or disable interrupt for event REGION0RA + 1 + 1 + + + Disabled + Disable + 0 + + + Enabled + Enable + 1 + + + + + REGION1WA + Enable or disable interrupt for event REGION1WA + 2 + 2 + + + Disabled + Disable + 0 + + + Enabled + Enable + 1 + + + + + REGION1RA + Enable or disable interrupt for event REGION1RA + 3 + 3 + + + Disabled + Disable + 0 + + + Enabled + Enable + 1 + + + + + REGION2WA + Enable or disable interrupt for event REGION2WA + 4 + 4 + + + Disabled + Disable + 0 + + + Enabled + Enable + 1 + + + + + REGION2RA + Enable or disable interrupt for event REGION2RA + 5 + 5 + + + Disabled + Disable + 0 + + + Enabled + Enable + 1 + + + + + REGION3WA + Enable or disable interrupt for event REGION3WA + 6 + 6 + + + Disabled + Disable + 0 + + + Enabled + Enable + 1 + + + + + REGION3RA + Enable or disable interrupt for event REGION3RA + 7 + 7 + + + Disabled + Disable + 0 + + + Enabled + Enable + 1 + + + + + PREGION0WA + Enable or disable interrupt for event PREGION0WA + 24 + 24 + + + Disabled + Disable + 0 + + + Enabled + Enable + 1 + + + + + PREGION0RA + Enable or disable interrupt for event PREGION0RA + 25 + 25 + + + Disabled + Disable + 0 + + + Enabled + Enable + 1 + + + + + PREGION1WA + Enable or disable interrupt for event PREGION1WA + 26 + 26 + + + Disabled + Disable + 0 + + + Enabled + Enable + 1 + + + + + PREGION1RA + Enable or disable interrupt for event PREGION1RA + 27 + 27 + + + Disabled + Disable + 0 + + + Enabled + Enable + 1 + + + + + + + NMIENSET + Enable interrupt + 0x324 + read-write + + + REGION0WA + Write '1' to enable interrupt for event REGION0WA + 0 + 0 + + read + + Disabled + Read: Disabled + 0 + + + Enabled + Read: Enabled + 1 + + + + write + + Set + Enable + 1 + + + + + REGION0RA + Write '1' to enable interrupt for event REGION0RA + 1 + 1 + + read + + Disabled + Read: Disabled + 0 + + + Enabled + Read: Enabled + 1 + + + + write + + Set + Enable + 1 + + + + + REGION1WA + Write '1' to enable interrupt for event REGION1WA + 2 + 2 + + read + + Disabled + Read: Disabled + 0 + + + Enabled + Read: Enabled + 1 + + + + write + + Set + Enable + 1 + + + + + REGION1RA + Write '1' to enable interrupt for event REGION1RA + 3 + 3 + + read + + Disabled + Read: Disabled + 0 + + + Enabled + Read: Enabled + 1 + + + + write + + Set + Enable + 1 + + + + + REGION2WA + Write '1' to enable interrupt for event REGION2WA + 4 + 4 + + read + + Disabled + Read: Disabled + 0 + + + Enabled + Read: Enabled + 1 + + + + write + + Set + Enable + 1 + + + + + REGION2RA + Write '1' to enable interrupt for event REGION2RA + 5 + 5 + + read + + Disabled + Read: Disabled + 0 + + + Enabled + Read: Enabled + 1 + + + + write + + Set + Enable + 1 + + + + + REGION3WA + Write '1' to enable interrupt for event REGION3WA + 6 + 6 + + read + + Disabled + Read: Disabled + 0 + + + Enabled + Read: Enabled + 1 + + + + write + + Set + Enable + 1 + + + + + REGION3RA + Write '1' to enable interrupt for event REGION3RA + 7 + 7 + + read + + Disabled + Read: Disabled + 0 + + + Enabled + Read: Enabled + 1 + + + + write + + Set + Enable + 1 + + + + + PREGION0WA + Write '1' to enable interrupt for event PREGION0WA + 24 + 24 + + read + + Disabled + Read: Disabled + 0 + + + Enabled + Read: Enabled + 1 + + + + write + + Set + Enable + 1 + + + + + PREGION0RA + Write '1' to enable interrupt for event PREGION0RA + 25 + 25 + + read + + Disabled + Read: Disabled + 0 + + + Enabled + Read: Enabled + 1 + + + + write + + Set + Enable + 1 + + + + + PREGION1WA + Write '1' to enable interrupt for event PREGION1WA + 26 + 26 + + read + + Disabled + Read: Disabled + 0 + + + Enabled + Read: Enabled + 1 + + + + write + + Set + Enable + 1 + + + + + PREGION1RA + Write '1' to enable interrupt for event PREGION1RA + 27 + 27 + + read + + Disabled + Read: Disabled + 0 + + + Enabled + Read: Enabled + 1 + + + + write + + Set + Enable + 1 + + + + + + + NMIENCLR + Disable interrupt + 0x328 + read-write + + + REGION0WA + Write '1' to disable interrupt for event REGION0WA + 0 + 0 + + read + + Disabled + Read: Disabled + 0 + + + Enabled + Read: Enabled + 1 + + + + write + + Clear + Disable + 1 + + + + + REGION0RA + Write '1' to disable interrupt for event REGION0RA + 1 + 1 + + read + + Disabled + Read: Disabled + 0 + + + Enabled + Read: Enabled + 1 + + + + write + + Clear + Disable + 1 + + + + + REGION1WA + Write '1' to disable interrupt for event REGION1WA + 2 + 2 + + read + + Disabled + Read: Disabled + 0 + + + Enabled + Read: Enabled + 1 + + + + write + + Clear + Disable + 1 + + + + + REGION1RA + Write '1' to disable interrupt for event REGION1RA + 3 + 3 + + read + + Disabled + Read: Disabled + 0 + + + Enabled + Read: Enabled + 1 + + + + write + + Clear + Disable + 1 + + + + + REGION2WA + Write '1' to disable interrupt for event REGION2WA + 4 + 4 + + read + + Disabled + Read: Disabled + 0 + + + Enabled + Read: Enabled + 1 + + + + write + + Clear + Disable + 1 + + + + + REGION2RA + Write '1' to disable interrupt for event REGION2RA + 5 + 5 + + read + + Disabled + Read: Disabled + 0 + + + Enabled + Read: Enabled + 1 + + + + write + + Clear + Disable + 1 + + + + + REGION3WA + Write '1' to disable interrupt for event REGION3WA + 6 + 6 + + read + + Disabled + Read: Disabled + 0 + + + Enabled + Read: Enabled + 1 + + + + write + + Clear + Disable + 1 + + + + + REGION3RA + Write '1' to disable interrupt for event REGION3RA + 7 + 7 + + read + + Disabled + Read: Disabled + 0 + + + Enabled + Read: Enabled + 1 + + + + write + + Clear + Disable + 1 + + + + + PREGION0WA + Write '1' to disable interrupt for event PREGION0WA + 24 + 24 + + read + + Disabled + Read: Disabled + 0 + + + Enabled + Read: Enabled + 1 + + + + write + + Clear + Disable + 1 + + + + + PREGION0RA + Write '1' to disable interrupt for event PREGION0RA + 25 + 25 + + read + + Disabled + Read: Disabled + 0 + + + Enabled + Read: Enabled + 1 + + + + write + + Clear + Disable + 1 + + + + + PREGION1WA + Write '1' to disable interrupt for event PREGION1WA + 26 + 26 + + read + + Disabled + Read: Disabled + 0 + + + Enabled + Read: Enabled + 1 + + + + write + + Clear + Disable + 1 + + + + + PREGION1RA + Write '1' to disable interrupt for event PREGION1RA + 27 + 27 + + read + + Disabled + Read: Disabled + 0 + + + Enabled + Read: Enabled + 1 + + + + write + + Clear + Disable + 1 + + + + + + + 2 + 0x008 + PERREGION[%s] + Unspecified + MWU_PERREGION + read-write + 0x400 + + SUBSTATWA + Description cluster: Source of event/interrupt in region n, write access detected while corresponding subregion was enabled for watching + 0x000 + read-write + oneToClear + + + SR0 + Subregion 0 in region n (write '1' to clear) + 0 + 0 + + + NoAccess + No write access occurred in this subregion + 0 + + + Access + Write access(es) occurred in this subregion + 1 + + + + + SR1 + Subregion 1 in region n (write '1' to clear) + 1 + 1 + + + NoAccess + No write access occurred in this subregion + 0 + + + Access + Write access(es) occurred in this subregion + 1 + + + + + SR2 + Subregion 2 in region n (write '1' to clear) + 2 + 2 + + + NoAccess + No write access occurred in this subregion + 0 + + + Access + Write access(es) occurred in this subregion + 1 + + + + + SR3 + Subregion 3 in region n (write '1' to clear) + 3 + 3 + + + NoAccess + No write access occurred in this subregion + 0 + + + Access + Write access(es) occurred in this subregion + 1 + + + + + SR4 + Subregion 4 in region n (write '1' to clear) + 4 + 4 + + + NoAccess + No write access occurred in this subregion + 0 + + + Access + Write access(es) occurred in this subregion + 1 + + + + + SR5 + Subregion 5 in region n (write '1' to clear) + 5 + 5 + + + NoAccess + No write access occurred in this subregion + 0 + + + Access + Write access(es) occurred in this subregion + 1 + + + + + SR6 + Subregion 6 in region n (write '1' to clear) + 6 + 6 + + + NoAccess + No write access occurred in this subregion + 0 + + + Access + Write access(es) occurred in this subregion + 1 + + + + + SR7 + Subregion 7 in region n (write '1' to clear) + 7 + 7 + + + NoAccess + No write access occurred in this subregion + 0 + + + Access + Write access(es) occurred in this subregion + 1 + + + + + SR8 + Subregion 8 in region n (write '1' to clear) + 8 + 8 + + + NoAccess + No write access occurred in this subregion + 0 + + + Access + Write access(es) occurred in this subregion + 1 + + + + + SR9 + Subregion 9 in region n (write '1' to clear) + 9 + 9 + + + NoAccess + No write access occurred in this subregion + 0 + + + Access + Write access(es) occurred in this subregion + 1 + + + + + SR10 + Subregion 10 in region n (write '1' to clear) + 10 + 10 + + + NoAccess + No write access occurred in this subregion + 0 + + + Access + Write access(es) occurred in this subregion + 1 + + + + + SR11 + Subregion 11 in region n (write '1' to clear) + 11 + 11 + + + NoAccess + No write access occurred in this subregion + 0 + + + Access + Write access(es) occurred in this subregion + 1 + + + + + SR12 + Subregion 12 in region n (write '1' to clear) + 12 + 12 + + + NoAccess + No write access occurred in this subregion + 0 + + + Access + Write access(es) occurred in this subregion + 1 + + + + + SR13 + Subregion 13 in region n (write '1' to clear) + 13 + 13 + + + NoAccess + No write access occurred in this subregion + 0 + + + Access + Write access(es) occurred in this subregion + 1 + + + + + SR14 + Subregion 14 in region n (write '1' to clear) + 14 + 14 + + + NoAccess + No write access occurred in this subregion + 0 + + + Access + Write access(es) occurred in this subregion + 1 + + + + + SR15 + Subregion 15 in region n (write '1' to clear) + 15 + 15 + + + NoAccess + No write access occurred in this subregion + 0 + + + Access + Write access(es) occurred in this subregion + 1 + + + + + SR16 + Subregion 16 in region n (write '1' to clear) + 16 + 16 + + + NoAccess + No write access occurred in this subregion + 0 + + + Access + Write access(es) occurred in this subregion + 1 + + + + + SR17 + Subregion 17 in region n (write '1' to clear) + 17 + 17 + + + NoAccess + No write access occurred in this subregion + 0 + + + Access + Write access(es) occurred in this subregion + 1 + + + + + SR18 + Subregion 18 in region n (write '1' to clear) + 18 + 18 + + + NoAccess + No write access occurred in this subregion + 0 + + + Access + Write access(es) occurred in this subregion + 1 + + + + + SR19 + Subregion 19 in region n (write '1' to clear) + 19 + 19 + + + NoAccess + No write access occurred in this subregion + 0 + + + Access + Write access(es) occurred in this subregion + 1 + + + + + SR20 + Subregion 20 in region n (write '1' to clear) + 20 + 20 + + + NoAccess + No write access occurred in this subregion + 0 + + + Access + Write access(es) occurred in this subregion + 1 + + + + + SR21 + Subregion 21 in region n (write '1' to clear) + 21 + 21 + + + NoAccess + No write access occurred in this subregion + 0 + + + Access + Write access(es) occurred in this subregion + 1 + + + + + SR22 + Subregion 22 in region n (write '1' to clear) + 22 + 22 + + + NoAccess + No write access occurred in this subregion + 0 + + + Access + Write access(es) occurred in this subregion + 1 + + + + + SR23 + Subregion 23 in region n (write '1' to clear) + 23 + 23 + + + NoAccess + No write access occurred in this subregion + 0 + + + Access + Write access(es) occurred in this subregion + 1 + + + + + SR24 + Subregion 24 in region n (write '1' to clear) + 24 + 24 + + + NoAccess + No write access occurred in this subregion + 0 + + + Access + Write access(es) occurred in this subregion + 1 + + + + + SR25 + Subregion 25 in region n (write '1' to clear) + 25 + 25 + + + NoAccess + No write access occurred in this subregion + 0 + + + Access + Write access(es) occurred in this subregion + 1 + + + + + SR26 + Subregion 26 in region n (write '1' to clear) + 26 + 26 + + + NoAccess + No write access occurred in this subregion + 0 + + + Access + Write access(es) occurred in this subregion + 1 + + + + + SR27 + Subregion 27 in region n (write '1' to clear) + 27 + 27 + + + NoAccess + No write access occurred in this subregion + 0 + + + Access + Write access(es) occurred in this subregion + 1 + + + + + SR28 + Subregion 28 in region n (write '1' to clear) + 28 + 28 + + + NoAccess + No write access occurred in this subregion + 0 + + + Access + Write access(es) occurred in this subregion + 1 + + + + + SR29 + Subregion 29 in region n (write '1' to clear) + 29 + 29 + + + NoAccess + No write access occurred in this subregion + 0 + + + Access + Write access(es) occurred in this subregion + 1 + + + + + SR30 + Subregion 30 in region n (write '1' to clear) + 30 + 30 + + + NoAccess + No write access occurred in this subregion + 0 + + + Access + Write access(es) occurred in this subregion + 1 + + + + + SR31 + Subregion 31 in region n (write '1' to clear) + 31 + 31 + + + NoAccess + No write access occurred in this subregion + 0 + + + Access + Write access(es) occurred in this subregion + 1 + + + + + + + SUBSTATRA + Description cluster: Source of event/interrupt in region n, read access detected while corresponding subregion was enabled for watching + 0x004 + read-write + oneToClear + + + SR0 + Subregion 0 in region n (write '1' to clear) + 0 + 0 + + + NoAccess + No read access occurred in this subregion + 0 + + + Access + Read access(es) occurred in this subregion + 1 + + + + + SR1 + Subregion 1 in region n (write '1' to clear) + 1 + 1 + + + NoAccess + No read access occurred in this subregion + 0 + + + Access + Read access(es) occurred in this subregion + 1 + + + + + SR2 + Subregion 2 in region n (write '1' to clear) + 2 + 2 + + + NoAccess + No read access occurred in this subregion + 0 + + + Access + Read access(es) occurred in this subregion + 1 + + + + + SR3 + Subregion 3 in region n (write '1' to clear) + 3 + 3 + + + NoAccess + No read access occurred in this subregion + 0 + + + Access + Read access(es) occurred in this subregion + 1 + + + + + SR4 + Subregion 4 in region n (write '1' to clear) + 4 + 4 + + + NoAccess + No read access occurred in this subregion + 0 + + + Access + Read access(es) occurred in this subregion + 1 + + + + + SR5 + Subregion 5 in region n (write '1' to clear) + 5 + 5 + + + NoAccess + No read access occurred in this subregion + 0 + + + Access + Read access(es) occurred in this subregion + 1 + + + + + SR6 + Subregion 6 in region n (write '1' to clear) + 6 + 6 + + + NoAccess + No read access occurred in this subregion + 0 + + + Access + Read access(es) occurred in this subregion + 1 + + + + + SR7 + Subregion 7 in region n (write '1' to clear) + 7 + 7 + + + NoAccess + No read access occurred in this subregion + 0 + + + Access + Read access(es) occurred in this subregion + 1 + + + + + SR8 + Subregion 8 in region n (write '1' to clear) + 8 + 8 + + + NoAccess + No read access occurred in this subregion + 0 + + + Access + Read access(es) occurred in this subregion + 1 + + + + + SR9 + Subregion 9 in region n (write '1' to clear) + 9 + 9 + + + NoAccess + No read access occurred in this subregion + 0 + + + Access + Read access(es) occurred in this subregion + 1 + + + + + SR10 + Subregion 10 in region n (write '1' to clear) + 10 + 10 + + + NoAccess + No read access occurred in this subregion + 0 + + + Access + Read access(es) occurred in this subregion + 1 + + + + + SR11 + Subregion 11 in region n (write '1' to clear) + 11 + 11 + + + NoAccess + No read access occurred in this subregion + 0 + + + Access + Read access(es) occurred in this subregion + 1 + + + + + SR12 + Subregion 12 in region n (write '1' to clear) + 12 + 12 + + + NoAccess + No read access occurred in this subregion + 0 + + + Access + Read access(es) occurred in this subregion + 1 + + + + + SR13 + Subregion 13 in region n (write '1' to clear) + 13 + 13 + + + NoAccess + No read access occurred in this subregion + 0 + + + Access + Read access(es) occurred in this subregion + 1 + + + + + SR14 + Subregion 14 in region n (write '1' to clear) + 14 + 14 + + + NoAccess + No read access occurred in this subregion + 0 + + + Access + Read access(es) occurred in this subregion + 1 + + + + + SR15 + Subregion 15 in region n (write '1' to clear) + 15 + 15 + + + NoAccess + No read access occurred in this subregion + 0 + + + Access + Read access(es) occurred in this subregion + 1 + + + + + SR16 + Subregion 16 in region n (write '1' to clear) + 16 + 16 + + + NoAccess + No read access occurred in this subregion + 0 + + + Access + Read access(es) occurred in this subregion + 1 + + + + + SR17 + Subregion 17 in region n (write '1' to clear) + 17 + 17 + + + NoAccess + No read access occurred in this subregion + 0 + + + Access + Read access(es) occurred in this subregion + 1 + + + + + SR18 + Subregion 18 in region n (write '1' to clear) + 18 + 18 + + + NoAccess + No read access occurred in this subregion + 0 + + + Access + Read access(es) occurred in this subregion + 1 + + + + + SR19 + Subregion 19 in region n (write '1' to clear) + 19 + 19 + + + NoAccess + No read access occurred in this subregion + 0 + + + Access + Read access(es) occurred in this subregion + 1 + + + + + SR20 + Subregion 20 in region n (write '1' to clear) + 20 + 20 + + + NoAccess + No read access occurred in this subregion + 0 + + + Access + Read access(es) occurred in this subregion + 1 + + + + + SR21 + Subregion 21 in region n (write '1' to clear) + 21 + 21 + + + NoAccess + No read access occurred in this subregion + 0 + + + Access + Read access(es) occurred in this subregion + 1 + + + + + SR22 + Subregion 22 in region n (write '1' to clear) + 22 + 22 + + + NoAccess + No read access occurred in this subregion + 0 + + + Access + Read access(es) occurred in this subregion + 1 + + + + + SR23 + Subregion 23 in region n (write '1' to clear) + 23 + 23 + + + NoAccess + No read access occurred in this subregion + 0 + + + Access + Read access(es) occurred in this subregion + 1 + + + + + SR24 + Subregion 24 in region n (write '1' to clear) + 24 + 24 + + + NoAccess + No read access occurred in this subregion + 0 + + + Access + Read access(es) occurred in this subregion + 1 + + + + + SR25 + Subregion 25 in region n (write '1' to clear) + 25 + 25 + + + NoAccess + No read access occurred in this subregion + 0 + + + Access + Read access(es) occurred in this subregion + 1 + + + + + SR26 + Subregion 26 in region n (write '1' to clear) + 26 + 26 + + + NoAccess + No read access occurred in this subregion + 0 + + + Access + Read access(es) occurred in this subregion + 1 + + + + + SR27 + Subregion 27 in region n (write '1' to clear) + 27 + 27 + + + NoAccess + No read access occurred in this subregion + 0 + + + Access + Read access(es) occurred in this subregion + 1 + + + + + SR28 + Subregion 28 in region n (write '1' to clear) + 28 + 28 + + + NoAccess + No read access occurred in this subregion + 0 + + + Access + Read access(es) occurred in this subregion + 1 + + + + + SR29 + Subregion 29 in region n (write '1' to clear) + 29 + 29 + + + NoAccess + No read access occurred in this subregion + 0 + + + Access + Read access(es) occurred in this subregion + 1 + + + + + SR30 + Subregion 30 in region n (write '1' to clear) + 30 + 30 + + + NoAccess + No read access occurred in this subregion + 0 + + + Access + Read access(es) occurred in this subregion + 1 + + + + + SR31 + Subregion 31 in region n (write '1' to clear) + 31 + 31 + + + NoAccess + No read access occurred in this subregion + 0 + + + Access + Read access(es) occurred in this subregion + 1 + + + + + + + + REGIONEN + Enable/disable regions watch + 0x510 + read-write + + + RGN0WA + Enable/disable write access watch in region[0] + 0 + 0 + + + Disable + Disable write access watch in this region + 0 + + + Enable + Enable write access watch in this region + 1 + + + + + RGN0RA + Enable/disable read access watch in region[0] + 1 + 1 + + + Disable + Disable read access watch in this region + 0 + + + Enable + Enable read access watch in this region + 1 + + + + + RGN1WA + Enable/disable write access watch in region[1] + 2 + 2 + + + Disable + Disable write access watch in this region + 0 + + + Enable + Enable write access watch in this region + 1 + + + + + RGN1RA + Enable/disable read access watch in region[1] + 3 + 3 + + + Disable + Disable read access watch in this region + 0 + + + Enable + Enable read access watch in this region + 1 + + + + + RGN2WA + Enable/disable write access watch in region[2] + 4 + 4 + + + Disable + Disable write access watch in this region + 0 + + + Enable + Enable write access watch in this region + 1 + + + + + RGN2RA + Enable/disable read access watch in region[2] + 5 + 5 + + + Disable + Disable read access watch in this region + 0 + + + Enable + Enable read access watch in this region + 1 + + + + + RGN3WA + Enable/disable write access watch in region[3] + 6 + 6 + + + Disable + Disable write access watch in this region + 0 + + + Enable + Enable write access watch in this region + 1 + + + + + RGN3RA + Enable/disable read access watch in region[3] + 7 + 7 + + + Disable + Disable read access watch in this region + 0 + + + Enable + Enable read access watch in this region + 1 + + + + + PRGN0WA + Enable/disable write access watch in PREGION[0] + 24 + 24 + + + Disable + Disable write access watch in this PREGION + 0 + + + Enable + Enable write access watch in this PREGION + 1 + + + + + PRGN0RA + Enable/disable read access watch in PREGION[0] + 25 + 25 + + + Disable + Disable read access watch in this PREGION + 0 + + + Enable + Enable read access watch in this PREGION + 1 + + + + + PRGN1WA + Enable/disable write access watch in PREGION[1] + 26 + 26 + + + Disable + Disable write access watch in this PREGION + 0 + + + Enable + Enable write access watch in this PREGION + 1 + + + + + PRGN1RA + Enable/disable read access watch in PREGION[1] + 27 + 27 + + + Disable + Disable read access watch in this PREGION + 0 + + + Enable + Enable read access watch in this PREGION + 1 + + + + + + + REGIONENSET + Enable regions watch + 0x514 + read-write + + + RGN0WA + Enable write access watch in region[0] + 0 + 0 + + read + + Disabled + Write access watch in this region is disabled + 0 + + + Enabled + Write access watch in this region is enabled + 1 + + + + write + + Set + Enable write access watch in this region + 1 + + + + + RGN0RA + Enable read access watch in region[0] + 1 + 1 + + read + + Disabled + Read access watch in this region is disabled + 0 + + + Enabled + Read access watch in this region is enabled + 1 + + + + write + + Set + Enable read access watch in this region + 1 + + + + + RGN1WA + Enable write access watch in region[1] + 2 + 2 + + read + + Disabled + Write access watch in this region is disabled + 0 + + + Enabled + Write access watch in this region is enabled + 1 + + + + write + + Set + Enable write access watch in this region + 1 + + + + + RGN1RA + Enable read access watch in region[1] + 3 + 3 + + read + + Disabled + Read access watch in this region is disabled + 0 + + + Enabled + Read access watch in this region is enabled + 1 + + + + write + + Set + Enable read access watch in this region + 1 + + + + + RGN2WA + Enable write access watch in region[2] + 4 + 4 + + read + + Disabled + Write access watch in this region is disabled + 0 + + + Enabled + Write access watch in this region is enabled + 1 + + + + write + + Set + Enable write access watch in this region + 1 + + + + + RGN2RA + Enable read access watch in region[2] + 5 + 5 + + read + + Disabled + Read access watch in this region is disabled + 0 + + + Enabled + Read access watch in this region is enabled + 1 + + + + write + + Set + Enable read access watch in this region + 1 + + + + + RGN3WA + Enable write access watch in region[3] + 6 + 6 + + read + + Disabled + Write access watch in this region is disabled + 0 + + + Enabled + Write access watch in this region is enabled + 1 + + + + write + + Set + Enable write access watch in this region + 1 + + + + + RGN3RA + Enable read access watch in region[3] + 7 + 7 + + read + + Disabled + Read access watch in this region is disabled + 0 + + + Enabled + Read access watch in this region is enabled + 1 + + + + write + + Set + Enable read access watch in this region + 1 + + + + + PRGN0WA + Enable write access watch in PREGION[0] + 24 + 24 + + read + + Disabled + Write access watch in this PREGION is disabled + 0 + + + Enabled + Write access watch in this PREGION is enabled + 1 + + + + write + + Set + Enable write access watch in this PREGION + 1 + + + + + PRGN0RA + Enable read access watch in PREGION[0] + 25 + 25 + + read + + Disabled + Read access watch in this PREGION is disabled + 0 + + + Enabled + Read access watch in this PREGION is enabled + 1 + + + + write + + Set + Enable read access watch in this PREGION + 1 + + + + + PRGN1WA + Enable write access watch in PREGION[1] + 26 + 26 + + read + + Disabled + Write access watch in this PREGION is disabled + 0 + + + Enabled + Write access watch in this PREGION is enabled + 1 + + + + write + + Set + Enable write access watch in this PREGION + 1 + + + + + PRGN1RA + Enable read access watch in PREGION[1] + 27 + 27 + + read + + Disabled + Read access watch in this PREGION is disabled + 0 + + + Enabled + Read access watch in this PREGION is enabled + 1 + + + + write + + Set + Enable read access watch in this PREGION + 1 + + + + + + + REGIONENCLR + Disable regions watch + 0x518 + read-write + + + RGN0WA + Disable write access watch in region[0] + 0 + 0 + + read + + Disabled + Write access watch in this region is disabled + 0 + + + Enabled + Write access watch in this region is enabled + 1 + + + + write + + Clear + Disable write access watch in this region + 1 + + + + + RGN0RA + Disable read access watch in region[0] + 1 + 1 + + read + + Disabled + Read access watch in this region is disabled + 0 + + + Enabled + Read access watch in this region is enabled + 1 + + + + write + + Clear + Disable read access watch in this region + 1 + + + + + RGN1WA + Disable write access watch in region[1] + 2 + 2 + + read + + Disabled + Write access watch in this region is disabled + 0 + + + Enabled + Write access watch in this region is enabled + 1 + + + + write + + Clear + Disable write access watch in this region + 1 + + + + + RGN1RA + Disable read access watch in region[1] + 3 + 3 + + read + + Disabled + Read access watch in this region is disabled + 0 + + + Enabled + Read access watch in this region is enabled + 1 + + + + write + + Clear + Disable read access watch in this region + 1 + + + + + RGN2WA + Disable write access watch in region[2] + 4 + 4 + + read + + Disabled + Write access watch in this region is disabled + 0 + + + Enabled + Write access watch in this region is enabled + 1 + + + + write + + Clear + Disable write access watch in this region + 1 + + + + + RGN2RA + Disable read access watch in region[2] + 5 + 5 + + read + + Disabled + Read access watch in this region is disabled + 0 + + + Enabled + Read access watch in this region is enabled + 1 + + + + write + + Clear + Disable read access watch in this region + 1 + + + + + RGN3WA + Disable write access watch in region[3] + 6 + 6 + + read + + Disabled + Write access watch in this region is disabled + 0 + + + Enabled + Write access watch in this region is enabled + 1 + + + + write + + Clear + Disable write access watch in this region + 1 + + + + + RGN3RA + Disable read access watch in region[3] + 7 + 7 + + read + + Disabled + Read access watch in this region is disabled + 0 + + + Enabled + Read access watch in this region is enabled + 1 + + + + write + + Clear + Disable read access watch in this region + 1 + + + + + PRGN0WA + Disable write access watch in PREGION[0] + 24 + 24 + + read + + Disabled + Write access watch in this PREGION is disabled + 0 + + + Enabled + Write access watch in this PREGION is enabled + 1 + + + + write + + Clear + Disable write access watch in this PREGION + 1 + + + + + PRGN0RA + Disable read access watch in PREGION[0] + 25 + 25 + + read + + Disabled + Read access watch in this PREGION is disabled + 0 + + + Enabled + Read access watch in this PREGION is enabled + 1 + + + + write + + Clear + Disable read access watch in this PREGION + 1 + + + + + PRGN1WA + Disable write access watch in PREGION[1] + 26 + 26 + + read + + Disabled + Write access watch in this PREGION is disabled + 0 + + + Enabled + Write access watch in this PREGION is enabled + 1 + + + + write + + Clear + Disable write access watch in this PREGION + 1 + + + + + PRGN1RA + Disable read access watch in PREGION[1] + 27 + 27 + + read + + Disabled + Read access watch in this PREGION is disabled + 0 + + + Enabled + Read access watch in this PREGION is enabled + 1 + + + + write + + Clear + Disable read access watch in this PREGION + 1 + + + + + + + 4 + 0x010 + REGION[%s] + Unspecified + MWU_REGION + read-write + 0x600 + + START + Description cluster: Start address for region n + 0x000 + read-write + 0x00000000 + + + START + Start address for region + 0 + 31 + + + + + END + Description cluster: End address of region n + 0x004 + read-write + + + END + End address of region. + 0 + 31 + + + + + + 2 + 0x010 + PREGION[%s] + Unspecified + MWU_PREGION + read-write + 0x6C0 + + START + Description cluster: Reserved for future use + 0x000 + read-only + + + START + Reserved for future use + 0 + 31 + + + + + END + Description cluster: Reserved for future use + 0x004 + read-only + + + END + Reserved for future use + 0 + 31 + + + + + SUBS + Description cluster: Subregions of region n + 0x008 + read-write + 0x00000000 + + + SR0 + Include or exclude subregion 0 in region + 0 + 0 + + + Exclude + Exclude + 0 + + + Include + Include + 1 + + + + + SR1 + Include or exclude subregion 1 in region + 1 + 1 + + + Exclude + Exclude + 0 + + + Include + Include + 1 + + + + + SR2 + Include or exclude subregion 2 in region + 2 + 2 + + + Exclude + Exclude + 0 + + + Include + Include + 1 + + + + + SR3 + Include or exclude subregion 3 in region + 3 + 3 + + + Exclude + Exclude + 0 + + + Include + Include + 1 + + + + + SR4 + Include or exclude subregion 4 in region + 4 + 4 + + + Exclude + Exclude + 0 + + + Include + Include + 1 + + + + + SR5 + Include or exclude subregion 5 in region + 5 + 5 + + + Exclude + Exclude + 0 + + + Include + Include + 1 + + + + + SR6 + Include or exclude subregion 6 in region + 6 + 6 + + + Exclude + Exclude + 0 + + + Include + Include + 1 + + + + + SR7 + Include or exclude subregion 7 in region + 7 + 7 + + + Exclude + Exclude + 0 + + + Include + Include + 1 + + + + + SR8 + Include or exclude subregion 8 in region + 8 + 8 + + + Exclude + Exclude + 0 + + + Include + Include + 1 + + + + + SR9 + Include or exclude subregion 9 in region + 9 + 9 + + + Exclude + Exclude + 0 + + + Include + Include + 1 + + + + + SR10 + Include or exclude subregion 10 in region + 10 + 10 + + + Exclude + Exclude + 0 + + + Include + Include + 1 + + + + + SR11 + Include or exclude subregion 11 in region + 11 + 11 + + + Exclude + Exclude + 0 + + + Include + Include + 1 + + + + + SR12 + Include or exclude subregion 12 in region + 12 + 12 + + + Exclude + Exclude + 0 + + + Include + Include + 1 + + + + + SR13 + Include or exclude subregion 13 in region + 13 + 13 + + + Exclude + Exclude + 0 + + + Include + Include + 1 + + + + + SR14 + Include or exclude subregion 14 in region + 14 + 14 + + + Exclude + Exclude + 0 + + + Include + Include + 1 + + + + + SR15 + Include or exclude subregion 15 in region + 15 + 15 + + + Exclude + Exclude + 0 + + + Include + Include + 1 + + + + + SR16 + Include or exclude subregion 16 in region + 16 + 16 + + + Exclude + Exclude + 0 + + + Include + Include + 1 + + + + + SR17 + Include or exclude subregion 17 in region + 17 + 17 + + + Exclude + Exclude + 0 + + + Include + Include + 1 + + + + + SR18 + Include or exclude subregion 18 in region + 18 + 18 + + + Exclude + Exclude + 0 + + + Include + Include + 1 + + + + + SR19 + Include or exclude subregion 19 in region + 19 + 19 + + + Exclude + Exclude + 0 + + + Include + Include + 1 + + + + + SR20 + Include or exclude subregion 20 in region + 20 + 20 + + + Exclude + Exclude + 0 + + + Include + Include + 1 + + + + + SR21 + Include or exclude subregion 21 in region + 21 + 21 + + + Exclude + Exclude + 0 + + + Include + Include + 1 + + + + + SR22 + Include or exclude subregion 22 in region + 22 + 22 + + + Exclude + Exclude + 0 + + + Include + Include + 1 + + + + + SR23 + Include or exclude subregion 23 in region + 23 + 23 + + + Exclude + Exclude + 0 + + + Include + Include + 1 + + + + + SR24 + Include or exclude subregion 24 in region + 24 + 24 + + + Exclude + Exclude + 0 + + + Include + Include + 1 + + + + + SR25 + Include or exclude subregion 25 in region + 25 + 25 + + + Exclude + Exclude + 0 + + + Include + Include + 1 + + + + + SR26 + Include or exclude subregion 26 in region + 26 + 26 + + + Exclude + Exclude + 0 + + + Include + Include + 1 + + + + + SR27 + Include or exclude subregion 27 in region + 27 + 27 + + + Exclude + Exclude + 0 + + + Include + Include + 1 + + + + + SR28 + Include or exclude subregion 28 in region + 28 + 28 + + + Exclude + Exclude + 0 + + + Include + Include + 1 + + + + + SR29 + Include or exclude subregion 29 in region + 29 + 29 + + + Exclude + Exclude + 0 + + + Include + Include + 1 + + + + + SR30 + Include or exclude subregion 30 in region + 30 + 30 + + + Exclude + Exclude + 0 + + + Include + Include + 1 + + + + + SR31 + Include or exclude subregion 31 in region + 31 + 31 + + + Exclude + Exclude + 0 + + + Include + Include + 1 + + + + + + + + + + PWM1 + Pulse Width Modulation Unit 1 + 0x40021000 + + PWM1 + 33 + + + + PWM2 + Pulse Width Modulation Unit 2 + 0x40022000 + + PWM2 + 34 + + + + SPI2 + Serial Peripheral Interface 2 + 0x40023000 + + SPIM2_SPIS2_SPI2 + 35 + + + + SPIM2 + Serial Peripheral Interface Master with EasyDMA 2 + 0x40023000 + SPI2 + + SPIM2_SPIS2_SPI2 + 35 + + + + SPIS2 + SPI Slave 2 + 0x40023000 + SPI2 + + SPIM2_SPIS2_SPI2 + 35 + + + + RTC2 + Real time counter 2 + 0x40024000 + + RTC2 + 36 + + + + I2S + Inter-IC Sound + 0x40025000 + + 0 + 0x1000 + registers + + + I2S + 37 + + I2S + 0x20 + + + TASKS_START + Starts continuous I2S transfer. Also starts MCK generator when this is enabled. + 0x000 + write-only + + + TASKS_START + Starts continuous I2S transfer. Also starts MCK generator when this is enabled. + 0 + 0 + + + Trigger + Trigger task + 1 + + + + + + + TASKS_STOP + Stops I2S transfer. Also stops MCK generator. Triggering this task will cause the {event:STOPPED} event to be generated. + 0x004 + write-only + + + TASKS_STOP + Stops I2S transfer. Also stops MCK generator. Triggering this task will cause the {event:STOPPED} event to be generated. + 0 + 0 + + + Trigger + Trigger task + 1 + + + + + + + EVENTS_RXPTRUPD + The RXD.PTR register has been copied to internal double-buffers. + When the I2S module is started and RX is enabled, this event will be generated for every RXTXD.MAXCNT words that are received on the SDIN pin. + 0x104 + read-write + + + EVENTS_RXPTRUPD + The RXD.PTR register has been copied to internal double-buffers. + When the I2S module is started and RX is enabled, this event will be generated for every RXTXD.MAXCNT words that are received on the SDIN pin. + 0 + 0 + + + NotGenerated + Event not generated + 0 + + + Generated + Event generated + 1 + + + + + + + EVENTS_STOPPED + I2S transfer stopped. + 0x108 + read-write + + + EVENTS_STOPPED + I2S transfer stopped. + 0 + 0 + + + NotGenerated + Event not generated + 0 + + + Generated + Event generated + 1 + + + + + + + EVENTS_TXPTRUPD + The TDX.PTR register has been copied to internal double-buffers. + When the I2S module is started and TX is enabled, this event will be generated for every RXTXD.MAXCNT words that are sent on the SDOUT pin. + 0x114 + read-write + + + EVENTS_TXPTRUPD + The TDX.PTR register has been copied to internal double-buffers. + When the I2S module is started and TX is enabled, this event will be generated for every RXTXD.MAXCNT words that are sent on the SDOUT pin. + 0 + 0 + + + NotGenerated + Event not generated + 0 + + + Generated + Event generated + 1 + + + + + + + INTEN + Enable or disable interrupt + 0x300 + read-write + + + RXPTRUPD + Enable or disable interrupt for event RXPTRUPD + 1 + 1 + + + Disabled + Disable + 0 + + + Enabled + Enable + 1 + + + + + STOPPED + Enable or disable interrupt for event STOPPED + 2 + 2 + + + Disabled + Disable + 0 + + + Enabled + Enable + 1 + + + + + TXPTRUPD + Enable or disable interrupt for event TXPTRUPD + 5 + 5 + + + Disabled + Disable + 0 + + + Enabled + Enable + 1 + + + + + + + INTENSET + Enable interrupt + 0x304 + read-write + + + RXPTRUPD + Write '1' to enable interrupt for event RXPTRUPD + 1 + 1 + + read + + Disabled + Read: Disabled + 0 + + + Enabled + Read: Enabled + 1 + + + + write + + Set + Enable + 1 + + + + + STOPPED + Write '1' to enable interrupt for event STOPPED + 2 + 2 + + read + + Disabled + Read: Disabled + 0 + + + Enabled + Read: Enabled + 1 + + + + write + + Set + Enable + 1 + + + + + TXPTRUPD + Write '1' to enable interrupt for event TXPTRUPD + 5 + 5 + + read + + Disabled + Read: Disabled + 0 + + + Enabled + Read: Enabled + 1 + + + + write + + Set + Enable + 1 + + + + + + + INTENCLR + Disable interrupt + 0x308 + read-write + + + RXPTRUPD + Write '1' to disable interrupt for event RXPTRUPD + 1 + 1 + + read + + Disabled + Read: Disabled + 0 + + + Enabled + Read: Enabled + 1 + + + + write + + Clear + Disable + 1 + + + + + STOPPED + Write '1' to disable interrupt for event STOPPED + 2 + 2 + + read + + Disabled + Read: Disabled + 0 + + + Enabled + Read: Enabled + 1 + + + + write + + Clear + Disable + 1 + + + + + TXPTRUPD + Write '1' to disable interrupt for event TXPTRUPD + 5 + 5 + + read + + Disabled + Read: Disabled + 0 + + + Enabled + Read: Enabled + 1 + + + + write + + Clear + Disable + 1 + + + + + + + ENABLE + Enable I2S module. + 0x500 + read-write + 0x00000000 + + + ENABLE + Enable I2S module. + 0 + 0 + + + Disabled + Disable + 0 + + + Enabled + Enable + 1 + + + + + + + CONFIG + Unspecified + I2S_CONFIG + read-write + 0x504 + + MODE + I2S mode. + 0x000 + read-write + 0x00000000 + + + MODE + I2S mode. + 0 + 0 + + + Master + Master mode. SCK and LRCK generated from internal master clcok (MCK) and output on pins defined by PSEL.xxx. + 0 + + + Slave + Slave mode. SCK and LRCK generated by external master and received on pins defined by PSEL.xxx + 1 + + + + + + + RXEN + Reception (RX) enable. + 0x004 + read-write + 0x00000000 + + + RXEN + Reception (RX) enable. + 0 + 0 + + + Disabled + Reception disabled and now data will be written to the RXD.PTR address. + 0 + + + Enabled + Reception enabled. + 1 + + + + + + + TXEN + Transmission (TX) enable. + 0x008 + read-write + 0x00000001 + + + TXEN + Transmission (TX) enable. + 0 + 0 + + + Disabled + Transmission disabled and now data will be read from the RXD.TXD address. + 0 + + + Enabled + Transmission enabled. + 1 + + + + + + + MCKEN + Master clock generator enable. + 0x00C + read-write + 0x00000001 + + + MCKEN + Master clock generator enable. + 0 + 0 + + + Disabled + Master clock generator disabled and PSEL.MCK not connected(available as GPIO). + 0 + + + Enabled + Master clock generator running and MCK output on PSEL.MCK. + 1 + + + + + + + MCKFREQ + Master clock generator frequency. + 0x010 + read-write + 0x20000000 + + + MCKFREQ + Master clock generator frequency. + 0 + 31 + + + 32MDIV2 + 32 MHz / 2 = 16.0 MHz + 0x80000000 + + + 32MDIV3 + 32 MHz / 3 = 10.6666667 MHz + 0x50000000 + + + 32MDIV4 + 32 MHz / 4 = 8.0 MHz + 0x40000000 + + + 32MDIV5 + 32 MHz / 5 = 6.4 MHz + 0x30000000 + + + 32MDIV6 + 32 MHz / 6 = 5.3333333 MHz + 0x28000000 + + + 32MDIV8 + 32 MHz / 8 = 4.0 MHz + 0x20000000 + + + 32MDIV10 + 32 MHz / 10 = 3.2 MHz + 0x18000000 + + + 32MDIV11 + 32 MHz / 11 = 2.9090909 MHz + 0x16000000 + + + 32MDIV15 + 32 MHz / 15 = 2.1333333 MHz + 0x11000000 + + + 32MDIV16 + 32 MHz / 16 = 2.0 MHz + 0x10000000 + + + 32MDIV21 + 32 MHz / 21 = 1.5238095 + 0x0C000000 + + + 32MDIV23 + 32 MHz / 23 = 1.3913043 MHz + 0x0B000000 + + + 32MDIV30 + 32 MHz / 30 = 1.0666667 MHz + 0x08800000 + + + 32MDIV31 + 32 MHz / 31 = 1.0322581 MHz + 0x08400000 + + + 32MDIV32 + 32 MHz / 32 = 1.0 MHz + 0x08000000 + + + 32MDIV42 + 32 MHz / 42 = 0.7619048 MHz + 0x06000000 + + + 32MDIV63 + 32 MHz / 63 = 0.5079365 MHz + 0x04100000 + + + 32MDIV125 + 32 MHz / 125 = 0.256 MHz + 0x020C0000 + + + + + + + RATIO + MCK / LRCK ratio. + 0x014 + read-write + 0x00000006 + + + RATIO + MCK / LRCK ratio. + 0 + 3 + + + 32X + LRCK = MCK / 32 + 0 + + + 48X + LRCK = MCK / 48 + 1 + + + 64X + LRCK = MCK / 64 + 2 + + + 96X + LRCK = MCK / 96 + 3 + + + 128X + LRCK = MCK / 128 + 4 + + + 192X + LRCK = MCK / 192 + 5 + + + 256X + LRCK = MCK / 256 + 6 + + + 384X + LRCK = MCK / 384 + 7 + + + 512X + LRCK = MCK / 512 + 8 + + + + + + + SWIDTH + Sample width. + 0x018 + read-write + 0x00000001 + + + SWIDTH + Sample width. + 0 + 1 + + + 8Bit + 8 bit. + 0 + + + 16Bit + 16 bit. + 1 + + + 24Bit + 24 bit. + 2 + + + + + + + ALIGN + Alignment of sample within a frame. + 0x01C + read-write + 0x00000000 + + + ALIGN + Alignment of sample within a frame. + 0 + 0 + + + Left + Left-aligned. + 0 + + + Right + Right-aligned. + 1 + + + + + + + FORMAT + Frame format. + 0x020 + read-write + 0x00000000 + + + FORMAT + Frame format. + 0 + 0 + + + I2S + Original I2S format. + 0 + + + Aligned + Alternate (left- or right-aligned) format. + 1 + + + + + + + CHANNELS + Enable channels. + 0x024 + read-write + 0x00000000 + + + CHANNELS + Enable channels. + 0 + 1 + + + Stereo + Stereo. + 0 + + + Left + Left only. + 1 + + + Right + Right only. + 2 + + + + + + + + RXD + Unspecified + I2S_RXD + read-write + 0x538 + + PTR + Receive buffer RAM start address. + 0x000 + read-write + 0x00000000 + + + PTR + Receive buffer Data RAM start address. When receiving, words containing samples will be written to this address. This address is a word aligned Data RAM address. + 0 + 31 + + + + + + TXD + Unspecified + I2S_TXD + read-write + 0x540 + + PTR + Transmit buffer RAM start address. + 0x000 + read-write + 0x00000000 + + + PTR + Transmit buffer Data RAM start address. When transmitting, words containing samples will be fetched from this address. This address is a word aligned Data RAM address. + 0 + 31 + + + + + + RXTXD + Unspecified + I2S_RXTXD + read-write + 0x550 + + MAXCNT + Size of RXD and TXD buffers. + 0x000 + read-write + 0x00000000 + + + MAXCNT + Size of RXD and TXD buffers in number of 32 bit words. + 0 + 13 + + + + + + PSEL + Unspecified + I2S_PSEL + read-write + 0x560 + + MCK + Pin select for MCK signal. + 0x000 + read-write + 0xFFFFFFFF + + + PIN + Pin number + 0 + 4 + + + CONNECT + Connection + 31 + 31 + + + Disconnected + Disconnect + 1 + + + Connected + Connect + 0 + + + + + + + SCK + Pin select for SCK signal. + 0x004 + read-write + 0xFFFFFFFF + + + PIN + Pin number + 0 + 4 + + + CONNECT + Connection + 31 + 31 + + + Disconnected + Disconnect + 1 + + + Connected + Connect + 0 + + + + + + + LRCK + Pin select for LRCK signal. + 0x008 + read-write + 0xFFFFFFFF + + + PIN + Pin number + 0 + 4 + + + CONNECT + Connection + 31 + 31 + + + Disconnected + Disconnect + 1 + + + Connected + Connect + 0 + + + + + + + SDIN + Pin select for SDIN signal. + 0x00C + read-write + 0xFFFFFFFF + + + PIN + Pin number + 0 + 4 + + + CONNECT + Connection + 31 + 31 + + + Disconnected + Disconnect + 1 + + + Connected + Connect + 0 + + + + + + + SDOUT + Pin select for SDOUT signal. + 0x010 + read-write + 0xFFFFFFFF + + + PIN + Pin number + 0 + 4 + + + CONNECT + Connection + 31 + 31 + + + Disconnected + Disconnect + 1 + + + Connected + Connect + 0 + + + + + + + + + + FPU + FPU + 0x40026000 + + 0 + 0x1000 + registers + + + FPU + 38 + + FPU + 0x20 + + + UNUSED + Unused. + 0x000 + 0x00000000 + read-only + + + + + \ No newline at end of file From 660647219a10e9aed3a70a0f95521bc870670339 Mon Sep 17 00:00:00 2001 From: Mirabellensaft Date: Fri, 10 Mar 2023 13:56:53 +0100 Subject: [PATCH 04/42] pac --- down-the-stack/dk_pac/build.rs | 17 + down-the-stack/dk_pac/device.x | 38 + down-the-stack/dk_pac/src/aar.rs | 88 + down-the-stack/dk_pac/src/aar/addrptr.rs | 80 + down-the-stack/dk_pac/src/aar/enable.rs | 128 + down-the-stack/dk_pac/src/aar/events_end.rs | 127 + .../dk_pac/src/aar/events_notresolved.rs | 127 + .../dk_pac/src/aar/events_resolved.rs | 127 + down-the-stack/dk_pac/src/aar/intenclr.rs | 270 ++ down-the-stack/dk_pac/src/aar/intenset.rs | 270 ++ down-the-stack/dk_pac/src/aar/irkptr.rs | 80 + down-the-stack/dk_pac/src/aar/nirk.rs | 80 + down-the-stack/dk_pac/src/aar/scratchptr.rs | 81 + down-the-stack/dk_pac/src/aar/status.rs | 37 + down-the-stack/dk_pac/src/aar/tasks_start.rs | 72 + down-the-stack/dk_pac/src/aar/tasks_stop.rs | 72 + down-the-stack/dk_pac/src/approtect.rs | 18 + .../dk_pac/src/approtect/disable.rs | 116 + .../dk_pac/src/approtect/forceprotect.rs | 116 + down-the-stack/dk_pac/src/bprot.rs | 36 + down-the-stack/dk_pac/src/bprot/config0.rs | 2017 ++++++++++++++ down-the-stack/dk_pac/src/bprot/config1.rs | 2017 ++++++++++++++ down-the-stack/dk_pac/src/bprot/config2.rs | 2017 ++++++++++++++ down-the-stack/dk_pac/src/bprot/config3.rs | 2017 ++++++++++++++ .../dk_pac/src/bprot/disableindebug.rs | 127 + down-the-stack/dk_pac/src/ccm.rs | 105 + down-the-stack/dk_pac/src/ccm/cnfptr.rs | 80 + down-the-stack/dk_pac/src/ccm/enable.rs | 128 + .../dk_pac/src/ccm/events_endcrypt.rs | 127 + .../dk_pac/src/ccm/events_endksgen.rs | 127 + down-the-stack/dk_pac/src/ccm/events_error.rs | 127 + down-the-stack/dk_pac/src/ccm/inptr.rs | 80 + down-the-stack/dk_pac/src/ccm/intenclr.rs | 269 ++ down-the-stack/dk_pac/src/ccm/intenset.rs | 269 ++ down-the-stack/dk_pac/src/ccm/micstatus.rs | 71 + down-the-stack/dk_pac/src/ccm/mode.rs | 248 ++ down-the-stack/dk_pac/src/ccm/outptr.rs | 80 + down-the-stack/dk_pac/src/ccm/scratchptr.rs | 81 + down-the-stack/dk_pac/src/ccm/shorts.rs | 127 + down-the-stack/dk_pac/src/ccm/tasks_crypt.rs | 72 + down-the-stack/dk_pac/src/ccm/tasks_ksgen.rs | 72 + down-the-stack/dk_pac/src/ccm/tasks_stop.rs | 72 + down-the-stack/dk_pac/src/clock.rs | 138 + down-the-stack/dk_pac/src/clock/ctiv.rs | 80 + .../dk_pac/src/clock/events_ctto.rs | 127 + .../dk_pac/src/clock/events_done.rs | 127 + .../dk_pac/src/clock/events_hfclkstarted.rs | 127 + .../dk_pac/src/clock/events_lfclkstarted.rs | 127 + down-the-stack/dk_pac/src/clock/hfclkrun.rs | 71 + down-the-stack/dk_pac/src/clock/hfclkstat.rs | 112 + down-the-stack/dk_pac/src/clock/intenclr.rs | 339 +++ down-the-stack/dk_pac/src/clock/intenset.rs | 339 +++ down-the-stack/dk_pac/src/clock/lfclkrun.rs | 71 + down-the-stack/dk_pac/src/clock/lfclksrc.rs | 263 ++ .../dk_pac/src/clock/lfclksrccopy.rs | 81 + down-the-stack/dk_pac/src/clock/lfclkstat.rs | 122 + down-the-stack/dk_pac/src/clock/tasks_cal.rs | 71 + .../dk_pac/src/clock/tasks_ctstart.rs | 72 + .../dk_pac/src/clock/tasks_ctstop.rs | 72 + .../dk_pac/src/clock/tasks_hfclkstart.rs | 72 + .../dk_pac/src/clock/tasks_hfclkstop.rs | 72 + .../dk_pac/src/clock/tasks_lfclkstart.rs | 72 + .../dk_pac/src/clock/tasks_lfclkstop.rs | 72 + .../dk_pac/src/clock/traceconfig.rs | 232 ++ down-the-stack/dk_pac/src/comp.rs | 130 + down-the-stack/dk_pac/src/comp/enable.rs | 128 + .../dk_pac/src/comp/events_cross.rs | 127 + down-the-stack/dk_pac/src/comp/events_down.rs | 127 + .../dk_pac/src/comp/events_ready.rs | 127 + down-the-stack/dk_pac/src/comp/events_up.rs | 126 + down-the-stack/dk_pac/src/comp/extrefsel.rs | 207 ++ down-the-stack/dk_pac/src/comp/hyst.rs | 126 + down-the-stack/dk_pac/src/comp/inten.rs | 309 +++ down-the-stack/dk_pac/src/comp/intenclr.rs | 337 +++ down-the-stack/dk_pac/src/comp/intenset.rs | 337 +++ down-the-stack/dk_pac/src/comp/isource.rs | 155 ++ down-the-stack/dk_pac/src/comp/mode.rs | 202 ++ down-the-stack/dk_pac/src/comp/psel.rs | 206 ++ down-the-stack/dk_pac/src/comp/refsel.rs | 167 ++ down-the-stack/dk_pac/src/comp/result.rs | 71 + down-the-stack/dk_pac/src/comp/shorts.rs | 371 +++ .../dk_pac/src/comp/tasks_sample.rs | 72 + down-the-stack/dk_pac/src/comp/tasks_start.rs | 72 + down-the-stack/dk_pac/src/comp/tasks_stop.rs | 72 + down-the-stack/dk_pac/src/comp/th.rs | 95 + down-the-stack/dk_pac/src/ecb.rs | 49 + down-the-stack/dk_pac/src/ecb/ecbdataptr.rs | 81 + .../dk_pac/src/ecb/events_endecb.rs | 127 + .../dk_pac/src/ecb/events_errorecb.rs | 127 + down-the-stack/dk_pac/src/ecb/intenclr.rs | 201 ++ down-the-stack/dk_pac/src/ecb/intenset.rs | 201 ++ .../dk_pac/src/ecb/tasks_startecb.rs | 72 + .../dk_pac/src/ecb/tasks_stopecb.rs | 72 + down-the-stack/dk_pac/src/egu0.rs | 40 + .../dk_pac/src/egu0/events_triggered.rs | 134 + down-the-stack/dk_pac/src/egu0/inten.rs | 1041 +++++++ down-the-stack/dk_pac/src/egu0/intenclr.rs | 1159 ++++++++ down-the-stack/dk_pac/src/egu0/intenset.rs | 1159 ++++++++ .../dk_pac/src/egu0/tasks_trigger.rs | 77 + down-the-stack/dk_pac/src/ficr.rs | 73 + .../dk_pac/src/ficr/codepagesize.rs | 37 + down-the-stack/dk_pac/src/ficr/codesize.rs | 37 + down-the-stack/dk_pac/src/ficr/deviceaddr.rs | 38 + .../dk_pac/src/ficr/deviceaddrtype.rs | 71 + down-the-stack/dk_pac/src/ficr/deviceid.rs | 38 + down-the-stack/dk_pac/src/ficr/er.rs | 38 + down-the-stack/dk_pac/src/ficr/info.rs | 34 + down-the-stack/dk_pac/src/ficr/info/flash.rs | 89 + .../dk_pac/src/ficr/info/package.rs | 97 + down-the-stack/dk_pac/src/ficr/info/part.rs | 73 + down-the-stack/dk_pac/src/ficr/info/ram.rs | 89 + .../dk_pac/src/ficr/info/variant.rs | 161 ++ down-the-stack/dk_pac/src/ficr/ir.rs | 38 + down-the-stack/dk_pac/src/ficr/nfc.rs | 28 + .../dk_pac/src/ficr/nfc/tagheader0.rs | 58 + .../dk_pac/src/ficr/nfc/tagheader1.rs | 58 + .../dk_pac/src/ficr/nfc/tagheader2.rs | 58 + .../dk_pac/src/ficr/nfc/tagheader3.rs | 58 + down-the-stack/dk_pac/src/ficr/temp.rs | 106 + down-the-stack/dk_pac/src/ficr/temp/a0.rs | 37 + down-the-stack/dk_pac/src/ficr/temp/a1.rs | 37 + down-the-stack/dk_pac/src/ficr/temp/a2.rs | 37 + down-the-stack/dk_pac/src/ficr/temp/a3.rs | 37 + down-the-stack/dk_pac/src/ficr/temp/a4.rs | 37 + down-the-stack/dk_pac/src/ficr/temp/a5.rs | 37 + down-the-stack/dk_pac/src/ficr/temp/b0.rs | 37 + down-the-stack/dk_pac/src/ficr/temp/b1.rs | 37 + down-the-stack/dk_pac/src/ficr/temp/b2.rs | 37 + down-the-stack/dk_pac/src/ficr/temp/b3.rs | 37 + down-the-stack/dk_pac/src/ficr/temp/b4.rs | 37 + down-the-stack/dk_pac/src/ficr/temp/b5.rs | 37 + down-the-stack/dk_pac/src/ficr/temp/t0.rs | 37 + down-the-stack/dk_pac/src/ficr/temp/t1.rs | 37 + down-the-stack/dk_pac/src/ficr/temp/t2.rs | 37 + down-the-stack/dk_pac/src/ficr/temp/t3.rs | 37 + down-the-stack/dk_pac/src/ficr/temp/t4.rs | 37 + down-the-stack/dk_pac/src/generic.rs | 634 +++++ down-the-stack/dk_pac/src/gpiote.rs | 64 + down-the-stack/dk_pac/src/gpiote/config.rs | 347 +++ down-the-stack/dk_pac/src/gpiote/events_in.rs | 127 + .../dk_pac/src/gpiote/events_port.rs | 127 + down-the-stack/dk_pac/src/gpiote/intenclr.rs | 677 +++++ down-the-stack/dk_pac/src/gpiote/intenset.rs | 677 +++++ down-the-stack/dk_pac/src/gpiote/tasks_clr.rs | 72 + down-the-stack/dk_pac/src/gpiote/tasks_out.rs | 72 + down-the-stack/dk_pac/src/gpiote/tasks_set.rs | 72 + down-the-stack/dk_pac/src/i2s.rs | 101 + down-the-stack/dk_pac/src/i2s/config.rs | 64 + down-the-stack/dk_pac/src/i2s/config/align.rs | 126 + .../dk_pac/src/i2s/config/channels.rs | 142 + .../dk_pac/src/i2s/config/format.rs | 126 + down-the-stack/dk_pac/src/i2s/config/mcken.rs | 126 + .../dk_pac/src/i2s/config/mckfreq.rs | 337 +++ down-the-stack/dk_pac/src/i2s/config/mode.rs | 126 + down-the-stack/dk_pac/src/i2s/config/ratio.rs | 219 ++ down-the-stack/dk_pac/src/i2s/config/rxen.rs | 126 + .../dk_pac/src/i2s/config/swidth.rs | 141 + down-the-stack/dk_pac/src/i2s/config/txen.rs | 126 + down-the-stack/dk_pac/src/i2s/enable.rs | 126 + .../dk_pac/src/i2s/events_rxptrupd.rs | 127 + .../dk_pac/src/i2s/events_stopped.rs | 127 + .../dk_pac/src/i2s/events_txptrupd.rs | 127 + down-the-stack/dk_pac/src/i2s/inten.rs | 248 ++ down-the-stack/dk_pac/src/i2s/intenclr.rs | 269 ++ down-the-stack/dk_pac/src/i2s/intenset.rs | 269 ++ down-the-stack/dk_pac/src/i2s/psel.rs | 34 + down-the-stack/dk_pac/src/i2s/psel/lrck.rs | 141 + down-the-stack/dk_pac/src/i2s/psel/mck.rs | 141 + down-the-stack/dk_pac/src/i2s/psel/sck.rs | 141 + down-the-stack/dk_pac/src/i2s/psel/sdin.rs | 141 + down-the-stack/dk_pac/src/i2s/psel/sdout.rs | 141 + down-the-stack/dk_pac/src/i2s/rxd.rs | 10 + down-the-stack/dk_pac/src/i2s/rxd/ptr.rs | 80 + down-the-stack/dk_pac/src/i2s/rxtxd.rs | 10 + down-the-stack/dk_pac/src/i2s/rxtxd/maxcnt.rs | 80 + down-the-stack/dk_pac/src/i2s/tasks_start.rs | 72 + down-the-stack/dk_pac/src/i2s/tasks_stop.rs | 72 + down-the-stack/dk_pac/src/i2s/txd.rs | 10 + down-the-stack/dk_pac/src/i2s/txd/ptr.rs | 80 + down-the-stack/dk_pac/src/lib.rs | 2407 +++++++++++++++++ down-the-stack/dk_pac/src/lpcomp.rs | 113 + down-the-stack/dk_pac/src/lpcomp/anadetect.rs | 142 + down-the-stack/dk_pac/src/lpcomp/enable.rs | 128 + .../dk_pac/src/lpcomp/events_cross.rs | 127 + .../dk_pac/src/lpcomp/events_down.rs | 127 + .../dk_pac/src/lpcomp/events_ready.rs | 127 + down-the-stack/dk_pac/src/lpcomp/events_up.rs | 126 + down-the-stack/dk_pac/src/lpcomp/extrefsel.rs | 126 + down-the-stack/dk_pac/src/lpcomp/hyst.rs | 126 + down-the-stack/dk_pac/src/lpcomp/intenclr.rs | 337 +++ down-the-stack/dk_pac/src/lpcomp/intenset.rs | 337 +++ down-the-stack/dk_pac/src/lpcomp/psel.rs | 206 ++ down-the-stack/dk_pac/src/lpcomp/refsel.rs | 311 +++ down-the-stack/dk_pac/src/lpcomp/result.rs | 71 + down-the-stack/dk_pac/src/lpcomp/shorts.rs | 371 +++ .../dk_pac/src/lpcomp/tasks_sample.rs | 72 + .../dk_pac/src/lpcomp/tasks_start.rs | 72 + .../dk_pac/src/lpcomp/tasks_stop.rs | 72 + down-the-stack/dk_pac/src/mwu.rs | 113 + .../dk_pac/src/mwu/events_pregion.rs | 16 + .../dk_pac/src/mwu/events_pregion/ra.rs | 126 + .../dk_pac/src/mwu/events_pregion/wa.rs | 126 + .../dk_pac/src/mwu/events_region.rs | 16 + .../dk_pac/src/mwu/events_region/ra.rs | 126 + .../dk_pac/src/mwu/events_region/wa.rs | 126 + down-the-stack/dk_pac/src/mwu/inten.rs | 797 ++++++ down-the-stack/dk_pac/src/mwu/intenclr.rs | 881 ++++++ down-the-stack/dk_pac/src/mwu/intenset.rs | 881 ++++++ down-the-stack/dk_pac/src/mwu/nmien.rs | 797 ++++++ down-the-stack/dk_pac/src/mwu/nmienclr.rs | 881 ++++++ down-the-stack/dk_pac/src/mwu/nmienset.rs | 881 ++++++ down-the-stack/dk_pac/src/mwu/perregion.rs | 16 + .../dk_pac/src/mwu/perregion/substatra.rs | 2017 ++++++++++++++ .../dk_pac/src/mwu/perregion/substatwa.rs | 2017 ++++++++++++++ down-the-stack/dk_pac/src/mwu/pregion.rs | 22 + down-the-stack/dk_pac/src/mwu/pregion/end.rs | 37 + .../dk_pac/src/mwu/pregion/start.rs | 37 + down-the-stack/dk_pac/src/mwu/pregion/subs.rs | 2017 ++++++++++++++ down-the-stack/dk_pac/src/mwu/region.rs | 16 + down-the-stack/dk_pac/src/mwu/region/end.rs | 80 + down-the-stack/dk_pac/src/mwu/region/start.rs | 80 + down-the-stack/dk_pac/src/mwu/regionen.rs | 797 ++++++ down-the-stack/dk_pac/src/mwu/regionenclr.rs | 881 ++++++ down-the-stack/dk_pac/src/mwu/regionenset.rs | 881 ++++++ down-the-stack/dk_pac/src/nfct.rs | 275 ++ .../dk_pac/src/nfct/currentloadctrl.rs | 37 + down-the-stack/dk_pac/src/nfct/errorstatus.rs | 113 + .../src/nfct/events_autocolresstarted.rs | 127 + .../dk_pac/src/nfct/events_collision.rs | 127 + .../dk_pac/src/nfct/events_endrx.rs | 127 + .../dk_pac/src/nfct/events_endtx.rs | 127 + .../dk_pac/src/nfct/events_error.rs | 127 + .../dk_pac/src/nfct/events_fielddetected.rs | 127 + .../dk_pac/src/nfct/events_fieldlost.rs | 127 + .../dk_pac/src/nfct/events_ready.rs | 127 + .../dk_pac/src/nfct/events_rxerror.rs | 127 + .../dk_pac/src/nfct/events_rxframeend.rs | 127 + .../dk_pac/src/nfct/events_rxframestart.rs | 127 + .../dk_pac/src/nfct/events_selected.rs | 127 + .../dk_pac/src/nfct/events_started.rs | 127 + .../dk_pac/src/nfct/events_txframeend.rs | 127 + .../dk_pac/src/nfct/events_txframestart.rs | 127 + .../dk_pac/src/nfct/fieldpresent.rs | 112 + .../dk_pac/src/nfct/framedelaymax.rs | 81 + .../dk_pac/src/nfct/framedelaymin.rs | 81 + .../dk_pac/src/nfct/framedelaymode.rs | 155 ++ down-the-stack/dk_pac/src/nfct/framestatus.rs | 10 + .../dk_pac/src/nfct/framestatus/rx.rs | 248 ++ down-the-stack/dk_pac/src/nfct/inten.rs | 982 +++++++ down-the-stack/dk_pac/src/nfct/intenclr.rs | 1089 ++++++++ down-the-stack/dk_pac/src/nfct/intenset.rs | 1089 ++++++++ down-the-stack/dk_pac/src/nfct/maxlen.rs | 80 + .../dk_pac/src/nfct/nfcid1_2nd_last.rs | 113 + .../dk_pac/src/nfct/nfcid1_3rd_last.rs | 113 + down-the-stack/dk_pac/src/nfct/nfcid1_last.rs | 125 + down-the-stack/dk_pac/src/nfct/packetptr.rs | 80 + down-the-stack/dk_pac/src/nfct/rxd.rs | 16 + down-the-stack/dk_pac/src/nfct/rxd/amount.rs | 44 + .../dk_pac/src/nfct/rxd/frameconfig.rs | 248 ++ down-the-stack/dk_pac/src/nfct/selres.rs | 186 ++ down-the-stack/dk_pac/src/nfct/sensres.rs | 303 +++ down-the-stack/dk_pac/src/nfct/shorts.rs | 189 ++ .../dk_pac/src/nfct/tasks_activate.rs | 72 + .../dk_pac/src/nfct/tasks_disable.rs | 72 + .../dk_pac/src/nfct/tasks_enablerxdata.rs | 72 + .../dk_pac/src/nfct/tasks_goidle.rs | 72 + .../dk_pac/src/nfct/tasks_gosleep.rs | 72 + down-the-stack/dk_pac/src/nfct/tasks_sense.rs | 72 + .../dk_pac/src/nfct/tasks_starttx.rs | 72 + down-the-stack/dk_pac/src/nfct/txd.rs | 16 + down-the-stack/dk_pac/src/nfct/txd/amount.rs | 95 + .../dk_pac/src/nfct/txd/frameconfig.rs | 310 +++ down-the-stack/dk_pac/src/nvmc.rs | 77 + down-the-stack/dk_pac/src/nvmc/config.rs | 141 + down-the-stack/dk_pac/src/nvmc/eraseall.rs | 126 + down-the-stack/dk_pac/src/nvmc/erasepage.rs | 81 + down-the-stack/dk_pac/src/nvmc/erasepcr0.rs | 81 + down-the-stack/dk_pac/src/nvmc/erasepcr1.rs | 81 + down-the-stack/dk_pac/src/nvmc/eraseuicr.rs | 126 + down-the-stack/dk_pac/src/nvmc/icachecnf.rs | 188 ++ down-the-stack/dk_pac/src/nvmc/ihit.rs | 80 + down-the-stack/dk_pac/src/nvmc/imiss.rs | 80 + down-the-stack/dk_pac/src/nvmc/ready.rs | 71 + down-the-stack/dk_pac/src/p0.rs | 66 + down-the-stack/dk_pac/src/p0/detectmode.rs | 127 + down-the-stack/dk_pac/src/p0/dir.rs | 2017 ++++++++++++++ down-the-stack/dk_pac/src/p0/dirclr.rs | 2241 +++++++++++++++ down-the-stack/dk_pac/src/p0/dirset.rs | 2241 +++++++++++++++ down-the-stack/dk_pac/src/p0/in_.rs | 1342 +++++++++ down-the-stack/dk_pac/src/p0/latch.rs | 2017 ++++++++++++++ down-the-stack/dk_pac/src/p0/out.rs | 2017 ++++++++++++++ down-the-stack/dk_pac/src/p0/outclr.rs | 2241 +++++++++++++++ down-the-stack/dk_pac/src/p0/outset.rs | 2241 +++++++++++++++ down-the-stack/dk_pac/src/p0/pin_cnf.rs | 482 ++++ down-the-stack/dk_pac/src/pdm.rs | 102 + down-the-stack/dk_pac/src/pdm/enable.rs | 126 + down-the-stack/dk_pac/src/pdm/events_end.rs | 127 + .../dk_pac/src/pdm/events_started.rs | 127 + .../dk_pac/src/pdm/events_stopped.rs | 127 + down-the-stack/dk_pac/src/pdm/gainl.rs | 141 + down-the-stack/dk_pac/src/pdm/gainr.rs | 141 + down-the-stack/dk_pac/src/pdm/inten.rs | 248 ++ down-the-stack/dk_pac/src/pdm/intenclr.rs | 269 ++ down-the-stack/dk_pac/src/pdm/intenset.rs | 269 ++ down-the-stack/dk_pac/src/pdm/mode.rs | 187 ++ down-the-stack/dk_pac/src/pdm/pdmclkctrl.rs | 141 + down-the-stack/dk_pac/src/pdm/psel.rs | 16 + down-the-stack/dk_pac/src/pdm/psel/clk.rs | 141 + down-the-stack/dk_pac/src/pdm/psel/din.rs | 141 + down-the-stack/dk_pac/src/pdm/sample.rs | 16 + .../dk_pac/src/pdm/sample/maxcnt.rs | 80 + down-the-stack/dk_pac/src/pdm/sample/ptr.rs | 80 + down-the-stack/dk_pac/src/pdm/tasks_start.rs | 72 + down-the-stack/dk_pac/src/pdm/tasks_stop.rs | 72 + down-the-stack/dk_pac/src/power.rs | 140 + down-the-stack/dk_pac/src/power/dcdcen.rs | 126 + .../dk_pac/src/power/events_pofwarn.rs | 127 + .../dk_pac/src/power/events_sleepenter.rs | 127 + .../dk_pac/src/power/events_sleepexit.rs | 127 + down-the-stack/dk_pac/src/power/gpregret.rs | 80 + down-the-stack/dk_pac/src/power/gpregret2.rs | 80 + down-the-stack/dk_pac/src/power/intenclr.rs | 269 ++ down-the-stack/dk_pac/src/power/intenset.rs | 269 ++ down-the-stack/dk_pac/src/power/pofcon.rs | 320 +++ down-the-stack/dk_pac/src/power/ram.rs | 22 + down-the-stack/dk_pac/src/power/ram/power.rs | 309 +++ .../dk_pac/src/power/ram/powerclr.rs | 154 ++ .../dk_pac/src/power/ram/powerset.rs | 154 ++ down-the-stack/dk_pac/src/power/ramon.rs | 309 +++ down-the-stack/dk_pac/src/power/ramonb.rs | 309 +++ down-the-stack/dk_pac/src/power/ramstatus.rs | 194 ++ down-the-stack/dk_pac/src/power/resetreas.rs | 553 ++++ down-the-stack/dk_pac/src/power/systemoff.rs | 71 + .../dk_pac/src/power/tasks_constlat.rs | 72 + .../dk_pac/src/power/tasks_lowpwr.rs | 72 + down-the-stack/dk_pac/src/ppi.rs | 53 + down-the-stack/dk_pac/src/ppi/ch.rs | 16 + down-the-stack/dk_pac/src/ppi/ch/eep.rs | 80 + down-the-stack/dk_pac/src/ppi/ch/tep.rs | 80 + down-the-stack/dk_pac/src/ppi/chen.rs | 2017 ++++++++++++++ down-the-stack/dk_pac/src/ppi/chenclr.rs | 2241 +++++++++++++++ down-the-stack/dk_pac/src/ppi/chenset.rs | 2241 +++++++++++++++ down-the-stack/dk_pac/src/ppi/chg.rs | 2018 ++++++++++++++ down-the-stack/dk_pac/src/ppi/fork.rs | 10 + down-the-stack/dk_pac/src/ppi/fork/tep.rs | 80 + down-the-stack/dk_pac/src/ppi/tasks_chg.rs | 16 + .../dk_pac/src/ppi/tasks_chg/dis.rs | 71 + down-the-stack/dk_pac/src/ppi/tasks_chg/en.rs | 71 + down-the-stack/dk_pac/src/pwm0.rs | 136 + down-the-stack/dk_pac/src/pwm0/countertop.rs | 81 + down-the-stack/dk_pac/src/pwm0/decoder.rs | 215 ++ down-the-stack/dk_pac/src/pwm0/enable.rs | 126 + .../dk_pac/src/pwm0/events_loopsdone.rs | 127 + .../dk_pac/src/pwm0/events_pwmperiodend.rs | 127 + .../dk_pac/src/pwm0/events_seqend.rs | 128 + .../dk_pac/src/pwm0/events_seqstarted.rs | 128 + .../dk_pac/src/pwm0/events_stopped.rs | 127 + down-the-stack/dk_pac/src/pwm0/inten.rs | 492 ++++ down-the-stack/dk_pac/src/pwm0/intenclr.rs | 544 ++++ down-the-stack/dk_pac/src/pwm0/intenset.rs | 544 ++++ down-the-stack/dk_pac/src/pwm0/loop_.rs | 115 + down-the-stack/dk_pac/src/pwm0/mode.rs | 126 + down-the-stack/dk_pac/src/pwm0/prescaler.rs | 207 ++ down-the-stack/dk_pac/src/pwm0/psel.rs | 10 + down-the-stack/dk_pac/src/pwm0/psel/out.rs | 142 + down-the-stack/dk_pac/src/pwm0/seq.rs | 28 + down-the-stack/dk_pac/src/pwm0/seq/cnt.rs | 115 + .../dk_pac/src/pwm0/seq/enddelay.rs | 80 + down-the-stack/dk_pac/src/pwm0/seq/ptr.rs | 80 + down-the-stack/dk_pac/src/pwm0/seq/refresh.rs | 115 + down-the-stack/dk_pac/src/pwm0/shorts.rs | 385 +++ .../dk_pac/src/pwm0/tasks_nextstep.rs | 72 + .../dk_pac/src/pwm0/tasks_seqstart.rs | 73 + down-the-stack/dk_pac/src/pwm0/tasks_stop.rs | 72 + down-the-stack/dk_pac/src/qdec.rs | 160 ++ down-the-stack/dk_pac/src/qdec/acc.rs | 37 + down-the-stack/dk_pac/src/qdec/accdbl.rs | 37 + down-the-stack/dk_pac/src/qdec/accdblread.rs | 37 + down-the-stack/dk_pac/src/qdec/accread.rs | 37 + down-the-stack/dk_pac/src/qdec/dbfen.rs | 126 + down-the-stack/dk_pac/src/qdec/enable.rs | 126 + .../dk_pac/src/qdec/events_accof.rs | 127 + .../dk_pac/src/qdec/events_dblrdy.rs | 127 + .../dk_pac/src/qdec/events_reportrdy.rs | 127 + .../dk_pac/src/qdec/events_samplerdy.rs | 127 + .../dk_pac/src/qdec/events_stopped.rs | 127 + down-the-stack/dk_pac/src/qdec/intenclr.rs | 405 +++ down-the-stack/dk_pac/src/qdec/intenset.rs | 405 +++ down-the-stack/dk_pac/src/qdec/ledpol.rs | 126 + down-the-stack/dk_pac/src/qdec/ledpre.rs | 80 + down-the-stack/dk_pac/src/qdec/psel.rs | 22 + down-the-stack/dk_pac/src/qdec/psel/a.rs | 141 + down-the-stack/dk_pac/src/qdec/psel/b.rs | 141 + down-the-stack/dk_pac/src/qdec/psel/led.rs | 141 + down-the-stack/dk_pac/src/qdec/reportper.rs | 220 ++ down-the-stack/dk_pac/src/qdec/sample.rs | 37 + down-the-stack/dk_pac/src/qdec/sampleper.rs | 246 ++ down-the-stack/dk_pac/src/qdec/shorts.rs | 498 ++++ .../dk_pac/src/qdec/tasks_rdclracc.rs | 72 + .../dk_pac/src/qdec/tasks_rdclrdbl.rs | 72 + .../dk_pac/src/qdec/tasks_readclracc.rs | 72 + down-the-stack/dk_pac/src/qdec/tasks_start.rs | 72 + down-the-stack/dk_pac/src/qdec/tasks_stop.rs | 72 + down-the-stack/dk_pac/src/radio.rs | 330 +++ down-the-stack/dk_pac/src/radio/base0.rs | 80 + down-the-stack/dk_pac/src/radio/base1.rs | 80 + down-the-stack/dk_pac/src/radio/bcc.rs | 80 + down-the-stack/dk_pac/src/radio/crccnf.rs | 215 ++ down-the-stack/dk_pac/src/radio/crcinit.rs | 80 + down-the-stack/dk_pac/src/radio/crcpoly.rs | 80 + down-the-stack/dk_pac/src/radio/crcstatus.rs | 71 + down-the-stack/dk_pac/src/radio/dab.rs | 81 + down-the-stack/dk_pac/src/radio/dacnf.rs | 673 +++++ down-the-stack/dk_pac/src/radio/dai.rs | 37 + down-the-stack/dk_pac/src/radio/dap.rs | 81 + .../dk_pac/src/radio/datawhiteiv.rs | 81 + .../dk_pac/src/radio/events_address.rs | 127 + .../dk_pac/src/radio/events_bcmatch.rs | 127 + .../dk_pac/src/radio/events_crcerror.rs | 127 + .../dk_pac/src/radio/events_crcok.rs | 127 + .../dk_pac/src/radio/events_devmatch.rs | 127 + .../dk_pac/src/radio/events_devmiss.rs | 127 + .../dk_pac/src/radio/events_disabled.rs | 127 + down-the-stack/dk_pac/src/radio/events_end.rs | 127 + .../dk_pac/src/radio/events_payload.rs | 127 + .../dk_pac/src/radio/events_ready.rs | 127 + .../dk_pac/src/radio/events_rssiend.rs | 127 + down-the-stack/dk_pac/src/radio/frequency.rs | 141 + down-the-stack/dk_pac/src/radio/intenclr.rs | 813 ++++++ down-the-stack/dk_pac/src/radio/intenset.rs | 813 ++++++ down-the-stack/dk_pac/src/radio/mode.rs | 167 ++ down-the-stack/dk_pac/src/radio/modecnf0.rs | 202 ++ down-the-stack/dk_pac/src/radio/packetptr.rs | 81 + down-the-stack/dk_pac/src/radio/pcnf0.rs | 232 ++ down-the-stack/dk_pac/src/radio/pcnf1.rs | 232 ++ down-the-stack/dk_pac/src/radio/power.rs | 126 + down-the-stack/dk_pac/src/radio/prefix0.rs | 125 + down-the-stack/dk_pac/src/radio/prefix1.rs | 125 + down-the-stack/dk_pac/src/radio/rssisample.rs | 37 + .../dk_pac/src/radio/rxaddresses.rs | 553 ++++ down-the-stack/dk_pac/src/radio/rxcrc.rs | 37 + down-the-stack/dk_pac/src/radio/rxmatch.rs | 37 + down-the-stack/dk_pac/src/radio/shorts.rs | 558 ++++ down-the-stack/dk_pac/src/radio/state.rs | 129 + .../dk_pac/src/radio/tasks_bcstart.rs | 72 + .../dk_pac/src/radio/tasks_bcstop.rs | 72 + .../dk_pac/src/radio/tasks_disable.rs | 72 + .../dk_pac/src/radio/tasks_rssistart.rs | 72 + .../dk_pac/src/radio/tasks_rssistop.rs | 72 + down-the-stack/dk_pac/src/radio/tasks_rxen.rs | 72 + .../dk_pac/src/radio/tasks_start.rs | 72 + down-the-stack/dk_pac/src/radio/tasks_stop.rs | 72 + down-the-stack/dk_pac/src/radio/tasks_txen.rs | 72 + down-the-stack/dk_pac/src/radio/tifs.rs | 80 + down-the-stack/dk_pac/src/radio/txaddress.rs | 80 + down-the-stack/dk_pac/src/radio/txpower.rs | 233 ++ down-the-stack/dk_pac/src/rng.rs | 56 + down-the-stack/dk_pac/src/rng/config.rs | 126 + .../dk_pac/src/rng/events_valrdy.rs | 127 + down-the-stack/dk_pac/src/rng/intenclr.rs | 133 + down-the-stack/dk_pac/src/rng/intenset.rs | 133 + down-the-stack/dk_pac/src/rng/shorts.rs | 126 + down-the-stack/dk_pac/src/rng/tasks_start.rs | 72 + down-the-stack/dk_pac/src/rng/tasks_stop.rs | 72 + down-the-stack/dk_pac/src/rng/value.rs | 37 + down-the-stack/dk_pac/src/rtc0.rs | 102 + down-the-stack/dk_pac/src/rtc0/cc.rs | 81 + down-the-stack/dk_pac/src/rtc0/counter.rs | 37 + .../dk_pac/src/rtc0/events_compare.rs | 134 + .../dk_pac/src/rtc0/events_ovrflw.rs | 127 + down-the-stack/dk_pac/src/rtc0/events_tick.rs | 127 + down-the-stack/dk_pac/src/rtc0/evten.rs | 431 +++ down-the-stack/dk_pac/src/rtc0/evtenclr.rs | 473 ++++ down-the-stack/dk_pac/src/rtc0/evtenset.rs | 473 ++++ down-the-stack/dk_pac/src/rtc0/intenclr.rs | 473 ++++ down-the-stack/dk_pac/src/rtc0/intenset.rs | 473 ++++ down-the-stack/dk_pac/src/rtc0/prescaler.rs | 81 + down-the-stack/dk_pac/src/rtc0/tasks_clear.rs | 72 + down-the-stack/dk_pac/src/rtc0/tasks_start.rs | 72 + down-the-stack/dk_pac/src/rtc0/tasks_stop.rs | 72 + .../dk_pac/src/rtc0/tasks_trigovrflw.rs | 72 + down-the-stack/dk_pac/src/saadc.rs | 140 + down-the-stack/dk_pac/src/saadc/ch.rs | 28 + down-the-stack/dk_pac/src/saadc/ch/config.rs | 682 +++++ down-the-stack/dk_pac/src/saadc/ch/limit.rs | 95 + down-the-stack/dk_pac/src/saadc/ch/pseln.rs | 232 ++ down-the-stack/dk_pac/src/saadc/ch/pselp.rs | 232 ++ down-the-stack/dk_pac/src/saadc/enable.rs | 126 + .../dk_pac/src/saadc/events_calibratedone.rs | 127 + down-the-stack/dk_pac/src/saadc/events_ch.rs | 16 + .../dk_pac/src/saadc/events_ch/limith.rs | 126 + .../dk_pac/src/saadc/events_ch/limitl.rs | 126 + .../dk_pac/src/saadc/events_done.rs | 127 + down-the-stack/dk_pac/src/saadc/events_end.rs | 127 + .../dk_pac/src/saadc/events_resultdone.rs | 127 + .../dk_pac/src/saadc/events_started.rs | 127 + .../dk_pac/src/saadc/events_stopped.rs | 127 + down-the-stack/dk_pac/src/saadc/inten.rs | 1408 ++++++++++ down-the-stack/dk_pac/src/saadc/intenclr.rs | 1562 +++++++++++ down-the-stack/dk_pac/src/saadc/intenset.rs | 1562 +++++++++++ down-the-stack/dk_pac/src/saadc/oversample.rs | 220 ++ down-the-stack/dk_pac/src/saadc/resolution.rs | 154 ++ down-the-stack/dk_pac/src/saadc/result.rs | 22 + .../dk_pac/src/saadc/result/amount.rs | 37 + .../dk_pac/src/saadc/result/maxcnt.rs | 80 + down-the-stack/dk_pac/src/saadc/result/ptr.rs | 80 + down-the-stack/dk_pac/src/saadc/samplerate.rs | 141 + down-the-stack/dk_pac/src/saadc/status.rs | 71 + .../dk_pac/src/saadc/tasks_calibrateoffset.rs | 72 + .../dk_pac/src/saadc/tasks_sample.rs | 72 + .../dk_pac/src/saadc/tasks_start.rs | 72 + down-the-stack/dk_pac/src/saadc/tasks_stop.rs | 72 + down-the-stack/dk_pac/src/spi0.rs | 66 + down-the-stack/dk_pac/src/spi0/config.rs | 248 ++ down-the-stack/dk_pac/src/spi0/enable.rs | 128 + .../dk_pac/src/spi0/events_ready.rs | 127 + down-the-stack/dk_pac/src/spi0/frequency.rs | 194 ++ down-the-stack/dk_pac/src/spi0/intenclr.rs | 133 + down-the-stack/dk_pac/src/spi0/intenset.rs | 133 + down-the-stack/dk_pac/src/spi0/psel.rs | 22 + down-the-stack/dk_pac/src/spi0/psel/miso.rs | 116 + down-the-stack/dk_pac/src/spi0/psel/mosi.rs | 116 + down-the-stack/dk_pac/src/spi0/psel/sck.rs | 115 + down-the-stack/dk_pac/src/spi0/rxd.rs | 37 + down-the-stack/dk_pac/src/spi0/txd.rs | 80 + down-the-stack/dk_pac/src/spim0.rs | 135 + down-the-stack/dk_pac/src/spim0/config.rs | 248 ++ down-the-stack/dk_pac/src/spim0/enable.rs | 128 + down-the-stack/dk_pac/src/spim0/events_end.rs | 127 + .../dk_pac/src/spim0/events_endrx.rs | 127 + .../dk_pac/src/spim0/events_endtx.rs | 127 + .../dk_pac/src/spim0/events_started.rs | 127 + .../dk_pac/src/spim0/events_stopped.rs | 127 + down-the-stack/dk_pac/src/spim0/frequency.rs | 194 ++ down-the-stack/dk_pac/src/spim0/intenclr.rs | 405 +++ down-the-stack/dk_pac/src/spim0/intenset.rs | 405 +++ down-the-stack/dk_pac/src/spim0/orc.rs | 80 + down-the-stack/dk_pac/src/spim0/psel.rs | 22 + down-the-stack/dk_pac/src/spim0/psel/miso.rs | 141 + down-the-stack/dk_pac/src/spim0/psel/mosi.rs | 141 + down-the-stack/dk_pac/src/spim0/psel/sck.rs | 141 + down-the-stack/dk_pac/src/spim0/rxd.rs | 28 + down-the-stack/dk_pac/src/spim0/rxd/amount.rs | 37 + down-the-stack/dk_pac/src/spim0/rxd/list.rs | 128 + down-the-stack/dk_pac/src/spim0/rxd/maxcnt.rs | 80 + down-the-stack/dk_pac/src/spim0/rxd/ptr.rs | 80 + down-the-stack/dk_pac/src/spim0/shorts.rs | 126 + .../dk_pac/src/spim0/tasks_resume.rs | 72 + .../dk_pac/src/spim0/tasks_start.rs | 72 + down-the-stack/dk_pac/src/spim0/tasks_stop.rs | 72 + .../dk_pac/src/spim0/tasks_suspend.rs | 72 + down-the-stack/dk_pac/src/spim0/txd.rs | 28 + down-the-stack/dk_pac/src/spim0/txd/amount.rs | 37 + down-the-stack/dk_pac/src/spim0/txd/list.rs | 128 + down-the-stack/dk_pac/src/spim0/txd/maxcnt.rs | 80 + down-the-stack/dk_pac/src/spim0/txd/ptr.rs | 80 + down-the-stack/dk_pac/src/spis0.rs | 124 + down-the-stack/dk_pac/src/spis0/config.rs | 248 ++ down-the-stack/dk_pac/src/spis0/def.rs | 80 + down-the-stack/dk_pac/src/spis0/enable.rs | 128 + .../dk_pac/src/spis0/events_acquired.rs | 127 + down-the-stack/dk_pac/src/spis0/events_end.rs | 127 + .../dk_pac/src/spis0/events_endrx.rs | 127 + down-the-stack/dk_pac/src/spis0/intenclr.rs | 269 ++ down-the-stack/dk_pac/src/spis0/intenset.rs | 269 ++ down-the-stack/dk_pac/src/spis0/orc.rs | 80 + down-the-stack/dk_pac/src/spis0/psel.rs | 28 + down-the-stack/dk_pac/src/spis0/psel/csn.rs | 141 + down-the-stack/dk_pac/src/spis0/psel/miso.rs | 141 + down-the-stack/dk_pac/src/spis0/psel/mosi.rs | 141 + down-the-stack/dk_pac/src/spis0/psel/sck.rs | 141 + down-the-stack/dk_pac/src/spis0/rxd.rs | 22 + down-the-stack/dk_pac/src/spis0/rxd/amount.rs | 37 + down-the-stack/dk_pac/src/spis0/rxd/maxcnt.rs | 80 + down-the-stack/dk_pac/src/spis0/rxd/ptr.rs | 80 + down-the-stack/dk_pac/src/spis0/semstat.rs | 89 + down-the-stack/dk_pac/src/spis0/shorts.rs | 126 + down-the-stack/dk_pac/src/spis0/status.rs | 201 ++ .../dk_pac/src/spis0/tasks_acquire.rs | 72 + .../dk_pac/src/spis0/tasks_release.rs | 72 + down-the-stack/dk_pac/src/spis0/txd.rs | 22 + down-the-stack/dk_pac/src/spis0/txd/amount.rs | 37 + down-the-stack/dk_pac/src/spis0/txd/maxcnt.rs | 80 + down-the-stack/dk_pac/src/spis0/txd/ptr.rs | 80 + down-the-stack/dk_pac/src/swi0.rs | 10 + down-the-stack/dk_pac/src/swi0/unused.rs | 28 + down-the-stack/dk_pac/src/temp.rs | 148 + down-the-stack/dk_pac/src/temp/a0.rs | 80 + down-the-stack/dk_pac/src/temp/a1.rs | 80 + down-the-stack/dk_pac/src/temp/a2.rs | 80 + down-the-stack/dk_pac/src/temp/a3.rs | 80 + down-the-stack/dk_pac/src/temp/a4.rs | 80 + down-the-stack/dk_pac/src/temp/a5.rs | 80 + down-the-stack/dk_pac/src/temp/b0.rs | 80 + down-the-stack/dk_pac/src/temp/b1.rs | 80 + down-the-stack/dk_pac/src/temp/b2.rs | 80 + down-the-stack/dk_pac/src/temp/b3.rs | 80 + down-the-stack/dk_pac/src/temp/b4.rs | 80 + down-the-stack/dk_pac/src/temp/b5.rs | 80 + .../dk_pac/src/temp/events_datardy.rs | 127 + down-the-stack/dk_pac/src/temp/intenclr.rs | 133 + down-the-stack/dk_pac/src/temp/intenset.rs | 133 + down-the-stack/dk_pac/src/temp/t0.rs | 80 + down-the-stack/dk_pac/src/temp/t1.rs | 80 + down-the-stack/dk_pac/src/temp/t2.rs | 80 + down-the-stack/dk_pac/src/temp/t3.rs | 80 + down-the-stack/dk_pac/src/temp/t4.rs | 80 + down-the-stack/dk_pac/src/temp/tasks_start.rs | 72 + down-the-stack/dk_pac/src/temp/tasks_stop.rs | 72 + down-the-stack/dk_pac/src/temp/temp.rs | 37 + down-the-stack/dk_pac/src/timer0.rs | 99 + down-the-stack/dk_pac/src/timer0/bitmode.rs | 155 ++ down-the-stack/dk_pac/src/timer0/cc.rs | 81 + .../dk_pac/src/timer0/events_compare.rs | 134 + down-the-stack/dk_pac/src/timer0/intenclr.rs | 473 ++++ down-the-stack/dk_pac/src/timer0/intenset.rs | 473 ++++ down-the-stack/dk_pac/src/timer0/mode.rs | 141 + down-the-stack/dk_pac/src/timer0/prescaler.rs | 80 + down-the-stack/dk_pac/src/timer0/shorts.rs | 869 ++++++ .../dk_pac/src/timer0/tasks_capture.rs | 77 + .../dk_pac/src/timer0/tasks_clear.rs | 72 + .../dk_pac/src/timer0/tasks_count.rs | 72 + .../dk_pac/src/timer0/tasks_shutdown.rs | 72 + .../dk_pac/src/timer0/tasks_start.rs | 72 + .../dk_pac/src/timer0/tasks_stop.rs | 72 + down-the-stack/dk_pac/src/twi0.rs | 152 ++ down-the-stack/dk_pac/src/twi0/address.rs | 80 + down-the-stack/dk_pac/src/twi0/enable.rs | 128 + down-the-stack/dk_pac/src/twi0/errorsrc.rs | 269 ++ down-the-stack/dk_pac/src/twi0/events_bb.rs | 126 + .../dk_pac/src/twi0/events_error.rs | 127 + .../dk_pac/src/twi0/events_rxdready.rs | 127 + .../dk_pac/src/twi0/events_stopped.rs | 127 + .../dk_pac/src/twi0/events_suspended.rs | 127 + .../dk_pac/src/twi0/events_txdsent.rs | 127 + down-the-stack/dk_pac/src/twi0/frequency.rs | 142 + down-the-stack/dk_pac/src/twi0/intenclr.rs | 473 ++++ down-the-stack/dk_pac/src/twi0/intenset.rs | 473 ++++ down-the-stack/dk_pac/src/twi0/pselscl.rs | 116 + down-the-stack/dk_pac/src/twi0/pselsda.rs | 116 + down-the-stack/dk_pac/src/twi0/rxd.rs | 37 + down-the-stack/dk_pac/src/twi0/shorts.rs | 187 ++ .../dk_pac/src/twi0/tasks_resume.rs | 72 + .../dk_pac/src/twi0/tasks_startrx.rs | 72 + .../dk_pac/src/twi0/tasks_starttx.rs | 72 + down-the-stack/dk_pac/src/twi0/tasks_stop.rs | 72 + .../dk_pac/src/twi0/tasks_suspend.rs | 72 + down-the-stack/dk_pac/src/twi0/txd.rs | 80 + down-the-stack/dk_pac/src/twim0.rs | 160 ++ down-the-stack/dk_pac/src/twim0/address.rs | 80 + down-the-stack/dk_pac/src/twim0/enable.rs | 128 + down-the-stack/dk_pac/src/twim0/errorsrc.rs | 248 ++ .../dk_pac/src/twim0/events_error.rs | 127 + .../dk_pac/src/twim0/events_lastrx.rs | 127 + .../dk_pac/src/twim0/events_lasttx.rs | 127 + .../dk_pac/src/twim0/events_rxstarted.rs | 127 + .../dk_pac/src/twim0/events_stopped.rs | 127 + .../dk_pac/src/twim0/events_suspended.rs | 127 + .../dk_pac/src/twim0/events_txstarted.rs | 127 + down-the-stack/dk_pac/src/twim0/frequency.rs | 142 + down-the-stack/dk_pac/src/twim0/inten.rs | 492 ++++ down-the-stack/dk_pac/src/twim0/intenclr.rs | 541 ++++ down-the-stack/dk_pac/src/twim0/intenset.rs | 541 ++++ down-the-stack/dk_pac/src/twim0/psel.rs | 16 + down-the-stack/dk_pac/src/twim0/psel/scl.rs | 141 + down-the-stack/dk_pac/src/twim0/psel/sda.rs | 141 + down-the-stack/dk_pac/src/twim0/rxd.rs | 28 + down-the-stack/dk_pac/src/twim0/rxd/amount.rs | 37 + down-the-stack/dk_pac/src/twim0/rxd/list.rs | 128 + down-the-stack/dk_pac/src/twim0/rxd/maxcnt.rs | 80 + down-the-stack/dk_pac/src/twim0/rxd/ptr.rs | 80 + down-the-stack/dk_pac/src/twim0/shorts.rs | 373 +++ .../dk_pac/src/twim0/tasks_resume.rs | 72 + .../dk_pac/src/twim0/tasks_startrx.rs | 72 + .../dk_pac/src/twim0/tasks_starttx.rs | 72 + down-the-stack/dk_pac/src/twim0/tasks_stop.rs | 72 + .../dk_pac/src/twim0/tasks_suspend.rs | 72 + down-the-stack/dk_pac/src/twim0/txd.rs | 28 + down-the-stack/dk_pac/src/twim0/txd/amount.rs | 37 + down-the-stack/dk_pac/src/twim0/txd/list.rs | 128 + down-the-stack/dk_pac/src/twim0/txd/maxcnt.rs | 80 + down-the-stack/dk_pac/src/twim0/txd/ptr.rs | 80 + down-the-stack/dk_pac/src/twis0.rs | 168 ++ down-the-stack/dk_pac/src/twis0/address.rs | 81 + down-the-stack/dk_pac/src/twis0/config.rs | 187 ++ down-the-stack/dk_pac/src/twis0/enable.rs | 128 + down-the-stack/dk_pac/src/twis0/errorsrc.rs | 248 ++ .../dk_pac/src/twis0/events_error.rs | 127 + .../dk_pac/src/twis0/events_read.rs | 127 + .../dk_pac/src/twis0/events_rxstarted.rs | 127 + .../dk_pac/src/twis0/events_stopped.rs | 127 + .../dk_pac/src/twis0/events_txstarted.rs | 127 + .../dk_pac/src/twis0/events_write.rs | 127 + down-the-stack/dk_pac/src/twis0/inten.rs | 431 +++ down-the-stack/dk_pac/src/twis0/intenclr.rs | 473 ++++ down-the-stack/dk_pac/src/twis0/intenset.rs | 473 ++++ down-the-stack/dk_pac/src/twis0/match_.rs | 37 + down-the-stack/dk_pac/src/twis0/orc.rs | 80 + down-the-stack/dk_pac/src/twis0/psel.rs | 16 + down-the-stack/dk_pac/src/twis0/psel/scl.rs | 141 + down-the-stack/dk_pac/src/twis0/psel/sda.rs | 141 + down-the-stack/dk_pac/src/twis0/rxd.rs | 22 + down-the-stack/dk_pac/src/twis0/rxd/amount.rs | 37 + down-the-stack/dk_pac/src/twis0/rxd/maxcnt.rs | 80 + down-the-stack/dk_pac/src/twis0/rxd/ptr.rs | 80 + down-the-stack/dk_pac/src/twis0/shorts.rs | 189 ++ .../dk_pac/src/twis0/tasks_preparerx.rs | 72 + .../dk_pac/src/twis0/tasks_preparetx.rs | 72 + .../dk_pac/src/twis0/tasks_resume.rs | 72 + down-the-stack/dk_pac/src/twis0/tasks_stop.rs | 72 + .../dk_pac/src/twis0/tasks_suspend.rs | 72 + down-the-stack/dk_pac/src/twis0/txd.rs | 22 + down-the-stack/dk_pac/src/twis0/txd/amount.rs | 37 + down-the-stack/dk_pac/src/twis0/txd/maxcnt.rs | 80 + down-the-stack/dk_pac/src/twis0/txd/ptr.rs | 80 + down-the-stack/dk_pac/src/uart0.rs | 160 ++ down-the-stack/dk_pac/src/uart0/baudrate.rs | 337 +++ down-the-stack/dk_pac/src/uart0/config.rs | 189 ++ down-the-stack/dk_pac/src/uart0/enable.rs | 128 + down-the-stack/dk_pac/src/uart0/errorsrc.rs | 309 +++ down-the-stack/dk_pac/src/uart0/events_cts.rs | 127 + .../dk_pac/src/uart0/events_error.rs | 127 + .../dk_pac/src/uart0/events_ncts.rs | 127 + .../dk_pac/src/uart0/events_rxdrdy.rs | 127 + .../dk_pac/src/uart0/events_rxto.rs | 127 + .../dk_pac/src/uart0/events_txdrdy.rs | 127 + down-the-stack/dk_pac/src/uart0/intenclr.rs | 473 ++++ down-the-stack/dk_pac/src/uart0/intenset.rs | 473 ++++ down-the-stack/dk_pac/src/uart0/pselcts.rs | 116 + down-the-stack/dk_pac/src/uart0/pselrts.rs | 116 + down-the-stack/dk_pac/src/uart0/pselrxd.rs | 116 + down-the-stack/dk_pac/src/uart0/pseltxd.rs | 116 + down-the-stack/dk_pac/src/uart0/rxd.rs | 37 + down-the-stack/dk_pac/src/uart0/shorts.rs | 187 ++ .../dk_pac/src/uart0/tasks_startrx.rs | 72 + .../dk_pac/src/uart0/tasks_starttx.rs | 72 + .../dk_pac/src/uart0/tasks_stoprx.rs | 72 + .../dk_pac/src/uart0/tasks_stoptx.rs | 72 + .../dk_pac/src/uart0/tasks_suspend.rs | 72 + down-the-stack/dk_pac/src/uart0/txd.rs | 52 + down-the-stack/dk_pac/src/uarte0.rs | 185 ++ down-the-stack/dk_pac/src/uarte0/baudrate.rs | 337 +++ down-the-stack/dk_pac/src/uarte0/config.rs | 189 ++ down-the-stack/dk_pac/src/uarte0/enable.rs | 128 + down-the-stack/dk_pac/src/uarte0/errorsrc.rs | 309 +++ .../dk_pac/src/uarte0/events_cts.rs | 127 + .../dk_pac/src/uarte0/events_endrx.rs | 127 + .../dk_pac/src/uarte0/events_endtx.rs | 127 + .../dk_pac/src/uarte0/events_error.rs | 127 + .../dk_pac/src/uarte0/events_ncts.rs | 127 + .../dk_pac/src/uarte0/events_rxdrdy.rs | 127 + .../dk_pac/src/uarte0/events_rxstarted.rs | 127 + .../dk_pac/src/uarte0/events_rxto.rs | 127 + .../dk_pac/src/uarte0/events_txdrdy.rs | 127 + .../dk_pac/src/uarte0/events_txstarted.rs | 127 + .../dk_pac/src/uarte0/events_txstopped.rs | 127 + down-the-stack/dk_pac/src/uarte0/inten.rs | 736 +++++ down-the-stack/dk_pac/src/uarte0/intenclr.rs | 813 ++++++ down-the-stack/dk_pac/src/uarte0/intenset.rs | 813 ++++++ down-the-stack/dk_pac/src/uarte0/psel.rs | 28 + down-the-stack/dk_pac/src/uarte0/psel/cts.rs | 141 + down-the-stack/dk_pac/src/uarte0/psel/rts.rs | 141 + down-the-stack/dk_pac/src/uarte0/psel/rxd.rs | 141 + down-the-stack/dk_pac/src/uarte0/psel/txd.rs | 141 + down-the-stack/dk_pac/src/uarte0/rxd.rs | 22 + .../dk_pac/src/uarte0/rxd/amount.rs | 37 + .../dk_pac/src/uarte0/rxd/maxcnt.rs | 80 + down-the-stack/dk_pac/src/uarte0/rxd/ptr.rs | 80 + down-the-stack/dk_pac/src/uarte0/shorts.rs | 189 ++ .../dk_pac/src/uarte0/tasks_flushrx.rs | 72 + .../dk_pac/src/uarte0/tasks_startrx.rs | 72 + .../dk_pac/src/uarte0/tasks_starttx.rs | 72 + .../dk_pac/src/uarte0/tasks_stoprx.rs | 72 + .../dk_pac/src/uarte0/tasks_stoptx.rs | 72 + down-the-stack/dk_pac/src/uarte0/txd.rs | 22 + .../dk_pac/src/uarte0/txd/amount.rs | 37 + .../dk_pac/src/uarte0/txd/maxcnt.rs | 80 + down-the-stack/dk_pac/src/uarte0/txd/ptr.rs | 80 + down-the-stack/dk_pac/src/uicr.rs | 42 + down-the-stack/dk_pac/src/uicr/approtect.rs | 141 + down-the-stack/dk_pac/src/uicr/customer.rs | 81 + down-the-stack/dk_pac/src/uicr/nfcpins.rs | 126 + down-the-stack/dk_pac/src/uicr/nrffw.rs | 81 + down-the-stack/dk_pac/src/uicr/nrfhw.rs | 81 + down-the-stack/dk_pac/src/uicr/pselreset.rs | 142 + down-the-stack/dk_pac/src/wdt.rs | 69 + down-the-stack/dk_pac/src/wdt/config.rs | 187 ++ down-the-stack/dk_pac/src/wdt/crv.rs | 80 + .../dk_pac/src/wdt/events_timeout.rs | 127 + down-the-stack/dk_pac/src/wdt/intenclr.rs | 133 + down-the-stack/dk_pac/src/wdt/intenset.rs | 133 + down-the-stack/dk_pac/src/wdt/reqstatus.rs | 398 +++ down-the-stack/dk_pac/src/wdt/rr.rs | 73 + down-the-stack/dk_pac/src/wdt/rren.rs | 625 +++++ down-the-stack/dk_pac/src/wdt/runstatus.rs | 71 + down-the-stack/dk_pac/src/wdt/tasks_start.rs | 72 + embedded-workshop-book/src/pac_exercise.md | 20 + 797 files changed, 163507 insertions(+) create mode 100644 down-the-stack/dk_pac/build.rs create mode 100644 down-the-stack/dk_pac/device.x create mode 100644 down-the-stack/dk_pac/src/aar.rs create mode 100644 down-the-stack/dk_pac/src/aar/addrptr.rs create mode 100644 down-the-stack/dk_pac/src/aar/enable.rs create mode 100644 down-the-stack/dk_pac/src/aar/events_end.rs create mode 100644 down-the-stack/dk_pac/src/aar/events_notresolved.rs create mode 100644 down-the-stack/dk_pac/src/aar/events_resolved.rs create mode 100644 down-the-stack/dk_pac/src/aar/intenclr.rs create mode 100644 down-the-stack/dk_pac/src/aar/intenset.rs create mode 100644 down-the-stack/dk_pac/src/aar/irkptr.rs create mode 100644 down-the-stack/dk_pac/src/aar/nirk.rs create mode 100644 down-the-stack/dk_pac/src/aar/scratchptr.rs create mode 100644 down-the-stack/dk_pac/src/aar/status.rs create mode 100644 down-the-stack/dk_pac/src/aar/tasks_start.rs create mode 100644 down-the-stack/dk_pac/src/aar/tasks_stop.rs create mode 100644 down-the-stack/dk_pac/src/approtect.rs create mode 100644 down-the-stack/dk_pac/src/approtect/disable.rs create mode 100644 down-the-stack/dk_pac/src/approtect/forceprotect.rs create mode 100644 down-the-stack/dk_pac/src/bprot.rs create mode 100644 down-the-stack/dk_pac/src/bprot/config0.rs create mode 100644 down-the-stack/dk_pac/src/bprot/config1.rs create mode 100644 down-the-stack/dk_pac/src/bprot/config2.rs create mode 100644 down-the-stack/dk_pac/src/bprot/config3.rs create mode 100644 down-the-stack/dk_pac/src/bprot/disableindebug.rs create mode 100644 down-the-stack/dk_pac/src/ccm.rs create mode 100644 down-the-stack/dk_pac/src/ccm/cnfptr.rs create mode 100644 down-the-stack/dk_pac/src/ccm/enable.rs create mode 100644 down-the-stack/dk_pac/src/ccm/events_endcrypt.rs create mode 100644 down-the-stack/dk_pac/src/ccm/events_endksgen.rs create mode 100644 down-the-stack/dk_pac/src/ccm/events_error.rs create mode 100644 down-the-stack/dk_pac/src/ccm/inptr.rs create mode 100644 down-the-stack/dk_pac/src/ccm/intenclr.rs create mode 100644 down-the-stack/dk_pac/src/ccm/intenset.rs create mode 100644 down-the-stack/dk_pac/src/ccm/micstatus.rs create mode 100644 down-the-stack/dk_pac/src/ccm/mode.rs create mode 100644 down-the-stack/dk_pac/src/ccm/outptr.rs create mode 100644 down-the-stack/dk_pac/src/ccm/scratchptr.rs create mode 100644 down-the-stack/dk_pac/src/ccm/shorts.rs create mode 100644 down-the-stack/dk_pac/src/ccm/tasks_crypt.rs create mode 100644 down-the-stack/dk_pac/src/ccm/tasks_ksgen.rs create mode 100644 down-the-stack/dk_pac/src/ccm/tasks_stop.rs create mode 100644 down-the-stack/dk_pac/src/clock.rs create mode 100644 down-the-stack/dk_pac/src/clock/ctiv.rs create mode 100644 down-the-stack/dk_pac/src/clock/events_ctto.rs create mode 100644 down-the-stack/dk_pac/src/clock/events_done.rs create mode 100644 down-the-stack/dk_pac/src/clock/events_hfclkstarted.rs create mode 100644 down-the-stack/dk_pac/src/clock/events_lfclkstarted.rs create mode 100644 down-the-stack/dk_pac/src/clock/hfclkrun.rs create mode 100644 down-the-stack/dk_pac/src/clock/hfclkstat.rs create mode 100644 down-the-stack/dk_pac/src/clock/intenclr.rs create mode 100644 down-the-stack/dk_pac/src/clock/intenset.rs create mode 100644 down-the-stack/dk_pac/src/clock/lfclkrun.rs create mode 100644 down-the-stack/dk_pac/src/clock/lfclksrc.rs create mode 100644 down-the-stack/dk_pac/src/clock/lfclksrccopy.rs create mode 100644 down-the-stack/dk_pac/src/clock/lfclkstat.rs create mode 100644 down-the-stack/dk_pac/src/clock/tasks_cal.rs create mode 100644 down-the-stack/dk_pac/src/clock/tasks_ctstart.rs create mode 100644 down-the-stack/dk_pac/src/clock/tasks_ctstop.rs create mode 100644 down-the-stack/dk_pac/src/clock/tasks_hfclkstart.rs create mode 100644 down-the-stack/dk_pac/src/clock/tasks_hfclkstop.rs create mode 100644 down-the-stack/dk_pac/src/clock/tasks_lfclkstart.rs create mode 100644 down-the-stack/dk_pac/src/clock/tasks_lfclkstop.rs create mode 100644 down-the-stack/dk_pac/src/clock/traceconfig.rs create mode 100644 down-the-stack/dk_pac/src/comp.rs create mode 100644 down-the-stack/dk_pac/src/comp/enable.rs create mode 100644 down-the-stack/dk_pac/src/comp/events_cross.rs create mode 100644 down-the-stack/dk_pac/src/comp/events_down.rs create mode 100644 down-the-stack/dk_pac/src/comp/events_ready.rs create mode 100644 down-the-stack/dk_pac/src/comp/events_up.rs create mode 100644 down-the-stack/dk_pac/src/comp/extrefsel.rs create mode 100644 down-the-stack/dk_pac/src/comp/hyst.rs create mode 100644 down-the-stack/dk_pac/src/comp/inten.rs create mode 100644 down-the-stack/dk_pac/src/comp/intenclr.rs create mode 100644 down-the-stack/dk_pac/src/comp/intenset.rs create mode 100644 down-the-stack/dk_pac/src/comp/isource.rs create mode 100644 down-the-stack/dk_pac/src/comp/mode.rs create mode 100644 down-the-stack/dk_pac/src/comp/psel.rs create mode 100644 down-the-stack/dk_pac/src/comp/refsel.rs create mode 100644 down-the-stack/dk_pac/src/comp/result.rs create mode 100644 down-the-stack/dk_pac/src/comp/shorts.rs create mode 100644 down-the-stack/dk_pac/src/comp/tasks_sample.rs create mode 100644 down-the-stack/dk_pac/src/comp/tasks_start.rs create mode 100644 down-the-stack/dk_pac/src/comp/tasks_stop.rs create mode 100644 down-the-stack/dk_pac/src/comp/th.rs create mode 100644 down-the-stack/dk_pac/src/ecb.rs create mode 100644 down-the-stack/dk_pac/src/ecb/ecbdataptr.rs create mode 100644 down-the-stack/dk_pac/src/ecb/events_endecb.rs create mode 100644 down-the-stack/dk_pac/src/ecb/events_errorecb.rs create mode 100644 down-the-stack/dk_pac/src/ecb/intenclr.rs create mode 100644 down-the-stack/dk_pac/src/ecb/intenset.rs create mode 100644 down-the-stack/dk_pac/src/ecb/tasks_startecb.rs create mode 100644 down-the-stack/dk_pac/src/ecb/tasks_stopecb.rs create mode 100644 down-the-stack/dk_pac/src/egu0.rs create mode 100644 down-the-stack/dk_pac/src/egu0/events_triggered.rs create mode 100644 down-the-stack/dk_pac/src/egu0/inten.rs create mode 100644 down-the-stack/dk_pac/src/egu0/intenclr.rs create mode 100644 down-the-stack/dk_pac/src/egu0/intenset.rs create mode 100644 down-the-stack/dk_pac/src/egu0/tasks_trigger.rs create mode 100644 down-the-stack/dk_pac/src/ficr.rs create mode 100644 down-the-stack/dk_pac/src/ficr/codepagesize.rs create mode 100644 down-the-stack/dk_pac/src/ficr/codesize.rs create mode 100644 down-the-stack/dk_pac/src/ficr/deviceaddr.rs create mode 100644 down-the-stack/dk_pac/src/ficr/deviceaddrtype.rs create mode 100644 down-the-stack/dk_pac/src/ficr/deviceid.rs create mode 100644 down-the-stack/dk_pac/src/ficr/er.rs create mode 100644 down-the-stack/dk_pac/src/ficr/info.rs create mode 100644 down-the-stack/dk_pac/src/ficr/info/flash.rs create mode 100644 down-the-stack/dk_pac/src/ficr/info/package.rs create mode 100644 down-the-stack/dk_pac/src/ficr/info/part.rs create mode 100644 down-the-stack/dk_pac/src/ficr/info/ram.rs create mode 100644 down-the-stack/dk_pac/src/ficr/info/variant.rs create mode 100644 down-the-stack/dk_pac/src/ficr/ir.rs create mode 100644 down-the-stack/dk_pac/src/ficr/nfc.rs create mode 100644 down-the-stack/dk_pac/src/ficr/nfc/tagheader0.rs create mode 100644 down-the-stack/dk_pac/src/ficr/nfc/tagheader1.rs create mode 100644 down-the-stack/dk_pac/src/ficr/nfc/tagheader2.rs create mode 100644 down-the-stack/dk_pac/src/ficr/nfc/tagheader3.rs create mode 100644 down-the-stack/dk_pac/src/ficr/temp.rs create mode 100644 down-the-stack/dk_pac/src/ficr/temp/a0.rs create mode 100644 down-the-stack/dk_pac/src/ficr/temp/a1.rs create mode 100644 down-the-stack/dk_pac/src/ficr/temp/a2.rs create mode 100644 down-the-stack/dk_pac/src/ficr/temp/a3.rs create mode 100644 down-the-stack/dk_pac/src/ficr/temp/a4.rs create mode 100644 down-the-stack/dk_pac/src/ficr/temp/a5.rs create mode 100644 down-the-stack/dk_pac/src/ficr/temp/b0.rs create mode 100644 down-the-stack/dk_pac/src/ficr/temp/b1.rs create mode 100644 down-the-stack/dk_pac/src/ficr/temp/b2.rs create mode 100644 down-the-stack/dk_pac/src/ficr/temp/b3.rs create mode 100644 down-the-stack/dk_pac/src/ficr/temp/b4.rs create mode 100644 down-the-stack/dk_pac/src/ficr/temp/b5.rs create mode 100644 down-the-stack/dk_pac/src/ficr/temp/t0.rs create mode 100644 down-the-stack/dk_pac/src/ficr/temp/t1.rs create mode 100644 down-the-stack/dk_pac/src/ficr/temp/t2.rs create mode 100644 down-the-stack/dk_pac/src/ficr/temp/t3.rs create mode 100644 down-the-stack/dk_pac/src/ficr/temp/t4.rs create mode 100644 down-the-stack/dk_pac/src/generic.rs create mode 100644 down-the-stack/dk_pac/src/gpiote.rs create mode 100644 down-the-stack/dk_pac/src/gpiote/config.rs create mode 100644 down-the-stack/dk_pac/src/gpiote/events_in.rs create mode 100644 down-the-stack/dk_pac/src/gpiote/events_port.rs create mode 100644 down-the-stack/dk_pac/src/gpiote/intenclr.rs create mode 100644 down-the-stack/dk_pac/src/gpiote/intenset.rs create mode 100644 down-the-stack/dk_pac/src/gpiote/tasks_clr.rs create mode 100644 down-the-stack/dk_pac/src/gpiote/tasks_out.rs create mode 100644 down-the-stack/dk_pac/src/gpiote/tasks_set.rs create mode 100644 down-the-stack/dk_pac/src/i2s.rs create mode 100644 down-the-stack/dk_pac/src/i2s/config.rs create mode 100644 down-the-stack/dk_pac/src/i2s/config/align.rs create mode 100644 down-the-stack/dk_pac/src/i2s/config/channels.rs create mode 100644 down-the-stack/dk_pac/src/i2s/config/format.rs create mode 100644 down-the-stack/dk_pac/src/i2s/config/mcken.rs create mode 100644 down-the-stack/dk_pac/src/i2s/config/mckfreq.rs create mode 100644 down-the-stack/dk_pac/src/i2s/config/mode.rs create mode 100644 down-the-stack/dk_pac/src/i2s/config/ratio.rs create mode 100644 down-the-stack/dk_pac/src/i2s/config/rxen.rs create mode 100644 down-the-stack/dk_pac/src/i2s/config/swidth.rs create mode 100644 down-the-stack/dk_pac/src/i2s/config/txen.rs create mode 100644 down-the-stack/dk_pac/src/i2s/enable.rs create mode 100644 down-the-stack/dk_pac/src/i2s/events_rxptrupd.rs create mode 100644 down-the-stack/dk_pac/src/i2s/events_stopped.rs create mode 100644 down-the-stack/dk_pac/src/i2s/events_txptrupd.rs create mode 100644 down-the-stack/dk_pac/src/i2s/inten.rs create mode 100644 down-the-stack/dk_pac/src/i2s/intenclr.rs create mode 100644 down-the-stack/dk_pac/src/i2s/intenset.rs create mode 100644 down-the-stack/dk_pac/src/i2s/psel.rs create mode 100644 down-the-stack/dk_pac/src/i2s/psel/lrck.rs create mode 100644 down-the-stack/dk_pac/src/i2s/psel/mck.rs create mode 100644 down-the-stack/dk_pac/src/i2s/psel/sck.rs create mode 100644 down-the-stack/dk_pac/src/i2s/psel/sdin.rs create mode 100644 down-the-stack/dk_pac/src/i2s/psel/sdout.rs create mode 100644 down-the-stack/dk_pac/src/i2s/rxd.rs create mode 100644 down-the-stack/dk_pac/src/i2s/rxd/ptr.rs create mode 100644 down-the-stack/dk_pac/src/i2s/rxtxd.rs create mode 100644 down-the-stack/dk_pac/src/i2s/rxtxd/maxcnt.rs create mode 100644 down-the-stack/dk_pac/src/i2s/tasks_start.rs create mode 100644 down-the-stack/dk_pac/src/i2s/tasks_stop.rs create mode 100644 down-the-stack/dk_pac/src/i2s/txd.rs create mode 100644 down-the-stack/dk_pac/src/i2s/txd/ptr.rs create mode 100644 down-the-stack/dk_pac/src/lib.rs create mode 100644 down-the-stack/dk_pac/src/lpcomp.rs create mode 100644 down-the-stack/dk_pac/src/lpcomp/anadetect.rs create mode 100644 down-the-stack/dk_pac/src/lpcomp/enable.rs create mode 100644 down-the-stack/dk_pac/src/lpcomp/events_cross.rs create mode 100644 down-the-stack/dk_pac/src/lpcomp/events_down.rs create mode 100644 down-the-stack/dk_pac/src/lpcomp/events_ready.rs create mode 100644 down-the-stack/dk_pac/src/lpcomp/events_up.rs create mode 100644 down-the-stack/dk_pac/src/lpcomp/extrefsel.rs create mode 100644 down-the-stack/dk_pac/src/lpcomp/hyst.rs create mode 100644 down-the-stack/dk_pac/src/lpcomp/intenclr.rs create mode 100644 down-the-stack/dk_pac/src/lpcomp/intenset.rs create mode 100644 down-the-stack/dk_pac/src/lpcomp/psel.rs create mode 100644 down-the-stack/dk_pac/src/lpcomp/refsel.rs create mode 100644 down-the-stack/dk_pac/src/lpcomp/result.rs create mode 100644 down-the-stack/dk_pac/src/lpcomp/shorts.rs create mode 100644 down-the-stack/dk_pac/src/lpcomp/tasks_sample.rs create mode 100644 down-the-stack/dk_pac/src/lpcomp/tasks_start.rs create mode 100644 down-the-stack/dk_pac/src/lpcomp/tasks_stop.rs create mode 100644 down-the-stack/dk_pac/src/mwu.rs create mode 100644 down-the-stack/dk_pac/src/mwu/events_pregion.rs create mode 100644 down-the-stack/dk_pac/src/mwu/events_pregion/ra.rs create mode 100644 down-the-stack/dk_pac/src/mwu/events_pregion/wa.rs create mode 100644 down-the-stack/dk_pac/src/mwu/events_region.rs create mode 100644 down-the-stack/dk_pac/src/mwu/events_region/ra.rs create mode 100644 down-the-stack/dk_pac/src/mwu/events_region/wa.rs create mode 100644 down-the-stack/dk_pac/src/mwu/inten.rs create mode 100644 down-the-stack/dk_pac/src/mwu/intenclr.rs create mode 100644 down-the-stack/dk_pac/src/mwu/intenset.rs create mode 100644 down-the-stack/dk_pac/src/mwu/nmien.rs create mode 100644 down-the-stack/dk_pac/src/mwu/nmienclr.rs create mode 100644 down-the-stack/dk_pac/src/mwu/nmienset.rs create mode 100644 down-the-stack/dk_pac/src/mwu/perregion.rs create mode 100644 down-the-stack/dk_pac/src/mwu/perregion/substatra.rs create mode 100644 down-the-stack/dk_pac/src/mwu/perregion/substatwa.rs create mode 100644 down-the-stack/dk_pac/src/mwu/pregion.rs create mode 100644 down-the-stack/dk_pac/src/mwu/pregion/end.rs create mode 100644 down-the-stack/dk_pac/src/mwu/pregion/start.rs create mode 100644 down-the-stack/dk_pac/src/mwu/pregion/subs.rs create mode 100644 down-the-stack/dk_pac/src/mwu/region.rs create mode 100644 down-the-stack/dk_pac/src/mwu/region/end.rs create mode 100644 down-the-stack/dk_pac/src/mwu/region/start.rs create mode 100644 down-the-stack/dk_pac/src/mwu/regionen.rs create mode 100644 down-the-stack/dk_pac/src/mwu/regionenclr.rs create mode 100644 down-the-stack/dk_pac/src/mwu/regionenset.rs create mode 100644 down-the-stack/dk_pac/src/nfct.rs create mode 100644 down-the-stack/dk_pac/src/nfct/currentloadctrl.rs create mode 100644 down-the-stack/dk_pac/src/nfct/errorstatus.rs create mode 100644 down-the-stack/dk_pac/src/nfct/events_autocolresstarted.rs create mode 100644 down-the-stack/dk_pac/src/nfct/events_collision.rs create mode 100644 down-the-stack/dk_pac/src/nfct/events_endrx.rs create mode 100644 down-the-stack/dk_pac/src/nfct/events_endtx.rs create mode 100644 down-the-stack/dk_pac/src/nfct/events_error.rs create mode 100644 down-the-stack/dk_pac/src/nfct/events_fielddetected.rs create mode 100644 down-the-stack/dk_pac/src/nfct/events_fieldlost.rs create mode 100644 down-the-stack/dk_pac/src/nfct/events_ready.rs create mode 100644 down-the-stack/dk_pac/src/nfct/events_rxerror.rs create mode 100644 down-the-stack/dk_pac/src/nfct/events_rxframeend.rs create mode 100644 down-the-stack/dk_pac/src/nfct/events_rxframestart.rs create mode 100644 down-the-stack/dk_pac/src/nfct/events_selected.rs create mode 100644 down-the-stack/dk_pac/src/nfct/events_started.rs create mode 100644 down-the-stack/dk_pac/src/nfct/events_txframeend.rs create mode 100644 down-the-stack/dk_pac/src/nfct/events_txframestart.rs create mode 100644 down-the-stack/dk_pac/src/nfct/fieldpresent.rs create mode 100644 down-the-stack/dk_pac/src/nfct/framedelaymax.rs create mode 100644 down-the-stack/dk_pac/src/nfct/framedelaymin.rs create mode 100644 down-the-stack/dk_pac/src/nfct/framedelaymode.rs create mode 100644 down-the-stack/dk_pac/src/nfct/framestatus.rs create mode 100644 down-the-stack/dk_pac/src/nfct/framestatus/rx.rs create mode 100644 down-the-stack/dk_pac/src/nfct/inten.rs create mode 100644 down-the-stack/dk_pac/src/nfct/intenclr.rs create mode 100644 down-the-stack/dk_pac/src/nfct/intenset.rs create mode 100644 down-the-stack/dk_pac/src/nfct/maxlen.rs create mode 100644 down-the-stack/dk_pac/src/nfct/nfcid1_2nd_last.rs create mode 100644 down-the-stack/dk_pac/src/nfct/nfcid1_3rd_last.rs create mode 100644 down-the-stack/dk_pac/src/nfct/nfcid1_last.rs create mode 100644 down-the-stack/dk_pac/src/nfct/packetptr.rs create mode 100644 down-the-stack/dk_pac/src/nfct/rxd.rs create mode 100644 down-the-stack/dk_pac/src/nfct/rxd/amount.rs create mode 100644 down-the-stack/dk_pac/src/nfct/rxd/frameconfig.rs create mode 100644 down-the-stack/dk_pac/src/nfct/selres.rs create mode 100644 down-the-stack/dk_pac/src/nfct/sensres.rs create mode 100644 down-the-stack/dk_pac/src/nfct/shorts.rs create mode 100644 down-the-stack/dk_pac/src/nfct/tasks_activate.rs create mode 100644 down-the-stack/dk_pac/src/nfct/tasks_disable.rs create mode 100644 down-the-stack/dk_pac/src/nfct/tasks_enablerxdata.rs create mode 100644 down-the-stack/dk_pac/src/nfct/tasks_goidle.rs create mode 100644 down-the-stack/dk_pac/src/nfct/tasks_gosleep.rs create mode 100644 down-the-stack/dk_pac/src/nfct/tasks_sense.rs create mode 100644 down-the-stack/dk_pac/src/nfct/tasks_starttx.rs create mode 100644 down-the-stack/dk_pac/src/nfct/txd.rs create mode 100644 down-the-stack/dk_pac/src/nfct/txd/amount.rs create mode 100644 down-the-stack/dk_pac/src/nfct/txd/frameconfig.rs create mode 100644 down-the-stack/dk_pac/src/nvmc.rs create mode 100644 down-the-stack/dk_pac/src/nvmc/config.rs create mode 100644 down-the-stack/dk_pac/src/nvmc/eraseall.rs create mode 100644 down-the-stack/dk_pac/src/nvmc/erasepage.rs create mode 100644 down-the-stack/dk_pac/src/nvmc/erasepcr0.rs create mode 100644 down-the-stack/dk_pac/src/nvmc/erasepcr1.rs create mode 100644 down-the-stack/dk_pac/src/nvmc/eraseuicr.rs create mode 100644 down-the-stack/dk_pac/src/nvmc/icachecnf.rs create mode 100644 down-the-stack/dk_pac/src/nvmc/ihit.rs create mode 100644 down-the-stack/dk_pac/src/nvmc/imiss.rs create mode 100644 down-the-stack/dk_pac/src/nvmc/ready.rs create mode 100644 down-the-stack/dk_pac/src/p0.rs create mode 100644 down-the-stack/dk_pac/src/p0/detectmode.rs create mode 100644 down-the-stack/dk_pac/src/p0/dir.rs create mode 100644 down-the-stack/dk_pac/src/p0/dirclr.rs create mode 100644 down-the-stack/dk_pac/src/p0/dirset.rs create mode 100644 down-the-stack/dk_pac/src/p0/in_.rs create mode 100644 down-the-stack/dk_pac/src/p0/latch.rs create mode 100644 down-the-stack/dk_pac/src/p0/out.rs create mode 100644 down-the-stack/dk_pac/src/p0/outclr.rs create mode 100644 down-the-stack/dk_pac/src/p0/outset.rs create mode 100644 down-the-stack/dk_pac/src/p0/pin_cnf.rs create mode 100644 down-the-stack/dk_pac/src/pdm.rs create mode 100644 down-the-stack/dk_pac/src/pdm/enable.rs create mode 100644 down-the-stack/dk_pac/src/pdm/events_end.rs create mode 100644 down-the-stack/dk_pac/src/pdm/events_started.rs create mode 100644 down-the-stack/dk_pac/src/pdm/events_stopped.rs create mode 100644 down-the-stack/dk_pac/src/pdm/gainl.rs create mode 100644 down-the-stack/dk_pac/src/pdm/gainr.rs create mode 100644 down-the-stack/dk_pac/src/pdm/inten.rs create mode 100644 down-the-stack/dk_pac/src/pdm/intenclr.rs create mode 100644 down-the-stack/dk_pac/src/pdm/intenset.rs create mode 100644 down-the-stack/dk_pac/src/pdm/mode.rs create mode 100644 down-the-stack/dk_pac/src/pdm/pdmclkctrl.rs create mode 100644 down-the-stack/dk_pac/src/pdm/psel.rs create mode 100644 down-the-stack/dk_pac/src/pdm/psel/clk.rs create mode 100644 down-the-stack/dk_pac/src/pdm/psel/din.rs create mode 100644 down-the-stack/dk_pac/src/pdm/sample.rs create mode 100644 down-the-stack/dk_pac/src/pdm/sample/maxcnt.rs create mode 100644 down-the-stack/dk_pac/src/pdm/sample/ptr.rs create mode 100644 down-the-stack/dk_pac/src/pdm/tasks_start.rs create mode 100644 down-the-stack/dk_pac/src/pdm/tasks_stop.rs create mode 100644 down-the-stack/dk_pac/src/power.rs create mode 100644 down-the-stack/dk_pac/src/power/dcdcen.rs create mode 100644 down-the-stack/dk_pac/src/power/events_pofwarn.rs create mode 100644 down-the-stack/dk_pac/src/power/events_sleepenter.rs create mode 100644 down-the-stack/dk_pac/src/power/events_sleepexit.rs create mode 100644 down-the-stack/dk_pac/src/power/gpregret.rs create mode 100644 down-the-stack/dk_pac/src/power/gpregret2.rs create mode 100644 down-the-stack/dk_pac/src/power/intenclr.rs create mode 100644 down-the-stack/dk_pac/src/power/intenset.rs create mode 100644 down-the-stack/dk_pac/src/power/pofcon.rs create mode 100644 down-the-stack/dk_pac/src/power/ram.rs create mode 100644 down-the-stack/dk_pac/src/power/ram/power.rs create mode 100644 down-the-stack/dk_pac/src/power/ram/powerclr.rs create mode 100644 down-the-stack/dk_pac/src/power/ram/powerset.rs create mode 100644 down-the-stack/dk_pac/src/power/ramon.rs create mode 100644 down-the-stack/dk_pac/src/power/ramonb.rs create mode 100644 down-the-stack/dk_pac/src/power/ramstatus.rs create mode 100644 down-the-stack/dk_pac/src/power/resetreas.rs create mode 100644 down-the-stack/dk_pac/src/power/systemoff.rs create mode 100644 down-the-stack/dk_pac/src/power/tasks_constlat.rs create mode 100644 down-the-stack/dk_pac/src/power/tasks_lowpwr.rs create mode 100644 down-the-stack/dk_pac/src/ppi.rs create mode 100644 down-the-stack/dk_pac/src/ppi/ch.rs create mode 100644 down-the-stack/dk_pac/src/ppi/ch/eep.rs create mode 100644 down-the-stack/dk_pac/src/ppi/ch/tep.rs create mode 100644 down-the-stack/dk_pac/src/ppi/chen.rs create mode 100644 down-the-stack/dk_pac/src/ppi/chenclr.rs create mode 100644 down-the-stack/dk_pac/src/ppi/chenset.rs create mode 100644 down-the-stack/dk_pac/src/ppi/chg.rs create mode 100644 down-the-stack/dk_pac/src/ppi/fork.rs create mode 100644 down-the-stack/dk_pac/src/ppi/fork/tep.rs create mode 100644 down-the-stack/dk_pac/src/ppi/tasks_chg.rs create mode 100644 down-the-stack/dk_pac/src/ppi/tasks_chg/dis.rs create mode 100644 down-the-stack/dk_pac/src/ppi/tasks_chg/en.rs create mode 100644 down-the-stack/dk_pac/src/pwm0.rs create mode 100644 down-the-stack/dk_pac/src/pwm0/countertop.rs create mode 100644 down-the-stack/dk_pac/src/pwm0/decoder.rs create mode 100644 down-the-stack/dk_pac/src/pwm0/enable.rs create mode 100644 down-the-stack/dk_pac/src/pwm0/events_loopsdone.rs create mode 100644 down-the-stack/dk_pac/src/pwm0/events_pwmperiodend.rs create mode 100644 down-the-stack/dk_pac/src/pwm0/events_seqend.rs create mode 100644 down-the-stack/dk_pac/src/pwm0/events_seqstarted.rs create mode 100644 down-the-stack/dk_pac/src/pwm0/events_stopped.rs create mode 100644 down-the-stack/dk_pac/src/pwm0/inten.rs create mode 100644 down-the-stack/dk_pac/src/pwm0/intenclr.rs create mode 100644 down-the-stack/dk_pac/src/pwm0/intenset.rs create mode 100644 down-the-stack/dk_pac/src/pwm0/loop_.rs create mode 100644 down-the-stack/dk_pac/src/pwm0/mode.rs create mode 100644 down-the-stack/dk_pac/src/pwm0/prescaler.rs create mode 100644 down-the-stack/dk_pac/src/pwm0/psel.rs create mode 100644 down-the-stack/dk_pac/src/pwm0/psel/out.rs create mode 100644 down-the-stack/dk_pac/src/pwm0/seq.rs create mode 100644 down-the-stack/dk_pac/src/pwm0/seq/cnt.rs create mode 100644 down-the-stack/dk_pac/src/pwm0/seq/enddelay.rs create mode 100644 down-the-stack/dk_pac/src/pwm0/seq/ptr.rs create mode 100644 down-the-stack/dk_pac/src/pwm0/seq/refresh.rs create mode 100644 down-the-stack/dk_pac/src/pwm0/shorts.rs create mode 100644 down-the-stack/dk_pac/src/pwm0/tasks_nextstep.rs create mode 100644 down-the-stack/dk_pac/src/pwm0/tasks_seqstart.rs create mode 100644 down-the-stack/dk_pac/src/pwm0/tasks_stop.rs create mode 100644 down-the-stack/dk_pac/src/qdec.rs create mode 100644 down-the-stack/dk_pac/src/qdec/acc.rs create mode 100644 down-the-stack/dk_pac/src/qdec/accdbl.rs create mode 100644 down-the-stack/dk_pac/src/qdec/accdblread.rs create mode 100644 down-the-stack/dk_pac/src/qdec/accread.rs create mode 100644 down-the-stack/dk_pac/src/qdec/dbfen.rs create mode 100644 down-the-stack/dk_pac/src/qdec/enable.rs create mode 100644 down-the-stack/dk_pac/src/qdec/events_accof.rs create mode 100644 down-the-stack/dk_pac/src/qdec/events_dblrdy.rs create mode 100644 down-the-stack/dk_pac/src/qdec/events_reportrdy.rs create mode 100644 down-the-stack/dk_pac/src/qdec/events_samplerdy.rs create mode 100644 down-the-stack/dk_pac/src/qdec/events_stopped.rs create mode 100644 down-the-stack/dk_pac/src/qdec/intenclr.rs create mode 100644 down-the-stack/dk_pac/src/qdec/intenset.rs create mode 100644 down-the-stack/dk_pac/src/qdec/ledpol.rs create mode 100644 down-the-stack/dk_pac/src/qdec/ledpre.rs create mode 100644 down-the-stack/dk_pac/src/qdec/psel.rs create mode 100644 down-the-stack/dk_pac/src/qdec/psel/a.rs create mode 100644 down-the-stack/dk_pac/src/qdec/psel/b.rs create mode 100644 down-the-stack/dk_pac/src/qdec/psel/led.rs create mode 100644 down-the-stack/dk_pac/src/qdec/reportper.rs create mode 100644 down-the-stack/dk_pac/src/qdec/sample.rs create mode 100644 down-the-stack/dk_pac/src/qdec/sampleper.rs create mode 100644 down-the-stack/dk_pac/src/qdec/shorts.rs create mode 100644 down-the-stack/dk_pac/src/qdec/tasks_rdclracc.rs create mode 100644 down-the-stack/dk_pac/src/qdec/tasks_rdclrdbl.rs create mode 100644 down-the-stack/dk_pac/src/qdec/tasks_readclracc.rs create mode 100644 down-the-stack/dk_pac/src/qdec/tasks_start.rs create mode 100644 down-the-stack/dk_pac/src/qdec/tasks_stop.rs create mode 100644 down-the-stack/dk_pac/src/radio.rs create mode 100644 down-the-stack/dk_pac/src/radio/base0.rs create mode 100644 down-the-stack/dk_pac/src/radio/base1.rs create mode 100644 down-the-stack/dk_pac/src/radio/bcc.rs create mode 100644 down-the-stack/dk_pac/src/radio/crccnf.rs create mode 100644 down-the-stack/dk_pac/src/radio/crcinit.rs create mode 100644 down-the-stack/dk_pac/src/radio/crcpoly.rs create mode 100644 down-the-stack/dk_pac/src/radio/crcstatus.rs create mode 100644 down-the-stack/dk_pac/src/radio/dab.rs create mode 100644 down-the-stack/dk_pac/src/radio/dacnf.rs create mode 100644 down-the-stack/dk_pac/src/radio/dai.rs create mode 100644 down-the-stack/dk_pac/src/radio/dap.rs create mode 100644 down-the-stack/dk_pac/src/radio/datawhiteiv.rs create mode 100644 down-the-stack/dk_pac/src/radio/events_address.rs create mode 100644 down-the-stack/dk_pac/src/radio/events_bcmatch.rs create mode 100644 down-the-stack/dk_pac/src/radio/events_crcerror.rs create mode 100644 down-the-stack/dk_pac/src/radio/events_crcok.rs create mode 100644 down-the-stack/dk_pac/src/radio/events_devmatch.rs create mode 100644 down-the-stack/dk_pac/src/radio/events_devmiss.rs create mode 100644 down-the-stack/dk_pac/src/radio/events_disabled.rs create mode 100644 down-the-stack/dk_pac/src/radio/events_end.rs create mode 100644 down-the-stack/dk_pac/src/radio/events_payload.rs create mode 100644 down-the-stack/dk_pac/src/radio/events_ready.rs create mode 100644 down-the-stack/dk_pac/src/radio/events_rssiend.rs create mode 100644 down-the-stack/dk_pac/src/radio/frequency.rs create mode 100644 down-the-stack/dk_pac/src/radio/intenclr.rs create mode 100644 down-the-stack/dk_pac/src/radio/intenset.rs create mode 100644 down-the-stack/dk_pac/src/radio/mode.rs create mode 100644 down-the-stack/dk_pac/src/radio/modecnf0.rs create mode 100644 down-the-stack/dk_pac/src/radio/packetptr.rs create mode 100644 down-the-stack/dk_pac/src/radio/pcnf0.rs create mode 100644 down-the-stack/dk_pac/src/radio/pcnf1.rs create mode 100644 down-the-stack/dk_pac/src/radio/power.rs create mode 100644 down-the-stack/dk_pac/src/radio/prefix0.rs create mode 100644 down-the-stack/dk_pac/src/radio/prefix1.rs create mode 100644 down-the-stack/dk_pac/src/radio/rssisample.rs create mode 100644 down-the-stack/dk_pac/src/radio/rxaddresses.rs create mode 100644 down-the-stack/dk_pac/src/radio/rxcrc.rs create mode 100644 down-the-stack/dk_pac/src/radio/rxmatch.rs create mode 100644 down-the-stack/dk_pac/src/radio/shorts.rs create mode 100644 down-the-stack/dk_pac/src/radio/state.rs create mode 100644 down-the-stack/dk_pac/src/radio/tasks_bcstart.rs create mode 100644 down-the-stack/dk_pac/src/radio/tasks_bcstop.rs create mode 100644 down-the-stack/dk_pac/src/radio/tasks_disable.rs create mode 100644 down-the-stack/dk_pac/src/radio/tasks_rssistart.rs create mode 100644 down-the-stack/dk_pac/src/radio/tasks_rssistop.rs create mode 100644 down-the-stack/dk_pac/src/radio/tasks_rxen.rs create mode 100644 down-the-stack/dk_pac/src/radio/tasks_start.rs create mode 100644 down-the-stack/dk_pac/src/radio/tasks_stop.rs create mode 100644 down-the-stack/dk_pac/src/radio/tasks_txen.rs create mode 100644 down-the-stack/dk_pac/src/radio/tifs.rs create mode 100644 down-the-stack/dk_pac/src/radio/txaddress.rs create mode 100644 down-the-stack/dk_pac/src/radio/txpower.rs create mode 100644 down-the-stack/dk_pac/src/rng.rs create mode 100644 down-the-stack/dk_pac/src/rng/config.rs create mode 100644 down-the-stack/dk_pac/src/rng/events_valrdy.rs create mode 100644 down-the-stack/dk_pac/src/rng/intenclr.rs create mode 100644 down-the-stack/dk_pac/src/rng/intenset.rs create mode 100644 down-the-stack/dk_pac/src/rng/shorts.rs create mode 100644 down-the-stack/dk_pac/src/rng/tasks_start.rs create mode 100644 down-the-stack/dk_pac/src/rng/tasks_stop.rs create mode 100644 down-the-stack/dk_pac/src/rng/value.rs create mode 100644 down-the-stack/dk_pac/src/rtc0.rs create mode 100644 down-the-stack/dk_pac/src/rtc0/cc.rs create mode 100644 down-the-stack/dk_pac/src/rtc0/counter.rs create mode 100644 down-the-stack/dk_pac/src/rtc0/events_compare.rs create mode 100644 down-the-stack/dk_pac/src/rtc0/events_ovrflw.rs create mode 100644 down-the-stack/dk_pac/src/rtc0/events_tick.rs create mode 100644 down-the-stack/dk_pac/src/rtc0/evten.rs create mode 100644 down-the-stack/dk_pac/src/rtc0/evtenclr.rs create mode 100644 down-the-stack/dk_pac/src/rtc0/evtenset.rs create mode 100644 down-the-stack/dk_pac/src/rtc0/intenclr.rs create mode 100644 down-the-stack/dk_pac/src/rtc0/intenset.rs create mode 100644 down-the-stack/dk_pac/src/rtc0/prescaler.rs create mode 100644 down-the-stack/dk_pac/src/rtc0/tasks_clear.rs create mode 100644 down-the-stack/dk_pac/src/rtc0/tasks_start.rs create mode 100644 down-the-stack/dk_pac/src/rtc0/tasks_stop.rs create mode 100644 down-the-stack/dk_pac/src/rtc0/tasks_trigovrflw.rs create mode 100644 down-the-stack/dk_pac/src/saadc.rs create mode 100644 down-the-stack/dk_pac/src/saadc/ch.rs create mode 100644 down-the-stack/dk_pac/src/saadc/ch/config.rs create mode 100644 down-the-stack/dk_pac/src/saadc/ch/limit.rs create mode 100644 down-the-stack/dk_pac/src/saadc/ch/pseln.rs create mode 100644 down-the-stack/dk_pac/src/saadc/ch/pselp.rs create mode 100644 down-the-stack/dk_pac/src/saadc/enable.rs create mode 100644 down-the-stack/dk_pac/src/saadc/events_calibratedone.rs create mode 100644 down-the-stack/dk_pac/src/saadc/events_ch.rs create mode 100644 down-the-stack/dk_pac/src/saadc/events_ch/limith.rs create mode 100644 down-the-stack/dk_pac/src/saadc/events_ch/limitl.rs create mode 100644 down-the-stack/dk_pac/src/saadc/events_done.rs create mode 100644 down-the-stack/dk_pac/src/saadc/events_end.rs create mode 100644 down-the-stack/dk_pac/src/saadc/events_resultdone.rs create mode 100644 down-the-stack/dk_pac/src/saadc/events_started.rs create mode 100644 down-the-stack/dk_pac/src/saadc/events_stopped.rs create mode 100644 down-the-stack/dk_pac/src/saadc/inten.rs create mode 100644 down-the-stack/dk_pac/src/saadc/intenclr.rs create mode 100644 down-the-stack/dk_pac/src/saadc/intenset.rs create mode 100644 down-the-stack/dk_pac/src/saadc/oversample.rs create mode 100644 down-the-stack/dk_pac/src/saadc/resolution.rs create mode 100644 down-the-stack/dk_pac/src/saadc/result.rs create mode 100644 down-the-stack/dk_pac/src/saadc/result/amount.rs create mode 100644 down-the-stack/dk_pac/src/saadc/result/maxcnt.rs create mode 100644 down-the-stack/dk_pac/src/saadc/result/ptr.rs create mode 100644 down-the-stack/dk_pac/src/saadc/samplerate.rs create mode 100644 down-the-stack/dk_pac/src/saadc/status.rs create mode 100644 down-the-stack/dk_pac/src/saadc/tasks_calibrateoffset.rs create mode 100644 down-the-stack/dk_pac/src/saadc/tasks_sample.rs create mode 100644 down-the-stack/dk_pac/src/saadc/tasks_start.rs create mode 100644 down-the-stack/dk_pac/src/saadc/tasks_stop.rs create mode 100644 down-the-stack/dk_pac/src/spi0.rs create mode 100644 down-the-stack/dk_pac/src/spi0/config.rs create mode 100644 down-the-stack/dk_pac/src/spi0/enable.rs create mode 100644 down-the-stack/dk_pac/src/spi0/events_ready.rs create mode 100644 down-the-stack/dk_pac/src/spi0/frequency.rs create mode 100644 down-the-stack/dk_pac/src/spi0/intenclr.rs create mode 100644 down-the-stack/dk_pac/src/spi0/intenset.rs create mode 100644 down-the-stack/dk_pac/src/spi0/psel.rs create mode 100644 down-the-stack/dk_pac/src/spi0/psel/miso.rs create mode 100644 down-the-stack/dk_pac/src/spi0/psel/mosi.rs create mode 100644 down-the-stack/dk_pac/src/spi0/psel/sck.rs create mode 100644 down-the-stack/dk_pac/src/spi0/rxd.rs create mode 100644 down-the-stack/dk_pac/src/spi0/txd.rs create mode 100644 down-the-stack/dk_pac/src/spim0.rs create mode 100644 down-the-stack/dk_pac/src/spim0/config.rs create mode 100644 down-the-stack/dk_pac/src/spim0/enable.rs create mode 100644 down-the-stack/dk_pac/src/spim0/events_end.rs create mode 100644 down-the-stack/dk_pac/src/spim0/events_endrx.rs create mode 100644 down-the-stack/dk_pac/src/spim0/events_endtx.rs create mode 100644 down-the-stack/dk_pac/src/spim0/events_started.rs create mode 100644 down-the-stack/dk_pac/src/spim0/events_stopped.rs create mode 100644 down-the-stack/dk_pac/src/spim0/frequency.rs create mode 100644 down-the-stack/dk_pac/src/spim0/intenclr.rs create mode 100644 down-the-stack/dk_pac/src/spim0/intenset.rs create mode 100644 down-the-stack/dk_pac/src/spim0/orc.rs create mode 100644 down-the-stack/dk_pac/src/spim0/psel.rs create mode 100644 down-the-stack/dk_pac/src/spim0/psel/miso.rs create mode 100644 down-the-stack/dk_pac/src/spim0/psel/mosi.rs create mode 100644 down-the-stack/dk_pac/src/spim0/psel/sck.rs create mode 100644 down-the-stack/dk_pac/src/spim0/rxd.rs create mode 100644 down-the-stack/dk_pac/src/spim0/rxd/amount.rs create mode 100644 down-the-stack/dk_pac/src/spim0/rxd/list.rs create mode 100644 down-the-stack/dk_pac/src/spim0/rxd/maxcnt.rs create mode 100644 down-the-stack/dk_pac/src/spim0/rxd/ptr.rs create mode 100644 down-the-stack/dk_pac/src/spim0/shorts.rs create mode 100644 down-the-stack/dk_pac/src/spim0/tasks_resume.rs create mode 100644 down-the-stack/dk_pac/src/spim0/tasks_start.rs create mode 100644 down-the-stack/dk_pac/src/spim0/tasks_stop.rs create mode 100644 down-the-stack/dk_pac/src/spim0/tasks_suspend.rs create mode 100644 down-the-stack/dk_pac/src/spim0/txd.rs create mode 100644 down-the-stack/dk_pac/src/spim0/txd/amount.rs create mode 100644 down-the-stack/dk_pac/src/spim0/txd/list.rs create mode 100644 down-the-stack/dk_pac/src/spim0/txd/maxcnt.rs create mode 100644 down-the-stack/dk_pac/src/spim0/txd/ptr.rs create mode 100644 down-the-stack/dk_pac/src/spis0.rs create mode 100644 down-the-stack/dk_pac/src/spis0/config.rs create mode 100644 down-the-stack/dk_pac/src/spis0/def.rs create mode 100644 down-the-stack/dk_pac/src/spis0/enable.rs create mode 100644 down-the-stack/dk_pac/src/spis0/events_acquired.rs create mode 100644 down-the-stack/dk_pac/src/spis0/events_end.rs create mode 100644 down-the-stack/dk_pac/src/spis0/events_endrx.rs create mode 100644 down-the-stack/dk_pac/src/spis0/intenclr.rs create mode 100644 down-the-stack/dk_pac/src/spis0/intenset.rs create mode 100644 down-the-stack/dk_pac/src/spis0/orc.rs create mode 100644 down-the-stack/dk_pac/src/spis0/psel.rs create mode 100644 down-the-stack/dk_pac/src/spis0/psel/csn.rs create mode 100644 down-the-stack/dk_pac/src/spis0/psel/miso.rs create mode 100644 down-the-stack/dk_pac/src/spis0/psel/mosi.rs create mode 100644 down-the-stack/dk_pac/src/spis0/psel/sck.rs create mode 100644 down-the-stack/dk_pac/src/spis0/rxd.rs create mode 100644 down-the-stack/dk_pac/src/spis0/rxd/amount.rs create mode 100644 down-the-stack/dk_pac/src/spis0/rxd/maxcnt.rs create mode 100644 down-the-stack/dk_pac/src/spis0/rxd/ptr.rs create mode 100644 down-the-stack/dk_pac/src/spis0/semstat.rs create mode 100644 down-the-stack/dk_pac/src/spis0/shorts.rs create mode 100644 down-the-stack/dk_pac/src/spis0/status.rs create mode 100644 down-the-stack/dk_pac/src/spis0/tasks_acquire.rs create mode 100644 down-the-stack/dk_pac/src/spis0/tasks_release.rs create mode 100644 down-the-stack/dk_pac/src/spis0/txd.rs create mode 100644 down-the-stack/dk_pac/src/spis0/txd/amount.rs create mode 100644 down-the-stack/dk_pac/src/spis0/txd/maxcnt.rs create mode 100644 down-the-stack/dk_pac/src/spis0/txd/ptr.rs create mode 100644 down-the-stack/dk_pac/src/swi0.rs create mode 100644 down-the-stack/dk_pac/src/swi0/unused.rs create mode 100644 down-the-stack/dk_pac/src/temp.rs create mode 100644 down-the-stack/dk_pac/src/temp/a0.rs create mode 100644 down-the-stack/dk_pac/src/temp/a1.rs create mode 100644 down-the-stack/dk_pac/src/temp/a2.rs create mode 100644 down-the-stack/dk_pac/src/temp/a3.rs create mode 100644 down-the-stack/dk_pac/src/temp/a4.rs create mode 100644 down-the-stack/dk_pac/src/temp/a5.rs create mode 100644 down-the-stack/dk_pac/src/temp/b0.rs create mode 100644 down-the-stack/dk_pac/src/temp/b1.rs create mode 100644 down-the-stack/dk_pac/src/temp/b2.rs create mode 100644 down-the-stack/dk_pac/src/temp/b3.rs create mode 100644 down-the-stack/dk_pac/src/temp/b4.rs create mode 100644 down-the-stack/dk_pac/src/temp/b5.rs create mode 100644 down-the-stack/dk_pac/src/temp/events_datardy.rs create mode 100644 down-the-stack/dk_pac/src/temp/intenclr.rs create mode 100644 down-the-stack/dk_pac/src/temp/intenset.rs create mode 100644 down-the-stack/dk_pac/src/temp/t0.rs create mode 100644 down-the-stack/dk_pac/src/temp/t1.rs create mode 100644 down-the-stack/dk_pac/src/temp/t2.rs create mode 100644 down-the-stack/dk_pac/src/temp/t3.rs create mode 100644 down-the-stack/dk_pac/src/temp/t4.rs create mode 100644 down-the-stack/dk_pac/src/temp/tasks_start.rs create mode 100644 down-the-stack/dk_pac/src/temp/tasks_stop.rs create mode 100644 down-the-stack/dk_pac/src/temp/temp.rs create mode 100644 down-the-stack/dk_pac/src/timer0.rs create mode 100644 down-the-stack/dk_pac/src/timer0/bitmode.rs create mode 100644 down-the-stack/dk_pac/src/timer0/cc.rs create mode 100644 down-the-stack/dk_pac/src/timer0/events_compare.rs create mode 100644 down-the-stack/dk_pac/src/timer0/intenclr.rs create mode 100644 down-the-stack/dk_pac/src/timer0/intenset.rs create mode 100644 down-the-stack/dk_pac/src/timer0/mode.rs create mode 100644 down-the-stack/dk_pac/src/timer0/prescaler.rs create mode 100644 down-the-stack/dk_pac/src/timer0/shorts.rs create mode 100644 down-the-stack/dk_pac/src/timer0/tasks_capture.rs create mode 100644 down-the-stack/dk_pac/src/timer0/tasks_clear.rs create mode 100644 down-the-stack/dk_pac/src/timer0/tasks_count.rs create mode 100644 down-the-stack/dk_pac/src/timer0/tasks_shutdown.rs create mode 100644 down-the-stack/dk_pac/src/timer0/tasks_start.rs create mode 100644 down-the-stack/dk_pac/src/timer0/tasks_stop.rs create mode 100644 down-the-stack/dk_pac/src/twi0.rs create mode 100644 down-the-stack/dk_pac/src/twi0/address.rs create mode 100644 down-the-stack/dk_pac/src/twi0/enable.rs create mode 100644 down-the-stack/dk_pac/src/twi0/errorsrc.rs create mode 100644 down-the-stack/dk_pac/src/twi0/events_bb.rs create mode 100644 down-the-stack/dk_pac/src/twi0/events_error.rs create mode 100644 down-the-stack/dk_pac/src/twi0/events_rxdready.rs create mode 100644 down-the-stack/dk_pac/src/twi0/events_stopped.rs create mode 100644 down-the-stack/dk_pac/src/twi0/events_suspended.rs create mode 100644 down-the-stack/dk_pac/src/twi0/events_txdsent.rs create mode 100644 down-the-stack/dk_pac/src/twi0/frequency.rs create mode 100644 down-the-stack/dk_pac/src/twi0/intenclr.rs create mode 100644 down-the-stack/dk_pac/src/twi0/intenset.rs create mode 100644 down-the-stack/dk_pac/src/twi0/pselscl.rs create mode 100644 down-the-stack/dk_pac/src/twi0/pselsda.rs create mode 100644 down-the-stack/dk_pac/src/twi0/rxd.rs create mode 100644 down-the-stack/dk_pac/src/twi0/shorts.rs create mode 100644 down-the-stack/dk_pac/src/twi0/tasks_resume.rs create mode 100644 down-the-stack/dk_pac/src/twi0/tasks_startrx.rs create mode 100644 down-the-stack/dk_pac/src/twi0/tasks_starttx.rs create mode 100644 down-the-stack/dk_pac/src/twi0/tasks_stop.rs create mode 100644 down-the-stack/dk_pac/src/twi0/tasks_suspend.rs create mode 100644 down-the-stack/dk_pac/src/twi0/txd.rs create mode 100644 down-the-stack/dk_pac/src/twim0.rs create mode 100644 down-the-stack/dk_pac/src/twim0/address.rs create mode 100644 down-the-stack/dk_pac/src/twim0/enable.rs create mode 100644 down-the-stack/dk_pac/src/twim0/errorsrc.rs create mode 100644 down-the-stack/dk_pac/src/twim0/events_error.rs create mode 100644 down-the-stack/dk_pac/src/twim0/events_lastrx.rs create mode 100644 down-the-stack/dk_pac/src/twim0/events_lasttx.rs create mode 100644 down-the-stack/dk_pac/src/twim0/events_rxstarted.rs create mode 100644 down-the-stack/dk_pac/src/twim0/events_stopped.rs create mode 100644 down-the-stack/dk_pac/src/twim0/events_suspended.rs create mode 100644 down-the-stack/dk_pac/src/twim0/events_txstarted.rs create mode 100644 down-the-stack/dk_pac/src/twim0/frequency.rs create mode 100644 down-the-stack/dk_pac/src/twim0/inten.rs create mode 100644 down-the-stack/dk_pac/src/twim0/intenclr.rs create mode 100644 down-the-stack/dk_pac/src/twim0/intenset.rs create mode 100644 down-the-stack/dk_pac/src/twim0/psel.rs create mode 100644 down-the-stack/dk_pac/src/twim0/psel/scl.rs create mode 100644 down-the-stack/dk_pac/src/twim0/psel/sda.rs create mode 100644 down-the-stack/dk_pac/src/twim0/rxd.rs create mode 100644 down-the-stack/dk_pac/src/twim0/rxd/amount.rs create mode 100644 down-the-stack/dk_pac/src/twim0/rxd/list.rs create mode 100644 down-the-stack/dk_pac/src/twim0/rxd/maxcnt.rs create mode 100644 down-the-stack/dk_pac/src/twim0/rxd/ptr.rs create mode 100644 down-the-stack/dk_pac/src/twim0/shorts.rs create mode 100644 down-the-stack/dk_pac/src/twim0/tasks_resume.rs create mode 100644 down-the-stack/dk_pac/src/twim0/tasks_startrx.rs create mode 100644 down-the-stack/dk_pac/src/twim0/tasks_starttx.rs create mode 100644 down-the-stack/dk_pac/src/twim0/tasks_stop.rs create mode 100644 down-the-stack/dk_pac/src/twim0/tasks_suspend.rs create mode 100644 down-the-stack/dk_pac/src/twim0/txd.rs create mode 100644 down-the-stack/dk_pac/src/twim0/txd/amount.rs create mode 100644 down-the-stack/dk_pac/src/twim0/txd/list.rs create mode 100644 down-the-stack/dk_pac/src/twim0/txd/maxcnt.rs create mode 100644 down-the-stack/dk_pac/src/twim0/txd/ptr.rs create mode 100644 down-the-stack/dk_pac/src/twis0.rs create mode 100644 down-the-stack/dk_pac/src/twis0/address.rs create mode 100644 down-the-stack/dk_pac/src/twis0/config.rs create mode 100644 down-the-stack/dk_pac/src/twis0/enable.rs create mode 100644 down-the-stack/dk_pac/src/twis0/errorsrc.rs create mode 100644 down-the-stack/dk_pac/src/twis0/events_error.rs create mode 100644 down-the-stack/dk_pac/src/twis0/events_read.rs create mode 100644 down-the-stack/dk_pac/src/twis0/events_rxstarted.rs create mode 100644 down-the-stack/dk_pac/src/twis0/events_stopped.rs create mode 100644 down-the-stack/dk_pac/src/twis0/events_txstarted.rs create mode 100644 down-the-stack/dk_pac/src/twis0/events_write.rs create mode 100644 down-the-stack/dk_pac/src/twis0/inten.rs create mode 100644 down-the-stack/dk_pac/src/twis0/intenclr.rs create mode 100644 down-the-stack/dk_pac/src/twis0/intenset.rs create mode 100644 down-the-stack/dk_pac/src/twis0/match_.rs create mode 100644 down-the-stack/dk_pac/src/twis0/orc.rs create mode 100644 down-the-stack/dk_pac/src/twis0/psel.rs create mode 100644 down-the-stack/dk_pac/src/twis0/psel/scl.rs create mode 100644 down-the-stack/dk_pac/src/twis0/psel/sda.rs create mode 100644 down-the-stack/dk_pac/src/twis0/rxd.rs create mode 100644 down-the-stack/dk_pac/src/twis0/rxd/amount.rs create mode 100644 down-the-stack/dk_pac/src/twis0/rxd/maxcnt.rs create mode 100644 down-the-stack/dk_pac/src/twis0/rxd/ptr.rs create mode 100644 down-the-stack/dk_pac/src/twis0/shorts.rs create mode 100644 down-the-stack/dk_pac/src/twis0/tasks_preparerx.rs create mode 100644 down-the-stack/dk_pac/src/twis0/tasks_preparetx.rs create mode 100644 down-the-stack/dk_pac/src/twis0/tasks_resume.rs create mode 100644 down-the-stack/dk_pac/src/twis0/tasks_stop.rs create mode 100644 down-the-stack/dk_pac/src/twis0/tasks_suspend.rs create mode 100644 down-the-stack/dk_pac/src/twis0/txd.rs create mode 100644 down-the-stack/dk_pac/src/twis0/txd/amount.rs create mode 100644 down-the-stack/dk_pac/src/twis0/txd/maxcnt.rs create mode 100644 down-the-stack/dk_pac/src/twis0/txd/ptr.rs create mode 100644 down-the-stack/dk_pac/src/uart0.rs create mode 100644 down-the-stack/dk_pac/src/uart0/baudrate.rs create mode 100644 down-the-stack/dk_pac/src/uart0/config.rs create mode 100644 down-the-stack/dk_pac/src/uart0/enable.rs create mode 100644 down-the-stack/dk_pac/src/uart0/errorsrc.rs create mode 100644 down-the-stack/dk_pac/src/uart0/events_cts.rs create mode 100644 down-the-stack/dk_pac/src/uart0/events_error.rs create mode 100644 down-the-stack/dk_pac/src/uart0/events_ncts.rs create mode 100644 down-the-stack/dk_pac/src/uart0/events_rxdrdy.rs create mode 100644 down-the-stack/dk_pac/src/uart0/events_rxto.rs create mode 100644 down-the-stack/dk_pac/src/uart0/events_txdrdy.rs create mode 100644 down-the-stack/dk_pac/src/uart0/intenclr.rs create mode 100644 down-the-stack/dk_pac/src/uart0/intenset.rs create mode 100644 down-the-stack/dk_pac/src/uart0/pselcts.rs create mode 100644 down-the-stack/dk_pac/src/uart0/pselrts.rs create mode 100644 down-the-stack/dk_pac/src/uart0/pselrxd.rs create mode 100644 down-the-stack/dk_pac/src/uart0/pseltxd.rs create mode 100644 down-the-stack/dk_pac/src/uart0/rxd.rs create mode 100644 down-the-stack/dk_pac/src/uart0/shorts.rs create mode 100644 down-the-stack/dk_pac/src/uart0/tasks_startrx.rs create mode 100644 down-the-stack/dk_pac/src/uart0/tasks_starttx.rs create mode 100644 down-the-stack/dk_pac/src/uart0/tasks_stoprx.rs create mode 100644 down-the-stack/dk_pac/src/uart0/tasks_stoptx.rs create mode 100644 down-the-stack/dk_pac/src/uart0/tasks_suspend.rs create mode 100644 down-the-stack/dk_pac/src/uart0/txd.rs create mode 100644 down-the-stack/dk_pac/src/uarte0.rs create mode 100644 down-the-stack/dk_pac/src/uarte0/baudrate.rs create mode 100644 down-the-stack/dk_pac/src/uarte0/config.rs create mode 100644 down-the-stack/dk_pac/src/uarte0/enable.rs create mode 100644 down-the-stack/dk_pac/src/uarte0/errorsrc.rs create mode 100644 down-the-stack/dk_pac/src/uarte0/events_cts.rs create mode 100644 down-the-stack/dk_pac/src/uarte0/events_endrx.rs create mode 100644 down-the-stack/dk_pac/src/uarte0/events_endtx.rs create mode 100644 down-the-stack/dk_pac/src/uarte0/events_error.rs create mode 100644 down-the-stack/dk_pac/src/uarte0/events_ncts.rs create mode 100644 down-the-stack/dk_pac/src/uarte0/events_rxdrdy.rs create mode 100644 down-the-stack/dk_pac/src/uarte0/events_rxstarted.rs create mode 100644 down-the-stack/dk_pac/src/uarte0/events_rxto.rs create mode 100644 down-the-stack/dk_pac/src/uarte0/events_txdrdy.rs create mode 100644 down-the-stack/dk_pac/src/uarte0/events_txstarted.rs create mode 100644 down-the-stack/dk_pac/src/uarte0/events_txstopped.rs create mode 100644 down-the-stack/dk_pac/src/uarte0/inten.rs create mode 100644 down-the-stack/dk_pac/src/uarte0/intenclr.rs create mode 100644 down-the-stack/dk_pac/src/uarte0/intenset.rs create mode 100644 down-the-stack/dk_pac/src/uarte0/psel.rs create mode 100644 down-the-stack/dk_pac/src/uarte0/psel/cts.rs create mode 100644 down-the-stack/dk_pac/src/uarte0/psel/rts.rs create mode 100644 down-the-stack/dk_pac/src/uarte0/psel/rxd.rs create mode 100644 down-the-stack/dk_pac/src/uarte0/psel/txd.rs create mode 100644 down-the-stack/dk_pac/src/uarte0/rxd.rs create mode 100644 down-the-stack/dk_pac/src/uarte0/rxd/amount.rs create mode 100644 down-the-stack/dk_pac/src/uarte0/rxd/maxcnt.rs create mode 100644 down-the-stack/dk_pac/src/uarte0/rxd/ptr.rs create mode 100644 down-the-stack/dk_pac/src/uarte0/shorts.rs create mode 100644 down-the-stack/dk_pac/src/uarte0/tasks_flushrx.rs create mode 100644 down-the-stack/dk_pac/src/uarte0/tasks_startrx.rs create mode 100644 down-the-stack/dk_pac/src/uarte0/tasks_starttx.rs create mode 100644 down-the-stack/dk_pac/src/uarte0/tasks_stoprx.rs create mode 100644 down-the-stack/dk_pac/src/uarte0/tasks_stoptx.rs create mode 100644 down-the-stack/dk_pac/src/uarte0/txd.rs create mode 100644 down-the-stack/dk_pac/src/uarte0/txd/amount.rs create mode 100644 down-the-stack/dk_pac/src/uarte0/txd/maxcnt.rs create mode 100644 down-the-stack/dk_pac/src/uarte0/txd/ptr.rs create mode 100644 down-the-stack/dk_pac/src/uicr.rs create mode 100644 down-the-stack/dk_pac/src/uicr/approtect.rs create mode 100644 down-the-stack/dk_pac/src/uicr/customer.rs create mode 100644 down-the-stack/dk_pac/src/uicr/nfcpins.rs create mode 100644 down-the-stack/dk_pac/src/uicr/nrffw.rs create mode 100644 down-the-stack/dk_pac/src/uicr/nrfhw.rs create mode 100644 down-the-stack/dk_pac/src/uicr/pselreset.rs create mode 100644 down-the-stack/dk_pac/src/wdt.rs create mode 100644 down-the-stack/dk_pac/src/wdt/config.rs create mode 100644 down-the-stack/dk_pac/src/wdt/crv.rs create mode 100644 down-the-stack/dk_pac/src/wdt/events_timeout.rs create mode 100644 down-the-stack/dk_pac/src/wdt/intenclr.rs create mode 100644 down-the-stack/dk_pac/src/wdt/intenset.rs create mode 100644 down-the-stack/dk_pac/src/wdt/reqstatus.rs create mode 100644 down-the-stack/dk_pac/src/wdt/rr.rs create mode 100644 down-the-stack/dk_pac/src/wdt/rren.rs create mode 100644 down-the-stack/dk_pac/src/wdt/runstatus.rs create mode 100644 down-the-stack/dk_pac/src/wdt/tasks_start.rs create mode 100644 embedded-workshop-book/src/pac_exercise.md diff --git a/down-the-stack/dk_pac/build.rs b/down-the-stack/dk_pac/build.rs new file mode 100644 index 0000000..ff663b5 --- /dev/null +++ b/down-the-stack/dk_pac/build.rs @@ -0,0 +1,17 @@ +use std::env; +use std::fs::File; +use std::io::Write; +use std::path::PathBuf; +fn main() { + if env::var_os("CARGO_FEATURE_RT").is_some() { + let out = &PathBuf::from(env::var_os("OUT_DIR").unwrap()); + File::create(out.join("device.x")) + .unwrap() + .write_all(include_bytes!("device.x")) + .unwrap(); + println!("cargo:rustc-link-search={}", out.display()); + println!("cargo:rerun-if-changed=device.x"); + } + println!("cargo:rerun-if-changed=build.rs"); +} + diff --git a/down-the-stack/dk_pac/device.x b/down-the-stack/dk_pac/device.x new file mode 100644 index 0000000..8b4bb81 --- /dev/null +++ b/down-the-stack/dk_pac/device.x @@ -0,0 +1,38 @@ +PROVIDE(POWER_CLOCK = DefaultHandler); +PROVIDE(RADIO = DefaultHandler); +PROVIDE(UARTE0_UART0 = DefaultHandler); +PROVIDE(SPIM0_SPIS0_TWIM0_TWIS0_SPI0_TWI0 = DefaultHandler); +PROVIDE(SPIM1_SPIS1_TWIM1_TWIS1_SPI1_TWI1 = DefaultHandler); +PROVIDE(NFCT = DefaultHandler); +PROVIDE(GPIOTE = DefaultHandler); +PROVIDE(SAADC = DefaultHandler); +PROVIDE(TIMER0 = DefaultHandler); +PROVIDE(TIMER1 = DefaultHandler); +PROVIDE(TIMER2 = DefaultHandler); +PROVIDE(RTC0 = DefaultHandler); +PROVIDE(TEMP = DefaultHandler); +PROVIDE(RNG = DefaultHandler); +PROVIDE(ECB = DefaultHandler); +PROVIDE(CCM_AAR = DefaultHandler); +PROVIDE(WDT = DefaultHandler); +PROVIDE(RTC1 = DefaultHandler); +PROVIDE(QDEC = DefaultHandler); +PROVIDE(COMP_LPCOMP = DefaultHandler); +PROVIDE(SWI0_EGU0 = DefaultHandler); +PROVIDE(SWI1_EGU1 = DefaultHandler); +PROVIDE(SWI2_EGU2 = DefaultHandler); +PROVIDE(SWI3_EGU3 = DefaultHandler); +PROVIDE(SWI4_EGU4 = DefaultHandler); +PROVIDE(SWI5_EGU5 = DefaultHandler); +PROVIDE(TIMER3 = DefaultHandler); +PROVIDE(TIMER4 = DefaultHandler); +PROVIDE(PWM0 = DefaultHandler); +PROVIDE(PDM = DefaultHandler); +PROVIDE(MWU = DefaultHandler); +PROVIDE(PWM1 = DefaultHandler); +PROVIDE(PWM2 = DefaultHandler); +PROVIDE(SPIM2_SPIS2_SPI2 = DefaultHandler); +PROVIDE(RTC2 = DefaultHandler); +PROVIDE(I2S = DefaultHandler); +PROVIDE(FPU = DefaultHandler); + diff --git a/down-the-stack/dk_pac/src/aar.rs b/down-the-stack/dk_pac/src/aar.rs new file mode 100644 index 0000000..554320b --- /dev/null +++ b/down-the-stack/dk_pac/src/aar.rs @@ -0,0 +1,88 @@ +#[doc = r"Register block"] +#[repr(C)] +pub struct RegisterBlock { + #[doc = "0x00 - Start resolving addresses based on IRKs specified in the IRK data structure"] + pub tasks_start: TASKS_START, + _reserved1: [u8; 0x04], + #[doc = "0x08 - Stop resolving addresses"] + pub tasks_stop: TASKS_STOP, + _reserved2: [u8; 0xf4], + #[doc = "0x100 - Address resolution procedure complete"] + pub events_end: EVENTS_END, + #[doc = "0x104 - Address resolved"] + pub events_resolved: EVENTS_RESOLVED, + #[doc = "0x108 - Address not resolved"] + pub events_notresolved: EVENTS_NOTRESOLVED, + _reserved5: [u8; 0x01f8], + #[doc = "0x304 - Enable interrupt"] + pub intenset: INTENSET, + #[doc = "0x308 - Disable interrupt"] + pub intenclr: INTENCLR, + _reserved7: [u8; 0xf4], + #[doc = "0x400 - Resolution status"] + pub status: STATUS, + _reserved8: [u8; 0xfc], + #[doc = "0x500 - Enable AAR"] + pub enable: ENABLE, + #[doc = "0x504 - Number of IRKs"] + pub nirk: NIRK, + #[doc = "0x508 - Pointer to IRK data structure"] + pub irkptr: IRKPTR, + _reserved11: [u8; 0x04], + #[doc = "0x510 - Pointer to the resolvable address"] + pub addrptr: ADDRPTR, + #[doc = "0x514 - Pointer to data area used for temporary storage"] + pub scratchptr: SCRATCHPTR, +} +#[doc = "TASKS_START (w) register accessor: an alias for `Reg`"] +pub type TASKS_START = crate::Reg; +#[doc = "Start resolving addresses based on IRKs specified in the IRK data structure"] +pub mod tasks_start; +#[doc = "TASKS_STOP (w) register accessor: an alias for `Reg`"] +pub type TASKS_STOP = crate::Reg; +#[doc = "Stop resolving addresses"] +pub mod tasks_stop; +#[doc = "EVENTS_END (rw) register accessor: an alias for `Reg`"] +pub type EVENTS_END = crate::Reg; +#[doc = "Address resolution procedure complete"] +pub mod events_end; +#[doc = "EVENTS_RESOLVED (rw) register accessor: an alias for `Reg`"] +pub type EVENTS_RESOLVED = crate::Reg; +#[doc = "Address resolved"] +pub mod events_resolved; +#[doc = "EVENTS_NOTRESOLVED (rw) register accessor: an alias for `Reg`"] +pub type EVENTS_NOTRESOLVED = crate::Reg; +#[doc = "Address not resolved"] +pub mod events_notresolved; +#[doc = "INTENSET (rw) register accessor: an alias for `Reg`"] +pub type INTENSET = crate::Reg; +#[doc = "Enable interrupt"] +pub mod intenset; +#[doc = "INTENCLR (rw) register accessor: an alias for `Reg`"] +pub type INTENCLR = crate::Reg; +#[doc = "Disable interrupt"] +pub mod intenclr; +#[doc = "STATUS (r) register accessor: an alias for `Reg`"] +pub type STATUS = crate::Reg; +#[doc = "Resolution status"] +pub mod status; +#[doc = "ENABLE (rw) register accessor: an alias for `Reg`"] +pub type ENABLE = crate::Reg; +#[doc = "Enable AAR"] +pub mod enable; +#[doc = "NIRK (rw) register accessor: an alias for `Reg`"] +pub type NIRK = crate::Reg; +#[doc = "Number of IRKs"] +pub mod nirk; +#[doc = "IRKPTR (rw) register accessor: an alias for `Reg`"] +pub type IRKPTR = crate::Reg; +#[doc = "Pointer to IRK data structure"] +pub mod irkptr; +#[doc = "ADDRPTR (rw) register accessor: an alias for `Reg`"] +pub type ADDRPTR = crate::Reg; +#[doc = "Pointer to the resolvable address"] +pub mod addrptr; +#[doc = "SCRATCHPTR (rw) register accessor: an alias for `Reg`"] +pub type SCRATCHPTR = crate::Reg; +#[doc = "Pointer to data area used for temporary storage"] +pub mod scratchptr; diff --git a/down-the-stack/dk_pac/src/aar/addrptr.rs b/down-the-stack/dk_pac/src/aar/addrptr.rs new file mode 100644 index 0000000..fca9493 --- /dev/null +++ b/down-the-stack/dk_pac/src/aar/addrptr.rs @@ -0,0 +1,80 @@ +#[doc = "Register `ADDRPTR` 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 `ADDRPTR` 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 `ADDRPTR` reader - Pointer to the resolvable address (6-bytes)"] +pub type ADDRPTR_R = crate::FieldReader; +#[doc = "Field `ADDRPTR` writer - Pointer to the resolvable address (6-bytes)"] +pub type ADDRPTR_W<'a, const O: u8> = crate::FieldWriter<'a, u32, ADDRPTR_SPEC, u32, u32, 32, O>; +impl R { + #[doc = "Bits 0:31 - Pointer to the resolvable address (6-bytes)"] + #[inline(always)] + pub fn addrptr(&self) -> ADDRPTR_R { + ADDRPTR_R::new(self.bits) + } +} +impl W { + #[doc = "Bits 0:31 - Pointer to the resolvable address (6-bytes)"] + #[inline(always)] + #[must_use] + pub fn addrptr(&mut self) -> ADDRPTR_W<0> { + ADDRPTR_W::new(self) + } + #[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 = "Pointer to the resolvable address\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 [addrptr](index.html) module"] +pub struct ADDRPTR_SPEC; +impl crate::RegisterSpec for ADDRPTR_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [addrptr::R](R) reader structure"] +impl crate::Readable for ADDRPTR_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [addrptr::W](W) writer structure"] +impl crate::Writable for ADDRPTR_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets ADDRPTR to value 0"] +impl crate::Resettable for ADDRPTR_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/aar/enable.rs b/down-the-stack/dk_pac/src/aar/enable.rs new file mode 100644 index 0000000..abfcf33 --- /dev/null +++ b/down-the-stack/dk_pac/src/aar/enable.rs @@ -0,0 +1,128 @@ +#[doc = "Register `ENABLE` 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 `ENABLE` 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 `ENABLE` reader - Enable or disable AAR"] +pub type ENABLE_R = crate::FieldReader; +#[doc = "Enable or disable AAR\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +#[repr(u8)] +pub enum ENABLE_A { + #[doc = "0: Disable"] + DISABLED = 0, + #[doc = "3: Enable"] + ENABLED = 3, +} +impl From for u8 { + #[inline(always)] + fn from(variant: ENABLE_A) -> Self { + variant as _ + } +} +impl ENABLE_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> Option { + match self.bits { + 0 => Some(ENABLE_A::DISABLED), + 3 => Some(ENABLE_A::ENABLED), + _ => None, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == ENABLE_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == ENABLE_A::ENABLED + } +} +#[doc = "Field `ENABLE` writer - Enable or disable AAR"] +pub type ENABLE_W<'a, const O: u8> = crate::FieldWriter<'a, u32, ENABLE_SPEC, u8, ENABLE_A, 2, O>; +impl<'a, const O: u8> ENABLE_W<'a, O> { + #[doc = "Disable"] + #[inline(always)] + pub fn disabled(self) -> &'a mut W { + self.variant(ENABLE_A::DISABLED) + } + #[doc = "Enable"] + #[inline(always)] + pub fn enabled(self) -> &'a mut W { + self.variant(ENABLE_A::ENABLED) + } +} +impl R { + #[doc = "Bits 0:1 - Enable or disable AAR"] + #[inline(always)] + pub fn enable(&self) -> ENABLE_R { + ENABLE_R::new((self.bits & 3) as u8) + } +} +impl W { + #[doc = "Bits 0:1 - Enable or disable AAR"] + #[inline(always)] + #[must_use] + pub fn enable(&mut self) -> ENABLE_W<0> { + 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 + } +} +#[doc = "Enable AAR\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 [enable](index.html) module"] +pub struct ENABLE_SPEC; +impl crate::RegisterSpec for ENABLE_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [enable::R](R) reader structure"] +impl crate::Readable for ENABLE_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [enable::W](W) writer structure"] +impl crate::Writable for ENABLE_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets ENABLE to value 0"] +impl crate::Resettable for ENABLE_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/aar/events_end.rs b/down-the-stack/dk_pac/src/aar/events_end.rs new file mode 100644 index 0000000..9fd544e --- /dev/null +++ b/down-the-stack/dk_pac/src/aar/events_end.rs @@ -0,0 +1,127 @@ +#[doc = "Register `EVENTS_END` 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 `EVENTS_END` 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 `EVENTS_END` reader - Address resolution procedure complete"] +pub type EVENTS_END_R = crate::BitReader; +#[doc = "Address resolution procedure complete\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum EVENTS_END_A { + #[doc = "0: Event not generated"] + NOT_GENERATED = 0, + #[doc = "1: Event generated"] + GENERATED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: EVENTS_END_A) -> Self { + variant as u8 != 0 + } +} +impl EVENTS_END_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> EVENTS_END_A { + match self.bits { + false => EVENTS_END_A::NOT_GENERATED, + true => EVENTS_END_A::GENERATED, + } + } + #[doc = "Checks if the value of the field is `NOT_GENERATED`"] + #[inline(always)] + pub fn is_not_generated(&self) -> bool { + *self == EVENTS_END_A::NOT_GENERATED + } + #[doc = "Checks if the value of the field is `GENERATED`"] + #[inline(always)] + pub fn is_generated(&self) -> bool { + *self == EVENTS_END_A::GENERATED + } +} +#[doc = "Field `EVENTS_END` writer - Address resolution procedure complete"] +pub type EVENTS_END_W<'a, const O: u8> = + crate::BitWriter<'a, u32, EVENTS_END_SPEC, EVENTS_END_A, O>; +impl<'a, const O: u8> EVENTS_END_W<'a, O> { + #[doc = "Event not generated"] + #[inline(always)] + pub fn not_generated(self) -> &'a mut W { + self.variant(EVENTS_END_A::NOT_GENERATED) + } + #[doc = "Event generated"] + #[inline(always)] + pub fn generated(self) -> &'a mut W { + self.variant(EVENTS_END_A::GENERATED) + } +} +impl R { + #[doc = "Bit 0 - Address resolution procedure complete"] + #[inline(always)] + pub fn events_end(&self) -> EVENTS_END_R { + EVENTS_END_R::new((self.bits & 1) != 0) + } +} +impl W { + #[doc = "Bit 0 - Address resolution procedure complete"] + #[inline(always)] + #[must_use] + pub fn events_end(&mut self) -> EVENTS_END_W<0> { + EVENTS_END_W::new(self) + } + #[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 = "Address resolution procedure complete\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 [events_end](index.html) module"] +pub struct EVENTS_END_SPEC; +impl crate::RegisterSpec for EVENTS_END_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [events_end::R](R) reader structure"] +impl crate::Readable for EVENTS_END_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [events_end::W](W) writer structure"] +impl crate::Writable for EVENTS_END_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets EVENTS_END to value 0"] +impl crate::Resettable for EVENTS_END_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/aar/events_notresolved.rs b/down-the-stack/dk_pac/src/aar/events_notresolved.rs new file mode 100644 index 0000000..4eedb18 --- /dev/null +++ b/down-the-stack/dk_pac/src/aar/events_notresolved.rs @@ -0,0 +1,127 @@ +#[doc = "Register `EVENTS_NOTRESOLVED` 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 `EVENTS_NOTRESOLVED` 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 `EVENTS_NOTRESOLVED` reader - Address not resolved"] +pub type EVENTS_NOTRESOLVED_R = crate::BitReader; +#[doc = "Address not resolved\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum EVENTS_NOTRESOLVED_A { + #[doc = "0: Event not generated"] + NOT_GENERATED = 0, + #[doc = "1: Event generated"] + GENERATED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: EVENTS_NOTRESOLVED_A) -> Self { + variant as u8 != 0 + } +} +impl EVENTS_NOTRESOLVED_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> EVENTS_NOTRESOLVED_A { + match self.bits { + false => EVENTS_NOTRESOLVED_A::NOT_GENERATED, + true => EVENTS_NOTRESOLVED_A::GENERATED, + } + } + #[doc = "Checks if the value of the field is `NOT_GENERATED`"] + #[inline(always)] + pub fn is_not_generated(&self) -> bool { + *self == EVENTS_NOTRESOLVED_A::NOT_GENERATED + } + #[doc = "Checks if the value of the field is `GENERATED`"] + #[inline(always)] + pub fn is_generated(&self) -> bool { + *self == EVENTS_NOTRESOLVED_A::GENERATED + } +} +#[doc = "Field `EVENTS_NOTRESOLVED` writer - Address not resolved"] +pub type EVENTS_NOTRESOLVED_W<'a, const O: u8> = + crate::BitWriter<'a, u32, EVENTS_NOTRESOLVED_SPEC, EVENTS_NOTRESOLVED_A, O>; +impl<'a, const O: u8> EVENTS_NOTRESOLVED_W<'a, O> { + #[doc = "Event not generated"] + #[inline(always)] + pub fn not_generated(self) -> &'a mut W { + self.variant(EVENTS_NOTRESOLVED_A::NOT_GENERATED) + } + #[doc = "Event generated"] + #[inline(always)] + pub fn generated(self) -> &'a mut W { + self.variant(EVENTS_NOTRESOLVED_A::GENERATED) + } +} +impl R { + #[doc = "Bit 0 - Address not resolved"] + #[inline(always)] + pub fn events_notresolved(&self) -> EVENTS_NOTRESOLVED_R { + EVENTS_NOTRESOLVED_R::new((self.bits & 1) != 0) + } +} +impl W { + #[doc = "Bit 0 - Address not resolved"] + #[inline(always)] + #[must_use] + pub fn events_notresolved(&mut self) -> EVENTS_NOTRESOLVED_W<0> { + EVENTS_NOTRESOLVED_W::new(self) + } + #[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 = "Address not resolved\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 [events_notresolved](index.html) module"] +pub struct EVENTS_NOTRESOLVED_SPEC; +impl crate::RegisterSpec for EVENTS_NOTRESOLVED_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [events_notresolved::R](R) reader structure"] +impl crate::Readable for EVENTS_NOTRESOLVED_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [events_notresolved::W](W) writer structure"] +impl crate::Writable for EVENTS_NOTRESOLVED_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets EVENTS_NOTRESOLVED to value 0"] +impl crate::Resettable for EVENTS_NOTRESOLVED_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/aar/events_resolved.rs b/down-the-stack/dk_pac/src/aar/events_resolved.rs new file mode 100644 index 0000000..9372bfb --- /dev/null +++ b/down-the-stack/dk_pac/src/aar/events_resolved.rs @@ -0,0 +1,127 @@ +#[doc = "Register `EVENTS_RESOLVED` 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 `EVENTS_RESOLVED` 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 `EVENTS_RESOLVED` reader - Address resolved"] +pub type EVENTS_RESOLVED_R = crate::BitReader; +#[doc = "Address resolved\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum EVENTS_RESOLVED_A { + #[doc = "0: Event not generated"] + NOT_GENERATED = 0, + #[doc = "1: Event generated"] + GENERATED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: EVENTS_RESOLVED_A) -> Self { + variant as u8 != 0 + } +} +impl EVENTS_RESOLVED_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> EVENTS_RESOLVED_A { + match self.bits { + false => EVENTS_RESOLVED_A::NOT_GENERATED, + true => EVENTS_RESOLVED_A::GENERATED, + } + } + #[doc = "Checks if the value of the field is `NOT_GENERATED`"] + #[inline(always)] + pub fn is_not_generated(&self) -> bool { + *self == EVENTS_RESOLVED_A::NOT_GENERATED + } + #[doc = "Checks if the value of the field is `GENERATED`"] + #[inline(always)] + pub fn is_generated(&self) -> bool { + *self == EVENTS_RESOLVED_A::GENERATED + } +} +#[doc = "Field `EVENTS_RESOLVED` writer - Address resolved"] +pub type EVENTS_RESOLVED_W<'a, const O: u8> = + crate::BitWriter<'a, u32, EVENTS_RESOLVED_SPEC, EVENTS_RESOLVED_A, O>; +impl<'a, const O: u8> EVENTS_RESOLVED_W<'a, O> { + #[doc = "Event not generated"] + #[inline(always)] + pub fn not_generated(self) -> &'a mut W { + self.variant(EVENTS_RESOLVED_A::NOT_GENERATED) + } + #[doc = "Event generated"] + #[inline(always)] + pub fn generated(self) -> &'a mut W { + self.variant(EVENTS_RESOLVED_A::GENERATED) + } +} +impl R { + #[doc = "Bit 0 - Address resolved"] + #[inline(always)] + pub fn events_resolved(&self) -> EVENTS_RESOLVED_R { + EVENTS_RESOLVED_R::new((self.bits & 1) != 0) + } +} +impl W { + #[doc = "Bit 0 - Address resolved"] + #[inline(always)] + #[must_use] + pub fn events_resolved(&mut self) -> EVENTS_RESOLVED_W<0> { + EVENTS_RESOLVED_W::new(self) + } + #[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 = "Address resolved\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 [events_resolved](index.html) module"] +pub struct EVENTS_RESOLVED_SPEC; +impl crate::RegisterSpec for EVENTS_RESOLVED_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [events_resolved::R](R) reader structure"] +impl crate::Readable for EVENTS_RESOLVED_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [events_resolved::W](W) writer structure"] +impl crate::Writable for EVENTS_RESOLVED_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets EVENTS_RESOLVED to value 0"] +impl crate::Resettable for EVENTS_RESOLVED_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/aar/intenclr.rs b/down-the-stack/dk_pac/src/aar/intenclr.rs new file mode 100644 index 0000000..53be582 --- /dev/null +++ b/down-the-stack/dk_pac/src/aar/intenclr.rs @@ -0,0 +1,270 @@ +#[doc = "Register `INTENCLR` 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 `INTENCLR` 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 `END` reader - Write '1' to disable interrupt for event END"] +pub type END_R = crate::BitReader; +#[doc = "Write '1' to disable interrupt for event END\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum END_A { + #[doc = "0: Read: Disabled"] + DISABLED = 0, + #[doc = "1: Read: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: END_A) -> Self { + variant as u8 != 0 + } +} +impl END_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> END_A { + match self.bits { + false => END_A::DISABLED, + true => END_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == END_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == END_A::ENABLED + } +} +#[doc = "Write '1' to disable interrupt for event END\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum END_AW { + #[doc = "1: Disable"] + CLEAR = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: END_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `END` writer - Write '1' to disable interrupt for event END"] +pub type END_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENCLR_SPEC, END_AW, O>; +impl<'a, const O: u8> END_W<'a, O> { + #[doc = "Disable"] + #[inline(always)] + pub fn clear(self) -> &'a mut W { + self.variant(END_AW::CLEAR) + } +} +#[doc = "Field `RESOLVED` reader - Write '1' to disable interrupt for event RESOLVED"] +pub type RESOLVED_R = crate::BitReader; +#[doc = "Write '1' to disable interrupt for event RESOLVED\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum RESOLVED_A { + #[doc = "0: Read: Disabled"] + DISABLED = 0, + #[doc = "1: Read: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: RESOLVED_A) -> Self { + variant as u8 != 0 + } +} +impl RESOLVED_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> RESOLVED_A { + match self.bits { + false => RESOLVED_A::DISABLED, + true => RESOLVED_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == RESOLVED_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == RESOLVED_A::ENABLED + } +} +#[doc = "Write '1' to disable interrupt for event RESOLVED\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum RESOLVED_AW { + #[doc = "1: Disable"] + CLEAR = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: RESOLVED_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `RESOLVED` writer - Write '1' to disable interrupt for event RESOLVED"] +pub type RESOLVED_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENCLR_SPEC, RESOLVED_AW, O>; +impl<'a, const O: u8> RESOLVED_W<'a, O> { + #[doc = "Disable"] + #[inline(always)] + pub fn clear(self) -> &'a mut W { + self.variant(RESOLVED_AW::CLEAR) + } +} +#[doc = "Field `NOTRESOLVED` reader - Write '1' to disable interrupt for event NOTRESOLVED"] +pub type NOTRESOLVED_R = crate::BitReader; +#[doc = "Write '1' to disable interrupt for event NOTRESOLVED\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum NOTRESOLVED_A { + #[doc = "0: Read: Disabled"] + DISABLED = 0, + #[doc = "1: Read: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: NOTRESOLVED_A) -> Self { + variant as u8 != 0 + } +} +impl NOTRESOLVED_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> NOTRESOLVED_A { + match self.bits { + false => NOTRESOLVED_A::DISABLED, + true => NOTRESOLVED_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == NOTRESOLVED_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == NOTRESOLVED_A::ENABLED + } +} +#[doc = "Write '1' to disable interrupt for event NOTRESOLVED\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum NOTRESOLVED_AW { + #[doc = "1: Disable"] + CLEAR = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: NOTRESOLVED_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `NOTRESOLVED` writer - Write '1' to disable interrupt for event NOTRESOLVED"] +pub type NOTRESOLVED_W<'a, const O: u8> = + crate::BitWriter<'a, u32, INTENCLR_SPEC, NOTRESOLVED_AW, O>; +impl<'a, const O: u8> NOTRESOLVED_W<'a, O> { + #[doc = "Disable"] + #[inline(always)] + pub fn clear(self) -> &'a mut W { + self.variant(NOTRESOLVED_AW::CLEAR) + } +} +impl R { + #[doc = "Bit 0 - Write '1' to disable interrupt for event END"] + #[inline(always)] + pub fn end(&self) -> END_R { + END_R::new((self.bits & 1) != 0) + } + #[doc = "Bit 1 - Write '1' to disable interrupt for event RESOLVED"] + #[inline(always)] + pub fn resolved(&self) -> RESOLVED_R { + RESOLVED_R::new(((self.bits >> 1) & 1) != 0) + } + #[doc = "Bit 2 - Write '1' to disable interrupt for event NOTRESOLVED"] + #[inline(always)] + pub fn notresolved(&self) -> NOTRESOLVED_R { + NOTRESOLVED_R::new(((self.bits >> 2) & 1) != 0) + } +} +impl W { + #[doc = "Bit 0 - Write '1' to disable interrupt for event END"] + #[inline(always)] + #[must_use] + pub fn end(&mut self) -> END_W<0> { + END_W::new(self) + } + #[doc = "Bit 1 - Write '1' to disable interrupt for event RESOLVED"] + #[inline(always)] + #[must_use] + pub fn resolved(&mut self) -> RESOLVED_W<1> { + RESOLVED_W::new(self) + } + #[doc = "Bit 2 - Write '1' to disable interrupt for event NOTRESOLVED"] + #[inline(always)] + #[must_use] + pub fn notresolved(&mut self) -> NOTRESOLVED_W<2> { + NOTRESOLVED_W::new(self) + } + #[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 = "Disable interrupt\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 [intenclr](index.html) module"] +pub struct INTENCLR_SPEC; +impl crate::RegisterSpec for INTENCLR_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [intenclr::R](R) reader structure"] +impl crate::Readable for INTENCLR_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [intenclr::W](W) writer structure"] +impl crate::Writable for INTENCLR_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets INTENCLR to value 0"] +impl crate::Resettable for INTENCLR_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/aar/intenset.rs b/down-the-stack/dk_pac/src/aar/intenset.rs new file mode 100644 index 0000000..91ecf85 --- /dev/null +++ b/down-the-stack/dk_pac/src/aar/intenset.rs @@ -0,0 +1,270 @@ +#[doc = "Register `INTENSET` 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 `INTENSET` 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 `END` reader - Write '1' to enable interrupt for event END"] +pub type END_R = crate::BitReader; +#[doc = "Write '1' to enable interrupt for event END\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum END_A { + #[doc = "0: Read: Disabled"] + DISABLED = 0, + #[doc = "1: Read: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: END_A) -> Self { + variant as u8 != 0 + } +} +impl END_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> END_A { + match self.bits { + false => END_A::DISABLED, + true => END_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == END_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == END_A::ENABLED + } +} +#[doc = "Write '1' to enable interrupt for event END\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum END_AW { + #[doc = "1: Enable"] + SET = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: END_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `END` writer - Write '1' to enable interrupt for event END"] +pub type END_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENSET_SPEC, END_AW, O>; +impl<'a, const O: u8> END_W<'a, O> { + #[doc = "Enable"] + #[inline(always)] + pub fn set(self) -> &'a mut W { + self.variant(END_AW::SET) + } +} +#[doc = "Field `RESOLVED` reader - Write '1' to enable interrupt for event RESOLVED"] +pub type RESOLVED_R = crate::BitReader; +#[doc = "Write '1' to enable interrupt for event RESOLVED\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum RESOLVED_A { + #[doc = "0: Read: Disabled"] + DISABLED = 0, + #[doc = "1: Read: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: RESOLVED_A) -> Self { + variant as u8 != 0 + } +} +impl RESOLVED_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> RESOLVED_A { + match self.bits { + false => RESOLVED_A::DISABLED, + true => RESOLVED_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == RESOLVED_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == RESOLVED_A::ENABLED + } +} +#[doc = "Write '1' to enable interrupt for event RESOLVED\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum RESOLVED_AW { + #[doc = "1: Enable"] + SET = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: RESOLVED_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `RESOLVED` writer - Write '1' to enable interrupt for event RESOLVED"] +pub type RESOLVED_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENSET_SPEC, RESOLVED_AW, O>; +impl<'a, const O: u8> RESOLVED_W<'a, O> { + #[doc = "Enable"] + #[inline(always)] + pub fn set(self) -> &'a mut W { + self.variant(RESOLVED_AW::SET) + } +} +#[doc = "Field `NOTRESOLVED` reader - Write '1' to enable interrupt for event NOTRESOLVED"] +pub type NOTRESOLVED_R = crate::BitReader; +#[doc = "Write '1' to enable interrupt for event NOTRESOLVED\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum NOTRESOLVED_A { + #[doc = "0: Read: Disabled"] + DISABLED = 0, + #[doc = "1: Read: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: NOTRESOLVED_A) -> Self { + variant as u8 != 0 + } +} +impl NOTRESOLVED_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> NOTRESOLVED_A { + match self.bits { + false => NOTRESOLVED_A::DISABLED, + true => NOTRESOLVED_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == NOTRESOLVED_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == NOTRESOLVED_A::ENABLED + } +} +#[doc = "Write '1' to enable interrupt for event NOTRESOLVED\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum NOTRESOLVED_AW { + #[doc = "1: Enable"] + SET = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: NOTRESOLVED_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `NOTRESOLVED` writer - Write '1' to enable interrupt for event NOTRESOLVED"] +pub type NOTRESOLVED_W<'a, const O: u8> = + crate::BitWriter<'a, u32, INTENSET_SPEC, NOTRESOLVED_AW, O>; +impl<'a, const O: u8> NOTRESOLVED_W<'a, O> { + #[doc = "Enable"] + #[inline(always)] + pub fn set(self) -> &'a mut W { + self.variant(NOTRESOLVED_AW::SET) + } +} +impl R { + #[doc = "Bit 0 - Write '1' to enable interrupt for event END"] + #[inline(always)] + pub fn end(&self) -> END_R { + END_R::new((self.bits & 1) != 0) + } + #[doc = "Bit 1 - Write '1' to enable interrupt for event RESOLVED"] + #[inline(always)] + pub fn resolved(&self) -> RESOLVED_R { + RESOLVED_R::new(((self.bits >> 1) & 1) != 0) + } + #[doc = "Bit 2 - Write '1' to enable interrupt for event NOTRESOLVED"] + #[inline(always)] + pub fn notresolved(&self) -> NOTRESOLVED_R { + NOTRESOLVED_R::new(((self.bits >> 2) & 1) != 0) + } +} +impl W { + #[doc = "Bit 0 - Write '1' to enable interrupt for event END"] + #[inline(always)] + #[must_use] + pub fn end(&mut self) -> END_W<0> { + END_W::new(self) + } + #[doc = "Bit 1 - Write '1' to enable interrupt for event RESOLVED"] + #[inline(always)] + #[must_use] + pub fn resolved(&mut self) -> RESOLVED_W<1> { + RESOLVED_W::new(self) + } + #[doc = "Bit 2 - Write '1' to enable interrupt for event NOTRESOLVED"] + #[inline(always)] + #[must_use] + pub fn notresolved(&mut self) -> NOTRESOLVED_W<2> { + NOTRESOLVED_W::new(self) + } + #[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 = "Enable interrupt\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 [intenset](index.html) module"] +pub struct INTENSET_SPEC; +impl crate::RegisterSpec for INTENSET_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [intenset::R](R) reader structure"] +impl crate::Readable for INTENSET_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [intenset::W](W) writer structure"] +impl crate::Writable for INTENSET_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets INTENSET to value 0"] +impl crate::Resettable for INTENSET_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/aar/irkptr.rs b/down-the-stack/dk_pac/src/aar/irkptr.rs new file mode 100644 index 0000000..b0aea33 --- /dev/null +++ b/down-the-stack/dk_pac/src/aar/irkptr.rs @@ -0,0 +1,80 @@ +#[doc = "Register `IRKPTR` 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 `IRKPTR` 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 `IRKPTR` reader - Pointer to the IRK data structure"] +pub type IRKPTR_R = crate::FieldReader; +#[doc = "Field `IRKPTR` writer - Pointer to the IRK data structure"] +pub type IRKPTR_W<'a, const O: u8> = crate::FieldWriter<'a, u32, IRKPTR_SPEC, u32, u32, 32, O>; +impl R { + #[doc = "Bits 0:31 - Pointer to the IRK data structure"] + #[inline(always)] + pub fn irkptr(&self) -> IRKPTR_R { + IRKPTR_R::new(self.bits) + } +} +impl W { + #[doc = "Bits 0:31 - Pointer to the IRK data structure"] + #[inline(always)] + #[must_use] + pub fn irkptr(&mut self) -> IRKPTR_W<0> { + IRKPTR_W::new(self) + } + #[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 = "Pointer to IRK data structure\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 [irkptr](index.html) module"] +pub struct IRKPTR_SPEC; +impl crate::RegisterSpec for IRKPTR_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [irkptr::R](R) reader structure"] +impl crate::Readable for IRKPTR_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [irkptr::W](W) writer structure"] +impl crate::Writable for IRKPTR_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets IRKPTR to value 0"] +impl crate::Resettable for IRKPTR_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/aar/nirk.rs b/down-the-stack/dk_pac/src/aar/nirk.rs new file mode 100644 index 0000000..97998b6 --- /dev/null +++ b/down-the-stack/dk_pac/src/aar/nirk.rs @@ -0,0 +1,80 @@ +#[doc = "Register `NIRK` 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 `NIRK` 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 `NIRK` reader - Number of Identity root keys available in the IRK data structure"] +pub type NIRK_R = crate::FieldReader; +#[doc = "Field `NIRK` writer - Number of Identity root keys available in the IRK data structure"] +pub type NIRK_W<'a, const O: u8> = crate::FieldWriter<'a, u32, NIRK_SPEC, u8, u8, 5, O>; +impl R { + #[doc = "Bits 0:4 - Number of Identity root keys available in the IRK data structure"] + #[inline(always)] + pub fn nirk(&self) -> NIRK_R { + NIRK_R::new((self.bits & 0x1f) as u8) + } +} +impl W { + #[doc = "Bits 0:4 - Number of Identity root keys available in the IRK data structure"] + #[inline(always)] + #[must_use] + pub fn nirk(&mut self) -> NIRK_W<0> { + NIRK_W::new(self) + } + #[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 = "Number of IRKs\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 [nirk](index.html) module"] +pub struct NIRK_SPEC; +impl crate::RegisterSpec for NIRK_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [nirk::R](R) reader structure"] +impl crate::Readable for NIRK_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [nirk::W](W) writer structure"] +impl crate::Writable for NIRK_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets NIRK to value 0x01"] +impl crate::Resettable for NIRK_SPEC { + const RESET_VALUE: Self::Ux = 0x01; +} diff --git a/down-the-stack/dk_pac/src/aar/scratchptr.rs b/down-the-stack/dk_pac/src/aar/scratchptr.rs new file mode 100644 index 0000000..a080319 --- /dev/null +++ b/down-the-stack/dk_pac/src/aar/scratchptr.rs @@ -0,0 +1,81 @@ +#[doc = "Register `SCRATCHPTR` 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 `SCRATCHPTR` 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 `SCRATCHPTR` reader - Pointer to a scratch data area used for temporary storage during resolution.A space of minimum 3 bytes must be reserved."] +pub type SCRATCHPTR_R = crate::FieldReader; +#[doc = "Field `SCRATCHPTR` writer - Pointer to a scratch data area used for temporary storage during resolution.A space of minimum 3 bytes must be reserved."] +pub type SCRATCHPTR_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, SCRATCHPTR_SPEC, u32, u32, 32, O>; +impl R { + #[doc = "Bits 0:31 - Pointer to a scratch data area used for temporary storage during resolution.A space of minimum 3 bytes must be reserved."] + #[inline(always)] + pub fn scratchptr(&self) -> SCRATCHPTR_R { + SCRATCHPTR_R::new(self.bits) + } +} +impl W { + #[doc = "Bits 0:31 - Pointer to a scratch data area used for temporary storage during resolution.A space of minimum 3 bytes must be reserved."] + #[inline(always)] + #[must_use] + pub fn scratchptr(&mut self) -> SCRATCHPTR_W<0> { + SCRATCHPTR_W::new(self) + } + #[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 = "Pointer to data area used for temporary storage\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 [scratchptr](index.html) module"] +pub struct SCRATCHPTR_SPEC; +impl crate::RegisterSpec for SCRATCHPTR_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [scratchptr::R](R) reader structure"] +impl crate::Readable for SCRATCHPTR_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [scratchptr::W](W) writer structure"] +impl crate::Writable for SCRATCHPTR_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets SCRATCHPTR to value 0"] +impl crate::Resettable for SCRATCHPTR_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/aar/status.rs b/down-the-stack/dk_pac/src/aar/status.rs new file mode 100644 index 0000000..d46a373 --- /dev/null +++ b/down-the-stack/dk_pac/src/aar/status.rs @@ -0,0 +1,37 @@ +#[doc = "Register `STATUS` 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 = "Field `STATUS` reader - The IRK that was used last time an address was resolved"] +pub type STATUS_R = crate::FieldReader; +impl R { + #[doc = "Bits 0:3 - The IRK that was used last time an address was resolved"] + #[inline(always)] + pub fn status(&self) -> STATUS_R { + STATUS_R::new((self.bits & 0x0f) as u8) + } +} +#[doc = "Resolution 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 [status](index.html) module"] +pub struct STATUS_SPEC; +impl crate::RegisterSpec for STATUS_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [status::R](R) reader structure"] +impl crate::Readable for STATUS_SPEC { + type Reader = R; +} +#[doc = "`reset()` method sets STATUS to value 0"] +impl crate::Resettable for STATUS_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/aar/tasks_start.rs b/down-the-stack/dk_pac/src/aar/tasks_start.rs new file mode 100644 index 0000000..22a37ed --- /dev/null +++ b/down-the-stack/dk_pac/src/aar/tasks_start.rs @@ -0,0 +1,72 @@ +#[doc = "Register `TASKS_START` 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 = "Start resolving addresses based on IRKs specified in the IRK data structure\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum TASKS_START_AW { + #[doc = "1: Trigger task"] + TRIGGER = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: TASKS_START_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `TASKS_START` writer - Start resolving addresses based on IRKs specified in the IRK data structure"] +pub type TASKS_START_W<'a, const O: u8> = + crate::BitWriter<'a, u32, TASKS_START_SPEC, TASKS_START_AW, O>; +impl<'a, const O: u8> TASKS_START_W<'a, O> { + #[doc = "Trigger task"] + #[inline(always)] + pub fn trigger(self) -> &'a mut W { + self.variant(TASKS_START_AW::TRIGGER) + } +} +impl W { + #[doc = "Bit 0 - Start resolving addresses based on IRKs specified in the IRK data structure"] + #[inline(always)] + #[must_use] + pub fn tasks_start(&mut self) -> TASKS_START_W<0> { + TASKS_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 + } +} +#[doc = "Start resolving addresses based on IRKs specified in the IRK data structure\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 [tasks_start](index.html) module"] +pub struct TASKS_START_SPEC; +impl crate::RegisterSpec for TASKS_START_SPEC { + type Ux = u32; +} +#[doc = "`write(|w| ..)` method takes [tasks_start::W](W) writer structure"] +impl crate::Writable for TASKS_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 TASKS_START to value 0"] +impl crate::Resettable for TASKS_START_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/aar/tasks_stop.rs b/down-the-stack/dk_pac/src/aar/tasks_stop.rs new file mode 100644 index 0000000..e7ab99b --- /dev/null +++ b/down-the-stack/dk_pac/src/aar/tasks_stop.rs @@ -0,0 +1,72 @@ +#[doc = "Register `TASKS_STOP` 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 = "Stop resolving addresses\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum TASKS_STOP_AW { + #[doc = "1: Trigger task"] + TRIGGER = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: TASKS_STOP_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `TASKS_STOP` writer - Stop resolving addresses"] +pub type TASKS_STOP_W<'a, const O: u8> = + crate::BitWriter<'a, u32, TASKS_STOP_SPEC, TASKS_STOP_AW, O>; +impl<'a, const O: u8> TASKS_STOP_W<'a, O> { + #[doc = "Trigger task"] + #[inline(always)] + pub fn trigger(self) -> &'a mut W { + self.variant(TASKS_STOP_AW::TRIGGER) + } +} +impl W { + #[doc = "Bit 0 - Stop resolving addresses"] + #[inline(always)] + #[must_use] + pub fn tasks_stop(&mut self) -> TASKS_STOP_W<0> { + TASKS_STOP_W::new(self) + } + #[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 = "Stop resolving addresses\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 [tasks_stop](index.html) module"] +pub struct TASKS_STOP_SPEC; +impl crate::RegisterSpec for TASKS_STOP_SPEC { + type Ux = u32; +} +#[doc = "`write(|w| ..)` method takes [tasks_stop::W](W) writer structure"] +impl crate::Writable for TASKS_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 TASKS_STOP to value 0"] +impl crate::Resettable for TASKS_STOP_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/approtect.rs b/down-the-stack/dk_pac/src/approtect.rs new file mode 100644 index 0000000..a5d7637 --- /dev/null +++ b/down-the-stack/dk_pac/src/approtect.rs @@ -0,0 +1,18 @@ +#[doc = r"Register block"] +#[repr(C)] +pub struct RegisterBlock { + _reserved0: [u8; 0x0550], + #[doc = "0x550 - Software force enable APPROTECT mechanism until next reset. This register can only be written once."] + pub forceprotect: FORCEPROTECT, + _reserved1: [u8; 0x04], + #[doc = "0x558 - Software disable APPROTECT mechanism"] + pub disable: DISABLE, +} +#[doc = "FORCEPROTECT (rw) register accessor: an alias for `Reg`"] +pub type FORCEPROTECT = crate::Reg; +#[doc = "Software force enable APPROTECT mechanism until next reset. This register can only be written once."] +pub mod forceprotect; +#[doc = "DISABLE (rw) register accessor: an alias for `Reg`"] +pub type DISABLE = crate::Reg; +#[doc = "Software disable APPROTECT mechanism"] +pub mod disable; diff --git a/down-the-stack/dk_pac/src/approtect/disable.rs b/down-the-stack/dk_pac/src/approtect/disable.rs new file mode 100644 index 0000000..21fb477 --- /dev/null +++ b/down-the-stack/dk_pac/src/approtect/disable.rs @@ -0,0 +1,116 @@ +#[doc = "Register `DISABLE` 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 `DISABLE` 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 `DISABLE` reader - Software disable APPROTECT mechanism"] +pub type DISABLE_R = crate::FieldReader; +#[doc = "Software disable APPROTECT mechanism\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +#[repr(u8)] +pub enum DISABLE_A { + #[doc = "90: Software disable APPROTECT mechanism"] + SW_DISABLE = 90, +} +impl From for u8 { + #[inline(always)] + fn from(variant: DISABLE_A) -> Self { + variant as _ + } +} +impl DISABLE_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> Option { + match self.bits { + 90 => Some(DISABLE_A::SW_DISABLE), + _ => None, + } + } + #[doc = "Checks if the value of the field is `SW_DISABLE`"] + #[inline(always)] + pub fn is_sw_disable(&self) -> bool { + *self == DISABLE_A::SW_DISABLE + } +} +#[doc = "Field `DISABLE` writer - Software disable APPROTECT mechanism"] +pub type DISABLE_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, DISABLE_SPEC, u8, DISABLE_A, 8, O>; +impl<'a, const O: u8> DISABLE_W<'a, O> { + #[doc = "Software disable APPROTECT mechanism"] + #[inline(always)] + pub fn sw_disable(self) -> &'a mut W { + self.variant(DISABLE_A::SW_DISABLE) + } +} +impl R { + #[doc = "Bits 0:7 - Software disable APPROTECT mechanism"] + #[inline(always)] + pub fn disable(&self) -> DISABLE_R { + DISABLE_R::new((self.bits & 0xff) as u8) + } +} +impl W { + #[doc = "Bits 0:7 - Software disable APPROTECT mechanism"] + #[inline(always)] + #[must_use] + pub fn disable(&mut self) -> DISABLE_W<0> { + DISABLE_W::new(self) + } + #[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 = "Software disable APPROTECT mechanism\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 [disable](index.html) module"] +pub struct DISABLE_SPEC; +impl crate::RegisterSpec for DISABLE_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [disable::R](R) reader structure"] +impl crate::Readable for DISABLE_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [disable::W](W) writer structure"] +impl crate::Writable for DISABLE_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets DISABLE to value 0"] +impl crate::Resettable for DISABLE_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/approtect/forceprotect.rs b/down-the-stack/dk_pac/src/approtect/forceprotect.rs new file mode 100644 index 0000000..300abc0 --- /dev/null +++ b/down-the-stack/dk_pac/src/approtect/forceprotect.rs @@ -0,0 +1,116 @@ +#[doc = "Register `FORCEPROTECT` 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 `FORCEPROTECT` 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 `FORCEPROTECT` reader - Write 0x0 to force enable APPROTECT mechanism"] +pub type FORCEPROTECT_R = crate::FieldReader; +#[doc = "Write 0x0 to force enable APPROTECT mechanism\n\nValue on reset: 255"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +#[repr(u8)] +pub enum FORCEPROTECT_A { + #[doc = "0: Software force enable APPROTECT mechanism"] + FORCE = 0, +} +impl From for u8 { + #[inline(always)] + fn from(variant: FORCEPROTECT_A) -> Self { + variant as _ + } +} +impl FORCEPROTECT_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> Option { + match self.bits { + 0 => Some(FORCEPROTECT_A::FORCE), + _ => None, + } + } + #[doc = "Checks if the value of the field is `FORCE`"] + #[inline(always)] + pub fn is_force(&self) -> bool { + *self == FORCEPROTECT_A::FORCE + } +} +#[doc = "Field `FORCEPROTECT` writer - Write 0x0 to force enable APPROTECT mechanism"] +pub type FORCEPROTECT_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, FORCEPROTECT_SPEC, u8, FORCEPROTECT_A, 8, O>; +impl<'a, const O: u8> FORCEPROTECT_W<'a, O> { + #[doc = "Software force enable APPROTECT mechanism"] + #[inline(always)] + pub fn force(self) -> &'a mut W { + self.variant(FORCEPROTECT_A::FORCE) + } +} +impl R { + #[doc = "Bits 0:7 - Write 0x0 to force enable APPROTECT mechanism"] + #[inline(always)] + pub fn forceprotect(&self) -> FORCEPROTECT_R { + FORCEPROTECT_R::new((self.bits & 0xff) as u8) + } +} +impl W { + #[doc = "Bits 0:7 - Write 0x0 to force enable APPROTECT mechanism"] + #[inline(always)] + #[must_use] + pub fn forceprotect(&mut self) -> FORCEPROTECT_W<0> { + FORCEPROTECT_W::new(self) + } + #[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 = "Software force enable APPROTECT mechanism until next reset. This register can only be written once.\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 [forceprotect](index.html) module"] +pub struct FORCEPROTECT_SPEC; +impl crate::RegisterSpec for FORCEPROTECT_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [forceprotect::R](R) reader structure"] +impl crate::Readable for FORCEPROTECT_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [forceprotect::W](W) writer structure"] +impl crate::Writable for FORCEPROTECT_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets FORCEPROTECT to value 0xffff_ffff"] +impl crate::Resettable for FORCEPROTECT_SPEC { + const RESET_VALUE: Self::Ux = 0xffff_ffff; +} diff --git a/down-the-stack/dk_pac/src/bprot.rs b/down-the-stack/dk_pac/src/bprot.rs new file mode 100644 index 0000000..e9d8d35 --- /dev/null +++ b/down-the-stack/dk_pac/src/bprot.rs @@ -0,0 +1,36 @@ +#[doc = r"Register block"] +#[repr(C)] +pub struct RegisterBlock { + _reserved0: [u8; 0x0600], + #[doc = "0x600 - Block protect configuration register 0"] + pub config0: CONFIG0, + #[doc = "0x604 - Block protect configuration register 1"] + pub config1: CONFIG1, + #[doc = "0x608 - Disable protection mechanism in debug interface mode"] + pub disableindebug: DISABLEINDEBUG, + _reserved3: [u8; 0x04], + #[doc = "0x610 - Block protect configuration register 2"] + pub config2: CONFIG2, + #[doc = "0x614 - Block protect configuration register 3"] + pub config3: CONFIG3, +} +#[doc = "CONFIG0 (rw) register accessor: an alias for `Reg`"] +pub type CONFIG0 = crate::Reg; +#[doc = "Block protect configuration register 0"] +pub mod config0; +#[doc = "CONFIG1 (rw) register accessor: an alias for `Reg`"] +pub type CONFIG1 = crate::Reg; +#[doc = "Block protect configuration register 1"] +pub mod config1; +#[doc = "DISABLEINDEBUG (rw) register accessor: an alias for `Reg`"] +pub type DISABLEINDEBUG = crate::Reg; +#[doc = "Disable protection mechanism in debug interface mode"] +pub mod disableindebug; +#[doc = "CONFIG2 (rw) register accessor: an alias for `Reg`"] +pub type CONFIG2 = crate::Reg; +#[doc = "Block protect configuration register 2"] +pub mod config2; +#[doc = "CONFIG3 (rw) register accessor: an alias for `Reg`"] +pub type CONFIG3 = crate::Reg; +#[doc = "Block protect configuration register 3"] +pub mod config3; diff --git a/down-the-stack/dk_pac/src/bprot/config0.rs b/down-the-stack/dk_pac/src/bprot/config0.rs new file mode 100644 index 0000000..ed97056 --- /dev/null +++ b/down-the-stack/dk_pac/src/bprot/config0.rs @@ -0,0 +1,2017 @@ +#[doc = "Register `CONFIG0` 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 `CONFIG0` 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 `REGION0` reader - Enable protection for region 0. Write '0' has no effect."] +pub type REGION0_R = crate::BitReader; +#[doc = "Enable protection for region 0. Write '0' has no effect.\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum REGION0_A { + #[doc = "0: Protection disabled"] + DISABLED = 0, + #[doc = "1: Protection enable"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: REGION0_A) -> Self { + variant as u8 != 0 + } +} +impl REGION0_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> REGION0_A { + match self.bits { + false => REGION0_A::DISABLED, + true => REGION0_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == REGION0_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == REGION0_A::ENABLED + } +} +#[doc = "Field `REGION0` writer - Enable protection for region 0. Write '0' has no effect."] +pub type REGION0_W<'a, const O: u8> = crate::BitWriter<'a, u32, CONFIG0_SPEC, REGION0_A, O>; +impl<'a, const O: u8> REGION0_W<'a, O> { + #[doc = "Protection disabled"] + #[inline(always)] + pub fn disabled(self) -> &'a mut W { + self.variant(REGION0_A::DISABLED) + } + #[doc = "Protection enable"] + #[inline(always)] + pub fn enabled(self) -> &'a mut W { + self.variant(REGION0_A::ENABLED) + } +} +#[doc = "Field `REGION1` reader - Enable protection for region 1. Write '0' has no effect."] +pub type REGION1_R = crate::BitReader; +#[doc = "Enable protection for region 1. Write '0' has no effect.\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum REGION1_A { + #[doc = "0: Protection disabled"] + DISABLED = 0, + #[doc = "1: Protection enable"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: REGION1_A) -> Self { + variant as u8 != 0 + } +} +impl REGION1_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> REGION1_A { + match self.bits { + false => REGION1_A::DISABLED, + true => REGION1_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == REGION1_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == REGION1_A::ENABLED + } +} +#[doc = "Field `REGION1` writer - Enable protection for region 1. Write '0' has no effect."] +pub type REGION1_W<'a, const O: u8> = crate::BitWriter<'a, u32, CONFIG0_SPEC, REGION1_A, O>; +impl<'a, const O: u8> REGION1_W<'a, O> { + #[doc = "Protection disabled"] + #[inline(always)] + pub fn disabled(self) -> &'a mut W { + self.variant(REGION1_A::DISABLED) + } + #[doc = "Protection enable"] + #[inline(always)] + pub fn enabled(self) -> &'a mut W { + self.variant(REGION1_A::ENABLED) + } +} +#[doc = "Field `REGION2` reader - Enable protection for region 2. Write '0' has no effect."] +pub type REGION2_R = crate::BitReader; +#[doc = "Enable protection for region 2. Write '0' has no effect.\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum REGION2_A { + #[doc = "0: Protection disabled"] + DISABLED = 0, + #[doc = "1: Protection enable"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: REGION2_A) -> Self { + variant as u8 != 0 + } +} +impl REGION2_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> REGION2_A { + match self.bits { + false => REGION2_A::DISABLED, + true => REGION2_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == REGION2_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == REGION2_A::ENABLED + } +} +#[doc = "Field `REGION2` writer - Enable protection for region 2. Write '0' has no effect."] +pub type REGION2_W<'a, const O: u8> = crate::BitWriter<'a, u32, CONFIG0_SPEC, REGION2_A, O>; +impl<'a, const O: u8> REGION2_W<'a, O> { + #[doc = "Protection disabled"] + #[inline(always)] + pub fn disabled(self) -> &'a mut W { + self.variant(REGION2_A::DISABLED) + } + #[doc = "Protection enable"] + #[inline(always)] + pub fn enabled(self) -> &'a mut W { + self.variant(REGION2_A::ENABLED) + } +} +#[doc = "Field `REGION3` reader - Enable protection for region 3. Write '0' has no effect."] +pub type REGION3_R = crate::BitReader; +#[doc = "Enable protection for region 3. Write '0' has no effect.\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum REGION3_A { + #[doc = "0: Protection disabled"] + DISABLED = 0, + #[doc = "1: Protection enable"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: REGION3_A) -> Self { + variant as u8 != 0 + } +} +impl REGION3_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> REGION3_A { + match self.bits { + false => REGION3_A::DISABLED, + true => REGION3_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == REGION3_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == REGION3_A::ENABLED + } +} +#[doc = "Field `REGION3` writer - Enable protection for region 3. Write '0' has no effect."] +pub type REGION3_W<'a, const O: u8> = crate::BitWriter<'a, u32, CONFIG0_SPEC, REGION3_A, O>; +impl<'a, const O: u8> REGION3_W<'a, O> { + #[doc = "Protection disabled"] + #[inline(always)] + pub fn disabled(self) -> &'a mut W { + self.variant(REGION3_A::DISABLED) + } + #[doc = "Protection enable"] + #[inline(always)] + pub fn enabled(self) -> &'a mut W { + self.variant(REGION3_A::ENABLED) + } +} +#[doc = "Field `REGION4` reader - Enable protection for region 4. Write '0' has no effect."] +pub type REGION4_R = crate::BitReader; +#[doc = "Enable protection for region 4. Write '0' has no effect.\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum REGION4_A { + #[doc = "0: Protection disabled"] + DISABLED = 0, + #[doc = "1: Protection enable"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: REGION4_A) -> Self { + variant as u8 != 0 + } +} +impl REGION4_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> REGION4_A { + match self.bits { + false => REGION4_A::DISABLED, + true => REGION4_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == REGION4_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == REGION4_A::ENABLED + } +} +#[doc = "Field `REGION4` writer - Enable protection for region 4. Write '0' has no effect."] +pub type REGION4_W<'a, const O: u8> = crate::BitWriter<'a, u32, CONFIG0_SPEC, REGION4_A, O>; +impl<'a, const O: u8> REGION4_W<'a, O> { + #[doc = "Protection disabled"] + #[inline(always)] + pub fn disabled(self) -> &'a mut W { + self.variant(REGION4_A::DISABLED) + } + #[doc = "Protection enable"] + #[inline(always)] + pub fn enabled(self) -> &'a mut W { + self.variant(REGION4_A::ENABLED) + } +} +#[doc = "Field `REGION5` reader - Enable protection for region 5. Write '0' has no effect."] +pub type REGION5_R = crate::BitReader; +#[doc = "Enable protection for region 5. Write '0' has no effect.\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum REGION5_A { + #[doc = "0: Protection disabled"] + DISABLED = 0, + #[doc = "1: Protection enable"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: REGION5_A) -> Self { + variant as u8 != 0 + } +} +impl REGION5_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> REGION5_A { + match self.bits { + false => REGION5_A::DISABLED, + true => REGION5_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == REGION5_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == REGION5_A::ENABLED + } +} +#[doc = "Field `REGION5` writer - Enable protection for region 5. Write '0' has no effect."] +pub type REGION5_W<'a, const O: u8> = crate::BitWriter<'a, u32, CONFIG0_SPEC, REGION5_A, O>; +impl<'a, const O: u8> REGION5_W<'a, O> { + #[doc = "Protection disabled"] + #[inline(always)] + pub fn disabled(self) -> &'a mut W { + self.variant(REGION5_A::DISABLED) + } + #[doc = "Protection enable"] + #[inline(always)] + pub fn enabled(self) -> &'a mut W { + self.variant(REGION5_A::ENABLED) + } +} +#[doc = "Field `REGION6` reader - Enable protection for region 6. Write '0' has no effect."] +pub type REGION6_R = crate::BitReader; +#[doc = "Enable protection for region 6. Write '0' has no effect.\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum REGION6_A { + #[doc = "0: Protection disabled"] + DISABLED = 0, + #[doc = "1: Protection enable"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: REGION6_A) -> Self { + variant as u8 != 0 + } +} +impl REGION6_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> REGION6_A { + match self.bits { + false => REGION6_A::DISABLED, + true => REGION6_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == REGION6_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == REGION6_A::ENABLED + } +} +#[doc = "Field `REGION6` writer - Enable protection for region 6. Write '0' has no effect."] +pub type REGION6_W<'a, const O: u8> = crate::BitWriter<'a, u32, CONFIG0_SPEC, REGION6_A, O>; +impl<'a, const O: u8> REGION6_W<'a, O> { + #[doc = "Protection disabled"] + #[inline(always)] + pub fn disabled(self) -> &'a mut W { + self.variant(REGION6_A::DISABLED) + } + #[doc = "Protection enable"] + #[inline(always)] + pub fn enabled(self) -> &'a mut W { + self.variant(REGION6_A::ENABLED) + } +} +#[doc = "Field `REGION7` reader - Enable protection for region 7. Write '0' has no effect."] +pub type REGION7_R = crate::BitReader; +#[doc = "Enable protection for region 7. Write '0' has no effect.\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum REGION7_A { + #[doc = "0: Protection disabled"] + DISABLED = 0, + #[doc = "1: Protection enable"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: REGION7_A) -> Self { + variant as u8 != 0 + } +} +impl REGION7_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> REGION7_A { + match self.bits { + false => REGION7_A::DISABLED, + true => REGION7_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == REGION7_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == REGION7_A::ENABLED + } +} +#[doc = "Field `REGION7` writer - Enable protection for region 7. Write '0' has no effect."] +pub type REGION7_W<'a, const O: u8> = crate::BitWriter<'a, u32, CONFIG0_SPEC, REGION7_A, O>; +impl<'a, const O: u8> REGION7_W<'a, O> { + #[doc = "Protection disabled"] + #[inline(always)] + pub fn disabled(self) -> &'a mut W { + self.variant(REGION7_A::DISABLED) + } + #[doc = "Protection enable"] + #[inline(always)] + pub fn enabled(self) -> &'a mut W { + self.variant(REGION7_A::ENABLED) + } +} +#[doc = "Field `REGION8` reader - Enable protection for region 8. Write '0' has no effect."] +pub type REGION8_R = crate::BitReader; +#[doc = "Enable protection for region 8. Write '0' has no effect.\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum REGION8_A { + #[doc = "0: Protection disabled"] + DISABLED = 0, + #[doc = "1: Protection enable"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: REGION8_A) -> Self { + variant as u8 != 0 + } +} +impl REGION8_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> REGION8_A { + match self.bits { + false => REGION8_A::DISABLED, + true => REGION8_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == REGION8_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == REGION8_A::ENABLED + } +} +#[doc = "Field `REGION8` writer - Enable protection for region 8. Write '0' has no effect."] +pub type REGION8_W<'a, const O: u8> = crate::BitWriter<'a, u32, CONFIG0_SPEC, REGION8_A, O>; +impl<'a, const O: u8> REGION8_W<'a, O> { + #[doc = "Protection disabled"] + #[inline(always)] + pub fn disabled(self) -> &'a mut W { + self.variant(REGION8_A::DISABLED) + } + #[doc = "Protection enable"] + #[inline(always)] + pub fn enabled(self) -> &'a mut W { + self.variant(REGION8_A::ENABLED) + } +} +#[doc = "Field `REGION9` reader - Enable protection for region 9. Write '0' has no effect."] +pub type REGION9_R = crate::BitReader; +#[doc = "Enable protection for region 9. Write '0' has no effect.\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum REGION9_A { + #[doc = "0: Protection disabled"] + DISABLED = 0, + #[doc = "1: Protection enable"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: REGION9_A) -> Self { + variant as u8 != 0 + } +} +impl REGION9_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> REGION9_A { + match self.bits { + false => REGION9_A::DISABLED, + true => REGION9_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == REGION9_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == REGION9_A::ENABLED + } +} +#[doc = "Field `REGION9` writer - Enable protection for region 9. Write '0' has no effect."] +pub type REGION9_W<'a, const O: u8> = crate::BitWriter<'a, u32, CONFIG0_SPEC, REGION9_A, O>; +impl<'a, const O: u8> REGION9_W<'a, O> { + #[doc = "Protection disabled"] + #[inline(always)] + pub fn disabled(self) -> &'a mut W { + self.variant(REGION9_A::DISABLED) + } + #[doc = "Protection enable"] + #[inline(always)] + pub fn enabled(self) -> &'a mut W { + self.variant(REGION9_A::ENABLED) + } +} +#[doc = "Field `REGION10` reader - Enable protection for region 10. Write '0' has no effect."] +pub type REGION10_R = crate::BitReader; +#[doc = "Enable protection for region 10. Write '0' has no effect.\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum REGION10_A { + #[doc = "0: Protection disabled"] + DISABLED = 0, + #[doc = "1: Protection enable"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: REGION10_A) -> Self { + variant as u8 != 0 + } +} +impl REGION10_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> REGION10_A { + match self.bits { + false => REGION10_A::DISABLED, + true => REGION10_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == REGION10_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == REGION10_A::ENABLED + } +} +#[doc = "Field `REGION10` writer - Enable protection for region 10. Write '0' has no effect."] +pub type REGION10_W<'a, const O: u8> = crate::BitWriter<'a, u32, CONFIG0_SPEC, REGION10_A, O>; +impl<'a, const O: u8> REGION10_W<'a, O> { + #[doc = "Protection disabled"] + #[inline(always)] + pub fn disabled(self) -> &'a mut W { + self.variant(REGION10_A::DISABLED) + } + #[doc = "Protection enable"] + #[inline(always)] + pub fn enabled(self) -> &'a mut W { + self.variant(REGION10_A::ENABLED) + } +} +#[doc = "Field `REGION11` reader - Enable protection for region 11. Write '0' has no effect."] +pub type REGION11_R = crate::BitReader; +#[doc = "Enable protection for region 11. Write '0' has no effect.\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum REGION11_A { + #[doc = "0: Protection disabled"] + DISABLED = 0, + #[doc = "1: Protection enable"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: REGION11_A) -> Self { + variant as u8 != 0 + } +} +impl REGION11_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> REGION11_A { + match self.bits { + false => REGION11_A::DISABLED, + true => REGION11_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == REGION11_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == REGION11_A::ENABLED + } +} +#[doc = "Field `REGION11` writer - Enable protection for region 11. Write '0' has no effect."] +pub type REGION11_W<'a, const O: u8> = crate::BitWriter<'a, u32, CONFIG0_SPEC, REGION11_A, O>; +impl<'a, const O: u8> REGION11_W<'a, O> { + #[doc = "Protection disabled"] + #[inline(always)] + pub fn disabled(self) -> &'a mut W { + self.variant(REGION11_A::DISABLED) + } + #[doc = "Protection enable"] + #[inline(always)] + pub fn enabled(self) -> &'a mut W { + self.variant(REGION11_A::ENABLED) + } +} +#[doc = "Field `REGION12` reader - Enable protection for region 12. Write '0' has no effect."] +pub type REGION12_R = crate::BitReader; +#[doc = "Enable protection for region 12. Write '0' has no effect.\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum REGION12_A { + #[doc = "0: Protection disabled"] + DISABLED = 0, + #[doc = "1: Protection enable"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: REGION12_A) -> Self { + variant as u8 != 0 + } +} +impl REGION12_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> REGION12_A { + match self.bits { + false => REGION12_A::DISABLED, + true => REGION12_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == REGION12_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == REGION12_A::ENABLED + } +} +#[doc = "Field `REGION12` writer - Enable protection for region 12. Write '0' has no effect."] +pub type REGION12_W<'a, const O: u8> = crate::BitWriter<'a, u32, CONFIG0_SPEC, REGION12_A, O>; +impl<'a, const O: u8> REGION12_W<'a, O> { + #[doc = "Protection disabled"] + #[inline(always)] + pub fn disabled(self) -> &'a mut W { + self.variant(REGION12_A::DISABLED) + } + #[doc = "Protection enable"] + #[inline(always)] + pub fn enabled(self) -> &'a mut W { + self.variant(REGION12_A::ENABLED) + } +} +#[doc = "Field `REGION13` reader - Enable protection for region 13. Write '0' has no effect."] +pub type REGION13_R = crate::BitReader; +#[doc = "Enable protection for region 13. Write '0' has no effect.\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum REGION13_A { + #[doc = "0: Protection disabled"] + DISABLED = 0, + #[doc = "1: Protection enable"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: REGION13_A) -> Self { + variant as u8 != 0 + } +} +impl REGION13_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> REGION13_A { + match self.bits { + false => REGION13_A::DISABLED, + true => REGION13_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == REGION13_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == REGION13_A::ENABLED + } +} +#[doc = "Field `REGION13` writer - Enable protection for region 13. Write '0' has no effect."] +pub type REGION13_W<'a, const O: u8> = crate::BitWriter<'a, u32, CONFIG0_SPEC, REGION13_A, O>; +impl<'a, const O: u8> REGION13_W<'a, O> { + #[doc = "Protection disabled"] + #[inline(always)] + pub fn disabled(self) -> &'a mut W { + self.variant(REGION13_A::DISABLED) + } + #[doc = "Protection enable"] + #[inline(always)] + pub fn enabled(self) -> &'a mut W { + self.variant(REGION13_A::ENABLED) + } +} +#[doc = "Field `REGION14` reader - Enable protection for region 14. Write '0' has no effect."] +pub type REGION14_R = crate::BitReader; +#[doc = "Enable protection for region 14. Write '0' has no effect.\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum REGION14_A { + #[doc = "0: Protection disabled"] + DISABLED = 0, + #[doc = "1: Protection enable"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: REGION14_A) -> Self { + variant as u8 != 0 + } +} +impl REGION14_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> REGION14_A { + match self.bits { + false => REGION14_A::DISABLED, + true => REGION14_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == REGION14_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == REGION14_A::ENABLED + } +} +#[doc = "Field `REGION14` writer - Enable protection for region 14. Write '0' has no effect."] +pub type REGION14_W<'a, const O: u8> = crate::BitWriter<'a, u32, CONFIG0_SPEC, REGION14_A, O>; +impl<'a, const O: u8> REGION14_W<'a, O> { + #[doc = "Protection disabled"] + #[inline(always)] + pub fn disabled(self) -> &'a mut W { + self.variant(REGION14_A::DISABLED) + } + #[doc = "Protection enable"] + #[inline(always)] + pub fn enabled(self) -> &'a mut W { + self.variant(REGION14_A::ENABLED) + } +} +#[doc = "Field `REGION15` reader - Enable protection for region 15. Write '0' has no effect."] +pub type REGION15_R = crate::BitReader; +#[doc = "Enable protection for region 15. Write '0' has no effect.\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum REGION15_A { + #[doc = "0: Protection disabled"] + DISABLED = 0, + #[doc = "1: Protection enable"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: REGION15_A) -> Self { + variant as u8 != 0 + } +} +impl REGION15_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> REGION15_A { + match self.bits { + false => REGION15_A::DISABLED, + true => REGION15_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == REGION15_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == REGION15_A::ENABLED + } +} +#[doc = "Field `REGION15` writer - Enable protection for region 15. Write '0' has no effect."] +pub type REGION15_W<'a, const O: u8> = crate::BitWriter<'a, u32, CONFIG0_SPEC, REGION15_A, O>; +impl<'a, const O: u8> REGION15_W<'a, O> { + #[doc = "Protection disabled"] + #[inline(always)] + pub fn disabled(self) -> &'a mut W { + self.variant(REGION15_A::DISABLED) + } + #[doc = "Protection enable"] + #[inline(always)] + pub fn enabled(self) -> &'a mut W { + self.variant(REGION15_A::ENABLED) + } +} +#[doc = "Field `REGION16` reader - Enable protection for region 16. Write '0' has no effect."] +pub type REGION16_R = crate::BitReader; +#[doc = "Enable protection for region 16. Write '0' has no effect.\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum REGION16_A { + #[doc = "0: Protection disabled"] + DISABLED = 0, + #[doc = "1: Protection enable"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: REGION16_A) -> Self { + variant as u8 != 0 + } +} +impl REGION16_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> REGION16_A { + match self.bits { + false => REGION16_A::DISABLED, + true => REGION16_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == REGION16_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == REGION16_A::ENABLED + } +} +#[doc = "Field `REGION16` writer - Enable protection for region 16. Write '0' has no effect."] +pub type REGION16_W<'a, const O: u8> = crate::BitWriter<'a, u32, CONFIG0_SPEC, REGION16_A, O>; +impl<'a, const O: u8> REGION16_W<'a, O> { + #[doc = "Protection disabled"] + #[inline(always)] + pub fn disabled(self) -> &'a mut W { + self.variant(REGION16_A::DISABLED) + } + #[doc = "Protection enable"] + #[inline(always)] + pub fn enabled(self) -> &'a mut W { + self.variant(REGION16_A::ENABLED) + } +} +#[doc = "Field `REGION17` reader - Enable protection for region 17. Write '0' has no effect."] +pub type REGION17_R = crate::BitReader; +#[doc = "Enable protection for region 17. Write '0' has no effect.\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum REGION17_A { + #[doc = "0: Protection disabled"] + DISABLED = 0, + #[doc = "1: Protection enable"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: REGION17_A) -> Self { + variant as u8 != 0 + } +} +impl REGION17_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> REGION17_A { + match self.bits { + false => REGION17_A::DISABLED, + true => REGION17_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == REGION17_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == REGION17_A::ENABLED + } +} +#[doc = "Field `REGION17` writer - Enable protection for region 17. Write '0' has no effect."] +pub type REGION17_W<'a, const O: u8> = crate::BitWriter<'a, u32, CONFIG0_SPEC, REGION17_A, O>; +impl<'a, const O: u8> REGION17_W<'a, O> { + #[doc = "Protection disabled"] + #[inline(always)] + pub fn disabled(self) -> &'a mut W { + self.variant(REGION17_A::DISABLED) + } + #[doc = "Protection enable"] + #[inline(always)] + pub fn enabled(self) -> &'a mut W { + self.variant(REGION17_A::ENABLED) + } +} +#[doc = "Field `REGION18` reader - Enable protection for region 18. Write '0' has no effect."] +pub type REGION18_R = crate::BitReader; +#[doc = "Enable protection for region 18. Write '0' has no effect.\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum REGION18_A { + #[doc = "0: Protection disabled"] + DISABLED = 0, + #[doc = "1: Protection enable"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: REGION18_A) -> Self { + variant as u8 != 0 + } +} +impl REGION18_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> REGION18_A { + match self.bits { + false => REGION18_A::DISABLED, + true => REGION18_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == REGION18_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == REGION18_A::ENABLED + } +} +#[doc = "Field `REGION18` writer - Enable protection for region 18. Write '0' has no effect."] +pub type REGION18_W<'a, const O: u8> = crate::BitWriter<'a, u32, CONFIG0_SPEC, REGION18_A, O>; +impl<'a, const O: u8> REGION18_W<'a, O> { + #[doc = "Protection disabled"] + #[inline(always)] + pub fn disabled(self) -> &'a mut W { + self.variant(REGION18_A::DISABLED) + } + #[doc = "Protection enable"] + #[inline(always)] + pub fn enabled(self) -> &'a mut W { + self.variant(REGION18_A::ENABLED) + } +} +#[doc = "Field `REGION19` reader - Enable protection for region 19. Write '0' has no effect."] +pub type REGION19_R = crate::BitReader; +#[doc = "Enable protection for region 19. Write '0' has no effect.\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum REGION19_A { + #[doc = "0: Protection disabled"] + DISABLED = 0, + #[doc = "1: Protection enable"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: REGION19_A) -> Self { + variant as u8 != 0 + } +} +impl REGION19_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> REGION19_A { + match self.bits { + false => REGION19_A::DISABLED, + true => REGION19_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == REGION19_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == REGION19_A::ENABLED + } +} +#[doc = "Field `REGION19` writer - Enable protection for region 19. Write '0' has no effect."] +pub type REGION19_W<'a, const O: u8> = crate::BitWriter<'a, u32, CONFIG0_SPEC, REGION19_A, O>; +impl<'a, const O: u8> REGION19_W<'a, O> { + #[doc = "Protection disabled"] + #[inline(always)] + pub fn disabled(self) -> &'a mut W { + self.variant(REGION19_A::DISABLED) + } + #[doc = "Protection enable"] + #[inline(always)] + pub fn enabled(self) -> &'a mut W { + self.variant(REGION19_A::ENABLED) + } +} +#[doc = "Field `REGION20` reader - Enable protection for region 20. Write '0' has no effect."] +pub type REGION20_R = crate::BitReader; +#[doc = "Enable protection for region 20. Write '0' has no effect.\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum REGION20_A { + #[doc = "0: Protection disabled"] + DISABLED = 0, + #[doc = "1: Protection enable"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: REGION20_A) -> Self { + variant as u8 != 0 + } +} +impl REGION20_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> REGION20_A { + match self.bits { + false => REGION20_A::DISABLED, + true => REGION20_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == REGION20_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == REGION20_A::ENABLED + } +} +#[doc = "Field `REGION20` writer - Enable protection for region 20. Write '0' has no effect."] +pub type REGION20_W<'a, const O: u8> = crate::BitWriter<'a, u32, CONFIG0_SPEC, REGION20_A, O>; +impl<'a, const O: u8> REGION20_W<'a, O> { + #[doc = "Protection disabled"] + #[inline(always)] + pub fn disabled(self) -> &'a mut W { + self.variant(REGION20_A::DISABLED) + } + #[doc = "Protection enable"] + #[inline(always)] + pub fn enabled(self) -> &'a mut W { + self.variant(REGION20_A::ENABLED) + } +} +#[doc = "Field `REGION21` reader - Enable protection for region 21. Write '0' has no effect."] +pub type REGION21_R = crate::BitReader; +#[doc = "Enable protection for region 21. Write '0' has no effect.\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum REGION21_A { + #[doc = "0: Protection disabled"] + DISABLED = 0, + #[doc = "1: Protection enable"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: REGION21_A) -> Self { + variant as u8 != 0 + } +} +impl REGION21_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> REGION21_A { + match self.bits { + false => REGION21_A::DISABLED, + true => REGION21_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == REGION21_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == REGION21_A::ENABLED + } +} +#[doc = "Field `REGION21` writer - Enable protection for region 21. Write '0' has no effect."] +pub type REGION21_W<'a, const O: u8> = crate::BitWriter<'a, u32, CONFIG0_SPEC, REGION21_A, O>; +impl<'a, const O: u8> REGION21_W<'a, O> { + #[doc = "Protection disabled"] + #[inline(always)] + pub fn disabled(self) -> &'a mut W { + self.variant(REGION21_A::DISABLED) + } + #[doc = "Protection enable"] + #[inline(always)] + pub fn enabled(self) -> &'a mut W { + self.variant(REGION21_A::ENABLED) + } +} +#[doc = "Field `REGION22` reader - Enable protection for region 22. Write '0' has no effect."] +pub type REGION22_R = crate::BitReader; +#[doc = "Enable protection for region 22. Write '0' has no effect.\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum REGION22_A { + #[doc = "0: Protection disabled"] + DISABLED = 0, + #[doc = "1: Protection enable"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: REGION22_A) -> Self { + variant as u8 != 0 + } +} +impl REGION22_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> REGION22_A { + match self.bits { + false => REGION22_A::DISABLED, + true => REGION22_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == REGION22_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == REGION22_A::ENABLED + } +} +#[doc = "Field `REGION22` writer - Enable protection for region 22. Write '0' has no effect."] +pub type REGION22_W<'a, const O: u8> = crate::BitWriter<'a, u32, CONFIG0_SPEC, REGION22_A, O>; +impl<'a, const O: u8> REGION22_W<'a, O> { + #[doc = "Protection disabled"] + #[inline(always)] + pub fn disabled(self) -> &'a mut W { + self.variant(REGION22_A::DISABLED) + } + #[doc = "Protection enable"] + #[inline(always)] + pub fn enabled(self) -> &'a mut W { + self.variant(REGION22_A::ENABLED) + } +} +#[doc = "Field `REGION23` reader - Enable protection for region 23. Write '0' has no effect."] +pub type REGION23_R = crate::BitReader; +#[doc = "Enable protection for region 23. Write '0' has no effect.\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum REGION23_A { + #[doc = "0: Protection disabled"] + DISABLED = 0, + #[doc = "1: Protection enable"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: REGION23_A) -> Self { + variant as u8 != 0 + } +} +impl REGION23_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> REGION23_A { + match self.bits { + false => REGION23_A::DISABLED, + true => REGION23_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == REGION23_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == REGION23_A::ENABLED + } +} +#[doc = "Field `REGION23` writer - Enable protection for region 23. Write '0' has no effect."] +pub type REGION23_W<'a, const O: u8> = crate::BitWriter<'a, u32, CONFIG0_SPEC, REGION23_A, O>; +impl<'a, const O: u8> REGION23_W<'a, O> { + #[doc = "Protection disabled"] + #[inline(always)] + pub fn disabled(self) -> &'a mut W { + self.variant(REGION23_A::DISABLED) + } + #[doc = "Protection enable"] + #[inline(always)] + pub fn enabled(self) -> &'a mut W { + self.variant(REGION23_A::ENABLED) + } +} +#[doc = "Field `REGION24` reader - Enable protection for region 24. Write '0' has no effect."] +pub type REGION24_R = crate::BitReader; +#[doc = "Enable protection for region 24. Write '0' has no effect.\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum REGION24_A { + #[doc = "0: Protection disabled"] + DISABLED = 0, + #[doc = "1: Protection enable"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: REGION24_A) -> Self { + variant as u8 != 0 + } +} +impl REGION24_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> REGION24_A { + match self.bits { + false => REGION24_A::DISABLED, + true => REGION24_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == REGION24_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == REGION24_A::ENABLED + } +} +#[doc = "Field `REGION24` writer - Enable protection for region 24. Write '0' has no effect."] +pub type REGION24_W<'a, const O: u8> = crate::BitWriter<'a, u32, CONFIG0_SPEC, REGION24_A, O>; +impl<'a, const O: u8> REGION24_W<'a, O> { + #[doc = "Protection disabled"] + #[inline(always)] + pub fn disabled(self) -> &'a mut W { + self.variant(REGION24_A::DISABLED) + } + #[doc = "Protection enable"] + #[inline(always)] + pub fn enabled(self) -> &'a mut W { + self.variant(REGION24_A::ENABLED) + } +} +#[doc = "Field `REGION25` reader - Enable protection for region 25. Write '0' has no effect."] +pub type REGION25_R = crate::BitReader; +#[doc = "Enable protection for region 25. Write '0' has no effect.\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum REGION25_A { + #[doc = "0: Protection disabled"] + DISABLED = 0, + #[doc = "1: Protection enable"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: REGION25_A) -> Self { + variant as u8 != 0 + } +} +impl REGION25_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> REGION25_A { + match self.bits { + false => REGION25_A::DISABLED, + true => REGION25_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == REGION25_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == REGION25_A::ENABLED + } +} +#[doc = "Field `REGION25` writer - Enable protection for region 25. Write '0' has no effect."] +pub type REGION25_W<'a, const O: u8> = crate::BitWriter<'a, u32, CONFIG0_SPEC, REGION25_A, O>; +impl<'a, const O: u8> REGION25_W<'a, O> { + #[doc = "Protection disabled"] + #[inline(always)] + pub fn disabled(self) -> &'a mut W { + self.variant(REGION25_A::DISABLED) + } + #[doc = "Protection enable"] + #[inline(always)] + pub fn enabled(self) -> &'a mut W { + self.variant(REGION25_A::ENABLED) + } +} +#[doc = "Field `REGION26` reader - Enable protection for region 26. Write '0' has no effect."] +pub type REGION26_R = crate::BitReader; +#[doc = "Enable protection for region 26. Write '0' has no effect.\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum REGION26_A { + #[doc = "0: Protection disabled"] + DISABLED = 0, + #[doc = "1: Protection enable"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: REGION26_A) -> Self { + variant as u8 != 0 + } +} +impl REGION26_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> REGION26_A { + match self.bits { + false => REGION26_A::DISABLED, + true => REGION26_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == REGION26_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == REGION26_A::ENABLED + } +} +#[doc = "Field `REGION26` writer - Enable protection for region 26. Write '0' has no effect."] +pub type REGION26_W<'a, const O: u8> = crate::BitWriter<'a, u32, CONFIG0_SPEC, REGION26_A, O>; +impl<'a, const O: u8> REGION26_W<'a, O> { + #[doc = "Protection disabled"] + #[inline(always)] + pub fn disabled(self) -> &'a mut W { + self.variant(REGION26_A::DISABLED) + } + #[doc = "Protection enable"] + #[inline(always)] + pub fn enabled(self) -> &'a mut W { + self.variant(REGION26_A::ENABLED) + } +} +#[doc = "Field `REGION27` reader - Enable protection for region 27. Write '0' has no effect."] +pub type REGION27_R = crate::BitReader; +#[doc = "Enable protection for region 27. Write '0' has no effect.\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum REGION27_A { + #[doc = "0: Protection disabled"] + DISABLED = 0, + #[doc = "1: Protection enable"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: REGION27_A) -> Self { + variant as u8 != 0 + } +} +impl REGION27_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> REGION27_A { + match self.bits { + false => REGION27_A::DISABLED, + true => REGION27_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == REGION27_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == REGION27_A::ENABLED + } +} +#[doc = "Field `REGION27` writer - Enable protection for region 27. Write '0' has no effect."] +pub type REGION27_W<'a, const O: u8> = crate::BitWriter<'a, u32, CONFIG0_SPEC, REGION27_A, O>; +impl<'a, const O: u8> REGION27_W<'a, O> { + #[doc = "Protection disabled"] + #[inline(always)] + pub fn disabled(self) -> &'a mut W { + self.variant(REGION27_A::DISABLED) + } + #[doc = "Protection enable"] + #[inline(always)] + pub fn enabled(self) -> &'a mut W { + self.variant(REGION27_A::ENABLED) + } +} +#[doc = "Field `REGION28` reader - Enable protection for region 28. Write '0' has no effect."] +pub type REGION28_R = crate::BitReader; +#[doc = "Enable protection for region 28. Write '0' has no effect.\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum REGION28_A { + #[doc = "0: Protection disabled"] + DISABLED = 0, + #[doc = "1: Protection enable"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: REGION28_A) -> Self { + variant as u8 != 0 + } +} +impl REGION28_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> REGION28_A { + match self.bits { + false => REGION28_A::DISABLED, + true => REGION28_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == REGION28_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == REGION28_A::ENABLED + } +} +#[doc = "Field `REGION28` writer - Enable protection for region 28. Write '0' has no effect."] +pub type REGION28_W<'a, const O: u8> = crate::BitWriter<'a, u32, CONFIG0_SPEC, REGION28_A, O>; +impl<'a, const O: u8> REGION28_W<'a, O> { + #[doc = "Protection disabled"] + #[inline(always)] + pub fn disabled(self) -> &'a mut W { + self.variant(REGION28_A::DISABLED) + } + #[doc = "Protection enable"] + #[inline(always)] + pub fn enabled(self) -> &'a mut W { + self.variant(REGION28_A::ENABLED) + } +} +#[doc = "Field `REGION29` reader - Enable protection for region 29. Write '0' has no effect."] +pub type REGION29_R = crate::BitReader; +#[doc = "Enable protection for region 29. Write '0' has no effect.\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum REGION29_A { + #[doc = "0: Protection disabled"] + DISABLED = 0, + #[doc = "1: Protection enable"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: REGION29_A) -> Self { + variant as u8 != 0 + } +} +impl REGION29_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> REGION29_A { + match self.bits { + false => REGION29_A::DISABLED, + true => REGION29_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == REGION29_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == REGION29_A::ENABLED + } +} +#[doc = "Field `REGION29` writer - Enable protection for region 29. Write '0' has no effect."] +pub type REGION29_W<'a, const O: u8> = crate::BitWriter<'a, u32, CONFIG0_SPEC, REGION29_A, O>; +impl<'a, const O: u8> REGION29_W<'a, O> { + #[doc = "Protection disabled"] + #[inline(always)] + pub fn disabled(self) -> &'a mut W { + self.variant(REGION29_A::DISABLED) + } + #[doc = "Protection enable"] + #[inline(always)] + pub fn enabled(self) -> &'a mut W { + self.variant(REGION29_A::ENABLED) + } +} +#[doc = "Field `REGION30` reader - Enable protection for region 30. Write '0' has no effect."] +pub type REGION30_R = crate::BitReader; +#[doc = "Enable protection for region 30. Write '0' has no effect.\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum REGION30_A { + #[doc = "0: Protection disabled"] + DISABLED = 0, + #[doc = "1: Protection enable"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: REGION30_A) -> Self { + variant as u8 != 0 + } +} +impl REGION30_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> REGION30_A { + match self.bits { + false => REGION30_A::DISABLED, + true => REGION30_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == REGION30_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == REGION30_A::ENABLED + } +} +#[doc = "Field `REGION30` writer - Enable protection for region 30. Write '0' has no effect."] +pub type REGION30_W<'a, const O: u8> = crate::BitWriter<'a, u32, CONFIG0_SPEC, REGION30_A, O>; +impl<'a, const O: u8> REGION30_W<'a, O> { + #[doc = "Protection disabled"] + #[inline(always)] + pub fn disabled(self) -> &'a mut W { + self.variant(REGION30_A::DISABLED) + } + #[doc = "Protection enable"] + #[inline(always)] + pub fn enabled(self) -> &'a mut W { + self.variant(REGION30_A::ENABLED) + } +} +#[doc = "Field `REGION31` reader - Enable protection for region 31. Write '0' has no effect."] +pub type REGION31_R = crate::BitReader; +#[doc = "Enable protection for region 31. Write '0' has no effect.\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum REGION31_A { + #[doc = "0: Protection disabled"] + DISABLED = 0, + #[doc = "1: Protection enable"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: REGION31_A) -> Self { + variant as u8 != 0 + } +} +impl REGION31_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> REGION31_A { + match self.bits { + false => REGION31_A::DISABLED, + true => REGION31_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == REGION31_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == REGION31_A::ENABLED + } +} +#[doc = "Field `REGION31` writer - Enable protection for region 31. Write '0' has no effect."] +pub type REGION31_W<'a, const O: u8> = crate::BitWriter<'a, u32, CONFIG0_SPEC, REGION31_A, O>; +impl<'a, const O: u8> REGION31_W<'a, O> { + #[doc = "Protection disabled"] + #[inline(always)] + pub fn disabled(self) -> &'a mut W { + self.variant(REGION31_A::DISABLED) + } + #[doc = "Protection enable"] + #[inline(always)] + pub fn enabled(self) -> &'a mut W { + self.variant(REGION31_A::ENABLED) + } +} +impl R { + #[doc = "Bit 0 - Enable protection for region 0. Write '0' has no effect."] + #[inline(always)] + pub fn region0(&self) -> REGION0_R { + REGION0_R::new((self.bits & 1) != 0) + } + #[doc = "Bit 1 - Enable protection for region 1. Write '0' has no effect."] + #[inline(always)] + pub fn region1(&self) -> REGION1_R { + REGION1_R::new(((self.bits >> 1) & 1) != 0) + } + #[doc = "Bit 2 - Enable protection for region 2. Write '0' has no effect."] + #[inline(always)] + pub fn region2(&self) -> REGION2_R { + REGION2_R::new(((self.bits >> 2) & 1) != 0) + } + #[doc = "Bit 3 - Enable protection for region 3. Write '0' has no effect."] + #[inline(always)] + pub fn region3(&self) -> REGION3_R { + REGION3_R::new(((self.bits >> 3) & 1) != 0) + } + #[doc = "Bit 4 - Enable protection for region 4. Write '0' has no effect."] + #[inline(always)] + pub fn region4(&self) -> REGION4_R { + REGION4_R::new(((self.bits >> 4) & 1) != 0) + } + #[doc = "Bit 5 - Enable protection for region 5. Write '0' has no effect."] + #[inline(always)] + pub fn region5(&self) -> REGION5_R { + REGION5_R::new(((self.bits >> 5) & 1) != 0) + } + #[doc = "Bit 6 - Enable protection for region 6. Write '0' has no effect."] + #[inline(always)] + pub fn region6(&self) -> REGION6_R { + REGION6_R::new(((self.bits >> 6) & 1) != 0) + } + #[doc = "Bit 7 - Enable protection for region 7. Write '0' has no effect."] + #[inline(always)] + pub fn region7(&self) -> REGION7_R { + REGION7_R::new(((self.bits >> 7) & 1) != 0) + } + #[doc = "Bit 8 - Enable protection for region 8. Write '0' has no effect."] + #[inline(always)] + pub fn region8(&self) -> REGION8_R { + REGION8_R::new(((self.bits >> 8) & 1) != 0) + } + #[doc = "Bit 9 - Enable protection for region 9. Write '0' has no effect."] + #[inline(always)] + pub fn region9(&self) -> REGION9_R { + REGION9_R::new(((self.bits >> 9) & 1) != 0) + } + #[doc = "Bit 10 - Enable protection for region 10. Write '0' has no effect."] + #[inline(always)] + pub fn region10(&self) -> REGION10_R { + REGION10_R::new(((self.bits >> 10) & 1) != 0) + } + #[doc = "Bit 11 - Enable protection for region 11. Write '0' has no effect."] + #[inline(always)] + pub fn region11(&self) -> REGION11_R { + REGION11_R::new(((self.bits >> 11) & 1) != 0) + } + #[doc = "Bit 12 - Enable protection for region 12. Write '0' has no effect."] + #[inline(always)] + pub fn region12(&self) -> REGION12_R { + REGION12_R::new(((self.bits >> 12) & 1) != 0) + } + #[doc = "Bit 13 - Enable protection for region 13. Write '0' has no effect."] + #[inline(always)] + pub fn region13(&self) -> REGION13_R { + REGION13_R::new(((self.bits >> 13) & 1) != 0) + } + #[doc = "Bit 14 - Enable protection for region 14. Write '0' has no effect."] + #[inline(always)] + pub fn region14(&self) -> REGION14_R { + REGION14_R::new(((self.bits >> 14) & 1) != 0) + } + #[doc = "Bit 15 - Enable protection for region 15. Write '0' has no effect."] + #[inline(always)] + pub fn region15(&self) -> REGION15_R { + REGION15_R::new(((self.bits >> 15) & 1) != 0) + } + #[doc = "Bit 16 - Enable protection for region 16. Write '0' has no effect."] + #[inline(always)] + pub fn region16(&self) -> REGION16_R { + REGION16_R::new(((self.bits >> 16) & 1) != 0) + } + #[doc = "Bit 17 - Enable protection for region 17. Write '0' has no effect."] + #[inline(always)] + pub fn region17(&self) -> REGION17_R { + REGION17_R::new(((self.bits >> 17) & 1) != 0) + } + #[doc = "Bit 18 - Enable protection for region 18. Write '0' has no effect."] + #[inline(always)] + pub fn region18(&self) -> REGION18_R { + REGION18_R::new(((self.bits >> 18) & 1) != 0) + } + #[doc = "Bit 19 - Enable protection for region 19. Write '0' has no effect."] + #[inline(always)] + pub fn region19(&self) -> REGION19_R { + REGION19_R::new(((self.bits >> 19) & 1) != 0) + } + #[doc = "Bit 20 - Enable protection for region 20. Write '0' has no effect."] + #[inline(always)] + pub fn region20(&self) -> REGION20_R { + REGION20_R::new(((self.bits >> 20) & 1) != 0) + } + #[doc = "Bit 21 - Enable protection for region 21. Write '0' has no effect."] + #[inline(always)] + pub fn region21(&self) -> REGION21_R { + REGION21_R::new(((self.bits >> 21) & 1) != 0) + } + #[doc = "Bit 22 - Enable protection for region 22. Write '0' has no effect."] + #[inline(always)] + pub fn region22(&self) -> REGION22_R { + REGION22_R::new(((self.bits >> 22) & 1) != 0) + } + #[doc = "Bit 23 - Enable protection for region 23. Write '0' has no effect."] + #[inline(always)] + pub fn region23(&self) -> REGION23_R { + REGION23_R::new(((self.bits >> 23) & 1) != 0) + } + #[doc = "Bit 24 - Enable protection for region 24. Write '0' has no effect."] + #[inline(always)] + pub fn region24(&self) -> REGION24_R { + REGION24_R::new(((self.bits >> 24) & 1) != 0) + } + #[doc = "Bit 25 - Enable protection for region 25. Write '0' has no effect."] + #[inline(always)] + pub fn region25(&self) -> REGION25_R { + REGION25_R::new(((self.bits >> 25) & 1) != 0) + } + #[doc = "Bit 26 - Enable protection for region 26. Write '0' has no effect."] + #[inline(always)] + pub fn region26(&self) -> REGION26_R { + REGION26_R::new(((self.bits >> 26) & 1) != 0) + } + #[doc = "Bit 27 - Enable protection for region 27. Write '0' has no effect."] + #[inline(always)] + pub fn region27(&self) -> REGION27_R { + REGION27_R::new(((self.bits >> 27) & 1) != 0) + } + #[doc = "Bit 28 - Enable protection for region 28. Write '0' has no effect."] + #[inline(always)] + pub fn region28(&self) -> REGION28_R { + REGION28_R::new(((self.bits >> 28) & 1) != 0) + } + #[doc = "Bit 29 - Enable protection for region 29. Write '0' has no effect."] + #[inline(always)] + pub fn region29(&self) -> REGION29_R { + REGION29_R::new(((self.bits >> 29) & 1) != 0) + } + #[doc = "Bit 30 - Enable protection for region 30. Write '0' has no effect."] + #[inline(always)] + pub fn region30(&self) -> REGION30_R { + REGION30_R::new(((self.bits >> 30) & 1) != 0) + } + #[doc = "Bit 31 - Enable protection for region 31. Write '0' has no effect."] + #[inline(always)] + pub fn region31(&self) -> REGION31_R { + REGION31_R::new(((self.bits >> 31) & 1) != 0) + } +} +impl W { + #[doc = "Bit 0 - Enable protection for region 0. Write '0' has no effect."] + #[inline(always)] + #[must_use] + pub fn region0(&mut self) -> REGION0_W<0> { + REGION0_W::new(self) + } + #[doc = "Bit 1 - Enable protection for region 1. Write '0' has no effect."] + #[inline(always)] + #[must_use] + pub fn region1(&mut self) -> REGION1_W<1> { + REGION1_W::new(self) + } + #[doc = "Bit 2 - Enable protection for region 2. Write '0' has no effect."] + #[inline(always)] + #[must_use] + pub fn region2(&mut self) -> REGION2_W<2> { + REGION2_W::new(self) + } + #[doc = "Bit 3 - Enable protection for region 3. Write '0' has no effect."] + #[inline(always)] + #[must_use] + pub fn region3(&mut self) -> REGION3_W<3> { + REGION3_W::new(self) + } + #[doc = "Bit 4 - Enable protection for region 4. Write '0' has no effect."] + #[inline(always)] + #[must_use] + pub fn region4(&mut self) -> REGION4_W<4> { + REGION4_W::new(self) + } + #[doc = "Bit 5 - Enable protection for region 5. Write '0' has no effect."] + #[inline(always)] + #[must_use] + pub fn region5(&mut self) -> REGION5_W<5> { + REGION5_W::new(self) + } + #[doc = "Bit 6 - Enable protection for region 6. Write '0' has no effect."] + #[inline(always)] + #[must_use] + pub fn region6(&mut self) -> REGION6_W<6> { + REGION6_W::new(self) + } + #[doc = "Bit 7 - Enable protection for region 7. Write '0' has no effect."] + #[inline(always)] + #[must_use] + pub fn region7(&mut self) -> REGION7_W<7> { + REGION7_W::new(self) + } + #[doc = "Bit 8 - Enable protection for region 8. Write '0' has no effect."] + #[inline(always)] + #[must_use] + pub fn region8(&mut self) -> REGION8_W<8> { + REGION8_W::new(self) + } + #[doc = "Bit 9 - Enable protection for region 9. Write '0' has no effect."] + #[inline(always)] + #[must_use] + pub fn region9(&mut self) -> REGION9_W<9> { + REGION9_W::new(self) + } + #[doc = "Bit 10 - Enable protection for region 10. Write '0' has no effect."] + #[inline(always)] + #[must_use] + pub fn region10(&mut self) -> REGION10_W<10> { + REGION10_W::new(self) + } + #[doc = "Bit 11 - Enable protection for region 11. Write '0' has no effect."] + #[inline(always)] + #[must_use] + pub fn region11(&mut self) -> REGION11_W<11> { + REGION11_W::new(self) + } + #[doc = "Bit 12 - Enable protection for region 12. Write '0' has no effect."] + #[inline(always)] + #[must_use] + pub fn region12(&mut self) -> REGION12_W<12> { + REGION12_W::new(self) + } + #[doc = "Bit 13 - Enable protection for region 13. Write '0' has no effect."] + #[inline(always)] + #[must_use] + pub fn region13(&mut self) -> REGION13_W<13> { + REGION13_W::new(self) + } + #[doc = "Bit 14 - Enable protection for region 14. Write '0' has no effect."] + #[inline(always)] + #[must_use] + pub fn region14(&mut self) -> REGION14_W<14> { + REGION14_W::new(self) + } + #[doc = "Bit 15 - Enable protection for region 15. Write '0' has no effect."] + #[inline(always)] + #[must_use] + pub fn region15(&mut self) -> REGION15_W<15> { + REGION15_W::new(self) + } + #[doc = "Bit 16 - Enable protection for region 16. Write '0' has no effect."] + #[inline(always)] + #[must_use] + pub fn region16(&mut self) -> REGION16_W<16> { + REGION16_W::new(self) + } + #[doc = "Bit 17 - Enable protection for region 17. Write '0' has no effect."] + #[inline(always)] + #[must_use] + pub fn region17(&mut self) -> REGION17_W<17> { + REGION17_W::new(self) + } + #[doc = "Bit 18 - Enable protection for region 18. Write '0' has no effect."] + #[inline(always)] + #[must_use] + pub fn region18(&mut self) -> REGION18_W<18> { + REGION18_W::new(self) + } + #[doc = "Bit 19 - Enable protection for region 19. Write '0' has no effect."] + #[inline(always)] + #[must_use] + pub fn region19(&mut self) -> REGION19_W<19> { + REGION19_W::new(self) + } + #[doc = "Bit 20 - Enable protection for region 20. Write '0' has no effect."] + #[inline(always)] + #[must_use] + pub fn region20(&mut self) -> REGION20_W<20> { + REGION20_W::new(self) + } + #[doc = "Bit 21 - Enable protection for region 21. Write '0' has no effect."] + #[inline(always)] + #[must_use] + pub fn region21(&mut self) -> REGION21_W<21> { + REGION21_W::new(self) + } + #[doc = "Bit 22 - Enable protection for region 22. Write '0' has no effect."] + #[inline(always)] + #[must_use] + pub fn region22(&mut self) -> REGION22_W<22> { + REGION22_W::new(self) + } + #[doc = "Bit 23 - Enable protection for region 23. Write '0' has no effect."] + #[inline(always)] + #[must_use] + pub fn region23(&mut self) -> REGION23_W<23> { + REGION23_W::new(self) + } + #[doc = "Bit 24 - Enable protection for region 24. Write '0' has no effect."] + #[inline(always)] + #[must_use] + pub fn region24(&mut self) -> REGION24_W<24> { + REGION24_W::new(self) + } + #[doc = "Bit 25 - Enable protection for region 25. Write '0' has no effect."] + #[inline(always)] + #[must_use] + pub fn region25(&mut self) -> REGION25_W<25> { + REGION25_W::new(self) + } + #[doc = "Bit 26 - Enable protection for region 26. Write '0' has no effect."] + #[inline(always)] + #[must_use] + pub fn region26(&mut self) -> REGION26_W<26> { + REGION26_W::new(self) + } + #[doc = "Bit 27 - Enable protection for region 27. Write '0' has no effect."] + #[inline(always)] + #[must_use] + pub fn region27(&mut self) -> REGION27_W<27> { + REGION27_W::new(self) + } + #[doc = "Bit 28 - Enable protection for region 28. Write '0' has no effect."] + #[inline(always)] + #[must_use] + pub fn region28(&mut self) -> REGION28_W<28> { + REGION28_W::new(self) + } + #[doc = "Bit 29 - Enable protection for region 29. Write '0' has no effect."] + #[inline(always)] + #[must_use] + pub fn region29(&mut self) -> REGION29_W<29> { + REGION29_W::new(self) + } + #[doc = "Bit 30 - Enable protection for region 30. Write '0' has no effect."] + #[inline(always)] + #[must_use] + pub fn region30(&mut self) -> REGION30_W<30> { + REGION30_W::new(self) + } + #[doc = "Bit 31 - Enable protection for region 31. Write '0' has no effect."] + #[inline(always)] + #[must_use] + pub fn region31(&mut self) -> REGION31_W<31> { + REGION31_W::new(self) + } + #[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 = "Block protect configuration register 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 [config0](index.html) module"] +pub struct CONFIG0_SPEC; +impl crate::RegisterSpec for CONFIG0_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [config0::R](R) reader structure"] +impl crate::Readable for CONFIG0_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [config0::W](W) writer structure"] +impl crate::Writable for CONFIG0_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets CONFIG0 to value 0"] +impl crate::Resettable for CONFIG0_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/bprot/config1.rs b/down-the-stack/dk_pac/src/bprot/config1.rs new file mode 100644 index 0000000..6d5c716 --- /dev/null +++ b/down-the-stack/dk_pac/src/bprot/config1.rs @@ -0,0 +1,2017 @@ +#[doc = "Register `CONFIG1` 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 `CONFIG1` 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 `REGION32` reader - Enable protection for region 32. Write '0' has no effect."] +pub type REGION32_R = crate::BitReader; +#[doc = "Enable protection for region 32. Write '0' has no effect.\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum REGION32_A { + #[doc = "0: Protection disabled"] + DISABLED = 0, + #[doc = "1: Protection enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: REGION32_A) -> Self { + variant as u8 != 0 + } +} +impl REGION32_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> REGION32_A { + match self.bits { + false => REGION32_A::DISABLED, + true => REGION32_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == REGION32_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == REGION32_A::ENABLED + } +} +#[doc = "Field `REGION32` writer - Enable protection for region 32. Write '0' has no effect."] +pub type REGION32_W<'a, const O: u8> = crate::BitWriter<'a, u32, CONFIG1_SPEC, REGION32_A, O>; +impl<'a, const O: u8> REGION32_W<'a, O> { + #[doc = "Protection disabled"] + #[inline(always)] + pub fn disabled(self) -> &'a mut W { + self.variant(REGION32_A::DISABLED) + } + #[doc = "Protection enabled"] + #[inline(always)] + pub fn enabled(self) -> &'a mut W { + self.variant(REGION32_A::ENABLED) + } +} +#[doc = "Field `REGION33` reader - Enable protection for region 33. Write '0' has no effect."] +pub type REGION33_R = crate::BitReader; +#[doc = "Enable protection for region 33. Write '0' has no effect.\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum REGION33_A { + #[doc = "0: Protection disabled"] + DISABLED = 0, + #[doc = "1: Protection enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: REGION33_A) -> Self { + variant as u8 != 0 + } +} +impl REGION33_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> REGION33_A { + match self.bits { + false => REGION33_A::DISABLED, + true => REGION33_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == REGION33_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == REGION33_A::ENABLED + } +} +#[doc = "Field `REGION33` writer - Enable protection for region 33. Write '0' has no effect."] +pub type REGION33_W<'a, const O: u8> = crate::BitWriter<'a, u32, CONFIG1_SPEC, REGION33_A, O>; +impl<'a, const O: u8> REGION33_W<'a, O> { + #[doc = "Protection disabled"] + #[inline(always)] + pub fn disabled(self) -> &'a mut W { + self.variant(REGION33_A::DISABLED) + } + #[doc = "Protection enabled"] + #[inline(always)] + pub fn enabled(self) -> &'a mut W { + self.variant(REGION33_A::ENABLED) + } +} +#[doc = "Field `REGION34` reader - Enable protection for region 34. Write '0' has no effect."] +pub type REGION34_R = crate::BitReader; +#[doc = "Enable protection for region 34. Write '0' has no effect.\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum REGION34_A { + #[doc = "0: Protection disabled"] + DISABLED = 0, + #[doc = "1: Protection enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: REGION34_A) -> Self { + variant as u8 != 0 + } +} +impl REGION34_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> REGION34_A { + match self.bits { + false => REGION34_A::DISABLED, + true => REGION34_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == REGION34_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == REGION34_A::ENABLED + } +} +#[doc = "Field `REGION34` writer - Enable protection for region 34. Write '0' has no effect."] +pub type REGION34_W<'a, const O: u8> = crate::BitWriter<'a, u32, CONFIG1_SPEC, REGION34_A, O>; +impl<'a, const O: u8> REGION34_W<'a, O> { + #[doc = "Protection disabled"] + #[inline(always)] + pub fn disabled(self) -> &'a mut W { + self.variant(REGION34_A::DISABLED) + } + #[doc = "Protection enabled"] + #[inline(always)] + pub fn enabled(self) -> &'a mut W { + self.variant(REGION34_A::ENABLED) + } +} +#[doc = "Field `REGION35` reader - Enable protection for region 35. Write '0' has no effect."] +pub type REGION35_R = crate::BitReader; +#[doc = "Enable protection for region 35. Write '0' has no effect.\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum REGION35_A { + #[doc = "0: Protection disabled"] + DISABLED = 0, + #[doc = "1: Protection enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: REGION35_A) -> Self { + variant as u8 != 0 + } +} +impl REGION35_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> REGION35_A { + match self.bits { + false => REGION35_A::DISABLED, + true => REGION35_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == REGION35_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == REGION35_A::ENABLED + } +} +#[doc = "Field `REGION35` writer - Enable protection for region 35. Write '0' has no effect."] +pub type REGION35_W<'a, const O: u8> = crate::BitWriter<'a, u32, CONFIG1_SPEC, REGION35_A, O>; +impl<'a, const O: u8> REGION35_W<'a, O> { + #[doc = "Protection disabled"] + #[inline(always)] + pub fn disabled(self) -> &'a mut W { + self.variant(REGION35_A::DISABLED) + } + #[doc = "Protection enabled"] + #[inline(always)] + pub fn enabled(self) -> &'a mut W { + self.variant(REGION35_A::ENABLED) + } +} +#[doc = "Field `REGION36` reader - Enable protection for region 36. Write '0' has no effect."] +pub type REGION36_R = crate::BitReader; +#[doc = "Enable protection for region 36. Write '0' has no effect.\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum REGION36_A { + #[doc = "0: Protection disabled"] + DISABLED = 0, + #[doc = "1: Protection enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: REGION36_A) -> Self { + variant as u8 != 0 + } +} +impl REGION36_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> REGION36_A { + match self.bits { + false => REGION36_A::DISABLED, + true => REGION36_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == REGION36_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == REGION36_A::ENABLED + } +} +#[doc = "Field `REGION36` writer - Enable protection for region 36. Write '0' has no effect."] +pub type REGION36_W<'a, const O: u8> = crate::BitWriter<'a, u32, CONFIG1_SPEC, REGION36_A, O>; +impl<'a, const O: u8> REGION36_W<'a, O> { + #[doc = "Protection disabled"] + #[inline(always)] + pub fn disabled(self) -> &'a mut W { + self.variant(REGION36_A::DISABLED) + } + #[doc = "Protection enabled"] + #[inline(always)] + pub fn enabled(self) -> &'a mut W { + self.variant(REGION36_A::ENABLED) + } +} +#[doc = "Field `REGION37` reader - Enable protection for region 37. Write '0' has no effect."] +pub type REGION37_R = crate::BitReader; +#[doc = "Enable protection for region 37. Write '0' has no effect.\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum REGION37_A { + #[doc = "0: Protection disabled"] + DISABLED = 0, + #[doc = "1: Protection enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: REGION37_A) -> Self { + variant as u8 != 0 + } +} +impl REGION37_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> REGION37_A { + match self.bits { + false => REGION37_A::DISABLED, + true => REGION37_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == REGION37_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == REGION37_A::ENABLED + } +} +#[doc = "Field `REGION37` writer - Enable protection for region 37. Write '0' has no effect."] +pub type REGION37_W<'a, const O: u8> = crate::BitWriter<'a, u32, CONFIG1_SPEC, REGION37_A, O>; +impl<'a, const O: u8> REGION37_W<'a, O> { + #[doc = "Protection disabled"] + #[inline(always)] + pub fn disabled(self) -> &'a mut W { + self.variant(REGION37_A::DISABLED) + } + #[doc = "Protection enabled"] + #[inline(always)] + pub fn enabled(self) -> &'a mut W { + self.variant(REGION37_A::ENABLED) + } +} +#[doc = "Field `REGION38` reader - Enable protection for region 38. Write '0' has no effect."] +pub type REGION38_R = crate::BitReader; +#[doc = "Enable protection for region 38. Write '0' has no effect.\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum REGION38_A { + #[doc = "0: Protection disabled"] + DISABLED = 0, + #[doc = "1: Protection enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: REGION38_A) -> Self { + variant as u8 != 0 + } +} +impl REGION38_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> REGION38_A { + match self.bits { + false => REGION38_A::DISABLED, + true => REGION38_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == REGION38_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == REGION38_A::ENABLED + } +} +#[doc = "Field `REGION38` writer - Enable protection for region 38. Write '0' has no effect."] +pub type REGION38_W<'a, const O: u8> = crate::BitWriter<'a, u32, CONFIG1_SPEC, REGION38_A, O>; +impl<'a, const O: u8> REGION38_W<'a, O> { + #[doc = "Protection disabled"] + #[inline(always)] + pub fn disabled(self) -> &'a mut W { + self.variant(REGION38_A::DISABLED) + } + #[doc = "Protection enabled"] + #[inline(always)] + pub fn enabled(self) -> &'a mut W { + self.variant(REGION38_A::ENABLED) + } +} +#[doc = "Field `REGION39` reader - Enable protection for region 39. Write '0' has no effect."] +pub type REGION39_R = crate::BitReader; +#[doc = "Enable protection for region 39. Write '0' has no effect.\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum REGION39_A { + #[doc = "0: Protection disabled"] + DISABLED = 0, + #[doc = "1: Protection enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: REGION39_A) -> Self { + variant as u8 != 0 + } +} +impl REGION39_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> REGION39_A { + match self.bits { + false => REGION39_A::DISABLED, + true => REGION39_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == REGION39_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == REGION39_A::ENABLED + } +} +#[doc = "Field `REGION39` writer - Enable protection for region 39. Write '0' has no effect."] +pub type REGION39_W<'a, const O: u8> = crate::BitWriter<'a, u32, CONFIG1_SPEC, REGION39_A, O>; +impl<'a, const O: u8> REGION39_W<'a, O> { + #[doc = "Protection disabled"] + #[inline(always)] + pub fn disabled(self) -> &'a mut W { + self.variant(REGION39_A::DISABLED) + } + #[doc = "Protection enabled"] + #[inline(always)] + pub fn enabled(self) -> &'a mut W { + self.variant(REGION39_A::ENABLED) + } +} +#[doc = "Field `REGION40` reader - Enable protection for region 40. Write '0' has no effect."] +pub type REGION40_R = crate::BitReader; +#[doc = "Enable protection for region 40. Write '0' has no effect.\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum REGION40_A { + #[doc = "0: Protection disabled"] + DISABLED = 0, + #[doc = "1: Protection enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: REGION40_A) -> Self { + variant as u8 != 0 + } +} +impl REGION40_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> REGION40_A { + match self.bits { + false => REGION40_A::DISABLED, + true => REGION40_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == REGION40_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == REGION40_A::ENABLED + } +} +#[doc = "Field `REGION40` writer - Enable protection for region 40. Write '0' has no effect."] +pub type REGION40_W<'a, const O: u8> = crate::BitWriter<'a, u32, CONFIG1_SPEC, REGION40_A, O>; +impl<'a, const O: u8> REGION40_W<'a, O> { + #[doc = "Protection disabled"] + #[inline(always)] + pub fn disabled(self) -> &'a mut W { + self.variant(REGION40_A::DISABLED) + } + #[doc = "Protection enabled"] + #[inline(always)] + pub fn enabled(self) -> &'a mut W { + self.variant(REGION40_A::ENABLED) + } +} +#[doc = "Field `REGION41` reader - Enable protection for region 41. Write '0' has no effect."] +pub type REGION41_R = crate::BitReader; +#[doc = "Enable protection for region 41. Write '0' has no effect.\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum REGION41_A { + #[doc = "0: Protection disabled"] + DISABLED = 0, + #[doc = "1: Protection enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: REGION41_A) -> Self { + variant as u8 != 0 + } +} +impl REGION41_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> REGION41_A { + match self.bits { + false => REGION41_A::DISABLED, + true => REGION41_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == REGION41_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == REGION41_A::ENABLED + } +} +#[doc = "Field `REGION41` writer - Enable protection for region 41. Write '0' has no effect."] +pub type REGION41_W<'a, const O: u8> = crate::BitWriter<'a, u32, CONFIG1_SPEC, REGION41_A, O>; +impl<'a, const O: u8> REGION41_W<'a, O> { + #[doc = "Protection disabled"] + #[inline(always)] + pub fn disabled(self) -> &'a mut W { + self.variant(REGION41_A::DISABLED) + } + #[doc = "Protection enabled"] + #[inline(always)] + pub fn enabled(self) -> &'a mut W { + self.variant(REGION41_A::ENABLED) + } +} +#[doc = "Field `REGION42` reader - Enable protection for region 42. Write '0' has no effect."] +pub type REGION42_R = crate::BitReader; +#[doc = "Enable protection for region 42. Write '0' has no effect.\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum REGION42_A { + #[doc = "0: Protection disabled"] + DISABLED = 0, + #[doc = "1: Protection enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: REGION42_A) -> Self { + variant as u8 != 0 + } +} +impl REGION42_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> REGION42_A { + match self.bits { + false => REGION42_A::DISABLED, + true => REGION42_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == REGION42_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == REGION42_A::ENABLED + } +} +#[doc = "Field `REGION42` writer - Enable protection for region 42. Write '0' has no effect."] +pub type REGION42_W<'a, const O: u8> = crate::BitWriter<'a, u32, CONFIG1_SPEC, REGION42_A, O>; +impl<'a, const O: u8> REGION42_W<'a, O> { + #[doc = "Protection disabled"] + #[inline(always)] + pub fn disabled(self) -> &'a mut W { + self.variant(REGION42_A::DISABLED) + } + #[doc = "Protection enabled"] + #[inline(always)] + pub fn enabled(self) -> &'a mut W { + self.variant(REGION42_A::ENABLED) + } +} +#[doc = "Field `REGION43` reader - Enable protection for region 43. Write '0' has no effect."] +pub type REGION43_R = crate::BitReader; +#[doc = "Enable protection for region 43. Write '0' has no effect.\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum REGION43_A { + #[doc = "0: Protection disabled"] + DISABLED = 0, + #[doc = "1: Protection enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: REGION43_A) -> Self { + variant as u8 != 0 + } +} +impl REGION43_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> REGION43_A { + match self.bits { + false => REGION43_A::DISABLED, + true => REGION43_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == REGION43_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == REGION43_A::ENABLED + } +} +#[doc = "Field `REGION43` writer - Enable protection for region 43. Write '0' has no effect."] +pub type REGION43_W<'a, const O: u8> = crate::BitWriter<'a, u32, CONFIG1_SPEC, REGION43_A, O>; +impl<'a, const O: u8> REGION43_W<'a, O> { + #[doc = "Protection disabled"] + #[inline(always)] + pub fn disabled(self) -> &'a mut W { + self.variant(REGION43_A::DISABLED) + } + #[doc = "Protection enabled"] + #[inline(always)] + pub fn enabled(self) -> &'a mut W { + self.variant(REGION43_A::ENABLED) + } +} +#[doc = "Field `REGION44` reader - Enable protection for region 44. Write '0' has no effect."] +pub type REGION44_R = crate::BitReader; +#[doc = "Enable protection for region 44. Write '0' has no effect.\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum REGION44_A { + #[doc = "0: Protection disabled"] + DISABLED = 0, + #[doc = "1: Protection enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: REGION44_A) -> Self { + variant as u8 != 0 + } +} +impl REGION44_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> REGION44_A { + match self.bits { + false => REGION44_A::DISABLED, + true => REGION44_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == REGION44_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == REGION44_A::ENABLED + } +} +#[doc = "Field `REGION44` writer - Enable protection for region 44. Write '0' has no effect."] +pub type REGION44_W<'a, const O: u8> = crate::BitWriter<'a, u32, CONFIG1_SPEC, REGION44_A, O>; +impl<'a, const O: u8> REGION44_W<'a, O> { + #[doc = "Protection disabled"] + #[inline(always)] + pub fn disabled(self) -> &'a mut W { + self.variant(REGION44_A::DISABLED) + } + #[doc = "Protection enabled"] + #[inline(always)] + pub fn enabled(self) -> &'a mut W { + self.variant(REGION44_A::ENABLED) + } +} +#[doc = "Field `REGION45` reader - Enable protection for region 45. Write '0' has no effect."] +pub type REGION45_R = crate::BitReader; +#[doc = "Enable protection for region 45. Write '0' has no effect.\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum REGION45_A { + #[doc = "0: Protection disabled"] + DISABLED = 0, + #[doc = "1: Protection enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: REGION45_A) -> Self { + variant as u8 != 0 + } +} +impl REGION45_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> REGION45_A { + match self.bits { + false => REGION45_A::DISABLED, + true => REGION45_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == REGION45_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == REGION45_A::ENABLED + } +} +#[doc = "Field `REGION45` writer - Enable protection for region 45. Write '0' has no effect."] +pub type REGION45_W<'a, const O: u8> = crate::BitWriter<'a, u32, CONFIG1_SPEC, REGION45_A, O>; +impl<'a, const O: u8> REGION45_W<'a, O> { + #[doc = "Protection disabled"] + #[inline(always)] + pub fn disabled(self) -> &'a mut W { + self.variant(REGION45_A::DISABLED) + } + #[doc = "Protection enabled"] + #[inline(always)] + pub fn enabled(self) -> &'a mut W { + self.variant(REGION45_A::ENABLED) + } +} +#[doc = "Field `REGION46` reader - Enable protection for region 46. Write '0' has no effect."] +pub type REGION46_R = crate::BitReader; +#[doc = "Enable protection for region 46. Write '0' has no effect.\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum REGION46_A { + #[doc = "0: Protection disabled"] + DISABLED = 0, + #[doc = "1: Protection enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: REGION46_A) -> Self { + variant as u8 != 0 + } +} +impl REGION46_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> REGION46_A { + match self.bits { + false => REGION46_A::DISABLED, + true => REGION46_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == REGION46_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == REGION46_A::ENABLED + } +} +#[doc = "Field `REGION46` writer - Enable protection for region 46. Write '0' has no effect."] +pub type REGION46_W<'a, const O: u8> = crate::BitWriter<'a, u32, CONFIG1_SPEC, REGION46_A, O>; +impl<'a, const O: u8> REGION46_W<'a, O> { + #[doc = "Protection disabled"] + #[inline(always)] + pub fn disabled(self) -> &'a mut W { + self.variant(REGION46_A::DISABLED) + } + #[doc = "Protection enabled"] + #[inline(always)] + pub fn enabled(self) -> &'a mut W { + self.variant(REGION46_A::ENABLED) + } +} +#[doc = "Field `REGION47` reader - Enable protection for region 47. Write '0' has no effect."] +pub type REGION47_R = crate::BitReader; +#[doc = "Enable protection for region 47. Write '0' has no effect.\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum REGION47_A { + #[doc = "0: Protection disabled"] + DISABLED = 0, + #[doc = "1: Protection enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: REGION47_A) -> Self { + variant as u8 != 0 + } +} +impl REGION47_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> REGION47_A { + match self.bits { + false => REGION47_A::DISABLED, + true => REGION47_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == REGION47_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == REGION47_A::ENABLED + } +} +#[doc = "Field `REGION47` writer - Enable protection for region 47. Write '0' has no effect."] +pub type REGION47_W<'a, const O: u8> = crate::BitWriter<'a, u32, CONFIG1_SPEC, REGION47_A, O>; +impl<'a, const O: u8> REGION47_W<'a, O> { + #[doc = "Protection disabled"] + #[inline(always)] + pub fn disabled(self) -> &'a mut W { + self.variant(REGION47_A::DISABLED) + } + #[doc = "Protection enabled"] + #[inline(always)] + pub fn enabled(self) -> &'a mut W { + self.variant(REGION47_A::ENABLED) + } +} +#[doc = "Field `REGION48` reader - Enable protection for region 48. Write '0' has no effect."] +pub type REGION48_R = crate::BitReader; +#[doc = "Enable protection for region 48. Write '0' has no effect.\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum REGION48_A { + #[doc = "0: Protection disabled"] + DISABLED = 0, + #[doc = "1: Protection enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: REGION48_A) -> Self { + variant as u8 != 0 + } +} +impl REGION48_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> REGION48_A { + match self.bits { + false => REGION48_A::DISABLED, + true => REGION48_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == REGION48_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == REGION48_A::ENABLED + } +} +#[doc = "Field `REGION48` writer - Enable protection for region 48. Write '0' has no effect."] +pub type REGION48_W<'a, const O: u8> = crate::BitWriter<'a, u32, CONFIG1_SPEC, REGION48_A, O>; +impl<'a, const O: u8> REGION48_W<'a, O> { + #[doc = "Protection disabled"] + #[inline(always)] + pub fn disabled(self) -> &'a mut W { + self.variant(REGION48_A::DISABLED) + } + #[doc = "Protection enabled"] + #[inline(always)] + pub fn enabled(self) -> &'a mut W { + self.variant(REGION48_A::ENABLED) + } +} +#[doc = "Field `REGION49` reader - Enable protection for region 49. Write '0' has no effect."] +pub type REGION49_R = crate::BitReader; +#[doc = "Enable protection for region 49. Write '0' has no effect.\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum REGION49_A { + #[doc = "0: Protection disabled"] + DISABLED = 0, + #[doc = "1: Protection enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: REGION49_A) -> Self { + variant as u8 != 0 + } +} +impl REGION49_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> REGION49_A { + match self.bits { + false => REGION49_A::DISABLED, + true => REGION49_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == REGION49_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == REGION49_A::ENABLED + } +} +#[doc = "Field `REGION49` writer - Enable protection for region 49. Write '0' has no effect."] +pub type REGION49_W<'a, const O: u8> = crate::BitWriter<'a, u32, CONFIG1_SPEC, REGION49_A, O>; +impl<'a, const O: u8> REGION49_W<'a, O> { + #[doc = "Protection disabled"] + #[inline(always)] + pub fn disabled(self) -> &'a mut W { + self.variant(REGION49_A::DISABLED) + } + #[doc = "Protection enabled"] + #[inline(always)] + pub fn enabled(self) -> &'a mut W { + self.variant(REGION49_A::ENABLED) + } +} +#[doc = "Field `REGION50` reader - Enable protection for region 50. Write '0' has no effect."] +pub type REGION50_R = crate::BitReader; +#[doc = "Enable protection for region 50. Write '0' has no effect.\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum REGION50_A { + #[doc = "0: Protection disabled"] + DISABLED = 0, + #[doc = "1: Protection enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: REGION50_A) -> Self { + variant as u8 != 0 + } +} +impl REGION50_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> REGION50_A { + match self.bits { + false => REGION50_A::DISABLED, + true => REGION50_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == REGION50_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == REGION50_A::ENABLED + } +} +#[doc = "Field `REGION50` writer - Enable protection for region 50. Write '0' has no effect."] +pub type REGION50_W<'a, const O: u8> = crate::BitWriter<'a, u32, CONFIG1_SPEC, REGION50_A, O>; +impl<'a, const O: u8> REGION50_W<'a, O> { + #[doc = "Protection disabled"] + #[inline(always)] + pub fn disabled(self) -> &'a mut W { + self.variant(REGION50_A::DISABLED) + } + #[doc = "Protection enabled"] + #[inline(always)] + pub fn enabled(self) -> &'a mut W { + self.variant(REGION50_A::ENABLED) + } +} +#[doc = "Field `REGION51` reader - Enable protection for region 51. Write '0' has no effect."] +pub type REGION51_R = crate::BitReader; +#[doc = "Enable protection for region 51. Write '0' has no effect.\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum REGION51_A { + #[doc = "0: Protection disabled"] + DISABLED = 0, + #[doc = "1: Protection enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: REGION51_A) -> Self { + variant as u8 != 0 + } +} +impl REGION51_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> REGION51_A { + match self.bits { + false => REGION51_A::DISABLED, + true => REGION51_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == REGION51_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == REGION51_A::ENABLED + } +} +#[doc = "Field `REGION51` writer - Enable protection for region 51. Write '0' has no effect."] +pub type REGION51_W<'a, const O: u8> = crate::BitWriter<'a, u32, CONFIG1_SPEC, REGION51_A, O>; +impl<'a, const O: u8> REGION51_W<'a, O> { + #[doc = "Protection disabled"] + #[inline(always)] + pub fn disabled(self) -> &'a mut W { + self.variant(REGION51_A::DISABLED) + } + #[doc = "Protection enabled"] + #[inline(always)] + pub fn enabled(self) -> &'a mut W { + self.variant(REGION51_A::ENABLED) + } +} +#[doc = "Field `REGION52` reader - Enable protection for region 52. Write '0' has no effect."] +pub type REGION52_R = crate::BitReader; +#[doc = "Enable protection for region 52. Write '0' has no effect.\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum REGION52_A { + #[doc = "0: Protection disabled"] + DISABLED = 0, + #[doc = "1: Protection enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: REGION52_A) -> Self { + variant as u8 != 0 + } +} +impl REGION52_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> REGION52_A { + match self.bits { + false => REGION52_A::DISABLED, + true => REGION52_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == REGION52_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == REGION52_A::ENABLED + } +} +#[doc = "Field `REGION52` writer - Enable protection for region 52. Write '0' has no effect."] +pub type REGION52_W<'a, const O: u8> = crate::BitWriter<'a, u32, CONFIG1_SPEC, REGION52_A, O>; +impl<'a, const O: u8> REGION52_W<'a, O> { + #[doc = "Protection disabled"] + #[inline(always)] + pub fn disabled(self) -> &'a mut W { + self.variant(REGION52_A::DISABLED) + } + #[doc = "Protection enabled"] + #[inline(always)] + pub fn enabled(self) -> &'a mut W { + self.variant(REGION52_A::ENABLED) + } +} +#[doc = "Field `REGION53` reader - Enable protection for region 53. Write '0' has no effect."] +pub type REGION53_R = crate::BitReader; +#[doc = "Enable protection for region 53. Write '0' has no effect.\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum REGION53_A { + #[doc = "0: Protection disabled"] + DISABLED = 0, + #[doc = "1: Protection enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: REGION53_A) -> Self { + variant as u8 != 0 + } +} +impl REGION53_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> REGION53_A { + match self.bits { + false => REGION53_A::DISABLED, + true => REGION53_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == REGION53_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == REGION53_A::ENABLED + } +} +#[doc = "Field `REGION53` writer - Enable protection for region 53. Write '0' has no effect."] +pub type REGION53_W<'a, const O: u8> = crate::BitWriter<'a, u32, CONFIG1_SPEC, REGION53_A, O>; +impl<'a, const O: u8> REGION53_W<'a, O> { + #[doc = "Protection disabled"] + #[inline(always)] + pub fn disabled(self) -> &'a mut W { + self.variant(REGION53_A::DISABLED) + } + #[doc = "Protection enabled"] + #[inline(always)] + pub fn enabled(self) -> &'a mut W { + self.variant(REGION53_A::ENABLED) + } +} +#[doc = "Field `REGION54` reader - Enable protection for region 54. Write '0' has no effect."] +pub type REGION54_R = crate::BitReader; +#[doc = "Enable protection for region 54. Write '0' has no effect.\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum REGION54_A { + #[doc = "0: Protection disabled"] + DISABLED = 0, + #[doc = "1: Protection enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: REGION54_A) -> Self { + variant as u8 != 0 + } +} +impl REGION54_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> REGION54_A { + match self.bits { + false => REGION54_A::DISABLED, + true => REGION54_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == REGION54_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == REGION54_A::ENABLED + } +} +#[doc = "Field `REGION54` writer - Enable protection for region 54. Write '0' has no effect."] +pub type REGION54_W<'a, const O: u8> = crate::BitWriter<'a, u32, CONFIG1_SPEC, REGION54_A, O>; +impl<'a, const O: u8> REGION54_W<'a, O> { + #[doc = "Protection disabled"] + #[inline(always)] + pub fn disabled(self) -> &'a mut W { + self.variant(REGION54_A::DISABLED) + } + #[doc = "Protection enabled"] + #[inline(always)] + pub fn enabled(self) -> &'a mut W { + self.variant(REGION54_A::ENABLED) + } +} +#[doc = "Field `REGION55` reader - Enable protection for region 55. Write '0' has no effect."] +pub type REGION55_R = crate::BitReader; +#[doc = "Enable protection for region 55. Write '0' has no effect.\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum REGION55_A { + #[doc = "0: Protection disabled"] + DISABLED = 0, + #[doc = "1: Protection enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: REGION55_A) -> Self { + variant as u8 != 0 + } +} +impl REGION55_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> REGION55_A { + match self.bits { + false => REGION55_A::DISABLED, + true => REGION55_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == REGION55_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == REGION55_A::ENABLED + } +} +#[doc = "Field `REGION55` writer - Enable protection for region 55. Write '0' has no effect."] +pub type REGION55_W<'a, const O: u8> = crate::BitWriter<'a, u32, CONFIG1_SPEC, REGION55_A, O>; +impl<'a, const O: u8> REGION55_W<'a, O> { + #[doc = "Protection disabled"] + #[inline(always)] + pub fn disabled(self) -> &'a mut W { + self.variant(REGION55_A::DISABLED) + } + #[doc = "Protection enabled"] + #[inline(always)] + pub fn enabled(self) -> &'a mut W { + self.variant(REGION55_A::ENABLED) + } +} +#[doc = "Field `REGION56` reader - Enable protection for region 56. Write '0' has no effect."] +pub type REGION56_R = crate::BitReader; +#[doc = "Enable protection for region 56. Write '0' has no effect.\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum REGION56_A { + #[doc = "0: Protection disabled"] + DISABLED = 0, + #[doc = "1: Protection enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: REGION56_A) -> Self { + variant as u8 != 0 + } +} +impl REGION56_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> REGION56_A { + match self.bits { + false => REGION56_A::DISABLED, + true => REGION56_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == REGION56_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == REGION56_A::ENABLED + } +} +#[doc = "Field `REGION56` writer - Enable protection for region 56. Write '0' has no effect."] +pub type REGION56_W<'a, const O: u8> = crate::BitWriter<'a, u32, CONFIG1_SPEC, REGION56_A, O>; +impl<'a, const O: u8> REGION56_W<'a, O> { + #[doc = "Protection disabled"] + #[inline(always)] + pub fn disabled(self) -> &'a mut W { + self.variant(REGION56_A::DISABLED) + } + #[doc = "Protection enabled"] + #[inline(always)] + pub fn enabled(self) -> &'a mut W { + self.variant(REGION56_A::ENABLED) + } +} +#[doc = "Field `REGION57` reader - Enable protection for region 57. Write '0' has no effect."] +pub type REGION57_R = crate::BitReader; +#[doc = "Enable protection for region 57. Write '0' has no effect.\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum REGION57_A { + #[doc = "0: Protection disabled"] + DISABLED = 0, + #[doc = "1: Protection enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: REGION57_A) -> Self { + variant as u8 != 0 + } +} +impl REGION57_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> REGION57_A { + match self.bits { + false => REGION57_A::DISABLED, + true => REGION57_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == REGION57_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == REGION57_A::ENABLED + } +} +#[doc = "Field `REGION57` writer - Enable protection for region 57. Write '0' has no effect."] +pub type REGION57_W<'a, const O: u8> = crate::BitWriter<'a, u32, CONFIG1_SPEC, REGION57_A, O>; +impl<'a, const O: u8> REGION57_W<'a, O> { + #[doc = "Protection disabled"] + #[inline(always)] + pub fn disabled(self) -> &'a mut W { + self.variant(REGION57_A::DISABLED) + } + #[doc = "Protection enabled"] + #[inline(always)] + pub fn enabled(self) -> &'a mut W { + self.variant(REGION57_A::ENABLED) + } +} +#[doc = "Field `REGION58` reader - Enable protection for region 58. Write '0' has no effect."] +pub type REGION58_R = crate::BitReader; +#[doc = "Enable protection for region 58. Write '0' has no effect.\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum REGION58_A { + #[doc = "0: Protection disabled"] + DISABLED = 0, + #[doc = "1: Protection enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: REGION58_A) -> Self { + variant as u8 != 0 + } +} +impl REGION58_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> REGION58_A { + match self.bits { + false => REGION58_A::DISABLED, + true => REGION58_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == REGION58_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == REGION58_A::ENABLED + } +} +#[doc = "Field `REGION58` writer - Enable protection for region 58. Write '0' has no effect."] +pub type REGION58_W<'a, const O: u8> = crate::BitWriter<'a, u32, CONFIG1_SPEC, REGION58_A, O>; +impl<'a, const O: u8> REGION58_W<'a, O> { + #[doc = "Protection disabled"] + #[inline(always)] + pub fn disabled(self) -> &'a mut W { + self.variant(REGION58_A::DISABLED) + } + #[doc = "Protection enabled"] + #[inline(always)] + pub fn enabled(self) -> &'a mut W { + self.variant(REGION58_A::ENABLED) + } +} +#[doc = "Field `REGION59` reader - Enable protection for region 59. Write '0' has no effect."] +pub type REGION59_R = crate::BitReader; +#[doc = "Enable protection for region 59. Write '0' has no effect.\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum REGION59_A { + #[doc = "0: Protection disabled"] + DISABLED = 0, + #[doc = "1: Protection enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: REGION59_A) -> Self { + variant as u8 != 0 + } +} +impl REGION59_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> REGION59_A { + match self.bits { + false => REGION59_A::DISABLED, + true => REGION59_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == REGION59_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == REGION59_A::ENABLED + } +} +#[doc = "Field `REGION59` writer - Enable protection for region 59. Write '0' has no effect."] +pub type REGION59_W<'a, const O: u8> = crate::BitWriter<'a, u32, CONFIG1_SPEC, REGION59_A, O>; +impl<'a, const O: u8> REGION59_W<'a, O> { + #[doc = "Protection disabled"] + #[inline(always)] + pub fn disabled(self) -> &'a mut W { + self.variant(REGION59_A::DISABLED) + } + #[doc = "Protection enabled"] + #[inline(always)] + pub fn enabled(self) -> &'a mut W { + self.variant(REGION59_A::ENABLED) + } +} +#[doc = "Field `REGION60` reader - Enable protection for region 60. Write '0' has no effect."] +pub type REGION60_R = crate::BitReader; +#[doc = "Enable protection for region 60. Write '0' has no effect.\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum REGION60_A { + #[doc = "0: Protection disabled"] + DISABLED = 0, + #[doc = "1: Protection enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: REGION60_A) -> Self { + variant as u8 != 0 + } +} +impl REGION60_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> REGION60_A { + match self.bits { + false => REGION60_A::DISABLED, + true => REGION60_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == REGION60_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == REGION60_A::ENABLED + } +} +#[doc = "Field `REGION60` writer - Enable protection for region 60. Write '0' has no effect."] +pub type REGION60_W<'a, const O: u8> = crate::BitWriter<'a, u32, CONFIG1_SPEC, REGION60_A, O>; +impl<'a, const O: u8> REGION60_W<'a, O> { + #[doc = "Protection disabled"] + #[inline(always)] + pub fn disabled(self) -> &'a mut W { + self.variant(REGION60_A::DISABLED) + } + #[doc = "Protection enabled"] + #[inline(always)] + pub fn enabled(self) -> &'a mut W { + self.variant(REGION60_A::ENABLED) + } +} +#[doc = "Field `REGION61` reader - Enable protection for region 61. Write '0' has no effect."] +pub type REGION61_R = crate::BitReader; +#[doc = "Enable protection for region 61. Write '0' has no effect.\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum REGION61_A { + #[doc = "0: Protection disabled"] + DISABLED = 0, + #[doc = "1: Protection enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: REGION61_A) -> Self { + variant as u8 != 0 + } +} +impl REGION61_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> REGION61_A { + match self.bits { + false => REGION61_A::DISABLED, + true => REGION61_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == REGION61_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == REGION61_A::ENABLED + } +} +#[doc = "Field `REGION61` writer - Enable protection for region 61. Write '0' has no effect."] +pub type REGION61_W<'a, const O: u8> = crate::BitWriter<'a, u32, CONFIG1_SPEC, REGION61_A, O>; +impl<'a, const O: u8> REGION61_W<'a, O> { + #[doc = "Protection disabled"] + #[inline(always)] + pub fn disabled(self) -> &'a mut W { + self.variant(REGION61_A::DISABLED) + } + #[doc = "Protection enabled"] + #[inline(always)] + pub fn enabled(self) -> &'a mut W { + self.variant(REGION61_A::ENABLED) + } +} +#[doc = "Field `REGION62` reader - Enable protection for region 62. Write '0' has no effect."] +pub type REGION62_R = crate::BitReader; +#[doc = "Enable protection for region 62. Write '0' has no effect.\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum REGION62_A { + #[doc = "0: Protection disabled"] + DISABLED = 0, + #[doc = "1: Protection enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: REGION62_A) -> Self { + variant as u8 != 0 + } +} +impl REGION62_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> REGION62_A { + match self.bits { + false => REGION62_A::DISABLED, + true => REGION62_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == REGION62_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == REGION62_A::ENABLED + } +} +#[doc = "Field `REGION62` writer - Enable protection for region 62. Write '0' has no effect."] +pub type REGION62_W<'a, const O: u8> = crate::BitWriter<'a, u32, CONFIG1_SPEC, REGION62_A, O>; +impl<'a, const O: u8> REGION62_W<'a, O> { + #[doc = "Protection disabled"] + #[inline(always)] + pub fn disabled(self) -> &'a mut W { + self.variant(REGION62_A::DISABLED) + } + #[doc = "Protection enabled"] + #[inline(always)] + pub fn enabled(self) -> &'a mut W { + self.variant(REGION62_A::ENABLED) + } +} +#[doc = "Field `REGION63` reader - Enable protection for region 63. Write '0' has no effect."] +pub type REGION63_R = crate::BitReader; +#[doc = "Enable protection for region 63. Write '0' has no effect.\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum REGION63_A { + #[doc = "0: Protection disabled"] + DISABLED = 0, + #[doc = "1: Protection enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: REGION63_A) -> Self { + variant as u8 != 0 + } +} +impl REGION63_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> REGION63_A { + match self.bits { + false => REGION63_A::DISABLED, + true => REGION63_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == REGION63_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == REGION63_A::ENABLED + } +} +#[doc = "Field `REGION63` writer - Enable protection for region 63. Write '0' has no effect."] +pub type REGION63_W<'a, const O: u8> = crate::BitWriter<'a, u32, CONFIG1_SPEC, REGION63_A, O>; +impl<'a, const O: u8> REGION63_W<'a, O> { + #[doc = "Protection disabled"] + #[inline(always)] + pub fn disabled(self) -> &'a mut W { + self.variant(REGION63_A::DISABLED) + } + #[doc = "Protection enabled"] + #[inline(always)] + pub fn enabled(self) -> &'a mut W { + self.variant(REGION63_A::ENABLED) + } +} +impl R { + #[doc = "Bit 0 - Enable protection for region 32. Write '0' has no effect."] + #[inline(always)] + pub fn region32(&self) -> REGION32_R { + REGION32_R::new((self.bits & 1) != 0) + } + #[doc = "Bit 1 - Enable protection for region 33. Write '0' has no effect."] + #[inline(always)] + pub fn region33(&self) -> REGION33_R { + REGION33_R::new(((self.bits >> 1) & 1) != 0) + } + #[doc = "Bit 2 - Enable protection for region 34. Write '0' has no effect."] + #[inline(always)] + pub fn region34(&self) -> REGION34_R { + REGION34_R::new(((self.bits >> 2) & 1) != 0) + } + #[doc = "Bit 3 - Enable protection for region 35. Write '0' has no effect."] + #[inline(always)] + pub fn region35(&self) -> REGION35_R { + REGION35_R::new(((self.bits >> 3) & 1) != 0) + } + #[doc = "Bit 4 - Enable protection for region 36. Write '0' has no effect."] + #[inline(always)] + pub fn region36(&self) -> REGION36_R { + REGION36_R::new(((self.bits >> 4) & 1) != 0) + } + #[doc = "Bit 5 - Enable protection for region 37. Write '0' has no effect."] + #[inline(always)] + pub fn region37(&self) -> REGION37_R { + REGION37_R::new(((self.bits >> 5) & 1) != 0) + } + #[doc = "Bit 6 - Enable protection for region 38. Write '0' has no effect."] + #[inline(always)] + pub fn region38(&self) -> REGION38_R { + REGION38_R::new(((self.bits >> 6) & 1) != 0) + } + #[doc = "Bit 7 - Enable protection for region 39. Write '0' has no effect."] + #[inline(always)] + pub fn region39(&self) -> REGION39_R { + REGION39_R::new(((self.bits >> 7) & 1) != 0) + } + #[doc = "Bit 8 - Enable protection for region 40. Write '0' has no effect."] + #[inline(always)] + pub fn region40(&self) -> REGION40_R { + REGION40_R::new(((self.bits >> 8) & 1) != 0) + } + #[doc = "Bit 9 - Enable protection for region 41. Write '0' has no effect."] + #[inline(always)] + pub fn region41(&self) -> REGION41_R { + REGION41_R::new(((self.bits >> 9) & 1) != 0) + } + #[doc = "Bit 10 - Enable protection for region 42. Write '0' has no effect."] + #[inline(always)] + pub fn region42(&self) -> REGION42_R { + REGION42_R::new(((self.bits >> 10) & 1) != 0) + } + #[doc = "Bit 11 - Enable protection for region 43. Write '0' has no effect."] + #[inline(always)] + pub fn region43(&self) -> REGION43_R { + REGION43_R::new(((self.bits >> 11) & 1) != 0) + } + #[doc = "Bit 12 - Enable protection for region 44. Write '0' has no effect."] + #[inline(always)] + pub fn region44(&self) -> REGION44_R { + REGION44_R::new(((self.bits >> 12) & 1) != 0) + } + #[doc = "Bit 13 - Enable protection for region 45. Write '0' has no effect."] + #[inline(always)] + pub fn region45(&self) -> REGION45_R { + REGION45_R::new(((self.bits >> 13) & 1) != 0) + } + #[doc = "Bit 14 - Enable protection for region 46. Write '0' has no effect."] + #[inline(always)] + pub fn region46(&self) -> REGION46_R { + REGION46_R::new(((self.bits >> 14) & 1) != 0) + } + #[doc = "Bit 15 - Enable protection for region 47. Write '0' has no effect."] + #[inline(always)] + pub fn region47(&self) -> REGION47_R { + REGION47_R::new(((self.bits >> 15) & 1) != 0) + } + #[doc = "Bit 16 - Enable protection for region 48. Write '0' has no effect."] + #[inline(always)] + pub fn region48(&self) -> REGION48_R { + REGION48_R::new(((self.bits >> 16) & 1) != 0) + } + #[doc = "Bit 17 - Enable protection for region 49. Write '0' has no effect."] + #[inline(always)] + pub fn region49(&self) -> REGION49_R { + REGION49_R::new(((self.bits >> 17) & 1) != 0) + } + #[doc = "Bit 18 - Enable protection for region 50. Write '0' has no effect."] + #[inline(always)] + pub fn region50(&self) -> REGION50_R { + REGION50_R::new(((self.bits >> 18) & 1) != 0) + } + #[doc = "Bit 19 - Enable protection for region 51. Write '0' has no effect."] + #[inline(always)] + pub fn region51(&self) -> REGION51_R { + REGION51_R::new(((self.bits >> 19) & 1) != 0) + } + #[doc = "Bit 20 - Enable protection for region 52. Write '0' has no effect."] + #[inline(always)] + pub fn region52(&self) -> REGION52_R { + REGION52_R::new(((self.bits >> 20) & 1) != 0) + } + #[doc = "Bit 21 - Enable protection for region 53. Write '0' has no effect."] + #[inline(always)] + pub fn region53(&self) -> REGION53_R { + REGION53_R::new(((self.bits >> 21) & 1) != 0) + } + #[doc = "Bit 22 - Enable protection for region 54. Write '0' has no effect."] + #[inline(always)] + pub fn region54(&self) -> REGION54_R { + REGION54_R::new(((self.bits >> 22) & 1) != 0) + } + #[doc = "Bit 23 - Enable protection for region 55. Write '0' has no effect."] + #[inline(always)] + pub fn region55(&self) -> REGION55_R { + REGION55_R::new(((self.bits >> 23) & 1) != 0) + } + #[doc = "Bit 24 - Enable protection for region 56. Write '0' has no effect."] + #[inline(always)] + pub fn region56(&self) -> REGION56_R { + REGION56_R::new(((self.bits >> 24) & 1) != 0) + } + #[doc = "Bit 25 - Enable protection for region 57. Write '0' has no effect."] + #[inline(always)] + pub fn region57(&self) -> REGION57_R { + REGION57_R::new(((self.bits >> 25) & 1) != 0) + } + #[doc = "Bit 26 - Enable protection for region 58. Write '0' has no effect."] + #[inline(always)] + pub fn region58(&self) -> REGION58_R { + REGION58_R::new(((self.bits >> 26) & 1) != 0) + } + #[doc = "Bit 27 - Enable protection for region 59. Write '0' has no effect."] + #[inline(always)] + pub fn region59(&self) -> REGION59_R { + REGION59_R::new(((self.bits >> 27) & 1) != 0) + } + #[doc = "Bit 28 - Enable protection for region 60. Write '0' has no effect."] + #[inline(always)] + pub fn region60(&self) -> REGION60_R { + REGION60_R::new(((self.bits >> 28) & 1) != 0) + } + #[doc = "Bit 29 - Enable protection for region 61. Write '0' has no effect."] + #[inline(always)] + pub fn region61(&self) -> REGION61_R { + REGION61_R::new(((self.bits >> 29) & 1) != 0) + } + #[doc = "Bit 30 - Enable protection for region 62. Write '0' has no effect."] + #[inline(always)] + pub fn region62(&self) -> REGION62_R { + REGION62_R::new(((self.bits >> 30) & 1) != 0) + } + #[doc = "Bit 31 - Enable protection for region 63. Write '0' has no effect."] + #[inline(always)] + pub fn region63(&self) -> REGION63_R { + REGION63_R::new(((self.bits >> 31) & 1) != 0) + } +} +impl W { + #[doc = "Bit 0 - Enable protection for region 32. Write '0' has no effect."] + #[inline(always)] + #[must_use] + pub fn region32(&mut self) -> REGION32_W<0> { + REGION32_W::new(self) + } + #[doc = "Bit 1 - Enable protection for region 33. Write '0' has no effect."] + #[inline(always)] + #[must_use] + pub fn region33(&mut self) -> REGION33_W<1> { + REGION33_W::new(self) + } + #[doc = "Bit 2 - Enable protection for region 34. Write '0' has no effect."] + #[inline(always)] + #[must_use] + pub fn region34(&mut self) -> REGION34_W<2> { + REGION34_W::new(self) + } + #[doc = "Bit 3 - Enable protection for region 35. Write '0' has no effect."] + #[inline(always)] + #[must_use] + pub fn region35(&mut self) -> REGION35_W<3> { + REGION35_W::new(self) + } + #[doc = "Bit 4 - Enable protection for region 36. Write '0' has no effect."] + #[inline(always)] + #[must_use] + pub fn region36(&mut self) -> REGION36_W<4> { + REGION36_W::new(self) + } + #[doc = "Bit 5 - Enable protection for region 37. Write '0' has no effect."] + #[inline(always)] + #[must_use] + pub fn region37(&mut self) -> REGION37_W<5> { + REGION37_W::new(self) + } + #[doc = "Bit 6 - Enable protection for region 38. Write '0' has no effect."] + #[inline(always)] + #[must_use] + pub fn region38(&mut self) -> REGION38_W<6> { + REGION38_W::new(self) + } + #[doc = "Bit 7 - Enable protection for region 39. Write '0' has no effect."] + #[inline(always)] + #[must_use] + pub fn region39(&mut self) -> REGION39_W<7> { + REGION39_W::new(self) + } + #[doc = "Bit 8 - Enable protection for region 40. Write '0' has no effect."] + #[inline(always)] + #[must_use] + pub fn region40(&mut self) -> REGION40_W<8> { + REGION40_W::new(self) + } + #[doc = "Bit 9 - Enable protection for region 41. Write '0' has no effect."] + #[inline(always)] + #[must_use] + pub fn region41(&mut self) -> REGION41_W<9> { + REGION41_W::new(self) + } + #[doc = "Bit 10 - Enable protection for region 42. Write '0' has no effect."] + #[inline(always)] + #[must_use] + pub fn region42(&mut self) -> REGION42_W<10> { + REGION42_W::new(self) + } + #[doc = "Bit 11 - Enable protection for region 43. Write '0' has no effect."] + #[inline(always)] + #[must_use] + pub fn region43(&mut self) -> REGION43_W<11> { + REGION43_W::new(self) + } + #[doc = "Bit 12 - Enable protection for region 44. Write '0' has no effect."] + #[inline(always)] + #[must_use] + pub fn region44(&mut self) -> REGION44_W<12> { + REGION44_W::new(self) + } + #[doc = "Bit 13 - Enable protection for region 45. Write '0' has no effect."] + #[inline(always)] + #[must_use] + pub fn region45(&mut self) -> REGION45_W<13> { + REGION45_W::new(self) + } + #[doc = "Bit 14 - Enable protection for region 46. Write '0' has no effect."] + #[inline(always)] + #[must_use] + pub fn region46(&mut self) -> REGION46_W<14> { + REGION46_W::new(self) + } + #[doc = "Bit 15 - Enable protection for region 47. Write '0' has no effect."] + #[inline(always)] + #[must_use] + pub fn region47(&mut self) -> REGION47_W<15> { + REGION47_W::new(self) + } + #[doc = "Bit 16 - Enable protection for region 48. Write '0' has no effect."] + #[inline(always)] + #[must_use] + pub fn region48(&mut self) -> REGION48_W<16> { + REGION48_W::new(self) + } + #[doc = "Bit 17 - Enable protection for region 49. Write '0' has no effect."] + #[inline(always)] + #[must_use] + pub fn region49(&mut self) -> REGION49_W<17> { + REGION49_W::new(self) + } + #[doc = "Bit 18 - Enable protection for region 50. Write '0' has no effect."] + #[inline(always)] + #[must_use] + pub fn region50(&mut self) -> REGION50_W<18> { + REGION50_W::new(self) + } + #[doc = "Bit 19 - Enable protection for region 51. Write '0' has no effect."] + #[inline(always)] + #[must_use] + pub fn region51(&mut self) -> REGION51_W<19> { + REGION51_W::new(self) + } + #[doc = "Bit 20 - Enable protection for region 52. Write '0' has no effect."] + #[inline(always)] + #[must_use] + pub fn region52(&mut self) -> REGION52_W<20> { + REGION52_W::new(self) + } + #[doc = "Bit 21 - Enable protection for region 53. Write '0' has no effect."] + #[inline(always)] + #[must_use] + pub fn region53(&mut self) -> REGION53_W<21> { + REGION53_W::new(self) + } + #[doc = "Bit 22 - Enable protection for region 54. Write '0' has no effect."] + #[inline(always)] + #[must_use] + pub fn region54(&mut self) -> REGION54_W<22> { + REGION54_W::new(self) + } + #[doc = "Bit 23 - Enable protection for region 55. Write '0' has no effect."] + #[inline(always)] + #[must_use] + pub fn region55(&mut self) -> REGION55_W<23> { + REGION55_W::new(self) + } + #[doc = "Bit 24 - Enable protection for region 56. Write '0' has no effect."] + #[inline(always)] + #[must_use] + pub fn region56(&mut self) -> REGION56_W<24> { + REGION56_W::new(self) + } + #[doc = "Bit 25 - Enable protection for region 57. Write '0' has no effect."] + #[inline(always)] + #[must_use] + pub fn region57(&mut self) -> REGION57_W<25> { + REGION57_W::new(self) + } + #[doc = "Bit 26 - Enable protection for region 58. Write '0' has no effect."] + #[inline(always)] + #[must_use] + pub fn region58(&mut self) -> REGION58_W<26> { + REGION58_W::new(self) + } + #[doc = "Bit 27 - Enable protection for region 59. Write '0' has no effect."] + #[inline(always)] + #[must_use] + pub fn region59(&mut self) -> REGION59_W<27> { + REGION59_W::new(self) + } + #[doc = "Bit 28 - Enable protection for region 60. Write '0' has no effect."] + #[inline(always)] + #[must_use] + pub fn region60(&mut self) -> REGION60_W<28> { + REGION60_W::new(self) + } + #[doc = "Bit 29 - Enable protection for region 61. Write '0' has no effect."] + #[inline(always)] + #[must_use] + pub fn region61(&mut self) -> REGION61_W<29> { + REGION61_W::new(self) + } + #[doc = "Bit 30 - Enable protection for region 62. Write '0' has no effect."] + #[inline(always)] + #[must_use] + pub fn region62(&mut self) -> REGION62_W<30> { + REGION62_W::new(self) + } + #[doc = "Bit 31 - Enable protection for region 63. Write '0' has no effect."] + #[inline(always)] + #[must_use] + pub fn region63(&mut self) -> REGION63_W<31> { + REGION63_W::new(self) + } + #[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 = "Block protect configuration register 1\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 [config1](index.html) module"] +pub struct CONFIG1_SPEC; +impl crate::RegisterSpec for CONFIG1_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [config1::R](R) reader structure"] +impl crate::Readable for CONFIG1_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [config1::W](W) writer structure"] +impl crate::Writable for 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 CONFIG1 to value 0"] +impl crate::Resettable for CONFIG1_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/bprot/config2.rs b/down-the-stack/dk_pac/src/bprot/config2.rs new file mode 100644 index 0000000..55c8f74 --- /dev/null +++ b/down-the-stack/dk_pac/src/bprot/config2.rs @@ -0,0 +1,2017 @@ +#[doc = "Register `CONFIG2` 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 `CONFIG2` 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 `REGION64` reader - Enable protection for region 64. Write '0' has no effect."] +pub type REGION64_R = crate::BitReader; +#[doc = "Enable protection for region 64. Write '0' has no effect.\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum REGION64_A { + #[doc = "0: Protection disabled"] + DISABLED = 0, + #[doc = "1: Protection enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: REGION64_A) -> Self { + variant as u8 != 0 + } +} +impl REGION64_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> REGION64_A { + match self.bits { + false => REGION64_A::DISABLED, + true => REGION64_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == REGION64_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == REGION64_A::ENABLED + } +} +#[doc = "Field `REGION64` writer - Enable protection for region 64. Write '0' has no effect."] +pub type REGION64_W<'a, const O: u8> = crate::BitWriter<'a, u32, CONFIG2_SPEC, REGION64_A, O>; +impl<'a, const O: u8> REGION64_W<'a, O> { + #[doc = "Protection disabled"] + #[inline(always)] + pub fn disabled(self) -> &'a mut W { + self.variant(REGION64_A::DISABLED) + } + #[doc = "Protection enabled"] + #[inline(always)] + pub fn enabled(self) -> &'a mut W { + self.variant(REGION64_A::ENABLED) + } +} +#[doc = "Field `REGION65` reader - Enable protection for region 65. Write '0' has no effect."] +pub type REGION65_R = crate::BitReader; +#[doc = "Enable protection for region 65. Write '0' has no effect.\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum REGION65_A { + #[doc = "0: Protection disabled"] + DISABLED = 0, + #[doc = "1: Protection enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: REGION65_A) -> Self { + variant as u8 != 0 + } +} +impl REGION65_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> REGION65_A { + match self.bits { + false => REGION65_A::DISABLED, + true => REGION65_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == REGION65_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == REGION65_A::ENABLED + } +} +#[doc = "Field `REGION65` writer - Enable protection for region 65. Write '0' has no effect."] +pub type REGION65_W<'a, const O: u8> = crate::BitWriter<'a, u32, CONFIG2_SPEC, REGION65_A, O>; +impl<'a, const O: u8> REGION65_W<'a, O> { + #[doc = "Protection disabled"] + #[inline(always)] + pub fn disabled(self) -> &'a mut W { + self.variant(REGION65_A::DISABLED) + } + #[doc = "Protection enabled"] + #[inline(always)] + pub fn enabled(self) -> &'a mut W { + self.variant(REGION65_A::ENABLED) + } +} +#[doc = "Field `REGION66` reader - Enable protection for region 66. Write '0' has no effect."] +pub type REGION66_R = crate::BitReader; +#[doc = "Enable protection for region 66. Write '0' has no effect.\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum REGION66_A { + #[doc = "0: Protection disabled"] + DISABLED = 0, + #[doc = "1: Protection enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: REGION66_A) -> Self { + variant as u8 != 0 + } +} +impl REGION66_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> REGION66_A { + match self.bits { + false => REGION66_A::DISABLED, + true => REGION66_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == REGION66_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == REGION66_A::ENABLED + } +} +#[doc = "Field `REGION66` writer - Enable protection for region 66. Write '0' has no effect."] +pub type REGION66_W<'a, const O: u8> = crate::BitWriter<'a, u32, CONFIG2_SPEC, REGION66_A, O>; +impl<'a, const O: u8> REGION66_W<'a, O> { + #[doc = "Protection disabled"] + #[inline(always)] + pub fn disabled(self) -> &'a mut W { + self.variant(REGION66_A::DISABLED) + } + #[doc = "Protection enabled"] + #[inline(always)] + pub fn enabled(self) -> &'a mut W { + self.variant(REGION66_A::ENABLED) + } +} +#[doc = "Field `REGION67` reader - Enable protection for region 67. Write '0' has no effect."] +pub type REGION67_R = crate::BitReader; +#[doc = "Enable protection for region 67. Write '0' has no effect.\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum REGION67_A { + #[doc = "0: Protection disabled"] + DISABLED = 0, + #[doc = "1: Protection enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: REGION67_A) -> Self { + variant as u8 != 0 + } +} +impl REGION67_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> REGION67_A { + match self.bits { + false => REGION67_A::DISABLED, + true => REGION67_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == REGION67_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == REGION67_A::ENABLED + } +} +#[doc = "Field `REGION67` writer - Enable protection for region 67. Write '0' has no effect."] +pub type REGION67_W<'a, const O: u8> = crate::BitWriter<'a, u32, CONFIG2_SPEC, REGION67_A, O>; +impl<'a, const O: u8> REGION67_W<'a, O> { + #[doc = "Protection disabled"] + #[inline(always)] + pub fn disabled(self) -> &'a mut W { + self.variant(REGION67_A::DISABLED) + } + #[doc = "Protection enabled"] + #[inline(always)] + pub fn enabled(self) -> &'a mut W { + self.variant(REGION67_A::ENABLED) + } +} +#[doc = "Field `REGION68` reader - Enable protection for region 68. Write '0' has no effect."] +pub type REGION68_R = crate::BitReader; +#[doc = "Enable protection for region 68. Write '0' has no effect.\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum REGION68_A { + #[doc = "0: Protection disabled"] + DISABLED = 0, + #[doc = "1: Protection enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: REGION68_A) -> Self { + variant as u8 != 0 + } +} +impl REGION68_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> REGION68_A { + match self.bits { + false => REGION68_A::DISABLED, + true => REGION68_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == REGION68_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == REGION68_A::ENABLED + } +} +#[doc = "Field `REGION68` writer - Enable protection for region 68. Write '0' has no effect."] +pub type REGION68_W<'a, const O: u8> = crate::BitWriter<'a, u32, CONFIG2_SPEC, REGION68_A, O>; +impl<'a, const O: u8> REGION68_W<'a, O> { + #[doc = "Protection disabled"] + #[inline(always)] + pub fn disabled(self) -> &'a mut W { + self.variant(REGION68_A::DISABLED) + } + #[doc = "Protection enabled"] + #[inline(always)] + pub fn enabled(self) -> &'a mut W { + self.variant(REGION68_A::ENABLED) + } +} +#[doc = "Field `REGION69` reader - Enable protection for region 69. Write '0' has no effect."] +pub type REGION69_R = crate::BitReader; +#[doc = "Enable protection for region 69. Write '0' has no effect.\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum REGION69_A { + #[doc = "0: Protection disabled"] + DISABLED = 0, + #[doc = "1: Protection enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: REGION69_A) -> Self { + variant as u8 != 0 + } +} +impl REGION69_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> REGION69_A { + match self.bits { + false => REGION69_A::DISABLED, + true => REGION69_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == REGION69_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == REGION69_A::ENABLED + } +} +#[doc = "Field `REGION69` writer - Enable protection for region 69. Write '0' has no effect."] +pub type REGION69_W<'a, const O: u8> = crate::BitWriter<'a, u32, CONFIG2_SPEC, REGION69_A, O>; +impl<'a, const O: u8> REGION69_W<'a, O> { + #[doc = "Protection disabled"] + #[inline(always)] + pub fn disabled(self) -> &'a mut W { + self.variant(REGION69_A::DISABLED) + } + #[doc = "Protection enabled"] + #[inline(always)] + pub fn enabled(self) -> &'a mut W { + self.variant(REGION69_A::ENABLED) + } +} +#[doc = "Field `REGION70` reader - Enable protection for region 70. Write '0' has no effect."] +pub type REGION70_R = crate::BitReader; +#[doc = "Enable protection for region 70. Write '0' has no effect.\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum REGION70_A { + #[doc = "0: Protection disabled"] + DISABLED = 0, + #[doc = "1: Protection enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: REGION70_A) -> Self { + variant as u8 != 0 + } +} +impl REGION70_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> REGION70_A { + match self.bits { + false => REGION70_A::DISABLED, + true => REGION70_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == REGION70_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == REGION70_A::ENABLED + } +} +#[doc = "Field `REGION70` writer - Enable protection for region 70. Write '0' has no effect."] +pub type REGION70_W<'a, const O: u8> = crate::BitWriter<'a, u32, CONFIG2_SPEC, REGION70_A, O>; +impl<'a, const O: u8> REGION70_W<'a, O> { + #[doc = "Protection disabled"] + #[inline(always)] + pub fn disabled(self) -> &'a mut W { + self.variant(REGION70_A::DISABLED) + } + #[doc = "Protection enabled"] + #[inline(always)] + pub fn enabled(self) -> &'a mut W { + self.variant(REGION70_A::ENABLED) + } +} +#[doc = "Field `REGION71` reader - Enable protection for region 71. Write '0' has no effect."] +pub type REGION71_R = crate::BitReader; +#[doc = "Enable protection for region 71. Write '0' has no effect.\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum REGION71_A { + #[doc = "0: Protection disabled"] + DISABLED = 0, + #[doc = "1: Protection enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: REGION71_A) -> Self { + variant as u8 != 0 + } +} +impl REGION71_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> REGION71_A { + match self.bits { + false => REGION71_A::DISABLED, + true => REGION71_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == REGION71_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == REGION71_A::ENABLED + } +} +#[doc = "Field `REGION71` writer - Enable protection for region 71. Write '0' has no effect."] +pub type REGION71_W<'a, const O: u8> = crate::BitWriter<'a, u32, CONFIG2_SPEC, REGION71_A, O>; +impl<'a, const O: u8> REGION71_W<'a, O> { + #[doc = "Protection disabled"] + #[inline(always)] + pub fn disabled(self) -> &'a mut W { + self.variant(REGION71_A::DISABLED) + } + #[doc = "Protection enabled"] + #[inline(always)] + pub fn enabled(self) -> &'a mut W { + self.variant(REGION71_A::ENABLED) + } +} +#[doc = "Field `REGION72` reader - Enable protection for region 72. Write '0' has no effect."] +pub type REGION72_R = crate::BitReader; +#[doc = "Enable protection for region 72. Write '0' has no effect.\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum REGION72_A { + #[doc = "0: Protection disabled"] + DISABLED = 0, + #[doc = "1: Protection enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: REGION72_A) -> Self { + variant as u8 != 0 + } +} +impl REGION72_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> REGION72_A { + match self.bits { + false => REGION72_A::DISABLED, + true => REGION72_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == REGION72_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == REGION72_A::ENABLED + } +} +#[doc = "Field `REGION72` writer - Enable protection for region 72. Write '0' has no effect."] +pub type REGION72_W<'a, const O: u8> = crate::BitWriter<'a, u32, CONFIG2_SPEC, REGION72_A, O>; +impl<'a, const O: u8> REGION72_W<'a, O> { + #[doc = "Protection disabled"] + #[inline(always)] + pub fn disabled(self) -> &'a mut W { + self.variant(REGION72_A::DISABLED) + } + #[doc = "Protection enabled"] + #[inline(always)] + pub fn enabled(self) -> &'a mut W { + self.variant(REGION72_A::ENABLED) + } +} +#[doc = "Field `REGION73` reader - Enable protection for region 73. Write '0' has no effect."] +pub type REGION73_R = crate::BitReader; +#[doc = "Enable protection for region 73. Write '0' has no effect.\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum REGION73_A { + #[doc = "0: Protection disabled"] + DISABLED = 0, + #[doc = "1: Protection enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: REGION73_A) -> Self { + variant as u8 != 0 + } +} +impl REGION73_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> REGION73_A { + match self.bits { + false => REGION73_A::DISABLED, + true => REGION73_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == REGION73_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == REGION73_A::ENABLED + } +} +#[doc = "Field `REGION73` writer - Enable protection for region 73. Write '0' has no effect."] +pub type REGION73_W<'a, const O: u8> = crate::BitWriter<'a, u32, CONFIG2_SPEC, REGION73_A, O>; +impl<'a, const O: u8> REGION73_W<'a, O> { + #[doc = "Protection disabled"] + #[inline(always)] + pub fn disabled(self) -> &'a mut W { + self.variant(REGION73_A::DISABLED) + } + #[doc = "Protection enabled"] + #[inline(always)] + pub fn enabled(self) -> &'a mut W { + self.variant(REGION73_A::ENABLED) + } +} +#[doc = "Field `REGION74` reader - Enable protection for region 74. Write '0' has no effect."] +pub type REGION74_R = crate::BitReader; +#[doc = "Enable protection for region 74. Write '0' has no effect.\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum REGION74_A { + #[doc = "0: Protection disabled"] + DISABLED = 0, + #[doc = "1: Protection enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: REGION74_A) -> Self { + variant as u8 != 0 + } +} +impl REGION74_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> REGION74_A { + match self.bits { + false => REGION74_A::DISABLED, + true => REGION74_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == REGION74_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == REGION74_A::ENABLED + } +} +#[doc = "Field `REGION74` writer - Enable protection for region 74. Write '0' has no effect."] +pub type REGION74_W<'a, const O: u8> = crate::BitWriter<'a, u32, CONFIG2_SPEC, REGION74_A, O>; +impl<'a, const O: u8> REGION74_W<'a, O> { + #[doc = "Protection disabled"] + #[inline(always)] + pub fn disabled(self) -> &'a mut W { + self.variant(REGION74_A::DISABLED) + } + #[doc = "Protection enabled"] + #[inline(always)] + pub fn enabled(self) -> &'a mut W { + self.variant(REGION74_A::ENABLED) + } +} +#[doc = "Field `REGION75` reader - Enable protection for region 75. Write '0' has no effect."] +pub type REGION75_R = crate::BitReader; +#[doc = "Enable protection for region 75. Write '0' has no effect.\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum REGION75_A { + #[doc = "0: Protection disabled"] + DISABLED = 0, + #[doc = "1: Protection enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: REGION75_A) -> Self { + variant as u8 != 0 + } +} +impl REGION75_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> REGION75_A { + match self.bits { + false => REGION75_A::DISABLED, + true => REGION75_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == REGION75_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == REGION75_A::ENABLED + } +} +#[doc = "Field `REGION75` writer - Enable protection for region 75. Write '0' has no effect."] +pub type REGION75_W<'a, const O: u8> = crate::BitWriter<'a, u32, CONFIG2_SPEC, REGION75_A, O>; +impl<'a, const O: u8> REGION75_W<'a, O> { + #[doc = "Protection disabled"] + #[inline(always)] + pub fn disabled(self) -> &'a mut W { + self.variant(REGION75_A::DISABLED) + } + #[doc = "Protection enabled"] + #[inline(always)] + pub fn enabled(self) -> &'a mut W { + self.variant(REGION75_A::ENABLED) + } +} +#[doc = "Field `REGION76` reader - Enable protection for region 76. Write '0' has no effect."] +pub type REGION76_R = crate::BitReader; +#[doc = "Enable protection for region 76. Write '0' has no effect.\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum REGION76_A { + #[doc = "0: Protection disabled"] + DISABLED = 0, + #[doc = "1: Protection enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: REGION76_A) -> Self { + variant as u8 != 0 + } +} +impl REGION76_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> REGION76_A { + match self.bits { + false => REGION76_A::DISABLED, + true => REGION76_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == REGION76_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == REGION76_A::ENABLED + } +} +#[doc = "Field `REGION76` writer - Enable protection for region 76. Write '0' has no effect."] +pub type REGION76_W<'a, const O: u8> = crate::BitWriter<'a, u32, CONFIG2_SPEC, REGION76_A, O>; +impl<'a, const O: u8> REGION76_W<'a, O> { + #[doc = "Protection disabled"] + #[inline(always)] + pub fn disabled(self) -> &'a mut W { + self.variant(REGION76_A::DISABLED) + } + #[doc = "Protection enabled"] + #[inline(always)] + pub fn enabled(self) -> &'a mut W { + self.variant(REGION76_A::ENABLED) + } +} +#[doc = "Field `REGION77` reader - Enable protection for region 77. Write '0' has no effect."] +pub type REGION77_R = crate::BitReader; +#[doc = "Enable protection for region 77. Write '0' has no effect.\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum REGION77_A { + #[doc = "0: Protection disabled"] + DISABLED = 0, + #[doc = "1: Protection enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: REGION77_A) -> Self { + variant as u8 != 0 + } +} +impl REGION77_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> REGION77_A { + match self.bits { + false => REGION77_A::DISABLED, + true => REGION77_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == REGION77_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == REGION77_A::ENABLED + } +} +#[doc = "Field `REGION77` writer - Enable protection for region 77. Write '0' has no effect."] +pub type REGION77_W<'a, const O: u8> = crate::BitWriter<'a, u32, CONFIG2_SPEC, REGION77_A, O>; +impl<'a, const O: u8> REGION77_W<'a, O> { + #[doc = "Protection disabled"] + #[inline(always)] + pub fn disabled(self) -> &'a mut W { + self.variant(REGION77_A::DISABLED) + } + #[doc = "Protection enabled"] + #[inline(always)] + pub fn enabled(self) -> &'a mut W { + self.variant(REGION77_A::ENABLED) + } +} +#[doc = "Field `REGION78` reader - Enable protection for region 78. Write '0' has no effect."] +pub type REGION78_R = crate::BitReader; +#[doc = "Enable protection for region 78. Write '0' has no effect.\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum REGION78_A { + #[doc = "0: Protection disabled"] + DISABLED = 0, + #[doc = "1: Protection enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: REGION78_A) -> Self { + variant as u8 != 0 + } +} +impl REGION78_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> REGION78_A { + match self.bits { + false => REGION78_A::DISABLED, + true => REGION78_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == REGION78_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == REGION78_A::ENABLED + } +} +#[doc = "Field `REGION78` writer - Enable protection for region 78. Write '0' has no effect."] +pub type REGION78_W<'a, const O: u8> = crate::BitWriter<'a, u32, CONFIG2_SPEC, REGION78_A, O>; +impl<'a, const O: u8> REGION78_W<'a, O> { + #[doc = "Protection disabled"] + #[inline(always)] + pub fn disabled(self) -> &'a mut W { + self.variant(REGION78_A::DISABLED) + } + #[doc = "Protection enabled"] + #[inline(always)] + pub fn enabled(self) -> &'a mut W { + self.variant(REGION78_A::ENABLED) + } +} +#[doc = "Field `REGION79` reader - Enable protection for region 79. Write '0' has no effect."] +pub type REGION79_R = crate::BitReader; +#[doc = "Enable protection for region 79. Write '0' has no effect.\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum REGION79_A { + #[doc = "0: Protection disabled"] + DISABLED = 0, + #[doc = "1: Protection enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: REGION79_A) -> Self { + variant as u8 != 0 + } +} +impl REGION79_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> REGION79_A { + match self.bits { + false => REGION79_A::DISABLED, + true => REGION79_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == REGION79_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == REGION79_A::ENABLED + } +} +#[doc = "Field `REGION79` writer - Enable protection for region 79. Write '0' has no effect."] +pub type REGION79_W<'a, const O: u8> = crate::BitWriter<'a, u32, CONFIG2_SPEC, REGION79_A, O>; +impl<'a, const O: u8> REGION79_W<'a, O> { + #[doc = "Protection disabled"] + #[inline(always)] + pub fn disabled(self) -> &'a mut W { + self.variant(REGION79_A::DISABLED) + } + #[doc = "Protection enabled"] + #[inline(always)] + pub fn enabled(self) -> &'a mut W { + self.variant(REGION79_A::ENABLED) + } +} +#[doc = "Field `REGION80` reader - Enable protection for region 80. Write '0' has no effect."] +pub type REGION80_R = crate::BitReader; +#[doc = "Enable protection for region 80. Write '0' has no effect.\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum REGION80_A { + #[doc = "0: Protection disabled"] + DISABLED = 0, + #[doc = "1: Protection enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: REGION80_A) -> Self { + variant as u8 != 0 + } +} +impl REGION80_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> REGION80_A { + match self.bits { + false => REGION80_A::DISABLED, + true => REGION80_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == REGION80_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == REGION80_A::ENABLED + } +} +#[doc = "Field `REGION80` writer - Enable protection for region 80. Write '0' has no effect."] +pub type REGION80_W<'a, const O: u8> = crate::BitWriter<'a, u32, CONFIG2_SPEC, REGION80_A, O>; +impl<'a, const O: u8> REGION80_W<'a, O> { + #[doc = "Protection disabled"] + #[inline(always)] + pub fn disabled(self) -> &'a mut W { + self.variant(REGION80_A::DISABLED) + } + #[doc = "Protection enabled"] + #[inline(always)] + pub fn enabled(self) -> &'a mut W { + self.variant(REGION80_A::ENABLED) + } +} +#[doc = "Field `REGION81` reader - Enable protection for region 81. Write '0' has no effect."] +pub type REGION81_R = crate::BitReader; +#[doc = "Enable protection for region 81. Write '0' has no effect.\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum REGION81_A { + #[doc = "0: Protection disabled"] + DISABLED = 0, + #[doc = "1: Protection enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: REGION81_A) -> Self { + variant as u8 != 0 + } +} +impl REGION81_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> REGION81_A { + match self.bits { + false => REGION81_A::DISABLED, + true => REGION81_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == REGION81_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == REGION81_A::ENABLED + } +} +#[doc = "Field `REGION81` writer - Enable protection for region 81. Write '0' has no effect."] +pub type REGION81_W<'a, const O: u8> = crate::BitWriter<'a, u32, CONFIG2_SPEC, REGION81_A, O>; +impl<'a, const O: u8> REGION81_W<'a, O> { + #[doc = "Protection disabled"] + #[inline(always)] + pub fn disabled(self) -> &'a mut W { + self.variant(REGION81_A::DISABLED) + } + #[doc = "Protection enabled"] + #[inline(always)] + pub fn enabled(self) -> &'a mut W { + self.variant(REGION81_A::ENABLED) + } +} +#[doc = "Field `REGION82` reader - Enable protection for region 82. Write '0' has no effect."] +pub type REGION82_R = crate::BitReader; +#[doc = "Enable protection for region 82. Write '0' has no effect.\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum REGION82_A { + #[doc = "0: Protection disabled"] + DISABLED = 0, + #[doc = "1: Protection enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: REGION82_A) -> Self { + variant as u8 != 0 + } +} +impl REGION82_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> REGION82_A { + match self.bits { + false => REGION82_A::DISABLED, + true => REGION82_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == REGION82_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == REGION82_A::ENABLED + } +} +#[doc = "Field `REGION82` writer - Enable protection for region 82. Write '0' has no effect."] +pub type REGION82_W<'a, const O: u8> = crate::BitWriter<'a, u32, CONFIG2_SPEC, REGION82_A, O>; +impl<'a, const O: u8> REGION82_W<'a, O> { + #[doc = "Protection disabled"] + #[inline(always)] + pub fn disabled(self) -> &'a mut W { + self.variant(REGION82_A::DISABLED) + } + #[doc = "Protection enabled"] + #[inline(always)] + pub fn enabled(self) -> &'a mut W { + self.variant(REGION82_A::ENABLED) + } +} +#[doc = "Field `REGION83` reader - Enable protection for region 83. Write '0' has no effect."] +pub type REGION83_R = crate::BitReader; +#[doc = "Enable protection for region 83. Write '0' has no effect.\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum REGION83_A { + #[doc = "0: Protection disabled"] + DISABLED = 0, + #[doc = "1: Protection enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: REGION83_A) -> Self { + variant as u8 != 0 + } +} +impl REGION83_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> REGION83_A { + match self.bits { + false => REGION83_A::DISABLED, + true => REGION83_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == REGION83_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == REGION83_A::ENABLED + } +} +#[doc = "Field `REGION83` writer - Enable protection for region 83. Write '0' has no effect."] +pub type REGION83_W<'a, const O: u8> = crate::BitWriter<'a, u32, CONFIG2_SPEC, REGION83_A, O>; +impl<'a, const O: u8> REGION83_W<'a, O> { + #[doc = "Protection disabled"] + #[inline(always)] + pub fn disabled(self) -> &'a mut W { + self.variant(REGION83_A::DISABLED) + } + #[doc = "Protection enabled"] + #[inline(always)] + pub fn enabled(self) -> &'a mut W { + self.variant(REGION83_A::ENABLED) + } +} +#[doc = "Field `REGION84` reader - Enable protection for region 84. Write '0' has no effect."] +pub type REGION84_R = crate::BitReader; +#[doc = "Enable protection for region 84. Write '0' has no effect.\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum REGION84_A { + #[doc = "0: Protection disabled"] + DISABLED = 0, + #[doc = "1: Protection enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: REGION84_A) -> Self { + variant as u8 != 0 + } +} +impl REGION84_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> REGION84_A { + match self.bits { + false => REGION84_A::DISABLED, + true => REGION84_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == REGION84_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == REGION84_A::ENABLED + } +} +#[doc = "Field `REGION84` writer - Enable protection for region 84. Write '0' has no effect."] +pub type REGION84_W<'a, const O: u8> = crate::BitWriter<'a, u32, CONFIG2_SPEC, REGION84_A, O>; +impl<'a, const O: u8> REGION84_W<'a, O> { + #[doc = "Protection disabled"] + #[inline(always)] + pub fn disabled(self) -> &'a mut W { + self.variant(REGION84_A::DISABLED) + } + #[doc = "Protection enabled"] + #[inline(always)] + pub fn enabled(self) -> &'a mut W { + self.variant(REGION84_A::ENABLED) + } +} +#[doc = "Field `REGION85` reader - Enable protection for region 85. Write '0' has no effect."] +pub type REGION85_R = crate::BitReader; +#[doc = "Enable protection for region 85. Write '0' has no effect.\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum REGION85_A { + #[doc = "0: Protection disabled"] + DISABLED = 0, + #[doc = "1: Protection enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: REGION85_A) -> Self { + variant as u8 != 0 + } +} +impl REGION85_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> REGION85_A { + match self.bits { + false => REGION85_A::DISABLED, + true => REGION85_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == REGION85_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == REGION85_A::ENABLED + } +} +#[doc = "Field `REGION85` writer - Enable protection for region 85. Write '0' has no effect."] +pub type REGION85_W<'a, const O: u8> = crate::BitWriter<'a, u32, CONFIG2_SPEC, REGION85_A, O>; +impl<'a, const O: u8> REGION85_W<'a, O> { + #[doc = "Protection disabled"] + #[inline(always)] + pub fn disabled(self) -> &'a mut W { + self.variant(REGION85_A::DISABLED) + } + #[doc = "Protection enabled"] + #[inline(always)] + pub fn enabled(self) -> &'a mut W { + self.variant(REGION85_A::ENABLED) + } +} +#[doc = "Field `REGION86` reader - Enable protection for region 86. Write '0' has no effect."] +pub type REGION86_R = crate::BitReader; +#[doc = "Enable protection for region 86. Write '0' has no effect.\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum REGION86_A { + #[doc = "0: Protection disabled"] + DISABLED = 0, + #[doc = "1: Protection enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: REGION86_A) -> Self { + variant as u8 != 0 + } +} +impl REGION86_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> REGION86_A { + match self.bits { + false => REGION86_A::DISABLED, + true => REGION86_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == REGION86_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == REGION86_A::ENABLED + } +} +#[doc = "Field `REGION86` writer - Enable protection for region 86. Write '0' has no effect."] +pub type REGION86_W<'a, const O: u8> = crate::BitWriter<'a, u32, CONFIG2_SPEC, REGION86_A, O>; +impl<'a, const O: u8> REGION86_W<'a, O> { + #[doc = "Protection disabled"] + #[inline(always)] + pub fn disabled(self) -> &'a mut W { + self.variant(REGION86_A::DISABLED) + } + #[doc = "Protection enabled"] + #[inline(always)] + pub fn enabled(self) -> &'a mut W { + self.variant(REGION86_A::ENABLED) + } +} +#[doc = "Field `REGION87` reader - Enable protection for region 87. Write '0' has no effect."] +pub type REGION87_R = crate::BitReader; +#[doc = "Enable protection for region 87. Write '0' has no effect.\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum REGION87_A { + #[doc = "0: Protection disabled"] + DISABLED = 0, + #[doc = "1: Protection enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: REGION87_A) -> Self { + variant as u8 != 0 + } +} +impl REGION87_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> REGION87_A { + match self.bits { + false => REGION87_A::DISABLED, + true => REGION87_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == REGION87_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == REGION87_A::ENABLED + } +} +#[doc = "Field `REGION87` writer - Enable protection for region 87. Write '0' has no effect."] +pub type REGION87_W<'a, const O: u8> = crate::BitWriter<'a, u32, CONFIG2_SPEC, REGION87_A, O>; +impl<'a, const O: u8> REGION87_W<'a, O> { + #[doc = "Protection disabled"] + #[inline(always)] + pub fn disabled(self) -> &'a mut W { + self.variant(REGION87_A::DISABLED) + } + #[doc = "Protection enabled"] + #[inline(always)] + pub fn enabled(self) -> &'a mut W { + self.variant(REGION87_A::ENABLED) + } +} +#[doc = "Field `REGION88` reader - Enable protection for region 88. Write '0' has no effect."] +pub type REGION88_R = crate::BitReader; +#[doc = "Enable protection for region 88. Write '0' has no effect.\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum REGION88_A { + #[doc = "0: Protection disabled"] + DISABLED = 0, + #[doc = "1: Protection enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: REGION88_A) -> Self { + variant as u8 != 0 + } +} +impl REGION88_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> REGION88_A { + match self.bits { + false => REGION88_A::DISABLED, + true => REGION88_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == REGION88_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == REGION88_A::ENABLED + } +} +#[doc = "Field `REGION88` writer - Enable protection for region 88. Write '0' has no effect."] +pub type REGION88_W<'a, const O: u8> = crate::BitWriter<'a, u32, CONFIG2_SPEC, REGION88_A, O>; +impl<'a, const O: u8> REGION88_W<'a, O> { + #[doc = "Protection disabled"] + #[inline(always)] + pub fn disabled(self) -> &'a mut W { + self.variant(REGION88_A::DISABLED) + } + #[doc = "Protection enabled"] + #[inline(always)] + pub fn enabled(self) -> &'a mut W { + self.variant(REGION88_A::ENABLED) + } +} +#[doc = "Field `REGION89` reader - Enable protection for region 89. Write '0' has no effect."] +pub type REGION89_R = crate::BitReader; +#[doc = "Enable protection for region 89. Write '0' has no effect.\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum REGION89_A { + #[doc = "0: Protection disabled"] + DISABLED = 0, + #[doc = "1: Protection enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: REGION89_A) -> Self { + variant as u8 != 0 + } +} +impl REGION89_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> REGION89_A { + match self.bits { + false => REGION89_A::DISABLED, + true => REGION89_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == REGION89_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == REGION89_A::ENABLED + } +} +#[doc = "Field `REGION89` writer - Enable protection for region 89. Write '0' has no effect."] +pub type REGION89_W<'a, const O: u8> = crate::BitWriter<'a, u32, CONFIG2_SPEC, REGION89_A, O>; +impl<'a, const O: u8> REGION89_W<'a, O> { + #[doc = "Protection disabled"] + #[inline(always)] + pub fn disabled(self) -> &'a mut W { + self.variant(REGION89_A::DISABLED) + } + #[doc = "Protection enabled"] + #[inline(always)] + pub fn enabled(self) -> &'a mut W { + self.variant(REGION89_A::ENABLED) + } +} +#[doc = "Field `REGION90` reader - Enable protection for region 90. Write '0' has no effect."] +pub type REGION90_R = crate::BitReader; +#[doc = "Enable protection for region 90. Write '0' has no effect.\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum REGION90_A { + #[doc = "0: Protection disabled"] + DISABLED = 0, + #[doc = "1: Protection enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: REGION90_A) -> Self { + variant as u8 != 0 + } +} +impl REGION90_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> REGION90_A { + match self.bits { + false => REGION90_A::DISABLED, + true => REGION90_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == REGION90_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == REGION90_A::ENABLED + } +} +#[doc = "Field `REGION90` writer - Enable protection for region 90. Write '0' has no effect."] +pub type REGION90_W<'a, const O: u8> = crate::BitWriter<'a, u32, CONFIG2_SPEC, REGION90_A, O>; +impl<'a, const O: u8> REGION90_W<'a, O> { + #[doc = "Protection disabled"] + #[inline(always)] + pub fn disabled(self) -> &'a mut W { + self.variant(REGION90_A::DISABLED) + } + #[doc = "Protection enabled"] + #[inline(always)] + pub fn enabled(self) -> &'a mut W { + self.variant(REGION90_A::ENABLED) + } +} +#[doc = "Field `REGION91` reader - Enable protection for region 91. Write '0' has no effect."] +pub type REGION91_R = crate::BitReader; +#[doc = "Enable protection for region 91. Write '0' has no effect.\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum REGION91_A { + #[doc = "0: Protection disabled"] + DISABLED = 0, + #[doc = "1: Protection enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: REGION91_A) -> Self { + variant as u8 != 0 + } +} +impl REGION91_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> REGION91_A { + match self.bits { + false => REGION91_A::DISABLED, + true => REGION91_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == REGION91_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == REGION91_A::ENABLED + } +} +#[doc = "Field `REGION91` writer - Enable protection for region 91. Write '0' has no effect."] +pub type REGION91_W<'a, const O: u8> = crate::BitWriter<'a, u32, CONFIG2_SPEC, REGION91_A, O>; +impl<'a, const O: u8> REGION91_W<'a, O> { + #[doc = "Protection disabled"] + #[inline(always)] + pub fn disabled(self) -> &'a mut W { + self.variant(REGION91_A::DISABLED) + } + #[doc = "Protection enabled"] + #[inline(always)] + pub fn enabled(self) -> &'a mut W { + self.variant(REGION91_A::ENABLED) + } +} +#[doc = "Field `REGION92` reader - Enable protection for region 92. Write '0' has no effect."] +pub type REGION92_R = crate::BitReader; +#[doc = "Enable protection for region 92. Write '0' has no effect.\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum REGION92_A { + #[doc = "0: Protection disabled"] + DISABLED = 0, + #[doc = "1: Protection enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: REGION92_A) -> Self { + variant as u8 != 0 + } +} +impl REGION92_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> REGION92_A { + match self.bits { + false => REGION92_A::DISABLED, + true => REGION92_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == REGION92_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == REGION92_A::ENABLED + } +} +#[doc = "Field `REGION92` writer - Enable protection for region 92. Write '0' has no effect."] +pub type REGION92_W<'a, const O: u8> = crate::BitWriter<'a, u32, CONFIG2_SPEC, REGION92_A, O>; +impl<'a, const O: u8> REGION92_W<'a, O> { + #[doc = "Protection disabled"] + #[inline(always)] + pub fn disabled(self) -> &'a mut W { + self.variant(REGION92_A::DISABLED) + } + #[doc = "Protection enabled"] + #[inline(always)] + pub fn enabled(self) -> &'a mut W { + self.variant(REGION92_A::ENABLED) + } +} +#[doc = "Field `REGION93` reader - Enable protection for region 93. Write '0' has no effect."] +pub type REGION93_R = crate::BitReader; +#[doc = "Enable protection for region 93. Write '0' has no effect.\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum REGION93_A { + #[doc = "0: Protection disabled"] + DISABLED = 0, + #[doc = "1: Protection enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: REGION93_A) -> Self { + variant as u8 != 0 + } +} +impl REGION93_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> REGION93_A { + match self.bits { + false => REGION93_A::DISABLED, + true => REGION93_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == REGION93_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == REGION93_A::ENABLED + } +} +#[doc = "Field `REGION93` writer - Enable protection for region 93. Write '0' has no effect."] +pub type REGION93_W<'a, const O: u8> = crate::BitWriter<'a, u32, CONFIG2_SPEC, REGION93_A, O>; +impl<'a, const O: u8> REGION93_W<'a, O> { + #[doc = "Protection disabled"] + #[inline(always)] + pub fn disabled(self) -> &'a mut W { + self.variant(REGION93_A::DISABLED) + } + #[doc = "Protection enabled"] + #[inline(always)] + pub fn enabled(self) -> &'a mut W { + self.variant(REGION93_A::ENABLED) + } +} +#[doc = "Field `REGION94` reader - Enable protection for region 94. Write '0' has no effect."] +pub type REGION94_R = crate::BitReader; +#[doc = "Enable protection for region 94. Write '0' has no effect.\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum REGION94_A { + #[doc = "0: Protection disabled"] + DISABLED = 0, + #[doc = "1: Protection enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: REGION94_A) -> Self { + variant as u8 != 0 + } +} +impl REGION94_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> REGION94_A { + match self.bits { + false => REGION94_A::DISABLED, + true => REGION94_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == REGION94_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == REGION94_A::ENABLED + } +} +#[doc = "Field `REGION94` writer - Enable protection for region 94. Write '0' has no effect."] +pub type REGION94_W<'a, const O: u8> = crate::BitWriter<'a, u32, CONFIG2_SPEC, REGION94_A, O>; +impl<'a, const O: u8> REGION94_W<'a, O> { + #[doc = "Protection disabled"] + #[inline(always)] + pub fn disabled(self) -> &'a mut W { + self.variant(REGION94_A::DISABLED) + } + #[doc = "Protection enabled"] + #[inline(always)] + pub fn enabled(self) -> &'a mut W { + self.variant(REGION94_A::ENABLED) + } +} +#[doc = "Field `REGION95` reader - Enable protection for region 95. Write '0' has no effect."] +pub type REGION95_R = crate::BitReader; +#[doc = "Enable protection for region 95. Write '0' has no effect.\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum REGION95_A { + #[doc = "0: Protection disabled"] + DISABLED = 0, + #[doc = "1: Protection enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: REGION95_A) -> Self { + variant as u8 != 0 + } +} +impl REGION95_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> REGION95_A { + match self.bits { + false => REGION95_A::DISABLED, + true => REGION95_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == REGION95_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == REGION95_A::ENABLED + } +} +#[doc = "Field `REGION95` writer - Enable protection for region 95. Write '0' has no effect."] +pub type REGION95_W<'a, const O: u8> = crate::BitWriter<'a, u32, CONFIG2_SPEC, REGION95_A, O>; +impl<'a, const O: u8> REGION95_W<'a, O> { + #[doc = "Protection disabled"] + #[inline(always)] + pub fn disabled(self) -> &'a mut W { + self.variant(REGION95_A::DISABLED) + } + #[doc = "Protection enabled"] + #[inline(always)] + pub fn enabled(self) -> &'a mut W { + self.variant(REGION95_A::ENABLED) + } +} +impl R { + #[doc = "Bit 0 - Enable protection for region 64. Write '0' has no effect."] + #[inline(always)] + pub fn region64(&self) -> REGION64_R { + REGION64_R::new((self.bits & 1) != 0) + } + #[doc = "Bit 1 - Enable protection for region 65. Write '0' has no effect."] + #[inline(always)] + pub fn region65(&self) -> REGION65_R { + REGION65_R::new(((self.bits >> 1) & 1) != 0) + } + #[doc = "Bit 2 - Enable protection for region 66. Write '0' has no effect."] + #[inline(always)] + pub fn region66(&self) -> REGION66_R { + REGION66_R::new(((self.bits >> 2) & 1) != 0) + } + #[doc = "Bit 3 - Enable protection for region 67. Write '0' has no effect."] + #[inline(always)] + pub fn region67(&self) -> REGION67_R { + REGION67_R::new(((self.bits >> 3) & 1) != 0) + } + #[doc = "Bit 4 - Enable protection for region 68. Write '0' has no effect."] + #[inline(always)] + pub fn region68(&self) -> REGION68_R { + REGION68_R::new(((self.bits >> 4) & 1) != 0) + } + #[doc = "Bit 5 - Enable protection for region 69. Write '0' has no effect."] + #[inline(always)] + pub fn region69(&self) -> REGION69_R { + REGION69_R::new(((self.bits >> 5) & 1) != 0) + } + #[doc = "Bit 6 - Enable protection for region 70. Write '0' has no effect."] + #[inline(always)] + pub fn region70(&self) -> REGION70_R { + REGION70_R::new(((self.bits >> 6) & 1) != 0) + } + #[doc = "Bit 7 - Enable protection for region 71. Write '0' has no effect."] + #[inline(always)] + pub fn region71(&self) -> REGION71_R { + REGION71_R::new(((self.bits >> 7) & 1) != 0) + } + #[doc = "Bit 8 - Enable protection for region 72. Write '0' has no effect."] + #[inline(always)] + pub fn region72(&self) -> REGION72_R { + REGION72_R::new(((self.bits >> 8) & 1) != 0) + } + #[doc = "Bit 9 - Enable protection for region 73. Write '0' has no effect."] + #[inline(always)] + pub fn region73(&self) -> REGION73_R { + REGION73_R::new(((self.bits >> 9) & 1) != 0) + } + #[doc = "Bit 10 - Enable protection for region 74. Write '0' has no effect."] + #[inline(always)] + pub fn region74(&self) -> REGION74_R { + REGION74_R::new(((self.bits >> 10) & 1) != 0) + } + #[doc = "Bit 11 - Enable protection for region 75. Write '0' has no effect."] + #[inline(always)] + pub fn region75(&self) -> REGION75_R { + REGION75_R::new(((self.bits >> 11) & 1) != 0) + } + #[doc = "Bit 12 - Enable protection for region 76. Write '0' has no effect."] + #[inline(always)] + pub fn region76(&self) -> REGION76_R { + REGION76_R::new(((self.bits >> 12) & 1) != 0) + } + #[doc = "Bit 13 - Enable protection for region 77. Write '0' has no effect."] + #[inline(always)] + pub fn region77(&self) -> REGION77_R { + REGION77_R::new(((self.bits >> 13) & 1) != 0) + } + #[doc = "Bit 14 - Enable protection for region 78. Write '0' has no effect."] + #[inline(always)] + pub fn region78(&self) -> REGION78_R { + REGION78_R::new(((self.bits >> 14) & 1) != 0) + } + #[doc = "Bit 15 - Enable protection for region 79. Write '0' has no effect."] + #[inline(always)] + pub fn region79(&self) -> REGION79_R { + REGION79_R::new(((self.bits >> 15) & 1) != 0) + } + #[doc = "Bit 16 - Enable protection for region 80. Write '0' has no effect."] + #[inline(always)] + pub fn region80(&self) -> REGION80_R { + REGION80_R::new(((self.bits >> 16) & 1) != 0) + } + #[doc = "Bit 17 - Enable protection for region 81. Write '0' has no effect."] + #[inline(always)] + pub fn region81(&self) -> REGION81_R { + REGION81_R::new(((self.bits >> 17) & 1) != 0) + } + #[doc = "Bit 18 - Enable protection for region 82. Write '0' has no effect."] + #[inline(always)] + pub fn region82(&self) -> REGION82_R { + REGION82_R::new(((self.bits >> 18) & 1) != 0) + } + #[doc = "Bit 19 - Enable protection for region 83. Write '0' has no effect."] + #[inline(always)] + pub fn region83(&self) -> REGION83_R { + REGION83_R::new(((self.bits >> 19) & 1) != 0) + } + #[doc = "Bit 20 - Enable protection for region 84. Write '0' has no effect."] + #[inline(always)] + pub fn region84(&self) -> REGION84_R { + REGION84_R::new(((self.bits >> 20) & 1) != 0) + } + #[doc = "Bit 21 - Enable protection for region 85. Write '0' has no effect."] + #[inline(always)] + pub fn region85(&self) -> REGION85_R { + REGION85_R::new(((self.bits >> 21) & 1) != 0) + } + #[doc = "Bit 22 - Enable protection for region 86. Write '0' has no effect."] + #[inline(always)] + pub fn region86(&self) -> REGION86_R { + REGION86_R::new(((self.bits >> 22) & 1) != 0) + } + #[doc = "Bit 23 - Enable protection for region 87. Write '0' has no effect."] + #[inline(always)] + pub fn region87(&self) -> REGION87_R { + REGION87_R::new(((self.bits >> 23) & 1) != 0) + } + #[doc = "Bit 24 - Enable protection for region 88. Write '0' has no effect."] + #[inline(always)] + pub fn region88(&self) -> REGION88_R { + REGION88_R::new(((self.bits >> 24) & 1) != 0) + } + #[doc = "Bit 25 - Enable protection for region 89. Write '0' has no effect."] + #[inline(always)] + pub fn region89(&self) -> REGION89_R { + REGION89_R::new(((self.bits >> 25) & 1) != 0) + } + #[doc = "Bit 26 - Enable protection for region 90. Write '0' has no effect."] + #[inline(always)] + pub fn region90(&self) -> REGION90_R { + REGION90_R::new(((self.bits >> 26) & 1) != 0) + } + #[doc = "Bit 27 - Enable protection for region 91. Write '0' has no effect."] + #[inline(always)] + pub fn region91(&self) -> REGION91_R { + REGION91_R::new(((self.bits >> 27) & 1) != 0) + } + #[doc = "Bit 28 - Enable protection for region 92. Write '0' has no effect."] + #[inline(always)] + pub fn region92(&self) -> REGION92_R { + REGION92_R::new(((self.bits >> 28) & 1) != 0) + } + #[doc = "Bit 29 - Enable protection for region 93. Write '0' has no effect."] + #[inline(always)] + pub fn region93(&self) -> REGION93_R { + REGION93_R::new(((self.bits >> 29) & 1) != 0) + } + #[doc = "Bit 30 - Enable protection for region 94. Write '0' has no effect."] + #[inline(always)] + pub fn region94(&self) -> REGION94_R { + REGION94_R::new(((self.bits >> 30) & 1) != 0) + } + #[doc = "Bit 31 - Enable protection for region 95. Write '0' has no effect."] + #[inline(always)] + pub fn region95(&self) -> REGION95_R { + REGION95_R::new(((self.bits >> 31) & 1) != 0) + } +} +impl W { + #[doc = "Bit 0 - Enable protection for region 64. Write '0' has no effect."] + #[inline(always)] + #[must_use] + pub fn region64(&mut self) -> REGION64_W<0> { + REGION64_W::new(self) + } + #[doc = "Bit 1 - Enable protection for region 65. Write '0' has no effect."] + #[inline(always)] + #[must_use] + pub fn region65(&mut self) -> REGION65_W<1> { + REGION65_W::new(self) + } + #[doc = "Bit 2 - Enable protection for region 66. Write '0' has no effect."] + #[inline(always)] + #[must_use] + pub fn region66(&mut self) -> REGION66_W<2> { + REGION66_W::new(self) + } + #[doc = "Bit 3 - Enable protection for region 67. Write '0' has no effect."] + #[inline(always)] + #[must_use] + pub fn region67(&mut self) -> REGION67_W<3> { + REGION67_W::new(self) + } + #[doc = "Bit 4 - Enable protection for region 68. Write '0' has no effect."] + #[inline(always)] + #[must_use] + pub fn region68(&mut self) -> REGION68_W<4> { + REGION68_W::new(self) + } + #[doc = "Bit 5 - Enable protection for region 69. Write '0' has no effect."] + #[inline(always)] + #[must_use] + pub fn region69(&mut self) -> REGION69_W<5> { + REGION69_W::new(self) + } + #[doc = "Bit 6 - Enable protection for region 70. Write '0' has no effect."] + #[inline(always)] + #[must_use] + pub fn region70(&mut self) -> REGION70_W<6> { + REGION70_W::new(self) + } + #[doc = "Bit 7 - Enable protection for region 71. Write '0' has no effect."] + #[inline(always)] + #[must_use] + pub fn region71(&mut self) -> REGION71_W<7> { + REGION71_W::new(self) + } + #[doc = "Bit 8 - Enable protection for region 72. Write '0' has no effect."] + #[inline(always)] + #[must_use] + pub fn region72(&mut self) -> REGION72_W<8> { + REGION72_W::new(self) + } + #[doc = "Bit 9 - Enable protection for region 73. Write '0' has no effect."] + #[inline(always)] + #[must_use] + pub fn region73(&mut self) -> REGION73_W<9> { + REGION73_W::new(self) + } + #[doc = "Bit 10 - Enable protection for region 74. Write '0' has no effect."] + #[inline(always)] + #[must_use] + pub fn region74(&mut self) -> REGION74_W<10> { + REGION74_W::new(self) + } + #[doc = "Bit 11 - Enable protection for region 75. Write '0' has no effect."] + #[inline(always)] + #[must_use] + pub fn region75(&mut self) -> REGION75_W<11> { + REGION75_W::new(self) + } + #[doc = "Bit 12 - Enable protection for region 76. Write '0' has no effect."] + #[inline(always)] + #[must_use] + pub fn region76(&mut self) -> REGION76_W<12> { + REGION76_W::new(self) + } + #[doc = "Bit 13 - Enable protection for region 77. Write '0' has no effect."] + #[inline(always)] + #[must_use] + pub fn region77(&mut self) -> REGION77_W<13> { + REGION77_W::new(self) + } + #[doc = "Bit 14 - Enable protection for region 78. Write '0' has no effect."] + #[inline(always)] + #[must_use] + pub fn region78(&mut self) -> REGION78_W<14> { + REGION78_W::new(self) + } + #[doc = "Bit 15 - Enable protection for region 79. Write '0' has no effect."] + #[inline(always)] + #[must_use] + pub fn region79(&mut self) -> REGION79_W<15> { + REGION79_W::new(self) + } + #[doc = "Bit 16 - Enable protection for region 80. Write '0' has no effect."] + #[inline(always)] + #[must_use] + pub fn region80(&mut self) -> REGION80_W<16> { + REGION80_W::new(self) + } + #[doc = "Bit 17 - Enable protection for region 81. Write '0' has no effect."] + #[inline(always)] + #[must_use] + pub fn region81(&mut self) -> REGION81_W<17> { + REGION81_W::new(self) + } + #[doc = "Bit 18 - Enable protection for region 82. Write '0' has no effect."] + #[inline(always)] + #[must_use] + pub fn region82(&mut self) -> REGION82_W<18> { + REGION82_W::new(self) + } + #[doc = "Bit 19 - Enable protection for region 83. Write '0' has no effect."] + #[inline(always)] + #[must_use] + pub fn region83(&mut self) -> REGION83_W<19> { + REGION83_W::new(self) + } + #[doc = "Bit 20 - Enable protection for region 84. Write '0' has no effect."] + #[inline(always)] + #[must_use] + pub fn region84(&mut self) -> REGION84_W<20> { + REGION84_W::new(self) + } + #[doc = "Bit 21 - Enable protection for region 85. Write '0' has no effect."] + #[inline(always)] + #[must_use] + pub fn region85(&mut self) -> REGION85_W<21> { + REGION85_W::new(self) + } + #[doc = "Bit 22 - Enable protection for region 86. Write '0' has no effect."] + #[inline(always)] + #[must_use] + pub fn region86(&mut self) -> REGION86_W<22> { + REGION86_W::new(self) + } + #[doc = "Bit 23 - Enable protection for region 87. Write '0' has no effect."] + #[inline(always)] + #[must_use] + pub fn region87(&mut self) -> REGION87_W<23> { + REGION87_W::new(self) + } + #[doc = "Bit 24 - Enable protection for region 88. Write '0' has no effect."] + #[inline(always)] + #[must_use] + pub fn region88(&mut self) -> REGION88_W<24> { + REGION88_W::new(self) + } + #[doc = "Bit 25 - Enable protection for region 89. Write '0' has no effect."] + #[inline(always)] + #[must_use] + pub fn region89(&mut self) -> REGION89_W<25> { + REGION89_W::new(self) + } + #[doc = "Bit 26 - Enable protection for region 90. Write '0' has no effect."] + #[inline(always)] + #[must_use] + pub fn region90(&mut self) -> REGION90_W<26> { + REGION90_W::new(self) + } + #[doc = "Bit 27 - Enable protection for region 91. Write '0' has no effect."] + #[inline(always)] + #[must_use] + pub fn region91(&mut self) -> REGION91_W<27> { + REGION91_W::new(self) + } + #[doc = "Bit 28 - Enable protection for region 92. Write '0' has no effect."] + #[inline(always)] + #[must_use] + pub fn region92(&mut self) -> REGION92_W<28> { + REGION92_W::new(self) + } + #[doc = "Bit 29 - Enable protection for region 93. Write '0' has no effect."] + #[inline(always)] + #[must_use] + pub fn region93(&mut self) -> REGION93_W<29> { + REGION93_W::new(self) + } + #[doc = "Bit 30 - Enable protection for region 94. Write '0' has no effect."] + #[inline(always)] + #[must_use] + pub fn region94(&mut self) -> REGION94_W<30> { + REGION94_W::new(self) + } + #[doc = "Bit 31 - Enable protection for region 95. Write '0' has no effect."] + #[inline(always)] + #[must_use] + pub fn region95(&mut self) -> REGION95_W<31> { + REGION95_W::new(self) + } + #[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 = "Block protect configuration register 2\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 [config2](index.html) module"] +pub struct CONFIG2_SPEC; +impl crate::RegisterSpec for CONFIG2_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [config2::R](R) reader structure"] +impl crate::Readable for CONFIG2_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [config2::W](W) writer structure"] +impl crate::Writable for 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 CONFIG2 to value 0"] +impl crate::Resettable for CONFIG2_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/bprot/config3.rs b/down-the-stack/dk_pac/src/bprot/config3.rs new file mode 100644 index 0000000..c09b6d1 --- /dev/null +++ b/down-the-stack/dk_pac/src/bprot/config3.rs @@ -0,0 +1,2017 @@ +#[doc = "Register `CONFIG3` 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 `CONFIG3` 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 `REGION96` reader - Enable protection for region 96. Write '0' has no effect."] +pub type REGION96_R = crate::BitReader; +#[doc = "Enable protection for region 96. Write '0' has no effect.\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum REGION96_A { + #[doc = "0: Protection disabled"] + DISABLED = 0, + #[doc = "1: Protection enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: REGION96_A) -> Self { + variant as u8 != 0 + } +} +impl REGION96_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> REGION96_A { + match self.bits { + false => REGION96_A::DISABLED, + true => REGION96_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == REGION96_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == REGION96_A::ENABLED + } +} +#[doc = "Field `REGION96` writer - Enable protection for region 96. Write '0' has no effect."] +pub type REGION96_W<'a, const O: u8> = crate::BitWriter<'a, u32, CONFIG3_SPEC, REGION96_A, O>; +impl<'a, const O: u8> REGION96_W<'a, O> { + #[doc = "Protection disabled"] + #[inline(always)] + pub fn disabled(self) -> &'a mut W { + self.variant(REGION96_A::DISABLED) + } + #[doc = "Protection enabled"] + #[inline(always)] + pub fn enabled(self) -> &'a mut W { + self.variant(REGION96_A::ENABLED) + } +} +#[doc = "Field `REGION97` reader - Enable protection for region 97. Write '0' has no effect."] +pub type REGION97_R = crate::BitReader; +#[doc = "Enable protection for region 97. Write '0' has no effect.\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum REGION97_A { + #[doc = "0: Protection disabled"] + DISABLED = 0, + #[doc = "1: Protection enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: REGION97_A) -> Self { + variant as u8 != 0 + } +} +impl REGION97_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> REGION97_A { + match self.bits { + false => REGION97_A::DISABLED, + true => REGION97_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == REGION97_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == REGION97_A::ENABLED + } +} +#[doc = "Field `REGION97` writer - Enable protection for region 97. Write '0' has no effect."] +pub type REGION97_W<'a, const O: u8> = crate::BitWriter<'a, u32, CONFIG3_SPEC, REGION97_A, O>; +impl<'a, const O: u8> REGION97_W<'a, O> { + #[doc = "Protection disabled"] + #[inline(always)] + pub fn disabled(self) -> &'a mut W { + self.variant(REGION97_A::DISABLED) + } + #[doc = "Protection enabled"] + #[inline(always)] + pub fn enabled(self) -> &'a mut W { + self.variant(REGION97_A::ENABLED) + } +} +#[doc = "Field `REGION98` reader - Enable protection for region 98. Write '0' has no effect."] +pub type REGION98_R = crate::BitReader; +#[doc = "Enable protection for region 98. Write '0' has no effect.\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum REGION98_A { + #[doc = "0: Protection disabled"] + DISABLED = 0, + #[doc = "1: Protection enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: REGION98_A) -> Self { + variant as u8 != 0 + } +} +impl REGION98_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> REGION98_A { + match self.bits { + false => REGION98_A::DISABLED, + true => REGION98_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == REGION98_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == REGION98_A::ENABLED + } +} +#[doc = "Field `REGION98` writer - Enable protection for region 98. Write '0' has no effect."] +pub type REGION98_W<'a, const O: u8> = crate::BitWriter<'a, u32, CONFIG3_SPEC, REGION98_A, O>; +impl<'a, const O: u8> REGION98_W<'a, O> { + #[doc = "Protection disabled"] + #[inline(always)] + pub fn disabled(self) -> &'a mut W { + self.variant(REGION98_A::DISABLED) + } + #[doc = "Protection enabled"] + #[inline(always)] + pub fn enabled(self) -> &'a mut W { + self.variant(REGION98_A::ENABLED) + } +} +#[doc = "Field `REGION99` reader - Enable protection for region 99. Write '0' has no effect."] +pub type REGION99_R = crate::BitReader; +#[doc = "Enable protection for region 99. Write '0' has no effect.\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum REGION99_A { + #[doc = "0: Protection disabled"] + DISABLED = 0, + #[doc = "1: Protection enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: REGION99_A) -> Self { + variant as u8 != 0 + } +} +impl REGION99_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> REGION99_A { + match self.bits { + false => REGION99_A::DISABLED, + true => REGION99_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == REGION99_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == REGION99_A::ENABLED + } +} +#[doc = "Field `REGION99` writer - Enable protection for region 99. Write '0' has no effect."] +pub type REGION99_W<'a, const O: u8> = crate::BitWriter<'a, u32, CONFIG3_SPEC, REGION99_A, O>; +impl<'a, const O: u8> REGION99_W<'a, O> { + #[doc = "Protection disabled"] + #[inline(always)] + pub fn disabled(self) -> &'a mut W { + self.variant(REGION99_A::DISABLED) + } + #[doc = "Protection enabled"] + #[inline(always)] + pub fn enabled(self) -> &'a mut W { + self.variant(REGION99_A::ENABLED) + } +} +#[doc = "Field `REGION100` reader - Enable protection for region 100. Write '0' has no effect."] +pub type REGION100_R = crate::BitReader; +#[doc = "Enable protection for region 100. Write '0' has no effect.\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum REGION100_A { + #[doc = "0: Protection disabled"] + DISABLED = 0, + #[doc = "1: Protection enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: REGION100_A) -> Self { + variant as u8 != 0 + } +} +impl REGION100_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> REGION100_A { + match self.bits { + false => REGION100_A::DISABLED, + true => REGION100_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == REGION100_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == REGION100_A::ENABLED + } +} +#[doc = "Field `REGION100` writer - Enable protection for region 100. Write '0' has no effect."] +pub type REGION100_W<'a, const O: u8> = crate::BitWriter<'a, u32, CONFIG3_SPEC, REGION100_A, O>; +impl<'a, const O: u8> REGION100_W<'a, O> { + #[doc = "Protection disabled"] + #[inline(always)] + pub fn disabled(self) -> &'a mut W { + self.variant(REGION100_A::DISABLED) + } + #[doc = "Protection enabled"] + #[inline(always)] + pub fn enabled(self) -> &'a mut W { + self.variant(REGION100_A::ENABLED) + } +} +#[doc = "Field `REGION101` reader - Enable protection for region 101. Write '0' has no effect."] +pub type REGION101_R = crate::BitReader; +#[doc = "Enable protection for region 101. Write '0' has no effect.\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum REGION101_A { + #[doc = "0: Protection disabled"] + DISABLED = 0, + #[doc = "1: Protection enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: REGION101_A) -> Self { + variant as u8 != 0 + } +} +impl REGION101_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> REGION101_A { + match self.bits { + false => REGION101_A::DISABLED, + true => REGION101_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == REGION101_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == REGION101_A::ENABLED + } +} +#[doc = "Field `REGION101` writer - Enable protection for region 101. Write '0' has no effect."] +pub type REGION101_W<'a, const O: u8> = crate::BitWriter<'a, u32, CONFIG3_SPEC, REGION101_A, O>; +impl<'a, const O: u8> REGION101_W<'a, O> { + #[doc = "Protection disabled"] + #[inline(always)] + pub fn disabled(self) -> &'a mut W { + self.variant(REGION101_A::DISABLED) + } + #[doc = "Protection enabled"] + #[inline(always)] + pub fn enabled(self) -> &'a mut W { + self.variant(REGION101_A::ENABLED) + } +} +#[doc = "Field `REGION102` reader - Enable protection for region 102. Write '0' has no effect."] +pub type REGION102_R = crate::BitReader; +#[doc = "Enable protection for region 102. Write '0' has no effect.\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum REGION102_A { + #[doc = "0: Protection disabled"] + DISABLED = 0, + #[doc = "1: Protection enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: REGION102_A) -> Self { + variant as u8 != 0 + } +} +impl REGION102_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> REGION102_A { + match self.bits { + false => REGION102_A::DISABLED, + true => REGION102_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == REGION102_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == REGION102_A::ENABLED + } +} +#[doc = "Field `REGION102` writer - Enable protection for region 102. Write '0' has no effect."] +pub type REGION102_W<'a, const O: u8> = crate::BitWriter<'a, u32, CONFIG3_SPEC, REGION102_A, O>; +impl<'a, const O: u8> REGION102_W<'a, O> { + #[doc = "Protection disabled"] + #[inline(always)] + pub fn disabled(self) -> &'a mut W { + self.variant(REGION102_A::DISABLED) + } + #[doc = "Protection enabled"] + #[inline(always)] + pub fn enabled(self) -> &'a mut W { + self.variant(REGION102_A::ENABLED) + } +} +#[doc = "Field `REGION103` reader - Enable protection for region 103. Write '0' has no effect."] +pub type REGION103_R = crate::BitReader; +#[doc = "Enable protection for region 103. Write '0' has no effect.\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum REGION103_A { + #[doc = "0: Protection disabled"] + DISABLED = 0, + #[doc = "1: Protection enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: REGION103_A) -> Self { + variant as u8 != 0 + } +} +impl REGION103_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> REGION103_A { + match self.bits { + false => REGION103_A::DISABLED, + true => REGION103_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == REGION103_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == REGION103_A::ENABLED + } +} +#[doc = "Field `REGION103` writer - Enable protection for region 103. Write '0' has no effect."] +pub type REGION103_W<'a, const O: u8> = crate::BitWriter<'a, u32, CONFIG3_SPEC, REGION103_A, O>; +impl<'a, const O: u8> REGION103_W<'a, O> { + #[doc = "Protection disabled"] + #[inline(always)] + pub fn disabled(self) -> &'a mut W { + self.variant(REGION103_A::DISABLED) + } + #[doc = "Protection enabled"] + #[inline(always)] + pub fn enabled(self) -> &'a mut W { + self.variant(REGION103_A::ENABLED) + } +} +#[doc = "Field `REGION104` reader - Enable protection for region 104. Write '0' has no effect."] +pub type REGION104_R = crate::BitReader; +#[doc = "Enable protection for region 104. Write '0' has no effect.\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum REGION104_A { + #[doc = "0: Protection disabled"] + DISABLED = 0, + #[doc = "1: Protection enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: REGION104_A) -> Self { + variant as u8 != 0 + } +} +impl REGION104_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> REGION104_A { + match self.bits { + false => REGION104_A::DISABLED, + true => REGION104_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == REGION104_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == REGION104_A::ENABLED + } +} +#[doc = "Field `REGION104` writer - Enable protection for region 104. Write '0' has no effect."] +pub type REGION104_W<'a, const O: u8> = crate::BitWriter<'a, u32, CONFIG3_SPEC, REGION104_A, O>; +impl<'a, const O: u8> REGION104_W<'a, O> { + #[doc = "Protection disabled"] + #[inline(always)] + pub fn disabled(self) -> &'a mut W { + self.variant(REGION104_A::DISABLED) + } + #[doc = "Protection enabled"] + #[inline(always)] + pub fn enabled(self) -> &'a mut W { + self.variant(REGION104_A::ENABLED) + } +} +#[doc = "Field `REGION105` reader - Enable protection for region 105. Write '0' has no effect."] +pub type REGION105_R = crate::BitReader; +#[doc = "Enable protection for region 105. Write '0' has no effect.\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum REGION105_A { + #[doc = "0: Protection disabled"] + DISABLED = 0, + #[doc = "1: Protection enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: REGION105_A) -> Self { + variant as u8 != 0 + } +} +impl REGION105_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> REGION105_A { + match self.bits { + false => REGION105_A::DISABLED, + true => REGION105_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == REGION105_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == REGION105_A::ENABLED + } +} +#[doc = "Field `REGION105` writer - Enable protection for region 105. Write '0' has no effect."] +pub type REGION105_W<'a, const O: u8> = crate::BitWriter<'a, u32, CONFIG3_SPEC, REGION105_A, O>; +impl<'a, const O: u8> REGION105_W<'a, O> { + #[doc = "Protection disabled"] + #[inline(always)] + pub fn disabled(self) -> &'a mut W { + self.variant(REGION105_A::DISABLED) + } + #[doc = "Protection enabled"] + #[inline(always)] + pub fn enabled(self) -> &'a mut W { + self.variant(REGION105_A::ENABLED) + } +} +#[doc = "Field `REGION106` reader - Enable protection for region 106. Write '0' has no effect."] +pub type REGION106_R = crate::BitReader; +#[doc = "Enable protection for region 106. Write '0' has no effect.\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum REGION106_A { + #[doc = "0: Protection disabled"] + DISABLED = 0, + #[doc = "1: Protection enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: REGION106_A) -> Self { + variant as u8 != 0 + } +} +impl REGION106_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> REGION106_A { + match self.bits { + false => REGION106_A::DISABLED, + true => REGION106_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == REGION106_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == REGION106_A::ENABLED + } +} +#[doc = "Field `REGION106` writer - Enable protection for region 106. Write '0' has no effect."] +pub type REGION106_W<'a, const O: u8> = crate::BitWriter<'a, u32, CONFIG3_SPEC, REGION106_A, O>; +impl<'a, const O: u8> REGION106_W<'a, O> { + #[doc = "Protection disabled"] + #[inline(always)] + pub fn disabled(self) -> &'a mut W { + self.variant(REGION106_A::DISABLED) + } + #[doc = "Protection enabled"] + #[inline(always)] + pub fn enabled(self) -> &'a mut W { + self.variant(REGION106_A::ENABLED) + } +} +#[doc = "Field `REGION107` reader - Enable protection for region 107. Write '0' has no effect."] +pub type REGION107_R = crate::BitReader; +#[doc = "Enable protection for region 107. Write '0' has no effect.\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum REGION107_A { + #[doc = "0: Protection disabled"] + DISABLED = 0, + #[doc = "1: Protection enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: REGION107_A) -> Self { + variant as u8 != 0 + } +} +impl REGION107_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> REGION107_A { + match self.bits { + false => REGION107_A::DISABLED, + true => REGION107_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == REGION107_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == REGION107_A::ENABLED + } +} +#[doc = "Field `REGION107` writer - Enable protection for region 107. Write '0' has no effect."] +pub type REGION107_W<'a, const O: u8> = crate::BitWriter<'a, u32, CONFIG3_SPEC, REGION107_A, O>; +impl<'a, const O: u8> REGION107_W<'a, O> { + #[doc = "Protection disabled"] + #[inline(always)] + pub fn disabled(self) -> &'a mut W { + self.variant(REGION107_A::DISABLED) + } + #[doc = "Protection enabled"] + #[inline(always)] + pub fn enabled(self) -> &'a mut W { + self.variant(REGION107_A::ENABLED) + } +} +#[doc = "Field `REGION108` reader - Enable protection for region 108. Write '0' has no effect."] +pub type REGION108_R = crate::BitReader; +#[doc = "Enable protection for region 108. Write '0' has no effect.\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum REGION108_A { + #[doc = "0: Protection disabled"] + DISABLED = 0, + #[doc = "1: Protection enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: REGION108_A) -> Self { + variant as u8 != 0 + } +} +impl REGION108_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> REGION108_A { + match self.bits { + false => REGION108_A::DISABLED, + true => REGION108_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == REGION108_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == REGION108_A::ENABLED + } +} +#[doc = "Field `REGION108` writer - Enable protection for region 108. Write '0' has no effect."] +pub type REGION108_W<'a, const O: u8> = crate::BitWriter<'a, u32, CONFIG3_SPEC, REGION108_A, O>; +impl<'a, const O: u8> REGION108_W<'a, O> { + #[doc = "Protection disabled"] + #[inline(always)] + pub fn disabled(self) -> &'a mut W { + self.variant(REGION108_A::DISABLED) + } + #[doc = "Protection enabled"] + #[inline(always)] + pub fn enabled(self) -> &'a mut W { + self.variant(REGION108_A::ENABLED) + } +} +#[doc = "Field `REGION109` reader - Enable protection for region 109. Write '0' has no effect."] +pub type REGION109_R = crate::BitReader; +#[doc = "Enable protection for region 109. Write '0' has no effect.\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum REGION109_A { + #[doc = "0: Protection disabled"] + DISABLED = 0, + #[doc = "1: Protection enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: REGION109_A) -> Self { + variant as u8 != 0 + } +} +impl REGION109_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> REGION109_A { + match self.bits { + false => REGION109_A::DISABLED, + true => REGION109_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == REGION109_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == REGION109_A::ENABLED + } +} +#[doc = "Field `REGION109` writer - Enable protection for region 109. Write '0' has no effect."] +pub type REGION109_W<'a, const O: u8> = crate::BitWriter<'a, u32, CONFIG3_SPEC, REGION109_A, O>; +impl<'a, const O: u8> REGION109_W<'a, O> { + #[doc = "Protection disabled"] + #[inline(always)] + pub fn disabled(self) -> &'a mut W { + self.variant(REGION109_A::DISABLED) + } + #[doc = "Protection enabled"] + #[inline(always)] + pub fn enabled(self) -> &'a mut W { + self.variant(REGION109_A::ENABLED) + } +} +#[doc = "Field `REGION110` reader - Enable protection for region 110. Write '0' has no effect."] +pub type REGION110_R = crate::BitReader; +#[doc = "Enable protection for region 110. Write '0' has no effect.\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum REGION110_A { + #[doc = "0: Protection disabled"] + DISABLED = 0, + #[doc = "1: Protection enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: REGION110_A) -> Self { + variant as u8 != 0 + } +} +impl REGION110_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> REGION110_A { + match self.bits { + false => REGION110_A::DISABLED, + true => REGION110_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == REGION110_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == REGION110_A::ENABLED + } +} +#[doc = "Field `REGION110` writer - Enable protection for region 110. Write '0' has no effect."] +pub type REGION110_W<'a, const O: u8> = crate::BitWriter<'a, u32, CONFIG3_SPEC, REGION110_A, O>; +impl<'a, const O: u8> REGION110_W<'a, O> { + #[doc = "Protection disabled"] + #[inline(always)] + pub fn disabled(self) -> &'a mut W { + self.variant(REGION110_A::DISABLED) + } + #[doc = "Protection enabled"] + #[inline(always)] + pub fn enabled(self) -> &'a mut W { + self.variant(REGION110_A::ENABLED) + } +} +#[doc = "Field `REGION111` reader - Enable protection for region 111. Write '0' has no effect."] +pub type REGION111_R = crate::BitReader; +#[doc = "Enable protection for region 111. Write '0' has no effect.\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum REGION111_A { + #[doc = "0: Protection disabled"] + DISABLED = 0, + #[doc = "1: Protection enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: REGION111_A) -> Self { + variant as u8 != 0 + } +} +impl REGION111_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> REGION111_A { + match self.bits { + false => REGION111_A::DISABLED, + true => REGION111_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == REGION111_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == REGION111_A::ENABLED + } +} +#[doc = "Field `REGION111` writer - Enable protection for region 111. Write '0' has no effect."] +pub type REGION111_W<'a, const O: u8> = crate::BitWriter<'a, u32, CONFIG3_SPEC, REGION111_A, O>; +impl<'a, const O: u8> REGION111_W<'a, O> { + #[doc = "Protection disabled"] + #[inline(always)] + pub fn disabled(self) -> &'a mut W { + self.variant(REGION111_A::DISABLED) + } + #[doc = "Protection enabled"] + #[inline(always)] + pub fn enabled(self) -> &'a mut W { + self.variant(REGION111_A::ENABLED) + } +} +#[doc = "Field `REGION112` reader - Enable protection for region 112. Write '0' has no effect."] +pub type REGION112_R = crate::BitReader; +#[doc = "Enable protection for region 112. Write '0' has no effect.\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum REGION112_A { + #[doc = "0: Protection disabled"] + DISABLED = 0, + #[doc = "1: Protection enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: REGION112_A) -> Self { + variant as u8 != 0 + } +} +impl REGION112_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> REGION112_A { + match self.bits { + false => REGION112_A::DISABLED, + true => REGION112_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == REGION112_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == REGION112_A::ENABLED + } +} +#[doc = "Field `REGION112` writer - Enable protection for region 112. Write '0' has no effect."] +pub type REGION112_W<'a, const O: u8> = crate::BitWriter<'a, u32, CONFIG3_SPEC, REGION112_A, O>; +impl<'a, const O: u8> REGION112_W<'a, O> { + #[doc = "Protection disabled"] + #[inline(always)] + pub fn disabled(self) -> &'a mut W { + self.variant(REGION112_A::DISABLED) + } + #[doc = "Protection enabled"] + #[inline(always)] + pub fn enabled(self) -> &'a mut W { + self.variant(REGION112_A::ENABLED) + } +} +#[doc = "Field `REGION113` reader - Enable protection for region 113. Write '0' has no effect."] +pub type REGION113_R = crate::BitReader; +#[doc = "Enable protection for region 113. Write '0' has no effect.\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum REGION113_A { + #[doc = "0: Protection disabled"] + DISABLED = 0, + #[doc = "1: Protection enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: REGION113_A) -> Self { + variant as u8 != 0 + } +} +impl REGION113_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> REGION113_A { + match self.bits { + false => REGION113_A::DISABLED, + true => REGION113_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == REGION113_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == REGION113_A::ENABLED + } +} +#[doc = "Field `REGION113` writer - Enable protection for region 113. Write '0' has no effect."] +pub type REGION113_W<'a, const O: u8> = crate::BitWriter<'a, u32, CONFIG3_SPEC, REGION113_A, O>; +impl<'a, const O: u8> REGION113_W<'a, O> { + #[doc = "Protection disabled"] + #[inline(always)] + pub fn disabled(self) -> &'a mut W { + self.variant(REGION113_A::DISABLED) + } + #[doc = "Protection enabled"] + #[inline(always)] + pub fn enabled(self) -> &'a mut W { + self.variant(REGION113_A::ENABLED) + } +} +#[doc = "Field `REGION114` reader - Enable protection for region 114. Write '0' has no effect."] +pub type REGION114_R = crate::BitReader; +#[doc = "Enable protection for region 114. Write '0' has no effect.\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum REGION114_A { + #[doc = "0: Protection disabled"] + DISABLED = 0, + #[doc = "1: Protection enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: REGION114_A) -> Self { + variant as u8 != 0 + } +} +impl REGION114_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> REGION114_A { + match self.bits { + false => REGION114_A::DISABLED, + true => REGION114_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == REGION114_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == REGION114_A::ENABLED + } +} +#[doc = "Field `REGION114` writer - Enable protection for region 114. Write '0' has no effect."] +pub type REGION114_W<'a, const O: u8> = crate::BitWriter<'a, u32, CONFIG3_SPEC, REGION114_A, O>; +impl<'a, const O: u8> REGION114_W<'a, O> { + #[doc = "Protection disabled"] + #[inline(always)] + pub fn disabled(self) -> &'a mut W { + self.variant(REGION114_A::DISABLED) + } + #[doc = "Protection enabled"] + #[inline(always)] + pub fn enabled(self) -> &'a mut W { + self.variant(REGION114_A::ENABLED) + } +} +#[doc = "Field `REGION115` reader - Enable protection for region 115. Write '0' has no effect."] +pub type REGION115_R = crate::BitReader; +#[doc = "Enable protection for region 115. Write '0' has no effect.\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum REGION115_A { + #[doc = "0: Protection disabled"] + DISABLED = 0, + #[doc = "1: Protection enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: REGION115_A) -> Self { + variant as u8 != 0 + } +} +impl REGION115_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> REGION115_A { + match self.bits { + false => REGION115_A::DISABLED, + true => REGION115_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == REGION115_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == REGION115_A::ENABLED + } +} +#[doc = "Field `REGION115` writer - Enable protection for region 115. Write '0' has no effect."] +pub type REGION115_W<'a, const O: u8> = crate::BitWriter<'a, u32, CONFIG3_SPEC, REGION115_A, O>; +impl<'a, const O: u8> REGION115_W<'a, O> { + #[doc = "Protection disabled"] + #[inline(always)] + pub fn disabled(self) -> &'a mut W { + self.variant(REGION115_A::DISABLED) + } + #[doc = "Protection enabled"] + #[inline(always)] + pub fn enabled(self) -> &'a mut W { + self.variant(REGION115_A::ENABLED) + } +} +#[doc = "Field `REGION116` reader - Enable protection for region 116. Write '0' has no effect."] +pub type REGION116_R = crate::BitReader; +#[doc = "Enable protection for region 116. Write '0' has no effect.\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum REGION116_A { + #[doc = "0: Protection disabled"] + DISABLED = 0, + #[doc = "1: Protection enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: REGION116_A) -> Self { + variant as u8 != 0 + } +} +impl REGION116_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> REGION116_A { + match self.bits { + false => REGION116_A::DISABLED, + true => REGION116_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == REGION116_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == REGION116_A::ENABLED + } +} +#[doc = "Field `REGION116` writer - Enable protection for region 116. Write '0' has no effect."] +pub type REGION116_W<'a, const O: u8> = crate::BitWriter<'a, u32, CONFIG3_SPEC, REGION116_A, O>; +impl<'a, const O: u8> REGION116_W<'a, O> { + #[doc = "Protection disabled"] + #[inline(always)] + pub fn disabled(self) -> &'a mut W { + self.variant(REGION116_A::DISABLED) + } + #[doc = "Protection enabled"] + #[inline(always)] + pub fn enabled(self) -> &'a mut W { + self.variant(REGION116_A::ENABLED) + } +} +#[doc = "Field `REGION117` reader - Enable protection for region 117. Write '0' has no effect."] +pub type REGION117_R = crate::BitReader; +#[doc = "Enable protection for region 117. Write '0' has no effect.\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum REGION117_A { + #[doc = "0: Protection disabled"] + DISABLED = 0, + #[doc = "1: Protection enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: REGION117_A) -> Self { + variant as u8 != 0 + } +} +impl REGION117_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> REGION117_A { + match self.bits { + false => REGION117_A::DISABLED, + true => REGION117_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == REGION117_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == REGION117_A::ENABLED + } +} +#[doc = "Field `REGION117` writer - Enable protection for region 117. Write '0' has no effect."] +pub type REGION117_W<'a, const O: u8> = crate::BitWriter<'a, u32, CONFIG3_SPEC, REGION117_A, O>; +impl<'a, const O: u8> REGION117_W<'a, O> { + #[doc = "Protection disabled"] + #[inline(always)] + pub fn disabled(self) -> &'a mut W { + self.variant(REGION117_A::DISABLED) + } + #[doc = "Protection enabled"] + #[inline(always)] + pub fn enabled(self) -> &'a mut W { + self.variant(REGION117_A::ENABLED) + } +} +#[doc = "Field `REGION118` reader - Enable protection for region 118. Write '0' has no effect."] +pub type REGION118_R = crate::BitReader; +#[doc = "Enable protection for region 118. Write '0' has no effect.\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum REGION118_A { + #[doc = "0: Protection disabled"] + DISABLED = 0, + #[doc = "1: Protection enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: REGION118_A) -> Self { + variant as u8 != 0 + } +} +impl REGION118_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> REGION118_A { + match self.bits { + false => REGION118_A::DISABLED, + true => REGION118_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == REGION118_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == REGION118_A::ENABLED + } +} +#[doc = "Field `REGION118` writer - Enable protection for region 118. Write '0' has no effect."] +pub type REGION118_W<'a, const O: u8> = crate::BitWriter<'a, u32, CONFIG3_SPEC, REGION118_A, O>; +impl<'a, const O: u8> REGION118_W<'a, O> { + #[doc = "Protection disabled"] + #[inline(always)] + pub fn disabled(self) -> &'a mut W { + self.variant(REGION118_A::DISABLED) + } + #[doc = "Protection enabled"] + #[inline(always)] + pub fn enabled(self) -> &'a mut W { + self.variant(REGION118_A::ENABLED) + } +} +#[doc = "Field `REGION119` reader - Enable protection for region 119. Write '0' has no effect."] +pub type REGION119_R = crate::BitReader; +#[doc = "Enable protection for region 119. Write '0' has no effect.\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum REGION119_A { + #[doc = "0: Protection disabled"] + DISABLED = 0, + #[doc = "1: Protection enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: REGION119_A) -> Self { + variant as u8 != 0 + } +} +impl REGION119_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> REGION119_A { + match self.bits { + false => REGION119_A::DISABLED, + true => REGION119_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == REGION119_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == REGION119_A::ENABLED + } +} +#[doc = "Field `REGION119` writer - Enable protection for region 119. Write '0' has no effect."] +pub type REGION119_W<'a, const O: u8> = crate::BitWriter<'a, u32, CONFIG3_SPEC, REGION119_A, O>; +impl<'a, const O: u8> REGION119_W<'a, O> { + #[doc = "Protection disabled"] + #[inline(always)] + pub fn disabled(self) -> &'a mut W { + self.variant(REGION119_A::DISABLED) + } + #[doc = "Protection enabled"] + #[inline(always)] + pub fn enabled(self) -> &'a mut W { + self.variant(REGION119_A::ENABLED) + } +} +#[doc = "Field `REGION120` reader - Enable protection for region 120. Write '0' has no effect."] +pub type REGION120_R = crate::BitReader; +#[doc = "Enable protection for region 120. Write '0' has no effect.\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum REGION120_A { + #[doc = "0: Protection disabled"] + DISABLED = 0, + #[doc = "1: Protection enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: REGION120_A) -> Self { + variant as u8 != 0 + } +} +impl REGION120_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> REGION120_A { + match self.bits { + false => REGION120_A::DISABLED, + true => REGION120_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == REGION120_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == REGION120_A::ENABLED + } +} +#[doc = "Field `REGION120` writer - Enable protection for region 120. Write '0' has no effect."] +pub type REGION120_W<'a, const O: u8> = crate::BitWriter<'a, u32, CONFIG3_SPEC, REGION120_A, O>; +impl<'a, const O: u8> REGION120_W<'a, O> { + #[doc = "Protection disabled"] + #[inline(always)] + pub fn disabled(self) -> &'a mut W { + self.variant(REGION120_A::DISABLED) + } + #[doc = "Protection enabled"] + #[inline(always)] + pub fn enabled(self) -> &'a mut W { + self.variant(REGION120_A::ENABLED) + } +} +#[doc = "Field `REGION121` reader - Enable protection for region 121. Write '0' has no effect."] +pub type REGION121_R = crate::BitReader; +#[doc = "Enable protection for region 121. Write '0' has no effect.\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum REGION121_A { + #[doc = "0: Protection disabled"] + DISABLED = 0, + #[doc = "1: Protection enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: REGION121_A) -> Self { + variant as u8 != 0 + } +} +impl REGION121_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> REGION121_A { + match self.bits { + false => REGION121_A::DISABLED, + true => REGION121_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == REGION121_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == REGION121_A::ENABLED + } +} +#[doc = "Field `REGION121` writer - Enable protection for region 121. Write '0' has no effect."] +pub type REGION121_W<'a, const O: u8> = crate::BitWriter<'a, u32, CONFIG3_SPEC, REGION121_A, O>; +impl<'a, const O: u8> REGION121_W<'a, O> { + #[doc = "Protection disabled"] + #[inline(always)] + pub fn disabled(self) -> &'a mut W { + self.variant(REGION121_A::DISABLED) + } + #[doc = "Protection enabled"] + #[inline(always)] + pub fn enabled(self) -> &'a mut W { + self.variant(REGION121_A::ENABLED) + } +} +#[doc = "Field `REGION122` reader - Enable protection for region 122. Write '0' has no effect."] +pub type REGION122_R = crate::BitReader; +#[doc = "Enable protection for region 122. Write '0' has no effect.\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum REGION122_A { + #[doc = "0: Protection disabled"] + DISABLED = 0, + #[doc = "1: Protection enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: REGION122_A) -> Self { + variant as u8 != 0 + } +} +impl REGION122_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> REGION122_A { + match self.bits { + false => REGION122_A::DISABLED, + true => REGION122_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == REGION122_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == REGION122_A::ENABLED + } +} +#[doc = "Field `REGION122` writer - Enable protection for region 122. Write '0' has no effect."] +pub type REGION122_W<'a, const O: u8> = crate::BitWriter<'a, u32, CONFIG3_SPEC, REGION122_A, O>; +impl<'a, const O: u8> REGION122_W<'a, O> { + #[doc = "Protection disabled"] + #[inline(always)] + pub fn disabled(self) -> &'a mut W { + self.variant(REGION122_A::DISABLED) + } + #[doc = "Protection enabled"] + #[inline(always)] + pub fn enabled(self) -> &'a mut W { + self.variant(REGION122_A::ENABLED) + } +} +#[doc = "Field `REGION123` reader - Enable protection for region 123. Write '0' has no effect."] +pub type REGION123_R = crate::BitReader; +#[doc = "Enable protection for region 123. Write '0' has no effect.\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum REGION123_A { + #[doc = "0: Protection disabled"] + DISABLED = 0, + #[doc = "1: Protection enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: REGION123_A) -> Self { + variant as u8 != 0 + } +} +impl REGION123_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> REGION123_A { + match self.bits { + false => REGION123_A::DISABLED, + true => REGION123_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == REGION123_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == REGION123_A::ENABLED + } +} +#[doc = "Field `REGION123` writer - Enable protection for region 123. Write '0' has no effect."] +pub type REGION123_W<'a, const O: u8> = crate::BitWriter<'a, u32, CONFIG3_SPEC, REGION123_A, O>; +impl<'a, const O: u8> REGION123_W<'a, O> { + #[doc = "Protection disabled"] + #[inline(always)] + pub fn disabled(self) -> &'a mut W { + self.variant(REGION123_A::DISABLED) + } + #[doc = "Protection enabled"] + #[inline(always)] + pub fn enabled(self) -> &'a mut W { + self.variant(REGION123_A::ENABLED) + } +} +#[doc = "Field `REGION124` reader - Enable protection for region 124. Write '0' has no effect."] +pub type REGION124_R = crate::BitReader; +#[doc = "Enable protection for region 124. Write '0' has no effect.\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum REGION124_A { + #[doc = "0: Protection disabled"] + DISABLED = 0, + #[doc = "1: Protection enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: REGION124_A) -> Self { + variant as u8 != 0 + } +} +impl REGION124_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> REGION124_A { + match self.bits { + false => REGION124_A::DISABLED, + true => REGION124_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == REGION124_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == REGION124_A::ENABLED + } +} +#[doc = "Field `REGION124` writer - Enable protection for region 124. Write '0' has no effect."] +pub type REGION124_W<'a, const O: u8> = crate::BitWriter<'a, u32, CONFIG3_SPEC, REGION124_A, O>; +impl<'a, const O: u8> REGION124_W<'a, O> { + #[doc = "Protection disabled"] + #[inline(always)] + pub fn disabled(self) -> &'a mut W { + self.variant(REGION124_A::DISABLED) + } + #[doc = "Protection enabled"] + #[inline(always)] + pub fn enabled(self) -> &'a mut W { + self.variant(REGION124_A::ENABLED) + } +} +#[doc = "Field `REGION125` reader - Enable protection for region 125. Write '0' has no effect."] +pub type REGION125_R = crate::BitReader; +#[doc = "Enable protection for region 125. Write '0' has no effect.\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum REGION125_A { + #[doc = "0: Protection disabled"] + DISABLED = 0, + #[doc = "1: Protection enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: REGION125_A) -> Self { + variant as u8 != 0 + } +} +impl REGION125_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> REGION125_A { + match self.bits { + false => REGION125_A::DISABLED, + true => REGION125_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == REGION125_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == REGION125_A::ENABLED + } +} +#[doc = "Field `REGION125` writer - Enable protection for region 125. Write '0' has no effect."] +pub type REGION125_W<'a, const O: u8> = crate::BitWriter<'a, u32, CONFIG3_SPEC, REGION125_A, O>; +impl<'a, const O: u8> REGION125_W<'a, O> { + #[doc = "Protection disabled"] + #[inline(always)] + pub fn disabled(self) -> &'a mut W { + self.variant(REGION125_A::DISABLED) + } + #[doc = "Protection enabled"] + #[inline(always)] + pub fn enabled(self) -> &'a mut W { + self.variant(REGION125_A::ENABLED) + } +} +#[doc = "Field `REGION126` reader - Enable protection for region 126. Write '0' has no effect."] +pub type REGION126_R = crate::BitReader; +#[doc = "Enable protection for region 126. Write '0' has no effect.\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum REGION126_A { + #[doc = "0: Protection disabled"] + DISABLED = 0, + #[doc = "1: Protection enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: REGION126_A) -> Self { + variant as u8 != 0 + } +} +impl REGION126_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> REGION126_A { + match self.bits { + false => REGION126_A::DISABLED, + true => REGION126_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == REGION126_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == REGION126_A::ENABLED + } +} +#[doc = "Field `REGION126` writer - Enable protection for region 126. Write '0' has no effect."] +pub type REGION126_W<'a, const O: u8> = crate::BitWriter<'a, u32, CONFIG3_SPEC, REGION126_A, O>; +impl<'a, const O: u8> REGION126_W<'a, O> { + #[doc = "Protection disabled"] + #[inline(always)] + pub fn disabled(self) -> &'a mut W { + self.variant(REGION126_A::DISABLED) + } + #[doc = "Protection enabled"] + #[inline(always)] + pub fn enabled(self) -> &'a mut W { + self.variant(REGION126_A::ENABLED) + } +} +#[doc = "Field `REGION127` reader - Enable protection for region 127. Write '0' has no effect."] +pub type REGION127_R = crate::BitReader; +#[doc = "Enable protection for region 127. Write '0' has no effect.\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum REGION127_A { + #[doc = "0: Protection disabled"] + DISABLED = 0, + #[doc = "1: Protection enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: REGION127_A) -> Self { + variant as u8 != 0 + } +} +impl REGION127_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> REGION127_A { + match self.bits { + false => REGION127_A::DISABLED, + true => REGION127_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == REGION127_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == REGION127_A::ENABLED + } +} +#[doc = "Field `REGION127` writer - Enable protection for region 127. Write '0' has no effect."] +pub type REGION127_W<'a, const O: u8> = crate::BitWriter<'a, u32, CONFIG3_SPEC, REGION127_A, O>; +impl<'a, const O: u8> REGION127_W<'a, O> { + #[doc = "Protection disabled"] + #[inline(always)] + pub fn disabled(self) -> &'a mut W { + self.variant(REGION127_A::DISABLED) + } + #[doc = "Protection enabled"] + #[inline(always)] + pub fn enabled(self) -> &'a mut W { + self.variant(REGION127_A::ENABLED) + } +} +impl R { + #[doc = "Bit 0 - Enable protection for region 96. Write '0' has no effect."] + #[inline(always)] + pub fn region96(&self) -> REGION96_R { + REGION96_R::new((self.bits & 1) != 0) + } + #[doc = "Bit 1 - Enable protection for region 97. Write '0' has no effect."] + #[inline(always)] + pub fn region97(&self) -> REGION97_R { + REGION97_R::new(((self.bits >> 1) & 1) != 0) + } + #[doc = "Bit 2 - Enable protection for region 98. Write '0' has no effect."] + #[inline(always)] + pub fn region98(&self) -> REGION98_R { + REGION98_R::new(((self.bits >> 2) & 1) != 0) + } + #[doc = "Bit 3 - Enable protection for region 99. Write '0' has no effect."] + #[inline(always)] + pub fn region99(&self) -> REGION99_R { + REGION99_R::new(((self.bits >> 3) & 1) != 0) + } + #[doc = "Bit 4 - Enable protection for region 100. Write '0' has no effect."] + #[inline(always)] + pub fn region100(&self) -> REGION100_R { + REGION100_R::new(((self.bits >> 4) & 1) != 0) + } + #[doc = "Bit 5 - Enable protection for region 101. Write '0' has no effect."] + #[inline(always)] + pub fn region101(&self) -> REGION101_R { + REGION101_R::new(((self.bits >> 5) & 1) != 0) + } + #[doc = "Bit 6 - Enable protection for region 102. Write '0' has no effect."] + #[inline(always)] + pub fn region102(&self) -> REGION102_R { + REGION102_R::new(((self.bits >> 6) & 1) != 0) + } + #[doc = "Bit 7 - Enable protection for region 103. Write '0' has no effect."] + #[inline(always)] + pub fn region103(&self) -> REGION103_R { + REGION103_R::new(((self.bits >> 7) & 1) != 0) + } + #[doc = "Bit 8 - Enable protection for region 104. Write '0' has no effect."] + #[inline(always)] + pub fn region104(&self) -> REGION104_R { + REGION104_R::new(((self.bits >> 8) & 1) != 0) + } + #[doc = "Bit 9 - Enable protection for region 105. Write '0' has no effect."] + #[inline(always)] + pub fn region105(&self) -> REGION105_R { + REGION105_R::new(((self.bits >> 9) & 1) != 0) + } + #[doc = "Bit 10 - Enable protection for region 106. Write '0' has no effect."] + #[inline(always)] + pub fn region106(&self) -> REGION106_R { + REGION106_R::new(((self.bits >> 10) & 1) != 0) + } + #[doc = "Bit 11 - Enable protection for region 107. Write '0' has no effect."] + #[inline(always)] + pub fn region107(&self) -> REGION107_R { + REGION107_R::new(((self.bits >> 11) & 1) != 0) + } + #[doc = "Bit 12 - Enable protection for region 108. Write '0' has no effect."] + #[inline(always)] + pub fn region108(&self) -> REGION108_R { + REGION108_R::new(((self.bits >> 12) & 1) != 0) + } + #[doc = "Bit 13 - Enable protection for region 109. Write '0' has no effect."] + #[inline(always)] + pub fn region109(&self) -> REGION109_R { + REGION109_R::new(((self.bits >> 13) & 1) != 0) + } + #[doc = "Bit 14 - Enable protection for region 110. Write '0' has no effect."] + #[inline(always)] + pub fn region110(&self) -> REGION110_R { + REGION110_R::new(((self.bits >> 14) & 1) != 0) + } + #[doc = "Bit 15 - Enable protection for region 111. Write '0' has no effect."] + #[inline(always)] + pub fn region111(&self) -> REGION111_R { + REGION111_R::new(((self.bits >> 15) & 1) != 0) + } + #[doc = "Bit 16 - Enable protection for region 112. Write '0' has no effect."] + #[inline(always)] + pub fn region112(&self) -> REGION112_R { + REGION112_R::new(((self.bits >> 16) & 1) != 0) + } + #[doc = "Bit 17 - Enable protection for region 113. Write '0' has no effect."] + #[inline(always)] + pub fn region113(&self) -> REGION113_R { + REGION113_R::new(((self.bits >> 17) & 1) != 0) + } + #[doc = "Bit 18 - Enable protection for region 114. Write '0' has no effect."] + #[inline(always)] + pub fn region114(&self) -> REGION114_R { + REGION114_R::new(((self.bits >> 18) & 1) != 0) + } + #[doc = "Bit 19 - Enable protection for region 115. Write '0' has no effect."] + #[inline(always)] + pub fn region115(&self) -> REGION115_R { + REGION115_R::new(((self.bits >> 19) & 1) != 0) + } + #[doc = "Bit 20 - Enable protection for region 116. Write '0' has no effect."] + #[inline(always)] + pub fn region116(&self) -> REGION116_R { + REGION116_R::new(((self.bits >> 20) & 1) != 0) + } + #[doc = "Bit 21 - Enable protection for region 117. Write '0' has no effect."] + #[inline(always)] + pub fn region117(&self) -> REGION117_R { + REGION117_R::new(((self.bits >> 21) & 1) != 0) + } + #[doc = "Bit 22 - Enable protection for region 118. Write '0' has no effect."] + #[inline(always)] + pub fn region118(&self) -> REGION118_R { + REGION118_R::new(((self.bits >> 22) & 1) != 0) + } + #[doc = "Bit 23 - Enable protection for region 119. Write '0' has no effect."] + #[inline(always)] + pub fn region119(&self) -> REGION119_R { + REGION119_R::new(((self.bits >> 23) & 1) != 0) + } + #[doc = "Bit 24 - Enable protection for region 120. Write '0' has no effect."] + #[inline(always)] + pub fn region120(&self) -> REGION120_R { + REGION120_R::new(((self.bits >> 24) & 1) != 0) + } + #[doc = "Bit 25 - Enable protection for region 121. Write '0' has no effect."] + #[inline(always)] + pub fn region121(&self) -> REGION121_R { + REGION121_R::new(((self.bits >> 25) & 1) != 0) + } + #[doc = "Bit 26 - Enable protection for region 122. Write '0' has no effect."] + #[inline(always)] + pub fn region122(&self) -> REGION122_R { + REGION122_R::new(((self.bits >> 26) & 1) != 0) + } + #[doc = "Bit 27 - Enable protection for region 123. Write '0' has no effect."] + #[inline(always)] + pub fn region123(&self) -> REGION123_R { + REGION123_R::new(((self.bits >> 27) & 1) != 0) + } + #[doc = "Bit 28 - Enable protection for region 124. Write '0' has no effect."] + #[inline(always)] + pub fn region124(&self) -> REGION124_R { + REGION124_R::new(((self.bits >> 28) & 1) != 0) + } + #[doc = "Bit 29 - Enable protection for region 125. Write '0' has no effect."] + #[inline(always)] + pub fn region125(&self) -> REGION125_R { + REGION125_R::new(((self.bits >> 29) & 1) != 0) + } + #[doc = "Bit 30 - Enable protection for region 126. Write '0' has no effect."] + #[inline(always)] + pub fn region126(&self) -> REGION126_R { + REGION126_R::new(((self.bits >> 30) & 1) != 0) + } + #[doc = "Bit 31 - Enable protection for region 127. Write '0' has no effect."] + #[inline(always)] + pub fn region127(&self) -> REGION127_R { + REGION127_R::new(((self.bits >> 31) & 1) != 0) + } +} +impl W { + #[doc = "Bit 0 - Enable protection for region 96. Write '0' has no effect."] + #[inline(always)] + #[must_use] + pub fn region96(&mut self) -> REGION96_W<0> { + REGION96_W::new(self) + } + #[doc = "Bit 1 - Enable protection for region 97. Write '0' has no effect."] + #[inline(always)] + #[must_use] + pub fn region97(&mut self) -> REGION97_W<1> { + REGION97_W::new(self) + } + #[doc = "Bit 2 - Enable protection for region 98. Write '0' has no effect."] + #[inline(always)] + #[must_use] + pub fn region98(&mut self) -> REGION98_W<2> { + REGION98_W::new(self) + } + #[doc = "Bit 3 - Enable protection for region 99. Write '0' has no effect."] + #[inline(always)] + #[must_use] + pub fn region99(&mut self) -> REGION99_W<3> { + REGION99_W::new(self) + } + #[doc = "Bit 4 - Enable protection for region 100. Write '0' has no effect."] + #[inline(always)] + #[must_use] + pub fn region100(&mut self) -> REGION100_W<4> { + REGION100_W::new(self) + } + #[doc = "Bit 5 - Enable protection for region 101. Write '0' has no effect."] + #[inline(always)] + #[must_use] + pub fn region101(&mut self) -> REGION101_W<5> { + REGION101_W::new(self) + } + #[doc = "Bit 6 - Enable protection for region 102. Write '0' has no effect."] + #[inline(always)] + #[must_use] + pub fn region102(&mut self) -> REGION102_W<6> { + REGION102_W::new(self) + } + #[doc = "Bit 7 - Enable protection for region 103. Write '0' has no effect."] + #[inline(always)] + #[must_use] + pub fn region103(&mut self) -> REGION103_W<7> { + REGION103_W::new(self) + } + #[doc = "Bit 8 - Enable protection for region 104. Write '0' has no effect."] + #[inline(always)] + #[must_use] + pub fn region104(&mut self) -> REGION104_W<8> { + REGION104_W::new(self) + } + #[doc = "Bit 9 - Enable protection for region 105. Write '0' has no effect."] + #[inline(always)] + #[must_use] + pub fn region105(&mut self) -> REGION105_W<9> { + REGION105_W::new(self) + } + #[doc = "Bit 10 - Enable protection for region 106. Write '0' has no effect."] + #[inline(always)] + #[must_use] + pub fn region106(&mut self) -> REGION106_W<10> { + REGION106_W::new(self) + } + #[doc = "Bit 11 - Enable protection for region 107. Write '0' has no effect."] + #[inline(always)] + #[must_use] + pub fn region107(&mut self) -> REGION107_W<11> { + REGION107_W::new(self) + } + #[doc = "Bit 12 - Enable protection for region 108. Write '0' has no effect."] + #[inline(always)] + #[must_use] + pub fn region108(&mut self) -> REGION108_W<12> { + REGION108_W::new(self) + } + #[doc = "Bit 13 - Enable protection for region 109. Write '0' has no effect."] + #[inline(always)] + #[must_use] + pub fn region109(&mut self) -> REGION109_W<13> { + REGION109_W::new(self) + } + #[doc = "Bit 14 - Enable protection for region 110. Write '0' has no effect."] + #[inline(always)] + #[must_use] + pub fn region110(&mut self) -> REGION110_W<14> { + REGION110_W::new(self) + } + #[doc = "Bit 15 - Enable protection for region 111. Write '0' has no effect."] + #[inline(always)] + #[must_use] + pub fn region111(&mut self) -> REGION111_W<15> { + REGION111_W::new(self) + } + #[doc = "Bit 16 - Enable protection for region 112. Write '0' has no effect."] + #[inline(always)] + #[must_use] + pub fn region112(&mut self) -> REGION112_W<16> { + REGION112_W::new(self) + } + #[doc = "Bit 17 - Enable protection for region 113. Write '0' has no effect."] + #[inline(always)] + #[must_use] + pub fn region113(&mut self) -> REGION113_W<17> { + REGION113_W::new(self) + } + #[doc = "Bit 18 - Enable protection for region 114. Write '0' has no effect."] + #[inline(always)] + #[must_use] + pub fn region114(&mut self) -> REGION114_W<18> { + REGION114_W::new(self) + } + #[doc = "Bit 19 - Enable protection for region 115. Write '0' has no effect."] + #[inline(always)] + #[must_use] + pub fn region115(&mut self) -> REGION115_W<19> { + REGION115_W::new(self) + } + #[doc = "Bit 20 - Enable protection for region 116. Write '0' has no effect."] + #[inline(always)] + #[must_use] + pub fn region116(&mut self) -> REGION116_W<20> { + REGION116_W::new(self) + } + #[doc = "Bit 21 - Enable protection for region 117. Write '0' has no effect."] + #[inline(always)] + #[must_use] + pub fn region117(&mut self) -> REGION117_W<21> { + REGION117_W::new(self) + } + #[doc = "Bit 22 - Enable protection for region 118. Write '0' has no effect."] + #[inline(always)] + #[must_use] + pub fn region118(&mut self) -> REGION118_W<22> { + REGION118_W::new(self) + } + #[doc = "Bit 23 - Enable protection for region 119. Write '0' has no effect."] + #[inline(always)] + #[must_use] + pub fn region119(&mut self) -> REGION119_W<23> { + REGION119_W::new(self) + } + #[doc = "Bit 24 - Enable protection for region 120. Write '0' has no effect."] + #[inline(always)] + #[must_use] + pub fn region120(&mut self) -> REGION120_W<24> { + REGION120_W::new(self) + } + #[doc = "Bit 25 - Enable protection for region 121. Write '0' has no effect."] + #[inline(always)] + #[must_use] + pub fn region121(&mut self) -> REGION121_W<25> { + REGION121_W::new(self) + } + #[doc = "Bit 26 - Enable protection for region 122. Write '0' has no effect."] + #[inline(always)] + #[must_use] + pub fn region122(&mut self) -> REGION122_W<26> { + REGION122_W::new(self) + } + #[doc = "Bit 27 - Enable protection for region 123. Write '0' has no effect."] + #[inline(always)] + #[must_use] + pub fn region123(&mut self) -> REGION123_W<27> { + REGION123_W::new(self) + } + #[doc = "Bit 28 - Enable protection for region 124. Write '0' has no effect."] + #[inline(always)] + #[must_use] + pub fn region124(&mut self) -> REGION124_W<28> { + REGION124_W::new(self) + } + #[doc = "Bit 29 - Enable protection for region 125. Write '0' has no effect."] + #[inline(always)] + #[must_use] + pub fn region125(&mut self) -> REGION125_W<29> { + REGION125_W::new(self) + } + #[doc = "Bit 30 - Enable protection for region 126. Write '0' has no effect."] + #[inline(always)] + #[must_use] + pub fn region126(&mut self) -> REGION126_W<30> { + REGION126_W::new(self) + } + #[doc = "Bit 31 - Enable protection for region 127. Write '0' has no effect."] + #[inline(always)] + #[must_use] + pub fn region127(&mut self) -> REGION127_W<31> { + REGION127_W::new(self) + } + #[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 = "Block protect configuration register 3\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 [config3](index.html) module"] +pub struct CONFIG3_SPEC; +impl crate::RegisterSpec for CONFIG3_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [config3::R](R) reader structure"] +impl crate::Readable for CONFIG3_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [config3::W](W) writer structure"] +impl crate::Writable for CONFIG3_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets CONFIG3 to value 0"] +impl crate::Resettable for CONFIG3_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/bprot/disableindebug.rs b/down-the-stack/dk_pac/src/bprot/disableindebug.rs new file mode 100644 index 0000000..9f3535e --- /dev/null +++ b/down-the-stack/dk_pac/src/bprot/disableindebug.rs @@ -0,0 +1,127 @@ +#[doc = "Register `DISABLEINDEBUG` 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 `DISABLEINDEBUG` 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 `DISABLEINDEBUG` reader - Disable the protection mechanism for NVM regions while in debug interface mode. This register will only disable the protection mechanism if the device is in debug interface mode."] +pub type DISABLEINDEBUG_R = crate::BitReader; +#[doc = "Disable the protection mechanism for NVM regions while in debug interface mode. This register will only disable the protection mechanism if the device is in debug interface mode.\n\nValue on reset: 1"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum DISABLEINDEBUG_A { + #[doc = "1: Disable in debug"] + DISABLED = 1, + #[doc = "0: Enable in debug"] + ENABLED = 0, +} +impl From for bool { + #[inline(always)] + fn from(variant: DISABLEINDEBUG_A) -> Self { + variant as u8 != 0 + } +} +impl DISABLEINDEBUG_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> DISABLEINDEBUG_A { + match self.bits { + true => DISABLEINDEBUG_A::DISABLED, + false => DISABLEINDEBUG_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == DISABLEINDEBUG_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == DISABLEINDEBUG_A::ENABLED + } +} +#[doc = "Field `DISABLEINDEBUG` writer - Disable the protection mechanism for NVM regions while in debug interface mode. This register will only disable the protection mechanism if the device is in debug interface mode."] +pub type DISABLEINDEBUG_W<'a, const O: u8> = + crate::BitWriter<'a, u32, DISABLEINDEBUG_SPEC, DISABLEINDEBUG_A, O>; +impl<'a, const O: u8> DISABLEINDEBUG_W<'a, O> { + #[doc = "Disable in debug"] + #[inline(always)] + pub fn disabled(self) -> &'a mut W { + self.variant(DISABLEINDEBUG_A::DISABLED) + } + #[doc = "Enable in debug"] + #[inline(always)] + pub fn enabled(self) -> &'a mut W { + self.variant(DISABLEINDEBUG_A::ENABLED) + } +} +impl R { + #[doc = "Bit 0 - Disable the protection mechanism for NVM regions while in debug interface mode. This register will only disable the protection mechanism if the device is in debug interface mode."] + #[inline(always)] + pub fn disableindebug(&self) -> DISABLEINDEBUG_R { + DISABLEINDEBUG_R::new((self.bits & 1) != 0) + } +} +impl W { + #[doc = "Bit 0 - Disable the protection mechanism for NVM regions while in debug interface mode. This register will only disable the protection mechanism if the device is in debug interface mode."] + #[inline(always)] + #[must_use] + pub fn disableindebug(&mut self) -> DISABLEINDEBUG_W<0> { + DISABLEINDEBUG_W::new(self) + } + #[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 = "Disable protection mechanism in debug interface mode\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 [disableindebug](index.html) module"] +pub struct DISABLEINDEBUG_SPEC; +impl crate::RegisterSpec for DISABLEINDEBUG_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [disableindebug::R](R) reader structure"] +impl crate::Readable for DISABLEINDEBUG_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [disableindebug::W](W) writer structure"] +impl crate::Writable for DISABLEINDEBUG_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets DISABLEINDEBUG to value 0x01"] +impl crate::Resettable for DISABLEINDEBUG_SPEC { + const RESET_VALUE: Self::Ux = 0x01; +} diff --git a/down-the-stack/dk_pac/src/ccm.rs b/down-the-stack/dk_pac/src/ccm.rs new file mode 100644 index 0000000..1e51d06 --- /dev/null +++ b/down-the-stack/dk_pac/src/ccm.rs @@ -0,0 +1,105 @@ +#[doc = r"Register block"] +#[repr(C)] +pub struct RegisterBlock { + #[doc = "0x00 - Start generation of key-stream. This operation will stop by itself when completed."] + pub tasks_ksgen: TASKS_KSGEN, + #[doc = "0x04 - Start encryption/decryption. This operation will stop by itself when completed."] + pub tasks_crypt: TASKS_CRYPT, + #[doc = "0x08 - Stop encryption/decryption"] + pub tasks_stop: TASKS_STOP, + _reserved3: [u8; 0xf4], + #[doc = "0x100 - Key-stream generation complete"] + pub events_endksgen: EVENTS_ENDKSGEN, + #[doc = "0x104 - Encrypt/decrypt complete"] + pub events_endcrypt: EVENTS_ENDCRYPT, + #[doc = "0x108 - CCM error event"] + pub events_error: EVENTS_ERROR, + _reserved6: [u8; 0xf4], + #[doc = "0x200 - Shortcuts between local events and tasks"] + pub shorts: SHORTS, + _reserved7: [u8; 0x0100], + #[doc = "0x304 - Enable interrupt"] + pub intenset: INTENSET, + #[doc = "0x308 - Disable interrupt"] + pub intenclr: INTENCLR, + _reserved9: [u8; 0xf4], + #[doc = "0x400 - MIC check result"] + pub micstatus: MICSTATUS, + _reserved10: [u8; 0xfc], + #[doc = "0x500 - Enable"] + pub enable: ENABLE, + #[doc = "0x504 - Operation mode"] + pub mode: MODE, + #[doc = "0x508 - Pointer to data structure holding AES key and NONCE vector"] + pub cnfptr: CNFPTR, + #[doc = "0x50c - Input pointer"] + pub inptr: INPTR, + #[doc = "0x510 - Output pointer"] + pub outptr: OUTPTR, + #[doc = "0x514 - Pointer to data area used for temporary storage"] + pub scratchptr: SCRATCHPTR, +} +#[doc = "TASKS_KSGEN (w) register accessor: an alias for `Reg`"] +pub type TASKS_KSGEN = crate::Reg; +#[doc = "Start generation of key-stream. This operation will stop by itself when completed."] +pub mod tasks_ksgen; +#[doc = "TASKS_CRYPT (w) register accessor: an alias for `Reg`"] +pub type TASKS_CRYPT = crate::Reg; +#[doc = "Start encryption/decryption. This operation will stop by itself when completed."] +pub mod tasks_crypt; +#[doc = "TASKS_STOP (w) register accessor: an alias for `Reg`"] +pub type TASKS_STOP = crate::Reg; +#[doc = "Stop encryption/decryption"] +pub mod tasks_stop; +#[doc = "EVENTS_ENDKSGEN (rw) register accessor: an alias for `Reg`"] +pub type EVENTS_ENDKSGEN = crate::Reg; +#[doc = "Key-stream generation complete"] +pub mod events_endksgen; +#[doc = "EVENTS_ENDCRYPT (rw) register accessor: an alias for `Reg`"] +pub type EVENTS_ENDCRYPT = crate::Reg; +#[doc = "Encrypt/decrypt complete"] +pub mod events_endcrypt; +#[doc = "EVENTS_ERROR (rw) register accessor: an alias for `Reg`"] +pub type EVENTS_ERROR = crate::Reg; +#[doc = "CCM error event"] +pub mod events_error; +#[doc = "SHORTS (rw) register accessor: an alias for `Reg`"] +pub type SHORTS = crate::Reg; +#[doc = "Shortcuts between local events and tasks"] +pub mod shorts; +#[doc = "INTENSET (rw) register accessor: an alias for `Reg`"] +pub type INTENSET = crate::Reg; +#[doc = "Enable interrupt"] +pub mod intenset; +#[doc = "INTENCLR (rw) register accessor: an alias for `Reg`"] +pub type INTENCLR = crate::Reg; +#[doc = "Disable interrupt"] +pub mod intenclr; +#[doc = "MICSTATUS (r) register accessor: an alias for `Reg`"] +pub type MICSTATUS = crate::Reg; +#[doc = "MIC check result"] +pub mod micstatus; +#[doc = "ENABLE (rw) register accessor: an alias for `Reg`"] +pub type ENABLE = crate::Reg; +#[doc = "Enable"] +pub mod enable; +#[doc = "MODE (rw) register accessor: an alias for `Reg`"] +pub type MODE = crate::Reg; +#[doc = "Operation mode"] +pub mod mode; +#[doc = "CNFPTR (rw) register accessor: an alias for `Reg`"] +pub type CNFPTR = crate::Reg; +#[doc = "Pointer to data structure holding AES key and NONCE vector"] +pub mod cnfptr; +#[doc = "INPTR (rw) register accessor: an alias for `Reg`"] +pub type INPTR = crate::Reg; +#[doc = "Input pointer"] +pub mod inptr; +#[doc = "OUTPTR (rw) register accessor: an alias for `Reg`"] +pub type OUTPTR = crate::Reg; +#[doc = "Output pointer"] +pub mod outptr; +#[doc = "SCRATCHPTR (rw) register accessor: an alias for `Reg`"] +pub type SCRATCHPTR = crate::Reg; +#[doc = "Pointer to data area used for temporary storage"] +pub mod scratchptr; diff --git a/down-the-stack/dk_pac/src/ccm/cnfptr.rs b/down-the-stack/dk_pac/src/ccm/cnfptr.rs new file mode 100644 index 0000000..09639b2 --- /dev/null +++ b/down-the-stack/dk_pac/src/ccm/cnfptr.rs @@ -0,0 +1,80 @@ +#[doc = "Register `CNFPTR` 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 `CNFPTR` 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 `CNFPTR` reader - Pointer to the data structure holding the AES key and the CCM NONCE vector (see Table 1 CCM data structure overview)"] +pub type CNFPTR_R = crate::FieldReader; +#[doc = "Field `CNFPTR` writer - Pointer to the data structure holding the AES key and the CCM NONCE vector (see Table 1 CCM data structure overview)"] +pub type CNFPTR_W<'a, const O: u8> = crate::FieldWriter<'a, u32, CNFPTR_SPEC, u32, u32, 32, O>; +impl R { + #[doc = "Bits 0:31 - Pointer to the data structure holding the AES key and the CCM NONCE vector (see Table 1 CCM data structure overview)"] + #[inline(always)] + pub fn cnfptr(&self) -> CNFPTR_R { + CNFPTR_R::new(self.bits) + } +} +impl W { + #[doc = "Bits 0:31 - Pointer to the data structure holding the AES key and the CCM NONCE vector (see Table 1 CCM data structure overview)"] + #[inline(always)] + #[must_use] + pub fn cnfptr(&mut self) -> CNFPTR_W<0> { + CNFPTR_W::new(self) + } + #[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 = "Pointer to data structure holding AES key and NONCE vector\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 [cnfptr](index.html) module"] +pub struct CNFPTR_SPEC; +impl crate::RegisterSpec for CNFPTR_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [cnfptr::R](R) reader structure"] +impl crate::Readable for CNFPTR_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [cnfptr::W](W) writer structure"] +impl crate::Writable for CNFPTR_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets CNFPTR to value 0"] +impl crate::Resettable for CNFPTR_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/ccm/enable.rs b/down-the-stack/dk_pac/src/ccm/enable.rs new file mode 100644 index 0000000..a7ddc9c --- /dev/null +++ b/down-the-stack/dk_pac/src/ccm/enable.rs @@ -0,0 +1,128 @@ +#[doc = "Register `ENABLE` 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 `ENABLE` 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 `ENABLE` reader - Enable or disable CCM"] +pub type ENABLE_R = crate::FieldReader; +#[doc = "Enable or disable CCM\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +#[repr(u8)] +pub enum ENABLE_A { + #[doc = "0: Disable"] + DISABLED = 0, + #[doc = "2: Enable"] + ENABLED = 2, +} +impl From for u8 { + #[inline(always)] + fn from(variant: ENABLE_A) -> Self { + variant as _ + } +} +impl ENABLE_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> Option { + match self.bits { + 0 => Some(ENABLE_A::DISABLED), + 2 => Some(ENABLE_A::ENABLED), + _ => None, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == ENABLE_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == ENABLE_A::ENABLED + } +} +#[doc = "Field `ENABLE` writer - Enable or disable CCM"] +pub type ENABLE_W<'a, const O: u8> = crate::FieldWriter<'a, u32, ENABLE_SPEC, u8, ENABLE_A, 2, O>; +impl<'a, const O: u8> ENABLE_W<'a, O> { + #[doc = "Disable"] + #[inline(always)] + pub fn disabled(self) -> &'a mut W { + self.variant(ENABLE_A::DISABLED) + } + #[doc = "Enable"] + #[inline(always)] + pub fn enabled(self) -> &'a mut W { + self.variant(ENABLE_A::ENABLED) + } +} +impl R { + #[doc = "Bits 0:1 - Enable or disable CCM"] + #[inline(always)] + pub fn enable(&self) -> ENABLE_R { + ENABLE_R::new((self.bits & 3) as u8) + } +} +impl W { + #[doc = "Bits 0:1 - Enable or disable CCM"] + #[inline(always)] + #[must_use] + pub fn enable(&mut self) -> ENABLE_W<0> { + 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 + } +} +#[doc = "Enable\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 [enable](index.html) module"] +pub struct ENABLE_SPEC; +impl crate::RegisterSpec for ENABLE_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [enable::R](R) reader structure"] +impl crate::Readable for ENABLE_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [enable::W](W) writer structure"] +impl crate::Writable for ENABLE_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets ENABLE to value 0"] +impl crate::Resettable for ENABLE_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/ccm/events_endcrypt.rs b/down-the-stack/dk_pac/src/ccm/events_endcrypt.rs new file mode 100644 index 0000000..ad72653 --- /dev/null +++ b/down-the-stack/dk_pac/src/ccm/events_endcrypt.rs @@ -0,0 +1,127 @@ +#[doc = "Register `EVENTS_ENDCRYPT` 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 `EVENTS_ENDCRYPT` 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 `EVENTS_ENDCRYPT` reader - Encrypt/decrypt complete"] +pub type EVENTS_ENDCRYPT_R = crate::BitReader; +#[doc = "Encrypt/decrypt complete\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum EVENTS_ENDCRYPT_A { + #[doc = "0: Event not generated"] + NOT_GENERATED = 0, + #[doc = "1: Event generated"] + GENERATED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: EVENTS_ENDCRYPT_A) -> Self { + variant as u8 != 0 + } +} +impl EVENTS_ENDCRYPT_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> EVENTS_ENDCRYPT_A { + match self.bits { + false => EVENTS_ENDCRYPT_A::NOT_GENERATED, + true => EVENTS_ENDCRYPT_A::GENERATED, + } + } + #[doc = "Checks if the value of the field is `NOT_GENERATED`"] + #[inline(always)] + pub fn is_not_generated(&self) -> bool { + *self == EVENTS_ENDCRYPT_A::NOT_GENERATED + } + #[doc = "Checks if the value of the field is `GENERATED`"] + #[inline(always)] + pub fn is_generated(&self) -> bool { + *self == EVENTS_ENDCRYPT_A::GENERATED + } +} +#[doc = "Field `EVENTS_ENDCRYPT` writer - Encrypt/decrypt complete"] +pub type EVENTS_ENDCRYPT_W<'a, const O: u8> = + crate::BitWriter<'a, u32, EVENTS_ENDCRYPT_SPEC, EVENTS_ENDCRYPT_A, O>; +impl<'a, const O: u8> EVENTS_ENDCRYPT_W<'a, O> { + #[doc = "Event not generated"] + #[inline(always)] + pub fn not_generated(self) -> &'a mut W { + self.variant(EVENTS_ENDCRYPT_A::NOT_GENERATED) + } + #[doc = "Event generated"] + #[inline(always)] + pub fn generated(self) -> &'a mut W { + self.variant(EVENTS_ENDCRYPT_A::GENERATED) + } +} +impl R { + #[doc = "Bit 0 - Encrypt/decrypt complete"] + #[inline(always)] + pub fn events_endcrypt(&self) -> EVENTS_ENDCRYPT_R { + EVENTS_ENDCRYPT_R::new((self.bits & 1) != 0) + } +} +impl W { + #[doc = "Bit 0 - Encrypt/decrypt complete"] + #[inline(always)] + #[must_use] + pub fn events_endcrypt(&mut self) -> EVENTS_ENDCRYPT_W<0> { + EVENTS_ENDCRYPT_W::new(self) + } + #[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 = "Encrypt/decrypt complete\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 [events_endcrypt](index.html) module"] +pub struct EVENTS_ENDCRYPT_SPEC; +impl crate::RegisterSpec for EVENTS_ENDCRYPT_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [events_endcrypt::R](R) reader structure"] +impl crate::Readable for EVENTS_ENDCRYPT_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [events_endcrypt::W](W) writer structure"] +impl crate::Writable for EVENTS_ENDCRYPT_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets EVENTS_ENDCRYPT to value 0"] +impl crate::Resettable for EVENTS_ENDCRYPT_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/ccm/events_endksgen.rs b/down-the-stack/dk_pac/src/ccm/events_endksgen.rs new file mode 100644 index 0000000..66ed553 --- /dev/null +++ b/down-the-stack/dk_pac/src/ccm/events_endksgen.rs @@ -0,0 +1,127 @@ +#[doc = "Register `EVENTS_ENDKSGEN` 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 `EVENTS_ENDKSGEN` 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 `EVENTS_ENDKSGEN` reader - Key-stream generation complete"] +pub type EVENTS_ENDKSGEN_R = crate::BitReader; +#[doc = "Key-stream generation complete\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum EVENTS_ENDKSGEN_A { + #[doc = "0: Event not generated"] + NOT_GENERATED = 0, + #[doc = "1: Event generated"] + GENERATED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: EVENTS_ENDKSGEN_A) -> Self { + variant as u8 != 0 + } +} +impl EVENTS_ENDKSGEN_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> EVENTS_ENDKSGEN_A { + match self.bits { + false => EVENTS_ENDKSGEN_A::NOT_GENERATED, + true => EVENTS_ENDKSGEN_A::GENERATED, + } + } + #[doc = "Checks if the value of the field is `NOT_GENERATED`"] + #[inline(always)] + pub fn is_not_generated(&self) -> bool { + *self == EVENTS_ENDKSGEN_A::NOT_GENERATED + } + #[doc = "Checks if the value of the field is `GENERATED`"] + #[inline(always)] + pub fn is_generated(&self) -> bool { + *self == EVENTS_ENDKSGEN_A::GENERATED + } +} +#[doc = "Field `EVENTS_ENDKSGEN` writer - Key-stream generation complete"] +pub type EVENTS_ENDKSGEN_W<'a, const O: u8> = + crate::BitWriter<'a, u32, EVENTS_ENDKSGEN_SPEC, EVENTS_ENDKSGEN_A, O>; +impl<'a, const O: u8> EVENTS_ENDKSGEN_W<'a, O> { + #[doc = "Event not generated"] + #[inline(always)] + pub fn not_generated(self) -> &'a mut W { + self.variant(EVENTS_ENDKSGEN_A::NOT_GENERATED) + } + #[doc = "Event generated"] + #[inline(always)] + pub fn generated(self) -> &'a mut W { + self.variant(EVENTS_ENDKSGEN_A::GENERATED) + } +} +impl R { + #[doc = "Bit 0 - Key-stream generation complete"] + #[inline(always)] + pub fn events_endksgen(&self) -> EVENTS_ENDKSGEN_R { + EVENTS_ENDKSGEN_R::new((self.bits & 1) != 0) + } +} +impl W { + #[doc = "Bit 0 - Key-stream generation complete"] + #[inline(always)] + #[must_use] + pub fn events_endksgen(&mut self) -> EVENTS_ENDKSGEN_W<0> { + EVENTS_ENDKSGEN_W::new(self) + } + #[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 = "Key-stream generation complete\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 [events_endksgen](index.html) module"] +pub struct EVENTS_ENDKSGEN_SPEC; +impl crate::RegisterSpec for EVENTS_ENDKSGEN_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [events_endksgen::R](R) reader structure"] +impl crate::Readable for EVENTS_ENDKSGEN_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [events_endksgen::W](W) writer structure"] +impl crate::Writable for EVENTS_ENDKSGEN_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets EVENTS_ENDKSGEN to value 0"] +impl crate::Resettable for EVENTS_ENDKSGEN_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/ccm/events_error.rs b/down-the-stack/dk_pac/src/ccm/events_error.rs new file mode 100644 index 0000000..897b7d2 --- /dev/null +++ b/down-the-stack/dk_pac/src/ccm/events_error.rs @@ -0,0 +1,127 @@ +#[doc = "Register `EVENTS_ERROR` 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 `EVENTS_ERROR` 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 `EVENTS_ERROR` reader - CCM error event"] +pub type EVENTS_ERROR_R = crate::BitReader; +#[doc = "CCM error event\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum EVENTS_ERROR_A { + #[doc = "0: Event not generated"] + NOT_GENERATED = 0, + #[doc = "1: Event generated"] + GENERATED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: EVENTS_ERROR_A) -> Self { + variant as u8 != 0 + } +} +impl EVENTS_ERROR_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> EVENTS_ERROR_A { + match self.bits { + false => EVENTS_ERROR_A::NOT_GENERATED, + true => EVENTS_ERROR_A::GENERATED, + } + } + #[doc = "Checks if the value of the field is `NOT_GENERATED`"] + #[inline(always)] + pub fn is_not_generated(&self) -> bool { + *self == EVENTS_ERROR_A::NOT_GENERATED + } + #[doc = "Checks if the value of the field is `GENERATED`"] + #[inline(always)] + pub fn is_generated(&self) -> bool { + *self == EVENTS_ERROR_A::GENERATED + } +} +#[doc = "Field `EVENTS_ERROR` writer - CCM error event"] +pub type EVENTS_ERROR_W<'a, const O: u8> = + crate::BitWriter<'a, u32, EVENTS_ERROR_SPEC, EVENTS_ERROR_A, O>; +impl<'a, const O: u8> EVENTS_ERROR_W<'a, O> { + #[doc = "Event not generated"] + #[inline(always)] + pub fn not_generated(self) -> &'a mut W { + self.variant(EVENTS_ERROR_A::NOT_GENERATED) + } + #[doc = "Event generated"] + #[inline(always)] + pub fn generated(self) -> &'a mut W { + self.variant(EVENTS_ERROR_A::GENERATED) + } +} +impl R { + #[doc = "Bit 0 - CCM error event"] + #[inline(always)] + pub fn events_error(&self) -> EVENTS_ERROR_R { + EVENTS_ERROR_R::new((self.bits & 1) != 0) + } +} +impl W { + #[doc = "Bit 0 - CCM error event"] + #[inline(always)] + #[must_use] + pub fn events_error(&mut self) -> EVENTS_ERROR_W<0> { + EVENTS_ERROR_W::new(self) + } + #[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 = "CCM error event\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 [events_error](index.html) module"] +pub struct EVENTS_ERROR_SPEC; +impl crate::RegisterSpec for EVENTS_ERROR_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [events_error::R](R) reader structure"] +impl crate::Readable for EVENTS_ERROR_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [events_error::W](W) writer structure"] +impl crate::Writable for EVENTS_ERROR_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets EVENTS_ERROR to value 0"] +impl crate::Resettable for EVENTS_ERROR_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/ccm/inptr.rs b/down-the-stack/dk_pac/src/ccm/inptr.rs new file mode 100644 index 0000000..fa6687c --- /dev/null +++ b/down-the-stack/dk_pac/src/ccm/inptr.rs @@ -0,0 +1,80 @@ +#[doc = "Register `INPTR` 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 `INPTR` 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 `INPTR` reader - Input pointer"] +pub type INPTR_R = crate::FieldReader; +#[doc = "Field `INPTR` writer - Input pointer"] +pub type INPTR_W<'a, const O: u8> = crate::FieldWriter<'a, u32, INPTR_SPEC, u32, u32, 32, O>; +impl R { + #[doc = "Bits 0:31 - Input pointer"] + #[inline(always)] + pub fn inptr(&self) -> INPTR_R { + INPTR_R::new(self.bits) + } +} +impl W { + #[doc = "Bits 0:31 - Input pointer"] + #[inline(always)] + #[must_use] + pub fn inptr(&mut self) -> INPTR_W<0> { + INPTR_W::new(self) + } + #[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 = "Input pointer\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 [inptr](index.html) module"] +pub struct INPTR_SPEC; +impl crate::RegisterSpec for INPTR_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [inptr::R](R) reader structure"] +impl crate::Readable for INPTR_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [inptr::W](W) writer structure"] +impl crate::Writable for INPTR_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets INPTR to value 0"] +impl crate::Resettable for INPTR_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/ccm/intenclr.rs b/down-the-stack/dk_pac/src/ccm/intenclr.rs new file mode 100644 index 0000000..aff948e --- /dev/null +++ b/down-the-stack/dk_pac/src/ccm/intenclr.rs @@ -0,0 +1,269 @@ +#[doc = "Register `INTENCLR` 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 `INTENCLR` 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 `ENDKSGEN` reader - Write '1' to disable interrupt for event ENDKSGEN"] +pub type ENDKSGEN_R = crate::BitReader; +#[doc = "Write '1' to disable interrupt for event ENDKSGEN\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum ENDKSGEN_A { + #[doc = "0: Read: Disabled"] + DISABLED = 0, + #[doc = "1: Read: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: ENDKSGEN_A) -> Self { + variant as u8 != 0 + } +} +impl ENDKSGEN_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> ENDKSGEN_A { + match self.bits { + false => ENDKSGEN_A::DISABLED, + true => ENDKSGEN_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == ENDKSGEN_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == ENDKSGEN_A::ENABLED + } +} +#[doc = "Write '1' to disable interrupt for event ENDKSGEN\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum ENDKSGEN_AW { + #[doc = "1: Disable"] + CLEAR = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: ENDKSGEN_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `ENDKSGEN` writer - Write '1' to disable interrupt for event ENDKSGEN"] +pub type ENDKSGEN_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENCLR_SPEC, ENDKSGEN_AW, O>; +impl<'a, const O: u8> ENDKSGEN_W<'a, O> { + #[doc = "Disable"] + #[inline(always)] + pub fn clear(self) -> &'a mut W { + self.variant(ENDKSGEN_AW::CLEAR) + } +} +#[doc = "Field `ENDCRYPT` reader - Write '1' to disable interrupt for event ENDCRYPT"] +pub type ENDCRYPT_R = crate::BitReader; +#[doc = "Write '1' to disable interrupt for event ENDCRYPT\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum ENDCRYPT_A { + #[doc = "0: Read: Disabled"] + DISABLED = 0, + #[doc = "1: Read: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: ENDCRYPT_A) -> Self { + variant as u8 != 0 + } +} +impl ENDCRYPT_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> ENDCRYPT_A { + match self.bits { + false => ENDCRYPT_A::DISABLED, + true => ENDCRYPT_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == ENDCRYPT_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == ENDCRYPT_A::ENABLED + } +} +#[doc = "Write '1' to disable interrupt for event ENDCRYPT\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum ENDCRYPT_AW { + #[doc = "1: Disable"] + CLEAR = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: ENDCRYPT_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `ENDCRYPT` writer - Write '1' to disable interrupt for event ENDCRYPT"] +pub type ENDCRYPT_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENCLR_SPEC, ENDCRYPT_AW, O>; +impl<'a, const O: u8> ENDCRYPT_W<'a, O> { + #[doc = "Disable"] + #[inline(always)] + pub fn clear(self) -> &'a mut W { + self.variant(ENDCRYPT_AW::CLEAR) + } +} +#[doc = "Field `ERROR` reader - Write '1' to disable interrupt for event ERROR"] +pub type ERROR_R = crate::BitReader; +#[doc = "Write '1' to disable interrupt for event ERROR\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum ERROR_A { + #[doc = "0: Read: Disabled"] + DISABLED = 0, + #[doc = "1: Read: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: ERROR_A) -> Self { + variant as u8 != 0 + } +} +impl ERROR_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> ERROR_A { + match self.bits { + false => ERROR_A::DISABLED, + true => ERROR_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == ERROR_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == ERROR_A::ENABLED + } +} +#[doc = "Write '1' to disable interrupt for event ERROR\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum ERROR_AW { + #[doc = "1: Disable"] + CLEAR = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: ERROR_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `ERROR` writer - Write '1' to disable interrupt for event ERROR"] +pub type ERROR_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENCLR_SPEC, ERROR_AW, O>; +impl<'a, const O: u8> ERROR_W<'a, O> { + #[doc = "Disable"] + #[inline(always)] + pub fn clear(self) -> &'a mut W { + self.variant(ERROR_AW::CLEAR) + } +} +impl R { + #[doc = "Bit 0 - Write '1' to disable interrupt for event ENDKSGEN"] + #[inline(always)] + pub fn endksgen(&self) -> ENDKSGEN_R { + ENDKSGEN_R::new((self.bits & 1) != 0) + } + #[doc = "Bit 1 - Write '1' to disable interrupt for event ENDCRYPT"] + #[inline(always)] + pub fn endcrypt(&self) -> ENDCRYPT_R { + ENDCRYPT_R::new(((self.bits >> 1) & 1) != 0) + } + #[doc = "Bit 2 - Write '1' to disable interrupt for event ERROR"] + #[inline(always)] + pub fn error(&self) -> ERROR_R { + ERROR_R::new(((self.bits >> 2) & 1) != 0) + } +} +impl W { + #[doc = "Bit 0 - Write '1' to disable interrupt for event ENDKSGEN"] + #[inline(always)] + #[must_use] + pub fn endksgen(&mut self) -> ENDKSGEN_W<0> { + ENDKSGEN_W::new(self) + } + #[doc = "Bit 1 - Write '1' to disable interrupt for event ENDCRYPT"] + #[inline(always)] + #[must_use] + pub fn endcrypt(&mut self) -> ENDCRYPT_W<1> { + ENDCRYPT_W::new(self) + } + #[doc = "Bit 2 - Write '1' to disable interrupt for event ERROR"] + #[inline(always)] + #[must_use] + pub fn error(&mut self) -> ERROR_W<2> { + ERROR_W::new(self) + } + #[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 = "Disable interrupt\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 [intenclr](index.html) module"] +pub struct INTENCLR_SPEC; +impl crate::RegisterSpec for INTENCLR_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [intenclr::R](R) reader structure"] +impl crate::Readable for INTENCLR_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [intenclr::W](W) writer structure"] +impl crate::Writable for INTENCLR_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets INTENCLR to value 0"] +impl crate::Resettable for INTENCLR_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/ccm/intenset.rs b/down-the-stack/dk_pac/src/ccm/intenset.rs new file mode 100644 index 0000000..3c3facb --- /dev/null +++ b/down-the-stack/dk_pac/src/ccm/intenset.rs @@ -0,0 +1,269 @@ +#[doc = "Register `INTENSET` 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 `INTENSET` 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 `ENDKSGEN` reader - Write '1' to enable interrupt for event ENDKSGEN"] +pub type ENDKSGEN_R = crate::BitReader; +#[doc = "Write '1' to enable interrupt for event ENDKSGEN\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum ENDKSGEN_A { + #[doc = "0: Read: Disabled"] + DISABLED = 0, + #[doc = "1: Read: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: ENDKSGEN_A) -> Self { + variant as u8 != 0 + } +} +impl ENDKSGEN_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> ENDKSGEN_A { + match self.bits { + false => ENDKSGEN_A::DISABLED, + true => ENDKSGEN_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == ENDKSGEN_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == ENDKSGEN_A::ENABLED + } +} +#[doc = "Write '1' to enable interrupt for event ENDKSGEN\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum ENDKSGEN_AW { + #[doc = "1: Enable"] + SET = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: ENDKSGEN_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `ENDKSGEN` writer - Write '1' to enable interrupt for event ENDKSGEN"] +pub type ENDKSGEN_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENSET_SPEC, ENDKSGEN_AW, O>; +impl<'a, const O: u8> ENDKSGEN_W<'a, O> { + #[doc = "Enable"] + #[inline(always)] + pub fn set(self) -> &'a mut W { + self.variant(ENDKSGEN_AW::SET) + } +} +#[doc = "Field `ENDCRYPT` reader - Write '1' to enable interrupt for event ENDCRYPT"] +pub type ENDCRYPT_R = crate::BitReader; +#[doc = "Write '1' to enable interrupt for event ENDCRYPT\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum ENDCRYPT_A { + #[doc = "0: Read: Disabled"] + DISABLED = 0, + #[doc = "1: Read: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: ENDCRYPT_A) -> Self { + variant as u8 != 0 + } +} +impl ENDCRYPT_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> ENDCRYPT_A { + match self.bits { + false => ENDCRYPT_A::DISABLED, + true => ENDCRYPT_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == ENDCRYPT_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == ENDCRYPT_A::ENABLED + } +} +#[doc = "Write '1' to enable interrupt for event ENDCRYPT\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum ENDCRYPT_AW { + #[doc = "1: Enable"] + SET = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: ENDCRYPT_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `ENDCRYPT` writer - Write '1' to enable interrupt for event ENDCRYPT"] +pub type ENDCRYPT_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENSET_SPEC, ENDCRYPT_AW, O>; +impl<'a, const O: u8> ENDCRYPT_W<'a, O> { + #[doc = "Enable"] + #[inline(always)] + pub fn set(self) -> &'a mut W { + self.variant(ENDCRYPT_AW::SET) + } +} +#[doc = "Field `ERROR` reader - Write '1' to enable interrupt for event ERROR"] +pub type ERROR_R = crate::BitReader; +#[doc = "Write '1' to enable interrupt for event ERROR\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum ERROR_A { + #[doc = "0: Read: Disabled"] + DISABLED = 0, + #[doc = "1: Read: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: ERROR_A) -> Self { + variant as u8 != 0 + } +} +impl ERROR_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> ERROR_A { + match self.bits { + false => ERROR_A::DISABLED, + true => ERROR_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == ERROR_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == ERROR_A::ENABLED + } +} +#[doc = "Write '1' to enable interrupt for event ERROR\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum ERROR_AW { + #[doc = "1: Enable"] + SET = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: ERROR_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `ERROR` writer - Write '1' to enable interrupt for event ERROR"] +pub type ERROR_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENSET_SPEC, ERROR_AW, O>; +impl<'a, const O: u8> ERROR_W<'a, O> { + #[doc = "Enable"] + #[inline(always)] + pub fn set(self) -> &'a mut W { + self.variant(ERROR_AW::SET) + } +} +impl R { + #[doc = "Bit 0 - Write '1' to enable interrupt for event ENDKSGEN"] + #[inline(always)] + pub fn endksgen(&self) -> ENDKSGEN_R { + ENDKSGEN_R::new((self.bits & 1) != 0) + } + #[doc = "Bit 1 - Write '1' to enable interrupt for event ENDCRYPT"] + #[inline(always)] + pub fn endcrypt(&self) -> ENDCRYPT_R { + ENDCRYPT_R::new(((self.bits >> 1) & 1) != 0) + } + #[doc = "Bit 2 - Write '1' to enable interrupt for event ERROR"] + #[inline(always)] + pub fn error(&self) -> ERROR_R { + ERROR_R::new(((self.bits >> 2) & 1) != 0) + } +} +impl W { + #[doc = "Bit 0 - Write '1' to enable interrupt for event ENDKSGEN"] + #[inline(always)] + #[must_use] + pub fn endksgen(&mut self) -> ENDKSGEN_W<0> { + ENDKSGEN_W::new(self) + } + #[doc = "Bit 1 - Write '1' to enable interrupt for event ENDCRYPT"] + #[inline(always)] + #[must_use] + pub fn endcrypt(&mut self) -> ENDCRYPT_W<1> { + ENDCRYPT_W::new(self) + } + #[doc = "Bit 2 - Write '1' to enable interrupt for event ERROR"] + #[inline(always)] + #[must_use] + pub fn error(&mut self) -> ERROR_W<2> { + ERROR_W::new(self) + } + #[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 = "Enable interrupt\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 [intenset](index.html) module"] +pub struct INTENSET_SPEC; +impl crate::RegisterSpec for INTENSET_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [intenset::R](R) reader structure"] +impl crate::Readable for INTENSET_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [intenset::W](W) writer structure"] +impl crate::Writable for INTENSET_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets INTENSET to value 0"] +impl crate::Resettable for INTENSET_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/ccm/micstatus.rs b/down-the-stack/dk_pac/src/ccm/micstatus.rs new file mode 100644 index 0000000..32a430a --- /dev/null +++ b/down-the-stack/dk_pac/src/ccm/micstatus.rs @@ -0,0 +1,71 @@ +#[doc = "Register `MICSTATUS` 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 = "Field `MICSTATUS` reader - The result of the MIC check performed during the previous decryption operation"] +pub type MICSTATUS_R = crate::BitReader; +#[doc = "The result of the MIC check performed during the previous decryption operation\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum MICSTATUS_A { + #[doc = "0: MIC check failed"] + CHECK_FAILED = 0, + #[doc = "1: MIC check passed"] + CHECK_PASSED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: MICSTATUS_A) -> Self { + variant as u8 != 0 + } +} +impl MICSTATUS_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> MICSTATUS_A { + match self.bits { + false => MICSTATUS_A::CHECK_FAILED, + true => MICSTATUS_A::CHECK_PASSED, + } + } + #[doc = "Checks if the value of the field is `CHECK_FAILED`"] + #[inline(always)] + pub fn is_check_failed(&self) -> bool { + *self == MICSTATUS_A::CHECK_FAILED + } + #[doc = "Checks if the value of the field is `CHECK_PASSED`"] + #[inline(always)] + pub fn is_check_passed(&self) -> bool { + *self == MICSTATUS_A::CHECK_PASSED + } +} +impl R { + #[doc = "Bit 0 - The result of the MIC check performed during the previous decryption operation"] + #[inline(always)] + pub fn micstatus(&self) -> MICSTATUS_R { + MICSTATUS_R::new((self.bits & 1) != 0) + } +} +#[doc = "MIC check 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 [micstatus](index.html) module"] +pub struct MICSTATUS_SPEC; +impl crate::RegisterSpec for MICSTATUS_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [micstatus::R](R) reader structure"] +impl crate::Readable for MICSTATUS_SPEC { + type Reader = R; +} +#[doc = "`reset()` method sets MICSTATUS to value 0"] +impl crate::Resettable for MICSTATUS_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/ccm/mode.rs b/down-the-stack/dk_pac/src/ccm/mode.rs new file mode 100644 index 0000000..c991790 --- /dev/null +++ b/down-the-stack/dk_pac/src/ccm/mode.rs @@ -0,0 +1,248 @@ +#[doc = "Register `MODE` 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 `MODE` 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 `MODE` reader - The mode of operation to be used"] +pub type MODE_R = crate::BitReader; +#[doc = "The mode of operation to be used\n\nValue on reset: 1"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum MODE_A { + #[doc = "0: AES CCM packet encryption mode"] + ENCRYPTION = 0, + #[doc = "1: AES CCM packet decryption mode"] + DECRYPTION = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: MODE_A) -> Self { + variant as u8 != 0 + } +} +impl MODE_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> MODE_A { + match self.bits { + false => MODE_A::ENCRYPTION, + true => MODE_A::DECRYPTION, + } + } + #[doc = "Checks if the value of the field is `ENCRYPTION`"] + #[inline(always)] + pub fn is_encryption(&self) -> bool { + *self == MODE_A::ENCRYPTION + } + #[doc = "Checks if the value of the field is `DECRYPTION`"] + #[inline(always)] + pub fn is_decryption(&self) -> bool { + *self == MODE_A::DECRYPTION + } +} +#[doc = "Field `MODE` writer - The mode of operation to be used"] +pub type MODE_W<'a, const O: u8> = crate::BitWriter<'a, u32, MODE_SPEC, MODE_A, O>; +impl<'a, const O: u8> MODE_W<'a, O> { + #[doc = "AES CCM packet encryption mode"] + #[inline(always)] + pub fn encryption(self) -> &'a mut W { + self.variant(MODE_A::ENCRYPTION) + } + #[doc = "AES CCM packet decryption mode"] + #[inline(always)] + pub fn decryption(self) -> &'a mut W { + self.variant(MODE_A::DECRYPTION) + } +} +#[doc = "Field `DATARATE` reader - Data rate that the CCM shall run in synch with"] +pub type DATARATE_R = crate::BitReader; +#[doc = "Data rate that the CCM shall run in synch with\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum DATARATE_A { + #[doc = "0: In synch with 1 Mbit data rate"] + _1MBIT = 0, + #[doc = "1: In synch with 2 Mbit data rate"] + _2MBIT = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: DATARATE_A) -> Self { + variant as u8 != 0 + } +} +impl DATARATE_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> DATARATE_A { + match self.bits { + false => DATARATE_A::_1MBIT, + true => DATARATE_A::_2MBIT, + } + } + #[doc = "Checks if the value of the field is `_1MBIT`"] + #[inline(always)] + pub fn is_1mbit(&self) -> bool { + *self == DATARATE_A::_1MBIT + } + #[doc = "Checks if the value of the field is `_2MBIT`"] + #[inline(always)] + pub fn is_2mbit(&self) -> bool { + *self == DATARATE_A::_2MBIT + } +} +#[doc = "Field `DATARATE` writer - Data rate that the CCM shall run in synch with"] +pub type DATARATE_W<'a, const O: u8> = crate::BitWriter<'a, u32, MODE_SPEC, DATARATE_A, O>; +impl<'a, const O: u8> DATARATE_W<'a, O> { + #[doc = "In synch with 1 Mbit data rate"] + #[inline(always)] + pub fn _1mbit(self) -> &'a mut W { + self.variant(DATARATE_A::_1MBIT) + } + #[doc = "In synch with 2 Mbit data rate"] + #[inline(always)] + pub fn _2mbit(self) -> &'a mut W { + self.variant(DATARATE_A::_2MBIT) + } +} +#[doc = "Field `LENGTH` reader - Packet length configuration"] +pub type LENGTH_R = crate::BitReader; +#[doc = "Packet length configuration\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum LENGTH_A { + #[doc = "0: Default length. Effective length of LENGTH field is 5-bit"] + DEFAULT = 0, + #[doc = "1: Extended length. Effective length of LENGTH field is 8-bit"] + EXTENDED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: LENGTH_A) -> Self { + variant as u8 != 0 + } +} +impl LENGTH_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> LENGTH_A { + match self.bits { + false => LENGTH_A::DEFAULT, + true => LENGTH_A::EXTENDED, + } + } + #[doc = "Checks if the value of the field is `DEFAULT`"] + #[inline(always)] + pub fn is_default(&self) -> bool { + *self == LENGTH_A::DEFAULT + } + #[doc = "Checks if the value of the field is `EXTENDED`"] + #[inline(always)] + pub fn is_extended(&self) -> bool { + *self == LENGTH_A::EXTENDED + } +} +#[doc = "Field `LENGTH` writer - Packet length configuration"] +pub type LENGTH_W<'a, const O: u8> = crate::BitWriter<'a, u32, MODE_SPEC, LENGTH_A, O>; +impl<'a, const O: u8> LENGTH_W<'a, O> { + #[doc = "Default length. Effective length of LENGTH field is 5-bit"] + #[inline(always)] + pub fn default(self) -> &'a mut W { + self.variant(LENGTH_A::DEFAULT) + } + #[doc = "Extended length. Effective length of LENGTH field is 8-bit"] + #[inline(always)] + pub fn extended(self) -> &'a mut W { + self.variant(LENGTH_A::EXTENDED) + } +} +impl R { + #[doc = "Bit 0 - The mode of operation to be used"] + #[inline(always)] + pub fn mode(&self) -> MODE_R { + MODE_R::new((self.bits & 1) != 0) + } + #[doc = "Bit 16 - Data rate that the CCM shall run in synch with"] + #[inline(always)] + pub fn datarate(&self) -> DATARATE_R { + DATARATE_R::new(((self.bits >> 16) & 1) != 0) + } + #[doc = "Bit 24 - Packet length configuration"] + #[inline(always)] + pub fn length(&self) -> LENGTH_R { + LENGTH_R::new(((self.bits >> 24) & 1) != 0) + } +} +impl W { + #[doc = "Bit 0 - The mode of operation to be used"] + #[inline(always)] + #[must_use] + pub fn mode(&mut self) -> MODE_W<0> { + MODE_W::new(self) + } + #[doc = "Bit 16 - Data rate that the CCM shall run in synch with"] + #[inline(always)] + #[must_use] + pub fn datarate(&mut self) -> DATARATE_W<16> { + DATARATE_W::new(self) + } + #[doc = "Bit 24 - Packet length configuration"] + #[inline(always)] + #[must_use] + pub fn length(&mut self) -> LENGTH_W<24> { + LENGTH_W::new(self) + } + #[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 = "Operation mode\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 [mode](index.html) module"] +pub struct MODE_SPEC; +impl crate::RegisterSpec for MODE_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [mode::R](R) reader structure"] +impl crate::Readable for MODE_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [mode::W](W) writer structure"] +impl crate::Writable for 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 MODE to value 0x01"] +impl crate::Resettable for MODE_SPEC { + const RESET_VALUE: Self::Ux = 0x01; +} diff --git a/down-the-stack/dk_pac/src/ccm/outptr.rs b/down-the-stack/dk_pac/src/ccm/outptr.rs new file mode 100644 index 0000000..ec47115 --- /dev/null +++ b/down-the-stack/dk_pac/src/ccm/outptr.rs @@ -0,0 +1,80 @@ +#[doc = "Register `OUTPTR` 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 `OUTPTR` 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 `OUTPTR` reader - Output pointer"] +pub type OUTPTR_R = crate::FieldReader; +#[doc = "Field `OUTPTR` writer - Output pointer"] +pub type OUTPTR_W<'a, const O: u8> = crate::FieldWriter<'a, u32, OUTPTR_SPEC, u32, u32, 32, O>; +impl R { + #[doc = "Bits 0:31 - Output pointer"] + #[inline(always)] + pub fn outptr(&self) -> OUTPTR_R { + OUTPTR_R::new(self.bits) + } +} +impl W { + #[doc = "Bits 0:31 - Output pointer"] + #[inline(always)] + #[must_use] + pub fn outptr(&mut self) -> OUTPTR_W<0> { + OUTPTR_W::new(self) + } + #[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 = "Output pointer\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 [outptr](index.html) module"] +pub struct OUTPTR_SPEC; +impl crate::RegisterSpec for OUTPTR_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [outptr::R](R) reader structure"] +impl crate::Readable for OUTPTR_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [outptr::W](W) writer structure"] +impl crate::Writable for OUTPTR_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets OUTPTR to value 0"] +impl crate::Resettable for OUTPTR_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/ccm/scratchptr.rs b/down-the-stack/dk_pac/src/ccm/scratchptr.rs new file mode 100644 index 0000000..c0df6e5 --- /dev/null +++ b/down-the-stack/dk_pac/src/ccm/scratchptr.rs @@ -0,0 +1,81 @@ +#[doc = "Register `SCRATCHPTR` 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 `SCRATCHPTR` 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 `SCRATCHPTR` reader - Pointer to a scratch data area used for temporary storage during key-stream generation, MIC generation and encryption/decryption."] +pub type SCRATCHPTR_R = crate::FieldReader; +#[doc = "Field `SCRATCHPTR` writer - Pointer to a scratch data area used for temporary storage during key-stream generation, MIC generation and encryption/decryption."] +pub type SCRATCHPTR_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, SCRATCHPTR_SPEC, u32, u32, 32, O>; +impl R { + #[doc = "Bits 0:31 - Pointer to a scratch data area used for temporary storage during key-stream generation, MIC generation and encryption/decryption."] + #[inline(always)] + pub fn scratchptr(&self) -> SCRATCHPTR_R { + SCRATCHPTR_R::new(self.bits) + } +} +impl W { + #[doc = "Bits 0:31 - Pointer to a scratch data area used for temporary storage during key-stream generation, MIC generation and encryption/decryption."] + #[inline(always)] + #[must_use] + pub fn scratchptr(&mut self) -> SCRATCHPTR_W<0> { + SCRATCHPTR_W::new(self) + } + #[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 = "Pointer to data area used for temporary storage\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 [scratchptr](index.html) module"] +pub struct SCRATCHPTR_SPEC; +impl crate::RegisterSpec for SCRATCHPTR_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [scratchptr::R](R) reader structure"] +impl crate::Readable for SCRATCHPTR_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [scratchptr::W](W) writer structure"] +impl crate::Writable for SCRATCHPTR_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets SCRATCHPTR to value 0"] +impl crate::Resettable for SCRATCHPTR_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/ccm/shorts.rs b/down-the-stack/dk_pac/src/ccm/shorts.rs new file mode 100644 index 0000000..062d69c --- /dev/null +++ b/down-the-stack/dk_pac/src/ccm/shorts.rs @@ -0,0 +1,127 @@ +#[doc = "Register `SHORTS` 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 `SHORTS` 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 `ENDKSGEN_CRYPT` reader - Shortcut between event ENDKSGEN and task CRYPT"] +pub type ENDKSGEN_CRYPT_R = crate::BitReader; +#[doc = "Shortcut between event ENDKSGEN and task CRYPT\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum ENDKSGEN_CRYPT_A { + #[doc = "0: Disable shortcut"] + DISABLED = 0, + #[doc = "1: Enable shortcut"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: ENDKSGEN_CRYPT_A) -> Self { + variant as u8 != 0 + } +} +impl ENDKSGEN_CRYPT_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> ENDKSGEN_CRYPT_A { + match self.bits { + false => ENDKSGEN_CRYPT_A::DISABLED, + true => ENDKSGEN_CRYPT_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == ENDKSGEN_CRYPT_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == ENDKSGEN_CRYPT_A::ENABLED + } +} +#[doc = "Field `ENDKSGEN_CRYPT` writer - Shortcut between event ENDKSGEN and task CRYPT"] +pub type ENDKSGEN_CRYPT_W<'a, const O: u8> = + crate::BitWriter<'a, u32, SHORTS_SPEC, ENDKSGEN_CRYPT_A, O>; +impl<'a, const O: u8> ENDKSGEN_CRYPT_W<'a, O> { + #[doc = "Disable shortcut"] + #[inline(always)] + pub fn disabled(self) -> &'a mut W { + self.variant(ENDKSGEN_CRYPT_A::DISABLED) + } + #[doc = "Enable shortcut"] + #[inline(always)] + pub fn enabled(self) -> &'a mut W { + self.variant(ENDKSGEN_CRYPT_A::ENABLED) + } +} +impl R { + #[doc = "Bit 0 - Shortcut between event ENDKSGEN and task CRYPT"] + #[inline(always)] + pub fn endksgen_crypt(&self) -> ENDKSGEN_CRYPT_R { + ENDKSGEN_CRYPT_R::new((self.bits & 1) != 0) + } +} +impl W { + #[doc = "Bit 0 - Shortcut between event ENDKSGEN and task CRYPT"] + #[inline(always)] + #[must_use] + pub fn endksgen_crypt(&mut self) -> ENDKSGEN_CRYPT_W<0> { + ENDKSGEN_CRYPT_W::new(self) + } + #[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 = "Shortcuts between local events and tasks\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 [shorts](index.html) module"] +pub struct SHORTS_SPEC; +impl crate::RegisterSpec for SHORTS_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [shorts::R](R) reader structure"] +impl crate::Readable for SHORTS_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [shorts::W](W) writer structure"] +impl crate::Writable for SHORTS_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets SHORTS to value 0"] +impl crate::Resettable for SHORTS_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/ccm/tasks_crypt.rs b/down-the-stack/dk_pac/src/ccm/tasks_crypt.rs new file mode 100644 index 0000000..1cd9e97 --- /dev/null +++ b/down-the-stack/dk_pac/src/ccm/tasks_crypt.rs @@ -0,0 +1,72 @@ +#[doc = "Register `TASKS_CRYPT` 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 = "Start encryption/decryption. This operation will stop by itself when completed.\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum TASKS_CRYPT_AW { + #[doc = "1: Trigger task"] + TRIGGER = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: TASKS_CRYPT_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `TASKS_CRYPT` writer - Start encryption/decryption. This operation will stop by itself when completed."] +pub type TASKS_CRYPT_W<'a, const O: u8> = + crate::BitWriter<'a, u32, TASKS_CRYPT_SPEC, TASKS_CRYPT_AW, O>; +impl<'a, const O: u8> TASKS_CRYPT_W<'a, O> { + #[doc = "Trigger task"] + #[inline(always)] + pub fn trigger(self) -> &'a mut W { + self.variant(TASKS_CRYPT_AW::TRIGGER) + } +} +impl W { + #[doc = "Bit 0 - Start encryption/decryption. This operation will stop by itself when completed."] + #[inline(always)] + #[must_use] + pub fn tasks_crypt(&mut self) -> TASKS_CRYPT_W<0> { + TASKS_CRYPT_W::new(self) + } + #[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 = "Start encryption/decryption. This operation will stop by itself when completed.\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 [tasks_crypt](index.html) module"] +pub struct TASKS_CRYPT_SPEC; +impl crate::RegisterSpec for TASKS_CRYPT_SPEC { + type Ux = u32; +} +#[doc = "`write(|w| ..)` method takes [tasks_crypt::W](W) writer structure"] +impl crate::Writable for TASKS_CRYPT_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets TASKS_CRYPT to value 0"] +impl crate::Resettable for TASKS_CRYPT_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/ccm/tasks_ksgen.rs b/down-the-stack/dk_pac/src/ccm/tasks_ksgen.rs new file mode 100644 index 0000000..eedcdb9 --- /dev/null +++ b/down-the-stack/dk_pac/src/ccm/tasks_ksgen.rs @@ -0,0 +1,72 @@ +#[doc = "Register `TASKS_KSGEN` 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 = "Start generation of key-stream. This operation will stop by itself when completed.\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum TASKS_KSGEN_AW { + #[doc = "1: Trigger task"] + TRIGGER = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: TASKS_KSGEN_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `TASKS_KSGEN` writer - Start generation of key-stream. This operation will stop by itself when completed."] +pub type TASKS_KSGEN_W<'a, const O: u8> = + crate::BitWriter<'a, u32, TASKS_KSGEN_SPEC, TASKS_KSGEN_AW, O>; +impl<'a, const O: u8> TASKS_KSGEN_W<'a, O> { + #[doc = "Trigger task"] + #[inline(always)] + pub fn trigger(self) -> &'a mut W { + self.variant(TASKS_KSGEN_AW::TRIGGER) + } +} +impl W { + #[doc = "Bit 0 - Start generation of key-stream. This operation will stop by itself when completed."] + #[inline(always)] + #[must_use] + pub fn tasks_ksgen(&mut self) -> TASKS_KSGEN_W<0> { + TASKS_KSGEN_W::new(self) + } + #[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 = "Start generation of key-stream. This operation will stop by itself when completed.\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 [tasks_ksgen](index.html) module"] +pub struct TASKS_KSGEN_SPEC; +impl crate::RegisterSpec for TASKS_KSGEN_SPEC { + type Ux = u32; +} +#[doc = "`write(|w| ..)` method takes [tasks_ksgen::W](W) writer structure"] +impl crate::Writable for TASKS_KSGEN_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets TASKS_KSGEN to value 0"] +impl crate::Resettable for TASKS_KSGEN_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/ccm/tasks_stop.rs b/down-the-stack/dk_pac/src/ccm/tasks_stop.rs new file mode 100644 index 0000000..e29cb52 --- /dev/null +++ b/down-the-stack/dk_pac/src/ccm/tasks_stop.rs @@ -0,0 +1,72 @@ +#[doc = "Register `TASKS_STOP` 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 = "Stop encryption/decryption\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum TASKS_STOP_AW { + #[doc = "1: Trigger task"] + TRIGGER = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: TASKS_STOP_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `TASKS_STOP` writer - Stop encryption/decryption"] +pub type TASKS_STOP_W<'a, const O: u8> = + crate::BitWriter<'a, u32, TASKS_STOP_SPEC, TASKS_STOP_AW, O>; +impl<'a, const O: u8> TASKS_STOP_W<'a, O> { + #[doc = "Trigger task"] + #[inline(always)] + pub fn trigger(self) -> &'a mut W { + self.variant(TASKS_STOP_AW::TRIGGER) + } +} +impl W { + #[doc = "Bit 0 - Stop encryption/decryption"] + #[inline(always)] + #[must_use] + pub fn tasks_stop(&mut self) -> TASKS_STOP_W<0> { + TASKS_STOP_W::new(self) + } + #[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 = "Stop encryption/decryption\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 [tasks_stop](index.html) module"] +pub struct TASKS_STOP_SPEC; +impl crate::RegisterSpec for TASKS_STOP_SPEC { + type Ux = u32; +} +#[doc = "`write(|w| ..)` method takes [tasks_stop::W](W) writer structure"] +impl crate::Writable for TASKS_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 TASKS_STOP to value 0"] +impl crate::Resettable for TASKS_STOP_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/clock.rs b/down-the-stack/dk_pac/src/clock.rs new file mode 100644 index 0000000..38404f0 --- /dev/null +++ b/down-the-stack/dk_pac/src/clock.rs @@ -0,0 +1,138 @@ +#[doc = r"Register block"] +#[repr(C)] +pub struct RegisterBlock { + #[doc = "0x00 - Start HFCLK crystal oscillator"] + pub tasks_hfclkstart: TASKS_HFCLKSTART, + #[doc = "0x04 - Stop HFCLK crystal oscillator"] + pub tasks_hfclkstop: TASKS_HFCLKSTOP, + #[doc = "0x08 - Start LFCLK source"] + pub tasks_lfclkstart: TASKS_LFCLKSTART, + #[doc = "0x0c - Stop LFCLK source"] + pub tasks_lfclkstop: TASKS_LFCLKSTOP, + #[doc = "0x10 - Start calibration of LFRC oscillator"] + pub tasks_cal: TASKS_CAL, + #[doc = "0x14 - Start calibration timer"] + pub tasks_ctstart: TASKS_CTSTART, + #[doc = "0x18 - Stop calibration timer"] + pub tasks_ctstop: TASKS_CTSTOP, + _reserved7: [u8; 0xe4], + #[doc = "0x100 - HFCLK oscillator started"] + pub events_hfclkstarted: EVENTS_HFCLKSTARTED, + #[doc = "0x104 - LFCLK started"] + pub events_lfclkstarted: EVENTS_LFCLKSTARTED, + _reserved9: [u8; 0x04], + #[doc = "0x10c - Calibration of LFCLK RC oscillator complete event"] + pub events_done: EVENTS_DONE, + #[doc = "0x110 - Calibration timer timeout"] + pub events_ctto: EVENTS_CTTO, + _reserved11: [u8; 0x01f0], + #[doc = "0x304 - Enable interrupt"] + pub intenset: INTENSET, + #[doc = "0x308 - Disable interrupt"] + pub intenclr: INTENCLR, + _reserved13: [u8; 0xfc], + #[doc = "0x408 - Status indicating that HFCLKSTART task has been triggered"] + pub hfclkrun: HFCLKRUN, + #[doc = "0x40c - HFCLK status"] + pub hfclkstat: HFCLKSTAT, + _reserved15: [u8; 0x04], + #[doc = "0x414 - Status indicating that LFCLKSTART task has been triggered"] + pub lfclkrun: LFCLKRUN, + #[doc = "0x418 - LFCLK status"] + pub lfclkstat: LFCLKSTAT, + #[doc = "0x41c - Copy of LFCLKSRC register, set when LFCLKSTART task was triggered"] + pub lfclksrccopy: LFCLKSRCCOPY, + _reserved18: [u8; 0xf8], + #[doc = "0x518 - Clock source for the LFCLK"] + pub lfclksrc: LFCLKSRC, + _reserved19: [u8; 0x1c], + #[doc = "0x538 - Calibration timer interval"] + pub ctiv: CTIV, + _reserved20: [u8; 0x20], + #[doc = "0x55c - Clocking options for the Trace Port debug interface"] + pub traceconfig: TRACECONFIG, +} +#[doc = "TASKS_HFCLKSTART (w) register accessor: an alias for `Reg`"] +pub type TASKS_HFCLKSTART = crate::Reg; +#[doc = "Start HFCLK crystal oscillator"] +pub mod tasks_hfclkstart; +#[doc = "TASKS_HFCLKSTOP (w) register accessor: an alias for `Reg`"] +pub type TASKS_HFCLKSTOP = crate::Reg; +#[doc = "Stop HFCLK crystal oscillator"] +pub mod tasks_hfclkstop; +#[doc = "TASKS_LFCLKSTART (w) register accessor: an alias for `Reg`"] +pub type TASKS_LFCLKSTART = crate::Reg; +#[doc = "Start LFCLK source"] +pub mod tasks_lfclkstart; +#[doc = "TASKS_LFCLKSTOP (w) register accessor: an alias for `Reg`"] +pub type TASKS_LFCLKSTOP = crate::Reg; +#[doc = "Stop LFCLK source"] +pub mod tasks_lfclkstop; +#[doc = "TASKS_CAL (w) register accessor: an alias for `Reg`"] +pub type TASKS_CAL = crate::Reg; +#[doc = "Start calibration of LFRC oscillator"] +pub mod tasks_cal; +#[doc = "TASKS_CTSTART (w) register accessor: an alias for `Reg`"] +pub type TASKS_CTSTART = crate::Reg; +#[doc = "Start calibration timer"] +pub mod tasks_ctstart; +#[doc = "TASKS_CTSTOP (w) register accessor: an alias for `Reg`"] +pub type TASKS_CTSTOP = crate::Reg; +#[doc = "Stop calibration timer"] +pub mod tasks_ctstop; +#[doc = "EVENTS_HFCLKSTARTED (rw) register accessor: an alias for `Reg`"] +pub type EVENTS_HFCLKSTARTED = crate::Reg; +#[doc = "HFCLK oscillator started"] +pub mod events_hfclkstarted; +#[doc = "EVENTS_LFCLKSTARTED (rw) register accessor: an alias for `Reg`"] +pub type EVENTS_LFCLKSTARTED = crate::Reg; +#[doc = "LFCLK started"] +pub mod events_lfclkstarted; +#[doc = "EVENTS_DONE (rw) register accessor: an alias for `Reg`"] +pub type EVENTS_DONE = crate::Reg; +#[doc = "Calibration of LFCLK RC oscillator complete event"] +pub mod events_done; +#[doc = "EVENTS_CTTO (rw) register accessor: an alias for `Reg`"] +pub type EVENTS_CTTO = crate::Reg; +#[doc = "Calibration timer timeout"] +pub mod events_ctto; +#[doc = "INTENSET (rw) register accessor: an alias for `Reg`"] +pub type INTENSET = crate::Reg; +#[doc = "Enable interrupt"] +pub mod intenset; +#[doc = "INTENCLR (rw) register accessor: an alias for `Reg`"] +pub type INTENCLR = crate::Reg; +#[doc = "Disable interrupt"] +pub mod intenclr; +#[doc = "HFCLKRUN (r) register accessor: an alias for `Reg`"] +pub type HFCLKRUN = crate::Reg; +#[doc = "Status indicating that HFCLKSTART task has been triggered"] +pub mod hfclkrun; +#[doc = "HFCLKSTAT (r) register accessor: an alias for `Reg`"] +pub type HFCLKSTAT = crate::Reg; +#[doc = "HFCLK status"] +pub mod hfclkstat; +#[doc = "LFCLKRUN (r) register accessor: an alias for `Reg`"] +pub type LFCLKRUN = crate::Reg; +#[doc = "Status indicating that LFCLKSTART task has been triggered"] +pub mod lfclkrun; +#[doc = "LFCLKSTAT (r) register accessor: an alias for `Reg`"] +pub type LFCLKSTAT = crate::Reg; +#[doc = "LFCLK status"] +pub mod lfclkstat; +#[doc = "LFCLKSRCCOPY (r) register accessor: an alias for `Reg`"] +pub type LFCLKSRCCOPY = crate::Reg; +#[doc = "Copy of LFCLKSRC register, set when LFCLKSTART task was triggered"] +pub mod lfclksrccopy; +#[doc = "LFCLKSRC (rw) register accessor: an alias for `Reg`"] +pub type LFCLKSRC = crate::Reg; +#[doc = "Clock source for the LFCLK"] +pub mod lfclksrc; +#[doc = "CTIV (rw) register accessor: an alias for `Reg`"] +pub type CTIV = crate::Reg; +#[doc = "Calibration timer interval"] +pub mod ctiv; +#[doc = "TRACECONFIG (rw) register accessor: an alias for `Reg`"] +pub type TRACECONFIG = crate::Reg; +#[doc = "Clocking options for the Trace Port debug interface"] +pub mod traceconfig; diff --git a/down-the-stack/dk_pac/src/clock/ctiv.rs b/down-the-stack/dk_pac/src/clock/ctiv.rs new file mode 100644 index 0000000..f9bd1b5 --- /dev/null +++ b/down-the-stack/dk_pac/src/clock/ctiv.rs @@ -0,0 +1,80 @@ +#[doc = "Register `CTIV` 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 `CTIV` 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 `CTIV` reader - Calibration timer interval in multiple of 0.25 seconds. Range: 0.25 seconds to 31.75 seconds."] +pub type CTIV_R = crate::FieldReader; +#[doc = "Field `CTIV` writer - Calibration timer interval in multiple of 0.25 seconds. Range: 0.25 seconds to 31.75 seconds."] +pub type CTIV_W<'a, const O: u8> = crate::FieldWriter<'a, u32, CTIV_SPEC, u8, u8, 7, O>; +impl R { + #[doc = "Bits 0:6 - Calibration timer interval in multiple of 0.25 seconds. Range: 0.25 seconds to 31.75 seconds."] + #[inline(always)] + pub fn ctiv(&self) -> CTIV_R { + CTIV_R::new((self.bits & 0x7f) as u8) + } +} +impl W { + #[doc = "Bits 0:6 - Calibration timer interval in multiple of 0.25 seconds. Range: 0.25 seconds to 31.75 seconds."] + #[inline(always)] + #[must_use] + pub fn ctiv(&mut self) -> CTIV_W<0> { + CTIV_W::new(self) + } + #[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 = "Calibration timer interval\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 [ctiv](index.html) module"] +pub struct CTIV_SPEC; +impl crate::RegisterSpec for CTIV_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [ctiv::R](R) reader structure"] +impl crate::Readable for CTIV_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [ctiv::W](W) writer structure"] +impl crate::Writable for CTIV_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets CTIV to value 0"] +impl crate::Resettable for CTIV_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/clock/events_ctto.rs b/down-the-stack/dk_pac/src/clock/events_ctto.rs new file mode 100644 index 0000000..c805b3e --- /dev/null +++ b/down-the-stack/dk_pac/src/clock/events_ctto.rs @@ -0,0 +1,127 @@ +#[doc = "Register `EVENTS_CTTO` 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 `EVENTS_CTTO` 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 `EVENTS_CTTO` reader - Calibration timer timeout"] +pub type EVENTS_CTTO_R = crate::BitReader; +#[doc = "Calibration timer timeout\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum EVENTS_CTTO_A { + #[doc = "0: Event not generated"] + NOT_GENERATED = 0, + #[doc = "1: Event generated"] + GENERATED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: EVENTS_CTTO_A) -> Self { + variant as u8 != 0 + } +} +impl EVENTS_CTTO_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> EVENTS_CTTO_A { + match self.bits { + false => EVENTS_CTTO_A::NOT_GENERATED, + true => EVENTS_CTTO_A::GENERATED, + } + } + #[doc = "Checks if the value of the field is `NOT_GENERATED`"] + #[inline(always)] + pub fn is_not_generated(&self) -> bool { + *self == EVENTS_CTTO_A::NOT_GENERATED + } + #[doc = "Checks if the value of the field is `GENERATED`"] + #[inline(always)] + pub fn is_generated(&self) -> bool { + *self == EVENTS_CTTO_A::GENERATED + } +} +#[doc = "Field `EVENTS_CTTO` writer - Calibration timer timeout"] +pub type EVENTS_CTTO_W<'a, const O: u8> = + crate::BitWriter<'a, u32, EVENTS_CTTO_SPEC, EVENTS_CTTO_A, O>; +impl<'a, const O: u8> EVENTS_CTTO_W<'a, O> { + #[doc = "Event not generated"] + #[inline(always)] + pub fn not_generated(self) -> &'a mut W { + self.variant(EVENTS_CTTO_A::NOT_GENERATED) + } + #[doc = "Event generated"] + #[inline(always)] + pub fn generated(self) -> &'a mut W { + self.variant(EVENTS_CTTO_A::GENERATED) + } +} +impl R { + #[doc = "Bit 0 - Calibration timer timeout"] + #[inline(always)] + pub fn events_ctto(&self) -> EVENTS_CTTO_R { + EVENTS_CTTO_R::new((self.bits & 1) != 0) + } +} +impl W { + #[doc = "Bit 0 - Calibration timer timeout"] + #[inline(always)] + #[must_use] + pub fn events_ctto(&mut self) -> EVENTS_CTTO_W<0> { + EVENTS_CTTO_W::new(self) + } + #[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 = "Calibration timer timeout\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 [events_ctto](index.html) module"] +pub struct EVENTS_CTTO_SPEC; +impl crate::RegisterSpec for EVENTS_CTTO_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [events_ctto::R](R) reader structure"] +impl crate::Readable for EVENTS_CTTO_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [events_ctto::W](W) writer structure"] +impl crate::Writable for EVENTS_CTTO_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets EVENTS_CTTO to value 0"] +impl crate::Resettable for EVENTS_CTTO_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/clock/events_done.rs b/down-the-stack/dk_pac/src/clock/events_done.rs new file mode 100644 index 0000000..f286ec7 --- /dev/null +++ b/down-the-stack/dk_pac/src/clock/events_done.rs @@ -0,0 +1,127 @@ +#[doc = "Register `EVENTS_DONE` 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 `EVENTS_DONE` 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 `EVENTS_DONE` reader - Calibration of LFCLK RC oscillator complete event"] +pub type EVENTS_DONE_R = crate::BitReader; +#[doc = "Calibration of LFCLK RC oscillator complete event\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum EVENTS_DONE_A { + #[doc = "0: Event not generated"] + NOT_GENERATED = 0, + #[doc = "1: Event generated"] + GENERATED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: EVENTS_DONE_A) -> Self { + variant as u8 != 0 + } +} +impl EVENTS_DONE_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> EVENTS_DONE_A { + match self.bits { + false => EVENTS_DONE_A::NOT_GENERATED, + true => EVENTS_DONE_A::GENERATED, + } + } + #[doc = "Checks if the value of the field is `NOT_GENERATED`"] + #[inline(always)] + pub fn is_not_generated(&self) -> bool { + *self == EVENTS_DONE_A::NOT_GENERATED + } + #[doc = "Checks if the value of the field is `GENERATED`"] + #[inline(always)] + pub fn is_generated(&self) -> bool { + *self == EVENTS_DONE_A::GENERATED + } +} +#[doc = "Field `EVENTS_DONE` writer - Calibration of LFCLK RC oscillator complete event"] +pub type EVENTS_DONE_W<'a, const O: u8> = + crate::BitWriter<'a, u32, EVENTS_DONE_SPEC, EVENTS_DONE_A, O>; +impl<'a, const O: u8> EVENTS_DONE_W<'a, O> { + #[doc = "Event not generated"] + #[inline(always)] + pub fn not_generated(self) -> &'a mut W { + self.variant(EVENTS_DONE_A::NOT_GENERATED) + } + #[doc = "Event generated"] + #[inline(always)] + pub fn generated(self) -> &'a mut W { + self.variant(EVENTS_DONE_A::GENERATED) + } +} +impl R { + #[doc = "Bit 0 - Calibration of LFCLK RC oscillator complete event"] + #[inline(always)] + pub fn events_done(&self) -> EVENTS_DONE_R { + EVENTS_DONE_R::new((self.bits & 1) != 0) + } +} +impl W { + #[doc = "Bit 0 - Calibration of LFCLK RC oscillator complete event"] + #[inline(always)] + #[must_use] + pub fn events_done(&mut self) -> EVENTS_DONE_W<0> { + EVENTS_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 + } +} +#[doc = "Calibration of LFCLK RC oscillator complete event\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 [events_done](index.html) module"] +pub struct EVENTS_DONE_SPEC; +impl crate::RegisterSpec for EVENTS_DONE_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [events_done::R](R) reader structure"] +impl crate::Readable for EVENTS_DONE_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [events_done::W](W) writer structure"] +impl crate::Writable for EVENTS_DONE_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets EVENTS_DONE to value 0"] +impl crate::Resettable for EVENTS_DONE_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/clock/events_hfclkstarted.rs b/down-the-stack/dk_pac/src/clock/events_hfclkstarted.rs new file mode 100644 index 0000000..069c086 --- /dev/null +++ b/down-the-stack/dk_pac/src/clock/events_hfclkstarted.rs @@ -0,0 +1,127 @@ +#[doc = "Register `EVENTS_HFCLKSTARTED` 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 `EVENTS_HFCLKSTARTED` 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 `EVENTS_HFCLKSTARTED` reader - HFCLK oscillator started"] +pub type EVENTS_HFCLKSTARTED_R = crate::BitReader; +#[doc = "HFCLK oscillator started\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum EVENTS_HFCLKSTARTED_A { + #[doc = "0: Event not generated"] + NOT_GENERATED = 0, + #[doc = "1: Event generated"] + GENERATED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: EVENTS_HFCLKSTARTED_A) -> Self { + variant as u8 != 0 + } +} +impl EVENTS_HFCLKSTARTED_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> EVENTS_HFCLKSTARTED_A { + match self.bits { + false => EVENTS_HFCLKSTARTED_A::NOT_GENERATED, + true => EVENTS_HFCLKSTARTED_A::GENERATED, + } + } + #[doc = "Checks if the value of the field is `NOT_GENERATED`"] + #[inline(always)] + pub fn is_not_generated(&self) -> bool { + *self == EVENTS_HFCLKSTARTED_A::NOT_GENERATED + } + #[doc = "Checks if the value of the field is `GENERATED`"] + #[inline(always)] + pub fn is_generated(&self) -> bool { + *self == EVENTS_HFCLKSTARTED_A::GENERATED + } +} +#[doc = "Field `EVENTS_HFCLKSTARTED` writer - HFCLK oscillator started"] +pub type EVENTS_HFCLKSTARTED_W<'a, const O: u8> = + crate::BitWriter<'a, u32, EVENTS_HFCLKSTARTED_SPEC, EVENTS_HFCLKSTARTED_A, O>; +impl<'a, const O: u8> EVENTS_HFCLKSTARTED_W<'a, O> { + #[doc = "Event not generated"] + #[inline(always)] + pub fn not_generated(self) -> &'a mut W { + self.variant(EVENTS_HFCLKSTARTED_A::NOT_GENERATED) + } + #[doc = "Event generated"] + #[inline(always)] + pub fn generated(self) -> &'a mut W { + self.variant(EVENTS_HFCLKSTARTED_A::GENERATED) + } +} +impl R { + #[doc = "Bit 0 - HFCLK oscillator started"] + #[inline(always)] + pub fn events_hfclkstarted(&self) -> EVENTS_HFCLKSTARTED_R { + EVENTS_HFCLKSTARTED_R::new((self.bits & 1) != 0) + } +} +impl W { + #[doc = "Bit 0 - HFCLK oscillator started"] + #[inline(always)] + #[must_use] + pub fn events_hfclkstarted(&mut self) -> EVENTS_HFCLKSTARTED_W<0> { + EVENTS_HFCLKSTARTED_W::new(self) + } + #[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 = "HFCLK oscillator started\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 [events_hfclkstarted](index.html) module"] +pub struct EVENTS_HFCLKSTARTED_SPEC; +impl crate::RegisterSpec for EVENTS_HFCLKSTARTED_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [events_hfclkstarted::R](R) reader structure"] +impl crate::Readable for EVENTS_HFCLKSTARTED_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [events_hfclkstarted::W](W) writer structure"] +impl crate::Writable for EVENTS_HFCLKSTARTED_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets EVENTS_HFCLKSTARTED to value 0"] +impl crate::Resettable for EVENTS_HFCLKSTARTED_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/clock/events_lfclkstarted.rs b/down-the-stack/dk_pac/src/clock/events_lfclkstarted.rs new file mode 100644 index 0000000..61274d2 --- /dev/null +++ b/down-the-stack/dk_pac/src/clock/events_lfclkstarted.rs @@ -0,0 +1,127 @@ +#[doc = "Register `EVENTS_LFCLKSTARTED` 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 `EVENTS_LFCLKSTARTED` 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 `EVENTS_LFCLKSTARTED` reader - LFCLK started"] +pub type EVENTS_LFCLKSTARTED_R = crate::BitReader; +#[doc = "LFCLK started\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum EVENTS_LFCLKSTARTED_A { + #[doc = "0: Event not generated"] + NOT_GENERATED = 0, + #[doc = "1: Event generated"] + GENERATED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: EVENTS_LFCLKSTARTED_A) -> Self { + variant as u8 != 0 + } +} +impl EVENTS_LFCLKSTARTED_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> EVENTS_LFCLKSTARTED_A { + match self.bits { + false => EVENTS_LFCLKSTARTED_A::NOT_GENERATED, + true => EVENTS_LFCLKSTARTED_A::GENERATED, + } + } + #[doc = "Checks if the value of the field is `NOT_GENERATED`"] + #[inline(always)] + pub fn is_not_generated(&self) -> bool { + *self == EVENTS_LFCLKSTARTED_A::NOT_GENERATED + } + #[doc = "Checks if the value of the field is `GENERATED`"] + #[inline(always)] + pub fn is_generated(&self) -> bool { + *self == EVENTS_LFCLKSTARTED_A::GENERATED + } +} +#[doc = "Field `EVENTS_LFCLKSTARTED` writer - LFCLK started"] +pub type EVENTS_LFCLKSTARTED_W<'a, const O: u8> = + crate::BitWriter<'a, u32, EVENTS_LFCLKSTARTED_SPEC, EVENTS_LFCLKSTARTED_A, O>; +impl<'a, const O: u8> EVENTS_LFCLKSTARTED_W<'a, O> { + #[doc = "Event not generated"] + #[inline(always)] + pub fn not_generated(self) -> &'a mut W { + self.variant(EVENTS_LFCLKSTARTED_A::NOT_GENERATED) + } + #[doc = "Event generated"] + #[inline(always)] + pub fn generated(self) -> &'a mut W { + self.variant(EVENTS_LFCLKSTARTED_A::GENERATED) + } +} +impl R { + #[doc = "Bit 0 - LFCLK started"] + #[inline(always)] + pub fn events_lfclkstarted(&self) -> EVENTS_LFCLKSTARTED_R { + EVENTS_LFCLKSTARTED_R::new((self.bits & 1) != 0) + } +} +impl W { + #[doc = "Bit 0 - LFCLK started"] + #[inline(always)] + #[must_use] + pub fn events_lfclkstarted(&mut self) -> EVENTS_LFCLKSTARTED_W<0> { + EVENTS_LFCLKSTARTED_W::new(self) + } + #[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 = "LFCLK started\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 [events_lfclkstarted](index.html) module"] +pub struct EVENTS_LFCLKSTARTED_SPEC; +impl crate::RegisterSpec for EVENTS_LFCLKSTARTED_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [events_lfclkstarted::R](R) reader structure"] +impl crate::Readable for EVENTS_LFCLKSTARTED_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [events_lfclkstarted::W](W) writer structure"] +impl crate::Writable for EVENTS_LFCLKSTARTED_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets EVENTS_LFCLKSTARTED to value 0"] +impl crate::Resettable for EVENTS_LFCLKSTARTED_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/clock/hfclkrun.rs b/down-the-stack/dk_pac/src/clock/hfclkrun.rs new file mode 100644 index 0000000..15c5c46 --- /dev/null +++ b/down-the-stack/dk_pac/src/clock/hfclkrun.rs @@ -0,0 +1,71 @@ +#[doc = "Register `HFCLKRUN` 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 = "Field `STATUS` reader - HFCLKSTART task triggered or not"] +pub type STATUS_R = crate::BitReader; +#[doc = "HFCLKSTART task triggered or not\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum STATUS_A { + #[doc = "0: Task not triggered"] + NOT_TRIGGERED = 0, + #[doc = "1: Task triggered"] + TRIGGERED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: STATUS_A) -> Self { + variant as u8 != 0 + } +} +impl STATUS_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> STATUS_A { + match self.bits { + false => STATUS_A::NOT_TRIGGERED, + true => STATUS_A::TRIGGERED, + } + } + #[doc = "Checks if the value of the field is `NOT_TRIGGERED`"] + #[inline(always)] + pub fn is_not_triggered(&self) -> bool { + *self == STATUS_A::NOT_TRIGGERED + } + #[doc = "Checks if the value of the field is `TRIGGERED`"] + #[inline(always)] + pub fn is_triggered(&self) -> bool { + *self == STATUS_A::TRIGGERED + } +} +impl R { + #[doc = "Bit 0 - HFCLKSTART task triggered or not"] + #[inline(always)] + pub fn status(&self) -> STATUS_R { + STATUS_R::new((self.bits & 1) != 0) + } +} +#[doc = "Status indicating that HFCLKSTART task has been triggered\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 [hfclkrun](index.html) module"] +pub struct HFCLKRUN_SPEC; +impl crate::RegisterSpec for HFCLKRUN_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [hfclkrun::R](R) reader structure"] +impl crate::Readable for HFCLKRUN_SPEC { + type Reader = R; +} +#[doc = "`reset()` method sets HFCLKRUN to value 0"] +impl crate::Resettable for HFCLKRUN_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/clock/hfclkstat.rs b/down-the-stack/dk_pac/src/clock/hfclkstat.rs new file mode 100644 index 0000000..0572092 --- /dev/null +++ b/down-the-stack/dk_pac/src/clock/hfclkstat.rs @@ -0,0 +1,112 @@ +#[doc = "Register `HFCLKSTAT` 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 = "Field `SRC` reader - Source of HFCLK"] +pub type SRC_R = crate::BitReader; +#[doc = "Source of HFCLK\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum SRC_A { + #[doc = "0: 64 MHz internal oscillator (HFINT)"] + RC = 0, + #[doc = "1: 64 MHz crystal oscillator (HFXO)"] + XTAL = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: SRC_A) -> Self { + variant as u8 != 0 + } +} +impl SRC_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> SRC_A { + match self.bits { + false => SRC_A::RC, + true => SRC_A::XTAL, + } + } + #[doc = "Checks if the value of the field is `RC`"] + #[inline(always)] + pub fn is_rc(&self) -> bool { + *self == SRC_A::RC + } + #[doc = "Checks if the value of the field is `XTAL`"] + #[inline(always)] + pub fn is_xtal(&self) -> bool { + *self == SRC_A::XTAL + } +} +#[doc = "Field `STATE` reader - HFCLK state"] +pub type STATE_R = crate::BitReader; +#[doc = "HFCLK state\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum STATE_A { + #[doc = "0: HFCLK not running"] + NOT_RUNNING = 0, + #[doc = "1: HFCLK running"] + RUNNING = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: STATE_A) -> Self { + variant as u8 != 0 + } +} +impl STATE_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> STATE_A { + match self.bits { + false => STATE_A::NOT_RUNNING, + true => STATE_A::RUNNING, + } + } + #[doc = "Checks if the value of the field is `NOT_RUNNING`"] + #[inline(always)] + pub fn is_not_running(&self) -> bool { + *self == STATE_A::NOT_RUNNING + } + #[doc = "Checks if the value of the field is `RUNNING`"] + #[inline(always)] + pub fn is_running(&self) -> bool { + *self == STATE_A::RUNNING + } +} +impl R { + #[doc = "Bit 0 - Source of HFCLK"] + #[inline(always)] + pub fn src(&self) -> SRC_R { + SRC_R::new((self.bits & 1) != 0) + } + #[doc = "Bit 16 - HFCLK state"] + #[inline(always)] + pub fn state(&self) -> STATE_R { + STATE_R::new(((self.bits >> 16) & 1) != 0) + } +} +#[doc = "HFCLK 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 [hfclkstat](index.html) module"] +pub struct HFCLKSTAT_SPEC; +impl crate::RegisterSpec for HFCLKSTAT_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [hfclkstat::R](R) reader structure"] +impl crate::Readable for HFCLKSTAT_SPEC { + type Reader = R; +} +#[doc = "`reset()` method sets HFCLKSTAT to value 0"] +impl crate::Resettable for HFCLKSTAT_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/clock/intenclr.rs b/down-the-stack/dk_pac/src/clock/intenclr.rs new file mode 100644 index 0000000..1d1e2f6 --- /dev/null +++ b/down-the-stack/dk_pac/src/clock/intenclr.rs @@ -0,0 +1,339 @@ +#[doc = "Register `INTENCLR` 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 `INTENCLR` 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 `HFCLKSTARTED` reader - Write '1' to disable interrupt for event HFCLKSTARTED"] +pub type HFCLKSTARTED_R = crate::BitReader; +#[doc = "Write '1' to disable interrupt for event HFCLKSTARTED\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum HFCLKSTARTED_A { + #[doc = "0: Read: Disabled"] + DISABLED = 0, + #[doc = "1: Read: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: HFCLKSTARTED_A) -> Self { + variant as u8 != 0 + } +} +impl HFCLKSTARTED_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> HFCLKSTARTED_A { + match self.bits { + false => HFCLKSTARTED_A::DISABLED, + true => HFCLKSTARTED_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == HFCLKSTARTED_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == HFCLKSTARTED_A::ENABLED + } +} +#[doc = "Write '1' to disable interrupt for event HFCLKSTARTED\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum HFCLKSTARTED_AW { + #[doc = "1: Disable"] + CLEAR = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: HFCLKSTARTED_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `HFCLKSTARTED` writer - Write '1' to disable interrupt for event HFCLKSTARTED"] +pub type HFCLKSTARTED_W<'a, const O: u8> = + crate::BitWriter<'a, u32, INTENCLR_SPEC, HFCLKSTARTED_AW, O>; +impl<'a, const O: u8> HFCLKSTARTED_W<'a, O> { + #[doc = "Disable"] + #[inline(always)] + pub fn clear(self) -> &'a mut W { + self.variant(HFCLKSTARTED_AW::CLEAR) + } +} +#[doc = "Field `LFCLKSTARTED` reader - Write '1' to disable interrupt for event LFCLKSTARTED"] +pub type LFCLKSTARTED_R = crate::BitReader; +#[doc = "Write '1' to disable interrupt for event LFCLKSTARTED\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum LFCLKSTARTED_A { + #[doc = "0: Read: Disabled"] + DISABLED = 0, + #[doc = "1: Read: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: LFCLKSTARTED_A) -> Self { + variant as u8 != 0 + } +} +impl LFCLKSTARTED_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> LFCLKSTARTED_A { + match self.bits { + false => LFCLKSTARTED_A::DISABLED, + true => LFCLKSTARTED_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == LFCLKSTARTED_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == LFCLKSTARTED_A::ENABLED + } +} +#[doc = "Write '1' to disable interrupt for event LFCLKSTARTED\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum LFCLKSTARTED_AW { + #[doc = "1: Disable"] + CLEAR = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: LFCLKSTARTED_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `LFCLKSTARTED` writer - Write '1' to disable interrupt for event LFCLKSTARTED"] +pub type LFCLKSTARTED_W<'a, const O: u8> = + crate::BitWriter<'a, u32, INTENCLR_SPEC, LFCLKSTARTED_AW, O>; +impl<'a, const O: u8> LFCLKSTARTED_W<'a, O> { + #[doc = "Disable"] + #[inline(always)] + pub fn clear(self) -> &'a mut W { + self.variant(LFCLKSTARTED_AW::CLEAR) + } +} +#[doc = "Field `DONE` reader - Write '1' to disable interrupt for event DONE"] +pub type DONE_R = crate::BitReader; +#[doc = "Write '1' to disable interrupt for event DONE\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum DONE_A { + #[doc = "0: Read: Disabled"] + DISABLED = 0, + #[doc = "1: Read: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: DONE_A) -> Self { + variant as u8 != 0 + } +} +impl DONE_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> DONE_A { + match self.bits { + false => DONE_A::DISABLED, + true => DONE_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == DONE_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == DONE_A::ENABLED + } +} +#[doc = "Write '1' to disable interrupt for event DONE\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum DONE_AW { + #[doc = "1: Disable"] + CLEAR = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: DONE_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `DONE` writer - Write '1' to disable interrupt for event DONE"] +pub type DONE_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENCLR_SPEC, DONE_AW, O>; +impl<'a, const O: u8> DONE_W<'a, O> { + #[doc = "Disable"] + #[inline(always)] + pub fn clear(self) -> &'a mut W { + self.variant(DONE_AW::CLEAR) + } +} +#[doc = "Field `CTTO` reader - Write '1' to disable interrupt for event CTTO"] +pub type CTTO_R = crate::BitReader; +#[doc = "Write '1' to disable interrupt for event CTTO\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum CTTO_A { + #[doc = "0: Read: Disabled"] + DISABLED = 0, + #[doc = "1: Read: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: CTTO_A) -> Self { + variant as u8 != 0 + } +} +impl CTTO_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> CTTO_A { + match self.bits { + false => CTTO_A::DISABLED, + true => CTTO_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == CTTO_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == CTTO_A::ENABLED + } +} +#[doc = "Write '1' to disable interrupt for event CTTO\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum CTTO_AW { + #[doc = "1: Disable"] + CLEAR = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: CTTO_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `CTTO` writer - Write '1' to disable interrupt for event CTTO"] +pub type CTTO_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENCLR_SPEC, CTTO_AW, O>; +impl<'a, const O: u8> CTTO_W<'a, O> { + #[doc = "Disable"] + #[inline(always)] + pub fn clear(self) -> &'a mut W { + self.variant(CTTO_AW::CLEAR) + } +} +impl R { + #[doc = "Bit 0 - Write '1' to disable interrupt for event HFCLKSTARTED"] + #[inline(always)] + pub fn hfclkstarted(&self) -> HFCLKSTARTED_R { + HFCLKSTARTED_R::new((self.bits & 1) != 0) + } + #[doc = "Bit 1 - Write '1' to disable interrupt for event LFCLKSTARTED"] + #[inline(always)] + pub fn lfclkstarted(&self) -> LFCLKSTARTED_R { + LFCLKSTARTED_R::new(((self.bits >> 1) & 1) != 0) + } + #[doc = "Bit 3 - Write '1' to disable interrupt for event DONE"] + #[inline(always)] + pub fn done(&self) -> DONE_R { + DONE_R::new(((self.bits >> 3) & 1) != 0) + } + #[doc = "Bit 4 - Write '1' to disable interrupt for event CTTO"] + #[inline(always)] + pub fn ctto(&self) -> CTTO_R { + CTTO_R::new(((self.bits >> 4) & 1) != 0) + } +} +impl W { + #[doc = "Bit 0 - Write '1' to disable interrupt for event HFCLKSTARTED"] + #[inline(always)] + #[must_use] + pub fn hfclkstarted(&mut self) -> HFCLKSTARTED_W<0> { + HFCLKSTARTED_W::new(self) + } + #[doc = "Bit 1 - Write '1' to disable interrupt for event LFCLKSTARTED"] + #[inline(always)] + #[must_use] + pub fn lfclkstarted(&mut self) -> LFCLKSTARTED_W<1> { + LFCLKSTARTED_W::new(self) + } + #[doc = "Bit 3 - Write '1' to disable interrupt for event DONE"] + #[inline(always)] + #[must_use] + pub fn done(&mut self) -> DONE_W<3> { + DONE_W::new(self) + } + #[doc = "Bit 4 - Write '1' to disable interrupt for event CTTO"] + #[inline(always)] + #[must_use] + pub fn ctto(&mut self) -> CTTO_W<4> { + CTTO_W::new(self) + } + #[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 = "Disable interrupt\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 [intenclr](index.html) module"] +pub struct INTENCLR_SPEC; +impl crate::RegisterSpec for INTENCLR_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [intenclr::R](R) reader structure"] +impl crate::Readable for INTENCLR_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [intenclr::W](W) writer structure"] +impl crate::Writable for INTENCLR_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets INTENCLR to value 0"] +impl crate::Resettable for INTENCLR_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/clock/intenset.rs b/down-the-stack/dk_pac/src/clock/intenset.rs new file mode 100644 index 0000000..10189c9 --- /dev/null +++ b/down-the-stack/dk_pac/src/clock/intenset.rs @@ -0,0 +1,339 @@ +#[doc = "Register `INTENSET` 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 `INTENSET` 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 `HFCLKSTARTED` reader - Write '1' to enable interrupt for event HFCLKSTARTED"] +pub type HFCLKSTARTED_R = crate::BitReader; +#[doc = "Write '1' to enable interrupt for event HFCLKSTARTED\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum HFCLKSTARTED_A { + #[doc = "0: Read: Disabled"] + DISABLED = 0, + #[doc = "1: Read: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: HFCLKSTARTED_A) -> Self { + variant as u8 != 0 + } +} +impl HFCLKSTARTED_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> HFCLKSTARTED_A { + match self.bits { + false => HFCLKSTARTED_A::DISABLED, + true => HFCLKSTARTED_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == HFCLKSTARTED_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == HFCLKSTARTED_A::ENABLED + } +} +#[doc = "Write '1' to enable interrupt for event HFCLKSTARTED\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum HFCLKSTARTED_AW { + #[doc = "1: Enable"] + SET = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: HFCLKSTARTED_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `HFCLKSTARTED` writer - Write '1' to enable interrupt for event HFCLKSTARTED"] +pub type HFCLKSTARTED_W<'a, const O: u8> = + crate::BitWriter<'a, u32, INTENSET_SPEC, HFCLKSTARTED_AW, O>; +impl<'a, const O: u8> HFCLKSTARTED_W<'a, O> { + #[doc = "Enable"] + #[inline(always)] + pub fn set(self) -> &'a mut W { + self.variant(HFCLKSTARTED_AW::SET) + } +} +#[doc = "Field `LFCLKSTARTED` reader - Write '1' to enable interrupt for event LFCLKSTARTED"] +pub type LFCLKSTARTED_R = crate::BitReader; +#[doc = "Write '1' to enable interrupt for event LFCLKSTARTED\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum LFCLKSTARTED_A { + #[doc = "0: Read: Disabled"] + DISABLED = 0, + #[doc = "1: Read: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: LFCLKSTARTED_A) -> Self { + variant as u8 != 0 + } +} +impl LFCLKSTARTED_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> LFCLKSTARTED_A { + match self.bits { + false => LFCLKSTARTED_A::DISABLED, + true => LFCLKSTARTED_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == LFCLKSTARTED_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == LFCLKSTARTED_A::ENABLED + } +} +#[doc = "Write '1' to enable interrupt for event LFCLKSTARTED\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum LFCLKSTARTED_AW { + #[doc = "1: Enable"] + SET = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: LFCLKSTARTED_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `LFCLKSTARTED` writer - Write '1' to enable interrupt for event LFCLKSTARTED"] +pub type LFCLKSTARTED_W<'a, const O: u8> = + crate::BitWriter<'a, u32, INTENSET_SPEC, LFCLKSTARTED_AW, O>; +impl<'a, const O: u8> LFCLKSTARTED_W<'a, O> { + #[doc = "Enable"] + #[inline(always)] + pub fn set(self) -> &'a mut W { + self.variant(LFCLKSTARTED_AW::SET) + } +} +#[doc = "Field `DONE` reader - Write '1' to enable interrupt for event DONE"] +pub type DONE_R = crate::BitReader; +#[doc = "Write '1' to enable interrupt for event DONE\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum DONE_A { + #[doc = "0: Read: Disabled"] + DISABLED = 0, + #[doc = "1: Read: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: DONE_A) -> Self { + variant as u8 != 0 + } +} +impl DONE_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> DONE_A { + match self.bits { + false => DONE_A::DISABLED, + true => DONE_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == DONE_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == DONE_A::ENABLED + } +} +#[doc = "Write '1' to enable interrupt for event DONE\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum DONE_AW { + #[doc = "1: Enable"] + SET = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: DONE_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `DONE` writer - Write '1' to enable interrupt for event DONE"] +pub type DONE_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENSET_SPEC, DONE_AW, O>; +impl<'a, const O: u8> DONE_W<'a, O> { + #[doc = "Enable"] + #[inline(always)] + pub fn set(self) -> &'a mut W { + self.variant(DONE_AW::SET) + } +} +#[doc = "Field `CTTO` reader - Write '1' to enable interrupt for event CTTO"] +pub type CTTO_R = crate::BitReader; +#[doc = "Write '1' to enable interrupt for event CTTO\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum CTTO_A { + #[doc = "0: Read: Disabled"] + DISABLED = 0, + #[doc = "1: Read: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: CTTO_A) -> Self { + variant as u8 != 0 + } +} +impl CTTO_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> CTTO_A { + match self.bits { + false => CTTO_A::DISABLED, + true => CTTO_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == CTTO_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == CTTO_A::ENABLED + } +} +#[doc = "Write '1' to enable interrupt for event CTTO\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum CTTO_AW { + #[doc = "1: Enable"] + SET = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: CTTO_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `CTTO` writer - Write '1' to enable interrupt for event CTTO"] +pub type CTTO_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENSET_SPEC, CTTO_AW, O>; +impl<'a, const O: u8> CTTO_W<'a, O> { + #[doc = "Enable"] + #[inline(always)] + pub fn set(self) -> &'a mut W { + self.variant(CTTO_AW::SET) + } +} +impl R { + #[doc = "Bit 0 - Write '1' to enable interrupt for event HFCLKSTARTED"] + #[inline(always)] + pub fn hfclkstarted(&self) -> HFCLKSTARTED_R { + HFCLKSTARTED_R::new((self.bits & 1) != 0) + } + #[doc = "Bit 1 - Write '1' to enable interrupt for event LFCLKSTARTED"] + #[inline(always)] + pub fn lfclkstarted(&self) -> LFCLKSTARTED_R { + LFCLKSTARTED_R::new(((self.bits >> 1) & 1) != 0) + } + #[doc = "Bit 3 - Write '1' to enable interrupt for event DONE"] + #[inline(always)] + pub fn done(&self) -> DONE_R { + DONE_R::new(((self.bits >> 3) & 1) != 0) + } + #[doc = "Bit 4 - Write '1' to enable interrupt for event CTTO"] + #[inline(always)] + pub fn ctto(&self) -> CTTO_R { + CTTO_R::new(((self.bits >> 4) & 1) != 0) + } +} +impl W { + #[doc = "Bit 0 - Write '1' to enable interrupt for event HFCLKSTARTED"] + #[inline(always)] + #[must_use] + pub fn hfclkstarted(&mut self) -> HFCLKSTARTED_W<0> { + HFCLKSTARTED_W::new(self) + } + #[doc = "Bit 1 - Write '1' to enable interrupt for event LFCLKSTARTED"] + #[inline(always)] + #[must_use] + pub fn lfclkstarted(&mut self) -> LFCLKSTARTED_W<1> { + LFCLKSTARTED_W::new(self) + } + #[doc = "Bit 3 - Write '1' to enable interrupt for event DONE"] + #[inline(always)] + #[must_use] + pub fn done(&mut self) -> DONE_W<3> { + DONE_W::new(self) + } + #[doc = "Bit 4 - Write '1' to enable interrupt for event CTTO"] + #[inline(always)] + #[must_use] + pub fn ctto(&mut self) -> CTTO_W<4> { + CTTO_W::new(self) + } + #[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 = "Enable interrupt\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 [intenset](index.html) module"] +pub struct INTENSET_SPEC; +impl crate::RegisterSpec for INTENSET_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [intenset::R](R) reader structure"] +impl crate::Readable for INTENSET_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [intenset::W](W) writer structure"] +impl crate::Writable for INTENSET_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets INTENSET to value 0"] +impl crate::Resettable for INTENSET_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/clock/lfclkrun.rs b/down-the-stack/dk_pac/src/clock/lfclkrun.rs new file mode 100644 index 0000000..0bdd484 --- /dev/null +++ b/down-the-stack/dk_pac/src/clock/lfclkrun.rs @@ -0,0 +1,71 @@ +#[doc = "Register `LFCLKRUN` 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 = "Field `STATUS` reader - LFCLKSTART task triggered or not"] +pub type STATUS_R = crate::BitReader; +#[doc = "LFCLKSTART task triggered or not\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum STATUS_A { + #[doc = "0: Task not triggered"] + NOT_TRIGGERED = 0, + #[doc = "1: Task triggered"] + TRIGGERED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: STATUS_A) -> Self { + variant as u8 != 0 + } +} +impl STATUS_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> STATUS_A { + match self.bits { + false => STATUS_A::NOT_TRIGGERED, + true => STATUS_A::TRIGGERED, + } + } + #[doc = "Checks if the value of the field is `NOT_TRIGGERED`"] + #[inline(always)] + pub fn is_not_triggered(&self) -> bool { + *self == STATUS_A::NOT_TRIGGERED + } + #[doc = "Checks if the value of the field is `TRIGGERED`"] + #[inline(always)] + pub fn is_triggered(&self) -> bool { + *self == STATUS_A::TRIGGERED + } +} +impl R { + #[doc = "Bit 0 - LFCLKSTART task triggered or not"] + #[inline(always)] + pub fn status(&self) -> STATUS_R { + STATUS_R::new((self.bits & 1) != 0) + } +} +#[doc = "Status indicating that LFCLKSTART task has been triggered\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 [lfclkrun](index.html) module"] +pub struct LFCLKRUN_SPEC; +impl crate::RegisterSpec for LFCLKRUN_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [lfclkrun::R](R) reader structure"] +impl crate::Readable for LFCLKRUN_SPEC { + type Reader = R; +} +#[doc = "`reset()` method sets LFCLKRUN to value 0"] +impl crate::Resettable for LFCLKRUN_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/clock/lfclksrc.rs b/down-the-stack/dk_pac/src/clock/lfclksrc.rs new file mode 100644 index 0000000..ceeabda --- /dev/null +++ b/down-the-stack/dk_pac/src/clock/lfclksrc.rs @@ -0,0 +1,263 @@ +#[doc = "Register `LFCLKSRC` 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 `LFCLKSRC` 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 `SRC` reader - Clock source"] +pub type SRC_R = crate::FieldReader; +#[doc = "Clock source\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +#[repr(u8)] +pub enum SRC_A { + #[doc = "0: 32.768 kHz RC oscillator"] + RC = 0, + #[doc = "1: 32.768 kHz crystal oscillator"] + XTAL = 1, + #[doc = "2: 32.768 kHz synthesized from HFCLK"] + SYNTH = 2, +} +impl From for u8 { + #[inline(always)] + fn from(variant: SRC_A) -> Self { + variant as _ + } +} +impl SRC_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> Option { + match self.bits { + 0 => Some(SRC_A::RC), + 1 => Some(SRC_A::XTAL), + 2 => Some(SRC_A::SYNTH), + _ => None, + } + } + #[doc = "Checks if the value of the field is `RC`"] + #[inline(always)] + pub fn is_rc(&self) -> bool { + *self == SRC_A::RC + } + #[doc = "Checks if the value of the field is `XTAL`"] + #[inline(always)] + pub fn is_xtal(&self) -> bool { + *self == SRC_A::XTAL + } + #[doc = "Checks if the value of the field is `SYNTH`"] + #[inline(always)] + pub fn is_synth(&self) -> bool { + *self == SRC_A::SYNTH + } +} +#[doc = "Field `SRC` writer - Clock source"] +pub type SRC_W<'a, const O: u8> = crate::FieldWriter<'a, u32, LFCLKSRC_SPEC, u8, SRC_A, 2, O>; +impl<'a, const O: u8> SRC_W<'a, O> { + #[doc = "32.768 kHz RC oscillator"] + #[inline(always)] + pub fn rc(self) -> &'a mut W { + self.variant(SRC_A::RC) + } + #[doc = "32.768 kHz crystal oscillator"] + #[inline(always)] + pub fn xtal(self) -> &'a mut W { + self.variant(SRC_A::XTAL) + } + #[doc = "32.768 kHz synthesized from HFCLK"] + #[inline(always)] + pub fn synth(self) -> &'a mut W { + self.variant(SRC_A::SYNTH) + } +} +#[doc = "Field `BYPASS` reader - Enable or disable bypass of LFCLK crystal oscillator with external clock source"] +pub type BYPASS_R = crate::BitReader; +#[doc = "Enable or disable bypass of LFCLK crystal oscillator with external clock source\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum BYPASS_A { + #[doc = "0: Disable (use with Xtal or low-swing external source)"] + DISABLED = 0, + #[doc = "1: Enable (use with rail-to-rail external source)"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: BYPASS_A) -> Self { + variant as u8 != 0 + } +} +impl BYPASS_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> BYPASS_A { + match self.bits { + false => BYPASS_A::DISABLED, + true => BYPASS_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == BYPASS_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == BYPASS_A::ENABLED + } +} +#[doc = "Field `BYPASS` writer - Enable or disable bypass of LFCLK crystal oscillator with external clock source"] +pub type BYPASS_W<'a, const O: u8> = crate::BitWriter<'a, u32, LFCLKSRC_SPEC, BYPASS_A, O>; +impl<'a, const O: u8> BYPASS_W<'a, O> { + #[doc = "Disable (use with Xtal or low-swing external source)"] + #[inline(always)] + pub fn disabled(self) -> &'a mut W { + self.variant(BYPASS_A::DISABLED) + } + #[doc = "Enable (use with rail-to-rail external source)"] + #[inline(always)] + pub fn enabled(self) -> &'a mut W { + self.variant(BYPASS_A::ENABLED) + } +} +#[doc = "Field `EXTERNAL` reader - Enable or disable external source for LFCLK"] +pub type EXTERNAL_R = crate::BitReader; +#[doc = "Enable or disable external source for LFCLK\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum EXTERNAL_A { + #[doc = "0: Disable external source (use with Xtal)"] + DISABLED = 0, + #[doc = "1: Enable use of external source instead of Xtal (SRC needs to be set to Xtal)"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: EXTERNAL_A) -> Self { + variant as u8 != 0 + } +} +impl EXTERNAL_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> EXTERNAL_A { + match self.bits { + false => EXTERNAL_A::DISABLED, + true => EXTERNAL_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == EXTERNAL_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == EXTERNAL_A::ENABLED + } +} +#[doc = "Field `EXTERNAL` writer - Enable or disable external source for LFCLK"] +pub type EXTERNAL_W<'a, const O: u8> = crate::BitWriter<'a, u32, LFCLKSRC_SPEC, EXTERNAL_A, O>; +impl<'a, const O: u8> EXTERNAL_W<'a, O> { + #[doc = "Disable external source (use with Xtal)"] + #[inline(always)] + pub fn disabled(self) -> &'a mut W { + self.variant(EXTERNAL_A::DISABLED) + } + #[doc = "Enable use of external source instead of Xtal (SRC needs to be set to Xtal)"] + #[inline(always)] + pub fn enabled(self) -> &'a mut W { + self.variant(EXTERNAL_A::ENABLED) + } +} +impl R { + #[doc = "Bits 0:1 - Clock source"] + #[inline(always)] + pub fn src(&self) -> SRC_R { + SRC_R::new((self.bits & 3) as u8) + } + #[doc = "Bit 16 - Enable or disable bypass of LFCLK crystal oscillator with external clock source"] + #[inline(always)] + pub fn bypass(&self) -> BYPASS_R { + BYPASS_R::new(((self.bits >> 16) & 1) != 0) + } + #[doc = "Bit 17 - Enable or disable external source for LFCLK"] + #[inline(always)] + pub fn external(&self) -> EXTERNAL_R { + EXTERNAL_R::new(((self.bits >> 17) & 1) != 0) + } +} +impl W { + #[doc = "Bits 0:1 - Clock source"] + #[inline(always)] + #[must_use] + pub fn src(&mut self) -> SRC_W<0> { + SRC_W::new(self) + } + #[doc = "Bit 16 - Enable or disable bypass of LFCLK crystal oscillator with external clock source"] + #[inline(always)] + #[must_use] + pub fn bypass(&mut self) -> BYPASS_W<16> { + BYPASS_W::new(self) + } + #[doc = "Bit 17 - Enable or disable external source for LFCLK"] + #[inline(always)] + #[must_use] + pub fn external(&mut self) -> EXTERNAL_W<17> { + EXTERNAL_W::new(self) + } + #[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 = "Clock source for the LFCLK\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 [lfclksrc](index.html) module"] +pub struct LFCLKSRC_SPEC; +impl crate::RegisterSpec for LFCLKSRC_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [lfclksrc::R](R) reader structure"] +impl crate::Readable for LFCLKSRC_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [lfclksrc::W](W) writer structure"] +impl crate::Writable for LFCLKSRC_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets LFCLKSRC to value 0"] +impl crate::Resettable for LFCLKSRC_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/clock/lfclksrccopy.rs b/down-the-stack/dk_pac/src/clock/lfclksrccopy.rs new file mode 100644 index 0000000..a87fe00 --- /dev/null +++ b/down-the-stack/dk_pac/src/clock/lfclksrccopy.rs @@ -0,0 +1,81 @@ +#[doc = "Register `LFCLKSRCCOPY` 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 = "Field `SRC` reader - Clock source"] +pub type SRC_R = crate::FieldReader; +#[doc = "Clock source\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +#[repr(u8)] +pub enum SRC_A { + #[doc = "0: 32.768 kHz RC oscillator"] + RC = 0, + #[doc = "1: 32.768 kHz crystal oscillator"] + XTAL = 1, + #[doc = "2: 32.768 kHz synthesized from HFCLK"] + SYNTH = 2, +} +impl From for u8 { + #[inline(always)] + fn from(variant: SRC_A) -> Self { + variant as _ + } +} +impl SRC_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> Option { + match self.bits { + 0 => Some(SRC_A::RC), + 1 => Some(SRC_A::XTAL), + 2 => Some(SRC_A::SYNTH), + _ => None, + } + } + #[doc = "Checks if the value of the field is `RC`"] + #[inline(always)] + pub fn is_rc(&self) -> bool { + *self == SRC_A::RC + } + #[doc = "Checks if the value of the field is `XTAL`"] + #[inline(always)] + pub fn is_xtal(&self) -> bool { + *self == SRC_A::XTAL + } + #[doc = "Checks if the value of the field is `SYNTH`"] + #[inline(always)] + pub fn is_synth(&self) -> bool { + *self == SRC_A::SYNTH + } +} +impl R { + #[doc = "Bits 0:1 - Clock source"] + #[inline(always)] + pub fn src(&self) -> SRC_R { + SRC_R::new((self.bits & 3) as u8) + } +} +#[doc = "Copy of LFCLKSRC register, set when LFCLKSTART task was triggered\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 [lfclksrccopy](index.html) module"] +pub struct LFCLKSRCCOPY_SPEC; +impl crate::RegisterSpec for LFCLKSRCCOPY_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [lfclksrccopy::R](R) reader structure"] +impl crate::Readable for LFCLKSRCCOPY_SPEC { + type Reader = R; +} +#[doc = "`reset()` method sets LFCLKSRCCOPY to value 0"] +impl crate::Resettable for LFCLKSRCCOPY_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/clock/lfclkstat.rs b/down-the-stack/dk_pac/src/clock/lfclkstat.rs new file mode 100644 index 0000000..70c8e2b --- /dev/null +++ b/down-the-stack/dk_pac/src/clock/lfclkstat.rs @@ -0,0 +1,122 @@ +#[doc = "Register `LFCLKSTAT` 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 = "Field `SRC` reader - Source of LFCLK"] +pub type SRC_R = crate::FieldReader; +#[doc = "Source of LFCLK\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +#[repr(u8)] +pub enum SRC_A { + #[doc = "0: 32.768 kHz RC oscillator"] + RC = 0, + #[doc = "1: 32.768 kHz crystal oscillator"] + XTAL = 1, + #[doc = "2: 32.768 kHz synthesized from HFCLK"] + SYNTH = 2, +} +impl From for u8 { + #[inline(always)] + fn from(variant: SRC_A) -> Self { + variant as _ + } +} +impl SRC_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> Option { + match self.bits { + 0 => Some(SRC_A::RC), + 1 => Some(SRC_A::XTAL), + 2 => Some(SRC_A::SYNTH), + _ => None, + } + } + #[doc = "Checks if the value of the field is `RC`"] + #[inline(always)] + pub fn is_rc(&self) -> bool { + *self == SRC_A::RC + } + #[doc = "Checks if the value of the field is `XTAL`"] + #[inline(always)] + pub fn is_xtal(&self) -> bool { + *self == SRC_A::XTAL + } + #[doc = "Checks if the value of the field is `SYNTH`"] + #[inline(always)] + pub fn is_synth(&self) -> bool { + *self == SRC_A::SYNTH + } +} +#[doc = "Field `STATE` reader - LFCLK state"] +pub type STATE_R = crate::BitReader; +#[doc = "LFCLK state\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum STATE_A { + #[doc = "0: LFCLK not running"] + NOT_RUNNING = 0, + #[doc = "1: LFCLK running"] + RUNNING = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: STATE_A) -> Self { + variant as u8 != 0 + } +} +impl STATE_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> STATE_A { + match self.bits { + false => STATE_A::NOT_RUNNING, + true => STATE_A::RUNNING, + } + } + #[doc = "Checks if the value of the field is `NOT_RUNNING`"] + #[inline(always)] + pub fn is_not_running(&self) -> bool { + *self == STATE_A::NOT_RUNNING + } + #[doc = "Checks if the value of the field is `RUNNING`"] + #[inline(always)] + pub fn is_running(&self) -> bool { + *self == STATE_A::RUNNING + } +} +impl R { + #[doc = "Bits 0:1 - Source of LFCLK"] + #[inline(always)] + pub fn src(&self) -> SRC_R { + SRC_R::new((self.bits & 3) as u8) + } + #[doc = "Bit 16 - LFCLK state"] + #[inline(always)] + pub fn state(&self) -> STATE_R { + STATE_R::new(((self.bits >> 16) & 1) != 0) + } +} +#[doc = "LFCLK 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 [lfclkstat](index.html) module"] +pub struct LFCLKSTAT_SPEC; +impl crate::RegisterSpec for LFCLKSTAT_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [lfclkstat::R](R) reader structure"] +impl crate::Readable for LFCLKSTAT_SPEC { + type Reader = R; +} +#[doc = "`reset()` method sets LFCLKSTAT to value 0"] +impl crate::Resettable for LFCLKSTAT_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/clock/tasks_cal.rs b/down-the-stack/dk_pac/src/clock/tasks_cal.rs new file mode 100644 index 0000000..ba1a777 --- /dev/null +++ b/down-the-stack/dk_pac/src/clock/tasks_cal.rs @@ -0,0 +1,71 @@ +#[doc = "Register `TASKS_CAL` 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 = "Start calibration of LFRC oscillator\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum TASKS_CAL_AW { + #[doc = "1: Trigger task"] + TRIGGER = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: TASKS_CAL_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `TASKS_CAL` writer - Start calibration of LFRC oscillator"] +pub type TASKS_CAL_W<'a, const O: u8> = crate::BitWriter<'a, u32, TASKS_CAL_SPEC, TASKS_CAL_AW, O>; +impl<'a, const O: u8> TASKS_CAL_W<'a, O> { + #[doc = "Trigger task"] + #[inline(always)] + pub fn trigger(self) -> &'a mut W { + self.variant(TASKS_CAL_AW::TRIGGER) + } +} +impl W { + #[doc = "Bit 0 - Start calibration of LFRC oscillator"] + #[inline(always)] + #[must_use] + pub fn tasks_cal(&mut self) -> TASKS_CAL_W<0> { + TASKS_CAL_W::new(self) + } + #[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 = "Start calibration of LFRC oscillator\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 [tasks_cal](index.html) module"] +pub struct TASKS_CAL_SPEC; +impl crate::RegisterSpec for TASKS_CAL_SPEC { + type Ux = u32; +} +#[doc = "`write(|w| ..)` method takes [tasks_cal::W](W) writer structure"] +impl crate::Writable for TASKS_CAL_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets TASKS_CAL to value 0"] +impl crate::Resettable for TASKS_CAL_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/clock/tasks_ctstart.rs b/down-the-stack/dk_pac/src/clock/tasks_ctstart.rs new file mode 100644 index 0000000..22fcadc --- /dev/null +++ b/down-the-stack/dk_pac/src/clock/tasks_ctstart.rs @@ -0,0 +1,72 @@ +#[doc = "Register `TASKS_CTSTART` 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 = "Start calibration timer\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum TASKS_CTSTART_AW { + #[doc = "1: Trigger task"] + TRIGGER = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: TASKS_CTSTART_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `TASKS_CTSTART` writer - Start calibration timer"] +pub type TASKS_CTSTART_W<'a, const O: u8> = + crate::BitWriter<'a, u32, TASKS_CTSTART_SPEC, TASKS_CTSTART_AW, O>; +impl<'a, const O: u8> TASKS_CTSTART_W<'a, O> { + #[doc = "Trigger task"] + #[inline(always)] + pub fn trigger(self) -> &'a mut W { + self.variant(TASKS_CTSTART_AW::TRIGGER) + } +} +impl W { + #[doc = "Bit 0 - Start calibration timer"] + #[inline(always)] + #[must_use] + pub fn tasks_ctstart(&mut self) -> TASKS_CTSTART_W<0> { + TASKS_CTSTART_W::new(self) + } + #[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 = "Start calibration timer\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 [tasks_ctstart](index.html) module"] +pub struct TASKS_CTSTART_SPEC; +impl crate::RegisterSpec for TASKS_CTSTART_SPEC { + type Ux = u32; +} +#[doc = "`write(|w| ..)` method takes [tasks_ctstart::W](W) writer structure"] +impl crate::Writable for TASKS_CTSTART_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets TASKS_CTSTART to value 0"] +impl crate::Resettable for TASKS_CTSTART_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/clock/tasks_ctstop.rs b/down-the-stack/dk_pac/src/clock/tasks_ctstop.rs new file mode 100644 index 0000000..4f4cf4c --- /dev/null +++ b/down-the-stack/dk_pac/src/clock/tasks_ctstop.rs @@ -0,0 +1,72 @@ +#[doc = "Register `TASKS_CTSTOP` 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 = "Stop calibration timer\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum TASKS_CTSTOP_AW { + #[doc = "1: Trigger task"] + TRIGGER = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: TASKS_CTSTOP_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `TASKS_CTSTOP` writer - Stop calibration timer"] +pub type TASKS_CTSTOP_W<'a, const O: u8> = + crate::BitWriter<'a, u32, TASKS_CTSTOP_SPEC, TASKS_CTSTOP_AW, O>; +impl<'a, const O: u8> TASKS_CTSTOP_W<'a, O> { + #[doc = "Trigger task"] + #[inline(always)] + pub fn trigger(self) -> &'a mut W { + self.variant(TASKS_CTSTOP_AW::TRIGGER) + } +} +impl W { + #[doc = "Bit 0 - Stop calibration timer"] + #[inline(always)] + #[must_use] + pub fn tasks_ctstop(&mut self) -> TASKS_CTSTOP_W<0> { + TASKS_CTSTOP_W::new(self) + } + #[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 = "Stop calibration timer\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 [tasks_ctstop](index.html) module"] +pub struct TASKS_CTSTOP_SPEC; +impl crate::RegisterSpec for TASKS_CTSTOP_SPEC { + type Ux = u32; +} +#[doc = "`write(|w| ..)` method takes [tasks_ctstop::W](W) writer structure"] +impl crate::Writable for TASKS_CTSTOP_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets TASKS_CTSTOP to value 0"] +impl crate::Resettable for TASKS_CTSTOP_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/clock/tasks_hfclkstart.rs b/down-the-stack/dk_pac/src/clock/tasks_hfclkstart.rs new file mode 100644 index 0000000..5cc9079 --- /dev/null +++ b/down-the-stack/dk_pac/src/clock/tasks_hfclkstart.rs @@ -0,0 +1,72 @@ +#[doc = "Register `TASKS_HFCLKSTART` 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 = "Start HFCLK crystal oscillator\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum TASKS_HFCLKSTART_AW { + #[doc = "1: Trigger task"] + TRIGGER = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: TASKS_HFCLKSTART_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `TASKS_HFCLKSTART` writer - Start HFCLK crystal oscillator"] +pub type TASKS_HFCLKSTART_W<'a, const O: u8> = + crate::BitWriter<'a, u32, TASKS_HFCLKSTART_SPEC, TASKS_HFCLKSTART_AW, O>; +impl<'a, const O: u8> TASKS_HFCLKSTART_W<'a, O> { + #[doc = "Trigger task"] + #[inline(always)] + pub fn trigger(self) -> &'a mut W { + self.variant(TASKS_HFCLKSTART_AW::TRIGGER) + } +} +impl W { + #[doc = "Bit 0 - Start HFCLK crystal oscillator"] + #[inline(always)] + #[must_use] + pub fn tasks_hfclkstart(&mut self) -> TASKS_HFCLKSTART_W<0> { + TASKS_HFCLKSTART_W::new(self) + } + #[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 = "Start HFCLK crystal oscillator\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 [tasks_hfclkstart](index.html) module"] +pub struct TASKS_HFCLKSTART_SPEC; +impl crate::RegisterSpec for TASKS_HFCLKSTART_SPEC { + type Ux = u32; +} +#[doc = "`write(|w| ..)` method takes [tasks_hfclkstart::W](W) writer structure"] +impl crate::Writable for TASKS_HFCLKSTART_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets TASKS_HFCLKSTART to value 0"] +impl crate::Resettable for TASKS_HFCLKSTART_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/clock/tasks_hfclkstop.rs b/down-the-stack/dk_pac/src/clock/tasks_hfclkstop.rs new file mode 100644 index 0000000..af6ead3 --- /dev/null +++ b/down-the-stack/dk_pac/src/clock/tasks_hfclkstop.rs @@ -0,0 +1,72 @@ +#[doc = "Register `TASKS_HFCLKSTOP` 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 = "Stop HFCLK crystal oscillator\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum TASKS_HFCLKSTOP_AW { + #[doc = "1: Trigger task"] + TRIGGER = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: TASKS_HFCLKSTOP_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `TASKS_HFCLKSTOP` writer - Stop HFCLK crystal oscillator"] +pub type TASKS_HFCLKSTOP_W<'a, const O: u8> = + crate::BitWriter<'a, u32, TASKS_HFCLKSTOP_SPEC, TASKS_HFCLKSTOP_AW, O>; +impl<'a, const O: u8> TASKS_HFCLKSTOP_W<'a, O> { + #[doc = "Trigger task"] + #[inline(always)] + pub fn trigger(self) -> &'a mut W { + self.variant(TASKS_HFCLKSTOP_AW::TRIGGER) + } +} +impl W { + #[doc = "Bit 0 - Stop HFCLK crystal oscillator"] + #[inline(always)] + #[must_use] + pub fn tasks_hfclkstop(&mut self) -> TASKS_HFCLKSTOP_W<0> { + TASKS_HFCLKSTOP_W::new(self) + } + #[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 = "Stop HFCLK crystal oscillator\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 [tasks_hfclkstop](index.html) module"] +pub struct TASKS_HFCLKSTOP_SPEC; +impl crate::RegisterSpec for TASKS_HFCLKSTOP_SPEC { + type Ux = u32; +} +#[doc = "`write(|w| ..)` method takes [tasks_hfclkstop::W](W) writer structure"] +impl crate::Writable for TASKS_HFCLKSTOP_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets TASKS_HFCLKSTOP to value 0"] +impl crate::Resettable for TASKS_HFCLKSTOP_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/clock/tasks_lfclkstart.rs b/down-the-stack/dk_pac/src/clock/tasks_lfclkstart.rs new file mode 100644 index 0000000..93bf213 --- /dev/null +++ b/down-the-stack/dk_pac/src/clock/tasks_lfclkstart.rs @@ -0,0 +1,72 @@ +#[doc = "Register `TASKS_LFCLKSTART` 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 = "Start LFCLK source\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum TASKS_LFCLKSTART_AW { + #[doc = "1: Trigger task"] + TRIGGER = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: TASKS_LFCLKSTART_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `TASKS_LFCLKSTART` writer - Start LFCLK source"] +pub type TASKS_LFCLKSTART_W<'a, const O: u8> = + crate::BitWriter<'a, u32, TASKS_LFCLKSTART_SPEC, TASKS_LFCLKSTART_AW, O>; +impl<'a, const O: u8> TASKS_LFCLKSTART_W<'a, O> { + #[doc = "Trigger task"] + #[inline(always)] + pub fn trigger(self) -> &'a mut W { + self.variant(TASKS_LFCLKSTART_AW::TRIGGER) + } +} +impl W { + #[doc = "Bit 0 - Start LFCLK source"] + #[inline(always)] + #[must_use] + pub fn tasks_lfclkstart(&mut self) -> TASKS_LFCLKSTART_W<0> { + TASKS_LFCLKSTART_W::new(self) + } + #[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 = "Start LFCLK source\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 [tasks_lfclkstart](index.html) module"] +pub struct TASKS_LFCLKSTART_SPEC; +impl crate::RegisterSpec for TASKS_LFCLKSTART_SPEC { + type Ux = u32; +} +#[doc = "`write(|w| ..)` method takes [tasks_lfclkstart::W](W) writer structure"] +impl crate::Writable for TASKS_LFCLKSTART_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets TASKS_LFCLKSTART to value 0"] +impl crate::Resettable for TASKS_LFCLKSTART_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/clock/tasks_lfclkstop.rs b/down-the-stack/dk_pac/src/clock/tasks_lfclkstop.rs new file mode 100644 index 0000000..1e4749e --- /dev/null +++ b/down-the-stack/dk_pac/src/clock/tasks_lfclkstop.rs @@ -0,0 +1,72 @@ +#[doc = "Register `TASKS_LFCLKSTOP` 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 = "Stop LFCLK source\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum TASKS_LFCLKSTOP_AW { + #[doc = "1: Trigger task"] + TRIGGER = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: TASKS_LFCLKSTOP_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `TASKS_LFCLKSTOP` writer - Stop LFCLK source"] +pub type TASKS_LFCLKSTOP_W<'a, const O: u8> = + crate::BitWriter<'a, u32, TASKS_LFCLKSTOP_SPEC, TASKS_LFCLKSTOP_AW, O>; +impl<'a, const O: u8> TASKS_LFCLKSTOP_W<'a, O> { + #[doc = "Trigger task"] + #[inline(always)] + pub fn trigger(self) -> &'a mut W { + self.variant(TASKS_LFCLKSTOP_AW::TRIGGER) + } +} +impl W { + #[doc = "Bit 0 - Stop LFCLK source"] + #[inline(always)] + #[must_use] + pub fn tasks_lfclkstop(&mut self) -> TASKS_LFCLKSTOP_W<0> { + TASKS_LFCLKSTOP_W::new(self) + } + #[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 = "Stop LFCLK source\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 [tasks_lfclkstop](index.html) module"] +pub struct TASKS_LFCLKSTOP_SPEC; +impl crate::RegisterSpec for TASKS_LFCLKSTOP_SPEC { + type Ux = u32; +} +#[doc = "`write(|w| ..)` method takes [tasks_lfclkstop::W](W) writer structure"] +impl crate::Writable for TASKS_LFCLKSTOP_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets TASKS_LFCLKSTOP to value 0"] +impl crate::Resettable for TASKS_LFCLKSTOP_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/clock/traceconfig.rs b/down-the-stack/dk_pac/src/clock/traceconfig.rs new file mode 100644 index 0000000..abbc195 --- /dev/null +++ b/down-the-stack/dk_pac/src/clock/traceconfig.rs @@ -0,0 +1,232 @@ +#[doc = "Register `TRACECONFIG` 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 `TRACECONFIG` 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 `TRACEPORTSPEED` reader - Speed of Trace Port clock. Note that the TRACECLK pin will output this clock divided by two."] +pub type TRACEPORTSPEED_R = crate::FieldReader; +#[doc = "Speed of Trace Port clock. Note that the TRACECLK pin will output this clock divided by two.\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +#[repr(u8)] +pub enum TRACEPORTSPEED_A { + #[doc = "0: 32 MHz Trace Port clock (TRACECLK = 16 MHz)"] + _32MHZ = 0, + #[doc = "1: 16 MHz Trace Port clock (TRACECLK = 8 MHz)"] + _16MHZ = 1, + #[doc = "2: 8 MHz Trace Port clock (TRACECLK = 4 MHz)"] + _8MHZ = 2, + #[doc = "3: 4 MHz Trace Port clock (TRACECLK = 2 MHz)"] + _4MHZ = 3, +} +impl From for u8 { + #[inline(always)] + fn from(variant: TRACEPORTSPEED_A) -> Self { + variant as _ + } +} +impl TRACEPORTSPEED_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> TRACEPORTSPEED_A { + match self.bits { + 0 => TRACEPORTSPEED_A::_32MHZ, + 1 => TRACEPORTSPEED_A::_16MHZ, + 2 => TRACEPORTSPEED_A::_8MHZ, + 3 => TRACEPORTSPEED_A::_4MHZ, + _ => unreachable!(), + } + } + #[doc = "Checks if the value of the field is `_32MHZ`"] + #[inline(always)] + pub fn is_32mhz(&self) -> bool { + *self == TRACEPORTSPEED_A::_32MHZ + } + #[doc = "Checks if the value of the field is `_16MHZ`"] + #[inline(always)] + pub fn is_16mhz(&self) -> bool { + *self == TRACEPORTSPEED_A::_16MHZ + } + #[doc = "Checks if the value of the field is `_8MHZ`"] + #[inline(always)] + pub fn is_8mhz(&self) -> bool { + *self == TRACEPORTSPEED_A::_8MHZ + } + #[doc = "Checks if the value of the field is `_4MHZ`"] + #[inline(always)] + pub fn is_4mhz(&self) -> bool { + *self == TRACEPORTSPEED_A::_4MHZ + } +} +#[doc = "Field `TRACEPORTSPEED` writer - Speed of Trace Port clock. Note that the TRACECLK pin will output this clock divided by two."] +pub type TRACEPORTSPEED_W<'a, const O: u8> = + crate::FieldWriterSafe<'a, u32, TRACECONFIG_SPEC, u8, TRACEPORTSPEED_A, 2, O>; +impl<'a, const O: u8> TRACEPORTSPEED_W<'a, O> { + #[doc = "32 MHz Trace Port clock (TRACECLK = 16 MHz)"] + #[inline(always)] + pub fn _32mhz(self) -> &'a mut W { + self.variant(TRACEPORTSPEED_A::_32MHZ) + } + #[doc = "16 MHz Trace Port clock (TRACECLK = 8 MHz)"] + #[inline(always)] + pub fn _16mhz(self) -> &'a mut W { + self.variant(TRACEPORTSPEED_A::_16MHZ) + } + #[doc = "8 MHz Trace Port clock (TRACECLK = 4 MHz)"] + #[inline(always)] + pub fn _8mhz(self) -> &'a mut W { + self.variant(TRACEPORTSPEED_A::_8MHZ) + } + #[doc = "4 MHz Trace Port clock (TRACECLK = 2 MHz)"] + #[inline(always)] + pub fn _4mhz(self) -> &'a mut W { + self.variant(TRACEPORTSPEED_A::_4MHZ) + } +} +#[doc = "Field `TRACEMUX` reader - Pin multiplexing of trace signals."] +pub type TRACEMUX_R = crate::FieldReader; +#[doc = "Pin multiplexing of trace signals.\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +#[repr(u8)] +pub enum TRACEMUX_A { + #[doc = "0: GPIOs multiplexed onto all trace-pins"] + GPIO = 0, + #[doc = "1: SWO multiplexed onto P0.18, GPIO multiplexed onto other trace pins"] + SERIAL = 1, + #[doc = "2: TRACECLK and TRACEDATA multiplexed onto P0.20, P0.18, P0.16, P0.15 and P0.14."] + PARALLEL = 2, +} +impl From for u8 { + #[inline(always)] + fn from(variant: TRACEMUX_A) -> Self { + variant as _ + } +} +impl TRACEMUX_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> Option { + match self.bits { + 0 => Some(TRACEMUX_A::GPIO), + 1 => Some(TRACEMUX_A::SERIAL), + 2 => Some(TRACEMUX_A::PARALLEL), + _ => None, + } + } + #[doc = "Checks if the value of the field is `GPIO`"] + #[inline(always)] + pub fn is_gpio(&self) -> bool { + *self == TRACEMUX_A::GPIO + } + #[doc = "Checks if the value of the field is `SERIAL`"] + #[inline(always)] + pub fn is_serial(&self) -> bool { + *self == TRACEMUX_A::SERIAL + } + #[doc = "Checks if the value of the field is `PARALLEL`"] + #[inline(always)] + pub fn is_parallel(&self) -> bool { + *self == TRACEMUX_A::PARALLEL + } +} +#[doc = "Field `TRACEMUX` writer - Pin multiplexing of trace signals."] +pub type TRACEMUX_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, TRACECONFIG_SPEC, u8, TRACEMUX_A, 2, O>; +impl<'a, const O: u8> TRACEMUX_W<'a, O> { + #[doc = "GPIOs multiplexed onto all trace-pins"] + #[inline(always)] + pub fn gpio(self) -> &'a mut W { + self.variant(TRACEMUX_A::GPIO) + } + #[doc = "SWO multiplexed onto P0.18, GPIO multiplexed onto other trace pins"] + #[inline(always)] + pub fn serial(self) -> &'a mut W { + self.variant(TRACEMUX_A::SERIAL) + } + #[doc = "TRACECLK and TRACEDATA multiplexed onto P0.20, P0.18, P0.16, P0.15 and P0.14."] + #[inline(always)] + pub fn parallel(self) -> &'a mut W { + self.variant(TRACEMUX_A::PARALLEL) + } +} +impl R { + #[doc = "Bits 0:1 - Speed of Trace Port clock. Note that the TRACECLK pin will output this clock divided by two."] + #[inline(always)] + pub fn traceportspeed(&self) -> TRACEPORTSPEED_R { + TRACEPORTSPEED_R::new((self.bits & 3) as u8) + } + #[doc = "Bits 16:17 - Pin multiplexing of trace signals."] + #[inline(always)] + pub fn tracemux(&self) -> TRACEMUX_R { + TRACEMUX_R::new(((self.bits >> 16) & 3) as u8) + } +} +impl W { + #[doc = "Bits 0:1 - Speed of Trace Port clock. Note that the TRACECLK pin will output this clock divided by two."] + #[inline(always)] + #[must_use] + pub fn traceportspeed(&mut self) -> TRACEPORTSPEED_W<0> { + TRACEPORTSPEED_W::new(self) + } + #[doc = "Bits 16:17 - Pin multiplexing of trace signals."] + #[inline(always)] + #[must_use] + pub fn tracemux(&mut self) -> TRACEMUX_W<16> { + TRACEMUX_W::new(self) + } + #[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 = "Clocking options for the Trace Port debug interface\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 [traceconfig](index.html) module"] +pub struct TRACECONFIG_SPEC; +impl crate::RegisterSpec for TRACECONFIG_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [traceconfig::R](R) reader structure"] +impl crate::Readable for TRACECONFIG_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [traceconfig::W](W) writer structure"] +impl crate::Writable for TRACECONFIG_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets TRACECONFIG to value 0"] +impl crate::Resettable for TRACECONFIG_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/comp.rs b/down-the-stack/dk_pac/src/comp.rs new file mode 100644 index 0000000..5776789 --- /dev/null +++ b/down-the-stack/dk_pac/src/comp.rs @@ -0,0 +1,130 @@ +#[doc = r"Register block"] +#[repr(C)] +pub struct RegisterBlock { + #[doc = "0x00 - Start comparator"] + pub tasks_start: TASKS_START, + #[doc = "0x04 - Stop comparator"] + pub tasks_stop: TASKS_STOP, + #[doc = "0x08 - Sample comparator value"] + pub tasks_sample: TASKS_SAMPLE, + _reserved3: [u8; 0xf4], + #[doc = "0x100 - COMP is ready and output is valid"] + pub events_ready: EVENTS_READY, + #[doc = "0x104 - Downward crossing"] + pub events_down: EVENTS_DOWN, + #[doc = "0x108 - Upward crossing"] + pub events_up: EVENTS_UP, + #[doc = "0x10c - Downward or upward crossing"] + pub events_cross: EVENTS_CROSS, + _reserved7: [u8; 0xf0], + #[doc = "0x200 - Shortcuts between local events and tasks"] + pub shorts: SHORTS, + _reserved8: [u8; 0xfc], + #[doc = "0x300 - Enable or disable interrupt"] + pub inten: INTEN, + #[doc = "0x304 - Enable interrupt"] + pub intenset: INTENSET, + #[doc = "0x308 - Disable interrupt"] + pub intenclr: INTENCLR, + _reserved11: [u8; 0xf4], + #[doc = "0x400 - Compare result"] + pub result: RESULT, + _reserved12: [u8; 0xfc], + #[doc = "0x500 - COMP enable"] + pub enable: ENABLE, + #[doc = "0x504 - Pin select"] + pub psel: PSEL, + #[doc = "0x508 - Reference source select for single-ended mode"] + pub refsel: REFSEL, + #[doc = "0x50c - External reference select"] + pub extrefsel: EXTREFSEL, + _reserved16: [u8; 0x20], + #[doc = "0x530 - Threshold configuration for hysteresis unit"] + pub th: TH, + #[doc = "0x534 - Mode configuration"] + pub mode: MODE, + #[doc = "0x538 - Comparator hysteresis enable"] + pub hyst: HYST, + #[doc = "0x53c - Current source select on analog input"] + pub isource: ISOURCE, +} +#[doc = "TASKS_START (w) register accessor: an alias for `Reg`"] +pub type TASKS_START = crate::Reg; +#[doc = "Start comparator"] +pub mod tasks_start; +#[doc = "TASKS_STOP (w) register accessor: an alias for `Reg`"] +pub type TASKS_STOP = crate::Reg; +#[doc = "Stop comparator"] +pub mod tasks_stop; +#[doc = "TASKS_SAMPLE (w) register accessor: an alias for `Reg`"] +pub type TASKS_SAMPLE = crate::Reg; +#[doc = "Sample comparator value"] +pub mod tasks_sample; +#[doc = "EVENTS_READY (rw) register accessor: an alias for `Reg`"] +pub type EVENTS_READY = crate::Reg; +#[doc = "COMP is ready and output is valid"] +pub mod events_ready; +#[doc = "EVENTS_DOWN (rw) register accessor: an alias for `Reg`"] +pub type EVENTS_DOWN = crate::Reg; +#[doc = "Downward crossing"] +pub mod events_down; +#[doc = "EVENTS_UP (rw) register accessor: an alias for `Reg`"] +pub type EVENTS_UP = crate::Reg; +#[doc = "Upward crossing"] +pub mod events_up; +#[doc = "EVENTS_CROSS (rw) register accessor: an alias for `Reg`"] +pub type EVENTS_CROSS = crate::Reg; +#[doc = "Downward or upward crossing"] +pub mod events_cross; +#[doc = "SHORTS (rw) register accessor: an alias for `Reg`"] +pub type SHORTS = crate::Reg; +#[doc = "Shortcuts between local events and tasks"] +pub mod shorts; +#[doc = "INTEN (rw) register accessor: an alias for `Reg`"] +pub type INTEN = crate::Reg; +#[doc = "Enable or disable interrupt"] +pub mod inten; +#[doc = "INTENSET (rw) register accessor: an alias for `Reg`"] +pub type INTENSET = crate::Reg; +#[doc = "Enable interrupt"] +pub mod intenset; +#[doc = "INTENCLR (rw) register accessor: an alias for `Reg`"] +pub type INTENCLR = crate::Reg; +#[doc = "Disable interrupt"] +pub mod intenclr; +#[doc = "RESULT (r) register accessor: an alias for `Reg`"] +pub type RESULT = crate::Reg; +#[doc = "Compare result"] +pub mod result; +#[doc = "ENABLE (rw) register accessor: an alias for `Reg`"] +pub type ENABLE = crate::Reg; +#[doc = "COMP enable"] +pub mod enable; +#[doc = "PSEL (rw) register accessor: an alias for `Reg`"] +pub type PSEL = crate::Reg; +#[doc = "Pin select"] +pub mod psel; +#[doc = "REFSEL (rw) register accessor: an alias for `Reg`"] +pub type REFSEL = crate::Reg; +#[doc = "Reference source select for single-ended mode"] +pub mod refsel; +#[doc = "EXTREFSEL (rw) register accessor: an alias for `Reg`"] +pub type EXTREFSEL = crate::Reg; +#[doc = "External reference select"] +pub mod extrefsel; +#[doc = "TH (rw) register accessor: an alias for `Reg`"] +pub type TH = crate::Reg; +#[doc = "Threshold configuration for hysteresis unit"] +pub mod th; +#[doc = "MODE (rw) register accessor: an alias for `Reg`"] +pub type MODE = crate::Reg; +#[doc = "Mode configuration"] +pub mod mode; +#[doc = "HYST (rw) register accessor: an alias for `Reg`"] +pub type HYST = crate::Reg; +#[doc = "Comparator hysteresis enable"] +pub mod hyst; +#[doc = "ISOURCE (rw) register accessor: an alias for `Reg`"] +pub type ISOURCE = crate::Reg; +#[doc = "Current source select on analog input"] +pub mod isource; diff --git a/down-the-stack/dk_pac/src/comp/enable.rs b/down-the-stack/dk_pac/src/comp/enable.rs new file mode 100644 index 0000000..9a63495 --- /dev/null +++ b/down-the-stack/dk_pac/src/comp/enable.rs @@ -0,0 +1,128 @@ +#[doc = "Register `ENABLE` 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 `ENABLE` 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 `ENABLE` reader - Enable or disable COMP"] +pub type ENABLE_R = crate::FieldReader; +#[doc = "Enable or disable COMP\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +#[repr(u8)] +pub enum ENABLE_A { + #[doc = "0: Disable"] + DISABLED = 0, + #[doc = "2: Enable"] + ENABLED = 2, +} +impl From for u8 { + #[inline(always)] + fn from(variant: ENABLE_A) -> Self { + variant as _ + } +} +impl ENABLE_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> Option { + match self.bits { + 0 => Some(ENABLE_A::DISABLED), + 2 => Some(ENABLE_A::ENABLED), + _ => None, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == ENABLE_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == ENABLE_A::ENABLED + } +} +#[doc = "Field `ENABLE` writer - Enable or disable COMP"] +pub type ENABLE_W<'a, const O: u8> = crate::FieldWriter<'a, u32, ENABLE_SPEC, u8, ENABLE_A, 2, O>; +impl<'a, const O: u8> ENABLE_W<'a, O> { + #[doc = "Disable"] + #[inline(always)] + pub fn disabled(self) -> &'a mut W { + self.variant(ENABLE_A::DISABLED) + } + #[doc = "Enable"] + #[inline(always)] + pub fn enabled(self) -> &'a mut W { + self.variant(ENABLE_A::ENABLED) + } +} +impl R { + #[doc = "Bits 0:1 - Enable or disable COMP"] + #[inline(always)] + pub fn enable(&self) -> ENABLE_R { + ENABLE_R::new((self.bits & 3) as u8) + } +} +impl W { + #[doc = "Bits 0:1 - Enable or disable COMP"] + #[inline(always)] + #[must_use] + pub fn enable(&mut self) -> ENABLE_W<0> { + 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 + } +} +#[doc = "COMP enable\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 [enable](index.html) module"] +pub struct ENABLE_SPEC; +impl crate::RegisterSpec for ENABLE_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [enable::R](R) reader structure"] +impl crate::Readable for ENABLE_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [enable::W](W) writer structure"] +impl crate::Writable for ENABLE_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets ENABLE to value 0"] +impl crate::Resettable for ENABLE_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/comp/events_cross.rs b/down-the-stack/dk_pac/src/comp/events_cross.rs new file mode 100644 index 0000000..e0925b7 --- /dev/null +++ b/down-the-stack/dk_pac/src/comp/events_cross.rs @@ -0,0 +1,127 @@ +#[doc = "Register `EVENTS_CROSS` 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 `EVENTS_CROSS` 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 `EVENTS_CROSS` reader - Downward or upward crossing"] +pub type EVENTS_CROSS_R = crate::BitReader; +#[doc = "Downward or upward crossing\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum EVENTS_CROSS_A { + #[doc = "0: Event not generated"] + NOT_GENERATED = 0, + #[doc = "1: Event generated"] + GENERATED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: EVENTS_CROSS_A) -> Self { + variant as u8 != 0 + } +} +impl EVENTS_CROSS_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> EVENTS_CROSS_A { + match self.bits { + false => EVENTS_CROSS_A::NOT_GENERATED, + true => EVENTS_CROSS_A::GENERATED, + } + } + #[doc = "Checks if the value of the field is `NOT_GENERATED`"] + #[inline(always)] + pub fn is_not_generated(&self) -> bool { + *self == EVENTS_CROSS_A::NOT_GENERATED + } + #[doc = "Checks if the value of the field is `GENERATED`"] + #[inline(always)] + pub fn is_generated(&self) -> bool { + *self == EVENTS_CROSS_A::GENERATED + } +} +#[doc = "Field `EVENTS_CROSS` writer - Downward or upward crossing"] +pub type EVENTS_CROSS_W<'a, const O: u8> = + crate::BitWriter<'a, u32, EVENTS_CROSS_SPEC, EVENTS_CROSS_A, O>; +impl<'a, const O: u8> EVENTS_CROSS_W<'a, O> { + #[doc = "Event not generated"] + #[inline(always)] + pub fn not_generated(self) -> &'a mut W { + self.variant(EVENTS_CROSS_A::NOT_GENERATED) + } + #[doc = "Event generated"] + #[inline(always)] + pub fn generated(self) -> &'a mut W { + self.variant(EVENTS_CROSS_A::GENERATED) + } +} +impl R { + #[doc = "Bit 0 - Downward or upward crossing"] + #[inline(always)] + pub fn events_cross(&self) -> EVENTS_CROSS_R { + EVENTS_CROSS_R::new((self.bits & 1) != 0) + } +} +impl W { + #[doc = "Bit 0 - Downward or upward crossing"] + #[inline(always)] + #[must_use] + pub fn events_cross(&mut self) -> EVENTS_CROSS_W<0> { + EVENTS_CROSS_W::new(self) + } + #[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 = "Downward or upward crossing\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 [events_cross](index.html) module"] +pub struct EVENTS_CROSS_SPEC; +impl crate::RegisterSpec for EVENTS_CROSS_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [events_cross::R](R) reader structure"] +impl crate::Readable for EVENTS_CROSS_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [events_cross::W](W) writer structure"] +impl crate::Writable for EVENTS_CROSS_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets EVENTS_CROSS to value 0"] +impl crate::Resettable for EVENTS_CROSS_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/comp/events_down.rs b/down-the-stack/dk_pac/src/comp/events_down.rs new file mode 100644 index 0000000..febe130 --- /dev/null +++ b/down-the-stack/dk_pac/src/comp/events_down.rs @@ -0,0 +1,127 @@ +#[doc = "Register `EVENTS_DOWN` 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 `EVENTS_DOWN` 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 `EVENTS_DOWN` reader - Downward crossing"] +pub type EVENTS_DOWN_R = crate::BitReader; +#[doc = "Downward crossing\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum EVENTS_DOWN_A { + #[doc = "0: Event not generated"] + NOT_GENERATED = 0, + #[doc = "1: Event generated"] + GENERATED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: EVENTS_DOWN_A) -> Self { + variant as u8 != 0 + } +} +impl EVENTS_DOWN_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> EVENTS_DOWN_A { + match self.bits { + false => EVENTS_DOWN_A::NOT_GENERATED, + true => EVENTS_DOWN_A::GENERATED, + } + } + #[doc = "Checks if the value of the field is `NOT_GENERATED`"] + #[inline(always)] + pub fn is_not_generated(&self) -> bool { + *self == EVENTS_DOWN_A::NOT_GENERATED + } + #[doc = "Checks if the value of the field is `GENERATED`"] + #[inline(always)] + pub fn is_generated(&self) -> bool { + *self == EVENTS_DOWN_A::GENERATED + } +} +#[doc = "Field `EVENTS_DOWN` writer - Downward crossing"] +pub type EVENTS_DOWN_W<'a, const O: u8> = + crate::BitWriter<'a, u32, EVENTS_DOWN_SPEC, EVENTS_DOWN_A, O>; +impl<'a, const O: u8> EVENTS_DOWN_W<'a, O> { + #[doc = "Event not generated"] + #[inline(always)] + pub fn not_generated(self) -> &'a mut W { + self.variant(EVENTS_DOWN_A::NOT_GENERATED) + } + #[doc = "Event generated"] + #[inline(always)] + pub fn generated(self) -> &'a mut W { + self.variant(EVENTS_DOWN_A::GENERATED) + } +} +impl R { + #[doc = "Bit 0 - Downward crossing"] + #[inline(always)] + pub fn events_down(&self) -> EVENTS_DOWN_R { + EVENTS_DOWN_R::new((self.bits & 1) != 0) + } +} +impl W { + #[doc = "Bit 0 - Downward crossing"] + #[inline(always)] + #[must_use] + pub fn events_down(&mut self) -> EVENTS_DOWN_W<0> { + EVENTS_DOWN_W::new(self) + } + #[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 = "Downward crossing\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 [events_down](index.html) module"] +pub struct EVENTS_DOWN_SPEC; +impl crate::RegisterSpec for EVENTS_DOWN_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [events_down::R](R) reader structure"] +impl crate::Readable for EVENTS_DOWN_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [events_down::W](W) writer structure"] +impl crate::Writable for EVENTS_DOWN_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets EVENTS_DOWN to value 0"] +impl crate::Resettable for EVENTS_DOWN_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/comp/events_ready.rs b/down-the-stack/dk_pac/src/comp/events_ready.rs new file mode 100644 index 0000000..f4cd3cc --- /dev/null +++ b/down-the-stack/dk_pac/src/comp/events_ready.rs @@ -0,0 +1,127 @@ +#[doc = "Register `EVENTS_READY` 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 `EVENTS_READY` 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 `EVENTS_READY` reader - COMP is ready and output is valid"] +pub type EVENTS_READY_R = crate::BitReader; +#[doc = "COMP is ready and output is valid\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum EVENTS_READY_A { + #[doc = "0: Event not generated"] + NOT_GENERATED = 0, + #[doc = "1: Event generated"] + GENERATED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: EVENTS_READY_A) -> Self { + variant as u8 != 0 + } +} +impl EVENTS_READY_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> EVENTS_READY_A { + match self.bits { + false => EVENTS_READY_A::NOT_GENERATED, + true => EVENTS_READY_A::GENERATED, + } + } + #[doc = "Checks if the value of the field is `NOT_GENERATED`"] + #[inline(always)] + pub fn is_not_generated(&self) -> bool { + *self == EVENTS_READY_A::NOT_GENERATED + } + #[doc = "Checks if the value of the field is `GENERATED`"] + #[inline(always)] + pub fn is_generated(&self) -> bool { + *self == EVENTS_READY_A::GENERATED + } +} +#[doc = "Field `EVENTS_READY` writer - COMP is ready and output is valid"] +pub type EVENTS_READY_W<'a, const O: u8> = + crate::BitWriter<'a, u32, EVENTS_READY_SPEC, EVENTS_READY_A, O>; +impl<'a, const O: u8> EVENTS_READY_W<'a, O> { + #[doc = "Event not generated"] + #[inline(always)] + pub fn not_generated(self) -> &'a mut W { + self.variant(EVENTS_READY_A::NOT_GENERATED) + } + #[doc = "Event generated"] + #[inline(always)] + pub fn generated(self) -> &'a mut W { + self.variant(EVENTS_READY_A::GENERATED) + } +} +impl R { + #[doc = "Bit 0 - COMP is ready and output is valid"] + #[inline(always)] + pub fn events_ready(&self) -> EVENTS_READY_R { + EVENTS_READY_R::new((self.bits & 1) != 0) + } +} +impl W { + #[doc = "Bit 0 - COMP is ready and output is valid"] + #[inline(always)] + #[must_use] + pub fn events_ready(&mut self) -> EVENTS_READY_W<0> { + EVENTS_READY_W::new(self) + } + #[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 = "COMP is ready and output is valid\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 [events_ready](index.html) module"] +pub struct EVENTS_READY_SPEC; +impl crate::RegisterSpec for EVENTS_READY_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [events_ready::R](R) reader structure"] +impl crate::Readable for EVENTS_READY_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [events_ready::W](W) writer structure"] +impl crate::Writable for EVENTS_READY_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets EVENTS_READY to value 0"] +impl crate::Resettable for EVENTS_READY_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/comp/events_up.rs b/down-the-stack/dk_pac/src/comp/events_up.rs new file mode 100644 index 0000000..81b5382 --- /dev/null +++ b/down-the-stack/dk_pac/src/comp/events_up.rs @@ -0,0 +1,126 @@ +#[doc = "Register `EVENTS_UP` 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 `EVENTS_UP` 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 `EVENTS_UP` reader - Upward crossing"] +pub type EVENTS_UP_R = crate::BitReader; +#[doc = "Upward crossing\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum EVENTS_UP_A { + #[doc = "0: Event not generated"] + NOT_GENERATED = 0, + #[doc = "1: Event generated"] + GENERATED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: EVENTS_UP_A) -> Self { + variant as u8 != 0 + } +} +impl EVENTS_UP_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> EVENTS_UP_A { + match self.bits { + false => EVENTS_UP_A::NOT_GENERATED, + true => EVENTS_UP_A::GENERATED, + } + } + #[doc = "Checks if the value of the field is `NOT_GENERATED`"] + #[inline(always)] + pub fn is_not_generated(&self) -> bool { + *self == EVENTS_UP_A::NOT_GENERATED + } + #[doc = "Checks if the value of the field is `GENERATED`"] + #[inline(always)] + pub fn is_generated(&self) -> bool { + *self == EVENTS_UP_A::GENERATED + } +} +#[doc = "Field `EVENTS_UP` writer - Upward crossing"] +pub type EVENTS_UP_W<'a, const O: u8> = crate::BitWriter<'a, u32, EVENTS_UP_SPEC, EVENTS_UP_A, O>; +impl<'a, const O: u8> EVENTS_UP_W<'a, O> { + #[doc = "Event not generated"] + #[inline(always)] + pub fn not_generated(self) -> &'a mut W { + self.variant(EVENTS_UP_A::NOT_GENERATED) + } + #[doc = "Event generated"] + #[inline(always)] + pub fn generated(self) -> &'a mut W { + self.variant(EVENTS_UP_A::GENERATED) + } +} +impl R { + #[doc = "Bit 0 - Upward crossing"] + #[inline(always)] + pub fn events_up(&self) -> EVENTS_UP_R { + EVENTS_UP_R::new((self.bits & 1) != 0) + } +} +impl W { + #[doc = "Bit 0 - Upward crossing"] + #[inline(always)] + #[must_use] + pub fn events_up(&mut self) -> EVENTS_UP_W<0> { + EVENTS_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 + } +} +#[doc = "Upward crossing\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 [events_up](index.html) module"] +pub struct EVENTS_UP_SPEC; +impl crate::RegisterSpec for EVENTS_UP_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [events_up::R](R) reader structure"] +impl crate::Readable for EVENTS_UP_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [events_up::W](W) writer structure"] +impl crate::Writable for EVENTS_UP_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets EVENTS_UP to value 0"] +impl crate::Resettable for EVENTS_UP_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/comp/extrefsel.rs b/down-the-stack/dk_pac/src/comp/extrefsel.rs new file mode 100644 index 0000000..f117f33 --- /dev/null +++ b/down-the-stack/dk_pac/src/comp/extrefsel.rs @@ -0,0 +1,207 @@ +#[doc = "Register `EXTREFSEL` 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 `EXTREFSEL` 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 `EXTREFSEL` reader - External analog reference select"] +pub type EXTREFSEL_R = crate::FieldReader; +#[doc = "External analog reference select\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +#[repr(u8)] +pub enum EXTREFSEL_A { + #[doc = "0: Use AIN0 as external analog reference"] + ANALOG_REFERENCE0 = 0, + #[doc = "1: Use AIN1 as external analog reference"] + ANALOG_REFERENCE1 = 1, + #[doc = "2: Use AIN2 as external analog reference"] + ANALOG_REFERENCE2 = 2, + #[doc = "3: Use AIN3 as external analog reference"] + ANALOG_REFERENCE3 = 3, + #[doc = "4: Use AIN4 as external analog reference"] + ANALOG_REFERENCE4 = 4, + #[doc = "5: Use AIN5 as external analog reference"] + ANALOG_REFERENCE5 = 5, + #[doc = "6: Use AIN6 as external analog reference"] + ANALOG_REFERENCE6 = 6, + #[doc = "7: Use AIN7 as external analog reference"] + ANALOG_REFERENCE7 = 7, +} +impl From for u8 { + #[inline(always)] + fn from(variant: EXTREFSEL_A) -> Self { + variant as _ + } +} +impl EXTREFSEL_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> EXTREFSEL_A { + match self.bits { + 0 => EXTREFSEL_A::ANALOG_REFERENCE0, + 1 => EXTREFSEL_A::ANALOG_REFERENCE1, + 2 => EXTREFSEL_A::ANALOG_REFERENCE2, + 3 => EXTREFSEL_A::ANALOG_REFERENCE3, + 4 => EXTREFSEL_A::ANALOG_REFERENCE4, + 5 => EXTREFSEL_A::ANALOG_REFERENCE5, + 6 => EXTREFSEL_A::ANALOG_REFERENCE6, + 7 => EXTREFSEL_A::ANALOG_REFERENCE7, + _ => unreachable!(), + } + } + #[doc = "Checks if the value of the field is `ANALOG_REFERENCE0`"] + #[inline(always)] + pub fn is_analog_reference0(&self) -> bool { + *self == EXTREFSEL_A::ANALOG_REFERENCE0 + } + #[doc = "Checks if the value of the field is `ANALOG_REFERENCE1`"] + #[inline(always)] + pub fn is_analog_reference1(&self) -> bool { + *self == EXTREFSEL_A::ANALOG_REFERENCE1 + } + #[doc = "Checks if the value of the field is `ANALOG_REFERENCE2`"] + #[inline(always)] + pub fn is_analog_reference2(&self) -> bool { + *self == EXTREFSEL_A::ANALOG_REFERENCE2 + } + #[doc = "Checks if the value of the field is `ANALOG_REFERENCE3`"] + #[inline(always)] + pub fn is_analog_reference3(&self) -> bool { + *self == EXTREFSEL_A::ANALOG_REFERENCE3 + } + #[doc = "Checks if the value of the field is `ANALOG_REFERENCE4`"] + #[inline(always)] + pub fn is_analog_reference4(&self) -> bool { + *self == EXTREFSEL_A::ANALOG_REFERENCE4 + } + #[doc = "Checks if the value of the field is `ANALOG_REFERENCE5`"] + #[inline(always)] + pub fn is_analog_reference5(&self) -> bool { + *self == EXTREFSEL_A::ANALOG_REFERENCE5 + } + #[doc = "Checks if the value of the field is `ANALOG_REFERENCE6`"] + #[inline(always)] + pub fn is_analog_reference6(&self) -> bool { + *self == EXTREFSEL_A::ANALOG_REFERENCE6 + } + #[doc = "Checks if the value of the field is `ANALOG_REFERENCE7`"] + #[inline(always)] + pub fn is_analog_reference7(&self) -> bool { + *self == EXTREFSEL_A::ANALOG_REFERENCE7 + } +} +#[doc = "Field `EXTREFSEL` writer - External analog reference select"] +pub type EXTREFSEL_W<'a, const O: u8> = + crate::FieldWriterSafe<'a, u32, EXTREFSEL_SPEC, u8, EXTREFSEL_A, 3, O>; +impl<'a, const O: u8> EXTREFSEL_W<'a, O> { + #[doc = "Use AIN0 as external analog reference"] + #[inline(always)] + pub fn analog_reference0(self) -> &'a mut W { + self.variant(EXTREFSEL_A::ANALOG_REFERENCE0) + } + #[doc = "Use AIN1 as external analog reference"] + #[inline(always)] + pub fn analog_reference1(self) -> &'a mut W { + self.variant(EXTREFSEL_A::ANALOG_REFERENCE1) + } + #[doc = "Use AIN2 as external analog reference"] + #[inline(always)] + pub fn analog_reference2(self) -> &'a mut W { + self.variant(EXTREFSEL_A::ANALOG_REFERENCE2) + } + #[doc = "Use AIN3 as external analog reference"] + #[inline(always)] + pub fn analog_reference3(self) -> &'a mut W { + self.variant(EXTREFSEL_A::ANALOG_REFERENCE3) + } + #[doc = "Use AIN4 as external analog reference"] + #[inline(always)] + pub fn analog_reference4(self) -> &'a mut W { + self.variant(EXTREFSEL_A::ANALOG_REFERENCE4) + } + #[doc = "Use AIN5 as external analog reference"] + #[inline(always)] + pub fn analog_reference5(self) -> &'a mut W { + self.variant(EXTREFSEL_A::ANALOG_REFERENCE5) + } + #[doc = "Use AIN6 as external analog reference"] + #[inline(always)] + pub fn analog_reference6(self) -> &'a mut W { + self.variant(EXTREFSEL_A::ANALOG_REFERENCE6) + } + #[doc = "Use AIN7 as external analog reference"] + #[inline(always)] + pub fn analog_reference7(self) -> &'a mut W { + self.variant(EXTREFSEL_A::ANALOG_REFERENCE7) + } +} +impl R { + #[doc = "Bits 0:2 - External analog reference select"] + #[inline(always)] + pub fn extrefsel(&self) -> EXTREFSEL_R { + EXTREFSEL_R::new((self.bits & 7) as u8) + } +} +impl W { + #[doc = "Bits 0:2 - External analog reference select"] + #[inline(always)] + #[must_use] + pub fn extrefsel(&mut self) -> EXTREFSEL_W<0> { + EXTREFSEL_W::new(self) + } + #[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 = "External reference select\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 [extrefsel](index.html) module"] +pub struct EXTREFSEL_SPEC; +impl crate::RegisterSpec for EXTREFSEL_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [extrefsel::R](R) reader structure"] +impl crate::Readable for EXTREFSEL_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [extrefsel::W](W) writer structure"] +impl crate::Writable for EXTREFSEL_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets EXTREFSEL to value 0"] +impl crate::Resettable for EXTREFSEL_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/comp/hyst.rs b/down-the-stack/dk_pac/src/comp/hyst.rs new file mode 100644 index 0000000..fe64d86 --- /dev/null +++ b/down-the-stack/dk_pac/src/comp/hyst.rs @@ -0,0 +1,126 @@ +#[doc = "Register `HYST` 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 `HYST` 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 `HYST` reader - Comparator hysteresis"] +pub type HYST_R = crate::BitReader; +#[doc = "Comparator hysteresis\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum HYST_A { + #[doc = "0: Comparator hysteresis disabled"] + NO_HYST = 0, + #[doc = "1: Comparator hysteresis enabled"] + HYST50M_V = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: HYST_A) -> Self { + variant as u8 != 0 + } +} +impl HYST_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> HYST_A { + match self.bits { + false => HYST_A::NO_HYST, + true => HYST_A::HYST50M_V, + } + } + #[doc = "Checks if the value of the field is `NO_HYST`"] + #[inline(always)] + pub fn is_no_hyst(&self) -> bool { + *self == HYST_A::NO_HYST + } + #[doc = "Checks if the value of the field is `HYST50M_V`"] + #[inline(always)] + pub fn is_hyst50m_v(&self) -> bool { + *self == HYST_A::HYST50M_V + } +} +#[doc = "Field `HYST` writer - Comparator hysteresis"] +pub type HYST_W<'a, const O: u8> = crate::BitWriter<'a, u32, HYST_SPEC, HYST_A, O>; +impl<'a, const O: u8> HYST_W<'a, O> { + #[doc = "Comparator hysteresis disabled"] + #[inline(always)] + pub fn no_hyst(self) -> &'a mut W { + self.variant(HYST_A::NO_HYST) + } + #[doc = "Comparator hysteresis enabled"] + #[inline(always)] + pub fn hyst50m_v(self) -> &'a mut W { + self.variant(HYST_A::HYST50M_V) + } +} +impl R { + #[doc = "Bit 0 - Comparator hysteresis"] + #[inline(always)] + pub fn hyst(&self) -> HYST_R { + HYST_R::new((self.bits & 1) != 0) + } +} +impl W { + #[doc = "Bit 0 - Comparator hysteresis"] + #[inline(always)] + #[must_use] + pub fn hyst(&mut self) -> HYST_W<0> { + HYST_W::new(self) + } + #[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 = "Comparator hysteresis enable\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 [hyst](index.html) module"] +pub struct HYST_SPEC; +impl crate::RegisterSpec for HYST_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [hyst::R](R) reader structure"] +impl crate::Readable for HYST_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [hyst::W](W) writer structure"] +impl crate::Writable for HYST_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets HYST to value 0"] +impl crate::Resettable for HYST_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/comp/inten.rs b/down-the-stack/dk_pac/src/comp/inten.rs new file mode 100644 index 0000000..e147b42 --- /dev/null +++ b/down-the-stack/dk_pac/src/comp/inten.rs @@ -0,0 +1,309 @@ +#[doc = "Register `INTEN` 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 `INTEN` 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 `READY` reader - Enable or disable interrupt for event READY"] +pub type READY_R = crate::BitReader; +#[doc = "Enable or disable interrupt for event READY\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum READY_A { + #[doc = "0: Disable"] + DISABLED = 0, + #[doc = "1: Enable"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: READY_A) -> Self { + variant as u8 != 0 + } +} +impl READY_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> READY_A { + match self.bits { + false => READY_A::DISABLED, + true => READY_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == READY_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == READY_A::ENABLED + } +} +#[doc = "Field `READY` writer - Enable or disable interrupt for event READY"] +pub type READY_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTEN_SPEC, READY_A, O>; +impl<'a, const O: u8> READY_W<'a, O> { + #[doc = "Disable"] + #[inline(always)] + pub fn disabled(self) -> &'a mut W { + self.variant(READY_A::DISABLED) + } + #[doc = "Enable"] + #[inline(always)] + pub fn enabled(self) -> &'a mut W { + self.variant(READY_A::ENABLED) + } +} +#[doc = "Field `DOWN` reader - Enable or disable interrupt for event DOWN"] +pub type DOWN_R = crate::BitReader; +#[doc = "Enable or disable interrupt for event DOWN\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum DOWN_A { + #[doc = "0: Disable"] + DISABLED = 0, + #[doc = "1: Enable"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: DOWN_A) -> Self { + variant as u8 != 0 + } +} +impl DOWN_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> DOWN_A { + match self.bits { + false => DOWN_A::DISABLED, + true => DOWN_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == DOWN_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == DOWN_A::ENABLED + } +} +#[doc = "Field `DOWN` writer - Enable or disable interrupt for event DOWN"] +pub type DOWN_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTEN_SPEC, DOWN_A, O>; +impl<'a, const O: u8> DOWN_W<'a, O> { + #[doc = "Disable"] + #[inline(always)] + pub fn disabled(self) -> &'a mut W { + self.variant(DOWN_A::DISABLED) + } + #[doc = "Enable"] + #[inline(always)] + pub fn enabled(self) -> &'a mut W { + self.variant(DOWN_A::ENABLED) + } +} +#[doc = "Field `UP` reader - Enable or disable interrupt for event UP"] +pub type UP_R = crate::BitReader; +#[doc = "Enable or disable interrupt for event UP\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum UP_A { + #[doc = "0: Disable"] + DISABLED = 0, + #[doc = "1: Enable"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: UP_A) -> Self { + variant as u8 != 0 + } +} +impl UP_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> UP_A { + match self.bits { + false => UP_A::DISABLED, + true => UP_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == UP_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == UP_A::ENABLED + } +} +#[doc = "Field `UP` writer - Enable or disable interrupt for event UP"] +pub type UP_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTEN_SPEC, UP_A, O>; +impl<'a, const O: u8> UP_W<'a, O> { + #[doc = "Disable"] + #[inline(always)] + pub fn disabled(self) -> &'a mut W { + self.variant(UP_A::DISABLED) + } + #[doc = "Enable"] + #[inline(always)] + pub fn enabled(self) -> &'a mut W { + self.variant(UP_A::ENABLED) + } +} +#[doc = "Field `CROSS` reader - Enable or disable interrupt for event CROSS"] +pub type CROSS_R = crate::BitReader; +#[doc = "Enable or disable interrupt for event CROSS\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum CROSS_A { + #[doc = "0: Disable"] + DISABLED = 0, + #[doc = "1: Enable"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: CROSS_A) -> Self { + variant as u8 != 0 + } +} +impl CROSS_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> CROSS_A { + match self.bits { + false => CROSS_A::DISABLED, + true => CROSS_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == CROSS_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == CROSS_A::ENABLED + } +} +#[doc = "Field `CROSS` writer - Enable or disable interrupt for event CROSS"] +pub type CROSS_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTEN_SPEC, CROSS_A, O>; +impl<'a, const O: u8> CROSS_W<'a, O> { + #[doc = "Disable"] + #[inline(always)] + pub fn disabled(self) -> &'a mut W { + self.variant(CROSS_A::DISABLED) + } + #[doc = "Enable"] + #[inline(always)] + pub fn enabled(self) -> &'a mut W { + self.variant(CROSS_A::ENABLED) + } +} +impl R { + #[doc = "Bit 0 - Enable or disable interrupt for event READY"] + #[inline(always)] + pub fn ready(&self) -> READY_R { + READY_R::new((self.bits & 1) != 0) + } + #[doc = "Bit 1 - Enable or disable interrupt for event DOWN"] + #[inline(always)] + pub fn down(&self) -> DOWN_R { + DOWN_R::new(((self.bits >> 1) & 1) != 0) + } + #[doc = "Bit 2 - Enable or disable interrupt for event UP"] + #[inline(always)] + pub fn up(&self) -> UP_R { + UP_R::new(((self.bits >> 2) & 1) != 0) + } + #[doc = "Bit 3 - Enable or disable interrupt for event CROSS"] + #[inline(always)] + pub fn cross(&self) -> CROSS_R { + CROSS_R::new(((self.bits >> 3) & 1) != 0) + } +} +impl W { + #[doc = "Bit 0 - Enable or disable interrupt for event READY"] + #[inline(always)] + #[must_use] + pub fn ready(&mut self) -> READY_W<0> { + READY_W::new(self) + } + #[doc = "Bit 1 - Enable or disable interrupt for event DOWN"] + #[inline(always)] + #[must_use] + pub fn down(&mut self) -> DOWN_W<1> { + DOWN_W::new(self) + } + #[doc = "Bit 2 - Enable or disable interrupt for event UP"] + #[inline(always)] + #[must_use] + pub fn up(&mut self) -> UP_W<2> { + UP_W::new(self) + } + #[doc = "Bit 3 - Enable or disable interrupt for event CROSS"] + #[inline(always)] + #[must_use] + pub fn cross(&mut self) -> CROSS_W<3> { + CROSS_W::new(self) + } + #[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 = "Enable or disable interrupt\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 [inten](index.html) module"] +pub struct INTEN_SPEC; +impl crate::RegisterSpec for INTEN_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [inten::R](R) reader structure"] +impl crate::Readable for INTEN_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [inten::W](W) writer structure"] +impl crate::Writable for INTEN_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets INTEN to value 0"] +impl crate::Resettable for INTEN_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/comp/intenclr.rs b/down-the-stack/dk_pac/src/comp/intenclr.rs new file mode 100644 index 0000000..83a9d57 --- /dev/null +++ b/down-the-stack/dk_pac/src/comp/intenclr.rs @@ -0,0 +1,337 @@ +#[doc = "Register `INTENCLR` 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 `INTENCLR` 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 `READY` reader - Write '1' to disable interrupt for event READY"] +pub type READY_R = crate::BitReader; +#[doc = "Write '1' to disable interrupt for event READY\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum READY_A { + #[doc = "0: Read: Disabled"] + DISABLED = 0, + #[doc = "1: Read: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: READY_A) -> Self { + variant as u8 != 0 + } +} +impl READY_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> READY_A { + match self.bits { + false => READY_A::DISABLED, + true => READY_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == READY_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == READY_A::ENABLED + } +} +#[doc = "Write '1' to disable interrupt for event READY\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum READY_AW { + #[doc = "1: Disable"] + CLEAR = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: READY_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `READY` writer - Write '1' to disable interrupt for event READY"] +pub type READY_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENCLR_SPEC, READY_AW, O>; +impl<'a, const O: u8> READY_W<'a, O> { + #[doc = "Disable"] + #[inline(always)] + pub fn clear(self) -> &'a mut W { + self.variant(READY_AW::CLEAR) + } +} +#[doc = "Field `DOWN` reader - Write '1' to disable interrupt for event DOWN"] +pub type DOWN_R = crate::BitReader; +#[doc = "Write '1' to disable interrupt for event DOWN\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum DOWN_A { + #[doc = "0: Read: Disabled"] + DISABLED = 0, + #[doc = "1: Read: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: DOWN_A) -> Self { + variant as u8 != 0 + } +} +impl DOWN_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> DOWN_A { + match self.bits { + false => DOWN_A::DISABLED, + true => DOWN_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == DOWN_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == DOWN_A::ENABLED + } +} +#[doc = "Write '1' to disable interrupt for event DOWN\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum DOWN_AW { + #[doc = "1: Disable"] + CLEAR = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: DOWN_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `DOWN` writer - Write '1' to disable interrupt for event DOWN"] +pub type DOWN_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENCLR_SPEC, DOWN_AW, O>; +impl<'a, const O: u8> DOWN_W<'a, O> { + #[doc = "Disable"] + #[inline(always)] + pub fn clear(self) -> &'a mut W { + self.variant(DOWN_AW::CLEAR) + } +} +#[doc = "Field `UP` reader - Write '1' to disable interrupt for event UP"] +pub type UP_R = crate::BitReader; +#[doc = "Write '1' to disable interrupt for event UP\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum UP_A { + #[doc = "0: Read: Disabled"] + DISABLED = 0, + #[doc = "1: Read: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: UP_A) -> Self { + variant as u8 != 0 + } +} +impl UP_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> UP_A { + match self.bits { + false => UP_A::DISABLED, + true => UP_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == UP_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == UP_A::ENABLED + } +} +#[doc = "Write '1' to disable interrupt for event UP\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum UP_AW { + #[doc = "1: Disable"] + CLEAR = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: UP_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `UP` writer - Write '1' to disable interrupt for event UP"] +pub type UP_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENCLR_SPEC, UP_AW, O>; +impl<'a, const O: u8> UP_W<'a, O> { + #[doc = "Disable"] + #[inline(always)] + pub fn clear(self) -> &'a mut W { + self.variant(UP_AW::CLEAR) + } +} +#[doc = "Field `CROSS` reader - Write '1' to disable interrupt for event CROSS"] +pub type CROSS_R = crate::BitReader; +#[doc = "Write '1' to disable interrupt for event CROSS\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum CROSS_A { + #[doc = "0: Read: Disabled"] + DISABLED = 0, + #[doc = "1: Read: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: CROSS_A) -> Self { + variant as u8 != 0 + } +} +impl CROSS_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> CROSS_A { + match self.bits { + false => CROSS_A::DISABLED, + true => CROSS_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == CROSS_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == CROSS_A::ENABLED + } +} +#[doc = "Write '1' to disable interrupt for event CROSS\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum CROSS_AW { + #[doc = "1: Disable"] + CLEAR = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: CROSS_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `CROSS` writer - Write '1' to disable interrupt for event CROSS"] +pub type CROSS_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENCLR_SPEC, CROSS_AW, O>; +impl<'a, const O: u8> CROSS_W<'a, O> { + #[doc = "Disable"] + #[inline(always)] + pub fn clear(self) -> &'a mut W { + self.variant(CROSS_AW::CLEAR) + } +} +impl R { + #[doc = "Bit 0 - Write '1' to disable interrupt for event READY"] + #[inline(always)] + pub fn ready(&self) -> READY_R { + READY_R::new((self.bits & 1) != 0) + } + #[doc = "Bit 1 - Write '1' to disable interrupt for event DOWN"] + #[inline(always)] + pub fn down(&self) -> DOWN_R { + DOWN_R::new(((self.bits >> 1) & 1) != 0) + } + #[doc = "Bit 2 - Write '1' to disable interrupt for event UP"] + #[inline(always)] + pub fn up(&self) -> UP_R { + UP_R::new(((self.bits >> 2) & 1) != 0) + } + #[doc = "Bit 3 - Write '1' to disable interrupt for event CROSS"] + #[inline(always)] + pub fn cross(&self) -> CROSS_R { + CROSS_R::new(((self.bits >> 3) & 1) != 0) + } +} +impl W { + #[doc = "Bit 0 - Write '1' to disable interrupt for event READY"] + #[inline(always)] + #[must_use] + pub fn ready(&mut self) -> READY_W<0> { + READY_W::new(self) + } + #[doc = "Bit 1 - Write '1' to disable interrupt for event DOWN"] + #[inline(always)] + #[must_use] + pub fn down(&mut self) -> DOWN_W<1> { + DOWN_W::new(self) + } + #[doc = "Bit 2 - Write '1' to disable interrupt for event UP"] + #[inline(always)] + #[must_use] + pub fn up(&mut self) -> UP_W<2> { + UP_W::new(self) + } + #[doc = "Bit 3 - Write '1' to disable interrupt for event CROSS"] + #[inline(always)] + #[must_use] + pub fn cross(&mut self) -> CROSS_W<3> { + CROSS_W::new(self) + } + #[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 = "Disable interrupt\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 [intenclr](index.html) module"] +pub struct INTENCLR_SPEC; +impl crate::RegisterSpec for INTENCLR_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [intenclr::R](R) reader structure"] +impl crate::Readable for INTENCLR_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [intenclr::W](W) writer structure"] +impl crate::Writable for INTENCLR_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets INTENCLR to value 0"] +impl crate::Resettable for INTENCLR_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/comp/intenset.rs b/down-the-stack/dk_pac/src/comp/intenset.rs new file mode 100644 index 0000000..362f006 --- /dev/null +++ b/down-the-stack/dk_pac/src/comp/intenset.rs @@ -0,0 +1,337 @@ +#[doc = "Register `INTENSET` 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 `INTENSET` 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 `READY` reader - Write '1' to enable interrupt for event READY"] +pub type READY_R = crate::BitReader; +#[doc = "Write '1' to enable interrupt for event READY\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum READY_A { + #[doc = "0: Read: Disabled"] + DISABLED = 0, + #[doc = "1: Read: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: READY_A) -> Self { + variant as u8 != 0 + } +} +impl READY_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> READY_A { + match self.bits { + false => READY_A::DISABLED, + true => READY_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == READY_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == READY_A::ENABLED + } +} +#[doc = "Write '1' to enable interrupt for event READY\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum READY_AW { + #[doc = "1: Enable"] + SET = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: READY_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `READY` writer - Write '1' to enable interrupt for event READY"] +pub type READY_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENSET_SPEC, READY_AW, O>; +impl<'a, const O: u8> READY_W<'a, O> { + #[doc = "Enable"] + #[inline(always)] + pub fn set(self) -> &'a mut W { + self.variant(READY_AW::SET) + } +} +#[doc = "Field `DOWN` reader - Write '1' to enable interrupt for event DOWN"] +pub type DOWN_R = crate::BitReader; +#[doc = "Write '1' to enable interrupt for event DOWN\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum DOWN_A { + #[doc = "0: Read: Disabled"] + DISABLED = 0, + #[doc = "1: Read: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: DOWN_A) -> Self { + variant as u8 != 0 + } +} +impl DOWN_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> DOWN_A { + match self.bits { + false => DOWN_A::DISABLED, + true => DOWN_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == DOWN_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == DOWN_A::ENABLED + } +} +#[doc = "Write '1' to enable interrupt for event DOWN\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum DOWN_AW { + #[doc = "1: Enable"] + SET = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: DOWN_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `DOWN` writer - Write '1' to enable interrupt for event DOWN"] +pub type DOWN_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENSET_SPEC, DOWN_AW, O>; +impl<'a, const O: u8> DOWN_W<'a, O> { + #[doc = "Enable"] + #[inline(always)] + pub fn set(self) -> &'a mut W { + self.variant(DOWN_AW::SET) + } +} +#[doc = "Field `UP` reader - Write '1' to enable interrupt for event UP"] +pub type UP_R = crate::BitReader; +#[doc = "Write '1' to enable interrupt for event UP\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum UP_A { + #[doc = "0: Read: Disabled"] + DISABLED = 0, + #[doc = "1: Read: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: UP_A) -> Self { + variant as u8 != 0 + } +} +impl UP_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> UP_A { + match self.bits { + false => UP_A::DISABLED, + true => UP_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == UP_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == UP_A::ENABLED + } +} +#[doc = "Write '1' to enable interrupt for event UP\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum UP_AW { + #[doc = "1: Enable"] + SET = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: UP_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `UP` writer - Write '1' to enable interrupt for event UP"] +pub type UP_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENSET_SPEC, UP_AW, O>; +impl<'a, const O: u8> UP_W<'a, O> { + #[doc = "Enable"] + #[inline(always)] + pub fn set(self) -> &'a mut W { + self.variant(UP_AW::SET) + } +} +#[doc = "Field `CROSS` reader - Write '1' to enable interrupt for event CROSS"] +pub type CROSS_R = crate::BitReader; +#[doc = "Write '1' to enable interrupt for event CROSS\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum CROSS_A { + #[doc = "0: Read: Disabled"] + DISABLED = 0, + #[doc = "1: Read: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: CROSS_A) -> Self { + variant as u8 != 0 + } +} +impl CROSS_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> CROSS_A { + match self.bits { + false => CROSS_A::DISABLED, + true => CROSS_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == CROSS_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == CROSS_A::ENABLED + } +} +#[doc = "Write '1' to enable interrupt for event CROSS\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum CROSS_AW { + #[doc = "1: Enable"] + SET = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: CROSS_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `CROSS` writer - Write '1' to enable interrupt for event CROSS"] +pub type CROSS_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENSET_SPEC, CROSS_AW, O>; +impl<'a, const O: u8> CROSS_W<'a, O> { + #[doc = "Enable"] + #[inline(always)] + pub fn set(self) -> &'a mut W { + self.variant(CROSS_AW::SET) + } +} +impl R { + #[doc = "Bit 0 - Write '1' to enable interrupt for event READY"] + #[inline(always)] + pub fn ready(&self) -> READY_R { + READY_R::new((self.bits & 1) != 0) + } + #[doc = "Bit 1 - Write '1' to enable interrupt for event DOWN"] + #[inline(always)] + pub fn down(&self) -> DOWN_R { + DOWN_R::new(((self.bits >> 1) & 1) != 0) + } + #[doc = "Bit 2 - Write '1' to enable interrupt for event UP"] + #[inline(always)] + pub fn up(&self) -> UP_R { + UP_R::new(((self.bits >> 2) & 1) != 0) + } + #[doc = "Bit 3 - Write '1' to enable interrupt for event CROSS"] + #[inline(always)] + pub fn cross(&self) -> CROSS_R { + CROSS_R::new(((self.bits >> 3) & 1) != 0) + } +} +impl W { + #[doc = "Bit 0 - Write '1' to enable interrupt for event READY"] + #[inline(always)] + #[must_use] + pub fn ready(&mut self) -> READY_W<0> { + READY_W::new(self) + } + #[doc = "Bit 1 - Write '1' to enable interrupt for event DOWN"] + #[inline(always)] + #[must_use] + pub fn down(&mut self) -> DOWN_W<1> { + DOWN_W::new(self) + } + #[doc = "Bit 2 - Write '1' to enable interrupt for event UP"] + #[inline(always)] + #[must_use] + pub fn up(&mut self) -> UP_W<2> { + UP_W::new(self) + } + #[doc = "Bit 3 - Write '1' to enable interrupt for event CROSS"] + #[inline(always)] + #[must_use] + pub fn cross(&mut self) -> CROSS_W<3> { + CROSS_W::new(self) + } + #[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 = "Enable interrupt\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 [intenset](index.html) module"] +pub struct INTENSET_SPEC; +impl crate::RegisterSpec for INTENSET_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [intenset::R](R) reader structure"] +impl crate::Readable for INTENSET_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [intenset::W](W) writer structure"] +impl crate::Writable for INTENSET_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets INTENSET to value 0"] +impl crate::Resettable for INTENSET_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/comp/isource.rs b/down-the-stack/dk_pac/src/comp/isource.rs new file mode 100644 index 0000000..c88b2cf --- /dev/null +++ b/down-the-stack/dk_pac/src/comp/isource.rs @@ -0,0 +1,155 @@ +#[doc = "Register `ISOURCE` 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 `ISOURCE` 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 `ISOURCE` reader - Comparator hysteresis"] +pub type ISOURCE_R = crate::FieldReader; +#[doc = "Comparator hysteresis\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +#[repr(u8)] +pub enum ISOURCE_A { + #[doc = "0: Current source disabled"] + OFF = 0, + #[doc = "1: Current source enabled (+/- 2.5 uA)"] + IEN2M_A5 = 1, + #[doc = "2: Current source enabled (+/- 5 uA)"] + IEN5M_A = 2, + #[doc = "3: Current source enabled (+/- 10 uA)"] + IEN10M_A = 3, +} +impl From for u8 { + #[inline(always)] + fn from(variant: ISOURCE_A) -> Self { + variant as _ + } +} +impl ISOURCE_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> ISOURCE_A { + match self.bits { + 0 => ISOURCE_A::OFF, + 1 => ISOURCE_A::IEN2M_A5, + 2 => ISOURCE_A::IEN5M_A, + 3 => ISOURCE_A::IEN10M_A, + _ => unreachable!(), + } + } + #[doc = "Checks if the value of the field is `OFF`"] + #[inline(always)] + pub fn is_off(&self) -> bool { + *self == ISOURCE_A::OFF + } + #[doc = "Checks if the value of the field is `IEN2M_A5`"] + #[inline(always)] + pub fn is_ien2m_a5(&self) -> bool { + *self == ISOURCE_A::IEN2M_A5 + } + #[doc = "Checks if the value of the field is `IEN5M_A`"] + #[inline(always)] + pub fn is_ien5m_a(&self) -> bool { + *self == ISOURCE_A::IEN5M_A + } + #[doc = "Checks if the value of the field is `IEN10M_A`"] + #[inline(always)] + pub fn is_ien10m_a(&self) -> bool { + *self == ISOURCE_A::IEN10M_A + } +} +#[doc = "Field `ISOURCE` writer - Comparator hysteresis"] +pub type ISOURCE_W<'a, const O: u8> = + crate::FieldWriterSafe<'a, u32, ISOURCE_SPEC, u8, ISOURCE_A, 2, O>; +impl<'a, const O: u8> ISOURCE_W<'a, O> { + #[doc = "Current source disabled"] + #[inline(always)] + pub fn off(self) -> &'a mut W { + self.variant(ISOURCE_A::OFF) + } + #[doc = "Current source enabled (+/- 2.5 uA)"] + #[inline(always)] + pub fn ien2m_a5(self) -> &'a mut W { + self.variant(ISOURCE_A::IEN2M_A5) + } + #[doc = "Current source enabled (+/- 5 uA)"] + #[inline(always)] + pub fn ien5m_a(self) -> &'a mut W { + self.variant(ISOURCE_A::IEN5M_A) + } + #[doc = "Current source enabled (+/- 10 uA)"] + #[inline(always)] + pub fn ien10m_a(self) -> &'a mut W { + self.variant(ISOURCE_A::IEN10M_A) + } +} +impl R { + #[doc = "Bits 0:1 - Comparator hysteresis"] + #[inline(always)] + pub fn isource(&self) -> ISOURCE_R { + ISOURCE_R::new((self.bits & 3) as u8) + } +} +impl W { + #[doc = "Bits 0:1 - Comparator hysteresis"] + #[inline(always)] + #[must_use] + pub fn isource(&mut self) -> ISOURCE_W<0> { + ISOURCE_W::new(self) + } + #[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 = "Current source select on analog input\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 [isource](index.html) module"] +pub struct ISOURCE_SPEC; +impl crate::RegisterSpec for ISOURCE_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [isource::R](R) reader structure"] +impl crate::Readable for ISOURCE_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [isource::W](W) writer structure"] +impl crate::Writable for ISOURCE_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets ISOURCE to value 0"] +impl crate::Resettable for ISOURCE_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/comp/mode.rs b/down-the-stack/dk_pac/src/comp/mode.rs new file mode 100644 index 0000000..4ac906d --- /dev/null +++ b/down-the-stack/dk_pac/src/comp/mode.rs @@ -0,0 +1,202 @@ +#[doc = "Register `MODE` 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 `MODE` 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 `SP` reader - Speed and power modes"] +pub type SP_R = crate::FieldReader; +#[doc = "Speed and power modes\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +#[repr(u8)] +pub enum SP_A { + #[doc = "0: Low-power mode"] + LOW = 0, + #[doc = "1: Normal mode"] + NORMAL = 1, + #[doc = "2: High-speed mode"] + HIGH = 2, +} +impl From for u8 { + #[inline(always)] + fn from(variant: SP_A) -> Self { + variant as _ + } +} +impl SP_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> Option { + match self.bits { + 0 => Some(SP_A::LOW), + 1 => Some(SP_A::NORMAL), + 2 => Some(SP_A::HIGH), + _ => None, + } + } + #[doc = "Checks if the value of the field is `LOW`"] + #[inline(always)] + pub fn is_low(&self) -> bool { + *self == SP_A::LOW + } + #[doc = "Checks if the value of the field is `NORMAL`"] + #[inline(always)] + pub fn is_normal(&self) -> bool { + *self == SP_A::NORMAL + } + #[doc = "Checks if the value of the field is `HIGH`"] + #[inline(always)] + pub fn is_high(&self) -> bool { + *self == SP_A::HIGH + } +} +#[doc = "Field `SP` writer - Speed and power modes"] +pub type SP_W<'a, const O: u8> = crate::FieldWriter<'a, u32, MODE_SPEC, u8, SP_A, 2, O>; +impl<'a, const O: u8> SP_W<'a, O> { + #[doc = "Low-power mode"] + #[inline(always)] + pub fn low(self) -> &'a mut W { + self.variant(SP_A::LOW) + } + #[doc = "Normal mode"] + #[inline(always)] + pub fn normal(self) -> &'a mut W { + self.variant(SP_A::NORMAL) + } + #[doc = "High-speed mode"] + #[inline(always)] + pub fn high(self) -> &'a mut W { + self.variant(SP_A::HIGH) + } +} +#[doc = "Field `MAIN` reader - Main operation modes"] +pub type MAIN_R = crate::BitReader; +#[doc = "Main operation modes\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum MAIN_A { + #[doc = "0: Single-ended mode"] + SE = 0, + #[doc = "1: Differential mode"] + DIFF = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: MAIN_A) -> Self { + variant as u8 != 0 + } +} +impl MAIN_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> MAIN_A { + match self.bits { + false => MAIN_A::SE, + true => MAIN_A::DIFF, + } + } + #[doc = "Checks if the value of the field is `SE`"] + #[inline(always)] + pub fn is_se(&self) -> bool { + *self == MAIN_A::SE + } + #[doc = "Checks if the value of the field is `DIFF`"] + #[inline(always)] + pub fn is_diff(&self) -> bool { + *self == MAIN_A::DIFF + } +} +#[doc = "Field `MAIN` writer - Main operation modes"] +pub type MAIN_W<'a, const O: u8> = crate::BitWriter<'a, u32, MODE_SPEC, MAIN_A, O>; +impl<'a, const O: u8> MAIN_W<'a, O> { + #[doc = "Single-ended mode"] + #[inline(always)] + pub fn se(self) -> &'a mut W { + self.variant(MAIN_A::SE) + } + #[doc = "Differential mode"] + #[inline(always)] + pub fn diff(self) -> &'a mut W { + self.variant(MAIN_A::DIFF) + } +} +impl R { + #[doc = "Bits 0:1 - Speed and power modes"] + #[inline(always)] + pub fn sp(&self) -> SP_R { + SP_R::new((self.bits & 3) as u8) + } + #[doc = "Bit 8 - Main operation modes"] + #[inline(always)] + pub fn main(&self) -> MAIN_R { + MAIN_R::new(((self.bits >> 8) & 1) != 0) + } +} +impl W { + #[doc = "Bits 0:1 - Speed and power modes"] + #[inline(always)] + #[must_use] + pub fn sp(&mut self) -> SP_W<0> { + SP_W::new(self) + } + #[doc = "Bit 8 - Main operation modes"] + #[inline(always)] + #[must_use] + pub fn main(&mut self) -> MAIN_W<8> { + MAIN_W::new(self) + } + #[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 = "Mode configuration\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 [mode](index.html) module"] +pub struct MODE_SPEC; +impl crate::RegisterSpec for MODE_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [mode::R](R) reader structure"] +impl crate::Readable for MODE_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [mode::W](W) writer structure"] +impl crate::Writable for 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 MODE to value 0"] +impl crate::Resettable for MODE_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/comp/psel.rs b/down-the-stack/dk_pac/src/comp/psel.rs new file mode 100644 index 0000000..821771e --- /dev/null +++ b/down-the-stack/dk_pac/src/comp/psel.rs @@ -0,0 +1,206 @@ +#[doc = "Register `PSEL` 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 `PSEL` 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 `PSEL` reader - Analog pin select"] +pub type PSEL_R = crate::FieldReader; +#[doc = "Analog pin select\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +#[repr(u8)] +pub enum PSEL_A { + #[doc = "0: AIN0 selected as analog input"] + ANALOG_INPUT0 = 0, + #[doc = "1: AIN1 selected as analog input"] + ANALOG_INPUT1 = 1, + #[doc = "2: AIN2 selected as analog input"] + ANALOG_INPUT2 = 2, + #[doc = "3: AIN3 selected as analog input"] + ANALOG_INPUT3 = 3, + #[doc = "4: AIN4 selected as analog input"] + ANALOG_INPUT4 = 4, + #[doc = "5: AIN5 selected as analog input"] + ANALOG_INPUT5 = 5, + #[doc = "6: AIN6 selected as analog input"] + ANALOG_INPUT6 = 6, + #[doc = "7: AIN7 selected as analog input"] + ANALOG_INPUT7 = 7, +} +impl From for u8 { + #[inline(always)] + fn from(variant: PSEL_A) -> Self { + variant as _ + } +} +impl PSEL_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> PSEL_A { + match self.bits { + 0 => PSEL_A::ANALOG_INPUT0, + 1 => PSEL_A::ANALOG_INPUT1, + 2 => PSEL_A::ANALOG_INPUT2, + 3 => PSEL_A::ANALOG_INPUT3, + 4 => PSEL_A::ANALOG_INPUT4, + 5 => PSEL_A::ANALOG_INPUT5, + 6 => PSEL_A::ANALOG_INPUT6, + 7 => PSEL_A::ANALOG_INPUT7, + _ => unreachable!(), + } + } + #[doc = "Checks if the value of the field is `ANALOG_INPUT0`"] + #[inline(always)] + pub fn is_analog_input0(&self) -> bool { + *self == PSEL_A::ANALOG_INPUT0 + } + #[doc = "Checks if the value of the field is `ANALOG_INPUT1`"] + #[inline(always)] + pub fn is_analog_input1(&self) -> bool { + *self == PSEL_A::ANALOG_INPUT1 + } + #[doc = "Checks if the value of the field is `ANALOG_INPUT2`"] + #[inline(always)] + pub fn is_analog_input2(&self) -> bool { + *self == PSEL_A::ANALOG_INPUT2 + } + #[doc = "Checks if the value of the field is `ANALOG_INPUT3`"] + #[inline(always)] + pub fn is_analog_input3(&self) -> bool { + *self == PSEL_A::ANALOG_INPUT3 + } + #[doc = "Checks if the value of the field is `ANALOG_INPUT4`"] + #[inline(always)] + pub fn is_analog_input4(&self) -> bool { + *self == PSEL_A::ANALOG_INPUT4 + } + #[doc = "Checks if the value of the field is `ANALOG_INPUT5`"] + #[inline(always)] + pub fn is_analog_input5(&self) -> bool { + *self == PSEL_A::ANALOG_INPUT5 + } + #[doc = "Checks if the value of the field is `ANALOG_INPUT6`"] + #[inline(always)] + pub fn is_analog_input6(&self) -> bool { + *self == PSEL_A::ANALOG_INPUT6 + } + #[doc = "Checks if the value of the field is `ANALOG_INPUT7`"] + #[inline(always)] + pub fn is_analog_input7(&self) -> bool { + *self == PSEL_A::ANALOG_INPUT7 + } +} +#[doc = "Field `PSEL` writer - Analog pin select"] +pub type PSEL_W<'a, const O: u8> = crate::FieldWriterSafe<'a, u32, PSEL_SPEC, u8, PSEL_A, 3, O>; +impl<'a, const O: u8> PSEL_W<'a, O> { + #[doc = "AIN0 selected as analog input"] + #[inline(always)] + pub fn analog_input0(self) -> &'a mut W { + self.variant(PSEL_A::ANALOG_INPUT0) + } + #[doc = "AIN1 selected as analog input"] + #[inline(always)] + pub fn analog_input1(self) -> &'a mut W { + self.variant(PSEL_A::ANALOG_INPUT1) + } + #[doc = "AIN2 selected as analog input"] + #[inline(always)] + pub fn analog_input2(self) -> &'a mut W { + self.variant(PSEL_A::ANALOG_INPUT2) + } + #[doc = "AIN3 selected as analog input"] + #[inline(always)] + pub fn analog_input3(self) -> &'a mut W { + self.variant(PSEL_A::ANALOG_INPUT3) + } + #[doc = "AIN4 selected as analog input"] + #[inline(always)] + pub fn analog_input4(self) -> &'a mut W { + self.variant(PSEL_A::ANALOG_INPUT4) + } + #[doc = "AIN5 selected as analog input"] + #[inline(always)] + pub fn analog_input5(self) -> &'a mut W { + self.variant(PSEL_A::ANALOG_INPUT5) + } + #[doc = "AIN6 selected as analog input"] + #[inline(always)] + pub fn analog_input6(self) -> &'a mut W { + self.variant(PSEL_A::ANALOG_INPUT6) + } + #[doc = "AIN7 selected as analog input"] + #[inline(always)] + pub fn analog_input7(self) -> &'a mut W { + self.variant(PSEL_A::ANALOG_INPUT7) + } +} +impl R { + #[doc = "Bits 0:2 - Analog pin select"] + #[inline(always)] + pub fn psel(&self) -> PSEL_R { + PSEL_R::new((self.bits & 7) as u8) + } +} +impl W { + #[doc = "Bits 0:2 - Analog pin select"] + #[inline(always)] + #[must_use] + pub fn psel(&mut self) -> PSEL_W<0> { + PSEL_W::new(self) + } + #[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 = "Pin select\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 [psel](index.html) module"] +pub struct PSEL_SPEC; +impl crate::RegisterSpec for PSEL_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [psel::R](R) reader structure"] +impl crate::Readable for PSEL_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [psel::W](W) writer structure"] +impl crate::Writable for PSEL_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets PSEL to value 0"] +impl crate::Resettable for PSEL_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/comp/refsel.rs b/down-the-stack/dk_pac/src/comp/refsel.rs new file mode 100644 index 0000000..d937dc5 --- /dev/null +++ b/down-the-stack/dk_pac/src/comp/refsel.rs @@ -0,0 +1,167 @@ +#[doc = "Register `REFSEL` 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 `REFSEL` 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 `REFSEL` reader - Reference select"] +pub type REFSEL_R = crate::FieldReader; +#[doc = "Reference select\n\nValue on reset: 4"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +#[repr(u8)] +pub enum REFSEL_A { + #[doc = "0: VREF = internal 1.2 V reference (VDD >= 1.7 V)"] + INT1V2 = 0, + #[doc = "1: VREF = internal 1.8 V reference (VDD >= VREF + 0.2 V)"] + INT1V8 = 1, + #[doc = "2: VREF = internal 2.4 V reference (VDD >= VREF + 0.2 V)"] + INT2V4 = 2, + #[doc = "4: VREF = VDD"] + VDD = 4, + #[doc = "7: VREF = AREF (VDD >= VREF >= AREFMIN)"] + AREF = 7, +} +impl From for u8 { + #[inline(always)] + fn from(variant: REFSEL_A) -> Self { + variant as _ + } +} +impl REFSEL_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> Option { + match self.bits { + 0 => Some(REFSEL_A::INT1V2), + 1 => Some(REFSEL_A::INT1V8), + 2 => Some(REFSEL_A::INT2V4), + 4 => Some(REFSEL_A::VDD), + 7 => Some(REFSEL_A::AREF), + _ => None, + } + } + #[doc = "Checks if the value of the field is `INT1V2`"] + #[inline(always)] + pub fn is_int1v2(&self) -> bool { + *self == REFSEL_A::INT1V2 + } + #[doc = "Checks if the value of the field is `INT1V8`"] + #[inline(always)] + pub fn is_int1v8(&self) -> bool { + *self == REFSEL_A::INT1V8 + } + #[doc = "Checks if the value of the field is `INT2V4`"] + #[inline(always)] + pub fn is_int2v4(&self) -> bool { + *self == REFSEL_A::INT2V4 + } + #[doc = "Checks if the value of the field is `VDD`"] + #[inline(always)] + pub fn is_vdd(&self) -> bool { + *self == REFSEL_A::VDD + } + #[doc = "Checks if the value of the field is `AREF`"] + #[inline(always)] + pub fn is_aref(&self) -> bool { + *self == REFSEL_A::AREF + } +} +#[doc = "Field `REFSEL` writer - Reference select"] +pub type REFSEL_W<'a, const O: u8> = crate::FieldWriter<'a, u32, REFSEL_SPEC, u8, REFSEL_A, 3, O>; +impl<'a, const O: u8> REFSEL_W<'a, O> { + #[doc = "VREF = internal 1.2 V reference (VDD >= 1.7 V)"] + #[inline(always)] + pub fn int1v2(self) -> &'a mut W { + self.variant(REFSEL_A::INT1V2) + } + #[doc = "VREF = internal 1.8 V reference (VDD >= VREF + 0.2 V)"] + #[inline(always)] + pub fn int1v8(self) -> &'a mut W { + self.variant(REFSEL_A::INT1V8) + } + #[doc = "VREF = internal 2.4 V reference (VDD >= VREF + 0.2 V)"] + #[inline(always)] + pub fn int2v4(self) -> &'a mut W { + self.variant(REFSEL_A::INT2V4) + } + #[doc = "VREF = VDD"] + #[inline(always)] + pub fn vdd(self) -> &'a mut W { + self.variant(REFSEL_A::VDD) + } + #[doc = "VREF = AREF (VDD >= VREF >= AREFMIN)"] + #[inline(always)] + pub fn aref(self) -> &'a mut W { + self.variant(REFSEL_A::AREF) + } +} +impl R { + #[doc = "Bits 0:2 - Reference select"] + #[inline(always)] + pub fn refsel(&self) -> REFSEL_R { + REFSEL_R::new((self.bits & 7) as u8) + } +} +impl W { + #[doc = "Bits 0:2 - Reference select"] + #[inline(always)] + #[must_use] + pub fn refsel(&mut self) -> REFSEL_W<0> { + REFSEL_W::new(self) + } + #[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 = "Reference source select for single-ended mode\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 [refsel](index.html) module"] +pub struct REFSEL_SPEC; +impl crate::RegisterSpec for REFSEL_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [refsel::R](R) reader structure"] +impl crate::Readable for REFSEL_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [refsel::W](W) writer structure"] +impl crate::Writable for REFSEL_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets REFSEL to value 0x04"] +impl crate::Resettable for REFSEL_SPEC { + const RESET_VALUE: Self::Ux = 0x04; +} diff --git a/down-the-stack/dk_pac/src/comp/result.rs b/down-the-stack/dk_pac/src/comp/result.rs new file mode 100644 index 0000000..3a306c1 --- /dev/null +++ b/down-the-stack/dk_pac/src/comp/result.rs @@ -0,0 +1,71 @@ +#[doc = "Register `RESULT` 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 = "Field `RESULT` reader - Result of last compare. Decision point SAMPLE task."] +pub type RESULT_R = crate::BitReader; +#[doc = "Result of last compare. Decision point SAMPLE task.\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum RESULT_A { + #[doc = "0: Input voltage is below the threshold (VIN+ < VIN-)"] + BELOW = 0, + #[doc = "1: Input voltage is above the threshold (VIN+ > VIN-)"] + ABOVE = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: RESULT_A) -> Self { + variant as u8 != 0 + } +} +impl RESULT_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> RESULT_A { + match self.bits { + false => RESULT_A::BELOW, + true => RESULT_A::ABOVE, + } + } + #[doc = "Checks if the value of the field is `BELOW`"] + #[inline(always)] + pub fn is_below(&self) -> bool { + *self == RESULT_A::BELOW + } + #[doc = "Checks if the value of the field is `ABOVE`"] + #[inline(always)] + pub fn is_above(&self) -> bool { + *self == RESULT_A::ABOVE + } +} +impl R { + #[doc = "Bit 0 - Result of last compare. Decision point SAMPLE task."] + #[inline(always)] + pub fn result(&self) -> RESULT_R { + RESULT_R::new((self.bits & 1) != 0) + } +} +#[doc = "Compare 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 [result](index.html) module"] +pub struct RESULT_SPEC; +impl crate::RegisterSpec for RESULT_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [result::R](R) reader structure"] +impl crate::Readable for RESULT_SPEC { + type Reader = R; +} +#[doc = "`reset()` method sets RESULT to value 0"] +impl crate::Resettable for RESULT_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/comp/shorts.rs b/down-the-stack/dk_pac/src/comp/shorts.rs new file mode 100644 index 0000000..ddbbc06 --- /dev/null +++ b/down-the-stack/dk_pac/src/comp/shorts.rs @@ -0,0 +1,371 @@ +#[doc = "Register `SHORTS` 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 `SHORTS` 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 `READY_SAMPLE` reader - Shortcut between event READY and task SAMPLE"] +pub type READY_SAMPLE_R = crate::BitReader; +#[doc = "Shortcut between event READY and task SAMPLE\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum READY_SAMPLE_A { + #[doc = "0: Disable shortcut"] + DISABLED = 0, + #[doc = "1: Enable shortcut"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: READY_SAMPLE_A) -> Self { + variant as u8 != 0 + } +} +impl READY_SAMPLE_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> READY_SAMPLE_A { + match self.bits { + false => READY_SAMPLE_A::DISABLED, + true => READY_SAMPLE_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == READY_SAMPLE_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == READY_SAMPLE_A::ENABLED + } +} +#[doc = "Field `READY_SAMPLE` writer - Shortcut between event READY and task SAMPLE"] +pub type READY_SAMPLE_W<'a, const O: u8> = + crate::BitWriter<'a, u32, SHORTS_SPEC, READY_SAMPLE_A, O>; +impl<'a, const O: u8> READY_SAMPLE_W<'a, O> { + #[doc = "Disable shortcut"] + #[inline(always)] + pub fn disabled(self) -> &'a mut W { + self.variant(READY_SAMPLE_A::DISABLED) + } + #[doc = "Enable shortcut"] + #[inline(always)] + pub fn enabled(self) -> &'a mut W { + self.variant(READY_SAMPLE_A::ENABLED) + } +} +#[doc = "Field `READY_STOP` reader - Shortcut between event READY and task STOP"] +pub type READY_STOP_R = crate::BitReader; +#[doc = "Shortcut between event READY and task STOP\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum READY_STOP_A { + #[doc = "0: Disable shortcut"] + DISABLED = 0, + #[doc = "1: Enable shortcut"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: READY_STOP_A) -> Self { + variant as u8 != 0 + } +} +impl READY_STOP_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> READY_STOP_A { + match self.bits { + false => READY_STOP_A::DISABLED, + true => READY_STOP_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == READY_STOP_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == READY_STOP_A::ENABLED + } +} +#[doc = "Field `READY_STOP` writer - Shortcut between event READY and task STOP"] +pub type READY_STOP_W<'a, const O: u8> = crate::BitWriter<'a, u32, SHORTS_SPEC, READY_STOP_A, O>; +impl<'a, const O: u8> READY_STOP_W<'a, O> { + #[doc = "Disable shortcut"] + #[inline(always)] + pub fn disabled(self) -> &'a mut W { + self.variant(READY_STOP_A::DISABLED) + } + #[doc = "Enable shortcut"] + #[inline(always)] + pub fn enabled(self) -> &'a mut W { + self.variant(READY_STOP_A::ENABLED) + } +} +#[doc = "Field `DOWN_STOP` reader - Shortcut between event DOWN and task STOP"] +pub type DOWN_STOP_R = crate::BitReader; +#[doc = "Shortcut between event DOWN and task STOP\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum DOWN_STOP_A { + #[doc = "0: Disable shortcut"] + DISABLED = 0, + #[doc = "1: Enable shortcut"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: DOWN_STOP_A) -> Self { + variant as u8 != 0 + } +} +impl DOWN_STOP_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> DOWN_STOP_A { + match self.bits { + false => DOWN_STOP_A::DISABLED, + true => DOWN_STOP_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == DOWN_STOP_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == DOWN_STOP_A::ENABLED + } +} +#[doc = "Field `DOWN_STOP` writer - Shortcut between event DOWN and task STOP"] +pub type DOWN_STOP_W<'a, const O: u8> = crate::BitWriter<'a, u32, SHORTS_SPEC, DOWN_STOP_A, O>; +impl<'a, const O: u8> DOWN_STOP_W<'a, O> { + #[doc = "Disable shortcut"] + #[inline(always)] + pub fn disabled(self) -> &'a mut W { + self.variant(DOWN_STOP_A::DISABLED) + } + #[doc = "Enable shortcut"] + #[inline(always)] + pub fn enabled(self) -> &'a mut W { + self.variant(DOWN_STOP_A::ENABLED) + } +} +#[doc = "Field `UP_STOP` reader - Shortcut between event UP and task STOP"] +pub type UP_STOP_R = crate::BitReader; +#[doc = "Shortcut between event UP and task STOP\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum UP_STOP_A { + #[doc = "0: Disable shortcut"] + DISABLED = 0, + #[doc = "1: Enable shortcut"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: UP_STOP_A) -> Self { + variant as u8 != 0 + } +} +impl UP_STOP_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> UP_STOP_A { + match self.bits { + false => UP_STOP_A::DISABLED, + true => UP_STOP_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == UP_STOP_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == UP_STOP_A::ENABLED + } +} +#[doc = "Field `UP_STOP` writer - Shortcut between event UP and task STOP"] +pub type UP_STOP_W<'a, const O: u8> = crate::BitWriter<'a, u32, SHORTS_SPEC, UP_STOP_A, O>; +impl<'a, const O: u8> UP_STOP_W<'a, O> { + #[doc = "Disable shortcut"] + #[inline(always)] + pub fn disabled(self) -> &'a mut W { + self.variant(UP_STOP_A::DISABLED) + } + #[doc = "Enable shortcut"] + #[inline(always)] + pub fn enabled(self) -> &'a mut W { + self.variant(UP_STOP_A::ENABLED) + } +} +#[doc = "Field `CROSS_STOP` reader - Shortcut between event CROSS and task STOP"] +pub type CROSS_STOP_R = crate::BitReader; +#[doc = "Shortcut between event CROSS and task STOP\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum CROSS_STOP_A { + #[doc = "0: Disable shortcut"] + DISABLED = 0, + #[doc = "1: Enable shortcut"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: CROSS_STOP_A) -> Self { + variant as u8 != 0 + } +} +impl CROSS_STOP_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> CROSS_STOP_A { + match self.bits { + false => CROSS_STOP_A::DISABLED, + true => CROSS_STOP_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == CROSS_STOP_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == CROSS_STOP_A::ENABLED + } +} +#[doc = "Field `CROSS_STOP` writer - Shortcut between event CROSS and task STOP"] +pub type CROSS_STOP_W<'a, const O: u8> = crate::BitWriter<'a, u32, SHORTS_SPEC, CROSS_STOP_A, O>; +impl<'a, const O: u8> CROSS_STOP_W<'a, O> { + #[doc = "Disable shortcut"] + #[inline(always)] + pub fn disabled(self) -> &'a mut W { + self.variant(CROSS_STOP_A::DISABLED) + } + #[doc = "Enable shortcut"] + #[inline(always)] + pub fn enabled(self) -> &'a mut W { + self.variant(CROSS_STOP_A::ENABLED) + } +} +impl R { + #[doc = "Bit 0 - Shortcut between event READY and task SAMPLE"] + #[inline(always)] + pub fn ready_sample(&self) -> READY_SAMPLE_R { + READY_SAMPLE_R::new((self.bits & 1) != 0) + } + #[doc = "Bit 1 - Shortcut between event READY and task STOP"] + #[inline(always)] + pub fn ready_stop(&self) -> READY_STOP_R { + READY_STOP_R::new(((self.bits >> 1) & 1) != 0) + } + #[doc = "Bit 2 - Shortcut between event DOWN and task STOP"] + #[inline(always)] + pub fn down_stop(&self) -> DOWN_STOP_R { + DOWN_STOP_R::new(((self.bits >> 2) & 1) != 0) + } + #[doc = "Bit 3 - Shortcut between event UP and task STOP"] + #[inline(always)] + pub fn up_stop(&self) -> UP_STOP_R { + UP_STOP_R::new(((self.bits >> 3) & 1) != 0) + } + #[doc = "Bit 4 - Shortcut between event CROSS and task STOP"] + #[inline(always)] + pub fn cross_stop(&self) -> CROSS_STOP_R { + CROSS_STOP_R::new(((self.bits >> 4) & 1) != 0) + } +} +impl W { + #[doc = "Bit 0 - Shortcut between event READY and task SAMPLE"] + #[inline(always)] + #[must_use] + pub fn ready_sample(&mut self) -> READY_SAMPLE_W<0> { + READY_SAMPLE_W::new(self) + } + #[doc = "Bit 1 - Shortcut between event READY and task STOP"] + #[inline(always)] + #[must_use] + pub fn ready_stop(&mut self) -> READY_STOP_W<1> { + READY_STOP_W::new(self) + } + #[doc = "Bit 2 - Shortcut between event DOWN and task STOP"] + #[inline(always)] + #[must_use] + pub fn down_stop(&mut self) -> DOWN_STOP_W<2> { + DOWN_STOP_W::new(self) + } + #[doc = "Bit 3 - Shortcut between event UP and task STOP"] + #[inline(always)] + #[must_use] + pub fn up_stop(&mut self) -> UP_STOP_W<3> { + UP_STOP_W::new(self) + } + #[doc = "Bit 4 - Shortcut between event CROSS and task STOP"] + #[inline(always)] + #[must_use] + pub fn cross_stop(&mut self) -> CROSS_STOP_W<4> { + CROSS_STOP_W::new(self) + } + #[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 = "Shortcuts between local events and tasks\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 [shorts](index.html) module"] +pub struct SHORTS_SPEC; +impl crate::RegisterSpec for SHORTS_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [shorts::R](R) reader structure"] +impl crate::Readable for SHORTS_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [shorts::W](W) writer structure"] +impl crate::Writable for SHORTS_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets SHORTS to value 0"] +impl crate::Resettable for SHORTS_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/comp/tasks_sample.rs b/down-the-stack/dk_pac/src/comp/tasks_sample.rs new file mode 100644 index 0000000..d0ef589 --- /dev/null +++ b/down-the-stack/dk_pac/src/comp/tasks_sample.rs @@ -0,0 +1,72 @@ +#[doc = "Register `TASKS_SAMPLE` 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 = "Sample comparator value\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum TASKS_SAMPLE_AW { + #[doc = "1: Trigger task"] + TRIGGER = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: TASKS_SAMPLE_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `TASKS_SAMPLE` writer - Sample comparator value"] +pub type TASKS_SAMPLE_W<'a, const O: u8> = + crate::BitWriter<'a, u32, TASKS_SAMPLE_SPEC, TASKS_SAMPLE_AW, O>; +impl<'a, const O: u8> TASKS_SAMPLE_W<'a, O> { + #[doc = "Trigger task"] + #[inline(always)] + pub fn trigger(self) -> &'a mut W { + self.variant(TASKS_SAMPLE_AW::TRIGGER) + } +} +impl W { + #[doc = "Bit 0 - Sample comparator value"] + #[inline(always)] + #[must_use] + pub fn tasks_sample(&mut self) -> TASKS_SAMPLE_W<0> { + TASKS_SAMPLE_W::new(self) + } + #[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 = "Sample comparator value\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 [tasks_sample](index.html) module"] +pub struct TASKS_SAMPLE_SPEC; +impl crate::RegisterSpec for TASKS_SAMPLE_SPEC { + type Ux = u32; +} +#[doc = "`write(|w| ..)` method takes [tasks_sample::W](W) writer structure"] +impl crate::Writable for TASKS_SAMPLE_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets TASKS_SAMPLE to value 0"] +impl crate::Resettable for TASKS_SAMPLE_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/comp/tasks_start.rs b/down-the-stack/dk_pac/src/comp/tasks_start.rs new file mode 100644 index 0000000..60fdc8e --- /dev/null +++ b/down-the-stack/dk_pac/src/comp/tasks_start.rs @@ -0,0 +1,72 @@ +#[doc = "Register `TASKS_START` 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 = "Start comparator\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum TASKS_START_AW { + #[doc = "1: Trigger task"] + TRIGGER = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: TASKS_START_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `TASKS_START` writer - Start comparator"] +pub type TASKS_START_W<'a, const O: u8> = + crate::BitWriter<'a, u32, TASKS_START_SPEC, TASKS_START_AW, O>; +impl<'a, const O: u8> TASKS_START_W<'a, O> { + #[doc = "Trigger task"] + #[inline(always)] + pub fn trigger(self) -> &'a mut W { + self.variant(TASKS_START_AW::TRIGGER) + } +} +impl W { + #[doc = "Bit 0 - Start comparator"] + #[inline(always)] + #[must_use] + pub fn tasks_start(&mut self) -> TASKS_START_W<0> { + TASKS_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 + } +} +#[doc = "Start comparator\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 [tasks_start](index.html) module"] +pub struct TASKS_START_SPEC; +impl crate::RegisterSpec for TASKS_START_SPEC { + type Ux = u32; +} +#[doc = "`write(|w| ..)` method takes [tasks_start::W](W) writer structure"] +impl crate::Writable for TASKS_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 TASKS_START to value 0"] +impl crate::Resettable for TASKS_START_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/comp/tasks_stop.rs b/down-the-stack/dk_pac/src/comp/tasks_stop.rs new file mode 100644 index 0000000..dd80ae5 --- /dev/null +++ b/down-the-stack/dk_pac/src/comp/tasks_stop.rs @@ -0,0 +1,72 @@ +#[doc = "Register `TASKS_STOP` 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 = "Stop comparator\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum TASKS_STOP_AW { + #[doc = "1: Trigger task"] + TRIGGER = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: TASKS_STOP_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `TASKS_STOP` writer - Stop comparator"] +pub type TASKS_STOP_W<'a, const O: u8> = + crate::BitWriter<'a, u32, TASKS_STOP_SPEC, TASKS_STOP_AW, O>; +impl<'a, const O: u8> TASKS_STOP_W<'a, O> { + #[doc = "Trigger task"] + #[inline(always)] + pub fn trigger(self) -> &'a mut W { + self.variant(TASKS_STOP_AW::TRIGGER) + } +} +impl W { + #[doc = "Bit 0 - Stop comparator"] + #[inline(always)] + #[must_use] + pub fn tasks_stop(&mut self) -> TASKS_STOP_W<0> { + TASKS_STOP_W::new(self) + } + #[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 = "Stop comparator\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 [tasks_stop](index.html) module"] +pub struct TASKS_STOP_SPEC; +impl crate::RegisterSpec for TASKS_STOP_SPEC { + type Ux = u32; +} +#[doc = "`write(|w| ..)` method takes [tasks_stop::W](W) writer structure"] +impl crate::Writable for TASKS_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 TASKS_STOP to value 0"] +impl crate::Resettable for TASKS_STOP_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/comp/th.rs b/down-the-stack/dk_pac/src/comp/th.rs new file mode 100644 index 0000000..d4a6d13 --- /dev/null +++ b/down-the-stack/dk_pac/src/comp/th.rs @@ -0,0 +1,95 @@ +#[doc = "Register `TH` 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 `TH` 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 `THDOWN` reader - VDOWN = (THDOWN+1)/64*VREF"] +pub type THDOWN_R = crate::FieldReader; +#[doc = "Field `THDOWN` writer - VDOWN = (THDOWN+1)/64*VREF"] +pub type THDOWN_W<'a, const O: u8> = crate::FieldWriter<'a, u32, TH_SPEC, u8, u8, 6, O>; +#[doc = "Field `THUP` reader - VUP = (THUP+1)/64*VREF"] +pub type THUP_R = crate::FieldReader; +#[doc = "Field `THUP` writer - VUP = (THUP+1)/64*VREF"] +pub type THUP_W<'a, const O: u8> = crate::FieldWriter<'a, u32, TH_SPEC, u8, u8, 6, O>; +impl R { + #[doc = "Bits 0:5 - VDOWN = (THDOWN+1)/64*VREF"] + #[inline(always)] + pub fn thdown(&self) -> THDOWN_R { + THDOWN_R::new((self.bits & 0x3f) as u8) + } + #[doc = "Bits 8:13 - VUP = (THUP+1)/64*VREF"] + #[inline(always)] + pub fn thup(&self) -> THUP_R { + THUP_R::new(((self.bits >> 8) & 0x3f) as u8) + } +} +impl W { + #[doc = "Bits 0:5 - VDOWN = (THDOWN+1)/64*VREF"] + #[inline(always)] + #[must_use] + pub fn thdown(&mut self) -> THDOWN_W<0> { + THDOWN_W::new(self) + } + #[doc = "Bits 8:13 - VUP = (THUP+1)/64*VREF"] + #[inline(always)] + #[must_use] + pub fn thup(&mut self) -> THUP_W<8> { + THUP_W::new(self) + } + #[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 = "Threshold configuration for hysteresis unit\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 [th](index.html) module"] +pub struct TH_SPEC; +impl crate::RegisterSpec for TH_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [th::R](R) reader structure"] +impl crate::Readable for TH_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [th::W](W) writer structure"] +impl crate::Writable for TH_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets TH to value 0"] +impl crate::Resettable for TH_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/ecb.rs b/down-the-stack/dk_pac/src/ecb.rs new file mode 100644 index 0000000..985bfce --- /dev/null +++ b/down-the-stack/dk_pac/src/ecb.rs @@ -0,0 +1,49 @@ +#[doc = r"Register block"] +#[repr(C)] +pub struct RegisterBlock { + #[doc = "0x00 - Start ECB block encrypt"] + pub tasks_startecb: TASKS_STARTECB, + #[doc = "0x04 - Abort a possible executing ECB operation"] + pub tasks_stopecb: TASKS_STOPECB, + _reserved2: [u8; 0xf8], + #[doc = "0x100 - ECB block encrypt complete"] + pub events_endecb: EVENTS_ENDECB, + #[doc = "0x104 - ECB block encrypt aborted because of a STOPECB task or due to an error"] + pub events_errorecb: EVENTS_ERRORECB, + _reserved4: [u8; 0x01fc], + #[doc = "0x304 - Enable interrupt"] + pub intenset: INTENSET, + #[doc = "0x308 - Disable interrupt"] + pub intenclr: INTENCLR, + _reserved6: [u8; 0x01f8], + #[doc = "0x504 - ECB block encrypt memory pointers"] + pub ecbdataptr: ECBDATAPTR, +} +#[doc = "TASKS_STARTECB (w) register accessor: an alias for `Reg`"] +pub type TASKS_STARTECB = crate::Reg; +#[doc = "Start ECB block encrypt"] +pub mod tasks_startecb; +#[doc = "TASKS_STOPECB (w) register accessor: an alias for `Reg`"] +pub type TASKS_STOPECB = crate::Reg; +#[doc = "Abort a possible executing ECB operation"] +pub mod tasks_stopecb; +#[doc = "EVENTS_ENDECB (rw) register accessor: an alias for `Reg`"] +pub type EVENTS_ENDECB = crate::Reg; +#[doc = "ECB block encrypt complete"] +pub mod events_endecb; +#[doc = "EVENTS_ERRORECB (rw) register accessor: an alias for `Reg`"] +pub type EVENTS_ERRORECB = crate::Reg; +#[doc = "ECB block encrypt aborted because of a STOPECB task or due to an error"] +pub mod events_errorecb; +#[doc = "INTENSET (rw) register accessor: an alias for `Reg`"] +pub type INTENSET = crate::Reg; +#[doc = "Enable interrupt"] +pub mod intenset; +#[doc = "INTENCLR (rw) register accessor: an alias for `Reg`"] +pub type INTENCLR = crate::Reg; +#[doc = "Disable interrupt"] +pub mod intenclr; +#[doc = "ECBDATAPTR (rw) register accessor: an alias for `Reg`"] +pub type ECBDATAPTR = crate::Reg; +#[doc = "ECB block encrypt memory pointers"] +pub mod ecbdataptr; diff --git a/down-the-stack/dk_pac/src/ecb/ecbdataptr.rs b/down-the-stack/dk_pac/src/ecb/ecbdataptr.rs new file mode 100644 index 0000000..a11cc43 --- /dev/null +++ b/down-the-stack/dk_pac/src/ecb/ecbdataptr.rs @@ -0,0 +1,81 @@ +#[doc = "Register `ECBDATAPTR` 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 `ECBDATAPTR` 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 `ECBDATAPTR` reader - Pointer to the ECB data structure (see Table 1 ECB data structure overview)"] +pub type ECBDATAPTR_R = crate::FieldReader; +#[doc = "Field `ECBDATAPTR` writer - Pointer to the ECB data structure (see Table 1 ECB data structure overview)"] +pub type ECBDATAPTR_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, ECBDATAPTR_SPEC, u32, u32, 32, O>; +impl R { + #[doc = "Bits 0:31 - Pointer to the ECB data structure (see Table 1 ECB data structure overview)"] + #[inline(always)] + pub fn ecbdataptr(&self) -> ECBDATAPTR_R { + ECBDATAPTR_R::new(self.bits) + } +} +impl W { + #[doc = "Bits 0:31 - Pointer to the ECB data structure (see Table 1 ECB data structure overview)"] + #[inline(always)] + #[must_use] + pub fn ecbdataptr(&mut self) -> ECBDATAPTR_W<0> { + ECBDATAPTR_W::new(self) + } + #[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 = "ECB block encrypt memory pointers\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 [ecbdataptr](index.html) module"] +pub struct ECBDATAPTR_SPEC; +impl crate::RegisterSpec for ECBDATAPTR_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [ecbdataptr::R](R) reader structure"] +impl crate::Readable for ECBDATAPTR_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [ecbdataptr::W](W) writer structure"] +impl crate::Writable for ECBDATAPTR_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets ECBDATAPTR to value 0"] +impl crate::Resettable for ECBDATAPTR_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/ecb/events_endecb.rs b/down-the-stack/dk_pac/src/ecb/events_endecb.rs new file mode 100644 index 0000000..2c54cc9 --- /dev/null +++ b/down-the-stack/dk_pac/src/ecb/events_endecb.rs @@ -0,0 +1,127 @@ +#[doc = "Register `EVENTS_ENDECB` 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 `EVENTS_ENDECB` 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 `EVENTS_ENDECB` reader - ECB block encrypt complete"] +pub type EVENTS_ENDECB_R = crate::BitReader; +#[doc = "ECB block encrypt complete\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum EVENTS_ENDECB_A { + #[doc = "0: Event not generated"] + NOT_GENERATED = 0, + #[doc = "1: Event generated"] + GENERATED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: EVENTS_ENDECB_A) -> Self { + variant as u8 != 0 + } +} +impl EVENTS_ENDECB_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> EVENTS_ENDECB_A { + match self.bits { + false => EVENTS_ENDECB_A::NOT_GENERATED, + true => EVENTS_ENDECB_A::GENERATED, + } + } + #[doc = "Checks if the value of the field is `NOT_GENERATED`"] + #[inline(always)] + pub fn is_not_generated(&self) -> bool { + *self == EVENTS_ENDECB_A::NOT_GENERATED + } + #[doc = "Checks if the value of the field is `GENERATED`"] + #[inline(always)] + pub fn is_generated(&self) -> bool { + *self == EVENTS_ENDECB_A::GENERATED + } +} +#[doc = "Field `EVENTS_ENDECB` writer - ECB block encrypt complete"] +pub type EVENTS_ENDECB_W<'a, const O: u8> = + crate::BitWriter<'a, u32, EVENTS_ENDECB_SPEC, EVENTS_ENDECB_A, O>; +impl<'a, const O: u8> EVENTS_ENDECB_W<'a, O> { + #[doc = "Event not generated"] + #[inline(always)] + pub fn not_generated(self) -> &'a mut W { + self.variant(EVENTS_ENDECB_A::NOT_GENERATED) + } + #[doc = "Event generated"] + #[inline(always)] + pub fn generated(self) -> &'a mut W { + self.variant(EVENTS_ENDECB_A::GENERATED) + } +} +impl R { + #[doc = "Bit 0 - ECB block encrypt complete"] + #[inline(always)] + pub fn events_endecb(&self) -> EVENTS_ENDECB_R { + EVENTS_ENDECB_R::new((self.bits & 1) != 0) + } +} +impl W { + #[doc = "Bit 0 - ECB block encrypt complete"] + #[inline(always)] + #[must_use] + pub fn events_endecb(&mut self) -> EVENTS_ENDECB_W<0> { + EVENTS_ENDECB_W::new(self) + } + #[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 = "ECB block encrypt complete\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 [events_endecb](index.html) module"] +pub struct EVENTS_ENDECB_SPEC; +impl crate::RegisterSpec for EVENTS_ENDECB_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [events_endecb::R](R) reader structure"] +impl crate::Readable for EVENTS_ENDECB_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [events_endecb::W](W) writer structure"] +impl crate::Writable for EVENTS_ENDECB_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets EVENTS_ENDECB to value 0"] +impl crate::Resettable for EVENTS_ENDECB_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/ecb/events_errorecb.rs b/down-the-stack/dk_pac/src/ecb/events_errorecb.rs new file mode 100644 index 0000000..93fdbc5 --- /dev/null +++ b/down-the-stack/dk_pac/src/ecb/events_errorecb.rs @@ -0,0 +1,127 @@ +#[doc = "Register `EVENTS_ERRORECB` 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 `EVENTS_ERRORECB` 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 `EVENTS_ERRORECB` reader - ECB block encrypt aborted because of a STOPECB task or due to an error"] +pub type EVENTS_ERRORECB_R = crate::BitReader; +#[doc = "ECB block encrypt aborted because of a STOPECB task or due to an error\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum EVENTS_ERRORECB_A { + #[doc = "0: Event not generated"] + NOT_GENERATED = 0, + #[doc = "1: Event generated"] + GENERATED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: EVENTS_ERRORECB_A) -> Self { + variant as u8 != 0 + } +} +impl EVENTS_ERRORECB_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> EVENTS_ERRORECB_A { + match self.bits { + false => EVENTS_ERRORECB_A::NOT_GENERATED, + true => EVENTS_ERRORECB_A::GENERATED, + } + } + #[doc = "Checks if the value of the field is `NOT_GENERATED`"] + #[inline(always)] + pub fn is_not_generated(&self) -> bool { + *self == EVENTS_ERRORECB_A::NOT_GENERATED + } + #[doc = "Checks if the value of the field is `GENERATED`"] + #[inline(always)] + pub fn is_generated(&self) -> bool { + *self == EVENTS_ERRORECB_A::GENERATED + } +} +#[doc = "Field `EVENTS_ERRORECB` writer - ECB block encrypt aborted because of a STOPECB task or due to an error"] +pub type EVENTS_ERRORECB_W<'a, const O: u8> = + crate::BitWriter<'a, u32, EVENTS_ERRORECB_SPEC, EVENTS_ERRORECB_A, O>; +impl<'a, const O: u8> EVENTS_ERRORECB_W<'a, O> { + #[doc = "Event not generated"] + #[inline(always)] + pub fn not_generated(self) -> &'a mut W { + self.variant(EVENTS_ERRORECB_A::NOT_GENERATED) + } + #[doc = "Event generated"] + #[inline(always)] + pub fn generated(self) -> &'a mut W { + self.variant(EVENTS_ERRORECB_A::GENERATED) + } +} +impl R { + #[doc = "Bit 0 - ECB block encrypt aborted because of a STOPECB task or due to an error"] + #[inline(always)] + pub fn events_errorecb(&self) -> EVENTS_ERRORECB_R { + EVENTS_ERRORECB_R::new((self.bits & 1) != 0) + } +} +impl W { + #[doc = "Bit 0 - ECB block encrypt aborted because of a STOPECB task or due to an error"] + #[inline(always)] + #[must_use] + pub fn events_errorecb(&mut self) -> EVENTS_ERRORECB_W<0> { + EVENTS_ERRORECB_W::new(self) + } + #[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 = "ECB block encrypt aborted because of a STOPECB task or due to an error\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 [events_errorecb](index.html) module"] +pub struct EVENTS_ERRORECB_SPEC; +impl crate::RegisterSpec for EVENTS_ERRORECB_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [events_errorecb::R](R) reader structure"] +impl crate::Readable for EVENTS_ERRORECB_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [events_errorecb::W](W) writer structure"] +impl crate::Writable for EVENTS_ERRORECB_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets EVENTS_ERRORECB to value 0"] +impl crate::Resettable for EVENTS_ERRORECB_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/ecb/intenclr.rs b/down-the-stack/dk_pac/src/ecb/intenclr.rs new file mode 100644 index 0000000..1300654 --- /dev/null +++ b/down-the-stack/dk_pac/src/ecb/intenclr.rs @@ -0,0 +1,201 @@ +#[doc = "Register `INTENCLR` 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 `INTENCLR` 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 `ENDECB` reader - Write '1' to disable interrupt for event ENDECB"] +pub type ENDECB_R = crate::BitReader; +#[doc = "Write '1' to disable interrupt for event ENDECB\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum ENDECB_A { + #[doc = "0: Read: Disabled"] + DISABLED = 0, + #[doc = "1: Read: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: ENDECB_A) -> Self { + variant as u8 != 0 + } +} +impl ENDECB_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> ENDECB_A { + match self.bits { + false => ENDECB_A::DISABLED, + true => ENDECB_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == ENDECB_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == ENDECB_A::ENABLED + } +} +#[doc = "Write '1' to disable interrupt for event ENDECB\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum ENDECB_AW { + #[doc = "1: Disable"] + CLEAR = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: ENDECB_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `ENDECB` writer - Write '1' to disable interrupt for event ENDECB"] +pub type ENDECB_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENCLR_SPEC, ENDECB_AW, O>; +impl<'a, const O: u8> ENDECB_W<'a, O> { + #[doc = "Disable"] + #[inline(always)] + pub fn clear(self) -> &'a mut W { + self.variant(ENDECB_AW::CLEAR) + } +} +#[doc = "Field `ERRORECB` reader - Write '1' to disable interrupt for event ERRORECB"] +pub type ERRORECB_R = crate::BitReader; +#[doc = "Write '1' to disable interrupt for event ERRORECB\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum ERRORECB_A { + #[doc = "0: Read: Disabled"] + DISABLED = 0, + #[doc = "1: Read: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: ERRORECB_A) -> Self { + variant as u8 != 0 + } +} +impl ERRORECB_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> ERRORECB_A { + match self.bits { + false => ERRORECB_A::DISABLED, + true => ERRORECB_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == ERRORECB_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == ERRORECB_A::ENABLED + } +} +#[doc = "Write '1' to disable interrupt for event ERRORECB\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum ERRORECB_AW { + #[doc = "1: Disable"] + CLEAR = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: ERRORECB_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `ERRORECB` writer - Write '1' to disable interrupt for event ERRORECB"] +pub type ERRORECB_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENCLR_SPEC, ERRORECB_AW, O>; +impl<'a, const O: u8> ERRORECB_W<'a, O> { + #[doc = "Disable"] + #[inline(always)] + pub fn clear(self) -> &'a mut W { + self.variant(ERRORECB_AW::CLEAR) + } +} +impl R { + #[doc = "Bit 0 - Write '1' to disable interrupt for event ENDECB"] + #[inline(always)] + pub fn endecb(&self) -> ENDECB_R { + ENDECB_R::new((self.bits & 1) != 0) + } + #[doc = "Bit 1 - Write '1' to disable interrupt for event ERRORECB"] + #[inline(always)] + pub fn errorecb(&self) -> ERRORECB_R { + ERRORECB_R::new(((self.bits >> 1) & 1) != 0) + } +} +impl W { + #[doc = "Bit 0 - Write '1' to disable interrupt for event ENDECB"] + #[inline(always)] + #[must_use] + pub fn endecb(&mut self) -> ENDECB_W<0> { + ENDECB_W::new(self) + } + #[doc = "Bit 1 - Write '1' to disable interrupt for event ERRORECB"] + #[inline(always)] + #[must_use] + pub fn errorecb(&mut self) -> ERRORECB_W<1> { + ERRORECB_W::new(self) + } + #[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 = "Disable interrupt\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 [intenclr](index.html) module"] +pub struct INTENCLR_SPEC; +impl crate::RegisterSpec for INTENCLR_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [intenclr::R](R) reader structure"] +impl crate::Readable for INTENCLR_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [intenclr::W](W) writer structure"] +impl crate::Writable for INTENCLR_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets INTENCLR to value 0"] +impl crate::Resettable for INTENCLR_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/ecb/intenset.rs b/down-the-stack/dk_pac/src/ecb/intenset.rs new file mode 100644 index 0000000..c28acf8 --- /dev/null +++ b/down-the-stack/dk_pac/src/ecb/intenset.rs @@ -0,0 +1,201 @@ +#[doc = "Register `INTENSET` 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 `INTENSET` 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 `ENDECB` reader - Write '1' to enable interrupt for event ENDECB"] +pub type ENDECB_R = crate::BitReader; +#[doc = "Write '1' to enable interrupt for event ENDECB\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum ENDECB_A { + #[doc = "0: Read: Disabled"] + DISABLED = 0, + #[doc = "1: Read: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: ENDECB_A) -> Self { + variant as u8 != 0 + } +} +impl ENDECB_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> ENDECB_A { + match self.bits { + false => ENDECB_A::DISABLED, + true => ENDECB_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == ENDECB_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == ENDECB_A::ENABLED + } +} +#[doc = "Write '1' to enable interrupt for event ENDECB\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum ENDECB_AW { + #[doc = "1: Enable"] + SET = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: ENDECB_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `ENDECB` writer - Write '1' to enable interrupt for event ENDECB"] +pub type ENDECB_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENSET_SPEC, ENDECB_AW, O>; +impl<'a, const O: u8> ENDECB_W<'a, O> { + #[doc = "Enable"] + #[inline(always)] + pub fn set(self) -> &'a mut W { + self.variant(ENDECB_AW::SET) + } +} +#[doc = "Field `ERRORECB` reader - Write '1' to enable interrupt for event ERRORECB"] +pub type ERRORECB_R = crate::BitReader; +#[doc = "Write '1' to enable interrupt for event ERRORECB\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum ERRORECB_A { + #[doc = "0: Read: Disabled"] + DISABLED = 0, + #[doc = "1: Read: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: ERRORECB_A) -> Self { + variant as u8 != 0 + } +} +impl ERRORECB_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> ERRORECB_A { + match self.bits { + false => ERRORECB_A::DISABLED, + true => ERRORECB_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == ERRORECB_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == ERRORECB_A::ENABLED + } +} +#[doc = "Write '1' to enable interrupt for event ERRORECB\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum ERRORECB_AW { + #[doc = "1: Enable"] + SET = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: ERRORECB_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `ERRORECB` writer - Write '1' to enable interrupt for event ERRORECB"] +pub type ERRORECB_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENSET_SPEC, ERRORECB_AW, O>; +impl<'a, const O: u8> ERRORECB_W<'a, O> { + #[doc = "Enable"] + #[inline(always)] + pub fn set(self) -> &'a mut W { + self.variant(ERRORECB_AW::SET) + } +} +impl R { + #[doc = "Bit 0 - Write '1' to enable interrupt for event ENDECB"] + #[inline(always)] + pub fn endecb(&self) -> ENDECB_R { + ENDECB_R::new((self.bits & 1) != 0) + } + #[doc = "Bit 1 - Write '1' to enable interrupt for event ERRORECB"] + #[inline(always)] + pub fn errorecb(&self) -> ERRORECB_R { + ERRORECB_R::new(((self.bits >> 1) & 1) != 0) + } +} +impl W { + #[doc = "Bit 0 - Write '1' to enable interrupt for event ENDECB"] + #[inline(always)] + #[must_use] + pub fn endecb(&mut self) -> ENDECB_W<0> { + ENDECB_W::new(self) + } + #[doc = "Bit 1 - Write '1' to enable interrupt for event ERRORECB"] + #[inline(always)] + #[must_use] + pub fn errorecb(&mut self) -> ERRORECB_W<1> { + ERRORECB_W::new(self) + } + #[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 = "Enable interrupt\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 [intenset](index.html) module"] +pub struct INTENSET_SPEC; +impl crate::RegisterSpec for INTENSET_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [intenset::R](R) reader structure"] +impl crate::Readable for INTENSET_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [intenset::W](W) writer structure"] +impl crate::Writable for INTENSET_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets INTENSET to value 0"] +impl crate::Resettable for INTENSET_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/ecb/tasks_startecb.rs b/down-the-stack/dk_pac/src/ecb/tasks_startecb.rs new file mode 100644 index 0000000..dd4d642 --- /dev/null +++ b/down-the-stack/dk_pac/src/ecb/tasks_startecb.rs @@ -0,0 +1,72 @@ +#[doc = "Register `TASKS_STARTECB` 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 = "Start ECB block encrypt\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum TASKS_STARTECB_AW { + #[doc = "1: Trigger task"] + TRIGGER = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: TASKS_STARTECB_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `TASKS_STARTECB` writer - Start ECB block encrypt"] +pub type TASKS_STARTECB_W<'a, const O: u8> = + crate::BitWriter<'a, u32, TASKS_STARTECB_SPEC, TASKS_STARTECB_AW, O>; +impl<'a, const O: u8> TASKS_STARTECB_W<'a, O> { + #[doc = "Trigger task"] + #[inline(always)] + pub fn trigger(self) -> &'a mut W { + self.variant(TASKS_STARTECB_AW::TRIGGER) + } +} +impl W { + #[doc = "Bit 0 - Start ECB block encrypt"] + #[inline(always)] + #[must_use] + pub fn tasks_startecb(&mut self) -> TASKS_STARTECB_W<0> { + TASKS_STARTECB_W::new(self) + } + #[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 = "Start ECB block encrypt\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 [tasks_startecb](index.html) module"] +pub struct TASKS_STARTECB_SPEC; +impl crate::RegisterSpec for TASKS_STARTECB_SPEC { + type Ux = u32; +} +#[doc = "`write(|w| ..)` method takes [tasks_startecb::W](W) writer structure"] +impl crate::Writable for TASKS_STARTECB_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets TASKS_STARTECB to value 0"] +impl crate::Resettable for TASKS_STARTECB_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/ecb/tasks_stopecb.rs b/down-the-stack/dk_pac/src/ecb/tasks_stopecb.rs new file mode 100644 index 0000000..ece4af5 --- /dev/null +++ b/down-the-stack/dk_pac/src/ecb/tasks_stopecb.rs @@ -0,0 +1,72 @@ +#[doc = "Register `TASKS_STOPECB` 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 = "Abort a possible executing ECB operation\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum TASKS_STOPECB_AW { + #[doc = "1: Trigger task"] + TRIGGER = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: TASKS_STOPECB_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `TASKS_STOPECB` writer - Abort a possible executing ECB operation"] +pub type TASKS_STOPECB_W<'a, const O: u8> = + crate::BitWriter<'a, u32, TASKS_STOPECB_SPEC, TASKS_STOPECB_AW, O>; +impl<'a, const O: u8> TASKS_STOPECB_W<'a, O> { + #[doc = "Trigger task"] + #[inline(always)] + pub fn trigger(self) -> &'a mut W { + self.variant(TASKS_STOPECB_AW::TRIGGER) + } +} +impl W { + #[doc = "Bit 0 - Abort a possible executing ECB operation"] + #[inline(always)] + #[must_use] + pub fn tasks_stopecb(&mut self) -> TASKS_STOPECB_W<0> { + TASKS_STOPECB_W::new(self) + } + #[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 = "Abort a possible executing ECB operation\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 [tasks_stopecb](index.html) module"] +pub struct TASKS_STOPECB_SPEC; +impl crate::RegisterSpec for TASKS_STOPECB_SPEC { + type Ux = u32; +} +#[doc = "`write(|w| ..)` method takes [tasks_stopecb::W](W) writer structure"] +impl crate::Writable for TASKS_STOPECB_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets TASKS_STOPECB to value 0"] +impl crate::Resettable for TASKS_STOPECB_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/egu0.rs b/down-the-stack/dk_pac/src/egu0.rs new file mode 100644 index 0000000..f19edf5 --- /dev/null +++ b/down-the-stack/dk_pac/src/egu0.rs @@ -0,0 +1,40 @@ +#[doc = r"Register block"] +#[repr(C)] +pub struct RegisterBlock { + #[doc = "0x00..0x40 - Description collection: Trigger n for triggering the corresponding TRIGGERED\\[n\\] +event"] + pub tasks_trigger: [TASKS_TRIGGER; 16], + _reserved1: [u8; 0xc0], + #[doc = "0x100..0x140 - Description collection: Event number n generated by triggering the corresponding TRIGGER\\[n\\] +task"] + pub events_triggered: [EVENTS_TRIGGERED; 16], + _reserved2: [u8; 0x01c0], + #[doc = "0x300 - Enable or disable interrupt"] + pub inten: INTEN, + #[doc = "0x304 - Enable interrupt"] + pub intenset: INTENSET, + #[doc = "0x308 - Disable interrupt"] + pub intenclr: INTENCLR, +} +#[doc = "TASKS_TRIGGER (w) register accessor: an alias for `Reg`"] +pub type TASKS_TRIGGER = crate::Reg; +#[doc = "Description collection: Trigger n for triggering the corresponding TRIGGERED\\[n\\] +event"] +pub mod tasks_trigger; +#[doc = "EVENTS_TRIGGERED (rw) register accessor: an alias for `Reg`"] +pub type EVENTS_TRIGGERED = crate::Reg; +#[doc = "Description collection: Event number n generated by triggering the corresponding TRIGGER\\[n\\] +task"] +pub mod events_triggered; +#[doc = "INTEN (rw) register accessor: an alias for `Reg`"] +pub type INTEN = crate::Reg; +#[doc = "Enable or disable interrupt"] +pub mod inten; +#[doc = "INTENSET (rw) register accessor: an alias for `Reg`"] +pub type INTENSET = crate::Reg; +#[doc = "Enable interrupt"] +pub mod intenset; +#[doc = "INTENCLR (rw) register accessor: an alias for `Reg`"] +pub type INTENCLR = crate::Reg; +#[doc = "Disable interrupt"] +pub mod intenclr; diff --git a/down-the-stack/dk_pac/src/egu0/events_triggered.rs b/down-the-stack/dk_pac/src/egu0/events_triggered.rs new file mode 100644 index 0000000..d804e79 --- /dev/null +++ b/down-the-stack/dk_pac/src/egu0/events_triggered.rs @@ -0,0 +1,134 @@ +#[doc = "Register `EVENTS_TRIGGERED[%s]` 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 `EVENTS_TRIGGERED[%s]` 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 `EVENTS_TRIGGERED` reader - Event number n generated by triggering the corresponding TRIGGER\\[n\\] +task"] +pub type EVENTS_TRIGGERED_R = crate::BitReader; +#[doc = "Event number n generated by triggering the corresponding TRIGGER\\[n\\] +task\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum EVENTS_TRIGGERED_A { + #[doc = "0: Event not generated"] + NOT_GENERATED = 0, + #[doc = "1: Event generated"] + GENERATED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: EVENTS_TRIGGERED_A) -> Self { + variant as u8 != 0 + } +} +impl EVENTS_TRIGGERED_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> EVENTS_TRIGGERED_A { + match self.bits { + false => EVENTS_TRIGGERED_A::NOT_GENERATED, + true => EVENTS_TRIGGERED_A::GENERATED, + } + } + #[doc = "Checks if the value of the field is `NOT_GENERATED`"] + #[inline(always)] + pub fn is_not_generated(&self) -> bool { + *self == EVENTS_TRIGGERED_A::NOT_GENERATED + } + #[doc = "Checks if the value of the field is `GENERATED`"] + #[inline(always)] + pub fn is_generated(&self) -> bool { + *self == EVENTS_TRIGGERED_A::GENERATED + } +} +#[doc = "Field `EVENTS_TRIGGERED` writer - Event number n generated by triggering the corresponding TRIGGER\\[n\\] +task"] +pub type EVENTS_TRIGGERED_W<'a, const O: u8> = + crate::BitWriter<'a, u32, EVENTS_TRIGGERED_SPEC, EVENTS_TRIGGERED_A, O>; +impl<'a, const O: u8> EVENTS_TRIGGERED_W<'a, O> { + #[doc = "Event not generated"] + #[inline(always)] + pub fn not_generated(self) -> &'a mut W { + self.variant(EVENTS_TRIGGERED_A::NOT_GENERATED) + } + #[doc = "Event generated"] + #[inline(always)] + pub fn generated(self) -> &'a mut W { + self.variant(EVENTS_TRIGGERED_A::GENERATED) + } +} +impl R { + #[doc = "Bit 0 - Event number n generated by triggering the corresponding TRIGGER\\[n\\] +task"] + #[inline(always)] + pub fn events_triggered(&self) -> EVENTS_TRIGGERED_R { + EVENTS_TRIGGERED_R::new((self.bits & 1) != 0) + } +} +impl W { + #[doc = "Bit 0 - Event number n generated by triggering the corresponding TRIGGER\\[n\\] +task"] + #[inline(always)] + #[must_use] + pub fn events_triggered(&mut self) -> EVENTS_TRIGGERED_W<0> { + EVENTS_TRIGGERED_W::new(self) + } + #[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 = "Description collection: Event number n generated by triggering the corresponding TRIGGER\\[n\\] +task\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 [events_triggered](index.html) module"] +pub struct EVENTS_TRIGGERED_SPEC; +impl crate::RegisterSpec for EVENTS_TRIGGERED_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [events_triggered::R](R) reader structure"] +impl crate::Readable for EVENTS_TRIGGERED_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [events_triggered::W](W) writer structure"] +impl crate::Writable for EVENTS_TRIGGERED_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets EVENTS_TRIGGERED[%s] +to value 0"] +impl crate::Resettable for EVENTS_TRIGGERED_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/egu0/inten.rs b/down-the-stack/dk_pac/src/egu0/inten.rs new file mode 100644 index 0000000..3d1866a --- /dev/null +++ b/down-the-stack/dk_pac/src/egu0/inten.rs @@ -0,0 +1,1041 @@ +#[doc = "Register `INTEN` 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 `INTEN` 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 `TRIGGERED0` reader - Enable or disable interrupt for event TRIGGERED\\[0\\]"] +pub type TRIGGERED0_R = crate::BitReader; +#[doc = "Enable or disable interrupt for event TRIGGERED\\[0\\]\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum TRIGGERED0_A { + #[doc = "0: Disable"] + DISABLED = 0, + #[doc = "1: Enable"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: TRIGGERED0_A) -> Self { + variant as u8 != 0 + } +} +impl TRIGGERED0_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> TRIGGERED0_A { + match self.bits { + false => TRIGGERED0_A::DISABLED, + true => TRIGGERED0_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == TRIGGERED0_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == TRIGGERED0_A::ENABLED + } +} +#[doc = "Field `TRIGGERED0` writer - Enable or disable interrupt for event TRIGGERED\\[0\\]"] +pub type TRIGGERED0_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTEN_SPEC, TRIGGERED0_A, O>; +impl<'a, const O: u8> TRIGGERED0_W<'a, O> { + #[doc = "Disable"] + #[inline(always)] + pub fn disabled(self) -> &'a mut W { + self.variant(TRIGGERED0_A::DISABLED) + } + #[doc = "Enable"] + #[inline(always)] + pub fn enabled(self) -> &'a mut W { + self.variant(TRIGGERED0_A::ENABLED) + } +} +#[doc = "Field `TRIGGERED1` reader - Enable or disable interrupt for event TRIGGERED\\[1\\]"] +pub type TRIGGERED1_R = crate::BitReader; +#[doc = "Enable or disable interrupt for event TRIGGERED\\[1\\]\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum TRIGGERED1_A { + #[doc = "0: Disable"] + DISABLED = 0, + #[doc = "1: Enable"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: TRIGGERED1_A) -> Self { + variant as u8 != 0 + } +} +impl TRIGGERED1_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> TRIGGERED1_A { + match self.bits { + false => TRIGGERED1_A::DISABLED, + true => TRIGGERED1_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == TRIGGERED1_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == TRIGGERED1_A::ENABLED + } +} +#[doc = "Field `TRIGGERED1` writer - Enable or disable interrupt for event TRIGGERED\\[1\\]"] +pub type TRIGGERED1_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTEN_SPEC, TRIGGERED1_A, O>; +impl<'a, const O: u8> TRIGGERED1_W<'a, O> { + #[doc = "Disable"] + #[inline(always)] + pub fn disabled(self) -> &'a mut W { + self.variant(TRIGGERED1_A::DISABLED) + } + #[doc = "Enable"] + #[inline(always)] + pub fn enabled(self) -> &'a mut W { + self.variant(TRIGGERED1_A::ENABLED) + } +} +#[doc = "Field `TRIGGERED2` reader - Enable or disable interrupt for event TRIGGERED\\[2\\]"] +pub type TRIGGERED2_R = crate::BitReader; +#[doc = "Enable or disable interrupt for event TRIGGERED\\[2\\]\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum TRIGGERED2_A { + #[doc = "0: Disable"] + DISABLED = 0, + #[doc = "1: Enable"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: TRIGGERED2_A) -> Self { + variant as u8 != 0 + } +} +impl TRIGGERED2_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> TRIGGERED2_A { + match self.bits { + false => TRIGGERED2_A::DISABLED, + true => TRIGGERED2_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == TRIGGERED2_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == TRIGGERED2_A::ENABLED + } +} +#[doc = "Field `TRIGGERED2` writer - Enable or disable interrupt for event TRIGGERED\\[2\\]"] +pub type TRIGGERED2_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTEN_SPEC, TRIGGERED2_A, O>; +impl<'a, const O: u8> TRIGGERED2_W<'a, O> { + #[doc = "Disable"] + #[inline(always)] + pub fn disabled(self) -> &'a mut W { + self.variant(TRIGGERED2_A::DISABLED) + } + #[doc = "Enable"] + #[inline(always)] + pub fn enabled(self) -> &'a mut W { + self.variant(TRIGGERED2_A::ENABLED) + } +} +#[doc = "Field `TRIGGERED3` reader - Enable or disable interrupt for event TRIGGERED\\[3\\]"] +pub type TRIGGERED3_R = crate::BitReader; +#[doc = "Enable or disable interrupt for event TRIGGERED\\[3\\]\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum TRIGGERED3_A { + #[doc = "0: Disable"] + DISABLED = 0, + #[doc = "1: Enable"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: TRIGGERED3_A) -> Self { + variant as u8 != 0 + } +} +impl TRIGGERED3_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> TRIGGERED3_A { + match self.bits { + false => TRIGGERED3_A::DISABLED, + true => TRIGGERED3_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == TRIGGERED3_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == TRIGGERED3_A::ENABLED + } +} +#[doc = "Field `TRIGGERED3` writer - Enable or disable interrupt for event TRIGGERED\\[3\\]"] +pub type TRIGGERED3_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTEN_SPEC, TRIGGERED3_A, O>; +impl<'a, const O: u8> TRIGGERED3_W<'a, O> { + #[doc = "Disable"] + #[inline(always)] + pub fn disabled(self) -> &'a mut W { + self.variant(TRIGGERED3_A::DISABLED) + } + #[doc = "Enable"] + #[inline(always)] + pub fn enabled(self) -> &'a mut W { + self.variant(TRIGGERED3_A::ENABLED) + } +} +#[doc = "Field `TRIGGERED4` reader - Enable or disable interrupt for event TRIGGERED\\[4\\]"] +pub type TRIGGERED4_R = crate::BitReader; +#[doc = "Enable or disable interrupt for event TRIGGERED\\[4\\]\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum TRIGGERED4_A { + #[doc = "0: Disable"] + DISABLED = 0, + #[doc = "1: Enable"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: TRIGGERED4_A) -> Self { + variant as u8 != 0 + } +} +impl TRIGGERED4_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> TRIGGERED4_A { + match self.bits { + false => TRIGGERED4_A::DISABLED, + true => TRIGGERED4_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == TRIGGERED4_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == TRIGGERED4_A::ENABLED + } +} +#[doc = "Field `TRIGGERED4` writer - Enable or disable interrupt for event TRIGGERED\\[4\\]"] +pub type TRIGGERED4_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTEN_SPEC, TRIGGERED4_A, O>; +impl<'a, const O: u8> TRIGGERED4_W<'a, O> { + #[doc = "Disable"] + #[inline(always)] + pub fn disabled(self) -> &'a mut W { + self.variant(TRIGGERED4_A::DISABLED) + } + #[doc = "Enable"] + #[inline(always)] + pub fn enabled(self) -> &'a mut W { + self.variant(TRIGGERED4_A::ENABLED) + } +} +#[doc = "Field `TRIGGERED5` reader - Enable or disable interrupt for event TRIGGERED\\[5\\]"] +pub type TRIGGERED5_R = crate::BitReader; +#[doc = "Enable or disable interrupt for event TRIGGERED\\[5\\]\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum TRIGGERED5_A { + #[doc = "0: Disable"] + DISABLED = 0, + #[doc = "1: Enable"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: TRIGGERED5_A) -> Self { + variant as u8 != 0 + } +} +impl TRIGGERED5_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> TRIGGERED5_A { + match self.bits { + false => TRIGGERED5_A::DISABLED, + true => TRIGGERED5_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == TRIGGERED5_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == TRIGGERED5_A::ENABLED + } +} +#[doc = "Field `TRIGGERED5` writer - Enable or disable interrupt for event TRIGGERED\\[5\\]"] +pub type TRIGGERED5_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTEN_SPEC, TRIGGERED5_A, O>; +impl<'a, const O: u8> TRIGGERED5_W<'a, O> { + #[doc = "Disable"] + #[inline(always)] + pub fn disabled(self) -> &'a mut W { + self.variant(TRIGGERED5_A::DISABLED) + } + #[doc = "Enable"] + #[inline(always)] + pub fn enabled(self) -> &'a mut W { + self.variant(TRIGGERED5_A::ENABLED) + } +} +#[doc = "Field `TRIGGERED6` reader - Enable or disable interrupt for event TRIGGERED\\[6\\]"] +pub type TRIGGERED6_R = crate::BitReader; +#[doc = "Enable or disable interrupt for event TRIGGERED\\[6\\]\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum TRIGGERED6_A { + #[doc = "0: Disable"] + DISABLED = 0, + #[doc = "1: Enable"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: TRIGGERED6_A) -> Self { + variant as u8 != 0 + } +} +impl TRIGGERED6_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> TRIGGERED6_A { + match self.bits { + false => TRIGGERED6_A::DISABLED, + true => TRIGGERED6_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == TRIGGERED6_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == TRIGGERED6_A::ENABLED + } +} +#[doc = "Field `TRIGGERED6` writer - Enable or disable interrupt for event TRIGGERED\\[6\\]"] +pub type TRIGGERED6_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTEN_SPEC, TRIGGERED6_A, O>; +impl<'a, const O: u8> TRIGGERED6_W<'a, O> { + #[doc = "Disable"] + #[inline(always)] + pub fn disabled(self) -> &'a mut W { + self.variant(TRIGGERED6_A::DISABLED) + } + #[doc = "Enable"] + #[inline(always)] + pub fn enabled(self) -> &'a mut W { + self.variant(TRIGGERED6_A::ENABLED) + } +} +#[doc = "Field `TRIGGERED7` reader - Enable or disable interrupt for event TRIGGERED\\[7\\]"] +pub type TRIGGERED7_R = crate::BitReader; +#[doc = "Enable or disable interrupt for event TRIGGERED\\[7\\]\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum TRIGGERED7_A { + #[doc = "0: Disable"] + DISABLED = 0, + #[doc = "1: Enable"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: TRIGGERED7_A) -> Self { + variant as u8 != 0 + } +} +impl TRIGGERED7_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> TRIGGERED7_A { + match self.bits { + false => TRIGGERED7_A::DISABLED, + true => TRIGGERED7_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == TRIGGERED7_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == TRIGGERED7_A::ENABLED + } +} +#[doc = "Field `TRIGGERED7` writer - Enable or disable interrupt for event TRIGGERED\\[7\\]"] +pub type TRIGGERED7_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTEN_SPEC, TRIGGERED7_A, O>; +impl<'a, const O: u8> TRIGGERED7_W<'a, O> { + #[doc = "Disable"] + #[inline(always)] + pub fn disabled(self) -> &'a mut W { + self.variant(TRIGGERED7_A::DISABLED) + } + #[doc = "Enable"] + #[inline(always)] + pub fn enabled(self) -> &'a mut W { + self.variant(TRIGGERED7_A::ENABLED) + } +} +#[doc = "Field `TRIGGERED8` reader - Enable or disable interrupt for event TRIGGERED\\[8\\]"] +pub type TRIGGERED8_R = crate::BitReader; +#[doc = "Enable or disable interrupt for event TRIGGERED\\[8\\]\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum TRIGGERED8_A { + #[doc = "0: Disable"] + DISABLED = 0, + #[doc = "1: Enable"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: TRIGGERED8_A) -> Self { + variant as u8 != 0 + } +} +impl TRIGGERED8_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> TRIGGERED8_A { + match self.bits { + false => TRIGGERED8_A::DISABLED, + true => TRIGGERED8_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == TRIGGERED8_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == TRIGGERED8_A::ENABLED + } +} +#[doc = "Field `TRIGGERED8` writer - Enable or disable interrupt for event TRIGGERED\\[8\\]"] +pub type TRIGGERED8_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTEN_SPEC, TRIGGERED8_A, O>; +impl<'a, const O: u8> TRIGGERED8_W<'a, O> { + #[doc = "Disable"] + #[inline(always)] + pub fn disabled(self) -> &'a mut W { + self.variant(TRIGGERED8_A::DISABLED) + } + #[doc = "Enable"] + #[inline(always)] + pub fn enabled(self) -> &'a mut W { + self.variant(TRIGGERED8_A::ENABLED) + } +} +#[doc = "Field `TRIGGERED9` reader - Enable or disable interrupt for event TRIGGERED\\[9\\]"] +pub type TRIGGERED9_R = crate::BitReader; +#[doc = "Enable or disable interrupt for event TRIGGERED\\[9\\]\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum TRIGGERED9_A { + #[doc = "0: Disable"] + DISABLED = 0, + #[doc = "1: Enable"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: TRIGGERED9_A) -> Self { + variant as u8 != 0 + } +} +impl TRIGGERED9_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> TRIGGERED9_A { + match self.bits { + false => TRIGGERED9_A::DISABLED, + true => TRIGGERED9_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == TRIGGERED9_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == TRIGGERED9_A::ENABLED + } +} +#[doc = "Field `TRIGGERED9` writer - Enable or disable interrupt for event TRIGGERED\\[9\\]"] +pub type TRIGGERED9_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTEN_SPEC, TRIGGERED9_A, O>; +impl<'a, const O: u8> TRIGGERED9_W<'a, O> { + #[doc = "Disable"] + #[inline(always)] + pub fn disabled(self) -> &'a mut W { + self.variant(TRIGGERED9_A::DISABLED) + } + #[doc = "Enable"] + #[inline(always)] + pub fn enabled(self) -> &'a mut W { + self.variant(TRIGGERED9_A::ENABLED) + } +} +#[doc = "Field `TRIGGERED10` reader - Enable or disable interrupt for event TRIGGERED\\[10\\]"] +pub type TRIGGERED10_R = crate::BitReader; +#[doc = "Enable or disable interrupt for event TRIGGERED\\[10\\]\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum TRIGGERED10_A { + #[doc = "0: Disable"] + DISABLED = 0, + #[doc = "1: Enable"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: TRIGGERED10_A) -> Self { + variant as u8 != 0 + } +} +impl TRIGGERED10_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> TRIGGERED10_A { + match self.bits { + false => TRIGGERED10_A::DISABLED, + true => TRIGGERED10_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == TRIGGERED10_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == TRIGGERED10_A::ENABLED + } +} +#[doc = "Field `TRIGGERED10` writer - Enable or disable interrupt for event TRIGGERED\\[10\\]"] +pub type TRIGGERED10_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTEN_SPEC, TRIGGERED10_A, O>; +impl<'a, const O: u8> TRIGGERED10_W<'a, O> { + #[doc = "Disable"] + #[inline(always)] + pub fn disabled(self) -> &'a mut W { + self.variant(TRIGGERED10_A::DISABLED) + } + #[doc = "Enable"] + #[inline(always)] + pub fn enabled(self) -> &'a mut W { + self.variant(TRIGGERED10_A::ENABLED) + } +} +#[doc = "Field `TRIGGERED11` reader - Enable or disable interrupt for event TRIGGERED\\[11\\]"] +pub type TRIGGERED11_R = crate::BitReader; +#[doc = "Enable or disable interrupt for event TRIGGERED\\[11\\]\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum TRIGGERED11_A { + #[doc = "0: Disable"] + DISABLED = 0, + #[doc = "1: Enable"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: TRIGGERED11_A) -> Self { + variant as u8 != 0 + } +} +impl TRIGGERED11_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> TRIGGERED11_A { + match self.bits { + false => TRIGGERED11_A::DISABLED, + true => TRIGGERED11_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == TRIGGERED11_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == TRIGGERED11_A::ENABLED + } +} +#[doc = "Field `TRIGGERED11` writer - Enable or disable interrupt for event TRIGGERED\\[11\\]"] +pub type TRIGGERED11_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTEN_SPEC, TRIGGERED11_A, O>; +impl<'a, const O: u8> TRIGGERED11_W<'a, O> { + #[doc = "Disable"] + #[inline(always)] + pub fn disabled(self) -> &'a mut W { + self.variant(TRIGGERED11_A::DISABLED) + } + #[doc = "Enable"] + #[inline(always)] + pub fn enabled(self) -> &'a mut W { + self.variant(TRIGGERED11_A::ENABLED) + } +} +#[doc = "Field `TRIGGERED12` reader - Enable or disable interrupt for event TRIGGERED\\[12\\]"] +pub type TRIGGERED12_R = crate::BitReader; +#[doc = "Enable or disable interrupt for event TRIGGERED\\[12\\]\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum TRIGGERED12_A { + #[doc = "0: Disable"] + DISABLED = 0, + #[doc = "1: Enable"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: TRIGGERED12_A) -> Self { + variant as u8 != 0 + } +} +impl TRIGGERED12_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> TRIGGERED12_A { + match self.bits { + false => TRIGGERED12_A::DISABLED, + true => TRIGGERED12_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == TRIGGERED12_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == TRIGGERED12_A::ENABLED + } +} +#[doc = "Field `TRIGGERED12` writer - Enable or disable interrupt for event TRIGGERED\\[12\\]"] +pub type TRIGGERED12_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTEN_SPEC, TRIGGERED12_A, O>; +impl<'a, const O: u8> TRIGGERED12_W<'a, O> { + #[doc = "Disable"] + #[inline(always)] + pub fn disabled(self) -> &'a mut W { + self.variant(TRIGGERED12_A::DISABLED) + } + #[doc = "Enable"] + #[inline(always)] + pub fn enabled(self) -> &'a mut W { + self.variant(TRIGGERED12_A::ENABLED) + } +} +#[doc = "Field `TRIGGERED13` reader - Enable or disable interrupt for event TRIGGERED\\[13\\]"] +pub type TRIGGERED13_R = crate::BitReader; +#[doc = "Enable or disable interrupt for event TRIGGERED\\[13\\]\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum TRIGGERED13_A { + #[doc = "0: Disable"] + DISABLED = 0, + #[doc = "1: Enable"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: TRIGGERED13_A) -> Self { + variant as u8 != 0 + } +} +impl TRIGGERED13_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> TRIGGERED13_A { + match self.bits { + false => TRIGGERED13_A::DISABLED, + true => TRIGGERED13_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == TRIGGERED13_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == TRIGGERED13_A::ENABLED + } +} +#[doc = "Field `TRIGGERED13` writer - Enable or disable interrupt for event TRIGGERED\\[13\\]"] +pub type TRIGGERED13_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTEN_SPEC, TRIGGERED13_A, O>; +impl<'a, const O: u8> TRIGGERED13_W<'a, O> { + #[doc = "Disable"] + #[inline(always)] + pub fn disabled(self) -> &'a mut W { + self.variant(TRIGGERED13_A::DISABLED) + } + #[doc = "Enable"] + #[inline(always)] + pub fn enabled(self) -> &'a mut W { + self.variant(TRIGGERED13_A::ENABLED) + } +} +#[doc = "Field `TRIGGERED14` reader - Enable or disable interrupt for event TRIGGERED\\[14\\]"] +pub type TRIGGERED14_R = crate::BitReader; +#[doc = "Enable or disable interrupt for event TRIGGERED\\[14\\]\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum TRIGGERED14_A { + #[doc = "0: Disable"] + DISABLED = 0, + #[doc = "1: Enable"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: TRIGGERED14_A) -> Self { + variant as u8 != 0 + } +} +impl TRIGGERED14_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> TRIGGERED14_A { + match self.bits { + false => TRIGGERED14_A::DISABLED, + true => TRIGGERED14_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == TRIGGERED14_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == TRIGGERED14_A::ENABLED + } +} +#[doc = "Field `TRIGGERED14` writer - Enable or disable interrupt for event TRIGGERED\\[14\\]"] +pub type TRIGGERED14_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTEN_SPEC, TRIGGERED14_A, O>; +impl<'a, const O: u8> TRIGGERED14_W<'a, O> { + #[doc = "Disable"] + #[inline(always)] + pub fn disabled(self) -> &'a mut W { + self.variant(TRIGGERED14_A::DISABLED) + } + #[doc = "Enable"] + #[inline(always)] + pub fn enabled(self) -> &'a mut W { + self.variant(TRIGGERED14_A::ENABLED) + } +} +#[doc = "Field `TRIGGERED15` reader - Enable or disable interrupt for event TRIGGERED\\[15\\]"] +pub type TRIGGERED15_R = crate::BitReader; +#[doc = "Enable or disable interrupt for event TRIGGERED\\[15\\]\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum TRIGGERED15_A { + #[doc = "0: Disable"] + DISABLED = 0, + #[doc = "1: Enable"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: TRIGGERED15_A) -> Self { + variant as u8 != 0 + } +} +impl TRIGGERED15_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> TRIGGERED15_A { + match self.bits { + false => TRIGGERED15_A::DISABLED, + true => TRIGGERED15_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == TRIGGERED15_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == TRIGGERED15_A::ENABLED + } +} +#[doc = "Field `TRIGGERED15` writer - Enable or disable interrupt for event TRIGGERED\\[15\\]"] +pub type TRIGGERED15_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTEN_SPEC, TRIGGERED15_A, O>; +impl<'a, const O: u8> TRIGGERED15_W<'a, O> { + #[doc = "Disable"] + #[inline(always)] + pub fn disabled(self) -> &'a mut W { + self.variant(TRIGGERED15_A::DISABLED) + } + #[doc = "Enable"] + #[inline(always)] + pub fn enabled(self) -> &'a mut W { + self.variant(TRIGGERED15_A::ENABLED) + } +} +impl R { + #[doc = "Bit 0 - Enable or disable interrupt for event TRIGGERED\\[0\\]"] + #[inline(always)] + pub fn triggered0(&self) -> TRIGGERED0_R { + TRIGGERED0_R::new((self.bits & 1) != 0) + } + #[doc = "Bit 1 - Enable or disable interrupt for event TRIGGERED\\[1\\]"] + #[inline(always)] + pub fn triggered1(&self) -> TRIGGERED1_R { + TRIGGERED1_R::new(((self.bits >> 1) & 1) != 0) + } + #[doc = "Bit 2 - Enable or disable interrupt for event TRIGGERED\\[2\\]"] + #[inline(always)] + pub fn triggered2(&self) -> TRIGGERED2_R { + TRIGGERED2_R::new(((self.bits >> 2) & 1) != 0) + } + #[doc = "Bit 3 - Enable or disable interrupt for event TRIGGERED\\[3\\]"] + #[inline(always)] + pub fn triggered3(&self) -> TRIGGERED3_R { + TRIGGERED3_R::new(((self.bits >> 3) & 1) != 0) + } + #[doc = "Bit 4 - Enable or disable interrupt for event TRIGGERED\\[4\\]"] + #[inline(always)] + pub fn triggered4(&self) -> TRIGGERED4_R { + TRIGGERED4_R::new(((self.bits >> 4) & 1) != 0) + } + #[doc = "Bit 5 - Enable or disable interrupt for event TRIGGERED\\[5\\]"] + #[inline(always)] + pub fn triggered5(&self) -> TRIGGERED5_R { + TRIGGERED5_R::new(((self.bits >> 5) & 1) != 0) + } + #[doc = "Bit 6 - Enable or disable interrupt for event TRIGGERED\\[6\\]"] + #[inline(always)] + pub fn triggered6(&self) -> TRIGGERED6_R { + TRIGGERED6_R::new(((self.bits >> 6) & 1) != 0) + } + #[doc = "Bit 7 - Enable or disable interrupt for event TRIGGERED\\[7\\]"] + #[inline(always)] + pub fn triggered7(&self) -> TRIGGERED7_R { + TRIGGERED7_R::new(((self.bits >> 7) & 1) != 0) + } + #[doc = "Bit 8 - Enable or disable interrupt for event TRIGGERED\\[8\\]"] + #[inline(always)] + pub fn triggered8(&self) -> TRIGGERED8_R { + TRIGGERED8_R::new(((self.bits >> 8) & 1) != 0) + } + #[doc = "Bit 9 - Enable or disable interrupt for event TRIGGERED\\[9\\]"] + #[inline(always)] + pub fn triggered9(&self) -> TRIGGERED9_R { + TRIGGERED9_R::new(((self.bits >> 9) & 1) != 0) + } + #[doc = "Bit 10 - Enable or disable interrupt for event TRIGGERED\\[10\\]"] + #[inline(always)] + pub fn triggered10(&self) -> TRIGGERED10_R { + TRIGGERED10_R::new(((self.bits >> 10) & 1) != 0) + } + #[doc = "Bit 11 - Enable or disable interrupt for event TRIGGERED\\[11\\]"] + #[inline(always)] + pub fn triggered11(&self) -> TRIGGERED11_R { + TRIGGERED11_R::new(((self.bits >> 11) & 1) != 0) + } + #[doc = "Bit 12 - Enable or disable interrupt for event TRIGGERED\\[12\\]"] + #[inline(always)] + pub fn triggered12(&self) -> TRIGGERED12_R { + TRIGGERED12_R::new(((self.bits >> 12) & 1) != 0) + } + #[doc = "Bit 13 - Enable or disable interrupt for event TRIGGERED\\[13\\]"] + #[inline(always)] + pub fn triggered13(&self) -> TRIGGERED13_R { + TRIGGERED13_R::new(((self.bits >> 13) & 1) != 0) + } + #[doc = "Bit 14 - Enable or disable interrupt for event TRIGGERED\\[14\\]"] + #[inline(always)] + pub fn triggered14(&self) -> TRIGGERED14_R { + TRIGGERED14_R::new(((self.bits >> 14) & 1) != 0) + } + #[doc = "Bit 15 - Enable or disable interrupt for event TRIGGERED\\[15\\]"] + #[inline(always)] + pub fn triggered15(&self) -> TRIGGERED15_R { + TRIGGERED15_R::new(((self.bits >> 15) & 1) != 0) + } +} +impl W { + #[doc = "Bit 0 - Enable or disable interrupt for event TRIGGERED\\[0\\]"] + #[inline(always)] + #[must_use] + pub fn triggered0(&mut self) -> TRIGGERED0_W<0> { + TRIGGERED0_W::new(self) + } + #[doc = "Bit 1 - Enable or disable interrupt for event TRIGGERED\\[1\\]"] + #[inline(always)] + #[must_use] + pub fn triggered1(&mut self) -> TRIGGERED1_W<1> { + TRIGGERED1_W::new(self) + } + #[doc = "Bit 2 - Enable or disable interrupt for event TRIGGERED\\[2\\]"] + #[inline(always)] + #[must_use] + pub fn triggered2(&mut self) -> TRIGGERED2_W<2> { + TRIGGERED2_W::new(self) + } + #[doc = "Bit 3 - Enable or disable interrupt for event TRIGGERED\\[3\\]"] + #[inline(always)] + #[must_use] + pub fn triggered3(&mut self) -> TRIGGERED3_W<3> { + TRIGGERED3_W::new(self) + } + #[doc = "Bit 4 - Enable or disable interrupt for event TRIGGERED\\[4\\]"] + #[inline(always)] + #[must_use] + pub fn triggered4(&mut self) -> TRIGGERED4_W<4> { + TRIGGERED4_W::new(self) + } + #[doc = "Bit 5 - Enable or disable interrupt for event TRIGGERED\\[5\\]"] + #[inline(always)] + #[must_use] + pub fn triggered5(&mut self) -> TRIGGERED5_W<5> { + TRIGGERED5_W::new(self) + } + #[doc = "Bit 6 - Enable or disable interrupt for event TRIGGERED\\[6\\]"] + #[inline(always)] + #[must_use] + pub fn triggered6(&mut self) -> TRIGGERED6_W<6> { + TRIGGERED6_W::new(self) + } + #[doc = "Bit 7 - Enable or disable interrupt for event TRIGGERED\\[7\\]"] + #[inline(always)] + #[must_use] + pub fn triggered7(&mut self) -> TRIGGERED7_W<7> { + TRIGGERED7_W::new(self) + } + #[doc = "Bit 8 - Enable or disable interrupt for event TRIGGERED\\[8\\]"] + #[inline(always)] + #[must_use] + pub fn triggered8(&mut self) -> TRIGGERED8_W<8> { + TRIGGERED8_W::new(self) + } + #[doc = "Bit 9 - Enable or disable interrupt for event TRIGGERED\\[9\\]"] + #[inline(always)] + #[must_use] + pub fn triggered9(&mut self) -> TRIGGERED9_W<9> { + TRIGGERED9_W::new(self) + } + #[doc = "Bit 10 - Enable or disable interrupt for event TRIGGERED\\[10\\]"] + #[inline(always)] + #[must_use] + pub fn triggered10(&mut self) -> TRIGGERED10_W<10> { + TRIGGERED10_W::new(self) + } + #[doc = "Bit 11 - Enable or disable interrupt for event TRIGGERED\\[11\\]"] + #[inline(always)] + #[must_use] + pub fn triggered11(&mut self) -> TRIGGERED11_W<11> { + TRIGGERED11_W::new(self) + } + #[doc = "Bit 12 - Enable or disable interrupt for event TRIGGERED\\[12\\]"] + #[inline(always)] + #[must_use] + pub fn triggered12(&mut self) -> TRIGGERED12_W<12> { + TRIGGERED12_W::new(self) + } + #[doc = "Bit 13 - Enable or disable interrupt for event TRIGGERED\\[13\\]"] + #[inline(always)] + #[must_use] + pub fn triggered13(&mut self) -> TRIGGERED13_W<13> { + TRIGGERED13_W::new(self) + } + #[doc = "Bit 14 - Enable or disable interrupt for event TRIGGERED\\[14\\]"] + #[inline(always)] + #[must_use] + pub fn triggered14(&mut self) -> TRIGGERED14_W<14> { + TRIGGERED14_W::new(self) + } + #[doc = "Bit 15 - Enable or disable interrupt for event TRIGGERED\\[15\\]"] + #[inline(always)] + #[must_use] + pub fn triggered15(&mut self) -> TRIGGERED15_W<15> { + TRIGGERED15_W::new(self) + } + #[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 = "Enable or disable interrupt\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 [inten](index.html) module"] +pub struct INTEN_SPEC; +impl crate::RegisterSpec for INTEN_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [inten::R](R) reader structure"] +impl crate::Readable for INTEN_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [inten::W](W) writer structure"] +impl crate::Writable for INTEN_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets INTEN to value 0"] +impl crate::Resettable for INTEN_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/egu0/intenclr.rs b/down-the-stack/dk_pac/src/egu0/intenclr.rs new file mode 100644 index 0000000..d31f03f --- /dev/null +++ b/down-the-stack/dk_pac/src/egu0/intenclr.rs @@ -0,0 +1,1159 @@ +#[doc = "Register `INTENCLR` 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 `INTENCLR` 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 `TRIGGERED0` reader - Write '1' to disable interrupt for event TRIGGERED\\[0\\]"] +pub type TRIGGERED0_R = crate::BitReader; +#[doc = "Write '1' to disable interrupt for event TRIGGERED\\[0\\]\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum TRIGGERED0_A { + #[doc = "0: Read: Disabled"] + DISABLED = 0, + #[doc = "1: Read: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: TRIGGERED0_A) -> Self { + variant as u8 != 0 + } +} +impl TRIGGERED0_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> TRIGGERED0_A { + match self.bits { + false => TRIGGERED0_A::DISABLED, + true => TRIGGERED0_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == TRIGGERED0_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == TRIGGERED0_A::ENABLED + } +} +#[doc = "Write '1' to disable interrupt for event TRIGGERED\\[0\\]\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum TRIGGERED0_AW { + #[doc = "1: Disable"] + CLEAR = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: TRIGGERED0_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `TRIGGERED0` writer - Write '1' to disable interrupt for event TRIGGERED\\[0\\]"] +pub type TRIGGERED0_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENCLR_SPEC, TRIGGERED0_AW, O>; +impl<'a, const O: u8> TRIGGERED0_W<'a, O> { + #[doc = "Disable"] + #[inline(always)] + pub fn clear(self) -> &'a mut W { + self.variant(TRIGGERED0_AW::CLEAR) + } +} +#[doc = "Field `TRIGGERED1` reader - Write '1' to disable interrupt for event TRIGGERED\\[1\\]"] +pub type TRIGGERED1_R = crate::BitReader; +#[doc = "Write '1' to disable interrupt for event TRIGGERED\\[1\\]\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum TRIGGERED1_A { + #[doc = "0: Read: Disabled"] + DISABLED = 0, + #[doc = "1: Read: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: TRIGGERED1_A) -> Self { + variant as u8 != 0 + } +} +impl TRIGGERED1_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> TRIGGERED1_A { + match self.bits { + false => TRIGGERED1_A::DISABLED, + true => TRIGGERED1_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == TRIGGERED1_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == TRIGGERED1_A::ENABLED + } +} +#[doc = "Write '1' to disable interrupt for event TRIGGERED\\[1\\]\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum TRIGGERED1_AW { + #[doc = "1: Disable"] + CLEAR = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: TRIGGERED1_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `TRIGGERED1` writer - Write '1' to disable interrupt for event TRIGGERED\\[1\\]"] +pub type TRIGGERED1_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENCLR_SPEC, TRIGGERED1_AW, O>; +impl<'a, const O: u8> TRIGGERED1_W<'a, O> { + #[doc = "Disable"] + #[inline(always)] + pub fn clear(self) -> &'a mut W { + self.variant(TRIGGERED1_AW::CLEAR) + } +} +#[doc = "Field `TRIGGERED2` reader - Write '1' to disable interrupt for event TRIGGERED\\[2\\]"] +pub type TRIGGERED2_R = crate::BitReader; +#[doc = "Write '1' to disable interrupt for event TRIGGERED\\[2\\]\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum TRIGGERED2_A { + #[doc = "0: Read: Disabled"] + DISABLED = 0, + #[doc = "1: Read: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: TRIGGERED2_A) -> Self { + variant as u8 != 0 + } +} +impl TRIGGERED2_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> TRIGGERED2_A { + match self.bits { + false => TRIGGERED2_A::DISABLED, + true => TRIGGERED2_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == TRIGGERED2_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == TRIGGERED2_A::ENABLED + } +} +#[doc = "Write '1' to disable interrupt for event TRIGGERED\\[2\\]\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum TRIGGERED2_AW { + #[doc = "1: Disable"] + CLEAR = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: TRIGGERED2_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `TRIGGERED2` writer - Write '1' to disable interrupt for event TRIGGERED\\[2\\]"] +pub type TRIGGERED2_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENCLR_SPEC, TRIGGERED2_AW, O>; +impl<'a, const O: u8> TRIGGERED2_W<'a, O> { + #[doc = "Disable"] + #[inline(always)] + pub fn clear(self) -> &'a mut W { + self.variant(TRIGGERED2_AW::CLEAR) + } +} +#[doc = "Field `TRIGGERED3` reader - Write '1' to disable interrupt for event TRIGGERED\\[3\\]"] +pub type TRIGGERED3_R = crate::BitReader; +#[doc = "Write '1' to disable interrupt for event TRIGGERED\\[3\\]\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum TRIGGERED3_A { + #[doc = "0: Read: Disabled"] + DISABLED = 0, + #[doc = "1: Read: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: TRIGGERED3_A) -> Self { + variant as u8 != 0 + } +} +impl TRIGGERED3_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> TRIGGERED3_A { + match self.bits { + false => TRIGGERED3_A::DISABLED, + true => TRIGGERED3_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == TRIGGERED3_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == TRIGGERED3_A::ENABLED + } +} +#[doc = "Write '1' to disable interrupt for event TRIGGERED\\[3\\]\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum TRIGGERED3_AW { + #[doc = "1: Disable"] + CLEAR = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: TRIGGERED3_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `TRIGGERED3` writer - Write '1' to disable interrupt for event TRIGGERED\\[3\\]"] +pub type TRIGGERED3_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENCLR_SPEC, TRIGGERED3_AW, O>; +impl<'a, const O: u8> TRIGGERED3_W<'a, O> { + #[doc = "Disable"] + #[inline(always)] + pub fn clear(self) -> &'a mut W { + self.variant(TRIGGERED3_AW::CLEAR) + } +} +#[doc = "Field `TRIGGERED4` reader - Write '1' to disable interrupt for event TRIGGERED\\[4\\]"] +pub type TRIGGERED4_R = crate::BitReader; +#[doc = "Write '1' to disable interrupt for event TRIGGERED\\[4\\]\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum TRIGGERED4_A { + #[doc = "0: Read: Disabled"] + DISABLED = 0, + #[doc = "1: Read: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: TRIGGERED4_A) -> Self { + variant as u8 != 0 + } +} +impl TRIGGERED4_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> TRIGGERED4_A { + match self.bits { + false => TRIGGERED4_A::DISABLED, + true => TRIGGERED4_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == TRIGGERED4_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == TRIGGERED4_A::ENABLED + } +} +#[doc = "Write '1' to disable interrupt for event TRIGGERED\\[4\\]\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum TRIGGERED4_AW { + #[doc = "1: Disable"] + CLEAR = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: TRIGGERED4_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `TRIGGERED4` writer - Write '1' to disable interrupt for event TRIGGERED\\[4\\]"] +pub type TRIGGERED4_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENCLR_SPEC, TRIGGERED4_AW, O>; +impl<'a, const O: u8> TRIGGERED4_W<'a, O> { + #[doc = "Disable"] + #[inline(always)] + pub fn clear(self) -> &'a mut W { + self.variant(TRIGGERED4_AW::CLEAR) + } +} +#[doc = "Field `TRIGGERED5` reader - Write '1' to disable interrupt for event TRIGGERED\\[5\\]"] +pub type TRIGGERED5_R = crate::BitReader; +#[doc = "Write '1' to disable interrupt for event TRIGGERED\\[5\\]\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum TRIGGERED5_A { + #[doc = "0: Read: Disabled"] + DISABLED = 0, + #[doc = "1: Read: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: TRIGGERED5_A) -> Self { + variant as u8 != 0 + } +} +impl TRIGGERED5_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> TRIGGERED5_A { + match self.bits { + false => TRIGGERED5_A::DISABLED, + true => TRIGGERED5_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == TRIGGERED5_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == TRIGGERED5_A::ENABLED + } +} +#[doc = "Write '1' to disable interrupt for event TRIGGERED\\[5\\]\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum TRIGGERED5_AW { + #[doc = "1: Disable"] + CLEAR = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: TRIGGERED5_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `TRIGGERED5` writer - Write '1' to disable interrupt for event TRIGGERED\\[5\\]"] +pub type TRIGGERED5_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENCLR_SPEC, TRIGGERED5_AW, O>; +impl<'a, const O: u8> TRIGGERED5_W<'a, O> { + #[doc = "Disable"] + #[inline(always)] + pub fn clear(self) -> &'a mut W { + self.variant(TRIGGERED5_AW::CLEAR) + } +} +#[doc = "Field `TRIGGERED6` reader - Write '1' to disable interrupt for event TRIGGERED\\[6\\]"] +pub type TRIGGERED6_R = crate::BitReader; +#[doc = "Write '1' to disable interrupt for event TRIGGERED\\[6\\]\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum TRIGGERED6_A { + #[doc = "0: Read: Disabled"] + DISABLED = 0, + #[doc = "1: Read: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: TRIGGERED6_A) -> Self { + variant as u8 != 0 + } +} +impl TRIGGERED6_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> TRIGGERED6_A { + match self.bits { + false => TRIGGERED6_A::DISABLED, + true => TRIGGERED6_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == TRIGGERED6_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == TRIGGERED6_A::ENABLED + } +} +#[doc = "Write '1' to disable interrupt for event TRIGGERED\\[6\\]\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum TRIGGERED6_AW { + #[doc = "1: Disable"] + CLEAR = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: TRIGGERED6_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `TRIGGERED6` writer - Write '1' to disable interrupt for event TRIGGERED\\[6\\]"] +pub type TRIGGERED6_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENCLR_SPEC, TRIGGERED6_AW, O>; +impl<'a, const O: u8> TRIGGERED6_W<'a, O> { + #[doc = "Disable"] + #[inline(always)] + pub fn clear(self) -> &'a mut W { + self.variant(TRIGGERED6_AW::CLEAR) + } +} +#[doc = "Field `TRIGGERED7` reader - Write '1' to disable interrupt for event TRIGGERED\\[7\\]"] +pub type TRIGGERED7_R = crate::BitReader; +#[doc = "Write '1' to disable interrupt for event TRIGGERED\\[7\\]\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum TRIGGERED7_A { + #[doc = "0: Read: Disabled"] + DISABLED = 0, + #[doc = "1: Read: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: TRIGGERED7_A) -> Self { + variant as u8 != 0 + } +} +impl TRIGGERED7_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> TRIGGERED7_A { + match self.bits { + false => TRIGGERED7_A::DISABLED, + true => TRIGGERED7_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == TRIGGERED7_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == TRIGGERED7_A::ENABLED + } +} +#[doc = "Write '1' to disable interrupt for event TRIGGERED\\[7\\]\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum TRIGGERED7_AW { + #[doc = "1: Disable"] + CLEAR = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: TRIGGERED7_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `TRIGGERED7` writer - Write '1' to disable interrupt for event TRIGGERED\\[7\\]"] +pub type TRIGGERED7_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENCLR_SPEC, TRIGGERED7_AW, O>; +impl<'a, const O: u8> TRIGGERED7_W<'a, O> { + #[doc = "Disable"] + #[inline(always)] + pub fn clear(self) -> &'a mut W { + self.variant(TRIGGERED7_AW::CLEAR) + } +} +#[doc = "Field `TRIGGERED8` reader - Write '1' to disable interrupt for event TRIGGERED\\[8\\]"] +pub type TRIGGERED8_R = crate::BitReader; +#[doc = "Write '1' to disable interrupt for event TRIGGERED\\[8\\]\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum TRIGGERED8_A { + #[doc = "0: Read: Disabled"] + DISABLED = 0, + #[doc = "1: Read: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: TRIGGERED8_A) -> Self { + variant as u8 != 0 + } +} +impl TRIGGERED8_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> TRIGGERED8_A { + match self.bits { + false => TRIGGERED8_A::DISABLED, + true => TRIGGERED8_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == TRIGGERED8_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == TRIGGERED8_A::ENABLED + } +} +#[doc = "Write '1' to disable interrupt for event TRIGGERED\\[8\\]\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum TRIGGERED8_AW { + #[doc = "1: Disable"] + CLEAR = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: TRIGGERED8_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `TRIGGERED8` writer - Write '1' to disable interrupt for event TRIGGERED\\[8\\]"] +pub type TRIGGERED8_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENCLR_SPEC, TRIGGERED8_AW, O>; +impl<'a, const O: u8> TRIGGERED8_W<'a, O> { + #[doc = "Disable"] + #[inline(always)] + pub fn clear(self) -> &'a mut W { + self.variant(TRIGGERED8_AW::CLEAR) + } +} +#[doc = "Field `TRIGGERED9` reader - Write '1' to disable interrupt for event TRIGGERED\\[9\\]"] +pub type TRIGGERED9_R = crate::BitReader; +#[doc = "Write '1' to disable interrupt for event TRIGGERED\\[9\\]\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum TRIGGERED9_A { + #[doc = "0: Read: Disabled"] + DISABLED = 0, + #[doc = "1: Read: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: TRIGGERED9_A) -> Self { + variant as u8 != 0 + } +} +impl TRIGGERED9_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> TRIGGERED9_A { + match self.bits { + false => TRIGGERED9_A::DISABLED, + true => TRIGGERED9_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == TRIGGERED9_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == TRIGGERED9_A::ENABLED + } +} +#[doc = "Write '1' to disable interrupt for event TRIGGERED\\[9\\]\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum TRIGGERED9_AW { + #[doc = "1: Disable"] + CLEAR = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: TRIGGERED9_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `TRIGGERED9` writer - Write '1' to disable interrupt for event TRIGGERED\\[9\\]"] +pub type TRIGGERED9_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENCLR_SPEC, TRIGGERED9_AW, O>; +impl<'a, const O: u8> TRIGGERED9_W<'a, O> { + #[doc = "Disable"] + #[inline(always)] + pub fn clear(self) -> &'a mut W { + self.variant(TRIGGERED9_AW::CLEAR) + } +} +#[doc = "Field `TRIGGERED10` reader - Write '1' to disable interrupt for event TRIGGERED\\[10\\]"] +pub type TRIGGERED10_R = crate::BitReader; +#[doc = "Write '1' to disable interrupt for event TRIGGERED\\[10\\]\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum TRIGGERED10_A { + #[doc = "0: Read: Disabled"] + DISABLED = 0, + #[doc = "1: Read: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: TRIGGERED10_A) -> Self { + variant as u8 != 0 + } +} +impl TRIGGERED10_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> TRIGGERED10_A { + match self.bits { + false => TRIGGERED10_A::DISABLED, + true => TRIGGERED10_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == TRIGGERED10_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == TRIGGERED10_A::ENABLED + } +} +#[doc = "Write '1' to disable interrupt for event TRIGGERED\\[10\\]\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum TRIGGERED10_AW { + #[doc = "1: Disable"] + CLEAR = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: TRIGGERED10_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `TRIGGERED10` writer - Write '1' to disable interrupt for event TRIGGERED\\[10\\]"] +pub type TRIGGERED10_W<'a, const O: u8> = + crate::BitWriter<'a, u32, INTENCLR_SPEC, TRIGGERED10_AW, O>; +impl<'a, const O: u8> TRIGGERED10_W<'a, O> { + #[doc = "Disable"] + #[inline(always)] + pub fn clear(self) -> &'a mut W { + self.variant(TRIGGERED10_AW::CLEAR) + } +} +#[doc = "Field `TRIGGERED11` reader - Write '1' to disable interrupt for event TRIGGERED\\[11\\]"] +pub type TRIGGERED11_R = crate::BitReader; +#[doc = "Write '1' to disable interrupt for event TRIGGERED\\[11\\]\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum TRIGGERED11_A { + #[doc = "0: Read: Disabled"] + DISABLED = 0, + #[doc = "1: Read: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: TRIGGERED11_A) -> Self { + variant as u8 != 0 + } +} +impl TRIGGERED11_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> TRIGGERED11_A { + match self.bits { + false => TRIGGERED11_A::DISABLED, + true => TRIGGERED11_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == TRIGGERED11_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == TRIGGERED11_A::ENABLED + } +} +#[doc = "Write '1' to disable interrupt for event TRIGGERED\\[11\\]\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum TRIGGERED11_AW { + #[doc = "1: Disable"] + CLEAR = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: TRIGGERED11_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `TRIGGERED11` writer - Write '1' to disable interrupt for event TRIGGERED\\[11\\]"] +pub type TRIGGERED11_W<'a, const O: u8> = + crate::BitWriter<'a, u32, INTENCLR_SPEC, TRIGGERED11_AW, O>; +impl<'a, const O: u8> TRIGGERED11_W<'a, O> { + #[doc = "Disable"] + #[inline(always)] + pub fn clear(self) -> &'a mut W { + self.variant(TRIGGERED11_AW::CLEAR) + } +} +#[doc = "Field `TRIGGERED12` reader - Write '1' to disable interrupt for event TRIGGERED\\[12\\]"] +pub type TRIGGERED12_R = crate::BitReader; +#[doc = "Write '1' to disable interrupt for event TRIGGERED\\[12\\]\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum TRIGGERED12_A { + #[doc = "0: Read: Disabled"] + DISABLED = 0, + #[doc = "1: Read: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: TRIGGERED12_A) -> Self { + variant as u8 != 0 + } +} +impl TRIGGERED12_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> TRIGGERED12_A { + match self.bits { + false => TRIGGERED12_A::DISABLED, + true => TRIGGERED12_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == TRIGGERED12_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == TRIGGERED12_A::ENABLED + } +} +#[doc = "Write '1' to disable interrupt for event TRIGGERED\\[12\\]\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum TRIGGERED12_AW { + #[doc = "1: Disable"] + CLEAR = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: TRIGGERED12_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `TRIGGERED12` writer - Write '1' to disable interrupt for event TRIGGERED\\[12\\]"] +pub type TRIGGERED12_W<'a, const O: u8> = + crate::BitWriter<'a, u32, INTENCLR_SPEC, TRIGGERED12_AW, O>; +impl<'a, const O: u8> TRIGGERED12_W<'a, O> { + #[doc = "Disable"] + #[inline(always)] + pub fn clear(self) -> &'a mut W { + self.variant(TRIGGERED12_AW::CLEAR) + } +} +#[doc = "Field `TRIGGERED13` reader - Write '1' to disable interrupt for event TRIGGERED\\[13\\]"] +pub type TRIGGERED13_R = crate::BitReader; +#[doc = "Write '1' to disable interrupt for event TRIGGERED\\[13\\]\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum TRIGGERED13_A { + #[doc = "0: Read: Disabled"] + DISABLED = 0, + #[doc = "1: Read: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: TRIGGERED13_A) -> Self { + variant as u8 != 0 + } +} +impl TRIGGERED13_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> TRIGGERED13_A { + match self.bits { + false => TRIGGERED13_A::DISABLED, + true => TRIGGERED13_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == TRIGGERED13_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == TRIGGERED13_A::ENABLED + } +} +#[doc = "Write '1' to disable interrupt for event TRIGGERED\\[13\\]\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum TRIGGERED13_AW { + #[doc = "1: Disable"] + CLEAR = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: TRIGGERED13_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `TRIGGERED13` writer - Write '1' to disable interrupt for event TRIGGERED\\[13\\]"] +pub type TRIGGERED13_W<'a, const O: u8> = + crate::BitWriter<'a, u32, INTENCLR_SPEC, TRIGGERED13_AW, O>; +impl<'a, const O: u8> TRIGGERED13_W<'a, O> { + #[doc = "Disable"] + #[inline(always)] + pub fn clear(self) -> &'a mut W { + self.variant(TRIGGERED13_AW::CLEAR) + } +} +#[doc = "Field `TRIGGERED14` reader - Write '1' to disable interrupt for event TRIGGERED\\[14\\]"] +pub type TRIGGERED14_R = crate::BitReader; +#[doc = "Write '1' to disable interrupt for event TRIGGERED\\[14\\]\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum TRIGGERED14_A { + #[doc = "0: Read: Disabled"] + DISABLED = 0, + #[doc = "1: Read: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: TRIGGERED14_A) -> Self { + variant as u8 != 0 + } +} +impl TRIGGERED14_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> TRIGGERED14_A { + match self.bits { + false => TRIGGERED14_A::DISABLED, + true => TRIGGERED14_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == TRIGGERED14_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == TRIGGERED14_A::ENABLED + } +} +#[doc = "Write '1' to disable interrupt for event TRIGGERED\\[14\\]\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum TRIGGERED14_AW { + #[doc = "1: Disable"] + CLEAR = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: TRIGGERED14_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `TRIGGERED14` writer - Write '1' to disable interrupt for event TRIGGERED\\[14\\]"] +pub type TRIGGERED14_W<'a, const O: u8> = + crate::BitWriter<'a, u32, INTENCLR_SPEC, TRIGGERED14_AW, O>; +impl<'a, const O: u8> TRIGGERED14_W<'a, O> { + #[doc = "Disable"] + #[inline(always)] + pub fn clear(self) -> &'a mut W { + self.variant(TRIGGERED14_AW::CLEAR) + } +} +#[doc = "Field `TRIGGERED15` reader - Write '1' to disable interrupt for event TRIGGERED\\[15\\]"] +pub type TRIGGERED15_R = crate::BitReader; +#[doc = "Write '1' to disable interrupt for event TRIGGERED\\[15\\]\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum TRIGGERED15_A { + #[doc = "0: Read: Disabled"] + DISABLED = 0, + #[doc = "1: Read: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: TRIGGERED15_A) -> Self { + variant as u8 != 0 + } +} +impl TRIGGERED15_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> TRIGGERED15_A { + match self.bits { + false => TRIGGERED15_A::DISABLED, + true => TRIGGERED15_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == TRIGGERED15_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == TRIGGERED15_A::ENABLED + } +} +#[doc = "Write '1' to disable interrupt for event TRIGGERED\\[15\\]\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum TRIGGERED15_AW { + #[doc = "1: Disable"] + CLEAR = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: TRIGGERED15_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `TRIGGERED15` writer - Write '1' to disable interrupt for event TRIGGERED\\[15\\]"] +pub type TRIGGERED15_W<'a, const O: u8> = + crate::BitWriter<'a, u32, INTENCLR_SPEC, TRIGGERED15_AW, O>; +impl<'a, const O: u8> TRIGGERED15_W<'a, O> { + #[doc = "Disable"] + #[inline(always)] + pub fn clear(self) -> &'a mut W { + self.variant(TRIGGERED15_AW::CLEAR) + } +} +impl R { + #[doc = "Bit 0 - Write '1' to disable interrupt for event TRIGGERED\\[0\\]"] + #[inline(always)] + pub fn triggered0(&self) -> TRIGGERED0_R { + TRIGGERED0_R::new((self.bits & 1) != 0) + } + #[doc = "Bit 1 - Write '1' to disable interrupt for event TRIGGERED\\[1\\]"] + #[inline(always)] + pub fn triggered1(&self) -> TRIGGERED1_R { + TRIGGERED1_R::new(((self.bits >> 1) & 1) != 0) + } + #[doc = "Bit 2 - Write '1' to disable interrupt for event TRIGGERED\\[2\\]"] + #[inline(always)] + pub fn triggered2(&self) -> TRIGGERED2_R { + TRIGGERED2_R::new(((self.bits >> 2) & 1) != 0) + } + #[doc = "Bit 3 - Write '1' to disable interrupt for event TRIGGERED\\[3\\]"] + #[inline(always)] + pub fn triggered3(&self) -> TRIGGERED3_R { + TRIGGERED3_R::new(((self.bits >> 3) & 1) != 0) + } + #[doc = "Bit 4 - Write '1' to disable interrupt for event TRIGGERED\\[4\\]"] + #[inline(always)] + pub fn triggered4(&self) -> TRIGGERED4_R { + TRIGGERED4_R::new(((self.bits >> 4) & 1) != 0) + } + #[doc = "Bit 5 - Write '1' to disable interrupt for event TRIGGERED\\[5\\]"] + #[inline(always)] + pub fn triggered5(&self) -> TRIGGERED5_R { + TRIGGERED5_R::new(((self.bits >> 5) & 1) != 0) + } + #[doc = "Bit 6 - Write '1' to disable interrupt for event TRIGGERED\\[6\\]"] + #[inline(always)] + pub fn triggered6(&self) -> TRIGGERED6_R { + TRIGGERED6_R::new(((self.bits >> 6) & 1) != 0) + } + #[doc = "Bit 7 - Write '1' to disable interrupt for event TRIGGERED\\[7\\]"] + #[inline(always)] + pub fn triggered7(&self) -> TRIGGERED7_R { + TRIGGERED7_R::new(((self.bits >> 7) & 1) != 0) + } + #[doc = "Bit 8 - Write '1' to disable interrupt for event TRIGGERED\\[8\\]"] + #[inline(always)] + pub fn triggered8(&self) -> TRIGGERED8_R { + TRIGGERED8_R::new(((self.bits >> 8) & 1) != 0) + } + #[doc = "Bit 9 - Write '1' to disable interrupt for event TRIGGERED\\[9\\]"] + #[inline(always)] + pub fn triggered9(&self) -> TRIGGERED9_R { + TRIGGERED9_R::new(((self.bits >> 9) & 1) != 0) + } + #[doc = "Bit 10 - Write '1' to disable interrupt for event TRIGGERED\\[10\\]"] + #[inline(always)] + pub fn triggered10(&self) -> TRIGGERED10_R { + TRIGGERED10_R::new(((self.bits >> 10) & 1) != 0) + } + #[doc = "Bit 11 - Write '1' to disable interrupt for event TRIGGERED\\[11\\]"] + #[inline(always)] + pub fn triggered11(&self) -> TRIGGERED11_R { + TRIGGERED11_R::new(((self.bits >> 11) & 1) != 0) + } + #[doc = "Bit 12 - Write '1' to disable interrupt for event TRIGGERED\\[12\\]"] + #[inline(always)] + pub fn triggered12(&self) -> TRIGGERED12_R { + TRIGGERED12_R::new(((self.bits >> 12) & 1) != 0) + } + #[doc = "Bit 13 - Write '1' to disable interrupt for event TRIGGERED\\[13\\]"] + #[inline(always)] + pub fn triggered13(&self) -> TRIGGERED13_R { + TRIGGERED13_R::new(((self.bits >> 13) & 1) != 0) + } + #[doc = "Bit 14 - Write '1' to disable interrupt for event TRIGGERED\\[14\\]"] + #[inline(always)] + pub fn triggered14(&self) -> TRIGGERED14_R { + TRIGGERED14_R::new(((self.bits >> 14) & 1) != 0) + } + #[doc = "Bit 15 - Write '1' to disable interrupt for event TRIGGERED\\[15\\]"] + #[inline(always)] + pub fn triggered15(&self) -> TRIGGERED15_R { + TRIGGERED15_R::new(((self.bits >> 15) & 1) != 0) + } +} +impl W { + #[doc = "Bit 0 - Write '1' to disable interrupt for event TRIGGERED\\[0\\]"] + #[inline(always)] + #[must_use] + pub fn triggered0(&mut self) -> TRIGGERED0_W<0> { + TRIGGERED0_W::new(self) + } + #[doc = "Bit 1 - Write '1' to disable interrupt for event TRIGGERED\\[1\\]"] + #[inline(always)] + #[must_use] + pub fn triggered1(&mut self) -> TRIGGERED1_W<1> { + TRIGGERED1_W::new(self) + } + #[doc = "Bit 2 - Write '1' to disable interrupt for event TRIGGERED\\[2\\]"] + #[inline(always)] + #[must_use] + pub fn triggered2(&mut self) -> TRIGGERED2_W<2> { + TRIGGERED2_W::new(self) + } + #[doc = "Bit 3 - Write '1' to disable interrupt for event TRIGGERED\\[3\\]"] + #[inline(always)] + #[must_use] + pub fn triggered3(&mut self) -> TRIGGERED3_W<3> { + TRIGGERED3_W::new(self) + } + #[doc = "Bit 4 - Write '1' to disable interrupt for event TRIGGERED\\[4\\]"] + #[inline(always)] + #[must_use] + pub fn triggered4(&mut self) -> TRIGGERED4_W<4> { + TRIGGERED4_W::new(self) + } + #[doc = "Bit 5 - Write '1' to disable interrupt for event TRIGGERED\\[5\\]"] + #[inline(always)] + #[must_use] + pub fn triggered5(&mut self) -> TRIGGERED5_W<5> { + TRIGGERED5_W::new(self) + } + #[doc = "Bit 6 - Write '1' to disable interrupt for event TRIGGERED\\[6\\]"] + #[inline(always)] + #[must_use] + pub fn triggered6(&mut self) -> TRIGGERED6_W<6> { + TRIGGERED6_W::new(self) + } + #[doc = "Bit 7 - Write '1' to disable interrupt for event TRIGGERED\\[7\\]"] + #[inline(always)] + #[must_use] + pub fn triggered7(&mut self) -> TRIGGERED7_W<7> { + TRIGGERED7_W::new(self) + } + #[doc = "Bit 8 - Write '1' to disable interrupt for event TRIGGERED\\[8\\]"] + #[inline(always)] + #[must_use] + pub fn triggered8(&mut self) -> TRIGGERED8_W<8> { + TRIGGERED8_W::new(self) + } + #[doc = "Bit 9 - Write '1' to disable interrupt for event TRIGGERED\\[9\\]"] + #[inline(always)] + #[must_use] + pub fn triggered9(&mut self) -> TRIGGERED9_W<9> { + TRIGGERED9_W::new(self) + } + #[doc = "Bit 10 - Write '1' to disable interrupt for event TRIGGERED\\[10\\]"] + #[inline(always)] + #[must_use] + pub fn triggered10(&mut self) -> TRIGGERED10_W<10> { + TRIGGERED10_W::new(self) + } + #[doc = "Bit 11 - Write '1' to disable interrupt for event TRIGGERED\\[11\\]"] + #[inline(always)] + #[must_use] + pub fn triggered11(&mut self) -> TRIGGERED11_W<11> { + TRIGGERED11_W::new(self) + } + #[doc = "Bit 12 - Write '1' to disable interrupt for event TRIGGERED\\[12\\]"] + #[inline(always)] + #[must_use] + pub fn triggered12(&mut self) -> TRIGGERED12_W<12> { + TRIGGERED12_W::new(self) + } + #[doc = "Bit 13 - Write '1' to disable interrupt for event TRIGGERED\\[13\\]"] + #[inline(always)] + #[must_use] + pub fn triggered13(&mut self) -> TRIGGERED13_W<13> { + TRIGGERED13_W::new(self) + } + #[doc = "Bit 14 - Write '1' to disable interrupt for event TRIGGERED\\[14\\]"] + #[inline(always)] + #[must_use] + pub fn triggered14(&mut self) -> TRIGGERED14_W<14> { + TRIGGERED14_W::new(self) + } + #[doc = "Bit 15 - Write '1' to disable interrupt for event TRIGGERED\\[15\\]"] + #[inline(always)] + #[must_use] + pub fn triggered15(&mut self) -> TRIGGERED15_W<15> { + TRIGGERED15_W::new(self) + } + #[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 = "Disable interrupt\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 [intenclr](index.html) module"] +pub struct INTENCLR_SPEC; +impl crate::RegisterSpec for INTENCLR_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [intenclr::R](R) reader structure"] +impl crate::Readable for INTENCLR_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [intenclr::W](W) writer structure"] +impl crate::Writable for INTENCLR_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets INTENCLR to value 0"] +impl crate::Resettable for INTENCLR_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/egu0/intenset.rs b/down-the-stack/dk_pac/src/egu0/intenset.rs new file mode 100644 index 0000000..6d96b8c --- /dev/null +++ b/down-the-stack/dk_pac/src/egu0/intenset.rs @@ -0,0 +1,1159 @@ +#[doc = "Register `INTENSET` 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 `INTENSET` 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 `TRIGGERED0` reader - Write '1' to enable interrupt for event TRIGGERED\\[0\\]"] +pub type TRIGGERED0_R = crate::BitReader; +#[doc = "Write '1' to enable interrupt for event TRIGGERED\\[0\\]\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum TRIGGERED0_A { + #[doc = "0: Read: Disabled"] + DISABLED = 0, + #[doc = "1: Read: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: TRIGGERED0_A) -> Self { + variant as u8 != 0 + } +} +impl TRIGGERED0_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> TRIGGERED0_A { + match self.bits { + false => TRIGGERED0_A::DISABLED, + true => TRIGGERED0_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == TRIGGERED0_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == TRIGGERED0_A::ENABLED + } +} +#[doc = "Write '1' to enable interrupt for event TRIGGERED\\[0\\]\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum TRIGGERED0_AW { + #[doc = "1: Enable"] + SET = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: TRIGGERED0_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `TRIGGERED0` writer - Write '1' to enable interrupt for event TRIGGERED\\[0\\]"] +pub type TRIGGERED0_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENSET_SPEC, TRIGGERED0_AW, O>; +impl<'a, const O: u8> TRIGGERED0_W<'a, O> { + #[doc = "Enable"] + #[inline(always)] + pub fn set(self) -> &'a mut W { + self.variant(TRIGGERED0_AW::SET) + } +} +#[doc = "Field `TRIGGERED1` reader - Write '1' to enable interrupt for event TRIGGERED\\[1\\]"] +pub type TRIGGERED1_R = crate::BitReader; +#[doc = "Write '1' to enable interrupt for event TRIGGERED\\[1\\]\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum TRIGGERED1_A { + #[doc = "0: Read: Disabled"] + DISABLED = 0, + #[doc = "1: Read: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: TRIGGERED1_A) -> Self { + variant as u8 != 0 + } +} +impl TRIGGERED1_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> TRIGGERED1_A { + match self.bits { + false => TRIGGERED1_A::DISABLED, + true => TRIGGERED1_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == TRIGGERED1_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == TRIGGERED1_A::ENABLED + } +} +#[doc = "Write '1' to enable interrupt for event TRIGGERED\\[1\\]\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum TRIGGERED1_AW { + #[doc = "1: Enable"] + SET = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: TRIGGERED1_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `TRIGGERED1` writer - Write '1' to enable interrupt for event TRIGGERED\\[1\\]"] +pub type TRIGGERED1_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENSET_SPEC, TRIGGERED1_AW, O>; +impl<'a, const O: u8> TRIGGERED1_W<'a, O> { + #[doc = "Enable"] + #[inline(always)] + pub fn set(self) -> &'a mut W { + self.variant(TRIGGERED1_AW::SET) + } +} +#[doc = "Field `TRIGGERED2` reader - Write '1' to enable interrupt for event TRIGGERED\\[2\\]"] +pub type TRIGGERED2_R = crate::BitReader; +#[doc = "Write '1' to enable interrupt for event TRIGGERED\\[2\\]\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum TRIGGERED2_A { + #[doc = "0: Read: Disabled"] + DISABLED = 0, + #[doc = "1: Read: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: TRIGGERED2_A) -> Self { + variant as u8 != 0 + } +} +impl TRIGGERED2_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> TRIGGERED2_A { + match self.bits { + false => TRIGGERED2_A::DISABLED, + true => TRIGGERED2_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == TRIGGERED2_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == TRIGGERED2_A::ENABLED + } +} +#[doc = "Write '1' to enable interrupt for event TRIGGERED\\[2\\]\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum TRIGGERED2_AW { + #[doc = "1: Enable"] + SET = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: TRIGGERED2_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `TRIGGERED2` writer - Write '1' to enable interrupt for event TRIGGERED\\[2\\]"] +pub type TRIGGERED2_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENSET_SPEC, TRIGGERED2_AW, O>; +impl<'a, const O: u8> TRIGGERED2_W<'a, O> { + #[doc = "Enable"] + #[inline(always)] + pub fn set(self) -> &'a mut W { + self.variant(TRIGGERED2_AW::SET) + } +} +#[doc = "Field `TRIGGERED3` reader - Write '1' to enable interrupt for event TRIGGERED\\[3\\]"] +pub type TRIGGERED3_R = crate::BitReader; +#[doc = "Write '1' to enable interrupt for event TRIGGERED\\[3\\]\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum TRIGGERED3_A { + #[doc = "0: Read: Disabled"] + DISABLED = 0, + #[doc = "1: Read: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: TRIGGERED3_A) -> Self { + variant as u8 != 0 + } +} +impl TRIGGERED3_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> TRIGGERED3_A { + match self.bits { + false => TRIGGERED3_A::DISABLED, + true => TRIGGERED3_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == TRIGGERED3_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == TRIGGERED3_A::ENABLED + } +} +#[doc = "Write '1' to enable interrupt for event TRIGGERED\\[3\\]\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum TRIGGERED3_AW { + #[doc = "1: Enable"] + SET = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: TRIGGERED3_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `TRIGGERED3` writer - Write '1' to enable interrupt for event TRIGGERED\\[3\\]"] +pub type TRIGGERED3_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENSET_SPEC, TRIGGERED3_AW, O>; +impl<'a, const O: u8> TRIGGERED3_W<'a, O> { + #[doc = "Enable"] + #[inline(always)] + pub fn set(self) -> &'a mut W { + self.variant(TRIGGERED3_AW::SET) + } +} +#[doc = "Field `TRIGGERED4` reader - Write '1' to enable interrupt for event TRIGGERED\\[4\\]"] +pub type TRIGGERED4_R = crate::BitReader; +#[doc = "Write '1' to enable interrupt for event TRIGGERED\\[4\\]\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum TRIGGERED4_A { + #[doc = "0: Read: Disabled"] + DISABLED = 0, + #[doc = "1: Read: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: TRIGGERED4_A) -> Self { + variant as u8 != 0 + } +} +impl TRIGGERED4_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> TRIGGERED4_A { + match self.bits { + false => TRIGGERED4_A::DISABLED, + true => TRIGGERED4_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == TRIGGERED4_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == TRIGGERED4_A::ENABLED + } +} +#[doc = "Write '1' to enable interrupt for event TRIGGERED\\[4\\]\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum TRIGGERED4_AW { + #[doc = "1: Enable"] + SET = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: TRIGGERED4_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `TRIGGERED4` writer - Write '1' to enable interrupt for event TRIGGERED\\[4\\]"] +pub type TRIGGERED4_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENSET_SPEC, TRIGGERED4_AW, O>; +impl<'a, const O: u8> TRIGGERED4_W<'a, O> { + #[doc = "Enable"] + #[inline(always)] + pub fn set(self) -> &'a mut W { + self.variant(TRIGGERED4_AW::SET) + } +} +#[doc = "Field `TRIGGERED5` reader - Write '1' to enable interrupt for event TRIGGERED\\[5\\]"] +pub type TRIGGERED5_R = crate::BitReader; +#[doc = "Write '1' to enable interrupt for event TRIGGERED\\[5\\]\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum TRIGGERED5_A { + #[doc = "0: Read: Disabled"] + DISABLED = 0, + #[doc = "1: Read: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: TRIGGERED5_A) -> Self { + variant as u8 != 0 + } +} +impl TRIGGERED5_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> TRIGGERED5_A { + match self.bits { + false => TRIGGERED5_A::DISABLED, + true => TRIGGERED5_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == TRIGGERED5_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == TRIGGERED5_A::ENABLED + } +} +#[doc = "Write '1' to enable interrupt for event TRIGGERED\\[5\\]\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum TRIGGERED5_AW { + #[doc = "1: Enable"] + SET = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: TRIGGERED5_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `TRIGGERED5` writer - Write '1' to enable interrupt for event TRIGGERED\\[5\\]"] +pub type TRIGGERED5_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENSET_SPEC, TRIGGERED5_AW, O>; +impl<'a, const O: u8> TRIGGERED5_W<'a, O> { + #[doc = "Enable"] + #[inline(always)] + pub fn set(self) -> &'a mut W { + self.variant(TRIGGERED5_AW::SET) + } +} +#[doc = "Field `TRIGGERED6` reader - Write '1' to enable interrupt for event TRIGGERED\\[6\\]"] +pub type TRIGGERED6_R = crate::BitReader; +#[doc = "Write '1' to enable interrupt for event TRIGGERED\\[6\\]\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum TRIGGERED6_A { + #[doc = "0: Read: Disabled"] + DISABLED = 0, + #[doc = "1: Read: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: TRIGGERED6_A) -> Self { + variant as u8 != 0 + } +} +impl TRIGGERED6_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> TRIGGERED6_A { + match self.bits { + false => TRIGGERED6_A::DISABLED, + true => TRIGGERED6_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == TRIGGERED6_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == TRIGGERED6_A::ENABLED + } +} +#[doc = "Write '1' to enable interrupt for event TRIGGERED\\[6\\]\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum TRIGGERED6_AW { + #[doc = "1: Enable"] + SET = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: TRIGGERED6_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `TRIGGERED6` writer - Write '1' to enable interrupt for event TRIGGERED\\[6\\]"] +pub type TRIGGERED6_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENSET_SPEC, TRIGGERED6_AW, O>; +impl<'a, const O: u8> TRIGGERED6_W<'a, O> { + #[doc = "Enable"] + #[inline(always)] + pub fn set(self) -> &'a mut W { + self.variant(TRIGGERED6_AW::SET) + } +} +#[doc = "Field `TRIGGERED7` reader - Write '1' to enable interrupt for event TRIGGERED\\[7\\]"] +pub type TRIGGERED7_R = crate::BitReader; +#[doc = "Write '1' to enable interrupt for event TRIGGERED\\[7\\]\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum TRIGGERED7_A { + #[doc = "0: Read: Disabled"] + DISABLED = 0, + #[doc = "1: Read: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: TRIGGERED7_A) -> Self { + variant as u8 != 0 + } +} +impl TRIGGERED7_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> TRIGGERED7_A { + match self.bits { + false => TRIGGERED7_A::DISABLED, + true => TRIGGERED7_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == TRIGGERED7_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == TRIGGERED7_A::ENABLED + } +} +#[doc = "Write '1' to enable interrupt for event TRIGGERED\\[7\\]\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum TRIGGERED7_AW { + #[doc = "1: Enable"] + SET = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: TRIGGERED7_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `TRIGGERED7` writer - Write '1' to enable interrupt for event TRIGGERED\\[7\\]"] +pub type TRIGGERED7_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENSET_SPEC, TRIGGERED7_AW, O>; +impl<'a, const O: u8> TRIGGERED7_W<'a, O> { + #[doc = "Enable"] + #[inline(always)] + pub fn set(self) -> &'a mut W { + self.variant(TRIGGERED7_AW::SET) + } +} +#[doc = "Field `TRIGGERED8` reader - Write '1' to enable interrupt for event TRIGGERED\\[8\\]"] +pub type TRIGGERED8_R = crate::BitReader; +#[doc = "Write '1' to enable interrupt for event TRIGGERED\\[8\\]\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum TRIGGERED8_A { + #[doc = "0: Read: Disabled"] + DISABLED = 0, + #[doc = "1: Read: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: TRIGGERED8_A) -> Self { + variant as u8 != 0 + } +} +impl TRIGGERED8_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> TRIGGERED8_A { + match self.bits { + false => TRIGGERED8_A::DISABLED, + true => TRIGGERED8_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == TRIGGERED8_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == TRIGGERED8_A::ENABLED + } +} +#[doc = "Write '1' to enable interrupt for event TRIGGERED\\[8\\]\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum TRIGGERED8_AW { + #[doc = "1: Enable"] + SET = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: TRIGGERED8_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `TRIGGERED8` writer - Write '1' to enable interrupt for event TRIGGERED\\[8\\]"] +pub type TRIGGERED8_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENSET_SPEC, TRIGGERED8_AW, O>; +impl<'a, const O: u8> TRIGGERED8_W<'a, O> { + #[doc = "Enable"] + #[inline(always)] + pub fn set(self) -> &'a mut W { + self.variant(TRIGGERED8_AW::SET) + } +} +#[doc = "Field `TRIGGERED9` reader - Write '1' to enable interrupt for event TRIGGERED\\[9\\]"] +pub type TRIGGERED9_R = crate::BitReader; +#[doc = "Write '1' to enable interrupt for event TRIGGERED\\[9\\]\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum TRIGGERED9_A { + #[doc = "0: Read: Disabled"] + DISABLED = 0, + #[doc = "1: Read: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: TRIGGERED9_A) -> Self { + variant as u8 != 0 + } +} +impl TRIGGERED9_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> TRIGGERED9_A { + match self.bits { + false => TRIGGERED9_A::DISABLED, + true => TRIGGERED9_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == TRIGGERED9_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == TRIGGERED9_A::ENABLED + } +} +#[doc = "Write '1' to enable interrupt for event TRIGGERED\\[9\\]\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum TRIGGERED9_AW { + #[doc = "1: Enable"] + SET = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: TRIGGERED9_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `TRIGGERED9` writer - Write '1' to enable interrupt for event TRIGGERED\\[9\\]"] +pub type TRIGGERED9_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENSET_SPEC, TRIGGERED9_AW, O>; +impl<'a, const O: u8> TRIGGERED9_W<'a, O> { + #[doc = "Enable"] + #[inline(always)] + pub fn set(self) -> &'a mut W { + self.variant(TRIGGERED9_AW::SET) + } +} +#[doc = "Field `TRIGGERED10` reader - Write '1' to enable interrupt for event TRIGGERED\\[10\\]"] +pub type TRIGGERED10_R = crate::BitReader; +#[doc = "Write '1' to enable interrupt for event TRIGGERED\\[10\\]\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum TRIGGERED10_A { + #[doc = "0: Read: Disabled"] + DISABLED = 0, + #[doc = "1: Read: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: TRIGGERED10_A) -> Self { + variant as u8 != 0 + } +} +impl TRIGGERED10_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> TRIGGERED10_A { + match self.bits { + false => TRIGGERED10_A::DISABLED, + true => TRIGGERED10_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == TRIGGERED10_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == TRIGGERED10_A::ENABLED + } +} +#[doc = "Write '1' to enable interrupt for event TRIGGERED\\[10\\]\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum TRIGGERED10_AW { + #[doc = "1: Enable"] + SET = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: TRIGGERED10_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `TRIGGERED10` writer - Write '1' to enable interrupt for event TRIGGERED\\[10\\]"] +pub type TRIGGERED10_W<'a, const O: u8> = + crate::BitWriter<'a, u32, INTENSET_SPEC, TRIGGERED10_AW, O>; +impl<'a, const O: u8> TRIGGERED10_W<'a, O> { + #[doc = "Enable"] + #[inline(always)] + pub fn set(self) -> &'a mut W { + self.variant(TRIGGERED10_AW::SET) + } +} +#[doc = "Field `TRIGGERED11` reader - Write '1' to enable interrupt for event TRIGGERED\\[11\\]"] +pub type TRIGGERED11_R = crate::BitReader; +#[doc = "Write '1' to enable interrupt for event TRIGGERED\\[11\\]\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum TRIGGERED11_A { + #[doc = "0: Read: Disabled"] + DISABLED = 0, + #[doc = "1: Read: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: TRIGGERED11_A) -> Self { + variant as u8 != 0 + } +} +impl TRIGGERED11_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> TRIGGERED11_A { + match self.bits { + false => TRIGGERED11_A::DISABLED, + true => TRIGGERED11_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == TRIGGERED11_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == TRIGGERED11_A::ENABLED + } +} +#[doc = "Write '1' to enable interrupt for event TRIGGERED\\[11\\]\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum TRIGGERED11_AW { + #[doc = "1: Enable"] + SET = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: TRIGGERED11_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `TRIGGERED11` writer - Write '1' to enable interrupt for event TRIGGERED\\[11\\]"] +pub type TRIGGERED11_W<'a, const O: u8> = + crate::BitWriter<'a, u32, INTENSET_SPEC, TRIGGERED11_AW, O>; +impl<'a, const O: u8> TRIGGERED11_W<'a, O> { + #[doc = "Enable"] + #[inline(always)] + pub fn set(self) -> &'a mut W { + self.variant(TRIGGERED11_AW::SET) + } +} +#[doc = "Field `TRIGGERED12` reader - Write '1' to enable interrupt for event TRIGGERED\\[12\\]"] +pub type TRIGGERED12_R = crate::BitReader; +#[doc = "Write '1' to enable interrupt for event TRIGGERED\\[12\\]\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum TRIGGERED12_A { + #[doc = "0: Read: Disabled"] + DISABLED = 0, + #[doc = "1: Read: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: TRIGGERED12_A) -> Self { + variant as u8 != 0 + } +} +impl TRIGGERED12_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> TRIGGERED12_A { + match self.bits { + false => TRIGGERED12_A::DISABLED, + true => TRIGGERED12_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == TRIGGERED12_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == TRIGGERED12_A::ENABLED + } +} +#[doc = "Write '1' to enable interrupt for event TRIGGERED\\[12\\]\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum TRIGGERED12_AW { + #[doc = "1: Enable"] + SET = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: TRIGGERED12_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `TRIGGERED12` writer - Write '1' to enable interrupt for event TRIGGERED\\[12\\]"] +pub type TRIGGERED12_W<'a, const O: u8> = + crate::BitWriter<'a, u32, INTENSET_SPEC, TRIGGERED12_AW, O>; +impl<'a, const O: u8> TRIGGERED12_W<'a, O> { + #[doc = "Enable"] + #[inline(always)] + pub fn set(self) -> &'a mut W { + self.variant(TRIGGERED12_AW::SET) + } +} +#[doc = "Field `TRIGGERED13` reader - Write '1' to enable interrupt for event TRIGGERED\\[13\\]"] +pub type TRIGGERED13_R = crate::BitReader; +#[doc = "Write '1' to enable interrupt for event TRIGGERED\\[13\\]\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum TRIGGERED13_A { + #[doc = "0: Read: Disabled"] + DISABLED = 0, + #[doc = "1: Read: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: TRIGGERED13_A) -> Self { + variant as u8 != 0 + } +} +impl TRIGGERED13_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> TRIGGERED13_A { + match self.bits { + false => TRIGGERED13_A::DISABLED, + true => TRIGGERED13_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == TRIGGERED13_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == TRIGGERED13_A::ENABLED + } +} +#[doc = "Write '1' to enable interrupt for event TRIGGERED\\[13\\]\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum TRIGGERED13_AW { + #[doc = "1: Enable"] + SET = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: TRIGGERED13_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `TRIGGERED13` writer - Write '1' to enable interrupt for event TRIGGERED\\[13\\]"] +pub type TRIGGERED13_W<'a, const O: u8> = + crate::BitWriter<'a, u32, INTENSET_SPEC, TRIGGERED13_AW, O>; +impl<'a, const O: u8> TRIGGERED13_W<'a, O> { + #[doc = "Enable"] + #[inline(always)] + pub fn set(self) -> &'a mut W { + self.variant(TRIGGERED13_AW::SET) + } +} +#[doc = "Field `TRIGGERED14` reader - Write '1' to enable interrupt for event TRIGGERED\\[14\\]"] +pub type TRIGGERED14_R = crate::BitReader; +#[doc = "Write '1' to enable interrupt for event TRIGGERED\\[14\\]\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum TRIGGERED14_A { + #[doc = "0: Read: Disabled"] + DISABLED = 0, + #[doc = "1: Read: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: TRIGGERED14_A) -> Self { + variant as u8 != 0 + } +} +impl TRIGGERED14_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> TRIGGERED14_A { + match self.bits { + false => TRIGGERED14_A::DISABLED, + true => TRIGGERED14_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == TRIGGERED14_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == TRIGGERED14_A::ENABLED + } +} +#[doc = "Write '1' to enable interrupt for event TRIGGERED\\[14\\]\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum TRIGGERED14_AW { + #[doc = "1: Enable"] + SET = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: TRIGGERED14_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `TRIGGERED14` writer - Write '1' to enable interrupt for event TRIGGERED\\[14\\]"] +pub type TRIGGERED14_W<'a, const O: u8> = + crate::BitWriter<'a, u32, INTENSET_SPEC, TRIGGERED14_AW, O>; +impl<'a, const O: u8> TRIGGERED14_W<'a, O> { + #[doc = "Enable"] + #[inline(always)] + pub fn set(self) -> &'a mut W { + self.variant(TRIGGERED14_AW::SET) + } +} +#[doc = "Field `TRIGGERED15` reader - Write '1' to enable interrupt for event TRIGGERED\\[15\\]"] +pub type TRIGGERED15_R = crate::BitReader; +#[doc = "Write '1' to enable interrupt for event TRIGGERED\\[15\\]\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum TRIGGERED15_A { + #[doc = "0: Read: Disabled"] + DISABLED = 0, + #[doc = "1: Read: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: TRIGGERED15_A) -> Self { + variant as u8 != 0 + } +} +impl TRIGGERED15_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> TRIGGERED15_A { + match self.bits { + false => TRIGGERED15_A::DISABLED, + true => TRIGGERED15_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == TRIGGERED15_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == TRIGGERED15_A::ENABLED + } +} +#[doc = "Write '1' to enable interrupt for event TRIGGERED\\[15\\]\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum TRIGGERED15_AW { + #[doc = "1: Enable"] + SET = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: TRIGGERED15_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `TRIGGERED15` writer - Write '1' to enable interrupt for event TRIGGERED\\[15\\]"] +pub type TRIGGERED15_W<'a, const O: u8> = + crate::BitWriter<'a, u32, INTENSET_SPEC, TRIGGERED15_AW, O>; +impl<'a, const O: u8> TRIGGERED15_W<'a, O> { + #[doc = "Enable"] + #[inline(always)] + pub fn set(self) -> &'a mut W { + self.variant(TRIGGERED15_AW::SET) + } +} +impl R { + #[doc = "Bit 0 - Write '1' to enable interrupt for event TRIGGERED\\[0\\]"] + #[inline(always)] + pub fn triggered0(&self) -> TRIGGERED0_R { + TRIGGERED0_R::new((self.bits & 1) != 0) + } + #[doc = "Bit 1 - Write '1' to enable interrupt for event TRIGGERED\\[1\\]"] + #[inline(always)] + pub fn triggered1(&self) -> TRIGGERED1_R { + TRIGGERED1_R::new(((self.bits >> 1) & 1) != 0) + } + #[doc = "Bit 2 - Write '1' to enable interrupt for event TRIGGERED\\[2\\]"] + #[inline(always)] + pub fn triggered2(&self) -> TRIGGERED2_R { + TRIGGERED2_R::new(((self.bits >> 2) & 1) != 0) + } + #[doc = "Bit 3 - Write '1' to enable interrupt for event TRIGGERED\\[3\\]"] + #[inline(always)] + pub fn triggered3(&self) -> TRIGGERED3_R { + TRIGGERED3_R::new(((self.bits >> 3) & 1) != 0) + } + #[doc = "Bit 4 - Write '1' to enable interrupt for event TRIGGERED\\[4\\]"] + #[inline(always)] + pub fn triggered4(&self) -> TRIGGERED4_R { + TRIGGERED4_R::new(((self.bits >> 4) & 1) != 0) + } + #[doc = "Bit 5 - Write '1' to enable interrupt for event TRIGGERED\\[5\\]"] + #[inline(always)] + pub fn triggered5(&self) -> TRIGGERED5_R { + TRIGGERED5_R::new(((self.bits >> 5) & 1) != 0) + } + #[doc = "Bit 6 - Write '1' to enable interrupt for event TRIGGERED\\[6\\]"] + #[inline(always)] + pub fn triggered6(&self) -> TRIGGERED6_R { + TRIGGERED6_R::new(((self.bits >> 6) & 1) != 0) + } + #[doc = "Bit 7 - Write '1' to enable interrupt for event TRIGGERED\\[7\\]"] + #[inline(always)] + pub fn triggered7(&self) -> TRIGGERED7_R { + TRIGGERED7_R::new(((self.bits >> 7) & 1) != 0) + } + #[doc = "Bit 8 - Write '1' to enable interrupt for event TRIGGERED\\[8\\]"] + #[inline(always)] + pub fn triggered8(&self) -> TRIGGERED8_R { + TRIGGERED8_R::new(((self.bits >> 8) & 1) != 0) + } + #[doc = "Bit 9 - Write '1' to enable interrupt for event TRIGGERED\\[9\\]"] + #[inline(always)] + pub fn triggered9(&self) -> TRIGGERED9_R { + TRIGGERED9_R::new(((self.bits >> 9) & 1) != 0) + } + #[doc = "Bit 10 - Write '1' to enable interrupt for event TRIGGERED\\[10\\]"] + #[inline(always)] + pub fn triggered10(&self) -> TRIGGERED10_R { + TRIGGERED10_R::new(((self.bits >> 10) & 1) != 0) + } + #[doc = "Bit 11 - Write '1' to enable interrupt for event TRIGGERED\\[11\\]"] + #[inline(always)] + pub fn triggered11(&self) -> TRIGGERED11_R { + TRIGGERED11_R::new(((self.bits >> 11) & 1) != 0) + } + #[doc = "Bit 12 - Write '1' to enable interrupt for event TRIGGERED\\[12\\]"] + #[inline(always)] + pub fn triggered12(&self) -> TRIGGERED12_R { + TRIGGERED12_R::new(((self.bits >> 12) & 1) != 0) + } + #[doc = "Bit 13 - Write '1' to enable interrupt for event TRIGGERED\\[13\\]"] + #[inline(always)] + pub fn triggered13(&self) -> TRIGGERED13_R { + TRIGGERED13_R::new(((self.bits >> 13) & 1) != 0) + } + #[doc = "Bit 14 - Write '1' to enable interrupt for event TRIGGERED\\[14\\]"] + #[inline(always)] + pub fn triggered14(&self) -> TRIGGERED14_R { + TRIGGERED14_R::new(((self.bits >> 14) & 1) != 0) + } + #[doc = "Bit 15 - Write '1' to enable interrupt for event TRIGGERED\\[15\\]"] + #[inline(always)] + pub fn triggered15(&self) -> TRIGGERED15_R { + TRIGGERED15_R::new(((self.bits >> 15) & 1) != 0) + } +} +impl W { + #[doc = "Bit 0 - Write '1' to enable interrupt for event TRIGGERED\\[0\\]"] + #[inline(always)] + #[must_use] + pub fn triggered0(&mut self) -> TRIGGERED0_W<0> { + TRIGGERED0_W::new(self) + } + #[doc = "Bit 1 - Write '1' to enable interrupt for event TRIGGERED\\[1\\]"] + #[inline(always)] + #[must_use] + pub fn triggered1(&mut self) -> TRIGGERED1_W<1> { + TRIGGERED1_W::new(self) + } + #[doc = "Bit 2 - Write '1' to enable interrupt for event TRIGGERED\\[2\\]"] + #[inline(always)] + #[must_use] + pub fn triggered2(&mut self) -> TRIGGERED2_W<2> { + TRIGGERED2_W::new(self) + } + #[doc = "Bit 3 - Write '1' to enable interrupt for event TRIGGERED\\[3\\]"] + #[inline(always)] + #[must_use] + pub fn triggered3(&mut self) -> TRIGGERED3_W<3> { + TRIGGERED3_W::new(self) + } + #[doc = "Bit 4 - Write '1' to enable interrupt for event TRIGGERED\\[4\\]"] + #[inline(always)] + #[must_use] + pub fn triggered4(&mut self) -> TRIGGERED4_W<4> { + TRIGGERED4_W::new(self) + } + #[doc = "Bit 5 - Write '1' to enable interrupt for event TRIGGERED\\[5\\]"] + #[inline(always)] + #[must_use] + pub fn triggered5(&mut self) -> TRIGGERED5_W<5> { + TRIGGERED5_W::new(self) + } + #[doc = "Bit 6 - Write '1' to enable interrupt for event TRIGGERED\\[6\\]"] + #[inline(always)] + #[must_use] + pub fn triggered6(&mut self) -> TRIGGERED6_W<6> { + TRIGGERED6_W::new(self) + } + #[doc = "Bit 7 - Write '1' to enable interrupt for event TRIGGERED\\[7\\]"] + #[inline(always)] + #[must_use] + pub fn triggered7(&mut self) -> TRIGGERED7_W<7> { + TRIGGERED7_W::new(self) + } + #[doc = "Bit 8 - Write '1' to enable interrupt for event TRIGGERED\\[8\\]"] + #[inline(always)] + #[must_use] + pub fn triggered8(&mut self) -> TRIGGERED8_W<8> { + TRIGGERED8_W::new(self) + } + #[doc = "Bit 9 - Write '1' to enable interrupt for event TRIGGERED\\[9\\]"] + #[inline(always)] + #[must_use] + pub fn triggered9(&mut self) -> TRIGGERED9_W<9> { + TRIGGERED9_W::new(self) + } + #[doc = "Bit 10 - Write '1' to enable interrupt for event TRIGGERED\\[10\\]"] + #[inline(always)] + #[must_use] + pub fn triggered10(&mut self) -> TRIGGERED10_W<10> { + TRIGGERED10_W::new(self) + } + #[doc = "Bit 11 - Write '1' to enable interrupt for event TRIGGERED\\[11\\]"] + #[inline(always)] + #[must_use] + pub fn triggered11(&mut self) -> TRIGGERED11_W<11> { + TRIGGERED11_W::new(self) + } + #[doc = "Bit 12 - Write '1' to enable interrupt for event TRIGGERED\\[12\\]"] + #[inline(always)] + #[must_use] + pub fn triggered12(&mut self) -> TRIGGERED12_W<12> { + TRIGGERED12_W::new(self) + } + #[doc = "Bit 13 - Write '1' to enable interrupt for event TRIGGERED\\[13\\]"] + #[inline(always)] + #[must_use] + pub fn triggered13(&mut self) -> TRIGGERED13_W<13> { + TRIGGERED13_W::new(self) + } + #[doc = "Bit 14 - Write '1' to enable interrupt for event TRIGGERED\\[14\\]"] + #[inline(always)] + #[must_use] + pub fn triggered14(&mut self) -> TRIGGERED14_W<14> { + TRIGGERED14_W::new(self) + } + #[doc = "Bit 15 - Write '1' to enable interrupt for event TRIGGERED\\[15\\]"] + #[inline(always)] + #[must_use] + pub fn triggered15(&mut self) -> TRIGGERED15_W<15> { + TRIGGERED15_W::new(self) + } + #[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 = "Enable interrupt\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 [intenset](index.html) module"] +pub struct INTENSET_SPEC; +impl crate::RegisterSpec for INTENSET_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [intenset::R](R) reader structure"] +impl crate::Readable for INTENSET_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [intenset::W](W) writer structure"] +impl crate::Writable for INTENSET_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets INTENSET to value 0"] +impl crate::Resettable for INTENSET_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/egu0/tasks_trigger.rs b/down-the-stack/dk_pac/src/egu0/tasks_trigger.rs new file mode 100644 index 0000000..14d7c5f --- /dev/null +++ b/down-the-stack/dk_pac/src/egu0/tasks_trigger.rs @@ -0,0 +1,77 @@ +#[doc = "Register `TASKS_TRIGGER[%s]` 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 = "Trigger n for triggering the corresponding TRIGGERED\\[n\\] +event\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum TASKS_TRIGGER_AW { + #[doc = "1: Trigger task"] + TRIGGER = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: TASKS_TRIGGER_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `TASKS_TRIGGER` writer - Trigger n for triggering the corresponding TRIGGERED\\[n\\] +event"] +pub type TASKS_TRIGGER_W<'a, const O: u8> = + crate::BitWriter<'a, u32, TASKS_TRIGGER_SPEC, TASKS_TRIGGER_AW, O>; +impl<'a, const O: u8> TASKS_TRIGGER_W<'a, O> { + #[doc = "Trigger task"] + #[inline(always)] + pub fn trigger(self) -> &'a mut W { + self.variant(TASKS_TRIGGER_AW::TRIGGER) + } +} +impl W { + #[doc = "Bit 0 - Trigger n for triggering the corresponding TRIGGERED\\[n\\] +event"] + #[inline(always)] + #[must_use] + pub fn tasks_trigger(&mut self) -> TASKS_TRIGGER_W<0> { + TASKS_TRIGGER_W::new(self) + } + #[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 = "Description collection: Trigger n for triggering the corresponding TRIGGERED\\[n\\] +event\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 [tasks_trigger](index.html) module"] +pub struct TASKS_TRIGGER_SPEC; +impl crate::RegisterSpec for TASKS_TRIGGER_SPEC { + type Ux = u32; +} +#[doc = "`write(|w| ..)` method takes [tasks_trigger::W](W) writer structure"] +impl crate::Writable for TASKS_TRIGGER_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets TASKS_TRIGGER[%s] +to value 0"] +impl crate::Resettable for TASKS_TRIGGER_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/ficr.rs b/down-the-stack/dk_pac/src/ficr.rs new file mode 100644 index 0000000..3f5c361 --- /dev/null +++ b/down-the-stack/dk_pac/src/ficr.rs @@ -0,0 +1,73 @@ +#[doc = r"Register block"] +#[repr(C)] +pub struct RegisterBlock { + _reserved0: [u8; 0x10], + #[doc = "0x10 - Code memory page size"] + pub codepagesize: CODEPAGESIZE, + #[doc = "0x14 - Code memory size"] + pub codesize: CODESIZE, + _reserved2: [u8; 0x48], + #[doc = "0x60..0x68 - Description collection: Device identifier"] + pub deviceid: [DEVICEID; 2], + _reserved3: [u8; 0x18], + #[doc = "0x80..0x90 - Description collection: Encryption Root, word n"] + pub er: [ER; 4], + #[doc = "0x90..0xa0 - Description collection: Identity Root, word n"] + pub ir: [IR; 4], + #[doc = "0xa0 - Device address type"] + pub deviceaddrtype: DEVICEADDRTYPE, + #[doc = "0xa4..0xac - Description collection: Device address n"] + pub deviceaddr: [DEVICEADDR; 2], + _reserved7: [u8; 0x54], + #[doc = "0x100..0x114 - Device info"] + pub info: INFO, + _reserved8: [u8; 0x02f0], + #[doc = "0x404..0x448 - Registers storing factory TEMP module linearization coefficients"] + pub temp: TEMP, + _reserved9: [u8; 0x08], + #[doc = "0x450..0x460 - Unspecified"] + pub nfc: NFC, +} +#[doc = "CODEPAGESIZE (r) register accessor: an alias for `Reg`"] +pub type CODEPAGESIZE = crate::Reg; +#[doc = "Code memory page size"] +pub mod codepagesize; +#[doc = "CODESIZE (r) register accessor: an alias for `Reg`"] +pub type CODESIZE = crate::Reg; +#[doc = "Code memory size"] +pub mod codesize; +#[doc = "DEVICEID (r) register accessor: an alias for `Reg`"] +pub type DEVICEID = crate::Reg; +#[doc = "Description collection: Device identifier"] +pub mod deviceid; +#[doc = "ER (r) register accessor: an alias for `Reg`"] +pub type ER = crate::Reg; +#[doc = "Description collection: Encryption Root, word n"] +pub mod er; +#[doc = "IR (r) register accessor: an alias for `Reg`"] +pub type IR = crate::Reg; +#[doc = "Description collection: Identity Root, word n"] +pub mod ir; +#[doc = "DEVICEADDRTYPE (r) register accessor: an alias for `Reg`"] +pub type DEVICEADDRTYPE = crate::Reg; +#[doc = "Device address type"] +pub mod deviceaddrtype; +#[doc = "DEVICEADDR (r) register accessor: an alias for `Reg`"] +pub type DEVICEADDR = crate::Reg; +#[doc = "Description collection: Device address n"] +pub mod deviceaddr; +#[doc = "Device info"] +pub use self::info::INFO; +#[doc = r"Cluster"] +#[doc = "Device info"] +pub mod info; +#[doc = "Registers storing factory TEMP module linearization coefficients"] +pub use self::temp::TEMP; +#[doc = r"Cluster"] +#[doc = "Registers storing factory TEMP module linearization coefficients"] +pub mod temp; +#[doc = "Unspecified"] +pub use self::nfc::NFC; +#[doc = r"Cluster"] +#[doc = "Unspecified"] +pub mod nfc; diff --git a/down-the-stack/dk_pac/src/ficr/codepagesize.rs b/down-the-stack/dk_pac/src/ficr/codepagesize.rs new file mode 100644 index 0000000..695f00d --- /dev/null +++ b/down-the-stack/dk_pac/src/ficr/codepagesize.rs @@ -0,0 +1,37 @@ +#[doc = "Register `CODEPAGESIZE` 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 = "Field `CODEPAGESIZE` reader - Code memory page size"] +pub type CODEPAGESIZE_R = crate::FieldReader; +impl R { + #[doc = "Bits 0:31 - Code memory page size"] + #[inline(always)] + pub fn codepagesize(&self) -> CODEPAGESIZE_R { + CODEPAGESIZE_R::new(self.bits) + } +} +#[doc = "Code memory page size\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 [codepagesize](index.html) module"] +pub struct CODEPAGESIZE_SPEC; +impl crate::RegisterSpec for CODEPAGESIZE_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [codepagesize::R](R) reader structure"] +impl crate::Readable for CODEPAGESIZE_SPEC { + type Reader = R; +} +#[doc = "`reset()` method sets CODEPAGESIZE to value 0xffff_ffff"] +impl crate::Resettable for CODEPAGESIZE_SPEC { + const RESET_VALUE: Self::Ux = 0xffff_ffff; +} diff --git a/down-the-stack/dk_pac/src/ficr/codesize.rs b/down-the-stack/dk_pac/src/ficr/codesize.rs new file mode 100644 index 0000000..06578e2 --- /dev/null +++ b/down-the-stack/dk_pac/src/ficr/codesize.rs @@ -0,0 +1,37 @@ +#[doc = "Register `CODESIZE` 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 = "Field `CODESIZE` reader - Code memory size in number of pages"] +pub type CODESIZE_R = crate::FieldReader; +impl R { + #[doc = "Bits 0:31 - Code memory size in number of pages"] + #[inline(always)] + pub fn codesize(&self) -> CODESIZE_R { + CODESIZE_R::new(self.bits) + } +} +#[doc = "Code memory size\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 [codesize](index.html) module"] +pub struct CODESIZE_SPEC; +impl crate::RegisterSpec for CODESIZE_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [codesize::R](R) reader structure"] +impl crate::Readable for CODESIZE_SPEC { + type Reader = R; +} +#[doc = "`reset()` method sets CODESIZE to value 0xffff_ffff"] +impl crate::Resettable for CODESIZE_SPEC { + const RESET_VALUE: Self::Ux = 0xffff_ffff; +} diff --git a/down-the-stack/dk_pac/src/ficr/deviceaddr.rs b/down-the-stack/dk_pac/src/ficr/deviceaddr.rs new file mode 100644 index 0000000..74e4d0e --- /dev/null +++ b/down-the-stack/dk_pac/src/ficr/deviceaddr.rs @@ -0,0 +1,38 @@ +#[doc = "Register `DEVICEADDR[%s]` 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 = "Field `DEVICEADDR` reader - 48 bit device address"] +pub type DEVICEADDR_R = crate::FieldReader; +impl R { + #[doc = "Bits 0:31 - 48 bit device address"] + #[inline(always)] + pub fn deviceaddr(&self) -> DEVICEADDR_R { + DEVICEADDR_R::new(self.bits) + } +} +#[doc = "Description collection: Device address n\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 [deviceaddr](index.html) module"] +pub struct DEVICEADDR_SPEC; +impl crate::RegisterSpec for DEVICEADDR_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [deviceaddr::R](R) reader structure"] +impl crate::Readable for DEVICEADDR_SPEC { + type Reader = R; +} +#[doc = "`reset()` method sets DEVICEADDR[%s] +to value 0xffff_ffff"] +impl crate::Resettable for DEVICEADDR_SPEC { + const RESET_VALUE: Self::Ux = 0xffff_ffff; +} diff --git a/down-the-stack/dk_pac/src/ficr/deviceaddrtype.rs b/down-the-stack/dk_pac/src/ficr/deviceaddrtype.rs new file mode 100644 index 0000000..8f82ab6 --- /dev/null +++ b/down-the-stack/dk_pac/src/ficr/deviceaddrtype.rs @@ -0,0 +1,71 @@ +#[doc = "Register `DEVICEADDRTYPE` 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 = "Field `DEVICEADDRTYPE` reader - Device address type"] +pub type DEVICEADDRTYPE_R = crate::BitReader; +#[doc = "Device address type\n\nValue on reset: 1"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum DEVICEADDRTYPE_A { + #[doc = "0: Public address"] + PUBLIC = 0, + #[doc = "1: Random address"] + RANDOM = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: DEVICEADDRTYPE_A) -> Self { + variant as u8 != 0 + } +} +impl DEVICEADDRTYPE_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> DEVICEADDRTYPE_A { + match self.bits { + false => DEVICEADDRTYPE_A::PUBLIC, + true => DEVICEADDRTYPE_A::RANDOM, + } + } + #[doc = "Checks if the value of the field is `PUBLIC`"] + #[inline(always)] + pub fn is_public(&self) -> bool { + *self == DEVICEADDRTYPE_A::PUBLIC + } + #[doc = "Checks if the value of the field is `RANDOM`"] + #[inline(always)] + pub fn is_random(&self) -> bool { + *self == DEVICEADDRTYPE_A::RANDOM + } +} +impl R { + #[doc = "Bit 0 - Device address type"] + #[inline(always)] + pub fn deviceaddrtype(&self) -> DEVICEADDRTYPE_R { + DEVICEADDRTYPE_R::new((self.bits & 1) != 0) + } +} +#[doc = "Device address type\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 [deviceaddrtype](index.html) module"] +pub struct DEVICEADDRTYPE_SPEC; +impl crate::RegisterSpec for DEVICEADDRTYPE_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [deviceaddrtype::R](R) reader structure"] +impl crate::Readable for DEVICEADDRTYPE_SPEC { + type Reader = R; +} +#[doc = "`reset()` method sets DEVICEADDRTYPE to value 0xffff_ffff"] +impl crate::Resettable for DEVICEADDRTYPE_SPEC { + const RESET_VALUE: Self::Ux = 0xffff_ffff; +} diff --git a/down-the-stack/dk_pac/src/ficr/deviceid.rs b/down-the-stack/dk_pac/src/ficr/deviceid.rs new file mode 100644 index 0000000..c307d38 --- /dev/null +++ b/down-the-stack/dk_pac/src/ficr/deviceid.rs @@ -0,0 +1,38 @@ +#[doc = "Register `DEVICEID[%s]` 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 = "Field `DEVICEID` reader - 64 bit unique device identifier"] +pub type DEVICEID_R = crate::FieldReader; +impl R { + #[doc = "Bits 0:31 - 64 bit unique device identifier"] + #[inline(always)] + pub fn deviceid(&self) -> DEVICEID_R { + DEVICEID_R::new(self.bits) + } +} +#[doc = "Description collection: Device identifier\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 [deviceid](index.html) module"] +pub struct DEVICEID_SPEC; +impl crate::RegisterSpec for DEVICEID_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [deviceid::R](R) reader structure"] +impl crate::Readable for DEVICEID_SPEC { + type Reader = R; +} +#[doc = "`reset()` method sets DEVICEID[%s] +to value 0xffff_ffff"] +impl crate::Resettable for DEVICEID_SPEC { + const RESET_VALUE: Self::Ux = 0xffff_ffff; +} diff --git a/down-the-stack/dk_pac/src/ficr/er.rs b/down-the-stack/dk_pac/src/ficr/er.rs new file mode 100644 index 0000000..b321253 --- /dev/null +++ b/down-the-stack/dk_pac/src/ficr/er.rs @@ -0,0 +1,38 @@ +#[doc = "Register `ER[%s]` 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 = "Field `ER` reader - Encryption Root, word n"] +pub type ER_R = crate::FieldReader; +impl R { + #[doc = "Bits 0:31 - Encryption Root, word n"] + #[inline(always)] + pub fn er(&self) -> ER_R { + ER_R::new(self.bits) + } +} +#[doc = "Description collection: Encryption Root, word n\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 [er](index.html) module"] +pub struct ER_SPEC; +impl crate::RegisterSpec for ER_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [er::R](R) reader structure"] +impl crate::Readable for ER_SPEC { + type Reader = R; +} +#[doc = "`reset()` method sets ER[%s] +to value 0xffff_ffff"] +impl crate::Resettable for ER_SPEC { + const RESET_VALUE: Self::Ux = 0xffff_ffff; +} diff --git a/down-the-stack/dk_pac/src/ficr/info.rs b/down-the-stack/dk_pac/src/ficr/info.rs new file mode 100644 index 0000000..c2a353e --- /dev/null +++ b/down-the-stack/dk_pac/src/ficr/info.rs @@ -0,0 +1,34 @@ +#[doc = r"Register block"] +#[repr(C)] +pub struct INFO { + #[doc = "0x00 - Part code"] + pub part: PART, + #[doc = "0x04 - Part Variant, Hardware version and Production configuration"] + pub variant: VARIANT, + #[doc = "0x08 - Package option"] + pub package: PACKAGE, + #[doc = "0x0c - RAM variant"] + pub ram: RAM, + #[doc = "0x10 - Flash variant"] + pub flash: FLASH, +} +#[doc = "PART (r) register accessor: an alias for `Reg`"] +pub type PART = crate::Reg; +#[doc = "Part code"] +pub mod part; +#[doc = "VARIANT (r) register accessor: an alias for `Reg`"] +pub type VARIANT = crate::Reg; +#[doc = "Part Variant, Hardware version and Production configuration"] +pub mod variant; +#[doc = "PACKAGE (r) register accessor: an alias for `Reg`"] +pub type PACKAGE = crate::Reg; +#[doc = "Package option"] +pub mod package; +#[doc = "RAM (r) register accessor: an alias for `Reg`"] +pub type RAM = crate::Reg; +#[doc = "RAM variant"] +pub mod ram; +#[doc = "FLASH (r) register accessor: an alias for `Reg`"] +pub type FLASH = crate::Reg; +#[doc = "Flash variant"] +pub mod flash; diff --git a/down-the-stack/dk_pac/src/ficr/info/flash.rs b/down-the-stack/dk_pac/src/ficr/info/flash.rs new file mode 100644 index 0000000..5dbf82d --- /dev/null +++ b/down-the-stack/dk_pac/src/ficr/info/flash.rs @@ -0,0 +1,89 @@ +#[doc = "Register `FLASH` 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 = "Field `FLASH` reader - Flash variant"] +pub type FLASH_R = crate::FieldReader; +#[doc = "Flash variant\n\nValue on reset: 512"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +#[repr(u32)] +pub enum FLASH_A { + #[doc = "128: 128 kByte FLASH"] + K128 = 128, + #[doc = "256: 256 kByte FLASH"] + K256 = 256, + #[doc = "512: 512 kByte FLASH"] + K512 = 512, + #[doc = "4294967295: Unspecified"] + UNSPECIFIED = 4294967295, +} +impl From for u32 { + #[inline(always)] + fn from(variant: FLASH_A) -> Self { + variant as _ + } +} +impl FLASH_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> Option { + match self.bits { + 128 => Some(FLASH_A::K128), + 256 => Some(FLASH_A::K256), + 512 => Some(FLASH_A::K512), + 4294967295 => Some(FLASH_A::UNSPECIFIED), + _ => None, + } + } + #[doc = "Checks if the value of the field is `K128`"] + #[inline(always)] + pub fn is_k128(&self) -> bool { + *self == FLASH_A::K128 + } + #[doc = "Checks if the value of the field is `K256`"] + #[inline(always)] + pub fn is_k256(&self) -> bool { + *self == FLASH_A::K256 + } + #[doc = "Checks if the value of the field is `K512`"] + #[inline(always)] + pub fn is_k512(&self) -> bool { + *self == FLASH_A::K512 + } + #[doc = "Checks if the value of the field is `UNSPECIFIED`"] + #[inline(always)] + pub fn is_unspecified(&self) -> bool { + *self == FLASH_A::UNSPECIFIED + } +} +impl R { + #[doc = "Bits 0:31 - Flash variant"] + #[inline(always)] + pub fn flash(&self) -> FLASH_R { + FLASH_R::new(self.bits) + } +} +#[doc = "Flash variant\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 [flash](index.html) module"] +pub struct FLASH_SPEC; +impl crate::RegisterSpec for FLASH_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [flash::R](R) reader structure"] +impl crate::Readable for FLASH_SPEC { + type Reader = R; +} +#[doc = "`reset()` method sets FLASH to value 0x0200"] +impl crate::Resettable for FLASH_SPEC { + const RESET_VALUE: Self::Ux = 0x0200; +} diff --git a/down-the-stack/dk_pac/src/ficr/info/package.rs b/down-the-stack/dk_pac/src/ficr/info/package.rs new file mode 100644 index 0000000..efe8f5e --- /dev/null +++ b/down-the-stack/dk_pac/src/ficr/info/package.rs @@ -0,0 +1,97 @@ +#[doc = "Register `PACKAGE` 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 = "Field `PACKAGE` reader - Package option"] +pub type PACKAGE_R = crate::FieldReader; +#[doc = "Package option\n\nValue on reset: 8192"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +#[repr(u32)] +pub enum PACKAGE_A { + #[doc = "8192: QFxx - 48-pin QFN"] + QF = 8192, + #[doc = "8193: CHxx - 7x8 WLCSP 56 balls"] + CH = 8193, + #[doc = "8194: CIxx - 7x8 WLCSP 56 balls"] + CI = 8194, + #[doc = "8197: CKxx - 7x8 WLCSP 56 balls with backside coating for light protection"] + CK = 8197, + #[doc = "4294967295: Unspecified"] + UNSPECIFIED = 4294967295, +} +impl From for u32 { + #[inline(always)] + fn from(variant: PACKAGE_A) -> Self { + variant as _ + } +} +impl PACKAGE_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> Option { + match self.bits { + 8192 => Some(PACKAGE_A::QF), + 8193 => Some(PACKAGE_A::CH), + 8194 => Some(PACKAGE_A::CI), + 8197 => Some(PACKAGE_A::CK), + 4294967295 => Some(PACKAGE_A::UNSPECIFIED), + _ => None, + } + } + #[doc = "Checks if the value of the field is `QF`"] + #[inline(always)] + pub fn is_qf(&self) -> bool { + *self == PACKAGE_A::QF + } + #[doc = "Checks if the value of the field is `CH`"] + #[inline(always)] + pub fn is_ch(&self) -> bool { + *self == PACKAGE_A::CH + } + #[doc = "Checks if the value of the field is `CI`"] + #[inline(always)] + pub fn is_ci(&self) -> bool { + *self == PACKAGE_A::CI + } + #[doc = "Checks if the value of the field is `CK`"] + #[inline(always)] + pub fn is_ck(&self) -> bool { + *self == PACKAGE_A::CK + } + #[doc = "Checks if the value of the field is `UNSPECIFIED`"] + #[inline(always)] + pub fn is_unspecified(&self) -> bool { + *self == PACKAGE_A::UNSPECIFIED + } +} +impl R { + #[doc = "Bits 0:31 - Package option"] + #[inline(always)] + pub fn package(&self) -> PACKAGE_R { + PACKAGE_R::new(self.bits) + } +} +#[doc = "Package option\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 [package](index.html) module"] +pub struct PACKAGE_SPEC; +impl crate::RegisterSpec for PACKAGE_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [package::R](R) reader structure"] +impl crate::Readable for PACKAGE_SPEC { + type Reader = R; +} +#[doc = "`reset()` method sets PACKAGE to value 0x2000"] +impl crate::Resettable for PACKAGE_SPEC { + const RESET_VALUE: Self::Ux = 0x2000; +} diff --git a/down-the-stack/dk_pac/src/ficr/info/part.rs b/down-the-stack/dk_pac/src/ficr/info/part.rs new file mode 100644 index 0000000..ba7011c --- /dev/null +++ b/down-the-stack/dk_pac/src/ficr/info/part.rs @@ -0,0 +1,73 @@ +#[doc = "Register `PART` 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 = "Field `PART` reader - Part code"] +pub type PART_R = crate::FieldReader; +#[doc = "Part code\n\nValue on reset: 337970"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +#[repr(u32)] +pub enum PART_A { + #[doc = "337970: nRF52832"] + N52832 = 337970, + #[doc = "4294967295: Unspecified"] + UNSPECIFIED = 4294967295, +} +impl From for u32 { + #[inline(always)] + fn from(variant: PART_A) -> Self { + variant as _ + } +} +impl PART_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> Option { + match self.bits { + 337970 => Some(PART_A::N52832), + 4294967295 => Some(PART_A::UNSPECIFIED), + _ => None, + } + } + #[doc = "Checks if the value of the field is `N52832`"] + #[inline(always)] + pub fn is_n52832(&self) -> bool { + *self == PART_A::N52832 + } + #[doc = "Checks if the value of the field is `UNSPECIFIED`"] + #[inline(always)] + pub fn is_unspecified(&self) -> bool { + *self == PART_A::UNSPECIFIED + } +} +impl R { + #[doc = "Bits 0:31 - Part code"] + #[inline(always)] + pub fn part(&self) -> PART_R { + PART_R::new(self.bits) + } +} +#[doc = "Part code\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 [part](index.html) module"] +pub struct PART_SPEC; +impl crate::RegisterSpec for PART_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [part::R](R) reader structure"] +impl crate::Readable for PART_SPEC { + type Reader = R; +} +#[doc = "`reset()` method sets PART to value 0x0005_2832"] +impl crate::Resettable for PART_SPEC { + const RESET_VALUE: Self::Ux = 0x0005_2832; +} diff --git a/down-the-stack/dk_pac/src/ficr/info/ram.rs b/down-the-stack/dk_pac/src/ficr/info/ram.rs new file mode 100644 index 0000000..521818a --- /dev/null +++ b/down-the-stack/dk_pac/src/ficr/info/ram.rs @@ -0,0 +1,89 @@ +#[doc = "Register `RAM` 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 = "Field `RAM` reader - RAM variant"] +pub type RAM_R = crate::FieldReader; +#[doc = "RAM variant\n\nValue on reset: 64"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +#[repr(u32)] +pub enum RAM_A { + #[doc = "16: 16 kByte RAM"] + K16 = 16, + #[doc = "32: 32 kByte RAM"] + K32 = 32, + #[doc = "64: 64 kByte RAM"] + K64 = 64, + #[doc = "4294967295: Unspecified"] + UNSPECIFIED = 4294967295, +} +impl From for u32 { + #[inline(always)] + fn from(variant: RAM_A) -> Self { + variant as _ + } +} +impl RAM_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> Option { + match self.bits { + 16 => Some(RAM_A::K16), + 32 => Some(RAM_A::K32), + 64 => Some(RAM_A::K64), + 4294967295 => Some(RAM_A::UNSPECIFIED), + _ => None, + } + } + #[doc = "Checks if the value of the field is `K16`"] + #[inline(always)] + pub fn is_k16(&self) -> bool { + *self == RAM_A::K16 + } + #[doc = "Checks if the value of the field is `K32`"] + #[inline(always)] + pub fn is_k32(&self) -> bool { + *self == RAM_A::K32 + } + #[doc = "Checks if the value of the field is `K64`"] + #[inline(always)] + pub fn is_k64(&self) -> bool { + *self == RAM_A::K64 + } + #[doc = "Checks if the value of the field is `UNSPECIFIED`"] + #[inline(always)] + pub fn is_unspecified(&self) -> bool { + *self == RAM_A::UNSPECIFIED + } +} +impl R { + #[doc = "Bits 0:31 - RAM variant"] + #[inline(always)] + pub fn ram(&self) -> RAM_R { + RAM_R::new(self.bits) + } +} +#[doc = "RAM variant\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 [ram](index.html) module"] +pub struct RAM_SPEC; +impl crate::RegisterSpec for RAM_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [ram::R](R) reader structure"] +impl crate::Readable for RAM_SPEC { + type Reader = R; +} +#[doc = "`reset()` method sets RAM to value 0x40"] +impl crate::Resettable for RAM_SPEC { + const RESET_VALUE: Self::Ux = 0x40; +} diff --git a/down-the-stack/dk_pac/src/ficr/info/variant.rs b/down-the-stack/dk_pac/src/ficr/info/variant.rs new file mode 100644 index 0000000..35cf83a --- /dev/null +++ b/down-the-stack/dk_pac/src/ficr/info/variant.rs @@ -0,0 +1,161 @@ +#[doc = "Register `VARIANT` 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 = "Field `VARIANT` reader - Part Variant, Hardware version and Production configuration, encoded as ASCII"] +pub type VARIANT_R = crate::FieldReader; +#[doc = "Part Variant, Hardware version and Production configuration, encoded as ASCII\n\nValue on reset: 1094795586"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +#[repr(u32)] +pub enum VARIANT_A { + #[doc = "1094795585: AAAA"] + AAAA = 1094795585, + #[doc = "1094795587: AAAC"] + AAAC = 1094795587, + #[doc = "1094795841: AABA"] + AABA = 1094795841, + #[doc = "1094795842: AABB"] + AABB = 1094795842, + #[doc = "1094795824: AAB0"] + AAB0 = 1094795824, + #[doc = "1094861360: ABB0"] + ABB0 = 1094861360, + #[doc = "1094796592: AAE0"] + AAE0 = 1094796592, + #[doc = "1094862128: ABE0"] + ABE0 = 1094862128, + #[doc = "1094797122: AAGB"] + AAGB = 1094797122, + #[doc = "1094862658: ABGB"] + ABGB = 1094862658, + #[doc = "1094797104: AAG0"] + AAG0 = 1094797104, + #[doc = "1094862640: ABG0"] + ABG0 = 1094862640, + #[doc = "4294967295: Unspecified"] + UNSPECIFIED = 4294967295, +} +impl From for u32 { + #[inline(always)] + fn from(variant: VARIANT_A) -> Self { + variant as _ + } +} +impl VARIANT_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> Option { + match self.bits { + 1094795585 => Some(VARIANT_A::AAAA), + 1094795587 => Some(VARIANT_A::AAAC), + 1094795841 => Some(VARIANT_A::AABA), + 1094795842 => Some(VARIANT_A::AABB), + 1094795824 => Some(VARIANT_A::AAB0), + 1094861360 => Some(VARIANT_A::ABB0), + 1094796592 => Some(VARIANT_A::AAE0), + 1094862128 => Some(VARIANT_A::ABE0), + 1094797122 => Some(VARIANT_A::AAGB), + 1094862658 => Some(VARIANT_A::ABGB), + 1094797104 => Some(VARIANT_A::AAG0), + 1094862640 => Some(VARIANT_A::ABG0), + 4294967295 => Some(VARIANT_A::UNSPECIFIED), + _ => None, + } + } + #[doc = "Checks if the value of the field is `AAAA`"] + #[inline(always)] + pub fn is_aaaa(&self) -> bool { + *self == VARIANT_A::AAAA + } + #[doc = "Checks if the value of the field is `AAAC`"] + #[inline(always)] + pub fn is_aaac(&self) -> bool { + *self == VARIANT_A::AAAC + } + #[doc = "Checks if the value of the field is `AABA`"] + #[inline(always)] + pub fn is_aaba(&self) -> bool { + *self == VARIANT_A::AABA + } + #[doc = "Checks if the value of the field is `AABB`"] + #[inline(always)] + pub fn is_aabb(&self) -> bool { + *self == VARIANT_A::AABB + } + #[doc = "Checks if the value of the field is `AAB0`"] + #[inline(always)] + pub fn is_aab0(&self) -> bool { + *self == VARIANT_A::AAB0 + } + #[doc = "Checks if the value of the field is `ABB0`"] + #[inline(always)] + pub fn is_abb0(&self) -> bool { + *self == VARIANT_A::ABB0 + } + #[doc = "Checks if the value of the field is `AAE0`"] + #[inline(always)] + pub fn is_aae0(&self) -> bool { + *self == VARIANT_A::AAE0 + } + #[doc = "Checks if the value of the field is `ABE0`"] + #[inline(always)] + pub fn is_abe0(&self) -> bool { + *self == VARIANT_A::ABE0 + } + #[doc = "Checks if the value of the field is `AAGB`"] + #[inline(always)] + pub fn is_aagb(&self) -> bool { + *self == VARIANT_A::AAGB + } + #[doc = "Checks if the value of the field is `ABGB`"] + #[inline(always)] + pub fn is_abgb(&self) -> bool { + *self == VARIANT_A::ABGB + } + #[doc = "Checks if the value of the field is `AAG0`"] + #[inline(always)] + pub fn is_aag0(&self) -> bool { + *self == VARIANT_A::AAG0 + } + #[doc = "Checks if the value of the field is `ABG0`"] + #[inline(always)] + pub fn is_abg0(&self) -> bool { + *self == VARIANT_A::ABG0 + } + #[doc = "Checks if the value of the field is `UNSPECIFIED`"] + #[inline(always)] + pub fn is_unspecified(&self) -> bool { + *self == VARIANT_A::UNSPECIFIED + } +} +impl R { + #[doc = "Bits 0:31 - Part Variant, Hardware version and Production configuration, encoded as ASCII"] + #[inline(always)] + pub fn variant(&self) -> VARIANT_R { + VARIANT_R::new(self.bits) + } +} +#[doc = "Part Variant, Hardware version and Production configuration\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 [variant](index.html) module"] +pub struct VARIANT_SPEC; +impl crate::RegisterSpec for VARIANT_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [variant::R](R) reader structure"] +impl crate::Readable for VARIANT_SPEC { + type Reader = R; +} +#[doc = "`reset()` method sets VARIANT to value 0x4141_4142"] +impl crate::Resettable for VARIANT_SPEC { + const RESET_VALUE: Self::Ux = 0x4141_4142; +} diff --git a/down-the-stack/dk_pac/src/ficr/ir.rs b/down-the-stack/dk_pac/src/ficr/ir.rs new file mode 100644 index 0000000..1d6bc72 --- /dev/null +++ b/down-the-stack/dk_pac/src/ficr/ir.rs @@ -0,0 +1,38 @@ +#[doc = "Register `IR[%s]` 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 = "Field `IR` reader - Identity Root, word n"] +pub type IR_R = crate::FieldReader; +impl R { + #[doc = "Bits 0:31 - Identity Root, word n"] + #[inline(always)] + pub fn ir(&self) -> IR_R { + IR_R::new(self.bits) + } +} +#[doc = "Description collection: Identity Root, word n\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 [ir](index.html) module"] +pub struct IR_SPEC; +impl crate::RegisterSpec for IR_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [ir::R](R) reader structure"] +impl crate::Readable for IR_SPEC { + type Reader = R; +} +#[doc = "`reset()` method sets IR[%s] +to value 0xffff_ffff"] +impl crate::Resettable for IR_SPEC { + const RESET_VALUE: Self::Ux = 0xffff_ffff; +} diff --git a/down-the-stack/dk_pac/src/ficr/nfc.rs b/down-the-stack/dk_pac/src/ficr/nfc.rs new file mode 100644 index 0000000..fed6f1c --- /dev/null +++ b/down-the-stack/dk_pac/src/ficr/nfc.rs @@ -0,0 +1,28 @@ +#[doc = r"Register block"] +#[repr(C)] +pub struct NFC { + #[doc = "0x00 - Default header for NFC Tag. Software can read these values to populate NFCID1_3RD_LAST, NFCID1_2ND_LAST and NFCID1_LAST."] + pub tagheader0: TAGHEADER0, + #[doc = "0x04 - Default header for NFC Tag. Software can read these values to populate NFCID1_3RD_LAST, NFCID1_2ND_LAST and NFCID1_LAST."] + pub tagheader1: TAGHEADER1, + #[doc = "0x08 - Default header for NFC Tag. Software can read these values to populate NFCID1_3RD_LAST, NFCID1_2ND_LAST and NFCID1_LAST."] + pub tagheader2: TAGHEADER2, + #[doc = "0x0c - Default header for NFC Tag. Software can read these values to populate NFCID1_3RD_LAST, NFCID1_2ND_LAST and NFCID1_LAST."] + pub tagheader3: TAGHEADER3, +} +#[doc = "TAGHEADER0 (r) register accessor: an alias for `Reg`"] +pub type TAGHEADER0 = crate::Reg; +#[doc = "Default header for NFC Tag. Software can read these values to populate NFCID1_3RD_LAST, NFCID1_2ND_LAST and NFCID1_LAST."] +pub mod tagheader0; +#[doc = "TAGHEADER1 (r) register accessor: an alias for `Reg`"] +pub type TAGHEADER1 = crate::Reg; +#[doc = "Default header for NFC Tag. Software can read these values to populate NFCID1_3RD_LAST, NFCID1_2ND_LAST and NFCID1_LAST."] +pub mod tagheader1; +#[doc = "TAGHEADER2 (r) register accessor: an alias for `Reg`"] +pub type TAGHEADER2 = crate::Reg; +#[doc = "Default header for NFC Tag. Software can read these values to populate NFCID1_3RD_LAST, NFCID1_2ND_LAST and NFCID1_LAST."] +pub mod tagheader2; +#[doc = "TAGHEADER3 (r) register accessor: an alias for `Reg`"] +pub type TAGHEADER3 = crate::Reg; +#[doc = "Default header for NFC Tag. Software can read these values to populate NFCID1_3RD_LAST, NFCID1_2ND_LAST and NFCID1_LAST."] +pub mod tagheader3; diff --git a/down-the-stack/dk_pac/src/ficr/nfc/tagheader0.rs b/down-the-stack/dk_pac/src/ficr/nfc/tagheader0.rs new file mode 100644 index 0000000..3cb731a --- /dev/null +++ b/down-the-stack/dk_pac/src/ficr/nfc/tagheader0.rs @@ -0,0 +1,58 @@ +#[doc = "Register `TAGHEADER0` 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 = "Field `MFGID` reader - Default Manufacturer ID: Nordic Semiconductor ASA has ICM 0x5F"] +pub type MFGID_R = crate::FieldReader; +#[doc = "Field `UD1` reader - Unique identifier byte 1"] +pub type UD1_R = crate::FieldReader; +#[doc = "Field `UD2` reader - Unique identifier byte 2"] +pub type UD2_R = crate::FieldReader; +#[doc = "Field `UD3` reader - Unique identifier byte 3"] +pub type UD3_R = crate::FieldReader; +impl R { + #[doc = "Bits 0:7 - Default Manufacturer ID: Nordic Semiconductor ASA has ICM 0x5F"] + #[inline(always)] + pub fn mfgid(&self) -> MFGID_R { + MFGID_R::new((self.bits & 0xff) as u8) + } + #[doc = "Bits 8:15 - Unique identifier byte 1"] + #[inline(always)] + pub fn ud1(&self) -> UD1_R { + UD1_R::new(((self.bits >> 8) & 0xff) as u8) + } + #[doc = "Bits 16:23 - Unique identifier byte 2"] + #[inline(always)] + pub fn ud2(&self) -> UD2_R { + UD2_R::new(((self.bits >> 16) & 0xff) as u8) + } + #[doc = "Bits 24:31 - Unique identifier byte 3"] + #[inline(always)] + pub fn ud3(&self) -> UD3_R { + UD3_R::new(((self.bits >> 24) & 0xff) as u8) + } +} +#[doc = "Default header for NFC Tag. Software can read these values to populate NFCID1_3RD_LAST, NFCID1_2ND_LAST and NFCID1_LAST.\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 [tagheader0](index.html) module"] +pub struct TAGHEADER0_SPEC; +impl crate::RegisterSpec for TAGHEADER0_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [tagheader0::R](R) reader structure"] +impl crate::Readable for TAGHEADER0_SPEC { + type Reader = R; +} +#[doc = "`reset()` method sets TAGHEADER0 to value 0xffff_ff5f"] +impl crate::Resettable for TAGHEADER0_SPEC { + const RESET_VALUE: Self::Ux = 0xffff_ff5f; +} diff --git a/down-the-stack/dk_pac/src/ficr/nfc/tagheader1.rs b/down-the-stack/dk_pac/src/ficr/nfc/tagheader1.rs new file mode 100644 index 0000000..ad65728 --- /dev/null +++ b/down-the-stack/dk_pac/src/ficr/nfc/tagheader1.rs @@ -0,0 +1,58 @@ +#[doc = "Register `TAGHEADER1` 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 = "Field `UD4` reader - Unique identifier byte 4"] +pub type UD4_R = crate::FieldReader; +#[doc = "Field `UD5` reader - Unique identifier byte 5"] +pub type UD5_R = crate::FieldReader; +#[doc = "Field `UD6` reader - Unique identifier byte 6"] +pub type UD6_R = crate::FieldReader; +#[doc = "Field `UD7` reader - Unique identifier byte 7"] +pub type UD7_R = crate::FieldReader; +impl R { + #[doc = "Bits 0:7 - Unique identifier byte 4"] + #[inline(always)] + pub fn ud4(&self) -> UD4_R { + UD4_R::new((self.bits & 0xff) as u8) + } + #[doc = "Bits 8:15 - Unique identifier byte 5"] + #[inline(always)] + pub fn ud5(&self) -> UD5_R { + UD5_R::new(((self.bits >> 8) & 0xff) as u8) + } + #[doc = "Bits 16:23 - Unique identifier byte 6"] + #[inline(always)] + pub fn ud6(&self) -> UD6_R { + UD6_R::new(((self.bits >> 16) & 0xff) as u8) + } + #[doc = "Bits 24:31 - Unique identifier byte 7"] + #[inline(always)] + pub fn ud7(&self) -> UD7_R { + UD7_R::new(((self.bits >> 24) & 0xff) as u8) + } +} +#[doc = "Default header for NFC Tag. Software can read these values to populate NFCID1_3RD_LAST, NFCID1_2ND_LAST and NFCID1_LAST.\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 [tagheader1](index.html) module"] +pub struct TAGHEADER1_SPEC; +impl crate::RegisterSpec for TAGHEADER1_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [tagheader1::R](R) reader structure"] +impl crate::Readable for TAGHEADER1_SPEC { + type Reader = R; +} +#[doc = "`reset()` method sets TAGHEADER1 to value 0xffff_ffff"] +impl crate::Resettable for TAGHEADER1_SPEC { + const RESET_VALUE: Self::Ux = 0xffff_ffff; +} diff --git a/down-the-stack/dk_pac/src/ficr/nfc/tagheader2.rs b/down-the-stack/dk_pac/src/ficr/nfc/tagheader2.rs new file mode 100644 index 0000000..d55515d --- /dev/null +++ b/down-the-stack/dk_pac/src/ficr/nfc/tagheader2.rs @@ -0,0 +1,58 @@ +#[doc = "Register `TAGHEADER2` 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 = "Field `UD8` reader - Unique identifier byte 8"] +pub type UD8_R = crate::FieldReader; +#[doc = "Field `UD9` reader - Unique identifier byte 9"] +pub type UD9_R = crate::FieldReader; +#[doc = "Field `UD10` reader - Unique identifier byte 10"] +pub type UD10_R = crate::FieldReader; +#[doc = "Field `UD11` reader - Unique identifier byte 11"] +pub type UD11_R = crate::FieldReader; +impl R { + #[doc = "Bits 0:7 - Unique identifier byte 8"] + #[inline(always)] + pub fn ud8(&self) -> UD8_R { + UD8_R::new((self.bits & 0xff) as u8) + } + #[doc = "Bits 8:15 - Unique identifier byte 9"] + #[inline(always)] + pub fn ud9(&self) -> UD9_R { + UD9_R::new(((self.bits >> 8) & 0xff) as u8) + } + #[doc = "Bits 16:23 - Unique identifier byte 10"] + #[inline(always)] + pub fn ud10(&self) -> UD10_R { + UD10_R::new(((self.bits >> 16) & 0xff) as u8) + } + #[doc = "Bits 24:31 - Unique identifier byte 11"] + #[inline(always)] + pub fn ud11(&self) -> UD11_R { + UD11_R::new(((self.bits >> 24) & 0xff) as u8) + } +} +#[doc = "Default header for NFC Tag. Software can read these values to populate NFCID1_3RD_LAST, NFCID1_2ND_LAST and NFCID1_LAST.\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 [tagheader2](index.html) module"] +pub struct TAGHEADER2_SPEC; +impl crate::RegisterSpec for TAGHEADER2_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [tagheader2::R](R) reader structure"] +impl crate::Readable for TAGHEADER2_SPEC { + type Reader = R; +} +#[doc = "`reset()` method sets TAGHEADER2 to value 0xffff_ffff"] +impl crate::Resettable for TAGHEADER2_SPEC { + const RESET_VALUE: Self::Ux = 0xffff_ffff; +} diff --git a/down-the-stack/dk_pac/src/ficr/nfc/tagheader3.rs b/down-the-stack/dk_pac/src/ficr/nfc/tagheader3.rs new file mode 100644 index 0000000..a5b84b2 --- /dev/null +++ b/down-the-stack/dk_pac/src/ficr/nfc/tagheader3.rs @@ -0,0 +1,58 @@ +#[doc = "Register `TAGHEADER3` 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 = "Field `UD12` reader - Unique identifier byte 12"] +pub type UD12_R = crate::FieldReader; +#[doc = "Field `UD13` reader - Unique identifier byte 13"] +pub type UD13_R = crate::FieldReader; +#[doc = "Field `UD14` reader - Unique identifier byte 14"] +pub type UD14_R = crate::FieldReader; +#[doc = "Field `UD15` reader - Unique identifier byte 15"] +pub type UD15_R = crate::FieldReader; +impl R { + #[doc = "Bits 0:7 - Unique identifier byte 12"] + #[inline(always)] + pub fn ud12(&self) -> UD12_R { + UD12_R::new((self.bits & 0xff) as u8) + } + #[doc = "Bits 8:15 - Unique identifier byte 13"] + #[inline(always)] + pub fn ud13(&self) -> UD13_R { + UD13_R::new(((self.bits >> 8) & 0xff) as u8) + } + #[doc = "Bits 16:23 - Unique identifier byte 14"] + #[inline(always)] + pub fn ud14(&self) -> UD14_R { + UD14_R::new(((self.bits >> 16) & 0xff) as u8) + } + #[doc = "Bits 24:31 - Unique identifier byte 15"] + #[inline(always)] + pub fn ud15(&self) -> UD15_R { + UD15_R::new(((self.bits >> 24) & 0xff) as u8) + } +} +#[doc = "Default header for NFC Tag. Software can read these values to populate NFCID1_3RD_LAST, NFCID1_2ND_LAST and NFCID1_LAST.\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 [tagheader3](index.html) module"] +pub struct TAGHEADER3_SPEC; +impl crate::RegisterSpec for TAGHEADER3_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [tagheader3::R](R) reader structure"] +impl crate::Readable for TAGHEADER3_SPEC { + type Reader = R; +} +#[doc = "`reset()` method sets TAGHEADER3 to value 0xffff_ffff"] +impl crate::Resettable for TAGHEADER3_SPEC { + const RESET_VALUE: Self::Ux = 0xffff_ffff; +} diff --git a/down-the-stack/dk_pac/src/ficr/temp.rs b/down-the-stack/dk_pac/src/ficr/temp.rs new file mode 100644 index 0000000..320b3d0 --- /dev/null +++ b/down-the-stack/dk_pac/src/ficr/temp.rs @@ -0,0 +1,106 @@ +#[doc = r"Register block"] +#[repr(C)] +pub struct TEMP { + #[doc = "0x00 - Slope definition A0."] + pub a0: A0, + #[doc = "0x04 - Slope definition A1."] + pub a1: A1, + #[doc = "0x08 - Slope definition A2."] + pub a2: A2, + #[doc = "0x0c - Slope definition A3."] + pub a3: A3, + #[doc = "0x10 - Slope definition A4."] + pub a4: A4, + #[doc = "0x14 - Slope definition A5."] + pub a5: A5, + #[doc = "0x18 - y-intercept B0."] + pub b0: B0, + #[doc = "0x1c - y-intercept B1."] + pub b1: B1, + #[doc = "0x20 - y-intercept B2."] + pub b2: B2, + #[doc = "0x24 - y-intercept B3."] + pub b3: B3, + #[doc = "0x28 - y-intercept B4."] + pub b4: B4, + #[doc = "0x2c - y-intercept B5."] + pub b5: B5, + #[doc = "0x30 - Segment end T0."] + pub t0: T0, + #[doc = "0x34 - Segment end T1."] + pub t1: T1, + #[doc = "0x38 - Segment end T2."] + pub t2: T2, + #[doc = "0x3c - Segment end T3."] + pub t3: T3, + #[doc = "0x40 - Segment end T4."] + pub t4: T4, +} +#[doc = "A0 (r) register accessor: an alias for `Reg`"] +pub type A0 = crate::Reg; +#[doc = "Slope definition A0."] +pub mod a0; +#[doc = "A1 (r) register accessor: an alias for `Reg`"] +pub type A1 = crate::Reg; +#[doc = "Slope definition A1."] +pub mod a1; +#[doc = "A2 (r) register accessor: an alias for `Reg`"] +pub type A2 = crate::Reg; +#[doc = "Slope definition A2."] +pub mod a2; +#[doc = "A3 (r) register accessor: an alias for `Reg`"] +pub type A3 = crate::Reg; +#[doc = "Slope definition A3."] +pub mod a3; +#[doc = "A4 (r) register accessor: an alias for `Reg`"] +pub type A4 = crate::Reg; +#[doc = "Slope definition A4."] +pub mod a4; +#[doc = "A5 (r) register accessor: an alias for `Reg`"] +pub type A5 = crate::Reg; +#[doc = "Slope definition A5."] +pub mod a5; +#[doc = "B0 (r) register accessor: an alias for `Reg`"] +pub type B0 = crate::Reg; +#[doc = "y-intercept B0."] +pub mod b0; +#[doc = "B1 (r) register accessor: an alias for `Reg`"] +pub type B1 = crate::Reg; +#[doc = "y-intercept B1."] +pub mod b1; +#[doc = "B2 (r) register accessor: an alias for `Reg`"] +pub type B2 = crate::Reg; +#[doc = "y-intercept B2."] +pub mod b2; +#[doc = "B3 (r) register accessor: an alias for `Reg`"] +pub type B3 = crate::Reg; +#[doc = "y-intercept B3."] +pub mod b3; +#[doc = "B4 (r) register accessor: an alias for `Reg`"] +pub type B4 = crate::Reg; +#[doc = "y-intercept B4."] +pub mod b4; +#[doc = "B5 (r) register accessor: an alias for `Reg`"] +pub type B5 = crate::Reg; +#[doc = "y-intercept B5."] +pub mod b5; +#[doc = "T0 (r) register accessor: an alias for `Reg`"] +pub type T0 = crate::Reg; +#[doc = "Segment end T0."] +pub mod t0; +#[doc = "T1 (r) register accessor: an alias for `Reg`"] +pub type T1 = crate::Reg; +#[doc = "Segment end T1."] +pub mod t1; +#[doc = "T2 (r) register accessor: an alias for `Reg`"] +pub type T2 = crate::Reg; +#[doc = "Segment end T2."] +pub mod t2; +#[doc = "T3 (r) register accessor: an alias for `Reg`"] +pub type T3 = crate::Reg; +#[doc = "Segment end T3."] +pub mod t3; +#[doc = "T4 (r) register accessor: an alias for `Reg`"] +pub type T4 = crate::Reg; +#[doc = "Segment end T4."] +pub mod t4; diff --git a/down-the-stack/dk_pac/src/ficr/temp/a0.rs b/down-the-stack/dk_pac/src/ficr/temp/a0.rs new file mode 100644 index 0000000..7cca9fb --- /dev/null +++ b/down-the-stack/dk_pac/src/ficr/temp/a0.rs @@ -0,0 +1,37 @@ +#[doc = "Register `A0` 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 = "Field `A` reader - A (slope definition) register."] +pub type A_R = crate::FieldReader; +impl R { + #[doc = "Bits 0:11 - A (slope definition) register."] + #[inline(always)] + pub fn a(&self) -> A_R { + A_R::new((self.bits & 0x0fff) as u16) + } +} +#[doc = "Slope definition A0.\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 [a0](index.html) module"] +pub struct A0_SPEC; +impl crate::RegisterSpec for A0_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [a0::R](R) reader structure"] +impl crate::Readable for A0_SPEC { + type Reader = R; +} +#[doc = "`reset()` method sets A0 to value 0x0320"] +impl crate::Resettable for A0_SPEC { + const RESET_VALUE: Self::Ux = 0x0320; +} diff --git a/down-the-stack/dk_pac/src/ficr/temp/a1.rs b/down-the-stack/dk_pac/src/ficr/temp/a1.rs new file mode 100644 index 0000000..395e273 --- /dev/null +++ b/down-the-stack/dk_pac/src/ficr/temp/a1.rs @@ -0,0 +1,37 @@ +#[doc = "Register `A1` 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 = "Field `A` reader - A (slope definition) register."] +pub type A_R = crate::FieldReader; +impl R { + #[doc = "Bits 0:11 - A (slope definition) register."] + #[inline(always)] + pub fn a(&self) -> A_R { + A_R::new((self.bits & 0x0fff) as u16) + } +} +#[doc = "Slope definition A1.\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 [a1](index.html) module"] +pub struct A1_SPEC; +impl crate::RegisterSpec for A1_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [a1::R](R) reader structure"] +impl crate::Readable for A1_SPEC { + type Reader = R; +} +#[doc = "`reset()` method sets A1 to value 0x0343"] +impl crate::Resettable for A1_SPEC { + const RESET_VALUE: Self::Ux = 0x0343; +} diff --git a/down-the-stack/dk_pac/src/ficr/temp/a2.rs b/down-the-stack/dk_pac/src/ficr/temp/a2.rs new file mode 100644 index 0000000..1857a3d --- /dev/null +++ b/down-the-stack/dk_pac/src/ficr/temp/a2.rs @@ -0,0 +1,37 @@ +#[doc = "Register `A2` 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 = "Field `A` reader - A (slope definition) register."] +pub type A_R = crate::FieldReader; +impl R { + #[doc = "Bits 0:11 - A (slope definition) register."] + #[inline(always)] + pub fn a(&self) -> A_R { + A_R::new((self.bits & 0x0fff) as u16) + } +} +#[doc = "Slope definition A2.\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 [a2](index.html) module"] +pub struct A2_SPEC; +impl crate::RegisterSpec for A2_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [a2::R](R) reader structure"] +impl crate::Readable for A2_SPEC { + type Reader = R; +} +#[doc = "`reset()` method sets A2 to value 0x035d"] +impl crate::Resettable for A2_SPEC { + const RESET_VALUE: Self::Ux = 0x035d; +} diff --git a/down-the-stack/dk_pac/src/ficr/temp/a3.rs b/down-the-stack/dk_pac/src/ficr/temp/a3.rs new file mode 100644 index 0000000..a2d2e24 --- /dev/null +++ b/down-the-stack/dk_pac/src/ficr/temp/a3.rs @@ -0,0 +1,37 @@ +#[doc = "Register `A3` 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 = "Field `A` reader - A (slope definition) register."] +pub type A_R = crate::FieldReader; +impl R { + #[doc = "Bits 0:11 - A (slope definition) register."] + #[inline(always)] + pub fn a(&self) -> A_R { + A_R::new((self.bits & 0x0fff) as u16) + } +} +#[doc = "Slope definition A3.\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 [a3](index.html) module"] +pub struct A3_SPEC; +impl crate::RegisterSpec for A3_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [a3::R](R) reader structure"] +impl crate::Readable for A3_SPEC { + type Reader = R; +} +#[doc = "`reset()` method sets A3 to value 0x0400"] +impl crate::Resettable for A3_SPEC { + const RESET_VALUE: Self::Ux = 0x0400; +} diff --git a/down-the-stack/dk_pac/src/ficr/temp/a4.rs b/down-the-stack/dk_pac/src/ficr/temp/a4.rs new file mode 100644 index 0000000..39a2ec8 --- /dev/null +++ b/down-the-stack/dk_pac/src/ficr/temp/a4.rs @@ -0,0 +1,37 @@ +#[doc = "Register `A4` 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 = "Field `A` reader - A (slope definition) register."] +pub type A_R = crate::FieldReader; +impl R { + #[doc = "Bits 0:11 - A (slope definition) register."] + #[inline(always)] + pub fn a(&self) -> A_R { + A_R::new((self.bits & 0x0fff) as u16) + } +} +#[doc = "Slope definition A4.\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 [a4](index.html) module"] +pub struct A4_SPEC; +impl crate::RegisterSpec for A4_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [a4::R](R) reader structure"] +impl crate::Readable for A4_SPEC { + type Reader = R; +} +#[doc = "`reset()` method sets A4 to value 0x0452"] +impl crate::Resettable for A4_SPEC { + const RESET_VALUE: Self::Ux = 0x0452; +} diff --git a/down-the-stack/dk_pac/src/ficr/temp/a5.rs b/down-the-stack/dk_pac/src/ficr/temp/a5.rs new file mode 100644 index 0000000..7314ae2 --- /dev/null +++ b/down-the-stack/dk_pac/src/ficr/temp/a5.rs @@ -0,0 +1,37 @@ +#[doc = "Register `A5` 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 = "Field `A` reader - A (slope definition) register."] +pub type A_R = crate::FieldReader; +impl R { + #[doc = "Bits 0:11 - A (slope definition) register."] + #[inline(always)] + pub fn a(&self) -> A_R { + A_R::new((self.bits & 0x0fff) as u16) + } +} +#[doc = "Slope definition A5.\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 [a5](index.html) module"] +pub struct A5_SPEC; +impl crate::RegisterSpec for A5_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [a5::R](R) reader structure"] +impl crate::Readable for A5_SPEC { + type Reader = R; +} +#[doc = "`reset()` method sets A5 to value 0x037b"] +impl crate::Resettable for A5_SPEC { + const RESET_VALUE: Self::Ux = 0x037b; +} diff --git a/down-the-stack/dk_pac/src/ficr/temp/b0.rs b/down-the-stack/dk_pac/src/ficr/temp/b0.rs new file mode 100644 index 0000000..fabf946 --- /dev/null +++ b/down-the-stack/dk_pac/src/ficr/temp/b0.rs @@ -0,0 +1,37 @@ +#[doc = "Register `B0` 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 = "Field `B` reader - B (y-intercept)"] +pub type B_R = crate::FieldReader; +impl R { + #[doc = "Bits 0:13 - B (y-intercept)"] + #[inline(always)] + pub fn b(&self) -> B_R { + B_R::new((self.bits & 0x3fff) as u16) + } +} +#[doc = "y-intercept B0.\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 [b0](index.html) module"] +pub struct B0_SPEC; +impl crate::RegisterSpec for B0_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [b0::R](R) reader structure"] +impl crate::Readable for B0_SPEC { + type Reader = R; +} +#[doc = "`reset()` method sets B0 to value 0x3fcc"] +impl crate::Resettable for B0_SPEC { + const RESET_VALUE: Self::Ux = 0x3fcc; +} diff --git a/down-the-stack/dk_pac/src/ficr/temp/b1.rs b/down-the-stack/dk_pac/src/ficr/temp/b1.rs new file mode 100644 index 0000000..f056f0e --- /dev/null +++ b/down-the-stack/dk_pac/src/ficr/temp/b1.rs @@ -0,0 +1,37 @@ +#[doc = "Register `B1` 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 = "Field `B` reader - B (y-intercept)"] +pub type B_R = crate::FieldReader; +impl R { + #[doc = "Bits 0:13 - B (y-intercept)"] + #[inline(always)] + pub fn b(&self) -> B_R { + B_R::new((self.bits & 0x3fff) as u16) + } +} +#[doc = "y-intercept B1.\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 [b1](index.html) module"] +pub struct B1_SPEC; +impl crate::RegisterSpec for B1_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [b1::R](R) reader structure"] +impl crate::Readable for B1_SPEC { + type Reader = R; +} +#[doc = "`reset()` method sets B1 to value 0x3f98"] +impl crate::Resettable for B1_SPEC { + const RESET_VALUE: Self::Ux = 0x3f98; +} diff --git a/down-the-stack/dk_pac/src/ficr/temp/b2.rs b/down-the-stack/dk_pac/src/ficr/temp/b2.rs new file mode 100644 index 0000000..17d4665 --- /dev/null +++ b/down-the-stack/dk_pac/src/ficr/temp/b2.rs @@ -0,0 +1,37 @@ +#[doc = "Register `B2` 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 = "Field `B` reader - B (y-intercept)"] +pub type B_R = crate::FieldReader; +impl R { + #[doc = "Bits 0:13 - B (y-intercept)"] + #[inline(always)] + pub fn b(&self) -> B_R { + B_R::new((self.bits & 0x3fff) as u16) + } +} +#[doc = "y-intercept B2.\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 [b2](index.html) module"] +pub struct B2_SPEC; +impl crate::RegisterSpec for B2_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [b2::R](R) reader structure"] +impl crate::Readable for B2_SPEC { + type Reader = R; +} +#[doc = "`reset()` method sets B2 to value 0x3f98"] +impl crate::Resettable for B2_SPEC { + const RESET_VALUE: Self::Ux = 0x3f98; +} diff --git a/down-the-stack/dk_pac/src/ficr/temp/b3.rs b/down-the-stack/dk_pac/src/ficr/temp/b3.rs new file mode 100644 index 0000000..865d5c0 --- /dev/null +++ b/down-the-stack/dk_pac/src/ficr/temp/b3.rs @@ -0,0 +1,37 @@ +#[doc = "Register `B3` 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 = "Field `B` reader - B (y-intercept)"] +pub type B_R = crate::FieldReader; +impl R { + #[doc = "Bits 0:13 - B (y-intercept)"] + #[inline(always)] + pub fn b(&self) -> B_R { + B_R::new((self.bits & 0x3fff) as u16) + } +} +#[doc = "y-intercept B3.\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 [b3](index.html) module"] +pub struct B3_SPEC; +impl crate::RegisterSpec for B3_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [b3::R](R) reader structure"] +impl crate::Readable for B3_SPEC { + type Reader = R; +} +#[doc = "`reset()` method sets B3 to value 0x12"] +impl crate::Resettable for B3_SPEC { + const RESET_VALUE: Self::Ux = 0x12; +} diff --git a/down-the-stack/dk_pac/src/ficr/temp/b4.rs b/down-the-stack/dk_pac/src/ficr/temp/b4.rs new file mode 100644 index 0000000..e747f2a --- /dev/null +++ b/down-the-stack/dk_pac/src/ficr/temp/b4.rs @@ -0,0 +1,37 @@ +#[doc = "Register `B4` 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 = "Field `B` reader - B (y-intercept)"] +pub type B_R = crate::FieldReader; +impl R { + #[doc = "Bits 0:13 - B (y-intercept)"] + #[inline(always)] + pub fn b(&self) -> B_R { + B_R::new((self.bits & 0x3fff) as u16) + } +} +#[doc = "y-intercept B4.\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 [b4](index.html) module"] +pub struct B4_SPEC; +impl crate::RegisterSpec for B4_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [b4::R](R) reader structure"] +impl crate::Readable for B4_SPEC { + type Reader = R; +} +#[doc = "`reset()` method sets B4 to value 0x4d"] +impl crate::Resettable for B4_SPEC { + const RESET_VALUE: Self::Ux = 0x4d; +} diff --git a/down-the-stack/dk_pac/src/ficr/temp/b5.rs b/down-the-stack/dk_pac/src/ficr/temp/b5.rs new file mode 100644 index 0000000..2b48f61 --- /dev/null +++ b/down-the-stack/dk_pac/src/ficr/temp/b5.rs @@ -0,0 +1,37 @@ +#[doc = "Register `B5` 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 = "Field `B` reader - B (y-intercept)"] +pub type B_R = crate::FieldReader; +impl R { + #[doc = "Bits 0:13 - B (y-intercept)"] + #[inline(always)] + pub fn b(&self) -> B_R { + B_R::new((self.bits & 0x3fff) as u16) + } +} +#[doc = "y-intercept B5.\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 [b5](index.html) module"] +pub struct B5_SPEC; +impl crate::RegisterSpec for B5_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [b5::R](R) reader structure"] +impl crate::Readable for B5_SPEC { + type Reader = R; +} +#[doc = "`reset()` method sets B5 to value 0x3e10"] +impl crate::Resettable for B5_SPEC { + const RESET_VALUE: Self::Ux = 0x3e10; +} diff --git a/down-the-stack/dk_pac/src/ficr/temp/t0.rs b/down-the-stack/dk_pac/src/ficr/temp/t0.rs new file mode 100644 index 0000000..3d0754c --- /dev/null +++ b/down-the-stack/dk_pac/src/ficr/temp/t0.rs @@ -0,0 +1,37 @@ +#[doc = "Register `T0` 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 = "Field `T` reader - T (segment end)register."] +pub type T_R = crate::FieldReader; +impl R { + #[doc = "Bits 0:7 - T (segment end)register."] + #[inline(always)] + pub fn t(&self) -> T_R { + T_R::new((self.bits & 0xff) as u8) + } +} +#[doc = "Segment end T0.\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 [t0](index.html) module"] +pub struct T0_SPEC; +impl crate::RegisterSpec for T0_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [t0::R](R) reader structure"] +impl crate::Readable for T0_SPEC { + type Reader = R; +} +#[doc = "`reset()` method sets T0 to value 0xe2"] +impl crate::Resettable for T0_SPEC { + const RESET_VALUE: Self::Ux = 0xe2; +} diff --git a/down-the-stack/dk_pac/src/ficr/temp/t1.rs b/down-the-stack/dk_pac/src/ficr/temp/t1.rs new file mode 100644 index 0000000..a2bfb70 --- /dev/null +++ b/down-the-stack/dk_pac/src/ficr/temp/t1.rs @@ -0,0 +1,37 @@ +#[doc = "Register `T1` 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 = "Field `T` reader - T (segment end)register."] +pub type T_R = crate::FieldReader; +impl R { + #[doc = "Bits 0:7 - T (segment end)register."] + #[inline(always)] + pub fn t(&self) -> T_R { + T_R::new((self.bits & 0xff) as u8) + } +} +#[doc = "Segment end T1.\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 [t1](index.html) module"] +pub struct T1_SPEC; +impl crate::RegisterSpec for T1_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [t1::R](R) reader structure"] +impl crate::Readable for T1_SPEC { + type Reader = R; +} +#[doc = "`reset()` method sets T1 to value 0"] +impl crate::Resettable for T1_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/ficr/temp/t2.rs b/down-the-stack/dk_pac/src/ficr/temp/t2.rs new file mode 100644 index 0000000..693de6e --- /dev/null +++ b/down-the-stack/dk_pac/src/ficr/temp/t2.rs @@ -0,0 +1,37 @@ +#[doc = "Register `T2` 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 = "Field `T` reader - T (segment end)register."] +pub type T_R = crate::FieldReader; +impl R { + #[doc = "Bits 0:7 - T (segment end)register."] + #[inline(always)] + pub fn t(&self) -> T_R { + T_R::new((self.bits & 0xff) as u8) + } +} +#[doc = "Segment end T2.\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 [t2](index.html) module"] +pub struct T2_SPEC; +impl crate::RegisterSpec for T2_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [t2::R](R) reader structure"] +impl crate::Readable for T2_SPEC { + type Reader = R; +} +#[doc = "`reset()` method sets T2 to value 0x14"] +impl crate::Resettable for T2_SPEC { + const RESET_VALUE: Self::Ux = 0x14; +} diff --git a/down-the-stack/dk_pac/src/ficr/temp/t3.rs b/down-the-stack/dk_pac/src/ficr/temp/t3.rs new file mode 100644 index 0000000..a6efd0a --- /dev/null +++ b/down-the-stack/dk_pac/src/ficr/temp/t3.rs @@ -0,0 +1,37 @@ +#[doc = "Register `T3` 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 = "Field `T` reader - T (segment end)register."] +pub type T_R = crate::FieldReader; +impl R { + #[doc = "Bits 0:7 - T (segment end)register."] + #[inline(always)] + pub fn t(&self) -> T_R { + T_R::new((self.bits & 0xff) as u8) + } +} +#[doc = "Segment end T3.\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 [t3](index.html) module"] +pub struct T3_SPEC; +impl crate::RegisterSpec for T3_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [t3::R](R) reader structure"] +impl crate::Readable for T3_SPEC { + type Reader = R; +} +#[doc = "`reset()` method sets T3 to value 0x19"] +impl crate::Resettable for T3_SPEC { + const RESET_VALUE: Self::Ux = 0x19; +} diff --git a/down-the-stack/dk_pac/src/ficr/temp/t4.rs b/down-the-stack/dk_pac/src/ficr/temp/t4.rs new file mode 100644 index 0000000..c9bf79e --- /dev/null +++ b/down-the-stack/dk_pac/src/ficr/temp/t4.rs @@ -0,0 +1,37 @@ +#[doc = "Register `T4` 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 = "Field `T` reader - T (segment end)register."] +pub type T_R = crate::FieldReader; +impl R { + #[doc = "Bits 0:7 - T (segment end)register."] + #[inline(always)] + pub fn t(&self) -> T_R { + T_R::new((self.bits & 0xff) as u8) + } +} +#[doc = "Segment end T4.\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 [t4](index.html) module"] +pub struct T4_SPEC; +impl crate::RegisterSpec for T4_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [t4::R](R) reader structure"] +impl crate::Readable for T4_SPEC { + type Reader = R; +} +#[doc = "`reset()` method sets T4 to value 0x50"] +impl crate::Resettable for T4_SPEC { + const RESET_VALUE: Self::Ux = 0x50; +} diff --git a/down-the-stack/dk_pac/src/generic.rs b/down-the-stack/dk_pac/src/generic.rs new file mode 100644 index 0000000..da9c619 --- /dev/null +++ b/down-the-stack/dk_pac/src/generic.rs @@ -0,0 +1,634 @@ +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: RawReg; +} +#[doc = " Trait implemented by readable registers to enable the `read` method."] +#[doc = ""] +#[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: 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 be `modify`'ed."] +pub trait Writable: RegisterSpec { + #[doc = " Writer type argument to `write`, et al."] + 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 = ""] +#[doc = " This value is the initial value for the `write` method. It can also be directly written to the"] +#[doc = " register by using the `reset` method."] +pub trait Resettable: RegisterSpec { + #[doc = " Reset value of the register."] + 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)] +pub struct Reg { + register: vcell::VolatileCell, + _marker: marker::PhantomData, +} +unsafe impl Send for Reg where REG::Ux: Send {} +impl Reg { + #[doc = " Returns the underlying memory address of register."] + #[doc = ""] + #[doc = " ```ignore"] + #[doc = " let reg_ptr = periph.reg.as_ptr();"] + #[doc = " ```"] + #[inline(always)] + pub fn as_ptr(&self) -> *mut REG::Ux { + self.register.as_ptr() + } +} +impl Reg { + #[doc = " Reads the contents of a `Readable` register."] + #[doc = ""] + #[doc = " You can read the raw contents of a register by using `bits`:"] + #[doc = " ```ignore"] + #[doc = " let bits = periph.reg.read().bits();"] + #[doc = " ```"] + #[doc = " or get the content of a particular field of a register:"] + #[doc = " ```ignore"] + #[doc = " let reader = periph.reg.read();"] + #[doc = " let bits = reader.field1().bits();"] + #[doc = " let flag = reader.field2().bit_is_set();"] + #[doc = " ```"] + #[inline(always)] + pub fn read(&self) -> REG::Reader { + REG::Reader::from(R { + bits: self.register.get(), + _reg: marker::PhantomData, + }) + } +} +impl Reg { + #[doc = " Writes the reset value to `Writable` register."] + #[doc = ""] + #[doc = " Resets the register to its initial state."] + #[inline(always)] + pub fn reset(&self) { + self.register.set(REG::RESET_VALUE) + } + #[doc = " Writes bits to a `Writable` register."] + #[doc = ""] + #[doc = " You can write raw bits into a register:"] + #[doc = " ```ignore"] + #[doc = " periph.reg.write(|w| unsafe { w.bits(rawbits) });"] + #[doc = " ```"] + #[doc = " or write only the fields you need:"] + #[doc = " ```ignore"] + #[doc = " periph.reg.write(|w| w"] + #[doc = " .field1().bits(newfield1bits)"] + #[doc = " .field2().set_bit()"] + #[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) + where + F: FnOnce(&mut REG::Writer) -> &mut W, + { + self.register.set( + f(&mut REG::Writer::from(W { + bits: REG::RESET_VALUE & !REG::ONE_TO_MODIFY_FIELDS_BITMAP + | REG::ZERO_TO_MODIFY_FIELDS_BITMAP, + _reg: marker::PhantomData, + })) + .bits, + ); + } +} +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 { + bits: REG::Ux::default(), + _reg: marker::PhantomData, + })) + .bits, + ); + } +} +impl Reg { + #[doc = " Modifies the contents of the register by reading and then writing it."] + #[doc = ""] + #[doc = " E.g. to do a read-modify-write sequence to change parts of a register:"] + #[doc = " ```ignore"] + #[doc = " periph.reg.modify(|r, w| unsafe { w.bits("] + #[doc = " r.bits() | 3"] + #[doc = " ) });"] + #[doc = " ```"] + #[doc = " or"] + #[doc = " ```ignore"] + #[doc = " periph.reg.modify(|_, w| w"] + #[doc = " .field1().bits(newfield1bits)"] + #[doc = " .field2().set_bit()"] + #[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) + where + for<'w> F: FnOnce(®::Reader, &'w mut REG::Writer) -> &'w mut W, + { + let bits = self.register.get(); + self.register.set( + f( + ®::Reader::from(R { + bits, + _reg: marker::PhantomData, + }), + &mut REG::Writer::from(W { + bits: bits & !REG::ONE_TO_MODIFY_FIELDS_BITMAP + | REG::ZERO_TO_MODIFY_FIELDS_BITMAP, + _reg: marker::PhantomData, + }), + ) + .bits, + ); + } +} +#[doc = " Register reader."] +#[doc = ""] +#[doc = " Result of the `read` methods of registers. Also used as a closure argument in the `modify`"] +#[doc = " method."] +pub struct R { + pub(crate) bits: REG::Ux, + _reg: marker::PhantomData, +} +impl R { + #[doc = " Reads raw bits from register."] + #[inline(always)] + pub fn bits(&self) -> REG::Ux { + self.bits + } +} +impl PartialEq for R +where + REG::Ux: PartialEq, + FI: Copy, + REG::Ux: From, +{ + #[inline(always)] + fn eq(&self, other: &FI) -> bool { + self.bits.eq(®::Ux::from(*other)) + } +} +#[doc = " Register writer."] +#[doc = ""] +#[doc = " Used as an argument to the closures in the `write` and `modify` methods of the register."] +pub struct W { + #[doc = "Writable bits"] + pub(crate) bits: REG::Ux, + _reg: marker::PhantomData, +} +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(hidden)] +pub struct FieldReaderRaw { + pub(crate) bits: U, + _reg: marker::PhantomData, +} +impl FieldReaderRaw +where + U: Copy, +{ + #[doc = " Creates a new instance of the reader."] + #[allow(unused)] + #[inline(always)] + pub(crate) fn new(bits: U) -> Self { + Self { + bits, + _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 +where + U: PartialEq, + FI: Copy, + U: From, +{ + #[inline(always)] + fn eq(&self, other: &FI) -> bool { + self.bits.eq(&U::from(*other)) + } +} +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 { + self.bits + } + #[doc = " Returns `true` if the bit is clear (0)."] + #[inline(always)] + pub fn bit_is_clear(&self) -> bool { + !self.bit() + } + #[doc = " Returns `true` if the bit is set (1)."] + #[inline(always)] + pub fn bit_is_set(&self) -> bool { + 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/down-the-stack/dk_pac/src/gpiote.rs b/down-the-stack/dk_pac/src/gpiote.rs new file mode 100644 index 0000000..58b6f2e --- /dev/null +++ b/down-the-stack/dk_pac/src/gpiote.rs @@ -0,0 +1,64 @@ +#[doc = r"Register block"] +#[repr(C)] +pub struct RegisterBlock { + #[doc = "0x00..0x20 - Description collection: Task for writing to pin specified in CONFIG\\[n\\].PSEL. Action on pin is configured in CONFIG\\[n\\].POLARITY."] + pub tasks_out: [TASKS_OUT; 8], + _reserved1: [u8; 0x10], + #[doc = "0x30..0x50 - Description collection: Task for writing to pin specified in CONFIG\\[n\\].PSEL. Action on pin is to set it high."] + pub tasks_set: [TASKS_SET; 8], + _reserved2: [u8; 0x10], + #[doc = "0x60..0x80 - Description collection: Task for writing to pin specified in CONFIG\\[n\\].PSEL. Action on pin is to set it low."] + pub tasks_clr: [TASKS_CLR; 8], + _reserved3: [u8; 0x80], + #[doc = "0x100..0x120 - Description collection: Event generated from pin specified in CONFIG\\[n\\].PSEL"] + pub events_in: [EVENTS_IN; 8], + _reserved4: [u8; 0x5c], + #[doc = "0x17c - Event generated from multiple input GPIO pins with SENSE mechanism enabled"] + pub events_port: EVENTS_PORT, + _reserved5: [u8; 0x0184], + #[doc = "0x304 - Enable interrupt"] + pub intenset: INTENSET, + #[doc = "0x308 - Disable interrupt"] + pub intenclr: INTENCLR, + _reserved7: [u8; 0x0204], + #[doc = "0x510..0x530 - Description collection: Configuration for OUT\\[n\\], SET\\[n\\] +and CLR\\[n\\] +tasks and IN\\[n\\] +event"] + pub config: [CONFIG; 8], +} +#[doc = "TASKS_OUT (w) register accessor: an alias for `Reg`"] +pub type TASKS_OUT = crate::Reg; +#[doc = "Description collection: Task for writing to pin specified in CONFIG\\[n\\].PSEL. Action on pin is configured in CONFIG\\[n\\].POLARITY."] +pub mod tasks_out; +#[doc = "TASKS_SET (w) register accessor: an alias for `Reg`"] +pub type TASKS_SET = crate::Reg; +#[doc = "Description collection: Task for writing to pin specified in CONFIG\\[n\\].PSEL. Action on pin is to set it high."] +pub mod tasks_set; +#[doc = "TASKS_CLR (w) register accessor: an alias for `Reg`"] +pub type TASKS_CLR = crate::Reg; +#[doc = "Description collection: Task for writing to pin specified in CONFIG\\[n\\].PSEL. Action on pin is to set it low."] +pub mod tasks_clr; +#[doc = "EVENTS_IN (rw) register accessor: an alias for `Reg`"] +pub type EVENTS_IN = crate::Reg; +#[doc = "Description collection: Event generated from pin specified in CONFIG\\[n\\].PSEL"] +pub mod events_in; +#[doc = "EVENTS_PORT (rw) register accessor: an alias for `Reg`"] +pub type EVENTS_PORT = crate::Reg; +#[doc = "Event generated from multiple input GPIO pins with SENSE mechanism enabled"] +pub mod events_port; +#[doc = "INTENSET (rw) register accessor: an alias for `Reg`"] +pub type INTENSET = crate::Reg; +#[doc = "Enable interrupt"] +pub mod intenset; +#[doc = "INTENCLR (rw) register accessor: an alias for `Reg`"] +pub type INTENCLR = crate::Reg; +#[doc = "Disable interrupt"] +pub mod intenclr; +#[doc = "CONFIG (rw) register accessor: an alias for `Reg`"] +pub type CONFIG = crate::Reg; +#[doc = "Description collection: Configuration for OUT\\[n\\], SET\\[n\\] +and CLR\\[n\\] +tasks and IN\\[n\\] +event"] +pub mod config; diff --git a/down-the-stack/dk_pac/src/gpiote/config.rs b/down-the-stack/dk_pac/src/gpiote/config.rs new file mode 100644 index 0000000..052eca6 --- /dev/null +++ b/down-the-stack/dk_pac/src/gpiote/config.rs @@ -0,0 +1,347 @@ +#[doc = "Register `CONFIG[%s]` 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 `CONFIG[%s]` 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 `MODE` reader - Mode"] +pub type MODE_R = crate::FieldReader; +#[doc = "Mode\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +#[repr(u8)] +pub enum MODE_A { + #[doc = "0: Disabled. Pin specified by PSEL will not be acquired by the GPIOTE module."] + DISABLED = 0, + #[doc = "1: Event mode"] + EVENT = 1, + #[doc = "3: Task mode"] + TASK = 3, +} +impl From for u8 { + #[inline(always)] + fn from(variant: MODE_A) -> Self { + variant as _ + } +} +impl MODE_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> Option { + match self.bits { + 0 => Some(MODE_A::DISABLED), + 1 => Some(MODE_A::EVENT), + 3 => Some(MODE_A::TASK), + _ => None, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == MODE_A::DISABLED + } + #[doc = "Checks if the value of the field is `EVENT`"] + #[inline(always)] + pub fn is_event(&self) -> bool { + *self == MODE_A::EVENT + } + #[doc = "Checks if the value of the field is `TASK`"] + #[inline(always)] + pub fn is_task(&self) -> bool { + *self == MODE_A::TASK + } +} +#[doc = "Field `MODE` writer - Mode"] +pub type MODE_W<'a, const O: u8> = crate::FieldWriter<'a, u32, CONFIG_SPEC, u8, MODE_A, 2, O>; +impl<'a, const O: u8> MODE_W<'a, O> { + #[doc = "Disabled. Pin specified by PSEL will not be acquired by the GPIOTE module."] + #[inline(always)] + pub fn disabled(self) -> &'a mut W { + self.variant(MODE_A::DISABLED) + } + #[doc = "Event mode"] + #[inline(always)] + pub fn event(self) -> &'a mut W { + self.variant(MODE_A::EVENT) + } + #[doc = "Task mode"] + #[inline(always)] + pub fn task(self) -> &'a mut W { + self.variant(MODE_A::TASK) + } +} +#[doc = "Field `PSEL` reader - GPIO number associated with SET\\[n\\], CLR\\[n\\] +and OUT\\[n\\] +tasks and IN\\[n\\] +event"] +pub type PSEL_R = crate::FieldReader; +#[doc = "Field `PSEL` writer - GPIO number associated with SET\\[n\\], CLR\\[n\\] +and OUT\\[n\\] +tasks and IN\\[n\\] +event"] +pub type PSEL_W<'a, const O: u8> = crate::FieldWriter<'a, u32, CONFIG_SPEC, u8, u8, 5, O>; +#[doc = "Field `POLARITY` reader - When In task mode: Operation to be performed on output when OUT\\[n\\] +task is triggered. When In event mode: Operation on input that shall trigger IN\\[n\\] +event."] +pub type POLARITY_R = crate::FieldReader; +#[doc = "When In task mode: Operation to be performed on output when OUT\\[n\\] +task is triggered. When In event mode: Operation on input that shall trigger IN\\[n\\] +event.\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +#[repr(u8)] +pub enum POLARITY_A { + #[doc = "0: Task mode: No effect on pin from OUT\\[n\\] +task. Event mode: no IN\\[n\\] +event generated on pin activity."] + NONE = 0, + #[doc = "1: Task mode: Set pin from OUT\\[n\\] +task. Event mode: Generate IN\\[n\\] +event when rising edge on pin."] + LO_TO_HI = 1, + #[doc = "2: Task mode: Clear pin from OUT\\[n\\] +task. Event mode: Generate IN\\[n\\] +event when falling edge on pin."] + HI_TO_LO = 2, + #[doc = "3: Task mode: Toggle pin from OUT\\[n\\]. Event mode: Generate IN\\[n\\] +when any change on pin."] + TOGGLE = 3, +} +impl From for u8 { + #[inline(always)] + fn from(variant: POLARITY_A) -> Self { + variant as _ + } +} +impl POLARITY_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> POLARITY_A { + match self.bits { + 0 => POLARITY_A::NONE, + 1 => POLARITY_A::LO_TO_HI, + 2 => POLARITY_A::HI_TO_LO, + 3 => POLARITY_A::TOGGLE, + _ => unreachable!(), + } + } + #[doc = "Checks if the value of the field is `NONE`"] + #[inline(always)] + pub fn is_none(&self) -> bool { + *self == POLARITY_A::NONE + } + #[doc = "Checks if the value of the field is `LO_TO_HI`"] + #[inline(always)] + pub fn is_lo_to_hi(&self) -> bool { + *self == POLARITY_A::LO_TO_HI + } + #[doc = "Checks if the value of the field is `HI_TO_LO`"] + #[inline(always)] + pub fn is_hi_to_lo(&self) -> bool { + *self == POLARITY_A::HI_TO_LO + } + #[doc = "Checks if the value of the field is `TOGGLE`"] + #[inline(always)] + pub fn is_toggle(&self) -> bool { + *self == POLARITY_A::TOGGLE + } +} +#[doc = "Field `POLARITY` writer - When In task mode: Operation to be performed on output when OUT\\[n\\] +task is triggered. When In event mode: Operation on input that shall trigger IN\\[n\\] +event."] +pub type POLARITY_W<'a, const O: u8> = + crate::FieldWriterSafe<'a, u32, CONFIG_SPEC, u8, POLARITY_A, 2, O>; +impl<'a, const O: u8> POLARITY_W<'a, O> { + #[doc = "Task mode: No effect on pin from OUT\\[n\\] +task. Event mode: no IN\\[n\\] +event generated on pin activity."] + #[inline(always)] + pub fn none(self) -> &'a mut W { + self.variant(POLARITY_A::NONE) + } + #[doc = "Task mode: Set pin from OUT\\[n\\] +task. Event mode: Generate IN\\[n\\] +event when rising edge on pin."] + #[inline(always)] + pub fn lo_to_hi(self) -> &'a mut W { + self.variant(POLARITY_A::LO_TO_HI) + } + #[doc = "Task mode: Clear pin from OUT\\[n\\] +task. Event mode: Generate IN\\[n\\] +event when falling edge on pin."] + #[inline(always)] + pub fn hi_to_lo(self) -> &'a mut W { + self.variant(POLARITY_A::HI_TO_LO) + } + #[doc = "Task mode: Toggle pin from OUT\\[n\\]. Event mode: Generate IN\\[n\\] +when any change on pin."] + #[inline(always)] + pub fn toggle(self) -> &'a mut W { + self.variant(POLARITY_A::TOGGLE) + } +} +#[doc = "Field `OUTINIT` reader - When in task mode: Initial value of the output when the GPIOTE channel is configured. When in event mode: No effect."] +pub type OUTINIT_R = crate::BitReader; +#[doc = "When in task mode: Initial value of the output when the GPIOTE channel is configured. When in event mode: No effect.\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum OUTINIT_A { + #[doc = "0: Task mode: Initial value of pin before task triggering is low"] + LOW = 0, + #[doc = "1: Task mode: Initial value of pin before task triggering is high"] + HIGH = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: OUTINIT_A) -> Self { + variant as u8 != 0 + } +} +impl OUTINIT_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> OUTINIT_A { + match self.bits { + false => OUTINIT_A::LOW, + true => OUTINIT_A::HIGH, + } + } + #[doc = "Checks if the value of the field is `LOW`"] + #[inline(always)] + pub fn is_low(&self) -> bool { + *self == OUTINIT_A::LOW + } + #[doc = "Checks if the value of the field is `HIGH`"] + #[inline(always)] + pub fn is_high(&self) -> bool { + *self == OUTINIT_A::HIGH + } +} +#[doc = "Field `OUTINIT` writer - When in task mode: Initial value of the output when the GPIOTE channel is configured. When in event mode: No effect."] +pub type OUTINIT_W<'a, const O: u8> = crate::BitWriter<'a, u32, CONFIG_SPEC, OUTINIT_A, O>; +impl<'a, const O: u8> OUTINIT_W<'a, O> { + #[doc = "Task mode: Initial value of pin before task triggering is low"] + #[inline(always)] + pub fn low(self) -> &'a mut W { + self.variant(OUTINIT_A::LOW) + } + #[doc = "Task mode: Initial value of pin before task triggering is high"] + #[inline(always)] + pub fn high(self) -> &'a mut W { + self.variant(OUTINIT_A::HIGH) + } +} +impl R { + #[doc = "Bits 0:1 - Mode"] + #[inline(always)] + pub fn mode(&self) -> MODE_R { + MODE_R::new((self.bits & 3) as u8) + } + #[doc = "Bits 8:12 - GPIO number associated with SET\\[n\\], CLR\\[n\\] +and OUT\\[n\\] +tasks and IN\\[n\\] +event"] + #[inline(always)] + pub fn psel(&self) -> PSEL_R { + PSEL_R::new(((self.bits >> 8) & 0x1f) as u8) + } + #[doc = "Bits 16:17 - When In task mode: Operation to be performed on output when OUT\\[n\\] +task is triggered. When In event mode: Operation on input that shall trigger IN\\[n\\] +event."] + #[inline(always)] + pub fn polarity(&self) -> POLARITY_R { + POLARITY_R::new(((self.bits >> 16) & 3) as u8) + } + #[doc = "Bit 20 - When in task mode: Initial value of the output when the GPIOTE channel is configured. When in event mode: No effect."] + #[inline(always)] + pub fn outinit(&self) -> OUTINIT_R { + OUTINIT_R::new(((self.bits >> 20) & 1) != 0) + } +} +impl W { + #[doc = "Bits 0:1 - Mode"] + #[inline(always)] + #[must_use] + pub fn mode(&mut self) -> MODE_W<0> { + MODE_W::new(self) + } + #[doc = "Bits 8:12 - GPIO number associated with SET\\[n\\], CLR\\[n\\] +and OUT\\[n\\] +tasks and IN\\[n\\] +event"] + #[inline(always)] + #[must_use] + pub fn psel(&mut self) -> PSEL_W<8> { + PSEL_W::new(self) + } + #[doc = "Bits 16:17 - When In task mode: Operation to be performed on output when OUT\\[n\\] +task is triggered. When In event mode: Operation on input that shall trigger IN\\[n\\] +event."] + #[inline(always)] + #[must_use] + pub fn polarity(&mut self) -> POLARITY_W<16> { + POLARITY_W::new(self) + } + #[doc = "Bit 20 - When in task mode: Initial value of the output when the GPIOTE channel is configured. When in event mode: No effect."] + #[inline(always)] + #[must_use] + pub fn outinit(&mut self) -> OUTINIT_W<20> { + OUTINIT_W::new(self) + } + #[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 = "Description collection: Configuration for OUT\\[n\\], SET\\[n\\] +and CLR\\[n\\] +tasks and IN\\[n\\] +event\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 [config](index.html) module"] +pub struct CONFIG_SPEC; +impl crate::RegisterSpec for CONFIG_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [config::R](R) reader structure"] +impl crate::Readable for CONFIG_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [config::W](W) writer structure"] +impl crate::Writable for 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 CONFIG[%s] +to value 0"] +impl crate::Resettable for CONFIG_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/gpiote/events_in.rs b/down-the-stack/dk_pac/src/gpiote/events_in.rs new file mode 100644 index 0000000..d70d8ad --- /dev/null +++ b/down-the-stack/dk_pac/src/gpiote/events_in.rs @@ -0,0 +1,127 @@ +#[doc = "Register `EVENTS_IN[%s]` 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 `EVENTS_IN[%s]` 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 `EVENTS_IN` reader - Event generated from pin specified in CONFIG\\[n\\].PSEL"] +pub type EVENTS_IN_R = crate::BitReader; +#[doc = "Event generated from pin specified in CONFIG\\[n\\].PSEL\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum EVENTS_IN_A { + #[doc = "0: Event not generated"] + NOT_GENERATED = 0, + #[doc = "1: Event generated"] + GENERATED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: EVENTS_IN_A) -> Self { + variant as u8 != 0 + } +} +impl EVENTS_IN_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> EVENTS_IN_A { + match self.bits { + false => EVENTS_IN_A::NOT_GENERATED, + true => EVENTS_IN_A::GENERATED, + } + } + #[doc = "Checks if the value of the field is `NOT_GENERATED`"] + #[inline(always)] + pub fn is_not_generated(&self) -> bool { + *self == EVENTS_IN_A::NOT_GENERATED + } + #[doc = "Checks if the value of the field is `GENERATED`"] + #[inline(always)] + pub fn is_generated(&self) -> bool { + *self == EVENTS_IN_A::GENERATED + } +} +#[doc = "Field `EVENTS_IN` writer - Event generated from pin specified in CONFIG\\[n\\].PSEL"] +pub type EVENTS_IN_W<'a, const O: u8> = crate::BitWriter<'a, u32, EVENTS_IN_SPEC, EVENTS_IN_A, O>; +impl<'a, const O: u8> EVENTS_IN_W<'a, O> { + #[doc = "Event not generated"] + #[inline(always)] + pub fn not_generated(self) -> &'a mut W { + self.variant(EVENTS_IN_A::NOT_GENERATED) + } + #[doc = "Event generated"] + #[inline(always)] + pub fn generated(self) -> &'a mut W { + self.variant(EVENTS_IN_A::GENERATED) + } +} +impl R { + #[doc = "Bit 0 - Event generated from pin specified in CONFIG\\[n\\].PSEL"] + #[inline(always)] + pub fn events_in(&self) -> EVENTS_IN_R { + EVENTS_IN_R::new((self.bits & 1) != 0) + } +} +impl W { + #[doc = "Bit 0 - Event generated from pin specified in CONFIG\\[n\\].PSEL"] + #[inline(always)] + #[must_use] + pub fn events_in(&mut self) -> EVENTS_IN_W<0> { + EVENTS_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 = "Description collection: Event generated from pin specified in CONFIG\\[n\\].PSEL\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 [events_in](index.html) module"] +pub struct EVENTS_IN_SPEC; +impl crate::RegisterSpec for EVENTS_IN_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [events_in::R](R) reader structure"] +impl crate::Readable for EVENTS_IN_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [events_in::W](W) writer structure"] +impl crate::Writable for EVENTS_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 EVENTS_IN[%s] +to value 0"] +impl crate::Resettable for EVENTS_IN_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/gpiote/events_port.rs b/down-the-stack/dk_pac/src/gpiote/events_port.rs new file mode 100644 index 0000000..6fd4f03 --- /dev/null +++ b/down-the-stack/dk_pac/src/gpiote/events_port.rs @@ -0,0 +1,127 @@ +#[doc = "Register `EVENTS_PORT` 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 `EVENTS_PORT` 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 `EVENTS_PORT` reader - Event generated from multiple input GPIO pins with SENSE mechanism enabled"] +pub type EVENTS_PORT_R = crate::BitReader; +#[doc = "Event generated from multiple input GPIO pins with SENSE mechanism enabled\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum EVENTS_PORT_A { + #[doc = "0: Event not generated"] + NOT_GENERATED = 0, + #[doc = "1: Event generated"] + GENERATED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: EVENTS_PORT_A) -> Self { + variant as u8 != 0 + } +} +impl EVENTS_PORT_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> EVENTS_PORT_A { + match self.bits { + false => EVENTS_PORT_A::NOT_GENERATED, + true => EVENTS_PORT_A::GENERATED, + } + } + #[doc = "Checks if the value of the field is `NOT_GENERATED`"] + #[inline(always)] + pub fn is_not_generated(&self) -> bool { + *self == EVENTS_PORT_A::NOT_GENERATED + } + #[doc = "Checks if the value of the field is `GENERATED`"] + #[inline(always)] + pub fn is_generated(&self) -> bool { + *self == EVENTS_PORT_A::GENERATED + } +} +#[doc = "Field `EVENTS_PORT` writer - Event generated from multiple input GPIO pins with SENSE mechanism enabled"] +pub type EVENTS_PORT_W<'a, const O: u8> = + crate::BitWriter<'a, u32, EVENTS_PORT_SPEC, EVENTS_PORT_A, O>; +impl<'a, const O: u8> EVENTS_PORT_W<'a, O> { + #[doc = "Event not generated"] + #[inline(always)] + pub fn not_generated(self) -> &'a mut W { + self.variant(EVENTS_PORT_A::NOT_GENERATED) + } + #[doc = "Event generated"] + #[inline(always)] + pub fn generated(self) -> &'a mut W { + self.variant(EVENTS_PORT_A::GENERATED) + } +} +impl R { + #[doc = "Bit 0 - Event generated from multiple input GPIO pins with SENSE mechanism enabled"] + #[inline(always)] + pub fn events_port(&self) -> EVENTS_PORT_R { + EVENTS_PORT_R::new((self.bits & 1) != 0) + } +} +impl W { + #[doc = "Bit 0 - Event generated from multiple input GPIO pins with SENSE mechanism enabled"] + #[inline(always)] + #[must_use] + pub fn events_port(&mut self) -> EVENTS_PORT_W<0> { + EVENTS_PORT_W::new(self) + } + #[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 = "Event generated from multiple input GPIO pins with SENSE mechanism enabled\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 [events_port](index.html) module"] +pub struct EVENTS_PORT_SPEC; +impl crate::RegisterSpec for EVENTS_PORT_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [events_port::R](R) reader structure"] +impl crate::Readable for EVENTS_PORT_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [events_port::W](W) writer structure"] +impl crate::Writable for EVENTS_PORT_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets EVENTS_PORT to value 0"] +impl crate::Resettable for EVENTS_PORT_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/gpiote/intenclr.rs b/down-the-stack/dk_pac/src/gpiote/intenclr.rs new file mode 100644 index 0000000..a415168 --- /dev/null +++ b/down-the-stack/dk_pac/src/gpiote/intenclr.rs @@ -0,0 +1,677 @@ +#[doc = "Register `INTENCLR` 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 `INTENCLR` 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 `IN0` reader - Write '1' to disable interrupt for event IN\\[0\\]"] +pub type IN0_R = crate::BitReader; +#[doc = "Write '1' to disable interrupt for event IN\\[0\\]\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum IN0_A { + #[doc = "0: Read: Disabled"] + DISABLED = 0, + #[doc = "1: Read: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: IN0_A) -> Self { + variant as u8 != 0 + } +} +impl IN0_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> IN0_A { + match self.bits { + false => IN0_A::DISABLED, + true => IN0_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == IN0_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == IN0_A::ENABLED + } +} +#[doc = "Write '1' to disable interrupt for event IN\\[0\\]\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum IN0_AW { + #[doc = "1: Disable"] + CLEAR = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: IN0_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `IN0` writer - Write '1' to disable interrupt for event IN\\[0\\]"] +pub type IN0_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENCLR_SPEC, IN0_AW, O>; +impl<'a, const O: u8> IN0_W<'a, O> { + #[doc = "Disable"] + #[inline(always)] + pub fn clear(self) -> &'a mut W { + self.variant(IN0_AW::CLEAR) + } +} +#[doc = "Field `IN1` reader - Write '1' to disable interrupt for event IN\\[1\\]"] +pub type IN1_R = crate::BitReader; +#[doc = "Write '1' to disable interrupt for event IN\\[1\\]\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum IN1_A { + #[doc = "0: Read: Disabled"] + DISABLED = 0, + #[doc = "1: Read: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: IN1_A) -> Self { + variant as u8 != 0 + } +} +impl IN1_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> IN1_A { + match self.bits { + false => IN1_A::DISABLED, + true => IN1_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == IN1_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == IN1_A::ENABLED + } +} +#[doc = "Write '1' to disable interrupt for event IN\\[1\\]\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum IN1_AW { + #[doc = "1: Disable"] + CLEAR = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: IN1_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `IN1` writer - Write '1' to disable interrupt for event IN\\[1\\]"] +pub type IN1_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENCLR_SPEC, IN1_AW, O>; +impl<'a, const O: u8> IN1_W<'a, O> { + #[doc = "Disable"] + #[inline(always)] + pub fn clear(self) -> &'a mut W { + self.variant(IN1_AW::CLEAR) + } +} +#[doc = "Field `IN2` reader - Write '1' to disable interrupt for event IN\\[2\\]"] +pub type IN2_R = crate::BitReader; +#[doc = "Write '1' to disable interrupt for event IN\\[2\\]\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum IN2_A { + #[doc = "0: Read: Disabled"] + DISABLED = 0, + #[doc = "1: Read: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: IN2_A) -> Self { + variant as u8 != 0 + } +} +impl IN2_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> IN2_A { + match self.bits { + false => IN2_A::DISABLED, + true => IN2_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == IN2_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == IN2_A::ENABLED + } +} +#[doc = "Write '1' to disable interrupt for event IN\\[2\\]\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum IN2_AW { + #[doc = "1: Disable"] + CLEAR = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: IN2_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `IN2` writer - Write '1' to disable interrupt for event IN\\[2\\]"] +pub type IN2_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENCLR_SPEC, IN2_AW, O>; +impl<'a, const O: u8> IN2_W<'a, O> { + #[doc = "Disable"] + #[inline(always)] + pub fn clear(self) -> &'a mut W { + self.variant(IN2_AW::CLEAR) + } +} +#[doc = "Field `IN3` reader - Write '1' to disable interrupt for event IN\\[3\\]"] +pub type IN3_R = crate::BitReader; +#[doc = "Write '1' to disable interrupt for event IN\\[3\\]\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum IN3_A { + #[doc = "0: Read: Disabled"] + DISABLED = 0, + #[doc = "1: Read: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: IN3_A) -> Self { + variant as u8 != 0 + } +} +impl IN3_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> IN3_A { + match self.bits { + false => IN3_A::DISABLED, + true => IN3_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == IN3_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == IN3_A::ENABLED + } +} +#[doc = "Write '1' to disable interrupt for event IN\\[3\\]\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum IN3_AW { + #[doc = "1: Disable"] + CLEAR = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: IN3_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `IN3` writer - Write '1' to disable interrupt for event IN\\[3\\]"] +pub type IN3_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENCLR_SPEC, IN3_AW, O>; +impl<'a, const O: u8> IN3_W<'a, O> { + #[doc = "Disable"] + #[inline(always)] + pub fn clear(self) -> &'a mut W { + self.variant(IN3_AW::CLEAR) + } +} +#[doc = "Field `IN4` reader - Write '1' to disable interrupt for event IN\\[4\\]"] +pub type IN4_R = crate::BitReader; +#[doc = "Write '1' to disable interrupt for event IN\\[4\\]\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum IN4_A { + #[doc = "0: Read: Disabled"] + DISABLED = 0, + #[doc = "1: Read: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: IN4_A) -> Self { + variant as u8 != 0 + } +} +impl IN4_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> IN4_A { + match self.bits { + false => IN4_A::DISABLED, + true => IN4_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == IN4_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == IN4_A::ENABLED + } +} +#[doc = "Write '1' to disable interrupt for event IN\\[4\\]\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum IN4_AW { + #[doc = "1: Disable"] + CLEAR = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: IN4_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `IN4` writer - Write '1' to disable interrupt for event IN\\[4\\]"] +pub type IN4_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENCLR_SPEC, IN4_AW, O>; +impl<'a, const O: u8> IN4_W<'a, O> { + #[doc = "Disable"] + #[inline(always)] + pub fn clear(self) -> &'a mut W { + self.variant(IN4_AW::CLEAR) + } +} +#[doc = "Field `IN5` reader - Write '1' to disable interrupt for event IN\\[5\\]"] +pub type IN5_R = crate::BitReader; +#[doc = "Write '1' to disable interrupt for event IN\\[5\\]\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum IN5_A { + #[doc = "0: Read: Disabled"] + DISABLED = 0, + #[doc = "1: Read: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: IN5_A) -> Self { + variant as u8 != 0 + } +} +impl IN5_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> IN5_A { + match self.bits { + false => IN5_A::DISABLED, + true => IN5_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == IN5_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == IN5_A::ENABLED + } +} +#[doc = "Write '1' to disable interrupt for event IN\\[5\\]\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum IN5_AW { + #[doc = "1: Disable"] + CLEAR = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: IN5_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `IN5` writer - Write '1' to disable interrupt for event IN\\[5\\]"] +pub type IN5_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENCLR_SPEC, IN5_AW, O>; +impl<'a, const O: u8> IN5_W<'a, O> { + #[doc = "Disable"] + #[inline(always)] + pub fn clear(self) -> &'a mut W { + self.variant(IN5_AW::CLEAR) + } +} +#[doc = "Field `IN6` reader - Write '1' to disable interrupt for event IN\\[6\\]"] +pub type IN6_R = crate::BitReader; +#[doc = "Write '1' to disable interrupt for event IN\\[6\\]\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum IN6_A { + #[doc = "0: Read: Disabled"] + DISABLED = 0, + #[doc = "1: Read: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: IN6_A) -> Self { + variant as u8 != 0 + } +} +impl IN6_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> IN6_A { + match self.bits { + false => IN6_A::DISABLED, + true => IN6_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == IN6_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == IN6_A::ENABLED + } +} +#[doc = "Write '1' to disable interrupt for event IN\\[6\\]\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum IN6_AW { + #[doc = "1: Disable"] + CLEAR = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: IN6_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `IN6` writer - Write '1' to disable interrupt for event IN\\[6\\]"] +pub type IN6_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENCLR_SPEC, IN6_AW, O>; +impl<'a, const O: u8> IN6_W<'a, O> { + #[doc = "Disable"] + #[inline(always)] + pub fn clear(self) -> &'a mut W { + self.variant(IN6_AW::CLEAR) + } +} +#[doc = "Field `IN7` reader - Write '1' to disable interrupt for event IN\\[7\\]"] +pub type IN7_R = crate::BitReader; +#[doc = "Write '1' to disable interrupt for event IN\\[7\\]\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum IN7_A { + #[doc = "0: Read: Disabled"] + DISABLED = 0, + #[doc = "1: Read: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: IN7_A) -> Self { + variant as u8 != 0 + } +} +impl IN7_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> IN7_A { + match self.bits { + false => IN7_A::DISABLED, + true => IN7_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == IN7_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == IN7_A::ENABLED + } +} +#[doc = "Write '1' to disable interrupt for event IN\\[7\\]\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum IN7_AW { + #[doc = "1: Disable"] + CLEAR = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: IN7_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `IN7` writer - Write '1' to disable interrupt for event IN\\[7\\]"] +pub type IN7_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENCLR_SPEC, IN7_AW, O>; +impl<'a, const O: u8> IN7_W<'a, O> { + #[doc = "Disable"] + #[inline(always)] + pub fn clear(self) -> &'a mut W { + self.variant(IN7_AW::CLEAR) + } +} +#[doc = "Field `PORT` reader - Write '1' to disable interrupt for event PORT"] +pub type PORT_R = crate::BitReader; +#[doc = "Write '1' to disable interrupt for event PORT\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PORT_A { + #[doc = "0: Read: Disabled"] + DISABLED = 0, + #[doc = "1: Read: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PORT_A) -> Self { + variant as u8 != 0 + } +} +impl PORT_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> PORT_A { + match self.bits { + false => PORT_A::DISABLED, + true => PORT_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == PORT_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == PORT_A::ENABLED + } +} +#[doc = "Write '1' to disable interrupt for event PORT\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PORT_AW { + #[doc = "1: Disable"] + CLEAR = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PORT_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `PORT` writer - Write '1' to disable interrupt for event PORT"] +pub type PORT_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENCLR_SPEC, PORT_AW, O>; +impl<'a, const O: u8> PORT_W<'a, O> { + #[doc = "Disable"] + #[inline(always)] + pub fn clear(self) -> &'a mut W { + self.variant(PORT_AW::CLEAR) + } +} +impl R { + #[doc = "Bit 0 - Write '1' to disable interrupt for event IN\\[0\\]"] + #[inline(always)] + pub fn in0(&self) -> IN0_R { + IN0_R::new((self.bits & 1) != 0) + } + #[doc = "Bit 1 - Write '1' to disable interrupt for event IN\\[1\\]"] + #[inline(always)] + pub fn in1(&self) -> IN1_R { + IN1_R::new(((self.bits >> 1) & 1) != 0) + } + #[doc = "Bit 2 - Write '1' to disable interrupt for event IN\\[2\\]"] + #[inline(always)] + pub fn in2(&self) -> IN2_R { + IN2_R::new(((self.bits >> 2) & 1) != 0) + } + #[doc = "Bit 3 - Write '1' to disable interrupt for event IN\\[3\\]"] + #[inline(always)] + pub fn in3(&self) -> IN3_R { + IN3_R::new(((self.bits >> 3) & 1) != 0) + } + #[doc = "Bit 4 - Write '1' to disable interrupt for event IN\\[4\\]"] + #[inline(always)] + pub fn in4(&self) -> IN4_R { + IN4_R::new(((self.bits >> 4) & 1) != 0) + } + #[doc = "Bit 5 - Write '1' to disable interrupt for event IN\\[5\\]"] + #[inline(always)] + pub fn in5(&self) -> IN5_R { + IN5_R::new(((self.bits >> 5) & 1) != 0) + } + #[doc = "Bit 6 - Write '1' to disable interrupt for event IN\\[6\\]"] + #[inline(always)] + pub fn in6(&self) -> IN6_R { + IN6_R::new(((self.bits >> 6) & 1) != 0) + } + #[doc = "Bit 7 - Write '1' to disable interrupt for event IN\\[7\\]"] + #[inline(always)] + pub fn in7(&self) -> IN7_R { + IN7_R::new(((self.bits >> 7) & 1) != 0) + } + #[doc = "Bit 31 - Write '1' to disable interrupt for event PORT"] + #[inline(always)] + pub fn port(&self) -> PORT_R { + PORT_R::new(((self.bits >> 31) & 1) != 0) + } +} +impl W { + #[doc = "Bit 0 - Write '1' to disable interrupt for event IN\\[0\\]"] + #[inline(always)] + #[must_use] + pub fn in0(&mut self) -> IN0_W<0> { + IN0_W::new(self) + } + #[doc = "Bit 1 - Write '1' to disable interrupt for event IN\\[1\\]"] + #[inline(always)] + #[must_use] + pub fn in1(&mut self) -> IN1_W<1> { + IN1_W::new(self) + } + #[doc = "Bit 2 - Write '1' to disable interrupt for event IN\\[2\\]"] + #[inline(always)] + #[must_use] + pub fn in2(&mut self) -> IN2_W<2> { + IN2_W::new(self) + } + #[doc = "Bit 3 - Write '1' to disable interrupt for event IN\\[3\\]"] + #[inline(always)] + #[must_use] + pub fn in3(&mut self) -> IN3_W<3> { + IN3_W::new(self) + } + #[doc = "Bit 4 - Write '1' to disable interrupt for event IN\\[4\\]"] + #[inline(always)] + #[must_use] + pub fn in4(&mut self) -> IN4_W<4> { + IN4_W::new(self) + } + #[doc = "Bit 5 - Write '1' to disable interrupt for event IN\\[5\\]"] + #[inline(always)] + #[must_use] + pub fn in5(&mut self) -> IN5_W<5> { + IN5_W::new(self) + } + #[doc = "Bit 6 - Write '1' to disable interrupt for event IN\\[6\\]"] + #[inline(always)] + #[must_use] + pub fn in6(&mut self) -> IN6_W<6> { + IN6_W::new(self) + } + #[doc = "Bit 7 - Write '1' to disable interrupt for event IN\\[7\\]"] + #[inline(always)] + #[must_use] + pub fn in7(&mut self) -> IN7_W<7> { + IN7_W::new(self) + } + #[doc = "Bit 31 - Write '1' to disable interrupt for event PORT"] + #[inline(always)] + #[must_use] + pub fn port(&mut self) -> PORT_W<31> { + PORT_W::new(self) + } + #[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 = "Disable interrupt\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 [intenclr](index.html) module"] +pub struct INTENCLR_SPEC; +impl crate::RegisterSpec for INTENCLR_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [intenclr::R](R) reader structure"] +impl crate::Readable for INTENCLR_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [intenclr::W](W) writer structure"] +impl crate::Writable for INTENCLR_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets INTENCLR to value 0"] +impl crate::Resettable for INTENCLR_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/gpiote/intenset.rs b/down-the-stack/dk_pac/src/gpiote/intenset.rs new file mode 100644 index 0000000..efd4758 --- /dev/null +++ b/down-the-stack/dk_pac/src/gpiote/intenset.rs @@ -0,0 +1,677 @@ +#[doc = "Register `INTENSET` 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 `INTENSET` 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 `IN0` reader - Write '1' to enable interrupt for event IN\\[0\\]"] +pub type IN0_R = crate::BitReader; +#[doc = "Write '1' to enable interrupt for event IN\\[0\\]\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum IN0_A { + #[doc = "0: Read: Disabled"] + DISABLED = 0, + #[doc = "1: Read: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: IN0_A) -> Self { + variant as u8 != 0 + } +} +impl IN0_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> IN0_A { + match self.bits { + false => IN0_A::DISABLED, + true => IN0_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == IN0_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == IN0_A::ENABLED + } +} +#[doc = "Write '1' to enable interrupt for event IN\\[0\\]\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum IN0_AW { + #[doc = "1: Enable"] + SET = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: IN0_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `IN0` writer - Write '1' to enable interrupt for event IN\\[0\\]"] +pub type IN0_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENSET_SPEC, IN0_AW, O>; +impl<'a, const O: u8> IN0_W<'a, O> { + #[doc = "Enable"] + #[inline(always)] + pub fn set(self) -> &'a mut W { + self.variant(IN0_AW::SET) + } +} +#[doc = "Field `IN1` reader - Write '1' to enable interrupt for event IN\\[1\\]"] +pub type IN1_R = crate::BitReader; +#[doc = "Write '1' to enable interrupt for event IN\\[1\\]\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum IN1_A { + #[doc = "0: Read: Disabled"] + DISABLED = 0, + #[doc = "1: Read: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: IN1_A) -> Self { + variant as u8 != 0 + } +} +impl IN1_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> IN1_A { + match self.bits { + false => IN1_A::DISABLED, + true => IN1_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == IN1_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == IN1_A::ENABLED + } +} +#[doc = "Write '1' to enable interrupt for event IN\\[1\\]\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum IN1_AW { + #[doc = "1: Enable"] + SET = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: IN1_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `IN1` writer - Write '1' to enable interrupt for event IN\\[1\\]"] +pub type IN1_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENSET_SPEC, IN1_AW, O>; +impl<'a, const O: u8> IN1_W<'a, O> { + #[doc = "Enable"] + #[inline(always)] + pub fn set(self) -> &'a mut W { + self.variant(IN1_AW::SET) + } +} +#[doc = "Field `IN2` reader - Write '1' to enable interrupt for event IN\\[2\\]"] +pub type IN2_R = crate::BitReader; +#[doc = "Write '1' to enable interrupt for event IN\\[2\\]\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum IN2_A { + #[doc = "0: Read: Disabled"] + DISABLED = 0, + #[doc = "1: Read: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: IN2_A) -> Self { + variant as u8 != 0 + } +} +impl IN2_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> IN2_A { + match self.bits { + false => IN2_A::DISABLED, + true => IN2_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == IN2_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == IN2_A::ENABLED + } +} +#[doc = "Write '1' to enable interrupt for event IN\\[2\\]\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum IN2_AW { + #[doc = "1: Enable"] + SET = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: IN2_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `IN2` writer - Write '1' to enable interrupt for event IN\\[2\\]"] +pub type IN2_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENSET_SPEC, IN2_AW, O>; +impl<'a, const O: u8> IN2_W<'a, O> { + #[doc = "Enable"] + #[inline(always)] + pub fn set(self) -> &'a mut W { + self.variant(IN2_AW::SET) + } +} +#[doc = "Field `IN3` reader - Write '1' to enable interrupt for event IN\\[3\\]"] +pub type IN3_R = crate::BitReader; +#[doc = "Write '1' to enable interrupt for event IN\\[3\\]\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum IN3_A { + #[doc = "0: Read: Disabled"] + DISABLED = 0, + #[doc = "1: Read: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: IN3_A) -> Self { + variant as u8 != 0 + } +} +impl IN3_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> IN3_A { + match self.bits { + false => IN3_A::DISABLED, + true => IN3_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == IN3_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == IN3_A::ENABLED + } +} +#[doc = "Write '1' to enable interrupt for event IN\\[3\\]\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum IN3_AW { + #[doc = "1: Enable"] + SET = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: IN3_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `IN3` writer - Write '1' to enable interrupt for event IN\\[3\\]"] +pub type IN3_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENSET_SPEC, IN3_AW, O>; +impl<'a, const O: u8> IN3_W<'a, O> { + #[doc = "Enable"] + #[inline(always)] + pub fn set(self) -> &'a mut W { + self.variant(IN3_AW::SET) + } +} +#[doc = "Field `IN4` reader - Write '1' to enable interrupt for event IN\\[4\\]"] +pub type IN4_R = crate::BitReader; +#[doc = "Write '1' to enable interrupt for event IN\\[4\\]\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum IN4_A { + #[doc = "0: Read: Disabled"] + DISABLED = 0, + #[doc = "1: Read: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: IN4_A) -> Self { + variant as u8 != 0 + } +} +impl IN4_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> IN4_A { + match self.bits { + false => IN4_A::DISABLED, + true => IN4_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == IN4_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == IN4_A::ENABLED + } +} +#[doc = "Write '1' to enable interrupt for event IN\\[4\\]\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum IN4_AW { + #[doc = "1: Enable"] + SET = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: IN4_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `IN4` writer - Write '1' to enable interrupt for event IN\\[4\\]"] +pub type IN4_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENSET_SPEC, IN4_AW, O>; +impl<'a, const O: u8> IN4_W<'a, O> { + #[doc = "Enable"] + #[inline(always)] + pub fn set(self) -> &'a mut W { + self.variant(IN4_AW::SET) + } +} +#[doc = "Field `IN5` reader - Write '1' to enable interrupt for event IN\\[5\\]"] +pub type IN5_R = crate::BitReader; +#[doc = "Write '1' to enable interrupt for event IN\\[5\\]\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum IN5_A { + #[doc = "0: Read: Disabled"] + DISABLED = 0, + #[doc = "1: Read: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: IN5_A) -> Self { + variant as u8 != 0 + } +} +impl IN5_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> IN5_A { + match self.bits { + false => IN5_A::DISABLED, + true => IN5_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == IN5_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == IN5_A::ENABLED + } +} +#[doc = "Write '1' to enable interrupt for event IN\\[5\\]\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum IN5_AW { + #[doc = "1: Enable"] + SET = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: IN5_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `IN5` writer - Write '1' to enable interrupt for event IN\\[5\\]"] +pub type IN5_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENSET_SPEC, IN5_AW, O>; +impl<'a, const O: u8> IN5_W<'a, O> { + #[doc = "Enable"] + #[inline(always)] + pub fn set(self) -> &'a mut W { + self.variant(IN5_AW::SET) + } +} +#[doc = "Field `IN6` reader - Write '1' to enable interrupt for event IN\\[6\\]"] +pub type IN6_R = crate::BitReader; +#[doc = "Write '1' to enable interrupt for event IN\\[6\\]\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum IN6_A { + #[doc = "0: Read: Disabled"] + DISABLED = 0, + #[doc = "1: Read: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: IN6_A) -> Self { + variant as u8 != 0 + } +} +impl IN6_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> IN6_A { + match self.bits { + false => IN6_A::DISABLED, + true => IN6_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == IN6_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == IN6_A::ENABLED + } +} +#[doc = "Write '1' to enable interrupt for event IN\\[6\\]\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum IN6_AW { + #[doc = "1: Enable"] + SET = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: IN6_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `IN6` writer - Write '1' to enable interrupt for event IN\\[6\\]"] +pub type IN6_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENSET_SPEC, IN6_AW, O>; +impl<'a, const O: u8> IN6_W<'a, O> { + #[doc = "Enable"] + #[inline(always)] + pub fn set(self) -> &'a mut W { + self.variant(IN6_AW::SET) + } +} +#[doc = "Field `IN7` reader - Write '1' to enable interrupt for event IN\\[7\\]"] +pub type IN7_R = crate::BitReader; +#[doc = "Write '1' to enable interrupt for event IN\\[7\\]\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum IN7_A { + #[doc = "0: Read: Disabled"] + DISABLED = 0, + #[doc = "1: Read: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: IN7_A) -> Self { + variant as u8 != 0 + } +} +impl IN7_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> IN7_A { + match self.bits { + false => IN7_A::DISABLED, + true => IN7_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == IN7_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == IN7_A::ENABLED + } +} +#[doc = "Write '1' to enable interrupt for event IN\\[7\\]\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum IN7_AW { + #[doc = "1: Enable"] + SET = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: IN7_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `IN7` writer - Write '1' to enable interrupt for event IN\\[7\\]"] +pub type IN7_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENSET_SPEC, IN7_AW, O>; +impl<'a, const O: u8> IN7_W<'a, O> { + #[doc = "Enable"] + #[inline(always)] + pub fn set(self) -> &'a mut W { + self.variant(IN7_AW::SET) + } +} +#[doc = "Field `PORT` reader - Write '1' to enable interrupt for event PORT"] +pub type PORT_R = crate::BitReader; +#[doc = "Write '1' to enable interrupt for event PORT\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PORT_A { + #[doc = "0: Read: Disabled"] + DISABLED = 0, + #[doc = "1: Read: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PORT_A) -> Self { + variant as u8 != 0 + } +} +impl PORT_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> PORT_A { + match self.bits { + false => PORT_A::DISABLED, + true => PORT_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == PORT_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == PORT_A::ENABLED + } +} +#[doc = "Write '1' to enable interrupt for event PORT\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PORT_AW { + #[doc = "1: Enable"] + SET = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PORT_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `PORT` writer - Write '1' to enable interrupt for event PORT"] +pub type PORT_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENSET_SPEC, PORT_AW, O>; +impl<'a, const O: u8> PORT_W<'a, O> { + #[doc = "Enable"] + #[inline(always)] + pub fn set(self) -> &'a mut W { + self.variant(PORT_AW::SET) + } +} +impl R { + #[doc = "Bit 0 - Write '1' to enable interrupt for event IN\\[0\\]"] + #[inline(always)] + pub fn in0(&self) -> IN0_R { + IN0_R::new((self.bits & 1) != 0) + } + #[doc = "Bit 1 - Write '1' to enable interrupt for event IN\\[1\\]"] + #[inline(always)] + pub fn in1(&self) -> IN1_R { + IN1_R::new(((self.bits >> 1) & 1) != 0) + } + #[doc = "Bit 2 - Write '1' to enable interrupt for event IN\\[2\\]"] + #[inline(always)] + pub fn in2(&self) -> IN2_R { + IN2_R::new(((self.bits >> 2) & 1) != 0) + } + #[doc = "Bit 3 - Write '1' to enable interrupt for event IN\\[3\\]"] + #[inline(always)] + pub fn in3(&self) -> IN3_R { + IN3_R::new(((self.bits >> 3) & 1) != 0) + } + #[doc = "Bit 4 - Write '1' to enable interrupt for event IN\\[4\\]"] + #[inline(always)] + pub fn in4(&self) -> IN4_R { + IN4_R::new(((self.bits >> 4) & 1) != 0) + } + #[doc = "Bit 5 - Write '1' to enable interrupt for event IN\\[5\\]"] + #[inline(always)] + pub fn in5(&self) -> IN5_R { + IN5_R::new(((self.bits >> 5) & 1) != 0) + } + #[doc = "Bit 6 - Write '1' to enable interrupt for event IN\\[6\\]"] + #[inline(always)] + pub fn in6(&self) -> IN6_R { + IN6_R::new(((self.bits >> 6) & 1) != 0) + } + #[doc = "Bit 7 - Write '1' to enable interrupt for event IN\\[7\\]"] + #[inline(always)] + pub fn in7(&self) -> IN7_R { + IN7_R::new(((self.bits >> 7) & 1) != 0) + } + #[doc = "Bit 31 - Write '1' to enable interrupt for event PORT"] + #[inline(always)] + pub fn port(&self) -> PORT_R { + PORT_R::new(((self.bits >> 31) & 1) != 0) + } +} +impl W { + #[doc = "Bit 0 - Write '1' to enable interrupt for event IN\\[0\\]"] + #[inline(always)] + #[must_use] + pub fn in0(&mut self) -> IN0_W<0> { + IN0_W::new(self) + } + #[doc = "Bit 1 - Write '1' to enable interrupt for event IN\\[1\\]"] + #[inline(always)] + #[must_use] + pub fn in1(&mut self) -> IN1_W<1> { + IN1_W::new(self) + } + #[doc = "Bit 2 - Write '1' to enable interrupt for event IN\\[2\\]"] + #[inline(always)] + #[must_use] + pub fn in2(&mut self) -> IN2_W<2> { + IN2_W::new(self) + } + #[doc = "Bit 3 - Write '1' to enable interrupt for event IN\\[3\\]"] + #[inline(always)] + #[must_use] + pub fn in3(&mut self) -> IN3_W<3> { + IN3_W::new(self) + } + #[doc = "Bit 4 - Write '1' to enable interrupt for event IN\\[4\\]"] + #[inline(always)] + #[must_use] + pub fn in4(&mut self) -> IN4_W<4> { + IN4_W::new(self) + } + #[doc = "Bit 5 - Write '1' to enable interrupt for event IN\\[5\\]"] + #[inline(always)] + #[must_use] + pub fn in5(&mut self) -> IN5_W<5> { + IN5_W::new(self) + } + #[doc = "Bit 6 - Write '1' to enable interrupt for event IN\\[6\\]"] + #[inline(always)] + #[must_use] + pub fn in6(&mut self) -> IN6_W<6> { + IN6_W::new(self) + } + #[doc = "Bit 7 - Write '1' to enable interrupt for event IN\\[7\\]"] + #[inline(always)] + #[must_use] + pub fn in7(&mut self) -> IN7_W<7> { + IN7_W::new(self) + } + #[doc = "Bit 31 - Write '1' to enable interrupt for event PORT"] + #[inline(always)] + #[must_use] + pub fn port(&mut self) -> PORT_W<31> { + PORT_W::new(self) + } + #[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 = "Enable interrupt\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 [intenset](index.html) module"] +pub struct INTENSET_SPEC; +impl crate::RegisterSpec for INTENSET_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [intenset::R](R) reader structure"] +impl crate::Readable for INTENSET_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [intenset::W](W) writer structure"] +impl crate::Writable for INTENSET_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets INTENSET to value 0"] +impl crate::Resettable for INTENSET_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/gpiote/tasks_clr.rs b/down-the-stack/dk_pac/src/gpiote/tasks_clr.rs new file mode 100644 index 0000000..6ee81d7 --- /dev/null +++ b/down-the-stack/dk_pac/src/gpiote/tasks_clr.rs @@ -0,0 +1,72 @@ +#[doc = "Register `TASKS_CLR[%s]` 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 = "Task for writing to pin specified in CONFIG\\[n\\].PSEL. Action on pin is to set it low.\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum TASKS_CLR_AW { + #[doc = "1: Trigger task"] + TRIGGER = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: TASKS_CLR_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `TASKS_CLR` writer - Task for writing to pin specified in CONFIG\\[n\\].PSEL. Action on pin is to set it low."] +pub type TASKS_CLR_W<'a, const O: u8> = crate::BitWriter<'a, u32, TASKS_CLR_SPEC, TASKS_CLR_AW, O>; +impl<'a, const O: u8> TASKS_CLR_W<'a, O> { + #[doc = "Trigger task"] + #[inline(always)] + pub fn trigger(self) -> &'a mut W { + self.variant(TASKS_CLR_AW::TRIGGER) + } +} +impl W { + #[doc = "Bit 0 - Task for writing to pin specified in CONFIG\\[n\\].PSEL. Action on pin is to set it low."] + #[inline(always)] + #[must_use] + pub fn tasks_clr(&mut self) -> TASKS_CLR_W<0> { + TASKS_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 = "Description collection: Task for writing to pin specified in CONFIG\\[n\\].PSEL. Action on pin is to set it low.\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 [tasks_clr](index.html) module"] +pub struct TASKS_CLR_SPEC; +impl crate::RegisterSpec for TASKS_CLR_SPEC { + type Ux = u32; +} +#[doc = "`write(|w| ..)` method takes [tasks_clr::W](W) writer structure"] +impl crate::Writable for TASKS_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 TASKS_CLR[%s] +to value 0"] +impl crate::Resettable for TASKS_CLR_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/gpiote/tasks_out.rs b/down-the-stack/dk_pac/src/gpiote/tasks_out.rs new file mode 100644 index 0000000..5e48bdb --- /dev/null +++ b/down-the-stack/dk_pac/src/gpiote/tasks_out.rs @@ -0,0 +1,72 @@ +#[doc = "Register `TASKS_OUT[%s]` 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 = "Task for writing to pin specified in CONFIG\\[n\\].PSEL. Action on pin is configured in CONFIG\\[n\\].POLARITY.\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum TASKS_OUT_AW { + #[doc = "1: Trigger task"] + TRIGGER = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: TASKS_OUT_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `TASKS_OUT` writer - Task for writing to pin specified in CONFIG\\[n\\].PSEL. Action on pin is configured in CONFIG\\[n\\].POLARITY."] +pub type TASKS_OUT_W<'a, const O: u8> = crate::BitWriter<'a, u32, TASKS_OUT_SPEC, TASKS_OUT_AW, O>; +impl<'a, const O: u8> TASKS_OUT_W<'a, O> { + #[doc = "Trigger task"] + #[inline(always)] + pub fn trigger(self) -> &'a mut W { + self.variant(TASKS_OUT_AW::TRIGGER) + } +} +impl W { + #[doc = "Bit 0 - Task for writing to pin specified in CONFIG\\[n\\].PSEL. Action on pin is configured in CONFIG\\[n\\].POLARITY."] + #[inline(always)] + #[must_use] + pub fn tasks_out(&mut self) -> TASKS_OUT_W<0> { + TASKS_OUT_W::new(self) + } + #[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 = "Description collection: Task for writing to pin specified in CONFIG\\[n\\].PSEL. Action on pin is configured in CONFIG\\[n\\].POLARITY.\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 [tasks_out](index.html) module"] +pub struct TASKS_OUT_SPEC; +impl crate::RegisterSpec for TASKS_OUT_SPEC { + type Ux = u32; +} +#[doc = "`write(|w| ..)` method takes [tasks_out::W](W) writer structure"] +impl crate::Writable for TASKS_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 TASKS_OUT[%s] +to value 0"] +impl crate::Resettable for TASKS_OUT_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/gpiote/tasks_set.rs b/down-the-stack/dk_pac/src/gpiote/tasks_set.rs new file mode 100644 index 0000000..efa95c6 --- /dev/null +++ b/down-the-stack/dk_pac/src/gpiote/tasks_set.rs @@ -0,0 +1,72 @@ +#[doc = "Register `TASKS_SET[%s]` 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 = "Task for writing to pin specified in CONFIG\\[n\\].PSEL. Action on pin is to set it high.\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum TASKS_SET_AW { + #[doc = "1: Trigger task"] + TRIGGER = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: TASKS_SET_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `TASKS_SET` writer - Task for writing to pin specified in CONFIG\\[n\\].PSEL. Action on pin is to set it high."] +pub type TASKS_SET_W<'a, const O: u8> = crate::BitWriter<'a, u32, TASKS_SET_SPEC, TASKS_SET_AW, O>; +impl<'a, const O: u8> TASKS_SET_W<'a, O> { + #[doc = "Trigger task"] + #[inline(always)] + pub fn trigger(self) -> &'a mut W { + self.variant(TASKS_SET_AW::TRIGGER) + } +} +impl W { + #[doc = "Bit 0 - Task for writing to pin specified in CONFIG\\[n\\].PSEL. Action on pin is to set it high."] + #[inline(always)] + #[must_use] + pub fn tasks_set(&mut self) -> TASKS_SET_W<0> { + TASKS_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 + } +} +#[doc = "Description collection: Task for writing to pin specified in CONFIG\\[n\\].PSEL. Action on pin is to set it high.\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 [tasks_set](index.html) module"] +pub struct TASKS_SET_SPEC; +impl crate::RegisterSpec for TASKS_SET_SPEC { + type Ux = u32; +} +#[doc = "`write(|w| ..)` method takes [tasks_set::W](W) writer structure"] +impl crate::Writable for TASKS_SET_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets TASKS_SET[%s] +to value 0"] +impl crate::Resettable for TASKS_SET_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/i2s.rs b/down-the-stack/dk_pac/src/i2s.rs new file mode 100644 index 0000000..b970aa6 --- /dev/null +++ b/down-the-stack/dk_pac/src/i2s.rs @@ -0,0 +1,101 @@ +#[doc = r"Register block"] +#[repr(C)] +pub struct RegisterBlock { + #[doc = "0x00 - Starts continuous I2S transfer. Also starts MCK generator when this is enabled."] + pub tasks_start: TASKS_START, + #[doc = "0x04 - Stops I2S transfer. Also stops MCK generator. Triggering this task will cause the {event:STOPPED} event to be generated."] + pub tasks_stop: TASKS_STOP, + _reserved2: [u8; 0xfc], + #[doc = "0x104 - The RXD.PTR register has been copied to internal double-buffers. When the I2S module is started and RX is enabled, this event will be generated for every RXTXD.MAXCNT words that are received on the SDIN pin."] + pub events_rxptrupd: EVENTS_RXPTRUPD, + #[doc = "0x108 - I2S transfer stopped."] + pub events_stopped: EVENTS_STOPPED, + _reserved4: [u8; 0x08], + #[doc = "0x114 - The TDX.PTR register has been copied to internal double-buffers. When the I2S module is started and TX is enabled, this event will be generated for every RXTXD.MAXCNT words that are sent on the SDOUT pin."] + pub events_txptrupd: EVENTS_TXPTRUPD, + _reserved5: [u8; 0x01e8], + #[doc = "0x300 - Enable or disable interrupt"] + pub inten: INTEN, + #[doc = "0x304 - Enable interrupt"] + pub intenset: INTENSET, + #[doc = "0x308 - Disable interrupt"] + pub intenclr: INTENCLR, + _reserved8: [u8; 0x01f4], + #[doc = "0x500 - Enable I2S module."] + pub enable: ENABLE, + #[doc = "0x504..0x52c - Unspecified"] + pub config: CONFIG, + _reserved10: [u8; 0x0c], + #[doc = "0x538 - Unspecified"] + pub rxd: RXD, + _reserved11: [u8; 0x04], + #[doc = "0x540 - Unspecified"] + pub txd: TXD, + _reserved12: [u8; 0x0c], + #[doc = "0x550 - Unspecified"] + pub rxtxd: RXTXD, + _reserved13: [u8; 0x0c], + #[doc = "0x560..0x574 - Unspecified"] + pub psel: PSEL, +} +#[doc = "TASKS_START (w) register accessor: an alias for `Reg`"] +pub type TASKS_START = crate::Reg; +#[doc = "Starts continuous I2S transfer. Also starts MCK generator when this is enabled."] +pub mod tasks_start; +#[doc = "TASKS_STOP (w) register accessor: an alias for `Reg`"] +pub type TASKS_STOP = crate::Reg; +#[doc = "Stops I2S transfer. Also stops MCK generator. Triggering this task will cause the {event:STOPPED} event to be generated."] +pub mod tasks_stop; +#[doc = "EVENTS_RXPTRUPD (rw) register accessor: an alias for `Reg`"] +pub type EVENTS_RXPTRUPD = crate::Reg; +#[doc = "The RXD.PTR register has been copied to internal double-buffers. When the I2S module is started and RX is enabled, this event will be generated for every RXTXD.MAXCNT words that are received on the SDIN pin."] +pub mod events_rxptrupd; +#[doc = "EVENTS_STOPPED (rw) register accessor: an alias for `Reg`"] +pub type EVENTS_STOPPED = crate::Reg; +#[doc = "I2S transfer stopped."] +pub mod events_stopped; +#[doc = "EVENTS_TXPTRUPD (rw) register accessor: an alias for `Reg`"] +pub type EVENTS_TXPTRUPD = crate::Reg; +#[doc = "The TDX.PTR register has been copied to internal double-buffers. When the I2S module is started and TX is enabled, this event will be generated for every RXTXD.MAXCNT words that are sent on the SDOUT pin."] +pub mod events_txptrupd; +#[doc = "INTEN (rw) register accessor: an alias for `Reg`"] +pub type INTEN = crate::Reg; +#[doc = "Enable or disable interrupt"] +pub mod inten; +#[doc = "INTENSET (rw) register accessor: an alias for `Reg`"] +pub type INTENSET = crate::Reg; +#[doc = "Enable interrupt"] +pub mod intenset; +#[doc = "INTENCLR (rw) register accessor: an alias for `Reg`"] +pub type INTENCLR = crate::Reg; +#[doc = "Disable interrupt"] +pub mod intenclr; +#[doc = "ENABLE (rw) register accessor: an alias for `Reg`"] +pub type ENABLE = crate::Reg; +#[doc = "Enable I2S module."] +pub mod enable; +#[doc = "Unspecified"] +pub use self::config::CONFIG; +#[doc = r"Cluster"] +#[doc = "Unspecified"] +pub mod config; +#[doc = "Unspecified"] +pub use self::rxd::RXD; +#[doc = r"Cluster"] +#[doc = "Unspecified"] +pub mod rxd; +#[doc = "Unspecified"] +pub use self::txd::TXD; +#[doc = r"Cluster"] +#[doc = "Unspecified"] +pub mod txd; +#[doc = "Unspecified"] +pub use self::rxtxd::RXTXD; +#[doc = r"Cluster"] +#[doc = "Unspecified"] +pub mod rxtxd; +#[doc = "Unspecified"] +pub use self::psel::PSEL; +#[doc = r"Cluster"] +#[doc = "Unspecified"] +pub mod psel; diff --git a/down-the-stack/dk_pac/src/i2s/config.rs b/down-the-stack/dk_pac/src/i2s/config.rs new file mode 100644 index 0000000..38d9d51 --- /dev/null +++ b/down-the-stack/dk_pac/src/i2s/config.rs @@ -0,0 +1,64 @@ +#[doc = r"Register block"] +#[repr(C)] +pub struct CONFIG { + #[doc = "0x00 - I2S mode."] + pub mode: MODE, + #[doc = "0x04 - Reception (RX) enable."] + pub rxen: RXEN, + #[doc = "0x08 - Transmission (TX) enable."] + pub txen: TXEN, + #[doc = "0x0c - Master clock generator enable."] + pub mcken: MCKEN, + #[doc = "0x10 - Master clock generator frequency."] + pub mckfreq: MCKFREQ, + #[doc = "0x14 - MCK / LRCK ratio."] + pub ratio: RATIO, + #[doc = "0x18 - Sample width."] + pub swidth: SWIDTH, + #[doc = "0x1c - Alignment of sample within a frame."] + pub align: ALIGN, + #[doc = "0x20 - Frame format."] + pub format: FORMAT, + #[doc = "0x24 - Enable channels."] + pub channels: CHANNELS, +} +#[doc = "MODE (rw) register accessor: an alias for `Reg`"] +pub type MODE = crate::Reg; +#[doc = "I2S mode."] +pub mod mode; +#[doc = "RXEN (rw) register accessor: an alias for `Reg`"] +pub type RXEN = crate::Reg; +#[doc = "Reception (RX) enable."] +pub mod rxen; +#[doc = "TXEN (rw) register accessor: an alias for `Reg`"] +pub type TXEN = crate::Reg; +#[doc = "Transmission (TX) enable."] +pub mod txen; +#[doc = "MCKEN (rw) register accessor: an alias for `Reg`"] +pub type MCKEN = crate::Reg; +#[doc = "Master clock generator enable."] +pub mod mcken; +#[doc = "MCKFREQ (rw) register accessor: an alias for `Reg`"] +pub type MCKFREQ = crate::Reg; +#[doc = "Master clock generator frequency."] +pub mod mckfreq; +#[doc = "RATIO (rw) register accessor: an alias for `Reg`"] +pub type RATIO = crate::Reg; +#[doc = "MCK / LRCK ratio."] +pub mod ratio; +#[doc = "SWIDTH (rw) register accessor: an alias for `Reg`"] +pub type SWIDTH = crate::Reg; +#[doc = "Sample width."] +pub mod swidth; +#[doc = "ALIGN (rw) register accessor: an alias for `Reg`"] +pub type ALIGN = crate::Reg; +#[doc = "Alignment of sample within a frame."] +pub mod align; +#[doc = "FORMAT (rw) register accessor: an alias for `Reg`"] +pub type FORMAT = crate::Reg; +#[doc = "Frame format."] +pub mod format; +#[doc = "CHANNELS (rw) register accessor: an alias for `Reg`"] +pub type CHANNELS = crate::Reg; +#[doc = "Enable channels."] +pub mod channels; diff --git a/down-the-stack/dk_pac/src/i2s/config/align.rs b/down-the-stack/dk_pac/src/i2s/config/align.rs new file mode 100644 index 0000000..e383d5b --- /dev/null +++ b/down-the-stack/dk_pac/src/i2s/config/align.rs @@ -0,0 +1,126 @@ +#[doc = "Register `ALIGN` 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 `ALIGN` 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 `ALIGN` reader - Alignment of sample within a frame."] +pub type ALIGN_R = crate::BitReader; +#[doc = "Alignment of sample within a frame.\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum ALIGN_A { + #[doc = "0: Left-aligned."] + LEFT = 0, + #[doc = "1: Right-aligned."] + RIGHT = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: ALIGN_A) -> Self { + variant as u8 != 0 + } +} +impl ALIGN_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> ALIGN_A { + match self.bits { + false => ALIGN_A::LEFT, + true => ALIGN_A::RIGHT, + } + } + #[doc = "Checks if the value of the field is `LEFT`"] + #[inline(always)] + pub fn is_left(&self) -> bool { + *self == ALIGN_A::LEFT + } + #[doc = "Checks if the value of the field is `RIGHT`"] + #[inline(always)] + pub fn is_right(&self) -> bool { + *self == ALIGN_A::RIGHT + } +} +#[doc = "Field `ALIGN` writer - Alignment of sample within a frame."] +pub type ALIGN_W<'a, const O: u8> = crate::BitWriter<'a, u32, ALIGN_SPEC, ALIGN_A, O>; +impl<'a, const O: u8> ALIGN_W<'a, O> { + #[doc = "Left-aligned."] + #[inline(always)] + pub fn left(self) -> &'a mut W { + self.variant(ALIGN_A::LEFT) + } + #[doc = "Right-aligned."] + #[inline(always)] + pub fn right(self) -> &'a mut W { + self.variant(ALIGN_A::RIGHT) + } +} +impl R { + #[doc = "Bit 0 - Alignment of sample within a frame."] + #[inline(always)] + pub fn align(&self) -> ALIGN_R { + ALIGN_R::new((self.bits & 1) != 0) + } +} +impl W { + #[doc = "Bit 0 - Alignment of sample within a frame."] + #[inline(always)] + #[must_use] + pub fn align(&mut self) -> ALIGN_W<0> { + ALIGN_W::new(self) + } + #[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 = "Alignment of sample within a frame.\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 [align](index.html) module"] +pub struct ALIGN_SPEC; +impl crate::RegisterSpec for ALIGN_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [align::R](R) reader structure"] +impl crate::Readable for ALIGN_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [align::W](W) writer structure"] +impl crate::Writable for ALIGN_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets ALIGN to value 0"] +impl crate::Resettable for ALIGN_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/i2s/config/channels.rs b/down-the-stack/dk_pac/src/i2s/config/channels.rs new file mode 100644 index 0000000..f52ecba --- /dev/null +++ b/down-the-stack/dk_pac/src/i2s/config/channels.rs @@ -0,0 +1,142 @@ +#[doc = "Register `CHANNELS` 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 `CHANNELS` 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 `CHANNELS` reader - Enable channels."] +pub type CHANNELS_R = crate::FieldReader; +#[doc = "Enable channels.\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +#[repr(u8)] +pub enum CHANNELS_A { + #[doc = "0: Stereo."] + STEREO = 0, + #[doc = "1: Left only."] + LEFT = 1, + #[doc = "2: Right only."] + RIGHT = 2, +} +impl From for u8 { + #[inline(always)] + fn from(variant: CHANNELS_A) -> Self { + variant as _ + } +} +impl CHANNELS_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> Option { + match self.bits { + 0 => Some(CHANNELS_A::STEREO), + 1 => Some(CHANNELS_A::LEFT), + 2 => Some(CHANNELS_A::RIGHT), + _ => None, + } + } + #[doc = "Checks if the value of the field is `STEREO`"] + #[inline(always)] + pub fn is_stereo(&self) -> bool { + *self == CHANNELS_A::STEREO + } + #[doc = "Checks if the value of the field is `LEFT`"] + #[inline(always)] + pub fn is_left(&self) -> bool { + *self == CHANNELS_A::LEFT + } + #[doc = "Checks if the value of the field is `RIGHT`"] + #[inline(always)] + pub fn is_right(&self) -> bool { + *self == CHANNELS_A::RIGHT + } +} +#[doc = "Field `CHANNELS` writer - Enable channels."] +pub type CHANNELS_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, CHANNELS_SPEC, u8, CHANNELS_A, 2, O>; +impl<'a, const O: u8> CHANNELS_W<'a, O> { + #[doc = "Stereo."] + #[inline(always)] + pub fn stereo(self) -> &'a mut W { + self.variant(CHANNELS_A::STEREO) + } + #[doc = "Left only."] + #[inline(always)] + pub fn left(self) -> &'a mut W { + self.variant(CHANNELS_A::LEFT) + } + #[doc = "Right only."] + #[inline(always)] + pub fn right(self) -> &'a mut W { + self.variant(CHANNELS_A::RIGHT) + } +} +impl R { + #[doc = "Bits 0:1 - Enable channels."] + #[inline(always)] + pub fn channels(&self) -> CHANNELS_R { + CHANNELS_R::new((self.bits & 3) as u8) + } +} +impl W { + #[doc = "Bits 0:1 - Enable channels."] + #[inline(always)] + #[must_use] + pub fn channels(&mut self) -> CHANNELS_W<0> { + CHANNELS_W::new(self) + } + #[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 = "Enable channels.\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 [channels](index.html) module"] +pub struct CHANNELS_SPEC; +impl crate::RegisterSpec for CHANNELS_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [channels::R](R) reader structure"] +impl crate::Readable for CHANNELS_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [channels::W](W) writer structure"] +impl crate::Writable for CHANNELS_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets CHANNELS to value 0"] +impl crate::Resettable for CHANNELS_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/i2s/config/format.rs b/down-the-stack/dk_pac/src/i2s/config/format.rs new file mode 100644 index 0000000..5e1bf8d --- /dev/null +++ b/down-the-stack/dk_pac/src/i2s/config/format.rs @@ -0,0 +1,126 @@ +#[doc = "Register `FORMAT` 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 `FORMAT` 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 `FORMAT` reader - Frame format."] +pub type FORMAT_R = crate::BitReader; +#[doc = "Frame format.\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum FORMAT_A { + #[doc = "0: Original I2S format."] + I2S = 0, + #[doc = "1: Alternate (left- or right-aligned) format."] + ALIGNED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: FORMAT_A) -> Self { + variant as u8 != 0 + } +} +impl FORMAT_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> FORMAT_A { + match self.bits { + false => FORMAT_A::I2S, + true => FORMAT_A::ALIGNED, + } + } + #[doc = "Checks if the value of the field is `I2S`"] + #[inline(always)] + pub fn is_i2s(&self) -> bool { + *self == FORMAT_A::I2S + } + #[doc = "Checks if the value of the field is `ALIGNED`"] + #[inline(always)] + pub fn is_aligned(&self) -> bool { + *self == FORMAT_A::ALIGNED + } +} +#[doc = "Field `FORMAT` writer - Frame format."] +pub type FORMAT_W<'a, const O: u8> = crate::BitWriter<'a, u32, FORMAT_SPEC, FORMAT_A, O>; +impl<'a, const O: u8> FORMAT_W<'a, O> { + #[doc = "Original I2S format."] + #[inline(always)] + pub fn i2s(self) -> &'a mut W { + self.variant(FORMAT_A::I2S) + } + #[doc = "Alternate (left- or right-aligned) format."] + #[inline(always)] + pub fn aligned(self) -> &'a mut W { + self.variant(FORMAT_A::ALIGNED) + } +} +impl R { + #[doc = "Bit 0 - Frame format."] + #[inline(always)] + pub fn format(&self) -> FORMAT_R { + FORMAT_R::new((self.bits & 1) != 0) + } +} +impl W { + #[doc = "Bit 0 - Frame format."] + #[inline(always)] + #[must_use] + pub fn format(&mut self) -> FORMAT_W<0> { + 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 + } +} +#[doc = "Frame format.\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 [format](index.html) module"] +pub struct FORMAT_SPEC; +impl crate::RegisterSpec for FORMAT_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [format::R](R) reader structure"] +impl crate::Readable for FORMAT_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [format::W](W) writer structure"] +impl crate::Writable for FORMAT_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets FORMAT to value 0"] +impl crate::Resettable for FORMAT_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/i2s/config/mcken.rs b/down-the-stack/dk_pac/src/i2s/config/mcken.rs new file mode 100644 index 0000000..ee72a0c --- /dev/null +++ b/down-the-stack/dk_pac/src/i2s/config/mcken.rs @@ -0,0 +1,126 @@ +#[doc = "Register `MCKEN` 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 `MCKEN` 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 `MCKEN` reader - Master clock generator enable."] +pub type MCKEN_R = crate::BitReader; +#[doc = "Master clock generator enable.\n\nValue on reset: 1"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum MCKEN_A { + #[doc = "0: Master clock generator disabled and PSEL.MCK not connected(available as GPIO)."] + DISABLED = 0, + #[doc = "1: Master clock generator running and MCK output on PSEL.MCK."] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: MCKEN_A) -> Self { + variant as u8 != 0 + } +} +impl MCKEN_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> MCKEN_A { + match self.bits { + false => MCKEN_A::DISABLED, + true => MCKEN_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == MCKEN_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == MCKEN_A::ENABLED + } +} +#[doc = "Field `MCKEN` writer - Master clock generator enable."] +pub type MCKEN_W<'a, const O: u8> = crate::BitWriter<'a, u32, MCKEN_SPEC, MCKEN_A, O>; +impl<'a, const O: u8> MCKEN_W<'a, O> { + #[doc = "Master clock generator disabled and PSEL.MCK not connected(available as GPIO)."] + #[inline(always)] + pub fn disabled(self) -> &'a mut W { + self.variant(MCKEN_A::DISABLED) + } + #[doc = "Master clock generator running and MCK output on PSEL.MCK."] + #[inline(always)] + pub fn enabled(self) -> &'a mut W { + self.variant(MCKEN_A::ENABLED) + } +} +impl R { + #[doc = "Bit 0 - Master clock generator enable."] + #[inline(always)] + pub fn mcken(&self) -> MCKEN_R { + MCKEN_R::new((self.bits & 1) != 0) + } +} +impl W { + #[doc = "Bit 0 - Master clock generator enable."] + #[inline(always)] + #[must_use] + pub fn mcken(&mut self) -> MCKEN_W<0> { + MCKEN_W::new(self) + } + #[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 = "Master clock generator enable.\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 [mcken](index.html) module"] +pub struct MCKEN_SPEC; +impl crate::RegisterSpec for MCKEN_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [mcken::R](R) reader structure"] +impl crate::Readable for MCKEN_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [mcken::W](W) writer structure"] +impl crate::Writable for MCKEN_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets MCKEN to value 0x01"] +impl crate::Resettable for MCKEN_SPEC { + const RESET_VALUE: Self::Ux = 0x01; +} diff --git a/down-the-stack/dk_pac/src/i2s/config/mckfreq.rs b/down-the-stack/dk_pac/src/i2s/config/mckfreq.rs new file mode 100644 index 0000000..9809e57 --- /dev/null +++ b/down-the-stack/dk_pac/src/i2s/config/mckfreq.rs @@ -0,0 +1,337 @@ +#[doc = "Register `MCKFREQ` 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 `MCKFREQ` 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 `MCKFREQ` reader - Master clock generator frequency."] +pub type MCKFREQ_R = crate::FieldReader; +#[doc = "Master clock generator frequency.\n\nValue on reset: 536870912"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +#[repr(u32)] +pub enum MCKFREQ_A { + #[doc = "2147483648: 32 MHz / 2 = 16.0 MHz"] + _32MDIV2 = 2147483648, + #[doc = "1342177280: 32 MHz / 3 = 10.6666667 MHz"] + _32MDIV3 = 1342177280, + #[doc = "1073741824: 32 MHz / 4 = 8.0 MHz"] + _32MDIV4 = 1073741824, + #[doc = "805306368: 32 MHz / 5 = 6.4 MHz"] + _32MDIV5 = 805306368, + #[doc = "671088640: 32 MHz / 6 = 5.3333333 MHz"] + _32MDIV6 = 671088640, + #[doc = "536870912: 32 MHz / 8 = 4.0 MHz"] + _32MDIV8 = 536870912, + #[doc = "402653184: 32 MHz / 10 = 3.2 MHz"] + _32MDIV10 = 402653184, + #[doc = "369098752: 32 MHz / 11 = 2.9090909 MHz"] + _32MDIV11 = 369098752, + #[doc = "285212672: 32 MHz / 15 = 2.1333333 MHz"] + _32MDIV15 = 285212672, + #[doc = "268435456: 32 MHz / 16 = 2.0 MHz"] + _32MDIV16 = 268435456, + #[doc = "201326592: 32 MHz / 21 = 1.5238095"] + _32MDIV21 = 201326592, + #[doc = "184549376: 32 MHz / 23 = 1.3913043 MHz"] + _32MDIV23 = 184549376, + #[doc = "142606336: 32 MHz / 30 = 1.0666667 MHz"] + _32MDIV30 = 142606336, + #[doc = "138412032: 32 MHz / 31 = 1.0322581 MHz"] + _32MDIV31 = 138412032, + #[doc = "134217728: 32 MHz / 32 = 1.0 MHz"] + _32MDIV32 = 134217728, + #[doc = "100663296: 32 MHz / 42 = 0.7619048 MHz"] + _32MDIV42 = 100663296, + #[doc = "68157440: 32 MHz / 63 = 0.5079365 MHz"] + _32MDIV63 = 68157440, + #[doc = "34340864: 32 MHz / 125 = 0.256 MHz"] + _32MDIV125 = 34340864, +} +impl From for u32 { + #[inline(always)] + fn from(variant: MCKFREQ_A) -> Self { + variant as _ + } +} +impl MCKFREQ_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> Option { + match self.bits { + 2147483648 => Some(MCKFREQ_A::_32MDIV2), + 1342177280 => Some(MCKFREQ_A::_32MDIV3), + 1073741824 => Some(MCKFREQ_A::_32MDIV4), + 805306368 => Some(MCKFREQ_A::_32MDIV5), + 671088640 => Some(MCKFREQ_A::_32MDIV6), + 536870912 => Some(MCKFREQ_A::_32MDIV8), + 402653184 => Some(MCKFREQ_A::_32MDIV10), + 369098752 => Some(MCKFREQ_A::_32MDIV11), + 285212672 => Some(MCKFREQ_A::_32MDIV15), + 268435456 => Some(MCKFREQ_A::_32MDIV16), + 201326592 => Some(MCKFREQ_A::_32MDIV21), + 184549376 => Some(MCKFREQ_A::_32MDIV23), + 142606336 => Some(MCKFREQ_A::_32MDIV30), + 138412032 => Some(MCKFREQ_A::_32MDIV31), + 134217728 => Some(MCKFREQ_A::_32MDIV32), + 100663296 => Some(MCKFREQ_A::_32MDIV42), + 68157440 => Some(MCKFREQ_A::_32MDIV63), + 34340864 => Some(MCKFREQ_A::_32MDIV125), + _ => None, + } + } + #[doc = "Checks if the value of the field is `_32MDIV2`"] + #[inline(always)] + pub fn is_32mdiv2(&self) -> bool { + *self == MCKFREQ_A::_32MDIV2 + } + #[doc = "Checks if the value of the field is `_32MDIV3`"] + #[inline(always)] + pub fn is_32mdiv3(&self) -> bool { + *self == MCKFREQ_A::_32MDIV3 + } + #[doc = "Checks if the value of the field is `_32MDIV4`"] + #[inline(always)] + pub fn is_32mdiv4(&self) -> bool { + *self == MCKFREQ_A::_32MDIV4 + } + #[doc = "Checks if the value of the field is `_32MDIV5`"] + #[inline(always)] + pub fn is_32mdiv5(&self) -> bool { + *self == MCKFREQ_A::_32MDIV5 + } + #[doc = "Checks if the value of the field is `_32MDIV6`"] + #[inline(always)] + pub fn is_32mdiv6(&self) -> bool { + *self == MCKFREQ_A::_32MDIV6 + } + #[doc = "Checks if the value of the field is `_32MDIV8`"] + #[inline(always)] + pub fn is_32mdiv8(&self) -> bool { + *self == MCKFREQ_A::_32MDIV8 + } + #[doc = "Checks if the value of the field is `_32MDIV10`"] + #[inline(always)] + pub fn is_32mdiv10(&self) -> bool { + *self == MCKFREQ_A::_32MDIV10 + } + #[doc = "Checks if the value of the field is `_32MDIV11`"] + #[inline(always)] + pub fn is_32mdiv11(&self) -> bool { + *self == MCKFREQ_A::_32MDIV11 + } + #[doc = "Checks if the value of the field is `_32MDIV15`"] + #[inline(always)] + pub fn is_32mdiv15(&self) -> bool { + *self == MCKFREQ_A::_32MDIV15 + } + #[doc = "Checks if the value of the field is `_32MDIV16`"] + #[inline(always)] + pub fn is_32mdiv16(&self) -> bool { + *self == MCKFREQ_A::_32MDIV16 + } + #[doc = "Checks if the value of the field is `_32MDIV21`"] + #[inline(always)] + pub fn is_32mdiv21(&self) -> bool { + *self == MCKFREQ_A::_32MDIV21 + } + #[doc = "Checks if the value of the field is `_32MDIV23`"] + #[inline(always)] + pub fn is_32mdiv23(&self) -> bool { + *self == MCKFREQ_A::_32MDIV23 + } + #[doc = "Checks if the value of the field is `_32MDIV30`"] + #[inline(always)] + pub fn is_32mdiv30(&self) -> bool { + *self == MCKFREQ_A::_32MDIV30 + } + #[doc = "Checks if the value of the field is `_32MDIV31`"] + #[inline(always)] + pub fn is_32mdiv31(&self) -> bool { + *self == MCKFREQ_A::_32MDIV31 + } + #[doc = "Checks if the value of the field is `_32MDIV32`"] + #[inline(always)] + pub fn is_32mdiv32(&self) -> bool { + *self == MCKFREQ_A::_32MDIV32 + } + #[doc = "Checks if the value of the field is `_32MDIV42`"] + #[inline(always)] + pub fn is_32mdiv42(&self) -> bool { + *self == MCKFREQ_A::_32MDIV42 + } + #[doc = "Checks if the value of the field is `_32MDIV63`"] + #[inline(always)] + pub fn is_32mdiv63(&self) -> bool { + *self == MCKFREQ_A::_32MDIV63 + } + #[doc = "Checks if the value of the field is `_32MDIV125`"] + #[inline(always)] + pub fn is_32mdiv125(&self) -> bool { + *self == MCKFREQ_A::_32MDIV125 + } +} +#[doc = "Field `MCKFREQ` writer - Master clock generator frequency."] +pub type MCKFREQ_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, MCKFREQ_SPEC, u32, MCKFREQ_A, 32, O>; +impl<'a, const O: u8> MCKFREQ_W<'a, O> { + #[doc = "32 MHz / 2 = 16.0 MHz"] + #[inline(always)] + pub fn _32mdiv2(self) -> &'a mut W { + self.variant(MCKFREQ_A::_32MDIV2) + } + #[doc = "32 MHz / 3 = 10.6666667 MHz"] + #[inline(always)] + pub fn _32mdiv3(self) -> &'a mut W { + self.variant(MCKFREQ_A::_32MDIV3) + } + #[doc = "32 MHz / 4 = 8.0 MHz"] + #[inline(always)] + pub fn _32mdiv4(self) -> &'a mut W { + self.variant(MCKFREQ_A::_32MDIV4) + } + #[doc = "32 MHz / 5 = 6.4 MHz"] + #[inline(always)] + pub fn _32mdiv5(self) -> &'a mut W { + self.variant(MCKFREQ_A::_32MDIV5) + } + #[doc = "32 MHz / 6 = 5.3333333 MHz"] + #[inline(always)] + pub fn _32mdiv6(self) -> &'a mut W { + self.variant(MCKFREQ_A::_32MDIV6) + } + #[doc = "32 MHz / 8 = 4.0 MHz"] + #[inline(always)] + pub fn _32mdiv8(self) -> &'a mut W { + self.variant(MCKFREQ_A::_32MDIV8) + } + #[doc = "32 MHz / 10 = 3.2 MHz"] + #[inline(always)] + pub fn _32mdiv10(self) -> &'a mut W { + self.variant(MCKFREQ_A::_32MDIV10) + } + #[doc = "32 MHz / 11 = 2.9090909 MHz"] + #[inline(always)] + pub fn _32mdiv11(self) -> &'a mut W { + self.variant(MCKFREQ_A::_32MDIV11) + } + #[doc = "32 MHz / 15 = 2.1333333 MHz"] + #[inline(always)] + pub fn _32mdiv15(self) -> &'a mut W { + self.variant(MCKFREQ_A::_32MDIV15) + } + #[doc = "32 MHz / 16 = 2.0 MHz"] + #[inline(always)] + pub fn _32mdiv16(self) -> &'a mut W { + self.variant(MCKFREQ_A::_32MDIV16) + } + #[doc = "32 MHz / 21 = 1.5238095"] + #[inline(always)] + pub fn _32mdiv21(self) -> &'a mut W { + self.variant(MCKFREQ_A::_32MDIV21) + } + #[doc = "32 MHz / 23 = 1.3913043 MHz"] + #[inline(always)] + pub fn _32mdiv23(self) -> &'a mut W { + self.variant(MCKFREQ_A::_32MDIV23) + } + #[doc = "32 MHz / 30 = 1.0666667 MHz"] + #[inline(always)] + pub fn _32mdiv30(self) -> &'a mut W { + self.variant(MCKFREQ_A::_32MDIV30) + } + #[doc = "32 MHz / 31 = 1.0322581 MHz"] + #[inline(always)] + pub fn _32mdiv31(self) -> &'a mut W { + self.variant(MCKFREQ_A::_32MDIV31) + } + #[doc = "32 MHz / 32 = 1.0 MHz"] + #[inline(always)] + pub fn _32mdiv32(self) -> &'a mut W { + self.variant(MCKFREQ_A::_32MDIV32) + } + #[doc = "32 MHz / 42 = 0.7619048 MHz"] + #[inline(always)] + pub fn _32mdiv42(self) -> &'a mut W { + self.variant(MCKFREQ_A::_32MDIV42) + } + #[doc = "32 MHz / 63 = 0.5079365 MHz"] + #[inline(always)] + pub fn _32mdiv63(self) -> &'a mut W { + self.variant(MCKFREQ_A::_32MDIV63) + } + #[doc = "32 MHz / 125 = 0.256 MHz"] + #[inline(always)] + pub fn _32mdiv125(self) -> &'a mut W { + self.variant(MCKFREQ_A::_32MDIV125) + } +} +impl R { + #[doc = "Bits 0:31 - Master clock generator frequency."] + #[inline(always)] + pub fn mckfreq(&self) -> MCKFREQ_R { + MCKFREQ_R::new(self.bits) + } +} +impl W { + #[doc = "Bits 0:31 - Master clock generator frequency."] + #[inline(always)] + #[must_use] + pub fn mckfreq(&mut self) -> MCKFREQ_W<0> { + MCKFREQ_W::new(self) + } + #[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 = "Master clock generator frequency.\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 [mckfreq](index.html) module"] +pub struct MCKFREQ_SPEC; +impl crate::RegisterSpec for MCKFREQ_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [mckfreq::R](R) reader structure"] +impl crate::Readable for MCKFREQ_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [mckfreq::W](W) writer structure"] +impl crate::Writable for MCKFREQ_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets MCKFREQ to value 0x2000_0000"] +impl crate::Resettable for MCKFREQ_SPEC { + const RESET_VALUE: Self::Ux = 0x2000_0000; +} diff --git a/down-the-stack/dk_pac/src/i2s/config/mode.rs b/down-the-stack/dk_pac/src/i2s/config/mode.rs new file mode 100644 index 0000000..39a92e0 --- /dev/null +++ b/down-the-stack/dk_pac/src/i2s/config/mode.rs @@ -0,0 +1,126 @@ +#[doc = "Register `MODE` 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 `MODE` 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 `MODE` reader - I2S mode."] +pub type MODE_R = crate::BitReader; +#[doc = "I2S mode.\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum MODE_A { + #[doc = "0: Master mode. SCK and LRCK generated from internal master clcok (MCK) and output on pins defined by PSEL.xxx."] + MASTER = 0, + #[doc = "1: Slave mode. SCK and LRCK generated by external master and received on pins defined by PSEL.xxx"] + SLAVE = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: MODE_A) -> Self { + variant as u8 != 0 + } +} +impl MODE_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> MODE_A { + match self.bits { + false => MODE_A::MASTER, + true => MODE_A::SLAVE, + } + } + #[doc = "Checks if the value of the field is `MASTER`"] + #[inline(always)] + pub fn is_master(&self) -> bool { + *self == MODE_A::MASTER + } + #[doc = "Checks if the value of the field is `SLAVE`"] + #[inline(always)] + pub fn is_slave(&self) -> bool { + *self == MODE_A::SLAVE + } +} +#[doc = "Field `MODE` writer - I2S mode."] +pub type MODE_W<'a, const O: u8> = crate::BitWriter<'a, u32, MODE_SPEC, MODE_A, O>; +impl<'a, const O: u8> MODE_W<'a, O> { + #[doc = "Master mode. SCK and LRCK generated from internal master clcok (MCK) and output on pins defined by PSEL.xxx."] + #[inline(always)] + pub fn master(self) -> &'a mut W { + self.variant(MODE_A::MASTER) + } + #[doc = "Slave mode. SCK and LRCK generated by external master and received on pins defined by PSEL.xxx"] + #[inline(always)] + pub fn slave(self) -> &'a mut W { + self.variant(MODE_A::SLAVE) + } +} +impl R { + #[doc = "Bit 0 - I2S mode."] + #[inline(always)] + pub fn mode(&self) -> MODE_R { + MODE_R::new((self.bits & 1) != 0) + } +} +impl W { + #[doc = "Bit 0 - I2S mode."] + #[inline(always)] + #[must_use] + pub fn mode(&mut self) -> MODE_W<0> { + 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 + } +} +#[doc = "I2S mode.\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 [mode](index.html) module"] +pub struct MODE_SPEC; +impl crate::RegisterSpec for MODE_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [mode::R](R) reader structure"] +impl crate::Readable for MODE_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [mode::W](W) writer structure"] +impl crate::Writable for 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 MODE to value 0"] +impl crate::Resettable for MODE_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/i2s/config/ratio.rs b/down-the-stack/dk_pac/src/i2s/config/ratio.rs new file mode 100644 index 0000000..ccd97bd --- /dev/null +++ b/down-the-stack/dk_pac/src/i2s/config/ratio.rs @@ -0,0 +1,219 @@ +#[doc = "Register `RATIO` 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 `RATIO` 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 `RATIO` reader - MCK / LRCK ratio."] +pub type RATIO_R = crate::FieldReader; +#[doc = "MCK / LRCK ratio.\n\nValue on reset: 6"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +#[repr(u8)] +pub enum RATIO_A { + #[doc = "0: LRCK = MCK / 32"] + _32X = 0, + #[doc = "1: LRCK = MCK / 48"] + _48X = 1, + #[doc = "2: LRCK = MCK / 64"] + _64X = 2, + #[doc = "3: LRCK = MCK / 96"] + _96X = 3, + #[doc = "4: LRCK = MCK / 128"] + _128X = 4, + #[doc = "5: LRCK = MCK / 192"] + _192X = 5, + #[doc = "6: LRCK = MCK / 256"] + _256X = 6, + #[doc = "7: LRCK = MCK / 384"] + _384X = 7, + #[doc = "8: LRCK = MCK / 512"] + _512X = 8, +} +impl From for u8 { + #[inline(always)] + fn from(variant: RATIO_A) -> Self { + variant as _ + } +} +impl RATIO_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> Option { + match self.bits { + 0 => Some(RATIO_A::_32X), + 1 => Some(RATIO_A::_48X), + 2 => Some(RATIO_A::_64X), + 3 => Some(RATIO_A::_96X), + 4 => Some(RATIO_A::_128X), + 5 => Some(RATIO_A::_192X), + 6 => Some(RATIO_A::_256X), + 7 => Some(RATIO_A::_384X), + 8 => Some(RATIO_A::_512X), + _ => None, + } + } + #[doc = "Checks if the value of the field is `_32X`"] + #[inline(always)] + pub fn is_32x(&self) -> bool { + *self == RATIO_A::_32X + } + #[doc = "Checks if the value of the field is `_48X`"] + #[inline(always)] + pub fn is_48x(&self) -> bool { + *self == RATIO_A::_48X + } + #[doc = "Checks if the value of the field is `_64X`"] + #[inline(always)] + pub fn is_64x(&self) -> bool { + *self == RATIO_A::_64X + } + #[doc = "Checks if the value of the field is `_96X`"] + #[inline(always)] + pub fn is_96x(&self) -> bool { + *self == RATIO_A::_96X + } + #[doc = "Checks if the value of the field is `_128X`"] + #[inline(always)] + pub fn is_128x(&self) -> bool { + *self == RATIO_A::_128X + } + #[doc = "Checks if the value of the field is `_192X`"] + #[inline(always)] + pub fn is_192x(&self) -> bool { + *self == RATIO_A::_192X + } + #[doc = "Checks if the value of the field is `_256X`"] + #[inline(always)] + pub fn is_256x(&self) -> bool { + *self == RATIO_A::_256X + } + #[doc = "Checks if the value of the field is `_384X`"] + #[inline(always)] + pub fn is_384x(&self) -> bool { + *self == RATIO_A::_384X + } + #[doc = "Checks if the value of the field is `_512X`"] + #[inline(always)] + pub fn is_512x(&self) -> bool { + *self == RATIO_A::_512X + } +} +#[doc = "Field `RATIO` writer - MCK / LRCK ratio."] +pub type RATIO_W<'a, const O: u8> = crate::FieldWriter<'a, u32, RATIO_SPEC, u8, RATIO_A, 4, O>; +impl<'a, const O: u8> RATIO_W<'a, O> { + #[doc = "LRCK = MCK / 32"] + #[inline(always)] + pub fn _32x(self) -> &'a mut W { + self.variant(RATIO_A::_32X) + } + #[doc = "LRCK = MCK / 48"] + #[inline(always)] + pub fn _48x(self) -> &'a mut W { + self.variant(RATIO_A::_48X) + } + #[doc = "LRCK = MCK / 64"] + #[inline(always)] + pub fn _64x(self) -> &'a mut W { + self.variant(RATIO_A::_64X) + } + #[doc = "LRCK = MCK / 96"] + #[inline(always)] + pub fn _96x(self) -> &'a mut W { + self.variant(RATIO_A::_96X) + } + #[doc = "LRCK = MCK / 128"] + #[inline(always)] + pub fn _128x(self) -> &'a mut W { + self.variant(RATIO_A::_128X) + } + #[doc = "LRCK = MCK / 192"] + #[inline(always)] + pub fn _192x(self) -> &'a mut W { + self.variant(RATIO_A::_192X) + } + #[doc = "LRCK = MCK / 256"] + #[inline(always)] + pub fn _256x(self) -> &'a mut W { + self.variant(RATIO_A::_256X) + } + #[doc = "LRCK = MCK / 384"] + #[inline(always)] + pub fn _384x(self) -> &'a mut W { + self.variant(RATIO_A::_384X) + } + #[doc = "LRCK = MCK / 512"] + #[inline(always)] + pub fn _512x(self) -> &'a mut W { + self.variant(RATIO_A::_512X) + } +} +impl R { + #[doc = "Bits 0:3 - MCK / LRCK ratio."] + #[inline(always)] + pub fn ratio(&self) -> RATIO_R { + RATIO_R::new((self.bits & 0x0f) as u8) + } +} +impl W { + #[doc = "Bits 0:3 - MCK / LRCK ratio."] + #[inline(always)] + #[must_use] + pub fn ratio(&mut self) -> RATIO_W<0> { + RATIO_W::new(self) + } + #[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 = "MCK / LRCK ratio.\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 [ratio](index.html) module"] +pub struct RATIO_SPEC; +impl crate::RegisterSpec for RATIO_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [ratio::R](R) reader structure"] +impl crate::Readable for RATIO_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [ratio::W](W) writer structure"] +impl crate::Writable for RATIO_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets RATIO to value 0x06"] +impl crate::Resettable for RATIO_SPEC { + const RESET_VALUE: Self::Ux = 0x06; +} diff --git a/down-the-stack/dk_pac/src/i2s/config/rxen.rs b/down-the-stack/dk_pac/src/i2s/config/rxen.rs new file mode 100644 index 0000000..e803ddb --- /dev/null +++ b/down-the-stack/dk_pac/src/i2s/config/rxen.rs @@ -0,0 +1,126 @@ +#[doc = "Register `RXEN` 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 `RXEN` 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 `RXEN` reader - Reception (RX) enable."] +pub type RXEN_R = crate::BitReader; +#[doc = "Reception (RX) enable.\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum RXEN_A { + #[doc = "0: Reception disabled and now data will be written to the RXD.PTR address."] + DISABLED = 0, + #[doc = "1: Reception enabled."] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: RXEN_A) -> Self { + variant as u8 != 0 + } +} +impl RXEN_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> RXEN_A { + match self.bits { + false => RXEN_A::DISABLED, + true => RXEN_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == RXEN_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == RXEN_A::ENABLED + } +} +#[doc = "Field `RXEN` writer - Reception (RX) enable."] +pub type RXEN_W<'a, const O: u8> = crate::BitWriter<'a, u32, RXEN_SPEC, RXEN_A, O>; +impl<'a, const O: u8> RXEN_W<'a, O> { + #[doc = "Reception disabled and now data will be written to the RXD.PTR address."] + #[inline(always)] + pub fn disabled(self) -> &'a mut W { + self.variant(RXEN_A::DISABLED) + } + #[doc = "Reception enabled."] + #[inline(always)] + pub fn enabled(self) -> &'a mut W { + self.variant(RXEN_A::ENABLED) + } +} +impl R { + #[doc = "Bit 0 - Reception (RX) enable."] + #[inline(always)] + pub fn rxen(&self) -> RXEN_R { + RXEN_R::new((self.bits & 1) != 0) + } +} +impl W { + #[doc = "Bit 0 - Reception (RX) enable."] + #[inline(always)] + #[must_use] + pub fn rxen(&mut self) -> RXEN_W<0> { + RXEN_W::new(self) + } + #[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 = "Reception (RX) enable.\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 [rxen](index.html) module"] +pub struct RXEN_SPEC; +impl crate::RegisterSpec for RXEN_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [rxen::R](R) reader structure"] +impl crate::Readable for RXEN_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [rxen::W](W) writer structure"] +impl crate::Writable for RXEN_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets RXEN to value 0"] +impl crate::Resettable for RXEN_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/i2s/config/swidth.rs b/down-the-stack/dk_pac/src/i2s/config/swidth.rs new file mode 100644 index 0000000..259ea98 --- /dev/null +++ b/down-the-stack/dk_pac/src/i2s/config/swidth.rs @@ -0,0 +1,141 @@ +#[doc = "Register `SWIDTH` 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 `SWIDTH` 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 `SWIDTH` reader - Sample width."] +pub type SWIDTH_R = crate::FieldReader; +#[doc = "Sample width.\n\nValue on reset: 1"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +#[repr(u8)] +pub enum SWIDTH_A { + #[doc = "0: 8 bit."] + _8BIT = 0, + #[doc = "1: 16 bit."] + _16BIT = 1, + #[doc = "2: 24 bit."] + _24BIT = 2, +} +impl From for u8 { + #[inline(always)] + fn from(variant: SWIDTH_A) -> Self { + variant as _ + } +} +impl SWIDTH_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> Option { + match self.bits { + 0 => Some(SWIDTH_A::_8BIT), + 1 => Some(SWIDTH_A::_16BIT), + 2 => Some(SWIDTH_A::_24BIT), + _ => None, + } + } + #[doc = "Checks if the value of the field is `_8BIT`"] + #[inline(always)] + pub fn is_8bit(&self) -> bool { + *self == SWIDTH_A::_8BIT + } + #[doc = "Checks if the value of the field is `_16BIT`"] + #[inline(always)] + pub fn is_16bit(&self) -> bool { + *self == SWIDTH_A::_16BIT + } + #[doc = "Checks if the value of the field is `_24BIT`"] + #[inline(always)] + pub fn is_24bit(&self) -> bool { + *self == SWIDTH_A::_24BIT + } +} +#[doc = "Field `SWIDTH` writer - Sample width."] +pub type SWIDTH_W<'a, const O: u8> = crate::FieldWriter<'a, u32, SWIDTH_SPEC, u8, SWIDTH_A, 2, O>; +impl<'a, const O: u8> SWIDTH_W<'a, O> { + #[doc = "8 bit."] + #[inline(always)] + pub fn _8bit(self) -> &'a mut W { + self.variant(SWIDTH_A::_8BIT) + } + #[doc = "16 bit."] + #[inline(always)] + pub fn _16bit(self) -> &'a mut W { + self.variant(SWIDTH_A::_16BIT) + } + #[doc = "24 bit."] + #[inline(always)] + pub fn _24bit(self) -> &'a mut W { + self.variant(SWIDTH_A::_24BIT) + } +} +impl R { + #[doc = "Bits 0:1 - Sample width."] + #[inline(always)] + pub fn swidth(&self) -> SWIDTH_R { + SWIDTH_R::new((self.bits & 3) as u8) + } +} +impl W { + #[doc = "Bits 0:1 - Sample width."] + #[inline(always)] + #[must_use] + pub fn swidth(&mut self) -> SWIDTH_W<0> { + SWIDTH_W::new(self) + } + #[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 = "Sample width.\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 [swidth](index.html) module"] +pub struct SWIDTH_SPEC; +impl crate::RegisterSpec for SWIDTH_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [swidth::R](R) reader structure"] +impl crate::Readable for SWIDTH_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [swidth::W](W) writer structure"] +impl crate::Writable for SWIDTH_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets SWIDTH to value 0x01"] +impl crate::Resettable for SWIDTH_SPEC { + const RESET_VALUE: Self::Ux = 0x01; +} diff --git a/down-the-stack/dk_pac/src/i2s/config/txen.rs b/down-the-stack/dk_pac/src/i2s/config/txen.rs new file mode 100644 index 0000000..b5e3655 --- /dev/null +++ b/down-the-stack/dk_pac/src/i2s/config/txen.rs @@ -0,0 +1,126 @@ +#[doc = "Register `TXEN` 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 `TXEN` 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 `TXEN` reader - Transmission (TX) enable."] +pub type TXEN_R = crate::BitReader; +#[doc = "Transmission (TX) enable.\n\nValue on reset: 1"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum TXEN_A { + #[doc = "0: Transmission disabled and now data will be read from the RXD.TXD address."] + DISABLED = 0, + #[doc = "1: Transmission enabled."] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: TXEN_A) -> Self { + variant as u8 != 0 + } +} +impl TXEN_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> TXEN_A { + match self.bits { + false => TXEN_A::DISABLED, + true => TXEN_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == TXEN_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == TXEN_A::ENABLED + } +} +#[doc = "Field `TXEN` writer - Transmission (TX) enable."] +pub type TXEN_W<'a, const O: u8> = crate::BitWriter<'a, u32, TXEN_SPEC, TXEN_A, O>; +impl<'a, const O: u8> TXEN_W<'a, O> { + #[doc = "Transmission disabled and now data will be read from the RXD.TXD address."] + #[inline(always)] + pub fn disabled(self) -> &'a mut W { + self.variant(TXEN_A::DISABLED) + } + #[doc = "Transmission enabled."] + #[inline(always)] + pub fn enabled(self) -> &'a mut W { + self.variant(TXEN_A::ENABLED) + } +} +impl R { + #[doc = "Bit 0 - Transmission (TX) enable."] + #[inline(always)] + pub fn txen(&self) -> TXEN_R { + TXEN_R::new((self.bits & 1) != 0) + } +} +impl W { + #[doc = "Bit 0 - Transmission (TX) enable."] + #[inline(always)] + #[must_use] + pub fn txen(&mut self) -> TXEN_W<0> { + TXEN_W::new(self) + } + #[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 = "Transmission (TX) enable.\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 [txen](index.html) module"] +pub struct TXEN_SPEC; +impl crate::RegisterSpec for TXEN_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [txen::R](R) reader structure"] +impl crate::Readable for TXEN_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [txen::W](W) writer structure"] +impl crate::Writable for TXEN_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets TXEN to value 0x01"] +impl crate::Resettable for TXEN_SPEC { + const RESET_VALUE: Self::Ux = 0x01; +} diff --git a/down-the-stack/dk_pac/src/i2s/enable.rs b/down-the-stack/dk_pac/src/i2s/enable.rs new file mode 100644 index 0000000..a893d58 --- /dev/null +++ b/down-the-stack/dk_pac/src/i2s/enable.rs @@ -0,0 +1,126 @@ +#[doc = "Register `ENABLE` 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 `ENABLE` 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 `ENABLE` reader - Enable I2S module."] +pub type ENABLE_R = crate::BitReader; +#[doc = "Enable I2S module.\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum ENABLE_A { + #[doc = "0: Disable"] + DISABLED = 0, + #[doc = "1: Enable"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: ENABLE_A) -> Self { + variant as u8 != 0 + } +} +impl ENABLE_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> ENABLE_A { + match self.bits { + false => ENABLE_A::DISABLED, + true => ENABLE_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == ENABLE_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == ENABLE_A::ENABLED + } +} +#[doc = "Field `ENABLE` writer - Enable I2S module."] +pub type ENABLE_W<'a, const O: u8> = crate::BitWriter<'a, u32, ENABLE_SPEC, ENABLE_A, O>; +impl<'a, const O: u8> ENABLE_W<'a, O> { + #[doc = "Disable"] + #[inline(always)] + pub fn disabled(self) -> &'a mut W { + self.variant(ENABLE_A::DISABLED) + } + #[doc = "Enable"] + #[inline(always)] + pub fn enabled(self) -> &'a mut W { + self.variant(ENABLE_A::ENABLED) + } +} +impl R { + #[doc = "Bit 0 - Enable I2S module."] + #[inline(always)] + pub fn enable(&self) -> ENABLE_R { + ENABLE_R::new((self.bits & 1) != 0) + } +} +impl W { + #[doc = "Bit 0 - Enable I2S module."] + #[inline(always)] + #[must_use] + pub fn enable(&mut self) -> ENABLE_W<0> { + 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 + } +} +#[doc = "Enable I2S module.\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 [enable](index.html) module"] +pub struct ENABLE_SPEC; +impl crate::RegisterSpec for ENABLE_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [enable::R](R) reader structure"] +impl crate::Readable for ENABLE_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [enable::W](W) writer structure"] +impl crate::Writable for ENABLE_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets ENABLE to value 0"] +impl crate::Resettable for ENABLE_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/i2s/events_rxptrupd.rs b/down-the-stack/dk_pac/src/i2s/events_rxptrupd.rs new file mode 100644 index 0000000..c1b9d95 --- /dev/null +++ b/down-the-stack/dk_pac/src/i2s/events_rxptrupd.rs @@ -0,0 +1,127 @@ +#[doc = "Register `EVENTS_RXPTRUPD` 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 `EVENTS_RXPTRUPD` 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 `EVENTS_RXPTRUPD` reader - The RXD.PTR register has been copied to internal double-buffers. When the I2S module is started and RX is enabled, this event will be generated for every RXTXD.MAXCNT words that are received on the SDIN pin."] +pub type EVENTS_RXPTRUPD_R = crate::BitReader; +#[doc = "The RXD.PTR register has been copied to internal double-buffers. When the I2S module is started and RX is enabled, this event will be generated for every RXTXD.MAXCNT words that are received on the SDIN pin.\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum EVENTS_RXPTRUPD_A { + #[doc = "0: Event not generated"] + NOT_GENERATED = 0, + #[doc = "1: Event generated"] + GENERATED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: EVENTS_RXPTRUPD_A) -> Self { + variant as u8 != 0 + } +} +impl EVENTS_RXPTRUPD_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> EVENTS_RXPTRUPD_A { + match self.bits { + false => EVENTS_RXPTRUPD_A::NOT_GENERATED, + true => EVENTS_RXPTRUPD_A::GENERATED, + } + } + #[doc = "Checks if the value of the field is `NOT_GENERATED`"] + #[inline(always)] + pub fn is_not_generated(&self) -> bool { + *self == EVENTS_RXPTRUPD_A::NOT_GENERATED + } + #[doc = "Checks if the value of the field is `GENERATED`"] + #[inline(always)] + pub fn is_generated(&self) -> bool { + *self == EVENTS_RXPTRUPD_A::GENERATED + } +} +#[doc = "Field `EVENTS_RXPTRUPD` writer - The RXD.PTR register has been copied to internal double-buffers. When the I2S module is started and RX is enabled, this event will be generated for every RXTXD.MAXCNT words that are received on the SDIN pin."] +pub type EVENTS_RXPTRUPD_W<'a, const O: u8> = + crate::BitWriter<'a, u32, EVENTS_RXPTRUPD_SPEC, EVENTS_RXPTRUPD_A, O>; +impl<'a, const O: u8> EVENTS_RXPTRUPD_W<'a, O> { + #[doc = "Event not generated"] + #[inline(always)] + pub fn not_generated(self) -> &'a mut W { + self.variant(EVENTS_RXPTRUPD_A::NOT_GENERATED) + } + #[doc = "Event generated"] + #[inline(always)] + pub fn generated(self) -> &'a mut W { + self.variant(EVENTS_RXPTRUPD_A::GENERATED) + } +} +impl R { + #[doc = "Bit 0 - The RXD.PTR register has been copied to internal double-buffers. When the I2S module is started and RX is enabled, this event will be generated for every RXTXD.MAXCNT words that are received on the SDIN pin."] + #[inline(always)] + pub fn events_rxptrupd(&self) -> EVENTS_RXPTRUPD_R { + EVENTS_RXPTRUPD_R::new((self.bits & 1) != 0) + } +} +impl W { + #[doc = "Bit 0 - The RXD.PTR register has been copied to internal double-buffers. When the I2S module is started and RX is enabled, this event will be generated for every RXTXD.MAXCNT words that are received on the SDIN pin."] + #[inline(always)] + #[must_use] + pub fn events_rxptrupd(&mut self) -> EVENTS_RXPTRUPD_W<0> { + EVENTS_RXPTRUPD_W::new(self) + } + #[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 = "The RXD.PTR register has been copied to internal double-buffers. When the I2S module is started and RX is enabled, this event will be generated for every RXTXD.MAXCNT words that are received on the SDIN pin.\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 [events_rxptrupd](index.html) module"] +pub struct EVENTS_RXPTRUPD_SPEC; +impl crate::RegisterSpec for EVENTS_RXPTRUPD_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [events_rxptrupd::R](R) reader structure"] +impl crate::Readable for EVENTS_RXPTRUPD_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [events_rxptrupd::W](W) writer structure"] +impl crate::Writable for EVENTS_RXPTRUPD_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets EVENTS_RXPTRUPD to value 0"] +impl crate::Resettable for EVENTS_RXPTRUPD_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/i2s/events_stopped.rs b/down-the-stack/dk_pac/src/i2s/events_stopped.rs new file mode 100644 index 0000000..b1e81de --- /dev/null +++ b/down-the-stack/dk_pac/src/i2s/events_stopped.rs @@ -0,0 +1,127 @@ +#[doc = "Register `EVENTS_STOPPED` 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 `EVENTS_STOPPED` 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 `EVENTS_STOPPED` reader - I2S transfer stopped."] +pub type EVENTS_STOPPED_R = crate::BitReader; +#[doc = "I2S transfer stopped.\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum EVENTS_STOPPED_A { + #[doc = "0: Event not generated"] + NOT_GENERATED = 0, + #[doc = "1: Event generated"] + GENERATED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: EVENTS_STOPPED_A) -> Self { + variant as u8 != 0 + } +} +impl EVENTS_STOPPED_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> EVENTS_STOPPED_A { + match self.bits { + false => EVENTS_STOPPED_A::NOT_GENERATED, + true => EVENTS_STOPPED_A::GENERATED, + } + } + #[doc = "Checks if the value of the field is `NOT_GENERATED`"] + #[inline(always)] + pub fn is_not_generated(&self) -> bool { + *self == EVENTS_STOPPED_A::NOT_GENERATED + } + #[doc = "Checks if the value of the field is `GENERATED`"] + #[inline(always)] + pub fn is_generated(&self) -> bool { + *self == EVENTS_STOPPED_A::GENERATED + } +} +#[doc = "Field `EVENTS_STOPPED` writer - I2S transfer stopped."] +pub type EVENTS_STOPPED_W<'a, const O: u8> = + crate::BitWriter<'a, u32, EVENTS_STOPPED_SPEC, EVENTS_STOPPED_A, O>; +impl<'a, const O: u8> EVENTS_STOPPED_W<'a, O> { + #[doc = "Event not generated"] + #[inline(always)] + pub fn not_generated(self) -> &'a mut W { + self.variant(EVENTS_STOPPED_A::NOT_GENERATED) + } + #[doc = "Event generated"] + #[inline(always)] + pub fn generated(self) -> &'a mut W { + self.variant(EVENTS_STOPPED_A::GENERATED) + } +} +impl R { + #[doc = "Bit 0 - I2S transfer stopped."] + #[inline(always)] + pub fn events_stopped(&self) -> EVENTS_STOPPED_R { + EVENTS_STOPPED_R::new((self.bits & 1) != 0) + } +} +impl W { + #[doc = "Bit 0 - I2S transfer stopped."] + #[inline(always)] + #[must_use] + pub fn events_stopped(&mut self) -> EVENTS_STOPPED_W<0> { + EVENTS_STOPPED_W::new(self) + } + #[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 = "I2S transfer stopped.\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 [events_stopped](index.html) module"] +pub struct EVENTS_STOPPED_SPEC; +impl crate::RegisterSpec for EVENTS_STOPPED_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [events_stopped::R](R) reader structure"] +impl crate::Readable for EVENTS_STOPPED_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [events_stopped::W](W) writer structure"] +impl crate::Writable for EVENTS_STOPPED_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets EVENTS_STOPPED to value 0"] +impl crate::Resettable for EVENTS_STOPPED_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/i2s/events_txptrupd.rs b/down-the-stack/dk_pac/src/i2s/events_txptrupd.rs new file mode 100644 index 0000000..f049ac0 --- /dev/null +++ b/down-the-stack/dk_pac/src/i2s/events_txptrupd.rs @@ -0,0 +1,127 @@ +#[doc = "Register `EVENTS_TXPTRUPD` 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 `EVENTS_TXPTRUPD` 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 `EVENTS_TXPTRUPD` reader - The TDX.PTR register has been copied to internal double-buffers. When the I2S module is started and TX is enabled, this event will be generated for every RXTXD.MAXCNT words that are sent on the SDOUT pin."] +pub type EVENTS_TXPTRUPD_R = crate::BitReader; +#[doc = "The TDX.PTR register has been copied to internal double-buffers. When the I2S module is started and TX is enabled, this event will be generated for every RXTXD.MAXCNT words that are sent on the SDOUT pin.\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum EVENTS_TXPTRUPD_A { + #[doc = "0: Event not generated"] + NOT_GENERATED = 0, + #[doc = "1: Event generated"] + GENERATED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: EVENTS_TXPTRUPD_A) -> Self { + variant as u8 != 0 + } +} +impl EVENTS_TXPTRUPD_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> EVENTS_TXPTRUPD_A { + match self.bits { + false => EVENTS_TXPTRUPD_A::NOT_GENERATED, + true => EVENTS_TXPTRUPD_A::GENERATED, + } + } + #[doc = "Checks if the value of the field is `NOT_GENERATED`"] + #[inline(always)] + pub fn is_not_generated(&self) -> bool { + *self == EVENTS_TXPTRUPD_A::NOT_GENERATED + } + #[doc = "Checks if the value of the field is `GENERATED`"] + #[inline(always)] + pub fn is_generated(&self) -> bool { + *self == EVENTS_TXPTRUPD_A::GENERATED + } +} +#[doc = "Field `EVENTS_TXPTRUPD` writer - The TDX.PTR register has been copied to internal double-buffers. When the I2S module is started and TX is enabled, this event will be generated for every RXTXD.MAXCNT words that are sent on the SDOUT pin."] +pub type EVENTS_TXPTRUPD_W<'a, const O: u8> = + crate::BitWriter<'a, u32, EVENTS_TXPTRUPD_SPEC, EVENTS_TXPTRUPD_A, O>; +impl<'a, const O: u8> EVENTS_TXPTRUPD_W<'a, O> { + #[doc = "Event not generated"] + #[inline(always)] + pub fn not_generated(self) -> &'a mut W { + self.variant(EVENTS_TXPTRUPD_A::NOT_GENERATED) + } + #[doc = "Event generated"] + #[inline(always)] + pub fn generated(self) -> &'a mut W { + self.variant(EVENTS_TXPTRUPD_A::GENERATED) + } +} +impl R { + #[doc = "Bit 0 - The TDX.PTR register has been copied to internal double-buffers. When the I2S module is started and TX is enabled, this event will be generated for every RXTXD.MAXCNT words that are sent on the SDOUT pin."] + #[inline(always)] + pub fn events_txptrupd(&self) -> EVENTS_TXPTRUPD_R { + EVENTS_TXPTRUPD_R::new((self.bits & 1) != 0) + } +} +impl W { + #[doc = "Bit 0 - The TDX.PTR register has been copied to internal double-buffers. When the I2S module is started and TX is enabled, this event will be generated for every RXTXD.MAXCNT words that are sent on the SDOUT pin."] + #[inline(always)] + #[must_use] + pub fn events_txptrupd(&mut self) -> EVENTS_TXPTRUPD_W<0> { + EVENTS_TXPTRUPD_W::new(self) + } + #[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 = "The TDX.PTR register has been copied to internal double-buffers. When the I2S module is started and TX is enabled, this event will be generated for every RXTXD.MAXCNT words that are sent on the SDOUT pin.\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 [events_txptrupd](index.html) module"] +pub struct EVENTS_TXPTRUPD_SPEC; +impl crate::RegisterSpec for EVENTS_TXPTRUPD_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [events_txptrupd::R](R) reader structure"] +impl crate::Readable for EVENTS_TXPTRUPD_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [events_txptrupd::W](W) writer structure"] +impl crate::Writable for EVENTS_TXPTRUPD_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets EVENTS_TXPTRUPD to value 0"] +impl crate::Resettable for EVENTS_TXPTRUPD_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/i2s/inten.rs b/down-the-stack/dk_pac/src/i2s/inten.rs new file mode 100644 index 0000000..be54b72 --- /dev/null +++ b/down-the-stack/dk_pac/src/i2s/inten.rs @@ -0,0 +1,248 @@ +#[doc = "Register `INTEN` 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 `INTEN` 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 `RXPTRUPD` reader - Enable or disable interrupt for event RXPTRUPD"] +pub type RXPTRUPD_R = crate::BitReader; +#[doc = "Enable or disable interrupt for event RXPTRUPD\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum RXPTRUPD_A { + #[doc = "0: Disable"] + DISABLED = 0, + #[doc = "1: Enable"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: RXPTRUPD_A) -> Self { + variant as u8 != 0 + } +} +impl RXPTRUPD_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> RXPTRUPD_A { + match self.bits { + false => RXPTRUPD_A::DISABLED, + true => RXPTRUPD_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == RXPTRUPD_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == RXPTRUPD_A::ENABLED + } +} +#[doc = "Field `RXPTRUPD` writer - Enable or disable interrupt for event RXPTRUPD"] +pub type RXPTRUPD_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTEN_SPEC, RXPTRUPD_A, O>; +impl<'a, const O: u8> RXPTRUPD_W<'a, O> { + #[doc = "Disable"] + #[inline(always)] + pub fn disabled(self) -> &'a mut W { + self.variant(RXPTRUPD_A::DISABLED) + } + #[doc = "Enable"] + #[inline(always)] + pub fn enabled(self) -> &'a mut W { + self.variant(RXPTRUPD_A::ENABLED) + } +} +#[doc = "Field `STOPPED` reader - Enable or disable interrupt for event STOPPED"] +pub type STOPPED_R = crate::BitReader; +#[doc = "Enable or disable interrupt for event STOPPED\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum STOPPED_A { + #[doc = "0: Disable"] + DISABLED = 0, + #[doc = "1: Enable"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: STOPPED_A) -> Self { + variant as u8 != 0 + } +} +impl STOPPED_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> STOPPED_A { + match self.bits { + false => STOPPED_A::DISABLED, + true => STOPPED_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == STOPPED_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == STOPPED_A::ENABLED + } +} +#[doc = "Field `STOPPED` writer - Enable or disable interrupt for event STOPPED"] +pub type STOPPED_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTEN_SPEC, STOPPED_A, O>; +impl<'a, const O: u8> STOPPED_W<'a, O> { + #[doc = "Disable"] + #[inline(always)] + pub fn disabled(self) -> &'a mut W { + self.variant(STOPPED_A::DISABLED) + } + #[doc = "Enable"] + #[inline(always)] + pub fn enabled(self) -> &'a mut W { + self.variant(STOPPED_A::ENABLED) + } +} +#[doc = "Field `TXPTRUPD` reader - Enable or disable interrupt for event TXPTRUPD"] +pub type TXPTRUPD_R = crate::BitReader; +#[doc = "Enable or disable interrupt for event TXPTRUPD\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum TXPTRUPD_A { + #[doc = "0: Disable"] + DISABLED = 0, + #[doc = "1: Enable"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: TXPTRUPD_A) -> Self { + variant as u8 != 0 + } +} +impl TXPTRUPD_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> TXPTRUPD_A { + match self.bits { + false => TXPTRUPD_A::DISABLED, + true => TXPTRUPD_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == TXPTRUPD_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == TXPTRUPD_A::ENABLED + } +} +#[doc = "Field `TXPTRUPD` writer - Enable or disable interrupt for event TXPTRUPD"] +pub type TXPTRUPD_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTEN_SPEC, TXPTRUPD_A, O>; +impl<'a, const O: u8> TXPTRUPD_W<'a, O> { + #[doc = "Disable"] + #[inline(always)] + pub fn disabled(self) -> &'a mut W { + self.variant(TXPTRUPD_A::DISABLED) + } + #[doc = "Enable"] + #[inline(always)] + pub fn enabled(self) -> &'a mut W { + self.variant(TXPTRUPD_A::ENABLED) + } +} +impl R { + #[doc = "Bit 1 - Enable or disable interrupt for event RXPTRUPD"] + #[inline(always)] + pub fn rxptrupd(&self) -> RXPTRUPD_R { + RXPTRUPD_R::new(((self.bits >> 1) & 1) != 0) + } + #[doc = "Bit 2 - Enable or disable interrupt for event STOPPED"] + #[inline(always)] + pub fn stopped(&self) -> STOPPED_R { + STOPPED_R::new(((self.bits >> 2) & 1) != 0) + } + #[doc = "Bit 5 - Enable or disable interrupt for event TXPTRUPD"] + #[inline(always)] + pub fn txptrupd(&self) -> TXPTRUPD_R { + TXPTRUPD_R::new(((self.bits >> 5) & 1) != 0) + } +} +impl W { + #[doc = "Bit 1 - Enable or disable interrupt for event RXPTRUPD"] + #[inline(always)] + #[must_use] + pub fn rxptrupd(&mut self) -> RXPTRUPD_W<1> { + RXPTRUPD_W::new(self) + } + #[doc = "Bit 2 - Enable or disable interrupt for event STOPPED"] + #[inline(always)] + #[must_use] + pub fn stopped(&mut self) -> STOPPED_W<2> { + STOPPED_W::new(self) + } + #[doc = "Bit 5 - Enable or disable interrupt for event TXPTRUPD"] + #[inline(always)] + #[must_use] + pub fn txptrupd(&mut self) -> TXPTRUPD_W<5> { + TXPTRUPD_W::new(self) + } + #[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 = "Enable or disable interrupt\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 [inten](index.html) module"] +pub struct INTEN_SPEC; +impl crate::RegisterSpec for INTEN_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [inten::R](R) reader structure"] +impl crate::Readable for INTEN_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [inten::W](W) writer structure"] +impl crate::Writable for INTEN_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets INTEN to value 0"] +impl crate::Resettable for INTEN_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/i2s/intenclr.rs b/down-the-stack/dk_pac/src/i2s/intenclr.rs new file mode 100644 index 0000000..aad1d91 --- /dev/null +++ b/down-the-stack/dk_pac/src/i2s/intenclr.rs @@ -0,0 +1,269 @@ +#[doc = "Register `INTENCLR` 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 `INTENCLR` 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 `RXPTRUPD` reader - Write '1' to disable interrupt for event RXPTRUPD"] +pub type RXPTRUPD_R = crate::BitReader; +#[doc = "Write '1' to disable interrupt for event RXPTRUPD\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum RXPTRUPD_A { + #[doc = "0: Read: Disabled"] + DISABLED = 0, + #[doc = "1: Read: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: RXPTRUPD_A) -> Self { + variant as u8 != 0 + } +} +impl RXPTRUPD_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> RXPTRUPD_A { + match self.bits { + false => RXPTRUPD_A::DISABLED, + true => RXPTRUPD_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == RXPTRUPD_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == RXPTRUPD_A::ENABLED + } +} +#[doc = "Write '1' to disable interrupt for event RXPTRUPD\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum RXPTRUPD_AW { + #[doc = "1: Disable"] + CLEAR = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: RXPTRUPD_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `RXPTRUPD` writer - Write '1' to disable interrupt for event RXPTRUPD"] +pub type RXPTRUPD_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENCLR_SPEC, RXPTRUPD_AW, O>; +impl<'a, const O: u8> RXPTRUPD_W<'a, O> { + #[doc = "Disable"] + #[inline(always)] + pub fn clear(self) -> &'a mut W { + self.variant(RXPTRUPD_AW::CLEAR) + } +} +#[doc = "Field `STOPPED` reader - Write '1' to disable interrupt for event STOPPED"] +pub type STOPPED_R = crate::BitReader; +#[doc = "Write '1' to disable interrupt for event STOPPED\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum STOPPED_A { + #[doc = "0: Read: Disabled"] + DISABLED = 0, + #[doc = "1: Read: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: STOPPED_A) -> Self { + variant as u8 != 0 + } +} +impl STOPPED_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> STOPPED_A { + match self.bits { + false => STOPPED_A::DISABLED, + true => STOPPED_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == STOPPED_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == STOPPED_A::ENABLED + } +} +#[doc = "Write '1' to disable interrupt for event STOPPED\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum STOPPED_AW { + #[doc = "1: Disable"] + CLEAR = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: STOPPED_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `STOPPED` writer - Write '1' to disable interrupt for event STOPPED"] +pub type STOPPED_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENCLR_SPEC, STOPPED_AW, O>; +impl<'a, const O: u8> STOPPED_W<'a, O> { + #[doc = "Disable"] + #[inline(always)] + pub fn clear(self) -> &'a mut W { + self.variant(STOPPED_AW::CLEAR) + } +} +#[doc = "Field `TXPTRUPD` reader - Write '1' to disable interrupt for event TXPTRUPD"] +pub type TXPTRUPD_R = crate::BitReader; +#[doc = "Write '1' to disable interrupt for event TXPTRUPD\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum TXPTRUPD_A { + #[doc = "0: Read: Disabled"] + DISABLED = 0, + #[doc = "1: Read: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: TXPTRUPD_A) -> Self { + variant as u8 != 0 + } +} +impl TXPTRUPD_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> TXPTRUPD_A { + match self.bits { + false => TXPTRUPD_A::DISABLED, + true => TXPTRUPD_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == TXPTRUPD_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == TXPTRUPD_A::ENABLED + } +} +#[doc = "Write '1' to disable interrupt for event TXPTRUPD\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum TXPTRUPD_AW { + #[doc = "1: Disable"] + CLEAR = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: TXPTRUPD_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `TXPTRUPD` writer - Write '1' to disable interrupt for event TXPTRUPD"] +pub type TXPTRUPD_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENCLR_SPEC, TXPTRUPD_AW, O>; +impl<'a, const O: u8> TXPTRUPD_W<'a, O> { + #[doc = "Disable"] + #[inline(always)] + pub fn clear(self) -> &'a mut W { + self.variant(TXPTRUPD_AW::CLEAR) + } +} +impl R { + #[doc = "Bit 1 - Write '1' to disable interrupt for event RXPTRUPD"] + #[inline(always)] + pub fn rxptrupd(&self) -> RXPTRUPD_R { + RXPTRUPD_R::new(((self.bits >> 1) & 1) != 0) + } + #[doc = "Bit 2 - Write '1' to disable interrupt for event STOPPED"] + #[inline(always)] + pub fn stopped(&self) -> STOPPED_R { + STOPPED_R::new(((self.bits >> 2) & 1) != 0) + } + #[doc = "Bit 5 - Write '1' to disable interrupt for event TXPTRUPD"] + #[inline(always)] + pub fn txptrupd(&self) -> TXPTRUPD_R { + TXPTRUPD_R::new(((self.bits >> 5) & 1) != 0) + } +} +impl W { + #[doc = "Bit 1 - Write '1' to disable interrupt for event RXPTRUPD"] + #[inline(always)] + #[must_use] + pub fn rxptrupd(&mut self) -> RXPTRUPD_W<1> { + RXPTRUPD_W::new(self) + } + #[doc = "Bit 2 - Write '1' to disable interrupt for event STOPPED"] + #[inline(always)] + #[must_use] + pub fn stopped(&mut self) -> STOPPED_W<2> { + STOPPED_W::new(self) + } + #[doc = "Bit 5 - Write '1' to disable interrupt for event TXPTRUPD"] + #[inline(always)] + #[must_use] + pub fn txptrupd(&mut self) -> TXPTRUPD_W<5> { + TXPTRUPD_W::new(self) + } + #[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 = "Disable interrupt\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 [intenclr](index.html) module"] +pub struct INTENCLR_SPEC; +impl crate::RegisterSpec for INTENCLR_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [intenclr::R](R) reader structure"] +impl crate::Readable for INTENCLR_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [intenclr::W](W) writer structure"] +impl crate::Writable for INTENCLR_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets INTENCLR to value 0"] +impl crate::Resettable for INTENCLR_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/i2s/intenset.rs b/down-the-stack/dk_pac/src/i2s/intenset.rs new file mode 100644 index 0000000..3a9ed58 --- /dev/null +++ b/down-the-stack/dk_pac/src/i2s/intenset.rs @@ -0,0 +1,269 @@ +#[doc = "Register `INTENSET` 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 `INTENSET` 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 `RXPTRUPD` reader - Write '1' to enable interrupt for event RXPTRUPD"] +pub type RXPTRUPD_R = crate::BitReader; +#[doc = "Write '1' to enable interrupt for event RXPTRUPD\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum RXPTRUPD_A { + #[doc = "0: Read: Disabled"] + DISABLED = 0, + #[doc = "1: Read: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: RXPTRUPD_A) -> Self { + variant as u8 != 0 + } +} +impl RXPTRUPD_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> RXPTRUPD_A { + match self.bits { + false => RXPTRUPD_A::DISABLED, + true => RXPTRUPD_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == RXPTRUPD_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == RXPTRUPD_A::ENABLED + } +} +#[doc = "Write '1' to enable interrupt for event RXPTRUPD\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum RXPTRUPD_AW { + #[doc = "1: Enable"] + SET = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: RXPTRUPD_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `RXPTRUPD` writer - Write '1' to enable interrupt for event RXPTRUPD"] +pub type RXPTRUPD_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENSET_SPEC, RXPTRUPD_AW, O>; +impl<'a, const O: u8> RXPTRUPD_W<'a, O> { + #[doc = "Enable"] + #[inline(always)] + pub fn set(self) -> &'a mut W { + self.variant(RXPTRUPD_AW::SET) + } +} +#[doc = "Field `STOPPED` reader - Write '1' to enable interrupt for event STOPPED"] +pub type STOPPED_R = crate::BitReader; +#[doc = "Write '1' to enable interrupt for event STOPPED\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum STOPPED_A { + #[doc = "0: Read: Disabled"] + DISABLED = 0, + #[doc = "1: Read: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: STOPPED_A) -> Self { + variant as u8 != 0 + } +} +impl STOPPED_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> STOPPED_A { + match self.bits { + false => STOPPED_A::DISABLED, + true => STOPPED_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == STOPPED_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == STOPPED_A::ENABLED + } +} +#[doc = "Write '1' to enable interrupt for event STOPPED\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum STOPPED_AW { + #[doc = "1: Enable"] + SET = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: STOPPED_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `STOPPED` writer - Write '1' to enable interrupt for event STOPPED"] +pub type STOPPED_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENSET_SPEC, STOPPED_AW, O>; +impl<'a, const O: u8> STOPPED_W<'a, O> { + #[doc = "Enable"] + #[inline(always)] + pub fn set(self) -> &'a mut W { + self.variant(STOPPED_AW::SET) + } +} +#[doc = "Field `TXPTRUPD` reader - Write '1' to enable interrupt for event TXPTRUPD"] +pub type TXPTRUPD_R = crate::BitReader; +#[doc = "Write '1' to enable interrupt for event TXPTRUPD\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum TXPTRUPD_A { + #[doc = "0: Read: Disabled"] + DISABLED = 0, + #[doc = "1: Read: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: TXPTRUPD_A) -> Self { + variant as u8 != 0 + } +} +impl TXPTRUPD_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> TXPTRUPD_A { + match self.bits { + false => TXPTRUPD_A::DISABLED, + true => TXPTRUPD_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == TXPTRUPD_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == TXPTRUPD_A::ENABLED + } +} +#[doc = "Write '1' to enable interrupt for event TXPTRUPD\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum TXPTRUPD_AW { + #[doc = "1: Enable"] + SET = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: TXPTRUPD_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `TXPTRUPD` writer - Write '1' to enable interrupt for event TXPTRUPD"] +pub type TXPTRUPD_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENSET_SPEC, TXPTRUPD_AW, O>; +impl<'a, const O: u8> TXPTRUPD_W<'a, O> { + #[doc = "Enable"] + #[inline(always)] + pub fn set(self) -> &'a mut W { + self.variant(TXPTRUPD_AW::SET) + } +} +impl R { + #[doc = "Bit 1 - Write '1' to enable interrupt for event RXPTRUPD"] + #[inline(always)] + pub fn rxptrupd(&self) -> RXPTRUPD_R { + RXPTRUPD_R::new(((self.bits >> 1) & 1) != 0) + } + #[doc = "Bit 2 - Write '1' to enable interrupt for event STOPPED"] + #[inline(always)] + pub fn stopped(&self) -> STOPPED_R { + STOPPED_R::new(((self.bits >> 2) & 1) != 0) + } + #[doc = "Bit 5 - Write '1' to enable interrupt for event TXPTRUPD"] + #[inline(always)] + pub fn txptrupd(&self) -> TXPTRUPD_R { + TXPTRUPD_R::new(((self.bits >> 5) & 1) != 0) + } +} +impl W { + #[doc = "Bit 1 - Write '1' to enable interrupt for event RXPTRUPD"] + #[inline(always)] + #[must_use] + pub fn rxptrupd(&mut self) -> RXPTRUPD_W<1> { + RXPTRUPD_W::new(self) + } + #[doc = "Bit 2 - Write '1' to enable interrupt for event STOPPED"] + #[inline(always)] + #[must_use] + pub fn stopped(&mut self) -> STOPPED_W<2> { + STOPPED_W::new(self) + } + #[doc = "Bit 5 - Write '1' to enable interrupt for event TXPTRUPD"] + #[inline(always)] + #[must_use] + pub fn txptrupd(&mut self) -> TXPTRUPD_W<5> { + TXPTRUPD_W::new(self) + } + #[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 = "Enable interrupt\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 [intenset](index.html) module"] +pub struct INTENSET_SPEC; +impl crate::RegisterSpec for INTENSET_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [intenset::R](R) reader structure"] +impl crate::Readable for INTENSET_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [intenset::W](W) writer structure"] +impl crate::Writable for INTENSET_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets INTENSET to value 0"] +impl crate::Resettable for INTENSET_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/i2s/psel.rs b/down-the-stack/dk_pac/src/i2s/psel.rs new file mode 100644 index 0000000..b36fccf --- /dev/null +++ b/down-the-stack/dk_pac/src/i2s/psel.rs @@ -0,0 +1,34 @@ +#[doc = r"Register block"] +#[repr(C)] +pub struct PSEL { + #[doc = "0x00 - Pin select for MCK signal."] + pub mck: MCK, + #[doc = "0x04 - Pin select for SCK signal."] + pub sck: SCK, + #[doc = "0x08 - Pin select for LRCK signal."] + pub lrck: LRCK, + #[doc = "0x0c - Pin select for SDIN signal."] + pub sdin: SDIN, + #[doc = "0x10 - Pin select for SDOUT signal."] + pub sdout: SDOUT, +} +#[doc = "MCK (rw) register accessor: an alias for `Reg`"] +pub type MCK = crate::Reg; +#[doc = "Pin select for MCK signal."] +pub mod mck; +#[doc = "SCK (rw) register accessor: an alias for `Reg`"] +pub type SCK = crate::Reg; +#[doc = "Pin select for SCK signal."] +pub mod sck; +#[doc = "LRCK (rw) register accessor: an alias for `Reg`"] +pub type LRCK = crate::Reg; +#[doc = "Pin select for LRCK signal."] +pub mod lrck; +#[doc = "SDIN (rw) register accessor: an alias for `Reg`"] +pub type SDIN = crate::Reg; +#[doc = "Pin select for SDIN signal."] +pub mod sdin; +#[doc = "SDOUT (rw) register accessor: an alias for `Reg`"] +pub type SDOUT = crate::Reg; +#[doc = "Pin select for SDOUT signal."] +pub mod sdout; diff --git a/down-the-stack/dk_pac/src/i2s/psel/lrck.rs b/down-the-stack/dk_pac/src/i2s/psel/lrck.rs new file mode 100644 index 0000000..9fcf428 --- /dev/null +++ b/down-the-stack/dk_pac/src/i2s/psel/lrck.rs @@ -0,0 +1,141 @@ +#[doc = "Register `LRCK` 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 `LRCK` 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 `PIN` reader - Pin number"] +pub type PIN_R = crate::FieldReader; +#[doc = "Field `PIN` writer - Pin number"] +pub type PIN_W<'a, const O: u8> = crate::FieldWriter<'a, u32, LRCK_SPEC, u8, u8, 5, O>; +#[doc = "Field `CONNECT` reader - Connection"] +pub type CONNECT_R = crate::BitReader; +#[doc = "Connection\n\nValue on reset: 1"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum CONNECT_A { + #[doc = "1: Disconnect"] + DISCONNECTED = 1, + #[doc = "0: Connect"] + CONNECTED = 0, +} +impl From for bool { + #[inline(always)] + fn from(variant: CONNECT_A) -> Self { + variant as u8 != 0 + } +} +impl CONNECT_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> CONNECT_A { + match self.bits { + true => CONNECT_A::DISCONNECTED, + false => CONNECT_A::CONNECTED, + } + } + #[doc = "Checks if the value of the field is `DISCONNECTED`"] + #[inline(always)] + pub fn is_disconnected(&self) -> bool { + *self == CONNECT_A::DISCONNECTED + } + #[doc = "Checks if the value of the field is `CONNECTED`"] + #[inline(always)] + pub fn is_connected(&self) -> bool { + *self == CONNECT_A::CONNECTED + } +} +#[doc = "Field `CONNECT` writer - Connection"] +pub type CONNECT_W<'a, const O: u8> = crate::BitWriter<'a, u32, LRCK_SPEC, CONNECT_A, O>; +impl<'a, const O: u8> CONNECT_W<'a, O> { + #[doc = "Disconnect"] + #[inline(always)] + pub fn disconnected(self) -> &'a mut W { + self.variant(CONNECT_A::DISCONNECTED) + } + #[doc = "Connect"] + #[inline(always)] + pub fn connected(self) -> &'a mut W { + self.variant(CONNECT_A::CONNECTED) + } +} +impl R { + #[doc = "Bits 0:4 - Pin number"] + #[inline(always)] + pub fn pin(&self) -> PIN_R { + PIN_R::new((self.bits & 0x1f) as u8) + } + #[doc = "Bit 31 - Connection"] + #[inline(always)] + pub fn connect(&self) -> CONNECT_R { + CONNECT_R::new(((self.bits >> 31) & 1) != 0) + } +} +impl W { + #[doc = "Bits 0:4 - Pin number"] + #[inline(always)] + #[must_use] + pub fn pin(&mut self) -> PIN_W<0> { + PIN_W::new(self) + } + #[doc = "Bit 31 - Connection"] + #[inline(always)] + #[must_use] + pub fn connect(&mut self) -> CONNECT_W<31> { + CONNECT_W::new(self) + } + #[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 = "Pin select for LRCK signal.\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 [lrck](index.html) module"] +pub struct LRCK_SPEC; +impl crate::RegisterSpec for LRCK_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [lrck::R](R) reader structure"] +impl crate::Readable for LRCK_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [lrck::W](W) writer structure"] +impl crate::Writable for LRCK_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets LRCK to value 0xffff_ffff"] +impl crate::Resettable for LRCK_SPEC { + const RESET_VALUE: Self::Ux = 0xffff_ffff; +} diff --git a/down-the-stack/dk_pac/src/i2s/psel/mck.rs b/down-the-stack/dk_pac/src/i2s/psel/mck.rs new file mode 100644 index 0000000..40b43b2 --- /dev/null +++ b/down-the-stack/dk_pac/src/i2s/psel/mck.rs @@ -0,0 +1,141 @@ +#[doc = "Register `MCK` 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 `MCK` 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 `PIN` reader - Pin number"] +pub type PIN_R = crate::FieldReader; +#[doc = "Field `PIN` writer - Pin number"] +pub type PIN_W<'a, const O: u8> = crate::FieldWriter<'a, u32, MCK_SPEC, u8, u8, 5, O>; +#[doc = "Field `CONNECT` reader - Connection"] +pub type CONNECT_R = crate::BitReader; +#[doc = "Connection\n\nValue on reset: 1"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum CONNECT_A { + #[doc = "1: Disconnect"] + DISCONNECTED = 1, + #[doc = "0: Connect"] + CONNECTED = 0, +} +impl From for bool { + #[inline(always)] + fn from(variant: CONNECT_A) -> Self { + variant as u8 != 0 + } +} +impl CONNECT_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> CONNECT_A { + match self.bits { + true => CONNECT_A::DISCONNECTED, + false => CONNECT_A::CONNECTED, + } + } + #[doc = "Checks if the value of the field is `DISCONNECTED`"] + #[inline(always)] + pub fn is_disconnected(&self) -> bool { + *self == CONNECT_A::DISCONNECTED + } + #[doc = "Checks if the value of the field is `CONNECTED`"] + #[inline(always)] + pub fn is_connected(&self) -> bool { + *self == CONNECT_A::CONNECTED + } +} +#[doc = "Field `CONNECT` writer - Connection"] +pub type CONNECT_W<'a, const O: u8> = crate::BitWriter<'a, u32, MCK_SPEC, CONNECT_A, O>; +impl<'a, const O: u8> CONNECT_W<'a, O> { + #[doc = "Disconnect"] + #[inline(always)] + pub fn disconnected(self) -> &'a mut W { + self.variant(CONNECT_A::DISCONNECTED) + } + #[doc = "Connect"] + #[inline(always)] + pub fn connected(self) -> &'a mut W { + self.variant(CONNECT_A::CONNECTED) + } +} +impl R { + #[doc = "Bits 0:4 - Pin number"] + #[inline(always)] + pub fn pin(&self) -> PIN_R { + PIN_R::new((self.bits & 0x1f) as u8) + } + #[doc = "Bit 31 - Connection"] + #[inline(always)] + pub fn connect(&self) -> CONNECT_R { + CONNECT_R::new(((self.bits >> 31) & 1) != 0) + } +} +impl W { + #[doc = "Bits 0:4 - Pin number"] + #[inline(always)] + #[must_use] + pub fn pin(&mut self) -> PIN_W<0> { + PIN_W::new(self) + } + #[doc = "Bit 31 - Connection"] + #[inline(always)] + #[must_use] + pub fn connect(&mut self) -> CONNECT_W<31> { + CONNECT_W::new(self) + } + #[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 = "Pin select for MCK signal.\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 [mck](index.html) module"] +pub struct MCK_SPEC; +impl crate::RegisterSpec for MCK_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [mck::R](R) reader structure"] +impl crate::Readable for MCK_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [mck::W](W) writer structure"] +impl crate::Writable for MCK_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets MCK to value 0xffff_ffff"] +impl crate::Resettable for MCK_SPEC { + const RESET_VALUE: Self::Ux = 0xffff_ffff; +} diff --git a/down-the-stack/dk_pac/src/i2s/psel/sck.rs b/down-the-stack/dk_pac/src/i2s/psel/sck.rs new file mode 100644 index 0000000..89689a3 --- /dev/null +++ b/down-the-stack/dk_pac/src/i2s/psel/sck.rs @@ -0,0 +1,141 @@ +#[doc = "Register `SCK` 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 `SCK` 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 `PIN` reader - Pin number"] +pub type PIN_R = crate::FieldReader; +#[doc = "Field `PIN` writer - Pin number"] +pub type PIN_W<'a, const O: u8> = crate::FieldWriter<'a, u32, SCK_SPEC, u8, u8, 5, O>; +#[doc = "Field `CONNECT` reader - Connection"] +pub type CONNECT_R = crate::BitReader; +#[doc = "Connection\n\nValue on reset: 1"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum CONNECT_A { + #[doc = "1: Disconnect"] + DISCONNECTED = 1, + #[doc = "0: Connect"] + CONNECTED = 0, +} +impl From for bool { + #[inline(always)] + fn from(variant: CONNECT_A) -> Self { + variant as u8 != 0 + } +} +impl CONNECT_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> CONNECT_A { + match self.bits { + true => CONNECT_A::DISCONNECTED, + false => CONNECT_A::CONNECTED, + } + } + #[doc = "Checks if the value of the field is `DISCONNECTED`"] + #[inline(always)] + pub fn is_disconnected(&self) -> bool { + *self == CONNECT_A::DISCONNECTED + } + #[doc = "Checks if the value of the field is `CONNECTED`"] + #[inline(always)] + pub fn is_connected(&self) -> bool { + *self == CONNECT_A::CONNECTED + } +} +#[doc = "Field `CONNECT` writer - Connection"] +pub type CONNECT_W<'a, const O: u8> = crate::BitWriter<'a, u32, SCK_SPEC, CONNECT_A, O>; +impl<'a, const O: u8> CONNECT_W<'a, O> { + #[doc = "Disconnect"] + #[inline(always)] + pub fn disconnected(self) -> &'a mut W { + self.variant(CONNECT_A::DISCONNECTED) + } + #[doc = "Connect"] + #[inline(always)] + pub fn connected(self) -> &'a mut W { + self.variant(CONNECT_A::CONNECTED) + } +} +impl R { + #[doc = "Bits 0:4 - Pin number"] + #[inline(always)] + pub fn pin(&self) -> PIN_R { + PIN_R::new((self.bits & 0x1f) as u8) + } + #[doc = "Bit 31 - Connection"] + #[inline(always)] + pub fn connect(&self) -> CONNECT_R { + CONNECT_R::new(((self.bits >> 31) & 1) != 0) + } +} +impl W { + #[doc = "Bits 0:4 - Pin number"] + #[inline(always)] + #[must_use] + pub fn pin(&mut self) -> PIN_W<0> { + PIN_W::new(self) + } + #[doc = "Bit 31 - Connection"] + #[inline(always)] + #[must_use] + pub fn connect(&mut self) -> CONNECT_W<31> { + CONNECT_W::new(self) + } + #[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 = "Pin select for SCK signal.\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 [sck](index.html) module"] +pub struct SCK_SPEC; +impl crate::RegisterSpec for SCK_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [sck::R](R) reader structure"] +impl crate::Readable for SCK_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [sck::W](W) writer structure"] +impl crate::Writable for SCK_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets SCK to value 0xffff_ffff"] +impl crate::Resettable for SCK_SPEC { + const RESET_VALUE: Self::Ux = 0xffff_ffff; +} diff --git a/down-the-stack/dk_pac/src/i2s/psel/sdin.rs b/down-the-stack/dk_pac/src/i2s/psel/sdin.rs new file mode 100644 index 0000000..29c868b --- /dev/null +++ b/down-the-stack/dk_pac/src/i2s/psel/sdin.rs @@ -0,0 +1,141 @@ +#[doc = "Register `SDIN` 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 `SDIN` 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 `PIN` reader - Pin number"] +pub type PIN_R = crate::FieldReader; +#[doc = "Field `PIN` writer - Pin number"] +pub type PIN_W<'a, const O: u8> = crate::FieldWriter<'a, u32, SDIN_SPEC, u8, u8, 5, O>; +#[doc = "Field `CONNECT` reader - Connection"] +pub type CONNECT_R = crate::BitReader; +#[doc = "Connection\n\nValue on reset: 1"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum CONNECT_A { + #[doc = "1: Disconnect"] + DISCONNECTED = 1, + #[doc = "0: Connect"] + CONNECTED = 0, +} +impl From for bool { + #[inline(always)] + fn from(variant: CONNECT_A) -> Self { + variant as u8 != 0 + } +} +impl CONNECT_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> CONNECT_A { + match self.bits { + true => CONNECT_A::DISCONNECTED, + false => CONNECT_A::CONNECTED, + } + } + #[doc = "Checks if the value of the field is `DISCONNECTED`"] + #[inline(always)] + pub fn is_disconnected(&self) -> bool { + *self == CONNECT_A::DISCONNECTED + } + #[doc = "Checks if the value of the field is `CONNECTED`"] + #[inline(always)] + pub fn is_connected(&self) -> bool { + *self == CONNECT_A::CONNECTED + } +} +#[doc = "Field `CONNECT` writer - Connection"] +pub type CONNECT_W<'a, const O: u8> = crate::BitWriter<'a, u32, SDIN_SPEC, CONNECT_A, O>; +impl<'a, const O: u8> CONNECT_W<'a, O> { + #[doc = "Disconnect"] + #[inline(always)] + pub fn disconnected(self) -> &'a mut W { + self.variant(CONNECT_A::DISCONNECTED) + } + #[doc = "Connect"] + #[inline(always)] + pub fn connected(self) -> &'a mut W { + self.variant(CONNECT_A::CONNECTED) + } +} +impl R { + #[doc = "Bits 0:4 - Pin number"] + #[inline(always)] + pub fn pin(&self) -> PIN_R { + PIN_R::new((self.bits & 0x1f) as u8) + } + #[doc = "Bit 31 - Connection"] + #[inline(always)] + pub fn connect(&self) -> CONNECT_R { + CONNECT_R::new(((self.bits >> 31) & 1) != 0) + } +} +impl W { + #[doc = "Bits 0:4 - Pin number"] + #[inline(always)] + #[must_use] + pub fn pin(&mut self) -> PIN_W<0> { + PIN_W::new(self) + } + #[doc = "Bit 31 - Connection"] + #[inline(always)] + #[must_use] + pub fn connect(&mut self) -> CONNECT_W<31> { + CONNECT_W::new(self) + } + #[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 = "Pin select for SDIN signal.\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 [sdin](index.html) module"] +pub struct SDIN_SPEC; +impl crate::RegisterSpec for SDIN_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [sdin::R](R) reader structure"] +impl crate::Readable for SDIN_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [sdin::W](W) writer structure"] +impl crate::Writable for SDIN_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets SDIN to value 0xffff_ffff"] +impl crate::Resettable for SDIN_SPEC { + const RESET_VALUE: Self::Ux = 0xffff_ffff; +} diff --git a/down-the-stack/dk_pac/src/i2s/psel/sdout.rs b/down-the-stack/dk_pac/src/i2s/psel/sdout.rs new file mode 100644 index 0000000..c81a05c --- /dev/null +++ b/down-the-stack/dk_pac/src/i2s/psel/sdout.rs @@ -0,0 +1,141 @@ +#[doc = "Register `SDOUT` 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 `SDOUT` 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 `PIN` reader - Pin number"] +pub type PIN_R = crate::FieldReader; +#[doc = "Field `PIN` writer - Pin number"] +pub type PIN_W<'a, const O: u8> = crate::FieldWriter<'a, u32, SDOUT_SPEC, u8, u8, 5, O>; +#[doc = "Field `CONNECT` reader - Connection"] +pub type CONNECT_R = crate::BitReader; +#[doc = "Connection\n\nValue on reset: 1"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum CONNECT_A { + #[doc = "1: Disconnect"] + DISCONNECTED = 1, + #[doc = "0: Connect"] + CONNECTED = 0, +} +impl From for bool { + #[inline(always)] + fn from(variant: CONNECT_A) -> Self { + variant as u8 != 0 + } +} +impl CONNECT_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> CONNECT_A { + match self.bits { + true => CONNECT_A::DISCONNECTED, + false => CONNECT_A::CONNECTED, + } + } + #[doc = "Checks if the value of the field is `DISCONNECTED`"] + #[inline(always)] + pub fn is_disconnected(&self) -> bool { + *self == CONNECT_A::DISCONNECTED + } + #[doc = "Checks if the value of the field is `CONNECTED`"] + #[inline(always)] + pub fn is_connected(&self) -> bool { + *self == CONNECT_A::CONNECTED + } +} +#[doc = "Field `CONNECT` writer - Connection"] +pub type CONNECT_W<'a, const O: u8> = crate::BitWriter<'a, u32, SDOUT_SPEC, CONNECT_A, O>; +impl<'a, const O: u8> CONNECT_W<'a, O> { + #[doc = "Disconnect"] + #[inline(always)] + pub fn disconnected(self) -> &'a mut W { + self.variant(CONNECT_A::DISCONNECTED) + } + #[doc = "Connect"] + #[inline(always)] + pub fn connected(self) -> &'a mut W { + self.variant(CONNECT_A::CONNECTED) + } +} +impl R { + #[doc = "Bits 0:4 - Pin number"] + #[inline(always)] + pub fn pin(&self) -> PIN_R { + PIN_R::new((self.bits & 0x1f) as u8) + } + #[doc = "Bit 31 - Connection"] + #[inline(always)] + pub fn connect(&self) -> CONNECT_R { + CONNECT_R::new(((self.bits >> 31) & 1) != 0) + } +} +impl W { + #[doc = "Bits 0:4 - Pin number"] + #[inline(always)] + #[must_use] + pub fn pin(&mut self) -> PIN_W<0> { + PIN_W::new(self) + } + #[doc = "Bit 31 - Connection"] + #[inline(always)] + #[must_use] + pub fn connect(&mut self) -> CONNECT_W<31> { + CONNECT_W::new(self) + } + #[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 = "Pin select for SDOUT signal.\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 [sdout](index.html) module"] +pub struct SDOUT_SPEC; +impl crate::RegisterSpec for SDOUT_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [sdout::R](R) reader structure"] +impl crate::Readable for SDOUT_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [sdout::W](W) writer structure"] +impl crate::Writable for SDOUT_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets SDOUT to value 0xffff_ffff"] +impl crate::Resettable for SDOUT_SPEC { + const RESET_VALUE: Self::Ux = 0xffff_ffff; +} diff --git a/down-the-stack/dk_pac/src/i2s/rxd.rs b/down-the-stack/dk_pac/src/i2s/rxd.rs new file mode 100644 index 0000000..56ceed6 --- /dev/null +++ b/down-the-stack/dk_pac/src/i2s/rxd.rs @@ -0,0 +1,10 @@ +#[doc = r"Register block"] +#[repr(C)] +pub struct RXD { + #[doc = "0x00 - Receive buffer RAM start address."] + pub ptr: PTR, +} +#[doc = "PTR (rw) register accessor: an alias for `Reg`"] +pub type PTR = crate::Reg; +#[doc = "Receive buffer RAM start address."] +pub mod ptr; diff --git a/down-the-stack/dk_pac/src/i2s/rxd/ptr.rs b/down-the-stack/dk_pac/src/i2s/rxd/ptr.rs new file mode 100644 index 0000000..db6dac7 --- /dev/null +++ b/down-the-stack/dk_pac/src/i2s/rxd/ptr.rs @@ -0,0 +1,80 @@ +#[doc = "Register `PTR` 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 `PTR` 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 `PTR` reader - Receive buffer Data RAM start address. When receiving, words containing samples will be written to this address. This address is a word aligned Data RAM address."] +pub type PTR_R = crate::FieldReader; +#[doc = "Field `PTR` writer - Receive buffer Data RAM start address. When receiving, words containing samples will be written to this address. This address is a word aligned Data RAM address."] +pub type PTR_W<'a, const O: u8> = crate::FieldWriter<'a, u32, PTR_SPEC, u32, u32, 32, O>; +impl R { + #[doc = "Bits 0:31 - Receive buffer Data RAM start address. When receiving, words containing samples will be written to this address. This address is a word aligned Data RAM address."] + #[inline(always)] + pub fn ptr(&self) -> PTR_R { + PTR_R::new(self.bits) + } +} +impl W { + #[doc = "Bits 0:31 - Receive buffer Data RAM start address. When receiving, words containing samples will be written to this address. This address is a word aligned Data RAM address."] + #[inline(always)] + #[must_use] + pub fn ptr(&mut self) -> PTR_W<0> { + PTR_W::new(self) + } + #[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 = "Receive buffer RAM start address.\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 [ptr](index.html) module"] +pub struct PTR_SPEC; +impl crate::RegisterSpec for PTR_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [ptr::R](R) reader structure"] +impl crate::Readable for PTR_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [ptr::W](W) writer structure"] +impl crate::Writable for PTR_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets PTR to value 0"] +impl crate::Resettable for PTR_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/i2s/rxtxd.rs b/down-the-stack/dk_pac/src/i2s/rxtxd.rs new file mode 100644 index 0000000..8f4bd2b --- /dev/null +++ b/down-the-stack/dk_pac/src/i2s/rxtxd.rs @@ -0,0 +1,10 @@ +#[doc = r"Register block"] +#[repr(C)] +pub struct RXTXD { + #[doc = "0x00 - Size of RXD and TXD buffers."] + pub maxcnt: MAXCNT, +} +#[doc = "MAXCNT (rw) register accessor: an alias for `Reg`"] +pub type MAXCNT = crate::Reg; +#[doc = "Size of RXD and TXD buffers."] +pub mod maxcnt; diff --git a/down-the-stack/dk_pac/src/i2s/rxtxd/maxcnt.rs b/down-the-stack/dk_pac/src/i2s/rxtxd/maxcnt.rs new file mode 100644 index 0000000..687f90c --- /dev/null +++ b/down-the-stack/dk_pac/src/i2s/rxtxd/maxcnt.rs @@ -0,0 +1,80 @@ +#[doc = "Register `MAXCNT` 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 `MAXCNT` 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 `MAXCNT` reader - Size of RXD and TXD buffers in number of 32 bit words."] +pub type MAXCNT_R = crate::FieldReader; +#[doc = "Field `MAXCNT` writer - Size of RXD and TXD buffers in number of 32 bit words."] +pub type MAXCNT_W<'a, const O: u8> = crate::FieldWriter<'a, u32, MAXCNT_SPEC, u16, u16, 14, O>; +impl R { + #[doc = "Bits 0:13 - Size of RXD and TXD buffers in number of 32 bit words."] + #[inline(always)] + pub fn maxcnt(&self) -> MAXCNT_R { + MAXCNT_R::new((self.bits & 0x3fff) as u16) + } +} +impl W { + #[doc = "Bits 0:13 - Size of RXD and TXD buffers in number of 32 bit words."] + #[inline(always)] + #[must_use] + pub fn maxcnt(&mut self) -> MAXCNT_W<0> { + MAXCNT_W::new(self) + } + #[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 = "Size of RXD and TXD buffers.\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 [maxcnt](index.html) module"] +pub struct MAXCNT_SPEC; +impl crate::RegisterSpec for MAXCNT_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [maxcnt::R](R) reader structure"] +impl crate::Readable for MAXCNT_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [maxcnt::W](W) writer structure"] +impl crate::Writable for MAXCNT_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets MAXCNT to value 0"] +impl crate::Resettable for MAXCNT_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/i2s/tasks_start.rs b/down-the-stack/dk_pac/src/i2s/tasks_start.rs new file mode 100644 index 0000000..280ea95 --- /dev/null +++ b/down-the-stack/dk_pac/src/i2s/tasks_start.rs @@ -0,0 +1,72 @@ +#[doc = "Register `TASKS_START` 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 = "Starts continuous I2S transfer. Also starts MCK generator when this is enabled.\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum TASKS_START_AW { + #[doc = "1: Trigger task"] + TRIGGER = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: TASKS_START_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `TASKS_START` writer - Starts continuous I2S transfer. Also starts MCK generator when this is enabled."] +pub type TASKS_START_W<'a, const O: u8> = + crate::BitWriter<'a, u32, TASKS_START_SPEC, TASKS_START_AW, O>; +impl<'a, const O: u8> TASKS_START_W<'a, O> { + #[doc = "Trigger task"] + #[inline(always)] + pub fn trigger(self) -> &'a mut W { + self.variant(TASKS_START_AW::TRIGGER) + } +} +impl W { + #[doc = "Bit 0 - Starts continuous I2S transfer. Also starts MCK generator when this is enabled."] + #[inline(always)] + #[must_use] + pub fn tasks_start(&mut self) -> TASKS_START_W<0> { + TASKS_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 + } +} +#[doc = "Starts continuous I2S transfer. Also starts MCK generator when this is enabled.\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 [tasks_start](index.html) module"] +pub struct TASKS_START_SPEC; +impl crate::RegisterSpec for TASKS_START_SPEC { + type Ux = u32; +} +#[doc = "`write(|w| ..)` method takes [tasks_start::W](W) writer structure"] +impl crate::Writable for TASKS_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 TASKS_START to value 0"] +impl crate::Resettable for TASKS_START_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/i2s/tasks_stop.rs b/down-the-stack/dk_pac/src/i2s/tasks_stop.rs new file mode 100644 index 0000000..5f4560c --- /dev/null +++ b/down-the-stack/dk_pac/src/i2s/tasks_stop.rs @@ -0,0 +1,72 @@ +#[doc = "Register `TASKS_STOP` 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 = "Stops I2S transfer. Also stops MCK generator. Triggering this task will cause the {event:STOPPED} event to be generated.\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum TASKS_STOP_AW { + #[doc = "1: Trigger task"] + TRIGGER = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: TASKS_STOP_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `TASKS_STOP` writer - Stops I2S transfer. Also stops MCK generator. Triggering this task will cause the {event:STOPPED} event to be generated."] +pub type TASKS_STOP_W<'a, const O: u8> = + crate::BitWriter<'a, u32, TASKS_STOP_SPEC, TASKS_STOP_AW, O>; +impl<'a, const O: u8> TASKS_STOP_W<'a, O> { + #[doc = "Trigger task"] + #[inline(always)] + pub fn trigger(self) -> &'a mut W { + self.variant(TASKS_STOP_AW::TRIGGER) + } +} +impl W { + #[doc = "Bit 0 - Stops I2S transfer. Also stops MCK generator. Triggering this task will cause the {event:STOPPED} event to be generated."] + #[inline(always)] + #[must_use] + pub fn tasks_stop(&mut self) -> TASKS_STOP_W<0> { + TASKS_STOP_W::new(self) + } + #[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 = "Stops I2S transfer. Also stops MCK generator. Triggering this task will cause the {event:STOPPED} event to be generated.\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 [tasks_stop](index.html) module"] +pub struct TASKS_STOP_SPEC; +impl crate::RegisterSpec for TASKS_STOP_SPEC { + type Ux = u32; +} +#[doc = "`write(|w| ..)` method takes [tasks_stop::W](W) writer structure"] +impl crate::Writable for TASKS_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 TASKS_STOP to value 0"] +impl crate::Resettable for TASKS_STOP_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/i2s/txd.rs b/down-the-stack/dk_pac/src/i2s/txd.rs new file mode 100644 index 0000000..9abfe8c --- /dev/null +++ b/down-the-stack/dk_pac/src/i2s/txd.rs @@ -0,0 +1,10 @@ +#[doc = r"Register block"] +#[repr(C)] +pub struct TXD { + #[doc = "0x00 - Transmit buffer RAM start address."] + pub ptr: PTR, +} +#[doc = "PTR (rw) register accessor: an alias for `Reg`"] +pub type PTR = crate::Reg; +#[doc = "Transmit buffer RAM start address."] +pub mod ptr; diff --git a/down-the-stack/dk_pac/src/i2s/txd/ptr.rs b/down-the-stack/dk_pac/src/i2s/txd/ptr.rs new file mode 100644 index 0000000..a7b8dbe --- /dev/null +++ b/down-the-stack/dk_pac/src/i2s/txd/ptr.rs @@ -0,0 +1,80 @@ +#[doc = "Register `PTR` 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 `PTR` 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 `PTR` reader - Transmit buffer Data RAM start address. When transmitting, words containing samples will be fetched from this address. This address is a word aligned Data RAM address."] +pub type PTR_R = crate::FieldReader; +#[doc = "Field `PTR` writer - Transmit buffer Data RAM start address. When transmitting, words containing samples will be fetched from this address. This address is a word aligned Data RAM address."] +pub type PTR_W<'a, const O: u8> = crate::FieldWriter<'a, u32, PTR_SPEC, u32, u32, 32, O>; +impl R { + #[doc = "Bits 0:31 - Transmit buffer Data RAM start address. When transmitting, words containing samples will be fetched from this address. This address is a word aligned Data RAM address."] + #[inline(always)] + pub fn ptr(&self) -> PTR_R { + PTR_R::new(self.bits) + } +} +impl W { + #[doc = "Bits 0:31 - Transmit buffer Data RAM start address. When transmitting, words containing samples will be fetched from this address. This address is a word aligned Data RAM address."] + #[inline(always)] + #[must_use] + pub fn ptr(&mut self) -> PTR_W<0> { + PTR_W::new(self) + } + #[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 = "Transmit buffer RAM start address.\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 [ptr](index.html) module"] +pub struct PTR_SPEC; +impl crate::RegisterSpec for PTR_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [ptr::R](R) reader structure"] +impl crate::Readable for PTR_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [ptr::W](W) writer structure"] +impl crate::Writable for PTR_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets PTR to value 0"] +impl crate::Resettable for PTR_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/lib.rs b/down-the-stack/dk_pac/src/lib.rs new file mode 100644 index 0000000..67149bf --- /dev/null +++ b/down-the-stack/dk_pac/src/lib.rs @@ -0,0 +1,2407 @@ +#![doc = "Peripheral access API for NRF52 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)] +#![deny(no_mangle_generic_items)] +#![deny(non_shorthand_field_patterns)] +#![deny(overflowing_literals)] +#![deny(path_statements)] +#![deny(patterns_in_fns_without_body)] +#![deny(private_in_public)] +#![deny(unconditional_recursion)] +#![deny(unused_allocation)] +#![deny(unused_comparisons)] +#![deny(unused_parens)] +#![deny(while_true)] +#![allow(non_camel_case_types)] +#![allow(non_snake_case)] +#![no_std] +use core::marker::PhantomData; +use core::ops::Deref; +#[doc = r"Number available in the NVIC for configuring priority"] +pub const NVIC_PRIO_BITS: u8 = 3; +#[cfg(feature = "rt")] +pub use self::Interrupt as interrupt; +pub use cortex_m::peripheral::Peripherals as CorePeripherals; +pub use cortex_m::peripheral::{CBP, CPUID, DCB, DWT, FPB, FPU, ITM, MPU, NVIC, SCB, SYST, TPIU}; +#[cfg(feature = "rt")] +pub use cortex_m_rt::interrupt; +#[allow(unused_imports)] +use generic::*; +#[doc = r"Common register and bit access and modify traits"] +pub mod generic; +#[cfg(feature = "rt")] +extern "C" { + fn POWER_CLOCK(); + fn RADIO(); + fn UARTE0_UART0(); + fn SPIM0_SPIS0_TWIM0_TWIS0_SPI0_TWI0(); + fn SPIM1_SPIS1_TWIM1_TWIS1_SPI1_TWI1(); + fn NFCT(); + fn GPIOTE(); + fn SAADC(); + fn TIMER0(); + fn TIMER1(); + fn TIMER2(); + fn RTC0(); + fn TEMP(); + fn RNG(); + fn ECB(); + fn CCM_AAR(); + fn WDT(); + fn RTC1(); + fn QDEC(); + fn COMP_LPCOMP(); + fn SWI0_EGU0(); + fn SWI1_EGU1(); + fn SWI2_EGU2(); + fn SWI3_EGU3(); + fn SWI4_EGU4(); + fn SWI5_EGU5(); + fn TIMER3(); + fn TIMER4(); + fn PWM0(); + fn PDM(); + fn MWU(); + fn PWM1(); + fn PWM2(); + fn SPIM2_SPIS2_SPI2(); + fn RTC2(); + fn I2S(); + fn FPU(); +} +#[doc(hidden)] +pub union Vector { + _handler: unsafe extern "C" fn(), + _reserved: u32, +} +#[cfg(feature = "rt")] +#[doc(hidden)] +#[link_section = ".vector_table.interrupts"] +#[no_mangle] +pub static __INTERRUPTS: [Vector; 39] = [ + Vector { + _handler: POWER_CLOCK, + }, + Vector { _handler: RADIO }, + Vector { + _handler: UARTE0_UART0, + }, + Vector { + _handler: SPIM0_SPIS0_TWIM0_TWIS0_SPI0_TWI0, + }, + Vector { + _handler: SPIM1_SPIS1_TWIM1_TWIS1_SPI1_TWI1, + }, + Vector { _handler: NFCT }, + Vector { _handler: GPIOTE }, + Vector { _handler: SAADC }, + Vector { _handler: TIMER0 }, + Vector { _handler: TIMER1 }, + Vector { _handler: TIMER2 }, + Vector { _handler: RTC0 }, + Vector { _handler: TEMP }, + Vector { _handler: RNG }, + Vector { _handler: ECB }, + Vector { _handler: CCM_AAR }, + Vector { _handler: WDT }, + Vector { _handler: RTC1 }, + Vector { _handler: QDEC }, + Vector { + _handler: COMP_LPCOMP, + }, + Vector { + _handler: SWI0_EGU0, + }, + Vector { + _handler: SWI1_EGU1, + }, + Vector { + _handler: SWI2_EGU2, + }, + Vector { + _handler: SWI3_EGU3, + }, + Vector { + _handler: SWI4_EGU4, + }, + Vector { + _handler: SWI5_EGU5, + }, + Vector { _handler: TIMER3 }, + Vector { _handler: TIMER4 }, + Vector { _handler: PWM0 }, + Vector { _handler: PDM }, + Vector { _reserved: 0 }, + Vector { _reserved: 0 }, + Vector { _handler: MWU }, + Vector { _handler: PWM1 }, + Vector { _handler: PWM2 }, + Vector { + _handler: SPIM2_SPIS2_SPI2, + }, + Vector { _handler: RTC2 }, + Vector { _handler: I2S }, + Vector { _handler: FPU }, +]; +#[doc = r"Enumeration of all the interrupts."] +#[derive(Copy, Clone, Debug, PartialEq, Eq)] +#[repr(u16)] +pub enum Interrupt { + #[doc = "0 - POWER_CLOCK"] + POWER_CLOCK = 0, + #[doc = "1 - RADIO"] + RADIO = 1, + #[doc = "2 - UARTE0_UART0"] + UARTE0_UART0 = 2, + #[doc = "3 - SPIM0_SPIS0_TWIM0_TWIS0_SPI0_TWI0"] + SPIM0_SPIS0_TWIM0_TWIS0_SPI0_TWI0 = 3, + #[doc = "4 - SPIM1_SPIS1_TWIM1_TWIS1_SPI1_TWI1"] + SPIM1_SPIS1_TWIM1_TWIS1_SPI1_TWI1 = 4, + #[doc = "5 - NFCT"] + NFCT = 5, + #[doc = "6 - GPIOTE"] + GPIOTE = 6, + #[doc = "7 - SAADC"] + SAADC = 7, + #[doc = "8 - TIMER0"] + TIMER0 = 8, + #[doc = "9 - TIMER1"] + TIMER1 = 9, + #[doc = "10 - TIMER2"] + TIMER2 = 10, + #[doc = "11 - RTC0"] + RTC0 = 11, + #[doc = "12 - TEMP"] + TEMP = 12, + #[doc = "13 - RNG"] + RNG = 13, + #[doc = "14 - ECB"] + ECB = 14, + #[doc = "15 - CCM_AAR"] + CCM_AAR = 15, + #[doc = "16 - WDT"] + WDT = 16, + #[doc = "17 - RTC1"] + RTC1 = 17, + #[doc = "18 - QDEC"] + QDEC = 18, + #[doc = "19 - COMP_LPCOMP"] + COMP_LPCOMP = 19, + #[doc = "20 - SWI0_EGU0"] + SWI0_EGU0 = 20, + #[doc = "21 - SWI1_EGU1"] + SWI1_EGU1 = 21, + #[doc = "22 - SWI2_EGU2"] + SWI2_EGU2 = 22, + #[doc = "23 - SWI3_EGU3"] + SWI3_EGU3 = 23, + #[doc = "24 - SWI4_EGU4"] + SWI4_EGU4 = 24, + #[doc = "25 - SWI5_EGU5"] + SWI5_EGU5 = 25, + #[doc = "26 - TIMER3"] + TIMER3 = 26, + #[doc = "27 - TIMER4"] + TIMER4 = 27, + #[doc = "28 - PWM0"] + PWM0 = 28, + #[doc = "29 - PDM"] + PDM = 29, + #[doc = "32 - MWU"] + MWU = 32, + #[doc = "33 - PWM1"] + PWM1 = 33, + #[doc = "34 - PWM2"] + PWM2 = 34, + #[doc = "35 - SPIM2_SPIS2_SPI2"] + SPIM2_SPIS2_SPI2 = 35, + #[doc = "36 - RTC2"] + RTC2 = 36, + #[doc = "37 - I2S"] + I2S = 37, + #[doc = "38 - FPU"] + FPU = 38, +} +unsafe impl cortex_m::interrupt::InterruptNumber for Interrupt { + #[inline(always)] + fn number(self) -> u16 { + self as u16 + } +} +#[doc = "Factory Information Configuration Registers"] +pub struct FICR { + _marker: PhantomData<*const ()>, +} +unsafe impl Send for FICR {} +impl FICR { + #[doc = r"Pointer to the register block"] + pub const PTR: *const ficr::RegisterBlock = 0x1000_0000 as *const _; + #[doc = r"Return the pointer to the register block"] + #[inline(always)] + pub const fn ptr() -> *const ficr::RegisterBlock { + Self::PTR + } +} +impl Deref for FICR { + type Target = ficr::RegisterBlock; + #[inline(always)] + fn deref(&self) -> &Self::Target { + unsafe { &*Self::PTR } + } +} +impl core::fmt::Debug for FICR { + fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result { + f.debug_struct("FICR").finish() + } +} +#[doc = "Factory Information Configuration Registers"] +pub mod ficr; +#[doc = "User Information Configuration Registers"] +pub struct UICR { + _marker: PhantomData<*const ()>, +} +unsafe impl Send for UICR {} +impl UICR { + #[doc = r"Pointer to the register block"] + pub const PTR: *const uicr::RegisterBlock = 0x1000_1000 as *const _; + #[doc = r"Return the pointer to the register block"] + #[inline(always)] + pub const fn ptr() -> *const uicr::RegisterBlock { + Self::PTR + } +} +impl Deref for UICR { + type Target = uicr::RegisterBlock; + #[inline(always)] + fn deref(&self) -> &Self::Target { + unsafe { &*Self::PTR } + } +} +impl core::fmt::Debug for UICR { + fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result { + f.debug_struct("UICR").finish() + } +} +#[doc = "User Information Configuration Registers"] +pub mod uicr; +#[doc = "Access Port Protection"] +pub struct APPROTECT { + _marker: PhantomData<*const ()>, +} +unsafe impl Send for APPROTECT {} +impl APPROTECT { + #[doc = r"Pointer to the register block"] + pub const PTR: *const approtect::RegisterBlock = 0x4000_0000 as *const _; + #[doc = r"Return the pointer to the register block"] + #[inline(always)] + pub const fn ptr() -> *const approtect::RegisterBlock { + Self::PTR + } +} +impl Deref for APPROTECT { + type Target = approtect::RegisterBlock; + #[inline(always)] + fn deref(&self) -> &Self::Target { + unsafe { &*Self::PTR } + } +} +impl core::fmt::Debug for APPROTECT { + fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result { + f.debug_struct("APPROTECT").finish() + } +} +#[doc = "Access Port Protection"] +pub mod approtect; +#[doc = "Block Protect"] +pub struct BPROT { + _marker: PhantomData<*const ()>, +} +unsafe impl Send for BPROT {} +impl BPROT { + #[doc = r"Pointer to the register block"] + pub const PTR: *const bprot::RegisterBlock = 0x4000_0000 as *const _; + #[doc = r"Return the pointer to the register block"] + #[inline(always)] + pub const fn ptr() -> *const bprot::RegisterBlock { + Self::PTR + } +} +impl Deref for BPROT { + type Target = bprot::RegisterBlock; + #[inline(always)] + fn deref(&self) -> &Self::Target { + unsafe { &*Self::PTR } + } +} +impl core::fmt::Debug for BPROT { + fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result { + f.debug_struct("BPROT").finish() + } +} +#[doc = "Block Protect"] +pub mod bprot; +#[doc = "Clock control"] +pub struct CLOCK { + _marker: PhantomData<*const ()>, +} +unsafe impl Send for CLOCK {} +impl CLOCK { + #[doc = r"Pointer to the register block"] + pub const PTR: *const clock::RegisterBlock = 0x4000_0000 as *const _; + #[doc = r"Return the pointer to the register block"] + #[inline(always)] + pub const fn ptr() -> *const clock::RegisterBlock { + Self::PTR + } +} +impl Deref for CLOCK { + type Target = clock::RegisterBlock; + #[inline(always)] + fn deref(&self) -> &Self::Target { + unsafe { &*Self::PTR } + } +} +impl core::fmt::Debug for CLOCK { + fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result { + f.debug_struct("CLOCK").finish() + } +} +#[doc = "Clock control"] +pub mod clock; +#[doc = "Power control"] +pub struct POWER { + _marker: PhantomData<*const ()>, +} +unsafe impl Send for POWER {} +impl POWER { + #[doc = r"Pointer to the register block"] + pub const PTR: *const power::RegisterBlock = 0x4000_0000 as *const _; + #[doc = r"Return the pointer to the register block"] + #[inline(always)] + pub const fn ptr() -> *const power::RegisterBlock { + Self::PTR + } +} +impl Deref for POWER { + type Target = power::RegisterBlock; + #[inline(always)] + fn deref(&self) -> &Self::Target { + unsafe { &*Self::PTR } + } +} +impl core::fmt::Debug for POWER { + fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result { + f.debug_struct("POWER").finish() + } +} +#[doc = "Power control"] +pub mod power; +#[doc = "GPIO Port 1"] +pub struct P0 { + _marker: PhantomData<*const ()>, +} +unsafe impl Send for P0 {} +impl P0 { + #[doc = r"Pointer to the register block"] + pub const PTR: *const p0::RegisterBlock = 0x5000_0000 as *const _; + #[doc = r"Return the pointer to the register block"] + #[inline(always)] + pub const fn ptr() -> *const p0::RegisterBlock { + Self::PTR + } +} +impl Deref for P0 { + type Target = p0::RegisterBlock; + #[inline(always)] + fn deref(&self) -> &Self::Target { + unsafe { &*Self::PTR } + } +} +impl core::fmt::Debug for P0 { + fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result { + f.debug_struct("P0").finish() + } +} +#[doc = "GPIO Port 1"] +pub mod p0; +#[doc = "2.4 GHz Radio"] +pub struct RADIO { + _marker: PhantomData<*const ()>, +} +unsafe impl Send for RADIO {} +impl RADIO { + #[doc = r"Pointer to the register block"] + pub const PTR: *const radio::RegisterBlock = 0x4000_1000 as *const _; + #[doc = r"Return the pointer to the register block"] + #[inline(always)] + pub const fn ptr() -> *const radio::RegisterBlock { + Self::PTR + } +} +impl Deref for RADIO { + type Target = radio::RegisterBlock; + #[inline(always)] + fn deref(&self) -> &Self::Target { + unsafe { &*Self::PTR } + } +} +impl core::fmt::Debug for RADIO { + fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result { + f.debug_struct("RADIO").finish() + } +} +#[doc = "2.4 GHz Radio"] +pub mod radio; +#[doc = "Universal Asynchronous Receiver/Transmitter"] +pub struct UART0 { + _marker: PhantomData<*const ()>, +} +unsafe impl Send for UART0 {} +impl UART0 { + #[doc = r"Pointer to the register block"] + pub const PTR: *const uart0::RegisterBlock = 0x4000_2000 as *const _; + #[doc = r"Return the pointer to the register block"] + #[inline(always)] + pub const fn ptr() -> *const uart0::RegisterBlock { + Self::PTR + } +} +impl Deref for UART0 { + type Target = uart0::RegisterBlock; + #[inline(always)] + fn deref(&self) -> &Self::Target { + unsafe { &*Self::PTR } + } +} +impl core::fmt::Debug for UART0 { + fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result { + f.debug_struct("UART0").finish() + } +} +#[doc = "Universal Asynchronous Receiver/Transmitter"] +pub mod uart0; +#[doc = "UART with EasyDMA"] +pub struct UARTE0 { + _marker: PhantomData<*const ()>, +} +unsafe impl Send for UARTE0 {} +impl UARTE0 { + #[doc = r"Pointer to the register block"] + pub const PTR: *const uarte0::RegisterBlock = 0x4000_2000 as *const _; + #[doc = r"Return the pointer to the register block"] + #[inline(always)] + pub const fn ptr() -> *const uarte0::RegisterBlock { + Self::PTR + } +} +impl Deref for UARTE0 { + type Target = uarte0::RegisterBlock; + #[inline(always)] + fn deref(&self) -> &Self::Target { + unsafe { &*Self::PTR } + } +} +impl core::fmt::Debug for UARTE0 { + fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result { + f.debug_struct("UARTE0").finish() + } +} +#[doc = "UART with EasyDMA"] +pub mod uarte0; +#[doc = "Serial Peripheral Interface 0"] +pub struct SPI0 { + _marker: PhantomData<*const ()>, +} +unsafe impl Send for SPI0 {} +impl SPI0 { + #[doc = r"Pointer to the register block"] + pub const PTR: *const spi0::RegisterBlock = 0x4000_3000 as *const _; + #[doc = r"Return the pointer to the register block"] + #[inline(always)] + pub const fn ptr() -> *const spi0::RegisterBlock { + Self::PTR + } +} +impl Deref for SPI0 { + type Target = spi0::RegisterBlock; + #[inline(always)] + fn deref(&self) -> &Self::Target { + unsafe { &*Self::PTR } + } +} +impl core::fmt::Debug for SPI0 { + fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result { + f.debug_struct("SPI0").finish() + } +} +#[doc = "Serial Peripheral Interface 0"] +pub mod spi0; +#[doc = "Serial Peripheral Interface Master with EasyDMA 0"] +pub struct SPIM0 { + _marker: PhantomData<*const ()>, +} +unsafe impl Send for SPIM0 {} +impl SPIM0 { + #[doc = r"Pointer to the register block"] + pub const PTR: *const spim0::RegisterBlock = 0x4000_3000 as *const _; + #[doc = r"Return the pointer to the register block"] + #[inline(always)] + pub const fn ptr() -> *const spim0::RegisterBlock { + Self::PTR + } +} +impl Deref for SPIM0 { + type Target = spim0::RegisterBlock; + #[inline(always)] + fn deref(&self) -> &Self::Target { + unsafe { &*Self::PTR } + } +} +impl core::fmt::Debug for SPIM0 { + fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result { + f.debug_struct("SPIM0").finish() + } +} +#[doc = "Serial Peripheral Interface Master with EasyDMA 0"] +pub mod spim0; +#[doc = "SPI Slave 0"] +pub struct SPIS0 { + _marker: PhantomData<*const ()>, +} +unsafe impl Send for SPIS0 {} +impl SPIS0 { + #[doc = r"Pointer to the register block"] + pub const PTR: *const spis0::RegisterBlock = 0x4000_3000 as *const _; + #[doc = r"Return the pointer to the register block"] + #[inline(always)] + pub const fn ptr() -> *const spis0::RegisterBlock { + Self::PTR + } +} +impl Deref for SPIS0 { + type Target = spis0::RegisterBlock; + #[inline(always)] + fn deref(&self) -> &Self::Target { + unsafe { &*Self::PTR } + } +} +impl core::fmt::Debug for SPIS0 { + fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result { + f.debug_struct("SPIS0").finish() + } +} +#[doc = "SPI Slave 0"] +pub mod spis0; +#[doc = "I2C compatible Two-Wire Interface 0"] +pub struct TWI0 { + _marker: PhantomData<*const ()>, +} +unsafe impl Send for TWI0 {} +impl TWI0 { + #[doc = r"Pointer to the register block"] + pub const PTR: *const twi0::RegisterBlock = 0x4000_3000 as *const _; + #[doc = r"Return the pointer to the register block"] + #[inline(always)] + pub const fn ptr() -> *const twi0::RegisterBlock { + Self::PTR + } +} +impl Deref for TWI0 { + type Target = twi0::RegisterBlock; + #[inline(always)] + fn deref(&self) -> &Self::Target { + unsafe { &*Self::PTR } + } +} +impl core::fmt::Debug for TWI0 { + fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result { + f.debug_struct("TWI0").finish() + } +} +#[doc = "I2C compatible Two-Wire Interface 0"] +pub mod twi0; +#[doc = "I2C compatible Two-Wire Master Interface with EasyDMA 0"] +pub struct TWIM0 { + _marker: PhantomData<*const ()>, +} +unsafe impl Send for TWIM0 {} +impl TWIM0 { + #[doc = r"Pointer to the register block"] + pub const PTR: *const twim0::RegisterBlock = 0x4000_3000 as *const _; + #[doc = r"Return the pointer to the register block"] + #[inline(always)] + pub const fn ptr() -> *const twim0::RegisterBlock { + Self::PTR + } +} +impl Deref for TWIM0 { + type Target = twim0::RegisterBlock; + #[inline(always)] + fn deref(&self) -> &Self::Target { + unsafe { &*Self::PTR } + } +} +impl core::fmt::Debug for TWIM0 { + fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result { + f.debug_struct("TWIM0").finish() + } +} +#[doc = "I2C compatible Two-Wire Master Interface with EasyDMA 0"] +pub mod twim0; +#[doc = "I2C compatible Two-Wire Slave Interface with EasyDMA 0"] +pub struct TWIS0 { + _marker: PhantomData<*const ()>, +} +unsafe impl Send for TWIS0 {} +impl TWIS0 { + #[doc = r"Pointer to the register block"] + pub const PTR: *const twis0::RegisterBlock = 0x4000_3000 as *const _; + #[doc = r"Return the pointer to the register block"] + #[inline(always)] + pub const fn ptr() -> *const twis0::RegisterBlock { + Self::PTR + } +} +impl Deref for TWIS0 { + type Target = twis0::RegisterBlock; + #[inline(always)] + fn deref(&self) -> &Self::Target { + unsafe { &*Self::PTR } + } +} +impl core::fmt::Debug for TWIS0 { + fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result { + f.debug_struct("TWIS0").finish() + } +} +#[doc = "I2C compatible Two-Wire Slave Interface with EasyDMA 0"] +pub mod twis0; +#[doc = "Serial Peripheral Interface 1"] +pub struct SPI1 { + _marker: PhantomData<*const ()>, +} +unsafe impl Send for SPI1 {} +impl SPI1 { + #[doc = r"Pointer to the register block"] + pub const PTR: *const spi0::RegisterBlock = 0x4000_4000 as *const _; + #[doc = r"Return the pointer to the register block"] + #[inline(always)] + pub const fn ptr() -> *const spi0::RegisterBlock { + Self::PTR + } +} +impl Deref for SPI1 { + type Target = spi0::RegisterBlock; + #[inline(always)] + fn deref(&self) -> &Self::Target { + unsafe { &*Self::PTR } + } +} +impl core::fmt::Debug for SPI1 { + fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result { + f.debug_struct("SPI1").finish() + } +} +#[doc = "Serial Peripheral Interface 1"] +pub use self::spi0 as spi1; +#[doc = "Serial Peripheral Interface Master with EasyDMA 1"] +pub struct SPIM1 { + _marker: PhantomData<*const ()>, +} +unsafe impl Send for SPIM1 {} +impl SPIM1 { + #[doc = r"Pointer to the register block"] + pub const PTR: *const spim0::RegisterBlock = 0x4000_4000 as *const _; + #[doc = r"Return the pointer to the register block"] + #[inline(always)] + pub const fn ptr() -> *const spim0::RegisterBlock { + Self::PTR + } +} +impl Deref for SPIM1 { + type Target = spim0::RegisterBlock; + #[inline(always)] + fn deref(&self) -> &Self::Target { + unsafe { &*Self::PTR } + } +} +impl core::fmt::Debug for SPIM1 { + fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result { + f.debug_struct("SPIM1").finish() + } +} +#[doc = "Serial Peripheral Interface Master with EasyDMA 1"] +pub use self::spim0 as spim1; +#[doc = "SPI Slave 1"] +pub struct SPIS1 { + _marker: PhantomData<*const ()>, +} +unsafe impl Send for SPIS1 {} +impl SPIS1 { + #[doc = r"Pointer to the register block"] + pub const PTR: *const spis0::RegisterBlock = 0x4000_4000 as *const _; + #[doc = r"Return the pointer to the register block"] + #[inline(always)] + pub const fn ptr() -> *const spis0::RegisterBlock { + Self::PTR + } +} +impl Deref for SPIS1 { + type Target = spis0::RegisterBlock; + #[inline(always)] + fn deref(&self) -> &Self::Target { + unsafe { &*Self::PTR } + } +} +impl core::fmt::Debug for SPIS1 { + fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result { + f.debug_struct("SPIS1").finish() + } +} +#[doc = "SPI Slave 1"] +pub use self::spis0 as spis1; +#[doc = "I2C compatible Two-Wire Interface 1"] +pub struct TWI1 { + _marker: PhantomData<*const ()>, +} +unsafe impl Send for TWI1 {} +impl TWI1 { + #[doc = r"Pointer to the register block"] + pub const PTR: *const twi0::RegisterBlock = 0x4000_4000 as *const _; + #[doc = r"Return the pointer to the register block"] + #[inline(always)] + pub const fn ptr() -> *const twi0::RegisterBlock { + Self::PTR + } +} +impl Deref for TWI1 { + type Target = twi0::RegisterBlock; + #[inline(always)] + fn deref(&self) -> &Self::Target { + unsafe { &*Self::PTR } + } +} +impl core::fmt::Debug for TWI1 { + fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result { + f.debug_struct("TWI1").finish() + } +} +#[doc = "I2C compatible Two-Wire Interface 1"] +pub use self::twi0 as twi1; +#[doc = "I2C compatible Two-Wire Master Interface with EasyDMA 1"] +pub struct TWIM1 { + _marker: PhantomData<*const ()>, +} +unsafe impl Send for TWIM1 {} +impl TWIM1 { + #[doc = r"Pointer to the register block"] + pub const PTR: *const twim0::RegisterBlock = 0x4000_4000 as *const _; + #[doc = r"Return the pointer to the register block"] + #[inline(always)] + pub const fn ptr() -> *const twim0::RegisterBlock { + Self::PTR + } +} +impl Deref for TWIM1 { + type Target = twim0::RegisterBlock; + #[inline(always)] + fn deref(&self) -> &Self::Target { + unsafe { &*Self::PTR } + } +} +impl core::fmt::Debug for TWIM1 { + fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result { + f.debug_struct("TWIM1").finish() + } +} +#[doc = "I2C compatible Two-Wire Master Interface with EasyDMA 1"] +pub use self::twim0 as twim1; +#[doc = "I2C compatible Two-Wire Slave Interface with EasyDMA 1"] +pub struct TWIS1 { + _marker: PhantomData<*const ()>, +} +unsafe impl Send for TWIS1 {} +impl TWIS1 { + #[doc = r"Pointer to the register block"] + pub const PTR: *const twis0::RegisterBlock = 0x4000_4000 as *const _; + #[doc = r"Return the pointer to the register block"] + #[inline(always)] + pub const fn ptr() -> *const twis0::RegisterBlock { + Self::PTR + } +} +impl Deref for TWIS1 { + type Target = twis0::RegisterBlock; + #[inline(always)] + fn deref(&self) -> &Self::Target { + unsafe { &*Self::PTR } + } +} +impl core::fmt::Debug for TWIS1 { + fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result { + f.debug_struct("TWIS1").finish() + } +} +#[doc = "I2C compatible Two-Wire Slave Interface with EasyDMA 1"] +pub use self::twis0 as twis1; +#[doc = "NFC-A compatible radio"] +pub struct NFCT { + _marker: PhantomData<*const ()>, +} +unsafe impl Send for NFCT {} +impl NFCT { + #[doc = r"Pointer to the register block"] + pub const PTR: *const nfct::RegisterBlock = 0x4000_5000 as *const _; + #[doc = r"Return the pointer to the register block"] + #[inline(always)] + pub const fn ptr() -> *const nfct::RegisterBlock { + Self::PTR + } +} +impl Deref for NFCT { + type Target = nfct::RegisterBlock; + #[inline(always)] + fn deref(&self) -> &Self::Target { + unsafe { &*Self::PTR } + } +} +impl core::fmt::Debug for NFCT { + fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result { + f.debug_struct("NFCT").finish() + } +} +#[doc = "NFC-A compatible radio"] +pub mod nfct; +#[doc = "GPIO Tasks and Events"] +pub struct GPIOTE { + _marker: PhantomData<*const ()>, +} +unsafe impl Send for GPIOTE {} +impl GPIOTE { + #[doc = r"Pointer to the register block"] + pub const PTR: *const gpiote::RegisterBlock = 0x4000_6000 as *const _; + #[doc = r"Return the pointer to the register block"] + #[inline(always)] + pub const fn ptr() -> *const gpiote::RegisterBlock { + Self::PTR + } +} +impl Deref for GPIOTE { + type Target = gpiote::RegisterBlock; + #[inline(always)] + fn deref(&self) -> &Self::Target { + unsafe { &*Self::PTR } + } +} +impl core::fmt::Debug for GPIOTE { + fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result { + f.debug_struct("GPIOTE").finish() + } +} +#[doc = "GPIO Tasks and Events"] +pub mod gpiote; +#[doc = "Analog to Digital Converter"] +pub struct SAADC { + _marker: PhantomData<*const ()>, +} +unsafe impl Send for SAADC {} +impl SAADC { + #[doc = r"Pointer to the register block"] + pub const PTR: *const saadc::RegisterBlock = 0x4000_7000 as *const _; + #[doc = r"Return the pointer to the register block"] + #[inline(always)] + pub const fn ptr() -> *const saadc::RegisterBlock { + Self::PTR + } +} +impl Deref for SAADC { + type Target = saadc::RegisterBlock; + #[inline(always)] + fn deref(&self) -> &Self::Target { + unsafe { &*Self::PTR } + } +} +impl core::fmt::Debug for SAADC { + fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result { + f.debug_struct("SAADC").finish() + } +} +#[doc = "Analog to Digital Converter"] +pub mod saadc; +#[doc = "Timer/Counter 0"] +pub struct TIMER0 { + _marker: PhantomData<*const ()>, +} +unsafe impl Send for TIMER0 {} +impl TIMER0 { + #[doc = r"Pointer to the register block"] + pub const PTR: *const timer0::RegisterBlock = 0x4000_8000 as *const _; + #[doc = r"Return the pointer to the register block"] + #[inline(always)] + pub const fn ptr() -> *const timer0::RegisterBlock { + Self::PTR + } +} +impl Deref for TIMER0 { + type Target = timer0::RegisterBlock; + #[inline(always)] + fn deref(&self) -> &Self::Target { + unsafe { &*Self::PTR } + } +} +impl core::fmt::Debug for TIMER0 { + fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result { + f.debug_struct("TIMER0").finish() + } +} +#[doc = "Timer/Counter 0"] +pub mod timer0; +#[doc = "Timer/Counter 1"] +pub struct TIMER1 { + _marker: PhantomData<*const ()>, +} +unsafe impl Send for TIMER1 {} +impl TIMER1 { + #[doc = r"Pointer to the register block"] + pub const PTR: *const timer0::RegisterBlock = 0x4000_9000 as *const _; + #[doc = r"Return the pointer to the register block"] + #[inline(always)] + pub const fn ptr() -> *const timer0::RegisterBlock { + Self::PTR + } +} +impl Deref for TIMER1 { + type Target = timer0::RegisterBlock; + #[inline(always)] + fn deref(&self) -> &Self::Target { + unsafe { &*Self::PTR } + } +} +impl core::fmt::Debug for TIMER1 { + fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result { + f.debug_struct("TIMER1").finish() + } +} +#[doc = "Timer/Counter 1"] +pub use self::timer0 as timer1; +#[doc = "Timer/Counter 2"] +pub struct TIMER2 { + _marker: PhantomData<*const ()>, +} +unsafe impl Send for TIMER2 {} +impl TIMER2 { + #[doc = r"Pointer to the register block"] + pub const PTR: *const timer0::RegisterBlock = 0x4000_a000 as *const _; + #[doc = r"Return the pointer to the register block"] + #[inline(always)] + pub const fn ptr() -> *const timer0::RegisterBlock { + Self::PTR + } +} +impl Deref for TIMER2 { + type Target = timer0::RegisterBlock; + #[inline(always)] + fn deref(&self) -> &Self::Target { + unsafe { &*Self::PTR } + } +} +impl core::fmt::Debug for TIMER2 { + fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result { + f.debug_struct("TIMER2").finish() + } +} +#[doc = "Timer/Counter 2"] +pub use self::timer0 as timer2; +#[doc = "Real time counter 0"] +pub struct RTC0 { + _marker: PhantomData<*const ()>, +} +unsafe impl Send for RTC0 {} +impl RTC0 { + #[doc = r"Pointer to the register block"] + pub const PTR: *const rtc0::RegisterBlock = 0x4000_b000 as *const _; + #[doc = r"Return the pointer to the register block"] + #[inline(always)] + pub const fn ptr() -> *const rtc0::RegisterBlock { + Self::PTR + } +} +impl Deref for RTC0 { + type Target = rtc0::RegisterBlock; + #[inline(always)] + fn deref(&self) -> &Self::Target { + unsafe { &*Self::PTR } + } +} +impl core::fmt::Debug for RTC0 { + fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result { + f.debug_struct("RTC0").finish() + } +} +#[doc = "Real time counter 0"] +pub mod rtc0; +#[doc = "Temperature Sensor"] +pub struct TEMP { + _marker: PhantomData<*const ()>, +} +unsafe impl Send for TEMP {} +impl TEMP { + #[doc = r"Pointer to the register block"] + pub const PTR: *const temp::RegisterBlock = 0x4000_c000 as *const _; + #[doc = r"Return the pointer to the register block"] + #[inline(always)] + pub const fn ptr() -> *const temp::RegisterBlock { + Self::PTR + } +} +impl Deref for TEMP { + type Target = temp::RegisterBlock; + #[inline(always)] + fn deref(&self) -> &Self::Target { + unsafe { &*Self::PTR } + } +} +impl core::fmt::Debug for TEMP { + fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result { + f.debug_struct("TEMP").finish() + } +} +#[doc = "Temperature Sensor"] +pub mod temp; +#[doc = "Random Number Generator"] +pub struct RNG { + _marker: PhantomData<*const ()>, +} +unsafe impl Send for RNG {} +impl RNG { + #[doc = r"Pointer to the register block"] + pub const PTR: *const rng::RegisterBlock = 0x4000_d000 as *const _; + #[doc = r"Return the pointer to the register block"] + #[inline(always)] + pub const fn ptr() -> *const rng::RegisterBlock { + Self::PTR + } +} +impl Deref for RNG { + type Target = rng::RegisterBlock; + #[inline(always)] + fn deref(&self) -> &Self::Target { + unsafe { &*Self::PTR } + } +} +impl core::fmt::Debug for RNG { + fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result { + f.debug_struct("RNG").finish() + } +} +#[doc = "Random Number Generator"] +pub mod rng; +#[doc = "AES ECB Mode Encryption"] +pub struct ECB { + _marker: PhantomData<*const ()>, +} +unsafe impl Send for ECB {} +impl ECB { + #[doc = r"Pointer to the register block"] + pub const PTR: *const ecb::RegisterBlock = 0x4000_e000 as *const _; + #[doc = r"Return the pointer to the register block"] + #[inline(always)] + pub const fn ptr() -> *const ecb::RegisterBlock { + Self::PTR + } +} +impl Deref for ECB { + type Target = ecb::RegisterBlock; + #[inline(always)] + fn deref(&self) -> &Self::Target { + unsafe { &*Self::PTR } + } +} +impl core::fmt::Debug for ECB { + fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result { + f.debug_struct("ECB").finish() + } +} +#[doc = "AES ECB Mode Encryption"] +pub mod ecb; +#[doc = "Accelerated Address Resolver"] +pub struct AAR { + _marker: PhantomData<*const ()>, +} +unsafe impl Send for AAR {} +impl AAR { + #[doc = r"Pointer to the register block"] + pub const PTR: *const aar::RegisterBlock = 0x4000_f000 as *const _; + #[doc = r"Return the pointer to the register block"] + #[inline(always)] + pub const fn ptr() -> *const aar::RegisterBlock { + Self::PTR + } +} +impl Deref for AAR { + type Target = aar::RegisterBlock; + #[inline(always)] + fn deref(&self) -> &Self::Target { + unsafe { &*Self::PTR } + } +} +impl core::fmt::Debug for AAR { + fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result { + f.debug_struct("AAR").finish() + } +} +#[doc = "Accelerated Address Resolver"] +pub mod aar; +#[doc = "AES CCM Mode Encryption"] +pub struct CCM { + _marker: PhantomData<*const ()>, +} +unsafe impl Send for CCM {} +impl CCM { + #[doc = r"Pointer to the register block"] + pub const PTR: *const ccm::RegisterBlock = 0x4000_f000 as *const _; + #[doc = r"Return the pointer to the register block"] + #[inline(always)] + pub const fn ptr() -> *const ccm::RegisterBlock { + Self::PTR + } +} +impl Deref for CCM { + type Target = ccm::RegisterBlock; + #[inline(always)] + fn deref(&self) -> &Self::Target { + unsafe { &*Self::PTR } + } +} +impl core::fmt::Debug for CCM { + fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result { + f.debug_struct("CCM").finish() + } +} +#[doc = "AES CCM Mode Encryption"] +pub mod ccm; +#[doc = "Watchdog Timer"] +pub struct WDT { + _marker: PhantomData<*const ()>, +} +unsafe impl Send for WDT {} +impl WDT { + #[doc = r"Pointer to the register block"] + pub const PTR: *const wdt::RegisterBlock = 0x4001_0000 as *const _; + #[doc = r"Return the pointer to the register block"] + #[inline(always)] + pub const fn ptr() -> *const wdt::RegisterBlock { + Self::PTR + } +} +impl Deref for WDT { + type Target = wdt::RegisterBlock; + #[inline(always)] + fn deref(&self) -> &Self::Target { + unsafe { &*Self::PTR } + } +} +impl core::fmt::Debug for WDT { + fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result { + f.debug_struct("WDT").finish() + } +} +#[doc = "Watchdog Timer"] +pub mod wdt; +#[doc = "Real time counter 1"] +pub struct RTC1 { + _marker: PhantomData<*const ()>, +} +unsafe impl Send for RTC1 {} +impl RTC1 { + #[doc = r"Pointer to the register block"] + pub const PTR: *const rtc0::RegisterBlock = 0x4001_1000 as *const _; + #[doc = r"Return the pointer to the register block"] + #[inline(always)] + pub const fn ptr() -> *const rtc0::RegisterBlock { + Self::PTR + } +} +impl Deref for RTC1 { + type Target = rtc0::RegisterBlock; + #[inline(always)] + fn deref(&self) -> &Self::Target { + unsafe { &*Self::PTR } + } +} +impl core::fmt::Debug for RTC1 { + fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result { + f.debug_struct("RTC1").finish() + } +} +#[doc = "Real time counter 1"] +pub use self::rtc0 as rtc1; +#[doc = "Quadrature Decoder"] +pub struct QDEC { + _marker: PhantomData<*const ()>, +} +unsafe impl Send for QDEC {} +impl QDEC { + #[doc = r"Pointer to the register block"] + pub const PTR: *const qdec::RegisterBlock = 0x4001_2000 as *const _; + #[doc = r"Return the pointer to the register block"] + #[inline(always)] + pub const fn ptr() -> *const qdec::RegisterBlock { + Self::PTR + } +} +impl Deref for QDEC { + type Target = qdec::RegisterBlock; + #[inline(always)] + fn deref(&self) -> &Self::Target { + unsafe { &*Self::PTR } + } +} +impl core::fmt::Debug for QDEC { + fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result { + f.debug_struct("QDEC").finish() + } +} +#[doc = "Quadrature Decoder"] +pub mod qdec; +#[doc = "Comparator"] +pub struct COMP { + _marker: PhantomData<*const ()>, +} +unsafe impl Send for COMP {} +impl COMP { + #[doc = r"Pointer to the register block"] + pub const PTR: *const comp::RegisterBlock = 0x4001_3000 as *const _; + #[doc = r"Return the pointer to the register block"] + #[inline(always)] + pub const fn ptr() -> *const comp::RegisterBlock { + Self::PTR + } +} +impl Deref for COMP { + type Target = comp::RegisterBlock; + #[inline(always)] + fn deref(&self) -> &Self::Target { + unsafe { &*Self::PTR } + } +} +impl core::fmt::Debug for COMP { + fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result { + f.debug_struct("COMP").finish() + } +} +#[doc = "Comparator"] +pub mod comp; +#[doc = "Low Power Comparator"] +pub struct LPCOMP { + _marker: PhantomData<*const ()>, +} +unsafe impl Send for LPCOMP {} +impl LPCOMP { + #[doc = r"Pointer to the register block"] + pub const PTR: *const lpcomp::RegisterBlock = 0x4001_3000 as *const _; + #[doc = r"Return the pointer to the register block"] + #[inline(always)] + pub const fn ptr() -> *const lpcomp::RegisterBlock { + Self::PTR + } +} +impl Deref for LPCOMP { + type Target = lpcomp::RegisterBlock; + #[inline(always)] + fn deref(&self) -> &Self::Target { + unsafe { &*Self::PTR } + } +} +impl core::fmt::Debug for LPCOMP { + fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result { + f.debug_struct("LPCOMP").finish() + } +} +#[doc = "Low Power Comparator"] +pub mod lpcomp; +#[doc = "Event Generator Unit 0"] +pub struct EGU0 { + _marker: PhantomData<*const ()>, +} +unsafe impl Send for EGU0 {} +impl EGU0 { + #[doc = r"Pointer to the register block"] + pub const PTR: *const egu0::RegisterBlock = 0x4001_4000 as *const _; + #[doc = r"Return the pointer to the register block"] + #[inline(always)] + pub const fn ptr() -> *const egu0::RegisterBlock { + Self::PTR + } +} +impl Deref for EGU0 { + type Target = egu0::RegisterBlock; + #[inline(always)] + fn deref(&self) -> &Self::Target { + unsafe { &*Self::PTR } + } +} +impl core::fmt::Debug for EGU0 { + fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result { + f.debug_struct("EGU0").finish() + } +} +#[doc = "Event Generator Unit 0"] +pub mod egu0; +#[doc = "Software interrupt 0"] +pub struct SWI0 { + _marker: PhantomData<*const ()>, +} +unsafe impl Send for SWI0 {} +impl SWI0 { + #[doc = r"Pointer to the register block"] + pub const PTR: *const swi0::RegisterBlock = 0x4001_4000 as *const _; + #[doc = r"Return the pointer to the register block"] + #[inline(always)] + pub const fn ptr() -> *const swi0::RegisterBlock { + Self::PTR + } +} +impl Deref for SWI0 { + type Target = swi0::RegisterBlock; + #[inline(always)] + fn deref(&self) -> &Self::Target { + unsafe { &*Self::PTR } + } +} +impl core::fmt::Debug for SWI0 { + fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result { + f.debug_struct("SWI0").finish() + } +} +#[doc = "Software interrupt 0"] +pub mod swi0; +#[doc = "Event Generator Unit 1"] +pub struct EGU1 { + _marker: PhantomData<*const ()>, +} +unsafe impl Send for EGU1 {} +impl EGU1 { + #[doc = r"Pointer to the register block"] + pub const PTR: *const egu0::RegisterBlock = 0x4001_5000 as *const _; + #[doc = r"Return the pointer to the register block"] + #[inline(always)] + pub const fn ptr() -> *const egu0::RegisterBlock { + Self::PTR + } +} +impl Deref for EGU1 { + type Target = egu0::RegisterBlock; + #[inline(always)] + fn deref(&self) -> &Self::Target { + unsafe { &*Self::PTR } + } +} +impl core::fmt::Debug for EGU1 { + fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result { + f.debug_struct("EGU1").finish() + } +} +#[doc = "Event Generator Unit 1"] +pub use self::egu0 as egu1; +#[doc = "Software interrupt 1"] +pub struct SWI1 { + _marker: PhantomData<*const ()>, +} +unsafe impl Send for SWI1 {} +impl SWI1 { + #[doc = r"Pointer to the register block"] + pub const PTR: *const swi0::RegisterBlock = 0x4001_5000 as *const _; + #[doc = r"Return the pointer to the register block"] + #[inline(always)] + pub const fn ptr() -> *const swi0::RegisterBlock { + Self::PTR + } +} +impl Deref for SWI1 { + type Target = swi0::RegisterBlock; + #[inline(always)] + fn deref(&self) -> &Self::Target { + unsafe { &*Self::PTR } + } +} +impl core::fmt::Debug for SWI1 { + fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result { + f.debug_struct("SWI1").finish() + } +} +#[doc = "Software interrupt 1"] +pub use self::swi0 as swi1; +#[doc = "Event Generator Unit 2"] +pub struct EGU2 { + _marker: PhantomData<*const ()>, +} +unsafe impl Send for EGU2 {} +impl EGU2 { + #[doc = r"Pointer to the register block"] + pub const PTR: *const egu0::RegisterBlock = 0x4001_6000 as *const _; + #[doc = r"Return the pointer to the register block"] + #[inline(always)] + pub const fn ptr() -> *const egu0::RegisterBlock { + Self::PTR + } +} +impl Deref for EGU2 { + type Target = egu0::RegisterBlock; + #[inline(always)] + fn deref(&self) -> &Self::Target { + unsafe { &*Self::PTR } + } +} +impl core::fmt::Debug for EGU2 { + fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result { + f.debug_struct("EGU2").finish() + } +} +#[doc = "Event Generator Unit 2"] +pub use self::egu0 as egu2; +#[doc = "Software interrupt 2"] +pub struct SWI2 { + _marker: PhantomData<*const ()>, +} +unsafe impl Send for SWI2 {} +impl SWI2 { + #[doc = r"Pointer to the register block"] + pub const PTR: *const swi0::RegisterBlock = 0x4001_6000 as *const _; + #[doc = r"Return the pointer to the register block"] + #[inline(always)] + pub const fn ptr() -> *const swi0::RegisterBlock { + Self::PTR + } +} +impl Deref for SWI2 { + type Target = swi0::RegisterBlock; + #[inline(always)] + fn deref(&self) -> &Self::Target { + unsafe { &*Self::PTR } + } +} +impl core::fmt::Debug for SWI2 { + fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result { + f.debug_struct("SWI2").finish() + } +} +#[doc = "Software interrupt 2"] +pub use self::swi0 as swi2; +#[doc = "Event Generator Unit 3"] +pub struct EGU3 { + _marker: PhantomData<*const ()>, +} +unsafe impl Send for EGU3 {} +impl EGU3 { + #[doc = r"Pointer to the register block"] + pub const PTR: *const egu0::RegisterBlock = 0x4001_7000 as *const _; + #[doc = r"Return the pointer to the register block"] + #[inline(always)] + pub const fn ptr() -> *const egu0::RegisterBlock { + Self::PTR + } +} +impl Deref for EGU3 { + type Target = egu0::RegisterBlock; + #[inline(always)] + fn deref(&self) -> &Self::Target { + unsafe { &*Self::PTR } + } +} +impl core::fmt::Debug for EGU3 { + fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result { + f.debug_struct("EGU3").finish() + } +} +#[doc = "Event Generator Unit 3"] +pub use self::egu0 as egu3; +#[doc = "Software interrupt 3"] +pub struct SWI3 { + _marker: PhantomData<*const ()>, +} +unsafe impl Send for SWI3 {} +impl SWI3 { + #[doc = r"Pointer to the register block"] + pub const PTR: *const swi0::RegisterBlock = 0x4001_7000 as *const _; + #[doc = r"Return the pointer to the register block"] + #[inline(always)] + pub const fn ptr() -> *const swi0::RegisterBlock { + Self::PTR + } +} +impl Deref for SWI3 { + type Target = swi0::RegisterBlock; + #[inline(always)] + fn deref(&self) -> &Self::Target { + unsafe { &*Self::PTR } + } +} +impl core::fmt::Debug for SWI3 { + fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result { + f.debug_struct("SWI3").finish() + } +} +#[doc = "Software interrupt 3"] +pub use self::swi0 as swi3; +#[doc = "Event Generator Unit 4"] +pub struct EGU4 { + _marker: PhantomData<*const ()>, +} +unsafe impl Send for EGU4 {} +impl EGU4 { + #[doc = r"Pointer to the register block"] + pub const PTR: *const egu0::RegisterBlock = 0x4001_8000 as *const _; + #[doc = r"Return the pointer to the register block"] + #[inline(always)] + pub const fn ptr() -> *const egu0::RegisterBlock { + Self::PTR + } +} +impl Deref for EGU4 { + type Target = egu0::RegisterBlock; + #[inline(always)] + fn deref(&self) -> &Self::Target { + unsafe { &*Self::PTR } + } +} +impl core::fmt::Debug for EGU4 { + fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result { + f.debug_struct("EGU4").finish() + } +} +#[doc = "Event Generator Unit 4"] +pub use self::egu0 as egu4; +#[doc = "Software interrupt 4"] +pub struct SWI4 { + _marker: PhantomData<*const ()>, +} +unsafe impl Send for SWI4 {} +impl SWI4 { + #[doc = r"Pointer to the register block"] + pub const PTR: *const swi0::RegisterBlock = 0x4001_8000 as *const _; + #[doc = r"Return the pointer to the register block"] + #[inline(always)] + pub const fn ptr() -> *const swi0::RegisterBlock { + Self::PTR + } +} +impl Deref for SWI4 { + type Target = swi0::RegisterBlock; + #[inline(always)] + fn deref(&self) -> &Self::Target { + unsafe { &*Self::PTR } + } +} +impl core::fmt::Debug for SWI4 { + fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result { + f.debug_struct("SWI4").finish() + } +} +#[doc = "Software interrupt 4"] +pub use self::swi0 as swi4; +#[doc = "Event Generator Unit 5"] +pub struct EGU5 { + _marker: PhantomData<*const ()>, +} +unsafe impl Send for EGU5 {} +impl EGU5 { + #[doc = r"Pointer to the register block"] + pub const PTR: *const egu0::RegisterBlock = 0x4001_9000 as *const _; + #[doc = r"Return the pointer to the register block"] + #[inline(always)] + pub const fn ptr() -> *const egu0::RegisterBlock { + Self::PTR + } +} +impl Deref for EGU5 { + type Target = egu0::RegisterBlock; + #[inline(always)] + fn deref(&self) -> &Self::Target { + unsafe { &*Self::PTR } + } +} +impl core::fmt::Debug for EGU5 { + fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result { + f.debug_struct("EGU5").finish() + } +} +#[doc = "Event Generator Unit 5"] +pub use self::egu0 as egu5; +#[doc = "Software interrupt 5"] +pub struct SWI5 { + _marker: PhantomData<*const ()>, +} +unsafe impl Send for SWI5 {} +impl SWI5 { + #[doc = r"Pointer to the register block"] + pub const PTR: *const swi0::RegisterBlock = 0x4001_9000 as *const _; + #[doc = r"Return the pointer to the register block"] + #[inline(always)] + pub const fn ptr() -> *const swi0::RegisterBlock { + Self::PTR + } +} +impl Deref for SWI5 { + type Target = swi0::RegisterBlock; + #[inline(always)] + fn deref(&self) -> &Self::Target { + unsafe { &*Self::PTR } + } +} +impl core::fmt::Debug for SWI5 { + fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result { + f.debug_struct("SWI5").finish() + } +} +#[doc = "Software interrupt 5"] +pub use self::swi0 as swi5; +#[doc = "Timer/Counter 3"] +pub struct TIMER3 { + _marker: PhantomData<*const ()>, +} +unsafe impl Send for TIMER3 {} +impl TIMER3 { + #[doc = r"Pointer to the register block"] + pub const PTR: *const timer0::RegisterBlock = 0x4001_a000 as *const _; + #[doc = r"Return the pointer to the register block"] + #[inline(always)] + pub const fn ptr() -> *const timer0::RegisterBlock { + Self::PTR + } +} +impl Deref for TIMER3 { + type Target = timer0::RegisterBlock; + #[inline(always)] + fn deref(&self) -> &Self::Target { + unsafe { &*Self::PTR } + } +} +impl core::fmt::Debug for TIMER3 { + fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result { + f.debug_struct("TIMER3").finish() + } +} +#[doc = "Timer/Counter 3"] +pub use self::timer0 as timer3; +#[doc = "Timer/Counter 4"] +pub struct TIMER4 { + _marker: PhantomData<*const ()>, +} +unsafe impl Send for TIMER4 {} +impl TIMER4 { + #[doc = r"Pointer to the register block"] + pub const PTR: *const timer0::RegisterBlock = 0x4001_b000 as *const _; + #[doc = r"Return the pointer to the register block"] + #[inline(always)] + pub const fn ptr() -> *const timer0::RegisterBlock { + Self::PTR + } +} +impl Deref for TIMER4 { + type Target = timer0::RegisterBlock; + #[inline(always)] + fn deref(&self) -> &Self::Target { + unsafe { &*Self::PTR } + } +} +impl core::fmt::Debug for TIMER4 { + fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result { + f.debug_struct("TIMER4").finish() + } +} +#[doc = "Timer/Counter 4"] +pub use self::timer0 as timer4; +#[doc = "Pulse Width Modulation Unit 0"] +pub struct PWM0 { + _marker: PhantomData<*const ()>, +} +unsafe impl Send for PWM0 {} +impl PWM0 { + #[doc = r"Pointer to the register block"] + pub const PTR: *const pwm0::RegisterBlock = 0x4001_c000 as *const _; + #[doc = r"Return the pointer to the register block"] + #[inline(always)] + pub const fn ptr() -> *const pwm0::RegisterBlock { + Self::PTR + } +} +impl Deref for PWM0 { + type Target = pwm0::RegisterBlock; + #[inline(always)] + fn deref(&self) -> &Self::Target { + unsafe { &*Self::PTR } + } +} +impl core::fmt::Debug for PWM0 { + fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result { + f.debug_struct("PWM0").finish() + } +} +#[doc = "Pulse Width Modulation Unit 0"] +pub mod pwm0; +#[doc = "Pulse Density Modulation (Digital Microphone) Interface"] +pub struct PDM { + _marker: PhantomData<*const ()>, +} +unsafe impl Send for PDM {} +impl PDM { + #[doc = r"Pointer to the register block"] + pub const PTR: *const pdm::RegisterBlock = 0x4001_d000 as *const _; + #[doc = r"Return the pointer to the register block"] + #[inline(always)] + pub const fn ptr() -> *const pdm::RegisterBlock { + Self::PTR + } +} +impl Deref for PDM { + type Target = pdm::RegisterBlock; + #[inline(always)] + fn deref(&self) -> &Self::Target { + unsafe { &*Self::PTR } + } +} +impl core::fmt::Debug for PDM { + fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result { + f.debug_struct("PDM").finish() + } +} +#[doc = "Pulse Density Modulation (Digital Microphone) Interface"] +pub mod pdm; +#[doc = "Non Volatile Memory Controller"] +pub struct NVMC { + _marker: PhantomData<*const ()>, +} +unsafe impl Send for NVMC {} +impl NVMC { + #[doc = r"Pointer to the register block"] + pub const PTR: *const nvmc::RegisterBlock = 0x4001_e000 as *const _; + #[doc = r"Return the pointer to the register block"] + #[inline(always)] + pub const fn ptr() -> *const nvmc::RegisterBlock { + Self::PTR + } +} +impl Deref for NVMC { + type Target = nvmc::RegisterBlock; + #[inline(always)] + fn deref(&self) -> &Self::Target { + unsafe { &*Self::PTR } + } +} +impl core::fmt::Debug for NVMC { + fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result { + f.debug_struct("NVMC").finish() + } +} +#[doc = "Non Volatile Memory Controller"] +pub mod nvmc; +#[doc = "Programmable Peripheral Interconnect"] +pub struct PPI { + _marker: PhantomData<*const ()>, +} +unsafe impl Send for PPI {} +impl PPI { + #[doc = r"Pointer to the register block"] + pub const PTR: *const ppi::RegisterBlock = 0x4001_f000 as *const _; + #[doc = r"Return the pointer to the register block"] + #[inline(always)] + pub const fn ptr() -> *const ppi::RegisterBlock { + Self::PTR + } +} +impl Deref for PPI { + type Target = ppi::RegisterBlock; + #[inline(always)] + fn deref(&self) -> &Self::Target { + unsafe { &*Self::PTR } + } +} +impl core::fmt::Debug for PPI { + fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result { + f.debug_struct("PPI").finish() + } +} +#[doc = "Programmable Peripheral Interconnect"] +pub mod ppi; +#[doc = "Memory Watch Unit"] +pub struct MWU { + _marker: PhantomData<*const ()>, +} +unsafe impl Send for MWU {} +impl MWU { + #[doc = r"Pointer to the register block"] + pub const PTR: *const mwu::RegisterBlock = 0x4002_0000 as *const _; + #[doc = r"Return the pointer to the register block"] + #[inline(always)] + pub const fn ptr() -> *const mwu::RegisterBlock { + Self::PTR + } +} +impl Deref for MWU { + type Target = mwu::RegisterBlock; + #[inline(always)] + fn deref(&self) -> &Self::Target { + unsafe { &*Self::PTR } + } +} +impl core::fmt::Debug for MWU { + fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result { + f.debug_struct("MWU").finish() + } +} +#[doc = "Memory Watch Unit"] +pub mod mwu; +#[doc = "Pulse Width Modulation Unit 1"] +pub struct PWM1 { + _marker: PhantomData<*const ()>, +} +unsafe impl Send for PWM1 {} +impl PWM1 { + #[doc = r"Pointer to the register block"] + pub const PTR: *const pwm0::RegisterBlock = 0x4002_1000 as *const _; + #[doc = r"Return the pointer to the register block"] + #[inline(always)] + pub const fn ptr() -> *const pwm0::RegisterBlock { + Self::PTR + } +} +impl Deref for PWM1 { + type Target = pwm0::RegisterBlock; + #[inline(always)] + fn deref(&self) -> &Self::Target { + unsafe { &*Self::PTR } + } +} +impl core::fmt::Debug for PWM1 { + fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result { + f.debug_struct("PWM1").finish() + } +} +#[doc = "Pulse Width Modulation Unit 1"] +pub use self::pwm0 as pwm1; +#[doc = "Pulse Width Modulation Unit 2"] +pub struct PWM2 { + _marker: PhantomData<*const ()>, +} +unsafe impl Send for PWM2 {} +impl PWM2 { + #[doc = r"Pointer to the register block"] + pub const PTR: *const pwm0::RegisterBlock = 0x4002_2000 as *const _; + #[doc = r"Return the pointer to the register block"] + #[inline(always)] + pub const fn ptr() -> *const pwm0::RegisterBlock { + Self::PTR + } +} +impl Deref for PWM2 { + type Target = pwm0::RegisterBlock; + #[inline(always)] + fn deref(&self) -> &Self::Target { + unsafe { &*Self::PTR } + } +} +impl core::fmt::Debug for PWM2 { + fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result { + f.debug_struct("PWM2").finish() + } +} +#[doc = "Pulse Width Modulation Unit 2"] +pub use self::pwm0 as pwm2; +#[doc = "Serial Peripheral Interface 2"] +pub struct SPI2 { + _marker: PhantomData<*const ()>, +} +unsafe impl Send for SPI2 {} +impl SPI2 { + #[doc = r"Pointer to the register block"] + pub const PTR: *const spi0::RegisterBlock = 0x4002_3000 as *const _; + #[doc = r"Return the pointer to the register block"] + #[inline(always)] + pub const fn ptr() -> *const spi0::RegisterBlock { + Self::PTR + } +} +impl Deref for SPI2 { + type Target = spi0::RegisterBlock; + #[inline(always)] + fn deref(&self) -> &Self::Target { + unsafe { &*Self::PTR } + } +} +impl core::fmt::Debug for SPI2 { + fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result { + f.debug_struct("SPI2").finish() + } +} +#[doc = "Serial Peripheral Interface 2"] +pub use self::spi0 as spi2; +#[doc = "Serial Peripheral Interface Master with EasyDMA 2"] +pub struct SPIM2 { + _marker: PhantomData<*const ()>, +} +unsafe impl Send for SPIM2 {} +impl SPIM2 { + #[doc = r"Pointer to the register block"] + pub const PTR: *const spim0::RegisterBlock = 0x4002_3000 as *const _; + #[doc = r"Return the pointer to the register block"] + #[inline(always)] + pub const fn ptr() -> *const spim0::RegisterBlock { + Self::PTR + } +} +impl Deref for SPIM2 { + type Target = spim0::RegisterBlock; + #[inline(always)] + fn deref(&self) -> &Self::Target { + unsafe { &*Self::PTR } + } +} +impl core::fmt::Debug for SPIM2 { + fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result { + f.debug_struct("SPIM2").finish() + } +} +#[doc = "Serial Peripheral Interface Master with EasyDMA 2"] +pub use self::spim0 as spim2; +#[doc = "SPI Slave 2"] +pub struct SPIS2 { + _marker: PhantomData<*const ()>, +} +unsafe impl Send for SPIS2 {} +impl SPIS2 { + #[doc = r"Pointer to the register block"] + pub const PTR: *const spis0::RegisterBlock = 0x4002_3000 as *const _; + #[doc = r"Return the pointer to the register block"] + #[inline(always)] + pub const fn ptr() -> *const spis0::RegisterBlock { + Self::PTR + } +} +impl Deref for SPIS2 { + type Target = spis0::RegisterBlock; + #[inline(always)] + fn deref(&self) -> &Self::Target { + unsafe { &*Self::PTR } + } +} +impl core::fmt::Debug for SPIS2 { + fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result { + f.debug_struct("SPIS2").finish() + } +} +#[doc = "SPI Slave 2"] +pub use self::spis0 as spis2; +#[doc = "Real time counter 2"] +pub struct RTC2 { + _marker: PhantomData<*const ()>, +} +unsafe impl Send for RTC2 {} +impl RTC2 { + #[doc = r"Pointer to the register block"] + pub const PTR: *const rtc0::RegisterBlock = 0x4002_4000 as *const _; + #[doc = r"Return the pointer to the register block"] + #[inline(always)] + pub const fn ptr() -> *const rtc0::RegisterBlock { + Self::PTR + } +} +impl Deref for RTC2 { + type Target = rtc0::RegisterBlock; + #[inline(always)] + fn deref(&self) -> &Self::Target { + unsafe { &*Self::PTR } + } +} +impl core::fmt::Debug for RTC2 { + fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result { + f.debug_struct("RTC2").finish() + } +} +#[doc = "Real time counter 2"] +pub use self::rtc0 as rtc2; +#[doc = "Inter-IC Sound"] +pub struct I2S { + _marker: PhantomData<*const ()>, +} +unsafe impl Send for I2S {} +impl I2S { + #[doc = r"Pointer to the register block"] + pub const PTR: *const i2s::RegisterBlock = 0x4002_5000 as *const _; + #[doc = r"Return the pointer to the register block"] + #[inline(always)] + pub const fn ptr() -> *const i2s::RegisterBlock { + Self::PTR + } +} +impl Deref for I2S { + type Target = i2s::RegisterBlock; + #[inline(always)] + fn deref(&self) -> &Self::Target { + unsafe { &*Self::PTR } + } +} +impl core::fmt::Debug for I2S { + fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result { + f.debug_struct("I2S").finish() + } +} +#[doc = "Inter-IC Sound"] +pub mod i2s; +#[no_mangle] +static mut DEVICE_PERIPHERALS: bool = false; +#[doc = r" All the peripherals."] +#[allow(non_snake_case)] +pub struct Peripherals { + #[doc = "FICR"] + pub FICR: FICR, + #[doc = "UICR"] + pub UICR: UICR, + #[doc = "APPROTECT"] + pub APPROTECT: APPROTECT, + #[doc = "BPROT"] + pub BPROT: BPROT, + #[doc = "CLOCK"] + pub CLOCK: CLOCK, + #[doc = "POWER"] + pub POWER: POWER, + #[doc = "P0"] + pub P0: P0, + #[doc = "RADIO"] + pub RADIO: RADIO, + #[doc = "UART0"] + pub UART0: UART0, + #[doc = "UARTE0"] + pub UARTE0: UARTE0, + #[doc = "SPI0"] + pub SPI0: SPI0, + #[doc = "SPIM0"] + pub SPIM0: SPIM0, + #[doc = "SPIS0"] + pub SPIS0: SPIS0, + #[doc = "TWI0"] + pub TWI0: TWI0, + #[doc = "TWIM0"] + pub TWIM0: TWIM0, + #[doc = "TWIS0"] + pub TWIS0: TWIS0, + #[doc = "SPI1"] + pub SPI1: SPI1, + #[doc = "SPIM1"] + pub SPIM1: SPIM1, + #[doc = "SPIS1"] + pub SPIS1: SPIS1, + #[doc = "TWI1"] + pub TWI1: TWI1, + #[doc = "TWIM1"] + pub TWIM1: TWIM1, + #[doc = "TWIS1"] + pub TWIS1: TWIS1, + #[doc = "NFCT"] + pub NFCT: NFCT, + #[doc = "GPIOTE"] + pub GPIOTE: GPIOTE, + #[doc = "SAADC"] + pub SAADC: SAADC, + #[doc = "TIMER0"] + pub TIMER0: TIMER0, + #[doc = "TIMER1"] + pub TIMER1: TIMER1, + #[doc = "TIMER2"] + pub TIMER2: TIMER2, + #[doc = "RTC0"] + pub RTC0: RTC0, + #[doc = "TEMP"] + pub TEMP: TEMP, + #[doc = "RNG"] + pub RNG: RNG, + #[doc = "ECB"] + pub ECB: ECB, + #[doc = "AAR"] + pub AAR: AAR, + #[doc = "CCM"] + pub CCM: CCM, + #[doc = "WDT"] + pub WDT: WDT, + #[doc = "RTC1"] + pub RTC1: RTC1, + #[doc = "QDEC"] + pub QDEC: QDEC, + #[doc = "COMP"] + pub COMP: COMP, + #[doc = "LPCOMP"] + pub LPCOMP: LPCOMP, + #[doc = "EGU0"] + pub EGU0: EGU0, + #[doc = "SWI0"] + pub SWI0: SWI0, + #[doc = "EGU1"] + pub EGU1: EGU1, + #[doc = "SWI1"] + pub SWI1: SWI1, + #[doc = "EGU2"] + pub EGU2: EGU2, + #[doc = "SWI2"] + pub SWI2: SWI2, + #[doc = "EGU3"] + pub EGU3: EGU3, + #[doc = "SWI3"] + pub SWI3: SWI3, + #[doc = "EGU4"] + pub EGU4: EGU4, + #[doc = "SWI4"] + pub SWI4: SWI4, + #[doc = "EGU5"] + pub EGU5: EGU5, + #[doc = "SWI5"] + pub SWI5: SWI5, + #[doc = "TIMER3"] + pub TIMER3: TIMER3, + #[doc = "TIMER4"] + pub TIMER4: TIMER4, + #[doc = "PWM0"] + pub PWM0: PWM0, + #[doc = "PDM"] + pub PDM: PDM, + #[doc = "NVMC"] + pub NVMC: NVMC, + #[doc = "PPI"] + pub PPI: PPI, + #[doc = "MWU"] + pub MWU: MWU, + #[doc = "PWM1"] + pub PWM1: PWM1, + #[doc = "PWM2"] + pub PWM2: PWM2, + #[doc = "SPI2"] + pub SPI2: SPI2, + #[doc = "SPIM2"] + pub SPIM2: SPIM2, + #[doc = "SPIS2"] + pub SPIS2: SPIS2, + #[doc = "RTC2"] + pub RTC2: RTC2, + #[doc = "I2S"] + pub I2S: I2S, +} +impl Peripherals { + #[doc = r" Returns all the peripherals *once*."] + #[cfg(feature = "critical-section")] + #[inline] + pub fn take() -> Option { + critical_section::with(|_| { + if unsafe { DEVICE_PERIPHERALS } { + return None; + } + Some(unsafe { Peripherals::steal() }) + }) + } + #[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; + Peripherals { + FICR: FICR { + _marker: PhantomData, + }, + UICR: UICR { + _marker: PhantomData, + }, + APPROTECT: APPROTECT { + _marker: PhantomData, + }, + BPROT: BPROT { + _marker: PhantomData, + }, + CLOCK: CLOCK { + _marker: PhantomData, + }, + POWER: POWER { + _marker: PhantomData, + }, + P0: P0 { + _marker: PhantomData, + }, + RADIO: RADIO { + _marker: PhantomData, + }, + UART0: UART0 { + _marker: PhantomData, + }, + UARTE0: UARTE0 { + _marker: PhantomData, + }, + SPI0: SPI0 { + _marker: PhantomData, + }, + SPIM0: SPIM0 { + _marker: PhantomData, + }, + SPIS0: SPIS0 { + _marker: PhantomData, + }, + TWI0: TWI0 { + _marker: PhantomData, + }, + TWIM0: TWIM0 { + _marker: PhantomData, + }, + TWIS0: TWIS0 { + _marker: PhantomData, + }, + SPI1: SPI1 { + _marker: PhantomData, + }, + SPIM1: SPIM1 { + _marker: PhantomData, + }, + SPIS1: SPIS1 { + _marker: PhantomData, + }, + TWI1: TWI1 { + _marker: PhantomData, + }, + TWIM1: TWIM1 { + _marker: PhantomData, + }, + TWIS1: TWIS1 { + _marker: PhantomData, + }, + NFCT: NFCT { + _marker: PhantomData, + }, + GPIOTE: GPIOTE { + _marker: PhantomData, + }, + SAADC: SAADC { + _marker: PhantomData, + }, + TIMER0: TIMER0 { + _marker: PhantomData, + }, + TIMER1: TIMER1 { + _marker: PhantomData, + }, + TIMER2: TIMER2 { + _marker: PhantomData, + }, + RTC0: RTC0 { + _marker: PhantomData, + }, + TEMP: TEMP { + _marker: PhantomData, + }, + RNG: RNG { + _marker: PhantomData, + }, + ECB: ECB { + _marker: PhantomData, + }, + AAR: AAR { + _marker: PhantomData, + }, + CCM: CCM { + _marker: PhantomData, + }, + WDT: WDT { + _marker: PhantomData, + }, + RTC1: RTC1 { + _marker: PhantomData, + }, + QDEC: QDEC { + _marker: PhantomData, + }, + COMP: COMP { + _marker: PhantomData, + }, + LPCOMP: LPCOMP { + _marker: PhantomData, + }, + EGU0: EGU0 { + _marker: PhantomData, + }, + SWI0: SWI0 { + _marker: PhantomData, + }, + EGU1: EGU1 { + _marker: PhantomData, + }, + SWI1: SWI1 { + _marker: PhantomData, + }, + EGU2: EGU2 { + _marker: PhantomData, + }, + SWI2: SWI2 { + _marker: PhantomData, + }, + EGU3: EGU3 { + _marker: PhantomData, + }, + SWI3: SWI3 { + _marker: PhantomData, + }, + EGU4: EGU4 { + _marker: PhantomData, + }, + SWI4: SWI4 { + _marker: PhantomData, + }, + EGU5: EGU5 { + _marker: PhantomData, + }, + SWI5: SWI5 { + _marker: PhantomData, + }, + TIMER3: TIMER3 { + _marker: PhantomData, + }, + TIMER4: TIMER4 { + _marker: PhantomData, + }, + PWM0: PWM0 { + _marker: PhantomData, + }, + PDM: PDM { + _marker: PhantomData, + }, + NVMC: NVMC { + _marker: PhantomData, + }, + PPI: PPI { + _marker: PhantomData, + }, + MWU: MWU { + _marker: PhantomData, + }, + PWM1: PWM1 { + _marker: PhantomData, + }, + PWM2: PWM2 { + _marker: PhantomData, + }, + SPI2: SPI2 { + _marker: PhantomData, + }, + SPIM2: SPIM2 { + _marker: PhantomData, + }, + SPIS2: SPIS2 { + _marker: PhantomData, + }, + RTC2: RTC2 { + _marker: PhantomData, + }, + I2S: I2S { + _marker: PhantomData, + }, + } + } +} diff --git a/down-the-stack/dk_pac/src/lpcomp.rs b/down-the-stack/dk_pac/src/lpcomp.rs new file mode 100644 index 0000000..914b3d1 --- /dev/null +++ b/down-the-stack/dk_pac/src/lpcomp.rs @@ -0,0 +1,113 @@ +#[doc = r"Register block"] +#[repr(C)] +pub struct RegisterBlock { + #[doc = "0x00 - Start comparator"] + pub tasks_start: TASKS_START, + #[doc = "0x04 - Stop comparator"] + pub tasks_stop: TASKS_STOP, + #[doc = "0x08 - Sample comparator value"] + pub tasks_sample: TASKS_SAMPLE, + _reserved3: [u8; 0xf4], + #[doc = "0x100 - LPCOMP is ready and output is valid"] + pub events_ready: EVENTS_READY, + #[doc = "0x104 - Downward crossing"] + pub events_down: EVENTS_DOWN, + #[doc = "0x108 - Upward crossing"] + pub events_up: EVENTS_UP, + #[doc = "0x10c - Downward or upward crossing"] + pub events_cross: EVENTS_CROSS, + _reserved7: [u8; 0xf0], + #[doc = "0x200 - Shortcuts between local events and tasks"] + pub shorts: SHORTS, + _reserved8: [u8; 0x0100], + #[doc = "0x304 - Enable interrupt"] + pub intenset: INTENSET, + #[doc = "0x308 - Disable interrupt"] + pub intenclr: INTENCLR, + _reserved10: [u8; 0xf4], + #[doc = "0x400 - Compare result"] + pub result: RESULT, + _reserved11: [u8; 0xfc], + #[doc = "0x500 - Enable LPCOMP"] + pub enable: ENABLE, + #[doc = "0x504 - Input pin select"] + pub psel: PSEL, + #[doc = "0x508 - Reference select"] + pub refsel: REFSEL, + #[doc = "0x50c - External reference select"] + pub extrefsel: EXTREFSEL, + _reserved15: [u8; 0x10], + #[doc = "0x520 - Analog detect configuration"] + pub anadetect: ANADETECT, + _reserved16: [u8; 0x14], + #[doc = "0x538 - Comparator hysteresis enable"] + pub hyst: HYST, +} +#[doc = "TASKS_START (w) register accessor: an alias for `Reg`"] +pub type TASKS_START = crate::Reg; +#[doc = "Start comparator"] +pub mod tasks_start; +#[doc = "TASKS_STOP (w) register accessor: an alias for `Reg`"] +pub type TASKS_STOP = crate::Reg; +#[doc = "Stop comparator"] +pub mod tasks_stop; +#[doc = "TASKS_SAMPLE (w) register accessor: an alias for `Reg`"] +pub type TASKS_SAMPLE = crate::Reg; +#[doc = "Sample comparator value"] +pub mod tasks_sample; +#[doc = "EVENTS_READY (rw) register accessor: an alias for `Reg`"] +pub type EVENTS_READY = crate::Reg; +#[doc = "LPCOMP is ready and output is valid"] +pub mod events_ready; +#[doc = "EVENTS_DOWN (rw) register accessor: an alias for `Reg`"] +pub type EVENTS_DOWN = crate::Reg; +#[doc = "Downward crossing"] +pub mod events_down; +#[doc = "EVENTS_UP (rw) register accessor: an alias for `Reg`"] +pub type EVENTS_UP = crate::Reg; +#[doc = "Upward crossing"] +pub mod events_up; +#[doc = "EVENTS_CROSS (rw) register accessor: an alias for `Reg`"] +pub type EVENTS_CROSS = crate::Reg; +#[doc = "Downward or upward crossing"] +pub mod events_cross; +#[doc = "SHORTS (rw) register accessor: an alias for `Reg`"] +pub type SHORTS = crate::Reg; +#[doc = "Shortcuts between local events and tasks"] +pub mod shorts; +#[doc = "INTENSET (rw) register accessor: an alias for `Reg`"] +pub type INTENSET = crate::Reg; +#[doc = "Enable interrupt"] +pub mod intenset; +#[doc = "INTENCLR (rw) register accessor: an alias for `Reg`"] +pub type INTENCLR = crate::Reg; +#[doc = "Disable interrupt"] +pub mod intenclr; +#[doc = "RESULT (r) register accessor: an alias for `Reg`"] +pub type RESULT = crate::Reg; +#[doc = "Compare result"] +pub mod result; +#[doc = "ENABLE (rw) register accessor: an alias for `Reg`"] +pub type ENABLE = crate::Reg; +#[doc = "Enable LPCOMP"] +pub mod enable; +#[doc = "PSEL (rw) register accessor: an alias for `Reg`"] +pub type PSEL = crate::Reg; +#[doc = "Input pin select"] +pub mod psel; +#[doc = "REFSEL (rw) register accessor: an alias for `Reg`"] +pub type REFSEL = crate::Reg; +#[doc = "Reference select"] +pub mod refsel; +#[doc = "EXTREFSEL (rw) register accessor: an alias for `Reg`"] +pub type EXTREFSEL = crate::Reg; +#[doc = "External reference select"] +pub mod extrefsel; +#[doc = "ANADETECT (rw) register accessor: an alias for `Reg`"] +pub type ANADETECT = crate::Reg; +#[doc = "Analog detect configuration"] +pub mod anadetect; +#[doc = "HYST (rw) register accessor: an alias for `Reg`"] +pub type HYST = crate::Reg; +#[doc = "Comparator hysteresis enable"] +pub mod hyst; diff --git a/down-the-stack/dk_pac/src/lpcomp/anadetect.rs b/down-the-stack/dk_pac/src/lpcomp/anadetect.rs new file mode 100644 index 0000000..c2db126 --- /dev/null +++ b/down-the-stack/dk_pac/src/lpcomp/anadetect.rs @@ -0,0 +1,142 @@ +#[doc = "Register `ANADETECT` 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 `ANADETECT` 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 `ANADETECT` reader - Analog detect configuration"] +pub type ANADETECT_R = crate::FieldReader; +#[doc = "Analog detect configuration\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +#[repr(u8)] +pub enum ANADETECT_A { + #[doc = "0: Generate ANADETECT on crossing, both upward crossing and downward crossing"] + CROSS = 0, + #[doc = "1: Generate ANADETECT on upward crossing only"] + UP = 1, + #[doc = "2: Generate ANADETECT on downward crossing only"] + DOWN = 2, +} +impl From for u8 { + #[inline(always)] + fn from(variant: ANADETECT_A) -> Self { + variant as _ + } +} +impl ANADETECT_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> Option { + match self.bits { + 0 => Some(ANADETECT_A::CROSS), + 1 => Some(ANADETECT_A::UP), + 2 => Some(ANADETECT_A::DOWN), + _ => None, + } + } + #[doc = "Checks if the value of the field is `CROSS`"] + #[inline(always)] + pub fn is_cross(&self) -> bool { + *self == ANADETECT_A::CROSS + } + #[doc = "Checks if the value of the field is `UP`"] + #[inline(always)] + pub fn is_up(&self) -> bool { + *self == ANADETECT_A::UP + } + #[doc = "Checks if the value of the field is `DOWN`"] + #[inline(always)] + pub fn is_down(&self) -> bool { + *self == ANADETECT_A::DOWN + } +} +#[doc = "Field `ANADETECT` writer - Analog detect configuration"] +pub type ANADETECT_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, ANADETECT_SPEC, u8, ANADETECT_A, 2, O>; +impl<'a, const O: u8> ANADETECT_W<'a, O> { + #[doc = "Generate ANADETECT on crossing, both upward crossing and downward crossing"] + #[inline(always)] + pub fn cross(self) -> &'a mut W { + self.variant(ANADETECT_A::CROSS) + } + #[doc = "Generate ANADETECT on upward crossing only"] + #[inline(always)] + pub fn up(self) -> &'a mut W { + self.variant(ANADETECT_A::UP) + } + #[doc = "Generate ANADETECT on downward crossing only"] + #[inline(always)] + pub fn down(self) -> &'a mut W { + self.variant(ANADETECT_A::DOWN) + } +} +impl R { + #[doc = "Bits 0:1 - Analog detect configuration"] + #[inline(always)] + pub fn anadetect(&self) -> ANADETECT_R { + ANADETECT_R::new((self.bits & 3) as u8) + } +} +impl W { + #[doc = "Bits 0:1 - Analog detect configuration"] + #[inline(always)] + #[must_use] + pub fn anadetect(&mut self) -> ANADETECT_W<0> { + ANADETECT_W::new(self) + } + #[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 = "Analog detect configuration\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 [anadetect](index.html) module"] +pub struct ANADETECT_SPEC; +impl crate::RegisterSpec for ANADETECT_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [anadetect::R](R) reader structure"] +impl crate::Readable for ANADETECT_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [anadetect::W](W) writer structure"] +impl crate::Writable for ANADETECT_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets ANADETECT to value 0"] +impl crate::Resettable for ANADETECT_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/lpcomp/enable.rs b/down-the-stack/dk_pac/src/lpcomp/enable.rs new file mode 100644 index 0000000..4d93bb5 --- /dev/null +++ b/down-the-stack/dk_pac/src/lpcomp/enable.rs @@ -0,0 +1,128 @@ +#[doc = "Register `ENABLE` 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 `ENABLE` 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 `ENABLE` reader - Enable or disable LPCOMP"] +pub type ENABLE_R = crate::FieldReader; +#[doc = "Enable or disable LPCOMP\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +#[repr(u8)] +pub enum ENABLE_A { + #[doc = "0: Disable"] + DISABLED = 0, + #[doc = "1: Enable"] + ENABLED = 1, +} +impl From for u8 { + #[inline(always)] + fn from(variant: ENABLE_A) -> Self { + variant as _ + } +} +impl ENABLE_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> Option { + match self.bits { + 0 => Some(ENABLE_A::DISABLED), + 1 => Some(ENABLE_A::ENABLED), + _ => None, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == ENABLE_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == ENABLE_A::ENABLED + } +} +#[doc = "Field `ENABLE` writer - Enable or disable LPCOMP"] +pub type ENABLE_W<'a, const O: u8> = crate::FieldWriter<'a, u32, ENABLE_SPEC, u8, ENABLE_A, 2, O>; +impl<'a, const O: u8> ENABLE_W<'a, O> { + #[doc = "Disable"] + #[inline(always)] + pub fn disabled(self) -> &'a mut W { + self.variant(ENABLE_A::DISABLED) + } + #[doc = "Enable"] + #[inline(always)] + pub fn enabled(self) -> &'a mut W { + self.variant(ENABLE_A::ENABLED) + } +} +impl R { + #[doc = "Bits 0:1 - Enable or disable LPCOMP"] + #[inline(always)] + pub fn enable(&self) -> ENABLE_R { + ENABLE_R::new((self.bits & 3) as u8) + } +} +impl W { + #[doc = "Bits 0:1 - Enable or disable LPCOMP"] + #[inline(always)] + #[must_use] + pub fn enable(&mut self) -> ENABLE_W<0> { + 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 + } +} +#[doc = "Enable LPCOMP\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 [enable](index.html) module"] +pub struct ENABLE_SPEC; +impl crate::RegisterSpec for ENABLE_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [enable::R](R) reader structure"] +impl crate::Readable for ENABLE_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [enable::W](W) writer structure"] +impl crate::Writable for ENABLE_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets ENABLE to value 0"] +impl crate::Resettable for ENABLE_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/lpcomp/events_cross.rs b/down-the-stack/dk_pac/src/lpcomp/events_cross.rs new file mode 100644 index 0000000..e0925b7 --- /dev/null +++ b/down-the-stack/dk_pac/src/lpcomp/events_cross.rs @@ -0,0 +1,127 @@ +#[doc = "Register `EVENTS_CROSS` 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 `EVENTS_CROSS` 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 `EVENTS_CROSS` reader - Downward or upward crossing"] +pub type EVENTS_CROSS_R = crate::BitReader; +#[doc = "Downward or upward crossing\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum EVENTS_CROSS_A { + #[doc = "0: Event not generated"] + NOT_GENERATED = 0, + #[doc = "1: Event generated"] + GENERATED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: EVENTS_CROSS_A) -> Self { + variant as u8 != 0 + } +} +impl EVENTS_CROSS_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> EVENTS_CROSS_A { + match self.bits { + false => EVENTS_CROSS_A::NOT_GENERATED, + true => EVENTS_CROSS_A::GENERATED, + } + } + #[doc = "Checks if the value of the field is `NOT_GENERATED`"] + #[inline(always)] + pub fn is_not_generated(&self) -> bool { + *self == EVENTS_CROSS_A::NOT_GENERATED + } + #[doc = "Checks if the value of the field is `GENERATED`"] + #[inline(always)] + pub fn is_generated(&self) -> bool { + *self == EVENTS_CROSS_A::GENERATED + } +} +#[doc = "Field `EVENTS_CROSS` writer - Downward or upward crossing"] +pub type EVENTS_CROSS_W<'a, const O: u8> = + crate::BitWriter<'a, u32, EVENTS_CROSS_SPEC, EVENTS_CROSS_A, O>; +impl<'a, const O: u8> EVENTS_CROSS_W<'a, O> { + #[doc = "Event not generated"] + #[inline(always)] + pub fn not_generated(self) -> &'a mut W { + self.variant(EVENTS_CROSS_A::NOT_GENERATED) + } + #[doc = "Event generated"] + #[inline(always)] + pub fn generated(self) -> &'a mut W { + self.variant(EVENTS_CROSS_A::GENERATED) + } +} +impl R { + #[doc = "Bit 0 - Downward or upward crossing"] + #[inline(always)] + pub fn events_cross(&self) -> EVENTS_CROSS_R { + EVENTS_CROSS_R::new((self.bits & 1) != 0) + } +} +impl W { + #[doc = "Bit 0 - Downward or upward crossing"] + #[inline(always)] + #[must_use] + pub fn events_cross(&mut self) -> EVENTS_CROSS_W<0> { + EVENTS_CROSS_W::new(self) + } + #[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 = "Downward or upward crossing\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 [events_cross](index.html) module"] +pub struct EVENTS_CROSS_SPEC; +impl crate::RegisterSpec for EVENTS_CROSS_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [events_cross::R](R) reader structure"] +impl crate::Readable for EVENTS_CROSS_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [events_cross::W](W) writer structure"] +impl crate::Writable for EVENTS_CROSS_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets EVENTS_CROSS to value 0"] +impl crate::Resettable for EVENTS_CROSS_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/lpcomp/events_down.rs b/down-the-stack/dk_pac/src/lpcomp/events_down.rs new file mode 100644 index 0000000..febe130 --- /dev/null +++ b/down-the-stack/dk_pac/src/lpcomp/events_down.rs @@ -0,0 +1,127 @@ +#[doc = "Register `EVENTS_DOWN` 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 `EVENTS_DOWN` 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 `EVENTS_DOWN` reader - Downward crossing"] +pub type EVENTS_DOWN_R = crate::BitReader; +#[doc = "Downward crossing\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum EVENTS_DOWN_A { + #[doc = "0: Event not generated"] + NOT_GENERATED = 0, + #[doc = "1: Event generated"] + GENERATED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: EVENTS_DOWN_A) -> Self { + variant as u8 != 0 + } +} +impl EVENTS_DOWN_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> EVENTS_DOWN_A { + match self.bits { + false => EVENTS_DOWN_A::NOT_GENERATED, + true => EVENTS_DOWN_A::GENERATED, + } + } + #[doc = "Checks if the value of the field is `NOT_GENERATED`"] + #[inline(always)] + pub fn is_not_generated(&self) -> bool { + *self == EVENTS_DOWN_A::NOT_GENERATED + } + #[doc = "Checks if the value of the field is `GENERATED`"] + #[inline(always)] + pub fn is_generated(&self) -> bool { + *self == EVENTS_DOWN_A::GENERATED + } +} +#[doc = "Field `EVENTS_DOWN` writer - Downward crossing"] +pub type EVENTS_DOWN_W<'a, const O: u8> = + crate::BitWriter<'a, u32, EVENTS_DOWN_SPEC, EVENTS_DOWN_A, O>; +impl<'a, const O: u8> EVENTS_DOWN_W<'a, O> { + #[doc = "Event not generated"] + #[inline(always)] + pub fn not_generated(self) -> &'a mut W { + self.variant(EVENTS_DOWN_A::NOT_GENERATED) + } + #[doc = "Event generated"] + #[inline(always)] + pub fn generated(self) -> &'a mut W { + self.variant(EVENTS_DOWN_A::GENERATED) + } +} +impl R { + #[doc = "Bit 0 - Downward crossing"] + #[inline(always)] + pub fn events_down(&self) -> EVENTS_DOWN_R { + EVENTS_DOWN_R::new((self.bits & 1) != 0) + } +} +impl W { + #[doc = "Bit 0 - Downward crossing"] + #[inline(always)] + #[must_use] + pub fn events_down(&mut self) -> EVENTS_DOWN_W<0> { + EVENTS_DOWN_W::new(self) + } + #[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 = "Downward crossing\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 [events_down](index.html) module"] +pub struct EVENTS_DOWN_SPEC; +impl crate::RegisterSpec for EVENTS_DOWN_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [events_down::R](R) reader structure"] +impl crate::Readable for EVENTS_DOWN_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [events_down::W](W) writer structure"] +impl crate::Writable for EVENTS_DOWN_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets EVENTS_DOWN to value 0"] +impl crate::Resettable for EVENTS_DOWN_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/lpcomp/events_ready.rs b/down-the-stack/dk_pac/src/lpcomp/events_ready.rs new file mode 100644 index 0000000..b071899 --- /dev/null +++ b/down-the-stack/dk_pac/src/lpcomp/events_ready.rs @@ -0,0 +1,127 @@ +#[doc = "Register `EVENTS_READY` 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 `EVENTS_READY` 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 `EVENTS_READY` reader - LPCOMP is ready and output is valid"] +pub type EVENTS_READY_R = crate::BitReader; +#[doc = "LPCOMP is ready and output is valid\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum EVENTS_READY_A { + #[doc = "0: Event not generated"] + NOT_GENERATED = 0, + #[doc = "1: Event generated"] + GENERATED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: EVENTS_READY_A) -> Self { + variant as u8 != 0 + } +} +impl EVENTS_READY_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> EVENTS_READY_A { + match self.bits { + false => EVENTS_READY_A::NOT_GENERATED, + true => EVENTS_READY_A::GENERATED, + } + } + #[doc = "Checks if the value of the field is `NOT_GENERATED`"] + #[inline(always)] + pub fn is_not_generated(&self) -> bool { + *self == EVENTS_READY_A::NOT_GENERATED + } + #[doc = "Checks if the value of the field is `GENERATED`"] + #[inline(always)] + pub fn is_generated(&self) -> bool { + *self == EVENTS_READY_A::GENERATED + } +} +#[doc = "Field `EVENTS_READY` writer - LPCOMP is ready and output is valid"] +pub type EVENTS_READY_W<'a, const O: u8> = + crate::BitWriter<'a, u32, EVENTS_READY_SPEC, EVENTS_READY_A, O>; +impl<'a, const O: u8> EVENTS_READY_W<'a, O> { + #[doc = "Event not generated"] + #[inline(always)] + pub fn not_generated(self) -> &'a mut W { + self.variant(EVENTS_READY_A::NOT_GENERATED) + } + #[doc = "Event generated"] + #[inline(always)] + pub fn generated(self) -> &'a mut W { + self.variant(EVENTS_READY_A::GENERATED) + } +} +impl R { + #[doc = "Bit 0 - LPCOMP is ready and output is valid"] + #[inline(always)] + pub fn events_ready(&self) -> EVENTS_READY_R { + EVENTS_READY_R::new((self.bits & 1) != 0) + } +} +impl W { + #[doc = "Bit 0 - LPCOMP is ready and output is valid"] + #[inline(always)] + #[must_use] + pub fn events_ready(&mut self) -> EVENTS_READY_W<0> { + EVENTS_READY_W::new(self) + } + #[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 = "LPCOMP is ready and output is valid\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 [events_ready](index.html) module"] +pub struct EVENTS_READY_SPEC; +impl crate::RegisterSpec for EVENTS_READY_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [events_ready::R](R) reader structure"] +impl crate::Readable for EVENTS_READY_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [events_ready::W](W) writer structure"] +impl crate::Writable for EVENTS_READY_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets EVENTS_READY to value 0"] +impl crate::Resettable for EVENTS_READY_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/lpcomp/events_up.rs b/down-the-stack/dk_pac/src/lpcomp/events_up.rs new file mode 100644 index 0000000..81b5382 --- /dev/null +++ b/down-the-stack/dk_pac/src/lpcomp/events_up.rs @@ -0,0 +1,126 @@ +#[doc = "Register `EVENTS_UP` 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 `EVENTS_UP` 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 `EVENTS_UP` reader - Upward crossing"] +pub type EVENTS_UP_R = crate::BitReader; +#[doc = "Upward crossing\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum EVENTS_UP_A { + #[doc = "0: Event not generated"] + NOT_GENERATED = 0, + #[doc = "1: Event generated"] + GENERATED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: EVENTS_UP_A) -> Self { + variant as u8 != 0 + } +} +impl EVENTS_UP_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> EVENTS_UP_A { + match self.bits { + false => EVENTS_UP_A::NOT_GENERATED, + true => EVENTS_UP_A::GENERATED, + } + } + #[doc = "Checks if the value of the field is `NOT_GENERATED`"] + #[inline(always)] + pub fn is_not_generated(&self) -> bool { + *self == EVENTS_UP_A::NOT_GENERATED + } + #[doc = "Checks if the value of the field is `GENERATED`"] + #[inline(always)] + pub fn is_generated(&self) -> bool { + *self == EVENTS_UP_A::GENERATED + } +} +#[doc = "Field `EVENTS_UP` writer - Upward crossing"] +pub type EVENTS_UP_W<'a, const O: u8> = crate::BitWriter<'a, u32, EVENTS_UP_SPEC, EVENTS_UP_A, O>; +impl<'a, const O: u8> EVENTS_UP_W<'a, O> { + #[doc = "Event not generated"] + #[inline(always)] + pub fn not_generated(self) -> &'a mut W { + self.variant(EVENTS_UP_A::NOT_GENERATED) + } + #[doc = "Event generated"] + #[inline(always)] + pub fn generated(self) -> &'a mut W { + self.variant(EVENTS_UP_A::GENERATED) + } +} +impl R { + #[doc = "Bit 0 - Upward crossing"] + #[inline(always)] + pub fn events_up(&self) -> EVENTS_UP_R { + EVENTS_UP_R::new((self.bits & 1) != 0) + } +} +impl W { + #[doc = "Bit 0 - Upward crossing"] + #[inline(always)] + #[must_use] + pub fn events_up(&mut self) -> EVENTS_UP_W<0> { + EVENTS_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 + } +} +#[doc = "Upward crossing\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 [events_up](index.html) module"] +pub struct EVENTS_UP_SPEC; +impl crate::RegisterSpec for EVENTS_UP_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [events_up::R](R) reader structure"] +impl crate::Readable for EVENTS_UP_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [events_up::W](W) writer structure"] +impl crate::Writable for EVENTS_UP_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets EVENTS_UP to value 0"] +impl crate::Resettable for EVENTS_UP_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/lpcomp/extrefsel.rs b/down-the-stack/dk_pac/src/lpcomp/extrefsel.rs new file mode 100644 index 0000000..9d06c2e --- /dev/null +++ b/down-the-stack/dk_pac/src/lpcomp/extrefsel.rs @@ -0,0 +1,126 @@ +#[doc = "Register `EXTREFSEL` 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 `EXTREFSEL` 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 `EXTREFSEL` reader - External analog reference select"] +pub type EXTREFSEL_R = crate::BitReader; +#[doc = "External analog reference select\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum EXTREFSEL_A { + #[doc = "0: Use AIN0 as external analog reference"] + ANALOG_REFERENCE0 = 0, + #[doc = "1: Use AIN1 as external analog reference"] + ANALOG_REFERENCE1 = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: EXTREFSEL_A) -> Self { + variant as u8 != 0 + } +} +impl EXTREFSEL_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> EXTREFSEL_A { + match self.bits { + false => EXTREFSEL_A::ANALOG_REFERENCE0, + true => EXTREFSEL_A::ANALOG_REFERENCE1, + } + } + #[doc = "Checks if the value of the field is `ANALOG_REFERENCE0`"] + #[inline(always)] + pub fn is_analog_reference0(&self) -> bool { + *self == EXTREFSEL_A::ANALOG_REFERENCE0 + } + #[doc = "Checks if the value of the field is `ANALOG_REFERENCE1`"] + #[inline(always)] + pub fn is_analog_reference1(&self) -> bool { + *self == EXTREFSEL_A::ANALOG_REFERENCE1 + } +} +#[doc = "Field `EXTREFSEL` writer - External analog reference select"] +pub type EXTREFSEL_W<'a, const O: u8> = crate::BitWriter<'a, u32, EXTREFSEL_SPEC, EXTREFSEL_A, O>; +impl<'a, const O: u8> EXTREFSEL_W<'a, O> { + #[doc = "Use AIN0 as external analog reference"] + #[inline(always)] + pub fn analog_reference0(self) -> &'a mut W { + self.variant(EXTREFSEL_A::ANALOG_REFERENCE0) + } + #[doc = "Use AIN1 as external analog reference"] + #[inline(always)] + pub fn analog_reference1(self) -> &'a mut W { + self.variant(EXTREFSEL_A::ANALOG_REFERENCE1) + } +} +impl R { + #[doc = "Bit 0 - External analog reference select"] + #[inline(always)] + pub fn extrefsel(&self) -> EXTREFSEL_R { + EXTREFSEL_R::new((self.bits & 1) != 0) + } +} +impl W { + #[doc = "Bit 0 - External analog reference select"] + #[inline(always)] + #[must_use] + pub fn extrefsel(&mut self) -> EXTREFSEL_W<0> { + EXTREFSEL_W::new(self) + } + #[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 = "External reference select\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 [extrefsel](index.html) module"] +pub struct EXTREFSEL_SPEC; +impl crate::RegisterSpec for EXTREFSEL_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [extrefsel::R](R) reader structure"] +impl crate::Readable for EXTREFSEL_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [extrefsel::W](W) writer structure"] +impl crate::Writable for EXTREFSEL_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets EXTREFSEL to value 0"] +impl crate::Resettable for EXTREFSEL_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/lpcomp/hyst.rs b/down-the-stack/dk_pac/src/lpcomp/hyst.rs new file mode 100644 index 0000000..da5f961 --- /dev/null +++ b/down-the-stack/dk_pac/src/lpcomp/hyst.rs @@ -0,0 +1,126 @@ +#[doc = "Register `HYST` 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 `HYST` 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 `HYST` reader - Comparator hysteresis enable"] +pub type HYST_R = crate::BitReader; +#[doc = "Comparator hysteresis enable\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum HYST_A { + #[doc = "0: Comparator hysteresis disabled"] + NO_HYST = 0, + #[doc = "1: Comparator hysteresis disabled (typ. 50 mV)"] + HYST50M_V = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: HYST_A) -> Self { + variant as u8 != 0 + } +} +impl HYST_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> HYST_A { + match self.bits { + false => HYST_A::NO_HYST, + true => HYST_A::HYST50M_V, + } + } + #[doc = "Checks if the value of the field is `NO_HYST`"] + #[inline(always)] + pub fn is_no_hyst(&self) -> bool { + *self == HYST_A::NO_HYST + } + #[doc = "Checks if the value of the field is `HYST50M_V`"] + #[inline(always)] + pub fn is_hyst50m_v(&self) -> bool { + *self == HYST_A::HYST50M_V + } +} +#[doc = "Field `HYST` writer - Comparator hysteresis enable"] +pub type HYST_W<'a, const O: u8> = crate::BitWriter<'a, u32, HYST_SPEC, HYST_A, O>; +impl<'a, const O: u8> HYST_W<'a, O> { + #[doc = "Comparator hysteresis disabled"] + #[inline(always)] + pub fn no_hyst(self) -> &'a mut W { + self.variant(HYST_A::NO_HYST) + } + #[doc = "Comparator hysteresis disabled (typ. 50 mV)"] + #[inline(always)] + pub fn hyst50m_v(self) -> &'a mut W { + self.variant(HYST_A::HYST50M_V) + } +} +impl R { + #[doc = "Bit 0 - Comparator hysteresis enable"] + #[inline(always)] + pub fn hyst(&self) -> HYST_R { + HYST_R::new((self.bits & 1) != 0) + } +} +impl W { + #[doc = "Bit 0 - Comparator hysteresis enable"] + #[inline(always)] + #[must_use] + pub fn hyst(&mut self) -> HYST_W<0> { + HYST_W::new(self) + } + #[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 = "Comparator hysteresis enable\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 [hyst](index.html) module"] +pub struct HYST_SPEC; +impl crate::RegisterSpec for HYST_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [hyst::R](R) reader structure"] +impl crate::Readable for HYST_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [hyst::W](W) writer structure"] +impl crate::Writable for HYST_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets HYST to value 0"] +impl crate::Resettable for HYST_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/lpcomp/intenclr.rs b/down-the-stack/dk_pac/src/lpcomp/intenclr.rs new file mode 100644 index 0000000..83a9d57 --- /dev/null +++ b/down-the-stack/dk_pac/src/lpcomp/intenclr.rs @@ -0,0 +1,337 @@ +#[doc = "Register `INTENCLR` 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 `INTENCLR` 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 `READY` reader - Write '1' to disable interrupt for event READY"] +pub type READY_R = crate::BitReader; +#[doc = "Write '1' to disable interrupt for event READY\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum READY_A { + #[doc = "0: Read: Disabled"] + DISABLED = 0, + #[doc = "1: Read: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: READY_A) -> Self { + variant as u8 != 0 + } +} +impl READY_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> READY_A { + match self.bits { + false => READY_A::DISABLED, + true => READY_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == READY_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == READY_A::ENABLED + } +} +#[doc = "Write '1' to disable interrupt for event READY\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum READY_AW { + #[doc = "1: Disable"] + CLEAR = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: READY_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `READY` writer - Write '1' to disable interrupt for event READY"] +pub type READY_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENCLR_SPEC, READY_AW, O>; +impl<'a, const O: u8> READY_W<'a, O> { + #[doc = "Disable"] + #[inline(always)] + pub fn clear(self) -> &'a mut W { + self.variant(READY_AW::CLEAR) + } +} +#[doc = "Field `DOWN` reader - Write '1' to disable interrupt for event DOWN"] +pub type DOWN_R = crate::BitReader; +#[doc = "Write '1' to disable interrupt for event DOWN\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum DOWN_A { + #[doc = "0: Read: Disabled"] + DISABLED = 0, + #[doc = "1: Read: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: DOWN_A) -> Self { + variant as u8 != 0 + } +} +impl DOWN_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> DOWN_A { + match self.bits { + false => DOWN_A::DISABLED, + true => DOWN_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == DOWN_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == DOWN_A::ENABLED + } +} +#[doc = "Write '1' to disable interrupt for event DOWN\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum DOWN_AW { + #[doc = "1: Disable"] + CLEAR = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: DOWN_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `DOWN` writer - Write '1' to disable interrupt for event DOWN"] +pub type DOWN_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENCLR_SPEC, DOWN_AW, O>; +impl<'a, const O: u8> DOWN_W<'a, O> { + #[doc = "Disable"] + #[inline(always)] + pub fn clear(self) -> &'a mut W { + self.variant(DOWN_AW::CLEAR) + } +} +#[doc = "Field `UP` reader - Write '1' to disable interrupt for event UP"] +pub type UP_R = crate::BitReader; +#[doc = "Write '1' to disable interrupt for event UP\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum UP_A { + #[doc = "0: Read: Disabled"] + DISABLED = 0, + #[doc = "1: Read: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: UP_A) -> Self { + variant as u8 != 0 + } +} +impl UP_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> UP_A { + match self.bits { + false => UP_A::DISABLED, + true => UP_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == UP_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == UP_A::ENABLED + } +} +#[doc = "Write '1' to disable interrupt for event UP\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum UP_AW { + #[doc = "1: Disable"] + CLEAR = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: UP_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `UP` writer - Write '1' to disable interrupt for event UP"] +pub type UP_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENCLR_SPEC, UP_AW, O>; +impl<'a, const O: u8> UP_W<'a, O> { + #[doc = "Disable"] + #[inline(always)] + pub fn clear(self) -> &'a mut W { + self.variant(UP_AW::CLEAR) + } +} +#[doc = "Field `CROSS` reader - Write '1' to disable interrupt for event CROSS"] +pub type CROSS_R = crate::BitReader; +#[doc = "Write '1' to disable interrupt for event CROSS\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum CROSS_A { + #[doc = "0: Read: Disabled"] + DISABLED = 0, + #[doc = "1: Read: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: CROSS_A) -> Self { + variant as u8 != 0 + } +} +impl CROSS_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> CROSS_A { + match self.bits { + false => CROSS_A::DISABLED, + true => CROSS_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == CROSS_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == CROSS_A::ENABLED + } +} +#[doc = "Write '1' to disable interrupt for event CROSS\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum CROSS_AW { + #[doc = "1: Disable"] + CLEAR = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: CROSS_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `CROSS` writer - Write '1' to disable interrupt for event CROSS"] +pub type CROSS_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENCLR_SPEC, CROSS_AW, O>; +impl<'a, const O: u8> CROSS_W<'a, O> { + #[doc = "Disable"] + #[inline(always)] + pub fn clear(self) -> &'a mut W { + self.variant(CROSS_AW::CLEAR) + } +} +impl R { + #[doc = "Bit 0 - Write '1' to disable interrupt for event READY"] + #[inline(always)] + pub fn ready(&self) -> READY_R { + READY_R::new((self.bits & 1) != 0) + } + #[doc = "Bit 1 - Write '1' to disable interrupt for event DOWN"] + #[inline(always)] + pub fn down(&self) -> DOWN_R { + DOWN_R::new(((self.bits >> 1) & 1) != 0) + } + #[doc = "Bit 2 - Write '1' to disable interrupt for event UP"] + #[inline(always)] + pub fn up(&self) -> UP_R { + UP_R::new(((self.bits >> 2) & 1) != 0) + } + #[doc = "Bit 3 - Write '1' to disable interrupt for event CROSS"] + #[inline(always)] + pub fn cross(&self) -> CROSS_R { + CROSS_R::new(((self.bits >> 3) & 1) != 0) + } +} +impl W { + #[doc = "Bit 0 - Write '1' to disable interrupt for event READY"] + #[inline(always)] + #[must_use] + pub fn ready(&mut self) -> READY_W<0> { + READY_W::new(self) + } + #[doc = "Bit 1 - Write '1' to disable interrupt for event DOWN"] + #[inline(always)] + #[must_use] + pub fn down(&mut self) -> DOWN_W<1> { + DOWN_W::new(self) + } + #[doc = "Bit 2 - Write '1' to disable interrupt for event UP"] + #[inline(always)] + #[must_use] + pub fn up(&mut self) -> UP_W<2> { + UP_W::new(self) + } + #[doc = "Bit 3 - Write '1' to disable interrupt for event CROSS"] + #[inline(always)] + #[must_use] + pub fn cross(&mut self) -> CROSS_W<3> { + CROSS_W::new(self) + } + #[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 = "Disable interrupt\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 [intenclr](index.html) module"] +pub struct INTENCLR_SPEC; +impl crate::RegisterSpec for INTENCLR_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [intenclr::R](R) reader structure"] +impl crate::Readable for INTENCLR_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [intenclr::W](W) writer structure"] +impl crate::Writable for INTENCLR_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets INTENCLR to value 0"] +impl crate::Resettable for INTENCLR_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/lpcomp/intenset.rs b/down-the-stack/dk_pac/src/lpcomp/intenset.rs new file mode 100644 index 0000000..362f006 --- /dev/null +++ b/down-the-stack/dk_pac/src/lpcomp/intenset.rs @@ -0,0 +1,337 @@ +#[doc = "Register `INTENSET` 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 `INTENSET` 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 `READY` reader - Write '1' to enable interrupt for event READY"] +pub type READY_R = crate::BitReader; +#[doc = "Write '1' to enable interrupt for event READY\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum READY_A { + #[doc = "0: Read: Disabled"] + DISABLED = 0, + #[doc = "1: Read: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: READY_A) -> Self { + variant as u8 != 0 + } +} +impl READY_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> READY_A { + match self.bits { + false => READY_A::DISABLED, + true => READY_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == READY_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == READY_A::ENABLED + } +} +#[doc = "Write '1' to enable interrupt for event READY\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum READY_AW { + #[doc = "1: Enable"] + SET = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: READY_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `READY` writer - Write '1' to enable interrupt for event READY"] +pub type READY_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENSET_SPEC, READY_AW, O>; +impl<'a, const O: u8> READY_W<'a, O> { + #[doc = "Enable"] + #[inline(always)] + pub fn set(self) -> &'a mut W { + self.variant(READY_AW::SET) + } +} +#[doc = "Field `DOWN` reader - Write '1' to enable interrupt for event DOWN"] +pub type DOWN_R = crate::BitReader; +#[doc = "Write '1' to enable interrupt for event DOWN\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum DOWN_A { + #[doc = "0: Read: Disabled"] + DISABLED = 0, + #[doc = "1: Read: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: DOWN_A) -> Self { + variant as u8 != 0 + } +} +impl DOWN_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> DOWN_A { + match self.bits { + false => DOWN_A::DISABLED, + true => DOWN_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == DOWN_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == DOWN_A::ENABLED + } +} +#[doc = "Write '1' to enable interrupt for event DOWN\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum DOWN_AW { + #[doc = "1: Enable"] + SET = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: DOWN_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `DOWN` writer - Write '1' to enable interrupt for event DOWN"] +pub type DOWN_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENSET_SPEC, DOWN_AW, O>; +impl<'a, const O: u8> DOWN_W<'a, O> { + #[doc = "Enable"] + #[inline(always)] + pub fn set(self) -> &'a mut W { + self.variant(DOWN_AW::SET) + } +} +#[doc = "Field `UP` reader - Write '1' to enable interrupt for event UP"] +pub type UP_R = crate::BitReader; +#[doc = "Write '1' to enable interrupt for event UP\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum UP_A { + #[doc = "0: Read: Disabled"] + DISABLED = 0, + #[doc = "1: Read: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: UP_A) -> Self { + variant as u8 != 0 + } +} +impl UP_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> UP_A { + match self.bits { + false => UP_A::DISABLED, + true => UP_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == UP_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == UP_A::ENABLED + } +} +#[doc = "Write '1' to enable interrupt for event UP\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum UP_AW { + #[doc = "1: Enable"] + SET = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: UP_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `UP` writer - Write '1' to enable interrupt for event UP"] +pub type UP_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENSET_SPEC, UP_AW, O>; +impl<'a, const O: u8> UP_W<'a, O> { + #[doc = "Enable"] + #[inline(always)] + pub fn set(self) -> &'a mut W { + self.variant(UP_AW::SET) + } +} +#[doc = "Field `CROSS` reader - Write '1' to enable interrupt for event CROSS"] +pub type CROSS_R = crate::BitReader; +#[doc = "Write '1' to enable interrupt for event CROSS\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum CROSS_A { + #[doc = "0: Read: Disabled"] + DISABLED = 0, + #[doc = "1: Read: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: CROSS_A) -> Self { + variant as u8 != 0 + } +} +impl CROSS_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> CROSS_A { + match self.bits { + false => CROSS_A::DISABLED, + true => CROSS_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == CROSS_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == CROSS_A::ENABLED + } +} +#[doc = "Write '1' to enable interrupt for event CROSS\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum CROSS_AW { + #[doc = "1: Enable"] + SET = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: CROSS_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `CROSS` writer - Write '1' to enable interrupt for event CROSS"] +pub type CROSS_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENSET_SPEC, CROSS_AW, O>; +impl<'a, const O: u8> CROSS_W<'a, O> { + #[doc = "Enable"] + #[inline(always)] + pub fn set(self) -> &'a mut W { + self.variant(CROSS_AW::SET) + } +} +impl R { + #[doc = "Bit 0 - Write '1' to enable interrupt for event READY"] + #[inline(always)] + pub fn ready(&self) -> READY_R { + READY_R::new((self.bits & 1) != 0) + } + #[doc = "Bit 1 - Write '1' to enable interrupt for event DOWN"] + #[inline(always)] + pub fn down(&self) -> DOWN_R { + DOWN_R::new(((self.bits >> 1) & 1) != 0) + } + #[doc = "Bit 2 - Write '1' to enable interrupt for event UP"] + #[inline(always)] + pub fn up(&self) -> UP_R { + UP_R::new(((self.bits >> 2) & 1) != 0) + } + #[doc = "Bit 3 - Write '1' to enable interrupt for event CROSS"] + #[inline(always)] + pub fn cross(&self) -> CROSS_R { + CROSS_R::new(((self.bits >> 3) & 1) != 0) + } +} +impl W { + #[doc = "Bit 0 - Write '1' to enable interrupt for event READY"] + #[inline(always)] + #[must_use] + pub fn ready(&mut self) -> READY_W<0> { + READY_W::new(self) + } + #[doc = "Bit 1 - Write '1' to enable interrupt for event DOWN"] + #[inline(always)] + #[must_use] + pub fn down(&mut self) -> DOWN_W<1> { + DOWN_W::new(self) + } + #[doc = "Bit 2 - Write '1' to enable interrupt for event UP"] + #[inline(always)] + #[must_use] + pub fn up(&mut self) -> UP_W<2> { + UP_W::new(self) + } + #[doc = "Bit 3 - Write '1' to enable interrupt for event CROSS"] + #[inline(always)] + #[must_use] + pub fn cross(&mut self) -> CROSS_W<3> { + CROSS_W::new(self) + } + #[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 = "Enable interrupt\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 [intenset](index.html) module"] +pub struct INTENSET_SPEC; +impl crate::RegisterSpec for INTENSET_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [intenset::R](R) reader structure"] +impl crate::Readable for INTENSET_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [intenset::W](W) writer structure"] +impl crate::Writable for INTENSET_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets INTENSET to value 0"] +impl crate::Resettable for INTENSET_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/lpcomp/psel.rs b/down-the-stack/dk_pac/src/lpcomp/psel.rs new file mode 100644 index 0000000..2f240c2 --- /dev/null +++ b/down-the-stack/dk_pac/src/lpcomp/psel.rs @@ -0,0 +1,206 @@ +#[doc = "Register `PSEL` 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 `PSEL` 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 `PSEL` reader - Analog pin select"] +pub type PSEL_R = crate::FieldReader; +#[doc = "Analog pin select\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +#[repr(u8)] +pub enum PSEL_A { + #[doc = "0: AIN0 selected as analog input"] + ANALOG_INPUT0 = 0, + #[doc = "1: AIN1 selected as analog input"] + ANALOG_INPUT1 = 1, + #[doc = "2: AIN2 selected as analog input"] + ANALOG_INPUT2 = 2, + #[doc = "3: AIN3 selected as analog input"] + ANALOG_INPUT3 = 3, + #[doc = "4: AIN4 selected as analog input"] + ANALOG_INPUT4 = 4, + #[doc = "5: AIN5 selected as analog input"] + ANALOG_INPUT5 = 5, + #[doc = "6: AIN6 selected as analog input"] + ANALOG_INPUT6 = 6, + #[doc = "7: AIN7 selected as analog input"] + ANALOG_INPUT7 = 7, +} +impl From for u8 { + #[inline(always)] + fn from(variant: PSEL_A) -> Self { + variant as _ + } +} +impl PSEL_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> PSEL_A { + match self.bits { + 0 => PSEL_A::ANALOG_INPUT0, + 1 => PSEL_A::ANALOG_INPUT1, + 2 => PSEL_A::ANALOG_INPUT2, + 3 => PSEL_A::ANALOG_INPUT3, + 4 => PSEL_A::ANALOG_INPUT4, + 5 => PSEL_A::ANALOG_INPUT5, + 6 => PSEL_A::ANALOG_INPUT6, + 7 => PSEL_A::ANALOG_INPUT7, + _ => unreachable!(), + } + } + #[doc = "Checks if the value of the field is `ANALOG_INPUT0`"] + #[inline(always)] + pub fn is_analog_input0(&self) -> bool { + *self == PSEL_A::ANALOG_INPUT0 + } + #[doc = "Checks if the value of the field is `ANALOG_INPUT1`"] + #[inline(always)] + pub fn is_analog_input1(&self) -> bool { + *self == PSEL_A::ANALOG_INPUT1 + } + #[doc = "Checks if the value of the field is `ANALOG_INPUT2`"] + #[inline(always)] + pub fn is_analog_input2(&self) -> bool { + *self == PSEL_A::ANALOG_INPUT2 + } + #[doc = "Checks if the value of the field is `ANALOG_INPUT3`"] + #[inline(always)] + pub fn is_analog_input3(&self) -> bool { + *self == PSEL_A::ANALOG_INPUT3 + } + #[doc = "Checks if the value of the field is `ANALOG_INPUT4`"] + #[inline(always)] + pub fn is_analog_input4(&self) -> bool { + *self == PSEL_A::ANALOG_INPUT4 + } + #[doc = "Checks if the value of the field is `ANALOG_INPUT5`"] + #[inline(always)] + pub fn is_analog_input5(&self) -> bool { + *self == PSEL_A::ANALOG_INPUT5 + } + #[doc = "Checks if the value of the field is `ANALOG_INPUT6`"] + #[inline(always)] + pub fn is_analog_input6(&self) -> bool { + *self == PSEL_A::ANALOG_INPUT6 + } + #[doc = "Checks if the value of the field is `ANALOG_INPUT7`"] + #[inline(always)] + pub fn is_analog_input7(&self) -> bool { + *self == PSEL_A::ANALOG_INPUT7 + } +} +#[doc = "Field `PSEL` writer - Analog pin select"] +pub type PSEL_W<'a, const O: u8> = crate::FieldWriterSafe<'a, u32, PSEL_SPEC, u8, PSEL_A, 3, O>; +impl<'a, const O: u8> PSEL_W<'a, O> { + #[doc = "AIN0 selected as analog input"] + #[inline(always)] + pub fn analog_input0(self) -> &'a mut W { + self.variant(PSEL_A::ANALOG_INPUT0) + } + #[doc = "AIN1 selected as analog input"] + #[inline(always)] + pub fn analog_input1(self) -> &'a mut W { + self.variant(PSEL_A::ANALOG_INPUT1) + } + #[doc = "AIN2 selected as analog input"] + #[inline(always)] + pub fn analog_input2(self) -> &'a mut W { + self.variant(PSEL_A::ANALOG_INPUT2) + } + #[doc = "AIN3 selected as analog input"] + #[inline(always)] + pub fn analog_input3(self) -> &'a mut W { + self.variant(PSEL_A::ANALOG_INPUT3) + } + #[doc = "AIN4 selected as analog input"] + #[inline(always)] + pub fn analog_input4(self) -> &'a mut W { + self.variant(PSEL_A::ANALOG_INPUT4) + } + #[doc = "AIN5 selected as analog input"] + #[inline(always)] + pub fn analog_input5(self) -> &'a mut W { + self.variant(PSEL_A::ANALOG_INPUT5) + } + #[doc = "AIN6 selected as analog input"] + #[inline(always)] + pub fn analog_input6(self) -> &'a mut W { + self.variant(PSEL_A::ANALOG_INPUT6) + } + #[doc = "AIN7 selected as analog input"] + #[inline(always)] + pub fn analog_input7(self) -> &'a mut W { + self.variant(PSEL_A::ANALOG_INPUT7) + } +} +impl R { + #[doc = "Bits 0:2 - Analog pin select"] + #[inline(always)] + pub fn psel(&self) -> PSEL_R { + PSEL_R::new((self.bits & 7) as u8) + } +} +impl W { + #[doc = "Bits 0:2 - Analog pin select"] + #[inline(always)] + #[must_use] + pub fn psel(&mut self) -> PSEL_W<0> { + PSEL_W::new(self) + } + #[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 = "Input pin select\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 [psel](index.html) module"] +pub struct PSEL_SPEC; +impl crate::RegisterSpec for PSEL_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [psel::R](R) reader structure"] +impl crate::Readable for PSEL_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [psel::W](W) writer structure"] +impl crate::Writable for PSEL_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets PSEL to value 0"] +impl crate::Resettable for PSEL_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/lpcomp/refsel.rs b/down-the-stack/dk_pac/src/lpcomp/refsel.rs new file mode 100644 index 0000000..a4bc81f --- /dev/null +++ b/down-the-stack/dk_pac/src/lpcomp/refsel.rs @@ -0,0 +1,311 @@ +#[doc = "Register `REFSEL` 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 `REFSEL` 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 `REFSEL` reader - Reference select"] +pub type REFSEL_R = crate::FieldReader; +#[doc = "Reference select\n\nValue on reset: 4"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +#[repr(u8)] +pub enum REFSEL_A { + #[doc = "0: VDD * 1/8 selected as reference"] + REF1_8VDD = 0, + #[doc = "1: VDD * 2/8 selected as reference"] + REF2_8VDD = 1, + #[doc = "2: VDD * 3/8 selected as reference"] + REF3_8VDD = 2, + #[doc = "3: VDD * 4/8 selected as reference"] + REF4_8VDD = 3, + #[doc = "4: VDD * 5/8 selected as reference"] + REF5_8VDD = 4, + #[doc = "5: VDD * 6/8 selected as reference"] + REF6_8VDD = 5, + #[doc = "6: VDD * 7/8 selected as reference"] + REF7_8VDD = 6, + #[doc = "7: External analog reference selected"] + AREF = 7, + #[doc = "8: VDD * 1/16 selected as reference"] + REF1_16VDD = 8, + #[doc = "9: VDD * 3/16 selected as reference"] + REF3_16VDD = 9, + #[doc = "10: VDD * 5/16 selected as reference"] + REF5_16VDD = 10, + #[doc = "11: VDD * 7/16 selected as reference"] + REF7_16VDD = 11, + #[doc = "12: VDD * 9/16 selected as reference"] + REF9_16VDD = 12, + #[doc = "13: VDD * 11/16 selected as reference"] + REF11_16VDD = 13, + #[doc = "14: VDD * 13/16 selected as reference"] + REF13_16VDD = 14, + #[doc = "15: VDD * 15/16 selected as reference"] + REF15_16VDD = 15, +} +impl From for u8 { + #[inline(always)] + fn from(variant: REFSEL_A) -> Self { + variant as _ + } +} +impl REFSEL_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> REFSEL_A { + match self.bits { + 0 => REFSEL_A::REF1_8VDD, + 1 => REFSEL_A::REF2_8VDD, + 2 => REFSEL_A::REF3_8VDD, + 3 => REFSEL_A::REF4_8VDD, + 4 => REFSEL_A::REF5_8VDD, + 5 => REFSEL_A::REF6_8VDD, + 6 => REFSEL_A::REF7_8VDD, + 7 => REFSEL_A::AREF, + 8 => REFSEL_A::REF1_16VDD, + 9 => REFSEL_A::REF3_16VDD, + 10 => REFSEL_A::REF5_16VDD, + 11 => REFSEL_A::REF7_16VDD, + 12 => REFSEL_A::REF9_16VDD, + 13 => REFSEL_A::REF11_16VDD, + 14 => REFSEL_A::REF13_16VDD, + 15 => REFSEL_A::REF15_16VDD, + _ => unreachable!(), + } + } + #[doc = "Checks if the value of the field is `REF1_8VDD`"] + #[inline(always)] + pub fn is_ref1_8vdd(&self) -> bool { + *self == REFSEL_A::REF1_8VDD + } + #[doc = "Checks if the value of the field is `REF2_8VDD`"] + #[inline(always)] + pub fn is_ref2_8vdd(&self) -> bool { + *self == REFSEL_A::REF2_8VDD + } + #[doc = "Checks if the value of the field is `REF3_8VDD`"] + #[inline(always)] + pub fn is_ref3_8vdd(&self) -> bool { + *self == REFSEL_A::REF3_8VDD + } + #[doc = "Checks if the value of the field is `REF4_8VDD`"] + #[inline(always)] + pub fn is_ref4_8vdd(&self) -> bool { + *self == REFSEL_A::REF4_8VDD + } + #[doc = "Checks if the value of the field is `REF5_8VDD`"] + #[inline(always)] + pub fn is_ref5_8vdd(&self) -> bool { + *self == REFSEL_A::REF5_8VDD + } + #[doc = "Checks if the value of the field is `REF6_8VDD`"] + #[inline(always)] + pub fn is_ref6_8vdd(&self) -> bool { + *self == REFSEL_A::REF6_8VDD + } + #[doc = "Checks if the value of the field is `REF7_8VDD`"] + #[inline(always)] + pub fn is_ref7_8vdd(&self) -> bool { + *self == REFSEL_A::REF7_8VDD + } + #[doc = "Checks if the value of the field is `AREF`"] + #[inline(always)] + pub fn is_aref(&self) -> bool { + *self == REFSEL_A::AREF + } + #[doc = "Checks if the value of the field is `REF1_16VDD`"] + #[inline(always)] + pub fn is_ref1_16vdd(&self) -> bool { + *self == REFSEL_A::REF1_16VDD + } + #[doc = "Checks if the value of the field is `REF3_16VDD`"] + #[inline(always)] + pub fn is_ref3_16vdd(&self) -> bool { + *self == REFSEL_A::REF3_16VDD + } + #[doc = "Checks if the value of the field is `REF5_16VDD`"] + #[inline(always)] + pub fn is_ref5_16vdd(&self) -> bool { + *self == REFSEL_A::REF5_16VDD + } + #[doc = "Checks if the value of the field is `REF7_16VDD`"] + #[inline(always)] + pub fn is_ref7_16vdd(&self) -> bool { + *self == REFSEL_A::REF7_16VDD + } + #[doc = "Checks if the value of the field is `REF9_16VDD`"] + #[inline(always)] + pub fn is_ref9_16vdd(&self) -> bool { + *self == REFSEL_A::REF9_16VDD + } + #[doc = "Checks if the value of the field is `REF11_16VDD`"] + #[inline(always)] + pub fn is_ref11_16vdd(&self) -> bool { + *self == REFSEL_A::REF11_16VDD + } + #[doc = "Checks if the value of the field is `REF13_16VDD`"] + #[inline(always)] + pub fn is_ref13_16vdd(&self) -> bool { + *self == REFSEL_A::REF13_16VDD + } + #[doc = "Checks if the value of the field is `REF15_16VDD`"] + #[inline(always)] + pub fn is_ref15_16vdd(&self) -> bool { + *self == REFSEL_A::REF15_16VDD + } +} +#[doc = "Field `REFSEL` writer - Reference select"] +pub type REFSEL_W<'a, const O: u8> = + crate::FieldWriterSafe<'a, u32, REFSEL_SPEC, u8, REFSEL_A, 4, O>; +impl<'a, const O: u8> REFSEL_W<'a, O> { + #[doc = "VDD * 1/8 selected as reference"] + #[inline(always)] + pub fn ref1_8vdd(self) -> &'a mut W { + self.variant(REFSEL_A::REF1_8VDD) + } + #[doc = "VDD * 2/8 selected as reference"] + #[inline(always)] + pub fn ref2_8vdd(self) -> &'a mut W { + self.variant(REFSEL_A::REF2_8VDD) + } + #[doc = "VDD * 3/8 selected as reference"] + #[inline(always)] + pub fn ref3_8vdd(self) -> &'a mut W { + self.variant(REFSEL_A::REF3_8VDD) + } + #[doc = "VDD * 4/8 selected as reference"] + #[inline(always)] + pub fn ref4_8vdd(self) -> &'a mut W { + self.variant(REFSEL_A::REF4_8VDD) + } + #[doc = "VDD * 5/8 selected as reference"] + #[inline(always)] + pub fn ref5_8vdd(self) -> &'a mut W { + self.variant(REFSEL_A::REF5_8VDD) + } + #[doc = "VDD * 6/8 selected as reference"] + #[inline(always)] + pub fn ref6_8vdd(self) -> &'a mut W { + self.variant(REFSEL_A::REF6_8VDD) + } + #[doc = "VDD * 7/8 selected as reference"] + #[inline(always)] + pub fn ref7_8vdd(self) -> &'a mut W { + self.variant(REFSEL_A::REF7_8VDD) + } + #[doc = "External analog reference selected"] + #[inline(always)] + pub fn aref(self) -> &'a mut W { + self.variant(REFSEL_A::AREF) + } + #[doc = "VDD * 1/16 selected as reference"] + #[inline(always)] + pub fn ref1_16vdd(self) -> &'a mut W { + self.variant(REFSEL_A::REF1_16VDD) + } + #[doc = "VDD * 3/16 selected as reference"] + #[inline(always)] + pub fn ref3_16vdd(self) -> &'a mut W { + self.variant(REFSEL_A::REF3_16VDD) + } + #[doc = "VDD * 5/16 selected as reference"] + #[inline(always)] + pub fn ref5_16vdd(self) -> &'a mut W { + self.variant(REFSEL_A::REF5_16VDD) + } + #[doc = "VDD * 7/16 selected as reference"] + #[inline(always)] + pub fn ref7_16vdd(self) -> &'a mut W { + self.variant(REFSEL_A::REF7_16VDD) + } + #[doc = "VDD * 9/16 selected as reference"] + #[inline(always)] + pub fn ref9_16vdd(self) -> &'a mut W { + self.variant(REFSEL_A::REF9_16VDD) + } + #[doc = "VDD * 11/16 selected as reference"] + #[inline(always)] + pub fn ref11_16vdd(self) -> &'a mut W { + self.variant(REFSEL_A::REF11_16VDD) + } + #[doc = "VDD * 13/16 selected as reference"] + #[inline(always)] + pub fn ref13_16vdd(self) -> &'a mut W { + self.variant(REFSEL_A::REF13_16VDD) + } + #[doc = "VDD * 15/16 selected as reference"] + #[inline(always)] + pub fn ref15_16vdd(self) -> &'a mut W { + self.variant(REFSEL_A::REF15_16VDD) + } +} +impl R { + #[doc = "Bits 0:3 - Reference select"] + #[inline(always)] + pub fn refsel(&self) -> REFSEL_R { + REFSEL_R::new((self.bits & 0x0f) as u8) + } +} +impl W { + #[doc = "Bits 0:3 - Reference select"] + #[inline(always)] + #[must_use] + pub fn refsel(&mut self) -> REFSEL_W<0> { + REFSEL_W::new(self) + } + #[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 = "Reference select\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 [refsel](index.html) module"] +pub struct REFSEL_SPEC; +impl crate::RegisterSpec for REFSEL_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [refsel::R](R) reader structure"] +impl crate::Readable for REFSEL_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [refsel::W](W) writer structure"] +impl crate::Writable for REFSEL_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets REFSEL to value 0x04"] +impl crate::Resettable for REFSEL_SPEC { + const RESET_VALUE: Self::Ux = 0x04; +} diff --git a/down-the-stack/dk_pac/src/lpcomp/result.rs b/down-the-stack/dk_pac/src/lpcomp/result.rs new file mode 100644 index 0000000..2583cf7 --- /dev/null +++ b/down-the-stack/dk_pac/src/lpcomp/result.rs @@ -0,0 +1,71 @@ +#[doc = "Register `RESULT` 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 = "Field `RESULT` reader - Result of last compare. Decision point SAMPLE task."] +pub type RESULT_R = crate::BitReader; +#[doc = "Result of last compare. Decision point SAMPLE task.\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum RESULT_A { + #[doc = "0: Input voltage is below the reference threshold (VIN+ < VIN-)."] + BELOW = 0, + #[doc = "1: Input voltage is above the reference threshold (VIN+ > VIN-)."] + ABOVE = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: RESULT_A) -> Self { + variant as u8 != 0 + } +} +impl RESULT_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> RESULT_A { + match self.bits { + false => RESULT_A::BELOW, + true => RESULT_A::ABOVE, + } + } + #[doc = "Checks if the value of the field is `BELOW`"] + #[inline(always)] + pub fn is_below(&self) -> bool { + *self == RESULT_A::BELOW + } + #[doc = "Checks if the value of the field is `ABOVE`"] + #[inline(always)] + pub fn is_above(&self) -> bool { + *self == RESULT_A::ABOVE + } +} +impl R { + #[doc = "Bit 0 - Result of last compare. Decision point SAMPLE task."] + #[inline(always)] + pub fn result(&self) -> RESULT_R { + RESULT_R::new((self.bits & 1) != 0) + } +} +#[doc = "Compare 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 [result](index.html) module"] +pub struct RESULT_SPEC; +impl crate::RegisterSpec for RESULT_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [result::R](R) reader structure"] +impl crate::Readable for RESULT_SPEC { + type Reader = R; +} +#[doc = "`reset()` method sets RESULT to value 0"] +impl crate::Resettable for RESULT_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/lpcomp/shorts.rs b/down-the-stack/dk_pac/src/lpcomp/shorts.rs new file mode 100644 index 0000000..ddbbc06 --- /dev/null +++ b/down-the-stack/dk_pac/src/lpcomp/shorts.rs @@ -0,0 +1,371 @@ +#[doc = "Register `SHORTS` 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 `SHORTS` 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 `READY_SAMPLE` reader - Shortcut between event READY and task SAMPLE"] +pub type READY_SAMPLE_R = crate::BitReader; +#[doc = "Shortcut between event READY and task SAMPLE\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum READY_SAMPLE_A { + #[doc = "0: Disable shortcut"] + DISABLED = 0, + #[doc = "1: Enable shortcut"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: READY_SAMPLE_A) -> Self { + variant as u8 != 0 + } +} +impl READY_SAMPLE_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> READY_SAMPLE_A { + match self.bits { + false => READY_SAMPLE_A::DISABLED, + true => READY_SAMPLE_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == READY_SAMPLE_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == READY_SAMPLE_A::ENABLED + } +} +#[doc = "Field `READY_SAMPLE` writer - Shortcut between event READY and task SAMPLE"] +pub type READY_SAMPLE_W<'a, const O: u8> = + crate::BitWriter<'a, u32, SHORTS_SPEC, READY_SAMPLE_A, O>; +impl<'a, const O: u8> READY_SAMPLE_W<'a, O> { + #[doc = "Disable shortcut"] + #[inline(always)] + pub fn disabled(self) -> &'a mut W { + self.variant(READY_SAMPLE_A::DISABLED) + } + #[doc = "Enable shortcut"] + #[inline(always)] + pub fn enabled(self) -> &'a mut W { + self.variant(READY_SAMPLE_A::ENABLED) + } +} +#[doc = "Field `READY_STOP` reader - Shortcut between event READY and task STOP"] +pub type READY_STOP_R = crate::BitReader; +#[doc = "Shortcut between event READY and task STOP\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum READY_STOP_A { + #[doc = "0: Disable shortcut"] + DISABLED = 0, + #[doc = "1: Enable shortcut"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: READY_STOP_A) -> Self { + variant as u8 != 0 + } +} +impl READY_STOP_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> READY_STOP_A { + match self.bits { + false => READY_STOP_A::DISABLED, + true => READY_STOP_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == READY_STOP_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == READY_STOP_A::ENABLED + } +} +#[doc = "Field `READY_STOP` writer - Shortcut between event READY and task STOP"] +pub type READY_STOP_W<'a, const O: u8> = crate::BitWriter<'a, u32, SHORTS_SPEC, READY_STOP_A, O>; +impl<'a, const O: u8> READY_STOP_W<'a, O> { + #[doc = "Disable shortcut"] + #[inline(always)] + pub fn disabled(self) -> &'a mut W { + self.variant(READY_STOP_A::DISABLED) + } + #[doc = "Enable shortcut"] + #[inline(always)] + pub fn enabled(self) -> &'a mut W { + self.variant(READY_STOP_A::ENABLED) + } +} +#[doc = "Field `DOWN_STOP` reader - Shortcut between event DOWN and task STOP"] +pub type DOWN_STOP_R = crate::BitReader; +#[doc = "Shortcut between event DOWN and task STOP\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum DOWN_STOP_A { + #[doc = "0: Disable shortcut"] + DISABLED = 0, + #[doc = "1: Enable shortcut"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: DOWN_STOP_A) -> Self { + variant as u8 != 0 + } +} +impl DOWN_STOP_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> DOWN_STOP_A { + match self.bits { + false => DOWN_STOP_A::DISABLED, + true => DOWN_STOP_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == DOWN_STOP_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == DOWN_STOP_A::ENABLED + } +} +#[doc = "Field `DOWN_STOP` writer - Shortcut between event DOWN and task STOP"] +pub type DOWN_STOP_W<'a, const O: u8> = crate::BitWriter<'a, u32, SHORTS_SPEC, DOWN_STOP_A, O>; +impl<'a, const O: u8> DOWN_STOP_W<'a, O> { + #[doc = "Disable shortcut"] + #[inline(always)] + pub fn disabled(self) -> &'a mut W { + self.variant(DOWN_STOP_A::DISABLED) + } + #[doc = "Enable shortcut"] + #[inline(always)] + pub fn enabled(self) -> &'a mut W { + self.variant(DOWN_STOP_A::ENABLED) + } +} +#[doc = "Field `UP_STOP` reader - Shortcut between event UP and task STOP"] +pub type UP_STOP_R = crate::BitReader; +#[doc = "Shortcut between event UP and task STOP\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum UP_STOP_A { + #[doc = "0: Disable shortcut"] + DISABLED = 0, + #[doc = "1: Enable shortcut"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: UP_STOP_A) -> Self { + variant as u8 != 0 + } +} +impl UP_STOP_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> UP_STOP_A { + match self.bits { + false => UP_STOP_A::DISABLED, + true => UP_STOP_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == UP_STOP_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == UP_STOP_A::ENABLED + } +} +#[doc = "Field `UP_STOP` writer - Shortcut between event UP and task STOP"] +pub type UP_STOP_W<'a, const O: u8> = crate::BitWriter<'a, u32, SHORTS_SPEC, UP_STOP_A, O>; +impl<'a, const O: u8> UP_STOP_W<'a, O> { + #[doc = "Disable shortcut"] + #[inline(always)] + pub fn disabled(self) -> &'a mut W { + self.variant(UP_STOP_A::DISABLED) + } + #[doc = "Enable shortcut"] + #[inline(always)] + pub fn enabled(self) -> &'a mut W { + self.variant(UP_STOP_A::ENABLED) + } +} +#[doc = "Field `CROSS_STOP` reader - Shortcut between event CROSS and task STOP"] +pub type CROSS_STOP_R = crate::BitReader; +#[doc = "Shortcut between event CROSS and task STOP\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum CROSS_STOP_A { + #[doc = "0: Disable shortcut"] + DISABLED = 0, + #[doc = "1: Enable shortcut"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: CROSS_STOP_A) -> Self { + variant as u8 != 0 + } +} +impl CROSS_STOP_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> CROSS_STOP_A { + match self.bits { + false => CROSS_STOP_A::DISABLED, + true => CROSS_STOP_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == CROSS_STOP_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == CROSS_STOP_A::ENABLED + } +} +#[doc = "Field `CROSS_STOP` writer - Shortcut between event CROSS and task STOP"] +pub type CROSS_STOP_W<'a, const O: u8> = crate::BitWriter<'a, u32, SHORTS_SPEC, CROSS_STOP_A, O>; +impl<'a, const O: u8> CROSS_STOP_W<'a, O> { + #[doc = "Disable shortcut"] + #[inline(always)] + pub fn disabled(self) -> &'a mut W { + self.variant(CROSS_STOP_A::DISABLED) + } + #[doc = "Enable shortcut"] + #[inline(always)] + pub fn enabled(self) -> &'a mut W { + self.variant(CROSS_STOP_A::ENABLED) + } +} +impl R { + #[doc = "Bit 0 - Shortcut between event READY and task SAMPLE"] + #[inline(always)] + pub fn ready_sample(&self) -> READY_SAMPLE_R { + READY_SAMPLE_R::new((self.bits & 1) != 0) + } + #[doc = "Bit 1 - Shortcut between event READY and task STOP"] + #[inline(always)] + pub fn ready_stop(&self) -> READY_STOP_R { + READY_STOP_R::new(((self.bits >> 1) & 1) != 0) + } + #[doc = "Bit 2 - Shortcut between event DOWN and task STOP"] + #[inline(always)] + pub fn down_stop(&self) -> DOWN_STOP_R { + DOWN_STOP_R::new(((self.bits >> 2) & 1) != 0) + } + #[doc = "Bit 3 - Shortcut between event UP and task STOP"] + #[inline(always)] + pub fn up_stop(&self) -> UP_STOP_R { + UP_STOP_R::new(((self.bits >> 3) & 1) != 0) + } + #[doc = "Bit 4 - Shortcut between event CROSS and task STOP"] + #[inline(always)] + pub fn cross_stop(&self) -> CROSS_STOP_R { + CROSS_STOP_R::new(((self.bits >> 4) & 1) != 0) + } +} +impl W { + #[doc = "Bit 0 - Shortcut between event READY and task SAMPLE"] + #[inline(always)] + #[must_use] + pub fn ready_sample(&mut self) -> READY_SAMPLE_W<0> { + READY_SAMPLE_W::new(self) + } + #[doc = "Bit 1 - Shortcut between event READY and task STOP"] + #[inline(always)] + #[must_use] + pub fn ready_stop(&mut self) -> READY_STOP_W<1> { + READY_STOP_W::new(self) + } + #[doc = "Bit 2 - Shortcut between event DOWN and task STOP"] + #[inline(always)] + #[must_use] + pub fn down_stop(&mut self) -> DOWN_STOP_W<2> { + DOWN_STOP_W::new(self) + } + #[doc = "Bit 3 - Shortcut between event UP and task STOP"] + #[inline(always)] + #[must_use] + pub fn up_stop(&mut self) -> UP_STOP_W<3> { + UP_STOP_W::new(self) + } + #[doc = "Bit 4 - Shortcut between event CROSS and task STOP"] + #[inline(always)] + #[must_use] + pub fn cross_stop(&mut self) -> CROSS_STOP_W<4> { + CROSS_STOP_W::new(self) + } + #[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 = "Shortcuts between local events and tasks\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 [shorts](index.html) module"] +pub struct SHORTS_SPEC; +impl crate::RegisterSpec for SHORTS_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [shorts::R](R) reader structure"] +impl crate::Readable for SHORTS_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [shorts::W](W) writer structure"] +impl crate::Writable for SHORTS_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets SHORTS to value 0"] +impl crate::Resettable for SHORTS_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/lpcomp/tasks_sample.rs b/down-the-stack/dk_pac/src/lpcomp/tasks_sample.rs new file mode 100644 index 0000000..d0ef589 --- /dev/null +++ b/down-the-stack/dk_pac/src/lpcomp/tasks_sample.rs @@ -0,0 +1,72 @@ +#[doc = "Register `TASKS_SAMPLE` 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 = "Sample comparator value\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum TASKS_SAMPLE_AW { + #[doc = "1: Trigger task"] + TRIGGER = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: TASKS_SAMPLE_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `TASKS_SAMPLE` writer - Sample comparator value"] +pub type TASKS_SAMPLE_W<'a, const O: u8> = + crate::BitWriter<'a, u32, TASKS_SAMPLE_SPEC, TASKS_SAMPLE_AW, O>; +impl<'a, const O: u8> TASKS_SAMPLE_W<'a, O> { + #[doc = "Trigger task"] + #[inline(always)] + pub fn trigger(self) -> &'a mut W { + self.variant(TASKS_SAMPLE_AW::TRIGGER) + } +} +impl W { + #[doc = "Bit 0 - Sample comparator value"] + #[inline(always)] + #[must_use] + pub fn tasks_sample(&mut self) -> TASKS_SAMPLE_W<0> { + TASKS_SAMPLE_W::new(self) + } + #[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 = "Sample comparator value\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 [tasks_sample](index.html) module"] +pub struct TASKS_SAMPLE_SPEC; +impl crate::RegisterSpec for TASKS_SAMPLE_SPEC { + type Ux = u32; +} +#[doc = "`write(|w| ..)` method takes [tasks_sample::W](W) writer structure"] +impl crate::Writable for TASKS_SAMPLE_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets TASKS_SAMPLE to value 0"] +impl crate::Resettable for TASKS_SAMPLE_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/lpcomp/tasks_start.rs b/down-the-stack/dk_pac/src/lpcomp/tasks_start.rs new file mode 100644 index 0000000..60fdc8e --- /dev/null +++ b/down-the-stack/dk_pac/src/lpcomp/tasks_start.rs @@ -0,0 +1,72 @@ +#[doc = "Register `TASKS_START` 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 = "Start comparator\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum TASKS_START_AW { + #[doc = "1: Trigger task"] + TRIGGER = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: TASKS_START_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `TASKS_START` writer - Start comparator"] +pub type TASKS_START_W<'a, const O: u8> = + crate::BitWriter<'a, u32, TASKS_START_SPEC, TASKS_START_AW, O>; +impl<'a, const O: u8> TASKS_START_W<'a, O> { + #[doc = "Trigger task"] + #[inline(always)] + pub fn trigger(self) -> &'a mut W { + self.variant(TASKS_START_AW::TRIGGER) + } +} +impl W { + #[doc = "Bit 0 - Start comparator"] + #[inline(always)] + #[must_use] + pub fn tasks_start(&mut self) -> TASKS_START_W<0> { + TASKS_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 + } +} +#[doc = "Start comparator\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 [tasks_start](index.html) module"] +pub struct TASKS_START_SPEC; +impl crate::RegisterSpec for TASKS_START_SPEC { + type Ux = u32; +} +#[doc = "`write(|w| ..)` method takes [tasks_start::W](W) writer structure"] +impl crate::Writable for TASKS_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 TASKS_START to value 0"] +impl crate::Resettable for TASKS_START_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/lpcomp/tasks_stop.rs b/down-the-stack/dk_pac/src/lpcomp/tasks_stop.rs new file mode 100644 index 0000000..dd80ae5 --- /dev/null +++ b/down-the-stack/dk_pac/src/lpcomp/tasks_stop.rs @@ -0,0 +1,72 @@ +#[doc = "Register `TASKS_STOP` 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 = "Stop comparator\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum TASKS_STOP_AW { + #[doc = "1: Trigger task"] + TRIGGER = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: TASKS_STOP_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `TASKS_STOP` writer - Stop comparator"] +pub type TASKS_STOP_W<'a, const O: u8> = + crate::BitWriter<'a, u32, TASKS_STOP_SPEC, TASKS_STOP_AW, O>; +impl<'a, const O: u8> TASKS_STOP_W<'a, O> { + #[doc = "Trigger task"] + #[inline(always)] + pub fn trigger(self) -> &'a mut W { + self.variant(TASKS_STOP_AW::TRIGGER) + } +} +impl W { + #[doc = "Bit 0 - Stop comparator"] + #[inline(always)] + #[must_use] + pub fn tasks_stop(&mut self) -> TASKS_STOP_W<0> { + TASKS_STOP_W::new(self) + } + #[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 = "Stop comparator\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 [tasks_stop](index.html) module"] +pub struct TASKS_STOP_SPEC; +impl crate::RegisterSpec for TASKS_STOP_SPEC { + type Ux = u32; +} +#[doc = "`write(|w| ..)` method takes [tasks_stop::W](W) writer structure"] +impl crate::Writable for TASKS_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 TASKS_STOP to value 0"] +impl crate::Resettable for TASKS_STOP_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/mwu.rs b/down-the-stack/dk_pac/src/mwu.rs new file mode 100644 index 0000000..aef117b --- /dev/null +++ b/down-the-stack/dk_pac/src/mwu.rs @@ -0,0 +1,113 @@ +#[doc = r"Register block"] +#[repr(C)] +pub struct RegisterBlock { + _reserved0: [u8; 0x0100], + #[doc = "0x100..0x120 - Peripheral events."] + pub events_region: [EVENTS_REGION; 4], + _reserved1: [u8; 0x40], + #[doc = "0x160..0x170 - Peripheral events."] + pub events_pregion: [EVENTS_PREGION; 2], + _reserved2: [u8; 0x0190], + #[doc = "0x300 - Enable or disable interrupt"] + pub inten: INTEN, + #[doc = "0x304 - Enable interrupt"] + pub intenset: INTENSET, + #[doc = "0x308 - Disable interrupt"] + pub intenclr: INTENCLR, + _reserved5: [u8; 0x14], + #[doc = "0x320 - Enable or disable interrupt"] + pub nmien: NMIEN, + #[doc = "0x324 - Enable interrupt"] + pub nmienset: NMIENSET, + #[doc = "0x328 - Disable interrupt"] + pub nmienclr: NMIENCLR, + _reserved8: [u8; 0xd4], + #[doc = "0x400..0x410 - Unspecified"] + pub perregion: [PERREGION; 2], + _reserved9: [u8; 0x0100], + #[doc = "0x510 - Enable/disable regions watch"] + pub regionen: REGIONEN, + #[doc = "0x514 - Enable regions watch"] + pub regionenset: REGIONENSET, + #[doc = "0x518 - Disable regions watch"] + pub regionenclr: REGIONENCLR, + _reserved12: [u8; 0xe4], + #[doc = "0x600..0x608 - Unspecified"] + pub region0: REGION, + _reserved13: [u8; 0x08], + #[doc = "0x610..0x618 - Unspecified"] + pub region1: REGION, + _reserved14: [u8; 0x08], + #[doc = "0x620..0x628 - Unspecified"] + pub region2: REGION, + _reserved15: [u8; 0x08], + #[doc = "0x630..0x638 - Unspecified"] + pub region3: REGION, + _reserved16: [u8; 0x88], + #[doc = "0x6c0..0x6cc - Unspecified"] + pub pregion0: PREGION, + _reserved17: [u8; 0x04], + #[doc = "0x6d0..0x6dc - Unspecified"] + pub pregion1: PREGION, +} +#[doc = "Peripheral events."] +pub use self::events_region::EVENTS_REGION; +#[doc = r"Cluster"] +#[doc = "Peripheral events."] +pub mod events_region; +#[doc = "Peripheral events."] +pub use self::events_pregion::EVENTS_PREGION; +#[doc = r"Cluster"] +#[doc = "Peripheral events."] +pub mod events_pregion; +#[doc = "INTEN (rw) register accessor: an alias for `Reg`"] +pub type INTEN = crate::Reg; +#[doc = "Enable or disable interrupt"] +pub mod inten; +#[doc = "INTENSET (rw) register accessor: an alias for `Reg`"] +pub type INTENSET = crate::Reg; +#[doc = "Enable interrupt"] +pub mod intenset; +#[doc = "INTENCLR (rw) register accessor: an alias for `Reg`"] +pub type INTENCLR = crate::Reg; +#[doc = "Disable interrupt"] +pub mod intenclr; +#[doc = "NMIEN (rw) register accessor: an alias for `Reg`"] +pub type NMIEN = crate::Reg; +#[doc = "Enable or disable interrupt"] +pub mod nmien; +#[doc = "NMIENSET (rw) register accessor: an alias for `Reg`"] +pub type NMIENSET = crate::Reg; +#[doc = "Enable interrupt"] +pub mod nmienset; +#[doc = "NMIENCLR (rw) register accessor: an alias for `Reg`"] +pub type NMIENCLR = crate::Reg; +#[doc = "Disable interrupt"] +pub mod nmienclr; +#[doc = "Unspecified"] +pub use self::perregion::PERREGION; +#[doc = r"Cluster"] +#[doc = "Unspecified"] +pub mod perregion; +#[doc = "REGIONEN (rw) register accessor: an alias for `Reg`"] +pub type REGIONEN = crate::Reg; +#[doc = "Enable/disable regions watch"] +pub mod regionen; +#[doc = "REGIONENSET (rw) register accessor: an alias for `Reg`"] +pub type REGIONENSET = crate::Reg; +#[doc = "Enable regions watch"] +pub mod regionenset; +#[doc = "REGIONENCLR (rw) register accessor: an alias for `Reg`"] +pub type REGIONENCLR = crate::Reg; +#[doc = "Disable regions watch"] +pub mod regionenclr; +#[doc = "Unspecified"] +pub use self::region::REGION; +#[doc = r"Cluster"] +#[doc = "Unspecified"] +pub mod region; +#[doc = "Unspecified"] +pub use self::pregion::PREGION; +#[doc = r"Cluster"] +#[doc = "Unspecified"] +pub mod pregion; diff --git a/down-the-stack/dk_pac/src/mwu/events_pregion.rs b/down-the-stack/dk_pac/src/mwu/events_pregion.rs new file mode 100644 index 0000000..a94ba1a --- /dev/null +++ b/down-the-stack/dk_pac/src/mwu/events_pregion.rs @@ -0,0 +1,16 @@ +#[doc = r"Register block"] +#[repr(C)] +pub struct EVENTS_PREGION { + #[doc = "0x00 - Description cluster: Write access to peripheral region n detected"] + pub wa: WA, + #[doc = "0x04 - Description cluster: Read access to peripheral region n detected"] + pub ra: RA, +} +#[doc = "WA (rw) register accessor: an alias for `Reg`"] +pub type WA = crate::Reg; +#[doc = "Description cluster: Write access to peripheral region n detected"] +pub mod wa; +#[doc = "RA (rw) register accessor: an alias for `Reg`"] +pub type RA = crate::Reg; +#[doc = "Description cluster: Read access to peripheral region n detected"] +pub mod ra; diff --git a/down-the-stack/dk_pac/src/mwu/events_pregion/ra.rs b/down-the-stack/dk_pac/src/mwu/events_pregion/ra.rs new file mode 100644 index 0000000..363fae7 --- /dev/null +++ b/down-the-stack/dk_pac/src/mwu/events_pregion/ra.rs @@ -0,0 +1,126 @@ +#[doc = "Register `RA` 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 `RA` 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 `RA` reader - Read access to peripheral region n detected"] +pub type RA_R = crate::BitReader; +#[doc = "Read access to peripheral region n detected\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum RA_A { + #[doc = "0: Event not generated"] + NOT_GENERATED = 0, + #[doc = "1: Event generated"] + GENERATED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: RA_A) -> Self { + variant as u8 != 0 + } +} +impl RA_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> RA_A { + match self.bits { + false => RA_A::NOT_GENERATED, + true => RA_A::GENERATED, + } + } + #[doc = "Checks if the value of the field is `NOT_GENERATED`"] + #[inline(always)] + pub fn is_not_generated(&self) -> bool { + *self == RA_A::NOT_GENERATED + } + #[doc = "Checks if the value of the field is `GENERATED`"] + #[inline(always)] + pub fn is_generated(&self) -> bool { + *self == RA_A::GENERATED + } +} +#[doc = "Field `RA` writer - Read access to peripheral region n detected"] +pub type RA_W<'a, const O: u8> = crate::BitWriter<'a, u32, RA_SPEC, RA_A, O>; +impl<'a, const O: u8> RA_W<'a, O> { + #[doc = "Event not generated"] + #[inline(always)] + pub fn not_generated(self) -> &'a mut W { + self.variant(RA_A::NOT_GENERATED) + } + #[doc = "Event generated"] + #[inline(always)] + pub fn generated(self) -> &'a mut W { + self.variant(RA_A::GENERATED) + } +} +impl R { + #[doc = "Bit 0 - Read access to peripheral region n detected"] + #[inline(always)] + pub fn ra(&self) -> RA_R { + RA_R::new((self.bits & 1) != 0) + } +} +impl W { + #[doc = "Bit 0 - Read access to peripheral region n detected"] + #[inline(always)] + #[must_use] + pub fn ra(&mut self) -> RA_W<0> { + RA_W::new(self) + } + #[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 = "Description cluster: Read access to peripheral region n detected\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 [ra](index.html) module"] +pub struct RA_SPEC; +impl crate::RegisterSpec for RA_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [ra::R](R) reader structure"] +impl crate::Readable for RA_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [ra::W](W) writer structure"] +impl crate::Writable for RA_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets RA to value 0"] +impl crate::Resettable for RA_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/mwu/events_pregion/wa.rs b/down-the-stack/dk_pac/src/mwu/events_pregion/wa.rs new file mode 100644 index 0000000..889d85e --- /dev/null +++ b/down-the-stack/dk_pac/src/mwu/events_pregion/wa.rs @@ -0,0 +1,126 @@ +#[doc = "Register `WA` 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 `WA` 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 `WA` reader - Write access to peripheral region n detected"] +pub type WA_R = crate::BitReader; +#[doc = "Write access to peripheral region n detected\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum WA_A { + #[doc = "0: Event not generated"] + NOT_GENERATED = 0, + #[doc = "1: Event generated"] + GENERATED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: WA_A) -> Self { + variant as u8 != 0 + } +} +impl WA_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> WA_A { + match self.bits { + false => WA_A::NOT_GENERATED, + true => WA_A::GENERATED, + } + } + #[doc = "Checks if the value of the field is `NOT_GENERATED`"] + #[inline(always)] + pub fn is_not_generated(&self) -> bool { + *self == WA_A::NOT_GENERATED + } + #[doc = "Checks if the value of the field is `GENERATED`"] + #[inline(always)] + pub fn is_generated(&self) -> bool { + *self == WA_A::GENERATED + } +} +#[doc = "Field `WA` writer - Write access to peripheral region n detected"] +pub type WA_W<'a, const O: u8> = crate::BitWriter<'a, u32, WA_SPEC, WA_A, O>; +impl<'a, const O: u8> WA_W<'a, O> { + #[doc = "Event not generated"] + #[inline(always)] + pub fn not_generated(self) -> &'a mut W { + self.variant(WA_A::NOT_GENERATED) + } + #[doc = "Event generated"] + #[inline(always)] + pub fn generated(self) -> &'a mut W { + self.variant(WA_A::GENERATED) + } +} +impl R { + #[doc = "Bit 0 - Write access to peripheral region n detected"] + #[inline(always)] + pub fn wa(&self) -> WA_R { + WA_R::new((self.bits & 1) != 0) + } +} +impl W { + #[doc = "Bit 0 - Write access to peripheral region n detected"] + #[inline(always)] + #[must_use] + pub fn wa(&mut self) -> WA_W<0> { + WA_W::new(self) + } + #[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 = "Description cluster: Write access to peripheral region n detected\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 [wa](index.html) module"] +pub struct WA_SPEC; +impl crate::RegisterSpec for WA_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [wa::R](R) reader structure"] +impl crate::Readable for WA_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [wa::W](W) writer structure"] +impl crate::Writable for WA_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets WA to value 0"] +impl crate::Resettable for WA_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/mwu/events_region.rs b/down-the-stack/dk_pac/src/mwu/events_region.rs new file mode 100644 index 0000000..51f3bae --- /dev/null +++ b/down-the-stack/dk_pac/src/mwu/events_region.rs @@ -0,0 +1,16 @@ +#[doc = r"Register block"] +#[repr(C)] +pub struct EVENTS_REGION { + #[doc = "0x00 - Description cluster: Write access to region n detected"] + pub wa: WA, + #[doc = "0x04 - Description cluster: Read access to region n detected"] + pub ra: RA, +} +#[doc = "WA (rw) register accessor: an alias for `Reg`"] +pub type WA = crate::Reg; +#[doc = "Description cluster: Write access to region n detected"] +pub mod wa; +#[doc = "RA (rw) register accessor: an alias for `Reg`"] +pub type RA = crate::Reg; +#[doc = "Description cluster: Read access to region n detected"] +pub mod ra; diff --git a/down-the-stack/dk_pac/src/mwu/events_region/ra.rs b/down-the-stack/dk_pac/src/mwu/events_region/ra.rs new file mode 100644 index 0000000..b395a25 --- /dev/null +++ b/down-the-stack/dk_pac/src/mwu/events_region/ra.rs @@ -0,0 +1,126 @@ +#[doc = "Register `RA` 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 `RA` 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 `RA` reader - Read access to region n detected"] +pub type RA_R = crate::BitReader; +#[doc = "Read access to region n detected\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum RA_A { + #[doc = "0: Event not generated"] + NOT_GENERATED = 0, + #[doc = "1: Event generated"] + GENERATED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: RA_A) -> Self { + variant as u8 != 0 + } +} +impl RA_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> RA_A { + match self.bits { + false => RA_A::NOT_GENERATED, + true => RA_A::GENERATED, + } + } + #[doc = "Checks if the value of the field is `NOT_GENERATED`"] + #[inline(always)] + pub fn is_not_generated(&self) -> bool { + *self == RA_A::NOT_GENERATED + } + #[doc = "Checks if the value of the field is `GENERATED`"] + #[inline(always)] + pub fn is_generated(&self) -> bool { + *self == RA_A::GENERATED + } +} +#[doc = "Field `RA` writer - Read access to region n detected"] +pub type RA_W<'a, const O: u8> = crate::BitWriter<'a, u32, RA_SPEC, RA_A, O>; +impl<'a, const O: u8> RA_W<'a, O> { + #[doc = "Event not generated"] + #[inline(always)] + pub fn not_generated(self) -> &'a mut W { + self.variant(RA_A::NOT_GENERATED) + } + #[doc = "Event generated"] + #[inline(always)] + pub fn generated(self) -> &'a mut W { + self.variant(RA_A::GENERATED) + } +} +impl R { + #[doc = "Bit 0 - Read access to region n detected"] + #[inline(always)] + pub fn ra(&self) -> RA_R { + RA_R::new((self.bits & 1) != 0) + } +} +impl W { + #[doc = "Bit 0 - Read access to region n detected"] + #[inline(always)] + #[must_use] + pub fn ra(&mut self) -> RA_W<0> { + RA_W::new(self) + } + #[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 = "Description cluster: Read access to region n detected\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 [ra](index.html) module"] +pub struct RA_SPEC; +impl crate::RegisterSpec for RA_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [ra::R](R) reader structure"] +impl crate::Readable for RA_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [ra::W](W) writer structure"] +impl crate::Writable for RA_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets RA to value 0"] +impl crate::Resettable for RA_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/mwu/events_region/wa.rs b/down-the-stack/dk_pac/src/mwu/events_region/wa.rs new file mode 100644 index 0000000..a31518d --- /dev/null +++ b/down-the-stack/dk_pac/src/mwu/events_region/wa.rs @@ -0,0 +1,126 @@ +#[doc = "Register `WA` 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 `WA` 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 `WA` reader - Write access to region n detected"] +pub type WA_R = crate::BitReader; +#[doc = "Write access to region n detected\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum WA_A { + #[doc = "0: Event not generated"] + NOT_GENERATED = 0, + #[doc = "1: Event generated"] + GENERATED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: WA_A) -> Self { + variant as u8 != 0 + } +} +impl WA_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> WA_A { + match self.bits { + false => WA_A::NOT_GENERATED, + true => WA_A::GENERATED, + } + } + #[doc = "Checks if the value of the field is `NOT_GENERATED`"] + #[inline(always)] + pub fn is_not_generated(&self) -> bool { + *self == WA_A::NOT_GENERATED + } + #[doc = "Checks if the value of the field is `GENERATED`"] + #[inline(always)] + pub fn is_generated(&self) -> bool { + *self == WA_A::GENERATED + } +} +#[doc = "Field `WA` writer - Write access to region n detected"] +pub type WA_W<'a, const O: u8> = crate::BitWriter<'a, u32, WA_SPEC, WA_A, O>; +impl<'a, const O: u8> WA_W<'a, O> { + #[doc = "Event not generated"] + #[inline(always)] + pub fn not_generated(self) -> &'a mut W { + self.variant(WA_A::NOT_GENERATED) + } + #[doc = "Event generated"] + #[inline(always)] + pub fn generated(self) -> &'a mut W { + self.variant(WA_A::GENERATED) + } +} +impl R { + #[doc = "Bit 0 - Write access to region n detected"] + #[inline(always)] + pub fn wa(&self) -> WA_R { + WA_R::new((self.bits & 1) != 0) + } +} +impl W { + #[doc = "Bit 0 - Write access to region n detected"] + #[inline(always)] + #[must_use] + pub fn wa(&mut self) -> WA_W<0> { + WA_W::new(self) + } + #[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 = "Description cluster: Write access to region n detected\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 [wa](index.html) module"] +pub struct WA_SPEC; +impl crate::RegisterSpec for WA_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [wa::R](R) reader structure"] +impl crate::Readable for WA_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [wa::W](W) writer structure"] +impl crate::Writable for WA_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets WA to value 0"] +impl crate::Resettable for WA_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/mwu/inten.rs b/down-the-stack/dk_pac/src/mwu/inten.rs new file mode 100644 index 0000000..3e8832f --- /dev/null +++ b/down-the-stack/dk_pac/src/mwu/inten.rs @@ -0,0 +1,797 @@ +#[doc = "Register `INTEN` 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 `INTEN` 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 `REGION0WA` reader - Enable or disable interrupt for event REGION0WA"] +pub type REGION0WA_R = crate::BitReader; +#[doc = "Enable or disable interrupt for event REGION0WA\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum REGION0WA_A { + #[doc = "0: Disable"] + DISABLED = 0, + #[doc = "1: Enable"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: REGION0WA_A) -> Self { + variant as u8 != 0 + } +} +impl REGION0WA_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> REGION0WA_A { + match self.bits { + false => REGION0WA_A::DISABLED, + true => REGION0WA_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == REGION0WA_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == REGION0WA_A::ENABLED + } +} +#[doc = "Field `REGION0WA` writer - Enable or disable interrupt for event REGION0WA"] +pub type REGION0WA_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTEN_SPEC, REGION0WA_A, O>; +impl<'a, const O: u8> REGION0WA_W<'a, O> { + #[doc = "Disable"] + #[inline(always)] + pub fn disabled(self) -> &'a mut W { + self.variant(REGION0WA_A::DISABLED) + } + #[doc = "Enable"] + #[inline(always)] + pub fn enabled(self) -> &'a mut W { + self.variant(REGION0WA_A::ENABLED) + } +} +#[doc = "Field `REGION0RA` reader - Enable or disable interrupt for event REGION0RA"] +pub type REGION0RA_R = crate::BitReader; +#[doc = "Enable or disable interrupt for event REGION0RA\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum REGION0RA_A { + #[doc = "0: Disable"] + DISABLED = 0, + #[doc = "1: Enable"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: REGION0RA_A) -> Self { + variant as u8 != 0 + } +} +impl REGION0RA_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> REGION0RA_A { + match self.bits { + false => REGION0RA_A::DISABLED, + true => REGION0RA_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == REGION0RA_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == REGION0RA_A::ENABLED + } +} +#[doc = "Field `REGION0RA` writer - Enable or disable interrupt for event REGION0RA"] +pub type REGION0RA_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTEN_SPEC, REGION0RA_A, O>; +impl<'a, const O: u8> REGION0RA_W<'a, O> { + #[doc = "Disable"] + #[inline(always)] + pub fn disabled(self) -> &'a mut W { + self.variant(REGION0RA_A::DISABLED) + } + #[doc = "Enable"] + #[inline(always)] + pub fn enabled(self) -> &'a mut W { + self.variant(REGION0RA_A::ENABLED) + } +} +#[doc = "Field `REGION1WA` reader - Enable or disable interrupt for event REGION1WA"] +pub type REGION1WA_R = crate::BitReader; +#[doc = "Enable or disable interrupt for event REGION1WA\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum REGION1WA_A { + #[doc = "0: Disable"] + DISABLED = 0, + #[doc = "1: Enable"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: REGION1WA_A) -> Self { + variant as u8 != 0 + } +} +impl REGION1WA_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> REGION1WA_A { + match self.bits { + false => REGION1WA_A::DISABLED, + true => REGION1WA_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == REGION1WA_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == REGION1WA_A::ENABLED + } +} +#[doc = "Field `REGION1WA` writer - Enable or disable interrupt for event REGION1WA"] +pub type REGION1WA_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTEN_SPEC, REGION1WA_A, O>; +impl<'a, const O: u8> REGION1WA_W<'a, O> { + #[doc = "Disable"] + #[inline(always)] + pub fn disabled(self) -> &'a mut W { + self.variant(REGION1WA_A::DISABLED) + } + #[doc = "Enable"] + #[inline(always)] + pub fn enabled(self) -> &'a mut W { + self.variant(REGION1WA_A::ENABLED) + } +} +#[doc = "Field `REGION1RA` reader - Enable or disable interrupt for event REGION1RA"] +pub type REGION1RA_R = crate::BitReader; +#[doc = "Enable or disable interrupt for event REGION1RA\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum REGION1RA_A { + #[doc = "0: Disable"] + DISABLED = 0, + #[doc = "1: Enable"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: REGION1RA_A) -> Self { + variant as u8 != 0 + } +} +impl REGION1RA_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> REGION1RA_A { + match self.bits { + false => REGION1RA_A::DISABLED, + true => REGION1RA_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == REGION1RA_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == REGION1RA_A::ENABLED + } +} +#[doc = "Field `REGION1RA` writer - Enable or disable interrupt for event REGION1RA"] +pub type REGION1RA_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTEN_SPEC, REGION1RA_A, O>; +impl<'a, const O: u8> REGION1RA_W<'a, O> { + #[doc = "Disable"] + #[inline(always)] + pub fn disabled(self) -> &'a mut W { + self.variant(REGION1RA_A::DISABLED) + } + #[doc = "Enable"] + #[inline(always)] + pub fn enabled(self) -> &'a mut W { + self.variant(REGION1RA_A::ENABLED) + } +} +#[doc = "Field `REGION2WA` reader - Enable or disable interrupt for event REGION2WA"] +pub type REGION2WA_R = crate::BitReader; +#[doc = "Enable or disable interrupt for event REGION2WA\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum REGION2WA_A { + #[doc = "0: Disable"] + DISABLED = 0, + #[doc = "1: Enable"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: REGION2WA_A) -> Self { + variant as u8 != 0 + } +} +impl REGION2WA_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> REGION2WA_A { + match self.bits { + false => REGION2WA_A::DISABLED, + true => REGION2WA_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == REGION2WA_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == REGION2WA_A::ENABLED + } +} +#[doc = "Field `REGION2WA` writer - Enable or disable interrupt for event REGION2WA"] +pub type REGION2WA_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTEN_SPEC, REGION2WA_A, O>; +impl<'a, const O: u8> REGION2WA_W<'a, O> { + #[doc = "Disable"] + #[inline(always)] + pub fn disabled(self) -> &'a mut W { + self.variant(REGION2WA_A::DISABLED) + } + #[doc = "Enable"] + #[inline(always)] + pub fn enabled(self) -> &'a mut W { + self.variant(REGION2WA_A::ENABLED) + } +} +#[doc = "Field `REGION2RA` reader - Enable or disable interrupt for event REGION2RA"] +pub type REGION2RA_R = crate::BitReader; +#[doc = "Enable or disable interrupt for event REGION2RA\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum REGION2RA_A { + #[doc = "0: Disable"] + DISABLED = 0, + #[doc = "1: Enable"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: REGION2RA_A) -> Self { + variant as u8 != 0 + } +} +impl REGION2RA_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> REGION2RA_A { + match self.bits { + false => REGION2RA_A::DISABLED, + true => REGION2RA_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == REGION2RA_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == REGION2RA_A::ENABLED + } +} +#[doc = "Field `REGION2RA` writer - Enable or disable interrupt for event REGION2RA"] +pub type REGION2RA_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTEN_SPEC, REGION2RA_A, O>; +impl<'a, const O: u8> REGION2RA_W<'a, O> { + #[doc = "Disable"] + #[inline(always)] + pub fn disabled(self) -> &'a mut W { + self.variant(REGION2RA_A::DISABLED) + } + #[doc = "Enable"] + #[inline(always)] + pub fn enabled(self) -> &'a mut W { + self.variant(REGION2RA_A::ENABLED) + } +} +#[doc = "Field `REGION3WA` reader - Enable or disable interrupt for event REGION3WA"] +pub type REGION3WA_R = crate::BitReader; +#[doc = "Enable or disable interrupt for event REGION3WA\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum REGION3WA_A { + #[doc = "0: Disable"] + DISABLED = 0, + #[doc = "1: Enable"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: REGION3WA_A) -> Self { + variant as u8 != 0 + } +} +impl REGION3WA_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> REGION3WA_A { + match self.bits { + false => REGION3WA_A::DISABLED, + true => REGION3WA_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == REGION3WA_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == REGION3WA_A::ENABLED + } +} +#[doc = "Field `REGION3WA` writer - Enable or disable interrupt for event REGION3WA"] +pub type REGION3WA_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTEN_SPEC, REGION3WA_A, O>; +impl<'a, const O: u8> REGION3WA_W<'a, O> { + #[doc = "Disable"] + #[inline(always)] + pub fn disabled(self) -> &'a mut W { + self.variant(REGION3WA_A::DISABLED) + } + #[doc = "Enable"] + #[inline(always)] + pub fn enabled(self) -> &'a mut W { + self.variant(REGION3WA_A::ENABLED) + } +} +#[doc = "Field `REGION3RA` reader - Enable or disable interrupt for event REGION3RA"] +pub type REGION3RA_R = crate::BitReader; +#[doc = "Enable or disable interrupt for event REGION3RA\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum REGION3RA_A { + #[doc = "0: Disable"] + DISABLED = 0, + #[doc = "1: Enable"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: REGION3RA_A) -> Self { + variant as u8 != 0 + } +} +impl REGION3RA_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> REGION3RA_A { + match self.bits { + false => REGION3RA_A::DISABLED, + true => REGION3RA_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == REGION3RA_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == REGION3RA_A::ENABLED + } +} +#[doc = "Field `REGION3RA` writer - Enable or disable interrupt for event REGION3RA"] +pub type REGION3RA_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTEN_SPEC, REGION3RA_A, O>; +impl<'a, const O: u8> REGION3RA_W<'a, O> { + #[doc = "Disable"] + #[inline(always)] + pub fn disabled(self) -> &'a mut W { + self.variant(REGION3RA_A::DISABLED) + } + #[doc = "Enable"] + #[inline(always)] + pub fn enabled(self) -> &'a mut W { + self.variant(REGION3RA_A::ENABLED) + } +} +#[doc = "Field `PREGION0WA` reader - Enable or disable interrupt for event PREGION0WA"] +pub type PREGION0WA_R = crate::BitReader; +#[doc = "Enable or disable interrupt for event PREGION0WA\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PREGION0WA_A { + #[doc = "0: Disable"] + DISABLED = 0, + #[doc = "1: Enable"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PREGION0WA_A) -> Self { + variant as u8 != 0 + } +} +impl PREGION0WA_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> PREGION0WA_A { + match self.bits { + false => PREGION0WA_A::DISABLED, + true => PREGION0WA_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == PREGION0WA_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == PREGION0WA_A::ENABLED + } +} +#[doc = "Field `PREGION0WA` writer - Enable or disable interrupt for event PREGION0WA"] +pub type PREGION0WA_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTEN_SPEC, PREGION0WA_A, O>; +impl<'a, const O: u8> PREGION0WA_W<'a, O> { + #[doc = "Disable"] + #[inline(always)] + pub fn disabled(self) -> &'a mut W { + self.variant(PREGION0WA_A::DISABLED) + } + #[doc = "Enable"] + #[inline(always)] + pub fn enabled(self) -> &'a mut W { + self.variant(PREGION0WA_A::ENABLED) + } +} +#[doc = "Field `PREGION0RA` reader - Enable or disable interrupt for event PREGION0RA"] +pub type PREGION0RA_R = crate::BitReader; +#[doc = "Enable or disable interrupt for event PREGION0RA\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PREGION0RA_A { + #[doc = "0: Disable"] + DISABLED = 0, + #[doc = "1: Enable"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PREGION0RA_A) -> Self { + variant as u8 != 0 + } +} +impl PREGION0RA_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> PREGION0RA_A { + match self.bits { + false => PREGION0RA_A::DISABLED, + true => PREGION0RA_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == PREGION0RA_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == PREGION0RA_A::ENABLED + } +} +#[doc = "Field `PREGION0RA` writer - Enable or disable interrupt for event PREGION0RA"] +pub type PREGION0RA_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTEN_SPEC, PREGION0RA_A, O>; +impl<'a, const O: u8> PREGION0RA_W<'a, O> { + #[doc = "Disable"] + #[inline(always)] + pub fn disabled(self) -> &'a mut W { + self.variant(PREGION0RA_A::DISABLED) + } + #[doc = "Enable"] + #[inline(always)] + pub fn enabled(self) -> &'a mut W { + self.variant(PREGION0RA_A::ENABLED) + } +} +#[doc = "Field `PREGION1WA` reader - Enable or disable interrupt for event PREGION1WA"] +pub type PREGION1WA_R = crate::BitReader; +#[doc = "Enable or disable interrupt for event PREGION1WA\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PREGION1WA_A { + #[doc = "0: Disable"] + DISABLED = 0, + #[doc = "1: Enable"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PREGION1WA_A) -> Self { + variant as u8 != 0 + } +} +impl PREGION1WA_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> PREGION1WA_A { + match self.bits { + false => PREGION1WA_A::DISABLED, + true => PREGION1WA_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == PREGION1WA_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == PREGION1WA_A::ENABLED + } +} +#[doc = "Field `PREGION1WA` writer - Enable or disable interrupt for event PREGION1WA"] +pub type PREGION1WA_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTEN_SPEC, PREGION1WA_A, O>; +impl<'a, const O: u8> PREGION1WA_W<'a, O> { + #[doc = "Disable"] + #[inline(always)] + pub fn disabled(self) -> &'a mut W { + self.variant(PREGION1WA_A::DISABLED) + } + #[doc = "Enable"] + #[inline(always)] + pub fn enabled(self) -> &'a mut W { + self.variant(PREGION1WA_A::ENABLED) + } +} +#[doc = "Field `PREGION1RA` reader - Enable or disable interrupt for event PREGION1RA"] +pub type PREGION1RA_R = crate::BitReader; +#[doc = "Enable or disable interrupt for event PREGION1RA\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PREGION1RA_A { + #[doc = "0: Disable"] + DISABLED = 0, + #[doc = "1: Enable"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PREGION1RA_A) -> Self { + variant as u8 != 0 + } +} +impl PREGION1RA_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> PREGION1RA_A { + match self.bits { + false => PREGION1RA_A::DISABLED, + true => PREGION1RA_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == PREGION1RA_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == PREGION1RA_A::ENABLED + } +} +#[doc = "Field `PREGION1RA` writer - Enable or disable interrupt for event PREGION1RA"] +pub type PREGION1RA_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTEN_SPEC, PREGION1RA_A, O>; +impl<'a, const O: u8> PREGION1RA_W<'a, O> { + #[doc = "Disable"] + #[inline(always)] + pub fn disabled(self) -> &'a mut W { + self.variant(PREGION1RA_A::DISABLED) + } + #[doc = "Enable"] + #[inline(always)] + pub fn enabled(self) -> &'a mut W { + self.variant(PREGION1RA_A::ENABLED) + } +} +impl R { + #[doc = "Bit 0 - Enable or disable interrupt for event REGION0WA"] + #[inline(always)] + pub fn region0wa(&self) -> REGION0WA_R { + REGION0WA_R::new((self.bits & 1) != 0) + } + #[doc = "Bit 1 - Enable or disable interrupt for event REGION0RA"] + #[inline(always)] + pub fn region0ra(&self) -> REGION0RA_R { + REGION0RA_R::new(((self.bits >> 1) & 1) != 0) + } + #[doc = "Bit 2 - Enable or disable interrupt for event REGION1WA"] + #[inline(always)] + pub fn region1wa(&self) -> REGION1WA_R { + REGION1WA_R::new(((self.bits >> 2) & 1) != 0) + } + #[doc = "Bit 3 - Enable or disable interrupt for event REGION1RA"] + #[inline(always)] + pub fn region1ra(&self) -> REGION1RA_R { + REGION1RA_R::new(((self.bits >> 3) & 1) != 0) + } + #[doc = "Bit 4 - Enable or disable interrupt for event REGION2WA"] + #[inline(always)] + pub fn region2wa(&self) -> REGION2WA_R { + REGION2WA_R::new(((self.bits >> 4) & 1) != 0) + } + #[doc = "Bit 5 - Enable or disable interrupt for event REGION2RA"] + #[inline(always)] + pub fn region2ra(&self) -> REGION2RA_R { + REGION2RA_R::new(((self.bits >> 5) & 1) != 0) + } + #[doc = "Bit 6 - Enable or disable interrupt for event REGION3WA"] + #[inline(always)] + pub fn region3wa(&self) -> REGION3WA_R { + REGION3WA_R::new(((self.bits >> 6) & 1) != 0) + } + #[doc = "Bit 7 - Enable or disable interrupt for event REGION3RA"] + #[inline(always)] + pub fn region3ra(&self) -> REGION3RA_R { + REGION3RA_R::new(((self.bits >> 7) & 1) != 0) + } + #[doc = "Bit 24 - Enable or disable interrupt for event PREGION0WA"] + #[inline(always)] + pub fn pregion0wa(&self) -> PREGION0WA_R { + PREGION0WA_R::new(((self.bits >> 24) & 1) != 0) + } + #[doc = "Bit 25 - Enable or disable interrupt for event PREGION0RA"] + #[inline(always)] + pub fn pregion0ra(&self) -> PREGION0RA_R { + PREGION0RA_R::new(((self.bits >> 25) & 1) != 0) + } + #[doc = "Bit 26 - Enable or disable interrupt for event PREGION1WA"] + #[inline(always)] + pub fn pregion1wa(&self) -> PREGION1WA_R { + PREGION1WA_R::new(((self.bits >> 26) & 1) != 0) + } + #[doc = "Bit 27 - Enable or disable interrupt for event PREGION1RA"] + #[inline(always)] + pub fn pregion1ra(&self) -> PREGION1RA_R { + PREGION1RA_R::new(((self.bits >> 27) & 1) != 0) + } +} +impl W { + #[doc = "Bit 0 - Enable or disable interrupt for event REGION0WA"] + #[inline(always)] + #[must_use] + pub fn region0wa(&mut self) -> REGION0WA_W<0> { + REGION0WA_W::new(self) + } + #[doc = "Bit 1 - Enable or disable interrupt for event REGION0RA"] + #[inline(always)] + #[must_use] + pub fn region0ra(&mut self) -> REGION0RA_W<1> { + REGION0RA_W::new(self) + } + #[doc = "Bit 2 - Enable or disable interrupt for event REGION1WA"] + #[inline(always)] + #[must_use] + pub fn region1wa(&mut self) -> REGION1WA_W<2> { + REGION1WA_W::new(self) + } + #[doc = "Bit 3 - Enable or disable interrupt for event REGION1RA"] + #[inline(always)] + #[must_use] + pub fn region1ra(&mut self) -> REGION1RA_W<3> { + REGION1RA_W::new(self) + } + #[doc = "Bit 4 - Enable or disable interrupt for event REGION2WA"] + #[inline(always)] + #[must_use] + pub fn region2wa(&mut self) -> REGION2WA_W<4> { + REGION2WA_W::new(self) + } + #[doc = "Bit 5 - Enable or disable interrupt for event REGION2RA"] + #[inline(always)] + #[must_use] + pub fn region2ra(&mut self) -> REGION2RA_W<5> { + REGION2RA_W::new(self) + } + #[doc = "Bit 6 - Enable or disable interrupt for event REGION3WA"] + #[inline(always)] + #[must_use] + pub fn region3wa(&mut self) -> REGION3WA_W<6> { + REGION3WA_W::new(self) + } + #[doc = "Bit 7 - Enable or disable interrupt for event REGION3RA"] + #[inline(always)] + #[must_use] + pub fn region3ra(&mut self) -> REGION3RA_W<7> { + REGION3RA_W::new(self) + } + #[doc = "Bit 24 - Enable or disable interrupt for event PREGION0WA"] + #[inline(always)] + #[must_use] + pub fn pregion0wa(&mut self) -> PREGION0WA_W<24> { + PREGION0WA_W::new(self) + } + #[doc = "Bit 25 - Enable or disable interrupt for event PREGION0RA"] + #[inline(always)] + #[must_use] + pub fn pregion0ra(&mut self) -> PREGION0RA_W<25> { + PREGION0RA_W::new(self) + } + #[doc = "Bit 26 - Enable or disable interrupt for event PREGION1WA"] + #[inline(always)] + #[must_use] + pub fn pregion1wa(&mut self) -> PREGION1WA_W<26> { + PREGION1WA_W::new(self) + } + #[doc = "Bit 27 - Enable or disable interrupt for event PREGION1RA"] + #[inline(always)] + #[must_use] + pub fn pregion1ra(&mut self) -> PREGION1RA_W<27> { + PREGION1RA_W::new(self) + } + #[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 = "Enable or disable interrupt\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 [inten](index.html) module"] +pub struct INTEN_SPEC; +impl crate::RegisterSpec for INTEN_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [inten::R](R) reader structure"] +impl crate::Readable for INTEN_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [inten::W](W) writer structure"] +impl crate::Writable for INTEN_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets INTEN to value 0"] +impl crate::Resettable for INTEN_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/mwu/intenclr.rs b/down-the-stack/dk_pac/src/mwu/intenclr.rs new file mode 100644 index 0000000..05ce51f --- /dev/null +++ b/down-the-stack/dk_pac/src/mwu/intenclr.rs @@ -0,0 +1,881 @@ +#[doc = "Register `INTENCLR` 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 `INTENCLR` 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 `REGION0WA` reader - Write '1' to disable interrupt for event REGION0WA"] +pub type REGION0WA_R = crate::BitReader; +#[doc = "Write '1' to disable interrupt for event REGION0WA\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum REGION0WA_A { + #[doc = "0: Read: Disabled"] + DISABLED = 0, + #[doc = "1: Read: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: REGION0WA_A) -> Self { + variant as u8 != 0 + } +} +impl REGION0WA_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> REGION0WA_A { + match self.bits { + false => REGION0WA_A::DISABLED, + true => REGION0WA_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == REGION0WA_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == REGION0WA_A::ENABLED + } +} +#[doc = "Write '1' to disable interrupt for event REGION0WA\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum REGION0WA_AW { + #[doc = "1: Disable"] + CLEAR = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: REGION0WA_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `REGION0WA` writer - Write '1' to disable interrupt for event REGION0WA"] +pub type REGION0WA_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENCLR_SPEC, REGION0WA_AW, O>; +impl<'a, const O: u8> REGION0WA_W<'a, O> { + #[doc = "Disable"] + #[inline(always)] + pub fn clear(self) -> &'a mut W { + self.variant(REGION0WA_AW::CLEAR) + } +} +#[doc = "Field `REGION0RA` reader - Write '1' to disable interrupt for event REGION0RA"] +pub type REGION0RA_R = crate::BitReader; +#[doc = "Write '1' to disable interrupt for event REGION0RA\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum REGION0RA_A { + #[doc = "0: Read: Disabled"] + DISABLED = 0, + #[doc = "1: Read: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: REGION0RA_A) -> Self { + variant as u8 != 0 + } +} +impl REGION0RA_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> REGION0RA_A { + match self.bits { + false => REGION0RA_A::DISABLED, + true => REGION0RA_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == REGION0RA_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == REGION0RA_A::ENABLED + } +} +#[doc = "Write '1' to disable interrupt for event REGION0RA\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum REGION0RA_AW { + #[doc = "1: Disable"] + CLEAR = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: REGION0RA_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `REGION0RA` writer - Write '1' to disable interrupt for event REGION0RA"] +pub type REGION0RA_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENCLR_SPEC, REGION0RA_AW, O>; +impl<'a, const O: u8> REGION0RA_W<'a, O> { + #[doc = "Disable"] + #[inline(always)] + pub fn clear(self) -> &'a mut W { + self.variant(REGION0RA_AW::CLEAR) + } +} +#[doc = "Field `REGION1WA` reader - Write '1' to disable interrupt for event REGION1WA"] +pub type REGION1WA_R = crate::BitReader; +#[doc = "Write '1' to disable interrupt for event REGION1WA\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum REGION1WA_A { + #[doc = "0: Read: Disabled"] + DISABLED = 0, + #[doc = "1: Read: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: REGION1WA_A) -> Self { + variant as u8 != 0 + } +} +impl REGION1WA_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> REGION1WA_A { + match self.bits { + false => REGION1WA_A::DISABLED, + true => REGION1WA_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == REGION1WA_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == REGION1WA_A::ENABLED + } +} +#[doc = "Write '1' to disable interrupt for event REGION1WA\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum REGION1WA_AW { + #[doc = "1: Disable"] + CLEAR = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: REGION1WA_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `REGION1WA` writer - Write '1' to disable interrupt for event REGION1WA"] +pub type REGION1WA_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENCLR_SPEC, REGION1WA_AW, O>; +impl<'a, const O: u8> REGION1WA_W<'a, O> { + #[doc = "Disable"] + #[inline(always)] + pub fn clear(self) -> &'a mut W { + self.variant(REGION1WA_AW::CLEAR) + } +} +#[doc = "Field `REGION1RA` reader - Write '1' to disable interrupt for event REGION1RA"] +pub type REGION1RA_R = crate::BitReader; +#[doc = "Write '1' to disable interrupt for event REGION1RA\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum REGION1RA_A { + #[doc = "0: Read: Disabled"] + DISABLED = 0, + #[doc = "1: Read: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: REGION1RA_A) -> Self { + variant as u8 != 0 + } +} +impl REGION1RA_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> REGION1RA_A { + match self.bits { + false => REGION1RA_A::DISABLED, + true => REGION1RA_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == REGION1RA_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == REGION1RA_A::ENABLED + } +} +#[doc = "Write '1' to disable interrupt for event REGION1RA\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum REGION1RA_AW { + #[doc = "1: Disable"] + CLEAR = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: REGION1RA_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `REGION1RA` writer - Write '1' to disable interrupt for event REGION1RA"] +pub type REGION1RA_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENCLR_SPEC, REGION1RA_AW, O>; +impl<'a, const O: u8> REGION1RA_W<'a, O> { + #[doc = "Disable"] + #[inline(always)] + pub fn clear(self) -> &'a mut W { + self.variant(REGION1RA_AW::CLEAR) + } +} +#[doc = "Field `REGION2WA` reader - Write '1' to disable interrupt for event REGION2WA"] +pub type REGION2WA_R = crate::BitReader; +#[doc = "Write '1' to disable interrupt for event REGION2WA\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum REGION2WA_A { + #[doc = "0: Read: Disabled"] + DISABLED = 0, + #[doc = "1: Read: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: REGION2WA_A) -> Self { + variant as u8 != 0 + } +} +impl REGION2WA_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> REGION2WA_A { + match self.bits { + false => REGION2WA_A::DISABLED, + true => REGION2WA_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == REGION2WA_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == REGION2WA_A::ENABLED + } +} +#[doc = "Write '1' to disable interrupt for event REGION2WA\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum REGION2WA_AW { + #[doc = "1: Disable"] + CLEAR = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: REGION2WA_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `REGION2WA` writer - Write '1' to disable interrupt for event REGION2WA"] +pub type REGION2WA_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENCLR_SPEC, REGION2WA_AW, O>; +impl<'a, const O: u8> REGION2WA_W<'a, O> { + #[doc = "Disable"] + #[inline(always)] + pub fn clear(self) -> &'a mut W { + self.variant(REGION2WA_AW::CLEAR) + } +} +#[doc = "Field `REGION2RA` reader - Write '1' to disable interrupt for event REGION2RA"] +pub type REGION2RA_R = crate::BitReader; +#[doc = "Write '1' to disable interrupt for event REGION2RA\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum REGION2RA_A { + #[doc = "0: Read: Disabled"] + DISABLED = 0, + #[doc = "1: Read: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: REGION2RA_A) -> Self { + variant as u8 != 0 + } +} +impl REGION2RA_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> REGION2RA_A { + match self.bits { + false => REGION2RA_A::DISABLED, + true => REGION2RA_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == REGION2RA_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == REGION2RA_A::ENABLED + } +} +#[doc = "Write '1' to disable interrupt for event REGION2RA\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum REGION2RA_AW { + #[doc = "1: Disable"] + CLEAR = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: REGION2RA_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `REGION2RA` writer - Write '1' to disable interrupt for event REGION2RA"] +pub type REGION2RA_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENCLR_SPEC, REGION2RA_AW, O>; +impl<'a, const O: u8> REGION2RA_W<'a, O> { + #[doc = "Disable"] + #[inline(always)] + pub fn clear(self) -> &'a mut W { + self.variant(REGION2RA_AW::CLEAR) + } +} +#[doc = "Field `REGION3WA` reader - Write '1' to disable interrupt for event REGION3WA"] +pub type REGION3WA_R = crate::BitReader; +#[doc = "Write '1' to disable interrupt for event REGION3WA\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum REGION3WA_A { + #[doc = "0: Read: Disabled"] + DISABLED = 0, + #[doc = "1: Read: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: REGION3WA_A) -> Self { + variant as u8 != 0 + } +} +impl REGION3WA_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> REGION3WA_A { + match self.bits { + false => REGION3WA_A::DISABLED, + true => REGION3WA_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == REGION3WA_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == REGION3WA_A::ENABLED + } +} +#[doc = "Write '1' to disable interrupt for event REGION3WA\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum REGION3WA_AW { + #[doc = "1: Disable"] + CLEAR = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: REGION3WA_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `REGION3WA` writer - Write '1' to disable interrupt for event REGION3WA"] +pub type REGION3WA_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENCLR_SPEC, REGION3WA_AW, O>; +impl<'a, const O: u8> REGION3WA_W<'a, O> { + #[doc = "Disable"] + #[inline(always)] + pub fn clear(self) -> &'a mut W { + self.variant(REGION3WA_AW::CLEAR) + } +} +#[doc = "Field `REGION3RA` reader - Write '1' to disable interrupt for event REGION3RA"] +pub type REGION3RA_R = crate::BitReader; +#[doc = "Write '1' to disable interrupt for event REGION3RA\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum REGION3RA_A { + #[doc = "0: Read: Disabled"] + DISABLED = 0, + #[doc = "1: Read: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: REGION3RA_A) -> Self { + variant as u8 != 0 + } +} +impl REGION3RA_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> REGION3RA_A { + match self.bits { + false => REGION3RA_A::DISABLED, + true => REGION3RA_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == REGION3RA_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == REGION3RA_A::ENABLED + } +} +#[doc = "Write '1' to disable interrupt for event REGION3RA\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum REGION3RA_AW { + #[doc = "1: Disable"] + CLEAR = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: REGION3RA_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `REGION3RA` writer - Write '1' to disable interrupt for event REGION3RA"] +pub type REGION3RA_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENCLR_SPEC, REGION3RA_AW, O>; +impl<'a, const O: u8> REGION3RA_W<'a, O> { + #[doc = "Disable"] + #[inline(always)] + pub fn clear(self) -> &'a mut W { + self.variant(REGION3RA_AW::CLEAR) + } +} +#[doc = "Field `PREGION0WA` reader - Write '1' to disable interrupt for event PREGION0WA"] +pub type PREGION0WA_R = crate::BitReader; +#[doc = "Write '1' to disable interrupt for event PREGION0WA\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PREGION0WA_A { + #[doc = "0: Read: Disabled"] + DISABLED = 0, + #[doc = "1: Read: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PREGION0WA_A) -> Self { + variant as u8 != 0 + } +} +impl PREGION0WA_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> PREGION0WA_A { + match self.bits { + false => PREGION0WA_A::DISABLED, + true => PREGION0WA_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == PREGION0WA_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == PREGION0WA_A::ENABLED + } +} +#[doc = "Write '1' to disable interrupt for event PREGION0WA\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PREGION0WA_AW { + #[doc = "1: Disable"] + CLEAR = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PREGION0WA_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `PREGION0WA` writer - Write '1' to disable interrupt for event PREGION0WA"] +pub type PREGION0WA_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENCLR_SPEC, PREGION0WA_AW, O>; +impl<'a, const O: u8> PREGION0WA_W<'a, O> { + #[doc = "Disable"] + #[inline(always)] + pub fn clear(self) -> &'a mut W { + self.variant(PREGION0WA_AW::CLEAR) + } +} +#[doc = "Field `PREGION0RA` reader - Write '1' to disable interrupt for event PREGION0RA"] +pub type PREGION0RA_R = crate::BitReader; +#[doc = "Write '1' to disable interrupt for event PREGION0RA\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PREGION0RA_A { + #[doc = "0: Read: Disabled"] + DISABLED = 0, + #[doc = "1: Read: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PREGION0RA_A) -> Self { + variant as u8 != 0 + } +} +impl PREGION0RA_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> PREGION0RA_A { + match self.bits { + false => PREGION0RA_A::DISABLED, + true => PREGION0RA_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == PREGION0RA_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == PREGION0RA_A::ENABLED + } +} +#[doc = "Write '1' to disable interrupt for event PREGION0RA\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PREGION0RA_AW { + #[doc = "1: Disable"] + CLEAR = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PREGION0RA_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `PREGION0RA` writer - Write '1' to disable interrupt for event PREGION0RA"] +pub type PREGION0RA_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENCLR_SPEC, PREGION0RA_AW, O>; +impl<'a, const O: u8> PREGION0RA_W<'a, O> { + #[doc = "Disable"] + #[inline(always)] + pub fn clear(self) -> &'a mut W { + self.variant(PREGION0RA_AW::CLEAR) + } +} +#[doc = "Field `PREGION1WA` reader - Write '1' to disable interrupt for event PREGION1WA"] +pub type PREGION1WA_R = crate::BitReader; +#[doc = "Write '1' to disable interrupt for event PREGION1WA\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PREGION1WA_A { + #[doc = "0: Read: Disabled"] + DISABLED = 0, + #[doc = "1: Read: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PREGION1WA_A) -> Self { + variant as u8 != 0 + } +} +impl PREGION1WA_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> PREGION1WA_A { + match self.bits { + false => PREGION1WA_A::DISABLED, + true => PREGION1WA_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == PREGION1WA_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == PREGION1WA_A::ENABLED + } +} +#[doc = "Write '1' to disable interrupt for event PREGION1WA\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PREGION1WA_AW { + #[doc = "1: Disable"] + CLEAR = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PREGION1WA_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `PREGION1WA` writer - Write '1' to disable interrupt for event PREGION1WA"] +pub type PREGION1WA_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENCLR_SPEC, PREGION1WA_AW, O>; +impl<'a, const O: u8> PREGION1WA_W<'a, O> { + #[doc = "Disable"] + #[inline(always)] + pub fn clear(self) -> &'a mut W { + self.variant(PREGION1WA_AW::CLEAR) + } +} +#[doc = "Field `PREGION1RA` reader - Write '1' to disable interrupt for event PREGION1RA"] +pub type PREGION1RA_R = crate::BitReader; +#[doc = "Write '1' to disable interrupt for event PREGION1RA\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PREGION1RA_A { + #[doc = "0: Read: Disabled"] + DISABLED = 0, + #[doc = "1: Read: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PREGION1RA_A) -> Self { + variant as u8 != 0 + } +} +impl PREGION1RA_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> PREGION1RA_A { + match self.bits { + false => PREGION1RA_A::DISABLED, + true => PREGION1RA_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == PREGION1RA_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == PREGION1RA_A::ENABLED + } +} +#[doc = "Write '1' to disable interrupt for event PREGION1RA\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PREGION1RA_AW { + #[doc = "1: Disable"] + CLEAR = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PREGION1RA_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `PREGION1RA` writer - Write '1' to disable interrupt for event PREGION1RA"] +pub type PREGION1RA_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENCLR_SPEC, PREGION1RA_AW, O>; +impl<'a, const O: u8> PREGION1RA_W<'a, O> { + #[doc = "Disable"] + #[inline(always)] + pub fn clear(self) -> &'a mut W { + self.variant(PREGION1RA_AW::CLEAR) + } +} +impl R { + #[doc = "Bit 0 - Write '1' to disable interrupt for event REGION0WA"] + #[inline(always)] + pub fn region0wa(&self) -> REGION0WA_R { + REGION0WA_R::new((self.bits & 1) != 0) + } + #[doc = "Bit 1 - Write '1' to disable interrupt for event REGION0RA"] + #[inline(always)] + pub fn region0ra(&self) -> REGION0RA_R { + REGION0RA_R::new(((self.bits >> 1) & 1) != 0) + } + #[doc = "Bit 2 - Write '1' to disable interrupt for event REGION1WA"] + #[inline(always)] + pub fn region1wa(&self) -> REGION1WA_R { + REGION1WA_R::new(((self.bits >> 2) & 1) != 0) + } + #[doc = "Bit 3 - Write '1' to disable interrupt for event REGION1RA"] + #[inline(always)] + pub fn region1ra(&self) -> REGION1RA_R { + REGION1RA_R::new(((self.bits >> 3) & 1) != 0) + } + #[doc = "Bit 4 - Write '1' to disable interrupt for event REGION2WA"] + #[inline(always)] + pub fn region2wa(&self) -> REGION2WA_R { + REGION2WA_R::new(((self.bits >> 4) & 1) != 0) + } + #[doc = "Bit 5 - Write '1' to disable interrupt for event REGION2RA"] + #[inline(always)] + pub fn region2ra(&self) -> REGION2RA_R { + REGION2RA_R::new(((self.bits >> 5) & 1) != 0) + } + #[doc = "Bit 6 - Write '1' to disable interrupt for event REGION3WA"] + #[inline(always)] + pub fn region3wa(&self) -> REGION3WA_R { + REGION3WA_R::new(((self.bits >> 6) & 1) != 0) + } + #[doc = "Bit 7 - Write '1' to disable interrupt for event REGION3RA"] + #[inline(always)] + pub fn region3ra(&self) -> REGION3RA_R { + REGION3RA_R::new(((self.bits >> 7) & 1) != 0) + } + #[doc = "Bit 24 - Write '1' to disable interrupt for event PREGION0WA"] + #[inline(always)] + pub fn pregion0wa(&self) -> PREGION0WA_R { + PREGION0WA_R::new(((self.bits >> 24) & 1) != 0) + } + #[doc = "Bit 25 - Write '1' to disable interrupt for event PREGION0RA"] + #[inline(always)] + pub fn pregion0ra(&self) -> PREGION0RA_R { + PREGION0RA_R::new(((self.bits >> 25) & 1) != 0) + } + #[doc = "Bit 26 - Write '1' to disable interrupt for event PREGION1WA"] + #[inline(always)] + pub fn pregion1wa(&self) -> PREGION1WA_R { + PREGION1WA_R::new(((self.bits >> 26) & 1) != 0) + } + #[doc = "Bit 27 - Write '1' to disable interrupt for event PREGION1RA"] + #[inline(always)] + pub fn pregion1ra(&self) -> PREGION1RA_R { + PREGION1RA_R::new(((self.bits >> 27) & 1) != 0) + } +} +impl W { + #[doc = "Bit 0 - Write '1' to disable interrupt for event REGION0WA"] + #[inline(always)] + #[must_use] + pub fn region0wa(&mut self) -> REGION0WA_W<0> { + REGION0WA_W::new(self) + } + #[doc = "Bit 1 - Write '1' to disable interrupt for event REGION0RA"] + #[inline(always)] + #[must_use] + pub fn region0ra(&mut self) -> REGION0RA_W<1> { + REGION0RA_W::new(self) + } + #[doc = "Bit 2 - Write '1' to disable interrupt for event REGION1WA"] + #[inline(always)] + #[must_use] + pub fn region1wa(&mut self) -> REGION1WA_W<2> { + REGION1WA_W::new(self) + } + #[doc = "Bit 3 - Write '1' to disable interrupt for event REGION1RA"] + #[inline(always)] + #[must_use] + pub fn region1ra(&mut self) -> REGION1RA_W<3> { + REGION1RA_W::new(self) + } + #[doc = "Bit 4 - Write '1' to disable interrupt for event REGION2WA"] + #[inline(always)] + #[must_use] + pub fn region2wa(&mut self) -> REGION2WA_W<4> { + REGION2WA_W::new(self) + } + #[doc = "Bit 5 - Write '1' to disable interrupt for event REGION2RA"] + #[inline(always)] + #[must_use] + pub fn region2ra(&mut self) -> REGION2RA_W<5> { + REGION2RA_W::new(self) + } + #[doc = "Bit 6 - Write '1' to disable interrupt for event REGION3WA"] + #[inline(always)] + #[must_use] + pub fn region3wa(&mut self) -> REGION3WA_W<6> { + REGION3WA_W::new(self) + } + #[doc = "Bit 7 - Write '1' to disable interrupt for event REGION3RA"] + #[inline(always)] + #[must_use] + pub fn region3ra(&mut self) -> REGION3RA_W<7> { + REGION3RA_W::new(self) + } + #[doc = "Bit 24 - Write '1' to disable interrupt for event PREGION0WA"] + #[inline(always)] + #[must_use] + pub fn pregion0wa(&mut self) -> PREGION0WA_W<24> { + PREGION0WA_W::new(self) + } + #[doc = "Bit 25 - Write '1' to disable interrupt for event PREGION0RA"] + #[inline(always)] + #[must_use] + pub fn pregion0ra(&mut self) -> PREGION0RA_W<25> { + PREGION0RA_W::new(self) + } + #[doc = "Bit 26 - Write '1' to disable interrupt for event PREGION1WA"] + #[inline(always)] + #[must_use] + pub fn pregion1wa(&mut self) -> PREGION1WA_W<26> { + PREGION1WA_W::new(self) + } + #[doc = "Bit 27 - Write '1' to disable interrupt for event PREGION1RA"] + #[inline(always)] + #[must_use] + pub fn pregion1ra(&mut self) -> PREGION1RA_W<27> { + PREGION1RA_W::new(self) + } + #[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 = "Disable interrupt\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 [intenclr](index.html) module"] +pub struct INTENCLR_SPEC; +impl crate::RegisterSpec for INTENCLR_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [intenclr::R](R) reader structure"] +impl crate::Readable for INTENCLR_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [intenclr::W](W) writer structure"] +impl crate::Writable for INTENCLR_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets INTENCLR to value 0"] +impl crate::Resettable for INTENCLR_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/mwu/intenset.rs b/down-the-stack/dk_pac/src/mwu/intenset.rs new file mode 100644 index 0000000..1c47fda --- /dev/null +++ b/down-the-stack/dk_pac/src/mwu/intenset.rs @@ -0,0 +1,881 @@ +#[doc = "Register `INTENSET` 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 `INTENSET` 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 `REGION0WA` reader - Write '1' to enable interrupt for event REGION0WA"] +pub type REGION0WA_R = crate::BitReader; +#[doc = "Write '1' to enable interrupt for event REGION0WA\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum REGION0WA_A { + #[doc = "0: Read: Disabled"] + DISABLED = 0, + #[doc = "1: Read: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: REGION0WA_A) -> Self { + variant as u8 != 0 + } +} +impl REGION0WA_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> REGION0WA_A { + match self.bits { + false => REGION0WA_A::DISABLED, + true => REGION0WA_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == REGION0WA_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == REGION0WA_A::ENABLED + } +} +#[doc = "Write '1' to enable interrupt for event REGION0WA\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum REGION0WA_AW { + #[doc = "1: Enable"] + SET = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: REGION0WA_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `REGION0WA` writer - Write '1' to enable interrupt for event REGION0WA"] +pub type REGION0WA_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENSET_SPEC, REGION0WA_AW, O>; +impl<'a, const O: u8> REGION0WA_W<'a, O> { + #[doc = "Enable"] + #[inline(always)] + pub fn set(self) -> &'a mut W { + self.variant(REGION0WA_AW::SET) + } +} +#[doc = "Field `REGION0RA` reader - Write '1' to enable interrupt for event REGION0RA"] +pub type REGION0RA_R = crate::BitReader; +#[doc = "Write '1' to enable interrupt for event REGION0RA\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum REGION0RA_A { + #[doc = "0: Read: Disabled"] + DISABLED = 0, + #[doc = "1: Read: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: REGION0RA_A) -> Self { + variant as u8 != 0 + } +} +impl REGION0RA_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> REGION0RA_A { + match self.bits { + false => REGION0RA_A::DISABLED, + true => REGION0RA_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == REGION0RA_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == REGION0RA_A::ENABLED + } +} +#[doc = "Write '1' to enable interrupt for event REGION0RA\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum REGION0RA_AW { + #[doc = "1: Enable"] + SET = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: REGION0RA_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `REGION0RA` writer - Write '1' to enable interrupt for event REGION0RA"] +pub type REGION0RA_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENSET_SPEC, REGION0RA_AW, O>; +impl<'a, const O: u8> REGION0RA_W<'a, O> { + #[doc = "Enable"] + #[inline(always)] + pub fn set(self) -> &'a mut W { + self.variant(REGION0RA_AW::SET) + } +} +#[doc = "Field `REGION1WA` reader - Write '1' to enable interrupt for event REGION1WA"] +pub type REGION1WA_R = crate::BitReader; +#[doc = "Write '1' to enable interrupt for event REGION1WA\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum REGION1WA_A { + #[doc = "0: Read: Disabled"] + DISABLED = 0, + #[doc = "1: Read: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: REGION1WA_A) -> Self { + variant as u8 != 0 + } +} +impl REGION1WA_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> REGION1WA_A { + match self.bits { + false => REGION1WA_A::DISABLED, + true => REGION1WA_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == REGION1WA_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == REGION1WA_A::ENABLED + } +} +#[doc = "Write '1' to enable interrupt for event REGION1WA\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum REGION1WA_AW { + #[doc = "1: Enable"] + SET = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: REGION1WA_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `REGION1WA` writer - Write '1' to enable interrupt for event REGION1WA"] +pub type REGION1WA_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENSET_SPEC, REGION1WA_AW, O>; +impl<'a, const O: u8> REGION1WA_W<'a, O> { + #[doc = "Enable"] + #[inline(always)] + pub fn set(self) -> &'a mut W { + self.variant(REGION1WA_AW::SET) + } +} +#[doc = "Field `REGION1RA` reader - Write '1' to enable interrupt for event REGION1RA"] +pub type REGION1RA_R = crate::BitReader; +#[doc = "Write '1' to enable interrupt for event REGION1RA\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum REGION1RA_A { + #[doc = "0: Read: Disabled"] + DISABLED = 0, + #[doc = "1: Read: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: REGION1RA_A) -> Self { + variant as u8 != 0 + } +} +impl REGION1RA_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> REGION1RA_A { + match self.bits { + false => REGION1RA_A::DISABLED, + true => REGION1RA_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == REGION1RA_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == REGION1RA_A::ENABLED + } +} +#[doc = "Write '1' to enable interrupt for event REGION1RA\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum REGION1RA_AW { + #[doc = "1: Enable"] + SET = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: REGION1RA_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `REGION1RA` writer - Write '1' to enable interrupt for event REGION1RA"] +pub type REGION1RA_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENSET_SPEC, REGION1RA_AW, O>; +impl<'a, const O: u8> REGION1RA_W<'a, O> { + #[doc = "Enable"] + #[inline(always)] + pub fn set(self) -> &'a mut W { + self.variant(REGION1RA_AW::SET) + } +} +#[doc = "Field `REGION2WA` reader - Write '1' to enable interrupt for event REGION2WA"] +pub type REGION2WA_R = crate::BitReader; +#[doc = "Write '1' to enable interrupt for event REGION2WA\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum REGION2WA_A { + #[doc = "0: Read: Disabled"] + DISABLED = 0, + #[doc = "1: Read: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: REGION2WA_A) -> Self { + variant as u8 != 0 + } +} +impl REGION2WA_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> REGION2WA_A { + match self.bits { + false => REGION2WA_A::DISABLED, + true => REGION2WA_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == REGION2WA_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == REGION2WA_A::ENABLED + } +} +#[doc = "Write '1' to enable interrupt for event REGION2WA\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum REGION2WA_AW { + #[doc = "1: Enable"] + SET = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: REGION2WA_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `REGION2WA` writer - Write '1' to enable interrupt for event REGION2WA"] +pub type REGION2WA_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENSET_SPEC, REGION2WA_AW, O>; +impl<'a, const O: u8> REGION2WA_W<'a, O> { + #[doc = "Enable"] + #[inline(always)] + pub fn set(self) -> &'a mut W { + self.variant(REGION2WA_AW::SET) + } +} +#[doc = "Field `REGION2RA` reader - Write '1' to enable interrupt for event REGION2RA"] +pub type REGION2RA_R = crate::BitReader; +#[doc = "Write '1' to enable interrupt for event REGION2RA\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum REGION2RA_A { + #[doc = "0: Read: Disabled"] + DISABLED = 0, + #[doc = "1: Read: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: REGION2RA_A) -> Self { + variant as u8 != 0 + } +} +impl REGION2RA_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> REGION2RA_A { + match self.bits { + false => REGION2RA_A::DISABLED, + true => REGION2RA_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == REGION2RA_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == REGION2RA_A::ENABLED + } +} +#[doc = "Write '1' to enable interrupt for event REGION2RA\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum REGION2RA_AW { + #[doc = "1: Enable"] + SET = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: REGION2RA_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `REGION2RA` writer - Write '1' to enable interrupt for event REGION2RA"] +pub type REGION2RA_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENSET_SPEC, REGION2RA_AW, O>; +impl<'a, const O: u8> REGION2RA_W<'a, O> { + #[doc = "Enable"] + #[inline(always)] + pub fn set(self) -> &'a mut W { + self.variant(REGION2RA_AW::SET) + } +} +#[doc = "Field `REGION3WA` reader - Write '1' to enable interrupt for event REGION3WA"] +pub type REGION3WA_R = crate::BitReader; +#[doc = "Write '1' to enable interrupt for event REGION3WA\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum REGION3WA_A { + #[doc = "0: Read: Disabled"] + DISABLED = 0, + #[doc = "1: Read: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: REGION3WA_A) -> Self { + variant as u8 != 0 + } +} +impl REGION3WA_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> REGION3WA_A { + match self.bits { + false => REGION3WA_A::DISABLED, + true => REGION3WA_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == REGION3WA_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == REGION3WA_A::ENABLED + } +} +#[doc = "Write '1' to enable interrupt for event REGION3WA\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum REGION3WA_AW { + #[doc = "1: Enable"] + SET = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: REGION3WA_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `REGION3WA` writer - Write '1' to enable interrupt for event REGION3WA"] +pub type REGION3WA_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENSET_SPEC, REGION3WA_AW, O>; +impl<'a, const O: u8> REGION3WA_W<'a, O> { + #[doc = "Enable"] + #[inline(always)] + pub fn set(self) -> &'a mut W { + self.variant(REGION3WA_AW::SET) + } +} +#[doc = "Field `REGION3RA` reader - Write '1' to enable interrupt for event REGION3RA"] +pub type REGION3RA_R = crate::BitReader; +#[doc = "Write '1' to enable interrupt for event REGION3RA\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum REGION3RA_A { + #[doc = "0: Read: Disabled"] + DISABLED = 0, + #[doc = "1: Read: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: REGION3RA_A) -> Self { + variant as u8 != 0 + } +} +impl REGION3RA_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> REGION3RA_A { + match self.bits { + false => REGION3RA_A::DISABLED, + true => REGION3RA_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == REGION3RA_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == REGION3RA_A::ENABLED + } +} +#[doc = "Write '1' to enable interrupt for event REGION3RA\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum REGION3RA_AW { + #[doc = "1: Enable"] + SET = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: REGION3RA_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `REGION3RA` writer - Write '1' to enable interrupt for event REGION3RA"] +pub type REGION3RA_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENSET_SPEC, REGION3RA_AW, O>; +impl<'a, const O: u8> REGION3RA_W<'a, O> { + #[doc = "Enable"] + #[inline(always)] + pub fn set(self) -> &'a mut W { + self.variant(REGION3RA_AW::SET) + } +} +#[doc = "Field `PREGION0WA` reader - Write '1' to enable interrupt for event PREGION0WA"] +pub type PREGION0WA_R = crate::BitReader; +#[doc = "Write '1' to enable interrupt for event PREGION0WA\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PREGION0WA_A { + #[doc = "0: Read: Disabled"] + DISABLED = 0, + #[doc = "1: Read: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PREGION0WA_A) -> Self { + variant as u8 != 0 + } +} +impl PREGION0WA_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> PREGION0WA_A { + match self.bits { + false => PREGION0WA_A::DISABLED, + true => PREGION0WA_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == PREGION0WA_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == PREGION0WA_A::ENABLED + } +} +#[doc = "Write '1' to enable interrupt for event PREGION0WA\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PREGION0WA_AW { + #[doc = "1: Enable"] + SET = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PREGION0WA_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `PREGION0WA` writer - Write '1' to enable interrupt for event PREGION0WA"] +pub type PREGION0WA_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENSET_SPEC, PREGION0WA_AW, O>; +impl<'a, const O: u8> PREGION0WA_W<'a, O> { + #[doc = "Enable"] + #[inline(always)] + pub fn set(self) -> &'a mut W { + self.variant(PREGION0WA_AW::SET) + } +} +#[doc = "Field `PREGION0RA` reader - Write '1' to enable interrupt for event PREGION0RA"] +pub type PREGION0RA_R = crate::BitReader; +#[doc = "Write '1' to enable interrupt for event PREGION0RA\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PREGION0RA_A { + #[doc = "0: Read: Disabled"] + DISABLED = 0, + #[doc = "1: Read: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PREGION0RA_A) -> Self { + variant as u8 != 0 + } +} +impl PREGION0RA_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> PREGION0RA_A { + match self.bits { + false => PREGION0RA_A::DISABLED, + true => PREGION0RA_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == PREGION0RA_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == PREGION0RA_A::ENABLED + } +} +#[doc = "Write '1' to enable interrupt for event PREGION0RA\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PREGION0RA_AW { + #[doc = "1: Enable"] + SET = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PREGION0RA_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `PREGION0RA` writer - Write '1' to enable interrupt for event PREGION0RA"] +pub type PREGION0RA_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENSET_SPEC, PREGION0RA_AW, O>; +impl<'a, const O: u8> PREGION0RA_W<'a, O> { + #[doc = "Enable"] + #[inline(always)] + pub fn set(self) -> &'a mut W { + self.variant(PREGION0RA_AW::SET) + } +} +#[doc = "Field `PREGION1WA` reader - Write '1' to enable interrupt for event PREGION1WA"] +pub type PREGION1WA_R = crate::BitReader; +#[doc = "Write '1' to enable interrupt for event PREGION1WA\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PREGION1WA_A { + #[doc = "0: Read: Disabled"] + DISABLED = 0, + #[doc = "1: Read: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PREGION1WA_A) -> Self { + variant as u8 != 0 + } +} +impl PREGION1WA_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> PREGION1WA_A { + match self.bits { + false => PREGION1WA_A::DISABLED, + true => PREGION1WA_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == PREGION1WA_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == PREGION1WA_A::ENABLED + } +} +#[doc = "Write '1' to enable interrupt for event PREGION1WA\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PREGION1WA_AW { + #[doc = "1: Enable"] + SET = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PREGION1WA_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `PREGION1WA` writer - Write '1' to enable interrupt for event PREGION1WA"] +pub type PREGION1WA_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENSET_SPEC, PREGION1WA_AW, O>; +impl<'a, const O: u8> PREGION1WA_W<'a, O> { + #[doc = "Enable"] + #[inline(always)] + pub fn set(self) -> &'a mut W { + self.variant(PREGION1WA_AW::SET) + } +} +#[doc = "Field `PREGION1RA` reader - Write '1' to enable interrupt for event PREGION1RA"] +pub type PREGION1RA_R = crate::BitReader; +#[doc = "Write '1' to enable interrupt for event PREGION1RA\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PREGION1RA_A { + #[doc = "0: Read: Disabled"] + DISABLED = 0, + #[doc = "1: Read: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PREGION1RA_A) -> Self { + variant as u8 != 0 + } +} +impl PREGION1RA_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> PREGION1RA_A { + match self.bits { + false => PREGION1RA_A::DISABLED, + true => PREGION1RA_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == PREGION1RA_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == PREGION1RA_A::ENABLED + } +} +#[doc = "Write '1' to enable interrupt for event PREGION1RA\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PREGION1RA_AW { + #[doc = "1: Enable"] + SET = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PREGION1RA_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `PREGION1RA` writer - Write '1' to enable interrupt for event PREGION1RA"] +pub type PREGION1RA_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENSET_SPEC, PREGION1RA_AW, O>; +impl<'a, const O: u8> PREGION1RA_W<'a, O> { + #[doc = "Enable"] + #[inline(always)] + pub fn set(self) -> &'a mut W { + self.variant(PREGION1RA_AW::SET) + } +} +impl R { + #[doc = "Bit 0 - Write '1' to enable interrupt for event REGION0WA"] + #[inline(always)] + pub fn region0wa(&self) -> REGION0WA_R { + REGION0WA_R::new((self.bits & 1) != 0) + } + #[doc = "Bit 1 - Write '1' to enable interrupt for event REGION0RA"] + #[inline(always)] + pub fn region0ra(&self) -> REGION0RA_R { + REGION0RA_R::new(((self.bits >> 1) & 1) != 0) + } + #[doc = "Bit 2 - Write '1' to enable interrupt for event REGION1WA"] + #[inline(always)] + pub fn region1wa(&self) -> REGION1WA_R { + REGION1WA_R::new(((self.bits >> 2) & 1) != 0) + } + #[doc = "Bit 3 - Write '1' to enable interrupt for event REGION1RA"] + #[inline(always)] + pub fn region1ra(&self) -> REGION1RA_R { + REGION1RA_R::new(((self.bits >> 3) & 1) != 0) + } + #[doc = "Bit 4 - Write '1' to enable interrupt for event REGION2WA"] + #[inline(always)] + pub fn region2wa(&self) -> REGION2WA_R { + REGION2WA_R::new(((self.bits >> 4) & 1) != 0) + } + #[doc = "Bit 5 - Write '1' to enable interrupt for event REGION2RA"] + #[inline(always)] + pub fn region2ra(&self) -> REGION2RA_R { + REGION2RA_R::new(((self.bits >> 5) & 1) != 0) + } + #[doc = "Bit 6 - Write '1' to enable interrupt for event REGION3WA"] + #[inline(always)] + pub fn region3wa(&self) -> REGION3WA_R { + REGION3WA_R::new(((self.bits >> 6) & 1) != 0) + } + #[doc = "Bit 7 - Write '1' to enable interrupt for event REGION3RA"] + #[inline(always)] + pub fn region3ra(&self) -> REGION3RA_R { + REGION3RA_R::new(((self.bits >> 7) & 1) != 0) + } + #[doc = "Bit 24 - Write '1' to enable interrupt for event PREGION0WA"] + #[inline(always)] + pub fn pregion0wa(&self) -> PREGION0WA_R { + PREGION0WA_R::new(((self.bits >> 24) & 1) != 0) + } + #[doc = "Bit 25 - Write '1' to enable interrupt for event PREGION0RA"] + #[inline(always)] + pub fn pregion0ra(&self) -> PREGION0RA_R { + PREGION0RA_R::new(((self.bits >> 25) & 1) != 0) + } + #[doc = "Bit 26 - Write '1' to enable interrupt for event PREGION1WA"] + #[inline(always)] + pub fn pregion1wa(&self) -> PREGION1WA_R { + PREGION1WA_R::new(((self.bits >> 26) & 1) != 0) + } + #[doc = "Bit 27 - Write '1' to enable interrupt for event PREGION1RA"] + #[inline(always)] + pub fn pregion1ra(&self) -> PREGION1RA_R { + PREGION1RA_R::new(((self.bits >> 27) & 1) != 0) + } +} +impl W { + #[doc = "Bit 0 - Write '1' to enable interrupt for event REGION0WA"] + #[inline(always)] + #[must_use] + pub fn region0wa(&mut self) -> REGION0WA_W<0> { + REGION0WA_W::new(self) + } + #[doc = "Bit 1 - Write '1' to enable interrupt for event REGION0RA"] + #[inline(always)] + #[must_use] + pub fn region0ra(&mut self) -> REGION0RA_W<1> { + REGION0RA_W::new(self) + } + #[doc = "Bit 2 - Write '1' to enable interrupt for event REGION1WA"] + #[inline(always)] + #[must_use] + pub fn region1wa(&mut self) -> REGION1WA_W<2> { + REGION1WA_W::new(self) + } + #[doc = "Bit 3 - Write '1' to enable interrupt for event REGION1RA"] + #[inline(always)] + #[must_use] + pub fn region1ra(&mut self) -> REGION1RA_W<3> { + REGION1RA_W::new(self) + } + #[doc = "Bit 4 - Write '1' to enable interrupt for event REGION2WA"] + #[inline(always)] + #[must_use] + pub fn region2wa(&mut self) -> REGION2WA_W<4> { + REGION2WA_W::new(self) + } + #[doc = "Bit 5 - Write '1' to enable interrupt for event REGION2RA"] + #[inline(always)] + #[must_use] + pub fn region2ra(&mut self) -> REGION2RA_W<5> { + REGION2RA_W::new(self) + } + #[doc = "Bit 6 - Write '1' to enable interrupt for event REGION3WA"] + #[inline(always)] + #[must_use] + pub fn region3wa(&mut self) -> REGION3WA_W<6> { + REGION3WA_W::new(self) + } + #[doc = "Bit 7 - Write '1' to enable interrupt for event REGION3RA"] + #[inline(always)] + #[must_use] + pub fn region3ra(&mut self) -> REGION3RA_W<7> { + REGION3RA_W::new(self) + } + #[doc = "Bit 24 - Write '1' to enable interrupt for event PREGION0WA"] + #[inline(always)] + #[must_use] + pub fn pregion0wa(&mut self) -> PREGION0WA_W<24> { + PREGION0WA_W::new(self) + } + #[doc = "Bit 25 - Write '1' to enable interrupt for event PREGION0RA"] + #[inline(always)] + #[must_use] + pub fn pregion0ra(&mut self) -> PREGION0RA_W<25> { + PREGION0RA_W::new(self) + } + #[doc = "Bit 26 - Write '1' to enable interrupt for event PREGION1WA"] + #[inline(always)] + #[must_use] + pub fn pregion1wa(&mut self) -> PREGION1WA_W<26> { + PREGION1WA_W::new(self) + } + #[doc = "Bit 27 - Write '1' to enable interrupt for event PREGION1RA"] + #[inline(always)] + #[must_use] + pub fn pregion1ra(&mut self) -> PREGION1RA_W<27> { + PREGION1RA_W::new(self) + } + #[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 = "Enable interrupt\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 [intenset](index.html) module"] +pub struct INTENSET_SPEC; +impl crate::RegisterSpec for INTENSET_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [intenset::R](R) reader structure"] +impl crate::Readable for INTENSET_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [intenset::W](W) writer structure"] +impl crate::Writable for INTENSET_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets INTENSET to value 0"] +impl crate::Resettable for INTENSET_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/mwu/nmien.rs b/down-the-stack/dk_pac/src/mwu/nmien.rs new file mode 100644 index 0000000..16fb3c1 --- /dev/null +++ b/down-the-stack/dk_pac/src/mwu/nmien.rs @@ -0,0 +1,797 @@ +#[doc = "Register `NMIEN` 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 `NMIEN` 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 `REGION0WA` reader - Enable or disable interrupt for event REGION0WA"] +pub type REGION0WA_R = crate::BitReader; +#[doc = "Enable or disable interrupt for event REGION0WA\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum REGION0WA_A { + #[doc = "0: Disable"] + DISABLED = 0, + #[doc = "1: Enable"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: REGION0WA_A) -> Self { + variant as u8 != 0 + } +} +impl REGION0WA_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> REGION0WA_A { + match self.bits { + false => REGION0WA_A::DISABLED, + true => REGION0WA_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == REGION0WA_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == REGION0WA_A::ENABLED + } +} +#[doc = "Field `REGION0WA` writer - Enable or disable interrupt for event REGION0WA"] +pub type REGION0WA_W<'a, const O: u8> = crate::BitWriter<'a, u32, NMIEN_SPEC, REGION0WA_A, O>; +impl<'a, const O: u8> REGION0WA_W<'a, O> { + #[doc = "Disable"] + #[inline(always)] + pub fn disabled(self) -> &'a mut W { + self.variant(REGION0WA_A::DISABLED) + } + #[doc = "Enable"] + #[inline(always)] + pub fn enabled(self) -> &'a mut W { + self.variant(REGION0WA_A::ENABLED) + } +} +#[doc = "Field `REGION0RA` reader - Enable or disable interrupt for event REGION0RA"] +pub type REGION0RA_R = crate::BitReader; +#[doc = "Enable or disable interrupt for event REGION0RA\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum REGION0RA_A { + #[doc = "0: Disable"] + DISABLED = 0, + #[doc = "1: Enable"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: REGION0RA_A) -> Self { + variant as u8 != 0 + } +} +impl REGION0RA_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> REGION0RA_A { + match self.bits { + false => REGION0RA_A::DISABLED, + true => REGION0RA_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == REGION0RA_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == REGION0RA_A::ENABLED + } +} +#[doc = "Field `REGION0RA` writer - Enable or disable interrupt for event REGION0RA"] +pub type REGION0RA_W<'a, const O: u8> = crate::BitWriter<'a, u32, NMIEN_SPEC, REGION0RA_A, O>; +impl<'a, const O: u8> REGION0RA_W<'a, O> { + #[doc = "Disable"] + #[inline(always)] + pub fn disabled(self) -> &'a mut W { + self.variant(REGION0RA_A::DISABLED) + } + #[doc = "Enable"] + #[inline(always)] + pub fn enabled(self) -> &'a mut W { + self.variant(REGION0RA_A::ENABLED) + } +} +#[doc = "Field `REGION1WA` reader - Enable or disable interrupt for event REGION1WA"] +pub type REGION1WA_R = crate::BitReader; +#[doc = "Enable or disable interrupt for event REGION1WA\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum REGION1WA_A { + #[doc = "0: Disable"] + DISABLED = 0, + #[doc = "1: Enable"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: REGION1WA_A) -> Self { + variant as u8 != 0 + } +} +impl REGION1WA_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> REGION1WA_A { + match self.bits { + false => REGION1WA_A::DISABLED, + true => REGION1WA_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == REGION1WA_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == REGION1WA_A::ENABLED + } +} +#[doc = "Field `REGION1WA` writer - Enable or disable interrupt for event REGION1WA"] +pub type REGION1WA_W<'a, const O: u8> = crate::BitWriter<'a, u32, NMIEN_SPEC, REGION1WA_A, O>; +impl<'a, const O: u8> REGION1WA_W<'a, O> { + #[doc = "Disable"] + #[inline(always)] + pub fn disabled(self) -> &'a mut W { + self.variant(REGION1WA_A::DISABLED) + } + #[doc = "Enable"] + #[inline(always)] + pub fn enabled(self) -> &'a mut W { + self.variant(REGION1WA_A::ENABLED) + } +} +#[doc = "Field `REGION1RA` reader - Enable or disable interrupt for event REGION1RA"] +pub type REGION1RA_R = crate::BitReader; +#[doc = "Enable or disable interrupt for event REGION1RA\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum REGION1RA_A { + #[doc = "0: Disable"] + DISABLED = 0, + #[doc = "1: Enable"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: REGION1RA_A) -> Self { + variant as u8 != 0 + } +} +impl REGION1RA_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> REGION1RA_A { + match self.bits { + false => REGION1RA_A::DISABLED, + true => REGION1RA_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == REGION1RA_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == REGION1RA_A::ENABLED + } +} +#[doc = "Field `REGION1RA` writer - Enable or disable interrupt for event REGION1RA"] +pub type REGION1RA_W<'a, const O: u8> = crate::BitWriter<'a, u32, NMIEN_SPEC, REGION1RA_A, O>; +impl<'a, const O: u8> REGION1RA_W<'a, O> { + #[doc = "Disable"] + #[inline(always)] + pub fn disabled(self) -> &'a mut W { + self.variant(REGION1RA_A::DISABLED) + } + #[doc = "Enable"] + #[inline(always)] + pub fn enabled(self) -> &'a mut W { + self.variant(REGION1RA_A::ENABLED) + } +} +#[doc = "Field `REGION2WA` reader - Enable or disable interrupt for event REGION2WA"] +pub type REGION2WA_R = crate::BitReader; +#[doc = "Enable or disable interrupt for event REGION2WA\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum REGION2WA_A { + #[doc = "0: Disable"] + DISABLED = 0, + #[doc = "1: Enable"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: REGION2WA_A) -> Self { + variant as u8 != 0 + } +} +impl REGION2WA_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> REGION2WA_A { + match self.bits { + false => REGION2WA_A::DISABLED, + true => REGION2WA_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == REGION2WA_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == REGION2WA_A::ENABLED + } +} +#[doc = "Field `REGION2WA` writer - Enable or disable interrupt for event REGION2WA"] +pub type REGION2WA_W<'a, const O: u8> = crate::BitWriter<'a, u32, NMIEN_SPEC, REGION2WA_A, O>; +impl<'a, const O: u8> REGION2WA_W<'a, O> { + #[doc = "Disable"] + #[inline(always)] + pub fn disabled(self) -> &'a mut W { + self.variant(REGION2WA_A::DISABLED) + } + #[doc = "Enable"] + #[inline(always)] + pub fn enabled(self) -> &'a mut W { + self.variant(REGION2WA_A::ENABLED) + } +} +#[doc = "Field `REGION2RA` reader - Enable or disable interrupt for event REGION2RA"] +pub type REGION2RA_R = crate::BitReader; +#[doc = "Enable or disable interrupt for event REGION2RA\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum REGION2RA_A { + #[doc = "0: Disable"] + DISABLED = 0, + #[doc = "1: Enable"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: REGION2RA_A) -> Self { + variant as u8 != 0 + } +} +impl REGION2RA_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> REGION2RA_A { + match self.bits { + false => REGION2RA_A::DISABLED, + true => REGION2RA_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == REGION2RA_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == REGION2RA_A::ENABLED + } +} +#[doc = "Field `REGION2RA` writer - Enable or disable interrupt for event REGION2RA"] +pub type REGION2RA_W<'a, const O: u8> = crate::BitWriter<'a, u32, NMIEN_SPEC, REGION2RA_A, O>; +impl<'a, const O: u8> REGION2RA_W<'a, O> { + #[doc = "Disable"] + #[inline(always)] + pub fn disabled(self) -> &'a mut W { + self.variant(REGION2RA_A::DISABLED) + } + #[doc = "Enable"] + #[inline(always)] + pub fn enabled(self) -> &'a mut W { + self.variant(REGION2RA_A::ENABLED) + } +} +#[doc = "Field `REGION3WA` reader - Enable or disable interrupt for event REGION3WA"] +pub type REGION3WA_R = crate::BitReader; +#[doc = "Enable or disable interrupt for event REGION3WA\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum REGION3WA_A { + #[doc = "0: Disable"] + DISABLED = 0, + #[doc = "1: Enable"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: REGION3WA_A) -> Self { + variant as u8 != 0 + } +} +impl REGION3WA_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> REGION3WA_A { + match self.bits { + false => REGION3WA_A::DISABLED, + true => REGION3WA_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == REGION3WA_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == REGION3WA_A::ENABLED + } +} +#[doc = "Field `REGION3WA` writer - Enable or disable interrupt for event REGION3WA"] +pub type REGION3WA_W<'a, const O: u8> = crate::BitWriter<'a, u32, NMIEN_SPEC, REGION3WA_A, O>; +impl<'a, const O: u8> REGION3WA_W<'a, O> { + #[doc = "Disable"] + #[inline(always)] + pub fn disabled(self) -> &'a mut W { + self.variant(REGION3WA_A::DISABLED) + } + #[doc = "Enable"] + #[inline(always)] + pub fn enabled(self) -> &'a mut W { + self.variant(REGION3WA_A::ENABLED) + } +} +#[doc = "Field `REGION3RA` reader - Enable or disable interrupt for event REGION3RA"] +pub type REGION3RA_R = crate::BitReader; +#[doc = "Enable or disable interrupt for event REGION3RA\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum REGION3RA_A { + #[doc = "0: Disable"] + DISABLED = 0, + #[doc = "1: Enable"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: REGION3RA_A) -> Self { + variant as u8 != 0 + } +} +impl REGION3RA_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> REGION3RA_A { + match self.bits { + false => REGION3RA_A::DISABLED, + true => REGION3RA_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == REGION3RA_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == REGION3RA_A::ENABLED + } +} +#[doc = "Field `REGION3RA` writer - Enable or disable interrupt for event REGION3RA"] +pub type REGION3RA_W<'a, const O: u8> = crate::BitWriter<'a, u32, NMIEN_SPEC, REGION3RA_A, O>; +impl<'a, const O: u8> REGION3RA_W<'a, O> { + #[doc = "Disable"] + #[inline(always)] + pub fn disabled(self) -> &'a mut W { + self.variant(REGION3RA_A::DISABLED) + } + #[doc = "Enable"] + #[inline(always)] + pub fn enabled(self) -> &'a mut W { + self.variant(REGION3RA_A::ENABLED) + } +} +#[doc = "Field `PREGION0WA` reader - Enable or disable interrupt for event PREGION0WA"] +pub type PREGION0WA_R = crate::BitReader; +#[doc = "Enable or disable interrupt for event PREGION0WA\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PREGION0WA_A { + #[doc = "0: Disable"] + DISABLED = 0, + #[doc = "1: Enable"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PREGION0WA_A) -> Self { + variant as u8 != 0 + } +} +impl PREGION0WA_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> PREGION0WA_A { + match self.bits { + false => PREGION0WA_A::DISABLED, + true => PREGION0WA_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == PREGION0WA_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == PREGION0WA_A::ENABLED + } +} +#[doc = "Field `PREGION0WA` writer - Enable or disable interrupt for event PREGION0WA"] +pub type PREGION0WA_W<'a, const O: u8> = crate::BitWriter<'a, u32, NMIEN_SPEC, PREGION0WA_A, O>; +impl<'a, const O: u8> PREGION0WA_W<'a, O> { + #[doc = "Disable"] + #[inline(always)] + pub fn disabled(self) -> &'a mut W { + self.variant(PREGION0WA_A::DISABLED) + } + #[doc = "Enable"] + #[inline(always)] + pub fn enabled(self) -> &'a mut W { + self.variant(PREGION0WA_A::ENABLED) + } +} +#[doc = "Field `PREGION0RA` reader - Enable or disable interrupt for event PREGION0RA"] +pub type PREGION0RA_R = crate::BitReader; +#[doc = "Enable or disable interrupt for event PREGION0RA\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PREGION0RA_A { + #[doc = "0: Disable"] + DISABLED = 0, + #[doc = "1: Enable"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PREGION0RA_A) -> Self { + variant as u8 != 0 + } +} +impl PREGION0RA_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> PREGION0RA_A { + match self.bits { + false => PREGION0RA_A::DISABLED, + true => PREGION0RA_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == PREGION0RA_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == PREGION0RA_A::ENABLED + } +} +#[doc = "Field `PREGION0RA` writer - Enable or disable interrupt for event PREGION0RA"] +pub type PREGION0RA_W<'a, const O: u8> = crate::BitWriter<'a, u32, NMIEN_SPEC, PREGION0RA_A, O>; +impl<'a, const O: u8> PREGION0RA_W<'a, O> { + #[doc = "Disable"] + #[inline(always)] + pub fn disabled(self) -> &'a mut W { + self.variant(PREGION0RA_A::DISABLED) + } + #[doc = "Enable"] + #[inline(always)] + pub fn enabled(self) -> &'a mut W { + self.variant(PREGION0RA_A::ENABLED) + } +} +#[doc = "Field `PREGION1WA` reader - Enable or disable interrupt for event PREGION1WA"] +pub type PREGION1WA_R = crate::BitReader; +#[doc = "Enable or disable interrupt for event PREGION1WA\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PREGION1WA_A { + #[doc = "0: Disable"] + DISABLED = 0, + #[doc = "1: Enable"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PREGION1WA_A) -> Self { + variant as u8 != 0 + } +} +impl PREGION1WA_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> PREGION1WA_A { + match self.bits { + false => PREGION1WA_A::DISABLED, + true => PREGION1WA_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == PREGION1WA_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == PREGION1WA_A::ENABLED + } +} +#[doc = "Field `PREGION1WA` writer - Enable or disable interrupt for event PREGION1WA"] +pub type PREGION1WA_W<'a, const O: u8> = crate::BitWriter<'a, u32, NMIEN_SPEC, PREGION1WA_A, O>; +impl<'a, const O: u8> PREGION1WA_W<'a, O> { + #[doc = "Disable"] + #[inline(always)] + pub fn disabled(self) -> &'a mut W { + self.variant(PREGION1WA_A::DISABLED) + } + #[doc = "Enable"] + #[inline(always)] + pub fn enabled(self) -> &'a mut W { + self.variant(PREGION1WA_A::ENABLED) + } +} +#[doc = "Field `PREGION1RA` reader - Enable or disable interrupt for event PREGION1RA"] +pub type PREGION1RA_R = crate::BitReader; +#[doc = "Enable or disable interrupt for event PREGION1RA\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PREGION1RA_A { + #[doc = "0: Disable"] + DISABLED = 0, + #[doc = "1: Enable"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PREGION1RA_A) -> Self { + variant as u8 != 0 + } +} +impl PREGION1RA_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> PREGION1RA_A { + match self.bits { + false => PREGION1RA_A::DISABLED, + true => PREGION1RA_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == PREGION1RA_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == PREGION1RA_A::ENABLED + } +} +#[doc = "Field `PREGION1RA` writer - Enable or disable interrupt for event PREGION1RA"] +pub type PREGION1RA_W<'a, const O: u8> = crate::BitWriter<'a, u32, NMIEN_SPEC, PREGION1RA_A, O>; +impl<'a, const O: u8> PREGION1RA_W<'a, O> { + #[doc = "Disable"] + #[inline(always)] + pub fn disabled(self) -> &'a mut W { + self.variant(PREGION1RA_A::DISABLED) + } + #[doc = "Enable"] + #[inline(always)] + pub fn enabled(self) -> &'a mut W { + self.variant(PREGION1RA_A::ENABLED) + } +} +impl R { + #[doc = "Bit 0 - Enable or disable interrupt for event REGION0WA"] + #[inline(always)] + pub fn region0wa(&self) -> REGION0WA_R { + REGION0WA_R::new((self.bits & 1) != 0) + } + #[doc = "Bit 1 - Enable or disable interrupt for event REGION0RA"] + #[inline(always)] + pub fn region0ra(&self) -> REGION0RA_R { + REGION0RA_R::new(((self.bits >> 1) & 1) != 0) + } + #[doc = "Bit 2 - Enable or disable interrupt for event REGION1WA"] + #[inline(always)] + pub fn region1wa(&self) -> REGION1WA_R { + REGION1WA_R::new(((self.bits >> 2) & 1) != 0) + } + #[doc = "Bit 3 - Enable or disable interrupt for event REGION1RA"] + #[inline(always)] + pub fn region1ra(&self) -> REGION1RA_R { + REGION1RA_R::new(((self.bits >> 3) & 1) != 0) + } + #[doc = "Bit 4 - Enable or disable interrupt for event REGION2WA"] + #[inline(always)] + pub fn region2wa(&self) -> REGION2WA_R { + REGION2WA_R::new(((self.bits >> 4) & 1) != 0) + } + #[doc = "Bit 5 - Enable or disable interrupt for event REGION2RA"] + #[inline(always)] + pub fn region2ra(&self) -> REGION2RA_R { + REGION2RA_R::new(((self.bits >> 5) & 1) != 0) + } + #[doc = "Bit 6 - Enable or disable interrupt for event REGION3WA"] + #[inline(always)] + pub fn region3wa(&self) -> REGION3WA_R { + REGION3WA_R::new(((self.bits >> 6) & 1) != 0) + } + #[doc = "Bit 7 - Enable or disable interrupt for event REGION3RA"] + #[inline(always)] + pub fn region3ra(&self) -> REGION3RA_R { + REGION3RA_R::new(((self.bits >> 7) & 1) != 0) + } + #[doc = "Bit 24 - Enable or disable interrupt for event PREGION0WA"] + #[inline(always)] + pub fn pregion0wa(&self) -> PREGION0WA_R { + PREGION0WA_R::new(((self.bits >> 24) & 1) != 0) + } + #[doc = "Bit 25 - Enable or disable interrupt for event PREGION0RA"] + #[inline(always)] + pub fn pregion0ra(&self) -> PREGION0RA_R { + PREGION0RA_R::new(((self.bits >> 25) & 1) != 0) + } + #[doc = "Bit 26 - Enable or disable interrupt for event PREGION1WA"] + #[inline(always)] + pub fn pregion1wa(&self) -> PREGION1WA_R { + PREGION1WA_R::new(((self.bits >> 26) & 1) != 0) + } + #[doc = "Bit 27 - Enable or disable interrupt for event PREGION1RA"] + #[inline(always)] + pub fn pregion1ra(&self) -> PREGION1RA_R { + PREGION1RA_R::new(((self.bits >> 27) & 1) != 0) + } +} +impl W { + #[doc = "Bit 0 - Enable or disable interrupt for event REGION0WA"] + #[inline(always)] + #[must_use] + pub fn region0wa(&mut self) -> REGION0WA_W<0> { + REGION0WA_W::new(self) + } + #[doc = "Bit 1 - Enable or disable interrupt for event REGION0RA"] + #[inline(always)] + #[must_use] + pub fn region0ra(&mut self) -> REGION0RA_W<1> { + REGION0RA_W::new(self) + } + #[doc = "Bit 2 - Enable or disable interrupt for event REGION1WA"] + #[inline(always)] + #[must_use] + pub fn region1wa(&mut self) -> REGION1WA_W<2> { + REGION1WA_W::new(self) + } + #[doc = "Bit 3 - Enable or disable interrupt for event REGION1RA"] + #[inline(always)] + #[must_use] + pub fn region1ra(&mut self) -> REGION1RA_W<3> { + REGION1RA_W::new(self) + } + #[doc = "Bit 4 - Enable or disable interrupt for event REGION2WA"] + #[inline(always)] + #[must_use] + pub fn region2wa(&mut self) -> REGION2WA_W<4> { + REGION2WA_W::new(self) + } + #[doc = "Bit 5 - Enable or disable interrupt for event REGION2RA"] + #[inline(always)] + #[must_use] + pub fn region2ra(&mut self) -> REGION2RA_W<5> { + REGION2RA_W::new(self) + } + #[doc = "Bit 6 - Enable or disable interrupt for event REGION3WA"] + #[inline(always)] + #[must_use] + pub fn region3wa(&mut self) -> REGION3WA_W<6> { + REGION3WA_W::new(self) + } + #[doc = "Bit 7 - Enable or disable interrupt for event REGION3RA"] + #[inline(always)] + #[must_use] + pub fn region3ra(&mut self) -> REGION3RA_W<7> { + REGION3RA_W::new(self) + } + #[doc = "Bit 24 - Enable or disable interrupt for event PREGION0WA"] + #[inline(always)] + #[must_use] + pub fn pregion0wa(&mut self) -> PREGION0WA_W<24> { + PREGION0WA_W::new(self) + } + #[doc = "Bit 25 - Enable or disable interrupt for event PREGION0RA"] + #[inline(always)] + #[must_use] + pub fn pregion0ra(&mut self) -> PREGION0RA_W<25> { + PREGION0RA_W::new(self) + } + #[doc = "Bit 26 - Enable or disable interrupt for event PREGION1WA"] + #[inline(always)] + #[must_use] + pub fn pregion1wa(&mut self) -> PREGION1WA_W<26> { + PREGION1WA_W::new(self) + } + #[doc = "Bit 27 - Enable or disable interrupt for event PREGION1RA"] + #[inline(always)] + #[must_use] + pub fn pregion1ra(&mut self) -> PREGION1RA_W<27> { + PREGION1RA_W::new(self) + } + #[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 = "Enable or disable interrupt\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 [nmien](index.html) module"] +pub struct NMIEN_SPEC; +impl crate::RegisterSpec for NMIEN_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [nmien::R](R) reader structure"] +impl crate::Readable for NMIEN_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [nmien::W](W) writer structure"] +impl crate::Writable for NMIEN_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets NMIEN to value 0"] +impl crate::Resettable for NMIEN_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/mwu/nmienclr.rs b/down-the-stack/dk_pac/src/mwu/nmienclr.rs new file mode 100644 index 0000000..09a9014 --- /dev/null +++ b/down-the-stack/dk_pac/src/mwu/nmienclr.rs @@ -0,0 +1,881 @@ +#[doc = "Register `NMIENCLR` 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 `NMIENCLR` 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 `REGION0WA` reader - Write '1' to disable interrupt for event REGION0WA"] +pub type REGION0WA_R = crate::BitReader; +#[doc = "Write '1' to disable interrupt for event REGION0WA\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum REGION0WA_A { + #[doc = "0: Read: Disabled"] + DISABLED = 0, + #[doc = "1: Read: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: REGION0WA_A) -> Self { + variant as u8 != 0 + } +} +impl REGION0WA_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> REGION0WA_A { + match self.bits { + false => REGION0WA_A::DISABLED, + true => REGION0WA_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == REGION0WA_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == REGION0WA_A::ENABLED + } +} +#[doc = "Write '1' to disable interrupt for event REGION0WA\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum REGION0WA_AW { + #[doc = "1: Disable"] + CLEAR = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: REGION0WA_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `REGION0WA` writer - Write '1' to disable interrupt for event REGION0WA"] +pub type REGION0WA_W<'a, const O: u8> = crate::BitWriter<'a, u32, NMIENCLR_SPEC, REGION0WA_AW, O>; +impl<'a, const O: u8> REGION0WA_W<'a, O> { + #[doc = "Disable"] + #[inline(always)] + pub fn clear(self) -> &'a mut W { + self.variant(REGION0WA_AW::CLEAR) + } +} +#[doc = "Field `REGION0RA` reader - Write '1' to disable interrupt for event REGION0RA"] +pub type REGION0RA_R = crate::BitReader; +#[doc = "Write '1' to disable interrupt for event REGION0RA\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum REGION0RA_A { + #[doc = "0: Read: Disabled"] + DISABLED = 0, + #[doc = "1: Read: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: REGION0RA_A) -> Self { + variant as u8 != 0 + } +} +impl REGION0RA_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> REGION0RA_A { + match self.bits { + false => REGION0RA_A::DISABLED, + true => REGION0RA_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == REGION0RA_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == REGION0RA_A::ENABLED + } +} +#[doc = "Write '1' to disable interrupt for event REGION0RA\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum REGION0RA_AW { + #[doc = "1: Disable"] + CLEAR = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: REGION0RA_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `REGION0RA` writer - Write '1' to disable interrupt for event REGION0RA"] +pub type REGION0RA_W<'a, const O: u8> = crate::BitWriter<'a, u32, NMIENCLR_SPEC, REGION0RA_AW, O>; +impl<'a, const O: u8> REGION0RA_W<'a, O> { + #[doc = "Disable"] + #[inline(always)] + pub fn clear(self) -> &'a mut W { + self.variant(REGION0RA_AW::CLEAR) + } +} +#[doc = "Field `REGION1WA` reader - Write '1' to disable interrupt for event REGION1WA"] +pub type REGION1WA_R = crate::BitReader; +#[doc = "Write '1' to disable interrupt for event REGION1WA\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum REGION1WA_A { + #[doc = "0: Read: Disabled"] + DISABLED = 0, + #[doc = "1: Read: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: REGION1WA_A) -> Self { + variant as u8 != 0 + } +} +impl REGION1WA_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> REGION1WA_A { + match self.bits { + false => REGION1WA_A::DISABLED, + true => REGION1WA_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == REGION1WA_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == REGION1WA_A::ENABLED + } +} +#[doc = "Write '1' to disable interrupt for event REGION1WA\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum REGION1WA_AW { + #[doc = "1: Disable"] + CLEAR = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: REGION1WA_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `REGION1WA` writer - Write '1' to disable interrupt for event REGION1WA"] +pub type REGION1WA_W<'a, const O: u8> = crate::BitWriter<'a, u32, NMIENCLR_SPEC, REGION1WA_AW, O>; +impl<'a, const O: u8> REGION1WA_W<'a, O> { + #[doc = "Disable"] + #[inline(always)] + pub fn clear(self) -> &'a mut W { + self.variant(REGION1WA_AW::CLEAR) + } +} +#[doc = "Field `REGION1RA` reader - Write '1' to disable interrupt for event REGION1RA"] +pub type REGION1RA_R = crate::BitReader; +#[doc = "Write '1' to disable interrupt for event REGION1RA\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum REGION1RA_A { + #[doc = "0: Read: Disabled"] + DISABLED = 0, + #[doc = "1: Read: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: REGION1RA_A) -> Self { + variant as u8 != 0 + } +} +impl REGION1RA_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> REGION1RA_A { + match self.bits { + false => REGION1RA_A::DISABLED, + true => REGION1RA_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == REGION1RA_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == REGION1RA_A::ENABLED + } +} +#[doc = "Write '1' to disable interrupt for event REGION1RA\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum REGION1RA_AW { + #[doc = "1: Disable"] + CLEAR = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: REGION1RA_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `REGION1RA` writer - Write '1' to disable interrupt for event REGION1RA"] +pub type REGION1RA_W<'a, const O: u8> = crate::BitWriter<'a, u32, NMIENCLR_SPEC, REGION1RA_AW, O>; +impl<'a, const O: u8> REGION1RA_W<'a, O> { + #[doc = "Disable"] + #[inline(always)] + pub fn clear(self) -> &'a mut W { + self.variant(REGION1RA_AW::CLEAR) + } +} +#[doc = "Field `REGION2WA` reader - Write '1' to disable interrupt for event REGION2WA"] +pub type REGION2WA_R = crate::BitReader; +#[doc = "Write '1' to disable interrupt for event REGION2WA\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum REGION2WA_A { + #[doc = "0: Read: Disabled"] + DISABLED = 0, + #[doc = "1: Read: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: REGION2WA_A) -> Self { + variant as u8 != 0 + } +} +impl REGION2WA_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> REGION2WA_A { + match self.bits { + false => REGION2WA_A::DISABLED, + true => REGION2WA_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == REGION2WA_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == REGION2WA_A::ENABLED + } +} +#[doc = "Write '1' to disable interrupt for event REGION2WA\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum REGION2WA_AW { + #[doc = "1: Disable"] + CLEAR = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: REGION2WA_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `REGION2WA` writer - Write '1' to disable interrupt for event REGION2WA"] +pub type REGION2WA_W<'a, const O: u8> = crate::BitWriter<'a, u32, NMIENCLR_SPEC, REGION2WA_AW, O>; +impl<'a, const O: u8> REGION2WA_W<'a, O> { + #[doc = "Disable"] + #[inline(always)] + pub fn clear(self) -> &'a mut W { + self.variant(REGION2WA_AW::CLEAR) + } +} +#[doc = "Field `REGION2RA` reader - Write '1' to disable interrupt for event REGION2RA"] +pub type REGION2RA_R = crate::BitReader; +#[doc = "Write '1' to disable interrupt for event REGION2RA\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum REGION2RA_A { + #[doc = "0: Read: Disabled"] + DISABLED = 0, + #[doc = "1: Read: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: REGION2RA_A) -> Self { + variant as u8 != 0 + } +} +impl REGION2RA_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> REGION2RA_A { + match self.bits { + false => REGION2RA_A::DISABLED, + true => REGION2RA_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == REGION2RA_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == REGION2RA_A::ENABLED + } +} +#[doc = "Write '1' to disable interrupt for event REGION2RA\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum REGION2RA_AW { + #[doc = "1: Disable"] + CLEAR = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: REGION2RA_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `REGION2RA` writer - Write '1' to disable interrupt for event REGION2RA"] +pub type REGION2RA_W<'a, const O: u8> = crate::BitWriter<'a, u32, NMIENCLR_SPEC, REGION2RA_AW, O>; +impl<'a, const O: u8> REGION2RA_W<'a, O> { + #[doc = "Disable"] + #[inline(always)] + pub fn clear(self) -> &'a mut W { + self.variant(REGION2RA_AW::CLEAR) + } +} +#[doc = "Field `REGION3WA` reader - Write '1' to disable interrupt for event REGION3WA"] +pub type REGION3WA_R = crate::BitReader; +#[doc = "Write '1' to disable interrupt for event REGION3WA\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum REGION3WA_A { + #[doc = "0: Read: Disabled"] + DISABLED = 0, + #[doc = "1: Read: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: REGION3WA_A) -> Self { + variant as u8 != 0 + } +} +impl REGION3WA_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> REGION3WA_A { + match self.bits { + false => REGION3WA_A::DISABLED, + true => REGION3WA_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == REGION3WA_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == REGION3WA_A::ENABLED + } +} +#[doc = "Write '1' to disable interrupt for event REGION3WA\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum REGION3WA_AW { + #[doc = "1: Disable"] + CLEAR = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: REGION3WA_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `REGION3WA` writer - Write '1' to disable interrupt for event REGION3WA"] +pub type REGION3WA_W<'a, const O: u8> = crate::BitWriter<'a, u32, NMIENCLR_SPEC, REGION3WA_AW, O>; +impl<'a, const O: u8> REGION3WA_W<'a, O> { + #[doc = "Disable"] + #[inline(always)] + pub fn clear(self) -> &'a mut W { + self.variant(REGION3WA_AW::CLEAR) + } +} +#[doc = "Field `REGION3RA` reader - Write '1' to disable interrupt for event REGION3RA"] +pub type REGION3RA_R = crate::BitReader; +#[doc = "Write '1' to disable interrupt for event REGION3RA\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum REGION3RA_A { + #[doc = "0: Read: Disabled"] + DISABLED = 0, + #[doc = "1: Read: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: REGION3RA_A) -> Self { + variant as u8 != 0 + } +} +impl REGION3RA_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> REGION3RA_A { + match self.bits { + false => REGION3RA_A::DISABLED, + true => REGION3RA_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == REGION3RA_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == REGION3RA_A::ENABLED + } +} +#[doc = "Write '1' to disable interrupt for event REGION3RA\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum REGION3RA_AW { + #[doc = "1: Disable"] + CLEAR = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: REGION3RA_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `REGION3RA` writer - Write '1' to disable interrupt for event REGION3RA"] +pub type REGION3RA_W<'a, const O: u8> = crate::BitWriter<'a, u32, NMIENCLR_SPEC, REGION3RA_AW, O>; +impl<'a, const O: u8> REGION3RA_W<'a, O> { + #[doc = "Disable"] + #[inline(always)] + pub fn clear(self) -> &'a mut W { + self.variant(REGION3RA_AW::CLEAR) + } +} +#[doc = "Field `PREGION0WA` reader - Write '1' to disable interrupt for event PREGION0WA"] +pub type PREGION0WA_R = crate::BitReader; +#[doc = "Write '1' to disable interrupt for event PREGION0WA\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PREGION0WA_A { + #[doc = "0: Read: Disabled"] + DISABLED = 0, + #[doc = "1: Read: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PREGION0WA_A) -> Self { + variant as u8 != 0 + } +} +impl PREGION0WA_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> PREGION0WA_A { + match self.bits { + false => PREGION0WA_A::DISABLED, + true => PREGION0WA_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == PREGION0WA_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == PREGION0WA_A::ENABLED + } +} +#[doc = "Write '1' to disable interrupt for event PREGION0WA\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PREGION0WA_AW { + #[doc = "1: Disable"] + CLEAR = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PREGION0WA_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `PREGION0WA` writer - Write '1' to disable interrupt for event PREGION0WA"] +pub type PREGION0WA_W<'a, const O: u8> = crate::BitWriter<'a, u32, NMIENCLR_SPEC, PREGION0WA_AW, O>; +impl<'a, const O: u8> PREGION0WA_W<'a, O> { + #[doc = "Disable"] + #[inline(always)] + pub fn clear(self) -> &'a mut W { + self.variant(PREGION0WA_AW::CLEAR) + } +} +#[doc = "Field `PREGION0RA` reader - Write '1' to disable interrupt for event PREGION0RA"] +pub type PREGION0RA_R = crate::BitReader; +#[doc = "Write '1' to disable interrupt for event PREGION0RA\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PREGION0RA_A { + #[doc = "0: Read: Disabled"] + DISABLED = 0, + #[doc = "1: Read: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PREGION0RA_A) -> Self { + variant as u8 != 0 + } +} +impl PREGION0RA_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> PREGION0RA_A { + match self.bits { + false => PREGION0RA_A::DISABLED, + true => PREGION0RA_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == PREGION0RA_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == PREGION0RA_A::ENABLED + } +} +#[doc = "Write '1' to disable interrupt for event PREGION0RA\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PREGION0RA_AW { + #[doc = "1: Disable"] + CLEAR = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PREGION0RA_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `PREGION0RA` writer - Write '1' to disable interrupt for event PREGION0RA"] +pub type PREGION0RA_W<'a, const O: u8> = crate::BitWriter<'a, u32, NMIENCLR_SPEC, PREGION0RA_AW, O>; +impl<'a, const O: u8> PREGION0RA_W<'a, O> { + #[doc = "Disable"] + #[inline(always)] + pub fn clear(self) -> &'a mut W { + self.variant(PREGION0RA_AW::CLEAR) + } +} +#[doc = "Field `PREGION1WA` reader - Write '1' to disable interrupt for event PREGION1WA"] +pub type PREGION1WA_R = crate::BitReader; +#[doc = "Write '1' to disable interrupt for event PREGION1WA\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PREGION1WA_A { + #[doc = "0: Read: Disabled"] + DISABLED = 0, + #[doc = "1: Read: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PREGION1WA_A) -> Self { + variant as u8 != 0 + } +} +impl PREGION1WA_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> PREGION1WA_A { + match self.bits { + false => PREGION1WA_A::DISABLED, + true => PREGION1WA_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == PREGION1WA_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == PREGION1WA_A::ENABLED + } +} +#[doc = "Write '1' to disable interrupt for event PREGION1WA\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PREGION1WA_AW { + #[doc = "1: Disable"] + CLEAR = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PREGION1WA_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `PREGION1WA` writer - Write '1' to disable interrupt for event PREGION1WA"] +pub type PREGION1WA_W<'a, const O: u8> = crate::BitWriter<'a, u32, NMIENCLR_SPEC, PREGION1WA_AW, O>; +impl<'a, const O: u8> PREGION1WA_W<'a, O> { + #[doc = "Disable"] + #[inline(always)] + pub fn clear(self) -> &'a mut W { + self.variant(PREGION1WA_AW::CLEAR) + } +} +#[doc = "Field `PREGION1RA` reader - Write '1' to disable interrupt for event PREGION1RA"] +pub type PREGION1RA_R = crate::BitReader; +#[doc = "Write '1' to disable interrupt for event PREGION1RA\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PREGION1RA_A { + #[doc = "0: Read: Disabled"] + DISABLED = 0, + #[doc = "1: Read: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PREGION1RA_A) -> Self { + variant as u8 != 0 + } +} +impl PREGION1RA_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> PREGION1RA_A { + match self.bits { + false => PREGION1RA_A::DISABLED, + true => PREGION1RA_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == PREGION1RA_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == PREGION1RA_A::ENABLED + } +} +#[doc = "Write '1' to disable interrupt for event PREGION1RA\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PREGION1RA_AW { + #[doc = "1: Disable"] + CLEAR = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PREGION1RA_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `PREGION1RA` writer - Write '1' to disable interrupt for event PREGION1RA"] +pub type PREGION1RA_W<'a, const O: u8> = crate::BitWriter<'a, u32, NMIENCLR_SPEC, PREGION1RA_AW, O>; +impl<'a, const O: u8> PREGION1RA_W<'a, O> { + #[doc = "Disable"] + #[inline(always)] + pub fn clear(self) -> &'a mut W { + self.variant(PREGION1RA_AW::CLEAR) + } +} +impl R { + #[doc = "Bit 0 - Write '1' to disable interrupt for event REGION0WA"] + #[inline(always)] + pub fn region0wa(&self) -> REGION0WA_R { + REGION0WA_R::new((self.bits & 1) != 0) + } + #[doc = "Bit 1 - Write '1' to disable interrupt for event REGION0RA"] + #[inline(always)] + pub fn region0ra(&self) -> REGION0RA_R { + REGION0RA_R::new(((self.bits >> 1) & 1) != 0) + } + #[doc = "Bit 2 - Write '1' to disable interrupt for event REGION1WA"] + #[inline(always)] + pub fn region1wa(&self) -> REGION1WA_R { + REGION1WA_R::new(((self.bits >> 2) & 1) != 0) + } + #[doc = "Bit 3 - Write '1' to disable interrupt for event REGION1RA"] + #[inline(always)] + pub fn region1ra(&self) -> REGION1RA_R { + REGION1RA_R::new(((self.bits >> 3) & 1) != 0) + } + #[doc = "Bit 4 - Write '1' to disable interrupt for event REGION2WA"] + #[inline(always)] + pub fn region2wa(&self) -> REGION2WA_R { + REGION2WA_R::new(((self.bits >> 4) & 1) != 0) + } + #[doc = "Bit 5 - Write '1' to disable interrupt for event REGION2RA"] + #[inline(always)] + pub fn region2ra(&self) -> REGION2RA_R { + REGION2RA_R::new(((self.bits >> 5) & 1) != 0) + } + #[doc = "Bit 6 - Write '1' to disable interrupt for event REGION3WA"] + #[inline(always)] + pub fn region3wa(&self) -> REGION3WA_R { + REGION3WA_R::new(((self.bits >> 6) & 1) != 0) + } + #[doc = "Bit 7 - Write '1' to disable interrupt for event REGION3RA"] + #[inline(always)] + pub fn region3ra(&self) -> REGION3RA_R { + REGION3RA_R::new(((self.bits >> 7) & 1) != 0) + } + #[doc = "Bit 24 - Write '1' to disable interrupt for event PREGION0WA"] + #[inline(always)] + pub fn pregion0wa(&self) -> PREGION0WA_R { + PREGION0WA_R::new(((self.bits >> 24) & 1) != 0) + } + #[doc = "Bit 25 - Write '1' to disable interrupt for event PREGION0RA"] + #[inline(always)] + pub fn pregion0ra(&self) -> PREGION0RA_R { + PREGION0RA_R::new(((self.bits >> 25) & 1) != 0) + } + #[doc = "Bit 26 - Write '1' to disable interrupt for event PREGION1WA"] + #[inline(always)] + pub fn pregion1wa(&self) -> PREGION1WA_R { + PREGION1WA_R::new(((self.bits >> 26) & 1) != 0) + } + #[doc = "Bit 27 - Write '1' to disable interrupt for event PREGION1RA"] + #[inline(always)] + pub fn pregion1ra(&self) -> PREGION1RA_R { + PREGION1RA_R::new(((self.bits >> 27) & 1) != 0) + } +} +impl W { + #[doc = "Bit 0 - Write '1' to disable interrupt for event REGION0WA"] + #[inline(always)] + #[must_use] + pub fn region0wa(&mut self) -> REGION0WA_W<0> { + REGION0WA_W::new(self) + } + #[doc = "Bit 1 - Write '1' to disable interrupt for event REGION0RA"] + #[inline(always)] + #[must_use] + pub fn region0ra(&mut self) -> REGION0RA_W<1> { + REGION0RA_W::new(self) + } + #[doc = "Bit 2 - Write '1' to disable interrupt for event REGION1WA"] + #[inline(always)] + #[must_use] + pub fn region1wa(&mut self) -> REGION1WA_W<2> { + REGION1WA_W::new(self) + } + #[doc = "Bit 3 - Write '1' to disable interrupt for event REGION1RA"] + #[inline(always)] + #[must_use] + pub fn region1ra(&mut self) -> REGION1RA_W<3> { + REGION1RA_W::new(self) + } + #[doc = "Bit 4 - Write '1' to disable interrupt for event REGION2WA"] + #[inline(always)] + #[must_use] + pub fn region2wa(&mut self) -> REGION2WA_W<4> { + REGION2WA_W::new(self) + } + #[doc = "Bit 5 - Write '1' to disable interrupt for event REGION2RA"] + #[inline(always)] + #[must_use] + pub fn region2ra(&mut self) -> REGION2RA_W<5> { + REGION2RA_W::new(self) + } + #[doc = "Bit 6 - Write '1' to disable interrupt for event REGION3WA"] + #[inline(always)] + #[must_use] + pub fn region3wa(&mut self) -> REGION3WA_W<6> { + REGION3WA_W::new(self) + } + #[doc = "Bit 7 - Write '1' to disable interrupt for event REGION3RA"] + #[inline(always)] + #[must_use] + pub fn region3ra(&mut self) -> REGION3RA_W<7> { + REGION3RA_W::new(self) + } + #[doc = "Bit 24 - Write '1' to disable interrupt for event PREGION0WA"] + #[inline(always)] + #[must_use] + pub fn pregion0wa(&mut self) -> PREGION0WA_W<24> { + PREGION0WA_W::new(self) + } + #[doc = "Bit 25 - Write '1' to disable interrupt for event PREGION0RA"] + #[inline(always)] + #[must_use] + pub fn pregion0ra(&mut self) -> PREGION0RA_W<25> { + PREGION0RA_W::new(self) + } + #[doc = "Bit 26 - Write '1' to disable interrupt for event PREGION1WA"] + #[inline(always)] + #[must_use] + pub fn pregion1wa(&mut self) -> PREGION1WA_W<26> { + PREGION1WA_W::new(self) + } + #[doc = "Bit 27 - Write '1' to disable interrupt for event PREGION1RA"] + #[inline(always)] + #[must_use] + pub fn pregion1ra(&mut self) -> PREGION1RA_W<27> { + PREGION1RA_W::new(self) + } + #[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 = "Disable interrupt\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 [nmienclr](index.html) module"] +pub struct NMIENCLR_SPEC; +impl crate::RegisterSpec for NMIENCLR_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [nmienclr::R](R) reader structure"] +impl crate::Readable for NMIENCLR_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [nmienclr::W](W) writer structure"] +impl crate::Writable for NMIENCLR_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets NMIENCLR to value 0"] +impl crate::Resettable for NMIENCLR_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/mwu/nmienset.rs b/down-the-stack/dk_pac/src/mwu/nmienset.rs new file mode 100644 index 0000000..be79dc1 --- /dev/null +++ b/down-the-stack/dk_pac/src/mwu/nmienset.rs @@ -0,0 +1,881 @@ +#[doc = "Register `NMIENSET` 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 `NMIENSET` 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 `REGION0WA` reader - Write '1' to enable interrupt for event REGION0WA"] +pub type REGION0WA_R = crate::BitReader; +#[doc = "Write '1' to enable interrupt for event REGION0WA\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum REGION0WA_A { + #[doc = "0: Read: Disabled"] + DISABLED = 0, + #[doc = "1: Read: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: REGION0WA_A) -> Self { + variant as u8 != 0 + } +} +impl REGION0WA_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> REGION0WA_A { + match self.bits { + false => REGION0WA_A::DISABLED, + true => REGION0WA_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == REGION0WA_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == REGION0WA_A::ENABLED + } +} +#[doc = "Write '1' to enable interrupt for event REGION0WA\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum REGION0WA_AW { + #[doc = "1: Enable"] + SET = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: REGION0WA_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `REGION0WA` writer - Write '1' to enable interrupt for event REGION0WA"] +pub type REGION0WA_W<'a, const O: u8> = crate::BitWriter<'a, u32, NMIENSET_SPEC, REGION0WA_AW, O>; +impl<'a, const O: u8> REGION0WA_W<'a, O> { + #[doc = "Enable"] + #[inline(always)] + pub fn set(self) -> &'a mut W { + self.variant(REGION0WA_AW::SET) + } +} +#[doc = "Field `REGION0RA` reader - Write '1' to enable interrupt for event REGION0RA"] +pub type REGION0RA_R = crate::BitReader; +#[doc = "Write '1' to enable interrupt for event REGION0RA\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum REGION0RA_A { + #[doc = "0: Read: Disabled"] + DISABLED = 0, + #[doc = "1: Read: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: REGION0RA_A) -> Self { + variant as u8 != 0 + } +} +impl REGION0RA_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> REGION0RA_A { + match self.bits { + false => REGION0RA_A::DISABLED, + true => REGION0RA_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == REGION0RA_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == REGION0RA_A::ENABLED + } +} +#[doc = "Write '1' to enable interrupt for event REGION0RA\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum REGION0RA_AW { + #[doc = "1: Enable"] + SET = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: REGION0RA_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `REGION0RA` writer - Write '1' to enable interrupt for event REGION0RA"] +pub type REGION0RA_W<'a, const O: u8> = crate::BitWriter<'a, u32, NMIENSET_SPEC, REGION0RA_AW, O>; +impl<'a, const O: u8> REGION0RA_W<'a, O> { + #[doc = "Enable"] + #[inline(always)] + pub fn set(self) -> &'a mut W { + self.variant(REGION0RA_AW::SET) + } +} +#[doc = "Field `REGION1WA` reader - Write '1' to enable interrupt for event REGION1WA"] +pub type REGION1WA_R = crate::BitReader; +#[doc = "Write '1' to enable interrupt for event REGION1WA\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum REGION1WA_A { + #[doc = "0: Read: Disabled"] + DISABLED = 0, + #[doc = "1: Read: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: REGION1WA_A) -> Self { + variant as u8 != 0 + } +} +impl REGION1WA_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> REGION1WA_A { + match self.bits { + false => REGION1WA_A::DISABLED, + true => REGION1WA_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == REGION1WA_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == REGION1WA_A::ENABLED + } +} +#[doc = "Write '1' to enable interrupt for event REGION1WA\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum REGION1WA_AW { + #[doc = "1: Enable"] + SET = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: REGION1WA_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `REGION1WA` writer - Write '1' to enable interrupt for event REGION1WA"] +pub type REGION1WA_W<'a, const O: u8> = crate::BitWriter<'a, u32, NMIENSET_SPEC, REGION1WA_AW, O>; +impl<'a, const O: u8> REGION1WA_W<'a, O> { + #[doc = "Enable"] + #[inline(always)] + pub fn set(self) -> &'a mut W { + self.variant(REGION1WA_AW::SET) + } +} +#[doc = "Field `REGION1RA` reader - Write '1' to enable interrupt for event REGION1RA"] +pub type REGION1RA_R = crate::BitReader; +#[doc = "Write '1' to enable interrupt for event REGION1RA\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum REGION1RA_A { + #[doc = "0: Read: Disabled"] + DISABLED = 0, + #[doc = "1: Read: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: REGION1RA_A) -> Self { + variant as u8 != 0 + } +} +impl REGION1RA_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> REGION1RA_A { + match self.bits { + false => REGION1RA_A::DISABLED, + true => REGION1RA_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == REGION1RA_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == REGION1RA_A::ENABLED + } +} +#[doc = "Write '1' to enable interrupt for event REGION1RA\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum REGION1RA_AW { + #[doc = "1: Enable"] + SET = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: REGION1RA_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `REGION1RA` writer - Write '1' to enable interrupt for event REGION1RA"] +pub type REGION1RA_W<'a, const O: u8> = crate::BitWriter<'a, u32, NMIENSET_SPEC, REGION1RA_AW, O>; +impl<'a, const O: u8> REGION1RA_W<'a, O> { + #[doc = "Enable"] + #[inline(always)] + pub fn set(self) -> &'a mut W { + self.variant(REGION1RA_AW::SET) + } +} +#[doc = "Field `REGION2WA` reader - Write '1' to enable interrupt for event REGION2WA"] +pub type REGION2WA_R = crate::BitReader; +#[doc = "Write '1' to enable interrupt for event REGION2WA\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum REGION2WA_A { + #[doc = "0: Read: Disabled"] + DISABLED = 0, + #[doc = "1: Read: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: REGION2WA_A) -> Self { + variant as u8 != 0 + } +} +impl REGION2WA_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> REGION2WA_A { + match self.bits { + false => REGION2WA_A::DISABLED, + true => REGION2WA_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == REGION2WA_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == REGION2WA_A::ENABLED + } +} +#[doc = "Write '1' to enable interrupt for event REGION2WA\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum REGION2WA_AW { + #[doc = "1: Enable"] + SET = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: REGION2WA_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `REGION2WA` writer - Write '1' to enable interrupt for event REGION2WA"] +pub type REGION2WA_W<'a, const O: u8> = crate::BitWriter<'a, u32, NMIENSET_SPEC, REGION2WA_AW, O>; +impl<'a, const O: u8> REGION2WA_W<'a, O> { + #[doc = "Enable"] + #[inline(always)] + pub fn set(self) -> &'a mut W { + self.variant(REGION2WA_AW::SET) + } +} +#[doc = "Field `REGION2RA` reader - Write '1' to enable interrupt for event REGION2RA"] +pub type REGION2RA_R = crate::BitReader; +#[doc = "Write '1' to enable interrupt for event REGION2RA\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum REGION2RA_A { + #[doc = "0: Read: Disabled"] + DISABLED = 0, + #[doc = "1: Read: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: REGION2RA_A) -> Self { + variant as u8 != 0 + } +} +impl REGION2RA_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> REGION2RA_A { + match self.bits { + false => REGION2RA_A::DISABLED, + true => REGION2RA_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == REGION2RA_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == REGION2RA_A::ENABLED + } +} +#[doc = "Write '1' to enable interrupt for event REGION2RA\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum REGION2RA_AW { + #[doc = "1: Enable"] + SET = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: REGION2RA_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `REGION2RA` writer - Write '1' to enable interrupt for event REGION2RA"] +pub type REGION2RA_W<'a, const O: u8> = crate::BitWriter<'a, u32, NMIENSET_SPEC, REGION2RA_AW, O>; +impl<'a, const O: u8> REGION2RA_W<'a, O> { + #[doc = "Enable"] + #[inline(always)] + pub fn set(self) -> &'a mut W { + self.variant(REGION2RA_AW::SET) + } +} +#[doc = "Field `REGION3WA` reader - Write '1' to enable interrupt for event REGION3WA"] +pub type REGION3WA_R = crate::BitReader; +#[doc = "Write '1' to enable interrupt for event REGION3WA\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum REGION3WA_A { + #[doc = "0: Read: Disabled"] + DISABLED = 0, + #[doc = "1: Read: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: REGION3WA_A) -> Self { + variant as u8 != 0 + } +} +impl REGION3WA_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> REGION3WA_A { + match self.bits { + false => REGION3WA_A::DISABLED, + true => REGION3WA_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == REGION3WA_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == REGION3WA_A::ENABLED + } +} +#[doc = "Write '1' to enable interrupt for event REGION3WA\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum REGION3WA_AW { + #[doc = "1: Enable"] + SET = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: REGION3WA_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `REGION3WA` writer - Write '1' to enable interrupt for event REGION3WA"] +pub type REGION3WA_W<'a, const O: u8> = crate::BitWriter<'a, u32, NMIENSET_SPEC, REGION3WA_AW, O>; +impl<'a, const O: u8> REGION3WA_W<'a, O> { + #[doc = "Enable"] + #[inline(always)] + pub fn set(self) -> &'a mut W { + self.variant(REGION3WA_AW::SET) + } +} +#[doc = "Field `REGION3RA` reader - Write '1' to enable interrupt for event REGION3RA"] +pub type REGION3RA_R = crate::BitReader; +#[doc = "Write '1' to enable interrupt for event REGION3RA\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum REGION3RA_A { + #[doc = "0: Read: Disabled"] + DISABLED = 0, + #[doc = "1: Read: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: REGION3RA_A) -> Self { + variant as u8 != 0 + } +} +impl REGION3RA_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> REGION3RA_A { + match self.bits { + false => REGION3RA_A::DISABLED, + true => REGION3RA_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == REGION3RA_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == REGION3RA_A::ENABLED + } +} +#[doc = "Write '1' to enable interrupt for event REGION3RA\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum REGION3RA_AW { + #[doc = "1: Enable"] + SET = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: REGION3RA_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `REGION3RA` writer - Write '1' to enable interrupt for event REGION3RA"] +pub type REGION3RA_W<'a, const O: u8> = crate::BitWriter<'a, u32, NMIENSET_SPEC, REGION3RA_AW, O>; +impl<'a, const O: u8> REGION3RA_W<'a, O> { + #[doc = "Enable"] + #[inline(always)] + pub fn set(self) -> &'a mut W { + self.variant(REGION3RA_AW::SET) + } +} +#[doc = "Field `PREGION0WA` reader - Write '1' to enable interrupt for event PREGION0WA"] +pub type PREGION0WA_R = crate::BitReader; +#[doc = "Write '1' to enable interrupt for event PREGION0WA\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PREGION0WA_A { + #[doc = "0: Read: Disabled"] + DISABLED = 0, + #[doc = "1: Read: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PREGION0WA_A) -> Self { + variant as u8 != 0 + } +} +impl PREGION0WA_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> PREGION0WA_A { + match self.bits { + false => PREGION0WA_A::DISABLED, + true => PREGION0WA_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == PREGION0WA_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == PREGION0WA_A::ENABLED + } +} +#[doc = "Write '1' to enable interrupt for event PREGION0WA\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PREGION0WA_AW { + #[doc = "1: Enable"] + SET = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PREGION0WA_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `PREGION0WA` writer - Write '1' to enable interrupt for event PREGION0WA"] +pub type PREGION0WA_W<'a, const O: u8> = crate::BitWriter<'a, u32, NMIENSET_SPEC, PREGION0WA_AW, O>; +impl<'a, const O: u8> PREGION0WA_W<'a, O> { + #[doc = "Enable"] + #[inline(always)] + pub fn set(self) -> &'a mut W { + self.variant(PREGION0WA_AW::SET) + } +} +#[doc = "Field `PREGION0RA` reader - Write '1' to enable interrupt for event PREGION0RA"] +pub type PREGION0RA_R = crate::BitReader; +#[doc = "Write '1' to enable interrupt for event PREGION0RA\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PREGION0RA_A { + #[doc = "0: Read: Disabled"] + DISABLED = 0, + #[doc = "1: Read: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PREGION0RA_A) -> Self { + variant as u8 != 0 + } +} +impl PREGION0RA_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> PREGION0RA_A { + match self.bits { + false => PREGION0RA_A::DISABLED, + true => PREGION0RA_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == PREGION0RA_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == PREGION0RA_A::ENABLED + } +} +#[doc = "Write '1' to enable interrupt for event PREGION0RA\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PREGION0RA_AW { + #[doc = "1: Enable"] + SET = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PREGION0RA_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `PREGION0RA` writer - Write '1' to enable interrupt for event PREGION0RA"] +pub type PREGION0RA_W<'a, const O: u8> = crate::BitWriter<'a, u32, NMIENSET_SPEC, PREGION0RA_AW, O>; +impl<'a, const O: u8> PREGION0RA_W<'a, O> { + #[doc = "Enable"] + #[inline(always)] + pub fn set(self) -> &'a mut W { + self.variant(PREGION0RA_AW::SET) + } +} +#[doc = "Field `PREGION1WA` reader - Write '1' to enable interrupt for event PREGION1WA"] +pub type PREGION1WA_R = crate::BitReader; +#[doc = "Write '1' to enable interrupt for event PREGION1WA\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PREGION1WA_A { + #[doc = "0: Read: Disabled"] + DISABLED = 0, + #[doc = "1: Read: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PREGION1WA_A) -> Self { + variant as u8 != 0 + } +} +impl PREGION1WA_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> PREGION1WA_A { + match self.bits { + false => PREGION1WA_A::DISABLED, + true => PREGION1WA_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == PREGION1WA_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == PREGION1WA_A::ENABLED + } +} +#[doc = "Write '1' to enable interrupt for event PREGION1WA\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PREGION1WA_AW { + #[doc = "1: Enable"] + SET = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PREGION1WA_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `PREGION1WA` writer - Write '1' to enable interrupt for event PREGION1WA"] +pub type PREGION1WA_W<'a, const O: u8> = crate::BitWriter<'a, u32, NMIENSET_SPEC, PREGION1WA_AW, O>; +impl<'a, const O: u8> PREGION1WA_W<'a, O> { + #[doc = "Enable"] + #[inline(always)] + pub fn set(self) -> &'a mut W { + self.variant(PREGION1WA_AW::SET) + } +} +#[doc = "Field `PREGION1RA` reader - Write '1' to enable interrupt for event PREGION1RA"] +pub type PREGION1RA_R = crate::BitReader; +#[doc = "Write '1' to enable interrupt for event PREGION1RA\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PREGION1RA_A { + #[doc = "0: Read: Disabled"] + DISABLED = 0, + #[doc = "1: Read: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PREGION1RA_A) -> Self { + variant as u8 != 0 + } +} +impl PREGION1RA_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> PREGION1RA_A { + match self.bits { + false => PREGION1RA_A::DISABLED, + true => PREGION1RA_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == PREGION1RA_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == PREGION1RA_A::ENABLED + } +} +#[doc = "Write '1' to enable interrupt for event PREGION1RA\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PREGION1RA_AW { + #[doc = "1: Enable"] + SET = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PREGION1RA_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `PREGION1RA` writer - Write '1' to enable interrupt for event PREGION1RA"] +pub type PREGION1RA_W<'a, const O: u8> = crate::BitWriter<'a, u32, NMIENSET_SPEC, PREGION1RA_AW, O>; +impl<'a, const O: u8> PREGION1RA_W<'a, O> { + #[doc = "Enable"] + #[inline(always)] + pub fn set(self) -> &'a mut W { + self.variant(PREGION1RA_AW::SET) + } +} +impl R { + #[doc = "Bit 0 - Write '1' to enable interrupt for event REGION0WA"] + #[inline(always)] + pub fn region0wa(&self) -> REGION0WA_R { + REGION0WA_R::new((self.bits & 1) != 0) + } + #[doc = "Bit 1 - Write '1' to enable interrupt for event REGION0RA"] + #[inline(always)] + pub fn region0ra(&self) -> REGION0RA_R { + REGION0RA_R::new(((self.bits >> 1) & 1) != 0) + } + #[doc = "Bit 2 - Write '1' to enable interrupt for event REGION1WA"] + #[inline(always)] + pub fn region1wa(&self) -> REGION1WA_R { + REGION1WA_R::new(((self.bits >> 2) & 1) != 0) + } + #[doc = "Bit 3 - Write '1' to enable interrupt for event REGION1RA"] + #[inline(always)] + pub fn region1ra(&self) -> REGION1RA_R { + REGION1RA_R::new(((self.bits >> 3) & 1) != 0) + } + #[doc = "Bit 4 - Write '1' to enable interrupt for event REGION2WA"] + #[inline(always)] + pub fn region2wa(&self) -> REGION2WA_R { + REGION2WA_R::new(((self.bits >> 4) & 1) != 0) + } + #[doc = "Bit 5 - Write '1' to enable interrupt for event REGION2RA"] + #[inline(always)] + pub fn region2ra(&self) -> REGION2RA_R { + REGION2RA_R::new(((self.bits >> 5) & 1) != 0) + } + #[doc = "Bit 6 - Write '1' to enable interrupt for event REGION3WA"] + #[inline(always)] + pub fn region3wa(&self) -> REGION3WA_R { + REGION3WA_R::new(((self.bits >> 6) & 1) != 0) + } + #[doc = "Bit 7 - Write '1' to enable interrupt for event REGION3RA"] + #[inline(always)] + pub fn region3ra(&self) -> REGION3RA_R { + REGION3RA_R::new(((self.bits >> 7) & 1) != 0) + } + #[doc = "Bit 24 - Write '1' to enable interrupt for event PREGION0WA"] + #[inline(always)] + pub fn pregion0wa(&self) -> PREGION0WA_R { + PREGION0WA_R::new(((self.bits >> 24) & 1) != 0) + } + #[doc = "Bit 25 - Write '1' to enable interrupt for event PREGION0RA"] + #[inline(always)] + pub fn pregion0ra(&self) -> PREGION0RA_R { + PREGION0RA_R::new(((self.bits >> 25) & 1) != 0) + } + #[doc = "Bit 26 - Write '1' to enable interrupt for event PREGION1WA"] + #[inline(always)] + pub fn pregion1wa(&self) -> PREGION1WA_R { + PREGION1WA_R::new(((self.bits >> 26) & 1) != 0) + } + #[doc = "Bit 27 - Write '1' to enable interrupt for event PREGION1RA"] + #[inline(always)] + pub fn pregion1ra(&self) -> PREGION1RA_R { + PREGION1RA_R::new(((self.bits >> 27) & 1) != 0) + } +} +impl W { + #[doc = "Bit 0 - Write '1' to enable interrupt for event REGION0WA"] + #[inline(always)] + #[must_use] + pub fn region0wa(&mut self) -> REGION0WA_W<0> { + REGION0WA_W::new(self) + } + #[doc = "Bit 1 - Write '1' to enable interrupt for event REGION0RA"] + #[inline(always)] + #[must_use] + pub fn region0ra(&mut self) -> REGION0RA_W<1> { + REGION0RA_W::new(self) + } + #[doc = "Bit 2 - Write '1' to enable interrupt for event REGION1WA"] + #[inline(always)] + #[must_use] + pub fn region1wa(&mut self) -> REGION1WA_W<2> { + REGION1WA_W::new(self) + } + #[doc = "Bit 3 - Write '1' to enable interrupt for event REGION1RA"] + #[inline(always)] + #[must_use] + pub fn region1ra(&mut self) -> REGION1RA_W<3> { + REGION1RA_W::new(self) + } + #[doc = "Bit 4 - Write '1' to enable interrupt for event REGION2WA"] + #[inline(always)] + #[must_use] + pub fn region2wa(&mut self) -> REGION2WA_W<4> { + REGION2WA_W::new(self) + } + #[doc = "Bit 5 - Write '1' to enable interrupt for event REGION2RA"] + #[inline(always)] + #[must_use] + pub fn region2ra(&mut self) -> REGION2RA_W<5> { + REGION2RA_W::new(self) + } + #[doc = "Bit 6 - Write '1' to enable interrupt for event REGION3WA"] + #[inline(always)] + #[must_use] + pub fn region3wa(&mut self) -> REGION3WA_W<6> { + REGION3WA_W::new(self) + } + #[doc = "Bit 7 - Write '1' to enable interrupt for event REGION3RA"] + #[inline(always)] + #[must_use] + pub fn region3ra(&mut self) -> REGION3RA_W<7> { + REGION3RA_W::new(self) + } + #[doc = "Bit 24 - Write '1' to enable interrupt for event PREGION0WA"] + #[inline(always)] + #[must_use] + pub fn pregion0wa(&mut self) -> PREGION0WA_W<24> { + PREGION0WA_W::new(self) + } + #[doc = "Bit 25 - Write '1' to enable interrupt for event PREGION0RA"] + #[inline(always)] + #[must_use] + pub fn pregion0ra(&mut self) -> PREGION0RA_W<25> { + PREGION0RA_W::new(self) + } + #[doc = "Bit 26 - Write '1' to enable interrupt for event PREGION1WA"] + #[inline(always)] + #[must_use] + pub fn pregion1wa(&mut self) -> PREGION1WA_W<26> { + PREGION1WA_W::new(self) + } + #[doc = "Bit 27 - Write '1' to enable interrupt for event PREGION1RA"] + #[inline(always)] + #[must_use] + pub fn pregion1ra(&mut self) -> PREGION1RA_W<27> { + PREGION1RA_W::new(self) + } + #[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 = "Enable interrupt\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 [nmienset](index.html) module"] +pub struct NMIENSET_SPEC; +impl crate::RegisterSpec for NMIENSET_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [nmienset::R](R) reader structure"] +impl crate::Readable for NMIENSET_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [nmienset::W](W) writer structure"] +impl crate::Writable for NMIENSET_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets NMIENSET to value 0"] +impl crate::Resettable for NMIENSET_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/mwu/perregion.rs b/down-the-stack/dk_pac/src/mwu/perregion.rs new file mode 100644 index 0000000..0be46d6 --- /dev/null +++ b/down-the-stack/dk_pac/src/mwu/perregion.rs @@ -0,0 +1,16 @@ +#[doc = r"Register block"] +#[repr(C)] +pub struct PERREGION { + #[doc = "0x00 - Description cluster: Source of event/interrupt in region n, write access detected while corresponding subregion was enabled for watching"] + pub substatwa: SUBSTATWA, + #[doc = "0x04 - Description cluster: Source of event/interrupt in region n, read access detected while corresponding subregion was enabled for watching"] + pub substatra: SUBSTATRA, +} +#[doc = "SUBSTATWA (rw) register accessor: an alias for `Reg`"] +pub type SUBSTATWA = crate::Reg; +#[doc = "Description cluster: Source of event/interrupt in region n, write access detected while corresponding subregion was enabled for watching"] +pub mod substatwa; +#[doc = "SUBSTATRA (rw) register accessor: an alias for `Reg`"] +pub type SUBSTATRA = crate::Reg; +#[doc = "Description cluster: Source of event/interrupt in region n, read access detected while corresponding subregion was enabled for watching"] +pub mod substatra; diff --git a/down-the-stack/dk_pac/src/mwu/perregion/substatra.rs b/down-the-stack/dk_pac/src/mwu/perregion/substatra.rs new file mode 100644 index 0000000..2924341 --- /dev/null +++ b/down-the-stack/dk_pac/src/mwu/perregion/substatra.rs @@ -0,0 +1,2017 @@ +#[doc = "Register `SUBSTATRA` 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 `SUBSTATRA` 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 `SR0` reader - Subregion 0 in region n (write '1' to clear)"] +pub type SR0_R = crate::BitReader; +#[doc = "Subregion 0 in region n (write '1' to clear)\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum SR0_A { + #[doc = "0: No read access occurred in this subregion"] + NO_ACCESS = 0, + #[doc = "1: Read access(es) occurred in this subregion"] + ACCESS = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: SR0_A) -> Self { + variant as u8 != 0 + } +} +impl SR0_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> SR0_A { + match self.bits { + false => SR0_A::NO_ACCESS, + true => SR0_A::ACCESS, + } + } + #[doc = "Checks if the value of the field is `NO_ACCESS`"] + #[inline(always)] + pub fn is_no_access(&self) -> bool { + *self == SR0_A::NO_ACCESS + } + #[doc = "Checks if the value of the field is `ACCESS`"] + #[inline(always)] + pub fn is_access(&self) -> bool { + *self == SR0_A::ACCESS + } +} +#[doc = "Field `SR0` writer - Subregion 0 in region n (write '1' to clear)"] +pub type SR0_W<'a, const O: u8> = crate::BitWriter1C<'a, u32, SUBSTATRA_SPEC, SR0_A, O>; +impl<'a, const O: u8> SR0_W<'a, O> { + #[doc = "No read access occurred in this subregion"] + #[inline(always)] + pub fn no_access(self) -> &'a mut W { + self.variant(SR0_A::NO_ACCESS) + } + #[doc = "Read access(es) occurred in this subregion"] + #[inline(always)] + pub fn access(self) -> &'a mut W { + self.variant(SR0_A::ACCESS) + } +} +#[doc = "Field `SR1` reader - Subregion 1 in region n (write '1' to clear)"] +pub type SR1_R = crate::BitReader; +#[doc = "Subregion 1 in region n (write '1' to clear)\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum SR1_A { + #[doc = "0: No read access occurred in this subregion"] + NO_ACCESS = 0, + #[doc = "1: Read access(es) occurred in this subregion"] + ACCESS = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: SR1_A) -> Self { + variant as u8 != 0 + } +} +impl SR1_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> SR1_A { + match self.bits { + false => SR1_A::NO_ACCESS, + true => SR1_A::ACCESS, + } + } + #[doc = "Checks if the value of the field is `NO_ACCESS`"] + #[inline(always)] + pub fn is_no_access(&self) -> bool { + *self == SR1_A::NO_ACCESS + } + #[doc = "Checks if the value of the field is `ACCESS`"] + #[inline(always)] + pub fn is_access(&self) -> bool { + *self == SR1_A::ACCESS + } +} +#[doc = "Field `SR1` writer - Subregion 1 in region n (write '1' to clear)"] +pub type SR1_W<'a, const O: u8> = crate::BitWriter1C<'a, u32, SUBSTATRA_SPEC, SR1_A, O>; +impl<'a, const O: u8> SR1_W<'a, O> { + #[doc = "No read access occurred in this subregion"] + #[inline(always)] + pub fn no_access(self) -> &'a mut W { + self.variant(SR1_A::NO_ACCESS) + } + #[doc = "Read access(es) occurred in this subregion"] + #[inline(always)] + pub fn access(self) -> &'a mut W { + self.variant(SR1_A::ACCESS) + } +} +#[doc = "Field `SR2` reader - Subregion 2 in region n (write '1' to clear)"] +pub type SR2_R = crate::BitReader; +#[doc = "Subregion 2 in region n (write '1' to clear)\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum SR2_A { + #[doc = "0: No read access occurred in this subregion"] + NO_ACCESS = 0, + #[doc = "1: Read access(es) occurred in this subregion"] + ACCESS = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: SR2_A) -> Self { + variant as u8 != 0 + } +} +impl SR2_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> SR2_A { + match self.bits { + false => SR2_A::NO_ACCESS, + true => SR2_A::ACCESS, + } + } + #[doc = "Checks if the value of the field is `NO_ACCESS`"] + #[inline(always)] + pub fn is_no_access(&self) -> bool { + *self == SR2_A::NO_ACCESS + } + #[doc = "Checks if the value of the field is `ACCESS`"] + #[inline(always)] + pub fn is_access(&self) -> bool { + *self == SR2_A::ACCESS + } +} +#[doc = "Field `SR2` writer - Subregion 2 in region n (write '1' to clear)"] +pub type SR2_W<'a, const O: u8> = crate::BitWriter1C<'a, u32, SUBSTATRA_SPEC, SR2_A, O>; +impl<'a, const O: u8> SR2_W<'a, O> { + #[doc = "No read access occurred in this subregion"] + #[inline(always)] + pub fn no_access(self) -> &'a mut W { + self.variant(SR2_A::NO_ACCESS) + } + #[doc = "Read access(es) occurred in this subregion"] + #[inline(always)] + pub fn access(self) -> &'a mut W { + self.variant(SR2_A::ACCESS) + } +} +#[doc = "Field `SR3` reader - Subregion 3 in region n (write '1' to clear)"] +pub type SR3_R = crate::BitReader; +#[doc = "Subregion 3 in region n (write '1' to clear)\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum SR3_A { + #[doc = "0: No read access occurred in this subregion"] + NO_ACCESS = 0, + #[doc = "1: Read access(es) occurred in this subregion"] + ACCESS = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: SR3_A) -> Self { + variant as u8 != 0 + } +} +impl SR3_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> SR3_A { + match self.bits { + false => SR3_A::NO_ACCESS, + true => SR3_A::ACCESS, + } + } + #[doc = "Checks if the value of the field is `NO_ACCESS`"] + #[inline(always)] + pub fn is_no_access(&self) -> bool { + *self == SR3_A::NO_ACCESS + } + #[doc = "Checks if the value of the field is `ACCESS`"] + #[inline(always)] + pub fn is_access(&self) -> bool { + *self == SR3_A::ACCESS + } +} +#[doc = "Field `SR3` writer - Subregion 3 in region n (write '1' to clear)"] +pub type SR3_W<'a, const O: u8> = crate::BitWriter1C<'a, u32, SUBSTATRA_SPEC, SR3_A, O>; +impl<'a, const O: u8> SR3_W<'a, O> { + #[doc = "No read access occurred in this subregion"] + #[inline(always)] + pub fn no_access(self) -> &'a mut W { + self.variant(SR3_A::NO_ACCESS) + } + #[doc = "Read access(es) occurred in this subregion"] + #[inline(always)] + pub fn access(self) -> &'a mut W { + self.variant(SR3_A::ACCESS) + } +} +#[doc = "Field `SR4` reader - Subregion 4 in region n (write '1' to clear)"] +pub type SR4_R = crate::BitReader; +#[doc = "Subregion 4 in region n (write '1' to clear)\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum SR4_A { + #[doc = "0: No read access occurred in this subregion"] + NO_ACCESS = 0, + #[doc = "1: Read access(es) occurred in this subregion"] + ACCESS = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: SR4_A) -> Self { + variant as u8 != 0 + } +} +impl SR4_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> SR4_A { + match self.bits { + false => SR4_A::NO_ACCESS, + true => SR4_A::ACCESS, + } + } + #[doc = "Checks if the value of the field is `NO_ACCESS`"] + #[inline(always)] + pub fn is_no_access(&self) -> bool { + *self == SR4_A::NO_ACCESS + } + #[doc = "Checks if the value of the field is `ACCESS`"] + #[inline(always)] + pub fn is_access(&self) -> bool { + *self == SR4_A::ACCESS + } +} +#[doc = "Field `SR4` writer - Subregion 4 in region n (write '1' to clear)"] +pub type SR4_W<'a, const O: u8> = crate::BitWriter1C<'a, u32, SUBSTATRA_SPEC, SR4_A, O>; +impl<'a, const O: u8> SR4_W<'a, O> { + #[doc = "No read access occurred in this subregion"] + #[inline(always)] + pub fn no_access(self) -> &'a mut W { + self.variant(SR4_A::NO_ACCESS) + } + #[doc = "Read access(es) occurred in this subregion"] + #[inline(always)] + pub fn access(self) -> &'a mut W { + self.variant(SR4_A::ACCESS) + } +} +#[doc = "Field `SR5` reader - Subregion 5 in region n (write '1' to clear)"] +pub type SR5_R = crate::BitReader; +#[doc = "Subregion 5 in region n (write '1' to clear)\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum SR5_A { + #[doc = "0: No read access occurred in this subregion"] + NO_ACCESS = 0, + #[doc = "1: Read access(es) occurred in this subregion"] + ACCESS = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: SR5_A) -> Self { + variant as u8 != 0 + } +} +impl SR5_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> SR5_A { + match self.bits { + false => SR5_A::NO_ACCESS, + true => SR5_A::ACCESS, + } + } + #[doc = "Checks if the value of the field is `NO_ACCESS`"] + #[inline(always)] + pub fn is_no_access(&self) -> bool { + *self == SR5_A::NO_ACCESS + } + #[doc = "Checks if the value of the field is `ACCESS`"] + #[inline(always)] + pub fn is_access(&self) -> bool { + *self == SR5_A::ACCESS + } +} +#[doc = "Field `SR5` writer - Subregion 5 in region n (write '1' to clear)"] +pub type SR5_W<'a, const O: u8> = crate::BitWriter1C<'a, u32, SUBSTATRA_SPEC, SR5_A, O>; +impl<'a, const O: u8> SR5_W<'a, O> { + #[doc = "No read access occurred in this subregion"] + #[inline(always)] + pub fn no_access(self) -> &'a mut W { + self.variant(SR5_A::NO_ACCESS) + } + #[doc = "Read access(es) occurred in this subregion"] + #[inline(always)] + pub fn access(self) -> &'a mut W { + self.variant(SR5_A::ACCESS) + } +} +#[doc = "Field `SR6` reader - Subregion 6 in region n (write '1' to clear)"] +pub type SR6_R = crate::BitReader; +#[doc = "Subregion 6 in region n (write '1' to clear)\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum SR6_A { + #[doc = "0: No read access occurred in this subregion"] + NO_ACCESS = 0, + #[doc = "1: Read access(es) occurred in this subregion"] + ACCESS = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: SR6_A) -> Self { + variant as u8 != 0 + } +} +impl SR6_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> SR6_A { + match self.bits { + false => SR6_A::NO_ACCESS, + true => SR6_A::ACCESS, + } + } + #[doc = "Checks if the value of the field is `NO_ACCESS`"] + #[inline(always)] + pub fn is_no_access(&self) -> bool { + *self == SR6_A::NO_ACCESS + } + #[doc = "Checks if the value of the field is `ACCESS`"] + #[inline(always)] + pub fn is_access(&self) -> bool { + *self == SR6_A::ACCESS + } +} +#[doc = "Field `SR6` writer - Subregion 6 in region n (write '1' to clear)"] +pub type SR6_W<'a, const O: u8> = crate::BitWriter1C<'a, u32, SUBSTATRA_SPEC, SR6_A, O>; +impl<'a, const O: u8> SR6_W<'a, O> { + #[doc = "No read access occurred in this subregion"] + #[inline(always)] + pub fn no_access(self) -> &'a mut W { + self.variant(SR6_A::NO_ACCESS) + } + #[doc = "Read access(es) occurred in this subregion"] + #[inline(always)] + pub fn access(self) -> &'a mut W { + self.variant(SR6_A::ACCESS) + } +} +#[doc = "Field `SR7` reader - Subregion 7 in region n (write '1' to clear)"] +pub type SR7_R = crate::BitReader; +#[doc = "Subregion 7 in region n (write '1' to clear)\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum SR7_A { + #[doc = "0: No read access occurred in this subregion"] + NO_ACCESS = 0, + #[doc = "1: Read access(es) occurred in this subregion"] + ACCESS = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: SR7_A) -> Self { + variant as u8 != 0 + } +} +impl SR7_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> SR7_A { + match self.bits { + false => SR7_A::NO_ACCESS, + true => SR7_A::ACCESS, + } + } + #[doc = "Checks if the value of the field is `NO_ACCESS`"] + #[inline(always)] + pub fn is_no_access(&self) -> bool { + *self == SR7_A::NO_ACCESS + } + #[doc = "Checks if the value of the field is `ACCESS`"] + #[inline(always)] + pub fn is_access(&self) -> bool { + *self == SR7_A::ACCESS + } +} +#[doc = "Field `SR7` writer - Subregion 7 in region n (write '1' to clear)"] +pub type SR7_W<'a, const O: u8> = crate::BitWriter1C<'a, u32, SUBSTATRA_SPEC, SR7_A, O>; +impl<'a, const O: u8> SR7_W<'a, O> { + #[doc = "No read access occurred in this subregion"] + #[inline(always)] + pub fn no_access(self) -> &'a mut W { + self.variant(SR7_A::NO_ACCESS) + } + #[doc = "Read access(es) occurred in this subregion"] + #[inline(always)] + pub fn access(self) -> &'a mut W { + self.variant(SR7_A::ACCESS) + } +} +#[doc = "Field `SR8` reader - Subregion 8 in region n (write '1' to clear)"] +pub type SR8_R = crate::BitReader; +#[doc = "Subregion 8 in region n (write '1' to clear)\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum SR8_A { + #[doc = "0: No read access occurred in this subregion"] + NO_ACCESS = 0, + #[doc = "1: Read access(es) occurred in this subregion"] + ACCESS = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: SR8_A) -> Self { + variant as u8 != 0 + } +} +impl SR8_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> SR8_A { + match self.bits { + false => SR8_A::NO_ACCESS, + true => SR8_A::ACCESS, + } + } + #[doc = "Checks if the value of the field is `NO_ACCESS`"] + #[inline(always)] + pub fn is_no_access(&self) -> bool { + *self == SR8_A::NO_ACCESS + } + #[doc = "Checks if the value of the field is `ACCESS`"] + #[inline(always)] + pub fn is_access(&self) -> bool { + *self == SR8_A::ACCESS + } +} +#[doc = "Field `SR8` writer - Subregion 8 in region n (write '1' to clear)"] +pub type SR8_W<'a, const O: u8> = crate::BitWriter1C<'a, u32, SUBSTATRA_SPEC, SR8_A, O>; +impl<'a, const O: u8> SR8_W<'a, O> { + #[doc = "No read access occurred in this subregion"] + #[inline(always)] + pub fn no_access(self) -> &'a mut W { + self.variant(SR8_A::NO_ACCESS) + } + #[doc = "Read access(es) occurred in this subregion"] + #[inline(always)] + pub fn access(self) -> &'a mut W { + self.variant(SR8_A::ACCESS) + } +} +#[doc = "Field `SR9` reader - Subregion 9 in region n (write '1' to clear)"] +pub type SR9_R = crate::BitReader; +#[doc = "Subregion 9 in region n (write '1' to clear)\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum SR9_A { + #[doc = "0: No read access occurred in this subregion"] + NO_ACCESS = 0, + #[doc = "1: Read access(es) occurred in this subregion"] + ACCESS = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: SR9_A) -> Self { + variant as u8 != 0 + } +} +impl SR9_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> SR9_A { + match self.bits { + false => SR9_A::NO_ACCESS, + true => SR9_A::ACCESS, + } + } + #[doc = "Checks if the value of the field is `NO_ACCESS`"] + #[inline(always)] + pub fn is_no_access(&self) -> bool { + *self == SR9_A::NO_ACCESS + } + #[doc = "Checks if the value of the field is `ACCESS`"] + #[inline(always)] + pub fn is_access(&self) -> bool { + *self == SR9_A::ACCESS + } +} +#[doc = "Field `SR9` writer - Subregion 9 in region n (write '1' to clear)"] +pub type SR9_W<'a, const O: u8> = crate::BitWriter1C<'a, u32, SUBSTATRA_SPEC, SR9_A, O>; +impl<'a, const O: u8> SR9_W<'a, O> { + #[doc = "No read access occurred in this subregion"] + #[inline(always)] + pub fn no_access(self) -> &'a mut W { + self.variant(SR9_A::NO_ACCESS) + } + #[doc = "Read access(es) occurred in this subregion"] + #[inline(always)] + pub fn access(self) -> &'a mut W { + self.variant(SR9_A::ACCESS) + } +} +#[doc = "Field `SR10` reader - Subregion 10 in region n (write '1' to clear)"] +pub type SR10_R = crate::BitReader; +#[doc = "Subregion 10 in region n (write '1' to clear)\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum SR10_A { + #[doc = "0: No read access occurred in this subregion"] + NO_ACCESS = 0, + #[doc = "1: Read access(es) occurred in this subregion"] + ACCESS = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: SR10_A) -> Self { + variant as u8 != 0 + } +} +impl SR10_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> SR10_A { + match self.bits { + false => SR10_A::NO_ACCESS, + true => SR10_A::ACCESS, + } + } + #[doc = "Checks if the value of the field is `NO_ACCESS`"] + #[inline(always)] + pub fn is_no_access(&self) -> bool { + *self == SR10_A::NO_ACCESS + } + #[doc = "Checks if the value of the field is `ACCESS`"] + #[inline(always)] + pub fn is_access(&self) -> bool { + *self == SR10_A::ACCESS + } +} +#[doc = "Field `SR10` writer - Subregion 10 in region n (write '1' to clear)"] +pub type SR10_W<'a, const O: u8> = crate::BitWriter1C<'a, u32, SUBSTATRA_SPEC, SR10_A, O>; +impl<'a, const O: u8> SR10_W<'a, O> { + #[doc = "No read access occurred in this subregion"] + #[inline(always)] + pub fn no_access(self) -> &'a mut W { + self.variant(SR10_A::NO_ACCESS) + } + #[doc = "Read access(es) occurred in this subregion"] + #[inline(always)] + pub fn access(self) -> &'a mut W { + self.variant(SR10_A::ACCESS) + } +} +#[doc = "Field `SR11` reader - Subregion 11 in region n (write '1' to clear)"] +pub type SR11_R = crate::BitReader; +#[doc = "Subregion 11 in region n (write '1' to clear)\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum SR11_A { + #[doc = "0: No read access occurred in this subregion"] + NO_ACCESS = 0, + #[doc = "1: Read access(es) occurred in this subregion"] + ACCESS = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: SR11_A) -> Self { + variant as u8 != 0 + } +} +impl SR11_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> SR11_A { + match self.bits { + false => SR11_A::NO_ACCESS, + true => SR11_A::ACCESS, + } + } + #[doc = "Checks if the value of the field is `NO_ACCESS`"] + #[inline(always)] + pub fn is_no_access(&self) -> bool { + *self == SR11_A::NO_ACCESS + } + #[doc = "Checks if the value of the field is `ACCESS`"] + #[inline(always)] + pub fn is_access(&self) -> bool { + *self == SR11_A::ACCESS + } +} +#[doc = "Field `SR11` writer - Subregion 11 in region n (write '1' to clear)"] +pub type SR11_W<'a, const O: u8> = crate::BitWriter1C<'a, u32, SUBSTATRA_SPEC, SR11_A, O>; +impl<'a, const O: u8> SR11_W<'a, O> { + #[doc = "No read access occurred in this subregion"] + #[inline(always)] + pub fn no_access(self) -> &'a mut W { + self.variant(SR11_A::NO_ACCESS) + } + #[doc = "Read access(es) occurred in this subregion"] + #[inline(always)] + pub fn access(self) -> &'a mut W { + self.variant(SR11_A::ACCESS) + } +} +#[doc = "Field `SR12` reader - Subregion 12 in region n (write '1' to clear)"] +pub type SR12_R = crate::BitReader; +#[doc = "Subregion 12 in region n (write '1' to clear)\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum SR12_A { + #[doc = "0: No read access occurred in this subregion"] + NO_ACCESS = 0, + #[doc = "1: Read access(es) occurred in this subregion"] + ACCESS = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: SR12_A) -> Self { + variant as u8 != 0 + } +} +impl SR12_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> SR12_A { + match self.bits { + false => SR12_A::NO_ACCESS, + true => SR12_A::ACCESS, + } + } + #[doc = "Checks if the value of the field is `NO_ACCESS`"] + #[inline(always)] + pub fn is_no_access(&self) -> bool { + *self == SR12_A::NO_ACCESS + } + #[doc = "Checks if the value of the field is `ACCESS`"] + #[inline(always)] + pub fn is_access(&self) -> bool { + *self == SR12_A::ACCESS + } +} +#[doc = "Field `SR12` writer - Subregion 12 in region n (write '1' to clear)"] +pub type SR12_W<'a, const O: u8> = crate::BitWriter1C<'a, u32, SUBSTATRA_SPEC, SR12_A, O>; +impl<'a, const O: u8> SR12_W<'a, O> { + #[doc = "No read access occurred in this subregion"] + #[inline(always)] + pub fn no_access(self) -> &'a mut W { + self.variant(SR12_A::NO_ACCESS) + } + #[doc = "Read access(es) occurred in this subregion"] + #[inline(always)] + pub fn access(self) -> &'a mut W { + self.variant(SR12_A::ACCESS) + } +} +#[doc = "Field `SR13` reader - Subregion 13 in region n (write '1' to clear)"] +pub type SR13_R = crate::BitReader; +#[doc = "Subregion 13 in region n (write '1' to clear)\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum SR13_A { + #[doc = "0: No read access occurred in this subregion"] + NO_ACCESS = 0, + #[doc = "1: Read access(es) occurred in this subregion"] + ACCESS = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: SR13_A) -> Self { + variant as u8 != 0 + } +} +impl SR13_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> SR13_A { + match self.bits { + false => SR13_A::NO_ACCESS, + true => SR13_A::ACCESS, + } + } + #[doc = "Checks if the value of the field is `NO_ACCESS`"] + #[inline(always)] + pub fn is_no_access(&self) -> bool { + *self == SR13_A::NO_ACCESS + } + #[doc = "Checks if the value of the field is `ACCESS`"] + #[inline(always)] + pub fn is_access(&self) -> bool { + *self == SR13_A::ACCESS + } +} +#[doc = "Field `SR13` writer - Subregion 13 in region n (write '1' to clear)"] +pub type SR13_W<'a, const O: u8> = crate::BitWriter1C<'a, u32, SUBSTATRA_SPEC, SR13_A, O>; +impl<'a, const O: u8> SR13_W<'a, O> { + #[doc = "No read access occurred in this subregion"] + #[inline(always)] + pub fn no_access(self) -> &'a mut W { + self.variant(SR13_A::NO_ACCESS) + } + #[doc = "Read access(es) occurred in this subregion"] + #[inline(always)] + pub fn access(self) -> &'a mut W { + self.variant(SR13_A::ACCESS) + } +} +#[doc = "Field `SR14` reader - Subregion 14 in region n (write '1' to clear)"] +pub type SR14_R = crate::BitReader; +#[doc = "Subregion 14 in region n (write '1' to clear)\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum SR14_A { + #[doc = "0: No read access occurred in this subregion"] + NO_ACCESS = 0, + #[doc = "1: Read access(es) occurred in this subregion"] + ACCESS = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: SR14_A) -> Self { + variant as u8 != 0 + } +} +impl SR14_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> SR14_A { + match self.bits { + false => SR14_A::NO_ACCESS, + true => SR14_A::ACCESS, + } + } + #[doc = "Checks if the value of the field is `NO_ACCESS`"] + #[inline(always)] + pub fn is_no_access(&self) -> bool { + *self == SR14_A::NO_ACCESS + } + #[doc = "Checks if the value of the field is `ACCESS`"] + #[inline(always)] + pub fn is_access(&self) -> bool { + *self == SR14_A::ACCESS + } +} +#[doc = "Field `SR14` writer - Subregion 14 in region n (write '1' to clear)"] +pub type SR14_W<'a, const O: u8> = crate::BitWriter1C<'a, u32, SUBSTATRA_SPEC, SR14_A, O>; +impl<'a, const O: u8> SR14_W<'a, O> { + #[doc = "No read access occurred in this subregion"] + #[inline(always)] + pub fn no_access(self) -> &'a mut W { + self.variant(SR14_A::NO_ACCESS) + } + #[doc = "Read access(es) occurred in this subregion"] + #[inline(always)] + pub fn access(self) -> &'a mut W { + self.variant(SR14_A::ACCESS) + } +} +#[doc = "Field `SR15` reader - Subregion 15 in region n (write '1' to clear)"] +pub type SR15_R = crate::BitReader; +#[doc = "Subregion 15 in region n (write '1' to clear)\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum SR15_A { + #[doc = "0: No read access occurred in this subregion"] + NO_ACCESS = 0, + #[doc = "1: Read access(es) occurred in this subregion"] + ACCESS = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: SR15_A) -> Self { + variant as u8 != 0 + } +} +impl SR15_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> SR15_A { + match self.bits { + false => SR15_A::NO_ACCESS, + true => SR15_A::ACCESS, + } + } + #[doc = "Checks if the value of the field is `NO_ACCESS`"] + #[inline(always)] + pub fn is_no_access(&self) -> bool { + *self == SR15_A::NO_ACCESS + } + #[doc = "Checks if the value of the field is `ACCESS`"] + #[inline(always)] + pub fn is_access(&self) -> bool { + *self == SR15_A::ACCESS + } +} +#[doc = "Field `SR15` writer - Subregion 15 in region n (write '1' to clear)"] +pub type SR15_W<'a, const O: u8> = crate::BitWriter1C<'a, u32, SUBSTATRA_SPEC, SR15_A, O>; +impl<'a, const O: u8> SR15_W<'a, O> { + #[doc = "No read access occurred in this subregion"] + #[inline(always)] + pub fn no_access(self) -> &'a mut W { + self.variant(SR15_A::NO_ACCESS) + } + #[doc = "Read access(es) occurred in this subregion"] + #[inline(always)] + pub fn access(self) -> &'a mut W { + self.variant(SR15_A::ACCESS) + } +} +#[doc = "Field `SR16` reader - Subregion 16 in region n (write '1' to clear)"] +pub type SR16_R = crate::BitReader; +#[doc = "Subregion 16 in region n (write '1' to clear)\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum SR16_A { + #[doc = "0: No read access occurred in this subregion"] + NO_ACCESS = 0, + #[doc = "1: Read access(es) occurred in this subregion"] + ACCESS = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: SR16_A) -> Self { + variant as u8 != 0 + } +} +impl SR16_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> SR16_A { + match self.bits { + false => SR16_A::NO_ACCESS, + true => SR16_A::ACCESS, + } + } + #[doc = "Checks if the value of the field is `NO_ACCESS`"] + #[inline(always)] + pub fn is_no_access(&self) -> bool { + *self == SR16_A::NO_ACCESS + } + #[doc = "Checks if the value of the field is `ACCESS`"] + #[inline(always)] + pub fn is_access(&self) -> bool { + *self == SR16_A::ACCESS + } +} +#[doc = "Field `SR16` writer - Subregion 16 in region n (write '1' to clear)"] +pub type SR16_W<'a, const O: u8> = crate::BitWriter1C<'a, u32, SUBSTATRA_SPEC, SR16_A, O>; +impl<'a, const O: u8> SR16_W<'a, O> { + #[doc = "No read access occurred in this subregion"] + #[inline(always)] + pub fn no_access(self) -> &'a mut W { + self.variant(SR16_A::NO_ACCESS) + } + #[doc = "Read access(es) occurred in this subregion"] + #[inline(always)] + pub fn access(self) -> &'a mut W { + self.variant(SR16_A::ACCESS) + } +} +#[doc = "Field `SR17` reader - Subregion 17 in region n (write '1' to clear)"] +pub type SR17_R = crate::BitReader; +#[doc = "Subregion 17 in region n (write '1' to clear)\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum SR17_A { + #[doc = "0: No read access occurred in this subregion"] + NO_ACCESS = 0, + #[doc = "1: Read access(es) occurred in this subregion"] + ACCESS = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: SR17_A) -> Self { + variant as u8 != 0 + } +} +impl SR17_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> SR17_A { + match self.bits { + false => SR17_A::NO_ACCESS, + true => SR17_A::ACCESS, + } + } + #[doc = "Checks if the value of the field is `NO_ACCESS`"] + #[inline(always)] + pub fn is_no_access(&self) -> bool { + *self == SR17_A::NO_ACCESS + } + #[doc = "Checks if the value of the field is `ACCESS`"] + #[inline(always)] + pub fn is_access(&self) -> bool { + *self == SR17_A::ACCESS + } +} +#[doc = "Field `SR17` writer - Subregion 17 in region n (write '1' to clear)"] +pub type SR17_W<'a, const O: u8> = crate::BitWriter1C<'a, u32, SUBSTATRA_SPEC, SR17_A, O>; +impl<'a, const O: u8> SR17_W<'a, O> { + #[doc = "No read access occurred in this subregion"] + #[inline(always)] + pub fn no_access(self) -> &'a mut W { + self.variant(SR17_A::NO_ACCESS) + } + #[doc = "Read access(es) occurred in this subregion"] + #[inline(always)] + pub fn access(self) -> &'a mut W { + self.variant(SR17_A::ACCESS) + } +} +#[doc = "Field `SR18` reader - Subregion 18 in region n (write '1' to clear)"] +pub type SR18_R = crate::BitReader; +#[doc = "Subregion 18 in region n (write '1' to clear)\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum SR18_A { + #[doc = "0: No read access occurred in this subregion"] + NO_ACCESS = 0, + #[doc = "1: Read access(es) occurred in this subregion"] + ACCESS = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: SR18_A) -> Self { + variant as u8 != 0 + } +} +impl SR18_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> SR18_A { + match self.bits { + false => SR18_A::NO_ACCESS, + true => SR18_A::ACCESS, + } + } + #[doc = "Checks if the value of the field is `NO_ACCESS`"] + #[inline(always)] + pub fn is_no_access(&self) -> bool { + *self == SR18_A::NO_ACCESS + } + #[doc = "Checks if the value of the field is `ACCESS`"] + #[inline(always)] + pub fn is_access(&self) -> bool { + *self == SR18_A::ACCESS + } +} +#[doc = "Field `SR18` writer - Subregion 18 in region n (write '1' to clear)"] +pub type SR18_W<'a, const O: u8> = crate::BitWriter1C<'a, u32, SUBSTATRA_SPEC, SR18_A, O>; +impl<'a, const O: u8> SR18_W<'a, O> { + #[doc = "No read access occurred in this subregion"] + #[inline(always)] + pub fn no_access(self) -> &'a mut W { + self.variant(SR18_A::NO_ACCESS) + } + #[doc = "Read access(es) occurred in this subregion"] + #[inline(always)] + pub fn access(self) -> &'a mut W { + self.variant(SR18_A::ACCESS) + } +} +#[doc = "Field `SR19` reader - Subregion 19 in region n (write '1' to clear)"] +pub type SR19_R = crate::BitReader; +#[doc = "Subregion 19 in region n (write '1' to clear)\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum SR19_A { + #[doc = "0: No read access occurred in this subregion"] + NO_ACCESS = 0, + #[doc = "1: Read access(es) occurred in this subregion"] + ACCESS = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: SR19_A) -> Self { + variant as u8 != 0 + } +} +impl SR19_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> SR19_A { + match self.bits { + false => SR19_A::NO_ACCESS, + true => SR19_A::ACCESS, + } + } + #[doc = "Checks if the value of the field is `NO_ACCESS`"] + #[inline(always)] + pub fn is_no_access(&self) -> bool { + *self == SR19_A::NO_ACCESS + } + #[doc = "Checks if the value of the field is `ACCESS`"] + #[inline(always)] + pub fn is_access(&self) -> bool { + *self == SR19_A::ACCESS + } +} +#[doc = "Field `SR19` writer - Subregion 19 in region n (write '1' to clear)"] +pub type SR19_W<'a, const O: u8> = crate::BitWriter1C<'a, u32, SUBSTATRA_SPEC, SR19_A, O>; +impl<'a, const O: u8> SR19_W<'a, O> { + #[doc = "No read access occurred in this subregion"] + #[inline(always)] + pub fn no_access(self) -> &'a mut W { + self.variant(SR19_A::NO_ACCESS) + } + #[doc = "Read access(es) occurred in this subregion"] + #[inline(always)] + pub fn access(self) -> &'a mut W { + self.variant(SR19_A::ACCESS) + } +} +#[doc = "Field `SR20` reader - Subregion 20 in region n (write '1' to clear)"] +pub type SR20_R = crate::BitReader; +#[doc = "Subregion 20 in region n (write '1' to clear)\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum SR20_A { + #[doc = "0: No read access occurred in this subregion"] + NO_ACCESS = 0, + #[doc = "1: Read access(es) occurred in this subregion"] + ACCESS = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: SR20_A) -> Self { + variant as u8 != 0 + } +} +impl SR20_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> SR20_A { + match self.bits { + false => SR20_A::NO_ACCESS, + true => SR20_A::ACCESS, + } + } + #[doc = "Checks if the value of the field is `NO_ACCESS`"] + #[inline(always)] + pub fn is_no_access(&self) -> bool { + *self == SR20_A::NO_ACCESS + } + #[doc = "Checks if the value of the field is `ACCESS`"] + #[inline(always)] + pub fn is_access(&self) -> bool { + *self == SR20_A::ACCESS + } +} +#[doc = "Field `SR20` writer - Subregion 20 in region n (write '1' to clear)"] +pub type SR20_W<'a, const O: u8> = crate::BitWriter1C<'a, u32, SUBSTATRA_SPEC, SR20_A, O>; +impl<'a, const O: u8> SR20_W<'a, O> { + #[doc = "No read access occurred in this subregion"] + #[inline(always)] + pub fn no_access(self) -> &'a mut W { + self.variant(SR20_A::NO_ACCESS) + } + #[doc = "Read access(es) occurred in this subregion"] + #[inline(always)] + pub fn access(self) -> &'a mut W { + self.variant(SR20_A::ACCESS) + } +} +#[doc = "Field `SR21` reader - Subregion 21 in region n (write '1' to clear)"] +pub type SR21_R = crate::BitReader; +#[doc = "Subregion 21 in region n (write '1' to clear)\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum SR21_A { + #[doc = "0: No read access occurred in this subregion"] + NO_ACCESS = 0, + #[doc = "1: Read access(es) occurred in this subregion"] + ACCESS = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: SR21_A) -> Self { + variant as u8 != 0 + } +} +impl SR21_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> SR21_A { + match self.bits { + false => SR21_A::NO_ACCESS, + true => SR21_A::ACCESS, + } + } + #[doc = "Checks if the value of the field is `NO_ACCESS`"] + #[inline(always)] + pub fn is_no_access(&self) -> bool { + *self == SR21_A::NO_ACCESS + } + #[doc = "Checks if the value of the field is `ACCESS`"] + #[inline(always)] + pub fn is_access(&self) -> bool { + *self == SR21_A::ACCESS + } +} +#[doc = "Field `SR21` writer - Subregion 21 in region n (write '1' to clear)"] +pub type SR21_W<'a, const O: u8> = crate::BitWriter1C<'a, u32, SUBSTATRA_SPEC, SR21_A, O>; +impl<'a, const O: u8> SR21_W<'a, O> { + #[doc = "No read access occurred in this subregion"] + #[inline(always)] + pub fn no_access(self) -> &'a mut W { + self.variant(SR21_A::NO_ACCESS) + } + #[doc = "Read access(es) occurred in this subregion"] + #[inline(always)] + pub fn access(self) -> &'a mut W { + self.variant(SR21_A::ACCESS) + } +} +#[doc = "Field `SR22` reader - Subregion 22 in region n (write '1' to clear)"] +pub type SR22_R = crate::BitReader; +#[doc = "Subregion 22 in region n (write '1' to clear)\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum SR22_A { + #[doc = "0: No read access occurred in this subregion"] + NO_ACCESS = 0, + #[doc = "1: Read access(es) occurred in this subregion"] + ACCESS = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: SR22_A) -> Self { + variant as u8 != 0 + } +} +impl SR22_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> SR22_A { + match self.bits { + false => SR22_A::NO_ACCESS, + true => SR22_A::ACCESS, + } + } + #[doc = "Checks if the value of the field is `NO_ACCESS`"] + #[inline(always)] + pub fn is_no_access(&self) -> bool { + *self == SR22_A::NO_ACCESS + } + #[doc = "Checks if the value of the field is `ACCESS`"] + #[inline(always)] + pub fn is_access(&self) -> bool { + *self == SR22_A::ACCESS + } +} +#[doc = "Field `SR22` writer - Subregion 22 in region n (write '1' to clear)"] +pub type SR22_W<'a, const O: u8> = crate::BitWriter1C<'a, u32, SUBSTATRA_SPEC, SR22_A, O>; +impl<'a, const O: u8> SR22_W<'a, O> { + #[doc = "No read access occurred in this subregion"] + #[inline(always)] + pub fn no_access(self) -> &'a mut W { + self.variant(SR22_A::NO_ACCESS) + } + #[doc = "Read access(es) occurred in this subregion"] + #[inline(always)] + pub fn access(self) -> &'a mut W { + self.variant(SR22_A::ACCESS) + } +} +#[doc = "Field `SR23` reader - Subregion 23 in region n (write '1' to clear)"] +pub type SR23_R = crate::BitReader; +#[doc = "Subregion 23 in region n (write '1' to clear)\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum SR23_A { + #[doc = "0: No read access occurred in this subregion"] + NO_ACCESS = 0, + #[doc = "1: Read access(es) occurred in this subregion"] + ACCESS = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: SR23_A) -> Self { + variant as u8 != 0 + } +} +impl SR23_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> SR23_A { + match self.bits { + false => SR23_A::NO_ACCESS, + true => SR23_A::ACCESS, + } + } + #[doc = "Checks if the value of the field is `NO_ACCESS`"] + #[inline(always)] + pub fn is_no_access(&self) -> bool { + *self == SR23_A::NO_ACCESS + } + #[doc = "Checks if the value of the field is `ACCESS`"] + #[inline(always)] + pub fn is_access(&self) -> bool { + *self == SR23_A::ACCESS + } +} +#[doc = "Field `SR23` writer - Subregion 23 in region n (write '1' to clear)"] +pub type SR23_W<'a, const O: u8> = crate::BitWriter1C<'a, u32, SUBSTATRA_SPEC, SR23_A, O>; +impl<'a, const O: u8> SR23_W<'a, O> { + #[doc = "No read access occurred in this subregion"] + #[inline(always)] + pub fn no_access(self) -> &'a mut W { + self.variant(SR23_A::NO_ACCESS) + } + #[doc = "Read access(es) occurred in this subregion"] + #[inline(always)] + pub fn access(self) -> &'a mut W { + self.variant(SR23_A::ACCESS) + } +} +#[doc = "Field `SR24` reader - Subregion 24 in region n (write '1' to clear)"] +pub type SR24_R = crate::BitReader; +#[doc = "Subregion 24 in region n (write '1' to clear)\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum SR24_A { + #[doc = "0: No read access occurred in this subregion"] + NO_ACCESS = 0, + #[doc = "1: Read access(es) occurred in this subregion"] + ACCESS = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: SR24_A) -> Self { + variant as u8 != 0 + } +} +impl SR24_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> SR24_A { + match self.bits { + false => SR24_A::NO_ACCESS, + true => SR24_A::ACCESS, + } + } + #[doc = "Checks if the value of the field is `NO_ACCESS`"] + #[inline(always)] + pub fn is_no_access(&self) -> bool { + *self == SR24_A::NO_ACCESS + } + #[doc = "Checks if the value of the field is `ACCESS`"] + #[inline(always)] + pub fn is_access(&self) -> bool { + *self == SR24_A::ACCESS + } +} +#[doc = "Field `SR24` writer - Subregion 24 in region n (write '1' to clear)"] +pub type SR24_W<'a, const O: u8> = crate::BitWriter1C<'a, u32, SUBSTATRA_SPEC, SR24_A, O>; +impl<'a, const O: u8> SR24_W<'a, O> { + #[doc = "No read access occurred in this subregion"] + #[inline(always)] + pub fn no_access(self) -> &'a mut W { + self.variant(SR24_A::NO_ACCESS) + } + #[doc = "Read access(es) occurred in this subregion"] + #[inline(always)] + pub fn access(self) -> &'a mut W { + self.variant(SR24_A::ACCESS) + } +} +#[doc = "Field `SR25` reader - Subregion 25 in region n (write '1' to clear)"] +pub type SR25_R = crate::BitReader; +#[doc = "Subregion 25 in region n (write '1' to clear)\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum SR25_A { + #[doc = "0: No read access occurred in this subregion"] + NO_ACCESS = 0, + #[doc = "1: Read access(es) occurred in this subregion"] + ACCESS = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: SR25_A) -> Self { + variant as u8 != 0 + } +} +impl SR25_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> SR25_A { + match self.bits { + false => SR25_A::NO_ACCESS, + true => SR25_A::ACCESS, + } + } + #[doc = "Checks if the value of the field is `NO_ACCESS`"] + #[inline(always)] + pub fn is_no_access(&self) -> bool { + *self == SR25_A::NO_ACCESS + } + #[doc = "Checks if the value of the field is `ACCESS`"] + #[inline(always)] + pub fn is_access(&self) -> bool { + *self == SR25_A::ACCESS + } +} +#[doc = "Field `SR25` writer - Subregion 25 in region n (write '1' to clear)"] +pub type SR25_W<'a, const O: u8> = crate::BitWriter1C<'a, u32, SUBSTATRA_SPEC, SR25_A, O>; +impl<'a, const O: u8> SR25_W<'a, O> { + #[doc = "No read access occurred in this subregion"] + #[inline(always)] + pub fn no_access(self) -> &'a mut W { + self.variant(SR25_A::NO_ACCESS) + } + #[doc = "Read access(es) occurred in this subregion"] + #[inline(always)] + pub fn access(self) -> &'a mut W { + self.variant(SR25_A::ACCESS) + } +} +#[doc = "Field `SR26` reader - Subregion 26 in region n (write '1' to clear)"] +pub type SR26_R = crate::BitReader; +#[doc = "Subregion 26 in region n (write '1' to clear)\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum SR26_A { + #[doc = "0: No read access occurred in this subregion"] + NO_ACCESS = 0, + #[doc = "1: Read access(es) occurred in this subregion"] + ACCESS = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: SR26_A) -> Self { + variant as u8 != 0 + } +} +impl SR26_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> SR26_A { + match self.bits { + false => SR26_A::NO_ACCESS, + true => SR26_A::ACCESS, + } + } + #[doc = "Checks if the value of the field is `NO_ACCESS`"] + #[inline(always)] + pub fn is_no_access(&self) -> bool { + *self == SR26_A::NO_ACCESS + } + #[doc = "Checks if the value of the field is `ACCESS`"] + #[inline(always)] + pub fn is_access(&self) -> bool { + *self == SR26_A::ACCESS + } +} +#[doc = "Field `SR26` writer - Subregion 26 in region n (write '1' to clear)"] +pub type SR26_W<'a, const O: u8> = crate::BitWriter1C<'a, u32, SUBSTATRA_SPEC, SR26_A, O>; +impl<'a, const O: u8> SR26_W<'a, O> { + #[doc = "No read access occurred in this subregion"] + #[inline(always)] + pub fn no_access(self) -> &'a mut W { + self.variant(SR26_A::NO_ACCESS) + } + #[doc = "Read access(es) occurred in this subregion"] + #[inline(always)] + pub fn access(self) -> &'a mut W { + self.variant(SR26_A::ACCESS) + } +} +#[doc = "Field `SR27` reader - Subregion 27 in region n (write '1' to clear)"] +pub type SR27_R = crate::BitReader; +#[doc = "Subregion 27 in region n (write '1' to clear)\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum SR27_A { + #[doc = "0: No read access occurred in this subregion"] + NO_ACCESS = 0, + #[doc = "1: Read access(es) occurred in this subregion"] + ACCESS = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: SR27_A) -> Self { + variant as u8 != 0 + } +} +impl SR27_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> SR27_A { + match self.bits { + false => SR27_A::NO_ACCESS, + true => SR27_A::ACCESS, + } + } + #[doc = "Checks if the value of the field is `NO_ACCESS`"] + #[inline(always)] + pub fn is_no_access(&self) -> bool { + *self == SR27_A::NO_ACCESS + } + #[doc = "Checks if the value of the field is `ACCESS`"] + #[inline(always)] + pub fn is_access(&self) -> bool { + *self == SR27_A::ACCESS + } +} +#[doc = "Field `SR27` writer - Subregion 27 in region n (write '1' to clear)"] +pub type SR27_W<'a, const O: u8> = crate::BitWriter1C<'a, u32, SUBSTATRA_SPEC, SR27_A, O>; +impl<'a, const O: u8> SR27_W<'a, O> { + #[doc = "No read access occurred in this subregion"] + #[inline(always)] + pub fn no_access(self) -> &'a mut W { + self.variant(SR27_A::NO_ACCESS) + } + #[doc = "Read access(es) occurred in this subregion"] + #[inline(always)] + pub fn access(self) -> &'a mut W { + self.variant(SR27_A::ACCESS) + } +} +#[doc = "Field `SR28` reader - Subregion 28 in region n (write '1' to clear)"] +pub type SR28_R = crate::BitReader; +#[doc = "Subregion 28 in region n (write '1' to clear)\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum SR28_A { + #[doc = "0: No read access occurred in this subregion"] + NO_ACCESS = 0, + #[doc = "1: Read access(es) occurred in this subregion"] + ACCESS = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: SR28_A) -> Self { + variant as u8 != 0 + } +} +impl SR28_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> SR28_A { + match self.bits { + false => SR28_A::NO_ACCESS, + true => SR28_A::ACCESS, + } + } + #[doc = "Checks if the value of the field is `NO_ACCESS`"] + #[inline(always)] + pub fn is_no_access(&self) -> bool { + *self == SR28_A::NO_ACCESS + } + #[doc = "Checks if the value of the field is `ACCESS`"] + #[inline(always)] + pub fn is_access(&self) -> bool { + *self == SR28_A::ACCESS + } +} +#[doc = "Field `SR28` writer - Subregion 28 in region n (write '1' to clear)"] +pub type SR28_W<'a, const O: u8> = crate::BitWriter1C<'a, u32, SUBSTATRA_SPEC, SR28_A, O>; +impl<'a, const O: u8> SR28_W<'a, O> { + #[doc = "No read access occurred in this subregion"] + #[inline(always)] + pub fn no_access(self) -> &'a mut W { + self.variant(SR28_A::NO_ACCESS) + } + #[doc = "Read access(es) occurred in this subregion"] + #[inline(always)] + pub fn access(self) -> &'a mut W { + self.variant(SR28_A::ACCESS) + } +} +#[doc = "Field `SR29` reader - Subregion 29 in region n (write '1' to clear)"] +pub type SR29_R = crate::BitReader; +#[doc = "Subregion 29 in region n (write '1' to clear)\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum SR29_A { + #[doc = "0: No read access occurred in this subregion"] + NO_ACCESS = 0, + #[doc = "1: Read access(es) occurred in this subregion"] + ACCESS = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: SR29_A) -> Self { + variant as u8 != 0 + } +} +impl SR29_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> SR29_A { + match self.bits { + false => SR29_A::NO_ACCESS, + true => SR29_A::ACCESS, + } + } + #[doc = "Checks if the value of the field is `NO_ACCESS`"] + #[inline(always)] + pub fn is_no_access(&self) -> bool { + *self == SR29_A::NO_ACCESS + } + #[doc = "Checks if the value of the field is `ACCESS`"] + #[inline(always)] + pub fn is_access(&self) -> bool { + *self == SR29_A::ACCESS + } +} +#[doc = "Field `SR29` writer - Subregion 29 in region n (write '1' to clear)"] +pub type SR29_W<'a, const O: u8> = crate::BitWriter1C<'a, u32, SUBSTATRA_SPEC, SR29_A, O>; +impl<'a, const O: u8> SR29_W<'a, O> { + #[doc = "No read access occurred in this subregion"] + #[inline(always)] + pub fn no_access(self) -> &'a mut W { + self.variant(SR29_A::NO_ACCESS) + } + #[doc = "Read access(es) occurred in this subregion"] + #[inline(always)] + pub fn access(self) -> &'a mut W { + self.variant(SR29_A::ACCESS) + } +} +#[doc = "Field `SR30` reader - Subregion 30 in region n (write '1' to clear)"] +pub type SR30_R = crate::BitReader; +#[doc = "Subregion 30 in region n (write '1' to clear)\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum SR30_A { + #[doc = "0: No read access occurred in this subregion"] + NO_ACCESS = 0, + #[doc = "1: Read access(es) occurred in this subregion"] + ACCESS = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: SR30_A) -> Self { + variant as u8 != 0 + } +} +impl SR30_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> SR30_A { + match self.bits { + false => SR30_A::NO_ACCESS, + true => SR30_A::ACCESS, + } + } + #[doc = "Checks if the value of the field is `NO_ACCESS`"] + #[inline(always)] + pub fn is_no_access(&self) -> bool { + *self == SR30_A::NO_ACCESS + } + #[doc = "Checks if the value of the field is `ACCESS`"] + #[inline(always)] + pub fn is_access(&self) -> bool { + *self == SR30_A::ACCESS + } +} +#[doc = "Field `SR30` writer - Subregion 30 in region n (write '1' to clear)"] +pub type SR30_W<'a, const O: u8> = crate::BitWriter1C<'a, u32, SUBSTATRA_SPEC, SR30_A, O>; +impl<'a, const O: u8> SR30_W<'a, O> { + #[doc = "No read access occurred in this subregion"] + #[inline(always)] + pub fn no_access(self) -> &'a mut W { + self.variant(SR30_A::NO_ACCESS) + } + #[doc = "Read access(es) occurred in this subregion"] + #[inline(always)] + pub fn access(self) -> &'a mut W { + self.variant(SR30_A::ACCESS) + } +} +#[doc = "Field `SR31` reader - Subregion 31 in region n (write '1' to clear)"] +pub type SR31_R = crate::BitReader; +#[doc = "Subregion 31 in region n (write '1' to clear)\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum SR31_A { + #[doc = "0: No read access occurred in this subregion"] + NO_ACCESS = 0, + #[doc = "1: Read access(es) occurred in this subregion"] + ACCESS = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: SR31_A) -> Self { + variant as u8 != 0 + } +} +impl SR31_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> SR31_A { + match self.bits { + false => SR31_A::NO_ACCESS, + true => SR31_A::ACCESS, + } + } + #[doc = "Checks if the value of the field is `NO_ACCESS`"] + #[inline(always)] + pub fn is_no_access(&self) -> bool { + *self == SR31_A::NO_ACCESS + } + #[doc = "Checks if the value of the field is `ACCESS`"] + #[inline(always)] + pub fn is_access(&self) -> bool { + *self == SR31_A::ACCESS + } +} +#[doc = "Field `SR31` writer - Subregion 31 in region n (write '1' to clear)"] +pub type SR31_W<'a, const O: u8> = crate::BitWriter1C<'a, u32, SUBSTATRA_SPEC, SR31_A, O>; +impl<'a, const O: u8> SR31_W<'a, O> { + #[doc = "No read access occurred in this subregion"] + #[inline(always)] + pub fn no_access(self) -> &'a mut W { + self.variant(SR31_A::NO_ACCESS) + } + #[doc = "Read access(es) occurred in this subregion"] + #[inline(always)] + pub fn access(self) -> &'a mut W { + self.variant(SR31_A::ACCESS) + } +} +impl R { + #[doc = "Bit 0 - Subregion 0 in region n (write '1' to clear)"] + #[inline(always)] + pub fn sr0(&self) -> SR0_R { + SR0_R::new((self.bits & 1) != 0) + } + #[doc = "Bit 1 - Subregion 1 in region n (write '1' to clear)"] + #[inline(always)] + pub fn sr1(&self) -> SR1_R { + SR1_R::new(((self.bits >> 1) & 1) != 0) + } + #[doc = "Bit 2 - Subregion 2 in region n (write '1' to clear)"] + #[inline(always)] + pub fn sr2(&self) -> SR2_R { + SR2_R::new(((self.bits >> 2) & 1) != 0) + } + #[doc = "Bit 3 - Subregion 3 in region n (write '1' to clear)"] + #[inline(always)] + pub fn sr3(&self) -> SR3_R { + SR3_R::new(((self.bits >> 3) & 1) != 0) + } + #[doc = "Bit 4 - Subregion 4 in region n (write '1' to clear)"] + #[inline(always)] + pub fn sr4(&self) -> SR4_R { + SR4_R::new(((self.bits >> 4) & 1) != 0) + } + #[doc = "Bit 5 - Subregion 5 in region n (write '1' to clear)"] + #[inline(always)] + pub fn sr5(&self) -> SR5_R { + SR5_R::new(((self.bits >> 5) & 1) != 0) + } + #[doc = "Bit 6 - Subregion 6 in region n (write '1' to clear)"] + #[inline(always)] + pub fn sr6(&self) -> SR6_R { + SR6_R::new(((self.bits >> 6) & 1) != 0) + } + #[doc = "Bit 7 - Subregion 7 in region n (write '1' to clear)"] + #[inline(always)] + pub fn sr7(&self) -> SR7_R { + SR7_R::new(((self.bits >> 7) & 1) != 0) + } + #[doc = "Bit 8 - Subregion 8 in region n (write '1' to clear)"] + #[inline(always)] + pub fn sr8(&self) -> SR8_R { + SR8_R::new(((self.bits >> 8) & 1) != 0) + } + #[doc = "Bit 9 - Subregion 9 in region n (write '1' to clear)"] + #[inline(always)] + pub fn sr9(&self) -> SR9_R { + SR9_R::new(((self.bits >> 9) & 1) != 0) + } + #[doc = "Bit 10 - Subregion 10 in region n (write '1' to clear)"] + #[inline(always)] + pub fn sr10(&self) -> SR10_R { + SR10_R::new(((self.bits >> 10) & 1) != 0) + } + #[doc = "Bit 11 - Subregion 11 in region n (write '1' to clear)"] + #[inline(always)] + pub fn sr11(&self) -> SR11_R { + SR11_R::new(((self.bits >> 11) & 1) != 0) + } + #[doc = "Bit 12 - Subregion 12 in region n (write '1' to clear)"] + #[inline(always)] + pub fn sr12(&self) -> SR12_R { + SR12_R::new(((self.bits >> 12) & 1) != 0) + } + #[doc = "Bit 13 - Subregion 13 in region n (write '1' to clear)"] + #[inline(always)] + pub fn sr13(&self) -> SR13_R { + SR13_R::new(((self.bits >> 13) & 1) != 0) + } + #[doc = "Bit 14 - Subregion 14 in region n (write '1' to clear)"] + #[inline(always)] + pub fn sr14(&self) -> SR14_R { + SR14_R::new(((self.bits >> 14) & 1) != 0) + } + #[doc = "Bit 15 - Subregion 15 in region n (write '1' to clear)"] + #[inline(always)] + pub fn sr15(&self) -> SR15_R { + SR15_R::new(((self.bits >> 15) & 1) != 0) + } + #[doc = "Bit 16 - Subregion 16 in region n (write '1' to clear)"] + #[inline(always)] + pub fn sr16(&self) -> SR16_R { + SR16_R::new(((self.bits >> 16) & 1) != 0) + } + #[doc = "Bit 17 - Subregion 17 in region n (write '1' to clear)"] + #[inline(always)] + pub fn sr17(&self) -> SR17_R { + SR17_R::new(((self.bits >> 17) & 1) != 0) + } + #[doc = "Bit 18 - Subregion 18 in region n (write '1' to clear)"] + #[inline(always)] + pub fn sr18(&self) -> SR18_R { + SR18_R::new(((self.bits >> 18) & 1) != 0) + } + #[doc = "Bit 19 - Subregion 19 in region n (write '1' to clear)"] + #[inline(always)] + pub fn sr19(&self) -> SR19_R { + SR19_R::new(((self.bits >> 19) & 1) != 0) + } + #[doc = "Bit 20 - Subregion 20 in region n (write '1' to clear)"] + #[inline(always)] + pub fn sr20(&self) -> SR20_R { + SR20_R::new(((self.bits >> 20) & 1) != 0) + } + #[doc = "Bit 21 - Subregion 21 in region n (write '1' to clear)"] + #[inline(always)] + pub fn sr21(&self) -> SR21_R { + SR21_R::new(((self.bits >> 21) & 1) != 0) + } + #[doc = "Bit 22 - Subregion 22 in region n (write '1' to clear)"] + #[inline(always)] + pub fn sr22(&self) -> SR22_R { + SR22_R::new(((self.bits >> 22) & 1) != 0) + } + #[doc = "Bit 23 - Subregion 23 in region n (write '1' to clear)"] + #[inline(always)] + pub fn sr23(&self) -> SR23_R { + SR23_R::new(((self.bits >> 23) & 1) != 0) + } + #[doc = "Bit 24 - Subregion 24 in region n (write '1' to clear)"] + #[inline(always)] + pub fn sr24(&self) -> SR24_R { + SR24_R::new(((self.bits >> 24) & 1) != 0) + } + #[doc = "Bit 25 - Subregion 25 in region n (write '1' to clear)"] + #[inline(always)] + pub fn sr25(&self) -> SR25_R { + SR25_R::new(((self.bits >> 25) & 1) != 0) + } + #[doc = "Bit 26 - Subregion 26 in region n (write '1' to clear)"] + #[inline(always)] + pub fn sr26(&self) -> SR26_R { + SR26_R::new(((self.bits >> 26) & 1) != 0) + } + #[doc = "Bit 27 - Subregion 27 in region n (write '1' to clear)"] + #[inline(always)] + pub fn sr27(&self) -> SR27_R { + SR27_R::new(((self.bits >> 27) & 1) != 0) + } + #[doc = "Bit 28 - Subregion 28 in region n (write '1' to clear)"] + #[inline(always)] + pub fn sr28(&self) -> SR28_R { + SR28_R::new(((self.bits >> 28) & 1) != 0) + } + #[doc = "Bit 29 - Subregion 29 in region n (write '1' to clear)"] + #[inline(always)] + pub fn sr29(&self) -> SR29_R { + SR29_R::new(((self.bits >> 29) & 1) != 0) + } + #[doc = "Bit 30 - Subregion 30 in region n (write '1' to clear)"] + #[inline(always)] + pub fn sr30(&self) -> SR30_R { + SR30_R::new(((self.bits >> 30) & 1) != 0) + } + #[doc = "Bit 31 - Subregion 31 in region n (write '1' to clear)"] + #[inline(always)] + pub fn sr31(&self) -> SR31_R { + SR31_R::new(((self.bits >> 31) & 1) != 0) + } +} +impl W { + #[doc = "Bit 0 - Subregion 0 in region n (write '1' to clear)"] + #[inline(always)] + #[must_use] + pub fn sr0(&mut self) -> SR0_W<0> { + SR0_W::new(self) + } + #[doc = "Bit 1 - Subregion 1 in region n (write '1' to clear)"] + #[inline(always)] + #[must_use] + pub fn sr1(&mut self) -> SR1_W<1> { + SR1_W::new(self) + } + #[doc = "Bit 2 - Subregion 2 in region n (write '1' to clear)"] + #[inline(always)] + #[must_use] + pub fn sr2(&mut self) -> SR2_W<2> { + SR2_W::new(self) + } + #[doc = "Bit 3 - Subregion 3 in region n (write '1' to clear)"] + #[inline(always)] + #[must_use] + pub fn sr3(&mut self) -> SR3_W<3> { + SR3_W::new(self) + } + #[doc = "Bit 4 - Subregion 4 in region n (write '1' to clear)"] + #[inline(always)] + #[must_use] + pub fn sr4(&mut self) -> SR4_W<4> { + SR4_W::new(self) + } + #[doc = "Bit 5 - Subregion 5 in region n (write '1' to clear)"] + #[inline(always)] + #[must_use] + pub fn sr5(&mut self) -> SR5_W<5> { + SR5_W::new(self) + } + #[doc = "Bit 6 - Subregion 6 in region n (write '1' to clear)"] + #[inline(always)] + #[must_use] + pub fn sr6(&mut self) -> SR6_W<6> { + SR6_W::new(self) + } + #[doc = "Bit 7 - Subregion 7 in region n (write '1' to clear)"] + #[inline(always)] + #[must_use] + pub fn sr7(&mut self) -> SR7_W<7> { + SR7_W::new(self) + } + #[doc = "Bit 8 - Subregion 8 in region n (write '1' to clear)"] + #[inline(always)] + #[must_use] + pub fn sr8(&mut self) -> SR8_W<8> { + SR8_W::new(self) + } + #[doc = "Bit 9 - Subregion 9 in region n (write '1' to clear)"] + #[inline(always)] + #[must_use] + pub fn sr9(&mut self) -> SR9_W<9> { + SR9_W::new(self) + } + #[doc = "Bit 10 - Subregion 10 in region n (write '1' to clear)"] + #[inline(always)] + #[must_use] + pub fn sr10(&mut self) -> SR10_W<10> { + SR10_W::new(self) + } + #[doc = "Bit 11 - Subregion 11 in region n (write '1' to clear)"] + #[inline(always)] + #[must_use] + pub fn sr11(&mut self) -> SR11_W<11> { + SR11_W::new(self) + } + #[doc = "Bit 12 - Subregion 12 in region n (write '1' to clear)"] + #[inline(always)] + #[must_use] + pub fn sr12(&mut self) -> SR12_W<12> { + SR12_W::new(self) + } + #[doc = "Bit 13 - Subregion 13 in region n (write '1' to clear)"] + #[inline(always)] + #[must_use] + pub fn sr13(&mut self) -> SR13_W<13> { + SR13_W::new(self) + } + #[doc = "Bit 14 - Subregion 14 in region n (write '1' to clear)"] + #[inline(always)] + #[must_use] + pub fn sr14(&mut self) -> SR14_W<14> { + SR14_W::new(self) + } + #[doc = "Bit 15 - Subregion 15 in region n (write '1' to clear)"] + #[inline(always)] + #[must_use] + pub fn sr15(&mut self) -> SR15_W<15> { + SR15_W::new(self) + } + #[doc = "Bit 16 - Subregion 16 in region n (write '1' to clear)"] + #[inline(always)] + #[must_use] + pub fn sr16(&mut self) -> SR16_W<16> { + SR16_W::new(self) + } + #[doc = "Bit 17 - Subregion 17 in region n (write '1' to clear)"] + #[inline(always)] + #[must_use] + pub fn sr17(&mut self) -> SR17_W<17> { + SR17_W::new(self) + } + #[doc = "Bit 18 - Subregion 18 in region n (write '1' to clear)"] + #[inline(always)] + #[must_use] + pub fn sr18(&mut self) -> SR18_W<18> { + SR18_W::new(self) + } + #[doc = "Bit 19 - Subregion 19 in region n (write '1' to clear)"] + #[inline(always)] + #[must_use] + pub fn sr19(&mut self) -> SR19_W<19> { + SR19_W::new(self) + } + #[doc = "Bit 20 - Subregion 20 in region n (write '1' to clear)"] + #[inline(always)] + #[must_use] + pub fn sr20(&mut self) -> SR20_W<20> { + SR20_W::new(self) + } + #[doc = "Bit 21 - Subregion 21 in region n (write '1' to clear)"] + #[inline(always)] + #[must_use] + pub fn sr21(&mut self) -> SR21_W<21> { + SR21_W::new(self) + } + #[doc = "Bit 22 - Subregion 22 in region n (write '1' to clear)"] + #[inline(always)] + #[must_use] + pub fn sr22(&mut self) -> SR22_W<22> { + SR22_W::new(self) + } + #[doc = "Bit 23 - Subregion 23 in region n (write '1' to clear)"] + #[inline(always)] + #[must_use] + pub fn sr23(&mut self) -> SR23_W<23> { + SR23_W::new(self) + } + #[doc = "Bit 24 - Subregion 24 in region n (write '1' to clear)"] + #[inline(always)] + #[must_use] + pub fn sr24(&mut self) -> SR24_W<24> { + SR24_W::new(self) + } + #[doc = "Bit 25 - Subregion 25 in region n (write '1' to clear)"] + #[inline(always)] + #[must_use] + pub fn sr25(&mut self) -> SR25_W<25> { + SR25_W::new(self) + } + #[doc = "Bit 26 - Subregion 26 in region n (write '1' to clear)"] + #[inline(always)] + #[must_use] + pub fn sr26(&mut self) -> SR26_W<26> { + SR26_W::new(self) + } + #[doc = "Bit 27 - Subregion 27 in region n (write '1' to clear)"] + #[inline(always)] + #[must_use] + pub fn sr27(&mut self) -> SR27_W<27> { + SR27_W::new(self) + } + #[doc = "Bit 28 - Subregion 28 in region n (write '1' to clear)"] + #[inline(always)] + #[must_use] + pub fn sr28(&mut self) -> SR28_W<28> { + SR28_W::new(self) + } + #[doc = "Bit 29 - Subregion 29 in region n (write '1' to clear)"] + #[inline(always)] + #[must_use] + pub fn sr29(&mut self) -> SR29_W<29> { + SR29_W::new(self) + } + #[doc = "Bit 30 - Subregion 30 in region n (write '1' to clear)"] + #[inline(always)] + #[must_use] + pub fn sr30(&mut self) -> SR30_W<30> { + SR30_W::new(self) + } + #[doc = "Bit 31 - Subregion 31 in region n (write '1' to clear)"] + #[inline(always)] + #[must_use] + pub fn sr31(&mut self) -> SR31_W<31> { + SR31_W::new(self) + } + #[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 = "Description cluster: Source of event/interrupt in region n, read access detected while corresponding subregion was enabled for watching\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 [substatra](index.html) module"] +pub struct SUBSTATRA_SPEC; +impl crate::RegisterSpec for SUBSTATRA_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [substatra::R](R) reader structure"] +impl crate::Readable for SUBSTATRA_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [substatra::W](W) writer structure"] +impl crate::Writable for SUBSTATRA_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0xffff_ffff; +} +#[doc = "`reset()` method sets SUBSTATRA to value 0"] +impl crate::Resettable for SUBSTATRA_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/mwu/perregion/substatwa.rs b/down-the-stack/dk_pac/src/mwu/perregion/substatwa.rs new file mode 100644 index 0000000..24e50c8 --- /dev/null +++ b/down-the-stack/dk_pac/src/mwu/perregion/substatwa.rs @@ -0,0 +1,2017 @@ +#[doc = "Register `SUBSTATWA` 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 `SUBSTATWA` 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 `SR0` reader - Subregion 0 in region n (write '1' to clear)"] +pub type SR0_R = crate::BitReader; +#[doc = "Subregion 0 in region n (write '1' to clear)\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum SR0_A { + #[doc = "0: No write access occurred in this subregion"] + NO_ACCESS = 0, + #[doc = "1: Write access(es) occurred in this subregion"] + ACCESS = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: SR0_A) -> Self { + variant as u8 != 0 + } +} +impl SR0_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> SR0_A { + match self.bits { + false => SR0_A::NO_ACCESS, + true => SR0_A::ACCESS, + } + } + #[doc = "Checks if the value of the field is `NO_ACCESS`"] + #[inline(always)] + pub fn is_no_access(&self) -> bool { + *self == SR0_A::NO_ACCESS + } + #[doc = "Checks if the value of the field is `ACCESS`"] + #[inline(always)] + pub fn is_access(&self) -> bool { + *self == SR0_A::ACCESS + } +} +#[doc = "Field `SR0` writer - Subregion 0 in region n (write '1' to clear)"] +pub type SR0_W<'a, const O: u8> = crate::BitWriter1C<'a, u32, SUBSTATWA_SPEC, SR0_A, O>; +impl<'a, const O: u8> SR0_W<'a, O> { + #[doc = "No write access occurred in this subregion"] + #[inline(always)] + pub fn no_access(self) -> &'a mut W { + self.variant(SR0_A::NO_ACCESS) + } + #[doc = "Write access(es) occurred in this subregion"] + #[inline(always)] + pub fn access(self) -> &'a mut W { + self.variant(SR0_A::ACCESS) + } +} +#[doc = "Field `SR1` reader - Subregion 1 in region n (write '1' to clear)"] +pub type SR1_R = crate::BitReader; +#[doc = "Subregion 1 in region n (write '1' to clear)\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum SR1_A { + #[doc = "0: No write access occurred in this subregion"] + NO_ACCESS = 0, + #[doc = "1: Write access(es) occurred in this subregion"] + ACCESS = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: SR1_A) -> Self { + variant as u8 != 0 + } +} +impl SR1_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> SR1_A { + match self.bits { + false => SR1_A::NO_ACCESS, + true => SR1_A::ACCESS, + } + } + #[doc = "Checks if the value of the field is `NO_ACCESS`"] + #[inline(always)] + pub fn is_no_access(&self) -> bool { + *self == SR1_A::NO_ACCESS + } + #[doc = "Checks if the value of the field is `ACCESS`"] + #[inline(always)] + pub fn is_access(&self) -> bool { + *self == SR1_A::ACCESS + } +} +#[doc = "Field `SR1` writer - Subregion 1 in region n (write '1' to clear)"] +pub type SR1_W<'a, const O: u8> = crate::BitWriter1C<'a, u32, SUBSTATWA_SPEC, SR1_A, O>; +impl<'a, const O: u8> SR1_W<'a, O> { + #[doc = "No write access occurred in this subregion"] + #[inline(always)] + pub fn no_access(self) -> &'a mut W { + self.variant(SR1_A::NO_ACCESS) + } + #[doc = "Write access(es) occurred in this subregion"] + #[inline(always)] + pub fn access(self) -> &'a mut W { + self.variant(SR1_A::ACCESS) + } +} +#[doc = "Field `SR2` reader - Subregion 2 in region n (write '1' to clear)"] +pub type SR2_R = crate::BitReader; +#[doc = "Subregion 2 in region n (write '1' to clear)\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum SR2_A { + #[doc = "0: No write access occurred in this subregion"] + NO_ACCESS = 0, + #[doc = "1: Write access(es) occurred in this subregion"] + ACCESS = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: SR2_A) -> Self { + variant as u8 != 0 + } +} +impl SR2_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> SR2_A { + match self.bits { + false => SR2_A::NO_ACCESS, + true => SR2_A::ACCESS, + } + } + #[doc = "Checks if the value of the field is `NO_ACCESS`"] + #[inline(always)] + pub fn is_no_access(&self) -> bool { + *self == SR2_A::NO_ACCESS + } + #[doc = "Checks if the value of the field is `ACCESS`"] + #[inline(always)] + pub fn is_access(&self) -> bool { + *self == SR2_A::ACCESS + } +} +#[doc = "Field `SR2` writer - Subregion 2 in region n (write '1' to clear)"] +pub type SR2_W<'a, const O: u8> = crate::BitWriter1C<'a, u32, SUBSTATWA_SPEC, SR2_A, O>; +impl<'a, const O: u8> SR2_W<'a, O> { + #[doc = "No write access occurred in this subregion"] + #[inline(always)] + pub fn no_access(self) -> &'a mut W { + self.variant(SR2_A::NO_ACCESS) + } + #[doc = "Write access(es) occurred in this subregion"] + #[inline(always)] + pub fn access(self) -> &'a mut W { + self.variant(SR2_A::ACCESS) + } +} +#[doc = "Field `SR3` reader - Subregion 3 in region n (write '1' to clear)"] +pub type SR3_R = crate::BitReader; +#[doc = "Subregion 3 in region n (write '1' to clear)\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum SR3_A { + #[doc = "0: No write access occurred in this subregion"] + NO_ACCESS = 0, + #[doc = "1: Write access(es) occurred in this subregion"] + ACCESS = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: SR3_A) -> Self { + variant as u8 != 0 + } +} +impl SR3_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> SR3_A { + match self.bits { + false => SR3_A::NO_ACCESS, + true => SR3_A::ACCESS, + } + } + #[doc = "Checks if the value of the field is `NO_ACCESS`"] + #[inline(always)] + pub fn is_no_access(&self) -> bool { + *self == SR3_A::NO_ACCESS + } + #[doc = "Checks if the value of the field is `ACCESS`"] + #[inline(always)] + pub fn is_access(&self) -> bool { + *self == SR3_A::ACCESS + } +} +#[doc = "Field `SR3` writer - Subregion 3 in region n (write '1' to clear)"] +pub type SR3_W<'a, const O: u8> = crate::BitWriter1C<'a, u32, SUBSTATWA_SPEC, SR3_A, O>; +impl<'a, const O: u8> SR3_W<'a, O> { + #[doc = "No write access occurred in this subregion"] + #[inline(always)] + pub fn no_access(self) -> &'a mut W { + self.variant(SR3_A::NO_ACCESS) + } + #[doc = "Write access(es) occurred in this subregion"] + #[inline(always)] + pub fn access(self) -> &'a mut W { + self.variant(SR3_A::ACCESS) + } +} +#[doc = "Field `SR4` reader - Subregion 4 in region n (write '1' to clear)"] +pub type SR4_R = crate::BitReader; +#[doc = "Subregion 4 in region n (write '1' to clear)\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum SR4_A { + #[doc = "0: No write access occurred in this subregion"] + NO_ACCESS = 0, + #[doc = "1: Write access(es) occurred in this subregion"] + ACCESS = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: SR4_A) -> Self { + variant as u8 != 0 + } +} +impl SR4_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> SR4_A { + match self.bits { + false => SR4_A::NO_ACCESS, + true => SR4_A::ACCESS, + } + } + #[doc = "Checks if the value of the field is `NO_ACCESS`"] + #[inline(always)] + pub fn is_no_access(&self) -> bool { + *self == SR4_A::NO_ACCESS + } + #[doc = "Checks if the value of the field is `ACCESS`"] + #[inline(always)] + pub fn is_access(&self) -> bool { + *self == SR4_A::ACCESS + } +} +#[doc = "Field `SR4` writer - Subregion 4 in region n (write '1' to clear)"] +pub type SR4_W<'a, const O: u8> = crate::BitWriter1C<'a, u32, SUBSTATWA_SPEC, SR4_A, O>; +impl<'a, const O: u8> SR4_W<'a, O> { + #[doc = "No write access occurred in this subregion"] + #[inline(always)] + pub fn no_access(self) -> &'a mut W { + self.variant(SR4_A::NO_ACCESS) + } + #[doc = "Write access(es) occurred in this subregion"] + #[inline(always)] + pub fn access(self) -> &'a mut W { + self.variant(SR4_A::ACCESS) + } +} +#[doc = "Field `SR5` reader - Subregion 5 in region n (write '1' to clear)"] +pub type SR5_R = crate::BitReader; +#[doc = "Subregion 5 in region n (write '1' to clear)\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum SR5_A { + #[doc = "0: No write access occurred in this subregion"] + NO_ACCESS = 0, + #[doc = "1: Write access(es) occurred in this subregion"] + ACCESS = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: SR5_A) -> Self { + variant as u8 != 0 + } +} +impl SR5_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> SR5_A { + match self.bits { + false => SR5_A::NO_ACCESS, + true => SR5_A::ACCESS, + } + } + #[doc = "Checks if the value of the field is `NO_ACCESS`"] + #[inline(always)] + pub fn is_no_access(&self) -> bool { + *self == SR5_A::NO_ACCESS + } + #[doc = "Checks if the value of the field is `ACCESS`"] + #[inline(always)] + pub fn is_access(&self) -> bool { + *self == SR5_A::ACCESS + } +} +#[doc = "Field `SR5` writer - Subregion 5 in region n (write '1' to clear)"] +pub type SR5_W<'a, const O: u8> = crate::BitWriter1C<'a, u32, SUBSTATWA_SPEC, SR5_A, O>; +impl<'a, const O: u8> SR5_W<'a, O> { + #[doc = "No write access occurred in this subregion"] + #[inline(always)] + pub fn no_access(self) -> &'a mut W { + self.variant(SR5_A::NO_ACCESS) + } + #[doc = "Write access(es) occurred in this subregion"] + #[inline(always)] + pub fn access(self) -> &'a mut W { + self.variant(SR5_A::ACCESS) + } +} +#[doc = "Field `SR6` reader - Subregion 6 in region n (write '1' to clear)"] +pub type SR6_R = crate::BitReader; +#[doc = "Subregion 6 in region n (write '1' to clear)\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum SR6_A { + #[doc = "0: No write access occurred in this subregion"] + NO_ACCESS = 0, + #[doc = "1: Write access(es) occurred in this subregion"] + ACCESS = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: SR6_A) -> Self { + variant as u8 != 0 + } +} +impl SR6_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> SR6_A { + match self.bits { + false => SR6_A::NO_ACCESS, + true => SR6_A::ACCESS, + } + } + #[doc = "Checks if the value of the field is `NO_ACCESS`"] + #[inline(always)] + pub fn is_no_access(&self) -> bool { + *self == SR6_A::NO_ACCESS + } + #[doc = "Checks if the value of the field is `ACCESS`"] + #[inline(always)] + pub fn is_access(&self) -> bool { + *self == SR6_A::ACCESS + } +} +#[doc = "Field `SR6` writer - Subregion 6 in region n (write '1' to clear)"] +pub type SR6_W<'a, const O: u8> = crate::BitWriter1C<'a, u32, SUBSTATWA_SPEC, SR6_A, O>; +impl<'a, const O: u8> SR6_W<'a, O> { + #[doc = "No write access occurred in this subregion"] + #[inline(always)] + pub fn no_access(self) -> &'a mut W { + self.variant(SR6_A::NO_ACCESS) + } + #[doc = "Write access(es) occurred in this subregion"] + #[inline(always)] + pub fn access(self) -> &'a mut W { + self.variant(SR6_A::ACCESS) + } +} +#[doc = "Field `SR7` reader - Subregion 7 in region n (write '1' to clear)"] +pub type SR7_R = crate::BitReader; +#[doc = "Subregion 7 in region n (write '1' to clear)\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum SR7_A { + #[doc = "0: No write access occurred in this subregion"] + NO_ACCESS = 0, + #[doc = "1: Write access(es) occurred in this subregion"] + ACCESS = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: SR7_A) -> Self { + variant as u8 != 0 + } +} +impl SR7_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> SR7_A { + match self.bits { + false => SR7_A::NO_ACCESS, + true => SR7_A::ACCESS, + } + } + #[doc = "Checks if the value of the field is `NO_ACCESS`"] + #[inline(always)] + pub fn is_no_access(&self) -> bool { + *self == SR7_A::NO_ACCESS + } + #[doc = "Checks if the value of the field is `ACCESS`"] + #[inline(always)] + pub fn is_access(&self) -> bool { + *self == SR7_A::ACCESS + } +} +#[doc = "Field `SR7` writer - Subregion 7 in region n (write '1' to clear)"] +pub type SR7_W<'a, const O: u8> = crate::BitWriter1C<'a, u32, SUBSTATWA_SPEC, SR7_A, O>; +impl<'a, const O: u8> SR7_W<'a, O> { + #[doc = "No write access occurred in this subregion"] + #[inline(always)] + pub fn no_access(self) -> &'a mut W { + self.variant(SR7_A::NO_ACCESS) + } + #[doc = "Write access(es) occurred in this subregion"] + #[inline(always)] + pub fn access(self) -> &'a mut W { + self.variant(SR7_A::ACCESS) + } +} +#[doc = "Field `SR8` reader - Subregion 8 in region n (write '1' to clear)"] +pub type SR8_R = crate::BitReader; +#[doc = "Subregion 8 in region n (write '1' to clear)\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum SR8_A { + #[doc = "0: No write access occurred in this subregion"] + NO_ACCESS = 0, + #[doc = "1: Write access(es) occurred in this subregion"] + ACCESS = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: SR8_A) -> Self { + variant as u8 != 0 + } +} +impl SR8_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> SR8_A { + match self.bits { + false => SR8_A::NO_ACCESS, + true => SR8_A::ACCESS, + } + } + #[doc = "Checks if the value of the field is `NO_ACCESS`"] + #[inline(always)] + pub fn is_no_access(&self) -> bool { + *self == SR8_A::NO_ACCESS + } + #[doc = "Checks if the value of the field is `ACCESS`"] + #[inline(always)] + pub fn is_access(&self) -> bool { + *self == SR8_A::ACCESS + } +} +#[doc = "Field `SR8` writer - Subregion 8 in region n (write '1' to clear)"] +pub type SR8_W<'a, const O: u8> = crate::BitWriter1C<'a, u32, SUBSTATWA_SPEC, SR8_A, O>; +impl<'a, const O: u8> SR8_W<'a, O> { + #[doc = "No write access occurred in this subregion"] + #[inline(always)] + pub fn no_access(self) -> &'a mut W { + self.variant(SR8_A::NO_ACCESS) + } + #[doc = "Write access(es) occurred in this subregion"] + #[inline(always)] + pub fn access(self) -> &'a mut W { + self.variant(SR8_A::ACCESS) + } +} +#[doc = "Field `SR9` reader - Subregion 9 in region n (write '1' to clear)"] +pub type SR9_R = crate::BitReader; +#[doc = "Subregion 9 in region n (write '1' to clear)\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum SR9_A { + #[doc = "0: No write access occurred in this subregion"] + NO_ACCESS = 0, + #[doc = "1: Write access(es) occurred in this subregion"] + ACCESS = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: SR9_A) -> Self { + variant as u8 != 0 + } +} +impl SR9_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> SR9_A { + match self.bits { + false => SR9_A::NO_ACCESS, + true => SR9_A::ACCESS, + } + } + #[doc = "Checks if the value of the field is `NO_ACCESS`"] + #[inline(always)] + pub fn is_no_access(&self) -> bool { + *self == SR9_A::NO_ACCESS + } + #[doc = "Checks if the value of the field is `ACCESS`"] + #[inline(always)] + pub fn is_access(&self) -> bool { + *self == SR9_A::ACCESS + } +} +#[doc = "Field `SR9` writer - Subregion 9 in region n (write '1' to clear)"] +pub type SR9_W<'a, const O: u8> = crate::BitWriter1C<'a, u32, SUBSTATWA_SPEC, SR9_A, O>; +impl<'a, const O: u8> SR9_W<'a, O> { + #[doc = "No write access occurred in this subregion"] + #[inline(always)] + pub fn no_access(self) -> &'a mut W { + self.variant(SR9_A::NO_ACCESS) + } + #[doc = "Write access(es) occurred in this subregion"] + #[inline(always)] + pub fn access(self) -> &'a mut W { + self.variant(SR9_A::ACCESS) + } +} +#[doc = "Field `SR10` reader - Subregion 10 in region n (write '1' to clear)"] +pub type SR10_R = crate::BitReader; +#[doc = "Subregion 10 in region n (write '1' to clear)\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum SR10_A { + #[doc = "0: No write access occurred in this subregion"] + NO_ACCESS = 0, + #[doc = "1: Write access(es) occurred in this subregion"] + ACCESS = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: SR10_A) -> Self { + variant as u8 != 0 + } +} +impl SR10_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> SR10_A { + match self.bits { + false => SR10_A::NO_ACCESS, + true => SR10_A::ACCESS, + } + } + #[doc = "Checks if the value of the field is `NO_ACCESS`"] + #[inline(always)] + pub fn is_no_access(&self) -> bool { + *self == SR10_A::NO_ACCESS + } + #[doc = "Checks if the value of the field is `ACCESS`"] + #[inline(always)] + pub fn is_access(&self) -> bool { + *self == SR10_A::ACCESS + } +} +#[doc = "Field `SR10` writer - Subregion 10 in region n (write '1' to clear)"] +pub type SR10_W<'a, const O: u8> = crate::BitWriter1C<'a, u32, SUBSTATWA_SPEC, SR10_A, O>; +impl<'a, const O: u8> SR10_W<'a, O> { + #[doc = "No write access occurred in this subregion"] + #[inline(always)] + pub fn no_access(self) -> &'a mut W { + self.variant(SR10_A::NO_ACCESS) + } + #[doc = "Write access(es) occurred in this subregion"] + #[inline(always)] + pub fn access(self) -> &'a mut W { + self.variant(SR10_A::ACCESS) + } +} +#[doc = "Field `SR11` reader - Subregion 11 in region n (write '1' to clear)"] +pub type SR11_R = crate::BitReader; +#[doc = "Subregion 11 in region n (write '1' to clear)\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum SR11_A { + #[doc = "0: No write access occurred in this subregion"] + NO_ACCESS = 0, + #[doc = "1: Write access(es) occurred in this subregion"] + ACCESS = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: SR11_A) -> Self { + variant as u8 != 0 + } +} +impl SR11_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> SR11_A { + match self.bits { + false => SR11_A::NO_ACCESS, + true => SR11_A::ACCESS, + } + } + #[doc = "Checks if the value of the field is `NO_ACCESS`"] + #[inline(always)] + pub fn is_no_access(&self) -> bool { + *self == SR11_A::NO_ACCESS + } + #[doc = "Checks if the value of the field is `ACCESS`"] + #[inline(always)] + pub fn is_access(&self) -> bool { + *self == SR11_A::ACCESS + } +} +#[doc = "Field `SR11` writer - Subregion 11 in region n (write '1' to clear)"] +pub type SR11_W<'a, const O: u8> = crate::BitWriter1C<'a, u32, SUBSTATWA_SPEC, SR11_A, O>; +impl<'a, const O: u8> SR11_W<'a, O> { + #[doc = "No write access occurred in this subregion"] + #[inline(always)] + pub fn no_access(self) -> &'a mut W { + self.variant(SR11_A::NO_ACCESS) + } + #[doc = "Write access(es) occurred in this subregion"] + #[inline(always)] + pub fn access(self) -> &'a mut W { + self.variant(SR11_A::ACCESS) + } +} +#[doc = "Field `SR12` reader - Subregion 12 in region n (write '1' to clear)"] +pub type SR12_R = crate::BitReader; +#[doc = "Subregion 12 in region n (write '1' to clear)\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum SR12_A { + #[doc = "0: No write access occurred in this subregion"] + NO_ACCESS = 0, + #[doc = "1: Write access(es) occurred in this subregion"] + ACCESS = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: SR12_A) -> Self { + variant as u8 != 0 + } +} +impl SR12_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> SR12_A { + match self.bits { + false => SR12_A::NO_ACCESS, + true => SR12_A::ACCESS, + } + } + #[doc = "Checks if the value of the field is `NO_ACCESS`"] + #[inline(always)] + pub fn is_no_access(&self) -> bool { + *self == SR12_A::NO_ACCESS + } + #[doc = "Checks if the value of the field is `ACCESS`"] + #[inline(always)] + pub fn is_access(&self) -> bool { + *self == SR12_A::ACCESS + } +} +#[doc = "Field `SR12` writer - Subregion 12 in region n (write '1' to clear)"] +pub type SR12_W<'a, const O: u8> = crate::BitWriter1C<'a, u32, SUBSTATWA_SPEC, SR12_A, O>; +impl<'a, const O: u8> SR12_W<'a, O> { + #[doc = "No write access occurred in this subregion"] + #[inline(always)] + pub fn no_access(self) -> &'a mut W { + self.variant(SR12_A::NO_ACCESS) + } + #[doc = "Write access(es) occurred in this subregion"] + #[inline(always)] + pub fn access(self) -> &'a mut W { + self.variant(SR12_A::ACCESS) + } +} +#[doc = "Field `SR13` reader - Subregion 13 in region n (write '1' to clear)"] +pub type SR13_R = crate::BitReader; +#[doc = "Subregion 13 in region n (write '1' to clear)\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum SR13_A { + #[doc = "0: No write access occurred in this subregion"] + NO_ACCESS = 0, + #[doc = "1: Write access(es) occurred in this subregion"] + ACCESS = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: SR13_A) -> Self { + variant as u8 != 0 + } +} +impl SR13_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> SR13_A { + match self.bits { + false => SR13_A::NO_ACCESS, + true => SR13_A::ACCESS, + } + } + #[doc = "Checks if the value of the field is `NO_ACCESS`"] + #[inline(always)] + pub fn is_no_access(&self) -> bool { + *self == SR13_A::NO_ACCESS + } + #[doc = "Checks if the value of the field is `ACCESS`"] + #[inline(always)] + pub fn is_access(&self) -> bool { + *self == SR13_A::ACCESS + } +} +#[doc = "Field `SR13` writer - Subregion 13 in region n (write '1' to clear)"] +pub type SR13_W<'a, const O: u8> = crate::BitWriter1C<'a, u32, SUBSTATWA_SPEC, SR13_A, O>; +impl<'a, const O: u8> SR13_W<'a, O> { + #[doc = "No write access occurred in this subregion"] + #[inline(always)] + pub fn no_access(self) -> &'a mut W { + self.variant(SR13_A::NO_ACCESS) + } + #[doc = "Write access(es) occurred in this subregion"] + #[inline(always)] + pub fn access(self) -> &'a mut W { + self.variant(SR13_A::ACCESS) + } +} +#[doc = "Field `SR14` reader - Subregion 14 in region n (write '1' to clear)"] +pub type SR14_R = crate::BitReader; +#[doc = "Subregion 14 in region n (write '1' to clear)\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum SR14_A { + #[doc = "0: No write access occurred in this subregion"] + NO_ACCESS = 0, + #[doc = "1: Write access(es) occurred in this subregion"] + ACCESS = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: SR14_A) -> Self { + variant as u8 != 0 + } +} +impl SR14_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> SR14_A { + match self.bits { + false => SR14_A::NO_ACCESS, + true => SR14_A::ACCESS, + } + } + #[doc = "Checks if the value of the field is `NO_ACCESS`"] + #[inline(always)] + pub fn is_no_access(&self) -> bool { + *self == SR14_A::NO_ACCESS + } + #[doc = "Checks if the value of the field is `ACCESS`"] + #[inline(always)] + pub fn is_access(&self) -> bool { + *self == SR14_A::ACCESS + } +} +#[doc = "Field `SR14` writer - Subregion 14 in region n (write '1' to clear)"] +pub type SR14_W<'a, const O: u8> = crate::BitWriter1C<'a, u32, SUBSTATWA_SPEC, SR14_A, O>; +impl<'a, const O: u8> SR14_W<'a, O> { + #[doc = "No write access occurred in this subregion"] + #[inline(always)] + pub fn no_access(self) -> &'a mut W { + self.variant(SR14_A::NO_ACCESS) + } + #[doc = "Write access(es) occurred in this subregion"] + #[inline(always)] + pub fn access(self) -> &'a mut W { + self.variant(SR14_A::ACCESS) + } +} +#[doc = "Field `SR15` reader - Subregion 15 in region n (write '1' to clear)"] +pub type SR15_R = crate::BitReader; +#[doc = "Subregion 15 in region n (write '1' to clear)\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum SR15_A { + #[doc = "0: No write access occurred in this subregion"] + NO_ACCESS = 0, + #[doc = "1: Write access(es) occurred in this subregion"] + ACCESS = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: SR15_A) -> Self { + variant as u8 != 0 + } +} +impl SR15_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> SR15_A { + match self.bits { + false => SR15_A::NO_ACCESS, + true => SR15_A::ACCESS, + } + } + #[doc = "Checks if the value of the field is `NO_ACCESS`"] + #[inline(always)] + pub fn is_no_access(&self) -> bool { + *self == SR15_A::NO_ACCESS + } + #[doc = "Checks if the value of the field is `ACCESS`"] + #[inline(always)] + pub fn is_access(&self) -> bool { + *self == SR15_A::ACCESS + } +} +#[doc = "Field `SR15` writer - Subregion 15 in region n (write '1' to clear)"] +pub type SR15_W<'a, const O: u8> = crate::BitWriter1C<'a, u32, SUBSTATWA_SPEC, SR15_A, O>; +impl<'a, const O: u8> SR15_W<'a, O> { + #[doc = "No write access occurred in this subregion"] + #[inline(always)] + pub fn no_access(self) -> &'a mut W { + self.variant(SR15_A::NO_ACCESS) + } + #[doc = "Write access(es) occurred in this subregion"] + #[inline(always)] + pub fn access(self) -> &'a mut W { + self.variant(SR15_A::ACCESS) + } +} +#[doc = "Field `SR16` reader - Subregion 16 in region n (write '1' to clear)"] +pub type SR16_R = crate::BitReader; +#[doc = "Subregion 16 in region n (write '1' to clear)\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum SR16_A { + #[doc = "0: No write access occurred in this subregion"] + NO_ACCESS = 0, + #[doc = "1: Write access(es) occurred in this subregion"] + ACCESS = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: SR16_A) -> Self { + variant as u8 != 0 + } +} +impl SR16_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> SR16_A { + match self.bits { + false => SR16_A::NO_ACCESS, + true => SR16_A::ACCESS, + } + } + #[doc = "Checks if the value of the field is `NO_ACCESS`"] + #[inline(always)] + pub fn is_no_access(&self) -> bool { + *self == SR16_A::NO_ACCESS + } + #[doc = "Checks if the value of the field is `ACCESS`"] + #[inline(always)] + pub fn is_access(&self) -> bool { + *self == SR16_A::ACCESS + } +} +#[doc = "Field `SR16` writer - Subregion 16 in region n (write '1' to clear)"] +pub type SR16_W<'a, const O: u8> = crate::BitWriter1C<'a, u32, SUBSTATWA_SPEC, SR16_A, O>; +impl<'a, const O: u8> SR16_W<'a, O> { + #[doc = "No write access occurred in this subregion"] + #[inline(always)] + pub fn no_access(self) -> &'a mut W { + self.variant(SR16_A::NO_ACCESS) + } + #[doc = "Write access(es) occurred in this subregion"] + #[inline(always)] + pub fn access(self) -> &'a mut W { + self.variant(SR16_A::ACCESS) + } +} +#[doc = "Field `SR17` reader - Subregion 17 in region n (write '1' to clear)"] +pub type SR17_R = crate::BitReader; +#[doc = "Subregion 17 in region n (write '1' to clear)\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum SR17_A { + #[doc = "0: No write access occurred in this subregion"] + NO_ACCESS = 0, + #[doc = "1: Write access(es) occurred in this subregion"] + ACCESS = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: SR17_A) -> Self { + variant as u8 != 0 + } +} +impl SR17_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> SR17_A { + match self.bits { + false => SR17_A::NO_ACCESS, + true => SR17_A::ACCESS, + } + } + #[doc = "Checks if the value of the field is `NO_ACCESS`"] + #[inline(always)] + pub fn is_no_access(&self) -> bool { + *self == SR17_A::NO_ACCESS + } + #[doc = "Checks if the value of the field is `ACCESS`"] + #[inline(always)] + pub fn is_access(&self) -> bool { + *self == SR17_A::ACCESS + } +} +#[doc = "Field `SR17` writer - Subregion 17 in region n (write '1' to clear)"] +pub type SR17_W<'a, const O: u8> = crate::BitWriter1C<'a, u32, SUBSTATWA_SPEC, SR17_A, O>; +impl<'a, const O: u8> SR17_W<'a, O> { + #[doc = "No write access occurred in this subregion"] + #[inline(always)] + pub fn no_access(self) -> &'a mut W { + self.variant(SR17_A::NO_ACCESS) + } + #[doc = "Write access(es) occurred in this subregion"] + #[inline(always)] + pub fn access(self) -> &'a mut W { + self.variant(SR17_A::ACCESS) + } +} +#[doc = "Field `SR18` reader - Subregion 18 in region n (write '1' to clear)"] +pub type SR18_R = crate::BitReader; +#[doc = "Subregion 18 in region n (write '1' to clear)\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum SR18_A { + #[doc = "0: No write access occurred in this subregion"] + NO_ACCESS = 0, + #[doc = "1: Write access(es) occurred in this subregion"] + ACCESS = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: SR18_A) -> Self { + variant as u8 != 0 + } +} +impl SR18_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> SR18_A { + match self.bits { + false => SR18_A::NO_ACCESS, + true => SR18_A::ACCESS, + } + } + #[doc = "Checks if the value of the field is `NO_ACCESS`"] + #[inline(always)] + pub fn is_no_access(&self) -> bool { + *self == SR18_A::NO_ACCESS + } + #[doc = "Checks if the value of the field is `ACCESS`"] + #[inline(always)] + pub fn is_access(&self) -> bool { + *self == SR18_A::ACCESS + } +} +#[doc = "Field `SR18` writer - Subregion 18 in region n (write '1' to clear)"] +pub type SR18_W<'a, const O: u8> = crate::BitWriter1C<'a, u32, SUBSTATWA_SPEC, SR18_A, O>; +impl<'a, const O: u8> SR18_W<'a, O> { + #[doc = "No write access occurred in this subregion"] + #[inline(always)] + pub fn no_access(self) -> &'a mut W { + self.variant(SR18_A::NO_ACCESS) + } + #[doc = "Write access(es) occurred in this subregion"] + #[inline(always)] + pub fn access(self) -> &'a mut W { + self.variant(SR18_A::ACCESS) + } +} +#[doc = "Field `SR19` reader - Subregion 19 in region n (write '1' to clear)"] +pub type SR19_R = crate::BitReader; +#[doc = "Subregion 19 in region n (write '1' to clear)\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum SR19_A { + #[doc = "0: No write access occurred in this subregion"] + NO_ACCESS = 0, + #[doc = "1: Write access(es) occurred in this subregion"] + ACCESS = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: SR19_A) -> Self { + variant as u8 != 0 + } +} +impl SR19_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> SR19_A { + match self.bits { + false => SR19_A::NO_ACCESS, + true => SR19_A::ACCESS, + } + } + #[doc = "Checks if the value of the field is `NO_ACCESS`"] + #[inline(always)] + pub fn is_no_access(&self) -> bool { + *self == SR19_A::NO_ACCESS + } + #[doc = "Checks if the value of the field is `ACCESS`"] + #[inline(always)] + pub fn is_access(&self) -> bool { + *self == SR19_A::ACCESS + } +} +#[doc = "Field `SR19` writer - Subregion 19 in region n (write '1' to clear)"] +pub type SR19_W<'a, const O: u8> = crate::BitWriter1C<'a, u32, SUBSTATWA_SPEC, SR19_A, O>; +impl<'a, const O: u8> SR19_W<'a, O> { + #[doc = "No write access occurred in this subregion"] + #[inline(always)] + pub fn no_access(self) -> &'a mut W { + self.variant(SR19_A::NO_ACCESS) + } + #[doc = "Write access(es) occurred in this subregion"] + #[inline(always)] + pub fn access(self) -> &'a mut W { + self.variant(SR19_A::ACCESS) + } +} +#[doc = "Field `SR20` reader - Subregion 20 in region n (write '1' to clear)"] +pub type SR20_R = crate::BitReader; +#[doc = "Subregion 20 in region n (write '1' to clear)\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum SR20_A { + #[doc = "0: No write access occurred in this subregion"] + NO_ACCESS = 0, + #[doc = "1: Write access(es) occurred in this subregion"] + ACCESS = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: SR20_A) -> Self { + variant as u8 != 0 + } +} +impl SR20_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> SR20_A { + match self.bits { + false => SR20_A::NO_ACCESS, + true => SR20_A::ACCESS, + } + } + #[doc = "Checks if the value of the field is `NO_ACCESS`"] + #[inline(always)] + pub fn is_no_access(&self) -> bool { + *self == SR20_A::NO_ACCESS + } + #[doc = "Checks if the value of the field is `ACCESS`"] + #[inline(always)] + pub fn is_access(&self) -> bool { + *self == SR20_A::ACCESS + } +} +#[doc = "Field `SR20` writer - Subregion 20 in region n (write '1' to clear)"] +pub type SR20_W<'a, const O: u8> = crate::BitWriter1C<'a, u32, SUBSTATWA_SPEC, SR20_A, O>; +impl<'a, const O: u8> SR20_W<'a, O> { + #[doc = "No write access occurred in this subregion"] + #[inline(always)] + pub fn no_access(self) -> &'a mut W { + self.variant(SR20_A::NO_ACCESS) + } + #[doc = "Write access(es) occurred in this subregion"] + #[inline(always)] + pub fn access(self) -> &'a mut W { + self.variant(SR20_A::ACCESS) + } +} +#[doc = "Field `SR21` reader - Subregion 21 in region n (write '1' to clear)"] +pub type SR21_R = crate::BitReader; +#[doc = "Subregion 21 in region n (write '1' to clear)\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum SR21_A { + #[doc = "0: No write access occurred in this subregion"] + NO_ACCESS = 0, + #[doc = "1: Write access(es) occurred in this subregion"] + ACCESS = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: SR21_A) -> Self { + variant as u8 != 0 + } +} +impl SR21_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> SR21_A { + match self.bits { + false => SR21_A::NO_ACCESS, + true => SR21_A::ACCESS, + } + } + #[doc = "Checks if the value of the field is `NO_ACCESS`"] + #[inline(always)] + pub fn is_no_access(&self) -> bool { + *self == SR21_A::NO_ACCESS + } + #[doc = "Checks if the value of the field is `ACCESS`"] + #[inline(always)] + pub fn is_access(&self) -> bool { + *self == SR21_A::ACCESS + } +} +#[doc = "Field `SR21` writer - Subregion 21 in region n (write '1' to clear)"] +pub type SR21_W<'a, const O: u8> = crate::BitWriter1C<'a, u32, SUBSTATWA_SPEC, SR21_A, O>; +impl<'a, const O: u8> SR21_W<'a, O> { + #[doc = "No write access occurred in this subregion"] + #[inline(always)] + pub fn no_access(self) -> &'a mut W { + self.variant(SR21_A::NO_ACCESS) + } + #[doc = "Write access(es) occurred in this subregion"] + #[inline(always)] + pub fn access(self) -> &'a mut W { + self.variant(SR21_A::ACCESS) + } +} +#[doc = "Field `SR22` reader - Subregion 22 in region n (write '1' to clear)"] +pub type SR22_R = crate::BitReader; +#[doc = "Subregion 22 in region n (write '1' to clear)\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum SR22_A { + #[doc = "0: No write access occurred in this subregion"] + NO_ACCESS = 0, + #[doc = "1: Write access(es) occurred in this subregion"] + ACCESS = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: SR22_A) -> Self { + variant as u8 != 0 + } +} +impl SR22_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> SR22_A { + match self.bits { + false => SR22_A::NO_ACCESS, + true => SR22_A::ACCESS, + } + } + #[doc = "Checks if the value of the field is `NO_ACCESS`"] + #[inline(always)] + pub fn is_no_access(&self) -> bool { + *self == SR22_A::NO_ACCESS + } + #[doc = "Checks if the value of the field is `ACCESS`"] + #[inline(always)] + pub fn is_access(&self) -> bool { + *self == SR22_A::ACCESS + } +} +#[doc = "Field `SR22` writer - Subregion 22 in region n (write '1' to clear)"] +pub type SR22_W<'a, const O: u8> = crate::BitWriter1C<'a, u32, SUBSTATWA_SPEC, SR22_A, O>; +impl<'a, const O: u8> SR22_W<'a, O> { + #[doc = "No write access occurred in this subregion"] + #[inline(always)] + pub fn no_access(self) -> &'a mut W { + self.variant(SR22_A::NO_ACCESS) + } + #[doc = "Write access(es) occurred in this subregion"] + #[inline(always)] + pub fn access(self) -> &'a mut W { + self.variant(SR22_A::ACCESS) + } +} +#[doc = "Field `SR23` reader - Subregion 23 in region n (write '1' to clear)"] +pub type SR23_R = crate::BitReader; +#[doc = "Subregion 23 in region n (write '1' to clear)\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum SR23_A { + #[doc = "0: No write access occurred in this subregion"] + NO_ACCESS = 0, + #[doc = "1: Write access(es) occurred in this subregion"] + ACCESS = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: SR23_A) -> Self { + variant as u8 != 0 + } +} +impl SR23_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> SR23_A { + match self.bits { + false => SR23_A::NO_ACCESS, + true => SR23_A::ACCESS, + } + } + #[doc = "Checks if the value of the field is `NO_ACCESS`"] + #[inline(always)] + pub fn is_no_access(&self) -> bool { + *self == SR23_A::NO_ACCESS + } + #[doc = "Checks if the value of the field is `ACCESS`"] + #[inline(always)] + pub fn is_access(&self) -> bool { + *self == SR23_A::ACCESS + } +} +#[doc = "Field `SR23` writer - Subregion 23 in region n (write '1' to clear)"] +pub type SR23_W<'a, const O: u8> = crate::BitWriter1C<'a, u32, SUBSTATWA_SPEC, SR23_A, O>; +impl<'a, const O: u8> SR23_W<'a, O> { + #[doc = "No write access occurred in this subregion"] + #[inline(always)] + pub fn no_access(self) -> &'a mut W { + self.variant(SR23_A::NO_ACCESS) + } + #[doc = "Write access(es) occurred in this subregion"] + #[inline(always)] + pub fn access(self) -> &'a mut W { + self.variant(SR23_A::ACCESS) + } +} +#[doc = "Field `SR24` reader - Subregion 24 in region n (write '1' to clear)"] +pub type SR24_R = crate::BitReader; +#[doc = "Subregion 24 in region n (write '1' to clear)\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum SR24_A { + #[doc = "0: No write access occurred in this subregion"] + NO_ACCESS = 0, + #[doc = "1: Write access(es) occurred in this subregion"] + ACCESS = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: SR24_A) -> Self { + variant as u8 != 0 + } +} +impl SR24_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> SR24_A { + match self.bits { + false => SR24_A::NO_ACCESS, + true => SR24_A::ACCESS, + } + } + #[doc = "Checks if the value of the field is `NO_ACCESS`"] + #[inline(always)] + pub fn is_no_access(&self) -> bool { + *self == SR24_A::NO_ACCESS + } + #[doc = "Checks if the value of the field is `ACCESS`"] + #[inline(always)] + pub fn is_access(&self) -> bool { + *self == SR24_A::ACCESS + } +} +#[doc = "Field `SR24` writer - Subregion 24 in region n (write '1' to clear)"] +pub type SR24_W<'a, const O: u8> = crate::BitWriter1C<'a, u32, SUBSTATWA_SPEC, SR24_A, O>; +impl<'a, const O: u8> SR24_W<'a, O> { + #[doc = "No write access occurred in this subregion"] + #[inline(always)] + pub fn no_access(self) -> &'a mut W { + self.variant(SR24_A::NO_ACCESS) + } + #[doc = "Write access(es) occurred in this subregion"] + #[inline(always)] + pub fn access(self) -> &'a mut W { + self.variant(SR24_A::ACCESS) + } +} +#[doc = "Field `SR25` reader - Subregion 25 in region n (write '1' to clear)"] +pub type SR25_R = crate::BitReader; +#[doc = "Subregion 25 in region n (write '1' to clear)\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum SR25_A { + #[doc = "0: No write access occurred in this subregion"] + NO_ACCESS = 0, + #[doc = "1: Write access(es) occurred in this subregion"] + ACCESS = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: SR25_A) -> Self { + variant as u8 != 0 + } +} +impl SR25_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> SR25_A { + match self.bits { + false => SR25_A::NO_ACCESS, + true => SR25_A::ACCESS, + } + } + #[doc = "Checks if the value of the field is `NO_ACCESS`"] + #[inline(always)] + pub fn is_no_access(&self) -> bool { + *self == SR25_A::NO_ACCESS + } + #[doc = "Checks if the value of the field is `ACCESS`"] + #[inline(always)] + pub fn is_access(&self) -> bool { + *self == SR25_A::ACCESS + } +} +#[doc = "Field `SR25` writer - Subregion 25 in region n (write '1' to clear)"] +pub type SR25_W<'a, const O: u8> = crate::BitWriter1C<'a, u32, SUBSTATWA_SPEC, SR25_A, O>; +impl<'a, const O: u8> SR25_W<'a, O> { + #[doc = "No write access occurred in this subregion"] + #[inline(always)] + pub fn no_access(self) -> &'a mut W { + self.variant(SR25_A::NO_ACCESS) + } + #[doc = "Write access(es) occurred in this subregion"] + #[inline(always)] + pub fn access(self) -> &'a mut W { + self.variant(SR25_A::ACCESS) + } +} +#[doc = "Field `SR26` reader - Subregion 26 in region n (write '1' to clear)"] +pub type SR26_R = crate::BitReader; +#[doc = "Subregion 26 in region n (write '1' to clear)\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum SR26_A { + #[doc = "0: No write access occurred in this subregion"] + NO_ACCESS = 0, + #[doc = "1: Write access(es) occurred in this subregion"] + ACCESS = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: SR26_A) -> Self { + variant as u8 != 0 + } +} +impl SR26_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> SR26_A { + match self.bits { + false => SR26_A::NO_ACCESS, + true => SR26_A::ACCESS, + } + } + #[doc = "Checks if the value of the field is `NO_ACCESS`"] + #[inline(always)] + pub fn is_no_access(&self) -> bool { + *self == SR26_A::NO_ACCESS + } + #[doc = "Checks if the value of the field is `ACCESS`"] + #[inline(always)] + pub fn is_access(&self) -> bool { + *self == SR26_A::ACCESS + } +} +#[doc = "Field `SR26` writer - Subregion 26 in region n (write '1' to clear)"] +pub type SR26_W<'a, const O: u8> = crate::BitWriter1C<'a, u32, SUBSTATWA_SPEC, SR26_A, O>; +impl<'a, const O: u8> SR26_W<'a, O> { + #[doc = "No write access occurred in this subregion"] + #[inline(always)] + pub fn no_access(self) -> &'a mut W { + self.variant(SR26_A::NO_ACCESS) + } + #[doc = "Write access(es) occurred in this subregion"] + #[inline(always)] + pub fn access(self) -> &'a mut W { + self.variant(SR26_A::ACCESS) + } +} +#[doc = "Field `SR27` reader - Subregion 27 in region n (write '1' to clear)"] +pub type SR27_R = crate::BitReader; +#[doc = "Subregion 27 in region n (write '1' to clear)\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum SR27_A { + #[doc = "0: No write access occurred in this subregion"] + NO_ACCESS = 0, + #[doc = "1: Write access(es) occurred in this subregion"] + ACCESS = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: SR27_A) -> Self { + variant as u8 != 0 + } +} +impl SR27_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> SR27_A { + match self.bits { + false => SR27_A::NO_ACCESS, + true => SR27_A::ACCESS, + } + } + #[doc = "Checks if the value of the field is `NO_ACCESS`"] + #[inline(always)] + pub fn is_no_access(&self) -> bool { + *self == SR27_A::NO_ACCESS + } + #[doc = "Checks if the value of the field is `ACCESS`"] + #[inline(always)] + pub fn is_access(&self) -> bool { + *self == SR27_A::ACCESS + } +} +#[doc = "Field `SR27` writer - Subregion 27 in region n (write '1' to clear)"] +pub type SR27_W<'a, const O: u8> = crate::BitWriter1C<'a, u32, SUBSTATWA_SPEC, SR27_A, O>; +impl<'a, const O: u8> SR27_W<'a, O> { + #[doc = "No write access occurred in this subregion"] + #[inline(always)] + pub fn no_access(self) -> &'a mut W { + self.variant(SR27_A::NO_ACCESS) + } + #[doc = "Write access(es) occurred in this subregion"] + #[inline(always)] + pub fn access(self) -> &'a mut W { + self.variant(SR27_A::ACCESS) + } +} +#[doc = "Field `SR28` reader - Subregion 28 in region n (write '1' to clear)"] +pub type SR28_R = crate::BitReader; +#[doc = "Subregion 28 in region n (write '1' to clear)\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum SR28_A { + #[doc = "0: No write access occurred in this subregion"] + NO_ACCESS = 0, + #[doc = "1: Write access(es) occurred in this subregion"] + ACCESS = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: SR28_A) -> Self { + variant as u8 != 0 + } +} +impl SR28_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> SR28_A { + match self.bits { + false => SR28_A::NO_ACCESS, + true => SR28_A::ACCESS, + } + } + #[doc = "Checks if the value of the field is `NO_ACCESS`"] + #[inline(always)] + pub fn is_no_access(&self) -> bool { + *self == SR28_A::NO_ACCESS + } + #[doc = "Checks if the value of the field is `ACCESS`"] + #[inline(always)] + pub fn is_access(&self) -> bool { + *self == SR28_A::ACCESS + } +} +#[doc = "Field `SR28` writer - Subregion 28 in region n (write '1' to clear)"] +pub type SR28_W<'a, const O: u8> = crate::BitWriter1C<'a, u32, SUBSTATWA_SPEC, SR28_A, O>; +impl<'a, const O: u8> SR28_W<'a, O> { + #[doc = "No write access occurred in this subregion"] + #[inline(always)] + pub fn no_access(self) -> &'a mut W { + self.variant(SR28_A::NO_ACCESS) + } + #[doc = "Write access(es) occurred in this subregion"] + #[inline(always)] + pub fn access(self) -> &'a mut W { + self.variant(SR28_A::ACCESS) + } +} +#[doc = "Field `SR29` reader - Subregion 29 in region n (write '1' to clear)"] +pub type SR29_R = crate::BitReader; +#[doc = "Subregion 29 in region n (write '1' to clear)\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum SR29_A { + #[doc = "0: No write access occurred in this subregion"] + NO_ACCESS = 0, + #[doc = "1: Write access(es) occurred in this subregion"] + ACCESS = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: SR29_A) -> Self { + variant as u8 != 0 + } +} +impl SR29_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> SR29_A { + match self.bits { + false => SR29_A::NO_ACCESS, + true => SR29_A::ACCESS, + } + } + #[doc = "Checks if the value of the field is `NO_ACCESS`"] + #[inline(always)] + pub fn is_no_access(&self) -> bool { + *self == SR29_A::NO_ACCESS + } + #[doc = "Checks if the value of the field is `ACCESS`"] + #[inline(always)] + pub fn is_access(&self) -> bool { + *self == SR29_A::ACCESS + } +} +#[doc = "Field `SR29` writer - Subregion 29 in region n (write '1' to clear)"] +pub type SR29_W<'a, const O: u8> = crate::BitWriter1C<'a, u32, SUBSTATWA_SPEC, SR29_A, O>; +impl<'a, const O: u8> SR29_W<'a, O> { + #[doc = "No write access occurred in this subregion"] + #[inline(always)] + pub fn no_access(self) -> &'a mut W { + self.variant(SR29_A::NO_ACCESS) + } + #[doc = "Write access(es) occurred in this subregion"] + #[inline(always)] + pub fn access(self) -> &'a mut W { + self.variant(SR29_A::ACCESS) + } +} +#[doc = "Field `SR30` reader - Subregion 30 in region n (write '1' to clear)"] +pub type SR30_R = crate::BitReader; +#[doc = "Subregion 30 in region n (write '1' to clear)\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum SR30_A { + #[doc = "0: No write access occurred in this subregion"] + NO_ACCESS = 0, + #[doc = "1: Write access(es) occurred in this subregion"] + ACCESS = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: SR30_A) -> Self { + variant as u8 != 0 + } +} +impl SR30_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> SR30_A { + match self.bits { + false => SR30_A::NO_ACCESS, + true => SR30_A::ACCESS, + } + } + #[doc = "Checks if the value of the field is `NO_ACCESS`"] + #[inline(always)] + pub fn is_no_access(&self) -> bool { + *self == SR30_A::NO_ACCESS + } + #[doc = "Checks if the value of the field is `ACCESS`"] + #[inline(always)] + pub fn is_access(&self) -> bool { + *self == SR30_A::ACCESS + } +} +#[doc = "Field `SR30` writer - Subregion 30 in region n (write '1' to clear)"] +pub type SR30_W<'a, const O: u8> = crate::BitWriter1C<'a, u32, SUBSTATWA_SPEC, SR30_A, O>; +impl<'a, const O: u8> SR30_W<'a, O> { + #[doc = "No write access occurred in this subregion"] + #[inline(always)] + pub fn no_access(self) -> &'a mut W { + self.variant(SR30_A::NO_ACCESS) + } + #[doc = "Write access(es) occurred in this subregion"] + #[inline(always)] + pub fn access(self) -> &'a mut W { + self.variant(SR30_A::ACCESS) + } +} +#[doc = "Field `SR31` reader - Subregion 31 in region n (write '1' to clear)"] +pub type SR31_R = crate::BitReader; +#[doc = "Subregion 31 in region n (write '1' to clear)\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum SR31_A { + #[doc = "0: No write access occurred in this subregion"] + NO_ACCESS = 0, + #[doc = "1: Write access(es) occurred in this subregion"] + ACCESS = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: SR31_A) -> Self { + variant as u8 != 0 + } +} +impl SR31_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> SR31_A { + match self.bits { + false => SR31_A::NO_ACCESS, + true => SR31_A::ACCESS, + } + } + #[doc = "Checks if the value of the field is `NO_ACCESS`"] + #[inline(always)] + pub fn is_no_access(&self) -> bool { + *self == SR31_A::NO_ACCESS + } + #[doc = "Checks if the value of the field is `ACCESS`"] + #[inline(always)] + pub fn is_access(&self) -> bool { + *self == SR31_A::ACCESS + } +} +#[doc = "Field `SR31` writer - Subregion 31 in region n (write '1' to clear)"] +pub type SR31_W<'a, const O: u8> = crate::BitWriter1C<'a, u32, SUBSTATWA_SPEC, SR31_A, O>; +impl<'a, const O: u8> SR31_W<'a, O> { + #[doc = "No write access occurred in this subregion"] + #[inline(always)] + pub fn no_access(self) -> &'a mut W { + self.variant(SR31_A::NO_ACCESS) + } + #[doc = "Write access(es) occurred in this subregion"] + #[inline(always)] + pub fn access(self) -> &'a mut W { + self.variant(SR31_A::ACCESS) + } +} +impl R { + #[doc = "Bit 0 - Subregion 0 in region n (write '1' to clear)"] + #[inline(always)] + pub fn sr0(&self) -> SR0_R { + SR0_R::new((self.bits & 1) != 0) + } + #[doc = "Bit 1 - Subregion 1 in region n (write '1' to clear)"] + #[inline(always)] + pub fn sr1(&self) -> SR1_R { + SR1_R::new(((self.bits >> 1) & 1) != 0) + } + #[doc = "Bit 2 - Subregion 2 in region n (write '1' to clear)"] + #[inline(always)] + pub fn sr2(&self) -> SR2_R { + SR2_R::new(((self.bits >> 2) & 1) != 0) + } + #[doc = "Bit 3 - Subregion 3 in region n (write '1' to clear)"] + #[inline(always)] + pub fn sr3(&self) -> SR3_R { + SR3_R::new(((self.bits >> 3) & 1) != 0) + } + #[doc = "Bit 4 - Subregion 4 in region n (write '1' to clear)"] + #[inline(always)] + pub fn sr4(&self) -> SR4_R { + SR4_R::new(((self.bits >> 4) & 1) != 0) + } + #[doc = "Bit 5 - Subregion 5 in region n (write '1' to clear)"] + #[inline(always)] + pub fn sr5(&self) -> SR5_R { + SR5_R::new(((self.bits >> 5) & 1) != 0) + } + #[doc = "Bit 6 - Subregion 6 in region n (write '1' to clear)"] + #[inline(always)] + pub fn sr6(&self) -> SR6_R { + SR6_R::new(((self.bits >> 6) & 1) != 0) + } + #[doc = "Bit 7 - Subregion 7 in region n (write '1' to clear)"] + #[inline(always)] + pub fn sr7(&self) -> SR7_R { + SR7_R::new(((self.bits >> 7) & 1) != 0) + } + #[doc = "Bit 8 - Subregion 8 in region n (write '1' to clear)"] + #[inline(always)] + pub fn sr8(&self) -> SR8_R { + SR8_R::new(((self.bits >> 8) & 1) != 0) + } + #[doc = "Bit 9 - Subregion 9 in region n (write '1' to clear)"] + #[inline(always)] + pub fn sr9(&self) -> SR9_R { + SR9_R::new(((self.bits >> 9) & 1) != 0) + } + #[doc = "Bit 10 - Subregion 10 in region n (write '1' to clear)"] + #[inline(always)] + pub fn sr10(&self) -> SR10_R { + SR10_R::new(((self.bits >> 10) & 1) != 0) + } + #[doc = "Bit 11 - Subregion 11 in region n (write '1' to clear)"] + #[inline(always)] + pub fn sr11(&self) -> SR11_R { + SR11_R::new(((self.bits >> 11) & 1) != 0) + } + #[doc = "Bit 12 - Subregion 12 in region n (write '1' to clear)"] + #[inline(always)] + pub fn sr12(&self) -> SR12_R { + SR12_R::new(((self.bits >> 12) & 1) != 0) + } + #[doc = "Bit 13 - Subregion 13 in region n (write '1' to clear)"] + #[inline(always)] + pub fn sr13(&self) -> SR13_R { + SR13_R::new(((self.bits >> 13) & 1) != 0) + } + #[doc = "Bit 14 - Subregion 14 in region n (write '1' to clear)"] + #[inline(always)] + pub fn sr14(&self) -> SR14_R { + SR14_R::new(((self.bits >> 14) & 1) != 0) + } + #[doc = "Bit 15 - Subregion 15 in region n (write '1' to clear)"] + #[inline(always)] + pub fn sr15(&self) -> SR15_R { + SR15_R::new(((self.bits >> 15) & 1) != 0) + } + #[doc = "Bit 16 - Subregion 16 in region n (write '1' to clear)"] + #[inline(always)] + pub fn sr16(&self) -> SR16_R { + SR16_R::new(((self.bits >> 16) & 1) != 0) + } + #[doc = "Bit 17 - Subregion 17 in region n (write '1' to clear)"] + #[inline(always)] + pub fn sr17(&self) -> SR17_R { + SR17_R::new(((self.bits >> 17) & 1) != 0) + } + #[doc = "Bit 18 - Subregion 18 in region n (write '1' to clear)"] + #[inline(always)] + pub fn sr18(&self) -> SR18_R { + SR18_R::new(((self.bits >> 18) & 1) != 0) + } + #[doc = "Bit 19 - Subregion 19 in region n (write '1' to clear)"] + #[inline(always)] + pub fn sr19(&self) -> SR19_R { + SR19_R::new(((self.bits >> 19) & 1) != 0) + } + #[doc = "Bit 20 - Subregion 20 in region n (write '1' to clear)"] + #[inline(always)] + pub fn sr20(&self) -> SR20_R { + SR20_R::new(((self.bits >> 20) & 1) != 0) + } + #[doc = "Bit 21 - Subregion 21 in region n (write '1' to clear)"] + #[inline(always)] + pub fn sr21(&self) -> SR21_R { + SR21_R::new(((self.bits >> 21) & 1) != 0) + } + #[doc = "Bit 22 - Subregion 22 in region n (write '1' to clear)"] + #[inline(always)] + pub fn sr22(&self) -> SR22_R { + SR22_R::new(((self.bits >> 22) & 1) != 0) + } + #[doc = "Bit 23 - Subregion 23 in region n (write '1' to clear)"] + #[inline(always)] + pub fn sr23(&self) -> SR23_R { + SR23_R::new(((self.bits >> 23) & 1) != 0) + } + #[doc = "Bit 24 - Subregion 24 in region n (write '1' to clear)"] + #[inline(always)] + pub fn sr24(&self) -> SR24_R { + SR24_R::new(((self.bits >> 24) & 1) != 0) + } + #[doc = "Bit 25 - Subregion 25 in region n (write '1' to clear)"] + #[inline(always)] + pub fn sr25(&self) -> SR25_R { + SR25_R::new(((self.bits >> 25) & 1) != 0) + } + #[doc = "Bit 26 - Subregion 26 in region n (write '1' to clear)"] + #[inline(always)] + pub fn sr26(&self) -> SR26_R { + SR26_R::new(((self.bits >> 26) & 1) != 0) + } + #[doc = "Bit 27 - Subregion 27 in region n (write '1' to clear)"] + #[inline(always)] + pub fn sr27(&self) -> SR27_R { + SR27_R::new(((self.bits >> 27) & 1) != 0) + } + #[doc = "Bit 28 - Subregion 28 in region n (write '1' to clear)"] + #[inline(always)] + pub fn sr28(&self) -> SR28_R { + SR28_R::new(((self.bits >> 28) & 1) != 0) + } + #[doc = "Bit 29 - Subregion 29 in region n (write '1' to clear)"] + #[inline(always)] + pub fn sr29(&self) -> SR29_R { + SR29_R::new(((self.bits >> 29) & 1) != 0) + } + #[doc = "Bit 30 - Subregion 30 in region n (write '1' to clear)"] + #[inline(always)] + pub fn sr30(&self) -> SR30_R { + SR30_R::new(((self.bits >> 30) & 1) != 0) + } + #[doc = "Bit 31 - Subregion 31 in region n (write '1' to clear)"] + #[inline(always)] + pub fn sr31(&self) -> SR31_R { + SR31_R::new(((self.bits >> 31) & 1) != 0) + } +} +impl W { + #[doc = "Bit 0 - Subregion 0 in region n (write '1' to clear)"] + #[inline(always)] + #[must_use] + pub fn sr0(&mut self) -> SR0_W<0> { + SR0_W::new(self) + } + #[doc = "Bit 1 - Subregion 1 in region n (write '1' to clear)"] + #[inline(always)] + #[must_use] + pub fn sr1(&mut self) -> SR1_W<1> { + SR1_W::new(self) + } + #[doc = "Bit 2 - Subregion 2 in region n (write '1' to clear)"] + #[inline(always)] + #[must_use] + pub fn sr2(&mut self) -> SR2_W<2> { + SR2_W::new(self) + } + #[doc = "Bit 3 - Subregion 3 in region n (write '1' to clear)"] + #[inline(always)] + #[must_use] + pub fn sr3(&mut self) -> SR3_W<3> { + SR3_W::new(self) + } + #[doc = "Bit 4 - Subregion 4 in region n (write '1' to clear)"] + #[inline(always)] + #[must_use] + pub fn sr4(&mut self) -> SR4_W<4> { + SR4_W::new(self) + } + #[doc = "Bit 5 - Subregion 5 in region n (write '1' to clear)"] + #[inline(always)] + #[must_use] + pub fn sr5(&mut self) -> SR5_W<5> { + SR5_W::new(self) + } + #[doc = "Bit 6 - Subregion 6 in region n (write '1' to clear)"] + #[inline(always)] + #[must_use] + pub fn sr6(&mut self) -> SR6_W<6> { + SR6_W::new(self) + } + #[doc = "Bit 7 - Subregion 7 in region n (write '1' to clear)"] + #[inline(always)] + #[must_use] + pub fn sr7(&mut self) -> SR7_W<7> { + SR7_W::new(self) + } + #[doc = "Bit 8 - Subregion 8 in region n (write '1' to clear)"] + #[inline(always)] + #[must_use] + pub fn sr8(&mut self) -> SR8_W<8> { + SR8_W::new(self) + } + #[doc = "Bit 9 - Subregion 9 in region n (write '1' to clear)"] + #[inline(always)] + #[must_use] + pub fn sr9(&mut self) -> SR9_W<9> { + SR9_W::new(self) + } + #[doc = "Bit 10 - Subregion 10 in region n (write '1' to clear)"] + #[inline(always)] + #[must_use] + pub fn sr10(&mut self) -> SR10_W<10> { + SR10_W::new(self) + } + #[doc = "Bit 11 - Subregion 11 in region n (write '1' to clear)"] + #[inline(always)] + #[must_use] + pub fn sr11(&mut self) -> SR11_W<11> { + SR11_W::new(self) + } + #[doc = "Bit 12 - Subregion 12 in region n (write '1' to clear)"] + #[inline(always)] + #[must_use] + pub fn sr12(&mut self) -> SR12_W<12> { + SR12_W::new(self) + } + #[doc = "Bit 13 - Subregion 13 in region n (write '1' to clear)"] + #[inline(always)] + #[must_use] + pub fn sr13(&mut self) -> SR13_W<13> { + SR13_W::new(self) + } + #[doc = "Bit 14 - Subregion 14 in region n (write '1' to clear)"] + #[inline(always)] + #[must_use] + pub fn sr14(&mut self) -> SR14_W<14> { + SR14_W::new(self) + } + #[doc = "Bit 15 - Subregion 15 in region n (write '1' to clear)"] + #[inline(always)] + #[must_use] + pub fn sr15(&mut self) -> SR15_W<15> { + SR15_W::new(self) + } + #[doc = "Bit 16 - Subregion 16 in region n (write '1' to clear)"] + #[inline(always)] + #[must_use] + pub fn sr16(&mut self) -> SR16_W<16> { + SR16_W::new(self) + } + #[doc = "Bit 17 - Subregion 17 in region n (write '1' to clear)"] + #[inline(always)] + #[must_use] + pub fn sr17(&mut self) -> SR17_W<17> { + SR17_W::new(self) + } + #[doc = "Bit 18 - Subregion 18 in region n (write '1' to clear)"] + #[inline(always)] + #[must_use] + pub fn sr18(&mut self) -> SR18_W<18> { + SR18_W::new(self) + } + #[doc = "Bit 19 - Subregion 19 in region n (write '1' to clear)"] + #[inline(always)] + #[must_use] + pub fn sr19(&mut self) -> SR19_W<19> { + SR19_W::new(self) + } + #[doc = "Bit 20 - Subregion 20 in region n (write '1' to clear)"] + #[inline(always)] + #[must_use] + pub fn sr20(&mut self) -> SR20_W<20> { + SR20_W::new(self) + } + #[doc = "Bit 21 - Subregion 21 in region n (write '1' to clear)"] + #[inline(always)] + #[must_use] + pub fn sr21(&mut self) -> SR21_W<21> { + SR21_W::new(self) + } + #[doc = "Bit 22 - Subregion 22 in region n (write '1' to clear)"] + #[inline(always)] + #[must_use] + pub fn sr22(&mut self) -> SR22_W<22> { + SR22_W::new(self) + } + #[doc = "Bit 23 - Subregion 23 in region n (write '1' to clear)"] + #[inline(always)] + #[must_use] + pub fn sr23(&mut self) -> SR23_W<23> { + SR23_W::new(self) + } + #[doc = "Bit 24 - Subregion 24 in region n (write '1' to clear)"] + #[inline(always)] + #[must_use] + pub fn sr24(&mut self) -> SR24_W<24> { + SR24_W::new(self) + } + #[doc = "Bit 25 - Subregion 25 in region n (write '1' to clear)"] + #[inline(always)] + #[must_use] + pub fn sr25(&mut self) -> SR25_W<25> { + SR25_W::new(self) + } + #[doc = "Bit 26 - Subregion 26 in region n (write '1' to clear)"] + #[inline(always)] + #[must_use] + pub fn sr26(&mut self) -> SR26_W<26> { + SR26_W::new(self) + } + #[doc = "Bit 27 - Subregion 27 in region n (write '1' to clear)"] + #[inline(always)] + #[must_use] + pub fn sr27(&mut self) -> SR27_W<27> { + SR27_W::new(self) + } + #[doc = "Bit 28 - Subregion 28 in region n (write '1' to clear)"] + #[inline(always)] + #[must_use] + pub fn sr28(&mut self) -> SR28_W<28> { + SR28_W::new(self) + } + #[doc = "Bit 29 - Subregion 29 in region n (write '1' to clear)"] + #[inline(always)] + #[must_use] + pub fn sr29(&mut self) -> SR29_W<29> { + SR29_W::new(self) + } + #[doc = "Bit 30 - Subregion 30 in region n (write '1' to clear)"] + #[inline(always)] + #[must_use] + pub fn sr30(&mut self) -> SR30_W<30> { + SR30_W::new(self) + } + #[doc = "Bit 31 - Subregion 31 in region n (write '1' to clear)"] + #[inline(always)] + #[must_use] + pub fn sr31(&mut self) -> SR31_W<31> { + SR31_W::new(self) + } + #[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 = "Description cluster: Source of event/interrupt in region n, write access detected while corresponding subregion was enabled for watching\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 [substatwa](index.html) module"] +pub struct SUBSTATWA_SPEC; +impl crate::RegisterSpec for SUBSTATWA_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [substatwa::R](R) reader structure"] +impl crate::Readable for SUBSTATWA_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [substatwa::W](W) writer structure"] +impl crate::Writable for SUBSTATWA_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0xffff_ffff; +} +#[doc = "`reset()` method sets SUBSTATWA to value 0"] +impl crate::Resettable for SUBSTATWA_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/mwu/pregion.rs b/down-the-stack/dk_pac/src/mwu/pregion.rs new file mode 100644 index 0000000..a6b37e4 --- /dev/null +++ b/down-the-stack/dk_pac/src/mwu/pregion.rs @@ -0,0 +1,22 @@ +#[doc = r"Register block"] +#[repr(C)] +pub struct PREGION { + #[doc = "0x00 - Description cluster: Reserved for future use"] + pub start: START, + #[doc = "0x04 - Description cluster: Reserved for future use"] + pub end: END, + #[doc = "0x08 - Description cluster: Subregions of region n"] + pub subs: SUBS, +} +#[doc = "START (r) register accessor: an alias for `Reg`"] +pub type START = crate::Reg; +#[doc = "Description cluster: Reserved for future use"] +pub mod start; +#[doc = "END (r) register accessor: an alias for `Reg`"] +pub type END = crate::Reg; +#[doc = "Description cluster: Reserved for future use"] +pub mod end; +#[doc = "SUBS (rw) register accessor: an alias for `Reg`"] +pub type SUBS = crate::Reg; +#[doc = "Description cluster: Subregions of region n"] +pub mod subs; diff --git a/down-the-stack/dk_pac/src/mwu/pregion/end.rs b/down-the-stack/dk_pac/src/mwu/pregion/end.rs new file mode 100644 index 0000000..4daab61 --- /dev/null +++ b/down-the-stack/dk_pac/src/mwu/pregion/end.rs @@ -0,0 +1,37 @@ +#[doc = "Register `END` 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 = "Field `END` reader - Reserved for future use"] +pub type END_R = crate::FieldReader; +impl R { + #[doc = "Bits 0:31 - Reserved for future use"] + #[inline(always)] + pub fn end(&self) -> END_R { + END_R::new(self.bits) + } +} +#[doc = "Description cluster: Reserved for future use\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 [end](index.html) module"] +pub struct END_SPEC; +impl crate::RegisterSpec for END_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [end::R](R) reader structure"] +impl crate::Readable for END_SPEC { + type Reader = R; +} +#[doc = "`reset()` method sets END to value 0"] +impl crate::Resettable for END_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/mwu/pregion/start.rs b/down-the-stack/dk_pac/src/mwu/pregion/start.rs new file mode 100644 index 0000000..e92c3f6 --- /dev/null +++ b/down-the-stack/dk_pac/src/mwu/pregion/start.rs @@ -0,0 +1,37 @@ +#[doc = "Register `START` 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 = "Field `START` reader - Reserved for future use"] +pub type START_R = crate::FieldReader; +impl R { + #[doc = "Bits 0:31 - Reserved for future use"] + #[inline(always)] + pub fn start(&self) -> START_R { + START_R::new(self.bits) + } +} +#[doc = "Description cluster: Reserved for future use\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 [start](index.html) module"] +pub struct START_SPEC; +impl crate::RegisterSpec for START_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [start::R](R) reader structure"] +impl crate::Readable for START_SPEC { + type Reader = R; +} +#[doc = "`reset()` method sets START to value 0"] +impl crate::Resettable for START_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/mwu/pregion/subs.rs b/down-the-stack/dk_pac/src/mwu/pregion/subs.rs new file mode 100644 index 0000000..8997656 --- /dev/null +++ b/down-the-stack/dk_pac/src/mwu/pregion/subs.rs @@ -0,0 +1,2017 @@ +#[doc = "Register `SUBS` 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 `SUBS` 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 `SR0` reader - Include or exclude subregion 0 in region"] +pub type SR0_R = crate::BitReader; +#[doc = "Include or exclude subregion 0 in region\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum SR0_A { + #[doc = "0: Exclude"] + EXCLUDE = 0, + #[doc = "1: Include"] + INCLUDE = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: SR0_A) -> Self { + variant as u8 != 0 + } +} +impl SR0_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> SR0_A { + match self.bits { + false => SR0_A::EXCLUDE, + true => SR0_A::INCLUDE, + } + } + #[doc = "Checks if the value of the field is `EXCLUDE`"] + #[inline(always)] + pub fn is_exclude(&self) -> bool { + *self == SR0_A::EXCLUDE + } + #[doc = "Checks if the value of the field is `INCLUDE`"] + #[inline(always)] + pub fn is_include(&self) -> bool { + *self == SR0_A::INCLUDE + } +} +#[doc = "Field `SR0` writer - Include or exclude subregion 0 in region"] +pub type SR0_W<'a, const O: u8> = crate::BitWriter<'a, u32, SUBS_SPEC, SR0_A, O>; +impl<'a, const O: u8> SR0_W<'a, O> { + #[doc = "Exclude"] + #[inline(always)] + pub fn exclude(self) -> &'a mut W { + self.variant(SR0_A::EXCLUDE) + } + #[doc = "Include"] + #[inline(always)] + pub fn include(self) -> &'a mut W { + self.variant(SR0_A::INCLUDE) + } +} +#[doc = "Field `SR1` reader - Include or exclude subregion 1 in region"] +pub type SR1_R = crate::BitReader; +#[doc = "Include or exclude subregion 1 in region\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum SR1_A { + #[doc = "0: Exclude"] + EXCLUDE = 0, + #[doc = "1: Include"] + INCLUDE = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: SR1_A) -> Self { + variant as u8 != 0 + } +} +impl SR1_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> SR1_A { + match self.bits { + false => SR1_A::EXCLUDE, + true => SR1_A::INCLUDE, + } + } + #[doc = "Checks if the value of the field is `EXCLUDE`"] + #[inline(always)] + pub fn is_exclude(&self) -> bool { + *self == SR1_A::EXCLUDE + } + #[doc = "Checks if the value of the field is `INCLUDE`"] + #[inline(always)] + pub fn is_include(&self) -> bool { + *self == SR1_A::INCLUDE + } +} +#[doc = "Field `SR1` writer - Include or exclude subregion 1 in region"] +pub type SR1_W<'a, const O: u8> = crate::BitWriter<'a, u32, SUBS_SPEC, SR1_A, O>; +impl<'a, const O: u8> SR1_W<'a, O> { + #[doc = "Exclude"] + #[inline(always)] + pub fn exclude(self) -> &'a mut W { + self.variant(SR1_A::EXCLUDE) + } + #[doc = "Include"] + #[inline(always)] + pub fn include(self) -> &'a mut W { + self.variant(SR1_A::INCLUDE) + } +} +#[doc = "Field `SR2` reader - Include or exclude subregion 2 in region"] +pub type SR2_R = crate::BitReader; +#[doc = "Include or exclude subregion 2 in region\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum SR2_A { + #[doc = "0: Exclude"] + EXCLUDE = 0, + #[doc = "1: Include"] + INCLUDE = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: SR2_A) -> Self { + variant as u8 != 0 + } +} +impl SR2_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> SR2_A { + match self.bits { + false => SR2_A::EXCLUDE, + true => SR2_A::INCLUDE, + } + } + #[doc = "Checks if the value of the field is `EXCLUDE`"] + #[inline(always)] + pub fn is_exclude(&self) -> bool { + *self == SR2_A::EXCLUDE + } + #[doc = "Checks if the value of the field is `INCLUDE`"] + #[inline(always)] + pub fn is_include(&self) -> bool { + *self == SR2_A::INCLUDE + } +} +#[doc = "Field `SR2` writer - Include or exclude subregion 2 in region"] +pub type SR2_W<'a, const O: u8> = crate::BitWriter<'a, u32, SUBS_SPEC, SR2_A, O>; +impl<'a, const O: u8> SR2_W<'a, O> { + #[doc = "Exclude"] + #[inline(always)] + pub fn exclude(self) -> &'a mut W { + self.variant(SR2_A::EXCLUDE) + } + #[doc = "Include"] + #[inline(always)] + pub fn include(self) -> &'a mut W { + self.variant(SR2_A::INCLUDE) + } +} +#[doc = "Field `SR3` reader - Include or exclude subregion 3 in region"] +pub type SR3_R = crate::BitReader; +#[doc = "Include or exclude subregion 3 in region\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum SR3_A { + #[doc = "0: Exclude"] + EXCLUDE = 0, + #[doc = "1: Include"] + INCLUDE = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: SR3_A) -> Self { + variant as u8 != 0 + } +} +impl SR3_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> SR3_A { + match self.bits { + false => SR3_A::EXCLUDE, + true => SR3_A::INCLUDE, + } + } + #[doc = "Checks if the value of the field is `EXCLUDE`"] + #[inline(always)] + pub fn is_exclude(&self) -> bool { + *self == SR3_A::EXCLUDE + } + #[doc = "Checks if the value of the field is `INCLUDE`"] + #[inline(always)] + pub fn is_include(&self) -> bool { + *self == SR3_A::INCLUDE + } +} +#[doc = "Field `SR3` writer - Include or exclude subregion 3 in region"] +pub type SR3_W<'a, const O: u8> = crate::BitWriter<'a, u32, SUBS_SPEC, SR3_A, O>; +impl<'a, const O: u8> SR3_W<'a, O> { + #[doc = "Exclude"] + #[inline(always)] + pub fn exclude(self) -> &'a mut W { + self.variant(SR3_A::EXCLUDE) + } + #[doc = "Include"] + #[inline(always)] + pub fn include(self) -> &'a mut W { + self.variant(SR3_A::INCLUDE) + } +} +#[doc = "Field `SR4` reader - Include or exclude subregion 4 in region"] +pub type SR4_R = crate::BitReader; +#[doc = "Include or exclude subregion 4 in region\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum SR4_A { + #[doc = "0: Exclude"] + EXCLUDE = 0, + #[doc = "1: Include"] + INCLUDE = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: SR4_A) -> Self { + variant as u8 != 0 + } +} +impl SR4_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> SR4_A { + match self.bits { + false => SR4_A::EXCLUDE, + true => SR4_A::INCLUDE, + } + } + #[doc = "Checks if the value of the field is `EXCLUDE`"] + #[inline(always)] + pub fn is_exclude(&self) -> bool { + *self == SR4_A::EXCLUDE + } + #[doc = "Checks if the value of the field is `INCLUDE`"] + #[inline(always)] + pub fn is_include(&self) -> bool { + *self == SR4_A::INCLUDE + } +} +#[doc = "Field `SR4` writer - Include or exclude subregion 4 in region"] +pub type SR4_W<'a, const O: u8> = crate::BitWriter<'a, u32, SUBS_SPEC, SR4_A, O>; +impl<'a, const O: u8> SR4_W<'a, O> { + #[doc = "Exclude"] + #[inline(always)] + pub fn exclude(self) -> &'a mut W { + self.variant(SR4_A::EXCLUDE) + } + #[doc = "Include"] + #[inline(always)] + pub fn include(self) -> &'a mut W { + self.variant(SR4_A::INCLUDE) + } +} +#[doc = "Field `SR5` reader - Include or exclude subregion 5 in region"] +pub type SR5_R = crate::BitReader; +#[doc = "Include or exclude subregion 5 in region\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum SR5_A { + #[doc = "0: Exclude"] + EXCLUDE = 0, + #[doc = "1: Include"] + INCLUDE = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: SR5_A) -> Self { + variant as u8 != 0 + } +} +impl SR5_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> SR5_A { + match self.bits { + false => SR5_A::EXCLUDE, + true => SR5_A::INCLUDE, + } + } + #[doc = "Checks if the value of the field is `EXCLUDE`"] + #[inline(always)] + pub fn is_exclude(&self) -> bool { + *self == SR5_A::EXCLUDE + } + #[doc = "Checks if the value of the field is `INCLUDE`"] + #[inline(always)] + pub fn is_include(&self) -> bool { + *self == SR5_A::INCLUDE + } +} +#[doc = "Field `SR5` writer - Include or exclude subregion 5 in region"] +pub type SR5_W<'a, const O: u8> = crate::BitWriter<'a, u32, SUBS_SPEC, SR5_A, O>; +impl<'a, const O: u8> SR5_W<'a, O> { + #[doc = "Exclude"] + #[inline(always)] + pub fn exclude(self) -> &'a mut W { + self.variant(SR5_A::EXCLUDE) + } + #[doc = "Include"] + #[inline(always)] + pub fn include(self) -> &'a mut W { + self.variant(SR5_A::INCLUDE) + } +} +#[doc = "Field `SR6` reader - Include or exclude subregion 6 in region"] +pub type SR6_R = crate::BitReader; +#[doc = "Include or exclude subregion 6 in region\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum SR6_A { + #[doc = "0: Exclude"] + EXCLUDE = 0, + #[doc = "1: Include"] + INCLUDE = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: SR6_A) -> Self { + variant as u8 != 0 + } +} +impl SR6_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> SR6_A { + match self.bits { + false => SR6_A::EXCLUDE, + true => SR6_A::INCLUDE, + } + } + #[doc = "Checks if the value of the field is `EXCLUDE`"] + #[inline(always)] + pub fn is_exclude(&self) -> bool { + *self == SR6_A::EXCLUDE + } + #[doc = "Checks if the value of the field is `INCLUDE`"] + #[inline(always)] + pub fn is_include(&self) -> bool { + *self == SR6_A::INCLUDE + } +} +#[doc = "Field `SR6` writer - Include or exclude subregion 6 in region"] +pub type SR6_W<'a, const O: u8> = crate::BitWriter<'a, u32, SUBS_SPEC, SR6_A, O>; +impl<'a, const O: u8> SR6_W<'a, O> { + #[doc = "Exclude"] + #[inline(always)] + pub fn exclude(self) -> &'a mut W { + self.variant(SR6_A::EXCLUDE) + } + #[doc = "Include"] + #[inline(always)] + pub fn include(self) -> &'a mut W { + self.variant(SR6_A::INCLUDE) + } +} +#[doc = "Field `SR7` reader - Include or exclude subregion 7 in region"] +pub type SR7_R = crate::BitReader; +#[doc = "Include or exclude subregion 7 in region\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum SR7_A { + #[doc = "0: Exclude"] + EXCLUDE = 0, + #[doc = "1: Include"] + INCLUDE = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: SR7_A) -> Self { + variant as u8 != 0 + } +} +impl SR7_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> SR7_A { + match self.bits { + false => SR7_A::EXCLUDE, + true => SR7_A::INCLUDE, + } + } + #[doc = "Checks if the value of the field is `EXCLUDE`"] + #[inline(always)] + pub fn is_exclude(&self) -> bool { + *self == SR7_A::EXCLUDE + } + #[doc = "Checks if the value of the field is `INCLUDE`"] + #[inline(always)] + pub fn is_include(&self) -> bool { + *self == SR7_A::INCLUDE + } +} +#[doc = "Field `SR7` writer - Include or exclude subregion 7 in region"] +pub type SR7_W<'a, const O: u8> = crate::BitWriter<'a, u32, SUBS_SPEC, SR7_A, O>; +impl<'a, const O: u8> SR7_W<'a, O> { + #[doc = "Exclude"] + #[inline(always)] + pub fn exclude(self) -> &'a mut W { + self.variant(SR7_A::EXCLUDE) + } + #[doc = "Include"] + #[inline(always)] + pub fn include(self) -> &'a mut W { + self.variant(SR7_A::INCLUDE) + } +} +#[doc = "Field `SR8` reader - Include or exclude subregion 8 in region"] +pub type SR8_R = crate::BitReader; +#[doc = "Include or exclude subregion 8 in region\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum SR8_A { + #[doc = "0: Exclude"] + EXCLUDE = 0, + #[doc = "1: Include"] + INCLUDE = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: SR8_A) -> Self { + variant as u8 != 0 + } +} +impl SR8_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> SR8_A { + match self.bits { + false => SR8_A::EXCLUDE, + true => SR8_A::INCLUDE, + } + } + #[doc = "Checks if the value of the field is `EXCLUDE`"] + #[inline(always)] + pub fn is_exclude(&self) -> bool { + *self == SR8_A::EXCLUDE + } + #[doc = "Checks if the value of the field is `INCLUDE`"] + #[inline(always)] + pub fn is_include(&self) -> bool { + *self == SR8_A::INCLUDE + } +} +#[doc = "Field `SR8` writer - Include or exclude subregion 8 in region"] +pub type SR8_W<'a, const O: u8> = crate::BitWriter<'a, u32, SUBS_SPEC, SR8_A, O>; +impl<'a, const O: u8> SR8_W<'a, O> { + #[doc = "Exclude"] + #[inline(always)] + pub fn exclude(self) -> &'a mut W { + self.variant(SR8_A::EXCLUDE) + } + #[doc = "Include"] + #[inline(always)] + pub fn include(self) -> &'a mut W { + self.variant(SR8_A::INCLUDE) + } +} +#[doc = "Field `SR9` reader - Include or exclude subregion 9 in region"] +pub type SR9_R = crate::BitReader; +#[doc = "Include or exclude subregion 9 in region\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum SR9_A { + #[doc = "0: Exclude"] + EXCLUDE = 0, + #[doc = "1: Include"] + INCLUDE = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: SR9_A) -> Self { + variant as u8 != 0 + } +} +impl SR9_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> SR9_A { + match self.bits { + false => SR9_A::EXCLUDE, + true => SR9_A::INCLUDE, + } + } + #[doc = "Checks if the value of the field is `EXCLUDE`"] + #[inline(always)] + pub fn is_exclude(&self) -> bool { + *self == SR9_A::EXCLUDE + } + #[doc = "Checks if the value of the field is `INCLUDE`"] + #[inline(always)] + pub fn is_include(&self) -> bool { + *self == SR9_A::INCLUDE + } +} +#[doc = "Field `SR9` writer - Include or exclude subregion 9 in region"] +pub type SR9_W<'a, const O: u8> = crate::BitWriter<'a, u32, SUBS_SPEC, SR9_A, O>; +impl<'a, const O: u8> SR9_W<'a, O> { + #[doc = "Exclude"] + #[inline(always)] + pub fn exclude(self) -> &'a mut W { + self.variant(SR9_A::EXCLUDE) + } + #[doc = "Include"] + #[inline(always)] + pub fn include(self) -> &'a mut W { + self.variant(SR9_A::INCLUDE) + } +} +#[doc = "Field `SR10` reader - Include or exclude subregion 10 in region"] +pub type SR10_R = crate::BitReader; +#[doc = "Include or exclude subregion 10 in region\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum SR10_A { + #[doc = "0: Exclude"] + EXCLUDE = 0, + #[doc = "1: Include"] + INCLUDE = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: SR10_A) -> Self { + variant as u8 != 0 + } +} +impl SR10_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> SR10_A { + match self.bits { + false => SR10_A::EXCLUDE, + true => SR10_A::INCLUDE, + } + } + #[doc = "Checks if the value of the field is `EXCLUDE`"] + #[inline(always)] + pub fn is_exclude(&self) -> bool { + *self == SR10_A::EXCLUDE + } + #[doc = "Checks if the value of the field is `INCLUDE`"] + #[inline(always)] + pub fn is_include(&self) -> bool { + *self == SR10_A::INCLUDE + } +} +#[doc = "Field `SR10` writer - Include or exclude subregion 10 in region"] +pub type SR10_W<'a, const O: u8> = crate::BitWriter<'a, u32, SUBS_SPEC, SR10_A, O>; +impl<'a, const O: u8> SR10_W<'a, O> { + #[doc = "Exclude"] + #[inline(always)] + pub fn exclude(self) -> &'a mut W { + self.variant(SR10_A::EXCLUDE) + } + #[doc = "Include"] + #[inline(always)] + pub fn include(self) -> &'a mut W { + self.variant(SR10_A::INCLUDE) + } +} +#[doc = "Field `SR11` reader - Include or exclude subregion 11 in region"] +pub type SR11_R = crate::BitReader; +#[doc = "Include or exclude subregion 11 in region\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum SR11_A { + #[doc = "0: Exclude"] + EXCLUDE = 0, + #[doc = "1: Include"] + INCLUDE = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: SR11_A) -> Self { + variant as u8 != 0 + } +} +impl SR11_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> SR11_A { + match self.bits { + false => SR11_A::EXCLUDE, + true => SR11_A::INCLUDE, + } + } + #[doc = "Checks if the value of the field is `EXCLUDE`"] + #[inline(always)] + pub fn is_exclude(&self) -> bool { + *self == SR11_A::EXCLUDE + } + #[doc = "Checks if the value of the field is `INCLUDE`"] + #[inline(always)] + pub fn is_include(&self) -> bool { + *self == SR11_A::INCLUDE + } +} +#[doc = "Field `SR11` writer - Include or exclude subregion 11 in region"] +pub type SR11_W<'a, const O: u8> = crate::BitWriter<'a, u32, SUBS_SPEC, SR11_A, O>; +impl<'a, const O: u8> SR11_W<'a, O> { + #[doc = "Exclude"] + #[inline(always)] + pub fn exclude(self) -> &'a mut W { + self.variant(SR11_A::EXCLUDE) + } + #[doc = "Include"] + #[inline(always)] + pub fn include(self) -> &'a mut W { + self.variant(SR11_A::INCLUDE) + } +} +#[doc = "Field `SR12` reader - Include or exclude subregion 12 in region"] +pub type SR12_R = crate::BitReader; +#[doc = "Include or exclude subregion 12 in region\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum SR12_A { + #[doc = "0: Exclude"] + EXCLUDE = 0, + #[doc = "1: Include"] + INCLUDE = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: SR12_A) -> Self { + variant as u8 != 0 + } +} +impl SR12_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> SR12_A { + match self.bits { + false => SR12_A::EXCLUDE, + true => SR12_A::INCLUDE, + } + } + #[doc = "Checks if the value of the field is `EXCLUDE`"] + #[inline(always)] + pub fn is_exclude(&self) -> bool { + *self == SR12_A::EXCLUDE + } + #[doc = "Checks if the value of the field is `INCLUDE`"] + #[inline(always)] + pub fn is_include(&self) -> bool { + *self == SR12_A::INCLUDE + } +} +#[doc = "Field `SR12` writer - Include or exclude subregion 12 in region"] +pub type SR12_W<'a, const O: u8> = crate::BitWriter<'a, u32, SUBS_SPEC, SR12_A, O>; +impl<'a, const O: u8> SR12_W<'a, O> { + #[doc = "Exclude"] + #[inline(always)] + pub fn exclude(self) -> &'a mut W { + self.variant(SR12_A::EXCLUDE) + } + #[doc = "Include"] + #[inline(always)] + pub fn include(self) -> &'a mut W { + self.variant(SR12_A::INCLUDE) + } +} +#[doc = "Field `SR13` reader - Include or exclude subregion 13 in region"] +pub type SR13_R = crate::BitReader; +#[doc = "Include or exclude subregion 13 in region\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum SR13_A { + #[doc = "0: Exclude"] + EXCLUDE = 0, + #[doc = "1: Include"] + INCLUDE = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: SR13_A) -> Self { + variant as u8 != 0 + } +} +impl SR13_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> SR13_A { + match self.bits { + false => SR13_A::EXCLUDE, + true => SR13_A::INCLUDE, + } + } + #[doc = "Checks if the value of the field is `EXCLUDE`"] + #[inline(always)] + pub fn is_exclude(&self) -> bool { + *self == SR13_A::EXCLUDE + } + #[doc = "Checks if the value of the field is `INCLUDE`"] + #[inline(always)] + pub fn is_include(&self) -> bool { + *self == SR13_A::INCLUDE + } +} +#[doc = "Field `SR13` writer - Include or exclude subregion 13 in region"] +pub type SR13_W<'a, const O: u8> = crate::BitWriter<'a, u32, SUBS_SPEC, SR13_A, O>; +impl<'a, const O: u8> SR13_W<'a, O> { + #[doc = "Exclude"] + #[inline(always)] + pub fn exclude(self) -> &'a mut W { + self.variant(SR13_A::EXCLUDE) + } + #[doc = "Include"] + #[inline(always)] + pub fn include(self) -> &'a mut W { + self.variant(SR13_A::INCLUDE) + } +} +#[doc = "Field `SR14` reader - Include or exclude subregion 14 in region"] +pub type SR14_R = crate::BitReader; +#[doc = "Include or exclude subregion 14 in region\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum SR14_A { + #[doc = "0: Exclude"] + EXCLUDE = 0, + #[doc = "1: Include"] + INCLUDE = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: SR14_A) -> Self { + variant as u8 != 0 + } +} +impl SR14_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> SR14_A { + match self.bits { + false => SR14_A::EXCLUDE, + true => SR14_A::INCLUDE, + } + } + #[doc = "Checks if the value of the field is `EXCLUDE`"] + #[inline(always)] + pub fn is_exclude(&self) -> bool { + *self == SR14_A::EXCLUDE + } + #[doc = "Checks if the value of the field is `INCLUDE`"] + #[inline(always)] + pub fn is_include(&self) -> bool { + *self == SR14_A::INCLUDE + } +} +#[doc = "Field `SR14` writer - Include or exclude subregion 14 in region"] +pub type SR14_W<'a, const O: u8> = crate::BitWriter<'a, u32, SUBS_SPEC, SR14_A, O>; +impl<'a, const O: u8> SR14_W<'a, O> { + #[doc = "Exclude"] + #[inline(always)] + pub fn exclude(self) -> &'a mut W { + self.variant(SR14_A::EXCLUDE) + } + #[doc = "Include"] + #[inline(always)] + pub fn include(self) -> &'a mut W { + self.variant(SR14_A::INCLUDE) + } +} +#[doc = "Field `SR15` reader - Include or exclude subregion 15 in region"] +pub type SR15_R = crate::BitReader; +#[doc = "Include or exclude subregion 15 in region\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum SR15_A { + #[doc = "0: Exclude"] + EXCLUDE = 0, + #[doc = "1: Include"] + INCLUDE = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: SR15_A) -> Self { + variant as u8 != 0 + } +} +impl SR15_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> SR15_A { + match self.bits { + false => SR15_A::EXCLUDE, + true => SR15_A::INCLUDE, + } + } + #[doc = "Checks if the value of the field is `EXCLUDE`"] + #[inline(always)] + pub fn is_exclude(&self) -> bool { + *self == SR15_A::EXCLUDE + } + #[doc = "Checks if the value of the field is `INCLUDE`"] + #[inline(always)] + pub fn is_include(&self) -> bool { + *self == SR15_A::INCLUDE + } +} +#[doc = "Field `SR15` writer - Include or exclude subregion 15 in region"] +pub type SR15_W<'a, const O: u8> = crate::BitWriter<'a, u32, SUBS_SPEC, SR15_A, O>; +impl<'a, const O: u8> SR15_W<'a, O> { + #[doc = "Exclude"] + #[inline(always)] + pub fn exclude(self) -> &'a mut W { + self.variant(SR15_A::EXCLUDE) + } + #[doc = "Include"] + #[inline(always)] + pub fn include(self) -> &'a mut W { + self.variant(SR15_A::INCLUDE) + } +} +#[doc = "Field `SR16` reader - Include or exclude subregion 16 in region"] +pub type SR16_R = crate::BitReader; +#[doc = "Include or exclude subregion 16 in region\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum SR16_A { + #[doc = "0: Exclude"] + EXCLUDE = 0, + #[doc = "1: Include"] + INCLUDE = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: SR16_A) -> Self { + variant as u8 != 0 + } +} +impl SR16_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> SR16_A { + match self.bits { + false => SR16_A::EXCLUDE, + true => SR16_A::INCLUDE, + } + } + #[doc = "Checks if the value of the field is `EXCLUDE`"] + #[inline(always)] + pub fn is_exclude(&self) -> bool { + *self == SR16_A::EXCLUDE + } + #[doc = "Checks if the value of the field is `INCLUDE`"] + #[inline(always)] + pub fn is_include(&self) -> bool { + *self == SR16_A::INCLUDE + } +} +#[doc = "Field `SR16` writer - Include or exclude subregion 16 in region"] +pub type SR16_W<'a, const O: u8> = crate::BitWriter<'a, u32, SUBS_SPEC, SR16_A, O>; +impl<'a, const O: u8> SR16_W<'a, O> { + #[doc = "Exclude"] + #[inline(always)] + pub fn exclude(self) -> &'a mut W { + self.variant(SR16_A::EXCLUDE) + } + #[doc = "Include"] + #[inline(always)] + pub fn include(self) -> &'a mut W { + self.variant(SR16_A::INCLUDE) + } +} +#[doc = "Field `SR17` reader - Include or exclude subregion 17 in region"] +pub type SR17_R = crate::BitReader; +#[doc = "Include or exclude subregion 17 in region\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum SR17_A { + #[doc = "0: Exclude"] + EXCLUDE = 0, + #[doc = "1: Include"] + INCLUDE = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: SR17_A) -> Self { + variant as u8 != 0 + } +} +impl SR17_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> SR17_A { + match self.bits { + false => SR17_A::EXCLUDE, + true => SR17_A::INCLUDE, + } + } + #[doc = "Checks if the value of the field is `EXCLUDE`"] + #[inline(always)] + pub fn is_exclude(&self) -> bool { + *self == SR17_A::EXCLUDE + } + #[doc = "Checks if the value of the field is `INCLUDE`"] + #[inline(always)] + pub fn is_include(&self) -> bool { + *self == SR17_A::INCLUDE + } +} +#[doc = "Field `SR17` writer - Include or exclude subregion 17 in region"] +pub type SR17_W<'a, const O: u8> = crate::BitWriter<'a, u32, SUBS_SPEC, SR17_A, O>; +impl<'a, const O: u8> SR17_W<'a, O> { + #[doc = "Exclude"] + #[inline(always)] + pub fn exclude(self) -> &'a mut W { + self.variant(SR17_A::EXCLUDE) + } + #[doc = "Include"] + #[inline(always)] + pub fn include(self) -> &'a mut W { + self.variant(SR17_A::INCLUDE) + } +} +#[doc = "Field `SR18` reader - Include or exclude subregion 18 in region"] +pub type SR18_R = crate::BitReader; +#[doc = "Include or exclude subregion 18 in region\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum SR18_A { + #[doc = "0: Exclude"] + EXCLUDE = 0, + #[doc = "1: Include"] + INCLUDE = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: SR18_A) -> Self { + variant as u8 != 0 + } +} +impl SR18_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> SR18_A { + match self.bits { + false => SR18_A::EXCLUDE, + true => SR18_A::INCLUDE, + } + } + #[doc = "Checks if the value of the field is `EXCLUDE`"] + #[inline(always)] + pub fn is_exclude(&self) -> bool { + *self == SR18_A::EXCLUDE + } + #[doc = "Checks if the value of the field is `INCLUDE`"] + #[inline(always)] + pub fn is_include(&self) -> bool { + *self == SR18_A::INCLUDE + } +} +#[doc = "Field `SR18` writer - Include or exclude subregion 18 in region"] +pub type SR18_W<'a, const O: u8> = crate::BitWriter<'a, u32, SUBS_SPEC, SR18_A, O>; +impl<'a, const O: u8> SR18_W<'a, O> { + #[doc = "Exclude"] + #[inline(always)] + pub fn exclude(self) -> &'a mut W { + self.variant(SR18_A::EXCLUDE) + } + #[doc = "Include"] + #[inline(always)] + pub fn include(self) -> &'a mut W { + self.variant(SR18_A::INCLUDE) + } +} +#[doc = "Field `SR19` reader - Include or exclude subregion 19 in region"] +pub type SR19_R = crate::BitReader; +#[doc = "Include or exclude subregion 19 in region\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum SR19_A { + #[doc = "0: Exclude"] + EXCLUDE = 0, + #[doc = "1: Include"] + INCLUDE = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: SR19_A) -> Self { + variant as u8 != 0 + } +} +impl SR19_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> SR19_A { + match self.bits { + false => SR19_A::EXCLUDE, + true => SR19_A::INCLUDE, + } + } + #[doc = "Checks if the value of the field is `EXCLUDE`"] + #[inline(always)] + pub fn is_exclude(&self) -> bool { + *self == SR19_A::EXCLUDE + } + #[doc = "Checks if the value of the field is `INCLUDE`"] + #[inline(always)] + pub fn is_include(&self) -> bool { + *self == SR19_A::INCLUDE + } +} +#[doc = "Field `SR19` writer - Include or exclude subregion 19 in region"] +pub type SR19_W<'a, const O: u8> = crate::BitWriter<'a, u32, SUBS_SPEC, SR19_A, O>; +impl<'a, const O: u8> SR19_W<'a, O> { + #[doc = "Exclude"] + #[inline(always)] + pub fn exclude(self) -> &'a mut W { + self.variant(SR19_A::EXCLUDE) + } + #[doc = "Include"] + #[inline(always)] + pub fn include(self) -> &'a mut W { + self.variant(SR19_A::INCLUDE) + } +} +#[doc = "Field `SR20` reader - Include or exclude subregion 20 in region"] +pub type SR20_R = crate::BitReader; +#[doc = "Include or exclude subregion 20 in region\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum SR20_A { + #[doc = "0: Exclude"] + EXCLUDE = 0, + #[doc = "1: Include"] + INCLUDE = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: SR20_A) -> Self { + variant as u8 != 0 + } +} +impl SR20_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> SR20_A { + match self.bits { + false => SR20_A::EXCLUDE, + true => SR20_A::INCLUDE, + } + } + #[doc = "Checks if the value of the field is `EXCLUDE`"] + #[inline(always)] + pub fn is_exclude(&self) -> bool { + *self == SR20_A::EXCLUDE + } + #[doc = "Checks if the value of the field is `INCLUDE`"] + #[inline(always)] + pub fn is_include(&self) -> bool { + *self == SR20_A::INCLUDE + } +} +#[doc = "Field `SR20` writer - Include or exclude subregion 20 in region"] +pub type SR20_W<'a, const O: u8> = crate::BitWriter<'a, u32, SUBS_SPEC, SR20_A, O>; +impl<'a, const O: u8> SR20_W<'a, O> { + #[doc = "Exclude"] + #[inline(always)] + pub fn exclude(self) -> &'a mut W { + self.variant(SR20_A::EXCLUDE) + } + #[doc = "Include"] + #[inline(always)] + pub fn include(self) -> &'a mut W { + self.variant(SR20_A::INCLUDE) + } +} +#[doc = "Field `SR21` reader - Include or exclude subregion 21 in region"] +pub type SR21_R = crate::BitReader; +#[doc = "Include or exclude subregion 21 in region\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum SR21_A { + #[doc = "0: Exclude"] + EXCLUDE = 0, + #[doc = "1: Include"] + INCLUDE = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: SR21_A) -> Self { + variant as u8 != 0 + } +} +impl SR21_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> SR21_A { + match self.bits { + false => SR21_A::EXCLUDE, + true => SR21_A::INCLUDE, + } + } + #[doc = "Checks if the value of the field is `EXCLUDE`"] + #[inline(always)] + pub fn is_exclude(&self) -> bool { + *self == SR21_A::EXCLUDE + } + #[doc = "Checks if the value of the field is `INCLUDE`"] + #[inline(always)] + pub fn is_include(&self) -> bool { + *self == SR21_A::INCLUDE + } +} +#[doc = "Field `SR21` writer - Include or exclude subregion 21 in region"] +pub type SR21_W<'a, const O: u8> = crate::BitWriter<'a, u32, SUBS_SPEC, SR21_A, O>; +impl<'a, const O: u8> SR21_W<'a, O> { + #[doc = "Exclude"] + #[inline(always)] + pub fn exclude(self) -> &'a mut W { + self.variant(SR21_A::EXCLUDE) + } + #[doc = "Include"] + #[inline(always)] + pub fn include(self) -> &'a mut W { + self.variant(SR21_A::INCLUDE) + } +} +#[doc = "Field `SR22` reader - Include or exclude subregion 22 in region"] +pub type SR22_R = crate::BitReader; +#[doc = "Include or exclude subregion 22 in region\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum SR22_A { + #[doc = "0: Exclude"] + EXCLUDE = 0, + #[doc = "1: Include"] + INCLUDE = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: SR22_A) -> Self { + variant as u8 != 0 + } +} +impl SR22_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> SR22_A { + match self.bits { + false => SR22_A::EXCLUDE, + true => SR22_A::INCLUDE, + } + } + #[doc = "Checks if the value of the field is `EXCLUDE`"] + #[inline(always)] + pub fn is_exclude(&self) -> bool { + *self == SR22_A::EXCLUDE + } + #[doc = "Checks if the value of the field is `INCLUDE`"] + #[inline(always)] + pub fn is_include(&self) -> bool { + *self == SR22_A::INCLUDE + } +} +#[doc = "Field `SR22` writer - Include or exclude subregion 22 in region"] +pub type SR22_W<'a, const O: u8> = crate::BitWriter<'a, u32, SUBS_SPEC, SR22_A, O>; +impl<'a, const O: u8> SR22_W<'a, O> { + #[doc = "Exclude"] + #[inline(always)] + pub fn exclude(self) -> &'a mut W { + self.variant(SR22_A::EXCLUDE) + } + #[doc = "Include"] + #[inline(always)] + pub fn include(self) -> &'a mut W { + self.variant(SR22_A::INCLUDE) + } +} +#[doc = "Field `SR23` reader - Include or exclude subregion 23 in region"] +pub type SR23_R = crate::BitReader; +#[doc = "Include or exclude subregion 23 in region\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum SR23_A { + #[doc = "0: Exclude"] + EXCLUDE = 0, + #[doc = "1: Include"] + INCLUDE = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: SR23_A) -> Self { + variant as u8 != 0 + } +} +impl SR23_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> SR23_A { + match self.bits { + false => SR23_A::EXCLUDE, + true => SR23_A::INCLUDE, + } + } + #[doc = "Checks if the value of the field is `EXCLUDE`"] + #[inline(always)] + pub fn is_exclude(&self) -> bool { + *self == SR23_A::EXCLUDE + } + #[doc = "Checks if the value of the field is `INCLUDE`"] + #[inline(always)] + pub fn is_include(&self) -> bool { + *self == SR23_A::INCLUDE + } +} +#[doc = "Field `SR23` writer - Include or exclude subregion 23 in region"] +pub type SR23_W<'a, const O: u8> = crate::BitWriter<'a, u32, SUBS_SPEC, SR23_A, O>; +impl<'a, const O: u8> SR23_W<'a, O> { + #[doc = "Exclude"] + #[inline(always)] + pub fn exclude(self) -> &'a mut W { + self.variant(SR23_A::EXCLUDE) + } + #[doc = "Include"] + #[inline(always)] + pub fn include(self) -> &'a mut W { + self.variant(SR23_A::INCLUDE) + } +} +#[doc = "Field `SR24` reader - Include or exclude subregion 24 in region"] +pub type SR24_R = crate::BitReader; +#[doc = "Include or exclude subregion 24 in region\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum SR24_A { + #[doc = "0: Exclude"] + EXCLUDE = 0, + #[doc = "1: Include"] + INCLUDE = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: SR24_A) -> Self { + variant as u8 != 0 + } +} +impl SR24_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> SR24_A { + match self.bits { + false => SR24_A::EXCLUDE, + true => SR24_A::INCLUDE, + } + } + #[doc = "Checks if the value of the field is `EXCLUDE`"] + #[inline(always)] + pub fn is_exclude(&self) -> bool { + *self == SR24_A::EXCLUDE + } + #[doc = "Checks if the value of the field is `INCLUDE`"] + #[inline(always)] + pub fn is_include(&self) -> bool { + *self == SR24_A::INCLUDE + } +} +#[doc = "Field `SR24` writer - Include or exclude subregion 24 in region"] +pub type SR24_W<'a, const O: u8> = crate::BitWriter<'a, u32, SUBS_SPEC, SR24_A, O>; +impl<'a, const O: u8> SR24_W<'a, O> { + #[doc = "Exclude"] + #[inline(always)] + pub fn exclude(self) -> &'a mut W { + self.variant(SR24_A::EXCLUDE) + } + #[doc = "Include"] + #[inline(always)] + pub fn include(self) -> &'a mut W { + self.variant(SR24_A::INCLUDE) + } +} +#[doc = "Field `SR25` reader - Include or exclude subregion 25 in region"] +pub type SR25_R = crate::BitReader; +#[doc = "Include or exclude subregion 25 in region\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum SR25_A { + #[doc = "0: Exclude"] + EXCLUDE = 0, + #[doc = "1: Include"] + INCLUDE = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: SR25_A) -> Self { + variant as u8 != 0 + } +} +impl SR25_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> SR25_A { + match self.bits { + false => SR25_A::EXCLUDE, + true => SR25_A::INCLUDE, + } + } + #[doc = "Checks if the value of the field is `EXCLUDE`"] + #[inline(always)] + pub fn is_exclude(&self) -> bool { + *self == SR25_A::EXCLUDE + } + #[doc = "Checks if the value of the field is `INCLUDE`"] + #[inline(always)] + pub fn is_include(&self) -> bool { + *self == SR25_A::INCLUDE + } +} +#[doc = "Field `SR25` writer - Include or exclude subregion 25 in region"] +pub type SR25_W<'a, const O: u8> = crate::BitWriter<'a, u32, SUBS_SPEC, SR25_A, O>; +impl<'a, const O: u8> SR25_W<'a, O> { + #[doc = "Exclude"] + #[inline(always)] + pub fn exclude(self) -> &'a mut W { + self.variant(SR25_A::EXCLUDE) + } + #[doc = "Include"] + #[inline(always)] + pub fn include(self) -> &'a mut W { + self.variant(SR25_A::INCLUDE) + } +} +#[doc = "Field `SR26` reader - Include or exclude subregion 26 in region"] +pub type SR26_R = crate::BitReader; +#[doc = "Include or exclude subregion 26 in region\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum SR26_A { + #[doc = "0: Exclude"] + EXCLUDE = 0, + #[doc = "1: Include"] + INCLUDE = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: SR26_A) -> Self { + variant as u8 != 0 + } +} +impl SR26_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> SR26_A { + match self.bits { + false => SR26_A::EXCLUDE, + true => SR26_A::INCLUDE, + } + } + #[doc = "Checks if the value of the field is `EXCLUDE`"] + #[inline(always)] + pub fn is_exclude(&self) -> bool { + *self == SR26_A::EXCLUDE + } + #[doc = "Checks if the value of the field is `INCLUDE`"] + #[inline(always)] + pub fn is_include(&self) -> bool { + *self == SR26_A::INCLUDE + } +} +#[doc = "Field `SR26` writer - Include or exclude subregion 26 in region"] +pub type SR26_W<'a, const O: u8> = crate::BitWriter<'a, u32, SUBS_SPEC, SR26_A, O>; +impl<'a, const O: u8> SR26_W<'a, O> { + #[doc = "Exclude"] + #[inline(always)] + pub fn exclude(self) -> &'a mut W { + self.variant(SR26_A::EXCLUDE) + } + #[doc = "Include"] + #[inline(always)] + pub fn include(self) -> &'a mut W { + self.variant(SR26_A::INCLUDE) + } +} +#[doc = "Field `SR27` reader - Include or exclude subregion 27 in region"] +pub type SR27_R = crate::BitReader; +#[doc = "Include or exclude subregion 27 in region\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum SR27_A { + #[doc = "0: Exclude"] + EXCLUDE = 0, + #[doc = "1: Include"] + INCLUDE = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: SR27_A) -> Self { + variant as u8 != 0 + } +} +impl SR27_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> SR27_A { + match self.bits { + false => SR27_A::EXCLUDE, + true => SR27_A::INCLUDE, + } + } + #[doc = "Checks if the value of the field is `EXCLUDE`"] + #[inline(always)] + pub fn is_exclude(&self) -> bool { + *self == SR27_A::EXCLUDE + } + #[doc = "Checks if the value of the field is `INCLUDE`"] + #[inline(always)] + pub fn is_include(&self) -> bool { + *self == SR27_A::INCLUDE + } +} +#[doc = "Field `SR27` writer - Include or exclude subregion 27 in region"] +pub type SR27_W<'a, const O: u8> = crate::BitWriter<'a, u32, SUBS_SPEC, SR27_A, O>; +impl<'a, const O: u8> SR27_W<'a, O> { + #[doc = "Exclude"] + #[inline(always)] + pub fn exclude(self) -> &'a mut W { + self.variant(SR27_A::EXCLUDE) + } + #[doc = "Include"] + #[inline(always)] + pub fn include(self) -> &'a mut W { + self.variant(SR27_A::INCLUDE) + } +} +#[doc = "Field `SR28` reader - Include or exclude subregion 28 in region"] +pub type SR28_R = crate::BitReader; +#[doc = "Include or exclude subregion 28 in region\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum SR28_A { + #[doc = "0: Exclude"] + EXCLUDE = 0, + #[doc = "1: Include"] + INCLUDE = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: SR28_A) -> Self { + variant as u8 != 0 + } +} +impl SR28_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> SR28_A { + match self.bits { + false => SR28_A::EXCLUDE, + true => SR28_A::INCLUDE, + } + } + #[doc = "Checks if the value of the field is `EXCLUDE`"] + #[inline(always)] + pub fn is_exclude(&self) -> bool { + *self == SR28_A::EXCLUDE + } + #[doc = "Checks if the value of the field is `INCLUDE`"] + #[inline(always)] + pub fn is_include(&self) -> bool { + *self == SR28_A::INCLUDE + } +} +#[doc = "Field `SR28` writer - Include or exclude subregion 28 in region"] +pub type SR28_W<'a, const O: u8> = crate::BitWriter<'a, u32, SUBS_SPEC, SR28_A, O>; +impl<'a, const O: u8> SR28_W<'a, O> { + #[doc = "Exclude"] + #[inline(always)] + pub fn exclude(self) -> &'a mut W { + self.variant(SR28_A::EXCLUDE) + } + #[doc = "Include"] + #[inline(always)] + pub fn include(self) -> &'a mut W { + self.variant(SR28_A::INCLUDE) + } +} +#[doc = "Field `SR29` reader - Include or exclude subregion 29 in region"] +pub type SR29_R = crate::BitReader; +#[doc = "Include or exclude subregion 29 in region\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum SR29_A { + #[doc = "0: Exclude"] + EXCLUDE = 0, + #[doc = "1: Include"] + INCLUDE = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: SR29_A) -> Self { + variant as u8 != 0 + } +} +impl SR29_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> SR29_A { + match self.bits { + false => SR29_A::EXCLUDE, + true => SR29_A::INCLUDE, + } + } + #[doc = "Checks if the value of the field is `EXCLUDE`"] + #[inline(always)] + pub fn is_exclude(&self) -> bool { + *self == SR29_A::EXCLUDE + } + #[doc = "Checks if the value of the field is `INCLUDE`"] + #[inline(always)] + pub fn is_include(&self) -> bool { + *self == SR29_A::INCLUDE + } +} +#[doc = "Field `SR29` writer - Include or exclude subregion 29 in region"] +pub type SR29_W<'a, const O: u8> = crate::BitWriter<'a, u32, SUBS_SPEC, SR29_A, O>; +impl<'a, const O: u8> SR29_W<'a, O> { + #[doc = "Exclude"] + #[inline(always)] + pub fn exclude(self) -> &'a mut W { + self.variant(SR29_A::EXCLUDE) + } + #[doc = "Include"] + #[inline(always)] + pub fn include(self) -> &'a mut W { + self.variant(SR29_A::INCLUDE) + } +} +#[doc = "Field `SR30` reader - Include or exclude subregion 30 in region"] +pub type SR30_R = crate::BitReader; +#[doc = "Include or exclude subregion 30 in region\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum SR30_A { + #[doc = "0: Exclude"] + EXCLUDE = 0, + #[doc = "1: Include"] + INCLUDE = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: SR30_A) -> Self { + variant as u8 != 0 + } +} +impl SR30_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> SR30_A { + match self.bits { + false => SR30_A::EXCLUDE, + true => SR30_A::INCLUDE, + } + } + #[doc = "Checks if the value of the field is `EXCLUDE`"] + #[inline(always)] + pub fn is_exclude(&self) -> bool { + *self == SR30_A::EXCLUDE + } + #[doc = "Checks if the value of the field is `INCLUDE`"] + #[inline(always)] + pub fn is_include(&self) -> bool { + *self == SR30_A::INCLUDE + } +} +#[doc = "Field `SR30` writer - Include or exclude subregion 30 in region"] +pub type SR30_W<'a, const O: u8> = crate::BitWriter<'a, u32, SUBS_SPEC, SR30_A, O>; +impl<'a, const O: u8> SR30_W<'a, O> { + #[doc = "Exclude"] + #[inline(always)] + pub fn exclude(self) -> &'a mut W { + self.variant(SR30_A::EXCLUDE) + } + #[doc = "Include"] + #[inline(always)] + pub fn include(self) -> &'a mut W { + self.variant(SR30_A::INCLUDE) + } +} +#[doc = "Field `SR31` reader - Include or exclude subregion 31 in region"] +pub type SR31_R = crate::BitReader; +#[doc = "Include or exclude subregion 31 in region\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum SR31_A { + #[doc = "0: Exclude"] + EXCLUDE = 0, + #[doc = "1: Include"] + INCLUDE = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: SR31_A) -> Self { + variant as u8 != 0 + } +} +impl SR31_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> SR31_A { + match self.bits { + false => SR31_A::EXCLUDE, + true => SR31_A::INCLUDE, + } + } + #[doc = "Checks if the value of the field is `EXCLUDE`"] + #[inline(always)] + pub fn is_exclude(&self) -> bool { + *self == SR31_A::EXCLUDE + } + #[doc = "Checks if the value of the field is `INCLUDE`"] + #[inline(always)] + pub fn is_include(&self) -> bool { + *self == SR31_A::INCLUDE + } +} +#[doc = "Field `SR31` writer - Include or exclude subregion 31 in region"] +pub type SR31_W<'a, const O: u8> = crate::BitWriter<'a, u32, SUBS_SPEC, SR31_A, O>; +impl<'a, const O: u8> SR31_W<'a, O> { + #[doc = "Exclude"] + #[inline(always)] + pub fn exclude(self) -> &'a mut W { + self.variant(SR31_A::EXCLUDE) + } + #[doc = "Include"] + #[inline(always)] + pub fn include(self) -> &'a mut W { + self.variant(SR31_A::INCLUDE) + } +} +impl R { + #[doc = "Bit 0 - Include or exclude subregion 0 in region"] + #[inline(always)] + pub fn sr0(&self) -> SR0_R { + SR0_R::new((self.bits & 1) != 0) + } + #[doc = "Bit 1 - Include or exclude subregion 1 in region"] + #[inline(always)] + pub fn sr1(&self) -> SR1_R { + SR1_R::new(((self.bits >> 1) & 1) != 0) + } + #[doc = "Bit 2 - Include or exclude subregion 2 in region"] + #[inline(always)] + pub fn sr2(&self) -> SR2_R { + SR2_R::new(((self.bits >> 2) & 1) != 0) + } + #[doc = "Bit 3 - Include or exclude subregion 3 in region"] + #[inline(always)] + pub fn sr3(&self) -> SR3_R { + SR3_R::new(((self.bits >> 3) & 1) != 0) + } + #[doc = "Bit 4 - Include or exclude subregion 4 in region"] + #[inline(always)] + pub fn sr4(&self) -> SR4_R { + SR4_R::new(((self.bits >> 4) & 1) != 0) + } + #[doc = "Bit 5 - Include or exclude subregion 5 in region"] + #[inline(always)] + pub fn sr5(&self) -> SR5_R { + SR5_R::new(((self.bits >> 5) & 1) != 0) + } + #[doc = "Bit 6 - Include or exclude subregion 6 in region"] + #[inline(always)] + pub fn sr6(&self) -> SR6_R { + SR6_R::new(((self.bits >> 6) & 1) != 0) + } + #[doc = "Bit 7 - Include or exclude subregion 7 in region"] + #[inline(always)] + pub fn sr7(&self) -> SR7_R { + SR7_R::new(((self.bits >> 7) & 1) != 0) + } + #[doc = "Bit 8 - Include or exclude subregion 8 in region"] + #[inline(always)] + pub fn sr8(&self) -> SR8_R { + SR8_R::new(((self.bits >> 8) & 1) != 0) + } + #[doc = "Bit 9 - Include or exclude subregion 9 in region"] + #[inline(always)] + pub fn sr9(&self) -> SR9_R { + SR9_R::new(((self.bits >> 9) & 1) != 0) + } + #[doc = "Bit 10 - Include or exclude subregion 10 in region"] + #[inline(always)] + pub fn sr10(&self) -> SR10_R { + SR10_R::new(((self.bits >> 10) & 1) != 0) + } + #[doc = "Bit 11 - Include or exclude subregion 11 in region"] + #[inline(always)] + pub fn sr11(&self) -> SR11_R { + SR11_R::new(((self.bits >> 11) & 1) != 0) + } + #[doc = "Bit 12 - Include or exclude subregion 12 in region"] + #[inline(always)] + pub fn sr12(&self) -> SR12_R { + SR12_R::new(((self.bits >> 12) & 1) != 0) + } + #[doc = "Bit 13 - Include or exclude subregion 13 in region"] + #[inline(always)] + pub fn sr13(&self) -> SR13_R { + SR13_R::new(((self.bits >> 13) & 1) != 0) + } + #[doc = "Bit 14 - Include or exclude subregion 14 in region"] + #[inline(always)] + pub fn sr14(&self) -> SR14_R { + SR14_R::new(((self.bits >> 14) & 1) != 0) + } + #[doc = "Bit 15 - Include or exclude subregion 15 in region"] + #[inline(always)] + pub fn sr15(&self) -> SR15_R { + SR15_R::new(((self.bits >> 15) & 1) != 0) + } + #[doc = "Bit 16 - Include or exclude subregion 16 in region"] + #[inline(always)] + pub fn sr16(&self) -> SR16_R { + SR16_R::new(((self.bits >> 16) & 1) != 0) + } + #[doc = "Bit 17 - Include or exclude subregion 17 in region"] + #[inline(always)] + pub fn sr17(&self) -> SR17_R { + SR17_R::new(((self.bits >> 17) & 1) != 0) + } + #[doc = "Bit 18 - Include or exclude subregion 18 in region"] + #[inline(always)] + pub fn sr18(&self) -> SR18_R { + SR18_R::new(((self.bits >> 18) & 1) != 0) + } + #[doc = "Bit 19 - Include or exclude subregion 19 in region"] + #[inline(always)] + pub fn sr19(&self) -> SR19_R { + SR19_R::new(((self.bits >> 19) & 1) != 0) + } + #[doc = "Bit 20 - Include or exclude subregion 20 in region"] + #[inline(always)] + pub fn sr20(&self) -> SR20_R { + SR20_R::new(((self.bits >> 20) & 1) != 0) + } + #[doc = "Bit 21 - Include or exclude subregion 21 in region"] + #[inline(always)] + pub fn sr21(&self) -> SR21_R { + SR21_R::new(((self.bits >> 21) & 1) != 0) + } + #[doc = "Bit 22 - Include or exclude subregion 22 in region"] + #[inline(always)] + pub fn sr22(&self) -> SR22_R { + SR22_R::new(((self.bits >> 22) & 1) != 0) + } + #[doc = "Bit 23 - Include or exclude subregion 23 in region"] + #[inline(always)] + pub fn sr23(&self) -> SR23_R { + SR23_R::new(((self.bits >> 23) & 1) != 0) + } + #[doc = "Bit 24 - Include or exclude subregion 24 in region"] + #[inline(always)] + pub fn sr24(&self) -> SR24_R { + SR24_R::new(((self.bits >> 24) & 1) != 0) + } + #[doc = "Bit 25 - Include or exclude subregion 25 in region"] + #[inline(always)] + pub fn sr25(&self) -> SR25_R { + SR25_R::new(((self.bits >> 25) & 1) != 0) + } + #[doc = "Bit 26 - Include or exclude subregion 26 in region"] + #[inline(always)] + pub fn sr26(&self) -> SR26_R { + SR26_R::new(((self.bits >> 26) & 1) != 0) + } + #[doc = "Bit 27 - Include or exclude subregion 27 in region"] + #[inline(always)] + pub fn sr27(&self) -> SR27_R { + SR27_R::new(((self.bits >> 27) & 1) != 0) + } + #[doc = "Bit 28 - Include or exclude subregion 28 in region"] + #[inline(always)] + pub fn sr28(&self) -> SR28_R { + SR28_R::new(((self.bits >> 28) & 1) != 0) + } + #[doc = "Bit 29 - Include or exclude subregion 29 in region"] + #[inline(always)] + pub fn sr29(&self) -> SR29_R { + SR29_R::new(((self.bits >> 29) & 1) != 0) + } + #[doc = "Bit 30 - Include or exclude subregion 30 in region"] + #[inline(always)] + pub fn sr30(&self) -> SR30_R { + SR30_R::new(((self.bits >> 30) & 1) != 0) + } + #[doc = "Bit 31 - Include or exclude subregion 31 in region"] + #[inline(always)] + pub fn sr31(&self) -> SR31_R { + SR31_R::new(((self.bits >> 31) & 1) != 0) + } +} +impl W { + #[doc = "Bit 0 - Include or exclude subregion 0 in region"] + #[inline(always)] + #[must_use] + pub fn sr0(&mut self) -> SR0_W<0> { + SR0_W::new(self) + } + #[doc = "Bit 1 - Include or exclude subregion 1 in region"] + #[inline(always)] + #[must_use] + pub fn sr1(&mut self) -> SR1_W<1> { + SR1_W::new(self) + } + #[doc = "Bit 2 - Include or exclude subregion 2 in region"] + #[inline(always)] + #[must_use] + pub fn sr2(&mut self) -> SR2_W<2> { + SR2_W::new(self) + } + #[doc = "Bit 3 - Include or exclude subregion 3 in region"] + #[inline(always)] + #[must_use] + pub fn sr3(&mut self) -> SR3_W<3> { + SR3_W::new(self) + } + #[doc = "Bit 4 - Include or exclude subregion 4 in region"] + #[inline(always)] + #[must_use] + pub fn sr4(&mut self) -> SR4_W<4> { + SR4_W::new(self) + } + #[doc = "Bit 5 - Include or exclude subregion 5 in region"] + #[inline(always)] + #[must_use] + pub fn sr5(&mut self) -> SR5_W<5> { + SR5_W::new(self) + } + #[doc = "Bit 6 - Include or exclude subregion 6 in region"] + #[inline(always)] + #[must_use] + pub fn sr6(&mut self) -> SR6_W<6> { + SR6_W::new(self) + } + #[doc = "Bit 7 - Include or exclude subregion 7 in region"] + #[inline(always)] + #[must_use] + pub fn sr7(&mut self) -> SR7_W<7> { + SR7_W::new(self) + } + #[doc = "Bit 8 - Include or exclude subregion 8 in region"] + #[inline(always)] + #[must_use] + pub fn sr8(&mut self) -> SR8_W<8> { + SR8_W::new(self) + } + #[doc = "Bit 9 - Include or exclude subregion 9 in region"] + #[inline(always)] + #[must_use] + pub fn sr9(&mut self) -> SR9_W<9> { + SR9_W::new(self) + } + #[doc = "Bit 10 - Include or exclude subregion 10 in region"] + #[inline(always)] + #[must_use] + pub fn sr10(&mut self) -> SR10_W<10> { + SR10_W::new(self) + } + #[doc = "Bit 11 - Include or exclude subregion 11 in region"] + #[inline(always)] + #[must_use] + pub fn sr11(&mut self) -> SR11_W<11> { + SR11_W::new(self) + } + #[doc = "Bit 12 - Include or exclude subregion 12 in region"] + #[inline(always)] + #[must_use] + pub fn sr12(&mut self) -> SR12_W<12> { + SR12_W::new(self) + } + #[doc = "Bit 13 - Include or exclude subregion 13 in region"] + #[inline(always)] + #[must_use] + pub fn sr13(&mut self) -> SR13_W<13> { + SR13_W::new(self) + } + #[doc = "Bit 14 - Include or exclude subregion 14 in region"] + #[inline(always)] + #[must_use] + pub fn sr14(&mut self) -> SR14_W<14> { + SR14_W::new(self) + } + #[doc = "Bit 15 - Include or exclude subregion 15 in region"] + #[inline(always)] + #[must_use] + pub fn sr15(&mut self) -> SR15_W<15> { + SR15_W::new(self) + } + #[doc = "Bit 16 - Include or exclude subregion 16 in region"] + #[inline(always)] + #[must_use] + pub fn sr16(&mut self) -> SR16_W<16> { + SR16_W::new(self) + } + #[doc = "Bit 17 - Include or exclude subregion 17 in region"] + #[inline(always)] + #[must_use] + pub fn sr17(&mut self) -> SR17_W<17> { + SR17_W::new(self) + } + #[doc = "Bit 18 - Include or exclude subregion 18 in region"] + #[inline(always)] + #[must_use] + pub fn sr18(&mut self) -> SR18_W<18> { + SR18_W::new(self) + } + #[doc = "Bit 19 - Include or exclude subregion 19 in region"] + #[inline(always)] + #[must_use] + pub fn sr19(&mut self) -> SR19_W<19> { + SR19_W::new(self) + } + #[doc = "Bit 20 - Include or exclude subregion 20 in region"] + #[inline(always)] + #[must_use] + pub fn sr20(&mut self) -> SR20_W<20> { + SR20_W::new(self) + } + #[doc = "Bit 21 - Include or exclude subregion 21 in region"] + #[inline(always)] + #[must_use] + pub fn sr21(&mut self) -> SR21_W<21> { + SR21_W::new(self) + } + #[doc = "Bit 22 - Include or exclude subregion 22 in region"] + #[inline(always)] + #[must_use] + pub fn sr22(&mut self) -> SR22_W<22> { + SR22_W::new(self) + } + #[doc = "Bit 23 - Include or exclude subregion 23 in region"] + #[inline(always)] + #[must_use] + pub fn sr23(&mut self) -> SR23_W<23> { + SR23_W::new(self) + } + #[doc = "Bit 24 - Include or exclude subregion 24 in region"] + #[inline(always)] + #[must_use] + pub fn sr24(&mut self) -> SR24_W<24> { + SR24_W::new(self) + } + #[doc = "Bit 25 - Include or exclude subregion 25 in region"] + #[inline(always)] + #[must_use] + pub fn sr25(&mut self) -> SR25_W<25> { + SR25_W::new(self) + } + #[doc = "Bit 26 - Include or exclude subregion 26 in region"] + #[inline(always)] + #[must_use] + pub fn sr26(&mut self) -> SR26_W<26> { + SR26_W::new(self) + } + #[doc = "Bit 27 - Include or exclude subregion 27 in region"] + #[inline(always)] + #[must_use] + pub fn sr27(&mut self) -> SR27_W<27> { + SR27_W::new(self) + } + #[doc = "Bit 28 - Include or exclude subregion 28 in region"] + #[inline(always)] + #[must_use] + pub fn sr28(&mut self) -> SR28_W<28> { + SR28_W::new(self) + } + #[doc = "Bit 29 - Include or exclude subregion 29 in region"] + #[inline(always)] + #[must_use] + pub fn sr29(&mut self) -> SR29_W<29> { + SR29_W::new(self) + } + #[doc = "Bit 30 - Include or exclude subregion 30 in region"] + #[inline(always)] + #[must_use] + pub fn sr30(&mut self) -> SR30_W<30> { + SR30_W::new(self) + } + #[doc = "Bit 31 - Include or exclude subregion 31 in region"] + #[inline(always)] + #[must_use] + pub fn sr31(&mut self) -> SR31_W<31> { + SR31_W::new(self) + } + #[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 = "Description cluster: Subregions of region n\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 [subs](index.html) module"] +pub struct SUBS_SPEC; +impl crate::RegisterSpec for SUBS_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [subs::R](R) reader structure"] +impl crate::Readable for SUBS_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [subs::W](W) writer structure"] +impl crate::Writable for SUBS_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets SUBS to value 0"] +impl crate::Resettable for SUBS_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/mwu/region.rs b/down-the-stack/dk_pac/src/mwu/region.rs new file mode 100644 index 0000000..7dbf477 --- /dev/null +++ b/down-the-stack/dk_pac/src/mwu/region.rs @@ -0,0 +1,16 @@ +#[doc = r"Register block"] +#[repr(C)] +pub struct REGION { + #[doc = "0x00 - Description cluster: Start address for region n"] + pub start: START, + #[doc = "0x04 - Description cluster: End address of region n"] + pub end: END, +} +#[doc = "START (rw) register accessor: an alias for `Reg`"] +pub type START = crate::Reg; +#[doc = "Description cluster: Start address for region n"] +pub mod start; +#[doc = "END (rw) register accessor: an alias for `Reg`"] +pub type END = crate::Reg; +#[doc = "Description cluster: End address of region n"] +pub mod end; diff --git a/down-the-stack/dk_pac/src/mwu/region/end.rs b/down-the-stack/dk_pac/src/mwu/region/end.rs new file mode 100644 index 0000000..18aefa0 --- /dev/null +++ b/down-the-stack/dk_pac/src/mwu/region/end.rs @@ -0,0 +1,80 @@ +#[doc = "Register `END` 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 `END` 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 `END` reader - End address of region."] +pub type END_R = crate::FieldReader; +#[doc = "Field `END` writer - End address of region."] +pub type END_W<'a, const O: u8> = crate::FieldWriter<'a, u32, END_SPEC, u32, u32, 32, O>; +impl R { + #[doc = "Bits 0:31 - End address of region."] + #[inline(always)] + pub fn end(&self) -> END_R { + END_R::new(self.bits) + } +} +impl W { + #[doc = "Bits 0:31 - End address of region."] + #[inline(always)] + #[must_use] + pub fn end(&mut self) -> END_W<0> { + END_W::new(self) + } + #[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 = "Description cluster: End address of region n\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 [end](index.html) module"] +pub struct END_SPEC; +impl crate::RegisterSpec for END_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [end::R](R) reader structure"] +impl crate::Readable for END_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [end::W](W) writer structure"] +impl crate::Writable for END_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets END to value 0"] +impl crate::Resettable for END_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/mwu/region/start.rs b/down-the-stack/dk_pac/src/mwu/region/start.rs new file mode 100644 index 0000000..7bb666e --- /dev/null +++ b/down-the-stack/dk_pac/src/mwu/region/start.rs @@ -0,0 +1,80 @@ +#[doc = "Register `START` 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 `START` 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 `START` reader - Start address for region"] +pub type START_R = crate::FieldReader; +#[doc = "Field `START` writer - Start address for region"] +pub type START_W<'a, const O: u8> = crate::FieldWriter<'a, u32, START_SPEC, u32, u32, 32, O>; +impl R { + #[doc = "Bits 0:31 - Start address for region"] + #[inline(always)] + pub fn start(&self) -> START_R { + START_R::new(self.bits) + } +} +impl W { + #[doc = "Bits 0:31 - Start address for region"] + #[inline(always)] + #[must_use] + pub fn start(&mut self) -> START_W<0> { + 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 + } +} +#[doc = "Description cluster: Start address for region n\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 [start](index.html) module"] +pub struct START_SPEC; +impl crate::RegisterSpec for START_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [start::R](R) reader structure"] +impl crate::Readable for START_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [start::W](W) writer structure"] +impl crate::Writable for 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 START to value 0"] +impl crate::Resettable for START_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/mwu/regionen.rs b/down-the-stack/dk_pac/src/mwu/regionen.rs new file mode 100644 index 0000000..41fca1e --- /dev/null +++ b/down-the-stack/dk_pac/src/mwu/regionen.rs @@ -0,0 +1,797 @@ +#[doc = "Register `REGIONEN` 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 `REGIONEN` 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 `RGN0WA` reader - Enable/disable write access watch in region\\[0\\]"] +pub type RGN0WA_R = crate::BitReader; +#[doc = "Enable/disable write access watch in region\\[0\\]\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum RGN0WA_A { + #[doc = "0: Disable write access watch in this region"] + DISABLE = 0, + #[doc = "1: Enable write access watch in this region"] + ENABLE = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: RGN0WA_A) -> Self { + variant as u8 != 0 + } +} +impl RGN0WA_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> RGN0WA_A { + match self.bits { + false => RGN0WA_A::DISABLE, + true => RGN0WA_A::ENABLE, + } + } + #[doc = "Checks if the value of the field is `DISABLE`"] + #[inline(always)] + pub fn is_disable(&self) -> bool { + *self == RGN0WA_A::DISABLE + } + #[doc = "Checks if the value of the field is `ENABLE`"] + #[inline(always)] + pub fn is_enable(&self) -> bool { + *self == RGN0WA_A::ENABLE + } +} +#[doc = "Field `RGN0WA` writer - Enable/disable write access watch in region\\[0\\]"] +pub type RGN0WA_W<'a, const O: u8> = crate::BitWriter<'a, u32, REGIONEN_SPEC, RGN0WA_A, O>; +impl<'a, const O: u8> RGN0WA_W<'a, O> { + #[doc = "Disable write access watch in this region"] + #[inline(always)] + pub fn disable(self) -> &'a mut W { + self.variant(RGN0WA_A::DISABLE) + } + #[doc = "Enable write access watch in this region"] + #[inline(always)] + pub fn enable(self) -> &'a mut W { + self.variant(RGN0WA_A::ENABLE) + } +} +#[doc = "Field `RGN0RA` reader - Enable/disable read access watch in region\\[0\\]"] +pub type RGN0RA_R = crate::BitReader; +#[doc = "Enable/disable read access watch in region\\[0\\]\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum RGN0RA_A { + #[doc = "0: Disable read access watch in this region"] + DISABLE = 0, + #[doc = "1: Enable read access watch in this region"] + ENABLE = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: RGN0RA_A) -> Self { + variant as u8 != 0 + } +} +impl RGN0RA_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> RGN0RA_A { + match self.bits { + false => RGN0RA_A::DISABLE, + true => RGN0RA_A::ENABLE, + } + } + #[doc = "Checks if the value of the field is `DISABLE`"] + #[inline(always)] + pub fn is_disable(&self) -> bool { + *self == RGN0RA_A::DISABLE + } + #[doc = "Checks if the value of the field is `ENABLE`"] + #[inline(always)] + pub fn is_enable(&self) -> bool { + *self == RGN0RA_A::ENABLE + } +} +#[doc = "Field `RGN0RA` writer - Enable/disable read access watch in region\\[0\\]"] +pub type RGN0RA_W<'a, const O: u8> = crate::BitWriter<'a, u32, REGIONEN_SPEC, RGN0RA_A, O>; +impl<'a, const O: u8> RGN0RA_W<'a, O> { + #[doc = "Disable read access watch in this region"] + #[inline(always)] + pub fn disable(self) -> &'a mut W { + self.variant(RGN0RA_A::DISABLE) + } + #[doc = "Enable read access watch in this region"] + #[inline(always)] + pub fn enable(self) -> &'a mut W { + self.variant(RGN0RA_A::ENABLE) + } +} +#[doc = "Field `RGN1WA` reader - Enable/disable write access watch in region\\[1\\]"] +pub type RGN1WA_R = crate::BitReader; +#[doc = "Enable/disable write access watch in region\\[1\\]\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum RGN1WA_A { + #[doc = "0: Disable write access watch in this region"] + DISABLE = 0, + #[doc = "1: Enable write access watch in this region"] + ENABLE = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: RGN1WA_A) -> Self { + variant as u8 != 0 + } +} +impl RGN1WA_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> RGN1WA_A { + match self.bits { + false => RGN1WA_A::DISABLE, + true => RGN1WA_A::ENABLE, + } + } + #[doc = "Checks if the value of the field is `DISABLE`"] + #[inline(always)] + pub fn is_disable(&self) -> bool { + *self == RGN1WA_A::DISABLE + } + #[doc = "Checks if the value of the field is `ENABLE`"] + #[inline(always)] + pub fn is_enable(&self) -> bool { + *self == RGN1WA_A::ENABLE + } +} +#[doc = "Field `RGN1WA` writer - Enable/disable write access watch in region\\[1\\]"] +pub type RGN1WA_W<'a, const O: u8> = crate::BitWriter<'a, u32, REGIONEN_SPEC, RGN1WA_A, O>; +impl<'a, const O: u8> RGN1WA_W<'a, O> { + #[doc = "Disable write access watch in this region"] + #[inline(always)] + pub fn disable(self) -> &'a mut W { + self.variant(RGN1WA_A::DISABLE) + } + #[doc = "Enable write access watch in this region"] + #[inline(always)] + pub fn enable(self) -> &'a mut W { + self.variant(RGN1WA_A::ENABLE) + } +} +#[doc = "Field `RGN1RA` reader - Enable/disable read access watch in region\\[1\\]"] +pub type RGN1RA_R = crate::BitReader; +#[doc = "Enable/disable read access watch in region\\[1\\]\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum RGN1RA_A { + #[doc = "0: Disable read access watch in this region"] + DISABLE = 0, + #[doc = "1: Enable read access watch in this region"] + ENABLE = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: RGN1RA_A) -> Self { + variant as u8 != 0 + } +} +impl RGN1RA_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> RGN1RA_A { + match self.bits { + false => RGN1RA_A::DISABLE, + true => RGN1RA_A::ENABLE, + } + } + #[doc = "Checks if the value of the field is `DISABLE`"] + #[inline(always)] + pub fn is_disable(&self) -> bool { + *self == RGN1RA_A::DISABLE + } + #[doc = "Checks if the value of the field is `ENABLE`"] + #[inline(always)] + pub fn is_enable(&self) -> bool { + *self == RGN1RA_A::ENABLE + } +} +#[doc = "Field `RGN1RA` writer - Enable/disable read access watch in region\\[1\\]"] +pub type RGN1RA_W<'a, const O: u8> = crate::BitWriter<'a, u32, REGIONEN_SPEC, RGN1RA_A, O>; +impl<'a, const O: u8> RGN1RA_W<'a, O> { + #[doc = "Disable read access watch in this region"] + #[inline(always)] + pub fn disable(self) -> &'a mut W { + self.variant(RGN1RA_A::DISABLE) + } + #[doc = "Enable read access watch in this region"] + #[inline(always)] + pub fn enable(self) -> &'a mut W { + self.variant(RGN1RA_A::ENABLE) + } +} +#[doc = "Field `RGN2WA` reader - Enable/disable write access watch in region\\[2\\]"] +pub type RGN2WA_R = crate::BitReader; +#[doc = "Enable/disable write access watch in region\\[2\\]\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum RGN2WA_A { + #[doc = "0: Disable write access watch in this region"] + DISABLE = 0, + #[doc = "1: Enable write access watch in this region"] + ENABLE = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: RGN2WA_A) -> Self { + variant as u8 != 0 + } +} +impl RGN2WA_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> RGN2WA_A { + match self.bits { + false => RGN2WA_A::DISABLE, + true => RGN2WA_A::ENABLE, + } + } + #[doc = "Checks if the value of the field is `DISABLE`"] + #[inline(always)] + pub fn is_disable(&self) -> bool { + *self == RGN2WA_A::DISABLE + } + #[doc = "Checks if the value of the field is `ENABLE`"] + #[inline(always)] + pub fn is_enable(&self) -> bool { + *self == RGN2WA_A::ENABLE + } +} +#[doc = "Field `RGN2WA` writer - Enable/disable write access watch in region\\[2\\]"] +pub type RGN2WA_W<'a, const O: u8> = crate::BitWriter<'a, u32, REGIONEN_SPEC, RGN2WA_A, O>; +impl<'a, const O: u8> RGN2WA_W<'a, O> { + #[doc = "Disable write access watch in this region"] + #[inline(always)] + pub fn disable(self) -> &'a mut W { + self.variant(RGN2WA_A::DISABLE) + } + #[doc = "Enable write access watch in this region"] + #[inline(always)] + pub fn enable(self) -> &'a mut W { + self.variant(RGN2WA_A::ENABLE) + } +} +#[doc = "Field `RGN2RA` reader - Enable/disable read access watch in region\\[2\\]"] +pub type RGN2RA_R = crate::BitReader; +#[doc = "Enable/disable read access watch in region\\[2\\]\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum RGN2RA_A { + #[doc = "0: Disable read access watch in this region"] + DISABLE = 0, + #[doc = "1: Enable read access watch in this region"] + ENABLE = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: RGN2RA_A) -> Self { + variant as u8 != 0 + } +} +impl RGN2RA_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> RGN2RA_A { + match self.bits { + false => RGN2RA_A::DISABLE, + true => RGN2RA_A::ENABLE, + } + } + #[doc = "Checks if the value of the field is `DISABLE`"] + #[inline(always)] + pub fn is_disable(&self) -> bool { + *self == RGN2RA_A::DISABLE + } + #[doc = "Checks if the value of the field is `ENABLE`"] + #[inline(always)] + pub fn is_enable(&self) -> bool { + *self == RGN2RA_A::ENABLE + } +} +#[doc = "Field `RGN2RA` writer - Enable/disable read access watch in region\\[2\\]"] +pub type RGN2RA_W<'a, const O: u8> = crate::BitWriter<'a, u32, REGIONEN_SPEC, RGN2RA_A, O>; +impl<'a, const O: u8> RGN2RA_W<'a, O> { + #[doc = "Disable read access watch in this region"] + #[inline(always)] + pub fn disable(self) -> &'a mut W { + self.variant(RGN2RA_A::DISABLE) + } + #[doc = "Enable read access watch in this region"] + #[inline(always)] + pub fn enable(self) -> &'a mut W { + self.variant(RGN2RA_A::ENABLE) + } +} +#[doc = "Field `RGN3WA` reader - Enable/disable write access watch in region\\[3\\]"] +pub type RGN3WA_R = crate::BitReader; +#[doc = "Enable/disable write access watch in region\\[3\\]\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum RGN3WA_A { + #[doc = "0: Disable write access watch in this region"] + DISABLE = 0, + #[doc = "1: Enable write access watch in this region"] + ENABLE = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: RGN3WA_A) -> Self { + variant as u8 != 0 + } +} +impl RGN3WA_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> RGN3WA_A { + match self.bits { + false => RGN3WA_A::DISABLE, + true => RGN3WA_A::ENABLE, + } + } + #[doc = "Checks if the value of the field is `DISABLE`"] + #[inline(always)] + pub fn is_disable(&self) -> bool { + *self == RGN3WA_A::DISABLE + } + #[doc = "Checks if the value of the field is `ENABLE`"] + #[inline(always)] + pub fn is_enable(&self) -> bool { + *self == RGN3WA_A::ENABLE + } +} +#[doc = "Field `RGN3WA` writer - Enable/disable write access watch in region\\[3\\]"] +pub type RGN3WA_W<'a, const O: u8> = crate::BitWriter<'a, u32, REGIONEN_SPEC, RGN3WA_A, O>; +impl<'a, const O: u8> RGN3WA_W<'a, O> { + #[doc = "Disable write access watch in this region"] + #[inline(always)] + pub fn disable(self) -> &'a mut W { + self.variant(RGN3WA_A::DISABLE) + } + #[doc = "Enable write access watch in this region"] + #[inline(always)] + pub fn enable(self) -> &'a mut W { + self.variant(RGN3WA_A::ENABLE) + } +} +#[doc = "Field `RGN3RA` reader - Enable/disable read access watch in region\\[3\\]"] +pub type RGN3RA_R = crate::BitReader; +#[doc = "Enable/disable read access watch in region\\[3\\]\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum RGN3RA_A { + #[doc = "0: Disable read access watch in this region"] + DISABLE = 0, + #[doc = "1: Enable read access watch in this region"] + ENABLE = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: RGN3RA_A) -> Self { + variant as u8 != 0 + } +} +impl RGN3RA_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> RGN3RA_A { + match self.bits { + false => RGN3RA_A::DISABLE, + true => RGN3RA_A::ENABLE, + } + } + #[doc = "Checks if the value of the field is `DISABLE`"] + #[inline(always)] + pub fn is_disable(&self) -> bool { + *self == RGN3RA_A::DISABLE + } + #[doc = "Checks if the value of the field is `ENABLE`"] + #[inline(always)] + pub fn is_enable(&self) -> bool { + *self == RGN3RA_A::ENABLE + } +} +#[doc = "Field `RGN3RA` writer - Enable/disable read access watch in region\\[3\\]"] +pub type RGN3RA_W<'a, const O: u8> = crate::BitWriter<'a, u32, REGIONEN_SPEC, RGN3RA_A, O>; +impl<'a, const O: u8> RGN3RA_W<'a, O> { + #[doc = "Disable read access watch in this region"] + #[inline(always)] + pub fn disable(self) -> &'a mut W { + self.variant(RGN3RA_A::DISABLE) + } + #[doc = "Enable read access watch in this region"] + #[inline(always)] + pub fn enable(self) -> &'a mut W { + self.variant(RGN3RA_A::ENABLE) + } +} +#[doc = "Field `PRGN0WA` reader - Enable/disable write access watch in PREGION\\[0\\]"] +pub type PRGN0WA_R = crate::BitReader; +#[doc = "Enable/disable write access watch in PREGION\\[0\\]\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PRGN0WA_A { + #[doc = "0: Disable write access watch in this PREGION"] + DISABLE = 0, + #[doc = "1: Enable write access watch in this PREGION"] + ENABLE = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PRGN0WA_A) -> Self { + variant as u8 != 0 + } +} +impl PRGN0WA_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> PRGN0WA_A { + match self.bits { + false => PRGN0WA_A::DISABLE, + true => PRGN0WA_A::ENABLE, + } + } + #[doc = "Checks if the value of the field is `DISABLE`"] + #[inline(always)] + pub fn is_disable(&self) -> bool { + *self == PRGN0WA_A::DISABLE + } + #[doc = "Checks if the value of the field is `ENABLE`"] + #[inline(always)] + pub fn is_enable(&self) -> bool { + *self == PRGN0WA_A::ENABLE + } +} +#[doc = "Field `PRGN0WA` writer - Enable/disable write access watch in PREGION\\[0\\]"] +pub type PRGN0WA_W<'a, const O: u8> = crate::BitWriter<'a, u32, REGIONEN_SPEC, PRGN0WA_A, O>; +impl<'a, const O: u8> PRGN0WA_W<'a, O> { + #[doc = "Disable write access watch in this PREGION"] + #[inline(always)] + pub fn disable(self) -> &'a mut W { + self.variant(PRGN0WA_A::DISABLE) + } + #[doc = "Enable write access watch in this PREGION"] + #[inline(always)] + pub fn enable(self) -> &'a mut W { + self.variant(PRGN0WA_A::ENABLE) + } +} +#[doc = "Field `PRGN0RA` reader - Enable/disable read access watch in PREGION\\[0\\]"] +pub type PRGN0RA_R = crate::BitReader; +#[doc = "Enable/disable read access watch in PREGION\\[0\\]\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PRGN0RA_A { + #[doc = "0: Disable read access watch in this PREGION"] + DISABLE = 0, + #[doc = "1: Enable read access watch in this PREGION"] + ENABLE = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PRGN0RA_A) -> Self { + variant as u8 != 0 + } +} +impl PRGN0RA_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> PRGN0RA_A { + match self.bits { + false => PRGN0RA_A::DISABLE, + true => PRGN0RA_A::ENABLE, + } + } + #[doc = "Checks if the value of the field is `DISABLE`"] + #[inline(always)] + pub fn is_disable(&self) -> bool { + *self == PRGN0RA_A::DISABLE + } + #[doc = "Checks if the value of the field is `ENABLE`"] + #[inline(always)] + pub fn is_enable(&self) -> bool { + *self == PRGN0RA_A::ENABLE + } +} +#[doc = "Field `PRGN0RA` writer - Enable/disable read access watch in PREGION\\[0\\]"] +pub type PRGN0RA_W<'a, const O: u8> = crate::BitWriter<'a, u32, REGIONEN_SPEC, PRGN0RA_A, O>; +impl<'a, const O: u8> PRGN0RA_W<'a, O> { + #[doc = "Disable read access watch in this PREGION"] + #[inline(always)] + pub fn disable(self) -> &'a mut W { + self.variant(PRGN0RA_A::DISABLE) + } + #[doc = "Enable read access watch in this PREGION"] + #[inline(always)] + pub fn enable(self) -> &'a mut W { + self.variant(PRGN0RA_A::ENABLE) + } +} +#[doc = "Field `PRGN1WA` reader - Enable/disable write access watch in PREGION\\[1\\]"] +pub type PRGN1WA_R = crate::BitReader; +#[doc = "Enable/disable write access watch in PREGION\\[1\\]\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PRGN1WA_A { + #[doc = "0: Disable write access watch in this PREGION"] + DISABLE = 0, + #[doc = "1: Enable write access watch in this PREGION"] + ENABLE = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PRGN1WA_A) -> Self { + variant as u8 != 0 + } +} +impl PRGN1WA_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> PRGN1WA_A { + match self.bits { + false => PRGN1WA_A::DISABLE, + true => PRGN1WA_A::ENABLE, + } + } + #[doc = "Checks if the value of the field is `DISABLE`"] + #[inline(always)] + pub fn is_disable(&self) -> bool { + *self == PRGN1WA_A::DISABLE + } + #[doc = "Checks if the value of the field is `ENABLE`"] + #[inline(always)] + pub fn is_enable(&self) -> bool { + *self == PRGN1WA_A::ENABLE + } +} +#[doc = "Field `PRGN1WA` writer - Enable/disable write access watch in PREGION\\[1\\]"] +pub type PRGN1WA_W<'a, const O: u8> = crate::BitWriter<'a, u32, REGIONEN_SPEC, PRGN1WA_A, O>; +impl<'a, const O: u8> PRGN1WA_W<'a, O> { + #[doc = "Disable write access watch in this PREGION"] + #[inline(always)] + pub fn disable(self) -> &'a mut W { + self.variant(PRGN1WA_A::DISABLE) + } + #[doc = "Enable write access watch in this PREGION"] + #[inline(always)] + pub fn enable(self) -> &'a mut W { + self.variant(PRGN1WA_A::ENABLE) + } +} +#[doc = "Field `PRGN1RA` reader - Enable/disable read access watch in PREGION\\[1\\]"] +pub type PRGN1RA_R = crate::BitReader; +#[doc = "Enable/disable read access watch in PREGION\\[1\\]\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PRGN1RA_A { + #[doc = "0: Disable read access watch in this PREGION"] + DISABLE = 0, + #[doc = "1: Enable read access watch in this PREGION"] + ENABLE = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PRGN1RA_A) -> Self { + variant as u8 != 0 + } +} +impl PRGN1RA_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> PRGN1RA_A { + match self.bits { + false => PRGN1RA_A::DISABLE, + true => PRGN1RA_A::ENABLE, + } + } + #[doc = "Checks if the value of the field is `DISABLE`"] + #[inline(always)] + pub fn is_disable(&self) -> bool { + *self == PRGN1RA_A::DISABLE + } + #[doc = "Checks if the value of the field is `ENABLE`"] + #[inline(always)] + pub fn is_enable(&self) -> bool { + *self == PRGN1RA_A::ENABLE + } +} +#[doc = "Field `PRGN1RA` writer - Enable/disable read access watch in PREGION\\[1\\]"] +pub type PRGN1RA_W<'a, const O: u8> = crate::BitWriter<'a, u32, REGIONEN_SPEC, PRGN1RA_A, O>; +impl<'a, const O: u8> PRGN1RA_W<'a, O> { + #[doc = "Disable read access watch in this PREGION"] + #[inline(always)] + pub fn disable(self) -> &'a mut W { + self.variant(PRGN1RA_A::DISABLE) + } + #[doc = "Enable read access watch in this PREGION"] + #[inline(always)] + pub fn enable(self) -> &'a mut W { + self.variant(PRGN1RA_A::ENABLE) + } +} +impl R { + #[doc = "Bit 0 - Enable/disable write access watch in region\\[0\\]"] + #[inline(always)] + pub fn rgn0wa(&self) -> RGN0WA_R { + RGN0WA_R::new((self.bits & 1) != 0) + } + #[doc = "Bit 1 - Enable/disable read access watch in region\\[0\\]"] + #[inline(always)] + pub fn rgn0ra(&self) -> RGN0RA_R { + RGN0RA_R::new(((self.bits >> 1) & 1) != 0) + } + #[doc = "Bit 2 - Enable/disable write access watch in region\\[1\\]"] + #[inline(always)] + pub fn rgn1wa(&self) -> RGN1WA_R { + RGN1WA_R::new(((self.bits >> 2) & 1) != 0) + } + #[doc = "Bit 3 - Enable/disable read access watch in region\\[1\\]"] + #[inline(always)] + pub fn rgn1ra(&self) -> RGN1RA_R { + RGN1RA_R::new(((self.bits >> 3) & 1) != 0) + } + #[doc = "Bit 4 - Enable/disable write access watch in region\\[2\\]"] + #[inline(always)] + pub fn rgn2wa(&self) -> RGN2WA_R { + RGN2WA_R::new(((self.bits >> 4) & 1) != 0) + } + #[doc = "Bit 5 - Enable/disable read access watch in region\\[2\\]"] + #[inline(always)] + pub fn rgn2ra(&self) -> RGN2RA_R { + RGN2RA_R::new(((self.bits >> 5) & 1) != 0) + } + #[doc = "Bit 6 - Enable/disable write access watch in region\\[3\\]"] + #[inline(always)] + pub fn rgn3wa(&self) -> RGN3WA_R { + RGN3WA_R::new(((self.bits >> 6) & 1) != 0) + } + #[doc = "Bit 7 - Enable/disable read access watch in region\\[3\\]"] + #[inline(always)] + pub fn rgn3ra(&self) -> RGN3RA_R { + RGN3RA_R::new(((self.bits >> 7) & 1) != 0) + } + #[doc = "Bit 24 - Enable/disable write access watch in PREGION\\[0\\]"] + #[inline(always)] + pub fn prgn0wa(&self) -> PRGN0WA_R { + PRGN0WA_R::new(((self.bits >> 24) & 1) != 0) + } + #[doc = "Bit 25 - Enable/disable read access watch in PREGION\\[0\\]"] + #[inline(always)] + pub fn prgn0ra(&self) -> PRGN0RA_R { + PRGN0RA_R::new(((self.bits >> 25) & 1) != 0) + } + #[doc = "Bit 26 - Enable/disable write access watch in PREGION\\[1\\]"] + #[inline(always)] + pub fn prgn1wa(&self) -> PRGN1WA_R { + PRGN1WA_R::new(((self.bits >> 26) & 1) != 0) + } + #[doc = "Bit 27 - Enable/disable read access watch in PREGION\\[1\\]"] + #[inline(always)] + pub fn prgn1ra(&self) -> PRGN1RA_R { + PRGN1RA_R::new(((self.bits >> 27) & 1) != 0) + } +} +impl W { + #[doc = "Bit 0 - Enable/disable write access watch in region\\[0\\]"] + #[inline(always)] + #[must_use] + pub fn rgn0wa(&mut self) -> RGN0WA_W<0> { + RGN0WA_W::new(self) + } + #[doc = "Bit 1 - Enable/disable read access watch in region\\[0\\]"] + #[inline(always)] + #[must_use] + pub fn rgn0ra(&mut self) -> RGN0RA_W<1> { + RGN0RA_W::new(self) + } + #[doc = "Bit 2 - Enable/disable write access watch in region\\[1\\]"] + #[inline(always)] + #[must_use] + pub fn rgn1wa(&mut self) -> RGN1WA_W<2> { + RGN1WA_W::new(self) + } + #[doc = "Bit 3 - Enable/disable read access watch in region\\[1\\]"] + #[inline(always)] + #[must_use] + pub fn rgn1ra(&mut self) -> RGN1RA_W<3> { + RGN1RA_W::new(self) + } + #[doc = "Bit 4 - Enable/disable write access watch in region\\[2\\]"] + #[inline(always)] + #[must_use] + pub fn rgn2wa(&mut self) -> RGN2WA_W<4> { + RGN2WA_W::new(self) + } + #[doc = "Bit 5 - Enable/disable read access watch in region\\[2\\]"] + #[inline(always)] + #[must_use] + pub fn rgn2ra(&mut self) -> RGN2RA_W<5> { + RGN2RA_W::new(self) + } + #[doc = "Bit 6 - Enable/disable write access watch in region\\[3\\]"] + #[inline(always)] + #[must_use] + pub fn rgn3wa(&mut self) -> RGN3WA_W<6> { + RGN3WA_W::new(self) + } + #[doc = "Bit 7 - Enable/disable read access watch in region\\[3\\]"] + #[inline(always)] + #[must_use] + pub fn rgn3ra(&mut self) -> RGN3RA_W<7> { + RGN3RA_W::new(self) + } + #[doc = "Bit 24 - Enable/disable write access watch in PREGION\\[0\\]"] + #[inline(always)] + #[must_use] + pub fn prgn0wa(&mut self) -> PRGN0WA_W<24> { + PRGN0WA_W::new(self) + } + #[doc = "Bit 25 - Enable/disable read access watch in PREGION\\[0\\]"] + #[inline(always)] + #[must_use] + pub fn prgn0ra(&mut self) -> PRGN0RA_W<25> { + PRGN0RA_W::new(self) + } + #[doc = "Bit 26 - Enable/disable write access watch in PREGION\\[1\\]"] + #[inline(always)] + #[must_use] + pub fn prgn1wa(&mut self) -> PRGN1WA_W<26> { + PRGN1WA_W::new(self) + } + #[doc = "Bit 27 - Enable/disable read access watch in PREGION\\[1\\]"] + #[inline(always)] + #[must_use] + pub fn prgn1ra(&mut self) -> PRGN1RA_W<27> { + PRGN1RA_W::new(self) + } + #[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 = "Enable/disable regions watch\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 [regionen](index.html) module"] +pub struct REGIONEN_SPEC; +impl crate::RegisterSpec for REGIONEN_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [regionen::R](R) reader structure"] +impl crate::Readable for REGIONEN_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [regionen::W](W) writer structure"] +impl crate::Writable for REGIONEN_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets REGIONEN to value 0"] +impl crate::Resettable for REGIONEN_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/mwu/regionenclr.rs b/down-the-stack/dk_pac/src/mwu/regionenclr.rs new file mode 100644 index 0000000..ad2e65d --- /dev/null +++ b/down-the-stack/dk_pac/src/mwu/regionenclr.rs @@ -0,0 +1,881 @@ +#[doc = "Register `REGIONENCLR` 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 `REGIONENCLR` 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 `RGN0WA` reader - Disable write access watch in region\\[0\\]"] +pub type RGN0WA_R = crate::BitReader; +#[doc = "Disable write access watch in region\\[0\\]\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum RGN0WA_A { + #[doc = "0: Write access watch in this region is disabled"] + DISABLED = 0, + #[doc = "1: Write access watch in this region is enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: RGN0WA_A) -> Self { + variant as u8 != 0 + } +} +impl RGN0WA_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> RGN0WA_A { + match self.bits { + false => RGN0WA_A::DISABLED, + true => RGN0WA_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == RGN0WA_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == RGN0WA_A::ENABLED + } +} +#[doc = "Disable write access watch in region\\[0\\]\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum RGN0WA_AW { + #[doc = "1: Disable write access watch in this region"] + CLEAR = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: RGN0WA_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `RGN0WA` writer - Disable write access watch in region\\[0\\]"] +pub type RGN0WA_W<'a, const O: u8> = crate::BitWriter<'a, u32, REGIONENCLR_SPEC, RGN0WA_AW, O>; +impl<'a, const O: u8> RGN0WA_W<'a, O> { + #[doc = "Disable write access watch in this region"] + #[inline(always)] + pub fn clear(self) -> &'a mut W { + self.variant(RGN0WA_AW::CLEAR) + } +} +#[doc = "Field `RGN0RA` reader - Disable read access watch in region\\[0\\]"] +pub type RGN0RA_R = crate::BitReader; +#[doc = "Disable read access watch in region\\[0\\]\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum RGN0RA_A { + #[doc = "0: Read access watch in this region is disabled"] + DISABLED = 0, + #[doc = "1: Read access watch in this region is enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: RGN0RA_A) -> Self { + variant as u8 != 0 + } +} +impl RGN0RA_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> RGN0RA_A { + match self.bits { + false => RGN0RA_A::DISABLED, + true => RGN0RA_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == RGN0RA_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == RGN0RA_A::ENABLED + } +} +#[doc = "Disable read access watch in region\\[0\\]\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum RGN0RA_AW { + #[doc = "1: Disable read access watch in this region"] + CLEAR = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: RGN0RA_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `RGN0RA` writer - Disable read access watch in region\\[0\\]"] +pub type RGN0RA_W<'a, const O: u8> = crate::BitWriter<'a, u32, REGIONENCLR_SPEC, RGN0RA_AW, O>; +impl<'a, const O: u8> RGN0RA_W<'a, O> { + #[doc = "Disable read access watch in this region"] + #[inline(always)] + pub fn clear(self) -> &'a mut W { + self.variant(RGN0RA_AW::CLEAR) + } +} +#[doc = "Field `RGN1WA` reader - Disable write access watch in region\\[1\\]"] +pub type RGN1WA_R = crate::BitReader; +#[doc = "Disable write access watch in region\\[1\\]\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum RGN1WA_A { + #[doc = "0: Write access watch in this region is disabled"] + DISABLED = 0, + #[doc = "1: Write access watch in this region is enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: RGN1WA_A) -> Self { + variant as u8 != 0 + } +} +impl RGN1WA_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> RGN1WA_A { + match self.bits { + false => RGN1WA_A::DISABLED, + true => RGN1WA_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == RGN1WA_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == RGN1WA_A::ENABLED + } +} +#[doc = "Disable write access watch in region\\[1\\]\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum RGN1WA_AW { + #[doc = "1: Disable write access watch in this region"] + CLEAR = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: RGN1WA_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `RGN1WA` writer - Disable write access watch in region\\[1\\]"] +pub type RGN1WA_W<'a, const O: u8> = crate::BitWriter<'a, u32, REGIONENCLR_SPEC, RGN1WA_AW, O>; +impl<'a, const O: u8> RGN1WA_W<'a, O> { + #[doc = "Disable write access watch in this region"] + #[inline(always)] + pub fn clear(self) -> &'a mut W { + self.variant(RGN1WA_AW::CLEAR) + } +} +#[doc = "Field `RGN1RA` reader - Disable read access watch in region\\[1\\]"] +pub type RGN1RA_R = crate::BitReader; +#[doc = "Disable read access watch in region\\[1\\]\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum RGN1RA_A { + #[doc = "0: Read access watch in this region is disabled"] + DISABLED = 0, + #[doc = "1: Read access watch in this region is enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: RGN1RA_A) -> Self { + variant as u8 != 0 + } +} +impl RGN1RA_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> RGN1RA_A { + match self.bits { + false => RGN1RA_A::DISABLED, + true => RGN1RA_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == RGN1RA_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == RGN1RA_A::ENABLED + } +} +#[doc = "Disable read access watch in region\\[1\\]\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum RGN1RA_AW { + #[doc = "1: Disable read access watch in this region"] + CLEAR = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: RGN1RA_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `RGN1RA` writer - Disable read access watch in region\\[1\\]"] +pub type RGN1RA_W<'a, const O: u8> = crate::BitWriter<'a, u32, REGIONENCLR_SPEC, RGN1RA_AW, O>; +impl<'a, const O: u8> RGN1RA_W<'a, O> { + #[doc = "Disable read access watch in this region"] + #[inline(always)] + pub fn clear(self) -> &'a mut W { + self.variant(RGN1RA_AW::CLEAR) + } +} +#[doc = "Field `RGN2WA` reader - Disable write access watch in region\\[2\\]"] +pub type RGN2WA_R = crate::BitReader; +#[doc = "Disable write access watch in region\\[2\\]\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum RGN2WA_A { + #[doc = "0: Write access watch in this region is disabled"] + DISABLED = 0, + #[doc = "1: Write access watch in this region is enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: RGN2WA_A) -> Self { + variant as u8 != 0 + } +} +impl RGN2WA_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> RGN2WA_A { + match self.bits { + false => RGN2WA_A::DISABLED, + true => RGN2WA_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == RGN2WA_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == RGN2WA_A::ENABLED + } +} +#[doc = "Disable write access watch in region\\[2\\]\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum RGN2WA_AW { + #[doc = "1: Disable write access watch in this region"] + CLEAR = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: RGN2WA_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `RGN2WA` writer - Disable write access watch in region\\[2\\]"] +pub type RGN2WA_W<'a, const O: u8> = crate::BitWriter<'a, u32, REGIONENCLR_SPEC, RGN2WA_AW, O>; +impl<'a, const O: u8> RGN2WA_W<'a, O> { + #[doc = "Disable write access watch in this region"] + #[inline(always)] + pub fn clear(self) -> &'a mut W { + self.variant(RGN2WA_AW::CLEAR) + } +} +#[doc = "Field `RGN2RA` reader - Disable read access watch in region\\[2\\]"] +pub type RGN2RA_R = crate::BitReader; +#[doc = "Disable read access watch in region\\[2\\]\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum RGN2RA_A { + #[doc = "0: Read access watch in this region is disabled"] + DISABLED = 0, + #[doc = "1: Read access watch in this region is enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: RGN2RA_A) -> Self { + variant as u8 != 0 + } +} +impl RGN2RA_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> RGN2RA_A { + match self.bits { + false => RGN2RA_A::DISABLED, + true => RGN2RA_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == RGN2RA_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == RGN2RA_A::ENABLED + } +} +#[doc = "Disable read access watch in region\\[2\\]\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum RGN2RA_AW { + #[doc = "1: Disable read access watch in this region"] + CLEAR = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: RGN2RA_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `RGN2RA` writer - Disable read access watch in region\\[2\\]"] +pub type RGN2RA_W<'a, const O: u8> = crate::BitWriter<'a, u32, REGIONENCLR_SPEC, RGN2RA_AW, O>; +impl<'a, const O: u8> RGN2RA_W<'a, O> { + #[doc = "Disable read access watch in this region"] + #[inline(always)] + pub fn clear(self) -> &'a mut W { + self.variant(RGN2RA_AW::CLEAR) + } +} +#[doc = "Field `RGN3WA` reader - Disable write access watch in region\\[3\\]"] +pub type RGN3WA_R = crate::BitReader; +#[doc = "Disable write access watch in region\\[3\\]\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum RGN3WA_A { + #[doc = "0: Write access watch in this region is disabled"] + DISABLED = 0, + #[doc = "1: Write access watch in this region is enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: RGN3WA_A) -> Self { + variant as u8 != 0 + } +} +impl RGN3WA_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> RGN3WA_A { + match self.bits { + false => RGN3WA_A::DISABLED, + true => RGN3WA_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == RGN3WA_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == RGN3WA_A::ENABLED + } +} +#[doc = "Disable write access watch in region\\[3\\]\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum RGN3WA_AW { + #[doc = "1: Disable write access watch in this region"] + CLEAR = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: RGN3WA_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `RGN3WA` writer - Disable write access watch in region\\[3\\]"] +pub type RGN3WA_W<'a, const O: u8> = crate::BitWriter<'a, u32, REGIONENCLR_SPEC, RGN3WA_AW, O>; +impl<'a, const O: u8> RGN3WA_W<'a, O> { + #[doc = "Disable write access watch in this region"] + #[inline(always)] + pub fn clear(self) -> &'a mut W { + self.variant(RGN3WA_AW::CLEAR) + } +} +#[doc = "Field `RGN3RA` reader - Disable read access watch in region\\[3\\]"] +pub type RGN3RA_R = crate::BitReader; +#[doc = "Disable read access watch in region\\[3\\]\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum RGN3RA_A { + #[doc = "0: Read access watch in this region is disabled"] + DISABLED = 0, + #[doc = "1: Read access watch in this region is enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: RGN3RA_A) -> Self { + variant as u8 != 0 + } +} +impl RGN3RA_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> RGN3RA_A { + match self.bits { + false => RGN3RA_A::DISABLED, + true => RGN3RA_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == RGN3RA_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == RGN3RA_A::ENABLED + } +} +#[doc = "Disable read access watch in region\\[3\\]\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum RGN3RA_AW { + #[doc = "1: Disable read access watch in this region"] + CLEAR = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: RGN3RA_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `RGN3RA` writer - Disable read access watch in region\\[3\\]"] +pub type RGN3RA_W<'a, const O: u8> = crate::BitWriter<'a, u32, REGIONENCLR_SPEC, RGN3RA_AW, O>; +impl<'a, const O: u8> RGN3RA_W<'a, O> { + #[doc = "Disable read access watch in this region"] + #[inline(always)] + pub fn clear(self) -> &'a mut W { + self.variant(RGN3RA_AW::CLEAR) + } +} +#[doc = "Field `PRGN0WA` reader - Disable write access watch in PREGION\\[0\\]"] +pub type PRGN0WA_R = crate::BitReader; +#[doc = "Disable write access watch in PREGION\\[0\\]\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PRGN0WA_A { + #[doc = "0: Write access watch in this PREGION is disabled"] + DISABLED = 0, + #[doc = "1: Write access watch in this PREGION is enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PRGN0WA_A) -> Self { + variant as u8 != 0 + } +} +impl PRGN0WA_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> PRGN0WA_A { + match self.bits { + false => PRGN0WA_A::DISABLED, + true => PRGN0WA_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == PRGN0WA_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == PRGN0WA_A::ENABLED + } +} +#[doc = "Disable write access watch in PREGION\\[0\\]\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PRGN0WA_AW { + #[doc = "1: Disable write access watch in this PREGION"] + CLEAR = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PRGN0WA_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `PRGN0WA` writer - Disable write access watch in PREGION\\[0\\]"] +pub type PRGN0WA_W<'a, const O: u8> = crate::BitWriter<'a, u32, REGIONENCLR_SPEC, PRGN0WA_AW, O>; +impl<'a, const O: u8> PRGN0WA_W<'a, O> { + #[doc = "Disable write access watch in this PREGION"] + #[inline(always)] + pub fn clear(self) -> &'a mut W { + self.variant(PRGN0WA_AW::CLEAR) + } +} +#[doc = "Field `PRGN0RA` reader - Disable read access watch in PREGION\\[0\\]"] +pub type PRGN0RA_R = crate::BitReader; +#[doc = "Disable read access watch in PREGION\\[0\\]\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PRGN0RA_A { + #[doc = "0: Read access watch in this PREGION is disabled"] + DISABLED = 0, + #[doc = "1: Read access watch in this PREGION is enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PRGN0RA_A) -> Self { + variant as u8 != 0 + } +} +impl PRGN0RA_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> PRGN0RA_A { + match self.bits { + false => PRGN0RA_A::DISABLED, + true => PRGN0RA_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == PRGN0RA_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == PRGN0RA_A::ENABLED + } +} +#[doc = "Disable read access watch in PREGION\\[0\\]\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PRGN0RA_AW { + #[doc = "1: Disable read access watch in this PREGION"] + CLEAR = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PRGN0RA_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `PRGN0RA` writer - Disable read access watch in PREGION\\[0\\]"] +pub type PRGN0RA_W<'a, const O: u8> = crate::BitWriter<'a, u32, REGIONENCLR_SPEC, PRGN0RA_AW, O>; +impl<'a, const O: u8> PRGN0RA_W<'a, O> { + #[doc = "Disable read access watch in this PREGION"] + #[inline(always)] + pub fn clear(self) -> &'a mut W { + self.variant(PRGN0RA_AW::CLEAR) + } +} +#[doc = "Field `PRGN1WA` reader - Disable write access watch in PREGION\\[1\\]"] +pub type PRGN1WA_R = crate::BitReader; +#[doc = "Disable write access watch in PREGION\\[1\\]\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PRGN1WA_A { + #[doc = "0: Write access watch in this PREGION is disabled"] + DISABLED = 0, + #[doc = "1: Write access watch in this PREGION is enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PRGN1WA_A) -> Self { + variant as u8 != 0 + } +} +impl PRGN1WA_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> PRGN1WA_A { + match self.bits { + false => PRGN1WA_A::DISABLED, + true => PRGN1WA_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == PRGN1WA_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == PRGN1WA_A::ENABLED + } +} +#[doc = "Disable write access watch in PREGION\\[1\\]\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PRGN1WA_AW { + #[doc = "1: Disable write access watch in this PREGION"] + CLEAR = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PRGN1WA_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `PRGN1WA` writer - Disable write access watch in PREGION\\[1\\]"] +pub type PRGN1WA_W<'a, const O: u8> = crate::BitWriter<'a, u32, REGIONENCLR_SPEC, PRGN1WA_AW, O>; +impl<'a, const O: u8> PRGN1WA_W<'a, O> { + #[doc = "Disable write access watch in this PREGION"] + #[inline(always)] + pub fn clear(self) -> &'a mut W { + self.variant(PRGN1WA_AW::CLEAR) + } +} +#[doc = "Field `PRGN1RA` reader - Disable read access watch in PREGION\\[1\\]"] +pub type PRGN1RA_R = crate::BitReader; +#[doc = "Disable read access watch in PREGION\\[1\\]\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PRGN1RA_A { + #[doc = "0: Read access watch in this PREGION is disabled"] + DISABLED = 0, + #[doc = "1: Read access watch in this PREGION is enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PRGN1RA_A) -> Self { + variant as u8 != 0 + } +} +impl PRGN1RA_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> PRGN1RA_A { + match self.bits { + false => PRGN1RA_A::DISABLED, + true => PRGN1RA_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == PRGN1RA_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == PRGN1RA_A::ENABLED + } +} +#[doc = "Disable read access watch in PREGION\\[1\\]\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PRGN1RA_AW { + #[doc = "1: Disable read access watch in this PREGION"] + CLEAR = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PRGN1RA_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `PRGN1RA` writer - Disable read access watch in PREGION\\[1\\]"] +pub type PRGN1RA_W<'a, const O: u8> = crate::BitWriter<'a, u32, REGIONENCLR_SPEC, PRGN1RA_AW, O>; +impl<'a, const O: u8> PRGN1RA_W<'a, O> { + #[doc = "Disable read access watch in this PREGION"] + #[inline(always)] + pub fn clear(self) -> &'a mut W { + self.variant(PRGN1RA_AW::CLEAR) + } +} +impl R { + #[doc = "Bit 0 - Disable write access watch in region\\[0\\]"] + #[inline(always)] + pub fn rgn0wa(&self) -> RGN0WA_R { + RGN0WA_R::new((self.bits & 1) != 0) + } + #[doc = "Bit 1 - Disable read access watch in region\\[0\\]"] + #[inline(always)] + pub fn rgn0ra(&self) -> RGN0RA_R { + RGN0RA_R::new(((self.bits >> 1) & 1) != 0) + } + #[doc = "Bit 2 - Disable write access watch in region\\[1\\]"] + #[inline(always)] + pub fn rgn1wa(&self) -> RGN1WA_R { + RGN1WA_R::new(((self.bits >> 2) & 1) != 0) + } + #[doc = "Bit 3 - Disable read access watch in region\\[1\\]"] + #[inline(always)] + pub fn rgn1ra(&self) -> RGN1RA_R { + RGN1RA_R::new(((self.bits >> 3) & 1) != 0) + } + #[doc = "Bit 4 - Disable write access watch in region\\[2\\]"] + #[inline(always)] + pub fn rgn2wa(&self) -> RGN2WA_R { + RGN2WA_R::new(((self.bits >> 4) & 1) != 0) + } + #[doc = "Bit 5 - Disable read access watch in region\\[2\\]"] + #[inline(always)] + pub fn rgn2ra(&self) -> RGN2RA_R { + RGN2RA_R::new(((self.bits >> 5) & 1) != 0) + } + #[doc = "Bit 6 - Disable write access watch in region\\[3\\]"] + #[inline(always)] + pub fn rgn3wa(&self) -> RGN3WA_R { + RGN3WA_R::new(((self.bits >> 6) & 1) != 0) + } + #[doc = "Bit 7 - Disable read access watch in region\\[3\\]"] + #[inline(always)] + pub fn rgn3ra(&self) -> RGN3RA_R { + RGN3RA_R::new(((self.bits >> 7) & 1) != 0) + } + #[doc = "Bit 24 - Disable write access watch in PREGION\\[0\\]"] + #[inline(always)] + pub fn prgn0wa(&self) -> PRGN0WA_R { + PRGN0WA_R::new(((self.bits >> 24) & 1) != 0) + } + #[doc = "Bit 25 - Disable read access watch in PREGION\\[0\\]"] + #[inline(always)] + pub fn prgn0ra(&self) -> PRGN0RA_R { + PRGN0RA_R::new(((self.bits >> 25) & 1) != 0) + } + #[doc = "Bit 26 - Disable write access watch in PREGION\\[1\\]"] + #[inline(always)] + pub fn prgn1wa(&self) -> PRGN1WA_R { + PRGN1WA_R::new(((self.bits >> 26) & 1) != 0) + } + #[doc = "Bit 27 - Disable read access watch in PREGION\\[1\\]"] + #[inline(always)] + pub fn prgn1ra(&self) -> PRGN1RA_R { + PRGN1RA_R::new(((self.bits >> 27) & 1) != 0) + } +} +impl W { + #[doc = "Bit 0 - Disable write access watch in region\\[0\\]"] + #[inline(always)] + #[must_use] + pub fn rgn0wa(&mut self) -> RGN0WA_W<0> { + RGN0WA_W::new(self) + } + #[doc = "Bit 1 - Disable read access watch in region\\[0\\]"] + #[inline(always)] + #[must_use] + pub fn rgn0ra(&mut self) -> RGN0RA_W<1> { + RGN0RA_W::new(self) + } + #[doc = "Bit 2 - Disable write access watch in region\\[1\\]"] + #[inline(always)] + #[must_use] + pub fn rgn1wa(&mut self) -> RGN1WA_W<2> { + RGN1WA_W::new(self) + } + #[doc = "Bit 3 - Disable read access watch in region\\[1\\]"] + #[inline(always)] + #[must_use] + pub fn rgn1ra(&mut self) -> RGN1RA_W<3> { + RGN1RA_W::new(self) + } + #[doc = "Bit 4 - Disable write access watch in region\\[2\\]"] + #[inline(always)] + #[must_use] + pub fn rgn2wa(&mut self) -> RGN2WA_W<4> { + RGN2WA_W::new(self) + } + #[doc = "Bit 5 - Disable read access watch in region\\[2\\]"] + #[inline(always)] + #[must_use] + pub fn rgn2ra(&mut self) -> RGN2RA_W<5> { + RGN2RA_W::new(self) + } + #[doc = "Bit 6 - Disable write access watch in region\\[3\\]"] + #[inline(always)] + #[must_use] + pub fn rgn3wa(&mut self) -> RGN3WA_W<6> { + RGN3WA_W::new(self) + } + #[doc = "Bit 7 - Disable read access watch in region\\[3\\]"] + #[inline(always)] + #[must_use] + pub fn rgn3ra(&mut self) -> RGN3RA_W<7> { + RGN3RA_W::new(self) + } + #[doc = "Bit 24 - Disable write access watch in PREGION\\[0\\]"] + #[inline(always)] + #[must_use] + pub fn prgn0wa(&mut self) -> PRGN0WA_W<24> { + PRGN0WA_W::new(self) + } + #[doc = "Bit 25 - Disable read access watch in PREGION\\[0\\]"] + #[inline(always)] + #[must_use] + pub fn prgn0ra(&mut self) -> PRGN0RA_W<25> { + PRGN0RA_W::new(self) + } + #[doc = "Bit 26 - Disable write access watch in PREGION\\[1\\]"] + #[inline(always)] + #[must_use] + pub fn prgn1wa(&mut self) -> PRGN1WA_W<26> { + PRGN1WA_W::new(self) + } + #[doc = "Bit 27 - Disable read access watch in PREGION\\[1\\]"] + #[inline(always)] + #[must_use] + pub fn prgn1ra(&mut self) -> PRGN1RA_W<27> { + PRGN1RA_W::new(self) + } + #[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 = "Disable regions watch\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 [regionenclr](index.html) module"] +pub struct REGIONENCLR_SPEC; +impl crate::RegisterSpec for REGIONENCLR_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [regionenclr::R](R) reader structure"] +impl crate::Readable for REGIONENCLR_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [regionenclr::W](W) writer structure"] +impl crate::Writable for REGIONENCLR_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets REGIONENCLR to value 0"] +impl crate::Resettable for REGIONENCLR_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/mwu/regionenset.rs b/down-the-stack/dk_pac/src/mwu/regionenset.rs new file mode 100644 index 0000000..2ef99b0 --- /dev/null +++ b/down-the-stack/dk_pac/src/mwu/regionenset.rs @@ -0,0 +1,881 @@ +#[doc = "Register `REGIONENSET` 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 `REGIONENSET` 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 `RGN0WA` reader - Enable write access watch in region\\[0\\]"] +pub type RGN0WA_R = crate::BitReader; +#[doc = "Enable write access watch in region\\[0\\]\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum RGN0WA_A { + #[doc = "0: Write access watch in this region is disabled"] + DISABLED = 0, + #[doc = "1: Write access watch in this region is enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: RGN0WA_A) -> Self { + variant as u8 != 0 + } +} +impl RGN0WA_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> RGN0WA_A { + match self.bits { + false => RGN0WA_A::DISABLED, + true => RGN0WA_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == RGN0WA_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == RGN0WA_A::ENABLED + } +} +#[doc = "Enable write access watch in region\\[0\\]\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum RGN0WA_AW { + #[doc = "1: Enable write access watch in this region"] + SET = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: RGN0WA_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `RGN0WA` writer - Enable write access watch in region\\[0\\]"] +pub type RGN0WA_W<'a, const O: u8> = crate::BitWriter<'a, u32, REGIONENSET_SPEC, RGN0WA_AW, O>; +impl<'a, const O: u8> RGN0WA_W<'a, O> { + #[doc = "Enable write access watch in this region"] + #[inline(always)] + pub fn set(self) -> &'a mut W { + self.variant(RGN0WA_AW::SET) + } +} +#[doc = "Field `RGN0RA` reader - Enable read access watch in region\\[0\\]"] +pub type RGN0RA_R = crate::BitReader; +#[doc = "Enable read access watch in region\\[0\\]\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum RGN0RA_A { + #[doc = "0: Read access watch in this region is disabled"] + DISABLED = 0, + #[doc = "1: Read access watch in this region is enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: RGN0RA_A) -> Self { + variant as u8 != 0 + } +} +impl RGN0RA_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> RGN0RA_A { + match self.bits { + false => RGN0RA_A::DISABLED, + true => RGN0RA_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == RGN0RA_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == RGN0RA_A::ENABLED + } +} +#[doc = "Enable read access watch in region\\[0\\]\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum RGN0RA_AW { + #[doc = "1: Enable read access watch in this region"] + SET = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: RGN0RA_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `RGN0RA` writer - Enable read access watch in region\\[0\\]"] +pub type RGN0RA_W<'a, const O: u8> = crate::BitWriter<'a, u32, REGIONENSET_SPEC, RGN0RA_AW, O>; +impl<'a, const O: u8> RGN0RA_W<'a, O> { + #[doc = "Enable read access watch in this region"] + #[inline(always)] + pub fn set(self) -> &'a mut W { + self.variant(RGN0RA_AW::SET) + } +} +#[doc = "Field `RGN1WA` reader - Enable write access watch in region\\[1\\]"] +pub type RGN1WA_R = crate::BitReader; +#[doc = "Enable write access watch in region\\[1\\]\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum RGN1WA_A { + #[doc = "0: Write access watch in this region is disabled"] + DISABLED = 0, + #[doc = "1: Write access watch in this region is enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: RGN1WA_A) -> Self { + variant as u8 != 0 + } +} +impl RGN1WA_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> RGN1WA_A { + match self.bits { + false => RGN1WA_A::DISABLED, + true => RGN1WA_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == RGN1WA_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == RGN1WA_A::ENABLED + } +} +#[doc = "Enable write access watch in region\\[1\\]\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum RGN1WA_AW { + #[doc = "1: Enable write access watch in this region"] + SET = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: RGN1WA_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `RGN1WA` writer - Enable write access watch in region\\[1\\]"] +pub type RGN1WA_W<'a, const O: u8> = crate::BitWriter<'a, u32, REGIONENSET_SPEC, RGN1WA_AW, O>; +impl<'a, const O: u8> RGN1WA_W<'a, O> { + #[doc = "Enable write access watch in this region"] + #[inline(always)] + pub fn set(self) -> &'a mut W { + self.variant(RGN1WA_AW::SET) + } +} +#[doc = "Field `RGN1RA` reader - Enable read access watch in region\\[1\\]"] +pub type RGN1RA_R = crate::BitReader; +#[doc = "Enable read access watch in region\\[1\\]\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum RGN1RA_A { + #[doc = "0: Read access watch in this region is disabled"] + DISABLED = 0, + #[doc = "1: Read access watch in this region is enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: RGN1RA_A) -> Self { + variant as u8 != 0 + } +} +impl RGN1RA_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> RGN1RA_A { + match self.bits { + false => RGN1RA_A::DISABLED, + true => RGN1RA_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == RGN1RA_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == RGN1RA_A::ENABLED + } +} +#[doc = "Enable read access watch in region\\[1\\]\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum RGN1RA_AW { + #[doc = "1: Enable read access watch in this region"] + SET = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: RGN1RA_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `RGN1RA` writer - Enable read access watch in region\\[1\\]"] +pub type RGN1RA_W<'a, const O: u8> = crate::BitWriter<'a, u32, REGIONENSET_SPEC, RGN1RA_AW, O>; +impl<'a, const O: u8> RGN1RA_W<'a, O> { + #[doc = "Enable read access watch in this region"] + #[inline(always)] + pub fn set(self) -> &'a mut W { + self.variant(RGN1RA_AW::SET) + } +} +#[doc = "Field `RGN2WA` reader - Enable write access watch in region\\[2\\]"] +pub type RGN2WA_R = crate::BitReader; +#[doc = "Enable write access watch in region\\[2\\]\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum RGN2WA_A { + #[doc = "0: Write access watch in this region is disabled"] + DISABLED = 0, + #[doc = "1: Write access watch in this region is enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: RGN2WA_A) -> Self { + variant as u8 != 0 + } +} +impl RGN2WA_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> RGN2WA_A { + match self.bits { + false => RGN2WA_A::DISABLED, + true => RGN2WA_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == RGN2WA_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == RGN2WA_A::ENABLED + } +} +#[doc = "Enable write access watch in region\\[2\\]\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum RGN2WA_AW { + #[doc = "1: Enable write access watch in this region"] + SET = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: RGN2WA_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `RGN2WA` writer - Enable write access watch in region\\[2\\]"] +pub type RGN2WA_W<'a, const O: u8> = crate::BitWriter<'a, u32, REGIONENSET_SPEC, RGN2WA_AW, O>; +impl<'a, const O: u8> RGN2WA_W<'a, O> { + #[doc = "Enable write access watch in this region"] + #[inline(always)] + pub fn set(self) -> &'a mut W { + self.variant(RGN2WA_AW::SET) + } +} +#[doc = "Field `RGN2RA` reader - Enable read access watch in region\\[2\\]"] +pub type RGN2RA_R = crate::BitReader; +#[doc = "Enable read access watch in region\\[2\\]\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum RGN2RA_A { + #[doc = "0: Read access watch in this region is disabled"] + DISABLED = 0, + #[doc = "1: Read access watch in this region is enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: RGN2RA_A) -> Self { + variant as u8 != 0 + } +} +impl RGN2RA_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> RGN2RA_A { + match self.bits { + false => RGN2RA_A::DISABLED, + true => RGN2RA_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == RGN2RA_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == RGN2RA_A::ENABLED + } +} +#[doc = "Enable read access watch in region\\[2\\]\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum RGN2RA_AW { + #[doc = "1: Enable read access watch in this region"] + SET = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: RGN2RA_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `RGN2RA` writer - Enable read access watch in region\\[2\\]"] +pub type RGN2RA_W<'a, const O: u8> = crate::BitWriter<'a, u32, REGIONENSET_SPEC, RGN2RA_AW, O>; +impl<'a, const O: u8> RGN2RA_W<'a, O> { + #[doc = "Enable read access watch in this region"] + #[inline(always)] + pub fn set(self) -> &'a mut W { + self.variant(RGN2RA_AW::SET) + } +} +#[doc = "Field `RGN3WA` reader - Enable write access watch in region\\[3\\]"] +pub type RGN3WA_R = crate::BitReader; +#[doc = "Enable write access watch in region\\[3\\]\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum RGN3WA_A { + #[doc = "0: Write access watch in this region is disabled"] + DISABLED = 0, + #[doc = "1: Write access watch in this region is enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: RGN3WA_A) -> Self { + variant as u8 != 0 + } +} +impl RGN3WA_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> RGN3WA_A { + match self.bits { + false => RGN3WA_A::DISABLED, + true => RGN3WA_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == RGN3WA_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == RGN3WA_A::ENABLED + } +} +#[doc = "Enable write access watch in region\\[3\\]\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum RGN3WA_AW { + #[doc = "1: Enable write access watch in this region"] + SET = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: RGN3WA_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `RGN3WA` writer - Enable write access watch in region\\[3\\]"] +pub type RGN3WA_W<'a, const O: u8> = crate::BitWriter<'a, u32, REGIONENSET_SPEC, RGN3WA_AW, O>; +impl<'a, const O: u8> RGN3WA_W<'a, O> { + #[doc = "Enable write access watch in this region"] + #[inline(always)] + pub fn set(self) -> &'a mut W { + self.variant(RGN3WA_AW::SET) + } +} +#[doc = "Field `RGN3RA` reader - Enable read access watch in region\\[3\\]"] +pub type RGN3RA_R = crate::BitReader; +#[doc = "Enable read access watch in region\\[3\\]\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum RGN3RA_A { + #[doc = "0: Read access watch in this region is disabled"] + DISABLED = 0, + #[doc = "1: Read access watch in this region is enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: RGN3RA_A) -> Self { + variant as u8 != 0 + } +} +impl RGN3RA_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> RGN3RA_A { + match self.bits { + false => RGN3RA_A::DISABLED, + true => RGN3RA_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == RGN3RA_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == RGN3RA_A::ENABLED + } +} +#[doc = "Enable read access watch in region\\[3\\]\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum RGN3RA_AW { + #[doc = "1: Enable read access watch in this region"] + SET = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: RGN3RA_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `RGN3RA` writer - Enable read access watch in region\\[3\\]"] +pub type RGN3RA_W<'a, const O: u8> = crate::BitWriter<'a, u32, REGIONENSET_SPEC, RGN3RA_AW, O>; +impl<'a, const O: u8> RGN3RA_W<'a, O> { + #[doc = "Enable read access watch in this region"] + #[inline(always)] + pub fn set(self) -> &'a mut W { + self.variant(RGN3RA_AW::SET) + } +} +#[doc = "Field `PRGN0WA` reader - Enable write access watch in PREGION\\[0\\]"] +pub type PRGN0WA_R = crate::BitReader; +#[doc = "Enable write access watch in PREGION\\[0\\]\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PRGN0WA_A { + #[doc = "0: Write access watch in this PREGION is disabled"] + DISABLED = 0, + #[doc = "1: Write access watch in this PREGION is enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PRGN0WA_A) -> Self { + variant as u8 != 0 + } +} +impl PRGN0WA_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> PRGN0WA_A { + match self.bits { + false => PRGN0WA_A::DISABLED, + true => PRGN0WA_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == PRGN0WA_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == PRGN0WA_A::ENABLED + } +} +#[doc = "Enable write access watch in PREGION\\[0\\]\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PRGN0WA_AW { + #[doc = "1: Enable write access watch in this PREGION"] + SET = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PRGN0WA_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `PRGN0WA` writer - Enable write access watch in PREGION\\[0\\]"] +pub type PRGN0WA_W<'a, const O: u8> = crate::BitWriter<'a, u32, REGIONENSET_SPEC, PRGN0WA_AW, O>; +impl<'a, const O: u8> PRGN0WA_W<'a, O> { + #[doc = "Enable write access watch in this PREGION"] + #[inline(always)] + pub fn set(self) -> &'a mut W { + self.variant(PRGN0WA_AW::SET) + } +} +#[doc = "Field `PRGN0RA` reader - Enable read access watch in PREGION\\[0\\]"] +pub type PRGN0RA_R = crate::BitReader; +#[doc = "Enable read access watch in PREGION\\[0\\]\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PRGN0RA_A { + #[doc = "0: Read access watch in this PREGION is disabled"] + DISABLED = 0, + #[doc = "1: Read access watch in this PREGION is enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PRGN0RA_A) -> Self { + variant as u8 != 0 + } +} +impl PRGN0RA_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> PRGN0RA_A { + match self.bits { + false => PRGN0RA_A::DISABLED, + true => PRGN0RA_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == PRGN0RA_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == PRGN0RA_A::ENABLED + } +} +#[doc = "Enable read access watch in PREGION\\[0\\]\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PRGN0RA_AW { + #[doc = "1: Enable read access watch in this PREGION"] + SET = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PRGN0RA_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `PRGN0RA` writer - Enable read access watch in PREGION\\[0\\]"] +pub type PRGN0RA_W<'a, const O: u8> = crate::BitWriter<'a, u32, REGIONENSET_SPEC, PRGN0RA_AW, O>; +impl<'a, const O: u8> PRGN0RA_W<'a, O> { + #[doc = "Enable read access watch in this PREGION"] + #[inline(always)] + pub fn set(self) -> &'a mut W { + self.variant(PRGN0RA_AW::SET) + } +} +#[doc = "Field `PRGN1WA` reader - Enable write access watch in PREGION\\[1\\]"] +pub type PRGN1WA_R = crate::BitReader; +#[doc = "Enable write access watch in PREGION\\[1\\]\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PRGN1WA_A { + #[doc = "0: Write access watch in this PREGION is disabled"] + DISABLED = 0, + #[doc = "1: Write access watch in this PREGION is enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PRGN1WA_A) -> Self { + variant as u8 != 0 + } +} +impl PRGN1WA_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> PRGN1WA_A { + match self.bits { + false => PRGN1WA_A::DISABLED, + true => PRGN1WA_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == PRGN1WA_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == PRGN1WA_A::ENABLED + } +} +#[doc = "Enable write access watch in PREGION\\[1\\]\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PRGN1WA_AW { + #[doc = "1: Enable write access watch in this PREGION"] + SET = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PRGN1WA_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `PRGN1WA` writer - Enable write access watch in PREGION\\[1\\]"] +pub type PRGN1WA_W<'a, const O: u8> = crate::BitWriter<'a, u32, REGIONENSET_SPEC, PRGN1WA_AW, O>; +impl<'a, const O: u8> PRGN1WA_W<'a, O> { + #[doc = "Enable write access watch in this PREGION"] + #[inline(always)] + pub fn set(self) -> &'a mut W { + self.variant(PRGN1WA_AW::SET) + } +} +#[doc = "Field `PRGN1RA` reader - Enable read access watch in PREGION\\[1\\]"] +pub type PRGN1RA_R = crate::BitReader; +#[doc = "Enable read access watch in PREGION\\[1\\]\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PRGN1RA_A { + #[doc = "0: Read access watch in this PREGION is disabled"] + DISABLED = 0, + #[doc = "1: Read access watch in this PREGION is enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PRGN1RA_A) -> Self { + variant as u8 != 0 + } +} +impl PRGN1RA_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> PRGN1RA_A { + match self.bits { + false => PRGN1RA_A::DISABLED, + true => PRGN1RA_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == PRGN1RA_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == PRGN1RA_A::ENABLED + } +} +#[doc = "Enable read access watch in PREGION\\[1\\]\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PRGN1RA_AW { + #[doc = "1: Enable read access watch in this PREGION"] + SET = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PRGN1RA_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `PRGN1RA` writer - Enable read access watch in PREGION\\[1\\]"] +pub type PRGN1RA_W<'a, const O: u8> = crate::BitWriter<'a, u32, REGIONENSET_SPEC, PRGN1RA_AW, O>; +impl<'a, const O: u8> PRGN1RA_W<'a, O> { + #[doc = "Enable read access watch in this PREGION"] + #[inline(always)] + pub fn set(self) -> &'a mut W { + self.variant(PRGN1RA_AW::SET) + } +} +impl R { + #[doc = "Bit 0 - Enable write access watch in region\\[0\\]"] + #[inline(always)] + pub fn rgn0wa(&self) -> RGN0WA_R { + RGN0WA_R::new((self.bits & 1) != 0) + } + #[doc = "Bit 1 - Enable read access watch in region\\[0\\]"] + #[inline(always)] + pub fn rgn0ra(&self) -> RGN0RA_R { + RGN0RA_R::new(((self.bits >> 1) & 1) != 0) + } + #[doc = "Bit 2 - Enable write access watch in region\\[1\\]"] + #[inline(always)] + pub fn rgn1wa(&self) -> RGN1WA_R { + RGN1WA_R::new(((self.bits >> 2) & 1) != 0) + } + #[doc = "Bit 3 - Enable read access watch in region\\[1\\]"] + #[inline(always)] + pub fn rgn1ra(&self) -> RGN1RA_R { + RGN1RA_R::new(((self.bits >> 3) & 1) != 0) + } + #[doc = "Bit 4 - Enable write access watch in region\\[2\\]"] + #[inline(always)] + pub fn rgn2wa(&self) -> RGN2WA_R { + RGN2WA_R::new(((self.bits >> 4) & 1) != 0) + } + #[doc = "Bit 5 - Enable read access watch in region\\[2\\]"] + #[inline(always)] + pub fn rgn2ra(&self) -> RGN2RA_R { + RGN2RA_R::new(((self.bits >> 5) & 1) != 0) + } + #[doc = "Bit 6 - Enable write access watch in region\\[3\\]"] + #[inline(always)] + pub fn rgn3wa(&self) -> RGN3WA_R { + RGN3WA_R::new(((self.bits >> 6) & 1) != 0) + } + #[doc = "Bit 7 - Enable read access watch in region\\[3\\]"] + #[inline(always)] + pub fn rgn3ra(&self) -> RGN3RA_R { + RGN3RA_R::new(((self.bits >> 7) & 1) != 0) + } + #[doc = "Bit 24 - Enable write access watch in PREGION\\[0\\]"] + #[inline(always)] + pub fn prgn0wa(&self) -> PRGN0WA_R { + PRGN0WA_R::new(((self.bits >> 24) & 1) != 0) + } + #[doc = "Bit 25 - Enable read access watch in PREGION\\[0\\]"] + #[inline(always)] + pub fn prgn0ra(&self) -> PRGN0RA_R { + PRGN0RA_R::new(((self.bits >> 25) & 1) != 0) + } + #[doc = "Bit 26 - Enable write access watch in PREGION\\[1\\]"] + #[inline(always)] + pub fn prgn1wa(&self) -> PRGN1WA_R { + PRGN1WA_R::new(((self.bits >> 26) & 1) != 0) + } + #[doc = "Bit 27 - Enable read access watch in PREGION\\[1\\]"] + #[inline(always)] + pub fn prgn1ra(&self) -> PRGN1RA_R { + PRGN1RA_R::new(((self.bits >> 27) & 1) != 0) + } +} +impl W { + #[doc = "Bit 0 - Enable write access watch in region\\[0\\]"] + #[inline(always)] + #[must_use] + pub fn rgn0wa(&mut self) -> RGN0WA_W<0> { + RGN0WA_W::new(self) + } + #[doc = "Bit 1 - Enable read access watch in region\\[0\\]"] + #[inline(always)] + #[must_use] + pub fn rgn0ra(&mut self) -> RGN0RA_W<1> { + RGN0RA_W::new(self) + } + #[doc = "Bit 2 - Enable write access watch in region\\[1\\]"] + #[inline(always)] + #[must_use] + pub fn rgn1wa(&mut self) -> RGN1WA_W<2> { + RGN1WA_W::new(self) + } + #[doc = "Bit 3 - Enable read access watch in region\\[1\\]"] + #[inline(always)] + #[must_use] + pub fn rgn1ra(&mut self) -> RGN1RA_W<3> { + RGN1RA_W::new(self) + } + #[doc = "Bit 4 - Enable write access watch in region\\[2\\]"] + #[inline(always)] + #[must_use] + pub fn rgn2wa(&mut self) -> RGN2WA_W<4> { + RGN2WA_W::new(self) + } + #[doc = "Bit 5 - Enable read access watch in region\\[2\\]"] + #[inline(always)] + #[must_use] + pub fn rgn2ra(&mut self) -> RGN2RA_W<5> { + RGN2RA_W::new(self) + } + #[doc = "Bit 6 - Enable write access watch in region\\[3\\]"] + #[inline(always)] + #[must_use] + pub fn rgn3wa(&mut self) -> RGN3WA_W<6> { + RGN3WA_W::new(self) + } + #[doc = "Bit 7 - Enable read access watch in region\\[3\\]"] + #[inline(always)] + #[must_use] + pub fn rgn3ra(&mut self) -> RGN3RA_W<7> { + RGN3RA_W::new(self) + } + #[doc = "Bit 24 - Enable write access watch in PREGION\\[0\\]"] + #[inline(always)] + #[must_use] + pub fn prgn0wa(&mut self) -> PRGN0WA_W<24> { + PRGN0WA_W::new(self) + } + #[doc = "Bit 25 - Enable read access watch in PREGION\\[0\\]"] + #[inline(always)] + #[must_use] + pub fn prgn0ra(&mut self) -> PRGN0RA_W<25> { + PRGN0RA_W::new(self) + } + #[doc = "Bit 26 - Enable write access watch in PREGION\\[1\\]"] + #[inline(always)] + #[must_use] + pub fn prgn1wa(&mut self) -> PRGN1WA_W<26> { + PRGN1WA_W::new(self) + } + #[doc = "Bit 27 - Enable read access watch in PREGION\\[1\\]"] + #[inline(always)] + #[must_use] + pub fn prgn1ra(&mut self) -> PRGN1RA_W<27> { + PRGN1RA_W::new(self) + } + #[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 = "Enable regions watch\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 [regionenset](index.html) module"] +pub struct REGIONENSET_SPEC; +impl crate::RegisterSpec for REGIONENSET_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [regionenset::R](R) reader structure"] +impl crate::Readable for REGIONENSET_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [regionenset::W](W) writer structure"] +impl crate::Writable for REGIONENSET_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets REGIONENSET to value 0"] +impl crate::Resettable for REGIONENSET_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/nfct.rs b/down-the-stack/dk_pac/src/nfct.rs new file mode 100644 index 0000000..938f37a --- /dev/null +++ b/down-the-stack/dk_pac/src/nfct.rs @@ -0,0 +1,275 @@ +#[doc = r"Register block"] +#[repr(C)] +pub struct RegisterBlock { + #[doc = "0x00 - Activate NFC peripheral for incoming and outgoing frames, change state to activated"] + pub tasks_activate: TASKS_ACTIVATE, + #[doc = "0x04 - Disable NFC peripheral"] + pub tasks_disable: TASKS_DISABLE, + #[doc = "0x08 - Enable NFC sense field mode, change state to sense mode"] + pub tasks_sense: TASKS_SENSE, + #[doc = "0x0c - Start transmission of a outgoing frame, change state to transmit"] + pub tasks_starttx: TASKS_STARTTX, + _reserved4: [u8; 0x0c], + #[doc = "0x1c - Initializes the EasyDMA for receive."] + pub tasks_enablerxdata: TASKS_ENABLERXDATA, + _reserved5: [u8; 0x04], + #[doc = "0x24 - Force state machine to IDLE state"] + pub tasks_goidle: TASKS_GOIDLE, + #[doc = "0x28 - Force state machine to SLEEP_A state"] + pub tasks_gosleep: TASKS_GOSLEEP, + _reserved7: [u8; 0xd4], + #[doc = "0x100 - The NFC peripheral is ready to receive and send frames"] + pub events_ready: EVENTS_READY, + #[doc = "0x104 - Remote NFC field detected"] + pub events_fielddetected: EVENTS_FIELDDETECTED, + #[doc = "0x108 - Remote NFC field lost"] + pub events_fieldlost: EVENTS_FIELDLOST, + #[doc = "0x10c - Marks the start of the first symbol of a transmitted frame"] + pub events_txframestart: EVENTS_TXFRAMESTART, + #[doc = "0x110 - Marks the end of the last transmitted on-air symbol of a frame"] + pub events_txframeend: EVENTS_TXFRAMEEND, + #[doc = "0x114 - Marks the end of the first symbol of a received frame"] + pub events_rxframestart: EVENTS_RXFRAMESTART, + #[doc = "0x118 - Received data have been checked (CRC, parity) and transferred to RAM, and EasyDMA has ended accessing the RX buffer"] + pub events_rxframeend: EVENTS_RXFRAMEEND, + #[doc = "0x11c - NFC error reported. The ERRORSTATUS register contains details on the source of the error."] + pub events_error: EVENTS_ERROR, + _reserved15: [u8; 0x08], + #[doc = "0x128 - NFC RX frame error reported. The FRAMESTATUS.RX register contains details on the source of the error."] + pub events_rxerror: EVENTS_RXERROR, + #[doc = "0x12c - RX buffer (as defined by PACKETPTR and MAXLEN) in Data RAM full."] + pub events_endrx: EVENTS_ENDRX, + #[doc = "0x130 - Transmission of data in RAM has ended, and EasyDMA has ended accessing the TX buffer"] + pub events_endtx: EVENTS_ENDTX, + _reserved18: [u8; 0x04], + #[doc = "0x138 - Auto collision resolution process has started"] + pub events_autocolresstarted: EVENTS_AUTOCOLRESSTARTED, + _reserved19: [u8; 0x0c], + #[doc = "0x148 - NFC Auto collision resolution error reported."] + pub events_collision: EVENTS_COLLISION, + #[doc = "0x14c - NFC Auto collision resolution successfully completed"] + pub events_selected: EVENTS_SELECTED, + #[doc = "0x150 - EasyDMA is ready to receive or send frames."] + pub events_started: EVENTS_STARTED, + _reserved22: [u8; 0xac], + #[doc = "0x200 - Shortcuts between local events and tasks"] + pub shorts: SHORTS, + _reserved23: [u8; 0xfc], + #[doc = "0x300 - Enable or disable interrupt"] + pub inten: INTEN, + #[doc = "0x304 - Enable interrupt"] + pub intenset: INTENSET, + #[doc = "0x308 - Disable interrupt"] + pub intenclr: INTENCLR, + _reserved26: [u8; 0xf8], + #[doc = "0x404 - NFC Error Status register"] + pub errorstatus: ERRORSTATUS, + _reserved27: [u8; 0x04], + #[doc = "0x40c - Unspecified"] + pub framestatus: FRAMESTATUS, + _reserved28: [u8; 0x20], + #[doc = "0x430 - Current value driven to the NFC Load Control"] + pub currentloadctrl: CURRENTLOADCTRL, + _reserved29: [u8; 0x08], + #[doc = "0x43c - Indicates the presence or not of a valid field"] + pub fieldpresent: FIELDPRESENT, + _reserved30: [u8; 0xc4], + #[doc = "0x504 - Minimum frame delay"] + pub framedelaymin: FRAMEDELAYMIN, + #[doc = "0x508 - Maximum frame delay"] + pub framedelaymax: FRAMEDELAYMAX, + #[doc = "0x50c - Configuration register for the Frame Delay Timer"] + pub framedelaymode: FRAMEDELAYMODE, + #[doc = "0x510 - Packet pointer for TXD and RXD data storage in Data RAM"] + pub packetptr: PACKETPTR, + #[doc = "0x514 - Size of allocated for TXD and RXD data storage buffer in Data RAM"] + pub maxlen: MAXLEN, + #[doc = "0x518..0x520 - Unspecified"] + pub txd: TXD, + #[doc = "0x520..0x528 - Unspecified"] + pub rxd: RXD, + _reserved37: [u8; 0x68], + #[doc = "0x590 - Last NFCID1 part (4, 7 or 10 bytes ID)"] + pub nfcid1_last: NFCID1_LAST, + #[doc = "0x594 - Second last NFCID1 part (7 or 10 bytes ID)"] + pub nfcid1_2nd_last: NFCID1_2ND_LAST, + #[doc = "0x598 - Third last NFCID1 part (10 bytes ID)"] + pub nfcid1_3rd_last: NFCID1_3RD_LAST, + _reserved40: [u8; 0x04], + #[doc = "0x5a0 - NFC-A SENS_RES auto-response settings"] + pub sensres: SENSRES, + #[doc = "0x5a4 - NFC-A SEL_RES auto-response settings"] + pub selres: SELRES, +} +#[doc = "TASKS_ACTIVATE (w) register accessor: an alias for `Reg`"] +pub type TASKS_ACTIVATE = crate::Reg; +#[doc = "Activate NFC peripheral for incoming and outgoing frames, change state to activated"] +pub mod tasks_activate; +#[doc = "TASKS_DISABLE (w) register accessor: an alias for `Reg`"] +pub type TASKS_DISABLE = crate::Reg; +#[doc = "Disable NFC peripheral"] +pub mod tasks_disable; +#[doc = "TASKS_SENSE (w) register accessor: an alias for `Reg`"] +pub type TASKS_SENSE = crate::Reg; +#[doc = "Enable NFC sense field mode, change state to sense mode"] +pub mod tasks_sense; +#[doc = "TASKS_STARTTX (w) register accessor: an alias for `Reg`"] +pub type TASKS_STARTTX = crate::Reg; +#[doc = "Start transmission of a outgoing frame, change state to transmit"] +pub mod tasks_starttx; +#[doc = "TASKS_ENABLERXDATA (w) register accessor: an alias for `Reg`"] +pub type TASKS_ENABLERXDATA = crate::Reg; +#[doc = "Initializes the EasyDMA for receive."] +pub mod tasks_enablerxdata; +#[doc = "TASKS_GOIDLE (w) register accessor: an alias for `Reg`"] +pub type TASKS_GOIDLE = crate::Reg; +#[doc = "Force state machine to IDLE state"] +pub mod tasks_goidle; +#[doc = "TASKS_GOSLEEP (w) register accessor: an alias for `Reg`"] +pub type TASKS_GOSLEEP = crate::Reg; +#[doc = "Force state machine to SLEEP_A state"] +pub mod tasks_gosleep; +#[doc = "EVENTS_READY (rw) register accessor: an alias for `Reg`"] +pub type EVENTS_READY = crate::Reg; +#[doc = "The NFC peripheral is ready to receive and send frames"] +pub mod events_ready; +#[doc = "EVENTS_FIELDDETECTED (rw) register accessor: an alias for `Reg`"] +pub type EVENTS_FIELDDETECTED = crate::Reg; +#[doc = "Remote NFC field detected"] +pub mod events_fielddetected; +#[doc = "EVENTS_FIELDLOST (rw) register accessor: an alias for `Reg`"] +pub type EVENTS_FIELDLOST = crate::Reg; +#[doc = "Remote NFC field lost"] +pub mod events_fieldlost; +#[doc = "EVENTS_TXFRAMESTART (rw) register accessor: an alias for `Reg`"] +pub type EVENTS_TXFRAMESTART = crate::Reg; +#[doc = "Marks the start of the first symbol of a transmitted frame"] +pub mod events_txframestart; +#[doc = "EVENTS_TXFRAMEEND (rw) register accessor: an alias for `Reg`"] +pub type EVENTS_TXFRAMEEND = crate::Reg; +#[doc = "Marks the end of the last transmitted on-air symbol of a frame"] +pub mod events_txframeend; +#[doc = "EVENTS_RXFRAMESTART (rw) register accessor: an alias for `Reg`"] +pub type EVENTS_RXFRAMESTART = crate::Reg; +#[doc = "Marks the end of the first symbol of a received frame"] +pub mod events_rxframestart; +#[doc = "EVENTS_RXFRAMEEND (rw) register accessor: an alias for `Reg`"] +pub type EVENTS_RXFRAMEEND = crate::Reg; +#[doc = "Received data have been checked (CRC, parity) and transferred to RAM, and EasyDMA has ended accessing the RX buffer"] +pub mod events_rxframeend; +#[doc = "EVENTS_ERROR (rw) register accessor: an alias for `Reg`"] +pub type EVENTS_ERROR = crate::Reg; +#[doc = "NFC error reported. The ERRORSTATUS register contains details on the source of the error."] +pub mod events_error; +#[doc = "EVENTS_RXERROR (rw) register accessor: an alias for `Reg`"] +pub type EVENTS_RXERROR = crate::Reg; +#[doc = "NFC RX frame error reported. The FRAMESTATUS.RX register contains details on the source of the error."] +pub mod events_rxerror; +#[doc = "EVENTS_ENDRX (rw) register accessor: an alias for `Reg`"] +pub type EVENTS_ENDRX = crate::Reg; +#[doc = "RX buffer (as defined by PACKETPTR and MAXLEN) in Data RAM full."] +pub mod events_endrx; +#[doc = "EVENTS_ENDTX (rw) register accessor: an alias for `Reg`"] +pub type EVENTS_ENDTX = crate::Reg; +#[doc = "Transmission of data in RAM has ended, and EasyDMA has ended accessing the TX buffer"] +pub mod events_endtx; +#[doc = "EVENTS_AUTOCOLRESSTARTED (rw) register accessor: an alias for `Reg`"] +pub type EVENTS_AUTOCOLRESSTARTED = + crate::Reg; +#[doc = "Auto collision resolution process has started"] +pub mod events_autocolresstarted; +#[doc = "EVENTS_COLLISION (rw) register accessor: an alias for `Reg`"] +pub type EVENTS_COLLISION = crate::Reg; +#[doc = "NFC Auto collision resolution error reported."] +pub mod events_collision; +#[doc = "EVENTS_SELECTED (rw) register accessor: an alias for `Reg`"] +pub type EVENTS_SELECTED = crate::Reg; +#[doc = "NFC Auto collision resolution successfully completed"] +pub mod events_selected; +#[doc = "EVENTS_STARTED (rw) register accessor: an alias for `Reg`"] +pub type EVENTS_STARTED = crate::Reg; +#[doc = "EasyDMA is ready to receive or send frames."] +pub mod events_started; +#[doc = "SHORTS (rw) register accessor: an alias for `Reg`"] +pub type SHORTS = crate::Reg; +#[doc = "Shortcuts between local events and tasks"] +pub mod shorts; +#[doc = "INTEN (rw) register accessor: an alias for `Reg`"] +pub type INTEN = crate::Reg; +#[doc = "Enable or disable interrupt"] +pub mod inten; +#[doc = "INTENSET (rw) register accessor: an alias for `Reg`"] +pub type INTENSET = crate::Reg; +#[doc = "Enable interrupt"] +pub mod intenset; +#[doc = "INTENCLR (rw) register accessor: an alias for `Reg`"] +pub type INTENCLR = crate::Reg; +#[doc = "Disable interrupt"] +pub mod intenclr; +#[doc = "ERRORSTATUS (rw) register accessor: an alias for `Reg`"] +pub type ERRORSTATUS = crate::Reg; +#[doc = "NFC Error Status register"] +pub mod errorstatus; +#[doc = "Unspecified"] +pub use self::framestatus::FRAMESTATUS; +#[doc = r"Cluster"] +#[doc = "Unspecified"] +pub mod framestatus; +#[doc = "CURRENTLOADCTRL (r) register accessor: an alias for `Reg`"] +pub type CURRENTLOADCTRL = crate::Reg; +#[doc = "Current value driven to the NFC Load Control"] +pub mod currentloadctrl; +#[doc = "FIELDPRESENT (r) register accessor: an alias for `Reg`"] +pub type FIELDPRESENT = crate::Reg; +#[doc = "Indicates the presence or not of a valid field"] +pub mod fieldpresent; +#[doc = "FRAMEDELAYMIN (rw) register accessor: an alias for `Reg`"] +pub type FRAMEDELAYMIN = crate::Reg; +#[doc = "Minimum frame delay"] +pub mod framedelaymin; +#[doc = "FRAMEDELAYMAX (rw) register accessor: an alias for `Reg`"] +pub type FRAMEDELAYMAX = crate::Reg; +#[doc = "Maximum frame delay"] +pub mod framedelaymax; +#[doc = "FRAMEDELAYMODE (rw) register accessor: an alias for `Reg`"] +pub type FRAMEDELAYMODE = crate::Reg; +#[doc = "Configuration register for the Frame Delay Timer"] +pub mod framedelaymode; +#[doc = "PACKETPTR (rw) register accessor: an alias for `Reg`"] +pub type PACKETPTR = crate::Reg; +#[doc = "Packet pointer for TXD and RXD data storage in Data RAM"] +pub mod packetptr; +#[doc = "MAXLEN (rw) register accessor: an alias for `Reg`"] +pub type MAXLEN = crate::Reg; +#[doc = "Size of allocated for TXD and RXD data storage buffer in Data RAM"] +pub mod maxlen; +#[doc = "Unspecified"] +pub use self::txd::TXD; +#[doc = r"Cluster"] +#[doc = "Unspecified"] +pub mod txd; +#[doc = "Unspecified"] +pub use self::rxd::RXD; +#[doc = r"Cluster"] +#[doc = "Unspecified"] +pub mod rxd; +#[doc = "NFCID1_LAST (rw) register accessor: an alias for `Reg`"] +pub type NFCID1_LAST = crate::Reg; +#[doc = "Last NFCID1 part (4, 7 or 10 bytes ID)"] +pub mod nfcid1_last; +#[doc = "NFCID1_2ND_LAST (rw) register accessor: an alias for `Reg`"] +pub type NFCID1_2ND_LAST = crate::Reg; +#[doc = "Second last NFCID1 part (7 or 10 bytes ID)"] +pub mod nfcid1_2nd_last; +#[doc = "NFCID1_3RD_LAST (rw) register accessor: an alias for `Reg`"] +pub type NFCID1_3RD_LAST = crate::Reg; +#[doc = "Third last NFCID1 part (10 bytes ID)"] +pub mod nfcid1_3rd_last; +#[doc = "SENSRES (rw) register accessor: an alias for `Reg`"] +pub type SENSRES = crate::Reg; +#[doc = "NFC-A SENS_RES auto-response settings"] +pub mod sensres; +#[doc = "SELRES (rw) register accessor: an alias for `Reg`"] +pub type SELRES = crate::Reg; +#[doc = "NFC-A SEL_RES auto-response settings"] +pub mod selres; diff --git a/down-the-stack/dk_pac/src/nfct/currentloadctrl.rs b/down-the-stack/dk_pac/src/nfct/currentloadctrl.rs new file mode 100644 index 0000000..86f5a61 --- /dev/null +++ b/down-the-stack/dk_pac/src/nfct/currentloadctrl.rs @@ -0,0 +1,37 @@ +#[doc = "Register `CURRENTLOADCTRL` 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 = "Field `CURRENTLOADCTRL` reader - Current value driven to the NFC Load Control"] +pub type CURRENTLOADCTRL_R = crate::FieldReader; +impl R { + #[doc = "Bits 0:5 - Current value driven to the NFC Load Control"] + #[inline(always)] + pub fn currentloadctrl(&self) -> CURRENTLOADCTRL_R { + CURRENTLOADCTRL_R::new((self.bits & 0x3f) as u8) + } +} +#[doc = "Current value driven to the NFC Load Control\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 [currentloadctrl](index.html) module"] +pub struct CURRENTLOADCTRL_SPEC; +impl crate::RegisterSpec for CURRENTLOADCTRL_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [currentloadctrl::R](R) reader structure"] +impl crate::Readable for CURRENTLOADCTRL_SPEC { + type Reader = R; +} +#[doc = "`reset()` method sets CURRENTLOADCTRL to value 0"] +impl crate::Resettable for CURRENTLOADCTRL_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/nfct/errorstatus.rs b/down-the-stack/dk_pac/src/nfct/errorstatus.rs new file mode 100644 index 0000000..ca528ea --- /dev/null +++ b/down-the-stack/dk_pac/src/nfct/errorstatus.rs @@ -0,0 +1,113 @@ +#[doc = "Register `ERRORSTATUS` 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 `ERRORSTATUS` 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 `FRAMEDELAYTIMEOUT` reader - No STARTTX task triggered before expiration of the time set in FRAMEDELAYMAX"] +pub type FRAMEDELAYTIMEOUT_R = crate::BitReader; +#[doc = "Field `FRAMEDELAYTIMEOUT` writer - No STARTTX task triggered before expiration of the time set in FRAMEDELAYMAX"] +pub type FRAMEDELAYTIMEOUT_W<'a, const O: u8> = + crate::BitWriter1C<'a, u32, ERRORSTATUS_SPEC, bool, O>; +#[doc = "Field `NFCFIELDTOOSTRONG` reader - Field level is too high at max load resistance"] +pub type NFCFIELDTOOSTRONG_R = crate::BitReader; +#[doc = "Field `NFCFIELDTOOSTRONG` writer - Field level is too high at max load resistance"] +pub type NFCFIELDTOOSTRONG_W<'a, const O: u8> = + crate::BitWriter1C<'a, u32, ERRORSTATUS_SPEC, bool, O>; +#[doc = "Field `NFCFIELDTOOWEAK` reader - Field level is too low at min load resistance"] +pub type NFCFIELDTOOWEAK_R = crate::BitReader; +#[doc = "Field `NFCFIELDTOOWEAK` writer - Field level is too low at min load resistance"] +pub type NFCFIELDTOOWEAK_W<'a, const O: u8> = + crate::BitWriter1C<'a, u32, ERRORSTATUS_SPEC, bool, O>; +impl R { + #[doc = "Bit 0 - No STARTTX task triggered before expiration of the time set in FRAMEDELAYMAX"] + #[inline(always)] + pub fn framedelaytimeout(&self) -> FRAMEDELAYTIMEOUT_R { + FRAMEDELAYTIMEOUT_R::new((self.bits & 1) != 0) + } + #[doc = "Bit 2 - Field level is too high at max load resistance"] + #[inline(always)] + pub fn nfcfieldtoostrong(&self) -> NFCFIELDTOOSTRONG_R { + NFCFIELDTOOSTRONG_R::new(((self.bits >> 2) & 1) != 0) + } + #[doc = "Bit 3 - Field level is too low at min load resistance"] + #[inline(always)] + pub fn nfcfieldtooweak(&self) -> NFCFIELDTOOWEAK_R { + NFCFIELDTOOWEAK_R::new(((self.bits >> 3) & 1) != 0) + } +} +impl W { + #[doc = "Bit 0 - No STARTTX task triggered before expiration of the time set in FRAMEDELAYMAX"] + #[inline(always)] + #[must_use] + pub fn framedelaytimeout(&mut self) -> FRAMEDELAYTIMEOUT_W<0> { + FRAMEDELAYTIMEOUT_W::new(self) + } + #[doc = "Bit 2 - Field level is too high at max load resistance"] + #[inline(always)] + #[must_use] + pub fn nfcfieldtoostrong(&mut self) -> NFCFIELDTOOSTRONG_W<2> { + NFCFIELDTOOSTRONG_W::new(self) + } + #[doc = "Bit 3 - Field level is too low at min load resistance"] + #[inline(always)] + #[must_use] + pub fn nfcfieldtooweak(&mut self) -> NFCFIELDTOOWEAK_W<3> { + NFCFIELDTOOWEAK_W::new(self) + } + #[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 = "NFC Error Status register\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 [errorstatus](index.html) module"] +pub struct ERRORSTATUS_SPEC; +impl crate::RegisterSpec for ERRORSTATUS_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [errorstatus::R](R) reader structure"] +impl crate::Readable for ERRORSTATUS_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [errorstatus::W](W) writer structure"] +impl crate::Writable for ERRORSTATUS_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0x0d; +} +#[doc = "`reset()` method sets ERRORSTATUS to value 0"] +impl crate::Resettable for ERRORSTATUS_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/nfct/events_autocolresstarted.rs b/down-the-stack/dk_pac/src/nfct/events_autocolresstarted.rs new file mode 100644 index 0000000..002ca01 --- /dev/null +++ b/down-the-stack/dk_pac/src/nfct/events_autocolresstarted.rs @@ -0,0 +1,127 @@ +#[doc = "Register `EVENTS_AUTOCOLRESSTARTED` 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 `EVENTS_AUTOCOLRESSTARTED` 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 `EVENTS_AUTOCOLRESSTARTED` reader - Auto collision resolution process has started"] +pub type EVENTS_AUTOCOLRESSTARTED_R = crate::BitReader; +#[doc = "Auto collision resolution process has started\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum EVENTS_AUTOCOLRESSTARTED_A { + #[doc = "0: Event not generated"] + NOT_GENERATED = 0, + #[doc = "1: Event generated"] + GENERATED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: EVENTS_AUTOCOLRESSTARTED_A) -> Self { + variant as u8 != 0 + } +} +impl EVENTS_AUTOCOLRESSTARTED_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> EVENTS_AUTOCOLRESSTARTED_A { + match self.bits { + false => EVENTS_AUTOCOLRESSTARTED_A::NOT_GENERATED, + true => EVENTS_AUTOCOLRESSTARTED_A::GENERATED, + } + } + #[doc = "Checks if the value of the field is `NOT_GENERATED`"] + #[inline(always)] + pub fn is_not_generated(&self) -> bool { + *self == EVENTS_AUTOCOLRESSTARTED_A::NOT_GENERATED + } + #[doc = "Checks if the value of the field is `GENERATED`"] + #[inline(always)] + pub fn is_generated(&self) -> bool { + *self == EVENTS_AUTOCOLRESSTARTED_A::GENERATED + } +} +#[doc = "Field `EVENTS_AUTOCOLRESSTARTED` writer - Auto collision resolution process has started"] +pub type EVENTS_AUTOCOLRESSTARTED_W<'a, const O: u8> = + crate::BitWriter<'a, u32, EVENTS_AUTOCOLRESSTARTED_SPEC, EVENTS_AUTOCOLRESSTARTED_A, O>; +impl<'a, const O: u8> EVENTS_AUTOCOLRESSTARTED_W<'a, O> { + #[doc = "Event not generated"] + #[inline(always)] + pub fn not_generated(self) -> &'a mut W { + self.variant(EVENTS_AUTOCOLRESSTARTED_A::NOT_GENERATED) + } + #[doc = "Event generated"] + #[inline(always)] + pub fn generated(self) -> &'a mut W { + self.variant(EVENTS_AUTOCOLRESSTARTED_A::GENERATED) + } +} +impl R { + #[doc = "Bit 0 - Auto collision resolution process has started"] + #[inline(always)] + pub fn events_autocolresstarted(&self) -> EVENTS_AUTOCOLRESSTARTED_R { + EVENTS_AUTOCOLRESSTARTED_R::new((self.bits & 1) != 0) + } +} +impl W { + #[doc = "Bit 0 - Auto collision resolution process has started"] + #[inline(always)] + #[must_use] + pub fn events_autocolresstarted(&mut self) -> EVENTS_AUTOCOLRESSTARTED_W<0> { + EVENTS_AUTOCOLRESSTARTED_W::new(self) + } + #[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 = "Auto collision resolution process has started\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 [events_autocolresstarted](index.html) module"] +pub struct EVENTS_AUTOCOLRESSTARTED_SPEC; +impl crate::RegisterSpec for EVENTS_AUTOCOLRESSTARTED_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [events_autocolresstarted::R](R) reader structure"] +impl crate::Readable for EVENTS_AUTOCOLRESSTARTED_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [events_autocolresstarted::W](W) writer structure"] +impl crate::Writable for EVENTS_AUTOCOLRESSTARTED_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets EVENTS_AUTOCOLRESSTARTED to value 0"] +impl crate::Resettable for EVENTS_AUTOCOLRESSTARTED_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/nfct/events_collision.rs b/down-the-stack/dk_pac/src/nfct/events_collision.rs new file mode 100644 index 0000000..ed21d9b --- /dev/null +++ b/down-the-stack/dk_pac/src/nfct/events_collision.rs @@ -0,0 +1,127 @@ +#[doc = "Register `EVENTS_COLLISION` 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 `EVENTS_COLLISION` 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 `EVENTS_COLLISION` reader - NFC Auto collision resolution error reported."] +pub type EVENTS_COLLISION_R = crate::BitReader; +#[doc = "NFC Auto collision resolution error reported.\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum EVENTS_COLLISION_A { + #[doc = "0: Event not generated"] + NOT_GENERATED = 0, + #[doc = "1: Event generated"] + GENERATED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: EVENTS_COLLISION_A) -> Self { + variant as u8 != 0 + } +} +impl EVENTS_COLLISION_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> EVENTS_COLLISION_A { + match self.bits { + false => EVENTS_COLLISION_A::NOT_GENERATED, + true => EVENTS_COLLISION_A::GENERATED, + } + } + #[doc = "Checks if the value of the field is `NOT_GENERATED`"] + #[inline(always)] + pub fn is_not_generated(&self) -> bool { + *self == EVENTS_COLLISION_A::NOT_GENERATED + } + #[doc = "Checks if the value of the field is `GENERATED`"] + #[inline(always)] + pub fn is_generated(&self) -> bool { + *self == EVENTS_COLLISION_A::GENERATED + } +} +#[doc = "Field `EVENTS_COLLISION` writer - NFC Auto collision resolution error reported."] +pub type EVENTS_COLLISION_W<'a, const O: u8> = + crate::BitWriter<'a, u32, EVENTS_COLLISION_SPEC, EVENTS_COLLISION_A, O>; +impl<'a, const O: u8> EVENTS_COLLISION_W<'a, O> { + #[doc = "Event not generated"] + #[inline(always)] + pub fn not_generated(self) -> &'a mut W { + self.variant(EVENTS_COLLISION_A::NOT_GENERATED) + } + #[doc = "Event generated"] + #[inline(always)] + pub fn generated(self) -> &'a mut W { + self.variant(EVENTS_COLLISION_A::GENERATED) + } +} +impl R { + #[doc = "Bit 0 - NFC Auto collision resolution error reported."] + #[inline(always)] + pub fn events_collision(&self) -> EVENTS_COLLISION_R { + EVENTS_COLLISION_R::new((self.bits & 1) != 0) + } +} +impl W { + #[doc = "Bit 0 - NFC Auto collision resolution error reported."] + #[inline(always)] + #[must_use] + pub fn events_collision(&mut self) -> EVENTS_COLLISION_W<0> { + EVENTS_COLLISION_W::new(self) + } + #[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 = "NFC Auto collision resolution error reported.\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 [events_collision](index.html) module"] +pub struct EVENTS_COLLISION_SPEC; +impl crate::RegisterSpec for EVENTS_COLLISION_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [events_collision::R](R) reader structure"] +impl crate::Readable for EVENTS_COLLISION_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [events_collision::W](W) writer structure"] +impl crate::Writable for EVENTS_COLLISION_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets EVENTS_COLLISION to value 0"] +impl crate::Resettable for EVENTS_COLLISION_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/nfct/events_endrx.rs b/down-the-stack/dk_pac/src/nfct/events_endrx.rs new file mode 100644 index 0000000..97cbd95 --- /dev/null +++ b/down-the-stack/dk_pac/src/nfct/events_endrx.rs @@ -0,0 +1,127 @@ +#[doc = "Register `EVENTS_ENDRX` 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 `EVENTS_ENDRX` 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 `EVENTS_ENDRX` reader - RX buffer (as defined by PACKETPTR and MAXLEN) in Data RAM full."] +pub type EVENTS_ENDRX_R = crate::BitReader; +#[doc = "RX buffer (as defined by PACKETPTR and MAXLEN) in Data RAM full.\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum EVENTS_ENDRX_A { + #[doc = "0: Event not generated"] + NOT_GENERATED = 0, + #[doc = "1: Event generated"] + GENERATED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: EVENTS_ENDRX_A) -> Self { + variant as u8 != 0 + } +} +impl EVENTS_ENDRX_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> EVENTS_ENDRX_A { + match self.bits { + false => EVENTS_ENDRX_A::NOT_GENERATED, + true => EVENTS_ENDRX_A::GENERATED, + } + } + #[doc = "Checks if the value of the field is `NOT_GENERATED`"] + #[inline(always)] + pub fn is_not_generated(&self) -> bool { + *self == EVENTS_ENDRX_A::NOT_GENERATED + } + #[doc = "Checks if the value of the field is `GENERATED`"] + #[inline(always)] + pub fn is_generated(&self) -> bool { + *self == EVENTS_ENDRX_A::GENERATED + } +} +#[doc = "Field `EVENTS_ENDRX` writer - RX buffer (as defined by PACKETPTR and MAXLEN) in Data RAM full."] +pub type EVENTS_ENDRX_W<'a, const O: u8> = + crate::BitWriter<'a, u32, EVENTS_ENDRX_SPEC, EVENTS_ENDRX_A, O>; +impl<'a, const O: u8> EVENTS_ENDRX_W<'a, O> { + #[doc = "Event not generated"] + #[inline(always)] + pub fn not_generated(self) -> &'a mut W { + self.variant(EVENTS_ENDRX_A::NOT_GENERATED) + } + #[doc = "Event generated"] + #[inline(always)] + pub fn generated(self) -> &'a mut W { + self.variant(EVENTS_ENDRX_A::GENERATED) + } +} +impl R { + #[doc = "Bit 0 - RX buffer (as defined by PACKETPTR and MAXLEN) in Data RAM full."] + #[inline(always)] + pub fn events_endrx(&self) -> EVENTS_ENDRX_R { + EVENTS_ENDRX_R::new((self.bits & 1) != 0) + } +} +impl W { + #[doc = "Bit 0 - RX buffer (as defined by PACKETPTR and MAXLEN) in Data RAM full."] + #[inline(always)] + #[must_use] + pub fn events_endrx(&mut self) -> EVENTS_ENDRX_W<0> { + EVENTS_ENDRX_W::new(self) + } + #[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 = "RX buffer (as defined by PACKETPTR and MAXLEN) in Data RAM full.\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 [events_endrx](index.html) module"] +pub struct EVENTS_ENDRX_SPEC; +impl crate::RegisterSpec for EVENTS_ENDRX_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [events_endrx::R](R) reader structure"] +impl crate::Readable for EVENTS_ENDRX_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [events_endrx::W](W) writer structure"] +impl crate::Writable for EVENTS_ENDRX_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets EVENTS_ENDRX to value 0"] +impl crate::Resettable for EVENTS_ENDRX_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/nfct/events_endtx.rs b/down-the-stack/dk_pac/src/nfct/events_endtx.rs new file mode 100644 index 0000000..b5df0f9 --- /dev/null +++ b/down-the-stack/dk_pac/src/nfct/events_endtx.rs @@ -0,0 +1,127 @@ +#[doc = "Register `EVENTS_ENDTX` 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 `EVENTS_ENDTX` 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 `EVENTS_ENDTX` reader - Transmission of data in RAM has ended, and EasyDMA has ended accessing the TX buffer"] +pub type EVENTS_ENDTX_R = crate::BitReader; +#[doc = "Transmission of data in RAM has ended, and EasyDMA has ended accessing the TX buffer\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum EVENTS_ENDTX_A { + #[doc = "0: Event not generated"] + NOT_GENERATED = 0, + #[doc = "1: Event generated"] + GENERATED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: EVENTS_ENDTX_A) -> Self { + variant as u8 != 0 + } +} +impl EVENTS_ENDTX_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> EVENTS_ENDTX_A { + match self.bits { + false => EVENTS_ENDTX_A::NOT_GENERATED, + true => EVENTS_ENDTX_A::GENERATED, + } + } + #[doc = "Checks if the value of the field is `NOT_GENERATED`"] + #[inline(always)] + pub fn is_not_generated(&self) -> bool { + *self == EVENTS_ENDTX_A::NOT_GENERATED + } + #[doc = "Checks if the value of the field is `GENERATED`"] + #[inline(always)] + pub fn is_generated(&self) -> bool { + *self == EVENTS_ENDTX_A::GENERATED + } +} +#[doc = "Field `EVENTS_ENDTX` writer - Transmission of data in RAM has ended, and EasyDMA has ended accessing the TX buffer"] +pub type EVENTS_ENDTX_W<'a, const O: u8> = + crate::BitWriter<'a, u32, EVENTS_ENDTX_SPEC, EVENTS_ENDTX_A, O>; +impl<'a, const O: u8> EVENTS_ENDTX_W<'a, O> { + #[doc = "Event not generated"] + #[inline(always)] + pub fn not_generated(self) -> &'a mut W { + self.variant(EVENTS_ENDTX_A::NOT_GENERATED) + } + #[doc = "Event generated"] + #[inline(always)] + pub fn generated(self) -> &'a mut W { + self.variant(EVENTS_ENDTX_A::GENERATED) + } +} +impl R { + #[doc = "Bit 0 - Transmission of data in RAM has ended, and EasyDMA has ended accessing the TX buffer"] + #[inline(always)] + pub fn events_endtx(&self) -> EVENTS_ENDTX_R { + EVENTS_ENDTX_R::new((self.bits & 1) != 0) + } +} +impl W { + #[doc = "Bit 0 - Transmission of data in RAM has ended, and EasyDMA has ended accessing the TX buffer"] + #[inline(always)] + #[must_use] + pub fn events_endtx(&mut self) -> EVENTS_ENDTX_W<0> { + EVENTS_ENDTX_W::new(self) + } + #[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 = "Transmission of data in RAM has ended, and EasyDMA has ended accessing the TX buffer\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 [events_endtx](index.html) module"] +pub struct EVENTS_ENDTX_SPEC; +impl crate::RegisterSpec for EVENTS_ENDTX_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [events_endtx::R](R) reader structure"] +impl crate::Readable for EVENTS_ENDTX_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [events_endtx::W](W) writer structure"] +impl crate::Writable for EVENTS_ENDTX_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets EVENTS_ENDTX to value 0"] +impl crate::Resettable for EVENTS_ENDTX_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/nfct/events_error.rs b/down-the-stack/dk_pac/src/nfct/events_error.rs new file mode 100644 index 0000000..ac4d2c0 --- /dev/null +++ b/down-the-stack/dk_pac/src/nfct/events_error.rs @@ -0,0 +1,127 @@ +#[doc = "Register `EVENTS_ERROR` 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 `EVENTS_ERROR` 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 `EVENTS_ERROR` reader - NFC error reported. The ERRORSTATUS register contains details on the source of the error."] +pub type EVENTS_ERROR_R = crate::BitReader; +#[doc = "NFC error reported. The ERRORSTATUS register contains details on the source of the error.\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum EVENTS_ERROR_A { + #[doc = "0: Event not generated"] + NOT_GENERATED = 0, + #[doc = "1: Event generated"] + GENERATED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: EVENTS_ERROR_A) -> Self { + variant as u8 != 0 + } +} +impl EVENTS_ERROR_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> EVENTS_ERROR_A { + match self.bits { + false => EVENTS_ERROR_A::NOT_GENERATED, + true => EVENTS_ERROR_A::GENERATED, + } + } + #[doc = "Checks if the value of the field is `NOT_GENERATED`"] + #[inline(always)] + pub fn is_not_generated(&self) -> bool { + *self == EVENTS_ERROR_A::NOT_GENERATED + } + #[doc = "Checks if the value of the field is `GENERATED`"] + #[inline(always)] + pub fn is_generated(&self) -> bool { + *self == EVENTS_ERROR_A::GENERATED + } +} +#[doc = "Field `EVENTS_ERROR` writer - NFC error reported. The ERRORSTATUS register contains details on the source of the error."] +pub type EVENTS_ERROR_W<'a, const O: u8> = + crate::BitWriter<'a, u32, EVENTS_ERROR_SPEC, EVENTS_ERROR_A, O>; +impl<'a, const O: u8> EVENTS_ERROR_W<'a, O> { + #[doc = "Event not generated"] + #[inline(always)] + pub fn not_generated(self) -> &'a mut W { + self.variant(EVENTS_ERROR_A::NOT_GENERATED) + } + #[doc = "Event generated"] + #[inline(always)] + pub fn generated(self) -> &'a mut W { + self.variant(EVENTS_ERROR_A::GENERATED) + } +} +impl R { + #[doc = "Bit 0 - NFC error reported. The ERRORSTATUS register contains details on the source of the error."] + #[inline(always)] + pub fn events_error(&self) -> EVENTS_ERROR_R { + EVENTS_ERROR_R::new((self.bits & 1) != 0) + } +} +impl W { + #[doc = "Bit 0 - NFC error reported. The ERRORSTATUS register contains details on the source of the error."] + #[inline(always)] + #[must_use] + pub fn events_error(&mut self) -> EVENTS_ERROR_W<0> { + EVENTS_ERROR_W::new(self) + } + #[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 = "NFC error reported. The ERRORSTATUS register contains details on the source of the error.\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 [events_error](index.html) module"] +pub struct EVENTS_ERROR_SPEC; +impl crate::RegisterSpec for EVENTS_ERROR_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [events_error::R](R) reader structure"] +impl crate::Readable for EVENTS_ERROR_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [events_error::W](W) writer structure"] +impl crate::Writable for EVENTS_ERROR_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets EVENTS_ERROR to value 0"] +impl crate::Resettable for EVENTS_ERROR_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/nfct/events_fielddetected.rs b/down-the-stack/dk_pac/src/nfct/events_fielddetected.rs new file mode 100644 index 0000000..f696305 --- /dev/null +++ b/down-the-stack/dk_pac/src/nfct/events_fielddetected.rs @@ -0,0 +1,127 @@ +#[doc = "Register `EVENTS_FIELDDETECTED` 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 `EVENTS_FIELDDETECTED` 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 `EVENTS_FIELDDETECTED` reader - Remote NFC field detected"] +pub type EVENTS_FIELDDETECTED_R = crate::BitReader; +#[doc = "Remote NFC field detected\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum EVENTS_FIELDDETECTED_A { + #[doc = "0: Event not generated"] + NOT_GENERATED = 0, + #[doc = "1: Event generated"] + GENERATED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: EVENTS_FIELDDETECTED_A) -> Self { + variant as u8 != 0 + } +} +impl EVENTS_FIELDDETECTED_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> EVENTS_FIELDDETECTED_A { + match self.bits { + false => EVENTS_FIELDDETECTED_A::NOT_GENERATED, + true => EVENTS_FIELDDETECTED_A::GENERATED, + } + } + #[doc = "Checks if the value of the field is `NOT_GENERATED`"] + #[inline(always)] + pub fn is_not_generated(&self) -> bool { + *self == EVENTS_FIELDDETECTED_A::NOT_GENERATED + } + #[doc = "Checks if the value of the field is `GENERATED`"] + #[inline(always)] + pub fn is_generated(&self) -> bool { + *self == EVENTS_FIELDDETECTED_A::GENERATED + } +} +#[doc = "Field `EVENTS_FIELDDETECTED` writer - Remote NFC field detected"] +pub type EVENTS_FIELDDETECTED_W<'a, const O: u8> = + crate::BitWriter<'a, u32, EVENTS_FIELDDETECTED_SPEC, EVENTS_FIELDDETECTED_A, O>; +impl<'a, const O: u8> EVENTS_FIELDDETECTED_W<'a, O> { + #[doc = "Event not generated"] + #[inline(always)] + pub fn not_generated(self) -> &'a mut W { + self.variant(EVENTS_FIELDDETECTED_A::NOT_GENERATED) + } + #[doc = "Event generated"] + #[inline(always)] + pub fn generated(self) -> &'a mut W { + self.variant(EVENTS_FIELDDETECTED_A::GENERATED) + } +} +impl R { + #[doc = "Bit 0 - Remote NFC field detected"] + #[inline(always)] + pub fn events_fielddetected(&self) -> EVENTS_FIELDDETECTED_R { + EVENTS_FIELDDETECTED_R::new((self.bits & 1) != 0) + } +} +impl W { + #[doc = "Bit 0 - Remote NFC field detected"] + #[inline(always)] + #[must_use] + pub fn events_fielddetected(&mut self) -> EVENTS_FIELDDETECTED_W<0> { + EVENTS_FIELDDETECTED_W::new(self) + } + #[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 = "Remote NFC field detected\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 [events_fielddetected](index.html) module"] +pub struct EVENTS_FIELDDETECTED_SPEC; +impl crate::RegisterSpec for EVENTS_FIELDDETECTED_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [events_fielddetected::R](R) reader structure"] +impl crate::Readable for EVENTS_FIELDDETECTED_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [events_fielddetected::W](W) writer structure"] +impl crate::Writable for EVENTS_FIELDDETECTED_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets EVENTS_FIELDDETECTED to value 0"] +impl crate::Resettable for EVENTS_FIELDDETECTED_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/nfct/events_fieldlost.rs b/down-the-stack/dk_pac/src/nfct/events_fieldlost.rs new file mode 100644 index 0000000..7bcf51d --- /dev/null +++ b/down-the-stack/dk_pac/src/nfct/events_fieldlost.rs @@ -0,0 +1,127 @@ +#[doc = "Register `EVENTS_FIELDLOST` 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 `EVENTS_FIELDLOST` 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 `EVENTS_FIELDLOST` reader - Remote NFC field lost"] +pub type EVENTS_FIELDLOST_R = crate::BitReader; +#[doc = "Remote NFC field lost\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum EVENTS_FIELDLOST_A { + #[doc = "0: Event not generated"] + NOT_GENERATED = 0, + #[doc = "1: Event generated"] + GENERATED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: EVENTS_FIELDLOST_A) -> Self { + variant as u8 != 0 + } +} +impl EVENTS_FIELDLOST_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> EVENTS_FIELDLOST_A { + match self.bits { + false => EVENTS_FIELDLOST_A::NOT_GENERATED, + true => EVENTS_FIELDLOST_A::GENERATED, + } + } + #[doc = "Checks if the value of the field is `NOT_GENERATED`"] + #[inline(always)] + pub fn is_not_generated(&self) -> bool { + *self == EVENTS_FIELDLOST_A::NOT_GENERATED + } + #[doc = "Checks if the value of the field is `GENERATED`"] + #[inline(always)] + pub fn is_generated(&self) -> bool { + *self == EVENTS_FIELDLOST_A::GENERATED + } +} +#[doc = "Field `EVENTS_FIELDLOST` writer - Remote NFC field lost"] +pub type EVENTS_FIELDLOST_W<'a, const O: u8> = + crate::BitWriter<'a, u32, EVENTS_FIELDLOST_SPEC, EVENTS_FIELDLOST_A, O>; +impl<'a, const O: u8> EVENTS_FIELDLOST_W<'a, O> { + #[doc = "Event not generated"] + #[inline(always)] + pub fn not_generated(self) -> &'a mut W { + self.variant(EVENTS_FIELDLOST_A::NOT_GENERATED) + } + #[doc = "Event generated"] + #[inline(always)] + pub fn generated(self) -> &'a mut W { + self.variant(EVENTS_FIELDLOST_A::GENERATED) + } +} +impl R { + #[doc = "Bit 0 - Remote NFC field lost"] + #[inline(always)] + pub fn events_fieldlost(&self) -> EVENTS_FIELDLOST_R { + EVENTS_FIELDLOST_R::new((self.bits & 1) != 0) + } +} +impl W { + #[doc = "Bit 0 - Remote NFC field lost"] + #[inline(always)] + #[must_use] + pub fn events_fieldlost(&mut self) -> EVENTS_FIELDLOST_W<0> { + EVENTS_FIELDLOST_W::new(self) + } + #[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 = "Remote NFC field lost\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 [events_fieldlost](index.html) module"] +pub struct EVENTS_FIELDLOST_SPEC; +impl crate::RegisterSpec for EVENTS_FIELDLOST_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [events_fieldlost::R](R) reader structure"] +impl crate::Readable for EVENTS_FIELDLOST_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [events_fieldlost::W](W) writer structure"] +impl crate::Writable for EVENTS_FIELDLOST_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets EVENTS_FIELDLOST to value 0"] +impl crate::Resettable for EVENTS_FIELDLOST_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/nfct/events_ready.rs b/down-the-stack/dk_pac/src/nfct/events_ready.rs new file mode 100644 index 0000000..5ffd19b --- /dev/null +++ b/down-the-stack/dk_pac/src/nfct/events_ready.rs @@ -0,0 +1,127 @@ +#[doc = "Register `EVENTS_READY` 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 `EVENTS_READY` 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 `EVENTS_READY` reader - The NFC peripheral is ready to receive and send frames"] +pub type EVENTS_READY_R = crate::BitReader; +#[doc = "The NFC peripheral is ready to receive and send frames\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum EVENTS_READY_A { + #[doc = "0: Event not generated"] + NOT_GENERATED = 0, + #[doc = "1: Event generated"] + GENERATED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: EVENTS_READY_A) -> Self { + variant as u8 != 0 + } +} +impl EVENTS_READY_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> EVENTS_READY_A { + match self.bits { + false => EVENTS_READY_A::NOT_GENERATED, + true => EVENTS_READY_A::GENERATED, + } + } + #[doc = "Checks if the value of the field is `NOT_GENERATED`"] + #[inline(always)] + pub fn is_not_generated(&self) -> bool { + *self == EVENTS_READY_A::NOT_GENERATED + } + #[doc = "Checks if the value of the field is `GENERATED`"] + #[inline(always)] + pub fn is_generated(&self) -> bool { + *self == EVENTS_READY_A::GENERATED + } +} +#[doc = "Field `EVENTS_READY` writer - The NFC peripheral is ready to receive and send frames"] +pub type EVENTS_READY_W<'a, const O: u8> = + crate::BitWriter<'a, u32, EVENTS_READY_SPEC, EVENTS_READY_A, O>; +impl<'a, const O: u8> EVENTS_READY_W<'a, O> { + #[doc = "Event not generated"] + #[inline(always)] + pub fn not_generated(self) -> &'a mut W { + self.variant(EVENTS_READY_A::NOT_GENERATED) + } + #[doc = "Event generated"] + #[inline(always)] + pub fn generated(self) -> &'a mut W { + self.variant(EVENTS_READY_A::GENERATED) + } +} +impl R { + #[doc = "Bit 0 - The NFC peripheral is ready to receive and send frames"] + #[inline(always)] + pub fn events_ready(&self) -> EVENTS_READY_R { + EVENTS_READY_R::new((self.bits & 1) != 0) + } +} +impl W { + #[doc = "Bit 0 - The NFC peripheral is ready to receive and send frames"] + #[inline(always)] + #[must_use] + pub fn events_ready(&mut self) -> EVENTS_READY_W<0> { + EVENTS_READY_W::new(self) + } + #[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 = "The NFC peripheral is ready to receive and send frames\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 [events_ready](index.html) module"] +pub struct EVENTS_READY_SPEC; +impl crate::RegisterSpec for EVENTS_READY_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [events_ready::R](R) reader structure"] +impl crate::Readable for EVENTS_READY_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [events_ready::W](W) writer structure"] +impl crate::Writable for EVENTS_READY_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets EVENTS_READY to value 0"] +impl crate::Resettable for EVENTS_READY_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/nfct/events_rxerror.rs b/down-the-stack/dk_pac/src/nfct/events_rxerror.rs new file mode 100644 index 0000000..0f874a8 --- /dev/null +++ b/down-the-stack/dk_pac/src/nfct/events_rxerror.rs @@ -0,0 +1,127 @@ +#[doc = "Register `EVENTS_RXERROR` 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 `EVENTS_RXERROR` 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 `EVENTS_RXERROR` reader - NFC RX frame error reported. The FRAMESTATUS.RX register contains details on the source of the error."] +pub type EVENTS_RXERROR_R = crate::BitReader; +#[doc = "NFC RX frame error reported. The FRAMESTATUS.RX register contains details on the source of the error.\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum EVENTS_RXERROR_A { + #[doc = "0: Event not generated"] + NOT_GENERATED = 0, + #[doc = "1: Event generated"] + GENERATED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: EVENTS_RXERROR_A) -> Self { + variant as u8 != 0 + } +} +impl EVENTS_RXERROR_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> EVENTS_RXERROR_A { + match self.bits { + false => EVENTS_RXERROR_A::NOT_GENERATED, + true => EVENTS_RXERROR_A::GENERATED, + } + } + #[doc = "Checks if the value of the field is `NOT_GENERATED`"] + #[inline(always)] + pub fn is_not_generated(&self) -> bool { + *self == EVENTS_RXERROR_A::NOT_GENERATED + } + #[doc = "Checks if the value of the field is `GENERATED`"] + #[inline(always)] + pub fn is_generated(&self) -> bool { + *self == EVENTS_RXERROR_A::GENERATED + } +} +#[doc = "Field `EVENTS_RXERROR` writer - NFC RX frame error reported. The FRAMESTATUS.RX register contains details on the source of the error."] +pub type EVENTS_RXERROR_W<'a, const O: u8> = + crate::BitWriter<'a, u32, EVENTS_RXERROR_SPEC, EVENTS_RXERROR_A, O>; +impl<'a, const O: u8> EVENTS_RXERROR_W<'a, O> { + #[doc = "Event not generated"] + #[inline(always)] + pub fn not_generated(self) -> &'a mut W { + self.variant(EVENTS_RXERROR_A::NOT_GENERATED) + } + #[doc = "Event generated"] + #[inline(always)] + pub fn generated(self) -> &'a mut W { + self.variant(EVENTS_RXERROR_A::GENERATED) + } +} +impl R { + #[doc = "Bit 0 - NFC RX frame error reported. The FRAMESTATUS.RX register contains details on the source of the error."] + #[inline(always)] + pub fn events_rxerror(&self) -> EVENTS_RXERROR_R { + EVENTS_RXERROR_R::new((self.bits & 1) != 0) + } +} +impl W { + #[doc = "Bit 0 - NFC RX frame error reported. The FRAMESTATUS.RX register contains details on the source of the error."] + #[inline(always)] + #[must_use] + pub fn events_rxerror(&mut self) -> EVENTS_RXERROR_W<0> { + EVENTS_RXERROR_W::new(self) + } + #[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 = "NFC RX frame error reported. The FRAMESTATUS.RX register contains details on the source of the error.\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 [events_rxerror](index.html) module"] +pub struct EVENTS_RXERROR_SPEC; +impl crate::RegisterSpec for EVENTS_RXERROR_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [events_rxerror::R](R) reader structure"] +impl crate::Readable for EVENTS_RXERROR_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [events_rxerror::W](W) writer structure"] +impl crate::Writable for EVENTS_RXERROR_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets EVENTS_RXERROR to value 0"] +impl crate::Resettable for EVENTS_RXERROR_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/nfct/events_rxframeend.rs b/down-the-stack/dk_pac/src/nfct/events_rxframeend.rs new file mode 100644 index 0000000..57a8997 --- /dev/null +++ b/down-the-stack/dk_pac/src/nfct/events_rxframeend.rs @@ -0,0 +1,127 @@ +#[doc = "Register `EVENTS_RXFRAMEEND` 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 `EVENTS_RXFRAMEEND` 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 `EVENTS_RXFRAMEEND` reader - Received data have been checked (CRC, parity) and transferred to RAM, and EasyDMA has ended accessing the RX buffer"] +pub type EVENTS_RXFRAMEEND_R = crate::BitReader; +#[doc = "Received data have been checked (CRC, parity) and transferred to RAM, and EasyDMA has ended accessing the RX buffer\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum EVENTS_RXFRAMEEND_A { + #[doc = "0: Event not generated"] + NOT_GENERATED = 0, + #[doc = "1: Event generated"] + GENERATED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: EVENTS_RXFRAMEEND_A) -> Self { + variant as u8 != 0 + } +} +impl EVENTS_RXFRAMEEND_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> EVENTS_RXFRAMEEND_A { + match self.bits { + false => EVENTS_RXFRAMEEND_A::NOT_GENERATED, + true => EVENTS_RXFRAMEEND_A::GENERATED, + } + } + #[doc = "Checks if the value of the field is `NOT_GENERATED`"] + #[inline(always)] + pub fn is_not_generated(&self) -> bool { + *self == EVENTS_RXFRAMEEND_A::NOT_GENERATED + } + #[doc = "Checks if the value of the field is `GENERATED`"] + #[inline(always)] + pub fn is_generated(&self) -> bool { + *self == EVENTS_RXFRAMEEND_A::GENERATED + } +} +#[doc = "Field `EVENTS_RXFRAMEEND` writer - Received data have been checked (CRC, parity) and transferred to RAM, and EasyDMA has ended accessing the RX buffer"] +pub type EVENTS_RXFRAMEEND_W<'a, const O: u8> = + crate::BitWriter<'a, u32, EVENTS_RXFRAMEEND_SPEC, EVENTS_RXFRAMEEND_A, O>; +impl<'a, const O: u8> EVENTS_RXFRAMEEND_W<'a, O> { + #[doc = "Event not generated"] + #[inline(always)] + pub fn not_generated(self) -> &'a mut W { + self.variant(EVENTS_RXFRAMEEND_A::NOT_GENERATED) + } + #[doc = "Event generated"] + #[inline(always)] + pub fn generated(self) -> &'a mut W { + self.variant(EVENTS_RXFRAMEEND_A::GENERATED) + } +} +impl R { + #[doc = "Bit 0 - Received data have been checked (CRC, parity) and transferred to RAM, and EasyDMA has ended accessing the RX buffer"] + #[inline(always)] + pub fn events_rxframeend(&self) -> EVENTS_RXFRAMEEND_R { + EVENTS_RXFRAMEEND_R::new((self.bits & 1) != 0) + } +} +impl W { + #[doc = "Bit 0 - Received data have been checked (CRC, parity) and transferred to RAM, and EasyDMA has ended accessing the RX buffer"] + #[inline(always)] + #[must_use] + pub fn events_rxframeend(&mut self) -> EVENTS_RXFRAMEEND_W<0> { + EVENTS_RXFRAMEEND_W::new(self) + } + #[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 = "Received data have been checked (CRC, parity) and transferred to RAM, and EasyDMA has ended accessing the RX buffer\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 [events_rxframeend](index.html) module"] +pub struct EVENTS_RXFRAMEEND_SPEC; +impl crate::RegisterSpec for EVENTS_RXFRAMEEND_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [events_rxframeend::R](R) reader structure"] +impl crate::Readable for EVENTS_RXFRAMEEND_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [events_rxframeend::W](W) writer structure"] +impl crate::Writable for EVENTS_RXFRAMEEND_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets EVENTS_RXFRAMEEND to value 0"] +impl crate::Resettable for EVENTS_RXFRAMEEND_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/nfct/events_rxframestart.rs b/down-the-stack/dk_pac/src/nfct/events_rxframestart.rs new file mode 100644 index 0000000..c74333b --- /dev/null +++ b/down-the-stack/dk_pac/src/nfct/events_rxframestart.rs @@ -0,0 +1,127 @@ +#[doc = "Register `EVENTS_RXFRAMESTART` 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 `EVENTS_RXFRAMESTART` 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 `EVENTS_RXFRAMESTART` reader - Marks the end of the first symbol of a received frame"] +pub type EVENTS_RXFRAMESTART_R = crate::BitReader; +#[doc = "Marks the end of the first symbol of a received frame\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum EVENTS_RXFRAMESTART_A { + #[doc = "0: Event not generated"] + NOT_GENERATED = 0, + #[doc = "1: Event generated"] + GENERATED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: EVENTS_RXFRAMESTART_A) -> Self { + variant as u8 != 0 + } +} +impl EVENTS_RXFRAMESTART_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> EVENTS_RXFRAMESTART_A { + match self.bits { + false => EVENTS_RXFRAMESTART_A::NOT_GENERATED, + true => EVENTS_RXFRAMESTART_A::GENERATED, + } + } + #[doc = "Checks if the value of the field is `NOT_GENERATED`"] + #[inline(always)] + pub fn is_not_generated(&self) -> bool { + *self == EVENTS_RXFRAMESTART_A::NOT_GENERATED + } + #[doc = "Checks if the value of the field is `GENERATED`"] + #[inline(always)] + pub fn is_generated(&self) -> bool { + *self == EVENTS_RXFRAMESTART_A::GENERATED + } +} +#[doc = "Field `EVENTS_RXFRAMESTART` writer - Marks the end of the first symbol of a received frame"] +pub type EVENTS_RXFRAMESTART_W<'a, const O: u8> = + crate::BitWriter<'a, u32, EVENTS_RXFRAMESTART_SPEC, EVENTS_RXFRAMESTART_A, O>; +impl<'a, const O: u8> EVENTS_RXFRAMESTART_W<'a, O> { + #[doc = "Event not generated"] + #[inline(always)] + pub fn not_generated(self) -> &'a mut W { + self.variant(EVENTS_RXFRAMESTART_A::NOT_GENERATED) + } + #[doc = "Event generated"] + #[inline(always)] + pub fn generated(self) -> &'a mut W { + self.variant(EVENTS_RXFRAMESTART_A::GENERATED) + } +} +impl R { + #[doc = "Bit 0 - Marks the end of the first symbol of a received frame"] + #[inline(always)] + pub fn events_rxframestart(&self) -> EVENTS_RXFRAMESTART_R { + EVENTS_RXFRAMESTART_R::new((self.bits & 1) != 0) + } +} +impl W { + #[doc = "Bit 0 - Marks the end of the first symbol of a received frame"] + #[inline(always)] + #[must_use] + pub fn events_rxframestart(&mut self) -> EVENTS_RXFRAMESTART_W<0> { + EVENTS_RXFRAMESTART_W::new(self) + } + #[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 = "Marks the end of the first symbol of a received frame\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 [events_rxframestart](index.html) module"] +pub struct EVENTS_RXFRAMESTART_SPEC; +impl crate::RegisterSpec for EVENTS_RXFRAMESTART_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [events_rxframestart::R](R) reader structure"] +impl crate::Readable for EVENTS_RXFRAMESTART_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [events_rxframestart::W](W) writer structure"] +impl crate::Writable for EVENTS_RXFRAMESTART_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets EVENTS_RXFRAMESTART to value 0"] +impl crate::Resettable for EVENTS_RXFRAMESTART_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/nfct/events_selected.rs b/down-the-stack/dk_pac/src/nfct/events_selected.rs new file mode 100644 index 0000000..1c709d3 --- /dev/null +++ b/down-the-stack/dk_pac/src/nfct/events_selected.rs @@ -0,0 +1,127 @@ +#[doc = "Register `EVENTS_SELECTED` 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 `EVENTS_SELECTED` 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 `EVENTS_SELECTED` reader - NFC Auto collision resolution successfully completed"] +pub type EVENTS_SELECTED_R = crate::BitReader; +#[doc = "NFC Auto collision resolution successfully completed\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum EVENTS_SELECTED_A { + #[doc = "0: Event not generated"] + NOT_GENERATED = 0, + #[doc = "1: Event generated"] + GENERATED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: EVENTS_SELECTED_A) -> Self { + variant as u8 != 0 + } +} +impl EVENTS_SELECTED_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> EVENTS_SELECTED_A { + match self.bits { + false => EVENTS_SELECTED_A::NOT_GENERATED, + true => EVENTS_SELECTED_A::GENERATED, + } + } + #[doc = "Checks if the value of the field is `NOT_GENERATED`"] + #[inline(always)] + pub fn is_not_generated(&self) -> bool { + *self == EVENTS_SELECTED_A::NOT_GENERATED + } + #[doc = "Checks if the value of the field is `GENERATED`"] + #[inline(always)] + pub fn is_generated(&self) -> bool { + *self == EVENTS_SELECTED_A::GENERATED + } +} +#[doc = "Field `EVENTS_SELECTED` writer - NFC Auto collision resolution successfully completed"] +pub type EVENTS_SELECTED_W<'a, const O: u8> = + crate::BitWriter<'a, u32, EVENTS_SELECTED_SPEC, EVENTS_SELECTED_A, O>; +impl<'a, const O: u8> EVENTS_SELECTED_W<'a, O> { + #[doc = "Event not generated"] + #[inline(always)] + pub fn not_generated(self) -> &'a mut W { + self.variant(EVENTS_SELECTED_A::NOT_GENERATED) + } + #[doc = "Event generated"] + #[inline(always)] + pub fn generated(self) -> &'a mut W { + self.variant(EVENTS_SELECTED_A::GENERATED) + } +} +impl R { + #[doc = "Bit 0 - NFC Auto collision resolution successfully completed"] + #[inline(always)] + pub fn events_selected(&self) -> EVENTS_SELECTED_R { + EVENTS_SELECTED_R::new((self.bits & 1) != 0) + } +} +impl W { + #[doc = "Bit 0 - NFC Auto collision resolution successfully completed"] + #[inline(always)] + #[must_use] + pub fn events_selected(&mut self) -> EVENTS_SELECTED_W<0> { + EVENTS_SELECTED_W::new(self) + } + #[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 = "NFC Auto collision resolution successfully completed\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 [events_selected](index.html) module"] +pub struct EVENTS_SELECTED_SPEC; +impl crate::RegisterSpec for EVENTS_SELECTED_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [events_selected::R](R) reader structure"] +impl crate::Readable for EVENTS_SELECTED_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [events_selected::W](W) writer structure"] +impl crate::Writable for EVENTS_SELECTED_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets EVENTS_SELECTED to value 0"] +impl crate::Resettable for EVENTS_SELECTED_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/nfct/events_started.rs b/down-the-stack/dk_pac/src/nfct/events_started.rs new file mode 100644 index 0000000..4114e7c --- /dev/null +++ b/down-the-stack/dk_pac/src/nfct/events_started.rs @@ -0,0 +1,127 @@ +#[doc = "Register `EVENTS_STARTED` 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 `EVENTS_STARTED` 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 `EVENTS_STARTED` reader - EasyDMA is ready to receive or send frames."] +pub type EVENTS_STARTED_R = crate::BitReader; +#[doc = "EasyDMA is ready to receive or send frames.\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum EVENTS_STARTED_A { + #[doc = "0: Event not generated"] + NOT_GENERATED = 0, + #[doc = "1: Event generated"] + GENERATED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: EVENTS_STARTED_A) -> Self { + variant as u8 != 0 + } +} +impl EVENTS_STARTED_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> EVENTS_STARTED_A { + match self.bits { + false => EVENTS_STARTED_A::NOT_GENERATED, + true => EVENTS_STARTED_A::GENERATED, + } + } + #[doc = "Checks if the value of the field is `NOT_GENERATED`"] + #[inline(always)] + pub fn is_not_generated(&self) -> bool { + *self == EVENTS_STARTED_A::NOT_GENERATED + } + #[doc = "Checks if the value of the field is `GENERATED`"] + #[inline(always)] + pub fn is_generated(&self) -> bool { + *self == EVENTS_STARTED_A::GENERATED + } +} +#[doc = "Field `EVENTS_STARTED` writer - EasyDMA is ready to receive or send frames."] +pub type EVENTS_STARTED_W<'a, const O: u8> = + crate::BitWriter<'a, u32, EVENTS_STARTED_SPEC, EVENTS_STARTED_A, O>; +impl<'a, const O: u8> EVENTS_STARTED_W<'a, O> { + #[doc = "Event not generated"] + #[inline(always)] + pub fn not_generated(self) -> &'a mut W { + self.variant(EVENTS_STARTED_A::NOT_GENERATED) + } + #[doc = "Event generated"] + #[inline(always)] + pub fn generated(self) -> &'a mut W { + self.variant(EVENTS_STARTED_A::GENERATED) + } +} +impl R { + #[doc = "Bit 0 - EasyDMA is ready to receive or send frames."] + #[inline(always)] + pub fn events_started(&self) -> EVENTS_STARTED_R { + EVENTS_STARTED_R::new((self.bits & 1) != 0) + } +} +impl W { + #[doc = "Bit 0 - EasyDMA is ready to receive or send frames."] + #[inline(always)] + #[must_use] + pub fn events_started(&mut self) -> EVENTS_STARTED_W<0> { + EVENTS_STARTED_W::new(self) + } + #[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 = "EasyDMA is ready to receive or send frames.\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 [events_started](index.html) module"] +pub struct EVENTS_STARTED_SPEC; +impl crate::RegisterSpec for EVENTS_STARTED_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [events_started::R](R) reader structure"] +impl crate::Readable for EVENTS_STARTED_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [events_started::W](W) writer structure"] +impl crate::Writable for EVENTS_STARTED_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets EVENTS_STARTED to value 0"] +impl crate::Resettable for EVENTS_STARTED_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/nfct/events_txframeend.rs b/down-the-stack/dk_pac/src/nfct/events_txframeend.rs new file mode 100644 index 0000000..95236f2 --- /dev/null +++ b/down-the-stack/dk_pac/src/nfct/events_txframeend.rs @@ -0,0 +1,127 @@ +#[doc = "Register `EVENTS_TXFRAMEEND` 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 `EVENTS_TXFRAMEEND` 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 `EVENTS_TXFRAMEEND` reader - Marks the end of the last transmitted on-air symbol of a frame"] +pub type EVENTS_TXFRAMEEND_R = crate::BitReader; +#[doc = "Marks the end of the last transmitted on-air symbol of a frame\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum EVENTS_TXFRAMEEND_A { + #[doc = "0: Event not generated"] + NOT_GENERATED = 0, + #[doc = "1: Event generated"] + GENERATED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: EVENTS_TXFRAMEEND_A) -> Self { + variant as u8 != 0 + } +} +impl EVENTS_TXFRAMEEND_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> EVENTS_TXFRAMEEND_A { + match self.bits { + false => EVENTS_TXFRAMEEND_A::NOT_GENERATED, + true => EVENTS_TXFRAMEEND_A::GENERATED, + } + } + #[doc = "Checks if the value of the field is `NOT_GENERATED`"] + #[inline(always)] + pub fn is_not_generated(&self) -> bool { + *self == EVENTS_TXFRAMEEND_A::NOT_GENERATED + } + #[doc = "Checks if the value of the field is `GENERATED`"] + #[inline(always)] + pub fn is_generated(&self) -> bool { + *self == EVENTS_TXFRAMEEND_A::GENERATED + } +} +#[doc = "Field `EVENTS_TXFRAMEEND` writer - Marks the end of the last transmitted on-air symbol of a frame"] +pub type EVENTS_TXFRAMEEND_W<'a, const O: u8> = + crate::BitWriter<'a, u32, EVENTS_TXFRAMEEND_SPEC, EVENTS_TXFRAMEEND_A, O>; +impl<'a, const O: u8> EVENTS_TXFRAMEEND_W<'a, O> { + #[doc = "Event not generated"] + #[inline(always)] + pub fn not_generated(self) -> &'a mut W { + self.variant(EVENTS_TXFRAMEEND_A::NOT_GENERATED) + } + #[doc = "Event generated"] + #[inline(always)] + pub fn generated(self) -> &'a mut W { + self.variant(EVENTS_TXFRAMEEND_A::GENERATED) + } +} +impl R { + #[doc = "Bit 0 - Marks the end of the last transmitted on-air symbol of a frame"] + #[inline(always)] + pub fn events_txframeend(&self) -> EVENTS_TXFRAMEEND_R { + EVENTS_TXFRAMEEND_R::new((self.bits & 1) != 0) + } +} +impl W { + #[doc = "Bit 0 - Marks the end of the last transmitted on-air symbol of a frame"] + #[inline(always)] + #[must_use] + pub fn events_txframeend(&mut self) -> EVENTS_TXFRAMEEND_W<0> { + EVENTS_TXFRAMEEND_W::new(self) + } + #[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 = "Marks the end of the last transmitted on-air symbol of a frame\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 [events_txframeend](index.html) module"] +pub struct EVENTS_TXFRAMEEND_SPEC; +impl crate::RegisterSpec for EVENTS_TXFRAMEEND_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [events_txframeend::R](R) reader structure"] +impl crate::Readable for EVENTS_TXFRAMEEND_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [events_txframeend::W](W) writer structure"] +impl crate::Writable for EVENTS_TXFRAMEEND_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets EVENTS_TXFRAMEEND to value 0"] +impl crate::Resettable for EVENTS_TXFRAMEEND_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/nfct/events_txframestart.rs b/down-the-stack/dk_pac/src/nfct/events_txframestart.rs new file mode 100644 index 0000000..ee9d666 --- /dev/null +++ b/down-the-stack/dk_pac/src/nfct/events_txframestart.rs @@ -0,0 +1,127 @@ +#[doc = "Register `EVENTS_TXFRAMESTART` 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 `EVENTS_TXFRAMESTART` 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 `EVENTS_TXFRAMESTART` reader - Marks the start of the first symbol of a transmitted frame"] +pub type EVENTS_TXFRAMESTART_R = crate::BitReader; +#[doc = "Marks the start of the first symbol of a transmitted frame\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum EVENTS_TXFRAMESTART_A { + #[doc = "0: Event not generated"] + NOT_GENERATED = 0, + #[doc = "1: Event generated"] + GENERATED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: EVENTS_TXFRAMESTART_A) -> Self { + variant as u8 != 0 + } +} +impl EVENTS_TXFRAMESTART_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> EVENTS_TXFRAMESTART_A { + match self.bits { + false => EVENTS_TXFRAMESTART_A::NOT_GENERATED, + true => EVENTS_TXFRAMESTART_A::GENERATED, + } + } + #[doc = "Checks if the value of the field is `NOT_GENERATED`"] + #[inline(always)] + pub fn is_not_generated(&self) -> bool { + *self == EVENTS_TXFRAMESTART_A::NOT_GENERATED + } + #[doc = "Checks if the value of the field is `GENERATED`"] + #[inline(always)] + pub fn is_generated(&self) -> bool { + *self == EVENTS_TXFRAMESTART_A::GENERATED + } +} +#[doc = "Field `EVENTS_TXFRAMESTART` writer - Marks the start of the first symbol of a transmitted frame"] +pub type EVENTS_TXFRAMESTART_W<'a, const O: u8> = + crate::BitWriter<'a, u32, EVENTS_TXFRAMESTART_SPEC, EVENTS_TXFRAMESTART_A, O>; +impl<'a, const O: u8> EVENTS_TXFRAMESTART_W<'a, O> { + #[doc = "Event not generated"] + #[inline(always)] + pub fn not_generated(self) -> &'a mut W { + self.variant(EVENTS_TXFRAMESTART_A::NOT_GENERATED) + } + #[doc = "Event generated"] + #[inline(always)] + pub fn generated(self) -> &'a mut W { + self.variant(EVENTS_TXFRAMESTART_A::GENERATED) + } +} +impl R { + #[doc = "Bit 0 - Marks the start of the first symbol of a transmitted frame"] + #[inline(always)] + pub fn events_txframestart(&self) -> EVENTS_TXFRAMESTART_R { + EVENTS_TXFRAMESTART_R::new((self.bits & 1) != 0) + } +} +impl W { + #[doc = "Bit 0 - Marks the start of the first symbol of a transmitted frame"] + #[inline(always)] + #[must_use] + pub fn events_txframestart(&mut self) -> EVENTS_TXFRAMESTART_W<0> { + EVENTS_TXFRAMESTART_W::new(self) + } + #[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 = "Marks the start of the first symbol of a transmitted frame\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 [events_txframestart](index.html) module"] +pub struct EVENTS_TXFRAMESTART_SPEC; +impl crate::RegisterSpec for EVENTS_TXFRAMESTART_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [events_txframestart::R](R) reader structure"] +impl crate::Readable for EVENTS_TXFRAMESTART_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [events_txframestart::W](W) writer structure"] +impl crate::Writable for EVENTS_TXFRAMESTART_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets EVENTS_TXFRAMESTART to value 0"] +impl crate::Resettable for EVENTS_TXFRAMESTART_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/nfct/fieldpresent.rs b/down-the-stack/dk_pac/src/nfct/fieldpresent.rs new file mode 100644 index 0000000..299be9e --- /dev/null +++ b/down-the-stack/dk_pac/src/nfct/fieldpresent.rs @@ -0,0 +1,112 @@ +#[doc = "Register `FIELDPRESENT` 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 = "Field `FIELDPRESENT` reader - Indicates the presence or not of a valid field. Available only in the activated state."] +pub type FIELDPRESENT_R = crate::BitReader; +#[doc = "Indicates the presence or not of a valid field. Available only in the activated state.\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum FIELDPRESENT_A { + #[doc = "0: No valid field detected"] + NO_FIELD = 0, + #[doc = "1: Valid field detected"] + FIELD_PRESENT = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: FIELDPRESENT_A) -> Self { + variant as u8 != 0 + } +} +impl FIELDPRESENT_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> FIELDPRESENT_A { + match self.bits { + false => FIELDPRESENT_A::NO_FIELD, + true => FIELDPRESENT_A::FIELD_PRESENT, + } + } + #[doc = "Checks if the value of the field is `NO_FIELD`"] + #[inline(always)] + pub fn is_no_field(&self) -> bool { + *self == FIELDPRESENT_A::NO_FIELD + } + #[doc = "Checks if the value of the field is `FIELD_PRESENT`"] + #[inline(always)] + pub fn is_field_present(&self) -> bool { + *self == FIELDPRESENT_A::FIELD_PRESENT + } +} +#[doc = "Field `LOCKDETECT` reader - Indicates if the low level has locked to the field"] +pub type LOCKDETECT_R = crate::BitReader; +#[doc = "Indicates if the low level has locked to the field\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum LOCKDETECT_A { + #[doc = "0: Not locked to field"] + NOT_LOCKED = 0, + #[doc = "1: Locked to field"] + LOCKED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: LOCKDETECT_A) -> Self { + variant as u8 != 0 + } +} +impl LOCKDETECT_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> LOCKDETECT_A { + match self.bits { + false => LOCKDETECT_A::NOT_LOCKED, + true => LOCKDETECT_A::LOCKED, + } + } + #[doc = "Checks if the value of the field is `NOT_LOCKED`"] + #[inline(always)] + pub fn is_not_locked(&self) -> bool { + *self == LOCKDETECT_A::NOT_LOCKED + } + #[doc = "Checks if the value of the field is `LOCKED`"] + #[inline(always)] + pub fn is_locked(&self) -> bool { + *self == LOCKDETECT_A::LOCKED + } +} +impl R { + #[doc = "Bit 0 - Indicates the presence or not of a valid field. Available only in the activated state."] + #[inline(always)] + pub fn fieldpresent(&self) -> FIELDPRESENT_R { + FIELDPRESENT_R::new((self.bits & 1) != 0) + } + #[doc = "Bit 1 - Indicates if the low level has locked to the field"] + #[inline(always)] + pub fn lockdetect(&self) -> LOCKDETECT_R { + LOCKDETECT_R::new(((self.bits >> 1) & 1) != 0) + } +} +#[doc = "Indicates the presence or not of a valid field\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 [fieldpresent](index.html) module"] +pub struct FIELDPRESENT_SPEC; +impl crate::RegisterSpec for FIELDPRESENT_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [fieldpresent::R](R) reader structure"] +impl crate::Readable for FIELDPRESENT_SPEC { + type Reader = R; +} +#[doc = "`reset()` method sets FIELDPRESENT to value 0"] +impl crate::Resettable for FIELDPRESENT_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/nfct/framedelaymax.rs b/down-the-stack/dk_pac/src/nfct/framedelaymax.rs new file mode 100644 index 0000000..287ae64 --- /dev/null +++ b/down-the-stack/dk_pac/src/nfct/framedelaymax.rs @@ -0,0 +1,81 @@ +#[doc = "Register `FRAMEDELAYMAX` 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 `FRAMEDELAYMAX` 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 `FRAMEDELAYMAX` reader - Maximum frame delay in number of 13.56 MHz clocks"] +pub type FRAMEDELAYMAX_R = crate::FieldReader; +#[doc = "Field `FRAMEDELAYMAX` writer - Maximum frame delay in number of 13.56 MHz clocks"] +pub type FRAMEDELAYMAX_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, FRAMEDELAYMAX_SPEC, u16, u16, 16, O>; +impl R { + #[doc = "Bits 0:15 - Maximum frame delay in number of 13.56 MHz clocks"] + #[inline(always)] + pub fn framedelaymax(&self) -> FRAMEDELAYMAX_R { + FRAMEDELAYMAX_R::new((self.bits & 0xffff) as u16) + } +} +impl W { + #[doc = "Bits 0:15 - Maximum frame delay in number of 13.56 MHz clocks"] + #[inline(always)] + #[must_use] + pub fn framedelaymax(&mut self) -> FRAMEDELAYMAX_W<0> { + FRAMEDELAYMAX_W::new(self) + } + #[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 = "Maximum frame delay\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 [framedelaymax](index.html) module"] +pub struct FRAMEDELAYMAX_SPEC; +impl crate::RegisterSpec for FRAMEDELAYMAX_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [framedelaymax::R](R) reader structure"] +impl crate::Readable for FRAMEDELAYMAX_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [framedelaymax::W](W) writer structure"] +impl crate::Writable for FRAMEDELAYMAX_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets FRAMEDELAYMAX to value 0x1000"] +impl crate::Resettable for FRAMEDELAYMAX_SPEC { + const RESET_VALUE: Self::Ux = 0x1000; +} diff --git a/down-the-stack/dk_pac/src/nfct/framedelaymin.rs b/down-the-stack/dk_pac/src/nfct/framedelaymin.rs new file mode 100644 index 0000000..089bc0f --- /dev/null +++ b/down-the-stack/dk_pac/src/nfct/framedelaymin.rs @@ -0,0 +1,81 @@ +#[doc = "Register `FRAMEDELAYMIN` 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 `FRAMEDELAYMIN` 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 `FRAMEDELAYMIN` reader - Minimum frame delay in number of 13.56 MHz clocks"] +pub type FRAMEDELAYMIN_R = crate::FieldReader; +#[doc = "Field `FRAMEDELAYMIN` writer - Minimum frame delay in number of 13.56 MHz clocks"] +pub type FRAMEDELAYMIN_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, FRAMEDELAYMIN_SPEC, u16, u16, 16, O>; +impl R { + #[doc = "Bits 0:15 - Minimum frame delay in number of 13.56 MHz clocks"] + #[inline(always)] + pub fn framedelaymin(&self) -> FRAMEDELAYMIN_R { + FRAMEDELAYMIN_R::new((self.bits & 0xffff) as u16) + } +} +impl W { + #[doc = "Bits 0:15 - Minimum frame delay in number of 13.56 MHz clocks"] + #[inline(always)] + #[must_use] + pub fn framedelaymin(&mut self) -> FRAMEDELAYMIN_W<0> { + FRAMEDELAYMIN_W::new(self) + } + #[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 = "Minimum frame delay\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 [framedelaymin](index.html) module"] +pub struct FRAMEDELAYMIN_SPEC; +impl crate::RegisterSpec for FRAMEDELAYMIN_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [framedelaymin::R](R) reader structure"] +impl crate::Readable for FRAMEDELAYMIN_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [framedelaymin::W](W) writer structure"] +impl crate::Writable for FRAMEDELAYMIN_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets FRAMEDELAYMIN to value 0x0480"] +impl crate::Resettable for FRAMEDELAYMIN_SPEC { + const RESET_VALUE: Self::Ux = 0x0480; +} diff --git a/down-the-stack/dk_pac/src/nfct/framedelaymode.rs b/down-the-stack/dk_pac/src/nfct/framedelaymode.rs new file mode 100644 index 0000000..802ab02 --- /dev/null +++ b/down-the-stack/dk_pac/src/nfct/framedelaymode.rs @@ -0,0 +1,155 @@ +#[doc = "Register `FRAMEDELAYMODE` 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 `FRAMEDELAYMODE` 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 `FRAMEDELAYMODE` reader - Configuration register for the Frame Delay Timer"] +pub type FRAMEDELAYMODE_R = crate::FieldReader; +#[doc = "Configuration register for the Frame Delay Timer\n\nValue on reset: 1"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +#[repr(u8)] +pub enum FRAMEDELAYMODE_A { + #[doc = "0: Transmission is independent of frame timer and will start when the STARTTX task is triggered. No timeout."] + FREE_RUN = 0, + #[doc = "1: Frame is transmitted between FRAMEDELAYMIN and FRAMEDELAYMAX"] + WINDOW = 1, + #[doc = "2: Frame is transmitted exactly at FRAMEDELAYMAX"] + EXACT_VAL = 2, + #[doc = "3: Frame is transmitted on a bit grid between FRAMEDELAYMIN and FRAMEDELAYMAX"] + WINDOW_GRID = 3, +} +impl From for u8 { + #[inline(always)] + fn from(variant: FRAMEDELAYMODE_A) -> Self { + variant as _ + } +} +impl FRAMEDELAYMODE_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> FRAMEDELAYMODE_A { + match self.bits { + 0 => FRAMEDELAYMODE_A::FREE_RUN, + 1 => FRAMEDELAYMODE_A::WINDOW, + 2 => FRAMEDELAYMODE_A::EXACT_VAL, + 3 => FRAMEDELAYMODE_A::WINDOW_GRID, + _ => unreachable!(), + } + } + #[doc = "Checks if the value of the field is `FREE_RUN`"] + #[inline(always)] + pub fn is_free_run(&self) -> bool { + *self == FRAMEDELAYMODE_A::FREE_RUN + } + #[doc = "Checks if the value of the field is `WINDOW`"] + #[inline(always)] + pub fn is_window(&self) -> bool { + *self == FRAMEDELAYMODE_A::WINDOW + } + #[doc = "Checks if the value of the field is `EXACT_VAL`"] + #[inline(always)] + pub fn is_exact_val(&self) -> bool { + *self == FRAMEDELAYMODE_A::EXACT_VAL + } + #[doc = "Checks if the value of the field is `WINDOW_GRID`"] + #[inline(always)] + pub fn is_window_grid(&self) -> bool { + *self == FRAMEDELAYMODE_A::WINDOW_GRID + } +} +#[doc = "Field `FRAMEDELAYMODE` writer - Configuration register for the Frame Delay Timer"] +pub type FRAMEDELAYMODE_W<'a, const O: u8> = + crate::FieldWriterSafe<'a, u32, FRAMEDELAYMODE_SPEC, u8, FRAMEDELAYMODE_A, 2, O>; +impl<'a, const O: u8> FRAMEDELAYMODE_W<'a, O> { + #[doc = "Transmission is independent of frame timer and will start when the STARTTX task is triggered. No timeout."] + #[inline(always)] + pub fn free_run(self) -> &'a mut W { + self.variant(FRAMEDELAYMODE_A::FREE_RUN) + } + #[doc = "Frame is transmitted between FRAMEDELAYMIN and FRAMEDELAYMAX"] + #[inline(always)] + pub fn window(self) -> &'a mut W { + self.variant(FRAMEDELAYMODE_A::WINDOW) + } + #[doc = "Frame is transmitted exactly at FRAMEDELAYMAX"] + #[inline(always)] + pub fn exact_val(self) -> &'a mut W { + self.variant(FRAMEDELAYMODE_A::EXACT_VAL) + } + #[doc = "Frame is transmitted on a bit grid between FRAMEDELAYMIN and FRAMEDELAYMAX"] + #[inline(always)] + pub fn window_grid(self) -> &'a mut W { + self.variant(FRAMEDELAYMODE_A::WINDOW_GRID) + } +} +impl R { + #[doc = "Bits 0:1 - Configuration register for the Frame Delay Timer"] + #[inline(always)] + pub fn framedelaymode(&self) -> FRAMEDELAYMODE_R { + FRAMEDELAYMODE_R::new((self.bits & 3) as u8) + } +} +impl W { + #[doc = "Bits 0:1 - Configuration register for the Frame Delay Timer"] + #[inline(always)] + #[must_use] + pub fn framedelaymode(&mut self) -> FRAMEDELAYMODE_W<0> { + FRAMEDELAYMODE_W::new(self) + } + #[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 = "Configuration register for the Frame Delay Timer\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 [framedelaymode](index.html) module"] +pub struct FRAMEDELAYMODE_SPEC; +impl crate::RegisterSpec for FRAMEDELAYMODE_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [framedelaymode::R](R) reader structure"] +impl crate::Readable for FRAMEDELAYMODE_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [framedelaymode::W](W) writer structure"] +impl crate::Writable for FRAMEDELAYMODE_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets FRAMEDELAYMODE to value 0x01"] +impl crate::Resettable for FRAMEDELAYMODE_SPEC { + const RESET_VALUE: Self::Ux = 0x01; +} diff --git a/down-the-stack/dk_pac/src/nfct/framestatus.rs b/down-the-stack/dk_pac/src/nfct/framestatus.rs new file mode 100644 index 0000000..f7ef317 --- /dev/null +++ b/down-the-stack/dk_pac/src/nfct/framestatus.rs @@ -0,0 +1,10 @@ +#[doc = r"Register block"] +#[repr(C)] +pub struct FRAMESTATUS { + #[doc = "0x00 - Result of last incoming frames"] + pub rx: RX, +} +#[doc = "RX (rw) register accessor: an alias for `Reg`"] +pub type RX = crate::Reg; +#[doc = "Result of last incoming frames"] +pub mod rx; diff --git a/down-the-stack/dk_pac/src/nfct/framestatus/rx.rs b/down-the-stack/dk_pac/src/nfct/framestatus/rx.rs new file mode 100644 index 0000000..ad66408 --- /dev/null +++ b/down-the-stack/dk_pac/src/nfct/framestatus/rx.rs @@ -0,0 +1,248 @@ +#[doc = "Register `RX` 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 `RX` 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 `CRCERROR` reader - No valid End of Frame detected"] +pub type CRCERROR_R = crate::BitReader; +#[doc = "No valid End of Frame detected\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum CRCERROR_A { + #[doc = "0: Valid CRC detected"] + CRCCORRECT = 0, + #[doc = "1: CRC received does not match local check"] + CRCERROR = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: CRCERROR_A) -> Self { + variant as u8 != 0 + } +} +impl CRCERROR_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> CRCERROR_A { + match self.bits { + false => CRCERROR_A::CRCCORRECT, + true => CRCERROR_A::CRCERROR, + } + } + #[doc = "Checks if the value of the field is `CRCCORRECT`"] + #[inline(always)] + pub fn is_crccorrect(&self) -> bool { + *self == CRCERROR_A::CRCCORRECT + } + #[doc = "Checks if the value of the field is `CRCERROR`"] + #[inline(always)] + pub fn is_crcerror(&self) -> bool { + *self == CRCERROR_A::CRCERROR + } +} +#[doc = "Field `CRCERROR` writer - No valid End of Frame detected"] +pub type CRCERROR_W<'a, const O: u8> = crate::BitWriter1C<'a, u32, RX_SPEC, CRCERROR_A, O>; +impl<'a, const O: u8> CRCERROR_W<'a, O> { + #[doc = "Valid CRC detected"] + #[inline(always)] + pub fn crccorrect(self) -> &'a mut W { + self.variant(CRCERROR_A::CRCCORRECT) + } + #[doc = "CRC received does not match local check"] + #[inline(always)] + pub fn crcerror(self) -> &'a mut W { + self.variant(CRCERROR_A::CRCERROR) + } +} +#[doc = "Field `PARITYSTATUS` reader - Parity status of received frame"] +pub type PARITYSTATUS_R = crate::BitReader; +#[doc = "Parity status of received frame\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PARITYSTATUS_A { + #[doc = "0: Frame received with parity OK"] + PARITY_OK = 0, + #[doc = "1: Frame received with parity error"] + PARITY_ERROR = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PARITYSTATUS_A) -> Self { + variant as u8 != 0 + } +} +impl PARITYSTATUS_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> PARITYSTATUS_A { + match self.bits { + false => PARITYSTATUS_A::PARITY_OK, + true => PARITYSTATUS_A::PARITY_ERROR, + } + } + #[doc = "Checks if the value of the field is `PARITY_OK`"] + #[inline(always)] + pub fn is_parity_ok(&self) -> bool { + *self == PARITYSTATUS_A::PARITY_OK + } + #[doc = "Checks if the value of the field is `PARITY_ERROR`"] + #[inline(always)] + pub fn is_parity_error(&self) -> bool { + *self == PARITYSTATUS_A::PARITY_ERROR + } +} +#[doc = "Field `PARITYSTATUS` writer - Parity status of received frame"] +pub type PARITYSTATUS_W<'a, const O: u8> = crate::BitWriter1C<'a, u32, RX_SPEC, PARITYSTATUS_A, O>; +impl<'a, const O: u8> PARITYSTATUS_W<'a, O> { + #[doc = "Frame received with parity OK"] + #[inline(always)] + pub fn parity_ok(self) -> &'a mut W { + self.variant(PARITYSTATUS_A::PARITY_OK) + } + #[doc = "Frame received with parity error"] + #[inline(always)] + pub fn parity_error(self) -> &'a mut W { + self.variant(PARITYSTATUS_A::PARITY_ERROR) + } +} +#[doc = "Field `OVERRUN` reader - Overrun detected"] +pub type OVERRUN_R = crate::BitReader; +#[doc = "Overrun detected\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum OVERRUN_A { + #[doc = "0: No overrun detected"] + NO_OVERRUN = 0, + #[doc = "1: Overrun error"] + OVERRUN = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: OVERRUN_A) -> Self { + variant as u8 != 0 + } +} +impl OVERRUN_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> OVERRUN_A { + match self.bits { + false => OVERRUN_A::NO_OVERRUN, + true => OVERRUN_A::OVERRUN, + } + } + #[doc = "Checks if the value of the field is `NO_OVERRUN`"] + #[inline(always)] + pub fn is_no_overrun(&self) -> bool { + *self == OVERRUN_A::NO_OVERRUN + } + #[doc = "Checks if the value of the field is `OVERRUN`"] + #[inline(always)] + pub fn is_overrun(&self) -> bool { + *self == OVERRUN_A::OVERRUN + } +} +#[doc = "Field `OVERRUN` writer - Overrun detected"] +pub type OVERRUN_W<'a, const O: u8> = crate::BitWriter1C<'a, u32, RX_SPEC, OVERRUN_A, O>; +impl<'a, const O: u8> OVERRUN_W<'a, O> { + #[doc = "No overrun detected"] + #[inline(always)] + pub fn no_overrun(self) -> &'a mut W { + self.variant(OVERRUN_A::NO_OVERRUN) + } + #[doc = "Overrun error"] + #[inline(always)] + pub fn overrun(self) -> &'a mut W { + self.variant(OVERRUN_A::OVERRUN) + } +} +impl R { + #[doc = "Bit 0 - No valid End of Frame detected"] + #[inline(always)] + pub fn crcerror(&self) -> CRCERROR_R { + CRCERROR_R::new((self.bits & 1) != 0) + } + #[doc = "Bit 2 - Parity status of received frame"] + #[inline(always)] + pub fn paritystatus(&self) -> PARITYSTATUS_R { + PARITYSTATUS_R::new(((self.bits >> 2) & 1) != 0) + } + #[doc = "Bit 3 - Overrun detected"] + #[inline(always)] + pub fn overrun(&self) -> OVERRUN_R { + OVERRUN_R::new(((self.bits >> 3) & 1) != 0) + } +} +impl W { + #[doc = "Bit 0 - No valid End of Frame detected"] + #[inline(always)] + #[must_use] + pub fn crcerror(&mut self) -> CRCERROR_W<0> { + CRCERROR_W::new(self) + } + #[doc = "Bit 2 - Parity status of received frame"] + #[inline(always)] + #[must_use] + pub fn paritystatus(&mut self) -> PARITYSTATUS_W<2> { + PARITYSTATUS_W::new(self) + } + #[doc = "Bit 3 - Overrun detected"] + #[inline(always)] + #[must_use] + pub fn overrun(&mut self) -> OVERRUN_W<3> { + OVERRUN_W::new(self) + } + #[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 = "Result of last incoming frames\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 [rx](index.html) module"] +pub struct RX_SPEC; +impl crate::RegisterSpec for RX_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [rx::R](R) reader structure"] +impl crate::Readable for RX_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [rx::W](W) writer structure"] +impl crate::Writable for RX_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0x0d; +} +#[doc = "`reset()` method sets RX to value 0"] +impl crate::Resettable for RX_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/nfct/inten.rs b/down-the-stack/dk_pac/src/nfct/inten.rs new file mode 100644 index 0000000..846e298 --- /dev/null +++ b/down-the-stack/dk_pac/src/nfct/inten.rs @@ -0,0 +1,982 @@ +#[doc = "Register `INTEN` 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 `INTEN` 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 `READY` reader - Enable or disable interrupt for event READY"] +pub type READY_R = crate::BitReader; +#[doc = "Enable or disable interrupt for event READY\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum READY_A { + #[doc = "0: Disable"] + DISABLED = 0, + #[doc = "1: Enable"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: READY_A) -> Self { + variant as u8 != 0 + } +} +impl READY_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> READY_A { + match self.bits { + false => READY_A::DISABLED, + true => READY_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == READY_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == READY_A::ENABLED + } +} +#[doc = "Field `READY` writer - Enable or disable interrupt for event READY"] +pub type READY_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTEN_SPEC, READY_A, O>; +impl<'a, const O: u8> READY_W<'a, O> { + #[doc = "Disable"] + #[inline(always)] + pub fn disabled(self) -> &'a mut W { + self.variant(READY_A::DISABLED) + } + #[doc = "Enable"] + #[inline(always)] + pub fn enabled(self) -> &'a mut W { + self.variant(READY_A::ENABLED) + } +} +#[doc = "Field `FIELDDETECTED` reader - Enable or disable interrupt for event FIELDDETECTED"] +pub type FIELDDETECTED_R = crate::BitReader; +#[doc = "Enable or disable interrupt for event FIELDDETECTED\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum FIELDDETECTED_A { + #[doc = "0: Disable"] + DISABLED = 0, + #[doc = "1: Enable"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: FIELDDETECTED_A) -> Self { + variant as u8 != 0 + } +} +impl FIELDDETECTED_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> FIELDDETECTED_A { + match self.bits { + false => FIELDDETECTED_A::DISABLED, + true => FIELDDETECTED_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == FIELDDETECTED_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == FIELDDETECTED_A::ENABLED + } +} +#[doc = "Field `FIELDDETECTED` writer - Enable or disable interrupt for event FIELDDETECTED"] +pub type FIELDDETECTED_W<'a, const O: u8> = + crate::BitWriter<'a, u32, INTEN_SPEC, FIELDDETECTED_A, O>; +impl<'a, const O: u8> FIELDDETECTED_W<'a, O> { + #[doc = "Disable"] + #[inline(always)] + pub fn disabled(self) -> &'a mut W { + self.variant(FIELDDETECTED_A::DISABLED) + } + #[doc = "Enable"] + #[inline(always)] + pub fn enabled(self) -> &'a mut W { + self.variant(FIELDDETECTED_A::ENABLED) + } +} +#[doc = "Field `FIELDLOST` reader - Enable or disable interrupt for event FIELDLOST"] +pub type FIELDLOST_R = crate::BitReader; +#[doc = "Enable or disable interrupt for event FIELDLOST\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum FIELDLOST_A { + #[doc = "0: Disable"] + DISABLED = 0, + #[doc = "1: Enable"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: FIELDLOST_A) -> Self { + variant as u8 != 0 + } +} +impl FIELDLOST_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> FIELDLOST_A { + match self.bits { + false => FIELDLOST_A::DISABLED, + true => FIELDLOST_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == FIELDLOST_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == FIELDLOST_A::ENABLED + } +} +#[doc = "Field `FIELDLOST` writer - Enable or disable interrupt for event FIELDLOST"] +pub type FIELDLOST_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTEN_SPEC, FIELDLOST_A, O>; +impl<'a, const O: u8> FIELDLOST_W<'a, O> { + #[doc = "Disable"] + #[inline(always)] + pub fn disabled(self) -> &'a mut W { + self.variant(FIELDLOST_A::DISABLED) + } + #[doc = "Enable"] + #[inline(always)] + pub fn enabled(self) -> &'a mut W { + self.variant(FIELDLOST_A::ENABLED) + } +} +#[doc = "Field `TXFRAMESTART` reader - Enable or disable interrupt for event TXFRAMESTART"] +pub type TXFRAMESTART_R = crate::BitReader; +#[doc = "Enable or disable interrupt for event TXFRAMESTART\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum TXFRAMESTART_A { + #[doc = "0: Disable"] + DISABLED = 0, + #[doc = "1: Enable"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: TXFRAMESTART_A) -> Self { + variant as u8 != 0 + } +} +impl TXFRAMESTART_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> TXFRAMESTART_A { + match self.bits { + false => TXFRAMESTART_A::DISABLED, + true => TXFRAMESTART_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == TXFRAMESTART_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == TXFRAMESTART_A::ENABLED + } +} +#[doc = "Field `TXFRAMESTART` writer - Enable or disable interrupt for event TXFRAMESTART"] +pub type TXFRAMESTART_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTEN_SPEC, TXFRAMESTART_A, O>; +impl<'a, const O: u8> TXFRAMESTART_W<'a, O> { + #[doc = "Disable"] + #[inline(always)] + pub fn disabled(self) -> &'a mut W { + self.variant(TXFRAMESTART_A::DISABLED) + } + #[doc = "Enable"] + #[inline(always)] + pub fn enabled(self) -> &'a mut W { + self.variant(TXFRAMESTART_A::ENABLED) + } +} +#[doc = "Field `TXFRAMEEND` reader - Enable or disable interrupt for event TXFRAMEEND"] +pub type TXFRAMEEND_R = crate::BitReader; +#[doc = "Enable or disable interrupt for event TXFRAMEEND\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum TXFRAMEEND_A { + #[doc = "0: Disable"] + DISABLED = 0, + #[doc = "1: Enable"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: TXFRAMEEND_A) -> Self { + variant as u8 != 0 + } +} +impl TXFRAMEEND_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> TXFRAMEEND_A { + match self.bits { + false => TXFRAMEEND_A::DISABLED, + true => TXFRAMEEND_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == TXFRAMEEND_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == TXFRAMEEND_A::ENABLED + } +} +#[doc = "Field `TXFRAMEEND` writer - Enable or disable interrupt for event TXFRAMEEND"] +pub type TXFRAMEEND_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTEN_SPEC, TXFRAMEEND_A, O>; +impl<'a, const O: u8> TXFRAMEEND_W<'a, O> { + #[doc = "Disable"] + #[inline(always)] + pub fn disabled(self) -> &'a mut W { + self.variant(TXFRAMEEND_A::DISABLED) + } + #[doc = "Enable"] + #[inline(always)] + pub fn enabled(self) -> &'a mut W { + self.variant(TXFRAMEEND_A::ENABLED) + } +} +#[doc = "Field `RXFRAMESTART` reader - Enable or disable interrupt for event RXFRAMESTART"] +pub type RXFRAMESTART_R = crate::BitReader; +#[doc = "Enable or disable interrupt for event RXFRAMESTART\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum RXFRAMESTART_A { + #[doc = "0: Disable"] + DISABLED = 0, + #[doc = "1: Enable"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: RXFRAMESTART_A) -> Self { + variant as u8 != 0 + } +} +impl RXFRAMESTART_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> RXFRAMESTART_A { + match self.bits { + false => RXFRAMESTART_A::DISABLED, + true => RXFRAMESTART_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == RXFRAMESTART_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == RXFRAMESTART_A::ENABLED + } +} +#[doc = "Field `RXFRAMESTART` writer - Enable or disable interrupt for event RXFRAMESTART"] +pub type RXFRAMESTART_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTEN_SPEC, RXFRAMESTART_A, O>; +impl<'a, const O: u8> RXFRAMESTART_W<'a, O> { + #[doc = "Disable"] + #[inline(always)] + pub fn disabled(self) -> &'a mut W { + self.variant(RXFRAMESTART_A::DISABLED) + } + #[doc = "Enable"] + #[inline(always)] + pub fn enabled(self) -> &'a mut W { + self.variant(RXFRAMESTART_A::ENABLED) + } +} +#[doc = "Field `RXFRAMEEND` reader - Enable or disable interrupt for event RXFRAMEEND"] +pub type RXFRAMEEND_R = crate::BitReader; +#[doc = "Enable or disable interrupt for event RXFRAMEEND\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum RXFRAMEEND_A { + #[doc = "0: Disable"] + DISABLED = 0, + #[doc = "1: Enable"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: RXFRAMEEND_A) -> Self { + variant as u8 != 0 + } +} +impl RXFRAMEEND_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> RXFRAMEEND_A { + match self.bits { + false => RXFRAMEEND_A::DISABLED, + true => RXFRAMEEND_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == RXFRAMEEND_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == RXFRAMEEND_A::ENABLED + } +} +#[doc = "Field `RXFRAMEEND` writer - Enable or disable interrupt for event RXFRAMEEND"] +pub type RXFRAMEEND_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTEN_SPEC, RXFRAMEEND_A, O>; +impl<'a, const O: u8> RXFRAMEEND_W<'a, O> { + #[doc = "Disable"] + #[inline(always)] + pub fn disabled(self) -> &'a mut W { + self.variant(RXFRAMEEND_A::DISABLED) + } + #[doc = "Enable"] + #[inline(always)] + pub fn enabled(self) -> &'a mut W { + self.variant(RXFRAMEEND_A::ENABLED) + } +} +#[doc = "Field `ERROR` reader - Enable or disable interrupt for event ERROR"] +pub type ERROR_R = crate::BitReader; +#[doc = "Enable or disable interrupt for event ERROR\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum ERROR_A { + #[doc = "0: Disable"] + DISABLED = 0, + #[doc = "1: Enable"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: ERROR_A) -> Self { + variant as u8 != 0 + } +} +impl ERROR_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> ERROR_A { + match self.bits { + false => ERROR_A::DISABLED, + true => ERROR_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == ERROR_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == ERROR_A::ENABLED + } +} +#[doc = "Field `ERROR` writer - Enable or disable interrupt for event ERROR"] +pub type ERROR_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTEN_SPEC, ERROR_A, O>; +impl<'a, const O: u8> ERROR_W<'a, O> { + #[doc = "Disable"] + #[inline(always)] + pub fn disabled(self) -> &'a mut W { + self.variant(ERROR_A::DISABLED) + } + #[doc = "Enable"] + #[inline(always)] + pub fn enabled(self) -> &'a mut W { + self.variant(ERROR_A::ENABLED) + } +} +#[doc = "Field `RXERROR` reader - Enable or disable interrupt for event RXERROR"] +pub type RXERROR_R = crate::BitReader; +#[doc = "Enable or disable interrupt for event RXERROR\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum RXERROR_A { + #[doc = "0: Disable"] + DISABLED = 0, + #[doc = "1: Enable"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: RXERROR_A) -> Self { + variant as u8 != 0 + } +} +impl RXERROR_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> RXERROR_A { + match self.bits { + false => RXERROR_A::DISABLED, + true => RXERROR_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == RXERROR_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == RXERROR_A::ENABLED + } +} +#[doc = "Field `RXERROR` writer - Enable or disable interrupt for event RXERROR"] +pub type RXERROR_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTEN_SPEC, RXERROR_A, O>; +impl<'a, const O: u8> RXERROR_W<'a, O> { + #[doc = "Disable"] + #[inline(always)] + pub fn disabled(self) -> &'a mut W { + self.variant(RXERROR_A::DISABLED) + } + #[doc = "Enable"] + #[inline(always)] + pub fn enabled(self) -> &'a mut W { + self.variant(RXERROR_A::ENABLED) + } +} +#[doc = "Field `ENDRX` reader - Enable or disable interrupt for event ENDRX"] +pub type ENDRX_R = crate::BitReader; +#[doc = "Enable or disable interrupt for event ENDRX\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum ENDRX_A { + #[doc = "0: Disable"] + DISABLED = 0, + #[doc = "1: Enable"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: ENDRX_A) -> Self { + variant as u8 != 0 + } +} +impl ENDRX_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> ENDRX_A { + match self.bits { + false => ENDRX_A::DISABLED, + true => ENDRX_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == ENDRX_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == ENDRX_A::ENABLED + } +} +#[doc = "Field `ENDRX` writer - Enable or disable interrupt for event ENDRX"] +pub type ENDRX_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTEN_SPEC, ENDRX_A, O>; +impl<'a, const O: u8> ENDRX_W<'a, O> { + #[doc = "Disable"] + #[inline(always)] + pub fn disabled(self) -> &'a mut W { + self.variant(ENDRX_A::DISABLED) + } + #[doc = "Enable"] + #[inline(always)] + pub fn enabled(self) -> &'a mut W { + self.variant(ENDRX_A::ENABLED) + } +} +#[doc = "Field `ENDTX` reader - Enable or disable interrupt for event ENDTX"] +pub type ENDTX_R = crate::BitReader; +#[doc = "Enable or disable interrupt for event ENDTX\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum ENDTX_A { + #[doc = "0: Disable"] + DISABLED = 0, + #[doc = "1: Enable"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: ENDTX_A) -> Self { + variant as u8 != 0 + } +} +impl ENDTX_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> ENDTX_A { + match self.bits { + false => ENDTX_A::DISABLED, + true => ENDTX_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == ENDTX_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == ENDTX_A::ENABLED + } +} +#[doc = "Field `ENDTX` writer - Enable or disable interrupt for event ENDTX"] +pub type ENDTX_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTEN_SPEC, ENDTX_A, O>; +impl<'a, const O: u8> ENDTX_W<'a, O> { + #[doc = "Disable"] + #[inline(always)] + pub fn disabled(self) -> &'a mut W { + self.variant(ENDTX_A::DISABLED) + } + #[doc = "Enable"] + #[inline(always)] + pub fn enabled(self) -> &'a mut W { + self.variant(ENDTX_A::ENABLED) + } +} +#[doc = "Field `AUTOCOLRESSTARTED` reader - Enable or disable interrupt for event AUTOCOLRESSTARTED"] +pub type AUTOCOLRESSTARTED_R = crate::BitReader; +#[doc = "Enable or disable interrupt for event AUTOCOLRESSTARTED\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum AUTOCOLRESSTARTED_A { + #[doc = "0: Disable"] + DISABLED = 0, + #[doc = "1: Enable"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: AUTOCOLRESSTARTED_A) -> Self { + variant as u8 != 0 + } +} +impl AUTOCOLRESSTARTED_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> AUTOCOLRESSTARTED_A { + match self.bits { + false => AUTOCOLRESSTARTED_A::DISABLED, + true => AUTOCOLRESSTARTED_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == AUTOCOLRESSTARTED_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == AUTOCOLRESSTARTED_A::ENABLED + } +} +#[doc = "Field `AUTOCOLRESSTARTED` writer - Enable or disable interrupt for event AUTOCOLRESSTARTED"] +pub type AUTOCOLRESSTARTED_W<'a, const O: u8> = + crate::BitWriter<'a, u32, INTEN_SPEC, AUTOCOLRESSTARTED_A, O>; +impl<'a, const O: u8> AUTOCOLRESSTARTED_W<'a, O> { + #[doc = "Disable"] + #[inline(always)] + pub fn disabled(self) -> &'a mut W { + self.variant(AUTOCOLRESSTARTED_A::DISABLED) + } + #[doc = "Enable"] + #[inline(always)] + pub fn enabled(self) -> &'a mut W { + self.variant(AUTOCOLRESSTARTED_A::ENABLED) + } +} +#[doc = "Field `COLLISION` reader - Enable or disable interrupt for event COLLISION"] +pub type COLLISION_R = crate::BitReader; +#[doc = "Enable or disable interrupt for event COLLISION\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum COLLISION_A { + #[doc = "0: Disable"] + DISABLED = 0, + #[doc = "1: Enable"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: COLLISION_A) -> Self { + variant as u8 != 0 + } +} +impl COLLISION_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> COLLISION_A { + match self.bits { + false => COLLISION_A::DISABLED, + true => COLLISION_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == COLLISION_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == COLLISION_A::ENABLED + } +} +#[doc = "Field `COLLISION` writer - Enable or disable interrupt for event COLLISION"] +pub type COLLISION_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTEN_SPEC, COLLISION_A, O>; +impl<'a, const O: u8> COLLISION_W<'a, O> { + #[doc = "Disable"] + #[inline(always)] + pub fn disabled(self) -> &'a mut W { + self.variant(COLLISION_A::DISABLED) + } + #[doc = "Enable"] + #[inline(always)] + pub fn enabled(self) -> &'a mut W { + self.variant(COLLISION_A::ENABLED) + } +} +#[doc = "Field `SELECTED` reader - Enable or disable interrupt for event SELECTED"] +pub type SELECTED_R = crate::BitReader; +#[doc = "Enable or disable interrupt for event SELECTED\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum SELECTED_A { + #[doc = "0: Disable"] + DISABLED = 0, + #[doc = "1: Enable"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: SELECTED_A) -> Self { + variant as u8 != 0 + } +} +impl SELECTED_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> SELECTED_A { + match self.bits { + false => SELECTED_A::DISABLED, + true => SELECTED_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == SELECTED_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == SELECTED_A::ENABLED + } +} +#[doc = "Field `SELECTED` writer - Enable or disable interrupt for event SELECTED"] +pub type SELECTED_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTEN_SPEC, SELECTED_A, O>; +impl<'a, const O: u8> SELECTED_W<'a, O> { + #[doc = "Disable"] + #[inline(always)] + pub fn disabled(self) -> &'a mut W { + self.variant(SELECTED_A::DISABLED) + } + #[doc = "Enable"] + #[inline(always)] + pub fn enabled(self) -> &'a mut W { + self.variant(SELECTED_A::ENABLED) + } +} +#[doc = "Field `STARTED` reader - Enable or disable interrupt for event STARTED"] +pub type STARTED_R = crate::BitReader; +#[doc = "Enable or disable interrupt for event STARTED\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum STARTED_A { + #[doc = "0: Disable"] + DISABLED = 0, + #[doc = "1: Enable"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: STARTED_A) -> Self { + variant as u8 != 0 + } +} +impl STARTED_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> STARTED_A { + match self.bits { + false => STARTED_A::DISABLED, + true => STARTED_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == STARTED_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == STARTED_A::ENABLED + } +} +#[doc = "Field `STARTED` writer - Enable or disable interrupt for event STARTED"] +pub type STARTED_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTEN_SPEC, STARTED_A, O>; +impl<'a, const O: u8> STARTED_W<'a, O> { + #[doc = "Disable"] + #[inline(always)] + pub fn disabled(self) -> &'a mut W { + self.variant(STARTED_A::DISABLED) + } + #[doc = "Enable"] + #[inline(always)] + pub fn enabled(self) -> &'a mut W { + self.variant(STARTED_A::ENABLED) + } +} +impl R { + #[doc = "Bit 0 - Enable or disable interrupt for event READY"] + #[inline(always)] + pub fn ready(&self) -> READY_R { + READY_R::new((self.bits & 1) != 0) + } + #[doc = "Bit 1 - Enable or disable interrupt for event FIELDDETECTED"] + #[inline(always)] + pub fn fielddetected(&self) -> FIELDDETECTED_R { + FIELDDETECTED_R::new(((self.bits >> 1) & 1) != 0) + } + #[doc = "Bit 2 - Enable or disable interrupt for event FIELDLOST"] + #[inline(always)] + pub fn fieldlost(&self) -> FIELDLOST_R { + FIELDLOST_R::new(((self.bits >> 2) & 1) != 0) + } + #[doc = "Bit 3 - Enable or disable interrupt for event TXFRAMESTART"] + #[inline(always)] + pub fn txframestart(&self) -> TXFRAMESTART_R { + TXFRAMESTART_R::new(((self.bits >> 3) & 1) != 0) + } + #[doc = "Bit 4 - Enable or disable interrupt for event TXFRAMEEND"] + #[inline(always)] + pub fn txframeend(&self) -> TXFRAMEEND_R { + TXFRAMEEND_R::new(((self.bits >> 4) & 1) != 0) + } + #[doc = "Bit 5 - Enable or disable interrupt for event RXFRAMESTART"] + #[inline(always)] + pub fn rxframestart(&self) -> RXFRAMESTART_R { + RXFRAMESTART_R::new(((self.bits >> 5) & 1) != 0) + } + #[doc = "Bit 6 - Enable or disable interrupt for event RXFRAMEEND"] + #[inline(always)] + pub fn rxframeend(&self) -> RXFRAMEEND_R { + RXFRAMEEND_R::new(((self.bits >> 6) & 1) != 0) + } + #[doc = "Bit 7 - Enable or disable interrupt for event ERROR"] + #[inline(always)] + pub fn error(&self) -> ERROR_R { + ERROR_R::new(((self.bits >> 7) & 1) != 0) + } + #[doc = "Bit 10 - Enable or disable interrupt for event RXERROR"] + #[inline(always)] + pub fn rxerror(&self) -> RXERROR_R { + RXERROR_R::new(((self.bits >> 10) & 1) != 0) + } + #[doc = "Bit 11 - Enable or disable interrupt for event ENDRX"] + #[inline(always)] + pub fn endrx(&self) -> ENDRX_R { + ENDRX_R::new(((self.bits >> 11) & 1) != 0) + } + #[doc = "Bit 12 - Enable or disable interrupt for event ENDTX"] + #[inline(always)] + pub fn endtx(&self) -> ENDTX_R { + ENDTX_R::new(((self.bits >> 12) & 1) != 0) + } + #[doc = "Bit 14 - Enable or disable interrupt for event AUTOCOLRESSTARTED"] + #[inline(always)] + pub fn autocolresstarted(&self) -> AUTOCOLRESSTARTED_R { + AUTOCOLRESSTARTED_R::new(((self.bits >> 14) & 1) != 0) + } + #[doc = "Bit 18 - Enable or disable interrupt for event COLLISION"] + #[inline(always)] + pub fn collision(&self) -> COLLISION_R { + COLLISION_R::new(((self.bits >> 18) & 1) != 0) + } + #[doc = "Bit 19 - Enable or disable interrupt for event SELECTED"] + #[inline(always)] + pub fn selected(&self) -> SELECTED_R { + SELECTED_R::new(((self.bits >> 19) & 1) != 0) + } + #[doc = "Bit 20 - Enable or disable interrupt for event STARTED"] + #[inline(always)] + pub fn started(&self) -> STARTED_R { + STARTED_R::new(((self.bits >> 20) & 1) != 0) + } +} +impl W { + #[doc = "Bit 0 - Enable or disable interrupt for event READY"] + #[inline(always)] + #[must_use] + pub fn ready(&mut self) -> READY_W<0> { + READY_W::new(self) + } + #[doc = "Bit 1 - Enable or disable interrupt for event FIELDDETECTED"] + #[inline(always)] + #[must_use] + pub fn fielddetected(&mut self) -> FIELDDETECTED_W<1> { + FIELDDETECTED_W::new(self) + } + #[doc = "Bit 2 - Enable or disable interrupt for event FIELDLOST"] + #[inline(always)] + #[must_use] + pub fn fieldlost(&mut self) -> FIELDLOST_W<2> { + FIELDLOST_W::new(self) + } + #[doc = "Bit 3 - Enable or disable interrupt for event TXFRAMESTART"] + #[inline(always)] + #[must_use] + pub fn txframestart(&mut self) -> TXFRAMESTART_W<3> { + TXFRAMESTART_W::new(self) + } + #[doc = "Bit 4 - Enable or disable interrupt for event TXFRAMEEND"] + #[inline(always)] + #[must_use] + pub fn txframeend(&mut self) -> TXFRAMEEND_W<4> { + TXFRAMEEND_W::new(self) + } + #[doc = "Bit 5 - Enable or disable interrupt for event RXFRAMESTART"] + #[inline(always)] + #[must_use] + pub fn rxframestart(&mut self) -> RXFRAMESTART_W<5> { + RXFRAMESTART_W::new(self) + } + #[doc = "Bit 6 - Enable or disable interrupt for event RXFRAMEEND"] + #[inline(always)] + #[must_use] + pub fn rxframeend(&mut self) -> RXFRAMEEND_W<6> { + RXFRAMEEND_W::new(self) + } + #[doc = "Bit 7 - Enable or disable interrupt for event ERROR"] + #[inline(always)] + #[must_use] + pub fn error(&mut self) -> ERROR_W<7> { + ERROR_W::new(self) + } + #[doc = "Bit 10 - Enable or disable interrupt for event RXERROR"] + #[inline(always)] + #[must_use] + pub fn rxerror(&mut self) -> RXERROR_W<10> { + RXERROR_W::new(self) + } + #[doc = "Bit 11 - Enable or disable interrupt for event ENDRX"] + #[inline(always)] + #[must_use] + pub fn endrx(&mut self) -> ENDRX_W<11> { + ENDRX_W::new(self) + } + #[doc = "Bit 12 - Enable or disable interrupt for event ENDTX"] + #[inline(always)] + #[must_use] + pub fn endtx(&mut self) -> ENDTX_W<12> { + ENDTX_W::new(self) + } + #[doc = "Bit 14 - Enable or disable interrupt for event AUTOCOLRESSTARTED"] + #[inline(always)] + #[must_use] + pub fn autocolresstarted(&mut self) -> AUTOCOLRESSTARTED_W<14> { + AUTOCOLRESSTARTED_W::new(self) + } + #[doc = "Bit 18 - Enable or disable interrupt for event COLLISION"] + #[inline(always)] + #[must_use] + pub fn collision(&mut self) -> COLLISION_W<18> { + COLLISION_W::new(self) + } + #[doc = "Bit 19 - Enable or disable interrupt for event SELECTED"] + #[inline(always)] + #[must_use] + pub fn selected(&mut self) -> SELECTED_W<19> { + SELECTED_W::new(self) + } + #[doc = "Bit 20 - Enable or disable interrupt for event STARTED"] + #[inline(always)] + #[must_use] + pub fn started(&mut self) -> STARTED_W<20> { + STARTED_W::new(self) + } + #[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 = "Enable or disable interrupt\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 [inten](index.html) module"] +pub struct INTEN_SPEC; +impl crate::RegisterSpec for INTEN_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [inten::R](R) reader structure"] +impl crate::Readable for INTEN_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [inten::W](W) writer structure"] +impl crate::Writable for INTEN_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets INTEN to value 0"] +impl crate::Resettable for INTEN_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/nfct/intenclr.rs b/down-the-stack/dk_pac/src/nfct/intenclr.rs new file mode 100644 index 0000000..358a7ca --- /dev/null +++ b/down-the-stack/dk_pac/src/nfct/intenclr.rs @@ -0,0 +1,1089 @@ +#[doc = "Register `INTENCLR` 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 `INTENCLR` 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 `READY` reader - Write '1' to disable interrupt for event READY"] +pub type READY_R = crate::BitReader; +#[doc = "Write '1' to disable interrupt for event READY\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum READY_A { + #[doc = "0: Read: Disabled"] + DISABLED = 0, + #[doc = "1: Read: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: READY_A) -> Self { + variant as u8 != 0 + } +} +impl READY_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> READY_A { + match self.bits { + false => READY_A::DISABLED, + true => READY_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == READY_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == READY_A::ENABLED + } +} +#[doc = "Write '1' to disable interrupt for event READY\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum READY_AW { + #[doc = "1: Disable"] + CLEAR = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: READY_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `READY` writer - Write '1' to disable interrupt for event READY"] +pub type READY_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENCLR_SPEC, READY_AW, O>; +impl<'a, const O: u8> READY_W<'a, O> { + #[doc = "Disable"] + #[inline(always)] + pub fn clear(self) -> &'a mut W { + self.variant(READY_AW::CLEAR) + } +} +#[doc = "Field `FIELDDETECTED` reader - Write '1' to disable interrupt for event FIELDDETECTED"] +pub type FIELDDETECTED_R = crate::BitReader; +#[doc = "Write '1' to disable interrupt for event FIELDDETECTED\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum FIELDDETECTED_A { + #[doc = "0: Read: Disabled"] + DISABLED = 0, + #[doc = "1: Read: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: FIELDDETECTED_A) -> Self { + variant as u8 != 0 + } +} +impl FIELDDETECTED_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> FIELDDETECTED_A { + match self.bits { + false => FIELDDETECTED_A::DISABLED, + true => FIELDDETECTED_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == FIELDDETECTED_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == FIELDDETECTED_A::ENABLED + } +} +#[doc = "Write '1' to disable interrupt for event FIELDDETECTED\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum FIELDDETECTED_AW { + #[doc = "1: Disable"] + CLEAR = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: FIELDDETECTED_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `FIELDDETECTED` writer - Write '1' to disable interrupt for event FIELDDETECTED"] +pub type FIELDDETECTED_W<'a, const O: u8> = + crate::BitWriter<'a, u32, INTENCLR_SPEC, FIELDDETECTED_AW, O>; +impl<'a, const O: u8> FIELDDETECTED_W<'a, O> { + #[doc = "Disable"] + #[inline(always)] + pub fn clear(self) -> &'a mut W { + self.variant(FIELDDETECTED_AW::CLEAR) + } +} +#[doc = "Field `FIELDLOST` reader - Write '1' to disable interrupt for event FIELDLOST"] +pub type FIELDLOST_R = crate::BitReader; +#[doc = "Write '1' to disable interrupt for event FIELDLOST\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum FIELDLOST_A { + #[doc = "0: Read: Disabled"] + DISABLED = 0, + #[doc = "1: Read: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: FIELDLOST_A) -> Self { + variant as u8 != 0 + } +} +impl FIELDLOST_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> FIELDLOST_A { + match self.bits { + false => FIELDLOST_A::DISABLED, + true => FIELDLOST_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == FIELDLOST_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == FIELDLOST_A::ENABLED + } +} +#[doc = "Write '1' to disable interrupt for event FIELDLOST\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum FIELDLOST_AW { + #[doc = "1: Disable"] + CLEAR = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: FIELDLOST_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `FIELDLOST` writer - Write '1' to disable interrupt for event FIELDLOST"] +pub type FIELDLOST_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENCLR_SPEC, FIELDLOST_AW, O>; +impl<'a, const O: u8> FIELDLOST_W<'a, O> { + #[doc = "Disable"] + #[inline(always)] + pub fn clear(self) -> &'a mut W { + self.variant(FIELDLOST_AW::CLEAR) + } +} +#[doc = "Field `TXFRAMESTART` reader - Write '1' to disable interrupt for event TXFRAMESTART"] +pub type TXFRAMESTART_R = crate::BitReader; +#[doc = "Write '1' to disable interrupt for event TXFRAMESTART\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum TXFRAMESTART_A { + #[doc = "0: Read: Disabled"] + DISABLED = 0, + #[doc = "1: Read: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: TXFRAMESTART_A) -> Self { + variant as u8 != 0 + } +} +impl TXFRAMESTART_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> TXFRAMESTART_A { + match self.bits { + false => TXFRAMESTART_A::DISABLED, + true => TXFRAMESTART_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == TXFRAMESTART_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == TXFRAMESTART_A::ENABLED + } +} +#[doc = "Write '1' to disable interrupt for event TXFRAMESTART\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum TXFRAMESTART_AW { + #[doc = "1: Disable"] + CLEAR = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: TXFRAMESTART_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `TXFRAMESTART` writer - Write '1' to disable interrupt for event TXFRAMESTART"] +pub type TXFRAMESTART_W<'a, const O: u8> = + crate::BitWriter<'a, u32, INTENCLR_SPEC, TXFRAMESTART_AW, O>; +impl<'a, const O: u8> TXFRAMESTART_W<'a, O> { + #[doc = "Disable"] + #[inline(always)] + pub fn clear(self) -> &'a mut W { + self.variant(TXFRAMESTART_AW::CLEAR) + } +} +#[doc = "Field `TXFRAMEEND` reader - Write '1' to disable interrupt for event TXFRAMEEND"] +pub type TXFRAMEEND_R = crate::BitReader; +#[doc = "Write '1' to disable interrupt for event TXFRAMEEND\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum TXFRAMEEND_A { + #[doc = "0: Read: Disabled"] + DISABLED = 0, + #[doc = "1: Read: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: TXFRAMEEND_A) -> Self { + variant as u8 != 0 + } +} +impl TXFRAMEEND_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> TXFRAMEEND_A { + match self.bits { + false => TXFRAMEEND_A::DISABLED, + true => TXFRAMEEND_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == TXFRAMEEND_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == TXFRAMEEND_A::ENABLED + } +} +#[doc = "Write '1' to disable interrupt for event TXFRAMEEND\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum TXFRAMEEND_AW { + #[doc = "1: Disable"] + CLEAR = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: TXFRAMEEND_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `TXFRAMEEND` writer - Write '1' to disable interrupt for event TXFRAMEEND"] +pub type TXFRAMEEND_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENCLR_SPEC, TXFRAMEEND_AW, O>; +impl<'a, const O: u8> TXFRAMEEND_W<'a, O> { + #[doc = "Disable"] + #[inline(always)] + pub fn clear(self) -> &'a mut W { + self.variant(TXFRAMEEND_AW::CLEAR) + } +} +#[doc = "Field `RXFRAMESTART` reader - Write '1' to disable interrupt for event RXFRAMESTART"] +pub type RXFRAMESTART_R = crate::BitReader; +#[doc = "Write '1' to disable interrupt for event RXFRAMESTART\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum RXFRAMESTART_A { + #[doc = "0: Read: Disabled"] + DISABLED = 0, + #[doc = "1: Read: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: RXFRAMESTART_A) -> Self { + variant as u8 != 0 + } +} +impl RXFRAMESTART_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> RXFRAMESTART_A { + match self.bits { + false => RXFRAMESTART_A::DISABLED, + true => RXFRAMESTART_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == RXFRAMESTART_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == RXFRAMESTART_A::ENABLED + } +} +#[doc = "Write '1' to disable interrupt for event RXFRAMESTART\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum RXFRAMESTART_AW { + #[doc = "1: Disable"] + CLEAR = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: RXFRAMESTART_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `RXFRAMESTART` writer - Write '1' to disable interrupt for event RXFRAMESTART"] +pub type RXFRAMESTART_W<'a, const O: u8> = + crate::BitWriter<'a, u32, INTENCLR_SPEC, RXFRAMESTART_AW, O>; +impl<'a, const O: u8> RXFRAMESTART_W<'a, O> { + #[doc = "Disable"] + #[inline(always)] + pub fn clear(self) -> &'a mut W { + self.variant(RXFRAMESTART_AW::CLEAR) + } +} +#[doc = "Field `RXFRAMEEND` reader - Write '1' to disable interrupt for event RXFRAMEEND"] +pub type RXFRAMEEND_R = crate::BitReader; +#[doc = "Write '1' to disable interrupt for event RXFRAMEEND\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum RXFRAMEEND_A { + #[doc = "0: Read: Disabled"] + DISABLED = 0, + #[doc = "1: Read: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: RXFRAMEEND_A) -> Self { + variant as u8 != 0 + } +} +impl RXFRAMEEND_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> RXFRAMEEND_A { + match self.bits { + false => RXFRAMEEND_A::DISABLED, + true => RXFRAMEEND_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == RXFRAMEEND_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == RXFRAMEEND_A::ENABLED + } +} +#[doc = "Write '1' to disable interrupt for event RXFRAMEEND\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum RXFRAMEEND_AW { + #[doc = "1: Disable"] + CLEAR = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: RXFRAMEEND_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `RXFRAMEEND` writer - Write '1' to disable interrupt for event RXFRAMEEND"] +pub type RXFRAMEEND_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENCLR_SPEC, RXFRAMEEND_AW, O>; +impl<'a, const O: u8> RXFRAMEEND_W<'a, O> { + #[doc = "Disable"] + #[inline(always)] + pub fn clear(self) -> &'a mut W { + self.variant(RXFRAMEEND_AW::CLEAR) + } +} +#[doc = "Field `ERROR` reader - Write '1' to disable interrupt for event ERROR"] +pub type ERROR_R = crate::BitReader; +#[doc = "Write '1' to disable interrupt for event ERROR\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum ERROR_A { + #[doc = "0: Read: Disabled"] + DISABLED = 0, + #[doc = "1: Read: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: ERROR_A) -> Self { + variant as u8 != 0 + } +} +impl ERROR_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> ERROR_A { + match self.bits { + false => ERROR_A::DISABLED, + true => ERROR_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == ERROR_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == ERROR_A::ENABLED + } +} +#[doc = "Write '1' to disable interrupt for event ERROR\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum ERROR_AW { + #[doc = "1: Disable"] + CLEAR = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: ERROR_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `ERROR` writer - Write '1' to disable interrupt for event ERROR"] +pub type ERROR_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENCLR_SPEC, ERROR_AW, O>; +impl<'a, const O: u8> ERROR_W<'a, O> { + #[doc = "Disable"] + #[inline(always)] + pub fn clear(self) -> &'a mut W { + self.variant(ERROR_AW::CLEAR) + } +} +#[doc = "Field `RXERROR` reader - Write '1' to disable interrupt for event RXERROR"] +pub type RXERROR_R = crate::BitReader; +#[doc = "Write '1' to disable interrupt for event RXERROR\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum RXERROR_A { + #[doc = "0: Read: Disabled"] + DISABLED = 0, + #[doc = "1: Read: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: RXERROR_A) -> Self { + variant as u8 != 0 + } +} +impl RXERROR_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> RXERROR_A { + match self.bits { + false => RXERROR_A::DISABLED, + true => RXERROR_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == RXERROR_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == RXERROR_A::ENABLED + } +} +#[doc = "Write '1' to disable interrupt for event RXERROR\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum RXERROR_AW { + #[doc = "1: Disable"] + CLEAR = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: RXERROR_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `RXERROR` writer - Write '1' to disable interrupt for event RXERROR"] +pub type RXERROR_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENCLR_SPEC, RXERROR_AW, O>; +impl<'a, const O: u8> RXERROR_W<'a, O> { + #[doc = "Disable"] + #[inline(always)] + pub fn clear(self) -> &'a mut W { + self.variant(RXERROR_AW::CLEAR) + } +} +#[doc = "Field `ENDRX` reader - Write '1' to disable interrupt for event ENDRX"] +pub type ENDRX_R = crate::BitReader; +#[doc = "Write '1' to disable interrupt for event ENDRX\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum ENDRX_A { + #[doc = "0: Read: Disabled"] + DISABLED = 0, + #[doc = "1: Read: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: ENDRX_A) -> Self { + variant as u8 != 0 + } +} +impl ENDRX_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> ENDRX_A { + match self.bits { + false => ENDRX_A::DISABLED, + true => ENDRX_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == ENDRX_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == ENDRX_A::ENABLED + } +} +#[doc = "Write '1' to disable interrupt for event ENDRX\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum ENDRX_AW { + #[doc = "1: Disable"] + CLEAR = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: ENDRX_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `ENDRX` writer - Write '1' to disable interrupt for event ENDRX"] +pub type ENDRX_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENCLR_SPEC, ENDRX_AW, O>; +impl<'a, const O: u8> ENDRX_W<'a, O> { + #[doc = "Disable"] + #[inline(always)] + pub fn clear(self) -> &'a mut W { + self.variant(ENDRX_AW::CLEAR) + } +} +#[doc = "Field `ENDTX` reader - Write '1' to disable interrupt for event ENDTX"] +pub type ENDTX_R = crate::BitReader; +#[doc = "Write '1' to disable interrupt for event ENDTX\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum ENDTX_A { + #[doc = "0: Read: Disabled"] + DISABLED = 0, + #[doc = "1: Read: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: ENDTX_A) -> Self { + variant as u8 != 0 + } +} +impl ENDTX_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> ENDTX_A { + match self.bits { + false => ENDTX_A::DISABLED, + true => ENDTX_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == ENDTX_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == ENDTX_A::ENABLED + } +} +#[doc = "Write '1' to disable interrupt for event ENDTX\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum ENDTX_AW { + #[doc = "1: Disable"] + CLEAR = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: ENDTX_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `ENDTX` writer - Write '1' to disable interrupt for event ENDTX"] +pub type ENDTX_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENCLR_SPEC, ENDTX_AW, O>; +impl<'a, const O: u8> ENDTX_W<'a, O> { + #[doc = "Disable"] + #[inline(always)] + pub fn clear(self) -> &'a mut W { + self.variant(ENDTX_AW::CLEAR) + } +} +#[doc = "Field `AUTOCOLRESSTARTED` reader - Write '1' to disable interrupt for event AUTOCOLRESSTARTED"] +pub type AUTOCOLRESSTARTED_R = crate::BitReader; +#[doc = "Write '1' to disable interrupt for event AUTOCOLRESSTARTED\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum AUTOCOLRESSTARTED_A { + #[doc = "0: Read: Disabled"] + DISABLED = 0, + #[doc = "1: Read: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: AUTOCOLRESSTARTED_A) -> Self { + variant as u8 != 0 + } +} +impl AUTOCOLRESSTARTED_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> AUTOCOLRESSTARTED_A { + match self.bits { + false => AUTOCOLRESSTARTED_A::DISABLED, + true => AUTOCOLRESSTARTED_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == AUTOCOLRESSTARTED_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == AUTOCOLRESSTARTED_A::ENABLED + } +} +#[doc = "Write '1' to disable interrupt for event AUTOCOLRESSTARTED\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum AUTOCOLRESSTARTED_AW { + #[doc = "1: Disable"] + CLEAR = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: AUTOCOLRESSTARTED_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `AUTOCOLRESSTARTED` writer - Write '1' to disable interrupt for event AUTOCOLRESSTARTED"] +pub type AUTOCOLRESSTARTED_W<'a, const O: u8> = + crate::BitWriter<'a, u32, INTENCLR_SPEC, AUTOCOLRESSTARTED_AW, O>; +impl<'a, const O: u8> AUTOCOLRESSTARTED_W<'a, O> { + #[doc = "Disable"] + #[inline(always)] + pub fn clear(self) -> &'a mut W { + self.variant(AUTOCOLRESSTARTED_AW::CLEAR) + } +} +#[doc = "Field `COLLISION` reader - Write '1' to disable interrupt for event COLLISION"] +pub type COLLISION_R = crate::BitReader; +#[doc = "Write '1' to disable interrupt for event COLLISION\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum COLLISION_A { + #[doc = "0: Read: Disabled"] + DISABLED = 0, + #[doc = "1: Read: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: COLLISION_A) -> Self { + variant as u8 != 0 + } +} +impl COLLISION_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> COLLISION_A { + match self.bits { + false => COLLISION_A::DISABLED, + true => COLLISION_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == COLLISION_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == COLLISION_A::ENABLED + } +} +#[doc = "Write '1' to disable interrupt for event COLLISION\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum COLLISION_AW { + #[doc = "1: Disable"] + CLEAR = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: COLLISION_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `COLLISION` writer - Write '1' to disable interrupt for event COLLISION"] +pub type COLLISION_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENCLR_SPEC, COLLISION_AW, O>; +impl<'a, const O: u8> COLLISION_W<'a, O> { + #[doc = "Disable"] + #[inline(always)] + pub fn clear(self) -> &'a mut W { + self.variant(COLLISION_AW::CLEAR) + } +} +#[doc = "Field `SELECTED` reader - Write '1' to disable interrupt for event SELECTED"] +pub type SELECTED_R = crate::BitReader; +#[doc = "Write '1' to disable interrupt for event SELECTED\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum SELECTED_A { + #[doc = "0: Read: Disabled"] + DISABLED = 0, + #[doc = "1: Read: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: SELECTED_A) -> Self { + variant as u8 != 0 + } +} +impl SELECTED_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> SELECTED_A { + match self.bits { + false => SELECTED_A::DISABLED, + true => SELECTED_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == SELECTED_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == SELECTED_A::ENABLED + } +} +#[doc = "Write '1' to disable interrupt for event SELECTED\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum SELECTED_AW { + #[doc = "1: Disable"] + CLEAR = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: SELECTED_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `SELECTED` writer - Write '1' to disable interrupt for event SELECTED"] +pub type SELECTED_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENCLR_SPEC, SELECTED_AW, O>; +impl<'a, const O: u8> SELECTED_W<'a, O> { + #[doc = "Disable"] + #[inline(always)] + pub fn clear(self) -> &'a mut W { + self.variant(SELECTED_AW::CLEAR) + } +} +#[doc = "Field `STARTED` reader - Write '1' to disable interrupt for event STARTED"] +pub type STARTED_R = crate::BitReader; +#[doc = "Write '1' to disable interrupt for event STARTED\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum STARTED_A { + #[doc = "0: Read: Disabled"] + DISABLED = 0, + #[doc = "1: Read: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: STARTED_A) -> Self { + variant as u8 != 0 + } +} +impl STARTED_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> STARTED_A { + match self.bits { + false => STARTED_A::DISABLED, + true => STARTED_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == STARTED_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == STARTED_A::ENABLED + } +} +#[doc = "Write '1' to disable interrupt for event STARTED\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum STARTED_AW { + #[doc = "1: Disable"] + CLEAR = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: STARTED_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `STARTED` writer - Write '1' to disable interrupt for event STARTED"] +pub type STARTED_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENCLR_SPEC, STARTED_AW, O>; +impl<'a, const O: u8> STARTED_W<'a, O> { + #[doc = "Disable"] + #[inline(always)] + pub fn clear(self) -> &'a mut W { + self.variant(STARTED_AW::CLEAR) + } +} +impl R { + #[doc = "Bit 0 - Write '1' to disable interrupt for event READY"] + #[inline(always)] + pub fn ready(&self) -> READY_R { + READY_R::new((self.bits & 1) != 0) + } + #[doc = "Bit 1 - Write '1' to disable interrupt for event FIELDDETECTED"] + #[inline(always)] + pub fn fielddetected(&self) -> FIELDDETECTED_R { + FIELDDETECTED_R::new(((self.bits >> 1) & 1) != 0) + } + #[doc = "Bit 2 - Write '1' to disable interrupt for event FIELDLOST"] + #[inline(always)] + pub fn fieldlost(&self) -> FIELDLOST_R { + FIELDLOST_R::new(((self.bits >> 2) & 1) != 0) + } + #[doc = "Bit 3 - Write '1' to disable interrupt for event TXFRAMESTART"] + #[inline(always)] + pub fn txframestart(&self) -> TXFRAMESTART_R { + TXFRAMESTART_R::new(((self.bits >> 3) & 1) != 0) + } + #[doc = "Bit 4 - Write '1' to disable interrupt for event TXFRAMEEND"] + #[inline(always)] + pub fn txframeend(&self) -> TXFRAMEEND_R { + TXFRAMEEND_R::new(((self.bits >> 4) & 1) != 0) + } + #[doc = "Bit 5 - Write '1' to disable interrupt for event RXFRAMESTART"] + #[inline(always)] + pub fn rxframestart(&self) -> RXFRAMESTART_R { + RXFRAMESTART_R::new(((self.bits >> 5) & 1) != 0) + } + #[doc = "Bit 6 - Write '1' to disable interrupt for event RXFRAMEEND"] + #[inline(always)] + pub fn rxframeend(&self) -> RXFRAMEEND_R { + RXFRAMEEND_R::new(((self.bits >> 6) & 1) != 0) + } + #[doc = "Bit 7 - Write '1' to disable interrupt for event ERROR"] + #[inline(always)] + pub fn error(&self) -> ERROR_R { + ERROR_R::new(((self.bits >> 7) & 1) != 0) + } + #[doc = "Bit 10 - Write '1' to disable interrupt for event RXERROR"] + #[inline(always)] + pub fn rxerror(&self) -> RXERROR_R { + RXERROR_R::new(((self.bits >> 10) & 1) != 0) + } + #[doc = "Bit 11 - Write '1' to disable interrupt for event ENDRX"] + #[inline(always)] + pub fn endrx(&self) -> ENDRX_R { + ENDRX_R::new(((self.bits >> 11) & 1) != 0) + } + #[doc = "Bit 12 - Write '1' to disable interrupt for event ENDTX"] + #[inline(always)] + pub fn endtx(&self) -> ENDTX_R { + ENDTX_R::new(((self.bits >> 12) & 1) != 0) + } + #[doc = "Bit 14 - Write '1' to disable interrupt for event AUTOCOLRESSTARTED"] + #[inline(always)] + pub fn autocolresstarted(&self) -> AUTOCOLRESSTARTED_R { + AUTOCOLRESSTARTED_R::new(((self.bits >> 14) & 1) != 0) + } + #[doc = "Bit 18 - Write '1' to disable interrupt for event COLLISION"] + #[inline(always)] + pub fn collision(&self) -> COLLISION_R { + COLLISION_R::new(((self.bits >> 18) & 1) != 0) + } + #[doc = "Bit 19 - Write '1' to disable interrupt for event SELECTED"] + #[inline(always)] + pub fn selected(&self) -> SELECTED_R { + SELECTED_R::new(((self.bits >> 19) & 1) != 0) + } + #[doc = "Bit 20 - Write '1' to disable interrupt for event STARTED"] + #[inline(always)] + pub fn started(&self) -> STARTED_R { + STARTED_R::new(((self.bits >> 20) & 1) != 0) + } +} +impl W { + #[doc = "Bit 0 - Write '1' to disable interrupt for event READY"] + #[inline(always)] + #[must_use] + pub fn ready(&mut self) -> READY_W<0> { + READY_W::new(self) + } + #[doc = "Bit 1 - Write '1' to disable interrupt for event FIELDDETECTED"] + #[inline(always)] + #[must_use] + pub fn fielddetected(&mut self) -> FIELDDETECTED_W<1> { + FIELDDETECTED_W::new(self) + } + #[doc = "Bit 2 - Write '1' to disable interrupt for event FIELDLOST"] + #[inline(always)] + #[must_use] + pub fn fieldlost(&mut self) -> FIELDLOST_W<2> { + FIELDLOST_W::new(self) + } + #[doc = "Bit 3 - Write '1' to disable interrupt for event TXFRAMESTART"] + #[inline(always)] + #[must_use] + pub fn txframestart(&mut self) -> TXFRAMESTART_W<3> { + TXFRAMESTART_W::new(self) + } + #[doc = "Bit 4 - Write '1' to disable interrupt for event TXFRAMEEND"] + #[inline(always)] + #[must_use] + pub fn txframeend(&mut self) -> TXFRAMEEND_W<4> { + TXFRAMEEND_W::new(self) + } + #[doc = "Bit 5 - Write '1' to disable interrupt for event RXFRAMESTART"] + #[inline(always)] + #[must_use] + pub fn rxframestart(&mut self) -> RXFRAMESTART_W<5> { + RXFRAMESTART_W::new(self) + } + #[doc = "Bit 6 - Write '1' to disable interrupt for event RXFRAMEEND"] + #[inline(always)] + #[must_use] + pub fn rxframeend(&mut self) -> RXFRAMEEND_W<6> { + RXFRAMEEND_W::new(self) + } + #[doc = "Bit 7 - Write '1' to disable interrupt for event ERROR"] + #[inline(always)] + #[must_use] + pub fn error(&mut self) -> ERROR_W<7> { + ERROR_W::new(self) + } + #[doc = "Bit 10 - Write '1' to disable interrupt for event RXERROR"] + #[inline(always)] + #[must_use] + pub fn rxerror(&mut self) -> RXERROR_W<10> { + RXERROR_W::new(self) + } + #[doc = "Bit 11 - Write '1' to disable interrupt for event ENDRX"] + #[inline(always)] + #[must_use] + pub fn endrx(&mut self) -> ENDRX_W<11> { + ENDRX_W::new(self) + } + #[doc = "Bit 12 - Write '1' to disable interrupt for event ENDTX"] + #[inline(always)] + #[must_use] + pub fn endtx(&mut self) -> ENDTX_W<12> { + ENDTX_W::new(self) + } + #[doc = "Bit 14 - Write '1' to disable interrupt for event AUTOCOLRESSTARTED"] + #[inline(always)] + #[must_use] + pub fn autocolresstarted(&mut self) -> AUTOCOLRESSTARTED_W<14> { + AUTOCOLRESSTARTED_W::new(self) + } + #[doc = "Bit 18 - Write '1' to disable interrupt for event COLLISION"] + #[inline(always)] + #[must_use] + pub fn collision(&mut self) -> COLLISION_W<18> { + COLLISION_W::new(self) + } + #[doc = "Bit 19 - Write '1' to disable interrupt for event SELECTED"] + #[inline(always)] + #[must_use] + pub fn selected(&mut self) -> SELECTED_W<19> { + SELECTED_W::new(self) + } + #[doc = "Bit 20 - Write '1' to disable interrupt for event STARTED"] + #[inline(always)] + #[must_use] + pub fn started(&mut self) -> STARTED_W<20> { + STARTED_W::new(self) + } + #[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 = "Disable interrupt\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 [intenclr](index.html) module"] +pub struct INTENCLR_SPEC; +impl crate::RegisterSpec for INTENCLR_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [intenclr::R](R) reader structure"] +impl crate::Readable for INTENCLR_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [intenclr::W](W) writer structure"] +impl crate::Writable for INTENCLR_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets INTENCLR to value 0"] +impl crate::Resettable for INTENCLR_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/nfct/intenset.rs b/down-the-stack/dk_pac/src/nfct/intenset.rs new file mode 100644 index 0000000..1ae3019 --- /dev/null +++ b/down-the-stack/dk_pac/src/nfct/intenset.rs @@ -0,0 +1,1089 @@ +#[doc = "Register `INTENSET` 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 `INTENSET` 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 `READY` reader - Write '1' to enable interrupt for event READY"] +pub type READY_R = crate::BitReader; +#[doc = "Write '1' to enable interrupt for event READY\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum READY_A { + #[doc = "0: Read: Disabled"] + DISABLED = 0, + #[doc = "1: Read: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: READY_A) -> Self { + variant as u8 != 0 + } +} +impl READY_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> READY_A { + match self.bits { + false => READY_A::DISABLED, + true => READY_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == READY_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == READY_A::ENABLED + } +} +#[doc = "Write '1' to enable interrupt for event READY\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum READY_AW { + #[doc = "1: Enable"] + SET = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: READY_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `READY` writer - Write '1' to enable interrupt for event READY"] +pub type READY_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENSET_SPEC, READY_AW, O>; +impl<'a, const O: u8> READY_W<'a, O> { + #[doc = "Enable"] + #[inline(always)] + pub fn set(self) -> &'a mut W { + self.variant(READY_AW::SET) + } +} +#[doc = "Field `FIELDDETECTED` reader - Write '1' to enable interrupt for event FIELDDETECTED"] +pub type FIELDDETECTED_R = crate::BitReader; +#[doc = "Write '1' to enable interrupt for event FIELDDETECTED\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum FIELDDETECTED_A { + #[doc = "0: Read: Disabled"] + DISABLED = 0, + #[doc = "1: Read: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: FIELDDETECTED_A) -> Self { + variant as u8 != 0 + } +} +impl FIELDDETECTED_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> FIELDDETECTED_A { + match self.bits { + false => FIELDDETECTED_A::DISABLED, + true => FIELDDETECTED_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == FIELDDETECTED_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == FIELDDETECTED_A::ENABLED + } +} +#[doc = "Write '1' to enable interrupt for event FIELDDETECTED\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum FIELDDETECTED_AW { + #[doc = "1: Enable"] + SET = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: FIELDDETECTED_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `FIELDDETECTED` writer - Write '1' to enable interrupt for event FIELDDETECTED"] +pub type FIELDDETECTED_W<'a, const O: u8> = + crate::BitWriter<'a, u32, INTENSET_SPEC, FIELDDETECTED_AW, O>; +impl<'a, const O: u8> FIELDDETECTED_W<'a, O> { + #[doc = "Enable"] + #[inline(always)] + pub fn set(self) -> &'a mut W { + self.variant(FIELDDETECTED_AW::SET) + } +} +#[doc = "Field `FIELDLOST` reader - Write '1' to enable interrupt for event FIELDLOST"] +pub type FIELDLOST_R = crate::BitReader; +#[doc = "Write '1' to enable interrupt for event FIELDLOST\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum FIELDLOST_A { + #[doc = "0: Read: Disabled"] + DISABLED = 0, + #[doc = "1: Read: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: FIELDLOST_A) -> Self { + variant as u8 != 0 + } +} +impl FIELDLOST_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> FIELDLOST_A { + match self.bits { + false => FIELDLOST_A::DISABLED, + true => FIELDLOST_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == FIELDLOST_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == FIELDLOST_A::ENABLED + } +} +#[doc = "Write '1' to enable interrupt for event FIELDLOST\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum FIELDLOST_AW { + #[doc = "1: Enable"] + SET = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: FIELDLOST_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `FIELDLOST` writer - Write '1' to enable interrupt for event FIELDLOST"] +pub type FIELDLOST_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENSET_SPEC, FIELDLOST_AW, O>; +impl<'a, const O: u8> FIELDLOST_W<'a, O> { + #[doc = "Enable"] + #[inline(always)] + pub fn set(self) -> &'a mut W { + self.variant(FIELDLOST_AW::SET) + } +} +#[doc = "Field `TXFRAMESTART` reader - Write '1' to enable interrupt for event TXFRAMESTART"] +pub type TXFRAMESTART_R = crate::BitReader; +#[doc = "Write '1' to enable interrupt for event TXFRAMESTART\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum TXFRAMESTART_A { + #[doc = "0: Read: Disabled"] + DISABLED = 0, + #[doc = "1: Read: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: TXFRAMESTART_A) -> Self { + variant as u8 != 0 + } +} +impl TXFRAMESTART_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> TXFRAMESTART_A { + match self.bits { + false => TXFRAMESTART_A::DISABLED, + true => TXFRAMESTART_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == TXFRAMESTART_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == TXFRAMESTART_A::ENABLED + } +} +#[doc = "Write '1' to enable interrupt for event TXFRAMESTART\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum TXFRAMESTART_AW { + #[doc = "1: Enable"] + SET = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: TXFRAMESTART_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `TXFRAMESTART` writer - Write '1' to enable interrupt for event TXFRAMESTART"] +pub type TXFRAMESTART_W<'a, const O: u8> = + crate::BitWriter<'a, u32, INTENSET_SPEC, TXFRAMESTART_AW, O>; +impl<'a, const O: u8> TXFRAMESTART_W<'a, O> { + #[doc = "Enable"] + #[inline(always)] + pub fn set(self) -> &'a mut W { + self.variant(TXFRAMESTART_AW::SET) + } +} +#[doc = "Field `TXFRAMEEND` reader - Write '1' to enable interrupt for event TXFRAMEEND"] +pub type TXFRAMEEND_R = crate::BitReader; +#[doc = "Write '1' to enable interrupt for event TXFRAMEEND\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum TXFRAMEEND_A { + #[doc = "0: Read: Disabled"] + DISABLED = 0, + #[doc = "1: Read: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: TXFRAMEEND_A) -> Self { + variant as u8 != 0 + } +} +impl TXFRAMEEND_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> TXFRAMEEND_A { + match self.bits { + false => TXFRAMEEND_A::DISABLED, + true => TXFRAMEEND_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == TXFRAMEEND_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == TXFRAMEEND_A::ENABLED + } +} +#[doc = "Write '1' to enable interrupt for event TXFRAMEEND\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum TXFRAMEEND_AW { + #[doc = "1: Enable"] + SET = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: TXFRAMEEND_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `TXFRAMEEND` writer - Write '1' to enable interrupt for event TXFRAMEEND"] +pub type TXFRAMEEND_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENSET_SPEC, TXFRAMEEND_AW, O>; +impl<'a, const O: u8> TXFRAMEEND_W<'a, O> { + #[doc = "Enable"] + #[inline(always)] + pub fn set(self) -> &'a mut W { + self.variant(TXFRAMEEND_AW::SET) + } +} +#[doc = "Field `RXFRAMESTART` reader - Write '1' to enable interrupt for event RXFRAMESTART"] +pub type RXFRAMESTART_R = crate::BitReader; +#[doc = "Write '1' to enable interrupt for event RXFRAMESTART\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum RXFRAMESTART_A { + #[doc = "0: Read: Disabled"] + DISABLED = 0, + #[doc = "1: Read: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: RXFRAMESTART_A) -> Self { + variant as u8 != 0 + } +} +impl RXFRAMESTART_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> RXFRAMESTART_A { + match self.bits { + false => RXFRAMESTART_A::DISABLED, + true => RXFRAMESTART_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == RXFRAMESTART_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == RXFRAMESTART_A::ENABLED + } +} +#[doc = "Write '1' to enable interrupt for event RXFRAMESTART\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum RXFRAMESTART_AW { + #[doc = "1: Enable"] + SET = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: RXFRAMESTART_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `RXFRAMESTART` writer - Write '1' to enable interrupt for event RXFRAMESTART"] +pub type RXFRAMESTART_W<'a, const O: u8> = + crate::BitWriter<'a, u32, INTENSET_SPEC, RXFRAMESTART_AW, O>; +impl<'a, const O: u8> RXFRAMESTART_W<'a, O> { + #[doc = "Enable"] + #[inline(always)] + pub fn set(self) -> &'a mut W { + self.variant(RXFRAMESTART_AW::SET) + } +} +#[doc = "Field `RXFRAMEEND` reader - Write '1' to enable interrupt for event RXFRAMEEND"] +pub type RXFRAMEEND_R = crate::BitReader; +#[doc = "Write '1' to enable interrupt for event RXFRAMEEND\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum RXFRAMEEND_A { + #[doc = "0: Read: Disabled"] + DISABLED = 0, + #[doc = "1: Read: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: RXFRAMEEND_A) -> Self { + variant as u8 != 0 + } +} +impl RXFRAMEEND_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> RXFRAMEEND_A { + match self.bits { + false => RXFRAMEEND_A::DISABLED, + true => RXFRAMEEND_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == RXFRAMEEND_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == RXFRAMEEND_A::ENABLED + } +} +#[doc = "Write '1' to enable interrupt for event RXFRAMEEND\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum RXFRAMEEND_AW { + #[doc = "1: Enable"] + SET = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: RXFRAMEEND_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `RXFRAMEEND` writer - Write '1' to enable interrupt for event RXFRAMEEND"] +pub type RXFRAMEEND_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENSET_SPEC, RXFRAMEEND_AW, O>; +impl<'a, const O: u8> RXFRAMEEND_W<'a, O> { + #[doc = "Enable"] + #[inline(always)] + pub fn set(self) -> &'a mut W { + self.variant(RXFRAMEEND_AW::SET) + } +} +#[doc = "Field `ERROR` reader - Write '1' to enable interrupt for event ERROR"] +pub type ERROR_R = crate::BitReader; +#[doc = "Write '1' to enable interrupt for event ERROR\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum ERROR_A { + #[doc = "0: Read: Disabled"] + DISABLED = 0, + #[doc = "1: Read: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: ERROR_A) -> Self { + variant as u8 != 0 + } +} +impl ERROR_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> ERROR_A { + match self.bits { + false => ERROR_A::DISABLED, + true => ERROR_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == ERROR_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == ERROR_A::ENABLED + } +} +#[doc = "Write '1' to enable interrupt for event ERROR\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum ERROR_AW { + #[doc = "1: Enable"] + SET = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: ERROR_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `ERROR` writer - Write '1' to enable interrupt for event ERROR"] +pub type ERROR_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENSET_SPEC, ERROR_AW, O>; +impl<'a, const O: u8> ERROR_W<'a, O> { + #[doc = "Enable"] + #[inline(always)] + pub fn set(self) -> &'a mut W { + self.variant(ERROR_AW::SET) + } +} +#[doc = "Field `RXERROR` reader - Write '1' to enable interrupt for event RXERROR"] +pub type RXERROR_R = crate::BitReader; +#[doc = "Write '1' to enable interrupt for event RXERROR\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum RXERROR_A { + #[doc = "0: Read: Disabled"] + DISABLED = 0, + #[doc = "1: Read: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: RXERROR_A) -> Self { + variant as u8 != 0 + } +} +impl RXERROR_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> RXERROR_A { + match self.bits { + false => RXERROR_A::DISABLED, + true => RXERROR_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == RXERROR_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == RXERROR_A::ENABLED + } +} +#[doc = "Write '1' to enable interrupt for event RXERROR\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum RXERROR_AW { + #[doc = "1: Enable"] + SET = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: RXERROR_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `RXERROR` writer - Write '1' to enable interrupt for event RXERROR"] +pub type RXERROR_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENSET_SPEC, RXERROR_AW, O>; +impl<'a, const O: u8> RXERROR_W<'a, O> { + #[doc = "Enable"] + #[inline(always)] + pub fn set(self) -> &'a mut W { + self.variant(RXERROR_AW::SET) + } +} +#[doc = "Field `ENDRX` reader - Write '1' to enable interrupt for event ENDRX"] +pub type ENDRX_R = crate::BitReader; +#[doc = "Write '1' to enable interrupt for event ENDRX\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum ENDRX_A { + #[doc = "0: Read: Disabled"] + DISABLED = 0, + #[doc = "1: Read: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: ENDRX_A) -> Self { + variant as u8 != 0 + } +} +impl ENDRX_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> ENDRX_A { + match self.bits { + false => ENDRX_A::DISABLED, + true => ENDRX_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == ENDRX_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == ENDRX_A::ENABLED + } +} +#[doc = "Write '1' to enable interrupt for event ENDRX\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum ENDRX_AW { + #[doc = "1: Enable"] + SET = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: ENDRX_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `ENDRX` writer - Write '1' to enable interrupt for event ENDRX"] +pub type ENDRX_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENSET_SPEC, ENDRX_AW, O>; +impl<'a, const O: u8> ENDRX_W<'a, O> { + #[doc = "Enable"] + #[inline(always)] + pub fn set(self) -> &'a mut W { + self.variant(ENDRX_AW::SET) + } +} +#[doc = "Field `ENDTX` reader - Write '1' to enable interrupt for event ENDTX"] +pub type ENDTX_R = crate::BitReader; +#[doc = "Write '1' to enable interrupt for event ENDTX\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum ENDTX_A { + #[doc = "0: Read: Disabled"] + DISABLED = 0, + #[doc = "1: Read: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: ENDTX_A) -> Self { + variant as u8 != 0 + } +} +impl ENDTX_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> ENDTX_A { + match self.bits { + false => ENDTX_A::DISABLED, + true => ENDTX_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == ENDTX_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == ENDTX_A::ENABLED + } +} +#[doc = "Write '1' to enable interrupt for event ENDTX\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum ENDTX_AW { + #[doc = "1: Enable"] + SET = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: ENDTX_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `ENDTX` writer - Write '1' to enable interrupt for event ENDTX"] +pub type ENDTX_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENSET_SPEC, ENDTX_AW, O>; +impl<'a, const O: u8> ENDTX_W<'a, O> { + #[doc = "Enable"] + #[inline(always)] + pub fn set(self) -> &'a mut W { + self.variant(ENDTX_AW::SET) + } +} +#[doc = "Field `AUTOCOLRESSTARTED` reader - Write '1' to enable interrupt for event AUTOCOLRESSTARTED"] +pub type AUTOCOLRESSTARTED_R = crate::BitReader; +#[doc = "Write '1' to enable interrupt for event AUTOCOLRESSTARTED\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum AUTOCOLRESSTARTED_A { + #[doc = "0: Read: Disabled"] + DISABLED = 0, + #[doc = "1: Read: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: AUTOCOLRESSTARTED_A) -> Self { + variant as u8 != 0 + } +} +impl AUTOCOLRESSTARTED_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> AUTOCOLRESSTARTED_A { + match self.bits { + false => AUTOCOLRESSTARTED_A::DISABLED, + true => AUTOCOLRESSTARTED_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == AUTOCOLRESSTARTED_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == AUTOCOLRESSTARTED_A::ENABLED + } +} +#[doc = "Write '1' to enable interrupt for event AUTOCOLRESSTARTED\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum AUTOCOLRESSTARTED_AW { + #[doc = "1: Enable"] + SET = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: AUTOCOLRESSTARTED_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `AUTOCOLRESSTARTED` writer - Write '1' to enable interrupt for event AUTOCOLRESSTARTED"] +pub type AUTOCOLRESSTARTED_W<'a, const O: u8> = + crate::BitWriter<'a, u32, INTENSET_SPEC, AUTOCOLRESSTARTED_AW, O>; +impl<'a, const O: u8> AUTOCOLRESSTARTED_W<'a, O> { + #[doc = "Enable"] + #[inline(always)] + pub fn set(self) -> &'a mut W { + self.variant(AUTOCOLRESSTARTED_AW::SET) + } +} +#[doc = "Field `COLLISION` reader - Write '1' to enable interrupt for event COLLISION"] +pub type COLLISION_R = crate::BitReader; +#[doc = "Write '1' to enable interrupt for event COLLISION\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum COLLISION_A { + #[doc = "0: Read: Disabled"] + DISABLED = 0, + #[doc = "1: Read: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: COLLISION_A) -> Self { + variant as u8 != 0 + } +} +impl COLLISION_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> COLLISION_A { + match self.bits { + false => COLLISION_A::DISABLED, + true => COLLISION_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == COLLISION_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == COLLISION_A::ENABLED + } +} +#[doc = "Write '1' to enable interrupt for event COLLISION\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum COLLISION_AW { + #[doc = "1: Enable"] + SET = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: COLLISION_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `COLLISION` writer - Write '1' to enable interrupt for event COLLISION"] +pub type COLLISION_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENSET_SPEC, COLLISION_AW, O>; +impl<'a, const O: u8> COLLISION_W<'a, O> { + #[doc = "Enable"] + #[inline(always)] + pub fn set(self) -> &'a mut W { + self.variant(COLLISION_AW::SET) + } +} +#[doc = "Field `SELECTED` reader - Write '1' to enable interrupt for event SELECTED"] +pub type SELECTED_R = crate::BitReader; +#[doc = "Write '1' to enable interrupt for event SELECTED\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum SELECTED_A { + #[doc = "0: Read: Disabled"] + DISABLED = 0, + #[doc = "1: Read: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: SELECTED_A) -> Self { + variant as u8 != 0 + } +} +impl SELECTED_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> SELECTED_A { + match self.bits { + false => SELECTED_A::DISABLED, + true => SELECTED_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == SELECTED_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == SELECTED_A::ENABLED + } +} +#[doc = "Write '1' to enable interrupt for event SELECTED\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum SELECTED_AW { + #[doc = "1: Enable"] + SET = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: SELECTED_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `SELECTED` writer - Write '1' to enable interrupt for event SELECTED"] +pub type SELECTED_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENSET_SPEC, SELECTED_AW, O>; +impl<'a, const O: u8> SELECTED_W<'a, O> { + #[doc = "Enable"] + #[inline(always)] + pub fn set(self) -> &'a mut W { + self.variant(SELECTED_AW::SET) + } +} +#[doc = "Field `STARTED` reader - Write '1' to enable interrupt for event STARTED"] +pub type STARTED_R = crate::BitReader; +#[doc = "Write '1' to enable interrupt for event STARTED\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum STARTED_A { + #[doc = "0: Read: Disabled"] + DISABLED = 0, + #[doc = "1: Read: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: STARTED_A) -> Self { + variant as u8 != 0 + } +} +impl STARTED_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> STARTED_A { + match self.bits { + false => STARTED_A::DISABLED, + true => STARTED_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == STARTED_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == STARTED_A::ENABLED + } +} +#[doc = "Write '1' to enable interrupt for event STARTED\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum STARTED_AW { + #[doc = "1: Enable"] + SET = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: STARTED_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `STARTED` writer - Write '1' to enable interrupt for event STARTED"] +pub type STARTED_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENSET_SPEC, STARTED_AW, O>; +impl<'a, const O: u8> STARTED_W<'a, O> { + #[doc = "Enable"] + #[inline(always)] + pub fn set(self) -> &'a mut W { + self.variant(STARTED_AW::SET) + } +} +impl R { + #[doc = "Bit 0 - Write '1' to enable interrupt for event READY"] + #[inline(always)] + pub fn ready(&self) -> READY_R { + READY_R::new((self.bits & 1) != 0) + } + #[doc = "Bit 1 - Write '1' to enable interrupt for event FIELDDETECTED"] + #[inline(always)] + pub fn fielddetected(&self) -> FIELDDETECTED_R { + FIELDDETECTED_R::new(((self.bits >> 1) & 1) != 0) + } + #[doc = "Bit 2 - Write '1' to enable interrupt for event FIELDLOST"] + #[inline(always)] + pub fn fieldlost(&self) -> FIELDLOST_R { + FIELDLOST_R::new(((self.bits >> 2) & 1) != 0) + } + #[doc = "Bit 3 - Write '1' to enable interrupt for event TXFRAMESTART"] + #[inline(always)] + pub fn txframestart(&self) -> TXFRAMESTART_R { + TXFRAMESTART_R::new(((self.bits >> 3) & 1) != 0) + } + #[doc = "Bit 4 - Write '1' to enable interrupt for event TXFRAMEEND"] + #[inline(always)] + pub fn txframeend(&self) -> TXFRAMEEND_R { + TXFRAMEEND_R::new(((self.bits >> 4) & 1) != 0) + } + #[doc = "Bit 5 - Write '1' to enable interrupt for event RXFRAMESTART"] + #[inline(always)] + pub fn rxframestart(&self) -> RXFRAMESTART_R { + RXFRAMESTART_R::new(((self.bits >> 5) & 1) != 0) + } + #[doc = "Bit 6 - Write '1' to enable interrupt for event RXFRAMEEND"] + #[inline(always)] + pub fn rxframeend(&self) -> RXFRAMEEND_R { + RXFRAMEEND_R::new(((self.bits >> 6) & 1) != 0) + } + #[doc = "Bit 7 - Write '1' to enable interrupt for event ERROR"] + #[inline(always)] + pub fn error(&self) -> ERROR_R { + ERROR_R::new(((self.bits >> 7) & 1) != 0) + } + #[doc = "Bit 10 - Write '1' to enable interrupt for event RXERROR"] + #[inline(always)] + pub fn rxerror(&self) -> RXERROR_R { + RXERROR_R::new(((self.bits >> 10) & 1) != 0) + } + #[doc = "Bit 11 - Write '1' to enable interrupt for event ENDRX"] + #[inline(always)] + pub fn endrx(&self) -> ENDRX_R { + ENDRX_R::new(((self.bits >> 11) & 1) != 0) + } + #[doc = "Bit 12 - Write '1' to enable interrupt for event ENDTX"] + #[inline(always)] + pub fn endtx(&self) -> ENDTX_R { + ENDTX_R::new(((self.bits >> 12) & 1) != 0) + } + #[doc = "Bit 14 - Write '1' to enable interrupt for event AUTOCOLRESSTARTED"] + #[inline(always)] + pub fn autocolresstarted(&self) -> AUTOCOLRESSTARTED_R { + AUTOCOLRESSTARTED_R::new(((self.bits >> 14) & 1) != 0) + } + #[doc = "Bit 18 - Write '1' to enable interrupt for event COLLISION"] + #[inline(always)] + pub fn collision(&self) -> COLLISION_R { + COLLISION_R::new(((self.bits >> 18) & 1) != 0) + } + #[doc = "Bit 19 - Write '1' to enable interrupt for event SELECTED"] + #[inline(always)] + pub fn selected(&self) -> SELECTED_R { + SELECTED_R::new(((self.bits >> 19) & 1) != 0) + } + #[doc = "Bit 20 - Write '1' to enable interrupt for event STARTED"] + #[inline(always)] + pub fn started(&self) -> STARTED_R { + STARTED_R::new(((self.bits >> 20) & 1) != 0) + } +} +impl W { + #[doc = "Bit 0 - Write '1' to enable interrupt for event READY"] + #[inline(always)] + #[must_use] + pub fn ready(&mut self) -> READY_W<0> { + READY_W::new(self) + } + #[doc = "Bit 1 - Write '1' to enable interrupt for event FIELDDETECTED"] + #[inline(always)] + #[must_use] + pub fn fielddetected(&mut self) -> FIELDDETECTED_W<1> { + FIELDDETECTED_W::new(self) + } + #[doc = "Bit 2 - Write '1' to enable interrupt for event FIELDLOST"] + #[inline(always)] + #[must_use] + pub fn fieldlost(&mut self) -> FIELDLOST_W<2> { + FIELDLOST_W::new(self) + } + #[doc = "Bit 3 - Write '1' to enable interrupt for event TXFRAMESTART"] + #[inline(always)] + #[must_use] + pub fn txframestart(&mut self) -> TXFRAMESTART_W<3> { + TXFRAMESTART_W::new(self) + } + #[doc = "Bit 4 - Write '1' to enable interrupt for event TXFRAMEEND"] + #[inline(always)] + #[must_use] + pub fn txframeend(&mut self) -> TXFRAMEEND_W<4> { + TXFRAMEEND_W::new(self) + } + #[doc = "Bit 5 - Write '1' to enable interrupt for event RXFRAMESTART"] + #[inline(always)] + #[must_use] + pub fn rxframestart(&mut self) -> RXFRAMESTART_W<5> { + RXFRAMESTART_W::new(self) + } + #[doc = "Bit 6 - Write '1' to enable interrupt for event RXFRAMEEND"] + #[inline(always)] + #[must_use] + pub fn rxframeend(&mut self) -> RXFRAMEEND_W<6> { + RXFRAMEEND_W::new(self) + } + #[doc = "Bit 7 - Write '1' to enable interrupt for event ERROR"] + #[inline(always)] + #[must_use] + pub fn error(&mut self) -> ERROR_W<7> { + ERROR_W::new(self) + } + #[doc = "Bit 10 - Write '1' to enable interrupt for event RXERROR"] + #[inline(always)] + #[must_use] + pub fn rxerror(&mut self) -> RXERROR_W<10> { + RXERROR_W::new(self) + } + #[doc = "Bit 11 - Write '1' to enable interrupt for event ENDRX"] + #[inline(always)] + #[must_use] + pub fn endrx(&mut self) -> ENDRX_W<11> { + ENDRX_W::new(self) + } + #[doc = "Bit 12 - Write '1' to enable interrupt for event ENDTX"] + #[inline(always)] + #[must_use] + pub fn endtx(&mut self) -> ENDTX_W<12> { + ENDTX_W::new(self) + } + #[doc = "Bit 14 - Write '1' to enable interrupt for event AUTOCOLRESSTARTED"] + #[inline(always)] + #[must_use] + pub fn autocolresstarted(&mut self) -> AUTOCOLRESSTARTED_W<14> { + AUTOCOLRESSTARTED_W::new(self) + } + #[doc = "Bit 18 - Write '1' to enable interrupt for event COLLISION"] + #[inline(always)] + #[must_use] + pub fn collision(&mut self) -> COLLISION_W<18> { + COLLISION_W::new(self) + } + #[doc = "Bit 19 - Write '1' to enable interrupt for event SELECTED"] + #[inline(always)] + #[must_use] + pub fn selected(&mut self) -> SELECTED_W<19> { + SELECTED_W::new(self) + } + #[doc = "Bit 20 - Write '1' to enable interrupt for event STARTED"] + #[inline(always)] + #[must_use] + pub fn started(&mut self) -> STARTED_W<20> { + STARTED_W::new(self) + } + #[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 = "Enable interrupt\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 [intenset](index.html) module"] +pub struct INTENSET_SPEC; +impl crate::RegisterSpec for INTENSET_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [intenset::R](R) reader structure"] +impl crate::Readable for INTENSET_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [intenset::W](W) writer structure"] +impl crate::Writable for INTENSET_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets INTENSET to value 0"] +impl crate::Resettable for INTENSET_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/nfct/maxlen.rs b/down-the-stack/dk_pac/src/nfct/maxlen.rs new file mode 100644 index 0000000..1f624de --- /dev/null +++ b/down-the-stack/dk_pac/src/nfct/maxlen.rs @@ -0,0 +1,80 @@ +#[doc = "Register `MAXLEN` 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 `MAXLEN` 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 `MAXLEN` reader - Size of allocated for TXD and RXD data storage buffer in Data RAM"] +pub type MAXLEN_R = crate::FieldReader; +#[doc = "Field `MAXLEN` writer - Size of allocated for TXD and RXD data storage buffer in Data RAM"] +pub type MAXLEN_W<'a, const O: u8> = crate::FieldWriter<'a, u32, MAXLEN_SPEC, u16, u16, 9, O>; +impl R { + #[doc = "Bits 0:8 - Size of allocated for TXD and RXD data storage buffer in Data RAM"] + #[inline(always)] + pub fn maxlen(&self) -> MAXLEN_R { + MAXLEN_R::new((self.bits & 0x01ff) as u16) + } +} +impl W { + #[doc = "Bits 0:8 - Size of allocated for TXD and RXD data storage buffer in Data RAM"] + #[inline(always)] + #[must_use] + pub fn maxlen(&mut self) -> MAXLEN_W<0> { + MAXLEN_W::new(self) + } + #[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 = "Size of allocated for TXD and RXD data storage buffer in Data RAM\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 [maxlen](index.html) module"] +pub struct MAXLEN_SPEC; +impl crate::RegisterSpec for MAXLEN_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [maxlen::R](R) reader structure"] +impl crate::Readable for MAXLEN_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [maxlen::W](W) writer structure"] +impl crate::Writable for MAXLEN_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets MAXLEN to value 0"] +impl crate::Resettable for MAXLEN_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/nfct/nfcid1_2nd_last.rs b/down-the-stack/dk_pac/src/nfct/nfcid1_2nd_last.rs new file mode 100644 index 0000000..44d5fb4 --- /dev/null +++ b/down-the-stack/dk_pac/src/nfct/nfcid1_2nd_last.rs @@ -0,0 +1,113 @@ +#[doc = "Register `NFCID1_2ND_LAST` 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 `NFCID1_2ND_LAST` 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 `NFCID1_V` reader - NFCID1 byte V"] +pub type NFCID1_V_R = crate::FieldReader; +#[doc = "Field `NFCID1_V` writer - NFCID1 byte V"] +pub type NFCID1_V_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, NFCID1_2ND_LAST_SPEC, u8, u8, 8, O>; +#[doc = "Field `NFCID1_U` reader - NFCID1 byte U"] +pub type NFCID1_U_R = crate::FieldReader; +#[doc = "Field `NFCID1_U` writer - NFCID1 byte U"] +pub type NFCID1_U_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, NFCID1_2ND_LAST_SPEC, u8, u8, 8, O>; +#[doc = "Field `NFCID1_T` reader - NFCID1 byte T"] +pub type NFCID1_T_R = crate::FieldReader; +#[doc = "Field `NFCID1_T` writer - NFCID1 byte T"] +pub type NFCID1_T_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, NFCID1_2ND_LAST_SPEC, u8, u8, 8, O>; +impl R { + #[doc = "Bits 0:7 - NFCID1 byte V"] + #[inline(always)] + pub fn nfcid1_v(&self) -> NFCID1_V_R { + NFCID1_V_R::new((self.bits & 0xff) as u8) + } + #[doc = "Bits 8:15 - NFCID1 byte U"] + #[inline(always)] + pub fn nfcid1_u(&self) -> NFCID1_U_R { + NFCID1_U_R::new(((self.bits >> 8) & 0xff) as u8) + } + #[doc = "Bits 16:23 - NFCID1 byte T"] + #[inline(always)] + pub fn nfcid1_t(&self) -> NFCID1_T_R { + NFCID1_T_R::new(((self.bits >> 16) & 0xff) as u8) + } +} +impl W { + #[doc = "Bits 0:7 - NFCID1 byte V"] + #[inline(always)] + #[must_use] + pub fn nfcid1_v(&mut self) -> NFCID1_V_W<0> { + NFCID1_V_W::new(self) + } + #[doc = "Bits 8:15 - NFCID1 byte U"] + #[inline(always)] + #[must_use] + pub fn nfcid1_u(&mut self) -> NFCID1_U_W<8> { + NFCID1_U_W::new(self) + } + #[doc = "Bits 16:23 - NFCID1 byte T"] + #[inline(always)] + #[must_use] + pub fn nfcid1_t(&mut self) -> NFCID1_T_W<16> { + NFCID1_T_W::new(self) + } + #[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 = "Second last NFCID1 part (7 or 10 bytes ID)\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 [nfcid1_2nd_last](index.html) module"] +pub struct NFCID1_2ND_LAST_SPEC; +impl crate::RegisterSpec for NFCID1_2ND_LAST_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [nfcid1_2nd_last::R](R) reader structure"] +impl crate::Readable for NFCID1_2ND_LAST_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [nfcid1_2nd_last::W](W) writer structure"] +impl crate::Writable for NFCID1_2ND_LAST_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets NFCID1_2ND_LAST to value 0"] +impl crate::Resettable for NFCID1_2ND_LAST_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/nfct/nfcid1_3rd_last.rs b/down-the-stack/dk_pac/src/nfct/nfcid1_3rd_last.rs new file mode 100644 index 0000000..5230296 --- /dev/null +++ b/down-the-stack/dk_pac/src/nfct/nfcid1_3rd_last.rs @@ -0,0 +1,113 @@ +#[doc = "Register `NFCID1_3RD_LAST` 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 `NFCID1_3RD_LAST` 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 `NFCID1_S` reader - NFCID1 byte S"] +pub type NFCID1_S_R = crate::FieldReader; +#[doc = "Field `NFCID1_S` writer - NFCID1 byte S"] +pub type NFCID1_S_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, NFCID1_3RD_LAST_SPEC, u8, u8, 8, O>; +#[doc = "Field `NFCID1_R` reader - NFCID1 byte R"] +pub type NFCID1_R_R = crate::FieldReader; +#[doc = "Field `NFCID1_R` writer - NFCID1 byte R"] +pub type NFCID1_R_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, NFCID1_3RD_LAST_SPEC, u8, u8, 8, O>; +#[doc = "Field `NFCID1_Q` reader - NFCID1 byte Q"] +pub type NFCID1_Q_R = crate::FieldReader; +#[doc = "Field `NFCID1_Q` writer - NFCID1 byte Q"] +pub type NFCID1_Q_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, NFCID1_3RD_LAST_SPEC, u8, u8, 8, O>; +impl R { + #[doc = "Bits 0:7 - NFCID1 byte S"] + #[inline(always)] + pub fn nfcid1_s(&self) -> NFCID1_S_R { + NFCID1_S_R::new((self.bits & 0xff) as u8) + } + #[doc = "Bits 8:15 - NFCID1 byte R"] + #[inline(always)] + pub fn nfcid1_r(&self) -> NFCID1_R_R { + NFCID1_R_R::new(((self.bits >> 8) & 0xff) as u8) + } + #[doc = "Bits 16:23 - NFCID1 byte Q"] + #[inline(always)] + pub fn nfcid1_q(&self) -> NFCID1_Q_R { + NFCID1_Q_R::new(((self.bits >> 16) & 0xff) as u8) + } +} +impl W { + #[doc = "Bits 0:7 - NFCID1 byte S"] + #[inline(always)] + #[must_use] + pub fn nfcid1_s(&mut self) -> NFCID1_S_W<0> { + NFCID1_S_W::new(self) + } + #[doc = "Bits 8:15 - NFCID1 byte R"] + #[inline(always)] + #[must_use] + pub fn nfcid1_r(&mut self) -> NFCID1_R_W<8> { + NFCID1_R_W::new(self) + } + #[doc = "Bits 16:23 - NFCID1 byte Q"] + #[inline(always)] + #[must_use] + pub fn nfcid1_q(&mut self) -> NFCID1_Q_W<16> { + NFCID1_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 + } +} +#[doc = "Third last NFCID1 part (10 bytes ID)\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 [nfcid1_3rd_last](index.html) module"] +pub struct NFCID1_3RD_LAST_SPEC; +impl crate::RegisterSpec for NFCID1_3RD_LAST_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [nfcid1_3rd_last::R](R) reader structure"] +impl crate::Readable for NFCID1_3RD_LAST_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [nfcid1_3rd_last::W](W) writer structure"] +impl crate::Writable for NFCID1_3RD_LAST_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets NFCID1_3RD_LAST to value 0"] +impl crate::Resettable for NFCID1_3RD_LAST_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/nfct/nfcid1_last.rs b/down-the-stack/dk_pac/src/nfct/nfcid1_last.rs new file mode 100644 index 0000000..303fd7a --- /dev/null +++ b/down-the-stack/dk_pac/src/nfct/nfcid1_last.rs @@ -0,0 +1,125 @@ +#[doc = "Register `NFCID1_LAST` 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 `NFCID1_LAST` 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 `NFCID1_Z` reader - NFCID1 byte Z (very last byte sent)"] +pub type NFCID1_Z_R = crate::FieldReader; +#[doc = "Field `NFCID1_Z` writer - NFCID1 byte Z (very last byte sent)"] +pub type NFCID1_Z_W<'a, const O: u8> = crate::FieldWriter<'a, u32, NFCID1_LAST_SPEC, u8, u8, 8, O>; +#[doc = "Field `NFCID1_Y` reader - NFCID1 byte Y"] +pub type NFCID1_Y_R = crate::FieldReader; +#[doc = "Field `NFCID1_Y` writer - NFCID1 byte Y"] +pub type NFCID1_Y_W<'a, const O: u8> = crate::FieldWriter<'a, u32, NFCID1_LAST_SPEC, u8, u8, 8, O>; +#[doc = "Field `NFCID1_X` reader - NFCID1 byte X"] +pub type NFCID1_X_R = crate::FieldReader; +#[doc = "Field `NFCID1_X` writer - NFCID1 byte X"] +pub type NFCID1_X_W<'a, const O: u8> = crate::FieldWriter<'a, u32, NFCID1_LAST_SPEC, u8, u8, 8, O>; +#[doc = "Field `NFCID1_W` reader - NFCID1 byte W"] +pub type NFCID1_W_R = crate::FieldReader; +#[doc = "Field `NFCID1_W` writer - NFCID1 byte W"] +pub type NFCID1_W_W<'a, const O: u8> = crate::FieldWriter<'a, u32, NFCID1_LAST_SPEC, u8, u8, 8, O>; +impl R { + #[doc = "Bits 0:7 - NFCID1 byte Z (very last byte sent)"] + #[inline(always)] + pub fn nfcid1_z(&self) -> NFCID1_Z_R { + NFCID1_Z_R::new((self.bits & 0xff) as u8) + } + #[doc = "Bits 8:15 - NFCID1 byte Y"] + #[inline(always)] + pub fn nfcid1_y(&self) -> NFCID1_Y_R { + NFCID1_Y_R::new(((self.bits >> 8) & 0xff) as u8) + } + #[doc = "Bits 16:23 - NFCID1 byte X"] + #[inline(always)] + pub fn nfcid1_x(&self) -> NFCID1_X_R { + NFCID1_X_R::new(((self.bits >> 16) & 0xff) as u8) + } + #[doc = "Bits 24:31 - NFCID1 byte W"] + #[inline(always)] + pub fn nfcid1_w(&self) -> NFCID1_W_R { + NFCID1_W_R::new(((self.bits >> 24) & 0xff) as u8) + } +} +impl W { + #[doc = "Bits 0:7 - NFCID1 byte Z (very last byte sent)"] + #[inline(always)] + #[must_use] + pub fn nfcid1_z(&mut self) -> NFCID1_Z_W<0> { + NFCID1_Z_W::new(self) + } + #[doc = "Bits 8:15 - NFCID1 byte Y"] + #[inline(always)] + #[must_use] + pub fn nfcid1_y(&mut self) -> NFCID1_Y_W<8> { + NFCID1_Y_W::new(self) + } + #[doc = "Bits 16:23 - NFCID1 byte X"] + #[inline(always)] + #[must_use] + pub fn nfcid1_x(&mut self) -> NFCID1_X_W<16> { + NFCID1_X_W::new(self) + } + #[doc = "Bits 24:31 - NFCID1 byte W"] + #[inline(always)] + #[must_use] + pub fn nfcid1_w(&mut self) -> NFCID1_W_W<24> { + NFCID1_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 + } +} +#[doc = "Last NFCID1 part (4, 7 or 10 bytes ID)\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 [nfcid1_last](index.html) module"] +pub struct NFCID1_LAST_SPEC; +impl crate::RegisterSpec for NFCID1_LAST_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [nfcid1_last::R](R) reader structure"] +impl crate::Readable for NFCID1_LAST_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [nfcid1_last::W](W) writer structure"] +impl crate::Writable for NFCID1_LAST_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets NFCID1_LAST to value 0x6363"] +impl crate::Resettable for NFCID1_LAST_SPEC { + const RESET_VALUE: Self::Ux = 0x6363; +} diff --git a/down-the-stack/dk_pac/src/nfct/packetptr.rs b/down-the-stack/dk_pac/src/nfct/packetptr.rs new file mode 100644 index 0000000..320087a --- /dev/null +++ b/down-the-stack/dk_pac/src/nfct/packetptr.rs @@ -0,0 +1,80 @@ +#[doc = "Register `PACKETPTR` 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 `PACKETPTR` 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 `PTR` reader - Packet pointer for TXD and RXD data storage in Data RAM. This address is a byte aligned RAM address."] +pub type PTR_R = crate::FieldReader; +#[doc = "Field `PTR` writer - Packet pointer for TXD and RXD data storage in Data RAM. This address is a byte aligned RAM address."] +pub type PTR_W<'a, const O: u8> = crate::FieldWriter<'a, u32, PACKETPTR_SPEC, u32, u32, 32, O>; +impl R { + #[doc = "Bits 0:31 - Packet pointer for TXD and RXD data storage in Data RAM. This address is a byte aligned RAM address."] + #[inline(always)] + pub fn ptr(&self) -> PTR_R { + PTR_R::new(self.bits) + } +} +impl W { + #[doc = "Bits 0:31 - Packet pointer for TXD and RXD data storage in Data RAM. This address is a byte aligned RAM address."] + #[inline(always)] + #[must_use] + pub fn ptr(&mut self) -> PTR_W<0> { + PTR_W::new(self) + } + #[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 = "Packet pointer for TXD and RXD data storage in Data RAM\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 [packetptr](index.html) module"] +pub struct PACKETPTR_SPEC; +impl crate::RegisterSpec for PACKETPTR_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [packetptr::R](R) reader structure"] +impl crate::Readable for PACKETPTR_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [packetptr::W](W) writer structure"] +impl crate::Writable for PACKETPTR_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets PACKETPTR to value 0"] +impl crate::Resettable for PACKETPTR_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/nfct/rxd.rs b/down-the-stack/dk_pac/src/nfct/rxd.rs new file mode 100644 index 0000000..3154e82 --- /dev/null +++ b/down-the-stack/dk_pac/src/nfct/rxd.rs @@ -0,0 +1,16 @@ +#[doc = r"Register block"] +#[repr(C)] +pub struct RXD { + #[doc = "0x00 - Configuration of incoming frames"] + pub frameconfig: FRAMECONFIG, + #[doc = "0x04 - Size of last incoming frame"] + pub amount: AMOUNT, +} +#[doc = "FRAMECONFIG (rw) register accessor: an alias for `Reg`"] +pub type FRAMECONFIG = crate::Reg; +#[doc = "Configuration of incoming frames"] +pub mod frameconfig; +#[doc = "AMOUNT (r) register accessor: an alias for `Reg`"] +pub type AMOUNT = crate::Reg; +#[doc = "Size of last incoming frame"] +pub mod amount; diff --git a/down-the-stack/dk_pac/src/nfct/rxd/amount.rs b/down-the-stack/dk_pac/src/nfct/rxd/amount.rs new file mode 100644 index 0000000..613b1cf --- /dev/null +++ b/down-the-stack/dk_pac/src/nfct/rxd/amount.rs @@ -0,0 +1,44 @@ +#[doc = "Register `AMOUNT` 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 = "Field `RXDATABITS` reader - Number of bits in the last byte in the frame, if less than 8 (including CRC, but excluding parity and SoF/EoF framing)."] +pub type RXDATABITS_R = crate::FieldReader; +#[doc = "Field `RXDATABYTES` reader - Number of complete bytes received in the frame (including CRC, but excluding parity and SoF/EoF framing)"] +pub type RXDATABYTES_R = crate::FieldReader; +impl R { + #[doc = "Bits 0:2 - Number of bits in the last byte in the frame, if less than 8 (including CRC, but excluding parity and SoF/EoF framing)."] + #[inline(always)] + pub fn rxdatabits(&self) -> RXDATABITS_R { + RXDATABITS_R::new((self.bits & 7) as u8) + } + #[doc = "Bits 3:11 - Number of complete bytes received in the frame (including CRC, but excluding parity and SoF/EoF framing)"] + #[inline(always)] + pub fn rxdatabytes(&self) -> RXDATABYTES_R { + RXDATABYTES_R::new(((self.bits >> 3) & 0x01ff) as u16) + } +} +#[doc = "Size of last incoming frame\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 [amount](index.html) module"] +pub struct AMOUNT_SPEC; +impl crate::RegisterSpec for AMOUNT_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [amount::R](R) reader structure"] +impl crate::Readable for AMOUNT_SPEC { + type Reader = R; +} +#[doc = "`reset()` method sets AMOUNT to value 0"] +impl crate::Resettable for AMOUNT_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/nfct/rxd/frameconfig.rs b/down-the-stack/dk_pac/src/nfct/rxd/frameconfig.rs new file mode 100644 index 0000000..3f7ad2c --- /dev/null +++ b/down-the-stack/dk_pac/src/nfct/rxd/frameconfig.rs @@ -0,0 +1,248 @@ +#[doc = "Register `FRAMECONFIG` 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 `FRAMECONFIG` 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 `PARITY` reader - Parity expected or not in RX frame"] +pub type PARITY_R = crate::BitReader; +#[doc = "Parity expected or not in RX frame\n\nValue on reset: 1"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PARITY_A { + #[doc = "0: Parity is not expected in RX frames"] + NO_PARITY = 0, + #[doc = "1: Parity is expected in RX frames"] + PARITY = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PARITY_A) -> Self { + variant as u8 != 0 + } +} +impl PARITY_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> PARITY_A { + match self.bits { + false => PARITY_A::NO_PARITY, + true => PARITY_A::PARITY, + } + } + #[doc = "Checks if the value of the field is `NO_PARITY`"] + #[inline(always)] + pub fn is_no_parity(&self) -> bool { + *self == PARITY_A::NO_PARITY + } + #[doc = "Checks if the value of the field is `PARITY`"] + #[inline(always)] + pub fn is_parity(&self) -> bool { + *self == PARITY_A::PARITY + } +} +#[doc = "Field `PARITY` writer - Parity expected or not in RX frame"] +pub type PARITY_W<'a, const O: u8> = crate::BitWriter<'a, u32, FRAMECONFIG_SPEC, PARITY_A, O>; +impl<'a, const O: u8> PARITY_W<'a, O> { + #[doc = "Parity is not expected in RX frames"] + #[inline(always)] + pub fn no_parity(self) -> &'a mut W { + self.variant(PARITY_A::NO_PARITY) + } + #[doc = "Parity is expected in RX frames"] + #[inline(always)] + pub fn parity(self) -> &'a mut W { + self.variant(PARITY_A::PARITY) + } +} +#[doc = "Field `SOF` reader - SoF expected or not in RX frames"] +pub type SOF_R = crate::BitReader; +#[doc = "SoF expected or not in RX frames\n\nValue on reset: 1"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum SOF_A { + #[doc = "0: Start of Frame symbol is not expected in RX frames"] + NO_SO_F = 0, + #[doc = "1: Start of Frame symbol is expected in RX frames"] + SO_F = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: SOF_A) -> Self { + variant as u8 != 0 + } +} +impl SOF_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> SOF_A { + match self.bits { + false => SOF_A::NO_SO_F, + true => SOF_A::SO_F, + } + } + #[doc = "Checks if the value of the field is `NO_SO_F`"] + #[inline(always)] + pub fn is_no_so_f(&self) -> bool { + *self == SOF_A::NO_SO_F + } + #[doc = "Checks if the value of the field is `SO_F`"] + #[inline(always)] + pub fn is_so_f(&self) -> bool { + *self == SOF_A::SO_F + } +} +#[doc = "Field `SOF` writer - SoF expected or not in RX frames"] +pub type SOF_W<'a, const O: u8> = crate::BitWriter<'a, u32, FRAMECONFIG_SPEC, SOF_A, O>; +impl<'a, const O: u8> SOF_W<'a, O> { + #[doc = "Start of Frame symbol is not expected in RX frames"] + #[inline(always)] + pub fn no_so_f(self) -> &'a mut W { + self.variant(SOF_A::NO_SO_F) + } + #[doc = "Start of Frame symbol is expected in RX frames"] + #[inline(always)] + pub fn so_f(self) -> &'a mut W { + self.variant(SOF_A::SO_F) + } +} +#[doc = "Field `CRCMODERX` reader - CRC mode for incoming frames"] +pub type CRCMODERX_R = crate::BitReader; +#[doc = "CRC mode for incoming frames\n\nValue on reset: 1"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum CRCMODERX_A { + #[doc = "0: CRC is not expected in RX frames"] + NO_CRCRX = 0, + #[doc = "1: Last 16 bits in RX frame is CRC, CRC is checked and CRCSTATUS updated"] + CRC16RX = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: CRCMODERX_A) -> Self { + variant as u8 != 0 + } +} +impl CRCMODERX_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> CRCMODERX_A { + match self.bits { + false => CRCMODERX_A::NO_CRCRX, + true => CRCMODERX_A::CRC16RX, + } + } + #[doc = "Checks if the value of the field is `NO_CRCRX`"] + #[inline(always)] + pub fn is_no_crcrx(&self) -> bool { + *self == CRCMODERX_A::NO_CRCRX + } + #[doc = "Checks if the value of the field is `CRC16RX`"] + #[inline(always)] + pub fn is_crc16rx(&self) -> bool { + *self == CRCMODERX_A::CRC16RX + } +} +#[doc = "Field `CRCMODERX` writer - CRC mode for incoming frames"] +pub type CRCMODERX_W<'a, const O: u8> = crate::BitWriter<'a, u32, FRAMECONFIG_SPEC, CRCMODERX_A, O>; +impl<'a, const O: u8> CRCMODERX_W<'a, O> { + #[doc = "CRC is not expected in RX frames"] + #[inline(always)] + pub fn no_crcrx(self) -> &'a mut W { + self.variant(CRCMODERX_A::NO_CRCRX) + } + #[doc = "Last 16 bits in RX frame is CRC, CRC is checked and CRCSTATUS updated"] + #[inline(always)] + pub fn crc16rx(self) -> &'a mut W { + self.variant(CRCMODERX_A::CRC16RX) + } +} +impl R { + #[doc = "Bit 0 - Parity expected or not in RX frame"] + #[inline(always)] + pub fn parity(&self) -> PARITY_R { + PARITY_R::new((self.bits & 1) != 0) + } + #[doc = "Bit 2 - SoF expected or not in RX frames"] + #[inline(always)] + pub fn sof(&self) -> SOF_R { + SOF_R::new(((self.bits >> 2) & 1) != 0) + } + #[doc = "Bit 4 - CRC mode for incoming frames"] + #[inline(always)] + pub fn crcmoderx(&self) -> CRCMODERX_R { + CRCMODERX_R::new(((self.bits >> 4) & 1) != 0) + } +} +impl W { + #[doc = "Bit 0 - Parity expected or not in RX frame"] + #[inline(always)] + #[must_use] + pub fn parity(&mut self) -> PARITY_W<0> { + PARITY_W::new(self) + } + #[doc = "Bit 2 - SoF expected or not in RX frames"] + #[inline(always)] + #[must_use] + pub fn sof(&mut self) -> SOF_W<2> { + SOF_W::new(self) + } + #[doc = "Bit 4 - CRC mode for incoming frames"] + #[inline(always)] + #[must_use] + pub fn crcmoderx(&mut self) -> CRCMODERX_W<4> { + CRCMODERX_W::new(self) + } + #[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 = "Configuration of incoming frames\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 [frameconfig](index.html) module"] +pub struct FRAMECONFIG_SPEC; +impl crate::RegisterSpec for FRAMECONFIG_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [frameconfig::R](R) reader structure"] +impl crate::Readable for FRAMECONFIG_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [frameconfig::W](W) writer structure"] +impl crate::Writable for FRAMECONFIG_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets FRAMECONFIG to value 0x15"] +impl crate::Resettable for FRAMECONFIG_SPEC { + const RESET_VALUE: Self::Ux = 0x15; +} diff --git a/down-the-stack/dk_pac/src/nfct/selres.rs b/down-the-stack/dk_pac/src/nfct/selres.rs new file mode 100644 index 0000000..8a139d5 --- /dev/null +++ b/down-the-stack/dk_pac/src/nfct/selres.rs @@ -0,0 +1,186 @@ +#[doc = "Register `SELRES` 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 `SELRES` 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 `RFU10` reader - Reserved for future use. Shall be 0."] +pub type RFU10_R = crate::FieldReader; +#[doc = "Field `RFU10` writer - Reserved for future use. Shall be 0."] +pub type RFU10_W<'a, const O: u8> = crate::FieldWriter<'a, u32, SELRES_SPEC, u8, u8, 2, O>; +#[doc = "Field `CASCADE` reader - Cascade bit (controlled by hardware, write has no effect)"] +pub type CASCADE_R = crate::BitReader; +#[doc = "Cascade bit (controlled by hardware, write has no effect)\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum CASCADE_A { + #[doc = "0: NFCID1 complete"] + COMPLETE = 0, + #[doc = "1: NFCID1 not complete"] + NOT_COMPLETE = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: CASCADE_A) -> Self { + variant as u8 != 0 + } +} +impl CASCADE_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> CASCADE_A { + match self.bits { + false => CASCADE_A::COMPLETE, + true => CASCADE_A::NOT_COMPLETE, + } + } + #[doc = "Checks if the value of the field is `COMPLETE`"] + #[inline(always)] + pub fn is_complete(&self) -> bool { + *self == CASCADE_A::COMPLETE + } + #[doc = "Checks if the value of the field is `NOT_COMPLETE`"] + #[inline(always)] + pub fn is_not_complete(&self) -> bool { + *self == CASCADE_A::NOT_COMPLETE + } +} +#[doc = "Field `CASCADE` writer - Cascade bit (controlled by hardware, write has no effect)"] +pub type CASCADE_W<'a, const O: u8> = crate::BitWriter<'a, u32, SELRES_SPEC, CASCADE_A, O>; +impl<'a, const O: u8> CASCADE_W<'a, O> { + #[doc = "NFCID1 complete"] + #[inline(always)] + pub fn complete(self) -> &'a mut W { + self.variant(CASCADE_A::COMPLETE) + } + #[doc = "NFCID1 not complete"] + #[inline(always)] + pub fn not_complete(self) -> &'a mut W { + self.variant(CASCADE_A::NOT_COMPLETE) + } +} +#[doc = "Field `RFU43` reader - Reserved for future use. Shall be 0."] +pub type RFU43_R = crate::FieldReader; +#[doc = "Field `RFU43` writer - Reserved for future use. Shall be 0."] +pub type RFU43_W<'a, const O: u8> = crate::FieldWriter<'a, u32, SELRES_SPEC, u8, u8, 2, O>; +#[doc = "Field `PROTOCOL` reader - Protocol as defined by the b7:b6 of SEL_RES response in the NFC Forum, NFC Digital Protocol Technical Specification"] +pub type PROTOCOL_R = crate::FieldReader; +#[doc = "Field `PROTOCOL` writer - Protocol as defined by the b7:b6 of SEL_RES response in the NFC Forum, NFC Digital Protocol Technical Specification"] +pub type PROTOCOL_W<'a, const O: u8> = crate::FieldWriter<'a, u32, SELRES_SPEC, u8, u8, 2, O>; +#[doc = "Field `RFU7` reader - Reserved for future use. Shall be 0."] +pub type RFU7_R = crate::BitReader; +#[doc = "Field `RFU7` writer - Reserved for future use. Shall be 0."] +pub type RFU7_W<'a, const O: u8> = crate::BitWriter<'a, u32, SELRES_SPEC, bool, O>; +impl R { + #[doc = "Bits 0:1 - Reserved for future use. Shall be 0."] + #[inline(always)] + pub fn rfu10(&self) -> RFU10_R { + RFU10_R::new((self.bits & 3) as u8) + } + #[doc = "Bit 2 - Cascade bit (controlled by hardware, write has no effect)"] + #[inline(always)] + pub fn cascade(&self) -> CASCADE_R { + CASCADE_R::new(((self.bits >> 2) & 1) != 0) + } + #[doc = "Bits 3:4 - Reserved for future use. Shall be 0."] + #[inline(always)] + pub fn rfu43(&self) -> RFU43_R { + RFU43_R::new(((self.bits >> 3) & 3) as u8) + } + #[doc = "Bits 5:6 - Protocol as defined by the b7:b6 of SEL_RES response in the NFC Forum, NFC Digital Protocol Technical Specification"] + #[inline(always)] + pub fn protocol(&self) -> PROTOCOL_R { + PROTOCOL_R::new(((self.bits >> 5) & 3) as u8) + } + #[doc = "Bit 7 - Reserved for future use. Shall be 0."] + #[inline(always)] + pub fn rfu7(&self) -> RFU7_R { + RFU7_R::new(((self.bits >> 7) & 1) != 0) + } +} +impl W { + #[doc = "Bits 0:1 - Reserved for future use. Shall be 0."] + #[inline(always)] + #[must_use] + pub fn rfu10(&mut self) -> RFU10_W<0> { + RFU10_W::new(self) + } + #[doc = "Bit 2 - Cascade bit (controlled by hardware, write has no effect)"] + #[inline(always)] + #[must_use] + pub fn cascade(&mut self) -> CASCADE_W<2> { + CASCADE_W::new(self) + } + #[doc = "Bits 3:4 - Reserved for future use. Shall be 0."] + #[inline(always)] + #[must_use] + pub fn rfu43(&mut self) -> RFU43_W<3> { + RFU43_W::new(self) + } + #[doc = "Bits 5:6 - Protocol as defined by the b7:b6 of SEL_RES response in the NFC Forum, NFC Digital Protocol Technical Specification"] + #[inline(always)] + #[must_use] + pub fn protocol(&mut self) -> PROTOCOL_W<5> { + PROTOCOL_W::new(self) + } + #[doc = "Bit 7 - Reserved for future use. Shall be 0."] + #[inline(always)] + #[must_use] + pub fn rfu7(&mut self) -> RFU7_W<7> { + RFU7_W::new(self) + } + #[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 = "NFC-A SEL_RES auto-response settings\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 [selres](index.html) module"] +pub struct SELRES_SPEC; +impl crate::RegisterSpec for SELRES_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [selres::R](R) reader structure"] +impl crate::Readable for SELRES_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [selres::W](W) writer structure"] +impl crate::Writable for SELRES_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets SELRES to value 0"] +impl crate::Resettable for SELRES_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/nfct/sensres.rs b/down-the-stack/dk_pac/src/nfct/sensres.rs new file mode 100644 index 0000000..202470a --- /dev/null +++ b/down-the-stack/dk_pac/src/nfct/sensres.rs @@ -0,0 +1,303 @@ +#[doc = "Register `SENSRES` 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 `SENSRES` 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 `BITFRAMESDD` reader - Bit frame SDD as defined by the b5:b1 of byte 1 in SENS_RES response in the NFC Forum, NFC Digital Protocol Technical Specification"] +pub type BITFRAMESDD_R = crate::FieldReader; +#[doc = "Bit frame SDD as defined by the b5:b1 of byte 1 in SENS_RES response in the NFC Forum, NFC Digital Protocol Technical Specification\n\nValue on reset: 1"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +#[repr(u8)] +pub enum BITFRAMESDD_A { + #[doc = "0: SDD pattern 00000"] + SDD00000 = 0, + #[doc = "1: SDD pattern 00001"] + SDD00001 = 1, + #[doc = "2: SDD pattern 00010"] + SDD00010 = 2, + #[doc = "4: SDD pattern 00100"] + SDD00100 = 4, + #[doc = "8: SDD pattern 01000"] + SDD01000 = 8, + #[doc = "16: SDD pattern 10000"] + SDD10000 = 16, +} +impl From for u8 { + #[inline(always)] + fn from(variant: BITFRAMESDD_A) -> Self { + variant as _ + } +} +impl BITFRAMESDD_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> Option { + match self.bits { + 0 => Some(BITFRAMESDD_A::SDD00000), + 1 => Some(BITFRAMESDD_A::SDD00001), + 2 => Some(BITFRAMESDD_A::SDD00010), + 4 => Some(BITFRAMESDD_A::SDD00100), + 8 => Some(BITFRAMESDD_A::SDD01000), + 16 => Some(BITFRAMESDD_A::SDD10000), + _ => None, + } + } + #[doc = "Checks if the value of the field is `SDD00000`"] + #[inline(always)] + pub fn is_sdd00000(&self) -> bool { + *self == BITFRAMESDD_A::SDD00000 + } + #[doc = "Checks if the value of the field is `SDD00001`"] + #[inline(always)] + pub fn is_sdd00001(&self) -> bool { + *self == BITFRAMESDD_A::SDD00001 + } + #[doc = "Checks if the value of the field is `SDD00010`"] + #[inline(always)] + pub fn is_sdd00010(&self) -> bool { + *self == BITFRAMESDD_A::SDD00010 + } + #[doc = "Checks if the value of the field is `SDD00100`"] + #[inline(always)] + pub fn is_sdd00100(&self) -> bool { + *self == BITFRAMESDD_A::SDD00100 + } + #[doc = "Checks if the value of the field is `SDD01000`"] + #[inline(always)] + pub fn is_sdd01000(&self) -> bool { + *self == BITFRAMESDD_A::SDD01000 + } + #[doc = "Checks if the value of the field is `SDD10000`"] + #[inline(always)] + pub fn is_sdd10000(&self) -> bool { + *self == BITFRAMESDD_A::SDD10000 + } +} +#[doc = "Field `BITFRAMESDD` writer - Bit frame SDD as defined by the b5:b1 of byte 1 in SENS_RES response in the NFC Forum, NFC Digital Protocol Technical Specification"] +pub type BITFRAMESDD_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, SENSRES_SPEC, u8, BITFRAMESDD_A, 5, O>; +impl<'a, const O: u8> BITFRAMESDD_W<'a, O> { + #[doc = "SDD pattern 00000"] + #[inline(always)] + pub fn sdd00000(self) -> &'a mut W { + self.variant(BITFRAMESDD_A::SDD00000) + } + #[doc = "SDD pattern 00001"] + #[inline(always)] + pub fn sdd00001(self) -> &'a mut W { + self.variant(BITFRAMESDD_A::SDD00001) + } + #[doc = "SDD pattern 00010"] + #[inline(always)] + pub fn sdd00010(self) -> &'a mut W { + self.variant(BITFRAMESDD_A::SDD00010) + } + #[doc = "SDD pattern 00100"] + #[inline(always)] + pub fn sdd00100(self) -> &'a mut W { + self.variant(BITFRAMESDD_A::SDD00100) + } + #[doc = "SDD pattern 01000"] + #[inline(always)] + pub fn sdd01000(self) -> &'a mut W { + self.variant(BITFRAMESDD_A::SDD01000) + } + #[doc = "SDD pattern 10000"] + #[inline(always)] + pub fn sdd10000(self) -> &'a mut W { + self.variant(BITFRAMESDD_A::SDD10000) + } +} +#[doc = "Field `RFU5` reader - Reserved for future use. Shall be 0."] +pub type RFU5_R = crate::BitReader; +#[doc = "Field `RFU5` writer - Reserved for future use. Shall be 0."] +pub type RFU5_W<'a, const O: u8> = crate::BitWriter<'a, u32, SENSRES_SPEC, bool, O>; +#[doc = "Field `NFCIDSIZE` reader - NFCID1 size. This value is used by the Auto collision resolution engine."] +pub type NFCIDSIZE_R = crate::FieldReader; +#[doc = "NFCID1 size. This value is used by the Auto collision resolution engine.\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +#[repr(u8)] +pub enum NFCIDSIZE_A { + #[doc = "0: NFCID1 size: single (4 bytes)"] + NFCID1SINGLE = 0, + #[doc = "1: NFCID1 size: double (7 bytes)"] + NFCID1DOUBLE = 1, + #[doc = "2: NFCID1 size: triple (10 bytes)"] + NFCID1TRIPLE = 2, +} +impl From for u8 { + #[inline(always)] + fn from(variant: NFCIDSIZE_A) -> Self { + variant as _ + } +} +impl NFCIDSIZE_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> Option { + match self.bits { + 0 => Some(NFCIDSIZE_A::NFCID1SINGLE), + 1 => Some(NFCIDSIZE_A::NFCID1DOUBLE), + 2 => Some(NFCIDSIZE_A::NFCID1TRIPLE), + _ => None, + } + } + #[doc = "Checks if the value of the field is `NFCID1SINGLE`"] + #[inline(always)] + pub fn is_nfcid1single(&self) -> bool { + *self == NFCIDSIZE_A::NFCID1SINGLE + } + #[doc = "Checks if the value of the field is `NFCID1DOUBLE`"] + #[inline(always)] + pub fn is_nfcid1double(&self) -> bool { + *self == NFCIDSIZE_A::NFCID1DOUBLE + } + #[doc = "Checks if the value of the field is `NFCID1TRIPLE`"] + #[inline(always)] + pub fn is_nfcid1triple(&self) -> bool { + *self == NFCIDSIZE_A::NFCID1TRIPLE + } +} +#[doc = "Field `NFCIDSIZE` writer - NFCID1 size. This value is used by the Auto collision resolution engine."] +pub type NFCIDSIZE_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, SENSRES_SPEC, u8, NFCIDSIZE_A, 2, O>; +impl<'a, const O: u8> NFCIDSIZE_W<'a, O> { + #[doc = "NFCID1 size: single (4 bytes)"] + #[inline(always)] + pub fn nfcid1single(self) -> &'a mut W { + self.variant(NFCIDSIZE_A::NFCID1SINGLE) + } + #[doc = "NFCID1 size: double (7 bytes)"] + #[inline(always)] + pub fn nfcid1double(self) -> &'a mut W { + self.variant(NFCIDSIZE_A::NFCID1DOUBLE) + } + #[doc = "NFCID1 size: triple (10 bytes)"] + #[inline(always)] + pub fn nfcid1triple(self) -> &'a mut W { + self.variant(NFCIDSIZE_A::NFCID1TRIPLE) + } +} +#[doc = "Field `PLATFCONFIG` reader - Tag platform configuration as defined by the b4:b1 of byte 2 in SENS_RES response in the NFC Forum, NFC Digital Protocol Technical Specification"] +pub type PLATFCONFIG_R = crate::FieldReader; +#[doc = "Field `PLATFCONFIG` writer - Tag platform configuration as defined by the b4:b1 of byte 2 in SENS_RES response in the NFC Forum, NFC Digital Protocol Technical Specification"] +pub type PLATFCONFIG_W<'a, const O: u8> = crate::FieldWriter<'a, u32, SENSRES_SPEC, u8, u8, 4, O>; +#[doc = "Field `RFU74` reader - Reserved for future use. Shall be 0."] +pub type RFU74_R = crate::FieldReader; +#[doc = "Field `RFU74` writer - Reserved for future use. Shall be 0."] +pub type RFU74_W<'a, const O: u8> = crate::FieldWriter<'a, u32, SENSRES_SPEC, u8, u8, 4, O>; +impl R { + #[doc = "Bits 0:4 - Bit frame SDD as defined by the b5:b1 of byte 1 in SENS_RES response in the NFC Forum, NFC Digital Protocol Technical Specification"] + #[inline(always)] + pub fn bitframesdd(&self) -> BITFRAMESDD_R { + BITFRAMESDD_R::new((self.bits & 0x1f) as u8) + } + #[doc = "Bit 5 - Reserved for future use. Shall be 0."] + #[inline(always)] + pub fn rfu5(&self) -> RFU5_R { + RFU5_R::new(((self.bits >> 5) & 1) != 0) + } + #[doc = "Bits 6:7 - NFCID1 size. This value is used by the Auto collision resolution engine."] + #[inline(always)] + pub fn nfcidsize(&self) -> NFCIDSIZE_R { + NFCIDSIZE_R::new(((self.bits >> 6) & 3) as u8) + } + #[doc = "Bits 8:11 - Tag platform configuration as defined by the b4:b1 of byte 2 in SENS_RES response in the NFC Forum, NFC Digital Protocol Technical Specification"] + #[inline(always)] + pub fn platfconfig(&self) -> PLATFCONFIG_R { + PLATFCONFIG_R::new(((self.bits >> 8) & 0x0f) as u8) + } + #[doc = "Bits 12:15 - Reserved for future use. Shall be 0."] + #[inline(always)] + pub fn rfu74(&self) -> RFU74_R { + RFU74_R::new(((self.bits >> 12) & 0x0f) as u8) + } +} +impl W { + #[doc = "Bits 0:4 - Bit frame SDD as defined by the b5:b1 of byte 1 in SENS_RES response in the NFC Forum, NFC Digital Protocol Technical Specification"] + #[inline(always)] + #[must_use] + pub fn bitframesdd(&mut self) -> BITFRAMESDD_W<0> { + BITFRAMESDD_W::new(self) + } + #[doc = "Bit 5 - Reserved for future use. Shall be 0."] + #[inline(always)] + #[must_use] + pub fn rfu5(&mut self) -> RFU5_W<5> { + RFU5_W::new(self) + } + #[doc = "Bits 6:7 - NFCID1 size. This value is used by the Auto collision resolution engine."] + #[inline(always)] + #[must_use] + pub fn nfcidsize(&mut self) -> NFCIDSIZE_W<6> { + NFCIDSIZE_W::new(self) + } + #[doc = "Bits 8:11 - Tag platform configuration as defined by the b4:b1 of byte 2 in SENS_RES response in the NFC Forum, NFC Digital Protocol Technical Specification"] + #[inline(always)] + #[must_use] + pub fn platfconfig(&mut self) -> PLATFCONFIG_W<8> { + PLATFCONFIG_W::new(self) + } + #[doc = "Bits 12:15 - Reserved for future use. Shall be 0."] + #[inline(always)] + #[must_use] + pub fn rfu74(&mut self) -> RFU74_W<12> { + RFU74_W::new(self) + } + #[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 = "NFC-A SENS_RES auto-response settings\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 [sensres](index.html) module"] +pub struct SENSRES_SPEC; +impl crate::RegisterSpec for SENSRES_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [sensres::R](R) reader structure"] +impl crate::Readable for SENSRES_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [sensres::W](W) writer structure"] +impl crate::Writable for SENSRES_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets SENSRES to value 0x01"] +impl crate::Resettable for SENSRES_SPEC { + const RESET_VALUE: Self::Ux = 0x01; +} diff --git a/down-the-stack/dk_pac/src/nfct/shorts.rs b/down-the-stack/dk_pac/src/nfct/shorts.rs new file mode 100644 index 0000000..7fbe6cf --- /dev/null +++ b/down-the-stack/dk_pac/src/nfct/shorts.rs @@ -0,0 +1,189 @@ +#[doc = "Register `SHORTS` 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 `SHORTS` 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 `FIELDDETECTED_ACTIVATE` reader - Shortcut between event FIELDDETECTED and task ACTIVATE"] +pub type FIELDDETECTED_ACTIVATE_R = crate::BitReader; +#[doc = "Shortcut between event FIELDDETECTED and task ACTIVATE\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum FIELDDETECTED_ACTIVATE_A { + #[doc = "0: Disable shortcut"] + DISABLED = 0, + #[doc = "1: Enable shortcut"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: FIELDDETECTED_ACTIVATE_A) -> Self { + variant as u8 != 0 + } +} +impl FIELDDETECTED_ACTIVATE_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> FIELDDETECTED_ACTIVATE_A { + match self.bits { + false => FIELDDETECTED_ACTIVATE_A::DISABLED, + true => FIELDDETECTED_ACTIVATE_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == FIELDDETECTED_ACTIVATE_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == FIELDDETECTED_ACTIVATE_A::ENABLED + } +} +#[doc = "Field `FIELDDETECTED_ACTIVATE` writer - Shortcut between event FIELDDETECTED and task ACTIVATE"] +pub type FIELDDETECTED_ACTIVATE_W<'a, const O: u8> = + crate::BitWriter<'a, u32, SHORTS_SPEC, FIELDDETECTED_ACTIVATE_A, O>; +impl<'a, const O: u8> FIELDDETECTED_ACTIVATE_W<'a, O> { + #[doc = "Disable shortcut"] + #[inline(always)] + pub fn disabled(self) -> &'a mut W { + self.variant(FIELDDETECTED_ACTIVATE_A::DISABLED) + } + #[doc = "Enable shortcut"] + #[inline(always)] + pub fn enabled(self) -> &'a mut W { + self.variant(FIELDDETECTED_ACTIVATE_A::ENABLED) + } +} +#[doc = "Field `FIELDLOST_SENSE` reader - Shortcut between event FIELDLOST and task SENSE"] +pub type FIELDLOST_SENSE_R = crate::BitReader; +#[doc = "Shortcut between event FIELDLOST and task SENSE\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum FIELDLOST_SENSE_A { + #[doc = "0: Disable shortcut"] + DISABLED = 0, + #[doc = "1: Enable shortcut"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: FIELDLOST_SENSE_A) -> Self { + variant as u8 != 0 + } +} +impl FIELDLOST_SENSE_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> FIELDLOST_SENSE_A { + match self.bits { + false => FIELDLOST_SENSE_A::DISABLED, + true => FIELDLOST_SENSE_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == FIELDLOST_SENSE_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == FIELDLOST_SENSE_A::ENABLED + } +} +#[doc = "Field `FIELDLOST_SENSE` writer - Shortcut between event FIELDLOST and task SENSE"] +pub type FIELDLOST_SENSE_W<'a, const O: u8> = + crate::BitWriter<'a, u32, SHORTS_SPEC, FIELDLOST_SENSE_A, O>; +impl<'a, const O: u8> FIELDLOST_SENSE_W<'a, O> { + #[doc = "Disable shortcut"] + #[inline(always)] + pub fn disabled(self) -> &'a mut W { + self.variant(FIELDLOST_SENSE_A::DISABLED) + } + #[doc = "Enable shortcut"] + #[inline(always)] + pub fn enabled(self) -> &'a mut W { + self.variant(FIELDLOST_SENSE_A::ENABLED) + } +} +impl R { + #[doc = "Bit 0 - Shortcut between event FIELDDETECTED and task ACTIVATE"] + #[inline(always)] + pub fn fielddetected_activate(&self) -> FIELDDETECTED_ACTIVATE_R { + FIELDDETECTED_ACTIVATE_R::new((self.bits & 1) != 0) + } + #[doc = "Bit 1 - Shortcut between event FIELDLOST and task SENSE"] + #[inline(always)] + pub fn fieldlost_sense(&self) -> FIELDLOST_SENSE_R { + FIELDLOST_SENSE_R::new(((self.bits >> 1) & 1) != 0) + } +} +impl W { + #[doc = "Bit 0 - Shortcut between event FIELDDETECTED and task ACTIVATE"] + #[inline(always)] + #[must_use] + pub fn fielddetected_activate(&mut self) -> FIELDDETECTED_ACTIVATE_W<0> { + FIELDDETECTED_ACTIVATE_W::new(self) + } + #[doc = "Bit 1 - Shortcut between event FIELDLOST and task SENSE"] + #[inline(always)] + #[must_use] + pub fn fieldlost_sense(&mut self) -> FIELDLOST_SENSE_W<1> { + FIELDLOST_SENSE_W::new(self) + } + #[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 = "Shortcuts between local events and tasks\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 [shorts](index.html) module"] +pub struct SHORTS_SPEC; +impl crate::RegisterSpec for SHORTS_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [shorts::R](R) reader structure"] +impl crate::Readable for SHORTS_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [shorts::W](W) writer structure"] +impl crate::Writable for SHORTS_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets SHORTS to value 0"] +impl crate::Resettable for SHORTS_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/nfct/tasks_activate.rs b/down-the-stack/dk_pac/src/nfct/tasks_activate.rs new file mode 100644 index 0000000..d109b58 --- /dev/null +++ b/down-the-stack/dk_pac/src/nfct/tasks_activate.rs @@ -0,0 +1,72 @@ +#[doc = "Register `TASKS_ACTIVATE` 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 = "Activate NFC peripheral for incoming and outgoing frames, change state to activated\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum TASKS_ACTIVATE_AW { + #[doc = "1: Trigger task"] + TRIGGER = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: TASKS_ACTIVATE_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `TASKS_ACTIVATE` writer - Activate NFC peripheral for incoming and outgoing frames, change state to activated"] +pub type TASKS_ACTIVATE_W<'a, const O: u8> = + crate::BitWriter<'a, u32, TASKS_ACTIVATE_SPEC, TASKS_ACTIVATE_AW, O>; +impl<'a, const O: u8> TASKS_ACTIVATE_W<'a, O> { + #[doc = "Trigger task"] + #[inline(always)] + pub fn trigger(self) -> &'a mut W { + self.variant(TASKS_ACTIVATE_AW::TRIGGER) + } +} +impl W { + #[doc = "Bit 0 - Activate NFC peripheral for incoming and outgoing frames, change state to activated"] + #[inline(always)] + #[must_use] + pub fn tasks_activate(&mut self) -> TASKS_ACTIVATE_W<0> { + TASKS_ACTIVATE_W::new(self) + } + #[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 = "Activate NFC peripheral for incoming and outgoing frames, change state to activated\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 [tasks_activate](index.html) module"] +pub struct TASKS_ACTIVATE_SPEC; +impl crate::RegisterSpec for TASKS_ACTIVATE_SPEC { + type Ux = u32; +} +#[doc = "`write(|w| ..)` method takes [tasks_activate::W](W) writer structure"] +impl crate::Writable for TASKS_ACTIVATE_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets TASKS_ACTIVATE to value 0"] +impl crate::Resettable for TASKS_ACTIVATE_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/nfct/tasks_disable.rs b/down-the-stack/dk_pac/src/nfct/tasks_disable.rs new file mode 100644 index 0000000..c1d0023 --- /dev/null +++ b/down-the-stack/dk_pac/src/nfct/tasks_disable.rs @@ -0,0 +1,72 @@ +#[doc = "Register `TASKS_DISABLE` 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 = "Disable NFC peripheral\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum TASKS_DISABLE_AW { + #[doc = "1: Trigger task"] + TRIGGER = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: TASKS_DISABLE_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `TASKS_DISABLE` writer - Disable NFC peripheral"] +pub type TASKS_DISABLE_W<'a, const O: u8> = + crate::BitWriter<'a, u32, TASKS_DISABLE_SPEC, TASKS_DISABLE_AW, O>; +impl<'a, const O: u8> TASKS_DISABLE_W<'a, O> { + #[doc = "Trigger task"] + #[inline(always)] + pub fn trigger(self) -> &'a mut W { + self.variant(TASKS_DISABLE_AW::TRIGGER) + } +} +impl W { + #[doc = "Bit 0 - Disable NFC peripheral"] + #[inline(always)] + #[must_use] + pub fn tasks_disable(&mut self) -> TASKS_DISABLE_W<0> { + TASKS_DISABLE_W::new(self) + } + #[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 = "Disable NFC peripheral\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 [tasks_disable](index.html) module"] +pub struct TASKS_DISABLE_SPEC; +impl crate::RegisterSpec for TASKS_DISABLE_SPEC { + type Ux = u32; +} +#[doc = "`write(|w| ..)` method takes [tasks_disable::W](W) writer structure"] +impl crate::Writable for TASKS_DISABLE_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets TASKS_DISABLE to value 0"] +impl crate::Resettable for TASKS_DISABLE_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/nfct/tasks_enablerxdata.rs b/down-the-stack/dk_pac/src/nfct/tasks_enablerxdata.rs new file mode 100644 index 0000000..2c6f0d9 --- /dev/null +++ b/down-the-stack/dk_pac/src/nfct/tasks_enablerxdata.rs @@ -0,0 +1,72 @@ +#[doc = "Register `TASKS_ENABLERXDATA` 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 = "Initializes the EasyDMA for receive.\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum TASKS_ENABLERXDATA_AW { + #[doc = "1: Trigger task"] + TRIGGER = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: TASKS_ENABLERXDATA_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `TASKS_ENABLERXDATA` writer - Initializes the EasyDMA for receive."] +pub type TASKS_ENABLERXDATA_W<'a, const O: u8> = + crate::BitWriter<'a, u32, TASKS_ENABLERXDATA_SPEC, TASKS_ENABLERXDATA_AW, O>; +impl<'a, const O: u8> TASKS_ENABLERXDATA_W<'a, O> { + #[doc = "Trigger task"] + #[inline(always)] + pub fn trigger(self) -> &'a mut W { + self.variant(TASKS_ENABLERXDATA_AW::TRIGGER) + } +} +impl W { + #[doc = "Bit 0 - Initializes the EasyDMA for receive."] + #[inline(always)] + #[must_use] + pub fn tasks_enablerxdata(&mut self) -> TASKS_ENABLERXDATA_W<0> { + TASKS_ENABLERXDATA_W::new(self) + } + #[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 = "Initializes the EasyDMA for receive.\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 [tasks_enablerxdata](index.html) module"] +pub struct TASKS_ENABLERXDATA_SPEC; +impl crate::RegisterSpec for TASKS_ENABLERXDATA_SPEC { + type Ux = u32; +} +#[doc = "`write(|w| ..)` method takes [tasks_enablerxdata::W](W) writer structure"] +impl crate::Writable for TASKS_ENABLERXDATA_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets TASKS_ENABLERXDATA to value 0"] +impl crate::Resettable for TASKS_ENABLERXDATA_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/nfct/tasks_goidle.rs b/down-the-stack/dk_pac/src/nfct/tasks_goidle.rs new file mode 100644 index 0000000..b3f211a --- /dev/null +++ b/down-the-stack/dk_pac/src/nfct/tasks_goidle.rs @@ -0,0 +1,72 @@ +#[doc = "Register `TASKS_GOIDLE` 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 = "Force state machine to IDLE state\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum TASKS_GOIDLE_AW { + #[doc = "1: Trigger task"] + TRIGGER = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: TASKS_GOIDLE_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `TASKS_GOIDLE` writer - Force state machine to IDLE state"] +pub type TASKS_GOIDLE_W<'a, const O: u8> = + crate::BitWriter<'a, u32, TASKS_GOIDLE_SPEC, TASKS_GOIDLE_AW, O>; +impl<'a, const O: u8> TASKS_GOIDLE_W<'a, O> { + #[doc = "Trigger task"] + #[inline(always)] + pub fn trigger(self) -> &'a mut W { + self.variant(TASKS_GOIDLE_AW::TRIGGER) + } +} +impl W { + #[doc = "Bit 0 - Force state machine to IDLE state"] + #[inline(always)] + #[must_use] + pub fn tasks_goidle(&mut self) -> TASKS_GOIDLE_W<0> { + TASKS_GOIDLE_W::new(self) + } + #[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 = "Force state machine to IDLE state\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 [tasks_goidle](index.html) module"] +pub struct TASKS_GOIDLE_SPEC; +impl crate::RegisterSpec for TASKS_GOIDLE_SPEC { + type Ux = u32; +} +#[doc = "`write(|w| ..)` method takes [tasks_goidle::W](W) writer structure"] +impl crate::Writable for TASKS_GOIDLE_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets TASKS_GOIDLE to value 0"] +impl crate::Resettable for TASKS_GOIDLE_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/nfct/tasks_gosleep.rs b/down-the-stack/dk_pac/src/nfct/tasks_gosleep.rs new file mode 100644 index 0000000..edcbc0d --- /dev/null +++ b/down-the-stack/dk_pac/src/nfct/tasks_gosleep.rs @@ -0,0 +1,72 @@ +#[doc = "Register `TASKS_GOSLEEP` 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 = "Force state machine to SLEEP_A state\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum TASKS_GOSLEEP_AW { + #[doc = "1: Trigger task"] + TRIGGER = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: TASKS_GOSLEEP_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `TASKS_GOSLEEP` writer - Force state machine to SLEEP_A state"] +pub type TASKS_GOSLEEP_W<'a, const O: u8> = + crate::BitWriter<'a, u32, TASKS_GOSLEEP_SPEC, TASKS_GOSLEEP_AW, O>; +impl<'a, const O: u8> TASKS_GOSLEEP_W<'a, O> { + #[doc = "Trigger task"] + #[inline(always)] + pub fn trigger(self) -> &'a mut W { + self.variant(TASKS_GOSLEEP_AW::TRIGGER) + } +} +impl W { + #[doc = "Bit 0 - Force state machine to SLEEP_A state"] + #[inline(always)] + #[must_use] + pub fn tasks_gosleep(&mut self) -> TASKS_GOSLEEP_W<0> { + TASKS_GOSLEEP_W::new(self) + } + #[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 = "Force state machine to SLEEP_A state\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 [tasks_gosleep](index.html) module"] +pub struct TASKS_GOSLEEP_SPEC; +impl crate::RegisterSpec for TASKS_GOSLEEP_SPEC { + type Ux = u32; +} +#[doc = "`write(|w| ..)` method takes [tasks_gosleep::W](W) writer structure"] +impl crate::Writable for TASKS_GOSLEEP_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets TASKS_GOSLEEP to value 0"] +impl crate::Resettable for TASKS_GOSLEEP_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/nfct/tasks_sense.rs b/down-the-stack/dk_pac/src/nfct/tasks_sense.rs new file mode 100644 index 0000000..542bcb8 --- /dev/null +++ b/down-the-stack/dk_pac/src/nfct/tasks_sense.rs @@ -0,0 +1,72 @@ +#[doc = "Register `TASKS_SENSE` 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 = "Enable NFC sense field mode, change state to sense mode\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum TASKS_SENSE_AW { + #[doc = "1: Trigger task"] + TRIGGER = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: TASKS_SENSE_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `TASKS_SENSE` writer - Enable NFC sense field mode, change state to sense mode"] +pub type TASKS_SENSE_W<'a, const O: u8> = + crate::BitWriter<'a, u32, TASKS_SENSE_SPEC, TASKS_SENSE_AW, O>; +impl<'a, const O: u8> TASKS_SENSE_W<'a, O> { + #[doc = "Trigger task"] + #[inline(always)] + pub fn trigger(self) -> &'a mut W { + self.variant(TASKS_SENSE_AW::TRIGGER) + } +} +impl W { + #[doc = "Bit 0 - Enable NFC sense field mode, change state to sense mode"] + #[inline(always)] + #[must_use] + pub fn tasks_sense(&mut self) -> TASKS_SENSE_W<0> { + TASKS_SENSE_W::new(self) + } + #[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 = "Enable NFC sense field mode, change state to sense mode\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 [tasks_sense](index.html) module"] +pub struct TASKS_SENSE_SPEC; +impl crate::RegisterSpec for TASKS_SENSE_SPEC { + type Ux = u32; +} +#[doc = "`write(|w| ..)` method takes [tasks_sense::W](W) writer structure"] +impl crate::Writable for TASKS_SENSE_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets TASKS_SENSE to value 0"] +impl crate::Resettable for TASKS_SENSE_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/nfct/tasks_starttx.rs b/down-the-stack/dk_pac/src/nfct/tasks_starttx.rs new file mode 100644 index 0000000..2e6fa8f --- /dev/null +++ b/down-the-stack/dk_pac/src/nfct/tasks_starttx.rs @@ -0,0 +1,72 @@ +#[doc = "Register `TASKS_STARTTX` 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 = "Start transmission of a outgoing frame, change state to transmit\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum TASKS_STARTTX_AW { + #[doc = "1: Trigger task"] + TRIGGER = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: TASKS_STARTTX_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `TASKS_STARTTX` writer - Start transmission of a outgoing frame, change state to transmit"] +pub type TASKS_STARTTX_W<'a, const O: u8> = + crate::BitWriter<'a, u32, TASKS_STARTTX_SPEC, TASKS_STARTTX_AW, O>; +impl<'a, const O: u8> TASKS_STARTTX_W<'a, O> { + #[doc = "Trigger task"] + #[inline(always)] + pub fn trigger(self) -> &'a mut W { + self.variant(TASKS_STARTTX_AW::TRIGGER) + } +} +impl W { + #[doc = "Bit 0 - Start transmission of a outgoing frame, change state to transmit"] + #[inline(always)] + #[must_use] + pub fn tasks_starttx(&mut self) -> TASKS_STARTTX_W<0> { + TASKS_STARTTX_W::new(self) + } + #[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 = "Start transmission of a outgoing frame, change state to transmit\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 [tasks_starttx](index.html) module"] +pub struct TASKS_STARTTX_SPEC; +impl crate::RegisterSpec for TASKS_STARTTX_SPEC { + type Ux = u32; +} +#[doc = "`write(|w| ..)` method takes [tasks_starttx::W](W) writer structure"] +impl crate::Writable for TASKS_STARTTX_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets TASKS_STARTTX to value 0"] +impl crate::Resettable for TASKS_STARTTX_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/nfct/txd.rs b/down-the-stack/dk_pac/src/nfct/txd.rs new file mode 100644 index 0000000..21bbb0e --- /dev/null +++ b/down-the-stack/dk_pac/src/nfct/txd.rs @@ -0,0 +1,16 @@ +#[doc = r"Register block"] +#[repr(C)] +pub struct TXD { + #[doc = "0x00 - Configuration of outgoing frames"] + pub frameconfig: FRAMECONFIG, + #[doc = "0x04 - Size of outgoing frame"] + pub amount: AMOUNT, +} +#[doc = "FRAMECONFIG (rw) register accessor: an alias for `Reg`"] +pub type FRAMECONFIG = crate::Reg; +#[doc = "Configuration of outgoing frames"] +pub mod frameconfig; +#[doc = "AMOUNT (rw) register accessor: an alias for `Reg`"] +pub type AMOUNT = crate::Reg; +#[doc = "Size of outgoing frame"] +pub mod amount; diff --git a/down-the-stack/dk_pac/src/nfct/txd/amount.rs b/down-the-stack/dk_pac/src/nfct/txd/amount.rs new file mode 100644 index 0000000..1ed9216 --- /dev/null +++ b/down-the-stack/dk_pac/src/nfct/txd/amount.rs @@ -0,0 +1,95 @@ +#[doc = "Register `AMOUNT` 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 `AMOUNT` 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 `TXDATABITS` reader - Number of bits in the last or first byte read from RAM that shall be included in the frame (excluding parity bit)."] +pub type TXDATABITS_R = crate::FieldReader; +#[doc = "Field `TXDATABITS` writer - Number of bits in the last or first byte read from RAM that shall be included in the frame (excluding parity bit)."] +pub type TXDATABITS_W<'a, const O: u8> = crate::FieldWriter<'a, u32, AMOUNT_SPEC, u8, u8, 3, O>; +#[doc = "Field `TXDATABYTES` reader - Number of complete bytes that shall be included in the frame, excluding CRC, parity and framing"] +pub type TXDATABYTES_R = crate::FieldReader; +#[doc = "Field `TXDATABYTES` writer - Number of complete bytes that shall be included in the frame, excluding CRC, parity and framing"] +pub type TXDATABYTES_W<'a, const O: u8> = crate::FieldWriter<'a, u32, AMOUNT_SPEC, u16, u16, 9, O>; +impl R { + #[doc = "Bits 0:2 - Number of bits in the last or first byte read from RAM that shall be included in the frame (excluding parity bit)."] + #[inline(always)] + pub fn txdatabits(&self) -> TXDATABITS_R { + TXDATABITS_R::new((self.bits & 7) as u8) + } + #[doc = "Bits 3:11 - Number of complete bytes that shall be included in the frame, excluding CRC, parity and framing"] + #[inline(always)] + pub fn txdatabytes(&self) -> TXDATABYTES_R { + TXDATABYTES_R::new(((self.bits >> 3) & 0x01ff) as u16) + } +} +impl W { + #[doc = "Bits 0:2 - Number of bits in the last or first byte read from RAM that shall be included in the frame (excluding parity bit)."] + #[inline(always)] + #[must_use] + pub fn txdatabits(&mut self) -> TXDATABITS_W<0> { + TXDATABITS_W::new(self) + } + #[doc = "Bits 3:11 - Number of complete bytes that shall be included in the frame, excluding CRC, parity and framing"] + #[inline(always)] + #[must_use] + pub fn txdatabytes(&mut self) -> TXDATABYTES_W<3> { + TXDATABYTES_W::new(self) + } + #[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 = "Size of outgoing frame\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 [amount](index.html) module"] +pub struct AMOUNT_SPEC; +impl crate::RegisterSpec for AMOUNT_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [amount::R](R) reader structure"] +impl crate::Readable for AMOUNT_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [amount::W](W) writer structure"] +impl crate::Writable for AMOUNT_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets AMOUNT to value 0"] +impl crate::Resettable for AMOUNT_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/nfct/txd/frameconfig.rs b/down-the-stack/dk_pac/src/nfct/txd/frameconfig.rs new file mode 100644 index 0000000..db34b9d --- /dev/null +++ b/down-the-stack/dk_pac/src/nfct/txd/frameconfig.rs @@ -0,0 +1,310 @@ +#[doc = "Register `FRAMECONFIG` 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 `FRAMECONFIG` 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 `PARITY` reader - Adding parity or not in the frame"] +pub type PARITY_R = crate::BitReader; +#[doc = "Adding parity or not in the frame\n\nValue on reset: 1"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PARITY_A { + #[doc = "0: Parity is not added in TX frames"] + NO_PARITY = 0, + #[doc = "1: Parity is added TX frames"] + PARITY = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PARITY_A) -> Self { + variant as u8 != 0 + } +} +impl PARITY_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> PARITY_A { + match self.bits { + false => PARITY_A::NO_PARITY, + true => PARITY_A::PARITY, + } + } + #[doc = "Checks if the value of the field is `NO_PARITY`"] + #[inline(always)] + pub fn is_no_parity(&self) -> bool { + *self == PARITY_A::NO_PARITY + } + #[doc = "Checks if the value of the field is `PARITY`"] + #[inline(always)] + pub fn is_parity(&self) -> bool { + *self == PARITY_A::PARITY + } +} +#[doc = "Field `PARITY` writer - Adding parity or not in the frame"] +pub type PARITY_W<'a, const O: u8> = crate::BitWriter<'a, u32, FRAMECONFIG_SPEC, PARITY_A, O>; +impl<'a, const O: u8> PARITY_W<'a, O> { + #[doc = "Parity is not added in TX frames"] + #[inline(always)] + pub fn no_parity(self) -> &'a mut W { + self.variant(PARITY_A::NO_PARITY) + } + #[doc = "Parity is added TX frames"] + #[inline(always)] + pub fn parity(self) -> &'a mut W { + self.variant(PARITY_A::PARITY) + } +} +#[doc = "Field `DISCARDMODE` reader - Discarding unused bits in start or at end of a Frame"] +pub type DISCARDMODE_R = crate::BitReader; +#[doc = "Discarding unused bits in start or at end of a Frame\n\nValue on reset: 1"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum DISCARDMODE_A { + #[doc = "0: Unused bits is discarded at end of frame"] + DISCARD_END = 0, + #[doc = "1: Unused bits is discarded at start of frame"] + DISCARD_START = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: DISCARDMODE_A) -> Self { + variant as u8 != 0 + } +} +impl DISCARDMODE_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> DISCARDMODE_A { + match self.bits { + false => DISCARDMODE_A::DISCARD_END, + true => DISCARDMODE_A::DISCARD_START, + } + } + #[doc = "Checks if the value of the field is `DISCARD_END`"] + #[inline(always)] + pub fn is_discard_end(&self) -> bool { + *self == DISCARDMODE_A::DISCARD_END + } + #[doc = "Checks if the value of the field is `DISCARD_START`"] + #[inline(always)] + pub fn is_discard_start(&self) -> bool { + *self == DISCARDMODE_A::DISCARD_START + } +} +#[doc = "Field `DISCARDMODE` writer - Discarding unused bits in start or at end of a Frame"] +pub type DISCARDMODE_W<'a, const O: u8> = + crate::BitWriter<'a, u32, FRAMECONFIG_SPEC, DISCARDMODE_A, O>; +impl<'a, const O: u8> DISCARDMODE_W<'a, O> { + #[doc = "Unused bits is discarded at end of frame"] + #[inline(always)] + pub fn discard_end(self) -> &'a mut W { + self.variant(DISCARDMODE_A::DISCARD_END) + } + #[doc = "Unused bits is discarded at start of frame"] + #[inline(always)] + pub fn discard_start(self) -> &'a mut W { + self.variant(DISCARDMODE_A::DISCARD_START) + } +} +#[doc = "Field `SOF` reader - Adding SoF or not in TX frames"] +pub type SOF_R = crate::BitReader; +#[doc = "Adding SoF or not in TX frames\n\nValue on reset: 1"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum SOF_A { + #[doc = "0: Start of Frame symbol not added"] + NO_SO_F = 0, + #[doc = "1: Start of Frame symbol added"] + SO_F = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: SOF_A) -> Self { + variant as u8 != 0 + } +} +impl SOF_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> SOF_A { + match self.bits { + false => SOF_A::NO_SO_F, + true => SOF_A::SO_F, + } + } + #[doc = "Checks if the value of the field is `NO_SO_F`"] + #[inline(always)] + pub fn is_no_so_f(&self) -> bool { + *self == SOF_A::NO_SO_F + } + #[doc = "Checks if the value of the field is `SO_F`"] + #[inline(always)] + pub fn is_so_f(&self) -> bool { + *self == SOF_A::SO_F + } +} +#[doc = "Field `SOF` writer - Adding SoF or not in TX frames"] +pub type SOF_W<'a, const O: u8> = crate::BitWriter<'a, u32, FRAMECONFIG_SPEC, SOF_A, O>; +impl<'a, const O: u8> SOF_W<'a, O> { + #[doc = "Start of Frame symbol not added"] + #[inline(always)] + pub fn no_so_f(self) -> &'a mut W { + self.variant(SOF_A::NO_SO_F) + } + #[doc = "Start of Frame symbol added"] + #[inline(always)] + pub fn so_f(self) -> &'a mut W { + self.variant(SOF_A::SO_F) + } +} +#[doc = "Field `CRCMODETX` reader - CRC mode for outgoing frames"] +pub type CRCMODETX_R = crate::BitReader; +#[doc = "CRC mode for outgoing frames\n\nValue on reset: 1"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum CRCMODETX_A { + #[doc = "0: CRC is not added to the frame"] + NO_CRCTX = 0, + #[doc = "1: 16 bit CRC added to the frame based on all the data read from RAM that is used in the frame"] + CRC16TX = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: CRCMODETX_A) -> Self { + variant as u8 != 0 + } +} +impl CRCMODETX_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> CRCMODETX_A { + match self.bits { + false => CRCMODETX_A::NO_CRCTX, + true => CRCMODETX_A::CRC16TX, + } + } + #[doc = "Checks if the value of the field is `NO_CRCTX`"] + #[inline(always)] + pub fn is_no_crctx(&self) -> bool { + *self == CRCMODETX_A::NO_CRCTX + } + #[doc = "Checks if the value of the field is `CRC16TX`"] + #[inline(always)] + pub fn is_crc16tx(&self) -> bool { + *self == CRCMODETX_A::CRC16TX + } +} +#[doc = "Field `CRCMODETX` writer - CRC mode for outgoing frames"] +pub type CRCMODETX_W<'a, const O: u8> = crate::BitWriter<'a, u32, FRAMECONFIG_SPEC, CRCMODETX_A, O>; +impl<'a, const O: u8> CRCMODETX_W<'a, O> { + #[doc = "CRC is not added to the frame"] + #[inline(always)] + pub fn no_crctx(self) -> &'a mut W { + self.variant(CRCMODETX_A::NO_CRCTX) + } + #[doc = "16 bit CRC added to the frame based on all the data read from RAM that is used in the frame"] + #[inline(always)] + pub fn crc16tx(self) -> &'a mut W { + self.variant(CRCMODETX_A::CRC16TX) + } +} +impl R { + #[doc = "Bit 0 - Adding parity or not in the frame"] + #[inline(always)] + pub fn parity(&self) -> PARITY_R { + PARITY_R::new((self.bits & 1) != 0) + } + #[doc = "Bit 1 - Discarding unused bits in start or at end of a Frame"] + #[inline(always)] + pub fn discardmode(&self) -> DISCARDMODE_R { + DISCARDMODE_R::new(((self.bits >> 1) & 1) != 0) + } + #[doc = "Bit 2 - Adding SoF or not in TX frames"] + #[inline(always)] + pub fn sof(&self) -> SOF_R { + SOF_R::new(((self.bits >> 2) & 1) != 0) + } + #[doc = "Bit 4 - CRC mode for outgoing frames"] + #[inline(always)] + pub fn crcmodetx(&self) -> CRCMODETX_R { + CRCMODETX_R::new(((self.bits >> 4) & 1) != 0) + } +} +impl W { + #[doc = "Bit 0 - Adding parity or not in the frame"] + #[inline(always)] + #[must_use] + pub fn parity(&mut self) -> PARITY_W<0> { + PARITY_W::new(self) + } + #[doc = "Bit 1 - Discarding unused bits in start or at end of a Frame"] + #[inline(always)] + #[must_use] + pub fn discardmode(&mut self) -> DISCARDMODE_W<1> { + DISCARDMODE_W::new(self) + } + #[doc = "Bit 2 - Adding SoF or not in TX frames"] + #[inline(always)] + #[must_use] + pub fn sof(&mut self) -> SOF_W<2> { + SOF_W::new(self) + } + #[doc = "Bit 4 - CRC mode for outgoing frames"] + #[inline(always)] + #[must_use] + pub fn crcmodetx(&mut self) -> CRCMODETX_W<4> { + CRCMODETX_W::new(self) + } + #[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 = "Configuration of outgoing frames\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 [frameconfig](index.html) module"] +pub struct FRAMECONFIG_SPEC; +impl crate::RegisterSpec for FRAMECONFIG_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [frameconfig::R](R) reader structure"] +impl crate::Readable for FRAMECONFIG_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [frameconfig::W](W) writer structure"] +impl crate::Writable for FRAMECONFIG_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets FRAMECONFIG to value 0x17"] +impl crate::Resettable for FRAMECONFIG_SPEC { + const RESET_VALUE: Self::Ux = 0x17; +} diff --git a/down-the-stack/dk_pac/src/nvmc.rs b/down-the-stack/dk_pac/src/nvmc.rs new file mode 100644 index 0000000..15d6831 --- /dev/null +++ b/down-the-stack/dk_pac/src/nvmc.rs @@ -0,0 +1,77 @@ +#[doc = r"Register block"] +#[repr(C)] +pub struct RegisterBlock { + _reserved0: [u8; 0x0400], + #[doc = "0x400 - Ready flag"] + pub ready: READY, + _reserved1: [u8; 0x0100], + #[doc = "0x504 - Configuration register"] + pub config: CONFIG, + _reserved_2_erasepage: [u8; 0x04], + #[doc = "0x50c - Register for erasing all non-volatile user memory"] + pub eraseall: ERASEALL, + #[doc = "0x510 - Deprecated register - Register for erasing a page in Code area. Equivalent to ERASEPAGE."] + pub erasepcr0: ERASEPCR0, + #[doc = "0x514 - Register for erasing User Information Configuration Registers"] + pub eraseuicr: ERASEUICR, + _reserved6: [u8; 0x28], + #[doc = "0x540 - I-Code cache configuration register."] + pub icachecnf: ICACHECNF, + _reserved7: [u8; 0x04], + #[doc = "0x548 - I-Code cache hit counter."] + pub ihit: IHIT, + #[doc = "0x54c - I-Code cache miss counter."] + pub imiss: IMISS, +} +impl RegisterBlock { + #[doc = "0x508 - Deprecated register - Register for erasing a page in Code area. Equivalent to ERASEPAGE."] + #[inline(always)] + pub const fn erasepcr1(&self) -> &ERASEPCR1 { + unsafe { &*(self as *const Self).cast::().add(1288usize).cast() } + } + #[doc = "0x508 - Register for erasing a page in Code area"] + #[inline(always)] + pub const fn erasepage(&self) -> &ERASEPAGE { + unsafe { &*(self as *const Self).cast::().add(1288usize).cast() } + } +} +#[doc = "READY (r) register accessor: an alias for `Reg`"] +pub type READY = crate::Reg; +#[doc = "Ready flag"] +pub mod ready; +#[doc = "CONFIG (rw) register accessor: an alias for `Reg`"] +pub type CONFIG = crate::Reg; +#[doc = "Configuration register"] +pub mod config; +#[doc = "ERASEPAGE (rw) register accessor: an alias for `Reg`"] +pub type ERASEPAGE = crate::Reg; +#[doc = "Register for erasing a page in Code area"] +pub mod erasepage; +#[doc = "ERASEPCR1 (rw) register accessor: an alias for `Reg`"] +pub type ERASEPCR1 = crate::Reg; +#[doc = "Deprecated register - Register for erasing a page in Code area. Equivalent to ERASEPAGE."] +pub mod erasepcr1; +#[doc = "ERASEALL (rw) register accessor: an alias for `Reg`"] +pub type ERASEALL = crate::Reg; +#[doc = "Register for erasing all non-volatile user memory"] +pub mod eraseall; +#[doc = "ERASEPCR0 (rw) register accessor: an alias for `Reg`"] +pub type ERASEPCR0 = crate::Reg; +#[doc = "Deprecated register - Register for erasing a page in Code area. Equivalent to ERASEPAGE."] +pub mod erasepcr0; +#[doc = "ERASEUICR (rw) register accessor: an alias for `Reg`"] +pub type ERASEUICR = crate::Reg; +#[doc = "Register for erasing User Information Configuration Registers"] +pub mod eraseuicr; +#[doc = "ICACHECNF (rw) register accessor: an alias for `Reg`"] +pub type ICACHECNF = crate::Reg; +#[doc = "I-Code cache configuration register."] +pub mod icachecnf; +#[doc = "IHIT (rw) register accessor: an alias for `Reg`"] +pub type IHIT = crate::Reg; +#[doc = "I-Code cache hit counter."] +pub mod ihit; +#[doc = "IMISS (rw) register accessor: an alias for `Reg`"] +pub type IMISS = crate::Reg; +#[doc = "I-Code cache miss counter."] +pub mod imiss; diff --git a/down-the-stack/dk_pac/src/nvmc/config.rs b/down-the-stack/dk_pac/src/nvmc/config.rs new file mode 100644 index 0000000..bd37f39 --- /dev/null +++ b/down-the-stack/dk_pac/src/nvmc/config.rs @@ -0,0 +1,141 @@ +#[doc = "Register `CONFIG` 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 `CONFIG` 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 `WEN` reader - Program memory access mode. It is strongly recommended to only activate erase and write modes when they are actively used. Enabling write or erase will invalidate the cache and keep it invalidated."] +pub type WEN_R = crate::FieldReader; +#[doc = "Program memory access mode. It is strongly recommended to only activate erase and write modes when they are actively used. Enabling write or erase will invalidate the cache and keep it invalidated.\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +#[repr(u8)] +pub enum WEN_A { + #[doc = "0: Read only access"] + REN = 0, + #[doc = "1: Write Enabled"] + WEN = 1, + #[doc = "2: Erase enabled"] + EEN = 2, +} +impl From for u8 { + #[inline(always)] + fn from(variant: WEN_A) -> Self { + variant as _ + } +} +impl WEN_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> Option { + match self.bits { + 0 => Some(WEN_A::REN), + 1 => Some(WEN_A::WEN), + 2 => Some(WEN_A::EEN), + _ => None, + } + } + #[doc = "Checks if the value of the field is `REN`"] + #[inline(always)] + pub fn is_ren(&self) -> bool { + *self == WEN_A::REN + } + #[doc = "Checks if the value of the field is `WEN`"] + #[inline(always)] + pub fn is_wen(&self) -> bool { + *self == WEN_A::WEN + } + #[doc = "Checks if the value of the field is `EEN`"] + #[inline(always)] + pub fn is_een(&self) -> bool { + *self == WEN_A::EEN + } +} +#[doc = "Field `WEN` writer - Program memory access mode. It is strongly recommended to only activate erase and write modes when they are actively used. Enabling write or erase will invalidate the cache and keep it invalidated."] +pub type WEN_W<'a, const O: u8> = crate::FieldWriter<'a, u32, CONFIG_SPEC, u8, WEN_A, 2, O>; +impl<'a, const O: u8> WEN_W<'a, O> { + #[doc = "Read only access"] + #[inline(always)] + pub fn ren(self) -> &'a mut W { + self.variant(WEN_A::REN) + } + #[doc = "Write Enabled"] + #[inline(always)] + pub fn wen(self) -> &'a mut W { + self.variant(WEN_A::WEN) + } + #[doc = "Erase enabled"] + #[inline(always)] + pub fn een(self) -> &'a mut W { + self.variant(WEN_A::EEN) + } +} +impl R { + #[doc = "Bits 0:1 - Program memory access mode. It is strongly recommended to only activate erase and write modes when they are actively used. Enabling write or erase will invalidate the cache and keep it invalidated."] + #[inline(always)] + pub fn wen(&self) -> WEN_R { + WEN_R::new((self.bits & 3) as u8) + } +} +impl W { + #[doc = "Bits 0:1 - Program memory access mode. It is strongly recommended to only activate erase and write modes when they are actively used. Enabling write or erase will invalidate the cache and keep it invalidated."] + #[inline(always)] + #[must_use] + pub fn wen(&mut self) -> WEN_W<0> { + WEN_W::new(self) + } + #[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 = "Configuration register\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 [config](index.html) module"] +pub struct CONFIG_SPEC; +impl crate::RegisterSpec for CONFIG_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [config::R](R) reader structure"] +impl crate::Readable for CONFIG_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [config::W](W) writer structure"] +impl crate::Writable for 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 CONFIG to value 0"] +impl crate::Resettable for CONFIG_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/nvmc/eraseall.rs b/down-the-stack/dk_pac/src/nvmc/eraseall.rs new file mode 100644 index 0000000..c49c2b1 --- /dev/null +++ b/down-the-stack/dk_pac/src/nvmc/eraseall.rs @@ -0,0 +1,126 @@ +#[doc = "Register `ERASEALL` 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 `ERASEALL` 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 `ERASEALL` reader - Erase all non-volatile memory including UICR registers. Note that code erase has to be enabled by CONFIG.EEN before the UICR can be erased."] +pub type ERASEALL_R = crate::BitReader; +#[doc = "Erase all non-volatile memory including UICR registers. Note that code erase has to be enabled by CONFIG.EEN before the UICR can be erased.\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum ERASEALL_A { + #[doc = "0: No operation"] + NO_OPERATION = 0, + #[doc = "1: Start chip erase"] + ERASE = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: ERASEALL_A) -> Self { + variant as u8 != 0 + } +} +impl ERASEALL_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> ERASEALL_A { + match self.bits { + false => ERASEALL_A::NO_OPERATION, + true => ERASEALL_A::ERASE, + } + } + #[doc = "Checks if the value of the field is `NO_OPERATION`"] + #[inline(always)] + pub fn is_no_operation(&self) -> bool { + *self == ERASEALL_A::NO_OPERATION + } + #[doc = "Checks if the value of the field is `ERASE`"] + #[inline(always)] + pub fn is_erase(&self) -> bool { + *self == ERASEALL_A::ERASE + } +} +#[doc = "Field `ERASEALL` writer - Erase all non-volatile memory including UICR registers. Note that code erase has to be enabled by CONFIG.EEN before the UICR can be erased."] +pub type ERASEALL_W<'a, const O: u8> = crate::BitWriter<'a, u32, ERASEALL_SPEC, ERASEALL_A, O>; +impl<'a, const O: u8> ERASEALL_W<'a, O> { + #[doc = "No operation"] + #[inline(always)] + pub fn no_operation(self) -> &'a mut W { + self.variant(ERASEALL_A::NO_OPERATION) + } + #[doc = "Start chip erase"] + #[inline(always)] + pub fn erase(self) -> &'a mut W { + self.variant(ERASEALL_A::ERASE) + } +} +impl R { + #[doc = "Bit 0 - Erase all non-volatile memory including UICR registers. Note that code erase has to be enabled by CONFIG.EEN before the UICR can be erased."] + #[inline(always)] + pub fn eraseall(&self) -> ERASEALL_R { + ERASEALL_R::new((self.bits & 1) != 0) + } +} +impl W { + #[doc = "Bit 0 - Erase all non-volatile memory including UICR registers. Note that code erase has to be enabled by CONFIG.EEN before the UICR can be erased."] + #[inline(always)] + #[must_use] + pub fn eraseall(&mut self) -> ERASEALL_W<0> { + ERASEALL_W::new(self) + } + #[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 = "Register for erasing all non-volatile user memory\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 [eraseall](index.html) module"] +pub struct ERASEALL_SPEC; +impl crate::RegisterSpec for ERASEALL_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [eraseall::R](R) reader structure"] +impl crate::Readable for ERASEALL_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [eraseall::W](W) writer structure"] +impl crate::Writable for ERASEALL_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets ERASEALL to value 0"] +impl crate::Resettable for ERASEALL_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/nvmc/erasepage.rs b/down-the-stack/dk_pac/src/nvmc/erasepage.rs new file mode 100644 index 0000000..219102c --- /dev/null +++ b/down-the-stack/dk_pac/src/nvmc/erasepage.rs @@ -0,0 +1,81 @@ +#[doc = "Register `ERASEPAGE` 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 `ERASEPAGE` 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 `ERASEPAGE` reader - Register for starting erase of a page in Code area"] +pub type ERASEPAGE_R = crate::FieldReader; +#[doc = "Field `ERASEPAGE` writer - Register for starting erase of a page in Code area"] +pub type ERASEPAGE_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, ERASEPAGE_SPEC, u32, u32, 32, O>; +impl R { + #[doc = "Bits 0:31 - Register for starting erase of a page in Code area"] + #[inline(always)] + pub fn erasepage(&self) -> ERASEPAGE_R { + ERASEPAGE_R::new(self.bits) + } +} +impl W { + #[doc = "Bits 0:31 - Register for starting erase of a page in Code area"] + #[inline(always)] + #[must_use] + pub fn erasepage(&mut self) -> ERASEPAGE_W<0> { + ERASEPAGE_W::new(self) + } + #[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 = "Register for erasing a page in Code area\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 [erasepage](index.html) module"] +pub struct ERASEPAGE_SPEC; +impl crate::RegisterSpec for ERASEPAGE_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [erasepage::R](R) reader structure"] +impl crate::Readable for ERASEPAGE_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [erasepage::W](W) writer structure"] +impl crate::Writable for ERASEPAGE_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets ERASEPAGE to value 0"] +impl crate::Resettable for ERASEPAGE_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/nvmc/erasepcr0.rs b/down-the-stack/dk_pac/src/nvmc/erasepcr0.rs new file mode 100644 index 0000000..5335cce --- /dev/null +++ b/down-the-stack/dk_pac/src/nvmc/erasepcr0.rs @@ -0,0 +1,81 @@ +#[doc = "Register `ERASEPCR0` 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 `ERASEPCR0` 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 `ERASEPCR0` reader - Register for starting erase of a page in Code area. Equivalent to ERASEPAGE."] +pub type ERASEPCR0_R = crate::FieldReader; +#[doc = "Field `ERASEPCR0` writer - Register for starting erase of a page in Code area. Equivalent to ERASEPAGE."] +pub type ERASEPCR0_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, ERASEPCR0_SPEC, u32, u32, 32, O>; +impl R { + #[doc = "Bits 0:31 - Register for starting erase of a page in Code area. Equivalent to ERASEPAGE."] + #[inline(always)] + pub fn erasepcr0(&self) -> ERASEPCR0_R { + ERASEPCR0_R::new(self.bits) + } +} +impl W { + #[doc = "Bits 0:31 - Register for starting erase of a page in Code area. Equivalent to ERASEPAGE."] + #[inline(always)] + #[must_use] + pub fn erasepcr0(&mut self) -> ERASEPCR0_W<0> { + ERASEPCR0_W::new(self) + } + #[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 = "Deprecated register - Register for erasing a page in Code area. Equivalent to ERASEPAGE.\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 [erasepcr0](index.html) module"] +pub struct ERASEPCR0_SPEC; +impl crate::RegisterSpec for ERASEPCR0_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [erasepcr0::R](R) reader structure"] +impl crate::Readable for ERASEPCR0_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [erasepcr0::W](W) writer structure"] +impl crate::Writable for ERASEPCR0_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets ERASEPCR0 to value 0"] +impl crate::Resettable for ERASEPCR0_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/nvmc/erasepcr1.rs b/down-the-stack/dk_pac/src/nvmc/erasepcr1.rs new file mode 100644 index 0000000..40020ea --- /dev/null +++ b/down-the-stack/dk_pac/src/nvmc/erasepcr1.rs @@ -0,0 +1,81 @@ +#[doc = "Register `ERASEPCR1` 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 `ERASEPCR1` 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 `ERASEPCR1` reader - Register for erasing a page in Code area. Equivalent to ERASEPAGE."] +pub type ERASEPCR1_R = crate::FieldReader; +#[doc = "Field `ERASEPCR1` writer - Register for erasing a page in Code area. Equivalent to ERASEPAGE."] +pub type ERASEPCR1_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, ERASEPCR1_SPEC, u32, u32, 32, O>; +impl R { + #[doc = "Bits 0:31 - Register for erasing a page in Code area. Equivalent to ERASEPAGE."] + #[inline(always)] + pub fn erasepcr1(&self) -> ERASEPCR1_R { + ERASEPCR1_R::new(self.bits) + } +} +impl W { + #[doc = "Bits 0:31 - Register for erasing a page in Code area. Equivalent to ERASEPAGE."] + #[inline(always)] + #[must_use] + pub fn erasepcr1(&mut self) -> ERASEPCR1_W<0> { + ERASEPCR1_W::new(self) + } + #[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 = "Deprecated register - Register for erasing a page in Code area. Equivalent to ERASEPAGE.\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 [erasepcr1](index.html) module"] +pub struct ERASEPCR1_SPEC; +impl crate::RegisterSpec for ERASEPCR1_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [erasepcr1::R](R) reader structure"] +impl crate::Readable for ERASEPCR1_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [erasepcr1::W](W) writer structure"] +impl crate::Writable for ERASEPCR1_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets ERASEPCR1 to value 0"] +impl crate::Resettable for ERASEPCR1_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/nvmc/eraseuicr.rs b/down-the-stack/dk_pac/src/nvmc/eraseuicr.rs new file mode 100644 index 0000000..07c3e97 --- /dev/null +++ b/down-the-stack/dk_pac/src/nvmc/eraseuicr.rs @@ -0,0 +1,126 @@ +#[doc = "Register `ERASEUICR` 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 `ERASEUICR` 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 `ERASEUICR` reader - Register starting erase of all User Information Configuration Registers. Note that code erase has to be enabled by CONFIG.EEN before the UICR can be erased."] +pub type ERASEUICR_R = crate::BitReader; +#[doc = "Register starting erase of all User Information Configuration Registers. Note that code erase has to be enabled by CONFIG.EEN before the UICR can be erased.\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum ERASEUICR_A { + #[doc = "0: No operation"] + NO_OPERATION = 0, + #[doc = "1: Start erase of UICR"] + ERASE = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: ERASEUICR_A) -> Self { + variant as u8 != 0 + } +} +impl ERASEUICR_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> ERASEUICR_A { + match self.bits { + false => ERASEUICR_A::NO_OPERATION, + true => ERASEUICR_A::ERASE, + } + } + #[doc = "Checks if the value of the field is `NO_OPERATION`"] + #[inline(always)] + pub fn is_no_operation(&self) -> bool { + *self == ERASEUICR_A::NO_OPERATION + } + #[doc = "Checks if the value of the field is `ERASE`"] + #[inline(always)] + pub fn is_erase(&self) -> bool { + *self == ERASEUICR_A::ERASE + } +} +#[doc = "Field `ERASEUICR` writer - Register starting erase of all User Information Configuration Registers. Note that code erase has to be enabled by CONFIG.EEN before the UICR can be erased."] +pub type ERASEUICR_W<'a, const O: u8> = crate::BitWriter<'a, u32, ERASEUICR_SPEC, ERASEUICR_A, O>; +impl<'a, const O: u8> ERASEUICR_W<'a, O> { + #[doc = "No operation"] + #[inline(always)] + pub fn no_operation(self) -> &'a mut W { + self.variant(ERASEUICR_A::NO_OPERATION) + } + #[doc = "Start erase of UICR"] + #[inline(always)] + pub fn erase(self) -> &'a mut W { + self.variant(ERASEUICR_A::ERASE) + } +} +impl R { + #[doc = "Bit 0 - Register starting erase of all User Information Configuration Registers. Note that code erase has to be enabled by CONFIG.EEN before the UICR can be erased."] + #[inline(always)] + pub fn eraseuicr(&self) -> ERASEUICR_R { + ERASEUICR_R::new((self.bits & 1) != 0) + } +} +impl W { + #[doc = "Bit 0 - Register starting erase of all User Information Configuration Registers. Note that code erase has to be enabled by CONFIG.EEN before the UICR can be erased."] + #[inline(always)] + #[must_use] + pub fn eraseuicr(&mut self) -> ERASEUICR_W<0> { + ERASEUICR_W::new(self) + } + #[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 = "Register for erasing User Information Configuration Registers\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 [eraseuicr](index.html) module"] +pub struct ERASEUICR_SPEC; +impl crate::RegisterSpec for ERASEUICR_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [eraseuicr::R](R) reader structure"] +impl crate::Readable for ERASEUICR_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [eraseuicr::W](W) writer structure"] +impl crate::Writable for ERASEUICR_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets ERASEUICR to value 0"] +impl crate::Resettable for ERASEUICR_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/nvmc/icachecnf.rs b/down-the-stack/dk_pac/src/nvmc/icachecnf.rs new file mode 100644 index 0000000..dc4d94e --- /dev/null +++ b/down-the-stack/dk_pac/src/nvmc/icachecnf.rs @@ -0,0 +1,188 @@ +#[doc = "Register `ICACHECNF` 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 `ICACHECNF` 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 `CACHEEN` reader - Cache enable"] +pub type CACHEEN_R = crate::BitReader; +#[doc = "Cache enable\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum CACHEEN_A { + #[doc = "0: Disable cache. Invalidates all cache entries."] + DISABLED = 0, + #[doc = "1: Enable cache"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: CACHEEN_A) -> Self { + variant as u8 != 0 + } +} +impl CACHEEN_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> CACHEEN_A { + match self.bits { + false => CACHEEN_A::DISABLED, + true => CACHEEN_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == CACHEEN_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == CACHEEN_A::ENABLED + } +} +#[doc = "Field `CACHEEN` writer - Cache enable"] +pub type CACHEEN_W<'a, const O: u8> = crate::BitWriter<'a, u32, ICACHECNF_SPEC, CACHEEN_A, O>; +impl<'a, const O: u8> CACHEEN_W<'a, O> { + #[doc = "Disable cache. Invalidates all cache entries."] + #[inline(always)] + pub fn disabled(self) -> &'a mut W { + self.variant(CACHEEN_A::DISABLED) + } + #[doc = "Enable cache"] + #[inline(always)] + pub fn enabled(self) -> &'a mut W { + self.variant(CACHEEN_A::ENABLED) + } +} +#[doc = "Field `CACHEPROFEN` reader - Cache profiling enable"] +pub type CACHEPROFEN_R = crate::BitReader; +#[doc = "Cache profiling enable\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum CACHEPROFEN_A { + #[doc = "0: Disable cache profiling"] + DISABLED = 0, + #[doc = "1: Enable cache profiling"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: CACHEPROFEN_A) -> Self { + variant as u8 != 0 + } +} +impl CACHEPROFEN_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> CACHEPROFEN_A { + match self.bits { + false => CACHEPROFEN_A::DISABLED, + true => CACHEPROFEN_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == CACHEPROFEN_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == CACHEPROFEN_A::ENABLED + } +} +#[doc = "Field `CACHEPROFEN` writer - Cache profiling enable"] +pub type CACHEPROFEN_W<'a, const O: u8> = + crate::BitWriter<'a, u32, ICACHECNF_SPEC, CACHEPROFEN_A, O>; +impl<'a, const O: u8> CACHEPROFEN_W<'a, O> { + #[doc = "Disable cache profiling"] + #[inline(always)] + pub fn disabled(self) -> &'a mut W { + self.variant(CACHEPROFEN_A::DISABLED) + } + #[doc = "Enable cache profiling"] + #[inline(always)] + pub fn enabled(self) -> &'a mut W { + self.variant(CACHEPROFEN_A::ENABLED) + } +} +impl R { + #[doc = "Bit 0 - Cache enable"] + #[inline(always)] + pub fn cacheen(&self) -> CACHEEN_R { + CACHEEN_R::new((self.bits & 1) != 0) + } + #[doc = "Bit 8 - Cache profiling enable"] + #[inline(always)] + pub fn cacheprofen(&self) -> CACHEPROFEN_R { + CACHEPROFEN_R::new(((self.bits >> 8) & 1) != 0) + } +} +impl W { + #[doc = "Bit 0 - Cache enable"] + #[inline(always)] + #[must_use] + pub fn cacheen(&mut self) -> CACHEEN_W<0> { + CACHEEN_W::new(self) + } + #[doc = "Bit 8 - Cache profiling enable"] + #[inline(always)] + #[must_use] + pub fn cacheprofen(&mut self) -> CACHEPROFEN_W<8> { + CACHEPROFEN_W::new(self) + } + #[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 = "I-Code cache configuration register.\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 [icachecnf](index.html) module"] +pub struct ICACHECNF_SPEC; +impl crate::RegisterSpec for ICACHECNF_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [icachecnf::R](R) reader structure"] +impl crate::Readable for ICACHECNF_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [icachecnf::W](W) writer structure"] +impl crate::Writable for ICACHECNF_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets ICACHECNF to value 0"] +impl crate::Resettable for ICACHECNF_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/nvmc/ihit.rs b/down-the-stack/dk_pac/src/nvmc/ihit.rs new file mode 100644 index 0000000..023c50f --- /dev/null +++ b/down-the-stack/dk_pac/src/nvmc/ihit.rs @@ -0,0 +1,80 @@ +#[doc = "Register `IHIT` 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 `IHIT` 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 `HITS` reader - Number of cache hits"] +pub type HITS_R = crate::FieldReader; +#[doc = "Field `HITS` writer - Number of cache hits"] +pub type HITS_W<'a, const O: u8> = crate::FieldWriter<'a, u32, IHIT_SPEC, u32, u32, 32, O>; +impl R { + #[doc = "Bits 0:31 - Number of cache hits"] + #[inline(always)] + pub fn hits(&self) -> HITS_R { + HITS_R::new(self.bits) + } +} +impl W { + #[doc = "Bits 0:31 - Number of cache hits"] + #[inline(always)] + #[must_use] + pub fn hits(&mut self) -> HITS_W<0> { + HITS_W::new(self) + } + #[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 = "I-Code cache hit counter.\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 [ihit](index.html) module"] +pub struct IHIT_SPEC; +impl crate::RegisterSpec for IHIT_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [ihit::R](R) reader structure"] +impl crate::Readable for IHIT_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [ihit::W](W) writer structure"] +impl crate::Writable for IHIT_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets IHIT to value 0"] +impl crate::Resettable for IHIT_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/nvmc/imiss.rs b/down-the-stack/dk_pac/src/nvmc/imiss.rs new file mode 100644 index 0000000..54a866b --- /dev/null +++ b/down-the-stack/dk_pac/src/nvmc/imiss.rs @@ -0,0 +1,80 @@ +#[doc = "Register `IMISS` 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 `IMISS` 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 `MISSES` reader - Number of cache misses"] +pub type MISSES_R = crate::FieldReader; +#[doc = "Field `MISSES` writer - Number of cache misses"] +pub type MISSES_W<'a, const O: u8> = crate::FieldWriter<'a, u32, IMISS_SPEC, u32, u32, 32, O>; +impl R { + #[doc = "Bits 0:31 - Number of cache misses"] + #[inline(always)] + pub fn misses(&self) -> MISSES_R { + MISSES_R::new(self.bits) + } +} +impl W { + #[doc = "Bits 0:31 - Number of cache misses"] + #[inline(always)] + #[must_use] + pub fn misses(&mut self) -> MISSES_W<0> { + MISSES_W::new(self) + } + #[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 = "I-Code cache miss counter.\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 [imiss](index.html) module"] +pub struct IMISS_SPEC; +impl crate::RegisterSpec for IMISS_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [imiss::R](R) reader structure"] +impl crate::Readable for IMISS_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [imiss::W](W) writer structure"] +impl crate::Writable for IMISS_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets IMISS to value 0"] +impl crate::Resettable for IMISS_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/nvmc/ready.rs b/down-the-stack/dk_pac/src/nvmc/ready.rs new file mode 100644 index 0000000..6dc491e --- /dev/null +++ b/down-the-stack/dk_pac/src/nvmc/ready.rs @@ -0,0 +1,71 @@ +#[doc = "Register `READY` 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 = "Field `READY` reader - NVMC is ready or busy"] +pub type READY_R = crate::BitReader; +#[doc = "NVMC is ready or busy\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum READY_A { + #[doc = "0: NVMC is busy (on-going write or erase operation)"] + BUSY = 0, + #[doc = "1: NVMC is ready"] + READY = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: READY_A) -> Self { + variant as u8 != 0 + } +} +impl READY_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> READY_A { + match self.bits { + false => READY_A::BUSY, + true => READY_A::READY, + } + } + #[doc = "Checks if the value of the field is `BUSY`"] + #[inline(always)] + pub fn is_busy(&self) -> bool { + *self == READY_A::BUSY + } + #[doc = "Checks if the value of the field is `READY`"] + #[inline(always)] + pub fn is_ready(&self) -> bool { + *self == READY_A::READY + } +} +impl R { + #[doc = "Bit 0 - NVMC is ready or busy"] + #[inline(always)] + pub fn ready(&self) -> READY_R { + READY_R::new((self.bits & 1) != 0) + } +} +#[doc = "Ready flag\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 [ready](index.html) module"] +pub struct READY_SPEC; +impl crate::RegisterSpec for READY_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [ready::R](R) reader structure"] +impl crate::Readable for READY_SPEC { + type Reader = R; +} +#[doc = "`reset()` method sets READY to value 0"] +impl crate::Resettable for READY_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/p0.rs b/down-the-stack/dk_pac/src/p0.rs new file mode 100644 index 0000000..8637552 --- /dev/null +++ b/down-the-stack/dk_pac/src/p0.rs @@ -0,0 +1,66 @@ +#[doc = r"Register block"] +#[repr(C)] +pub struct RegisterBlock { + _reserved0: [u8; 0x0504], + #[doc = "0x504 - Write GPIO port"] + pub out: OUT, + #[doc = "0x508 - Set individual bits in GPIO port"] + pub outset: OUTSET, + #[doc = "0x50c - Clear individual bits in GPIO port"] + pub outclr: OUTCLR, + #[doc = "0x510 - Read GPIO port"] + pub in_: IN, + #[doc = "0x514 - Direction of GPIO pins"] + pub dir: DIR, + #[doc = "0x518 - DIR set register"] + pub dirset: DIRSET, + #[doc = "0x51c - DIR clear register"] + pub dirclr: DIRCLR, + #[doc = "0x520 - Latch register indicating what GPIO pins that have met the criteria set in the PIN_CNF\\[n\\].SENSE registers"] + pub latch: LATCH, + #[doc = "0x524 - Select between default DETECT signal behaviour and LDETECT mode"] + pub detectmode: DETECTMODE, + _reserved9: [u8; 0x01d8], + #[doc = "0x700..0x780 - Description collection: Configuration of GPIO pins"] + pub pin_cnf: [PIN_CNF; 32], +} +#[doc = "OUT (rw) register accessor: an alias for `Reg`"] +pub type OUT = crate::Reg; +#[doc = "Write GPIO port"] +pub mod out; +#[doc = "OUTSET (rw) register accessor: an alias for `Reg`"] +pub type OUTSET = crate::Reg; +#[doc = "Set individual bits in GPIO port"] +pub mod outset; +#[doc = "OUTCLR (rw) register accessor: an alias for `Reg`"] +pub type OUTCLR = crate::Reg; +#[doc = "Clear individual bits in GPIO port"] +pub mod outclr; +#[doc = "IN (r) register accessor: an alias for `Reg`"] +pub type IN = crate::Reg; +#[doc = "Read GPIO port"] +pub mod in_; +#[doc = "DIR (rw) register accessor: an alias for `Reg`"] +pub type DIR = crate::Reg; +#[doc = "Direction of GPIO pins"] +pub mod dir; +#[doc = "DIRSET (rw) register accessor: an alias for `Reg`"] +pub type DIRSET = crate::Reg; +#[doc = "DIR set register"] +pub mod dirset; +#[doc = "DIRCLR (rw) register accessor: an alias for `Reg`"] +pub type DIRCLR = crate::Reg; +#[doc = "DIR clear register"] +pub mod dirclr; +#[doc = "LATCH (rw) register accessor: an alias for `Reg`"] +pub type LATCH = crate::Reg; +#[doc = "Latch register indicating what GPIO pins that have met the criteria set in the PIN_CNF\\[n\\].SENSE registers"] +pub mod latch; +#[doc = "DETECTMODE (rw) register accessor: an alias for `Reg`"] +pub type DETECTMODE = crate::Reg; +#[doc = "Select between default DETECT signal behaviour and LDETECT mode"] +pub mod detectmode; +#[doc = "PIN_CNF (rw) register accessor: an alias for `Reg`"] +pub type PIN_CNF = crate::Reg; +#[doc = "Description collection: Configuration of GPIO pins"] +pub mod pin_cnf; diff --git a/down-the-stack/dk_pac/src/p0/detectmode.rs b/down-the-stack/dk_pac/src/p0/detectmode.rs new file mode 100644 index 0000000..0eafb2d --- /dev/null +++ b/down-the-stack/dk_pac/src/p0/detectmode.rs @@ -0,0 +1,127 @@ +#[doc = "Register `DETECTMODE` 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 `DETECTMODE` 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 `DETECTMODE` reader - Select between default DETECT signal behaviour and LDETECT mode"] +pub type DETECTMODE_R = crate::BitReader; +#[doc = "Select between default DETECT signal behaviour and LDETECT mode\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum DETECTMODE_A { + #[doc = "0: DETECT directly connected to PIN DETECT signals"] + DEFAULT = 0, + #[doc = "1: Use the latched LDETECT behaviour"] + LDETECT = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: DETECTMODE_A) -> Self { + variant as u8 != 0 + } +} +impl DETECTMODE_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> DETECTMODE_A { + match self.bits { + false => DETECTMODE_A::DEFAULT, + true => DETECTMODE_A::LDETECT, + } + } + #[doc = "Checks if the value of the field is `DEFAULT`"] + #[inline(always)] + pub fn is_default(&self) -> bool { + *self == DETECTMODE_A::DEFAULT + } + #[doc = "Checks if the value of the field is `LDETECT`"] + #[inline(always)] + pub fn is_ldetect(&self) -> bool { + *self == DETECTMODE_A::LDETECT + } +} +#[doc = "Field `DETECTMODE` writer - Select between default DETECT signal behaviour and LDETECT mode"] +pub type DETECTMODE_W<'a, const O: u8> = + crate::BitWriter<'a, u32, DETECTMODE_SPEC, DETECTMODE_A, O>; +impl<'a, const O: u8> DETECTMODE_W<'a, O> { + #[doc = "DETECT directly connected to PIN DETECT signals"] + #[inline(always)] + pub fn default(self) -> &'a mut W { + self.variant(DETECTMODE_A::DEFAULT) + } + #[doc = "Use the latched LDETECT behaviour"] + #[inline(always)] + pub fn ldetect(self) -> &'a mut W { + self.variant(DETECTMODE_A::LDETECT) + } +} +impl R { + #[doc = "Bit 0 - Select between default DETECT signal behaviour and LDETECT mode"] + #[inline(always)] + pub fn detectmode(&self) -> DETECTMODE_R { + DETECTMODE_R::new((self.bits & 1) != 0) + } +} +impl W { + #[doc = "Bit 0 - Select between default DETECT signal behaviour and LDETECT mode"] + #[inline(always)] + #[must_use] + pub fn detectmode(&mut self) -> DETECTMODE_W<0> { + DETECTMODE_W::new(self) + } + #[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 = "Select between default DETECT signal behaviour and LDETECT mode\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 [detectmode](index.html) module"] +pub struct DETECTMODE_SPEC; +impl crate::RegisterSpec for DETECTMODE_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [detectmode::R](R) reader structure"] +impl crate::Readable for DETECTMODE_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [detectmode::W](W) writer structure"] +impl crate::Writable for DETECTMODE_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets DETECTMODE to value 0"] +impl crate::Resettable for DETECTMODE_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/p0/dir.rs b/down-the-stack/dk_pac/src/p0/dir.rs new file mode 100644 index 0000000..99ea401 --- /dev/null +++ b/down-the-stack/dk_pac/src/p0/dir.rs @@ -0,0 +1,2017 @@ +#[doc = "Register `DIR` 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 `DIR` 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 `PIN0` reader - Pin 0"] +pub type PIN0_R = crate::BitReader; +#[doc = "Pin 0\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PIN0_A { + #[doc = "0: Pin set as input"] + INPUT = 0, + #[doc = "1: Pin set as output"] + OUTPUT = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PIN0_A) -> Self { + variant as u8 != 0 + } +} +impl PIN0_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> PIN0_A { + match self.bits { + false => PIN0_A::INPUT, + true => PIN0_A::OUTPUT, + } + } + #[doc = "Checks if the value of the field is `INPUT`"] + #[inline(always)] + pub fn is_input(&self) -> bool { + *self == PIN0_A::INPUT + } + #[doc = "Checks if the value of the field is `OUTPUT`"] + #[inline(always)] + pub fn is_output(&self) -> bool { + *self == PIN0_A::OUTPUT + } +} +#[doc = "Field `PIN0` writer - Pin 0"] +pub type PIN0_W<'a, const O: u8> = crate::BitWriter<'a, u32, DIR_SPEC, PIN0_A, O>; +impl<'a, const O: u8> PIN0_W<'a, O> { + #[doc = "Pin set as input"] + #[inline(always)] + pub fn input(self) -> &'a mut W { + self.variant(PIN0_A::INPUT) + } + #[doc = "Pin set as output"] + #[inline(always)] + pub fn output(self) -> &'a mut W { + self.variant(PIN0_A::OUTPUT) + } +} +#[doc = "Field `PIN1` reader - Pin 1"] +pub type PIN1_R = crate::BitReader; +#[doc = "Pin 1\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PIN1_A { + #[doc = "0: Pin set as input"] + INPUT = 0, + #[doc = "1: Pin set as output"] + OUTPUT = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PIN1_A) -> Self { + variant as u8 != 0 + } +} +impl PIN1_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> PIN1_A { + match self.bits { + false => PIN1_A::INPUT, + true => PIN1_A::OUTPUT, + } + } + #[doc = "Checks if the value of the field is `INPUT`"] + #[inline(always)] + pub fn is_input(&self) -> bool { + *self == PIN1_A::INPUT + } + #[doc = "Checks if the value of the field is `OUTPUT`"] + #[inline(always)] + pub fn is_output(&self) -> bool { + *self == PIN1_A::OUTPUT + } +} +#[doc = "Field `PIN1` writer - Pin 1"] +pub type PIN1_W<'a, const O: u8> = crate::BitWriter<'a, u32, DIR_SPEC, PIN1_A, O>; +impl<'a, const O: u8> PIN1_W<'a, O> { + #[doc = "Pin set as input"] + #[inline(always)] + pub fn input(self) -> &'a mut W { + self.variant(PIN1_A::INPUT) + } + #[doc = "Pin set as output"] + #[inline(always)] + pub fn output(self) -> &'a mut W { + self.variant(PIN1_A::OUTPUT) + } +} +#[doc = "Field `PIN2` reader - Pin 2"] +pub type PIN2_R = crate::BitReader; +#[doc = "Pin 2\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PIN2_A { + #[doc = "0: Pin set as input"] + INPUT = 0, + #[doc = "1: Pin set as output"] + OUTPUT = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PIN2_A) -> Self { + variant as u8 != 0 + } +} +impl PIN2_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> PIN2_A { + match self.bits { + false => PIN2_A::INPUT, + true => PIN2_A::OUTPUT, + } + } + #[doc = "Checks if the value of the field is `INPUT`"] + #[inline(always)] + pub fn is_input(&self) -> bool { + *self == PIN2_A::INPUT + } + #[doc = "Checks if the value of the field is `OUTPUT`"] + #[inline(always)] + pub fn is_output(&self) -> bool { + *self == PIN2_A::OUTPUT + } +} +#[doc = "Field `PIN2` writer - Pin 2"] +pub type PIN2_W<'a, const O: u8> = crate::BitWriter<'a, u32, DIR_SPEC, PIN2_A, O>; +impl<'a, const O: u8> PIN2_W<'a, O> { + #[doc = "Pin set as input"] + #[inline(always)] + pub fn input(self) -> &'a mut W { + self.variant(PIN2_A::INPUT) + } + #[doc = "Pin set as output"] + #[inline(always)] + pub fn output(self) -> &'a mut W { + self.variant(PIN2_A::OUTPUT) + } +} +#[doc = "Field `PIN3` reader - Pin 3"] +pub type PIN3_R = crate::BitReader; +#[doc = "Pin 3\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PIN3_A { + #[doc = "0: Pin set as input"] + INPUT = 0, + #[doc = "1: Pin set as output"] + OUTPUT = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PIN3_A) -> Self { + variant as u8 != 0 + } +} +impl PIN3_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> PIN3_A { + match self.bits { + false => PIN3_A::INPUT, + true => PIN3_A::OUTPUT, + } + } + #[doc = "Checks if the value of the field is `INPUT`"] + #[inline(always)] + pub fn is_input(&self) -> bool { + *self == PIN3_A::INPUT + } + #[doc = "Checks if the value of the field is `OUTPUT`"] + #[inline(always)] + pub fn is_output(&self) -> bool { + *self == PIN3_A::OUTPUT + } +} +#[doc = "Field `PIN3` writer - Pin 3"] +pub type PIN3_W<'a, const O: u8> = crate::BitWriter<'a, u32, DIR_SPEC, PIN3_A, O>; +impl<'a, const O: u8> PIN3_W<'a, O> { + #[doc = "Pin set as input"] + #[inline(always)] + pub fn input(self) -> &'a mut W { + self.variant(PIN3_A::INPUT) + } + #[doc = "Pin set as output"] + #[inline(always)] + pub fn output(self) -> &'a mut W { + self.variant(PIN3_A::OUTPUT) + } +} +#[doc = "Field `PIN4` reader - Pin 4"] +pub type PIN4_R = crate::BitReader; +#[doc = "Pin 4\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PIN4_A { + #[doc = "0: Pin set as input"] + INPUT = 0, + #[doc = "1: Pin set as output"] + OUTPUT = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PIN4_A) -> Self { + variant as u8 != 0 + } +} +impl PIN4_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> PIN4_A { + match self.bits { + false => PIN4_A::INPUT, + true => PIN4_A::OUTPUT, + } + } + #[doc = "Checks if the value of the field is `INPUT`"] + #[inline(always)] + pub fn is_input(&self) -> bool { + *self == PIN4_A::INPUT + } + #[doc = "Checks if the value of the field is `OUTPUT`"] + #[inline(always)] + pub fn is_output(&self) -> bool { + *self == PIN4_A::OUTPUT + } +} +#[doc = "Field `PIN4` writer - Pin 4"] +pub type PIN4_W<'a, const O: u8> = crate::BitWriter<'a, u32, DIR_SPEC, PIN4_A, O>; +impl<'a, const O: u8> PIN4_W<'a, O> { + #[doc = "Pin set as input"] + #[inline(always)] + pub fn input(self) -> &'a mut W { + self.variant(PIN4_A::INPUT) + } + #[doc = "Pin set as output"] + #[inline(always)] + pub fn output(self) -> &'a mut W { + self.variant(PIN4_A::OUTPUT) + } +} +#[doc = "Field `PIN5` reader - Pin 5"] +pub type PIN5_R = crate::BitReader; +#[doc = "Pin 5\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PIN5_A { + #[doc = "0: Pin set as input"] + INPUT = 0, + #[doc = "1: Pin set as output"] + OUTPUT = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PIN5_A) -> Self { + variant as u8 != 0 + } +} +impl PIN5_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> PIN5_A { + match self.bits { + false => PIN5_A::INPUT, + true => PIN5_A::OUTPUT, + } + } + #[doc = "Checks if the value of the field is `INPUT`"] + #[inline(always)] + pub fn is_input(&self) -> bool { + *self == PIN5_A::INPUT + } + #[doc = "Checks if the value of the field is `OUTPUT`"] + #[inline(always)] + pub fn is_output(&self) -> bool { + *self == PIN5_A::OUTPUT + } +} +#[doc = "Field `PIN5` writer - Pin 5"] +pub type PIN5_W<'a, const O: u8> = crate::BitWriter<'a, u32, DIR_SPEC, PIN5_A, O>; +impl<'a, const O: u8> PIN5_W<'a, O> { + #[doc = "Pin set as input"] + #[inline(always)] + pub fn input(self) -> &'a mut W { + self.variant(PIN5_A::INPUT) + } + #[doc = "Pin set as output"] + #[inline(always)] + pub fn output(self) -> &'a mut W { + self.variant(PIN5_A::OUTPUT) + } +} +#[doc = "Field `PIN6` reader - Pin 6"] +pub type PIN6_R = crate::BitReader; +#[doc = "Pin 6\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PIN6_A { + #[doc = "0: Pin set as input"] + INPUT = 0, + #[doc = "1: Pin set as output"] + OUTPUT = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PIN6_A) -> Self { + variant as u8 != 0 + } +} +impl PIN6_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> PIN6_A { + match self.bits { + false => PIN6_A::INPUT, + true => PIN6_A::OUTPUT, + } + } + #[doc = "Checks if the value of the field is `INPUT`"] + #[inline(always)] + pub fn is_input(&self) -> bool { + *self == PIN6_A::INPUT + } + #[doc = "Checks if the value of the field is `OUTPUT`"] + #[inline(always)] + pub fn is_output(&self) -> bool { + *self == PIN6_A::OUTPUT + } +} +#[doc = "Field `PIN6` writer - Pin 6"] +pub type PIN6_W<'a, const O: u8> = crate::BitWriter<'a, u32, DIR_SPEC, PIN6_A, O>; +impl<'a, const O: u8> PIN6_W<'a, O> { + #[doc = "Pin set as input"] + #[inline(always)] + pub fn input(self) -> &'a mut W { + self.variant(PIN6_A::INPUT) + } + #[doc = "Pin set as output"] + #[inline(always)] + pub fn output(self) -> &'a mut W { + self.variant(PIN6_A::OUTPUT) + } +} +#[doc = "Field `PIN7` reader - Pin 7"] +pub type PIN7_R = crate::BitReader; +#[doc = "Pin 7\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PIN7_A { + #[doc = "0: Pin set as input"] + INPUT = 0, + #[doc = "1: Pin set as output"] + OUTPUT = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PIN7_A) -> Self { + variant as u8 != 0 + } +} +impl PIN7_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> PIN7_A { + match self.bits { + false => PIN7_A::INPUT, + true => PIN7_A::OUTPUT, + } + } + #[doc = "Checks if the value of the field is `INPUT`"] + #[inline(always)] + pub fn is_input(&self) -> bool { + *self == PIN7_A::INPUT + } + #[doc = "Checks if the value of the field is `OUTPUT`"] + #[inline(always)] + pub fn is_output(&self) -> bool { + *self == PIN7_A::OUTPUT + } +} +#[doc = "Field `PIN7` writer - Pin 7"] +pub type PIN7_W<'a, const O: u8> = crate::BitWriter<'a, u32, DIR_SPEC, PIN7_A, O>; +impl<'a, const O: u8> PIN7_W<'a, O> { + #[doc = "Pin set as input"] + #[inline(always)] + pub fn input(self) -> &'a mut W { + self.variant(PIN7_A::INPUT) + } + #[doc = "Pin set as output"] + #[inline(always)] + pub fn output(self) -> &'a mut W { + self.variant(PIN7_A::OUTPUT) + } +} +#[doc = "Field `PIN8` reader - Pin 8"] +pub type PIN8_R = crate::BitReader; +#[doc = "Pin 8\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PIN8_A { + #[doc = "0: Pin set as input"] + INPUT = 0, + #[doc = "1: Pin set as output"] + OUTPUT = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PIN8_A) -> Self { + variant as u8 != 0 + } +} +impl PIN8_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> PIN8_A { + match self.bits { + false => PIN8_A::INPUT, + true => PIN8_A::OUTPUT, + } + } + #[doc = "Checks if the value of the field is `INPUT`"] + #[inline(always)] + pub fn is_input(&self) -> bool { + *self == PIN8_A::INPUT + } + #[doc = "Checks if the value of the field is `OUTPUT`"] + #[inline(always)] + pub fn is_output(&self) -> bool { + *self == PIN8_A::OUTPUT + } +} +#[doc = "Field `PIN8` writer - Pin 8"] +pub type PIN8_W<'a, const O: u8> = crate::BitWriter<'a, u32, DIR_SPEC, PIN8_A, O>; +impl<'a, const O: u8> PIN8_W<'a, O> { + #[doc = "Pin set as input"] + #[inline(always)] + pub fn input(self) -> &'a mut W { + self.variant(PIN8_A::INPUT) + } + #[doc = "Pin set as output"] + #[inline(always)] + pub fn output(self) -> &'a mut W { + self.variant(PIN8_A::OUTPUT) + } +} +#[doc = "Field `PIN9` reader - Pin 9"] +pub type PIN9_R = crate::BitReader; +#[doc = "Pin 9\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PIN9_A { + #[doc = "0: Pin set as input"] + INPUT = 0, + #[doc = "1: Pin set as output"] + OUTPUT = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PIN9_A) -> Self { + variant as u8 != 0 + } +} +impl PIN9_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> PIN9_A { + match self.bits { + false => PIN9_A::INPUT, + true => PIN9_A::OUTPUT, + } + } + #[doc = "Checks if the value of the field is `INPUT`"] + #[inline(always)] + pub fn is_input(&self) -> bool { + *self == PIN9_A::INPUT + } + #[doc = "Checks if the value of the field is `OUTPUT`"] + #[inline(always)] + pub fn is_output(&self) -> bool { + *self == PIN9_A::OUTPUT + } +} +#[doc = "Field `PIN9` writer - Pin 9"] +pub type PIN9_W<'a, const O: u8> = crate::BitWriter<'a, u32, DIR_SPEC, PIN9_A, O>; +impl<'a, const O: u8> PIN9_W<'a, O> { + #[doc = "Pin set as input"] + #[inline(always)] + pub fn input(self) -> &'a mut W { + self.variant(PIN9_A::INPUT) + } + #[doc = "Pin set as output"] + #[inline(always)] + pub fn output(self) -> &'a mut W { + self.variant(PIN9_A::OUTPUT) + } +} +#[doc = "Field `PIN10` reader - Pin 10"] +pub type PIN10_R = crate::BitReader; +#[doc = "Pin 10\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PIN10_A { + #[doc = "0: Pin set as input"] + INPUT = 0, + #[doc = "1: Pin set as output"] + OUTPUT = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PIN10_A) -> Self { + variant as u8 != 0 + } +} +impl PIN10_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> PIN10_A { + match self.bits { + false => PIN10_A::INPUT, + true => PIN10_A::OUTPUT, + } + } + #[doc = "Checks if the value of the field is `INPUT`"] + #[inline(always)] + pub fn is_input(&self) -> bool { + *self == PIN10_A::INPUT + } + #[doc = "Checks if the value of the field is `OUTPUT`"] + #[inline(always)] + pub fn is_output(&self) -> bool { + *self == PIN10_A::OUTPUT + } +} +#[doc = "Field `PIN10` writer - Pin 10"] +pub type PIN10_W<'a, const O: u8> = crate::BitWriter<'a, u32, DIR_SPEC, PIN10_A, O>; +impl<'a, const O: u8> PIN10_W<'a, O> { + #[doc = "Pin set as input"] + #[inline(always)] + pub fn input(self) -> &'a mut W { + self.variant(PIN10_A::INPUT) + } + #[doc = "Pin set as output"] + #[inline(always)] + pub fn output(self) -> &'a mut W { + self.variant(PIN10_A::OUTPUT) + } +} +#[doc = "Field `PIN11` reader - Pin 11"] +pub type PIN11_R = crate::BitReader; +#[doc = "Pin 11\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PIN11_A { + #[doc = "0: Pin set as input"] + INPUT = 0, + #[doc = "1: Pin set as output"] + OUTPUT = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PIN11_A) -> Self { + variant as u8 != 0 + } +} +impl PIN11_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> PIN11_A { + match self.bits { + false => PIN11_A::INPUT, + true => PIN11_A::OUTPUT, + } + } + #[doc = "Checks if the value of the field is `INPUT`"] + #[inline(always)] + pub fn is_input(&self) -> bool { + *self == PIN11_A::INPUT + } + #[doc = "Checks if the value of the field is `OUTPUT`"] + #[inline(always)] + pub fn is_output(&self) -> bool { + *self == PIN11_A::OUTPUT + } +} +#[doc = "Field `PIN11` writer - Pin 11"] +pub type PIN11_W<'a, const O: u8> = crate::BitWriter<'a, u32, DIR_SPEC, PIN11_A, O>; +impl<'a, const O: u8> PIN11_W<'a, O> { + #[doc = "Pin set as input"] + #[inline(always)] + pub fn input(self) -> &'a mut W { + self.variant(PIN11_A::INPUT) + } + #[doc = "Pin set as output"] + #[inline(always)] + pub fn output(self) -> &'a mut W { + self.variant(PIN11_A::OUTPUT) + } +} +#[doc = "Field `PIN12` reader - Pin 12"] +pub type PIN12_R = crate::BitReader; +#[doc = "Pin 12\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PIN12_A { + #[doc = "0: Pin set as input"] + INPUT = 0, + #[doc = "1: Pin set as output"] + OUTPUT = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PIN12_A) -> Self { + variant as u8 != 0 + } +} +impl PIN12_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> PIN12_A { + match self.bits { + false => PIN12_A::INPUT, + true => PIN12_A::OUTPUT, + } + } + #[doc = "Checks if the value of the field is `INPUT`"] + #[inline(always)] + pub fn is_input(&self) -> bool { + *self == PIN12_A::INPUT + } + #[doc = "Checks if the value of the field is `OUTPUT`"] + #[inline(always)] + pub fn is_output(&self) -> bool { + *self == PIN12_A::OUTPUT + } +} +#[doc = "Field `PIN12` writer - Pin 12"] +pub type PIN12_W<'a, const O: u8> = crate::BitWriter<'a, u32, DIR_SPEC, PIN12_A, O>; +impl<'a, const O: u8> PIN12_W<'a, O> { + #[doc = "Pin set as input"] + #[inline(always)] + pub fn input(self) -> &'a mut W { + self.variant(PIN12_A::INPUT) + } + #[doc = "Pin set as output"] + #[inline(always)] + pub fn output(self) -> &'a mut W { + self.variant(PIN12_A::OUTPUT) + } +} +#[doc = "Field `PIN13` reader - Pin 13"] +pub type PIN13_R = crate::BitReader; +#[doc = "Pin 13\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PIN13_A { + #[doc = "0: Pin set as input"] + INPUT = 0, + #[doc = "1: Pin set as output"] + OUTPUT = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PIN13_A) -> Self { + variant as u8 != 0 + } +} +impl PIN13_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> PIN13_A { + match self.bits { + false => PIN13_A::INPUT, + true => PIN13_A::OUTPUT, + } + } + #[doc = "Checks if the value of the field is `INPUT`"] + #[inline(always)] + pub fn is_input(&self) -> bool { + *self == PIN13_A::INPUT + } + #[doc = "Checks if the value of the field is `OUTPUT`"] + #[inline(always)] + pub fn is_output(&self) -> bool { + *self == PIN13_A::OUTPUT + } +} +#[doc = "Field `PIN13` writer - Pin 13"] +pub type PIN13_W<'a, const O: u8> = crate::BitWriter<'a, u32, DIR_SPEC, PIN13_A, O>; +impl<'a, const O: u8> PIN13_W<'a, O> { + #[doc = "Pin set as input"] + #[inline(always)] + pub fn input(self) -> &'a mut W { + self.variant(PIN13_A::INPUT) + } + #[doc = "Pin set as output"] + #[inline(always)] + pub fn output(self) -> &'a mut W { + self.variant(PIN13_A::OUTPUT) + } +} +#[doc = "Field `PIN14` reader - Pin 14"] +pub type PIN14_R = crate::BitReader; +#[doc = "Pin 14\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PIN14_A { + #[doc = "0: Pin set as input"] + INPUT = 0, + #[doc = "1: Pin set as output"] + OUTPUT = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PIN14_A) -> Self { + variant as u8 != 0 + } +} +impl PIN14_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> PIN14_A { + match self.bits { + false => PIN14_A::INPUT, + true => PIN14_A::OUTPUT, + } + } + #[doc = "Checks if the value of the field is `INPUT`"] + #[inline(always)] + pub fn is_input(&self) -> bool { + *self == PIN14_A::INPUT + } + #[doc = "Checks if the value of the field is `OUTPUT`"] + #[inline(always)] + pub fn is_output(&self) -> bool { + *self == PIN14_A::OUTPUT + } +} +#[doc = "Field `PIN14` writer - Pin 14"] +pub type PIN14_W<'a, const O: u8> = crate::BitWriter<'a, u32, DIR_SPEC, PIN14_A, O>; +impl<'a, const O: u8> PIN14_W<'a, O> { + #[doc = "Pin set as input"] + #[inline(always)] + pub fn input(self) -> &'a mut W { + self.variant(PIN14_A::INPUT) + } + #[doc = "Pin set as output"] + #[inline(always)] + pub fn output(self) -> &'a mut W { + self.variant(PIN14_A::OUTPUT) + } +} +#[doc = "Field `PIN15` reader - Pin 15"] +pub type PIN15_R = crate::BitReader; +#[doc = "Pin 15\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PIN15_A { + #[doc = "0: Pin set as input"] + INPUT = 0, + #[doc = "1: Pin set as output"] + OUTPUT = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PIN15_A) -> Self { + variant as u8 != 0 + } +} +impl PIN15_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> PIN15_A { + match self.bits { + false => PIN15_A::INPUT, + true => PIN15_A::OUTPUT, + } + } + #[doc = "Checks if the value of the field is `INPUT`"] + #[inline(always)] + pub fn is_input(&self) -> bool { + *self == PIN15_A::INPUT + } + #[doc = "Checks if the value of the field is `OUTPUT`"] + #[inline(always)] + pub fn is_output(&self) -> bool { + *self == PIN15_A::OUTPUT + } +} +#[doc = "Field `PIN15` writer - Pin 15"] +pub type PIN15_W<'a, const O: u8> = crate::BitWriter<'a, u32, DIR_SPEC, PIN15_A, O>; +impl<'a, const O: u8> PIN15_W<'a, O> { + #[doc = "Pin set as input"] + #[inline(always)] + pub fn input(self) -> &'a mut W { + self.variant(PIN15_A::INPUT) + } + #[doc = "Pin set as output"] + #[inline(always)] + pub fn output(self) -> &'a mut W { + self.variant(PIN15_A::OUTPUT) + } +} +#[doc = "Field `PIN16` reader - Pin 16"] +pub type PIN16_R = crate::BitReader; +#[doc = "Pin 16\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PIN16_A { + #[doc = "0: Pin set as input"] + INPUT = 0, + #[doc = "1: Pin set as output"] + OUTPUT = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PIN16_A) -> Self { + variant as u8 != 0 + } +} +impl PIN16_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> PIN16_A { + match self.bits { + false => PIN16_A::INPUT, + true => PIN16_A::OUTPUT, + } + } + #[doc = "Checks if the value of the field is `INPUT`"] + #[inline(always)] + pub fn is_input(&self) -> bool { + *self == PIN16_A::INPUT + } + #[doc = "Checks if the value of the field is `OUTPUT`"] + #[inline(always)] + pub fn is_output(&self) -> bool { + *self == PIN16_A::OUTPUT + } +} +#[doc = "Field `PIN16` writer - Pin 16"] +pub type PIN16_W<'a, const O: u8> = crate::BitWriter<'a, u32, DIR_SPEC, PIN16_A, O>; +impl<'a, const O: u8> PIN16_W<'a, O> { + #[doc = "Pin set as input"] + #[inline(always)] + pub fn input(self) -> &'a mut W { + self.variant(PIN16_A::INPUT) + } + #[doc = "Pin set as output"] + #[inline(always)] + pub fn output(self) -> &'a mut W { + self.variant(PIN16_A::OUTPUT) + } +} +#[doc = "Field `PIN17` reader - Pin 17"] +pub type PIN17_R = crate::BitReader; +#[doc = "Pin 17\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PIN17_A { + #[doc = "0: Pin set as input"] + INPUT = 0, + #[doc = "1: Pin set as output"] + OUTPUT = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PIN17_A) -> Self { + variant as u8 != 0 + } +} +impl PIN17_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> PIN17_A { + match self.bits { + false => PIN17_A::INPUT, + true => PIN17_A::OUTPUT, + } + } + #[doc = "Checks if the value of the field is `INPUT`"] + #[inline(always)] + pub fn is_input(&self) -> bool { + *self == PIN17_A::INPUT + } + #[doc = "Checks if the value of the field is `OUTPUT`"] + #[inline(always)] + pub fn is_output(&self) -> bool { + *self == PIN17_A::OUTPUT + } +} +#[doc = "Field `PIN17` writer - Pin 17"] +pub type PIN17_W<'a, const O: u8> = crate::BitWriter<'a, u32, DIR_SPEC, PIN17_A, O>; +impl<'a, const O: u8> PIN17_W<'a, O> { + #[doc = "Pin set as input"] + #[inline(always)] + pub fn input(self) -> &'a mut W { + self.variant(PIN17_A::INPUT) + } + #[doc = "Pin set as output"] + #[inline(always)] + pub fn output(self) -> &'a mut W { + self.variant(PIN17_A::OUTPUT) + } +} +#[doc = "Field `PIN18` reader - Pin 18"] +pub type PIN18_R = crate::BitReader; +#[doc = "Pin 18\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PIN18_A { + #[doc = "0: Pin set as input"] + INPUT = 0, + #[doc = "1: Pin set as output"] + OUTPUT = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PIN18_A) -> Self { + variant as u8 != 0 + } +} +impl PIN18_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> PIN18_A { + match self.bits { + false => PIN18_A::INPUT, + true => PIN18_A::OUTPUT, + } + } + #[doc = "Checks if the value of the field is `INPUT`"] + #[inline(always)] + pub fn is_input(&self) -> bool { + *self == PIN18_A::INPUT + } + #[doc = "Checks if the value of the field is `OUTPUT`"] + #[inline(always)] + pub fn is_output(&self) -> bool { + *self == PIN18_A::OUTPUT + } +} +#[doc = "Field `PIN18` writer - Pin 18"] +pub type PIN18_W<'a, const O: u8> = crate::BitWriter<'a, u32, DIR_SPEC, PIN18_A, O>; +impl<'a, const O: u8> PIN18_W<'a, O> { + #[doc = "Pin set as input"] + #[inline(always)] + pub fn input(self) -> &'a mut W { + self.variant(PIN18_A::INPUT) + } + #[doc = "Pin set as output"] + #[inline(always)] + pub fn output(self) -> &'a mut W { + self.variant(PIN18_A::OUTPUT) + } +} +#[doc = "Field `PIN19` reader - Pin 19"] +pub type PIN19_R = crate::BitReader; +#[doc = "Pin 19\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PIN19_A { + #[doc = "0: Pin set as input"] + INPUT = 0, + #[doc = "1: Pin set as output"] + OUTPUT = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PIN19_A) -> Self { + variant as u8 != 0 + } +} +impl PIN19_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> PIN19_A { + match self.bits { + false => PIN19_A::INPUT, + true => PIN19_A::OUTPUT, + } + } + #[doc = "Checks if the value of the field is `INPUT`"] + #[inline(always)] + pub fn is_input(&self) -> bool { + *self == PIN19_A::INPUT + } + #[doc = "Checks if the value of the field is `OUTPUT`"] + #[inline(always)] + pub fn is_output(&self) -> bool { + *self == PIN19_A::OUTPUT + } +} +#[doc = "Field `PIN19` writer - Pin 19"] +pub type PIN19_W<'a, const O: u8> = crate::BitWriter<'a, u32, DIR_SPEC, PIN19_A, O>; +impl<'a, const O: u8> PIN19_W<'a, O> { + #[doc = "Pin set as input"] + #[inline(always)] + pub fn input(self) -> &'a mut W { + self.variant(PIN19_A::INPUT) + } + #[doc = "Pin set as output"] + #[inline(always)] + pub fn output(self) -> &'a mut W { + self.variant(PIN19_A::OUTPUT) + } +} +#[doc = "Field `PIN20` reader - Pin 20"] +pub type PIN20_R = crate::BitReader; +#[doc = "Pin 20\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PIN20_A { + #[doc = "0: Pin set as input"] + INPUT = 0, + #[doc = "1: Pin set as output"] + OUTPUT = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PIN20_A) -> Self { + variant as u8 != 0 + } +} +impl PIN20_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> PIN20_A { + match self.bits { + false => PIN20_A::INPUT, + true => PIN20_A::OUTPUT, + } + } + #[doc = "Checks if the value of the field is `INPUT`"] + #[inline(always)] + pub fn is_input(&self) -> bool { + *self == PIN20_A::INPUT + } + #[doc = "Checks if the value of the field is `OUTPUT`"] + #[inline(always)] + pub fn is_output(&self) -> bool { + *self == PIN20_A::OUTPUT + } +} +#[doc = "Field `PIN20` writer - Pin 20"] +pub type PIN20_W<'a, const O: u8> = crate::BitWriter<'a, u32, DIR_SPEC, PIN20_A, O>; +impl<'a, const O: u8> PIN20_W<'a, O> { + #[doc = "Pin set as input"] + #[inline(always)] + pub fn input(self) -> &'a mut W { + self.variant(PIN20_A::INPUT) + } + #[doc = "Pin set as output"] + #[inline(always)] + pub fn output(self) -> &'a mut W { + self.variant(PIN20_A::OUTPUT) + } +} +#[doc = "Field `PIN21` reader - Pin 21"] +pub type PIN21_R = crate::BitReader; +#[doc = "Pin 21\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PIN21_A { + #[doc = "0: Pin set as input"] + INPUT = 0, + #[doc = "1: Pin set as output"] + OUTPUT = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PIN21_A) -> Self { + variant as u8 != 0 + } +} +impl PIN21_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> PIN21_A { + match self.bits { + false => PIN21_A::INPUT, + true => PIN21_A::OUTPUT, + } + } + #[doc = "Checks if the value of the field is `INPUT`"] + #[inline(always)] + pub fn is_input(&self) -> bool { + *self == PIN21_A::INPUT + } + #[doc = "Checks if the value of the field is `OUTPUT`"] + #[inline(always)] + pub fn is_output(&self) -> bool { + *self == PIN21_A::OUTPUT + } +} +#[doc = "Field `PIN21` writer - Pin 21"] +pub type PIN21_W<'a, const O: u8> = crate::BitWriter<'a, u32, DIR_SPEC, PIN21_A, O>; +impl<'a, const O: u8> PIN21_W<'a, O> { + #[doc = "Pin set as input"] + #[inline(always)] + pub fn input(self) -> &'a mut W { + self.variant(PIN21_A::INPUT) + } + #[doc = "Pin set as output"] + #[inline(always)] + pub fn output(self) -> &'a mut W { + self.variant(PIN21_A::OUTPUT) + } +} +#[doc = "Field `PIN22` reader - Pin 22"] +pub type PIN22_R = crate::BitReader; +#[doc = "Pin 22\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PIN22_A { + #[doc = "0: Pin set as input"] + INPUT = 0, + #[doc = "1: Pin set as output"] + OUTPUT = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PIN22_A) -> Self { + variant as u8 != 0 + } +} +impl PIN22_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> PIN22_A { + match self.bits { + false => PIN22_A::INPUT, + true => PIN22_A::OUTPUT, + } + } + #[doc = "Checks if the value of the field is `INPUT`"] + #[inline(always)] + pub fn is_input(&self) -> bool { + *self == PIN22_A::INPUT + } + #[doc = "Checks if the value of the field is `OUTPUT`"] + #[inline(always)] + pub fn is_output(&self) -> bool { + *self == PIN22_A::OUTPUT + } +} +#[doc = "Field `PIN22` writer - Pin 22"] +pub type PIN22_W<'a, const O: u8> = crate::BitWriter<'a, u32, DIR_SPEC, PIN22_A, O>; +impl<'a, const O: u8> PIN22_W<'a, O> { + #[doc = "Pin set as input"] + #[inline(always)] + pub fn input(self) -> &'a mut W { + self.variant(PIN22_A::INPUT) + } + #[doc = "Pin set as output"] + #[inline(always)] + pub fn output(self) -> &'a mut W { + self.variant(PIN22_A::OUTPUT) + } +} +#[doc = "Field `PIN23` reader - Pin 23"] +pub type PIN23_R = crate::BitReader; +#[doc = "Pin 23\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PIN23_A { + #[doc = "0: Pin set as input"] + INPUT = 0, + #[doc = "1: Pin set as output"] + OUTPUT = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PIN23_A) -> Self { + variant as u8 != 0 + } +} +impl PIN23_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> PIN23_A { + match self.bits { + false => PIN23_A::INPUT, + true => PIN23_A::OUTPUT, + } + } + #[doc = "Checks if the value of the field is `INPUT`"] + #[inline(always)] + pub fn is_input(&self) -> bool { + *self == PIN23_A::INPUT + } + #[doc = "Checks if the value of the field is `OUTPUT`"] + #[inline(always)] + pub fn is_output(&self) -> bool { + *self == PIN23_A::OUTPUT + } +} +#[doc = "Field `PIN23` writer - Pin 23"] +pub type PIN23_W<'a, const O: u8> = crate::BitWriter<'a, u32, DIR_SPEC, PIN23_A, O>; +impl<'a, const O: u8> PIN23_W<'a, O> { + #[doc = "Pin set as input"] + #[inline(always)] + pub fn input(self) -> &'a mut W { + self.variant(PIN23_A::INPUT) + } + #[doc = "Pin set as output"] + #[inline(always)] + pub fn output(self) -> &'a mut W { + self.variant(PIN23_A::OUTPUT) + } +} +#[doc = "Field `PIN24` reader - Pin 24"] +pub type PIN24_R = crate::BitReader; +#[doc = "Pin 24\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PIN24_A { + #[doc = "0: Pin set as input"] + INPUT = 0, + #[doc = "1: Pin set as output"] + OUTPUT = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PIN24_A) -> Self { + variant as u8 != 0 + } +} +impl PIN24_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> PIN24_A { + match self.bits { + false => PIN24_A::INPUT, + true => PIN24_A::OUTPUT, + } + } + #[doc = "Checks if the value of the field is `INPUT`"] + #[inline(always)] + pub fn is_input(&self) -> bool { + *self == PIN24_A::INPUT + } + #[doc = "Checks if the value of the field is `OUTPUT`"] + #[inline(always)] + pub fn is_output(&self) -> bool { + *self == PIN24_A::OUTPUT + } +} +#[doc = "Field `PIN24` writer - Pin 24"] +pub type PIN24_W<'a, const O: u8> = crate::BitWriter<'a, u32, DIR_SPEC, PIN24_A, O>; +impl<'a, const O: u8> PIN24_W<'a, O> { + #[doc = "Pin set as input"] + #[inline(always)] + pub fn input(self) -> &'a mut W { + self.variant(PIN24_A::INPUT) + } + #[doc = "Pin set as output"] + #[inline(always)] + pub fn output(self) -> &'a mut W { + self.variant(PIN24_A::OUTPUT) + } +} +#[doc = "Field `PIN25` reader - Pin 25"] +pub type PIN25_R = crate::BitReader; +#[doc = "Pin 25\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PIN25_A { + #[doc = "0: Pin set as input"] + INPUT = 0, + #[doc = "1: Pin set as output"] + OUTPUT = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PIN25_A) -> Self { + variant as u8 != 0 + } +} +impl PIN25_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> PIN25_A { + match self.bits { + false => PIN25_A::INPUT, + true => PIN25_A::OUTPUT, + } + } + #[doc = "Checks if the value of the field is `INPUT`"] + #[inline(always)] + pub fn is_input(&self) -> bool { + *self == PIN25_A::INPUT + } + #[doc = "Checks if the value of the field is `OUTPUT`"] + #[inline(always)] + pub fn is_output(&self) -> bool { + *self == PIN25_A::OUTPUT + } +} +#[doc = "Field `PIN25` writer - Pin 25"] +pub type PIN25_W<'a, const O: u8> = crate::BitWriter<'a, u32, DIR_SPEC, PIN25_A, O>; +impl<'a, const O: u8> PIN25_W<'a, O> { + #[doc = "Pin set as input"] + #[inline(always)] + pub fn input(self) -> &'a mut W { + self.variant(PIN25_A::INPUT) + } + #[doc = "Pin set as output"] + #[inline(always)] + pub fn output(self) -> &'a mut W { + self.variant(PIN25_A::OUTPUT) + } +} +#[doc = "Field `PIN26` reader - Pin 26"] +pub type PIN26_R = crate::BitReader; +#[doc = "Pin 26\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PIN26_A { + #[doc = "0: Pin set as input"] + INPUT = 0, + #[doc = "1: Pin set as output"] + OUTPUT = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PIN26_A) -> Self { + variant as u8 != 0 + } +} +impl PIN26_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> PIN26_A { + match self.bits { + false => PIN26_A::INPUT, + true => PIN26_A::OUTPUT, + } + } + #[doc = "Checks if the value of the field is `INPUT`"] + #[inline(always)] + pub fn is_input(&self) -> bool { + *self == PIN26_A::INPUT + } + #[doc = "Checks if the value of the field is `OUTPUT`"] + #[inline(always)] + pub fn is_output(&self) -> bool { + *self == PIN26_A::OUTPUT + } +} +#[doc = "Field `PIN26` writer - Pin 26"] +pub type PIN26_W<'a, const O: u8> = crate::BitWriter<'a, u32, DIR_SPEC, PIN26_A, O>; +impl<'a, const O: u8> PIN26_W<'a, O> { + #[doc = "Pin set as input"] + #[inline(always)] + pub fn input(self) -> &'a mut W { + self.variant(PIN26_A::INPUT) + } + #[doc = "Pin set as output"] + #[inline(always)] + pub fn output(self) -> &'a mut W { + self.variant(PIN26_A::OUTPUT) + } +} +#[doc = "Field `PIN27` reader - Pin 27"] +pub type PIN27_R = crate::BitReader; +#[doc = "Pin 27\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PIN27_A { + #[doc = "0: Pin set as input"] + INPUT = 0, + #[doc = "1: Pin set as output"] + OUTPUT = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PIN27_A) -> Self { + variant as u8 != 0 + } +} +impl PIN27_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> PIN27_A { + match self.bits { + false => PIN27_A::INPUT, + true => PIN27_A::OUTPUT, + } + } + #[doc = "Checks if the value of the field is `INPUT`"] + #[inline(always)] + pub fn is_input(&self) -> bool { + *self == PIN27_A::INPUT + } + #[doc = "Checks if the value of the field is `OUTPUT`"] + #[inline(always)] + pub fn is_output(&self) -> bool { + *self == PIN27_A::OUTPUT + } +} +#[doc = "Field `PIN27` writer - Pin 27"] +pub type PIN27_W<'a, const O: u8> = crate::BitWriter<'a, u32, DIR_SPEC, PIN27_A, O>; +impl<'a, const O: u8> PIN27_W<'a, O> { + #[doc = "Pin set as input"] + #[inline(always)] + pub fn input(self) -> &'a mut W { + self.variant(PIN27_A::INPUT) + } + #[doc = "Pin set as output"] + #[inline(always)] + pub fn output(self) -> &'a mut W { + self.variant(PIN27_A::OUTPUT) + } +} +#[doc = "Field `PIN28` reader - Pin 28"] +pub type PIN28_R = crate::BitReader; +#[doc = "Pin 28\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PIN28_A { + #[doc = "0: Pin set as input"] + INPUT = 0, + #[doc = "1: Pin set as output"] + OUTPUT = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PIN28_A) -> Self { + variant as u8 != 0 + } +} +impl PIN28_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> PIN28_A { + match self.bits { + false => PIN28_A::INPUT, + true => PIN28_A::OUTPUT, + } + } + #[doc = "Checks if the value of the field is `INPUT`"] + #[inline(always)] + pub fn is_input(&self) -> bool { + *self == PIN28_A::INPUT + } + #[doc = "Checks if the value of the field is `OUTPUT`"] + #[inline(always)] + pub fn is_output(&self) -> bool { + *self == PIN28_A::OUTPUT + } +} +#[doc = "Field `PIN28` writer - Pin 28"] +pub type PIN28_W<'a, const O: u8> = crate::BitWriter<'a, u32, DIR_SPEC, PIN28_A, O>; +impl<'a, const O: u8> PIN28_W<'a, O> { + #[doc = "Pin set as input"] + #[inline(always)] + pub fn input(self) -> &'a mut W { + self.variant(PIN28_A::INPUT) + } + #[doc = "Pin set as output"] + #[inline(always)] + pub fn output(self) -> &'a mut W { + self.variant(PIN28_A::OUTPUT) + } +} +#[doc = "Field `PIN29` reader - Pin 29"] +pub type PIN29_R = crate::BitReader; +#[doc = "Pin 29\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PIN29_A { + #[doc = "0: Pin set as input"] + INPUT = 0, + #[doc = "1: Pin set as output"] + OUTPUT = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PIN29_A) -> Self { + variant as u8 != 0 + } +} +impl PIN29_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> PIN29_A { + match self.bits { + false => PIN29_A::INPUT, + true => PIN29_A::OUTPUT, + } + } + #[doc = "Checks if the value of the field is `INPUT`"] + #[inline(always)] + pub fn is_input(&self) -> bool { + *self == PIN29_A::INPUT + } + #[doc = "Checks if the value of the field is `OUTPUT`"] + #[inline(always)] + pub fn is_output(&self) -> bool { + *self == PIN29_A::OUTPUT + } +} +#[doc = "Field `PIN29` writer - Pin 29"] +pub type PIN29_W<'a, const O: u8> = crate::BitWriter<'a, u32, DIR_SPEC, PIN29_A, O>; +impl<'a, const O: u8> PIN29_W<'a, O> { + #[doc = "Pin set as input"] + #[inline(always)] + pub fn input(self) -> &'a mut W { + self.variant(PIN29_A::INPUT) + } + #[doc = "Pin set as output"] + #[inline(always)] + pub fn output(self) -> &'a mut W { + self.variant(PIN29_A::OUTPUT) + } +} +#[doc = "Field `PIN30` reader - Pin 30"] +pub type PIN30_R = crate::BitReader; +#[doc = "Pin 30\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PIN30_A { + #[doc = "0: Pin set as input"] + INPUT = 0, + #[doc = "1: Pin set as output"] + OUTPUT = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PIN30_A) -> Self { + variant as u8 != 0 + } +} +impl PIN30_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> PIN30_A { + match self.bits { + false => PIN30_A::INPUT, + true => PIN30_A::OUTPUT, + } + } + #[doc = "Checks if the value of the field is `INPUT`"] + #[inline(always)] + pub fn is_input(&self) -> bool { + *self == PIN30_A::INPUT + } + #[doc = "Checks if the value of the field is `OUTPUT`"] + #[inline(always)] + pub fn is_output(&self) -> bool { + *self == PIN30_A::OUTPUT + } +} +#[doc = "Field `PIN30` writer - Pin 30"] +pub type PIN30_W<'a, const O: u8> = crate::BitWriter<'a, u32, DIR_SPEC, PIN30_A, O>; +impl<'a, const O: u8> PIN30_W<'a, O> { + #[doc = "Pin set as input"] + #[inline(always)] + pub fn input(self) -> &'a mut W { + self.variant(PIN30_A::INPUT) + } + #[doc = "Pin set as output"] + #[inline(always)] + pub fn output(self) -> &'a mut W { + self.variant(PIN30_A::OUTPUT) + } +} +#[doc = "Field `PIN31` reader - Pin 31"] +pub type PIN31_R = crate::BitReader; +#[doc = "Pin 31\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PIN31_A { + #[doc = "0: Pin set as input"] + INPUT = 0, + #[doc = "1: Pin set as output"] + OUTPUT = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PIN31_A) -> Self { + variant as u8 != 0 + } +} +impl PIN31_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> PIN31_A { + match self.bits { + false => PIN31_A::INPUT, + true => PIN31_A::OUTPUT, + } + } + #[doc = "Checks if the value of the field is `INPUT`"] + #[inline(always)] + pub fn is_input(&self) -> bool { + *self == PIN31_A::INPUT + } + #[doc = "Checks if the value of the field is `OUTPUT`"] + #[inline(always)] + pub fn is_output(&self) -> bool { + *self == PIN31_A::OUTPUT + } +} +#[doc = "Field `PIN31` writer - Pin 31"] +pub type PIN31_W<'a, const O: u8> = crate::BitWriter<'a, u32, DIR_SPEC, PIN31_A, O>; +impl<'a, const O: u8> PIN31_W<'a, O> { + #[doc = "Pin set as input"] + #[inline(always)] + pub fn input(self) -> &'a mut W { + self.variant(PIN31_A::INPUT) + } + #[doc = "Pin set as output"] + #[inline(always)] + pub fn output(self) -> &'a mut W { + self.variant(PIN31_A::OUTPUT) + } +} +impl R { + #[doc = "Bit 0 - Pin 0"] + #[inline(always)] + pub fn pin0(&self) -> PIN0_R { + PIN0_R::new((self.bits & 1) != 0) + } + #[doc = "Bit 1 - Pin 1"] + #[inline(always)] + pub fn pin1(&self) -> PIN1_R { + PIN1_R::new(((self.bits >> 1) & 1) != 0) + } + #[doc = "Bit 2 - Pin 2"] + #[inline(always)] + pub fn pin2(&self) -> PIN2_R { + PIN2_R::new(((self.bits >> 2) & 1) != 0) + } + #[doc = "Bit 3 - Pin 3"] + #[inline(always)] + pub fn pin3(&self) -> PIN3_R { + PIN3_R::new(((self.bits >> 3) & 1) != 0) + } + #[doc = "Bit 4 - Pin 4"] + #[inline(always)] + pub fn pin4(&self) -> PIN4_R { + PIN4_R::new(((self.bits >> 4) & 1) != 0) + } + #[doc = "Bit 5 - Pin 5"] + #[inline(always)] + pub fn pin5(&self) -> PIN5_R { + PIN5_R::new(((self.bits >> 5) & 1) != 0) + } + #[doc = "Bit 6 - Pin 6"] + #[inline(always)] + pub fn pin6(&self) -> PIN6_R { + PIN6_R::new(((self.bits >> 6) & 1) != 0) + } + #[doc = "Bit 7 - Pin 7"] + #[inline(always)] + pub fn pin7(&self) -> PIN7_R { + PIN7_R::new(((self.bits >> 7) & 1) != 0) + } + #[doc = "Bit 8 - Pin 8"] + #[inline(always)] + pub fn pin8(&self) -> PIN8_R { + PIN8_R::new(((self.bits >> 8) & 1) != 0) + } + #[doc = "Bit 9 - Pin 9"] + #[inline(always)] + pub fn pin9(&self) -> PIN9_R { + PIN9_R::new(((self.bits >> 9) & 1) != 0) + } + #[doc = "Bit 10 - Pin 10"] + #[inline(always)] + pub fn pin10(&self) -> PIN10_R { + PIN10_R::new(((self.bits >> 10) & 1) != 0) + } + #[doc = "Bit 11 - Pin 11"] + #[inline(always)] + pub fn pin11(&self) -> PIN11_R { + PIN11_R::new(((self.bits >> 11) & 1) != 0) + } + #[doc = "Bit 12 - Pin 12"] + #[inline(always)] + pub fn pin12(&self) -> PIN12_R { + PIN12_R::new(((self.bits >> 12) & 1) != 0) + } + #[doc = "Bit 13 - Pin 13"] + #[inline(always)] + pub fn pin13(&self) -> PIN13_R { + PIN13_R::new(((self.bits >> 13) & 1) != 0) + } + #[doc = "Bit 14 - Pin 14"] + #[inline(always)] + pub fn pin14(&self) -> PIN14_R { + PIN14_R::new(((self.bits >> 14) & 1) != 0) + } + #[doc = "Bit 15 - Pin 15"] + #[inline(always)] + pub fn pin15(&self) -> PIN15_R { + PIN15_R::new(((self.bits >> 15) & 1) != 0) + } + #[doc = "Bit 16 - Pin 16"] + #[inline(always)] + pub fn pin16(&self) -> PIN16_R { + PIN16_R::new(((self.bits >> 16) & 1) != 0) + } + #[doc = "Bit 17 - Pin 17"] + #[inline(always)] + pub fn pin17(&self) -> PIN17_R { + PIN17_R::new(((self.bits >> 17) & 1) != 0) + } + #[doc = "Bit 18 - Pin 18"] + #[inline(always)] + pub fn pin18(&self) -> PIN18_R { + PIN18_R::new(((self.bits >> 18) & 1) != 0) + } + #[doc = "Bit 19 - Pin 19"] + #[inline(always)] + pub fn pin19(&self) -> PIN19_R { + PIN19_R::new(((self.bits >> 19) & 1) != 0) + } + #[doc = "Bit 20 - Pin 20"] + #[inline(always)] + pub fn pin20(&self) -> PIN20_R { + PIN20_R::new(((self.bits >> 20) & 1) != 0) + } + #[doc = "Bit 21 - Pin 21"] + #[inline(always)] + pub fn pin21(&self) -> PIN21_R { + PIN21_R::new(((self.bits >> 21) & 1) != 0) + } + #[doc = "Bit 22 - Pin 22"] + #[inline(always)] + pub fn pin22(&self) -> PIN22_R { + PIN22_R::new(((self.bits >> 22) & 1) != 0) + } + #[doc = "Bit 23 - Pin 23"] + #[inline(always)] + pub fn pin23(&self) -> PIN23_R { + PIN23_R::new(((self.bits >> 23) & 1) != 0) + } + #[doc = "Bit 24 - Pin 24"] + #[inline(always)] + pub fn pin24(&self) -> PIN24_R { + PIN24_R::new(((self.bits >> 24) & 1) != 0) + } + #[doc = "Bit 25 - Pin 25"] + #[inline(always)] + pub fn pin25(&self) -> PIN25_R { + PIN25_R::new(((self.bits >> 25) & 1) != 0) + } + #[doc = "Bit 26 - Pin 26"] + #[inline(always)] + pub fn pin26(&self) -> PIN26_R { + PIN26_R::new(((self.bits >> 26) & 1) != 0) + } + #[doc = "Bit 27 - Pin 27"] + #[inline(always)] + pub fn pin27(&self) -> PIN27_R { + PIN27_R::new(((self.bits >> 27) & 1) != 0) + } + #[doc = "Bit 28 - Pin 28"] + #[inline(always)] + pub fn pin28(&self) -> PIN28_R { + PIN28_R::new(((self.bits >> 28) & 1) != 0) + } + #[doc = "Bit 29 - Pin 29"] + #[inline(always)] + pub fn pin29(&self) -> PIN29_R { + PIN29_R::new(((self.bits >> 29) & 1) != 0) + } + #[doc = "Bit 30 - Pin 30"] + #[inline(always)] + pub fn pin30(&self) -> PIN30_R { + PIN30_R::new(((self.bits >> 30) & 1) != 0) + } + #[doc = "Bit 31 - Pin 31"] + #[inline(always)] + pub fn pin31(&self) -> PIN31_R { + PIN31_R::new(((self.bits >> 31) & 1) != 0) + } +} +impl W { + #[doc = "Bit 0 - Pin 0"] + #[inline(always)] + #[must_use] + pub fn pin0(&mut self) -> PIN0_W<0> { + PIN0_W::new(self) + } + #[doc = "Bit 1 - Pin 1"] + #[inline(always)] + #[must_use] + pub fn pin1(&mut self) -> PIN1_W<1> { + PIN1_W::new(self) + } + #[doc = "Bit 2 - Pin 2"] + #[inline(always)] + #[must_use] + pub fn pin2(&mut self) -> PIN2_W<2> { + PIN2_W::new(self) + } + #[doc = "Bit 3 - Pin 3"] + #[inline(always)] + #[must_use] + pub fn pin3(&mut self) -> PIN3_W<3> { + PIN3_W::new(self) + } + #[doc = "Bit 4 - Pin 4"] + #[inline(always)] + #[must_use] + pub fn pin4(&mut self) -> PIN4_W<4> { + PIN4_W::new(self) + } + #[doc = "Bit 5 - Pin 5"] + #[inline(always)] + #[must_use] + pub fn pin5(&mut self) -> PIN5_W<5> { + PIN5_W::new(self) + } + #[doc = "Bit 6 - Pin 6"] + #[inline(always)] + #[must_use] + pub fn pin6(&mut self) -> PIN6_W<6> { + PIN6_W::new(self) + } + #[doc = "Bit 7 - Pin 7"] + #[inline(always)] + #[must_use] + pub fn pin7(&mut self) -> PIN7_W<7> { + PIN7_W::new(self) + } + #[doc = "Bit 8 - Pin 8"] + #[inline(always)] + #[must_use] + pub fn pin8(&mut self) -> PIN8_W<8> { + PIN8_W::new(self) + } + #[doc = "Bit 9 - Pin 9"] + #[inline(always)] + #[must_use] + pub fn pin9(&mut self) -> PIN9_W<9> { + PIN9_W::new(self) + } + #[doc = "Bit 10 - Pin 10"] + #[inline(always)] + #[must_use] + pub fn pin10(&mut self) -> PIN10_W<10> { + PIN10_W::new(self) + } + #[doc = "Bit 11 - Pin 11"] + #[inline(always)] + #[must_use] + pub fn pin11(&mut self) -> PIN11_W<11> { + PIN11_W::new(self) + } + #[doc = "Bit 12 - Pin 12"] + #[inline(always)] + #[must_use] + pub fn pin12(&mut self) -> PIN12_W<12> { + PIN12_W::new(self) + } + #[doc = "Bit 13 - Pin 13"] + #[inline(always)] + #[must_use] + pub fn pin13(&mut self) -> PIN13_W<13> { + PIN13_W::new(self) + } + #[doc = "Bit 14 - Pin 14"] + #[inline(always)] + #[must_use] + pub fn pin14(&mut self) -> PIN14_W<14> { + PIN14_W::new(self) + } + #[doc = "Bit 15 - Pin 15"] + #[inline(always)] + #[must_use] + pub fn pin15(&mut self) -> PIN15_W<15> { + PIN15_W::new(self) + } + #[doc = "Bit 16 - Pin 16"] + #[inline(always)] + #[must_use] + pub fn pin16(&mut self) -> PIN16_W<16> { + PIN16_W::new(self) + } + #[doc = "Bit 17 - Pin 17"] + #[inline(always)] + #[must_use] + pub fn pin17(&mut self) -> PIN17_W<17> { + PIN17_W::new(self) + } + #[doc = "Bit 18 - Pin 18"] + #[inline(always)] + #[must_use] + pub fn pin18(&mut self) -> PIN18_W<18> { + PIN18_W::new(self) + } + #[doc = "Bit 19 - Pin 19"] + #[inline(always)] + #[must_use] + pub fn pin19(&mut self) -> PIN19_W<19> { + PIN19_W::new(self) + } + #[doc = "Bit 20 - Pin 20"] + #[inline(always)] + #[must_use] + pub fn pin20(&mut self) -> PIN20_W<20> { + PIN20_W::new(self) + } + #[doc = "Bit 21 - Pin 21"] + #[inline(always)] + #[must_use] + pub fn pin21(&mut self) -> PIN21_W<21> { + PIN21_W::new(self) + } + #[doc = "Bit 22 - Pin 22"] + #[inline(always)] + #[must_use] + pub fn pin22(&mut self) -> PIN22_W<22> { + PIN22_W::new(self) + } + #[doc = "Bit 23 - Pin 23"] + #[inline(always)] + #[must_use] + pub fn pin23(&mut self) -> PIN23_W<23> { + PIN23_W::new(self) + } + #[doc = "Bit 24 - Pin 24"] + #[inline(always)] + #[must_use] + pub fn pin24(&mut self) -> PIN24_W<24> { + PIN24_W::new(self) + } + #[doc = "Bit 25 - Pin 25"] + #[inline(always)] + #[must_use] + pub fn pin25(&mut self) -> PIN25_W<25> { + PIN25_W::new(self) + } + #[doc = "Bit 26 - Pin 26"] + #[inline(always)] + #[must_use] + pub fn pin26(&mut self) -> PIN26_W<26> { + PIN26_W::new(self) + } + #[doc = "Bit 27 - Pin 27"] + #[inline(always)] + #[must_use] + pub fn pin27(&mut self) -> PIN27_W<27> { + PIN27_W::new(self) + } + #[doc = "Bit 28 - Pin 28"] + #[inline(always)] + #[must_use] + pub fn pin28(&mut self) -> PIN28_W<28> { + PIN28_W::new(self) + } + #[doc = "Bit 29 - Pin 29"] + #[inline(always)] + #[must_use] + pub fn pin29(&mut self) -> PIN29_W<29> { + PIN29_W::new(self) + } + #[doc = "Bit 30 - Pin 30"] + #[inline(always)] + #[must_use] + pub fn pin30(&mut self) -> PIN30_W<30> { + PIN30_W::new(self) + } + #[doc = "Bit 31 - Pin 31"] + #[inline(always)] + #[must_use] + pub fn pin31(&mut self) -> PIN31_W<31> { + PIN31_W::new(self) + } + #[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 = "Direction of GPIO pins\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 [dir](index.html) module"] +pub struct DIR_SPEC; +impl crate::RegisterSpec for DIR_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [dir::R](R) reader structure"] +impl crate::Readable for DIR_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [dir::W](W) writer structure"] +impl crate::Writable for DIR_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets DIR to value 0"] +impl crate::Resettable for DIR_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/p0/dirclr.rs b/down-the-stack/dk_pac/src/p0/dirclr.rs new file mode 100644 index 0000000..97978e6 --- /dev/null +++ b/down-the-stack/dk_pac/src/p0/dirclr.rs @@ -0,0 +1,2241 @@ +#[doc = "Register `DIRCLR` 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 `DIRCLR` 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 `PIN0` reader - Set as input pin 0"] +pub type PIN0_R = crate::BitReader; +#[doc = "Set as input pin 0\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PIN0_A { + #[doc = "0: Read: pin set as input"] + INPUT = 0, + #[doc = "1: Read: pin set as output"] + OUTPUT = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PIN0_A) -> Self { + variant as u8 != 0 + } +} +impl PIN0_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> PIN0_A { + match self.bits { + false => PIN0_A::INPUT, + true => PIN0_A::OUTPUT, + } + } + #[doc = "Checks if the value of the field is `INPUT`"] + #[inline(always)] + pub fn is_input(&self) -> bool { + *self == PIN0_A::INPUT + } + #[doc = "Checks if the value of the field is `OUTPUT`"] + #[inline(always)] + pub fn is_output(&self) -> bool { + *self == PIN0_A::OUTPUT + } +} +#[doc = "Set as input pin 0\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PIN0_AW { + #[doc = "1: Write: writing a '1' sets pin to input; writing a '0' has no effect"] + CLEAR = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PIN0_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `PIN0` writer - Set as input pin 0"] +pub type PIN0_W<'a, const O: u8> = crate::BitWriter1C<'a, u32, DIRCLR_SPEC, PIN0_AW, O>; +impl<'a, const O: u8> PIN0_W<'a, O> { + #[doc = "Write: writing a '1' sets pin to input; writing a '0' has no effect"] + #[inline(always)] + pub fn clear(self) -> &'a mut W { + self.variant(PIN0_AW::CLEAR) + } +} +#[doc = "Field `PIN1` reader - Set as input pin 1"] +pub type PIN1_R = crate::BitReader; +#[doc = "Set as input pin 1\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PIN1_A { + #[doc = "0: Read: pin set as input"] + INPUT = 0, + #[doc = "1: Read: pin set as output"] + OUTPUT = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PIN1_A) -> Self { + variant as u8 != 0 + } +} +impl PIN1_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> PIN1_A { + match self.bits { + false => PIN1_A::INPUT, + true => PIN1_A::OUTPUT, + } + } + #[doc = "Checks if the value of the field is `INPUT`"] + #[inline(always)] + pub fn is_input(&self) -> bool { + *self == PIN1_A::INPUT + } + #[doc = "Checks if the value of the field is `OUTPUT`"] + #[inline(always)] + pub fn is_output(&self) -> bool { + *self == PIN1_A::OUTPUT + } +} +#[doc = "Set as input pin 1\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PIN1_AW { + #[doc = "1: Write: writing a '1' sets pin to input; writing a '0' has no effect"] + CLEAR = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PIN1_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `PIN1` writer - Set as input pin 1"] +pub type PIN1_W<'a, const O: u8> = crate::BitWriter1C<'a, u32, DIRCLR_SPEC, PIN1_AW, O>; +impl<'a, const O: u8> PIN1_W<'a, O> { + #[doc = "Write: writing a '1' sets pin to input; writing a '0' has no effect"] + #[inline(always)] + pub fn clear(self) -> &'a mut W { + self.variant(PIN1_AW::CLEAR) + } +} +#[doc = "Field `PIN2` reader - Set as input pin 2"] +pub type PIN2_R = crate::BitReader; +#[doc = "Set as input pin 2\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PIN2_A { + #[doc = "0: Read: pin set as input"] + INPUT = 0, + #[doc = "1: Read: pin set as output"] + OUTPUT = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PIN2_A) -> Self { + variant as u8 != 0 + } +} +impl PIN2_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> PIN2_A { + match self.bits { + false => PIN2_A::INPUT, + true => PIN2_A::OUTPUT, + } + } + #[doc = "Checks if the value of the field is `INPUT`"] + #[inline(always)] + pub fn is_input(&self) -> bool { + *self == PIN2_A::INPUT + } + #[doc = "Checks if the value of the field is `OUTPUT`"] + #[inline(always)] + pub fn is_output(&self) -> bool { + *self == PIN2_A::OUTPUT + } +} +#[doc = "Set as input pin 2\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PIN2_AW { + #[doc = "1: Write: writing a '1' sets pin to input; writing a '0' has no effect"] + CLEAR = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PIN2_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `PIN2` writer - Set as input pin 2"] +pub type PIN2_W<'a, const O: u8> = crate::BitWriter1C<'a, u32, DIRCLR_SPEC, PIN2_AW, O>; +impl<'a, const O: u8> PIN2_W<'a, O> { + #[doc = "Write: writing a '1' sets pin to input; writing a '0' has no effect"] + #[inline(always)] + pub fn clear(self) -> &'a mut W { + self.variant(PIN2_AW::CLEAR) + } +} +#[doc = "Field `PIN3` reader - Set as input pin 3"] +pub type PIN3_R = crate::BitReader; +#[doc = "Set as input pin 3\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PIN3_A { + #[doc = "0: Read: pin set as input"] + INPUT = 0, + #[doc = "1: Read: pin set as output"] + OUTPUT = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PIN3_A) -> Self { + variant as u8 != 0 + } +} +impl PIN3_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> PIN3_A { + match self.bits { + false => PIN3_A::INPUT, + true => PIN3_A::OUTPUT, + } + } + #[doc = "Checks if the value of the field is `INPUT`"] + #[inline(always)] + pub fn is_input(&self) -> bool { + *self == PIN3_A::INPUT + } + #[doc = "Checks if the value of the field is `OUTPUT`"] + #[inline(always)] + pub fn is_output(&self) -> bool { + *self == PIN3_A::OUTPUT + } +} +#[doc = "Set as input pin 3\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PIN3_AW { + #[doc = "1: Write: writing a '1' sets pin to input; writing a '0' has no effect"] + CLEAR = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PIN3_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `PIN3` writer - Set as input pin 3"] +pub type PIN3_W<'a, const O: u8> = crate::BitWriter1C<'a, u32, DIRCLR_SPEC, PIN3_AW, O>; +impl<'a, const O: u8> PIN3_W<'a, O> { + #[doc = "Write: writing a '1' sets pin to input; writing a '0' has no effect"] + #[inline(always)] + pub fn clear(self) -> &'a mut W { + self.variant(PIN3_AW::CLEAR) + } +} +#[doc = "Field `PIN4` reader - Set as input pin 4"] +pub type PIN4_R = crate::BitReader; +#[doc = "Set as input pin 4\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PIN4_A { + #[doc = "0: Read: pin set as input"] + INPUT = 0, + #[doc = "1: Read: pin set as output"] + OUTPUT = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PIN4_A) -> Self { + variant as u8 != 0 + } +} +impl PIN4_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> PIN4_A { + match self.bits { + false => PIN4_A::INPUT, + true => PIN4_A::OUTPUT, + } + } + #[doc = "Checks if the value of the field is `INPUT`"] + #[inline(always)] + pub fn is_input(&self) -> bool { + *self == PIN4_A::INPUT + } + #[doc = "Checks if the value of the field is `OUTPUT`"] + #[inline(always)] + pub fn is_output(&self) -> bool { + *self == PIN4_A::OUTPUT + } +} +#[doc = "Set as input pin 4\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PIN4_AW { + #[doc = "1: Write: writing a '1' sets pin to input; writing a '0' has no effect"] + CLEAR = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PIN4_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `PIN4` writer - Set as input pin 4"] +pub type PIN4_W<'a, const O: u8> = crate::BitWriter1C<'a, u32, DIRCLR_SPEC, PIN4_AW, O>; +impl<'a, const O: u8> PIN4_W<'a, O> { + #[doc = "Write: writing a '1' sets pin to input; writing a '0' has no effect"] + #[inline(always)] + pub fn clear(self) -> &'a mut W { + self.variant(PIN4_AW::CLEAR) + } +} +#[doc = "Field `PIN5` reader - Set as input pin 5"] +pub type PIN5_R = crate::BitReader; +#[doc = "Set as input pin 5\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PIN5_A { + #[doc = "0: Read: pin set as input"] + INPUT = 0, + #[doc = "1: Read: pin set as output"] + OUTPUT = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PIN5_A) -> Self { + variant as u8 != 0 + } +} +impl PIN5_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> PIN5_A { + match self.bits { + false => PIN5_A::INPUT, + true => PIN5_A::OUTPUT, + } + } + #[doc = "Checks if the value of the field is `INPUT`"] + #[inline(always)] + pub fn is_input(&self) -> bool { + *self == PIN5_A::INPUT + } + #[doc = "Checks if the value of the field is `OUTPUT`"] + #[inline(always)] + pub fn is_output(&self) -> bool { + *self == PIN5_A::OUTPUT + } +} +#[doc = "Set as input pin 5\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PIN5_AW { + #[doc = "1: Write: writing a '1' sets pin to input; writing a '0' has no effect"] + CLEAR = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PIN5_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `PIN5` writer - Set as input pin 5"] +pub type PIN5_W<'a, const O: u8> = crate::BitWriter1C<'a, u32, DIRCLR_SPEC, PIN5_AW, O>; +impl<'a, const O: u8> PIN5_W<'a, O> { + #[doc = "Write: writing a '1' sets pin to input; writing a '0' has no effect"] + #[inline(always)] + pub fn clear(self) -> &'a mut W { + self.variant(PIN5_AW::CLEAR) + } +} +#[doc = "Field `PIN6` reader - Set as input pin 6"] +pub type PIN6_R = crate::BitReader; +#[doc = "Set as input pin 6\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PIN6_A { + #[doc = "0: Read: pin set as input"] + INPUT = 0, + #[doc = "1: Read: pin set as output"] + OUTPUT = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PIN6_A) -> Self { + variant as u8 != 0 + } +} +impl PIN6_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> PIN6_A { + match self.bits { + false => PIN6_A::INPUT, + true => PIN6_A::OUTPUT, + } + } + #[doc = "Checks if the value of the field is `INPUT`"] + #[inline(always)] + pub fn is_input(&self) -> bool { + *self == PIN6_A::INPUT + } + #[doc = "Checks if the value of the field is `OUTPUT`"] + #[inline(always)] + pub fn is_output(&self) -> bool { + *self == PIN6_A::OUTPUT + } +} +#[doc = "Set as input pin 6\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PIN6_AW { + #[doc = "1: Write: writing a '1' sets pin to input; writing a '0' has no effect"] + CLEAR = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PIN6_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `PIN6` writer - Set as input pin 6"] +pub type PIN6_W<'a, const O: u8> = crate::BitWriter1C<'a, u32, DIRCLR_SPEC, PIN6_AW, O>; +impl<'a, const O: u8> PIN6_W<'a, O> { + #[doc = "Write: writing a '1' sets pin to input; writing a '0' has no effect"] + #[inline(always)] + pub fn clear(self) -> &'a mut W { + self.variant(PIN6_AW::CLEAR) + } +} +#[doc = "Field `PIN7` reader - Set as input pin 7"] +pub type PIN7_R = crate::BitReader; +#[doc = "Set as input pin 7\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PIN7_A { + #[doc = "0: Read: pin set as input"] + INPUT = 0, + #[doc = "1: Read: pin set as output"] + OUTPUT = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PIN7_A) -> Self { + variant as u8 != 0 + } +} +impl PIN7_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> PIN7_A { + match self.bits { + false => PIN7_A::INPUT, + true => PIN7_A::OUTPUT, + } + } + #[doc = "Checks if the value of the field is `INPUT`"] + #[inline(always)] + pub fn is_input(&self) -> bool { + *self == PIN7_A::INPUT + } + #[doc = "Checks if the value of the field is `OUTPUT`"] + #[inline(always)] + pub fn is_output(&self) -> bool { + *self == PIN7_A::OUTPUT + } +} +#[doc = "Set as input pin 7\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PIN7_AW { + #[doc = "1: Write: writing a '1' sets pin to input; writing a '0' has no effect"] + CLEAR = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PIN7_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `PIN7` writer - Set as input pin 7"] +pub type PIN7_W<'a, const O: u8> = crate::BitWriter1C<'a, u32, DIRCLR_SPEC, PIN7_AW, O>; +impl<'a, const O: u8> PIN7_W<'a, O> { + #[doc = "Write: writing a '1' sets pin to input; writing a '0' has no effect"] + #[inline(always)] + pub fn clear(self) -> &'a mut W { + self.variant(PIN7_AW::CLEAR) + } +} +#[doc = "Field `PIN8` reader - Set as input pin 8"] +pub type PIN8_R = crate::BitReader; +#[doc = "Set as input pin 8\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PIN8_A { + #[doc = "0: Read: pin set as input"] + INPUT = 0, + #[doc = "1: Read: pin set as output"] + OUTPUT = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PIN8_A) -> Self { + variant as u8 != 0 + } +} +impl PIN8_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> PIN8_A { + match self.bits { + false => PIN8_A::INPUT, + true => PIN8_A::OUTPUT, + } + } + #[doc = "Checks if the value of the field is `INPUT`"] + #[inline(always)] + pub fn is_input(&self) -> bool { + *self == PIN8_A::INPUT + } + #[doc = "Checks if the value of the field is `OUTPUT`"] + #[inline(always)] + pub fn is_output(&self) -> bool { + *self == PIN8_A::OUTPUT + } +} +#[doc = "Set as input pin 8\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PIN8_AW { + #[doc = "1: Write: writing a '1' sets pin to input; writing a '0' has no effect"] + CLEAR = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PIN8_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `PIN8` writer - Set as input pin 8"] +pub type PIN8_W<'a, const O: u8> = crate::BitWriter1C<'a, u32, DIRCLR_SPEC, PIN8_AW, O>; +impl<'a, const O: u8> PIN8_W<'a, O> { + #[doc = "Write: writing a '1' sets pin to input; writing a '0' has no effect"] + #[inline(always)] + pub fn clear(self) -> &'a mut W { + self.variant(PIN8_AW::CLEAR) + } +} +#[doc = "Field `PIN9` reader - Set as input pin 9"] +pub type PIN9_R = crate::BitReader; +#[doc = "Set as input pin 9\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PIN9_A { + #[doc = "0: Read: pin set as input"] + INPUT = 0, + #[doc = "1: Read: pin set as output"] + OUTPUT = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PIN9_A) -> Self { + variant as u8 != 0 + } +} +impl PIN9_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> PIN9_A { + match self.bits { + false => PIN9_A::INPUT, + true => PIN9_A::OUTPUT, + } + } + #[doc = "Checks if the value of the field is `INPUT`"] + #[inline(always)] + pub fn is_input(&self) -> bool { + *self == PIN9_A::INPUT + } + #[doc = "Checks if the value of the field is `OUTPUT`"] + #[inline(always)] + pub fn is_output(&self) -> bool { + *self == PIN9_A::OUTPUT + } +} +#[doc = "Set as input pin 9\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PIN9_AW { + #[doc = "1: Write: writing a '1' sets pin to input; writing a '0' has no effect"] + CLEAR = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PIN9_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `PIN9` writer - Set as input pin 9"] +pub type PIN9_W<'a, const O: u8> = crate::BitWriter1C<'a, u32, DIRCLR_SPEC, PIN9_AW, O>; +impl<'a, const O: u8> PIN9_W<'a, O> { + #[doc = "Write: writing a '1' sets pin to input; writing a '0' has no effect"] + #[inline(always)] + pub fn clear(self) -> &'a mut W { + self.variant(PIN9_AW::CLEAR) + } +} +#[doc = "Field `PIN10` reader - Set as input pin 10"] +pub type PIN10_R = crate::BitReader; +#[doc = "Set as input pin 10\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PIN10_A { + #[doc = "0: Read: pin set as input"] + INPUT = 0, + #[doc = "1: Read: pin set as output"] + OUTPUT = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PIN10_A) -> Self { + variant as u8 != 0 + } +} +impl PIN10_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> PIN10_A { + match self.bits { + false => PIN10_A::INPUT, + true => PIN10_A::OUTPUT, + } + } + #[doc = "Checks if the value of the field is `INPUT`"] + #[inline(always)] + pub fn is_input(&self) -> bool { + *self == PIN10_A::INPUT + } + #[doc = "Checks if the value of the field is `OUTPUT`"] + #[inline(always)] + pub fn is_output(&self) -> bool { + *self == PIN10_A::OUTPUT + } +} +#[doc = "Set as input pin 10\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PIN10_AW { + #[doc = "1: Write: writing a '1' sets pin to input; writing a '0' has no effect"] + CLEAR = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PIN10_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `PIN10` writer - Set as input pin 10"] +pub type PIN10_W<'a, const O: u8> = crate::BitWriter1C<'a, u32, DIRCLR_SPEC, PIN10_AW, O>; +impl<'a, const O: u8> PIN10_W<'a, O> { + #[doc = "Write: writing a '1' sets pin to input; writing a '0' has no effect"] + #[inline(always)] + pub fn clear(self) -> &'a mut W { + self.variant(PIN10_AW::CLEAR) + } +} +#[doc = "Field `PIN11` reader - Set as input pin 11"] +pub type PIN11_R = crate::BitReader; +#[doc = "Set as input pin 11\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PIN11_A { + #[doc = "0: Read: pin set as input"] + INPUT = 0, + #[doc = "1: Read: pin set as output"] + OUTPUT = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PIN11_A) -> Self { + variant as u8 != 0 + } +} +impl PIN11_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> PIN11_A { + match self.bits { + false => PIN11_A::INPUT, + true => PIN11_A::OUTPUT, + } + } + #[doc = "Checks if the value of the field is `INPUT`"] + #[inline(always)] + pub fn is_input(&self) -> bool { + *self == PIN11_A::INPUT + } + #[doc = "Checks if the value of the field is `OUTPUT`"] + #[inline(always)] + pub fn is_output(&self) -> bool { + *self == PIN11_A::OUTPUT + } +} +#[doc = "Set as input pin 11\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PIN11_AW { + #[doc = "1: Write: writing a '1' sets pin to input; writing a '0' has no effect"] + CLEAR = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PIN11_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `PIN11` writer - Set as input pin 11"] +pub type PIN11_W<'a, const O: u8> = crate::BitWriter1C<'a, u32, DIRCLR_SPEC, PIN11_AW, O>; +impl<'a, const O: u8> PIN11_W<'a, O> { + #[doc = "Write: writing a '1' sets pin to input; writing a '0' has no effect"] + #[inline(always)] + pub fn clear(self) -> &'a mut W { + self.variant(PIN11_AW::CLEAR) + } +} +#[doc = "Field `PIN12` reader - Set as input pin 12"] +pub type PIN12_R = crate::BitReader; +#[doc = "Set as input pin 12\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PIN12_A { + #[doc = "0: Read: pin set as input"] + INPUT = 0, + #[doc = "1: Read: pin set as output"] + OUTPUT = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PIN12_A) -> Self { + variant as u8 != 0 + } +} +impl PIN12_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> PIN12_A { + match self.bits { + false => PIN12_A::INPUT, + true => PIN12_A::OUTPUT, + } + } + #[doc = "Checks if the value of the field is `INPUT`"] + #[inline(always)] + pub fn is_input(&self) -> bool { + *self == PIN12_A::INPUT + } + #[doc = "Checks if the value of the field is `OUTPUT`"] + #[inline(always)] + pub fn is_output(&self) -> bool { + *self == PIN12_A::OUTPUT + } +} +#[doc = "Set as input pin 12\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PIN12_AW { + #[doc = "1: Write: writing a '1' sets pin to input; writing a '0' has no effect"] + CLEAR = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PIN12_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `PIN12` writer - Set as input pin 12"] +pub type PIN12_W<'a, const O: u8> = crate::BitWriter1C<'a, u32, DIRCLR_SPEC, PIN12_AW, O>; +impl<'a, const O: u8> PIN12_W<'a, O> { + #[doc = "Write: writing a '1' sets pin to input; writing a '0' has no effect"] + #[inline(always)] + pub fn clear(self) -> &'a mut W { + self.variant(PIN12_AW::CLEAR) + } +} +#[doc = "Field `PIN13` reader - Set as input pin 13"] +pub type PIN13_R = crate::BitReader; +#[doc = "Set as input pin 13\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PIN13_A { + #[doc = "0: Read: pin set as input"] + INPUT = 0, + #[doc = "1: Read: pin set as output"] + OUTPUT = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PIN13_A) -> Self { + variant as u8 != 0 + } +} +impl PIN13_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> PIN13_A { + match self.bits { + false => PIN13_A::INPUT, + true => PIN13_A::OUTPUT, + } + } + #[doc = "Checks if the value of the field is `INPUT`"] + #[inline(always)] + pub fn is_input(&self) -> bool { + *self == PIN13_A::INPUT + } + #[doc = "Checks if the value of the field is `OUTPUT`"] + #[inline(always)] + pub fn is_output(&self) -> bool { + *self == PIN13_A::OUTPUT + } +} +#[doc = "Set as input pin 13\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PIN13_AW { + #[doc = "1: Write: writing a '1' sets pin to input; writing a '0' has no effect"] + CLEAR = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PIN13_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `PIN13` writer - Set as input pin 13"] +pub type PIN13_W<'a, const O: u8> = crate::BitWriter1C<'a, u32, DIRCLR_SPEC, PIN13_AW, O>; +impl<'a, const O: u8> PIN13_W<'a, O> { + #[doc = "Write: writing a '1' sets pin to input; writing a '0' has no effect"] + #[inline(always)] + pub fn clear(self) -> &'a mut W { + self.variant(PIN13_AW::CLEAR) + } +} +#[doc = "Field `PIN14` reader - Set as input pin 14"] +pub type PIN14_R = crate::BitReader; +#[doc = "Set as input pin 14\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PIN14_A { + #[doc = "0: Read: pin set as input"] + INPUT = 0, + #[doc = "1: Read: pin set as output"] + OUTPUT = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PIN14_A) -> Self { + variant as u8 != 0 + } +} +impl PIN14_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> PIN14_A { + match self.bits { + false => PIN14_A::INPUT, + true => PIN14_A::OUTPUT, + } + } + #[doc = "Checks if the value of the field is `INPUT`"] + #[inline(always)] + pub fn is_input(&self) -> bool { + *self == PIN14_A::INPUT + } + #[doc = "Checks if the value of the field is `OUTPUT`"] + #[inline(always)] + pub fn is_output(&self) -> bool { + *self == PIN14_A::OUTPUT + } +} +#[doc = "Set as input pin 14\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PIN14_AW { + #[doc = "1: Write: writing a '1' sets pin to input; writing a '0' has no effect"] + CLEAR = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PIN14_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `PIN14` writer - Set as input pin 14"] +pub type PIN14_W<'a, const O: u8> = crate::BitWriter1C<'a, u32, DIRCLR_SPEC, PIN14_AW, O>; +impl<'a, const O: u8> PIN14_W<'a, O> { + #[doc = "Write: writing a '1' sets pin to input; writing a '0' has no effect"] + #[inline(always)] + pub fn clear(self) -> &'a mut W { + self.variant(PIN14_AW::CLEAR) + } +} +#[doc = "Field `PIN15` reader - Set as input pin 15"] +pub type PIN15_R = crate::BitReader; +#[doc = "Set as input pin 15\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PIN15_A { + #[doc = "0: Read: pin set as input"] + INPUT = 0, + #[doc = "1: Read: pin set as output"] + OUTPUT = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PIN15_A) -> Self { + variant as u8 != 0 + } +} +impl PIN15_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> PIN15_A { + match self.bits { + false => PIN15_A::INPUT, + true => PIN15_A::OUTPUT, + } + } + #[doc = "Checks if the value of the field is `INPUT`"] + #[inline(always)] + pub fn is_input(&self) -> bool { + *self == PIN15_A::INPUT + } + #[doc = "Checks if the value of the field is `OUTPUT`"] + #[inline(always)] + pub fn is_output(&self) -> bool { + *self == PIN15_A::OUTPUT + } +} +#[doc = "Set as input pin 15\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PIN15_AW { + #[doc = "1: Write: writing a '1' sets pin to input; writing a '0' has no effect"] + CLEAR = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PIN15_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `PIN15` writer - Set as input pin 15"] +pub type PIN15_W<'a, const O: u8> = crate::BitWriter1C<'a, u32, DIRCLR_SPEC, PIN15_AW, O>; +impl<'a, const O: u8> PIN15_W<'a, O> { + #[doc = "Write: writing a '1' sets pin to input; writing a '0' has no effect"] + #[inline(always)] + pub fn clear(self) -> &'a mut W { + self.variant(PIN15_AW::CLEAR) + } +} +#[doc = "Field `PIN16` reader - Set as input pin 16"] +pub type PIN16_R = crate::BitReader; +#[doc = "Set as input pin 16\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PIN16_A { + #[doc = "0: Read: pin set as input"] + INPUT = 0, + #[doc = "1: Read: pin set as output"] + OUTPUT = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PIN16_A) -> Self { + variant as u8 != 0 + } +} +impl PIN16_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> PIN16_A { + match self.bits { + false => PIN16_A::INPUT, + true => PIN16_A::OUTPUT, + } + } + #[doc = "Checks if the value of the field is `INPUT`"] + #[inline(always)] + pub fn is_input(&self) -> bool { + *self == PIN16_A::INPUT + } + #[doc = "Checks if the value of the field is `OUTPUT`"] + #[inline(always)] + pub fn is_output(&self) -> bool { + *self == PIN16_A::OUTPUT + } +} +#[doc = "Set as input pin 16\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PIN16_AW { + #[doc = "1: Write: writing a '1' sets pin to input; writing a '0' has no effect"] + CLEAR = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PIN16_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `PIN16` writer - Set as input pin 16"] +pub type PIN16_W<'a, const O: u8> = crate::BitWriter1C<'a, u32, DIRCLR_SPEC, PIN16_AW, O>; +impl<'a, const O: u8> PIN16_W<'a, O> { + #[doc = "Write: writing a '1' sets pin to input; writing a '0' has no effect"] + #[inline(always)] + pub fn clear(self) -> &'a mut W { + self.variant(PIN16_AW::CLEAR) + } +} +#[doc = "Field `PIN17` reader - Set as input pin 17"] +pub type PIN17_R = crate::BitReader; +#[doc = "Set as input pin 17\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PIN17_A { + #[doc = "0: Read: pin set as input"] + INPUT = 0, + #[doc = "1: Read: pin set as output"] + OUTPUT = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PIN17_A) -> Self { + variant as u8 != 0 + } +} +impl PIN17_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> PIN17_A { + match self.bits { + false => PIN17_A::INPUT, + true => PIN17_A::OUTPUT, + } + } + #[doc = "Checks if the value of the field is `INPUT`"] + #[inline(always)] + pub fn is_input(&self) -> bool { + *self == PIN17_A::INPUT + } + #[doc = "Checks if the value of the field is `OUTPUT`"] + #[inline(always)] + pub fn is_output(&self) -> bool { + *self == PIN17_A::OUTPUT + } +} +#[doc = "Set as input pin 17\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PIN17_AW { + #[doc = "1: Write: writing a '1' sets pin to input; writing a '0' has no effect"] + CLEAR = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PIN17_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `PIN17` writer - Set as input pin 17"] +pub type PIN17_W<'a, const O: u8> = crate::BitWriter1C<'a, u32, DIRCLR_SPEC, PIN17_AW, O>; +impl<'a, const O: u8> PIN17_W<'a, O> { + #[doc = "Write: writing a '1' sets pin to input; writing a '0' has no effect"] + #[inline(always)] + pub fn clear(self) -> &'a mut W { + self.variant(PIN17_AW::CLEAR) + } +} +#[doc = "Field `PIN18` reader - Set as input pin 18"] +pub type PIN18_R = crate::BitReader; +#[doc = "Set as input pin 18\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PIN18_A { + #[doc = "0: Read: pin set as input"] + INPUT = 0, + #[doc = "1: Read: pin set as output"] + OUTPUT = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PIN18_A) -> Self { + variant as u8 != 0 + } +} +impl PIN18_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> PIN18_A { + match self.bits { + false => PIN18_A::INPUT, + true => PIN18_A::OUTPUT, + } + } + #[doc = "Checks if the value of the field is `INPUT`"] + #[inline(always)] + pub fn is_input(&self) -> bool { + *self == PIN18_A::INPUT + } + #[doc = "Checks if the value of the field is `OUTPUT`"] + #[inline(always)] + pub fn is_output(&self) -> bool { + *self == PIN18_A::OUTPUT + } +} +#[doc = "Set as input pin 18\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PIN18_AW { + #[doc = "1: Write: writing a '1' sets pin to input; writing a '0' has no effect"] + CLEAR = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PIN18_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `PIN18` writer - Set as input pin 18"] +pub type PIN18_W<'a, const O: u8> = crate::BitWriter1C<'a, u32, DIRCLR_SPEC, PIN18_AW, O>; +impl<'a, const O: u8> PIN18_W<'a, O> { + #[doc = "Write: writing a '1' sets pin to input; writing a '0' has no effect"] + #[inline(always)] + pub fn clear(self) -> &'a mut W { + self.variant(PIN18_AW::CLEAR) + } +} +#[doc = "Field `PIN19` reader - Set as input pin 19"] +pub type PIN19_R = crate::BitReader; +#[doc = "Set as input pin 19\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PIN19_A { + #[doc = "0: Read: pin set as input"] + INPUT = 0, + #[doc = "1: Read: pin set as output"] + OUTPUT = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PIN19_A) -> Self { + variant as u8 != 0 + } +} +impl PIN19_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> PIN19_A { + match self.bits { + false => PIN19_A::INPUT, + true => PIN19_A::OUTPUT, + } + } + #[doc = "Checks if the value of the field is `INPUT`"] + #[inline(always)] + pub fn is_input(&self) -> bool { + *self == PIN19_A::INPUT + } + #[doc = "Checks if the value of the field is `OUTPUT`"] + #[inline(always)] + pub fn is_output(&self) -> bool { + *self == PIN19_A::OUTPUT + } +} +#[doc = "Set as input pin 19\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PIN19_AW { + #[doc = "1: Write: writing a '1' sets pin to input; writing a '0' has no effect"] + CLEAR = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PIN19_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `PIN19` writer - Set as input pin 19"] +pub type PIN19_W<'a, const O: u8> = crate::BitWriter1C<'a, u32, DIRCLR_SPEC, PIN19_AW, O>; +impl<'a, const O: u8> PIN19_W<'a, O> { + #[doc = "Write: writing a '1' sets pin to input; writing a '0' has no effect"] + #[inline(always)] + pub fn clear(self) -> &'a mut W { + self.variant(PIN19_AW::CLEAR) + } +} +#[doc = "Field `PIN20` reader - Set as input pin 20"] +pub type PIN20_R = crate::BitReader; +#[doc = "Set as input pin 20\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PIN20_A { + #[doc = "0: Read: pin set as input"] + INPUT = 0, + #[doc = "1: Read: pin set as output"] + OUTPUT = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PIN20_A) -> Self { + variant as u8 != 0 + } +} +impl PIN20_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> PIN20_A { + match self.bits { + false => PIN20_A::INPUT, + true => PIN20_A::OUTPUT, + } + } + #[doc = "Checks if the value of the field is `INPUT`"] + #[inline(always)] + pub fn is_input(&self) -> bool { + *self == PIN20_A::INPUT + } + #[doc = "Checks if the value of the field is `OUTPUT`"] + #[inline(always)] + pub fn is_output(&self) -> bool { + *self == PIN20_A::OUTPUT + } +} +#[doc = "Set as input pin 20\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PIN20_AW { + #[doc = "1: Write: writing a '1' sets pin to input; writing a '0' has no effect"] + CLEAR = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PIN20_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `PIN20` writer - Set as input pin 20"] +pub type PIN20_W<'a, const O: u8> = crate::BitWriter1C<'a, u32, DIRCLR_SPEC, PIN20_AW, O>; +impl<'a, const O: u8> PIN20_W<'a, O> { + #[doc = "Write: writing a '1' sets pin to input; writing a '0' has no effect"] + #[inline(always)] + pub fn clear(self) -> &'a mut W { + self.variant(PIN20_AW::CLEAR) + } +} +#[doc = "Field `PIN21` reader - Set as input pin 21"] +pub type PIN21_R = crate::BitReader; +#[doc = "Set as input pin 21\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PIN21_A { + #[doc = "0: Read: pin set as input"] + INPUT = 0, + #[doc = "1: Read: pin set as output"] + OUTPUT = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PIN21_A) -> Self { + variant as u8 != 0 + } +} +impl PIN21_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> PIN21_A { + match self.bits { + false => PIN21_A::INPUT, + true => PIN21_A::OUTPUT, + } + } + #[doc = "Checks if the value of the field is `INPUT`"] + #[inline(always)] + pub fn is_input(&self) -> bool { + *self == PIN21_A::INPUT + } + #[doc = "Checks if the value of the field is `OUTPUT`"] + #[inline(always)] + pub fn is_output(&self) -> bool { + *self == PIN21_A::OUTPUT + } +} +#[doc = "Set as input pin 21\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PIN21_AW { + #[doc = "1: Write: writing a '1' sets pin to input; writing a '0' has no effect"] + CLEAR = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PIN21_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `PIN21` writer - Set as input pin 21"] +pub type PIN21_W<'a, const O: u8> = crate::BitWriter1C<'a, u32, DIRCLR_SPEC, PIN21_AW, O>; +impl<'a, const O: u8> PIN21_W<'a, O> { + #[doc = "Write: writing a '1' sets pin to input; writing a '0' has no effect"] + #[inline(always)] + pub fn clear(self) -> &'a mut W { + self.variant(PIN21_AW::CLEAR) + } +} +#[doc = "Field `PIN22` reader - Set as input pin 22"] +pub type PIN22_R = crate::BitReader; +#[doc = "Set as input pin 22\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PIN22_A { + #[doc = "0: Read: pin set as input"] + INPUT = 0, + #[doc = "1: Read: pin set as output"] + OUTPUT = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PIN22_A) -> Self { + variant as u8 != 0 + } +} +impl PIN22_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> PIN22_A { + match self.bits { + false => PIN22_A::INPUT, + true => PIN22_A::OUTPUT, + } + } + #[doc = "Checks if the value of the field is `INPUT`"] + #[inline(always)] + pub fn is_input(&self) -> bool { + *self == PIN22_A::INPUT + } + #[doc = "Checks if the value of the field is `OUTPUT`"] + #[inline(always)] + pub fn is_output(&self) -> bool { + *self == PIN22_A::OUTPUT + } +} +#[doc = "Set as input pin 22\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PIN22_AW { + #[doc = "1: Write: writing a '1' sets pin to input; writing a '0' has no effect"] + CLEAR = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PIN22_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `PIN22` writer - Set as input pin 22"] +pub type PIN22_W<'a, const O: u8> = crate::BitWriter1C<'a, u32, DIRCLR_SPEC, PIN22_AW, O>; +impl<'a, const O: u8> PIN22_W<'a, O> { + #[doc = "Write: writing a '1' sets pin to input; writing a '0' has no effect"] + #[inline(always)] + pub fn clear(self) -> &'a mut W { + self.variant(PIN22_AW::CLEAR) + } +} +#[doc = "Field `PIN23` reader - Set as input pin 23"] +pub type PIN23_R = crate::BitReader; +#[doc = "Set as input pin 23\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PIN23_A { + #[doc = "0: Read: pin set as input"] + INPUT = 0, + #[doc = "1: Read: pin set as output"] + OUTPUT = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PIN23_A) -> Self { + variant as u8 != 0 + } +} +impl PIN23_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> PIN23_A { + match self.bits { + false => PIN23_A::INPUT, + true => PIN23_A::OUTPUT, + } + } + #[doc = "Checks if the value of the field is `INPUT`"] + #[inline(always)] + pub fn is_input(&self) -> bool { + *self == PIN23_A::INPUT + } + #[doc = "Checks if the value of the field is `OUTPUT`"] + #[inline(always)] + pub fn is_output(&self) -> bool { + *self == PIN23_A::OUTPUT + } +} +#[doc = "Set as input pin 23\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PIN23_AW { + #[doc = "1: Write: writing a '1' sets pin to input; writing a '0' has no effect"] + CLEAR = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PIN23_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `PIN23` writer - Set as input pin 23"] +pub type PIN23_W<'a, const O: u8> = crate::BitWriter1C<'a, u32, DIRCLR_SPEC, PIN23_AW, O>; +impl<'a, const O: u8> PIN23_W<'a, O> { + #[doc = "Write: writing a '1' sets pin to input; writing a '0' has no effect"] + #[inline(always)] + pub fn clear(self) -> &'a mut W { + self.variant(PIN23_AW::CLEAR) + } +} +#[doc = "Field `PIN24` reader - Set as input pin 24"] +pub type PIN24_R = crate::BitReader; +#[doc = "Set as input pin 24\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PIN24_A { + #[doc = "0: Read: pin set as input"] + INPUT = 0, + #[doc = "1: Read: pin set as output"] + OUTPUT = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PIN24_A) -> Self { + variant as u8 != 0 + } +} +impl PIN24_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> PIN24_A { + match self.bits { + false => PIN24_A::INPUT, + true => PIN24_A::OUTPUT, + } + } + #[doc = "Checks if the value of the field is `INPUT`"] + #[inline(always)] + pub fn is_input(&self) -> bool { + *self == PIN24_A::INPUT + } + #[doc = "Checks if the value of the field is `OUTPUT`"] + #[inline(always)] + pub fn is_output(&self) -> bool { + *self == PIN24_A::OUTPUT + } +} +#[doc = "Set as input pin 24\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PIN24_AW { + #[doc = "1: Write: writing a '1' sets pin to input; writing a '0' has no effect"] + CLEAR = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PIN24_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `PIN24` writer - Set as input pin 24"] +pub type PIN24_W<'a, const O: u8> = crate::BitWriter1C<'a, u32, DIRCLR_SPEC, PIN24_AW, O>; +impl<'a, const O: u8> PIN24_W<'a, O> { + #[doc = "Write: writing a '1' sets pin to input; writing a '0' has no effect"] + #[inline(always)] + pub fn clear(self) -> &'a mut W { + self.variant(PIN24_AW::CLEAR) + } +} +#[doc = "Field `PIN25` reader - Set as input pin 25"] +pub type PIN25_R = crate::BitReader; +#[doc = "Set as input pin 25\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PIN25_A { + #[doc = "0: Read: pin set as input"] + INPUT = 0, + #[doc = "1: Read: pin set as output"] + OUTPUT = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PIN25_A) -> Self { + variant as u8 != 0 + } +} +impl PIN25_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> PIN25_A { + match self.bits { + false => PIN25_A::INPUT, + true => PIN25_A::OUTPUT, + } + } + #[doc = "Checks if the value of the field is `INPUT`"] + #[inline(always)] + pub fn is_input(&self) -> bool { + *self == PIN25_A::INPUT + } + #[doc = "Checks if the value of the field is `OUTPUT`"] + #[inline(always)] + pub fn is_output(&self) -> bool { + *self == PIN25_A::OUTPUT + } +} +#[doc = "Set as input pin 25\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PIN25_AW { + #[doc = "1: Write: writing a '1' sets pin to input; writing a '0' has no effect"] + CLEAR = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PIN25_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `PIN25` writer - Set as input pin 25"] +pub type PIN25_W<'a, const O: u8> = crate::BitWriter1C<'a, u32, DIRCLR_SPEC, PIN25_AW, O>; +impl<'a, const O: u8> PIN25_W<'a, O> { + #[doc = "Write: writing a '1' sets pin to input; writing a '0' has no effect"] + #[inline(always)] + pub fn clear(self) -> &'a mut W { + self.variant(PIN25_AW::CLEAR) + } +} +#[doc = "Field `PIN26` reader - Set as input pin 26"] +pub type PIN26_R = crate::BitReader; +#[doc = "Set as input pin 26\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PIN26_A { + #[doc = "0: Read: pin set as input"] + INPUT = 0, + #[doc = "1: Read: pin set as output"] + OUTPUT = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PIN26_A) -> Self { + variant as u8 != 0 + } +} +impl PIN26_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> PIN26_A { + match self.bits { + false => PIN26_A::INPUT, + true => PIN26_A::OUTPUT, + } + } + #[doc = "Checks if the value of the field is `INPUT`"] + #[inline(always)] + pub fn is_input(&self) -> bool { + *self == PIN26_A::INPUT + } + #[doc = "Checks if the value of the field is `OUTPUT`"] + #[inline(always)] + pub fn is_output(&self) -> bool { + *self == PIN26_A::OUTPUT + } +} +#[doc = "Set as input pin 26\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PIN26_AW { + #[doc = "1: Write: writing a '1' sets pin to input; writing a '0' has no effect"] + CLEAR = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PIN26_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `PIN26` writer - Set as input pin 26"] +pub type PIN26_W<'a, const O: u8> = crate::BitWriter1C<'a, u32, DIRCLR_SPEC, PIN26_AW, O>; +impl<'a, const O: u8> PIN26_W<'a, O> { + #[doc = "Write: writing a '1' sets pin to input; writing a '0' has no effect"] + #[inline(always)] + pub fn clear(self) -> &'a mut W { + self.variant(PIN26_AW::CLEAR) + } +} +#[doc = "Field `PIN27` reader - Set as input pin 27"] +pub type PIN27_R = crate::BitReader; +#[doc = "Set as input pin 27\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PIN27_A { + #[doc = "0: Read: pin set as input"] + INPUT = 0, + #[doc = "1: Read: pin set as output"] + OUTPUT = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PIN27_A) -> Self { + variant as u8 != 0 + } +} +impl PIN27_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> PIN27_A { + match self.bits { + false => PIN27_A::INPUT, + true => PIN27_A::OUTPUT, + } + } + #[doc = "Checks if the value of the field is `INPUT`"] + #[inline(always)] + pub fn is_input(&self) -> bool { + *self == PIN27_A::INPUT + } + #[doc = "Checks if the value of the field is `OUTPUT`"] + #[inline(always)] + pub fn is_output(&self) -> bool { + *self == PIN27_A::OUTPUT + } +} +#[doc = "Set as input pin 27\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PIN27_AW { + #[doc = "1: Write: writing a '1' sets pin to input; writing a '0' has no effect"] + CLEAR = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PIN27_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `PIN27` writer - Set as input pin 27"] +pub type PIN27_W<'a, const O: u8> = crate::BitWriter1C<'a, u32, DIRCLR_SPEC, PIN27_AW, O>; +impl<'a, const O: u8> PIN27_W<'a, O> { + #[doc = "Write: writing a '1' sets pin to input; writing a '0' has no effect"] + #[inline(always)] + pub fn clear(self) -> &'a mut W { + self.variant(PIN27_AW::CLEAR) + } +} +#[doc = "Field `PIN28` reader - Set as input pin 28"] +pub type PIN28_R = crate::BitReader; +#[doc = "Set as input pin 28\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PIN28_A { + #[doc = "0: Read: pin set as input"] + INPUT = 0, + #[doc = "1: Read: pin set as output"] + OUTPUT = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PIN28_A) -> Self { + variant as u8 != 0 + } +} +impl PIN28_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> PIN28_A { + match self.bits { + false => PIN28_A::INPUT, + true => PIN28_A::OUTPUT, + } + } + #[doc = "Checks if the value of the field is `INPUT`"] + #[inline(always)] + pub fn is_input(&self) -> bool { + *self == PIN28_A::INPUT + } + #[doc = "Checks if the value of the field is `OUTPUT`"] + #[inline(always)] + pub fn is_output(&self) -> bool { + *self == PIN28_A::OUTPUT + } +} +#[doc = "Set as input pin 28\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PIN28_AW { + #[doc = "1: Write: writing a '1' sets pin to input; writing a '0' has no effect"] + CLEAR = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PIN28_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `PIN28` writer - Set as input pin 28"] +pub type PIN28_W<'a, const O: u8> = crate::BitWriter1C<'a, u32, DIRCLR_SPEC, PIN28_AW, O>; +impl<'a, const O: u8> PIN28_W<'a, O> { + #[doc = "Write: writing a '1' sets pin to input; writing a '0' has no effect"] + #[inline(always)] + pub fn clear(self) -> &'a mut W { + self.variant(PIN28_AW::CLEAR) + } +} +#[doc = "Field `PIN29` reader - Set as input pin 29"] +pub type PIN29_R = crate::BitReader; +#[doc = "Set as input pin 29\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PIN29_A { + #[doc = "0: Read: pin set as input"] + INPUT = 0, + #[doc = "1: Read: pin set as output"] + OUTPUT = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PIN29_A) -> Self { + variant as u8 != 0 + } +} +impl PIN29_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> PIN29_A { + match self.bits { + false => PIN29_A::INPUT, + true => PIN29_A::OUTPUT, + } + } + #[doc = "Checks if the value of the field is `INPUT`"] + #[inline(always)] + pub fn is_input(&self) -> bool { + *self == PIN29_A::INPUT + } + #[doc = "Checks if the value of the field is `OUTPUT`"] + #[inline(always)] + pub fn is_output(&self) -> bool { + *self == PIN29_A::OUTPUT + } +} +#[doc = "Set as input pin 29\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PIN29_AW { + #[doc = "1: Write: writing a '1' sets pin to input; writing a '0' has no effect"] + CLEAR = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PIN29_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `PIN29` writer - Set as input pin 29"] +pub type PIN29_W<'a, const O: u8> = crate::BitWriter1C<'a, u32, DIRCLR_SPEC, PIN29_AW, O>; +impl<'a, const O: u8> PIN29_W<'a, O> { + #[doc = "Write: writing a '1' sets pin to input; writing a '0' has no effect"] + #[inline(always)] + pub fn clear(self) -> &'a mut W { + self.variant(PIN29_AW::CLEAR) + } +} +#[doc = "Field `PIN30` reader - Set as input pin 30"] +pub type PIN30_R = crate::BitReader; +#[doc = "Set as input pin 30\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PIN30_A { + #[doc = "0: Read: pin set as input"] + INPUT = 0, + #[doc = "1: Read: pin set as output"] + OUTPUT = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PIN30_A) -> Self { + variant as u8 != 0 + } +} +impl PIN30_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> PIN30_A { + match self.bits { + false => PIN30_A::INPUT, + true => PIN30_A::OUTPUT, + } + } + #[doc = "Checks if the value of the field is `INPUT`"] + #[inline(always)] + pub fn is_input(&self) -> bool { + *self == PIN30_A::INPUT + } + #[doc = "Checks if the value of the field is `OUTPUT`"] + #[inline(always)] + pub fn is_output(&self) -> bool { + *self == PIN30_A::OUTPUT + } +} +#[doc = "Set as input pin 30\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PIN30_AW { + #[doc = "1: Write: writing a '1' sets pin to input; writing a '0' has no effect"] + CLEAR = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PIN30_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `PIN30` writer - Set as input pin 30"] +pub type PIN30_W<'a, const O: u8> = crate::BitWriter1C<'a, u32, DIRCLR_SPEC, PIN30_AW, O>; +impl<'a, const O: u8> PIN30_W<'a, O> { + #[doc = "Write: writing a '1' sets pin to input; writing a '0' has no effect"] + #[inline(always)] + pub fn clear(self) -> &'a mut W { + self.variant(PIN30_AW::CLEAR) + } +} +#[doc = "Field `PIN31` reader - Set as input pin 31"] +pub type PIN31_R = crate::BitReader; +#[doc = "Set as input pin 31\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PIN31_A { + #[doc = "0: Read: pin set as input"] + INPUT = 0, + #[doc = "1: Read: pin set as output"] + OUTPUT = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PIN31_A) -> Self { + variant as u8 != 0 + } +} +impl PIN31_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> PIN31_A { + match self.bits { + false => PIN31_A::INPUT, + true => PIN31_A::OUTPUT, + } + } + #[doc = "Checks if the value of the field is `INPUT`"] + #[inline(always)] + pub fn is_input(&self) -> bool { + *self == PIN31_A::INPUT + } + #[doc = "Checks if the value of the field is `OUTPUT`"] + #[inline(always)] + pub fn is_output(&self) -> bool { + *self == PIN31_A::OUTPUT + } +} +#[doc = "Set as input pin 31\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PIN31_AW { + #[doc = "1: Write: writing a '1' sets pin to input; writing a '0' has no effect"] + CLEAR = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PIN31_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `PIN31` writer - Set as input pin 31"] +pub type PIN31_W<'a, const O: u8> = crate::BitWriter1C<'a, u32, DIRCLR_SPEC, PIN31_AW, O>; +impl<'a, const O: u8> PIN31_W<'a, O> { + #[doc = "Write: writing a '1' sets pin to input; writing a '0' has no effect"] + #[inline(always)] + pub fn clear(self) -> &'a mut W { + self.variant(PIN31_AW::CLEAR) + } +} +impl R { + #[doc = "Bit 0 - Set as input pin 0"] + #[inline(always)] + pub fn pin0(&self) -> PIN0_R { + PIN0_R::new((self.bits & 1) != 0) + } + #[doc = "Bit 1 - Set as input pin 1"] + #[inline(always)] + pub fn pin1(&self) -> PIN1_R { + PIN1_R::new(((self.bits >> 1) & 1) != 0) + } + #[doc = "Bit 2 - Set as input pin 2"] + #[inline(always)] + pub fn pin2(&self) -> PIN2_R { + PIN2_R::new(((self.bits >> 2) & 1) != 0) + } + #[doc = "Bit 3 - Set as input pin 3"] + #[inline(always)] + pub fn pin3(&self) -> PIN3_R { + PIN3_R::new(((self.bits >> 3) & 1) != 0) + } + #[doc = "Bit 4 - Set as input pin 4"] + #[inline(always)] + pub fn pin4(&self) -> PIN4_R { + PIN4_R::new(((self.bits >> 4) & 1) != 0) + } + #[doc = "Bit 5 - Set as input pin 5"] + #[inline(always)] + pub fn pin5(&self) -> PIN5_R { + PIN5_R::new(((self.bits >> 5) & 1) != 0) + } + #[doc = "Bit 6 - Set as input pin 6"] + #[inline(always)] + pub fn pin6(&self) -> PIN6_R { + PIN6_R::new(((self.bits >> 6) & 1) != 0) + } + #[doc = "Bit 7 - Set as input pin 7"] + #[inline(always)] + pub fn pin7(&self) -> PIN7_R { + PIN7_R::new(((self.bits >> 7) & 1) != 0) + } + #[doc = "Bit 8 - Set as input pin 8"] + #[inline(always)] + pub fn pin8(&self) -> PIN8_R { + PIN8_R::new(((self.bits >> 8) & 1) != 0) + } + #[doc = "Bit 9 - Set as input pin 9"] + #[inline(always)] + pub fn pin9(&self) -> PIN9_R { + PIN9_R::new(((self.bits >> 9) & 1) != 0) + } + #[doc = "Bit 10 - Set as input pin 10"] + #[inline(always)] + pub fn pin10(&self) -> PIN10_R { + PIN10_R::new(((self.bits >> 10) & 1) != 0) + } + #[doc = "Bit 11 - Set as input pin 11"] + #[inline(always)] + pub fn pin11(&self) -> PIN11_R { + PIN11_R::new(((self.bits >> 11) & 1) != 0) + } + #[doc = "Bit 12 - Set as input pin 12"] + #[inline(always)] + pub fn pin12(&self) -> PIN12_R { + PIN12_R::new(((self.bits >> 12) & 1) != 0) + } + #[doc = "Bit 13 - Set as input pin 13"] + #[inline(always)] + pub fn pin13(&self) -> PIN13_R { + PIN13_R::new(((self.bits >> 13) & 1) != 0) + } + #[doc = "Bit 14 - Set as input pin 14"] + #[inline(always)] + pub fn pin14(&self) -> PIN14_R { + PIN14_R::new(((self.bits >> 14) & 1) != 0) + } + #[doc = "Bit 15 - Set as input pin 15"] + #[inline(always)] + pub fn pin15(&self) -> PIN15_R { + PIN15_R::new(((self.bits >> 15) & 1) != 0) + } + #[doc = "Bit 16 - Set as input pin 16"] + #[inline(always)] + pub fn pin16(&self) -> PIN16_R { + PIN16_R::new(((self.bits >> 16) & 1) != 0) + } + #[doc = "Bit 17 - Set as input pin 17"] + #[inline(always)] + pub fn pin17(&self) -> PIN17_R { + PIN17_R::new(((self.bits >> 17) & 1) != 0) + } + #[doc = "Bit 18 - Set as input pin 18"] + #[inline(always)] + pub fn pin18(&self) -> PIN18_R { + PIN18_R::new(((self.bits >> 18) & 1) != 0) + } + #[doc = "Bit 19 - Set as input pin 19"] + #[inline(always)] + pub fn pin19(&self) -> PIN19_R { + PIN19_R::new(((self.bits >> 19) & 1) != 0) + } + #[doc = "Bit 20 - Set as input pin 20"] + #[inline(always)] + pub fn pin20(&self) -> PIN20_R { + PIN20_R::new(((self.bits >> 20) & 1) != 0) + } + #[doc = "Bit 21 - Set as input pin 21"] + #[inline(always)] + pub fn pin21(&self) -> PIN21_R { + PIN21_R::new(((self.bits >> 21) & 1) != 0) + } + #[doc = "Bit 22 - Set as input pin 22"] + #[inline(always)] + pub fn pin22(&self) -> PIN22_R { + PIN22_R::new(((self.bits >> 22) & 1) != 0) + } + #[doc = "Bit 23 - Set as input pin 23"] + #[inline(always)] + pub fn pin23(&self) -> PIN23_R { + PIN23_R::new(((self.bits >> 23) & 1) != 0) + } + #[doc = "Bit 24 - Set as input pin 24"] + #[inline(always)] + pub fn pin24(&self) -> PIN24_R { + PIN24_R::new(((self.bits >> 24) & 1) != 0) + } + #[doc = "Bit 25 - Set as input pin 25"] + #[inline(always)] + pub fn pin25(&self) -> PIN25_R { + PIN25_R::new(((self.bits >> 25) & 1) != 0) + } + #[doc = "Bit 26 - Set as input pin 26"] + #[inline(always)] + pub fn pin26(&self) -> PIN26_R { + PIN26_R::new(((self.bits >> 26) & 1) != 0) + } + #[doc = "Bit 27 - Set as input pin 27"] + #[inline(always)] + pub fn pin27(&self) -> PIN27_R { + PIN27_R::new(((self.bits >> 27) & 1) != 0) + } + #[doc = "Bit 28 - Set as input pin 28"] + #[inline(always)] + pub fn pin28(&self) -> PIN28_R { + PIN28_R::new(((self.bits >> 28) & 1) != 0) + } + #[doc = "Bit 29 - Set as input pin 29"] + #[inline(always)] + pub fn pin29(&self) -> PIN29_R { + PIN29_R::new(((self.bits >> 29) & 1) != 0) + } + #[doc = "Bit 30 - Set as input pin 30"] + #[inline(always)] + pub fn pin30(&self) -> PIN30_R { + PIN30_R::new(((self.bits >> 30) & 1) != 0) + } + #[doc = "Bit 31 - Set as input pin 31"] + #[inline(always)] + pub fn pin31(&self) -> PIN31_R { + PIN31_R::new(((self.bits >> 31) & 1) != 0) + } +} +impl W { + #[doc = "Bit 0 - Set as input pin 0"] + #[inline(always)] + #[must_use] + pub fn pin0(&mut self) -> PIN0_W<0> { + PIN0_W::new(self) + } + #[doc = "Bit 1 - Set as input pin 1"] + #[inline(always)] + #[must_use] + pub fn pin1(&mut self) -> PIN1_W<1> { + PIN1_W::new(self) + } + #[doc = "Bit 2 - Set as input pin 2"] + #[inline(always)] + #[must_use] + pub fn pin2(&mut self) -> PIN2_W<2> { + PIN2_W::new(self) + } + #[doc = "Bit 3 - Set as input pin 3"] + #[inline(always)] + #[must_use] + pub fn pin3(&mut self) -> PIN3_W<3> { + PIN3_W::new(self) + } + #[doc = "Bit 4 - Set as input pin 4"] + #[inline(always)] + #[must_use] + pub fn pin4(&mut self) -> PIN4_W<4> { + PIN4_W::new(self) + } + #[doc = "Bit 5 - Set as input pin 5"] + #[inline(always)] + #[must_use] + pub fn pin5(&mut self) -> PIN5_W<5> { + PIN5_W::new(self) + } + #[doc = "Bit 6 - Set as input pin 6"] + #[inline(always)] + #[must_use] + pub fn pin6(&mut self) -> PIN6_W<6> { + PIN6_W::new(self) + } + #[doc = "Bit 7 - Set as input pin 7"] + #[inline(always)] + #[must_use] + pub fn pin7(&mut self) -> PIN7_W<7> { + PIN7_W::new(self) + } + #[doc = "Bit 8 - Set as input pin 8"] + #[inline(always)] + #[must_use] + pub fn pin8(&mut self) -> PIN8_W<8> { + PIN8_W::new(self) + } + #[doc = "Bit 9 - Set as input pin 9"] + #[inline(always)] + #[must_use] + pub fn pin9(&mut self) -> PIN9_W<9> { + PIN9_W::new(self) + } + #[doc = "Bit 10 - Set as input pin 10"] + #[inline(always)] + #[must_use] + pub fn pin10(&mut self) -> PIN10_W<10> { + PIN10_W::new(self) + } + #[doc = "Bit 11 - Set as input pin 11"] + #[inline(always)] + #[must_use] + pub fn pin11(&mut self) -> PIN11_W<11> { + PIN11_W::new(self) + } + #[doc = "Bit 12 - Set as input pin 12"] + #[inline(always)] + #[must_use] + pub fn pin12(&mut self) -> PIN12_W<12> { + PIN12_W::new(self) + } + #[doc = "Bit 13 - Set as input pin 13"] + #[inline(always)] + #[must_use] + pub fn pin13(&mut self) -> PIN13_W<13> { + PIN13_W::new(self) + } + #[doc = "Bit 14 - Set as input pin 14"] + #[inline(always)] + #[must_use] + pub fn pin14(&mut self) -> PIN14_W<14> { + PIN14_W::new(self) + } + #[doc = "Bit 15 - Set as input pin 15"] + #[inline(always)] + #[must_use] + pub fn pin15(&mut self) -> PIN15_W<15> { + PIN15_W::new(self) + } + #[doc = "Bit 16 - Set as input pin 16"] + #[inline(always)] + #[must_use] + pub fn pin16(&mut self) -> PIN16_W<16> { + PIN16_W::new(self) + } + #[doc = "Bit 17 - Set as input pin 17"] + #[inline(always)] + #[must_use] + pub fn pin17(&mut self) -> PIN17_W<17> { + PIN17_W::new(self) + } + #[doc = "Bit 18 - Set as input pin 18"] + #[inline(always)] + #[must_use] + pub fn pin18(&mut self) -> PIN18_W<18> { + PIN18_W::new(self) + } + #[doc = "Bit 19 - Set as input pin 19"] + #[inline(always)] + #[must_use] + pub fn pin19(&mut self) -> PIN19_W<19> { + PIN19_W::new(self) + } + #[doc = "Bit 20 - Set as input pin 20"] + #[inline(always)] + #[must_use] + pub fn pin20(&mut self) -> PIN20_W<20> { + PIN20_W::new(self) + } + #[doc = "Bit 21 - Set as input pin 21"] + #[inline(always)] + #[must_use] + pub fn pin21(&mut self) -> PIN21_W<21> { + PIN21_W::new(self) + } + #[doc = "Bit 22 - Set as input pin 22"] + #[inline(always)] + #[must_use] + pub fn pin22(&mut self) -> PIN22_W<22> { + PIN22_W::new(self) + } + #[doc = "Bit 23 - Set as input pin 23"] + #[inline(always)] + #[must_use] + pub fn pin23(&mut self) -> PIN23_W<23> { + PIN23_W::new(self) + } + #[doc = "Bit 24 - Set as input pin 24"] + #[inline(always)] + #[must_use] + pub fn pin24(&mut self) -> PIN24_W<24> { + PIN24_W::new(self) + } + #[doc = "Bit 25 - Set as input pin 25"] + #[inline(always)] + #[must_use] + pub fn pin25(&mut self) -> PIN25_W<25> { + PIN25_W::new(self) + } + #[doc = "Bit 26 - Set as input pin 26"] + #[inline(always)] + #[must_use] + pub fn pin26(&mut self) -> PIN26_W<26> { + PIN26_W::new(self) + } + #[doc = "Bit 27 - Set as input pin 27"] + #[inline(always)] + #[must_use] + pub fn pin27(&mut self) -> PIN27_W<27> { + PIN27_W::new(self) + } + #[doc = "Bit 28 - Set as input pin 28"] + #[inline(always)] + #[must_use] + pub fn pin28(&mut self) -> PIN28_W<28> { + PIN28_W::new(self) + } + #[doc = "Bit 29 - Set as input pin 29"] + #[inline(always)] + #[must_use] + pub fn pin29(&mut self) -> PIN29_W<29> { + PIN29_W::new(self) + } + #[doc = "Bit 30 - Set as input pin 30"] + #[inline(always)] + #[must_use] + pub fn pin30(&mut self) -> PIN30_W<30> { + PIN30_W::new(self) + } + #[doc = "Bit 31 - Set as input pin 31"] + #[inline(always)] + #[must_use] + pub fn pin31(&mut self) -> PIN31_W<31> { + PIN31_W::new(self) + } + #[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 = "DIR clear register\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 [dirclr](index.html) module"] +pub struct DIRCLR_SPEC; +impl crate::RegisterSpec for DIRCLR_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [dirclr::R](R) reader structure"] +impl crate::Readable for DIRCLR_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [dirclr::W](W) writer structure"] +impl crate::Writable for DIRCLR_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0xffff_ffff; +} +#[doc = "`reset()` method sets DIRCLR to value 0"] +impl crate::Resettable for DIRCLR_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/p0/dirset.rs b/down-the-stack/dk_pac/src/p0/dirset.rs new file mode 100644 index 0000000..51baaca --- /dev/null +++ b/down-the-stack/dk_pac/src/p0/dirset.rs @@ -0,0 +1,2241 @@ +#[doc = "Register `DIRSET` 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 `DIRSET` 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 `PIN0` reader - Set as output pin 0"] +pub type PIN0_R = crate::BitReader; +#[doc = "Set as output pin 0\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PIN0_A { + #[doc = "0: Read: pin set as input"] + INPUT = 0, + #[doc = "1: Read: pin set as output"] + OUTPUT = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PIN0_A) -> Self { + variant as u8 != 0 + } +} +impl PIN0_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> PIN0_A { + match self.bits { + false => PIN0_A::INPUT, + true => PIN0_A::OUTPUT, + } + } + #[doc = "Checks if the value of the field is `INPUT`"] + #[inline(always)] + pub fn is_input(&self) -> bool { + *self == PIN0_A::INPUT + } + #[doc = "Checks if the value of the field is `OUTPUT`"] + #[inline(always)] + pub fn is_output(&self) -> bool { + *self == PIN0_A::OUTPUT + } +} +#[doc = "Set as output pin 0\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PIN0_AW { + #[doc = "1: Write: writing a '1' sets pin to output; writing a '0' has no effect"] + SET = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PIN0_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `PIN0` writer - Set as output pin 0"] +pub type PIN0_W<'a, const O: u8> = crate::BitWriter1S<'a, u32, DIRSET_SPEC, PIN0_AW, O>; +impl<'a, const O: u8> PIN0_W<'a, O> { + #[doc = "Write: writing a '1' sets pin to output; writing a '0' has no effect"] + #[inline(always)] + pub fn set(self) -> &'a mut W { + self.variant(PIN0_AW::SET) + } +} +#[doc = "Field `PIN1` reader - Set as output pin 1"] +pub type PIN1_R = crate::BitReader; +#[doc = "Set as output pin 1\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PIN1_A { + #[doc = "0: Read: pin set as input"] + INPUT = 0, + #[doc = "1: Read: pin set as output"] + OUTPUT = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PIN1_A) -> Self { + variant as u8 != 0 + } +} +impl PIN1_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> PIN1_A { + match self.bits { + false => PIN1_A::INPUT, + true => PIN1_A::OUTPUT, + } + } + #[doc = "Checks if the value of the field is `INPUT`"] + #[inline(always)] + pub fn is_input(&self) -> bool { + *self == PIN1_A::INPUT + } + #[doc = "Checks if the value of the field is `OUTPUT`"] + #[inline(always)] + pub fn is_output(&self) -> bool { + *self == PIN1_A::OUTPUT + } +} +#[doc = "Set as output pin 1\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PIN1_AW { + #[doc = "1: Write: writing a '1' sets pin to output; writing a '0' has no effect"] + SET = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PIN1_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `PIN1` writer - Set as output pin 1"] +pub type PIN1_W<'a, const O: u8> = crate::BitWriter1S<'a, u32, DIRSET_SPEC, PIN1_AW, O>; +impl<'a, const O: u8> PIN1_W<'a, O> { + #[doc = "Write: writing a '1' sets pin to output; writing a '0' has no effect"] + #[inline(always)] + pub fn set(self) -> &'a mut W { + self.variant(PIN1_AW::SET) + } +} +#[doc = "Field `PIN2` reader - Set as output pin 2"] +pub type PIN2_R = crate::BitReader; +#[doc = "Set as output pin 2\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PIN2_A { + #[doc = "0: Read: pin set as input"] + INPUT = 0, + #[doc = "1: Read: pin set as output"] + OUTPUT = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PIN2_A) -> Self { + variant as u8 != 0 + } +} +impl PIN2_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> PIN2_A { + match self.bits { + false => PIN2_A::INPUT, + true => PIN2_A::OUTPUT, + } + } + #[doc = "Checks if the value of the field is `INPUT`"] + #[inline(always)] + pub fn is_input(&self) -> bool { + *self == PIN2_A::INPUT + } + #[doc = "Checks if the value of the field is `OUTPUT`"] + #[inline(always)] + pub fn is_output(&self) -> bool { + *self == PIN2_A::OUTPUT + } +} +#[doc = "Set as output pin 2\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PIN2_AW { + #[doc = "1: Write: writing a '1' sets pin to output; writing a '0' has no effect"] + SET = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PIN2_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `PIN2` writer - Set as output pin 2"] +pub type PIN2_W<'a, const O: u8> = crate::BitWriter1S<'a, u32, DIRSET_SPEC, PIN2_AW, O>; +impl<'a, const O: u8> PIN2_W<'a, O> { + #[doc = "Write: writing a '1' sets pin to output; writing a '0' has no effect"] + #[inline(always)] + pub fn set(self) -> &'a mut W { + self.variant(PIN2_AW::SET) + } +} +#[doc = "Field `PIN3` reader - Set as output pin 3"] +pub type PIN3_R = crate::BitReader; +#[doc = "Set as output pin 3\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PIN3_A { + #[doc = "0: Read: pin set as input"] + INPUT = 0, + #[doc = "1: Read: pin set as output"] + OUTPUT = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PIN3_A) -> Self { + variant as u8 != 0 + } +} +impl PIN3_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> PIN3_A { + match self.bits { + false => PIN3_A::INPUT, + true => PIN3_A::OUTPUT, + } + } + #[doc = "Checks if the value of the field is `INPUT`"] + #[inline(always)] + pub fn is_input(&self) -> bool { + *self == PIN3_A::INPUT + } + #[doc = "Checks if the value of the field is `OUTPUT`"] + #[inline(always)] + pub fn is_output(&self) -> bool { + *self == PIN3_A::OUTPUT + } +} +#[doc = "Set as output pin 3\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PIN3_AW { + #[doc = "1: Write: writing a '1' sets pin to output; writing a '0' has no effect"] + SET = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PIN3_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `PIN3` writer - Set as output pin 3"] +pub type PIN3_W<'a, const O: u8> = crate::BitWriter1S<'a, u32, DIRSET_SPEC, PIN3_AW, O>; +impl<'a, const O: u8> PIN3_W<'a, O> { + #[doc = "Write: writing a '1' sets pin to output; writing a '0' has no effect"] + #[inline(always)] + pub fn set(self) -> &'a mut W { + self.variant(PIN3_AW::SET) + } +} +#[doc = "Field `PIN4` reader - Set as output pin 4"] +pub type PIN4_R = crate::BitReader; +#[doc = "Set as output pin 4\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PIN4_A { + #[doc = "0: Read: pin set as input"] + INPUT = 0, + #[doc = "1: Read: pin set as output"] + OUTPUT = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PIN4_A) -> Self { + variant as u8 != 0 + } +} +impl PIN4_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> PIN4_A { + match self.bits { + false => PIN4_A::INPUT, + true => PIN4_A::OUTPUT, + } + } + #[doc = "Checks if the value of the field is `INPUT`"] + #[inline(always)] + pub fn is_input(&self) -> bool { + *self == PIN4_A::INPUT + } + #[doc = "Checks if the value of the field is `OUTPUT`"] + #[inline(always)] + pub fn is_output(&self) -> bool { + *self == PIN4_A::OUTPUT + } +} +#[doc = "Set as output pin 4\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PIN4_AW { + #[doc = "1: Write: writing a '1' sets pin to output; writing a '0' has no effect"] + SET = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PIN4_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `PIN4` writer - Set as output pin 4"] +pub type PIN4_W<'a, const O: u8> = crate::BitWriter1S<'a, u32, DIRSET_SPEC, PIN4_AW, O>; +impl<'a, const O: u8> PIN4_W<'a, O> { + #[doc = "Write: writing a '1' sets pin to output; writing a '0' has no effect"] + #[inline(always)] + pub fn set(self) -> &'a mut W { + self.variant(PIN4_AW::SET) + } +} +#[doc = "Field `PIN5` reader - Set as output pin 5"] +pub type PIN5_R = crate::BitReader; +#[doc = "Set as output pin 5\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PIN5_A { + #[doc = "0: Read: pin set as input"] + INPUT = 0, + #[doc = "1: Read: pin set as output"] + OUTPUT = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PIN5_A) -> Self { + variant as u8 != 0 + } +} +impl PIN5_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> PIN5_A { + match self.bits { + false => PIN5_A::INPUT, + true => PIN5_A::OUTPUT, + } + } + #[doc = "Checks if the value of the field is `INPUT`"] + #[inline(always)] + pub fn is_input(&self) -> bool { + *self == PIN5_A::INPUT + } + #[doc = "Checks if the value of the field is `OUTPUT`"] + #[inline(always)] + pub fn is_output(&self) -> bool { + *self == PIN5_A::OUTPUT + } +} +#[doc = "Set as output pin 5\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PIN5_AW { + #[doc = "1: Write: writing a '1' sets pin to output; writing a '0' has no effect"] + SET = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PIN5_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `PIN5` writer - Set as output pin 5"] +pub type PIN5_W<'a, const O: u8> = crate::BitWriter1S<'a, u32, DIRSET_SPEC, PIN5_AW, O>; +impl<'a, const O: u8> PIN5_W<'a, O> { + #[doc = "Write: writing a '1' sets pin to output; writing a '0' has no effect"] + #[inline(always)] + pub fn set(self) -> &'a mut W { + self.variant(PIN5_AW::SET) + } +} +#[doc = "Field `PIN6` reader - Set as output pin 6"] +pub type PIN6_R = crate::BitReader; +#[doc = "Set as output pin 6\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PIN6_A { + #[doc = "0: Read: pin set as input"] + INPUT = 0, + #[doc = "1: Read: pin set as output"] + OUTPUT = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PIN6_A) -> Self { + variant as u8 != 0 + } +} +impl PIN6_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> PIN6_A { + match self.bits { + false => PIN6_A::INPUT, + true => PIN6_A::OUTPUT, + } + } + #[doc = "Checks if the value of the field is `INPUT`"] + #[inline(always)] + pub fn is_input(&self) -> bool { + *self == PIN6_A::INPUT + } + #[doc = "Checks if the value of the field is `OUTPUT`"] + #[inline(always)] + pub fn is_output(&self) -> bool { + *self == PIN6_A::OUTPUT + } +} +#[doc = "Set as output pin 6\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PIN6_AW { + #[doc = "1: Write: writing a '1' sets pin to output; writing a '0' has no effect"] + SET = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PIN6_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `PIN6` writer - Set as output pin 6"] +pub type PIN6_W<'a, const O: u8> = crate::BitWriter1S<'a, u32, DIRSET_SPEC, PIN6_AW, O>; +impl<'a, const O: u8> PIN6_W<'a, O> { + #[doc = "Write: writing a '1' sets pin to output; writing a '0' has no effect"] + #[inline(always)] + pub fn set(self) -> &'a mut W { + self.variant(PIN6_AW::SET) + } +} +#[doc = "Field `PIN7` reader - Set as output pin 7"] +pub type PIN7_R = crate::BitReader; +#[doc = "Set as output pin 7\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PIN7_A { + #[doc = "0: Read: pin set as input"] + INPUT = 0, + #[doc = "1: Read: pin set as output"] + OUTPUT = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PIN7_A) -> Self { + variant as u8 != 0 + } +} +impl PIN7_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> PIN7_A { + match self.bits { + false => PIN7_A::INPUT, + true => PIN7_A::OUTPUT, + } + } + #[doc = "Checks if the value of the field is `INPUT`"] + #[inline(always)] + pub fn is_input(&self) -> bool { + *self == PIN7_A::INPUT + } + #[doc = "Checks if the value of the field is `OUTPUT`"] + #[inline(always)] + pub fn is_output(&self) -> bool { + *self == PIN7_A::OUTPUT + } +} +#[doc = "Set as output pin 7\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PIN7_AW { + #[doc = "1: Write: writing a '1' sets pin to output; writing a '0' has no effect"] + SET = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PIN7_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `PIN7` writer - Set as output pin 7"] +pub type PIN7_W<'a, const O: u8> = crate::BitWriter1S<'a, u32, DIRSET_SPEC, PIN7_AW, O>; +impl<'a, const O: u8> PIN7_W<'a, O> { + #[doc = "Write: writing a '1' sets pin to output; writing a '0' has no effect"] + #[inline(always)] + pub fn set(self) -> &'a mut W { + self.variant(PIN7_AW::SET) + } +} +#[doc = "Field `PIN8` reader - Set as output pin 8"] +pub type PIN8_R = crate::BitReader; +#[doc = "Set as output pin 8\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PIN8_A { + #[doc = "0: Read: pin set as input"] + INPUT = 0, + #[doc = "1: Read: pin set as output"] + OUTPUT = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PIN8_A) -> Self { + variant as u8 != 0 + } +} +impl PIN8_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> PIN8_A { + match self.bits { + false => PIN8_A::INPUT, + true => PIN8_A::OUTPUT, + } + } + #[doc = "Checks if the value of the field is `INPUT`"] + #[inline(always)] + pub fn is_input(&self) -> bool { + *self == PIN8_A::INPUT + } + #[doc = "Checks if the value of the field is `OUTPUT`"] + #[inline(always)] + pub fn is_output(&self) -> bool { + *self == PIN8_A::OUTPUT + } +} +#[doc = "Set as output pin 8\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PIN8_AW { + #[doc = "1: Write: writing a '1' sets pin to output; writing a '0' has no effect"] + SET = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PIN8_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `PIN8` writer - Set as output pin 8"] +pub type PIN8_W<'a, const O: u8> = crate::BitWriter1S<'a, u32, DIRSET_SPEC, PIN8_AW, O>; +impl<'a, const O: u8> PIN8_W<'a, O> { + #[doc = "Write: writing a '1' sets pin to output; writing a '0' has no effect"] + #[inline(always)] + pub fn set(self) -> &'a mut W { + self.variant(PIN8_AW::SET) + } +} +#[doc = "Field `PIN9` reader - Set as output pin 9"] +pub type PIN9_R = crate::BitReader; +#[doc = "Set as output pin 9\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PIN9_A { + #[doc = "0: Read: pin set as input"] + INPUT = 0, + #[doc = "1: Read: pin set as output"] + OUTPUT = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PIN9_A) -> Self { + variant as u8 != 0 + } +} +impl PIN9_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> PIN9_A { + match self.bits { + false => PIN9_A::INPUT, + true => PIN9_A::OUTPUT, + } + } + #[doc = "Checks if the value of the field is `INPUT`"] + #[inline(always)] + pub fn is_input(&self) -> bool { + *self == PIN9_A::INPUT + } + #[doc = "Checks if the value of the field is `OUTPUT`"] + #[inline(always)] + pub fn is_output(&self) -> bool { + *self == PIN9_A::OUTPUT + } +} +#[doc = "Set as output pin 9\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PIN9_AW { + #[doc = "1: Write: writing a '1' sets pin to output; writing a '0' has no effect"] + SET = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PIN9_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `PIN9` writer - Set as output pin 9"] +pub type PIN9_W<'a, const O: u8> = crate::BitWriter1S<'a, u32, DIRSET_SPEC, PIN9_AW, O>; +impl<'a, const O: u8> PIN9_W<'a, O> { + #[doc = "Write: writing a '1' sets pin to output; writing a '0' has no effect"] + #[inline(always)] + pub fn set(self) -> &'a mut W { + self.variant(PIN9_AW::SET) + } +} +#[doc = "Field `PIN10` reader - Set as output pin 10"] +pub type PIN10_R = crate::BitReader; +#[doc = "Set as output pin 10\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PIN10_A { + #[doc = "0: Read: pin set as input"] + INPUT = 0, + #[doc = "1: Read: pin set as output"] + OUTPUT = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PIN10_A) -> Self { + variant as u8 != 0 + } +} +impl PIN10_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> PIN10_A { + match self.bits { + false => PIN10_A::INPUT, + true => PIN10_A::OUTPUT, + } + } + #[doc = "Checks if the value of the field is `INPUT`"] + #[inline(always)] + pub fn is_input(&self) -> bool { + *self == PIN10_A::INPUT + } + #[doc = "Checks if the value of the field is `OUTPUT`"] + #[inline(always)] + pub fn is_output(&self) -> bool { + *self == PIN10_A::OUTPUT + } +} +#[doc = "Set as output pin 10\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PIN10_AW { + #[doc = "1: Write: writing a '1' sets pin to output; writing a '0' has no effect"] + SET = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PIN10_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `PIN10` writer - Set as output pin 10"] +pub type PIN10_W<'a, const O: u8> = crate::BitWriter1S<'a, u32, DIRSET_SPEC, PIN10_AW, O>; +impl<'a, const O: u8> PIN10_W<'a, O> { + #[doc = "Write: writing a '1' sets pin to output; writing a '0' has no effect"] + #[inline(always)] + pub fn set(self) -> &'a mut W { + self.variant(PIN10_AW::SET) + } +} +#[doc = "Field `PIN11` reader - Set as output pin 11"] +pub type PIN11_R = crate::BitReader; +#[doc = "Set as output pin 11\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PIN11_A { + #[doc = "0: Read: pin set as input"] + INPUT = 0, + #[doc = "1: Read: pin set as output"] + OUTPUT = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PIN11_A) -> Self { + variant as u8 != 0 + } +} +impl PIN11_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> PIN11_A { + match self.bits { + false => PIN11_A::INPUT, + true => PIN11_A::OUTPUT, + } + } + #[doc = "Checks if the value of the field is `INPUT`"] + #[inline(always)] + pub fn is_input(&self) -> bool { + *self == PIN11_A::INPUT + } + #[doc = "Checks if the value of the field is `OUTPUT`"] + #[inline(always)] + pub fn is_output(&self) -> bool { + *self == PIN11_A::OUTPUT + } +} +#[doc = "Set as output pin 11\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PIN11_AW { + #[doc = "1: Write: writing a '1' sets pin to output; writing a '0' has no effect"] + SET = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PIN11_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `PIN11` writer - Set as output pin 11"] +pub type PIN11_W<'a, const O: u8> = crate::BitWriter1S<'a, u32, DIRSET_SPEC, PIN11_AW, O>; +impl<'a, const O: u8> PIN11_W<'a, O> { + #[doc = "Write: writing a '1' sets pin to output; writing a '0' has no effect"] + #[inline(always)] + pub fn set(self) -> &'a mut W { + self.variant(PIN11_AW::SET) + } +} +#[doc = "Field `PIN12` reader - Set as output pin 12"] +pub type PIN12_R = crate::BitReader; +#[doc = "Set as output pin 12\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PIN12_A { + #[doc = "0: Read: pin set as input"] + INPUT = 0, + #[doc = "1: Read: pin set as output"] + OUTPUT = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PIN12_A) -> Self { + variant as u8 != 0 + } +} +impl PIN12_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> PIN12_A { + match self.bits { + false => PIN12_A::INPUT, + true => PIN12_A::OUTPUT, + } + } + #[doc = "Checks if the value of the field is `INPUT`"] + #[inline(always)] + pub fn is_input(&self) -> bool { + *self == PIN12_A::INPUT + } + #[doc = "Checks if the value of the field is `OUTPUT`"] + #[inline(always)] + pub fn is_output(&self) -> bool { + *self == PIN12_A::OUTPUT + } +} +#[doc = "Set as output pin 12\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PIN12_AW { + #[doc = "1: Write: writing a '1' sets pin to output; writing a '0' has no effect"] + SET = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PIN12_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `PIN12` writer - Set as output pin 12"] +pub type PIN12_W<'a, const O: u8> = crate::BitWriter1S<'a, u32, DIRSET_SPEC, PIN12_AW, O>; +impl<'a, const O: u8> PIN12_W<'a, O> { + #[doc = "Write: writing a '1' sets pin to output; writing a '0' has no effect"] + #[inline(always)] + pub fn set(self) -> &'a mut W { + self.variant(PIN12_AW::SET) + } +} +#[doc = "Field `PIN13` reader - Set as output pin 13"] +pub type PIN13_R = crate::BitReader; +#[doc = "Set as output pin 13\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PIN13_A { + #[doc = "0: Read: pin set as input"] + INPUT = 0, + #[doc = "1: Read: pin set as output"] + OUTPUT = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PIN13_A) -> Self { + variant as u8 != 0 + } +} +impl PIN13_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> PIN13_A { + match self.bits { + false => PIN13_A::INPUT, + true => PIN13_A::OUTPUT, + } + } + #[doc = "Checks if the value of the field is `INPUT`"] + #[inline(always)] + pub fn is_input(&self) -> bool { + *self == PIN13_A::INPUT + } + #[doc = "Checks if the value of the field is `OUTPUT`"] + #[inline(always)] + pub fn is_output(&self) -> bool { + *self == PIN13_A::OUTPUT + } +} +#[doc = "Set as output pin 13\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PIN13_AW { + #[doc = "1: Write: writing a '1' sets pin to output; writing a '0' has no effect"] + SET = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PIN13_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `PIN13` writer - Set as output pin 13"] +pub type PIN13_W<'a, const O: u8> = crate::BitWriter1S<'a, u32, DIRSET_SPEC, PIN13_AW, O>; +impl<'a, const O: u8> PIN13_W<'a, O> { + #[doc = "Write: writing a '1' sets pin to output; writing a '0' has no effect"] + #[inline(always)] + pub fn set(self) -> &'a mut W { + self.variant(PIN13_AW::SET) + } +} +#[doc = "Field `PIN14` reader - Set as output pin 14"] +pub type PIN14_R = crate::BitReader; +#[doc = "Set as output pin 14\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PIN14_A { + #[doc = "0: Read: pin set as input"] + INPUT = 0, + #[doc = "1: Read: pin set as output"] + OUTPUT = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PIN14_A) -> Self { + variant as u8 != 0 + } +} +impl PIN14_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> PIN14_A { + match self.bits { + false => PIN14_A::INPUT, + true => PIN14_A::OUTPUT, + } + } + #[doc = "Checks if the value of the field is `INPUT`"] + #[inline(always)] + pub fn is_input(&self) -> bool { + *self == PIN14_A::INPUT + } + #[doc = "Checks if the value of the field is `OUTPUT`"] + #[inline(always)] + pub fn is_output(&self) -> bool { + *self == PIN14_A::OUTPUT + } +} +#[doc = "Set as output pin 14\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PIN14_AW { + #[doc = "1: Write: writing a '1' sets pin to output; writing a '0' has no effect"] + SET = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PIN14_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `PIN14` writer - Set as output pin 14"] +pub type PIN14_W<'a, const O: u8> = crate::BitWriter1S<'a, u32, DIRSET_SPEC, PIN14_AW, O>; +impl<'a, const O: u8> PIN14_W<'a, O> { + #[doc = "Write: writing a '1' sets pin to output; writing a '0' has no effect"] + #[inline(always)] + pub fn set(self) -> &'a mut W { + self.variant(PIN14_AW::SET) + } +} +#[doc = "Field `PIN15` reader - Set as output pin 15"] +pub type PIN15_R = crate::BitReader; +#[doc = "Set as output pin 15\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PIN15_A { + #[doc = "0: Read: pin set as input"] + INPUT = 0, + #[doc = "1: Read: pin set as output"] + OUTPUT = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PIN15_A) -> Self { + variant as u8 != 0 + } +} +impl PIN15_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> PIN15_A { + match self.bits { + false => PIN15_A::INPUT, + true => PIN15_A::OUTPUT, + } + } + #[doc = "Checks if the value of the field is `INPUT`"] + #[inline(always)] + pub fn is_input(&self) -> bool { + *self == PIN15_A::INPUT + } + #[doc = "Checks if the value of the field is `OUTPUT`"] + #[inline(always)] + pub fn is_output(&self) -> bool { + *self == PIN15_A::OUTPUT + } +} +#[doc = "Set as output pin 15\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PIN15_AW { + #[doc = "1: Write: writing a '1' sets pin to output; writing a '0' has no effect"] + SET = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PIN15_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `PIN15` writer - Set as output pin 15"] +pub type PIN15_W<'a, const O: u8> = crate::BitWriter1S<'a, u32, DIRSET_SPEC, PIN15_AW, O>; +impl<'a, const O: u8> PIN15_W<'a, O> { + #[doc = "Write: writing a '1' sets pin to output; writing a '0' has no effect"] + #[inline(always)] + pub fn set(self) -> &'a mut W { + self.variant(PIN15_AW::SET) + } +} +#[doc = "Field `PIN16` reader - Set as output pin 16"] +pub type PIN16_R = crate::BitReader; +#[doc = "Set as output pin 16\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PIN16_A { + #[doc = "0: Read: pin set as input"] + INPUT = 0, + #[doc = "1: Read: pin set as output"] + OUTPUT = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PIN16_A) -> Self { + variant as u8 != 0 + } +} +impl PIN16_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> PIN16_A { + match self.bits { + false => PIN16_A::INPUT, + true => PIN16_A::OUTPUT, + } + } + #[doc = "Checks if the value of the field is `INPUT`"] + #[inline(always)] + pub fn is_input(&self) -> bool { + *self == PIN16_A::INPUT + } + #[doc = "Checks if the value of the field is `OUTPUT`"] + #[inline(always)] + pub fn is_output(&self) -> bool { + *self == PIN16_A::OUTPUT + } +} +#[doc = "Set as output pin 16\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PIN16_AW { + #[doc = "1: Write: writing a '1' sets pin to output; writing a '0' has no effect"] + SET = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PIN16_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `PIN16` writer - Set as output pin 16"] +pub type PIN16_W<'a, const O: u8> = crate::BitWriter1S<'a, u32, DIRSET_SPEC, PIN16_AW, O>; +impl<'a, const O: u8> PIN16_W<'a, O> { + #[doc = "Write: writing a '1' sets pin to output; writing a '0' has no effect"] + #[inline(always)] + pub fn set(self) -> &'a mut W { + self.variant(PIN16_AW::SET) + } +} +#[doc = "Field `PIN17` reader - Set as output pin 17"] +pub type PIN17_R = crate::BitReader; +#[doc = "Set as output pin 17\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PIN17_A { + #[doc = "0: Read: pin set as input"] + INPUT = 0, + #[doc = "1: Read: pin set as output"] + OUTPUT = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PIN17_A) -> Self { + variant as u8 != 0 + } +} +impl PIN17_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> PIN17_A { + match self.bits { + false => PIN17_A::INPUT, + true => PIN17_A::OUTPUT, + } + } + #[doc = "Checks if the value of the field is `INPUT`"] + #[inline(always)] + pub fn is_input(&self) -> bool { + *self == PIN17_A::INPUT + } + #[doc = "Checks if the value of the field is `OUTPUT`"] + #[inline(always)] + pub fn is_output(&self) -> bool { + *self == PIN17_A::OUTPUT + } +} +#[doc = "Set as output pin 17\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PIN17_AW { + #[doc = "1: Write: writing a '1' sets pin to output; writing a '0' has no effect"] + SET = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PIN17_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `PIN17` writer - Set as output pin 17"] +pub type PIN17_W<'a, const O: u8> = crate::BitWriter1S<'a, u32, DIRSET_SPEC, PIN17_AW, O>; +impl<'a, const O: u8> PIN17_W<'a, O> { + #[doc = "Write: writing a '1' sets pin to output; writing a '0' has no effect"] + #[inline(always)] + pub fn set(self) -> &'a mut W { + self.variant(PIN17_AW::SET) + } +} +#[doc = "Field `PIN18` reader - Set as output pin 18"] +pub type PIN18_R = crate::BitReader; +#[doc = "Set as output pin 18\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PIN18_A { + #[doc = "0: Read: pin set as input"] + INPUT = 0, + #[doc = "1: Read: pin set as output"] + OUTPUT = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PIN18_A) -> Self { + variant as u8 != 0 + } +} +impl PIN18_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> PIN18_A { + match self.bits { + false => PIN18_A::INPUT, + true => PIN18_A::OUTPUT, + } + } + #[doc = "Checks if the value of the field is `INPUT`"] + #[inline(always)] + pub fn is_input(&self) -> bool { + *self == PIN18_A::INPUT + } + #[doc = "Checks if the value of the field is `OUTPUT`"] + #[inline(always)] + pub fn is_output(&self) -> bool { + *self == PIN18_A::OUTPUT + } +} +#[doc = "Set as output pin 18\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PIN18_AW { + #[doc = "1: Write: writing a '1' sets pin to output; writing a '0' has no effect"] + SET = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PIN18_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `PIN18` writer - Set as output pin 18"] +pub type PIN18_W<'a, const O: u8> = crate::BitWriter1S<'a, u32, DIRSET_SPEC, PIN18_AW, O>; +impl<'a, const O: u8> PIN18_W<'a, O> { + #[doc = "Write: writing a '1' sets pin to output; writing a '0' has no effect"] + #[inline(always)] + pub fn set(self) -> &'a mut W { + self.variant(PIN18_AW::SET) + } +} +#[doc = "Field `PIN19` reader - Set as output pin 19"] +pub type PIN19_R = crate::BitReader; +#[doc = "Set as output pin 19\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PIN19_A { + #[doc = "0: Read: pin set as input"] + INPUT = 0, + #[doc = "1: Read: pin set as output"] + OUTPUT = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PIN19_A) -> Self { + variant as u8 != 0 + } +} +impl PIN19_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> PIN19_A { + match self.bits { + false => PIN19_A::INPUT, + true => PIN19_A::OUTPUT, + } + } + #[doc = "Checks if the value of the field is `INPUT`"] + #[inline(always)] + pub fn is_input(&self) -> bool { + *self == PIN19_A::INPUT + } + #[doc = "Checks if the value of the field is `OUTPUT`"] + #[inline(always)] + pub fn is_output(&self) -> bool { + *self == PIN19_A::OUTPUT + } +} +#[doc = "Set as output pin 19\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PIN19_AW { + #[doc = "1: Write: writing a '1' sets pin to output; writing a '0' has no effect"] + SET = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PIN19_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `PIN19` writer - Set as output pin 19"] +pub type PIN19_W<'a, const O: u8> = crate::BitWriter1S<'a, u32, DIRSET_SPEC, PIN19_AW, O>; +impl<'a, const O: u8> PIN19_W<'a, O> { + #[doc = "Write: writing a '1' sets pin to output; writing a '0' has no effect"] + #[inline(always)] + pub fn set(self) -> &'a mut W { + self.variant(PIN19_AW::SET) + } +} +#[doc = "Field `PIN20` reader - Set as output pin 20"] +pub type PIN20_R = crate::BitReader; +#[doc = "Set as output pin 20\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PIN20_A { + #[doc = "0: Read: pin set as input"] + INPUT = 0, + #[doc = "1: Read: pin set as output"] + OUTPUT = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PIN20_A) -> Self { + variant as u8 != 0 + } +} +impl PIN20_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> PIN20_A { + match self.bits { + false => PIN20_A::INPUT, + true => PIN20_A::OUTPUT, + } + } + #[doc = "Checks if the value of the field is `INPUT`"] + #[inline(always)] + pub fn is_input(&self) -> bool { + *self == PIN20_A::INPUT + } + #[doc = "Checks if the value of the field is `OUTPUT`"] + #[inline(always)] + pub fn is_output(&self) -> bool { + *self == PIN20_A::OUTPUT + } +} +#[doc = "Set as output pin 20\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PIN20_AW { + #[doc = "1: Write: writing a '1' sets pin to output; writing a '0' has no effect"] + SET = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PIN20_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `PIN20` writer - Set as output pin 20"] +pub type PIN20_W<'a, const O: u8> = crate::BitWriter1S<'a, u32, DIRSET_SPEC, PIN20_AW, O>; +impl<'a, const O: u8> PIN20_W<'a, O> { + #[doc = "Write: writing a '1' sets pin to output; writing a '0' has no effect"] + #[inline(always)] + pub fn set(self) -> &'a mut W { + self.variant(PIN20_AW::SET) + } +} +#[doc = "Field `PIN21` reader - Set as output pin 21"] +pub type PIN21_R = crate::BitReader; +#[doc = "Set as output pin 21\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PIN21_A { + #[doc = "0: Read: pin set as input"] + INPUT = 0, + #[doc = "1: Read: pin set as output"] + OUTPUT = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PIN21_A) -> Self { + variant as u8 != 0 + } +} +impl PIN21_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> PIN21_A { + match self.bits { + false => PIN21_A::INPUT, + true => PIN21_A::OUTPUT, + } + } + #[doc = "Checks if the value of the field is `INPUT`"] + #[inline(always)] + pub fn is_input(&self) -> bool { + *self == PIN21_A::INPUT + } + #[doc = "Checks if the value of the field is `OUTPUT`"] + #[inline(always)] + pub fn is_output(&self) -> bool { + *self == PIN21_A::OUTPUT + } +} +#[doc = "Set as output pin 21\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PIN21_AW { + #[doc = "1: Write: writing a '1' sets pin to output; writing a '0' has no effect"] + SET = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PIN21_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `PIN21` writer - Set as output pin 21"] +pub type PIN21_W<'a, const O: u8> = crate::BitWriter1S<'a, u32, DIRSET_SPEC, PIN21_AW, O>; +impl<'a, const O: u8> PIN21_W<'a, O> { + #[doc = "Write: writing a '1' sets pin to output; writing a '0' has no effect"] + #[inline(always)] + pub fn set(self) -> &'a mut W { + self.variant(PIN21_AW::SET) + } +} +#[doc = "Field `PIN22` reader - Set as output pin 22"] +pub type PIN22_R = crate::BitReader; +#[doc = "Set as output pin 22\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PIN22_A { + #[doc = "0: Read: pin set as input"] + INPUT = 0, + #[doc = "1: Read: pin set as output"] + OUTPUT = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PIN22_A) -> Self { + variant as u8 != 0 + } +} +impl PIN22_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> PIN22_A { + match self.bits { + false => PIN22_A::INPUT, + true => PIN22_A::OUTPUT, + } + } + #[doc = "Checks if the value of the field is `INPUT`"] + #[inline(always)] + pub fn is_input(&self) -> bool { + *self == PIN22_A::INPUT + } + #[doc = "Checks if the value of the field is `OUTPUT`"] + #[inline(always)] + pub fn is_output(&self) -> bool { + *self == PIN22_A::OUTPUT + } +} +#[doc = "Set as output pin 22\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PIN22_AW { + #[doc = "1: Write: writing a '1' sets pin to output; writing a '0' has no effect"] + SET = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PIN22_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `PIN22` writer - Set as output pin 22"] +pub type PIN22_W<'a, const O: u8> = crate::BitWriter1S<'a, u32, DIRSET_SPEC, PIN22_AW, O>; +impl<'a, const O: u8> PIN22_W<'a, O> { + #[doc = "Write: writing a '1' sets pin to output; writing a '0' has no effect"] + #[inline(always)] + pub fn set(self) -> &'a mut W { + self.variant(PIN22_AW::SET) + } +} +#[doc = "Field `PIN23` reader - Set as output pin 23"] +pub type PIN23_R = crate::BitReader; +#[doc = "Set as output pin 23\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PIN23_A { + #[doc = "0: Read: pin set as input"] + INPUT = 0, + #[doc = "1: Read: pin set as output"] + OUTPUT = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PIN23_A) -> Self { + variant as u8 != 0 + } +} +impl PIN23_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> PIN23_A { + match self.bits { + false => PIN23_A::INPUT, + true => PIN23_A::OUTPUT, + } + } + #[doc = "Checks if the value of the field is `INPUT`"] + #[inline(always)] + pub fn is_input(&self) -> bool { + *self == PIN23_A::INPUT + } + #[doc = "Checks if the value of the field is `OUTPUT`"] + #[inline(always)] + pub fn is_output(&self) -> bool { + *self == PIN23_A::OUTPUT + } +} +#[doc = "Set as output pin 23\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PIN23_AW { + #[doc = "1: Write: writing a '1' sets pin to output; writing a '0' has no effect"] + SET = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PIN23_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `PIN23` writer - Set as output pin 23"] +pub type PIN23_W<'a, const O: u8> = crate::BitWriter1S<'a, u32, DIRSET_SPEC, PIN23_AW, O>; +impl<'a, const O: u8> PIN23_W<'a, O> { + #[doc = "Write: writing a '1' sets pin to output; writing a '0' has no effect"] + #[inline(always)] + pub fn set(self) -> &'a mut W { + self.variant(PIN23_AW::SET) + } +} +#[doc = "Field `PIN24` reader - Set as output pin 24"] +pub type PIN24_R = crate::BitReader; +#[doc = "Set as output pin 24\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PIN24_A { + #[doc = "0: Read: pin set as input"] + INPUT = 0, + #[doc = "1: Read: pin set as output"] + OUTPUT = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PIN24_A) -> Self { + variant as u8 != 0 + } +} +impl PIN24_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> PIN24_A { + match self.bits { + false => PIN24_A::INPUT, + true => PIN24_A::OUTPUT, + } + } + #[doc = "Checks if the value of the field is `INPUT`"] + #[inline(always)] + pub fn is_input(&self) -> bool { + *self == PIN24_A::INPUT + } + #[doc = "Checks if the value of the field is `OUTPUT`"] + #[inline(always)] + pub fn is_output(&self) -> bool { + *self == PIN24_A::OUTPUT + } +} +#[doc = "Set as output pin 24\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PIN24_AW { + #[doc = "1: Write: writing a '1' sets pin to output; writing a '0' has no effect"] + SET = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PIN24_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `PIN24` writer - Set as output pin 24"] +pub type PIN24_W<'a, const O: u8> = crate::BitWriter1S<'a, u32, DIRSET_SPEC, PIN24_AW, O>; +impl<'a, const O: u8> PIN24_W<'a, O> { + #[doc = "Write: writing a '1' sets pin to output; writing a '0' has no effect"] + #[inline(always)] + pub fn set(self) -> &'a mut W { + self.variant(PIN24_AW::SET) + } +} +#[doc = "Field `PIN25` reader - Set as output pin 25"] +pub type PIN25_R = crate::BitReader; +#[doc = "Set as output pin 25\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PIN25_A { + #[doc = "0: Read: pin set as input"] + INPUT = 0, + #[doc = "1: Read: pin set as output"] + OUTPUT = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PIN25_A) -> Self { + variant as u8 != 0 + } +} +impl PIN25_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> PIN25_A { + match self.bits { + false => PIN25_A::INPUT, + true => PIN25_A::OUTPUT, + } + } + #[doc = "Checks if the value of the field is `INPUT`"] + #[inline(always)] + pub fn is_input(&self) -> bool { + *self == PIN25_A::INPUT + } + #[doc = "Checks if the value of the field is `OUTPUT`"] + #[inline(always)] + pub fn is_output(&self) -> bool { + *self == PIN25_A::OUTPUT + } +} +#[doc = "Set as output pin 25\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PIN25_AW { + #[doc = "1: Write: writing a '1' sets pin to output; writing a '0' has no effect"] + SET = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PIN25_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `PIN25` writer - Set as output pin 25"] +pub type PIN25_W<'a, const O: u8> = crate::BitWriter1S<'a, u32, DIRSET_SPEC, PIN25_AW, O>; +impl<'a, const O: u8> PIN25_W<'a, O> { + #[doc = "Write: writing a '1' sets pin to output; writing a '0' has no effect"] + #[inline(always)] + pub fn set(self) -> &'a mut W { + self.variant(PIN25_AW::SET) + } +} +#[doc = "Field `PIN26` reader - Set as output pin 26"] +pub type PIN26_R = crate::BitReader; +#[doc = "Set as output pin 26\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PIN26_A { + #[doc = "0: Read: pin set as input"] + INPUT = 0, + #[doc = "1: Read: pin set as output"] + OUTPUT = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PIN26_A) -> Self { + variant as u8 != 0 + } +} +impl PIN26_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> PIN26_A { + match self.bits { + false => PIN26_A::INPUT, + true => PIN26_A::OUTPUT, + } + } + #[doc = "Checks if the value of the field is `INPUT`"] + #[inline(always)] + pub fn is_input(&self) -> bool { + *self == PIN26_A::INPUT + } + #[doc = "Checks if the value of the field is `OUTPUT`"] + #[inline(always)] + pub fn is_output(&self) -> bool { + *self == PIN26_A::OUTPUT + } +} +#[doc = "Set as output pin 26\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PIN26_AW { + #[doc = "1: Write: writing a '1' sets pin to output; writing a '0' has no effect"] + SET = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PIN26_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `PIN26` writer - Set as output pin 26"] +pub type PIN26_W<'a, const O: u8> = crate::BitWriter1S<'a, u32, DIRSET_SPEC, PIN26_AW, O>; +impl<'a, const O: u8> PIN26_W<'a, O> { + #[doc = "Write: writing a '1' sets pin to output; writing a '0' has no effect"] + #[inline(always)] + pub fn set(self) -> &'a mut W { + self.variant(PIN26_AW::SET) + } +} +#[doc = "Field `PIN27` reader - Set as output pin 27"] +pub type PIN27_R = crate::BitReader; +#[doc = "Set as output pin 27\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PIN27_A { + #[doc = "0: Read: pin set as input"] + INPUT = 0, + #[doc = "1: Read: pin set as output"] + OUTPUT = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PIN27_A) -> Self { + variant as u8 != 0 + } +} +impl PIN27_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> PIN27_A { + match self.bits { + false => PIN27_A::INPUT, + true => PIN27_A::OUTPUT, + } + } + #[doc = "Checks if the value of the field is `INPUT`"] + #[inline(always)] + pub fn is_input(&self) -> bool { + *self == PIN27_A::INPUT + } + #[doc = "Checks if the value of the field is `OUTPUT`"] + #[inline(always)] + pub fn is_output(&self) -> bool { + *self == PIN27_A::OUTPUT + } +} +#[doc = "Set as output pin 27\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PIN27_AW { + #[doc = "1: Write: writing a '1' sets pin to output; writing a '0' has no effect"] + SET = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PIN27_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `PIN27` writer - Set as output pin 27"] +pub type PIN27_W<'a, const O: u8> = crate::BitWriter1S<'a, u32, DIRSET_SPEC, PIN27_AW, O>; +impl<'a, const O: u8> PIN27_W<'a, O> { + #[doc = "Write: writing a '1' sets pin to output; writing a '0' has no effect"] + #[inline(always)] + pub fn set(self) -> &'a mut W { + self.variant(PIN27_AW::SET) + } +} +#[doc = "Field `PIN28` reader - Set as output pin 28"] +pub type PIN28_R = crate::BitReader; +#[doc = "Set as output pin 28\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PIN28_A { + #[doc = "0: Read: pin set as input"] + INPUT = 0, + #[doc = "1: Read: pin set as output"] + OUTPUT = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PIN28_A) -> Self { + variant as u8 != 0 + } +} +impl PIN28_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> PIN28_A { + match self.bits { + false => PIN28_A::INPUT, + true => PIN28_A::OUTPUT, + } + } + #[doc = "Checks if the value of the field is `INPUT`"] + #[inline(always)] + pub fn is_input(&self) -> bool { + *self == PIN28_A::INPUT + } + #[doc = "Checks if the value of the field is `OUTPUT`"] + #[inline(always)] + pub fn is_output(&self) -> bool { + *self == PIN28_A::OUTPUT + } +} +#[doc = "Set as output pin 28\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PIN28_AW { + #[doc = "1: Write: writing a '1' sets pin to output; writing a '0' has no effect"] + SET = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PIN28_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `PIN28` writer - Set as output pin 28"] +pub type PIN28_W<'a, const O: u8> = crate::BitWriter1S<'a, u32, DIRSET_SPEC, PIN28_AW, O>; +impl<'a, const O: u8> PIN28_W<'a, O> { + #[doc = "Write: writing a '1' sets pin to output; writing a '0' has no effect"] + #[inline(always)] + pub fn set(self) -> &'a mut W { + self.variant(PIN28_AW::SET) + } +} +#[doc = "Field `PIN29` reader - Set as output pin 29"] +pub type PIN29_R = crate::BitReader; +#[doc = "Set as output pin 29\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PIN29_A { + #[doc = "0: Read: pin set as input"] + INPUT = 0, + #[doc = "1: Read: pin set as output"] + OUTPUT = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PIN29_A) -> Self { + variant as u8 != 0 + } +} +impl PIN29_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> PIN29_A { + match self.bits { + false => PIN29_A::INPUT, + true => PIN29_A::OUTPUT, + } + } + #[doc = "Checks if the value of the field is `INPUT`"] + #[inline(always)] + pub fn is_input(&self) -> bool { + *self == PIN29_A::INPUT + } + #[doc = "Checks if the value of the field is `OUTPUT`"] + #[inline(always)] + pub fn is_output(&self) -> bool { + *self == PIN29_A::OUTPUT + } +} +#[doc = "Set as output pin 29\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PIN29_AW { + #[doc = "1: Write: writing a '1' sets pin to output; writing a '0' has no effect"] + SET = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PIN29_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `PIN29` writer - Set as output pin 29"] +pub type PIN29_W<'a, const O: u8> = crate::BitWriter1S<'a, u32, DIRSET_SPEC, PIN29_AW, O>; +impl<'a, const O: u8> PIN29_W<'a, O> { + #[doc = "Write: writing a '1' sets pin to output; writing a '0' has no effect"] + #[inline(always)] + pub fn set(self) -> &'a mut W { + self.variant(PIN29_AW::SET) + } +} +#[doc = "Field `PIN30` reader - Set as output pin 30"] +pub type PIN30_R = crate::BitReader; +#[doc = "Set as output pin 30\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PIN30_A { + #[doc = "0: Read: pin set as input"] + INPUT = 0, + #[doc = "1: Read: pin set as output"] + OUTPUT = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PIN30_A) -> Self { + variant as u8 != 0 + } +} +impl PIN30_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> PIN30_A { + match self.bits { + false => PIN30_A::INPUT, + true => PIN30_A::OUTPUT, + } + } + #[doc = "Checks if the value of the field is `INPUT`"] + #[inline(always)] + pub fn is_input(&self) -> bool { + *self == PIN30_A::INPUT + } + #[doc = "Checks if the value of the field is `OUTPUT`"] + #[inline(always)] + pub fn is_output(&self) -> bool { + *self == PIN30_A::OUTPUT + } +} +#[doc = "Set as output pin 30\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PIN30_AW { + #[doc = "1: Write: writing a '1' sets pin to output; writing a '0' has no effect"] + SET = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PIN30_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `PIN30` writer - Set as output pin 30"] +pub type PIN30_W<'a, const O: u8> = crate::BitWriter1S<'a, u32, DIRSET_SPEC, PIN30_AW, O>; +impl<'a, const O: u8> PIN30_W<'a, O> { + #[doc = "Write: writing a '1' sets pin to output; writing a '0' has no effect"] + #[inline(always)] + pub fn set(self) -> &'a mut W { + self.variant(PIN30_AW::SET) + } +} +#[doc = "Field `PIN31` reader - Set as output pin 31"] +pub type PIN31_R = crate::BitReader; +#[doc = "Set as output pin 31\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PIN31_A { + #[doc = "0: Read: pin set as input"] + INPUT = 0, + #[doc = "1: Read: pin set as output"] + OUTPUT = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PIN31_A) -> Self { + variant as u8 != 0 + } +} +impl PIN31_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> PIN31_A { + match self.bits { + false => PIN31_A::INPUT, + true => PIN31_A::OUTPUT, + } + } + #[doc = "Checks if the value of the field is `INPUT`"] + #[inline(always)] + pub fn is_input(&self) -> bool { + *self == PIN31_A::INPUT + } + #[doc = "Checks if the value of the field is `OUTPUT`"] + #[inline(always)] + pub fn is_output(&self) -> bool { + *self == PIN31_A::OUTPUT + } +} +#[doc = "Set as output pin 31\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PIN31_AW { + #[doc = "1: Write: writing a '1' sets pin to output; writing a '0' has no effect"] + SET = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PIN31_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `PIN31` writer - Set as output pin 31"] +pub type PIN31_W<'a, const O: u8> = crate::BitWriter1S<'a, u32, DIRSET_SPEC, PIN31_AW, O>; +impl<'a, const O: u8> PIN31_W<'a, O> { + #[doc = "Write: writing a '1' sets pin to output; writing a '0' has no effect"] + #[inline(always)] + pub fn set(self) -> &'a mut W { + self.variant(PIN31_AW::SET) + } +} +impl R { + #[doc = "Bit 0 - Set as output pin 0"] + #[inline(always)] + pub fn pin0(&self) -> PIN0_R { + PIN0_R::new((self.bits & 1) != 0) + } + #[doc = "Bit 1 - Set as output pin 1"] + #[inline(always)] + pub fn pin1(&self) -> PIN1_R { + PIN1_R::new(((self.bits >> 1) & 1) != 0) + } + #[doc = "Bit 2 - Set as output pin 2"] + #[inline(always)] + pub fn pin2(&self) -> PIN2_R { + PIN2_R::new(((self.bits >> 2) & 1) != 0) + } + #[doc = "Bit 3 - Set as output pin 3"] + #[inline(always)] + pub fn pin3(&self) -> PIN3_R { + PIN3_R::new(((self.bits >> 3) & 1) != 0) + } + #[doc = "Bit 4 - Set as output pin 4"] + #[inline(always)] + pub fn pin4(&self) -> PIN4_R { + PIN4_R::new(((self.bits >> 4) & 1) != 0) + } + #[doc = "Bit 5 - Set as output pin 5"] + #[inline(always)] + pub fn pin5(&self) -> PIN5_R { + PIN5_R::new(((self.bits >> 5) & 1) != 0) + } + #[doc = "Bit 6 - Set as output pin 6"] + #[inline(always)] + pub fn pin6(&self) -> PIN6_R { + PIN6_R::new(((self.bits >> 6) & 1) != 0) + } + #[doc = "Bit 7 - Set as output pin 7"] + #[inline(always)] + pub fn pin7(&self) -> PIN7_R { + PIN7_R::new(((self.bits >> 7) & 1) != 0) + } + #[doc = "Bit 8 - Set as output pin 8"] + #[inline(always)] + pub fn pin8(&self) -> PIN8_R { + PIN8_R::new(((self.bits >> 8) & 1) != 0) + } + #[doc = "Bit 9 - Set as output pin 9"] + #[inline(always)] + pub fn pin9(&self) -> PIN9_R { + PIN9_R::new(((self.bits >> 9) & 1) != 0) + } + #[doc = "Bit 10 - Set as output pin 10"] + #[inline(always)] + pub fn pin10(&self) -> PIN10_R { + PIN10_R::new(((self.bits >> 10) & 1) != 0) + } + #[doc = "Bit 11 - Set as output pin 11"] + #[inline(always)] + pub fn pin11(&self) -> PIN11_R { + PIN11_R::new(((self.bits >> 11) & 1) != 0) + } + #[doc = "Bit 12 - Set as output pin 12"] + #[inline(always)] + pub fn pin12(&self) -> PIN12_R { + PIN12_R::new(((self.bits >> 12) & 1) != 0) + } + #[doc = "Bit 13 - Set as output pin 13"] + #[inline(always)] + pub fn pin13(&self) -> PIN13_R { + PIN13_R::new(((self.bits >> 13) & 1) != 0) + } + #[doc = "Bit 14 - Set as output pin 14"] + #[inline(always)] + pub fn pin14(&self) -> PIN14_R { + PIN14_R::new(((self.bits >> 14) & 1) != 0) + } + #[doc = "Bit 15 - Set as output pin 15"] + #[inline(always)] + pub fn pin15(&self) -> PIN15_R { + PIN15_R::new(((self.bits >> 15) & 1) != 0) + } + #[doc = "Bit 16 - Set as output pin 16"] + #[inline(always)] + pub fn pin16(&self) -> PIN16_R { + PIN16_R::new(((self.bits >> 16) & 1) != 0) + } + #[doc = "Bit 17 - Set as output pin 17"] + #[inline(always)] + pub fn pin17(&self) -> PIN17_R { + PIN17_R::new(((self.bits >> 17) & 1) != 0) + } + #[doc = "Bit 18 - Set as output pin 18"] + #[inline(always)] + pub fn pin18(&self) -> PIN18_R { + PIN18_R::new(((self.bits >> 18) & 1) != 0) + } + #[doc = "Bit 19 - Set as output pin 19"] + #[inline(always)] + pub fn pin19(&self) -> PIN19_R { + PIN19_R::new(((self.bits >> 19) & 1) != 0) + } + #[doc = "Bit 20 - Set as output pin 20"] + #[inline(always)] + pub fn pin20(&self) -> PIN20_R { + PIN20_R::new(((self.bits >> 20) & 1) != 0) + } + #[doc = "Bit 21 - Set as output pin 21"] + #[inline(always)] + pub fn pin21(&self) -> PIN21_R { + PIN21_R::new(((self.bits >> 21) & 1) != 0) + } + #[doc = "Bit 22 - Set as output pin 22"] + #[inline(always)] + pub fn pin22(&self) -> PIN22_R { + PIN22_R::new(((self.bits >> 22) & 1) != 0) + } + #[doc = "Bit 23 - Set as output pin 23"] + #[inline(always)] + pub fn pin23(&self) -> PIN23_R { + PIN23_R::new(((self.bits >> 23) & 1) != 0) + } + #[doc = "Bit 24 - Set as output pin 24"] + #[inline(always)] + pub fn pin24(&self) -> PIN24_R { + PIN24_R::new(((self.bits >> 24) & 1) != 0) + } + #[doc = "Bit 25 - Set as output pin 25"] + #[inline(always)] + pub fn pin25(&self) -> PIN25_R { + PIN25_R::new(((self.bits >> 25) & 1) != 0) + } + #[doc = "Bit 26 - Set as output pin 26"] + #[inline(always)] + pub fn pin26(&self) -> PIN26_R { + PIN26_R::new(((self.bits >> 26) & 1) != 0) + } + #[doc = "Bit 27 - Set as output pin 27"] + #[inline(always)] + pub fn pin27(&self) -> PIN27_R { + PIN27_R::new(((self.bits >> 27) & 1) != 0) + } + #[doc = "Bit 28 - Set as output pin 28"] + #[inline(always)] + pub fn pin28(&self) -> PIN28_R { + PIN28_R::new(((self.bits >> 28) & 1) != 0) + } + #[doc = "Bit 29 - Set as output pin 29"] + #[inline(always)] + pub fn pin29(&self) -> PIN29_R { + PIN29_R::new(((self.bits >> 29) & 1) != 0) + } + #[doc = "Bit 30 - Set as output pin 30"] + #[inline(always)] + pub fn pin30(&self) -> PIN30_R { + PIN30_R::new(((self.bits >> 30) & 1) != 0) + } + #[doc = "Bit 31 - Set as output pin 31"] + #[inline(always)] + pub fn pin31(&self) -> PIN31_R { + PIN31_R::new(((self.bits >> 31) & 1) != 0) + } +} +impl W { + #[doc = "Bit 0 - Set as output pin 0"] + #[inline(always)] + #[must_use] + pub fn pin0(&mut self) -> PIN0_W<0> { + PIN0_W::new(self) + } + #[doc = "Bit 1 - Set as output pin 1"] + #[inline(always)] + #[must_use] + pub fn pin1(&mut self) -> PIN1_W<1> { + PIN1_W::new(self) + } + #[doc = "Bit 2 - Set as output pin 2"] + #[inline(always)] + #[must_use] + pub fn pin2(&mut self) -> PIN2_W<2> { + PIN2_W::new(self) + } + #[doc = "Bit 3 - Set as output pin 3"] + #[inline(always)] + #[must_use] + pub fn pin3(&mut self) -> PIN3_W<3> { + PIN3_W::new(self) + } + #[doc = "Bit 4 - Set as output pin 4"] + #[inline(always)] + #[must_use] + pub fn pin4(&mut self) -> PIN4_W<4> { + PIN4_W::new(self) + } + #[doc = "Bit 5 - Set as output pin 5"] + #[inline(always)] + #[must_use] + pub fn pin5(&mut self) -> PIN5_W<5> { + PIN5_W::new(self) + } + #[doc = "Bit 6 - Set as output pin 6"] + #[inline(always)] + #[must_use] + pub fn pin6(&mut self) -> PIN6_W<6> { + PIN6_W::new(self) + } + #[doc = "Bit 7 - Set as output pin 7"] + #[inline(always)] + #[must_use] + pub fn pin7(&mut self) -> PIN7_W<7> { + PIN7_W::new(self) + } + #[doc = "Bit 8 - Set as output pin 8"] + #[inline(always)] + #[must_use] + pub fn pin8(&mut self) -> PIN8_W<8> { + PIN8_W::new(self) + } + #[doc = "Bit 9 - Set as output pin 9"] + #[inline(always)] + #[must_use] + pub fn pin9(&mut self) -> PIN9_W<9> { + PIN9_W::new(self) + } + #[doc = "Bit 10 - Set as output pin 10"] + #[inline(always)] + #[must_use] + pub fn pin10(&mut self) -> PIN10_W<10> { + PIN10_W::new(self) + } + #[doc = "Bit 11 - Set as output pin 11"] + #[inline(always)] + #[must_use] + pub fn pin11(&mut self) -> PIN11_W<11> { + PIN11_W::new(self) + } + #[doc = "Bit 12 - Set as output pin 12"] + #[inline(always)] + #[must_use] + pub fn pin12(&mut self) -> PIN12_W<12> { + PIN12_W::new(self) + } + #[doc = "Bit 13 - Set as output pin 13"] + #[inline(always)] + #[must_use] + pub fn pin13(&mut self) -> PIN13_W<13> { + PIN13_W::new(self) + } + #[doc = "Bit 14 - Set as output pin 14"] + #[inline(always)] + #[must_use] + pub fn pin14(&mut self) -> PIN14_W<14> { + PIN14_W::new(self) + } + #[doc = "Bit 15 - Set as output pin 15"] + #[inline(always)] + #[must_use] + pub fn pin15(&mut self) -> PIN15_W<15> { + PIN15_W::new(self) + } + #[doc = "Bit 16 - Set as output pin 16"] + #[inline(always)] + #[must_use] + pub fn pin16(&mut self) -> PIN16_W<16> { + PIN16_W::new(self) + } + #[doc = "Bit 17 - Set as output pin 17"] + #[inline(always)] + #[must_use] + pub fn pin17(&mut self) -> PIN17_W<17> { + PIN17_W::new(self) + } + #[doc = "Bit 18 - Set as output pin 18"] + #[inline(always)] + #[must_use] + pub fn pin18(&mut self) -> PIN18_W<18> { + PIN18_W::new(self) + } + #[doc = "Bit 19 - Set as output pin 19"] + #[inline(always)] + #[must_use] + pub fn pin19(&mut self) -> PIN19_W<19> { + PIN19_W::new(self) + } + #[doc = "Bit 20 - Set as output pin 20"] + #[inline(always)] + #[must_use] + pub fn pin20(&mut self) -> PIN20_W<20> { + PIN20_W::new(self) + } + #[doc = "Bit 21 - Set as output pin 21"] + #[inline(always)] + #[must_use] + pub fn pin21(&mut self) -> PIN21_W<21> { + PIN21_W::new(self) + } + #[doc = "Bit 22 - Set as output pin 22"] + #[inline(always)] + #[must_use] + pub fn pin22(&mut self) -> PIN22_W<22> { + PIN22_W::new(self) + } + #[doc = "Bit 23 - Set as output pin 23"] + #[inline(always)] + #[must_use] + pub fn pin23(&mut self) -> PIN23_W<23> { + PIN23_W::new(self) + } + #[doc = "Bit 24 - Set as output pin 24"] + #[inline(always)] + #[must_use] + pub fn pin24(&mut self) -> PIN24_W<24> { + PIN24_W::new(self) + } + #[doc = "Bit 25 - Set as output pin 25"] + #[inline(always)] + #[must_use] + pub fn pin25(&mut self) -> PIN25_W<25> { + PIN25_W::new(self) + } + #[doc = "Bit 26 - Set as output pin 26"] + #[inline(always)] + #[must_use] + pub fn pin26(&mut self) -> PIN26_W<26> { + PIN26_W::new(self) + } + #[doc = "Bit 27 - Set as output pin 27"] + #[inline(always)] + #[must_use] + pub fn pin27(&mut self) -> PIN27_W<27> { + PIN27_W::new(self) + } + #[doc = "Bit 28 - Set as output pin 28"] + #[inline(always)] + #[must_use] + pub fn pin28(&mut self) -> PIN28_W<28> { + PIN28_W::new(self) + } + #[doc = "Bit 29 - Set as output pin 29"] + #[inline(always)] + #[must_use] + pub fn pin29(&mut self) -> PIN29_W<29> { + PIN29_W::new(self) + } + #[doc = "Bit 30 - Set as output pin 30"] + #[inline(always)] + #[must_use] + pub fn pin30(&mut self) -> PIN30_W<30> { + PIN30_W::new(self) + } + #[doc = "Bit 31 - Set as output pin 31"] + #[inline(always)] + #[must_use] + pub fn pin31(&mut self) -> PIN31_W<31> { + PIN31_W::new(self) + } + #[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 = "DIR set register\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 [dirset](index.html) module"] +pub struct DIRSET_SPEC; +impl crate::RegisterSpec for DIRSET_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [dirset::R](R) reader structure"] +impl crate::Readable for DIRSET_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [dirset::W](W) writer structure"] +impl crate::Writable for DIRSET_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0xffff_ffff; +} +#[doc = "`reset()` method sets DIRSET to value 0"] +impl crate::Resettable for DIRSET_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/p0/in_.rs b/down-the-stack/dk_pac/src/p0/in_.rs new file mode 100644 index 0000000..f82c819 --- /dev/null +++ b/down-the-stack/dk_pac/src/p0/in_.rs @@ -0,0 +1,1342 @@ +#[doc = "Register `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 = "Field `PIN0` reader - Pin 0"] +pub type PIN0_R = crate::BitReader; +#[doc = "Pin 0\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PIN0_A { + #[doc = "0: Pin input is low"] + LOW = 0, + #[doc = "1: Pin input is high"] + HIGH = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PIN0_A) -> Self { + variant as u8 != 0 + } +} +impl PIN0_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> PIN0_A { + match self.bits { + false => PIN0_A::LOW, + true => PIN0_A::HIGH, + } + } + #[doc = "Checks if the value of the field is `LOW`"] + #[inline(always)] + pub fn is_low(&self) -> bool { + *self == PIN0_A::LOW + } + #[doc = "Checks if the value of the field is `HIGH`"] + #[inline(always)] + pub fn is_high(&self) -> bool { + *self == PIN0_A::HIGH + } +} +#[doc = "Field `PIN1` reader - Pin 1"] +pub type PIN1_R = crate::BitReader; +#[doc = "Pin 1\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PIN1_A { + #[doc = "0: Pin input is low"] + LOW = 0, + #[doc = "1: Pin input is high"] + HIGH = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PIN1_A) -> Self { + variant as u8 != 0 + } +} +impl PIN1_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> PIN1_A { + match self.bits { + false => PIN1_A::LOW, + true => PIN1_A::HIGH, + } + } + #[doc = "Checks if the value of the field is `LOW`"] + #[inline(always)] + pub fn is_low(&self) -> bool { + *self == PIN1_A::LOW + } + #[doc = "Checks if the value of the field is `HIGH`"] + #[inline(always)] + pub fn is_high(&self) -> bool { + *self == PIN1_A::HIGH + } +} +#[doc = "Field `PIN2` reader - Pin 2"] +pub type PIN2_R = crate::BitReader; +#[doc = "Pin 2\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PIN2_A { + #[doc = "0: Pin input is low"] + LOW = 0, + #[doc = "1: Pin input is high"] + HIGH = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PIN2_A) -> Self { + variant as u8 != 0 + } +} +impl PIN2_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> PIN2_A { + match self.bits { + false => PIN2_A::LOW, + true => PIN2_A::HIGH, + } + } + #[doc = "Checks if the value of the field is `LOW`"] + #[inline(always)] + pub fn is_low(&self) -> bool { + *self == PIN2_A::LOW + } + #[doc = "Checks if the value of the field is `HIGH`"] + #[inline(always)] + pub fn is_high(&self) -> bool { + *self == PIN2_A::HIGH + } +} +#[doc = "Field `PIN3` reader - Pin 3"] +pub type PIN3_R = crate::BitReader; +#[doc = "Pin 3\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PIN3_A { + #[doc = "0: Pin input is low"] + LOW = 0, + #[doc = "1: Pin input is high"] + HIGH = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PIN3_A) -> Self { + variant as u8 != 0 + } +} +impl PIN3_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> PIN3_A { + match self.bits { + false => PIN3_A::LOW, + true => PIN3_A::HIGH, + } + } + #[doc = "Checks if the value of the field is `LOW`"] + #[inline(always)] + pub fn is_low(&self) -> bool { + *self == PIN3_A::LOW + } + #[doc = "Checks if the value of the field is `HIGH`"] + #[inline(always)] + pub fn is_high(&self) -> bool { + *self == PIN3_A::HIGH + } +} +#[doc = "Field `PIN4` reader - Pin 4"] +pub type PIN4_R = crate::BitReader; +#[doc = "Pin 4\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PIN4_A { + #[doc = "0: Pin input is low"] + LOW = 0, + #[doc = "1: Pin input is high"] + HIGH = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PIN4_A) -> Self { + variant as u8 != 0 + } +} +impl PIN4_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> PIN4_A { + match self.bits { + false => PIN4_A::LOW, + true => PIN4_A::HIGH, + } + } + #[doc = "Checks if the value of the field is `LOW`"] + #[inline(always)] + pub fn is_low(&self) -> bool { + *self == PIN4_A::LOW + } + #[doc = "Checks if the value of the field is `HIGH`"] + #[inline(always)] + pub fn is_high(&self) -> bool { + *self == PIN4_A::HIGH + } +} +#[doc = "Field `PIN5` reader - Pin 5"] +pub type PIN5_R = crate::BitReader; +#[doc = "Pin 5\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PIN5_A { + #[doc = "0: Pin input is low"] + LOW = 0, + #[doc = "1: Pin input is high"] + HIGH = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PIN5_A) -> Self { + variant as u8 != 0 + } +} +impl PIN5_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> PIN5_A { + match self.bits { + false => PIN5_A::LOW, + true => PIN5_A::HIGH, + } + } + #[doc = "Checks if the value of the field is `LOW`"] + #[inline(always)] + pub fn is_low(&self) -> bool { + *self == PIN5_A::LOW + } + #[doc = "Checks if the value of the field is `HIGH`"] + #[inline(always)] + pub fn is_high(&self) -> bool { + *self == PIN5_A::HIGH + } +} +#[doc = "Field `PIN6` reader - Pin 6"] +pub type PIN6_R = crate::BitReader; +#[doc = "Pin 6\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PIN6_A { + #[doc = "0: Pin input is low"] + LOW = 0, + #[doc = "1: Pin input is high"] + HIGH = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PIN6_A) -> Self { + variant as u8 != 0 + } +} +impl PIN6_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> PIN6_A { + match self.bits { + false => PIN6_A::LOW, + true => PIN6_A::HIGH, + } + } + #[doc = "Checks if the value of the field is `LOW`"] + #[inline(always)] + pub fn is_low(&self) -> bool { + *self == PIN6_A::LOW + } + #[doc = "Checks if the value of the field is `HIGH`"] + #[inline(always)] + pub fn is_high(&self) -> bool { + *self == PIN6_A::HIGH + } +} +#[doc = "Field `PIN7` reader - Pin 7"] +pub type PIN7_R = crate::BitReader; +#[doc = "Pin 7\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PIN7_A { + #[doc = "0: Pin input is low"] + LOW = 0, + #[doc = "1: Pin input is high"] + HIGH = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PIN7_A) -> Self { + variant as u8 != 0 + } +} +impl PIN7_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> PIN7_A { + match self.bits { + false => PIN7_A::LOW, + true => PIN7_A::HIGH, + } + } + #[doc = "Checks if the value of the field is `LOW`"] + #[inline(always)] + pub fn is_low(&self) -> bool { + *self == PIN7_A::LOW + } + #[doc = "Checks if the value of the field is `HIGH`"] + #[inline(always)] + pub fn is_high(&self) -> bool { + *self == PIN7_A::HIGH + } +} +#[doc = "Field `PIN8` reader - Pin 8"] +pub type PIN8_R = crate::BitReader; +#[doc = "Pin 8\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PIN8_A { + #[doc = "0: Pin input is low"] + LOW = 0, + #[doc = "1: Pin input is high"] + HIGH = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PIN8_A) -> Self { + variant as u8 != 0 + } +} +impl PIN8_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> PIN8_A { + match self.bits { + false => PIN8_A::LOW, + true => PIN8_A::HIGH, + } + } + #[doc = "Checks if the value of the field is `LOW`"] + #[inline(always)] + pub fn is_low(&self) -> bool { + *self == PIN8_A::LOW + } + #[doc = "Checks if the value of the field is `HIGH`"] + #[inline(always)] + pub fn is_high(&self) -> bool { + *self == PIN8_A::HIGH + } +} +#[doc = "Field `PIN9` reader - Pin 9"] +pub type PIN9_R = crate::BitReader; +#[doc = "Pin 9\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PIN9_A { + #[doc = "0: Pin input is low"] + LOW = 0, + #[doc = "1: Pin input is high"] + HIGH = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PIN9_A) -> Self { + variant as u8 != 0 + } +} +impl PIN9_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> PIN9_A { + match self.bits { + false => PIN9_A::LOW, + true => PIN9_A::HIGH, + } + } + #[doc = "Checks if the value of the field is `LOW`"] + #[inline(always)] + pub fn is_low(&self) -> bool { + *self == PIN9_A::LOW + } + #[doc = "Checks if the value of the field is `HIGH`"] + #[inline(always)] + pub fn is_high(&self) -> bool { + *self == PIN9_A::HIGH + } +} +#[doc = "Field `PIN10` reader - Pin 10"] +pub type PIN10_R = crate::BitReader; +#[doc = "Pin 10\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PIN10_A { + #[doc = "0: Pin input is low"] + LOW = 0, + #[doc = "1: Pin input is high"] + HIGH = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PIN10_A) -> Self { + variant as u8 != 0 + } +} +impl PIN10_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> PIN10_A { + match self.bits { + false => PIN10_A::LOW, + true => PIN10_A::HIGH, + } + } + #[doc = "Checks if the value of the field is `LOW`"] + #[inline(always)] + pub fn is_low(&self) -> bool { + *self == PIN10_A::LOW + } + #[doc = "Checks if the value of the field is `HIGH`"] + #[inline(always)] + pub fn is_high(&self) -> bool { + *self == PIN10_A::HIGH + } +} +#[doc = "Field `PIN11` reader - Pin 11"] +pub type PIN11_R = crate::BitReader; +#[doc = "Pin 11\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PIN11_A { + #[doc = "0: Pin input is low"] + LOW = 0, + #[doc = "1: Pin input is high"] + HIGH = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PIN11_A) -> Self { + variant as u8 != 0 + } +} +impl PIN11_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> PIN11_A { + match self.bits { + false => PIN11_A::LOW, + true => PIN11_A::HIGH, + } + } + #[doc = "Checks if the value of the field is `LOW`"] + #[inline(always)] + pub fn is_low(&self) -> bool { + *self == PIN11_A::LOW + } + #[doc = "Checks if the value of the field is `HIGH`"] + #[inline(always)] + pub fn is_high(&self) -> bool { + *self == PIN11_A::HIGH + } +} +#[doc = "Field `PIN12` reader - Pin 12"] +pub type PIN12_R = crate::BitReader; +#[doc = "Pin 12\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PIN12_A { + #[doc = "0: Pin input is low"] + LOW = 0, + #[doc = "1: Pin input is high"] + HIGH = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PIN12_A) -> Self { + variant as u8 != 0 + } +} +impl PIN12_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> PIN12_A { + match self.bits { + false => PIN12_A::LOW, + true => PIN12_A::HIGH, + } + } + #[doc = "Checks if the value of the field is `LOW`"] + #[inline(always)] + pub fn is_low(&self) -> bool { + *self == PIN12_A::LOW + } + #[doc = "Checks if the value of the field is `HIGH`"] + #[inline(always)] + pub fn is_high(&self) -> bool { + *self == PIN12_A::HIGH + } +} +#[doc = "Field `PIN13` reader - Pin 13"] +pub type PIN13_R = crate::BitReader; +#[doc = "Pin 13\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PIN13_A { + #[doc = "0: Pin input is low"] + LOW = 0, + #[doc = "1: Pin input is high"] + HIGH = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PIN13_A) -> Self { + variant as u8 != 0 + } +} +impl PIN13_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> PIN13_A { + match self.bits { + false => PIN13_A::LOW, + true => PIN13_A::HIGH, + } + } + #[doc = "Checks if the value of the field is `LOW`"] + #[inline(always)] + pub fn is_low(&self) -> bool { + *self == PIN13_A::LOW + } + #[doc = "Checks if the value of the field is `HIGH`"] + #[inline(always)] + pub fn is_high(&self) -> bool { + *self == PIN13_A::HIGH + } +} +#[doc = "Field `PIN14` reader - Pin 14"] +pub type PIN14_R = crate::BitReader; +#[doc = "Pin 14\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PIN14_A { + #[doc = "0: Pin input is low"] + LOW = 0, + #[doc = "1: Pin input is high"] + HIGH = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PIN14_A) -> Self { + variant as u8 != 0 + } +} +impl PIN14_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> PIN14_A { + match self.bits { + false => PIN14_A::LOW, + true => PIN14_A::HIGH, + } + } + #[doc = "Checks if the value of the field is `LOW`"] + #[inline(always)] + pub fn is_low(&self) -> bool { + *self == PIN14_A::LOW + } + #[doc = "Checks if the value of the field is `HIGH`"] + #[inline(always)] + pub fn is_high(&self) -> bool { + *self == PIN14_A::HIGH + } +} +#[doc = "Field `PIN15` reader - Pin 15"] +pub type PIN15_R = crate::BitReader; +#[doc = "Pin 15\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PIN15_A { + #[doc = "0: Pin input is low"] + LOW = 0, + #[doc = "1: Pin input is high"] + HIGH = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PIN15_A) -> Self { + variant as u8 != 0 + } +} +impl PIN15_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> PIN15_A { + match self.bits { + false => PIN15_A::LOW, + true => PIN15_A::HIGH, + } + } + #[doc = "Checks if the value of the field is `LOW`"] + #[inline(always)] + pub fn is_low(&self) -> bool { + *self == PIN15_A::LOW + } + #[doc = "Checks if the value of the field is `HIGH`"] + #[inline(always)] + pub fn is_high(&self) -> bool { + *self == PIN15_A::HIGH + } +} +#[doc = "Field `PIN16` reader - Pin 16"] +pub type PIN16_R = crate::BitReader; +#[doc = "Pin 16\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PIN16_A { + #[doc = "0: Pin input is low"] + LOW = 0, + #[doc = "1: Pin input is high"] + HIGH = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PIN16_A) -> Self { + variant as u8 != 0 + } +} +impl PIN16_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> PIN16_A { + match self.bits { + false => PIN16_A::LOW, + true => PIN16_A::HIGH, + } + } + #[doc = "Checks if the value of the field is `LOW`"] + #[inline(always)] + pub fn is_low(&self) -> bool { + *self == PIN16_A::LOW + } + #[doc = "Checks if the value of the field is `HIGH`"] + #[inline(always)] + pub fn is_high(&self) -> bool { + *self == PIN16_A::HIGH + } +} +#[doc = "Field `PIN17` reader - Pin 17"] +pub type PIN17_R = crate::BitReader; +#[doc = "Pin 17\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PIN17_A { + #[doc = "0: Pin input is low"] + LOW = 0, + #[doc = "1: Pin input is high"] + HIGH = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PIN17_A) -> Self { + variant as u8 != 0 + } +} +impl PIN17_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> PIN17_A { + match self.bits { + false => PIN17_A::LOW, + true => PIN17_A::HIGH, + } + } + #[doc = "Checks if the value of the field is `LOW`"] + #[inline(always)] + pub fn is_low(&self) -> bool { + *self == PIN17_A::LOW + } + #[doc = "Checks if the value of the field is `HIGH`"] + #[inline(always)] + pub fn is_high(&self) -> bool { + *self == PIN17_A::HIGH + } +} +#[doc = "Field `PIN18` reader - Pin 18"] +pub type PIN18_R = crate::BitReader; +#[doc = "Pin 18\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PIN18_A { + #[doc = "0: Pin input is low"] + LOW = 0, + #[doc = "1: Pin input is high"] + HIGH = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PIN18_A) -> Self { + variant as u8 != 0 + } +} +impl PIN18_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> PIN18_A { + match self.bits { + false => PIN18_A::LOW, + true => PIN18_A::HIGH, + } + } + #[doc = "Checks if the value of the field is `LOW`"] + #[inline(always)] + pub fn is_low(&self) -> bool { + *self == PIN18_A::LOW + } + #[doc = "Checks if the value of the field is `HIGH`"] + #[inline(always)] + pub fn is_high(&self) -> bool { + *self == PIN18_A::HIGH + } +} +#[doc = "Field `PIN19` reader - Pin 19"] +pub type PIN19_R = crate::BitReader; +#[doc = "Pin 19\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PIN19_A { + #[doc = "0: Pin input is low"] + LOW = 0, + #[doc = "1: Pin input is high"] + HIGH = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PIN19_A) -> Self { + variant as u8 != 0 + } +} +impl PIN19_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> PIN19_A { + match self.bits { + false => PIN19_A::LOW, + true => PIN19_A::HIGH, + } + } + #[doc = "Checks if the value of the field is `LOW`"] + #[inline(always)] + pub fn is_low(&self) -> bool { + *self == PIN19_A::LOW + } + #[doc = "Checks if the value of the field is `HIGH`"] + #[inline(always)] + pub fn is_high(&self) -> bool { + *self == PIN19_A::HIGH + } +} +#[doc = "Field `PIN20` reader - Pin 20"] +pub type PIN20_R = crate::BitReader; +#[doc = "Pin 20\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PIN20_A { + #[doc = "0: Pin input is low"] + LOW = 0, + #[doc = "1: Pin input is high"] + HIGH = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PIN20_A) -> Self { + variant as u8 != 0 + } +} +impl PIN20_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> PIN20_A { + match self.bits { + false => PIN20_A::LOW, + true => PIN20_A::HIGH, + } + } + #[doc = "Checks if the value of the field is `LOW`"] + #[inline(always)] + pub fn is_low(&self) -> bool { + *self == PIN20_A::LOW + } + #[doc = "Checks if the value of the field is `HIGH`"] + #[inline(always)] + pub fn is_high(&self) -> bool { + *self == PIN20_A::HIGH + } +} +#[doc = "Field `PIN21` reader - Pin 21"] +pub type PIN21_R = crate::BitReader; +#[doc = "Pin 21\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PIN21_A { + #[doc = "0: Pin input is low"] + LOW = 0, + #[doc = "1: Pin input is high"] + HIGH = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PIN21_A) -> Self { + variant as u8 != 0 + } +} +impl PIN21_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> PIN21_A { + match self.bits { + false => PIN21_A::LOW, + true => PIN21_A::HIGH, + } + } + #[doc = "Checks if the value of the field is `LOW`"] + #[inline(always)] + pub fn is_low(&self) -> bool { + *self == PIN21_A::LOW + } + #[doc = "Checks if the value of the field is `HIGH`"] + #[inline(always)] + pub fn is_high(&self) -> bool { + *self == PIN21_A::HIGH + } +} +#[doc = "Field `PIN22` reader - Pin 22"] +pub type PIN22_R = crate::BitReader; +#[doc = "Pin 22\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PIN22_A { + #[doc = "0: Pin input is low"] + LOW = 0, + #[doc = "1: Pin input is high"] + HIGH = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PIN22_A) -> Self { + variant as u8 != 0 + } +} +impl PIN22_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> PIN22_A { + match self.bits { + false => PIN22_A::LOW, + true => PIN22_A::HIGH, + } + } + #[doc = "Checks if the value of the field is `LOW`"] + #[inline(always)] + pub fn is_low(&self) -> bool { + *self == PIN22_A::LOW + } + #[doc = "Checks if the value of the field is `HIGH`"] + #[inline(always)] + pub fn is_high(&self) -> bool { + *self == PIN22_A::HIGH + } +} +#[doc = "Field `PIN23` reader - Pin 23"] +pub type PIN23_R = crate::BitReader; +#[doc = "Pin 23\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PIN23_A { + #[doc = "0: Pin input is low"] + LOW = 0, + #[doc = "1: Pin input is high"] + HIGH = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PIN23_A) -> Self { + variant as u8 != 0 + } +} +impl PIN23_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> PIN23_A { + match self.bits { + false => PIN23_A::LOW, + true => PIN23_A::HIGH, + } + } + #[doc = "Checks if the value of the field is `LOW`"] + #[inline(always)] + pub fn is_low(&self) -> bool { + *self == PIN23_A::LOW + } + #[doc = "Checks if the value of the field is `HIGH`"] + #[inline(always)] + pub fn is_high(&self) -> bool { + *self == PIN23_A::HIGH + } +} +#[doc = "Field `PIN24` reader - Pin 24"] +pub type PIN24_R = crate::BitReader; +#[doc = "Pin 24\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PIN24_A { + #[doc = "0: Pin input is low"] + LOW = 0, + #[doc = "1: Pin input is high"] + HIGH = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PIN24_A) -> Self { + variant as u8 != 0 + } +} +impl PIN24_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> PIN24_A { + match self.bits { + false => PIN24_A::LOW, + true => PIN24_A::HIGH, + } + } + #[doc = "Checks if the value of the field is `LOW`"] + #[inline(always)] + pub fn is_low(&self) -> bool { + *self == PIN24_A::LOW + } + #[doc = "Checks if the value of the field is `HIGH`"] + #[inline(always)] + pub fn is_high(&self) -> bool { + *self == PIN24_A::HIGH + } +} +#[doc = "Field `PIN25` reader - Pin 25"] +pub type PIN25_R = crate::BitReader; +#[doc = "Pin 25\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PIN25_A { + #[doc = "0: Pin input is low"] + LOW = 0, + #[doc = "1: Pin input is high"] + HIGH = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PIN25_A) -> Self { + variant as u8 != 0 + } +} +impl PIN25_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> PIN25_A { + match self.bits { + false => PIN25_A::LOW, + true => PIN25_A::HIGH, + } + } + #[doc = "Checks if the value of the field is `LOW`"] + #[inline(always)] + pub fn is_low(&self) -> bool { + *self == PIN25_A::LOW + } + #[doc = "Checks if the value of the field is `HIGH`"] + #[inline(always)] + pub fn is_high(&self) -> bool { + *self == PIN25_A::HIGH + } +} +#[doc = "Field `PIN26` reader - Pin 26"] +pub type PIN26_R = crate::BitReader; +#[doc = "Pin 26\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PIN26_A { + #[doc = "0: Pin input is low"] + LOW = 0, + #[doc = "1: Pin input is high"] + HIGH = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PIN26_A) -> Self { + variant as u8 != 0 + } +} +impl PIN26_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> PIN26_A { + match self.bits { + false => PIN26_A::LOW, + true => PIN26_A::HIGH, + } + } + #[doc = "Checks if the value of the field is `LOW`"] + #[inline(always)] + pub fn is_low(&self) -> bool { + *self == PIN26_A::LOW + } + #[doc = "Checks if the value of the field is `HIGH`"] + #[inline(always)] + pub fn is_high(&self) -> bool { + *self == PIN26_A::HIGH + } +} +#[doc = "Field `PIN27` reader - Pin 27"] +pub type PIN27_R = crate::BitReader; +#[doc = "Pin 27\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PIN27_A { + #[doc = "0: Pin input is low"] + LOW = 0, + #[doc = "1: Pin input is high"] + HIGH = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PIN27_A) -> Self { + variant as u8 != 0 + } +} +impl PIN27_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> PIN27_A { + match self.bits { + false => PIN27_A::LOW, + true => PIN27_A::HIGH, + } + } + #[doc = "Checks if the value of the field is `LOW`"] + #[inline(always)] + pub fn is_low(&self) -> bool { + *self == PIN27_A::LOW + } + #[doc = "Checks if the value of the field is `HIGH`"] + #[inline(always)] + pub fn is_high(&self) -> bool { + *self == PIN27_A::HIGH + } +} +#[doc = "Field `PIN28` reader - Pin 28"] +pub type PIN28_R = crate::BitReader; +#[doc = "Pin 28\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PIN28_A { + #[doc = "0: Pin input is low"] + LOW = 0, + #[doc = "1: Pin input is high"] + HIGH = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PIN28_A) -> Self { + variant as u8 != 0 + } +} +impl PIN28_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> PIN28_A { + match self.bits { + false => PIN28_A::LOW, + true => PIN28_A::HIGH, + } + } + #[doc = "Checks if the value of the field is `LOW`"] + #[inline(always)] + pub fn is_low(&self) -> bool { + *self == PIN28_A::LOW + } + #[doc = "Checks if the value of the field is `HIGH`"] + #[inline(always)] + pub fn is_high(&self) -> bool { + *self == PIN28_A::HIGH + } +} +#[doc = "Field `PIN29` reader - Pin 29"] +pub type PIN29_R = crate::BitReader; +#[doc = "Pin 29\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PIN29_A { + #[doc = "0: Pin input is low"] + LOW = 0, + #[doc = "1: Pin input is high"] + HIGH = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PIN29_A) -> Self { + variant as u8 != 0 + } +} +impl PIN29_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> PIN29_A { + match self.bits { + false => PIN29_A::LOW, + true => PIN29_A::HIGH, + } + } + #[doc = "Checks if the value of the field is `LOW`"] + #[inline(always)] + pub fn is_low(&self) -> bool { + *self == PIN29_A::LOW + } + #[doc = "Checks if the value of the field is `HIGH`"] + #[inline(always)] + pub fn is_high(&self) -> bool { + *self == PIN29_A::HIGH + } +} +#[doc = "Field `PIN30` reader - Pin 30"] +pub type PIN30_R = crate::BitReader; +#[doc = "Pin 30\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PIN30_A { + #[doc = "0: Pin input is low"] + LOW = 0, + #[doc = "1: Pin input is high"] + HIGH = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PIN30_A) -> Self { + variant as u8 != 0 + } +} +impl PIN30_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> PIN30_A { + match self.bits { + false => PIN30_A::LOW, + true => PIN30_A::HIGH, + } + } + #[doc = "Checks if the value of the field is `LOW`"] + #[inline(always)] + pub fn is_low(&self) -> bool { + *self == PIN30_A::LOW + } + #[doc = "Checks if the value of the field is `HIGH`"] + #[inline(always)] + pub fn is_high(&self) -> bool { + *self == PIN30_A::HIGH + } +} +#[doc = "Field `PIN31` reader - Pin 31"] +pub type PIN31_R = crate::BitReader; +#[doc = "Pin 31\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PIN31_A { + #[doc = "0: Pin input is low"] + LOW = 0, + #[doc = "1: Pin input is high"] + HIGH = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PIN31_A) -> Self { + variant as u8 != 0 + } +} +impl PIN31_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> PIN31_A { + match self.bits { + false => PIN31_A::LOW, + true => PIN31_A::HIGH, + } + } + #[doc = "Checks if the value of the field is `LOW`"] + #[inline(always)] + pub fn is_low(&self) -> bool { + *self == PIN31_A::LOW + } + #[doc = "Checks if the value of the field is `HIGH`"] + #[inline(always)] + pub fn is_high(&self) -> bool { + *self == PIN31_A::HIGH + } +} +impl R { + #[doc = "Bit 0 - Pin 0"] + #[inline(always)] + pub fn pin0(&self) -> PIN0_R { + PIN0_R::new((self.bits & 1) != 0) + } + #[doc = "Bit 1 - Pin 1"] + #[inline(always)] + pub fn pin1(&self) -> PIN1_R { + PIN1_R::new(((self.bits >> 1) & 1) != 0) + } + #[doc = "Bit 2 - Pin 2"] + #[inline(always)] + pub fn pin2(&self) -> PIN2_R { + PIN2_R::new(((self.bits >> 2) & 1) != 0) + } + #[doc = "Bit 3 - Pin 3"] + #[inline(always)] + pub fn pin3(&self) -> PIN3_R { + PIN3_R::new(((self.bits >> 3) & 1) != 0) + } + #[doc = "Bit 4 - Pin 4"] + #[inline(always)] + pub fn pin4(&self) -> PIN4_R { + PIN4_R::new(((self.bits >> 4) & 1) != 0) + } + #[doc = "Bit 5 - Pin 5"] + #[inline(always)] + pub fn pin5(&self) -> PIN5_R { + PIN5_R::new(((self.bits >> 5) & 1) != 0) + } + #[doc = "Bit 6 - Pin 6"] + #[inline(always)] + pub fn pin6(&self) -> PIN6_R { + PIN6_R::new(((self.bits >> 6) & 1) != 0) + } + #[doc = "Bit 7 - Pin 7"] + #[inline(always)] + pub fn pin7(&self) -> PIN7_R { + PIN7_R::new(((self.bits >> 7) & 1) != 0) + } + #[doc = "Bit 8 - Pin 8"] + #[inline(always)] + pub fn pin8(&self) -> PIN8_R { + PIN8_R::new(((self.bits >> 8) & 1) != 0) + } + #[doc = "Bit 9 - Pin 9"] + #[inline(always)] + pub fn pin9(&self) -> PIN9_R { + PIN9_R::new(((self.bits >> 9) & 1) != 0) + } + #[doc = "Bit 10 - Pin 10"] + #[inline(always)] + pub fn pin10(&self) -> PIN10_R { + PIN10_R::new(((self.bits >> 10) & 1) != 0) + } + #[doc = "Bit 11 - Pin 11"] + #[inline(always)] + pub fn pin11(&self) -> PIN11_R { + PIN11_R::new(((self.bits >> 11) & 1) != 0) + } + #[doc = "Bit 12 - Pin 12"] + #[inline(always)] + pub fn pin12(&self) -> PIN12_R { + PIN12_R::new(((self.bits >> 12) & 1) != 0) + } + #[doc = "Bit 13 - Pin 13"] + #[inline(always)] + pub fn pin13(&self) -> PIN13_R { + PIN13_R::new(((self.bits >> 13) & 1) != 0) + } + #[doc = "Bit 14 - Pin 14"] + #[inline(always)] + pub fn pin14(&self) -> PIN14_R { + PIN14_R::new(((self.bits >> 14) & 1) != 0) + } + #[doc = "Bit 15 - Pin 15"] + #[inline(always)] + pub fn pin15(&self) -> PIN15_R { + PIN15_R::new(((self.bits >> 15) & 1) != 0) + } + #[doc = "Bit 16 - Pin 16"] + #[inline(always)] + pub fn pin16(&self) -> PIN16_R { + PIN16_R::new(((self.bits >> 16) & 1) != 0) + } + #[doc = "Bit 17 - Pin 17"] + #[inline(always)] + pub fn pin17(&self) -> PIN17_R { + PIN17_R::new(((self.bits >> 17) & 1) != 0) + } + #[doc = "Bit 18 - Pin 18"] + #[inline(always)] + pub fn pin18(&self) -> PIN18_R { + PIN18_R::new(((self.bits >> 18) & 1) != 0) + } + #[doc = "Bit 19 - Pin 19"] + #[inline(always)] + pub fn pin19(&self) -> PIN19_R { + PIN19_R::new(((self.bits >> 19) & 1) != 0) + } + #[doc = "Bit 20 - Pin 20"] + #[inline(always)] + pub fn pin20(&self) -> PIN20_R { + PIN20_R::new(((self.bits >> 20) & 1) != 0) + } + #[doc = "Bit 21 - Pin 21"] + #[inline(always)] + pub fn pin21(&self) -> PIN21_R { + PIN21_R::new(((self.bits >> 21) & 1) != 0) + } + #[doc = "Bit 22 - Pin 22"] + #[inline(always)] + pub fn pin22(&self) -> PIN22_R { + PIN22_R::new(((self.bits >> 22) & 1) != 0) + } + #[doc = "Bit 23 - Pin 23"] + #[inline(always)] + pub fn pin23(&self) -> PIN23_R { + PIN23_R::new(((self.bits >> 23) & 1) != 0) + } + #[doc = "Bit 24 - Pin 24"] + #[inline(always)] + pub fn pin24(&self) -> PIN24_R { + PIN24_R::new(((self.bits >> 24) & 1) != 0) + } + #[doc = "Bit 25 - Pin 25"] + #[inline(always)] + pub fn pin25(&self) -> PIN25_R { + PIN25_R::new(((self.bits >> 25) & 1) != 0) + } + #[doc = "Bit 26 - Pin 26"] + #[inline(always)] + pub fn pin26(&self) -> PIN26_R { + PIN26_R::new(((self.bits >> 26) & 1) != 0) + } + #[doc = "Bit 27 - Pin 27"] + #[inline(always)] + pub fn pin27(&self) -> PIN27_R { + PIN27_R::new(((self.bits >> 27) & 1) != 0) + } + #[doc = "Bit 28 - Pin 28"] + #[inline(always)] + pub fn pin28(&self) -> PIN28_R { + PIN28_R::new(((self.bits >> 28) & 1) != 0) + } + #[doc = "Bit 29 - Pin 29"] + #[inline(always)] + pub fn pin29(&self) -> PIN29_R { + PIN29_R::new(((self.bits >> 29) & 1) != 0) + } + #[doc = "Bit 30 - Pin 30"] + #[inline(always)] + pub fn pin30(&self) -> PIN30_R { + PIN30_R::new(((self.bits >> 30) & 1) != 0) + } + #[doc = "Bit 31 - Pin 31"] + #[inline(always)] + pub fn pin31(&self) -> PIN31_R { + PIN31_R::new(((self.bits >> 31) & 1) != 0) + } +} +#[doc = "Read GPIO port\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 [in_](index.html) module"] +pub struct IN_SPEC; +impl crate::RegisterSpec for IN_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [in_::R](R) reader structure"] +impl crate::Readable for IN_SPEC { + type Reader = R; +} +#[doc = "`reset()` method sets IN to value 0"] +impl crate::Resettable for IN_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/p0/latch.rs b/down-the-stack/dk_pac/src/p0/latch.rs new file mode 100644 index 0000000..a7ecc44 --- /dev/null +++ b/down-the-stack/dk_pac/src/p0/latch.rs @@ -0,0 +1,2017 @@ +#[doc = "Register `LATCH` 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 `LATCH` 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 `PIN0` reader - Status on whether PIN0 has met criteria set in PIN_CNF0.SENSE register. Write '1' to clear."] +pub type PIN0_R = crate::BitReader; +#[doc = "Status on whether PIN0 has met criteria set in PIN_CNF0.SENSE register. Write '1' to clear.\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PIN0_A { + #[doc = "0: Criteria has not been met"] + NOT_LATCHED = 0, + #[doc = "1: Criteria has been met"] + LATCHED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PIN0_A) -> Self { + variant as u8 != 0 + } +} +impl PIN0_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> PIN0_A { + match self.bits { + false => PIN0_A::NOT_LATCHED, + true => PIN0_A::LATCHED, + } + } + #[doc = "Checks if the value of the field is `NOT_LATCHED`"] + #[inline(always)] + pub fn is_not_latched(&self) -> bool { + *self == PIN0_A::NOT_LATCHED + } + #[doc = "Checks if the value of the field is `LATCHED`"] + #[inline(always)] + pub fn is_latched(&self) -> bool { + *self == PIN0_A::LATCHED + } +} +#[doc = "Field `PIN0` writer - Status on whether PIN0 has met criteria set in PIN_CNF0.SENSE register. Write '1' to clear."] +pub type PIN0_W<'a, const O: u8> = crate::BitWriter<'a, u32, LATCH_SPEC, PIN0_A, O>; +impl<'a, const O: u8> PIN0_W<'a, O> { + #[doc = "Criteria has not been met"] + #[inline(always)] + pub fn not_latched(self) -> &'a mut W { + self.variant(PIN0_A::NOT_LATCHED) + } + #[doc = "Criteria has been met"] + #[inline(always)] + pub fn latched(self) -> &'a mut W { + self.variant(PIN0_A::LATCHED) + } +} +#[doc = "Field `PIN1` reader - Status on whether PIN1 has met criteria set in PIN_CNF1.SENSE register. Write '1' to clear."] +pub type PIN1_R = crate::BitReader; +#[doc = "Status on whether PIN1 has met criteria set in PIN_CNF1.SENSE register. Write '1' to clear.\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PIN1_A { + #[doc = "0: Criteria has not been met"] + NOT_LATCHED = 0, + #[doc = "1: Criteria has been met"] + LATCHED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PIN1_A) -> Self { + variant as u8 != 0 + } +} +impl PIN1_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> PIN1_A { + match self.bits { + false => PIN1_A::NOT_LATCHED, + true => PIN1_A::LATCHED, + } + } + #[doc = "Checks if the value of the field is `NOT_LATCHED`"] + #[inline(always)] + pub fn is_not_latched(&self) -> bool { + *self == PIN1_A::NOT_LATCHED + } + #[doc = "Checks if the value of the field is `LATCHED`"] + #[inline(always)] + pub fn is_latched(&self) -> bool { + *self == PIN1_A::LATCHED + } +} +#[doc = "Field `PIN1` writer - Status on whether PIN1 has met criteria set in PIN_CNF1.SENSE register. Write '1' to clear."] +pub type PIN1_W<'a, const O: u8> = crate::BitWriter<'a, u32, LATCH_SPEC, PIN1_A, O>; +impl<'a, const O: u8> PIN1_W<'a, O> { + #[doc = "Criteria has not been met"] + #[inline(always)] + pub fn not_latched(self) -> &'a mut W { + self.variant(PIN1_A::NOT_LATCHED) + } + #[doc = "Criteria has been met"] + #[inline(always)] + pub fn latched(self) -> &'a mut W { + self.variant(PIN1_A::LATCHED) + } +} +#[doc = "Field `PIN2` reader - Status on whether PIN2 has met criteria set in PIN_CNF2.SENSE register. Write '1' to clear."] +pub type PIN2_R = crate::BitReader; +#[doc = "Status on whether PIN2 has met criteria set in PIN_CNF2.SENSE register. Write '1' to clear.\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PIN2_A { + #[doc = "0: Criteria has not been met"] + NOT_LATCHED = 0, + #[doc = "1: Criteria has been met"] + LATCHED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PIN2_A) -> Self { + variant as u8 != 0 + } +} +impl PIN2_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> PIN2_A { + match self.bits { + false => PIN2_A::NOT_LATCHED, + true => PIN2_A::LATCHED, + } + } + #[doc = "Checks if the value of the field is `NOT_LATCHED`"] + #[inline(always)] + pub fn is_not_latched(&self) -> bool { + *self == PIN2_A::NOT_LATCHED + } + #[doc = "Checks if the value of the field is `LATCHED`"] + #[inline(always)] + pub fn is_latched(&self) -> bool { + *self == PIN2_A::LATCHED + } +} +#[doc = "Field `PIN2` writer - Status on whether PIN2 has met criteria set in PIN_CNF2.SENSE register. Write '1' to clear."] +pub type PIN2_W<'a, const O: u8> = crate::BitWriter<'a, u32, LATCH_SPEC, PIN2_A, O>; +impl<'a, const O: u8> PIN2_W<'a, O> { + #[doc = "Criteria has not been met"] + #[inline(always)] + pub fn not_latched(self) -> &'a mut W { + self.variant(PIN2_A::NOT_LATCHED) + } + #[doc = "Criteria has been met"] + #[inline(always)] + pub fn latched(self) -> &'a mut W { + self.variant(PIN2_A::LATCHED) + } +} +#[doc = "Field `PIN3` reader - Status on whether PIN3 has met criteria set in PIN_CNF3.SENSE register. Write '1' to clear."] +pub type PIN3_R = crate::BitReader; +#[doc = "Status on whether PIN3 has met criteria set in PIN_CNF3.SENSE register. Write '1' to clear.\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PIN3_A { + #[doc = "0: Criteria has not been met"] + NOT_LATCHED = 0, + #[doc = "1: Criteria has been met"] + LATCHED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PIN3_A) -> Self { + variant as u8 != 0 + } +} +impl PIN3_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> PIN3_A { + match self.bits { + false => PIN3_A::NOT_LATCHED, + true => PIN3_A::LATCHED, + } + } + #[doc = "Checks if the value of the field is `NOT_LATCHED`"] + #[inline(always)] + pub fn is_not_latched(&self) -> bool { + *self == PIN3_A::NOT_LATCHED + } + #[doc = "Checks if the value of the field is `LATCHED`"] + #[inline(always)] + pub fn is_latched(&self) -> bool { + *self == PIN3_A::LATCHED + } +} +#[doc = "Field `PIN3` writer - Status on whether PIN3 has met criteria set in PIN_CNF3.SENSE register. Write '1' to clear."] +pub type PIN3_W<'a, const O: u8> = crate::BitWriter<'a, u32, LATCH_SPEC, PIN3_A, O>; +impl<'a, const O: u8> PIN3_W<'a, O> { + #[doc = "Criteria has not been met"] + #[inline(always)] + pub fn not_latched(self) -> &'a mut W { + self.variant(PIN3_A::NOT_LATCHED) + } + #[doc = "Criteria has been met"] + #[inline(always)] + pub fn latched(self) -> &'a mut W { + self.variant(PIN3_A::LATCHED) + } +} +#[doc = "Field `PIN4` reader - Status on whether PIN4 has met criteria set in PIN_CNF4.SENSE register. Write '1' to clear."] +pub type PIN4_R = crate::BitReader; +#[doc = "Status on whether PIN4 has met criteria set in PIN_CNF4.SENSE register. Write '1' to clear.\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PIN4_A { + #[doc = "0: Criteria has not been met"] + NOT_LATCHED = 0, + #[doc = "1: Criteria has been met"] + LATCHED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PIN4_A) -> Self { + variant as u8 != 0 + } +} +impl PIN4_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> PIN4_A { + match self.bits { + false => PIN4_A::NOT_LATCHED, + true => PIN4_A::LATCHED, + } + } + #[doc = "Checks if the value of the field is `NOT_LATCHED`"] + #[inline(always)] + pub fn is_not_latched(&self) -> bool { + *self == PIN4_A::NOT_LATCHED + } + #[doc = "Checks if the value of the field is `LATCHED`"] + #[inline(always)] + pub fn is_latched(&self) -> bool { + *self == PIN4_A::LATCHED + } +} +#[doc = "Field `PIN4` writer - Status on whether PIN4 has met criteria set in PIN_CNF4.SENSE register. Write '1' to clear."] +pub type PIN4_W<'a, const O: u8> = crate::BitWriter<'a, u32, LATCH_SPEC, PIN4_A, O>; +impl<'a, const O: u8> PIN4_W<'a, O> { + #[doc = "Criteria has not been met"] + #[inline(always)] + pub fn not_latched(self) -> &'a mut W { + self.variant(PIN4_A::NOT_LATCHED) + } + #[doc = "Criteria has been met"] + #[inline(always)] + pub fn latched(self) -> &'a mut W { + self.variant(PIN4_A::LATCHED) + } +} +#[doc = "Field `PIN5` reader - Status on whether PIN5 has met criteria set in PIN_CNF5.SENSE register. Write '1' to clear."] +pub type PIN5_R = crate::BitReader; +#[doc = "Status on whether PIN5 has met criteria set in PIN_CNF5.SENSE register. Write '1' to clear.\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PIN5_A { + #[doc = "0: Criteria has not been met"] + NOT_LATCHED = 0, + #[doc = "1: Criteria has been met"] + LATCHED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PIN5_A) -> Self { + variant as u8 != 0 + } +} +impl PIN5_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> PIN5_A { + match self.bits { + false => PIN5_A::NOT_LATCHED, + true => PIN5_A::LATCHED, + } + } + #[doc = "Checks if the value of the field is `NOT_LATCHED`"] + #[inline(always)] + pub fn is_not_latched(&self) -> bool { + *self == PIN5_A::NOT_LATCHED + } + #[doc = "Checks if the value of the field is `LATCHED`"] + #[inline(always)] + pub fn is_latched(&self) -> bool { + *self == PIN5_A::LATCHED + } +} +#[doc = "Field `PIN5` writer - Status on whether PIN5 has met criteria set in PIN_CNF5.SENSE register. Write '1' to clear."] +pub type PIN5_W<'a, const O: u8> = crate::BitWriter<'a, u32, LATCH_SPEC, PIN5_A, O>; +impl<'a, const O: u8> PIN5_W<'a, O> { + #[doc = "Criteria has not been met"] + #[inline(always)] + pub fn not_latched(self) -> &'a mut W { + self.variant(PIN5_A::NOT_LATCHED) + } + #[doc = "Criteria has been met"] + #[inline(always)] + pub fn latched(self) -> &'a mut W { + self.variant(PIN5_A::LATCHED) + } +} +#[doc = "Field `PIN6` reader - Status on whether PIN6 has met criteria set in PIN_CNF6.SENSE register. Write '1' to clear."] +pub type PIN6_R = crate::BitReader; +#[doc = "Status on whether PIN6 has met criteria set in PIN_CNF6.SENSE register. Write '1' to clear.\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PIN6_A { + #[doc = "0: Criteria has not been met"] + NOT_LATCHED = 0, + #[doc = "1: Criteria has been met"] + LATCHED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PIN6_A) -> Self { + variant as u8 != 0 + } +} +impl PIN6_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> PIN6_A { + match self.bits { + false => PIN6_A::NOT_LATCHED, + true => PIN6_A::LATCHED, + } + } + #[doc = "Checks if the value of the field is `NOT_LATCHED`"] + #[inline(always)] + pub fn is_not_latched(&self) -> bool { + *self == PIN6_A::NOT_LATCHED + } + #[doc = "Checks if the value of the field is `LATCHED`"] + #[inline(always)] + pub fn is_latched(&self) -> bool { + *self == PIN6_A::LATCHED + } +} +#[doc = "Field `PIN6` writer - Status on whether PIN6 has met criteria set in PIN_CNF6.SENSE register. Write '1' to clear."] +pub type PIN6_W<'a, const O: u8> = crate::BitWriter<'a, u32, LATCH_SPEC, PIN6_A, O>; +impl<'a, const O: u8> PIN6_W<'a, O> { + #[doc = "Criteria has not been met"] + #[inline(always)] + pub fn not_latched(self) -> &'a mut W { + self.variant(PIN6_A::NOT_LATCHED) + } + #[doc = "Criteria has been met"] + #[inline(always)] + pub fn latched(self) -> &'a mut W { + self.variant(PIN6_A::LATCHED) + } +} +#[doc = "Field `PIN7` reader - Status on whether PIN7 has met criteria set in PIN_CNF7.SENSE register. Write '1' to clear."] +pub type PIN7_R = crate::BitReader; +#[doc = "Status on whether PIN7 has met criteria set in PIN_CNF7.SENSE register. Write '1' to clear.\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PIN7_A { + #[doc = "0: Criteria has not been met"] + NOT_LATCHED = 0, + #[doc = "1: Criteria has been met"] + LATCHED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PIN7_A) -> Self { + variant as u8 != 0 + } +} +impl PIN7_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> PIN7_A { + match self.bits { + false => PIN7_A::NOT_LATCHED, + true => PIN7_A::LATCHED, + } + } + #[doc = "Checks if the value of the field is `NOT_LATCHED`"] + #[inline(always)] + pub fn is_not_latched(&self) -> bool { + *self == PIN7_A::NOT_LATCHED + } + #[doc = "Checks if the value of the field is `LATCHED`"] + #[inline(always)] + pub fn is_latched(&self) -> bool { + *self == PIN7_A::LATCHED + } +} +#[doc = "Field `PIN7` writer - Status on whether PIN7 has met criteria set in PIN_CNF7.SENSE register. Write '1' to clear."] +pub type PIN7_W<'a, const O: u8> = crate::BitWriter<'a, u32, LATCH_SPEC, PIN7_A, O>; +impl<'a, const O: u8> PIN7_W<'a, O> { + #[doc = "Criteria has not been met"] + #[inline(always)] + pub fn not_latched(self) -> &'a mut W { + self.variant(PIN7_A::NOT_LATCHED) + } + #[doc = "Criteria has been met"] + #[inline(always)] + pub fn latched(self) -> &'a mut W { + self.variant(PIN7_A::LATCHED) + } +} +#[doc = "Field `PIN8` reader - Status on whether PIN8 has met criteria set in PIN_CNF8.SENSE register. Write '1' to clear."] +pub type PIN8_R = crate::BitReader; +#[doc = "Status on whether PIN8 has met criteria set in PIN_CNF8.SENSE register. Write '1' to clear.\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PIN8_A { + #[doc = "0: Criteria has not been met"] + NOT_LATCHED = 0, + #[doc = "1: Criteria has been met"] + LATCHED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PIN8_A) -> Self { + variant as u8 != 0 + } +} +impl PIN8_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> PIN8_A { + match self.bits { + false => PIN8_A::NOT_LATCHED, + true => PIN8_A::LATCHED, + } + } + #[doc = "Checks if the value of the field is `NOT_LATCHED`"] + #[inline(always)] + pub fn is_not_latched(&self) -> bool { + *self == PIN8_A::NOT_LATCHED + } + #[doc = "Checks if the value of the field is `LATCHED`"] + #[inline(always)] + pub fn is_latched(&self) -> bool { + *self == PIN8_A::LATCHED + } +} +#[doc = "Field `PIN8` writer - Status on whether PIN8 has met criteria set in PIN_CNF8.SENSE register. Write '1' to clear."] +pub type PIN8_W<'a, const O: u8> = crate::BitWriter<'a, u32, LATCH_SPEC, PIN8_A, O>; +impl<'a, const O: u8> PIN8_W<'a, O> { + #[doc = "Criteria has not been met"] + #[inline(always)] + pub fn not_latched(self) -> &'a mut W { + self.variant(PIN8_A::NOT_LATCHED) + } + #[doc = "Criteria has been met"] + #[inline(always)] + pub fn latched(self) -> &'a mut W { + self.variant(PIN8_A::LATCHED) + } +} +#[doc = "Field `PIN9` reader - Status on whether PIN9 has met criteria set in PIN_CNF9.SENSE register. Write '1' to clear."] +pub type PIN9_R = crate::BitReader; +#[doc = "Status on whether PIN9 has met criteria set in PIN_CNF9.SENSE register. Write '1' to clear.\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PIN9_A { + #[doc = "0: Criteria has not been met"] + NOT_LATCHED = 0, + #[doc = "1: Criteria has been met"] + LATCHED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PIN9_A) -> Self { + variant as u8 != 0 + } +} +impl PIN9_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> PIN9_A { + match self.bits { + false => PIN9_A::NOT_LATCHED, + true => PIN9_A::LATCHED, + } + } + #[doc = "Checks if the value of the field is `NOT_LATCHED`"] + #[inline(always)] + pub fn is_not_latched(&self) -> bool { + *self == PIN9_A::NOT_LATCHED + } + #[doc = "Checks if the value of the field is `LATCHED`"] + #[inline(always)] + pub fn is_latched(&self) -> bool { + *self == PIN9_A::LATCHED + } +} +#[doc = "Field `PIN9` writer - Status on whether PIN9 has met criteria set in PIN_CNF9.SENSE register. Write '1' to clear."] +pub type PIN9_W<'a, const O: u8> = crate::BitWriter<'a, u32, LATCH_SPEC, PIN9_A, O>; +impl<'a, const O: u8> PIN9_W<'a, O> { + #[doc = "Criteria has not been met"] + #[inline(always)] + pub fn not_latched(self) -> &'a mut W { + self.variant(PIN9_A::NOT_LATCHED) + } + #[doc = "Criteria has been met"] + #[inline(always)] + pub fn latched(self) -> &'a mut W { + self.variant(PIN9_A::LATCHED) + } +} +#[doc = "Field `PIN10` reader - Status on whether PIN10 has met criteria set in PIN_CNF10.SENSE register. Write '1' to clear."] +pub type PIN10_R = crate::BitReader; +#[doc = "Status on whether PIN10 has met criteria set in PIN_CNF10.SENSE register. Write '1' to clear.\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PIN10_A { + #[doc = "0: Criteria has not been met"] + NOT_LATCHED = 0, + #[doc = "1: Criteria has been met"] + LATCHED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PIN10_A) -> Self { + variant as u8 != 0 + } +} +impl PIN10_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> PIN10_A { + match self.bits { + false => PIN10_A::NOT_LATCHED, + true => PIN10_A::LATCHED, + } + } + #[doc = "Checks if the value of the field is `NOT_LATCHED`"] + #[inline(always)] + pub fn is_not_latched(&self) -> bool { + *self == PIN10_A::NOT_LATCHED + } + #[doc = "Checks if the value of the field is `LATCHED`"] + #[inline(always)] + pub fn is_latched(&self) -> bool { + *self == PIN10_A::LATCHED + } +} +#[doc = "Field `PIN10` writer - Status on whether PIN10 has met criteria set in PIN_CNF10.SENSE register. Write '1' to clear."] +pub type PIN10_W<'a, const O: u8> = crate::BitWriter<'a, u32, LATCH_SPEC, PIN10_A, O>; +impl<'a, const O: u8> PIN10_W<'a, O> { + #[doc = "Criteria has not been met"] + #[inline(always)] + pub fn not_latched(self) -> &'a mut W { + self.variant(PIN10_A::NOT_LATCHED) + } + #[doc = "Criteria has been met"] + #[inline(always)] + pub fn latched(self) -> &'a mut W { + self.variant(PIN10_A::LATCHED) + } +} +#[doc = "Field `PIN11` reader - Status on whether PIN11 has met criteria set in PIN_CNF11.SENSE register. Write '1' to clear."] +pub type PIN11_R = crate::BitReader; +#[doc = "Status on whether PIN11 has met criteria set in PIN_CNF11.SENSE register. Write '1' to clear.\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PIN11_A { + #[doc = "0: Criteria has not been met"] + NOT_LATCHED = 0, + #[doc = "1: Criteria has been met"] + LATCHED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PIN11_A) -> Self { + variant as u8 != 0 + } +} +impl PIN11_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> PIN11_A { + match self.bits { + false => PIN11_A::NOT_LATCHED, + true => PIN11_A::LATCHED, + } + } + #[doc = "Checks if the value of the field is `NOT_LATCHED`"] + #[inline(always)] + pub fn is_not_latched(&self) -> bool { + *self == PIN11_A::NOT_LATCHED + } + #[doc = "Checks if the value of the field is `LATCHED`"] + #[inline(always)] + pub fn is_latched(&self) -> bool { + *self == PIN11_A::LATCHED + } +} +#[doc = "Field `PIN11` writer - Status on whether PIN11 has met criteria set in PIN_CNF11.SENSE register. Write '1' to clear."] +pub type PIN11_W<'a, const O: u8> = crate::BitWriter<'a, u32, LATCH_SPEC, PIN11_A, O>; +impl<'a, const O: u8> PIN11_W<'a, O> { + #[doc = "Criteria has not been met"] + #[inline(always)] + pub fn not_latched(self) -> &'a mut W { + self.variant(PIN11_A::NOT_LATCHED) + } + #[doc = "Criteria has been met"] + #[inline(always)] + pub fn latched(self) -> &'a mut W { + self.variant(PIN11_A::LATCHED) + } +} +#[doc = "Field `PIN12` reader - Status on whether PIN12 has met criteria set in PIN_CNF12.SENSE register. Write '1' to clear."] +pub type PIN12_R = crate::BitReader; +#[doc = "Status on whether PIN12 has met criteria set in PIN_CNF12.SENSE register. Write '1' to clear.\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PIN12_A { + #[doc = "0: Criteria has not been met"] + NOT_LATCHED = 0, + #[doc = "1: Criteria has been met"] + LATCHED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PIN12_A) -> Self { + variant as u8 != 0 + } +} +impl PIN12_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> PIN12_A { + match self.bits { + false => PIN12_A::NOT_LATCHED, + true => PIN12_A::LATCHED, + } + } + #[doc = "Checks if the value of the field is `NOT_LATCHED`"] + #[inline(always)] + pub fn is_not_latched(&self) -> bool { + *self == PIN12_A::NOT_LATCHED + } + #[doc = "Checks if the value of the field is `LATCHED`"] + #[inline(always)] + pub fn is_latched(&self) -> bool { + *self == PIN12_A::LATCHED + } +} +#[doc = "Field `PIN12` writer - Status on whether PIN12 has met criteria set in PIN_CNF12.SENSE register. Write '1' to clear."] +pub type PIN12_W<'a, const O: u8> = crate::BitWriter<'a, u32, LATCH_SPEC, PIN12_A, O>; +impl<'a, const O: u8> PIN12_W<'a, O> { + #[doc = "Criteria has not been met"] + #[inline(always)] + pub fn not_latched(self) -> &'a mut W { + self.variant(PIN12_A::NOT_LATCHED) + } + #[doc = "Criteria has been met"] + #[inline(always)] + pub fn latched(self) -> &'a mut W { + self.variant(PIN12_A::LATCHED) + } +} +#[doc = "Field `PIN13` reader - Status on whether PIN13 has met criteria set in PIN_CNF13.SENSE register. Write '1' to clear."] +pub type PIN13_R = crate::BitReader; +#[doc = "Status on whether PIN13 has met criteria set in PIN_CNF13.SENSE register. Write '1' to clear.\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PIN13_A { + #[doc = "0: Criteria has not been met"] + NOT_LATCHED = 0, + #[doc = "1: Criteria has been met"] + LATCHED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PIN13_A) -> Self { + variant as u8 != 0 + } +} +impl PIN13_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> PIN13_A { + match self.bits { + false => PIN13_A::NOT_LATCHED, + true => PIN13_A::LATCHED, + } + } + #[doc = "Checks if the value of the field is `NOT_LATCHED`"] + #[inline(always)] + pub fn is_not_latched(&self) -> bool { + *self == PIN13_A::NOT_LATCHED + } + #[doc = "Checks if the value of the field is `LATCHED`"] + #[inline(always)] + pub fn is_latched(&self) -> bool { + *self == PIN13_A::LATCHED + } +} +#[doc = "Field `PIN13` writer - Status on whether PIN13 has met criteria set in PIN_CNF13.SENSE register. Write '1' to clear."] +pub type PIN13_W<'a, const O: u8> = crate::BitWriter<'a, u32, LATCH_SPEC, PIN13_A, O>; +impl<'a, const O: u8> PIN13_W<'a, O> { + #[doc = "Criteria has not been met"] + #[inline(always)] + pub fn not_latched(self) -> &'a mut W { + self.variant(PIN13_A::NOT_LATCHED) + } + #[doc = "Criteria has been met"] + #[inline(always)] + pub fn latched(self) -> &'a mut W { + self.variant(PIN13_A::LATCHED) + } +} +#[doc = "Field `PIN14` reader - Status on whether PIN14 has met criteria set in PIN_CNF14.SENSE register. Write '1' to clear."] +pub type PIN14_R = crate::BitReader; +#[doc = "Status on whether PIN14 has met criteria set in PIN_CNF14.SENSE register. Write '1' to clear.\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PIN14_A { + #[doc = "0: Criteria has not been met"] + NOT_LATCHED = 0, + #[doc = "1: Criteria has been met"] + LATCHED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PIN14_A) -> Self { + variant as u8 != 0 + } +} +impl PIN14_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> PIN14_A { + match self.bits { + false => PIN14_A::NOT_LATCHED, + true => PIN14_A::LATCHED, + } + } + #[doc = "Checks if the value of the field is `NOT_LATCHED`"] + #[inline(always)] + pub fn is_not_latched(&self) -> bool { + *self == PIN14_A::NOT_LATCHED + } + #[doc = "Checks if the value of the field is `LATCHED`"] + #[inline(always)] + pub fn is_latched(&self) -> bool { + *self == PIN14_A::LATCHED + } +} +#[doc = "Field `PIN14` writer - Status on whether PIN14 has met criteria set in PIN_CNF14.SENSE register. Write '1' to clear."] +pub type PIN14_W<'a, const O: u8> = crate::BitWriter<'a, u32, LATCH_SPEC, PIN14_A, O>; +impl<'a, const O: u8> PIN14_W<'a, O> { + #[doc = "Criteria has not been met"] + #[inline(always)] + pub fn not_latched(self) -> &'a mut W { + self.variant(PIN14_A::NOT_LATCHED) + } + #[doc = "Criteria has been met"] + #[inline(always)] + pub fn latched(self) -> &'a mut W { + self.variant(PIN14_A::LATCHED) + } +} +#[doc = "Field `PIN15` reader - Status on whether PIN15 has met criteria set in PIN_CNF15.SENSE register. Write '1' to clear."] +pub type PIN15_R = crate::BitReader; +#[doc = "Status on whether PIN15 has met criteria set in PIN_CNF15.SENSE register. Write '1' to clear.\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PIN15_A { + #[doc = "0: Criteria has not been met"] + NOT_LATCHED = 0, + #[doc = "1: Criteria has been met"] + LATCHED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PIN15_A) -> Self { + variant as u8 != 0 + } +} +impl PIN15_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> PIN15_A { + match self.bits { + false => PIN15_A::NOT_LATCHED, + true => PIN15_A::LATCHED, + } + } + #[doc = "Checks if the value of the field is `NOT_LATCHED`"] + #[inline(always)] + pub fn is_not_latched(&self) -> bool { + *self == PIN15_A::NOT_LATCHED + } + #[doc = "Checks if the value of the field is `LATCHED`"] + #[inline(always)] + pub fn is_latched(&self) -> bool { + *self == PIN15_A::LATCHED + } +} +#[doc = "Field `PIN15` writer - Status on whether PIN15 has met criteria set in PIN_CNF15.SENSE register. Write '1' to clear."] +pub type PIN15_W<'a, const O: u8> = crate::BitWriter<'a, u32, LATCH_SPEC, PIN15_A, O>; +impl<'a, const O: u8> PIN15_W<'a, O> { + #[doc = "Criteria has not been met"] + #[inline(always)] + pub fn not_latched(self) -> &'a mut W { + self.variant(PIN15_A::NOT_LATCHED) + } + #[doc = "Criteria has been met"] + #[inline(always)] + pub fn latched(self) -> &'a mut W { + self.variant(PIN15_A::LATCHED) + } +} +#[doc = "Field `PIN16` reader - Status on whether PIN16 has met criteria set in PIN_CNF16.SENSE register. Write '1' to clear."] +pub type PIN16_R = crate::BitReader; +#[doc = "Status on whether PIN16 has met criteria set in PIN_CNF16.SENSE register. Write '1' to clear.\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PIN16_A { + #[doc = "0: Criteria has not been met"] + NOT_LATCHED = 0, + #[doc = "1: Criteria has been met"] + LATCHED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PIN16_A) -> Self { + variant as u8 != 0 + } +} +impl PIN16_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> PIN16_A { + match self.bits { + false => PIN16_A::NOT_LATCHED, + true => PIN16_A::LATCHED, + } + } + #[doc = "Checks if the value of the field is `NOT_LATCHED`"] + #[inline(always)] + pub fn is_not_latched(&self) -> bool { + *self == PIN16_A::NOT_LATCHED + } + #[doc = "Checks if the value of the field is `LATCHED`"] + #[inline(always)] + pub fn is_latched(&self) -> bool { + *self == PIN16_A::LATCHED + } +} +#[doc = "Field `PIN16` writer - Status on whether PIN16 has met criteria set in PIN_CNF16.SENSE register. Write '1' to clear."] +pub type PIN16_W<'a, const O: u8> = crate::BitWriter<'a, u32, LATCH_SPEC, PIN16_A, O>; +impl<'a, const O: u8> PIN16_W<'a, O> { + #[doc = "Criteria has not been met"] + #[inline(always)] + pub fn not_latched(self) -> &'a mut W { + self.variant(PIN16_A::NOT_LATCHED) + } + #[doc = "Criteria has been met"] + #[inline(always)] + pub fn latched(self) -> &'a mut W { + self.variant(PIN16_A::LATCHED) + } +} +#[doc = "Field `PIN17` reader - Status on whether PIN17 has met criteria set in PIN_CNF17.SENSE register. Write '1' to clear."] +pub type PIN17_R = crate::BitReader; +#[doc = "Status on whether PIN17 has met criteria set in PIN_CNF17.SENSE register. Write '1' to clear.\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PIN17_A { + #[doc = "0: Criteria has not been met"] + NOT_LATCHED = 0, + #[doc = "1: Criteria has been met"] + LATCHED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PIN17_A) -> Self { + variant as u8 != 0 + } +} +impl PIN17_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> PIN17_A { + match self.bits { + false => PIN17_A::NOT_LATCHED, + true => PIN17_A::LATCHED, + } + } + #[doc = "Checks if the value of the field is `NOT_LATCHED`"] + #[inline(always)] + pub fn is_not_latched(&self) -> bool { + *self == PIN17_A::NOT_LATCHED + } + #[doc = "Checks if the value of the field is `LATCHED`"] + #[inline(always)] + pub fn is_latched(&self) -> bool { + *self == PIN17_A::LATCHED + } +} +#[doc = "Field `PIN17` writer - Status on whether PIN17 has met criteria set in PIN_CNF17.SENSE register. Write '1' to clear."] +pub type PIN17_W<'a, const O: u8> = crate::BitWriter<'a, u32, LATCH_SPEC, PIN17_A, O>; +impl<'a, const O: u8> PIN17_W<'a, O> { + #[doc = "Criteria has not been met"] + #[inline(always)] + pub fn not_latched(self) -> &'a mut W { + self.variant(PIN17_A::NOT_LATCHED) + } + #[doc = "Criteria has been met"] + #[inline(always)] + pub fn latched(self) -> &'a mut W { + self.variant(PIN17_A::LATCHED) + } +} +#[doc = "Field `PIN18` reader - Status on whether PIN18 has met criteria set in PIN_CNF18.SENSE register. Write '1' to clear."] +pub type PIN18_R = crate::BitReader; +#[doc = "Status on whether PIN18 has met criteria set in PIN_CNF18.SENSE register. Write '1' to clear.\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PIN18_A { + #[doc = "0: Criteria has not been met"] + NOT_LATCHED = 0, + #[doc = "1: Criteria has been met"] + LATCHED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PIN18_A) -> Self { + variant as u8 != 0 + } +} +impl PIN18_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> PIN18_A { + match self.bits { + false => PIN18_A::NOT_LATCHED, + true => PIN18_A::LATCHED, + } + } + #[doc = "Checks if the value of the field is `NOT_LATCHED`"] + #[inline(always)] + pub fn is_not_latched(&self) -> bool { + *self == PIN18_A::NOT_LATCHED + } + #[doc = "Checks if the value of the field is `LATCHED`"] + #[inline(always)] + pub fn is_latched(&self) -> bool { + *self == PIN18_A::LATCHED + } +} +#[doc = "Field `PIN18` writer - Status on whether PIN18 has met criteria set in PIN_CNF18.SENSE register. Write '1' to clear."] +pub type PIN18_W<'a, const O: u8> = crate::BitWriter<'a, u32, LATCH_SPEC, PIN18_A, O>; +impl<'a, const O: u8> PIN18_W<'a, O> { + #[doc = "Criteria has not been met"] + #[inline(always)] + pub fn not_latched(self) -> &'a mut W { + self.variant(PIN18_A::NOT_LATCHED) + } + #[doc = "Criteria has been met"] + #[inline(always)] + pub fn latched(self) -> &'a mut W { + self.variant(PIN18_A::LATCHED) + } +} +#[doc = "Field `PIN19` reader - Status on whether PIN19 has met criteria set in PIN_CNF19.SENSE register. Write '1' to clear."] +pub type PIN19_R = crate::BitReader; +#[doc = "Status on whether PIN19 has met criteria set in PIN_CNF19.SENSE register. Write '1' to clear.\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PIN19_A { + #[doc = "0: Criteria has not been met"] + NOT_LATCHED = 0, + #[doc = "1: Criteria has been met"] + LATCHED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PIN19_A) -> Self { + variant as u8 != 0 + } +} +impl PIN19_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> PIN19_A { + match self.bits { + false => PIN19_A::NOT_LATCHED, + true => PIN19_A::LATCHED, + } + } + #[doc = "Checks if the value of the field is `NOT_LATCHED`"] + #[inline(always)] + pub fn is_not_latched(&self) -> bool { + *self == PIN19_A::NOT_LATCHED + } + #[doc = "Checks if the value of the field is `LATCHED`"] + #[inline(always)] + pub fn is_latched(&self) -> bool { + *self == PIN19_A::LATCHED + } +} +#[doc = "Field `PIN19` writer - Status on whether PIN19 has met criteria set in PIN_CNF19.SENSE register. Write '1' to clear."] +pub type PIN19_W<'a, const O: u8> = crate::BitWriter<'a, u32, LATCH_SPEC, PIN19_A, O>; +impl<'a, const O: u8> PIN19_W<'a, O> { + #[doc = "Criteria has not been met"] + #[inline(always)] + pub fn not_latched(self) -> &'a mut W { + self.variant(PIN19_A::NOT_LATCHED) + } + #[doc = "Criteria has been met"] + #[inline(always)] + pub fn latched(self) -> &'a mut W { + self.variant(PIN19_A::LATCHED) + } +} +#[doc = "Field `PIN20` reader - Status on whether PIN20 has met criteria set in PIN_CNF20.SENSE register. Write '1' to clear."] +pub type PIN20_R = crate::BitReader; +#[doc = "Status on whether PIN20 has met criteria set in PIN_CNF20.SENSE register. Write '1' to clear.\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PIN20_A { + #[doc = "0: Criteria has not been met"] + NOT_LATCHED = 0, + #[doc = "1: Criteria has been met"] + LATCHED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PIN20_A) -> Self { + variant as u8 != 0 + } +} +impl PIN20_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> PIN20_A { + match self.bits { + false => PIN20_A::NOT_LATCHED, + true => PIN20_A::LATCHED, + } + } + #[doc = "Checks if the value of the field is `NOT_LATCHED`"] + #[inline(always)] + pub fn is_not_latched(&self) -> bool { + *self == PIN20_A::NOT_LATCHED + } + #[doc = "Checks if the value of the field is `LATCHED`"] + #[inline(always)] + pub fn is_latched(&self) -> bool { + *self == PIN20_A::LATCHED + } +} +#[doc = "Field `PIN20` writer - Status on whether PIN20 has met criteria set in PIN_CNF20.SENSE register. Write '1' to clear."] +pub type PIN20_W<'a, const O: u8> = crate::BitWriter<'a, u32, LATCH_SPEC, PIN20_A, O>; +impl<'a, const O: u8> PIN20_W<'a, O> { + #[doc = "Criteria has not been met"] + #[inline(always)] + pub fn not_latched(self) -> &'a mut W { + self.variant(PIN20_A::NOT_LATCHED) + } + #[doc = "Criteria has been met"] + #[inline(always)] + pub fn latched(self) -> &'a mut W { + self.variant(PIN20_A::LATCHED) + } +} +#[doc = "Field `PIN21` reader - Status on whether PIN21 has met criteria set in PIN_CNF21.SENSE register. Write '1' to clear."] +pub type PIN21_R = crate::BitReader; +#[doc = "Status on whether PIN21 has met criteria set in PIN_CNF21.SENSE register. Write '1' to clear.\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PIN21_A { + #[doc = "0: Criteria has not been met"] + NOT_LATCHED = 0, + #[doc = "1: Criteria has been met"] + LATCHED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PIN21_A) -> Self { + variant as u8 != 0 + } +} +impl PIN21_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> PIN21_A { + match self.bits { + false => PIN21_A::NOT_LATCHED, + true => PIN21_A::LATCHED, + } + } + #[doc = "Checks if the value of the field is `NOT_LATCHED`"] + #[inline(always)] + pub fn is_not_latched(&self) -> bool { + *self == PIN21_A::NOT_LATCHED + } + #[doc = "Checks if the value of the field is `LATCHED`"] + #[inline(always)] + pub fn is_latched(&self) -> bool { + *self == PIN21_A::LATCHED + } +} +#[doc = "Field `PIN21` writer - Status on whether PIN21 has met criteria set in PIN_CNF21.SENSE register. Write '1' to clear."] +pub type PIN21_W<'a, const O: u8> = crate::BitWriter<'a, u32, LATCH_SPEC, PIN21_A, O>; +impl<'a, const O: u8> PIN21_W<'a, O> { + #[doc = "Criteria has not been met"] + #[inline(always)] + pub fn not_latched(self) -> &'a mut W { + self.variant(PIN21_A::NOT_LATCHED) + } + #[doc = "Criteria has been met"] + #[inline(always)] + pub fn latched(self) -> &'a mut W { + self.variant(PIN21_A::LATCHED) + } +} +#[doc = "Field `PIN22` reader - Status on whether PIN22 has met criteria set in PIN_CNF22.SENSE register. Write '1' to clear."] +pub type PIN22_R = crate::BitReader; +#[doc = "Status on whether PIN22 has met criteria set in PIN_CNF22.SENSE register. Write '1' to clear.\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PIN22_A { + #[doc = "0: Criteria has not been met"] + NOT_LATCHED = 0, + #[doc = "1: Criteria has been met"] + LATCHED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PIN22_A) -> Self { + variant as u8 != 0 + } +} +impl PIN22_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> PIN22_A { + match self.bits { + false => PIN22_A::NOT_LATCHED, + true => PIN22_A::LATCHED, + } + } + #[doc = "Checks if the value of the field is `NOT_LATCHED`"] + #[inline(always)] + pub fn is_not_latched(&self) -> bool { + *self == PIN22_A::NOT_LATCHED + } + #[doc = "Checks if the value of the field is `LATCHED`"] + #[inline(always)] + pub fn is_latched(&self) -> bool { + *self == PIN22_A::LATCHED + } +} +#[doc = "Field `PIN22` writer - Status on whether PIN22 has met criteria set in PIN_CNF22.SENSE register. Write '1' to clear."] +pub type PIN22_W<'a, const O: u8> = crate::BitWriter<'a, u32, LATCH_SPEC, PIN22_A, O>; +impl<'a, const O: u8> PIN22_W<'a, O> { + #[doc = "Criteria has not been met"] + #[inline(always)] + pub fn not_latched(self) -> &'a mut W { + self.variant(PIN22_A::NOT_LATCHED) + } + #[doc = "Criteria has been met"] + #[inline(always)] + pub fn latched(self) -> &'a mut W { + self.variant(PIN22_A::LATCHED) + } +} +#[doc = "Field `PIN23` reader - Status on whether PIN23 has met criteria set in PIN_CNF23.SENSE register. Write '1' to clear."] +pub type PIN23_R = crate::BitReader; +#[doc = "Status on whether PIN23 has met criteria set in PIN_CNF23.SENSE register. Write '1' to clear.\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PIN23_A { + #[doc = "0: Criteria has not been met"] + NOT_LATCHED = 0, + #[doc = "1: Criteria has been met"] + LATCHED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PIN23_A) -> Self { + variant as u8 != 0 + } +} +impl PIN23_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> PIN23_A { + match self.bits { + false => PIN23_A::NOT_LATCHED, + true => PIN23_A::LATCHED, + } + } + #[doc = "Checks if the value of the field is `NOT_LATCHED`"] + #[inline(always)] + pub fn is_not_latched(&self) -> bool { + *self == PIN23_A::NOT_LATCHED + } + #[doc = "Checks if the value of the field is `LATCHED`"] + #[inline(always)] + pub fn is_latched(&self) -> bool { + *self == PIN23_A::LATCHED + } +} +#[doc = "Field `PIN23` writer - Status on whether PIN23 has met criteria set in PIN_CNF23.SENSE register. Write '1' to clear."] +pub type PIN23_W<'a, const O: u8> = crate::BitWriter<'a, u32, LATCH_SPEC, PIN23_A, O>; +impl<'a, const O: u8> PIN23_W<'a, O> { + #[doc = "Criteria has not been met"] + #[inline(always)] + pub fn not_latched(self) -> &'a mut W { + self.variant(PIN23_A::NOT_LATCHED) + } + #[doc = "Criteria has been met"] + #[inline(always)] + pub fn latched(self) -> &'a mut W { + self.variant(PIN23_A::LATCHED) + } +} +#[doc = "Field `PIN24` reader - Status on whether PIN24 has met criteria set in PIN_CNF24.SENSE register. Write '1' to clear."] +pub type PIN24_R = crate::BitReader; +#[doc = "Status on whether PIN24 has met criteria set in PIN_CNF24.SENSE register. Write '1' to clear.\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PIN24_A { + #[doc = "0: Criteria has not been met"] + NOT_LATCHED = 0, + #[doc = "1: Criteria has been met"] + LATCHED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PIN24_A) -> Self { + variant as u8 != 0 + } +} +impl PIN24_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> PIN24_A { + match self.bits { + false => PIN24_A::NOT_LATCHED, + true => PIN24_A::LATCHED, + } + } + #[doc = "Checks if the value of the field is `NOT_LATCHED`"] + #[inline(always)] + pub fn is_not_latched(&self) -> bool { + *self == PIN24_A::NOT_LATCHED + } + #[doc = "Checks if the value of the field is `LATCHED`"] + #[inline(always)] + pub fn is_latched(&self) -> bool { + *self == PIN24_A::LATCHED + } +} +#[doc = "Field `PIN24` writer - Status on whether PIN24 has met criteria set in PIN_CNF24.SENSE register. Write '1' to clear."] +pub type PIN24_W<'a, const O: u8> = crate::BitWriter<'a, u32, LATCH_SPEC, PIN24_A, O>; +impl<'a, const O: u8> PIN24_W<'a, O> { + #[doc = "Criteria has not been met"] + #[inline(always)] + pub fn not_latched(self) -> &'a mut W { + self.variant(PIN24_A::NOT_LATCHED) + } + #[doc = "Criteria has been met"] + #[inline(always)] + pub fn latched(self) -> &'a mut W { + self.variant(PIN24_A::LATCHED) + } +} +#[doc = "Field `PIN25` reader - Status on whether PIN25 has met criteria set in PIN_CNF25.SENSE register. Write '1' to clear."] +pub type PIN25_R = crate::BitReader; +#[doc = "Status on whether PIN25 has met criteria set in PIN_CNF25.SENSE register. Write '1' to clear.\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PIN25_A { + #[doc = "0: Criteria has not been met"] + NOT_LATCHED = 0, + #[doc = "1: Criteria has been met"] + LATCHED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PIN25_A) -> Self { + variant as u8 != 0 + } +} +impl PIN25_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> PIN25_A { + match self.bits { + false => PIN25_A::NOT_LATCHED, + true => PIN25_A::LATCHED, + } + } + #[doc = "Checks if the value of the field is `NOT_LATCHED`"] + #[inline(always)] + pub fn is_not_latched(&self) -> bool { + *self == PIN25_A::NOT_LATCHED + } + #[doc = "Checks if the value of the field is `LATCHED`"] + #[inline(always)] + pub fn is_latched(&self) -> bool { + *self == PIN25_A::LATCHED + } +} +#[doc = "Field `PIN25` writer - Status on whether PIN25 has met criteria set in PIN_CNF25.SENSE register. Write '1' to clear."] +pub type PIN25_W<'a, const O: u8> = crate::BitWriter<'a, u32, LATCH_SPEC, PIN25_A, O>; +impl<'a, const O: u8> PIN25_W<'a, O> { + #[doc = "Criteria has not been met"] + #[inline(always)] + pub fn not_latched(self) -> &'a mut W { + self.variant(PIN25_A::NOT_LATCHED) + } + #[doc = "Criteria has been met"] + #[inline(always)] + pub fn latched(self) -> &'a mut W { + self.variant(PIN25_A::LATCHED) + } +} +#[doc = "Field `PIN26` reader - Status on whether PIN26 has met criteria set in PIN_CNF26.SENSE register. Write '1' to clear."] +pub type PIN26_R = crate::BitReader; +#[doc = "Status on whether PIN26 has met criteria set in PIN_CNF26.SENSE register. Write '1' to clear.\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PIN26_A { + #[doc = "0: Criteria has not been met"] + NOT_LATCHED = 0, + #[doc = "1: Criteria has been met"] + LATCHED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PIN26_A) -> Self { + variant as u8 != 0 + } +} +impl PIN26_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> PIN26_A { + match self.bits { + false => PIN26_A::NOT_LATCHED, + true => PIN26_A::LATCHED, + } + } + #[doc = "Checks if the value of the field is `NOT_LATCHED`"] + #[inline(always)] + pub fn is_not_latched(&self) -> bool { + *self == PIN26_A::NOT_LATCHED + } + #[doc = "Checks if the value of the field is `LATCHED`"] + #[inline(always)] + pub fn is_latched(&self) -> bool { + *self == PIN26_A::LATCHED + } +} +#[doc = "Field `PIN26` writer - Status on whether PIN26 has met criteria set in PIN_CNF26.SENSE register. Write '1' to clear."] +pub type PIN26_W<'a, const O: u8> = crate::BitWriter<'a, u32, LATCH_SPEC, PIN26_A, O>; +impl<'a, const O: u8> PIN26_W<'a, O> { + #[doc = "Criteria has not been met"] + #[inline(always)] + pub fn not_latched(self) -> &'a mut W { + self.variant(PIN26_A::NOT_LATCHED) + } + #[doc = "Criteria has been met"] + #[inline(always)] + pub fn latched(self) -> &'a mut W { + self.variant(PIN26_A::LATCHED) + } +} +#[doc = "Field `PIN27` reader - Status on whether PIN27 has met criteria set in PIN_CNF27.SENSE register. Write '1' to clear."] +pub type PIN27_R = crate::BitReader; +#[doc = "Status on whether PIN27 has met criteria set in PIN_CNF27.SENSE register. Write '1' to clear.\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PIN27_A { + #[doc = "0: Criteria has not been met"] + NOT_LATCHED = 0, + #[doc = "1: Criteria has been met"] + LATCHED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PIN27_A) -> Self { + variant as u8 != 0 + } +} +impl PIN27_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> PIN27_A { + match self.bits { + false => PIN27_A::NOT_LATCHED, + true => PIN27_A::LATCHED, + } + } + #[doc = "Checks if the value of the field is `NOT_LATCHED`"] + #[inline(always)] + pub fn is_not_latched(&self) -> bool { + *self == PIN27_A::NOT_LATCHED + } + #[doc = "Checks if the value of the field is `LATCHED`"] + #[inline(always)] + pub fn is_latched(&self) -> bool { + *self == PIN27_A::LATCHED + } +} +#[doc = "Field `PIN27` writer - Status on whether PIN27 has met criteria set in PIN_CNF27.SENSE register. Write '1' to clear."] +pub type PIN27_W<'a, const O: u8> = crate::BitWriter<'a, u32, LATCH_SPEC, PIN27_A, O>; +impl<'a, const O: u8> PIN27_W<'a, O> { + #[doc = "Criteria has not been met"] + #[inline(always)] + pub fn not_latched(self) -> &'a mut W { + self.variant(PIN27_A::NOT_LATCHED) + } + #[doc = "Criteria has been met"] + #[inline(always)] + pub fn latched(self) -> &'a mut W { + self.variant(PIN27_A::LATCHED) + } +} +#[doc = "Field `PIN28` reader - Status on whether PIN28 has met criteria set in PIN_CNF28.SENSE register. Write '1' to clear."] +pub type PIN28_R = crate::BitReader; +#[doc = "Status on whether PIN28 has met criteria set in PIN_CNF28.SENSE register. Write '1' to clear.\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PIN28_A { + #[doc = "0: Criteria has not been met"] + NOT_LATCHED = 0, + #[doc = "1: Criteria has been met"] + LATCHED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PIN28_A) -> Self { + variant as u8 != 0 + } +} +impl PIN28_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> PIN28_A { + match self.bits { + false => PIN28_A::NOT_LATCHED, + true => PIN28_A::LATCHED, + } + } + #[doc = "Checks if the value of the field is `NOT_LATCHED`"] + #[inline(always)] + pub fn is_not_latched(&self) -> bool { + *self == PIN28_A::NOT_LATCHED + } + #[doc = "Checks if the value of the field is `LATCHED`"] + #[inline(always)] + pub fn is_latched(&self) -> bool { + *self == PIN28_A::LATCHED + } +} +#[doc = "Field `PIN28` writer - Status on whether PIN28 has met criteria set in PIN_CNF28.SENSE register. Write '1' to clear."] +pub type PIN28_W<'a, const O: u8> = crate::BitWriter<'a, u32, LATCH_SPEC, PIN28_A, O>; +impl<'a, const O: u8> PIN28_W<'a, O> { + #[doc = "Criteria has not been met"] + #[inline(always)] + pub fn not_latched(self) -> &'a mut W { + self.variant(PIN28_A::NOT_LATCHED) + } + #[doc = "Criteria has been met"] + #[inline(always)] + pub fn latched(self) -> &'a mut W { + self.variant(PIN28_A::LATCHED) + } +} +#[doc = "Field `PIN29` reader - Status on whether PIN29 has met criteria set in PIN_CNF29.SENSE register. Write '1' to clear."] +pub type PIN29_R = crate::BitReader; +#[doc = "Status on whether PIN29 has met criteria set in PIN_CNF29.SENSE register. Write '1' to clear.\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PIN29_A { + #[doc = "0: Criteria has not been met"] + NOT_LATCHED = 0, + #[doc = "1: Criteria has been met"] + LATCHED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PIN29_A) -> Self { + variant as u8 != 0 + } +} +impl PIN29_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> PIN29_A { + match self.bits { + false => PIN29_A::NOT_LATCHED, + true => PIN29_A::LATCHED, + } + } + #[doc = "Checks if the value of the field is `NOT_LATCHED`"] + #[inline(always)] + pub fn is_not_latched(&self) -> bool { + *self == PIN29_A::NOT_LATCHED + } + #[doc = "Checks if the value of the field is `LATCHED`"] + #[inline(always)] + pub fn is_latched(&self) -> bool { + *self == PIN29_A::LATCHED + } +} +#[doc = "Field `PIN29` writer - Status on whether PIN29 has met criteria set in PIN_CNF29.SENSE register. Write '1' to clear."] +pub type PIN29_W<'a, const O: u8> = crate::BitWriter<'a, u32, LATCH_SPEC, PIN29_A, O>; +impl<'a, const O: u8> PIN29_W<'a, O> { + #[doc = "Criteria has not been met"] + #[inline(always)] + pub fn not_latched(self) -> &'a mut W { + self.variant(PIN29_A::NOT_LATCHED) + } + #[doc = "Criteria has been met"] + #[inline(always)] + pub fn latched(self) -> &'a mut W { + self.variant(PIN29_A::LATCHED) + } +} +#[doc = "Field `PIN30` reader - Status on whether PIN30 has met criteria set in PIN_CNF30.SENSE register. Write '1' to clear."] +pub type PIN30_R = crate::BitReader; +#[doc = "Status on whether PIN30 has met criteria set in PIN_CNF30.SENSE register. Write '1' to clear.\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PIN30_A { + #[doc = "0: Criteria has not been met"] + NOT_LATCHED = 0, + #[doc = "1: Criteria has been met"] + LATCHED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PIN30_A) -> Self { + variant as u8 != 0 + } +} +impl PIN30_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> PIN30_A { + match self.bits { + false => PIN30_A::NOT_LATCHED, + true => PIN30_A::LATCHED, + } + } + #[doc = "Checks if the value of the field is `NOT_LATCHED`"] + #[inline(always)] + pub fn is_not_latched(&self) -> bool { + *self == PIN30_A::NOT_LATCHED + } + #[doc = "Checks if the value of the field is `LATCHED`"] + #[inline(always)] + pub fn is_latched(&self) -> bool { + *self == PIN30_A::LATCHED + } +} +#[doc = "Field `PIN30` writer - Status on whether PIN30 has met criteria set in PIN_CNF30.SENSE register. Write '1' to clear."] +pub type PIN30_W<'a, const O: u8> = crate::BitWriter<'a, u32, LATCH_SPEC, PIN30_A, O>; +impl<'a, const O: u8> PIN30_W<'a, O> { + #[doc = "Criteria has not been met"] + #[inline(always)] + pub fn not_latched(self) -> &'a mut W { + self.variant(PIN30_A::NOT_LATCHED) + } + #[doc = "Criteria has been met"] + #[inline(always)] + pub fn latched(self) -> &'a mut W { + self.variant(PIN30_A::LATCHED) + } +} +#[doc = "Field `PIN31` reader - Status on whether PIN31 has met criteria set in PIN_CNF31.SENSE register. Write '1' to clear."] +pub type PIN31_R = crate::BitReader; +#[doc = "Status on whether PIN31 has met criteria set in PIN_CNF31.SENSE register. Write '1' to clear.\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PIN31_A { + #[doc = "0: Criteria has not been met"] + NOT_LATCHED = 0, + #[doc = "1: Criteria has been met"] + LATCHED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PIN31_A) -> Self { + variant as u8 != 0 + } +} +impl PIN31_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> PIN31_A { + match self.bits { + false => PIN31_A::NOT_LATCHED, + true => PIN31_A::LATCHED, + } + } + #[doc = "Checks if the value of the field is `NOT_LATCHED`"] + #[inline(always)] + pub fn is_not_latched(&self) -> bool { + *self == PIN31_A::NOT_LATCHED + } + #[doc = "Checks if the value of the field is `LATCHED`"] + #[inline(always)] + pub fn is_latched(&self) -> bool { + *self == PIN31_A::LATCHED + } +} +#[doc = "Field `PIN31` writer - Status on whether PIN31 has met criteria set in PIN_CNF31.SENSE register. Write '1' to clear."] +pub type PIN31_W<'a, const O: u8> = crate::BitWriter<'a, u32, LATCH_SPEC, PIN31_A, O>; +impl<'a, const O: u8> PIN31_W<'a, O> { + #[doc = "Criteria has not been met"] + #[inline(always)] + pub fn not_latched(self) -> &'a mut W { + self.variant(PIN31_A::NOT_LATCHED) + } + #[doc = "Criteria has been met"] + #[inline(always)] + pub fn latched(self) -> &'a mut W { + self.variant(PIN31_A::LATCHED) + } +} +impl R { + #[doc = "Bit 0 - Status on whether PIN0 has met criteria set in PIN_CNF0.SENSE register. Write '1' to clear."] + #[inline(always)] + pub fn pin0(&self) -> PIN0_R { + PIN0_R::new((self.bits & 1) != 0) + } + #[doc = "Bit 1 - Status on whether PIN1 has met criteria set in PIN_CNF1.SENSE register. Write '1' to clear."] + #[inline(always)] + pub fn pin1(&self) -> PIN1_R { + PIN1_R::new(((self.bits >> 1) & 1) != 0) + } + #[doc = "Bit 2 - Status on whether PIN2 has met criteria set in PIN_CNF2.SENSE register. Write '1' to clear."] + #[inline(always)] + pub fn pin2(&self) -> PIN2_R { + PIN2_R::new(((self.bits >> 2) & 1) != 0) + } + #[doc = "Bit 3 - Status on whether PIN3 has met criteria set in PIN_CNF3.SENSE register. Write '1' to clear."] + #[inline(always)] + pub fn pin3(&self) -> PIN3_R { + PIN3_R::new(((self.bits >> 3) & 1) != 0) + } + #[doc = "Bit 4 - Status on whether PIN4 has met criteria set in PIN_CNF4.SENSE register. Write '1' to clear."] + #[inline(always)] + pub fn pin4(&self) -> PIN4_R { + PIN4_R::new(((self.bits >> 4) & 1) != 0) + } + #[doc = "Bit 5 - Status on whether PIN5 has met criteria set in PIN_CNF5.SENSE register. Write '1' to clear."] + #[inline(always)] + pub fn pin5(&self) -> PIN5_R { + PIN5_R::new(((self.bits >> 5) & 1) != 0) + } + #[doc = "Bit 6 - Status on whether PIN6 has met criteria set in PIN_CNF6.SENSE register. Write '1' to clear."] + #[inline(always)] + pub fn pin6(&self) -> PIN6_R { + PIN6_R::new(((self.bits >> 6) & 1) != 0) + } + #[doc = "Bit 7 - Status on whether PIN7 has met criteria set in PIN_CNF7.SENSE register. Write '1' to clear."] + #[inline(always)] + pub fn pin7(&self) -> PIN7_R { + PIN7_R::new(((self.bits >> 7) & 1) != 0) + } + #[doc = "Bit 8 - Status on whether PIN8 has met criteria set in PIN_CNF8.SENSE register. Write '1' to clear."] + #[inline(always)] + pub fn pin8(&self) -> PIN8_R { + PIN8_R::new(((self.bits >> 8) & 1) != 0) + } + #[doc = "Bit 9 - Status on whether PIN9 has met criteria set in PIN_CNF9.SENSE register. Write '1' to clear."] + #[inline(always)] + pub fn pin9(&self) -> PIN9_R { + PIN9_R::new(((self.bits >> 9) & 1) != 0) + } + #[doc = "Bit 10 - Status on whether PIN10 has met criteria set in PIN_CNF10.SENSE register. Write '1' to clear."] + #[inline(always)] + pub fn pin10(&self) -> PIN10_R { + PIN10_R::new(((self.bits >> 10) & 1) != 0) + } + #[doc = "Bit 11 - Status on whether PIN11 has met criteria set in PIN_CNF11.SENSE register. Write '1' to clear."] + #[inline(always)] + pub fn pin11(&self) -> PIN11_R { + PIN11_R::new(((self.bits >> 11) & 1) != 0) + } + #[doc = "Bit 12 - Status on whether PIN12 has met criteria set in PIN_CNF12.SENSE register. Write '1' to clear."] + #[inline(always)] + pub fn pin12(&self) -> PIN12_R { + PIN12_R::new(((self.bits >> 12) & 1) != 0) + } + #[doc = "Bit 13 - Status on whether PIN13 has met criteria set in PIN_CNF13.SENSE register. Write '1' to clear."] + #[inline(always)] + pub fn pin13(&self) -> PIN13_R { + PIN13_R::new(((self.bits >> 13) & 1) != 0) + } + #[doc = "Bit 14 - Status on whether PIN14 has met criteria set in PIN_CNF14.SENSE register. Write '1' to clear."] + #[inline(always)] + pub fn pin14(&self) -> PIN14_R { + PIN14_R::new(((self.bits >> 14) & 1) != 0) + } + #[doc = "Bit 15 - Status on whether PIN15 has met criteria set in PIN_CNF15.SENSE register. Write '1' to clear."] + #[inline(always)] + pub fn pin15(&self) -> PIN15_R { + PIN15_R::new(((self.bits >> 15) & 1) != 0) + } + #[doc = "Bit 16 - Status on whether PIN16 has met criteria set in PIN_CNF16.SENSE register. Write '1' to clear."] + #[inline(always)] + pub fn pin16(&self) -> PIN16_R { + PIN16_R::new(((self.bits >> 16) & 1) != 0) + } + #[doc = "Bit 17 - Status on whether PIN17 has met criteria set in PIN_CNF17.SENSE register. Write '1' to clear."] + #[inline(always)] + pub fn pin17(&self) -> PIN17_R { + PIN17_R::new(((self.bits >> 17) & 1) != 0) + } + #[doc = "Bit 18 - Status on whether PIN18 has met criteria set in PIN_CNF18.SENSE register. Write '1' to clear."] + #[inline(always)] + pub fn pin18(&self) -> PIN18_R { + PIN18_R::new(((self.bits >> 18) & 1) != 0) + } + #[doc = "Bit 19 - Status on whether PIN19 has met criteria set in PIN_CNF19.SENSE register. Write '1' to clear."] + #[inline(always)] + pub fn pin19(&self) -> PIN19_R { + PIN19_R::new(((self.bits >> 19) & 1) != 0) + } + #[doc = "Bit 20 - Status on whether PIN20 has met criteria set in PIN_CNF20.SENSE register. Write '1' to clear."] + #[inline(always)] + pub fn pin20(&self) -> PIN20_R { + PIN20_R::new(((self.bits >> 20) & 1) != 0) + } + #[doc = "Bit 21 - Status on whether PIN21 has met criteria set in PIN_CNF21.SENSE register. Write '1' to clear."] + #[inline(always)] + pub fn pin21(&self) -> PIN21_R { + PIN21_R::new(((self.bits >> 21) & 1) != 0) + } + #[doc = "Bit 22 - Status on whether PIN22 has met criteria set in PIN_CNF22.SENSE register. Write '1' to clear."] + #[inline(always)] + pub fn pin22(&self) -> PIN22_R { + PIN22_R::new(((self.bits >> 22) & 1) != 0) + } + #[doc = "Bit 23 - Status on whether PIN23 has met criteria set in PIN_CNF23.SENSE register. Write '1' to clear."] + #[inline(always)] + pub fn pin23(&self) -> PIN23_R { + PIN23_R::new(((self.bits >> 23) & 1) != 0) + } + #[doc = "Bit 24 - Status on whether PIN24 has met criteria set in PIN_CNF24.SENSE register. Write '1' to clear."] + #[inline(always)] + pub fn pin24(&self) -> PIN24_R { + PIN24_R::new(((self.bits >> 24) & 1) != 0) + } + #[doc = "Bit 25 - Status on whether PIN25 has met criteria set in PIN_CNF25.SENSE register. Write '1' to clear."] + #[inline(always)] + pub fn pin25(&self) -> PIN25_R { + PIN25_R::new(((self.bits >> 25) & 1) != 0) + } + #[doc = "Bit 26 - Status on whether PIN26 has met criteria set in PIN_CNF26.SENSE register. Write '1' to clear."] + #[inline(always)] + pub fn pin26(&self) -> PIN26_R { + PIN26_R::new(((self.bits >> 26) & 1) != 0) + } + #[doc = "Bit 27 - Status on whether PIN27 has met criteria set in PIN_CNF27.SENSE register. Write '1' to clear."] + #[inline(always)] + pub fn pin27(&self) -> PIN27_R { + PIN27_R::new(((self.bits >> 27) & 1) != 0) + } + #[doc = "Bit 28 - Status on whether PIN28 has met criteria set in PIN_CNF28.SENSE register. Write '1' to clear."] + #[inline(always)] + pub fn pin28(&self) -> PIN28_R { + PIN28_R::new(((self.bits >> 28) & 1) != 0) + } + #[doc = "Bit 29 - Status on whether PIN29 has met criteria set in PIN_CNF29.SENSE register. Write '1' to clear."] + #[inline(always)] + pub fn pin29(&self) -> PIN29_R { + PIN29_R::new(((self.bits >> 29) & 1) != 0) + } + #[doc = "Bit 30 - Status on whether PIN30 has met criteria set in PIN_CNF30.SENSE register. Write '1' to clear."] + #[inline(always)] + pub fn pin30(&self) -> PIN30_R { + PIN30_R::new(((self.bits >> 30) & 1) != 0) + } + #[doc = "Bit 31 - Status on whether PIN31 has met criteria set in PIN_CNF31.SENSE register. Write '1' to clear."] + #[inline(always)] + pub fn pin31(&self) -> PIN31_R { + PIN31_R::new(((self.bits >> 31) & 1) != 0) + } +} +impl W { + #[doc = "Bit 0 - Status on whether PIN0 has met criteria set in PIN_CNF0.SENSE register. Write '1' to clear."] + #[inline(always)] + #[must_use] + pub fn pin0(&mut self) -> PIN0_W<0> { + PIN0_W::new(self) + } + #[doc = "Bit 1 - Status on whether PIN1 has met criteria set in PIN_CNF1.SENSE register. Write '1' to clear."] + #[inline(always)] + #[must_use] + pub fn pin1(&mut self) -> PIN1_W<1> { + PIN1_W::new(self) + } + #[doc = "Bit 2 - Status on whether PIN2 has met criteria set in PIN_CNF2.SENSE register. Write '1' to clear."] + #[inline(always)] + #[must_use] + pub fn pin2(&mut self) -> PIN2_W<2> { + PIN2_W::new(self) + } + #[doc = "Bit 3 - Status on whether PIN3 has met criteria set in PIN_CNF3.SENSE register. Write '1' to clear."] + #[inline(always)] + #[must_use] + pub fn pin3(&mut self) -> PIN3_W<3> { + PIN3_W::new(self) + } + #[doc = "Bit 4 - Status on whether PIN4 has met criteria set in PIN_CNF4.SENSE register. Write '1' to clear."] + #[inline(always)] + #[must_use] + pub fn pin4(&mut self) -> PIN4_W<4> { + PIN4_W::new(self) + } + #[doc = "Bit 5 - Status on whether PIN5 has met criteria set in PIN_CNF5.SENSE register. Write '1' to clear."] + #[inline(always)] + #[must_use] + pub fn pin5(&mut self) -> PIN5_W<5> { + PIN5_W::new(self) + } + #[doc = "Bit 6 - Status on whether PIN6 has met criteria set in PIN_CNF6.SENSE register. Write '1' to clear."] + #[inline(always)] + #[must_use] + pub fn pin6(&mut self) -> PIN6_W<6> { + PIN6_W::new(self) + } + #[doc = "Bit 7 - Status on whether PIN7 has met criteria set in PIN_CNF7.SENSE register. Write '1' to clear."] + #[inline(always)] + #[must_use] + pub fn pin7(&mut self) -> PIN7_W<7> { + PIN7_W::new(self) + } + #[doc = "Bit 8 - Status on whether PIN8 has met criteria set in PIN_CNF8.SENSE register. Write '1' to clear."] + #[inline(always)] + #[must_use] + pub fn pin8(&mut self) -> PIN8_W<8> { + PIN8_W::new(self) + } + #[doc = "Bit 9 - Status on whether PIN9 has met criteria set in PIN_CNF9.SENSE register. Write '1' to clear."] + #[inline(always)] + #[must_use] + pub fn pin9(&mut self) -> PIN9_W<9> { + PIN9_W::new(self) + } + #[doc = "Bit 10 - Status on whether PIN10 has met criteria set in PIN_CNF10.SENSE register. Write '1' to clear."] + #[inline(always)] + #[must_use] + pub fn pin10(&mut self) -> PIN10_W<10> { + PIN10_W::new(self) + } + #[doc = "Bit 11 - Status on whether PIN11 has met criteria set in PIN_CNF11.SENSE register. Write '1' to clear."] + #[inline(always)] + #[must_use] + pub fn pin11(&mut self) -> PIN11_W<11> { + PIN11_W::new(self) + } + #[doc = "Bit 12 - Status on whether PIN12 has met criteria set in PIN_CNF12.SENSE register. Write '1' to clear."] + #[inline(always)] + #[must_use] + pub fn pin12(&mut self) -> PIN12_W<12> { + PIN12_W::new(self) + } + #[doc = "Bit 13 - Status on whether PIN13 has met criteria set in PIN_CNF13.SENSE register. Write '1' to clear."] + #[inline(always)] + #[must_use] + pub fn pin13(&mut self) -> PIN13_W<13> { + PIN13_W::new(self) + } + #[doc = "Bit 14 - Status on whether PIN14 has met criteria set in PIN_CNF14.SENSE register. Write '1' to clear."] + #[inline(always)] + #[must_use] + pub fn pin14(&mut self) -> PIN14_W<14> { + PIN14_W::new(self) + } + #[doc = "Bit 15 - Status on whether PIN15 has met criteria set in PIN_CNF15.SENSE register. Write '1' to clear."] + #[inline(always)] + #[must_use] + pub fn pin15(&mut self) -> PIN15_W<15> { + PIN15_W::new(self) + } + #[doc = "Bit 16 - Status on whether PIN16 has met criteria set in PIN_CNF16.SENSE register. Write '1' to clear."] + #[inline(always)] + #[must_use] + pub fn pin16(&mut self) -> PIN16_W<16> { + PIN16_W::new(self) + } + #[doc = "Bit 17 - Status on whether PIN17 has met criteria set in PIN_CNF17.SENSE register. Write '1' to clear."] + #[inline(always)] + #[must_use] + pub fn pin17(&mut self) -> PIN17_W<17> { + PIN17_W::new(self) + } + #[doc = "Bit 18 - Status on whether PIN18 has met criteria set in PIN_CNF18.SENSE register. Write '1' to clear."] + #[inline(always)] + #[must_use] + pub fn pin18(&mut self) -> PIN18_W<18> { + PIN18_W::new(self) + } + #[doc = "Bit 19 - Status on whether PIN19 has met criteria set in PIN_CNF19.SENSE register. Write '1' to clear."] + #[inline(always)] + #[must_use] + pub fn pin19(&mut self) -> PIN19_W<19> { + PIN19_W::new(self) + } + #[doc = "Bit 20 - Status on whether PIN20 has met criteria set in PIN_CNF20.SENSE register. Write '1' to clear."] + #[inline(always)] + #[must_use] + pub fn pin20(&mut self) -> PIN20_W<20> { + PIN20_W::new(self) + } + #[doc = "Bit 21 - Status on whether PIN21 has met criteria set in PIN_CNF21.SENSE register. Write '1' to clear."] + #[inline(always)] + #[must_use] + pub fn pin21(&mut self) -> PIN21_W<21> { + PIN21_W::new(self) + } + #[doc = "Bit 22 - Status on whether PIN22 has met criteria set in PIN_CNF22.SENSE register. Write '1' to clear."] + #[inline(always)] + #[must_use] + pub fn pin22(&mut self) -> PIN22_W<22> { + PIN22_W::new(self) + } + #[doc = "Bit 23 - Status on whether PIN23 has met criteria set in PIN_CNF23.SENSE register. Write '1' to clear."] + #[inline(always)] + #[must_use] + pub fn pin23(&mut self) -> PIN23_W<23> { + PIN23_W::new(self) + } + #[doc = "Bit 24 - Status on whether PIN24 has met criteria set in PIN_CNF24.SENSE register. Write '1' to clear."] + #[inline(always)] + #[must_use] + pub fn pin24(&mut self) -> PIN24_W<24> { + PIN24_W::new(self) + } + #[doc = "Bit 25 - Status on whether PIN25 has met criteria set in PIN_CNF25.SENSE register. Write '1' to clear."] + #[inline(always)] + #[must_use] + pub fn pin25(&mut self) -> PIN25_W<25> { + PIN25_W::new(self) + } + #[doc = "Bit 26 - Status on whether PIN26 has met criteria set in PIN_CNF26.SENSE register. Write '1' to clear."] + #[inline(always)] + #[must_use] + pub fn pin26(&mut self) -> PIN26_W<26> { + PIN26_W::new(self) + } + #[doc = "Bit 27 - Status on whether PIN27 has met criteria set in PIN_CNF27.SENSE register. Write '1' to clear."] + #[inline(always)] + #[must_use] + pub fn pin27(&mut self) -> PIN27_W<27> { + PIN27_W::new(self) + } + #[doc = "Bit 28 - Status on whether PIN28 has met criteria set in PIN_CNF28.SENSE register. Write '1' to clear."] + #[inline(always)] + #[must_use] + pub fn pin28(&mut self) -> PIN28_W<28> { + PIN28_W::new(self) + } + #[doc = "Bit 29 - Status on whether PIN29 has met criteria set in PIN_CNF29.SENSE register. Write '1' to clear."] + #[inline(always)] + #[must_use] + pub fn pin29(&mut self) -> PIN29_W<29> { + PIN29_W::new(self) + } + #[doc = "Bit 30 - Status on whether PIN30 has met criteria set in PIN_CNF30.SENSE register. Write '1' to clear."] + #[inline(always)] + #[must_use] + pub fn pin30(&mut self) -> PIN30_W<30> { + PIN30_W::new(self) + } + #[doc = "Bit 31 - Status on whether PIN31 has met criteria set in PIN_CNF31.SENSE register. Write '1' to clear."] + #[inline(always)] + #[must_use] + pub fn pin31(&mut self) -> PIN31_W<31> { + PIN31_W::new(self) + } + #[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 = "Latch register indicating what GPIO pins that have met the criteria set in the PIN_CNF\\[n\\].SENSE registers\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 [latch](index.html) module"] +pub struct LATCH_SPEC; +impl crate::RegisterSpec for LATCH_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [latch::R](R) reader structure"] +impl crate::Readable for LATCH_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [latch::W](W) writer structure"] +impl crate::Writable for LATCH_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets LATCH to value 0"] +impl crate::Resettable for LATCH_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/p0/out.rs b/down-the-stack/dk_pac/src/p0/out.rs new file mode 100644 index 0000000..004f8db --- /dev/null +++ b/down-the-stack/dk_pac/src/p0/out.rs @@ -0,0 +1,2017 @@ +#[doc = "Register `OUT` 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 `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 `PIN0` reader - Pin 0"] +pub type PIN0_R = crate::BitReader; +#[doc = "Pin 0\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PIN0_A { + #[doc = "0: Pin driver is low"] + LOW = 0, + #[doc = "1: Pin driver is high"] + HIGH = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PIN0_A) -> Self { + variant as u8 != 0 + } +} +impl PIN0_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> PIN0_A { + match self.bits { + false => PIN0_A::LOW, + true => PIN0_A::HIGH, + } + } + #[doc = "Checks if the value of the field is `LOW`"] + #[inline(always)] + pub fn is_low(&self) -> bool { + *self == PIN0_A::LOW + } + #[doc = "Checks if the value of the field is `HIGH`"] + #[inline(always)] + pub fn is_high(&self) -> bool { + *self == PIN0_A::HIGH + } +} +#[doc = "Field `PIN0` writer - Pin 0"] +pub type PIN0_W<'a, const O: u8> = crate::BitWriter<'a, u32, OUT_SPEC, PIN0_A, O>; +impl<'a, const O: u8> PIN0_W<'a, O> { + #[doc = "Pin driver is low"] + #[inline(always)] + pub fn low(self) -> &'a mut W { + self.variant(PIN0_A::LOW) + } + #[doc = "Pin driver is high"] + #[inline(always)] + pub fn high(self) -> &'a mut W { + self.variant(PIN0_A::HIGH) + } +} +#[doc = "Field `PIN1` reader - Pin 1"] +pub type PIN1_R = crate::BitReader; +#[doc = "Pin 1\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PIN1_A { + #[doc = "0: Pin driver is low"] + LOW = 0, + #[doc = "1: Pin driver is high"] + HIGH = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PIN1_A) -> Self { + variant as u8 != 0 + } +} +impl PIN1_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> PIN1_A { + match self.bits { + false => PIN1_A::LOW, + true => PIN1_A::HIGH, + } + } + #[doc = "Checks if the value of the field is `LOW`"] + #[inline(always)] + pub fn is_low(&self) -> bool { + *self == PIN1_A::LOW + } + #[doc = "Checks if the value of the field is `HIGH`"] + #[inline(always)] + pub fn is_high(&self) -> bool { + *self == PIN1_A::HIGH + } +} +#[doc = "Field `PIN1` writer - Pin 1"] +pub type PIN1_W<'a, const O: u8> = crate::BitWriter<'a, u32, OUT_SPEC, PIN1_A, O>; +impl<'a, const O: u8> PIN1_W<'a, O> { + #[doc = "Pin driver is low"] + #[inline(always)] + pub fn low(self) -> &'a mut W { + self.variant(PIN1_A::LOW) + } + #[doc = "Pin driver is high"] + #[inline(always)] + pub fn high(self) -> &'a mut W { + self.variant(PIN1_A::HIGH) + } +} +#[doc = "Field `PIN2` reader - Pin 2"] +pub type PIN2_R = crate::BitReader; +#[doc = "Pin 2\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PIN2_A { + #[doc = "0: Pin driver is low"] + LOW = 0, + #[doc = "1: Pin driver is high"] + HIGH = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PIN2_A) -> Self { + variant as u8 != 0 + } +} +impl PIN2_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> PIN2_A { + match self.bits { + false => PIN2_A::LOW, + true => PIN2_A::HIGH, + } + } + #[doc = "Checks if the value of the field is `LOW`"] + #[inline(always)] + pub fn is_low(&self) -> bool { + *self == PIN2_A::LOW + } + #[doc = "Checks if the value of the field is `HIGH`"] + #[inline(always)] + pub fn is_high(&self) -> bool { + *self == PIN2_A::HIGH + } +} +#[doc = "Field `PIN2` writer - Pin 2"] +pub type PIN2_W<'a, const O: u8> = crate::BitWriter<'a, u32, OUT_SPEC, PIN2_A, O>; +impl<'a, const O: u8> PIN2_W<'a, O> { + #[doc = "Pin driver is low"] + #[inline(always)] + pub fn low(self) -> &'a mut W { + self.variant(PIN2_A::LOW) + } + #[doc = "Pin driver is high"] + #[inline(always)] + pub fn high(self) -> &'a mut W { + self.variant(PIN2_A::HIGH) + } +} +#[doc = "Field `PIN3` reader - Pin 3"] +pub type PIN3_R = crate::BitReader; +#[doc = "Pin 3\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PIN3_A { + #[doc = "0: Pin driver is low"] + LOW = 0, + #[doc = "1: Pin driver is high"] + HIGH = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PIN3_A) -> Self { + variant as u8 != 0 + } +} +impl PIN3_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> PIN3_A { + match self.bits { + false => PIN3_A::LOW, + true => PIN3_A::HIGH, + } + } + #[doc = "Checks if the value of the field is `LOW`"] + #[inline(always)] + pub fn is_low(&self) -> bool { + *self == PIN3_A::LOW + } + #[doc = "Checks if the value of the field is `HIGH`"] + #[inline(always)] + pub fn is_high(&self) -> bool { + *self == PIN3_A::HIGH + } +} +#[doc = "Field `PIN3` writer - Pin 3"] +pub type PIN3_W<'a, const O: u8> = crate::BitWriter<'a, u32, OUT_SPEC, PIN3_A, O>; +impl<'a, const O: u8> PIN3_W<'a, O> { + #[doc = "Pin driver is low"] + #[inline(always)] + pub fn low(self) -> &'a mut W { + self.variant(PIN3_A::LOW) + } + #[doc = "Pin driver is high"] + #[inline(always)] + pub fn high(self) -> &'a mut W { + self.variant(PIN3_A::HIGH) + } +} +#[doc = "Field `PIN4` reader - Pin 4"] +pub type PIN4_R = crate::BitReader; +#[doc = "Pin 4\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PIN4_A { + #[doc = "0: Pin driver is low"] + LOW = 0, + #[doc = "1: Pin driver is high"] + HIGH = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PIN4_A) -> Self { + variant as u8 != 0 + } +} +impl PIN4_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> PIN4_A { + match self.bits { + false => PIN4_A::LOW, + true => PIN4_A::HIGH, + } + } + #[doc = "Checks if the value of the field is `LOW`"] + #[inline(always)] + pub fn is_low(&self) -> bool { + *self == PIN4_A::LOW + } + #[doc = "Checks if the value of the field is `HIGH`"] + #[inline(always)] + pub fn is_high(&self) -> bool { + *self == PIN4_A::HIGH + } +} +#[doc = "Field `PIN4` writer - Pin 4"] +pub type PIN4_W<'a, const O: u8> = crate::BitWriter<'a, u32, OUT_SPEC, PIN4_A, O>; +impl<'a, const O: u8> PIN4_W<'a, O> { + #[doc = "Pin driver is low"] + #[inline(always)] + pub fn low(self) -> &'a mut W { + self.variant(PIN4_A::LOW) + } + #[doc = "Pin driver is high"] + #[inline(always)] + pub fn high(self) -> &'a mut W { + self.variant(PIN4_A::HIGH) + } +} +#[doc = "Field `PIN5` reader - Pin 5"] +pub type PIN5_R = crate::BitReader; +#[doc = "Pin 5\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PIN5_A { + #[doc = "0: Pin driver is low"] + LOW = 0, + #[doc = "1: Pin driver is high"] + HIGH = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PIN5_A) -> Self { + variant as u8 != 0 + } +} +impl PIN5_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> PIN5_A { + match self.bits { + false => PIN5_A::LOW, + true => PIN5_A::HIGH, + } + } + #[doc = "Checks if the value of the field is `LOW`"] + #[inline(always)] + pub fn is_low(&self) -> bool { + *self == PIN5_A::LOW + } + #[doc = "Checks if the value of the field is `HIGH`"] + #[inline(always)] + pub fn is_high(&self) -> bool { + *self == PIN5_A::HIGH + } +} +#[doc = "Field `PIN5` writer - Pin 5"] +pub type PIN5_W<'a, const O: u8> = crate::BitWriter<'a, u32, OUT_SPEC, PIN5_A, O>; +impl<'a, const O: u8> PIN5_W<'a, O> { + #[doc = "Pin driver is low"] + #[inline(always)] + pub fn low(self) -> &'a mut W { + self.variant(PIN5_A::LOW) + } + #[doc = "Pin driver is high"] + #[inline(always)] + pub fn high(self) -> &'a mut W { + self.variant(PIN5_A::HIGH) + } +} +#[doc = "Field `PIN6` reader - Pin 6"] +pub type PIN6_R = crate::BitReader; +#[doc = "Pin 6\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PIN6_A { + #[doc = "0: Pin driver is low"] + LOW = 0, + #[doc = "1: Pin driver is high"] + HIGH = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PIN6_A) -> Self { + variant as u8 != 0 + } +} +impl PIN6_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> PIN6_A { + match self.bits { + false => PIN6_A::LOW, + true => PIN6_A::HIGH, + } + } + #[doc = "Checks if the value of the field is `LOW`"] + #[inline(always)] + pub fn is_low(&self) -> bool { + *self == PIN6_A::LOW + } + #[doc = "Checks if the value of the field is `HIGH`"] + #[inline(always)] + pub fn is_high(&self) -> bool { + *self == PIN6_A::HIGH + } +} +#[doc = "Field `PIN6` writer - Pin 6"] +pub type PIN6_W<'a, const O: u8> = crate::BitWriter<'a, u32, OUT_SPEC, PIN6_A, O>; +impl<'a, const O: u8> PIN6_W<'a, O> { + #[doc = "Pin driver is low"] + #[inline(always)] + pub fn low(self) -> &'a mut W { + self.variant(PIN6_A::LOW) + } + #[doc = "Pin driver is high"] + #[inline(always)] + pub fn high(self) -> &'a mut W { + self.variant(PIN6_A::HIGH) + } +} +#[doc = "Field `PIN7` reader - Pin 7"] +pub type PIN7_R = crate::BitReader; +#[doc = "Pin 7\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PIN7_A { + #[doc = "0: Pin driver is low"] + LOW = 0, + #[doc = "1: Pin driver is high"] + HIGH = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PIN7_A) -> Self { + variant as u8 != 0 + } +} +impl PIN7_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> PIN7_A { + match self.bits { + false => PIN7_A::LOW, + true => PIN7_A::HIGH, + } + } + #[doc = "Checks if the value of the field is `LOW`"] + #[inline(always)] + pub fn is_low(&self) -> bool { + *self == PIN7_A::LOW + } + #[doc = "Checks if the value of the field is `HIGH`"] + #[inline(always)] + pub fn is_high(&self) -> bool { + *self == PIN7_A::HIGH + } +} +#[doc = "Field `PIN7` writer - Pin 7"] +pub type PIN7_W<'a, const O: u8> = crate::BitWriter<'a, u32, OUT_SPEC, PIN7_A, O>; +impl<'a, const O: u8> PIN7_W<'a, O> { + #[doc = "Pin driver is low"] + #[inline(always)] + pub fn low(self) -> &'a mut W { + self.variant(PIN7_A::LOW) + } + #[doc = "Pin driver is high"] + #[inline(always)] + pub fn high(self) -> &'a mut W { + self.variant(PIN7_A::HIGH) + } +} +#[doc = "Field `PIN8` reader - Pin 8"] +pub type PIN8_R = crate::BitReader; +#[doc = "Pin 8\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PIN8_A { + #[doc = "0: Pin driver is low"] + LOW = 0, + #[doc = "1: Pin driver is high"] + HIGH = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PIN8_A) -> Self { + variant as u8 != 0 + } +} +impl PIN8_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> PIN8_A { + match self.bits { + false => PIN8_A::LOW, + true => PIN8_A::HIGH, + } + } + #[doc = "Checks if the value of the field is `LOW`"] + #[inline(always)] + pub fn is_low(&self) -> bool { + *self == PIN8_A::LOW + } + #[doc = "Checks if the value of the field is `HIGH`"] + #[inline(always)] + pub fn is_high(&self) -> bool { + *self == PIN8_A::HIGH + } +} +#[doc = "Field `PIN8` writer - Pin 8"] +pub type PIN8_W<'a, const O: u8> = crate::BitWriter<'a, u32, OUT_SPEC, PIN8_A, O>; +impl<'a, const O: u8> PIN8_W<'a, O> { + #[doc = "Pin driver is low"] + #[inline(always)] + pub fn low(self) -> &'a mut W { + self.variant(PIN8_A::LOW) + } + #[doc = "Pin driver is high"] + #[inline(always)] + pub fn high(self) -> &'a mut W { + self.variant(PIN8_A::HIGH) + } +} +#[doc = "Field `PIN9` reader - Pin 9"] +pub type PIN9_R = crate::BitReader; +#[doc = "Pin 9\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PIN9_A { + #[doc = "0: Pin driver is low"] + LOW = 0, + #[doc = "1: Pin driver is high"] + HIGH = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PIN9_A) -> Self { + variant as u8 != 0 + } +} +impl PIN9_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> PIN9_A { + match self.bits { + false => PIN9_A::LOW, + true => PIN9_A::HIGH, + } + } + #[doc = "Checks if the value of the field is `LOW`"] + #[inline(always)] + pub fn is_low(&self) -> bool { + *self == PIN9_A::LOW + } + #[doc = "Checks if the value of the field is `HIGH`"] + #[inline(always)] + pub fn is_high(&self) -> bool { + *self == PIN9_A::HIGH + } +} +#[doc = "Field `PIN9` writer - Pin 9"] +pub type PIN9_W<'a, const O: u8> = crate::BitWriter<'a, u32, OUT_SPEC, PIN9_A, O>; +impl<'a, const O: u8> PIN9_W<'a, O> { + #[doc = "Pin driver is low"] + #[inline(always)] + pub fn low(self) -> &'a mut W { + self.variant(PIN9_A::LOW) + } + #[doc = "Pin driver is high"] + #[inline(always)] + pub fn high(self) -> &'a mut W { + self.variant(PIN9_A::HIGH) + } +} +#[doc = "Field `PIN10` reader - Pin 10"] +pub type PIN10_R = crate::BitReader; +#[doc = "Pin 10\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PIN10_A { + #[doc = "0: Pin driver is low"] + LOW = 0, + #[doc = "1: Pin driver is high"] + HIGH = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PIN10_A) -> Self { + variant as u8 != 0 + } +} +impl PIN10_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> PIN10_A { + match self.bits { + false => PIN10_A::LOW, + true => PIN10_A::HIGH, + } + } + #[doc = "Checks if the value of the field is `LOW`"] + #[inline(always)] + pub fn is_low(&self) -> bool { + *self == PIN10_A::LOW + } + #[doc = "Checks if the value of the field is `HIGH`"] + #[inline(always)] + pub fn is_high(&self) -> bool { + *self == PIN10_A::HIGH + } +} +#[doc = "Field `PIN10` writer - Pin 10"] +pub type PIN10_W<'a, const O: u8> = crate::BitWriter<'a, u32, OUT_SPEC, PIN10_A, O>; +impl<'a, const O: u8> PIN10_W<'a, O> { + #[doc = "Pin driver is low"] + #[inline(always)] + pub fn low(self) -> &'a mut W { + self.variant(PIN10_A::LOW) + } + #[doc = "Pin driver is high"] + #[inline(always)] + pub fn high(self) -> &'a mut W { + self.variant(PIN10_A::HIGH) + } +} +#[doc = "Field `PIN11` reader - Pin 11"] +pub type PIN11_R = crate::BitReader; +#[doc = "Pin 11\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PIN11_A { + #[doc = "0: Pin driver is low"] + LOW = 0, + #[doc = "1: Pin driver is high"] + HIGH = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PIN11_A) -> Self { + variant as u8 != 0 + } +} +impl PIN11_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> PIN11_A { + match self.bits { + false => PIN11_A::LOW, + true => PIN11_A::HIGH, + } + } + #[doc = "Checks if the value of the field is `LOW`"] + #[inline(always)] + pub fn is_low(&self) -> bool { + *self == PIN11_A::LOW + } + #[doc = "Checks if the value of the field is `HIGH`"] + #[inline(always)] + pub fn is_high(&self) -> bool { + *self == PIN11_A::HIGH + } +} +#[doc = "Field `PIN11` writer - Pin 11"] +pub type PIN11_W<'a, const O: u8> = crate::BitWriter<'a, u32, OUT_SPEC, PIN11_A, O>; +impl<'a, const O: u8> PIN11_W<'a, O> { + #[doc = "Pin driver is low"] + #[inline(always)] + pub fn low(self) -> &'a mut W { + self.variant(PIN11_A::LOW) + } + #[doc = "Pin driver is high"] + #[inline(always)] + pub fn high(self) -> &'a mut W { + self.variant(PIN11_A::HIGH) + } +} +#[doc = "Field `PIN12` reader - Pin 12"] +pub type PIN12_R = crate::BitReader; +#[doc = "Pin 12\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PIN12_A { + #[doc = "0: Pin driver is low"] + LOW = 0, + #[doc = "1: Pin driver is high"] + HIGH = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PIN12_A) -> Self { + variant as u8 != 0 + } +} +impl PIN12_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> PIN12_A { + match self.bits { + false => PIN12_A::LOW, + true => PIN12_A::HIGH, + } + } + #[doc = "Checks if the value of the field is `LOW`"] + #[inline(always)] + pub fn is_low(&self) -> bool { + *self == PIN12_A::LOW + } + #[doc = "Checks if the value of the field is `HIGH`"] + #[inline(always)] + pub fn is_high(&self) -> bool { + *self == PIN12_A::HIGH + } +} +#[doc = "Field `PIN12` writer - Pin 12"] +pub type PIN12_W<'a, const O: u8> = crate::BitWriter<'a, u32, OUT_SPEC, PIN12_A, O>; +impl<'a, const O: u8> PIN12_W<'a, O> { + #[doc = "Pin driver is low"] + #[inline(always)] + pub fn low(self) -> &'a mut W { + self.variant(PIN12_A::LOW) + } + #[doc = "Pin driver is high"] + #[inline(always)] + pub fn high(self) -> &'a mut W { + self.variant(PIN12_A::HIGH) + } +} +#[doc = "Field `PIN13` reader - Pin 13"] +pub type PIN13_R = crate::BitReader; +#[doc = "Pin 13\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PIN13_A { + #[doc = "0: Pin driver is low"] + LOW = 0, + #[doc = "1: Pin driver is high"] + HIGH = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PIN13_A) -> Self { + variant as u8 != 0 + } +} +impl PIN13_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> PIN13_A { + match self.bits { + false => PIN13_A::LOW, + true => PIN13_A::HIGH, + } + } + #[doc = "Checks if the value of the field is `LOW`"] + #[inline(always)] + pub fn is_low(&self) -> bool { + *self == PIN13_A::LOW + } + #[doc = "Checks if the value of the field is `HIGH`"] + #[inline(always)] + pub fn is_high(&self) -> bool { + *self == PIN13_A::HIGH + } +} +#[doc = "Field `PIN13` writer - Pin 13"] +pub type PIN13_W<'a, const O: u8> = crate::BitWriter<'a, u32, OUT_SPEC, PIN13_A, O>; +impl<'a, const O: u8> PIN13_W<'a, O> { + #[doc = "Pin driver is low"] + #[inline(always)] + pub fn low(self) -> &'a mut W { + self.variant(PIN13_A::LOW) + } + #[doc = "Pin driver is high"] + #[inline(always)] + pub fn high(self) -> &'a mut W { + self.variant(PIN13_A::HIGH) + } +} +#[doc = "Field `PIN14` reader - Pin 14"] +pub type PIN14_R = crate::BitReader; +#[doc = "Pin 14\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PIN14_A { + #[doc = "0: Pin driver is low"] + LOW = 0, + #[doc = "1: Pin driver is high"] + HIGH = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PIN14_A) -> Self { + variant as u8 != 0 + } +} +impl PIN14_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> PIN14_A { + match self.bits { + false => PIN14_A::LOW, + true => PIN14_A::HIGH, + } + } + #[doc = "Checks if the value of the field is `LOW`"] + #[inline(always)] + pub fn is_low(&self) -> bool { + *self == PIN14_A::LOW + } + #[doc = "Checks if the value of the field is `HIGH`"] + #[inline(always)] + pub fn is_high(&self) -> bool { + *self == PIN14_A::HIGH + } +} +#[doc = "Field `PIN14` writer - Pin 14"] +pub type PIN14_W<'a, const O: u8> = crate::BitWriter<'a, u32, OUT_SPEC, PIN14_A, O>; +impl<'a, const O: u8> PIN14_W<'a, O> { + #[doc = "Pin driver is low"] + #[inline(always)] + pub fn low(self) -> &'a mut W { + self.variant(PIN14_A::LOW) + } + #[doc = "Pin driver is high"] + #[inline(always)] + pub fn high(self) -> &'a mut W { + self.variant(PIN14_A::HIGH) + } +} +#[doc = "Field `PIN15` reader - Pin 15"] +pub type PIN15_R = crate::BitReader; +#[doc = "Pin 15\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PIN15_A { + #[doc = "0: Pin driver is low"] + LOW = 0, + #[doc = "1: Pin driver is high"] + HIGH = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PIN15_A) -> Self { + variant as u8 != 0 + } +} +impl PIN15_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> PIN15_A { + match self.bits { + false => PIN15_A::LOW, + true => PIN15_A::HIGH, + } + } + #[doc = "Checks if the value of the field is `LOW`"] + #[inline(always)] + pub fn is_low(&self) -> bool { + *self == PIN15_A::LOW + } + #[doc = "Checks if the value of the field is `HIGH`"] + #[inline(always)] + pub fn is_high(&self) -> bool { + *self == PIN15_A::HIGH + } +} +#[doc = "Field `PIN15` writer - Pin 15"] +pub type PIN15_W<'a, const O: u8> = crate::BitWriter<'a, u32, OUT_SPEC, PIN15_A, O>; +impl<'a, const O: u8> PIN15_W<'a, O> { + #[doc = "Pin driver is low"] + #[inline(always)] + pub fn low(self) -> &'a mut W { + self.variant(PIN15_A::LOW) + } + #[doc = "Pin driver is high"] + #[inline(always)] + pub fn high(self) -> &'a mut W { + self.variant(PIN15_A::HIGH) + } +} +#[doc = "Field `PIN16` reader - Pin 16"] +pub type PIN16_R = crate::BitReader; +#[doc = "Pin 16\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PIN16_A { + #[doc = "0: Pin driver is low"] + LOW = 0, + #[doc = "1: Pin driver is high"] + HIGH = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PIN16_A) -> Self { + variant as u8 != 0 + } +} +impl PIN16_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> PIN16_A { + match self.bits { + false => PIN16_A::LOW, + true => PIN16_A::HIGH, + } + } + #[doc = "Checks if the value of the field is `LOW`"] + #[inline(always)] + pub fn is_low(&self) -> bool { + *self == PIN16_A::LOW + } + #[doc = "Checks if the value of the field is `HIGH`"] + #[inline(always)] + pub fn is_high(&self) -> bool { + *self == PIN16_A::HIGH + } +} +#[doc = "Field `PIN16` writer - Pin 16"] +pub type PIN16_W<'a, const O: u8> = crate::BitWriter<'a, u32, OUT_SPEC, PIN16_A, O>; +impl<'a, const O: u8> PIN16_W<'a, O> { + #[doc = "Pin driver is low"] + #[inline(always)] + pub fn low(self) -> &'a mut W { + self.variant(PIN16_A::LOW) + } + #[doc = "Pin driver is high"] + #[inline(always)] + pub fn high(self) -> &'a mut W { + self.variant(PIN16_A::HIGH) + } +} +#[doc = "Field `PIN17` reader - Pin 17"] +pub type PIN17_R = crate::BitReader; +#[doc = "Pin 17\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PIN17_A { + #[doc = "0: Pin driver is low"] + LOW = 0, + #[doc = "1: Pin driver is high"] + HIGH = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PIN17_A) -> Self { + variant as u8 != 0 + } +} +impl PIN17_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> PIN17_A { + match self.bits { + false => PIN17_A::LOW, + true => PIN17_A::HIGH, + } + } + #[doc = "Checks if the value of the field is `LOW`"] + #[inline(always)] + pub fn is_low(&self) -> bool { + *self == PIN17_A::LOW + } + #[doc = "Checks if the value of the field is `HIGH`"] + #[inline(always)] + pub fn is_high(&self) -> bool { + *self == PIN17_A::HIGH + } +} +#[doc = "Field `PIN17` writer - Pin 17"] +pub type PIN17_W<'a, const O: u8> = crate::BitWriter<'a, u32, OUT_SPEC, PIN17_A, O>; +impl<'a, const O: u8> PIN17_W<'a, O> { + #[doc = "Pin driver is low"] + #[inline(always)] + pub fn low(self) -> &'a mut W { + self.variant(PIN17_A::LOW) + } + #[doc = "Pin driver is high"] + #[inline(always)] + pub fn high(self) -> &'a mut W { + self.variant(PIN17_A::HIGH) + } +} +#[doc = "Field `PIN18` reader - Pin 18"] +pub type PIN18_R = crate::BitReader; +#[doc = "Pin 18\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PIN18_A { + #[doc = "0: Pin driver is low"] + LOW = 0, + #[doc = "1: Pin driver is high"] + HIGH = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PIN18_A) -> Self { + variant as u8 != 0 + } +} +impl PIN18_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> PIN18_A { + match self.bits { + false => PIN18_A::LOW, + true => PIN18_A::HIGH, + } + } + #[doc = "Checks if the value of the field is `LOW`"] + #[inline(always)] + pub fn is_low(&self) -> bool { + *self == PIN18_A::LOW + } + #[doc = "Checks if the value of the field is `HIGH`"] + #[inline(always)] + pub fn is_high(&self) -> bool { + *self == PIN18_A::HIGH + } +} +#[doc = "Field `PIN18` writer - Pin 18"] +pub type PIN18_W<'a, const O: u8> = crate::BitWriter<'a, u32, OUT_SPEC, PIN18_A, O>; +impl<'a, const O: u8> PIN18_W<'a, O> { + #[doc = "Pin driver is low"] + #[inline(always)] + pub fn low(self) -> &'a mut W { + self.variant(PIN18_A::LOW) + } + #[doc = "Pin driver is high"] + #[inline(always)] + pub fn high(self) -> &'a mut W { + self.variant(PIN18_A::HIGH) + } +} +#[doc = "Field `PIN19` reader - Pin 19"] +pub type PIN19_R = crate::BitReader; +#[doc = "Pin 19\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PIN19_A { + #[doc = "0: Pin driver is low"] + LOW = 0, + #[doc = "1: Pin driver is high"] + HIGH = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PIN19_A) -> Self { + variant as u8 != 0 + } +} +impl PIN19_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> PIN19_A { + match self.bits { + false => PIN19_A::LOW, + true => PIN19_A::HIGH, + } + } + #[doc = "Checks if the value of the field is `LOW`"] + #[inline(always)] + pub fn is_low(&self) -> bool { + *self == PIN19_A::LOW + } + #[doc = "Checks if the value of the field is `HIGH`"] + #[inline(always)] + pub fn is_high(&self) -> bool { + *self == PIN19_A::HIGH + } +} +#[doc = "Field `PIN19` writer - Pin 19"] +pub type PIN19_W<'a, const O: u8> = crate::BitWriter<'a, u32, OUT_SPEC, PIN19_A, O>; +impl<'a, const O: u8> PIN19_W<'a, O> { + #[doc = "Pin driver is low"] + #[inline(always)] + pub fn low(self) -> &'a mut W { + self.variant(PIN19_A::LOW) + } + #[doc = "Pin driver is high"] + #[inline(always)] + pub fn high(self) -> &'a mut W { + self.variant(PIN19_A::HIGH) + } +} +#[doc = "Field `PIN20` reader - Pin 20"] +pub type PIN20_R = crate::BitReader; +#[doc = "Pin 20\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PIN20_A { + #[doc = "0: Pin driver is low"] + LOW = 0, + #[doc = "1: Pin driver is high"] + HIGH = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PIN20_A) -> Self { + variant as u8 != 0 + } +} +impl PIN20_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> PIN20_A { + match self.bits { + false => PIN20_A::LOW, + true => PIN20_A::HIGH, + } + } + #[doc = "Checks if the value of the field is `LOW`"] + #[inline(always)] + pub fn is_low(&self) -> bool { + *self == PIN20_A::LOW + } + #[doc = "Checks if the value of the field is `HIGH`"] + #[inline(always)] + pub fn is_high(&self) -> bool { + *self == PIN20_A::HIGH + } +} +#[doc = "Field `PIN20` writer - Pin 20"] +pub type PIN20_W<'a, const O: u8> = crate::BitWriter<'a, u32, OUT_SPEC, PIN20_A, O>; +impl<'a, const O: u8> PIN20_W<'a, O> { + #[doc = "Pin driver is low"] + #[inline(always)] + pub fn low(self) -> &'a mut W { + self.variant(PIN20_A::LOW) + } + #[doc = "Pin driver is high"] + #[inline(always)] + pub fn high(self) -> &'a mut W { + self.variant(PIN20_A::HIGH) + } +} +#[doc = "Field `PIN21` reader - Pin 21"] +pub type PIN21_R = crate::BitReader; +#[doc = "Pin 21\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PIN21_A { + #[doc = "0: Pin driver is low"] + LOW = 0, + #[doc = "1: Pin driver is high"] + HIGH = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PIN21_A) -> Self { + variant as u8 != 0 + } +} +impl PIN21_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> PIN21_A { + match self.bits { + false => PIN21_A::LOW, + true => PIN21_A::HIGH, + } + } + #[doc = "Checks if the value of the field is `LOW`"] + #[inline(always)] + pub fn is_low(&self) -> bool { + *self == PIN21_A::LOW + } + #[doc = "Checks if the value of the field is `HIGH`"] + #[inline(always)] + pub fn is_high(&self) -> bool { + *self == PIN21_A::HIGH + } +} +#[doc = "Field `PIN21` writer - Pin 21"] +pub type PIN21_W<'a, const O: u8> = crate::BitWriter<'a, u32, OUT_SPEC, PIN21_A, O>; +impl<'a, const O: u8> PIN21_W<'a, O> { + #[doc = "Pin driver is low"] + #[inline(always)] + pub fn low(self) -> &'a mut W { + self.variant(PIN21_A::LOW) + } + #[doc = "Pin driver is high"] + #[inline(always)] + pub fn high(self) -> &'a mut W { + self.variant(PIN21_A::HIGH) + } +} +#[doc = "Field `PIN22` reader - Pin 22"] +pub type PIN22_R = crate::BitReader; +#[doc = "Pin 22\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PIN22_A { + #[doc = "0: Pin driver is low"] + LOW = 0, + #[doc = "1: Pin driver is high"] + HIGH = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PIN22_A) -> Self { + variant as u8 != 0 + } +} +impl PIN22_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> PIN22_A { + match self.bits { + false => PIN22_A::LOW, + true => PIN22_A::HIGH, + } + } + #[doc = "Checks if the value of the field is `LOW`"] + #[inline(always)] + pub fn is_low(&self) -> bool { + *self == PIN22_A::LOW + } + #[doc = "Checks if the value of the field is `HIGH`"] + #[inline(always)] + pub fn is_high(&self) -> bool { + *self == PIN22_A::HIGH + } +} +#[doc = "Field `PIN22` writer - Pin 22"] +pub type PIN22_W<'a, const O: u8> = crate::BitWriter<'a, u32, OUT_SPEC, PIN22_A, O>; +impl<'a, const O: u8> PIN22_W<'a, O> { + #[doc = "Pin driver is low"] + #[inline(always)] + pub fn low(self) -> &'a mut W { + self.variant(PIN22_A::LOW) + } + #[doc = "Pin driver is high"] + #[inline(always)] + pub fn high(self) -> &'a mut W { + self.variant(PIN22_A::HIGH) + } +} +#[doc = "Field `PIN23` reader - Pin 23"] +pub type PIN23_R = crate::BitReader; +#[doc = "Pin 23\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PIN23_A { + #[doc = "0: Pin driver is low"] + LOW = 0, + #[doc = "1: Pin driver is high"] + HIGH = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PIN23_A) -> Self { + variant as u8 != 0 + } +} +impl PIN23_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> PIN23_A { + match self.bits { + false => PIN23_A::LOW, + true => PIN23_A::HIGH, + } + } + #[doc = "Checks if the value of the field is `LOW`"] + #[inline(always)] + pub fn is_low(&self) -> bool { + *self == PIN23_A::LOW + } + #[doc = "Checks if the value of the field is `HIGH`"] + #[inline(always)] + pub fn is_high(&self) -> bool { + *self == PIN23_A::HIGH + } +} +#[doc = "Field `PIN23` writer - Pin 23"] +pub type PIN23_W<'a, const O: u8> = crate::BitWriter<'a, u32, OUT_SPEC, PIN23_A, O>; +impl<'a, const O: u8> PIN23_W<'a, O> { + #[doc = "Pin driver is low"] + #[inline(always)] + pub fn low(self) -> &'a mut W { + self.variant(PIN23_A::LOW) + } + #[doc = "Pin driver is high"] + #[inline(always)] + pub fn high(self) -> &'a mut W { + self.variant(PIN23_A::HIGH) + } +} +#[doc = "Field `PIN24` reader - Pin 24"] +pub type PIN24_R = crate::BitReader; +#[doc = "Pin 24\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PIN24_A { + #[doc = "0: Pin driver is low"] + LOW = 0, + #[doc = "1: Pin driver is high"] + HIGH = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PIN24_A) -> Self { + variant as u8 != 0 + } +} +impl PIN24_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> PIN24_A { + match self.bits { + false => PIN24_A::LOW, + true => PIN24_A::HIGH, + } + } + #[doc = "Checks if the value of the field is `LOW`"] + #[inline(always)] + pub fn is_low(&self) -> bool { + *self == PIN24_A::LOW + } + #[doc = "Checks if the value of the field is `HIGH`"] + #[inline(always)] + pub fn is_high(&self) -> bool { + *self == PIN24_A::HIGH + } +} +#[doc = "Field `PIN24` writer - Pin 24"] +pub type PIN24_W<'a, const O: u8> = crate::BitWriter<'a, u32, OUT_SPEC, PIN24_A, O>; +impl<'a, const O: u8> PIN24_W<'a, O> { + #[doc = "Pin driver is low"] + #[inline(always)] + pub fn low(self) -> &'a mut W { + self.variant(PIN24_A::LOW) + } + #[doc = "Pin driver is high"] + #[inline(always)] + pub fn high(self) -> &'a mut W { + self.variant(PIN24_A::HIGH) + } +} +#[doc = "Field `PIN25` reader - Pin 25"] +pub type PIN25_R = crate::BitReader; +#[doc = "Pin 25\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PIN25_A { + #[doc = "0: Pin driver is low"] + LOW = 0, + #[doc = "1: Pin driver is high"] + HIGH = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PIN25_A) -> Self { + variant as u8 != 0 + } +} +impl PIN25_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> PIN25_A { + match self.bits { + false => PIN25_A::LOW, + true => PIN25_A::HIGH, + } + } + #[doc = "Checks if the value of the field is `LOW`"] + #[inline(always)] + pub fn is_low(&self) -> bool { + *self == PIN25_A::LOW + } + #[doc = "Checks if the value of the field is `HIGH`"] + #[inline(always)] + pub fn is_high(&self) -> bool { + *self == PIN25_A::HIGH + } +} +#[doc = "Field `PIN25` writer - Pin 25"] +pub type PIN25_W<'a, const O: u8> = crate::BitWriter<'a, u32, OUT_SPEC, PIN25_A, O>; +impl<'a, const O: u8> PIN25_W<'a, O> { + #[doc = "Pin driver is low"] + #[inline(always)] + pub fn low(self) -> &'a mut W { + self.variant(PIN25_A::LOW) + } + #[doc = "Pin driver is high"] + #[inline(always)] + pub fn high(self) -> &'a mut W { + self.variant(PIN25_A::HIGH) + } +} +#[doc = "Field `PIN26` reader - Pin 26"] +pub type PIN26_R = crate::BitReader; +#[doc = "Pin 26\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PIN26_A { + #[doc = "0: Pin driver is low"] + LOW = 0, + #[doc = "1: Pin driver is high"] + HIGH = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PIN26_A) -> Self { + variant as u8 != 0 + } +} +impl PIN26_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> PIN26_A { + match self.bits { + false => PIN26_A::LOW, + true => PIN26_A::HIGH, + } + } + #[doc = "Checks if the value of the field is `LOW`"] + #[inline(always)] + pub fn is_low(&self) -> bool { + *self == PIN26_A::LOW + } + #[doc = "Checks if the value of the field is `HIGH`"] + #[inline(always)] + pub fn is_high(&self) -> bool { + *self == PIN26_A::HIGH + } +} +#[doc = "Field `PIN26` writer - Pin 26"] +pub type PIN26_W<'a, const O: u8> = crate::BitWriter<'a, u32, OUT_SPEC, PIN26_A, O>; +impl<'a, const O: u8> PIN26_W<'a, O> { + #[doc = "Pin driver is low"] + #[inline(always)] + pub fn low(self) -> &'a mut W { + self.variant(PIN26_A::LOW) + } + #[doc = "Pin driver is high"] + #[inline(always)] + pub fn high(self) -> &'a mut W { + self.variant(PIN26_A::HIGH) + } +} +#[doc = "Field `PIN27` reader - Pin 27"] +pub type PIN27_R = crate::BitReader; +#[doc = "Pin 27\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PIN27_A { + #[doc = "0: Pin driver is low"] + LOW = 0, + #[doc = "1: Pin driver is high"] + HIGH = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PIN27_A) -> Self { + variant as u8 != 0 + } +} +impl PIN27_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> PIN27_A { + match self.bits { + false => PIN27_A::LOW, + true => PIN27_A::HIGH, + } + } + #[doc = "Checks if the value of the field is `LOW`"] + #[inline(always)] + pub fn is_low(&self) -> bool { + *self == PIN27_A::LOW + } + #[doc = "Checks if the value of the field is `HIGH`"] + #[inline(always)] + pub fn is_high(&self) -> bool { + *self == PIN27_A::HIGH + } +} +#[doc = "Field `PIN27` writer - Pin 27"] +pub type PIN27_W<'a, const O: u8> = crate::BitWriter<'a, u32, OUT_SPEC, PIN27_A, O>; +impl<'a, const O: u8> PIN27_W<'a, O> { + #[doc = "Pin driver is low"] + #[inline(always)] + pub fn low(self) -> &'a mut W { + self.variant(PIN27_A::LOW) + } + #[doc = "Pin driver is high"] + #[inline(always)] + pub fn high(self) -> &'a mut W { + self.variant(PIN27_A::HIGH) + } +} +#[doc = "Field `PIN28` reader - Pin 28"] +pub type PIN28_R = crate::BitReader; +#[doc = "Pin 28\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PIN28_A { + #[doc = "0: Pin driver is low"] + LOW = 0, + #[doc = "1: Pin driver is high"] + HIGH = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PIN28_A) -> Self { + variant as u8 != 0 + } +} +impl PIN28_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> PIN28_A { + match self.bits { + false => PIN28_A::LOW, + true => PIN28_A::HIGH, + } + } + #[doc = "Checks if the value of the field is `LOW`"] + #[inline(always)] + pub fn is_low(&self) -> bool { + *self == PIN28_A::LOW + } + #[doc = "Checks if the value of the field is `HIGH`"] + #[inline(always)] + pub fn is_high(&self) -> bool { + *self == PIN28_A::HIGH + } +} +#[doc = "Field `PIN28` writer - Pin 28"] +pub type PIN28_W<'a, const O: u8> = crate::BitWriter<'a, u32, OUT_SPEC, PIN28_A, O>; +impl<'a, const O: u8> PIN28_W<'a, O> { + #[doc = "Pin driver is low"] + #[inline(always)] + pub fn low(self) -> &'a mut W { + self.variant(PIN28_A::LOW) + } + #[doc = "Pin driver is high"] + #[inline(always)] + pub fn high(self) -> &'a mut W { + self.variant(PIN28_A::HIGH) + } +} +#[doc = "Field `PIN29` reader - Pin 29"] +pub type PIN29_R = crate::BitReader; +#[doc = "Pin 29\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PIN29_A { + #[doc = "0: Pin driver is low"] + LOW = 0, + #[doc = "1: Pin driver is high"] + HIGH = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PIN29_A) -> Self { + variant as u8 != 0 + } +} +impl PIN29_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> PIN29_A { + match self.bits { + false => PIN29_A::LOW, + true => PIN29_A::HIGH, + } + } + #[doc = "Checks if the value of the field is `LOW`"] + #[inline(always)] + pub fn is_low(&self) -> bool { + *self == PIN29_A::LOW + } + #[doc = "Checks if the value of the field is `HIGH`"] + #[inline(always)] + pub fn is_high(&self) -> bool { + *self == PIN29_A::HIGH + } +} +#[doc = "Field `PIN29` writer - Pin 29"] +pub type PIN29_W<'a, const O: u8> = crate::BitWriter<'a, u32, OUT_SPEC, PIN29_A, O>; +impl<'a, const O: u8> PIN29_W<'a, O> { + #[doc = "Pin driver is low"] + #[inline(always)] + pub fn low(self) -> &'a mut W { + self.variant(PIN29_A::LOW) + } + #[doc = "Pin driver is high"] + #[inline(always)] + pub fn high(self) -> &'a mut W { + self.variant(PIN29_A::HIGH) + } +} +#[doc = "Field `PIN30` reader - Pin 30"] +pub type PIN30_R = crate::BitReader; +#[doc = "Pin 30\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PIN30_A { + #[doc = "0: Pin driver is low"] + LOW = 0, + #[doc = "1: Pin driver is high"] + HIGH = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PIN30_A) -> Self { + variant as u8 != 0 + } +} +impl PIN30_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> PIN30_A { + match self.bits { + false => PIN30_A::LOW, + true => PIN30_A::HIGH, + } + } + #[doc = "Checks if the value of the field is `LOW`"] + #[inline(always)] + pub fn is_low(&self) -> bool { + *self == PIN30_A::LOW + } + #[doc = "Checks if the value of the field is `HIGH`"] + #[inline(always)] + pub fn is_high(&self) -> bool { + *self == PIN30_A::HIGH + } +} +#[doc = "Field `PIN30` writer - Pin 30"] +pub type PIN30_W<'a, const O: u8> = crate::BitWriter<'a, u32, OUT_SPEC, PIN30_A, O>; +impl<'a, const O: u8> PIN30_W<'a, O> { + #[doc = "Pin driver is low"] + #[inline(always)] + pub fn low(self) -> &'a mut W { + self.variant(PIN30_A::LOW) + } + #[doc = "Pin driver is high"] + #[inline(always)] + pub fn high(self) -> &'a mut W { + self.variant(PIN30_A::HIGH) + } +} +#[doc = "Field `PIN31` reader - Pin 31"] +pub type PIN31_R = crate::BitReader; +#[doc = "Pin 31\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PIN31_A { + #[doc = "0: Pin driver is low"] + LOW = 0, + #[doc = "1: Pin driver is high"] + HIGH = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PIN31_A) -> Self { + variant as u8 != 0 + } +} +impl PIN31_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> PIN31_A { + match self.bits { + false => PIN31_A::LOW, + true => PIN31_A::HIGH, + } + } + #[doc = "Checks if the value of the field is `LOW`"] + #[inline(always)] + pub fn is_low(&self) -> bool { + *self == PIN31_A::LOW + } + #[doc = "Checks if the value of the field is `HIGH`"] + #[inline(always)] + pub fn is_high(&self) -> bool { + *self == PIN31_A::HIGH + } +} +#[doc = "Field `PIN31` writer - Pin 31"] +pub type PIN31_W<'a, const O: u8> = crate::BitWriter<'a, u32, OUT_SPEC, PIN31_A, O>; +impl<'a, const O: u8> PIN31_W<'a, O> { + #[doc = "Pin driver is low"] + #[inline(always)] + pub fn low(self) -> &'a mut W { + self.variant(PIN31_A::LOW) + } + #[doc = "Pin driver is high"] + #[inline(always)] + pub fn high(self) -> &'a mut W { + self.variant(PIN31_A::HIGH) + } +} +impl R { + #[doc = "Bit 0 - Pin 0"] + #[inline(always)] + pub fn pin0(&self) -> PIN0_R { + PIN0_R::new((self.bits & 1) != 0) + } + #[doc = "Bit 1 - Pin 1"] + #[inline(always)] + pub fn pin1(&self) -> PIN1_R { + PIN1_R::new(((self.bits >> 1) & 1) != 0) + } + #[doc = "Bit 2 - Pin 2"] + #[inline(always)] + pub fn pin2(&self) -> PIN2_R { + PIN2_R::new(((self.bits >> 2) & 1) != 0) + } + #[doc = "Bit 3 - Pin 3"] + #[inline(always)] + pub fn pin3(&self) -> PIN3_R { + PIN3_R::new(((self.bits >> 3) & 1) != 0) + } + #[doc = "Bit 4 - Pin 4"] + #[inline(always)] + pub fn pin4(&self) -> PIN4_R { + PIN4_R::new(((self.bits >> 4) & 1) != 0) + } + #[doc = "Bit 5 - Pin 5"] + #[inline(always)] + pub fn pin5(&self) -> PIN5_R { + PIN5_R::new(((self.bits >> 5) & 1) != 0) + } + #[doc = "Bit 6 - Pin 6"] + #[inline(always)] + pub fn pin6(&self) -> PIN6_R { + PIN6_R::new(((self.bits >> 6) & 1) != 0) + } + #[doc = "Bit 7 - Pin 7"] + #[inline(always)] + pub fn pin7(&self) -> PIN7_R { + PIN7_R::new(((self.bits >> 7) & 1) != 0) + } + #[doc = "Bit 8 - Pin 8"] + #[inline(always)] + pub fn pin8(&self) -> PIN8_R { + PIN8_R::new(((self.bits >> 8) & 1) != 0) + } + #[doc = "Bit 9 - Pin 9"] + #[inline(always)] + pub fn pin9(&self) -> PIN9_R { + PIN9_R::new(((self.bits >> 9) & 1) != 0) + } + #[doc = "Bit 10 - Pin 10"] + #[inline(always)] + pub fn pin10(&self) -> PIN10_R { + PIN10_R::new(((self.bits >> 10) & 1) != 0) + } + #[doc = "Bit 11 - Pin 11"] + #[inline(always)] + pub fn pin11(&self) -> PIN11_R { + PIN11_R::new(((self.bits >> 11) & 1) != 0) + } + #[doc = "Bit 12 - Pin 12"] + #[inline(always)] + pub fn pin12(&self) -> PIN12_R { + PIN12_R::new(((self.bits >> 12) & 1) != 0) + } + #[doc = "Bit 13 - Pin 13"] + #[inline(always)] + pub fn pin13(&self) -> PIN13_R { + PIN13_R::new(((self.bits >> 13) & 1) != 0) + } + #[doc = "Bit 14 - Pin 14"] + #[inline(always)] + pub fn pin14(&self) -> PIN14_R { + PIN14_R::new(((self.bits >> 14) & 1) != 0) + } + #[doc = "Bit 15 - Pin 15"] + #[inline(always)] + pub fn pin15(&self) -> PIN15_R { + PIN15_R::new(((self.bits >> 15) & 1) != 0) + } + #[doc = "Bit 16 - Pin 16"] + #[inline(always)] + pub fn pin16(&self) -> PIN16_R { + PIN16_R::new(((self.bits >> 16) & 1) != 0) + } + #[doc = "Bit 17 - Pin 17"] + #[inline(always)] + pub fn pin17(&self) -> PIN17_R { + PIN17_R::new(((self.bits >> 17) & 1) != 0) + } + #[doc = "Bit 18 - Pin 18"] + #[inline(always)] + pub fn pin18(&self) -> PIN18_R { + PIN18_R::new(((self.bits >> 18) & 1) != 0) + } + #[doc = "Bit 19 - Pin 19"] + #[inline(always)] + pub fn pin19(&self) -> PIN19_R { + PIN19_R::new(((self.bits >> 19) & 1) != 0) + } + #[doc = "Bit 20 - Pin 20"] + #[inline(always)] + pub fn pin20(&self) -> PIN20_R { + PIN20_R::new(((self.bits >> 20) & 1) != 0) + } + #[doc = "Bit 21 - Pin 21"] + #[inline(always)] + pub fn pin21(&self) -> PIN21_R { + PIN21_R::new(((self.bits >> 21) & 1) != 0) + } + #[doc = "Bit 22 - Pin 22"] + #[inline(always)] + pub fn pin22(&self) -> PIN22_R { + PIN22_R::new(((self.bits >> 22) & 1) != 0) + } + #[doc = "Bit 23 - Pin 23"] + #[inline(always)] + pub fn pin23(&self) -> PIN23_R { + PIN23_R::new(((self.bits >> 23) & 1) != 0) + } + #[doc = "Bit 24 - Pin 24"] + #[inline(always)] + pub fn pin24(&self) -> PIN24_R { + PIN24_R::new(((self.bits >> 24) & 1) != 0) + } + #[doc = "Bit 25 - Pin 25"] + #[inline(always)] + pub fn pin25(&self) -> PIN25_R { + PIN25_R::new(((self.bits >> 25) & 1) != 0) + } + #[doc = "Bit 26 - Pin 26"] + #[inline(always)] + pub fn pin26(&self) -> PIN26_R { + PIN26_R::new(((self.bits >> 26) & 1) != 0) + } + #[doc = "Bit 27 - Pin 27"] + #[inline(always)] + pub fn pin27(&self) -> PIN27_R { + PIN27_R::new(((self.bits >> 27) & 1) != 0) + } + #[doc = "Bit 28 - Pin 28"] + #[inline(always)] + pub fn pin28(&self) -> PIN28_R { + PIN28_R::new(((self.bits >> 28) & 1) != 0) + } + #[doc = "Bit 29 - Pin 29"] + #[inline(always)] + pub fn pin29(&self) -> PIN29_R { + PIN29_R::new(((self.bits >> 29) & 1) != 0) + } + #[doc = "Bit 30 - Pin 30"] + #[inline(always)] + pub fn pin30(&self) -> PIN30_R { + PIN30_R::new(((self.bits >> 30) & 1) != 0) + } + #[doc = "Bit 31 - Pin 31"] + #[inline(always)] + pub fn pin31(&self) -> PIN31_R { + PIN31_R::new(((self.bits >> 31) & 1) != 0) + } +} +impl W { + #[doc = "Bit 0 - Pin 0"] + #[inline(always)] + #[must_use] + pub fn pin0(&mut self) -> PIN0_W<0> { + PIN0_W::new(self) + } + #[doc = "Bit 1 - Pin 1"] + #[inline(always)] + #[must_use] + pub fn pin1(&mut self) -> PIN1_W<1> { + PIN1_W::new(self) + } + #[doc = "Bit 2 - Pin 2"] + #[inline(always)] + #[must_use] + pub fn pin2(&mut self) -> PIN2_W<2> { + PIN2_W::new(self) + } + #[doc = "Bit 3 - Pin 3"] + #[inline(always)] + #[must_use] + pub fn pin3(&mut self) -> PIN3_W<3> { + PIN3_W::new(self) + } + #[doc = "Bit 4 - Pin 4"] + #[inline(always)] + #[must_use] + pub fn pin4(&mut self) -> PIN4_W<4> { + PIN4_W::new(self) + } + #[doc = "Bit 5 - Pin 5"] + #[inline(always)] + #[must_use] + pub fn pin5(&mut self) -> PIN5_W<5> { + PIN5_W::new(self) + } + #[doc = "Bit 6 - Pin 6"] + #[inline(always)] + #[must_use] + pub fn pin6(&mut self) -> PIN6_W<6> { + PIN6_W::new(self) + } + #[doc = "Bit 7 - Pin 7"] + #[inline(always)] + #[must_use] + pub fn pin7(&mut self) -> PIN7_W<7> { + PIN7_W::new(self) + } + #[doc = "Bit 8 - Pin 8"] + #[inline(always)] + #[must_use] + pub fn pin8(&mut self) -> PIN8_W<8> { + PIN8_W::new(self) + } + #[doc = "Bit 9 - Pin 9"] + #[inline(always)] + #[must_use] + pub fn pin9(&mut self) -> PIN9_W<9> { + PIN9_W::new(self) + } + #[doc = "Bit 10 - Pin 10"] + #[inline(always)] + #[must_use] + pub fn pin10(&mut self) -> PIN10_W<10> { + PIN10_W::new(self) + } + #[doc = "Bit 11 - Pin 11"] + #[inline(always)] + #[must_use] + pub fn pin11(&mut self) -> PIN11_W<11> { + PIN11_W::new(self) + } + #[doc = "Bit 12 - Pin 12"] + #[inline(always)] + #[must_use] + pub fn pin12(&mut self) -> PIN12_W<12> { + PIN12_W::new(self) + } + #[doc = "Bit 13 - Pin 13"] + #[inline(always)] + #[must_use] + pub fn pin13(&mut self) -> PIN13_W<13> { + PIN13_W::new(self) + } + #[doc = "Bit 14 - Pin 14"] + #[inline(always)] + #[must_use] + pub fn pin14(&mut self) -> PIN14_W<14> { + PIN14_W::new(self) + } + #[doc = "Bit 15 - Pin 15"] + #[inline(always)] + #[must_use] + pub fn pin15(&mut self) -> PIN15_W<15> { + PIN15_W::new(self) + } + #[doc = "Bit 16 - Pin 16"] + #[inline(always)] + #[must_use] + pub fn pin16(&mut self) -> PIN16_W<16> { + PIN16_W::new(self) + } + #[doc = "Bit 17 - Pin 17"] + #[inline(always)] + #[must_use] + pub fn pin17(&mut self) -> PIN17_W<17> { + PIN17_W::new(self) + } + #[doc = "Bit 18 - Pin 18"] + #[inline(always)] + #[must_use] + pub fn pin18(&mut self) -> PIN18_W<18> { + PIN18_W::new(self) + } + #[doc = "Bit 19 - Pin 19"] + #[inline(always)] + #[must_use] + pub fn pin19(&mut self) -> PIN19_W<19> { + PIN19_W::new(self) + } + #[doc = "Bit 20 - Pin 20"] + #[inline(always)] + #[must_use] + pub fn pin20(&mut self) -> PIN20_W<20> { + PIN20_W::new(self) + } + #[doc = "Bit 21 - Pin 21"] + #[inline(always)] + #[must_use] + pub fn pin21(&mut self) -> PIN21_W<21> { + PIN21_W::new(self) + } + #[doc = "Bit 22 - Pin 22"] + #[inline(always)] + #[must_use] + pub fn pin22(&mut self) -> PIN22_W<22> { + PIN22_W::new(self) + } + #[doc = "Bit 23 - Pin 23"] + #[inline(always)] + #[must_use] + pub fn pin23(&mut self) -> PIN23_W<23> { + PIN23_W::new(self) + } + #[doc = "Bit 24 - Pin 24"] + #[inline(always)] + #[must_use] + pub fn pin24(&mut self) -> PIN24_W<24> { + PIN24_W::new(self) + } + #[doc = "Bit 25 - Pin 25"] + #[inline(always)] + #[must_use] + pub fn pin25(&mut self) -> PIN25_W<25> { + PIN25_W::new(self) + } + #[doc = "Bit 26 - Pin 26"] + #[inline(always)] + #[must_use] + pub fn pin26(&mut self) -> PIN26_W<26> { + PIN26_W::new(self) + } + #[doc = "Bit 27 - Pin 27"] + #[inline(always)] + #[must_use] + pub fn pin27(&mut self) -> PIN27_W<27> { + PIN27_W::new(self) + } + #[doc = "Bit 28 - Pin 28"] + #[inline(always)] + #[must_use] + pub fn pin28(&mut self) -> PIN28_W<28> { + PIN28_W::new(self) + } + #[doc = "Bit 29 - Pin 29"] + #[inline(always)] + #[must_use] + pub fn pin29(&mut self) -> PIN29_W<29> { + PIN29_W::new(self) + } + #[doc = "Bit 30 - Pin 30"] + #[inline(always)] + #[must_use] + pub fn pin30(&mut self) -> PIN30_W<30> { + PIN30_W::new(self) + } + #[doc = "Bit 31 - Pin 31"] + #[inline(always)] + #[must_use] + pub fn pin31(&mut self) -> PIN31_W<31> { + PIN31_W::new(self) + } + #[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 = "Write GPIO port\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 [out](index.html) module"] +pub struct OUT_SPEC; +impl crate::RegisterSpec for OUT_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [out::R](R) reader structure"] +impl crate::Readable for OUT_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [out::W](W) writer structure"] +impl crate::Writable for 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 OUT to value 0"] +impl crate::Resettable for OUT_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/p0/outclr.rs b/down-the-stack/dk_pac/src/p0/outclr.rs new file mode 100644 index 0000000..737e2bd --- /dev/null +++ b/down-the-stack/dk_pac/src/p0/outclr.rs @@ -0,0 +1,2241 @@ +#[doc = "Register `OUTCLR` 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 `OUTCLR` 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 `PIN0` reader - Pin 0"] +pub type PIN0_R = crate::BitReader; +#[doc = "Pin 0\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PIN0_A { + #[doc = "0: Read: pin driver is low"] + LOW = 0, + #[doc = "1: Read: pin driver is high"] + HIGH = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PIN0_A) -> Self { + variant as u8 != 0 + } +} +impl PIN0_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> PIN0_A { + match self.bits { + false => PIN0_A::LOW, + true => PIN0_A::HIGH, + } + } + #[doc = "Checks if the value of the field is `LOW`"] + #[inline(always)] + pub fn is_low(&self) -> bool { + *self == PIN0_A::LOW + } + #[doc = "Checks if the value of the field is `HIGH`"] + #[inline(always)] + pub fn is_high(&self) -> bool { + *self == PIN0_A::HIGH + } +} +#[doc = "Pin 0\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PIN0_AW { + #[doc = "1: Write: writing a '1' sets the pin low; writing a '0' has no effect"] + CLEAR = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PIN0_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `PIN0` writer - Pin 0"] +pub type PIN0_W<'a, const O: u8> = crate::BitWriter1C<'a, u32, OUTCLR_SPEC, PIN0_AW, O>; +impl<'a, const O: u8> PIN0_W<'a, O> { + #[doc = "Write: writing a '1' sets the pin low; writing a '0' has no effect"] + #[inline(always)] + pub fn clear(self) -> &'a mut W { + self.variant(PIN0_AW::CLEAR) + } +} +#[doc = "Field `PIN1` reader - Pin 1"] +pub type PIN1_R = crate::BitReader; +#[doc = "Pin 1\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PIN1_A { + #[doc = "0: Read: pin driver is low"] + LOW = 0, + #[doc = "1: Read: pin driver is high"] + HIGH = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PIN1_A) -> Self { + variant as u8 != 0 + } +} +impl PIN1_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> PIN1_A { + match self.bits { + false => PIN1_A::LOW, + true => PIN1_A::HIGH, + } + } + #[doc = "Checks if the value of the field is `LOW`"] + #[inline(always)] + pub fn is_low(&self) -> bool { + *self == PIN1_A::LOW + } + #[doc = "Checks if the value of the field is `HIGH`"] + #[inline(always)] + pub fn is_high(&self) -> bool { + *self == PIN1_A::HIGH + } +} +#[doc = "Pin 1\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PIN1_AW { + #[doc = "1: Write: writing a '1' sets the pin low; writing a '0' has no effect"] + CLEAR = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PIN1_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `PIN1` writer - Pin 1"] +pub type PIN1_W<'a, const O: u8> = crate::BitWriter1C<'a, u32, OUTCLR_SPEC, PIN1_AW, O>; +impl<'a, const O: u8> PIN1_W<'a, O> { + #[doc = "Write: writing a '1' sets the pin low; writing a '0' has no effect"] + #[inline(always)] + pub fn clear(self) -> &'a mut W { + self.variant(PIN1_AW::CLEAR) + } +} +#[doc = "Field `PIN2` reader - Pin 2"] +pub type PIN2_R = crate::BitReader; +#[doc = "Pin 2\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PIN2_A { + #[doc = "0: Read: pin driver is low"] + LOW = 0, + #[doc = "1: Read: pin driver is high"] + HIGH = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PIN2_A) -> Self { + variant as u8 != 0 + } +} +impl PIN2_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> PIN2_A { + match self.bits { + false => PIN2_A::LOW, + true => PIN2_A::HIGH, + } + } + #[doc = "Checks if the value of the field is `LOW`"] + #[inline(always)] + pub fn is_low(&self) -> bool { + *self == PIN2_A::LOW + } + #[doc = "Checks if the value of the field is `HIGH`"] + #[inline(always)] + pub fn is_high(&self) -> bool { + *self == PIN2_A::HIGH + } +} +#[doc = "Pin 2\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PIN2_AW { + #[doc = "1: Write: writing a '1' sets the pin low; writing a '0' has no effect"] + CLEAR = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PIN2_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `PIN2` writer - Pin 2"] +pub type PIN2_W<'a, const O: u8> = crate::BitWriter1C<'a, u32, OUTCLR_SPEC, PIN2_AW, O>; +impl<'a, const O: u8> PIN2_W<'a, O> { + #[doc = "Write: writing a '1' sets the pin low; writing a '0' has no effect"] + #[inline(always)] + pub fn clear(self) -> &'a mut W { + self.variant(PIN2_AW::CLEAR) + } +} +#[doc = "Field `PIN3` reader - Pin 3"] +pub type PIN3_R = crate::BitReader; +#[doc = "Pin 3\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PIN3_A { + #[doc = "0: Read: pin driver is low"] + LOW = 0, + #[doc = "1: Read: pin driver is high"] + HIGH = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PIN3_A) -> Self { + variant as u8 != 0 + } +} +impl PIN3_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> PIN3_A { + match self.bits { + false => PIN3_A::LOW, + true => PIN3_A::HIGH, + } + } + #[doc = "Checks if the value of the field is `LOW`"] + #[inline(always)] + pub fn is_low(&self) -> bool { + *self == PIN3_A::LOW + } + #[doc = "Checks if the value of the field is `HIGH`"] + #[inline(always)] + pub fn is_high(&self) -> bool { + *self == PIN3_A::HIGH + } +} +#[doc = "Pin 3\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PIN3_AW { + #[doc = "1: Write: writing a '1' sets the pin low; writing a '0' has no effect"] + CLEAR = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PIN3_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `PIN3` writer - Pin 3"] +pub type PIN3_W<'a, const O: u8> = crate::BitWriter1C<'a, u32, OUTCLR_SPEC, PIN3_AW, O>; +impl<'a, const O: u8> PIN3_W<'a, O> { + #[doc = "Write: writing a '1' sets the pin low; writing a '0' has no effect"] + #[inline(always)] + pub fn clear(self) -> &'a mut W { + self.variant(PIN3_AW::CLEAR) + } +} +#[doc = "Field `PIN4` reader - Pin 4"] +pub type PIN4_R = crate::BitReader; +#[doc = "Pin 4\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PIN4_A { + #[doc = "0: Read: pin driver is low"] + LOW = 0, + #[doc = "1: Read: pin driver is high"] + HIGH = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PIN4_A) -> Self { + variant as u8 != 0 + } +} +impl PIN4_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> PIN4_A { + match self.bits { + false => PIN4_A::LOW, + true => PIN4_A::HIGH, + } + } + #[doc = "Checks if the value of the field is `LOW`"] + #[inline(always)] + pub fn is_low(&self) -> bool { + *self == PIN4_A::LOW + } + #[doc = "Checks if the value of the field is `HIGH`"] + #[inline(always)] + pub fn is_high(&self) -> bool { + *self == PIN4_A::HIGH + } +} +#[doc = "Pin 4\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PIN4_AW { + #[doc = "1: Write: writing a '1' sets the pin low; writing a '0' has no effect"] + CLEAR = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PIN4_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `PIN4` writer - Pin 4"] +pub type PIN4_W<'a, const O: u8> = crate::BitWriter1C<'a, u32, OUTCLR_SPEC, PIN4_AW, O>; +impl<'a, const O: u8> PIN4_W<'a, O> { + #[doc = "Write: writing a '1' sets the pin low; writing a '0' has no effect"] + #[inline(always)] + pub fn clear(self) -> &'a mut W { + self.variant(PIN4_AW::CLEAR) + } +} +#[doc = "Field `PIN5` reader - Pin 5"] +pub type PIN5_R = crate::BitReader; +#[doc = "Pin 5\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PIN5_A { + #[doc = "0: Read: pin driver is low"] + LOW = 0, + #[doc = "1: Read: pin driver is high"] + HIGH = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PIN5_A) -> Self { + variant as u8 != 0 + } +} +impl PIN5_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> PIN5_A { + match self.bits { + false => PIN5_A::LOW, + true => PIN5_A::HIGH, + } + } + #[doc = "Checks if the value of the field is `LOW`"] + #[inline(always)] + pub fn is_low(&self) -> bool { + *self == PIN5_A::LOW + } + #[doc = "Checks if the value of the field is `HIGH`"] + #[inline(always)] + pub fn is_high(&self) -> bool { + *self == PIN5_A::HIGH + } +} +#[doc = "Pin 5\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PIN5_AW { + #[doc = "1: Write: writing a '1' sets the pin low; writing a '0' has no effect"] + CLEAR = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PIN5_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `PIN5` writer - Pin 5"] +pub type PIN5_W<'a, const O: u8> = crate::BitWriter1C<'a, u32, OUTCLR_SPEC, PIN5_AW, O>; +impl<'a, const O: u8> PIN5_W<'a, O> { + #[doc = "Write: writing a '1' sets the pin low; writing a '0' has no effect"] + #[inline(always)] + pub fn clear(self) -> &'a mut W { + self.variant(PIN5_AW::CLEAR) + } +} +#[doc = "Field `PIN6` reader - Pin 6"] +pub type PIN6_R = crate::BitReader; +#[doc = "Pin 6\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PIN6_A { + #[doc = "0: Read: pin driver is low"] + LOW = 0, + #[doc = "1: Read: pin driver is high"] + HIGH = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PIN6_A) -> Self { + variant as u8 != 0 + } +} +impl PIN6_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> PIN6_A { + match self.bits { + false => PIN6_A::LOW, + true => PIN6_A::HIGH, + } + } + #[doc = "Checks if the value of the field is `LOW`"] + #[inline(always)] + pub fn is_low(&self) -> bool { + *self == PIN6_A::LOW + } + #[doc = "Checks if the value of the field is `HIGH`"] + #[inline(always)] + pub fn is_high(&self) -> bool { + *self == PIN6_A::HIGH + } +} +#[doc = "Pin 6\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PIN6_AW { + #[doc = "1: Write: writing a '1' sets the pin low; writing a '0' has no effect"] + CLEAR = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PIN6_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `PIN6` writer - Pin 6"] +pub type PIN6_W<'a, const O: u8> = crate::BitWriter1C<'a, u32, OUTCLR_SPEC, PIN6_AW, O>; +impl<'a, const O: u8> PIN6_W<'a, O> { + #[doc = "Write: writing a '1' sets the pin low; writing a '0' has no effect"] + #[inline(always)] + pub fn clear(self) -> &'a mut W { + self.variant(PIN6_AW::CLEAR) + } +} +#[doc = "Field `PIN7` reader - Pin 7"] +pub type PIN7_R = crate::BitReader; +#[doc = "Pin 7\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PIN7_A { + #[doc = "0: Read: pin driver is low"] + LOW = 0, + #[doc = "1: Read: pin driver is high"] + HIGH = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PIN7_A) -> Self { + variant as u8 != 0 + } +} +impl PIN7_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> PIN7_A { + match self.bits { + false => PIN7_A::LOW, + true => PIN7_A::HIGH, + } + } + #[doc = "Checks if the value of the field is `LOW`"] + #[inline(always)] + pub fn is_low(&self) -> bool { + *self == PIN7_A::LOW + } + #[doc = "Checks if the value of the field is `HIGH`"] + #[inline(always)] + pub fn is_high(&self) -> bool { + *self == PIN7_A::HIGH + } +} +#[doc = "Pin 7\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PIN7_AW { + #[doc = "1: Write: writing a '1' sets the pin low; writing a '0' has no effect"] + CLEAR = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PIN7_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `PIN7` writer - Pin 7"] +pub type PIN7_W<'a, const O: u8> = crate::BitWriter1C<'a, u32, OUTCLR_SPEC, PIN7_AW, O>; +impl<'a, const O: u8> PIN7_W<'a, O> { + #[doc = "Write: writing a '1' sets the pin low; writing a '0' has no effect"] + #[inline(always)] + pub fn clear(self) -> &'a mut W { + self.variant(PIN7_AW::CLEAR) + } +} +#[doc = "Field `PIN8` reader - Pin 8"] +pub type PIN8_R = crate::BitReader; +#[doc = "Pin 8\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PIN8_A { + #[doc = "0: Read: pin driver is low"] + LOW = 0, + #[doc = "1: Read: pin driver is high"] + HIGH = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PIN8_A) -> Self { + variant as u8 != 0 + } +} +impl PIN8_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> PIN8_A { + match self.bits { + false => PIN8_A::LOW, + true => PIN8_A::HIGH, + } + } + #[doc = "Checks if the value of the field is `LOW`"] + #[inline(always)] + pub fn is_low(&self) -> bool { + *self == PIN8_A::LOW + } + #[doc = "Checks if the value of the field is `HIGH`"] + #[inline(always)] + pub fn is_high(&self) -> bool { + *self == PIN8_A::HIGH + } +} +#[doc = "Pin 8\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PIN8_AW { + #[doc = "1: Write: writing a '1' sets the pin low; writing a '0' has no effect"] + CLEAR = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PIN8_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `PIN8` writer - Pin 8"] +pub type PIN8_W<'a, const O: u8> = crate::BitWriter1C<'a, u32, OUTCLR_SPEC, PIN8_AW, O>; +impl<'a, const O: u8> PIN8_W<'a, O> { + #[doc = "Write: writing a '1' sets the pin low; writing a '0' has no effect"] + #[inline(always)] + pub fn clear(self) -> &'a mut W { + self.variant(PIN8_AW::CLEAR) + } +} +#[doc = "Field `PIN9` reader - Pin 9"] +pub type PIN9_R = crate::BitReader; +#[doc = "Pin 9\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PIN9_A { + #[doc = "0: Read: pin driver is low"] + LOW = 0, + #[doc = "1: Read: pin driver is high"] + HIGH = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PIN9_A) -> Self { + variant as u8 != 0 + } +} +impl PIN9_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> PIN9_A { + match self.bits { + false => PIN9_A::LOW, + true => PIN9_A::HIGH, + } + } + #[doc = "Checks if the value of the field is `LOW`"] + #[inline(always)] + pub fn is_low(&self) -> bool { + *self == PIN9_A::LOW + } + #[doc = "Checks if the value of the field is `HIGH`"] + #[inline(always)] + pub fn is_high(&self) -> bool { + *self == PIN9_A::HIGH + } +} +#[doc = "Pin 9\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PIN9_AW { + #[doc = "1: Write: writing a '1' sets the pin low; writing a '0' has no effect"] + CLEAR = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PIN9_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `PIN9` writer - Pin 9"] +pub type PIN9_W<'a, const O: u8> = crate::BitWriter1C<'a, u32, OUTCLR_SPEC, PIN9_AW, O>; +impl<'a, const O: u8> PIN9_W<'a, O> { + #[doc = "Write: writing a '1' sets the pin low; writing a '0' has no effect"] + #[inline(always)] + pub fn clear(self) -> &'a mut W { + self.variant(PIN9_AW::CLEAR) + } +} +#[doc = "Field `PIN10` reader - Pin 10"] +pub type PIN10_R = crate::BitReader; +#[doc = "Pin 10\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PIN10_A { + #[doc = "0: Read: pin driver is low"] + LOW = 0, + #[doc = "1: Read: pin driver is high"] + HIGH = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PIN10_A) -> Self { + variant as u8 != 0 + } +} +impl PIN10_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> PIN10_A { + match self.bits { + false => PIN10_A::LOW, + true => PIN10_A::HIGH, + } + } + #[doc = "Checks if the value of the field is `LOW`"] + #[inline(always)] + pub fn is_low(&self) -> bool { + *self == PIN10_A::LOW + } + #[doc = "Checks if the value of the field is `HIGH`"] + #[inline(always)] + pub fn is_high(&self) -> bool { + *self == PIN10_A::HIGH + } +} +#[doc = "Pin 10\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PIN10_AW { + #[doc = "1: Write: writing a '1' sets the pin low; writing a '0' has no effect"] + CLEAR = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PIN10_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `PIN10` writer - Pin 10"] +pub type PIN10_W<'a, const O: u8> = crate::BitWriter1C<'a, u32, OUTCLR_SPEC, PIN10_AW, O>; +impl<'a, const O: u8> PIN10_W<'a, O> { + #[doc = "Write: writing a '1' sets the pin low; writing a '0' has no effect"] + #[inline(always)] + pub fn clear(self) -> &'a mut W { + self.variant(PIN10_AW::CLEAR) + } +} +#[doc = "Field `PIN11` reader - Pin 11"] +pub type PIN11_R = crate::BitReader; +#[doc = "Pin 11\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PIN11_A { + #[doc = "0: Read: pin driver is low"] + LOW = 0, + #[doc = "1: Read: pin driver is high"] + HIGH = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PIN11_A) -> Self { + variant as u8 != 0 + } +} +impl PIN11_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> PIN11_A { + match self.bits { + false => PIN11_A::LOW, + true => PIN11_A::HIGH, + } + } + #[doc = "Checks if the value of the field is `LOW`"] + #[inline(always)] + pub fn is_low(&self) -> bool { + *self == PIN11_A::LOW + } + #[doc = "Checks if the value of the field is `HIGH`"] + #[inline(always)] + pub fn is_high(&self) -> bool { + *self == PIN11_A::HIGH + } +} +#[doc = "Pin 11\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PIN11_AW { + #[doc = "1: Write: writing a '1' sets the pin low; writing a '0' has no effect"] + CLEAR = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PIN11_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `PIN11` writer - Pin 11"] +pub type PIN11_W<'a, const O: u8> = crate::BitWriter1C<'a, u32, OUTCLR_SPEC, PIN11_AW, O>; +impl<'a, const O: u8> PIN11_W<'a, O> { + #[doc = "Write: writing a '1' sets the pin low; writing a '0' has no effect"] + #[inline(always)] + pub fn clear(self) -> &'a mut W { + self.variant(PIN11_AW::CLEAR) + } +} +#[doc = "Field `PIN12` reader - Pin 12"] +pub type PIN12_R = crate::BitReader; +#[doc = "Pin 12\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PIN12_A { + #[doc = "0: Read: pin driver is low"] + LOW = 0, + #[doc = "1: Read: pin driver is high"] + HIGH = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PIN12_A) -> Self { + variant as u8 != 0 + } +} +impl PIN12_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> PIN12_A { + match self.bits { + false => PIN12_A::LOW, + true => PIN12_A::HIGH, + } + } + #[doc = "Checks if the value of the field is `LOW`"] + #[inline(always)] + pub fn is_low(&self) -> bool { + *self == PIN12_A::LOW + } + #[doc = "Checks if the value of the field is `HIGH`"] + #[inline(always)] + pub fn is_high(&self) -> bool { + *self == PIN12_A::HIGH + } +} +#[doc = "Pin 12\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PIN12_AW { + #[doc = "1: Write: writing a '1' sets the pin low; writing a '0' has no effect"] + CLEAR = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PIN12_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `PIN12` writer - Pin 12"] +pub type PIN12_W<'a, const O: u8> = crate::BitWriter1C<'a, u32, OUTCLR_SPEC, PIN12_AW, O>; +impl<'a, const O: u8> PIN12_W<'a, O> { + #[doc = "Write: writing a '1' sets the pin low; writing a '0' has no effect"] + #[inline(always)] + pub fn clear(self) -> &'a mut W { + self.variant(PIN12_AW::CLEAR) + } +} +#[doc = "Field `PIN13` reader - Pin 13"] +pub type PIN13_R = crate::BitReader; +#[doc = "Pin 13\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PIN13_A { + #[doc = "0: Read: pin driver is low"] + LOW = 0, + #[doc = "1: Read: pin driver is high"] + HIGH = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PIN13_A) -> Self { + variant as u8 != 0 + } +} +impl PIN13_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> PIN13_A { + match self.bits { + false => PIN13_A::LOW, + true => PIN13_A::HIGH, + } + } + #[doc = "Checks if the value of the field is `LOW`"] + #[inline(always)] + pub fn is_low(&self) -> bool { + *self == PIN13_A::LOW + } + #[doc = "Checks if the value of the field is `HIGH`"] + #[inline(always)] + pub fn is_high(&self) -> bool { + *self == PIN13_A::HIGH + } +} +#[doc = "Pin 13\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PIN13_AW { + #[doc = "1: Write: writing a '1' sets the pin low; writing a '0' has no effect"] + CLEAR = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PIN13_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `PIN13` writer - Pin 13"] +pub type PIN13_W<'a, const O: u8> = crate::BitWriter1C<'a, u32, OUTCLR_SPEC, PIN13_AW, O>; +impl<'a, const O: u8> PIN13_W<'a, O> { + #[doc = "Write: writing a '1' sets the pin low; writing a '0' has no effect"] + #[inline(always)] + pub fn clear(self) -> &'a mut W { + self.variant(PIN13_AW::CLEAR) + } +} +#[doc = "Field `PIN14` reader - Pin 14"] +pub type PIN14_R = crate::BitReader; +#[doc = "Pin 14\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PIN14_A { + #[doc = "0: Read: pin driver is low"] + LOW = 0, + #[doc = "1: Read: pin driver is high"] + HIGH = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PIN14_A) -> Self { + variant as u8 != 0 + } +} +impl PIN14_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> PIN14_A { + match self.bits { + false => PIN14_A::LOW, + true => PIN14_A::HIGH, + } + } + #[doc = "Checks if the value of the field is `LOW`"] + #[inline(always)] + pub fn is_low(&self) -> bool { + *self == PIN14_A::LOW + } + #[doc = "Checks if the value of the field is `HIGH`"] + #[inline(always)] + pub fn is_high(&self) -> bool { + *self == PIN14_A::HIGH + } +} +#[doc = "Pin 14\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PIN14_AW { + #[doc = "1: Write: writing a '1' sets the pin low; writing a '0' has no effect"] + CLEAR = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PIN14_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `PIN14` writer - Pin 14"] +pub type PIN14_W<'a, const O: u8> = crate::BitWriter1C<'a, u32, OUTCLR_SPEC, PIN14_AW, O>; +impl<'a, const O: u8> PIN14_W<'a, O> { + #[doc = "Write: writing a '1' sets the pin low; writing a '0' has no effect"] + #[inline(always)] + pub fn clear(self) -> &'a mut W { + self.variant(PIN14_AW::CLEAR) + } +} +#[doc = "Field `PIN15` reader - Pin 15"] +pub type PIN15_R = crate::BitReader; +#[doc = "Pin 15\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PIN15_A { + #[doc = "0: Read: pin driver is low"] + LOW = 0, + #[doc = "1: Read: pin driver is high"] + HIGH = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PIN15_A) -> Self { + variant as u8 != 0 + } +} +impl PIN15_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> PIN15_A { + match self.bits { + false => PIN15_A::LOW, + true => PIN15_A::HIGH, + } + } + #[doc = "Checks if the value of the field is `LOW`"] + #[inline(always)] + pub fn is_low(&self) -> bool { + *self == PIN15_A::LOW + } + #[doc = "Checks if the value of the field is `HIGH`"] + #[inline(always)] + pub fn is_high(&self) -> bool { + *self == PIN15_A::HIGH + } +} +#[doc = "Pin 15\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PIN15_AW { + #[doc = "1: Write: writing a '1' sets the pin low; writing a '0' has no effect"] + CLEAR = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PIN15_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `PIN15` writer - Pin 15"] +pub type PIN15_W<'a, const O: u8> = crate::BitWriter1C<'a, u32, OUTCLR_SPEC, PIN15_AW, O>; +impl<'a, const O: u8> PIN15_W<'a, O> { + #[doc = "Write: writing a '1' sets the pin low; writing a '0' has no effect"] + #[inline(always)] + pub fn clear(self) -> &'a mut W { + self.variant(PIN15_AW::CLEAR) + } +} +#[doc = "Field `PIN16` reader - Pin 16"] +pub type PIN16_R = crate::BitReader; +#[doc = "Pin 16\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PIN16_A { + #[doc = "0: Read: pin driver is low"] + LOW = 0, + #[doc = "1: Read: pin driver is high"] + HIGH = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PIN16_A) -> Self { + variant as u8 != 0 + } +} +impl PIN16_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> PIN16_A { + match self.bits { + false => PIN16_A::LOW, + true => PIN16_A::HIGH, + } + } + #[doc = "Checks if the value of the field is `LOW`"] + #[inline(always)] + pub fn is_low(&self) -> bool { + *self == PIN16_A::LOW + } + #[doc = "Checks if the value of the field is `HIGH`"] + #[inline(always)] + pub fn is_high(&self) -> bool { + *self == PIN16_A::HIGH + } +} +#[doc = "Pin 16\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PIN16_AW { + #[doc = "1: Write: writing a '1' sets the pin low; writing a '0' has no effect"] + CLEAR = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PIN16_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `PIN16` writer - Pin 16"] +pub type PIN16_W<'a, const O: u8> = crate::BitWriter1C<'a, u32, OUTCLR_SPEC, PIN16_AW, O>; +impl<'a, const O: u8> PIN16_W<'a, O> { + #[doc = "Write: writing a '1' sets the pin low; writing a '0' has no effect"] + #[inline(always)] + pub fn clear(self) -> &'a mut W { + self.variant(PIN16_AW::CLEAR) + } +} +#[doc = "Field `PIN17` reader - Pin 17"] +pub type PIN17_R = crate::BitReader; +#[doc = "Pin 17\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PIN17_A { + #[doc = "0: Read: pin driver is low"] + LOW = 0, + #[doc = "1: Read: pin driver is high"] + HIGH = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PIN17_A) -> Self { + variant as u8 != 0 + } +} +impl PIN17_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> PIN17_A { + match self.bits { + false => PIN17_A::LOW, + true => PIN17_A::HIGH, + } + } + #[doc = "Checks if the value of the field is `LOW`"] + #[inline(always)] + pub fn is_low(&self) -> bool { + *self == PIN17_A::LOW + } + #[doc = "Checks if the value of the field is `HIGH`"] + #[inline(always)] + pub fn is_high(&self) -> bool { + *self == PIN17_A::HIGH + } +} +#[doc = "Pin 17\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PIN17_AW { + #[doc = "1: Write: writing a '1' sets the pin low; writing a '0' has no effect"] + CLEAR = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PIN17_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `PIN17` writer - Pin 17"] +pub type PIN17_W<'a, const O: u8> = crate::BitWriter1C<'a, u32, OUTCLR_SPEC, PIN17_AW, O>; +impl<'a, const O: u8> PIN17_W<'a, O> { + #[doc = "Write: writing a '1' sets the pin low; writing a '0' has no effect"] + #[inline(always)] + pub fn clear(self) -> &'a mut W { + self.variant(PIN17_AW::CLEAR) + } +} +#[doc = "Field `PIN18` reader - Pin 18"] +pub type PIN18_R = crate::BitReader; +#[doc = "Pin 18\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PIN18_A { + #[doc = "0: Read: pin driver is low"] + LOW = 0, + #[doc = "1: Read: pin driver is high"] + HIGH = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PIN18_A) -> Self { + variant as u8 != 0 + } +} +impl PIN18_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> PIN18_A { + match self.bits { + false => PIN18_A::LOW, + true => PIN18_A::HIGH, + } + } + #[doc = "Checks if the value of the field is `LOW`"] + #[inline(always)] + pub fn is_low(&self) -> bool { + *self == PIN18_A::LOW + } + #[doc = "Checks if the value of the field is `HIGH`"] + #[inline(always)] + pub fn is_high(&self) -> bool { + *self == PIN18_A::HIGH + } +} +#[doc = "Pin 18\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PIN18_AW { + #[doc = "1: Write: writing a '1' sets the pin low; writing a '0' has no effect"] + CLEAR = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PIN18_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `PIN18` writer - Pin 18"] +pub type PIN18_W<'a, const O: u8> = crate::BitWriter1C<'a, u32, OUTCLR_SPEC, PIN18_AW, O>; +impl<'a, const O: u8> PIN18_W<'a, O> { + #[doc = "Write: writing a '1' sets the pin low; writing a '0' has no effect"] + #[inline(always)] + pub fn clear(self) -> &'a mut W { + self.variant(PIN18_AW::CLEAR) + } +} +#[doc = "Field `PIN19` reader - Pin 19"] +pub type PIN19_R = crate::BitReader; +#[doc = "Pin 19\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PIN19_A { + #[doc = "0: Read: pin driver is low"] + LOW = 0, + #[doc = "1: Read: pin driver is high"] + HIGH = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PIN19_A) -> Self { + variant as u8 != 0 + } +} +impl PIN19_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> PIN19_A { + match self.bits { + false => PIN19_A::LOW, + true => PIN19_A::HIGH, + } + } + #[doc = "Checks if the value of the field is `LOW`"] + #[inline(always)] + pub fn is_low(&self) -> bool { + *self == PIN19_A::LOW + } + #[doc = "Checks if the value of the field is `HIGH`"] + #[inline(always)] + pub fn is_high(&self) -> bool { + *self == PIN19_A::HIGH + } +} +#[doc = "Pin 19\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PIN19_AW { + #[doc = "1: Write: writing a '1' sets the pin low; writing a '0' has no effect"] + CLEAR = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PIN19_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `PIN19` writer - Pin 19"] +pub type PIN19_W<'a, const O: u8> = crate::BitWriter1C<'a, u32, OUTCLR_SPEC, PIN19_AW, O>; +impl<'a, const O: u8> PIN19_W<'a, O> { + #[doc = "Write: writing a '1' sets the pin low; writing a '0' has no effect"] + #[inline(always)] + pub fn clear(self) -> &'a mut W { + self.variant(PIN19_AW::CLEAR) + } +} +#[doc = "Field `PIN20` reader - Pin 20"] +pub type PIN20_R = crate::BitReader; +#[doc = "Pin 20\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PIN20_A { + #[doc = "0: Read: pin driver is low"] + LOW = 0, + #[doc = "1: Read: pin driver is high"] + HIGH = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PIN20_A) -> Self { + variant as u8 != 0 + } +} +impl PIN20_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> PIN20_A { + match self.bits { + false => PIN20_A::LOW, + true => PIN20_A::HIGH, + } + } + #[doc = "Checks if the value of the field is `LOW`"] + #[inline(always)] + pub fn is_low(&self) -> bool { + *self == PIN20_A::LOW + } + #[doc = "Checks if the value of the field is `HIGH`"] + #[inline(always)] + pub fn is_high(&self) -> bool { + *self == PIN20_A::HIGH + } +} +#[doc = "Pin 20\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PIN20_AW { + #[doc = "1: Write: writing a '1' sets the pin low; writing a '0' has no effect"] + CLEAR = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PIN20_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `PIN20` writer - Pin 20"] +pub type PIN20_W<'a, const O: u8> = crate::BitWriter1C<'a, u32, OUTCLR_SPEC, PIN20_AW, O>; +impl<'a, const O: u8> PIN20_W<'a, O> { + #[doc = "Write: writing a '1' sets the pin low; writing a '0' has no effect"] + #[inline(always)] + pub fn clear(self) -> &'a mut W { + self.variant(PIN20_AW::CLEAR) + } +} +#[doc = "Field `PIN21` reader - Pin 21"] +pub type PIN21_R = crate::BitReader; +#[doc = "Pin 21\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PIN21_A { + #[doc = "0: Read: pin driver is low"] + LOW = 0, + #[doc = "1: Read: pin driver is high"] + HIGH = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PIN21_A) -> Self { + variant as u8 != 0 + } +} +impl PIN21_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> PIN21_A { + match self.bits { + false => PIN21_A::LOW, + true => PIN21_A::HIGH, + } + } + #[doc = "Checks if the value of the field is `LOW`"] + #[inline(always)] + pub fn is_low(&self) -> bool { + *self == PIN21_A::LOW + } + #[doc = "Checks if the value of the field is `HIGH`"] + #[inline(always)] + pub fn is_high(&self) -> bool { + *self == PIN21_A::HIGH + } +} +#[doc = "Pin 21\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PIN21_AW { + #[doc = "1: Write: writing a '1' sets the pin low; writing a '0' has no effect"] + CLEAR = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PIN21_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `PIN21` writer - Pin 21"] +pub type PIN21_W<'a, const O: u8> = crate::BitWriter1C<'a, u32, OUTCLR_SPEC, PIN21_AW, O>; +impl<'a, const O: u8> PIN21_W<'a, O> { + #[doc = "Write: writing a '1' sets the pin low; writing a '0' has no effect"] + #[inline(always)] + pub fn clear(self) -> &'a mut W { + self.variant(PIN21_AW::CLEAR) + } +} +#[doc = "Field `PIN22` reader - Pin 22"] +pub type PIN22_R = crate::BitReader; +#[doc = "Pin 22\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PIN22_A { + #[doc = "0: Read: pin driver is low"] + LOW = 0, + #[doc = "1: Read: pin driver is high"] + HIGH = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PIN22_A) -> Self { + variant as u8 != 0 + } +} +impl PIN22_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> PIN22_A { + match self.bits { + false => PIN22_A::LOW, + true => PIN22_A::HIGH, + } + } + #[doc = "Checks if the value of the field is `LOW`"] + #[inline(always)] + pub fn is_low(&self) -> bool { + *self == PIN22_A::LOW + } + #[doc = "Checks if the value of the field is `HIGH`"] + #[inline(always)] + pub fn is_high(&self) -> bool { + *self == PIN22_A::HIGH + } +} +#[doc = "Pin 22\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PIN22_AW { + #[doc = "1: Write: writing a '1' sets the pin low; writing a '0' has no effect"] + CLEAR = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PIN22_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `PIN22` writer - Pin 22"] +pub type PIN22_W<'a, const O: u8> = crate::BitWriter1C<'a, u32, OUTCLR_SPEC, PIN22_AW, O>; +impl<'a, const O: u8> PIN22_W<'a, O> { + #[doc = "Write: writing a '1' sets the pin low; writing a '0' has no effect"] + #[inline(always)] + pub fn clear(self) -> &'a mut W { + self.variant(PIN22_AW::CLEAR) + } +} +#[doc = "Field `PIN23` reader - Pin 23"] +pub type PIN23_R = crate::BitReader; +#[doc = "Pin 23\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PIN23_A { + #[doc = "0: Read: pin driver is low"] + LOW = 0, + #[doc = "1: Read: pin driver is high"] + HIGH = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PIN23_A) -> Self { + variant as u8 != 0 + } +} +impl PIN23_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> PIN23_A { + match self.bits { + false => PIN23_A::LOW, + true => PIN23_A::HIGH, + } + } + #[doc = "Checks if the value of the field is `LOW`"] + #[inline(always)] + pub fn is_low(&self) -> bool { + *self == PIN23_A::LOW + } + #[doc = "Checks if the value of the field is `HIGH`"] + #[inline(always)] + pub fn is_high(&self) -> bool { + *self == PIN23_A::HIGH + } +} +#[doc = "Pin 23\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PIN23_AW { + #[doc = "1: Write: writing a '1' sets the pin low; writing a '0' has no effect"] + CLEAR = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PIN23_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `PIN23` writer - Pin 23"] +pub type PIN23_W<'a, const O: u8> = crate::BitWriter1C<'a, u32, OUTCLR_SPEC, PIN23_AW, O>; +impl<'a, const O: u8> PIN23_W<'a, O> { + #[doc = "Write: writing a '1' sets the pin low; writing a '0' has no effect"] + #[inline(always)] + pub fn clear(self) -> &'a mut W { + self.variant(PIN23_AW::CLEAR) + } +} +#[doc = "Field `PIN24` reader - Pin 24"] +pub type PIN24_R = crate::BitReader; +#[doc = "Pin 24\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PIN24_A { + #[doc = "0: Read: pin driver is low"] + LOW = 0, + #[doc = "1: Read: pin driver is high"] + HIGH = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PIN24_A) -> Self { + variant as u8 != 0 + } +} +impl PIN24_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> PIN24_A { + match self.bits { + false => PIN24_A::LOW, + true => PIN24_A::HIGH, + } + } + #[doc = "Checks if the value of the field is `LOW`"] + #[inline(always)] + pub fn is_low(&self) -> bool { + *self == PIN24_A::LOW + } + #[doc = "Checks if the value of the field is `HIGH`"] + #[inline(always)] + pub fn is_high(&self) -> bool { + *self == PIN24_A::HIGH + } +} +#[doc = "Pin 24\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PIN24_AW { + #[doc = "1: Write: writing a '1' sets the pin low; writing a '0' has no effect"] + CLEAR = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PIN24_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `PIN24` writer - Pin 24"] +pub type PIN24_W<'a, const O: u8> = crate::BitWriter1C<'a, u32, OUTCLR_SPEC, PIN24_AW, O>; +impl<'a, const O: u8> PIN24_W<'a, O> { + #[doc = "Write: writing a '1' sets the pin low; writing a '0' has no effect"] + #[inline(always)] + pub fn clear(self) -> &'a mut W { + self.variant(PIN24_AW::CLEAR) + } +} +#[doc = "Field `PIN25` reader - Pin 25"] +pub type PIN25_R = crate::BitReader; +#[doc = "Pin 25\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PIN25_A { + #[doc = "0: Read: pin driver is low"] + LOW = 0, + #[doc = "1: Read: pin driver is high"] + HIGH = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PIN25_A) -> Self { + variant as u8 != 0 + } +} +impl PIN25_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> PIN25_A { + match self.bits { + false => PIN25_A::LOW, + true => PIN25_A::HIGH, + } + } + #[doc = "Checks if the value of the field is `LOW`"] + #[inline(always)] + pub fn is_low(&self) -> bool { + *self == PIN25_A::LOW + } + #[doc = "Checks if the value of the field is `HIGH`"] + #[inline(always)] + pub fn is_high(&self) -> bool { + *self == PIN25_A::HIGH + } +} +#[doc = "Pin 25\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PIN25_AW { + #[doc = "1: Write: writing a '1' sets the pin low; writing a '0' has no effect"] + CLEAR = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PIN25_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `PIN25` writer - Pin 25"] +pub type PIN25_W<'a, const O: u8> = crate::BitWriter1C<'a, u32, OUTCLR_SPEC, PIN25_AW, O>; +impl<'a, const O: u8> PIN25_W<'a, O> { + #[doc = "Write: writing a '1' sets the pin low; writing a '0' has no effect"] + #[inline(always)] + pub fn clear(self) -> &'a mut W { + self.variant(PIN25_AW::CLEAR) + } +} +#[doc = "Field `PIN26` reader - Pin 26"] +pub type PIN26_R = crate::BitReader; +#[doc = "Pin 26\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PIN26_A { + #[doc = "0: Read: pin driver is low"] + LOW = 0, + #[doc = "1: Read: pin driver is high"] + HIGH = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PIN26_A) -> Self { + variant as u8 != 0 + } +} +impl PIN26_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> PIN26_A { + match self.bits { + false => PIN26_A::LOW, + true => PIN26_A::HIGH, + } + } + #[doc = "Checks if the value of the field is `LOW`"] + #[inline(always)] + pub fn is_low(&self) -> bool { + *self == PIN26_A::LOW + } + #[doc = "Checks if the value of the field is `HIGH`"] + #[inline(always)] + pub fn is_high(&self) -> bool { + *self == PIN26_A::HIGH + } +} +#[doc = "Pin 26\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PIN26_AW { + #[doc = "1: Write: writing a '1' sets the pin low; writing a '0' has no effect"] + CLEAR = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PIN26_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `PIN26` writer - Pin 26"] +pub type PIN26_W<'a, const O: u8> = crate::BitWriter1C<'a, u32, OUTCLR_SPEC, PIN26_AW, O>; +impl<'a, const O: u8> PIN26_W<'a, O> { + #[doc = "Write: writing a '1' sets the pin low; writing a '0' has no effect"] + #[inline(always)] + pub fn clear(self) -> &'a mut W { + self.variant(PIN26_AW::CLEAR) + } +} +#[doc = "Field `PIN27` reader - Pin 27"] +pub type PIN27_R = crate::BitReader; +#[doc = "Pin 27\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PIN27_A { + #[doc = "0: Read: pin driver is low"] + LOW = 0, + #[doc = "1: Read: pin driver is high"] + HIGH = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PIN27_A) -> Self { + variant as u8 != 0 + } +} +impl PIN27_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> PIN27_A { + match self.bits { + false => PIN27_A::LOW, + true => PIN27_A::HIGH, + } + } + #[doc = "Checks if the value of the field is `LOW`"] + #[inline(always)] + pub fn is_low(&self) -> bool { + *self == PIN27_A::LOW + } + #[doc = "Checks if the value of the field is `HIGH`"] + #[inline(always)] + pub fn is_high(&self) -> bool { + *self == PIN27_A::HIGH + } +} +#[doc = "Pin 27\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PIN27_AW { + #[doc = "1: Write: writing a '1' sets the pin low; writing a '0' has no effect"] + CLEAR = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PIN27_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `PIN27` writer - Pin 27"] +pub type PIN27_W<'a, const O: u8> = crate::BitWriter1C<'a, u32, OUTCLR_SPEC, PIN27_AW, O>; +impl<'a, const O: u8> PIN27_W<'a, O> { + #[doc = "Write: writing a '1' sets the pin low; writing a '0' has no effect"] + #[inline(always)] + pub fn clear(self) -> &'a mut W { + self.variant(PIN27_AW::CLEAR) + } +} +#[doc = "Field `PIN28` reader - Pin 28"] +pub type PIN28_R = crate::BitReader; +#[doc = "Pin 28\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PIN28_A { + #[doc = "0: Read: pin driver is low"] + LOW = 0, + #[doc = "1: Read: pin driver is high"] + HIGH = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PIN28_A) -> Self { + variant as u8 != 0 + } +} +impl PIN28_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> PIN28_A { + match self.bits { + false => PIN28_A::LOW, + true => PIN28_A::HIGH, + } + } + #[doc = "Checks if the value of the field is `LOW`"] + #[inline(always)] + pub fn is_low(&self) -> bool { + *self == PIN28_A::LOW + } + #[doc = "Checks if the value of the field is `HIGH`"] + #[inline(always)] + pub fn is_high(&self) -> bool { + *self == PIN28_A::HIGH + } +} +#[doc = "Pin 28\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PIN28_AW { + #[doc = "1: Write: writing a '1' sets the pin low; writing a '0' has no effect"] + CLEAR = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PIN28_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `PIN28` writer - Pin 28"] +pub type PIN28_W<'a, const O: u8> = crate::BitWriter1C<'a, u32, OUTCLR_SPEC, PIN28_AW, O>; +impl<'a, const O: u8> PIN28_W<'a, O> { + #[doc = "Write: writing a '1' sets the pin low; writing a '0' has no effect"] + #[inline(always)] + pub fn clear(self) -> &'a mut W { + self.variant(PIN28_AW::CLEAR) + } +} +#[doc = "Field `PIN29` reader - Pin 29"] +pub type PIN29_R = crate::BitReader; +#[doc = "Pin 29\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PIN29_A { + #[doc = "0: Read: pin driver is low"] + LOW = 0, + #[doc = "1: Read: pin driver is high"] + HIGH = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PIN29_A) -> Self { + variant as u8 != 0 + } +} +impl PIN29_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> PIN29_A { + match self.bits { + false => PIN29_A::LOW, + true => PIN29_A::HIGH, + } + } + #[doc = "Checks if the value of the field is `LOW`"] + #[inline(always)] + pub fn is_low(&self) -> bool { + *self == PIN29_A::LOW + } + #[doc = "Checks if the value of the field is `HIGH`"] + #[inline(always)] + pub fn is_high(&self) -> bool { + *self == PIN29_A::HIGH + } +} +#[doc = "Pin 29\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PIN29_AW { + #[doc = "1: Write: writing a '1' sets the pin low; writing a '0' has no effect"] + CLEAR = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PIN29_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `PIN29` writer - Pin 29"] +pub type PIN29_W<'a, const O: u8> = crate::BitWriter1C<'a, u32, OUTCLR_SPEC, PIN29_AW, O>; +impl<'a, const O: u8> PIN29_W<'a, O> { + #[doc = "Write: writing a '1' sets the pin low; writing a '0' has no effect"] + #[inline(always)] + pub fn clear(self) -> &'a mut W { + self.variant(PIN29_AW::CLEAR) + } +} +#[doc = "Field `PIN30` reader - Pin 30"] +pub type PIN30_R = crate::BitReader; +#[doc = "Pin 30\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PIN30_A { + #[doc = "0: Read: pin driver is low"] + LOW = 0, + #[doc = "1: Read: pin driver is high"] + HIGH = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PIN30_A) -> Self { + variant as u8 != 0 + } +} +impl PIN30_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> PIN30_A { + match self.bits { + false => PIN30_A::LOW, + true => PIN30_A::HIGH, + } + } + #[doc = "Checks if the value of the field is `LOW`"] + #[inline(always)] + pub fn is_low(&self) -> bool { + *self == PIN30_A::LOW + } + #[doc = "Checks if the value of the field is `HIGH`"] + #[inline(always)] + pub fn is_high(&self) -> bool { + *self == PIN30_A::HIGH + } +} +#[doc = "Pin 30\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PIN30_AW { + #[doc = "1: Write: writing a '1' sets the pin low; writing a '0' has no effect"] + CLEAR = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PIN30_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `PIN30` writer - Pin 30"] +pub type PIN30_W<'a, const O: u8> = crate::BitWriter1C<'a, u32, OUTCLR_SPEC, PIN30_AW, O>; +impl<'a, const O: u8> PIN30_W<'a, O> { + #[doc = "Write: writing a '1' sets the pin low; writing a '0' has no effect"] + #[inline(always)] + pub fn clear(self) -> &'a mut W { + self.variant(PIN30_AW::CLEAR) + } +} +#[doc = "Field `PIN31` reader - Pin 31"] +pub type PIN31_R = crate::BitReader; +#[doc = "Pin 31\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PIN31_A { + #[doc = "0: Read: pin driver is low"] + LOW = 0, + #[doc = "1: Read: pin driver is high"] + HIGH = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PIN31_A) -> Self { + variant as u8 != 0 + } +} +impl PIN31_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> PIN31_A { + match self.bits { + false => PIN31_A::LOW, + true => PIN31_A::HIGH, + } + } + #[doc = "Checks if the value of the field is `LOW`"] + #[inline(always)] + pub fn is_low(&self) -> bool { + *self == PIN31_A::LOW + } + #[doc = "Checks if the value of the field is `HIGH`"] + #[inline(always)] + pub fn is_high(&self) -> bool { + *self == PIN31_A::HIGH + } +} +#[doc = "Pin 31\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PIN31_AW { + #[doc = "1: Write: writing a '1' sets the pin low; writing a '0' has no effect"] + CLEAR = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PIN31_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `PIN31` writer - Pin 31"] +pub type PIN31_W<'a, const O: u8> = crate::BitWriter1C<'a, u32, OUTCLR_SPEC, PIN31_AW, O>; +impl<'a, const O: u8> PIN31_W<'a, O> { + #[doc = "Write: writing a '1' sets the pin low; writing a '0' has no effect"] + #[inline(always)] + pub fn clear(self) -> &'a mut W { + self.variant(PIN31_AW::CLEAR) + } +} +impl R { + #[doc = "Bit 0 - Pin 0"] + #[inline(always)] + pub fn pin0(&self) -> PIN0_R { + PIN0_R::new((self.bits & 1) != 0) + } + #[doc = "Bit 1 - Pin 1"] + #[inline(always)] + pub fn pin1(&self) -> PIN1_R { + PIN1_R::new(((self.bits >> 1) & 1) != 0) + } + #[doc = "Bit 2 - Pin 2"] + #[inline(always)] + pub fn pin2(&self) -> PIN2_R { + PIN2_R::new(((self.bits >> 2) & 1) != 0) + } + #[doc = "Bit 3 - Pin 3"] + #[inline(always)] + pub fn pin3(&self) -> PIN3_R { + PIN3_R::new(((self.bits >> 3) & 1) != 0) + } + #[doc = "Bit 4 - Pin 4"] + #[inline(always)] + pub fn pin4(&self) -> PIN4_R { + PIN4_R::new(((self.bits >> 4) & 1) != 0) + } + #[doc = "Bit 5 - Pin 5"] + #[inline(always)] + pub fn pin5(&self) -> PIN5_R { + PIN5_R::new(((self.bits >> 5) & 1) != 0) + } + #[doc = "Bit 6 - Pin 6"] + #[inline(always)] + pub fn pin6(&self) -> PIN6_R { + PIN6_R::new(((self.bits >> 6) & 1) != 0) + } + #[doc = "Bit 7 - Pin 7"] + #[inline(always)] + pub fn pin7(&self) -> PIN7_R { + PIN7_R::new(((self.bits >> 7) & 1) != 0) + } + #[doc = "Bit 8 - Pin 8"] + #[inline(always)] + pub fn pin8(&self) -> PIN8_R { + PIN8_R::new(((self.bits >> 8) & 1) != 0) + } + #[doc = "Bit 9 - Pin 9"] + #[inline(always)] + pub fn pin9(&self) -> PIN9_R { + PIN9_R::new(((self.bits >> 9) & 1) != 0) + } + #[doc = "Bit 10 - Pin 10"] + #[inline(always)] + pub fn pin10(&self) -> PIN10_R { + PIN10_R::new(((self.bits >> 10) & 1) != 0) + } + #[doc = "Bit 11 - Pin 11"] + #[inline(always)] + pub fn pin11(&self) -> PIN11_R { + PIN11_R::new(((self.bits >> 11) & 1) != 0) + } + #[doc = "Bit 12 - Pin 12"] + #[inline(always)] + pub fn pin12(&self) -> PIN12_R { + PIN12_R::new(((self.bits >> 12) & 1) != 0) + } + #[doc = "Bit 13 - Pin 13"] + #[inline(always)] + pub fn pin13(&self) -> PIN13_R { + PIN13_R::new(((self.bits >> 13) & 1) != 0) + } + #[doc = "Bit 14 - Pin 14"] + #[inline(always)] + pub fn pin14(&self) -> PIN14_R { + PIN14_R::new(((self.bits >> 14) & 1) != 0) + } + #[doc = "Bit 15 - Pin 15"] + #[inline(always)] + pub fn pin15(&self) -> PIN15_R { + PIN15_R::new(((self.bits >> 15) & 1) != 0) + } + #[doc = "Bit 16 - Pin 16"] + #[inline(always)] + pub fn pin16(&self) -> PIN16_R { + PIN16_R::new(((self.bits >> 16) & 1) != 0) + } + #[doc = "Bit 17 - Pin 17"] + #[inline(always)] + pub fn pin17(&self) -> PIN17_R { + PIN17_R::new(((self.bits >> 17) & 1) != 0) + } + #[doc = "Bit 18 - Pin 18"] + #[inline(always)] + pub fn pin18(&self) -> PIN18_R { + PIN18_R::new(((self.bits >> 18) & 1) != 0) + } + #[doc = "Bit 19 - Pin 19"] + #[inline(always)] + pub fn pin19(&self) -> PIN19_R { + PIN19_R::new(((self.bits >> 19) & 1) != 0) + } + #[doc = "Bit 20 - Pin 20"] + #[inline(always)] + pub fn pin20(&self) -> PIN20_R { + PIN20_R::new(((self.bits >> 20) & 1) != 0) + } + #[doc = "Bit 21 - Pin 21"] + #[inline(always)] + pub fn pin21(&self) -> PIN21_R { + PIN21_R::new(((self.bits >> 21) & 1) != 0) + } + #[doc = "Bit 22 - Pin 22"] + #[inline(always)] + pub fn pin22(&self) -> PIN22_R { + PIN22_R::new(((self.bits >> 22) & 1) != 0) + } + #[doc = "Bit 23 - Pin 23"] + #[inline(always)] + pub fn pin23(&self) -> PIN23_R { + PIN23_R::new(((self.bits >> 23) & 1) != 0) + } + #[doc = "Bit 24 - Pin 24"] + #[inline(always)] + pub fn pin24(&self) -> PIN24_R { + PIN24_R::new(((self.bits >> 24) & 1) != 0) + } + #[doc = "Bit 25 - Pin 25"] + #[inline(always)] + pub fn pin25(&self) -> PIN25_R { + PIN25_R::new(((self.bits >> 25) & 1) != 0) + } + #[doc = "Bit 26 - Pin 26"] + #[inline(always)] + pub fn pin26(&self) -> PIN26_R { + PIN26_R::new(((self.bits >> 26) & 1) != 0) + } + #[doc = "Bit 27 - Pin 27"] + #[inline(always)] + pub fn pin27(&self) -> PIN27_R { + PIN27_R::new(((self.bits >> 27) & 1) != 0) + } + #[doc = "Bit 28 - Pin 28"] + #[inline(always)] + pub fn pin28(&self) -> PIN28_R { + PIN28_R::new(((self.bits >> 28) & 1) != 0) + } + #[doc = "Bit 29 - Pin 29"] + #[inline(always)] + pub fn pin29(&self) -> PIN29_R { + PIN29_R::new(((self.bits >> 29) & 1) != 0) + } + #[doc = "Bit 30 - Pin 30"] + #[inline(always)] + pub fn pin30(&self) -> PIN30_R { + PIN30_R::new(((self.bits >> 30) & 1) != 0) + } + #[doc = "Bit 31 - Pin 31"] + #[inline(always)] + pub fn pin31(&self) -> PIN31_R { + PIN31_R::new(((self.bits >> 31) & 1) != 0) + } +} +impl W { + #[doc = "Bit 0 - Pin 0"] + #[inline(always)] + #[must_use] + pub fn pin0(&mut self) -> PIN0_W<0> { + PIN0_W::new(self) + } + #[doc = "Bit 1 - Pin 1"] + #[inline(always)] + #[must_use] + pub fn pin1(&mut self) -> PIN1_W<1> { + PIN1_W::new(self) + } + #[doc = "Bit 2 - Pin 2"] + #[inline(always)] + #[must_use] + pub fn pin2(&mut self) -> PIN2_W<2> { + PIN2_W::new(self) + } + #[doc = "Bit 3 - Pin 3"] + #[inline(always)] + #[must_use] + pub fn pin3(&mut self) -> PIN3_W<3> { + PIN3_W::new(self) + } + #[doc = "Bit 4 - Pin 4"] + #[inline(always)] + #[must_use] + pub fn pin4(&mut self) -> PIN4_W<4> { + PIN4_W::new(self) + } + #[doc = "Bit 5 - Pin 5"] + #[inline(always)] + #[must_use] + pub fn pin5(&mut self) -> PIN5_W<5> { + PIN5_W::new(self) + } + #[doc = "Bit 6 - Pin 6"] + #[inline(always)] + #[must_use] + pub fn pin6(&mut self) -> PIN6_W<6> { + PIN6_W::new(self) + } + #[doc = "Bit 7 - Pin 7"] + #[inline(always)] + #[must_use] + pub fn pin7(&mut self) -> PIN7_W<7> { + PIN7_W::new(self) + } + #[doc = "Bit 8 - Pin 8"] + #[inline(always)] + #[must_use] + pub fn pin8(&mut self) -> PIN8_W<8> { + PIN8_W::new(self) + } + #[doc = "Bit 9 - Pin 9"] + #[inline(always)] + #[must_use] + pub fn pin9(&mut self) -> PIN9_W<9> { + PIN9_W::new(self) + } + #[doc = "Bit 10 - Pin 10"] + #[inline(always)] + #[must_use] + pub fn pin10(&mut self) -> PIN10_W<10> { + PIN10_W::new(self) + } + #[doc = "Bit 11 - Pin 11"] + #[inline(always)] + #[must_use] + pub fn pin11(&mut self) -> PIN11_W<11> { + PIN11_W::new(self) + } + #[doc = "Bit 12 - Pin 12"] + #[inline(always)] + #[must_use] + pub fn pin12(&mut self) -> PIN12_W<12> { + PIN12_W::new(self) + } + #[doc = "Bit 13 - Pin 13"] + #[inline(always)] + #[must_use] + pub fn pin13(&mut self) -> PIN13_W<13> { + PIN13_W::new(self) + } + #[doc = "Bit 14 - Pin 14"] + #[inline(always)] + #[must_use] + pub fn pin14(&mut self) -> PIN14_W<14> { + PIN14_W::new(self) + } + #[doc = "Bit 15 - Pin 15"] + #[inline(always)] + #[must_use] + pub fn pin15(&mut self) -> PIN15_W<15> { + PIN15_W::new(self) + } + #[doc = "Bit 16 - Pin 16"] + #[inline(always)] + #[must_use] + pub fn pin16(&mut self) -> PIN16_W<16> { + PIN16_W::new(self) + } + #[doc = "Bit 17 - Pin 17"] + #[inline(always)] + #[must_use] + pub fn pin17(&mut self) -> PIN17_W<17> { + PIN17_W::new(self) + } + #[doc = "Bit 18 - Pin 18"] + #[inline(always)] + #[must_use] + pub fn pin18(&mut self) -> PIN18_W<18> { + PIN18_W::new(self) + } + #[doc = "Bit 19 - Pin 19"] + #[inline(always)] + #[must_use] + pub fn pin19(&mut self) -> PIN19_W<19> { + PIN19_W::new(self) + } + #[doc = "Bit 20 - Pin 20"] + #[inline(always)] + #[must_use] + pub fn pin20(&mut self) -> PIN20_W<20> { + PIN20_W::new(self) + } + #[doc = "Bit 21 - Pin 21"] + #[inline(always)] + #[must_use] + pub fn pin21(&mut self) -> PIN21_W<21> { + PIN21_W::new(self) + } + #[doc = "Bit 22 - Pin 22"] + #[inline(always)] + #[must_use] + pub fn pin22(&mut self) -> PIN22_W<22> { + PIN22_W::new(self) + } + #[doc = "Bit 23 - Pin 23"] + #[inline(always)] + #[must_use] + pub fn pin23(&mut self) -> PIN23_W<23> { + PIN23_W::new(self) + } + #[doc = "Bit 24 - Pin 24"] + #[inline(always)] + #[must_use] + pub fn pin24(&mut self) -> PIN24_W<24> { + PIN24_W::new(self) + } + #[doc = "Bit 25 - Pin 25"] + #[inline(always)] + #[must_use] + pub fn pin25(&mut self) -> PIN25_W<25> { + PIN25_W::new(self) + } + #[doc = "Bit 26 - Pin 26"] + #[inline(always)] + #[must_use] + pub fn pin26(&mut self) -> PIN26_W<26> { + PIN26_W::new(self) + } + #[doc = "Bit 27 - Pin 27"] + #[inline(always)] + #[must_use] + pub fn pin27(&mut self) -> PIN27_W<27> { + PIN27_W::new(self) + } + #[doc = "Bit 28 - Pin 28"] + #[inline(always)] + #[must_use] + pub fn pin28(&mut self) -> PIN28_W<28> { + PIN28_W::new(self) + } + #[doc = "Bit 29 - Pin 29"] + #[inline(always)] + #[must_use] + pub fn pin29(&mut self) -> PIN29_W<29> { + PIN29_W::new(self) + } + #[doc = "Bit 30 - Pin 30"] + #[inline(always)] + #[must_use] + pub fn pin30(&mut self) -> PIN30_W<30> { + PIN30_W::new(self) + } + #[doc = "Bit 31 - Pin 31"] + #[inline(always)] + #[must_use] + pub fn pin31(&mut self) -> PIN31_W<31> { + PIN31_W::new(self) + } + #[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 = "Clear individual bits in GPIO port\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 [outclr](index.html) module"] +pub struct OUTCLR_SPEC; +impl crate::RegisterSpec for OUTCLR_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [outclr::R](R) reader structure"] +impl crate::Readable for OUTCLR_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [outclr::W](W) writer structure"] +impl crate::Writable for OUTCLR_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0xffff_ffff; +} +#[doc = "`reset()` method sets OUTCLR to value 0"] +impl crate::Resettable for OUTCLR_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/p0/outset.rs b/down-the-stack/dk_pac/src/p0/outset.rs new file mode 100644 index 0000000..a6cc1b6 --- /dev/null +++ b/down-the-stack/dk_pac/src/p0/outset.rs @@ -0,0 +1,2241 @@ +#[doc = "Register `OUTSET` 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 `OUTSET` 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 `PIN0` reader - Pin 0"] +pub type PIN0_R = crate::BitReader; +#[doc = "Pin 0\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PIN0_A { + #[doc = "0: Read: pin driver is low"] + LOW = 0, + #[doc = "1: Read: pin driver is high"] + HIGH = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PIN0_A) -> Self { + variant as u8 != 0 + } +} +impl PIN0_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> PIN0_A { + match self.bits { + false => PIN0_A::LOW, + true => PIN0_A::HIGH, + } + } + #[doc = "Checks if the value of the field is `LOW`"] + #[inline(always)] + pub fn is_low(&self) -> bool { + *self == PIN0_A::LOW + } + #[doc = "Checks if the value of the field is `HIGH`"] + #[inline(always)] + pub fn is_high(&self) -> bool { + *self == PIN0_A::HIGH + } +} +#[doc = "Pin 0\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PIN0_AW { + #[doc = "1: Write: writing a '1' sets the pin high; writing a '0' has no effect"] + SET = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PIN0_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `PIN0` writer - Pin 0"] +pub type PIN0_W<'a, const O: u8> = crate::BitWriter1S<'a, u32, OUTSET_SPEC, PIN0_AW, O>; +impl<'a, const O: u8> PIN0_W<'a, O> { + #[doc = "Write: writing a '1' sets the pin high; writing a '0' has no effect"] + #[inline(always)] + pub fn set(self) -> &'a mut W { + self.variant(PIN0_AW::SET) + } +} +#[doc = "Field `PIN1` reader - Pin 1"] +pub type PIN1_R = crate::BitReader; +#[doc = "Pin 1\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PIN1_A { + #[doc = "0: Read: pin driver is low"] + LOW = 0, + #[doc = "1: Read: pin driver is high"] + HIGH = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PIN1_A) -> Self { + variant as u8 != 0 + } +} +impl PIN1_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> PIN1_A { + match self.bits { + false => PIN1_A::LOW, + true => PIN1_A::HIGH, + } + } + #[doc = "Checks if the value of the field is `LOW`"] + #[inline(always)] + pub fn is_low(&self) -> bool { + *self == PIN1_A::LOW + } + #[doc = "Checks if the value of the field is `HIGH`"] + #[inline(always)] + pub fn is_high(&self) -> bool { + *self == PIN1_A::HIGH + } +} +#[doc = "Pin 1\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PIN1_AW { + #[doc = "1: Write: writing a '1' sets the pin high; writing a '0' has no effect"] + SET = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PIN1_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `PIN1` writer - Pin 1"] +pub type PIN1_W<'a, const O: u8> = crate::BitWriter1S<'a, u32, OUTSET_SPEC, PIN1_AW, O>; +impl<'a, const O: u8> PIN1_W<'a, O> { + #[doc = "Write: writing a '1' sets the pin high; writing a '0' has no effect"] + #[inline(always)] + pub fn set(self) -> &'a mut W { + self.variant(PIN1_AW::SET) + } +} +#[doc = "Field `PIN2` reader - Pin 2"] +pub type PIN2_R = crate::BitReader; +#[doc = "Pin 2\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PIN2_A { + #[doc = "0: Read: pin driver is low"] + LOW = 0, + #[doc = "1: Read: pin driver is high"] + HIGH = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PIN2_A) -> Self { + variant as u8 != 0 + } +} +impl PIN2_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> PIN2_A { + match self.bits { + false => PIN2_A::LOW, + true => PIN2_A::HIGH, + } + } + #[doc = "Checks if the value of the field is `LOW`"] + #[inline(always)] + pub fn is_low(&self) -> bool { + *self == PIN2_A::LOW + } + #[doc = "Checks if the value of the field is `HIGH`"] + #[inline(always)] + pub fn is_high(&self) -> bool { + *self == PIN2_A::HIGH + } +} +#[doc = "Pin 2\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PIN2_AW { + #[doc = "1: Write: writing a '1' sets the pin high; writing a '0' has no effect"] + SET = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PIN2_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `PIN2` writer - Pin 2"] +pub type PIN2_W<'a, const O: u8> = crate::BitWriter1S<'a, u32, OUTSET_SPEC, PIN2_AW, O>; +impl<'a, const O: u8> PIN2_W<'a, O> { + #[doc = "Write: writing a '1' sets the pin high; writing a '0' has no effect"] + #[inline(always)] + pub fn set(self) -> &'a mut W { + self.variant(PIN2_AW::SET) + } +} +#[doc = "Field `PIN3` reader - Pin 3"] +pub type PIN3_R = crate::BitReader; +#[doc = "Pin 3\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PIN3_A { + #[doc = "0: Read: pin driver is low"] + LOW = 0, + #[doc = "1: Read: pin driver is high"] + HIGH = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PIN3_A) -> Self { + variant as u8 != 0 + } +} +impl PIN3_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> PIN3_A { + match self.bits { + false => PIN3_A::LOW, + true => PIN3_A::HIGH, + } + } + #[doc = "Checks if the value of the field is `LOW`"] + #[inline(always)] + pub fn is_low(&self) -> bool { + *self == PIN3_A::LOW + } + #[doc = "Checks if the value of the field is `HIGH`"] + #[inline(always)] + pub fn is_high(&self) -> bool { + *self == PIN3_A::HIGH + } +} +#[doc = "Pin 3\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PIN3_AW { + #[doc = "1: Write: writing a '1' sets the pin high; writing a '0' has no effect"] + SET = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PIN3_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `PIN3` writer - Pin 3"] +pub type PIN3_W<'a, const O: u8> = crate::BitWriter1S<'a, u32, OUTSET_SPEC, PIN3_AW, O>; +impl<'a, const O: u8> PIN3_W<'a, O> { + #[doc = "Write: writing a '1' sets the pin high; writing a '0' has no effect"] + #[inline(always)] + pub fn set(self) -> &'a mut W { + self.variant(PIN3_AW::SET) + } +} +#[doc = "Field `PIN4` reader - Pin 4"] +pub type PIN4_R = crate::BitReader; +#[doc = "Pin 4\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PIN4_A { + #[doc = "0: Read: pin driver is low"] + LOW = 0, + #[doc = "1: Read: pin driver is high"] + HIGH = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PIN4_A) -> Self { + variant as u8 != 0 + } +} +impl PIN4_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> PIN4_A { + match self.bits { + false => PIN4_A::LOW, + true => PIN4_A::HIGH, + } + } + #[doc = "Checks if the value of the field is `LOW`"] + #[inline(always)] + pub fn is_low(&self) -> bool { + *self == PIN4_A::LOW + } + #[doc = "Checks if the value of the field is `HIGH`"] + #[inline(always)] + pub fn is_high(&self) -> bool { + *self == PIN4_A::HIGH + } +} +#[doc = "Pin 4\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PIN4_AW { + #[doc = "1: Write: writing a '1' sets the pin high; writing a '0' has no effect"] + SET = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PIN4_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `PIN4` writer - Pin 4"] +pub type PIN4_W<'a, const O: u8> = crate::BitWriter1S<'a, u32, OUTSET_SPEC, PIN4_AW, O>; +impl<'a, const O: u8> PIN4_W<'a, O> { + #[doc = "Write: writing a '1' sets the pin high; writing a '0' has no effect"] + #[inline(always)] + pub fn set(self) -> &'a mut W { + self.variant(PIN4_AW::SET) + } +} +#[doc = "Field `PIN5` reader - Pin 5"] +pub type PIN5_R = crate::BitReader; +#[doc = "Pin 5\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PIN5_A { + #[doc = "0: Read: pin driver is low"] + LOW = 0, + #[doc = "1: Read: pin driver is high"] + HIGH = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PIN5_A) -> Self { + variant as u8 != 0 + } +} +impl PIN5_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> PIN5_A { + match self.bits { + false => PIN5_A::LOW, + true => PIN5_A::HIGH, + } + } + #[doc = "Checks if the value of the field is `LOW`"] + #[inline(always)] + pub fn is_low(&self) -> bool { + *self == PIN5_A::LOW + } + #[doc = "Checks if the value of the field is `HIGH`"] + #[inline(always)] + pub fn is_high(&self) -> bool { + *self == PIN5_A::HIGH + } +} +#[doc = "Pin 5\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PIN5_AW { + #[doc = "1: Write: writing a '1' sets the pin high; writing a '0' has no effect"] + SET = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PIN5_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `PIN5` writer - Pin 5"] +pub type PIN5_W<'a, const O: u8> = crate::BitWriter1S<'a, u32, OUTSET_SPEC, PIN5_AW, O>; +impl<'a, const O: u8> PIN5_W<'a, O> { + #[doc = "Write: writing a '1' sets the pin high; writing a '0' has no effect"] + #[inline(always)] + pub fn set(self) -> &'a mut W { + self.variant(PIN5_AW::SET) + } +} +#[doc = "Field `PIN6` reader - Pin 6"] +pub type PIN6_R = crate::BitReader; +#[doc = "Pin 6\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PIN6_A { + #[doc = "0: Read: pin driver is low"] + LOW = 0, + #[doc = "1: Read: pin driver is high"] + HIGH = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PIN6_A) -> Self { + variant as u8 != 0 + } +} +impl PIN6_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> PIN6_A { + match self.bits { + false => PIN6_A::LOW, + true => PIN6_A::HIGH, + } + } + #[doc = "Checks if the value of the field is `LOW`"] + #[inline(always)] + pub fn is_low(&self) -> bool { + *self == PIN6_A::LOW + } + #[doc = "Checks if the value of the field is `HIGH`"] + #[inline(always)] + pub fn is_high(&self) -> bool { + *self == PIN6_A::HIGH + } +} +#[doc = "Pin 6\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PIN6_AW { + #[doc = "1: Write: writing a '1' sets the pin high; writing a '0' has no effect"] + SET = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PIN6_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `PIN6` writer - Pin 6"] +pub type PIN6_W<'a, const O: u8> = crate::BitWriter1S<'a, u32, OUTSET_SPEC, PIN6_AW, O>; +impl<'a, const O: u8> PIN6_W<'a, O> { + #[doc = "Write: writing a '1' sets the pin high; writing a '0' has no effect"] + #[inline(always)] + pub fn set(self) -> &'a mut W { + self.variant(PIN6_AW::SET) + } +} +#[doc = "Field `PIN7` reader - Pin 7"] +pub type PIN7_R = crate::BitReader; +#[doc = "Pin 7\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PIN7_A { + #[doc = "0: Read: pin driver is low"] + LOW = 0, + #[doc = "1: Read: pin driver is high"] + HIGH = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PIN7_A) -> Self { + variant as u8 != 0 + } +} +impl PIN7_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> PIN7_A { + match self.bits { + false => PIN7_A::LOW, + true => PIN7_A::HIGH, + } + } + #[doc = "Checks if the value of the field is `LOW`"] + #[inline(always)] + pub fn is_low(&self) -> bool { + *self == PIN7_A::LOW + } + #[doc = "Checks if the value of the field is `HIGH`"] + #[inline(always)] + pub fn is_high(&self) -> bool { + *self == PIN7_A::HIGH + } +} +#[doc = "Pin 7\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PIN7_AW { + #[doc = "1: Write: writing a '1' sets the pin high; writing a '0' has no effect"] + SET = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PIN7_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `PIN7` writer - Pin 7"] +pub type PIN7_W<'a, const O: u8> = crate::BitWriter1S<'a, u32, OUTSET_SPEC, PIN7_AW, O>; +impl<'a, const O: u8> PIN7_W<'a, O> { + #[doc = "Write: writing a '1' sets the pin high; writing a '0' has no effect"] + #[inline(always)] + pub fn set(self) -> &'a mut W { + self.variant(PIN7_AW::SET) + } +} +#[doc = "Field `PIN8` reader - Pin 8"] +pub type PIN8_R = crate::BitReader; +#[doc = "Pin 8\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PIN8_A { + #[doc = "0: Read: pin driver is low"] + LOW = 0, + #[doc = "1: Read: pin driver is high"] + HIGH = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PIN8_A) -> Self { + variant as u8 != 0 + } +} +impl PIN8_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> PIN8_A { + match self.bits { + false => PIN8_A::LOW, + true => PIN8_A::HIGH, + } + } + #[doc = "Checks if the value of the field is `LOW`"] + #[inline(always)] + pub fn is_low(&self) -> bool { + *self == PIN8_A::LOW + } + #[doc = "Checks if the value of the field is `HIGH`"] + #[inline(always)] + pub fn is_high(&self) -> bool { + *self == PIN8_A::HIGH + } +} +#[doc = "Pin 8\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PIN8_AW { + #[doc = "1: Write: writing a '1' sets the pin high; writing a '0' has no effect"] + SET = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PIN8_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `PIN8` writer - Pin 8"] +pub type PIN8_W<'a, const O: u8> = crate::BitWriter1S<'a, u32, OUTSET_SPEC, PIN8_AW, O>; +impl<'a, const O: u8> PIN8_W<'a, O> { + #[doc = "Write: writing a '1' sets the pin high; writing a '0' has no effect"] + #[inline(always)] + pub fn set(self) -> &'a mut W { + self.variant(PIN8_AW::SET) + } +} +#[doc = "Field `PIN9` reader - Pin 9"] +pub type PIN9_R = crate::BitReader; +#[doc = "Pin 9\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PIN9_A { + #[doc = "0: Read: pin driver is low"] + LOW = 0, + #[doc = "1: Read: pin driver is high"] + HIGH = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PIN9_A) -> Self { + variant as u8 != 0 + } +} +impl PIN9_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> PIN9_A { + match self.bits { + false => PIN9_A::LOW, + true => PIN9_A::HIGH, + } + } + #[doc = "Checks if the value of the field is `LOW`"] + #[inline(always)] + pub fn is_low(&self) -> bool { + *self == PIN9_A::LOW + } + #[doc = "Checks if the value of the field is `HIGH`"] + #[inline(always)] + pub fn is_high(&self) -> bool { + *self == PIN9_A::HIGH + } +} +#[doc = "Pin 9\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PIN9_AW { + #[doc = "1: Write: writing a '1' sets the pin high; writing a '0' has no effect"] + SET = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PIN9_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `PIN9` writer - Pin 9"] +pub type PIN9_W<'a, const O: u8> = crate::BitWriter1S<'a, u32, OUTSET_SPEC, PIN9_AW, O>; +impl<'a, const O: u8> PIN9_W<'a, O> { + #[doc = "Write: writing a '1' sets the pin high; writing a '0' has no effect"] + #[inline(always)] + pub fn set(self) -> &'a mut W { + self.variant(PIN9_AW::SET) + } +} +#[doc = "Field `PIN10` reader - Pin 10"] +pub type PIN10_R = crate::BitReader; +#[doc = "Pin 10\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PIN10_A { + #[doc = "0: Read: pin driver is low"] + LOW = 0, + #[doc = "1: Read: pin driver is high"] + HIGH = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PIN10_A) -> Self { + variant as u8 != 0 + } +} +impl PIN10_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> PIN10_A { + match self.bits { + false => PIN10_A::LOW, + true => PIN10_A::HIGH, + } + } + #[doc = "Checks if the value of the field is `LOW`"] + #[inline(always)] + pub fn is_low(&self) -> bool { + *self == PIN10_A::LOW + } + #[doc = "Checks if the value of the field is `HIGH`"] + #[inline(always)] + pub fn is_high(&self) -> bool { + *self == PIN10_A::HIGH + } +} +#[doc = "Pin 10\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PIN10_AW { + #[doc = "1: Write: writing a '1' sets the pin high; writing a '0' has no effect"] + SET = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PIN10_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `PIN10` writer - Pin 10"] +pub type PIN10_W<'a, const O: u8> = crate::BitWriter1S<'a, u32, OUTSET_SPEC, PIN10_AW, O>; +impl<'a, const O: u8> PIN10_W<'a, O> { + #[doc = "Write: writing a '1' sets the pin high; writing a '0' has no effect"] + #[inline(always)] + pub fn set(self) -> &'a mut W { + self.variant(PIN10_AW::SET) + } +} +#[doc = "Field `PIN11` reader - Pin 11"] +pub type PIN11_R = crate::BitReader; +#[doc = "Pin 11\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PIN11_A { + #[doc = "0: Read: pin driver is low"] + LOW = 0, + #[doc = "1: Read: pin driver is high"] + HIGH = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PIN11_A) -> Self { + variant as u8 != 0 + } +} +impl PIN11_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> PIN11_A { + match self.bits { + false => PIN11_A::LOW, + true => PIN11_A::HIGH, + } + } + #[doc = "Checks if the value of the field is `LOW`"] + #[inline(always)] + pub fn is_low(&self) -> bool { + *self == PIN11_A::LOW + } + #[doc = "Checks if the value of the field is `HIGH`"] + #[inline(always)] + pub fn is_high(&self) -> bool { + *self == PIN11_A::HIGH + } +} +#[doc = "Pin 11\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PIN11_AW { + #[doc = "1: Write: writing a '1' sets the pin high; writing a '0' has no effect"] + SET = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PIN11_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `PIN11` writer - Pin 11"] +pub type PIN11_W<'a, const O: u8> = crate::BitWriter1S<'a, u32, OUTSET_SPEC, PIN11_AW, O>; +impl<'a, const O: u8> PIN11_W<'a, O> { + #[doc = "Write: writing a '1' sets the pin high; writing a '0' has no effect"] + #[inline(always)] + pub fn set(self) -> &'a mut W { + self.variant(PIN11_AW::SET) + } +} +#[doc = "Field `PIN12` reader - Pin 12"] +pub type PIN12_R = crate::BitReader; +#[doc = "Pin 12\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PIN12_A { + #[doc = "0: Read: pin driver is low"] + LOW = 0, + #[doc = "1: Read: pin driver is high"] + HIGH = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PIN12_A) -> Self { + variant as u8 != 0 + } +} +impl PIN12_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> PIN12_A { + match self.bits { + false => PIN12_A::LOW, + true => PIN12_A::HIGH, + } + } + #[doc = "Checks if the value of the field is `LOW`"] + #[inline(always)] + pub fn is_low(&self) -> bool { + *self == PIN12_A::LOW + } + #[doc = "Checks if the value of the field is `HIGH`"] + #[inline(always)] + pub fn is_high(&self) -> bool { + *self == PIN12_A::HIGH + } +} +#[doc = "Pin 12\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PIN12_AW { + #[doc = "1: Write: writing a '1' sets the pin high; writing a '0' has no effect"] + SET = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PIN12_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `PIN12` writer - Pin 12"] +pub type PIN12_W<'a, const O: u8> = crate::BitWriter1S<'a, u32, OUTSET_SPEC, PIN12_AW, O>; +impl<'a, const O: u8> PIN12_W<'a, O> { + #[doc = "Write: writing a '1' sets the pin high; writing a '0' has no effect"] + #[inline(always)] + pub fn set(self) -> &'a mut W { + self.variant(PIN12_AW::SET) + } +} +#[doc = "Field `PIN13` reader - Pin 13"] +pub type PIN13_R = crate::BitReader; +#[doc = "Pin 13\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PIN13_A { + #[doc = "0: Read: pin driver is low"] + LOW = 0, + #[doc = "1: Read: pin driver is high"] + HIGH = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PIN13_A) -> Self { + variant as u8 != 0 + } +} +impl PIN13_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> PIN13_A { + match self.bits { + false => PIN13_A::LOW, + true => PIN13_A::HIGH, + } + } + #[doc = "Checks if the value of the field is `LOW`"] + #[inline(always)] + pub fn is_low(&self) -> bool { + *self == PIN13_A::LOW + } + #[doc = "Checks if the value of the field is `HIGH`"] + #[inline(always)] + pub fn is_high(&self) -> bool { + *self == PIN13_A::HIGH + } +} +#[doc = "Pin 13\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PIN13_AW { + #[doc = "1: Write: writing a '1' sets the pin high; writing a '0' has no effect"] + SET = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PIN13_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `PIN13` writer - Pin 13"] +pub type PIN13_W<'a, const O: u8> = crate::BitWriter1S<'a, u32, OUTSET_SPEC, PIN13_AW, O>; +impl<'a, const O: u8> PIN13_W<'a, O> { + #[doc = "Write: writing a '1' sets the pin high; writing a '0' has no effect"] + #[inline(always)] + pub fn set(self) -> &'a mut W { + self.variant(PIN13_AW::SET) + } +} +#[doc = "Field `PIN14` reader - Pin 14"] +pub type PIN14_R = crate::BitReader; +#[doc = "Pin 14\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PIN14_A { + #[doc = "0: Read: pin driver is low"] + LOW = 0, + #[doc = "1: Read: pin driver is high"] + HIGH = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PIN14_A) -> Self { + variant as u8 != 0 + } +} +impl PIN14_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> PIN14_A { + match self.bits { + false => PIN14_A::LOW, + true => PIN14_A::HIGH, + } + } + #[doc = "Checks if the value of the field is `LOW`"] + #[inline(always)] + pub fn is_low(&self) -> bool { + *self == PIN14_A::LOW + } + #[doc = "Checks if the value of the field is `HIGH`"] + #[inline(always)] + pub fn is_high(&self) -> bool { + *self == PIN14_A::HIGH + } +} +#[doc = "Pin 14\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PIN14_AW { + #[doc = "1: Write: writing a '1' sets the pin high; writing a '0' has no effect"] + SET = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PIN14_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `PIN14` writer - Pin 14"] +pub type PIN14_W<'a, const O: u8> = crate::BitWriter1S<'a, u32, OUTSET_SPEC, PIN14_AW, O>; +impl<'a, const O: u8> PIN14_W<'a, O> { + #[doc = "Write: writing a '1' sets the pin high; writing a '0' has no effect"] + #[inline(always)] + pub fn set(self) -> &'a mut W { + self.variant(PIN14_AW::SET) + } +} +#[doc = "Field `PIN15` reader - Pin 15"] +pub type PIN15_R = crate::BitReader; +#[doc = "Pin 15\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PIN15_A { + #[doc = "0: Read: pin driver is low"] + LOW = 0, + #[doc = "1: Read: pin driver is high"] + HIGH = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PIN15_A) -> Self { + variant as u8 != 0 + } +} +impl PIN15_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> PIN15_A { + match self.bits { + false => PIN15_A::LOW, + true => PIN15_A::HIGH, + } + } + #[doc = "Checks if the value of the field is `LOW`"] + #[inline(always)] + pub fn is_low(&self) -> bool { + *self == PIN15_A::LOW + } + #[doc = "Checks if the value of the field is `HIGH`"] + #[inline(always)] + pub fn is_high(&self) -> bool { + *self == PIN15_A::HIGH + } +} +#[doc = "Pin 15\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PIN15_AW { + #[doc = "1: Write: writing a '1' sets the pin high; writing a '0' has no effect"] + SET = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PIN15_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `PIN15` writer - Pin 15"] +pub type PIN15_W<'a, const O: u8> = crate::BitWriter1S<'a, u32, OUTSET_SPEC, PIN15_AW, O>; +impl<'a, const O: u8> PIN15_W<'a, O> { + #[doc = "Write: writing a '1' sets the pin high; writing a '0' has no effect"] + #[inline(always)] + pub fn set(self) -> &'a mut W { + self.variant(PIN15_AW::SET) + } +} +#[doc = "Field `PIN16` reader - Pin 16"] +pub type PIN16_R = crate::BitReader; +#[doc = "Pin 16\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PIN16_A { + #[doc = "0: Read: pin driver is low"] + LOW = 0, + #[doc = "1: Read: pin driver is high"] + HIGH = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PIN16_A) -> Self { + variant as u8 != 0 + } +} +impl PIN16_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> PIN16_A { + match self.bits { + false => PIN16_A::LOW, + true => PIN16_A::HIGH, + } + } + #[doc = "Checks if the value of the field is `LOW`"] + #[inline(always)] + pub fn is_low(&self) -> bool { + *self == PIN16_A::LOW + } + #[doc = "Checks if the value of the field is `HIGH`"] + #[inline(always)] + pub fn is_high(&self) -> bool { + *self == PIN16_A::HIGH + } +} +#[doc = "Pin 16\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PIN16_AW { + #[doc = "1: Write: writing a '1' sets the pin high; writing a '0' has no effect"] + SET = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PIN16_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `PIN16` writer - Pin 16"] +pub type PIN16_W<'a, const O: u8> = crate::BitWriter1S<'a, u32, OUTSET_SPEC, PIN16_AW, O>; +impl<'a, const O: u8> PIN16_W<'a, O> { + #[doc = "Write: writing a '1' sets the pin high; writing a '0' has no effect"] + #[inline(always)] + pub fn set(self) -> &'a mut W { + self.variant(PIN16_AW::SET) + } +} +#[doc = "Field `PIN17` reader - Pin 17"] +pub type PIN17_R = crate::BitReader; +#[doc = "Pin 17\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PIN17_A { + #[doc = "0: Read: pin driver is low"] + LOW = 0, + #[doc = "1: Read: pin driver is high"] + HIGH = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PIN17_A) -> Self { + variant as u8 != 0 + } +} +impl PIN17_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> PIN17_A { + match self.bits { + false => PIN17_A::LOW, + true => PIN17_A::HIGH, + } + } + #[doc = "Checks if the value of the field is `LOW`"] + #[inline(always)] + pub fn is_low(&self) -> bool { + *self == PIN17_A::LOW + } + #[doc = "Checks if the value of the field is `HIGH`"] + #[inline(always)] + pub fn is_high(&self) -> bool { + *self == PIN17_A::HIGH + } +} +#[doc = "Pin 17\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PIN17_AW { + #[doc = "1: Write: writing a '1' sets the pin high; writing a '0' has no effect"] + SET = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PIN17_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `PIN17` writer - Pin 17"] +pub type PIN17_W<'a, const O: u8> = crate::BitWriter1S<'a, u32, OUTSET_SPEC, PIN17_AW, O>; +impl<'a, const O: u8> PIN17_W<'a, O> { + #[doc = "Write: writing a '1' sets the pin high; writing a '0' has no effect"] + #[inline(always)] + pub fn set(self) -> &'a mut W { + self.variant(PIN17_AW::SET) + } +} +#[doc = "Field `PIN18` reader - Pin 18"] +pub type PIN18_R = crate::BitReader; +#[doc = "Pin 18\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PIN18_A { + #[doc = "0: Read: pin driver is low"] + LOW = 0, + #[doc = "1: Read: pin driver is high"] + HIGH = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PIN18_A) -> Self { + variant as u8 != 0 + } +} +impl PIN18_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> PIN18_A { + match self.bits { + false => PIN18_A::LOW, + true => PIN18_A::HIGH, + } + } + #[doc = "Checks if the value of the field is `LOW`"] + #[inline(always)] + pub fn is_low(&self) -> bool { + *self == PIN18_A::LOW + } + #[doc = "Checks if the value of the field is `HIGH`"] + #[inline(always)] + pub fn is_high(&self) -> bool { + *self == PIN18_A::HIGH + } +} +#[doc = "Pin 18\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PIN18_AW { + #[doc = "1: Write: writing a '1' sets the pin high; writing a '0' has no effect"] + SET = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PIN18_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `PIN18` writer - Pin 18"] +pub type PIN18_W<'a, const O: u8> = crate::BitWriter1S<'a, u32, OUTSET_SPEC, PIN18_AW, O>; +impl<'a, const O: u8> PIN18_W<'a, O> { + #[doc = "Write: writing a '1' sets the pin high; writing a '0' has no effect"] + #[inline(always)] + pub fn set(self) -> &'a mut W { + self.variant(PIN18_AW::SET) + } +} +#[doc = "Field `PIN19` reader - Pin 19"] +pub type PIN19_R = crate::BitReader; +#[doc = "Pin 19\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PIN19_A { + #[doc = "0: Read: pin driver is low"] + LOW = 0, + #[doc = "1: Read: pin driver is high"] + HIGH = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PIN19_A) -> Self { + variant as u8 != 0 + } +} +impl PIN19_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> PIN19_A { + match self.bits { + false => PIN19_A::LOW, + true => PIN19_A::HIGH, + } + } + #[doc = "Checks if the value of the field is `LOW`"] + #[inline(always)] + pub fn is_low(&self) -> bool { + *self == PIN19_A::LOW + } + #[doc = "Checks if the value of the field is `HIGH`"] + #[inline(always)] + pub fn is_high(&self) -> bool { + *self == PIN19_A::HIGH + } +} +#[doc = "Pin 19\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PIN19_AW { + #[doc = "1: Write: writing a '1' sets the pin high; writing a '0' has no effect"] + SET = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PIN19_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `PIN19` writer - Pin 19"] +pub type PIN19_W<'a, const O: u8> = crate::BitWriter1S<'a, u32, OUTSET_SPEC, PIN19_AW, O>; +impl<'a, const O: u8> PIN19_W<'a, O> { + #[doc = "Write: writing a '1' sets the pin high; writing a '0' has no effect"] + #[inline(always)] + pub fn set(self) -> &'a mut W { + self.variant(PIN19_AW::SET) + } +} +#[doc = "Field `PIN20` reader - Pin 20"] +pub type PIN20_R = crate::BitReader; +#[doc = "Pin 20\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PIN20_A { + #[doc = "0: Read: pin driver is low"] + LOW = 0, + #[doc = "1: Read: pin driver is high"] + HIGH = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PIN20_A) -> Self { + variant as u8 != 0 + } +} +impl PIN20_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> PIN20_A { + match self.bits { + false => PIN20_A::LOW, + true => PIN20_A::HIGH, + } + } + #[doc = "Checks if the value of the field is `LOW`"] + #[inline(always)] + pub fn is_low(&self) -> bool { + *self == PIN20_A::LOW + } + #[doc = "Checks if the value of the field is `HIGH`"] + #[inline(always)] + pub fn is_high(&self) -> bool { + *self == PIN20_A::HIGH + } +} +#[doc = "Pin 20\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PIN20_AW { + #[doc = "1: Write: writing a '1' sets the pin high; writing a '0' has no effect"] + SET = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PIN20_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `PIN20` writer - Pin 20"] +pub type PIN20_W<'a, const O: u8> = crate::BitWriter1S<'a, u32, OUTSET_SPEC, PIN20_AW, O>; +impl<'a, const O: u8> PIN20_W<'a, O> { + #[doc = "Write: writing a '1' sets the pin high; writing a '0' has no effect"] + #[inline(always)] + pub fn set(self) -> &'a mut W { + self.variant(PIN20_AW::SET) + } +} +#[doc = "Field `PIN21` reader - Pin 21"] +pub type PIN21_R = crate::BitReader; +#[doc = "Pin 21\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PIN21_A { + #[doc = "0: Read: pin driver is low"] + LOW = 0, + #[doc = "1: Read: pin driver is high"] + HIGH = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PIN21_A) -> Self { + variant as u8 != 0 + } +} +impl PIN21_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> PIN21_A { + match self.bits { + false => PIN21_A::LOW, + true => PIN21_A::HIGH, + } + } + #[doc = "Checks if the value of the field is `LOW`"] + #[inline(always)] + pub fn is_low(&self) -> bool { + *self == PIN21_A::LOW + } + #[doc = "Checks if the value of the field is `HIGH`"] + #[inline(always)] + pub fn is_high(&self) -> bool { + *self == PIN21_A::HIGH + } +} +#[doc = "Pin 21\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PIN21_AW { + #[doc = "1: Write: writing a '1' sets the pin high; writing a '0' has no effect"] + SET = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PIN21_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `PIN21` writer - Pin 21"] +pub type PIN21_W<'a, const O: u8> = crate::BitWriter1S<'a, u32, OUTSET_SPEC, PIN21_AW, O>; +impl<'a, const O: u8> PIN21_W<'a, O> { + #[doc = "Write: writing a '1' sets the pin high; writing a '0' has no effect"] + #[inline(always)] + pub fn set(self) -> &'a mut W { + self.variant(PIN21_AW::SET) + } +} +#[doc = "Field `PIN22` reader - Pin 22"] +pub type PIN22_R = crate::BitReader; +#[doc = "Pin 22\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PIN22_A { + #[doc = "0: Read: pin driver is low"] + LOW = 0, + #[doc = "1: Read: pin driver is high"] + HIGH = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PIN22_A) -> Self { + variant as u8 != 0 + } +} +impl PIN22_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> PIN22_A { + match self.bits { + false => PIN22_A::LOW, + true => PIN22_A::HIGH, + } + } + #[doc = "Checks if the value of the field is `LOW`"] + #[inline(always)] + pub fn is_low(&self) -> bool { + *self == PIN22_A::LOW + } + #[doc = "Checks if the value of the field is `HIGH`"] + #[inline(always)] + pub fn is_high(&self) -> bool { + *self == PIN22_A::HIGH + } +} +#[doc = "Pin 22\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PIN22_AW { + #[doc = "1: Write: writing a '1' sets the pin high; writing a '0' has no effect"] + SET = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PIN22_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `PIN22` writer - Pin 22"] +pub type PIN22_W<'a, const O: u8> = crate::BitWriter1S<'a, u32, OUTSET_SPEC, PIN22_AW, O>; +impl<'a, const O: u8> PIN22_W<'a, O> { + #[doc = "Write: writing a '1' sets the pin high; writing a '0' has no effect"] + #[inline(always)] + pub fn set(self) -> &'a mut W { + self.variant(PIN22_AW::SET) + } +} +#[doc = "Field `PIN23` reader - Pin 23"] +pub type PIN23_R = crate::BitReader; +#[doc = "Pin 23\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PIN23_A { + #[doc = "0: Read: pin driver is low"] + LOW = 0, + #[doc = "1: Read: pin driver is high"] + HIGH = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PIN23_A) -> Self { + variant as u8 != 0 + } +} +impl PIN23_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> PIN23_A { + match self.bits { + false => PIN23_A::LOW, + true => PIN23_A::HIGH, + } + } + #[doc = "Checks if the value of the field is `LOW`"] + #[inline(always)] + pub fn is_low(&self) -> bool { + *self == PIN23_A::LOW + } + #[doc = "Checks if the value of the field is `HIGH`"] + #[inline(always)] + pub fn is_high(&self) -> bool { + *self == PIN23_A::HIGH + } +} +#[doc = "Pin 23\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PIN23_AW { + #[doc = "1: Write: writing a '1' sets the pin high; writing a '0' has no effect"] + SET = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PIN23_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `PIN23` writer - Pin 23"] +pub type PIN23_W<'a, const O: u8> = crate::BitWriter1S<'a, u32, OUTSET_SPEC, PIN23_AW, O>; +impl<'a, const O: u8> PIN23_W<'a, O> { + #[doc = "Write: writing a '1' sets the pin high; writing a '0' has no effect"] + #[inline(always)] + pub fn set(self) -> &'a mut W { + self.variant(PIN23_AW::SET) + } +} +#[doc = "Field `PIN24` reader - Pin 24"] +pub type PIN24_R = crate::BitReader; +#[doc = "Pin 24\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PIN24_A { + #[doc = "0: Read: pin driver is low"] + LOW = 0, + #[doc = "1: Read: pin driver is high"] + HIGH = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PIN24_A) -> Self { + variant as u8 != 0 + } +} +impl PIN24_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> PIN24_A { + match self.bits { + false => PIN24_A::LOW, + true => PIN24_A::HIGH, + } + } + #[doc = "Checks if the value of the field is `LOW`"] + #[inline(always)] + pub fn is_low(&self) -> bool { + *self == PIN24_A::LOW + } + #[doc = "Checks if the value of the field is `HIGH`"] + #[inline(always)] + pub fn is_high(&self) -> bool { + *self == PIN24_A::HIGH + } +} +#[doc = "Pin 24\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PIN24_AW { + #[doc = "1: Write: writing a '1' sets the pin high; writing a '0' has no effect"] + SET = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PIN24_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `PIN24` writer - Pin 24"] +pub type PIN24_W<'a, const O: u8> = crate::BitWriter1S<'a, u32, OUTSET_SPEC, PIN24_AW, O>; +impl<'a, const O: u8> PIN24_W<'a, O> { + #[doc = "Write: writing a '1' sets the pin high; writing a '0' has no effect"] + #[inline(always)] + pub fn set(self) -> &'a mut W { + self.variant(PIN24_AW::SET) + } +} +#[doc = "Field `PIN25` reader - Pin 25"] +pub type PIN25_R = crate::BitReader; +#[doc = "Pin 25\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PIN25_A { + #[doc = "0: Read: pin driver is low"] + LOW = 0, + #[doc = "1: Read: pin driver is high"] + HIGH = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PIN25_A) -> Self { + variant as u8 != 0 + } +} +impl PIN25_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> PIN25_A { + match self.bits { + false => PIN25_A::LOW, + true => PIN25_A::HIGH, + } + } + #[doc = "Checks if the value of the field is `LOW`"] + #[inline(always)] + pub fn is_low(&self) -> bool { + *self == PIN25_A::LOW + } + #[doc = "Checks if the value of the field is `HIGH`"] + #[inline(always)] + pub fn is_high(&self) -> bool { + *self == PIN25_A::HIGH + } +} +#[doc = "Pin 25\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PIN25_AW { + #[doc = "1: Write: writing a '1' sets the pin high; writing a '0' has no effect"] + SET = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PIN25_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `PIN25` writer - Pin 25"] +pub type PIN25_W<'a, const O: u8> = crate::BitWriter1S<'a, u32, OUTSET_SPEC, PIN25_AW, O>; +impl<'a, const O: u8> PIN25_W<'a, O> { + #[doc = "Write: writing a '1' sets the pin high; writing a '0' has no effect"] + #[inline(always)] + pub fn set(self) -> &'a mut W { + self.variant(PIN25_AW::SET) + } +} +#[doc = "Field `PIN26` reader - Pin 26"] +pub type PIN26_R = crate::BitReader; +#[doc = "Pin 26\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PIN26_A { + #[doc = "0: Read: pin driver is low"] + LOW = 0, + #[doc = "1: Read: pin driver is high"] + HIGH = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PIN26_A) -> Self { + variant as u8 != 0 + } +} +impl PIN26_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> PIN26_A { + match self.bits { + false => PIN26_A::LOW, + true => PIN26_A::HIGH, + } + } + #[doc = "Checks if the value of the field is `LOW`"] + #[inline(always)] + pub fn is_low(&self) -> bool { + *self == PIN26_A::LOW + } + #[doc = "Checks if the value of the field is `HIGH`"] + #[inline(always)] + pub fn is_high(&self) -> bool { + *self == PIN26_A::HIGH + } +} +#[doc = "Pin 26\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PIN26_AW { + #[doc = "1: Write: writing a '1' sets the pin high; writing a '0' has no effect"] + SET = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PIN26_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `PIN26` writer - Pin 26"] +pub type PIN26_W<'a, const O: u8> = crate::BitWriter1S<'a, u32, OUTSET_SPEC, PIN26_AW, O>; +impl<'a, const O: u8> PIN26_W<'a, O> { + #[doc = "Write: writing a '1' sets the pin high; writing a '0' has no effect"] + #[inline(always)] + pub fn set(self) -> &'a mut W { + self.variant(PIN26_AW::SET) + } +} +#[doc = "Field `PIN27` reader - Pin 27"] +pub type PIN27_R = crate::BitReader; +#[doc = "Pin 27\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PIN27_A { + #[doc = "0: Read: pin driver is low"] + LOW = 0, + #[doc = "1: Read: pin driver is high"] + HIGH = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PIN27_A) -> Self { + variant as u8 != 0 + } +} +impl PIN27_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> PIN27_A { + match self.bits { + false => PIN27_A::LOW, + true => PIN27_A::HIGH, + } + } + #[doc = "Checks if the value of the field is `LOW`"] + #[inline(always)] + pub fn is_low(&self) -> bool { + *self == PIN27_A::LOW + } + #[doc = "Checks if the value of the field is `HIGH`"] + #[inline(always)] + pub fn is_high(&self) -> bool { + *self == PIN27_A::HIGH + } +} +#[doc = "Pin 27\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PIN27_AW { + #[doc = "1: Write: writing a '1' sets the pin high; writing a '0' has no effect"] + SET = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PIN27_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `PIN27` writer - Pin 27"] +pub type PIN27_W<'a, const O: u8> = crate::BitWriter1S<'a, u32, OUTSET_SPEC, PIN27_AW, O>; +impl<'a, const O: u8> PIN27_W<'a, O> { + #[doc = "Write: writing a '1' sets the pin high; writing a '0' has no effect"] + #[inline(always)] + pub fn set(self) -> &'a mut W { + self.variant(PIN27_AW::SET) + } +} +#[doc = "Field `PIN28` reader - Pin 28"] +pub type PIN28_R = crate::BitReader; +#[doc = "Pin 28\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PIN28_A { + #[doc = "0: Read: pin driver is low"] + LOW = 0, + #[doc = "1: Read: pin driver is high"] + HIGH = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PIN28_A) -> Self { + variant as u8 != 0 + } +} +impl PIN28_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> PIN28_A { + match self.bits { + false => PIN28_A::LOW, + true => PIN28_A::HIGH, + } + } + #[doc = "Checks if the value of the field is `LOW`"] + #[inline(always)] + pub fn is_low(&self) -> bool { + *self == PIN28_A::LOW + } + #[doc = "Checks if the value of the field is `HIGH`"] + #[inline(always)] + pub fn is_high(&self) -> bool { + *self == PIN28_A::HIGH + } +} +#[doc = "Pin 28\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PIN28_AW { + #[doc = "1: Write: writing a '1' sets the pin high; writing a '0' has no effect"] + SET = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PIN28_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `PIN28` writer - Pin 28"] +pub type PIN28_W<'a, const O: u8> = crate::BitWriter1S<'a, u32, OUTSET_SPEC, PIN28_AW, O>; +impl<'a, const O: u8> PIN28_W<'a, O> { + #[doc = "Write: writing a '1' sets the pin high; writing a '0' has no effect"] + #[inline(always)] + pub fn set(self) -> &'a mut W { + self.variant(PIN28_AW::SET) + } +} +#[doc = "Field `PIN29` reader - Pin 29"] +pub type PIN29_R = crate::BitReader; +#[doc = "Pin 29\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PIN29_A { + #[doc = "0: Read: pin driver is low"] + LOW = 0, + #[doc = "1: Read: pin driver is high"] + HIGH = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PIN29_A) -> Self { + variant as u8 != 0 + } +} +impl PIN29_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> PIN29_A { + match self.bits { + false => PIN29_A::LOW, + true => PIN29_A::HIGH, + } + } + #[doc = "Checks if the value of the field is `LOW`"] + #[inline(always)] + pub fn is_low(&self) -> bool { + *self == PIN29_A::LOW + } + #[doc = "Checks if the value of the field is `HIGH`"] + #[inline(always)] + pub fn is_high(&self) -> bool { + *self == PIN29_A::HIGH + } +} +#[doc = "Pin 29\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PIN29_AW { + #[doc = "1: Write: writing a '1' sets the pin high; writing a '0' has no effect"] + SET = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PIN29_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `PIN29` writer - Pin 29"] +pub type PIN29_W<'a, const O: u8> = crate::BitWriter1S<'a, u32, OUTSET_SPEC, PIN29_AW, O>; +impl<'a, const O: u8> PIN29_W<'a, O> { + #[doc = "Write: writing a '1' sets the pin high; writing a '0' has no effect"] + #[inline(always)] + pub fn set(self) -> &'a mut W { + self.variant(PIN29_AW::SET) + } +} +#[doc = "Field `PIN30` reader - Pin 30"] +pub type PIN30_R = crate::BitReader; +#[doc = "Pin 30\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PIN30_A { + #[doc = "0: Read: pin driver is low"] + LOW = 0, + #[doc = "1: Read: pin driver is high"] + HIGH = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PIN30_A) -> Self { + variant as u8 != 0 + } +} +impl PIN30_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> PIN30_A { + match self.bits { + false => PIN30_A::LOW, + true => PIN30_A::HIGH, + } + } + #[doc = "Checks if the value of the field is `LOW`"] + #[inline(always)] + pub fn is_low(&self) -> bool { + *self == PIN30_A::LOW + } + #[doc = "Checks if the value of the field is `HIGH`"] + #[inline(always)] + pub fn is_high(&self) -> bool { + *self == PIN30_A::HIGH + } +} +#[doc = "Pin 30\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PIN30_AW { + #[doc = "1: Write: writing a '1' sets the pin high; writing a '0' has no effect"] + SET = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PIN30_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `PIN30` writer - Pin 30"] +pub type PIN30_W<'a, const O: u8> = crate::BitWriter1S<'a, u32, OUTSET_SPEC, PIN30_AW, O>; +impl<'a, const O: u8> PIN30_W<'a, O> { + #[doc = "Write: writing a '1' sets the pin high; writing a '0' has no effect"] + #[inline(always)] + pub fn set(self) -> &'a mut W { + self.variant(PIN30_AW::SET) + } +} +#[doc = "Field `PIN31` reader - Pin 31"] +pub type PIN31_R = crate::BitReader; +#[doc = "Pin 31\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PIN31_A { + #[doc = "0: Read: pin driver is low"] + LOW = 0, + #[doc = "1: Read: pin driver is high"] + HIGH = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PIN31_A) -> Self { + variant as u8 != 0 + } +} +impl PIN31_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> PIN31_A { + match self.bits { + false => PIN31_A::LOW, + true => PIN31_A::HIGH, + } + } + #[doc = "Checks if the value of the field is `LOW`"] + #[inline(always)] + pub fn is_low(&self) -> bool { + *self == PIN31_A::LOW + } + #[doc = "Checks if the value of the field is `HIGH`"] + #[inline(always)] + pub fn is_high(&self) -> bool { + *self == PIN31_A::HIGH + } +} +#[doc = "Pin 31\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PIN31_AW { + #[doc = "1: Write: writing a '1' sets the pin high; writing a '0' has no effect"] + SET = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PIN31_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `PIN31` writer - Pin 31"] +pub type PIN31_W<'a, const O: u8> = crate::BitWriter1S<'a, u32, OUTSET_SPEC, PIN31_AW, O>; +impl<'a, const O: u8> PIN31_W<'a, O> { + #[doc = "Write: writing a '1' sets the pin high; writing a '0' has no effect"] + #[inline(always)] + pub fn set(self) -> &'a mut W { + self.variant(PIN31_AW::SET) + } +} +impl R { + #[doc = "Bit 0 - Pin 0"] + #[inline(always)] + pub fn pin0(&self) -> PIN0_R { + PIN0_R::new((self.bits & 1) != 0) + } + #[doc = "Bit 1 - Pin 1"] + #[inline(always)] + pub fn pin1(&self) -> PIN1_R { + PIN1_R::new(((self.bits >> 1) & 1) != 0) + } + #[doc = "Bit 2 - Pin 2"] + #[inline(always)] + pub fn pin2(&self) -> PIN2_R { + PIN2_R::new(((self.bits >> 2) & 1) != 0) + } + #[doc = "Bit 3 - Pin 3"] + #[inline(always)] + pub fn pin3(&self) -> PIN3_R { + PIN3_R::new(((self.bits >> 3) & 1) != 0) + } + #[doc = "Bit 4 - Pin 4"] + #[inline(always)] + pub fn pin4(&self) -> PIN4_R { + PIN4_R::new(((self.bits >> 4) & 1) != 0) + } + #[doc = "Bit 5 - Pin 5"] + #[inline(always)] + pub fn pin5(&self) -> PIN5_R { + PIN5_R::new(((self.bits >> 5) & 1) != 0) + } + #[doc = "Bit 6 - Pin 6"] + #[inline(always)] + pub fn pin6(&self) -> PIN6_R { + PIN6_R::new(((self.bits >> 6) & 1) != 0) + } + #[doc = "Bit 7 - Pin 7"] + #[inline(always)] + pub fn pin7(&self) -> PIN7_R { + PIN7_R::new(((self.bits >> 7) & 1) != 0) + } + #[doc = "Bit 8 - Pin 8"] + #[inline(always)] + pub fn pin8(&self) -> PIN8_R { + PIN8_R::new(((self.bits >> 8) & 1) != 0) + } + #[doc = "Bit 9 - Pin 9"] + #[inline(always)] + pub fn pin9(&self) -> PIN9_R { + PIN9_R::new(((self.bits >> 9) & 1) != 0) + } + #[doc = "Bit 10 - Pin 10"] + #[inline(always)] + pub fn pin10(&self) -> PIN10_R { + PIN10_R::new(((self.bits >> 10) & 1) != 0) + } + #[doc = "Bit 11 - Pin 11"] + #[inline(always)] + pub fn pin11(&self) -> PIN11_R { + PIN11_R::new(((self.bits >> 11) & 1) != 0) + } + #[doc = "Bit 12 - Pin 12"] + #[inline(always)] + pub fn pin12(&self) -> PIN12_R { + PIN12_R::new(((self.bits >> 12) & 1) != 0) + } + #[doc = "Bit 13 - Pin 13"] + #[inline(always)] + pub fn pin13(&self) -> PIN13_R { + PIN13_R::new(((self.bits >> 13) & 1) != 0) + } + #[doc = "Bit 14 - Pin 14"] + #[inline(always)] + pub fn pin14(&self) -> PIN14_R { + PIN14_R::new(((self.bits >> 14) & 1) != 0) + } + #[doc = "Bit 15 - Pin 15"] + #[inline(always)] + pub fn pin15(&self) -> PIN15_R { + PIN15_R::new(((self.bits >> 15) & 1) != 0) + } + #[doc = "Bit 16 - Pin 16"] + #[inline(always)] + pub fn pin16(&self) -> PIN16_R { + PIN16_R::new(((self.bits >> 16) & 1) != 0) + } + #[doc = "Bit 17 - Pin 17"] + #[inline(always)] + pub fn pin17(&self) -> PIN17_R { + PIN17_R::new(((self.bits >> 17) & 1) != 0) + } + #[doc = "Bit 18 - Pin 18"] + #[inline(always)] + pub fn pin18(&self) -> PIN18_R { + PIN18_R::new(((self.bits >> 18) & 1) != 0) + } + #[doc = "Bit 19 - Pin 19"] + #[inline(always)] + pub fn pin19(&self) -> PIN19_R { + PIN19_R::new(((self.bits >> 19) & 1) != 0) + } + #[doc = "Bit 20 - Pin 20"] + #[inline(always)] + pub fn pin20(&self) -> PIN20_R { + PIN20_R::new(((self.bits >> 20) & 1) != 0) + } + #[doc = "Bit 21 - Pin 21"] + #[inline(always)] + pub fn pin21(&self) -> PIN21_R { + PIN21_R::new(((self.bits >> 21) & 1) != 0) + } + #[doc = "Bit 22 - Pin 22"] + #[inline(always)] + pub fn pin22(&self) -> PIN22_R { + PIN22_R::new(((self.bits >> 22) & 1) != 0) + } + #[doc = "Bit 23 - Pin 23"] + #[inline(always)] + pub fn pin23(&self) -> PIN23_R { + PIN23_R::new(((self.bits >> 23) & 1) != 0) + } + #[doc = "Bit 24 - Pin 24"] + #[inline(always)] + pub fn pin24(&self) -> PIN24_R { + PIN24_R::new(((self.bits >> 24) & 1) != 0) + } + #[doc = "Bit 25 - Pin 25"] + #[inline(always)] + pub fn pin25(&self) -> PIN25_R { + PIN25_R::new(((self.bits >> 25) & 1) != 0) + } + #[doc = "Bit 26 - Pin 26"] + #[inline(always)] + pub fn pin26(&self) -> PIN26_R { + PIN26_R::new(((self.bits >> 26) & 1) != 0) + } + #[doc = "Bit 27 - Pin 27"] + #[inline(always)] + pub fn pin27(&self) -> PIN27_R { + PIN27_R::new(((self.bits >> 27) & 1) != 0) + } + #[doc = "Bit 28 - Pin 28"] + #[inline(always)] + pub fn pin28(&self) -> PIN28_R { + PIN28_R::new(((self.bits >> 28) & 1) != 0) + } + #[doc = "Bit 29 - Pin 29"] + #[inline(always)] + pub fn pin29(&self) -> PIN29_R { + PIN29_R::new(((self.bits >> 29) & 1) != 0) + } + #[doc = "Bit 30 - Pin 30"] + #[inline(always)] + pub fn pin30(&self) -> PIN30_R { + PIN30_R::new(((self.bits >> 30) & 1) != 0) + } + #[doc = "Bit 31 - Pin 31"] + #[inline(always)] + pub fn pin31(&self) -> PIN31_R { + PIN31_R::new(((self.bits >> 31) & 1) != 0) + } +} +impl W { + #[doc = "Bit 0 - Pin 0"] + #[inline(always)] + #[must_use] + pub fn pin0(&mut self) -> PIN0_W<0> { + PIN0_W::new(self) + } + #[doc = "Bit 1 - Pin 1"] + #[inline(always)] + #[must_use] + pub fn pin1(&mut self) -> PIN1_W<1> { + PIN1_W::new(self) + } + #[doc = "Bit 2 - Pin 2"] + #[inline(always)] + #[must_use] + pub fn pin2(&mut self) -> PIN2_W<2> { + PIN2_W::new(self) + } + #[doc = "Bit 3 - Pin 3"] + #[inline(always)] + #[must_use] + pub fn pin3(&mut self) -> PIN3_W<3> { + PIN3_W::new(self) + } + #[doc = "Bit 4 - Pin 4"] + #[inline(always)] + #[must_use] + pub fn pin4(&mut self) -> PIN4_W<4> { + PIN4_W::new(self) + } + #[doc = "Bit 5 - Pin 5"] + #[inline(always)] + #[must_use] + pub fn pin5(&mut self) -> PIN5_W<5> { + PIN5_W::new(self) + } + #[doc = "Bit 6 - Pin 6"] + #[inline(always)] + #[must_use] + pub fn pin6(&mut self) -> PIN6_W<6> { + PIN6_W::new(self) + } + #[doc = "Bit 7 - Pin 7"] + #[inline(always)] + #[must_use] + pub fn pin7(&mut self) -> PIN7_W<7> { + PIN7_W::new(self) + } + #[doc = "Bit 8 - Pin 8"] + #[inline(always)] + #[must_use] + pub fn pin8(&mut self) -> PIN8_W<8> { + PIN8_W::new(self) + } + #[doc = "Bit 9 - Pin 9"] + #[inline(always)] + #[must_use] + pub fn pin9(&mut self) -> PIN9_W<9> { + PIN9_W::new(self) + } + #[doc = "Bit 10 - Pin 10"] + #[inline(always)] + #[must_use] + pub fn pin10(&mut self) -> PIN10_W<10> { + PIN10_W::new(self) + } + #[doc = "Bit 11 - Pin 11"] + #[inline(always)] + #[must_use] + pub fn pin11(&mut self) -> PIN11_W<11> { + PIN11_W::new(self) + } + #[doc = "Bit 12 - Pin 12"] + #[inline(always)] + #[must_use] + pub fn pin12(&mut self) -> PIN12_W<12> { + PIN12_W::new(self) + } + #[doc = "Bit 13 - Pin 13"] + #[inline(always)] + #[must_use] + pub fn pin13(&mut self) -> PIN13_W<13> { + PIN13_W::new(self) + } + #[doc = "Bit 14 - Pin 14"] + #[inline(always)] + #[must_use] + pub fn pin14(&mut self) -> PIN14_W<14> { + PIN14_W::new(self) + } + #[doc = "Bit 15 - Pin 15"] + #[inline(always)] + #[must_use] + pub fn pin15(&mut self) -> PIN15_W<15> { + PIN15_W::new(self) + } + #[doc = "Bit 16 - Pin 16"] + #[inline(always)] + #[must_use] + pub fn pin16(&mut self) -> PIN16_W<16> { + PIN16_W::new(self) + } + #[doc = "Bit 17 - Pin 17"] + #[inline(always)] + #[must_use] + pub fn pin17(&mut self) -> PIN17_W<17> { + PIN17_W::new(self) + } + #[doc = "Bit 18 - Pin 18"] + #[inline(always)] + #[must_use] + pub fn pin18(&mut self) -> PIN18_W<18> { + PIN18_W::new(self) + } + #[doc = "Bit 19 - Pin 19"] + #[inline(always)] + #[must_use] + pub fn pin19(&mut self) -> PIN19_W<19> { + PIN19_W::new(self) + } + #[doc = "Bit 20 - Pin 20"] + #[inline(always)] + #[must_use] + pub fn pin20(&mut self) -> PIN20_W<20> { + PIN20_W::new(self) + } + #[doc = "Bit 21 - Pin 21"] + #[inline(always)] + #[must_use] + pub fn pin21(&mut self) -> PIN21_W<21> { + PIN21_W::new(self) + } + #[doc = "Bit 22 - Pin 22"] + #[inline(always)] + #[must_use] + pub fn pin22(&mut self) -> PIN22_W<22> { + PIN22_W::new(self) + } + #[doc = "Bit 23 - Pin 23"] + #[inline(always)] + #[must_use] + pub fn pin23(&mut self) -> PIN23_W<23> { + PIN23_W::new(self) + } + #[doc = "Bit 24 - Pin 24"] + #[inline(always)] + #[must_use] + pub fn pin24(&mut self) -> PIN24_W<24> { + PIN24_W::new(self) + } + #[doc = "Bit 25 - Pin 25"] + #[inline(always)] + #[must_use] + pub fn pin25(&mut self) -> PIN25_W<25> { + PIN25_W::new(self) + } + #[doc = "Bit 26 - Pin 26"] + #[inline(always)] + #[must_use] + pub fn pin26(&mut self) -> PIN26_W<26> { + PIN26_W::new(self) + } + #[doc = "Bit 27 - Pin 27"] + #[inline(always)] + #[must_use] + pub fn pin27(&mut self) -> PIN27_W<27> { + PIN27_W::new(self) + } + #[doc = "Bit 28 - Pin 28"] + #[inline(always)] + #[must_use] + pub fn pin28(&mut self) -> PIN28_W<28> { + PIN28_W::new(self) + } + #[doc = "Bit 29 - Pin 29"] + #[inline(always)] + #[must_use] + pub fn pin29(&mut self) -> PIN29_W<29> { + PIN29_W::new(self) + } + #[doc = "Bit 30 - Pin 30"] + #[inline(always)] + #[must_use] + pub fn pin30(&mut self) -> PIN30_W<30> { + PIN30_W::new(self) + } + #[doc = "Bit 31 - Pin 31"] + #[inline(always)] + #[must_use] + pub fn pin31(&mut self) -> PIN31_W<31> { + PIN31_W::new(self) + } + #[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 = "Set individual bits in GPIO port\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 [outset](index.html) module"] +pub struct OUTSET_SPEC; +impl crate::RegisterSpec for OUTSET_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [outset::R](R) reader structure"] +impl crate::Readable for OUTSET_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [outset::W](W) writer structure"] +impl crate::Writable for OUTSET_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0xffff_ffff; +} +#[doc = "`reset()` method sets OUTSET to value 0"] +impl crate::Resettable for OUTSET_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/p0/pin_cnf.rs b/down-the-stack/dk_pac/src/p0/pin_cnf.rs new file mode 100644 index 0000000..8b53a85 --- /dev/null +++ b/down-the-stack/dk_pac/src/p0/pin_cnf.rs @@ -0,0 +1,482 @@ +#[doc = "Register `PIN_CNF[%s]` 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 `PIN_CNF[%s]` 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 `DIR` reader - Pin direction. Same physical register as DIR register"] +pub type DIR_R = crate::BitReader; +#[doc = "Pin direction. Same physical register as DIR register\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum DIR_A { + #[doc = "0: Configure pin as an input pin"] + INPUT = 0, + #[doc = "1: Configure pin as an output pin"] + OUTPUT = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: DIR_A) -> Self { + variant as u8 != 0 + } +} +impl DIR_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> DIR_A { + match self.bits { + false => DIR_A::INPUT, + true => DIR_A::OUTPUT, + } + } + #[doc = "Checks if the value of the field is `INPUT`"] + #[inline(always)] + pub fn is_input(&self) -> bool { + *self == DIR_A::INPUT + } + #[doc = "Checks if the value of the field is `OUTPUT`"] + #[inline(always)] + pub fn is_output(&self) -> bool { + *self == DIR_A::OUTPUT + } +} +#[doc = "Field `DIR` writer - Pin direction. Same physical register as DIR register"] +pub type DIR_W<'a, const O: u8> = crate::BitWriter<'a, u32, PIN_CNF_SPEC, DIR_A, O>; +impl<'a, const O: u8> DIR_W<'a, O> { + #[doc = "Configure pin as an input pin"] + #[inline(always)] + pub fn input(self) -> &'a mut W { + self.variant(DIR_A::INPUT) + } + #[doc = "Configure pin as an output pin"] + #[inline(always)] + pub fn output(self) -> &'a mut W { + self.variant(DIR_A::OUTPUT) + } +} +#[doc = "Field `INPUT` reader - Connect or disconnect input buffer"] +pub type INPUT_R = crate::BitReader; +#[doc = "Connect or disconnect input buffer\n\nValue on reset: 1"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum INPUT_A { + #[doc = "0: Connect input buffer"] + CONNECT = 0, + #[doc = "1: Disconnect input buffer"] + DISCONNECT = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: INPUT_A) -> Self { + variant as u8 != 0 + } +} +impl INPUT_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> INPUT_A { + match self.bits { + false => INPUT_A::CONNECT, + true => INPUT_A::DISCONNECT, + } + } + #[doc = "Checks if the value of the field is `CONNECT`"] + #[inline(always)] + pub fn is_connect(&self) -> bool { + *self == INPUT_A::CONNECT + } + #[doc = "Checks if the value of the field is `DISCONNECT`"] + #[inline(always)] + pub fn is_disconnect(&self) -> bool { + *self == INPUT_A::DISCONNECT + } +} +#[doc = "Field `INPUT` writer - Connect or disconnect input buffer"] +pub type INPUT_W<'a, const O: u8> = crate::BitWriter<'a, u32, PIN_CNF_SPEC, INPUT_A, O>; +impl<'a, const O: u8> INPUT_W<'a, O> { + #[doc = "Connect input buffer"] + #[inline(always)] + pub fn connect(self) -> &'a mut W { + self.variant(INPUT_A::CONNECT) + } + #[doc = "Disconnect input buffer"] + #[inline(always)] + pub fn disconnect(self) -> &'a mut W { + self.variant(INPUT_A::DISCONNECT) + } +} +#[doc = "Field `PULL` reader - Pull configuration"] +pub type PULL_R = crate::FieldReader; +#[doc = "Pull configuration\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +#[repr(u8)] +pub enum PULL_A { + #[doc = "0: No pull"] + DISABLED = 0, + #[doc = "1: Pull down on pin"] + PULLDOWN = 1, + #[doc = "3: Pull up on pin"] + PULLUP = 3, +} +impl From for u8 { + #[inline(always)] + fn from(variant: PULL_A) -> Self { + variant as _ + } +} +impl PULL_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> Option { + match self.bits { + 0 => Some(PULL_A::DISABLED), + 1 => Some(PULL_A::PULLDOWN), + 3 => Some(PULL_A::PULLUP), + _ => None, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == PULL_A::DISABLED + } + #[doc = "Checks if the value of the field is `PULLDOWN`"] + #[inline(always)] + pub fn is_pulldown(&self) -> bool { + *self == PULL_A::PULLDOWN + } + #[doc = "Checks if the value of the field is `PULLUP`"] + #[inline(always)] + pub fn is_pullup(&self) -> bool { + *self == PULL_A::PULLUP + } +} +#[doc = "Field `PULL` writer - Pull configuration"] +pub type PULL_W<'a, const O: u8> = crate::FieldWriter<'a, u32, PIN_CNF_SPEC, u8, PULL_A, 2, O>; +impl<'a, const O: u8> PULL_W<'a, O> { + #[doc = "No pull"] + #[inline(always)] + pub fn disabled(self) -> &'a mut W { + self.variant(PULL_A::DISABLED) + } + #[doc = "Pull down on pin"] + #[inline(always)] + pub fn pulldown(self) -> &'a mut W { + self.variant(PULL_A::PULLDOWN) + } + #[doc = "Pull up on pin"] + #[inline(always)] + pub fn pullup(self) -> &'a mut W { + self.variant(PULL_A::PULLUP) + } +} +#[doc = "Field `DRIVE` reader - Drive configuration"] +pub type DRIVE_R = crate::FieldReader; +#[doc = "Drive configuration\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +#[repr(u8)] +pub enum DRIVE_A { + #[doc = "0: Standard '0', standard '1'"] + S0S1 = 0, + #[doc = "1: High drive '0', standard '1'"] + H0S1 = 1, + #[doc = "2: Standard '0', high drive '1'"] + S0H1 = 2, + #[doc = "3: High drive '0', high 'drive '1''"] + H0H1 = 3, + #[doc = "4: Disconnect '0' standard '1' (normally used for wired-or connections)"] + D0S1 = 4, + #[doc = "5: Disconnect '0', high drive '1' (normally used for wired-or connections)"] + D0H1 = 5, + #[doc = "6: Standard '0'. disconnect '1' (normally used for wired-and connections)"] + S0D1 = 6, + #[doc = "7: High drive '0', disconnect '1' (normally used for wired-and connections)"] + H0D1 = 7, +} +impl From for u8 { + #[inline(always)] + fn from(variant: DRIVE_A) -> Self { + variant as _ + } +} +impl DRIVE_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> DRIVE_A { + match self.bits { + 0 => DRIVE_A::S0S1, + 1 => DRIVE_A::H0S1, + 2 => DRIVE_A::S0H1, + 3 => DRIVE_A::H0H1, + 4 => DRIVE_A::D0S1, + 5 => DRIVE_A::D0H1, + 6 => DRIVE_A::S0D1, + 7 => DRIVE_A::H0D1, + _ => unreachable!(), + } + } + #[doc = "Checks if the value of the field is `S0S1`"] + #[inline(always)] + pub fn is_s0s1(&self) -> bool { + *self == DRIVE_A::S0S1 + } + #[doc = "Checks if the value of the field is `H0S1`"] + #[inline(always)] + pub fn is_h0s1(&self) -> bool { + *self == DRIVE_A::H0S1 + } + #[doc = "Checks if the value of the field is `S0H1`"] + #[inline(always)] + pub fn is_s0h1(&self) -> bool { + *self == DRIVE_A::S0H1 + } + #[doc = "Checks if the value of the field is `H0H1`"] + #[inline(always)] + pub fn is_h0h1(&self) -> bool { + *self == DRIVE_A::H0H1 + } + #[doc = "Checks if the value of the field is `D0S1`"] + #[inline(always)] + pub fn is_d0s1(&self) -> bool { + *self == DRIVE_A::D0S1 + } + #[doc = "Checks if the value of the field is `D0H1`"] + #[inline(always)] + pub fn is_d0h1(&self) -> bool { + *self == DRIVE_A::D0H1 + } + #[doc = "Checks if the value of the field is `S0D1`"] + #[inline(always)] + pub fn is_s0d1(&self) -> bool { + *self == DRIVE_A::S0D1 + } + #[doc = "Checks if the value of the field is `H0D1`"] + #[inline(always)] + pub fn is_h0d1(&self) -> bool { + *self == DRIVE_A::H0D1 + } +} +#[doc = "Field `DRIVE` writer - Drive configuration"] +pub type DRIVE_W<'a, const O: u8> = + crate::FieldWriterSafe<'a, u32, PIN_CNF_SPEC, u8, DRIVE_A, 3, O>; +impl<'a, const O: u8> DRIVE_W<'a, O> { + #[doc = "Standard '0', standard '1'"] + #[inline(always)] + pub fn s0s1(self) -> &'a mut W { + self.variant(DRIVE_A::S0S1) + } + #[doc = "High drive '0', standard '1'"] + #[inline(always)] + pub fn h0s1(self) -> &'a mut W { + self.variant(DRIVE_A::H0S1) + } + #[doc = "Standard '0', high drive '1'"] + #[inline(always)] + pub fn s0h1(self) -> &'a mut W { + self.variant(DRIVE_A::S0H1) + } + #[doc = "High drive '0', high 'drive '1''"] + #[inline(always)] + pub fn h0h1(self) -> &'a mut W { + self.variant(DRIVE_A::H0H1) + } + #[doc = "Disconnect '0' standard '1' (normally used for wired-or connections)"] + #[inline(always)] + pub fn d0s1(self) -> &'a mut W { + self.variant(DRIVE_A::D0S1) + } + #[doc = "Disconnect '0', high drive '1' (normally used for wired-or connections)"] + #[inline(always)] + pub fn d0h1(self) -> &'a mut W { + self.variant(DRIVE_A::D0H1) + } + #[doc = "Standard '0'. disconnect '1' (normally used for wired-and connections)"] + #[inline(always)] + pub fn s0d1(self) -> &'a mut W { + self.variant(DRIVE_A::S0D1) + } + #[doc = "High drive '0', disconnect '1' (normally used for wired-and connections)"] + #[inline(always)] + pub fn h0d1(self) -> &'a mut W { + self.variant(DRIVE_A::H0D1) + } +} +#[doc = "Field `SENSE` reader - Pin sensing mechanism"] +pub type SENSE_R = crate::FieldReader; +#[doc = "Pin sensing mechanism\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +#[repr(u8)] +pub enum SENSE_A { + #[doc = "0: Disabled"] + DISABLED = 0, + #[doc = "2: Sense for high level"] + HIGH = 2, + #[doc = "3: Sense for low level"] + LOW = 3, +} +impl From for u8 { + #[inline(always)] + fn from(variant: SENSE_A) -> Self { + variant as _ + } +} +impl SENSE_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> Option { + match self.bits { + 0 => Some(SENSE_A::DISABLED), + 2 => Some(SENSE_A::HIGH), + 3 => Some(SENSE_A::LOW), + _ => None, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == SENSE_A::DISABLED + } + #[doc = "Checks if the value of the field is `HIGH`"] + #[inline(always)] + pub fn is_high(&self) -> bool { + *self == SENSE_A::HIGH + } + #[doc = "Checks if the value of the field is `LOW`"] + #[inline(always)] + pub fn is_low(&self) -> bool { + *self == SENSE_A::LOW + } +} +#[doc = "Field `SENSE` writer - Pin sensing mechanism"] +pub type SENSE_W<'a, const O: u8> = crate::FieldWriter<'a, u32, PIN_CNF_SPEC, u8, SENSE_A, 2, O>; +impl<'a, const O: u8> SENSE_W<'a, O> { + #[doc = "Disabled"] + #[inline(always)] + pub fn disabled(self) -> &'a mut W { + self.variant(SENSE_A::DISABLED) + } + #[doc = "Sense for high level"] + #[inline(always)] + pub fn high(self) -> &'a mut W { + self.variant(SENSE_A::HIGH) + } + #[doc = "Sense for low level"] + #[inline(always)] + pub fn low(self) -> &'a mut W { + self.variant(SENSE_A::LOW) + } +} +impl R { + #[doc = "Bit 0 - Pin direction. Same physical register as DIR register"] + #[inline(always)] + pub fn dir(&self) -> DIR_R { + DIR_R::new((self.bits & 1) != 0) + } + #[doc = "Bit 1 - Connect or disconnect input buffer"] + #[inline(always)] + pub fn input(&self) -> INPUT_R { + INPUT_R::new(((self.bits >> 1) & 1) != 0) + } + #[doc = "Bits 2:3 - Pull configuration"] + #[inline(always)] + pub fn pull(&self) -> PULL_R { + PULL_R::new(((self.bits >> 2) & 3) as u8) + } + #[doc = "Bits 8:10 - Drive configuration"] + #[inline(always)] + pub fn drive(&self) -> DRIVE_R { + DRIVE_R::new(((self.bits >> 8) & 7) as u8) + } + #[doc = "Bits 16:17 - Pin sensing mechanism"] + #[inline(always)] + pub fn sense(&self) -> SENSE_R { + SENSE_R::new(((self.bits >> 16) & 3) as u8) + } +} +impl W { + #[doc = "Bit 0 - Pin direction. Same physical register as DIR register"] + #[inline(always)] + #[must_use] + pub fn dir(&mut self) -> DIR_W<0> { + DIR_W::new(self) + } + #[doc = "Bit 1 - Connect or disconnect input buffer"] + #[inline(always)] + #[must_use] + pub fn input(&mut self) -> INPUT_W<1> { + INPUT_W::new(self) + } + #[doc = "Bits 2:3 - Pull configuration"] + #[inline(always)] + #[must_use] + pub fn pull(&mut self) -> PULL_W<2> { + PULL_W::new(self) + } + #[doc = "Bits 8:10 - Drive configuration"] + #[inline(always)] + #[must_use] + pub fn drive(&mut self) -> DRIVE_W<8> { + DRIVE_W::new(self) + } + #[doc = "Bits 16:17 - Pin sensing mechanism"] + #[inline(always)] + #[must_use] + pub fn sense(&mut self) -> SENSE_W<16> { + SENSE_W::new(self) + } + #[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 = "Description collection: Configuration of GPIO pins\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 [pin_cnf](index.html) module"] +pub struct PIN_CNF_SPEC; +impl crate::RegisterSpec for PIN_CNF_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [pin_cnf::R](R) reader structure"] +impl crate::Readable for PIN_CNF_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [pin_cnf::W](W) writer structure"] +impl crate::Writable for PIN_CNF_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets PIN_CNF[%s] +to value 0x02"] +impl crate::Resettable for PIN_CNF_SPEC { + const RESET_VALUE: Self::Ux = 0x02; +} diff --git a/down-the-stack/dk_pac/src/pdm.rs b/down-the-stack/dk_pac/src/pdm.rs new file mode 100644 index 0000000..304691a --- /dev/null +++ b/down-the-stack/dk_pac/src/pdm.rs @@ -0,0 +1,102 @@ +#[doc = r"Register block"] +#[repr(C)] +pub struct RegisterBlock { + #[doc = "0x00 - Starts continuous PDM transfer"] + pub tasks_start: TASKS_START, + #[doc = "0x04 - Stops PDM transfer"] + pub tasks_stop: TASKS_STOP, + _reserved2: [u8; 0xf8], + #[doc = "0x100 - PDM transfer has started"] + pub events_started: EVENTS_STARTED, + #[doc = "0x104 - PDM transfer has finished"] + pub events_stopped: EVENTS_STOPPED, + #[doc = "0x108 - The PDM has written the last sample specified by SAMPLE.MAXCNT (or the last sample after a STOP task has been received) to Data RAM"] + pub events_end: EVENTS_END, + _reserved5: [u8; 0x01f4], + #[doc = "0x300 - Enable or disable interrupt"] + pub inten: INTEN, + #[doc = "0x304 - Enable interrupt"] + pub intenset: INTENSET, + #[doc = "0x308 - Disable interrupt"] + pub intenclr: INTENCLR, + _reserved8: [u8; 0x01f4], + #[doc = "0x500 - PDM module enable register"] + pub enable: ENABLE, + #[doc = "0x504 - PDM clock generator control"] + pub pdmclkctrl: PDMCLKCTRL, + #[doc = "0x508 - Defines the routing of the connected PDM microphones' signals"] + pub mode: MODE, + _reserved11: [u8; 0x0c], + #[doc = "0x518 - Left output gain adjustment"] + pub gainl: GAINL, + #[doc = "0x51c - Right output gain adjustment"] + pub gainr: GAINR, + _reserved13: [u8; 0x20], + #[doc = "0x540..0x548 - Unspecified"] + pub psel: PSEL, + _reserved14: [u8; 0x18], + #[doc = "0x560..0x568 - Unspecified"] + pub sample: SAMPLE, +} +#[doc = "TASKS_START (w) register accessor: an alias for `Reg`"] +pub type TASKS_START = crate::Reg; +#[doc = "Starts continuous PDM transfer"] +pub mod tasks_start; +#[doc = "TASKS_STOP (w) register accessor: an alias for `Reg`"] +pub type TASKS_STOP = crate::Reg; +#[doc = "Stops PDM transfer"] +pub mod tasks_stop; +#[doc = "EVENTS_STARTED (rw) register accessor: an alias for `Reg`"] +pub type EVENTS_STARTED = crate::Reg; +#[doc = "PDM transfer has started"] +pub mod events_started; +#[doc = "EVENTS_STOPPED (rw) register accessor: an alias for `Reg`"] +pub type EVENTS_STOPPED = crate::Reg; +#[doc = "PDM transfer has finished"] +pub mod events_stopped; +#[doc = "EVENTS_END (rw) register accessor: an alias for `Reg`"] +pub type EVENTS_END = crate::Reg; +#[doc = "The PDM has written the last sample specified by SAMPLE.MAXCNT (or the last sample after a STOP task has been received) to Data RAM"] +pub mod events_end; +#[doc = "INTEN (rw) register accessor: an alias for `Reg`"] +pub type INTEN = crate::Reg; +#[doc = "Enable or disable interrupt"] +pub mod inten; +#[doc = "INTENSET (rw) register accessor: an alias for `Reg`"] +pub type INTENSET = crate::Reg; +#[doc = "Enable interrupt"] +pub mod intenset; +#[doc = "INTENCLR (rw) register accessor: an alias for `Reg`"] +pub type INTENCLR = crate::Reg; +#[doc = "Disable interrupt"] +pub mod intenclr; +#[doc = "ENABLE (rw) register accessor: an alias for `Reg`"] +pub type ENABLE = crate::Reg; +#[doc = "PDM module enable register"] +pub mod enable; +#[doc = "PDMCLKCTRL (rw) register accessor: an alias for `Reg`"] +pub type PDMCLKCTRL = crate::Reg; +#[doc = "PDM clock generator control"] +pub mod pdmclkctrl; +#[doc = "MODE (rw) register accessor: an alias for `Reg`"] +pub type MODE = crate::Reg; +#[doc = "Defines the routing of the connected PDM microphones' signals"] +pub mod mode; +#[doc = "GAINL (rw) register accessor: an alias for `Reg`"] +pub type GAINL = crate::Reg; +#[doc = "Left output gain adjustment"] +pub mod gainl; +#[doc = "GAINR (rw) register accessor: an alias for `Reg`"] +pub type GAINR = crate::Reg; +#[doc = "Right output gain adjustment"] +pub mod gainr; +#[doc = "Unspecified"] +pub use self::psel::PSEL; +#[doc = r"Cluster"] +#[doc = "Unspecified"] +pub mod psel; +#[doc = "Unspecified"] +pub use self::sample::SAMPLE; +#[doc = r"Cluster"] +#[doc = "Unspecified"] +pub mod sample; diff --git a/down-the-stack/dk_pac/src/pdm/enable.rs b/down-the-stack/dk_pac/src/pdm/enable.rs new file mode 100644 index 0000000..201bfb5 --- /dev/null +++ b/down-the-stack/dk_pac/src/pdm/enable.rs @@ -0,0 +1,126 @@ +#[doc = "Register `ENABLE` 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 `ENABLE` 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 `ENABLE` reader - Enable or disable PDM module"] +pub type ENABLE_R = crate::BitReader; +#[doc = "Enable or disable PDM module\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum ENABLE_A { + #[doc = "0: Disable"] + DISABLED = 0, + #[doc = "1: Enable"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: ENABLE_A) -> Self { + variant as u8 != 0 + } +} +impl ENABLE_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> ENABLE_A { + match self.bits { + false => ENABLE_A::DISABLED, + true => ENABLE_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == ENABLE_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == ENABLE_A::ENABLED + } +} +#[doc = "Field `ENABLE` writer - Enable or disable PDM module"] +pub type ENABLE_W<'a, const O: u8> = crate::BitWriter<'a, u32, ENABLE_SPEC, ENABLE_A, O>; +impl<'a, const O: u8> ENABLE_W<'a, O> { + #[doc = "Disable"] + #[inline(always)] + pub fn disabled(self) -> &'a mut W { + self.variant(ENABLE_A::DISABLED) + } + #[doc = "Enable"] + #[inline(always)] + pub fn enabled(self) -> &'a mut W { + self.variant(ENABLE_A::ENABLED) + } +} +impl R { + #[doc = "Bit 0 - Enable or disable PDM module"] + #[inline(always)] + pub fn enable(&self) -> ENABLE_R { + ENABLE_R::new((self.bits & 1) != 0) + } +} +impl W { + #[doc = "Bit 0 - Enable or disable PDM module"] + #[inline(always)] + #[must_use] + pub fn enable(&mut self) -> ENABLE_W<0> { + 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 + } +} +#[doc = "PDM module enable register\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 [enable](index.html) module"] +pub struct ENABLE_SPEC; +impl crate::RegisterSpec for ENABLE_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [enable::R](R) reader structure"] +impl crate::Readable for ENABLE_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [enable::W](W) writer structure"] +impl crate::Writable for ENABLE_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets ENABLE to value 0"] +impl crate::Resettable for ENABLE_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/pdm/events_end.rs b/down-the-stack/dk_pac/src/pdm/events_end.rs new file mode 100644 index 0000000..6fea207 --- /dev/null +++ b/down-the-stack/dk_pac/src/pdm/events_end.rs @@ -0,0 +1,127 @@ +#[doc = "Register `EVENTS_END` 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 `EVENTS_END` 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 `EVENTS_END` reader - The PDM has written the last sample specified by SAMPLE.MAXCNT (or the last sample after a STOP task has been received) to Data RAM"] +pub type EVENTS_END_R = crate::BitReader; +#[doc = "The PDM has written the last sample specified by SAMPLE.MAXCNT (or the last sample after a STOP task has been received) to Data RAM\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum EVENTS_END_A { + #[doc = "0: Event not generated"] + NOT_GENERATED = 0, + #[doc = "1: Event generated"] + GENERATED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: EVENTS_END_A) -> Self { + variant as u8 != 0 + } +} +impl EVENTS_END_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> EVENTS_END_A { + match self.bits { + false => EVENTS_END_A::NOT_GENERATED, + true => EVENTS_END_A::GENERATED, + } + } + #[doc = "Checks if the value of the field is `NOT_GENERATED`"] + #[inline(always)] + pub fn is_not_generated(&self) -> bool { + *self == EVENTS_END_A::NOT_GENERATED + } + #[doc = "Checks if the value of the field is `GENERATED`"] + #[inline(always)] + pub fn is_generated(&self) -> bool { + *self == EVENTS_END_A::GENERATED + } +} +#[doc = "Field `EVENTS_END` writer - The PDM has written the last sample specified by SAMPLE.MAXCNT (or the last sample after a STOP task has been received) to Data RAM"] +pub type EVENTS_END_W<'a, const O: u8> = + crate::BitWriter<'a, u32, EVENTS_END_SPEC, EVENTS_END_A, O>; +impl<'a, const O: u8> EVENTS_END_W<'a, O> { + #[doc = "Event not generated"] + #[inline(always)] + pub fn not_generated(self) -> &'a mut W { + self.variant(EVENTS_END_A::NOT_GENERATED) + } + #[doc = "Event generated"] + #[inline(always)] + pub fn generated(self) -> &'a mut W { + self.variant(EVENTS_END_A::GENERATED) + } +} +impl R { + #[doc = "Bit 0 - The PDM has written the last sample specified by SAMPLE.MAXCNT (or the last sample after a STOP task has been received) to Data RAM"] + #[inline(always)] + pub fn events_end(&self) -> EVENTS_END_R { + EVENTS_END_R::new((self.bits & 1) != 0) + } +} +impl W { + #[doc = "Bit 0 - The PDM has written the last sample specified by SAMPLE.MAXCNT (or the last sample after a STOP task has been received) to Data RAM"] + #[inline(always)] + #[must_use] + pub fn events_end(&mut self) -> EVENTS_END_W<0> { + EVENTS_END_W::new(self) + } + #[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 = "The PDM has written the last sample specified by SAMPLE.MAXCNT (or the last sample after a STOP task has been received) to Data RAM\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 [events_end](index.html) module"] +pub struct EVENTS_END_SPEC; +impl crate::RegisterSpec for EVENTS_END_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [events_end::R](R) reader structure"] +impl crate::Readable for EVENTS_END_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [events_end::W](W) writer structure"] +impl crate::Writable for EVENTS_END_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets EVENTS_END to value 0"] +impl crate::Resettable for EVENTS_END_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/pdm/events_started.rs b/down-the-stack/dk_pac/src/pdm/events_started.rs new file mode 100644 index 0000000..a547b36 --- /dev/null +++ b/down-the-stack/dk_pac/src/pdm/events_started.rs @@ -0,0 +1,127 @@ +#[doc = "Register `EVENTS_STARTED` 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 `EVENTS_STARTED` 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 `EVENTS_STARTED` reader - PDM transfer has started"] +pub type EVENTS_STARTED_R = crate::BitReader; +#[doc = "PDM transfer has started\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum EVENTS_STARTED_A { + #[doc = "0: Event not generated"] + NOT_GENERATED = 0, + #[doc = "1: Event generated"] + GENERATED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: EVENTS_STARTED_A) -> Self { + variant as u8 != 0 + } +} +impl EVENTS_STARTED_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> EVENTS_STARTED_A { + match self.bits { + false => EVENTS_STARTED_A::NOT_GENERATED, + true => EVENTS_STARTED_A::GENERATED, + } + } + #[doc = "Checks if the value of the field is `NOT_GENERATED`"] + #[inline(always)] + pub fn is_not_generated(&self) -> bool { + *self == EVENTS_STARTED_A::NOT_GENERATED + } + #[doc = "Checks if the value of the field is `GENERATED`"] + #[inline(always)] + pub fn is_generated(&self) -> bool { + *self == EVENTS_STARTED_A::GENERATED + } +} +#[doc = "Field `EVENTS_STARTED` writer - PDM transfer has started"] +pub type EVENTS_STARTED_W<'a, const O: u8> = + crate::BitWriter<'a, u32, EVENTS_STARTED_SPEC, EVENTS_STARTED_A, O>; +impl<'a, const O: u8> EVENTS_STARTED_W<'a, O> { + #[doc = "Event not generated"] + #[inline(always)] + pub fn not_generated(self) -> &'a mut W { + self.variant(EVENTS_STARTED_A::NOT_GENERATED) + } + #[doc = "Event generated"] + #[inline(always)] + pub fn generated(self) -> &'a mut W { + self.variant(EVENTS_STARTED_A::GENERATED) + } +} +impl R { + #[doc = "Bit 0 - PDM transfer has started"] + #[inline(always)] + pub fn events_started(&self) -> EVENTS_STARTED_R { + EVENTS_STARTED_R::new((self.bits & 1) != 0) + } +} +impl W { + #[doc = "Bit 0 - PDM transfer has started"] + #[inline(always)] + #[must_use] + pub fn events_started(&mut self) -> EVENTS_STARTED_W<0> { + EVENTS_STARTED_W::new(self) + } + #[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 = "PDM transfer has started\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 [events_started](index.html) module"] +pub struct EVENTS_STARTED_SPEC; +impl crate::RegisterSpec for EVENTS_STARTED_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [events_started::R](R) reader structure"] +impl crate::Readable for EVENTS_STARTED_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [events_started::W](W) writer structure"] +impl crate::Writable for EVENTS_STARTED_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets EVENTS_STARTED to value 0"] +impl crate::Resettable for EVENTS_STARTED_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/pdm/events_stopped.rs b/down-the-stack/dk_pac/src/pdm/events_stopped.rs new file mode 100644 index 0000000..2ab1a75 --- /dev/null +++ b/down-the-stack/dk_pac/src/pdm/events_stopped.rs @@ -0,0 +1,127 @@ +#[doc = "Register `EVENTS_STOPPED` 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 `EVENTS_STOPPED` 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 `EVENTS_STOPPED` reader - PDM transfer has finished"] +pub type EVENTS_STOPPED_R = crate::BitReader; +#[doc = "PDM transfer has finished\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum EVENTS_STOPPED_A { + #[doc = "0: Event not generated"] + NOT_GENERATED = 0, + #[doc = "1: Event generated"] + GENERATED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: EVENTS_STOPPED_A) -> Self { + variant as u8 != 0 + } +} +impl EVENTS_STOPPED_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> EVENTS_STOPPED_A { + match self.bits { + false => EVENTS_STOPPED_A::NOT_GENERATED, + true => EVENTS_STOPPED_A::GENERATED, + } + } + #[doc = "Checks if the value of the field is `NOT_GENERATED`"] + #[inline(always)] + pub fn is_not_generated(&self) -> bool { + *self == EVENTS_STOPPED_A::NOT_GENERATED + } + #[doc = "Checks if the value of the field is `GENERATED`"] + #[inline(always)] + pub fn is_generated(&self) -> bool { + *self == EVENTS_STOPPED_A::GENERATED + } +} +#[doc = "Field `EVENTS_STOPPED` writer - PDM transfer has finished"] +pub type EVENTS_STOPPED_W<'a, const O: u8> = + crate::BitWriter<'a, u32, EVENTS_STOPPED_SPEC, EVENTS_STOPPED_A, O>; +impl<'a, const O: u8> EVENTS_STOPPED_W<'a, O> { + #[doc = "Event not generated"] + #[inline(always)] + pub fn not_generated(self) -> &'a mut W { + self.variant(EVENTS_STOPPED_A::NOT_GENERATED) + } + #[doc = "Event generated"] + #[inline(always)] + pub fn generated(self) -> &'a mut W { + self.variant(EVENTS_STOPPED_A::GENERATED) + } +} +impl R { + #[doc = "Bit 0 - PDM transfer has finished"] + #[inline(always)] + pub fn events_stopped(&self) -> EVENTS_STOPPED_R { + EVENTS_STOPPED_R::new((self.bits & 1) != 0) + } +} +impl W { + #[doc = "Bit 0 - PDM transfer has finished"] + #[inline(always)] + #[must_use] + pub fn events_stopped(&mut self) -> EVENTS_STOPPED_W<0> { + EVENTS_STOPPED_W::new(self) + } + #[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 = "PDM transfer has finished\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 [events_stopped](index.html) module"] +pub struct EVENTS_STOPPED_SPEC; +impl crate::RegisterSpec for EVENTS_STOPPED_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [events_stopped::R](R) reader structure"] +impl crate::Readable for EVENTS_STOPPED_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [events_stopped::W](W) writer structure"] +impl crate::Writable for EVENTS_STOPPED_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets EVENTS_STOPPED to value 0"] +impl crate::Resettable for EVENTS_STOPPED_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/pdm/gainl.rs b/down-the-stack/dk_pac/src/pdm/gainl.rs new file mode 100644 index 0000000..cea3412 --- /dev/null +++ b/down-the-stack/dk_pac/src/pdm/gainl.rs @@ -0,0 +1,141 @@ +#[doc = "Register `GAINL` 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 `GAINL` 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 `GAINL` reader - Left output gain adjustment, in 0.5 dB steps, around the default module gain (see electrical parameters) 0x00 -20 dB gain adjust 0x01 -19.5 dB gain adjust (...) 0x27 -0.5 dB gain adjust 0x28 0 dB gain adjust 0x29 +0.5 dB gain adjust (...) 0x4F +19.5 dB gain adjust 0x50 +20 dB gain adjust"] +pub type GAINL_R = crate::FieldReader; +#[doc = "Left output gain adjustment, in 0.5 dB steps, around the default module gain (see electrical parameters) 0x00 -20 dB gain adjust 0x01 -19.5 dB gain adjust (...) 0x27 -0.5 dB gain adjust 0x28 0 dB gain adjust 0x29 +0.5 dB gain adjust (...) 0x4F +19.5 dB gain adjust 0x50 +20 dB gain adjust\n\nValue on reset: 40"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +#[repr(u8)] +pub enum GAINL_A { + #[doc = "0: -20dB gain adjustment (minimum)"] + MIN_GAIN = 0, + #[doc = "40: 0dB gain adjustment ('2500 RMS' requirement)"] + DEFAULT_GAIN = 40, + #[doc = "80: +20dB gain adjustment (maximum)"] + MAX_GAIN = 80, +} +impl From for u8 { + #[inline(always)] + fn from(variant: GAINL_A) -> Self { + variant as _ + } +} +impl GAINL_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> Option { + match self.bits { + 0 => Some(GAINL_A::MIN_GAIN), + 40 => Some(GAINL_A::DEFAULT_GAIN), + 80 => Some(GAINL_A::MAX_GAIN), + _ => None, + } + } + #[doc = "Checks if the value of the field is `MIN_GAIN`"] + #[inline(always)] + pub fn is_min_gain(&self) -> bool { + *self == GAINL_A::MIN_GAIN + } + #[doc = "Checks if the value of the field is `DEFAULT_GAIN`"] + #[inline(always)] + pub fn is_default_gain(&self) -> bool { + *self == GAINL_A::DEFAULT_GAIN + } + #[doc = "Checks if the value of the field is `MAX_GAIN`"] + #[inline(always)] + pub fn is_max_gain(&self) -> bool { + *self == GAINL_A::MAX_GAIN + } +} +#[doc = "Field `GAINL` writer - Left output gain adjustment, in 0.5 dB steps, around the default module gain (see electrical parameters) 0x00 -20 dB gain adjust 0x01 -19.5 dB gain adjust (...) 0x27 -0.5 dB gain adjust 0x28 0 dB gain adjust 0x29 +0.5 dB gain adjust (...) 0x4F +19.5 dB gain adjust 0x50 +20 dB gain adjust"] +pub type GAINL_W<'a, const O: u8> = crate::FieldWriter<'a, u32, GAINL_SPEC, u8, GAINL_A, 7, O>; +impl<'a, const O: u8> GAINL_W<'a, O> { + #[doc = "-20dB gain adjustment (minimum)"] + #[inline(always)] + pub fn min_gain(self) -> &'a mut W { + self.variant(GAINL_A::MIN_GAIN) + } + #[doc = "0dB gain adjustment ('2500 RMS' requirement)"] + #[inline(always)] + pub fn default_gain(self) -> &'a mut W { + self.variant(GAINL_A::DEFAULT_GAIN) + } + #[doc = "+20dB gain adjustment (maximum)"] + #[inline(always)] + pub fn max_gain(self) -> &'a mut W { + self.variant(GAINL_A::MAX_GAIN) + } +} +impl R { + #[doc = "Bits 0:6 - Left output gain adjustment, in 0.5 dB steps, around the default module gain (see electrical parameters) 0x00 -20 dB gain adjust 0x01 -19.5 dB gain adjust (...) 0x27 -0.5 dB gain adjust 0x28 0 dB gain adjust 0x29 +0.5 dB gain adjust (...) 0x4F +19.5 dB gain adjust 0x50 +20 dB gain adjust"] + #[inline(always)] + pub fn gainl(&self) -> GAINL_R { + GAINL_R::new((self.bits & 0x7f) as u8) + } +} +impl W { + #[doc = "Bits 0:6 - Left output gain adjustment, in 0.5 dB steps, around the default module gain (see electrical parameters) 0x00 -20 dB gain adjust 0x01 -19.5 dB gain adjust (...) 0x27 -0.5 dB gain adjust 0x28 0 dB gain adjust 0x29 +0.5 dB gain adjust (...) 0x4F +19.5 dB gain adjust 0x50 +20 dB gain adjust"] + #[inline(always)] + #[must_use] + pub fn gainl(&mut self) -> GAINL_W<0> { + GAINL_W::new(self) + } + #[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 = "Left output gain adjustment\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 [gainl](index.html) module"] +pub struct GAINL_SPEC; +impl crate::RegisterSpec for GAINL_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [gainl::R](R) reader structure"] +impl crate::Readable for GAINL_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [gainl::W](W) writer structure"] +impl crate::Writable for GAINL_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets GAINL to value 0x28"] +impl crate::Resettable for GAINL_SPEC { + const RESET_VALUE: Self::Ux = 0x28; +} diff --git a/down-the-stack/dk_pac/src/pdm/gainr.rs b/down-the-stack/dk_pac/src/pdm/gainr.rs new file mode 100644 index 0000000..9c9e128 --- /dev/null +++ b/down-the-stack/dk_pac/src/pdm/gainr.rs @@ -0,0 +1,141 @@ +#[doc = "Register `GAINR` 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 `GAINR` 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 `GAINR` reader - Right output gain adjustment, in 0.5 dB steps, around the default module gain (see electrical parameters)"] +pub type GAINR_R = crate::FieldReader; +#[doc = "Right output gain adjustment, in 0.5 dB steps, around the default module gain (see electrical parameters)\n\nValue on reset: 40"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +#[repr(u8)] +pub enum GAINR_A { + #[doc = "0: -20dB gain adjustment (minimum)"] + MIN_GAIN = 0, + #[doc = "40: 0dB gain adjustment ('2500 RMS' requirement)"] + DEFAULT_GAIN = 40, + #[doc = "80: +20dB gain adjustment (maximum)"] + MAX_GAIN = 80, +} +impl From for u8 { + #[inline(always)] + fn from(variant: GAINR_A) -> Self { + variant as _ + } +} +impl GAINR_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> Option { + match self.bits { + 0 => Some(GAINR_A::MIN_GAIN), + 40 => Some(GAINR_A::DEFAULT_GAIN), + 80 => Some(GAINR_A::MAX_GAIN), + _ => None, + } + } + #[doc = "Checks if the value of the field is `MIN_GAIN`"] + #[inline(always)] + pub fn is_min_gain(&self) -> bool { + *self == GAINR_A::MIN_GAIN + } + #[doc = "Checks if the value of the field is `DEFAULT_GAIN`"] + #[inline(always)] + pub fn is_default_gain(&self) -> bool { + *self == GAINR_A::DEFAULT_GAIN + } + #[doc = "Checks if the value of the field is `MAX_GAIN`"] + #[inline(always)] + pub fn is_max_gain(&self) -> bool { + *self == GAINR_A::MAX_GAIN + } +} +#[doc = "Field `GAINR` writer - Right output gain adjustment, in 0.5 dB steps, around the default module gain (see electrical parameters)"] +pub type GAINR_W<'a, const O: u8> = crate::FieldWriter<'a, u32, GAINR_SPEC, u8, GAINR_A, 8, O>; +impl<'a, const O: u8> GAINR_W<'a, O> { + #[doc = "-20dB gain adjustment (minimum)"] + #[inline(always)] + pub fn min_gain(self) -> &'a mut W { + self.variant(GAINR_A::MIN_GAIN) + } + #[doc = "0dB gain adjustment ('2500 RMS' requirement)"] + #[inline(always)] + pub fn default_gain(self) -> &'a mut W { + self.variant(GAINR_A::DEFAULT_GAIN) + } + #[doc = "+20dB gain adjustment (maximum)"] + #[inline(always)] + pub fn max_gain(self) -> &'a mut W { + self.variant(GAINR_A::MAX_GAIN) + } +} +impl R { + #[doc = "Bits 0:7 - Right output gain adjustment, in 0.5 dB steps, around the default module gain (see electrical parameters)"] + #[inline(always)] + pub fn gainr(&self) -> GAINR_R { + GAINR_R::new((self.bits & 0xff) as u8) + } +} +impl W { + #[doc = "Bits 0:7 - Right output gain adjustment, in 0.5 dB steps, around the default module gain (see electrical parameters)"] + #[inline(always)] + #[must_use] + pub fn gainr(&mut self) -> GAINR_W<0> { + GAINR_W::new(self) + } + #[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 = "Right output gain adjustment\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 [gainr](index.html) module"] +pub struct GAINR_SPEC; +impl crate::RegisterSpec for GAINR_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [gainr::R](R) reader structure"] +impl crate::Readable for GAINR_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [gainr::W](W) writer structure"] +impl crate::Writable for GAINR_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets GAINR to value 0x28"] +impl crate::Resettable for GAINR_SPEC { + const RESET_VALUE: Self::Ux = 0x28; +} diff --git a/down-the-stack/dk_pac/src/pdm/inten.rs b/down-the-stack/dk_pac/src/pdm/inten.rs new file mode 100644 index 0000000..6e96d08 --- /dev/null +++ b/down-the-stack/dk_pac/src/pdm/inten.rs @@ -0,0 +1,248 @@ +#[doc = "Register `INTEN` 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 `INTEN` 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 `STARTED` reader - Enable or disable interrupt for event STARTED"] +pub type STARTED_R = crate::BitReader; +#[doc = "Enable or disable interrupt for event STARTED\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum STARTED_A { + #[doc = "0: Disable"] + DISABLED = 0, + #[doc = "1: Enable"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: STARTED_A) -> Self { + variant as u8 != 0 + } +} +impl STARTED_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> STARTED_A { + match self.bits { + false => STARTED_A::DISABLED, + true => STARTED_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == STARTED_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == STARTED_A::ENABLED + } +} +#[doc = "Field `STARTED` writer - Enable or disable interrupt for event STARTED"] +pub type STARTED_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTEN_SPEC, STARTED_A, O>; +impl<'a, const O: u8> STARTED_W<'a, O> { + #[doc = "Disable"] + #[inline(always)] + pub fn disabled(self) -> &'a mut W { + self.variant(STARTED_A::DISABLED) + } + #[doc = "Enable"] + #[inline(always)] + pub fn enabled(self) -> &'a mut W { + self.variant(STARTED_A::ENABLED) + } +} +#[doc = "Field `STOPPED` reader - Enable or disable interrupt for event STOPPED"] +pub type STOPPED_R = crate::BitReader; +#[doc = "Enable or disable interrupt for event STOPPED\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum STOPPED_A { + #[doc = "0: Disable"] + DISABLED = 0, + #[doc = "1: Enable"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: STOPPED_A) -> Self { + variant as u8 != 0 + } +} +impl STOPPED_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> STOPPED_A { + match self.bits { + false => STOPPED_A::DISABLED, + true => STOPPED_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == STOPPED_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == STOPPED_A::ENABLED + } +} +#[doc = "Field `STOPPED` writer - Enable or disable interrupt for event STOPPED"] +pub type STOPPED_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTEN_SPEC, STOPPED_A, O>; +impl<'a, const O: u8> STOPPED_W<'a, O> { + #[doc = "Disable"] + #[inline(always)] + pub fn disabled(self) -> &'a mut W { + self.variant(STOPPED_A::DISABLED) + } + #[doc = "Enable"] + #[inline(always)] + pub fn enabled(self) -> &'a mut W { + self.variant(STOPPED_A::ENABLED) + } +} +#[doc = "Field `END` reader - Enable or disable interrupt for event END"] +pub type END_R = crate::BitReader; +#[doc = "Enable or disable interrupt for event END\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum END_A { + #[doc = "0: Disable"] + DISABLED = 0, + #[doc = "1: Enable"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: END_A) -> Self { + variant as u8 != 0 + } +} +impl END_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> END_A { + match self.bits { + false => END_A::DISABLED, + true => END_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == END_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == END_A::ENABLED + } +} +#[doc = "Field `END` writer - Enable or disable interrupt for event END"] +pub type END_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTEN_SPEC, END_A, O>; +impl<'a, const O: u8> END_W<'a, O> { + #[doc = "Disable"] + #[inline(always)] + pub fn disabled(self) -> &'a mut W { + self.variant(END_A::DISABLED) + } + #[doc = "Enable"] + #[inline(always)] + pub fn enabled(self) -> &'a mut W { + self.variant(END_A::ENABLED) + } +} +impl R { + #[doc = "Bit 0 - Enable or disable interrupt for event STARTED"] + #[inline(always)] + pub fn started(&self) -> STARTED_R { + STARTED_R::new((self.bits & 1) != 0) + } + #[doc = "Bit 1 - Enable or disable interrupt for event STOPPED"] + #[inline(always)] + pub fn stopped(&self) -> STOPPED_R { + STOPPED_R::new(((self.bits >> 1) & 1) != 0) + } + #[doc = "Bit 2 - Enable or disable interrupt for event END"] + #[inline(always)] + pub fn end(&self) -> END_R { + END_R::new(((self.bits >> 2) & 1) != 0) + } +} +impl W { + #[doc = "Bit 0 - Enable or disable interrupt for event STARTED"] + #[inline(always)] + #[must_use] + pub fn started(&mut self) -> STARTED_W<0> { + STARTED_W::new(self) + } + #[doc = "Bit 1 - Enable or disable interrupt for event STOPPED"] + #[inline(always)] + #[must_use] + pub fn stopped(&mut self) -> STOPPED_W<1> { + STOPPED_W::new(self) + } + #[doc = "Bit 2 - Enable or disable interrupt for event END"] + #[inline(always)] + #[must_use] + pub fn end(&mut self) -> END_W<2> { + END_W::new(self) + } + #[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 = "Enable or disable interrupt\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 [inten](index.html) module"] +pub struct INTEN_SPEC; +impl crate::RegisterSpec for INTEN_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [inten::R](R) reader structure"] +impl crate::Readable for INTEN_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [inten::W](W) writer structure"] +impl crate::Writable for INTEN_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets INTEN to value 0"] +impl crate::Resettable for INTEN_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/pdm/intenclr.rs b/down-the-stack/dk_pac/src/pdm/intenclr.rs new file mode 100644 index 0000000..dbc9e0c --- /dev/null +++ b/down-the-stack/dk_pac/src/pdm/intenclr.rs @@ -0,0 +1,269 @@ +#[doc = "Register `INTENCLR` 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 `INTENCLR` 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 `STARTED` reader - Write '1' to disable interrupt for event STARTED"] +pub type STARTED_R = crate::BitReader; +#[doc = "Write '1' to disable interrupt for event STARTED\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum STARTED_A { + #[doc = "0: Read: Disabled"] + DISABLED = 0, + #[doc = "1: Read: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: STARTED_A) -> Self { + variant as u8 != 0 + } +} +impl STARTED_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> STARTED_A { + match self.bits { + false => STARTED_A::DISABLED, + true => STARTED_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == STARTED_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == STARTED_A::ENABLED + } +} +#[doc = "Write '1' to disable interrupt for event STARTED\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum STARTED_AW { + #[doc = "1: Disable"] + CLEAR = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: STARTED_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `STARTED` writer - Write '1' to disable interrupt for event STARTED"] +pub type STARTED_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENCLR_SPEC, STARTED_AW, O>; +impl<'a, const O: u8> STARTED_W<'a, O> { + #[doc = "Disable"] + #[inline(always)] + pub fn clear(self) -> &'a mut W { + self.variant(STARTED_AW::CLEAR) + } +} +#[doc = "Field `STOPPED` reader - Write '1' to disable interrupt for event STOPPED"] +pub type STOPPED_R = crate::BitReader; +#[doc = "Write '1' to disable interrupt for event STOPPED\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum STOPPED_A { + #[doc = "0: Read: Disabled"] + DISABLED = 0, + #[doc = "1: Read: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: STOPPED_A) -> Self { + variant as u8 != 0 + } +} +impl STOPPED_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> STOPPED_A { + match self.bits { + false => STOPPED_A::DISABLED, + true => STOPPED_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == STOPPED_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == STOPPED_A::ENABLED + } +} +#[doc = "Write '1' to disable interrupt for event STOPPED\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum STOPPED_AW { + #[doc = "1: Disable"] + CLEAR = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: STOPPED_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `STOPPED` writer - Write '1' to disable interrupt for event STOPPED"] +pub type STOPPED_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENCLR_SPEC, STOPPED_AW, O>; +impl<'a, const O: u8> STOPPED_W<'a, O> { + #[doc = "Disable"] + #[inline(always)] + pub fn clear(self) -> &'a mut W { + self.variant(STOPPED_AW::CLEAR) + } +} +#[doc = "Field `END` reader - Write '1' to disable interrupt for event END"] +pub type END_R = crate::BitReader; +#[doc = "Write '1' to disable interrupt for event END\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum END_A { + #[doc = "0: Read: Disabled"] + DISABLED = 0, + #[doc = "1: Read: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: END_A) -> Self { + variant as u8 != 0 + } +} +impl END_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> END_A { + match self.bits { + false => END_A::DISABLED, + true => END_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == END_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == END_A::ENABLED + } +} +#[doc = "Write '1' to disable interrupt for event END\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum END_AW { + #[doc = "1: Disable"] + CLEAR = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: END_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `END` writer - Write '1' to disable interrupt for event END"] +pub type END_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENCLR_SPEC, END_AW, O>; +impl<'a, const O: u8> END_W<'a, O> { + #[doc = "Disable"] + #[inline(always)] + pub fn clear(self) -> &'a mut W { + self.variant(END_AW::CLEAR) + } +} +impl R { + #[doc = "Bit 0 - Write '1' to disable interrupt for event STARTED"] + #[inline(always)] + pub fn started(&self) -> STARTED_R { + STARTED_R::new((self.bits & 1) != 0) + } + #[doc = "Bit 1 - Write '1' to disable interrupt for event STOPPED"] + #[inline(always)] + pub fn stopped(&self) -> STOPPED_R { + STOPPED_R::new(((self.bits >> 1) & 1) != 0) + } + #[doc = "Bit 2 - Write '1' to disable interrupt for event END"] + #[inline(always)] + pub fn end(&self) -> END_R { + END_R::new(((self.bits >> 2) & 1) != 0) + } +} +impl W { + #[doc = "Bit 0 - Write '1' to disable interrupt for event STARTED"] + #[inline(always)] + #[must_use] + pub fn started(&mut self) -> STARTED_W<0> { + STARTED_W::new(self) + } + #[doc = "Bit 1 - Write '1' to disable interrupt for event STOPPED"] + #[inline(always)] + #[must_use] + pub fn stopped(&mut self) -> STOPPED_W<1> { + STOPPED_W::new(self) + } + #[doc = "Bit 2 - Write '1' to disable interrupt for event END"] + #[inline(always)] + #[must_use] + pub fn end(&mut self) -> END_W<2> { + END_W::new(self) + } + #[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 = "Disable interrupt\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 [intenclr](index.html) module"] +pub struct INTENCLR_SPEC; +impl crate::RegisterSpec for INTENCLR_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [intenclr::R](R) reader structure"] +impl crate::Readable for INTENCLR_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [intenclr::W](W) writer structure"] +impl crate::Writable for INTENCLR_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets INTENCLR to value 0"] +impl crate::Resettable for INTENCLR_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/pdm/intenset.rs b/down-the-stack/dk_pac/src/pdm/intenset.rs new file mode 100644 index 0000000..52cbbf2 --- /dev/null +++ b/down-the-stack/dk_pac/src/pdm/intenset.rs @@ -0,0 +1,269 @@ +#[doc = "Register `INTENSET` 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 `INTENSET` 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 `STARTED` reader - Write '1' to enable interrupt for event STARTED"] +pub type STARTED_R = crate::BitReader; +#[doc = "Write '1' to enable interrupt for event STARTED\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum STARTED_A { + #[doc = "0: Read: Disabled"] + DISABLED = 0, + #[doc = "1: Read: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: STARTED_A) -> Self { + variant as u8 != 0 + } +} +impl STARTED_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> STARTED_A { + match self.bits { + false => STARTED_A::DISABLED, + true => STARTED_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == STARTED_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == STARTED_A::ENABLED + } +} +#[doc = "Write '1' to enable interrupt for event STARTED\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum STARTED_AW { + #[doc = "1: Enable"] + SET = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: STARTED_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `STARTED` writer - Write '1' to enable interrupt for event STARTED"] +pub type STARTED_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENSET_SPEC, STARTED_AW, O>; +impl<'a, const O: u8> STARTED_W<'a, O> { + #[doc = "Enable"] + #[inline(always)] + pub fn set(self) -> &'a mut W { + self.variant(STARTED_AW::SET) + } +} +#[doc = "Field `STOPPED` reader - Write '1' to enable interrupt for event STOPPED"] +pub type STOPPED_R = crate::BitReader; +#[doc = "Write '1' to enable interrupt for event STOPPED\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum STOPPED_A { + #[doc = "0: Read: Disabled"] + DISABLED = 0, + #[doc = "1: Read: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: STOPPED_A) -> Self { + variant as u8 != 0 + } +} +impl STOPPED_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> STOPPED_A { + match self.bits { + false => STOPPED_A::DISABLED, + true => STOPPED_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == STOPPED_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == STOPPED_A::ENABLED + } +} +#[doc = "Write '1' to enable interrupt for event STOPPED\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum STOPPED_AW { + #[doc = "1: Enable"] + SET = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: STOPPED_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `STOPPED` writer - Write '1' to enable interrupt for event STOPPED"] +pub type STOPPED_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENSET_SPEC, STOPPED_AW, O>; +impl<'a, const O: u8> STOPPED_W<'a, O> { + #[doc = "Enable"] + #[inline(always)] + pub fn set(self) -> &'a mut W { + self.variant(STOPPED_AW::SET) + } +} +#[doc = "Field `END` reader - Write '1' to enable interrupt for event END"] +pub type END_R = crate::BitReader; +#[doc = "Write '1' to enable interrupt for event END\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum END_A { + #[doc = "0: Read: Disabled"] + DISABLED = 0, + #[doc = "1: Read: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: END_A) -> Self { + variant as u8 != 0 + } +} +impl END_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> END_A { + match self.bits { + false => END_A::DISABLED, + true => END_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == END_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == END_A::ENABLED + } +} +#[doc = "Write '1' to enable interrupt for event END\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum END_AW { + #[doc = "1: Enable"] + SET = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: END_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `END` writer - Write '1' to enable interrupt for event END"] +pub type END_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENSET_SPEC, END_AW, O>; +impl<'a, const O: u8> END_W<'a, O> { + #[doc = "Enable"] + #[inline(always)] + pub fn set(self) -> &'a mut W { + self.variant(END_AW::SET) + } +} +impl R { + #[doc = "Bit 0 - Write '1' to enable interrupt for event STARTED"] + #[inline(always)] + pub fn started(&self) -> STARTED_R { + STARTED_R::new((self.bits & 1) != 0) + } + #[doc = "Bit 1 - Write '1' to enable interrupt for event STOPPED"] + #[inline(always)] + pub fn stopped(&self) -> STOPPED_R { + STOPPED_R::new(((self.bits >> 1) & 1) != 0) + } + #[doc = "Bit 2 - Write '1' to enable interrupt for event END"] + #[inline(always)] + pub fn end(&self) -> END_R { + END_R::new(((self.bits >> 2) & 1) != 0) + } +} +impl W { + #[doc = "Bit 0 - Write '1' to enable interrupt for event STARTED"] + #[inline(always)] + #[must_use] + pub fn started(&mut self) -> STARTED_W<0> { + STARTED_W::new(self) + } + #[doc = "Bit 1 - Write '1' to enable interrupt for event STOPPED"] + #[inline(always)] + #[must_use] + pub fn stopped(&mut self) -> STOPPED_W<1> { + STOPPED_W::new(self) + } + #[doc = "Bit 2 - Write '1' to enable interrupt for event END"] + #[inline(always)] + #[must_use] + pub fn end(&mut self) -> END_W<2> { + END_W::new(self) + } + #[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 = "Enable interrupt\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 [intenset](index.html) module"] +pub struct INTENSET_SPEC; +impl crate::RegisterSpec for INTENSET_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [intenset::R](R) reader structure"] +impl crate::Readable for INTENSET_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [intenset::W](W) writer structure"] +impl crate::Writable for INTENSET_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets INTENSET to value 0"] +impl crate::Resettable for INTENSET_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/pdm/mode.rs b/down-the-stack/dk_pac/src/pdm/mode.rs new file mode 100644 index 0000000..8089100 --- /dev/null +++ b/down-the-stack/dk_pac/src/pdm/mode.rs @@ -0,0 +1,187 @@ +#[doc = "Register `MODE` 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 `MODE` 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 `OPERATION` reader - Mono or stereo operation"] +pub type OPERATION_R = crate::BitReader; +#[doc = "Mono or stereo operation\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum OPERATION_A { + #[doc = "0: Sample and store one pair (Left + Right) of 16bit samples per RAM word R=\\[31:16\\]; L=\\[15:0\\]"] + STEREO = 0, + #[doc = "1: Sample and store two successive Left samples (16 bit each) per RAM word L1=\\[31:16\\]; L0=\\[15:0\\]"] + MONO = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: OPERATION_A) -> Self { + variant as u8 != 0 + } +} +impl OPERATION_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> OPERATION_A { + match self.bits { + false => OPERATION_A::STEREO, + true => OPERATION_A::MONO, + } + } + #[doc = "Checks if the value of the field is `STEREO`"] + #[inline(always)] + pub fn is_stereo(&self) -> bool { + *self == OPERATION_A::STEREO + } + #[doc = "Checks if the value of the field is `MONO`"] + #[inline(always)] + pub fn is_mono(&self) -> bool { + *self == OPERATION_A::MONO + } +} +#[doc = "Field `OPERATION` writer - Mono or stereo operation"] +pub type OPERATION_W<'a, const O: u8> = crate::BitWriter<'a, u32, MODE_SPEC, OPERATION_A, O>; +impl<'a, const O: u8> OPERATION_W<'a, O> { + #[doc = "Sample and store one pair (Left + Right) of 16bit samples per RAM word R=\\[31:16\\]; L=\\[15:0\\]"] + #[inline(always)] + pub fn stereo(self) -> &'a mut W { + self.variant(OPERATION_A::STEREO) + } + #[doc = "Sample and store two successive Left samples (16 bit each) per RAM word L1=\\[31:16\\]; L0=\\[15:0\\]"] + #[inline(always)] + pub fn mono(self) -> &'a mut W { + self.variant(OPERATION_A::MONO) + } +} +#[doc = "Field `EDGE` reader - Defines on which PDM_CLK edge Left (or mono) is sampled"] +pub type EDGE_R = crate::BitReader; +#[doc = "Defines on which PDM_CLK edge Left (or mono) is sampled\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum EDGE_A { + #[doc = "0: Left (or mono) is sampled on falling edge of PDM_CLK"] + LEFT_FALLING = 0, + #[doc = "1: Left (or mono) is sampled on rising edge of PDM_CLK"] + LEFT_RISING = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: EDGE_A) -> Self { + variant as u8 != 0 + } +} +impl EDGE_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> EDGE_A { + match self.bits { + false => EDGE_A::LEFT_FALLING, + true => EDGE_A::LEFT_RISING, + } + } + #[doc = "Checks if the value of the field is `LEFT_FALLING`"] + #[inline(always)] + pub fn is_left_falling(&self) -> bool { + *self == EDGE_A::LEFT_FALLING + } + #[doc = "Checks if the value of the field is `LEFT_RISING`"] + #[inline(always)] + pub fn is_left_rising(&self) -> bool { + *self == EDGE_A::LEFT_RISING + } +} +#[doc = "Field `EDGE` writer - Defines on which PDM_CLK edge Left (or mono) is sampled"] +pub type EDGE_W<'a, const O: u8> = crate::BitWriter<'a, u32, MODE_SPEC, EDGE_A, O>; +impl<'a, const O: u8> EDGE_W<'a, O> { + #[doc = "Left (or mono) is sampled on falling edge of PDM_CLK"] + #[inline(always)] + pub fn left_falling(self) -> &'a mut W { + self.variant(EDGE_A::LEFT_FALLING) + } + #[doc = "Left (or mono) is sampled on rising edge of PDM_CLK"] + #[inline(always)] + pub fn left_rising(self) -> &'a mut W { + self.variant(EDGE_A::LEFT_RISING) + } +} +impl R { + #[doc = "Bit 0 - Mono or stereo operation"] + #[inline(always)] + pub fn operation(&self) -> OPERATION_R { + OPERATION_R::new((self.bits & 1) != 0) + } + #[doc = "Bit 1 - Defines on which PDM_CLK edge Left (or mono) is sampled"] + #[inline(always)] + pub fn edge(&self) -> EDGE_R { + EDGE_R::new(((self.bits >> 1) & 1) != 0) + } +} +impl W { + #[doc = "Bit 0 - Mono or stereo operation"] + #[inline(always)] + #[must_use] + pub fn operation(&mut self) -> OPERATION_W<0> { + OPERATION_W::new(self) + } + #[doc = "Bit 1 - Defines on which PDM_CLK edge Left (or mono) is sampled"] + #[inline(always)] + #[must_use] + pub fn edge(&mut self) -> EDGE_W<1> { + EDGE_W::new(self) + } + #[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 = "Defines the routing of the connected PDM microphones' signals\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 [mode](index.html) module"] +pub struct MODE_SPEC; +impl crate::RegisterSpec for MODE_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [mode::R](R) reader structure"] +impl crate::Readable for MODE_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [mode::W](W) writer structure"] +impl crate::Writable for 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 MODE to value 0"] +impl crate::Resettable for MODE_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/pdm/pdmclkctrl.rs b/down-the-stack/dk_pac/src/pdm/pdmclkctrl.rs new file mode 100644 index 0000000..7d49132 --- /dev/null +++ b/down-the-stack/dk_pac/src/pdm/pdmclkctrl.rs @@ -0,0 +1,141 @@ +#[doc = "Register `PDMCLKCTRL` 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 `PDMCLKCTRL` 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 `FREQ` reader - PDM_CLK frequency"] +pub type FREQ_R = crate::FieldReader; +#[doc = "PDM_CLK frequency\n\nValue on reset: 138412032"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +#[repr(u32)] +pub enum FREQ_A { + #[doc = "134217728: PDM_CLK = 32 MHz / 32 = 1.000 MHz"] + _1000K = 134217728, + #[doc = "138412032: PDM_CLK = 32 MHz / 31 = 1.032 MHz"] + DEFAULT = 138412032, + #[doc = "142606336: PDM_CLK = 32 MHz / 30 = 1.067 MHz"] + _1067K = 142606336, +} +impl From for u32 { + #[inline(always)] + fn from(variant: FREQ_A) -> Self { + variant as _ + } +} +impl FREQ_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> Option { + match self.bits { + 134217728 => Some(FREQ_A::_1000K), + 138412032 => Some(FREQ_A::DEFAULT), + 142606336 => Some(FREQ_A::_1067K), + _ => None, + } + } + #[doc = "Checks if the value of the field is `_1000K`"] + #[inline(always)] + pub fn is_1000k(&self) -> bool { + *self == FREQ_A::_1000K + } + #[doc = "Checks if the value of the field is `DEFAULT`"] + #[inline(always)] + pub fn is_default(&self) -> bool { + *self == FREQ_A::DEFAULT + } + #[doc = "Checks if the value of the field is `_1067K`"] + #[inline(always)] + pub fn is_1067k(&self) -> bool { + *self == FREQ_A::_1067K + } +} +#[doc = "Field `FREQ` writer - PDM_CLK frequency"] +pub type FREQ_W<'a, const O: u8> = crate::FieldWriter<'a, u32, PDMCLKCTRL_SPEC, u32, FREQ_A, 32, O>; +impl<'a, const O: u8> FREQ_W<'a, O> { + #[doc = "PDM_CLK = 32 MHz / 32 = 1.000 MHz"] + #[inline(always)] + pub fn _1000k(self) -> &'a mut W { + self.variant(FREQ_A::_1000K) + } + #[doc = "PDM_CLK = 32 MHz / 31 = 1.032 MHz"] + #[inline(always)] + pub fn default(self) -> &'a mut W { + self.variant(FREQ_A::DEFAULT) + } + #[doc = "PDM_CLK = 32 MHz / 30 = 1.067 MHz"] + #[inline(always)] + pub fn _1067k(self) -> &'a mut W { + self.variant(FREQ_A::_1067K) + } +} +impl R { + #[doc = "Bits 0:31 - PDM_CLK frequency"] + #[inline(always)] + pub fn freq(&self) -> FREQ_R { + FREQ_R::new(self.bits) + } +} +impl W { + #[doc = "Bits 0:31 - PDM_CLK frequency"] + #[inline(always)] + #[must_use] + pub fn freq(&mut self) -> FREQ_W<0> { + FREQ_W::new(self) + } + #[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 = "PDM clock generator control\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 [pdmclkctrl](index.html) module"] +pub struct PDMCLKCTRL_SPEC; +impl crate::RegisterSpec for PDMCLKCTRL_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [pdmclkctrl::R](R) reader structure"] +impl crate::Readable for PDMCLKCTRL_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [pdmclkctrl::W](W) writer structure"] +impl crate::Writable for PDMCLKCTRL_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets PDMCLKCTRL to value 0x0840_0000"] +impl crate::Resettable for PDMCLKCTRL_SPEC { + const RESET_VALUE: Self::Ux = 0x0840_0000; +} diff --git a/down-the-stack/dk_pac/src/pdm/psel.rs b/down-the-stack/dk_pac/src/pdm/psel.rs new file mode 100644 index 0000000..c471ca0 --- /dev/null +++ b/down-the-stack/dk_pac/src/pdm/psel.rs @@ -0,0 +1,16 @@ +#[doc = r"Register block"] +#[repr(C)] +pub struct PSEL { + #[doc = "0x00 - Pin number configuration for PDM CLK signal"] + pub clk: CLK, + #[doc = "0x04 - Pin number configuration for PDM DIN signal"] + pub din: DIN, +} +#[doc = "CLK (rw) register accessor: an alias for `Reg`"] +pub type CLK = crate::Reg; +#[doc = "Pin number configuration for PDM CLK signal"] +pub mod clk; +#[doc = "DIN (rw) register accessor: an alias for `Reg`"] +pub type DIN = crate::Reg; +#[doc = "Pin number configuration for PDM DIN signal"] +pub mod din; diff --git a/down-the-stack/dk_pac/src/pdm/psel/clk.rs b/down-the-stack/dk_pac/src/pdm/psel/clk.rs new file mode 100644 index 0000000..84bb3fc --- /dev/null +++ b/down-the-stack/dk_pac/src/pdm/psel/clk.rs @@ -0,0 +1,141 @@ +#[doc = "Register `CLK` 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 `CLK` 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 `PIN` reader - Pin number"] +pub type PIN_R = crate::FieldReader; +#[doc = "Field `PIN` writer - Pin number"] +pub type PIN_W<'a, const O: u8> = crate::FieldWriter<'a, u32, CLK_SPEC, u8, u8, 5, O>; +#[doc = "Field `CONNECT` reader - Connection"] +pub type CONNECT_R = crate::BitReader; +#[doc = "Connection\n\nValue on reset: 1"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum CONNECT_A { + #[doc = "1: Disconnect"] + DISCONNECTED = 1, + #[doc = "0: Connect"] + CONNECTED = 0, +} +impl From for bool { + #[inline(always)] + fn from(variant: CONNECT_A) -> Self { + variant as u8 != 0 + } +} +impl CONNECT_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> CONNECT_A { + match self.bits { + true => CONNECT_A::DISCONNECTED, + false => CONNECT_A::CONNECTED, + } + } + #[doc = "Checks if the value of the field is `DISCONNECTED`"] + #[inline(always)] + pub fn is_disconnected(&self) -> bool { + *self == CONNECT_A::DISCONNECTED + } + #[doc = "Checks if the value of the field is `CONNECTED`"] + #[inline(always)] + pub fn is_connected(&self) -> bool { + *self == CONNECT_A::CONNECTED + } +} +#[doc = "Field `CONNECT` writer - Connection"] +pub type CONNECT_W<'a, const O: u8> = crate::BitWriter<'a, u32, CLK_SPEC, CONNECT_A, O>; +impl<'a, const O: u8> CONNECT_W<'a, O> { + #[doc = "Disconnect"] + #[inline(always)] + pub fn disconnected(self) -> &'a mut W { + self.variant(CONNECT_A::DISCONNECTED) + } + #[doc = "Connect"] + #[inline(always)] + pub fn connected(self) -> &'a mut W { + self.variant(CONNECT_A::CONNECTED) + } +} +impl R { + #[doc = "Bits 0:4 - Pin number"] + #[inline(always)] + pub fn pin(&self) -> PIN_R { + PIN_R::new((self.bits & 0x1f) as u8) + } + #[doc = "Bit 31 - Connection"] + #[inline(always)] + pub fn connect(&self) -> CONNECT_R { + CONNECT_R::new(((self.bits >> 31) & 1) != 0) + } +} +impl W { + #[doc = "Bits 0:4 - Pin number"] + #[inline(always)] + #[must_use] + pub fn pin(&mut self) -> PIN_W<0> { + PIN_W::new(self) + } + #[doc = "Bit 31 - Connection"] + #[inline(always)] + #[must_use] + pub fn connect(&mut self) -> CONNECT_W<31> { + CONNECT_W::new(self) + } + #[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 = "Pin number configuration for PDM CLK signal\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 [clk](index.html) module"] +pub struct CLK_SPEC; +impl crate::RegisterSpec for CLK_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [clk::R](R) reader structure"] +impl crate::Readable for CLK_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [clk::W](W) writer structure"] +impl crate::Writable for CLK_SPEC { + type 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 to value 0xffff_ffff"] +impl crate::Resettable for CLK_SPEC { + const RESET_VALUE: Self::Ux = 0xffff_ffff; +} diff --git a/down-the-stack/dk_pac/src/pdm/psel/din.rs b/down-the-stack/dk_pac/src/pdm/psel/din.rs new file mode 100644 index 0000000..b85777a --- /dev/null +++ b/down-the-stack/dk_pac/src/pdm/psel/din.rs @@ -0,0 +1,141 @@ +#[doc = "Register `DIN` 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 `DIN` 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 `PIN` reader - Pin number"] +pub type PIN_R = crate::FieldReader; +#[doc = "Field `PIN` writer - Pin number"] +pub type PIN_W<'a, const O: u8> = crate::FieldWriter<'a, u32, DIN_SPEC, u8, u8, 5, O>; +#[doc = "Field `CONNECT` reader - Connection"] +pub type CONNECT_R = crate::BitReader; +#[doc = "Connection\n\nValue on reset: 1"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum CONNECT_A { + #[doc = "1: Disconnect"] + DISCONNECTED = 1, + #[doc = "0: Connect"] + CONNECTED = 0, +} +impl From for bool { + #[inline(always)] + fn from(variant: CONNECT_A) -> Self { + variant as u8 != 0 + } +} +impl CONNECT_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> CONNECT_A { + match self.bits { + true => CONNECT_A::DISCONNECTED, + false => CONNECT_A::CONNECTED, + } + } + #[doc = "Checks if the value of the field is `DISCONNECTED`"] + #[inline(always)] + pub fn is_disconnected(&self) -> bool { + *self == CONNECT_A::DISCONNECTED + } + #[doc = "Checks if the value of the field is `CONNECTED`"] + #[inline(always)] + pub fn is_connected(&self) -> bool { + *self == CONNECT_A::CONNECTED + } +} +#[doc = "Field `CONNECT` writer - Connection"] +pub type CONNECT_W<'a, const O: u8> = crate::BitWriter<'a, u32, DIN_SPEC, CONNECT_A, O>; +impl<'a, const O: u8> CONNECT_W<'a, O> { + #[doc = "Disconnect"] + #[inline(always)] + pub fn disconnected(self) -> &'a mut W { + self.variant(CONNECT_A::DISCONNECTED) + } + #[doc = "Connect"] + #[inline(always)] + pub fn connected(self) -> &'a mut W { + self.variant(CONNECT_A::CONNECTED) + } +} +impl R { + #[doc = "Bits 0:4 - Pin number"] + #[inline(always)] + pub fn pin(&self) -> PIN_R { + PIN_R::new((self.bits & 0x1f) as u8) + } + #[doc = "Bit 31 - Connection"] + #[inline(always)] + pub fn connect(&self) -> CONNECT_R { + CONNECT_R::new(((self.bits >> 31) & 1) != 0) + } +} +impl W { + #[doc = "Bits 0:4 - Pin number"] + #[inline(always)] + #[must_use] + pub fn pin(&mut self) -> PIN_W<0> { + PIN_W::new(self) + } + #[doc = "Bit 31 - Connection"] + #[inline(always)] + #[must_use] + pub fn connect(&mut self) -> CONNECT_W<31> { + CONNECT_W::new(self) + } + #[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 = "Pin number configuration for PDM DIN signal\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 [din](index.html) module"] +pub struct DIN_SPEC; +impl crate::RegisterSpec for DIN_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [din::R](R) reader structure"] +impl crate::Readable for DIN_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [din::W](W) writer structure"] +impl crate::Writable for DIN_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets DIN to value 0xffff_ffff"] +impl crate::Resettable for DIN_SPEC { + const RESET_VALUE: Self::Ux = 0xffff_ffff; +} diff --git a/down-the-stack/dk_pac/src/pdm/sample.rs b/down-the-stack/dk_pac/src/pdm/sample.rs new file mode 100644 index 0000000..f8bc956 --- /dev/null +++ b/down-the-stack/dk_pac/src/pdm/sample.rs @@ -0,0 +1,16 @@ +#[doc = r"Register block"] +#[repr(C)] +pub struct SAMPLE { + #[doc = "0x00 - RAM address pointer to write samples to with EasyDMA"] + pub ptr: PTR, + #[doc = "0x04 - Number of samples to allocate memory for in EasyDMA mode"] + pub maxcnt: MAXCNT, +} +#[doc = "PTR (rw) register accessor: an alias for `Reg`"] +pub type PTR = crate::Reg; +#[doc = "RAM address pointer to write samples to with EasyDMA"] +pub mod ptr; +#[doc = "MAXCNT (rw) register accessor: an alias for `Reg`"] +pub type MAXCNT = crate::Reg; +#[doc = "Number of samples to allocate memory for in EasyDMA mode"] +pub mod maxcnt; diff --git a/down-the-stack/dk_pac/src/pdm/sample/maxcnt.rs b/down-the-stack/dk_pac/src/pdm/sample/maxcnt.rs new file mode 100644 index 0000000..73a698b --- /dev/null +++ b/down-the-stack/dk_pac/src/pdm/sample/maxcnt.rs @@ -0,0 +1,80 @@ +#[doc = "Register `MAXCNT` 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 `MAXCNT` 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 `BUFFSIZE` reader - Length of DMA RAM allocation in number of samples"] +pub type BUFFSIZE_R = crate::FieldReader; +#[doc = "Field `BUFFSIZE` writer - Length of DMA RAM allocation in number of samples"] +pub type BUFFSIZE_W<'a, const O: u8> = crate::FieldWriter<'a, u32, MAXCNT_SPEC, u16, u16, 15, O>; +impl R { + #[doc = "Bits 0:14 - Length of DMA RAM allocation in number of samples"] + #[inline(always)] + pub fn buffsize(&self) -> BUFFSIZE_R { + BUFFSIZE_R::new((self.bits & 0x7fff) as u16) + } +} +impl W { + #[doc = "Bits 0:14 - Length of DMA RAM allocation in number of samples"] + #[inline(always)] + #[must_use] + pub fn buffsize(&mut self) -> BUFFSIZE_W<0> { + BUFFSIZE_W::new(self) + } + #[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 = "Number of samples to allocate memory for in EasyDMA mode\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 [maxcnt](index.html) module"] +pub struct MAXCNT_SPEC; +impl crate::RegisterSpec for MAXCNT_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [maxcnt::R](R) reader structure"] +impl crate::Readable for MAXCNT_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [maxcnt::W](W) writer structure"] +impl crate::Writable for MAXCNT_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets MAXCNT to value 0"] +impl crate::Resettable for MAXCNT_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/pdm/sample/ptr.rs b/down-the-stack/dk_pac/src/pdm/sample/ptr.rs new file mode 100644 index 0000000..7db84ec --- /dev/null +++ b/down-the-stack/dk_pac/src/pdm/sample/ptr.rs @@ -0,0 +1,80 @@ +#[doc = "Register `PTR` 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 `PTR` 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 `SAMPLEPTR` reader - Address to write PDM samples to over DMA"] +pub type SAMPLEPTR_R = crate::FieldReader; +#[doc = "Field `SAMPLEPTR` writer - Address to write PDM samples to over DMA"] +pub type SAMPLEPTR_W<'a, const O: u8> = crate::FieldWriter<'a, u32, PTR_SPEC, u32, u32, 32, O>; +impl R { + #[doc = "Bits 0:31 - Address to write PDM samples to over DMA"] + #[inline(always)] + pub fn sampleptr(&self) -> SAMPLEPTR_R { + SAMPLEPTR_R::new(self.bits) + } +} +impl W { + #[doc = "Bits 0:31 - Address to write PDM samples to over DMA"] + #[inline(always)] + #[must_use] + pub fn sampleptr(&mut self) -> SAMPLEPTR_W<0> { + SAMPLEPTR_W::new(self) + } + #[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 = "RAM address pointer to write samples to with EasyDMA\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 [ptr](index.html) module"] +pub struct PTR_SPEC; +impl crate::RegisterSpec for PTR_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [ptr::R](R) reader structure"] +impl crate::Readable for PTR_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [ptr::W](W) writer structure"] +impl crate::Writable for PTR_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets PTR to value 0"] +impl crate::Resettable for PTR_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/pdm/tasks_start.rs b/down-the-stack/dk_pac/src/pdm/tasks_start.rs new file mode 100644 index 0000000..89fbc4e --- /dev/null +++ b/down-the-stack/dk_pac/src/pdm/tasks_start.rs @@ -0,0 +1,72 @@ +#[doc = "Register `TASKS_START` 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 = "Starts continuous PDM transfer\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum TASKS_START_AW { + #[doc = "1: Trigger task"] + TRIGGER = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: TASKS_START_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `TASKS_START` writer - Starts continuous PDM transfer"] +pub type TASKS_START_W<'a, const O: u8> = + crate::BitWriter<'a, u32, TASKS_START_SPEC, TASKS_START_AW, O>; +impl<'a, const O: u8> TASKS_START_W<'a, O> { + #[doc = "Trigger task"] + #[inline(always)] + pub fn trigger(self) -> &'a mut W { + self.variant(TASKS_START_AW::TRIGGER) + } +} +impl W { + #[doc = "Bit 0 - Starts continuous PDM transfer"] + #[inline(always)] + #[must_use] + pub fn tasks_start(&mut self) -> TASKS_START_W<0> { + TASKS_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 + } +} +#[doc = "Starts continuous PDM transfer\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 [tasks_start](index.html) module"] +pub struct TASKS_START_SPEC; +impl crate::RegisterSpec for TASKS_START_SPEC { + type Ux = u32; +} +#[doc = "`write(|w| ..)` method takes [tasks_start::W](W) writer structure"] +impl crate::Writable for TASKS_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 TASKS_START to value 0"] +impl crate::Resettable for TASKS_START_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/pdm/tasks_stop.rs b/down-the-stack/dk_pac/src/pdm/tasks_stop.rs new file mode 100644 index 0000000..ce006c3 --- /dev/null +++ b/down-the-stack/dk_pac/src/pdm/tasks_stop.rs @@ -0,0 +1,72 @@ +#[doc = "Register `TASKS_STOP` 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 = "Stops PDM transfer\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum TASKS_STOP_AW { + #[doc = "1: Trigger task"] + TRIGGER = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: TASKS_STOP_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `TASKS_STOP` writer - Stops PDM transfer"] +pub type TASKS_STOP_W<'a, const O: u8> = + crate::BitWriter<'a, u32, TASKS_STOP_SPEC, TASKS_STOP_AW, O>; +impl<'a, const O: u8> TASKS_STOP_W<'a, O> { + #[doc = "Trigger task"] + #[inline(always)] + pub fn trigger(self) -> &'a mut W { + self.variant(TASKS_STOP_AW::TRIGGER) + } +} +impl W { + #[doc = "Bit 0 - Stops PDM transfer"] + #[inline(always)] + #[must_use] + pub fn tasks_stop(&mut self) -> TASKS_STOP_W<0> { + TASKS_STOP_W::new(self) + } + #[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 = "Stops PDM transfer\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 [tasks_stop](index.html) module"] +pub struct TASKS_STOP_SPEC; +impl crate::RegisterSpec for TASKS_STOP_SPEC { + type Ux = u32; +} +#[doc = "`write(|w| ..)` method takes [tasks_stop::W](W) writer structure"] +impl crate::Writable for TASKS_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 TASKS_STOP to value 0"] +impl crate::Resettable for TASKS_STOP_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/power.rs b/down-the-stack/dk_pac/src/power.rs new file mode 100644 index 0000000..3bffcb2 --- /dev/null +++ b/down-the-stack/dk_pac/src/power.rs @@ -0,0 +1,140 @@ +#[doc = r"Register block"] +#[repr(C)] +pub struct RegisterBlock { + _reserved0: [u8; 0x78], + #[doc = "0x78 - Enable constant latency mode"] + pub tasks_constlat: TASKS_CONSTLAT, + #[doc = "0x7c - Enable low power mode (variable latency)"] + pub tasks_lowpwr: TASKS_LOWPWR, + _reserved2: [u8; 0x88], + #[doc = "0x108 - Power failure warning"] + pub events_pofwarn: EVENTS_POFWARN, + _reserved3: [u8; 0x08], + #[doc = "0x114 - CPU entered WFI/WFE sleep"] + pub events_sleepenter: EVENTS_SLEEPENTER, + #[doc = "0x118 - CPU exited WFI/WFE sleep"] + pub events_sleepexit: EVENTS_SLEEPEXIT, + _reserved5: [u8; 0x01e8], + #[doc = "0x304 - Enable interrupt"] + pub intenset: INTENSET, + #[doc = "0x308 - Disable interrupt"] + pub intenclr: INTENCLR, + _reserved7: [u8; 0xf4], + #[doc = "0x400 - Reset reason"] + pub resetreas: RESETREAS, + _reserved8: [u8; 0x24], + #[doc = "0x428 - Deprecated register - RAM status register"] + pub ramstatus: RAMSTATUS, + _reserved9: [u8; 0xd4], + #[doc = "0x500 - System OFF register"] + pub systemoff: SYSTEMOFF, + _reserved10: [u8; 0x0c], + #[doc = "0x510 - Power failure comparator configuration"] + pub pofcon: POFCON, + _reserved11: [u8; 0x08], + #[doc = "0x51c - General purpose retention register"] + pub gpregret: GPREGRET, + #[doc = "0x520 - General purpose retention register"] + pub gpregret2: GPREGRET2, + #[doc = "0x524 - Deprecated register - RAM on/off register (this register is retained)"] + pub ramon: RAMON, + _reserved14: [u8; 0x2c], + #[doc = "0x554 - Deprecated register - RAM on/off register (this register is retained)"] + pub ramonb: RAMONB, + _reserved15: [u8; 0x20], + #[doc = "0x578 - DC/DC enable register"] + pub dcdcen: DCDCEN, + _reserved16: [u8; 0x0384], + #[doc = "0x900..0x90c - Unspecified"] + pub ram0: RAM, + _reserved17: [u8; 0x04], + #[doc = "0x910..0x91c - Unspecified"] + pub ram1: RAM, + _reserved18: [u8; 0x04], + #[doc = "0x920..0x92c - Unspecified"] + pub ram2: RAM, + _reserved19: [u8; 0x04], + #[doc = "0x930..0x93c - Unspecified"] + pub ram3: RAM, + _reserved20: [u8; 0x04], + #[doc = "0x940..0x94c - Unspecified"] + pub ram4: RAM, + _reserved21: [u8; 0x04], + #[doc = "0x950..0x95c - Unspecified"] + pub ram5: RAM, + _reserved22: [u8; 0x04], + #[doc = "0x960..0x96c - Unspecified"] + pub ram6: RAM, + _reserved23: [u8; 0x04], + #[doc = "0x970..0x97c - Unspecified"] + pub ram7: RAM, +} +#[doc = "TASKS_CONSTLAT (w) register accessor: an alias for `Reg`"] +pub type TASKS_CONSTLAT = crate::Reg; +#[doc = "Enable constant latency mode"] +pub mod tasks_constlat; +#[doc = "TASKS_LOWPWR (w) register accessor: an alias for `Reg`"] +pub type TASKS_LOWPWR = crate::Reg; +#[doc = "Enable low power mode (variable latency)"] +pub mod tasks_lowpwr; +#[doc = "EVENTS_POFWARN (rw) register accessor: an alias for `Reg`"] +pub type EVENTS_POFWARN = crate::Reg; +#[doc = "Power failure warning"] +pub mod events_pofwarn; +#[doc = "EVENTS_SLEEPENTER (rw) register accessor: an alias for `Reg`"] +pub type EVENTS_SLEEPENTER = crate::Reg; +#[doc = "CPU entered WFI/WFE sleep"] +pub mod events_sleepenter; +#[doc = "EVENTS_SLEEPEXIT (rw) register accessor: an alias for `Reg`"] +pub type EVENTS_SLEEPEXIT = crate::Reg; +#[doc = "CPU exited WFI/WFE sleep"] +pub mod events_sleepexit; +#[doc = "INTENSET (rw) register accessor: an alias for `Reg`"] +pub type INTENSET = crate::Reg; +#[doc = "Enable interrupt"] +pub mod intenset; +#[doc = "INTENCLR (rw) register accessor: an alias for `Reg`"] +pub type INTENCLR = crate::Reg; +#[doc = "Disable interrupt"] +pub mod intenclr; +#[doc = "RESETREAS (rw) register accessor: an alias for `Reg`"] +pub type RESETREAS = crate::Reg; +#[doc = "Reset reason"] +pub mod resetreas; +#[doc = "RAMSTATUS (r) register accessor: an alias for `Reg`"] +pub type RAMSTATUS = crate::Reg; +#[doc = "Deprecated register - RAM status register"] +pub mod ramstatus; +#[doc = "SYSTEMOFF (w) register accessor: an alias for `Reg`"] +pub type SYSTEMOFF = crate::Reg; +#[doc = "System OFF register"] +pub mod systemoff; +#[doc = "POFCON (rw) register accessor: an alias for `Reg`"] +pub type POFCON = crate::Reg; +#[doc = "Power failure comparator configuration"] +pub mod pofcon; +#[doc = "GPREGRET (rw) register accessor: an alias for `Reg`"] +pub type GPREGRET = crate::Reg; +#[doc = "General purpose retention register"] +pub mod gpregret; +#[doc = "GPREGRET2 (rw) register accessor: an alias for `Reg`"] +pub type GPREGRET2 = crate::Reg; +#[doc = "General purpose retention register"] +pub mod gpregret2; +#[doc = "RAMON (rw) register accessor: an alias for `Reg`"] +pub type RAMON = crate::Reg; +#[doc = "Deprecated register - RAM on/off register (this register is retained)"] +pub mod ramon; +#[doc = "RAMONB (rw) register accessor: an alias for `Reg`"] +pub type RAMONB = crate::Reg; +#[doc = "Deprecated register - RAM on/off register (this register is retained)"] +pub mod ramonb; +#[doc = "DCDCEN (rw) register accessor: an alias for `Reg`"] +pub type DCDCEN = crate::Reg; +#[doc = "DC/DC enable register"] +pub mod dcdcen; +#[doc = "Unspecified"] +pub use self::ram::RAM; +#[doc = r"Cluster"] +#[doc = "Unspecified"] +pub mod ram; diff --git a/down-the-stack/dk_pac/src/power/dcdcen.rs b/down-the-stack/dk_pac/src/power/dcdcen.rs new file mode 100644 index 0000000..cd6ae62 --- /dev/null +++ b/down-the-stack/dk_pac/src/power/dcdcen.rs @@ -0,0 +1,126 @@ +#[doc = "Register `DCDCEN` 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 `DCDCEN` 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 `DCDCEN` reader - Enable or disable DC/DC converter"] +pub type DCDCEN_R = crate::BitReader; +#[doc = "Enable or disable DC/DC converter\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum DCDCEN_A { + #[doc = "0: Disable"] + DISABLED = 0, + #[doc = "1: Enable"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: DCDCEN_A) -> Self { + variant as u8 != 0 + } +} +impl DCDCEN_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> DCDCEN_A { + match self.bits { + false => DCDCEN_A::DISABLED, + true => DCDCEN_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == DCDCEN_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == DCDCEN_A::ENABLED + } +} +#[doc = "Field `DCDCEN` writer - Enable or disable DC/DC converter"] +pub type DCDCEN_W<'a, const O: u8> = crate::BitWriter<'a, u32, DCDCEN_SPEC, DCDCEN_A, O>; +impl<'a, const O: u8> DCDCEN_W<'a, O> { + #[doc = "Disable"] + #[inline(always)] + pub fn disabled(self) -> &'a mut W { + self.variant(DCDCEN_A::DISABLED) + } + #[doc = "Enable"] + #[inline(always)] + pub fn enabled(self) -> &'a mut W { + self.variant(DCDCEN_A::ENABLED) + } +} +impl R { + #[doc = "Bit 0 - Enable or disable DC/DC converter"] + #[inline(always)] + pub fn dcdcen(&self) -> DCDCEN_R { + DCDCEN_R::new((self.bits & 1) != 0) + } +} +impl W { + #[doc = "Bit 0 - Enable or disable DC/DC converter"] + #[inline(always)] + #[must_use] + pub fn dcdcen(&mut self) -> DCDCEN_W<0> { + DCDCEN_W::new(self) + } + #[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 = "DC/DC enable register\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 [dcdcen](index.html) module"] +pub struct DCDCEN_SPEC; +impl crate::RegisterSpec for DCDCEN_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [dcdcen::R](R) reader structure"] +impl crate::Readable for DCDCEN_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [dcdcen::W](W) writer structure"] +impl crate::Writable for DCDCEN_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets DCDCEN to value 0"] +impl crate::Resettable for DCDCEN_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/power/events_pofwarn.rs b/down-the-stack/dk_pac/src/power/events_pofwarn.rs new file mode 100644 index 0000000..99d48d8 --- /dev/null +++ b/down-the-stack/dk_pac/src/power/events_pofwarn.rs @@ -0,0 +1,127 @@ +#[doc = "Register `EVENTS_POFWARN` 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 `EVENTS_POFWARN` 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 `EVENTS_POFWARN` reader - Power failure warning"] +pub type EVENTS_POFWARN_R = crate::BitReader; +#[doc = "Power failure warning\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum EVENTS_POFWARN_A { + #[doc = "0: Event not generated"] + NOT_GENERATED = 0, + #[doc = "1: Event generated"] + GENERATED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: EVENTS_POFWARN_A) -> Self { + variant as u8 != 0 + } +} +impl EVENTS_POFWARN_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> EVENTS_POFWARN_A { + match self.bits { + false => EVENTS_POFWARN_A::NOT_GENERATED, + true => EVENTS_POFWARN_A::GENERATED, + } + } + #[doc = "Checks if the value of the field is `NOT_GENERATED`"] + #[inline(always)] + pub fn is_not_generated(&self) -> bool { + *self == EVENTS_POFWARN_A::NOT_GENERATED + } + #[doc = "Checks if the value of the field is `GENERATED`"] + #[inline(always)] + pub fn is_generated(&self) -> bool { + *self == EVENTS_POFWARN_A::GENERATED + } +} +#[doc = "Field `EVENTS_POFWARN` writer - Power failure warning"] +pub type EVENTS_POFWARN_W<'a, const O: u8> = + crate::BitWriter<'a, u32, EVENTS_POFWARN_SPEC, EVENTS_POFWARN_A, O>; +impl<'a, const O: u8> EVENTS_POFWARN_W<'a, O> { + #[doc = "Event not generated"] + #[inline(always)] + pub fn not_generated(self) -> &'a mut W { + self.variant(EVENTS_POFWARN_A::NOT_GENERATED) + } + #[doc = "Event generated"] + #[inline(always)] + pub fn generated(self) -> &'a mut W { + self.variant(EVENTS_POFWARN_A::GENERATED) + } +} +impl R { + #[doc = "Bit 0 - Power failure warning"] + #[inline(always)] + pub fn events_pofwarn(&self) -> EVENTS_POFWARN_R { + EVENTS_POFWARN_R::new((self.bits & 1) != 0) + } +} +impl W { + #[doc = "Bit 0 - Power failure warning"] + #[inline(always)] + #[must_use] + pub fn events_pofwarn(&mut self) -> EVENTS_POFWARN_W<0> { + EVENTS_POFWARN_W::new(self) + } + #[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 = "Power failure warning\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 [events_pofwarn](index.html) module"] +pub struct EVENTS_POFWARN_SPEC; +impl crate::RegisterSpec for EVENTS_POFWARN_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [events_pofwarn::R](R) reader structure"] +impl crate::Readable for EVENTS_POFWARN_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [events_pofwarn::W](W) writer structure"] +impl crate::Writable for EVENTS_POFWARN_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets EVENTS_POFWARN to value 0"] +impl crate::Resettable for EVENTS_POFWARN_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/power/events_sleepenter.rs b/down-the-stack/dk_pac/src/power/events_sleepenter.rs new file mode 100644 index 0000000..4c49f01 --- /dev/null +++ b/down-the-stack/dk_pac/src/power/events_sleepenter.rs @@ -0,0 +1,127 @@ +#[doc = "Register `EVENTS_SLEEPENTER` 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 `EVENTS_SLEEPENTER` 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 `EVENTS_SLEEPENTER` reader - CPU entered WFI/WFE sleep"] +pub type EVENTS_SLEEPENTER_R = crate::BitReader; +#[doc = "CPU entered WFI/WFE sleep\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum EVENTS_SLEEPENTER_A { + #[doc = "0: Event not generated"] + NOT_GENERATED = 0, + #[doc = "1: Event generated"] + GENERATED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: EVENTS_SLEEPENTER_A) -> Self { + variant as u8 != 0 + } +} +impl EVENTS_SLEEPENTER_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> EVENTS_SLEEPENTER_A { + match self.bits { + false => EVENTS_SLEEPENTER_A::NOT_GENERATED, + true => EVENTS_SLEEPENTER_A::GENERATED, + } + } + #[doc = "Checks if the value of the field is `NOT_GENERATED`"] + #[inline(always)] + pub fn is_not_generated(&self) -> bool { + *self == EVENTS_SLEEPENTER_A::NOT_GENERATED + } + #[doc = "Checks if the value of the field is `GENERATED`"] + #[inline(always)] + pub fn is_generated(&self) -> bool { + *self == EVENTS_SLEEPENTER_A::GENERATED + } +} +#[doc = "Field `EVENTS_SLEEPENTER` writer - CPU entered WFI/WFE sleep"] +pub type EVENTS_SLEEPENTER_W<'a, const O: u8> = + crate::BitWriter<'a, u32, EVENTS_SLEEPENTER_SPEC, EVENTS_SLEEPENTER_A, O>; +impl<'a, const O: u8> EVENTS_SLEEPENTER_W<'a, O> { + #[doc = "Event not generated"] + #[inline(always)] + pub fn not_generated(self) -> &'a mut W { + self.variant(EVENTS_SLEEPENTER_A::NOT_GENERATED) + } + #[doc = "Event generated"] + #[inline(always)] + pub fn generated(self) -> &'a mut W { + self.variant(EVENTS_SLEEPENTER_A::GENERATED) + } +} +impl R { + #[doc = "Bit 0 - CPU entered WFI/WFE sleep"] + #[inline(always)] + pub fn events_sleepenter(&self) -> EVENTS_SLEEPENTER_R { + EVENTS_SLEEPENTER_R::new((self.bits & 1) != 0) + } +} +impl W { + #[doc = "Bit 0 - CPU entered WFI/WFE sleep"] + #[inline(always)] + #[must_use] + pub fn events_sleepenter(&mut self) -> EVENTS_SLEEPENTER_W<0> { + EVENTS_SLEEPENTER_W::new(self) + } + #[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 = "CPU entered WFI/WFE sleep\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 [events_sleepenter](index.html) module"] +pub struct EVENTS_SLEEPENTER_SPEC; +impl crate::RegisterSpec for EVENTS_SLEEPENTER_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [events_sleepenter::R](R) reader structure"] +impl crate::Readable for EVENTS_SLEEPENTER_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [events_sleepenter::W](W) writer structure"] +impl crate::Writable for EVENTS_SLEEPENTER_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets EVENTS_SLEEPENTER to value 0"] +impl crate::Resettable for EVENTS_SLEEPENTER_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/power/events_sleepexit.rs b/down-the-stack/dk_pac/src/power/events_sleepexit.rs new file mode 100644 index 0000000..52a0d9c --- /dev/null +++ b/down-the-stack/dk_pac/src/power/events_sleepexit.rs @@ -0,0 +1,127 @@ +#[doc = "Register `EVENTS_SLEEPEXIT` 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 `EVENTS_SLEEPEXIT` 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 `EVENTS_SLEEPEXIT` reader - CPU exited WFI/WFE sleep"] +pub type EVENTS_SLEEPEXIT_R = crate::BitReader; +#[doc = "CPU exited WFI/WFE sleep\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum EVENTS_SLEEPEXIT_A { + #[doc = "0: Event not generated"] + NOT_GENERATED = 0, + #[doc = "1: Event generated"] + GENERATED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: EVENTS_SLEEPEXIT_A) -> Self { + variant as u8 != 0 + } +} +impl EVENTS_SLEEPEXIT_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> EVENTS_SLEEPEXIT_A { + match self.bits { + false => EVENTS_SLEEPEXIT_A::NOT_GENERATED, + true => EVENTS_SLEEPEXIT_A::GENERATED, + } + } + #[doc = "Checks if the value of the field is `NOT_GENERATED`"] + #[inline(always)] + pub fn is_not_generated(&self) -> bool { + *self == EVENTS_SLEEPEXIT_A::NOT_GENERATED + } + #[doc = "Checks if the value of the field is `GENERATED`"] + #[inline(always)] + pub fn is_generated(&self) -> bool { + *self == EVENTS_SLEEPEXIT_A::GENERATED + } +} +#[doc = "Field `EVENTS_SLEEPEXIT` writer - CPU exited WFI/WFE sleep"] +pub type EVENTS_SLEEPEXIT_W<'a, const O: u8> = + crate::BitWriter<'a, u32, EVENTS_SLEEPEXIT_SPEC, EVENTS_SLEEPEXIT_A, O>; +impl<'a, const O: u8> EVENTS_SLEEPEXIT_W<'a, O> { + #[doc = "Event not generated"] + #[inline(always)] + pub fn not_generated(self) -> &'a mut W { + self.variant(EVENTS_SLEEPEXIT_A::NOT_GENERATED) + } + #[doc = "Event generated"] + #[inline(always)] + pub fn generated(self) -> &'a mut W { + self.variant(EVENTS_SLEEPEXIT_A::GENERATED) + } +} +impl R { + #[doc = "Bit 0 - CPU exited WFI/WFE sleep"] + #[inline(always)] + pub fn events_sleepexit(&self) -> EVENTS_SLEEPEXIT_R { + EVENTS_SLEEPEXIT_R::new((self.bits & 1) != 0) + } +} +impl W { + #[doc = "Bit 0 - CPU exited WFI/WFE sleep"] + #[inline(always)] + #[must_use] + pub fn events_sleepexit(&mut self) -> EVENTS_SLEEPEXIT_W<0> { + EVENTS_SLEEPEXIT_W::new(self) + } + #[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 = "CPU exited WFI/WFE sleep\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 [events_sleepexit](index.html) module"] +pub struct EVENTS_SLEEPEXIT_SPEC; +impl crate::RegisterSpec for EVENTS_SLEEPEXIT_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [events_sleepexit::R](R) reader structure"] +impl crate::Readable for EVENTS_SLEEPEXIT_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [events_sleepexit::W](W) writer structure"] +impl crate::Writable for EVENTS_SLEEPEXIT_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets EVENTS_SLEEPEXIT to value 0"] +impl crate::Resettable for EVENTS_SLEEPEXIT_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/power/gpregret.rs b/down-the-stack/dk_pac/src/power/gpregret.rs new file mode 100644 index 0000000..e15dd9f --- /dev/null +++ b/down-the-stack/dk_pac/src/power/gpregret.rs @@ -0,0 +1,80 @@ +#[doc = "Register `GPREGRET` 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 `GPREGRET` 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 `GPREGRET` reader - General purpose retention register"] +pub type GPREGRET_R = crate::FieldReader; +#[doc = "Field `GPREGRET` writer - General purpose retention register"] +pub type GPREGRET_W<'a, const O: u8> = crate::FieldWriter<'a, u32, GPREGRET_SPEC, u8, u8, 8, O>; +impl R { + #[doc = "Bits 0:7 - General purpose retention register"] + #[inline(always)] + pub fn gpregret(&self) -> GPREGRET_R { + GPREGRET_R::new((self.bits & 0xff) as u8) + } +} +impl W { + #[doc = "Bits 0:7 - General purpose retention register"] + #[inline(always)] + #[must_use] + pub fn gpregret(&mut self) -> GPREGRET_W<0> { + GPREGRET_W::new(self) + } + #[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 = "General purpose retention register\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 [gpregret](index.html) module"] +pub struct GPREGRET_SPEC; +impl crate::RegisterSpec for GPREGRET_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [gpregret::R](R) reader structure"] +impl crate::Readable for GPREGRET_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [gpregret::W](W) writer structure"] +impl crate::Writable for GPREGRET_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets GPREGRET to value 0"] +impl crate::Resettable for GPREGRET_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/power/gpregret2.rs b/down-the-stack/dk_pac/src/power/gpregret2.rs new file mode 100644 index 0000000..7f7355a --- /dev/null +++ b/down-the-stack/dk_pac/src/power/gpregret2.rs @@ -0,0 +1,80 @@ +#[doc = "Register `GPREGRET2` 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 `GPREGRET2` 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 `GPREGRET` reader - General purpose retention register"] +pub type GPREGRET_R = crate::FieldReader; +#[doc = "Field `GPREGRET` writer - General purpose retention register"] +pub type GPREGRET_W<'a, const O: u8> = crate::FieldWriter<'a, u32, GPREGRET2_SPEC, u8, u8, 8, O>; +impl R { + #[doc = "Bits 0:7 - General purpose retention register"] + #[inline(always)] + pub fn gpregret(&self) -> GPREGRET_R { + GPREGRET_R::new((self.bits & 0xff) as u8) + } +} +impl W { + #[doc = "Bits 0:7 - General purpose retention register"] + #[inline(always)] + #[must_use] + pub fn gpregret(&mut self) -> GPREGRET_W<0> { + GPREGRET_W::new(self) + } + #[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 = "General purpose retention register\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 [gpregret2](index.html) module"] +pub struct GPREGRET2_SPEC; +impl crate::RegisterSpec for GPREGRET2_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [gpregret2::R](R) reader structure"] +impl crate::Readable for GPREGRET2_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [gpregret2::W](W) writer structure"] +impl crate::Writable for GPREGRET2_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets GPREGRET2 to value 0"] +impl crate::Resettable for GPREGRET2_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/power/intenclr.rs b/down-the-stack/dk_pac/src/power/intenclr.rs new file mode 100644 index 0000000..2bf379c --- /dev/null +++ b/down-the-stack/dk_pac/src/power/intenclr.rs @@ -0,0 +1,269 @@ +#[doc = "Register `INTENCLR` 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 `INTENCLR` 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 `POFWARN` reader - Write '1' to disable interrupt for event POFWARN"] +pub type POFWARN_R = crate::BitReader; +#[doc = "Write '1' to disable interrupt for event POFWARN\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum POFWARN_A { + #[doc = "0: Read: Disabled"] + DISABLED = 0, + #[doc = "1: Read: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: POFWARN_A) -> Self { + variant as u8 != 0 + } +} +impl POFWARN_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> POFWARN_A { + match self.bits { + false => POFWARN_A::DISABLED, + true => POFWARN_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == POFWARN_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == POFWARN_A::ENABLED + } +} +#[doc = "Write '1' to disable interrupt for event POFWARN\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum POFWARN_AW { + #[doc = "1: Disable"] + CLEAR = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: POFWARN_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `POFWARN` writer - Write '1' to disable interrupt for event POFWARN"] +pub type POFWARN_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENCLR_SPEC, POFWARN_AW, O>; +impl<'a, const O: u8> POFWARN_W<'a, O> { + #[doc = "Disable"] + #[inline(always)] + pub fn clear(self) -> &'a mut W { + self.variant(POFWARN_AW::CLEAR) + } +} +#[doc = "Field `SLEEPENTER` reader - Write '1' to disable interrupt for event SLEEPENTER"] +pub type SLEEPENTER_R = crate::BitReader; +#[doc = "Write '1' to disable interrupt for event SLEEPENTER\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum SLEEPENTER_A { + #[doc = "0: Read: Disabled"] + DISABLED = 0, + #[doc = "1: Read: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: SLEEPENTER_A) -> Self { + variant as u8 != 0 + } +} +impl SLEEPENTER_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> SLEEPENTER_A { + match self.bits { + false => SLEEPENTER_A::DISABLED, + true => SLEEPENTER_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == SLEEPENTER_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == SLEEPENTER_A::ENABLED + } +} +#[doc = "Write '1' to disable interrupt for event SLEEPENTER\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum SLEEPENTER_AW { + #[doc = "1: Disable"] + CLEAR = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: SLEEPENTER_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `SLEEPENTER` writer - Write '1' to disable interrupt for event SLEEPENTER"] +pub type SLEEPENTER_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENCLR_SPEC, SLEEPENTER_AW, O>; +impl<'a, const O: u8> SLEEPENTER_W<'a, O> { + #[doc = "Disable"] + #[inline(always)] + pub fn clear(self) -> &'a mut W { + self.variant(SLEEPENTER_AW::CLEAR) + } +} +#[doc = "Field `SLEEPEXIT` reader - Write '1' to disable interrupt for event SLEEPEXIT"] +pub type SLEEPEXIT_R = crate::BitReader; +#[doc = "Write '1' to disable interrupt for event SLEEPEXIT\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum SLEEPEXIT_A { + #[doc = "0: Read: Disabled"] + DISABLED = 0, + #[doc = "1: Read: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: SLEEPEXIT_A) -> Self { + variant as u8 != 0 + } +} +impl SLEEPEXIT_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> SLEEPEXIT_A { + match self.bits { + false => SLEEPEXIT_A::DISABLED, + true => SLEEPEXIT_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == SLEEPEXIT_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == SLEEPEXIT_A::ENABLED + } +} +#[doc = "Write '1' to disable interrupt for event SLEEPEXIT\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum SLEEPEXIT_AW { + #[doc = "1: Disable"] + CLEAR = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: SLEEPEXIT_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `SLEEPEXIT` writer - Write '1' to disable interrupt for event SLEEPEXIT"] +pub type SLEEPEXIT_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENCLR_SPEC, SLEEPEXIT_AW, O>; +impl<'a, const O: u8> SLEEPEXIT_W<'a, O> { + #[doc = "Disable"] + #[inline(always)] + pub fn clear(self) -> &'a mut W { + self.variant(SLEEPEXIT_AW::CLEAR) + } +} +impl R { + #[doc = "Bit 2 - Write '1' to disable interrupt for event POFWARN"] + #[inline(always)] + pub fn pofwarn(&self) -> POFWARN_R { + POFWARN_R::new(((self.bits >> 2) & 1) != 0) + } + #[doc = "Bit 5 - Write '1' to disable interrupt for event SLEEPENTER"] + #[inline(always)] + pub fn sleepenter(&self) -> SLEEPENTER_R { + SLEEPENTER_R::new(((self.bits >> 5) & 1) != 0) + } + #[doc = "Bit 6 - Write '1' to disable interrupt for event SLEEPEXIT"] + #[inline(always)] + pub fn sleepexit(&self) -> SLEEPEXIT_R { + SLEEPEXIT_R::new(((self.bits >> 6) & 1) != 0) + } +} +impl W { + #[doc = "Bit 2 - Write '1' to disable interrupt for event POFWARN"] + #[inline(always)] + #[must_use] + pub fn pofwarn(&mut self) -> POFWARN_W<2> { + POFWARN_W::new(self) + } + #[doc = "Bit 5 - Write '1' to disable interrupt for event SLEEPENTER"] + #[inline(always)] + #[must_use] + pub fn sleepenter(&mut self) -> SLEEPENTER_W<5> { + SLEEPENTER_W::new(self) + } + #[doc = "Bit 6 - Write '1' to disable interrupt for event SLEEPEXIT"] + #[inline(always)] + #[must_use] + pub fn sleepexit(&mut self) -> SLEEPEXIT_W<6> { + SLEEPEXIT_W::new(self) + } + #[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 = "Disable interrupt\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 [intenclr](index.html) module"] +pub struct INTENCLR_SPEC; +impl crate::RegisterSpec for INTENCLR_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [intenclr::R](R) reader structure"] +impl crate::Readable for INTENCLR_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [intenclr::W](W) writer structure"] +impl crate::Writable for INTENCLR_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets INTENCLR to value 0"] +impl crate::Resettable for INTENCLR_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/power/intenset.rs b/down-the-stack/dk_pac/src/power/intenset.rs new file mode 100644 index 0000000..fc29bd4 --- /dev/null +++ b/down-the-stack/dk_pac/src/power/intenset.rs @@ -0,0 +1,269 @@ +#[doc = "Register `INTENSET` 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 `INTENSET` 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 `POFWARN` reader - Write '1' to enable interrupt for event POFWARN"] +pub type POFWARN_R = crate::BitReader; +#[doc = "Write '1' to enable interrupt for event POFWARN\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum POFWARN_A { + #[doc = "0: Read: Disabled"] + DISABLED = 0, + #[doc = "1: Read: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: POFWARN_A) -> Self { + variant as u8 != 0 + } +} +impl POFWARN_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> POFWARN_A { + match self.bits { + false => POFWARN_A::DISABLED, + true => POFWARN_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == POFWARN_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == POFWARN_A::ENABLED + } +} +#[doc = "Write '1' to enable interrupt for event POFWARN\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum POFWARN_AW { + #[doc = "1: Enable"] + SET = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: POFWARN_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `POFWARN` writer - Write '1' to enable interrupt for event POFWARN"] +pub type POFWARN_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENSET_SPEC, POFWARN_AW, O>; +impl<'a, const O: u8> POFWARN_W<'a, O> { + #[doc = "Enable"] + #[inline(always)] + pub fn set(self) -> &'a mut W { + self.variant(POFWARN_AW::SET) + } +} +#[doc = "Field `SLEEPENTER` reader - Write '1' to enable interrupt for event SLEEPENTER"] +pub type SLEEPENTER_R = crate::BitReader; +#[doc = "Write '1' to enable interrupt for event SLEEPENTER\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum SLEEPENTER_A { + #[doc = "0: Read: Disabled"] + DISABLED = 0, + #[doc = "1: Read: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: SLEEPENTER_A) -> Self { + variant as u8 != 0 + } +} +impl SLEEPENTER_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> SLEEPENTER_A { + match self.bits { + false => SLEEPENTER_A::DISABLED, + true => SLEEPENTER_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == SLEEPENTER_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == SLEEPENTER_A::ENABLED + } +} +#[doc = "Write '1' to enable interrupt for event SLEEPENTER\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum SLEEPENTER_AW { + #[doc = "1: Enable"] + SET = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: SLEEPENTER_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `SLEEPENTER` writer - Write '1' to enable interrupt for event SLEEPENTER"] +pub type SLEEPENTER_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENSET_SPEC, SLEEPENTER_AW, O>; +impl<'a, const O: u8> SLEEPENTER_W<'a, O> { + #[doc = "Enable"] + #[inline(always)] + pub fn set(self) -> &'a mut W { + self.variant(SLEEPENTER_AW::SET) + } +} +#[doc = "Field `SLEEPEXIT` reader - Write '1' to enable interrupt for event SLEEPEXIT"] +pub type SLEEPEXIT_R = crate::BitReader; +#[doc = "Write '1' to enable interrupt for event SLEEPEXIT\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum SLEEPEXIT_A { + #[doc = "0: Read: Disabled"] + DISABLED = 0, + #[doc = "1: Read: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: SLEEPEXIT_A) -> Self { + variant as u8 != 0 + } +} +impl SLEEPEXIT_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> SLEEPEXIT_A { + match self.bits { + false => SLEEPEXIT_A::DISABLED, + true => SLEEPEXIT_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == SLEEPEXIT_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == SLEEPEXIT_A::ENABLED + } +} +#[doc = "Write '1' to enable interrupt for event SLEEPEXIT\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum SLEEPEXIT_AW { + #[doc = "1: Enable"] + SET = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: SLEEPEXIT_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `SLEEPEXIT` writer - Write '1' to enable interrupt for event SLEEPEXIT"] +pub type SLEEPEXIT_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENSET_SPEC, SLEEPEXIT_AW, O>; +impl<'a, const O: u8> SLEEPEXIT_W<'a, O> { + #[doc = "Enable"] + #[inline(always)] + pub fn set(self) -> &'a mut W { + self.variant(SLEEPEXIT_AW::SET) + } +} +impl R { + #[doc = "Bit 2 - Write '1' to enable interrupt for event POFWARN"] + #[inline(always)] + pub fn pofwarn(&self) -> POFWARN_R { + POFWARN_R::new(((self.bits >> 2) & 1) != 0) + } + #[doc = "Bit 5 - Write '1' to enable interrupt for event SLEEPENTER"] + #[inline(always)] + pub fn sleepenter(&self) -> SLEEPENTER_R { + SLEEPENTER_R::new(((self.bits >> 5) & 1) != 0) + } + #[doc = "Bit 6 - Write '1' to enable interrupt for event SLEEPEXIT"] + #[inline(always)] + pub fn sleepexit(&self) -> SLEEPEXIT_R { + SLEEPEXIT_R::new(((self.bits >> 6) & 1) != 0) + } +} +impl W { + #[doc = "Bit 2 - Write '1' to enable interrupt for event POFWARN"] + #[inline(always)] + #[must_use] + pub fn pofwarn(&mut self) -> POFWARN_W<2> { + POFWARN_W::new(self) + } + #[doc = "Bit 5 - Write '1' to enable interrupt for event SLEEPENTER"] + #[inline(always)] + #[must_use] + pub fn sleepenter(&mut self) -> SLEEPENTER_W<5> { + SLEEPENTER_W::new(self) + } + #[doc = "Bit 6 - Write '1' to enable interrupt for event SLEEPEXIT"] + #[inline(always)] + #[must_use] + pub fn sleepexit(&mut self) -> SLEEPEXIT_W<6> { + SLEEPEXIT_W::new(self) + } + #[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 = "Enable interrupt\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 [intenset](index.html) module"] +pub struct INTENSET_SPEC; +impl crate::RegisterSpec for INTENSET_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [intenset::R](R) reader structure"] +impl crate::Readable for INTENSET_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [intenset::W](W) writer structure"] +impl crate::Writable for INTENSET_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets INTENSET to value 0"] +impl crate::Resettable for INTENSET_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/power/pofcon.rs b/down-the-stack/dk_pac/src/power/pofcon.rs new file mode 100644 index 0000000..c98b460 --- /dev/null +++ b/down-the-stack/dk_pac/src/power/pofcon.rs @@ -0,0 +1,320 @@ +#[doc = "Register `POFCON` 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 `POFCON` 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 `POF` reader - Enable or disable power failure comparator"] +pub type POF_R = crate::BitReader; +#[doc = "Enable or disable power failure comparator\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum POF_A { + #[doc = "0: Disable"] + DISABLED = 0, + #[doc = "1: Enable"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: POF_A) -> Self { + variant as u8 != 0 + } +} +impl POF_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> POF_A { + match self.bits { + false => POF_A::DISABLED, + true => POF_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == POF_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == POF_A::ENABLED + } +} +#[doc = "Field `POF` writer - Enable or disable power failure comparator"] +pub type POF_W<'a, const O: u8> = crate::BitWriter<'a, u32, POFCON_SPEC, POF_A, O>; +impl<'a, const O: u8> POF_W<'a, O> { + #[doc = "Disable"] + #[inline(always)] + pub fn disabled(self) -> &'a mut W { + self.variant(POF_A::DISABLED) + } + #[doc = "Enable"] + #[inline(always)] + pub fn enabled(self) -> &'a mut W { + self.variant(POF_A::ENABLED) + } +} +#[doc = "Field `THRESHOLD` reader - Power failure comparator threshold setting"] +pub type THRESHOLD_R = crate::FieldReader; +#[doc = "Power failure comparator threshold setting\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +#[repr(u8)] +pub enum THRESHOLD_A { + #[doc = "4: Set threshold to 1.7 V"] + V17 = 4, + #[doc = "5: Set threshold to 1.8 V"] + V18 = 5, + #[doc = "6: Set threshold to 1.9 V"] + V19 = 6, + #[doc = "7: Set threshold to 2.0 V"] + V20 = 7, + #[doc = "8: Set threshold to 2.1 V"] + V21 = 8, + #[doc = "9: Set threshold to 2.2 V"] + V22 = 9, + #[doc = "10: Set threshold to 2.3 V"] + V23 = 10, + #[doc = "11: Set threshold to 2.4 V"] + V24 = 11, + #[doc = "12: Set threshold to 2.5 V"] + V25 = 12, + #[doc = "13: Set threshold to 2.6 V"] + V26 = 13, + #[doc = "14: Set threshold to 2.7 V"] + V27 = 14, + #[doc = "15: Set threshold to 2.8 V"] + V28 = 15, +} +impl From for u8 { + #[inline(always)] + fn from(variant: THRESHOLD_A) -> Self { + variant as _ + } +} +impl THRESHOLD_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> Option { + match self.bits { + 4 => Some(THRESHOLD_A::V17), + 5 => Some(THRESHOLD_A::V18), + 6 => Some(THRESHOLD_A::V19), + 7 => Some(THRESHOLD_A::V20), + 8 => Some(THRESHOLD_A::V21), + 9 => Some(THRESHOLD_A::V22), + 10 => Some(THRESHOLD_A::V23), + 11 => Some(THRESHOLD_A::V24), + 12 => Some(THRESHOLD_A::V25), + 13 => Some(THRESHOLD_A::V26), + 14 => Some(THRESHOLD_A::V27), + 15 => Some(THRESHOLD_A::V28), + _ => None, + } + } + #[doc = "Checks if the value of the field is `V17`"] + #[inline(always)] + pub fn is_v17(&self) -> bool { + *self == THRESHOLD_A::V17 + } + #[doc = "Checks if the value of the field is `V18`"] + #[inline(always)] + pub fn is_v18(&self) -> bool { + *self == THRESHOLD_A::V18 + } + #[doc = "Checks if the value of the field is `V19`"] + #[inline(always)] + pub fn is_v19(&self) -> bool { + *self == THRESHOLD_A::V19 + } + #[doc = "Checks if the value of the field is `V20`"] + #[inline(always)] + pub fn is_v20(&self) -> bool { + *self == THRESHOLD_A::V20 + } + #[doc = "Checks if the value of the field is `V21`"] + #[inline(always)] + pub fn is_v21(&self) -> bool { + *self == THRESHOLD_A::V21 + } + #[doc = "Checks if the value of the field is `V22`"] + #[inline(always)] + pub fn is_v22(&self) -> bool { + *self == THRESHOLD_A::V22 + } + #[doc = "Checks if the value of the field is `V23`"] + #[inline(always)] + pub fn is_v23(&self) -> bool { + *self == THRESHOLD_A::V23 + } + #[doc = "Checks if the value of the field is `V24`"] + #[inline(always)] + pub fn is_v24(&self) -> bool { + *self == THRESHOLD_A::V24 + } + #[doc = "Checks if the value of the field is `V25`"] + #[inline(always)] + pub fn is_v25(&self) -> bool { + *self == THRESHOLD_A::V25 + } + #[doc = "Checks if the value of the field is `V26`"] + #[inline(always)] + pub fn is_v26(&self) -> bool { + *self == THRESHOLD_A::V26 + } + #[doc = "Checks if the value of the field is `V27`"] + #[inline(always)] + pub fn is_v27(&self) -> bool { + *self == THRESHOLD_A::V27 + } + #[doc = "Checks if the value of the field is `V28`"] + #[inline(always)] + pub fn is_v28(&self) -> bool { + *self == THRESHOLD_A::V28 + } +} +#[doc = "Field `THRESHOLD` writer - Power failure comparator threshold setting"] +pub type THRESHOLD_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, POFCON_SPEC, u8, THRESHOLD_A, 4, O>; +impl<'a, const O: u8> THRESHOLD_W<'a, O> { + #[doc = "Set threshold to 1.7 V"] + #[inline(always)] + pub fn v17(self) -> &'a mut W { + self.variant(THRESHOLD_A::V17) + } + #[doc = "Set threshold to 1.8 V"] + #[inline(always)] + pub fn v18(self) -> &'a mut W { + self.variant(THRESHOLD_A::V18) + } + #[doc = "Set threshold to 1.9 V"] + #[inline(always)] + pub fn v19(self) -> &'a mut W { + self.variant(THRESHOLD_A::V19) + } + #[doc = "Set threshold to 2.0 V"] + #[inline(always)] + pub fn v20(self) -> &'a mut W { + self.variant(THRESHOLD_A::V20) + } + #[doc = "Set threshold to 2.1 V"] + #[inline(always)] + pub fn v21(self) -> &'a mut W { + self.variant(THRESHOLD_A::V21) + } + #[doc = "Set threshold to 2.2 V"] + #[inline(always)] + pub fn v22(self) -> &'a mut W { + self.variant(THRESHOLD_A::V22) + } + #[doc = "Set threshold to 2.3 V"] + #[inline(always)] + pub fn v23(self) -> &'a mut W { + self.variant(THRESHOLD_A::V23) + } + #[doc = "Set threshold to 2.4 V"] + #[inline(always)] + pub fn v24(self) -> &'a mut W { + self.variant(THRESHOLD_A::V24) + } + #[doc = "Set threshold to 2.5 V"] + #[inline(always)] + pub fn v25(self) -> &'a mut W { + self.variant(THRESHOLD_A::V25) + } + #[doc = "Set threshold to 2.6 V"] + #[inline(always)] + pub fn v26(self) -> &'a mut W { + self.variant(THRESHOLD_A::V26) + } + #[doc = "Set threshold to 2.7 V"] + #[inline(always)] + pub fn v27(self) -> &'a mut W { + self.variant(THRESHOLD_A::V27) + } + #[doc = "Set threshold to 2.8 V"] + #[inline(always)] + pub fn v28(self) -> &'a mut W { + self.variant(THRESHOLD_A::V28) + } +} +impl R { + #[doc = "Bit 0 - Enable or disable power failure comparator"] + #[inline(always)] + pub fn pof(&self) -> POF_R { + POF_R::new((self.bits & 1) != 0) + } + #[doc = "Bits 1:4 - Power failure comparator threshold setting"] + #[inline(always)] + pub fn threshold(&self) -> THRESHOLD_R { + THRESHOLD_R::new(((self.bits >> 1) & 0x0f) as u8) + } +} +impl W { + #[doc = "Bit 0 - Enable or disable power failure comparator"] + #[inline(always)] + #[must_use] + pub fn pof(&mut self) -> POF_W<0> { + POF_W::new(self) + } + #[doc = "Bits 1:4 - Power failure comparator threshold setting"] + #[inline(always)] + #[must_use] + pub fn threshold(&mut self) -> THRESHOLD_W<1> { + THRESHOLD_W::new(self) + } + #[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 = "Power failure comparator configuration\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 [pofcon](index.html) module"] +pub struct POFCON_SPEC; +impl crate::RegisterSpec for POFCON_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [pofcon::R](R) reader structure"] +impl crate::Readable for POFCON_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [pofcon::W](W) writer structure"] +impl crate::Writable for POFCON_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets POFCON to value 0"] +impl crate::Resettable for POFCON_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/power/ram.rs b/down-the-stack/dk_pac/src/power/ram.rs new file mode 100644 index 0000000..4a7baf8 --- /dev/null +++ b/down-the-stack/dk_pac/src/power/ram.rs @@ -0,0 +1,22 @@ +#[doc = r"Register block"] +#[repr(C)] +pub struct RAM { + #[doc = "0x00 - Description cluster: RAMn power control register"] + pub power: POWER, + #[doc = "0x04 - Description cluster: RAMn power control set register"] + pub powerset: POWERSET, + #[doc = "0x08 - Description cluster: RAMn power control clear register"] + pub powerclr: POWERCLR, +} +#[doc = "POWER (rw) register accessor: an alias for `Reg`"] +pub type POWER = crate::Reg; +#[doc = "Description cluster: RAMn power control register"] +pub mod power; +#[doc = "POWERSET (w) register accessor: an alias for `Reg`"] +pub type POWERSET = crate::Reg; +#[doc = "Description cluster: RAMn power control set register"] +pub mod powerset; +#[doc = "POWERCLR (w) register accessor: an alias for `Reg`"] +pub type POWERCLR = crate::Reg; +#[doc = "Description cluster: RAMn power control clear register"] +pub mod powerclr; diff --git a/down-the-stack/dk_pac/src/power/ram/power.rs b/down-the-stack/dk_pac/src/power/ram/power.rs new file mode 100644 index 0000000..e47bc3b --- /dev/null +++ b/down-the-stack/dk_pac/src/power/ram/power.rs @@ -0,0 +1,309 @@ +#[doc = "Register `POWER` 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 `POWER` 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 `S0POWER` reader - Keep RAM section S0 ON or OFF in System ON mode."] +pub type S0POWER_R = crate::BitReader; +#[doc = "Keep RAM section S0 ON or OFF in System ON mode.\n\nValue on reset: 1"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum S0POWER_A { + #[doc = "0: Off"] + OFF = 0, + #[doc = "1: On"] + ON = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: S0POWER_A) -> Self { + variant as u8 != 0 + } +} +impl S0POWER_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> S0POWER_A { + match self.bits { + false => S0POWER_A::OFF, + true => S0POWER_A::ON, + } + } + #[doc = "Checks if the value of the field is `OFF`"] + #[inline(always)] + pub fn is_off(&self) -> bool { + *self == S0POWER_A::OFF + } + #[doc = "Checks if the value of the field is `ON`"] + #[inline(always)] + pub fn is_on(&self) -> bool { + *self == S0POWER_A::ON + } +} +#[doc = "Field `S0POWER` writer - Keep RAM section S0 ON or OFF in System ON mode."] +pub type S0POWER_W<'a, const O: u8> = crate::BitWriter<'a, u32, POWER_SPEC, S0POWER_A, O>; +impl<'a, const O: u8> S0POWER_W<'a, O> { + #[doc = "Off"] + #[inline(always)] + pub fn off(self) -> &'a mut W { + self.variant(S0POWER_A::OFF) + } + #[doc = "On"] + #[inline(always)] + pub fn on(self) -> &'a mut W { + self.variant(S0POWER_A::ON) + } +} +#[doc = "Field `S1POWER` reader - Keep RAM section S1 ON or OFF in System ON mode."] +pub type S1POWER_R = crate::BitReader; +#[doc = "Keep RAM section S1 ON or OFF in System ON mode.\n\nValue on reset: 1"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum S1POWER_A { + #[doc = "0: Off"] + OFF = 0, + #[doc = "1: On"] + ON = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: S1POWER_A) -> Self { + variant as u8 != 0 + } +} +impl S1POWER_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> S1POWER_A { + match self.bits { + false => S1POWER_A::OFF, + true => S1POWER_A::ON, + } + } + #[doc = "Checks if the value of the field is `OFF`"] + #[inline(always)] + pub fn is_off(&self) -> bool { + *self == S1POWER_A::OFF + } + #[doc = "Checks if the value of the field is `ON`"] + #[inline(always)] + pub fn is_on(&self) -> bool { + *self == S1POWER_A::ON + } +} +#[doc = "Field `S1POWER` writer - Keep RAM section S1 ON or OFF in System ON mode."] +pub type S1POWER_W<'a, const O: u8> = crate::BitWriter<'a, u32, POWER_SPEC, S1POWER_A, O>; +impl<'a, const O: u8> S1POWER_W<'a, O> { + #[doc = "Off"] + #[inline(always)] + pub fn off(self) -> &'a mut W { + self.variant(S1POWER_A::OFF) + } + #[doc = "On"] + #[inline(always)] + pub fn on(self) -> &'a mut W { + self.variant(S1POWER_A::ON) + } +} +#[doc = "Field `S0RETENTION` reader - Keep retention on RAM section S0 when RAM section is in OFF"] +pub type S0RETENTION_R = crate::BitReader; +#[doc = "Keep retention on RAM section S0 when RAM section is in OFF\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum S0RETENTION_A { + #[doc = "0: Off"] + OFF = 0, + #[doc = "1: On"] + ON = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: S0RETENTION_A) -> Self { + variant as u8 != 0 + } +} +impl S0RETENTION_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> S0RETENTION_A { + match self.bits { + false => S0RETENTION_A::OFF, + true => S0RETENTION_A::ON, + } + } + #[doc = "Checks if the value of the field is `OFF`"] + #[inline(always)] + pub fn is_off(&self) -> bool { + *self == S0RETENTION_A::OFF + } + #[doc = "Checks if the value of the field is `ON`"] + #[inline(always)] + pub fn is_on(&self) -> bool { + *self == S0RETENTION_A::ON + } +} +#[doc = "Field `S0RETENTION` writer - Keep retention on RAM section S0 when RAM section is in OFF"] +pub type S0RETENTION_W<'a, const O: u8> = crate::BitWriter<'a, u32, POWER_SPEC, S0RETENTION_A, O>; +impl<'a, const O: u8> S0RETENTION_W<'a, O> { + #[doc = "Off"] + #[inline(always)] + pub fn off(self) -> &'a mut W { + self.variant(S0RETENTION_A::OFF) + } + #[doc = "On"] + #[inline(always)] + pub fn on(self) -> &'a mut W { + self.variant(S0RETENTION_A::ON) + } +} +#[doc = "Field `S1RETENTION` reader - Keep retention on RAM section S1 when RAM section is in OFF"] +pub type S1RETENTION_R = crate::BitReader; +#[doc = "Keep retention on RAM section S1 when RAM section is in OFF\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum S1RETENTION_A { + #[doc = "0: Off"] + OFF = 0, + #[doc = "1: On"] + ON = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: S1RETENTION_A) -> Self { + variant as u8 != 0 + } +} +impl S1RETENTION_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> S1RETENTION_A { + match self.bits { + false => S1RETENTION_A::OFF, + true => S1RETENTION_A::ON, + } + } + #[doc = "Checks if the value of the field is `OFF`"] + #[inline(always)] + pub fn is_off(&self) -> bool { + *self == S1RETENTION_A::OFF + } + #[doc = "Checks if the value of the field is `ON`"] + #[inline(always)] + pub fn is_on(&self) -> bool { + *self == S1RETENTION_A::ON + } +} +#[doc = "Field `S1RETENTION` writer - Keep retention on RAM section S1 when RAM section is in OFF"] +pub type S1RETENTION_W<'a, const O: u8> = crate::BitWriter<'a, u32, POWER_SPEC, S1RETENTION_A, O>; +impl<'a, const O: u8> S1RETENTION_W<'a, O> { + #[doc = "Off"] + #[inline(always)] + pub fn off(self) -> &'a mut W { + self.variant(S1RETENTION_A::OFF) + } + #[doc = "On"] + #[inline(always)] + pub fn on(self) -> &'a mut W { + self.variant(S1RETENTION_A::ON) + } +} +impl R { + #[doc = "Bit 0 - Keep RAM section S0 ON or OFF in System ON mode."] + #[inline(always)] + pub fn s0power(&self) -> S0POWER_R { + S0POWER_R::new((self.bits & 1) != 0) + } + #[doc = "Bit 1 - Keep RAM section S1 ON or OFF in System ON mode."] + #[inline(always)] + pub fn s1power(&self) -> S1POWER_R { + S1POWER_R::new(((self.bits >> 1) & 1) != 0) + } + #[doc = "Bit 16 - Keep retention on RAM section S0 when RAM section is in OFF"] + #[inline(always)] + pub fn s0retention(&self) -> S0RETENTION_R { + S0RETENTION_R::new(((self.bits >> 16) & 1) != 0) + } + #[doc = "Bit 17 - Keep retention on RAM section S1 when RAM section is in OFF"] + #[inline(always)] + pub fn s1retention(&self) -> S1RETENTION_R { + S1RETENTION_R::new(((self.bits >> 17) & 1) != 0) + } +} +impl W { + #[doc = "Bit 0 - Keep RAM section S0 ON or OFF in System ON mode."] + #[inline(always)] + #[must_use] + pub fn s0power(&mut self) -> S0POWER_W<0> { + S0POWER_W::new(self) + } + #[doc = "Bit 1 - Keep RAM section S1 ON or OFF in System ON mode."] + #[inline(always)] + #[must_use] + pub fn s1power(&mut self) -> S1POWER_W<1> { + S1POWER_W::new(self) + } + #[doc = "Bit 16 - Keep retention on RAM section S0 when RAM section is in OFF"] + #[inline(always)] + #[must_use] + pub fn s0retention(&mut self) -> S0RETENTION_W<16> { + S0RETENTION_W::new(self) + } + #[doc = "Bit 17 - Keep retention on RAM section S1 when RAM section is in OFF"] + #[inline(always)] + #[must_use] + pub fn s1retention(&mut self) -> S1RETENTION_W<17> { + S1RETENTION_W::new(self) + } + #[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 = "Description cluster: RAMn power control register\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 [power](index.html) module"] +pub struct POWER_SPEC; +impl crate::RegisterSpec for POWER_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [power::R](R) reader structure"] +impl crate::Readable for POWER_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [power::W](W) writer structure"] +impl crate::Writable for POWER_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets POWER to value 0xffff"] +impl crate::Resettable for POWER_SPEC { + const RESET_VALUE: Self::Ux = 0xffff; +} diff --git a/down-the-stack/dk_pac/src/power/ram/powerclr.rs b/down-the-stack/dk_pac/src/power/ram/powerclr.rs new file mode 100644 index 0000000..bd22ead --- /dev/null +++ b/down-the-stack/dk_pac/src/power/ram/powerclr.rs @@ -0,0 +1,154 @@ +#[doc = "Register `POWERCLR` 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 = "Keep RAM section S0 of RAMn on or off in System ON mode\n\nValue on reset: 1"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum S0POWER_AW { + #[doc = "1: Off"] + OFF = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: S0POWER_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `S0POWER` writer - Keep RAM section S0 of RAMn on or off in System ON mode"] +pub type S0POWER_W<'a, const O: u8> = crate::BitWriter<'a, u32, POWERCLR_SPEC, S0POWER_AW, O>; +impl<'a, const O: u8> S0POWER_W<'a, O> { + #[doc = "Off"] + #[inline(always)] + pub fn off(self) -> &'a mut W { + self.variant(S0POWER_AW::OFF) + } +} +#[doc = "Keep RAM section S1 of RAMn on or off in System ON mode\n\nValue on reset: 1"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum S1POWER_AW { + #[doc = "1: Off"] + OFF = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: S1POWER_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `S1POWER` writer - Keep RAM section S1 of RAMn on or off in System ON mode"] +pub type S1POWER_W<'a, const O: u8> = crate::BitWriter<'a, u32, POWERCLR_SPEC, S1POWER_AW, O>; +impl<'a, const O: u8> S1POWER_W<'a, O> { + #[doc = "Off"] + #[inline(always)] + pub fn off(self) -> &'a mut W { + self.variant(S1POWER_AW::OFF) + } +} +#[doc = "Keep retention on RAM section S0 when RAM section is switched off\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum S0RETENTION_AW { + #[doc = "1: Off"] + OFF = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: S0RETENTION_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `S0RETENTION` writer - Keep retention on RAM section S0 when RAM section is switched off"] +pub type S0RETENTION_W<'a, const O: u8> = + crate::BitWriter<'a, u32, POWERCLR_SPEC, S0RETENTION_AW, O>; +impl<'a, const O: u8> S0RETENTION_W<'a, O> { + #[doc = "Off"] + #[inline(always)] + pub fn off(self) -> &'a mut W { + self.variant(S0RETENTION_AW::OFF) + } +} +#[doc = "Keep retention on RAM section S1 when RAM section is switched off\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum S1RETENTION_AW { + #[doc = "1: Off"] + OFF = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: S1RETENTION_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `S1RETENTION` writer - Keep retention on RAM section S1 when RAM section is switched off"] +pub type S1RETENTION_W<'a, const O: u8> = + crate::BitWriter<'a, u32, POWERCLR_SPEC, S1RETENTION_AW, O>; +impl<'a, const O: u8> S1RETENTION_W<'a, O> { + #[doc = "Off"] + #[inline(always)] + pub fn off(self) -> &'a mut W { + self.variant(S1RETENTION_AW::OFF) + } +} +impl W { + #[doc = "Bit 0 - Keep RAM section S0 of RAMn on or off in System ON mode"] + #[inline(always)] + #[must_use] + pub fn s0power(&mut self) -> S0POWER_W<0> { + S0POWER_W::new(self) + } + #[doc = "Bit 1 - Keep RAM section S1 of RAMn on or off in System ON mode"] + #[inline(always)] + #[must_use] + pub fn s1power(&mut self) -> S1POWER_W<1> { + S1POWER_W::new(self) + } + #[doc = "Bit 16 - Keep retention on RAM section S0 when RAM section is switched off"] + #[inline(always)] + #[must_use] + pub fn s0retention(&mut self) -> S0RETENTION_W<16> { + S0RETENTION_W::new(self) + } + #[doc = "Bit 17 - Keep retention on RAM section S1 when RAM section is switched off"] + #[inline(always)] + #[must_use] + pub fn s1retention(&mut self) -> S1RETENTION_W<17> { + S1RETENTION_W::new(self) + } + #[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 = "Description cluster: RAMn power control clear register\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 [powerclr](index.html) module"] +pub struct POWERCLR_SPEC; +impl crate::RegisterSpec for POWERCLR_SPEC { + type Ux = u32; +} +#[doc = "`write(|w| ..)` method takes [powerclr::W](W) writer structure"] +impl crate::Writable for POWERCLR_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets POWERCLR to value 0xffff"] +impl crate::Resettable for POWERCLR_SPEC { + const RESET_VALUE: Self::Ux = 0xffff; +} diff --git a/down-the-stack/dk_pac/src/power/ram/powerset.rs b/down-the-stack/dk_pac/src/power/ram/powerset.rs new file mode 100644 index 0000000..83b8e2e --- /dev/null +++ b/down-the-stack/dk_pac/src/power/ram/powerset.rs @@ -0,0 +1,154 @@ +#[doc = "Register `POWERSET` 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 = "Keep RAM section S0 of RAMn on or off in System ON mode\n\nValue on reset: 1"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum S0POWER_AW { + #[doc = "1: On"] + ON = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: S0POWER_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `S0POWER` writer - Keep RAM section S0 of RAMn on or off in System ON mode"] +pub type S0POWER_W<'a, const O: u8> = crate::BitWriter<'a, u32, POWERSET_SPEC, S0POWER_AW, O>; +impl<'a, const O: u8> S0POWER_W<'a, O> { + #[doc = "On"] + #[inline(always)] + pub fn on(self) -> &'a mut W { + self.variant(S0POWER_AW::ON) + } +} +#[doc = "Keep RAM section S1 of RAMn on or off in System ON mode\n\nValue on reset: 1"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum S1POWER_AW { + #[doc = "1: On"] + ON = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: S1POWER_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `S1POWER` writer - Keep RAM section S1 of RAMn on or off in System ON mode"] +pub type S1POWER_W<'a, const O: u8> = crate::BitWriter<'a, u32, POWERSET_SPEC, S1POWER_AW, O>; +impl<'a, const O: u8> S1POWER_W<'a, O> { + #[doc = "On"] + #[inline(always)] + pub fn on(self) -> &'a mut W { + self.variant(S1POWER_AW::ON) + } +} +#[doc = "Keep retention on RAM section S0 when RAM section is switched off\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum S0RETENTION_AW { + #[doc = "1: On"] + ON = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: S0RETENTION_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `S0RETENTION` writer - Keep retention on RAM section S0 when RAM section is switched off"] +pub type S0RETENTION_W<'a, const O: u8> = + crate::BitWriter<'a, u32, POWERSET_SPEC, S0RETENTION_AW, O>; +impl<'a, const O: u8> S0RETENTION_W<'a, O> { + #[doc = "On"] + #[inline(always)] + pub fn on(self) -> &'a mut W { + self.variant(S0RETENTION_AW::ON) + } +} +#[doc = "Keep retention on RAM section S1 when RAM section is switched off\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum S1RETENTION_AW { + #[doc = "1: On"] + ON = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: S1RETENTION_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `S1RETENTION` writer - Keep retention on RAM section S1 when RAM section is switched off"] +pub type S1RETENTION_W<'a, const O: u8> = + crate::BitWriter<'a, u32, POWERSET_SPEC, S1RETENTION_AW, O>; +impl<'a, const O: u8> S1RETENTION_W<'a, O> { + #[doc = "On"] + #[inline(always)] + pub fn on(self) -> &'a mut W { + self.variant(S1RETENTION_AW::ON) + } +} +impl W { + #[doc = "Bit 0 - Keep RAM section S0 of RAMn on or off in System ON mode"] + #[inline(always)] + #[must_use] + pub fn s0power(&mut self) -> S0POWER_W<0> { + S0POWER_W::new(self) + } + #[doc = "Bit 1 - Keep RAM section S1 of RAMn on or off in System ON mode"] + #[inline(always)] + #[must_use] + pub fn s1power(&mut self) -> S1POWER_W<1> { + S1POWER_W::new(self) + } + #[doc = "Bit 16 - Keep retention on RAM section S0 when RAM section is switched off"] + #[inline(always)] + #[must_use] + pub fn s0retention(&mut self) -> S0RETENTION_W<16> { + S0RETENTION_W::new(self) + } + #[doc = "Bit 17 - Keep retention on RAM section S1 when RAM section is switched off"] + #[inline(always)] + #[must_use] + pub fn s1retention(&mut self) -> S1RETENTION_W<17> { + S1RETENTION_W::new(self) + } + #[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 = "Description cluster: RAMn power control set register\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 [powerset](index.html) module"] +pub struct POWERSET_SPEC; +impl crate::RegisterSpec for POWERSET_SPEC { + type Ux = u32; +} +#[doc = "`write(|w| ..)` method takes [powerset::W](W) writer structure"] +impl crate::Writable for POWERSET_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets POWERSET to value 0xffff"] +impl crate::Resettable for POWERSET_SPEC { + const RESET_VALUE: Self::Ux = 0xffff; +} diff --git a/down-the-stack/dk_pac/src/power/ramon.rs b/down-the-stack/dk_pac/src/power/ramon.rs new file mode 100644 index 0000000..a8262bc --- /dev/null +++ b/down-the-stack/dk_pac/src/power/ramon.rs @@ -0,0 +1,309 @@ +#[doc = "Register `RAMON` 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 `RAMON` 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 `ONRAM0` reader - Keep RAM block 0 on or off in system ON Mode"] +pub type ONRAM0_R = crate::BitReader; +#[doc = "Keep RAM block 0 on or off in system ON Mode\n\nValue on reset: 1"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum ONRAM0_A { + #[doc = "0: Off"] + RAM0OFF = 0, + #[doc = "1: On"] + RAM0ON = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: ONRAM0_A) -> Self { + variant as u8 != 0 + } +} +impl ONRAM0_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> ONRAM0_A { + match self.bits { + false => ONRAM0_A::RAM0OFF, + true => ONRAM0_A::RAM0ON, + } + } + #[doc = "Checks if the value of the field is `RAM0OFF`"] + #[inline(always)] + pub fn is_ram0off(&self) -> bool { + *self == ONRAM0_A::RAM0OFF + } + #[doc = "Checks if the value of the field is `RAM0ON`"] + #[inline(always)] + pub fn is_ram0on(&self) -> bool { + *self == ONRAM0_A::RAM0ON + } +} +#[doc = "Field `ONRAM0` writer - Keep RAM block 0 on or off in system ON Mode"] +pub type ONRAM0_W<'a, const O: u8> = crate::BitWriter<'a, u32, RAMON_SPEC, ONRAM0_A, O>; +impl<'a, const O: u8> ONRAM0_W<'a, O> { + #[doc = "Off"] + #[inline(always)] + pub fn ram0off(self) -> &'a mut W { + self.variant(ONRAM0_A::RAM0OFF) + } + #[doc = "On"] + #[inline(always)] + pub fn ram0on(self) -> &'a mut W { + self.variant(ONRAM0_A::RAM0ON) + } +} +#[doc = "Field `ONRAM1` reader - Keep RAM block 1 on or off in system ON Mode"] +pub type ONRAM1_R = crate::BitReader; +#[doc = "Keep RAM block 1 on or off in system ON Mode\n\nValue on reset: 1"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum ONRAM1_A { + #[doc = "0: Off"] + RAM1OFF = 0, + #[doc = "1: On"] + RAM1ON = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: ONRAM1_A) -> Self { + variant as u8 != 0 + } +} +impl ONRAM1_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> ONRAM1_A { + match self.bits { + false => ONRAM1_A::RAM1OFF, + true => ONRAM1_A::RAM1ON, + } + } + #[doc = "Checks if the value of the field is `RAM1OFF`"] + #[inline(always)] + pub fn is_ram1off(&self) -> bool { + *self == ONRAM1_A::RAM1OFF + } + #[doc = "Checks if the value of the field is `RAM1ON`"] + #[inline(always)] + pub fn is_ram1on(&self) -> bool { + *self == ONRAM1_A::RAM1ON + } +} +#[doc = "Field `ONRAM1` writer - Keep RAM block 1 on or off in system ON Mode"] +pub type ONRAM1_W<'a, const O: u8> = crate::BitWriter<'a, u32, RAMON_SPEC, ONRAM1_A, O>; +impl<'a, const O: u8> ONRAM1_W<'a, O> { + #[doc = "Off"] + #[inline(always)] + pub fn ram1off(self) -> &'a mut W { + self.variant(ONRAM1_A::RAM1OFF) + } + #[doc = "On"] + #[inline(always)] + pub fn ram1on(self) -> &'a mut W { + self.variant(ONRAM1_A::RAM1ON) + } +} +#[doc = "Field `OFFRAM0` reader - Keep retention on RAM block 0 when RAM block is switched off"] +pub type OFFRAM0_R = crate::BitReader; +#[doc = "Keep retention on RAM block 0 when RAM block is switched off\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum OFFRAM0_A { + #[doc = "0: Off"] + RAM0OFF = 0, + #[doc = "1: On"] + RAM0ON = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: OFFRAM0_A) -> Self { + variant as u8 != 0 + } +} +impl OFFRAM0_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> OFFRAM0_A { + match self.bits { + false => OFFRAM0_A::RAM0OFF, + true => OFFRAM0_A::RAM0ON, + } + } + #[doc = "Checks if the value of the field is `RAM0OFF`"] + #[inline(always)] + pub fn is_ram0off(&self) -> bool { + *self == OFFRAM0_A::RAM0OFF + } + #[doc = "Checks if the value of the field is `RAM0ON`"] + #[inline(always)] + pub fn is_ram0on(&self) -> bool { + *self == OFFRAM0_A::RAM0ON + } +} +#[doc = "Field `OFFRAM0` writer - Keep retention on RAM block 0 when RAM block is switched off"] +pub type OFFRAM0_W<'a, const O: u8> = crate::BitWriter<'a, u32, RAMON_SPEC, OFFRAM0_A, O>; +impl<'a, const O: u8> OFFRAM0_W<'a, O> { + #[doc = "Off"] + #[inline(always)] + pub fn ram0off(self) -> &'a mut W { + self.variant(OFFRAM0_A::RAM0OFF) + } + #[doc = "On"] + #[inline(always)] + pub fn ram0on(self) -> &'a mut W { + self.variant(OFFRAM0_A::RAM0ON) + } +} +#[doc = "Field `OFFRAM1` reader - Keep retention on RAM block 1 when RAM block is switched off"] +pub type OFFRAM1_R = crate::BitReader; +#[doc = "Keep retention on RAM block 1 when RAM block is switched off\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum OFFRAM1_A { + #[doc = "0: Off"] + RAM1OFF = 0, + #[doc = "1: On"] + RAM1ON = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: OFFRAM1_A) -> Self { + variant as u8 != 0 + } +} +impl OFFRAM1_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> OFFRAM1_A { + match self.bits { + false => OFFRAM1_A::RAM1OFF, + true => OFFRAM1_A::RAM1ON, + } + } + #[doc = "Checks if the value of the field is `RAM1OFF`"] + #[inline(always)] + pub fn is_ram1off(&self) -> bool { + *self == OFFRAM1_A::RAM1OFF + } + #[doc = "Checks if the value of the field is `RAM1ON`"] + #[inline(always)] + pub fn is_ram1on(&self) -> bool { + *self == OFFRAM1_A::RAM1ON + } +} +#[doc = "Field `OFFRAM1` writer - Keep retention on RAM block 1 when RAM block is switched off"] +pub type OFFRAM1_W<'a, const O: u8> = crate::BitWriter<'a, u32, RAMON_SPEC, OFFRAM1_A, O>; +impl<'a, const O: u8> OFFRAM1_W<'a, O> { + #[doc = "Off"] + #[inline(always)] + pub fn ram1off(self) -> &'a mut W { + self.variant(OFFRAM1_A::RAM1OFF) + } + #[doc = "On"] + #[inline(always)] + pub fn ram1on(self) -> &'a mut W { + self.variant(OFFRAM1_A::RAM1ON) + } +} +impl R { + #[doc = "Bit 0 - Keep RAM block 0 on or off in system ON Mode"] + #[inline(always)] + pub fn onram0(&self) -> ONRAM0_R { + ONRAM0_R::new((self.bits & 1) != 0) + } + #[doc = "Bit 1 - Keep RAM block 1 on or off in system ON Mode"] + #[inline(always)] + pub fn onram1(&self) -> ONRAM1_R { + ONRAM1_R::new(((self.bits >> 1) & 1) != 0) + } + #[doc = "Bit 16 - Keep retention on RAM block 0 when RAM block is switched off"] + #[inline(always)] + pub fn offram0(&self) -> OFFRAM0_R { + OFFRAM0_R::new(((self.bits >> 16) & 1) != 0) + } + #[doc = "Bit 17 - Keep retention on RAM block 1 when RAM block is switched off"] + #[inline(always)] + pub fn offram1(&self) -> OFFRAM1_R { + OFFRAM1_R::new(((self.bits >> 17) & 1) != 0) + } +} +impl W { + #[doc = "Bit 0 - Keep RAM block 0 on or off in system ON Mode"] + #[inline(always)] + #[must_use] + pub fn onram0(&mut self) -> ONRAM0_W<0> { + ONRAM0_W::new(self) + } + #[doc = "Bit 1 - Keep RAM block 1 on or off in system ON Mode"] + #[inline(always)] + #[must_use] + pub fn onram1(&mut self) -> ONRAM1_W<1> { + ONRAM1_W::new(self) + } + #[doc = "Bit 16 - Keep retention on RAM block 0 when RAM block is switched off"] + #[inline(always)] + #[must_use] + pub fn offram0(&mut self) -> OFFRAM0_W<16> { + OFFRAM0_W::new(self) + } + #[doc = "Bit 17 - Keep retention on RAM block 1 when RAM block is switched off"] + #[inline(always)] + #[must_use] + pub fn offram1(&mut self) -> OFFRAM1_W<17> { + OFFRAM1_W::new(self) + } + #[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 = "Deprecated register - RAM on/off register (this register is retained)\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 [ramon](index.html) module"] +pub struct RAMON_SPEC; +impl crate::RegisterSpec for RAMON_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [ramon::R](R) reader structure"] +impl crate::Readable for RAMON_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [ramon::W](W) writer structure"] +impl crate::Writable for RAMON_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets RAMON to value 0x03"] +impl crate::Resettable for RAMON_SPEC { + const RESET_VALUE: Self::Ux = 0x03; +} diff --git a/down-the-stack/dk_pac/src/power/ramonb.rs b/down-the-stack/dk_pac/src/power/ramonb.rs new file mode 100644 index 0000000..2577003 --- /dev/null +++ b/down-the-stack/dk_pac/src/power/ramonb.rs @@ -0,0 +1,309 @@ +#[doc = "Register `RAMONB` 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 `RAMONB` 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 `ONRAM2` reader - Keep RAM block 2 on or off in system ON Mode"] +pub type ONRAM2_R = crate::BitReader; +#[doc = "Keep RAM block 2 on or off in system ON Mode\n\nValue on reset: 1"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum ONRAM2_A { + #[doc = "0: Off"] + RAM2OFF = 0, + #[doc = "1: On"] + RAM2ON = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: ONRAM2_A) -> Self { + variant as u8 != 0 + } +} +impl ONRAM2_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> ONRAM2_A { + match self.bits { + false => ONRAM2_A::RAM2OFF, + true => ONRAM2_A::RAM2ON, + } + } + #[doc = "Checks if the value of the field is `RAM2OFF`"] + #[inline(always)] + pub fn is_ram2off(&self) -> bool { + *self == ONRAM2_A::RAM2OFF + } + #[doc = "Checks if the value of the field is `RAM2ON`"] + #[inline(always)] + pub fn is_ram2on(&self) -> bool { + *self == ONRAM2_A::RAM2ON + } +} +#[doc = "Field `ONRAM2` writer - Keep RAM block 2 on or off in system ON Mode"] +pub type ONRAM2_W<'a, const O: u8> = crate::BitWriter<'a, u32, RAMONB_SPEC, ONRAM2_A, O>; +impl<'a, const O: u8> ONRAM2_W<'a, O> { + #[doc = "Off"] + #[inline(always)] + pub fn ram2off(self) -> &'a mut W { + self.variant(ONRAM2_A::RAM2OFF) + } + #[doc = "On"] + #[inline(always)] + pub fn ram2on(self) -> &'a mut W { + self.variant(ONRAM2_A::RAM2ON) + } +} +#[doc = "Field `ONRAM3` reader - Keep RAM block 3 on or off in system ON Mode"] +pub type ONRAM3_R = crate::BitReader; +#[doc = "Keep RAM block 3 on or off in system ON Mode\n\nValue on reset: 1"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum ONRAM3_A { + #[doc = "0: Off"] + RAM3OFF = 0, + #[doc = "1: On"] + RAM3ON = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: ONRAM3_A) -> Self { + variant as u8 != 0 + } +} +impl ONRAM3_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> ONRAM3_A { + match self.bits { + false => ONRAM3_A::RAM3OFF, + true => ONRAM3_A::RAM3ON, + } + } + #[doc = "Checks if the value of the field is `RAM3OFF`"] + #[inline(always)] + pub fn is_ram3off(&self) -> bool { + *self == ONRAM3_A::RAM3OFF + } + #[doc = "Checks if the value of the field is `RAM3ON`"] + #[inline(always)] + pub fn is_ram3on(&self) -> bool { + *self == ONRAM3_A::RAM3ON + } +} +#[doc = "Field `ONRAM3` writer - Keep RAM block 3 on or off in system ON Mode"] +pub type ONRAM3_W<'a, const O: u8> = crate::BitWriter<'a, u32, RAMONB_SPEC, ONRAM3_A, O>; +impl<'a, const O: u8> ONRAM3_W<'a, O> { + #[doc = "Off"] + #[inline(always)] + pub fn ram3off(self) -> &'a mut W { + self.variant(ONRAM3_A::RAM3OFF) + } + #[doc = "On"] + #[inline(always)] + pub fn ram3on(self) -> &'a mut W { + self.variant(ONRAM3_A::RAM3ON) + } +} +#[doc = "Field `OFFRAM2` reader - Keep retention on RAM block 2 when RAM block is switched off"] +pub type OFFRAM2_R = crate::BitReader; +#[doc = "Keep retention on RAM block 2 when RAM block is switched off\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum OFFRAM2_A { + #[doc = "0: Off"] + RAM2OFF = 0, + #[doc = "1: On"] + RAM2ON = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: OFFRAM2_A) -> Self { + variant as u8 != 0 + } +} +impl OFFRAM2_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> OFFRAM2_A { + match self.bits { + false => OFFRAM2_A::RAM2OFF, + true => OFFRAM2_A::RAM2ON, + } + } + #[doc = "Checks if the value of the field is `RAM2OFF`"] + #[inline(always)] + pub fn is_ram2off(&self) -> bool { + *self == OFFRAM2_A::RAM2OFF + } + #[doc = "Checks if the value of the field is `RAM2ON`"] + #[inline(always)] + pub fn is_ram2on(&self) -> bool { + *self == OFFRAM2_A::RAM2ON + } +} +#[doc = "Field `OFFRAM2` writer - Keep retention on RAM block 2 when RAM block is switched off"] +pub type OFFRAM2_W<'a, const O: u8> = crate::BitWriter<'a, u32, RAMONB_SPEC, OFFRAM2_A, O>; +impl<'a, const O: u8> OFFRAM2_W<'a, O> { + #[doc = "Off"] + #[inline(always)] + pub fn ram2off(self) -> &'a mut W { + self.variant(OFFRAM2_A::RAM2OFF) + } + #[doc = "On"] + #[inline(always)] + pub fn ram2on(self) -> &'a mut W { + self.variant(OFFRAM2_A::RAM2ON) + } +} +#[doc = "Field `OFFRAM3` reader - Keep retention on RAM block 3 when RAM block is switched off"] +pub type OFFRAM3_R = crate::BitReader; +#[doc = "Keep retention on RAM block 3 when RAM block is switched off\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum OFFRAM3_A { + #[doc = "0: Off"] + RAM3OFF = 0, + #[doc = "1: On"] + RAM3ON = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: OFFRAM3_A) -> Self { + variant as u8 != 0 + } +} +impl OFFRAM3_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> OFFRAM3_A { + match self.bits { + false => OFFRAM3_A::RAM3OFF, + true => OFFRAM3_A::RAM3ON, + } + } + #[doc = "Checks if the value of the field is `RAM3OFF`"] + #[inline(always)] + pub fn is_ram3off(&self) -> bool { + *self == OFFRAM3_A::RAM3OFF + } + #[doc = "Checks if the value of the field is `RAM3ON`"] + #[inline(always)] + pub fn is_ram3on(&self) -> bool { + *self == OFFRAM3_A::RAM3ON + } +} +#[doc = "Field `OFFRAM3` writer - Keep retention on RAM block 3 when RAM block is switched off"] +pub type OFFRAM3_W<'a, const O: u8> = crate::BitWriter<'a, u32, RAMONB_SPEC, OFFRAM3_A, O>; +impl<'a, const O: u8> OFFRAM3_W<'a, O> { + #[doc = "Off"] + #[inline(always)] + pub fn ram3off(self) -> &'a mut W { + self.variant(OFFRAM3_A::RAM3OFF) + } + #[doc = "On"] + #[inline(always)] + pub fn ram3on(self) -> &'a mut W { + self.variant(OFFRAM3_A::RAM3ON) + } +} +impl R { + #[doc = "Bit 0 - Keep RAM block 2 on or off in system ON Mode"] + #[inline(always)] + pub fn onram2(&self) -> ONRAM2_R { + ONRAM2_R::new((self.bits & 1) != 0) + } + #[doc = "Bit 1 - Keep RAM block 3 on or off in system ON Mode"] + #[inline(always)] + pub fn onram3(&self) -> ONRAM3_R { + ONRAM3_R::new(((self.bits >> 1) & 1) != 0) + } + #[doc = "Bit 16 - Keep retention on RAM block 2 when RAM block is switched off"] + #[inline(always)] + pub fn offram2(&self) -> OFFRAM2_R { + OFFRAM2_R::new(((self.bits >> 16) & 1) != 0) + } + #[doc = "Bit 17 - Keep retention on RAM block 3 when RAM block is switched off"] + #[inline(always)] + pub fn offram3(&self) -> OFFRAM3_R { + OFFRAM3_R::new(((self.bits >> 17) & 1) != 0) + } +} +impl W { + #[doc = "Bit 0 - Keep RAM block 2 on or off in system ON Mode"] + #[inline(always)] + #[must_use] + pub fn onram2(&mut self) -> ONRAM2_W<0> { + ONRAM2_W::new(self) + } + #[doc = "Bit 1 - Keep RAM block 3 on or off in system ON Mode"] + #[inline(always)] + #[must_use] + pub fn onram3(&mut self) -> ONRAM3_W<1> { + ONRAM3_W::new(self) + } + #[doc = "Bit 16 - Keep retention on RAM block 2 when RAM block is switched off"] + #[inline(always)] + #[must_use] + pub fn offram2(&mut self) -> OFFRAM2_W<16> { + OFFRAM2_W::new(self) + } + #[doc = "Bit 17 - Keep retention on RAM block 3 when RAM block is switched off"] + #[inline(always)] + #[must_use] + pub fn offram3(&mut self) -> OFFRAM3_W<17> { + OFFRAM3_W::new(self) + } + #[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 = "Deprecated register - RAM on/off register (this register is retained)\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 [ramonb](index.html) module"] +pub struct RAMONB_SPEC; +impl crate::RegisterSpec for RAMONB_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [ramonb::R](R) reader structure"] +impl crate::Readable for RAMONB_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [ramonb::W](W) writer structure"] +impl crate::Writable for RAMONB_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets RAMONB to value 0x03"] +impl crate::Resettable for RAMONB_SPEC { + const RESET_VALUE: Self::Ux = 0x03; +} diff --git a/down-the-stack/dk_pac/src/power/ramstatus.rs b/down-the-stack/dk_pac/src/power/ramstatus.rs new file mode 100644 index 0000000..ea360fd --- /dev/null +++ b/down-the-stack/dk_pac/src/power/ramstatus.rs @@ -0,0 +1,194 @@ +#[doc = "Register `RAMSTATUS` 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 = "Field `RAMBLOCK0` reader - RAM block 0 is on or off/powering up"] +pub type RAMBLOCK0_R = crate::BitReader; +#[doc = "RAM block 0 is on or off/powering up\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum RAMBLOCK0_A { + #[doc = "0: Off"] + OFF = 0, + #[doc = "1: On"] + ON = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: RAMBLOCK0_A) -> Self { + variant as u8 != 0 + } +} +impl RAMBLOCK0_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> RAMBLOCK0_A { + match self.bits { + false => RAMBLOCK0_A::OFF, + true => RAMBLOCK0_A::ON, + } + } + #[doc = "Checks if the value of the field is `OFF`"] + #[inline(always)] + pub fn is_off(&self) -> bool { + *self == RAMBLOCK0_A::OFF + } + #[doc = "Checks if the value of the field is `ON`"] + #[inline(always)] + pub fn is_on(&self) -> bool { + *self == RAMBLOCK0_A::ON + } +} +#[doc = "Field `RAMBLOCK1` reader - RAM block 1 is on or off/powering up"] +pub type RAMBLOCK1_R = crate::BitReader; +#[doc = "RAM block 1 is on or off/powering up\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum RAMBLOCK1_A { + #[doc = "0: Off"] + OFF = 0, + #[doc = "1: On"] + ON = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: RAMBLOCK1_A) -> Self { + variant as u8 != 0 + } +} +impl RAMBLOCK1_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> RAMBLOCK1_A { + match self.bits { + false => RAMBLOCK1_A::OFF, + true => RAMBLOCK1_A::ON, + } + } + #[doc = "Checks if the value of the field is `OFF`"] + #[inline(always)] + pub fn is_off(&self) -> bool { + *self == RAMBLOCK1_A::OFF + } + #[doc = "Checks if the value of the field is `ON`"] + #[inline(always)] + pub fn is_on(&self) -> bool { + *self == RAMBLOCK1_A::ON + } +} +#[doc = "Field `RAMBLOCK2` reader - RAM block 2 is on or off/powering up"] +pub type RAMBLOCK2_R = crate::BitReader; +#[doc = "RAM block 2 is on or off/powering up\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum RAMBLOCK2_A { + #[doc = "0: Off"] + OFF = 0, + #[doc = "1: On"] + ON = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: RAMBLOCK2_A) -> Self { + variant as u8 != 0 + } +} +impl RAMBLOCK2_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> RAMBLOCK2_A { + match self.bits { + false => RAMBLOCK2_A::OFF, + true => RAMBLOCK2_A::ON, + } + } + #[doc = "Checks if the value of the field is `OFF`"] + #[inline(always)] + pub fn is_off(&self) -> bool { + *self == RAMBLOCK2_A::OFF + } + #[doc = "Checks if the value of the field is `ON`"] + #[inline(always)] + pub fn is_on(&self) -> bool { + *self == RAMBLOCK2_A::ON + } +} +#[doc = "Field `RAMBLOCK3` reader - RAM block 3 is on or off/powering up"] +pub type RAMBLOCK3_R = crate::BitReader; +#[doc = "RAM block 3 is on or off/powering up\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum RAMBLOCK3_A { + #[doc = "0: Off"] + OFF = 0, + #[doc = "1: On"] + ON = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: RAMBLOCK3_A) -> Self { + variant as u8 != 0 + } +} +impl RAMBLOCK3_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> RAMBLOCK3_A { + match self.bits { + false => RAMBLOCK3_A::OFF, + true => RAMBLOCK3_A::ON, + } + } + #[doc = "Checks if the value of the field is `OFF`"] + #[inline(always)] + pub fn is_off(&self) -> bool { + *self == RAMBLOCK3_A::OFF + } + #[doc = "Checks if the value of the field is `ON`"] + #[inline(always)] + pub fn is_on(&self) -> bool { + *self == RAMBLOCK3_A::ON + } +} +impl R { + #[doc = "Bit 0 - RAM block 0 is on or off/powering up"] + #[inline(always)] + pub fn ramblock0(&self) -> RAMBLOCK0_R { + RAMBLOCK0_R::new((self.bits & 1) != 0) + } + #[doc = "Bit 1 - RAM block 1 is on or off/powering up"] + #[inline(always)] + pub fn ramblock1(&self) -> RAMBLOCK1_R { + RAMBLOCK1_R::new(((self.bits >> 1) & 1) != 0) + } + #[doc = "Bit 2 - RAM block 2 is on or off/powering up"] + #[inline(always)] + pub fn ramblock2(&self) -> RAMBLOCK2_R { + RAMBLOCK2_R::new(((self.bits >> 2) & 1) != 0) + } + #[doc = "Bit 3 - RAM block 3 is on or off/powering up"] + #[inline(always)] + pub fn ramblock3(&self) -> RAMBLOCK3_R { + RAMBLOCK3_R::new(((self.bits >> 3) & 1) != 0) + } +} +#[doc = "Deprecated register - RAM status register\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 [ramstatus](index.html) module"] +pub struct RAMSTATUS_SPEC; +impl crate::RegisterSpec for RAMSTATUS_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [ramstatus::R](R) reader structure"] +impl crate::Readable for RAMSTATUS_SPEC { + type Reader = R; +} +#[doc = "`reset()` method sets RAMSTATUS to value 0"] +impl crate::Resettable for RAMSTATUS_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/power/resetreas.rs b/down-the-stack/dk_pac/src/power/resetreas.rs new file mode 100644 index 0000000..e8bd328 --- /dev/null +++ b/down-the-stack/dk_pac/src/power/resetreas.rs @@ -0,0 +1,553 @@ +#[doc = "Register `RESETREAS` 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 `RESETREAS` 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 `RESETPIN` reader - Reset from pin-reset detected"] +pub type RESETPIN_R = crate::BitReader; +#[doc = "Reset from pin-reset detected\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum RESETPIN_A { + #[doc = "0: Not detected"] + NOT_DETECTED = 0, + #[doc = "1: Detected"] + DETECTED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: RESETPIN_A) -> Self { + variant as u8 != 0 + } +} +impl RESETPIN_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> RESETPIN_A { + match self.bits { + false => RESETPIN_A::NOT_DETECTED, + true => RESETPIN_A::DETECTED, + } + } + #[doc = "Checks if the value of the field is `NOT_DETECTED`"] + #[inline(always)] + pub fn is_not_detected(&self) -> bool { + *self == RESETPIN_A::NOT_DETECTED + } + #[doc = "Checks if the value of the field is `DETECTED`"] + #[inline(always)] + pub fn is_detected(&self) -> bool { + *self == RESETPIN_A::DETECTED + } +} +#[doc = "Field `RESETPIN` writer - Reset from pin-reset detected"] +pub type RESETPIN_W<'a, const O: u8> = crate::BitWriter<'a, u32, RESETREAS_SPEC, RESETPIN_A, O>; +impl<'a, const O: u8> RESETPIN_W<'a, O> { + #[doc = "Not detected"] + #[inline(always)] + pub fn not_detected(self) -> &'a mut W { + self.variant(RESETPIN_A::NOT_DETECTED) + } + #[doc = "Detected"] + #[inline(always)] + pub fn detected(self) -> &'a mut W { + self.variant(RESETPIN_A::DETECTED) + } +} +#[doc = "Field `DOG` reader - Reset from watchdog detected"] +pub type DOG_R = crate::BitReader; +#[doc = "Reset from watchdog detected\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum DOG_A { + #[doc = "0: Not detected"] + NOT_DETECTED = 0, + #[doc = "1: Detected"] + DETECTED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: DOG_A) -> Self { + variant as u8 != 0 + } +} +impl DOG_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> DOG_A { + match self.bits { + false => DOG_A::NOT_DETECTED, + true => DOG_A::DETECTED, + } + } + #[doc = "Checks if the value of the field is `NOT_DETECTED`"] + #[inline(always)] + pub fn is_not_detected(&self) -> bool { + *self == DOG_A::NOT_DETECTED + } + #[doc = "Checks if the value of the field is `DETECTED`"] + #[inline(always)] + pub fn is_detected(&self) -> bool { + *self == DOG_A::DETECTED + } +} +#[doc = "Field `DOG` writer - Reset from watchdog detected"] +pub type DOG_W<'a, const O: u8> = crate::BitWriter<'a, u32, RESETREAS_SPEC, DOG_A, O>; +impl<'a, const O: u8> DOG_W<'a, O> { + #[doc = "Not detected"] + #[inline(always)] + pub fn not_detected(self) -> &'a mut W { + self.variant(DOG_A::NOT_DETECTED) + } + #[doc = "Detected"] + #[inline(always)] + pub fn detected(self) -> &'a mut W { + self.variant(DOG_A::DETECTED) + } +} +#[doc = "Field `SREQ` reader - Reset from soft reset detected"] +pub type SREQ_R = crate::BitReader; +#[doc = "Reset from soft reset detected\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum SREQ_A { + #[doc = "0: Not detected"] + NOT_DETECTED = 0, + #[doc = "1: Detected"] + DETECTED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: SREQ_A) -> Self { + variant as u8 != 0 + } +} +impl SREQ_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> SREQ_A { + match self.bits { + false => SREQ_A::NOT_DETECTED, + true => SREQ_A::DETECTED, + } + } + #[doc = "Checks if the value of the field is `NOT_DETECTED`"] + #[inline(always)] + pub fn is_not_detected(&self) -> bool { + *self == SREQ_A::NOT_DETECTED + } + #[doc = "Checks if the value of the field is `DETECTED`"] + #[inline(always)] + pub fn is_detected(&self) -> bool { + *self == SREQ_A::DETECTED + } +} +#[doc = "Field `SREQ` writer - Reset from soft reset detected"] +pub type SREQ_W<'a, const O: u8> = crate::BitWriter<'a, u32, RESETREAS_SPEC, SREQ_A, O>; +impl<'a, const O: u8> SREQ_W<'a, O> { + #[doc = "Not detected"] + #[inline(always)] + pub fn not_detected(self) -> &'a mut W { + self.variant(SREQ_A::NOT_DETECTED) + } + #[doc = "Detected"] + #[inline(always)] + pub fn detected(self) -> &'a mut W { + self.variant(SREQ_A::DETECTED) + } +} +#[doc = "Field `LOCKUP` reader - Reset from CPU lock-up detected"] +pub type LOCKUP_R = crate::BitReader; +#[doc = "Reset from CPU lock-up detected\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum LOCKUP_A { + #[doc = "0: Not detected"] + NOT_DETECTED = 0, + #[doc = "1: Detected"] + DETECTED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: LOCKUP_A) -> Self { + variant as u8 != 0 + } +} +impl LOCKUP_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> LOCKUP_A { + match self.bits { + false => LOCKUP_A::NOT_DETECTED, + true => LOCKUP_A::DETECTED, + } + } + #[doc = "Checks if the value of the field is `NOT_DETECTED`"] + #[inline(always)] + pub fn is_not_detected(&self) -> bool { + *self == LOCKUP_A::NOT_DETECTED + } + #[doc = "Checks if the value of the field is `DETECTED`"] + #[inline(always)] + pub fn is_detected(&self) -> bool { + *self == LOCKUP_A::DETECTED + } +} +#[doc = "Field `LOCKUP` writer - Reset from CPU lock-up detected"] +pub type LOCKUP_W<'a, const O: u8> = crate::BitWriter<'a, u32, RESETREAS_SPEC, LOCKUP_A, O>; +impl<'a, const O: u8> LOCKUP_W<'a, O> { + #[doc = "Not detected"] + #[inline(always)] + pub fn not_detected(self) -> &'a mut W { + self.variant(LOCKUP_A::NOT_DETECTED) + } + #[doc = "Detected"] + #[inline(always)] + pub fn detected(self) -> &'a mut W { + self.variant(LOCKUP_A::DETECTED) + } +} +#[doc = "Field `OFF` reader - Reset due to wake up from System OFF mode when wakeup is triggered from DETECT signal from GPIO"] +pub type OFF_R = crate::BitReader; +#[doc = "Reset due to wake up from System OFF mode when wakeup is triggered from DETECT signal from GPIO\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum OFF_A { + #[doc = "0: Not detected"] + NOT_DETECTED = 0, + #[doc = "1: Detected"] + DETECTED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: OFF_A) -> Self { + variant as u8 != 0 + } +} +impl OFF_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> OFF_A { + match self.bits { + false => OFF_A::NOT_DETECTED, + true => OFF_A::DETECTED, + } + } + #[doc = "Checks if the value of the field is `NOT_DETECTED`"] + #[inline(always)] + pub fn is_not_detected(&self) -> bool { + *self == OFF_A::NOT_DETECTED + } + #[doc = "Checks if the value of the field is `DETECTED`"] + #[inline(always)] + pub fn is_detected(&self) -> bool { + *self == OFF_A::DETECTED + } +} +#[doc = "Field `OFF` writer - Reset due to wake up from System OFF mode when wakeup is triggered from DETECT signal from GPIO"] +pub type OFF_W<'a, const O: u8> = crate::BitWriter<'a, u32, RESETREAS_SPEC, OFF_A, O>; +impl<'a, const O: u8> OFF_W<'a, O> { + #[doc = "Not detected"] + #[inline(always)] + pub fn not_detected(self) -> &'a mut W { + self.variant(OFF_A::NOT_DETECTED) + } + #[doc = "Detected"] + #[inline(always)] + pub fn detected(self) -> &'a mut W { + self.variant(OFF_A::DETECTED) + } +} +#[doc = "Field `LPCOMP` reader - Reset due to wake up from System OFF mode when wakeup is triggered from ANADETECT signal from LPCOMP"] +pub type LPCOMP_R = crate::BitReader; +#[doc = "Reset due to wake up from System OFF mode when wakeup is triggered from ANADETECT signal from LPCOMP\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum LPCOMP_A { + #[doc = "0: Not detected"] + NOT_DETECTED = 0, + #[doc = "1: Detected"] + DETECTED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: LPCOMP_A) -> Self { + variant as u8 != 0 + } +} +impl LPCOMP_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> LPCOMP_A { + match self.bits { + false => LPCOMP_A::NOT_DETECTED, + true => LPCOMP_A::DETECTED, + } + } + #[doc = "Checks if the value of the field is `NOT_DETECTED`"] + #[inline(always)] + pub fn is_not_detected(&self) -> bool { + *self == LPCOMP_A::NOT_DETECTED + } + #[doc = "Checks if the value of the field is `DETECTED`"] + #[inline(always)] + pub fn is_detected(&self) -> bool { + *self == LPCOMP_A::DETECTED + } +} +#[doc = "Field `LPCOMP` writer - Reset due to wake up from System OFF mode when wakeup is triggered from ANADETECT signal from LPCOMP"] +pub type LPCOMP_W<'a, const O: u8> = crate::BitWriter<'a, u32, RESETREAS_SPEC, LPCOMP_A, O>; +impl<'a, const O: u8> LPCOMP_W<'a, O> { + #[doc = "Not detected"] + #[inline(always)] + pub fn not_detected(self) -> &'a mut W { + self.variant(LPCOMP_A::NOT_DETECTED) + } + #[doc = "Detected"] + #[inline(always)] + pub fn detected(self) -> &'a mut W { + self.variant(LPCOMP_A::DETECTED) + } +} +#[doc = "Field `DIF` reader - Reset due to wake up from System OFF mode when wakeup is triggered from entering into debug interface mode"] +pub type DIF_R = crate::BitReader; +#[doc = "Reset due to wake up from System OFF mode when wakeup is triggered from entering into debug interface mode\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum DIF_A { + #[doc = "0: Not detected"] + NOT_DETECTED = 0, + #[doc = "1: Detected"] + DETECTED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: DIF_A) -> Self { + variant as u8 != 0 + } +} +impl DIF_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> DIF_A { + match self.bits { + false => DIF_A::NOT_DETECTED, + true => DIF_A::DETECTED, + } + } + #[doc = "Checks if the value of the field is `NOT_DETECTED`"] + #[inline(always)] + pub fn is_not_detected(&self) -> bool { + *self == DIF_A::NOT_DETECTED + } + #[doc = "Checks if the value of the field is `DETECTED`"] + #[inline(always)] + pub fn is_detected(&self) -> bool { + *self == DIF_A::DETECTED + } +} +#[doc = "Field `DIF` writer - Reset due to wake up from System OFF mode when wakeup is triggered from entering into debug interface mode"] +pub type DIF_W<'a, const O: u8> = crate::BitWriter<'a, u32, RESETREAS_SPEC, DIF_A, O>; +impl<'a, const O: u8> DIF_W<'a, O> { + #[doc = "Not detected"] + #[inline(always)] + pub fn not_detected(self) -> &'a mut W { + self.variant(DIF_A::NOT_DETECTED) + } + #[doc = "Detected"] + #[inline(always)] + pub fn detected(self) -> &'a mut W { + self.variant(DIF_A::DETECTED) + } +} +#[doc = "Field `NFC` reader - Reset due to wake up from System OFF mode by NFC field detect"] +pub type NFC_R = crate::BitReader; +#[doc = "Reset due to wake up from System OFF mode by NFC field detect\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum NFC_A { + #[doc = "0: Not detected"] + NOT_DETECTED = 0, + #[doc = "1: Detected"] + DETECTED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: NFC_A) -> Self { + variant as u8 != 0 + } +} +impl NFC_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> NFC_A { + match self.bits { + false => NFC_A::NOT_DETECTED, + true => NFC_A::DETECTED, + } + } + #[doc = "Checks if the value of the field is `NOT_DETECTED`"] + #[inline(always)] + pub fn is_not_detected(&self) -> bool { + *self == NFC_A::NOT_DETECTED + } + #[doc = "Checks if the value of the field is `DETECTED`"] + #[inline(always)] + pub fn is_detected(&self) -> bool { + *self == NFC_A::DETECTED + } +} +#[doc = "Field `NFC` writer - Reset due to wake up from System OFF mode by NFC field detect"] +pub type NFC_W<'a, const O: u8> = crate::BitWriter<'a, u32, RESETREAS_SPEC, NFC_A, O>; +impl<'a, const O: u8> NFC_W<'a, O> { + #[doc = "Not detected"] + #[inline(always)] + pub fn not_detected(self) -> &'a mut W { + self.variant(NFC_A::NOT_DETECTED) + } + #[doc = "Detected"] + #[inline(always)] + pub fn detected(self) -> &'a mut W { + self.variant(NFC_A::DETECTED) + } +} +impl R { + #[doc = "Bit 0 - Reset from pin-reset detected"] + #[inline(always)] + pub fn resetpin(&self) -> RESETPIN_R { + RESETPIN_R::new((self.bits & 1) != 0) + } + #[doc = "Bit 1 - Reset from watchdog detected"] + #[inline(always)] + pub fn dog(&self) -> DOG_R { + DOG_R::new(((self.bits >> 1) & 1) != 0) + } + #[doc = "Bit 2 - Reset from soft reset detected"] + #[inline(always)] + pub fn sreq(&self) -> SREQ_R { + SREQ_R::new(((self.bits >> 2) & 1) != 0) + } + #[doc = "Bit 3 - Reset from CPU lock-up detected"] + #[inline(always)] + pub fn lockup(&self) -> LOCKUP_R { + LOCKUP_R::new(((self.bits >> 3) & 1) != 0) + } + #[doc = "Bit 16 - Reset due to wake up from System OFF mode when wakeup is triggered from DETECT signal from GPIO"] + #[inline(always)] + pub fn off(&self) -> OFF_R { + OFF_R::new(((self.bits >> 16) & 1) != 0) + } + #[doc = "Bit 17 - Reset due to wake up from System OFF mode when wakeup is triggered from ANADETECT signal from LPCOMP"] + #[inline(always)] + pub fn lpcomp(&self) -> LPCOMP_R { + LPCOMP_R::new(((self.bits >> 17) & 1) != 0) + } + #[doc = "Bit 18 - Reset due to wake up from System OFF mode when wakeup is triggered from entering into debug interface mode"] + #[inline(always)] + pub fn dif(&self) -> DIF_R { + DIF_R::new(((self.bits >> 18) & 1) != 0) + } + #[doc = "Bit 19 - Reset due to wake up from System OFF mode by NFC field detect"] + #[inline(always)] + pub fn nfc(&self) -> NFC_R { + NFC_R::new(((self.bits >> 19) & 1) != 0) + } +} +impl W { + #[doc = "Bit 0 - Reset from pin-reset detected"] + #[inline(always)] + #[must_use] + pub fn resetpin(&mut self) -> RESETPIN_W<0> { + RESETPIN_W::new(self) + } + #[doc = "Bit 1 - Reset from watchdog detected"] + #[inline(always)] + #[must_use] + pub fn dog(&mut self) -> DOG_W<1> { + DOG_W::new(self) + } + #[doc = "Bit 2 - Reset from soft reset detected"] + #[inline(always)] + #[must_use] + pub fn sreq(&mut self) -> SREQ_W<2> { + SREQ_W::new(self) + } + #[doc = "Bit 3 - Reset from CPU lock-up detected"] + #[inline(always)] + #[must_use] + pub fn lockup(&mut self) -> LOCKUP_W<3> { + LOCKUP_W::new(self) + } + #[doc = "Bit 16 - Reset due to wake up from System OFF mode when wakeup is triggered from DETECT signal from GPIO"] + #[inline(always)] + #[must_use] + pub fn off(&mut self) -> OFF_W<16> { + OFF_W::new(self) + } + #[doc = "Bit 17 - Reset due to wake up from System OFF mode when wakeup is triggered from ANADETECT signal from LPCOMP"] + #[inline(always)] + #[must_use] + pub fn lpcomp(&mut self) -> LPCOMP_W<17> { + LPCOMP_W::new(self) + } + #[doc = "Bit 18 - Reset due to wake up from System OFF mode when wakeup is triggered from entering into debug interface mode"] + #[inline(always)] + #[must_use] + pub fn dif(&mut self) -> DIF_W<18> { + DIF_W::new(self) + } + #[doc = "Bit 19 - Reset due to wake up from System OFF mode by NFC field detect"] + #[inline(always)] + #[must_use] + pub fn nfc(&mut self) -> NFC_W<19> { + NFC_W::new(self) + } + #[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 = "Reset reason\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 [resetreas](index.html) module"] +pub struct RESETREAS_SPEC; +impl crate::RegisterSpec for RESETREAS_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [resetreas::R](R) reader structure"] +impl crate::Readable for RESETREAS_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [resetreas::W](W) writer structure"] +impl crate::Writable for RESETREAS_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets RESETREAS to value 0"] +impl crate::Resettable for RESETREAS_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/power/systemoff.rs b/down-the-stack/dk_pac/src/power/systemoff.rs new file mode 100644 index 0000000..fd324aa --- /dev/null +++ b/down-the-stack/dk_pac/src/power/systemoff.rs @@ -0,0 +1,71 @@ +#[doc = "Register `SYSTEMOFF` 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 = "Enable System OFF mode\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum SYSTEMOFF_AW { + #[doc = "1: Enable System OFF mode"] + ENTER = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: SYSTEMOFF_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `SYSTEMOFF` writer - Enable System OFF mode"] +pub type SYSTEMOFF_W<'a, const O: u8> = crate::BitWriter<'a, u32, SYSTEMOFF_SPEC, SYSTEMOFF_AW, O>; +impl<'a, const O: u8> SYSTEMOFF_W<'a, O> { + #[doc = "Enable System OFF mode"] + #[inline(always)] + pub fn enter(self) -> &'a mut W { + self.variant(SYSTEMOFF_AW::ENTER) + } +} +impl W { + #[doc = "Bit 0 - Enable System OFF mode"] + #[inline(always)] + #[must_use] + pub fn systemoff(&mut self) -> SYSTEMOFF_W<0> { + SYSTEMOFF_W::new(self) + } + #[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 = "System OFF register\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 [systemoff](index.html) module"] +pub struct SYSTEMOFF_SPEC; +impl crate::RegisterSpec for SYSTEMOFF_SPEC { + type Ux = u32; +} +#[doc = "`write(|w| ..)` method takes [systemoff::W](W) writer structure"] +impl crate::Writable for SYSTEMOFF_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets SYSTEMOFF to value 0"] +impl crate::Resettable for SYSTEMOFF_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/power/tasks_constlat.rs b/down-the-stack/dk_pac/src/power/tasks_constlat.rs new file mode 100644 index 0000000..d08bf92 --- /dev/null +++ b/down-the-stack/dk_pac/src/power/tasks_constlat.rs @@ -0,0 +1,72 @@ +#[doc = "Register `TASKS_CONSTLAT` 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 = "Enable constant latency mode\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum TASKS_CONSTLAT_AW { + #[doc = "1: Trigger task"] + TRIGGER = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: TASKS_CONSTLAT_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `TASKS_CONSTLAT` writer - Enable constant latency mode"] +pub type TASKS_CONSTLAT_W<'a, const O: u8> = + crate::BitWriter<'a, u32, TASKS_CONSTLAT_SPEC, TASKS_CONSTLAT_AW, O>; +impl<'a, const O: u8> TASKS_CONSTLAT_W<'a, O> { + #[doc = "Trigger task"] + #[inline(always)] + pub fn trigger(self) -> &'a mut W { + self.variant(TASKS_CONSTLAT_AW::TRIGGER) + } +} +impl W { + #[doc = "Bit 0 - Enable constant latency mode"] + #[inline(always)] + #[must_use] + pub fn tasks_constlat(&mut self) -> TASKS_CONSTLAT_W<0> { + TASKS_CONSTLAT_W::new(self) + } + #[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 = "Enable constant latency mode\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 [tasks_constlat](index.html) module"] +pub struct TASKS_CONSTLAT_SPEC; +impl crate::RegisterSpec for TASKS_CONSTLAT_SPEC { + type Ux = u32; +} +#[doc = "`write(|w| ..)` method takes [tasks_constlat::W](W) writer structure"] +impl crate::Writable for TASKS_CONSTLAT_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets TASKS_CONSTLAT to value 0"] +impl crate::Resettable for TASKS_CONSTLAT_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/power/tasks_lowpwr.rs b/down-the-stack/dk_pac/src/power/tasks_lowpwr.rs new file mode 100644 index 0000000..7bab379 --- /dev/null +++ b/down-the-stack/dk_pac/src/power/tasks_lowpwr.rs @@ -0,0 +1,72 @@ +#[doc = "Register `TASKS_LOWPWR` 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 = "Enable low power mode (variable latency)\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum TASKS_LOWPWR_AW { + #[doc = "1: Trigger task"] + TRIGGER = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: TASKS_LOWPWR_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `TASKS_LOWPWR` writer - Enable low power mode (variable latency)"] +pub type TASKS_LOWPWR_W<'a, const O: u8> = + crate::BitWriter<'a, u32, TASKS_LOWPWR_SPEC, TASKS_LOWPWR_AW, O>; +impl<'a, const O: u8> TASKS_LOWPWR_W<'a, O> { + #[doc = "Trigger task"] + #[inline(always)] + pub fn trigger(self) -> &'a mut W { + self.variant(TASKS_LOWPWR_AW::TRIGGER) + } +} +impl W { + #[doc = "Bit 0 - Enable low power mode (variable latency)"] + #[inline(always)] + #[must_use] + pub fn tasks_lowpwr(&mut self) -> TASKS_LOWPWR_W<0> { + TASKS_LOWPWR_W::new(self) + } + #[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 = "Enable low power mode (variable latency)\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 [tasks_lowpwr](index.html) module"] +pub struct TASKS_LOWPWR_SPEC; +impl crate::RegisterSpec for TASKS_LOWPWR_SPEC { + type Ux = u32; +} +#[doc = "`write(|w| ..)` method takes [tasks_lowpwr::W](W) writer structure"] +impl crate::Writable for TASKS_LOWPWR_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets TASKS_LOWPWR to value 0"] +impl crate::Resettable for TASKS_LOWPWR_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/ppi.rs b/down-the-stack/dk_pac/src/ppi.rs new file mode 100644 index 0000000..ca3c6d0 --- /dev/null +++ b/down-the-stack/dk_pac/src/ppi.rs @@ -0,0 +1,53 @@ +#[doc = r"Register block"] +#[repr(C)] +pub struct RegisterBlock { + #[doc = "0x00..0x30 - Channel group tasks"] + pub tasks_chg: [TASKS_CHG; 6], + _reserved1: [u8; 0x04d0], + #[doc = "0x500 - Channel enable register"] + pub chen: CHEN, + #[doc = "0x504 - Channel enable set register"] + pub chenset: CHENSET, + #[doc = "0x508 - Channel enable clear register"] + pub chenclr: CHENCLR, + _reserved4: [u8; 0x04], + #[doc = "0x510..0x5b0 - PPI Channel"] + pub ch: [CH; 20], + _reserved5: [u8; 0x0250], + #[doc = "0x800..0x818 - Description collection: Channel group n"] + pub chg: [CHG; 6], + _reserved6: [u8; 0xf8], + #[doc = "0x910..0x990 - Fork"] + pub fork: [FORK; 32], +} +#[doc = "Channel group tasks"] +pub use self::tasks_chg::TASKS_CHG; +#[doc = r"Cluster"] +#[doc = "Channel group tasks"] +pub mod tasks_chg; +#[doc = "CHEN (rw) register accessor: an alias for `Reg`"] +pub type CHEN = crate::Reg; +#[doc = "Channel enable register"] +pub mod chen; +#[doc = "CHENSET (rw) register accessor: an alias for `Reg`"] +pub type CHENSET = crate::Reg; +#[doc = "Channel enable set register"] +pub mod chenset; +#[doc = "CHENCLR (rw) register accessor: an alias for `Reg`"] +pub type CHENCLR = crate::Reg; +#[doc = "Channel enable clear register"] +pub mod chenclr; +#[doc = "PPI Channel"] +pub use self::ch::CH; +#[doc = r"Cluster"] +#[doc = "PPI Channel"] +pub mod ch; +#[doc = "CHG (rw) register accessor: an alias for `Reg`"] +pub type CHG = crate::Reg; +#[doc = "Description collection: Channel group n"] +pub mod chg; +#[doc = "Fork"] +pub use self::fork::FORK; +#[doc = r"Cluster"] +#[doc = "Fork"] +pub mod fork; diff --git a/down-the-stack/dk_pac/src/ppi/ch.rs b/down-the-stack/dk_pac/src/ppi/ch.rs new file mode 100644 index 0000000..eb0d5b3 --- /dev/null +++ b/down-the-stack/dk_pac/src/ppi/ch.rs @@ -0,0 +1,16 @@ +#[doc = r"Register block"] +#[repr(C)] +pub struct CH { + #[doc = "0x00 - Description cluster: Channel n event end-point"] + pub eep: EEP, + #[doc = "0x04 - Description cluster: Channel n task end-point"] + pub tep: TEP, +} +#[doc = "EEP (rw) register accessor: an alias for `Reg`"] +pub type EEP = crate::Reg; +#[doc = "Description cluster: Channel n event end-point"] +pub mod eep; +#[doc = "TEP (rw) register accessor: an alias for `Reg`"] +pub type TEP = crate::Reg; +#[doc = "Description cluster: Channel n task end-point"] +pub mod tep; diff --git a/down-the-stack/dk_pac/src/ppi/ch/eep.rs b/down-the-stack/dk_pac/src/ppi/ch/eep.rs new file mode 100644 index 0000000..8376aaf --- /dev/null +++ b/down-the-stack/dk_pac/src/ppi/ch/eep.rs @@ -0,0 +1,80 @@ +#[doc = "Register `EEP` 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 `EEP` 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 `EEP` reader - Pointer to event register. Accepts only addresses to registers from the Event group."] +pub type EEP_R = crate::FieldReader; +#[doc = "Field `EEP` writer - Pointer to event register. Accepts only addresses to registers from the Event group."] +pub type EEP_W<'a, const O: u8> = crate::FieldWriter<'a, u32, EEP_SPEC, u32, u32, 32, O>; +impl R { + #[doc = "Bits 0:31 - Pointer to event register. Accepts only addresses to registers from the Event group."] + #[inline(always)] + pub fn eep(&self) -> EEP_R { + EEP_R::new(self.bits) + } +} +impl W { + #[doc = "Bits 0:31 - Pointer to event register. Accepts only addresses to registers from the Event group."] + #[inline(always)] + #[must_use] + pub fn eep(&mut self) -> EEP_W<0> { + EEP_W::new(self) + } + #[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 = "Description cluster: Channel n event end-point\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 [eep](index.html) module"] +pub struct EEP_SPEC; +impl crate::RegisterSpec for EEP_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [eep::R](R) reader structure"] +impl crate::Readable for EEP_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [eep::W](W) writer structure"] +impl crate::Writable for EEP_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets EEP to value 0"] +impl crate::Resettable for EEP_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/ppi/ch/tep.rs b/down-the-stack/dk_pac/src/ppi/ch/tep.rs new file mode 100644 index 0000000..67e5124 --- /dev/null +++ b/down-the-stack/dk_pac/src/ppi/ch/tep.rs @@ -0,0 +1,80 @@ +#[doc = "Register `TEP` 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 `TEP` 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 `TEP` reader - Pointer to task register. Accepts only addresses to registers from the Task group."] +pub type TEP_R = crate::FieldReader; +#[doc = "Field `TEP` writer - Pointer to task register. Accepts only addresses to registers from the Task group."] +pub type TEP_W<'a, const O: u8> = crate::FieldWriter<'a, u32, TEP_SPEC, u32, u32, 32, O>; +impl R { + #[doc = "Bits 0:31 - Pointer to task register. Accepts only addresses to registers from the Task group."] + #[inline(always)] + pub fn tep(&self) -> TEP_R { + TEP_R::new(self.bits) + } +} +impl W { + #[doc = "Bits 0:31 - Pointer to task register. Accepts only addresses to registers from the Task group."] + #[inline(always)] + #[must_use] + pub fn tep(&mut self) -> TEP_W<0> { + TEP_W::new(self) + } + #[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 = "Description cluster: Channel n task end-point\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 [tep](index.html) module"] +pub struct TEP_SPEC; +impl crate::RegisterSpec for TEP_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [tep::R](R) reader structure"] +impl crate::Readable for TEP_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [tep::W](W) writer structure"] +impl crate::Writable for TEP_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets TEP to value 0"] +impl crate::Resettable for TEP_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/ppi/chen.rs b/down-the-stack/dk_pac/src/ppi/chen.rs new file mode 100644 index 0000000..4dc2358 --- /dev/null +++ b/down-the-stack/dk_pac/src/ppi/chen.rs @@ -0,0 +1,2017 @@ +#[doc = "Register `CHEN` 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 `CHEN` 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 `CH0` reader - Enable or disable channel 0"] +pub type CH0_R = crate::BitReader; +#[doc = "Enable or disable channel 0\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum CH0_A { + #[doc = "0: Disable channel"] + DISABLED = 0, + #[doc = "1: Enable channel"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: CH0_A) -> Self { + variant as u8 != 0 + } +} +impl CH0_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> CH0_A { + match self.bits { + false => CH0_A::DISABLED, + true => CH0_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == CH0_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == CH0_A::ENABLED + } +} +#[doc = "Field `CH0` writer - Enable or disable channel 0"] +pub type CH0_W<'a, const O: u8> = crate::BitWriter<'a, u32, CHEN_SPEC, CH0_A, O>; +impl<'a, const O: u8> CH0_W<'a, O> { + #[doc = "Disable channel"] + #[inline(always)] + pub fn disabled(self) -> &'a mut W { + self.variant(CH0_A::DISABLED) + } + #[doc = "Enable channel"] + #[inline(always)] + pub fn enabled(self) -> &'a mut W { + self.variant(CH0_A::ENABLED) + } +} +#[doc = "Field `CH1` reader - Enable or disable channel 1"] +pub type CH1_R = crate::BitReader; +#[doc = "Enable or disable channel 1\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum CH1_A { + #[doc = "0: Disable channel"] + DISABLED = 0, + #[doc = "1: Enable channel"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: CH1_A) -> Self { + variant as u8 != 0 + } +} +impl CH1_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> CH1_A { + match self.bits { + false => CH1_A::DISABLED, + true => CH1_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == CH1_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == CH1_A::ENABLED + } +} +#[doc = "Field `CH1` writer - Enable or disable channel 1"] +pub type CH1_W<'a, const O: u8> = crate::BitWriter<'a, u32, CHEN_SPEC, CH1_A, O>; +impl<'a, const O: u8> CH1_W<'a, O> { + #[doc = "Disable channel"] + #[inline(always)] + pub fn disabled(self) -> &'a mut W { + self.variant(CH1_A::DISABLED) + } + #[doc = "Enable channel"] + #[inline(always)] + pub fn enabled(self) -> &'a mut W { + self.variant(CH1_A::ENABLED) + } +} +#[doc = "Field `CH2` reader - Enable or disable channel 2"] +pub type CH2_R = crate::BitReader; +#[doc = "Enable or disable channel 2\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum CH2_A { + #[doc = "0: Disable channel"] + DISABLED = 0, + #[doc = "1: Enable channel"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: CH2_A) -> Self { + variant as u8 != 0 + } +} +impl CH2_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> CH2_A { + match self.bits { + false => CH2_A::DISABLED, + true => CH2_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == CH2_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == CH2_A::ENABLED + } +} +#[doc = "Field `CH2` writer - Enable or disable channel 2"] +pub type CH2_W<'a, const O: u8> = crate::BitWriter<'a, u32, CHEN_SPEC, CH2_A, O>; +impl<'a, const O: u8> CH2_W<'a, O> { + #[doc = "Disable channel"] + #[inline(always)] + pub fn disabled(self) -> &'a mut W { + self.variant(CH2_A::DISABLED) + } + #[doc = "Enable channel"] + #[inline(always)] + pub fn enabled(self) -> &'a mut W { + self.variant(CH2_A::ENABLED) + } +} +#[doc = "Field `CH3` reader - Enable or disable channel 3"] +pub type CH3_R = crate::BitReader; +#[doc = "Enable or disable channel 3\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum CH3_A { + #[doc = "0: Disable channel"] + DISABLED = 0, + #[doc = "1: Enable channel"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: CH3_A) -> Self { + variant as u8 != 0 + } +} +impl CH3_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> CH3_A { + match self.bits { + false => CH3_A::DISABLED, + true => CH3_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == CH3_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == CH3_A::ENABLED + } +} +#[doc = "Field `CH3` writer - Enable or disable channel 3"] +pub type CH3_W<'a, const O: u8> = crate::BitWriter<'a, u32, CHEN_SPEC, CH3_A, O>; +impl<'a, const O: u8> CH3_W<'a, O> { + #[doc = "Disable channel"] + #[inline(always)] + pub fn disabled(self) -> &'a mut W { + self.variant(CH3_A::DISABLED) + } + #[doc = "Enable channel"] + #[inline(always)] + pub fn enabled(self) -> &'a mut W { + self.variant(CH3_A::ENABLED) + } +} +#[doc = "Field `CH4` reader - Enable or disable channel 4"] +pub type CH4_R = crate::BitReader; +#[doc = "Enable or disable channel 4\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum CH4_A { + #[doc = "0: Disable channel"] + DISABLED = 0, + #[doc = "1: Enable channel"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: CH4_A) -> Self { + variant as u8 != 0 + } +} +impl CH4_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> CH4_A { + match self.bits { + false => CH4_A::DISABLED, + true => CH4_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == CH4_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == CH4_A::ENABLED + } +} +#[doc = "Field `CH4` writer - Enable or disable channel 4"] +pub type CH4_W<'a, const O: u8> = crate::BitWriter<'a, u32, CHEN_SPEC, CH4_A, O>; +impl<'a, const O: u8> CH4_W<'a, O> { + #[doc = "Disable channel"] + #[inline(always)] + pub fn disabled(self) -> &'a mut W { + self.variant(CH4_A::DISABLED) + } + #[doc = "Enable channel"] + #[inline(always)] + pub fn enabled(self) -> &'a mut W { + self.variant(CH4_A::ENABLED) + } +} +#[doc = "Field `CH5` reader - Enable or disable channel 5"] +pub type CH5_R = crate::BitReader; +#[doc = "Enable or disable channel 5\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum CH5_A { + #[doc = "0: Disable channel"] + DISABLED = 0, + #[doc = "1: Enable channel"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: CH5_A) -> Self { + variant as u8 != 0 + } +} +impl CH5_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> CH5_A { + match self.bits { + false => CH5_A::DISABLED, + true => CH5_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == CH5_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == CH5_A::ENABLED + } +} +#[doc = "Field `CH5` writer - Enable or disable channel 5"] +pub type CH5_W<'a, const O: u8> = crate::BitWriter<'a, u32, CHEN_SPEC, CH5_A, O>; +impl<'a, const O: u8> CH5_W<'a, O> { + #[doc = "Disable channel"] + #[inline(always)] + pub fn disabled(self) -> &'a mut W { + self.variant(CH5_A::DISABLED) + } + #[doc = "Enable channel"] + #[inline(always)] + pub fn enabled(self) -> &'a mut W { + self.variant(CH5_A::ENABLED) + } +} +#[doc = "Field `CH6` reader - Enable or disable channel 6"] +pub type CH6_R = crate::BitReader; +#[doc = "Enable or disable channel 6\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum CH6_A { + #[doc = "0: Disable channel"] + DISABLED = 0, + #[doc = "1: Enable channel"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: CH6_A) -> Self { + variant as u8 != 0 + } +} +impl CH6_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> CH6_A { + match self.bits { + false => CH6_A::DISABLED, + true => CH6_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == CH6_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == CH6_A::ENABLED + } +} +#[doc = "Field `CH6` writer - Enable or disable channel 6"] +pub type CH6_W<'a, const O: u8> = crate::BitWriter<'a, u32, CHEN_SPEC, CH6_A, O>; +impl<'a, const O: u8> CH6_W<'a, O> { + #[doc = "Disable channel"] + #[inline(always)] + pub fn disabled(self) -> &'a mut W { + self.variant(CH6_A::DISABLED) + } + #[doc = "Enable channel"] + #[inline(always)] + pub fn enabled(self) -> &'a mut W { + self.variant(CH6_A::ENABLED) + } +} +#[doc = "Field `CH7` reader - Enable or disable channel 7"] +pub type CH7_R = crate::BitReader; +#[doc = "Enable or disable channel 7\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum CH7_A { + #[doc = "0: Disable channel"] + DISABLED = 0, + #[doc = "1: Enable channel"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: CH7_A) -> Self { + variant as u8 != 0 + } +} +impl CH7_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> CH7_A { + match self.bits { + false => CH7_A::DISABLED, + true => CH7_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == CH7_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == CH7_A::ENABLED + } +} +#[doc = "Field `CH7` writer - Enable or disable channel 7"] +pub type CH7_W<'a, const O: u8> = crate::BitWriter<'a, u32, CHEN_SPEC, CH7_A, O>; +impl<'a, const O: u8> CH7_W<'a, O> { + #[doc = "Disable channel"] + #[inline(always)] + pub fn disabled(self) -> &'a mut W { + self.variant(CH7_A::DISABLED) + } + #[doc = "Enable channel"] + #[inline(always)] + pub fn enabled(self) -> &'a mut W { + self.variant(CH7_A::ENABLED) + } +} +#[doc = "Field `CH8` reader - Enable or disable channel 8"] +pub type CH8_R = crate::BitReader; +#[doc = "Enable or disable channel 8\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum CH8_A { + #[doc = "0: Disable channel"] + DISABLED = 0, + #[doc = "1: Enable channel"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: CH8_A) -> Self { + variant as u8 != 0 + } +} +impl CH8_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> CH8_A { + match self.bits { + false => CH8_A::DISABLED, + true => CH8_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == CH8_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == CH8_A::ENABLED + } +} +#[doc = "Field `CH8` writer - Enable or disable channel 8"] +pub type CH8_W<'a, const O: u8> = crate::BitWriter<'a, u32, CHEN_SPEC, CH8_A, O>; +impl<'a, const O: u8> CH8_W<'a, O> { + #[doc = "Disable channel"] + #[inline(always)] + pub fn disabled(self) -> &'a mut W { + self.variant(CH8_A::DISABLED) + } + #[doc = "Enable channel"] + #[inline(always)] + pub fn enabled(self) -> &'a mut W { + self.variant(CH8_A::ENABLED) + } +} +#[doc = "Field `CH9` reader - Enable or disable channel 9"] +pub type CH9_R = crate::BitReader; +#[doc = "Enable or disable channel 9\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum CH9_A { + #[doc = "0: Disable channel"] + DISABLED = 0, + #[doc = "1: Enable channel"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: CH9_A) -> Self { + variant as u8 != 0 + } +} +impl CH9_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> CH9_A { + match self.bits { + false => CH9_A::DISABLED, + true => CH9_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == CH9_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == CH9_A::ENABLED + } +} +#[doc = "Field `CH9` writer - Enable or disable channel 9"] +pub type CH9_W<'a, const O: u8> = crate::BitWriter<'a, u32, CHEN_SPEC, CH9_A, O>; +impl<'a, const O: u8> CH9_W<'a, O> { + #[doc = "Disable channel"] + #[inline(always)] + pub fn disabled(self) -> &'a mut W { + self.variant(CH9_A::DISABLED) + } + #[doc = "Enable channel"] + #[inline(always)] + pub fn enabled(self) -> &'a mut W { + self.variant(CH9_A::ENABLED) + } +} +#[doc = "Field `CH10` reader - Enable or disable channel 10"] +pub type CH10_R = crate::BitReader; +#[doc = "Enable or disable channel 10\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum CH10_A { + #[doc = "0: Disable channel"] + DISABLED = 0, + #[doc = "1: Enable channel"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: CH10_A) -> Self { + variant as u8 != 0 + } +} +impl CH10_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> CH10_A { + match self.bits { + false => CH10_A::DISABLED, + true => CH10_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == CH10_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == CH10_A::ENABLED + } +} +#[doc = "Field `CH10` writer - Enable or disable channel 10"] +pub type CH10_W<'a, const O: u8> = crate::BitWriter<'a, u32, CHEN_SPEC, CH10_A, O>; +impl<'a, const O: u8> CH10_W<'a, O> { + #[doc = "Disable channel"] + #[inline(always)] + pub fn disabled(self) -> &'a mut W { + self.variant(CH10_A::DISABLED) + } + #[doc = "Enable channel"] + #[inline(always)] + pub fn enabled(self) -> &'a mut W { + self.variant(CH10_A::ENABLED) + } +} +#[doc = "Field `CH11` reader - Enable or disable channel 11"] +pub type CH11_R = crate::BitReader; +#[doc = "Enable or disable channel 11\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum CH11_A { + #[doc = "0: Disable channel"] + DISABLED = 0, + #[doc = "1: Enable channel"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: CH11_A) -> Self { + variant as u8 != 0 + } +} +impl CH11_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> CH11_A { + match self.bits { + false => CH11_A::DISABLED, + true => CH11_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == CH11_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == CH11_A::ENABLED + } +} +#[doc = "Field `CH11` writer - Enable or disable channel 11"] +pub type CH11_W<'a, const O: u8> = crate::BitWriter<'a, u32, CHEN_SPEC, CH11_A, O>; +impl<'a, const O: u8> CH11_W<'a, O> { + #[doc = "Disable channel"] + #[inline(always)] + pub fn disabled(self) -> &'a mut W { + self.variant(CH11_A::DISABLED) + } + #[doc = "Enable channel"] + #[inline(always)] + pub fn enabled(self) -> &'a mut W { + self.variant(CH11_A::ENABLED) + } +} +#[doc = "Field `CH12` reader - Enable or disable channel 12"] +pub type CH12_R = crate::BitReader; +#[doc = "Enable or disable channel 12\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum CH12_A { + #[doc = "0: Disable channel"] + DISABLED = 0, + #[doc = "1: Enable channel"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: CH12_A) -> Self { + variant as u8 != 0 + } +} +impl CH12_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> CH12_A { + match self.bits { + false => CH12_A::DISABLED, + true => CH12_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == CH12_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == CH12_A::ENABLED + } +} +#[doc = "Field `CH12` writer - Enable or disable channel 12"] +pub type CH12_W<'a, const O: u8> = crate::BitWriter<'a, u32, CHEN_SPEC, CH12_A, O>; +impl<'a, const O: u8> CH12_W<'a, O> { + #[doc = "Disable channel"] + #[inline(always)] + pub fn disabled(self) -> &'a mut W { + self.variant(CH12_A::DISABLED) + } + #[doc = "Enable channel"] + #[inline(always)] + pub fn enabled(self) -> &'a mut W { + self.variant(CH12_A::ENABLED) + } +} +#[doc = "Field `CH13` reader - Enable or disable channel 13"] +pub type CH13_R = crate::BitReader; +#[doc = "Enable or disable channel 13\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum CH13_A { + #[doc = "0: Disable channel"] + DISABLED = 0, + #[doc = "1: Enable channel"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: CH13_A) -> Self { + variant as u8 != 0 + } +} +impl CH13_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> CH13_A { + match self.bits { + false => CH13_A::DISABLED, + true => CH13_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == CH13_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == CH13_A::ENABLED + } +} +#[doc = "Field `CH13` writer - Enable or disable channel 13"] +pub type CH13_W<'a, const O: u8> = crate::BitWriter<'a, u32, CHEN_SPEC, CH13_A, O>; +impl<'a, const O: u8> CH13_W<'a, O> { + #[doc = "Disable channel"] + #[inline(always)] + pub fn disabled(self) -> &'a mut W { + self.variant(CH13_A::DISABLED) + } + #[doc = "Enable channel"] + #[inline(always)] + pub fn enabled(self) -> &'a mut W { + self.variant(CH13_A::ENABLED) + } +} +#[doc = "Field `CH14` reader - Enable or disable channel 14"] +pub type CH14_R = crate::BitReader; +#[doc = "Enable or disable channel 14\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum CH14_A { + #[doc = "0: Disable channel"] + DISABLED = 0, + #[doc = "1: Enable channel"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: CH14_A) -> Self { + variant as u8 != 0 + } +} +impl CH14_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> CH14_A { + match self.bits { + false => CH14_A::DISABLED, + true => CH14_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == CH14_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == CH14_A::ENABLED + } +} +#[doc = "Field `CH14` writer - Enable or disable channel 14"] +pub type CH14_W<'a, const O: u8> = crate::BitWriter<'a, u32, CHEN_SPEC, CH14_A, O>; +impl<'a, const O: u8> CH14_W<'a, O> { + #[doc = "Disable channel"] + #[inline(always)] + pub fn disabled(self) -> &'a mut W { + self.variant(CH14_A::DISABLED) + } + #[doc = "Enable channel"] + #[inline(always)] + pub fn enabled(self) -> &'a mut W { + self.variant(CH14_A::ENABLED) + } +} +#[doc = "Field `CH15` reader - Enable or disable channel 15"] +pub type CH15_R = crate::BitReader; +#[doc = "Enable or disable channel 15\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum CH15_A { + #[doc = "0: Disable channel"] + DISABLED = 0, + #[doc = "1: Enable channel"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: CH15_A) -> Self { + variant as u8 != 0 + } +} +impl CH15_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> CH15_A { + match self.bits { + false => CH15_A::DISABLED, + true => CH15_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == CH15_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == CH15_A::ENABLED + } +} +#[doc = "Field `CH15` writer - Enable or disable channel 15"] +pub type CH15_W<'a, const O: u8> = crate::BitWriter<'a, u32, CHEN_SPEC, CH15_A, O>; +impl<'a, const O: u8> CH15_W<'a, O> { + #[doc = "Disable channel"] + #[inline(always)] + pub fn disabled(self) -> &'a mut W { + self.variant(CH15_A::DISABLED) + } + #[doc = "Enable channel"] + #[inline(always)] + pub fn enabled(self) -> &'a mut W { + self.variant(CH15_A::ENABLED) + } +} +#[doc = "Field `CH16` reader - Enable or disable channel 16"] +pub type CH16_R = crate::BitReader; +#[doc = "Enable or disable channel 16\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum CH16_A { + #[doc = "0: Disable channel"] + DISABLED = 0, + #[doc = "1: Enable channel"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: CH16_A) -> Self { + variant as u8 != 0 + } +} +impl CH16_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> CH16_A { + match self.bits { + false => CH16_A::DISABLED, + true => CH16_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == CH16_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == CH16_A::ENABLED + } +} +#[doc = "Field `CH16` writer - Enable or disable channel 16"] +pub type CH16_W<'a, const O: u8> = crate::BitWriter<'a, u32, CHEN_SPEC, CH16_A, O>; +impl<'a, const O: u8> CH16_W<'a, O> { + #[doc = "Disable channel"] + #[inline(always)] + pub fn disabled(self) -> &'a mut W { + self.variant(CH16_A::DISABLED) + } + #[doc = "Enable channel"] + #[inline(always)] + pub fn enabled(self) -> &'a mut W { + self.variant(CH16_A::ENABLED) + } +} +#[doc = "Field `CH17` reader - Enable or disable channel 17"] +pub type CH17_R = crate::BitReader; +#[doc = "Enable or disable channel 17\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum CH17_A { + #[doc = "0: Disable channel"] + DISABLED = 0, + #[doc = "1: Enable channel"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: CH17_A) -> Self { + variant as u8 != 0 + } +} +impl CH17_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> CH17_A { + match self.bits { + false => CH17_A::DISABLED, + true => CH17_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == CH17_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == CH17_A::ENABLED + } +} +#[doc = "Field `CH17` writer - Enable or disable channel 17"] +pub type CH17_W<'a, const O: u8> = crate::BitWriter<'a, u32, CHEN_SPEC, CH17_A, O>; +impl<'a, const O: u8> CH17_W<'a, O> { + #[doc = "Disable channel"] + #[inline(always)] + pub fn disabled(self) -> &'a mut W { + self.variant(CH17_A::DISABLED) + } + #[doc = "Enable channel"] + #[inline(always)] + pub fn enabled(self) -> &'a mut W { + self.variant(CH17_A::ENABLED) + } +} +#[doc = "Field `CH18` reader - Enable or disable channel 18"] +pub type CH18_R = crate::BitReader; +#[doc = "Enable or disable channel 18\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum CH18_A { + #[doc = "0: Disable channel"] + DISABLED = 0, + #[doc = "1: Enable channel"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: CH18_A) -> Self { + variant as u8 != 0 + } +} +impl CH18_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> CH18_A { + match self.bits { + false => CH18_A::DISABLED, + true => CH18_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == CH18_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == CH18_A::ENABLED + } +} +#[doc = "Field `CH18` writer - Enable or disable channel 18"] +pub type CH18_W<'a, const O: u8> = crate::BitWriter<'a, u32, CHEN_SPEC, CH18_A, O>; +impl<'a, const O: u8> CH18_W<'a, O> { + #[doc = "Disable channel"] + #[inline(always)] + pub fn disabled(self) -> &'a mut W { + self.variant(CH18_A::DISABLED) + } + #[doc = "Enable channel"] + #[inline(always)] + pub fn enabled(self) -> &'a mut W { + self.variant(CH18_A::ENABLED) + } +} +#[doc = "Field `CH19` reader - Enable or disable channel 19"] +pub type CH19_R = crate::BitReader; +#[doc = "Enable or disable channel 19\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum CH19_A { + #[doc = "0: Disable channel"] + DISABLED = 0, + #[doc = "1: Enable channel"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: CH19_A) -> Self { + variant as u8 != 0 + } +} +impl CH19_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> CH19_A { + match self.bits { + false => CH19_A::DISABLED, + true => CH19_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == CH19_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == CH19_A::ENABLED + } +} +#[doc = "Field `CH19` writer - Enable or disable channel 19"] +pub type CH19_W<'a, const O: u8> = crate::BitWriter<'a, u32, CHEN_SPEC, CH19_A, O>; +impl<'a, const O: u8> CH19_W<'a, O> { + #[doc = "Disable channel"] + #[inline(always)] + pub fn disabled(self) -> &'a mut W { + self.variant(CH19_A::DISABLED) + } + #[doc = "Enable channel"] + #[inline(always)] + pub fn enabled(self) -> &'a mut W { + self.variant(CH19_A::ENABLED) + } +} +#[doc = "Field `CH20` reader - Enable or disable channel 20"] +pub type CH20_R = crate::BitReader; +#[doc = "Enable or disable channel 20\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum CH20_A { + #[doc = "0: Disable channel"] + DISABLED = 0, + #[doc = "1: Enable channel"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: CH20_A) -> Self { + variant as u8 != 0 + } +} +impl CH20_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> CH20_A { + match self.bits { + false => CH20_A::DISABLED, + true => CH20_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == CH20_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == CH20_A::ENABLED + } +} +#[doc = "Field `CH20` writer - Enable or disable channel 20"] +pub type CH20_W<'a, const O: u8> = crate::BitWriter<'a, u32, CHEN_SPEC, CH20_A, O>; +impl<'a, const O: u8> CH20_W<'a, O> { + #[doc = "Disable channel"] + #[inline(always)] + pub fn disabled(self) -> &'a mut W { + self.variant(CH20_A::DISABLED) + } + #[doc = "Enable channel"] + #[inline(always)] + pub fn enabled(self) -> &'a mut W { + self.variant(CH20_A::ENABLED) + } +} +#[doc = "Field `CH21` reader - Enable or disable channel 21"] +pub type CH21_R = crate::BitReader; +#[doc = "Enable or disable channel 21\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum CH21_A { + #[doc = "0: Disable channel"] + DISABLED = 0, + #[doc = "1: Enable channel"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: CH21_A) -> Self { + variant as u8 != 0 + } +} +impl CH21_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> CH21_A { + match self.bits { + false => CH21_A::DISABLED, + true => CH21_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == CH21_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == CH21_A::ENABLED + } +} +#[doc = "Field `CH21` writer - Enable or disable channel 21"] +pub type CH21_W<'a, const O: u8> = crate::BitWriter<'a, u32, CHEN_SPEC, CH21_A, O>; +impl<'a, const O: u8> CH21_W<'a, O> { + #[doc = "Disable channel"] + #[inline(always)] + pub fn disabled(self) -> &'a mut W { + self.variant(CH21_A::DISABLED) + } + #[doc = "Enable channel"] + #[inline(always)] + pub fn enabled(self) -> &'a mut W { + self.variant(CH21_A::ENABLED) + } +} +#[doc = "Field `CH22` reader - Enable or disable channel 22"] +pub type CH22_R = crate::BitReader; +#[doc = "Enable or disable channel 22\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum CH22_A { + #[doc = "0: Disable channel"] + DISABLED = 0, + #[doc = "1: Enable channel"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: CH22_A) -> Self { + variant as u8 != 0 + } +} +impl CH22_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> CH22_A { + match self.bits { + false => CH22_A::DISABLED, + true => CH22_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == CH22_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == CH22_A::ENABLED + } +} +#[doc = "Field `CH22` writer - Enable or disable channel 22"] +pub type CH22_W<'a, const O: u8> = crate::BitWriter<'a, u32, CHEN_SPEC, CH22_A, O>; +impl<'a, const O: u8> CH22_W<'a, O> { + #[doc = "Disable channel"] + #[inline(always)] + pub fn disabled(self) -> &'a mut W { + self.variant(CH22_A::DISABLED) + } + #[doc = "Enable channel"] + #[inline(always)] + pub fn enabled(self) -> &'a mut W { + self.variant(CH22_A::ENABLED) + } +} +#[doc = "Field `CH23` reader - Enable or disable channel 23"] +pub type CH23_R = crate::BitReader; +#[doc = "Enable or disable channel 23\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum CH23_A { + #[doc = "0: Disable channel"] + DISABLED = 0, + #[doc = "1: Enable channel"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: CH23_A) -> Self { + variant as u8 != 0 + } +} +impl CH23_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> CH23_A { + match self.bits { + false => CH23_A::DISABLED, + true => CH23_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == CH23_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == CH23_A::ENABLED + } +} +#[doc = "Field `CH23` writer - Enable or disable channel 23"] +pub type CH23_W<'a, const O: u8> = crate::BitWriter<'a, u32, CHEN_SPEC, CH23_A, O>; +impl<'a, const O: u8> CH23_W<'a, O> { + #[doc = "Disable channel"] + #[inline(always)] + pub fn disabled(self) -> &'a mut W { + self.variant(CH23_A::DISABLED) + } + #[doc = "Enable channel"] + #[inline(always)] + pub fn enabled(self) -> &'a mut W { + self.variant(CH23_A::ENABLED) + } +} +#[doc = "Field `CH24` reader - Enable or disable channel 24"] +pub type CH24_R = crate::BitReader; +#[doc = "Enable or disable channel 24\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum CH24_A { + #[doc = "0: Disable channel"] + DISABLED = 0, + #[doc = "1: Enable channel"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: CH24_A) -> Self { + variant as u8 != 0 + } +} +impl CH24_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> CH24_A { + match self.bits { + false => CH24_A::DISABLED, + true => CH24_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == CH24_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == CH24_A::ENABLED + } +} +#[doc = "Field `CH24` writer - Enable or disable channel 24"] +pub type CH24_W<'a, const O: u8> = crate::BitWriter<'a, u32, CHEN_SPEC, CH24_A, O>; +impl<'a, const O: u8> CH24_W<'a, O> { + #[doc = "Disable channel"] + #[inline(always)] + pub fn disabled(self) -> &'a mut W { + self.variant(CH24_A::DISABLED) + } + #[doc = "Enable channel"] + #[inline(always)] + pub fn enabled(self) -> &'a mut W { + self.variant(CH24_A::ENABLED) + } +} +#[doc = "Field `CH25` reader - Enable or disable channel 25"] +pub type CH25_R = crate::BitReader; +#[doc = "Enable or disable channel 25\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum CH25_A { + #[doc = "0: Disable channel"] + DISABLED = 0, + #[doc = "1: Enable channel"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: CH25_A) -> Self { + variant as u8 != 0 + } +} +impl CH25_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> CH25_A { + match self.bits { + false => CH25_A::DISABLED, + true => CH25_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == CH25_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == CH25_A::ENABLED + } +} +#[doc = "Field `CH25` writer - Enable or disable channel 25"] +pub type CH25_W<'a, const O: u8> = crate::BitWriter<'a, u32, CHEN_SPEC, CH25_A, O>; +impl<'a, const O: u8> CH25_W<'a, O> { + #[doc = "Disable channel"] + #[inline(always)] + pub fn disabled(self) -> &'a mut W { + self.variant(CH25_A::DISABLED) + } + #[doc = "Enable channel"] + #[inline(always)] + pub fn enabled(self) -> &'a mut W { + self.variant(CH25_A::ENABLED) + } +} +#[doc = "Field `CH26` reader - Enable or disable channel 26"] +pub type CH26_R = crate::BitReader; +#[doc = "Enable or disable channel 26\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum CH26_A { + #[doc = "0: Disable channel"] + DISABLED = 0, + #[doc = "1: Enable channel"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: CH26_A) -> Self { + variant as u8 != 0 + } +} +impl CH26_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> CH26_A { + match self.bits { + false => CH26_A::DISABLED, + true => CH26_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == CH26_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == CH26_A::ENABLED + } +} +#[doc = "Field `CH26` writer - Enable or disable channel 26"] +pub type CH26_W<'a, const O: u8> = crate::BitWriter<'a, u32, CHEN_SPEC, CH26_A, O>; +impl<'a, const O: u8> CH26_W<'a, O> { + #[doc = "Disable channel"] + #[inline(always)] + pub fn disabled(self) -> &'a mut W { + self.variant(CH26_A::DISABLED) + } + #[doc = "Enable channel"] + #[inline(always)] + pub fn enabled(self) -> &'a mut W { + self.variant(CH26_A::ENABLED) + } +} +#[doc = "Field `CH27` reader - Enable or disable channel 27"] +pub type CH27_R = crate::BitReader; +#[doc = "Enable or disable channel 27\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum CH27_A { + #[doc = "0: Disable channel"] + DISABLED = 0, + #[doc = "1: Enable channel"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: CH27_A) -> Self { + variant as u8 != 0 + } +} +impl CH27_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> CH27_A { + match self.bits { + false => CH27_A::DISABLED, + true => CH27_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == CH27_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == CH27_A::ENABLED + } +} +#[doc = "Field `CH27` writer - Enable or disable channel 27"] +pub type CH27_W<'a, const O: u8> = crate::BitWriter<'a, u32, CHEN_SPEC, CH27_A, O>; +impl<'a, const O: u8> CH27_W<'a, O> { + #[doc = "Disable channel"] + #[inline(always)] + pub fn disabled(self) -> &'a mut W { + self.variant(CH27_A::DISABLED) + } + #[doc = "Enable channel"] + #[inline(always)] + pub fn enabled(self) -> &'a mut W { + self.variant(CH27_A::ENABLED) + } +} +#[doc = "Field `CH28` reader - Enable or disable channel 28"] +pub type CH28_R = crate::BitReader; +#[doc = "Enable or disable channel 28\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum CH28_A { + #[doc = "0: Disable channel"] + DISABLED = 0, + #[doc = "1: Enable channel"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: CH28_A) -> Self { + variant as u8 != 0 + } +} +impl CH28_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> CH28_A { + match self.bits { + false => CH28_A::DISABLED, + true => CH28_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == CH28_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == CH28_A::ENABLED + } +} +#[doc = "Field `CH28` writer - Enable or disable channel 28"] +pub type CH28_W<'a, const O: u8> = crate::BitWriter<'a, u32, CHEN_SPEC, CH28_A, O>; +impl<'a, const O: u8> CH28_W<'a, O> { + #[doc = "Disable channel"] + #[inline(always)] + pub fn disabled(self) -> &'a mut W { + self.variant(CH28_A::DISABLED) + } + #[doc = "Enable channel"] + #[inline(always)] + pub fn enabled(self) -> &'a mut W { + self.variant(CH28_A::ENABLED) + } +} +#[doc = "Field `CH29` reader - Enable or disable channel 29"] +pub type CH29_R = crate::BitReader; +#[doc = "Enable or disable channel 29\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum CH29_A { + #[doc = "0: Disable channel"] + DISABLED = 0, + #[doc = "1: Enable channel"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: CH29_A) -> Self { + variant as u8 != 0 + } +} +impl CH29_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> CH29_A { + match self.bits { + false => CH29_A::DISABLED, + true => CH29_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == CH29_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == CH29_A::ENABLED + } +} +#[doc = "Field `CH29` writer - Enable or disable channel 29"] +pub type CH29_W<'a, const O: u8> = crate::BitWriter<'a, u32, CHEN_SPEC, CH29_A, O>; +impl<'a, const O: u8> CH29_W<'a, O> { + #[doc = "Disable channel"] + #[inline(always)] + pub fn disabled(self) -> &'a mut W { + self.variant(CH29_A::DISABLED) + } + #[doc = "Enable channel"] + #[inline(always)] + pub fn enabled(self) -> &'a mut W { + self.variant(CH29_A::ENABLED) + } +} +#[doc = "Field `CH30` reader - Enable or disable channel 30"] +pub type CH30_R = crate::BitReader; +#[doc = "Enable or disable channel 30\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum CH30_A { + #[doc = "0: Disable channel"] + DISABLED = 0, + #[doc = "1: Enable channel"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: CH30_A) -> Self { + variant as u8 != 0 + } +} +impl CH30_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> CH30_A { + match self.bits { + false => CH30_A::DISABLED, + true => CH30_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == CH30_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == CH30_A::ENABLED + } +} +#[doc = "Field `CH30` writer - Enable or disable channel 30"] +pub type CH30_W<'a, const O: u8> = crate::BitWriter<'a, u32, CHEN_SPEC, CH30_A, O>; +impl<'a, const O: u8> CH30_W<'a, O> { + #[doc = "Disable channel"] + #[inline(always)] + pub fn disabled(self) -> &'a mut W { + self.variant(CH30_A::DISABLED) + } + #[doc = "Enable channel"] + #[inline(always)] + pub fn enabled(self) -> &'a mut W { + self.variant(CH30_A::ENABLED) + } +} +#[doc = "Field `CH31` reader - Enable or disable channel 31"] +pub type CH31_R = crate::BitReader; +#[doc = "Enable or disable channel 31\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum CH31_A { + #[doc = "0: Disable channel"] + DISABLED = 0, + #[doc = "1: Enable channel"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: CH31_A) -> Self { + variant as u8 != 0 + } +} +impl CH31_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> CH31_A { + match self.bits { + false => CH31_A::DISABLED, + true => CH31_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == CH31_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == CH31_A::ENABLED + } +} +#[doc = "Field `CH31` writer - Enable or disable channel 31"] +pub type CH31_W<'a, const O: u8> = crate::BitWriter<'a, u32, CHEN_SPEC, CH31_A, O>; +impl<'a, const O: u8> CH31_W<'a, O> { + #[doc = "Disable channel"] + #[inline(always)] + pub fn disabled(self) -> &'a mut W { + self.variant(CH31_A::DISABLED) + } + #[doc = "Enable channel"] + #[inline(always)] + pub fn enabled(self) -> &'a mut W { + self.variant(CH31_A::ENABLED) + } +} +impl R { + #[doc = "Bit 0 - Enable or disable channel 0"] + #[inline(always)] + pub fn ch0(&self) -> CH0_R { + CH0_R::new((self.bits & 1) != 0) + } + #[doc = "Bit 1 - Enable or disable channel 1"] + #[inline(always)] + pub fn ch1(&self) -> CH1_R { + CH1_R::new(((self.bits >> 1) & 1) != 0) + } + #[doc = "Bit 2 - Enable or disable channel 2"] + #[inline(always)] + pub fn ch2(&self) -> CH2_R { + CH2_R::new(((self.bits >> 2) & 1) != 0) + } + #[doc = "Bit 3 - Enable or disable channel 3"] + #[inline(always)] + pub fn ch3(&self) -> CH3_R { + CH3_R::new(((self.bits >> 3) & 1) != 0) + } + #[doc = "Bit 4 - Enable or disable channel 4"] + #[inline(always)] + pub fn ch4(&self) -> CH4_R { + CH4_R::new(((self.bits >> 4) & 1) != 0) + } + #[doc = "Bit 5 - Enable or disable channel 5"] + #[inline(always)] + pub fn ch5(&self) -> CH5_R { + CH5_R::new(((self.bits >> 5) & 1) != 0) + } + #[doc = "Bit 6 - Enable or disable channel 6"] + #[inline(always)] + pub fn ch6(&self) -> CH6_R { + CH6_R::new(((self.bits >> 6) & 1) != 0) + } + #[doc = "Bit 7 - Enable or disable channel 7"] + #[inline(always)] + pub fn ch7(&self) -> CH7_R { + CH7_R::new(((self.bits >> 7) & 1) != 0) + } + #[doc = "Bit 8 - Enable or disable channel 8"] + #[inline(always)] + pub fn ch8(&self) -> CH8_R { + CH8_R::new(((self.bits >> 8) & 1) != 0) + } + #[doc = "Bit 9 - Enable or disable channel 9"] + #[inline(always)] + pub fn ch9(&self) -> CH9_R { + CH9_R::new(((self.bits >> 9) & 1) != 0) + } + #[doc = "Bit 10 - Enable or disable channel 10"] + #[inline(always)] + pub fn ch10(&self) -> CH10_R { + CH10_R::new(((self.bits >> 10) & 1) != 0) + } + #[doc = "Bit 11 - Enable or disable channel 11"] + #[inline(always)] + pub fn ch11(&self) -> CH11_R { + CH11_R::new(((self.bits >> 11) & 1) != 0) + } + #[doc = "Bit 12 - Enable or disable channel 12"] + #[inline(always)] + pub fn ch12(&self) -> CH12_R { + CH12_R::new(((self.bits >> 12) & 1) != 0) + } + #[doc = "Bit 13 - Enable or disable channel 13"] + #[inline(always)] + pub fn ch13(&self) -> CH13_R { + CH13_R::new(((self.bits >> 13) & 1) != 0) + } + #[doc = "Bit 14 - Enable or disable channel 14"] + #[inline(always)] + pub fn ch14(&self) -> CH14_R { + CH14_R::new(((self.bits >> 14) & 1) != 0) + } + #[doc = "Bit 15 - Enable or disable channel 15"] + #[inline(always)] + pub fn ch15(&self) -> CH15_R { + CH15_R::new(((self.bits >> 15) & 1) != 0) + } + #[doc = "Bit 16 - Enable or disable channel 16"] + #[inline(always)] + pub fn ch16(&self) -> CH16_R { + CH16_R::new(((self.bits >> 16) & 1) != 0) + } + #[doc = "Bit 17 - Enable or disable channel 17"] + #[inline(always)] + pub fn ch17(&self) -> CH17_R { + CH17_R::new(((self.bits >> 17) & 1) != 0) + } + #[doc = "Bit 18 - Enable or disable channel 18"] + #[inline(always)] + pub fn ch18(&self) -> CH18_R { + CH18_R::new(((self.bits >> 18) & 1) != 0) + } + #[doc = "Bit 19 - Enable or disable channel 19"] + #[inline(always)] + pub fn ch19(&self) -> CH19_R { + CH19_R::new(((self.bits >> 19) & 1) != 0) + } + #[doc = "Bit 20 - Enable or disable channel 20"] + #[inline(always)] + pub fn ch20(&self) -> CH20_R { + CH20_R::new(((self.bits >> 20) & 1) != 0) + } + #[doc = "Bit 21 - Enable or disable channel 21"] + #[inline(always)] + pub fn ch21(&self) -> CH21_R { + CH21_R::new(((self.bits >> 21) & 1) != 0) + } + #[doc = "Bit 22 - Enable or disable channel 22"] + #[inline(always)] + pub fn ch22(&self) -> CH22_R { + CH22_R::new(((self.bits >> 22) & 1) != 0) + } + #[doc = "Bit 23 - Enable or disable channel 23"] + #[inline(always)] + pub fn ch23(&self) -> CH23_R { + CH23_R::new(((self.bits >> 23) & 1) != 0) + } + #[doc = "Bit 24 - Enable or disable channel 24"] + #[inline(always)] + pub fn ch24(&self) -> CH24_R { + CH24_R::new(((self.bits >> 24) & 1) != 0) + } + #[doc = "Bit 25 - Enable or disable channel 25"] + #[inline(always)] + pub fn ch25(&self) -> CH25_R { + CH25_R::new(((self.bits >> 25) & 1) != 0) + } + #[doc = "Bit 26 - Enable or disable channel 26"] + #[inline(always)] + pub fn ch26(&self) -> CH26_R { + CH26_R::new(((self.bits >> 26) & 1) != 0) + } + #[doc = "Bit 27 - Enable or disable channel 27"] + #[inline(always)] + pub fn ch27(&self) -> CH27_R { + CH27_R::new(((self.bits >> 27) & 1) != 0) + } + #[doc = "Bit 28 - Enable or disable channel 28"] + #[inline(always)] + pub fn ch28(&self) -> CH28_R { + CH28_R::new(((self.bits >> 28) & 1) != 0) + } + #[doc = "Bit 29 - Enable or disable channel 29"] + #[inline(always)] + pub fn ch29(&self) -> CH29_R { + CH29_R::new(((self.bits >> 29) & 1) != 0) + } + #[doc = "Bit 30 - Enable or disable channel 30"] + #[inline(always)] + pub fn ch30(&self) -> CH30_R { + CH30_R::new(((self.bits >> 30) & 1) != 0) + } + #[doc = "Bit 31 - Enable or disable channel 31"] + #[inline(always)] + pub fn ch31(&self) -> CH31_R { + CH31_R::new(((self.bits >> 31) & 1) != 0) + } +} +impl W { + #[doc = "Bit 0 - Enable or disable channel 0"] + #[inline(always)] + #[must_use] + pub fn ch0(&mut self) -> CH0_W<0> { + CH0_W::new(self) + } + #[doc = "Bit 1 - Enable or disable channel 1"] + #[inline(always)] + #[must_use] + pub fn ch1(&mut self) -> CH1_W<1> { + CH1_W::new(self) + } + #[doc = "Bit 2 - Enable or disable channel 2"] + #[inline(always)] + #[must_use] + pub fn ch2(&mut self) -> CH2_W<2> { + CH2_W::new(self) + } + #[doc = "Bit 3 - Enable or disable channel 3"] + #[inline(always)] + #[must_use] + pub fn ch3(&mut self) -> CH3_W<3> { + CH3_W::new(self) + } + #[doc = "Bit 4 - Enable or disable channel 4"] + #[inline(always)] + #[must_use] + pub fn ch4(&mut self) -> CH4_W<4> { + CH4_W::new(self) + } + #[doc = "Bit 5 - Enable or disable channel 5"] + #[inline(always)] + #[must_use] + pub fn ch5(&mut self) -> CH5_W<5> { + CH5_W::new(self) + } + #[doc = "Bit 6 - Enable or disable channel 6"] + #[inline(always)] + #[must_use] + pub fn ch6(&mut self) -> CH6_W<6> { + CH6_W::new(self) + } + #[doc = "Bit 7 - Enable or disable channel 7"] + #[inline(always)] + #[must_use] + pub fn ch7(&mut self) -> CH7_W<7> { + CH7_W::new(self) + } + #[doc = "Bit 8 - Enable or disable channel 8"] + #[inline(always)] + #[must_use] + pub fn ch8(&mut self) -> CH8_W<8> { + CH8_W::new(self) + } + #[doc = "Bit 9 - Enable or disable channel 9"] + #[inline(always)] + #[must_use] + pub fn ch9(&mut self) -> CH9_W<9> { + CH9_W::new(self) + } + #[doc = "Bit 10 - Enable or disable channel 10"] + #[inline(always)] + #[must_use] + pub fn ch10(&mut self) -> CH10_W<10> { + CH10_W::new(self) + } + #[doc = "Bit 11 - Enable or disable channel 11"] + #[inline(always)] + #[must_use] + pub fn ch11(&mut self) -> CH11_W<11> { + CH11_W::new(self) + } + #[doc = "Bit 12 - Enable or disable channel 12"] + #[inline(always)] + #[must_use] + pub fn ch12(&mut self) -> CH12_W<12> { + CH12_W::new(self) + } + #[doc = "Bit 13 - Enable or disable channel 13"] + #[inline(always)] + #[must_use] + pub fn ch13(&mut self) -> CH13_W<13> { + CH13_W::new(self) + } + #[doc = "Bit 14 - Enable or disable channel 14"] + #[inline(always)] + #[must_use] + pub fn ch14(&mut self) -> CH14_W<14> { + CH14_W::new(self) + } + #[doc = "Bit 15 - Enable or disable channel 15"] + #[inline(always)] + #[must_use] + pub fn ch15(&mut self) -> CH15_W<15> { + CH15_W::new(self) + } + #[doc = "Bit 16 - Enable or disable channel 16"] + #[inline(always)] + #[must_use] + pub fn ch16(&mut self) -> CH16_W<16> { + CH16_W::new(self) + } + #[doc = "Bit 17 - Enable or disable channel 17"] + #[inline(always)] + #[must_use] + pub fn ch17(&mut self) -> CH17_W<17> { + CH17_W::new(self) + } + #[doc = "Bit 18 - Enable or disable channel 18"] + #[inline(always)] + #[must_use] + pub fn ch18(&mut self) -> CH18_W<18> { + CH18_W::new(self) + } + #[doc = "Bit 19 - Enable or disable channel 19"] + #[inline(always)] + #[must_use] + pub fn ch19(&mut self) -> CH19_W<19> { + CH19_W::new(self) + } + #[doc = "Bit 20 - Enable or disable channel 20"] + #[inline(always)] + #[must_use] + pub fn ch20(&mut self) -> CH20_W<20> { + CH20_W::new(self) + } + #[doc = "Bit 21 - Enable or disable channel 21"] + #[inline(always)] + #[must_use] + pub fn ch21(&mut self) -> CH21_W<21> { + CH21_W::new(self) + } + #[doc = "Bit 22 - Enable or disable channel 22"] + #[inline(always)] + #[must_use] + pub fn ch22(&mut self) -> CH22_W<22> { + CH22_W::new(self) + } + #[doc = "Bit 23 - Enable or disable channel 23"] + #[inline(always)] + #[must_use] + pub fn ch23(&mut self) -> CH23_W<23> { + CH23_W::new(self) + } + #[doc = "Bit 24 - Enable or disable channel 24"] + #[inline(always)] + #[must_use] + pub fn ch24(&mut self) -> CH24_W<24> { + CH24_W::new(self) + } + #[doc = "Bit 25 - Enable or disable channel 25"] + #[inline(always)] + #[must_use] + pub fn ch25(&mut self) -> CH25_W<25> { + CH25_W::new(self) + } + #[doc = "Bit 26 - Enable or disable channel 26"] + #[inline(always)] + #[must_use] + pub fn ch26(&mut self) -> CH26_W<26> { + CH26_W::new(self) + } + #[doc = "Bit 27 - Enable or disable channel 27"] + #[inline(always)] + #[must_use] + pub fn ch27(&mut self) -> CH27_W<27> { + CH27_W::new(self) + } + #[doc = "Bit 28 - Enable or disable channel 28"] + #[inline(always)] + #[must_use] + pub fn ch28(&mut self) -> CH28_W<28> { + CH28_W::new(self) + } + #[doc = "Bit 29 - Enable or disable channel 29"] + #[inline(always)] + #[must_use] + pub fn ch29(&mut self) -> CH29_W<29> { + CH29_W::new(self) + } + #[doc = "Bit 30 - Enable or disable channel 30"] + #[inline(always)] + #[must_use] + pub fn ch30(&mut self) -> CH30_W<30> { + CH30_W::new(self) + } + #[doc = "Bit 31 - Enable or disable channel 31"] + #[inline(always)] + #[must_use] + pub fn ch31(&mut self) -> CH31_W<31> { + CH31_W::new(self) + } + #[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 = "Channel enable register\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 [chen](index.html) module"] +pub struct CHEN_SPEC; +impl crate::RegisterSpec for CHEN_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [chen::R](R) reader structure"] +impl crate::Readable for CHEN_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [chen::W](W) writer structure"] +impl crate::Writable for CHEN_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets CHEN to value 0"] +impl crate::Resettable for CHEN_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/ppi/chenclr.rs b/down-the-stack/dk_pac/src/ppi/chenclr.rs new file mode 100644 index 0000000..ebe4de0 --- /dev/null +++ b/down-the-stack/dk_pac/src/ppi/chenclr.rs @@ -0,0 +1,2241 @@ +#[doc = "Register `CHENCLR` 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 `CHENCLR` 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 `CH0` reader - Channel 0 enable clear register. Writing '0' has no effect"] +pub type CH0_R = crate::BitReader; +#[doc = "Channel 0 enable clear register. Writing '0' has no effect\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum CH0_A { + #[doc = "0: Read: channel disabled"] + DISABLED = 0, + #[doc = "1: Read: channel enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: CH0_A) -> Self { + variant as u8 != 0 + } +} +impl CH0_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> CH0_A { + match self.bits { + false => CH0_A::DISABLED, + true => CH0_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == CH0_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == CH0_A::ENABLED + } +} +#[doc = "Channel 0 enable clear register. Writing '0' has no effect\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum CH0_AW { + #[doc = "1: Write: disable channel"] + CLEAR = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: CH0_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `CH0` writer - Channel 0 enable clear register. Writing '0' has no effect"] +pub type CH0_W<'a, const O: u8> = crate::BitWriter1C<'a, u32, CHENCLR_SPEC, CH0_AW, O>; +impl<'a, const O: u8> CH0_W<'a, O> { + #[doc = "Write: disable channel"] + #[inline(always)] + pub fn clear(self) -> &'a mut W { + self.variant(CH0_AW::CLEAR) + } +} +#[doc = "Field `CH1` reader - Channel 1 enable clear register. Writing '0' has no effect"] +pub type CH1_R = crate::BitReader; +#[doc = "Channel 1 enable clear register. Writing '0' has no effect\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum CH1_A { + #[doc = "0: Read: channel disabled"] + DISABLED = 0, + #[doc = "1: Read: channel enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: CH1_A) -> Self { + variant as u8 != 0 + } +} +impl CH1_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> CH1_A { + match self.bits { + false => CH1_A::DISABLED, + true => CH1_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == CH1_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == CH1_A::ENABLED + } +} +#[doc = "Channel 1 enable clear register. Writing '0' has no effect\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum CH1_AW { + #[doc = "1: Write: disable channel"] + CLEAR = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: CH1_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `CH1` writer - Channel 1 enable clear register. Writing '0' has no effect"] +pub type CH1_W<'a, const O: u8> = crate::BitWriter1C<'a, u32, CHENCLR_SPEC, CH1_AW, O>; +impl<'a, const O: u8> CH1_W<'a, O> { + #[doc = "Write: disable channel"] + #[inline(always)] + pub fn clear(self) -> &'a mut W { + self.variant(CH1_AW::CLEAR) + } +} +#[doc = "Field `CH2` reader - Channel 2 enable clear register. Writing '0' has no effect"] +pub type CH2_R = crate::BitReader; +#[doc = "Channel 2 enable clear register. Writing '0' has no effect\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum CH2_A { + #[doc = "0: Read: channel disabled"] + DISABLED = 0, + #[doc = "1: Read: channel enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: CH2_A) -> Self { + variant as u8 != 0 + } +} +impl CH2_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> CH2_A { + match self.bits { + false => CH2_A::DISABLED, + true => CH2_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == CH2_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == CH2_A::ENABLED + } +} +#[doc = "Channel 2 enable clear register. Writing '0' has no effect\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum CH2_AW { + #[doc = "1: Write: disable channel"] + CLEAR = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: CH2_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `CH2` writer - Channel 2 enable clear register. Writing '0' has no effect"] +pub type CH2_W<'a, const O: u8> = crate::BitWriter1C<'a, u32, CHENCLR_SPEC, CH2_AW, O>; +impl<'a, const O: u8> CH2_W<'a, O> { + #[doc = "Write: disable channel"] + #[inline(always)] + pub fn clear(self) -> &'a mut W { + self.variant(CH2_AW::CLEAR) + } +} +#[doc = "Field `CH3` reader - Channel 3 enable clear register. Writing '0' has no effect"] +pub type CH3_R = crate::BitReader; +#[doc = "Channel 3 enable clear register. Writing '0' has no effect\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum CH3_A { + #[doc = "0: Read: channel disabled"] + DISABLED = 0, + #[doc = "1: Read: channel enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: CH3_A) -> Self { + variant as u8 != 0 + } +} +impl CH3_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> CH3_A { + match self.bits { + false => CH3_A::DISABLED, + true => CH3_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == CH3_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == CH3_A::ENABLED + } +} +#[doc = "Channel 3 enable clear register. Writing '0' has no effect\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum CH3_AW { + #[doc = "1: Write: disable channel"] + CLEAR = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: CH3_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `CH3` writer - Channel 3 enable clear register. Writing '0' has no effect"] +pub type CH3_W<'a, const O: u8> = crate::BitWriter1C<'a, u32, CHENCLR_SPEC, CH3_AW, O>; +impl<'a, const O: u8> CH3_W<'a, O> { + #[doc = "Write: disable channel"] + #[inline(always)] + pub fn clear(self) -> &'a mut W { + self.variant(CH3_AW::CLEAR) + } +} +#[doc = "Field `CH4` reader - Channel 4 enable clear register. Writing '0' has no effect"] +pub type CH4_R = crate::BitReader; +#[doc = "Channel 4 enable clear register. Writing '0' has no effect\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum CH4_A { + #[doc = "0: Read: channel disabled"] + DISABLED = 0, + #[doc = "1: Read: channel enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: CH4_A) -> Self { + variant as u8 != 0 + } +} +impl CH4_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> CH4_A { + match self.bits { + false => CH4_A::DISABLED, + true => CH4_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == CH4_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == CH4_A::ENABLED + } +} +#[doc = "Channel 4 enable clear register. Writing '0' has no effect\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum CH4_AW { + #[doc = "1: Write: disable channel"] + CLEAR = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: CH4_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `CH4` writer - Channel 4 enable clear register. Writing '0' has no effect"] +pub type CH4_W<'a, const O: u8> = crate::BitWriter1C<'a, u32, CHENCLR_SPEC, CH4_AW, O>; +impl<'a, const O: u8> CH4_W<'a, O> { + #[doc = "Write: disable channel"] + #[inline(always)] + pub fn clear(self) -> &'a mut W { + self.variant(CH4_AW::CLEAR) + } +} +#[doc = "Field `CH5` reader - Channel 5 enable clear register. Writing '0' has no effect"] +pub type CH5_R = crate::BitReader; +#[doc = "Channel 5 enable clear register. Writing '0' has no effect\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum CH5_A { + #[doc = "0: Read: channel disabled"] + DISABLED = 0, + #[doc = "1: Read: channel enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: CH5_A) -> Self { + variant as u8 != 0 + } +} +impl CH5_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> CH5_A { + match self.bits { + false => CH5_A::DISABLED, + true => CH5_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == CH5_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == CH5_A::ENABLED + } +} +#[doc = "Channel 5 enable clear register. Writing '0' has no effect\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum CH5_AW { + #[doc = "1: Write: disable channel"] + CLEAR = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: CH5_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `CH5` writer - Channel 5 enable clear register. Writing '0' has no effect"] +pub type CH5_W<'a, const O: u8> = crate::BitWriter1C<'a, u32, CHENCLR_SPEC, CH5_AW, O>; +impl<'a, const O: u8> CH5_W<'a, O> { + #[doc = "Write: disable channel"] + #[inline(always)] + pub fn clear(self) -> &'a mut W { + self.variant(CH5_AW::CLEAR) + } +} +#[doc = "Field `CH6` reader - Channel 6 enable clear register. Writing '0' has no effect"] +pub type CH6_R = crate::BitReader; +#[doc = "Channel 6 enable clear register. Writing '0' has no effect\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum CH6_A { + #[doc = "0: Read: channel disabled"] + DISABLED = 0, + #[doc = "1: Read: channel enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: CH6_A) -> Self { + variant as u8 != 0 + } +} +impl CH6_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> CH6_A { + match self.bits { + false => CH6_A::DISABLED, + true => CH6_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == CH6_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == CH6_A::ENABLED + } +} +#[doc = "Channel 6 enable clear register. Writing '0' has no effect\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum CH6_AW { + #[doc = "1: Write: disable channel"] + CLEAR = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: CH6_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `CH6` writer - Channel 6 enable clear register. Writing '0' has no effect"] +pub type CH6_W<'a, const O: u8> = crate::BitWriter1C<'a, u32, CHENCLR_SPEC, CH6_AW, O>; +impl<'a, const O: u8> CH6_W<'a, O> { + #[doc = "Write: disable channel"] + #[inline(always)] + pub fn clear(self) -> &'a mut W { + self.variant(CH6_AW::CLEAR) + } +} +#[doc = "Field `CH7` reader - Channel 7 enable clear register. Writing '0' has no effect"] +pub type CH7_R = crate::BitReader; +#[doc = "Channel 7 enable clear register. Writing '0' has no effect\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum CH7_A { + #[doc = "0: Read: channel disabled"] + DISABLED = 0, + #[doc = "1: Read: channel enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: CH7_A) -> Self { + variant as u8 != 0 + } +} +impl CH7_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> CH7_A { + match self.bits { + false => CH7_A::DISABLED, + true => CH7_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == CH7_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == CH7_A::ENABLED + } +} +#[doc = "Channel 7 enable clear register. Writing '0' has no effect\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum CH7_AW { + #[doc = "1: Write: disable channel"] + CLEAR = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: CH7_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `CH7` writer - Channel 7 enable clear register. Writing '0' has no effect"] +pub type CH7_W<'a, const O: u8> = crate::BitWriter1C<'a, u32, CHENCLR_SPEC, CH7_AW, O>; +impl<'a, const O: u8> CH7_W<'a, O> { + #[doc = "Write: disable channel"] + #[inline(always)] + pub fn clear(self) -> &'a mut W { + self.variant(CH7_AW::CLEAR) + } +} +#[doc = "Field `CH8` reader - Channel 8 enable clear register. Writing '0' has no effect"] +pub type CH8_R = crate::BitReader; +#[doc = "Channel 8 enable clear register. Writing '0' has no effect\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum CH8_A { + #[doc = "0: Read: channel disabled"] + DISABLED = 0, + #[doc = "1: Read: channel enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: CH8_A) -> Self { + variant as u8 != 0 + } +} +impl CH8_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> CH8_A { + match self.bits { + false => CH8_A::DISABLED, + true => CH8_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == CH8_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == CH8_A::ENABLED + } +} +#[doc = "Channel 8 enable clear register. Writing '0' has no effect\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum CH8_AW { + #[doc = "1: Write: disable channel"] + CLEAR = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: CH8_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `CH8` writer - Channel 8 enable clear register. Writing '0' has no effect"] +pub type CH8_W<'a, const O: u8> = crate::BitWriter1C<'a, u32, CHENCLR_SPEC, CH8_AW, O>; +impl<'a, const O: u8> CH8_W<'a, O> { + #[doc = "Write: disable channel"] + #[inline(always)] + pub fn clear(self) -> &'a mut W { + self.variant(CH8_AW::CLEAR) + } +} +#[doc = "Field `CH9` reader - Channel 9 enable clear register. Writing '0' has no effect"] +pub type CH9_R = crate::BitReader; +#[doc = "Channel 9 enable clear register. Writing '0' has no effect\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum CH9_A { + #[doc = "0: Read: channel disabled"] + DISABLED = 0, + #[doc = "1: Read: channel enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: CH9_A) -> Self { + variant as u8 != 0 + } +} +impl CH9_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> CH9_A { + match self.bits { + false => CH9_A::DISABLED, + true => CH9_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == CH9_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == CH9_A::ENABLED + } +} +#[doc = "Channel 9 enable clear register. Writing '0' has no effect\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum CH9_AW { + #[doc = "1: Write: disable channel"] + CLEAR = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: CH9_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `CH9` writer - Channel 9 enable clear register. Writing '0' has no effect"] +pub type CH9_W<'a, const O: u8> = crate::BitWriter1C<'a, u32, CHENCLR_SPEC, CH9_AW, O>; +impl<'a, const O: u8> CH9_W<'a, O> { + #[doc = "Write: disable channel"] + #[inline(always)] + pub fn clear(self) -> &'a mut W { + self.variant(CH9_AW::CLEAR) + } +} +#[doc = "Field `CH10` reader - Channel 10 enable clear register. Writing '0' has no effect"] +pub type CH10_R = crate::BitReader; +#[doc = "Channel 10 enable clear register. Writing '0' has no effect\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum CH10_A { + #[doc = "0: Read: channel disabled"] + DISABLED = 0, + #[doc = "1: Read: channel enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: CH10_A) -> Self { + variant as u8 != 0 + } +} +impl CH10_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> CH10_A { + match self.bits { + false => CH10_A::DISABLED, + true => CH10_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == CH10_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == CH10_A::ENABLED + } +} +#[doc = "Channel 10 enable clear register. Writing '0' has no effect\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum CH10_AW { + #[doc = "1: Write: disable channel"] + CLEAR = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: CH10_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `CH10` writer - Channel 10 enable clear register. Writing '0' has no effect"] +pub type CH10_W<'a, const O: u8> = crate::BitWriter1C<'a, u32, CHENCLR_SPEC, CH10_AW, O>; +impl<'a, const O: u8> CH10_W<'a, O> { + #[doc = "Write: disable channel"] + #[inline(always)] + pub fn clear(self) -> &'a mut W { + self.variant(CH10_AW::CLEAR) + } +} +#[doc = "Field `CH11` reader - Channel 11 enable clear register. Writing '0' has no effect"] +pub type CH11_R = crate::BitReader; +#[doc = "Channel 11 enable clear register. Writing '0' has no effect\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum CH11_A { + #[doc = "0: Read: channel disabled"] + DISABLED = 0, + #[doc = "1: Read: channel enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: CH11_A) -> Self { + variant as u8 != 0 + } +} +impl CH11_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> CH11_A { + match self.bits { + false => CH11_A::DISABLED, + true => CH11_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == CH11_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == CH11_A::ENABLED + } +} +#[doc = "Channel 11 enable clear register. Writing '0' has no effect\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum CH11_AW { + #[doc = "1: Write: disable channel"] + CLEAR = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: CH11_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `CH11` writer - Channel 11 enable clear register. Writing '0' has no effect"] +pub type CH11_W<'a, const O: u8> = crate::BitWriter1C<'a, u32, CHENCLR_SPEC, CH11_AW, O>; +impl<'a, const O: u8> CH11_W<'a, O> { + #[doc = "Write: disable channel"] + #[inline(always)] + pub fn clear(self) -> &'a mut W { + self.variant(CH11_AW::CLEAR) + } +} +#[doc = "Field `CH12` reader - Channel 12 enable clear register. Writing '0' has no effect"] +pub type CH12_R = crate::BitReader; +#[doc = "Channel 12 enable clear register. Writing '0' has no effect\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum CH12_A { + #[doc = "0: Read: channel disabled"] + DISABLED = 0, + #[doc = "1: Read: channel enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: CH12_A) -> Self { + variant as u8 != 0 + } +} +impl CH12_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> CH12_A { + match self.bits { + false => CH12_A::DISABLED, + true => CH12_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == CH12_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == CH12_A::ENABLED + } +} +#[doc = "Channel 12 enable clear register. Writing '0' has no effect\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum CH12_AW { + #[doc = "1: Write: disable channel"] + CLEAR = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: CH12_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `CH12` writer - Channel 12 enable clear register. Writing '0' has no effect"] +pub type CH12_W<'a, const O: u8> = crate::BitWriter1C<'a, u32, CHENCLR_SPEC, CH12_AW, O>; +impl<'a, const O: u8> CH12_W<'a, O> { + #[doc = "Write: disable channel"] + #[inline(always)] + pub fn clear(self) -> &'a mut W { + self.variant(CH12_AW::CLEAR) + } +} +#[doc = "Field `CH13` reader - Channel 13 enable clear register. Writing '0' has no effect"] +pub type CH13_R = crate::BitReader; +#[doc = "Channel 13 enable clear register. Writing '0' has no effect\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum CH13_A { + #[doc = "0: Read: channel disabled"] + DISABLED = 0, + #[doc = "1: Read: channel enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: CH13_A) -> Self { + variant as u8 != 0 + } +} +impl CH13_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> CH13_A { + match self.bits { + false => CH13_A::DISABLED, + true => CH13_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == CH13_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == CH13_A::ENABLED + } +} +#[doc = "Channel 13 enable clear register. Writing '0' has no effect\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum CH13_AW { + #[doc = "1: Write: disable channel"] + CLEAR = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: CH13_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `CH13` writer - Channel 13 enable clear register. Writing '0' has no effect"] +pub type CH13_W<'a, const O: u8> = crate::BitWriter1C<'a, u32, CHENCLR_SPEC, CH13_AW, O>; +impl<'a, const O: u8> CH13_W<'a, O> { + #[doc = "Write: disable channel"] + #[inline(always)] + pub fn clear(self) -> &'a mut W { + self.variant(CH13_AW::CLEAR) + } +} +#[doc = "Field `CH14` reader - Channel 14 enable clear register. Writing '0' has no effect"] +pub type CH14_R = crate::BitReader; +#[doc = "Channel 14 enable clear register. Writing '0' has no effect\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum CH14_A { + #[doc = "0: Read: channel disabled"] + DISABLED = 0, + #[doc = "1: Read: channel enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: CH14_A) -> Self { + variant as u8 != 0 + } +} +impl CH14_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> CH14_A { + match self.bits { + false => CH14_A::DISABLED, + true => CH14_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == CH14_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == CH14_A::ENABLED + } +} +#[doc = "Channel 14 enable clear register. Writing '0' has no effect\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum CH14_AW { + #[doc = "1: Write: disable channel"] + CLEAR = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: CH14_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `CH14` writer - Channel 14 enable clear register. Writing '0' has no effect"] +pub type CH14_W<'a, const O: u8> = crate::BitWriter1C<'a, u32, CHENCLR_SPEC, CH14_AW, O>; +impl<'a, const O: u8> CH14_W<'a, O> { + #[doc = "Write: disable channel"] + #[inline(always)] + pub fn clear(self) -> &'a mut W { + self.variant(CH14_AW::CLEAR) + } +} +#[doc = "Field `CH15` reader - Channel 15 enable clear register. Writing '0' has no effect"] +pub type CH15_R = crate::BitReader; +#[doc = "Channel 15 enable clear register. Writing '0' has no effect\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum CH15_A { + #[doc = "0: Read: channel disabled"] + DISABLED = 0, + #[doc = "1: Read: channel enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: CH15_A) -> Self { + variant as u8 != 0 + } +} +impl CH15_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> CH15_A { + match self.bits { + false => CH15_A::DISABLED, + true => CH15_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == CH15_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == CH15_A::ENABLED + } +} +#[doc = "Channel 15 enable clear register. Writing '0' has no effect\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum CH15_AW { + #[doc = "1: Write: disable channel"] + CLEAR = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: CH15_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `CH15` writer - Channel 15 enable clear register. Writing '0' has no effect"] +pub type CH15_W<'a, const O: u8> = crate::BitWriter1C<'a, u32, CHENCLR_SPEC, CH15_AW, O>; +impl<'a, const O: u8> CH15_W<'a, O> { + #[doc = "Write: disable channel"] + #[inline(always)] + pub fn clear(self) -> &'a mut W { + self.variant(CH15_AW::CLEAR) + } +} +#[doc = "Field `CH16` reader - Channel 16 enable clear register. Writing '0' has no effect"] +pub type CH16_R = crate::BitReader; +#[doc = "Channel 16 enable clear register. Writing '0' has no effect\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum CH16_A { + #[doc = "0: Read: channel disabled"] + DISABLED = 0, + #[doc = "1: Read: channel enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: CH16_A) -> Self { + variant as u8 != 0 + } +} +impl CH16_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> CH16_A { + match self.bits { + false => CH16_A::DISABLED, + true => CH16_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == CH16_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == CH16_A::ENABLED + } +} +#[doc = "Channel 16 enable clear register. Writing '0' has no effect\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum CH16_AW { + #[doc = "1: Write: disable channel"] + CLEAR = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: CH16_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `CH16` writer - Channel 16 enable clear register. Writing '0' has no effect"] +pub type CH16_W<'a, const O: u8> = crate::BitWriter1C<'a, u32, CHENCLR_SPEC, CH16_AW, O>; +impl<'a, const O: u8> CH16_W<'a, O> { + #[doc = "Write: disable channel"] + #[inline(always)] + pub fn clear(self) -> &'a mut W { + self.variant(CH16_AW::CLEAR) + } +} +#[doc = "Field `CH17` reader - Channel 17 enable clear register. Writing '0' has no effect"] +pub type CH17_R = crate::BitReader; +#[doc = "Channel 17 enable clear register. Writing '0' has no effect\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum CH17_A { + #[doc = "0: Read: channel disabled"] + DISABLED = 0, + #[doc = "1: Read: channel enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: CH17_A) -> Self { + variant as u8 != 0 + } +} +impl CH17_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> CH17_A { + match self.bits { + false => CH17_A::DISABLED, + true => CH17_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == CH17_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == CH17_A::ENABLED + } +} +#[doc = "Channel 17 enable clear register. Writing '0' has no effect\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum CH17_AW { + #[doc = "1: Write: disable channel"] + CLEAR = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: CH17_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `CH17` writer - Channel 17 enable clear register. Writing '0' has no effect"] +pub type CH17_W<'a, const O: u8> = crate::BitWriter1C<'a, u32, CHENCLR_SPEC, CH17_AW, O>; +impl<'a, const O: u8> CH17_W<'a, O> { + #[doc = "Write: disable channel"] + #[inline(always)] + pub fn clear(self) -> &'a mut W { + self.variant(CH17_AW::CLEAR) + } +} +#[doc = "Field `CH18` reader - Channel 18 enable clear register. Writing '0' has no effect"] +pub type CH18_R = crate::BitReader; +#[doc = "Channel 18 enable clear register. Writing '0' has no effect\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum CH18_A { + #[doc = "0: Read: channel disabled"] + DISABLED = 0, + #[doc = "1: Read: channel enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: CH18_A) -> Self { + variant as u8 != 0 + } +} +impl CH18_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> CH18_A { + match self.bits { + false => CH18_A::DISABLED, + true => CH18_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == CH18_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == CH18_A::ENABLED + } +} +#[doc = "Channel 18 enable clear register. Writing '0' has no effect\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum CH18_AW { + #[doc = "1: Write: disable channel"] + CLEAR = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: CH18_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `CH18` writer - Channel 18 enable clear register. Writing '0' has no effect"] +pub type CH18_W<'a, const O: u8> = crate::BitWriter1C<'a, u32, CHENCLR_SPEC, CH18_AW, O>; +impl<'a, const O: u8> CH18_W<'a, O> { + #[doc = "Write: disable channel"] + #[inline(always)] + pub fn clear(self) -> &'a mut W { + self.variant(CH18_AW::CLEAR) + } +} +#[doc = "Field `CH19` reader - Channel 19 enable clear register. Writing '0' has no effect"] +pub type CH19_R = crate::BitReader; +#[doc = "Channel 19 enable clear register. Writing '0' has no effect\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum CH19_A { + #[doc = "0: Read: channel disabled"] + DISABLED = 0, + #[doc = "1: Read: channel enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: CH19_A) -> Self { + variant as u8 != 0 + } +} +impl CH19_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> CH19_A { + match self.bits { + false => CH19_A::DISABLED, + true => CH19_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == CH19_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == CH19_A::ENABLED + } +} +#[doc = "Channel 19 enable clear register. Writing '0' has no effect\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum CH19_AW { + #[doc = "1: Write: disable channel"] + CLEAR = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: CH19_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `CH19` writer - Channel 19 enable clear register. Writing '0' has no effect"] +pub type CH19_W<'a, const O: u8> = crate::BitWriter1C<'a, u32, CHENCLR_SPEC, CH19_AW, O>; +impl<'a, const O: u8> CH19_W<'a, O> { + #[doc = "Write: disable channel"] + #[inline(always)] + pub fn clear(self) -> &'a mut W { + self.variant(CH19_AW::CLEAR) + } +} +#[doc = "Field `CH20` reader - Channel 20 enable clear register. Writing '0' has no effect"] +pub type CH20_R = crate::BitReader; +#[doc = "Channel 20 enable clear register. Writing '0' has no effect\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum CH20_A { + #[doc = "0: Read: channel disabled"] + DISABLED = 0, + #[doc = "1: Read: channel enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: CH20_A) -> Self { + variant as u8 != 0 + } +} +impl CH20_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> CH20_A { + match self.bits { + false => CH20_A::DISABLED, + true => CH20_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == CH20_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == CH20_A::ENABLED + } +} +#[doc = "Channel 20 enable clear register. Writing '0' has no effect\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum CH20_AW { + #[doc = "1: Write: disable channel"] + CLEAR = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: CH20_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `CH20` writer - Channel 20 enable clear register. Writing '0' has no effect"] +pub type CH20_W<'a, const O: u8> = crate::BitWriter1C<'a, u32, CHENCLR_SPEC, CH20_AW, O>; +impl<'a, const O: u8> CH20_W<'a, O> { + #[doc = "Write: disable channel"] + #[inline(always)] + pub fn clear(self) -> &'a mut W { + self.variant(CH20_AW::CLEAR) + } +} +#[doc = "Field `CH21` reader - Channel 21 enable clear register. Writing '0' has no effect"] +pub type CH21_R = crate::BitReader; +#[doc = "Channel 21 enable clear register. Writing '0' has no effect\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum CH21_A { + #[doc = "0: Read: channel disabled"] + DISABLED = 0, + #[doc = "1: Read: channel enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: CH21_A) -> Self { + variant as u8 != 0 + } +} +impl CH21_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> CH21_A { + match self.bits { + false => CH21_A::DISABLED, + true => CH21_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == CH21_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == CH21_A::ENABLED + } +} +#[doc = "Channel 21 enable clear register. Writing '0' has no effect\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum CH21_AW { + #[doc = "1: Write: disable channel"] + CLEAR = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: CH21_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `CH21` writer - Channel 21 enable clear register. Writing '0' has no effect"] +pub type CH21_W<'a, const O: u8> = crate::BitWriter1C<'a, u32, CHENCLR_SPEC, CH21_AW, O>; +impl<'a, const O: u8> CH21_W<'a, O> { + #[doc = "Write: disable channel"] + #[inline(always)] + pub fn clear(self) -> &'a mut W { + self.variant(CH21_AW::CLEAR) + } +} +#[doc = "Field `CH22` reader - Channel 22 enable clear register. Writing '0' has no effect"] +pub type CH22_R = crate::BitReader; +#[doc = "Channel 22 enable clear register. Writing '0' has no effect\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum CH22_A { + #[doc = "0: Read: channel disabled"] + DISABLED = 0, + #[doc = "1: Read: channel enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: CH22_A) -> Self { + variant as u8 != 0 + } +} +impl CH22_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> CH22_A { + match self.bits { + false => CH22_A::DISABLED, + true => CH22_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == CH22_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == CH22_A::ENABLED + } +} +#[doc = "Channel 22 enable clear register. Writing '0' has no effect\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum CH22_AW { + #[doc = "1: Write: disable channel"] + CLEAR = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: CH22_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `CH22` writer - Channel 22 enable clear register. Writing '0' has no effect"] +pub type CH22_W<'a, const O: u8> = crate::BitWriter1C<'a, u32, CHENCLR_SPEC, CH22_AW, O>; +impl<'a, const O: u8> CH22_W<'a, O> { + #[doc = "Write: disable channel"] + #[inline(always)] + pub fn clear(self) -> &'a mut W { + self.variant(CH22_AW::CLEAR) + } +} +#[doc = "Field `CH23` reader - Channel 23 enable clear register. Writing '0' has no effect"] +pub type CH23_R = crate::BitReader; +#[doc = "Channel 23 enable clear register. Writing '0' has no effect\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum CH23_A { + #[doc = "0: Read: channel disabled"] + DISABLED = 0, + #[doc = "1: Read: channel enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: CH23_A) -> Self { + variant as u8 != 0 + } +} +impl CH23_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> CH23_A { + match self.bits { + false => CH23_A::DISABLED, + true => CH23_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == CH23_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == CH23_A::ENABLED + } +} +#[doc = "Channel 23 enable clear register. Writing '0' has no effect\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum CH23_AW { + #[doc = "1: Write: disable channel"] + CLEAR = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: CH23_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `CH23` writer - Channel 23 enable clear register. Writing '0' has no effect"] +pub type CH23_W<'a, const O: u8> = crate::BitWriter1C<'a, u32, CHENCLR_SPEC, CH23_AW, O>; +impl<'a, const O: u8> CH23_W<'a, O> { + #[doc = "Write: disable channel"] + #[inline(always)] + pub fn clear(self) -> &'a mut W { + self.variant(CH23_AW::CLEAR) + } +} +#[doc = "Field `CH24` reader - Channel 24 enable clear register. Writing '0' has no effect"] +pub type CH24_R = crate::BitReader; +#[doc = "Channel 24 enable clear register. Writing '0' has no effect\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum CH24_A { + #[doc = "0: Read: channel disabled"] + DISABLED = 0, + #[doc = "1: Read: channel enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: CH24_A) -> Self { + variant as u8 != 0 + } +} +impl CH24_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> CH24_A { + match self.bits { + false => CH24_A::DISABLED, + true => CH24_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == CH24_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == CH24_A::ENABLED + } +} +#[doc = "Channel 24 enable clear register. Writing '0' has no effect\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum CH24_AW { + #[doc = "1: Write: disable channel"] + CLEAR = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: CH24_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `CH24` writer - Channel 24 enable clear register. Writing '0' has no effect"] +pub type CH24_W<'a, const O: u8> = crate::BitWriter1C<'a, u32, CHENCLR_SPEC, CH24_AW, O>; +impl<'a, const O: u8> CH24_W<'a, O> { + #[doc = "Write: disable channel"] + #[inline(always)] + pub fn clear(self) -> &'a mut W { + self.variant(CH24_AW::CLEAR) + } +} +#[doc = "Field `CH25` reader - Channel 25 enable clear register. Writing '0' has no effect"] +pub type CH25_R = crate::BitReader; +#[doc = "Channel 25 enable clear register. Writing '0' has no effect\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum CH25_A { + #[doc = "0: Read: channel disabled"] + DISABLED = 0, + #[doc = "1: Read: channel enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: CH25_A) -> Self { + variant as u8 != 0 + } +} +impl CH25_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> CH25_A { + match self.bits { + false => CH25_A::DISABLED, + true => CH25_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == CH25_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == CH25_A::ENABLED + } +} +#[doc = "Channel 25 enable clear register. Writing '0' has no effect\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum CH25_AW { + #[doc = "1: Write: disable channel"] + CLEAR = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: CH25_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `CH25` writer - Channel 25 enable clear register. Writing '0' has no effect"] +pub type CH25_W<'a, const O: u8> = crate::BitWriter1C<'a, u32, CHENCLR_SPEC, CH25_AW, O>; +impl<'a, const O: u8> CH25_W<'a, O> { + #[doc = "Write: disable channel"] + #[inline(always)] + pub fn clear(self) -> &'a mut W { + self.variant(CH25_AW::CLEAR) + } +} +#[doc = "Field `CH26` reader - Channel 26 enable clear register. Writing '0' has no effect"] +pub type CH26_R = crate::BitReader; +#[doc = "Channel 26 enable clear register. Writing '0' has no effect\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum CH26_A { + #[doc = "0: Read: channel disabled"] + DISABLED = 0, + #[doc = "1: Read: channel enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: CH26_A) -> Self { + variant as u8 != 0 + } +} +impl CH26_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> CH26_A { + match self.bits { + false => CH26_A::DISABLED, + true => CH26_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == CH26_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == CH26_A::ENABLED + } +} +#[doc = "Channel 26 enable clear register. Writing '0' has no effect\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum CH26_AW { + #[doc = "1: Write: disable channel"] + CLEAR = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: CH26_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `CH26` writer - Channel 26 enable clear register. Writing '0' has no effect"] +pub type CH26_W<'a, const O: u8> = crate::BitWriter1C<'a, u32, CHENCLR_SPEC, CH26_AW, O>; +impl<'a, const O: u8> CH26_W<'a, O> { + #[doc = "Write: disable channel"] + #[inline(always)] + pub fn clear(self) -> &'a mut W { + self.variant(CH26_AW::CLEAR) + } +} +#[doc = "Field `CH27` reader - Channel 27 enable clear register. Writing '0' has no effect"] +pub type CH27_R = crate::BitReader; +#[doc = "Channel 27 enable clear register. Writing '0' has no effect\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum CH27_A { + #[doc = "0: Read: channel disabled"] + DISABLED = 0, + #[doc = "1: Read: channel enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: CH27_A) -> Self { + variant as u8 != 0 + } +} +impl CH27_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> CH27_A { + match self.bits { + false => CH27_A::DISABLED, + true => CH27_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == CH27_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == CH27_A::ENABLED + } +} +#[doc = "Channel 27 enable clear register. Writing '0' has no effect\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum CH27_AW { + #[doc = "1: Write: disable channel"] + CLEAR = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: CH27_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `CH27` writer - Channel 27 enable clear register. Writing '0' has no effect"] +pub type CH27_W<'a, const O: u8> = crate::BitWriter1C<'a, u32, CHENCLR_SPEC, CH27_AW, O>; +impl<'a, const O: u8> CH27_W<'a, O> { + #[doc = "Write: disable channel"] + #[inline(always)] + pub fn clear(self) -> &'a mut W { + self.variant(CH27_AW::CLEAR) + } +} +#[doc = "Field `CH28` reader - Channel 28 enable clear register. Writing '0' has no effect"] +pub type CH28_R = crate::BitReader; +#[doc = "Channel 28 enable clear register. Writing '0' has no effect\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum CH28_A { + #[doc = "0: Read: channel disabled"] + DISABLED = 0, + #[doc = "1: Read: channel enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: CH28_A) -> Self { + variant as u8 != 0 + } +} +impl CH28_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> CH28_A { + match self.bits { + false => CH28_A::DISABLED, + true => CH28_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == CH28_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == CH28_A::ENABLED + } +} +#[doc = "Channel 28 enable clear register. Writing '0' has no effect\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum CH28_AW { + #[doc = "1: Write: disable channel"] + CLEAR = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: CH28_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `CH28` writer - Channel 28 enable clear register. Writing '0' has no effect"] +pub type CH28_W<'a, const O: u8> = crate::BitWriter1C<'a, u32, CHENCLR_SPEC, CH28_AW, O>; +impl<'a, const O: u8> CH28_W<'a, O> { + #[doc = "Write: disable channel"] + #[inline(always)] + pub fn clear(self) -> &'a mut W { + self.variant(CH28_AW::CLEAR) + } +} +#[doc = "Field `CH29` reader - Channel 29 enable clear register. Writing '0' has no effect"] +pub type CH29_R = crate::BitReader; +#[doc = "Channel 29 enable clear register. Writing '0' has no effect\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum CH29_A { + #[doc = "0: Read: channel disabled"] + DISABLED = 0, + #[doc = "1: Read: channel enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: CH29_A) -> Self { + variant as u8 != 0 + } +} +impl CH29_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> CH29_A { + match self.bits { + false => CH29_A::DISABLED, + true => CH29_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == CH29_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == CH29_A::ENABLED + } +} +#[doc = "Channel 29 enable clear register. Writing '0' has no effect\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum CH29_AW { + #[doc = "1: Write: disable channel"] + CLEAR = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: CH29_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `CH29` writer - Channel 29 enable clear register. Writing '0' has no effect"] +pub type CH29_W<'a, const O: u8> = crate::BitWriter1C<'a, u32, CHENCLR_SPEC, CH29_AW, O>; +impl<'a, const O: u8> CH29_W<'a, O> { + #[doc = "Write: disable channel"] + #[inline(always)] + pub fn clear(self) -> &'a mut W { + self.variant(CH29_AW::CLEAR) + } +} +#[doc = "Field `CH30` reader - Channel 30 enable clear register. Writing '0' has no effect"] +pub type CH30_R = crate::BitReader; +#[doc = "Channel 30 enable clear register. Writing '0' has no effect\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum CH30_A { + #[doc = "0: Read: channel disabled"] + DISABLED = 0, + #[doc = "1: Read: channel enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: CH30_A) -> Self { + variant as u8 != 0 + } +} +impl CH30_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> CH30_A { + match self.bits { + false => CH30_A::DISABLED, + true => CH30_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == CH30_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == CH30_A::ENABLED + } +} +#[doc = "Channel 30 enable clear register. Writing '0' has no effect\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum CH30_AW { + #[doc = "1: Write: disable channel"] + CLEAR = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: CH30_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `CH30` writer - Channel 30 enable clear register. Writing '0' has no effect"] +pub type CH30_W<'a, const O: u8> = crate::BitWriter1C<'a, u32, CHENCLR_SPEC, CH30_AW, O>; +impl<'a, const O: u8> CH30_W<'a, O> { + #[doc = "Write: disable channel"] + #[inline(always)] + pub fn clear(self) -> &'a mut W { + self.variant(CH30_AW::CLEAR) + } +} +#[doc = "Field `CH31` reader - Channel 31 enable clear register. Writing '0' has no effect"] +pub type CH31_R = crate::BitReader; +#[doc = "Channel 31 enable clear register. Writing '0' has no effect\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum CH31_A { + #[doc = "0: Read: channel disabled"] + DISABLED = 0, + #[doc = "1: Read: channel enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: CH31_A) -> Self { + variant as u8 != 0 + } +} +impl CH31_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> CH31_A { + match self.bits { + false => CH31_A::DISABLED, + true => CH31_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == CH31_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == CH31_A::ENABLED + } +} +#[doc = "Channel 31 enable clear register. Writing '0' has no effect\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum CH31_AW { + #[doc = "1: Write: disable channel"] + CLEAR = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: CH31_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `CH31` writer - Channel 31 enable clear register. Writing '0' has no effect"] +pub type CH31_W<'a, const O: u8> = crate::BitWriter1C<'a, u32, CHENCLR_SPEC, CH31_AW, O>; +impl<'a, const O: u8> CH31_W<'a, O> { + #[doc = "Write: disable channel"] + #[inline(always)] + pub fn clear(self) -> &'a mut W { + self.variant(CH31_AW::CLEAR) + } +} +impl R { + #[doc = "Bit 0 - Channel 0 enable clear register. Writing '0' has no effect"] + #[inline(always)] + pub fn ch0(&self) -> CH0_R { + CH0_R::new((self.bits & 1) != 0) + } + #[doc = "Bit 1 - Channel 1 enable clear register. Writing '0' has no effect"] + #[inline(always)] + pub fn ch1(&self) -> CH1_R { + CH1_R::new(((self.bits >> 1) & 1) != 0) + } + #[doc = "Bit 2 - Channel 2 enable clear register. Writing '0' has no effect"] + #[inline(always)] + pub fn ch2(&self) -> CH2_R { + CH2_R::new(((self.bits >> 2) & 1) != 0) + } + #[doc = "Bit 3 - Channel 3 enable clear register. Writing '0' has no effect"] + #[inline(always)] + pub fn ch3(&self) -> CH3_R { + CH3_R::new(((self.bits >> 3) & 1) != 0) + } + #[doc = "Bit 4 - Channel 4 enable clear register. Writing '0' has no effect"] + #[inline(always)] + pub fn ch4(&self) -> CH4_R { + CH4_R::new(((self.bits >> 4) & 1) != 0) + } + #[doc = "Bit 5 - Channel 5 enable clear register. Writing '0' has no effect"] + #[inline(always)] + pub fn ch5(&self) -> CH5_R { + CH5_R::new(((self.bits >> 5) & 1) != 0) + } + #[doc = "Bit 6 - Channel 6 enable clear register. Writing '0' has no effect"] + #[inline(always)] + pub fn ch6(&self) -> CH6_R { + CH6_R::new(((self.bits >> 6) & 1) != 0) + } + #[doc = "Bit 7 - Channel 7 enable clear register. Writing '0' has no effect"] + #[inline(always)] + pub fn ch7(&self) -> CH7_R { + CH7_R::new(((self.bits >> 7) & 1) != 0) + } + #[doc = "Bit 8 - Channel 8 enable clear register. Writing '0' has no effect"] + #[inline(always)] + pub fn ch8(&self) -> CH8_R { + CH8_R::new(((self.bits >> 8) & 1) != 0) + } + #[doc = "Bit 9 - Channel 9 enable clear register. Writing '0' has no effect"] + #[inline(always)] + pub fn ch9(&self) -> CH9_R { + CH9_R::new(((self.bits >> 9) & 1) != 0) + } + #[doc = "Bit 10 - Channel 10 enable clear register. Writing '0' has no effect"] + #[inline(always)] + pub fn ch10(&self) -> CH10_R { + CH10_R::new(((self.bits >> 10) & 1) != 0) + } + #[doc = "Bit 11 - Channel 11 enable clear register. Writing '0' has no effect"] + #[inline(always)] + pub fn ch11(&self) -> CH11_R { + CH11_R::new(((self.bits >> 11) & 1) != 0) + } + #[doc = "Bit 12 - Channel 12 enable clear register. Writing '0' has no effect"] + #[inline(always)] + pub fn ch12(&self) -> CH12_R { + CH12_R::new(((self.bits >> 12) & 1) != 0) + } + #[doc = "Bit 13 - Channel 13 enable clear register. Writing '0' has no effect"] + #[inline(always)] + pub fn ch13(&self) -> CH13_R { + CH13_R::new(((self.bits >> 13) & 1) != 0) + } + #[doc = "Bit 14 - Channel 14 enable clear register. Writing '0' has no effect"] + #[inline(always)] + pub fn ch14(&self) -> CH14_R { + CH14_R::new(((self.bits >> 14) & 1) != 0) + } + #[doc = "Bit 15 - Channel 15 enable clear register. Writing '0' has no effect"] + #[inline(always)] + pub fn ch15(&self) -> CH15_R { + CH15_R::new(((self.bits >> 15) & 1) != 0) + } + #[doc = "Bit 16 - Channel 16 enable clear register. Writing '0' has no effect"] + #[inline(always)] + pub fn ch16(&self) -> CH16_R { + CH16_R::new(((self.bits >> 16) & 1) != 0) + } + #[doc = "Bit 17 - Channel 17 enable clear register. Writing '0' has no effect"] + #[inline(always)] + pub fn ch17(&self) -> CH17_R { + CH17_R::new(((self.bits >> 17) & 1) != 0) + } + #[doc = "Bit 18 - Channel 18 enable clear register. Writing '0' has no effect"] + #[inline(always)] + pub fn ch18(&self) -> CH18_R { + CH18_R::new(((self.bits >> 18) & 1) != 0) + } + #[doc = "Bit 19 - Channel 19 enable clear register. Writing '0' has no effect"] + #[inline(always)] + pub fn ch19(&self) -> CH19_R { + CH19_R::new(((self.bits >> 19) & 1) != 0) + } + #[doc = "Bit 20 - Channel 20 enable clear register. Writing '0' has no effect"] + #[inline(always)] + pub fn ch20(&self) -> CH20_R { + CH20_R::new(((self.bits >> 20) & 1) != 0) + } + #[doc = "Bit 21 - Channel 21 enable clear register. Writing '0' has no effect"] + #[inline(always)] + pub fn ch21(&self) -> CH21_R { + CH21_R::new(((self.bits >> 21) & 1) != 0) + } + #[doc = "Bit 22 - Channel 22 enable clear register. Writing '0' has no effect"] + #[inline(always)] + pub fn ch22(&self) -> CH22_R { + CH22_R::new(((self.bits >> 22) & 1) != 0) + } + #[doc = "Bit 23 - Channel 23 enable clear register. Writing '0' has no effect"] + #[inline(always)] + pub fn ch23(&self) -> CH23_R { + CH23_R::new(((self.bits >> 23) & 1) != 0) + } + #[doc = "Bit 24 - Channel 24 enable clear register. Writing '0' has no effect"] + #[inline(always)] + pub fn ch24(&self) -> CH24_R { + CH24_R::new(((self.bits >> 24) & 1) != 0) + } + #[doc = "Bit 25 - Channel 25 enable clear register. Writing '0' has no effect"] + #[inline(always)] + pub fn ch25(&self) -> CH25_R { + CH25_R::new(((self.bits >> 25) & 1) != 0) + } + #[doc = "Bit 26 - Channel 26 enable clear register. Writing '0' has no effect"] + #[inline(always)] + pub fn ch26(&self) -> CH26_R { + CH26_R::new(((self.bits >> 26) & 1) != 0) + } + #[doc = "Bit 27 - Channel 27 enable clear register. Writing '0' has no effect"] + #[inline(always)] + pub fn ch27(&self) -> CH27_R { + CH27_R::new(((self.bits >> 27) & 1) != 0) + } + #[doc = "Bit 28 - Channel 28 enable clear register. Writing '0' has no effect"] + #[inline(always)] + pub fn ch28(&self) -> CH28_R { + CH28_R::new(((self.bits >> 28) & 1) != 0) + } + #[doc = "Bit 29 - Channel 29 enable clear register. Writing '0' has no effect"] + #[inline(always)] + pub fn ch29(&self) -> CH29_R { + CH29_R::new(((self.bits >> 29) & 1) != 0) + } + #[doc = "Bit 30 - Channel 30 enable clear register. Writing '0' has no effect"] + #[inline(always)] + pub fn ch30(&self) -> CH30_R { + CH30_R::new(((self.bits >> 30) & 1) != 0) + } + #[doc = "Bit 31 - Channel 31 enable clear register. Writing '0' has no effect"] + #[inline(always)] + pub fn ch31(&self) -> CH31_R { + CH31_R::new(((self.bits >> 31) & 1) != 0) + } +} +impl W { + #[doc = "Bit 0 - Channel 0 enable clear register. Writing '0' has no effect"] + #[inline(always)] + #[must_use] + pub fn ch0(&mut self) -> CH0_W<0> { + CH0_W::new(self) + } + #[doc = "Bit 1 - Channel 1 enable clear register. Writing '0' has no effect"] + #[inline(always)] + #[must_use] + pub fn ch1(&mut self) -> CH1_W<1> { + CH1_W::new(self) + } + #[doc = "Bit 2 - Channel 2 enable clear register. Writing '0' has no effect"] + #[inline(always)] + #[must_use] + pub fn ch2(&mut self) -> CH2_W<2> { + CH2_W::new(self) + } + #[doc = "Bit 3 - Channel 3 enable clear register. Writing '0' has no effect"] + #[inline(always)] + #[must_use] + pub fn ch3(&mut self) -> CH3_W<3> { + CH3_W::new(self) + } + #[doc = "Bit 4 - Channel 4 enable clear register. Writing '0' has no effect"] + #[inline(always)] + #[must_use] + pub fn ch4(&mut self) -> CH4_W<4> { + CH4_W::new(self) + } + #[doc = "Bit 5 - Channel 5 enable clear register. Writing '0' has no effect"] + #[inline(always)] + #[must_use] + pub fn ch5(&mut self) -> CH5_W<5> { + CH5_W::new(self) + } + #[doc = "Bit 6 - Channel 6 enable clear register. Writing '0' has no effect"] + #[inline(always)] + #[must_use] + pub fn ch6(&mut self) -> CH6_W<6> { + CH6_W::new(self) + } + #[doc = "Bit 7 - Channel 7 enable clear register. Writing '0' has no effect"] + #[inline(always)] + #[must_use] + pub fn ch7(&mut self) -> CH7_W<7> { + CH7_W::new(self) + } + #[doc = "Bit 8 - Channel 8 enable clear register. Writing '0' has no effect"] + #[inline(always)] + #[must_use] + pub fn ch8(&mut self) -> CH8_W<8> { + CH8_W::new(self) + } + #[doc = "Bit 9 - Channel 9 enable clear register. Writing '0' has no effect"] + #[inline(always)] + #[must_use] + pub fn ch9(&mut self) -> CH9_W<9> { + CH9_W::new(self) + } + #[doc = "Bit 10 - Channel 10 enable clear register. Writing '0' has no effect"] + #[inline(always)] + #[must_use] + pub fn ch10(&mut self) -> CH10_W<10> { + CH10_W::new(self) + } + #[doc = "Bit 11 - Channel 11 enable clear register. Writing '0' has no effect"] + #[inline(always)] + #[must_use] + pub fn ch11(&mut self) -> CH11_W<11> { + CH11_W::new(self) + } + #[doc = "Bit 12 - Channel 12 enable clear register. Writing '0' has no effect"] + #[inline(always)] + #[must_use] + pub fn ch12(&mut self) -> CH12_W<12> { + CH12_W::new(self) + } + #[doc = "Bit 13 - Channel 13 enable clear register. Writing '0' has no effect"] + #[inline(always)] + #[must_use] + pub fn ch13(&mut self) -> CH13_W<13> { + CH13_W::new(self) + } + #[doc = "Bit 14 - Channel 14 enable clear register. Writing '0' has no effect"] + #[inline(always)] + #[must_use] + pub fn ch14(&mut self) -> CH14_W<14> { + CH14_W::new(self) + } + #[doc = "Bit 15 - Channel 15 enable clear register. Writing '0' has no effect"] + #[inline(always)] + #[must_use] + pub fn ch15(&mut self) -> CH15_W<15> { + CH15_W::new(self) + } + #[doc = "Bit 16 - Channel 16 enable clear register. Writing '0' has no effect"] + #[inline(always)] + #[must_use] + pub fn ch16(&mut self) -> CH16_W<16> { + CH16_W::new(self) + } + #[doc = "Bit 17 - Channel 17 enable clear register. Writing '0' has no effect"] + #[inline(always)] + #[must_use] + pub fn ch17(&mut self) -> CH17_W<17> { + CH17_W::new(self) + } + #[doc = "Bit 18 - Channel 18 enable clear register. Writing '0' has no effect"] + #[inline(always)] + #[must_use] + pub fn ch18(&mut self) -> CH18_W<18> { + CH18_W::new(self) + } + #[doc = "Bit 19 - Channel 19 enable clear register. Writing '0' has no effect"] + #[inline(always)] + #[must_use] + pub fn ch19(&mut self) -> CH19_W<19> { + CH19_W::new(self) + } + #[doc = "Bit 20 - Channel 20 enable clear register. Writing '0' has no effect"] + #[inline(always)] + #[must_use] + pub fn ch20(&mut self) -> CH20_W<20> { + CH20_W::new(self) + } + #[doc = "Bit 21 - Channel 21 enable clear register. Writing '0' has no effect"] + #[inline(always)] + #[must_use] + pub fn ch21(&mut self) -> CH21_W<21> { + CH21_W::new(self) + } + #[doc = "Bit 22 - Channel 22 enable clear register. Writing '0' has no effect"] + #[inline(always)] + #[must_use] + pub fn ch22(&mut self) -> CH22_W<22> { + CH22_W::new(self) + } + #[doc = "Bit 23 - Channel 23 enable clear register. Writing '0' has no effect"] + #[inline(always)] + #[must_use] + pub fn ch23(&mut self) -> CH23_W<23> { + CH23_W::new(self) + } + #[doc = "Bit 24 - Channel 24 enable clear register. Writing '0' has no effect"] + #[inline(always)] + #[must_use] + pub fn ch24(&mut self) -> CH24_W<24> { + CH24_W::new(self) + } + #[doc = "Bit 25 - Channel 25 enable clear register. Writing '0' has no effect"] + #[inline(always)] + #[must_use] + pub fn ch25(&mut self) -> CH25_W<25> { + CH25_W::new(self) + } + #[doc = "Bit 26 - Channel 26 enable clear register. Writing '0' has no effect"] + #[inline(always)] + #[must_use] + pub fn ch26(&mut self) -> CH26_W<26> { + CH26_W::new(self) + } + #[doc = "Bit 27 - Channel 27 enable clear register. Writing '0' has no effect"] + #[inline(always)] + #[must_use] + pub fn ch27(&mut self) -> CH27_W<27> { + CH27_W::new(self) + } + #[doc = "Bit 28 - Channel 28 enable clear register. Writing '0' has no effect"] + #[inline(always)] + #[must_use] + pub fn ch28(&mut self) -> CH28_W<28> { + CH28_W::new(self) + } + #[doc = "Bit 29 - Channel 29 enable clear register. Writing '0' has no effect"] + #[inline(always)] + #[must_use] + pub fn ch29(&mut self) -> CH29_W<29> { + CH29_W::new(self) + } + #[doc = "Bit 30 - Channel 30 enable clear register. Writing '0' has no effect"] + #[inline(always)] + #[must_use] + pub fn ch30(&mut self) -> CH30_W<30> { + CH30_W::new(self) + } + #[doc = "Bit 31 - Channel 31 enable clear register. Writing '0' has no effect"] + #[inline(always)] + #[must_use] + pub fn ch31(&mut self) -> CH31_W<31> { + CH31_W::new(self) + } + #[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 = "Channel enable clear register\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 [chenclr](index.html) module"] +pub struct CHENCLR_SPEC; +impl crate::RegisterSpec for CHENCLR_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [chenclr::R](R) reader structure"] +impl crate::Readable for CHENCLR_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [chenclr::W](W) writer structure"] +impl crate::Writable for CHENCLR_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0xffff_ffff; +} +#[doc = "`reset()` method sets CHENCLR to value 0"] +impl crate::Resettable for CHENCLR_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/ppi/chenset.rs b/down-the-stack/dk_pac/src/ppi/chenset.rs new file mode 100644 index 0000000..900a667 --- /dev/null +++ b/down-the-stack/dk_pac/src/ppi/chenset.rs @@ -0,0 +1,2241 @@ +#[doc = "Register `CHENSET` 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 `CHENSET` 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 `CH0` reader - Channel 0 enable set register. Writing '0' has no effect"] +pub type CH0_R = crate::BitReader; +#[doc = "Channel 0 enable set register. Writing '0' has no effect\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum CH0_A { + #[doc = "0: Read: channel disabled"] + DISABLED = 0, + #[doc = "1: Read: channel enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: CH0_A) -> Self { + variant as u8 != 0 + } +} +impl CH0_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> CH0_A { + match self.bits { + false => CH0_A::DISABLED, + true => CH0_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == CH0_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == CH0_A::ENABLED + } +} +#[doc = "Channel 0 enable set register. Writing '0' has no effect\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum CH0_AW { + #[doc = "1: Write: Enable channel"] + SET = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: CH0_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `CH0` writer - Channel 0 enable set register. Writing '0' has no effect"] +pub type CH0_W<'a, const O: u8> = crate::BitWriter1S<'a, u32, CHENSET_SPEC, CH0_AW, O>; +impl<'a, const O: u8> CH0_W<'a, O> { + #[doc = "Write: Enable channel"] + #[inline(always)] + pub fn set(self) -> &'a mut W { + self.variant(CH0_AW::SET) + } +} +#[doc = "Field `CH1` reader - Channel 1 enable set register. Writing '0' has no effect"] +pub type CH1_R = crate::BitReader; +#[doc = "Channel 1 enable set register. Writing '0' has no effect\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum CH1_A { + #[doc = "0: Read: channel disabled"] + DISABLED = 0, + #[doc = "1: Read: channel enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: CH1_A) -> Self { + variant as u8 != 0 + } +} +impl CH1_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> CH1_A { + match self.bits { + false => CH1_A::DISABLED, + true => CH1_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == CH1_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == CH1_A::ENABLED + } +} +#[doc = "Channel 1 enable set register. Writing '0' has no effect\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum CH1_AW { + #[doc = "1: Write: Enable channel"] + SET = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: CH1_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `CH1` writer - Channel 1 enable set register. Writing '0' has no effect"] +pub type CH1_W<'a, const O: u8> = crate::BitWriter1S<'a, u32, CHENSET_SPEC, CH1_AW, O>; +impl<'a, const O: u8> CH1_W<'a, O> { + #[doc = "Write: Enable channel"] + #[inline(always)] + pub fn set(self) -> &'a mut W { + self.variant(CH1_AW::SET) + } +} +#[doc = "Field `CH2` reader - Channel 2 enable set register. Writing '0' has no effect"] +pub type CH2_R = crate::BitReader; +#[doc = "Channel 2 enable set register. Writing '0' has no effect\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum CH2_A { + #[doc = "0: Read: channel disabled"] + DISABLED = 0, + #[doc = "1: Read: channel enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: CH2_A) -> Self { + variant as u8 != 0 + } +} +impl CH2_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> CH2_A { + match self.bits { + false => CH2_A::DISABLED, + true => CH2_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == CH2_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == CH2_A::ENABLED + } +} +#[doc = "Channel 2 enable set register. Writing '0' has no effect\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum CH2_AW { + #[doc = "1: Write: Enable channel"] + SET = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: CH2_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `CH2` writer - Channel 2 enable set register. Writing '0' has no effect"] +pub type CH2_W<'a, const O: u8> = crate::BitWriter1S<'a, u32, CHENSET_SPEC, CH2_AW, O>; +impl<'a, const O: u8> CH2_W<'a, O> { + #[doc = "Write: Enable channel"] + #[inline(always)] + pub fn set(self) -> &'a mut W { + self.variant(CH2_AW::SET) + } +} +#[doc = "Field `CH3` reader - Channel 3 enable set register. Writing '0' has no effect"] +pub type CH3_R = crate::BitReader; +#[doc = "Channel 3 enable set register. Writing '0' has no effect\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum CH3_A { + #[doc = "0: Read: channel disabled"] + DISABLED = 0, + #[doc = "1: Read: channel enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: CH3_A) -> Self { + variant as u8 != 0 + } +} +impl CH3_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> CH3_A { + match self.bits { + false => CH3_A::DISABLED, + true => CH3_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == CH3_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == CH3_A::ENABLED + } +} +#[doc = "Channel 3 enable set register. Writing '0' has no effect\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum CH3_AW { + #[doc = "1: Write: Enable channel"] + SET = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: CH3_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `CH3` writer - Channel 3 enable set register. Writing '0' has no effect"] +pub type CH3_W<'a, const O: u8> = crate::BitWriter1S<'a, u32, CHENSET_SPEC, CH3_AW, O>; +impl<'a, const O: u8> CH3_W<'a, O> { + #[doc = "Write: Enable channel"] + #[inline(always)] + pub fn set(self) -> &'a mut W { + self.variant(CH3_AW::SET) + } +} +#[doc = "Field `CH4` reader - Channel 4 enable set register. Writing '0' has no effect"] +pub type CH4_R = crate::BitReader; +#[doc = "Channel 4 enable set register. Writing '0' has no effect\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum CH4_A { + #[doc = "0: Read: channel disabled"] + DISABLED = 0, + #[doc = "1: Read: channel enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: CH4_A) -> Self { + variant as u8 != 0 + } +} +impl CH4_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> CH4_A { + match self.bits { + false => CH4_A::DISABLED, + true => CH4_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == CH4_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == CH4_A::ENABLED + } +} +#[doc = "Channel 4 enable set register. Writing '0' has no effect\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum CH4_AW { + #[doc = "1: Write: Enable channel"] + SET = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: CH4_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `CH4` writer - Channel 4 enable set register. Writing '0' has no effect"] +pub type CH4_W<'a, const O: u8> = crate::BitWriter1S<'a, u32, CHENSET_SPEC, CH4_AW, O>; +impl<'a, const O: u8> CH4_W<'a, O> { + #[doc = "Write: Enable channel"] + #[inline(always)] + pub fn set(self) -> &'a mut W { + self.variant(CH4_AW::SET) + } +} +#[doc = "Field `CH5` reader - Channel 5 enable set register. Writing '0' has no effect"] +pub type CH5_R = crate::BitReader; +#[doc = "Channel 5 enable set register. Writing '0' has no effect\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum CH5_A { + #[doc = "0: Read: channel disabled"] + DISABLED = 0, + #[doc = "1: Read: channel enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: CH5_A) -> Self { + variant as u8 != 0 + } +} +impl CH5_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> CH5_A { + match self.bits { + false => CH5_A::DISABLED, + true => CH5_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == CH5_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == CH5_A::ENABLED + } +} +#[doc = "Channel 5 enable set register. Writing '0' has no effect\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum CH5_AW { + #[doc = "1: Write: Enable channel"] + SET = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: CH5_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `CH5` writer - Channel 5 enable set register. Writing '0' has no effect"] +pub type CH5_W<'a, const O: u8> = crate::BitWriter1S<'a, u32, CHENSET_SPEC, CH5_AW, O>; +impl<'a, const O: u8> CH5_W<'a, O> { + #[doc = "Write: Enable channel"] + #[inline(always)] + pub fn set(self) -> &'a mut W { + self.variant(CH5_AW::SET) + } +} +#[doc = "Field `CH6` reader - Channel 6 enable set register. Writing '0' has no effect"] +pub type CH6_R = crate::BitReader; +#[doc = "Channel 6 enable set register. Writing '0' has no effect\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum CH6_A { + #[doc = "0: Read: channel disabled"] + DISABLED = 0, + #[doc = "1: Read: channel enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: CH6_A) -> Self { + variant as u8 != 0 + } +} +impl CH6_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> CH6_A { + match self.bits { + false => CH6_A::DISABLED, + true => CH6_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == CH6_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == CH6_A::ENABLED + } +} +#[doc = "Channel 6 enable set register. Writing '0' has no effect\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum CH6_AW { + #[doc = "1: Write: Enable channel"] + SET = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: CH6_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `CH6` writer - Channel 6 enable set register. Writing '0' has no effect"] +pub type CH6_W<'a, const O: u8> = crate::BitWriter1S<'a, u32, CHENSET_SPEC, CH6_AW, O>; +impl<'a, const O: u8> CH6_W<'a, O> { + #[doc = "Write: Enable channel"] + #[inline(always)] + pub fn set(self) -> &'a mut W { + self.variant(CH6_AW::SET) + } +} +#[doc = "Field `CH7` reader - Channel 7 enable set register. Writing '0' has no effect"] +pub type CH7_R = crate::BitReader; +#[doc = "Channel 7 enable set register. Writing '0' has no effect\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum CH7_A { + #[doc = "0: Read: channel disabled"] + DISABLED = 0, + #[doc = "1: Read: channel enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: CH7_A) -> Self { + variant as u8 != 0 + } +} +impl CH7_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> CH7_A { + match self.bits { + false => CH7_A::DISABLED, + true => CH7_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == CH7_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == CH7_A::ENABLED + } +} +#[doc = "Channel 7 enable set register. Writing '0' has no effect\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum CH7_AW { + #[doc = "1: Write: Enable channel"] + SET = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: CH7_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `CH7` writer - Channel 7 enable set register. Writing '0' has no effect"] +pub type CH7_W<'a, const O: u8> = crate::BitWriter1S<'a, u32, CHENSET_SPEC, CH7_AW, O>; +impl<'a, const O: u8> CH7_W<'a, O> { + #[doc = "Write: Enable channel"] + #[inline(always)] + pub fn set(self) -> &'a mut W { + self.variant(CH7_AW::SET) + } +} +#[doc = "Field `CH8` reader - Channel 8 enable set register. Writing '0' has no effect"] +pub type CH8_R = crate::BitReader; +#[doc = "Channel 8 enable set register. Writing '0' has no effect\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum CH8_A { + #[doc = "0: Read: channel disabled"] + DISABLED = 0, + #[doc = "1: Read: channel enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: CH8_A) -> Self { + variant as u8 != 0 + } +} +impl CH8_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> CH8_A { + match self.bits { + false => CH8_A::DISABLED, + true => CH8_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == CH8_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == CH8_A::ENABLED + } +} +#[doc = "Channel 8 enable set register. Writing '0' has no effect\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum CH8_AW { + #[doc = "1: Write: Enable channel"] + SET = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: CH8_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `CH8` writer - Channel 8 enable set register. Writing '0' has no effect"] +pub type CH8_W<'a, const O: u8> = crate::BitWriter1S<'a, u32, CHENSET_SPEC, CH8_AW, O>; +impl<'a, const O: u8> CH8_W<'a, O> { + #[doc = "Write: Enable channel"] + #[inline(always)] + pub fn set(self) -> &'a mut W { + self.variant(CH8_AW::SET) + } +} +#[doc = "Field `CH9` reader - Channel 9 enable set register. Writing '0' has no effect"] +pub type CH9_R = crate::BitReader; +#[doc = "Channel 9 enable set register. Writing '0' has no effect\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum CH9_A { + #[doc = "0: Read: channel disabled"] + DISABLED = 0, + #[doc = "1: Read: channel enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: CH9_A) -> Self { + variant as u8 != 0 + } +} +impl CH9_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> CH9_A { + match self.bits { + false => CH9_A::DISABLED, + true => CH9_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == CH9_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == CH9_A::ENABLED + } +} +#[doc = "Channel 9 enable set register. Writing '0' has no effect\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum CH9_AW { + #[doc = "1: Write: Enable channel"] + SET = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: CH9_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `CH9` writer - Channel 9 enable set register. Writing '0' has no effect"] +pub type CH9_W<'a, const O: u8> = crate::BitWriter1S<'a, u32, CHENSET_SPEC, CH9_AW, O>; +impl<'a, const O: u8> CH9_W<'a, O> { + #[doc = "Write: Enable channel"] + #[inline(always)] + pub fn set(self) -> &'a mut W { + self.variant(CH9_AW::SET) + } +} +#[doc = "Field `CH10` reader - Channel 10 enable set register. Writing '0' has no effect"] +pub type CH10_R = crate::BitReader; +#[doc = "Channel 10 enable set register. Writing '0' has no effect\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum CH10_A { + #[doc = "0: Read: channel disabled"] + DISABLED = 0, + #[doc = "1: Read: channel enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: CH10_A) -> Self { + variant as u8 != 0 + } +} +impl CH10_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> CH10_A { + match self.bits { + false => CH10_A::DISABLED, + true => CH10_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == CH10_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == CH10_A::ENABLED + } +} +#[doc = "Channel 10 enable set register. Writing '0' has no effect\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum CH10_AW { + #[doc = "1: Write: Enable channel"] + SET = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: CH10_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `CH10` writer - Channel 10 enable set register. Writing '0' has no effect"] +pub type CH10_W<'a, const O: u8> = crate::BitWriter1S<'a, u32, CHENSET_SPEC, CH10_AW, O>; +impl<'a, const O: u8> CH10_W<'a, O> { + #[doc = "Write: Enable channel"] + #[inline(always)] + pub fn set(self) -> &'a mut W { + self.variant(CH10_AW::SET) + } +} +#[doc = "Field `CH11` reader - Channel 11 enable set register. Writing '0' has no effect"] +pub type CH11_R = crate::BitReader; +#[doc = "Channel 11 enable set register. Writing '0' has no effect\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum CH11_A { + #[doc = "0: Read: channel disabled"] + DISABLED = 0, + #[doc = "1: Read: channel enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: CH11_A) -> Self { + variant as u8 != 0 + } +} +impl CH11_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> CH11_A { + match self.bits { + false => CH11_A::DISABLED, + true => CH11_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == CH11_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == CH11_A::ENABLED + } +} +#[doc = "Channel 11 enable set register. Writing '0' has no effect\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum CH11_AW { + #[doc = "1: Write: Enable channel"] + SET = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: CH11_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `CH11` writer - Channel 11 enable set register. Writing '0' has no effect"] +pub type CH11_W<'a, const O: u8> = crate::BitWriter1S<'a, u32, CHENSET_SPEC, CH11_AW, O>; +impl<'a, const O: u8> CH11_W<'a, O> { + #[doc = "Write: Enable channel"] + #[inline(always)] + pub fn set(self) -> &'a mut W { + self.variant(CH11_AW::SET) + } +} +#[doc = "Field `CH12` reader - Channel 12 enable set register. Writing '0' has no effect"] +pub type CH12_R = crate::BitReader; +#[doc = "Channel 12 enable set register. Writing '0' has no effect\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum CH12_A { + #[doc = "0: Read: channel disabled"] + DISABLED = 0, + #[doc = "1: Read: channel enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: CH12_A) -> Self { + variant as u8 != 0 + } +} +impl CH12_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> CH12_A { + match self.bits { + false => CH12_A::DISABLED, + true => CH12_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == CH12_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == CH12_A::ENABLED + } +} +#[doc = "Channel 12 enable set register. Writing '0' has no effect\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum CH12_AW { + #[doc = "1: Write: Enable channel"] + SET = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: CH12_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `CH12` writer - Channel 12 enable set register. Writing '0' has no effect"] +pub type CH12_W<'a, const O: u8> = crate::BitWriter1S<'a, u32, CHENSET_SPEC, CH12_AW, O>; +impl<'a, const O: u8> CH12_W<'a, O> { + #[doc = "Write: Enable channel"] + #[inline(always)] + pub fn set(self) -> &'a mut W { + self.variant(CH12_AW::SET) + } +} +#[doc = "Field `CH13` reader - Channel 13 enable set register. Writing '0' has no effect"] +pub type CH13_R = crate::BitReader; +#[doc = "Channel 13 enable set register. Writing '0' has no effect\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum CH13_A { + #[doc = "0: Read: channel disabled"] + DISABLED = 0, + #[doc = "1: Read: channel enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: CH13_A) -> Self { + variant as u8 != 0 + } +} +impl CH13_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> CH13_A { + match self.bits { + false => CH13_A::DISABLED, + true => CH13_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == CH13_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == CH13_A::ENABLED + } +} +#[doc = "Channel 13 enable set register. Writing '0' has no effect\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum CH13_AW { + #[doc = "1: Write: Enable channel"] + SET = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: CH13_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `CH13` writer - Channel 13 enable set register. Writing '0' has no effect"] +pub type CH13_W<'a, const O: u8> = crate::BitWriter1S<'a, u32, CHENSET_SPEC, CH13_AW, O>; +impl<'a, const O: u8> CH13_W<'a, O> { + #[doc = "Write: Enable channel"] + #[inline(always)] + pub fn set(self) -> &'a mut W { + self.variant(CH13_AW::SET) + } +} +#[doc = "Field `CH14` reader - Channel 14 enable set register. Writing '0' has no effect"] +pub type CH14_R = crate::BitReader; +#[doc = "Channel 14 enable set register. Writing '0' has no effect\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum CH14_A { + #[doc = "0: Read: channel disabled"] + DISABLED = 0, + #[doc = "1: Read: channel enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: CH14_A) -> Self { + variant as u8 != 0 + } +} +impl CH14_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> CH14_A { + match self.bits { + false => CH14_A::DISABLED, + true => CH14_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == CH14_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == CH14_A::ENABLED + } +} +#[doc = "Channel 14 enable set register. Writing '0' has no effect\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum CH14_AW { + #[doc = "1: Write: Enable channel"] + SET = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: CH14_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `CH14` writer - Channel 14 enable set register. Writing '0' has no effect"] +pub type CH14_W<'a, const O: u8> = crate::BitWriter1S<'a, u32, CHENSET_SPEC, CH14_AW, O>; +impl<'a, const O: u8> CH14_W<'a, O> { + #[doc = "Write: Enable channel"] + #[inline(always)] + pub fn set(self) -> &'a mut W { + self.variant(CH14_AW::SET) + } +} +#[doc = "Field `CH15` reader - Channel 15 enable set register. Writing '0' has no effect"] +pub type CH15_R = crate::BitReader; +#[doc = "Channel 15 enable set register. Writing '0' has no effect\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum CH15_A { + #[doc = "0: Read: channel disabled"] + DISABLED = 0, + #[doc = "1: Read: channel enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: CH15_A) -> Self { + variant as u8 != 0 + } +} +impl CH15_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> CH15_A { + match self.bits { + false => CH15_A::DISABLED, + true => CH15_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == CH15_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == CH15_A::ENABLED + } +} +#[doc = "Channel 15 enable set register. Writing '0' has no effect\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum CH15_AW { + #[doc = "1: Write: Enable channel"] + SET = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: CH15_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `CH15` writer - Channel 15 enable set register. Writing '0' has no effect"] +pub type CH15_W<'a, const O: u8> = crate::BitWriter1S<'a, u32, CHENSET_SPEC, CH15_AW, O>; +impl<'a, const O: u8> CH15_W<'a, O> { + #[doc = "Write: Enable channel"] + #[inline(always)] + pub fn set(self) -> &'a mut W { + self.variant(CH15_AW::SET) + } +} +#[doc = "Field `CH16` reader - Channel 16 enable set register. Writing '0' has no effect"] +pub type CH16_R = crate::BitReader; +#[doc = "Channel 16 enable set register. Writing '0' has no effect\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum CH16_A { + #[doc = "0: Read: channel disabled"] + DISABLED = 0, + #[doc = "1: Read: channel enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: CH16_A) -> Self { + variant as u8 != 0 + } +} +impl CH16_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> CH16_A { + match self.bits { + false => CH16_A::DISABLED, + true => CH16_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == CH16_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == CH16_A::ENABLED + } +} +#[doc = "Channel 16 enable set register. Writing '0' has no effect\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum CH16_AW { + #[doc = "1: Write: Enable channel"] + SET = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: CH16_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `CH16` writer - Channel 16 enable set register. Writing '0' has no effect"] +pub type CH16_W<'a, const O: u8> = crate::BitWriter1S<'a, u32, CHENSET_SPEC, CH16_AW, O>; +impl<'a, const O: u8> CH16_W<'a, O> { + #[doc = "Write: Enable channel"] + #[inline(always)] + pub fn set(self) -> &'a mut W { + self.variant(CH16_AW::SET) + } +} +#[doc = "Field `CH17` reader - Channel 17 enable set register. Writing '0' has no effect"] +pub type CH17_R = crate::BitReader; +#[doc = "Channel 17 enable set register. Writing '0' has no effect\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum CH17_A { + #[doc = "0: Read: channel disabled"] + DISABLED = 0, + #[doc = "1: Read: channel enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: CH17_A) -> Self { + variant as u8 != 0 + } +} +impl CH17_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> CH17_A { + match self.bits { + false => CH17_A::DISABLED, + true => CH17_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == CH17_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == CH17_A::ENABLED + } +} +#[doc = "Channel 17 enable set register. Writing '0' has no effect\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum CH17_AW { + #[doc = "1: Write: Enable channel"] + SET = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: CH17_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `CH17` writer - Channel 17 enable set register. Writing '0' has no effect"] +pub type CH17_W<'a, const O: u8> = crate::BitWriter1S<'a, u32, CHENSET_SPEC, CH17_AW, O>; +impl<'a, const O: u8> CH17_W<'a, O> { + #[doc = "Write: Enable channel"] + #[inline(always)] + pub fn set(self) -> &'a mut W { + self.variant(CH17_AW::SET) + } +} +#[doc = "Field `CH18` reader - Channel 18 enable set register. Writing '0' has no effect"] +pub type CH18_R = crate::BitReader; +#[doc = "Channel 18 enable set register. Writing '0' has no effect\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum CH18_A { + #[doc = "0: Read: channel disabled"] + DISABLED = 0, + #[doc = "1: Read: channel enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: CH18_A) -> Self { + variant as u8 != 0 + } +} +impl CH18_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> CH18_A { + match self.bits { + false => CH18_A::DISABLED, + true => CH18_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == CH18_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == CH18_A::ENABLED + } +} +#[doc = "Channel 18 enable set register. Writing '0' has no effect\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum CH18_AW { + #[doc = "1: Write: Enable channel"] + SET = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: CH18_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `CH18` writer - Channel 18 enable set register. Writing '0' has no effect"] +pub type CH18_W<'a, const O: u8> = crate::BitWriter1S<'a, u32, CHENSET_SPEC, CH18_AW, O>; +impl<'a, const O: u8> CH18_W<'a, O> { + #[doc = "Write: Enable channel"] + #[inline(always)] + pub fn set(self) -> &'a mut W { + self.variant(CH18_AW::SET) + } +} +#[doc = "Field `CH19` reader - Channel 19 enable set register. Writing '0' has no effect"] +pub type CH19_R = crate::BitReader; +#[doc = "Channel 19 enable set register. Writing '0' has no effect\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum CH19_A { + #[doc = "0: Read: channel disabled"] + DISABLED = 0, + #[doc = "1: Read: channel enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: CH19_A) -> Self { + variant as u8 != 0 + } +} +impl CH19_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> CH19_A { + match self.bits { + false => CH19_A::DISABLED, + true => CH19_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == CH19_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == CH19_A::ENABLED + } +} +#[doc = "Channel 19 enable set register. Writing '0' has no effect\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum CH19_AW { + #[doc = "1: Write: Enable channel"] + SET = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: CH19_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `CH19` writer - Channel 19 enable set register. Writing '0' has no effect"] +pub type CH19_W<'a, const O: u8> = crate::BitWriter1S<'a, u32, CHENSET_SPEC, CH19_AW, O>; +impl<'a, const O: u8> CH19_W<'a, O> { + #[doc = "Write: Enable channel"] + #[inline(always)] + pub fn set(self) -> &'a mut W { + self.variant(CH19_AW::SET) + } +} +#[doc = "Field `CH20` reader - Channel 20 enable set register. Writing '0' has no effect"] +pub type CH20_R = crate::BitReader; +#[doc = "Channel 20 enable set register. Writing '0' has no effect\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum CH20_A { + #[doc = "0: Read: channel disabled"] + DISABLED = 0, + #[doc = "1: Read: channel enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: CH20_A) -> Self { + variant as u8 != 0 + } +} +impl CH20_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> CH20_A { + match self.bits { + false => CH20_A::DISABLED, + true => CH20_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == CH20_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == CH20_A::ENABLED + } +} +#[doc = "Channel 20 enable set register. Writing '0' has no effect\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum CH20_AW { + #[doc = "1: Write: Enable channel"] + SET = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: CH20_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `CH20` writer - Channel 20 enable set register. Writing '0' has no effect"] +pub type CH20_W<'a, const O: u8> = crate::BitWriter1S<'a, u32, CHENSET_SPEC, CH20_AW, O>; +impl<'a, const O: u8> CH20_W<'a, O> { + #[doc = "Write: Enable channel"] + #[inline(always)] + pub fn set(self) -> &'a mut W { + self.variant(CH20_AW::SET) + } +} +#[doc = "Field `CH21` reader - Channel 21 enable set register. Writing '0' has no effect"] +pub type CH21_R = crate::BitReader; +#[doc = "Channel 21 enable set register. Writing '0' has no effect\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum CH21_A { + #[doc = "0: Read: channel disabled"] + DISABLED = 0, + #[doc = "1: Read: channel enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: CH21_A) -> Self { + variant as u8 != 0 + } +} +impl CH21_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> CH21_A { + match self.bits { + false => CH21_A::DISABLED, + true => CH21_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == CH21_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == CH21_A::ENABLED + } +} +#[doc = "Channel 21 enable set register. Writing '0' has no effect\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum CH21_AW { + #[doc = "1: Write: Enable channel"] + SET = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: CH21_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `CH21` writer - Channel 21 enable set register. Writing '0' has no effect"] +pub type CH21_W<'a, const O: u8> = crate::BitWriter1S<'a, u32, CHENSET_SPEC, CH21_AW, O>; +impl<'a, const O: u8> CH21_W<'a, O> { + #[doc = "Write: Enable channel"] + #[inline(always)] + pub fn set(self) -> &'a mut W { + self.variant(CH21_AW::SET) + } +} +#[doc = "Field `CH22` reader - Channel 22 enable set register. Writing '0' has no effect"] +pub type CH22_R = crate::BitReader; +#[doc = "Channel 22 enable set register. Writing '0' has no effect\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum CH22_A { + #[doc = "0: Read: channel disabled"] + DISABLED = 0, + #[doc = "1: Read: channel enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: CH22_A) -> Self { + variant as u8 != 0 + } +} +impl CH22_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> CH22_A { + match self.bits { + false => CH22_A::DISABLED, + true => CH22_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == CH22_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == CH22_A::ENABLED + } +} +#[doc = "Channel 22 enable set register. Writing '0' has no effect\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum CH22_AW { + #[doc = "1: Write: Enable channel"] + SET = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: CH22_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `CH22` writer - Channel 22 enable set register. Writing '0' has no effect"] +pub type CH22_W<'a, const O: u8> = crate::BitWriter1S<'a, u32, CHENSET_SPEC, CH22_AW, O>; +impl<'a, const O: u8> CH22_W<'a, O> { + #[doc = "Write: Enable channel"] + #[inline(always)] + pub fn set(self) -> &'a mut W { + self.variant(CH22_AW::SET) + } +} +#[doc = "Field `CH23` reader - Channel 23 enable set register. Writing '0' has no effect"] +pub type CH23_R = crate::BitReader; +#[doc = "Channel 23 enable set register. Writing '0' has no effect\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum CH23_A { + #[doc = "0: Read: channel disabled"] + DISABLED = 0, + #[doc = "1: Read: channel enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: CH23_A) -> Self { + variant as u8 != 0 + } +} +impl CH23_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> CH23_A { + match self.bits { + false => CH23_A::DISABLED, + true => CH23_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == CH23_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == CH23_A::ENABLED + } +} +#[doc = "Channel 23 enable set register. Writing '0' has no effect\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum CH23_AW { + #[doc = "1: Write: Enable channel"] + SET = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: CH23_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `CH23` writer - Channel 23 enable set register. Writing '0' has no effect"] +pub type CH23_W<'a, const O: u8> = crate::BitWriter1S<'a, u32, CHENSET_SPEC, CH23_AW, O>; +impl<'a, const O: u8> CH23_W<'a, O> { + #[doc = "Write: Enable channel"] + #[inline(always)] + pub fn set(self) -> &'a mut W { + self.variant(CH23_AW::SET) + } +} +#[doc = "Field `CH24` reader - Channel 24 enable set register. Writing '0' has no effect"] +pub type CH24_R = crate::BitReader; +#[doc = "Channel 24 enable set register. Writing '0' has no effect\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum CH24_A { + #[doc = "0: Read: channel disabled"] + DISABLED = 0, + #[doc = "1: Read: channel enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: CH24_A) -> Self { + variant as u8 != 0 + } +} +impl CH24_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> CH24_A { + match self.bits { + false => CH24_A::DISABLED, + true => CH24_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == CH24_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == CH24_A::ENABLED + } +} +#[doc = "Channel 24 enable set register. Writing '0' has no effect\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum CH24_AW { + #[doc = "1: Write: Enable channel"] + SET = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: CH24_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `CH24` writer - Channel 24 enable set register. Writing '0' has no effect"] +pub type CH24_W<'a, const O: u8> = crate::BitWriter1S<'a, u32, CHENSET_SPEC, CH24_AW, O>; +impl<'a, const O: u8> CH24_W<'a, O> { + #[doc = "Write: Enable channel"] + #[inline(always)] + pub fn set(self) -> &'a mut W { + self.variant(CH24_AW::SET) + } +} +#[doc = "Field `CH25` reader - Channel 25 enable set register. Writing '0' has no effect"] +pub type CH25_R = crate::BitReader; +#[doc = "Channel 25 enable set register. Writing '0' has no effect\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum CH25_A { + #[doc = "0: Read: channel disabled"] + DISABLED = 0, + #[doc = "1: Read: channel enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: CH25_A) -> Self { + variant as u8 != 0 + } +} +impl CH25_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> CH25_A { + match self.bits { + false => CH25_A::DISABLED, + true => CH25_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == CH25_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == CH25_A::ENABLED + } +} +#[doc = "Channel 25 enable set register. Writing '0' has no effect\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum CH25_AW { + #[doc = "1: Write: Enable channel"] + SET = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: CH25_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `CH25` writer - Channel 25 enable set register. Writing '0' has no effect"] +pub type CH25_W<'a, const O: u8> = crate::BitWriter1S<'a, u32, CHENSET_SPEC, CH25_AW, O>; +impl<'a, const O: u8> CH25_W<'a, O> { + #[doc = "Write: Enable channel"] + #[inline(always)] + pub fn set(self) -> &'a mut W { + self.variant(CH25_AW::SET) + } +} +#[doc = "Field `CH26` reader - Channel 26 enable set register. Writing '0' has no effect"] +pub type CH26_R = crate::BitReader; +#[doc = "Channel 26 enable set register. Writing '0' has no effect\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum CH26_A { + #[doc = "0: Read: channel disabled"] + DISABLED = 0, + #[doc = "1: Read: channel enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: CH26_A) -> Self { + variant as u8 != 0 + } +} +impl CH26_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> CH26_A { + match self.bits { + false => CH26_A::DISABLED, + true => CH26_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == CH26_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == CH26_A::ENABLED + } +} +#[doc = "Channel 26 enable set register. Writing '0' has no effect\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum CH26_AW { + #[doc = "1: Write: Enable channel"] + SET = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: CH26_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `CH26` writer - Channel 26 enable set register. Writing '0' has no effect"] +pub type CH26_W<'a, const O: u8> = crate::BitWriter1S<'a, u32, CHENSET_SPEC, CH26_AW, O>; +impl<'a, const O: u8> CH26_W<'a, O> { + #[doc = "Write: Enable channel"] + #[inline(always)] + pub fn set(self) -> &'a mut W { + self.variant(CH26_AW::SET) + } +} +#[doc = "Field `CH27` reader - Channel 27 enable set register. Writing '0' has no effect"] +pub type CH27_R = crate::BitReader; +#[doc = "Channel 27 enable set register. Writing '0' has no effect\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum CH27_A { + #[doc = "0: Read: channel disabled"] + DISABLED = 0, + #[doc = "1: Read: channel enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: CH27_A) -> Self { + variant as u8 != 0 + } +} +impl CH27_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> CH27_A { + match self.bits { + false => CH27_A::DISABLED, + true => CH27_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == CH27_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == CH27_A::ENABLED + } +} +#[doc = "Channel 27 enable set register. Writing '0' has no effect\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum CH27_AW { + #[doc = "1: Write: Enable channel"] + SET = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: CH27_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `CH27` writer - Channel 27 enable set register. Writing '0' has no effect"] +pub type CH27_W<'a, const O: u8> = crate::BitWriter1S<'a, u32, CHENSET_SPEC, CH27_AW, O>; +impl<'a, const O: u8> CH27_W<'a, O> { + #[doc = "Write: Enable channel"] + #[inline(always)] + pub fn set(self) -> &'a mut W { + self.variant(CH27_AW::SET) + } +} +#[doc = "Field `CH28` reader - Channel 28 enable set register. Writing '0' has no effect"] +pub type CH28_R = crate::BitReader; +#[doc = "Channel 28 enable set register. Writing '0' has no effect\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum CH28_A { + #[doc = "0: Read: channel disabled"] + DISABLED = 0, + #[doc = "1: Read: channel enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: CH28_A) -> Self { + variant as u8 != 0 + } +} +impl CH28_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> CH28_A { + match self.bits { + false => CH28_A::DISABLED, + true => CH28_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == CH28_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == CH28_A::ENABLED + } +} +#[doc = "Channel 28 enable set register. Writing '0' has no effect\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum CH28_AW { + #[doc = "1: Write: Enable channel"] + SET = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: CH28_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `CH28` writer - Channel 28 enable set register. Writing '0' has no effect"] +pub type CH28_W<'a, const O: u8> = crate::BitWriter1S<'a, u32, CHENSET_SPEC, CH28_AW, O>; +impl<'a, const O: u8> CH28_W<'a, O> { + #[doc = "Write: Enable channel"] + #[inline(always)] + pub fn set(self) -> &'a mut W { + self.variant(CH28_AW::SET) + } +} +#[doc = "Field `CH29` reader - Channel 29 enable set register. Writing '0' has no effect"] +pub type CH29_R = crate::BitReader; +#[doc = "Channel 29 enable set register. Writing '0' has no effect\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum CH29_A { + #[doc = "0: Read: channel disabled"] + DISABLED = 0, + #[doc = "1: Read: channel enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: CH29_A) -> Self { + variant as u8 != 0 + } +} +impl CH29_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> CH29_A { + match self.bits { + false => CH29_A::DISABLED, + true => CH29_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == CH29_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == CH29_A::ENABLED + } +} +#[doc = "Channel 29 enable set register. Writing '0' has no effect\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum CH29_AW { + #[doc = "1: Write: Enable channel"] + SET = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: CH29_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `CH29` writer - Channel 29 enable set register. Writing '0' has no effect"] +pub type CH29_W<'a, const O: u8> = crate::BitWriter1S<'a, u32, CHENSET_SPEC, CH29_AW, O>; +impl<'a, const O: u8> CH29_W<'a, O> { + #[doc = "Write: Enable channel"] + #[inline(always)] + pub fn set(self) -> &'a mut W { + self.variant(CH29_AW::SET) + } +} +#[doc = "Field `CH30` reader - Channel 30 enable set register. Writing '0' has no effect"] +pub type CH30_R = crate::BitReader; +#[doc = "Channel 30 enable set register. Writing '0' has no effect\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum CH30_A { + #[doc = "0: Read: channel disabled"] + DISABLED = 0, + #[doc = "1: Read: channel enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: CH30_A) -> Self { + variant as u8 != 0 + } +} +impl CH30_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> CH30_A { + match self.bits { + false => CH30_A::DISABLED, + true => CH30_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == CH30_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == CH30_A::ENABLED + } +} +#[doc = "Channel 30 enable set register. Writing '0' has no effect\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum CH30_AW { + #[doc = "1: Write: Enable channel"] + SET = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: CH30_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `CH30` writer - Channel 30 enable set register. Writing '0' has no effect"] +pub type CH30_W<'a, const O: u8> = crate::BitWriter1S<'a, u32, CHENSET_SPEC, CH30_AW, O>; +impl<'a, const O: u8> CH30_W<'a, O> { + #[doc = "Write: Enable channel"] + #[inline(always)] + pub fn set(self) -> &'a mut W { + self.variant(CH30_AW::SET) + } +} +#[doc = "Field `CH31` reader - Channel 31 enable set register. Writing '0' has no effect"] +pub type CH31_R = crate::BitReader; +#[doc = "Channel 31 enable set register. Writing '0' has no effect\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum CH31_A { + #[doc = "0: Read: channel disabled"] + DISABLED = 0, + #[doc = "1: Read: channel enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: CH31_A) -> Self { + variant as u8 != 0 + } +} +impl CH31_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> CH31_A { + match self.bits { + false => CH31_A::DISABLED, + true => CH31_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == CH31_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == CH31_A::ENABLED + } +} +#[doc = "Channel 31 enable set register. Writing '0' has no effect\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum CH31_AW { + #[doc = "1: Write: Enable channel"] + SET = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: CH31_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `CH31` writer - Channel 31 enable set register. Writing '0' has no effect"] +pub type CH31_W<'a, const O: u8> = crate::BitWriter1S<'a, u32, CHENSET_SPEC, CH31_AW, O>; +impl<'a, const O: u8> CH31_W<'a, O> { + #[doc = "Write: Enable channel"] + #[inline(always)] + pub fn set(self) -> &'a mut W { + self.variant(CH31_AW::SET) + } +} +impl R { + #[doc = "Bit 0 - Channel 0 enable set register. Writing '0' has no effect"] + #[inline(always)] + pub fn ch0(&self) -> CH0_R { + CH0_R::new((self.bits & 1) != 0) + } + #[doc = "Bit 1 - Channel 1 enable set register. Writing '0' has no effect"] + #[inline(always)] + pub fn ch1(&self) -> CH1_R { + CH1_R::new(((self.bits >> 1) & 1) != 0) + } + #[doc = "Bit 2 - Channel 2 enable set register. Writing '0' has no effect"] + #[inline(always)] + pub fn ch2(&self) -> CH2_R { + CH2_R::new(((self.bits >> 2) & 1) != 0) + } + #[doc = "Bit 3 - Channel 3 enable set register. Writing '0' has no effect"] + #[inline(always)] + pub fn ch3(&self) -> CH3_R { + CH3_R::new(((self.bits >> 3) & 1) != 0) + } + #[doc = "Bit 4 - Channel 4 enable set register. Writing '0' has no effect"] + #[inline(always)] + pub fn ch4(&self) -> CH4_R { + CH4_R::new(((self.bits >> 4) & 1) != 0) + } + #[doc = "Bit 5 - Channel 5 enable set register. Writing '0' has no effect"] + #[inline(always)] + pub fn ch5(&self) -> CH5_R { + CH5_R::new(((self.bits >> 5) & 1) != 0) + } + #[doc = "Bit 6 - Channel 6 enable set register. Writing '0' has no effect"] + #[inline(always)] + pub fn ch6(&self) -> CH6_R { + CH6_R::new(((self.bits >> 6) & 1) != 0) + } + #[doc = "Bit 7 - Channel 7 enable set register. Writing '0' has no effect"] + #[inline(always)] + pub fn ch7(&self) -> CH7_R { + CH7_R::new(((self.bits >> 7) & 1) != 0) + } + #[doc = "Bit 8 - Channel 8 enable set register. Writing '0' has no effect"] + #[inline(always)] + pub fn ch8(&self) -> CH8_R { + CH8_R::new(((self.bits >> 8) & 1) != 0) + } + #[doc = "Bit 9 - Channel 9 enable set register. Writing '0' has no effect"] + #[inline(always)] + pub fn ch9(&self) -> CH9_R { + CH9_R::new(((self.bits >> 9) & 1) != 0) + } + #[doc = "Bit 10 - Channel 10 enable set register. Writing '0' has no effect"] + #[inline(always)] + pub fn ch10(&self) -> CH10_R { + CH10_R::new(((self.bits >> 10) & 1) != 0) + } + #[doc = "Bit 11 - Channel 11 enable set register. Writing '0' has no effect"] + #[inline(always)] + pub fn ch11(&self) -> CH11_R { + CH11_R::new(((self.bits >> 11) & 1) != 0) + } + #[doc = "Bit 12 - Channel 12 enable set register. Writing '0' has no effect"] + #[inline(always)] + pub fn ch12(&self) -> CH12_R { + CH12_R::new(((self.bits >> 12) & 1) != 0) + } + #[doc = "Bit 13 - Channel 13 enable set register. Writing '0' has no effect"] + #[inline(always)] + pub fn ch13(&self) -> CH13_R { + CH13_R::new(((self.bits >> 13) & 1) != 0) + } + #[doc = "Bit 14 - Channel 14 enable set register. Writing '0' has no effect"] + #[inline(always)] + pub fn ch14(&self) -> CH14_R { + CH14_R::new(((self.bits >> 14) & 1) != 0) + } + #[doc = "Bit 15 - Channel 15 enable set register. Writing '0' has no effect"] + #[inline(always)] + pub fn ch15(&self) -> CH15_R { + CH15_R::new(((self.bits >> 15) & 1) != 0) + } + #[doc = "Bit 16 - Channel 16 enable set register. Writing '0' has no effect"] + #[inline(always)] + pub fn ch16(&self) -> CH16_R { + CH16_R::new(((self.bits >> 16) & 1) != 0) + } + #[doc = "Bit 17 - Channel 17 enable set register. Writing '0' has no effect"] + #[inline(always)] + pub fn ch17(&self) -> CH17_R { + CH17_R::new(((self.bits >> 17) & 1) != 0) + } + #[doc = "Bit 18 - Channel 18 enable set register. Writing '0' has no effect"] + #[inline(always)] + pub fn ch18(&self) -> CH18_R { + CH18_R::new(((self.bits >> 18) & 1) != 0) + } + #[doc = "Bit 19 - Channel 19 enable set register. Writing '0' has no effect"] + #[inline(always)] + pub fn ch19(&self) -> CH19_R { + CH19_R::new(((self.bits >> 19) & 1) != 0) + } + #[doc = "Bit 20 - Channel 20 enable set register. Writing '0' has no effect"] + #[inline(always)] + pub fn ch20(&self) -> CH20_R { + CH20_R::new(((self.bits >> 20) & 1) != 0) + } + #[doc = "Bit 21 - Channel 21 enable set register. Writing '0' has no effect"] + #[inline(always)] + pub fn ch21(&self) -> CH21_R { + CH21_R::new(((self.bits >> 21) & 1) != 0) + } + #[doc = "Bit 22 - Channel 22 enable set register. Writing '0' has no effect"] + #[inline(always)] + pub fn ch22(&self) -> CH22_R { + CH22_R::new(((self.bits >> 22) & 1) != 0) + } + #[doc = "Bit 23 - Channel 23 enable set register. Writing '0' has no effect"] + #[inline(always)] + pub fn ch23(&self) -> CH23_R { + CH23_R::new(((self.bits >> 23) & 1) != 0) + } + #[doc = "Bit 24 - Channel 24 enable set register. Writing '0' has no effect"] + #[inline(always)] + pub fn ch24(&self) -> CH24_R { + CH24_R::new(((self.bits >> 24) & 1) != 0) + } + #[doc = "Bit 25 - Channel 25 enable set register. Writing '0' has no effect"] + #[inline(always)] + pub fn ch25(&self) -> CH25_R { + CH25_R::new(((self.bits >> 25) & 1) != 0) + } + #[doc = "Bit 26 - Channel 26 enable set register. Writing '0' has no effect"] + #[inline(always)] + pub fn ch26(&self) -> CH26_R { + CH26_R::new(((self.bits >> 26) & 1) != 0) + } + #[doc = "Bit 27 - Channel 27 enable set register. Writing '0' has no effect"] + #[inline(always)] + pub fn ch27(&self) -> CH27_R { + CH27_R::new(((self.bits >> 27) & 1) != 0) + } + #[doc = "Bit 28 - Channel 28 enable set register. Writing '0' has no effect"] + #[inline(always)] + pub fn ch28(&self) -> CH28_R { + CH28_R::new(((self.bits >> 28) & 1) != 0) + } + #[doc = "Bit 29 - Channel 29 enable set register. Writing '0' has no effect"] + #[inline(always)] + pub fn ch29(&self) -> CH29_R { + CH29_R::new(((self.bits >> 29) & 1) != 0) + } + #[doc = "Bit 30 - Channel 30 enable set register. Writing '0' has no effect"] + #[inline(always)] + pub fn ch30(&self) -> CH30_R { + CH30_R::new(((self.bits >> 30) & 1) != 0) + } + #[doc = "Bit 31 - Channel 31 enable set register. Writing '0' has no effect"] + #[inline(always)] + pub fn ch31(&self) -> CH31_R { + CH31_R::new(((self.bits >> 31) & 1) != 0) + } +} +impl W { + #[doc = "Bit 0 - Channel 0 enable set register. Writing '0' has no effect"] + #[inline(always)] + #[must_use] + pub fn ch0(&mut self) -> CH0_W<0> { + CH0_W::new(self) + } + #[doc = "Bit 1 - Channel 1 enable set register. Writing '0' has no effect"] + #[inline(always)] + #[must_use] + pub fn ch1(&mut self) -> CH1_W<1> { + CH1_W::new(self) + } + #[doc = "Bit 2 - Channel 2 enable set register. Writing '0' has no effect"] + #[inline(always)] + #[must_use] + pub fn ch2(&mut self) -> CH2_W<2> { + CH2_W::new(self) + } + #[doc = "Bit 3 - Channel 3 enable set register. Writing '0' has no effect"] + #[inline(always)] + #[must_use] + pub fn ch3(&mut self) -> CH3_W<3> { + CH3_W::new(self) + } + #[doc = "Bit 4 - Channel 4 enable set register. Writing '0' has no effect"] + #[inline(always)] + #[must_use] + pub fn ch4(&mut self) -> CH4_W<4> { + CH4_W::new(self) + } + #[doc = "Bit 5 - Channel 5 enable set register. Writing '0' has no effect"] + #[inline(always)] + #[must_use] + pub fn ch5(&mut self) -> CH5_W<5> { + CH5_W::new(self) + } + #[doc = "Bit 6 - Channel 6 enable set register. Writing '0' has no effect"] + #[inline(always)] + #[must_use] + pub fn ch6(&mut self) -> CH6_W<6> { + CH6_W::new(self) + } + #[doc = "Bit 7 - Channel 7 enable set register. Writing '0' has no effect"] + #[inline(always)] + #[must_use] + pub fn ch7(&mut self) -> CH7_W<7> { + CH7_W::new(self) + } + #[doc = "Bit 8 - Channel 8 enable set register. Writing '0' has no effect"] + #[inline(always)] + #[must_use] + pub fn ch8(&mut self) -> CH8_W<8> { + CH8_W::new(self) + } + #[doc = "Bit 9 - Channel 9 enable set register. Writing '0' has no effect"] + #[inline(always)] + #[must_use] + pub fn ch9(&mut self) -> CH9_W<9> { + CH9_W::new(self) + } + #[doc = "Bit 10 - Channel 10 enable set register. Writing '0' has no effect"] + #[inline(always)] + #[must_use] + pub fn ch10(&mut self) -> CH10_W<10> { + CH10_W::new(self) + } + #[doc = "Bit 11 - Channel 11 enable set register. Writing '0' has no effect"] + #[inline(always)] + #[must_use] + pub fn ch11(&mut self) -> CH11_W<11> { + CH11_W::new(self) + } + #[doc = "Bit 12 - Channel 12 enable set register. Writing '0' has no effect"] + #[inline(always)] + #[must_use] + pub fn ch12(&mut self) -> CH12_W<12> { + CH12_W::new(self) + } + #[doc = "Bit 13 - Channel 13 enable set register. Writing '0' has no effect"] + #[inline(always)] + #[must_use] + pub fn ch13(&mut self) -> CH13_W<13> { + CH13_W::new(self) + } + #[doc = "Bit 14 - Channel 14 enable set register. Writing '0' has no effect"] + #[inline(always)] + #[must_use] + pub fn ch14(&mut self) -> CH14_W<14> { + CH14_W::new(self) + } + #[doc = "Bit 15 - Channel 15 enable set register. Writing '0' has no effect"] + #[inline(always)] + #[must_use] + pub fn ch15(&mut self) -> CH15_W<15> { + CH15_W::new(self) + } + #[doc = "Bit 16 - Channel 16 enable set register. Writing '0' has no effect"] + #[inline(always)] + #[must_use] + pub fn ch16(&mut self) -> CH16_W<16> { + CH16_W::new(self) + } + #[doc = "Bit 17 - Channel 17 enable set register. Writing '0' has no effect"] + #[inline(always)] + #[must_use] + pub fn ch17(&mut self) -> CH17_W<17> { + CH17_W::new(self) + } + #[doc = "Bit 18 - Channel 18 enable set register. Writing '0' has no effect"] + #[inline(always)] + #[must_use] + pub fn ch18(&mut self) -> CH18_W<18> { + CH18_W::new(self) + } + #[doc = "Bit 19 - Channel 19 enable set register. Writing '0' has no effect"] + #[inline(always)] + #[must_use] + pub fn ch19(&mut self) -> CH19_W<19> { + CH19_W::new(self) + } + #[doc = "Bit 20 - Channel 20 enable set register. Writing '0' has no effect"] + #[inline(always)] + #[must_use] + pub fn ch20(&mut self) -> CH20_W<20> { + CH20_W::new(self) + } + #[doc = "Bit 21 - Channel 21 enable set register. Writing '0' has no effect"] + #[inline(always)] + #[must_use] + pub fn ch21(&mut self) -> CH21_W<21> { + CH21_W::new(self) + } + #[doc = "Bit 22 - Channel 22 enable set register. Writing '0' has no effect"] + #[inline(always)] + #[must_use] + pub fn ch22(&mut self) -> CH22_W<22> { + CH22_W::new(self) + } + #[doc = "Bit 23 - Channel 23 enable set register. Writing '0' has no effect"] + #[inline(always)] + #[must_use] + pub fn ch23(&mut self) -> CH23_W<23> { + CH23_W::new(self) + } + #[doc = "Bit 24 - Channel 24 enable set register. Writing '0' has no effect"] + #[inline(always)] + #[must_use] + pub fn ch24(&mut self) -> CH24_W<24> { + CH24_W::new(self) + } + #[doc = "Bit 25 - Channel 25 enable set register. Writing '0' has no effect"] + #[inline(always)] + #[must_use] + pub fn ch25(&mut self) -> CH25_W<25> { + CH25_W::new(self) + } + #[doc = "Bit 26 - Channel 26 enable set register. Writing '0' has no effect"] + #[inline(always)] + #[must_use] + pub fn ch26(&mut self) -> CH26_W<26> { + CH26_W::new(self) + } + #[doc = "Bit 27 - Channel 27 enable set register. Writing '0' has no effect"] + #[inline(always)] + #[must_use] + pub fn ch27(&mut self) -> CH27_W<27> { + CH27_W::new(self) + } + #[doc = "Bit 28 - Channel 28 enable set register. Writing '0' has no effect"] + #[inline(always)] + #[must_use] + pub fn ch28(&mut self) -> CH28_W<28> { + CH28_W::new(self) + } + #[doc = "Bit 29 - Channel 29 enable set register. Writing '0' has no effect"] + #[inline(always)] + #[must_use] + pub fn ch29(&mut self) -> CH29_W<29> { + CH29_W::new(self) + } + #[doc = "Bit 30 - Channel 30 enable set register. Writing '0' has no effect"] + #[inline(always)] + #[must_use] + pub fn ch30(&mut self) -> CH30_W<30> { + CH30_W::new(self) + } + #[doc = "Bit 31 - Channel 31 enable set register. Writing '0' has no effect"] + #[inline(always)] + #[must_use] + pub fn ch31(&mut self) -> CH31_W<31> { + CH31_W::new(self) + } + #[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 = "Channel enable set register\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 [chenset](index.html) module"] +pub struct CHENSET_SPEC; +impl crate::RegisterSpec for CHENSET_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [chenset::R](R) reader structure"] +impl crate::Readable for CHENSET_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [chenset::W](W) writer structure"] +impl crate::Writable for CHENSET_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0xffff_ffff; +} +#[doc = "`reset()` method sets CHENSET to value 0"] +impl crate::Resettable for CHENSET_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/ppi/chg.rs b/down-the-stack/dk_pac/src/ppi/chg.rs new file mode 100644 index 0000000..43eccf4 --- /dev/null +++ b/down-the-stack/dk_pac/src/ppi/chg.rs @@ -0,0 +1,2018 @@ +#[doc = "Register `CHG[%s]` 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 `CHG[%s]` 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 `CH0` reader - Include or exclude channel 0"] +pub type CH0_R = crate::BitReader; +#[doc = "Include or exclude channel 0\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum CH0_A { + #[doc = "0: Exclude"] + EXCLUDED = 0, + #[doc = "1: Include"] + INCLUDED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: CH0_A) -> Self { + variant as u8 != 0 + } +} +impl CH0_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> CH0_A { + match self.bits { + false => CH0_A::EXCLUDED, + true => CH0_A::INCLUDED, + } + } + #[doc = "Checks if the value of the field is `EXCLUDED`"] + #[inline(always)] + pub fn is_excluded(&self) -> bool { + *self == CH0_A::EXCLUDED + } + #[doc = "Checks if the value of the field is `INCLUDED`"] + #[inline(always)] + pub fn is_included(&self) -> bool { + *self == CH0_A::INCLUDED + } +} +#[doc = "Field `CH0` writer - Include or exclude channel 0"] +pub type CH0_W<'a, const O: u8> = crate::BitWriter<'a, u32, CHG_SPEC, CH0_A, O>; +impl<'a, const O: u8> CH0_W<'a, O> { + #[doc = "Exclude"] + #[inline(always)] + pub fn excluded(self) -> &'a mut W { + self.variant(CH0_A::EXCLUDED) + } + #[doc = "Include"] + #[inline(always)] + pub fn included(self) -> &'a mut W { + self.variant(CH0_A::INCLUDED) + } +} +#[doc = "Field `CH1` reader - Include or exclude channel 1"] +pub type CH1_R = crate::BitReader; +#[doc = "Include or exclude channel 1\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum CH1_A { + #[doc = "0: Exclude"] + EXCLUDED = 0, + #[doc = "1: Include"] + INCLUDED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: CH1_A) -> Self { + variant as u8 != 0 + } +} +impl CH1_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> CH1_A { + match self.bits { + false => CH1_A::EXCLUDED, + true => CH1_A::INCLUDED, + } + } + #[doc = "Checks if the value of the field is `EXCLUDED`"] + #[inline(always)] + pub fn is_excluded(&self) -> bool { + *self == CH1_A::EXCLUDED + } + #[doc = "Checks if the value of the field is `INCLUDED`"] + #[inline(always)] + pub fn is_included(&self) -> bool { + *self == CH1_A::INCLUDED + } +} +#[doc = "Field `CH1` writer - Include or exclude channel 1"] +pub type CH1_W<'a, const O: u8> = crate::BitWriter<'a, u32, CHG_SPEC, CH1_A, O>; +impl<'a, const O: u8> CH1_W<'a, O> { + #[doc = "Exclude"] + #[inline(always)] + pub fn excluded(self) -> &'a mut W { + self.variant(CH1_A::EXCLUDED) + } + #[doc = "Include"] + #[inline(always)] + pub fn included(self) -> &'a mut W { + self.variant(CH1_A::INCLUDED) + } +} +#[doc = "Field `CH2` reader - Include or exclude channel 2"] +pub type CH2_R = crate::BitReader; +#[doc = "Include or exclude channel 2\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum CH2_A { + #[doc = "0: Exclude"] + EXCLUDED = 0, + #[doc = "1: Include"] + INCLUDED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: CH2_A) -> Self { + variant as u8 != 0 + } +} +impl CH2_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> CH2_A { + match self.bits { + false => CH2_A::EXCLUDED, + true => CH2_A::INCLUDED, + } + } + #[doc = "Checks if the value of the field is `EXCLUDED`"] + #[inline(always)] + pub fn is_excluded(&self) -> bool { + *self == CH2_A::EXCLUDED + } + #[doc = "Checks if the value of the field is `INCLUDED`"] + #[inline(always)] + pub fn is_included(&self) -> bool { + *self == CH2_A::INCLUDED + } +} +#[doc = "Field `CH2` writer - Include or exclude channel 2"] +pub type CH2_W<'a, const O: u8> = crate::BitWriter<'a, u32, CHG_SPEC, CH2_A, O>; +impl<'a, const O: u8> CH2_W<'a, O> { + #[doc = "Exclude"] + #[inline(always)] + pub fn excluded(self) -> &'a mut W { + self.variant(CH2_A::EXCLUDED) + } + #[doc = "Include"] + #[inline(always)] + pub fn included(self) -> &'a mut W { + self.variant(CH2_A::INCLUDED) + } +} +#[doc = "Field `CH3` reader - Include or exclude channel 3"] +pub type CH3_R = crate::BitReader; +#[doc = "Include or exclude channel 3\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum CH3_A { + #[doc = "0: Exclude"] + EXCLUDED = 0, + #[doc = "1: Include"] + INCLUDED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: CH3_A) -> Self { + variant as u8 != 0 + } +} +impl CH3_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> CH3_A { + match self.bits { + false => CH3_A::EXCLUDED, + true => CH3_A::INCLUDED, + } + } + #[doc = "Checks if the value of the field is `EXCLUDED`"] + #[inline(always)] + pub fn is_excluded(&self) -> bool { + *self == CH3_A::EXCLUDED + } + #[doc = "Checks if the value of the field is `INCLUDED`"] + #[inline(always)] + pub fn is_included(&self) -> bool { + *self == CH3_A::INCLUDED + } +} +#[doc = "Field `CH3` writer - Include or exclude channel 3"] +pub type CH3_W<'a, const O: u8> = crate::BitWriter<'a, u32, CHG_SPEC, CH3_A, O>; +impl<'a, const O: u8> CH3_W<'a, O> { + #[doc = "Exclude"] + #[inline(always)] + pub fn excluded(self) -> &'a mut W { + self.variant(CH3_A::EXCLUDED) + } + #[doc = "Include"] + #[inline(always)] + pub fn included(self) -> &'a mut W { + self.variant(CH3_A::INCLUDED) + } +} +#[doc = "Field `CH4` reader - Include or exclude channel 4"] +pub type CH4_R = crate::BitReader; +#[doc = "Include or exclude channel 4\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum CH4_A { + #[doc = "0: Exclude"] + EXCLUDED = 0, + #[doc = "1: Include"] + INCLUDED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: CH4_A) -> Self { + variant as u8 != 0 + } +} +impl CH4_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> CH4_A { + match self.bits { + false => CH4_A::EXCLUDED, + true => CH4_A::INCLUDED, + } + } + #[doc = "Checks if the value of the field is `EXCLUDED`"] + #[inline(always)] + pub fn is_excluded(&self) -> bool { + *self == CH4_A::EXCLUDED + } + #[doc = "Checks if the value of the field is `INCLUDED`"] + #[inline(always)] + pub fn is_included(&self) -> bool { + *self == CH4_A::INCLUDED + } +} +#[doc = "Field `CH4` writer - Include or exclude channel 4"] +pub type CH4_W<'a, const O: u8> = crate::BitWriter<'a, u32, CHG_SPEC, CH4_A, O>; +impl<'a, const O: u8> CH4_W<'a, O> { + #[doc = "Exclude"] + #[inline(always)] + pub fn excluded(self) -> &'a mut W { + self.variant(CH4_A::EXCLUDED) + } + #[doc = "Include"] + #[inline(always)] + pub fn included(self) -> &'a mut W { + self.variant(CH4_A::INCLUDED) + } +} +#[doc = "Field `CH5` reader - Include or exclude channel 5"] +pub type CH5_R = crate::BitReader; +#[doc = "Include or exclude channel 5\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum CH5_A { + #[doc = "0: Exclude"] + EXCLUDED = 0, + #[doc = "1: Include"] + INCLUDED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: CH5_A) -> Self { + variant as u8 != 0 + } +} +impl CH5_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> CH5_A { + match self.bits { + false => CH5_A::EXCLUDED, + true => CH5_A::INCLUDED, + } + } + #[doc = "Checks if the value of the field is `EXCLUDED`"] + #[inline(always)] + pub fn is_excluded(&self) -> bool { + *self == CH5_A::EXCLUDED + } + #[doc = "Checks if the value of the field is `INCLUDED`"] + #[inline(always)] + pub fn is_included(&self) -> bool { + *self == CH5_A::INCLUDED + } +} +#[doc = "Field `CH5` writer - Include or exclude channel 5"] +pub type CH5_W<'a, const O: u8> = crate::BitWriter<'a, u32, CHG_SPEC, CH5_A, O>; +impl<'a, const O: u8> CH5_W<'a, O> { + #[doc = "Exclude"] + #[inline(always)] + pub fn excluded(self) -> &'a mut W { + self.variant(CH5_A::EXCLUDED) + } + #[doc = "Include"] + #[inline(always)] + pub fn included(self) -> &'a mut W { + self.variant(CH5_A::INCLUDED) + } +} +#[doc = "Field `CH6` reader - Include or exclude channel 6"] +pub type CH6_R = crate::BitReader; +#[doc = "Include or exclude channel 6\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum CH6_A { + #[doc = "0: Exclude"] + EXCLUDED = 0, + #[doc = "1: Include"] + INCLUDED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: CH6_A) -> Self { + variant as u8 != 0 + } +} +impl CH6_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> CH6_A { + match self.bits { + false => CH6_A::EXCLUDED, + true => CH6_A::INCLUDED, + } + } + #[doc = "Checks if the value of the field is `EXCLUDED`"] + #[inline(always)] + pub fn is_excluded(&self) -> bool { + *self == CH6_A::EXCLUDED + } + #[doc = "Checks if the value of the field is `INCLUDED`"] + #[inline(always)] + pub fn is_included(&self) -> bool { + *self == CH6_A::INCLUDED + } +} +#[doc = "Field `CH6` writer - Include or exclude channel 6"] +pub type CH6_W<'a, const O: u8> = crate::BitWriter<'a, u32, CHG_SPEC, CH6_A, O>; +impl<'a, const O: u8> CH6_W<'a, O> { + #[doc = "Exclude"] + #[inline(always)] + pub fn excluded(self) -> &'a mut W { + self.variant(CH6_A::EXCLUDED) + } + #[doc = "Include"] + #[inline(always)] + pub fn included(self) -> &'a mut W { + self.variant(CH6_A::INCLUDED) + } +} +#[doc = "Field `CH7` reader - Include or exclude channel 7"] +pub type CH7_R = crate::BitReader; +#[doc = "Include or exclude channel 7\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum CH7_A { + #[doc = "0: Exclude"] + EXCLUDED = 0, + #[doc = "1: Include"] + INCLUDED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: CH7_A) -> Self { + variant as u8 != 0 + } +} +impl CH7_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> CH7_A { + match self.bits { + false => CH7_A::EXCLUDED, + true => CH7_A::INCLUDED, + } + } + #[doc = "Checks if the value of the field is `EXCLUDED`"] + #[inline(always)] + pub fn is_excluded(&self) -> bool { + *self == CH7_A::EXCLUDED + } + #[doc = "Checks if the value of the field is `INCLUDED`"] + #[inline(always)] + pub fn is_included(&self) -> bool { + *self == CH7_A::INCLUDED + } +} +#[doc = "Field `CH7` writer - Include or exclude channel 7"] +pub type CH7_W<'a, const O: u8> = crate::BitWriter<'a, u32, CHG_SPEC, CH7_A, O>; +impl<'a, const O: u8> CH7_W<'a, O> { + #[doc = "Exclude"] + #[inline(always)] + pub fn excluded(self) -> &'a mut W { + self.variant(CH7_A::EXCLUDED) + } + #[doc = "Include"] + #[inline(always)] + pub fn included(self) -> &'a mut W { + self.variant(CH7_A::INCLUDED) + } +} +#[doc = "Field `CH8` reader - Include or exclude channel 8"] +pub type CH8_R = crate::BitReader; +#[doc = "Include or exclude channel 8\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum CH8_A { + #[doc = "0: Exclude"] + EXCLUDED = 0, + #[doc = "1: Include"] + INCLUDED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: CH8_A) -> Self { + variant as u8 != 0 + } +} +impl CH8_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> CH8_A { + match self.bits { + false => CH8_A::EXCLUDED, + true => CH8_A::INCLUDED, + } + } + #[doc = "Checks if the value of the field is `EXCLUDED`"] + #[inline(always)] + pub fn is_excluded(&self) -> bool { + *self == CH8_A::EXCLUDED + } + #[doc = "Checks if the value of the field is `INCLUDED`"] + #[inline(always)] + pub fn is_included(&self) -> bool { + *self == CH8_A::INCLUDED + } +} +#[doc = "Field `CH8` writer - Include or exclude channel 8"] +pub type CH8_W<'a, const O: u8> = crate::BitWriter<'a, u32, CHG_SPEC, CH8_A, O>; +impl<'a, const O: u8> CH8_W<'a, O> { + #[doc = "Exclude"] + #[inline(always)] + pub fn excluded(self) -> &'a mut W { + self.variant(CH8_A::EXCLUDED) + } + #[doc = "Include"] + #[inline(always)] + pub fn included(self) -> &'a mut W { + self.variant(CH8_A::INCLUDED) + } +} +#[doc = "Field `CH9` reader - Include or exclude channel 9"] +pub type CH9_R = crate::BitReader; +#[doc = "Include or exclude channel 9\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum CH9_A { + #[doc = "0: Exclude"] + EXCLUDED = 0, + #[doc = "1: Include"] + INCLUDED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: CH9_A) -> Self { + variant as u8 != 0 + } +} +impl CH9_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> CH9_A { + match self.bits { + false => CH9_A::EXCLUDED, + true => CH9_A::INCLUDED, + } + } + #[doc = "Checks if the value of the field is `EXCLUDED`"] + #[inline(always)] + pub fn is_excluded(&self) -> bool { + *self == CH9_A::EXCLUDED + } + #[doc = "Checks if the value of the field is `INCLUDED`"] + #[inline(always)] + pub fn is_included(&self) -> bool { + *self == CH9_A::INCLUDED + } +} +#[doc = "Field `CH9` writer - Include or exclude channel 9"] +pub type CH9_W<'a, const O: u8> = crate::BitWriter<'a, u32, CHG_SPEC, CH9_A, O>; +impl<'a, const O: u8> CH9_W<'a, O> { + #[doc = "Exclude"] + #[inline(always)] + pub fn excluded(self) -> &'a mut W { + self.variant(CH9_A::EXCLUDED) + } + #[doc = "Include"] + #[inline(always)] + pub fn included(self) -> &'a mut W { + self.variant(CH9_A::INCLUDED) + } +} +#[doc = "Field `CH10` reader - Include or exclude channel 10"] +pub type CH10_R = crate::BitReader; +#[doc = "Include or exclude channel 10\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum CH10_A { + #[doc = "0: Exclude"] + EXCLUDED = 0, + #[doc = "1: Include"] + INCLUDED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: CH10_A) -> Self { + variant as u8 != 0 + } +} +impl CH10_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> CH10_A { + match self.bits { + false => CH10_A::EXCLUDED, + true => CH10_A::INCLUDED, + } + } + #[doc = "Checks if the value of the field is `EXCLUDED`"] + #[inline(always)] + pub fn is_excluded(&self) -> bool { + *self == CH10_A::EXCLUDED + } + #[doc = "Checks if the value of the field is `INCLUDED`"] + #[inline(always)] + pub fn is_included(&self) -> bool { + *self == CH10_A::INCLUDED + } +} +#[doc = "Field `CH10` writer - Include or exclude channel 10"] +pub type CH10_W<'a, const O: u8> = crate::BitWriter<'a, u32, CHG_SPEC, CH10_A, O>; +impl<'a, const O: u8> CH10_W<'a, O> { + #[doc = "Exclude"] + #[inline(always)] + pub fn excluded(self) -> &'a mut W { + self.variant(CH10_A::EXCLUDED) + } + #[doc = "Include"] + #[inline(always)] + pub fn included(self) -> &'a mut W { + self.variant(CH10_A::INCLUDED) + } +} +#[doc = "Field `CH11` reader - Include or exclude channel 11"] +pub type CH11_R = crate::BitReader; +#[doc = "Include or exclude channel 11\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum CH11_A { + #[doc = "0: Exclude"] + EXCLUDED = 0, + #[doc = "1: Include"] + INCLUDED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: CH11_A) -> Self { + variant as u8 != 0 + } +} +impl CH11_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> CH11_A { + match self.bits { + false => CH11_A::EXCLUDED, + true => CH11_A::INCLUDED, + } + } + #[doc = "Checks if the value of the field is `EXCLUDED`"] + #[inline(always)] + pub fn is_excluded(&self) -> bool { + *self == CH11_A::EXCLUDED + } + #[doc = "Checks if the value of the field is `INCLUDED`"] + #[inline(always)] + pub fn is_included(&self) -> bool { + *self == CH11_A::INCLUDED + } +} +#[doc = "Field `CH11` writer - Include or exclude channel 11"] +pub type CH11_W<'a, const O: u8> = crate::BitWriter<'a, u32, CHG_SPEC, CH11_A, O>; +impl<'a, const O: u8> CH11_W<'a, O> { + #[doc = "Exclude"] + #[inline(always)] + pub fn excluded(self) -> &'a mut W { + self.variant(CH11_A::EXCLUDED) + } + #[doc = "Include"] + #[inline(always)] + pub fn included(self) -> &'a mut W { + self.variant(CH11_A::INCLUDED) + } +} +#[doc = "Field `CH12` reader - Include or exclude channel 12"] +pub type CH12_R = crate::BitReader; +#[doc = "Include or exclude channel 12\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum CH12_A { + #[doc = "0: Exclude"] + EXCLUDED = 0, + #[doc = "1: Include"] + INCLUDED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: CH12_A) -> Self { + variant as u8 != 0 + } +} +impl CH12_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> CH12_A { + match self.bits { + false => CH12_A::EXCLUDED, + true => CH12_A::INCLUDED, + } + } + #[doc = "Checks if the value of the field is `EXCLUDED`"] + #[inline(always)] + pub fn is_excluded(&self) -> bool { + *self == CH12_A::EXCLUDED + } + #[doc = "Checks if the value of the field is `INCLUDED`"] + #[inline(always)] + pub fn is_included(&self) -> bool { + *self == CH12_A::INCLUDED + } +} +#[doc = "Field `CH12` writer - Include or exclude channel 12"] +pub type CH12_W<'a, const O: u8> = crate::BitWriter<'a, u32, CHG_SPEC, CH12_A, O>; +impl<'a, const O: u8> CH12_W<'a, O> { + #[doc = "Exclude"] + #[inline(always)] + pub fn excluded(self) -> &'a mut W { + self.variant(CH12_A::EXCLUDED) + } + #[doc = "Include"] + #[inline(always)] + pub fn included(self) -> &'a mut W { + self.variant(CH12_A::INCLUDED) + } +} +#[doc = "Field `CH13` reader - Include or exclude channel 13"] +pub type CH13_R = crate::BitReader; +#[doc = "Include or exclude channel 13\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum CH13_A { + #[doc = "0: Exclude"] + EXCLUDED = 0, + #[doc = "1: Include"] + INCLUDED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: CH13_A) -> Self { + variant as u8 != 0 + } +} +impl CH13_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> CH13_A { + match self.bits { + false => CH13_A::EXCLUDED, + true => CH13_A::INCLUDED, + } + } + #[doc = "Checks if the value of the field is `EXCLUDED`"] + #[inline(always)] + pub fn is_excluded(&self) -> bool { + *self == CH13_A::EXCLUDED + } + #[doc = "Checks if the value of the field is `INCLUDED`"] + #[inline(always)] + pub fn is_included(&self) -> bool { + *self == CH13_A::INCLUDED + } +} +#[doc = "Field `CH13` writer - Include or exclude channel 13"] +pub type CH13_W<'a, const O: u8> = crate::BitWriter<'a, u32, CHG_SPEC, CH13_A, O>; +impl<'a, const O: u8> CH13_W<'a, O> { + #[doc = "Exclude"] + #[inline(always)] + pub fn excluded(self) -> &'a mut W { + self.variant(CH13_A::EXCLUDED) + } + #[doc = "Include"] + #[inline(always)] + pub fn included(self) -> &'a mut W { + self.variant(CH13_A::INCLUDED) + } +} +#[doc = "Field `CH14` reader - Include or exclude channel 14"] +pub type CH14_R = crate::BitReader; +#[doc = "Include or exclude channel 14\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum CH14_A { + #[doc = "0: Exclude"] + EXCLUDED = 0, + #[doc = "1: Include"] + INCLUDED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: CH14_A) -> Self { + variant as u8 != 0 + } +} +impl CH14_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> CH14_A { + match self.bits { + false => CH14_A::EXCLUDED, + true => CH14_A::INCLUDED, + } + } + #[doc = "Checks if the value of the field is `EXCLUDED`"] + #[inline(always)] + pub fn is_excluded(&self) -> bool { + *self == CH14_A::EXCLUDED + } + #[doc = "Checks if the value of the field is `INCLUDED`"] + #[inline(always)] + pub fn is_included(&self) -> bool { + *self == CH14_A::INCLUDED + } +} +#[doc = "Field `CH14` writer - Include or exclude channel 14"] +pub type CH14_W<'a, const O: u8> = crate::BitWriter<'a, u32, CHG_SPEC, CH14_A, O>; +impl<'a, const O: u8> CH14_W<'a, O> { + #[doc = "Exclude"] + #[inline(always)] + pub fn excluded(self) -> &'a mut W { + self.variant(CH14_A::EXCLUDED) + } + #[doc = "Include"] + #[inline(always)] + pub fn included(self) -> &'a mut W { + self.variant(CH14_A::INCLUDED) + } +} +#[doc = "Field `CH15` reader - Include or exclude channel 15"] +pub type CH15_R = crate::BitReader; +#[doc = "Include or exclude channel 15\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum CH15_A { + #[doc = "0: Exclude"] + EXCLUDED = 0, + #[doc = "1: Include"] + INCLUDED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: CH15_A) -> Self { + variant as u8 != 0 + } +} +impl CH15_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> CH15_A { + match self.bits { + false => CH15_A::EXCLUDED, + true => CH15_A::INCLUDED, + } + } + #[doc = "Checks if the value of the field is `EXCLUDED`"] + #[inline(always)] + pub fn is_excluded(&self) -> bool { + *self == CH15_A::EXCLUDED + } + #[doc = "Checks if the value of the field is `INCLUDED`"] + #[inline(always)] + pub fn is_included(&self) -> bool { + *self == CH15_A::INCLUDED + } +} +#[doc = "Field `CH15` writer - Include or exclude channel 15"] +pub type CH15_W<'a, const O: u8> = crate::BitWriter<'a, u32, CHG_SPEC, CH15_A, O>; +impl<'a, const O: u8> CH15_W<'a, O> { + #[doc = "Exclude"] + #[inline(always)] + pub fn excluded(self) -> &'a mut W { + self.variant(CH15_A::EXCLUDED) + } + #[doc = "Include"] + #[inline(always)] + pub fn included(self) -> &'a mut W { + self.variant(CH15_A::INCLUDED) + } +} +#[doc = "Field `CH16` reader - Include or exclude channel 16"] +pub type CH16_R = crate::BitReader; +#[doc = "Include or exclude channel 16\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum CH16_A { + #[doc = "0: Exclude"] + EXCLUDED = 0, + #[doc = "1: Include"] + INCLUDED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: CH16_A) -> Self { + variant as u8 != 0 + } +} +impl CH16_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> CH16_A { + match self.bits { + false => CH16_A::EXCLUDED, + true => CH16_A::INCLUDED, + } + } + #[doc = "Checks if the value of the field is `EXCLUDED`"] + #[inline(always)] + pub fn is_excluded(&self) -> bool { + *self == CH16_A::EXCLUDED + } + #[doc = "Checks if the value of the field is `INCLUDED`"] + #[inline(always)] + pub fn is_included(&self) -> bool { + *self == CH16_A::INCLUDED + } +} +#[doc = "Field `CH16` writer - Include or exclude channel 16"] +pub type CH16_W<'a, const O: u8> = crate::BitWriter<'a, u32, CHG_SPEC, CH16_A, O>; +impl<'a, const O: u8> CH16_W<'a, O> { + #[doc = "Exclude"] + #[inline(always)] + pub fn excluded(self) -> &'a mut W { + self.variant(CH16_A::EXCLUDED) + } + #[doc = "Include"] + #[inline(always)] + pub fn included(self) -> &'a mut W { + self.variant(CH16_A::INCLUDED) + } +} +#[doc = "Field `CH17` reader - Include or exclude channel 17"] +pub type CH17_R = crate::BitReader; +#[doc = "Include or exclude channel 17\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum CH17_A { + #[doc = "0: Exclude"] + EXCLUDED = 0, + #[doc = "1: Include"] + INCLUDED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: CH17_A) -> Self { + variant as u8 != 0 + } +} +impl CH17_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> CH17_A { + match self.bits { + false => CH17_A::EXCLUDED, + true => CH17_A::INCLUDED, + } + } + #[doc = "Checks if the value of the field is `EXCLUDED`"] + #[inline(always)] + pub fn is_excluded(&self) -> bool { + *self == CH17_A::EXCLUDED + } + #[doc = "Checks if the value of the field is `INCLUDED`"] + #[inline(always)] + pub fn is_included(&self) -> bool { + *self == CH17_A::INCLUDED + } +} +#[doc = "Field `CH17` writer - Include or exclude channel 17"] +pub type CH17_W<'a, const O: u8> = crate::BitWriter<'a, u32, CHG_SPEC, CH17_A, O>; +impl<'a, const O: u8> CH17_W<'a, O> { + #[doc = "Exclude"] + #[inline(always)] + pub fn excluded(self) -> &'a mut W { + self.variant(CH17_A::EXCLUDED) + } + #[doc = "Include"] + #[inline(always)] + pub fn included(self) -> &'a mut W { + self.variant(CH17_A::INCLUDED) + } +} +#[doc = "Field `CH18` reader - Include or exclude channel 18"] +pub type CH18_R = crate::BitReader; +#[doc = "Include or exclude channel 18\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum CH18_A { + #[doc = "0: Exclude"] + EXCLUDED = 0, + #[doc = "1: Include"] + INCLUDED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: CH18_A) -> Self { + variant as u8 != 0 + } +} +impl CH18_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> CH18_A { + match self.bits { + false => CH18_A::EXCLUDED, + true => CH18_A::INCLUDED, + } + } + #[doc = "Checks if the value of the field is `EXCLUDED`"] + #[inline(always)] + pub fn is_excluded(&self) -> bool { + *self == CH18_A::EXCLUDED + } + #[doc = "Checks if the value of the field is `INCLUDED`"] + #[inline(always)] + pub fn is_included(&self) -> bool { + *self == CH18_A::INCLUDED + } +} +#[doc = "Field `CH18` writer - Include or exclude channel 18"] +pub type CH18_W<'a, const O: u8> = crate::BitWriter<'a, u32, CHG_SPEC, CH18_A, O>; +impl<'a, const O: u8> CH18_W<'a, O> { + #[doc = "Exclude"] + #[inline(always)] + pub fn excluded(self) -> &'a mut W { + self.variant(CH18_A::EXCLUDED) + } + #[doc = "Include"] + #[inline(always)] + pub fn included(self) -> &'a mut W { + self.variant(CH18_A::INCLUDED) + } +} +#[doc = "Field `CH19` reader - Include or exclude channel 19"] +pub type CH19_R = crate::BitReader; +#[doc = "Include or exclude channel 19\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum CH19_A { + #[doc = "0: Exclude"] + EXCLUDED = 0, + #[doc = "1: Include"] + INCLUDED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: CH19_A) -> Self { + variant as u8 != 0 + } +} +impl CH19_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> CH19_A { + match self.bits { + false => CH19_A::EXCLUDED, + true => CH19_A::INCLUDED, + } + } + #[doc = "Checks if the value of the field is `EXCLUDED`"] + #[inline(always)] + pub fn is_excluded(&self) -> bool { + *self == CH19_A::EXCLUDED + } + #[doc = "Checks if the value of the field is `INCLUDED`"] + #[inline(always)] + pub fn is_included(&self) -> bool { + *self == CH19_A::INCLUDED + } +} +#[doc = "Field `CH19` writer - Include or exclude channel 19"] +pub type CH19_W<'a, const O: u8> = crate::BitWriter<'a, u32, CHG_SPEC, CH19_A, O>; +impl<'a, const O: u8> CH19_W<'a, O> { + #[doc = "Exclude"] + #[inline(always)] + pub fn excluded(self) -> &'a mut W { + self.variant(CH19_A::EXCLUDED) + } + #[doc = "Include"] + #[inline(always)] + pub fn included(self) -> &'a mut W { + self.variant(CH19_A::INCLUDED) + } +} +#[doc = "Field `CH20` reader - Include or exclude channel 20"] +pub type CH20_R = crate::BitReader; +#[doc = "Include or exclude channel 20\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum CH20_A { + #[doc = "0: Exclude"] + EXCLUDED = 0, + #[doc = "1: Include"] + INCLUDED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: CH20_A) -> Self { + variant as u8 != 0 + } +} +impl CH20_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> CH20_A { + match self.bits { + false => CH20_A::EXCLUDED, + true => CH20_A::INCLUDED, + } + } + #[doc = "Checks if the value of the field is `EXCLUDED`"] + #[inline(always)] + pub fn is_excluded(&self) -> bool { + *self == CH20_A::EXCLUDED + } + #[doc = "Checks if the value of the field is `INCLUDED`"] + #[inline(always)] + pub fn is_included(&self) -> bool { + *self == CH20_A::INCLUDED + } +} +#[doc = "Field `CH20` writer - Include or exclude channel 20"] +pub type CH20_W<'a, const O: u8> = crate::BitWriter<'a, u32, CHG_SPEC, CH20_A, O>; +impl<'a, const O: u8> CH20_W<'a, O> { + #[doc = "Exclude"] + #[inline(always)] + pub fn excluded(self) -> &'a mut W { + self.variant(CH20_A::EXCLUDED) + } + #[doc = "Include"] + #[inline(always)] + pub fn included(self) -> &'a mut W { + self.variant(CH20_A::INCLUDED) + } +} +#[doc = "Field `CH21` reader - Include or exclude channel 21"] +pub type CH21_R = crate::BitReader; +#[doc = "Include or exclude channel 21\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum CH21_A { + #[doc = "0: Exclude"] + EXCLUDED = 0, + #[doc = "1: Include"] + INCLUDED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: CH21_A) -> Self { + variant as u8 != 0 + } +} +impl CH21_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> CH21_A { + match self.bits { + false => CH21_A::EXCLUDED, + true => CH21_A::INCLUDED, + } + } + #[doc = "Checks if the value of the field is `EXCLUDED`"] + #[inline(always)] + pub fn is_excluded(&self) -> bool { + *self == CH21_A::EXCLUDED + } + #[doc = "Checks if the value of the field is `INCLUDED`"] + #[inline(always)] + pub fn is_included(&self) -> bool { + *self == CH21_A::INCLUDED + } +} +#[doc = "Field `CH21` writer - Include or exclude channel 21"] +pub type CH21_W<'a, const O: u8> = crate::BitWriter<'a, u32, CHG_SPEC, CH21_A, O>; +impl<'a, const O: u8> CH21_W<'a, O> { + #[doc = "Exclude"] + #[inline(always)] + pub fn excluded(self) -> &'a mut W { + self.variant(CH21_A::EXCLUDED) + } + #[doc = "Include"] + #[inline(always)] + pub fn included(self) -> &'a mut W { + self.variant(CH21_A::INCLUDED) + } +} +#[doc = "Field `CH22` reader - Include or exclude channel 22"] +pub type CH22_R = crate::BitReader; +#[doc = "Include or exclude channel 22\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum CH22_A { + #[doc = "0: Exclude"] + EXCLUDED = 0, + #[doc = "1: Include"] + INCLUDED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: CH22_A) -> Self { + variant as u8 != 0 + } +} +impl CH22_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> CH22_A { + match self.bits { + false => CH22_A::EXCLUDED, + true => CH22_A::INCLUDED, + } + } + #[doc = "Checks if the value of the field is `EXCLUDED`"] + #[inline(always)] + pub fn is_excluded(&self) -> bool { + *self == CH22_A::EXCLUDED + } + #[doc = "Checks if the value of the field is `INCLUDED`"] + #[inline(always)] + pub fn is_included(&self) -> bool { + *self == CH22_A::INCLUDED + } +} +#[doc = "Field `CH22` writer - Include or exclude channel 22"] +pub type CH22_W<'a, const O: u8> = crate::BitWriter<'a, u32, CHG_SPEC, CH22_A, O>; +impl<'a, const O: u8> CH22_W<'a, O> { + #[doc = "Exclude"] + #[inline(always)] + pub fn excluded(self) -> &'a mut W { + self.variant(CH22_A::EXCLUDED) + } + #[doc = "Include"] + #[inline(always)] + pub fn included(self) -> &'a mut W { + self.variant(CH22_A::INCLUDED) + } +} +#[doc = "Field `CH23` reader - Include or exclude channel 23"] +pub type CH23_R = crate::BitReader; +#[doc = "Include or exclude channel 23\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum CH23_A { + #[doc = "0: Exclude"] + EXCLUDED = 0, + #[doc = "1: Include"] + INCLUDED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: CH23_A) -> Self { + variant as u8 != 0 + } +} +impl CH23_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> CH23_A { + match self.bits { + false => CH23_A::EXCLUDED, + true => CH23_A::INCLUDED, + } + } + #[doc = "Checks if the value of the field is `EXCLUDED`"] + #[inline(always)] + pub fn is_excluded(&self) -> bool { + *self == CH23_A::EXCLUDED + } + #[doc = "Checks if the value of the field is `INCLUDED`"] + #[inline(always)] + pub fn is_included(&self) -> bool { + *self == CH23_A::INCLUDED + } +} +#[doc = "Field `CH23` writer - Include or exclude channel 23"] +pub type CH23_W<'a, const O: u8> = crate::BitWriter<'a, u32, CHG_SPEC, CH23_A, O>; +impl<'a, const O: u8> CH23_W<'a, O> { + #[doc = "Exclude"] + #[inline(always)] + pub fn excluded(self) -> &'a mut W { + self.variant(CH23_A::EXCLUDED) + } + #[doc = "Include"] + #[inline(always)] + pub fn included(self) -> &'a mut W { + self.variant(CH23_A::INCLUDED) + } +} +#[doc = "Field `CH24` reader - Include or exclude channel 24"] +pub type CH24_R = crate::BitReader; +#[doc = "Include or exclude channel 24\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum CH24_A { + #[doc = "0: Exclude"] + EXCLUDED = 0, + #[doc = "1: Include"] + INCLUDED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: CH24_A) -> Self { + variant as u8 != 0 + } +} +impl CH24_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> CH24_A { + match self.bits { + false => CH24_A::EXCLUDED, + true => CH24_A::INCLUDED, + } + } + #[doc = "Checks if the value of the field is `EXCLUDED`"] + #[inline(always)] + pub fn is_excluded(&self) -> bool { + *self == CH24_A::EXCLUDED + } + #[doc = "Checks if the value of the field is `INCLUDED`"] + #[inline(always)] + pub fn is_included(&self) -> bool { + *self == CH24_A::INCLUDED + } +} +#[doc = "Field `CH24` writer - Include or exclude channel 24"] +pub type CH24_W<'a, const O: u8> = crate::BitWriter<'a, u32, CHG_SPEC, CH24_A, O>; +impl<'a, const O: u8> CH24_W<'a, O> { + #[doc = "Exclude"] + #[inline(always)] + pub fn excluded(self) -> &'a mut W { + self.variant(CH24_A::EXCLUDED) + } + #[doc = "Include"] + #[inline(always)] + pub fn included(self) -> &'a mut W { + self.variant(CH24_A::INCLUDED) + } +} +#[doc = "Field `CH25` reader - Include or exclude channel 25"] +pub type CH25_R = crate::BitReader; +#[doc = "Include or exclude channel 25\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum CH25_A { + #[doc = "0: Exclude"] + EXCLUDED = 0, + #[doc = "1: Include"] + INCLUDED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: CH25_A) -> Self { + variant as u8 != 0 + } +} +impl CH25_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> CH25_A { + match self.bits { + false => CH25_A::EXCLUDED, + true => CH25_A::INCLUDED, + } + } + #[doc = "Checks if the value of the field is `EXCLUDED`"] + #[inline(always)] + pub fn is_excluded(&self) -> bool { + *self == CH25_A::EXCLUDED + } + #[doc = "Checks if the value of the field is `INCLUDED`"] + #[inline(always)] + pub fn is_included(&self) -> bool { + *self == CH25_A::INCLUDED + } +} +#[doc = "Field `CH25` writer - Include or exclude channel 25"] +pub type CH25_W<'a, const O: u8> = crate::BitWriter<'a, u32, CHG_SPEC, CH25_A, O>; +impl<'a, const O: u8> CH25_W<'a, O> { + #[doc = "Exclude"] + #[inline(always)] + pub fn excluded(self) -> &'a mut W { + self.variant(CH25_A::EXCLUDED) + } + #[doc = "Include"] + #[inline(always)] + pub fn included(self) -> &'a mut W { + self.variant(CH25_A::INCLUDED) + } +} +#[doc = "Field `CH26` reader - Include or exclude channel 26"] +pub type CH26_R = crate::BitReader; +#[doc = "Include or exclude channel 26\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum CH26_A { + #[doc = "0: Exclude"] + EXCLUDED = 0, + #[doc = "1: Include"] + INCLUDED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: CH26_A) -> Self { + variant as u8 != 0 + } +} +impl CH26_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> CH26_A { + match self.bits { + false => CH26_A::EXCLUDED, + true => CH26_A::INCLUDED, + } + } + #[doc = "Checks if the value of the field is `EXCLUDED`"] + #[inline(always)] + pub fn is_excluded(&self) -> bool { + *self == CH26_A::EXCLUDED + } + #[doc = "Checks if the value of the field is `INCLUDED`"] + #[inline(always)] + pub fn is_included(&self) -> bool { + *self == CH26_A::INCLUDED + } +} +#[doc = "Field `CH26` writer - Include or exclude channel 26"] +pub type CH26_W<'a, const O: u8> = crate::BitWriter<'a, u32, CHG_SPEC, CH26_A, O>; +impl<'a, const O: u8> CH26_W<'a, O> { + #[doc = "Exclude"] + #[inline(always)] + pub fn excluded(self) -> &'a mut W { + self.variant(CH26_A::EXCLUDED) + } + #[doc = "Include"] + #[inline(always)] + pub fn included(self) -> &'a mut W { + self.variant(CH26_A::INCLUDED) + } +} +#[doc = "Field `CH27` reader - Include or exclude channel 27"] +pub type CH27_R = crate::BitReader; +#[doc = "Include or exclude channel 27\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum CH27_A { + #[doc = "0: Exclude"] + EXCLUDED = 0, + #[doc = "1: Include"] + INCLUDED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: CH27_A) -> Self { + variant as u8 != 0 + } +} +impl CH27_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> CH27_A { + match self.bits { + false => CH27_A::EXCLUDED, + true => CH27_A::INCLUDED, + } + } + #[doc = "Checks if the value of the field is `EXCLUDED`"] + #[inline(always)] + pub fn is_excluded(&self) -> bool { + *self == CH27_A::EXCLUDED + } + #[doc = "Checks if the value of the field is `INCLUDED`"] + #[inline(always)] + pub fn is_included(&self) -> bool { + *self == CH27_A::INCLUDED + } +} +#[doc = "Field `CH27` writer - Include or exclude channel 27"] +pub type CH27_W<'a, const O: u8> = crate::BitWriter<'a, u32, CHG_SPEC, CH27_A, O>; +impl<'a, const O: u8> CH27_W<'a, O> { + #[doc = "Exclude"] + #[inline(always)] + pub fn excluded(self) -> &'a mut W { + self.variant(CH27_A::EXCLUDED) + } + #[doc = "Include"] + #[inline(always)] + pub fn included(self) -> &'a mut W { + self.variant(CH27_A::INCLUDED) + } +} +#[doc = "Field `CH28` reader - Include or exclude channel 28"] +pub type CH28_R = crate::BitReader; +#[doc = "Include or exclude channel 28\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum CH28_A { + #[doc = "0: Exclude"] + EXCLUDED = 0, + #[doc = "1: Include"] + INCLUDED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: CH28_A) -> Self { + variant as u8 != 0 + } +} +impl CH28_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> CH28_A { + match self.bits { + false => CH28_A::EXCLUDED, + true => CH28_A::INCLUDED, + } + } + #[doc = "Checks if the value of the field is `EXCLUDED`"] + #[inline(always)] + pub fn is_excluded(&self) -> bool { + *self == CH28_A::EXCLUDED + } + #[doc = "Checks if the value of the field is `INCLUDED`"] + #[inline(always)] + pub fn is_included(&self) -> bool { + *self == CH28_A::INCLUDED + } +} +#[doc = "Field `CH28` writer - Include or exclude channel 28"] +pub type CH28_W<'a, const O: u8> = crate::BitWriter<'a, u32, CHG_SPEC, CH28_A, O>; +impl<'a, const O: u8> CH28_W<'a, O> { + #[doc = "Exclude"] + #[inline(always)] + pub fn excluded(self) -> &'a mut W { + self.variant(CH28_A::EXCLUDED) + } + #[doc = "Include"] + #[inline(always)] + pub fn included(self) -> &'a mut W { + self.variant(CH28_A::INCLUDED) + } +} +#[doc = "Field `CH29` reader - Include or exclude channel 29"] +pub type CH29_R = crate::BitReader; +#[doc = "Include or exclude channel 29\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum CH29_A { + #[doc = "0: Exclude"] + EXCLUDED = 0, + #[doc = "1: Include"] + INCLUDED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: CH29_A) -> Self { + variant as u8 != 0 + } +} +impl CH29_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> CH29_A { + match self.bits { + false => CH29_A::EXCLUDED, + true => CH29_A::INCLUDED, + } + } + #[doc = "Checks if the value of the field is `EXCLUDED`"] + #[inline(always)] + pub fn is_excluded(&self) -> bool { + *self == CH29_A::EXCLUDED + } + #[doc = "Checks if the value of the field is `INCLUDED`"] + #[inline(always)] + pub fn is_included(&self) -> bool { + *self == CH29_A::INCLUDED + } +} +#[doc = "Field `CH29` writer - Include or exclude channel 29"] +pub type CH29_W<'a, const O: u8> = crate::BitWriter<'a, u32, CHG_SPEC, CH29_A, O>; +impl<'a, const O: u8> CH29_W<'a, O> { + #[doc = "Exclude"] + #[inline(always)] + pub fn excluded(self) -> &'a mut W { + self.variant(CH29_A::EXCLUDED) + } + #[doc = "Include"] + #[inline(always)] + pub fn included(self) -> &'a mut W { + self.variant(CH29_A::INCLUDED) + } +} +#[doc = "Field `CH30` reader - Include or exclude channel 30"] +pub type CH30_R = crate::BitReader; +#[doc = "Include or exclude channel 30\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum CH30_A { + #[doc = "0: Exclude"] + EXCLUDED = 0, + #[doc = "1: Include"] + INCLUDED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: CH30_A) -> Self { + variant as u8 != 0 + } +} +impl CH30_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> CH30_A { + match self.bits { + false => CH30_A::EXCLUDED, + true => CH30_A::INCLUDED, + } + } + #[doc = "Checks if the value of the field is `EXCLUDED`"] + #[inline(always)] + pub fn is_excluded(&self) -> bool { + *self == CH30_A::EXCLUDED + } + #[doc = "Checks if the value of the field is `INCLUDED`"] + #[inline(always)] + pub fn is_included(&self) -> bool { + *self == CH30_A::INCLUDED + } +} +#[doc = "Field `CH30` writer - Include or exclude channel 30"] +pub type CH30_W<'a, const O: u8> = crate::BitWriter<'a, u32, CHG_SPEC, CH30_A, O>; +impl<'a, const O: u8> CH30_W<'a, O> { + #[doc = "Exclude"] + #[inline(always)] + pub fn excluded(self) -> &'a mut W { + self.variant(CH30_A::EXCLUDED) + } + #[doc = "Include"] + #[inline(always)] + pub fn included(self) -> &'a mut W { + self.variant(CH30_A::INCLUDED) + } +} +#[doc = "Field `CH31` reader - Include or exclude channel 31"] +pub type CH31_R = crate::BitReader; +#[doc = "Include or exclude channel 31\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum CH31_A { + #[doc = "0: Exclude"] + EXCLUDED = 0, + #[doc = "1: Include"] + INCLUDED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: CH31_A) -> Self { + variant as u8 != 0 + } +} +impl CH31_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> CH31_A { + match self.bits { + false => CH31_A::EXCLUDED, + true => CH31_A::INCLUDED, + } + } + #[doc = "Checks if the value of the field is `EXCLUDED`"] + #[inline(always)] + pub fn is_excluded(&self) -> bool { + *self == CH31_A::EXCLUDED + } + #[doc = "Checks if the value of the field is `INCLUDED`"] + #[inline(always)] + pub fn is_included(&self) -> bool { + *self == CH31_A::INCLUDED + } +} +#[doc = "Field `CH31` writer - Include or exclude channel 31"] +pub type CH31_W<'a, const O: u8> = crate::BitWriter<'a, u32, CHG_SPEC, CH31_A, O>; +impl<'a, const O: u8> CH31_W<'a, O> { + #[doc = "Exclude"] + #[inline(always)] + pub fn excluded(self) -> &'a mut W { + self.variant(CH31_A::EXCLUDED) + } + #[doc = "Include"] + #[inline(always)] + pub fn included(self) -> &'a mut W { + self.variant(CH31_A::INCLUDED) + } +} +impl R { + #[doc = "Bit 0 - Include or exclude channel 0"] + #[inline(always)] + pub fn ch0(&self) -> CH0_R { + CH0_R::new((self.bits & 1) != 0) + } + #[doc = "Bit 1 - Include or exclude channel 1"] + #[inline(always)] + pub fn ch1(&self) -> CH1_R { + CH1_R::new(((self.bits >> 1) & 1) != 0) + } + #[doc = "Bit 2 - Include or exclude channel 2"] + #[inline(always)] + pub fn ch2(&self) -> CH2_R { + CH2_R::new(((self.bits >> 2) & 1) != 0) + } + #[doc = "Bit 3 - Include or exclude channel 3"] + #[inline(always)] + pub fn ch3(&self) -> CH3_R { + CH3_R::new(((self.bits >> 3) & 1) != 0) + } + #[doc = "Bit 4 - Include or exclude channel 4"] + #[inline(always)] + pub fn ch4(&self) -> CH4_R { + CH4_R::new(((self.bits >> 4) & 1) != 0) + } + #[doc = "Bit 5 - Include or exclude channel 5"] + #[inline(always)] + pub fn ch5(&self) -> CH5_R { + CH5_R::new(((self.bits >> 5) & 1) != 0) + } + #[doc = "Bit 6 - Include or exclude channel 6"] + #[inline(always)] + pub fn ch6(&self) -> CH6_R { + CH6_R::new(((self.bits >> 6) & 1) != 0) + } + #[doc = "Bit 7 - Include or exclude channel 7"] + #[inline(always)] + pub fn ch7(&self) -> CH7_R { + CH7_R::new(((self.bits >> 7) & 1) != 0) + } + #[doc = "Bit 8 - Include or exclude channel 8"] + #[inline(always)] + pub fn ch8(&self) -> CH8_R { + CH8_R::new(((self.bits >> 8) & 1) != 0) + } + #[doc = "Bit 9 - Include or exclude channel 9"] + #[inline(always)] + pub fn ch9(&self) -> CH9_R { + CH9_R::new(((self.bits >> 9) & 1) != 0) + } + #[doc = "Bit 10 - Include or exclude channel 10"] + #[inline(always)] + pub fn ch10(&self) -> CH10_R { + CH10_R::new(((self.bits >> 10) & 1) != 0) + } + #[doc = "Bit 11 - Include or exclude channel 11"] + #[inline(always)] + pub fn ch11(&self) -> CH11_R { + CH11_R::new(((self.bits >> 11) & 1) != 0) + } + #[doc = "Bit 12 - Include or exclude channel 12"] + #[inline(always)] + pub fn ch12(&self) -> CH12_R { + CH12_R::new(((self.bits >> 12) & 1) != 0) + } + #[doc = "Bit 13 - Include or exclude channel 13"] + #[inline(always)] + pub fn ch13(&self) -> CH13_R { + CH13_R::new(((self.bits >> 13) & 1) != 0) + } + #[doc = "Bit 14 - Include or exclude channel 14"] + #[inline(always)] + pub fn ch14(&self) -> CH14_R { + CH14_R::new(((self.bits >> 14) & 1) != 0) + } + #[doc = "Bit 15 - Include or exclude channel 15"] + #[inline(always)] + pub fn ch15(&self) -> CH15_R { + CH15_R::new(((self.bits >> 15) & 1) != 0) + } + #[doc = "Bit 16 - Include or exclude channel 16"] + #[inline(always)] + pub fn ch16(&self) -> CH16_R { + CH16_R::new(((self.bits >> 16) & 1) != 0) + } + #[doc = "Bit 17 - Include or exclude channel 17"] + #[inline(always)] + pub fn ch17(&self) -> CH17_R { + CH17_R::new(((self.bits >> 17) & 1) != 0) + } + #[doc = "Bit 18 - Include or exclude channel 18"] + #[inline(always)] + pub fn ch18(&self) -> CH18_R { + CH18_R::new(((self.bits >> 18) & 1) != 0) + } + #[doc = "Bit 19 - Include or exclude channel 19"] + #[inline(always)] + pub fn ch19(&self) -> CH19_R { + CH19_R::new(((self.bits >> 19) & 1) != 0) + } + #[doc = "Bit 20 - Include or exclude channel 20"] + #[inline(always)] + pub fn ch20(&self) -> CH20_R { + CH20_R::new(((self.bits >> 20) & 1) != 0) + } + #[doc = "Bit 21 - Include or exclude channel 21"] + #[inline(always)] + pub fn ch21(&self) -> CH21_R { + CH21_R::new(((self.bits >> 21) & 1) != 0) + } + #[doc = "Bit 22 - Include or exclude channel 22"] + #[inline(always)] + pub fn ch22(&self) -> CH22_R { + CH22_R::new(((self.bits >> 22) & 1) != 0) + } + #[doc = "Bit 23 - Include or exclude channel 23"] + #[inline(always)] + pub fn ch23(&self) -> CH23_R { + CH23_R::new(((self.bits >> 23) & 1) != 0) + } + #[doc = "Bit 24 - Include or exclude channel 24"] + #[inline(always)] + pub fn ch24(&self) -> CH24_R { + CH24_R::new(((self.bits >> 24) & 1) != 0) + } + #[doc = "Bit 25 - Include or exclude channel 25"] + #[inline(always)] + pub fn ch25(&self) -> CH25_R { + CH25_R::new(((self.bits >> 25) & 1) != 0) + } + #[doc = "Bit 26 - Include or exclude channel 26"] + #[inline(always)] + pub fn ch26(&self) -> CH26_R { + CH26_R::new(((self.bits >> 26) & 1) != 0) + } + #[doc = "Bit 27 - Include or exclude channel 27"] + #[inline(always)] + pub fn ch27(&self) -> CH27_R { + CH27_R::new(((self.bits >> 27) & 1) != 0) + } + #[doc = "Bit 28 - Include or exclude channel 28"] + #[inline(always)] + pub fn ch28(&self) -> CH28_R { + CH28_R::new(((self.bits >> 28) & 1) != 0) + } + #[doc = "Bit 29 - Include or exclude channel 29"] + #[inline(always)] + pub fn ch29(&self) -> CH29_R { + CH29_R::new(((self.bits >> 29) & 1) != 0) + } + #[doc = "Bit 30 - Include or exclude channel 30"] + #[inline(always)] + pub fn ch30(&self) -> CH30_R { + CH30_R::new(((self.bits >> 30) & 1) != 0) + } + #[doc = "Bit 31 - Include or exclude channel 31"] + #[inline(always)] + pub fn ch31(&self) -> CH31_R { + CH31_R::new(((self.bits >> 31) & 1) != 0) + } +} +impl W { + #[doc = "Bit 0 - Include or exclude channel 0"] + #[inline(always)] + #[must_use] + pub fn ch0(&mut self) -> CH0_W<0> { + CH0_W::new(self) + } + #[doc = "Bit 1 - Include or exclude channel 1"] + #[inline(always)] + #[must_use] + pub fn ch1(&mut self) -> CH1_W<1> { + CH1_W::new(self) + } + #[doc = "Bit 2 - Include or exclude channel 2"] + #[inline(always)] + #[must_use] + pub fn ch2(&mut self) -> CH2_W<2> { + CH2_W::new(self) + } + #[doc = "Bit 3 - Include or exclude channel 3"] + #[inline(always)] + #[must_use] + pub fn ch3(&mut self) -> CH3_W<3> { + CH3_W::new(self) + } + #[doc = "Bit 4 - Include or exclude channel 4"] + #[inline(always)] + #[must_use] + pub fn ch4(&mut self) -> CH4_W<4> { + CH4_W::new(self) + } + #[doc = "Bit 5 - Include or exclude channel 5"] + #[inline(always)] + #[must_use] + pub fn ch5(&mut self) -> CH5_W<5> { + CH5_W::new(self) + } + #[doc = "Bit 6 - Include or exclude channel 6"] + #[inline(always)] + #[must_use] + pub fn ch6(&mut self) -> CH6_W<6> { + CH6_W::new(self) + } + #[doc = "Bit 7 - Include or exclude channel 7"] + #[inline(always)] + #[must_use] + pub fn ch7(&mut self) -> CH7_W<7> { + CH7_W::new(self) + } + #[doc = "Bit 8 - Include or exclude channel 8"] + #[inline(always)] + #[must_use] + pub fn ch8(&mut self) -> CH8_W<8> { + CH8_W::new(self) + } + #[doc = "Bit 9 - Include or exclude channel 9"] + #[inline(always)] + #[must_use] + pub fn ch9(&mut self) -> CH9_W<9> { + CH9_W::new(self) + } + #[doc = "Bit 10 - Include or exclude channel 10"] + #[inline(always)] + #[must_use] + pub fn ch10(&mut self) -> CH10_W<10> { + CH10_W::new(self) + } + #[doc = "Bit 11 - Include or exclude channel 11"] + #[inline(always)] + #[must_use] + pub fn ch11(&mut self) -> CH11_W<11> { + CH11_W::new(self) + } + #[doc = "Bit 12 - Include or exclude channel 12"] + #[inline(always)] + #[must_use] + pub fn ch12(&mut self) -> CH12_W<12> { + CH12_W::new(self) + } + #[doc = "Bit 13 - Include or exclude channel 13"] + #[inline(always)] + #[must_use] + pub fn ch13(&mut self) -> CH13_W<13> { + CH13_W::new(self) + } + #[doc = "Bit 14 - Include or exclude channel 14"] + #[inline(always)] + #[must_use] + pub fn ch14(&mut self) -> CH14_W<14> { + CH14_W::new(self) + } + #[doc = "Bit 15 - Include or exclude channel 15"] + #[inline(always)] + #[must_use] + pub fn ch15(&mut self) -> CH15_W<15> { + CH15_W::new(self) + } + #[doc = "Bit 16 - Include or exclude channel 16"] + #[inline(always)] + #[must_use] + pub fn ch16(&mut self) -> CH16_W<16> { + CH16_W::new(self) + } + #[doc = "Bit 17 - Include or exclude channel 17"] + #[inline(always)] + #[must_use] + pub fn ch17(&mut self) -> CH17_W<17> { + CH17_W::new(self) + } + #[doc = "Bit 18 - Include or exclude channel 18"] + #[inline(always)] + #[must_use] + pub fn ch18(&mut self) -> CH18_W<18> { + CH18_W::new(self) + } + #[doc = "Bit 19 - Include or exclude channel 19"] + #[inline(always)] + #[must_use] + pub fn ch19(&mut self) -> CH19_W<19> { + CH19_W::new(self) + } + #[doc = "Bit 20 - Include or exclude channel 20"] + #[inline(always)] + #[must_use] + pub fn ch20(&mut self) -> CH20_W<20> { + CH20_W::new(self) + } + #[doc = "Bit 21 - Include or exclude channel 21"] + #[inline(always)] + #[must_use] + pub fn ch21(&mut self) -> CH21_W<21> { + CH21_W::new(self) + } + #[doc = "Bit 22 - Include or exclude channel 22"] + #[inline(always)] + #[must_use] + pub fn ch22(&mut self) -> CH22_W<22> { + CH22_W::new(self) + } + #[doc = "Bit 23 - Include or exclude channel 23"] + #[inline(always)] + #[must_use] + pub fn ch23(&mut self) -> CH23_W<23> { + CH23_W::new(self) + } + #[doc = "Bit 24 - Include or exclude channel 24"] + #[inline(always)] + #[must_use] + pub fn ch24(&mut self) -> CH24_W<24> { + CH24_W::new(self) + } + #[doc = "Bit 25 - Include or exclude channel 25"] + #[inline(always)] + #[must_use] + pub fn ch25(&mut self) -> CH25_W<25> { + CH25_W::new(self) + } + #[doc = "Bit 26 - Include or exclude channel 26"] + #[inline(always)] + #[must_use] + pub fn ch26(&mut self) -> CH26_W<26> { + CH26_W::new(self) + } + #[doc = "Bit 27 - Include or exclude channel 27"] + #[inline(always)] + #[must_use] + pub fn ch27(&mut self) -> CH27_W<27> { + CH27_W::new(self) + } + #[doc = "Bit 28 - Include or exclude channel 28"] + #[inline(always)] + #[must_use] + pub fn ch28(&mut self) -> CH28_W<28> { + CH28_W::new(self) + } + #[doc = "Bit 29 - Include or exclude channel 29"] + #[inline(always)] + #[must_use] + pub fn ch29(&mut self) -> CH29_W<29> { + CH29_W::new(self) + } + #[doc = "Bit 30 - Include or exclude channel 30"] + #[inline(always)] + #[must_use] + pub fn ch30(&mut self) -> CH30_W<30> { + CH30_W::new(self) + } + #[doc = "Bit 31 - Include or exclude channel 31"] + #[inline(always)] + #[must_use] + pub fn ch31(&mut self) -> CH31_W<31> { + CH31_W::new(self) + } + #[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 = "Description collection: Channel group n\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 [chg](index.html) module"] +pub struct CHG_SPEC; +impl crate::RegisterSpec for CHG_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [chg::R](R) reader structure"] +impl crate::Readable for CHG_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [chg::W](W) writer structure"] +impl crate::Writable for CHG_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets CHG[%s] +to value 0"] +impl crate::Resettable for CHG_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/ppi/fork.rs b/down-the-stack/dk_pac/src/ppi/fork.rs new file mode 100644 index 0000000..7baf9bb --- /dev/null +++ b/down-the-stack/dk_pac/src/ppi/fork.rs @@ -0,0 +1,10 @@ +#[doc = r"Register block"] +#[repr(C)] +pub struct FORK { + #[doc = "0x00 - Description cluster: Channel n task end-point"] + pub tep: TEP, +} +#[doc = "TEP (rw) register accessor: an alias for `Reg`"] +pub type TEP = crate::Reg; +#[doc = "Description cluster: Channel n task end-point"] +pub mod tep; diff --git a/down-the-stack/dk_pac/src/ppi/fork/tep.rs b/down-the-stack/dk_pac/src/ppi/fork/tep.rs new file mode 100644 index 0000000..bffc901 --- /dev/null +++ b/down-the-stack/dk_pac/src/ppi/fork/tep.rs @@ -0,0 +1,80 @@ +#[doc = "Register `TEP` 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 `TEP` 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 `TEP` reader - Pointer to task register"] +pub type TEP_R = crate::FieldReader; +#[doc = "Field `TEP` writer - Pointer to task register"] +pub type TEP_W<'a, const O: u8> = crate::FieldWriter<'a, u32, TEP_SPEC, u32, u32, 32, O>; +impl R { + #[doc = "Bits 0:31 - Pointer to task register"] + #[inline(always)] + pub fn tep(&self) -> TEP_R { + TEP_R::new(self.bits) + } +} +impl W { + #[doc = "Bits 0:31 - Pointer to task register"] + #[inline(always)] + #[must_use] + pub fn tep(&mut self) -> TEP_W<0> { + TEP_W::new(self) + } + #[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 = "Description cluster: Channel n task end-point\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 [tep](index.html) module"] +pub struct TEP_SPEC; +impl crate::RegisterSpec for TEP_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [tep::R](R) reader structure"] +impl crate::Readable for TEP_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [tep::W](W) writer structure"] +impl crate::Writable for TEP_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets TEP to value 0"] +impl crate::Resettable for TEP_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/ppi/tasks_chg.rs b/down-the-stack/dk_pac/src/ppi/tasks_chg.rs new file mode 100644 index 0000000..9915b80 --- /dev/null +++ b/down-the-stack/dk_pac/src/ppi/tasks_chg.rs @@ -0,0 +1,16 @@ +#[doc = r"Register block"] +#[repr(C)] +pub struct TASKS_CHG { + #[doc = "0x00 - Description cluster: Enable channel group n"] + pub en: EN, + #[doc = "0x04 - Description cluster: Disable channel group n"] + pub dis: DIS, +} +#[doc = "EN (w) register accessor: an alias for `Reg`"] +pub type EN = crate::Reg; +#[doc = "Description cluster: Enable channel group n"] +pub mod en; +#[doc = "DIS (w) register accessor: an alias for `Reg`"] +pub type DIS = crate::Reg; +#[doc = "Description cluster: Disable channel group n"] +pub mod dis; diff --git a/down-the-stack/dk_pac/src/ppi/tasks_chg/dis.rs b/down-the-stack/dk_pac/src/ppi/tasks_chg/dis.rs new file mode 100644 index 0000000..83eabf7 --- /dev/null +++ b/down-the-stack/dk_pac/src/ppi/tasks_chg/dis.rs @@ -0,0 +1,71 @@ +#[doc = "Register `DIS` 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 = "Disable channel group n\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum DIS_AW { + #[doc = "1: Trigger task"] + TRIGGER = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: DIS_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `DIS` writer - Disable channel group n"] +pub type DIS_W<'a, const O: u8> = crate::BitWriter<'a, u32, DIS_SPEC, DIS_AW, O>; +impl<'a, const O: u8> DIS_W<'a, O> { + #[doc = "Trigger task"] + #[inline(always)] + pub fn trigger(self) -> &'a mut W { + self.variant(DIS_AW::TRIGGER) + } +} +impl W { + #[doc = "Bit 0 - Disable channel group n"] + #[inline(always)] + #[must_use] + pub fn dis(&mut self) -> DIS_W<0> { + 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 + } +} +#[doc = "Description cluster: Disable channel group n\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 [dis](index.html) module"] +pub struct DIS_SPEC; +impl crate::RegisterSpec for DIS_SPEC { + type Ux = u32; +} +#[doc = "`write(|w| ..)` method takes [dis::W](W) writer structure"] +impl crate::Writable for DIS_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets DIS to value 0"] +impl crate::Resettable for DIS_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/ppi/tasks_chg/en.rs b/down-the-stack/dk_pac/src/ppi/tasks_chg/en.rs new file mode 100644 index 0000000..254b30c --- /dev/null +++ b/down-the-stack/dk_pac/src/ppi/tasks_chg/en.rs @@ -0,0 +1,71 @@ +#[doc = "Register `EN` 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 = "Enable channel group n\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum EN_AW { + #[doc = "1: Trigger task"] + TRIGGER = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: EN_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `EN` writer - Enable channel group n"] +pub type EN_W<'a, const O: u8> = crate::BitWriter<'a, u32, EN_SPEC, EN_AW, O>; +impl<'a, const O: u8> EN_W<'a, O> { + #[doc = "Trigger task"] + #[inline(always)] + pub fn trigger(self) -> &'a mut W { + self.variant(EN_AW::TRIGGER) + } +} +impl W { + #[doc = "Bit 0 - Enable channel group n"] + #[inline(always)] + #[must_use] + pub fn en(&mut self) -> EN_W<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 + } +} +#[doc = "Description cluster: Enable channel group n\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 [en](index.html) module"] +pub struct EN_SPEC; +impl crate::RegisterSpec for EN_SPEC { + type Ux = u32; +} +#[doc = "`write(|w| ..)` method takes [en::W](W) writer structure"] +impl crate::Writable for 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 EN to value 0"] +impl crate::Resettable for EN_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/pwm0.rs b/down-the-stack/dk_pac/src/pwm0.rs new file mode 100644 index 0000000..1be4941 --- /dev/null +++ b/down-the-stack/dk_pac/src/pwm0.rs @@ -0,0 +1,136 @@ +#[doc = r"Register block"] +#[repr(C)] +pub struct RegisterBlock { + _reserved0: [u8; 0x04], + #[doc = "0x04 - Stops PWM pulse generation on all channels at the end of current PWM period, and stops sequence playback"] + pub tasks_stop: TASKS_STOP, + #[doc = "0x08..0x10 - Description collection: Loads the first PWM value on all enabled channels from sequence n, and starts playing that sequence at the rate defined in SEQ\\[n\\]REFRESH and/or DECODER.MODE. Causes PWM generation to start it was not running."] + pub tasks_seqstart: [TASKS_SEQSTART; 2], + #[doc = "0x10 - Steps by one value in the current sequence on all enabled channels if DECODER.MODE=NextStep. Does not cause PWM generation to start it was not running."] + pub tasks_nextstep: TASKS_NEXTSTEP, + _reserved3: [u8; 0xf0], + #[doc = "0x104 - Response to STOP task, emitted when PWM pulses are no longer generated"] + pub events_stopped: EVENTS_STOPPED, + #[doc = "0x108..0x110 - Description collection: First PWM period started on sequence n"] + pub events_seqstarted: [EVENTS_SEQSTARTED; 2], + #[doc = "0x110..0x118 - Description collection: Emitted at end of every sequence n, when last value from RAM has been applied to wave counter"] + pub events_seqend: [EVENTS_SEQEND; 2], + #[doc = "0x118 - Emitted at the end of each PWM period"] + pub events_pwmperiodend: EVENTS_PWMPERIODEND, + #[doc = "0x11c - Concatenated sequences have been played the amount of times defined in LOOP.CNT"] + pub events_loopsdone: EVENTS_LOOPSDONE, + _reserved8: [u8; 0xe0], + #[doc = "0x200 - Shortcuts between local events and tasks"] + pub shorts: SHORTS, + _reserved9: [u8; 0xfc], + #[doc = "0x300 - Enable or disable interrupt"] + pub inten: INTEN, + #[doc = "0x304 - Enable interrupt"] + pub intenset: INTENSET, + #[doc = "0x308 - Disable interrupt"] + pub intenclr: INTENCLR, + _reserved12: [u8; 0x01f4], + #[doc = "0x500 - PWM module enable register"] + pub enable: ENABLE, + #[doc = "0x504 - Selects operating mode of the wave counter"] + pub mode: MODE, + #[doc = "0x508 - Value up to which the pulse generator counter counts"] + pub countertop: COUNTERTOP, + #[doc = "0x50c - Configuration for PWM_CLK"] + pub prescaler: PRESCALER, + #[doc = "0x510 - Configuration of the decoder"] + pub decoder: DECODER, + #[doc = "0x514 - Amount of playback of a loop"] + pub loop_: LOOP, + _reserved18: [u8; 0x08], + #[doc = "0x520..0x530 - Unspecified"] + pub seq0: SEQ, + _reserved19: [u8; 0x10], + #[doc = "0x540..0x550 - Unspecified"] + pub seq1: SEQ, + _reserved20: [u8; 0x10], + #[doc = "0x560..0x570 - Unspecified"] + pub psel: PSEL, +} +#[doc = "TASKS_STOP (w) register accessor: an alias for `Reg`"] +pub type TASKS_STOP = crate::Reg; +#[doc = "Stops PWM pulse generation on all channels at the end of current PWM period, and stops sequence playback"] +pub mod tasks_stop; +#[doc = "TASKS_SEQSTART (w) register accessor: an alias for `Reg`"] +pub type TASKS_SEQSTART = crate::Reg; +#[doc = "Description collection: Loads the first PWM value on all enabled channels from sequence n, and starts playing that sequence at the rate defined in SEQ\\[n\\]REFRESH and/or DECODER.MODE. Causes PWM generation to start it was not running."] +pub mod tasks_seqstart; +#[doc = "TASKS_NEXTSTEP (w) register accessor: an alias for `Reg`"] +pub type TASKS_NEXTSTEP = crate::Reg; +#[doc = "Steps by one value in the current sequence on all enabled channels if DECODER.MODE=NextStep. Does not cause PWM generation to start it was not running."] +pub mod tasks_nextstep; +#[doc = "EVENTS_STOPPED (rw) register accessor: an alias for `Reg`"] +pub type EVENTS_STOPPED = crate::Reg; +#[doc = "Response to STOP task, emitted when PWM pulses are no longer generated"] +pub mod events_stopped; +#[doc = "EVENTS_SEQSTARTED (rw) register accessor: an alias for `Reg`"] +pub type EVENTS_SEQSTARTED = crate::Reg; +#[doc = "Description collection: First PWM period started on sequence n"] +pub mod events_seqstarted; +#[doc = "EVENTS_SEQEND (rw) register accessor: an alias for `Reg`"] +pub type EVENTS_SEQEND = crate::Reg; +#[doc = "Description collection: Emitted at end of every sequence n, when last value from RAM has been applied to wave counter"] +pub mod events_seqend; +#[doc = "EVENTS_PWMPERIODEND (rw) register accessor: an alias for `Reg`"] +pub type EVENTS_PWMPERIODEND = crate::Reg; +#[doc = "Emitted at the end of each PWM period"] +pub mod events_pwmperiodend; +#[doc = "EVENTS_LOOPSDONE (rw) register accessor: an alias for `Reg`"] +pub type EVENTS_LOOPSDONE = crate::Reg; +#[doc = "Concatenated sequences have been played the amount of times defined in LOOP.CNT"] +pub mod events_loopsdone; +#[doc = "SHORTS (rw) register accessor: an alias for `Reg`"] +pub type SHORTS = crate::Reg; +#[doc = "Shortcuts between local events and tasks"] +pub mod shorts; +#[doc = "INTEN (rw) register accessor: an alias for `Reg`"] +pub type INTEN = crate::Reg; +#[doc = "Enable or disable interrupt"] +pub mod inten; +#[doc = "INTENSET (rw) register accessor: an alias for `Reg`"] +pub type INTENSET = crate::Reg; +#[doc = "Enable interrupt"] +pub mod intenset; +#[doc = "INTENCLR (rw) register accessor: an alias for `Reg`"] +pub type INTENCLR = crate::Reg; +#[doc = "Disable interrupt"] +pub mod intenclr; +#[doc = "ENABLE (rw) register accessor: an alias for `Reg`"] +pub type ENABLE = crate::Reg; +#[doc = "PWM module enable register"] +pub mod enable; +#[doc = "MODE (rw) register accessor: an alias for `Reg`"] +pub type MODE = crate::Reg; +#[doc = "Selects operating mode of the wave counter"] +pub mod mode; +#[doc = "COUNTERTOP (rw) register accessor: an alias for `Reg`"] +pub type COUNTERTOP = crate::Reg; +#[doc = "Value up to which the pulse generator counter counts"] +pub mod countertop; +#[doc = "PRESCALER (rw) register accessor: an alias for `Reg`"] +pub type PRESCALER = crate::Reg; +#[doc = "Configuration for PWM_CLK"] +pub mod prescaler; +#[doc = "DECODER (rw) register accessor: an alias for `Reg`"] +pub type DECODER = crate::Reg; +#[doc = "Configuration of the decoder"] +pub mod decoder; +#[doc = "LOOP (rw) register accessor: an alias for `Reg`"] +pub type LOOP = crate::Reg; +#[doc = "Amount of playback of a loop"] +pub mod loop_; +#[doc = "Unspecified"] +pub use self::seq::SEQ; +#[doc = r"Cluster"] +#[doc = "Unspecified"] +pub mod seq; +#[doc = "Unspecified"] +pub use self::psel::PSEL; +#[doc = r"Cluster"] +#[doc = "Unspecified"] +pub mod psel; diff --git a/down-the-stack/dk_pac/src/pwm0/countertop.rs b/down-the-stack/dk_pac/src/pwm0/countertop.rs new file mode 100644 index 0000000..dea3500 --- /dev/null +++ b/down-the-stack/dk_pac/src/pwm0/countertop.rs @@ -0,0 +1,81 @@ +#[doc = "Register `COUNTERTOP` 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 `COUNTERTOP` 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 `COUNTERTOP` reader - Value up to which the pulse generator counter counts. This register is ignored when DECODER.MODE=WaveForm and only values from RAM will be used."] +pub type COUNTERTOP_R = crate::FieldReader; +#[doc = "Field `COUNTERTOP` writer - Value up to which the pulse generator counter counts. This register is ignored when DECODER.MODE=WaveForm and only values from RAM will be used."] +pub type COUNTERTOP_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, COUNTERTOP_SPEC, u16, u16, 15, O>; +impl R { + #[doc = "Bits 0:14 - Value up to which the pulse generator counter counts. This register is ignored when DECODER.MODE=WaveForm and only values from RAM will be used."] + #[inline(always)] + pub fn countertop(&self) -> COUNTERTOP_R { + COUNTERTOP_R::new((self.bits & 0x7fff) as u16) + } +} +impl W { + #[doc = "Bits 0:14 - Value up to which the pulse generator counter counts. This register is ignored when DECODER.MODE=WaveForm and only values from RAM will be used."] + #[inline(always)] + #[must_use] + pub fn countertop(&mut self) -> COUNTERTOP_W<0> { + COUNTERTOP_W::new(self) + } + #[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 = "Value up to which the pulse generator counter counts\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 [countertop](index.html) module"] +pub struct COUNTERTOP_SPEC; +impl crate::RegisterSpec for COUNTERTOP_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [countertop::R](R) reader structure"] +impl crate::Readable for COUNTERTOP_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [countertop::W](W) writer structure"] +impl crate::Writable for COUNTERTOP_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets COUNTERTOP to value 0x03ff"] +impl crate::Resettable for COUNTERTOP_SPEC { + const RESET_VALUE: Self::Ux = 0x03ff; +} diff --git a/down-the-stack/dk_pac/src/pwm0/decoder.rs b/down-the-stack/dk_pac/src/pwm0/decoder.rs new file mode 100644 index 0000000..a2523d3 --- /dev/null +++ b/down-the-stack/dk_pac/src/pwm0/decoder.rs @@ -0,0 +1,215 @@ +#[doc = "Register `DECODER` 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 `DECODER` 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 `LOAD` reader - How a sequence is read from RAM and spread to the compare register"] +pub type LOAD_R = crate::FieldReader; +#[doc = "How a sequence is read from RAM and spread to the compare register\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +#[repr(u8)] +pub enum LOAD_A { + #[doc = "0: 1st half word (16-bit) used in all PWM channels 0..3"] + COMMON = 0, + #[doc = "1: 1st half word (16-bit) used in channel 0..1; 2nd word in channel 2..3"] + GROUPED = 1, + #[doc = "2: 1st half word (16-bit) in ch.0; 2nd in ch.1; ...; 4th in ch.3"] + INDIVIDUAL = 2, + #[doc = "3: 1st half word (16-bit) in ch.0; 2nd in ch.1; ...; 4th in COUNTERTOP"] + WAVE_FORM = 3, +} +impl From for u8 { + #[inline(always)] + fn from(variant: LOAD_A) -> Self { + variant as _ + } +} +impl LOAD_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> LOAD_A { + match self.bits { + 0 => LOAD_A::COMMON, + 1 => LOAD_A::GROUPED, + 2 => LOAD_A::INDIVIDUAL, + 3 => LOAD_A::WAVE_FORM, + _ => unreachable!(), + } + } + #[doc = "Checks if the value of the field is `COMMON`"] + #[inline(always)] + pub fn is_common(&self) -> bool { + *self == LOAD_A::COMMON + } + #[doc = "Checks if the value of the field is `GROUPED`"] + #[inline(always)] + pub fn is_grouped(&self) -> bool { + *self == LOAD_A::GROUPED + } + #[doc = "Checks if the value of the field is `INDIVIDUAL`"] + #[inline(always)] + pub fn is_individual(&self) -> bool { + *self == LOAD_A::INDIVIDUAL + } + #[doc = "Checks if the value of the field is `WAVE_FORM`"] + #[inline(always)] + pub fn is_wave_form(&self) -> bool { + *self == LOAD_A::WAVE_FORM + } +} +#[doc = "Field `LOAD` writer - How a sequence is read from RAM and spread to the compare register"] +pub type LOAD_W<'a, const O: u8> = crate::FieldWriterSafe<'a, u32, DECODER_SPEC, u8, LOAD_A, 2, O>; +impl<'a, const O: u8> LOAD_W<'a, O> { + #[doc = "1st half word (16-bit) used in all PWM channels 0..3"] + #[inline(always)] + pub fn common(self) -> &'a mut W { + self.variant(LOAD_A::COMMON) + } + #[doc = "1st half word (16-bit) used in channel 0..1; 2nd word in channel 2..3"] + #[inline(always)] + pub fn grouped(self) -> &'a mut W { + self.variant(LOAD_A::GROUPED) + } + #[doc = "1st half word (16-bit) in ch.0; 2nd in ch.1; ...; 4th in ch.3"] + #[inline(always)] + pub fn individual(self) -> &'a mut W { + self.variant(LOAD_A::INDIVIDUAL) + } + #[doc = "1st half word (16-bit) in ch.0; 2nd in ch.1; ...; 4th in COUNTERTOP"] + #[inline(always)] + pub fn wave_form(self) -> &'a mut W { + self.variant(LOAD_A::WAVE_FORM) + } +} +#[doc = "Field `MODE` reader - Selects source for advancing the active sequence"] +pub type MODE_R = crate::BitReader; +#[doc = "Selects source for advancing the active sequence\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum MODE_A { + #[doc = "0: SEQ\\[n\\].REFRESH is used to determine loading internal compare registers"] + REFRESH_COUNT = 0, + #[doc = "1: NEXTSTEP task causes a new value to be loaded to internal compare registers"] + NEXT_STEP = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: MODE_A) -> Self { + variant as u8 != 0 + } +} +impl MODE_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> MODE_A { + match self.bits { + false => MODE_A::REFRESH_COUNT, + true => MODE_A::NEXT_STEP, + } + } + #[doc = "Checks if the value of the field is `REFRESH_COUNT`"] + #[inline(always)] + pub fn is_refresh_count(&self) -> bool { + *self == MODE_A::REFRESH_COUNT + } + #[doc = "Checks if the value of the field is `NEXT_STEP`"] + #[inline(always)] + pub fn is_next_step(&self) -> bool { + *self == MODE_A::NEXT_STEP + } +} +#[doc = "Field `MODE` writer - Selects source for advancing the active sequence"] +pub type MODE_W<'a, const O: u8> = crate::BitWriter<'a, u32, DECODER_SPEC, MODE_A, O>; +impl<'a, const O: u8> MODE_W<'a, O> { + #[doc = "SEQ\\[n\\].REFRESH is used to determine loading internal compare registers"] + #[inline(always)] + pub fn refresh_count(self) -> &'a mut W { + self.variant(MODE_A::REFRESH_COUNT) + } + #[doc = "NEXTSTEP task causes a new value to be loaded to internal compare registers"] + #[inline(always)] + pub fn next_step(self) -> &'a mut W { + self.variant(MODE_A::NEXT_STEP) + } +} +impl R { + #[doc = "Bits 0:1 - How a sequence is read from RAM and spread to the compare register"] + #[inline(always)] + pub fn load(&self) -> LOAD_R { + LOAD_R::new((self.bits & 3) as u8) + } + #[doc = "Bit 8 - Selects source for advancing the active sequence"] + #[inline(always)] + pub fn mode(&self) -> MODE_R { + MODE_R::new(((self.bits >> 8) & 1) != 0) + } +} +impl W { + #[doc = "Bits 0:1 - How a sequence is read from RAM and spread to the compare register"] + #[inline(always)] + #[must_use] + pub fn load(&mut self) -> LOAD_W<0> { + LOAD_W::new(self) + } + #[doc = "Bit 8 - Selects source for advancing the active sequence"] + #[inline(always)] + #[must_use] + pub fn mode(&mut self) -> MODE_W<8> { + 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 + } +} +#[doc = "Configuration of the decoder\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 [decoder](index.html) module"] +pub struct DECODER_SPEC; +impl crate::RegisterSpec for DECODER_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [decoder::R](R) reader structure"] +impl crate::Readable for DECODER_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [decoder::W](W) writer structure"] +impl crate::Writable for DECODER_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets DECODER to value 0"] +impl crate::Resettable for DECODER_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/pwm0/enable.rs b/down-the-stack/dk_pac/src/pwm0/enable.rs new file mode 100644 index 0000000..6ed543e --- /dev/null +++ b/down-the-stack/dk_pac/src/pwm0/enable.rs @@ -0,0 +1,126 @@ +#[doc = "Register `ENABLE` 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 `ENABLE` 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 `ENABLE` reader - Enable or disable PWM module"] +pub type ENABLE_R = crate::BitReader; +#[doc = "Enable or disable PWM module\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum ENABLE_A { + #[doc = "0: Disabled"] + DISABLED = 0, + #[doc = "1: Enable"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: ENABLE_A) -> Self { + variant as u8 != 0 + } +} +impl ENABLE_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> ENABLE_A { + match self.bits { + false => ENABLE_A::DISABLED, + true => ENABLE_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == ENABLE_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == ENABLE_A::ENABLED + } +} +#[doc = "Field `ENABLE` writer - Enable or disable PWM module"] +pub type ENABLE_W<'a, const O: u8> = crate::BitWriter<'a, u32, ENABLE_SPEC, ENABLE_A, O>; +impl<'a, const O: u8> ENABLE_W<'a, O> { + #[doc = "Disabled"] + #[inline(always)] + pub fn disabled(self) -> &'a mut W { + self.variant(ENABLE_A::DISABLED) + } + #[doc = "Enable"] + #[inline(always)] + pub fn enabled(self) -> &'a mut W { + self.variant(ENABLE_A::ENABLED) + } +} +impl R { + #[doc = "Bit 0 - Enable or disable PWM module"] + #[inline(always)] + pub fn enable(&self) -> ENABLE_R { + ENABLE_R::new((self.bits & 1) != 0) + } +} +impl W { + #[doc = "Bit 0 - Enable or disable PWM module"] + #[inline(always)] + #[must_use] + pub fn enable(&mut self) -> ENABLE_W<0> { + 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 + } +} +#[doc = "PWM module enable register\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 [enable](index.html) module"] +pub struct ENABLE_SPEC; +impl crate::RegisterSpec for ENABLE_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [enable::R](R) reader structure"] +impl crate::Readable for ENABLE_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [enable::W](W) writer structure"] +impl crate::Writable for ENABLE_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets ENABLE to value 0"] +impl crate::Resettable for ENABLE_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/pwm0/events_loopsdone.rs b/down-the-stack/dk_pac/src/pwm0/events_loopsdone.rs new file mode 100644 index 0000000..ef2265b --- /dev/null +++ b/down-the-stack/dk_pac/src/pwm0/events_loopsdone.rs @@ -0,0 +1,127 @@ +#[doc = "Register `EVENTS_LOOPSDONE` 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 `EVENTS_LOOPSDONE` 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 `EVENTS_LOOPSDONE` reader - Concatenated sequences have been played the amount of times defined in LOOP.CNT"] +pub type EVENTS_LOOPSDONE_R = crate::BitReader; +#[doc = "Concatenated sequences have been played the amount of times defined in LOOP.CNT\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum EVENTS_LOOPSDONE_A { + #[doc = "0: Event not generated"] + NOT_GENERATED = 0, + #[doc = "1: Event generated"] + GENERATED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: EVENTS_LOOPSDONE_A) -> Self { + variant as u8 != 0 + } +} +impl EVENTS_LOOPSDONE_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> EVENTS_LOOPSDONE_A { + match self.bits { + false => EVENTS_LOOPSDONE_A::NOT_GENERATED, + true => EVENTS_LOOPSDONE_A::GENERATED, + } + } + #[doc = "Checks if the value of the field is `NOT_GENERATED`"] + #[inline(always)] + pub fn is_not_generated(&self) -> bool { + *self == EVENTS_LOOPSDONE_A::NOT_GENERATED + } + #[doc = "Checks if the value of the field is `GENERATED`"] + #[inline(always)] + pub fn is_generated(&self) -> bool { + *self == EVENTS_LOOPSDONE_A::GENERATED + } +} +#[doc = "Field `EVENTS_LOOPSDONE` writer - Concatenated sequences have been played the amount of times defined in LOOP.CNT"] +pub type EVENTS_LOOPSDONE_W<'a, const O: u8> = + crate::BitWriter<'a, u32, EVENTS_LOOPSDONE_SPEC, EVENTS_LOOPSDONE_A, O>; +impl<'a, const O: u8> EVENTS_LOOPSDONE_W<'a, O> { + #[doc = "Event not generated"] + #[inline(always)] + pub fn not_generated(self) -> &'a mut W { + self.variant(EVENTS_LOOPSDONE_A::NOT_GENERATED) + } + #[doc = "Event generated"] + #[inline(always)] + pub fn generated(self) -> &'a mut W { + self.variant(EVENTS_LOOPSDONE_A::GENERATED) + } +} +impl R { + #[doc = "Bit 0 - Concatenated sequences have been played the amount of times defined in LOOP.CNT"] + #[inline(always)] + pub fn events_loopsdone(&self) -> EVENTS_LOOPSDONE_R { + EVENTS_LOOPSDONE_R::new((self.bits & 1) != 0) + } +} +impl W { + #[doc = "Bit 0 - Concatenated sequences have been played the amount of times defined in LOOP.CNT"] + #[inline(always)] + #[must_use] + pub fn events_loopsdone(&mut self) -> EVENTS_LOOPSDONE_W<0> { + EVENTS_LOOPSDONE_W::new(self) + } + #[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 = "Concatenated sequences have been played the amount of times defined in LOOP.CNT\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 [events_loopsdone](index.html) module"] +pub struct EVENTS_LOOPSDONE_SPEC; +impl crate::RegisterSpec for EVENTS_LOOPSDONE_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [events_loopsdone::R](R) reader structure"] +impl crate::Readable for EVENTS_LOOPSDONE_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [events_loopsdone::W](W) writer structure"] +impl crate::Writable for EVENTS_LOOPSDONE_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets EVENTS_LOOPSDONE to value 0"] +impl crate::Resettable for EVENTS_LOOPSDONE_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/pwm0/events_pwmperiodend.rs b/down-the-stack/dk_pac/src/pwm0/events_pwmperiodend.rs new file mode 100644 index 0000000..241f508 --- /dev/null +++ b/down-the-stack/dk_pac/src/pwm0/events_pwmperiodend.rs @@ -0,0 +1,127 @@ +#[doc = "Register `EVENTS_PWMPERIODEND` 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 `EVENTS_PWMPERIODEND` 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 `EVENTS_PWMPERIODEND` reader - Emitted at the end of each PWM period"] +pub type EVENTS_PWMPERIODEND_R = crate::BitReader; +#[doc = "Emitted at the end of each PWM period\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum EVENTS_PWMPERIODEND_A { + #[doc = "0: Event not generated"] + NOT_GENERATED = 0, + #[doc = "1: Event generated"] + GENERATED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: EVENTS_PWMPERIODEND_A) -> Self { + variant as u8 != 0 + } +} +impl EVENTS_PWMPERIODEND_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> EVENTS_PWMPERIODEND_A { + match self.bits { + false => EVENTS_PWMPERIODEND_A::NOT_GENERATED, + true => EVENTS_PWMPERIODEND_A::GENERATED, + } + } + #[doc = "Checks if the value of the field is `NOT_GENERATED`"] + #[inline(always)] + pub fn is_not_generated(&self) -> bool { + *self == EVENTS_PWMPERIODEND_A::NOT_GENERATED + } + #[doc = "Checks if the value of the field is `GENERATED`"] + #[inline(always)] + pub fn is_generated(&self) -> bool { + *self == EVENTS_PWMPERIODEND_A::GENERATED + } +} +#[doc = "Field `EVENTS_PWMPERIODEND` writer - Emitted at the end of each PWM period"] +pub type EVENTS_PWMPERIODEND_W<'a, const O: u8> = + crate::BitWriter<'a, u32, EVENTS_PWMPERIODEND_SPEC, EVENTS_PWMPERIODEND_A, O>; +impl<'a, const O: u8> EVENTS_PWMPERIODEND_W<'a, O> { + #[doc = "Event not generated"] + #[inline(always)] + pub fn not_generated(self) -> &'a mut W { + self.variant(EVENTS_PWMPERIODEND_A::NOT_GENERATED) + } + #[doc = "Event generated"] + #[inline(always)] + pub fn generated(self) -> &'a mut W { + self.variant(EVENTS_PWMPERIODEND_A::GENERATED) + } +} +impl R { + #[doc = "Bit 0 - Emitted at the end of each PWM period"] + #[inline(always)] + pub fn events_pwmperiodend(&self) -> EVENTS_PWMPERIODEND_R { + EVENTS_PWMPERIODEND_R::new((self.bits & 1) != 0) + } +} +impl W { + #[doc = "Bit 0 - Emitted at the end of each PWM period"] + #[inline(always)] + #[must_use] + pub fn events_pwmperiodend(&mut self) -> EVENTS_PWMPERIODEND_W<0> { + EVENTS_PWMPERIODEND_W::new(self) + } + #[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 = "Emitted at the end of each PWM period\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 [events_pwmperiodend](index.html) module"] +pub struct EVENTS_PWMPERIODEND_SPEC; +impl crate::RegisterSpec for EVENTS_PWMPERIODEND_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [events_pwmperiodend::R](R) reader structure"] +impl crate::Readable for EVENTS_PWMPERIODEND_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [events_pwmperiodend::W](W) writer structure"] +impl crate::Writable for EVENTS_PWMPERIODEND_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets EVENTS_PWMPERIODEND to value 0"] +impl crate::Resettable for EVENTS_PWMPERIODEND_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/pwm0/events_seqend.rs b/down-the-stack/dk_pac/src/pwm0/events_seqend.rs new file mode 100644 index 0000000..8ada4a4 --- /dev/null +++ b/down-the-stack/dk_pac/src/pwm0/events_seqend.rs @@ -0,0 +1,128 @@ +#[doc = "Register `EVENTS_SEQEND[%s]` 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 `EVENTS_SEQEND[%s]` 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 `EVENTS_SEQEND` reader - Emitted at end of every sequence n, when last value from RAM has been applied to wave counter"] +pub type EVENTS_SEQEND_R = crate::BitReader; +#[doc = "Emitted at end of every sequence n, when last value from RAM has been applied to wave counter\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum EVENTS_SEQEND_A { + #[doc = "0: Event not generated"] + NOT_GENERATED = 0, + #[doc = "1: Event generated"] + GENERATED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: EVENTS_SEQEND_A) -> Self { + variant as u8 != 0 + } +} +impl EVENTS_SEQEND_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> EVENTS_SEQEND_A { + match self.bits { + false => EVENTS_SEQEND_A::NOT_GENERATED, + true => EVENTS_SEQEND_A::GENERATED, + } + } + #[doc = "Checks if the value of the field is `NOT_GENERATED`"] + #[inline(always)] + pub fn is_not_generated(&self) -> bool { + *self == EVENTS_SEQEND_A::NOT_GENERATED + } + #[doc = "Checks if the value of the field is `GENERATED`"] + #[inline(always)] + pub fn is_generated(&self) -> bool { + *self == EVENTS_SEQEND_A::GENERATED + } +} +#[doc = "Field `EVENTS_SEQEND` writer - Emitted at end of every sequence n, when last value from RAM has been applied to wave counter"] +pub type EVENTS_SEQEND_W<'a, const O: u8> = + crate::BitWriter<'a, u32, EVENTS_SEQEND_SPEC, EVENTS_SEQEND_A, O>; +impl<'a, const O: u8> EVENTS_SEQEND_W<'a, O> { + #[doc = "Event not generated"] + #[inline(always)] + pub fn not_generated(self) -> &'a mut W { + self.variant(EVENTS_SEQEND_A::NOT_GENERATED) + } + #[doc = "Event generated"] + #[inline(always)] + pub fn generated(self) -> &'a mut W { + self.variant(EVENTS_SEQEND_A::GENERATED) + } +} +impl R { + #[doc = "Bit 0 - Emitted at end of every sequence n, when last value from RAM has been applied to wave counter"] + #[inline(always)] + pub fn events_seqend(&self) -> EVENTS_SEQEND_R { + EVENTS_SEQEND_R::new((self.bits & 1) != 0) + } +} +impl W { + #[doc = "Bit 0 - Emitted at end of every sequence n, when last value from RAM has been applied to wave counter"] + #[inline(always)] + #[must_use] + pub fn events_seqend(&mut self) -> EVENTS_SEQEND_W<0> { + EVENTS_SEQEND_W::new(self) + } + #[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 = "Description collection: Emitted at end of every sequence n, when last value from RAM has been applied to wave counter\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 [events_seqend](index.html) module"] +pub struct EVENTS_SEQEND_SPEC; +impl crate::RegisterSpec for EVENTS_SEQEND_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [events_seqend::R](R) reader structure"] +impl crate::Readable for EVENTS_SEQEND_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [events_seqend::W](W) writer structure"] +impl crate::Writable for EVENTS_SEQEND_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets EVENTS_SEQEND[%s] +to value 0"] +impl crate::Resettable for EVENTS_SEQEND_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/pwm0/events_seqstarted.rs b/down-the-stack/dk_pac/src/pwm0/events_seqstarted.rs new file mode 100644 index 0000000..92f7a4b --- /dev/null +++ b/down-the-stack/dk_pac/src/pwm0/events_seqstarted.rs @@ -0,0 +1,128 @@ +#[doc = "Register `EVENTS_SEQSTARTED[%s]` 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 `EVENTS_SEQSTARTED[%s]` 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 `EVENTS_SEQSTARTED` reader - First PWM period started on sequence n"] +pub type EVENTS_SEQSTARTED_R = crate::BitReader; +#[doc = "First PWM period started on sequence n\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum EVENTS_SEQSTARTED_A { + #[doc = "0: Event not generated"] + NOT_GENERATED = 0, + #[doc = "1: Event generated"] + GENERATED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: EVENTS_SEQSTARTED_A) -> Self { + variant as u8 != 0 + } +} +impl EVENTS_SEQSTARTED_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> EVENTS_SEQSTARTED_A { + match self.bits { + false => EVENTS_SEQSTARTED_A::NOT_GENERATED, + true => EVENTS_SEQSTARTED_A::GENERATED, + } + } + #[doc = "Checks if the value of the field is `NOT_GENERATED`"] + #[inline(always)] + pub fn is_not_generated(&self) -> bool { + *self == EVENTS_SEQSTARTED_A::NOT_GENERATED + } + #[doc = "Checks if the value of the field is `GENERATED`"] + #[inline(always)] + pub fn is_generated(&self) -> bool { + *self == EVENTS_SEQSTARTED_A::GENERATED + } +} +#[doc = "Field `EVENTS_SEQSTARTED` writer - First PWM period started on sequence n"] +pub type EVENTS_SEQSTARTED_W<'a, const O: u8> = + crate::BitWriter<'a, u32, EVENTS_SEQSTARTED_SPEC, EVENTS_SEQSTARTED_A, O>; +impl<'a, const O: u8> EVENTS_SEQSTARTED_W<'a, O> { + #[doc = "Event not generated"] + #[inline(always)] + pub fn not_generated(self) -> &'a mut W { + self.variant(EVENTS_SEQSTARTED_A::NOT_GENERATED) + } + #[doc = "Event generated"] + #[inline(always)] + pub fn generated(self) -> &'a mut W { + self.variant(EVENTS_SEQSTARTED_A::GENERATED) + } +} +impl R { + #[doc = "Bit 0 - First PWM period started on sequence n"] + #[inline(always)] + pub fn events_seqstarted(&self) -> EVENTS_SEQSTARTED_R { + EVENTS_SEQSTARTED_R::new((self.bits & 1) != 0) + } +} +impl W { + #[doc = "Bit 0 - First PWM period started on sequence n"] + #[inline(always)] + #[must_use] + pub fn events_seqstarted(&mut self) -> EVENTS_SEQSTARTED_W<0> { + EVENTS_SEQSTARTED_W::new(self) + } + #[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 = "Description collection: First PWM period started on sequence n\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 [events_seqstarted](index.html) module"] +pub struct EVENTS_SEQSTARTED_SPEC; +impl crate::RegisterSpec for EVENTS_SEQSTARTED_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [events_seqstarted::R](R) reader structure"] +impl crate::Readable for EVENTS_SEQSTARTED_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [events_seqstarted::W](W) writer structure"] +impl crate::Writable for EVENTS_SEQSTARTED_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets EVENTS_SEQSTARTED[%s] +to value 0"] +impl crate::Resettable for EVENTS_SEQSTARTED_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/pwm0/events_stopped.rs b/down-the-stack/dk_pac/src/pwm0/events_stopped.rs new file mode 100644 index 0000000..0e27fa7 --- /dev/null +++ b/down-the-stack/dk_pac/src/pwm0/events_stopped.rs @@ -0,0 +1,127 @@ +#[doc = "Register `EVENTS_STOPPED` 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 `EVENTS_STOPPED` 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 `EVENTS_STOPPED` reader - Response to STOP task, emitted when PWM pulses are no longer generated"] +pub type EVENTS_STOPPED_R = crate::BitReader; +#[doc = "Response to STOP task, emitted when PWM pulses are no longer generated\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum EVENTS_STOPPED_A { + #[doc = "0: Event not generated"] + NOT_GENERATED = 0, + #[doc = "1: Event generated"] + GENERATED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: EVENTS_STOPPED_A) -> Self { + variant as u8 != 0 + } +} +impl EVENTS_STOPPED_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> EVENTS_STOPPED_A { + match self.bits { + false => EVENTS_STOPPED_A::NOT_GENERATED, + true => EVENTS_STOPPED_A::GENERATED, + } + } + #[doc = "Checks if the value of the field is `NOT_GENERATED`"] + #[inline(always)] + pub fn is_not_generated(&self) -> bool { + *self == EVENTS_STOPPED_A::NOT_GENERATED + } + #[doc = "Checks if the value of the field is `GENERATED`"] + #[inline(always)] + pub fn is_generated(&self) -> bool { + *self == EVENTS_STOPPED_A::GENERATED + } +} +#[doc = "Field `EVENTS_STOPPED` writer - Response to STOP task, emitted when PWM pulses are no longer generated"] +pub type EVENTS_STOPPED_W<'a, const O: u8> = + crate::BitWriter<'a, u32, EVENTS_STOPPED_SPEC, EVENTS_STOPPED_A, O>; +impl<'a, const O: u8> EVENTS_STOPPED_W<'a, O> { + #[doc = "Event not generated"] + #[inline(always)] + pub fn not_generated(self) -> &'a mut W { + self.variant(EVENTS_STOPPED_A::NOT_GENERATED) + } + #[doc = "Event generated"] + #[inline(always)] + pub fn generated(self) -> &'a mut W { + self.variant(EVENTS_STOPPED_A::GENERATED) + } +} +impl R { + #[doc = "Bit 0 - Response to STOP task, emitted when PWM pulses are no longer generated"] + #[inline(always)] + pub fn events_stopped(&self) -> EVENTS_STOPPED_R { + EVENTS_STOPPED_R::new((self.bits & 1) != 0) + } +} +impl W { + #[doc = "Bit 0 - Response to STOP task, emitted when PWM pulses are no longer generated"] + #[inline(always)] + #[must_use] + pub fn events_stopped(&mut self) -> EVENTS_STOPPED_W<0> { + EVENTS_STOPPED_W::new(self) + } + #[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 = "Response to STOP task, emitted when PWM pulses are no longer generated\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 [events_stopped](index.html) module"] +pub struct EVENTS_STOPPED_SPEC; +impl crate::RegisterSpec for EVENTS_STOPPED_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [events_stopped::R](R) reader structure"] +impl crate::Readable for EVENTS_STOPPED_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [events_stopped::W](W) writer structure"] +impl crate::Writable for EVENTS_STOPPED_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets EVENTS_STOPPED to value 0"] +impl crate::Resettable for EVENTS_STOPPED_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/pwm0/inten.rs b/down-the-stack/dk_pac/src/pwm0/inten.rs new file mode 100644 index 0000000..64391b5 --- /dev/null +++ b/down-the-stack/dk_pac/src/pwm0/inten.rs @@ -0,0 +1,492 @@ +#[doc = "Register `INTEN` 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 `INTEN` 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 `STOPPED` reader - Enable or disable interrupt for event STOPPED"] +pub type STOPPED_R = crate::BitReader; +#[doc = "Enable or disable interrupt for event STOPPED\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum STOPPED_A { + #[doc = "0: Disable"] + DISABLED = 0, + #[doc = "1: Enable"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: STOPPED_A) -> Self { + variant as u8 != 0 + } +} +impl STOPPED_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> STOPPED_A { + match self.bits { + false => STOPPED_A::DISABLED, + true => STOPPED_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == STOPPED_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == STOPPED_A::ENABLED + } +} +#[doc = "Field `STOPPED` writer - Enable or disable interrupt for event STOPPED"] +pub type STOPPED_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTEN_SPEC, STOPPED_A, O>; +impl<'a, const O: u8> STOPPED_W<'a, O> { + #[doc = "Disable"] + #[inline(always)] + pub fn disabled(self) -> &'a mut W { + self.variant(STOPPED_A::DISABLED) + } + #[doc = "Enable"] + #[inline(always)] + pub fn enabled(self) -> &'a mut W { + self.variant(STOPPED_A::ENABLED) + } +} +#[doc = "Field `SEQSTARTED0` reader - Enable or disable interrupt for event SEQSTARTED\\[0\\]"] +pub type SEQSTARTED0_R = crate::BitReader; +#[doc = "Enable or disable interrupt for event SEQSTARTED\\[0\\]\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum SEQSTARTED0_A { + #[doc = "0: Disable"] + DISABLED = 0, + #[doc = "1: Enable"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: SEQSTARTED0_A) -> Self { + variant as u8 != 0 + } +} +impl SEQSTARTED0_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> SEQSTARTED0_A { + match self.bits { + false => SEQSTARTED0_A::DISABLED, + true => SEQSTARTED0_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == SEQSTARTED0_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == SEQSTARTED0_A::ENABLED + } +} +#[doc = "Field `SEQSTARTED0` writer - Enable or disable interrupt for event SEQSTARTED\\[0\\]"] +pub type SEQSTARTED0_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTEN_SPEC, SEQSTARTED0_A, O>; +impl<'a, const O: u8> SEQSTARTED0_W<'a, O> { + #[doc = "Disable"] + #[inline(always)] + pub fn disabled(self) -> &'a mut W { + self.variant(SEQSTARTED0_A::DISABLED) + } + #[doc = "Enable"] + #[inline(always)] + pub fn enabled(self) -> &'a mut W { + self.variant(SEQSTARTED0_A::ENABLED) + } +} +#[doc = "Field `SEQSTARTED1` reader - Enable or disable interrupt for event SEQSTARTED\\[1\\]"] +pub type SEQSTARTED1_R = crate::BitReader; +#[doc = "Enable or disable interrupt for event SEQSTARTED\\[1\\]\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum SEQSTARTED1_A { + #[doc = "0: Disable"] + DISABLED = 0, + #[doc = "1: Enable"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: SEQSTARTED1_A) -> Self { + variant as u8 != 0 + } +} +impl SEQSTARTED1_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> SEQSTARTED1_A { + match self.bits { + false => SEQSTARTED1_A::DISABLED, + true => SEQSTARTED1_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == SEQSTARTED1_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == SEQSTARTED1_A::ENABLED + } +} +#[doc = "Field `SEQSTARTED1` writer - Enable or disable interrupt for event SEQSTARTED\\[1\\]"] +pub type SEQSTARTED1_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTEN_SPEC, SEQSTARTED1_A, O>; +impl<'a, const O: u8> SEQSTARTED1_W<'a, O> { + #[doc = "Disable"] + #[inline(always)] + pub fn disabled(self) -> &'a mut W { + self.variant(SEQSTARTED1_A::DISABLED) + } + #[doc = "Enable"] + #[inline(always)] + pub fn enabled(self) -> &'a mut W { + self.variant(SEQSTARTED1_A::ENABLED) + } +} +#[doc = "Field `SEQEND0` reader - Enable or disable interrupt for event SEQEND\\[0\\]"] +pub type SEQEND0_R = crate::BitReader; +#[doc = "Enable or disable interrupt for event SEQEND\\[0\\]\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum SEQEND0_A { + #[doc = "0: Disable"] + DISABLED = 0, + #[doc = "1: Enable"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: SEQEND0_A) -> Self { + variant as u8 != 0 + } +} +impl SEQEND0_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> SEQEND0_A { + match self.bits { + false => SEQEND0_A::DISABLED, + true => SEQEND0_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == SEQEND0_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == SEQEND0_A::ENABLED + } +} +#[doc = "Field `SEQEND0` writer - Enable or disable interrupt for event SEQEND\\[0\\]"] +pub type SEQEND0_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTEN_SPEC, SEQEND0_A, O>; +impl<'a, const O: u8> SEQEND0_W<'a, O> { + #[doc = "Disable"] + #[inline(always)] + pub fn disabled(self) -> &'a mut W { + self.variant(SEQEND0_A::DISABLED) + } + #[doc = "Enable"] + #[inline(always)] + pub fn enabled(self) -> &'a mut W { + self.variant(SEQEND0_A::ENABLED) + } +} +#[doc = "Field `SEQEND1` reader - Enable or disable interrupt for event SEQEND\\[1\\]"] +pub type SEQEND1_R = crate::BitReader; +#[doc = "Enable or disable interrupt for event SEQEND\\[1\\]\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum SEQEND1_A { + #[doc = "0: Disable"] + DISABLED = 0, + #[doc = "1: Enable"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: SEQEND1_A) -> Self { + variant as u8 != 0 + } +} +impl SEQEND1_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> SEQEND1_A { + match self.bits { + false => SEQEND1_A::DISABLED, + true => SEQEND1_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == SEQEND1_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == SEQEND1_A::ENABLED + } +} +#[doc = "Field `SEQEND1` writer - Enable or disable interrupt for event SEQEND\\[1\\]"] +pub type SEQEND1_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTEN_SPEC, SEQEND1_A, O>; +impl<'a, const O: u8> SEQEND1_W<'a, O> { + #[doc = "Disable"] + #[inline(always)] + pub fn disabled(self) -> &'a mut W { + self.variant(SEQEND1_A::DISABLED) + } + #[doc = "Enable"] + #[inline(always)] + pub fn enabled(self) -> &'a mut W { + self.variant(SEQEND1_A::ENABLED) + } +} +#[doc = "Field `PWMPERIODEND` reader - Enable or disable interrupt for event PWMPERIODEND"] +pub type PWMPERIODEND_R = crate::BitReader; +#[doc = "Enable or disable interrupt for event PWMPERIODEND\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PWMPERIODEND_A { + #[doc = "0: Disable"] + DISABLED = 0, + #[doc = "1: Enable"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PWMPERIODEND_A) -> Self { + variant as u8 != 0 + } +} +impl PWMPERIODEND_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> PWMPERIODEND_A { + match self.bits { + false => PWMPERIODEND_A::DISABLED, + true => PWMPERIODEND_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == PWMPERIODEND_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == PWMPERIODEND_A::ENABLED + } +} +#[doc = "Field `PWMPERIODEND` writer - Enable or disable interrupt for event PWMPERIODEND"] +pub type PWMPERIODEND_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTEN_SPEC, PWMPERIODEND_A, O>; +impl<'a, const O: u8> PWMPERIODEND_W<'a, O> { + #[doc = "Disable"] + #[inline(always)] + pub fn disabled(self) -> &'a mut W { + self.variant(PWMPERIODEND_A::DISABLED) + } + #[doc = "Enable"] + #[inline(always)] + pub fn enabled(self) -> &'a mut W { + self.variant(PWMPERIODEND_A::ENABLED) + } +} +#[doc = "Field `LOOPSDONE` reader - Enable or disable interrupt for event LOOPSDONE"] +pub type LOOPSDONE_R = crate::BitReader; +#[doc = "Enable or disable interrupt for event LOOPSDONE\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum LOOPSDONE_A { + #[doc = "0: Disable"] + DISABLED = 0, + #[doc = "1: Enable"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: LOOPSDONE_A) -> Self { + variant as u8 != 0 + } +} +impl LOOPSDONE_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> LOOPSDONE_A { + match self.bits { + false => LOOPSDONE_A::DISABLED, + true => LOOPSDONE_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == LOOPSDONE_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == LOOPSDONE_A::ENABLED + } +} +#[doc = "Field `LOOPSDONE` writer - Enable or disable interrupt for event LOOPSDONE"] +pub type LOOPSDONE_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTEN_SPEC, LOOPSDONE_A, O>; +impl<'a, const O: u8> LOOPSDONE_W<'a, O> { + #[doc = "Disable"] + #[inline(always)] + pub fn disabled(self) -> &'a mut W { + self.variant(LOOPSDONE_A::DISABLED) + } + #[doc = "Enable"] + #[inline(always)] + pub fn enabled(self) -> &'a mut W { + self.variant(LOOPSDONE_A::ENABLED) + } +} +impl R { + #[doc = "Bit 1 - Enable or disable interrupt for event STOPPED"] + #[inline(always)] + pub fn stopped(&self) -> STOPPED_R { + STOPPED_R::new(((self.bits >> 1) & 1) != 0) + } + #[doc = "Bit 2 - Enable or disable interrupt for event SEQSTARTED\\[0\\]"] + #[inline(always)] + pub fn seqstarted0(&self) -> SEQSTARTED0_R { + SEQSTARTED0_R::new(((self.bits >> 2) & 1) != 0) + } + #[doc = "Bit 3 - Enable or disable interrupt for event SEQSTARTED\\[1\\]"] + #[inline(always)] + pub fn seqstarted1(&self) -> SEQSTARTED1_R { + SEQSTARTED1_R::new(((self.bits >> 3) & 1) != 0) + } + #[doc = "Bit 4 - Enable or disable interrupt for event SEQEND\\[0\\]"] + #[inline(always)] + pub fn seqend0(&self) -> SEQEND0_R { + SEQEND0_R::new(((self.bits >> 4) & 1) != 0) + } + #[doc = "Bit 5 - Enable or disable interrupt for event SEQEND\\[1\\]"] + #[inline(always)] + pub fn seqend1(&self) -> SEQEND1_R { + SEQEND1_R::new(((self.bits >> 5) & 1) != 0) + } + #[doc = "Bit 6 - Enable or disable interrupt for event PWMPERIODEND"] + #[inline(always)] + pub fn pwmperiodend(&self) -> PWMPERIODEND_R { + PWMPERIODEND_R::new(((self.bits >> 6) & 1) != 0) + } + #[doc = "Bit 7 - Enable or disable interrupt for event LOOPSDONE"] + #[inline(always)] + pub fn loopsdone(&self) -> LOOPSDONE_R { + LOOPSDONE_R::new(((self.bits >> 7) & 1) != 0) + } +} +impl W { + #[doc = "Bit 1 - Enable or disable interrupt for event STOPPED"] + #[inline(always)] + #[must_use] + pub fn stopped(&mut self) -> STOPPED_W<1> { + STOPPED_W::new(self) + } + #[doc = "Bit 2 - Enable or disable interrupt for event SEQSTARTED\\[0\\]"] + #[inline(always)] + #[must_use] + pub fn seqstarted0(&mut self) -> SEQSTARTED0_W<2> { + SEQSTARTED0_W::new(self) + } + #[doc = "Bit 3 - Enable or disable interrupt for event SEQSTARTED\\[1\\]"] + #[inline(always)] + #[must_use] + pub fn seqstarted1(&mut self) -> SEQSTARTED1_W<3> { + SEQSTARTED1_W::new(self) + } + #[doc = "Bit 4 - Enable or disable interrupt for event SEQEND\\[0\\]"] + #[inline(always)] + #[must_use] + pub fn seqend0(&mut self) -> SEQEND0_W<4> { + SEQEND0_W::new(self) + } + #[doc = "Bit 5 - Enable or disable interrupt for event SEQEND\\[1\\]"] + #[inline(always)] + #[must_use] + pub fn seqend1(&mut self) -> SEQEND1_W<5> { + SEQEND1_W::new(self) + } + #[doc = "Bit 6 - Enable or disable interrupt for event PWMPERIODEND"] + #[inline(always)] + #[must_use] + pub fn pwmperiodend(&mut self) -> PWMPERIODEND_W<6> { + PWMPERIODEND_W::new(self) + } + #[doc = "Bit 7 - Enable or disable interrupt for event LOOPSDONE"] + #[inline(always)] + #[must_use] + pub fn loopsdone(&mut self) -> LOOPSDONE_W<7> { + LOOPSDONE_W::new(self) + } + #[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 = "Enable or disable interrupt\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 [inten](index.html) module"] +pub struct INTEN_SPEC; +impl crate::RegisterSpec for INTEN_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [inten::R](R) reader structure"] +impl crate::Readable for INTEN_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [inten::W](W) writer structure"] +impl crate::Writable for INTEN_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets INTEN to value 0"] +impl crate::Resettable for INTEN_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/pwm0/intenclr.rs b/down-the-stack/dk_pac/src/pwm0/intenclr.rs new file mode 100644 index 0000000..00a96a6 --- /dev/null +++ b/down-the-stack/dk_pac/src/pwm0/intenclr.rs @@ -0,0 +1,544 @@ +#[doc = "Register `INTENCLR` 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 `INTENCLR` 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 `STOPPED` reader - Write '1' to disable interrupt for event STOPPED"] +pub type STOPPED_R = crate::BitReader; +#[doc = "Write '1' to disable interrupt for event STOPPED\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum STOPPED_A { + #[doc = "0: Read: Disabled"] + DISABLED = 0, + #[doc = "1: Read: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: STOPPED_A) -> Self { + variant as u8 != 0 + } +} +impl STOPPED_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> STOPPED_A { + match self.bits { + false => STOPPED_A::DISABLED, + true => STOPPED_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == STOPPED_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == STOPPED_A::ENABLED + } +} +#[doc = "Write '1' to disable interrupt for event STOPPED\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum STOPPED_AW { + #[doc = "1: Disable"] + CLEAR = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: STOPPED_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `STOPPED` writer - Write '1' to disable interrupt for event STOPPED"] +pub type STOPPED_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENCLR_SPEC, STOPPED_AW, O>; +impl<'a, const O: u8> STOPPED_W<'a, O> { + #[doc = "Disable"] + #[inline(always)] + pub fn clear(self) -> &'a mut W { + self.variant(STOPPED_AW::CLEAR) + } +} +#[doc = "Field `SEQSTARTED0` reader - Write '1' to disable interrupt for event SEQSTARTED\\[0\\]"] +pub type SEQSTARTED0_R = crate::BitReader; +#[doc = "Write '1' to disable interrupt for event SEQSTARTED\\[0\\]\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum SEQSTARTED0_A { + #[doc = "0: Read: Disabled"] + DISABLED = 0, + #[doc = "1: Read: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: SEQSTARTED0_A) -> Self { + variant as u8 != 0 + } +} +impl SEQSTARTED0_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> SEQSTARTED0_A { + match self.bits { + false => SEQSTARTED0_A::DISABLED, + true => SEQSTARTED0_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == SEQSTARTED0_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == SEQSTARTED0_A::ENABLED + } +} +#[doc = "Write '1' to disable interrupt for event SEQSTARTED\\[0\\]\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum SEQSTARTED0_AW { + #[doc = "1: Disable"] + CLEAR = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: SEQSTARTED0_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `SEQSTARTED0` writer - Write '1' to disable interrupt for event SEQSTARTED\\[0\\]"] +pub type SEQSTARTED0_W<'a, const O: u8> = + crate::BitWriter<'a, u32, INTENCLR_SPEC, SEQSTARTED0_AW, O>; +impl<'a, const O: u8> SEQSTARTED0_W<'a, O> { + #[doc = "Disable"] + #[inline(always)] + pub fn clear(self) -> &'a mut W { + self.variant(SEQSTARTED0_AW::CLEAR) + } +} +#[doc = "Field `SEQSTARTED1` reader - Write '1' to disable interrupt for event SEQSTARTED\\[1\\]"] +pub type SEQSTARTED1_R = crate::BitReader; +#[doc = "Write '1' to disable interrupt for event SEQSTARTED\\[1\\]\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum SEQSTARTED1_A { + #[doc = "0: Read: Disabled"] + DISABLED = 0, + #[doc = "1: Read: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: SEQSTARTED1_A) -> Self { + variant as u8 != 0 + } +} +impl SEQSTARTED1_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> SEQSTARTED1_A { + match self.bits { + false => SEQSTARTED1_A::DISABLED, + true => SEQSTARTED1_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == SEQSTARTED1_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == SEQSTARTED1_A::ENABLED + } +} +#[doc = "Write '1' to disable interrupt for event SEQSTARTED\\[1\\]\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum SEQSTARTED1_AW { + #[doc = "1: Disable"] + CLEAR = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: SEQSTARTED1_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `SEQSTARTED1` writer - Write '1' to disable interrupt for event SEQSTARTED\\[1\\]"] +pub type SEQSTARTED1_W<'a, const O: u8> = + crate::BitWriter<'a, u32, INTENCLR_SPEC, SEQSTARTED1_AW, O>; +impl<'a, const O: u8> SEQSTARTED1_W<'a, O> { + #[doc = "Disable"] + #[inline(always)] + pub fn clear(self) -> &'a mut W { + self.variant(SEQSTARTED1_AW::CLEAR) + } +} +#[doc = "Field `SEQEND0` reader - Write '1' to disable interrupt for event SEQEND\\[0\\]"] +pub type SEQEND0_R = crate::BitReader; +#[doc = "Write '1' to disable interrupt for event SEQEND\\[0\\]\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum SEQEND0_A { + #[doc = "0: Read: Disabled"] + DISABLED = 0, + #[doc = "1: Read: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: SEQEND0_A) -> Self { + variant as u8 != 0 + } +} +impl SEQEND0_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> SEQEND0_A { + match self.bits { + false => SEQEND0_A::DISABLED, + true => SEQEND0_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == SEQEND0_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == SEQEND0_A::ENABLED + } +} +#[doc = "Write '1' to disable interrupt for event SEQEND\\[0\\]\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum SEQEND0_AW { + #[doc = "1: Disable"] + CLEAR = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: SEQEND0_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `SEQEND0` writer - Write '1' to disable interrupt for event SEQEND\\[0\\]"] +pub type SEQEND0_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENCLR_SPEC, SEQEND0_AW, O>; +impl<'a, const O: u8> SEQEND0_W<'a, O> { + #[doc = "Disable"] + #[inline(always)] + pub fn clear(self) -> &'a mut W { + self.variant(SEQEND0_AW::CLEAR) + } +} +#[doc = "Field `SEQEND1` reader - Write '1' to disable interrupt for event SEQEND\\[1\\]"] +pub type SEQEND1_R = crate::BitReader; +#[doc = "Write '1' to disable interrupt for event SEQEND\\[1\\]\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum SEQEND1_A { + #[doc = "0: Read: Disabled"] + DISABLED = 0, + #[doc = "1: Read: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: SEQEND1_A) -> Self { + variant as u8 != 0 + } +} +impl SEQEND1_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> SEQEND1_A { + match self.bits { + false => SEQEND1_A::DISABLED, + true => SEQEND1_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == SEQEND1_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == SEQEND1_A::ENABLED + } +} +#[doc = "Write '1' to disable interrupt for event SEQEND\\[1\\]\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum SEQEND1_AW { + #[doc = "1: Disable"] + CLEAR = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: SEQEND1_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `SEQEND1` writer - Write '1' to disable interrupt for event SEQEND\\[1\\]"] +pub type SEQEND1_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENCLR_SPEC, SEQEND1_AW, O>; +impl<'a, const O: u8> SEQEND1_W<'a, O> { + #[doc = "Disable"] + #[inline(always)] + pub fn clear(self) -> &'a mut W { + self.variant(SEQEND1_AW::CLEAR) + } +} +#[doc = "Field `PWMPERIODEND` reader - Write '1' to disable interrupt for event PWMPERIODEND"] +pub type PWMPERIODEND_R = crate::BitReader; +#[doc = "Write '1' to disable interrupt for event PWMPERIODEND\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PWMPERIODEND_A { + #[doc = "0: Read: Disabled"] + DISABLED = 0, + #[doc = "1: Read: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PWMPERIODEND_A) -> Self { + variant as u8 != 0 + } +} +impl PWMPERIODEND_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> PWMPERIODEND_A { + match self.bits { + false => PWMPERIODEND_A::DISABLED, + true => PWMPERIODEND_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == PWMPERIODEND_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == PWMPERIODEND_A::ENABLED + } +} +#[doc = "Write '1' to disable interrupt for event PWMPERIODEND\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PWMPERIODEND_AW { + #[doc = "1: Disable"] + CLEAR = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PWMPERIODEND_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `PWMPERIODEND` writer - Write '1' to disable interrupt for event PWMPERIODEND"] +pub type PWMPERIODEND_W<'a, const O: u8> = + crate::BitWriter<'a, u32, INTENCLR_SPEC, PWMPERIODEND_AW, O>; +impl<'a, const O: u8> PWMPERIODEND_W<'a, O> { + #[doc = "Disable"] + #[inline(always)] + pub fn clear(self) -> &'a mut W { + self.variant(PWMPERIODEND_AW::CLEAR) + } +} +#[doc = "Field `LOOPSDONE` reader - Write '1' to disable interrupt for event LOOPSDONE"] +pub type LOOPSDONE_R = crate::BitReader; +#[doc = "Write '1' to disable interrupt for event LOOPSDONE\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum LOOPSDONE_A { + #[doc = "0: Read: Disabled"] + DISABLED = 0, + #[doc = "1: Read: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: LOOPSDONE_A) -> Self { + variant as u8 != 0 + } +} +impl LOOPSDONE_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> LOOPSDONE_A { + match self.bits { + false => LOOPSDONE_A::DISABLED, + true => LOOPSDONE_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == LOOPSDONE_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == LOOPSDONE_A::ENABLED + } +} +#[doc = "Write '1' to disable interrupt for event LOOPSDONE\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum LOOPSDONE_AW { + #[doc = "1: Disable"] + CLEAR = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: LOOPSDONE_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `LOOPSDONE` writer - Write '1' to disable interrupt for event LOOPSDONE"] +pub type LOOPSDONE_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENCLR_SPEC, LOOPSDONE_AW, O>; +impl<'a, const O: u8> LOOPSDONE_W<'a, O> { + #[doc = "Disable"] + #[inline(always)] + pub fn clear(self) -> &'a mut W { + self.variant(LOOPSDONE_AW::CLEAR) + } +} +impl R { + #[doc = "Bit 1 - Write '1' to disable interrupt for event STOPPED"] + #[inline(always)] + pub fn stopped(&self) -> STOPPED_R { + STOPPED_R::new(((self.bits >> 1) & 1) != 0) + } + #[doc = "Bit 2 - Write '1' to disable interrupt for event SEQSTARTED\\[0\\]"] + #[inline(always)] + pub fn seqstarted0(&self) -> SEQSTARTED0_R { + SEQSTARTED0_R::new(((self.bits >> 2) & 1) != 0) + } + #[doc = "Bit 3 - Write '1' to disable interrupt for event SEQSTARTED\\[1\\]"] + #[inline(always)] + pub fn seqstarted1(&self) -> SEQSTARTED1_R { + SEQSTARTED1_R::new(((self.bits >> 3) & 1) != 0) + } + #[doc = "Bit 4 - Write '1' to disable interrupt for event SEQEND\\[0\\]"] + #[inline(always)] + pub fn seqend0(&self) -> SEQEND0_R { + SEQEND0_R::new(((self.bits >> 4) & 1) != 0) + } + #[doc = "Bit 5 - Write '1' to disable interrupt for event SEQEND\\[1\\]"] + #[inline(always)] + pub fn seqend1(&self) -> SEQEND1_R { + SEQEND1_R::new(((self.bits >> 5) & 1) != 0) + } + #[doc = "Bit 6 - Write '1' to disable interrupt for event PWMPERIODEND"] + #[inline(always)] + pub fn pwmperiodend(&self) -> PWMPERIODEND_R { + PWMPERIODEND_R::new(((self.bits >> 6) & 1) != 0) + } + #[doc = "Bit 7 - Write '1' to disable interrupt for event LOOPSDONE"] + #[inline(always)] + pub fn loopsdone(&self) -> LOOPSDONE_R { + LOOPSDONE_R::new(((self.bits >> 7) & 1) != 0) + } +} +impl W { + #[doc = "Bit 1 - Write '1' to disable interrupt for event STOPPED"] + #[inline(always)] + #[must_use] + pub fn stopped(&mut self) -> STOPPED_W<1> { + STOPPED_W::new(self) + } + #[doc = "Bit 2 - Write '1' to disable interrupt for event SEQSTARTED\\[0\\]"] + #[inline(always)] + #[must_use] + pub fn seqstarted0(&mut self) -> SEQSTARTED0_W<2> { + SEQSTARTED0_W::new(self) + } + #[doc = "Bit 3 - Write '1' to disable interrupt for event SEQSTARTED\\[1\\]"] + #[inline(always)] + #[must_use] + pub fn seqstarted1(&mut self) -> SEQSTARTED1_W<3> { + SEQSTARTED1_W::new(self) + } + #[doc = "Bit 4 - Write '1' to disable interrupt for event SEQEND\\[0\\]"] + #[inline(always)] + #[must_use] + pub fn seqend0(&mut self) -> SEQEND0_W<4> { + SEQEND0_W::new(self) + } + #[doc = "Bit 5 - Write '1' to disable interrupt for event SEQEND\\[1\\]"] + #[inline(always)] + #[must_use] + pub fn seqend1(&mut self) -> SEQEND1_W<5> { + SEQEND1_W::new(self) + } + #[doc = "Bit 6 - Write '1' to disable interrupt for event PWMPERIODEND"] + #[inline(always)] + #[must_use] + pub fn pwmperiodend(&mut self) -> PWMPERIODEND_W<6> { + PWMPERIODEND_W::new(self) + } + #[doc = "Bit 7 - Write '1' to disable interrupt for event LOOPSDONE"] + #[inline(always)] + #[must_use] + pub fn loopsdone(&mut self) -> LOOPSDONE_W<7> { + LOOPSDONE_W::new(self) + } + #[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 = "Disable interrupt\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 [intenclr](index.html) module"] +pub struct INTENCLR_SPEC; +impl crate::RegisterSpec for INTENCLR_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [intenclr::R](R) reader structure"] +impl crate::Readable for INTENCLR_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [intenclr::W](W) writer structure"] +impl crate::Writable for INTENCLR_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets INTENCLR to value 0"] +impl crate::Resettable for INTENCLR_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/pwm0/intenset.rs b/down-the-stack/dk_pac/src/pwm0/intenset.rs new file mode 100644 index 0000000..d1fac66 --- /dev/null +++ b/down-the-stack/dk_pac/src/pwm0/intenset.rs @@ -0,0 +1,544 @@ +#[doc = "Register `INTENSET` 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 `INTENSET` 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 `STOPPED` reader - Write '1' to enable interrupt for event STOPPED"] +pub type STOPPED_R = crate::BitReader; +#[doc = "Write '1' to enable interrupt for event STOPPED\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum STOPPED_A { + #[doc = "0: Read: Disabled"] + DISABLED = 0, + #[doc = "1: Read: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: STOPPED_A) -> Self { + variant as u8 != 0 + } +} +impl STOPPED_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> STOPPED_A { + match self.bits { + false => STOPPED_A::DISABLED, + true => STOPPED_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == STOPPED_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == STOPPED_A::ENABLED + } +} +#[doc = "Write '1' to enable interrupt for event STOPPED\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum STOPPED_AW { + #[doc = "1: Enable"] + SET = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: STOPPED_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `STOPPED` writer - Write '1' to enable interrupt for event STOPPED"] +pub type STOPPED_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENSET_SPEC, STOPPED_AW, O>; +impl<'a, const O: u8> STOPPED_W<'a, O> { + #[doc = "Enable"] + #[inline(always)] + pub fn set(self) -> &'a mut W { + self.variant(STOPPED_AW::SET) + } +} +#[doc = "Field `SEQSTARTED0` reader - Write '1' to enable interrupt for event SEQSTARTED\\[0\\]"] +pub type SEQSTARTED0_R = crate::BitReader; +#[doc = "Write '1' to enable interrupt for event SEQSTARTED\\[0\\]\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum SEQSTARTED0_A { + #[doc = "0: Read: Disabled"] + DISABLED = 0, + #[doc = "1: Read: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: SEQSTARTED0_A) -> Self { + variant as u8 != 0 + } +} +impl SEQSTARTED0_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> SEQSTARTED0_A { + match self.bits { + false => SEQSTARTED0_A::DISABLED, + true => SEQSTARTED0_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == SEQSTARTED0_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == SEQSTARTED0_A::ENABLED + } +} +#[doc = "Write '1' to enable interrupt for event SEQSTARTED\\[0\\]\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum SEQSTARTED0_AW { + #[doc = "1: Enable"] + SET = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: SEQSTARTED0_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `SEQSTARTED0` writer - Write '1' to enable interrupt for event SEQSTARTED\\[0\\]"] +pub type SEQSTARTED0_W<'a, const O: u8> = + crate::BitWriter<'a, u32, INTENSET_SPEC, SEQSTARTED0_AW, O>; +impl<'a, const O: u8> SEQSTARTED0_W<'a, O> { + #[doc = "Enable"] + #[inline(always)] + pub fn set(self) -> &'a mut W { + self.variant(SEQSTARTED0_AW::SET) + } +} +#[doc = "Field `SEQSTARTED1` reader - Write '1' to enable interrupt for event SEQSTARTED\\[1\\]"] +pub type SEQSTARTED1_R = crate::BitReader; +#[doc = "Write '1' to enable interrupt for event SEQSTARTED\\[1\\]\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum SEQSTARTED1_A { + #[doc = "0: Read: Disabled"] + DISABLED = 0, + #[doc = "1: Read: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: SEQSTARTED1_A) -> Self { + variant as u8 != 0 + } +} +impl SEQSTARTED1_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> SEQSTARTED1_A { + match self.bits { + false => SEQSTARTED1_A::DISABLED, + true => SEQSTARTED1_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == SEQSTARTED1_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == SEQSTARTED1_A::ENABLED + } +} +#[doc = "Write '1' to enable interrupt for event SEQSTARTED\\[1\\]\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum SEQSTARTED1_AW { + #[doc = "1: Enable"] + SET = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: SEQSTARTED1_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `SEQSTARTED1` writer - Write '1' to enable interrupt for event SEQSTARTED\\[1\\]"] +pub type SEQSTARTED1_W<'a, const O: u8> = + crate::BitWriter<'a, u32, INTENSET_SPEC, SEQSTARTED1_AW, O>; +impl<'a, const O: u8> SEQSTARTED1_W<'a, O> { + #[doc = "Enable"] + #[inline(always)] + pub fn set(self) -> &'a mut W { + self.variant(SEQSTARTED1_AW::SET) + } +} +#[doc = "Field `SEQEND0` reader - Write '1' to enable interrupt for event SEQEND\\[0\\]"] +pub type SEQEND0_R = crate::BitReader; +#[doc = "Write '1' to enable interrupt for event SEQEND\\[0\\]\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum SEQEND0_A { + #[doc = "0: Read: Disabled"] + DISABLED = 0, + #[doc = "1: Read: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: SEQEND0_A) -> Self { + variant as u8 != 0 + } +} +impl SEQEND0_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> SEQEND0_A { + match self.bits { + false => SEQEND0_A::DISABLED, + true => SEQEND0_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == SEQEND0_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == SEQEND0_A::ENABLED + } +} +#[doc = "Write '1' to enable interrupt for event SEQEND\\[0\\]\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum SEQEND0_AW { + #[doc = "1: Enable"] + SET = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: SEQEND0_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `SEQEND0` writer - Write '1' to enable interrupt for event SEQEND\\[0\\]"] +pub type SEQEND0_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENSET_SPEC, SEQEND0_AW, O>; +impl<'a, const O: u8> SEQEND0_W<'a, O> { + #[doc = "Enable"] + #[inline(always)] + pub fn set(self) -> &'a mut W { + self.variant(SEQEND0_AW::SET) + } +} +#[doc = "Field `SEQEND1` reader - Write '1' to enable interrupt for event SEQEND\\[1\\]"] +pub type SEQEND1_R = crate::BitReader; +#[doc = "Write '1' to enable interrupt for event SEQEND\\[1\\]\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum SEQEND1_A { + #[doc = "0: Read: Disabled"] + DISABLED = 0, + #[doc = "1: Read: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: SEQEND1_A) -> Self { + variant as u8 != 0 + } +} +impl SEQEND1_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> SEQEND1_A { + match self.bits { + false => SEQEND1_A::DISABLED, + true => SEQEND1_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == SEQEND1_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == SEQEND1_A::ENABLED + } +} +#[doc = "Write '1' to enable interrupt for event SEQEND\\[1\\]\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum SEQEND1_AW { + #[doc = "1: Enable"] + SET = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: SEQEND1_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `SEQEND1` writer - Write '1' to enable interrupt for event SEQEND\\[1\\]"] +pub type SEQEND1_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENSET_SPEC, SEQEND1_AW, O>; +impl<'a, const O: u8> SEQEND1_W<'a, O> { + #[doc = "Enable"] + #[inline(always)] + pub fn set(self) -> &'a mut W { + self.variant(SEQEND1_AW::SET) + } +} +#[doc = "Field `PWMPERIODEND` reader - Write '1' to enable interrupt for event PWMPERIODEND"] +pub type PWMPERIODEND_R = crate::BitReader; +#[doc = "Write '1' to enable interrupt for event PWMPERIODEND\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PWMPERIODEND_A { + #[doc = "0: Read: Disabled"] + DISABLED = 0, + #[doc = "1: Read: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PWMPERIODEND_A) -> Self { + variant as u8 != 0 + } +} +impl PWMPERIODEND_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> PWMPERIODEND_A { + match self.bits { + false => PWMPERIODEND_A::DISABLED, + true => PWMPERIODEND_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == PWMPERIODEND_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == PWMPERIODEND_A::ENABLED + } +} +#[doc = "Write '1' to enable interrupt for event PWMPERIODEND\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PWMPERIODEND_AW { + #[doc = "1: Enable"] + SET = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PWMPERIODEND_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `PWMPERIODEND` writer - Write '1' to enable interrupt for event PWMPERIODEND"] +pub type PWMPERIODEND_W<'a, const O: u8> = + crate::BitWriter<'a, u32, INTENSET_SPEC, PWMPERIODEND_AW, O>; +impl<'a, const O: u8> PWMPERIODEND_W<'a, O> { + #[doc = "Enable"] + #[inline(always)] + pub fn set(self) -> &'a mut W { + self.variant(PWMPERIODEND_AW::SET) + } +} +#[doc = "Field `LOOPSDONE` reader - Write '1' to enable interrupt for event LOOPSDONE"] +pub type LOOPSDONE_R = crate::BitReader; +#[doc = "Write '1' to enable interrupt for event LOOPSDONE\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum LOOPSDONE_A { + #[doc = "0: Read: Disabled"] + DISABLED = 0, + #[doc = "1: Read: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: LOOPSDONE_A) -> Self { + variant as u8 != 0 + } +} +impl LOOPSDONE_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> LOOPSDONE_A { + match self.bits { + false => LOOPSDONE_A::DISABLED, + true => LOOPSDONE_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == LOOPSDONE_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == LOOPSDONE_A::ENABLED + } +} +#[doc = "Write '1' to enable interrupt for event LOOPSDONE\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum LOOPSDONE_AW { + #[doc = "1: Enable"] + SET = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: LOOPSDONE_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `LOOPSDONE` writer - Write '1' to enable interrupt for event LOOPSDONE"] +pub type LOOPSDONE_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENSET_SPEC, LOOPSDONE_AW, O>; +impl<'a, const O: u8> LOOPSDONE_W<'a, O> { + #[doc = "Enable"] + #[inline(always)] + pub fn set(self) -> &'a mut W { + self.variant(LOOPSDONE_AW::SET) + } +} +impl R { + #[doc = "Bit 1 - Write '1' to enable interrupt for event STOPPED"] + #[inline(always)] + pub fn stopped(&self) -> STOPPED_R { + STOPPED_R::new(((self.bits >> 1) & 1) != 0) + } + #[doc = "Bit 2 - Write '1' to enable interrupt for event SEQSTARTED\\[0\\]"] + #[inline(always)] + pub fn seqstarted0(&self) -> SEQSTARTED0_R { + SEQSTARTED0_R::new(((self.bits >> 2) & 1) != 0) + } + #[doc = "Bit 3 - Write '1' to enable interrupt for event SEQSTARTED\\[1\\]"] + #[inline(always)] + pub fn seqstarted1(&self) -> SEQSTARTED1_R { + SEQSTARTED1_R::new(((self.bits >> 3) & 1) != 0) + } + #[doc = "Bit 4 - Write '1' to enable interrupt for event SEQEND\\[0\\]"] + #[inline(always)] + pub fn seqend0(&self) -> SEQEND0_R { + SEQEND0_R::new(((self.bits >> 4) & 1) != 0) + } + #[doc = "Bit 5 - Write '1' to enable interrupt for event SEQEND\\[1\\]"] + #[inline(always)] + pub fn seqend1(&self) -> SEQEND1_R { + SEQEND1_R::new(((self.bits >> 5) & 1) != 0) + } + #[doc = "Bit 6 - Write '1' to enable interrupt for event PWMPERIODEND"] + #[inline(always)] + pub fn pwmperiodend(&self) -> PWMPERIODEND_R { + PWMPERIODEND_R::new(((self.bits >> 6) & 1) != 0) + } + #[doc = "Bit 7 - Write '1' to enable interrupt for event LOOPSDONE"] + #[inline(always)] + pub fn loopsdone(&self) -> LOOPSDONE_R { + LOOPSDONE_R::new(((self.bits >> 7) & 1) != 0) + } +} +impl W { + #[doc = "Bit 1 - Write '1' to enable interrupt for event STOPPED"] + #[inline(always)] + #[must_use] + pub fn stopped(&mut self) -> STOPPED_W<1> { + STOPPED_W::new(self) + } + #[doc = "Bit 2 - Write '1' to enable interrupt for event SEQSTARTED\\[0\\]"] + #[inline(always)] + #[must_use] + pub fn seqstarted0(&mut self) -> SEQSTARTED0_W<2> { + SEQSTARTED0_W::new(self) + } + #[doc = "Bit 3 - Write '1' to enable interrupt for event SEQSTARTED\\[1\\]"] + #[inline(always)] + #[must_use] + pub fn seqstarted1(&mut self) -> SEQSTARTED1_W<3> { + SEQSTARTED1_W::new(self) + } + #[doc = "Bit 4 - Write '1' to enable interrupt for event SEQEND\\[0\\]"] + #[inline(always)] + #[must_use] + pub fn seqend0(&mut self) -> SEQEND0_W<4> { + SEQEND0_W::new(self) + } + #[doc = "Bit 5 - Write '1' to enable interrupt for event SEQEND\\[1\\]"] + #[inline(always)] + #[must_use] + pub fn seqend1(&mut self) -> SEQEND1_W<5> { + SEQEND1_W::new(self) + } + #[doc = "Bit 6 - Write '1' to enable interrupt for event PWMPERIODEND"] + #[inline(always)] + #[must_use] + pub fn pwmperiodend(&mut self) -> PWMPERIODEND_W<6> { + PWMPERIODEND_W::new(self) + } + #[doc = "Bit 7 - Write '1' to enable interrupt for event LOOPSDONE"] + #[inline(always)] + #[must_use] + pub fn loopsdone(&mut self) -> LOOPSDONE_W<7> { + LOOPSDONE_W::new(self) + } + #[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 = "Enable interrupt\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 [intenset](index.html) module"] +pub struct INTENSET_SPEC; +impl crate::RegisterSpec for INTENSET_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [intenset::R](R) reader structure"] +impl crate::Readable for INTENSET_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [intenset::W](W) writer structure"] +impl crate::Writable for INTENSET_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets INTENSET to value 0"] +impl crate::Resettable for INTENSET_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/pwm0/loop_.rs b/down-the-stack/dk_pac/src/pwm0/loop_.rs new file mode 100644 index 0000000..cd5f68e --- /dev/null +++ b/down-the-stack/dk_pac/src/pwm0/loop_.rs @@ -0,0 +1,115 @@ +#[doc = "Register `LOOP` 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 `LOOP` 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 `CNT` reader - Amount of playback of pattern cycles"] +pub type CNT_R = crate::FieldReader; +#[doc = "Amount of playback of pattern cycles\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +#[repr(u16)] +pub enum CNT_A { + #[doc = "0: Looping disabled (stop at the end of the sequence)"] + DISABLED = 0, +} +impl From for u16 { + #[inline(always)] + fn from(variant: CNT_A) -> Self { + variant as _ + } +} +impl CNT_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> Option { + match self.bits { + 0 => Some(CNT_A::DISABLED), + _ => None, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == CNT_A::DISABLED + } +} +#[doc = "Field `CNT` writer - Amount of playback of pattern cycles"] +pub type CNT_W<'a, const O: u8> = crate::FieldWriter<'a, u32, LOOP_SPEC, u16, CNT_A, 16, O>; +impl<'a, const O: u8> CNT_W<'a, O> { + #[doc = "Looping disabled (stop at the end of the sequence)"] + #[inline(always)] + pub fn disabled(self) -> &'a mut W { + self.variant(CNT_A::DISABLED) + } +} +impl R { + #[doc = "Bits 0:15 - Amount of playback of pattern cycles"] + #[inline(always)] + pub fn cnt(&self) -> CNT_R { + CNT_R::new((self.bits & 0xffff) as u16) + } +} +impl W { + #[doc = "Bits 0:15 - Amount of playback of pattern cycles"] + #[inline(always)] + #[must_use] + pub fn cnt(&mut self) -> CNT_W<0> { + 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 + } +} +#[doc = "Amount of playback of a loop\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 [loop_](index.html) module"] +pub struct LOOP_SPEC; +impl crate::RegisterSpec for LOOP_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [loop_::R](R) reader structure"] +impl crate::Readable for LOOP_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [loop_::W](W) writer structure"] +impl crate::Writable for LOOP_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets LOOP to value 0"] +impl crate::Resettable for LOOP_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/pwm0/mode.rs b/down-the-stack/dk_pac/src/pwm0/mode.rs new file mode 100644 index 0000000..4d4c80f --- /dev/null +++ b/down-the-stack/dk_pac/src/pwm0/mode.rs @@ -0,0 +1,126 @@ +#[doc = "Register `MODE` 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 `MODE` 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 `UPDOWN` reader - Selects up or up and down as wave counter mode"] +pub type UPDOWN_R = crate::BitReader; +#[doc = "Selects up or up and down as wave counter mode\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum UPDOWN_A { + #[doc = "0: Up counter - edge aligned PWM duty-cycle"] + UP = 0, + #[doc = "1: Up and down counter - center aligned PWM duty cycle"] + UP_AND_DOWN = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: UPDOWN_A) -> Self { + variant as u8 != 0 + } +} +impl UPDOWN_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> UPDOWN_A { + match self.bits { + false => UPDOWN_A::UP, + true => UPDOWN_A::UP_AND_DOWN, + } + } + #[doc = "Checks if the value of the field is `UP`"] + #[inline(always)] + pub fn is_up(&self) -> bool { + *self == UPDOWN_A::UP + } + #[doc = "Checks if the value of the field is `UP_AND_DOWN`"] + #[inline(always)] + pub fn is_up_and_down(&self) -> bool { + *self == UPDOWN_A::UP_AND_DOWN + } +} +#[doc = "Field `UPDOWN` writer - Selects up or up and down as wave counter mode"] +pub type UPDOWN_W<'a, const O: u8> = crate::BitWriter<'a, u32, MODE_SPEC, UPDOWN_A, O>; +impl<'a, const O: u8> UPDOWN_W<'a, O> { + #[doc = "Up counter - edge aligned PWM duty-cycle"] + #[inline(always)] + pub fn up(self) -> &'a mut W { + self.variant(UPDOWN_A::UP) + } + #[doc = "Up and down counter - center aligned PWM duty cycle"] + #[inline(always)] + pub fn up_and_down(self) -> &'a mut W { + self.variant(UPDOWN_A::UP_AND_DOWN) + } +} +impl R { + #[doc = "Bit 0 - Selects up or up and down as wave counter mode"] + #[inline(always)] + pub fn updown(&self) -> UPDOWN_R { + UPDOWN_R::new((self.bits & 1) != 0) + } +} +impl W { + #[doc = "Bit 0 - Selects up or up and down as wave counter mode"] + #[inline(always)] + #[must_use] + pub fn updown(&mut self) -> UPDOWN_W<0> { + UPDOWN_W::new(self) + } + #[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 = "Selects operating mode of the wave counter\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 [mode](index.html) module"] +pub struct MODE_SPEC; +impl crate::RegisterSpec for MODE_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [mode::R](R) reader structure"] +impl crate::Readable for MODE_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [mode::W](W) writer structure"] +impl crate::Writable for 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 MODE to value 0"] +impl crate::Resettable for MODE_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/pwm0/prescaler.rs b/down-the-stack/dk_pac/src/pwm0/prescaler.rs new file mode 100644 index 0000000..bb0fa67 --- /dev/null +++ b/down-the-stack/dk_pac/src/pwm0/prescaler.rs @@ -0,0 +1,207 @@ +#[doc = "Register `PRESCALER` 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 `PRESCALER` 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 `PRESCALER` reader - Pre-scaler of PWM_CLK"] +pub type PRESCALER_R = crate::FieldReader; +#[doc = "Pre-scaler of PWM_CLK\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +#[repr(u8)] +pub enum PRESCALER_A { + #[doc = "0: Divide by 1 (16MHz)"] + DIV_1 = 0, + #[doc = "1: Divide by 2 ( 8MHz)"] + DIV_2 = 1, + #[doc = "2: Divide by 4 ( 4MHz)"] + DIV_4 = 2, + #[doc = "3: Divide by 8 ( 2MHz)"] + DIV_8 = 3, + #[doc = "4: Divide by 16 ( 1MHz)"] + DIV_16 = 4, + #[doc = "5: Divide by 32 ( 500kHz)"] + DIV_32 = 5, + #[doc = "6: Divide by 64 ( 250kHz)"] + DIV_64 = 6, + #[doc = "7: Divide by 128 ( 125kHz)"] + DIV_128 = 7, +} +impl From for u8 { + #[inline(always)] + fn from(variant: PRESCALER_A) -> Self { + variant as _ + } +} +impl PRESCALER_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> PRESCALER_A { + match self.bits { + 0 => PRESCALER_A::DIV_1, + 1 => PRESCALER_A::DIV_2, + 2 => PRESCALER_A::DIV_4, + 3 => PRESCALER_A::DIV_8, + 4 => PRESCALER_A::DIV_16, + 5 => PRESCALER_A::DIV_32, + 6 => PRESCALER_A::DIV_64, + 7 => PRESCALER_A::DIV_128, + _ => unreachable!(), + } + } + #[doc = "Checks if the value of the field is `DIV_1`"] + #[inline(always)] + pub fn is_div_1(&self) -> bool { + *self == PRESCALER_A::DIV_1 + } + #[doc = "Checks if the value of the field is `DIV_2`"] + #[inline(always)] + pub fn is_div_2(&self) -> bool { + *self == PRESCALER_A::DIV_2 + } + #[doc = "Checks if the value of the field is `DIV_4`"] + #[inline(always)] + pub fn is_div_4(&self) -> bool { + *self == PRESCALER_A::DIV_4 + } + #[doc = "Checks if the value of the field is `DIV_8`"] + #[inline(always)] + pub fn is_div_8(&self) -> bool { + *self == PRESCALER_A::DIV_8 + } + #[doc = "Checks if the value of the field is `DIV_16`"] + #[inline(always)] + pub fn is_div_16(&self) -> bool { + *self == PRESCALER_A::DIV_16 + } + #[doc = "Checks if the value of the field is `DIV_32`"] + #[inline(always)] + pub fn is_div_32(&self) -> bool { + *self == PRESCALER_A::DIV_32 + } + #[doc = "Checks if the value of the field is `DIV_64`"] + #[inline(always)] + pub fn is_div_64(&self) -> bool { + *self == PRESCALER_A::DIV_64 + } + #[doc = "Checks if the value of the field is `DIV_128`"] + #[inline(always)] + pub fn is_div_128(&self) -> bool { + *self == PRESCALER_A::DIV_128 + } +} +#[doc = "Field `PRESCALER` writer - Pre-scaler of PWM_CLK"] +pub type PRESCALER_W<'a, const O: u8> = + crate::FieldWriterSafe<'a, u32, PRESCALER_SPEC, u8, PRESCALER_A, 3, O>; +impl<'a, const O: u8> PRESCALER_W<'a, O> { + #[doc = "Divide by 1 (16MHz)"] + #[inline(always)] + pub fn div_1(self) -> &'a mut W { + self.variant(PRESCALER_A::DIV_1) + } + #[doc = "Divide by 2 ( 8MHz)"] + #[inline(always)] + pub fn div_2(self) -> &'a mut W { + self.variant(PRESCALER_A::DIV_2) + } + #[doc = "Divide by 4 ( 4MHz)"] + #[inline(always)] + pub fn div_4(self) -> &'a mut W { + self.variant(PRESCALER_A::DIV_4) + } + #[doc = "Divide by 8 ( 2MHz)"] + #[inline(always)] + pub fn div_8(self) -> &'a mut W { + self.variant(PRESCALER_A::DIV_8) + } + #[doc = "Divide by 16 ( 1MHz)"] + #[inline(always)] + pub fn div_16(self) -> &'a mut W { + self.variant(PRESCALER_A::DIV_16) + } + #[doc = "Divide by 32 ( 500kHz)"] + #[inline(always)] + pub fn div_32(self) -> &'a mut W { + self.variant(PRESCALER_A::DIV_32) + } + #[doc = "Divide by 64 ( 250kHz)"] + #[inline(always)] + pub fn div_64(self) -> &'a mut W { + self.variant(PRESCALER_A::DIV_64) + } + #[doc = "Divide by 128 ( 125kHz)"] + #[inline(always)] + pub fn div_128(self) -> &'a mut W { + self.variant(PRESCALER_A::DIV_128) + } +} +impl R { + #[doc = "Bits 0:2 - Pre-scaler of PWM_CLK"] + #[inline(always)] + pub fn prescaler(&self) -> PRESCALER_R { + PRESCALER_R::new((self.bits & 7) as u8) + } +} +impl W { + #[doc = "Bits 0:2 - Pre-scaler of PWM_CLK"] + #[inline(always)] + #[must_use] + pub fn prescaler(&mut self) -> PRESCALER_W<0> { + PRESCALER_W::new(self) + } + #[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 = "Configuration for PWM_CLK\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 [prescaler](index.html) module"] +pub struct PRESCALER_SPEC; +impl crate::RegisterSpec for PRESCALER_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [prescaler::R](R) reader structure"] +impl crate::Readable for PRESCALER_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [prescaler::W](W) writer structure"] +impl crate::Writable for PRESCALER_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets PRESCALER to value 0"] +impl crate::Resettable for PRESCALER_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/pwm0/psel.rs b/down-the-stack/dk_pac/src/pwm0/psel.rs new file mode 100644 index 0000000..600585b --- /dev/null +++ b/down-the-stack/dk_pac/src/pwm0/psel.rs @@ -0,0 +1,10 @@ +#[doc = r"Register block"] +#[repr(C)] +pub struct PSEL { + #[doc = "0x00..0x10 - Description collection: Output pin select for PWM channel n"] + pub out: [OUT; 4], +} +#[doc = "OUT (rw) register accessor: an alias for `Reg`"] +pub type OUT = crate::Reg; +#[doc = "Description collection: Output pin select for PWM channel n"] +pub mod out; diff --git a/down-the-stack/dk_pac/src/pwm0/psel/out.rs b/down-the-stack/dk_pac/src/pwm0/psel/out.rs new file mode 100644 index 0000000..7e35b70 --- /dev/null +++ b/down-the-stack/dk_pac/src/pwm0/psel/out.rs @@ -0,0 +1,142 @@ +#[doc = "Register `OUT[%s]` 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 `OUT[%s]` 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 `PIN` reader - Pin number"] +pub type PIN_R = crate::FieldReader; +#[doc = "Field `PIN` writer - Pin number"] +pub type PIN_W<'a, const O: u8> = crate::FieldWriter<'a, u32, OUT_SPEC, u8, u8, 5, O>; +#[doc = "Field `CONNECT` reader - Connection"] +pub type CONNECT_R = crate::BitReader; +#[doc = "Connection\n\nValue on reset: 1"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum CONNECT_A { + #[doc = "1: Disconnect"] + DISCONNECTED = 1, + #[doc = "0: Connect"] + CONNECTED = 0, +} +impl From for bool { + #[inline(always)] + fn from(variant: CONNECT_A) -> Self { + variant as u8 != 0 + } +} +impl CONNECT_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> CONNECT_A { + match self.bits { + true => CONNECT_A::DISCONNECTED, + false => CONNECT_A::CONNECTED, + } + } + #[doc = "Checks if the value of the field is `DISCONNECTED`"] + #[inline(always)] + pub fn is_disconnected(&self) -> bool { + *self == CONNECT_A::DISCONNECTED + } + #[doc = "Checks if the value of the field is `CONNECTED`"] + #[inline(always)] + pub fn is_connected(&self) -> bool { + *self == CONNECT_A::CONNECTED + } +} +#[doc = "Field `CONNECT` writer - Connection"] +pub type CONNECT_W<'a, const O: u8> = crate::BitWriter<'a, u32, OUT_SPEC, CONNECT_A, O>; +impl<'a, const O: u8> CONNECT_W<'a, O> { + #[doc = "Disconnect"] + #[inline(always)] + pub fn disconnected(self) -> &'a mut W { + self.variant(CONNECT_A::DISCONNECTED) + } + #[doc = "Connect"] + #[inline(always)] + pub fn connected(self) -> &'a mut W { + self.variant(CONNECT_A::CONNECTED) + } +} +impl R { + #[doc = "Bits 0:4 - Pin number"] + #[inline(always)] + pub fn pin(&self) -> PIN_R { + PIN_R::new((self.bits & 0x1f) as u8) + } + #[doc = "Bit 31 - Connection"] + #[inline(always)] + pub fn connect(&self) -> CONNECT_R { + CONNECT_R::new(((self.bits >> 31) & 1) != 0) + } +} +impl W { + #[doc = "Bits 0:4 - Pin number"] + #[inline(always)] + #[must_use] + pub fn pin(&mut self) -> PIN_W<0> { + PIN_W::new(self) + } + #[doc = "Bit 31 - Connection"] + #[inline(always)] + #[must_use] + pub fn connect(&mut self) -> CONNECT_W<31> { + CONNECT_W::new(self) + } + #[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 = "Description collection: Output pin select for PWM channel n\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 [out](index.html) module"] +pub struct OUT_SPEC; +impl crate::RegisterSpec for OUT_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [out::R](R) reader structure"] +impl crate::Readable for OUT_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [out::W](W) writer structure"] +impl crate::Writable for 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 OUT[%s] +to value 0xffff_ffff"] +impl crate::Resettable for OUT_SPEC { + const RESET_VALUE: Self::Ux = 0xffff_ffff; +} diff --git a/down-the-stack/dk_pac/src/pwm0/seq.rs b/down-the-stack/dk_pac/src/pwm0/seq.rs new file mode 100644 index 0000000..aa84faf --- /dev/null +++ b/down-the-stack/dk_pac/src/pwm0/seq.rs @@ -0,0 +1,28 @@ +#[doc = r"Register block"] +#[repr(C)] +pub struct SEQ { + #[doc = "0x00 - Description cluster: Beginning address in Data RAM of this sequence"] + pub ptr: PTR, + #[doc = "0x04 - Description cluster: Amount of values (duty cycles) in this sequence"] + pub cnt: CNT, + #[doc = "0x08 - Description cluster: Amount of additional PWM periods between samples loaded into compare register"] + pub refresh: REFRESH, + #[doc = "0x0c - Description cluster: Time added after the sequence"] + pub enddelay: ENDDELAY, +} +#[doc = "PTR (rw) register accessor: an alias for `Reg`"] +pub type PTR = crate::Reg; +#[doc = "Description cluster: Beginning address in Data RAM of this sequence"] +pub mod ptr; +#[doc = "CNT (rw) register accessor: an alias for `Reg`"] +pub type CNT = crate::Reg; +#[doc = "Description cluster: Amount of values (duty cycles) in this sequence"] +pub mod cnt; +#[doc = "REFRESH (rw) register accessor: an alias for `Reg`"] +pub type REFRESH = crate::Reg; +#[doc = "Description cluster: Amount of additional PWM periods between samples loaded into compare register"] +pub mod refresh; +#[doc = "ENDDELAY (rw) register accessor: an alias for `Reg`"] +pub type ENDDELAY = crate::Reg; +#[doc = "Description cluster: Time added after the sequence"] +pub mod enddelay; diff --git a/down-the-stack/dk_pac/src/pwm0/seq/cnt.rs b/down-the-stack/dk_pac/src/pwm0/seq/cnt.rs new file mode 100644 index 0000000..9dc473a --- /dev/null +++ b/down-the-stack/dk_pac/src/pwm0/seq/cnt.rs @@ -0,0 +1,115 @@ +#[doc = "Register `CNT` 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 `CNT` 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 `CNT` reader - Amount of values (duty cycles) in this sequence"] +pub type CNT_R = crate::FieldReader; +#[doc = "Amount of values (duty cycles) in this sequence\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +#[repr(u16)] +pub enum CNT_A { + #[doc = "0: Sequence is disabled, and shall not be started as it is empty"] + DISABLED = 0, +} +impl From for u16 { + #[inline(always)] + fn from(variant: CNT_A) -> Self { + variant as _ + } +} +impl CNT_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> Option { + match self.bits { + 0 => Some(CNT_A::DISABLED), + _ => None, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == CNT_A::DISABLED + } +} +#[doc = "Field `CNT` writer - Amount of values (duty cycles) in this sequence"] +pub type CNT_W<'a, const O: u8> = crate::FieldWriter<'a, u32, CNT_SPEC, u16, CNT_A, 15, O>; +impl<'a, const O: u8> CNT_W<'a, O> { + #[doc = "Sequence is disabled, and shall not be started as it is empty"] + #[inline(always)] + pub fn disabled(self) -> &'a mut W { + self.variant(CNT_A::DISABLED) + } +} +impl R { + #[doc = "Bits 0:14 - Amount of values (duty cycles) in this sequence"] + #[inline(always)] + pub fn cnt(&self) -> CNT_R { + CNT_R::new((self.bits & 0x7fff) as u16) + } +} +impl W { + #[doc = "Bits 0:14 - Amount of values (duty cycles) in this sequence"] + #[inline(always)] + #[must_use] + pub fn cnt(&mut self) -> CNT_W<0> { + 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 + } +} +#[doc = "Description cluster: Amount of values (duty cycles) in this sequence\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 [cnt](index.html) module"] +pub struct CNT_SPEC; +impl crate::RegisterSpec for CNT_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [cnt::R](R) reader structure"] +impl crate::Readable for CNT_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [cnt::W](W) writer structure"] +impl crate::Writable for CNT_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets CNT to value 0"] +impl crate::Resettable for CNT_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/pwm0/seq/enddelay.rs b/down-the-stack/dk_pac/src/pwm0/seq/enddelay.rs new file mode 100644 index 0000000..968faa8 --- /dev/null +++ b/down-the-stack/dk_pac/src/pwm0/seq/enddelay.rs @@ -0,0 +1,80 @@ +#[doc = "Register `ENDDELAY` 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 `ENDDELAY` 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 `CNT` reader - Time added after the sequence in PWM periods"] +pub type CNT_R = crate::FieldReader; +#[doc = "Field `CNT` writer - Time added after the sequence in PWM periods"] +pub type CNT_W<'a, const O: u8> = crate::FieldWriter<'a, u32, ENDDELAY_SPEC, u32, u32, 24, O>; +impl R { + #[doc = "Bits 0:23 - Time added after the sequence in PWM periods"] + #[inline(always)] + pub fn cnt(&self) -> CNT_R { + CNT_R::new(self.bits & 0x00ff_ffff) + } +} +impl W { + #[doc = "Bits 0:23 - Time added after the sequence in PWM periods"] + #[inline(always)] + #[must_use] + pub fn cnt(&mut self) -> CNT_W<0> { + 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 + } +} +#[doc = "Description cluster: Time added after the sequence\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 [enddelay](index.html) module"] +pub struct ENDDELAY_SPEC; +impl crate::RegisterSpec for ENDDELAY_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [enddelay::R](R) reader structure"] +impl crate::Readable for ENDDELAY_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [enddelay::W](W) writer structure"] +impl crate::Writable for ENDDELAY_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets ENDDELAY to value 0"] +impl crate::Resettable for ENDDELAY_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/pwm0/seq/ptr.rs b/down-the-stack/dk_pac/src/pwm0/seq/ptr.rs new file mode 100644 index 0000000..7234f22 --- /dev/null +++ b/down-the-stack/dk_pac/src/pwm0/seq/ptr.rs @@ -0,0 +1,80 @@ +#[doc = "Register `PTR` 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 `PTR` 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 `PTR` reader - Beginning address in Data RAM of this sequence"] +pub type PTR_R = crate::FieldReader; +#[doc = "Field `PTR` writer - Beginning address in Data RAM of this sequence"] +pub type PTR_W<'a, const O: u8> = crate::FieldWriter<'a, u32, PTR_SPEC, u32, u32, 32, O>; +impl R { + #[doc = "Bits 0:31 - Beginning address in Data RAM of this sequence"] + #[inline(always)] + pub fn ptr(&self) -> PTR_R { + PTR_R::new(self.bits) + } +} +impl W { + #[doc = "Bits 0:31 - Beginning address in Data RAM of this sequence"] + #[inline(always)] + #[must_use] + pub fn ptr(&mut self) -> PTR_W<0> { + PTR_W::new(self) + } + #[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 = "Description cluster: Beginning address in Data RAM of this sequence\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 [ptr](index.html) module"] +pub struct PTR_SPEC; +impl crate::RegisterSpec for PTR_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [ptr::R](R) reader structure"] +impl crate::Readable for PTR_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [ptr::W](W) writer structure"] +impl crate::Writable for PTR_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets PTR to value 0"] +impl crate::Resettable for PTR_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/pwm0/seq/refresh.rs b/down-the-stack/dk_pac/src/pwm0/seq/refresh.rs new file mode 100644 index 0000000..8d465c2 --- /dev/null +++ b/down-the-stack/dk_pac/src/pwm0/seq/refresh.rs @@ -0,0 +1,115 @@ +#[doc = "Register `REFRESH` 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 `REFRESH` 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 `CNT` reader - Amount of additional PWM periods between samples loaded into compare register (load every REFRESH.CNT+1 PWM periods)"] +pub type CNT_R = crate::FieldReader; +#[doc = "Amount of additional PWM periods between samples loaded into compare register (load every REFRESH.CNT+1 PWM periods)\n\nValue on reset: 1"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +#[repr(u32)] +pub enum CNT_A { + #[doc = "0: Update every PWM period"] + CONTINUOUS = 0, +} +impl From for u32 { + #[inline(always)] + fn from(variant: CNT_A) -> Self { + variant as _ + } +} +impl CNT_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> Option { + match self.bits { + 0 => Some(CNT_A::CONTINUOUS), + _ => None, + } + } + #[doc = "Checks if the value of the field is `CONTINUOUS`"] + #[inline(always)] + pub fn is_continuous(&self) -> bool { + *self == CNT_A::CONTINUOUS + } +} +#[doc = "Field `CNT` writer - Amount of additional PWM periods between samples loaded into compare register (load every REFRESH.CNT+1 PWM periods)"] +pub type CNT_W<'a, const O: u8> = crate::FieldWriter<'a, u32, REFRESH_SPEC, u32, CNT_A, 24, O>; +impl<'a, const O: u8> CNT_W<'a, O> { + #[doc = "Update every PWM period"] + #[inline(always)] + pub fn continuous(self) -> &'a mut W { + self.variant(CNT_A::CONTINUOUS) + } +} +impl R { + #[doc = "Bits 0:23 - Amount of additional PWM periods between samples loaded into compare register (load every REFRESH.CNT+1 PWM periods)"] + #[inline(always)] + pub fn cnt(&self) -> CNT_R { + CNT_R::new(self.bits & 0x00ff_ffff) + } +} +impl W { + #[doc = "Bits 0:23 - Amount of additional PWM periods between samples loaded into compare register (load every REFRESH.CNT+1 PWM periods)"] + #[inline(always)] + #[must_use] + pub fn cnt(&mut self) -> CNT_W<0> { + 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 + } +} +#[doc = "Description cluster: Amount of additional PWM periods between samples loaded into compare register\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 [refresh](index.html) module"] +pub struct REFRESH_SPEC; +impl crate::RegisterSpec for REFRESH_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [refresh::R](R) reader structure"] +impl crate::Readable for REFRESH_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [refresh::W](W) writer structure"] +impl crate::Writable for REFRESH_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets REFRESH to value 0x01"] +impl crate::Resettable for REFRESH_SPEC { + const RESET_VALUE: Self::Ux = 0x01; +} diff --git a/down-the-stack/dk_pac/src/pwm0/shorts.rs b/down-the-stack/dk_pac/src/pwm0/shorts.rs new file mode 100644 index 0000000..d81cbf1 --- /dev/null +++ b/down-the-stack/dk_pac/src/pwm0/shorts.rs @@ -0,0 +1,385 @@ +#[doc = "Register `SHORTS` 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 `SHORTS` 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 `SEQEND0_STOP` reader - Shortcut between event SEQEND\\[0\\] +and task STOP"] +pub type SEQEND0_STOP_R = crate::BitReader; +#[doc = "Shortcut between event SEQEND\\[0\\] +and task STOP\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum SEQEND0_STOP_A { + #[doc = "0: Disable shortcut"] + DISABLED = 0, + #[doc = "1: Enable shortcut"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: SEQEND0_STOP_A) -> Self { + variant as u8 != 0 + } +} +impl SEQEND0_STOP_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> SEQEND0_STOP_A { + match self.bits { + false => SEQEND0_STOP_A::DISABLED, + true => SEQEND0_STOP_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == SEQEND0_STOP_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == SEQEND0_STOP_A::ENABLED + } +} +#[doc = "Field `SEQEND0_STOP` writer - Shortcut between event SEQEND\\[0\\] +and task STOP"] +pub type SEQEND0_STOP_W<'a, const O: u8> = + crate::BitWriter<'a, u32, SHORTS_SPEC, SEQEND0_STOP_A, O>; +impl<'a, const O: u8> SEQEND0_STOP_W<'a, O> { + #[doc = "Disable shortcut"] + #[inline(always)] + pub fn disabled(self) -> &'a mut W { + self.variant(SEQEND0_STOP_A::DISABLED) + } + #[doc = "Enable shortcut"] + #[inline(always)] + pub fn enabled(self) -> &'a mut W { + self.variant(SEQEND0_STOP_A::ENABLED) + } +} +#[doc = "Field `SEQEND1_STOP` reader - Shortcut between event SEQEND\\[1\\] +and task STOP"] +pub type SEQEND1_STOP_R = crate::BitReader; +#[doc = "Shortcut between event SEQEND\\[1\\] +and task STOP\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum SEQEND1_STOP_A { + #[doc = "0: Disable shortcut"] + DISABLED = 0, + #[doc = "1: Enable shortcut"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: SEQEND1_STOP_A) -> Self { + variant as u8 != 0 + } +} +impl SEQEND1_STOP_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> SEQEND1_STOP_A { + match self.bits { + false => SEQEND1_STOP_A::DISABLED, + true => SEQEND1_STOP_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == SEQEND1_STOP_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == SEQEND1_STOP_A::ENABLED + } +} +#[doc = "Field `SEQEND1_STOP` writer - Shortcut between event SEQEND\\[1\\] +and task STOP"] +pub type SEQEND1_STOP_W<'a, const O: u8> = + crate::BitWriter<'a, u32, SHORTS_SPEC, SEQEND1_STOP_A, O>; +impl<'a, const O: u8> SEQEND1_STOP_W<'a, O> { + #[doc = "Disable shortcut"] + #[inline(always)] + pub fn disabled(self) -> &'a mut W { + self.variant(SEQEND1_STOP_A::DISABLED) + } + #[doc = "Enable shortcut"] + #[inline(always)] + pub fn enabled(self) -> &'a mut W { + self.variant(SEQEND1_STOP_A::ENABLED) + } +} +#[doc = "Field `LOOPSDONE_SEQSTART0` reader - Shortcut between event LOOPSDONE and task SEQSTART\\[0\\]"] +pub type LOOPSDONE_SEQSTART0_R = crate::BitReader; +#[doc = "Shortcut between event LOOPSDONE and task SEQSTART\\[0\\]\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum LOOPSDONE_SEQSTART0_A { + #[doc = "0: Disable shortcut"] + DISABLED = 0, + #[doc = "1: Enable shortcut"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: LOOPSDONE_SEQSTART0_A) -> Self { + variant as u8 != 0 + } +} +impl LOOPSDONE_SEQSTART0_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> LOOPSDONE_SEQSTART0_A { + match self.bits { + false => LOOPSDONE_SEQSTART0_A::DISABLED, + true => LOOPSDONE_SEQSTART0_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == LOOPSDONE_SEQSTART0_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == LOOPSDONE_SEQSTART0_A::ENABLED + } +} +#[doc = "Field `LOOPSDONE_SEQSTART0` writer - Shortcut between event LOOPSDONE and task SEQSTART\\[0\\]"] +pub type LOOPSDONE_SEQSTART0_W<'a, const O: u8> = + crate::BitWriter<'a, u32, SHORTS_SPEC, LOOPSDONE_SEQSTART0_A, O>; +impl<'a, const O: u8> LOOPSDONE_SEQSTART0_W<'a, O> { + #[doc = "Disable shortcut"] + #[inline(always)] + pub fn disabled(self) -> &'a mut W { + self.variant(LOOPSDONE_SEQSTART0_A::DISABLED) + } + #[doc = "Enable shortcut"] + #[inline(always)] + pub fn enabled(self) -> &'a mut W { + self.variant(LOOPSDONE_SEQSTART0_A::ENABLED) + } +} +#[doc = "Field `LOOPSDONE_SEQSTART1` reader - Shortcut between event LOOPSDONE and task SEQSTART\\[1\\]"] +pub type LOOPSDONE_SEQSTART1_R = crate::BitReader; +#[doc = "Shortcut between event LOOPSDONE and task SEQSTART\\[1\\]\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum LOOPSDONE_SEQSTART1_A { + #[doc = "0: Disable shortcut"] + DISABLED = 0, + #[doc = "1: Enable shortcut"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: LOOPSDONE_SEQSTART1_A) -> Self { + variant as u8 != 0 + } +} +impl LOOPSDONE_SEQSTART1_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> LOOPSDONE_SEQSTART1_A { + match self.bits { + false => LOOPSDONE_SEQSTART1_A::DISABLED, + true => LOOPSDONE_SEQSTART1_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == LOOPSDONE_SEQSTART1_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == LOOPSDONE_SEQSTART1_A::ENABLED + } +} +#[doc = "Field `LOOPSDONE_SEQSTART1` writer - Shortcut between event LOOPSDONE and task SEQSTART\\[1\\]"] +pub type LOOPSDONE_SEQSTART1_W<'a, const O: u8> = + crate::BitWriter<'a, u32, SHORTS_SPEC, LOOPSDONE_SEQSTART1_A, O>; +impl<'a, const O: u8> LOOPSDONE_SEQSTART1_W<'a, O> { + #[doc = "Disable shortcut"] + #[inline(always)] + pub fn disabled(self) -> &'a mut W { + self.variant(LOOPSDONE_SEQSTART1_A::DISABLED) + } + #[doc = "Enable shortcut"] + #[inline(always)] + pub fn enabled(self) -> &'a mut W { + self.variant(LOOPSDONE_SEQSTART1_A::ENABLED) + } +} +#[doc = "Field `LOOPSDONE_STOP` reader - Shortcut between event LOOPSDONE and task STOP"] +pub type LOOPSDONE_STOP_R = crate::BitReader; +#[doc = "Shortcut between event LOOPSDONE and task STOP\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum LOOPSDONE_STOP_A { + #[doc = "0: Disable shortcut"] + DISABLED = 0, + #[doc = "1: Enable shortcut"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: LOOPSDONE_STOP_A) -> Self { + variant as u8 != 0 + } +} +impl LOOPSDONE_STOP_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> LOOPSDONE_STOP_A { + match self.bits { + false => LOOPSDONE_STOP_A::DISABLED, + true => LOOPSDONE_STOP_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == LOOPSDONE_STOP_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == LOOPSDONE_STOP_A::ENABLED + } +} +#[doc = "Field `LOOPSDONE_STOP` writer - Shortcut between event LOOPSDONE and task STOP"] +pub type LOOPSDONE_STOP_W<'a, const O: u8> = + crate::BitWriter<'a, u32, SHORTS_SPEC, LOOPSDONE_STOP_A, O>; +impl<'a, const O: u8> LOOPSDONE_STOP_W<'a, O> { + #[doc = "Disable shortcut"] + #[inline(always)] + pub fn disabled(self) -> &'a mut W { + self.variant(LOOPSDONE_STOP_A::DISABLED) + } + #[doc = "Enable shortcut"] + #[inline(always)] + pub fn enabled(self) -> &'a mut W { + self.variant(LOOPSDONE_STOP_A::ENABLED) + } +} +impl R { + #[doc = "Bit 0 - Shortcut between event SEQEND\\[0\\] +and task STOP"] + #[inline(always)] + pub fn seqend0_stop(&self) -> SEQEND0_STOP_R { + SEQEND0_STOP_R::new((self.bits & 1) != 0) + } + #[doc = "Bit 1 - Shortcut between event SEQEND\\[1\\] +and task STOP"] + #[inline(always)] + pub fn seqend1_stop(&self) -> SEQEND1_STOP_R { + SEQEND1_STOP_R::new(((self.bits >> 1) & 1) != 0) + } + #[doc = "Bit 2 - Shortcut between event LOOPSDONE and task SEQSTART\\[0\\]"] + #[inline(always)] + pub fn loopsdone_seqstart0(&self) -> LOOPSDONE_SEQSTART0_R { + LOOPSDONE_SEQSTART0_R::new(((self.bits >> 2) & 1) != 0) + } + #[doc = "Bit 3 - Shortcut between event LOOPSDONE and task SEQSTART\\[1\\]"] + #[inline(always)] + pub fn loopsdone_seqstart1(&self) -> LOOPSDONE_SEQSTART1_R { + LOOPSDONE_SEQSTART1_R::new(((self.bits >> 3) & 1) != 0) + } + #[doc = "Bit 4 - Shortcut between event LOOPSDONE and task STOP"] + #[inline(always)] + pub fn loopsdone_stop(&self) -> LOOPSDONE_STOP_R { + LOOPSDONE_STOP_R::new(((self.bits >> 4) & 1) != 0) + } +} +impl W { + #[doc = "Bit 0 - Shortcut between event SEQEND\\[0\\] +and task STOP"] + #[inline(always)] + #[must_use] + pub fn seqend0_stop(&mut self) -> SEQEND0_STOP_W<0> { + SEQEND0_STOP_W::new(self) + } + #[doc = "Bit 1 - Shortcut between event SEQEND\\[1\\] +and task STOP"] + #[inline(always)] + #[must_use] + pub fn seqend1_stop(&mut self) -> SEQEND1_STOP_W<1> { + SEQEND1_STOP_W::new(self) + } + #[doc = "Bit 2 - Shortcut between event LOOPSDONE and task SEQSTART\\[0\\]"] + #[inline(always)] + #[must_use] + pub fn loopsdone_seqstart0(&mut self) -> LOOPSDONE_SEQSTART0_W<2> { + LOOPSDONE_SEQSTART0_W::new(self) + } + #[doc = "Bit 3 - Shortcut between event LOOPSDONE and task SEQSTART\\[1\\]"] + #[inline(always)] + #[must_use] + pub fn loopsdone_seqstart1(&mut self) -> LOOPSDONE_SEQSTART1_W<3> { + LOOPSDONE_SEQSTART1_W::new(self) + } + #[doc = "Bit 4 - Shortcut between event LOOPSDONE and task STOP"] + #[inline(always)] + #[must_use] + pub fn loopsdone_stop(&mut self) -> LOOPSDONE_STOP_W<4> { + LOOPSDONE_STOP_W::new(self) + } + #[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 = "Shortcuts between local events and tasks\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 [shorts](index.html) module"] +pub struct SHORTS_SPEC; +impl crate::RegisterSpec for SHORTS_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [shorts::R](R) reader structure"] +impl crate::Readable for SHORTS_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [shorts::W](W) writer structure"] +impl crate::Writable for SHORTS_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets SHORTS to value 0"] +impl crate::Resettable for SHORTS_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/pwm0/tasks_nextstep.rs b/down-the-stack/dk_pac/src/pwm0/tasks_nextstep.rs new file mode 100644 index 0000000..cc81fe5 --- /dev/null +++ b/down-the-stack/dk_pac/src/pwm0/tasks_nextstep.rs @@ -0,0 +1,72 @@ +#[doc = "Register `TASKS_NEXTSTEP` 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 = "Steps by one value in the current sequence on all enabled channels if DECODER.MODE=NextStep. Does not cause PWM generation to start it was not running.\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum TASKS_NEXTSTEP_AW { + #[doc = "1: Trigger task"] + TRIGGER = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: TASKS_NEXTSTEP_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `TASKS_NEXTSTEP` writer - Steps by one value in the current sequence on all enabled channels if DECODER.MODE=NextStep. Does not cause PWM generation to start it was not running."] +pub type TASKS_NEXTSTEP_W<'a, const O: u8> = + crate::BitWriter<'a, u32, TASKS_NEXTSTEP_SPEC, TASKS_NEXTSTEP_AW, O>; +impl<'a, const O: u8> TASKS_NEXTSTEP_W<'a, O> { + #[doc = "Trigger task"] + #[inline(always)] + pub fn trigger(self) -> &'a mut W { + self.variant(TASKS_NEXTSTEP_AW::TRIGGER) + } +} +impl W { + #[doc = "Bit 0 - Steps by one value in the current sequence on all enabled channels if DECODER.MODE=NextStep. Does not cause PWM generation to start it was not running."] + #[inline(always)] + #[must_use] + pub fn tasks_nextstep(&mut self) -> TASKS_NEXTSTEP_W<0> { + TASKS_NEXTSTEP_W::new(self) + } + #[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 = "Steps by one value in the current sequence on all enabled channels if DECODER.MODE=NextStep. Does not cause PWM generation to start it was not running.\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 [tasks_nextstep](index.html) module"] +pub struct TASKS_NEXTSTEP_SPEC; +impl crate::RegisterSpec for TASKS_NEXTSTEP_SPEC { + type Ux = u32; +} +#[doc = "`write(|w| ..)` method takes [tasks_nextstep::W](W) writer structure"] +impl crate::Writable for TASKS_NEXTSTEP_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets TASKS_NEXTSTEP to value 0"] +impl crate::Resettable for TASKS_NEXTSTEP_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/pwm0/tasks_seqstart.rs b/down-the-stack/dk_pac/src/pwm0/tasks_seqstart.rs new file mode 100644 index 0000000..f70db5f --- /dev/null +++ b/down-the-stack/dk_pac/src/pwm0/tasks_seqstart.rs @@ -0,0 +1,73 @@ +#[doc = "Register `TASKS_SEQSTART[%s]` 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 = "Loads the first PWM value on all enabled channels from sequence n, and starts playing that sequence at the rate defined in SEQ\\[n\\]REFRESH and/or DECODER.MODE. Causes PWM generation to start it was not running.\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum TASKS_SEQSTART_AW { + #[doc = "1: Trigger task"] + TRIGGER = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: TASKS_SEQSTART_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `TASKS_SEQSTART` writer - Loads the first PWM value on all enabled channels from sequence n, and starts playing that sequence at the rate defined in SEQ\\[n\\]REFRESH and/or DECODER.MODE. Causes PWM generation to start it was not running."] +pub type TASKS_SEQSTART_W<'a, const O: u8> = + crate::BitWriter<'a, u32, TASKS_SEQSTART_SPEC, TASKS_SEQSTART_AW, O>; +impl<'a, const O: u8> TASKS_SEQSTART_W<'a, O> { + #[doc = "Trigger task"] + #[inline(always)] + pub fn trigger(self) -> &'a mut W { + self.variant(TASKS_SEQSTART_AW::TRIGGER) + } +} +impl W { + #[doc = "Bit 0 - Loads the first PWM value on all enabled channels from sequence n, and starts playing that sequence at the rate defined in SEQ\\[n\\]REFRESH and/or DECODER.MODE. Causes PWM generation to start it was not running."] + #[inline(always)] + #[must_use] + pub fn tasks_seqstart(&mut self) -> TASKS_SEQSTART_W<0> { + TASKS_SEQSTART_W::new(self) + } + #[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 = "Description collection: Loads the first PWM value on all enabled channels from sequence n, and starts playing that sequence at the rate defined in SEQ\\[n\\]REFRESH and/or DECODER.MODE. Causes PWM generation to start it was not running.\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 [tasks_seqstart](index.html) module"] +pub struct TASKS_SEQSTART_SPEC; +impl crate::RegisterSpec for TASKS_SEQSTART_SPEC { + type Ux = u32; +} +#[doc = "`write(|w| ..)` method takes [tasks_seqstart::W](W) writer structure"] +impl crate::Writable for TASKS_SEQSTART_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets TASKS_SEQSTART[%s] +to value 0"] +impl crate::Resettable for TASKS_SEQSTART_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/pwm0/tasks_stop.rs b/down-the-stack/dk_pac/src/pwm0/tasks_stop.rs new file mode 100644 index 0000000..b0052f1 --- /dev/null +++ b/down-the-stack/dk_pac/src/pwm0/tasks_stop.rs @@ -0,0 +1,72 @@ +#[doc = "Register `TASKS_STOP` 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 = "Stops PWM pulse generation on all channels at the end of current PWM period, and stops sequence playback\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum TASKS_STOP_AW { + #[doc = "1: Trigger task"] + TRIGGER = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: TASKS_STOP_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `TASKS_STOP` writer - Stops PWM pulse generation on all channels at the end of current PWM period, and stops sequence playback"] +pub type TASKS_STOP_W<'a, const O: u8> = + crate::BitWriter<'a, u32, TASKS_STOP_SPEC, TASKS_STOP_AW, O>; +impl<'a, const O: u8> TASKS_STOP_W<'a, O> { + #[doc = "Trigger task"] + #[inline(always)] + pub fn trigger(self) -> &'a mut W { + self.variant(TASKS_STOP_AW::TRIGGER) + } +} +impl W { + #[doc = "Bit 0 - Stops PWM pulse generation on all channels at the end of current PWM period, and stops sequence playback"] + #[inline(always)] + #[must_use] + pub fn tasks_stop(&mut self) -> TASKS_STOP_W<0> { + TASKS_STOP_W::new(self) + } + #[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 = "Stops PWM pulse generation on all channels at the end of current PWM period, and stops sequence playback\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 [tasks_stop](index.html) module"] +pub struct TASKS_STOP_SPEC; +impl crate::RegisterSpec for TASKS_STOP_SPEC { + type Ux = u32; +} +#[doc = "`write(|w| ..)` method takes [tasks_stop::W](W) writer structure"] +impl crate::Writable for TASKS_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 TASKS_STOP to value 0"] +impl crate::Resettable for TASKS_STOP_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/qdec.rs b/down-the-stack/dk_pac/src/qdec.rs new file mode 100644 index 0000000..23e38e6 --- /dev/null +++ b/down-the-stack/dk_pac/src/qdec.rs @@ -0,0 +1,160 @@ +#[doc = r"Register block"] +#[repr(C)] +pub struct RegisterBlock { + #[doc = "0x00 - Task starting the quadrature decoder"] + pub tasks_start: TASKS_START, + #[doc = "0x04 - Task stopping the quadrature decoder"] + pub tasks_stop: TASKS_STOP, + #[doc = "0x08 - Read and clear ACC and ACCDBL"] + pub tasks_readclracc: TASKS_READCLRACC, + #[doc = "0x0c - Read and clear ACC"] + pub tasks_rdclracc: TASKS_RDCLRACC, + #[doc = "0x10 - Read and clear ACCDBL"] + pub tasks_rdclrdbl: TASKS_RDCLRDBL, + _reserved5: [u8; 0xec], + #[doc = "0x100 - Event being generated for every new sample value written to the SAMPLE register"] + pub events_samplerdy: EVENTS_SAMPLERDY, + #[doc = "0x104 - Non-null report ready"] + pub events_reportrdy: EVENTS_REPORTRDY, + #[doc = "0x108 - ACC or ACCDBL register overflow"] + pub events_accof: EVENTS_ACCOF, + #[doc = "0x10c - Double displacement(s) detected"] + pub events_dblrdy: EVENTS_DBLRDY, + #[doc = "0x110 - QDEC has been stopped"] + pub events_stopped: EVENTS_STOPPED, + _reserved10: [u8; 0xec], + #[doc = "0x200 - Shortcuts between local events and tasks"] + pub shorts: SHORTS, + _reserved11: [u8; 0x0100], + #[doc = "0x304 - Enable interrupt"] + pub intenset: INTENSET, + #[doc = "0x308 - Disable interrupt"] + pub intenclr: INTENCLR, + _reserved13: [u8; 0x01f4], + #[doc = "0x500 - Enable the quadrature decoder"] + pub enable: ENABLE, + #[doc = "0x504 - LED output pin polarity"] + pub ledpol: LEDPOL, + #[doc = "0x508 - Sample period"] + pub sampleper: SAMPLEPER, + #[doc = "0x50c - Motion sample value"] + pub sample: SAMPLE, + #[doc = "0x510 - Number of samples to be taken before REPORTRDY and DBLRDY events can be generated"] + pub reportper: REPORTPER, + #[doc = "0x514 - Register accumulating the valid transitions"] + pub acc: ACC, + #[doc = "0x518 - Snapshot of the ACC register, updated by the READCLRACC or RDCLRACC task"] + pub accread: ACCREAD, + #[doc = "0x51c..0x528 - Unspecified"] + pub psel: PSEL, + #[doc = "0x528 - Enable input debounce filters"] + pub dbfen: DBFEN, + _reserved22: [u8; 0x14], + #[doc = "0x540 - Time period the LED is switched ON prior to sampling"] + pub ledpre: LEDPRE, + #[doc = "0x544 - Register accumulating the number of detected double transitions"] + pub accdbl: ACCDBL, + #[doc = "0x548 - Snapshot of the ACCDBL, updated by the READCLRACC or RDCLRDBL task"] + pub accdblread: ACCDBLREAD, +} +#[doc = "TASKS_START (w) register accessor: an alias for `Reg`"] +pub type TASKS_START = crate::Reg; +#[doc = "Task starting the quadrature decoder"] +pub mod tasks_start; +#[doc = "TASKS_STOP (w) register accessor: an alias for `Reg`"] +pub type TASKS_STOP = crate::Reg; +#[doc = "Task stopping the quadrature decoder"] +pub mod tasks_stop; +#[doc = "TASKS_READCLRACC (w) register accessor: an alias for `Reg`"] +pub type TASKS_READCLRACC = crate::Reg; +#[doc = "Read and clear ACC and ACCDBL"] +pub mod tasks_readclracc; +#[doc = "TASKS_RDCLRACC (w) register accessor: an alias for `Reg`"] +pub type TASKS_RDCLRACC = crate::Reg; +#[doc = "Read and clear ACC"] +pub mod tasks_rdclracc; +#[doc = "TASKS_RDCLRDBL (w) register accessor: an alias for `Reg`"] +pub type TASKS_RDCLRDBL = crate::Reg; +#[doc = "Read and clear ACCDBL"] +pub mod tasks_rdclrdbl; +#[doc = "EVENTS_SAMPLERDY (rw) register accessor: an alias for `Reg`"] +pub type EVENTS_SAMPLERDY = crate::Reg; +#[doc = "Event being generated for every new sample value written to the SAMPLE register"] +pub mod events_samplerdy; +#[doc = "EVENTS_REPORTRDY (rw) register accessor: an alias for `Reg`"] +pub type EVENTS_REPORTRDY = crate::Reg; +#[doc = "Non-null report ready"] +pub mod events_reportrdy; +#[doc = "EVENTS_ACCOF (rw) register accessor: an alias for `Reg`"] +pub type EVENTS_ACCOF = crate::Reg; +#[doc = "ACC or ACCDBL register overflow"] +pub mod events_accof; +#[doc = "EVENTS_DBLRDY (rw) register accessor: an alias for `Reg`"] +pub type EVENTS_DBLRDY = crate::Reg; +#[doc = "Double displacement(s) detected"] +pub mod events_dblrdy; +#[doc = "EVENTS_STOPPED (rw) register accessor: an alias for `Reg`"] +pub type EVENTS_STOPPED = crate::Reg; +#[doc = "QDEC has been stopped"] +pub mod events_stopped; +#[doc = "SHORTS (rw) register accessor: an alias for `Reg`"] +pub type SHORTS = crate::Reg; +#[doc = "Shortcuts between local events and tasks"] +pub mod shorts; +#[doc = "INTENSET (rw) register accessor: an alias for `Reg`"] +pub type INTENSET = crate::Reg; +#[doc = "Enable interrupt"] +pub mod intenset; +#[doc = "INTENCLR (rw) register accessor: an alias for `Reg`"] +pub type INTENCLR = crate::Reg; +#[doc = "Disable interrupt"] +pub mod intenclr; +#[doc = "ENABLE (rw) register accessor: an alias for `Reg`"] +pub type ENABLE = crate::Reg; +#[doc = "Enable the quadrature decoder"] +pub mod enable; +#[doc = "LEDPOL (rw) register accessor: an alias for `Reg`"] +pub type LEDPOL = crate::Reg; +#[doc = "LED output pin polarity"] +pub mod ledpol; +#[doc = "SAMPLEPER (rw) register accessor: an alias for `Reg`"] +pub type SAMPLEPER = crate::Reg; +#[doc = "Sample period"] +pub mod sampleper; +#[doc = "SAMPLE (r) register accessor: an alias for `Reg`"] +pub type SAMPLE = crate::Reg; +#[doc = "Motion sample value"] +pub mod sample; +#[doc = "REPORTPER (rw) register accessor: an alias for `Reg`"] +pub type REPORTPER = crate::Reg; +#[doc = "Number of samples to be taken before REPORTRDY and DBLRDY events can be generated"] +pub mod reportper; +#[doc = "ACC (r) register accessor: an alias for `Reg`"] +pub type ACC = crate::Reg; +#[doc = "Register accumulating the valid transitions"] +pub mod acc; +#[doc = "ACCREAD (r) register accessor: an alias for `Reg`"] +pub type ACCREAD = crate::Reg; +#[doc = "Snapshot of the ACC register, updated by the READCLRACC or RDCLRACC task"] +pub mod accread; +#[doc = "Unspecified"] +pub use self::psel::PSEL; +#[doc = r"Cluster"] +#[doc = "Unspecified"] +pub mod psel; +#[doc = "DBFEN (rw) register accessor: an alias for `Reg`"] +pub type DBFEN = crate::Reg; +#[doc = "Enable input debounce filters"] +pub mod dbfen; +#[doc = "LEDPRE (rw) register accessor: an alias for `Reg`"] +pub type LEDPRE = crate::Reg; +#[doc = "Time period the LED is switched ON prior to sampling"] +pub mod ledpre; +#[doc = "ACCDBL (r) register accessor: an alias for `Reg`"] +pub type ACCDBL = crate::Reg; +#[doc = "Register accumulating the number of detected double transitions"] +pub mod accdbl; +#[doc = "ACCDBLREAD (r) register accessor: an alias for `Reg`"] +pub type ACCDBLREAD = crate::Reg; +#[doc = "Snapshot of the ACCDBL, updated by the READCLRACC or RDCLRDBL task"] +pub mod accdblread; diff --git a/down-the-stack/dk_pac/src/qdec/acc.rs b/down-the-stack/dk_pac/src/qdec/acc.rs new file mode 100644 index 0000000..680db42 --- /dev/null +++ b/down-the-stack/dk_pac/src/qdec/acc.rs @@ -0,0 +1,37 @@ +#[doc = "Register `ACC` 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 = "Field `ACC` reader - Register accumulating all valid samples (not double transition) read from the SAMPLE register"] +pub type ACC_R = crate::FieldReader; +impl R { + #[doc = "Bits 0:31 - Register accumulating all valid samples (not double transition) read from the SAMPLE register"] + #[inline(always)] + pub fn acc(&self) -> ACC_R { + ACC_R::new(self.bits) + } +} +#[doc = "Register accumulating the valid transitions\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 [acc](index.html) module"] +pub struct ACC_SPEC; +impl crate::RegisterSpec for ACC_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [acc::R](R) reader structure"] +impl crate::Readable for ACC_SPEC { + type Reader = R; +} +#[doc = "`reset()` method sets ACC to value 0"] +impl crate::Resettable for ACC_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/qdec/accdbl.rs b/down-the-stack/dk_pac/src/qdec/accdbl.rs new file mode 100644 index 0000000..c3a2cc5 --- /dev/null +++ b/down-the-stack/dk_pac/src/qdec/accdbl.rs @@ -0,0 +1,37 @@ +#[doc = "Register `ACCDBL` 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 = "Field `ACCDBL` reader - Register accumulating the number of detected double or illegal transitions. ( SAMPLE = 2 )."] +pub type ACCDBL_R = crate::FieldReader; +impl R { + #[doc = "Bits 0:3 - Register accumulating the number of detected double or illegal transitions. ( SAMPLE = 2 )."] + #[inline(always)] + pub fn accdbl(&self) -> ACCDBL_R { + ACCDBL_R::new((self.bits & 0x0f) as u8) + } +} +#[doc = "Register accumulating the number of detected double transitions\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 [accdbl](index.html) module"] +pub struct ACCDBL_SPEC; +impl crate::RegisterSpec for ACCDBL_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [accdbl::R](R) reader structure"] +impl crate::Readable for ACCDBL_SPEC { + type Reader = R; +} +#[doc = "`reset()` method sets ACCDBL to value 0"] +impl crate::Resettable for ACCDBL_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/qdec/accdblread.rs b/down-the-stack/dk_pac/src/qdec/accdblread.rs new file mode 100644 index 0000000..9d6e17f --- /dev/null +++ b/down-the-stack/dk_pac/src/qdec/accdblread.rs @@ -0,0 +1,37 @@ +#[doc = "Register `ACCDBLREAD` 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 = "Field `ACCDBLREAD` reader - Snapshot of the ACCDBL register. This field is updated when the READCLRACC or RDCLRDBL task is triggered."] +pub type ACCDBLREAD_R = crate::FieldReader; +impl R { + #[doc = "Bits 0:3 - Snapshot of the ACCDBL register. This field is updated when the READCLRACC or RDCLRDBL task is triggered."] + #[inline(always)] + pub fn accdblread(&self) -> ACCDBLREAD_R { + ACCDBLREAD_R::new((self.bits & 0x0f) as u8) + } +} +#[doc = "Snapshot of the ACCDBL, updated by the READCLRACC or RDCLRDBL task\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 [accdblread](index.html) module"] +pub struct ACCDBLREAD_SPEC; +impl crate::RegisterSpec for ACCDBLREAD_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [accdblread::R](R) reader structure"] +impl crate::Readable for ACCDBLREAD_SPEC { + type Reader = R; +} +#[doc = "`reset()` method sets ACCDBLREAD to value 0"] +impl crate::Resettable for ACCDBLREAD_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/qdec/accread.rs b/down-the-stack/dk_pac/src/qdec/accread.rs new file mode 100644 index 0000000..4722c14 --- /dev/null +++ b/down-the-stack/dk_pac/src/qdec/accread.rs @@ -0,0 +1,37 @@ +#[doc = "Register `ACCREAD` 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 = "Field `ACCREAD` reader - Snapshot of the ACC register."] +pub type ACCREAD_R = crate::FieldReader; +impl R { + #[doc = "Bits 0:31 - Snapshot of the ACC register."] + #[inline(always)] + pub fn accread(&self) -> ACCREAD_R { + ACCREAD_R::new(self.bits) + } +} +#[doc = "Snapshot of the ACC register, updated by the READCLRACC or RDCLRACC task\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 [accread](index.html) module"] +pub struct ACCREAD_SPEC; +impl crate::RegisterSpec for ACCREAD_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [accread::R](R) reader structure"] +impl crate::Readable for ACCREAD_SPEC { + type Reader = R; +} +#[doc = "`reset()` method sets ACCREAD to value 0"] +impl crate::Resettable for ACCREAD_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/qdec/dbfen.rs b/down-the-stack/dk_pac/src/qdec/dbfen.rs new file mode 100644 index 0000000..36d577a --- /dev/null +++ b/down-the-stack/dk_pac/src/qdec/dbfen.rs @@ -0,0 +1,126 @@ +#[doc = "Register `DBFEN` 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 `DBFEN` 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 `DBFEN` reader - Enable input debounce filters"] +pub type DBFEN_R = crate::BitReader; +#[doc = "Enable input debounce filters\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum DBFEN_A { + #[doc = "0: Debounce input filters disabled"] + DISABLED = 0, + #[doc = "1: Debounce input filters enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: DBFEN_A) -> Self { + variant as u8 != 0 + } +} +impl DBFEN_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> DBFEN_A { + match self.bits { + false => DBFEN_A::DISABLED, + true => DBFEN_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == DBFEN_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == DBFEN_A::ENABLED + } +} +#[doc = "Field `DBFEN` writer - Enable input debounce filters"] +pub type DBFEN_W<'a, const O: u8> = crate::BitWriter<'a, u32, DBFEN_SPEC, DBFEN_A, O>; +impl<'a, const O: u8> DBFEN_W<'a, O> { + #[doc = "Debounce input filters disabled"] + #[inline(always)] + pub fn disabled(self) -> &'a mut W { + self.variant(DBFEN_A::DISABLED) + } + #[doc = "Debounce input filters enabled"] + #[inline(always)] + pub fn enabled(self) -> &'a mut W { + self.variant(DBFEN_A::ENABLED) + } +} +impl R { + #[doc = "Bit 0 - Enable input debounce filters"] + #[inline(always)] + pub fn dbfen(&self) -> DBFEN_R { + DBFEN_R::new((self.bits & 1) != 0) + } +} +impl W { + #[doc = "Bit 0 - Enable input debounce filters"] + #[inline(always)] + #[must_use] + pub fn dbfen(&mut self) -> DBFEN_W<0> { + DBFEN_W::new(self) + } + #[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 = "Enable input debounce filters\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 [dbfen](index.html) module"] +pub struct DBFEN_SPEC; +impl crate::RegisterSpec for DBFEN_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [dbfen::R](R) reader structure"] +impl crate::Readable for DBFEN_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [dbfen::W](W) writer structure"] +impl crate::Writable for DBFEN_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets DBFEN to value 0"] +impl crate::Resettable for DBFEN_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/qdec/enable.rs b/down-the-stack/dk_pac/src/qdec/enable.rs new file mode 100644 index 0000000..7862405 --- /dev/null +++ b/down-the-stack/dk_pac/src/qdec/enable.rs @@ -0,0 +1,126 @@ +#[doc = "Register `ENABLE` 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 `ENABLE` 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 `ENABLE` reader - Enable or disable the quadrature decoder"] +pub type ENABLE_R = crate::BitReader; +#[doc = "Enable or disable the quadrature decoder\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum ENABLE_A { + #[doc = "0: Disable"] + DISABLED = 0, + #[doc = "1: Enable"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: ENABLE_A) -> Self { + variant as u8 != 0 + } +} +impl ENABLE_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> ENABLE_A { + match self.bits { + false => ENABLE_A::DISABLED, + true => ENABLE_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == ENABLE_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == ENABLE_A::ENABLED + } +} +#[doc = "Field `ENABLE` writer - Enable or disable the quadrature decoder"] +pub type ENABLE_W<'a, const O: u8> = crate::BitWriter<'a, u32, ENABLE_SPEC, ENABLE_A, O>; +impl<'a, const O: u8> ENABLE_W<'a, O> { + #[doc = "Disable"] + #[inline(always)] + pub fn disabled(self) -> &'a mut W { + self.variant(ENABLE_A::DISABLED) + } + #[doc = "Enable"] + #[inline(always)] + pub fn enabled(self) -> &'a mut W { + self.variant(ENABLE_A::ENABLED) + } +} +impl R { + #[doc = "Bit 0 - Enable or disable the quadrature decoder"] + #[inline(always)] + pub fn enable(&self) -> ENABLE_R { + ENABLE_R::new((self.bits & 1) != 0) + } +} +impl W { + #[doc = "Bit 0 - Enable or disable the quadrature decoder"] + #[inline(always)] + #[must_use] + pub fn enable(&mut self) -> ENABLE_W<0> { + 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 + } +} +#[doc = "Enable the quadrature decoder\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 [enable](index.html) module"] +pub struct ENABLE_SPEC; +impl crate::RegisterSpec for ENABLE_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [enable::R](R) reader structure"] +impl crate::Readable for ENABLE_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [enable::W](W) writer structure"] +impl crate::Writable for ENABLE_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets ENABLE to value 0"] +impl crate::Resettable for ENABLE_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/qdec/events_accof.rs b/down-the-stack/dk_pac/src/qdec/events_accof.rs new file mode 100644 index 0000000..580e1fe --- /dev/null +++ b/down-the-stack/dk_pac/src/qdec/events_accof.rs @@ -0,0 +1,127 @@ +#[doc = "Register `EVENTS_ACCOF` 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 `EVENTS_ACCOF` 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 `EVENTS_ACCOF` reader - ACC or ACCDBL register overflow"] +pub type EVENTS_ACCOF_R = crate::BitReader; +#[doc = "ACC or ACCDBL register overflow\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum EVENTS_ACCOF_A { + #[doc = "0: Event not generated"] + NOT_GENERATED = 0, + #[doc = "1: Event generated"] + GENERATED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: EVENTS_ACCOF_A) -> Self { + variant as u8 != 0 + } +} +impl EVENTS_ACCOF_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> EVENTS_ACCOF_A { + match self.bits { + false => EVENTS_ACCOF_A::NOT_GENERATED, + true => EVENTS_ACCOF_A::GENERATED, + } + } + #[doc = "Checks if the value of the field is `NOT_GENERATED`"] + #[inline(always)] + pub fn is_not_generated(&self) -> bool { + *self == EVENTS_ACCOF_A::NOT_GENERATED + } + #[doc = "Checks if the value of the field is `GENERATED`"] + #[inline(always)] + pub fn is_generated(&self) -> bool { + *self == EVENTS_ACCOF_A::GENERATED + } +} +#[doc = "Field `EVENTS_ACCOF` writer - ACC or ACCDBL register overflow"] +pub type EVENTS_ACCOF_W<'a, const O: u8> = + crate::BitWriter<'a, u32, EVENTS_ACCOF_SPEC, EVENTS_ACCOF_A, O>; +impl<'a, const O: u8> EVENTS_ACCOF_W<'a, O> { + #[doc = "Event not generated"] + #[inline(always)] + pub fn not_generated(self) -> &'a mut W { + self.variant(EVENTS_ACCOF_A::NOT_GENERATED) + } + #[doc = "Event generated"] + #[inline(always)] + pub fn generated(self) -> &'a mut W { + self.variant(EVENTS_ACCOF_A::GENERATED) + } +} +impl R { + #[doc = "Bit 0 - ACC or ACCDBL register overflow"] + #[inline(always)] + pub fn events_accof(&self) -> EVENTS_ACCOF_R { + EVENTS_ACCOF_R::new((self.bits & 1) != 0) + } +} +impl W { + #[doc = "Bit 0 - ACC or ACCDBL register overflow"] + #[inline(always)] + #[must_use] + pub fn events_accof(&mut self) -> EVENTS_ACCOF_W<0> { + EVENTS_ACCOF_W::new(self) + } + #[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 = "ACC or ACCDBL register overflow\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 [events_accof](index.html) module"] +pub struct EVENTS_ACCOF_SPEC; +impl crate::RegisterSpec for EVENTS_ACCOF_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [events_accof::R](R) reader structure"] +impl crate::Readable for EVENTS_ACCOF_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [events_accof::W](W) writer structure"] +impl crate::Writable for EVENTS_ACCOF_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets EVENTS_ACCOF to value 0"] +impl crate::Resettable for EVENTS_ACCOF_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/qdec/events_dblrdy.rs b/down-the-stack/dk_pac/src/qdec/events_dblrdy.rs new file mode 100644 index 0000000..3bbacfc --- /dev/null +++ b/down-the-stack/dk_pac/src/qdec/events_dblrdy.rs @@ -0,0 +1,127 @@ +#[doc = "Register `EVENTS_DBLRDY` 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 `EVENTS_DBLRDY` 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 `EVENTS_DBLRDY` reader - Double displacement(s) detected"] +pub type EVENTS_DBLRDY_R = crate::BitReader; +#[doc = "Double displacement(s) detected\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum EVENTS_DBLRDY_A { + #[doc = "0: Event not generated"] + NOT_GENERATED = 0, + #[doc = "1: Event generated"] + GENERATED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: EVENTS_DBLRDY_A) -> Self { + variant as u8 != 0 + } +} +impl EVENTS_DBLRDY_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> EVENTS_DBLRDY_A { + match self.bits { + false => EVENTS_DBLRDY_A::NOT_GENERATED, + true => EVENTS_DBLRDY_A::GENERATED, + } + } + #[doc = "Checks if the value of the field is `NOT_GENERATED`"] + #[inline(always)] + pub fn is_not_generated(&self) -> bool { + *self == EVENTS_DBLRDY_A::NOT_GENERATED + } + #[doc = "Checks if the value of the field is `GENERATED`"] + #[inline(always)] + pub fn is_generated(&self) -> bool { + *self == EVENTS_DBLRDY_A::GENERATED + } +} +#[doc = "Field `EVENTS_DBLRDY` writer - Double displacement(s) detected"] +pub type EVENTS_DBLRDY_W<'a, const O: u8> = + crate::BitWriter<'a, u32, EVENTS_DBLRDY_SPEC, EVENTS_DBLRDY_A, O>; +impl<'a, const O: u8> EVENTS_DBLRDY_W<'a, O> { + #[doc = "Event not generated"] + #[inline(always)] + pub fn not_generated(self) -> &'a mut W { + self.variant(EVENTS_DBLRDY_A::NOT_GENERATED) + } + #[doc = "Event generated"] + #[inline(always)] + pub fn generated(self) -> &'a mut W { + self.variant(EVENTS_DBLRDY_A::GENERATED) + } +} +impl R { + #[doc = "Bit 0 - Double displacement(s) detected"] + #[inline(always)] + pub fn events_dblrdy(&self) -> EVENTS_DBLRDY_R { + EVENTS_DBLRDY_R::new((self.bits & 1) != 0) + } +} +impl W { + #[doc = "Bit 0 - Double displacement(s) detected"] + #[inline(always)] + #[must_use] + pub fn events_dblrdy(&mut self) -> EVENTS_DBLRDY_W<0> { + EVENTS_DBLRDY_W::new(self) + } + #[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 = "Double displacement(s) detected\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 [events_dblrdy](index.html) module"] +pub struct EVENTS_DBLRDY_SPEC; +impl crate::RegisterSpec for EVENTS_DBLRDY_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [events_dblrdy::R](R) reader structure"] +impl crate::Readable for EVENTS_DBLRDY_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [events_dblrdy::W](W) writer structure"] +impl crate::Writable for EVENTS_DBLRDY_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets EVENTS_DBLRDY to value 0"] +impl crate::Resettable for EVENTS_DBLRDY_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/qdec/events_reportrdy.rs b/down-the-stack/dk_pac/src/qdec/events_reportrdy.rs new file mode 100644 index 0000000..fd8ef54 --- /dev/null +++ b/down-the-stack/dk_pac/src/qdec/events_reportrdy.rs @@ -0,0 +1,127 @@ +#[doc = "Register `EVENTS_REPORTRDY` 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 `EVENTS_REPORTRDY` 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 `EVENTS_REPORTRDY` reader - Non-null report ready"] +pub type EVENTS_REPORTRDY_R = crate::BitReader; +#[doc = "Non-null report ready\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum EVENTS_REPORTRDY_A { + #[doc = "0: Event not generated"] + NOT_GENERATED = 0, + #[doc = "1: Event generated"] + GENERATED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: EVENTS_REPORTRDY_A) -> Self { + variant as u8 != 0 + } +} +impl EVENTS_REPORTRDY_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> EVENTS_REPORTRDY_A { + match self.bits { + false => EVENTS_REPORTRDY_A::NOT_GENERATED, + true => EVENTS_REPORTRDY_A::GENERATED, + } + } + #[doc = "Checks if the value of the field is `NOT_GENERATED`"] + #[inline(always)] + pub fn is_not_generated(&self) -> bool { + *self == EVENTS_REPORTRDY_A::NOT_GENERATED + } + #[doc = "Checks if the value of the field is `GENERATED`"] + #[inline(always)] + pub fn is_generated(&self) -> bool { + *self == EVENTS_REPORTRDY_A::GENERATED + } +} +#[doc = "Field `EVENTS_REPORTRDY` writer - Non-null report ready"] +pub type EVENTS_REPORTRDY_W<'a, const O: u8> = + crate::BitWriter<'a, u32, EVENTS_REPORTRDY_SPEC, EVENTS_REPORTRDY_A, O>; +impl<'a, const O: u8> EVENTS_REPORTRDY_W<'a, O> { + #[doc = "Event not generated"] + #[inline(always)] + pub fn not_generated(self) -> &'a mut W { + self.variant(EVENTS_REPORTRDY_A::NOT_GENERATED) + } + #[doc = "Event generated"] + #[inline(always)] + pub fn generated(self) -> &'a mut W { + self.variant(EVENTS_REPORTRDY_A::GENERATED) + } +} +impl R { + #[doc = "Bit 0 - Non-null report ready"] + #[inline(always)] + pub fn events_reportrdy(&self) -> EVENTS_REPORTRDY_R { + EVENTS_REPORTRDY_R::new((self.bits & 1) != 0) + } +} +impl W { + #[doc = "Bit 0 - Non-null report ready"] + #[inline(always)] + #[must_use] + pub fn events_reportrdy(&mut self) -> EVENTS_REPORTRDY_W<0> { + EVENTS_REPORTRDY_W::new(self) + } + #[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 = "Non-null report ready\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 [events_reportrdy](index.html) module"] +pub struct EVENTS_REPORTRDY_SPEC; +impl crate::RegisterSpec for EVENTS_REPORTRDY_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [events_reportrdy::R](R) reader structure"] +impl crate::Readable for EVENTS_REPORTRDY_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [events_reportrdy::W](W) writer structure"] +impl crate::Writable for EVENTS_REPORTRDY_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets EVENTS_REPORTRDY to value 0"] +impl crate::Resettable for EVENTS_REPORTRDY_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/qdec/events_samplerdy.rs b/down-the-stack/dk_pac/src/qdec/events_samplerdy.rs new file mode 100644 index 0000000..4c5fe71 --- /dev/null +++ b/down-the-stack/dk_pac/src/qdec/events_samplerdy.rs @@ -0,0 +1,127 @@ +#[doc = "Register `EVENTS_SAMPLERDY` 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 `EVENTS_SAMPLERDY` 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 `EVENTS_SAMPLERDY` reader - Event being generated for every new sample value written to the SAMPLE register"] +pub type EVENTS_SAMPLERDY_R = crate::BitReader; +#[doc = "Event being generated for every new sample value written to the SAMPLE register\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum EVENTS_SAMPLERDY_A { + #[doc = "0: Event not generated"] + NOT_GENERATED = 0, + #[doc = "1: Event generated"] + GENERATED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: EVENTS_SAMPLERDY_A) -> Self { + variant as u8 != 0 + } +} +impl EVENTS_SAMPLERDY_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> EVENTS_SAMPLERDY_A { + match self.bits { + false => EVENTS_SAMPLERDY_A::NOT_GENERATED, + true => EVENTS_SAMPLERDY_A::GENERATED, + } + } + #[doc = "Checks if the value of the field is `NOT_GENERATED`"] + #[inline(always)] + pub fn is_not_generated(&self) -> bool { + *self == EVENTS_SAMPLERDY_A::NOT_GENERATED + } + #[doc = "Checks if the value of the field is `GENERATED`"] + #[inline(always)] + pub fn is_generated(&self) -> bool { + *self == EVENTS_SAMPLERDY_A::GENERATED + } +} +#[doc = "Field `EVENTS_SAMPLERDY` writer - Event being generated for every new sample value written to the SAMPLE register"] +pub type EVENTS_SAMPLERDY_W<'a, const O: u8> = + crate::BitWriter<'a, u32, EVENTS_SAMPLERDY_SPEC, EVENTS_SAMPLERDY_A, O>; +impl<'a, const O: u8> EVENTS_SAMPLERDY_W<'a, O> { + #[doc = "Event not generated"] + #[inline(always)] + pub fn not_generated(self) -> &'a mut W { + self.variant(EVENTS_SAMPLERDY_A::NOT_GENERATED) + } + #[doc = "Event generated"] + #[inline(always)] + pub fn generated(self) -> &'a mut W { + self.variant(EVENTS_SAMPLERDY_A::GENERATED) + } +} +impl R { + #[doc = "Bit 0 - Event being generated for every new sample value written to the SAMPLE register"] + #[inline(always)] + pub fn events_samplerdy(&self) -> EVENTS_SAMPLERDY_R { + EVENTS_SAMPLERDY_R::new((self.bits & 1) != 0) + } +} +impl W { + #[doc = "Bit 0 - Event being generated for every new sample value written to the SAMPLE register"] + #[inline(always)] + #[must_use] + pub fn events_samplerdy(&mut self) -> EVENTS_SAMPLERDY_W<0> { + EVENTS_SAMPLERDY_W::new(self) + } + #[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 = "Event being generated for every new sample value written to the SAMPLE register\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 [events_samplerdy](index.html) module"] +pub struct EVENTS_SAMPLERDY_SPEC; +impl crate::RegisterSpec for EVENTS_SAMPLERDY_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [events_samplerdy::R](R) reader structure"] +impl crate::Readable for EVENTS_SAMPLERDY_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [events_samplerdy::W](W) writer structure"] +impl crate::Writable for EVENTS_SAMPLERDY_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets EVENTS_SAMPLERDY to value 0"] +impl crate::Resettable for EVENTS_SAMPLERDY_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/qdec/events_stopped.rs b/down-the-stack/dk_pac/src/qdec/events_stopped.rs new file mode 100644 index 0000000..85c4108 --- /dev/null +++ b/down-the-stack/dk_pac/src/qdec/events_stopped.rs @@ -0,0 +1,127 @@ +#[doc = "Register `EVENTS_STOPPED` 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 `EVENTS_STOPPED` 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 `EVENTS_STOPPED` reader - QDEC has been stopped"] +pub type EVENTS_STOPPED_R = crate::BitReader; +#[doc = "QDEC has been stopped\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum EVENTS_STOPPED_A { + #[doc = "0: Event not generated"] + NOT_GENERATED = 0, + #[doc = "1: Event generated"] + GENERATED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: EVENTS_STOPPED_A) -> Self { + variant as u8 != 0 + } +} +impl EVENTS_STOPPED_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> EVENTS_STOPPED_A { + match self.bits { + false => EVENTS_STOPPED_A::NOT_GENERATED, + true => EVENTS_STOPPED_A::GENERATED, + } + } + #[doc = "Checks if the value of the field is `NOT_GENERATED`"] + #[inline(always)] + pub fn is_not_generated(&self) -> bool { + *self == EVENTS_STOPPED_A::NOT_GENERATED + } + #[doc = "Checks if the value of the field is `GENERATED`"] + #[inline(always)] + pub fn is_generated(&self) -> bool { + *self == EVENTS_STOPPED_A::GENERATED + } +} +#[doc = "Field `EVENTS_STOPPED` writer - QDEC has been stopped"] +pub type EVENTS_STOPPED_W<'a, const O: u8> = + crate::BitWriter<'a, u32, EVENTS_STOPPED_SPEC, EVENTS_STOPPED_A, O>; +impl<'a, const O: u8> EVENTS_STOPPED_W<'a, O> { + #[doc = "Event not generated"] + #[inline(always)] + pub fn not_generated(self) -> &'a mut W { + self.variant(EVENTS_STOPPED_A::NOT_GENERATED) + } + #[doc = "Event generated"] + #[inline(always)] + pub fn generated(self) -> &'a mut W { + self.variant(EVENTS_STOPPED_A::GENERATED) + } +} +impl R { + #[doc = "Bit 0 - QDEC has been stopped"] + #[inline(always)] + pub fn events_stopped(&self) -> EVENTS_STOPPED_R { + EVENTS_STOPPED_R::new((self.bits & 1) != 0) + } +} +impl W { + #[doc = "Bit 0 - QDEC has been stopped"] + #[inline(always)] + #[must_use] + pub fn events_stopped(&mut self) -> EVENTS_STOPPED_W<0> { + EVENTS_STOPPED_W::new(self) + } + #[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 = "QDEC has been stopped\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 [events_stopped](index.html) module"] +pub struct EVENTS_STOPPED_SPEC; +impl crate::RegisterSpec for EVENTS_STOPPED_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [events_stopped::R](R) reader structure"] +impl crate::Readable for EVENTS_STOPPED_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [events_stopped::W](W) writer structure"] +impl crate::Writable for EVENTS_STOPPED_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets EVENTS_STOPPED to value 0"] +impl crate::Resettable for EVENTS_STOPPED_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/qdec/intenclr.rs b/down-the-stack/dk_pac/src/qdec/intenclr.rs new file mode 100644 index 0000000..aba2150 --- /dev/null +++ b/down-the-stack/dk_pac/src/qdec/intenclr.rs @@ -0,0 +1,405 @@ +#[doc = "Register `INTENCLR` 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 `INTENCLR` 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 `SAMPLERDY` reader - Write '1' to disable interrupt for event SAMPLERDY"] +pub type SAMPLERDY_R = crate::BitReader; +#[doc = "Write '1' to disable interrupt for event SAMPLERDY\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum SAMPLERDY_A { + #[doc = "0: Read: Disabled"] + DISABLED = 0, + #[doc = "1: Read: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: SAMPLERDY_A) -> Self { + variant as u8 != 0 + } +} +impl SAMPLERDY_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> SAMPLERDY_A { + match self.bits { + false => SAMPLERDY_A::DISABLED, + true => SAMPLERDY_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == SAMPLERDY_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == SAMPLERDY_A::ENABLED + } +} +#[doc = "Write '1' to disable interrupt for event SAMPLERDY\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum SAMPLERDY_AW { + #[doc = "1: Disable"] + CLEAR = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: SAMPLERDY_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `SAMPLERDY` writer - Write '1' to disable interrupt for event SAMPLERDY"] +pub type SAMPLERDY_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENCLR_SPEC, SAMPLERDY_AW, O>; +impl<'a, const O: u8> SAMPLERDY_W<'a, O> { + #[doc = "Disable"] + #[inline(always)] + pub fn clear(self) -> &'a mut W { + self.variant(SAMPLERDY_AW::CLEAR) + } +} +#[doc = "Field `REPORTRDY` reader - Write '1' to disable interrupt for event REPORTRDY"] +pub type REPORTRDY_R = crate::BitReader; +#[doc = "Write '1' to disable interrupt for event REPORTRDY\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum REPORTRDY_A { + #[doc = "0: Read: Disabled"] + DISABLED = 0, + #[doc = "1: Read: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: REPORTRDY_A) -> Self { + variant as u8 != 0 + } +} +impl REPORTRDY_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> REPORTRDY_A { + match self.bits { + false => REPORTRDY_A::DISABLED, + true => REPORTRDY_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == REPORTRDY_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == REPORTRDY_A::ENABLED + } +} +#[doc = "Write '1' to disable interrupt for event REPORTRDY\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum REPORTRDY_AW { + #[doc = "1: Disable"] + CLEAR = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: REPORTRDY_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `REPORTRDY` writer - Write '1' to disable interrupt for event REPORTRDY"] +pub type REPORTRDY_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENCLR_SPEC, REPORTRDY_AW, O>; +impl<'a, const O: u8> REPORTRDY_W<'a, O> { + #[doc = "Disable"] + #[inline(always)] + pub fn clear(self) -> &'a mut W { + self.variant(REPORTRDY_AW::CLEAR) + } +} +#[doc = "Field `ACCOF` reader - Write '1' to disable interrupt for event ACCOF"] +pub type ACCOF_R = crate::BitReader; +#[doc = "Write '1' to disable interrupt for event ACCOF\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum ACCOF_A { + #[doc = "0: Read: Disabled"] + DISABLED = 0, + #[doc = "1: Read: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: ACCOF_A) -> Self { + variant as u8 != 0 + } +} +impl ACCOF_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> ACCOF_A { + match self.bits { + false => ACCOF_A::DISABLED, + true => ACCOF_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == ACCOF_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == ACCOF_A::ENABLED + } +} +#[doc = "Write '1' to disable interrupt for event ACCOF\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum ACCOF_AW { + #[doc = "1: Disable"] + CLEAR = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: ACCOF_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `ACCOF` writer - Write '1' to disable interrupt for event ACCOF"] +pub type ACCOF_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENCLR_SPEC, ACCOF_AW, O>; +impl<'a, const O: u8> ACCOF_W<'a, O> { + #[doc = "Disable"] + #[inline(always)] + pub fn clear(self) -> &'a mut W { + self.variant(ACCOF_AW::CLEAR) + } +} +#[doc = "Field `DBLRDY` reader - Write '1' to disable interrupt for event DBLRDY"] +pub type DBLRDY_R = crate::BitReader; +#[doc = "Write '1' to disable interrupt for event DBLRDY\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum DBLRDY_A { + #[doc = "0: Read: Disabled"] + DISABLED = 0, + #[doc = "1: Read: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: DBLRDY_A) -> Self { + variant as u8 != 0 + } +} +impl DBLRDY_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> DBLRDY_A { + match self.bits { + false => DBLRDY_A::DISABLED, + true => DBLRDY_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == DBLRDY_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == DBLRDY_A::ENABLED + } +} +#[doc = "Write '1' to disable interrupt for event DBLRDY\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum DBLRDY_AW { + #[doc = "1: Disable"] + CLEAR = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: DBLRDY_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `DBLRDY` writer - Write '1' to disable interrupt for event DBLRDY"] +pub type DBLRDY_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENCLR_SPEC, DBLRDY_AW, O>; +impl<'a, const O: u8> DBLRDY_W<'a, O> { + #[doc = "Disable"] + #[inline(always)] + pub fn clear(self) -> &'a mut W { + self.variant(DBLRDY_AW::CLEAR) + } +} +#[doc = "Field `STOPPED` reader - Write '1' to disable interrupt for event STOPPED"] +pub type STOPPED_R = crate::BitReader; +#[doc = "Write '1' to disable interrupt for event STOPPED\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum STOPPED_A { + #[doc = "0: Read: Disabled"] + DISABLED = 0, + #[doc = "1: Read: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: STOPPED_A) -> Self { + variant as u8 != 0 + } +} +impl STOPPED_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> STOPPED_A { + match self.bits { + false => STOPPED_A::DISABLED, + true => STOPPED_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == STOPPED_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == STOPPED_A::ENABLED + } +} +#[doc = "Write '1' to disable interrupt for event STOPPED\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum STOPPED_AW { + #[doc = "1: Disable"] + CLEAR = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: STOPPED_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `STOPPED` writer - Write '1' to disable interrupt for event STOPPED"] +pub type STOPPED_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENCLR_SPEC, STOPPED_AW, O>; +impl<'a, const O: u8> STOPPED_W<'a, O> { + #[doc = "Disable"] + #[inline(always)] + pub fn clear(self) -> &'a mut W { + self.variant(STOPPED_AW::CLEAR) + } +} +impl R { + #[doc = "Bit 0 - Write '1' to disable interrupt for event SAMPLERDY"] + #[inline(always)] + pub fn samplerdy(&self) -> SAMPLERDY_R { + SAMPLERDY_R::new((self.bits & 1) != 0) + } + #[doc = "Bit 1 - Write '1' to disable interrupt for event REPORTRDY"] + #[inline(always)] + pub fn reportrdy(&self) -> REPORTRDY_R { + REPORTRDY_R::new(((self.bits >> 1) & 1) != 0) + } + #[doc = "Bit 2 - Write '1' to disable interrupt for event ACCOF"] + #[inline(always)] + pub fn accof(&self) -> ACCOF_R { + ACCOF_R::new(((self.bits >> 2) & 1) != 0) + } + #[doc = "Bit 3 - Write '1' to disable interrupt for event DBLRDY"] + #[inline(always)] + pub fn dblrdy(&self) -> DBLRDY_R { + DBLRDY_R::new(((self.bits >> 3) & 1) != 0) + } + #[doc = "Bit 4 - Write '1' to disable interrupt for event STOPPED"] + #[inline(always)] + pub fn stopped(&self) -> STOPPED_R { + STOPPED_R::new(((self.bits >> 4) & 1) != 0) + } +} +impl W { + #[doc = "Bit 0 - Write '1' to disable interrupt for event SAMPLERDY"] + #[inline(always)] + #[must_use] + pub fn samplerdy(&mut self) -> SAMPLERDY_W<0> { + SAMPLERDY_W::new(self) + } + #[doc = "Bit 1 - Write '1' to disable interrupt for event REPORTRDY"] + #[inline(always)] + #[must_use] + pub fn reportrdy(&mut self) -> REPORTRDY_W<1> { + REPORTRDY_W::new(self) + } + #[doc = "Bit 2 - Write '1' to disable interrupt for event ACCOF"] + #[inline(always)] + #[must_use] + pub fn accof(&mut self) -> ACCOF_W<2> { + ACCOF_W::new(self) + } + #[doc = "Bit 3 - Write '1' to disable interrupt for event DBLRDY"] + #[inline(always)] + #[must_use] + pub fn dblrdy(&mut self) -> DBLRDY_W<3> { + DBLRDY_W::new(self) + } + #[doc = "Bit 4 - Write '1' to disable interrupt for event STOPPED"] + #[inline(always)] + #[must_use] + pub fn stopped(&mut self) -> STOPPED_W<4> { + STOPPED_W::new(self) + } + #[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 = "Disable interrupt\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 [intenclr](index.html) module"] +pub struct INTENCLR_SPEC; +impl crate::RegisterSpec for INTENCLR_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [intenclr::R](R) reader structure"] +impl crate::Readable for INTENCLR_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [intenclr::W](W) writer structure"] +impl crate::Writable for INTENCLR_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets INTENCLR to value 0"] +impl crate::Resettable for INTENCLR_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/qdec/intenset.rs b/down-the-stack/dk_pac/src/qdec/intenset.rs new file mode 100644 index 0000000..2231d6c --- /dev/null +++ b/down-the-stack/dk_pac/src/qdec/intenset.rs @@ -0,0 +1,405 @@ +#[doc = "Register `INTENSET` 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 `INTENSET` 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 `SAMPLERDY` reader - Write '1' to enable interrupt for event SAMPLERDY"] +pub type SAMPLERDY_R = crate::BitReader; +#[doc = "Write '1' to enable interrupt for event SAMPLERDY\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum SAMPLERDY_A { + #[doc = "0: Read: Disabled"] + DISABLED = 0, + #[doc = "1: Read: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: SAMPLERDY_A) -> Self { + variant as u8 != 0 + } +} +impl SAMPLERDY_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> SAMPLERDY_A { + match self.bits { + false => SAMPLERDY_A::DISABLED, + true => SAMPLERDY_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == SAMPLERDY_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == SAMPLERDY_A::ENABLED + } +} +#[doc = "Write '1' to enable interrupt for event SAMPLERDY\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum SAMPLERDY_AW { + #[doc = "1: Enable"] + SET = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: SAMPLERDY_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `SAMPLERDY` writer - Write '1' to enable interrupt for event SAMPLERDY"] +pub type SAMPLERDY_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENSET_SPEC, SAMPLERDY_AW, O>; +impl<'a, const O: u8> SAMPLERDY_W<'a, O> { + #[doc = "Enable"] + #[inline(always)] + pub fn set(self) -> &'a mut W { + self.variant(SAMPLERDY_AW::SET) + } +} +#[doc = "Field `REPORTRDY` reader - Write '1' to enable interrupt for event REPORTRDY"] +pub type REPORTRDY_R = crate::BitReader; +#[doc = "Write '1' to enable interrupt for event REPORTRDY\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum REPORTRDY_A { + #[doc = "0: Read: Disabled"] + DISABLED = 0, + #[doc = "1: Read: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: REPORTRDY_A) -> Self { + variant as u8 != 0 + } +} +impl REPORTRDY_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> REPORTRDY_A { + match self.bits { + false => REPORTRDY_A::DISABLED, + true => REPORTRDY_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == REPORTRDY_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == REPORTRDY_A::ENABLED + } +} +#[doc = "Write '1' to enable interrupt for event REPORTRDY\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum REPORTRDY_AW { + #[doc = "1: Enable"] + SET = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: REPORTRDY_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `REPORTRDY` writer - Write '1' to enable interrupt for event REPORTRDY"] +pub type REPORTRDY_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENSET_SPEC, REPORTRDY_AW, O>; +impl<'a, const O: u8> REPORTRDY_W<'a, O> { + #[doc = "Enable"] + #[inline(always)] + pub fn set(self) -> &'a mut W { + self.variant(REPORTRDY_AW::SET) + } +} +#[doc = "Field `ACCOF` reader - Write '1' to enable interrupt for event ACCOF"] +pub type ACCOF_R = crate::BitReader; +#[doc = "Write '1' to enable interrupt for event ACCOF\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum ACCOF_A { + #[doc = "0: Read: Disabled"] + DISABLED = 0, + #[doc = "1: Read: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: ACCOF_A) -> Self { + variant as u8 != 0 + } +} +impl ACCOF_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> ACCOF_A { + match self.bits { + false => ACCOF_A::DISABLED, + true => ACCOF_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == ACCOF_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == ACCOF_A::ENABLED + } +} +#[doc = "Write '1' to enable interrupt for event ACCOF\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum ACCOF_AW { + #[doc = "1: Enable"] + SET = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: ACCOF_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `ACCOF` writer - Write '1' to enable interrupt for event ACCOF"] +pub type ACCOF_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENSET_SPEC, ACCOF_AW, O>; +impl<'a, const O: u8> ACCOF_W<'a, O> { + #[doc = "Enable"] + #[inline(always)] + pub fn set(self) -> &'a mut W { + self.variant(ACCOF_AW::SET) + } +} +#[doc = "Field `DBLRDY` reader - Write '1' to enable interrupt for event DBLRDY"] +pub type DBLRDY_R = crate::BitReader; +#[doc = "Write '1' to enable interrupt for event DBLRDY\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum DBLRDY_A { + #[doc = "0: Read: Disabled"] + DISABLED = 0, + #[doc = "1: Read: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: DBLRDY_A) -> Self { + variant as u8 != 0 + } +} +impl DBLRDY_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> DBLRDY_A { + match self.bits { + false => DBLRDY_A::DISABLED, + true => DBLRDY_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == DBLRDY_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == DBLRDY_A::ENABLED + } +} +#[doc = "Write '1' to enable interrupt for event DBLRDY\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum DBLRDY_AW { + #[doc = "1: Enable"] + SET = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: DBLRDY_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `DBLRDY` writer - Write '1' to enable interrupt for event DBLRDY"] +pub type DBLRDY_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENSET_SPEC, DBLRDY_AW, O>; +impl<'a, const O: u8> DBLRDY_W<'a, O> { + #[doc = "Enable"] + #[inline(always)] + pub fn set(self) -> &'a mut W { + self.variant(DBLRDY_AW::SET) + } +} +#[doc = "Field `STOPPED` reader - Write '1' to enable interrupt for event STOPPED"] +pub type STOPPED_R = crate::BitReader; +#[doc = "Write '1' to enable interrupt for event STOPPED\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum STOPPED_A { + #[doc = "0: Read: Disabled"] + DISABLED = 0, + #[doc = "1: Read: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: STOPPED_A) -> Self { + variant as u8 != 0 + } +} +impl STOPPED_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> STOPPED_A { + match self.bits { + false => STOPPED_A::DISABLED, + true => STOPPED_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == STOPPED_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == STOPPED_A::ENABLED + } +} +#[doc = "Write '1' to enable interrupt for event STOPPED\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum STOPPED_AW { + #[doc = "1: Enable"] + SET = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: STOPPED_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `STOPPED` writer - Write '1' to enable interrupt for event STOPPED"] +pub type STOPPED_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENSET_SPEC, STOPPED_AW, O>; +impl<'a, const O: u8> STOPPED_W<'a, O> { + #[doc = "Enable"] + #[inline(always)] + pub fn set(self) -> &'a mut W { + self.variant(STOPPED_AW::SET) + } +} +impl R { + #[doc = "Bit 0 - Write '1' to enable interrupt for event SAMPLERDY"] + #[inline(always)] + pub fn samplerdy(&self) -> SAMPLERDY_R { + SAMPLERDY_R::new((self.bits & 1) != 0) + } + #[doc = "Bit 1 - Write '1' to enable interrupt for event REPORTRDY"] + #[inline(always)] + pub fn reportrdy(&self) -> REPORTRDY_R { + REPORTRDY_R::new(((self.bits >> 1) & 1) != 0) + } + #[doc = "Bit 2 - Write '1' to enable interrupt for event ACCOF"] + #[inline(always)] + pub fn accof(&self) -> ACCOF_R { + ACCOF_R::new(((self.bits >> 2) & 1) != 0) + } + #[doc = "Bit 3 - Write '1' to enable interrupt for event DBLRDY"] + #[inline(always)] + pub fn dblrdy(&self) -> DBLRDY_R { + DBLRDY_R::new(((self.bits >> 3) & 1) != 0) + } + #[doc = "Bit 4 - Write '1' to enable interrupt for event STOPPED"] + #[inline(always)] + pub fn stopped(&self) -> STOPPED_R { + STOPPED_R::new(((self.bits >> 4) & 1) != 0) + } +} +impl W { + #[doc = "Bit 0 - Write '1' to enable interrupt for event SAMPLERDY"] + #[inline(always)] + #[must_use] + pub fn samplerdy(&mut self) -> SAMPLERDY_W<0> { + SAMPLERDY_W::new(self) + } + #[doc = "Bit 1 - Write '1' to enable interrupt for event REPORTRDY"] + #[inline(always)] + #[must_use] + pub fn reportrdy(&mut self) -> REPORTRDY_W<1> { + REPORTRDY_W::new(self) + } + #[doc = "Bit 2 - Write '1' to enable interrupt for event ACCOF"] + #[inline(always)] + #[must_use] + pub fn accof(&mut self) -> ACCOF_W<2> { + ACCOF_W::new(self) + } + #[doc = "Bit 3 - Write '1' to enable interrupt for event DBLRDY"] + #[inline(always)] + #[must_use] + pub fn dblrdy(&mut self) -> DBLRDY_W<3> { + DBLRDY_W::new(self) + } + #[doc = "Bit 4 - Write '1' to enable interrupt for event STOPPED"] + #[inline(always)] + #[must_use] + pub fn stopped(&mut self) -> STOPPED_W<4> { + STOPPED_W::new(self) + } + #[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 = "Enable interrupt\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 [intenset](index.html) module"] +pub struct INTENSET_SPEC; +impl crate::RegisterSpec for INTENSET_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [intenset::R](R) reader structure"] +impl crate::Readable for INTENSET_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [intenset::W](W) writer structure"] +impl crate::Writable for INTENSET_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets INTENSET to value 0"] +impl crate::Resettable for INTENSET_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/qdec/ledpol.rs b/down-the-stack/dk_pac/src/qdec/ledpol.rs new file mode 100644 index 0000000..6f0b8c8 --- /dev/null +++ b/down-the-stack/dk_pac/src/qdec/ledpol.rs @@ -0,0 +1,126 @@ +#[doc = "Register `LEDPOL` 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 `LEDPOL` 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 `LEDPOL` reader - LED output pin polarity"] +pub type LEDPOL_R = crate::BitReader; +#[doc = "LED output pin polarity\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum LEDPOL_A { + #[doc = "0: Led active on output pin low"] + ACTIVE_LOW = 0, + #[doc = "1: Led active on output pin high"] + ACTIVE_HIGH = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: LEDPOL_A) -> Self { + variant as u8 != 0 + } +} +impl LEDPOL_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> LEDPOL_A { + match self.bits { + false => LEDPOL_A::ACTIVE_LOW, + true => LEDPOL_A::ACTIVE_HIGH, + } + } + #[doc = "Checks if the value of the field is `ACTIVE_LOW`"] + #[inline(always)] + pub fn is_active_low(&self) -> bool { + *self == LEDPOL_A::ACTIVE_LOW + } + #[doc = "Checks if the value of the field is `ACTIVE_HIGH`"] + #[inline(always)] + pub fn is_active_high(&self) -> bool { + *self == LEDPOL_A::ACTIVE_HIGH + } +} +#[doc = "Field `LEDPOL` writer - LED output pin polarity"] +pub type LEDPOL_W<'a, const O: u8> = crate::BitWriter<'a, u32, LEDPOL_SPEC, LEDPOL_A, O>; +impl<'a, const O: u8> LEDPOL_W<'a, O> { + #[doc = "Led active on output pin low"] + #[inline(always)] + pub fn active_low(self) -> &'a mut W { + self.variant(LEDPOL_A::ACTIVE_LOW) + } + #[doc = "Led active on output pin high"] + #[inline(always)] + pub fn active_high(self) -> &'a mut W { + self.variant(LEDPOL_A::ACTIVE_HIGH) + } +} +impl R { + #[doc = "Bit 0 - LED output pin polarity"] + #[inline(always)] + pub fn ledpol(&self) -> LEDPOL_R { + LEDPOL_R::new((self.bits & 1) != 0) + } +} +impl W { + #[doc = "Bit 0 - LED output pin polarity"] + #[inline(always)] + #[must_use] + pub fn ledpol(&mut self) -> LEDPOL_W<0> { + LEDPOL_W::new(self) + } + #[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 = "LED output pin polarity\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 [ledpol](index.html) module"] +pub struct LEDPOL_SPEC; +impl crate::RegisterSpec for LEDPOL_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [ledpol::R](R) reader structure"] +impl crate::Readable for LEDPOL_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [ledpol::W](W) writer structure"] +impl crate::Writable for LEDPOL_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets LEDPOL to value 0"] +impl crate::Resettable for LEDPOL_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/qdec/ledpre.rs b/down-the-stack/dk_pac/src/qdec/ledpre.rs new file mode 100644 index 0000000..f4a8e8c --- /dev/null +++ b/down-the-stack/dk_pac/src/qdec/ledpre.rs @@ -0,0 +1,80 @@ +#[doc = "Register `LEDPRE` 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 `LEDPRE` 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 `LEDPRE` reader - Period in us the LED is switched on prior to sampling"] +pub type LEDPRE_R = crate::FieldReader; +#[doc = "Field `LEDPRE` writer - Period in us the LED is switched on prior to sampling"] +pub type LEDPRE_W<'a, const O: u8> = crate::FieldWriter<'a, u32, LEDPRE_SPEC, u16, u16, 9, O>; +impl R { + #[doc = "Bits 0:8 - Period in us the LED is switched on prior to sampling"] + #[inline(always)] + pub fn ledpre(&self) -> LEDPRE_R { + LEDPRE_R::new((self.bits & 0x01ff) as u16) + } +} +impl W { + #[doc = "Bits 0:8 - Period in us the LED is switched on prior to sampling"] + #[inline(always)] + #[must_use] + pub fn ledpre(&mut self) -> LEDPRE_W<0> { + LEDPRE_W::new(self) + } + #[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 = "Time period the LED is switched ON prior to sampling\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 [ledpre](index.html) module"] +pub struct LEDPRE_SPEC; +impl crate::RegisterSpec for LEDPRE_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [ledpre::R](R) reader structure"] +impl crate::Readable for LEDPRE_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [ledpre::W](W) writer structure"] +impl crate::Writable for LEDPRE_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets LEDPRE to value 0x10"] +impl crate::Resettable for LEDPRE_SPEC { + const RESET_VALUE: Self::Ux = 0x10; +} diff --git a/down-the-stack/dk_pac/src/qdec/psel.rs b/down-the-stack/dk_pac/src/qdec/psel.rs new file mode 100644 index 0000000..c4f60bd --- /dev/null +++ b/down-the-stack/dk_pac/src/qdec/psel.rs @@ -0,0 +1,22 @@ +#[doc = r"Register block"] +#[repr(C)] +pub struct PSEL { + #[doc = "0x00 - Pin select for LED signal"] + pub led: LED, + #[doc = "0x04 - Pin select for A signal"] + pub a: A, + #[doc = "0x08 - Pin select for B signal"] + pub b: B, +} +#[doc = "LED (rw) register accessor: an alias for `Reg`"] +pub type LED = crate::Reg; +#[doc = "Pin select for LED signal"] +pub mod led; +#[doc = "A (rw) register accessor: an alias for `Reg`"] +pub type A = crate::Reg; +#[doc = "Pin select for A signal"] +pub mod a; +#[doc = "B (rw) register accessor: an alias for `Reg`"] +pub type B = crate::Reg; +#[doc = "Pin select for B signal"] +pub mod b; diff --git a/down-the-stack/dk_pac/src/qdec/psel/a.rs b/down-the-stack/dk_pac/src/qdec/psel/a.rs new file mode 100644 index 0000000..dd71ddb --- /dev/null +++ b/down-the-stack/dk_pac/src/qdec/psel/a.rs @@ -0,0 +1,141 @@ +#[doc = "Register `A` 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 `A` 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 `PIN` reader - Pin number"] +pub type PIN_R = crate::FieldReader; +#[doc = "Field `PIN` writer - Pin number"] +pub type PIN_W<'a, const O: u8> = crate::FieldWriter<'a, u32, A_SPEC, u8, u8, 5, O>; +#[doc = "Field `CONNECT` reader - Connection"] +pub type CONNECT_R = crate::BitReader; +#[doc = "Connection\n\nValue on reset: 1"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum CONNECT_A { + #[doc = "1: Disconnect"] + DISCONNECTED = 1, + #[doc = "0: Connect"] + CONNECTED = 0, +} +impl From for bool { + #[inline(always)] + fn from(variant: CONNECT_A) -> Self { + variant as u8 != 0 + } +} +impl CONNECT_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> CONNECT_A { + match self.bits { + true => CONNECT_A::DISCONNECTED, + false => CONNECT_A::CONNECTED, + } + } + #[doc = "Checks if the value of the field is `DISCONNECTED`"] + #[inline(always)] + pub fn is_disconnected(&self) -> bool { + *self == CONNECT_A::DISCONNECTED + } + #[doc = "Checks if the value of the field is `CONNECTED`"] + #[inline(always)] + pub fn is_connected(&self) -> bool { + *self == CONNECT_A::CONNECTED + } +} +#[doc = "Field `CONNECT` writer - Connection"] +pub type CONNECT_W<'a, const O: u8> = crate::BitWriter<'a, u32, A_SPEC, CONNECT_A, O>; +impl<'a, const O: u8> CONNECT_W<'a, O> { + #[doc = "Disconnect"] + #[inline(always)] + pub fn disconnected(self) -> &'a mut W { + self.variant(CONNECT_A::DISCONNECTED) + } + #[doc = "Connect"] + #[inline(always)] + pub fn connected(self) -> &'a mut W { + self.variant(CONNECT_A::CONNECTED) + } +} +impl R { + #[doc = "Bits 0:4 - Pin number"] + #[inline(always)] + pub fn pin(&self) -> PIN_R { + PIN_R::new((self.bits & 0x1f) as u8) + } + #[doc = "Bit 31 - Connection"] + #[inline(always)] + pub fn connect(&self) -> CONNECT_R { + CONNECT_R::new(((self.bits >> 31) & 1) != 0) + } +} +impl W { + #[doc = "Bits 0:4 - Pin number"] + #[inline(always)] + #[must_use] + pub fn pin(&mut self) -> PIN_W<0> { + PIN_W::new(self) + } + #[doc = "Bit 31 - Connection"] + #[inline(always)] + #[must_use] + pub fn connect(&mut self) -> CONNECT_W<31> { + CONNECT_W::new(self) + } + #[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 = "Pin select for A signal\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 [a](index.html) module"] +pub struct A_SPEC; +impl crate::RegisterSpec for A_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [a::R](R) reader structure"] +impl crate::Readable for A_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [a::W](W) writer structure"] +impl crate::Writable for A_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets A to value 0xffff_ffff"] +impl crate::Resettable for A_SPEC { + const RESET_VALUE: Self::Ux = 0xffff_ffff; +} diff --git a/down-the-stack/dk_pac/src/qdec/psel/b.rs b/down-the-stack/dk_pac/src/qdec/psel/b.rs new file mode 100644 index 0000000..c038aa4 --- /dev/null +++ b/down-the-stack/dk_pac/src/qdec/psel/b.rs @@ -0,0 +1,141 @@ +#[doc = "Register `B` 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 `B` 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 `PIN` reader - Pin number"] +pub type PIN_R = crate::FieldReader; +#[doc = "Field `PIN` writer - Pin number"] +pub type PIN_W<'a, const O: u8> = crate::FieldWriter<'a, u32, B_SPEC, u8, u8, 5, O>; +#[doc = "Field `CONNECT` reader - Connection"] +pub type CONNECT_R = crate::BitReader; +#[doc = "Connection\n\nValue on reset: 1"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum CONNECT_A { + #[doc = "1: Disconnect"] + DISCONNECTED = 1, + #[doc = "0: Connect"] + CONNECTED = 0, +} +impl From for bool { + #[inline(always)] + fn from(variant: CONNECT_A) -> Self { + variant as u8 != 0 + } +} +impl CONNECT_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> CONNECT_A { + match self.bits { + true => CONNECT_A::DISCONNECTED, + false => CONNECT_A::CONNECTED, + } + } + #[doc = "Checks if the value of the field is `DISCONNECTED`"] + #[inline(always)] + pub fn is_disconnected(&self) -> bool { + *self == CONNECT_A::DISCONNECTED + } + #[doc = "Checks if the value of the field is `CONNECTED`"] + #[inline(always)] + pub fn is_connected(&self) -> bool { + *self == CONNECT_A::CONNECTED + } +} +#[doc = "Field `CONNECT` writer - Connection"] +pub type CONNECT_W<'a, const O: u8> = crate::BitWriter<'a, u32, B_SPEC, CONNECT_A, O>; +impl<'a, const O: u8> CONNECT_W<'a, O> { + #[doc = "Disconnect"] + #[inline(always)] + pub fn disconnected(self) -> &'a mut W { + self.variant(CONNECT_A::DISCONNECTED) + } + #[doc = "Connect"] + #[inline(always)] + pub fn connected(self) -> &'a mut W { + self.variant(CONNECT_A::CONNECTED) + } +} +impl R { + #[doc = "Bits 0:4 - Pin number"] + #[inline(always)] + pub fn pin(&self) -> PIN_R { + PIN_R::new((self.bits & 0x1f) as u8) + } + #[doc = "Bit 31 - Connection"] + #[inline(always)] + pub fn connect(&self) -> CONNECT_R { + CONNECT_R::new(((self.bits >> 31) & 1) != 0) + } +} +impl W { + #[doc = "Bits 0:4 - Pin number"] + #[inline(always)] + #[must_use] + pub fn pin(&mut self) -> PIN_W<0> { + PIN_W::new(self) + } + #[doc = "Bit 31 - Connection"] + #[inline(always)] + #[must_use] + pub fn connect(&mut self) -> CONNECT_W<31> { + CONNECT_W::new(self) + } + #[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 = "Pin select for B signal\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 [b](index.html) module"] +pub struct B_SPEC; +impl crate::RegisterSpec for B_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [b::R](R) reader structure"] +impl crate::Readable for B_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [b::W](W) writer structure"] +impl crate::Writable for B_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets B to value 0xffff_ffff"] +impl crate::Resettable for B_SPEC { + const RESET_VALUE: Self::Ux = 0xffff_ffff; +} diff --git a/down-the-stack/dk_pac/src/qdec/psel/led.rs b/down-the-stack/dk_pac/src/qdec/psel/led.rs new file mode 100644 index 0000000..7d0038f --- /dev/null +++ b/down-the-stack/dk_pac/src/qdec/psel/led.rs @@ -0,0 +1,141 @@ +#[doc = "Register `LED` 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 `LED` 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 `PIN` reader - Pin number"] +pub type PIN_R = crate::FieldReader; +#[doc = "Field `PIN` writer - Pin number"] +pub type PIN_W<'a, const O: u8> = crate::FieldWriter<'a, u32, LED_SPEC, u8, u8, 5, O>; +#[doc = "Field `CONNECT` reader - Connection"] +pub type CONNECT_R = crate::BitReader; +#[doc = "Connection\n\nValue on reset: 1"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum CONNECT_A { + #[doc = "1: Disconnect"] + DISCONNECTED = 1, + #[doc = "0: Connect"] + CONNECTED = 0, +} +impl From for bool { + #[inline(always)] + fn from(variant: CONNECT_A) -> Self { + variant as u8 != 0 + } +} +impl CONNECT_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> CONNECT_A { + match self.bits { + true => CONNECT_A::DISCONNECTED, + false => CONNECT_A::CONNECTED, + } + } + #[doc = "Checks if the value of the field is `DISCONNECTED`"] + #[inline(always)] + pub fn is_disconnected(&self) -> bool { + *self == CONNECT_A::DISCONNECTED + } + #[doc = "Checks if the value of the field is `CONNECTED`"] + #[inline(always)] + pub fn is_connected(&self) -> bool { + *self == CONNECT_A::CONNECTED + } +} +#[doc = "Field `CONNECT` writer - Connection"] +pub type CONNECT_W<'a, const O: u8> = crate::BitWriter<'a, u32, LED_SPEC, CONNECT_A, O>; +impl<'a, const O: u8> CONNECT_W<'a, O> { + #[doc = "Disconnect"] + #[inline(always)] + pub fn disconnected(self) -> &'a mut W { + self.variant(CONNECT_A::DISCONNECTED) + } + #[doc = "Connect"] + #[inline(always)] + pub fn connected(self) -> &'a mut W { + self.variant(CONNECT_A::CONNECTED) + } +} +impl R { + #[doc = "Bits 0:4 - Pin number"] + #[inline(always)] + pub fn pin(&self) -> PIN_R { + PIN_R::new((self.bits & 0x1f) as u8) + } + #[doc = "Bit 31 - Connection"] + #[inline(always)] + pub fn connect(&self) -> CONNECT_R { + CONNECT_R::new(((self.bits >> 31) & 1) != 0) + } +} +impl W { + #[doc = "Bits 0:4 - Pin number"] + #[inline(always)] + #[must_use] + pub fn pin(&mut self) -> PIN_W<0> { + PIN_W::new(self) + } + #[doc = "Bit 31 - Connection"] + #[inline(always)] + #[must_use] + pub fn connect(&mut self) -> CONNECT_W<31> { + CONNECT_W::new(self) + } + #[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 = "Pin select for LED signal\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 [led](index.html) module"] +pub struct LED_SPEC; +impl crate::RegisterSpec for LED_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [led::R](R) reader structure"] +impl crate::Readable for LED_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [led::W](W) writer structure"] +impl crate::Writable for LED_SPEC { + type 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 to value 0xffff_ffff"] +impl crate::Resettable for LED_SPEC { + const RESET_VALUE: Self::Ux = 0xffff_ffff; +} diff --git a/down-the-stack/dk_pac/src/qdec/reportper.rs b/down-the-stack/dk_pac/src/qdec/reportper.rs new file mode 100644 index 0000000..b88fe65 --- /dev/null +++ b/down-the-stack/dk_pac/src/qdec/reportper.rs @@ -0,0 +1,220 @@ +#[doc = "Register `REPORTPER` 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 `REPORTPER` 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 `REPORTPER` reader - Specifies the number of samples to be accumulated in the ACC register before the REPORTRDY and DBLRDY events can be generated"] +pub type REPORTPER_R = crate::FieldReader; +#[doc = "Specifies the number of samples to be accumulated in the ACC register before the REPORTRDY and DBLRDY events can be generated\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +#[repr(u8)] +pub enum REPORTPER_A { + #[doc = "0: 10 samples / report"] + _10SMPL = 0, + #[doc = "1: 40 samples / report"] + _40SMPL = 1, + #[doc = "2: 80 samples / report"] + _80SMPL = 2, + #[doc = "3: 120 samples / report"] + _120SMPL = 3, + #[doc = "4: 160 samples / report"] + _160SMPL = 4, + #[doc = "5: 200 samples / report"] + _200SMPL = 5, + #[doc = "6: 240 samples / report"] + _240SMPL = 6, + #[doc = "7: 280 samples / report"] + _280SMPL = 7, + #[doc = "8: 1 sample / report"] + _1SMPL = 8, +} +impl From for u8 { + #[inline(always)] + fn from(variant: REPORTPER_A) -> Self { + variant as _ + } +} +impl REPORTPER_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> Option { + match self.bits { + 0 => Some(REPORTPER_A::_10SMPL), + 1 => Some(REPORTPER_A::_40SMPL), + 2 => Some(REPORTPER_A::_80SMPL), + 3 => Some(REPORTPER_A::_120SMPL), + 4 => Some(REPORTPER_A::_160SMPL), + 5 => Some(REPORTPER_A::_200SMPL), + 6 => Some(REPORTPER_A::_240SMPL), + 7 => Some(REPORTPER_A::_280SMPL), + 8 => Some(REPORTPER_A::_1SMPL), + _ => None, + } + } + #[doc = "Checks if the value of the field is `_10SMPL`"] + #[inline(always)] + pub fn is_10smpl(&self) -> bool { + *self == REPORTPER_A::_10SMPL + } + #[doc = "Checks if the value of the field is `_40SMPL`"] + #[inline(always)] + pub fn is_40smpl(&self) -> bool { + *self == REPORTPER_A::_40SMPL + } + #[doc = "Checks if the value of the field is `_80SMPL`"] + #[inline(always)] + pub fn is_80smpl(&self) -> bool { + *self == REPORTPER_A::_80SMPL + } + #[doc = "Checks if the value of the field is `_120SMPL`"] + #[inline(always)] + pub fn is_120smpl(&self) -> bool { + *self == REPORTPER_A::_120SMPL + } + #[doc = "Checks if the value of the field is `_160SMPL`"] + #[inline(always)] + pub fn is_160smpl(&self) -> bool { + *self == REPORTPER_A::_160SMPL + } + #[doc = "Checks if the value of the field is `_200SMPL`"] + #[inline(always)] + pub fn is_200smpl(&self) -> bool { + *self == REPORTPER_A::_200SMPL + } + #[doc = "Checks if the value of the field is `_240SMPL`"] + #[inline(always)] + pub fn is_240smpl(&self) -> bool { + *self == REPORTPER_A::_240SMPL + } + #[doc = "Checks if the value of the field is `_280SMPL`"] + #[inline(always)] + pub fn is_280smpl(&self) -> bool { + *self == REPORTPER_A::_280SMPL + } + #[doc = "Checks if the value of the field is `_1SMPL`"] + #[inline(always)] + pub fn is_1smpl(&self) -> bool { + *self == REPORTPER_A::_1SMPL + } +} +#[doc = "Field `REPORTPER` writer - Specifies the number of samples to be accumulated in the ACC register before the REPORTRDY and DBLRDY events can be generated"] +pub type REPORTPER_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, REPORTPER_SPEC, u8, REPORTPER_A, 4, O>; +impl<'a, const O: u8> REPORTPER_W<'a, O> { + #[doc = "10 samples / report"] + #[inline(always)] + pub fn _10smpl(self) -> &'a mut W { + self.variant(REPORTPER_A::_10SMPL) + } + #[doc = "40 samples / report"] + #[inline(always)] + pub fn _40smpl(self) -> &'a mut W { + self.variant(REPORTPER_A::_40SMPL) + } + #[doc = "80 samples / report"] + #[inline(always)] + pub fn _80smpl(self) -> &'a mut W { + self.variant(REPORTPER_A::_80SMPL) + } + #[doc = "120 samples / report"] + #[inline(always)] + pub fn _120smpl(self) -> &'a mut W { + self.variant(REPORTPER_A::_120SMPL) + } + #[doc = "160 samples / report"] + #[inline(always)] + pub fn _160smpl(self) -> &'a mut W { + self.variant(REPORTPER_A::_160SMPL) + } + #[doc = "200 samples / report"] + #[inline(always)] + pub fn _200smpl(self) -> &'a mut W { + self.variant(REPORTPER_A::_200SMPL) + } + #[doc = "240 samples / report"] + #[inline(always)] + pub fn _240smpl(self) -> &'a mut W { + self.variant(REPORTPER_A::_240SMPL) + } + #[doc = "280 samples / report"] + #[inline(always)] + pub fn _280smpl(self) -> &'a mut W { + self.variant(REPORTPER_A::_280SMPL) + } + #[doc = "1 sample / report"] + #[inline(always)] + pub fn _1smpl(self) -> &'a mut W { + self.variant(REPORTPER_A::_1SMPL) + } +} +impl R { + #[doc = "Bits 0:3 - Specifies the number of samples to be accumulated in the ACC register before the REPORTRDY and DBLRDY events can be generated"] + #[inline(always)] + pub fn reportper(&self) -> REPORTPER_R { + REPORTPER_R::new((self.bits & 0x0f) as u8) + } +} +impl W { + #[doc = "Bits 0:3 - Specifies the number of samples to be accumulated in the ACC register before the REPORTRDY and DBLRDY events can be generated"] + #[inline(always)] + #[must_use] + pub fn reportper(&mut self) -> REPORTPER_W<0> { + REPORTPER_W::new(self) + } + #[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 = "Number of samples to be taken before REPORTRDY and DBLRDY events can be generated\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 [reportper](index.html) module"] +pub struct REPORTPER_SPEC; +impl crate::RegisterSpec for REPORTPER_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [reportper::R](R) reader structure"] +impl crate::Readable for REPORTPER_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [reportper::W](W) writer structure"] +impl crate::Writable for REPORTPER_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets REPORTPER to value 0"] +impl crate::Resettable for REPORTPER_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/qdec/sample.rs b/down-the-stack/dk_pac/src/qdec/sample.rs new file mode 100644 index 0000000..631284b --- /dev/null +++ b/down-the-stack/dk_pac/src/qdec/sample.rs @@ -0,0 +1,37 @@ +#[doc = "Register `SAMPLE` 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 = "Field `SAMPLE` reader - Last motion sample"] +pub type SAMPLE_R = crate::FieldReader; +impl R { + #[doc = "Bits 0:31 - Last motion sample"] + #[inline(always)] + pub fn sample(&self) -> SAMPLE_R { + SAMPLE_R::new(self.bits) + } +} +#[doc = "Motion sample value\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 [sample](index.html) module"] +pub struct SAMPLE_SPEC; +impl crate::RegisterSpec for SAMPLE_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [sample::R](R) reader structure"] +impl crate::Readable for SAMPLE_SPEC { + type Reader = R; +} +#[doc = "`reset()` method sets SAMPLE to value 0"] +impl crate::Resettable for SAMPLE_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/qdec/sampleper.rs b/down-the-stack/dk_pac/src/qdec/sampleper.rs new file mode 100644 index 0000000..ddabca6 --- /dev/null +++ b/down-the-stack/dk_pac/src/qdec/sampleper.rs @@ -0,0 +1,246 @@ +#[doc = "Register `SAMPLEPER` 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 `SAMPLEPER` 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 `SAMPLEPER` reader - Sample period. The SAMPLE register will be updated for every new sample"] +pub type SAMPLEPER_R = crate::FieldReader; +#[doc = "Sample period. The SAMPLE register will be updated for every new sample\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +#[repr(u8)] +pub enum SAMPLEPER_A { + #[doc = "0: 128 us"] + _128US = 0, + #[doc = "1: 256 us"] + _256US = 1, + #[doc = "2: 512 us"] + _512US = 2, + #[doc = "3: 1024 us"] + _1024US = 3, + #[doc = "4: 2048 us"] + _2048US = 4, + #[doc = "5: 4096 us"] + _4096US = 5, + #[doc = "6: 8192 us"] + _8192US = 6, + #[doc = "7: 16384 us"] + _16384US = 7, + #[doc = "8: 32768 us"] + _32MS = 8, + #[doc = "9: 65536 us"] + _65MS = 9, + #[doc = "10: 131072 us"] + _131MS = 10, +} +impl From for u8 { + #[inline(always)] + fn from(variant: SAMPLEPER_A) -> Self { + variant as _ + } +} +impl SAMPLEPER_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> Option { + match self.bits { + 0 => Some(SAMPLEPER_A::_128US), + 1 => Some(SAMPLEPER_A::_256US), + 2 => Some(SAMPLEPER_A::_512US), + 3 => Some(SAMPLEPER_A::_1024US), + 4 => Some(SAMPLEPER_A::_2048US), + 5 => Some(SAMPLEPER_A::_4096US), + 6 => Some(SAMPLEPER_A::_8192US), + 7 => Some(SAMPLEPER_A::_16384US), + 8 => Some(SAMPLEPER_A::_32MS), + 9 => Some(SAMPLEPER_A::_65MS), + 10 => Some(SAMPLEPER_A::_131MS), + _ => None, + } + } + #[doc = "Checks if the value of the field is `_128US`"] + #[inline(always)] + pub fn is_128us(&self) -> bool { + *self == SAMPLEPER_A::_128US + } + #[doc = "Checks if the value of the field is `_256US`"] + #[inline(always)] + pub fn is_256us(&self) -> bool { + *self == SAMPLEPER_A::_256US + } + #[doc = "Checks if the value of the field is `_512US`"] + #[inline(always)] + pub fn is_512us(&self) -> bool { + *self == SAMPLEPER_A::_512US + } + #[doc = "Checks if the value of the field is `_1024US`"] + #[inline(always)] + pub fn is_1024us(&self) -> bool { + *self == SAMPLEPER_A::_1024US + } + #[doc = "Checks if the value of the field is `_2048US`"] + #[inline(always)] + pub fn is_2048us(&self) -> bool { + *self == SAMPLEPER_A::_2048US + } + #[doc = "Checks if the value of the field is `_4096US`"] + #[inline(always)] + pub fn is_4096us(&self) -> bool { + *self == SAMPLEPER_A::_4096US + } + #[doc = "Checks if the value of the field is `_8192US`"] + #[inline(always)] + pub fn is_8192us(&self) -> bool { + *self == SAMPLEPER_A::_8192US + } + #[doc = "Checks if the value of the field is `_16384US`"] + #[inline(always)] + pub fn is_16384us(&self) -> bool { + *self == SAMPLEPER_A::_16384US + } + #[doc = "Checks if the value of the field is `_32MS`"] + #[inline(always)] + pub fn is_32ms(&self) -> bool { + *self == SAMPLEPER_A::_32MS + } + #[doc = "Checks if the value of the field is `_65MS`"] + #[inline(always)] + pub fn is_65ms(&self) -> bool { + *self == SAMPLEPER_A::_65MS + } + #[doc = "Checks if the value of the field is `_131MS`"] + #[inline(always)] + pub fn is_131ms(&self) -> bool { + *self == SAMPLEPER_A::_131MS + } +} +#[doc = "Field `SAMPLEPER` writer - Sample period. The SAMPLE register will be updated for every new sample"] +pub type SAMPLEPER_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, SAMPLEPER_SPEC, u8, SAMPLEPER_A, 4, O>; +impl<'a, const O: u8> SAMPLEPER_W<'a, O> { + #[doc = "128 us"] + #[inline(always)] + pub fn _128us(self) -> &'a mut W { + self.variant(SAMPLEPER_A::_128US) + } + #[doc = "256 us"] + #[inline(always)] + pub fn _256us(self) -> &'a mut W { + self.variant(SAMPLEPER_A::_256US) + } + #[doc = "512 us"] + #[inline(always)] + pub fn _512us(self) -> &'a mut W { + self.variant(SAMPLEPER_A::_512US) + } + #[doc = "1024 us"] + #[inline(always)] + pub fn _1024us(self) -> &'a mut W { + self.variant(SAMPLEPER_A::_1024US) + } + #[doc = "2048 us"] + #[inline(always)] + pub fn _2048us(self) -> &'a mut W { + self.variant(SAMPLEPER_A::_2048US) + } + #[doc = "4096 us"] + #[inline(always)] + pub fn _4096us(self) -> &'a mut W { + self.variant(SAMPLEPER_A::_4096US) + } + #[doc = "8192 us"] + #[inline(always)] + pub fn _8192us(self) -> &'a mut W { + self.variant(SAMPLEPER_A::_8192US) + } + #[doc = "16384 us"] + #[inline(always)] + pub fn _16384us(self) -> &'a mut W { + self.variant(SAMPLEPER_A::_16384US) + } + #[doc = "32768 us"] + #[inline(always)] + pub fn _32ms(self) -> &'a mut W { + self.variant(SAMPLEPER_A::_32MS) + } + #[doc = "65536 us"] + #[inline(always)] + pub fn _65ms(self) -> &'a mut W { + self.variant(SAMPLEPER_A::_65MS) + } + #[doc = "131072 us"] + #[inline(always)] + pub fn _131ms(self) -> &'a mut W { + self.variant(SAMPLEPER_A::_131MS) + } +} +impl R { + #[doc = "Bits 0:3 - Sample period. The SAMPLE register will be updated for every new sample"] + #[inline(always)] + pub fn sampleper(&self) -> SAMPLEPER_R { + SAMPLEPER_R::new((self.bits & 0x0f) as u8) + } +} +impl W { + #[doc = "Bits 0:3 - Sample period. The SAMPLE register will be updated for every new sample"] + #[inline(always)] + #[must_use] + pub fn sampleper(&mut self) -> SAMPLEPER_W<0> { + SAMPLEPER_W::new(self) + } + #[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 = "Sample period\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 [sampleper](index.html) module"] +pub struct SAMPLEPER_SPEC; +impl crate::RegisterSpec for SAMPLEPER_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [sampleper::R](R) reader structure"] +impl crate::Readable for SAMPLEPER_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [sampleper::W](W) writer structure"] +impl crate::Writable for SAMPLEPER_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets SAMPLEPER to value 0"] +impl crate::Resettable for SAMPLEPER_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/qdec/shorts.rs b/down-the-stack/dk_pac/src/qdec/shorts.rs new file mode 100644 index 0000000..a10bbdc --- /dev/null +++ b/down-the-stack/dk_pac/src/qdec/shorts.rs @@ -0,0 +1,498 @@ +#[doc = "Register `SHORTS` 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 `SHORTS` 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 `REPORTRDY_READCLRACC` reader - Shortcut between event REPORTRDY and task READCLRACC"] +pub type REPORTRDY_READCLRACC_R = crate::BitReader; +#[doc = "Shortcut between event REPORTRDY and task READCLRACC\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum REPORTRDY_READCLRACC_A { + #[doc = "0: Disable shortcut"] + DISABLED = 0, + #[doc = "1: Enable shortcut"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: REPORTRDY_READCLRACC_A) -> Self { + variant as u8 != 0 + } +} +impl REPORTRDY_READCLRACC_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> REPORTRDY_READCLRACC_A { + match self.bits { + false => REPORTRDY_READCLRACC_A::DISABLED, + true => REPORTRDY_READCLRACC_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == REPORTRDY_READCLRACC_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == REPORTRDY_READCLRACC_A::ENABLED + } +} +#[doc = "Field `REPORTRDY_READCLRACC` writer - Shortcut between event REPORTRDY and task READCLRACC"] +pub type REPORTRDY_READCLRACC_W<'a, const O: u8> = + crate::BitWriter<'a, u32, SHORTS_SPEC, REPORTRDY_READCLRACC_A, O>; +impl<'a, const O: u8> REPORTRDY_READCLRACC_W<'a, O> { + #[doc = "Disable shortcut"] + #[inline(always)] + pub fn disabled(self) -> &'a mut W { + self.variant(REPORTRDY_READCLRACC_A::DISABLED) + } + #[doc = "Enable shortcut"] + #[inline(always)] + pub fn enabled(self) -> &'a mut W { + self.variant(REPORTRDY_READCLRACC_A::ENABLED) + } +} +#[doc = "Field `SAMPLERDY_STOP` reader - Shortcut between event SAMPLERDY and task STOP"] +pub type SAMPLERDY_STOP_R = crate::BitReader; +#[doc = "Shortcut between event SAMPLERDY and task STOP\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum SAMPLERDY_STOP_A { + #[doc = "0: Disable shortcut"] + DISABLED = 0, + #[doc = "1: Enable shortcut"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: SAMPLERDY_STOP_A) -> Self { + variant as u8 != 0 + } +} +impl SAMPLERDY_STOP_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> SAMPLERDY_STOP_A { + match self.bits { + false => SAMPLERDY_STOP_A::DISABLED, + true => SAMPLERDY_STOP_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == SAMPLERDY_STOP_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == SAMPLERDY_STOP_A::ENABLED + } +} +#[doc = "Field `SAMPLERDY_STOP` writer - Shortcut between event SAMPLERDY and task STOP"] +pub type SAMPLERDY_STOP_W<'a, const O: u8> = + crate::BitWriter<'a, u32, SHORTS_SPEC, SAMPLERDY_STOP_A, O>; +impl<'a, const O: u8> SAMPLERDY_STOP_W<'a, O> { + #[doc = "Disable shortcut"] + #[inline(always)] + pub fn disabled(self) -> &'a mut W { + self.variant(SAMPLERDY_STOP_A::DISABLED) + } + #[doc = "Enable shortcut"] + #[inline(always)] + pub fn enabled(self) -> &'a mut W { + self.variant(SAMPLERDY_STOP_A::ENABLED) + } +} +#[doc = "Field `REPORTRDY_RDCLRACC` reader - Shortcut between event REPORTRDY and task RDCLRACC"] +pub type REPORTRDY_RDCLRACC_R = crate::BitReader; +#[doc = "Shortcut between event REPORTRDY and task RDCLRACC\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum REPORTRDY_RDCLRACC_A { + #[doc = "0: Disable shortcut"] + DISABLED = 0, + #[doc = "1: Enable shortcut"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: REPORTRDY_RDCLRACC_A) -> Self { + variant as u8 != 0 + } +} +impl REPORTRDY_RDCLRACC_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> REPORTRDY_RDCLRACC_A { + match self.bits { + false => REPORTRDY_RDCLRACC_A::DISABLED, + true => REPORTRDY_RDCLRACC_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == REPORTRDY_RDCLRACC_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == REPORTRDY_RDCLRACC_A::ENABLED + } +} +#[doc = "Field `REPORTRDY_RDCLRACC` writer - Shortcut between event REPORTRDY and task RDCLRACC"] +pub type REPORTRDY_RDCLRACC_W<'a, const O: u8> = + crate::BitWriter<'a, u32, SHORTS_SPEC, REPORTRDY_RDCLRACC_A, O>; +impl<'a, const O: u8> REPORTRDY_RDCLRACC_W<'a, O> { + #[doc = "Disable shortcut"] + #[inline(always)] + pub fn disabled(self) -> &'a mut W { + self.variant(REPORTRDY_RDCLRACC_A::DISABLED) + } + #[doc = "Enable shortcut"] + #[inline(always)] + pub fn enabled(self) -> &'a mut W { + self.variant(REPORTRDY_RDCLRACC_A::ENABLED) + } +} +#[doc = "Field `REPORTRDY_STOP` reader - Shortcut between event REPORTRDY and task STOP"] +pub type REPORTRDY_STOP_R = crate::BitReader; +#[doc = "Shortcut between event REPORTRDY and task STOP\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum REPORTRDY_STOP_A { + #[doc = "0: Disable shortcut"] + DISABLED = 0, + #[doc = "1: Enable shortcut"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: REPORTRDY_STOP_A) -> Self { + variant as u8 != 0 + } +} +impl REPORTRDY_STOP_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> REPORTRDY_STOP_A { + match self.bits { + false => REPORTRDY_STOP_A::DISABLED, + true => REPORTRDY_STOP_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == REPORTRDY_STOP_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == REPORTRDY_STOP_A::ENABLED + } +} +#[doc = "Field `REPORTRDY_STOP` writer - Shortcut between event REPORTRDY and task STOP"] +pub type REPORTRDY_STOP_W<'a, const O: u8> = + crate::BitWriter<'a, u32, SHORTS_SPEC, REPORTRDY_STOP_A, O>; +impl<'a, const O: u8> REPORTRDY_STOP_W<'a, O> { + #[doc = "Disable shortcut"] + #[inline(always)] + pub fn disabled(self) -> &'a mut W { + self.variant(REPORTRDY_STOP_A::DISABLED) + } + #[doc = "Enable shortcut"] + #[inline(always)] + pub fn enabled(self) -> &'a mut W { + self.variant(REPORTRDY_STOP_A::ENABLED) + } +} +#[doc = "Field `DBLRDY_RDCLRDBL` reader - Shortcut between event DBLRDY and task RDCLRDBL"] +pub type DBLRDY_RDCLRDBL_R = crate::BitReader; +#[doc = "Shortcut between event DBLRDY and task RDCLRDBL\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum DBLRDY_RDCLRDBL_A { + #[doc = "0: Disable shortcut"] + DISABLED = 0, + #[doc = "1: Enable shortcut"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: DBLRDY_RDCLRDBL_A) -> Self { + variant as u8 != 0 + } +} +impl DBLRDY_RDCLRDBL_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> DBLRDY_RDCLRDBL_A { + match self.bits { + false => DBLRDY_RDCLRDBL_A::DISABLED, + true => DBLRDY_RDCLRDBL_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == DBLRDY_RDCLRDBL_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == DBLRDY_RDCLRDBL_A::ENABLED + } +} +#[doc = "Field `DBLRDY_RDCLRDBL` writer - Shortcut between event DBLRDY and task RDCLRDBL"] +pub type DBLRDY_RDCLRDBL_W<'a, const O: u8> = + crate::BitWriter<'a, u32, SHORTS_SPEC, DBLRDY_RDCLRDBL_A, O>; +impl<'a, const O: u8> DBLRDY_RDCLRDBL_W<'a, O> { + #[doc = "Disable shortcut"] + #[inline(always)] + pub fn disabled(self) -> &'a mut W { + self.variant(DBLRDY_RDCLRDBL_A::DISABLED) + } + #[doc = "Enable shortcut"] + #[inline(always)] + pub fn enabled(self) -> &'a mut W { + self.variant(DBLRDY_RDCLRDBL_A::ENABLED) + } +} +#[doc = "Field `DBLRDY_STOP` reader - Shortcut between event DBLRDY and task STOP"] +pub type DBLRDY_STOP_R = crate::BitReader; +#[doc = "Shortcut between event DBLRDY and task STOP\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum DBLRDY_STOP_A { + #[doc = "0: Disable shortcut"] + DISABLED = 0, + #[doc = "1: Enable shortcut"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: DBLRDY_STOP_A) -> Self { + variant as u8 != 0 + } +} +impl DBLRDY_STOP_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> DBLRDY_STOP_A { + match self.bits { + false => DBLRDY_STOP_A::DISABLED, + true => DBLRDY_STOP_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == DBLRDY_STOP_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == DBLRDY_STOP_A::ENABLED + } +} +#[doc = "Field `DBLRDY_STOP` writer - Shortcut between event DBLRDY and task STOP"] +pub type DBLRDY_STOP_W<'a, const O: u8> = crate::BitWriter<'a, u32, SHORTS_SPEC, DBLRDY_STOP_A, O>; +impl<'a, const O: u8> DBLRDY_STOP_W<'a, O> { + #[doc = "Disable shortcut"] + #[inline(always)] + pub fn disabled(self) -> &'a mut W { + self.variant(DBLRDY_STOP_A::DISABLED) + } + #[doc = "Enable shortcut"] + #[inline(always)] + pub fn enabled(self) -> &'a mut W { + self.variant(DBLRDY_STOP_A::ENABLED) + } +} +#[doc = "Field `SAMPLERDY_READCLRACC` reader - Shortcut between event SAMPLERDY and task READCLRACC"] +pub type SAMPLERDY_READCLRACC_R = crate::BitReader; +#[doc = "Shortcut between event SAMPLERDY and task READCLRACC\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum SAMPLERDY_READCLRACC_A { + #[doc = "0: Disable shortcut"] + DISABLED = 0, + #[doc = "1: Enable shortcut"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: SAMPLERDY_READCLRACC_A) -> Self { + variant as u8 != 0 + } +} +impl SAMPLERDY_READCLRACC_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> SAMPLERDY_READCLRACC_A { + match self.bits { + false => SAMPLERDY_READCLRACC_A::DISABLED, + true => SAMPLERDY_READCLRACC_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == SAMPLERDY_READCLRACC_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == SAMPLERDY_READCLRACC_A::ENABLED + } +} +#[doc = "Field `SAMPLERDY_READCLRACC` writer - Shortcut between event SAMPLERDY and task READCLRACC"] +pub type SAMPLERDY_READCLRACC_W<'a, const O: u8> = + crate::BitWriter<'a, u32, SHORTS_SPEC, SAMPLERDY_READCLRACC_A, O>; +impl<'a, const O: u8> SAMPLERDY_READCLRACC_W<'a, O> { + #[doc = "Disable shortcut"] + #[inline(always)] + pub fn disabled(self) -> &'a mut W { + self.variant(SAMPLERDY_READCLRACC_A::DISABLED) + } + #[doc = "Enable shortcut"] + #[inline(always)] + pub fn enabled(self) -> &'a mut W { + self.variant(SAMPLERDY_READCLRACC_A::ENABLED) + } +} +impl R { + #[doc = "Bit 0 - Shortcut between event REPORTRDY and task READCLRACC"] + #[inline(always)] + pub fn reportrdy_readclracc(&self) -> REPORTRDY_READCLRACC_R { + REPORTRDY_READCLRACC_R::new((self.bits & 1) != 0) + } + #[doc = "Bit 1 - Shortcut between event SAMPLERDY and task STOP"] + #[inline(always)] + pub fn samplerdy_stop(&self) -> SAMPLERDY_STOP_R { + SAMPLERDY_STOP_R::new(((self.bits >> 1) & 1) != 0) + } + #[doc = "Bit 2 - Shortcut between event REPORTRDY and task RDCLRACC"] + #[inline(always)] + pub fn reportrdy_rdclracc(&self) -> REPORTRDY_RDCLRACC_R { + REPORTRDY_RDCLRACC_R::new(((self.bits >> 2) & 1) != 0) + } + #[doc = "Bit 3 - Shortcut between event REPORTRDY and task STOP"] + #[inline(always)] + pub fn reportrdy_stop(&self) -> REPORTRDY_STOP_R { + REPORTRDY_STOP_R::new(((self.bits >> 3) & 1) != 0) + } + #[doc = "Bit 4 - Shortcut between event DBLRDY and task RDCLRDBL"] + #[inline(always)] + pub fn dblrdy_rdclrdbl(&self) -> DBLRDY_RDCLRDBL_R { + DBLRDY_RDCLRDBL_R::new(((self.bits >> 4) & 1) != 0) + } + #[doc = "Bit 5 - Shortcut between event DBLRDY and task STOP"] + #[inline(always)] + pub fn dblrdy_stop(&self) -> DBLRDY_STOP_R { + DBLRDY_STOP_R::new(((self.bits >> 5) & 1) != 0) + } + #[doc = "Bit 6 - Shortcut between event SAMPLERDY and task READCLRACC"] + #[inline(always)] + pub fn samplerdy_readclracc(&self) -> SAMPLERDY_READCLRACC_R { + SAMPLERDY_READCLRACC_R::new(((self.bits >> 6) & 1) != 0) + } +} +impl W { + #[doc = "Bit 0 - Shortcut between event REPORTRDY and task READCLRACC"] + #[inline(always)] + #[must_use] + pub fn reportrdy_readclracc(&mut self) -> REPORTRDY_READCLRACC_W<0> { + REPORTRDY_READCLRACC_W::new(self) + } + #[doc = "Bit 1 - Shortcut between event SAMPLERDY and task STOP"] + #[inline(always)] + #[must_use] + pub fn samplerdy_stop(&mut self) -> SAMPLERDY_STOP_W<1> { + SAMPLERDY_STOP_W::new(self) + } + #[doc = "Bit 2 - Shortcut between event REPORTRDY and task RDCLRACC"] + #[inline(always)] + #[must_use] + pub fn reportrdy_rdclracc(&mut self) -> REPORTRDY_RDCLRACC_W<2> { + REPORTRDY_RDCLRACC_W::new(self) + } + #[doc = "Bit 3 - Shortcut between event REPORTRDY and task STOP"] + #[inline(always)] + #[must_use] + pub fn reportrdy_stop(&mut self) -> REPORTRDY_STOP_W<3> { + REPORTRDY_STOP_W::new(self) + } + #[doc = "Bit 4 - Shortcut between event DBLRDY and task RDCLRDBL"] + #[inline(always)] + #[must_use] + pub fn dblrdy_rdclrdbl(&mut self) -> DBLRDY_RDCLRDBL_W<4> { + DBLRDY_RDCLRDBL_W::new(self) + } + #[doc = "Bit 5 - Shortcut between event DBLRDY and task STOP"] + #[inline(always)] + #[must_use] + pub fn dblrdy_stop(&mut self) -> DBLRDY_STOP_W<5> { + DBLRDY_STOP_W::new(self) + } + #[doc = "Bit 6 - Shortcut between event SAMPLERDY and task READCLRACC"] + #[inline(always)] + #[must_use] + pub fn samplerdy_readclracc(&mut self) -> SAMPLERDY_READCLRACC_W<6> { + SAMPLERDY_READCLRACC_W::new(self) + } + #[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 = "Shortcuts between local events and tasks\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 [shorts](index.html) module"] +pub struct SHORTS_SPEC; +impl crate::RegisterSpec for SHORTS_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [shorts::R](R) reader structure"] +impl crate::Readable for SHORTS_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [shorts::W](W) writer structure"] +impl crate::Writable for SHORTS_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets SHORTS to value 0"] +impl crate::Resettable for SHORTS_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/qdec/tasks_rdclracc.rs b/down-the-stack/dk_pac/src/qdec/tasks_rdclracc.rs new file mode 100644 index 0000000..ca63abf --- /dev/null +++ b/down-the-stack/dk_pac/src/qdec/tasks_rdclracc.rs @@ -0,0 +1,72 @@ +#[doc = "Register `TASKS_RDCLRACC` 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 = "Read and clear ACC\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum TASKS_RDCLRACC_AW { + #[doc = "1: Trigger task"] + TRIGGER = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: TASKS_RDCLRACC_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `TASKS_RDCLRACC` writer - Read and clear ACC"] +pub type TASKS_RDCLRACC_W<'a, const O: u8> = + crate::BitWriter<'a, u32, TASKS_RDCLRACC_SPEC, TASKS_RDCLRACC_AW, O>; +impl<'a, const O: u8> TASKS_RDCLRACC_W<'a, O> { + #[doc = "Trigger task"] + #[inline(always)] + pub fn trigger(self) -> &'a mut W { + self.variant(TASKS_RDCLRACC_AW::TRIGGER) + } +} +impl W { + #[doc = "Bit 0 - Read and clear ACC"] + #[inline(always)] + #[must_use] + pub fn tasks_rdclracc(&mut self) -> TASKS_RDCLRACC_W<0> { + TASKS_RDCLRACC_W::new(self) + } + #[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 = "Read and clear ACC\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 [tasks_rdclracc](index.html) module"] +pub struct TASKS_RDCLRACC_SPEC; +impl crate::RegisterSpec for TASKS_RDCLRACC_SPEC { + type Ux = u32; +} +#[doc = "`write(|w| ..)` method takes [tasks_rdclracc::W](W) writer structure"] +impl crate::Writable for TASKS_RDCLRACC_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets TASKS_RDCLRACC to value 0"] +impl crate::Resettable for TASKS_RDCLRACC_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/qdec/tasks_rdclrdbl.rs b/down-the-stack/dk_pac/src/qdec/tasks_rdclrdbl.rs new file mode 100644 index 0000000..57b2f78 --- /dev/null +++ b/down-the-stack/dk_pac/src/qdec/tasks_rdclrdbl.rs @@ -0,0 +1,72 @@ +#[doc = "Register `TASKS_RDCLRDBL` 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 = "Read and clear ACCDBL\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum TASKS_RDCLRDBL_AW { + #[doc = "1: Trigger task"] + TRIGGER = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: TASKS_RDCLRDBL_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `TASKS_RDCLRDBL` writer - Read and clear ACCDBL"] +pub type TASKS_RDCLRDBL_W<'a, const O: u8> = + crate::BitWriter<'a, u32, TASKS_RDCLRDBL_SPEC, TASKS_RDCLRDBL_AW, O>; +impl<'a, const O: u8> TASKS_RDCLRDBL_W<'a, O> { + #[doc = "Trigger task"] + #[inline(always)] + pub fn trigger(self) -> &'a mut W { + self.variant(TASKS_RDCLRDBL_AW::TRIGGER) + } +} +impl W { + #[doc = "Bit 0 - Read and clear ACCDBL"] + #[inline(always)] + #[must_use] + pub fn tasks_rdclrdbl(&mut self) -> TASKS_RDCLRDBL_W<0> { + TASKS_RDCLRDBL_W::new(self) + } + #[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 = "Read and clear ACCDBL\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 [tasks_rdclrdbl](index.html) module"] +pub struct TASKS_RDCLRDBL_SPEC; +impl crate::RegisterSpec for TASKS_RDCLRDBL_SPEC { + type Ux = u32; +} +#[doc = "`write(|w| ..)` method takes [tasks_rdclrdbl::W](W) writer structure"] +impl crate::Writable for TASKS_RDCLRDBL_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets TASKS_RDCLRDBL to value 0"] +impl crate::Resettable for TASKS_RDCLRDBL_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/qdec/tasks_readclracc.rs b/down-the-stack/dk_pac/src/qdec/tasks_readclracc.rs new file mode 100644 index 0000000..a3f8425 --- /dev/null +++ b/down-the-stack/dk_pac/src/qdec/tasks_readclracc.rs @@ -0,0 +1,72 @@ +#[doc = "Register `TASKS_READCLRACC` 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 = "Read and clear ACC and ACCDBL\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum TASKS_READCLRACC_AW { + #[doc = "1: Trigger task"] + TRIGGER = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: TASKS_READCLRACC_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `TASKS_READCLRACC` writer - Read and clear ACC and ACCDBL"] +pub type TASKS_READCLRACC_W<'a, const O: u8> = + crate::BitWriter<'a, u32, TASKS_READCLRACC_SPEC, TASKS_READCLRACC_AW, O>; +impl<'a, const O: u8> TASKS_READCLRACC_W<'a, O> { + #[doc = "Trigger task"] + #[inline(always)] + pub fn trigger(self) -> &'a mut W { + self.variant(TASKS_READCLRACC_AW::TRIGGER) + } +} +impl W { + #[doc = "Bit 0 - Read and clear ACC and ACCDBL"] + #[inline(always)] + #[must_use] + pub fn tasks_readclracc(&mut self) -> TASKS_READCLRACC_W<0> { + TASKS_READCLRACC_W::new(self) + } + #[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 = "Read and clear ACC and ACCDBL\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 [tasks_readclracc](index.html) module"] +pub struct TASKS_READCLRACC_SPEC; +impl crate::RegisterSpec for TASKS_READCLRACC_SPEC { + type Ux = u32; +} +#[doc = "`write(|w| ..)` method takes [tasks_readclracc::W](W) writer structure"] +impl crate::Writable for TASKS_READCLRACC_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets TASKS_READCLRACC to value 0"] +impl crate::Resettable for TASKS_READCLRACC_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/qdec/tasks_start.rs b/down-the-stack/dk_pac/src/qdec/tasks_start.rs new file mode 100644 index 0000000..6a4f6f6 --- /dev/null +++ b/down-the-stack/dk_pac/src/qdec/tasks_start.rs @@ -0,0 +1,72 @@ +#[doc = "Register `TASKS_START` 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 = "Task starting the quadrature decoder\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum TASKS_START_AW { + #[doc = "1: Trigger task"] + TRIGGER = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: TASKS_START_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `TASKS_START` writer - Task starting the quadrature decoder"] +pub type TASKS_START_W<'a, const O: u8> = + crate::BitWriter<'a, u32, TASKS_START_SPEC, TASKS_START_AW, O>; +impl<'a, const O: u8> TASKS_START_W<'a, O> { + #[doc = "Trigger task"] + #[inline(always)] + pub fn trigger(self) -> &'a mut W { + self.variant(TASKS_START_AW::TRIGGER) + } +} +impl W { + #[doc = "Bit 0 - Task starting the quadrature decoder"] + #[inline(always)] + #[must_use] + pub fn tasks_start(&mut self) -> TASKS_START_W<0> { + TASKS_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 + } +} +#[doc = "Task starting the quadrature decoder\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 [tasks_start](index.html) module"] +pub struct TASKS_START_SPEC; +impl crate::RegisterSpec for TASKS_START_SPEC { + type Ux = u32; +} +#[doc = "`write(|w| ..)` method takes [tasks_start::W](W) writer structure"] +impl crate::Writable for TASKS_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 TASKS_START to value 0"] +impl crate::Resettable for TASKS_START_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/qdec/tasks_stop.rs b/down-the-stack/dk_pac/src/qdec/tasks_stop.rs new file mode 100644 index 0000000..cd81652 --- /dev/null +++ b/down-the-stack/dk_pac/src/qdec/tasks_stop.rs @@ -0,0 +1,72 @@ +#[doc = "Register `TASKS_STOP` 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 = "Task stopping the quadrature decoder\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum TASKS_STOP_AW { + #[doc = "1: Trigger task"] + TRIGGER = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: TASKS_STOP_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `TASKS_STOP` writer - Task stopping the quadrature decoder"] +pub type TASKS_STOP_W<'a, const O: u8> = + crate::BitWriter<'a, u32, TASKS_STOP_SPEC, TASKS_STOP_AW, O>; +impl<'a, const O: u8> TASKS_STOP_W<'a, O> { + #[doc = "Trigger task"] + #[inline(always)] + pub fn trigger(self) -> &'a mut W { + self.variant(TASKS_STOP_AW::TRIGGER) + } +} +impl W { + #[doc = "Bit 0 - Task stopping the quadrature decoder"] + #[inline(always)] + #[must_use] + pub fn tasks_stop(&mut self) -> TASKS_STOP_W<0> { + TASKS_STOP_W::new(self) + } + #[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 = "Task stopping the quadrature decoder\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 [tasks_stop](index.html) module"] +pub struct TASKS_STOP_SPEC; +impl crate::RegisterSpec for TASKS_STOP_SPEC { + type Ux = u32; +} +#[doc = "`write(|w| ..)` method takes [tasks_stop::W](W) writer structure"] +impl crate::Writable for TASKS_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 TASKS_STOP to value 0"] +impl crate::Resettable for TASKS_STOP_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/radio.rs b/down-the-stack/dk_pac/src/radio.rs new file mode 100644 index 0000000..12f9c2f --- /dev/null +++ b/down-the-stack/dk_pac/src/radio.rs @@ -0,0 +1,330 @@ +#[doc = r"Register block"] +#[repr(C)] +pub struct RegisterBlock { + #[doc = "0x00 - Enable RADIO in TX mode"] + pub tasks_txen: TASKS_TXEN, + #[doc = "0x04 - Enable RADIO in RX mode"] + pub tasks_rxen: TASKS_RXEN, + #[doc = "0x08 - Start RADIO"] + pub tasks_start: TASKS_START, + #[doc = "0x0c - Stop RADIO"] + pub tasks_stop: TASKS_STOP, + #[doc = "0x10 - Disable RADIO"] + pub tasks_disable: TASKS_DISABLE, + #[doc = "0x14 - Start the RSSI and take one single sample of the receive signal strength."] + pub tasks_rssistart: TASKS_RSSISTART, + #[doc = "0x18 - Stop the RSSI measurement"] + pub tasks_rssistop: TASKS_RSSISTOP, + #[doc = "0x1c - Start the bit counter"] + pub tasks_bcstart: TASKS_BCSTART, + #[doc = "0x20 - Stop the bit counter"] + pub tasks_bcstop: TASKS_BCSTOP, + _reserved9: [u8; 0xdc], + #[doc = "0x100 - RADIO has ramped up and is ready to be started"] + pub events_ready: EVENTS_READY, + #[doc = "0x104 - Address sent or received"] + pub events_address: EVENTS_ADDRESS, + #[doc = "0x108 - Packet payload sent or received"] + pub events_payload: EVENTS_PAYLOAD, + #[doc = "0x10c - Packet sent or received"] + pub events_end: EVENTS_END, + #[doc = "0x110 - RADIO has been disabled"] + pub events_disabled: EVENTS_DISABLED, + #[doc = "0x114 - A device address match occurred on the last received packet"] + pub events_devmatch: EVENTS_DEVMATCH, + #[doc = "0x118 - No device address match occurred on the last received packet"] + pub events_devmiss: EVENTS_DEVMISS, + #[doc = "0x11c - Sampling of receive signal strength complete."] + pub events_rssiend: EVENTS_RSSIEND, + _reserved17: [u8; 0x08], + #[doc = "0x128 - Bit counter reached bit count value."] + pub events_bcmatch: EVENTS_BCMATCH, + _reserved18: [u8; 0x04], + #[doc = "0x130 - Packet received with CRC ok"] + pub events_crcok: EVENTS_CRCOK, + #[doc = "0x134 - Packet received with CRC error"] + pub events_crcerror: EVENTS_CRCERROR, + _reserved20: [u8; 0xc8], + #[doc = "0x200 - Shortcuts between local events and tasks"] + pub shorts: SHORTS, + _reserved21: [u8; 0x0100], + #[doc = "0x304 - Enable interrupt"] + pub intenset: INTENSET, + #[doc = "0x308 - Disable interrupt"] + pub intenclr: INTENCLR, + _reserved23: [u8; 0xf4], + #[doc = "0x400 - CRC status"] + pub crcstatus: CRCSTATUS, + _reserved24: [u8; 0x04], + #[doc = "0x408 - Received address"] + pub rxmatch: RXMATCH, + #[doc = "0x40c - CRC field of previously received packet"] + pub rxcrc: RXCRC, + #[doc = "0x410 - Device address match index"] + pub dai: DAI, + _reserved27: [u8; 0xf0], + #[doc = "0x504 - Packet pointer"] + pub packetptr: PACKETPTR, + #[doc = "0x508 - Frequency"] + pub frequency: FREQUENCY, + #[doc = "0x50c - Output power"] + pub txpower: TXPOWER, + #[doc = "0x510 - Data rate and modulation"] + pub mode: MODE, + #[doc = "0x514 - Packet configuration register 0"] + pub pcnf0: PCNF0, + #[doc = "0x518 - Packet configuration register 1"] + pub pcnf1: PCNF1, + #[doc = "0x51c - Base address 0"] + pub base0: BASE0, + #[doc = "0x520 - Base address 1"] + pub base1: BASE1, + #[doc = "0x524 - Prefixes bytes for logical addresses 0-3"] + pub prefix0: PREFIX0, + #[doc = "0x528 - Prefixes bytes for logical addresses 4-7"] + pub prefix1: PREFIX1, + #[doc = "0x52c - Transmit address select"] + pub txaddress: TXADDRESS, + #[doc = "0x530 - Receive address select"] + pub rxaddresses: RXADDRESSES, + #[doc = "0x534 - CRC configuration"] + pub crccnf: CRCCNF, + #[doc = "0x538 - CRC polynomial"] + pub crcpoly: CRCPOLY, + #[doc = "0x53c - CRC initial value"] + pub crcinit: CRCINIT, + _reserved42: [u8; 0x04], + #[doc = "0x544 - Inter Frame Spacing in us"] + pub tifs: TIFS, + #[doc = "0x548 - RSSI sample"] + pub rssisample: RSSISAMPLE, + _reserved44: [u8; 0x04], + #[doc = "0x550 - Current radio state"] + pub state: STATE, + #[doc = "0x554 - Data whitening initial value"] + pub datawhiteiv: DATAWHITEIV, + _reserved46: [u8; 0x08], + #[doc = "0x560 - Bit counter compare"] + pub bcc: BCC, + _reserved47: [u8; 0x9c], + #[doc = "0x600..0x620 - Description collection: Device address base segment n"] + pub dab: [DAB; 8], + #[doc = "0x620..0x640 - Description collection: Device address prefix n"] + pub dap: [DAP; 8], + #[doc = "0x640 - Device address match configuration"] + pub dacnf: DACNF, + _reserved50: [u8; 0x0c], + #[doc = "0x650 - Radio mode configuration register 0"] + pub modecnf0: MODECNF0, + _reserved51: [u8; 0x09a8], + #[doc = "0xffc - Peripheral power control"] + pub power: POWER, +} +#[doc = "TASKS_TXEN (w) register accessor: an alias for `Reg`"] +pub type TASKS_TXEN = crate::Reg; +#[doc = "Enable RADIO in TX mode"] +pub mod tasks_txen; +#[doc = "TASKS_RXEN (w) register accessor: an alias for `Reg`"] +pub type TASKS_RXEN = crate::Reg; +#[doc = "Enable RADIO in RX mode"] +pub mod tasks_rxen; +#[doc = "TASKS_START (w) register accessor: an alias for `Reg`"] +pub type TASKS_START = crate::Reg; +#[doc = "Start RADIO"] +pub mod tasks_start; +#[doc = "TASKS_STOP (w) register accessor: an alias for `Reg`"] +pub type TASKS_STOP = crate::Reg; +#[doc = "Stop RADIO"] +pub mod tasks_stop; +#[doc = "TASKS_DISABLE (w) register accessor: an alias for `Reg`"] +pub type TASKS_DISABLE = crate::Reg; +#[doc = "Disable RADIO"] +pub mod tasks_disable; +#[doc = "TASKS_RSSISTART (w) register accessor: an alias for `Reg`"] +pub type TASKS_RSSISTART = crate::Reg; +#[doc = "Start the RSSI and take one single sample of the receive signal strength."] +pub mod tasks_rssistart; +#[doc = "TASKS_RSSISTOP (w) register accessor: an alias for `Reg`"] +pub type TASKS_RSSISTOP = crate::Reg; +#[doc = "Stop the RSSI measurement"] +pub mod tasks_rssistop; +#[doc = "TASKS_BCSTART (w) register accessor: an alias for `Reg`"] +pub type TASKS_BCSTART = crate::Reg; +#[doc = "Start the bit counter"] +pub mod tasks_bcstart; +#[doc = "TASKS_BCSTOP (w) register accessor: an alias for `Reg`"] +pub type TASKS_BCSTOP = crate::Reg; +#[doc = "Stop the bit counter"] +pub mod tasks_bcstop; +#[doc = "EVENTS_READY (rw) register accessor: an alias for `Reg`"] +pub type EVENTS_READY = crate::Reg; +#[doc = "RADIO has ramped up and is ready to be started"] +pub mod events_ready; +#[doc = "EVENTS_ADDRESS (rw) register accessor: an alias for `Reg`"] +pub type EVENTS_ADDRESS = crate::Reg; +#[doc = "Address sent or received"] +pub mod events_address; +#[doc = "EVENTS_PAYLOAD (rw) register accessor: an alias for `Reg`"] +pub type EVENTS_PAYLOAD = crate::Reg; +#[doc = "Packet payload sent or received"] +pub mod events_payload; +#[doc = "EVENTS_END (rw) register accessor: an alias for `Reg`"] +pub type EVENTS_END = crate::Reg; +#[doc = "Packet sent or received"] +pub mod events_end; +#[doc = "EVENTS_DISABLED (rw) register accessor: an alias for `Reg`"] +pub type EVENTS_DISABLED = crate::Reg; +#[doc = "RADIO has been disabled"] +pub mod events_disabled; +#[doc = "EVENTS_DEVMATCH (rw) register accessor: an alias for `Reg`"] +pub type EVENTS_DEVMATCH = crate::Reg; +#[doc = "A device address match occurred on the last received packet"] +pub mod events_devmatch; +#[doc = "EVENTS_DEVMISS (rw) register accessor: an alias for `Reg`"] +pub type EVENTS_DEVMISS = crate::Reg; +#[doc = "No device address match occurred on the last received packet"] +pub mod events_devmiss; +#[doc = "EVENTS_RSSIEND (rw) register accessor: an alias for `Reg`"] +pub type EVENTS_RSSIEND = crate::Reg; +#[doc = "Sampling of receive signal strength complete."] +pub mod events_rssiend; +#[doc = "EVENTS_BCMATCH (rw) register accessor: an alias for `Reg`"] +pub type EVENTS_BCMATCH = crate::Reg; +#[doc = "Bit counter reached bit count value."] +pub mod events_bcmatch; +#[doc = "EVENTS_CRCOK (rw) register accessor: an alias for `Reg`"] +pub type EVENTS_CRCOK = crate::Reg; +#[doc = "Packet received with CRC ok"] +pub mod events_crcok; +#[doc = "EVENTS_CRCERROR (rw) register accessor: an alias for `Reg`"] +pub type EVENTS_CRCERROR = crate::Reg; +#[doc = "Packet received with CRC error"] +pub mod events_crcerror; +#[doc = "SHORTS (rw) register accessor: an alias for `Reg`"] +pub type SHORTS = crate::Reg; +#[doc = "Shortcuts between local events and tasks"] +pub mod shorts; +#[doc = "INTENSET (rw) register accessor: an alias for `Reg`"] +pub type INTENSET = crate::Reg; +#[doc = "Enable interrupt"] +pub mod intenset; +#[doc = "INTENCLR (rw) register accessor: an alias for `Reg`"] +pub type INTENCLR = crate::Reg; +#[doc = "Disable interrupt"] +pub mod intenclr; +#[doc = "CRCSTATUS (r) register accessor: an alias for `Reg`"] +pub type CRCSTATUS = crate::Reg; +#[doc = "CRC status"] +pub mod crcstatus; +#[doc = "RXMATCH (r) register accessor: an alias for `Reg`"] +pub type RXMATCH = crate::Reg; +#[doc = "Received address"] +pub mod rxmatch; +#[doc = "RXCRC (r) register accessor: an alias for `Reg`"] +pub type RXCRC = crate::Reg; +#[doc = "CRC field of previously received packet"] +pub mod rxcrc; +#[doc = "DAI (r) register accessor: an alias for `Reg`"] +pub type DAI = crate::Reg; +#[doc = "Device address match index"] +pub mod dai; +#[doc = "PACKETPTR (rw) register accessor: an alias for `Reg`"] +pub type PACKETPTR = crate::Reg; +#[doc = "Packet pointer"] +pub mod packetptr; +#[doc = "FREQUENCY (rw) register accessor: an alias for `Reg`"] +pub type FREQUENCY = crate::Reg; +#[doc = "Frequency"] +pub mod frequency; +#[doc = "TXPOWER (rw) register accessor: an alias for `Reg`"] +pub type TXPOWER = crate::Reg; +#[doc = "Output power"] +pub mod txpower; +#[doc = "MODE (rw) register accessor: an alias for `Reg`"] +pub type MODE = crate::Reg; +#[doc = "Data rate and modulation"] +pub mod mode; +#[doc = "PCNF0 (rw) register accessor: an alias for `Reg`"] +pub type PCNF0 = crate::Reg; +#[doc = "Packet configuration register 0"] +pub mod pcnf0; +#[doc = "PCNF1 (rw) register accessor: an alias for `Reg`"] +pub type PCNF1 = crate::Reg; +#[doc = "Packet configuration register 1"] +pub mod pcnf1; +#[doc = "BASE0 (rw) register accessor: an alias for `Reg`"] +pub type BASE0 = crate::Reg; +#[doc = "Base address 0"] +pub mod base0; +#[doc = "BASE1 (rw) register accessor: an alias for `Reg`"] +pub type BASE1 = crate::Reg; +#[doc = "Base address 1"] +pub mod base1; +#[doc = "PREFIX0 (rw) register accessor: an alias for `Reg`"] +pub type PREFIX0 = crate::Reg; +#[doc = "Prefixes bytes for logical addresses 0-3"] +pub mod prefix0; +#[doc = "PREFIX1 (rw) register accessor: an alias for `Reg`"] +pub type PREFIX1 = crate::Reg; +#[doc = "Prefixes bytes for logical addresses 4-7"] +pub mod prefix1; +#[doc = "TXADDRESS (rw) register accessor: an alias for `Reg`"] +pub type TXADDRESS = crate::Reg; +#[doc = "Transmit address select"] +pub mod txaddress; +#[doc = "RXADDRESSES (rw) register accessor: an alias for `Reg`"] +pub type RXADDRESSES = crate::Reg; +#[doc = "Receive address select"] +pub mod rxaddresses; +#[doc = "CRCCNF (rw) register accessor: an alias for `Reg`"] +pub type CRCCNF = crate::Reg; +#[doc = "CRC configuration"] +pub mod crccnf; +#[doc = "CRCPOLY (rw) register accessor: an alias for `Reg`"] +pub type CRCPOLY = crate::Reg; +#[doc = "CRC polynomial"] +pub mod crcpoly; +#[doc = "CRCINIT (rw) register accessor: an alias for `Reg`"] +pub type CRCINIT = crate::Reg; +#[doc = "CRC initial value"] +pub mod crcinit; +#[doc = "TIFS (rw) register accessor: an alias for `Reg`"] +pub type TIFS = crate::Reg; +#[doc = "Inter Frame Spacing in us"] +pub mod tifs; +#[doc = "RSSISAMPLE (r) register accessor: an alias for `Reg`"] +pub type RSSISAMPLE = crate::Reg; +#[doc = "RSSI sample"] +pub mod rssisample; +#[doc = "STATE (r) register accessor: an alias for `Reg`"] +pub type STATE = crate::Reg; +#[doc = "Current radio state"] +pub mod state; +#[doc = "DATAWHITEIV (rw) register accessor: an alias for `Reg`"] +pub type DATAWHITEIV = crate::Reg; +#[doc = "Data whitening initial value"] +pub mod datawhiteiv; +#[doc = "BCC (rw) register accessor: an alias for `Reg`"] +pub type BCC = crate::Reg; +#[doc = "Bit counter compare"] +pub mod bcc; +#[doc = "DAB (rw) register accessor: an alias for `Reg`"] +pub type DAB = crate::Reg; +#[doc = "Description collection: Device address base segment n"] +pub mod dab; +#[doc = "DAP (rw) register accessor: an alias for `Reg`"] +pub type DAP = crate::Reg; +#[doc = "Description collection: Device address prefix n"] +pub mod dap; +#[doc = "DACNF (rw) register accessor: an alias for `Reg`"] +pub type DACNF = crate::Reg; +#[doc = "Device address match configuration"] +pub mod dacnf; +#[doc = "MODECNF0 (rw) register accessor: an alias for `Reg`"] +pub type MODECNF0 = crate::Reg; +#[doc = "Radio mode configuration register 0"] +pub mod modecnf0; +#[doc = "POWER (rw) register accessor: an alias for `Reg`"] +pub type POWER = crate::Reg; +#[doc = "Peripheral power control"] +pub mod power; diff --git a/down-the-stack/dk_pac/src/radio/base0.rs b/down-the-stack/dk_pac/src/radio/base0.rs new file mode 100644 index 0000000..7f8c523 --- /dev/null +++ b/down-the-stack/dk_pac/src/radio/base0.rs @@ -0,0 +1,80 @@ +#[doc = "Register `BASE0` 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 `BASE0` 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 `BASE0` reader - Base address 0"] +pub type BASE0_R = crate::FieldReader; +#[doc = "Field `BASE0` writer - Base address 0"] +pub type BASE0_W<'a, const O: u8> = crate::FieldWriter<'a, u32, BASE0_SPEC, u32, u32, 32, O>; +impl R { + #[doc = "Bits 0:31 - Base address 0"] + #[inline(always)] + pub fn base0(&self) -> BASE0_R { + BASE0_R::new(self.bits) + } +} +impl W { + #[doc = "Bits 0:31 - Base address 0"] + #[inline(always)] + #[must_use] + pub fn base0(&mut self) -> BASE0_W<0> { + BASE0_W::new(self) + } + #[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 = "Base address 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 [base0](index.html) module"] +pub struct BASE0_SPEC; +impl crate::RegisterSpec for BASE0_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [base0::R](R) reader structure"] +impl crate::Readable for BASE0_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [base0::W](W) writer structure"] +impl crate::Writable for BASE0_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets BASE0 to value 0"] +impl crate::Resettable for BASE0_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/radio/base1.rs b/down-the-stack/dk_pac/src/radio/base1.rs new file mode 100644 index 0000000..0aa2e94 --- /dev/null +++ b/down-the-stack/dk_pac/src/radio/base1.rs @@ -0,0 +1,80 @@ +#[doc = "Register `BASE1` 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 `BASE1` 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 `BASE1` reader - Base address 1"] +pub type BASE1_R = crate::FieldReader; +#[doc = "Field `BASE1` writer - Base address 1"] +pub type BASE1_W<'a, const O: u8> = crate::FieldWriter<'a, u32, BASE1_SPEC, u32, u32, 32, O>; +impl R { + #[doc = "Bits 0:31 - Base address 1"] + #[inline(always)] + pub fn base1(&self) -> BASE1_R { + BASE1_R::new(self.bits) + } +} +impl W { + #[doc = "Bits 0:31 - Base address 1"] + #[inline(always)] + #[must_use] + pub fn base1(&mut self) -> BASE1_W<0> { + BASE1_W::new(self) + } + #[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 = "Base address 1\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 [base1](index.html) module"] +pub struct BASE1_SPEC; +impl crate::RegisterSpec for BASE1_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [base1::R](R) reader structure"] +impl crate::Readable for BASE1_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [base1::W](W) writer structure"] +impl crate::Writable for BASE1_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets BASE1 to value 0"] +impl crate::Resettable for BASE1_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/radio/bcc.rs b/down-the-stack/dk_pac/src/radio/bcc.rs new file mode 100644 index 0000000..bee2639 --- /dev/null +++ b/down-the-stack/dk_pac/src/radio/bcc.rs @@ -0,0 +1,80 @@ +#[doc = "Register `BCC` 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 `BCC` 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 `BCC` reader - Bit counter compare"] +pub type BCC_R = crate::FieldReader; +#[doc = "Field `BCC` writer - Bit counter compare"] +pub type BCC_W<'a, const O: u8> = crate::FieldWriter<'a, u32, BCC_SPEC, u32, u32, 32, O>; +impl R { + #[doc = "Bits 0:31 - Bit counter compare"] + #[inline(always)] + pub fn bcc(&self) -> BCC_R { + BCC_R::new(self.bits) + } +} +impl W { + #[doc = "Bits 0:31 - Bit counter compare"] + #[inline(always)] + #[must_use] + pub fn bcc(&mut self) -> BCC_W<0> { + BCC_W::new(self) + } + #[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 = "Bit counter compare\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 [bcc](index.html) module"] +pub struct BCC_SPEC; +impl crate::RegisterSpec for BCC_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [bcc::R](R) reader structure"] +impl crate::Readable for BCC_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [bcc::W](W) writer structure"] +impl crate::Writable for BCC_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets BCC to value 0"] +impl crate::Resettable for BCC_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/radio/crccnf.rs b/down-the-stack/dk_pac/src/radio/crccnf.rs new file mode 100644 index 0000000..f3a7e89 --- /dev/null +++ b/down-the-stack/dk_pac/src/radio/crccnf.rs @@ -0,0 +1,215 @@ +#[doc = "Register `CRCCNF` 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 `CRCCNF` 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 `LEN` reader - CRC length in number of bytes."] +pub type LEN_R = crate::FieldReader; +#[doc = "CRC length in number of bytes.\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +#[repr(u8)] +pub enum LEN_A { + #[doc = "0: CRC length is zero and CRC calculation is disabled"] + DISABLED = 0, + #[doc = "1: CRC length is one byte and CRC calculation is enabled"] + ONE = 1, + #[doc = "2: CRC length is two bytes and CRC calculation is enabled"] + TWO = 2, + #[doc = "3: CRC length is three bytes and CRC calculation is enabled"] + THREE = 3, +} +impl From for u8 { + #[inline(always)] + fn from(variant: LEN_A) -> Self { + variant as _ + } +} +impl LEN_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> LEN_A { + match self.bits { + 0 => LEN_A::DISABLED, + 1 => LEN_A::ONE, + 2 => LEN_A::TWO, + 3 => LEN_A::THREE, + _ => unreachable!(), + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == LEN_A::DISABLED + } + #[doc = "Checks if the value of the field is `ONE`"] + #[inline(always)] + pub fn is_one(&self) -> bool { + *self == LEN_A::ONE + } + #[doc = "Checks if the value of the field is `TWO`"] + #[inline(always)] + pub fn is_two(&self) -> bool { + *self == LEN_A::TWO + } + #[doc = "Checks if the value of the field is `THREE`"] + #[inline(always)] + pub fn is_three(&self) -> bool { + *self == LEN_A::THREE + } +} +#[doc = "Field `LEN` writer - CRC length in number of bytes."] +pub type LEN_W<'a, const O: u8> = crate::FieldWriterSafe<'a, u32, CRCCNF_SPEC, u8, LEN_A, 2, O>; +impl<'a, const O: u8> LEN_W<'a, O> { + #[doc = "CRC length is zero and CRC calculation is disabled"] + #[inline(always)] + pub fn disabled(self) -> &'a mut W { + self.variant(LEN_A::DISABLED) + } + #[doc = "CRC length is one byte and CRC calculation is enabled"] + #[inline(always)] + pub fn one(self) -> &'a mut W { + self.variant(LEN_A::ONE) + } + #[doc = "CRC length is two bytes and CRC calculation is enabled"] + #[inline(always)] + pub fn two(self) -> &'a mut W { + self.variant(LEN_A::TWO) + } + #[doc = "CRC length is three bytes and CRC calculation is enabled"] + #[inline(always)] + pub fn three(self) -> &'a mut W { + self.variant(LEN_A::THREE) + } +} +#[doc = "Field `SKIPADDR` reader - Include or exclude packet address field out of CRC calculation."] +pub type SKIPADDR_R = crate::BitReader; +#[doc = "Include or exclude packet address field out of CRC calculation.\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum SKIPADDR_A { + #[doc = "0: CRC calculation includes address field"] + INCLUDE = 0, + #[doc = "1: CRC calculation does not include address field. The CRC calculation will start at the first byte after the address."] + SKIP = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: SKIPADDR_A) -> Self { + variant as u8 != 0 + } +} +impl SKIPADDR_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> SKIPADDR_A { + match self.bits { + false => SKIPADDR_A::INCLUDE, + true => SKIPADDR_A::SKIP, + } + } + #[doc = "Checks if the value of the field is `INCLUDE`"] + #[inline(always)] + pub fn is_include(&self) -> bool { + *self == SKIPADDR_A::INCLUDE + } + #[doc = "Checks if the value of the field is `SKIP`"] + #[inline(always)] + pub fn is_skip(&self) -> bool { + *self == SKIPADDR_A::SKIP + } +} +#[doc = "Field `SKIPADDR` writer - Include or exclude packet address field out of CRC calculation."] +pub type SKIPADDR_W<'a, const O: u8> = crate::BitWriter<'a, u32, CRCCNF_SPEC, SKIPADDR_A, O>; +impl<'a, const O: u8> SKIPADDR_W<'a, O> { + #[doc = "CRC calculation includes address field"] + #[inline(always)] + pub fn include(self) -> &'a mut W { + self.variant(SKIPADDR_A::INCLUDE) + } + #[doc = "CRC calculation does not include address field. The CRC calculation will start at the first byte after the address."] + #[inline(always)] + pub fn skip(self) -> &'a mut W { + self.variant(SKIPADDR_A::SKIP) + } +} +impl R { + #[doc = "Bits 0:1 - CRC length in number of bytes."] + #[inline(always)] + pub fn len(&self) -> LEN_R { + LEN_R::new((self.bits & 3) as u8) + } + #[doc = "Bit 8 - Include or exclude packet address field out of CRC calculation."] + #[inline(always)] + pub fn skipaddr(&self) -> SKIPADDR_R { + SKIPADDR_R::new(((self.bits >> 8) & 1) != 0) + } +} +impl W { + #[doc = "Bits 0:1 - CRC length in number of bytes."] + #[inline(always)] + #[must_use] + pub fn len(&mut self) -> LEN_W<0> { + LEN_W::new(self) + } + #[doc = "Bit 8 - Include or exclude packet address field out of CRC calculation."] + #[inline(always)] + #[must_use] + pub fn skipaddr(&mut self) -> SKIPADDR_W<8> { + SKIPADDR_W::new(self) + } + #[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 = "CRC configuration\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 [crccnf](index.html) module"] +pub struct CRCCNF_SPEC; +impl crate::RegisterSpec for CRCCNF_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [crccnf::R](R) reader structure"] +impl crate::Readable for CRCCNF_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [crccnf::W](W) writer structure"] +impl crate::Writable for CRCCNF_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets CRCCNF to value 0"] +impl crate::Resettable for CRCCNF_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/radio/crcinit.rs b/down-the-stack/dk_pac/src/radio/crcinit.rs new file mode 100644 index 0000000..9ec8854 --- /dev/null +++ b/down-the-stack/dk_pac/src/radio/crcinit.rs @@ -0,0 +1,80 @@ +#[doc = "Register `CRCINIT` 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 `CRCINIT` 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 `CRCINIT` reader - CRC initial value"] +pub type CRCINIT_R = crate::FieldReader; +#[doc = "Field `CRCINIT` writer - CRC initial value"] +pub type CRCINIT_W<'a, const O: u8> = crate::FieldWriter<'a, u32, CRCINIT_SPEC, u32, u32, 24, O>; +impl R { + #[doc = "Bits 0:23 - CRC initial value"] + #[inline(always)] + pub fn crcinit(&self) -> CRCINIT_R { + CRCINIT_R::new(self.bits & 0x00ff_ffff) + } +} +impl W { + #[doc = "Bits 0:23 - CRC initial value"] + #[inline(always)] + #[must_use] + pub fn crcinit(&mut self) -> CRCINIT_W<0> { + CRCINIT_W::new(self) + } + #[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 = "CRC initial value\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 [crcinit](index.html) module"] +pub struct CRCINIT_SPEC; +impl crate::RegisterSpec for CRCINIT_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [crcinit::R](R) reader structure"] +impl crate::Readable for CRCINIT_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [crcinit::W](W) writer structure"] +impl crate::Writable for CRCINIT_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets CRCINIT to value 0"] +impl crate::Resettable for CRCINIT_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/radio/crcpoly.rs b/down-the-stack/dk_pac/src/radio/crcpoly.rs new file mode 100644 index 0000000..70d8e6c --- /dev/null +++ b/down-the-stack/dk_pac/src/radio/crcpoly.rs @@ -0,0 +1,80 @@ +#[doc = "Register `CRCPOLY` 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 `CRCPOLY` 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 `CRCPOLY` reader - CRC polynomial"] +pub type CRCPOLY_R = crate::FieldReader; +#[doc = "Field `CRCPOLY` writer - CRC polynomial"] +pub type CRCPOLY_W<'a, const O: u8> = crate::FieldWriter<'a, u32, CRCPOLY_SPEC, u32, u32, 24, O>; +impl R { + #[doc = "Bits 0:23 - CRC polynomial"] + #[inline(always)] + pub fn crcpoly(&self) -> CRCPOLY_R { + CRCPOLY_R::new(self.bits & 0x00ff_ffff) + } +} +impl W { + #[doc = "Bits 0:23 - CRC polynomial"] + #[inline(always)] + #[must_use] + pub fn crcpoly(&mut self) -> CRCPOLY_W<0> { + CRCPOLY_W::new(self) + } + #[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 = "CRC polynomial\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 [crcpoly](index.html) module"] +pub struct CRCPOLY_SPEC; +impl crate::RegisterSpec for CRCPOLY_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [crcpoly::R](R) reader structure"] +impl crate::Readable for CRCPOLY_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [crcpoly::W](W) writer structure"] +impl crate::Writable for CRCPOLY_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets CRCPOLY to value 0"] +impl crate::Resettable for CRCPOLY_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/radio/crcstatus.rs b/down-the-stack/dk_pac/src/radio/crcstatus.rs new file mode 100644 index 0000000..fad14e8 --- /dev/null +++ b/down-the-stack/dk_pac/src/radio/crcstatus.rs @@ -0,0 +1,71 @@ +#[doc = "Register `CRCSTATUS` 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 = "Field `CRCSTATUS` reader - CRC status of packet received"] +pub type CRCSTATUS_R = crate::BitReader; +#[doc = "CRC status of packet received\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum CRCSTATUS_A { + #[doc = "0: Packet received with CRC error"] + CRCERROR = 0, + #[doc = "1: Packet received with CRC ok"] + CRCOK = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: CRCSTATUS_A) -> Self { + variant as u8 != 0 + } +} +impl CRCSTATUS_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> CRCSTATUS_A { + match self.bits { + false => CRCSTATUS_A::CRCERROR, + true => CRCSTATUS_A::CRCOK, + } + } + #[doc = "Checks if the value of the field is `CRCERROR`"] + #[inline(always)] + pub fn is_crcerror(&self) -> bool { + *self == CRCSTATUS_A::CRCERROR + } + #[doc = "Checks if the value of the field is `CRCOK`"] + #[inline(always)] + pub fn is_crcok(&self) -> bool { + *self == CRCSTATUS_A::CRCOK + } +} +impl R { + #[doc = "Bit 0 - CRC status of packet received"] + #[inline(always)] + pub fn crcstatus(&self) -> CRCSTATUS_R { + CRCSTATUS_R::new((self.bits & 1) != 0) + } +} +#[doc = "CRC 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 [crcstatus](index.html) module"] +pub struct CRCSTATUS_SPEC; +impl crate::RegisterSpec for CRCSTATUS_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [crcstatus::R](R) reader structure"] +impl crate::Readable for CRCSTATUS_SPEC { + type Reader = R; +} +#[doc = "`reset()` method sets CRCSTATUS to value 0"] +impl crate::Resettable for CRCSTATUS_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/radio/dab.rs b/down-the-stack/dk_pac/src/radio/dab.rs new file mode 100644 index 0000000..feb65c0 --- /dev/null +++ b/down-the-stack/dk_pac/src/radio/dab.rs @@ -0,0 +1,81 @@ +#[doc = "Register `DAB[%s]` 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 `DAB[%s]` 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 `DAB` reader - Device address base segment n"] +pub type DAB_R = crate::FieldReader; +#[doc = "Field `DAB` writer - Device address base segment n"] +pub type DAB_W<'a, const O: u8> = crate::FieldWriter<'a, u32, DAB_SPEC, u32, u32, 32, O>; +impl R { + #[doc = "Bits 0:31 - Device address base segment n"] + #[inline(always)] + pub fn dab(&self) -> DAB_R { + DAB_R::new(self.bits) + } +} +impl W { + #[doc = "Bits 0:31 - Device address base segment n"] + #[inline(always)] + #[must_use] + pub fn dab(&mut self) -> DAB_W<0> { + DAB_W::new(self) + } + #[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 = "Description collection: Device address base segment n\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 [dab](index.html) module"] +pub struct DAB_SPEC; +impl crate::RegisterSpec for DAB_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [dab::R](R) reader structure"] +impl crate::Readable for DAB_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [dab::W](W) writer structure"] +impl crate::Writable for DAB_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets DAB[%s] +to value 0"] +impl crate::Resettable for DAB_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/radio/dacnf.rs b/down-the-stack/dk_pac/src/radio/dacnf.rs new file mode 100644 index 0000000..12af1a3 --- /dev/null +++ b/down-the-stack/dk_pac/src/radio/dacnf.rs @@ -0,0 +1,673 @@ +#[doc = "Register `DACNF` 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 `DACNF` 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 `ENA0` reader - Enable or disable device address matching using device address 0"] +pub type ENA0_R = crate::BitReader; +#[doc = "Enable or disable device address matching using device address 0\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum ENA0_A { + #[doc = "0: Disabled"] + DISABLED = 0, + #[doc = "1: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: ENA0_A) -> Self { + variant as u8 != 0 + } +} +impl ENA0_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> ENA0_A { + match self.bits { + false => ENA0_A::DISABLED, + true => ENA0_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == ENA0_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == ENA0_A::ENABLED + } +} +#[doc = "Field `ENA0` writer - Enable or disable device address matching using device address 0"] +pub type ENA0_W<'a, const O: u8> = crate::BitWriter<'a, u32, DACNF_SPEC, ENA0_A, O>; +impl<'a, const O: u8> ENA0_W<'a, O> { + #[doc = "Disabled"] + #[inline(always)] + pub fn disabled(self) -> &'a mut W { + self.variant(ENA0_A::DISABLED) + } + #[doc = "Enabled"] + #[inline(always)] + pub fn enabled(self) -> &'a mut W { + self.variant(ENA0_A::ENABLED) + } +} +#[doc = "Field `ENA1` reader - Enable or disable device address matching using device address 1"] +pub type ENA1_R = crate::BitReader; +#[doc = "Enable or disable device address matching using device address 1\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum ENA1_A { + #[doc = "0: Disabled"] + DISABLED = 0, + #[doc = "1: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: ENA1_A) -> Self { + variant as u8 != 0 + } +} +impl ENA1_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> ENA1_A { + match self.bits { + false => ENA1_A::DISABLED, + true => ENA1_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == ENA1_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == ENA1_A::ENABLED + } +} +#[doc = "Field `ENA1` writer - Enable or disable device address matching using device address 1"] +pub type ENA1_W<'a, const O: u8> = crate::BitWriter<'a, u32, DACNF_SPEC, ENA1_A, O>; +impl<'a, const O: u8> ENA1_W<'a, O> { + #[doc = "Disabled"] + #[inline(always)] + pub fn disabled(self) -> &'a mut W { + self.variant(ENA1_A::DISABLED) + } + #[doc = "Enabled"] + #[inline(always)] + pub fn enabled(self) -> &'a mut W { + self.variant(ENA1_A::ENABLED) + } +} +#[doc = "Field `ENA2` reader - Enable or disable device address matching using device address 2"] +pub type ENA2_R = crate::BitReader; +#[doc = "Enable or disable device address matching using device address 2\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum ENA2_A { + #[doc = "0: Disabled"] + DISABLED = 0, + #[doc = "1: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: ENA2_A) -> Self { + variant as u8 != 0 + } +} +impl ENA2_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> ENA2_A { + match self.bits { + false => ENA2_A::DISABLED, + true => ENA2_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == ENA2_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == ENA2_A::ENABLED + } +} +#[doc = "Field `ENA2` writer - Enable or disable device address matching using device address 2"] +pub type ENA2_W<'a, const O: u8> = crate::BitWriter<'a, u32, DACNF_SPEC, ENA2_A, O>; +impl<'a, const O: u8> ENA2_W<'a, O> { + #[doc = "Disabled"] + #[inline(always)] + pub fn disabled(self) -> &'a mut W { + self.variant(ENA2_A::DISABLED) + } + #[doc = "Enabled"] + #[inline(always)] + pub fn enabled(self) -> &'a mut W { + self.variant(ENA2_A::ENABLED) + } +} +#[doc = "Field `ENA3` reader - Enable or disable device address matching using device address 3"] +pub type ENA3_R = crate::BitReader; +#[doc = "Enable or disable device address matching using device address 3\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum ENA3_A { + #[doc = "0: Disabled"] + DISABLED = 0, + #[doc = "1: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: ENA3_A) -> Self { + variant as u8 != 0 + } +} +impl ENA3_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> ENA3_A { + match self.bits { + false => ENA3_A::DISABLED, + true => ENA3_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == ENA3_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == ENA3_A::ENABLED + } +} +#[doc = "Field `ENA3` writer - Enable or disable device address matching using device address 3"] +pub type ENA3_W<'a, const O: u8> = crate::BitWriter<'a, u32, DACNF_SPEC, ENA3_A, O>; +impl<'a, const O: u8> ENA3_W<'a, O> { + #[doc = "Disabled"] + #[inline(always)] + pub fn disabled(self) -> &'a mut W { + self.variant(ENA3_A::DISABLED) + } + #[doc = "Enabled"] + #[inline(always)] + pub fn enabled(self) -> &'a mut W { + self.variant(ENA3_A::ENABLED) + } +} +#[doc = "Field `ENA4` reader - Enable or disable device address matching using device address 4"] +pub type ENA4_R = crate::BitReader; +#[doc = "Enable or disable device address matching using device address 4\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum ENA4_A { + #[doc = "0: Disabled"] + DISABLED = 0, + #[doc = "1: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: ENA4_A) -> Self { + variant as u8 != 0 + } +} +impl ENA4_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> ENA4_A { + match self.bits { + false => ENA4_A::DISABLED, + true => ENA4_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == ENA4_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == ENA4_A::ENABLED + } +} +#[doc = "Field `ENA4` writer - Enable or disable device address matching using device address 4"] +pub type ENA4_W<'a, const O: u8> = crate::BitWriter<'a, u32, DACNF_SPEC, ENA4_A, O>; +impl<'a, const O: u8> ENA4_W<'a, O> { + #[doc = "Disabled"] + #[inline(always)] + pub fn disabled(self) -> &'a mut W { + self.variant(ENA4_A::DISABLED) + } + #[doc = "Enabled"] + #[inline(always)] + pub fn enabled(self) -> &'a mut W { + self.variant(ENA4_A::ENABLED) + } +} +#[doc = "Field `ENA5` reader - Enable or disable device address matching using device address 5"] +pub type ENA5_R = crate::BitReader; +#[doc = "Enable or disable device address matching using device address 5\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum ENA5_A { + #[doc = "0: Disabled"] + DISABLED = 0, + #[doc = "1: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: ENA5_A) -> Self { + variant as u8 != 0 + } +} +impl ENA5_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> ENA5_A { + match self.bits { + false => ENA5_A::DISABLED, + true => ENA5_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == ENA5_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == ENA5_A::ENABLED + } +} +#[doc = "Field `ENA5` writer - Enable or disable device address matching using device address 5"] +pub type ENA5_W<'a, const O: u8> = crate::BitWriter<'a, u32, DACNF_SPEC, ENA5_A, O>; +impl<'a, const O: u8> ENA5_W<'a, O> { + #[doc = "Disabled"] + #[inline(always)] + pub fn disabled(self) -> &'a mut W { + self.variant(ENA5_A::DISABLED) + } + #[doc = "Enabled"] + #[inline(always)] + pub fn enabled(self) -> &'a mut W { + self.variant(ENA5_A::ENABLED) + } +} +#[doc = "Field `ENA6` reader - Enable or disable device address matching using device address 6"] +pub type ENA6_R = crate::BitReader; +#[doc = "Enable or disable device address matching using device address 6\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum ENA6_A { + #[doc = "0: Disabled"] + DISABLED = 0, + #[doc = "1: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: ENA6_A) -> Self { + variant as u8 != 0 + } +} +impl ENA6_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> ENA6_A { + match self.bits { + false => ENA6_A::DISABLED, + true => ENA6_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == ENA6_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == ENA6_A::ENABLED + } +} +#[doc = "Field `ENA6` writer - Enable or disable device address matching using device address 6"] +pub type ENA6_W<'a, const O: u8> = crate::BitWriter<'a, u32, DACNF_SPEC, ENA6_A, O>; +impl<'a, const O: u8> ENA6_W<'a, O> { + #[doc = "Disabled"] + #[inline(always)] + pub fn disabled(self) -> &'a mut W { + self.variant(ENA6_A::DISABLED) + } + #[doc = "Enabled"] + #[inline(always)] + pub fn enabled(self) -> &'a mut W { + self.variant(ENA6_A::ENABLED) + } +} +#[doc = "Field `ENA7` reader - Enable or disable device address matching using device address 7"] +pub type ENA7_R = crate::BitReader; +#[doc = "Enable or disable device address matching using device address 7\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum ENA7_A { + #[doc = "0: Disabled"] + DISABLED = 0, + #[doc = "1: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: ENA7_A) -> Self { + variant as u8 != 0 + } +} +impl ENA7_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> ENA7_A { + match self.bits { + false => ENA7_A::DISABLED, + true => ENA7_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == ENA7_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == ENA7_A::ENABLED + } +} +#[doc = "Field `ENA7` writer - Enable or disable device address matching using device address 7"] +pub type ENA7_W<'a, const O: u8> = crate::BitWriter<'a, u32, DACNF_SPEC, ENA7_A, O>; +impl<'a, const O: u8> ENA7_W<'a, O> { + #[doc = "Disabled"] + #[inline(always)] + pub fn disabled(self) -> &'a mut W { + self.variant(ENA7_A::DISABLED) + } + #[doc = "Enabled"] + #[inline(always)] + pub fn enabled(self) -> &'a mut W { + self.variant(ENA7_A::ENABLED) + } +} +#[doc = "Field `TXADD0` reader - TxAdd for device address 0"] +pub type TXADD0_R = crate::BitReader; +#[doc = "Field `TXADD0` writer - TxAdd for device address 0"] +pub type TXADD0_W<'a, const O: u8> = crate::BitWriter<'a, u32, DACNF_SPEC, bool, O>; +#[doc = "Field `TXADD1` reader - TxAdd for device address 1"] +pub type TXADD1_R = crate::BitReader; +#[doc = "Field `TXADD1` writer - TxAdd for device address 1"] +pub type TXADD1_W<'a, const O: u8> = crate::BitWriter<'a, u32, DACNF_SPEC, bool, O>; +#[doc = "Field `TXADD2` reader - TxAdd for device address 2"] +pub type TXADD2_R = crate::BitReader; +#[doc = "Field `TXADD2` writer - TxAdd for device address 2"] +pub type TXADD2_W<'a, const O: u8> = crate::BitWriter<'a, u32, DACNF_SPEC, bool, O>; +#[doc = "Field `TXADD3` reader - TxAdd for device address 3"] +pub type TXADD3_R = crate::BitReader; +#[doc = "Field `TXADD3` writer - TxAdd for device address 3"] +pub type TXADD3_W<'a, const O: u8> = crate::BitWriter<'a, u32, DACNF_SPEC, bool, O>; +#[doc = "Field `TXADD4` reader - TxAdd for device address 4"] +pub type TXADD4_R = crate::BitReader; +#[doc = "Field `TXADD4` writer - TxAdd for device address 4"] +pub type TXADD4_W<'a, const O: u8> = crate::BitWriter<'a, u32, DACNF_SPEC, bool, O>; +#[doc = "Field `TXADD5` reader - TxAdd for device address 5"] +pub type TXADD5_R = crate::BitReader; +#[doc = "Field `TXADD5` writer - TxAdd for device address 5"] +pub type TXADD5_W<'a, const O: u8> = crate::BitWriter<'a, u32, DACNF_SPEC, bool, O>; +#[doc = "Field `TXADD6` reader - TxAdd for device address 6"] +pub type TXADD6_R = crate::BitReader; +#[doc = "Field `TXADD6` writer - TxAdd for device address 6"] +pub type TXADD6_W<'a, const O: u8> = crate::BitWriter<'a, u32, DACNF_SPEC, bool, O>; +#[doc = "Field `TXADD7` reader - TxAdd for device address 7"] +pub type TXADD7_R = crate::BitReader; +#[doc = "Field `TXADD7` writer - TxAdd for device address 7"] +pub type TXADD7_W<'a, const O: u8> = crate::BitWriter<'a, u32, DACNF_SPEC, bool, O>; +impl R { + #[doc = "Bit 0 - Enable or disable device address matching using device address 0"] + #[inline(always)] + pub fn ena0(&self) -> ENA0_R { + ENA0_R::new((self.bits & 1) != 0) + } + #[doc = "Bit 1 - Enable or disable device address matching using device address 1"] + #[inline(always)] + pub fn ena1(&self) -> ENA1_R { + ENA1_R::new(((self.bits >> 1) & 1) != 0) + } + #[doc = "Bit 2 - Enable or disable device address matching using device address 2"] + #[inline(always)] + pub fn ena2(&self) -> ENA2_R { + ENA2_R::new(((self.bits >> 2) & 1) != 0) + } + #[doc = "Bit 3 - Enable or disable device address matching using device address 3"] + #[inline(always)] + pub fn ena3(&self) -> ENA3_R { + ENA3_R::new(((self.bits >> 3) & 1) != 0) + } + #[doc = "Bit 4 - Enable or disable device address matching using device address 4"] + #[inline(always)] + pub fn ena4(&self) -> ENA4_R { + ENA4_R::new(((self.bits >> 4) & 1) != 0) + } + #[doc = "Bit 5 - Enable or disable device address matching using device address 5"] + #[inline(always)] + pub fn ena5(&self) -> ENA5_R { + ENA5_R::new(((self.bits >> 5) & 1) != 0) + } + #[doc = "Bit 6 - Enable or disable device address matching using device address 6"] + #[inline(always)] + pub fn ena6(&self) -> ENA6_R { + ENA6_R::new(((self.bits >> 6) & 1) != 0) + } + #[doc = "Bit 7 - Enable or disable device address matching using device address 7"] + #[inline(always)] + pub fn ena7(&self) -> ENA7_R { + ENA7_R::new(((self.bits >> 7) & 1) != 0) + } + #[doc = "Bit 8 - TxAdd for device address 0"] + #[inline(always)] + pub fn txadd0(&self) -> TXADD0_R { + TXADD0_R::new(((self.bits >> 8) & 1) != 0) + } + #[doc = "Bit 9 - TxAdd for device address 1"] + #[inline(always)] + pub fn txadd1(&self) -> TXADD1_R { + TXADD1_R::new(((self.bits >> 9) & 1) != 0) + } + #[doc = "Bit 10 - TxAdd for device address 2"] + #[inline(always)] + pub fn txadd2(&self) -> TXADD2_R { + TXADD2_R::new(((self.bits >> 10) & 1) != 0) + } + #[doc = "Bit 11 - TxAdd for device address 3"] + #[inline(always)] + pub fn txadd3(&self) -> TXADD3_R { + TXADD3_R::new(((self.bits >> 11) & 1) != 0) + } + #[doc = "Bit 12 - TxAdd for device address 4"] + #[inline(always)] + pub fn txadd4(&self) -> TXADD4_R { + TXADD4_R::new(((self.bits >> 12) & 1) != 0) + } + #[doc = "Bit 13 - TxAdd for device address 5"] + #[inline(always)] + pub fn txadd5(&self) -> TXADD5_R { + TXADD5_R::new(((self.bits >> 13) & 1) != 0) + } + #[doc = "Bit 14 - TxAdd for device address 6"] + #[inline(always)] + pub fn txadd6(&self) -> TXADD6_R { + TXADD6_R::new(((self.bits >> 14) & 1) != 0) + } + #[doc = "Bit 15 - TxAdd for device address 7"] + #[inline(always)] + pub fn txadd7(&self) -> TXADD7_R { + TXADD7_R::new(((self.bits >> 15) & 1) != 0) + } +} +impl W { + #[doc = "Bit 0 - Enable or disable device address matching using device address 0"] + #[inline(always)] + #[must_use] + pub fn ena0(&mut self) -> ENA0_W<0> { + ENA0_W::new(self) + } + #[doc = "Bit 1 - Enable or disable device address matching using device address 1"] + #[inline(always)] + #[must_use] + pub fn ena1(&mut self) -> ENA1_W<1> { + ENA1_W::new(self) + } + #[doc = "Bit 2 - Enable or disable device address matching using device address 2"] + #[inline(always)] + #[must_use] + pub fn ena2(&mut self) -> ENA2_W<2> { + ENA2_W::new(self) + } + #[doc = "Bit 3 - Enable or disable device address matching using device address 3"] + #[inline(always)] + #[must_use] + pub fn ena3(&mut self) -> ENA3_W<3> { + ENA3_W::new(self) + } + #[doc = "Bit 4 - Enable or disable device address matching using device address 4"] + #[inline(always)] + #[must_use] + pub fn ena4(&mut self) -> ENA4_W<4> { + ENA4_W::new(self) + } + #[doc = "Bit 5 - Enable or disable device address matching using device address 5"] + #[inline(always)] + #[must_use] + pub fn ena5(&mut self) -> ENA5_W<5> { + ENA5_W::new(self) + } + #[doc = "Bit 6 - Enable or disable device address matching using device address 6"] + #[inline(always)] + #[must_use] + pub fn ena6(&mut self) -> ENA6_W<6> { + ENA6_W::new(self) + } + #[doc = "Bit 7 - Enable or disable device address matching using device address 7"] + #[inline(always)] + #[must_use] + pub fn ena7(&mut self) -> ENA7_W<7> { + ENA7_W::new(self) + } + #[doc = "Bit 8 - TxAdd for device address 0"] + #[inline(always)] + #[must_use] + pub fn txadd0(&mut self) -> TXADD0_W<8> { + TXADD0_W::new(self) + } + #[doc = "Bit 9 - TxAdd for device address 1"] + #[inline(always)] + #[must_use] + pub fn txadd1(&mut self) -> TXADD1_W<9> { + TXADD1_W::new(self) + } + #[doc = "Bit 10 - TxAdd for device address 2"] + #[inline(always)] + #[must_use] + pub fn txadd2(&mut self) -> TXADD2_W<10> { + TXADD2_W::new(self) + } + #[doc = "Bit 11 - TxAdd for device address 3"] + #[inline(always)] + #[must_use] + pub fn txadd3(&mut self) -> TXADD3_W<11> { + TXADD3_W::new(self) + } + #[doc = "Bit 12 - TxAdd for device address 4"] + #[inline(always)] + #[must_use] + pub fn txadd4(&mut self) -> TXADD4_W<12> { + TXADD4_W::new(self) + } + #[doc = "Bit 13 - TxAdd for device address 5"] + #[inline(always)] + #[must_use] + pub fn txadd5(&mut self) -> TXADD5_W<13> { + TXADD5_W::new(self) + } + #[doc = "Bit 14 - TxAdd for device address 6"] + #[inline(always)] + #[must_use] + pub fn txadd6(&mut self) -> TXADD6_W<14> { + TXADD6_W::new(self) + } + #[doc = "Bit 15 - TxAdd for device address 7"] + #[inline(always)] + #[must_use] + pub fn txadd7(&mut self) -> TXADD7_W<15> { + TXADD7_W::new(self) + } + #[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 = "Device address match configuration\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 [dacnf](index.html) module"] +pub struct DACNF_SPEC; +impl crate::RegisterSpec for DACNF_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [dacnf::R](R) reader structure"] +impl crate::Readable for DACNF_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [dacnf::W](W) writer structure"] +impl crate::Writable for DACNF_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets DACNF to value 0"] +impl crate::Resettable for DACNF_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/radio/dai.rs b/down-the-stack/dk_pac/src/radio/dai.rs new file mode 100644 index 0000000..6cdd197 --- /dev/null +++ b/down-the-stack/dk_pac/src/radio/dai.rs @@ -0,0 +1,37 @@ +#[doc = "Register `DAI` 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 = "Field `DAI` reader - Device address match index"] +pub type DAI_R = crate::FieldReader; +impl R { + #[doc = "Bits 0:2 - Device address match index"] + #[inline(always)] + pub fn dai(&self) -> DAI_R { + DAI_R::new((self.bits & 7) as u8) + } +} +#[doc = "Device address match index\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 [dai](index.html) module"] +pub struct DAI_SPEC; +impl crate::RegisterSpec for DAI_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [dai::R](R) reader structure"] +impl crate::Readable for DAI_SPEC { + type Reader = R; +} +#[doc = "`reset()` method sets DAI to value 0"] +impl crate::Resettable for DAI_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/radio/dap.rs b/down-the-stack/dk_pac/src/radio/dap.rs new file mode 100644 index 0000000..f1e40a9 --- /dev/null +++ b/down-the-stack/dk_pac/src/radio/dap.rs @@ -0,0 +1,81 @@ +#[doc = "Register `DAP[%s]` 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 `DAP[%s]` 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 `DAP` reader - Device address prefix n"] +pub type DAP_R = crate::FieldReader; +#[doc = "Field `DAP` writer - Device address prefix n"] +pub type DAP_W<'a, const O: u8> = crate::FieldWriter<'a, u32, DAP_SPEC, u16, u16, 16, O>; +impl R { + #[doc = "Bits 0:15 - Device address prefix n"] + #[inline(always)] + pub fn dap(&self) -> DAP_R { + DAP_R::new((self.bits & 0xffff) as u16) + } +} +impl W { + #[doc = "Bits 0:15 - Device address prefix n"] + #[inline(always)] + #[must_use] + pub fn dap(&mut self) -> DAP_W<0> { + DAP_W::new(self) + } + #[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 = "Description collection: Device address prefix n\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 [dap](index.html) module"] +pub struct DAP_SPEC; +impl crate::RegisterSpec for DAP_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [dap::R](R) reader structure"] +impl crate::Readable for DAP_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [dap::W](W) writer structure"] +impl crate::Writable for DAP_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets DAP[%s] +to value 0"] +impl crate::Resettable for DAP_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/radio/datawhiteiv.rs b/down-the-stack/dk_pac/src/radio/datawhiteiv.rs new file mode 100644 index 0000000..0d572c1 --- /dev/null +++ b/down-the-stack/dk_pac/src/radio/datawhiteiv.rs @@ -0,0 +1,81 @@ +#[doc = "Register `DATAWHITEIV` 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 `DATAWHITEIV` 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 `DATAWHITEIV` reader - Data whitening initial value. Bit 6 is hard-wired to '1', writing '0' to it has no effect, and it will always be read back and used by the device as '1'."] +pub type DATAWHITEIV_R = crate::FieldReader; +#[doc = "Field `DATAWHITEIV` writer - Data whitening initial value. Bit 6 is hard-wired to '1', writing '0' to it has no effect, and it will always be read back and used by the device as '1'."] +pub type DATAWHITEIV_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, DATAWHITEIV_SPEC, u8, u8, 7, O>; +impl R { + #[doc = "Bits 0:6 - Data whitening initial value. Bit 6 is hard-wired to '1', writing '0' to it has no effect, and it will always be read back and used by the device as '1'."] + #[inline(always)] + pub fn datawhiteiv(&self) -> DATAWHITEIV_R { + DATAWHITEIV_R::new((self.bits & 0x7f) as u8) + } +} +impl W { + #[doc = "Bits 0:6 - Data whitening initial value. Bit 6 is hard-wired to '1', writing '0' to it has no effect, and it will always be read back and used by the device as '1'."] + #[inline(always)] + #[must_use] + pub fn datawhiteiv(&mut self) -> DATAWHITEIV_W<0> { + DATAWHITEIV_W::new(self) + } + #[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 = "Data whitening initial value\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 [datawhiteiv](index.html) module"] +pub struct DATAWHITEIV_SPEC; +impl crate::RegisterSpec for DATAWHITEIV_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [datawhiteiv::R](R) reader structure"] +impl crate::Readable for DATAWHITEIV_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [datawhiteiv::W](W) writer structure"] +impl crate::Writable for DATAWHITEIV_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets DATAWHITEIV to value 0x40"] +impl crate::Resettable for DATAWHITEIV_SPEC { + const RESET_VALUE: Self::Ux = 0x40; +} diff --git a/down-the-stack/dk_pac/src/radio/events_address.rs b/down-the-stack/dk_pac/src/radio/events_address.rs new file mode 100644 index 0000000..6f0e928 --- /dev/null +++ b/down-the-stack/dk_pac/src/radio/events_address.rs @@ -0,0 +1,127 @@ +#[doc = "Register `EVENTS_ADDRESS` 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 `EVENTS_ADDRESS` 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 `EVENTS_ADDRESS` reader - Address sent or received"] +pub type EVENTS_ADDRESS_R = crate::BitReader; +#[doc = "Address sent or received\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum EVENTS_ADDRESS_A { + #[doc = "0: Event not generated"] + NOT_GENERATED = 0, + #[doc = "1: Event generated"] + GENERATED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: EVENTS_ADDRESS_A) -> Self { + variant as u8 != 0 + } +} +impl EVENTS_ADDRESS_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> EVENTS_ADDRESS_A { + match self.bits { + false => EVENTS_ADDRESS_A::NOT_GENERATED, + true => EVENTS_ADDRESS_A::GENERATED, + } + } + #[doc = "Checks if the value of the field is `NOT_GENERATED`"] + #[inline(always)] + pub fn is_not_generated(&self) -> bool { + *self == EVENTS_ADDRESS_A::NOT_GENERATED + } + #[doc = "Checks if the value of the field is `GENERATED`"] + #[inline(always)] + pub fn is_generated(&self) -> bool { + *self == EVENTS_ADDRESS_A::GENERATED + } +} +#[doc = "Field `EVENTS_ADDRESS` writer - Address sent or received"] +pub type EVENTS_ADDRESS_W<'a, const O: u8> = + crate::BitWriter<'a, u32, EVENTS_ADDRESS_SPEC, EVENTS_ADDRESS_A, O>; +impl<'a, const O: u8> EVENTS_ADDRESS_W<'a, O> { + #[doc = "Event not generated"] + #[inline(always)] + pub fn not_generated(self) -> &'a mut W { + self.variant(EVENTS_ADDRESS_A::NOT_GENERATED) + } + #[doc = "Event generated"] + #[inline(always)] + pub fn generated(self) -> &'a mut W { + self.variant(EVENTS_ADDRESS_A::GENERATED) + } +} +impl R { + #[doc = "Bit 0 - Address sent or received"] + #[inline(always)] + pub fn events_address(&self) -> EVENTS_ADDRESS_R { + EVENTS_ADDRESS_R::new((self.bits & 1) != 0) + } +} +impl W { + #[doc = "Bit 0 - Address sent or received"] + #[inline(always)] + #[must_use] + pub fn events_address(&mut self) -> EVENTS_ADDRESS_W<0> { + EVENTS_ADDRESS_W::new(self) + } + #[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 = "Address sent or received\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 [events_address](index.html) module"] +pub struct EVENTS_ADDRESS_SPEC; +impl crate::RegisterSpec for EVENTS_ADDRESS_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [events_address::R](R) reader structure"] +impl crate::Readable for EVENTS_ADDRESS_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [events_address::W](W) writer structure"] +impl crate::Writable for EVENTS_ADDRESS_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets EVENTS_ADDRESS to value 0"] +impl crate::Resettable for EVENTS_ADDRESS_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/radio/events_bcmatch.rs b/down-the-stack/dk_pac/src/radio/events_bcmatch.rs new file mode 100644 index 0000000..4d459a1 --- /dev/null +++ b/down-the-stack/dk_pac/src/radio/events_bcmatch.rs @@ -0,0 +1,127 @@ +#[doc = "Register `EVENTS_BCMATCH` 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 `EVENTS_BCMATCH` 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 `EVENTS_BCMATCH` reader - Bit counter reached bit count value."] +pub type EVENTS_BCMATCH_R = crate::BitReader; +#[doc = "Bit counter reached bit count value.\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum EVENTS_BCMATCH_A { + #[doc = "0: Event not generated"] + NOT_GENERATED = 0, + #[doc = "1: Event generated"] + GENERATED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: EVENTS_BCMATCH_A) -> Self { + variant as u8 != 0 + } +} +impl EVENTS_BCMATCH_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> EVENTS_BCMATCH_A { + match self.bits { + false => EVENTS_BCMATCH_A::NOT_GENERATED, + true => EVENTS_BCMATCH_A::GENERATED, + } + } + #[doc = "Checks if the value of the field is `NOT_GENERATED`"] + #[inline(always)] + pub fn is_not_generated(&self) -> bool { + *self == EVENTS_BCMATCH_A::NOT_GENERATED + } + #[doc = "Checks if the value of the field is `GENERATED`"] + #[inline(always)] + pub fn is_generated(&self) -> bool { + *self == EVENTS_BCMATCH_A::GENERATED + } +} +#[doc = "Field `EVENTS_BCMATCH` writer - Bit counter reached bit count value."] +pub type EVENTS_BCMATCH_W<'a, const O: u8> = + crate::BitWriter<'a, u32, EVENTS_BCMATCH_SPEC, EVENTS_BCMATCH_A, O>; +impl<'a, const O: u8> EVENTS_BCMATCH_W<'a, O> { + #[doc = "Event not generated"] + #[inline(always)] + pub fn not_generated(self) -> &'a mut W { + self.variant(EVENTS_BCMATCH_A::NOT_GENERATED) + } + #[doc = "Event generated"] + #[inline(always)] + pub fn generated(self) -> &'a mut W { + self.variant(EVENTS_BCMATCH_A::GENERATED) + } +} +impl R { + #[doc = "Bit 0 - Bit counter reached bit count value."] + #[inline(always)] + pub fn events_bcmatch(&self) -> EVENTS_BCMATCH_R { + EVENTS_BCMATCH_R::new((self.bits & 1) != 0) + } +} +impl W { + #[doc = "Bit 0 - Bit counter reached bit count value."] + #[inline(always)] + #[must_use] + pub fn events_bcmatch(&mut self) -> EVENTS_BCMATCH_W<0> { + EVENTS_BCMATCH_W::new(self) + } + #[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 = "Bit counter reached bit count value.\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 [events_bcmatch](index.html) module"] +pub struct EVENTS_BCMATCH_SPEC; +impl crate::RegisterSpec for EVENTS_BCMATCH_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [events_bcmatch::R](R) reader structure"] +impl crate::Readable for EVENTS_BCMATCH_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [events_bcmatch::W](W) writer structure"] +impl crate::Writable for EVENTS_BCMATCH_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets EVENTS_BCMATCH to value 0"] +impl crate::Resettable for EVENTS_BCMATCH_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/radio/events_crcerror.rs b/down-the-stack/dk_pac/src/radio/events_crcerror.rs new file mode 100644 index 0000000..c6f3da0 --- /dev/null +++ b/down-the-stack/dk_pac/src/radio/events_crcerror.rs @@ -0,0 +1,127 @@ +#[doc = "Register `EVENTS_CRCERROR` 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 `EVENTS_CRCERROR` 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 `EVENTS_CRCERROR` reader - Packet received with CRC error"] +pub type EVENTS_CRCERROR_R = crate::BitReader; +#[doc = "Packet received with CRC error\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum EVENTS_CRCERROR_A { + #[doc = "0: Event not generated"] + NOT_GENERATED = 0, + #[doc = "1: Event generated"] + GENERATED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: EVENTS_CRCERROR_A) -> Self { + variant as u8 != 0 + } +} +impl EVENTS_CRCERROR_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> EVENTS_CRCERROR_A { + match self.bits { + false => EVENTS_CRCERROR_A::NOT_GENERATED, + true => EVENTS_CRCERROR_A::GENERATED, + } + } + #[doc = "Checks if the value of the field is `NOT_GENERATED`"] + #[inline(always)] + pub fn is_not_generated(&self) -> bool { + *self == EVENTS_CRCERROR_A::NOT_GENERATED + } + #[doc = "Checks if the value of the field is `GENERATED`"] + #[inline(always)] + pub fn is_generated(&self) -> bool { + *self == EVENTS_CRCERROR_A::GENERATED + } +} +#[doc = "Field `EVENTS_CRCERROR` writer - Packet received with CRC error"] +pub type EVENTS_CRCERROR_W<'a, const O: u8> = + crate::BitWriter<'a, u32, EVENTS_CRCERROR_SPEC, EVENTS_CRCERROR_A, O>; +impl<'a, const O: u8> EVENTS_CRCERROR_W<'a, O> { + #[doc = "Event not generated"] + #[inline(always)] + pub fn not_generated(self) -> &'a mut W { + self.variant(EVENTS_CRCERROR_A::NOT_GENERATED) + } + #[doc = "Event generated"] + #[inline(always)] + pub fn generated(self) -> &'a mut W { + self.variant(EVENTS_CRCERROR_A::GENERATED) + } +} +impl R { + #[doc = "Bit 0 - Packet received with CRC error"] + #[inline(always)] + pub fn events_crcerror(&self) -> EVENTS_CRCERROR_R { + EVENTS_CRCERROR_R::new((self.bits & 1) != 0) + } +} +impl W { + #[doc = "Bit 0 - Packet received with CRC error"] + #[inline(always)] + #[must_use] + pub fn events_crcerror(&mut self) -> EVENTS_CRCERROR_W<0> { + EVENTS_CRCERROR_W::new(self) + } + #[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 = "Packet received with CRC error\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 [events_crcerror](index.html) module"] +pub struct EVENTS_CRCERROR_SPEC; +impl crate::RegisterSpec for EVENTS_CRCERROR_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [events_crcerror::R](R) reader structure"] +impl crate::Readable for EVENTS_CRCERROR_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [events_crcerror::W](W) writer structure"] +impl crate::Writable for EVENTS_CRCERROR_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets EVENTS_CRCERROR to value 0"] +impl crate::Resettable for EVENTS_CRCERROR_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/radio/events_crcok.rs b/down-the-stack/dk_pac/src/radio/events_crcok.rs new file mode 100644 index 0000000..964d355 --- /dev/null +++ b/down-the-stack/dk_pac/src/radio/events_crcok.rs @@ -0,0 +1,127 @@ +#[doc = "Register `EVENTS_CRCOK` 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 `EVENTS_CRCOK` 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 `EVENTS_CRCOK` reader - Packet received with CRC ok"] +pub type EVENTS_CRCOK_R = crate::BitReader; +#[doc = "Packet received with CRC ok\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum EVENTS_CRCOK_A { + #[doc = "0: Event not generated"] + NOT_GENERATED = 0, + #[doc = "1: Event generated"] + GENERATED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: EVENTS_CRCOK_A) -> Self { + variant as u8 != 0 + } +} +impl EVENTS_CRCOK_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> EVENTS_CRCOK_A { + match self.bits { + false => EVENTS_CRCOK_A::NOT_GENERATED, + true => EVENTS_CRCOK_A::GENERATED, + } + } + #[doc = "Checks if the value of the field is `NOT_GENERATED`"] + #[inline(always)] + pub fn is_not_generated(&self) -> bool { + *self == EVENTS_CRCOK_A::NOT_GENERATED + } + #[doc = "Checks if the value of the field is `GENERATED`"] + #[inline(always)] + pub fn is_generated(&self) -> bool { + *self == EVENTS_CRCOK_A::GENERATED + } +} +#[doc = "Field `EVENTS_CRCOK` writer - Packet received with CRC ok"] +pub type EVENTS_CRCOK_W<'a, const O: u8> = + crate::BitWriter<'a, u32, EVENTS_CRCOK_SPEC, EVENTS_CRCOK_A, O>; +impl<'a, const O: u8> EVENTS_CRCOK_W<'a, O> { + #[doc = "Event not generated"] + #[inline(always)] + pub fn not_generated(self) -> &'a mut W { + self.variant(EVENTS_CRCOK_A::NOT_GENERATED) + } + #[doc = "Event generated"] + #[inline(always)] + pub fn generated(self) -> &'a mut W { + self.variant(EVENTS_CRCOK_A::GENERATED) + } +} +impl R { + #[doc = "Bit 0 - Packet received with CRC ok"] + #[inline(always)] + pub fn events_crcok(&self) -> EVENTS_CRCOK_R { + EVENTS_CRCOK_R::new((self.bits & 1) != 0) + } +} +impl W { + #[doc = "Bit 0 - Packet received with CRC ok"] + #[inline(always)] + #[must_use] + pub fn events_crcok(&mut self) -> EVENTS_CRCOK_W<0> { + EVENTS_CRCOK_W::new(self) + } + #[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 = "Packet received with CRC ok\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 [events_crcok](index.html) module"] +pub struct EVENTS_CRCOK_SPEC; +impl crate::RegisterSpec for EVENTS_CRCOK_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [events_crcok::R](R) reader structure"] +impl crate::Readable for EVENTS_CRCOK_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [events_crcok::W](W) writer structure"] +impl crate::Writable for EVENTS_CRCOK_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets EVENTS_CRCOK to value 0"] +impl crate::Resettable for EVENTS_CRCOK_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/radio/events_devmatch.rs b/down-the-stack/dk_pac/src/radio/events_devmatch.rs new file mode 100644 index 0000000..79669e6 --- /dev/null +++ b/down-the-stack/dk_pac/src/radio/events_devmatch.rs @@ -0,0 +1,127 @@ +#[doc = "Register `EVENTS_DEVMATCH` 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 `EVENTS_DEVMATCH` 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 `EVENTS_DEVMATCH` reader - A device address match occurred on the last received packet"] +pub type EVENTS_DEVMATCH_R = crate::BitReader; +#[doc = "A device address match occurred on the last received packet\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum EVENTS_DEVMATCH_A { + #[doc = "0: Event not generated"] + NOT_GENERATED = 0, + #[doc = "1: Event generated"] + GENERATED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: EVENTS_DEVMATCH_A) -> Self { + variant as u8 != 0 + } +} +impl EVENTS_DEVMATCH_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> EVENTS_DEVMATCH_A { + match self.bits { + false => EVENTS_DEVMATCH_A::NOT_GENERATED, + true => EVENTS_DEVMATCH_A::GENERATED, + } + } + #[doc = "Checks if the value of the field is `NOT_GENERATED`"] + #[inline(always)] + pub fn is_not_generated(&self) -> bool { + *self == EVENTS_DEVMATCH_A::NOT_GENERATED + } + #[doc = "Checks if the value of the field is `GENERATED`"] + #[inline(always)] + pub fn is_generated(&self) -> bool { + *self == EVENTS_DEVMATCH_A::GENERATED + } +} +#[doc = "Field `EVENTS_DEVMATCH` writer - A device address match occurred on the last received packet"] +pub type EVENTS_DEVMATCH_W<'a, const O: u8> = + crate::BitWriter<'a, u32, EVENTS_DEVMATCH_SPEC, EVENTS_DEVMATCH_A, O>; +impl<'a, const O: u8> EVENTS_DEVMATCH_W<'a, O> { + #[doc = "Event not generated"] + #[inline(always)] + pub fn not_generated(self) -> &'a mut W { + self.variant(EVENTS_DEVMATCH_A::NOT_GENERATED) + } + #[doc = "Event generated"] + #[inline(always)] + pub fn generated(self) -> &'a mut W { + self.variant(EVENTS_DEVMATCH_A::GENERATED) + } +} +impl R { + #[doc = "Bit 0 - A device address match occurred on the last received packet"] + #[inline(always)] + pub fn events_devmatch(&self) -> EVENTS_DEVMATCH_R { + EVENTS_DEVMATCH_R::new((self.bits & 1) != 0) + } +} +impl W { + #[doc = "Bit 0 - A device address match occurred on the last received packet"] + #[inline(always)] + #[must_use] + pub fn events_devmatch(&mut self) -> EVENTS_DEVMATCH_W<0> { + EVENTS_DEVMATCH_W::new(self) + } + #[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 = "A device address match occurred on the last received packet\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 [events_devmatch](index.html) module"] +pub struct EVENTS_DEVMATCH_SPEC; +impl crate::RegisterSpec for EVENTS_DEVMATCH_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [events_devmatch::R](R) reader structure"] +impl crate::Readable for EVENTS_DEVMATCH_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [events_devmatch::W](W) writer structure"] +impl crate::Writable for EVENTS_DEVMATCH_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets EVENTS_DEVMATCH to value 0"] +impl crate::Resettable for EVENTS_DEVMATCH_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/radio/events_devmiss.rs b/down-the-stack/dk_pac/src/radio/events_devmiss.rs new file mode 100644 index 0000000..6d3a774 --- /dev/null +++ b/down-the-stack/dk_pac/src/radio/events_devmiss.rs @@ -0,0 +1,127 @@ +#[doc = "Register `EVENTS_DEVMISS` 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 `EVENTS_DEVMISS` 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 `EVENTS_DEVMISS` reader - No device address match occurred on the last received packet"] +pub type EVENTS_DEVMISS_R = crate::BitReader; +#[doc = "No device address match occurred on the last received packet\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum EVENTS_DEVMISS_A { + #[doc = "0: Event not generated"] + NOT_GENERATED = 0, + #[doc = "1: Event generated"] + GENERATED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: EVENTS_DEVMISS_A) -> Self { + variant as u8 != 0 + } +} +impl EVENTS_DEVMISS_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> EVENTS_DEVMISS_A { + match self.bits { + false => EVENTS_DEVMISS_A::NOT_GENERATED, + true => EVENTS_DEVMISS_A::GENERATED, + } + } + #[doc = "Checks if the value of the field is `NOT_GENERATED`"] + #[inline(always)] + pub fn is_not_generated(&self) -> bool { + *self == EVENTS_DEVMISS_A::NOT_GENERATED + } + #[doc = "Checks if the value of the field is `GENERATED`"] + #[inline(always)] + pub fn is_generated(&self) -> bool { + *self == EVENTS_DEVMISS_A::GENERATED + } +} +#[doc = "Field `EVENTS_DEVMISS` writer - No device address match occurred on the last received packet"] +pub type EVENTS_DEVMISS_W<'a, const O: u8> = + crate::BitWriter<'a, u32, EVENTS_DEVMISS_SPEC, EVENTS_DEVMISS_A, O>; +impl<'a, const O: u8> EVENTS_DEVMISS_W<'a, O> { + #[doc = "Event not generated"] + #[inline(always)] + pub fn not_generated(self) -> &'a mut W { + self.variant(EVENTS_DEVMISS_A::NOT_GENERATED) + } + #[doc = "Event generated"] + #[inline(always)] + pub fn generated(self) -> &'a mut W { + self.variant(EVENTS_DEVMISS_A::GENERATED) + } +} +impl R { + #[doc = "Bit 0 - No device address match occurred on the last received packet"] + #[inline(always)] + pub fn events_devmiss(&self) -> EVENTS_DEVMISS_R { + EVENTS_DEVMISS_R::new((self.bits & 1) != 0) + } +} +impl W { + #[doc = "Bit 0 - No device address match occurred on the last received packet"] + #[inline(always)] + #[must_use] + pub fn events_devmiss(&mut self) -> EVENTS_DEVMISS_W<0> { + EVENTS_DEVMISS_W::new(self) + } + #[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 = "No device address match occurred on the last received packet\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 [events_devmiss](index.html) module"] +pub struct EVENTS_DEVMISS_SPEC; +impl crate::RegisterSpec for EVENTS_DEVMISS_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [events_devmiss::R](R) reader structure"] +impl crate::Readable for EVENTS_DEVMISS_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [events_devmiss::W](W) writer structure"] +impl crate::Writable for EVENTS_DEVMISS_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets EVENTS_DEVMISS to value 0"] +impl crate::Resettable for EVENTS_DEVMISS_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/radio/events_disabled.rs b/down-the-stack/dk_pac/src/radio/events_disabled.rs new file mode 100644 index 0000000..277376d --- /dev/null +++ b/down-the-stack/dk_pac/src/radio/events_disabled.rs @@ -0,0 +1,127 @@ +#[doc = "Register `EVENTS_DISABLED` 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 `EVENTS_DISABLED` 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 `EVENTS_DISABLED` reader - RADIO has been disabled"] +pub type EVENTS_DISABLED_R = crate::BitReader; +#[doc = "RADIO has been disabled\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum EVENTS_DISABLED_A { + #[doc = "0: Event not generated"] + NOT_GENERATED = 0, + #[doc = "1: Event generated"] + GENERATED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: EVENTS_DISABLED_A) -> Self { + variant as u8 != 0 + } +} +impl EVENTS_DISABLED_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> EVENTS_DISABLED_A { + match self.bits { + false => EVENTS_DISABLED_A::NOT_GENERATED, + true => EVENTS_DISABLED_A::GENERATED, + } + } + #[doc = "Checks if the value of the field is `NOT_GENERATED`"] + #[inline(always)] + pub fn is_not_generated(&self) -> bool { + *self == EVENTS_DISABLED_A::NOT_GENERATED + } + #[doc = "Checks if the value of the field is `GENERATED`"] + #[inline(always)] + pub fn is_generated(&self) -> bool { + *self == EVENTS_DISABLED_A::GENERATED + } +} +#[doc = "Field `EVENTS_DISABLED` writer - RADIO has been disabled"] +pub type EVENTS_DISABLED_W<'a, const O: u8> = + crate::BitWriter<'a, u32, EVENTS_DISABLED_SPEC, EVENTS_DISABLED_A, O>; +impl<'a, const O: u8> EVENTS_DISABLED_W<'a, O> { + #[doc = "Event not generated"] + #[inline(always)] + pub fn not_generated(self) -> &'a mut W { + self.variant(EVENTS_DISABLED_A::NOT_GENERATED) + } + #[doc = "Event generated"] + #[inline(always)] + pub fn generated(self) -> &'a mut W { + self.variant(EVENTS_DISABLED_A::GENERATED) + } +} +impl R { + #[doc = "Bit 0 - RADIO has been disabled"] + #[inline(always)] + pub fn events_disabled(&self) -> EVENTS_DISABLED_R { + EVENTS_DISABLED_R::new((self.bits & 1) != 0) + } +} +impl W { + #[doc = "Bit 0 - RADIO has been disabled"] + #[inline(always)] + #[must_use] + pub fn events_disabled(&mut self) -> EVENTS_DISABLED_W<0> { + EVENTS_DISABLED_W::new(self) + } + #[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 = "RADIO has been disabled\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 [events_disabled](index.html) module"] +pub struct EVENTS_DISABLED_SPEC; +impl crate::RegisterSpec for EVENTS_DISABLED_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [events_disabled::R](R) reader structure"] +impl crate::Readable for EVENTS_DISABLED_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [events_disabled::W](W) writer structure"] +impl crate::Writable for EVENTS_DISABLED_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets EVENTS_DISABLED to value 0"] +impl crate::Resettable for EVENTS_DISABLED_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/radio/events_end.rs b/down-the-stack/dk_pac/src/radio/events_end.rs new file mode 100644 index 0000000..5a3a924 --- /dev/null +++ b/down-the-stack/dk_pac/src/radio/events_end.rs @@ -0,0 +1,127 @@ +#[doc = "Register `EVENTS_END` 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 `EVENTS_END` 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 `EVENTS_END` reader - Packet sent or received"] +pub type EVENTS_END_R = crate::BitReader; +#[doc = "Packet sent or received\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum EVENTS_END_A { + #[doc = "0: Event not generated"] + NOT_GENERATED = 0, + #[doc = "1: Event generated"] + GENERATED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: EVENTS_END_A) -> Self { + variant as u8 != 0 + } +} +impl EVENTS_END_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> EVENTS_END_A { + match self.bits { + false => EVENTS_END_A::NOT_GENERATED, + true => EVENTS_END_A::GENERATED, + } + } + #[doc = "Checks if the value of the field is `NOT_GENERATED`"] + #[inline(always)] + pub fn is_not_generated(&self) -> bool { + *self == EVENTS_END_A::NOT_GENERATED + } + #[doc = "Checks if the value of the field is `GENERATED`"] + #[inline(always)] + pub fn is_generated(&self) -> bool { + *self == EVENTS_END_A::GENERATED + } +} +#[doc = "Field `EVENTS_END` writer - Packet sent or received"] +pub type EVENTS_END_W<'a, const O: u8> = + crate::BitWriter<'a, u32, EVENTS_END_SPEC, EVENTS_END_A, O>; +impl<'a, const O: u8> EVENTS_END_W<'a, O> { + #[doc = "Event not generated"] + #[inline(always)] + pub fn not_generated(self) -> &'a mut W { + self.variant(EVENTS_END_A::NOT_GENERATED) + } + #[doc = "Event generated"] + #[inline(always)] + pub fn generated(self) -> &'a mut W { + self.variant(EVENTS_END_A::GENERATED) + } +} +impl R { + #[doc = "Bit 0 - Packet sent or received"] + #[inline(always)] + pub fn events_end(&self) -> EVENTS_END_R { + EVENTS_END_R::new((self.bits & 1) != 0) + } +} +impl W { + #[doc = "Bit 0 - Packet sent or received"] + #[inline(always)] + #[must_use] + pub fn events_end(&mut self) -> EVENTS_END_W<0> { + EVENTS_END_W::new(self) + } + #[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 = "Packet sent or received\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 [events_end](index.html) module"] +pub struct EVENTS_END_SPEC; +impl crate::RegisterSpec for EVENTS_END_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [events_end::R](R) reader structure"] +impl crate::Readable for EVENTS_END_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [events_end::W](W) writer structure"] +impl crate::Writable for EVENTS_END_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets EVENTS_END to value 0"] +impl crate::Resettable for EVENTS_END_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/radio/events_payload.rs b/down-the-stack/dk_pac/src/radio/events_payload.rs new file mode 100644 index 0000000..a9055e5 --- /dev/null +++ b/down-the-stack/dk_pac/src/radio/events_payload.rs @@ -0,0 +1,127 @@ +#[doc = "Register `EVENTS_PAYLOAD` 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 `EVENTS_PAYLOAD` 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 `EVENTS_PAYLOAD` reader - Packet payload sent or received"] +pub type EVENTS_PAYLOAD_R = crate::BitReader; +#[doc = "Packet payload sent or received\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum EVENTS_PAYLOAD_A { + #[doc = "0: Event not generated"] + NOT_GENERATED = 0, + #[doc = "1: Event generated"] + GENERATED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: EVENTS_PAYLOAD_A) -> Self { + variant as u8 != 0 + } +} +impl EVENTS_PAYLOAD_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> EVENTS_PAYLOAD_A { + match self.bits { + false => EVENTS_PAYLOAD_A::NOT_GENERATED, + true => EVENTS_PAYLOAD_A::GENERATED, + } + } + #[doc = "Checks if the value of the field is `NOT_GENERATED`"] + #[inline(always)] + pub fn is_not_generated(&self) -> bool { + *self == EVENTS_PAYLOAD_A::NOT_GENERATED + } + #[doc = "Checks if the value of the field is `GENERATED`"] + #[inline(always)] + pub fn is_generated(&self) -> bool { + *self == EVENTS_PAYLOAD_A::GENERATED + } +} +#[doc = "Field `EVENTS_PAYLOAD` writer - Packet payload sent or received"] +pub type EVENTS_PAYLOAD_W<'a, const O: u8> = + crate::BitWriter<'a, u32, EVENTS_PAYLOAD_SPEC, EVENTS_PAYLOAD_A, O>; +impl<'a, const O: u8> EVENTS_PAYLOAD_W<'a, O> { + #[doc = "Event not generated"] + #[inline(always)] + pub fn not_generated(self) -> &'a mut W { + self.variant(EVENTS_PAYLOAD_A::NOT_GENERATED) + } + #[doc = "Event generated"] + #[inline(always)] + pub fn generated(self) -> &'a mut W { + self.variant(EVENTS_PAYLOAD_A::GENERATED) + } +} +impl R { + #[doc = "Bit 0 - Packet payload sent or received"] + #[inline(always)] + pub fn events_payload(&self) -> EVENTS_PAYLOAD_R { + EVENTS_PAYLOAD_R::new((self.bits & 1) != 0) + } +} +impl W { + #[doc = "Bit 0 - Packet payload sent or received"] + #[inline(always)] + #[must_use] + pub fn events_payload(&mut self) -> EVENTS_PAYLOAD_W<0> { + EVENTS_PAYLOAD_W::new(self) + } + #[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 = "Packet payload sent or received\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 [events_payload](index.html) module"] +pub struct EVENTS_PAYLOAD_SPEC; +impl crate::RegisterSpec for EVENTS_PAYLOAD_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [events_payload::R](R) reader structure"] +impl crate::Readable for EVENTS_PAYLOAD_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [events_payload::W](W) writer structure"] +impl crate::Writable for EVENTS_PAYLOAD_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets EVENTS_PAYLOAD to value 0"] +impl crate::Resettable for EVENTS_PAYLOAD_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/radio/events_ready.rs b/down-the-stack/dk_pac/src/radio/events_ready.rs new file mode 100644 index 0000000..2f692af --- /dev/null +++ b/down-the-stack/dk_pac/src/radio/events_ready.rs @@ -0,0 +1,127 @@ +#[doc = "Register `EVENTS_READY` 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 `EVENTS_READY` 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 `EVENTS_READY` reader - RADIO has ramped up and is ready to be started"] +pub type EVENTS_READY_R = crate::BitReader; +#[doc = "RADIO has ramped up and is ready to be started\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum EVENTS_READY_A { + #[doc = "0: Event not generated"] + NOT_GENERATED = 0, + #[doc = "1: Event generated"] + GENERATED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: EVENTS_READY_A) -> Self { + variant as u8 != 0 + } +} +impl EVENTS_READY_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> EVENTS_READY_A { + match self.bits { + false => EVENTS_READY_A::NOT_GENERATED, + true => EVENTS_READY_A::GENERATED, + } + } + #[doc = "Checks if the value of the field is `NOT_GENERATED`"] + #[inline(always)] + pub fn is_not_generated(&self) -> bool { + *self == EVENTS_READY_A::NOT_GENERATED + } + #[doc = "Checks if the value of the field is `GENERATED`"] + #[inline(always)] + pub fn is_generated(&self) -> bool { + *self == EVENTS_READY_A::GENERATED + } +} +#[doc = "Field `EVENTS_READY` writer - RADIO has ramped up and is ready to be started"] +pub type EVENTS_READY_W<'a, const O: u8> = + crate::BitWriter<'a, u32, EVENTS_READY_SPEC, EVENTS_READY_A, O>; +impl<'a, const O: u8> EVENTS_READY_W<'a, O> { + #[doc = "Event not generated"] + #[inline(always)] + pub fn not_generated(self) -> &'a mut W { + self.variant(EVENTS_READY_A::NOT_GENERATED) + } + #[doc = "Event generated"] + #[inline(always)] + pub fn generated(self) -> &'a mut W { + self.variant(EVENTS_READY_A::GENERATED) + } +} +impl R { + #[doc = "Bit 0 - RADIO has ramped up and is ready to be started"] + #[inline(always)] + pub fn events_ready(&self) -> EVENTS_READY_R { + EVENTS_READY_R::new((self.bits & 1) != 0) + } +} +impl W { + #[doc = "Bit 0 - RADIO has ramped up and is ready to be started"] + #[inline(always)] + #[must_use] + pub fn events_ready(&mut self) -> EVENTS_READY_W<0> { + EVENTS_READY_W::new(self) + } + #[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 = "RADIO has ramped up and is ready to be started\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 [events_ready](index.html) module"] +pub struct EVENTS_READY_SPEC; +impl crate::RegisterSpec for EVENTS_READY_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [events_ready::R](R) reader structure"] +impl crate::Readable for EVENTS_READY_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [events_ready::W](W) writer structure"] +impl crate::Writable for EVENTS_READY_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets EVENTS_READY to value 0"] +impl crate::Resettable for EVENTS_READY_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/radio/events_rssiend.rs b/down-the-stack/dk_pac/src/radio/events_rssiend.rs new file mode 100644 index 0000000..b32fb39 --- /dev/null +++ b/down-the-stack/dk_pac/src/radio/events_rssiend.rs @@ -0,0 +1,127 @@ +#[doc = "Register `EVENTS_RSSIEND` 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 `EVENTS_RSSIEND` 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 `EVENTS_RSSIEND` reader - Sampling of receive signal strength complete."] +pub type EVENTS_RSSIEND_R = crate::BitReader; +#[doc = "Sampling of receive signal strength complete.\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum EVENTS_RSSIEND_A { + #[doc = "0: Event not generated"] + NOT_GENERATED = 0, + #[doc = "1: Event generated"] + GENERATED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: EVENTS_RSSIEND_A) -> Self { + variant as u8 != 0 + } +} +impl EVENTS_RSSIEND_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> EVENTS_RSSIEND_A { + match self.bits { + false => EVENTS_RSSIEND_A::NOT_GENERATED, + true => EVENTS_RSSIEND_A::GENERATED, + } + } + #[doc = "Checks if the value of the field is `NOT_GENERATED`"] + #[inline(always)] + pub fn is_not_generated(&self) -> bool { + *self == EVENTS_RSSIEND_A::NOT_GENERATED + } + #[doc = "Checks if the value of the field is `GENERATED`"] + #[inline(always)] + pub fn is_generated(&self) -> bool { + *self == EVENTS_RSSIEND_A::GENERATED + } +} +#[doc = "Field `EVENTS_RSSIEND` writer - Sampling of receive signal strength complete."] +pub type EVENTS_RSSIEND_W<'a, const O: u8> = + crate::BitWriter<'a, u32, EVENTS_RSSIEND_SPEC, EVENTS_RSSIEND_A, O>; +impl<'a, const O: u8> EVENTS_RSSIEND_W<'a, O> { + #[doc = "Event not generated"] + #[inline(always)] + pub fn not_generated(self) -> &'a mut W { + self.variant(EVENTS_RSSIEND_A::NOT_GENERATED) + } + #[doc = "Event generated"] + #[inline(always)] + pub fn generated(self) -> &'a mut W { + self.variant(EVENTS_RSSIEND_A::GENERATED) + } +} +impl R { + #[doc = "Bit 0 - Sampling of receive signal strength complete."] + #[inline(always)] + pub fn events_rssiend(&self) -> EVENTS_RSSIEND_R { + EVENTS_RSSIEND_R::new((self.bits & 1) != 0) + } +} +impl W { + #[doc = "Bit 0 - Sampling of receive signal strength complete."] + #[inline(always)] + #[must_use] + pub fn events_rssiend(&mut self) -> EVENTS_RSSIEND_W<0> { + EVENTS_RSSIEND_W::new(self) + } + #[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 = "Sampling of receive signal strength complete.\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 [events_rssiend](index.html) module"] +pub struct EVENTS_RSSIEND_SPEC; +impl crate::RegisterSpec for EVENTS_RSSIEND_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [events_rssiend::R](R) reader structure"] +impl crate::Readable for EVENTS_RSSIEND_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [events_rssiend::W](W) writer structure"] +impl crate::Writable for EVENTS_RSSIEND_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets EVENTS_RSSIEND to value 0"] +impl crate::Resettable for EVENTS_RSSIEND_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/radio/frequency.rs b/down-the-stack/dk_pac/src/radio/frequency.rs new file mode 100644 index 0000000..6c09456 --- /dev/null +++ b/down-the-stack/dk_pac/src/radio/frequency.rs @@ -0,0 +1,141 @@ +#[doc = "Register `FREQUENCY` 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 `FREQUENCY` 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 `FREQUENCY` reader - Radio channel frequency"] +pub type FREQUENCY_R = crate::FieldReader; +#[doc = "Field `FREQUENCY` writer - Radio channel frequency"] +pub type FREQUENCY_W<'a, const O: u8> = crate::FieldWriter<'a, u32, FREQUENCY_SPEC, u8, u8, 7, O>; +#[doc = "Field `MAP` reader - Channel map selection."] +pub type MAP_R = crate::BitReader; +#[doc = "Channel map selection.\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum MAP_A { + #[doc = "0: Channel map between 2400 MHZ .. 2500 MHz"] + DEFAULT = 0, + #[doc = "1: Channel map between 2360 MHZ .. 2460 MHz"] + LOW = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: MAP_A) -> Self { + variant as u8 != 0 + } +} +impl MAP_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> MAP_A { + match self.bits { + false => MAP_A::DEFAULT, + true => MAP_A::LOW, + } + } + #[doc = "Checks if the value of the field is `DEFAULT`"] + #[inline(always)] + pub fn is_default(&self) -> bool { + *self == MAP_A::DEFAULT + } + #[doc = "Checks if the value of the field is `LOW`"] + #[inline(always)] + pub fn is_low(&self) -> bool { + *self == MAP_A::LOW + } +} +#[doc = "Field `MAP` writer - Channel map selection."] +pub type MAP_W<'a, const O: u8> = crate::BitWriter<'a, u32, FREQUENCY_SPEC, MAP_A, O>; +impl<'a, const O: u8> MAP_W<'a, O> { + #[doc = "Channel map between 2400 MHZ .. 2500 MHz"] + #[inline(always)] + pub fn default(self) -> &'a mut W { + self.variant(MAP_A::DEFAULT) + } + #[doc = "Channel map between 2360 MHZ .. 2460 MHz"] + #[inline(always)] + pub fn low(self) -> &'a mut W { + self.variant(MAP_A::LOW) + } +} +impl R { + #[doc = "Bits 0:6 - Radio channel frequency"] + #[inline(always)] + pub fn frequency(&self) -> FREQUENCY_R { + FREQUENCY_R::new((self.bits & 0x7f) as u8) + } + #[doc = "Bit 8 - Channel map selection."] + #[inline(always)] + pub fn map(&self) -> MAP_R { + MAP_R::new(((self.bits >> 8) & 1) != 0) + } +} +impl W { + #[doc = "Bits 0:6 - Radio channel frequency"] + #[inline(always)] + #[must_use] + pub fn frequency(&mut self) -> FREQUENCY_W<0> { + FREQUENCY_W::new(self) + } + #[doc = "Bit 8 - Channel map selection."] + #[inline(always)] + #[must_use] + pub fn map(&mut self) -> MAP_W<8> { + MAP_W::new(self) + } + #[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 = "Frequency\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 [frequency](index.html) module"] +pub struct FREQUENCY_SPEC; +impl crate::RegisterSpec for FREQUENCY_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [frequency::R](R) reader structure"] +impl crate::Readable for FREQUENCY_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [frequency::W](W) writer structure"] +impl crate::Writable for FREQUENCY_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets FREQUENCY to value 0x02"] +impl crate::Resettable for FREQUENCY_SPEC { + const RESET_VALUE: Self::Ux = 0x02; +} diff --git a/down-the-stack/dk_pac/src/radio/intenclr.rs b/down-the-stack/dk_pac/src/radio/intenclr.rs new file mode 100644 index 0000000..7dbc7d0 --- /dev/null +++ b/down-the-stack/dk_pac/src/radio/intenclr.rs @@ -0,0 +1,813 @@ +#[doc = "Register `INTENCLR` 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 `INTENCLR` 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 `READY` reader - Write '1' to disable interrupt for event READY"] +pub type READY_R = crate::BitReader; +#[doc = "Write '1' to disable interrupt for event READY\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum READY_A { + #[doc = "0: Read: Disabled"] + DISABLED = 0, + #[doc = "1: Read: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: READY_A) -> Self { + variant as u8 != 0 + } +} +impl READY_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> READY_A { + match self.bits { + false => READY_A::DISABLED, + true => READY_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == READY_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == READY_A::ENABLED + } +} +#[doc = "Write '1' to disable interrupt for event READY\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum READY_AW { + #[doc = "1: Disable"] + CLEAR = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: READY_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `READY` writer - Write '1' to disable interrupt for event READY"] +pub type READY_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENCLR_SPEC, READY_AW, O>; +impl<'a, const O: u8> READY_W<'a, O> { + #[doc = "Disable"] + #[inline(always)] + pub fn clear(self) -> &'a mut W { + self.variant(READY_AW::CLEAR) + } +} +#[doc = "Field `ADDRESS` reader - Write '1' to disable interrupt for event ADDRESS"] +pub type ADDRESS_R = crate::BitReader; +#[doc = "Write '1' to disable interrupt for event ADDRESS\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum ADDRESS_A { + #[doc = "0: Read: Disabled"] + DISABLED = 0, + #[doc = "1: Read: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: ADDRESS_A) -> Self { + variant as u8 != 0 + } +} +impl ADDRESS_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> ADDRESS_A { + match self.bits { + false => ADDRESS_A::DISABLED, + true => ADDRESS_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == ADDRESS_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == ADDRESS_A::ENABLED + } +} +#[doc = "Write '1' to disable interrupt for event ADDRESS\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum ADDRESS_AW { + #[doc = "1: Disable"] + CLEAR = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: ADDRESS_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `ADDRESS` writer - Write '1' to disable interrupt for event ADDRESS"] +pub type ADDRESS_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENCLR_SPEC, ADDRESS_AW, O>; +impl<'a, const O: u8> ADDRESS_W<'a, O> { + #[doc = "Disable"] + #[inline(always)] + pub fn clear(self) -> &'a mut W { + self.variant(ADDRESS_AW::CLEAR) + } +} +#[doc = "Field `PAYLOAD` reader - Write '1' to disable interrupt for event PAYLOAD"] +pub type PAYLOAD_R = crate::BitReader; +#[doc = "Write '1' to disable interrupt for event PAYLOAD\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PAYLOAD_A { + #[doc = "0: Read: Disabled"] + DISABLED = 0, + #[doc = "1: Read: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PAYLOAD_A) -> Self { + variant as u8 != 0 + } +} +impl PAYLOAD_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> PAYLOAD_A { + match self.bits { + false => PAYLOAD_A::DISABLED, + true => PAYLOAD_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == PAYLOAD_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == PAYLOAD_A::ENABLED + } +} +#[doc = "Write '1' to disable interrupt for event PAYLOAD\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PAYLOAD_AW { + #[doc = "1: Disable"] + CLEAR = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PAYLOAD_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `PAYLOAD` writer - Write '1' to disable interrupt for event PAYLOAD"] +pub type PAYLOAD_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENCLR_SPEC, PAYLOAD_AW, O>; +impl<'a, const O: u8> PAYLOAD_W<'a, O> { + #[doc = "Disable"] + #[inline(always)] + pub fn clear(self) -> &'a mut W { + self.variant(PAYLOAD_AW::CLEAR) + } +} +#[doc = "Field `END` reader - Write '1' to disable interrupt for event END"] +pub type END_R = crate::BitReader; +#[doc = "Write '1' to disable interrupt for event END\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum END_A { + #[doc = "0: Read: Disabled"] + DISABLED = 0, + #[doc = "1: Read: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: END_A) -> Self { + variant as u8 != 0 + } +} +impl END_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> END_A { + match self.bits { + false => END_A::DISABLED, + true => END_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == END_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == END_A::ENABLED + } +} +#[doc = "Write '1' to disable interrupt for event END\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum END_AW { + #[doc = "1: Disable"] + CLEAR = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: END_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `END` writer - Write '1' to disable interrupt for event END"] +pub type END_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENCLR_SPEC, END_AW, O>; +impl<'a, const O: u8> END_W<'a, O> { + #[doc = "Disable"] + #[inline(always)] + pub fn clear(self) -> &'a mut W { + self.variant(END_AW::CLEAR) + } +} +#[doc = "Field `DISABLED` reader - Write '1' to disable interrupt for event DISABLED"] +pub type DISABLED_R = crate::BitReader; +#[doc = "Write '1' to disable interrupt for event DISABLED\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum DISABLED_A { + #[doc = "0: Read: Disabled"] + DISABLED = 0, + #[doc = "1: Read: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: DISABLED_A) -> Self { + variant as u8 != 0 + } +} +impl DISABLED_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> DISABLED_A { + match self.bits { + false => DISABLED_A::DISABLED, + true => DISABLED_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == DISABLED_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == DISABLED_A::ENABLED + } +} +#[doc = "Write '1' to disable interrupt for event DISABLED\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum DISABLED_AW { + #[doc = "1: Disable"] + CLEAR = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: DISABLED_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `DISABLED` writer - Write '1' to disable interrupt for event DISABLED"] +pub type DISABLED_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENCLR_SPEC, DISABLED_AW, O>; +impl<'a, const O: u8> DISABLED_W<'a, O> { + #[doc = "Disable"] + #[inline(always)] + pub fn clear(self) -> &'a mut W { + self.variant(DISABLED_AW::CLEAR) + } +} +#[doc = "Field `DEVMATCH` reader - Write '1' to disable interrupt for event DEVMATCH"] +pub type DEVMATCH_R = crate::BitReader; +#[doc = "Write '1' to disable interrupt for event DEVMATCH\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum DEVMATCH_A { + #[doc = "0: Read: Disabled"] + DISABLED = 0, + #[doc = "1: Read: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: DEVMATCH_A) -> Self { + variant as u8 != 0 + } +} +impl DEVMATCH_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> DEVMATCH_A { + match self.bits { + false => DEVMATCH_A::DISABLED, + true => DEVMATCH_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == DEVMATCH_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == DEVMATCH_A::ENABLED + } +} +#[doc = "Write '1' to disable interrupt for event DEVMATCH\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum DEVMATCH_AW { + #[doc = "1: Disable"] + CLEAR = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: DEVMATCH_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `DEVMATCH` writer - Write '1' to disable interrupt for event DEVMATCH"] +pub type DEVMATCH_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENCLR_SPEC, DEVMATCH_AW, O>; +impl<'a, const O: u8> DEVMATCH_W<'a, O> { + #[doc = "Disable"] + #[inline(always)] + pub fn clear(self) -> &'a mut W { + self.variant(DEVMATCH_AW::CLEAR) + } +} +#[doc = "Field `DEVMISS` reader - Write '1' to disable interrupt for event DEVMISS"] +pub type DEVMISS_R = crate::BitReader; +#[doc = "Write '1' to disable interrupt for event DEVMISS\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum DEVMISS_A { + #[doc = "0: Read: Disabled"] + DISABLED = 0, + #[doc = "1: Read: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: DEVMISS_A) -> Self { + variant as u8 != 0 + } +} +impl DEVMISS_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> DEVMISS_A { + match self.bits { + false => DEVMISS_A::DISABLED, + true => DEVMISS_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == DEVMISS_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == DEVMISS_A::ENABLED + } +} +#[doc = "Write '1' to disable interrupt for event DEVMISS\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum DEVMISS_AW { + #[doc = "1: Disable"] + CLEAR = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: DEVMISS_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `DEVMISS` writer - Write '1' to disable interrupt for event DEVMISS"] +pub type DEVMISS_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENCLR_SPEC, DEVMISS_AW, O>; +impl<'a, const O: u8> DEVMISS_W<'a, O> { + #[doc = "Disable"] + #[inline(always)] + pub fn clear(self) -> &'a mut W { + self.variant(DEVMISS_AW::CLEAR) + } +} +#[doc = "Field `RSSIEND` reader - Write '1' to disable interrupt for event RSSIEND"] +pub type RSSIEND_R = crate::BitReader; +#[doc = "Write '1' to disable interrupt for event RSSIEND\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum RSSIEND_A { + #[doc = "0: Read: Disabled"] + DISABLED = 0, + #[doc = "1: Read: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: RSSIEND_A) -> Self { + variant as u8 != 0 + } +} +impl RSSIEND_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> RSSIEND_A { + match self.bits { + false => RSSIEND_A::DISABLED, + true => RSSIEND_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == RSSIEND_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == RSSIEND_A::ENABLED + } +} +#[doc = "Write '1' to disable interrupt for event RSSIEND\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum RSSIEND_AW { + #[doc = "1: Disable"] + CLEAR = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: RSSIEND_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `RSSIEND` writer - Write '1' to disable interrupt for event RSSIEND"] +pub type RSSIEND_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENCLR_SPEC, RSSIEND_AW, O>; +impl<'a, const O: u8> RSSIEND_W<'a, O> { + #[doc = "Disable"] + #[inline(always)] + pub fn clear(self) -> &'a mut W { + self.variant(RSSIEND_AW::CLEAR) + } +} +#[doc = "Field `BCMATCH` reader - Write '1' to disable interrupt for event BCMATCH"] +pub type BCMATCH_R = crate::BitReader; +#[doc = "Write '1' to disable interrupt for event BCMATCH\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum BCMATCH_A { + #[doc = "0: Read: Disabled"] + DISABLED = 0, + #[doc = "1: Read: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: BCMATCH_A) -> Self { + variant as u8 != 0 + } +} +impl BCMATCH_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> BCMATCH_A { + match self.bits { + false => BCMATCH_A::DISABLED, + true => BCMATCH_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == BCMATCH_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == BCMATCH_A::ENABLED + } +} +#[doc = "Write '1' to disable interrupt for event BCMATCH\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum BCMATCH_AW { + #[doc = "1: Disable"] + CLEAR = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: BCMATCH_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `BCMATCH` writer - Write '1' to disable interrupt for event BCMATCH"] +pub type BCMATCH_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENCLR_SPEC, BCMATCH_AW, O>; +impl<'a, const O: u8> BCMATCH_W<'a, O> { + #[doc = "Disable"] + #[inline(always)] + pub fn clear(self) -> &'a mut W { + self.variant(BCMATCH_AW::CLEAR) + } +} +#[doc = "Field `CRCOK` reader - Write '1' to disable interrupt for event CRCOK"] +pub type CRCOK_R = crate::BitReader; +#[doc = "Write '1' to disable interrupt for event CRCOK\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum CRCOK_A { + #[doc = "0: Read: Disabled"] + DISABLED = 0, + #[doc = "1: Read: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: CRCOK_A) -> Self { + variant as u8 != 0 + } +} +impl CRCOK_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> CRCOK_A { + match self.bits { + false => CRCOK_A::DISABLED, + true => CRCOK_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == CRCOK_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == CRCOK_A::ENABLED + } +} +#[doc = "Write '1' to disable interrupt for event CRCOK\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum CRCOK_AW { + #[doc = "1: Disable"] + CLEAR = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: CRCOK_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `CRCOK` writer - Write '1' to disable interrupt for event CRCOK"] +pub type CRCOK_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENCLR_SPEC, CRCOK_AW, O>; +impl<'a, const O: u8> CRCOK_W<'a, O> { + #[doc = "Disable"] + #[inline(always)] + pub fn clear(self) -> &'a mut W { + self.variant(CRCOK_AW::CLEAR) + } +} +#[doc = "Field `CRCERROR` reader - Write '1' to disable interrupt for event CRCERROR"] +pub type CRCERROR_R = crate::BitReader; +#[doc = "Write '1' to disable interrupt for event CRCERROR\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum CRCERROR_A { + #[doc = "0: Read: Disabled"] + DISABLED = 0, + #[doc = "1: Read: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: CRCERROR_A) -> Self { + variant as u8 != 0 + } +} +impl CRCERROR_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> CRCERROR_A { + match self.bits { + false => CRCERROR_A::DISABLED, + true => CRCERROR_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == CRCERROR_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == CRCERROR_A::ENABLED + } +} +#[doc = "Write '1' to disable interrupt for event CRCERROR\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum CRCERROR_AW { + #[doc = "1: Disable"] + CLEAR = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: CRCERROR_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `CRCERROR` writer - Write '1' to disable interrupt for event CRCERROR"] +pub type CRCERROR_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENCLR_SPEC, CRCERROR_AW, O>; +impl<'a, const O: u8> CRCERROR_W<'a, O> { + #[doc = "Disable"] + #[inline(always)] + pub fn clear(self) -> &'a mut W { + self.variant(CRCERROR_AW::CLEAR) + } +} +impl R { + #[doc = "Bit 0 - Write '1' to disable interrupt for event READY"] + #[inline(always)] + pub fn ready(&self) -> READY_R { + READY_R::new((self.bits & 1) != 0) + } + #[doc = "Bit 1 - Write '1' to disable interrupt for event ADDRESS"] + #[inline(always)] + pub fn address(&self) -> ADDRESS_R { + ADDRESS_R::new(((self.bits >> 1) & 1) != 0) + } + #[doc = "Bit 2 - Write '1' to disable interrupt for event PAYLOAD"] + #[inline(always)] + pub fn payload(&self) -> PAYLOAD_R { + PAYLOAD_R::new(((self.bits >> 2) & 1) != 0) + } + #[doc = "Bit 3 - Write '1' to disable interrupt for event END"] + #[inline(always)] + pub fn end(&self) -> END_R { + END_R::new(((self.bits >> 3) & 1) != 0) + } + #[doc = "Bit 4 - Write '1' to disable interrupt for event DISABLED"] + #[inline(always)] + pub fn disabled(&self) -> DISABLED_R { + DISABLED_R::new(((self.bits >> 4) & 1) != 0) + } + #[doc = "Bit 5 - Write '1' to disable interrupt for event DEVMATCH"] + #[inline(always)] + pub fn devmatch(&self) -> DEVMATCH_R { + DEVMATCH_R::new(((self.bits >> 5) & 1) != 0) + } + #[doc = "Bit 6 - Write '1' to disable interrupt for event DEVMISS"] + #[inline(always)] + pub fn devmiss(&self) -> DEVMISS_R { + DEVMISS_R::new(((self.bits >> 6) & 1) != 0) + } + #[doc = "Bit 7 - Write '1' to disable interrupt for event RSSIEND"] + #[inline(always)] + pub fn rssiend(&self) -> RSSIEND_R { + RSSIEND_R::new(((self.bits >> 7) & 1) != 0) + } + #[doc = "Bit 10 - Write '1' to disable interrupt for event BCMATCH"] + #[inline(always)] + pub fn bcmatch(&self) -> BCMATCH_R { + BCMATCH_R::new(((self.bits >> 10) & 1) != 0) + } + #[doc = "Bit 12 - Write '1' to disable interrupt for event CRCOK"] + #[inline(always)] + pub fn crcok(&self) -> CRCOK_R { + CRCOK_R::new(((self.bits >> 12) & 1) != 0) + } + #[doc = "Bit 13 - Write '1' to disable interrupt for event CRCERROR"] + #[inline(always)] + pub fn crcerror(&self) -> CRCERROR_R { + CRCERROR_R::new(((self.bits >> 13) & 1) != 0) + } +} +impl W { + #[doc = "Bit 0 - Write '1' to disable interrupt for event READY"] + #[inline(always)] + #[must_use] + pub fn ready(&mut self) -> READY_W<0> { + READY_W::new(self) + } + #[doc = "Bit 1 - Write '1' to disable interrupt for event ADDRESS"] + #[inline(always)] + #[must_use] + pub fn address(&mut self) -> ADDRESS_W<1> { + ADDRESS_W::new(self) + } + #[doc = "Bit 2 - Write '1' to disable interrupt for event PAYLOAD"] + #[inline(always)] + #[must_use] + pub fn payload(&mut self) -> PAYLOAD_W<2> { + PAYLOAD_W::new(self) + } + #[doc = "Bit 3 - Write '1' to disable interrupt for event END"] + #[inline(always)] + #[must_use] + pub fn end(&mut self) -> END_W<3> { + END_W::new(self) + } + #[doc = "Bit 4 - Write '1' to disable interrupt for event DISABLED"] + #[inline(always)] + #[must_use] + pub fn disabled(&mut self) -> DISABLED_W<4> { + DISABLED_W::new(self) + } + #[doc = "Bit 5 - Write '1' to disable interrupt for event DEVMATCH"] + #[inline(always)] + #[must_use] + pub fn devmatch(&mut self) -> DEVMATCH_W<5> { + DEVMATCH_W::new(self) + } + #[doc = "Bit 6 - Write '1' to disable interrupt for event DEVMISS"] + #[inline(always)] + #[must_use] + pub fn devmiss(&mut self) -> DEVMISS_W<6> { + DEVMISS_W::new(self) + } + #[doc = "Bit 7 - Write '1' to disable interrupt for event RSSIEND"] + #[inline(always)] + #[must_use] + pub fn rssiend(&mut self) -> RSSIEND_W<7> { + RSSIEND_W::new(self) + } + #[doc = "Bit 10 - Write '1' to disable interrupt for event BCMATCH"] + #[inline(always)] + #[must_use] + pub fn bcmatch(&mut self) -> BCMATCH_W<10> { + BCMATCH_W::new(self) + } + #[doc = "Bit 12 - Write '1' to disable interrupt for event CRCOK"] + #[inline(always)] + #[must_use] + pub fn crcok(&mut self) -> CRCOK_W<12> { + CRCOK_W::new(self) + } + #[doc = "Bit 13 - Write '1' to disable interrupt for event CRCERROR"] + #[inline(always)] + #[must_use] + pub fn crcerror(&mut self) -> CRCERROR_W<13> { + CRCERROR_W::new(self) + } + #[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 = "Disable interrupt\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 [intenclr](index.html) module"] +pub struct INTENCLR_SPEC; +impl crate::RegisterSpec for INTENCLR_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [intenclr::R](R) reader structure"] +impl crate::Readable for INTENCLR_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [intenclr::W](W) writer structure"] +impl crate::Writable for INTENCLR_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets INTENCLR to value 0"] +impl crate::Resettable for INTENCLR_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/radio/intenset.rs b/down-the-stack/dk_pac/src/radio/intenset.rs new file mode 100644 index 0000000..0e943c9 --- /dev/null +++ b/down-the-stack/dk_pac/src/radio/intenset.rs @@ -0,0 +1,813 @@ +#[doc = "Register `INTENSET` 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 `INTENSET` 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 `READY` reader - Write '1' to enable interrupt for event READY"] +pub type READY_R = crate::BitReader; +#[doc = "Write '1' to enable interrupt for event READY\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum READY_A { + #[doc = "0: Read: Disabled"] + DISABLED = 0, + #[doc = "1: Read: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: READY_A) -> Self { + variant as u8 != 0 + } +} +impl READY_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> READY_A { + match self.bits { + false => READY_A::DISABLED, + true => READY_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == READY_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == READY_A::ENABLED + } +} +#[doc = "Write '1' to enable interrupt for event READY\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum READY_AW { + #[doc = "1: Enable"] + SET = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: READY_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `READY` writer - Write '1' to enable interrupt for event READY"] +pub type READY_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENSET_SPEC, READY_AW, O>; +impl<'a, const O: u8> READY_W<'a, O> { + #[doc = "Enable"] + #[inline(always)] + pub fn set(self) -> &'a mut W { + self.variant(READY_AW::SET) + } +} +#[doc = "Field `ADDRESS` reader - Write '1' to enable interrupt for event ADDRESS"] +pub type ADDRESS_R = crate::BitReader; +#[doc = "Write '1' to enable interrupt for event ADDRESS\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum ADDRESS_A { + #[doc = "0: Read: Disabled"] + DISABLED = 0, + #[doc = "1: Read: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: ADDRESS_A) -> Self { + variant as u8 != 0 + } +} +impl ADDRESS_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> ADDRESS_A { + match self.bits { + false => ADDRESS_A::DISABLED, + true => ADDRESS_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == ADDRESS_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == ADDRESS_A::ENABLED + } +} +#[doc = "Write '1' to enable interrupt for event ADDRESS\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum ADDRESS_AW { + #[doc = "1: Enable"] + SET = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: ADDRESS_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `ADDRESS` writer - Write '1' to enable interrupt for event ADDRESS"] +pub type ADDRESS_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENSET_SPEC, ADDRESS_AW, O>; +impl<'a, const O: u8> ADDRESS_W<'a, O> { + #[doc = "Enable"] + #[inline(always)] + pub fn set(self) -> &'a mut W { + self.variant(ADDRESS_AW::SET) + } +} +#[doc = "Field `PAYLOAD` reader - Write '1' to enable interrupt for event PAYLOAD"] +pub type PAYLOAD_R = crate::BitReader; +#[doc = "Write '1' to enable interrupt for event PAYLOAD\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PAYLOAD_A { + #[doc = "0: Read: Disabled"] + DISABLED = 0, + #[doc = "1: Read: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PAYLOAD_A) -> Self { + variant as u8 != 0 + } +} +impl PAYLOAD_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> PAYLOAD_A { + match self.bits { + false => PAYLOAD_A::DISABLED, + true => PAYLOAD_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == PAYLOAD_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == PAYLOAD_A::ENABLED + } +} +#[doc = "Write '1' to enable interrupt for event PAYLOAD\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PAYLOAD_AW { + #[doc = "1: Enable"] + SET = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PAYLOAD_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `PAYLOAD` writer - Write '1' to enable interrupt for event PAYLOAD"] +pub type PAYLOAD_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENSET_SPEC, PAYLOAD_AW, O>; +impl<'a, const O: u8> PAYLOAD_W<'a, O> { + #[doc = "Enable"] + #[inline(always)] + pub fn set(self) -> &'a mut W { + self.variant(PAYLOAD_AW::SET) + } +} +#[doc = "Field `END` reader - Write '1' to enable interrupt for event END"] +pub type END_R = crate::BitReader; +#[doc = "Write '1' to enable interrupt for event END\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum END_A { + #[doc = "0: Read: Disabled"] + DISABLED = 0, + #[doc = "1: Read: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: END_A) -> Self { + variant as u8 != 0 + } +} +impl END_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> END_A { + match self.bits { + false => END_A::DISABLED, + true => END_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == END_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == END_A::ENABLED + } +} +#[doc = "Write '1' to enable interrupt for event END\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum END_AW { + #[doc = "1: Enable"] + SET = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: END_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `END` writer - Write '1' to enable interrupt for event END"] +pub type END_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENSET_SPEC, END_AW, O>; +impl<'a, const O: u8> END_W<'a, O> { + #[doc = "Enable"] + #[inline(always)] + pub fn set(self) -> &'a mut W { + self.variant(END_AW::SET) + } +} +#[doc = "Field `DISABLED` reader - Write '1' to enable interrupt for event DISABLED"] +pub type DISABLED_R = crate::BitReader; +#[doc = "Write '1' to enable interrupt for event DISABLED\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum DISABLED_A { + #[doc = "0: Read: Disabled"] + DISABLED = 0, + #[doc = "1: Read: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: DISABLED_A) -> Self { + variant as u8 != 0 + } +} +impl DISABLED_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> DISABLED_A { + match self.bits { + false => DISABLED_A::DISABLED, + true => DISABLED_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == DISABLED_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == DISABLED_A::ENABLED + } +} +#[doc = "Write '1' to enable interrupt for event DISABLED\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum DISABLED_AW { + #[doc = "1: Enable"] + SET = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: DISABLED_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `DISABLED` writer - Write '1' to enable interrupt for event DISABLED"] +pub type DISABLED_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENSET_SPEC, DISABLED_AW, O>; +impl<'a, const O: u8> DISABLED_W<'a, O> { + #[doc = "Enable"] + #[inline(always)] + pub fn set(self) -> &'a mut W { + self.variant(DISABLED_AW::SET) + } +} +#[doc = "Field `DEVMATCH` reader - Write '1' to enable interrupt for event DEVMATCH"] +pub type DEVMATCH_R = crate::BitReader; +#[doc = "Write '1' to enable interrupt for event DEVMATCH\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum DEVMATCH_A { + #[doc = "0: Read: Disabled"] + DISABLED = 0, + #[doc = "1: Read: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: DEVMATCH_A) -> Self { + variant as u8 != 0 + } +} +impl DEVMATCH_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> DEVMATCH_A { + match self.bits { + false => DEVMATCH_A::DISABLED, + true => DEVMATCH_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == DEVMATCH_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == DEVMATCH_A::ENABLED + } +} +#[doc = "Write '1' to enable interrupt for event DEVMATCH\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum DEVMATCH_AW { + #[doc = "1: Enable"] + SET = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: DEVMATCH_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `DEVMATCH` writer - Write '1' to enable interrupt for event DEVMATCH"] +pub type DEVMATCH_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENSET_SPEC, DEVMATCH_AW, O>; +impl<'a, const O: u8> DEVMATCH_W<'a, O> { + #[doc = "Enable"] + #[inline(always)] + pub fn set(self) -> &'a mut W { + self.variant(DEVMATCH_AW::SET) + } +} +#[doc = "Field `DEVMISS` reader - Write '1' to enable interrupt for event DEVMISS"] +pub type DEVMISS_R = crate::BitReader; +#[doc = "Write '1' to enable interrupt for event DEVMISS\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum DEVMISS_A { + #[doc = "0: Read: Disabled"] + DISABLED = 0, + #[doc = "1: Read: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: DEVMISS_A) -> Self { + variant as u8 != 0 + } +} +impl DEVMISS_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> DEVMISS_A { + match self.bits { + false => DEVMISS_A::DISABLED, + true => DEVMISS_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == DEVMISS_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == DEVMISS_A::ENABLED + } +} +#[doc = "Write '1' to enable interrupt for event DEVMISS\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum DEVMISS_AW { + #[doc = "1: Enable"] + SET = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: DEVMISS_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `DEVMISS` writer - Write '1' to enable interrupt for event DEVMISS"] +pub type DEVMISS_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENSET_SPEC, DEVMISS_AW, O>; +impl<'a, const O: u8> DEVMISS_W<'a, O> { + #[doc = "Enable"] + #[inline(always)] + pub fn set(self) -> &'a mut W { + self.variant(DEVMISS_AW::SET) + } +} +#[doc = "Field `RSSIEND` reader - Write '1' to enable interrupt for event RSSIEND"] +pub type RSSIEND_R = crate::BitReader; +#[doc = "Write '1' to enable interrupt for event RSSIEND\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum RSSIEND_A { + #[doc = "0: Read: Disabled"] + DISABLED = 0, + #[doc = "1: Read: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: RSSIEND_A) -> Self { + variant as u8 != 0 + } +} +impl RSSIEND_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> RSSIEND_A { + match self.bits { + false => RSSIEND_A::DISABLED, + true => RSSIEND_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == RSSIEND_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == RSSIEND_A::ENABLED + } +} +#[doc = "Write '1' to enable interrupt for event RSSIEND\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum RSSIEND_AW { + #[doc = "1: Enable"] + SET = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: RSSIEND_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `RSSIEND` writer - Write '1' to enable interrupt for event RSSIEND"] +pub type RSSIEND_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENSET_SPEC, RSSIEND_AW, O>; +impl<'a, const O: u8> RSSIEND_W<'a, O> { + #[doc = "Enable"] + #[inline(always)] + pub fn set(self) -> &'a mut W { + self.variant(RSSIEND_AW::SET) + } +} +#[doc = "Field `BCMATCH` reader - Write '1' to enable interrupt for event BCMATCH"] +pub type BCMATCH_R = crate::BitReader; +#[doc = "Write '1' to enable interrupt for event BCMATCH\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum BCMATCH_A { + #[doc = "0: Read: Disabled"] + DISABLED = 0, + #[doc = "1: Read: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: BCMATCH_A) -> Self { + variant as u8 != 0 + } +} +impl BCMATCH_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> BCMATCH_A { + match self.bits { + false => BCMATCH_A::DISABLED, + true => BCMATCH_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == BCMATCH_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == BCMATCH_A::ENABLED + } +} +#[doc = "Write '1' to enable interrupt for event BCMATCH\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum BCMATCH_AW { + #[doc = "1: Enable"] + SET = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: BCMATCH_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `BCMATCH` writer - Write '1' to enable interrupt for event BCMATCH"] +pub type BCMATCH_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENSET_SPEC, BCMATCH_AW, O>; +impl<'a, const O: u8> BCMATCH_W<'a, O> { + #[doc = "Enable"] + #[inline(always)] + pub fn set(self) -> &'a mut W { + self.variant(BCMATCH_AW::SET) + } +} +#[doc = "Field `CRCOK` reader - Write '1' to enable interrupt for event CRCOK"] +pub type CRCOK_R = crate::BitReader; +#[doc = "Write '1' to enable interrupt for event CRCOK\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum CRCOK_A { + #[doc = "0: Read: Disabled"] + DISABLED = 0, + #[doc = "1: Read: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: CRCOK_A) -> Self { + variant as u8 != 0 + } +} +impl CRCOK_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> CRCOK_A { + match self.bits { + false => CRCOK_A::DISABLED, + true => CRCOK_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == CRCOK_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == CRCOK_A::ENABLED + } +} +#[doc = "Write '1' to enable interrupt for event CRCOK\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum CRCOK_AW { + #[doc = "1: Enable"] + SET = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: CRCOK_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `CRCOK` writer - Write '1' to enable interrupt for event CRCOK"] +pub type CRCOK_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENSET_SPEC, CRCOK_AW, O>; +impl<'a, const O: u8> CRCOK_W<'a, O> { + #[doc = "Enable"] + #[inline(always)] + pub fn set(self) -> &'a mut W { + self.variant(CRCOK_AW::SET) + } +} +#[doc = "Field `CRCERROR` reader - Write '1' to enable interrupt for event CRCERROR"] +pub type CRCERROR_R = crate::BitReader; +#[doc = "Write '1' to enable interrupt for event CRCERROR\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum CRCERROR_A { + #[doc = "0: Read: Disabled"] + DISABLED = 0, + #[doc = "1: Read: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: CRCERROR_A) -> Self { + variant as u8 != 0 + } +} +impl CRCERROR_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> CRCERROR_A { + match self.bits { + false => CRCERROR_A::DISABLED, + true => CRCERROR_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == CRCERROR_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == CRCERROR_A::ENABLED + } +} +#[doc = "Write '1' to enable interrupt for event CRCERROR\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum CRCERROR_AW { + #[doc = "1: Enable"] + SET = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: CRCERROR_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `CRCERROR` writer - Write '1' to enable interrupt for event CRCERROR"] +pub type CRCERROR_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENSET_SPEC, CRCERROR_AW, O>; +impl<'a, const O: u8> CRCERROR_W<'a, O> { + #[doc = "Enable"] + #[inline(always)] + pub fn set(self) -> &'a mut W { + self.variant(CRCERROR_AW::SET) + } +} +impl R { + #[doc = "Bit 0 - Write '1' to enable interrupt for event READY"] + #[inline(always)] + pub fn ready(&self) -> READY_R { + READY_R::new((self.bits & 1) != 0) + } + #[doc = "Bit 1 - Write '1' to enable interrupt for event ADDRESS"] + #[inline(always)] + pub fn address(&self) -> ADDRESS_R { + ADDRESS_R::new(((self.bits >> 1) & 1) != 0) + } + #[doc = "Bit 2 - Write '1' to enable interrupt for event PAYLOAD"] + #[inline(always)] + pub fn payload(&self) -> PAYLOAD_R { + PAYLOAD_R::new(((self.bits >> 2) & 1) != 0) + } + #[doc = "Bit 3 - Write '1' to enable interrupt for event END"] + #[inline(always)] + pub fn end(&self) -> END_R { + END_R::new(((self.bits >> 3) & 1) != 0) + } + #[doc = "Bit 4 - Write '1' to enable interrupt for event DISABLED"] + #[inline(always)] + pub fn disabled(&self) -> DISABLED_R { + DISABLED_R::new(((self.bits >> 4) & 1) != 0) + } + #[doc = "Bit 5 - Write '1' to enable interrupt for event DEVMATCH"] + #[inline(always)] + pub fn devmatch(&self) -> DEVMATCH_R { + DEVMATCH_R::new(((self.bits >> 5) & 1) != 0) + } + #[doc = "Bit 6 - Write '1' to enable interrupt for event DEVMISS"] + #[inline(always)] + pub fn devmiss(&self) -> DEVMISS_R { + DEVMISS_R::new(((self.bits >> 6) & 1) != 0) + } + #[doc = "Bit 7 - Write '1' to enable interrupt for event RSSIEND"] + #[inline(always)] + pub fn rssiend(&self) -> RSSIEND_R { + RSSIEND_R::new(((self.bits >> 7) & 1) != 0) + } + #[doc = "Bit 10 - Write '1' to enable interrupt for event BCMATCH"] + #[inline(always)] + pub fn bcmatch(&self) -> BCMATCH_R { + BCMATCH_R::new(((self.bits >> 10) & 1) != 0) + } + #[doc = "Bit 12 - Write '1' to enable interrupt for event CRCOK"] + #[inline(always)] + pub fn crcok(&self) -> CRCOK_R { + CRCOK_R::new(((self.bits >> 12) & 1) != 0) + } + #[doc = "Bit 13 - Write '1' to enable interrupt for event CRCERROR"] + #[inline(always)] + pub fn crcerror(&self) -> CRCERROR_R { + CRCERROR_R::new(((self.bits >> 13) & 1) != 0) + } +} +impl W { + #[doc = "Bit 0 - Write '1' to enable interrupt for event READY"] + #[inline(always)] + #[must_use] + pub fn ready(&mut self) -> READY_W<0> { + READY_W::new(self) + } + #[doc = "Bit 1 - Write '1' to enable interrupt for event ADDRESS"] + #[inline(always)] + #[must_use] + pub fn address(&mut self) -> ADDRESS_W<1> { + ADDRESS_W::new(self) + } + #[doc = "Bit 2 - Write '1' to enable interrupt for event PAYLOAD"] + #[inline(always)] + #[must_use] + pub fn payload(&mut self) -> PAYLOAD_W<2> { + PAYLOAD_W::new(self) + } + #[doc = "Bit 3 - Write '1' to enable interrupt for event END"] + #[inline(always)] + #[must_use] + pub fn end(&mut self) -> END_W<3> { + END_W::new(self) + } + #[doc = "Bit 4 - Write '1' to enable interrupt for event DISABLED"] + #[inline(always)] + #[must_use] + pub fn disabled(&mut self) -> DISABLED_W<4> { + DISABLED_W::new(self) + } + #[doc = "Bit 5 - Write '1' to enable interrupt for event DEVMATCH"] + #[inline(always)] + #[must_use] + pub fn devmatch(&mut self) -> DEVMATCH_W<5> { + DEVMATCH_W::new(self) + } + #[doc = "Bit 6 - Write '1' to enable interrupt for event DEVMISS"] + #[inline(always)] + #[must_use] + pub fn devmiss(&mut self) -> DEVMISS_W<6> { + DEVMISS_W::new(self) + } + #[doc = "Bit 7 - Write '1' to enable interrupt for event RSSIEND"] + #[inline(always)] + #[must_use] + pub fn rssiend(&mut self) -> RSSIEND_W<7> { + RSSIEND_W::new(self) + } + #[doc = "Bit 10 - Write '1' to enable interrupt for event BCMATCH"] + #[inline(always)] + #[must_use] + pub fn bcmatch(&mut self) -> BCMATCH_W<10> { + BCMATCH_W::new(self) + } + #[doc = "Bit 12 - Write '1' to enable interrupt for event CRCOK"] + #[inline(always)] + #[must_use] + pub fn crcok(&mut self) -> CRCOK_W<12> { + CRCOK_W::new(self) + } + #[doc = "Bit 13 - Write '1' to enable interrupt for event CRCERROR"] + #[inline(always)] + #[must_use] + pub fn crcerror(&mut self) -> CRCERROR_W<13> { + CRCERROR_W::new(self) + } + #[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 = "Enable interrupt\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 [intenset](index.html) module"] +pub struct INTENSET_SPEC; +impl crate::RegisterSpec for INTENSET_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [intenset::R](R) reader structure"] +impl crate::Readable for INTENSET_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [intenset::W](W) writer structure"] +impl crate::Writable for INTENSET_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets INTENSET to value 0"] +impl crate::Resettable for INTENSET_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/radio/mode.rs b/down-the-stack/dk_pac/src/radio/mode.rs new file mode 100644 index 0000000..1533b00 --- /dev/null +++ b/down-the-stack/dk_pac/src/radio/mode.rs @@ -0,0 +1,167 @@ +#[doc = "Register `MODE` 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 `MODE` 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 `MODE` reader - Radio data rate and modulation setting. The radio supports Frequency-shift Keying (FSK) modulation."] +pub type MODE_R = crate::FieldReader; +#[doc = "Radio data rate and modulation setting. The radio supports Frequency-shift Keying (FSK) modulation.\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +#[repr(u8)] +pub enum MODE_A { + #[doc = "0: 1 Mbit/s Nordic proprietary radio mode"] + NRF_1MBIT = 0, + #[doc = "1: 2 Mbit/s Nordic proprietary radio mode"] + NRF_2MBIT = 1, + #[doc = "2: Deprecated enumerator - 250 kbit/s Nordic proprietary radio mode"] + NRF_250KBIT = 2, + #[doc = "3: 1 Mbit/s Bluetooth Low Energy"] + BLE_1MBIT = 3, + #[doc = "4: 2 Mbit/s Bluetooth Low Energy"] + BLE_2MBIT = 4, +} +impl From for u8 { + #[inline(always)] + fn from(variant: MODE_A) -> Self { + variant as _ + } +} +impl MODE_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> Option { + match self.bits { + 0 => Some(MODE_A::NRF_1MBIT), + 1 => Some(MODE_A::NRF_2MBIT), + 2 => Some(MODE_A::NRF_250KBIT), + 3 => Some(MODE_A::BLE_1MBIT), + 4 => Some(MODE_A::BLE_2MBIT), + _ => None, + } + } + #[doc = "Checks if the value of the field is `NRF_1MBIT`"] + #[inline(always)] + pub fn is_nrf_1mbit(&self) -> bool { + *self == MODE_A::NRF_1MBIT + } + #[doc = "Checks if the value of the field is `NRF_2MBIT`"] + #[inline(always)] + pub fn is_nrf_2mbit(&self) -> bool { + *self == MODE_A::NRF_2MBIT + } + #[doc = "Checks if the value of the field is `NRF_250KBIT`"] + #[inline(always)] + pub fn is_nrf_250kbit(&self) -> bool { + *self == MODE_A::NRF_250KBIT + } + #[doc = "Checks if the value of the field is `BLE_1MBIT`"] + #[inline(always)] + pub fn is_ble_1mbit(&self) -> bool { + *self == MODE_A::BLE_1MBIT + } + #[doc = "Checks if the value of the field is `BLE_2MBIT`"] + #[inline(always)] + pub fn is_ble_2mbit(&self) -> bool { + *self == MODE_A::BLE_2MBIT + } +} +#[doc = "Field `MODE` writer - Radio data rate and modulation setting. The radio supports Frequency-shift Keying (FSK) modulation."] +pub type MODE_W<'a, const O: u8> = crate::FieldWriter<'a, u32, MODE_SPEC, u8, MODE_A, 4, O>; +impl<'a, const O: u8> MODE_W<'a, O> { + #[doc = "1 Mbit/s Nordic proprietary radio mode"] + #[inline(always)] + pub fn nrf_1mbit(self) -> &'a mut W { + self.variant(MODE_A::NRF_1MBIT) + } + #[doc = "2 Mbit/s Nordic proprietary radio mode"] + #[inline(always)] + pub fn nrf_2mbit(self) -> &'a mut W { + self.variant(MODE_A::NRF_2MBIT) + } + #[doc = "Deprecated enumerator - 250 kbit/s Nordic proprietary radio mode"] + #[inline(always)] + pub fn nrf_250kbit(self) -> &'a mut W { + self.variant(MODE_A::NRF_250KBIT) + } + #[doc = "1 Mbit/s Bluetooth Low Energy"] + #[inline(always)] + pub fn ble_1mbit(self) -> &'a mut W { + self.variant(MODE_A::BLE_1MBIT) + } + #[doc = "2 Mbit/s Bluetooth Low Energy"] + #[inline(always)] + pub fn ble_2mbit(self) -> &'a mut W { + self.variant(MODE_A::BLE_2MBIT) + } +} +impl R { + #[doc = "Bits 0:3 - Radio data rate and modulation setting. The radio supports Frequency-shift Keying (FSK) modulation."] + #[inline(always)] + pub fn mode(&self) -> MODE_R { + MODE_R::new((self.bits & 0x0f) as u8) + } +} +impl W { + #[doc = "Bits 0:3 - Radio data rate and modulation setting. The radio supports Frequency-shift Keying (FSK) modulation."] + #[inline(always)] + #[must_use] + pub fn mode(&mut self) -> MODE_W<0> { + 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 + } +} +#[doc = "Data rate and modulation\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 [mode](index.html) module"] +pub struct MODE_SPEC; +impl crate::RegisterSpec for MODE_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [mode::R](R) reader structure"] +impl crate::Readable for MODE_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [mode::W](W) writer structure"] +impl crate::Writable for 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 MODE to value 0"] +impl crate::Resettable for MODE_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/radio/modecnf0.rs b/down-the-stack/dk_pac/src/radio/modecnf0.rs new file mode 100644 index 0000000..8197a57 --- /dev/null +++ b/down-the-stack/dk_pac/src/radio/modecnf0.rs @@ -0,0 +1,202 @@ +#[doc = "Register `MODECNF0` 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 `MODECNF0` 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 `RU` reader - Radio ramp-up time"] +pub type RU_R = crate::BitReader; +#[doc = "Radio ramp-up time\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum RU_A { + #[doc = "0: Default ramp-up time (tRXEN), compatible with firmware written for nRF51"] + DEFAULT = 0, + #[doc = "1: Fast ramp-up (tRXEN,FAST), see electrical specification for more information"] + FAST = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: RU_A) -> Self { + variant as u8 != 0 + } +} +impl RU_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> RU_A { + match self.bits { + false => RU_A::DEFAULT, + true => RU_A::FAST, + } + } + #[doc = "Checks if the value of the field is `DEFAULT`"] + #[inline(always)] + pub fn is_default(&self) -> bool { + *self == RU_A::DEFAULT + } + #[doc = "Checks if the value of the field is `FAST`"] + #[inline(always)] + pub fn is_fast(&self) -> bool { + *self == RU_A::FAST + } +} +#[doc = "Field `RU` writer - Radio ramp-up time"] +pub type RU_W<'a, const O: u8> = crate::BitWriter<'a, u32, MODECNF0_SPEC, RU_A, O>; +impl<'a, const O: u8> RU_W<'a, O> { + #[doc = "Default ramp-up time (tRXEN), compatible with firmware written for nRF51"] + #[inline(always)] + pub fn default(self) -> &'a mut W { + self.variant(RU_A::DEFAULT) + } + #[doc = "Fast ramp-up (tRXEN,FAST), see electrical specification for more information"] + #[inline(always)] + pub fn fast(self) -> &'a mut W { + self.variant(RU_A::FAST) + } +} +#[doc = "Field `DTX` reader - Default TX value"] +pub type DTX_R = crate::FieldReader; +#[doc = "Default TX value\n\nValue on reset: 2"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +#[repr(u8)] +pub enum DTX_A { + #[doc = "0: Transmit '1'"] + B1 = 0, + #[doc = "1: Transmit '0'"] + B0 = 1, + #[doc = "2: Transmit center frequency"] + CENTER = 2, +} +impl From for u8 { + #[inline(always)] + fn from(variant: DTX_A) -> Self { + variant as _ + } +} +impl DTX_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> Option { + match self.bits { + 0 => Some(DTX_A::B1), + 1 => Some(DTX_A::B0), + 2 => Some(DTX_A::CENTER), + _ => None, + } + } + #[doc = "Checks if the value of the field is `B1`"] + #[inline(always)] + pub fn is_b1(&self) -> bool { + *self == DTX_A::B1 + } + #[doc = "Checks if the value of the field is `B0`"] + #[inline(always)] + pub fn is_b0(&self) -> bool { + *self == DTX_A::B0 + } + #[doc = "Checks if the value of the field is `CENTER`"] + #[inline(always)] + pub fn is_center(&self) -> bool { + *self == DTX_A::CENTER + } +} +#[doc = "Field `DTX` writer - Default TX value"] +pub type DTX_W<'a, const O: u8> = crate::FieldWriter<'a, u32, MODECNF0_SPEC, u8, DTX_A, 2, O>; +impl<'a, const O: u8> DTX_W<'a, O> { + #[doc = "Transmit '1'"] + #[inline(always)] + pub fn b1(self) -> &'a mut W { + self.variant(DTX_A::B1) + } + #[doc = "Transmit '0'"] + #[inline(always)] + pub fn b0(self) -> &'a mut W { + self.variant(DTX_A::B0) + } + #[doc = "Transmit center frequency"] + #[inline(always)] + pub fn center(self) -> &'a mut W { + self.variant(DTX_A::CENTER) + } +} +impl R { + #[doc = "Bit 0 - Radio ramp-up time"] + #[inline(always)] + pub fn ru(&self) -> RU_R { + RU_R::new((self.bits & 1) != 0) + } + #[doc = "Bits 8:9 - Default TX value"] + #[inline(always)] + pub fn dtx(&self) -> DTX_R { + DTX_R::new(((self.bits >> 8) & 3) as u8) + } +} +impl W { + #[doc = "Bit 0 - Radio ramp-up time"] + #[inline(always)] + #[must_use] + pub fn ru(&mut self) -> RU_W<0> { + RU_W::new(self) + } + #[doc = "Bits 8:9 - Default TX value"] + #[inline(always)] + #[must_use] + pub fn dtx(&mut self) -> DTX_W<8> { + DTX_W::new(self) + } + #[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 = "Radio mode configuration register 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 [modecnf0](index.html) module"] +pub struct MODECNF0_SPEC; +impl crate::RegisterSpec for MODECNF0_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [modecnf0::R](R) reader structure"] +impl crate::Readable for MODECNF0_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [modecnf0::W](W) writer structure"] +impl crate::Writable for MODECNF0_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets MODECNF0 to value 0x0200"] +impl crate::Resettable for MODECNF0_SPEC { + const RESET_VALUE: Self::Ux = 0x0200; +} diff --git a/down-the-stack/dk_pac/src/radio/packetptr.rs b/down-the-stack/dk_pac/src/radio/packetptr.rs new file mode 100644 index 0000000..6bde097 --- /dev/null +++ b/down-the-stack/dk_pac/src/radio/packetptr.rs @@ -0,0 +1,81 @@ +#[doc = "Register `PACKETPTR` 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 `PACKETPTR` 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 `PACKETPTR` reader - Packet pointer"] +pub type PACKETPTR_R = crate::FieldReader; +#[doc = "Field `PACKETPTR` writer - Packet pointer"] +pub type PACKETPTR_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, PACKETPTR_SPEC, u32, u32, 32, O>; +impl R { + #[doc = "Bits 0:31 - Packet pointer"] + #[inline(always)] + pub fn packetptr(&self) -> PACKETPTR_R { + PACKETPTR_R::new(self.bits) + } +} +impl W { + #[doc = "Bits 0:31 - Packet pointer"] + #[inline(always)] + #[must_use] + pub fn packetptr(&mut self) -> PACKETPTR_W<0> { + PACKETPTR_W::new(self) + } + #[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 = "Packet pointer\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 [packetptr](index.html) module"] +pub struct PACKETPTR_SPEC; +impl crate::RegisterSpec for PACKETPTR_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [packetptr::R](R) reader structure"] +impl crate::Readable for PACKETPTR_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [packetptr::W](W) writer structure"] +impl crate::Writable for PACKETPTR_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets PACKETPTR to value 0"] +impl crate::Resettable for PACKETPTR_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/radio/pcnf0.rs b/down-the-stack/dk_pac/src/radio/pcnf0.rs new file mode 100644 index 0000000..21035f7 --- /dev/null +++ b/down-the-stack/dk_pac/src/radio/pcnf0.rs @@ -0,0 +1,232 @@ +#[doc = "Register `PCNF0` 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 `PCNF0` 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 `LFLEN` reader - Length on air of LENGTH field in number of bits."] +pub type LFLEN_R = crate::FieldReader; +#[doc = "Field `LFLEN` writer - Length on air of LENGTH field in number of bits."] +pub type LFLEN_W<'a, const O: u8> = crate::FieldWriter<'a, u32, PCNF0_SPEC, u8, u8, 4, O>; +#[doc = "Field `S0LEN` reader - Length on air of S0 field in number of bytes."] +pub type S0LEN_R = crate::BitReader; +#[doc = "Field `S0LEN` writer - Length on air of S0 field in number of bytes."] +pub type S0LEN_W<'a, const O: u8> = crate::BitWriter<'a, u32, PCNF0_SPEC, bool, O>; +#[doc = "Field `S1LEN` reader - Length on air of S1 field in number of bits."] +pub type S1LEN_R = crate::FieldReader; +#[doc = "Field `S1LEN` writer - Length on air of S1 field in number of bits."] +pub type S1LEN_W<'a, const O: u8> = crate::FieldWriter<'a, u32, PCNF0_SPEC, u8, u8, 4, O>; +#[doc = "Field `S1INCL` reader - Include or exclude S1 field in RAM"] +pub type S1INCL_R = crate::BitReader; +#[doc = "Include or exclude S1 field in RAM\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum S1INCL_A { + #[doc = "0: Include S1 field in RAM only if S1LEN > 0"] + AUTOMATIC = 0, + #[doc = "1: Always include S1 field in RAM independent of S1LEN"] + INCLUDE = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: S1INCL_A) -> Self { + variant as u8 != 0 + } +} +impl S1INCL_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> S1INCL_A { + match self.bits { + false => S1INCL_A::AUTOMATIC, + true => S1INCL_A::INCLUDE, + } + } + #[doc = "Checks if the value of the field is `AUTOMATIC`"] + #[inline(always)] + pub fn is_automatic(&self) -> bool { + *self == S1INCL_A::AUTOMATIC + } + #[doc = "Checks if the value of the field is `INCLUDE`"] + #[inline(always)] + pub fn is_include(&self) -> bool { + *self == S1INCL_A::INCLUDE + } +} +#[doc = "Field `S1INCL` writer - Include or exclude S1 field in RAM"] +pub type S1INCL_W<'a, const O: u8> = crate::BitWriter<'a, u32, PCNF0_SPEC, S1INCL_A, O>; +impl<'a, const O: u8> S1INCL_W<'a, O> { + #[doc = "Include S1 field in RAM only if S1LEN > 0"] + #[inline(always)] + pub fn automatic(self) -> &'a mut W { + self.variant(S1INCL_A::AUTOMATIC) + } + #[doc = "Always include S1 field in RAM independent of S1LEN"] + #[inline(always)] + pub fn include(self) -> &'a mut W { + self.variant(S1INCL_A::INCLUDE) + } +} +#[doc = "Field `PLEN` reader - Length of preamble on air. Decision point: TASKS_START task"] +pub type PLEN_R = crate::BitReader; +#[doc = "Length of preamble on air. Decision point: TASKS_START task\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PLEN_A { + #[doc = "0: 8-bit preamble"] + _8BIT = 0, + #[doc = "1: 16-bit preamble"] + _16BIT = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PLEN_A) -> Self { + variant as u8 != 0 + } +} +impl PLEN_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> PLEN_A { + match self.bits { + false => PLEN_A::_8BIT, + true => PLEN_A::_16BIT, + } + } + #[doc = "Checks if the value of the field is `_8BIT`"] + #[inline(always)] + pub fn is_8bit(&self) -> bool { + *self == PLEN_A::_8BIT + } + #[doc = "Checks if the value of the field is `_16BIT`"] + #[inline(always)] + pub fn is_16bit(&self) -> bool { + *self == PLEN_A::_16BIT + } +} +#[doc = "Field `PLEN` writer - Length of preamble on air. Decision point: TASKS_START task"] +pub type PLEN_W<'a, const O: u8> = crate::BitWriter<'a, u32, PCNF0_SPEC, PLEN_A, O>; +impl<'a, const O: u8> PLEN_W<'a, O> { + #[doc = "8-bit preamble"] + #[inline(always)] + pub fn _8bit(self) -> &'a mut W { + self.variant(PLEN_A::_8BIT) + } + #[doc = "16-bit preamble"] + #[inline(always)] + pub fn _16bit(self) -> &'a mut W { + self.variant(PLEN_A::_16BIT) + } +} +impl R { + #[doc = "Bits 0:3 - Length on air of LENGTH field in number of bits."] + #[inline(always)] + pub fn lflen(&self) -> LFLEN_R { + LFLEN_R::new((self.bits & 0x0f) as u8) + } + #[doc = "Bit 8 - Length on air of S0 field in number of bytes."] + #[inline(always)] + pub fn s0len(&self) -> S0LEN_R { + S0LEN_R::new(((self.bits >> 8) & 1) != 0) + } + #[doc = "Bits 16:19 - Length on air of S1 field in number of bits."] + #[inline(always)] + pub fn s1len(&self) -> S1LEN_R { + S1LEN_R::new(((self.bits >> 16) & 0x0f) as u8) + } + #[doc = "Bit 20 - Include or exclude S1 field in RAM"] + #[inline(always)] + pub fn s1incl(&self) -> S1INCL_R { + S1INCL_R::new(((self.bits >> 20) & 1) != 0) + } + #[doc = "Bit 24 - Length of preamble on air. Decision point: TASKS_START task"] + #[inline(always)] + pub fn plen(&self) -> PLEN_R { + PLEN_R::new(((self.bits >> 24) & 1) != 0) + } +} +impl W { + #[doc = "Bits 0:3 - Length on air of LENGTH field in number of bits."] + #[inline(always)] + #[must_use] + pub fn lflen(&mut self) -> LFLEN_W<0> { + LFLEN_W::new(self) + } + #[doc = "Bit 8 - Length on air of S0 field in number of bytes."] + #[inline(always)] + #[must_use] + pub fn s0len(&mut self) -> S0LEN_W<8> { + S0LEN_W::new(self) + } + #[doc = "Bits 16:19 - Length on air of S1 field in number of bits."] + #[inline(always)] + #[must_use] + pub fn s1len(&mut self) -> S1LEN_W<16> { + S1LEN_W::new(self) + } + #[doc = "Bit 20 - Include or exclude S1 field in RAM"] + #[inline(always)] + #[must_use] + pub fn s1incl(&mut self) -> S1INCL_W<20> { + S1INCL_W::new(self) + } + #[doc = "Bit 24 - Length of preamble on air. Decision point: TASKS_START task"] + #[inline(always)] + #[must_use] + pub fn plen(&mut self) -> PLEN_W<24> { + PLEN_W::new(self) + } + #[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 = "Packet configuration register 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 [pcnf0](index.html) module"] +pub struct PCNF0_SPEC; +impl crate::RegisterSpec for PCNF0_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [pcnf0::R](R) reader structure"] +impl crate::Readable for PCNF0_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [pcnf0::W](W) writer structure"] +impl crate::Writable for PCNF0_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets PCNF0 to value 0"] +impl crate::Resettable for PCNF0_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/radio/pcnf1.rs b/down-the-stack/dk_pac/src/radio/pcnf1.rs new file mode 100644 index 0000000..7e60f07 --- /dev/null +++ b/down-the-stack/dk_pac/src/radio/pcnf1.rs @@ -0,0 +1,232 @@ +#[doc = "Register `PCNF1` 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 `PCNF1` 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 `MAXLEN` reader - Maximum length of packet payload. If the packet payload is larger than MAXLEN, the radio will truncate the payload to MAXLEN."] +pub type MAXLEN_R = crate::FieldReader; +#[doc = "Field `MAXLEN` writer - Maximum length of packet payload. If the packet payload is larger than MAXLEN, the radio will truncate the payload to MAXLEN."] +pub type MAXLEN_W<'a, const O: u8> = crate::FieldWriter<'a, u32, PCNF1_SPEC, u8, u8, 8, O>; +#[doc = "Field `STATLEN` reader - Static length in number of bytes"] +pub type STATLEN_R = crate::FieldReader; +#[doc = "Field `STATLEN` writer - Static length in number of bytes"] +pub type STATLEN_W<'a, const O: u8> = crate::FieldWriter<'a, u32, PCNF1_SPEC, u8, u8, 8, O>; +#[doc = "Field `BALEN` reader - Base address length in number of bytes"] +pub type BALEN_R = crate::FieldReader; +#[doc = "Field `BALEN` writer - Base address length in number of bytes"] +pub type BALEN_W<'a, const O: u8> = crate::FieldWriter<'a, u32, PCNF1_SPEC, u8, u8, 3, O>; +#[doc = "Field `ENDIAN` reader - On air endianness of packet, this applies to the S0, LENGTH, S1 and the PAYLOAD fields."] +pub type ENDIAN_R = crate::BitReader; +#[doc = "On air endianness of packet, this applies to the S0, LENGTH, S1 and the PAYLOAD fields.\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum ENDIAN_A { + #[doc = "0: Least Significant bit on air first"] + LITTLE = 0, + #[doc = "1: Most significant bit on air first"] + BIG = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: ENDIAN_A) -> Self { + variant as u8 != 0 + } +} +impl ENDIAN_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> ENDIAN_A { + match self.bits { + false => ENDIAN_A::LITTLE, + true => ENDIAN_A::BIG, + } + } + #[doc = "Checks if the value of the field is `LITTLE`"] + #[inline(always)] + pub fn is_little(&self) -> bool { + *self == ENDIAN_A::LITTLE + } + #[doc = "Checks if the value of the field is `BIG`"] + #[inline(always)] + pub fn is_big(&self) -> bool { + *self == ENDIAN_A::BIG + } +} +#[doc = "Field `ENDIAN` writer - On air endianness of packet, this applies to the S0, LENGTH, S1 and the PAYLOAD fields."] +pub type ENDIAN_W<'a, const O: u8> = crate::BitWriter<'a, u32, PCNF1_SPEC, ENDIAN_A, O>; +impl<'a, const O: u8> ENDIAN_W<'a, O> { + #[doc = "Least Significant bit on air first"] + #[inline(always)] + pub fn little(self) -> &'a mut W { + self.variant(ENDIAN_A::LITTLE) + } + #[doc = "Most significant bit on air first"] + #[inline(always)] + pub fn big(self) -> &'a mut W { + self.variant(ENDIAN_A::BIG) + } +} +#[doc = "Field `WHITEEN` reader - Enable or disable packet whitening"] +pub type WHITEEN_R = crate::BitReader; +#[doc = "Enable or disable packet whitening\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum WHITEEN_A { + #[doc = "0: Disable"] + DISABLED = 0, + #[doc = "1: Enable"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: WHITEEN_A) -> Self { + variant as u8 != 0 + } +} +impl WHITEEN_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> WHITEEN_A { + match self.bits { + false => WHITEEN_A::DISABLED, + true => WHITEEN_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == WHITEEN_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == WHITEEN_A::ENABLED + } +} +#[doc = "Field `WHITEEN` writer - Enable or disable packet whitening"] +pub type WHITEEN_W<'a, const O: u8> = crate::BitWriter<'a, u32, PCNF1_SPEC, WHITEEN_A, O>; +impl<'a, const O: u8> WHITEEN_W<'a, O> { + #[doc = "Disable"] + #[inline(always)] + pub fn disabled(self) -> &'a mut W { + self.variant(WHITEEN_A::DISABLED) + } + #[doc = "Enable"] + #[inline(always)] + pub fn enabled(self) -> &'a mut W { + self.variant(WHITEEN_A::ENABLED) + } +} +impl R { + #[doc = "Bits 0:7 - Maximum length of packet payload. If the packet payload is larger than MAXLEN, the radio will truncate the payload to MAXLEN."] + #[inline(always)] + pub fn maxlen(&self) -> MAXLEN_R { + MAXLEN_R::new((self.bits & 0xff) as u8) + } + #[doc = "Bits 8:15 - Static length in number of bytes"] + #[inline(always)] + pub fn statlen(&self) -> STATLEN_R { + STATLEN_R::new(((self.bits >> 8) & 0xff) as u8) + } + #[doc = "Bits 16:18 - Base address length in number of bytes"] + #[inline(always)] + pub fn balen(&self) -> BALEN_R { + BALEN_R::new(((self.bits >> 16) & 7) as u8) + } + #[doc = "Bit 24 - On air endianness of packet, this applies to the S0, LENGTH, S1 and the PAYLOAD fields."] + #[inline(always)] + pub fn endian(&self) -> ENDIAN_R { + ENDIAN_R::new(((self.bits >> 24) & 1) != 0) + } + #[doc = "Bit 25 - Enable or disable packet whitening"] + #[inline(always)] + pub fn whiteen(&self) -> WHITEEN_R { + WHITEEN_R::new(((self.bits >> 25) & 1) != 0) + } +} +impl W { + #[doc = "Bits 0:7 - Maximum length of packet payload. If the packet payload is larger than MAXLEN, the radio will truncate the payload to MAXLEN."] + #[inline(always)] + #[must_use] + pub fn maxlen(&mut self) -> MAXLEN_W<0> { + MAXLEN_W::new(self) + } + #[doc = "Bits 8:15 - Static length in number of bytes"] + #[inline(always)] + #[must_use] + pub fn statlen(&mut self) -> STATLEN_W<8> { + STATLEN_W::new(self) + } + #[doc = "Bits 16:18 - Base address length in number of bytes"] + #[inline(always)] + #[must_use] + pub fn balen(&mut self) -> BALEN_W<16> { + BALEN_W::new(self) + } + #[doc = "Bit 24 - On air endianness of packet, this applies to the S0, LENGTH, S1 and the PAYLOAD fields."] + #[inline(always)] + #[must_use] + pub fn endian(&mut self) -> ENDIAN_W<24> { + ENDIAN_W::new(self) + } + #[doc = "Bit 25 - Enable or disable packet whitening"] + #[inline(always)] + #[must_use] + pub fn whiteen(&mut self) -> WHITEEN_W<25> { + WHITEEN_W::new(self) + } + #[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 = "Packet configuration register 1\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 [pcnf1](index.html) module"] +pub struct PCNF1_SPEC; +impl crate::RegisterSpec for PCNF1_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [pcnf1::R](R) reader structure"] +impl crate::Readable for PCNF1_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [pcnf1::W](W) writer structure"] +impl crate::Writable for PCNF1_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets PCNF1 to value 0"] +impl crate::Resettable for PCNF1_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/radio/power.rs b/down-the-stack/dk_pac/src/radio/power.rs new file mode 100644 index 0000000..1e13d44 --- /dev/null +++ b/down-the-stack/dk_pac/src/radio/power.rs @@ -0,0 +1,126 @@ +#[doc = "Register `POWER` 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 `POWER` 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 `POWER` reader - Peripheral power control. The peripheral and its registers will be reset to its initial state by switching the peripheral off and then back on again."] +pub type POWER_R = crate::BitReader; +#[doc = "Peripheral power control. The peripheral and its registers will be reset to its initial state by switching the peripheral off and then back on again.\n\nValue on reset: 1"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum POWER_A { + #[doc = "0: Peripheral is powered off"] + DISABLED = 0, + #[doc = "1: Peripheral is powered on"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: POWER_A) -> Self { + variant as u8 != 0 + } +} +impl POWER_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> POWER_A { + match self.bits { + false => POWER_A::DISABLED, + true => POWER_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == POWER_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == POWER_A::ENABLED + } +} +#[doc = "Field `POWER` writer - Peripheral power control. The peripheral and its registers will be reset to its initial state by switching the peripheral off and then back on again."] +pub type POWER_W<'a, const O: u8> = crate::BitWriter<'a, u32, POWER_SPEC, POWER_A, O>; +impl<'a, const O: u8> POWER_W<'a, O> { + #[doc = "Peripheral is powered off"] + #[inline(always)] + pub fn disabled(self) -> &'a mut W { + self.variant(POWER_A::DISABLED) + } + #[doc = "Peripheral is powered on"] + #[inline(always)] + pub fn enabled(self) -> &'a mut W { + self.variant(POWER_A::ENABLED) + } +} +impl R { + #[doc = "Bit 0 - Peripheral power control. The peripheral and its registers will be reset to its initial state by switching the peripheral off and then back on again."] + #[inline(always)] + pub fn power(&self) -> POWER_R { + POWER_R::new((self.bits & 1) != 0) + } +} +impl W { + #[doc = "Bit 0 - Peripheral power control. The peripheral and its registers will be reset to its initial state by switching the peripheral off and then back on again."] + #[inline(always)] + #[must_use] + pub fn power(&mut self) -> POWER_W<0> { + POWER_W::new(self) + } + #[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 = "Peripheral power control\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 [power](index.html) module"] +pub struct POWER_SPEC; +impl crate::RegisterSpec for POWER_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [power::R](R) reader structure"] +impl crate::Readable for POWER_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [power::W](W) writer structure"] +impl crate::Writable for POWER_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets POWER to value 0x01"] +impl crate::Resettable for POWER_SPEC { + const RESET_VALUE: Self::Ux = 0x01; +} diff --git a/down-the-stack/dk_pac/src/radio/prefix0.rs b/down-the-stack/dk_pac/src/radio/prefix0.rs new file mode 100644 index 0000000..40e993a --- /dev/null +++ b/down-the-stack/dk_pac/src/radio/prefix0.rs @@ -0,0 +1,125 @@ +#[doc = "Register `PREFIX0` 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 `PREFIX0` 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 `AP0` reader - Address prefix 0."] +pub type AP0_R = crate::FieldReader; +#[doc = "Field `AP0` writer - Address prefix 0."] +pub type AP0_W<'a, const O: u8> = crate::FieldWriter<'a, u32, PREFIX0_SPEC, u8, u8, 8, O>; +#[doc = "Field `AP1` reader - Address prefix 1."] +pub type AP1_R = crate::FieldReader; +#[doc = "Field `AP1` writer - Address prefix 1."] +pub type AP1_W<'a, const O: u8> = crate::FieldWriter<'a, u32, PREFIX0_SPEC, u8, u8, 8, O>; +#[doc = "Field `AP2` reader - Address prefix 2."] +pub type AP2_R = crate::FieldReader; +#[doc = "Field `AP2` writer - Address prefix 2."] +pub type AP2_W<'a, const O: u8> = crate::FieldWriter<'a, u32, PREFIX0_SPEC, u8, u8, 8, O>; +#[doc = "Field `AP3` reader - Address prefix 3."] +pub type AP3_R = crate::FieldReader; +#[doc = "Field `AP3` writer - Address prefix 3."] +pub type AP3_W<'a, const O: u8> = crate::FieldWriter<'a, u32, PREFIX0_SPEC, u8, u8, 8, O>; +impl R { + #[doc = "Bits 0:7 - Address prefix 0."] + #[inline(always)] + pub fn ap0(&self) -> AP0_R { + AP0_R::new((self.bits & 0xff) as u8) + } + #[doc = "Bits 8:15 - Address prefix 1."] + #[inline(always)] + pub fn ap1(&self) -> AP1_R { + AP1_R::new(((self.bits >> 8) & 0xff) as u8) + } + #[doc = "Bits 16:23 - Address prefix 2."] + #[inline(always)] + pub fn ap2(&self) -> AP2_R { + AP2_R::new(((self.bits >> 16) & 0xff) as u8) + } + #[doc = "Bits 24:31 - Address prefix 3."] + #[inline(always)] + pub fn ap3(&self) -> AP3_R { + AP3_R::new(((self.bits >> 24) & 0xff) as u8) + } +} +impl W { + #[doc = "Bits 0:7 - Address prefix 0."] + #[inline(always)] + #[must_use] + pub fn ap0(&mut self) -> AP0_W<0> { + AP0_W::new(self) + } + #[doc = "Bits 8:15 - Address prefix 1."] + #[inline(always)] + #[must_use] + pub fn ap1(&mut self) -> AP1_W<8> { + AP1_W::new(self) + } + #[doc = "Bits 16:23 - Address prefix 2."] + #[inline(always)] + #[must_use] + pub fn ap2(&mut self) -> AP2_W<16> { + AP2_W::new(self) + } + #[doc = "Bits 24:31 - Address prefix 3."] + #[inline(always)] + #[must_use] + pub fn ap3(&mut self) -> AP3_W<24> { + AP3_W::new(self) + } + #[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 = "Prefixes bytes for logical addresses 0-3\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 [prefix0](index.html) module"] +pub struct PREFIX0_SPEC; +impl crate::RegisterSpec for PREFIX0_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [prefix0::R](R) reader structure"] +impl crate::Readable for PREFIX0_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [prefix0::W](W) writer structure"] +impl crate::Writable for PREFIX0_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets PREFIX0 to value 0"] +impl crate::Resettable for PREFIX0_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/radio/prefix1.rs b/down-the-stack/dk_pac/src/radio/prefix1.rs new file mode 100644 index 0000000..7302f62 --- /dev/null +++ b/down-the-stack/dk_pac/src/radio/prefix1.rs @@ -0,0 +1,125 @@ +#[doc = "Register `PREFIX1` 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 `PREFIX1` 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 `AP4` reader - Address prefix 4."] +pub type AP4_R = crate::FieldReader; +#[doc = "Field `AP4` writer - Address prefix 4."] +pub type AP4_W<'a, const O: u8> = crate::FieldWriter<'a, u32, PREFIX1_SPEC, u8, u8, 8, O>; +#[doc = "Field `AP5` reader - Address prefix 5."] +pub type AP5_R = crate::FieldReader; +#[doc = "Field `AP5` writer - Address prefix 5."] +pub type AP5_W<'a, const O: u8> = crate::FieldWriter<'a, u32, PREFIX1_SPEC, u8, u8, 8, O>; +#[doc = "Field `AP6` reader - Address prefix 6."] +pub type AP6_R = crate::FieldReader; +#[doc = "Field `AP6` writer - Address prefix 6."] +pub type AP6_W<'a, const O: u8> = crate::FieldWriter<'a, u32, PREFIX1_SPEC, u8, u8, 8, O>; +#[doc = "Field `AP7` reader - Address prefix 7."] +pub type AP7_R = crate::FieldReader; +#[doc = "Field `AP7` writer - Address prefix 7."] +pub type AP7_W<'a, const O: u8> = crate::FieldWriter<'a, u32, PREFIX1_SPEC, u8, u8, 8, O>; +impl R { + #[doc = "Bits 0:7 - Address prefix 4."] + #[inline(always)] + pub fn ap4(&self) -> AP4_R { + AP4_R::new((self.bits & 0xff) as u8) + } + #[doc = "Bits 8:15 - Address prefix 5."] + #[inline(always)] + pub fn ap5(&self) -> AP5_R { + AP5_R::new(((self.bits >> 8) & 0xff) as u8) + } + #[doc = "Bits 16:23 - Address prefix 6."] + #[inline(always)] + pub fn ap6(&self) -> AP6_R { + AP6_R::new(((self.bits >> 16) & 0xff) as u8) + } + #[doc = "Bits 24:31 - Address prefix 7."] + #[inline(always)] + pub fn ap7(&self) -> AP7_R { + AP7_R::new(((self.bits >> 24) & 0xff) as u8) + } +} +impl W { + #[doc = "Bits 0:7 - Address prefix 4."] + #[inline(always)] + #[must_use] + pub fn ap4(&mut self) -> AP4_W<0> { + AP4_W::new(self) + } + #[doc = "Bits 8:15 - Address prefix 5."] + #[inline(always)] + #[must_use] + pub fn ap5(&mut self) -> AP5_W<8> { + AP5_W::new(self) + } + #[doc = "Bits 16:23 - Address prefix 6."] + #[inline(always)] + #[must_use] + pub fn ap6(&mut self) -> AP6_W<16> { + AP6_W::new(self) + } + #[doc = "Bits 24:31 - Address prefix 7."] + #[inline(always)] + #[must_use] + pub fn ap7(&mut self) -> AP7_W<24> { + AP7_W::new(self) + } + #[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 = "Prefixes bytes for logical addresses 4-7\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 [prefix1](index.html) module"] +pub struct PREFIX1_SPEC; +impl crate::RegisterSpec for PREFIX1_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [prefix1::R](R) reader structure"] +impl crate::Readable for PREFIX1_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [prefix1::W](W) writer structure"] +impl crate::Writable for PREFIX1_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets PREFIX1 to value 0"] +impl crate::Resettable for PREFIX1_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/radio/rssisample.rs b/down-the-stack/dk_pac/src/radio/rssisample.rs new file mode 100644 index 0000000..6aebe34 --- /dev/null +++ b/down-the-stack/dk_pac/src/radio/rssisample.rs @@ -0,0 +1,37 @@ +#[doc = "Register `RSSISAMPLE` 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 = "Field `RSSISAMPLE` reader - RSSI sample"] +pub type RSSISAMPLE_R = crate::FieldReader; +impl R { + #[doc = "Bits 0:6 - RSSI sample"] + #[inline(always)] + pub fn rssisample(&self) -> RSSISAMPLE_R { + RSSISAMPLE_R::new((self.bits & 0x7f) as u8) + } +} +#[doc = "RSSI sample\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 [rssisample](index.html) module"] +pub struct RSSISAMPLE_SPEC; +impl crate::RegisterSpec for RSSISAMPLE_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [rssisample::R](R) reader structure"] +impl crate::Readable for RSSISAMPLE_SPEC { + type Reader = R; +} +#[doc = "`reset()` method sets RSSISAMPLE to value 0"] +impl crate::Resettable for RSSISAMPLE_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/radio/rxaddresses.rs b/down-the-stack/dk_pac/src/radio/rxaddresses.rs new file mode 100644 index 0000000..b20ccde --- /dev/null +++ b/down-the-stack/dk_pac/src/radio/rxaddresses.rs @@ -0,0 +1,553 @@ +#[doc = "Register `RXADDRESSES` 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 `RXADDRESSES` 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 `ADDR0` reader - Enable or disable reception on logical address 0."] +pub type ADDR0_R = crate::BitReader; +#[doc = "Enable or disable reception on logical address 0.\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum ADDR0_A { + #[doc = "0: Disable"] + DISABLED = 0, + #[doc = "1: Enable"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: ADDR0_A) -> Self { + variant as u8 != 0 + } +} +impl ADDR0_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> ADDR0_A { + match self.bits { + false => ADDR0_A::DISABLED, + true => ADDR0_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == ADDR0_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == ADDR0_A::ENABLED + } +} +#[doc = "Field `ADDR0` writer - Enable or disable reception on logical address 0."] +pub type ADDR0_W<'a, const O: u8> = crate::BitWriter<'a, u32, RXADDRESSES_SPEC, ADDR0_A, O>; +impl<'a, const O: u8> ADDR0_W<'a, O> { + #[doc = "Disable"] + #[inline(always)] + pub fn disabled(self) -> &'a mut W { + self.variant(ADDR0_A::DISABLED) + } + #[doc = "Enable"] + #[inline(always)] + pub fn enabled(self) -> &'a mut W { + self.variant(ADDR0_A::ENABLED) + } +} +#[doc = "Field `ADDR1` reader - Enable or disable reception on logical address 1."] +pub type ADDR1_R = crate::BitReader; +#[doc = "Enable or disable reception on logical address 1.\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum ADDR1_A { + #[doc = "0: Disable"] + DISABLED = 0, + #[doc = "1: Enable"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: ADDR1_A) -> Self { + variant as u8 != 0 + } +} +impl ADDR1_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> ADDR1_A { + match self.bits { + false => ADDR1_A::DISABLED, + true => ADDR1_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == ADDR1_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == ADDR1_A::ENABLED + } +} +#[doc = "Field `ADDR1` writer - Enable or disable reception on logical address 1."] +pub type ADDR1_W<'a, const O: u8> = crate::BitWriter<'a, u32, RXADDRESSES_SPEC, ADDR1_A, O>; +impl<'a, const O: u8> ADDR1_W<'a, O> { + #[doc = "Disable"] + #[inline(always)] + pub fn disabled(self) -> &'a mut W { + self.variant(ADDR1_A::DISABLED) + } + #[doc = "Enable"] + #[inline(always)] + pub fn enabled(self) -> &'a mut W { + self.variant(ADDR1_A::ENABLED) + } +} +#[doc = "Field `ADDR2` reader - Enable or disable reception on logical address 2."] +pub type ADDR2_R = crate::BitReader; +#[doc = "Enable or disable reception on logical address 2.\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum ADDR2_A { + #[doc = "0: Disable"] + DISABLED = 0, + #[doc = "1: Enable"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: ADDR2_A) -> Self { + variant as u8 != 0 + } +} +impl ADDR2_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> ADDR2_A { + match self.bits { + false => ADDR2_A::DISABLED, + true => ADDR2_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == ADDR2_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == ADDR2_A::ENABLED + } +} +#[doc = "Field `ADDR2` writer - Enable or disable reception on logical address 2."] +pub type ADDR2_W<'a, const O: u8> = crate::BitWriter<'a, u32, RXADDRESSES_SPEC, ADDR2_A, O>; +impl<'a, const O: u8> ADDR2_W<'a, O> { + #[doc = "Disable"] + #[inline(always)] + pub fn disabled(self) -> &'a mut W { + self.variant(ADDR2_A::DISABLED) + } + #[doc = "Enable"] + #[inline(always)] + pub fn enabled(self) -> &'a mut W { + self.variant(ADDR2_A::ENABLED) + } +} +#[doc = "Field `ADDR3` reader - Enable or disable reception on logical address 3."] +pub type ADDR3_R = crate::BitReader; +#[doc = "Enable or disable reception on logical address 3.\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum ADDR3_A { + #[doc = "0: Disable"] + DISABLED = 0, + #[doc = "1: Enable"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: ADDR3_A) -> Self { + variant as u8 != 0 + } +} +impl ADDR3_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> ADDR3_A { + match self.bits { + false => ADDR3_A::DISABLED, + true => ADDR3_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == ADDR3_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == ADDR3_A::ENABLED + } +} +#[doc = "Field `ADDR3` writer - Enable or disable reception on logical address 3."] +pub type ADDR3_W<'a, const O: u8> = crate::BitWriter<'a, u32, RXADDRESSES_SPEC, ADDR3_A, O>; +impl<'a, const O: u8> ADDR3_W<'a, O> { + #[doc = "Disable"] + #[inline(always)] + pub fn disabled(self) -> &'a mut W { + self.variant(ADDR3_A::DISABLED) + } + #[doc = "Enable"] + #[inline(always)] + pub fn enabled(self) -> &'a mut W { + self.variant(ADDR3_A::ENABLED) + } +} +#[doc = "Field `ADDR4` reader - Enable or disable reception on logical address 4."] +pub type ADDR4_R = crate::BitReader; +#[doc = "Enable or disable reception on logical address 4.\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum ADDR4_A { + #[doc = "0: Disable"] + DISABLED = 0, + #[doc = "1: Enable"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: ADDR4_A) -> Self { + variant as u8 != 0 + } +} +impl ADDR4_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> ADDR4_A { + match self.bits { + false => ADDR4_A::DISABLED, + true => ADDR4_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == ADDR4_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == ADDR4_A::ENABLED + } +} +#[doc = "Field `ADDR4` writer - Enable or disable reception on logical address 4."] +pub type ADDR4_W<'a, const O: u8> = crate::BitWriter<'a, u32, RXADDRESSES_SPEC, ADDR4_A, O>; +impl<'a, const O: u8> ADDR4_W<'a, O> { + #[doc = "Disable"] + #[inline(always)] + pub fn disabled(self) -> &'a mut W { + self.variant(ADDR4_A::DISABLED) + } + #[doc = "Enable"] + #[inline(always)] + pub fn enabled(self) -> &'a mut W { + self.variant(ADDR4_A::ENABLED) + } +} +#[doc = "Field `ADDR5` reader - Enable or disable reception on logical address 5."] +pub type ADDR5_R = crate::BitReader; +#[doc = "Enable or disable reception on logical address 5.\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum ADDR5_A { + #[doc = "0: Disable"] + DISABLED = 0, + #[doc = "1: Enable"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: ADDR5_A) -> Self { + variant as u8 != 0 + } +} +impl ADDR5_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> ADDR5_A { + match self.bits { + false => ADDR5_A::DISABLED, + true => ADDR5_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == ADDR5_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == ADDR5_A::ENABLED + } +} +#[doc = "Field `ADDR5` writer - Enable or disable reception on logical address 5."] +pub type ADDR5_W<'a, const O: u8> = crate::BitWriter<'a, u32, RXADDRESSES_SPEC, ADDR5_A, O>; +impl<'a, const O: u8> ADDR5_W<'a, O> { + #[doc = "Disable"] + #[inline(always)] + pub fn disabled(self) -> &'a mut W { + self.variant(ADDR5_A::DISABLED) + } + #[doc = "Enable"] + #[inline(always)] + pub fn enabled(self) -> &'a mut W { + self.variant(ADDR5_A::ENABLED) + } +} +#[doc = "Field `ADDR6` reader - Enable or disable reception on logical address 6."] +pub type ADDR6_R = crate::BitReader; +#[doc = "Enable or disable reception on logical address 6.\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum ADDR6_A { + #[doc = "0: Disable"] + DISABLED = 0, + #[doc = "1: Enable"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: ADDR6_A) -> Self { + variant as u8 != 0 + } +} +impl ADDR6_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> ADDR6_A { + match self.bits { + false => ADDR6_A::DISABLED, + true => ADDR6_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == ADDR6_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == ADDR6_A::ENABLED + } +} +#[doc = "Field `ADDR6` writer - Enable or disable reception on logical address 6."] +pub type ADDR6_W<'a, const O: u8> = crate::BitWriter<'a, u32, RXADDRESSES_SPEC, ADDR6_A, O>; +impl<'a, const O: u8> ADDR6_W<'a, O> { + #[doc = "Disable"] + #[inline(always)] + pub fn disabled(self) -> &'a mut W { + self.variant(ADDR6_A::DISABLED) + } + #[doc = "Enable"] + #[inline(always)] + pub fn enabled(self) -> &'a mut W { + self.variant(ADDR6_A::ENABLED) + } +} +#[doc = "Field `ADDR7` reader - Enable or disable reception on logical address 7."] +pub type ADDR7_R = crate::BitReader; +#[doc = "Enable or disable reception on logical address 7.\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum ADDR7_A { + #[doc = "0: Disable"] + DISABLED = 0, + #[doc = "1: Enable"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: ADDR7_A) -> Self { + variant as u8 != 0 + } +} +impl ADDR7_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> ADDR7_A { + match self.bits { + false => ADDR7_A::DISABLED, + true => ADDR7_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == ADDR7_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == ADDR7_A::ENABLED + } +} +#[doc = "Field `ADDR7` writer - Enable or disable reception on logical address 7."] +pub type ADDR7_W<'a, const O: u8> = crate::BitWriter<'a, u32, RXADDRESSES_SPEC, ADDR7_A, O>; +impl<'a, const O: u8> ADDR7_W<'a, O> { + #[doc = "Disable"] + #[inline(always)] + pub fn disabled(self) -> &'a mut W { + self.variant(ADDR7_A::DISABLED) + } + #[doc = "Enable"] + #[inline(always)] + pub fn enabled(self) -> &'a mut W { + self.variant(ADDR7_A::ENABLED) + } +} +impl R { + #[doc = "Bit 0 - Enable or disable reception on logical address 0."] + #[inline(always)] + pub fn addr0(&self) -> ADDR0_R { + ADDR0_R::new((self.bits & 1) != 0) + } + #[doc = "Bit 1 - Enable or disable reception on logical address 1."] + #[inline(always)] + pub fn addr1(&self) -> ADDR1_R { + ADDR1_R::new(((self.bits >> 1) & 1) != 0) + } + #[doc = "Bit 2 - Enable or disable reception on logical address 2."] + #[inline(always)] + pub fn addr2(&self) -> ADDR2_R { + ADDR2_R::new(((self.bits >> 2) & 1) != 0) + } + #[doc = "Bit 3 - Enable or disable reception on logical address 3."] + #[inline(always)] + pub fn addr3(&self) -> ADDR3_R { + ADDR3_R::new(((self.bits >> 3) & 1) != 0) + } + #[doc = "Bit 4 - Enable or disable reception on logical address 4."] + #[inline(always)] + pub fn addr4(&self) -> ADDR4_R { + ADDR4_R::new(((self.bits >> 4) & 1) != 0) + } + #[doc = "Bit 5 - Enable or disable reception on logical address 5."] + #[inline(always)] + pub fn addr5(&self) -> ADDR5_R { + ADDR5_R::new(((self.bits >> 5) & 1) != 0) + } + #[doc = "Bit 6 - Enable or disable reception on logical address 6."] + #[inline(always)] + pub fn addr6(&self) -> ADDR6_R { + ADDR6_R::new(((self.bits >> 6) & 1) != 0) + } + #[doc = "Bit 7 - Enable or disable reception on logical address 7."] + #[inline(always)] + pub fn addr7(&self) -> ADDR7_R { + ADDR7_R::new(((self.bits >> 7) & 1) != 0) + } +} +impl W { + #[doc = "Bit 0 - Enable or disable reception on logical address 0."] + #[inline(always)] + #[must_use] + pub fn addr0(&mut self) -> ADDR0_W<0> { + ADDR0_W::new(self) + } + #[doc = "Bit 1 - Enable or disable reception on logical address 1."] + #[inline(always)] + #[must_use] + pub fn addr1(&mut self) -> ADDR1_W<1> { + ADDR1_W::new(self) + } + #[doc = "Bit 2 - Enable or disable reception on logical address 2."] + #[inline(always)] + #[must_use] + pub fn addr2(&mut self) -> ADDR2_W<2> { + ADDR2_W::new(self) + } + #[doc = "Bit 3 - Enable or disable reception on logical address 3."] + #[inline(always)] + #[must_use] + pub fn addr3(&mut self) -> ADDR3_W<3> { + ADDR3_W::new(self) + } + #[doc = "Bit 4 - Enable or disable reception on logical address 4."] + #[inline(always)] + #[must_use] + pub fn addr4(&mut self) -> ADDR4_W<4> { + ADDR4_W::new(self) + } + #[doc = "Bit 5 - Enable or disable reception on logical address 5."] + #[inline(always)] + #[must_use] + pub fn addr5(&mut self) -> ADDR5_W<5> { + ADDR5_W::new(self) + } + #[doc = "Bit 6 - Enable or disable reception on logical address 6."] + #[inline(always)] + #[must_use] + pub fn addr6(&mut self) -> ADDR6_W<6> { + ADDR6_W::new(self) + } + #[doc = "Bit 7 - Enable or disable reception on logical address 7."] + #[inline(always)] + #[must_use] + pub fn addr7(&mut self) -> ADDR7_W<7> { + ADDR7_W::new(self) + } + #[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 = "Receive address select\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 [rxaddresses](index.html) module"] +pub struct RXADDRESSES_SPEC; +impl crate::RegisterSpec for RXADDRESSES_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [rxaddresses::R](R) reader structure"] +impl crate::Readable for RXADDRESSES_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [rxaddresses::W](W) writer structure"] +impl crate::Writable for RXADDRESSES_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets RXADDRESSES to value 0"] +impl crate::Resettable for RXADDRESSES_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/radio/rxcrc.rs b/down-the-stack/dk_pac/src/radio/rxcrc.rs new file mode 100644 index 0000000..32dcdc1 --- /dev/null +++ b/down-the-stack/dk_pac/src/radio/rxcrc.rs @@ -0,0 +1,37 @@ +#[doc = "Register `RXCRC` 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 = "Field `RXCRC` reader - CRC field of previously received packet"] +pub type RXCRC_R = crate::FieldReader; +impl R { + #[doc = "Bits 0:23 - CRC field of previously received packet"] + #[inline(always)] + pub fn rxcrc(&self) -> RXCRC_R { + RXCRC_R::new(self.bits & 0x00ff_ffff) + } +} +#[doc = "CRC field of previously received packet\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 [rxcrc](index.html) module"] +pub struct RXCRC_SPEC; +impl crate::RegisterSpec for RXCRC_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [rxcrc::R](R) reader structure"] +impl crate::Readable for RXCRC_SPEC { + type Reader = R; +} +#[doc = "`reset()` method sets RXCRC to value 0"] +impl crate::Resettable for RXCRC_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/radio/rxmatch.rs b/down-the-stack/dk_pac/src/radio/rxmatch.rs new file mode 100644 index 0000000..66b9d78 --- /dev/null +++ b/down-the-stack/dk_pac/src/radio/rxmatch.rs @@ -0,0 +1,37 @@ +#[doc = "Register `RXMATCH` 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 = "Field `RXMATCH` reader - Received address"] +pub type RXMATCH_R = crate::FieldReader; +impl R { + #[doc = "Bits 0:2 - Received address"] + #[inline(always)] + pub fn rxmatch(&self) -> RXMATCH_R { + RXMATCH_R::new((self.bits & 7) as u8) + } +} +#[doc = "Received address\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 [rxmatch](index.html) module"] +pub struct RXMATCH_SPEC; +impl crate::RegisterSpec for RXMATCH_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [rxmatch::R](R) reader structure"] +impl crate::Readable for RXMATCH_SPEC { + type Reader = R; +} +#[doc = "`reset()` method sets RXMATCH to value 0"] +impl crate::Resettable for RXMATCH_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/radio/shorts.rs b/down-the-stack/dk_pac/src/radio/shorts.rs new file mode 100644 index 0000000..f297e6a --- /dev/null +++ b/down-the-stack/dk_pac/src/radio/shorts.rs @@ -0,0 +1,558 @@ +#[doc = "Register `SHORTS` 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 `SHORTS` 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 `READY_START` reader - Shortcut between event READY and task START"] +pub type READY_START_R = crate::BitReader; +#[doc = "Shortcut between event READY and task START\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum READY_START_A { + #[doc = "0: Disable shortcut"] + DISABLED = 0, + #[doc = "1: Enable shortcut"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: READY_START_A) -> Self { + variant as u8 != 0 + } +} +impl READY_START_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> READY_START_A { + match self.bits { + false => READY_START_A::DISABLED, + true => READY_START_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == READY_START_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == READY_START_A::ENABLED + } +} +#[doc = "Field `READY_START` writer - Shortcut between event READY and task START"] +pub type READY_START_W<'a, const O: u8> = crate::BitWriter<'a, u32, SHORTS_SPEC, READY_START_A, O>; +impl<'a, const O: u8> READY_START_W<'a, O> { + #[doc = "Disable shortcut"] + #[inline(always)] + pub fn disabled(self) -> &'a mut W { + self.variant(READY_START_A::DISABLED) + } + #[doc = "Enable shortcut"] + #[inline(always)] + pub fn enabled(self) -> &'a mut W { + self.variant(READY_START_A::ENABLED) + } +} +#[doc = "Field `END_DISABLE` reader - Shortcut between event END and task DISABLE"] +pub type END_DISABLE_R = crate::BitReader; +#[doc = "Shortcut between event END and task DISABLE\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum END_DISABLE_A { + #[doc = "0: Disable shortcut"] + DISABLED = 0, + #[doc = "1: Enable shortcut"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: END_DISABLE_A) -> Self { + variant as u8 != 0 + } +} +impl END_DISABLE_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> END_DISABLE_A { + match self.bits { + false => END_DISABLE_A::DISABLED, + true => END_DISABLE_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == END_DISABLE_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == END_DISABLE_A::ENABLED + } +} +#[doc = "Field `END_DISABLE` writer - Shortcut between event END and task DISABLE"] +pub type END_DISABLE_W<'a, const O: u8> = crate::BitWriter<'a, u32, SHORTS_SPEC, END_DISABLE_A, O>; +impl<'a, const O: u8> END_DISABLE_W<'a, O> { + #[doc = "Disable shortcut"] + #[inline(always)] + pub fn disabled(self) -> &'a mut W { + self.variant(END_DISABLE_A::DISABLED) + } + #[doc = "Enable shortcut"] + #[inline(always)] + pub fn enabled(self) -> &'a mut W { + self.variant(END_DISABLE_A::ENABLED) + } +} +#[doc = "Field `DISABLED_TXEN` reader - Shortcut between event DISABLED and task TXEN"] +pub type DISABLED_TXEN_R = crate::BitReader; +#[doc = "Shortcut between event DISABLED and task TXEN\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum DISABLED_TXEN_A { + #[doc = "0: Disable shortcut"] + DISABLED = 0, + #[doc = "1: Enable shortcut"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: DISABLED_TXEN_A) -> Self { + variant as u8 != 0 + } +} +impl DISABLED_TXEN_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> DISABLED_TXEN_A { + match self.bits { + false => DISABLED_TXEN_A::DISABLED, + true => DISABLED_TXEN_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == DISABLED_TXEN_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == DISABLED_TXEN_A::ENABLED + } +} +#[doc = "Field `DISABLED_TXEN` writer - Shortcut between event DISABLED and task TXEN"] +pub type DISABLED_TXEN_W<'a, const O: u8> = + crate::BitWriter<'a, u32, SHORTS_SPEC, DISABLED_TXEN_A, O>; +impl<'a, const O: u8> DISABLED_TXEN_W<'a, O> { + #[doc = "Disable shortcut"] + #[inline(always)] + pub fn disabled(self) -> &'a mut W { + self.variant(DISABLED_TXEN_A::DISABLED) + } + #[doc = "Enable shortcut"] + #[inline(always)] + pub fn enabled(self) -> &'a mut W { + self.variant(DISABLED_TXEN_A::ENABLED) + } +} +#[doc = "Field `DISABLED_RXEN` reader - Shortcut between event DISABLED and task RXEN"] +pub type DISABLED_RXEN_R = crate::BitReader; +#[doc = "Shortcut between event DISABLED and task RXEN\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum DISABLED_RXEN_A { + #[doc = "0: Disable shortcut"] + DISABLED = 0, + #[doc = "1: Enable shortcut"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: DISABLED_RXEN_A) -> Self { + variant as u8 != 0 + } +} +impl DISABLED_RXEN_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> DISABLED_RXEN_A { + match self.bits { + false => DISABLED_RXEN_A::DISABLED, + true => DISABLED_RXEN_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == DISABLED_RXEN_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == DISABLED_RXEN_A::ENABLED + } +} +#[doc = "Field `DISABLED_RXEN` writer - Shortcut between event DISABLED and task RXEN"] +pub type DISABLED_RXEN_W<'a, const O: u8> = + crate::BitWriter<'a, u32, SHORTS_SPEC, DISABLED_RXEN_A, O>; +impl<'a, const O: u8> DISABLED_RXEN_W<'a, O> { + #[doc = "Disable shortcut"] + #[inline(always)] + pub fn disabled(self) -> &'a mut W { + self.variant(DISABLED_RXEN_A::DISABLED) + } + #[doc = "Enable shortcut"] + #[inline(always)] + pub fn enabled(self) -> &'a mut W { + self.variant(DISABLED_RXEN_A::ENABLED) + } +} +#[doc = "Field `ADDRESS_RSSISTART` reader - Shortcut between event ADDRESS and task RSSISTART"] +pub type ADDRESS_RSSISTART_R = crate::BitReader; +#[doc = "Shortcut between event ADDRESS and task RSSISTART\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum ADDRESS_RSSISTART_A { + #[doc = "0: Disable shortcut"] + DISABLED = 0, + #[doc = "1: Enable shortcut"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: ADDRESS_RSSISTART_A) -> Self { + variant as u8 != 0 + } +} +impl ADDRESS_RSSISTART_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> ADDRESS_RSSISTART_A { + match self.bits { + false => ADDRESS_RSSISTART_A::DISABLED, + true => ADDRESS_RSSISTART_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == ADDRESS_RSSISTART_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == ADDRESS_RSSISTART_A::ENABLED + } +} +#[doc = "Field `ADDRESS_RSSISTART` writer - Shortcut between event ADDRESS and task RSSISTART"] +pub type ADDRESS_RSSISTART_W<'a, const O: u8> = + crate::BitWriter<'a, u32, SHORTS_SPEC, ADDRESS_RSSISTART_A, O>; +impl<'a, const O: u8> ADDRESS_RSSISTART_W<'a, O> { + #[doc = "Disable shortcut"] + #[inline(always)] + pub fn disabled(self) -> &'a mut W { + self.variant(ADDRESS_RSSISTART_A::DISABLED) + } + #[doc = "Enable shortcut"] + #[inline(always)] + pub fn enabled(self) -> &'a mut W { + self.variant(ADDRESS_RSSISTART_A::ENABLED) + } +} +#[doc = "Field `END_START` reader - Shortcut between event END and task START"] +pub type END_START_R = crate::BitReader; +#[doc = "Shortcut between event END and task START\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum END_START_A { + #[doc = "0: Disable shortcut"] + DISABLED = 0, + #[doc = "1: Enable shortcut"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: END_START_A) -> Self { + variant as u8 != 0 + } +} +impl END_START_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> END_START_A { + match self.bits { + false => END_START_A::DISABLED, + true => END_START_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == END_START_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == END_START_A::ENABLED + } +} +#[doc = "Field `END_START` writer - Shortcut between event END and task START"] +pub type END_START_W<'a, const O: u8> = crate::BitWriter<'a, u32, SHORTS_SPEC, END_START_A, O>; +impl<'a, const O: u8> END_START_W<'a, O> { + #[doc = "Disable shortcut"] + #[inline(always)] + pub fn disabled(self) -> &'a mut W { + self.variant(END_START_A::DISABLED) + } + #[doc = "Enable shortcut"] + #[inline(always)] + pub fn enabled(self) -> &'a mut W { + self.variant(END_START_A::ENABLED) + } +} +#[doc = "Field `ADDRESS_BCSTART` reader - Shortcut between event ADDRESS and task BCSTART"] +pub type ADDRESS_BCSTART_R = crate::BitReader; +#[doc = "Shortcut between event ADDRESS and task BCSTART\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum ADDRESS_BCSTART_A { + #[doc = "0: Disable shortcut"] + DISABLED = 0, + #[doc = "1: Enable shortcut"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: ADDRESS_BCSTART_A) -> Self { + variant as u8 != 0 + } +} +impl ADDRESS_BCSTART_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> ADDRESS_BCSTART_A { + match self.bits { + false => ADDRESS_BCSTART_A::DISABLED, + true => ADDRESS_BCSTART_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == ADDRESS_BCSTART_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == ADDRESS_BCSTART_A::ENABLED + } +} +#[doc = "Field `ADDRESS_BCSTART` writer - Shortcut between event ADDRESS and task BCSTART"] +pub type ADDRESS_BCSTART_W<'a, const O: u8> = + crate::BitWriter<'a, u32, SHORTS_SPEC, ADDRESS_BCSTART_A, O>; +impl<'a, const O: u8> ADDRESS_BCSTART_W<'a, O> { + #[doc = "Disable shortcut"] + #[inline(always)] + pub fn disabled(self) -> &'a mut W { + self.variant(ADDRESS_BCSTART_A::DISABLED) + } + #[doc = "Enable shortcut"] + #[inline(always)] + pub fn enabled(self) -> &'a mut W { + self.variant(ADDRESS_BCSTART_A::ENABLED) + } +} +#[doc = "Field `DISABLED_RSSISTOP` reader - Shortcut between event DISABLED and task RSSISTOP"] +pub type DISABLED_RSSISTOP_R = crate::BitReader; +#[doc = "Shortcut between event DISABLED and task RSSISTOP\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum DISABLED_RSSISTOP_A { + #[doc = "0: Disable shortcut"] + DISABLED = 0, + #[doc = "1: Enable shortcut"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: DISABLED_RSSISTOP_A) -> Self { + variant as u8 != 0 + } +} +impl DISABLED_RSSISTOP_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> DISABLED_RSSISTOP_A { + match self.bits { + false => DISABLED_RSSISTOP_A::DISABLED, + true => DISABLED_RSSISTOP_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == DISABLED_RSSISTOP_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == DISABLED_RSSISTOP_A::ENABLED + } +} +#[doc = "Field `DISABLED_RSSISTOP` writer - Shortcut between event DISABLED and task RSSISTOP"] +pub type DISABLED_RSSISTOP_W<'a, const O: u8> = + crate::BitWriter<'a, u32, SHORTS_SPEC, DISABLED_RSSISTOP_A, O>; +impl<'a, const O: u8> DISABLED_RSSISTOP_W<'a, O> { + #[doc = "Disable shortcut"] + #[inline(always)] + pub fn disabled(self) -> &'a mut W { + self.variant(DISABLED_RSSISTOP_A::DISABLED) + } + #[doc = "Enable shortcut"] + #[inline(always)] + pub fn enabled(self) -> &'a mut W { + self.variant(DISABLED_RSSISTOP_A::ENABLED) + } +} +impl R { + #[doc = "Bit 0 - Shortcut between event READY and task START"] + #[inline(always)] + pub fn ready_start(&self) -> READY_START_R { + READY_START_R::new((self.bits & 1) != 0) + } + #[doc = "Bit 1 - Shortcut between event END and task DISABLE"] + #[inline(always)] + pub fn end_disable(&self) -> END_DISABLE_R { + END_DISABLE_R::new(((self.bits >> 1) & 1) != 0) + } + #[doc = "Bit 2 - Shortcut between event DISABLED and task TXEN"] + #[inline(always)] + pub fn disabled_txen(&self) -> DISABLED_TXEN_R { + DISABLED_TXEN_R::new(((self.bits >> 2) & 1) != 0) + } + #[doc = "Bit 3 - Shortcut between event DISABLED and task RXEN"] + #[inline(always)] + pub fn disabled_rxen(&self) -> DISABLED_RXEN_R { + DISABLED_RXEN_R::new(((self.bits >> 3) & 1) != 0) + } + #[doc = "Bit 4 - Shortcut between event ADDRESS and task RSSISTART"] + #[inline(always)] + pub fn address_rssistart(&self) -> ADDRESS_RSSISTART_R { + ADDRESS_RSSISTART_R::new(((self.bits >> 4) & 1) != 0) + } + #[doc = "Bit 5 - Shortcut between event END and task START"] + #[inline(always)] + pub fn end_start(&self) -> END_START_R { + END_START_R::new(((self.bits >> 5) & 1) != 0) + } + #[doc = "Bit 6 - Shortcut between event ADDRESS and task BCSTART"] + #[inline(always)] + pub fn address_bcstart(&self) -> ADDRESS_BCSTART_R { + ADDRESS_BCSTART_R::new(((self.bits >> 6) & 1) != 0) + } + #[doc = "Bit 8 - Shortcut between event DISABLED and task RSSISTOP"] + #[inline(always)] + pub fn disabled_rssistop(&self) -> DISABLED_RSSISTOP_R { + DISABLED_RSSISTOP_R::new(((self.bits >> 8) & 1) != 0) + } +} +impl W { + #[doc = "Bit 0 - Shortcut between event READY and task START"] + #[inline(always)] + #[must_use] + pub fn ready_start(&mut self) -> READY_START_W<0> { + READY_START_W::new(self) + } + #[doc = "Bit 1 - Shortcut between event END and task DISABLE"] + #[inline(always)] + #[must_use] + pub fn end_disable(&mut self) -> END_DISABLE_W<1> { + END_DISABLE_W::new(self) + } + #[doc = "Bit 2 - Shortcut between event DISABLED and task TXEN"] + #[inline(always)] + #[must_use] + pub fn disabled_txen(&mut self) -> DISABLED_TXEN_W<2> { + DISABLED_TXEN_W::new(self) + } + #[doc = "Bit 3 - Shortcut between event DISABLED and task RXEN"] + #[inline(always)] + #[must_use] + pub fn disabled_rxen(&mut self) -> DISABLED_RXEN_W<3> { + DISABLED_RXEN_W::new(self) + } + #[doc = "Bit 4 - Shortcut between event ADDRESS and task RSSISTART"] + #[inline(always)] + #[must_use] + pub fn address_rssistart(&mut self) -> ADDRESS_RSSISTART_W<4> { + ADDRESS_RSSISTART_W::new(self) + } + #[doc = "Bit 5 - Shortcut between event END and task START"] + #[inline(always)] + #[must_use] + pub fn end_start(&mut self) -> END_START_W<5> { + END_START_W::new(self) + } + #[doc = "Bit 6 - Shortcut between event ADDRESS and task BCSTART"] + #[inline(always)] + #[must_use] + pub fn address_bcstart(&mut self) -> ADDRESS_BCSTART_W<6> { + ADDRESS_BCSTART_W::new(self) + } + #[doc = "Bit 8 - Shortcut between event DISABLED and task RSSISTOP"] + #[inline(always)] + #[must_use] + pub fn disabled_rssistop(&mut self) -> DISABLED_RSSISTOP_W<8> { + DISABLED_RSSISTOP_W::new(self) + } + #[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 = "Shortcuts between local events and tasks\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 [shorts](index.html) module"] +pub struct SHORTS_SPEC; +impl crate::RegisterSpec for SHORTS_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [shorts::R](R) reader structure"] +impl crate::Readable for SHORTS_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [shorts::W](W) writer structure"] +impl crate::Writable for SHORTS_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets SHORTS to value 0"] +impl crate::Resettable for SHORTS_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/radio/state.rs b/down-the-stack/dk_pac/src/radio/state.rs new file mode 100644 index 0000000..bec33b1 --- /dev/null +++ b/down-the-stack/dk_pac/src/radio/state.rs @@ -0,0 +1,129 @@ +#[doc = "Register `STATE` 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 = "Field `STATE` reader - Current radio state"] +pub type STATE_R = crate::FieldReader; +#[doc = "Current radio state\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +#[repr(u8)] +pub enum STATE_A { + #[doc = "0: RADIO is in the Disabled state"] + DISABLED = 0, + #[doc = "1: RADIO is in the RXRU state"] + RX_RU = 1, + #[doc = "2: RADIO is in the RXIDLE state"] + RX_IDLE = 2, + #[doc = "3: RADIO is in the RX state"] + RX = 3, + #[doc = "4: RADIO is in the RXDISABLED state"] + RX_DISABLE = 4, + #[doc = "9: RADIO is in the TXRU state"] + TX_RU = 9, + #[doc = "10: RADIO is in the TXIDLE state"] + TX_IDLE = 10, + #[doc = "11: RADIO is in the TX state"] + TX = 11, + #[doc = "12: RADIO is in the TXDISABLED state"] + TX_DISABLE = 12, +} +impl From for u8 { + #[inline(always)] + fn from(variant: STATE_A) -> Self { + variant as _ + } +} +impl STATE_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> Option { + match self.bits { + 0 => Some(STATE_A::DISABLED), + 1 => Some(STATE_A::RX_RU), + 2 => Some(STATE_A::RX_IDLE), + 3 => Some(STATE_A::RX), + 4 => Some(STATE_A::RX_DISABLE), + 9 => Some(STATE_A::TX_RU), + 10 => Some(STATE_A::TX_IDLE), + 11 => Some(STATE_A::TX), + 12 => Some(STATE_A::TX_DISABLE), + _ => None, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == STATE_A::DISABLED + } + #[doc = "Checks if the value of the field is `RX_RU`"] + #[inline(always)] + pub fn is_rx_ru(&self) -> bool { + *self == STATE_A::RX_RU + } + #[doc = "Checks if the value of the field is `RX_IDLE`"] + #[inline(always)] + pub fn is_rx_idle(&self) -> bool { + *self == STATE_A::RX_IDLE + } + #[doc = "Checks if the value of the field is `RX`"] + #[inline(always)] + pub fn is_rx(&self) -> bool { + *self == STATE_A::RX + } + #[doc = "Checks if the value of the field is `RX_DISABLE`"] + #[inline(always)] + pub fn is_rx_disable(&self) -> bool { + *self == STATE_A::RX_DISABLE + } + #[doc = "Checks if the value of the field is `TX_RU`"] + #[inline(always)] + pub fn is_tx_ru(&self) -> bool { + *self == STATE_A::TX_RU + } + #[doc = "Checks if the value of the field is `TX_IDLE`"] + #[inline(always)] + pub fn is_tx_idle(&self) -> bool { + *self == STATE_A::TX_IDLE + } + #[doc = "Checks if the value of the field is `TX`"] + #[inline(always)] + pub fn is_tx(&self) -> bool { + *self == STATE_A::TX + } + #[doc = "Checks if the value of the field is `TX_DISABLE`"] + #[inline(always)] + pub fn is_tx_disable(&self) -> bool { + *self == STATE_A::TX_DISABLE + } +} +impl R { + #[doc = "Bits 0:3 - Current radio state"] + #[inline(always)] + pub fn state(&self) -> STATE_R { + STATE_R::new((self.bits & 0x0f) as u8) + } +} +#[doc = "Current radio state\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 [state](index.html) module"] +pub struct STATE_SPEC; +impl crate::RegisterSpec for STATE_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [state::R](R) reader structure"] +impl crate::Readable for STATE_SPEC { + type Reader = R; +} +#[doc = "`reset()` method sets STATE to value 0"] +impl crate::Resettable for STATE_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/radio/tasks_bcstart.rs b/down-the-stack/dk_pac/src/radio/tasks_bcstart.rs new file mode 100644 index 0000000..9a23f33 --- /dev/null +++ b/down-the-stack/dk_pac/src/radio/tasks_bcstart.rs @@ -0,0 +1,72 @@ +#[doc = "Register `TASKS_BCSTART` 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 = "Start the bit counter\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum TASKS_BCSTART_AW { + #[doc = "1: Trigger task"] + TRIGGER = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: TASKS_BCSTART_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `TASKS_BCSTART` writer - Start the bit counter"] +pub type TASKS_BCSTART_W<'a, const O: u8> = + crate::BitWriter<'a, u32, TASKS_BCSTART_SPEC, TASKS_BCSTART_AW, O>; +impl<'a, const O: u8> TASKS_BCSTART_W<'a, O> { + #[doc = "Trigger task"] + #[inline(always)] + pub fn trigger(self) -> &'a mut W { + self.variant(TASKS_BCSTART_AW::TRIGGER) + } +} +impl W { + #[doc = "Bit 0 - Start the bit counter"] + #[inline(always)] + #[must_use] + pub fn tasks_bcstart(&mut self) -> TASKS_BCSTART_W<0> { + TASKS_BCSTART_W::new(self) + } + #[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 = "Start the bit counter\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 [tasks_bcstart](index.html) module"] +pub struct TASKS_BCSTART_SPEC; +impl crate::RegisterSpec for TASKS_BCSTART_SPEC { + type Ux = u32; +} +#[doc = "`write(|w| ..)` method takes [tasks_bcstart::W](W) writer structure"] +impl crate::Writable for TASKS_BCSTART_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets TASKS_BCSTART to value 0"] +impl crate::Resettable for TASKS_BCSTART_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/radio/tasks_bcstop.rs b/down-the-stack/dk_pac/src/radio/tasks_bcstop.rs new file mode 100644 index 0000000..525274d --- /dev/null +++ b/down-the-stack/dk_pac/src/radio/tasks_bcstop.rs @@ -0,0 +1,72 @@ +#[doc = "Register `TASKS_BCSTOP` 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 = "Stop the bit counter\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum TASKS_BCSTOP_AW { + #[doc = "1: Trigger task"] + TRIGGER = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: TASKS_BCSTOP_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `TASKS_BCSTOP` writer - Stop the bit counter"] +pub type TASKS_BCSTOP_W<'a, const O: u8> = + crate::BitWriter<'a, u32, TASKS_BCSTOP_SPEC, TASKS_BCSTOP_AW, O>; +impl<'a, const O: u8> TASKS_BCSTOP_W<'a, O> { + #[doc = "Trigger task"] + #[inline(always)] + pub fn trigger(self) -> &'a mut W { + self.variant(TASKS_BCSTOP_AW::TRIGGER) + } +} +impl W { + #[doc = "Bit 0 - Stop the bit counter"] + #[inline(always)] + #[must_use] + pub fn tasks_bcstop(&mut self) -> TASKS_BCSTOP_W<0> { + TASKS_BCSTOP_W::new(self) + } + #[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 = "Stop the bit counter\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 [tasks_bcstop](index.html) module"] +pub struct TASKS_BCSTOP_SPEC; +impl crate::RegisterSpec for TASKS_BCSTOP_SPEC { + type Ux = u32; +} +#[doc = "`write(|w| ..)` method takes [tasks_bcstop::W](W) writer structure"] +impl crate::Writable for TASKS_BCSTOP_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets TASKS_BCSTOP to value 0"] +impl crate::Resettable for TASKS_BCSTOP_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/radio/tasks_disable.rs b/down-the-stack/dk_pac/src/radio/tasks_disable.rs new file mode 100644 index 0000000..0749c75 --- /dev/null +++ b/down-the-stack/dk_pac/src/radio/tasks_disable.rs @@ -0,0 +1,72 @@ +#[doc = "Register `TASKS_DISABLE` 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 = "Disable RADIO\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum TASKS_DISABLE_AW { + #[doc = "1: Trigger task"] + TRIGGER = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: TASKS_DISABLE_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `TASKS_DISABLE` writer - Disable RADIO"] +pub type TASKS_DISABLE_W<'a, const O: u8> = + crate::BitWriter<'a, u32, TASKS_DISABLE_SPEC, TASKS_DISABLE_AW, O>; +impl<'a, const O: u8> TASKS_DISABLE_W<'a, O> { + #[doc = "Trigger task"] + #[inline(always)] + pub fn trigger(self) -> &'a mut W { + self.variant(TASKS_DISABLE_AW::TRIGGER) + } +} +impl W { + #[doc = "Bit 0 - Disable RADIO"] + #[inline(always)] + #[must_use] + pub fn tasks_disable(&mut self) -> TASKS_DISABLE_W<0> { + TASKS_DISABLE_W::new(self) + } + #[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 = "Disable RADIO\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 [tasks_disable](index.html) module"] +pub struct TASKS_DISABLE_SPEC; +impl crate::RegisterSpec for TASKS_DISABLE_SPEC { + type Ux = u32; +} +#[doc = "`write(|w| ..)` method takes [tasks_disable::W](W) writer structure"] +impl crate::Writable for TASKS_DISABLE_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets TASKS_DISABLE to value 0"] +impl crate::Resettable for TASKS_DISABLE_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/radio/tasks_rssistart.rs b/down-the-stack/dk_pac/src/radio/tasks_rssistart.rs new file mode 100644 index 0000000..b2de30d --- /dev/null +++ b/down-the-stack/dk_pac/src/radio/tasks_rssistart.rs @@ -0,0 +1,72 @@ +#[doc = "Register `TASKS_RSSISTART` 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 = "Start the RSSI and take one single sample of the receive signal strength.\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum TASKS_RSSISTART_AW { + #[doc = "1: Trigger task"] + TRIGGER = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: TASKS_RSSISTART_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `TASKS_RSSISTART` writer - Start the RSSI and take one single sample of the receive signal strength."] +pub type TASKS_RSSISTART_W<'a, const O: u8> = + crate::BitWriter<'a, u32, TASKS_RSSISTART_SPEC, TASKS_RSSISTART_AW, O>; +impl<'a, const O: u8> TASKS_RSSISTART_W<'a, O> { + #[doc = "Trigger task"] + #[inline(always)] + pub fn trigger(self) -> &'a mut W { + self.variant(TASKS_RSSISTART_AW::TRIGGER) + } +} +impl W { + #[doc = "Bit 0 - Start the RSSI and take one single sample of the receive signal strength."] + #[inline(always)] + #[must_use] + pub fn tasks_rssistart(&mut self) -> TASKS_RSSISTART_W<0> { + TASKS_RSSISTART_W::new(self) + } + #[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 = "Start the RSSI and take one single sample of the receive signal strength.\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 [tasks_rssistart](index.html) module"] +pub struct TASKS_RSSISTART_SPEC; +impl crate::RegisterSpec for TASKS_RSSISTART_SPEC { + type Ux = u32; +} +#[doc = "`write(|w| ..)` method takes [tasks_rssistart::W](W) writer structure"] +impl crate::Writable for TASKS_RSSISTART_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets TASKS_RSSISTART to value 0"] +impl crate::Resettable for TASKS_RSSISTART_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/radio/tasks_rssistop.rs b/down-the-stack/dk_pac/src/radio/tasks_rssistop.rs new file mode 100644 index 0000000..c08cc51 --- /dev/null +++ b/down-the-stack/dk_pac/src/radio/tasks_rssistop.rs @@ -0,0 +1,72 @@ +#[doc = "Register `TASKS_RSSISTOP` 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 = "Stop the RSSI measurement\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum TASKS_RSSISTOP_AW { + #[doc = "1: Trigger task"] + TRIGGER = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: TASKS_RSSISTOP_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `TASKS_RSSISTOP` writer - Stop the RSSI measurement"] +pub type TASKS_RSSISTOP_W<'a, const O: u8> = + crate::BitWriter<'a, u32, TASKS_RSSISTOP_SPEC, TASKS_RSSISTOP_AW, O>; +impl<'a, const O: u8> TASKS_RSSISTOP_W<'a, O> { + #[doc = "Trigger task"] + #[inline(always)] + pub fn trigger(self) -> &'a mut W { + self.variant(TASKS_RSSISTOP_AW::TRIGGER) + } +} +impl W { + #[doc = "Bit 0 - Stop the RSSI measurement"] + #[inline(always)] + #[must_use] + pub fn tasks_rssistop(&mut self) -> TASKS_RSSISTOP_W<0> { + TASKS_RSSISTOP_W::new(self) + } + #[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 = "Stop the RSSI measurement\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 [tasks_rssistop](index.html) module"] +pub struct TASKS_RSSISTOP_SPEC; +impl crate::RegisterSpec for TASKS_RSSISTOP_SPEC { + type Ux = u32; +} +#[doc = "`write(|w| ..)` method takes [tasks_rssistop::W](W) writer structure"] +impl crate::Writable for TASKS_RSSISTOP_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets TASKS_RSSISTOP to value 0"] +impl crate::Resettable for TASKS_RSSISTOP_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/radio/tasks_rxen.rs b/down-the-stack/dk_pac/src/radio/tasks_rxen.rs new file mode 100644 index 0000000..6bdc5cb --- /dev/null +++ b/down-the-stack/dk_pac/src/radio/tasks_rxen.rs @@ -0,0 +1,72 @@ +#[doc = "Register `TASKS_RXEN` 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 = "Enable RADIO in RX mode\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum TASKS_RXEN_AW { + #[doc = "1: Trigger task"] + TRIGGER = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: TASKS_RXEN_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `TASKS_RXEN` writer - Enable RADIO in RX mode"] +pub type TASKS_RXEN_W<'a, const O: u8> = + crate::BitWriter<'a, u32, TASKS_RXEN_SPEC, TASKS_RXEN_AW, O>; +impl<'a, const O: u8> TASKS_RXEN_W<'a, O> { + #[doc = "Trigger task"] + #[inline(always)] + pub fn trigger(self) -> &'a mut W { + self.variant(TASKS_RXEN_AW::TRIGGER) + } +} +impl W { + #[doc = "Bit 0 - Enable RADIO in RX mode"] + #[inline(always)] + #[must_use] + pub fn tasks_rxen(&mut self) -> TASKS_RXEN_W<0> { + TASKS_RXEN_W::new(self) + } + #[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 = "Enable RADIO in RX mode\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 [tasks_rxen](index.html) module"] +pub struct TASKS_RXEN_SPEC; +impl crate::RegisterSpec for TASKS_RXEN_SPEC { + type Ux = u32; +} +#[doc = "`write(|w| ..)` method takes [tasks_rxen::W](W) writer structure"] +impl crate::Writable for TASKS_RXEN_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets TASKS_RXEN to value 0"] +impl crate::Resettable for TASKS_RXEN_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/radio/tasks_start.rs b/down-the-stack/dk_pac/src/radio/tasks_start.rs new file mode 100644 index 0000000..8e61a6f --- /dev/null +++ b/down-the-stack/dk_pac/src/radio/tasks_start.rs @@ -0,0 +1,72 @@ +#[doc = "Register `TASKS_START` 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 = "Start RADIO\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum TASKS_START_AW { + #[doc = "1: Trigger task"] + TRIGGER = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: TASKS_START_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `TASKS_START` writer - Start RADIO"] +pub type TASKS_START_W<'a, const O: u8> = + crate::BitWriter<'a, u32, TASKS_START_SPEC, TASKS_START_AW, O>; +impl<'a, const O: u8> TASKS_START_W<'a, O> { + #[doc = "Trigger task"] + #[inline(always)] + pub fn trigger(self) -> &'a mut W { + self.variant(TASKS_START_AW::TRIGGER) + } +} +impl W { + #[doc = "Bit 0 - Start RADIO"] + #[inline(always)] + #[must_use] + pub fn tasks_start(&mut self) -> TASKS_START_W<0> { + TASKS_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 + } +} +#[doc = "Start RADIO\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 [tasks_start](index.html) module"] +pub struct TASKS_START_SPEC; +impl crate::RegisterSpec for TASKS_START_SPEC { + type Ux = u32; +} +#[doc = "`write(|w| ..)` method takes [tasks_start::W](W) writer structure"] +impl crate::Writable for TASKS_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 TASKS_START to value 0"] +impl crate::Resettable for TASKS_START_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/radio/tasks_stop.rs b/down-the-stack/dk_pac/src/radio/tasks_stop.rs new file mode 100644 index 0000000..4769b3e --- /dev/null +++ b/down-the-stack/dk_pac/src/radio/tasks_stop.rs @@ -0,0 +1,72 @@ +#[doc = "Register `TASKS_STOP` 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 = "Stop RADIO\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum TASKS_STOP_AW { + #[doc = "1: Trigger task"] + TRIGGER = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: TASKS_STOP_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `TASKS_STOP` writer - Stop RADIO"] +pub type TASKS_STOP_W<'a, const O: u8> = + crate::BitWriter<'a, u32, TASKS_STOP_SPEC, TASKS_STOP_AW, O>; +impl<'a, const O: u8> TASKS_STOP_W<'a, O> { + #[doc = "Trigger task"] + #[inline(always)] + pub fn trigger(self) -> &'a mut W { + self.variant(TASKS_STOP_AW::TRIGGER) + } +} +impl W { + #[doc = "Bit 0 - Stop RADIO"] + #[inline(always)] + #[must_use] + pub fn tasks_stop(&mut self) -> TASKS_STOP_W<0> { + TASKS_STOP_W::new(self) + } + #[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 = "Stop RADIO\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 [tasks_stop](index.html) module"] +pub struct TASKS_STOP_SPEC; +impl crate::RegisterSpec for TASKS_STOP_SPEC { + type Ux = u32; +} +#[doc = "`write(|w| ..)` method takes [tasks_stop::W](W) writer structure"] +impl crate::Writable for TASKS_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 TASKS_STOP to value 0"] +impl crate::Resettable for TASKS_STOP_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/radio/tasks_txen.rs b/down-the-stack/dk_pac/src/radio/tasks_txen.rs new file mode 100644 index 0000000..bf90d5c --- /dev/null +++ b/down-the-stack/dk_pac/src/radio/tasks_txen.rs @@ -0,0 +1,72 @@ +#[doc = "Register `TASKS_TXEN` 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 = "Enable RADIO in TX mode\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum TASKS_TXEN_AW { + #[doc = "1: Trigger task"] + TRIGGER = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: TASKS_TXEN_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `TASKS_TXEN` writer - Enable RADIO in TX mode"] +pub type TASKS_TXEN_W<'a, const O: u8> = + crate::BitWriter<'a, u32, TASKS_TXEN_SPEC, TASKS_TXEN_AW, O>; +impl<'a, const O: u8> TASKS_TXEN_W<'a, O> { + #[doc = "Trigger task"] + #[inline(always)] + pub fn trigger(self) -> &'a mut W { + self.variant(TASKS_TXEN_AW::TRIGGER) + } +} +impl W { + #[doc = "Bit 0 - Enable RADIO in TX mode"] + #[inline(always)] + #[must_use] + pub fn tasks_txen(&mut self) -> TASKS_TXEN_W<0> { + TASKS_TXEN_W::new(self) + } + #[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 = "Enable RADIO in TX mode\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 [tasks_txen](index.html) module"] +pub struct TASKS_TXEN_SPEC; +impl crate::RegisterSpec for TASKS_TXEN_SPEC { + type Ux = u32; +} +#[doc = "`write(|w| ..)` method takes [tasks_txen::W](W) writer structure"] +impl crate::Writable for TASKS_TXEN_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets TASKS_TXEN to value 0"] +impl crate::Resettable for TASKS_TXEN_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/radio/tifs.rs b/down-the-stack/dk_pac/src/radio/tifs.rs new file mode 100644 index 0000000..7173ca6 --- /dev/null +++ b/down-the-stack/dk_pac/src/radio/tifs.rs @@ -0,0 +1,80 @@ +#[doc = "Register `TIFS` 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 `TIFS` 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 `TIFS` reader - Inter Frame Spacing in us"] +pub type TIFS_R = crate::FieldReader; +#[doc = "Field `TIFS` writer - Inter Frame Spacing in us"] +pub type TIFS_W<'a, const O: u8> = crate::FieldWriter<'a, u32, TIFS_SPEC, u8, u8, 8, O>; +impl R { + #[doc = "Bits 0:7 - Inter Frame Spacing in us"] + #[inline(always)] + pub fn tifs(&self) -> TIFS_R { + TIFS_R::new((self.bits & 0xff) as u8) + } +} +impl W { + #[doc = "Bits 0:7 - Inter Frame Spacing in us"] + #[inline(always)] + #[must_use] + pub fn tifs(&mut self) -> TIFS_W<0> { + TIFS_W::new(self) + } + #[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 = "Inter Frame Spacing in us\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 [tifs](index.html) module"] +pub struct TIFS_SPEC; +impl crate::RegisterSpec for TIFS_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [tifs::R](R) reader structure"] +impl crate::Readable for TIFS_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [tifs::W](W) writer structure"] +impl crate::Writable for TIFS_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets TIFS to value 0"] +impl crate::Resettable for TIFS_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/radio/txaddress.rs b/down-the-stack/dk_pac/src/radio/txaddress.rs new file mode 100644 index 0000000..996809b --- /dev/null +++ b/down-the-stack/dk_pac/src/radio/txaddress.rs @@ -0,0 +1,80 @@ +#[doc = "Register `TXADDRESS` 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 `TXADDRESS` 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 `TXADDRESS` reader - Transmit address select"] +pub type TXADDRESS_R = crate::FieldReader; +#[doc = "Field `TXADDRESS` writer - Transmit address select"] +pub type TXADDRESS_W<'a, const O: u8> = crate::FieldWriter<'a, u32, TXADDRESS_SPEC, u8, u8, 3, O>; +impl R { + #[doc = "Bits 0:2 - Transmit address select"] + #[inline(always)] + pub fn txaddress(&self) -> TXADDRESS_R { + TXADDRESS_R::new((self.bits & 7) as u8) + } +} +impl W { + #[doc = "Bits 0:2 - Transmit address select"] + #[inline(always)] + #[must_use] + pub fn txaddress(&mut self) -> TXADDRESS_W<0> { + TXADDRESS_W::new(self) + } + #[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 = "Transmit address select\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 [txaddress](index.html) module"] +pub struct TXADDRESS_SPEC; +impl crate::RegisterSpec for TXADDRESS_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [txaddress::R](R) reader structure"] +impl crate::Readable for TXADDRESS_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [txaddress::W](W) writer structure"] +impl crate::Writable for TXADDRESS_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets TXADDRESS to value 0"] +impl crate::Resettable for TXADDRESS_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/radio/txpower.rs b/down-the-stack/dk_pac/src/radio/txpower.rs new file mode 100644 index 0000000..abadae5 --- /dev/null +++ b/down-the-stack/dk_pac/src/radio/txpower.rs @@ -0,0 +1,233 @@ +#[doc = "Register `TXPOWER` 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 `TXPOWER` 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 `TXPOWER` reader - RADIO output power."] +pub type TXPOWER_R = crate::FieldReader; +#[doc = "RADIO output power.\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +#[repr(u8)] +pub enum TXPOWER_A { + #[doc = "4: +4 dBm"] + POS4D_BM = 4, + #[doc = "3: +3 dBm"] + POS3D_BM = 3, + #[doc = "0: 0 dBm"] + _0D_BM = 0, + #[doc = "252: -4 dBm"] + NEG4D_BM = 252, + #[doc = "248: -8 dBm"] + NEG8D_BM = 248, + #[doc = "244: -12 dBm"] + NEG12D_BM = 244, + #[doc = "240: -16 dBm"] + NEG16D_BM = 240, + #[doc = "236: -20 dBm"] + NEG20D_BM = 236, + #[doc = "255: Deprecated enumerator - -40 dBm"] + NEG30D_BM = 255, + #[doc = "216: -40 dBm"] + NEG40D_BM = 216, +} +impl From for u8 { + #[inline(always)] + fn from(variant: TXPOWER_A) -> Self { + variant as _ + } +} +impl TXPOWER_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> Option { + match self.bits { + 4 => Some(TXPOWER_A::POS4D_BM), + 3 => Some(TXPOWER_A::POS3D_BM), + 0 => Some(TXPOWER_A::_0D_BM), + 252 => Some(TXPOWER_A::NEG4D_BM), + 248 => Some(TXPOWER_A::NEG8D_BM), + 244 => Some(TXPOWER_A::NEG12D_BM), + 240 => Some(TXPOWER_A::NEG16D_BM), + 236 => Some(TXPOWER_A::NEG20D_BM), + 255 => Some(TXPOWER_A::NEG30D_BM), + 216 => Some(TXPOWER_A::NEG40D_BM), + _ => None, + } + } + #[doc = "Checks if the value of the field is `POS4D_BM`"] + #[inline(always)] + pub fn is_pos4d_bm(&self) -> bool { + *self == TXPOWER_A::POS4D_BM + } + #[doc = "Checks if the value of the field is `POS3D_BM`"] + #[inline(always)] + pub fn is_pos3d_bm(&self) -> bool { + *self == TXPOWER_A::POS3D_BM + } + #[doc = "Checks if the value of the field is `_0D_BM`"] + #[inline(always)] + pub fn is_0d_bm(&self) -> bool { + *self == TXPOWER_A::_0D_BM + } + #[doc = "Checks if the value of the field is `NEG4D_BM`"] + #[inline(always)] + pub fn is_neg4d_bm(&self) -> bool { + *self == TXPOWER_A::NEG4D_BM + } + #[doc = "Checks if the value of the field is `NEG8D_BM`"] + #[inline(always)] + pub fn is_neg8d_bm(&self) -> bool { + *self == TXPOWER_A::NEG8D_BM + } + #[doc = "Checks if the value of the field is `NEG12D_BM`"] + #[inline(always)] + pub fn is_neg12d_bm(&self) -> bool { + *self == TXPOWER_A::NEG12D_BM + } + #[doc = "Checks if the value of the field is `NEG16D_BM`"] + #[inline(always)] + pub fn is_neg16d_bm(&self) -> bool { + *self == TXPOWER_A::NEG16D_BM + } + #[doc = "Checks if the value of the field is `NEG20D_BM`"] + #[inline(always)] + pub fn is_neg20d_bm(&self) -> bool { + *self == TXPOWER_A::NEG20D_BM + } + #[doc = "Checks if the value of the field is `NEG30D_BM`"] + #[inline(always)] + pub fn is_neg30d_bm(&self) -> bool { + *self == TXPOWER_A::NEG30D_BM + } + #[doc = "Checks if the value of the field is `NEG40D_BM`"] + #[inline(always)] + pub fn is_neg40d_bm(&self) -> bool { + *self == TXPOWER_A::NEG40D_BM + } +} +#[doc = "Field `TXPOWER` writer - RADIO output power."] +pub type TXPOWER_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, TXPOWER_SPEC, u8, TXPOWER_A, 8, O>; +impl<'a, const O: u8> TXPOWER_W<'a, O> { + #[doc = "+4 dBm"] + #[inline(always)] + pub fn pos4d_bm(self) -> &'a mut W { + self.variant(TXPOWER_A::POS4D_BM) + } + #[doc = "+3 dBm"] + #[inline(always)] + pub fn pos3d_bm(self) -> &'a mut W { + self.variant(TXPOWER_A::POS3D_BM) + } + #[doc = "0 dBm"] + #[inline(always)] + pub fn _0d_bm(self) -> &'a mut W { + self.variant(TXPOWER_A::_0D_BM) + } + #[doc = "-4 dBm"] + #[inline(always)] + pub fn neg4d_bm(self) -> &'a mut W { + self.variant(TXPOWER_A::NEG4D_BM) + } + #[doc = "-8 dBm"] + #[inline(always)] + pub fn neg8d_bm(self) -> &'a mut W { + self.variant(TXPOWER_A::NEG8D_BM) + } + #[doc = "-12 dBm"] + #[inline(always)] + pub fn neg12d_bm(self) -> &'a mut W { + self.variant(TXPOWER_A::NEG12D_BM) + } + #[doc = "-16 dBm"] + #[inline(always)] + pub fn neg16d_bm(self) -> &'a mut W { + self.variant(TXPOWER_A::NEG16D_BM) + } + #[doc = "-20 dBm"] + #[inline(always)] + pub fn neg20d_bm(self) -> &'a mut W { + self.variant(TXPOWER_A::NEG20D_BM) + } + #[doc = "Deprecated enumerator - -40 dBm"] + #[inline(always)] + pub fn neg30d_bm(self) -> &'a mut W { + self.variant(TXPOWER_A::NEG30D_BM) + } + #[doc = "-40 dBm"] + #[inline(always)] + pub fn neg40d_bm(self) -> &'a mut W { + self.variant(TXPOWER_A::NEG40D_BM) + } +} +impl R { + #[doc = "Bits 0:7 - RADIO output power."] + #[inline(always)] + pub fn txpower(&self) -> TXPOWER_R { + TXPOWER_R::new((self.bits & 0xff) as u8) + } +} +impl W { + #[doc = "Bits 0:7 - RADIO output power."] + #[inline(always)] + #[must_use] + pub fn txpower(&mut self) -> TXPOWER_W<0> { + TXPOWER_W::new(self) + } + #[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 = "Output power\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 [txpower](index.html) module"] +pub struct TXPOWER_SPEC; +impl crate::RegisterSpec for TXPOWER_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [txpower::R](R) reader structure"] +impl crate::Readable for TXPOWER_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [txpower::W](W) writer structure"] +impl crate::Writable for TXPOWER_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets TXPOWER to value 0"] +impl crate::Resettable for TXPOWER_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/rng.rs b/down-the-stack/dk_pac/src/rng.rs new file mode 100644 index 0000000..b13112e --- /dev/null +++ b/down-the-stack/dk_pac/src/rng.rs @@ -0,0 +1,56 @@ +#[doc = r"Register block"] +#[repr(C)] +pub struct RegisterBlock { + #[doc = "0x00 - Task starting the random number generator"] + pub tasks_start: TASKS_START, + #[doc = "0x04 - Task stopping the random number generator"] + pub tasks_stop: TASKS_STOP, + _reserved2: [u8; 0xf8], + #[doc = "0x100 - Event being generated for every new random number written to the VALUE register"] + pub events_valrdy: EVENTS_VALRDY, + _reserved3: [u8; 0xfc], + #[doc = "0x200 - Shortcuts between local events and tasks"] + pub shorts: SHORTS, + _reserved4: [u8; 0x0100], + #[doc = "0x304 - Enable interrupt"] + pub intenset: INTENSET, + #[doc = "0x308 - Disable interrupt"] + pub intenclr: INTENCLR, + _reserved6: [u8; 0x01f8], + #[doc = "0x504 - Configuration register"] + pub config: CONFIG, + #[doc = "0x508 - Output random number"] + pub value: VALUE, +} +#[doc = "TASKS_START (w) register accessor: an alias for `Reg`"] +pub type TASKS_START = crate::Reg; +#[doc = "Task starting the random number generator"] +pub mod tasks_start; +#[doc = "TASKS_STOP (w) register accessor: an alias for `Reg`"] +pub type TASKS_STOP = crate::Reg; +#[doc = "Task stopping the random number generator"] +pub mod tasks_stop; +#[doc = "EVENTS_VALRDY (rw) register accessor: an alias for `Reg`"] +pub type EVENTS_VALRDY = crate::Reg; +#[doc = "Event being generated for every new random number written to the VALUE register"] +pub mod events_valrdy; +#[doc = "SHORTS (rw) register accessor: an alias for `Reg`"] +pub type SHORTS = crate::Reg; +#[doc = "Shortcuts between local events and tasks"] +pub mod shorts; +#[doc = "INTENSET (rw) register accessor: an alias for `Reg`"] +pub type INTENSET = crate::Reg; +#[doc = "Enable interrupt"] +pub mod intenset; +#[doc = "INTENCLR (rw) register accessor: an alias for `Reg`"] +pub type INTENCLR = crate::Reg; +#[doc = "Disable interrupt"] +pub mod intenclr; +#[doc = "CONFIG (rw) register accessor: an alias for `Reg`"] +pub type CONFIG = crate::Reg; +#[doc = "Configuration register"] +pub mod config; +#[doc = "VALUE (r) register accessor: an alias for `Reg`"] +pub type VALUE = crate::Reg; +#[doc = "Output random number"] +pub mod value; diff --git a/down-the-stack/dk_pac/src/rng/config.rs b/down-the-stack/dk_pac/src/rng/config.rs new file mode 100644 index 0000000..7d36f9e --- /dev/null +++ b/down-the-stack/dk_pac/src/rng/config.rs @@ -0,0 +1,126 @@ +#[doc = "Register `CONFIG` 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 `CONFIG` 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 `DERCEN` reader - Bias correction"] +pub type DERCEN_R = crate::BitReader; +#[doc = "Bias correction\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum DERCEN_A { + #[doc = "0: Disabled"] + DISABLED = 0, + #[doc = "1: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: DERCEN_A) -> Self { + variant as u8 != 0 + } +} +impl DERCEN_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> DERCEN_A { + match self.bits { + false => DERCEN_A::DISABLED, + true => DERCEN_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == DERCEN_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == DERCEN_A::ENABLED + } +} +#[doc = "Field `DERCEN` writer - Bias correction"] +pub type DERCEN_W<'a, const O: u8> = crate::BitWriter<'a, u32, CONFIG_SPEC, DERCEN_A, O>; +impl<'a, const O: u8> DERCEN_W<'a, O> { + #[doc = "Disabled"] + #[inline(always)] + pub fn disabled(self) -> &'a mut W { + self.variant(DERCEN_A::DISABLED) + } + #[doc = "Enabled"] + #[inline(always)] + pub fn enabled(self) -> &'a mut W { + self.variant(DERCEN_A::ENABLED) + } +} +impl R { + #[doc = "Bit 0 - Bias correction"] + #[inline(always)] + pub fn dercen(&self) -> DERCEN_R { + DERCEN_R::new((self.bits & 1) != 0) + } +} +impl W { + #[doc = "Bit 0 - Bias correction"] + #[inline(always)] + #[must_use] + pub fn dercen(&mut self) -> DERCEN_W<0> { + DERCEN_W::new(self) + } + #[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 = "Configuration register\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 [config](index.html) module"] +pub struct CONFIG_SPEC; +impl crate::RegisterSpec for CONFIG_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [config::R](R) reader structure"] +impl crate::Readable for CONFIG_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [config::W](W) writer structure"] +impl crate::Writable for 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 CONFIG to value 0"] +impl crate::Resettable for CONFIG_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/rng/events_valrdy.rs b/down-the-stack/dk_pac/src/rng/events_valrdy.rs new file mode 100644 index 0000000..406796e --- /dev/null +++ b/down-the-stack/dk_pac/src/rng/events_valrdy.rs @@ -0,0 +1,127 @@ +#[doc = "Register `EVENTS_VALRDY` 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 `EVENTS_VALRDY` 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 `EVENTS_VALRDY` reader - Event being generated for every new random number written to the VALUE register"] +pub type EVENTS_VALRDY_R = crate::BitReader; +#[doc = "Event being generated for every new random number written to the VALUE register\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum EVENTS_VALRDY_A { + #[doc = "0: Event not generated"] + NOT_GENERATED = 0, + #[doc = "1: Event generated"] + GENERATED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: EVENTS_VALRDY_A) -> Self { + variant as u8 != 0 + } +} +impl EVENTS_VALRDY_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> EVENTS_VALRDY_A { + match self.bits { + false => EVENTS_VALRDY_A::NOT_GENERATED, + true => EVENTS_VALRDY_A::GENERATED, + } + } + #[doc = "Checks if the value of the field is `NOT_GENERATED`"] + #[inline(always)] + pub fn is_not_generated(&self) -> bool { + *self == EVENTS_VALRDY_A::NOT_GENERATED + } + #[doc = "Checks if the value of the field is `GENERATED`"] + #[inline(always)] + pub fn is_generated(&self) -> bool { + *self == EVENTS_VALRDY_A::GENERATED + } +} +#[doc = "Field `EVENTS_VALRDY` writer - Event being generated for every new random number written to the VALUE register"] +pub type EVENTS_VALRDY_W<'a, const O: u8> = + crate::BitWriter<'a, u32, EVENTS_VALRDY_SPEC, EVENTS_VALRDY_A, O>; +impl<'a, const O: u8> EVENTS_VALRDY_W<'a, O> { + #[doc = "Event not generated"] + #[inline(always)] + pub fn not_generated(self) -> &'a mut W { + self.variant(EVENTS_VALRDY_A::NOT_GENERATED) + } + #[doc = "Event generated"] + #[inline(always)] + pub fn generated(self) -> &'a mut W { + self.variant(EVENTS_VALRDY_A::GENERATED) + } +} +impl R { + #[doc = "Bit 0 - Event being generated for every new random number written to the VALUE register"] + #[inline(always)] + pub fn events_valrdy(&self) -> EVENTS_VALRDY_R { + EVENTS_VALRDY_R::new((self.bits & 1) != 0) + } +} +impl W { + #[doc = "Bit 0 - Event being generated for every new random number written to the VALUE register"] + #[inline(always)] + #[must_use] + pub fn events_valrdy(&mut self) -> EVENTS_VALRDY_W<0> { + EVENTS_VALRDY_W::new(self) + } + #[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 = "Event being generated for every new random number written to the VALUE register\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 [events_valrdy](index.html) module"] +pub struct EVENTS_VALRDY_SPEC; +impl crate::RegisterSpec for EVENTS_VALRDY_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [events_valrdy::R](R) reader structure"] +impl crate::Readable for EVENTS_VALRDY_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [events_valrdy::W](W) writer structure"] +impl crate::Writable for EVENTS_VALRDY_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets EVENTS_VALRDY to value 0"] +impl crate::Resettable for EVENTS_VALRDY_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/rng/intenclr.rs b/down-the-stack/dk_pac/src/rng/intenclr.rs new file mode 100644 index 0000000..5ef1411 --- /dev/null +++ b/down-the-stack/dk_pac/src/rng/intenclr.rs @@ -0,0 +1,133 @@ +#[doc = "Register `INTENCLR` 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 `INTENCLR` 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 `VALRDY` reader - Write '1' to disable interrupt for event VALRDY"] +pub type VALRDY_R = crate::BitReader; +#[doc = "Write '1' to disable interrupt for event VALRDY\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum VALRDY_A { + #[doc = "0: Read: Disabled"] + DISABLED = 0, + #[doc = "1: Read: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: VALRDY_A) -> Self { + variant as u8 != 0 + } +} +impl VALRDY_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> VALRDY_A { + match self.bits { + false => VALRDY_A::DISABLED, + true => VALRDY_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == VALRDY_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == VALRDY_A::ENABLED + } +} +#[doc = "Write '1' to disable interrupt for event VALRDY\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum VALRDY_AW { + #[doc = "1: Disable"] + CLEAR = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: VALRDY_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `VALRDY` writer - Write '1' to disable interrupt for event VALRDY"] +pub type VALRDY_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENCLR_SPEC, VALRDY_AW, O>; +impl<'a, const O: u8> VALRDY_W<'a, O> { + #[doc = "Disable"] + #[inline(always)] + pub fn clear(self) -> &'a mut W { + self.variant(VALRDY_AW::CLEAR) + } +} +impl R { + #[doc = "Bit 0 - Write '1' to disable interrupt for event VALRDY"] + #[inline(always)] + pub fn valrdy(&self) -> VALRDY_R { + VALRDY_R::new((self.bits & 1) != 0) + } +} +impl W { + #[doc = "Bit 0 - Write '1' to disable interrupt for event VALRDY"] + #[inline(always)] + #[must_use] + pub fn valrdy(&mut self) -> VALRDY_W<0> { + VALRDY_W::new(self) + } + #[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 = "Disable interrupt\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 [intenclr](index.html) module"] +pub struct INTENCLR_SPEC; +impl crate::RegisterSpec for INTENCLR_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [intenclr::R](R) reader structure"] +impl crate::Readable for INTENCLR_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [intenclr::W](W) writer structure"] +impl crate::Writable for INTENCLR_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets INTENCLR to value 0"] +impl crate::Resettable for INTENCLR_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/rng/intenset.rs b/down-the-stack/dk_pac/src/rng/intenset.rs new file mode 100644 index 0000000..0a9f5b9 --- /dev/null +++ b/down-the-stack/dk_pac/src/rng/intenset.rs @@ -0,0 +1,133 @@ +#[doc = "Register `INTENSET` 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 `INTENSET` 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 `VALRDY` reader - Write '1' to enable interrupt for event VALRDY"] +pub type VALRDY_R = crate::BitReader; +#[doc = "Write '1' to enable interrupt for event VALRDY\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum VALRDY_A { + #[doc = "0: Read: Disabled"] + DISABLED = 0, + #[doc = "1: Read: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: VALRDY_A) -> Self { + variant as u8 != 0 + } +} +impl VALRDY_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> VALRDY_A { + match self.bits { + false => VALRDY_A::DISABLED, + true => VALRDY_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == VALRDY_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == VALRDY_A::ENABLED + } +} +#[doc = "Write '1' to enable interrupt for event VALRDY\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum VALRDY_AW { + #[doc = "1: Enable"] + SET = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: VALRDY_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `VALRDY` writer - Write '1' to enable interrupt for event VALRDY"] +pub type VALRDY_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENSET_SPEC, VALRDY_AW, O>; +impl<'a, const O: u8> VALRDY_W<'a, O> { + #[doc = "Enable"] + #[inline(always)] + pub fn set(self) -> &'a mut W { + self.variant(VALRDY_AW::SET) + } +} +impl R { + #[doc = "Bit 0 - Write '1' to enable interrupt for event VALRDY"] + #[inline(always)] + pub fn valrdy(&self) -> VALRDY_R { + VALRDY_R::new((self.bits & 1) != 0) + } +} +impl W { + #[doc = "Bit 0 - Write '1' to enable interrupt for event VALRDY"] + #[inline(always)] + #[must_use] + pub fn valrdy(&mut self) -> VALRDY_W<0> { + VALRDY_W::new(self) + } + #[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 = "Enable interrupt\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 [intenset](index.html) module"] +pub struct INTENSET_SPEC; +impl crate::RegisterSpec for INTENSET_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [intenset::R](R) reader structure"] +impl crate::Readable for INTENSET_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [intenset::W](W) writer structure"] +impl crate::Writable for INTENSET_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets INTENSET to value 0"] +impl crate::Resettable for INTENSET_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/rng/shorts.rs b/down-the-stack/dk_pac/src/rng/shorts.rs new file mode 100644 index 0000000..fefe5b4 --- /dev/null +++ b/down-the-stack/dk_pac/src/rng/shorts.rs @@ -0,0 +1,126 @@ +#[doc = "Register `SHORTS` 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 `SHORTS` 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 `VALRDY_STOP` reader - Shortcut between event VALRDY and task STOP"] +pub type VALRDY_STOP_R = crate::BitReader; +#[doc = "Shortcut between event VALRDY and task STOP\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum VALRDY_STOP_A { + #[doc = "0: Disable shortcut"] + DISABLED = 0, + #[doc = "1: Enable shortcut"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: VALRDY_STOP_A) -> Self { + variant as u8 != 0 + } +} +impl VALRDY_STOP_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> VALRDY_STOP_A { + match self.bits { + false => VALRDY_STOP_A::DISABLED, + true => VALRDY_STOP_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == VALRDY_STOP_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == VALRDY_STOP_A::ENABLED + } +} +#[doc = "Field `VALRDY_STOP` writer - Shortcut between event VALRDY and task STOP"] +pub type VALRDY_STOP_W<'a, const O: u8> = crate::BitWriter<'a, u32, SHORTS_SPEC, VALRDY_STOP_A, O>; +impl<'a, const O: u8> VALRDY_STOP_W<'a, O> { + #[doc = "Disable shortcut"] + #[inline(always)] + pub fn disabled(self) -> &'a mut W { + self.variant(VALRDY_STOP_A::DISABLED) + } + #[doc = "Enable shortcut"] + #[inline(always)] + pub fn enabled(self) -> &'a mut W { + self.variant(VALRDY_STOP_A::ENABLED) + } +} +impl R { + #[doc = "Bit 0 - Shortcut between event VALRDY and task STOP"] + #[inline(always)] + pub fn valrdy_stop(&self) -> VALRDY_STOP_R { + VALRDY_STOP_R::new((self.bits & 1) != 0) + } +} +impl W { + #[doc = "Bit 0 - Shortcut between event VALRDY and task STOP"] + #[inline(always)] + #[must_use] + pub fn valrdy_stop(&mut self) -> VALRDY_STOP_W<0> { + VALRDY_STOP_W::new(self) + } + #[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 = "Shortcuts between local events and tasks\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 [shorts](index.html) module"] +pub struct SHORTS_SPEC; +impl crate::RegisterSpec for SHORTS_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [shorts::R](R) reader structure"] +impl crate::Readable for SHORTS_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [shorts::W](W) writer structure"] +impl crate::Writable for SHORTS_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets SHORTS to value 0"] +impl crate::Resettable for SHORTS_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/rng/tasks_start.rs b/down-the-stack/dk_pac/src/rng/tasks_start.rs new file mode 100644 index 0000000..d148251 --- /dev/null +++ b/down-the-stack/dk_pac/src/rng/tasks_start.rs @@ -0,0 +1,72 @@ +#[doc = "Register `TASKS_START` 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 = "Task starting the random number generator\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum TASKS_START_AW { + #[doc = "1: Trigger task"] + TRIGGER = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: TASKS_START_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `TASKS_START` writer - Task starting the random number generator"] +pub type TASKS_START_W<'a, const O: u8> = + crate::BitWriter<'a, u32, TASKS_START_SPEC, TASKS_START_AW, O>; +impl<'a, const O: u8> TASKS_START_W<'a, O> { + #[doc = "Trigger task"] + #[inline(always)] + pub fn trigger(self) -> &'a mut W { + self.variant(TASKS_START_AW::TRIGGER) + } +} +impl W { + #[doc = "Bit 0 - Task starting the random number generator"] + #[inline(always)] + #[must_use] + pub fn tasks_start(&mut self) -> TASKS_START_W<0> { + TASKS_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 + } +} +#[doc = "Task starting the random number generator\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 [tasks_start](index.html) module"] +pub struct TASKS_START_SPEC; +impl crate::RegisterSpec for TASKS_START_SPEC { + type Ux = u32; +} +#[doc = "`write(|w| ..)` method takes [tasks_start::W](W) writer structure"] +impl crate::Writable for TASKS_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 TASKS_START to value 0"] +impl crate::Resettable for TASKS_START_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/rng/tasks_stop.rs b/down-the-stack/dk_pac/src/rng/tasks_stop.rs new file mode 100644 index 0000000..e4e0c51 --- /dev/null +++ b/down-the-stack/dk_pac/src/rng/tasks_stop.rs @@ -0,0 +1,72 @@ +#[doc = "Register `TASKS_STOP` 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 = "Task stopping the random number generator\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum TASKS_STOP_AW { + #[doc = "1: Trigger task"] + TRIGGER = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: TASKS_STOP_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `TASKS_STOP` writer - Task stopping the random number generator"] +pub type TASKS_STOP_W<'a, const O: u8> = + crate::BitWriter<'a, u32, TASKS_STOP_SPEC, TASKS_STOP_AW, O>; +impl<'a, const O: u8> TASKS_STOP_W<'a, O> { + #[doc = "Trigger task"] + #[inline(always)] + pub fn trigger(self) -> &'a mut W { + self.variant(TASKS_STOP_AW::TRIGGER) + } +} +impl W { + #[doc = "Bit 0 - Task stopping the random number generator"] + #[inline(always)] + #[must_use] + pub fn tasks_stop(&mut self) -> TASKS_STOP_W<0> { + TASKS_STOP_W::new(self) + } + #[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 = "Task stopping the random number generator\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 [tasks_stop](index.html) module"] +pub struct TASKS_STOP_SPEC; +impl crate::RegisterSpec for TASKS_STOP_SPEC { + type Ux = u32; +} +#[doc = "`write(|w| ..)` method takes [tasks_stop::W](W) writer structure"] +impl crate::Writable for TASKS_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 TASKS_STOP to value 0"] +impl crate::Resettable for TASKS_STOP_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/rng/value.rs b/down-the-stack/dk_pac/src/rng/value.rs new file mode 100644 index 0000000..c794f82 --- /dev/null +++ b/down-the-stack/dk_pac/src/rng/value.rs @@ -0,0 +1,37 @@ +#[doc = "Register `VALUE` 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 = "Field `VALUE` reader - Generated random number"] +pub type VALUE_R = crate::FieldReader; +impl R { + #[doc = "Bits 0:7 - Generated random number"] + #[inline(always)] + pub fn value(&self) -> VALUE_R { + VALUE_R::new((self.bits & 0xff) as u8) + } +} +#[doc = "Output random number\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 [value](index.html) module"] +pub struct VALUE_SPEC; +impl crate::RegisterSpec for VALUE_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [value::R](R) reader structure"] +impl crate::Readable for VALUE_SPEC { + type Reader = R; +} +#[doc = "`reset()` method sets VALUE to value 0"] +impl crate::Resettable for VALUE_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/rtc0.rs b/down-the-stack/dk_pac/src/rtc0.rs new file mode 100644 index 0000000..738e94f --- /dev/null +++ b/down-the-stack/dk_pac/src/rtc0.rs @@ -0,0 +1,102 @@ +#[doc = r"Register block"] +#[repr(C)] +pub struct RegisterBlock { + #[doc = "0x00 - Start RTC COUNTER"] + pub tasks_start: TASKS_START, + #[doc = "0x04 - Stop RTC COUNTER"] + pub tasks_stop: TASKS_STOP, + #[doc = "0x08 - Clear RTC COUNTER"] + pub tasks_clear: TASKS_CLEAR, + #[doc = "0x0c - Set COUNTER to 0xFFFFF0"] + pub tasks_trigovrflw: TASKS_TRIGOVRFLW, + _reserved4: [u8; 0xf0], + #[doc = "0x100 - Event on COUNTER increment"] + pub events_tick: EVENTS_TICK, + #[doc = "0x104 - Event on COUNTER overflow"] + pub events_ovrflw: EVENTS_OVRFLW, + _reserved6: [u8; 0x38], + #[doc = "0x140..0x150 - Description collection: Compare event on CC\\[n\\] +match"] + pub events_compare: [EVENTS_COMPARE; 4], + _reserved7: [u8; 0x01b4], + #[doc = "0x304 - Enable interrupt"] + pub intenset: INTENSET, + #[doc = "0x308 - Disable interrupt"] + pub intenclr: INTENCLR, + _reserved9: [u8; 0x34], + #[doc = "0x340 - Enable or disable event routing"] + pub evten: EVTEN, + #[doc = "0x344 - Enable event routing"] + pub evtenset: EVTENSET, + #[doc = "0x348 - Disable event routing"] + pub evtenclr: EVTENCLR, + _reserved12: [u8; 0x01b8], + #[doc = "0x504 - Current COUNTER value"] + pub counter: COUNTER, + #[doc = "0x508 - 12 bit prescaler for COUNTER frequency (32768/(PRESCALER+1)).Must be written when RTC is stopped"] + pub prescaler: PRESCALER, + _reserved14: [u8; 0x34], + #[doc = "0x540..0x550 - Description collection: Compare register n"] + pub cc: [CC; 4], +} +#[doc = "TASKS_START (w) register accessor: an alias for `Reg`"] +pub type TASKS_START = crate::Reg; +#[doc = "Start RTC COUNTER"] +pub mod tasks_start; +#[doc = "TASKS_STOP (w) register accessor: an alias for `Reg`"] +pub type TASKS_STOP = crate::Reg; +#[doc = "Stop RTC COUNTER"] +pub mod tasks_stop; +#[doc = "TASKS_CLEAR (w) register accessor: an alias for `Reg`"] +pub type TASKS_CLEAR = crate::Reg; +#[doc = "Clear RTC COUNTER"] +pub mod tasks_clear; +#[doc = "TASKS_TRIGOVRFLW (w) register accessor: an alias for `Reg`"] +pub type TASKS_TRIGOVRFLW = crate::Reg; +#[doc = "Set COUNTER to 0xFFFFF0"] +pub mod tasks_trigovrflw; +#[doc = "EVENTS_TICK (rw) register accessor: an alias for `Reg`"] +pub type EVENTS_TICK = crate::Reg; +#[doc = "Event on COUNTER increment"] +pub mod events_tick; +#[doc = "EVENTS_OVRFLW (rw) register accessor: an alias for `Reg`"] +pub type EVENTS_OVRFLW = crate::Reg; +#[doc = "Event on COUNTER overflow"] +pub mod events_ovrflw; +#[doc = "EVENTS_COMPARE (rw) register accessor: an alias for `Reg`"] +pub type EVENTS_COMPARE = crate::Reg; +#[doc = "Description collection: Compare event on CC\\[n\\] +match"] +pub mod events_compare; +#[doc = "INTENSET (rw) register accessor: an alias for `Reg`"] +pub type INTENSET = crate::Reg; +#[doc = "Enable interrupt"] +pub mod intenset; +#[doc = "INTENCLR (rw) register accessor: an alias for `Reg`"] +pub type INTENCLR = crate::Reg; +#[doc = "Disable interrupt"] +pub mod intenclr; +#[doc = "EVTEN (rw) register accessor: an alias for `Reg`"] +pub type EVTEN = crate::Reg; +#[doc = "Enable or disable event routing"] +pub mod evten; +#[doc = "EVTENSET (rw) register accessor: an alias for `Reg`"] +pub type EVTENSET = crate::Reg; +#[doc = "Enable event routing"] +pub mod evtenset; +#[doc = "EVTENCLR (rw) register accessor: an alias for `Reg`"] +pub type EVTENCLR = crate::Reg; +#[doc = "Disable event routing"] +pub mod evtenclr; +#[doc = "COUNTER (r) register accessor: an alias for `Reg`"] +pub type COUNTER = crate::Reg; +#[doc = "Current COUNTER value"] +pub mod counter; +#[doc = "PRESCALER (rw) register accessor: an alias for `Reg`"] +pub type PRESCALER = crate::Reg; +#[doc = "12 bit prescaler for COUNTER frequency (32768/(PRESCALER+1)).Must be written when RTC is stopped"] +pub mod prescaler; +#[doc = "CC (rw) register accessor: an alias for `Reg`"] +pub type CC = crate::Reg; +#[doc = "Description collection: Compare register n"] +pub mod cc; diff --git a/down-the-stack/dk_pac/src/rtc0/cc.rs b/down-the-stack/dk_pac/src/rtc0/cc.rs new file mode 100644 index 0000000..e8d5b31 --- /dev/null +++ b/down-the-stack/dk_pac/src/rtc0/cc.rs @@ -0,0 +1,81 @@ +#[doc = "Register `CC[%s]` 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 `CC[%s]` 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 `COMPARE` reader - Compare value"] +pub type COMPARE_R = crate::FieldReader; +#[doc = "Field `COMPARE` writer - Compare value"] +pub type COMPARE_W<'a, const O: u8> = crate::FieldWriter<'a, u32, CC_SPEC, u32, u32, 24, O>; +impl R { + #[doc = "Bits 0:23 - Compare value"] + #[inline(always)] + pub fn compare(&self) -> COMPARE_R { + COMPARE_R::new(self.bits & 0x00ff_ffff) + } +} +impl W { + #[doc = "Bits 0:23 - Compare value"] + #[inline(always)] + #[must_use] + pub fn compare(&mut self) -> COMPARE_W<0> { + COMPARE_W::new(self) + } + #[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 = "Description collection: Compare register n\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 [cc](index.html) module"] +pub struct CC_SPEC; +impl crate::RegisterSpec for CC_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [cc::R](R) reader structure"] +impl crate::Readable for CC_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [cc::W](W) writer structure"] +impl crate::Writable for CC_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets CC[%s] +to value 0"] +impl crate::Resettable for CC_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/rtc0/counter.rs b/down-the-stack/dk_pac/src/rtc0/counter.rs new file mode 100644 index 0000000..a4525ea --- /dev/null +++ b/down-the-stack/dk_pac/src/rtc0/counter.rs @@ -0,0 +1,37 @@ +#[doc = "Register `COUNTER` 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 = "Field `COUNTER` reader - Counter value"] +pub type COUNTER_R = crate::FieldReader; +impl R { + #[doc = "Bits 0:23 - Counter value"] + #[inline(always)] + pub fn counter(&self) -> COUNTER_R { + COUNTER_R::new(self.bits & 0x00ff_ffff) + } +} +#[doc = "Current COUNTER value\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 [counter](index.html) module"] +pub struct COUNTER_SPEC; +impl crate::RegisterSpec for COUNTER_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [counter::R](R) reader structure"] +impl crate::Readable for COUNTER_SPEC { + type Reader = R; +} +#[doc = "`reset()` method sets COUNTER to value 0"] +impl crate::Resettable for COUNTER_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/rtc0/events_compare.rs b/down-the-stack/dk_pac/src/rtc0/events_compare.rs new file mode 100644 index 0000000..c7e1693 --- /dev/null +++ b/down-the-stack/dk_pac/src/rtc0/events_compare.rs @@ -0,0 +1,134 @@ +#[doc = "Register `EVENTS_COMPARE[%s]` 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 `EVENTS_COMPARE[%s]` 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 `EVENTS_COMPARE` reader - Compare event on CC\\[n\\] +match"] +pub type EVENTS_COMPARE_R = crate::BitReader; +#[doc = "Compare event on CC\\[n\\] +match\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum EVENTS_COMPARE_A { + #[doc = "0: Event not generated"] + NOT_GENERATED = 0, + #[doc = "1: Event generated"] + GENERATED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: EVENTS_COMPARE_A) -> Self { + variant as u8 != 0 + } +} +impl EVENTS_COMPARE_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> EVENTS_COMPARE_A { + match self.bits { + false => EVENTS_COMPARE_A::NOT_GENERATED, + true => EVENTS_COMPARE_A::GENERATED, + } + } + #[doc = "Checks if the value of the field is `NOT_GENERATED`"] + #[inline(always)] + pub fn is_not_generated(&self) -> bool { + *self == EVENTS_COMPARE_A::NOT_GENERATED + } + #[doc = "Checks if the value of the field is `GENERATED`"] + #[inline(always)] + pub fn is_generated(&self) -> bool { + *self == EVENTS_COMPARE_A::GENERATED + } +} +#[doc = "Field `EVENTS_COMPARE` writer - Compare event on CC\\[n\\] +match"] +pub type EVENTS_COMPARE_W<'a, const O: u8> = + crate::BitWriter<'a, u32, EVENTS_COMPARE_SPEC, EVENTS_COMPARE_A, O>; +impl<'a, const O: u8> EVENTS_COMPARE_W<'a, O> { + #[doc = "Event not generated"] + #[inline(always)] + pub fn not_generated(self) -> &'a mut W { + self.variant(EVENTS_COMPARE_A::NOT_GENERATED) + } + #[doc = "Event generated"] + #[inline(always)] + pub fn generated(self) -> &'a mut W { + self.variant(EVENTS_COMPARE_A::GENERATED) + } +} +impl R { + #[doc = "Bit 0 - Compare event on CC\\[n\\] +match"] + #[inline(always)] + pub fn events_compare(&self) -> EVENTS_COMPARE_R { + EVENTS_COMPARE_R::new((self.bits & 1) != 0) + } +} +impl W { + #[doc = "Bit 0 - Compare event on CC\\[n\\] +match"] + #[inline(always)] + #[must_use] + pub fn events_compare(&mut self) -> EVENTS_COMPARE_W<0> { + EVENTS_COMPARE_W::new(self) + } + #[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 = "Description collection: Compare event on CC\\[n\\] +match\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 [events_compare](index.html) module"] +pub struct EVENTS_COMPARE_SPEC; +impl crate::RegisterSpec for EVENTS_COMPARE_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [events_compare::R](R) reader structure"] +impl crate::Readable for EVENTS_COMPARE_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [events_compare::W](W) writer structure"] +impl crate::Writable for EVENTS_COMPARE_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets EVENTS_COMPARE[%s] +to value 0"] +impl crate::Resettable for EVENTS_COMPARE_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/rtc0/events_ovrflw.rs b/down-the-stack/dk_pac/src/rtc0/events_ovrflw.rs new file mode 100644 index 0000000..dbc2c37 --- /dev/null +++ b/down-the-stack/dk_pac/src/rtc0/events_ovrflw.rs @@ -0,0 +1,127 @@ +#[doc = "Register `EVENTS_OVRFLW` 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 `EVENTS_OVRFLW` 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 `EVENTS_OVRFLW` reader - Event on COUNTER overflow"] +pub type EVENTS_OVRFLW_R = crate::BitReader; +#[doc = "Event on COUNTER overflow\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum EVENTS_OVRFLW_A { + #[doc = "0: Event not generated"] + NOT_GENERATED = 0, + #[doc = "1: Event generated"] + GENERATED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: EVENTS_OVRFLW_A) -> Self { + variant as u8 != 0 + } +} +impl EVENTS_OVRFLW_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> EVENTS_OVRFLW_A { + match self.bits { + false => EVENTS_OVRFLW_A::NOT_GENERATED, + true => EVENTS_OVRFLW_A::GENERATED, + } + } + #[doc = "Checks if the value of the field is `NOT_GENERATED`"] + #[inline(always)] + pub fn is_not_generated(&self) -> bool { + *self == EVENTS_OVRFLW_A::NOT_GENERATED + } + #[doc = "Checks if the value of the field is `GENERATED`"] + #[inline(always)] + pub fn is_generated(&self) -> bool { + *self == EVENTS_OVRFLW_A::GENERATED + } +} +#[doc = "Field `EVENTS_OVRFLW` writer - Event on COUNTER overflow"] +pub type EVENTS_OVRFLW_W<'a, const O: u8> = + crate::BitWriter<'a, u32, EVENTS_OVRFLW_SPEC, EVENTS_OVRFLW_A, O>; +impl<'a, const O: u8> EVENTS_OVRFLW_W<'a, O> { + #[doc = "Event not generated"] + #[inline(always)] + pub fn not_generated(self) -> &'a mut W { + self.variant(EVENTS_OVRFLW_A::NOT_GENERATED) + } + #[doc = "Event generated"] + #[inline(always)] + pub fn generated(self) -> &'a mut W { + self.variant(EVENTS_OVRFLW_A::GENERATED) + } +} +impl R { + #[doc = "Bit 0 - Event on COUNTER overflow"] + #[inline(always)] + pub fn events_ovrflw(&self) -> EVENTS_OVRFLW_R { + EVENTS_OVRFLW_R::new((self.bits & 1) != 0) + } +} +impl W { + #[doc = "Bit 0 - Event on COUNTER overflow"] + #[inline(always)] + #[must_use] + pub fn events_ovrflw(&mut self) -> EVENTS_OVRFLW_W<0> { + EVENTS_OVRFLW_W::new(self) + } + #[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 = "Event on COUNTER overflow\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 [events_ovrflw](index.html) module"] +pub struct EVENTS_OVRFLW_SPEC; +impl crate::RegisterSpec for EVENTS_OVRFLW_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [events_ovrflw::R](R) reader structure"] +impl crate::Readable for EVENTS_OVRFLW_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [events_ovrflw::W](W) writer structure"] +impl crate::Writable for EVENTS_OVRFLW_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets EVENTS_OVRFLW to value 0"] +impl crate::Resettable for EVENTS_OVRFLW_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/rtc0/events_tick.rs b/down-the-stack/dk_pac/src/rtc0/events_tick.rs new file mode 100644 index 0000000..871d4e8 --- /dev/null +++ b/down-the-stack/dk_pac/src/rtc0/events_tick.rs @@ -0,0 +1,127 @@ +#[doc = "Register `EVENTS_TICK` 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 `EVENTS_TICK` 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 `EVENTS_TICK` reader - Event on COUNTER increment"] +pub type EVENTS_TICK_R = crate::BitReader; +#[doc = "Event on COUNTER increment\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum EVENTS_TICK_A { + #[doc = "0: Event not generated"] + NOT_GENERATED = 0, + #[doc = "1: Event generated"] + GENERATED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: EVENTS_TICK_A) -> Self { + variant as u8 != 0 + } +} +impl EVENTS_TICK_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> EVENTS_TICK_A { + match self.bits { + false => EVENTS_TICK_A::NOT_GENERATED, + true => EVENTS_TICK_A::GENERATED, + } + } + #[doc = "Checks if the value of the field is `NOT_GENERATED`"] + #[inline(always)] + pub fn is_not_generated(&self) -> bool { + *self == EVENTS_TICK_A::NOT_GENERATED + } + #[doc = "Checks if the value of the field is `GENERATED`"] + #[inline(always)] + pub fn is_generated(&self) -> bool { + *self == EVENTS_TICK_A::GENERATED + } +} +#[doc = "Field `EVENTS_TICK` writer - Event on COUNTER increment"] +pub type EVENTS_TICK_W<'a, const O: u8> = + crate::BitWriter<'a, u32, EVENTS_TICK_SPEC, EVENTS_TICK_A, O>; +impl<'a, const O: u8> EVENTS_TICK_W<'a, O> { + #[doc = "Event not generated"] + #[inline(always)] + pub fn not_generated(self) -> &'a mut W { + self.variant(EVENTS_TICK_A::NOT_GENERATED) + } + #[doc = "Event generated"] + #[inline(always)] + pub fn generated(self) -> &'a mut W { + self.variant(EVENTS_TICK_A::GENERATED) + } +} +impl R { + #[doc = "Bit 0 - Event on COUNTER increment"] + #[inline(always)] + pub fn events_tick(&self) -> EVENTS_TICK_R { + EVENTS_TICK_R::new((self.bits & 1) != 0) + } +} +impl W { + #[doc = "Bit 0 - Event on COUNTER increment"] + #[inline(always)] + #[must_use] + pub fn events_tick(&mut self) -> EVENTS_TICK_W<0> { + EVENTS_TICK_W::new(self) + } + #[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 = "Event on COUNTER increment\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 [events_tick](index.html) module"] +pub struct EVENTS_TICK_SPEC; +impl crate::RegisterSpec for EVENTS_TICK_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [events_tick::R](R) reader structure"] +impl crate::Readable for EVENTS_TICK_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [events_tick::W](W) writer structure"] +impl crate::Writable for EVENTS_TICK_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets EVENTS_TICK to value 0"] +impl crate::Resettable for EVENTS_TICK_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/rtc0/evten.rs b/down-the-stack/dk_pac/src/rtc0/evten.rs new file mode 100644 index 0000000..97d58c2 --- /dev/null +++ b/down-the-stack/dk_pac/src/rtc0/evten.rs @@ -0,0 +1,431 @@ +#[doc = "Register `EVTEN` 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 `EVTEN` 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 `TICK` reader - Enable or disable event routing for event TICK"] +pub type TICK_R = crate::BitReader; +#[doc = "Enable or disable event routing for event TICK\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum TICK_A { + #[doc = "0: Disable"] + DISABLED = 0, + #[doc = "1: Enable"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: TICK_A) -> Self { + variant as u8 != 0 + } +} +impl TICK_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> TICK_A { + match self.bits { + false => TICK_A::DISABLED, + true => TICK_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == TICK_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == TICK_A::ENABLED + } +} +#[doc = "Field `TICK` writer - Enable or disable event routing for event TICK"] +pub type TICK_W<'a, const O: u8> = crate::BitWriter<'a, u32, EVTEN_SPEC, TICK_A, O>; +impl<'a, const O: u8> TICK_W<'a, O> { + #[doc = "Disable"] + #[inline(always)] + pub fn disabled(self) -> &'a mut W { + self.variant(TICK_A::DISABLED) + } + #[doc = "Enable"] + #[inline(always)] + pub fn enabled(self) -> &'a mut W { + self.variant(TICK_A::ENABLED) + } +} +#[doc = "Field `OVRFLW` reader - Enable or disable event routing for event OVRFLW"] +pub type OVRFLW_R = crate::BitReader; +#[doc = "Enable or disable event routing for event OVRFLW\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum OVRFLW_A { + #[doc = "0: Disable"] + DISABLED = 0, + #[doc = "1: Enable"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: OVRFLW_A) -> Self { + variant as u8 != 0 + } +} +impl OVRFLW_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> OVRFLW_A { + match self.bits { + false => OVRFLW_A::DISABLED, + true => OVRFLW_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == OVRFLW_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == OVRFLW_A::ENABLED + } +} +#[doc = "Field `OVRFLW` writer - Enable or disable event routing for event OVRFLW"] +pub type OVRFLW_W<'a, const O: u8> = crate::BitWriter<'a, u32, EVTEN_SPEC, OVRFLW_A, O>; +impl<'a, const O: u8> OVRFLW_W<'a, O> { + #[doc = "Disable"] + #[inline(always)] + pub fn disabled(self) -> &'a mut W { + self.variant(OVRFLW_A::DISABLED) + } + #[doc = "Enable"] + #[inline(always)] + pub fn enabled(self) -> &'a mut W { + self.variant(OVRFLW_A::ENABLED) + } +} +#[doc = "Field `COMPARE0` reader - Enable or disable event routing for event COMPARE\\[0\\]"] +pub type COMPARE0_R = crate::BitReader; +#[doc = "Enable or disable event routing for event COMPARE\\[0\\]\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum COMPARE0_A { + #[doc = "0: Disable"] + DISABLED = 0, + #[doc = "1: Enable"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: COMPARE0_A) -> Self { + variant as u8 != 0 + } +} +impl COMPARE0_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> COMPARE0_A { + match self.bits { + false => COMPARE0_A::DISABLED, + true => COMPARE0_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == COMPARE0_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == COMPARE0_A::ENABLED + } +} +#[doc = "Field `COMPARE0` writer - Enable or disable event routing for event COMPARE\\[0\\]"] +pub type COMPARE0_W<'a, const O: u8> = crate::BitWriter<'a, u32, EVTEN_SPEC, COMPARE0_A, O>; +impl<'a, const O: u8> COMPARE0_W<'a, O> { + #[doc = "Disable"] + #[inline(always)] + pub fn disabled(self) -> &'a mut W { + self.variant(COMPARE0_A::DISABLED) + } + #[doc = "Enable"] + #[inline(always)] + pub fn enabled(self) -> &'a mut W { + self.variant(COMPARE0_A::ENABLED) + } +} +#[doc = "Field `COMPARE1` reader - Enable or disable event routing for event COMPARE\\[1\\]"] +pub type COMPARE1_R = crate::BitReader; +#[doc = "Enable or disable event routing for event COMPARE\\[1\\]\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum COMPARE1_A { + #[doc = "0: Disable"] + DISABLED = 0, + #[doc = "1: Enable"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: COMPARE1_A) -> Self { + variant as u8 != 0 + } +} +impl COMPARE1_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> COMPARE1_A { + match self.bits { + false => COMPARE1_A::DISABLED, + true => COMPARE1_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == COMPARE1_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == COMPARE1_A::ENABLED + } +} +#[doc = "Field `COMPARE1` writer - Enable or disable event routing for event COMPARE\\[1\\]"] +pub type COMPARE1_W<'a, const O: u8> = crate::BitWriter<'a, u32, EVTEN_SPEC, COMPARE1_A, O>; +impl<'a, const O: u8> COMPARE1_W<'a, O> { + #[doc = "Disable"] + #[inline(always)] + pub fn disabled(self) -> &'a mut W { + self.variant(COMPARE1_A::DISABLED) + } + #[doc = "Enable"] + #[inline(always)] + pub fn enabled(self) -> &'a mut W { + self.variant(COMPARE1_A::ENABLED) + } +} +#[doc = "Field `COMPARE2` reader - Enable or disable event routing for event COMPARE\\[2\\]"] +pub type COMPARE2_R = crate::BitReader; +#[doc = "Enable or disable event routing for event COMPARE\\[2\\]\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum COMPARE2_A { + #[doc = "0: Disable"] + DISABLED = 0, + #[doc = "1: Enable"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: COMPARE2_A) -> Self { + variant as u8 != 0 + } +} +impl COMPARE2_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> COMPARE2_A { + match self.bits { + false => COMPARE2_A::DISABLED, + true => COMPARE2_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == COMPARE2_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == COMPARE2_A::ENABLED + } +} +#[doc = "Field `COMPARE2` writer - Enable or disable event routing for event COMPARE\\[2\\]"] +pub type COMPARE2_W<'a, const O: u8> = crate::BitWriter<'a, u32, EVTEN_SPEC, COMPARE2_A, O>; +impl<'a, const O: u8> COMPARE2_W<'a, O> { + #[doc = "Disable"] + #[inline(always)] + pub fn disabled(self) -> &'a mut W { + self.variant(COMPARE2_A::DISABLED) + } + #[doc = "Enable"] + #[inline(always)] + pub fn enabled(self) -> &'a mut W { + self.variant(COMPARE2_A::ENABLED) + } +} +#[doc = "Field `COMPARE3` reader - Enable or disable event routing for event COMPARE\\[3\\]"] +pub type COMPARE3_R = crate::BitReader; +#[doc = "Enable or disable event routing for event COMPARE\\[3\\]\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum COMPARE3_A { + #[doc = "0: Disable"] + DISABLED = 0, + #[doc = "1: Enable"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: COMPARE3_A) -> Self { + variant as u8 != 0 + } +} +impl COMPARE3_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> COMPARE3_A { + match self.bits { + false => COMPARE3_A::DISABLED, + true => COMPARE3_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == COMPARE3_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == COMPARE3_A::ENABLED + } +} +#[doc = "Field `COMPARE3` writer - Enable or disable event routing for event COMPARE\\[3\\]"] +pub type COMPARE3_W<'a, const O: u8> = crate::BitWriter<'a, u32, EVTEN_SPEC, COMPARE3_A, O>; +impl<'a, const O: u8> COMPARE3_W<'a, O> { + #[doc = "Disable"] + #[inline(always)] + pub fn disabled(self) -> &'a mut W { + self.variant(COMPARE3_A::DISABLED) + } + #[doc = "Enable"] + #[inline(always)] + pub fn enabled(self) -> &'a mut W { + self.variant(COMPARE3_A::ENABLED) + } +} +impl R { + #[doc = "Bit 0 - Enable or disable event routing for event TICK"] + #[inline(always)] + pub fn tick(&self) -> TICK_R { + TICK_R::new((self.bits & 1) != 0) + } + #[doc = "Bit 1 - Enable or disable event routing for event OVRFLW"] + #[inline(always)] + pub fn ovrflw(&self) -> OVRFLW_R { + OVRFLW_R::new(((self.bits >> 1) & 1) != 0) + } + #[doc = "Bit 16 - Enable or disable event routing for event COMPARE\\[0\\]"] + #[inline(always)] + pub fn compare0(&self) -> COMPARE0_R { + COMPARE0_R::new(((self.bits >> 16) & 1) != 0) + } + #[doc = "Bit 17 - Enable or disable event routing for event COMPARE\\[1\\]"] + #[inline(always)] + pub fn compare1(&self) -> COMPARE1_R { + COMPARE1_R::new(((self.bits >> 17) & 1) != 0) + } + #[doc = "Bit 18 - Enable or disable event routing for event COMPARE\\[2\\]"] + #[inline(always)] + pub fn compare2(&self) -> COMPARE2_R { + COMPARE2_R::new(((self.bits >> 18) & 1) != 0) + } + #[doc = "Bit 19 - Enable or disable event routing for event COMPARE\\[3\\]"] + #[inline(always)] + pub fn compare3(&self) -> COMPARE3_R { + COMPARE3_R::new(((self.bits >> 19) & 1) != 0) + } +} +impl W { + #[doc = "Bit 0 - Enable or disable event routing for event TICK"] + #[inline(always)] + #[must_use] + pub fn tick(&mut self) -> TICK_W<0> { + TICK_W::new(self) + } + #[doc = "Bit 1 - Enable or disable event routing for event OVRFLW"] + #[inline(always)] + #[must_use] + pub fn ovrflw(&mut self) -> OVRFLW_W<1> { + OVRFLW_W::new(self) + } + #[doc = "Bit 16 - Enable or disable event routing for event COMPARE\\[0\\]"] + #[inline(always)] + #[must_use] + pub fn compare0(&mut self) -> COMPARE0_W<16> { + COMPARE0_W::new(self) + } + #[doc = "Bit 17 - Enable or disable event routing for event COMPARE\\[1\\]"] + #[inline(always)] + #[must_use] + pub fn compare1(&mut self) -> COMPARE1_W<17> { + COMPARE1_W::new(self) + } + #[doc = "Bit 18 - Enable or disable event routing for event COMPARE\\[2\\]"] + #[inline(always)] + #[must_use] + pub fn compare2(&mut self) -> COMPARE2_W<18> { + COMPARE2_W::new(self) + } + #[doc = "Bit 19 - Enable or disable event routing for event COMPARE\\[3\\]"] + #[inline(always)] + #[must_use] + pub fn compare3(&mut self) -> COMPARE3_W<19> { + COMPARE3_W::new(self) + } + #[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 = "Enable or disable event routing\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 [evten](index.html) module"] +pub struct EVTEN_SPEC; +impl crate::RegisterSpec for EVTEN_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [evten::R](R) reader structure"] +impl crate::Readable for EVTEN_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [evten::W](W) writer structure"] +impl crate::Writable for EVTEN_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets EVTEN to value 0"] +impl crate::Resettable for EVTEN_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/rtc0/evtenclr.rs b/down-the-stack/dk_pac/src/rtc0/evtenclr.rs new file mode 100644 index 0000000..bead5c5 --- /dev/null +++ b/down-the-stack/dk_pac/src/rtc0/evtenclr.rs @@ -0,0 +1,473 @@ +#[doc = "Register `EVTENCLR` 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 `EVTENCLR` 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 `TICK` reader - Write '1' to disable event routing for event TICK"] +pub type TICK_R = crate::BitReader; +#[doc = "Write '1' to disable event routing for event TICK\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum TICK_A { + #[doc = "0: Read: Disabled"] + DISABLED = 0, + #[doc = "1: Read: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: TICK_A) -> Self { + variant as u8 != 0 + } +} +impl TICK_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> TICK_A { + match self.bits { + false => TICK_A::DISABLED, + true => TICK_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == TICK_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == TICK_A::ENABLED + } +} +#[doc = "Write '1' to disable event routing for event TICK\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum TICK_AW { + #[doc = "1: Disable"] + CLEAR = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: TICK_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `TICK` writer - Write '1' to disable event routing for event TICK"] +pub type TICK_W<'a, const O: u8> = crate::BitWriter<'a, u32, EVTENCLR_SPEC, TICK_AW, O>; +impl<'a, const O: u8> TICK_W<'a, O> { + #[doc = "Disable"] + #[inline(always)] + pub fn clear(self) -> &'a mut W { + self.variant(TICK_AW::CLEAR) + } +} +#[doc = "Field `OVRFLW` reader - Write '1' to disable event routing for event OVRFLW"] +pub type OVRFLW_R = crate::BitReader; +#[doc = "Write '1' to disable event routing for event OVRFLW\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum OVRFLW_A { + #[doc = "0: Read: Disabled"] + DISABLED = 0, + #[doc = "1: Read: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: OVRFLW_A) -> Self { + variant as u8 != 0 + } +} +impl OVRFLW_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> OVRFLW_A { + match self.bits { + false => OVRFLW_A::DISABLED, + true => OVRFLW_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == OVRFLW_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == OVRFLW_A::ENABLED + } +} +#[doc = "Write '1' to disable event routing for event OVRFLW\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum OVRFLW_AW { + #[doc = "1: Disable"] + CLEAR = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: OVRFLW_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `OVRFLW` writer - Write '1' to disable event routing for event OVRFLW"] +pub type OVRFLW_W<'a, const O: u8> = crate::BitWriter<'a, u32, EVTENCLR_SPEC, OVRFLW_AW, O>; +impl<'a, const O: u8> OVRFLW_W<'a, O> { + #[doc = "Disable"] + #[inline(always)] + pub fn clear(self) -> &'a mut W { + self.variant(OVRFLW_AW::CLEAR) + } +} +#[doc = "Field `COMPARE0` reader - Write '1' to disable event routing for event COMPARE\\[0\\]"] +pub type COMPARE0_R = crate::BitReader; +#[doc = "Write '1' to disable event routing for event COMPARE\\[0\\]\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum COMPARE0_A { + #[doc = "0: Read: Disabled"] + DISABLED = 0, + #[doc = "1: Read: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: COMPARE0_A) -> Self { + variant as u8 != 0 + } +} +impl COMPARE0_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> COMPARE0_A { + match self.bits { + false => COMPARE0_A::DISABLED, + true => COMPARE0_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == COMPARE0_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == COMPARE0_A::ENABLED + } +} +#[doc = "Write '1' to disable event routing for event COMPARE\\[0\\]\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum COMPARE0_AW { + #[doc = "1: Disable"] + CLEAR = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: COMPARE0_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `COMPARE0` writer - Write '1' to disable event routing for event COMPARE\\[0\\]"] +pub type COMPARE0_W<'a, const O: u8> = crate::BitWriter<'a, u32, EVTENCLR_SPEC, COMPARE0_AW, O>; +impl<'a, const O: u8> COMPARE0_W<'a, O> { + #[doc = "Disable"] + #[inline(always)] + pub fn clear(self) -> &'a mut W { + self.variant(COMPARE0_AW::CLEAR) + } +} +#[doc = "Field `COMPARE1` reader - Write '1' to disable event routing for event COMPARE\\[1\\]"] +pub type COMPARE1_R = crate::BitReader; +#[doc = "Write '1' to disable event routing for event COMPARE\\[1\\]\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum COMPARE1_A { + #[doc = "0: Read: Disabled"] + DISABLED = 0, + #[doc = "1: Read: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: COMPARE1_A) -> Self { + variant as u8 != 0 + } +} +impl COMPARE1_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> COMPARE1_A { + match self.bits { + false => COMPARE1_A::DISABLED, + true => COMPARE1_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == COMPARE1_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == COMPARE1_A::ENABLED + } +} +#[doc = "Write '1' to disable event routing for event COMPARE\\[1\\]\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum COMPARE1_AW { + #[doc = "1: Disable"] + CLEAR = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: COMPARE1_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `COMPARE1` writer - Write '1' to disable event routing for event COMPARE\\[1\\]"] +pub type COMPARE1_W<'a, const O: u8> = crate::BitWriter<'a, u32, EVTENCLR_SPEC, COMPARE1_AW, O>; +impl<'a, const O: u8> COMPARE1_W<'a, O> { + #[doc = "Disable"] + #[inline(always)] + pub fn clear(self) -> &'a mut W { + self.variant(COMPARE1_AW::CLEAR) + } +} +#[doc = "Field `COMPARE2` reader - Write '1' to disable event routing for event COMPARE\\[2\\]"] +pub type COMPARE2_R = crate::BitReader; +#[doc = "Write '1' to disable event routing for event COMPARE\\[2\\]\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum COMPARE2_A { + #[doc = "0: Read: Disabled"] + DISABLED = 0, + #[doc = "1: Read: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: COMPARE2_A) -> Self { + variant as u8 != 0 + } +} +impl COMPARE2_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> COMPARE2_A { + match self.bits { + false => COMPARE2_A::DISABLED, + true => COMPARE2_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == COMPARE2_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == COMPARE2_A::ENABLED + } +} +#[doc = "Write '1' to disable event routing for event COMPARE\\[2\\]\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum COMPARE2_AW { + #[doc = "1: Disable"] + CLEAR = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: COMPARE2_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `COMPARE2` writer - Write '1' to disable event routing for event COMPARE\\[2\\]"] +pub type COMPARE2_W<'a, const O: u8> = crate::BitWriter<'a, u32, EVTENCLR_SPEC, COMPARE2_AW, O>; +impl<'a, const O: u8> COMPARE2_W<'a, O> { + #[doc = "Disable"] + #[inline(always)] + pub fn clear(self) -> &'a mut W { + self.variant(COMPARE2_AW::CLEAR) + } +} +#[doc = "Field `COMPARE3` reader - Write '1' to disable event routing for event COMPARE\\[3\\]"] +pub type COMPARE3_R = crate::BitReader; +#[doc = "Write '1' to disable event routing for event COMPARE\\[3\\]\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum COMPARE3_A { + #[doc = "0: Read: Disabled"] + DISABLED = 0, + #[doc = "1: Read: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: COMPARE3_A) -> Self { + variant as u8 != 0 + } +} +impl COMPARE3_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> COMPARE3_A { + match self.bits { + false => COMPARE3_A::DISABLED, + true => COMPARE3_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == COMPARE3_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == COMPARE3_A::ENABLED + } +} +#[doc = "Write '1' to disable event routing for event COMPARE\\[3\\]\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum COMPARE3_AW { + #[doc = "1: Disable"] + CLEAR = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: COMPARE3_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `COMPARE3` writer - Write '1' to disable event routing for event COMPARE\\[3\\]"] +pub type COMPARE3_W<'a, const O: u8> = crate::BitWriter<'a, u32, EVTENCLR_SPEC, COMPARE3_AW, O>; +impl<'a, const O: u8> COMPARE3_W<'a, O> { + #[doc = "Disable"] + #[inline(always)] + pub fn clear(self) -> &'a mut W { + self.variant(COMPARE3_AW::CLEAR) + } +} +impl R { + #[doc = "Bit 0 - Write '1' to disable event routing for event TICK"] + #[inline(always)] + pub fn tick(&self) -> TICK_R { + TICK_R::new((self.bits & 1) != 0) + } + #[doc = "Bit 1 - Write '1' to disable event routing for event OVRFLW"] + #[inline(always)] + pub fn ovrflw(&self) -> OVRFLW_R { + OVRFLW_R::new(((self.bits >> 1) & 1) != 0) + } + #[doc = "Bit 16 - Write '1' to disable event routing for event COMPARE\\[0\\]"] + #[inline(always)] + pub fn compare0(&self) -> COMPARE0_R { + COMPARE0_R::new(((self.bits >> 16) & 1) != 0) + } + #[doc = "Bit 17 - Write '1' to disable event routing for event COMPARE\\[1\\]"] + #[inline(always)] + pub fn compare1(&self) -> COMPARE1_R { + COMPARE1_R::new(((self.bits >> 17) & 1) != 0) + } + #[doc = "Bit 18 - Write '1' to disable event routing for event COMPARE\\[2\\]"] + #[inline(always)] + pub fn compare2(&self) -> COMPARE2_R { + COMPARE2_R::new(((self.bits >> 18) & 1) != 0) + } + #[doc = "Bit 19 - Write '1' to disable event routing for event COMPARE\\[3\\]"] + #[inline(always)] + pub fn compare3(&self) -> COMPARE3_R { + COMPARE3_R::new(((self.bits >> 19) & 1) != 0) + } +} +impl W { + #[doc = "Bit 0 - Write '1' to disable event routing for event TICK"] + #[inline(always)] + #[must_use] + pub fn tick(&mut self) -> TICK_W<0> { + TICK_W::new(self) + } + #[doc = "Bit 1 - Write '1' to disable event routing for event OVRFLW"] + #[inline(always)] + #[must_use] + pub fn ovrflw(&mut self) -> OVRFLW_W<1> { + OVRFLW_W::new(self) + } + #[doc = "Bit 16 - Write '1' to disable event routing for event COMPARE\\[0\\]"] + #[inline(always)] + #[must_use] + pub fn compare0(&mut self) -> COMPARE0_W<16> { + COMPARE0_W::new(self) + } + #[doc = "Bit 17 - Write '1' to disable event routing for event COMPARE\\[1\\]"] + #[inline(always)] + #[must_use] + pub fn compare1(&mut self) -> COMPARE1_W<17> { + COMPARE1_W::new(self) + } + #[doc = "Bit 18 - Write '1' to disable event routing for event COMPARE\\[2\\]"] + #[inline(always)] + #[must_use] + pub fn compare2(&mut self) -> COMPARE2_W<18> { + COMPARE2_W::new(self) + } + #[doc = "Bit 19 - Write '1' to disable event routing for event COMPARE\\[3\\]"] + #[inline(always)] + #[must_use] + pub fn compare3(&mut self) -> COMPARE3_W<19> { + COMPARE3_W::new(self) + } + #[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 = "Disable event routing\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 [evtenclr](index.html) module"] +pub struct EVTENCLR_SPEC; +impl crate::RegisterSpec for EVTENCLR_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [evtenclr::R](R) reader structure"] +impl crate::Readable for EVTENCLR_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [evtenclr::W](W) writer structure"] +impl crate::Writable for EVTENCLR_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets EVTENCLR to value 0"] +impl crate::Resettable for EVTENCLR_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/rtc0/evtenset.rs b/down-the-stack/dk_pac/src/rtc0/evtenset.rs new file mode 100644 index 0000000..38b11e9 --- /dev/null +++ b/down-the-stack/dk_pac/src/rtc0/evtenset.rs @@ -0,0 +1,473 @@ +#[doc = "Register `EVTENSET` 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 `EVTENSET` 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 `TICK` reader - Write '1' to enable event routing for event TICK"] +pub type TICK_R = crate::BitReader; +#[doc = "Write '1' to enable event routing for event TICK\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum TICK_A { + #[doc = "0: Read: Disabled"] + DISABLED = 0, + #[doc = "1: Read: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: TICK_A) -> Self { + variant as u8 != 0 + } +} +impl TICK_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> TICK_A { + match self.bits { + false => TICK_A::DISABLED, + true => TICK_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == TICK_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == TICK_A::ENABLED + } +} +#[doc = "Write '1' to enable event routing for event TICK\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum TICK_AW { + #[doc = "1: Enable"] + SET = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: TICK_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `TICK` writer - Write '1' to enable event routing for event TICK"] +pub type TICK_W<'a, const O: u8> = crate::BitWriter<'a, u32, EVTENSET_SPEC, TICK_AW, O>; +impl<'a, const O: u8> TICK_W<'a, O> { + #[doc = "Enable"] + #[inline(always)] + pub fn set(self) -> &'a mut W { + self.variant(TICK_AW::SET) + } +} +#[doc = "Field `OVRFLW` reader - Write '1' to enable event routing for event OVRFLW"] +pub type OVRFLW_R = crate::BitReader; +#[doc = "Write '1' to enable event routing for event OVRFLW\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum OVRFLW_A { + #[doc = "0: Read: Disabled"] + DISABLED = 0, + #[doc = "1: Read: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: OVRFLW_A) -> Self { + variant as u8 != 0 + } +} +impl OVRFLW_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> OVRFLW_A { + match self.bits { + false => OVRFLW_A::DISABLED, + true => OVRFLW_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == OVRFLW_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == OVRFLW_A::ENABLED + } +} +#[doc = "Write '1' to enable event routing for event OVRFLW\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum OVRFLW_AW { + #[doc = "1: Enable"] + SET = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: OVRFLW_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `OVRFLW` writer - Write '1' to enable event routing for event OVRFLW"] +pub type OVRFLW_W<'a, const O: u8> = crate::BitWriter<'a, u32, EVTENSET_SPEC, OVRFLW_AW, O>; +impl<'a, const O: u8> OVRFLW_W<'a, O> { + #[doc = "Enable"] + #[inline(always)] + pub fn set(self) -> &'a mut W { + self.variant(OVRFLW_AW::SET) + } +} +#[doc = "Field `COMPARE0` reader - Write '1' to enable event routing for event COMPARE\\[0\\]"] +pub type COMPARE0_R = crate::BitReader; +#[doc = "Write '1' to enable event routing for event COMPARE\\[0\\]\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum COMPARE0_A { + #[doc = "0: Read: Disabled"] + DISABLED = 0, + #[doc = "1: Read: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: COMPARE0_A) -> Self { + variant as u8 != 0 + } +} +impl COMPARE0_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> COMPARE0_A { + match self.bits { + false => COMPARE0_A::DISABLED, + true => COMPARE0_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == COMPARE0_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == COMPARE0_A::ENABLED + } +} +#[doc = "Write '1' to enable event routing for event COMPARE\\[0\\]\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum COMPARE0_AW { + #[doc = "1: Enable"] + SET = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: COMPARE0_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `COMPARE0` writer - Write '1' to enable event routing for event COMPARE\\[0\\]"] +pub type COMPARE0_W<'a, const O: u8> = crate::BitWriter<'a, u32, EVTENSET_SPEC, COMPARE0_AW, O>; +impl<'a, const O: u8> COMPARE0_W<'a, O> { + #[doc = "Enable"] + #[inline(always)] + pub fn set(self) -> &'a mut W { + self.variant(COMPARE0_AW::SET) + } +} +#[doc = "Field `COMPARE1` reader - Write '1' to enable event routing for event COMPARE\\[1\\]"] +pub type COMPARE1_R = crate::BitReader; +#[doc = "Write '1' to enable event routing for event COMPARE\\[1\\]\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum COMPARE1_A { + #[doc = "0: Read: Disabled"] + DISABLED = 0, + #[doc = "1: Read: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: COMPARE1_A) -> Self { + variant as u8 != 0 + } +} +impl COMPARE1_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> COMPARE1_A { + match self.bits { + false => COMPARE1_A::DISABLED, + true => COMPARE1_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == COMPARE1_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == COMPARE1_A::ENABLED + } +} +#[doc = "Write '1' to enable event routing for event COMPARE\\[1\\]\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum COMPARE1_AW { + #[doc = "1: Enable"] + SET = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: COMPARE1_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `COMPARE1` writer - Write '1' to enable event routing for event COMPARE\\[1\\]"] +pub type COMPARE1_W<'a, const O: u8> = crate::BitWriter<'a, u32, EVTENSET_SPEC, COMPARE1_AW, O>; +impl<'a, const O: u8> COMPARE1_W<'a, O> { + #[doc = "Enable"] + #[inline(always)] + pub fn set(self) -> &'a mut W { + self.variant(COMPARE1_AW::SET) + } +} +#[doc = "Field `COMPARE2` reader - Write '1' to enable event routing for event COMPARE\\[2\\]"] +pub type COMPARE2_R = crate::BitReader; +#[doc = "Write '1' to enable event routing for event COMPARE\\[2\\]\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum COMPARE2_A { + #[doc = "0: Read: Disabled"] + DISABLED = 0, + #[doc = "1: Read: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: COMPARE2_A) -> Self { + variant as u8 != 0 + } +} +impl COMPARE2_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> COMPARE2_A { + match self.bits { + false => COMPARE2_A::DISABLED, + true => COMPARE2_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == COMPARE2_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == COMPARE2_A::ENABLED + } +} +#[doc = "Write '1' to enable event routing for event COMPARE\\[2\\]\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum COMPARE2_AW { + #[doc = "1: Enable"] + SET = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: COMPARE2_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `COMPARE2` writer - Write '1' to enable event routing for event COMPARE\\[2\\]"] +pub type COMPARE2_W<'a, const O: u8> = crate::BitWriter<'a, u32, EVTENSET_SPEC, COMPARE2_AW, O>; +impl<'a, const O: u8> COMPARE2_W<'a, O> { + #[doc = "Enable"] + #[inline(always)] + pub fn set(self) -> &'a mut W { + self.variant(COMPARE2_AW::SET) + } +} +#[doc = "Field `COMPARE3` reader - Write '1' to enable event routing for event COMPARE\\[3\\]"] +pub type COMPARE3_R = crate::BitReader; +#[doc = "Write '1' to enable event routing for event COMPARE\\[3\\]\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum COMPARE3_A { + #[doc = "0: Read: Disabled"] + DISABLED = 0, + #[doc = "1: Read: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: COMPARE3_A) -> Self { + variant as u8 != 0 + } +} +impl COMPARE3_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> COMPARE3_A { + match self.bits { + false => COMPARE3_A::DISABLED, + true => COMPARE3_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == COMPARE3_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == COMPARE3_A::ENABLED + } +} +#[doc = "Write '1' to enable event routing for event COMPARE\\[3\\]\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum COMPARE3_AW { + #[doc = "1: Enable"] + SET = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: COMPARE3_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `COMPARE3` writer - Write '1' to enable event routing for event COMPARE\\[3\\]"] +pub type COMPARE3_W<'a, const O: u8> = crate::BitWriter<'a, u32, EVTENSET_SPEC, COMPARE3_AW, O>; +impl<'a, const O: u8> COMPARE3_W<'a, O> { + #[doc = "Enable"] + #[inline(always)] + pub fn set(self) -> &'a mut W { + self.variant(COMPARE3_AW::SET) + } +} +impl R { + #[doc = "Bit 0 - Write '1' to enable event routing for event TICK"] + #[inline(always)] + pub fn tick(&self) -> TICK_R { + TICK_R::new((self.bits & 1) != 0) + } + #[doc = "Bit 1 - Write '1' to enable event routing for event OVRFLW"] + #[inline(always)] + pub fn ovrflw(&self) -> OVRFLW_R { + OVRFLW_R::new(((self.bits >> 1) & 1) != 0) + } + #[doc = "Bit 16 - Write '1' to enable event routing for event COMPARE\\[0\\]"] + #[inline(always)] + pub fn compare0(&self) -> COMPARE0_R { + COMPARE0_R::new(((self.bits >> 16) & 1) != 0) + } + #[doc = "Bit 17 - Write '1' to enable event routing for event COMPARE\\[1\\]"] + #[inline(always)] + pub fn compare1(&self) -> COMPARE1_R { + COMPARE1_R::new(((self.bits >> 17) & 1) != 0) + } + #[doc = "Bit 18 - Write '1' to enable event routing for event COMPARE\\[2\\]"] + #[inline(always)] + pub fn compare2(&self) -> COMPARE2_R { + COMPARE2_R::new(((self.bits >> 18) & 1) != 0) + } + #[doc = "Bit 19 - Write '1' to enable event routing for event COMPARE\\[3\\]"] + #[inline(always)] + pub fn compare3(&self) -> COMPARE3_R { + COMPARE3_R::new(((self.bits >> 19) & 1) != 0) + } +} +impl W { + #[doc = "Bit 0 - Write '1' to enable event routing for event TICK"] + #[inline(always)] + #[must_use] + pub fn tick(&mut self) -> TICK_W<0> { + TICK_W::new(self) + } + #[doc = "Bit 1 - Write '1' to enable event routing for event OVRFLW"] + #[inline(always)] + #[must_use] + pub fn ovrflw(&mut self) -> OVRFLW_W<1> { + OVRFLW_W::new(self) + } + #[doc = "Bit 16 - Write '1' to enable event routing for event COMPARE\\[0\\]"] + #[inline(always)] + #[must_use] + pub fn compare0(&mut self) -> COMPARE0_W<16> { + COMPARE0_W::new(self) + } + #[doc = "Bit 17 - Write '1' to enable event routing for event COMPARE\\[1\\]"] + #[inline(always)] + #[must_use] + pub fn compare1(&mut self) -> COMPARE1_W<17> { + COMPARE1_W::new(self) + } + #[doc = "Bit 18 - Write '1' to enable event routing for event COMPARE\\[2\\]"] + #[inline(always)] + #[must_use] + pub fn compare2(&mut self) -> COMPARE2_W<18> { + COMPARE2_W::new(self) + } + #[doc = "Bit 19 - Write '1' to enable event routing for event COMPARE\\[3\\]"] + #[inline(always)] + #[must_use] + pub fn compare3(&mut self) -> COMPARE3_W<19> { + COMPARE3_W::new(self) + } + #[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 = "Enable event routing\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 [evtenset](index.html) module"] +pub struct EVTENSET_SPEC; +impl crate::RegisterSpec for EVTENSET_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [evtenset::R](R) reader structure"] +impl crate::Readable for EVTENSET_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [evtenset::W](W) writer structure"] +impl crate::Writable for EVTENSET_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets EVTENSET to value 0"] +impl crate::Resettable for EVTENSET_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/rtc0/intenclr.rs b/down-the-stack/dk_pac/src/rtc0/intenclr.rs new file mode 100644 index 0000000..e3774cc --- /dev/null +++ b/down-the-stack/dk_pac/src/rtc0/intenclr.rs @@ -0,0 +1,473 @@ +#[doc = "Register `INTENCLR` 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 `INTENCLR` 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 `TICK` reader - Write '1' to disable interrupt for event TICK"] +pub type TICK_R = crate::BitReader; +#[doc = "Write '1' to disable interrupt for event TICK\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum TICK_A { + #[doc = "0: Read: Disabled"] + DISABLED = 0, + #[doc = "1: Read: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: TICK_A) -> Self { + variant as u8 != 0 + } +} +impl TICK_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> TICK_A { + match self.bits { + false => TICK_A::DISABLED, + true => TICK_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == TICK_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == TICK_A::ENABLED + } +} +#[doc = "Write '1' to disable interrupt for event TICK\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum TICK_AW { + #[doc = "1: Disable"] + CLEAR = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: TICK_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `TICK` writer - Write '1' to disable interrupt for event TICK"] +pub type TICK_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENCLR_SPEC, TICK_AW, O>; +impl<'a, const O: u8> TICK_W<'a, O> { + #[doc = "Disable"] + #[inline(always)] + pub fn clear(self) -> &'a mut W { + self.variant(TICK_AW::CLEAR) + } +} +#[doc = "Field `OVRFLW` reader - Write '1' to disable interrupt for event OVRFLW"] +pub type OVRFLW_R = crate::BitReader; +#[doc = "Write '1' to disable interrupt for event OVRFLW\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum OVRFLW_A { + #[doc = "0: Read: Disabled"] + DISABLED = 0, + #[doc = "1: Read: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: OVRFLW_A) -> Self { + variant as u8 != 0 + } +} +impl OVRFLW_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> OVRFLW_A { + match self.bits { + false => OVRFLW_A::DISABLED, + true => OVRFLW_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == OVRFLW_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == OVRFLW_A::ENABLED + } +} +#[doc = "Write '1' to disable interrupt for event OVRFLW\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum OVRFLW_AW { + #[doc = "1: Disable"] + CLEAR = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: OVRFLW_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `OVRFLW` writer - Write '1' to disable interrupt for event OVRFLW"] +pub type OVRFLW_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENCLR_SPEC, OVRFLW_AW, O>; +impl<'a, const O: u8> OVRFLW_W<'a, O> { + #[doc = "Disable"] + #[inline(always)] + pub fn clear(self) -> &'a mut W { + self.variant(OVRFLW_AW::CLEAR) + } +} +#[doc = "Field `COMPARE0` reader - Write '1' to disable interrupt for event COMPARE\\[0\\]"] +pub type COMPARE0_R = crate::BitReader; +#[doc = "Write '1' to disable interrupt for event COMPARE\\[0\\]\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum COMPARE0_A { + #[doc = "0: Read: Disabled"] + DISABLED = 0, + #[doc = "1: Read: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: COMPARE0_A) -> Self { + variant as u8 != 0 + } +} +impl COMPARE0_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> COMPARE0_A { + match self.bits { + false => COMPARE0_A::DISABLED, + true => COMPARE0_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == COMPARE0_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == COMPARE0_A::ENABLED + } +} +#[doc = "Write '1' to disable interrupt for event COMPARE\\[0\\]\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum COMPARE0_AW { + #[doc = "1: Disable"] + CLEAR = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: COMPARE0_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `COMPARE0` writer - Write '1' to disable interrupt for event COMPARE\\[0\\]"] +pub type COMPARE0_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENCLR_SPEC, COMPARE0_AW, O>; +impl<'a, const O: u8> COMPARE0_W<'a, O> { + #[doc = "Disable"] + #[inline(always)] + pub fn clear(self) -> &'a mut W { + self.variant(COMPARE0_AW::CLEAR) + } +} +#[doc = "Field `COMPARE1` reader - Write '1' to disable interrupt for event COMPARE\\[1\\]"] +pub type COMPARE1_R = crate::BitReader; +#[doc = "Write '1' to disable interrupt for event COMPARE\\[1\\]\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum COMPARE1_A { + #[doc = "0: Read: Disabled"] + DISABLED = 0, + #[doc = "1: Read: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: COMPARE1_A) -> Self { + variant as u8 != 0 + } +} +impl COMPARE1_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> COMPARE1_A { + match self.bits { + false => COMPARE1_A::DISABLED, + true => COMPARE1_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == COMPARE1_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == COMPARE1_A::ENABLED + } +} +#[doc = "Write '1' to disable interrupt for event COMPARE\\[1\\]\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum COMPARE1_AW { + #[doc = "1: Disable"] + CLEAR = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: COMPARE1_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `COMPARE1` writer - Write '1' to disable interrupt for event COMPARE\\[1\\]"] +pub type COMPARE1_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENCLR_SPEC, COMPARE1_AW, O>; +impl<'a, const O: u8> COMPARE1_W<'a, O> { + #[doc = "Disable"] + #[inline(always)] + pub fn clear(self) -> &'a mut W { + self.variant(COMPARE1_AW::CLEAR) + } +} +#[doc = "Field `COMPARE2` reader - Write '1' to disable interrupt for event COMPARE\\[2\\]"] +pub type COMPARE2_R = crate::BitReader; +#[doc = "Write '1' to disable interrupt for event COMPARE\\[2\\]\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum COMPARE2_A { + #[doc = "0: Read: Disabled"] + DISABLED = 0, + #[doc = "1: Read: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: COMPARE2_A) -> Self { + variant as u8 != 0 + } +} +impl COMPARE2_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> COMPARE2_A { + match self.bits { + false => COMPARE2_A::DISABLED, + true => COMPARE2_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == COMPARE2_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == COMPARE2_A::ENABLED + } +} +#[doc = "Write '1' to disable interrupt for event COMPARE\\[2\\]\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum COMPARE2_AW { + #[doc = "1: Disable"] + CLEAR = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: COMPARE2_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `COMPARE2` writer - Write '1' to disable interrupt for event COMPARE\\[2\\]"] +pub type COMPARE2_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENCLR_SPEC, COMPARE2_AW, O>; +impl<'a, const O: u8> COMPARE2_W<'a, O> { + #[doc = "Disable"] + #[inline(always)] + pub fn clear(self) -> &'a mut W { + self.variant(COMPARE2_AW::CLEAR) + } +} +#[doc = "Field `COMPARE3` reader - Write '1' to disable interrupt for event COMPARE\\[3\\]"] +pub type COMPARE3_R = crate::BitReader; +#[doc = "Write '1' to disable interrupt for event COMPARE\\[3\\]\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum COMPARE3_A { + #[doc = "0: Read: Disabled"] + DISABLED = 0, + #[doc = "1: Read: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: COMPARE3_A) -> Self { + variant as u8 != 0 + } +} +impl COMPARE3_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> COMPARE3_A { + match self.bits { + false => COMPARE3_A::DISABLED, + true => COMPARE3_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == COMPARE3_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == COMPARE3_A::ENABLED + } +} +#[doc = "Write '1' to disable interrupt for event COMPARE\\[3\\]\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum COMPARE3_AW { + #[doc = "1: Disable"] + CLEAR = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: COMPARE3_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `COMPARE3` writer - Write '1' to disable interrupt for event COMPARE\\[3\\]"] +pub type COMPARE3_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENCLR_SPEC, COMPARE3_AW, O>; +impl<'a, const O: u8> COMPARE3_W<'a, O> { + #[doc = "Disable"] + #[inline(always)] + pub fn clear(self) -> &'a mut W { + self.variant(COMPARE3_AW::CLEAR) + } +} +impl R { + #[doc = "Bit 0 - Write '1' to disable interrupt for event TICK"] + #[inline(always)] + pub fn tick(&self) -> TICK_R { + TICK_R::new((self.bits & 1) != 0) + } + #[doc = "Bit 1 - Write '1' to disable interrupt for event OVRFLW"] + #[inline(always)] + pub fn ovrflw(&self) -> OVRFLW_R { + OVRFLW_R::new(((self.bits >> 1) & 1) != 0) + } + #[doc = "Bit 16 - Write '1' to disable interrupt for event COMPARE\\[0\\]"] + #[inline(always)] + pub fn compare0(&self) -> COMPARE0_R { + COMPARE0_R::new(((self.bits >> 16) & 1) != 0) + } + #[doc = "Bit 17 - Write '1' to disable interrupt for event COMPARE\\[1\\]"] + #[inline(always)] + pub fn compare1(&self) -> COMPARE1_R { + COMPARE1_R::new(((self.bits >> 17) & 1) != 0) + } + #[doc = "Bit 18 - Write '1' to disable interrupt for event COMPARE\\[2\\]"] + #[inline(always)] + pub fn compare2(&self) -> COMPARE2_R { + COMPARE2_R::new(((self.bits >> 18) & 1) != 0) + } + #[doc = "Bit 19 - Write '1' to disable interrupt for event COMPARE\\[3\\]"] + #[inline(always)] + pub fn compare3(&self) -> COMPARE3_R { + COMPARE3_R::new(((self.bits >> 19) & 1) != 0) + } +} +impl W { + #[doc = "Bit 0 - Write '1' to disable interrupt for event TICK"] + #[inline(always)] + #[must_use] + pub fn tick(&mut self) -> TICK_W<0> { + TICK_W::new(self) + } + #[doc = "Bit 1 - Write '1' to disable interrupt for event OVRFLW"] + #[inline(always)] + #[must_use] + pub fn ovrflw(&mut self) -> OVRFLW_W<1> { + OVRFLW_W::new(self) + } + #[doc = "Bit 16 - Write '1' to disable interrupt for event COMPARE\\[0\\]"] + #[inline(always)] + #[must_use] + pub fn compare0(&mut self) -> COMPARE0_W<16> { + COMPARE0_W::new(self) + } + #[doc = "Bit 17 - Write '1' to disable interrupt for event COMPARE\\[1\\]"] + #[inline(always)] + #[must_use] + pub fn compare1(&mut self) -> COMPARE1_W<17> { + COMPARE1_W::new(self) + } + #[doc = "Bit 18 - Write '1' to disable interrupt for event COMPARE\\[2\\]"] + #[inline(always)] + #[must_use] + pub fn compare2(&mut self) -> COMPARE2_W<18> { + COMPARE2_W::new(self) + } + #[doc = "Bit 19 - Write '1' to disable interrupt for event COMPARE\\[3\\]"] + #[inline(always)] + #[must_use] + pub fn compare3(&mut self) -> COMPARE3_W<19> { + COMPARE3_W::new(self) + } + #[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 = "Disable interrupt\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 [intenclr](index.html) module"] +pub struct INTENCLR_SPEC; +impl crate::RegisterSpec for INTENCLR_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [intenclr::R](R) reader structure"] +impl crate::Readable for INTENCLR_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [intenclr::W](W) writer structure"] +impl crate::Writable for INTENCLR_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets INTENCLR to value 0"] +impl crate::Resettable for INTENCLR_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/rtc0/intenset.rs b/down-the-stack/dk_pac/src/rtc0/intenset.rs new file mode 100644 index 0000000..d7f253a --- /dev/null +++ b/down-the-stack/dk_pac/src/rtc0/intenset.rs @@ -0,0 +1,473 @@ +#[doc = "Register `INTENSET` 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 `INTENSET` 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 `TICK` reader - Write '1' to enable interrupt for event TICK"] +pub type TICK_R = crate::BitReader; +#[doc = "Write '1' to enable interrupt for event TICK\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum TICK_A { + #[doc = "0: Read: Disabled"] + DISABLED = 0, + #[doc = "1: Read: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: TICK_A) -> Self { + variant as u8 != 0 + } +} +impl TICK_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> TICK_A { + match self.bits { + false => TICK_A::DISABLED, + true => TICK_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == TICK_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == TICK_A::ENABLED + } +} +#[doc = "Write '1' to enable interrupt for event TICK\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum TICK_AW { + #[doc = "1: Enable"] + SET = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: TICK_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `TICK` writer - Write '1' to enable interrupt for event TICK"] +pub type TICK_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENSET_SPEC, TICK_AW, O>; +impl<'a, const O: u8> TICK_W<'a, O> { + #[doc = "Enable"] + #[inline(always)] + pub fn set(self) -> &'a mut W { + self.variant(TICK_AW::SET) + } +} +#[doc = "Field `OVRFLW` reader - Write '1' to enable interrupt for event OVRFLW"] +pub type OVRFLW_R = crate::BitReader; +#[doc = "Write '1' to enable interrupt for event OVRFLW\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum OVRFLW_A { + #[doc = "0: Read: Disabled"] + DISABLED = 0, + #[doc = "1: Read: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: OVRFLW_A) -> Self { + variant as u8 != 0 + } +} +impl OVRFLW_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> OVRFLW_A { + match self.bits { + false => OVRFLW_A::DISABLED, + true => OVRFLW_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == OVRFLW_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == OVRFLW_A::ENABLED + } +} +#[doc = "Write '1' to enable interrupt for event OVRFLW\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum OVRFLW_AW { + #[doc = "1: Enable"] + SET = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: OVRFLW_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `OVRFLW` writer - Write '1' to enable interrupt for event OVRFLW"] +pub type OVRFLW_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENSET_SPEC, OVRFLW_AW, O>; +impl<'a, const O: u8> OVRFLW_W<'a, O> { + #[doc = "Enable"] + #[inline(always)] + pub fn set(self) -> &'a mut W { + self.variant(OVRFLW_AW::SET) + } +} +#[doc = "Field `COMPARE0` reader - Write '1' to enable interrupt for event COMPARE\\[0\\]"] +pub type COMPARE0_R = crate::BitReader; +#[doc = "Write '1' to enable interrupt for event COMPARE\\[0\\]\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum COMPARE0_A { + #[doc = "0: Read: Disabled"] + DISABLED = 0, + #[doc = "1: Read: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: COMPARE0_A) -> Self { + variant as u8 != 0 + } +} +impl COMPARE0_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> COMPARE0_A { + match self.bits { + false => COMPARE0_A::DISABLED, + true => COMPARE0_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == COMPARE0_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == COMPARE0_A::ENABLED + } +} +#[doc = "Write '1' to enable interrupt for event COMPARE\\[0\\]\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum COMPARE0_AW { + #[doc = "1: Enable"] + SET = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: COMPARE0_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `COMPARE0` writer - Write '1' to enable interrupt for event COMPARE\\[0\\]"] +pub type COMPARE0_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENSET_SPEC, COMPARE0_AW, O>; +impl<'a, const O: u8> COMPARE0_W<'a, O> { + #[doc = "Enable"] + #[inline(always)] + pub fn set(self) -> &'a mut W { + self.variant(COMPARE0_AW::SET) + } +} +#[doc = "Field `COMPARE1` reader - Write '1' to enable interrupt for event COMPARE\\[1\\]"] +pub type COMPARE1_R = crate::BitReader; +#[doc = "Write '1' to enable interrupt for event COMPARE\\[1\\]\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum COMPARE1_A { + #[doc = "0: Read: Disabled"] + DISABLED = 0, + #[doc = "1: Read: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: COMPARE1_A) -> Self { + variant as u8 != 0 + } +} +impl COMPARE1_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> COMPARE1_A { + match self.bits { + false => COMPARE1_A::DISABLED, + true => COMPARE1_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == COMPARE1_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == COMPARE1_A::ENABLED + } +} +#[doc = "Write '1' to enable interrupt for event COMPARE\\[1\\]\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum COMPARE1_AW { + #[doc = "1: Enable"] + SET = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: COMPARE1_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `COMPARE1` writer - Write '1' to enable interrupt for event COMPARE\\[1\\]"] +pub type COMPARE1_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENSET_SPEC, COMPARE1_AW, O>; +impl<'a, const O: u8> COMPARE1_W<'a, O> { + #[doc = "Enable"] + #[inline(always)] + pub fn set(self) -> &'a mut W { + self.variant(COMPARE1_AW::SET) + } +} +#[doc = "Field `COMPARE2` reader - Write '1' to enable interrupt for event COMPARE\\[2\\]"] +pub type COMPARE2_R = crate::BitReader; +#[doc = "Write '1' to enable interrupt for event COMPARE\\[2\\]\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum COMPARE2_A { + #[doc = "0: Read: Disabled"] + DISABLED = 0, + #[doc = "1: Read: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: COMPARE2_A) -> Self { + variant as u8 != 0 + } +} +impl COMPARE2_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> COMPARE2_A { + match self.bits { + false => COMPARE2_A::DISABLED, + true => COMPARE2_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == COMPARE2_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == COMPARE2_A::ENABLED + } +} +#[doc = "Write '1' to enable interrupt for event COMPARE\\[2\\]\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum COMPARE2_AW { + #[doc = "1: Enable"] + SET = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: COMPARE2_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `COMPARE2` writer - Write '1' to enable interrupt for event COMPARE\\[2\\]"] +pub type COMPARE2_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENSET_SPEC, COMPARE2_AW, O>; +impl<'a, const O: u8> COMPARE2_W<'a, O> { + #[doc = "Enable"] + #[inline(always)] + pub fn set(self) -> &'a mut W { + self.variant(COMPARE2_AW::SET) + } +} +#[doc = "Field `COMPARE3` reader - Write '1' to enable interrupt for event COMPARE\\[3\\]"] +pub type COMPARE3_R = crate::BitReader; +#[doc = "Write '1' to enable interrupt for event COMPARE\\[3\\]\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum COMPARE3_A { + #[doc = "0: Read: Disabled"] + DISABLED = 0, + #[doc = "1: Read: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: COMPARE3_A) -> Self { + variant as u8 != 0 + } +} +impl COMPARE3_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> COMPARE3_A { + match self.bits { + false => COMPARE3_A::DISABLED, + true => COMPARE3_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == COMPARE3_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == COMPARE3_A::ENABLED + } +} +#[doc = "Write '1' to enable interrupt for event COMPARE\\[3\\]\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum COMPARE3_AW { + #[doc = "1: Enable"] + SET = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: COMPARE3_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `COMPARE3` writer - Write '1' to enable interrupt for event COMPARE\\[3\\]"] +pub type COMPARE3_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENSET_SPEC, COMPARE3_AW, O>; +impl<'a, const O: u8> COMPARE3_W<'a, O> { + #[doc = "Enable"] + #[inline(always)] + pub fn set(self) -> &'a mut W { + self.variant(COMPARE3_AW::SET) + } +} +impl R { + #[doc = "Bit 0 - Write '1' to enable interrupt for event TICK"] + #[inline(always)] + pub fn tick(&self) -> TICK_R { + TICK_R::new((self.bits & 1) != 0) + } + #[doc = "Bit 1 - Write '1' to enable interrupt for event OVRFLW"] + #[inline(always)] + pub fn ovrflw(&self) -> OVRFLW_R { + OVRFLW_R::new(((self.bits >> 1) & 1) != 0) + } + #[doc = "Bit 16 - Write '1' to enable interrupt for event COMPARE\\[0\\]"] + #[inline(always)] + pub fn compare0(&self) -> COMPARE0_R { + COMPARE0_R::new(((self.bits >> 16) & 1) != 0) + } + #[doc = "Bit 17 - Write '1' to enable interrupt for event COMPARE\\[1\\]"] + #[inline(always)] + pub fn compare1(&self) -> COMPARE1_R { + COMPARE1_R::new(((self.bits >> 17) & 1) != 0) + } + #[doc = "Bit 18 - Write '1' to enable interrupt for event COMPARE\\[2\\]"] + #[inline(always)] + pub fn compare2(&self) -> COMPARE2_R { + COMPARE2_R::new(((self.bits >> 18) & 1) != 0) + } + #[doc = "Bit 19 - Write '1' to enable interrupt for event COMPARE\\[3\\]"] + #[inline(always)] + pub fn compare3(&self) -> COMPARE3_R { + COMPARE3_R::new(((self.bits >> 19) & 1) != 0) + } +} +impl W { + #[doc = "Bit 0 - Write '1' to enable interrupt for event TICK"] + #[inline(always)] + #[must_use] + pub fn tick(&mut self) -> TICK_W<0> { + TICK_W::new(self) + } + #[doc = "Bit 1 - Write '1' to enable interrupt for event OVRFLW"] + #[inline(always)] + #[must_use] + pub fn ovrflw(&mut self) -> OVRFLW_W<1> { + OVRFLW_W::new(self) + } + #[doc = "Bit 16 - Write '1' to enable interrupt for event COMPARE\\[0\\]"] + #[inline(always)] + #[must_use] + pub fn compare0(&mut self) -> COMPARE0_W<16> { + COMPARE0_W::new(self) + } + #[doc = "Bit 17 - Write '1' to enable interrupt for event COMPARE\\[1\\]"] + #[inline(always)] + #[must_use] + pub fn compare1(&mut self) -> COMPARE1_W<17> { + COMPARE1_W::new(self) + } + #[doc = "Bit 18 - Write '1' to enable interrupt for event COMPARE\\[2\\]"] + #[inline(always)] + #[must_use] + pub fn compare2(&mut self) -> COMPARE2_W<18> { + COMPARE2_W::new(self) + } + #[doc = "Bit 19 - Write '1' to enable interrupt for event COMPARE\\[3\\]"] + #[inline(always)] + #[must_use] + pub fn compare3(&mut self) -> COMPARE3_W<19> { + COMPARE3_W::new(self) + } + #[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 = "Enable interrupt\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 [intenset](index.html) module"] +pub struct INTENSET_SPEC; +impl crate::RegisterSpec for INTENSET_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [intenset::R](R) reader structure"] +impl crate::Readable for INTENSET_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [intenset::W](W) writer structure"] +impl crate::Writable for INTENSET_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets INTENSET to value 0"] +impl crate::Resettable for INTENSET_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/rtc0/prescaler.rs b/down-the-stack/dk_pac/src/rtc0/prescaler.rs new file mode 100644 index 0000000..9f104ce --- /dev/null +++ b/down-the-stack/dk_pac/src/rtc0/prescaler.rs @@ -0,0 +1,81 @@ +#[doc = "Register `PRESCALER` 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 `PRESCALER` 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 `PRESCALER` reader - Prescaler value"] +pub type PRESCALER_R = crate::FieldReader; +#[doc = "Field `PRESCALER` writer - Prescaler value"] +pub type PRESCALER_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, PRESCALER_SPEC, u16, u16, 12, O>; +impl R { + #[doc = "Bits 0:11 - Prescaler value"] + #[inline(always)] + pub fn prescaler(&self) -> PRESCALER_R { + PRESCALER_R::new((self.bits & 0x0fff) as u16) + } +} +impl W { + #[doc = "Bits 0:11 - Prescaler value"] + #[inline(always)] + #[must_use] + pub fn prescaler(&mut self) -> PRESCALER_W<0> { + PRESCALER_W::new(self) + } + #[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 = "12 bit prescaler for COUNTER frequency (32768/(PRESCALER+1)).Must be written when RTC is stopped\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 [prescaler](index.html) module"] +pub struct PRESCALER_SPEC; +impl crate::RegisterSpec for PRESCALER_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [prescaler::R](R) reader structure"] +impl crate::Readable for PRESCALER_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [prescaler::W](W) writer structure"] +impl crate::Writable for PRESCALER_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets PRESCALER to value 0"] +impl crate::Resettable for PRESCALER_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/rtc0/tasks_clear.rs b/down-the-stack/dk_pac/src/rtc0/tasks_clear.rs new file mode 100644 index 0000000..0b44170 --- /dev/null +++ b/down-the-stack/dk_pac/src/rtc0/tasks_clear.rs @@ -0,0 +1,72 @@ +#[doc = "Register `TASKS_CLEAR` 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 = "Clear RTC COUNTER\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum TASKS_CLEAR_AW { + #[doc = "1: Trigger task"] + TRIGGER = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: TASKS_CLEAR_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `TASKS_CLEAR` writer - Clear RTC COUNTER"] +pub type TASKS_CLEAR_W<'a, const O: u8> = + crate::BitWriter<'a, u32, TASKS_CLEAR_SPEC, TASKS_CLEAR_AW, O>; +impl<'a, const O: u8> TASKS_CLEAR_W<'a, O> { + #[doc = "Trigger task"] + #[inline(always)] + pub fn trigger(self) -> &'a mut W { + self.variant(TASKS_CLEAR_AW::TRIGGER) + } +} +impl W { + #[doc = "Bit 0 - Clear RTC COUNTER"] + #[inline(always)] + #[must_use] + pub fn tasks_clear(&mut self) -> TASKS_CLEAR_W<0> { + TASKS_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 + } +} +#[doc = "Clear RTC COUNTER\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 [tasks_clear](index.html) module"] +pub struct TASKS_CLEAR_SPEC; +impl crate::RegisterSpec for TASKS_CLEAR_SPEC { + type Ux = u32; +} +#[doc = "`write(|w| ..)` method takes [tasks_clear::W](W) writer structure"] +impl crate::Writable for TASKS_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 TASKS_CLEAR to value 0"] +impl crate::Resettable for TASKS_CLEAR_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/rtc0/tasks_start.rs b/down-the-stack/dk_pac/src/rtc0/tasks_start.rs new file mode 100644 index 0000000..1043541 --- /dev/null +++ b/down-the-stack/dk_pac/src/rtc0/tasks_start.rs @@ -0,0 +1,72 @@ +#[doc = "Register `TASKS_START` 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 = "Start RTC COUNTER\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum TASKS_START_AW { + #[doc = "1: Trigger task"] + TRIGGER = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: TASKS_START_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `TASKS_START` writer - Start RTC COUNTER"] +pub type TASKS_START_W<'a, const O: u8> = + crate::BitWriter<'a, u32, TASKS_START_SPEC, TASKS_START_AW, O>; +impl<'a, const O: u8> TASKS_START_W<'a, O> { + #[doc = "Trigger task"] + #[inline(always)] + pub fn trigger(self) -> &'a mut W { + self.variant(TASKS_START_AW::TRIGGER) + } +} +impl W { + #[doc = "Bit 0 - Start RTC COUNTER"] + #[inline(always)] + #[must_use] + pub fn tasks_start(&mut self) -> TASKS_START_W<0> { + TASKS_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 + } +} +#[doc = "Start RTC COUNTER\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 [tasks_start](index.html) module"] +pub struct TASKS_START_SPEC; +impl crate::RegisterSpec for TASKS_START_SPEC { + type Ux = u32; +} +#[doc = "`write(|w| ..)` method takes [tasks_start::W](W) writer structure"] +impl crate::Writable for TASKS_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 TASKS_START to value 0"] +impl crate::Resettable for TASKS_START_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/rtc0/tasks_stop.rs b/down-the-stack/dk_pac/src/rtc0/tasks_stop.rs new file mode 100644 index 0000000..5f1e92a --- /dev/null +++ b/down-the-stack/dk_pac/src/rtc0/tasks_stop.rs @@ -0,0 +1,72 @@ +#[doc = "Register `TASKS_STOP` 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 = "Stop RTC COUNTER\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum TASKS_STOP_AW { + #[doc = "1: Trigger task"] + TRIGGER = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: TASKS_STOP_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `TASKS_STOP` writer - Stop RTC COUNTER"] +pub type TASKS_STOP_W<'a, const O: u8> = + crate::BitWriter<'a, u32, TASKS_STOP_SPEC, TASKS_STOP_AW, O>; +impl<'a, const O: u8> TASKS_STOP_W<'a, O> { + #[doc = "Trigger task"] + #[inline(always)] + pub fn trigger(self) -> &'a mut W { + self.variant(TASKS_STOP_AW::TRIGGER) + } +} +impl W { + #[doc = "Bit 0 - Stop RTC COUNTER"] + #[inline(always)] + #[must_use] + pub fn tasks_stop(&mut self) -> TASKS_STOP_W<0> { + TASKS_STOP_W::new(self) + } + #[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 = "Stop RTC COUNTER\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 [tasks_stop](index.html) module"] +pub struct TASKS_STOP_SPEC; +impl crate::RegisterSpec for TASKS_STOP_SPEC { + type Ux = u32; +} +#[doc = "`write(|w| ..)` method takes [tasks_stop::W](W) writer structure"] +impl crate::Writable for TASKS_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 TASKS_STOP to value 0"] +impl crate::Resettable for TASKS_STOP_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/rtc0/tasks_trigovrflw.rs b/down-the-stack/dk_pac/src/rtc0/tasks_trigovrflw.rs new file mode 100644 index 0000000..86de501 --- /dev/null +++ b/down-the-stack/dk_pac/src/rtc0/tasks_trigovrflw.rs @@ -0,0 +1,72 @@ +#[doc = "Register `TASKS_TRIGOVRFLW` 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 = "Set COUNTER to 0xFFFFF0\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum TASKS_TRIGOVRFLW_AW { + #[doc = "1: Trigger task"] + TRIGGER = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: TASKS_TRIGOVRFLW_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `TASKS_TRIGOVRFLW` writer - Set COUNTER to 0xFFFFF0"] +pub type TASKS_TRIGOVRFLW_W<'a, const O: u8> = + crate::BitWriter<'a, u32, TASKS_TRIGOVRFLW_SPEC, TASKS_TRIGOVRFLW_AW, O>; +impl<'a, const O: u8> TASKS_TRIGOVRFLW_W<'a, O> { + #[doc = "Trigger task"] + #[inline(always)] + pub fn trigger(self) -> &'a mut W { + self.variant(TASKS_TRIGOVRFLW_AW::TRIGGER) + } +} +impl W { + #[doc = "Bit 0 - Set COUNTER to 0xFFFFF0"] + #[inline(always)] + #[must_use] + pub fn tasks_trigovrflw(&mut self) -> TASKS_TRIGOVRFLW_W<0> { + TASKS_TRIGOVRFLW_W::new(self) + } + #[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 = "Set COUNTER to 0xFFFFF0\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 [tasks_trigovrflw](index.html) module"] +pub struct TASKS_TRIGOVRFLW_SPEC; +impl crate::RegisterSpec for TASKS_TRIGOVRFLW_SPEC { + type Ux = u32; +} +#[doc = "`write(|w| ..)` method takes [tasks_trigovrflw::W](W) writer structure"] +impl crate::Writable for TASKS_TRIGOVRFLW_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets TASKS_TRIGOVRFLW to value 0"] +impl crate::Resettable for TASKS_TRIGOVRFLW_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/saadc.rs b/down-the-stack/dk_pac/src/saadc.rs new file mode 100644 index 0000000..444ad43 --- /dev/null +++ b/down-the-stack/dk_pac/src/saadc.rs @@ -0,0 +1,140 @@ +#[doc = r"Register block"] +#[repr(C)] +pub struct RegisterBlock { + #[doc = "0x00 - Start the ADC and prepare the result buffer in RAM"] + pub tasks_start: TASKS_START, + #[doc = "0x04 - Take one ADC sample, if scan is enabled all channels are sampled"] + pub tasks_sample: TASKS_SAMPLE, + #[doc = "0x08 - Stop the ADC and terminate any on-going conversion"] + pub tasks_stop: TASKS_STOP, + #[doc = "0x0c - Starts offset auto-calibration"] + pub tasks_calibrateoffset: TASKS_CALIBRATEOFFSET, + _reserved4: [u8; 0xf0], + #[doc = "0x100 - The ADC has started"] + pub events_started: EVENTS_STARTED, + #[doc = "0x104 - The ADC has filled up the Result buffer"] + pub events_end: EVENTS_END, + #[doc = "0x108 - A conversion task has been completed. Depending on the mode, multiple conversions might be needed for a result to be transferred to RAM."] + pub events_done: EVENTS_DONE, + #[doc = "0x10c - A result is ready to get transferred to RAM."] + pub events_resultdone: EVENTS_RESULTDONE, + #[doc = "0x110 - Calibration is complete"] + pub events_calibratedone: EVENTS_CALIBRATEDONE, + #[doc = "0x114 - The ADC has stopped"] + pub events_stopped: EVENTS_STOPPED, + #[doc = "0x118..0x158 - Peripheral events."] + pub events_ch: [EVENTS_CH; 8], + _reserved11: [u8; 0x01a8], + #[doc = "0x300 - Enable or disable interrupt"] + pub inten: INTEN, + #[doc = "0x304 - Enable interrupt"] + pub intenset: INTENSET, + #[doc = "0x308 - Disable interrupt"] + pub intenclr: INTENCLR, + _reserved14: [u8; 0xf4], + #[doc = "0x400 - Status"] + pub status: STATUS, + _reserved15: [u8; 0xfc], + #[doc = "0x500 - Enable or disable ADC"] + pub enable: ENABLE, + _reserved16: [u8; 0x0c], + #[doc = "0x510..0x590 - Unspecified"] + pub ch: [CH; 8], + _reserved17: [u8; 0x60], + #[doc = "0x5f0 - Resolution configuration"] + pub resolution: RESOLUTION, + #[doc = "0x5f4 - Oversampling configuration. OVERSAMPLE should not be combined with SCAN. The RESOLUTION is applied before averaging, thus for high OVERSAMPLE a higher RESOLUTION should be used."] + pub oversample: OVERSAMPLE, + #[doc = "0x5f8 - Controls normal or continuous sample rate"] + pub samplerate: SAMPLERATE, + _reserved20: [u8; 0x30], + #[doc = "0x62c..0x638 - RESULT EasyDMA channel"] + pub result: RESULT, +} +#[doc = "TASKS_START (w) register accessor: an alias for `Reg`"] +pub type TASKS_START = crate::Reg; +#[doc = "Start the ADC and prepare the result buffer in RAM"] +pub mod tasks_start; +#[doc = "TASKS_SAMPLE (w) register accessor: an alias for `Reg`"] +pub type TASKS_SAMPLE = crate::Reg; +#[doc = "Take one ADC sample, if scan is enabled all channels are sampled"] +pub mod tasks_sample; +#[doc = "TASKS_STOP (w) register accessor: an alias for `Reg`"] +pub type TASKS_STOP = crate::Reg; +#[doc = "Stop the ADC and terminate any on-going conversion"] +pub mod tasks_stop; +#[doc = "TASKS_CALIBRATEOFFSET (w) register accessor: an alias for `Reg`"] +pub type TASKS_CALIBRATEOFFSET = crate::Reg; +#[doc = "Starts offset auto-calibration"] +pub mod tasks_calibrateoffset; +#[doc = "EVENTS_STARTED (rw) register accessor: an alias for `Reg`"] +pub type EVENTS_STARTED = crate::Reg; +#[doc = "The ADC has started"] +pub mod events_started; +#[doc = "EVENTS_END (rw) register accessor: an alias for `Reg`"] +pub type EVENTS_END = crate::Reg; +#[doc = "The ADC has filled up the Result buffer"] +pub mod events_end; +#[doc = "EVENTS_DONE (rw) register accessor: an alias for `Reg`"] +pub type EVENTS_DONE = crate::Reg; +#[doc = "A conversion task has been completed. Depending on the mode, multiple conversions might be needed for a result to be transferred to RAM."] +pub mod events_done; +#[doc = "EVENTS_RESULTDONE (rw) register accessor: an alias for `Reg`"] +pub type EVENTS_RESULTDONE = crate::Reg; +#[doc = "A result is ready to get transferred to RAM."] +pub mod events_resultdone; +#[doc = "EVENTS_CALIBRATEDONE (rw) register accessor: an alias for `Reg`"] +pub type EVENTS_CALIBRATEDONE = crate::Reg; +#[doc = "Calibration is complete"] +pub mod events_calibratedone; +#[doc = "EVENTS_STOPPED (rw) register accessor: an alias for `Reg`"] +pub type EVENTS_STOPPED = crate::Reg; +#[doc = "The ADC has stopped"] +pub mod events_stopped; +#[doc = "Peripheral events."] +pub use self::events_ch::EVENTS_CH; +#[doc = r"Cluster"] +#[doc = "Peripheral events."] +pub mod events_ch; +#[doc = "INTEN (rw) register accessor: an alias for `Reg`"] +pub type INTEN = crate::Reg; +#[doc = "Enable or disable interrupt"] +pub mod inten; +#[doc = "INTENSET (rw) register accessor: an alias for `Reg`"] +pub type INTENSET = crate::Reg; +#[doc = "Enable interrupt"] +pub mod intenset; +#[doc = "INTENCLR (rw) register accessor: an alias for `Reg`"] +pub type INTENCLR = crate::Reg; +#[doc = "Disable interrupt"] +pub mod intenclr; +#[doc = "STATUS (r) register accessor: an alias for `Reg`"] +pub type STATUS = crate::Reg; +#[doc = "Status"] +pub mod status; +#[doc = "ENABLE (rw) register accessor: an alias for `Reg`"] +pub type ENABLE = crate::Reg; +#[doc = "Enable or disable ADC"] +pub mod enable; +#[doc = "Unspecified"] +pub use self::ch::CH; +#[doc = r"Cluster"] +#[doc = "Unspecified"] +pub mod ch; +#[doc = "RESOLUTION (rw) register accessor: an alias for `Reg`"] +pub type RESOLUTION = crate::Reg; +#[doc = "Resolution configuration"] +pub mod resolution; +#[doc = "OVERSAMPLE (rw) register accessor: an alias for `Reg`"] +pub type OVERSAMPLE = crate::Reg; +#[doc = "Oversampling configuration. OVERSAMPLE should not be combined with SCAN. The RESOLUTION is applied before averaging, thus for high OVERSAMPLE a higher RESOLUTION should be used."] +pub mod oversample; +#[doc = "SAMPLERATE (rw) register accessor: an alias for `Reg`"] +pub type SAMPLERATE = crate::Reg; +#[doc = "Controls normal or continuous sample rate"] +pub mod samplerate; +#[doc = "RESULT EasyDMA channel"] +pub use self::result::RESULT; +#[doc = r"Cluster"] +#[doc = "RESULT EasyDMA channel"] +pub mod result; diff --git a/down-the-stack/dk_pac/src/saadc/ch.rs b/down-the-stack/dk_pac/src/saadc/ch.rs new file mode 100644 index 0000000..63b5159 --- /dev/null +++ b/down-the-stack/dk_pac/src/saadc/ch.rs @@ -0,0 +1,28 @@ +#[doc = r"Register block"] +#[repr(C)] +pub struct CH { + #[doc = "0x00 - Description cluster: Input positive pin selection for CH\\[n\\]"] + pub pselp: PSELP, + #[doc = "0x04 - Description cluster: Input negative pin selection for CH\\[n\\]"] + pub pseln: PSELN, + #[doc = "0x08 - Description cluster: Input configuration for CH\\[n\\]"] + pub config: CONFIG, + #[doc = "0x0c - Description cluster: High/low limits for event monitoring a channel"] + pub limit: LIMIT, +} +#[doc = "PSELP (rw) register accessor: an alias for `Reg`"] +pub type PSELP = crate::Reg; +#[doc = "Description cluster: Input positive pin selection for CH\\[n\\]"] +pub mod pselp; +#[doc = "PSELN (rw) register accessor: an alias for `Reg`"] +pub type PSELN = crate::Reg; +#[doc = "Description cluster: Input negative pin selection for CH\\[n\\]"] +pub mod pseln; +#[doc = "CONFIG (rw) register accessor: an alias for `Reg`"] +pub type CONFIG = crate::Reg; +#[doc = "Description cluster: Input configuration for CH\\[n\\]"] +pub mod config; +#[doc = "LIMIT (rw) register accessor: an alias for `Reg`"] +pub type LIMIT = crate::Reg; +#[doc = "Description cluster: High/low limits for event monitoring a channel"] +pub mod limit; diff --git a/down-the-stack/dk_pac/src/saadc/ch/config.rs b/down-the-stack/dk_pac/src/saadc/ch/config.rs new file mode 100644 index 0000000..4f31f9e --- /dev/null +++ b/down-the-stack/dk_pac/src/saadc/ch/config.rs @@ -0,0 +1,682 @@ +#[doc = "Register `CONFIG` 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 `CONFIG` 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 `RESP` reader - Positive channel resistor control"] +pub type RESP_R = crate::FieldReader; +#[doc = "Positive channel resistor control\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +#[repr(u8)] +pub enum RESP_A { + #[doc = "0: Bypass resistor ladder"] + BYPASS = 0, + #[doc = "1: Pull-down to GND"] + PULLDOWN = 1, + #[doc = "2: Pull-up to VDD"] + PULLUP = 2, + #[doc = "3: Set input at VDD/2"] + VDD1_2 = 3, +} +impl From for u8 { + #[inline(always)] + fn from(variant: RESP_A) -> Self { + variant as _ + } +} +impl RESP_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> RESP_A { + match self.bits { + 0 => RESP_A::BYPASS, + 1 => RESP_A::PULLDOWN, + 2 => RESP_A::PULLUP, + 3 => RESP_A::VDD1_2, + _ => unreachable!(), + } + } + #[doc = "Checks if the value of the field is `BYPASS`"] + #[inline(always)] + pub fn is_bypass(&self) -> bool { + *self == RESP_A::BYPASS + } + #[doc = "Checks if the value of the field is `PULLDOWN`"] + #[inline(always)] + pub fn is_pulldown(&self) -> bool { + *self == RESP_A::PULLDOWN + } + #[doc = "Checks if the value of the field is `PULLUP`"] + #[inline(always)] + pub fn is_pullup(&self) -> bool { + *self == RESP_A::PULLUP + } + #[doc = "Checks if the value of the field is `VDD1_2`"] + #[inline(always)] + pub fn is_vdd1_2(&self) -> bool { + *self == RESP_A::VDD1_2 + } +} +#[doc = "Field `RESP` writer - Positive channel resistor control"] +pub type RESP_W<'a, const O: u8> = crate::FieldWriterSafe<'a, u32, CONFIG_SPEC, u8, RESP_A, 2, O>; +impl<'a, const O: u8> RESP_W<'a, O> { + #[doc = "Bypass resistor ladder"] + #[inline(always)] + pub fn bypass(self) -> &'a mut W { + self.variant(RESP_A::BYPASS) + } + #[doc = "Pull-down to GND"] + #[inline(always)] + pub fn pulldown(self) -> &'a mut W { + self.variant(RESP_A::PULLDOWN) + } + #[doc = "Pull-up to VDD"] + #[inline(always)] + pub fn pullup(self) -> &'a mut W { + self.variant(RESP_A::PULLUP) + } + #[doc = "Set input at VDD/2"] + #[inline(always)] + pub fn vdd1_2(self) -> &'a mut W { + self.variant(RESP_A::VDD1_2) + } +} +#[doc = "Field `RESN` reader - Negative channel resistor control"] +pub type RESN_R = crate::FieldReader; +#[doc = "Negative channel resistor control\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +#[repr(u8)] +pub enum RESN_A { + #[doc = "0: Bypass resistor ladder"] + BYPASS = 0, + #[doc = "1: Pull-down to GND"] + PULLDOWN = 1, + #[doc = "2: Pull-up to VDD"] + PULLUP = 2, + #[doc = "3: Set input at VDD/2"] + VDD1_2 = 3, +} +impl From for u8 { + #[inline(always)] + fn from(variant: RESN_A) -> Self { + variant as _ + } +} +impl RESN_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> RESN_A { + match self.bits { + 0 => RESN_A::BYPASS, + 1 => RESN_A::PULLDOWN, + 2 => RESN_A::PULLUP, + 3 => RESN_A::VDD1_2, + _ => unreachable!(), + } + } + #[doc = "Checks if the value of the field is `BYPASS`"] + #[inline(always)] + pub fn is_bypass(&self) -> bool { + *self == RESN_A::BYPASS + } + #[doc = "Checks if the value of the field is `PULLDOWN`"] + #[inline(always)] + pub fn is_pulldown(&self) -> bool { + *self == RESN_A::PULLDOWN + } + #[doc = "Checks if the value of the field is `PULLUP`"] + #[inline(always)] + pub fn is_pullup(&self) -> bool { + *self == RESN_A::PULLUP + } + #[doc = "Checks if the value of the field is `VDD1_2`"] + #[inline(always)] + pub fn is_vdd1_2(&self) -> bool { + *self == RESN_A::VDD1_2 + } +} +#[doc = "Field `RESN` writer - Negative channel resistor control"] +pub type RESN_W<'a, const O: u8> = crate::FieldWriterSafe<'a, u32, CONFIG_SPEC, u8, RESN_A, 2, O>; +impl<'a, const O: u8> RESN_W<'a, O> { + #[doc = "Bypass resistor ladder"] + #[inline(always)] + pub fn bypass(self) -> &'a mut W { + self.variant(RESN_A::BYPASS) + } + #[doc = "Pull-down to GND"] + #[inline(always)] + pub fn pulldown(self) -> &'a mut W { + self.variant(RESN_A::PULLDOWN) + } + #[doc = "Pull-up to VDD"] + #[inline(always)] + pub fn pullup(self) -> &'a mut W { + self.variant(RESN_A::PULLUP) + } + #[doc = "Set input at VDD/2"] + #[inline(always)] + pub fn vdd1_2(self) -> &'a mut W { + self.variant(RESN_A::VDD1_2) + } +} +#[doc = "Field `GAIN` reader - Gain control"] +pub type GAIN_R = crate::FieldReader; +#[doc = "Gain control\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +#[repr(u8)] +pub enum GAIN_A { + #[doc = "0: 1/6"] + GAIN1_6 = 0, + #[doc = "1: 1/5"] + GAIN1_5 = 1, + #[doc = "2: 1/4"] + GAIN1_4 = 2, + #[doc = "3: 1/3"] + GAIN1_3 = 3, + #[doc = "4: 1/2"] + GAIN1_2 = 4, + #[doc = "5: 1"] + GAIN1 = 5, + #[doc = "6: 2"] + GAIN2 = 6, + #[doc = "7: 4"] + GAIN4 = 7, +} +impl From for u8 { + #[inline(always)] + fn from(variant: GAIN_A) -> Self { + variant as _ + } +} +impl GAIN_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> GAIN_A { + match self.bits { + 0 => GAIN_A::GAIN1_6, + 1 => GAIN_A::GAIN1_5, + 2 => GAIN_A::GAIN1_4, + 3 => GAIN_A::GAIN1_3, + 4 => GAIN_A::GAIN1_2, + 5 => GAIN_A::GAIN1, + 6 => GAIN_A::GAIN2, + 7 => GAIN_A::GAIN4, + _ => unreachable!(), + } + } + #[doc = "Checks if the value of the field is `GAIN1_6`"] + #[inline(always)] + pub fn is_gain1_6(&self) -> bool { + *self == GAIN_A::GAIN1_6 + } + #[doc = "Checks if the value of the field is `GAIN1_5`"] + #[inline(always)] + pub fn is_gain1_5(&self) -> bool { + *self == GAIN_A::GAIN1_5 + } + #[doc = "Checks if the value of the field is `GAIN1_4`"] + #[inline(always)] + pub fn is_gain1_4(&self) -> bool { + *self == GAIN_A::GAIN1_4 + } + #[doc = "Checks if the value of the field is `GAIN1_3`"] + #[inline(always)] + pub fn is_gain1_3(&self) -> bool { + *self == GAIN_A::GAIN1_3 + } + #[doc = "Checks if the value of the field is `GAIN1_2`"] + #[inline(always)] + pub fn is_gain1_2(&self) -> bool { + *self == GAIN_A::GAIN1_2 + } + #[doc = "Checks if the value of the field is `GAIN1`"] + #[inline(always)] + pub fn is_gain1(&self) -> bool { + *self == GAIN_A::GAIN1 + } + #[doc = "Checks if the value of the field is `GAIN2`"] + #[inline(always)] + pub fn is_gain2(&self) -> bool { + *self == GAIN_A::GAIN2 + } + #[doc = "Checks if the value of the field is `GAIN4`"] + #[inline(always)] + pub fn is_gain4(&self) -> bool { + *self == GAIN_A::GAIN4 + } +} +#[doc = "Field `GAIN` writer - Gain control"] +pub type GAIN_W<'a, const O: u8> = crate::FieldWriterSafe<'a, u32, CONFIG_SPEC, u8, GAIN_A, 3, O>; +impl<'a, const O: u8> GAIN_W<'a, O> { + #[doc = "1/6"] + #[inline(always)] + pub fn gain1_6(self) -> &'a mut W { + self.variant(GAIN_A::GAIN1_6) + } + #[doc = "1/5"] + #[inline(always)] + pub fn gain1_5(self) -> &'a mut W { + self.variant(GAIN_A::GAIN1_5) + } + #[doc = "1/4"] + #[inline(always)] + pub fn gain1_4(self) -> &'a mut W { + self.variant(GAIN_A::GAIN1_4) + } + #[doc = "1/3"] + #[inline(always)] + pub fn gain1_3(self) -> &'a mut W { + self.variant(GAIN_A::GAIN1_3) + } + #[doc = "1/2"] + #[inline(always)] + pub fn gain1_2(self) -> &'a mut W { + self.variant(GAIN_A::GAIN1_2) + } + #[doc = "1"] + #[inline(always)] + pub fn gain1(self) -> &'a mut W { + self.variant(GAIN_A::GAIN1) + } + #[doc = "2"] + #[inline(always)] + pub fn gain2(self) -> &'a mut W { + self.variant(GAIN_A::GAIN2) + } + #[doc = "4"] + #[inline(always)] + pub fn gain4(self) -> &'a mut W { + self.variant(GAIN_A::GAIN4) + } +} +#[doc = "Field `REFSEL` reader - Reference control"] +pub type REFSEL_R = crate::BitReader; +#[doc = "Reference control\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum REFSEL_A { + #[doc = "0: Internal reference (0.6 V)"] + INTERNAL = 0, + #[doc = "1: VDD/4 as reference"] + VDD1_4 = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: REFSEL_A) -> Self { + variant as u8 != 0 + } +} +impl REFSEL_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> REFSEL_A { + match self.bits { + false => REFSEL_A::INTERNAL, + true => REFSEL_A::VDD1_4, + } + } + #[doc = "Checks if the value of the field is `INTERNAL`"] + #[inline(always)] + pub fn is_internal(&self) -> bool { + *self == REFSEL_A::INTERNAL + } + #[doc = "Checks if the value of the field is `VDD1_4`"] + #[inline(always)] + pub fn is_vdd1_4(&self) -> bool { + *self == REFSEL_A::VDD1_4 + } +} +#[doc = "Field `REFSEL` writer - Reference control"] +pub type REFSEL_W<'a, const O: u8> = crate::BitWriter<'a, u32, CONFIG_SPEC, REFSEL_A, O>; +impl<'a, const O: u8> REFSEL_W<'a, O> { + #[doc = "Internal reference (0.6 V)"] + #[inline(always)] + pub fn internal(self) -> &'a mut W { + self.variant(REFSEL_A::INTERNAL) + } + #[doc = "VDD/4 as reference"] + #[inline(always)] + pub fn vdd1_4(self) -> &'a mut W { + self.variant(REFSEL_A::VDD1_4) + } +} +#[doc = "Field `TACQ` reader - Acquisition time, the time the ADC uses to sample the input voltage"] +pub type TACQ_R = crate::FieldReader; +#[doc = "Acquisition time, the time the ADC uses to sample the input voltage\n\nValue on reset: 2"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +#[repr(u8)] +pub enum TACQ_A { + #[doc = "0: 3 us"] + _3US = 0, + #[doc = "1: 5 us"] + _5US = 1, + #[doc = "2: 10 us"] + _10US = 2, + #[doc = "3: 15 us"] + _15US = 3, + #[doc = "4: 20 us"] + _20US = 4, + #[doc = "5: 40 us"] + _40US = 5, +} +impl From for u8 { + #[inline(always)] + fn from(variant: TACQ_A) -> Self { + variant as _ + } +} +impl TACQ_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> Option { + match self.bits { + 0 => Some(TACQ_A::_3US), + 1 => Some(TACQ_A::_5US), + 2 => Some(TACQ_A::_10US), + 3 => Some(TACQ_A::_15US), + 4 => Some(TACQ_A::_20US), + 5 => Some(TACQ_A::_40US), + _ => None, + } + } + #[doc = "Checks if the value of the field is `_3US`"] + #[inline(always)] + pub fn is_3us(&self) -> bool { + *self == TACQ_A::_3US + } + #[doc = "Checks if the value of the field is `_5US`"] + #[inline(always)] + pub fn is_5us(&self) -> bool { + *self == TACQ_A::_5US + } + #[doc = "Checks if the value of the field is `_10US`"] + #[inline(always)] + pub fn is_10us(&self) -> bool { + *self == TACQ_A::_10US + } + #[doc = "Checks if the value of the field is `_15US`"] + #[inline(always)] + pub fn is_15us(&self) -> bool { + *self == TACQ_A::_15US + } + #[doc = "Checks if the value of the field is `_20US`"] + #[inline(always)] + pub fn is_20us(&self) -> bool { + *self == TACQ_A::_20US + } + #[doc = "Checks if the value of the field is `_40US`"] + #[inline(always)] + pub fn is_40us(&self) -> bool { + *self == TACQ_A::_40US + } +} +#[doc = "Field `TACQ` writer - Acquisition time, the time the ADC uses to sample the input voltage"] +pub type TACQ_W<'a, const O: u8> = crate::FieldWriter<'a, u32, CONFIG_SPEC, u8, TACQ_A, 3, O>; +impl<'a, const O: u8> TACQ_W<'a, O> { + #[doc = "3 us"] + #[inline(always)] + pub fn _3us(self) -> &'a mut W { + self.variant(TACQ_A::_3US) + } + #[doc = "5 us"] + #[inline(always)] + pub fn _5us(self) -> &'a mut W { + self.variant(TACQ_A::_5US) + } + #[doc = "10 us"] + #[inline(always)] + pub fn _10us(self) -> &'a mut W { + self.variant(TACQ_A::_10US) + } + #[doc = "15 us"] + #[inline(always)] + pub fn _15us(self) -> &'a mut W { + self.variant(TACQ_A::_15US) + } + #[doc = "20 us"] + #[inline(always)] + pub fn _20us(self) -> &'a mut W { + self.variant(TACQ_A::_20US) + } + #[doc = "40 us"] + #[inline(always)] + pub fn _40us(self) -> &'a mut W { + self.variant(TACQ_A::_40US) + } +} +#[doc = "Field `MODE` reader - Enable differential mode"] +pub type MODE_R = crate::BitReader; +#[doc = "Enable differential mode\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum MODE_A { + #[doc = "0: Single ended, PSELN will be ignored, negative input to ADC shorted to GND"] + SE = 0, + #[doc = "1: Differential"] + DIFF = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: MODE_A) -> Self { + variant as u8 != 0 + } +} +impl MODE_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> MODE_A { + match self.bits { + false => MODE_A::SE, + true => MODE_A::DIFF, + } + } + #[doc = "Checks if the value of the field is `SE`"] + #[inline(always)] + pub fn is_se(&self) -> bool { + *self == MODE_A::SE + } + #[doc = "Checks if the value of the field is `DIFF`"] + #[inline(always)] + pub fn is_diff(&self) -> bool { + *self == MODE_A::DIFF + } +} +#[doc = "Field `MODE` writer - Enable differential mode"] +pub type MODE_W<'a, const O: u8> = crate::BitWriter<'a, u32, CONFIG_SPEC, MODE_A, O>; +impl<'a, const O: u8> MODE_W<'a, O> { + #[doc = "Single ended, PSELN will be ignored, negative input to ADC shorted to GND"] + #[inline(always)] + pub fn se(self) -> &'a mut W { + self.variant(MODE_A::SE) + } + #[doc = "Differential"] + #[inline(always)] + pub fn diff(self) -> &'a mut W { + self.variant(MODE_A::DIFF) + } +} +#[doc = "Field `BURST` reader - Enable burst mode"] +pub type BURST_R = crate::BitReader; +#[doc = "Enable burst mode\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum BURST_A { + #[doc = "0: Burst mode is disabled (normal operation)"] + DISABLED = 0, + #[doc = "1: Burst mode is enabled. SAADC takes 2^OVERSAMPLE number of samples as fast as it can, and sends the average to Data RAM."] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: BURST_A) -> Self { + variant as u8 != 0 + } +} +impl BURST_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> BURST_A { + match self.bits { + false => BURST_A::DISABLED, + true => BURST_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == BURST_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == BURST_A::ENABLED + } +} +#[doc = "Field `BURST` writer - Enable burst mode"] +pub type BURST_W<'a, const O: u8> = crate::BitWriter<'a, u32, CONFIG_SPEC, BURST_A, O>; +impl<'a, const O: u8> BURST_W<'a, O> { + #[doc = "Burst mode is disabled (normal operation)"] + #[inline(always)] + pub fn disabled(self) -> &'a mut W { + self.variant(BURST_A::DISABLED) + } + #[doc = "Burst mode is enabled. SAADC takes 2^OVERSAMPLE number of samples as fast as it can, and sends the average to Data RAM."] + #[inline(always)] + pub fn enabled(self) -> &'a mut W { + self.variant(BURST_A::ENABLED) + } +} +impl R { + #[doc = "Bits 0:1 - Positive channel resistor control"] + #[inline(always)] + pub fn resp(&self) -> RESP_R { + RESP_R::new((self.bits & 3) as u8) + } + #[doc = "Bits 4:5 - Negative channel resistor control"] + #[inline(always)] + pub fn resn(&self) -> RESN_R { + RESN_R::new(((self.bits >> 4) & 3) as u8) + } + #[doc = "Bits 8:10 - Gain control"] + #[inline(always)] + pub fn gain(&self) -> GAIN_R { + GAIN_R::new(((self.bits >> 8) & 7) as u8) + } + #[doc = "Bit 12 - Reference control"] + #[inline(always)] + pub fn refsel(&self) -> REFSEL_R { + REFSEL_R::new(((self.bits >> 12) & 1) != 0) + } + #[doc = "Bits 16:18 - Acquisition time, the time the ADC uses to sample the input voltage"] + #[inline(always)] + pub fn tacq(&self) -> TACQ_R { + TACQ_R::new(((self.bits >> 16) & 7) as u8) + } + #[doc = "Bit 20 - Enable differential mode"] + #[inline(always)] + pub fn mode(&self) -> MODE_R { + MODE_R::new(((self.bits >> 20) & 1) != 0) + } + #[doc = "Bit 24 - Enable burst mode"] + #[inline(always)] + pub fn burst(&self) -> BURST_R { + BURST_R::new(((self.bits >> 24) & 1) != 0) + } +} +impl W { + #[doc = "Bits 0:1 - Positive channel resistor control"] + #[inline(always)] + #[must_use] + pub fn resp(&mut self) -> RESP_W<0> { + RESP_W::new(self) + } + #[doc = "Bits 4:5 - Negative channel resistor control"] + #[inline(always)] + #[must_use] + pub fn resn(&mut self) -> RESN_W<4> { + RESN_W::new(self) + } + #[doc = "Bits 8:10 - Gain control"] + #[inline(always)] + #[must_use] + pub fn gain(&mut self) -> GAIN_W<8> { + GAIN_W::new(self) + } + #[doc = "Bit 12 - Reference control"] + #[inline(always)] + #[must_use] + pub fn refsel(&mut self) -> REFSEL_W<12> { + REFSEL_W::new(self) + } + #[doc = "Bits 16:18 - Acquisition time, the time the ADC uses to sample the input voltage"] + #[inline(always)] + #[must_use] + pub fn tacq(&mut self) -> TACQ_W<16> { + TACQ_W::new(self) + } + #[doc = "Bit 20 - Enable differential mode"] + #[inline(always)] + #[must_use] + pub fn mode(&mut self) -> MODE_W<20> { + MODE_W::new(self) + } + #[doc = "Bit 24 - Enable burst mode"] + #[inline(always)] + #[must_use] + pub fn burst(&mut self) -> BURST_W<24> { + BURST_W::new(self) + } + #[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 = "Description cluster: Input configuration for CH\\[n\\]\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 [config](index.html) module"] +pub struct CONFIG_SPEC; +impl crate::RegisterSpec for CONFIG_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [config::R](R) reader structure"] +impl crate::Readable for CONFIG_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [config::W](W) writer structure"] +impl crate::Writable for 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 CONFIG to value 0x0002_0000"] +impl crate::Resettable for CONFIG_SPEC { + const RESET_VALUE: Self::Ux = 0x0002_0000; +} diff --git a/down-the-stack/dk_pac/src/saadc/ch/limit.rs b/down-the-stack/dk_pac/src/saadc/ch/limit.rs new file mode 100644 index 0000000..5ffedc3 --- /dev/null +++ b/down-the-stack/dk_pac/src/saadc/ch/limit.rs @@ -0,0 +1,95 @@ +#[doc = "Register `LIMIT` 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 `LIMIT` 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 `LOW` reader - Low level limit"] +pub type LOW_R = crate::FieldReader; +#[doc = "Field `LOW` writer - Low level limit"] +pub type LOW_W<'a, const O: u8> = crate::FieldWriter<'a, u32, LIMIT_SPEC, u16, u16, 16, O>; +#[doc = "Field `HIGH` reader - High level limit"] +pub type HIGH_R = crate::FieldReader; +#[doc = "Field `HIGH` writer - High level limit"] +pub type HIGH_W<'a, const O: u8> = crate::FieldWriter<'a, u32, LIMIT_SPEC, u16, u16, 16, O>; +impl R { + #[doc = "Bits 0:15 - Low level limit"] + #[inline(always)] + pub fn low(&self) -> LOW_R { + LOW_R::new((self.bits & 0xffff) as u16) + } + #[doc = "Bits 16:31 - High level limit"] + #[inline(always)] + pub fn high(&self) -> HIGH_R { + HIGH_R::new(((self.bits >> 16) & 0xffff) as u16) + } +} +impl W { + #[doc = "Bits 0:15 - Low level limit"] + #[inline(always)] + #[must_use] + pub fn low(&mut self) -> LOW_W<0> { + LOW_W::new(self) + } + #[doc = "Bits 16:31 - High level limit"] + #[inline(always)] + #[must_use] + pub fn high(&mut self) -> HIGH_W<16> { + 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 + } +} +#[doc = "Description cluster: High/low limits for event monitoring a channel\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 [limit](index.html) module"] +pub struct LIMIT_SPEC; +impl crate::RegisterSpec for LIMIT_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [limit::R](R) reader structure"] +impl crate::Readable for LIMIT_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [limit::W](W) writer structure"] +impl crate::Writable for LIMIT_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets LIMIT to value 0x7fff_8000"] +impl crate::Resettable for LIMIT_SPEC { + const RESET_VALUE: Self::Ux = 0x7fff_8000; +} diff --git a/down-the-stack/dk_pac/src/saadc/ch/pseln.rs b/down-the-stack/dk_pac/src/saadc/ch/pseln.rs new file mode 100644 index 0000000..2834daa --- /dev/null +++ b/down-the-stack/dk_pac/src/saadc/ch/pseln.rs @@ -0,0 +1,232 @@ +#[doc = "Register `PSELN` 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 `PSELN` 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 `PSELN` reader - Analog negative input, enables differential channel"] +pub type PSELN_R = crate::FieldReader; +#[doc = "Analog negative input, enables differential channel\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +#[repr(u8)] +pub enum PSELN_A { + #[doc = "0: Not connected"] + NC = 0, + #[doc = "1: AIN0"] + ANALOG_INPUT0 = 1, + #[doc = "2: AIN1"] + ANALOG_INPUT1 = 2, + #[doc = "3: AIN2"] + ANALOG_INPUT2 = 3, + #[doc = "4: AIN3"] + ANALOG_INPUT3 = 4, + #[doc = "5: AIN4"] + ANALOG_INPUT4 = 5, + #[doc = "6: AIN5"] + ANALOG_INPUT5 = 6, + #[doc = "7: AIN6"] + ANALOG_INPUT6 = 7, + #[doc = "8: AIN7"] + ANALOG_INPUT7 = 8, + #[doc = "9: VDD"] + VDD = 9, +} +impl From for u8 { + #[inline(always)] + fn from(variant: PSELN_A) -> Self { + variant as _ + } +} +impl PSELN_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> Option { + match self.bits { + 0 => Some(PSELN_A::NC), + 1 => Some(PSELN_A::ANALOG_INPUT0), + 2 => Some(PSELN_A::ANALOG_INPUT1), + 3 => Some(PSELN_A::ANALOG_INPUT2), + 4 => Some(PSELN_A::ANALOG_INPUT3), + 5 => Some(PSELN_A::ANALOG_INPUT4), + 6 => Some(PSELN_A::ANALOG_INPUT5), + 7 => Some(PSELN_A::ANALOG_INPUT6), + 8 => Some(PSELN_A::ANALOG_INPUT7), + 9 => Some(PSELN_A::VDD), + _ => None, + } + } + #[doc = "Checks if the value of the field is `NC`"] + #[inline(always)] + pub fn is_nc(&self) -> bool { + *self == PSELN_A::NC + } + #[doc = "Checks if the value of the field is `ANALOG_INPUT0`"] + #[inline(always)] + pub fn is_analog_input0(&self) -> bool { + *self == PSELN_A::ANALOG_INPUT0 + } + #[doc = "Checks if the value of the field is `ANALOG_INPUT1`"] + #[inline(always)] + pub fn is_analog_input1(&self) -> bool { + *self == PSELN_A::ANALOG_INPUT1 + } + #[doc = "Checks if the value of the field is `ANALOG_INPUT2`"] + #[inline(always)] + pub fn is_analog_input2(&self) -> bool { + *self == PSELN_A::ANALOG_INPUT2 + } + #[doc = "Checks if the value of the field is `ANALOG_INPUT3`"] + #[inline(always)] + pub fn is_analog_input3(&self) -> bool { + *self == PSELN_A::ANALOG_INPUT3 + } + #[doc = "Checks if the value of the field is `ANALOG_INPUT4`"] + #[inline(always)] + pub fn is_analog_input4(&self) -> bool { + *self == PSELN_A::ANALOG_INPUT4 + } + #[doc = "Checks if the value of the field is `ANALOG_INPUT5`"] + #[inline(always)] + pub fn is_analog_input5(&self) -> bool { + *self == PSELN_A::ANALOG_INPUT5 + } + #[doc = "Checks if the value of the field is `ANALOG_INPUT6`"] + #[inline(always)] + pub fn is_analog_input6(&self) -> bool { + *self == PSELN_A::ANALOG_INPUT6 + } + #[doc = "Checks if the value of the field is `ANALOG_INPUT7`"] + #[inline(always)] + pub fn is_analog_input7(&self) -> bool { + *self == PSELN_A::ANALOG_INPUT7 + } + #[doc = "Checks if the value of the field is `VDD`"] + #[inline(always)] + pub fn is_vdd(&self) -> bool { + *self == PSELN_A::VDD + } +} +#[doc = "Field `PSELN` writer - Analog negative input, enables differential channel"] +pub type PSELN_W<'a, const O: u8> = crate::FieldWriter<'a, u32, PSELN_SPEC, u8, PSELN_A, 5, O>; +impl<'a, const O: u8> PSELN_W<'a, O> { + #[doc = "Not connected"] + #[inline(always)] + pub fn nc(self) -> &'a mut W { + self.variant(PSELN_A::NC) + } + #[doc = "AIN0"] + #[inline(always)] + pub fn analog_input0(self) -> &'a mut W { + self.variant(PSELN_A::ANALOG_INPUT0) + } + #[doc = "AIN1"] + #[inline(always)] + pub fn analog_input1(self) -> &'a mut W { + self.variant(PSELN_A::ANALOG_INPUT1) + } + #[doc = "AIN2"] + #[inline(always)] + pub fn analog_input2(self) -> &'a mut W { + self.variant(PSELN_A::ANALOG_INPUT2) + } + #[doc = "AIN3"] + #[inline(always)] + pub fn analog_input3(self) -> &'a mut W { + self.variant(PSELN_A::ANALOG_INPUT3) + } + #[doc = "AIN4"] + #[inline(always)] + pub fn analog_input4(self) -> &'a mut W { + self.variant(PSELN_A::ANALOG_INPUT4) + } + #[doc = "AIN5"] + #[inline(always)] + pub fn analog_input5(self) -> &'a mut W { + self.variant(PSELN_A::ANALOG_INPUT5) + } + #[doc = "AIN6"] + #[inline(always)] + pub fn analog_input6(self) -> &'a mut W { + self.variant(PSELN_A::ANALOG_INPUT6) + } + #[doc = "AIN7"] + #[inline(always)] + pub fn analog_input7(self) -> &'a mut W { + self.variant(PSELN_A::ANALOG_INPUT7) + } + #[doc = "VDD"] + #[inline(always)] + pub fn vdd(self) -> &'a mut W { + self.variant(PSELN_A::VDD) + } +} +impl R { + #[doc = "Bits 0:4 - Analog negative input, enables differential channel"] + #[inline(always)] + pub fn pseln(&self) -> PSELN_R { + PSELN_R::new((self.bits & 0x1f) as u8) + } +} +impl W { + #[doc = "Bits 0:4 - Analog negative input, enables differential channel"] + #[inline(always)] + #[must_use] + pub fn pseln(&mut self) -> PSELN_W<0> { + PSELN_W::new(self) + } + #[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 = "Description cluster: Input negative pin selection for CH\\[n\\]\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 [pseln](index.html) module"] +pub struct PSELN_SPEC; +impl crate::RegisterSpec for PSELN_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [pseln::R](R) reader structure"] +impl crate::Readable for PSELN_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [pseln::W](W) writer structure"] +impl crate::Writable for PSELN_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets PSELN to value 0"] +impl crate::Resettable for PSELN_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/saadc/ch/pselp.rs b/down-the-stack/dk_pac/src/saadc/ch/pselp.rs new file mode 100644 index 0000000..e8a9413 --- /dev/null +++ b/down-the-stack/dk_pac/src/saadc/ch/pselp.rs @@ -0,0 +1,232 @@ +#[doc = "Register `PSELP` 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 `PSELP` 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 `PSELP` reader - Analog positive input channel"] +pub type PSELP_R = crate::FieldReader; +#[doc = "Analog positive input channel\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +#[repr(u8)] +pub enum PSELP_A { + #[doc = "0: Not connected"] + NC = 0, + #[doc = "1: AIN0"] + ANALOG_INPUT0 = 1, + #[doc = "2: AIN1"] + ANALOG_INPUT1 = 2, + #[doc = "3: AIN2"] + ANALOG_INPUT2 = 3, + #[doc = "4: AIN3"] + ANALOG_INPUT3 = 4, + #[doc = "5: AIN4"] + ANALOG_INPUT4 = 5, + #[doc = "6: AIN5"] + ANALOG_INPUT5 = 6, + #[doc = "7: AIN6"] + ANALOG_INPUT6 = 7, + #[doc = "8: AIN7"] + ANALOG_INPUT7 = 8, + #[doc = "9: VDD"] + VDD = 9, +} +impl From for u8 { + #[inline(always)] + fn from(variant: PSELP_A) -> Self { + variant as _ + } +} +impl PSELP_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> Option { + match self.bits { + 0 => Some(PSELP_A::NC), + 1 => Some(PSELP_A::ANALOG_INPUT0), + 2 => Some(PSELP_A::ANALOG_INPUT1), + 3 => Some(PSELP_A::ANALOG_INPUT2), + 4 => Some(PSELP_A::ANALOG_INPUT3), + 5 => Some(PSELP_A::ANALOG_INPUT4), + 6 => Some(PSELP_A::ANALOG_INPUT5), + 7 => Some(PSELP_A::ANALOG_INPUT6), + 8 => Some(PSELP_A::ANALOG_INPUT7), + 9 => Some(PSELP_A::VDD), + _ => None, + } + } + #[doc = "Checks if the value of the field is `NC`"] + #[inline(always)] + pub fn is_nc(&self) -> bool { + *self == PSELP_A::NC + } + #[doc = "Checks if the value of the field is `ANALOG_INPUT0`"] + #[inline(always)] + pub fn is_analog_input0(&self) -> bool { + *self == PSELP_A::ANALOG_INPUT0 + } + #[doc = "Checks if the value of the field is `ANALOG_INPUT1`"] + #[inline(always)] + pub fn is_analog_input1(&self) -> bool { + *self == PSELP_A::ANALOG_INPUT1 + } + #[doc = "Checks if the value of the field is `ANALOG_INPUT2`"] + #[inline(always)] + pub fn is_analog_input2(&self) -> bool { + *self == PSELP_A::ANALOG_INPUT2 + } + #[doc = "Checks if the value of the field is `ANALOG_INPUT3`"] + #[inline(always)] + pub fn is_analog_input3(&self) -> bool { + *self == PSELP_A::ANALOG_INPUT3 + } + #[doc = "Checks if the value of the field is `ANALOG_INPUT4`"] + #[inline(always)] + pub fn is_analog_input4(&self) -> bool { + *self == PSELP_A::ANALOG_INPUT4 + } + #[doc = "Checks if the value of the field is `ANALOG_INPUT5`"] + #[inline(always)] + pub fn is_analog_input5(&self) -> bool { + *self == PSELP_A::ANALOG_INPUT5 + } + #[doc = "Checks if the value of the field is `ANALOG_INPUT6`"] + #[inline(always)] + pub fn is_analog_input6(&self) -> bool { + *self == PSELP_A::ANALOG_INPUT6 + } + #[doc = "Checks if the value of the field is `ANALOG_INPUT7`"] + #[inline(always)] + pub fn is_analog_input7(&self) -> bool { + *self == PSELP_A::ANALOG_INPUT7 + } + #[doc = "Checks if the value of the field is `VDD`"] + #[inline(always)] + pub fn is_vdd(&self) -> bool { + *self == PSELP_A::VDD + } +} +#[doc = "Field `PSELP` writer - Analog positive input channel"] +pub type PSELP_W<'a, const O: u8> = crate::FieldWriter<'a, u32, PSELP_SPEC, u8, PSELP_A, 5, O>; +impl<'a, const O: u8> PSELP_W<'a, O> { + #[doc = "Not connected"] + #[inline(always)] + pub fn nc(self) -> &'a mut W { + self.variant(PSELP_A::NC) + } + #[doc = "AIN0"] + #[inline(always)] + pub fn analog_input0(self) -> &'a mut W { + self.variant(PSELP_A::ANALOG_INPUT0) + } + #[doc = "AIN1"] + #[inline(always)] + pub fn analog_input1(self) -> &'a mut W { + self.variant(PSELP_A::ANALOG_INPUT1) + } + #[doc = "AIN2"] + #[inline(always)] + pub fn analog_input2(self) -> &'a mut W { + self.variant(PSELP_A::ANALOG_INPUT2) + } + #[doc = "AIN3"] + #[inline(always)] + pub fn analog_input3(self) -> &'a mut W { + self.variant(PSELP_A::ANALOG_INPUT3) + } + #[doc = "AIN4"] + #[inline(always)] + pub fn analog_input4(self) -> &'a mut W { + self.variant(PSELP_A::ANALOG_INPUT4) + } + #[doc = "AIN5"] + #[inline(always)] + pub fn analog_input5(self) -> &'a mut W { + self.variant(PSELP_A::ANALOG_INPUT5) + } + #[doc = "AIN6"] + #[inline(always)] + pub fn analog_input6(self) -> &'a mut W { + self.variant(PSELP_A::ANALOG_INPUT6) + } + #[doc = "AIN7"] + #[inline(always)] + pub fn analog_input7(self) -> &'a mut W { + self.variant(PSELP_A::ANALOG_INPUT7) + } + #[doc = "VDD"] + #[inline(always)] + pub fn vdd(self) -> &'a mut W { + self.variant(PSELP_A::VDD) + } +} +impl R { + #[doc = "Bits 0:4 - Analog positive input channel"] + #[inline(always)] + pub fn pselp(&self) -> PSELP_R { + PSELP_R::new((self.bits & 0x1f) as u8) + } +} +impl W { + #[doc = "Bits 0:4 - Analog positive input channel"] + #[inline(always)] + #[must_use] + pub fn pselp(&mut self) -> PSELP_W<0> { + PSELP_W::new(self) + } + #[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 = "Description cluster: Input positive pin selection for CH\\[n\\]\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 [pselp](index.html) module"] +pub struct PSELP_SPEC; +impl crate::RegisterSpec for PSELP_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [pselp::R](R) reader structure"] +impl crate::Readable for PSELP_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [pselp::W](W) writer structure"] +impl crate::Writable for PSELP_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets PSELP to value 0"] +impl crate::Resettable for PSELP_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/saadc/enable.rs b/down-the-stack/dk_pac/src/saadc/enable.rs new file mode 100644 index 0000000..566f8b9 --- /dev/null +++ b/down-the-stack/dk_pac/src/saadc/enable.rs @@ -0,0 +1,126 @@ +#[doc = "Register `ENABLE` 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 `ENABLE` 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 `ENABLE` reader - Enable or disable ADC"] +pub type ENABLE_R = crate::BitReader; +#[doc = "Enable or disable ADC\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum ENABLE_A { + #[doc = "0: Disable ADC"] + DISABLED = 0, + #[doc = "1: Enable ADC"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: ENABLE_A) -> Self { + variant as u8 != 0 + } +} +impl ENABLE_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> ENABLE_A { + match self.bits { + false => ENABLE_A::DISABLED, + true => ENABLE_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == ENABLE_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == ENABLE_A::ENABLED + } +} +#[doc = "Field `ENABLE` writer - Enable or disable ADC"] +pub type ENABLE_W<'a, const O: u8> = crate::BitWriter<'a, u32, ENABLE_SPEC, ENABLE_A, O>; +impl<'a, const O: u8> ENABLE_W<'a, O> { + #[doc = "Disable ADC"] + #[inline(always)] + pub fn disabled(self) -> &'a mut W { + self.variant(ENABLE_A::DISABLED) + } + #[doc = "Enable ADC"] + #[inline(always)] + pub fn enabled(self) -> &'a mut W { + self.variant(ENABLE_A::ENABLED) + } +} +impl R { + #[doc = "Bit 0 - Enable or disable ADC"] + #[inline(always)] + pub fn enable(&self) -> ENABLE_R { + ENABLE_R::new((self.bits & 1) != 0) + } +} +impl W { + #[doc = "Bit 0 - Enable or disable ADC"] + #[inline(always)] + #[must_use] + pub fn enable(&mut self) -> ENABLE_W<0> { + 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 + } +} +#[doc = "Enable or disable ADC\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 [enable](index.html) module"] +pub struct ENABLE_SPEC; +impl crate::RegisterSpec for ENABLE_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [enable::R](R) reader structure"] +impl crate::Readable for ENABLE_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [enable::W](W) writer structure"] +impl crate::Writable for ENABLE_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets ENABLE to value 0"] +impl crate::Resettable for ENABLE_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/saadc/events_calibratedone.rs b/down-the-stack/dk_pac/src/saadc/events_calibratedone.rs new file mode 100644 index 0000000..9af7317 --- /dev/null +++ b/down-the-stack/dk_pac/src/saadc/events_calibratedone.rs @@ -0,0 +1,127 @@ +#[doc = "Register `EVENTS_CALIBRATEDONE` 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 `EVENTS_CALIBRATEDONE` 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 `EVENTS_CALIBRATEDONE` reader - Calibration is complete"] +pub type EVENTS_CALIBRATEDONE_R = crate::BitReader; +#[doc = "Calibration is complete\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum EVENTS_CALIBRATEDONE_A { + #[doc = "0: Event not generated"] + NOT_GENERATED = 0, + #[doc = "1: Event generated"] + GENERATED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: EVENTS_CALIBRATEDONE_A) -> Self { + variant as u8 != 0 + } +} +impl EVENTS_CALIBRATEDONE_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> EVENTS_CALIBRATEDONE_A { + match self.bits { + false => EVENTS_CALIBRATEDONE_A::NOT_GENERATED, + true => EVENTS_CALIBRATEDONE_A::GENERATED, + } + } + #[doc = "Checks if the value of the field is `NOT_GENERATED`"] + #[inline(always)] + pub fn is_not_generated(&self) -> bool { + *self == EVENTS_CALIBRATEDONE_A::NOT_GENERATED + } + #[doc = "Checks if the value of the field is `GENERATED`"] + #[inline(always)] + pub fn is_generated(&self) -> bool { + *self == EVENTS_CALIBRATEDONE_A::GENERATED + } +} +#[doc = "Field `EVENTS_CALIBRATEDONE` writer - Calibration is complete"] +pub type EVENTS_CALIBRATEDONE_W<'a, const O: u8> = + crate::BitWriter<'a, u32, EVENTS_CALIBRATEDONE_SPEC, EVENTS_CALIBRATEDONE_A, O>; +impl<'a, const O: u8> EVENTS_CALIBRATEDONE_W<'a, O> { + #[doc = "Event not generated"] + #[inline(always)] + pub fn not_generated(self) -> &'a mut W { + self.variant(EVENTS_CALIBRATEDONE_A::NOT_GENERATED) + } + #[doc = "Event generated"] + #[inline(always)] + pub fn generated(self) -> &'a mut W { + self.variant(EVENTS_CALIBRATEDONE_A::GENERATED) + } +} +impl R { + #[doc = "Bit 0 - Calibration is complete"] + #[inline(always)] + pub fn events_calibratedone(&self) -> EVENTS_CALIBRATEDONE_R { + EVENTS_CALIBRATEDONE_R::new((self.bits & 1) != 0) + } +} +impl W { + #[doc = "Bit 0 - Calibration is complete"] + #[inline(always)] + #[must_use] + pub fn events_calibratedone(&mut self) -> EVENTS_CALIBRATEDONE_W<0> { + EVENTS_CALIBRATEDONE_W::new(self) + } + #[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 = "Calibration is complete\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 [events_calibratedone](index.html) module"] +pub struct EVENTS_CALIBRATEDONE_SPEC; +impl crate::RegisterSpec for EVENTS_CALIBRATEDONE_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [events_calibratedone::R](R) reader structure"] +impl crate::Readable for EVENTS_CALIBRATEDONE_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [events_calibratedone::W](W) writer structure"] +impl crate::Writable for EVENTS_CALIBRATEDONE_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets EVENTS_CALIBRATEDONE to value 0"] +impl crate::Resettable for EVENTS_CALIBRATEDONE_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/saadc/events_ch.rs b/down-the-stack/dk_pac/src/saadc/events_ch.rs new file mode 100644 index 0000000..e1e19cf --- /dev/null +++ b/down-the-stack/dk_pac/src/saadc/events_ch.rs @@ -0,0 +1,16 @@ +#[doc = r"Register block"] +#[repr(C)] +pub struct EVENTS_CH { + #[doc = "0x00 - Description cluster: Last results is equal or above CH\\[n\\].LIMIT.HIGH"] + pub limith: LIMITH, + #[doc = "0x04 - Description cluster: Last results is equal or below CH\\[n\\].LIMIT.LOW"] + pub limitl: LIMITL, +} +#[doc = "LIMITH (rw) register accessor: an alias for `Reg`"] +pub type LIMITH = crate::Reg; +#[doc = "Description cluster: Last results is equal or above CH\\[n\\].LIMIT.HIGH"] +pub mod limith; +#[doc = "LIMITL (rw) register accessor: an alias for `Reg`"] +pub type LIMITL = crate::Reg; +#[doc = "Description cluster: Last results is equal or below CH\\[n\\].LIMIT.LOW"] +pub mod limitl; diff --git a/down-the-stack/dk_pac/src/saadc/events_ch/limith.rs b/down-the-stack/dk_pac/src/saadc/events_ch/limith.rs new file mode 100644 index 0000000..5358d40 --- /dev/null +++ b/down-the-stack/dk_pac/src/saadc/events_ch/limith.rs @@ -0,0 +1,126 @@ +#[doc = "Register `LIMITH` 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 `LIMITH` 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 `LIMITH` reader - Last results is equal or above CH\\[n\\].LIMIT.HIGH"] +pub type LIMITH_R = crate::BitReader; +#[doc = "Last results is equal or above CH\\[n\\].LIMIT.HIGH\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum LIMITH_A { + #[doc = "0: Event not generated"] + NOT_GENERATED = 0, + #[doc = "1: Event generated"] + GENERATED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: LIMITH_A) -> Self { + variant as u8 != 0 + } +} +impl LIMITH_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> LIMITH_A { + match self.bits { + false => LIMITH_A::NOT_GENERATED, + true => LIMITH_A::GENERATED, + } + } + #[doc = "Checks if the value of the field is `NOT_GENERATED`"] + #[inline(always)] + pub fn is_not_generated(&self) -> bool { + *self == LIMITH_A::NOT_GENERATED + } + #[doc = "Checks if the value of the field is `GENERATED`"] + #[inline(always)] + pub fn is_generated(&self) -> bool { + *self == LIMITH_A::GENERATED + } +} +#[doc = "Field `LIMITH` writer - Last results is equal or above CH\\[n\\].LIMIT.HIGH"] +pub type LIMITH_W<'a, const O: u8> = crate::BitWriter<'a, u32, LIMITH_SPEC, LIMITH_A, O>; +impl<'a, const O: u8> LIMITH_W<'a, O> { + #[doc = "Event not generated"] + #[inline(always)] + pub fn not_generated(self) -> &'a mut W { + self.variant(LIMITH_A::NOT_GENERATED) + } + #[doc = "Event generated"] + #[inline(always)] + pub fn generated(self) -> &'a mut W { + self.variant(LIMITH_A::GENERATED) + } +} +impl R { + #[doc = "Bit 0 - Last results is equal or above CH\\[n\\].LIMIT.HIGH"] + #[inline(always)] + pub fn limith(&self) -> LIMITH_R { + LIMITH_R::new((self.bits & 1) != 0) + } +} +impl W { + #[doc = "Bit 0 - Last results is equal or above CH\\[n\\].LIMIT.HIGH"] + #[inline(always)] + #[must_use] + pub fn limith(&mut self) -> LIMITH_W<0> { + LIMITH_W::new(self) + } + #[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 = "Description cluster: Last results is equal or above CH\\[n\\].LIMIT.HIGH\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 [limith](index.html) module"] +pub struct LIMITH_SPEC; +impl crate::RegisterSpec for LIMITH_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [limith::R](R) reader structure"] +impl crate::Readable for LIMITH_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [limith::W](W) writer structure"] +impl crate::Writable for LIMITH_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets LIMITH to value 0"] +impl crate::Resettable for LIMITH_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/saadc/events_ch/limitl.rs b/down-the-stack/dk_pac/src/saadc/events_ch/limitl.rs new file mode 100644 index 0000000..d5ce555 --- /dev/null +++ b/down-the-stack/dk_pac/src/saadc/events_ch/limitl.rs @@ -0,0 +1,126 @@ +#[doc = "Register `LIMITL` 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 `LIMITL` 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 `LIMITL` reader - Last results is equal or below CH\\[n\\].LIMIT.LOW"] +pub type LIMITL_R = crate::BitReader; +#[doc = "Last results is equal or below CH\\[n\\].LIMIT.LOW\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum LIMITL_A { + #[doc = "0: Event not generated"] + NOT_GENERATED = 0, + #[doc = "1: Event generated"] + GENERATED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: LIMITL_A) -> Self { + variant as u8 != 0 + } +} +impl LIMITL_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> LIMITL_A { + match self.bits { + false => LIMITL_A::NOT_GENERATED, + true => LIMITL_A::GENERATED, + } + } + #[doc = "Checks if the value of the field is `NOT_GENERATED`"] + #[inline(always)] + pub fn is_not_generated(&self) -> bool { + *self == LIMITL_A::NOT_GENERATED + } + #[doc = "Checks if the value of the field is `GENERATED`"] + #[inline(always)] + pub fn is_generated(&self) -> bool { + *self == LIMITL_A::GENERATED + } +} +#[doc = "Field `LIMITL` writer - Last results is equal or below CH\\[n\\].LIMIT.LOW"] +pub type LIMITL_W<'a, const O: u8> = crate::BitWriter<'a, u32, LIMITL_SPEC, LIMITL_A, O>; +impl<'a, const O: u8> LIMITL_W<'a, O> { + #[doc = "Event not generated"] + #[inline(always)] + pub fn not_generated(self) -> &'a mut W { + self.variant(LIMITL_A::NOT_GENERATED) + } + #[doc = "Event generated"] + #[inline(always)] + pub fn generated(self) -> &'a mut W { + self.variant(LIMITL_A::GENERATED) + } +} +impl R { + #[doc = "Bit 0 - Last results is equal or below CH\\[n\\].LIMIT.LOW"] + #[inline(always)] + pub fn limitl(&self) -> LIMITL_R { + LIMITL_R::new((self.bits & 1) != 0) + } +} +impl W { + #[doc = "Bit 0 - Last results is equal or below CH\\[n\\].LIMIT.LOW"] + #[inline(always)] + #[must_use] + pub fn limitl(&mut self) -> LIMITL_W<0> { + LIMITL_W::new(self) + } + #[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 = "Description cluster: Last results is equal or below CH\\[n\\].LIMIT.LOW\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 [limitl](index.html) module"] +pub struct LIMITL_SPEC; +impl crate::RegisterSpec for LIMITL_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [limitl::R](R) reader structure"] +impl crate::Readable for LIMITL_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [limitl::W](W) writer structure"] +impl crate::Writable for LIMITL_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets LIMITL to value 0"] +impl crate::Resettable for LIMITL_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/saadc/events_done.rs b/down-the-stack/dk_pac/src/saadc/events_done.rs new file mode 100644 index 0000000..69b2599 --- /dev/null +++ b/down-the-stack/dk_pac/src/saadc/events_done.rs @@ -0,0 +1,127 @@ +#[doc = "Register `EVENTS_DONE` 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 `EVENTS_DONE` 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 `EVENTS_DONE` reader - A conversion task has been completed. Depending on the mode, multiple conversions might be needed for a result to be transferred to RAM."] +pub type EVENTS_DONE_R = crate::BitReader; +#[doc = "A conversion task has been completed. Depending on the mode, multiple conversions might be needed for a result to be transferred to RAM.\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum EVENTS_DONE_A { + #[doc = "0: Event not generated"] + NOT_GENERATED = 0, + #[doc = "1: Event generated"] + GENERATED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: EVENTS_DONE_A) -> Self { + variant as u8 != 0 + } +} +impl EVENTS_DONE_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> EVENTS_DONE_A { + match self.bits { + false => EVENTS_DONE_A::NOT_GENERATED, + true => EVENTS_DONE_A::GENERATED, + } + } + #[doc = "Checks if the value of the field is `NOT_GENERATED`"] + #[inline(always)] + pub fn is_not_generated(&self) -> bool { + *self == EVENTS_DONE_A::NOT_GENERATED + } + #[doc = "Checks if the value of the field is `GENERATED`"] + #[inline(always)] + pub fn is_generated(&self) -> bool { + *self == EVENTS_DONE_A::GENERATED + } +} +#[doc = "Field `EVENTS_DONE` writer - A conversion task has been completed. Depending on the mode, multiple conversions might be needed for a result to be transferred to RAM."] +pub type EVENTS_DONE_W<'a, const O: u8> = + crate::BitWriter<'a, u32, EVENTS_DONE_SPEC, EVENTS_DONE_A, O>; +impl<'a, const O: u8> EVENTS_DONE_W<'a, O> { + #[doc = "Event not generated"] + #[inline(always)] + pub fn not_generated(self) -> &'a mut W { + self.variant(EVENTS_DONE_A::NOT_GENERATED) + } + #[doc = "Event generated"] + #[inline(always)] + pub fn generated(self) -> &'a mut W { + self.variant(EVENTS_DONE_A::GENERATED) + } +} +impl R { + #[doc = "Bit 0 - A conversion task has been completed. Depending on the mode, multiple conversions might be needed for a result to be transferred to RAM."] + #[inline(always)] + pub fn events_done(&self) -> EVENTS_DONE_R { + EVENTS_DONE_R::new((self.bits & 1) != 0) + } +} +impl W { + #[doc = "Bit 0 - A conversion task has been completed. Depending on the mode, multiple conversions might be needed for a result to be transferred to RAM."] + #[inline(always)] + #[must_use] + pub fn events_done(&mut self) -> EVENTS_DONE_W<0> { + EVENTS_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 + } +} +#[doc = "A conversion task has been completed. Depending on the mode, multiple conversions might be needed for a result to be transferred to RAM.\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 [events_done](index.html) module"] +pub struct EVENTS_DONE_SPEC; +impl crate::RegisterSpec for EVENTS_DONE_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [events_done::R](R) reader structure"] +impl crate::Readable for EVENTS_DONE_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [events_done::W](W) writer structure"] +impl crate::Writable for EVENTS_DONE_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets EVENTS_DONE to value 0"] +impl crate::Resettable for EVENTS_DONE_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/saadc/events_end.rs b/down-the-stack/dk_pac/src/saadc/events_end.rs new file mode 100644 index 0000000..a62595a --- /dev/null +++ b/down-the-stack/dk_pac/src/saadc/events_end.rs @@ -0,0 +1,127 @@ +#[doc = "Register `EVENTS_END` 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 `EVENTS_END` 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 `EVENTS_END` reader - The ADC has filled up the Result buffer"] +pub type EVENTS_END_R = crate::BitReader; +#[doc = "The ADC has filled up the Result buffer\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum EVENTS_END_A { + #[doc = "0: Event not generated"] + NOT_GENERATED = 0, + #[doc = "1: Event generated"] + GENERATED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: EVENTS_END_A) -> Self { + variant as u8 != 0 + } +} +impl EVENTS_END_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> EVENTS_END_A { + match self.bits { + false => EVENTS_END_A::NOT_GENERATED, + true => EVENTS_END_A::GENERATED, + } + } + #[doc = "Checks if the value of the field is `NOT_GENERATED`"] + #[inline(always)] + pub fn is_not_generated(&self) -> bool { + *self == EVENTS_END_A::NOT_GENERATED + } + #[doc = "Checks if the value of the field is `GENERATED`"] + #[inline(always)] + pub fn is_generated(&self) -> bool { + *self == EVENTS_END_A::GENERATED + } +} +#[doc = "Field `EVENTS_END` writer - The ADC has filled up the Result buffer"] +pub type EVENTS_END_W<'a, const O: u8> = + crate::BitWriter<'a, u32, EVENTS_END_SPEC, EVENTS_END_A, O>; +impl<'a, const O: u8> EVENTS_END_W<'a, O> { + #[doc = "Event not generated"] + #[inline(always)] + pub fn not_generated(self) -> &'a mut W { + self.variant(EVENTS_END_A::NOT_GENERATED) + } + #[doc = "Event generated"] + #[inline(always)] + pub fn generated(self) -> &'a mut W { + self.variant(EVENTS_END_A::GENERATED) + } +} +impl R { + #[doc = "Bit 0 - The ADC has filled up the Result buffer"] + #[inline(always)] + pub fn events_end(&self) -> EVENTS_END_R { + EVENTS_END_R::new((self.bits & 1) != 0) + } +} +impl W { + #[doc = "Bit 0 - The ADC has filled up the Result buffer"] + #[inline(always)] + #[must_use] + pub fn events_end(&mut self) -> EVENTS_END_W<0> { + EVENTS_END_W::new(self) + } + #[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 = "The ADC has filled up the Result buffer\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 [events_end](index.html) module"] +pub struct EVENTS_END_SPEC; +impl crate::RegisterSpec for EVENTS_END_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [events_end::R](R) reader structure"] +impl crate::Readable for EVENTS_END_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [events_end::W](W) writer structure"] +impl crate::Writable for EVENTS_END_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets EVENTS_END to value 0"] +impl crate::Resettable for EVENTS_END_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/saadc/events_resultdone.rs b/down-the-stack/dk_pac/src/saadc/events_resultdone.rs new file mode 100644 index 0000000..745445e --- /dev/null +++ b/down-the-stack/dk_pac/src/saadc/events_resultdone.rs @@ -0,0 +1,127 @@ +#[doc = "Register `EVENTS_RESULTDONE` 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 `EVENTS_RESULTDONE` 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 `EVENTS_RESULTDONE` reader - A result is ready to get transferred to RAM."] +pub type EVENTS_RESULTDONE_R = crate::BitReader; +#[doc = "A result is ready to get transferred to RAM.\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum EVENTS_RESULTDONE_A { + #[doc = "0: Event not generated"] + NOT_GENERATED = 0, + #[doc = "1: Event generated"] + GENERATED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: EVENTS_RESULTDONE_A) -> Self { + variant as u8 != 0 + } +} +impl EVENTS_RESULTDONE_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> EVENTS_RESULTDONE_A { + match self.bits { + false => EVENTS_RESULTDONE_A::NOT_GENERATED, + true => EVENTS_RESULTDONE_A::GENERATED, + } + } + #[doc = "Checks if the value of the field is `NOT_GENERATED`"] + #[inline(always)] + pub fn is_not_generated(&self) -> bool { + *self == EVENTS_RESULTDONE_A::NOT_GENERATED + } + #[doc = "Checks if the value of the field is `GENERATED`"] + #[inline(always)] + pub fn is_generated(&self) -> bool { + *self == EVENTS_RESULTDONE_A::GENERATED + } +} +#[doc = "Field `EVENTS_RESULTDONE` writer - A result is ready to get transferred to RAM."] +pub type EVENTS_RESULTDONE_W<'a, const O: u8> = + crate::BitWriter<'a, u32, EVENTS_RESULTDONE_SPEC, EVENTS_RESULTDONE_A, O>; +impl<'a, const O: u8> EVENTS_RESULTDONE_W<'a, O> { + #[doc = "Event not generated"] + #[inline(always)] + pub fn not_generated(self) -> &'a mut W { + self.variant(EVENTS_RESULTDONE_A::NOT_GENERATED) + } + #[doc = "Event generated"] + #[inline(always)] + pub fn generated(self) -> &'a mut W { + self.variant(EVENTS_RESULTDONE_A::GENERATED) + } +} +impl R { + #[doc = "Bit 0 - A result is ready to get transferred to RAM."] + #[inline(always)] + pub fn events_resultdone(&self) -> EVENTS_RESULTDONE_R { + EVENTS_RESULTDONE_R::new((self.bits & 1) != 0) + } +} +impl W { + #[doc = "Bit 0 - A result is ready to get transferred to RAM."] + #[inline(always)] + #[must_use] + pub fn events_resultdone(&mut self) -> EVENTS_RESULTDONE_W<0> { + EVENTS_RESULTDONE_W::new(self) + } + #[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 = "A result is ready to get transferred to RAM.\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 [events_resultdone](index.html) module"] +pub struct EVENTS_RESULTDONE_SPEC; +impl crate::RegisterSpec for EVENTS_RESULTDONE_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [events_resultdone::R](R) reader structure"] +impl crate::Readable for EVENTS_RESULTDONE_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [events_resultdone::W](W) writer structure"] +impl crate::Writable for EVENTS_RESULTDONE_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets EVENTS_RESULTDONE to value 0"] +impl crate::Resettable for EVENTS_RESULTDONE_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/saadc/events_started.rs b/down-the-stack/dk_pac/src/saadc/events_started.rs new file mode 100644 index 0000000..94b9862 --- /dev/null +++ b/down-the-stack/dk_pac/src/saadc/events_started.rs @@ -0,0 +1,127 @@ +#[doc = "Register `EVENTS_STARTED` 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 `EVENTS_STARTED` 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 `EVENTS_STARTED` reader - The ADC has started"] +pub type EVENTS_STARTED_R = crate::BitReader; +#[doc = "The ADC has started\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum EVENTS_STARTED_A { + #[doc = "0: Event not generated"] + NOT_GENERATED = 0, + #[doc = "1: Event generated"] + GENERATED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: EVENTS_STARTED_A) -> Self { + variant as u8 != 0 + } +} +impl EVENTS_STARTED_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> EVENTS_STARTED_A { + match self.bits { + false => EVENTS_STARTED_A::NOT_GENERATED, + true => EVENTS_STARTED_A::GENERATED, + } + } + #[doc = "Checks if the value of the field is `NOT_GENERATED`"] + #[inline(always)] + pub fn is_not_generated(&self) -> bool { + *self == EVENTS_STARTED_A::NOT_GENERATED + } + #[doc = "Checks if the value of the field is `GENERATED`"] + #[inline(always)] + pub fn is_generated(&self) -> bool { + *self == EVENTS_STARTED_A::GENERATED + } +} +#[doc = "Field `EVENTS_STARTED` writer - The ADC has started"] +pub type EVENTS_STARTED_W<'a, const O: u8> = + crate::BitWriter<'a, u32, EVENTS_STARTED_SPEC, EVENTS_STARTED_A, O>; +impl<'a, const O: u8> EVENTS_STARTED_W<'a, O> { + #[doc = "Event not generated"] + #[inline(always)] + pub fn not_generated(self) -> &'a mut W { + self.variant(EVENTS_STARTED_A::NOT_GENERATED) + } + #[doc = "Event generated"] + #[inline(always)] + pub fn generated(self) -> &'a mut W { + self.variant(EVENTS_STARTED_A::GENERATED) + } +} +impl R { + #[doc = "Bit 0 - The ADC has started"] + #[inline(always)] + pub fn events_started(&self) -> EVENTS_STARTED_R { + EVENTS_STARTED_R::new((self.bits & 1) != 0) + } +} +impl W { + #[doc = "Bit 0 - The ADC has started"] + #[inline(always)] + #[must_use] + pub fn events_started(&mut self) -> EVENTS_STARTED_W<0> { + EVENTS_STARTED_W::new(self) + } + #[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 = "The ADC has started\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 [events_started](index.html) module"] +pub struct EVENTS_STARTED_SPEC; +impl crate::RegisterSpec for EVENTS_STARTED_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [events_started::R](R) reader structure"] +impl crate::Readable for EVENTS_STARTED_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [events_started::W](W) writer structure"] +impl crate::Writable for EVENTS_STARTED_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets EVENTS_STARTED to value 0"] +impl crate::Resettable for EVENTS_STARTED_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/saadc/events_stopped.rs b/down-the-stack/dk_pac/src/saadc/events_stopped.rs new file mode 100644 index 0000000..30dfcc6 --- /dev/null +++ b/down-the-stack/dk_pac/src/saadc/events_stopped.rs @@ -0,0 +1,127 @@ +#[doc = "Register `EVENTS_STOPPED` 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 `EVENTS_STOPPED` 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 `EVENTS_STOPPED` reader - The ADC has stopped"] +pub type EVENTS_STOPPED_R = crate::BitReader; +#[doc = "The ADC has stopped\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum EVENTS_STOPPED_A { + #[doc = "0: Event not generated"] + NOT_GENERATED = 0, + #[doc = "1: Event generated"] + GENERATED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: EVENTS_STOPPED_A) -> Self { + variant as u8 != 0 + } +} +impl EVENTS_STOPPED_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> EVENTS_STOPPED_A { + match self.bits { + false => EVENTS_STOPPED_A::NOT_GENERATED, + true => EVENTS_STOPPED_A::GENERATED, + } + } + #[doc = "Checks if the value of the field is `NOT_GENERATED`"] + #[inline(always)] + pub fn is_not_generated(&self) -> bool { + *self == EVENTS_STOPPED_A::NOT_GENERATED + } + #[doc = "Checks if the value of the field is `GENERATED`"] + #[inline(always)] + pub fn is_generated(&self) -> bool { + *self == EVENTS_STOPPED_A::GENERATED + } +} +#[doc = "Field `EVENTS_STOPPED` writer - The ADC has stopped"] +pub type EVENTS_STOPPED_W<'a, const O: u8> = + crate::BitWriter<'a, u32, EVENTS_STOPPED_SPEC, EVENTS_STOPPED_A, O>; +impl<'a, const O: u8> EVENTS_STOPPED_W<'a, O> { + #[doc = "Event not generated"] + #[inline(always)] + pub fn not_generated(self) -> &'a mut W { + self.variant(EVENTS_STOPPED_A::NOT_GENERATED) + } + #[doc = "Event generated"] + #[inline(always)] + pub fn generated(self) -> &'a mut W { + self.variant(EVENTS_STOPPED_A::GENERATED) + } +} +impl R { + #[doc = "Bit 0 - The ADC has stopped"] + #[inline(always)] + pub fn events_stopped(&self) -> EVENTS_STOPPED_R { + EVENTS_STOPPED_R::new((self.bits & 1) != 0) + } +} +impl W { + #[doc = "Bit 0 - The ADC has stopped"] + #[inline(always)] + #[must_use] + pub fn events_stopped(&mut self) -> EVENTS_STOPPED_W<0> { + EVENTS_STOPPED_W::new(self) + } + #[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 = "The ADC has stopped\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 [events_stopped](index.html) module"] +pub struct EVENTS_STOPPED_SPEC; +impl crate::RegisterSpec for EVENTS_STOPPED_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [events_stopped::R](R) reader structure"] +impl crate::Readable for EVENTS_STOPPED_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [events_stopped::W](W) writer structure"] +impl crate::Writable for EVENTS_STOPPED_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets EVENTS_STOPPED to value 0"] +impl crate::Resettable for EVENTS_STOPPED_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/saadc/inten.rs b/down-the-stack/dk_pac/src/saadc/inten.rs new file mode 100644 index 0000000..11102a9 --- /dev/null +++ b/down-the-stack/dk_pac/src/saadc/inten.rs @@ -0,0 +1,1408 @@ +#[doc = "Register `INTEN` 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 `INTEN` 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 `STARTED` reader - Enable or disable interrupt for event STARTED"] +pub type STARTED_R = crate::BitReader; +#[doc = "Enable or disable interrupt for event STARTED\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum STARTED_A { + #[doc = "0: Disable"] + DISABLED = 0, + #[doc = "1: Enable"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: STARTED_A) -> Self { + variant as u8 != 0 + } +} +impl STARTED_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> STARTED_A { + match self.bits { + false => STARTED_A::DISABLED, + true => STARTED_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == STARTED_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == STARTED_A::ENABLED + } +} +#[doc = "Field `STARTED` writer - Enable or disable interrupt for event STARTED"] +pub type STARTED_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTEN_SPEC, STARTED_A, O>; +impl<'a, const O: u8> STARTED_W<'a, O> { + #[doc = "Disable"] + #[inline(always)] + pub fn disabled(self) -> &'a mut W { + self.variant(STARTED_A::DISABLED) + } + #[doc = "Enable"] + #[inline(always)] + pub fn enabled(self) -> &'a mut W { + self.variant(STARTED_A::ENABLED) + } +} +#[doc = "Field `END` reader - Enable or disable interrupt for event END"] +pub type END_R = crate::BitReader; +#[doc = "Enable or disable interrupt for event END\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum END_A { + #[doc = "0: Disable"] + DISABLED = 0, + #[doc = "1: Enable"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: END_A) -> Self { + variant as u8 != 0 + } +} +impl END_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> END_A { + match self.bits { + false => END_A::DISABLED, + true => END_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == END_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == END_A::ENABLED + } +} +#[doc = "Field `END` writer - Enable or disable interrupt for event END"] +pub type END_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTEN_SPEC, END_A, O>; +impl<'a, const O: u8> END_W<'a, O> { + #[doc = "Disable"] + #[inline(always)] + pub fn disabled(self) -> &'a mut W { + self.variant(END_A::DISABLED) + } + #[doc = "Enable"] + #[inline(always)] + pub fn enabled(self) -> &'a mut W { + self.variant(END_A::ENABLED) + } +} +#[doc = "Field `DONE` reader - Enable or disable interrupt for event DONE"] +pub type DONE_R = crate::BitReader; +#[doc = "Enable or disable interrupt for event DONE\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum DONE_A { + #[doc = "0: Disable"] + DISABLED = 0, + #[doc = "1: Enable"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: DONE_A) -> Self { + variant as u8 != 0 + } +} +impl DONE_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> DONE_A { + match self.bits { + false => DONE_A::DISABLED, + true => DONE_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == DONE_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == DONE_A::ENABLED + } +} +#[doc = "Field `DONE` writer - Enable or disable interrupt for event DONE"] +pub type DONE_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTEN_SPEC, DONE_A, O>; +impl<'a, const O: u8> DONE_W<'a, O> { + #[doc = "Disable"] + #[inline(always)] + pub fn disabled(self) -> &'a mut W { + self.variant(DONE_A::DISABLED) + } + #[doc = "Enable"] + #[inline(always)] + pub fn enabled(self) -> &'a mut W { + self.variant(DONE_A::ENABLED) + } +} +#[doc = "Field `RESULTDONE` reader - Enable or disable interrupt for event RESULTDONE"] +pub type RESULTDONE_R = crate::BitReader; +#[doc = "Enable or disable interrupt for event RESULTDONE\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum RESULTDONE_A { + #[doc = "0: Disable"] + DISABLED = 0, + #[doc = "1: Enable"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: RESULTDONE_A) -> Self { + variant as u8 != 0 + } +} +impl RESULTDONE_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> RESULTDONE_A { + match self.bits { + false => RESULTDONE_A::DISABLED, + true => RESULTDONE_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == RESULTDONE_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == RESULTDONE_A::ENABLED + } +} +#[doc = "Field `RESULTDONE` writer - Enable or disable interrupt for event RESULTDONE"] +pub type RESULTDONE_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTEN_SPEC, RESULTDONE_A, O>; +impl<'a, const O: u8> RESULTDONE_W<'a, O> { + #[doc = "Disable"] + #[inline(always)] + pub fn disabled(self) -> &'a mut W { + self.variant(RESULTDONE_A::DISABLED) + } + #[doc = "Enable"] + #[inline(always)] + pub fn enabled(self) -> &'a mut W { + self.variant(RESULTDONE_A::ENABLED) + } +} +#[doc = "Field `CALIBRATEDONE` reader - Enable or disable interrupt for event CALIBRATEDONE"] +pub type CALIBRATEDONE_R = crate::BitReader; +#[doc = "Enable or disable interrupt for event CALIBRATEDONE\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum CALIBRATEDONE_A { + #[doc = "0: Disable"] + DISABLED = 0, + #[doc = "1: Enable"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: CALIBRATEDONE_A) -> Self { + variant as u8 != 0 + } +} +impl CALIBRATEDONE_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> CALIBRATEDONE_A { + match self.bits { + false => CALIBRATEDONE_A::DISABLED, + true => CALIBRATEDONE_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == CALIBRATEDONE_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == CALIBRATEDONE_A::ENABLED + } +} +#[doc = "Field `CALIBRATEDONE` writer - Enable or disable interrupt for event CALIBRATEDONE"] +pub type CALIBRATEDONE_W<'a, const O: u8> = + crate::BitWriter<'a, u32, INTEN_SPEC, CALIBRATEDONE_A, O>; +impl<'a, const O: u8> CALIBRATEDONE_W<'a, O> { + #[doc = "Disable"] + #[inline(always)] + pub fn disabled(self) -> &'a mut W { + self.variant(CALIBRATEDONE_A::DISABLED) + } + #[doc = "Enable"] + #[inline(always)] + pub fn enabled(self) -> &'a mut W { + self.variant(CALIBRATEDONE_A::ENABLED) + } +} +#[doc = "Field `STOPPED` reader - Enable or disable interrupt for event STOPPED"] +pub type STOPPED_R = crate::BitReader; +#[doc = "Enable or disable interrupt for event STOPPED\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum STOPPED_A { + #[doc = "0: Disable"] + DISABLED = 0, + #[doc = "1: Enable"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: STOPPED_A) -> Self { + variant as u8 != 0 + } +} +impl STOPPED_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> STOPPED_A { + match self.bits { + false => STOPPED_A::DISABLED, + true => STOPPED_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == STOPPED_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == STOPPED_A::ENABLED + } +} +#[doc = "Field `STOPPED` writer - Enable or disable interrupt for event STOPPED"] +pub type STOPPED_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTEN_SPEC, STOPPED_A, O>; +impl<'a, const O: u8> STOPPED_W<'a, O> { + #[doc = "Disable"] + #[inline(always)] + pub fn disabled(self) -> &'a mut W { + self.variant(STOPPED_A::DISABLED) + } + #[doc = "Enable"] + #[inline(always)] + pub fn enabled(self) -> &'a mut W { + self.variant(STOPPED_A::ENABLED) + } +} +#[doc = "Field `CH0LIMITH` reader - Enable or disable interrupt for event CH0LIMITH"] +pub type CH0LIMITH_R = crate::BitReader; +#[doc = "Enable or disable interrupt for event CH0LIMITH\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum CH0LIMITH_A { + #[doc = "0: Disable"] + DISABLED = 0, + #[doc = "1: Enable"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: CH0LIMITH_A) -> Self { + variant as u8 != 0 + } +} +impl CH0LIMITH_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> CH0LIMITH_A { + match self.bits { + false => CH0LIMITH_A::DISABLED, + true => CH0LIMITH_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == CH0LIMITH_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == CH0LIMITH_A::ENABLED + } +} +#[doc = "Field `CH0LIMITH` writer - Enable or disable interrupt for event CH0LIMITH"] +pub type CH0LIMITH_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTEN_SPEC, CH0LIMITH_A, O>; +impl<'a, const O: u8> CH0LIMITH_W<'a, O> { + #[doc = "Disable"] + #[inline(always)] + pub fn disabled(self) -> &'a mut W { + self.variant(CH0LIMITH_A::DISABLED) + } + #[doc = "Enable"] + #[inline(always)] + pub fn enabled(self) -> &'a mut W { + self.variant(CH0LIMITH_A::ENABLED) + } +} +#[doc = "Field `CH0LIMITL` reader - Enable or disable interrupt for event CH0LIMITL"] +pub type CH0LIMITL_R = crate::BitReader; +#[doc = "Enable or disable interrupt for event CH0LIMITL\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum CH0LIMITL_A { + #[doc = "0: Disable"] + DISABLED = 0, + #[doc = "1: Enable"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: CH0LIMITL_A) -> Self { + variant as u8 != 0 + } +} +impl CH0LIMITL_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> CH0LIMITL_A { + match self.bits { + false => CH0LIMITL_A::DISABLED, + true => CH0LIMITL_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == CH0LIMITL_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == CH0LIMITL_A::ENABLED + } +} +#[doc = "Field `CH0LIMITL` writer - Enable or disable interrupt for event CH0LIMITL"] +pub type CH0LIMITL_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTEN_SPEC, CH0LIMITL_A, O>; +impl<'a, const O: u8> CH0LIMITL_W<'a, O> { + #[doc = "Disable"] + #[inline(always)] + pub fn disabled(self) -> &'a mut W { + self.variant(CH0LIMITL_A::DISABLED) + } + #[doc = "Enable"] + #[inline(always)] + pub fn enabled(self) -> &'a mut W { + self.variant(CH0LIMITL_A::ENABLED) + } +} +#[doc = "Field `CH1LIMITH` reader - Enable or disable interrupt for event CH1LIMITH"] +pub type CH1LIMITH_R = crate::BitReader; +#[doc = "Enable or disable interrupt for event CH1LIMITH\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum CH1LIMITH_A { + #[doc = "0: Disable"] + DISABLED = 0, + #[doc = "1: Enable"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: CH1LIMITH_A) -> Self { + variant as u8 != 0 + } +} +impl CH1LIMITH_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> CH1LIMITH_A { + match self.bits { + false => CH1LIMITH_A::DISABLED, + true => CH1LIMITH_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == CH1LIMITH_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == CH1LIMITH_A::ENABLED + } +} +#[doc = "Field `CH1LIMITH` writer - Enable or disable interrupt for event CH1LIMITH"] +pub type CH1LIMITH_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTEN_SPEC, CH1LIMITH_A, O>; +impl<'a, const O: u8> CH1LIMITH_W<'a, O> { + #[doc = "Disable"] + #[inline(always)] + pub fn disabled(self) -> &'a mut W { + self.variant(CH1LIMITH_A::DISABLED) + } + #[doc = "Enable"] + #[inline(always)] + pub fn enabled(self) -> &'a mut W { + self.variant(CH1LIMITH_A::ENABLED) + } +} +#[doc = "Field `CH1LIMITL` reader - Enable or disable interrupt for event CH1LIMITL"] +pub type CH1LIMITL_R = crate::BitReader; +#[doc = "Enable or disable interrupt for event CH1LIMITL\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum CH1LIMITL_A { + #[doc = "0: Disable"] + DISABLED = 0, + #[doc = "1: Enable"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: CH1LIMITL_A) -> Self { + variant as u8 != 0 + } +} +impl CH1LIMITL_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> CH1LIMITL_A { + match self.bits { + false => CH1LIMITL_A::DISABLED, + true => CH1LIMITL_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == CH1LIMITL_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == CH1LIMITL_A::ENABLED + } +} +#[doc = "Field `CH1LIMITL` writer - Enable or disable interrupt for event CH1LIMITL"] +pub type CH1LIMITL_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTEN_SPEC, CH1LIMITL_A, O>; +impl<'a, const O: u8> CH1LIMITL_W<'a, O> { + #[doc = "Disable"] + #[inline(always)] + pub fn disabled(self) -> &'a mut W { + self.variant(CH1LIMITL_A::DISABLED) + } + #[doc = "Enable"] + #[inline(always)] + pub fn enabled(self) -> &'a mut W { + self.variant(CH1LIMITL_A::ENABLED) + } +} +#[doc = "Field `CH2LIMITH` reader - Enable or disable interrupt for event CH2LIMITH"] +pub type CH2LIMITH_R = crate::BitReader; +#[doc = "Enable or disable interrupt for event CH2LIMITH\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum CH2LIMITH_A { + #[doc = "0: Disable"] + DISABLED = 0, + #[doc = "1: Enable"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: CH2LIMITH_A) -> Self { + variant as u8 != 0 + } +} +impl CH2LIMITH_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> CH2LIMITH_A { + match self.bits { + false => CH2LIMITH_A::DISABLED, + true => CH2LIMITH_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == CH2LIMITH_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == CH2LIMITH_A::ENABLED + } +} +#[doc = "Field `CH2LIMITH` writer - Enable or disable interrupt for event CH2LIMITH"] +pub type CH2LIMITH_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTEN_SPEC, CH2LIMITH_A, O>; +impl<'a, const O: u8> CH2LIMITH_W<'a, O> { + #[doc = "Disable"] + #[inline(always)] + pub fn disabled(self) -> &'a mut W { + self.variant(CH2LIMITH_A::DISABLED) + } + #[doc = "Enable"] + #[inline(always)] + pub fn enabled(self) -> &'a mut W { + self.variant(CH2LIMITH_A::ENABLED) + } +} +#[doc = "Field `CH2LIMITL` reader - Enable or disable interrupt for event CH2LIMITL"] +pub type CH2LIMITL_R = crate::BitReader; +#[doc = "Enable or disable interrupt for event CH2LIMITL\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum CH2LIMITL_A { + #[doc = "0: Disable"] + DISABLED = 0, + #[doc = "1: Enable"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: CH2LIMITL_A) -> Self { + variant as u8 != 0 + } +} +impl CH2LIMITL_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> CH2LIMITL_A { + match self.bits { + false => CH2LIMITL_A::DISABLED, + true => CH2LIMITL_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == CH2LIMITL_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == CH2LIMITL_A::ENABLED + } +} +#[doc = "Field `CH2LIMITL` writer - Enable or disable interrupt for event CH2LIMITL"] +pub type CH2LIMITL_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTEN_SPEC, CH2LIMITL_A, O>; +impl<'a, const O: u8> CH2LIMITL_W<'a, O> { + #[doc = "Disable"] + #[inline(always)] + pub fn disabled(self) -> &'a mut W { + self.variant(CH2LIMITL_A::DISABLED) + } + #[doc = "Enable"] + #[inline(always)] + pub fn enabled(self) -> &'a mut W { + self.variant(CH2LIMITL_A::ENABLED) + } +} +#[doc = "Field `CH3LIMITH` reader - Enable or disable interrupt for event CH3LIMITH"] +pub type CH3LIMITH_R = crate::BitReader; +#[doc = "Enable or disable interrupt for event CH3LIMITH\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum CH3LIMITH_A { + #[doc = "0: Disable"] + DISABLED = 0, + #[doc = "1: Enable"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: CH3LIMITH_A) -> Self { + variant as u8 != 0 + } +} +impl CH3LIMITH_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> CH3LIMITH_A { + match self.bits { + false => CH3LIMITH_A::DISABLED, + true => CH3LIMITH_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == CH3LIMITH_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == CH3LIMITH_A::ENABLED + } +} +#[doc = "Field `CH3LIMITH` writer - Enable or disable interrupt for event CH3LIMITH"] +pub type CH3LIMITH_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTEN_SPEC, CH3LIMITH_A, O>; +impl<'a, const O: u8> CH3LIMITH_W<'a, O> { + #[doc = "Disable"] + #[inline(always)] + pub fn disabled(self) -> &'a mut W { + self.variant(CH3LIMITH_A::DISABLED) + } + #[doc = "Enable"] + #[inline(always)] + pub fn enabled(self) -> &'a mut W { + self.variant(CH3LIMITH_A::ENABLED) + } +} +#[doc = "Field `CH3LIMITL` reader - Enable or disable interrupt for event CH3LIMITL"] +pub type CH3LIMITL_R = crate::BitReader; +#[doc = "Enable or disable interrupt for event CH3LIMITL\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum CH3LIMITL_A { + #[doc = "0: Disable"] + DISABLED = 0, + #[doc = "1: Enable"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: CH3LIMITL_A) -> Self { + variant as u8 != 0 + } +} +impl CH3LIMITL_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> CH3LIMITL_A { + match self.bits { + false => CH3LIMITL_A::DISABLED, + true => CH3LIMITL_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == CH3LIMITL_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == CH3LIMITL_A::ENABLED + } +} +#[doc = "Field `CH3LIMITL` writer - Enable or disable interrupt for event CH3LIMITL"] +pub type CH3LIMITL_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTEN_SPEC, CH3LIMITL_A, O>; +impl<'a, const O: u8> CH3LIMITL_W<'a, O> { + #[doc = "Disable"] + #[inline(always)] + pub fn disabled(self) -> &'a mut W { + self.variant(CH3LIMITL_A::DISABLED) + } + #[doc = "Enable"] + #[inline(always)] + pub fn enabled(self) -> &'a mut W { + self.variant(CH3LIMITL_A::ENABLED) + } +} +#[doc = "Field `CH4LIMITH` reader - Enable or disable interrupt for event CH4LIMITH"] +pub type CH4LIMITH_R = crate::BitReader; +#[doc = "Enable or disable interrupt for event CH4LIMITH\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum CH4LIMITH_A { + #[doc = "0: Disable"] + DISABLED = 0, + #[doc = "1: Enable"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: CH4LIMITH_A) -> Self { + variant as u8 != 0 + } +} +impl CH4LIMITH_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> CH4LIMITH_A { + match self.bits { + false => CH4LIMITH_A::DISABLED, + true => CH4LIMITH_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == CH4LIMITH_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == CH4LIMITH_A::ENABLED + } +} +#[doc = "Field `CH4LIMITH` writer - Enable or disable interrupt for event CH4LIMITH"] +pub type CH4LIMITH_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTEN_SPEC, CH4LIMITH_A, O>; +impl<'a, const O: u8> CH4LIMITH_W<'a, O> { + #[doc = "Disable"] + #[inline(always)] + pub fn disabled(self) -> &'a mut W { + self.variant(CH4LIMITH_A::DISABLED) + } + #[doc = "Enable"] + #[inline(always)] + pub fn enabled(self) -> &'a mut W { + self.variant(CH4LIMITH_A::ENABLED) + } +} +#[doc = "Field `CH4LIMITL` reader - Enable or disable interrupt for event CH4LIMITL"] +pub type CH4LIMITL_R = crate::BitReader; +#[doc = "Enable or disable interrupt for event CH4LIMITL\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum CH4LIMITL_A { + #[doc = "0: Disable"] + DISABLED = 0, + #[doc = "1: Enable"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: CH4LIMITL_A) -> Self { + variant as u8 != 0 + } +} +impl CH4LIMITL_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> CH4LIMITL_A { + match self.bits { + false => CH4LIMITL_A::DISABLED, + true => CH4LIMITL_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == CH4LIMITL_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == CH4LIMITL_A::ENABLED + } +} +#[doc = "Field `CH4LIMITL` writer - Enable or disable interrupt for event CH4LIMITL"] +pub type CH4LIMITL_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTEN_SPEC, CH4LIMITL_A, O>; +impl<'a, const O: u8> CH4LIMITL_W<'a, O> { + #[doc = "Disable"] + #[inline(always)] + pub fn disabled(self) -> &'a mut W { + self.variant(CH4LIMITL_A::DISABLED) + } + #[doc = "Enable"] + #[inline(always)] + pub fn enabled(self) -> &'a mut W { + self.variant(CH4LIMITL_A::ENABLED) + } +} +#[doc = "Field `CH5LIMITH` reader - Enable or disable interrupt for event CH5LIMITH"] +pub type CH5LIMITH_R = crate::BitReader; +#[doc = "Enable or disable interrupt for event CH5LIMITH\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum CH5LIMITH_A { + #[doc = "0: Disable"] + DISABLED = 0, + #[doc = "1: Enable"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: CH5LIMITH_A) -> Self { + variant as u8 != 0 + } +} +impl CH5LIMITH_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> CH5LIMITH_A { + match self.bits { + false => CH5LIMITH_A::DISABLED, + true => CH5LIMITH_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == CH5LIMITH_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == CH5LIMITH_A::ENABLED + } +} +#[doc = "Field `CH5LIMITH` writer - Enable or disable interrupt for event CH5LIMITH"] +pub type CH5LIMITH_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTEN_SPEC, CH5LIMITH_A, O>; +impl<'a, const O: u8> CH5LIMITH_W<'a, O> { + #[doc = "Disable"] + #[inline(always)] + pub fn disabled(self) -> &'a mut W { + self.variant(CH5LIMITH_A::DISABLED) + } + #[doc = "Enable"] + #[inline(always)] + pub fn enabled(self) -> &'a mut W { + self.variant(CH5LIMITH_A::ENABLED) + } +} +#[doc = "Field `CH5LIMITL` reader - Enable or disable interrupt for event CH5LIMITL"] +pub type CH5LIMITL_R = crate::BitReader; +#[doc = "Enable or disable interrupt for event CH5LIMITL\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum CH5LIMITL_A { + #[doc = "0: Disable"] + DISABLED = 0, + #[doc = "1: Enable"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: CH5LIMITL_A) -> Self { + variant as u8 != 0 + } +} +impl CH5LIMITL_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> CH5LIMITL_A { + match self.bits { + false => CH5LIMITL_A::DISABLED, + true => CH5LIMITL_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == CH5LIMITL_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == CH5LIMITL_A::ENABLED + } +} +#[doc = "Field `CH5LIMITL` writer - Enable or disable interrupt for event CH5LIMITL"] +pub type CH5LIMITL_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTEN_SPEC, CH5LIMITL_A, O>; +impl<'a, const O: u8> CH5LIMITL_W<'a, O> { + #[doc = "Disable"] + #[inline(always)] + pub fn disabled(self) -> &'a mut W { + self.variant(CH5LIMITL_A::DISABLED) + } + #[doc = "Enable"] + #[inline(always)] + pub fn enabled(self) -> &'a mut W { + self.variant(CH5LIMITL_A::ENABLED) + } +} +#[doc = "Field `CH6LIMITH` reader - Enable or disable interrupt for event CH6LIMITH"] +pub type CH6LIMITH_R = crate::BitReader; +#[doc = "Enable or disable interrupt for event CH6LIMITH\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum CH6LIMITH_A { + #[doc = "0: Disable"] + DISABLED = 0, + #[doc = "1: Enable"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: CH6LIMITH_A) -> Self { + variant as u8 != 0 + } +} +impl CH6LIMITH_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> CH6LIMITH_A { + match self.bits { + false => CH6LIMITH_A::DISABLED, + true => CH6LIMITH_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == CH6LIMITH_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == CH6LIMITH_A::ENABLED + } +} +#[doc = "Field `CH6LIMITH` writer - Enable or disable interrupt for event CH6LIMITH"] +pub type CH6LIMITH_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTEN_SPEC, CH6LIMITH_A, O>; +impl<'a, const O: u8> CH6LIMITH_W<'a, O> { + #[doc = "Disable"] + #[inline(always)] + pub fn disabled(self) -> &'a mut W { + self.variant(CH6LIMITH_A::DISABLED) + } + #[doc = "Enable"] + #[inline(always)] + pub fn enabled(self) -> &'a mut W { + self.variant(CH6LIMITH_A::ENABLED) + } +} +#[doc = "Field `CH6LIMITL` reader - Enable or disable interrupt for event CH6LIMITL"] +pub type CH6LIMITL_R = crate::BitReader; +#[doc = "Enable or disable interrupt for event CH6LIMITL\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum CH6LIMITL_A { + #[doc = "0: Disable"] + DISABLED = 0, + #[doc = "1: Enable"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: CH6LIMITL_A) -> Self { + variant as u8 != 0 + } +} +impl CH6LIMITL_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> CH6LIMITL_A { + match self.bits { + false => CH6LIMITL_A::DISABLED, + true => CH6LIMITL_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == CH6LIMITL_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == CH6LIMITL_A::ENABLED + } +} +#[doc = "Field `CH6LIMITL` writer - Enable or disable interrupt for event CH6LIMITL"] +pub type CH6LIMITL_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTEN_SPEC, CH6LIMITL_A, O>; +impl<'a, const O: u8> CH6LIMITL_W<'a, O> { + #[doc = "Disable"] + #[inline(always)] + pub fn disabled(self) -> &'a mut W { + self.variant(CH6LIMITL_A::DISABLED) + } + #[doc = "Enable"] + #[inline(always)] + pub fn enabled(self) -> &'a mut W { + self.variant(CH6LIMITL_A::ENABLED) + } +} +#[doc = "Field `CH7LIMITH` reader - Enable or disable interrupt for event CH7LIMITH"] +pub type CH7LIMITH_R = crate::BitReader; +#[doc = "Enable or disable interrupt for event CH7LIMITH\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum CH7LIMITH_A { + #[doc = "0: Disable"] + DISABLED = 0, + #[doc = "1: Enable"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: CH7LIMITH_A) -> Self { + variant as u8 != 0 + } +} +impl CH7LIMITH_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> CH7LIMITH_A { + match self.bits { + false => CH7LIMITH_A::DISABLED, + true => CH7LIMITH_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == CH7LIMITH_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == CH7LIMITH_A::ENABLED + } +} +#[doc = "Field `CH7LIMITH` writer - Enable or disable interrupt for event CH7LIMITH"] +pub type CH7LIMITH_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTEN_SPEC, CH7LIMITH_A, O>; +impl<'a, const O: u8> CH7LIMITH_W<'a, O> { + #[doc = "Disable"] + #[inline(always)] + pub fn disabled(self) -> &'a mut W { + self.variant(CH7LIMITH_A::DISABLED) + } + #[doc = "Enable"] + #[inline(always)] + pub fn enabled(self) -> &'a mut W { + self.variant(CH7LIMITH_A::ENABLED) + } +} +#[doc = "Field `CH7LIMITL` reader - Enable or disable interrupt for event CH7LIMITL"] +pub type CH7LIMITL_R = crate::BitReader; +#[doc = "Enable or disable interrupt for event CH7LIMITL\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum CH7LIMITL_A { + #[doc = "0: Disable"] + DISABLED = 0, + #[doc = "1: Enable"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: CH7LIMITL_A) -> Self { + variant as u8 != 0 + } +} +impl CH7LIMITL_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> CH7LIMITL_A { + match self.bits { + false => CH7LIMITL_A::DISABLED, + true => CH7LIMITL_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == CH7LIMITL_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == CH7LIMITL_A::ENABLED + } +} +#[doc = "Field `CH7LIMITL` writer - Enable or disable interrupt for event CH7LIMITL"] +pub type CH7LIMITL_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTEN_SPEC, CH7LIMITL_A, O>; +impl<'a, const O: u8> CH7LIMITL_W<'a, O> { + #[doc = "Disable"] + #[inline(always)] + pub fn disabled(self) -> &'a mut W { + self.variant(CH7LIMITL_A::DISABLED) + } + #[doc = "Enable"] + #[inline(always)] + pub fn enabled(self) -> &'a mut W { + self.variant(CH7LIMITL_A::ENABLED) + } +} +impl R { + #[doc = "Bit 0 - Enable or disable interrupt for event STARTED"] + #[inline(always)] + pub fn started(&self) -> STARTED_R { + STARTED_R::new((self.bits & 1) != 0) + } + #[doc = "Bit 1 - Enable or disable interrupt for event END"] + #[inline(always)] + pub fn end(&self) -> END_R { + END_R::new(((self.bits >> 1) & 1) != 0) + } + #[doc = "Bit 2 - Enable or disable interrupt for event DONE"] + #[inline(always)] + pub fn done(&self) -> DONE_R { + DONE_R::new(((self.bits >> 2) & 1) != 0) + } + #[doc = "Bit 3 - Enable or disable interrupt for event RESULTDONE"] + #[inline(always)] + pub fn resultdone(&self) -> RESULTDONE_R { + RESULTDONE_R::new(((self.bits >> 3) & 1) != 0) + } + #[doc = "Bit 4 - Enable or disable interrupt for event CALIBRATEDONE"] + #[inline(always)] + pub fn calibratedone(&self) -> CALIBRATEDONE_R { + CALIBRATEDONE_R::new(((self.bits >> 4) & 1) != 0) + } + #[doc = "Bit 5 - Enable or disable interrupt for event STOPPED"] + #[inline(always)] + pub fn stopped(&self) -> STOPPED_R { + STOPPED_R::new(((self.bits >> 5) & 1) != 0) + } + #[doc = "Bit 6 - Enable or disable interrupt for event CH0LIMITH"] + #[inline(always)] + pub fn ch0limith(&self) -> CH0LIMITH_R { + CH0LIMITH_R::new(((self.bits >> 6) & 1) != 0) + } + #[doc = "Bit 7 - Enable or disable interrupt for event CH0LIMITL"] + #[inline(always)] + pub fn ch0limitl(&self) -> CH0LIMITL_R { + CH0LIMITL_R::new(((self.bits >> 7) & 1) != 0) + } + #[doc = "Bit 8 - Enable or disable interrupt for event CH1LIMITH"] + #[inline(always)] + pub fn ch1limith(&self) -> CH1LIMITH_R { + CH1LIMITH_R::new(((self.bits >> 8) & 1) != 0) + } + #[doc = "Bit 9 - Enable or disable interrupt for event CH1LIMITL"] + #[inline(always)] + pub fn ch1limitl(&self) -> CH1LIMITL_R { + CH1LIMITL_R::new(((self.bits >> 9) & 1) != 0) + } + #[doc = "Bit 10 - Enable or disable interrupt for event CH2LIMITH"] + #[inline(always)] + pub fn ch2limith(&self) -> CH2LIMITH_R { + CH2LIMITH_R::new(((self.bits >> 10) & 1) != 0) + } + #[doc = "Bit 11 - Enable or disable interrupt for event CH2LIMITL"] + #[inline(always)] + pub fn ch2limitl(&self) -> CH2LIMITL_R { + CH2LIMITL_R::new(((self.bits >> 11) & 1) != 0) + } + #[doc = "Bit 12 - Enable or disable interrupt for event CH3LIMITH"] + #[inline(always)] + pub fn ch3limith(&self) -> CH3LIMITH_R { + CH3LIMITH_R::new(((self.bits >> 12) & 1) != 0) + } + #[doc = "Bit 13 - Enable or disable interrupt for event CH3LIMITL"] + #[inline(always)] + pub fn ch3limitl(&self) -> CH3LIMITL_R { + CH3LIMITL_R::new(((self.bits >> 13) & 1) != 0) + } + #[doc = "Bit 14 - Enable or disable interrupt for event CH4LIMITH"] + #[inline(always)] + pub fn ch4limith(&self) -> CH4LIMITH_R { + CH4LIMITH_R::new(((self.bits >> 14) & 1) != 0) + } + #[doc = "Bit 15 - Enable or disable interrupt for event CH4LIMITL"] + #[inline(always)] + pub fn ch4limitl(&self) -> CH4LIMITL_R { + CH4LIMITL_R::new(((self.bits >> 15) & 1) != 0) + } + #[doc = "Bit 16 - Enable or disable interrupt for event CH5LIMITH"] + #[inline(always)] + pub fn ch5limith(&self) -> CH5LIMITH_R { + CH5LIMITH_R::new(((self.bits >> 16) & 1) != 0) + } + #[doc = "Bit 17 - Enable or disable interrupt for event CH5LIMITL"] + #[inline(always)] + pub fn ch5limitl(&self) -> CH5LIMITL_R { + CH5LIMITL_R::new(((self.bits >> 17) & 1) != 0) + } + #[doc = "Bit 18 - Enable or disable interrupt for event CH6LIMITH"] + #[inline(always)] + pub fn ch6limith(&self) -> CH6LIMITH_R { + CH6LIMITH_R::new(((self.bits >> 18) & 1) != 0) + } + #[doc = "Bit 19 - Enable or disable interrupt for event CH6LIMITL"] + #[inline(always)] + pub fn ch6limitl(&self) -> CH6LIMITL_R { + CH6LIMITL_R::new(((self.bits >> 19) & 1) != 0) + } + #[doc = "Bit 20 - Enable or disable interrupt for event CH7LIMITH"] + #[inline(always)] + pub fn ch7limith(&self) -> CH7LIMITH_R { + CH7LIMITH_R::new(((self.bits >> 20) & 1) != 0) + } + #[doc = "Bit 21 - Enable or disable interrupt for event CH7LIMITL"] + #[inline(always)] + pub fn ch7limitl(&self) -> CH7LIMITL_R { + CH7LIMITL_R::new(((self.bits >> 21) & 1) != 0) + } +} +impl W { + #[doc = "Bit 0 - Enable or disable interrupt for event STARTED"] + #[inline(always)] + #[must_use] + pub fn started(&mut self) -> STARTED_W<0> { + STARTED_W::new(self) + } + #[doc = "Bit 1 - Enable or disable interrupt for event END"] + #[inline(always)] + #[must_use] + pub fn end(&mut self) -> END_W<1> { + END_W::new(self) + } + #[doc = "Bit 2 - Enable or disable interrupt for event DONE"] + #[inline(always)] + #[must_use] + pub fn done(&mut self) -> DONE_W<2> { + DONE_W::new(self) + } + #[doc = "Bit 3 - Enable or disable interrupt for event RESULTDONE"] + #[inline(always)] + #[must_use] + pub fn resultdone(&mut self) -> RESULTDONE_W<3> { + RESULTDONE_W::new(self) + } + #[doc = "Bit 4 - Enable or disable interrupt for event CALIBRATEDONE"] + #[inline(always)] + #[must_use] + pub fn calibratedone(&mut self) -> CALIBRATEDONE_W<4> { + CALIBRATEDONE_W::new(self) + } + #[doc = "Bit 5 - Enable or disable interrupt for event STOPPED"] + #[inline(always)] + #[must_use] + pub fn stopped(&mut self) -> STOPPED_W<5> { + STOPPED_W::new(self) + } + #[doc = "Bit 6 - Enable or disable interrupt for event CH0LIMITH"] + #[inline(always)] + #[must_use] + pub fn ch0limith(&mut self) -> CH0LIMITH_W<6> { + CH0LIMITH_W::new(self) + } + #[doc = "Bit 7 - Enable or disable interrupt for event CH0LIMITL"] + #[inline(always)] + #[must_use] + pub fn ch0limitl(&mut self) -> CH0LIMITL_W<7> { + CH0LIMITL_W::new(self) + } + #[doc = "Bit 8 - Enable or disable interrupt for event CH1LIMITH"] + #[inline(always)] + #[must_use] + pub fn ch1limith(&mut self) -> CH1LIMITH_W<8> { + CH1LIMITH_W::new(self) + } + #[doc = "Bit 9 - Enable or disable interrupt for event CH1LIMITL"] + #[inline(always)] + #[must_use] + pub fn ch1limitl(&mut self) -> CH1LIMITL_W<9> { + CH1LIMITL_W::new(self) + } + #[doc = "Bit 10 - Enable or disable interrupt for event CH2LIMITH"] + #[inline(always)] + #[must_use] + pub fn ch2limith(&mut self) -> CH2LIMITH_W<10> { + CH2LIMITH_W::new(self) + } + #[doc = "Bit 11 - Enable or disable interrupt for event CH2LIMITL"] + #[inline(always)] + #[must_use] + pub fn ch2limitl(&mut self) -> CH2LIMITL_W<11> { + CH2LIMITL_W::new(self) + } + #[doc = "Bit 12 - Enable or disable interrupt for event CH3LIMITH"] + #[inline(always)] + #[must_use] + pub fn ch3limith(&mut self) -> CH3LIMITH_W<12> { + CH3LIMITH_W::new(self) + } + #[doc = "Bit 13 - Enable or disable interrupt for event CH3LIMITL"] + #[inline(always)] + #[must_use] + pub fn ch3limitl(&mut self) -> CH3LIMITL_W<13> { + CH3LIMITL_W::new(self) + } + #[doc = "Bit 14 - Enable or disable interrupt for event CH4LIMITH"] + #[inline(always)] + #[must_use] + pub fn ch4limith(&mut self) -> CH4LIMITH_W<14> { + CH4LIMITH_W::new(self) + } + #[doc = "Bit 15 - Enable or disable interrupt for event CH4LIMITL"] + #[inline(always)] + #[must_use] + pub fn ch4limitl(&mut self) -> CH4LIMITL_W<15> { + CH4LIMITL_W::new(self) + } + #[doc = "Bit 16 - Enable or disable interrupt for event CH5LIMITH"] + #[inline(always)] + #[must_use] + pub fn ch5limith(&mut self) -> CH5LIMITH_W<16> { + CH5LIMITH_W::new(self) + } + #[doc = "Bit 17 - Enable or disable interrupt for event CH5LIMITL"] + #[inline(always)] + #[must_use] + pub fn ch5limitl(&mut self) -> CH5LIMITL_W<17> { + CH5LIMITL_W::new(self) + } + #[doc = "Bit 18 - Enable or disable interrupt for event CH6LIMITH"] + #[inline(always)] + #[must_use] + pub fn ch6limith(&mut self) -> CH6LIMITH_W<18> { + CH6LIMITH_W::new(self) + } + #[doc = "Bit 19 - Enable or disable interrupt for event CH6LIMITL"] + #[inline(always)] + #[must_use] + pub fn ch6limitl(&mut self) -> CH6LIMITL_W<19> { + CH6LIMITL_W::new(self) + } + #[doc = "Bit 20 - Enable or disable interrupt for event CH7LIMITH"] + #[inline(always)] + #[must_use] + pub fn ch7limith(&mut self) -> CH7LIMITH_W<20> { + CH7LIMITH_W::new(self) + } + #[doc = "Bit 21 - Enable or disable interrupt for event CH7LIMITL"] + #[inline(always)] + #[must_use] + pub fn ch7limitl(&mut self) -> CH7LIMITL_W<21> { + CH7LIMITL_W::new(self) + } + #[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 = "Enable or disable interrupt\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 [inten](index.html) module"] +pub struct INTEN_SPEC; +impl crate::RegisterSpec for INTEN_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [inten::R](R) reader structure"] +impl crate::Readable for INTEN_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [inten::W](W) writer structure"] +impl crate::Writable for INTEN_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets INTEN to value 0"] +impl crate::Resettable for INTEN_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/saadc/intenclr.rs b/down-the-stack/dk_pac/src/saadc/intenclr.rs new file mode 100644 index 0000000..9c97ef6 --- /dev/null +++ b/down-the-stack/dk_pac/src/saadc/intenclr.rs @@ -0,0 +1,1562 @@ +#[doc = "Register `INTENCLR` 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 `INTENCLR` 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 `STARTED` reader - Write '1' to disable interrupt for event STARTED"] +pub type STARTED_R = crate::BitReader; +#[doc = "Write '1' to disable interrupt for event STARTED\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum STARTED_A { + #[doc = "0: Read: Disabled"] + DISABLED = 0, + #[doc = "1: Read: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: STARTED_A) -> Self { + variant as u8 != 0 + } +} +impl STARTED_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> STARTED_A { + match self.bits { + false => STARTED_A::DISABLED, + true => STARTED_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == STARTED_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == STARTED_A::ENABLED + } +} +#[doc = "Write '1' to disable interrupt for event STARTED\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum STARTED_AW { + #[doc = "1: Disable"] + CLEAR = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: STARTED_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `STARTED` writer - Write '1' to disable interrupt for event STARTED"] +pub type STARTED_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENCLR_SPEC, STARTED_AW, O>; +impl<'a, const O: u8> STARTED_W<'a, O> { + #[doc = "Disable"] + #[inline(always)] + pub fn clear(self) -> &'a mut W { + self.variant(STARTED_AW::CLEAR) + } +} +#[doc = "Field `END` reader - Write '1' to disable interrupt for event END"] +pub type END_R = crate::BitReader; +#[doc = "Write '1' to disable interrupt for event END\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum END_A { + #[doc = "0: Read: Disabled"] + DISABLED = 0, + #[doc = "1: Read: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: END_A) -> Self { + variant as u8 != 0 + } +} +impl END_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> END_A { + match self.bits { + false => END_A::DISABLED, + true => END_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == END_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == END_A::ENABLED + } +} +#[doc = "Write '1' to disable interrupt for event END\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum END_AW { + #[doc = "1: Disable"] + CLEAR = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: END_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `END` writer - Write '1' to disable interrupt for event END"] +pub type END_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENCLR_SPEC, END_AW, O>; +impl<'a, const O: u8> END_W<'a, O> { + #[doc = "Disable"] + #[inline(always)] + pub fn clear(self) -> &'a mut W { + self.variant(END_AW::CLEAR) + } +} +#[doc = "Field `DONE` reader - Write '1' to disable interrupt for event DONE"] +pub type DONE_R = crate::BitReader; +#[doc = "Write '1' to disable interrupt for event DONE\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum DONE_A { + #[doc = "0: Read: Disabled"] + DISABLED = 0, + #[doc = "1: Read: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: DONE_A) -> Self { + variant as u8 != 0 + } +} +impl DONE_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> DONE_A { + match self.bits { + false => DONE_A::DISABLED, + true => DONE_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == DONE_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == DONE_A::ENABLED + } +} +#[doc = "Write '1' to disable interrupt for event DONE\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum DONE_AW { + #[doc = "1: Disable"] + CLEAR = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: DONE_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `DONE` writer - Write '1' to disable interrupt for event DONE"] +pub type DONE_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENCLR_SPEC, DONE_AW, O>; +impl<'a, const O: u8> DONE_W<'a, O> { + #[doc = "Disable"] + #[inline(always)] + pub fn clear(self) -> &'a mut W { + self.variant(DONE_AW::CLEAR) + } +} +#[doc = "Field `RESULTDONE` reader - Write '1' to disable interrupt for event RESULTDONE"] +pub type RESULTDONE_R = crate::BitReader; +#[doc = "Write '1' to disable interrupt for event RESULTDONE\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum RESULTDONE_A { + #[doc = "0: Read: Disabled"] + DISABLED = 0, + #[doc = "1: Read: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: RESULTDONE_A) -> Self { + variant as u8 != 0 + } +} +impl RESULTDONE_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> RESULTDONE_A { + match self.bits { + false => RESULTDONE_A::DISABLED, + true => RESULTDONE_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == RESULTDONE_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == RESULTDONE_A::ENABLED + } +} +#[doc = "Write '1' to disable interrupt for event RESULTDONE\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum RESULTDONE_AW { + #[doc = "1: Disable"] + CLEAR = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: RESULTDONE_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `RESULTDONE` writer - Write '1' to disable interrupt for event RESULTDONE"] +pub type RESULTDONE_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENCLR_SPEC, RESULTDONE_AW, O>; +impl<'a, const O: u8> RESULTDONE_W<'a, O> { + #[doc = "Disable"] + #[inline(always)] + pub fn clear(self) -> &'a mut W { + self.variant(RESULTDONE_AW::CLEAR) + } +} +#[doc = "Field `CALIBRATEDONE` reader - Write '1' to disable interrupt for event CALIBRATEDONE"] +pub type CALIBRATEDONE_R = crate::BitReader; +#[doc = "Write '1' to disable interrupt for event CALIBRATEDONE\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum CALIBRATEDONE_A { + #[doc = "0: Read: Disabled"] + DISABLED = 0, + #[doc = "1: Read: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: CALIBRATEDONE_A) -> Self { + variant as u8 != 0 + } +} +impl CALIBRATEDONE_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> CALIBRATEDONE_A { + match self.bits { + false => CALIBRATEDONE_A::DISABLED, + true => CALIBRATEDONE_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == CALIBRATEDONE_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == CALIBRATEDONE_A::ENABLED + } +} +#[doc = "Write '1' to disable interrupt for event CALIBRATEDONE\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum CALIBRATEDONE_AW { + #[doc = "1: Disable"] + CLEAR = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: CALIBRATEDONE_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `CALIBRATEDONE` writer - Write '1' to disable interrupt for event CALIBRATEDONE"] +pub type CALIBRATEDONE_W<'a, const O: u8> = + crate::BitWriter<'a, u32, INTENCLR_SPEC, CALIBRATEDONE_AW, O>; +impl<'a, const O: u8> CALIBRATEDONE_W<'a, O> { + #[doc = "Disable"] + #[inline(always)] + pub fn clear(self) -> &'a mut W { + self.variant(CALIBRATEDONE_AW::CLEAR) + } +} +#[doc = "Field `STOPPED` reader - Write '1' to disable interrupt for event STOPPED"] +pub type STOPPED_R = crate::BitReader; +#[doc = "Write '1' to disable interrupt for event STOPPED\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum STOPPED_A { + #[doc = "0: Read: Disabled"] + DISABLED = 0, + #[doc = "1: Read: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: STOPPED_A) -> Self { + variant as u8 != 0 + } +} +impl STOPPED_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> STOPPED_A { + match self.bits { + false => STOPPED_A::DISABLED, + true => STOPPED_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == STOPPED_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == STOPPED_A::ENABLED + } +} +#[doc = "Write '1' to disable interrupt for event STOPPED\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum STOPPED_AW { + #[doc = "1: Disable"] + CLEAR = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: STOPPED_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `STOPPED` writer - Write '1' to disable interrupt for event STOPPED"] +pub type STOPPED_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENCLR_SPEC, STOPPED_AW, O>; +impl<'a, const O: u8> STOPPED_W<'a, O> { + #[doc = "Disable"] + #[inline(always)] + pub fn clear(self) -> &'a mut W { + self.variant(STOPPED_AW::CLEAR) + } +} +#[doc = "Field `CH0LIMITH` reader - Write '1' to disable interrupt for event CH0LIMITH"] +pub type CH0LIMITH_R = crate::BitReader; +#[doc = "Write '1' to disable interrupt for event CH0LIMITH\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum CH0LIMITH_A { + #[doc = "0: Read: Disabled"] + DISABLED = 0, + #[doc = "1: Read: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: CH0LIMITH_A) -> Self { + variant as u8 != 0 + } +} +impl CH0LIMITH_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> CH0LIMITH_A { + match self.bits { + false => CH0LIMITH_A::DISABLED, + true => CH0LIMITH_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == CH0LIMITH_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == CH0LIMITH_A::ENABLED + } +} +#[doc = "Write '1' to disable interrupt for event CH0LIMITH\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum CH0LIMITH_AW { + #[doc = "1: Disable"] + CLEAR = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: CH0LIMITH_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `CH0LIMITH` writer - Write '1' to disable interrupt for event CH0LIMITH"] +pub type CH0LIMITH_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENCLR_SPEC, CH0LIMITH_AW, O>; +impl<'a, const O: u8> CH0LIMITH_W<'a, O> { + #[doc = "Disable"] + #[inline(always)] + pub fn clear(self) -> &'a mut W { + self.variant(CH0LIMITH_AW::CLEAR) + } +} +#[doc = "Field `CH0LIMITL` reader - Write '1' to disable interrupt for event CH0LIMITL"] +pub type CH0LIMITL_R = crate::BitReader; +#[doc = "Write '1' to disable interrupt for event CH0LIMITL\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum CH0LIMITL_A { + #[doc = "0: Read: Disabled"] + DISABLED = 0, + #[doc = "1: Read: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: CH0LIMITL_A) -> Self { + variant as u8 != 0 + } +} +impl CH0LIMITL_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> CH0LIMITL_A { + match self.bits { + false => CH0LIMITL_A::DISABLED, + true => CH0LIMITL_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == CH0LIMITL_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == CH0LIMITL_A::ENABLED + } +} +#[doc = "Write '1' to disable interrupt for event CH0LIMITL\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum CH0LIMITL_AW { + #[doc = "1: Disable"] + CLEAR = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: CH0LIMITL_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `CH0LIMITL` writer - Write '1' to disable interrupt for event CH0LIMITL"] +pub type CH0LIMITL_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENCLR_SPEC, CH0LIMITL_AW, O>; +impl<'a, const O: u8> CH0LIMITL_W<'a, O> { + #[doc = "Disable"] + #[inline(always)] + pub fn clear(self) -> &'a mut W { + self.variant(CH0LIMITL_AW::CLEAR) + } +} +#[doc = "Field `CH1LIMITH` reader - Write '1' to disable interrupt for event CH1LIMITH"] +pub type CH1LIMITH_R = crate::BitReader; +#[doc = "Write '1' to disable interrupt for event CH1LIMITH\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum CH1LIMITH_A { + #[doc = "0: Read: Disabled"] + DISABLED = 0, + #[doc = "1: Read: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: CH1LIMITH_A) -> Self { + variant as u8 != 0 + } +} +impl CH1LIMITH_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> CH1LIMITH_A { + match self.bits { + false => CH1LIMITH_A::DISABLED, + true => CH1LIMITH_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == CH1LIMITH_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == CH1LIMITH_A::ENABLED + } +} +#[doc = "Write '1' to disable interrupt for event CH1LIMITH\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum CH1LIMITH_AW { + #[doc = "1: Disable"] + CLEAR = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: CH1LIMITH_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `CH1LIMITH` writer - Write '1' to disable interrupt for event CH1LIMITH"] +pub type CH1LIMITH_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENCLR_SPEC, CH1LIMITH_AW, O>; +impl<'a, const O: u8> CH1LIMITH_W<'a, O> { + #[doc = "Disable"] + #[inline(always)] + pub fn clear(self) -> &'a mut W { + self.variant(CH1LIMITH_AW::CLEAR) + } +} +#[doc = "Field `CH1LIMITL` reader - Write '1' to disable interrupt for event CH1LIMITL"] +pub type CH1LIMITL_R = crate::BitReader; +#[doc = "Write '1' to disable interrupt for event CH1LIMITL\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum CH1LIMITL_A { + #[doc = "0: Read: Disabled"] + DISABLED = 0, + #[doc = "1: Read: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: CH1LIMITL_A) -> Self { + variant as u8 != 0 + } +} +impl CH1LIMITL_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> CH1LIMITL_A { + match self.bits { + false => CH1LIMITL_A::DISABLED, + true => CH1LIMITL_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == CH1LIMITL_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == CH1LIMITL_A::ENABLED + } +} +#[doc = "Write '1' to disable interrupt for event CH1LIMITL\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum CH1LIMITL_AW { + #[doc = "1: Disable"] + CLEAR = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: CH1LIMITL_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `CH1LIMITL` writer - Write '1' to disable interrupt for event CH1LIMITL"] +pub type CH1LIMITL_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENCLR_SPEC, CH1LIMITL_AW, O>; +impl<'a, const O: u8> CH1LIMITL_W<'a, O> { + #[doc = "Disable"] + #[inline(always)] + pub fn clear(self) -> &'a mut W { + self.variant(CH1LIMITL_AW::CLEAR) + } +} +#[doc = "Field `CH2LIMITH` reader - Write '1' to disable interrupt for event CH2LIMITH"] +pub type CH2LIMITH_R = crate::BitReader; +#[doc = "Write '1' to disable interrupt for event CH2LIMITH\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum CH2LIMITH_A { + #[doc = "0: Read: Disabled"] + DISABLED = 0, + #[doc = "1: Read: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: CH2LIMITH_A) -> Self { + variant as u8 != 0 + } +} +impl CH2LIMITH_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> CH2LIMITH_A { + match self.bits { + false => CH2LIMITH_A::DISABLED, + true => CH2LIMITH_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == CH2LIMITH_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == CH2LIMITH_A::ENABLED + } +} +#[doc = "Write '1' to disable interrupt for event CH2LIMITH\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum CH2LIMITH_AW { + #[doc = "1: Disable"] + CLEAR = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: CH2LIMITH_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `CH2LIMITH` writer - Write '1' to disable interrupt for event CH2LIMITH"] +pub type CH2LIMITH_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENCLR_SPEC, CH2LIMITH_AW, O>; +impl<'a, const O: u8> CH2LIMITH_W<'a, O> { + #[doc = "Disable"] + #[inline(always)] + pub fn clear(self) -> &'a mut W { + self.variant(CH2LIMITH_AW::CLEAR) + } +} +#[doc = "Field `CH2LIMITL` reader - Write '1' to disable interrupt for event CH2LIMITL"] +pub type CH2LIMITL_R = crate::BitReader; +#[doc = "Write '1' to disable interrupt for event CH2LIMITL\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum CH2LIMITL_A { + #[doc = "0: Read: Disabled"] + DISABLED = 0, + #[doc = "1: Read: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: CH2LIMITL_A) -> Self { + variant as u8 != 0 + } +} +impl CH2LIMITL_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> CH2LIMITL_A { + match self.bits { + false => CH2LIMITL_A::DISABLED, + true => CH2LIMITL_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == CH2LIMITL_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == CH2LIMITL_A::ENABLED + } +} +#[doc = "Write '1' to disable interrupt for event CH2LIMITL\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum CH2LIMITL_AW { + #[doc = "1: Disable"] + CLEAR = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: CH2LIMITL_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `CH2LIMITL` writer - Write '1' to disable interrupt for event CH2LIMITL"] +pub type CH2LIMITL_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENCLR_SPEC, CH2LIMITL_AW, O>; +impl<'a, const O: u8> CH2LIMITL_W<'a, O> { + #[doc = "Disable"] + #[inline(always)] + pub fn clear(self) -> &'a mut W { + self.variant(CH2LIMITL_AW::CLEAR) + } +} +#[doc = "Field `CH3LIMITH` reader - Write '1' to disable interrupt for event CH3LIMITH"] +pub type CH3LIMITH_R = crate::BitReader; +#[doc = "Write '1' to disable interrupt for event CH3LIMITH\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum CH3LIMITH_A { + #[doc = "0: Read: Disabled"] + DISABLED = 0, + #[doc = "1: Read: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: CH3LIMITH_A) -> Self { + variant as u8 != 0 + } +} +impl CH3LIMITH_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> CH3LIMITH_A { + match self.bits { + false => CH3LIMITH_A::DISABLED, + true => CH3LIMITH_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == CH3LIMITH_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == CH3LIMITH_A::ENABLED + } +} +#[doc = "Write '1' to disable interrupt for event CH3LIMITH\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum CH3LIMITH_AW { + #[doc = "1: Disable"] + CLEAR = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: CH3LIMITH_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `CH3LIMITH` writer - Write '1' to disable interrupt for event CH3LIMITH"] +pub type CH3LIMITH_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENCLR_SPEC, CH3LIMITH_AW, O>; +impl<'a, const O: u8> CH3LIMITH_W<'a, O> { + #[doc = "Disable"] + #[inline(always)] + pub fn clear(self) -> &'a mut W { + self.variant(CH3LIMITH_AW::CLEAR) + } +} +#[doc = "Field `CH3LIMITL` reader - Write '1' to disable interrupt for event CH3LIMITL"] +pub type CH3LIMITL_R = crate::BitReader; +#[doc = "Write '1' to disable interrupt for event CH3LIMITL\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum CH3LIMITL_A { + #[doc = "0: Read: Disabled"] + DISABLED = 0, + #[doc = "1: Read: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: CH3LIMITL_A) -> Self { + variant as u8 != 0 + } +} +impl CH3LIMITL_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> CH3LIMITL_A { + match self.bits { + false => CH3LIMITL_A::DISABLED, + true => CH3LIMITL_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == CH3LIMITL_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == CH3LIMITL_A::ENABLED + } +} +#[doc = "Write '1' to disable interrupt for event CH3LIMITL\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum CH3LIMITL_AW { + #[doc = "1: Disable"] + CLEAR = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: CH3LIMITL_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `CH3LIMITL` writer - Write '1' to disable interrupt for event CH3LIMITL"] +pub type CH3LIMITL_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENCLR_SPEC, CH3LIMITL_AW, O>; +impl<'a, const O: u8> CH3LIMITL_W<'a, O> { + #[doc = "Disable"] + #[inline(always)] + pub fn clear(self) -> &'a mut W { + self.variant(CH3LIMITL_AW::CLEAR) + } +} +#[doc = "Field `CH4LIMITH` reader - Write '1' to disable interrupt for event CH4LIMITH"] +pub type CH4LIMITH_R = crate::BitReader; +#[doc = "Write '1' to disable interrupt for event CH4LIMITH\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum CH4LIMITH_A { + #[doc = "0: Read: Disabled"] + DISABLED = 0, + #[doc = "1: Read: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: CH4LIMITH_A) -> Self { + variant as u8 != 0 + } +} +impl CH4LIMITH_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> CH4LIMITH_A { + match self.bits { + false => CH4LIMITH_A::DISABLED, + true => CH4LIMITH_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == CH4LIMITH_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == CH4LIMITH_A::ENABLED + } +} +#[doc = "Write '1' to disable interrupt for event CH4LIMITH\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum CH4LIMITH_AW { + #[doc = "1: Disable"] + CLEAR = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: CH4LIMITH_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `CH4LIMITH` writer - Write '1' to disable interrupt for event CH4LIMITH"] +pub type CH4LIMITH_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENCLR_SPEC, CH4LIMITH_AW, O>; +impl<'a, const O: u8> CH4LIMITH_W<'a, O> { + #[doc = "Disable"] + #[inline(always)] + pub fn clear(self) -> &'a mut W { + self.variant(CH4LIMITH_AW::CLEAR) + } +} +#[doc = "Field `CH4LIMITL` reader - Write '1' to disable interrupt for event CH4LIMITL"] +pub type CH4LIMITL_R = crate::BitReader; +#[doc = "Write '1' to disable interrupt for event CH4LIMITL\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum CH4LIMITL_A { + #[doc = "0: Read: Disabled"] + DISABLED = 0, + #[doc = "1: Read: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: CH4LIMITL_A) -> Self { + variant as u8 != 0 + } +} +impl CH4LIMITL_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> CH4LIMITL_A { + match self.bits { + false => CH4LIMITL_A::DISABLED, + true => CH4LIMITL_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == CH4LIMITL_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == CH4LIMITL_A::ENABLED + } +} +#[doc = "Write '1' to disable interrupt for event CH4LIMITL\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum CH4LIMITL_AW { + #[doc = "1: Disable"] + CLEAR = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: CH4LIMITL_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `CH4LIMITL` writer - Write '1' to disable interrupt for event CH4LIMITL"] +pub type CH4LIMITL_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENCLR_SPEC, CH4LIMITL_AW, O>; +impl<'a, const O: u8> CH4LIMITL_W<'a, O> { + #[doc = "Disable"] + #[inline(always)] + pub fn clear(self) -> &'a mut W { + self.variant(CH4LIMITL_AW::CLEAR) + } +} +#[doc = "Field `CH5LIMITH` reader - Write '1' to disable interrupt for event CH5LIMITH"] +pub type CH5LIMITH_R = crate::BitReader; +#[doc = "Write '1' to disable interrupt for event CH5LIMITH\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum CH5LIMITH_A { + #[doc = "0: Read: Disabled"] + DISABLED = 0, + #[doc = "1: Read: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: CH5LIMITH_A) -> Self { + variant as u8 != 0 + } +} +impl CH5LIMITH_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> CH5LIMITH_A { + match self.bits { + false => CH5LIMITH_A::DISABLED, + true => CH5LIMITH_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == CH5LIMITH_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == CH5LIMITH_A::ENABLED + } +} +#[doc = "Write '1' to disable interrupt for event CH5LIMITH\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum CH5LIMITH_AW { + #[doc = "1: Disable"] + CLEAR = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: CH5LIMITH_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `CH5LIMITH` writer - Write '1' to disable interrupt for event CH5LIMITH"] +pub type CH5LIMITH_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENCLR_SPEC, CH5LIMITH_AW, O>; +impl<'a, const O: u8> CH5LIMITH_W<'a, O> { + #[doc = "Disable"] + #[inline(always)] + pub fn clear(self) -> &'a mut W { + self.variant(CH5LIMITH_AW::CLEAR) + } +} +#[doc = "Field `CH5LIMITL` reader - Write '1' to disable interrupt for event CH5LIMITL"] +pub type CH5LIMITL_R = crate::BitReader; +#[doc = "Write '1' to disable interrupt for event CH5LIMITL\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum CH5LIMITL_A { + #[doc = "0: Read: Disabled"] + DISABLED = 0, + #[doc = "1: Read: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: CH5LIMITL_A) -> Self { + variant as u8 != 0 + } +} +impl CH5LIMITL_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> CH5LIMITL_A { + match self.bits { + false => CH5LIMITL_A::DISABLED, + true => CH5LIMITL_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == CH5LIMITL_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == CH5LIMITL_A::ENABLED + } +} +#[doc = "Write '1' to disable interrupt for event CH5LIMITL\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum CH5LIMITL_AW { + #[doc = "1: Disable"] + CLEAR = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: CH5LIMITL_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `CH5LIMITL` writer - Write '1' to disable interrupt for event CH5LIMITL"] +pub type CH5LIMITL_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENCLR_SPEC, CH5LIMITL_AW, O>; +impl<'a, const O: u8> CH5LIMITL_W<'a, O> { + #[doc = "Disable"] + #[inline(always)] + pub fn clear(self) -> &'a mut W { + self.variant(CH5LIMITL_AW::CLEAR) + } +} +#[doc = "Field `CH6LIMITH` reader - Write '1' to disable interrupt for event CH6LIMITH"] +pub type CH6LIMITH_R = crate::BitReader; +#[doc = "Write '1' to disable interrupt for event CH6LIMITH\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum CH6LIMITH_A { + #[doc = "0: Read: Disabled"] + DISABLED = 0, + #[doc = "1: Read: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: CH6LIMITH_A) -> Self { + variant as u8 != 0 + } +} +impl CH6LIMITH_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> CH6LIMITH_A { + match self.bits { + false => CH6LIMITH_A::DISABLED, + true => CH6LIMITH_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == CH6LIMITH_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == CH6LIMITH_A::ENABLED + } +} +#[doc = "Write '1' to disable interrupt for event CH6LIMITH\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum CH6LIMITH_AW { + #[doc = "1: Disable"] + CLEAR = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: CH6LIMITH_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `CH6LIMITH` writer - Write '1' to disable interrupt for event CH6LIMITH"] +pub type CH6LIMITH_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENCLR_SPEC, CH6LIMITH_AW, O>; +impl<'a, const O: u8> CH6LIMITH_W<'a, O> { + #[doc = "Disable"] + #[inline(always)] + pub fn clear(self) -> &'a mut W { + self.variant(CH6LIMITH_AW::CLEAR) + } +} +#[doc = "Field `CH6LIMITL` reader - Write '1' to disable interrupt for event CH6LIMITL"] +pub type CH6LIMITL_R = crate::BitReader; +#[doc = "Write '1' to disable interrupt for event CH6LIMITL\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum CH6LIMITL_A { + #[doc = "0: Read: Disabled"] + DISABLED = 0, + #[doc = "1: Read: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: CH6LIMITL_A) -> Self { + variant as u8 != 0 + } +} +impl CH6LIMITL_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> CH6LIMITL_A { + match self.bits { + false => CH6LIMITL_A::DISABLED, + true => CH6LIMITL_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == CH6LIMITL_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == CH6LIMITL_A::ENABLED + } +} +#[doc = "Write '1' to disable interrupt for event CH6LIMITL\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum CH6LIMITL_AW { + #[doc = "1: Disable"] + CLEAR = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: CH6LIMITL_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `CH6LIMITL` writer - Write '1' to disable interrupt for event CH6LIMITL"] +pub type CH6LIMITL_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENCLR_SPEC, CH6LIMITL_AW, O>; +impl<'a, const O: u8> CH6LIMITL_W<'a, O> { + #[doc = "Disable"] + #[inline(always)] + pub fn clear(self) -> &'a mut W { + self.variant(CH6LIMITL_AW::CLEAR) + } +} +#[doc = "Field `CH7LIMITH` reader - Write '1' to disable interrupt for event CH7LIMITH"] +pub type CH7LIMITH_R = crate::BitReader; +#[doc = "Write '1' to disable interrupt for event CH7LIMITH\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum CH7LIMITH_A { + #[doc = "0: Read: Disabled"] + DISABLED = 0, + #[doc = "1: Read: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: CH7LIMITH_A) -> Self { + variant as u8 != 0 + } +} +impl CH7LIMITH_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> CH7LIMITH_A { + match self.bits { + false => CH7LIMITH_A::DISABLED, + true => CH7LIMITH_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == CH7LIMITH_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == CH7LIMITH_A::ENABLED + } +} +#[doc = "Write '1' to disable interrupt for event CH7LIMITH\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum CH7LIMITH_AW { + #[doc = "1: Disable"] + CLEAR = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: CH7LIMITH_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `CH7LIMITH` writer - Write '1' to disable interrupt for event CH7LIMITH"] +pub type CH7LIMITH_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENCLR_SPEC, CH7LIMITH_AW, O>; +impl<'a, const O: u8> CH7LIMITH_W<'a, O> { + #[doc = "Disable"] + #[inline(always)] + pub fn clear(self) -> &'a mut W { + self.variant(CH7LIMITH_AW::CLEAR) + } +} +#[doc = "Field `CH7LIMITL` reader - Write '1' to disable interrupt for event CH7LIMITL"] +pub type CH7LIMITL_R = crate::BitReader; +#[doc = "Write '1' to disable interrupt for event CH7LIMITL\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum CH7LIMITL_A { + #[doc = "0: Read: Disabled"] + DISABLED = 0, + #[doc = "1: Read: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: CH7LIMITL_A) -> Self { + variant as u8 != 0 + } +} +impl CH7LIMITL_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> CH7LIMITL_A { + match self.bits { + false => CH7LIMITL_A::DISABLED, + true => CH7LIMITL_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == CH7LIMITL_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == CH7LIMITL_A::ENABLED + } +} +#[doc = "Write '1' to disable interrupt for event CH7LIMITL\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum CH7LIMITL_AW { + #[doc = "1: Disable"] + CLEAR = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: CH7LIMITL_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `CH7LIMITL` writer - Write '1' to disable interrupt for event CH7LIMITL"] +pub type CH7LIMITL_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENCLR_SPEC, CH7LIMITL_AW, O>; +impl<'a, const O: u8> CH7LIMITL_W<'a, O> { + #[doc = "Disable"] + #[inline(always)] + pub fn clear(self) -> &'a mut W { + self.variant(CH7LIMITL_AW::CLEAR) + } +} +impl R { + #[doc = "Bit 0 - Write '1' to disable interrupt for event STARTED"] + #[inline(always)] + pub fn started(&self) -> STARTED_R { + STARTED_R::new((self.bits & 1) != 0) + } + #[doc = "Bit 1 - Write '1' to disable interrupt for event END"] + #[inline(always)] + pub fn end(&self) -> END_R { + END_R::new(((self.bits >> 1) & 1) != 0) + } + #[doc = "Bit 2 - Write '1' to disable interrupt for event DONE"] + #[inline(always)] + pub fn done(&self) -> DONE_R { + DONE_R::new(((self.bits >> 2) & 1) != 0) + } + #[doc = "Bit 3 - Write '1' to disable interrupt for event RESULTDONE"] + #[inline(always)] + pub fn resultdone(&self) -> RESULTDONE_R { + RESULTDONE_R::new(((self.bits >> 3) & 1) != 0) + } + #[doc = "Bit 4 - Write '1' to disable interrupt for event CALIBRATEDONE"] + #[inline(always)] + pub fn calibratedone(&self) -> CALIBRATEDONE_R { + CALIBRATEDONE_R::new(((self.bits >> 4) & 1) != 0) + } + #[doc = "Bit 5 - Write '1' to disable interrupt for event STOPPED"] + #[inline(always)] + pub fn stopped(&self) -> STOPPED_R { + STOPPED_R::new(((self.bits >> 5) & 1) != 0) + } + #[doc = "Bit 6 - Write '1' to disable interrupt for event CH0LIMITH"] + #[inline(always)] + pub fn ch0limith(&self) -> CH0LIMITH_R { + CH0LIMITH_R::new(((self.bits >> 6) & 1) != 0) + } + #[doc = "Bit 7 - Write '1' to disable interrupt for event CH0LIMITL"] + #[inline(always)] + pub fn ch0limitl(&self) -> CH0LIMITL_R { + CH0LIMITL_R::new(((self.bits >> 7) & 1) != 0) + } + #[doc = "Bit 8 - Write '1' to disable interrupt for event CH1LIMITH"] + #[inline(always)] + pub fn ch1limith(&self) -> CH1LIMITH_R { + CH1LIMITH_R::new(((self.bits >> 8) & 1) != 0) + } + #[doc = "Bit 9 - Write '1' to disable interrupt for event CH1LIMITL"] + #[inline(always)] + pub fn ch1limitl(&self) -> CH1LIMITL_R { + CH1LIMITL_R::new(((self.bits >> 9) & 1) != 0) + } + #[doc = "Bit 10 - Write '1' to disable interrupt for event CH2LIMITH"] + #[inline(always)] + pub fn ch2limith(&self) -> CH2LIMITH_R { + CH2LIMITH_R::new(((self.bits >> 10) & 1) != 0) + } + #[doc = "Bit 11 - Write '1' to disable interrupt for event CH2LIMITL"] + #[inline(always)] + pub fn ch2limitl(&self) -> CH2LIMITL_R { + CH2LIMITL_R::new(((self.bits >> 11) & 1) != 0) + } + #[doc = "Bit 12 - Write '1' to disable interrupt for event CH3LIMITH"] + #[inline(always)] + pub fn ch3limith(&self) -> CH3LIMITH_R { + CH3LIMITH_R::new(((self.bits >> 12) & 1) != 0) + } + #[doc = "Bit 13 - Write '1' to disable interrupt for event CH3LIMITL"] + #[inline(always)] + pub fn ch3limitl(&self) -> CH3LIMITL_R { + CH3LIMITL_R::new(((self.bits >> 13) & 1) != 0) + } + #[doc = "Bit 14 - Write '1' to disable interrupt for event CH4LIMITH"] + #[inline(always)] + pub fn ch4limith(&self) -> CH4LIMITH_R { + CH4LIMITH_R::new(((self.bits >> 14) & 1) != 0) + } + #[doc = "Bit 15 - Write '1' to disable interrupt for event CH4LIMITL"] + #[inline(always)] + pub fn ch4limitl(&self) -> CH4LIMITL_R { + CH4LIMITL_R::new(((self.bits >> 15) & 1) != 0) + } + #[doc = "Bit 16 - Write '1' to disable interrupt for event CH5LIMITH"] + #[inline(always)] + pub fn ch5limith(&self) -> CH5LIMITH_R { + CH5LIMITH_R::new(((self.bits >> 16) & 1) != 0) + } + #[doc = "Bit 17 - Write '1' to disable interrupt for event CH5LIMITL"] + #[inline(always)] + pub fn ch5limitl(&self) -> CH5LIMITL_R { + CH5LIMITL_R::new(((self.bits >> 17) & 1) != 0) + } + #[doc = "Bit 18 - Write '1' to disable interrupt for event CH6LIMITH"] + #[inline(always)] + pub fn ch6limith(&self) -> CH6LIMITH_R { + CH6LIMITH_R::new(((self.bits >> 18) & 1) != 0) + } + #[doc = "Bit 19 - Write '1' to disable interrupt for event CH6LIMITL"] + #[inline(always)] + pub fn ch6limitl(&self) -> CH6LIMITL_R { + CH6LIMITL_R::new(((self.bits >> 19) & 1) != 0) + } + #[doc = "Bit 20 - Write '1' to disable interrupt for event CH7LIMITH"] + #[inline(always)] + pub fn ch7limith(&self) -> CH7LIMITH_R { + CH7LIMITH_R::new(((self.bits >> 20) & 1) != 0) + } + #[doc = "Bit 21 - Write '1' to disable interrupt for event CH7LIMITL"] + #[inline(always)] + pub fn ch7limitl(&self) -> CH7LIMITL_R { + CH7LIMITL_R::new(((self.bits >> 21) & 1) != 0) + } +} +impl W { + #[doc = "Bit 0 - Write '1' to disable interrupt for event STARTED"] + #[inline(always)] + #[must_use] + pub fn started(&mut self) -> STARTED_W<0> { + STARTED_W::new(self) + } + #[doc = "Bit 1 - Write '1' to disable interrupt for event END"] + #[inline(always)] + #[must_use] + pub fn end(&mut self) -> END_W<1> { + END_W::new(self) + } + #[doc = "Bit 2 - Write '1' to disable interrupt for event DONE"] + #[inline(always)] + #[must_use] + pub fn done(&mut self) -> DONE_W<2> { + DONE_W::new(self) + } + #[doc = "Bit 3 - Write '1' to disable interrupt for event RESULTDONE"] + #[inline(always)] + #[must_use] + pub fn resultdone(&mut self) -> RESULTDONE_W<3> { + RESULTDONE_W::new(self) + } + #[doc = "Bit 4 - Write '1' to disable interrupt for event CALIBRATEDONE"] + #[inline(always)] + #[must_use] + pub fn calibratedone(&mut self) -> CALIBRATEDONE_W<4> { + CALIBRATEDONE_W::new(self) + } + #[doc = "Bit 5 - Write '1' to disable interrupt for event STOPPED"] + #[inline(always)] + #[must_use] + pub fn stopped(&mut self) -> STOPPED_W<5> { + STOPPED_W::new(self) + } + #[doc = "Bit 6 - Write '1' to disable interrupt for event CH0LIMITH"] + #[inline(always)] + #[must_use] + pub fn ch0limith(&mut self) -> CH0LIMITH_W<6> { + CH0LIMITH_W::new(self) + } + #[doc = "Bit 7 - Write '1' to disable interrupt for event CH0LIMITL"] + #[inline(always)] + #[must_use] + pub fn ch0limitl(&mut self) -> CH0LIMITL_W<7> { + CH0LIMITL_W::new(self) + } + #[doc = "Bit 8 - Write '1' to disable interrupt for event CH1LIMITH"] + #[inline(always)] + #[must_use] + pub fn ch1limith(&mut self) -> CH1LIMITH_W<8> { + CH1LIMITH_W::new(self) + } + #[doc = "Bit 9 - Write '1' to disable interrupt for event CH1LIMITL"] + #[inline(always)] + #[must_use] + pub fn ch1limitl(&mut self) -> CH1LIMITL_W<9> { + CH1LIMITL_W::new(self) + } + #[doc = "Bit 10 - Write '1' to disable interrupt for event CH2LIMITH"] + #[inline(always)] + #[must_use] + pub fn ch2limith(&mut self) -> CH2LIMITH_W<10> { + CH2LIMITH_W::new(self) + } + #[doc = "Bit 11 - Write '1' to disable interrupt for event CH2LIMITL"] + #[inline(always)] + #[must_use] + pub fn ch2limitl(&mut self) -> CH2LIMITL_W<11> { + CH2LIMITL_W::new(self) + } + #[doc = "Bit 12 - Write '1' to disable interrupt for event CH3LIMITH"] + #[inline(always)] + #[must_use] + pub fn ch3limith(&mut self) -> CH3LIMITH_W<12> { + CH3LIMITH_W::new(self) + } + #[doc = "Bit 13 - Write '1' to disable interrupt for event CH3LIMITL"] + #[inline(always)] + #[must_use] + pub fn ch3limitl(&mut self) -> CH3LIMITL_W<13> { + CH3LIMITL_W::new(self) + } + #[doc = "Bit 14 - Write '1' to disable interrupt for event CH4LIMITH"] + #[inline(always)] + #[must_use] + pub fn ch4limith(&mut self) -> CH4LIMITH_W<14> { + CH4LIMITH_W::new(self) + } + #[doc = "Bit 15 - Write '1' to disable interrupt for event CH4LIMITL"] + #[inline(always)] + #[must_use] + pub fn ch4limitl(&mut self) -> CH4LIMITL_W<15> { + CH4LIMITL_W::new(self) + } + #[doc = "Bit 16 - Write '1' to disable interrupt for event CH5LIMITH"] + #[inline(always)] + #[must_use] + pub fn ch5limith(&mut self) -> CH5LIMITH_W<16> { + CH5LIMITH_W::new(self) + } + #[doc = "Bit 17 - Write '1' to disable interrupt for event CH5LIMITL"] + #[inline(always)] + #[must_use] + pub fn ch5limitl(&mut self) -> CH5LIMITL_W<17> { + CH5LIMITL_W::new(self) + } + #[doc = "Bit 18 - Write '1' to disable interrupt for event CH6LIMITH"] + #[inline(always)] + #[must_use] + pub fn ch6limith(&mut self) -> CH6LIMITH_W<18> { + CH6LIMITH_W::new(self) + } + #[doc = "Bit 19 - Write '1' to disable interrupt for event CH6LIMITL"] + #[inline(always)] + #[must_use] + pub fn ch6limitl(&mut self) -> CH6LIMITL_W<19> { + CH6LIMITL_W::new(self) + } + #[doc = "Bit 20 - Write '1' to disable interrupt for event CH7LIMITH"] + #[inline(always)] + #[must_use] + pub fn ch7limith(&mut self) -> CH7LIMITH_W<20> { + CH7LIMITH_W::new(self) + } + #[doc = "Bit 21 - Write '1' to disable interrupt for event CH7LIMITL"] + #[inline(always)] + #[must_use] + pub fn ch7limitl(&mut self) -> CH7LIMITL_W<21> { + CH7LIMITL_W::new(self) + } + #[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 = "Disable interrupt\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 [intenclr](index.html) module"] +pub struct INTENCLR_SPEC; +impl crate::RegisterSpec for INTENCLR_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [intenclr::R](R) reader structure"] +impl crate::Readable for INTENCLR_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [intenclr::W](W) writer structure"] +impl crate::Writable for INTENCLR_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets INTENCLR to value 0"] +impl crate::Resettable for INTENCLR_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/saadc/intenset.rs b/down-the-stack/dk_pac/src/saadc/intenset.rs new file mode 100644 index 0000000..a415f27 --- /dev/null +++ b/down-the-stack/dk_pac/src/saadc/intenset.rs @@ -0,0 +1,1562 @@ +#[doc = "Register `INTENSET` 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 `INTENSET` 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 `STARTED` reader - Write '1' to enable interrupt for event STARTED"] +pub type STARTED_R = crate::BitReader; +#[doc = "Write '1' to enable interrupt for event STARTED\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum STARTED_A { + #[doc = "0: Read: Disabled"] + DISABLED = 0, + #[doc = "1: Read: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: STARTED_A) -> Self { + variant as u8 != 0 + } +} +impl STARTED_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> STARTED_A { + match self.bits { + false => STARTED_A::DISABLED, + true => STARTED_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == STARTED_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == STARTED_A::ENABLED + } +} +#[doc = "Write '1' to enable interrupt for event STARTED\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum STARTED_AW { + #[doc = "1: Enable"] + SET = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: STARTED_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `STARTED` writer - Write '1' to enable interrupt for event STARTED"] +pub type STARTED_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENSET_SPEC, STARTED_AW, O>; +impl<'a, const O: u8> STARTED_W<'a, O> { + #[doc = "Enable"] + #[inline(always)] + pub fn set(self) -> &'a mut W { + self.variant(STARTED_AW::SET) + } +} +#[doc = "Field `END` reader - Write '1' to enable interrupt for event END"] +pub type END_R = crate::BitReader; +#[doc = "Write '1' to enable interrupt for event END\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum END_A { + #[doc = "0: Read: Disabled"] + DISABLED = 0, + #[doc = "1: Read: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: END_A) -> Self { + variant as u8 != 0 + } +} +impl END_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> END_A { + match self.bits { + false => END_A::DISABLED, + true => END_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == END_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == END_A::ENABLED + } +} +#[doc = "Write '1' to enable interrupt for event END\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum END_AW { + #[doc = "1: Enable"] + SET = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: END_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `END` writer - Write '1' to enable interrupt for event END"] +pub type END_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENSET_SPEC, END_AW, O>; +impl<'a, const O: u8> END_W<'a, O> { + #[doc = "Enable"] + #[inline(always)] + pub fn set(self) -> &'a mut W { + self.variant(END_AW::SET) + } +} +#[doc = "Field `DONE` reader - Write '1' to enable interrupt for event DONE"] +pub type DONE_R = crate::BitReader; +#[doc = "Write '1' to enable interrupt for event DONE\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum DONE_A { + #[doc = "0: Read: Disabled"] + DISABLED = 0, + #[doc = "1: Read: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: DONE_A) -> Self { + variant as u8 != 0 + } +} +impl DONE_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> DONE_A { + match self.bits { + false => DONE_A::DISABLED, + true => DONE_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == DONE_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == DONE_A::ENABLED + } +} +#[doc = "Write '1' to enable interrupt for event DONE\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum DONE_AW { + #[doc = "1: Enable"] + SET = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: DONE_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `DONE` writer - Write '1' to enable interrupt for event DONE"] +pub type DONE_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENSET_SPEC, DONE_AW, O>; +impl<'a, const O: u8> DONE_W<'a, O> { + #[doc = "Enable"] + #[inline(always)] + pub fn set(self) -> &'a mut W { + self.variant(DONE_AW::SET) + } +} +#[doc = "Field `RESULTDONE` reader - Write '1' to enable interrupt for event RESULTDONE"] +pub type RESULTDONE_R = crate::BitReader; +#[doc = "Write '1' to enable interrupt for event RESULTDONE\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum RESULTDONE_A { + #[doc = "0: Read: Disabled"] + DISABLED = 0, + #[doc = "1: Read: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: RESULTDONE_A) -> Self { + variant as u8 != 0 + } +} +impl RESULTDONE_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> RESULTDONE_A { + match self.bits { + false => RESULTDONE_A::DISABLED, + true => RESULTDONE_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == RESULTDONE_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == RESULTDONE_A::ENABLED + } +} +#[doc = "Write '1' to enable interrupt for event RESULTDONE\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum RESULTDONE_AW { + #[doc = "1: Enable"] + SET = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: RESULTDONE_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `RESULTDONE` writer - Write '1' to enable interrupt for event RESULTDONE"] +pub type RESULTDONE_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENSET_SPEC, RESULTDONE_AW, O>; +impl<'a, const O: u8> RESULTDONE_W<'a, O> { + #[doc = "Enable"] + #[inline(always)] + pub fn set(self) -> &'a mut W { + self.variant(RESULTDONE_AW::SET) + } +} +#[doc = "Field `CALIBRATEDONE` reader - Write '1' to enable interrupt for event CALIBRATEDONE"] +pub type CALIBRATEDONE_R = crate::BitReader; +#[doc = "Write '1' to enable interrupt for event CALIBRATEDONE\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum CALIBRATEDONE_A { + #[doc = "0: Read: Disabled"] + DISABLED = 0, + #[doc = "1: Read: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: CALIBRATEDONE_A) -> Self { + variant as u8 != 0 + } +} +impl CALIBRATEDONE_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> CALIBRATEDONE_A { + match self.bits { + false => CALIBRATEDONE_A::DISABLED, + true => CALIBRATEDONE_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == CALIBRATEDONE_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == CALIBRATEDONE_A::ENABLED + } +} +#[doc = "Write '1' to enable interrupt for event CALIBRATEDONE\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum CALIBRATEDONE_AW { + #[doc = "1: Enable"] + SET = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: CALIBRATEDONE_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `CALIBRATEDONE` writer - Write '1' to enable interrupt for event CALIBRATEDONE"] +pub type CALIBRATEDONE_W<'a, const O: u8> = + crate::BitWriter<'a, u32, INTENSET_SPEC, CALIBRATEDONE_AW, O>; +impl<'a, const O: u8> CALIBRATEDONE_W<'a, O> { + #[doc = "Enable"] + #[inline(always)] + pub fn set(self) -> &'a mut W { + self.variant(CALIBRATEDONE_AW::SET) + } +} +#[doc = "Field `STOPPED` reader - Write '1' to enable interrupt for event STOPPED"] +pub type STOPPED_R = crate::BitReader; +#[doc = "Write '1' to enable interrupt for event STOPPED\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum STOPPED_A { + #[doc = "0: Read: Disabled"] + DISABLED = 0, + #[doc = "1: Read: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: STOPPED_A) -> Self { + variant as u8 != 0 + } +} +impl STOPPED_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> STOPPED_A { + match self.bits { + false => STOPPED_A::DISABLED, + true => STOPPED_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == STOPPED_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == STOPPED_A::ENABLED + } +} +#[doc = "Write '1' to enable interrupt for event STOPPED\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum STOPPED_AW { + #[doc = "1: Enable"] + SET = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: STOPPED_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `STOPPED` writer - Write '1' to enable interrupt for event STOPPED"] +pub type STOPPED_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENSET_SPEC, STOPPED_AW, O>; +impl<'a, const O: u8> STOPPED_W<'a, O> { + #[doc = "Enable"] + #[inline(always)] + pub fn set(self) -> &'a mut W { + self.variant(STOPPED_AW::SET) + } +} +#[doc = "Field `CH0LIMITH` reader - Write '1' to enable interrupt for event CH0LIMITH"] +pub type CH0LIMITH_R = crate::BitReader; +#[doc = "Write '1' to enable interrupt for event CH0LIMITH\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum CH0LIMITH_A { + #[doc = "0: Read: Disabled"] + DISABLED = 0, + #[doc = "1: Read: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: CH0LIMITH_A) -> Self { + variant as u8 != 0 + } +} +impl CH0LIMITH_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> CH0LIMITH_A { + match self.bits { + false => CH0LIMITH_A::DISABLED, + true => CH0LIMITH_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == CH0LIMITH_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == CH0LIMITH_A::ENABLED + } +} +#[doc = "Write '1' to enable interrupt for event CH0LIMITH\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum CH0LIMITH_AW { + #[doc = "1: Enable"] + SET = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: CH0LIMITH_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `CH0LIMITH` writer - Write '1' to enable interrupt for event CH0LIMITH"] +pub type CH0LIMITH_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENSET_SPEC, CH0LIMITH_AW, O>; +impl<'a, const O: u8> CH0LIMITH_W<'a, O> { + #[doc = "Enable"] + #[inline(always)] + pub fn set(self) -> &'a mut W { + self.variant(CH0LIMITH_AW::SET) + } +} +#[doc = "Field `CH0LIMITL` reader - Write '1' to enable interrupt for event CH0LIMITL"] +pub type CH0LIMITL_R = crate::BitReader; +#[doc = "Write '1' to enable interrupt for event CH0LIMITL\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum CH0LIMITL_A { + #[doc = "0: Read: Disabled"] + DISABLED = 0, + #[doc = "1: Read: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: CH0LIMITL_A) -> Self { + variant as u8 != 0 + } +} +impl CH0LIMITL_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> CH0LIMITL_A { + match self.bits { + false => CH0LIMITL_A::DISABLED, + true => CH0LIMITL_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == CH0LIMITL_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == CH0LIMITL_A::ENABLED + } +} +#[doc = "Write '1' to enable interrupt for event CH0LIMITL\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum CH0LIMITL_AW { + #[doc = "1: Enable"] + SET = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: CH0LIMITL_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `CH0LIMITL` writer - Write '1' to enable interrupt for event CH0LIMITL"] +pub type CH0LIMITL_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENSET_SPEC, CH0LIMITL_AW, O>; +impl<'a, const O: u8> CH0LIMITL_W<'a, O> { + #[doc = "Enable"] + #[inline(always)] + pub fn set(self) -> &'a mut W { + self.variant(CH0LIMITL_AW::SET) + } +} +#[doc = "Field `CH1LIMITH` reader - Write '1' to enable interrupt for event CH1LIMITH"] +pub type CH1LIMITH_R = crate::BitReader; +#[doc = "Write '1' to enable interrupt for event CH1LIMITH\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum CH1LIMITH_A { + #[doc = "0: Read: Disabled"] + DISABLED = 0, + #[doc = "1: Read: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: CH1LIMITH_A) -> Self { + variant as u8 != 0 + } +} +impl CH1LIMITH_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> CH1LIMITH_A { + match self.bits { + false => CH1LIMITH_A::DISABLED, + true => CH1LIMITH_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == CH1LIMITH_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == CH1LIMITH_A::ENABLED + } +} +#[doc = "Write '1' to enable interrupt for event CH1LIMITH\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum CH1LIMITH_AW { + #[doc = "1: Enable"] + SET = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: CH1LIMITH_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `CH1LIMITH` writer - Write '1' to enable interrupt for event CH1LIMITH"] +pub type CH1LIMITH_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENSET_SPEC, CH1LIMITH_AW, O>; +impl<'a, const O: u8> CH1LIMITH_W<'a, O> { + #[doc = "Enable"] + #[inline(always)] + pub fn set(self) -> &'a mut W { + self.variant(CH1LIMITH_AW::SET) + } +} +#[doc = "Field `CH1LIMITL` reader - Write '1' to enable interrupt for event CH1LIMITL"] +pub type CH1LIMITL_R = crate::BitReader; +#[doc = "Write '1' to enable interrupt for event CH1LIMITL\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum CH1LIMITL_A { + #[doc = "0: Read: Disabled"] + DISABLED = 0, + #[doc = "1: Read: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: CH1LIMITL_A) -> Self { + variant as u8 != 0 + } +} +impl CH1LIMITL_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> CH1LIMITL_A { + match self.bits { + false => CH1LIMITL_A::DISABLED, + true => CH1LIMITL_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == CH1LIMITL_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == CH1LIMITL_A::ENABLED + } +} +#[doc = "Write '1' to enable interrupt for event CH1LIMITL\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum CH1LIMITL_AW { + #[doc = "1: Enable"] + SET = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: CH1LIMITL_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `CH1LIMITL` writer - Write '1' to enable interrupt for event CH1LIMITL"] +pub type CH1LIMITL_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENSET_SPEC, CH1LIMITL_AW, O>; +impl<'a, const O: u8> CH1LIMITL_W<'a, O> { + #[doc = "Enable"] + #[inline(always)] + pub fn set(self) -> &'a mut W { + self.variant(CH1LIMITL_AW::SET) + } +} +#[doc = "Field `CH2LIMITH` reader - Write '1' to enable interrupt for event CH2LIMITH"] +pub type CH2LIMITH_R = crate::BitReader; +#[doc = "Write '1' to enable interrupt for event CH2LIMITH\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum CH2LIMITH_A { + #[doc = "0: Read: Disabled"] + DISABLED = 0, + #[doc = "1: Read: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: CH2LIMITH_A) -> Self { + variant as u8 != 0 + } +} +impl CH2LIMITH_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> CH2LIMITH_A { + match self.bits { + false => CH2LIMITH_A::DISABLED, + true => CH2LIMITH_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == CH2LIMITH_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == CH2LIMITH_A::ENABLED + } +} +#[doc = "Write '1' to enable interrupt for event CH2LIMITH\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum CH2LIMITH_AW { + #[doc = "1: Enable"] + SET = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: CH2LIMITH_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `CH2LIMITH` writer - Write '1' to enable interrupt for event CH2LIMITH"] +pub type CH2LIMITH_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENSET_SPEC, CH2LIMITH_AW, O>; +impl<'a, const O: u8> CH2LIMITH_W<'a, O> { + #[doc = "Enable"] + #[inline(always)] + pub fn set(self) -> &'a mut W { + self.variant(CH2LIMITH_AW::SET) + } +} +#[doc = "Field `CH2LIMITL` reader - Write '1' to enable interrupt for event CH2LIMITL"] +pub type CH2LIMITL_R = crate::BitReader; +#[doc = "Write '1' to enable interrupt for event CH2LIMITL\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum CH2LIMITL_A { + #[doc = "0: Read: Disabled"] + DISABLED = 0, + #[doc = "1: Read: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: CH2LIMITL_A) -> Self { + variant as u8 != 0 + } +} +impl CH2LIMITL_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> CH2LIMITL_A { + match self.bits { + false => CH2LIMITL_A::DISABLED, + true => CH2LIMITL_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == CH2LIMITL_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == CH2LIMITL_A::ENABLED + } +} +#[doc = "Write '1' to enable interrupt for event CH2LIMITL\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum CH2LIMITL_AW { + #[doc = "1: Enable"] + SET = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: CH2LIMITL_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `CH2LIMITL` writer - Write '1' to enable interrupt for event CH2LIMITL"] +pub type CH2LIMITL_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENSET_SPEC, CH2LIMITL_AW, O>; +impl<'a, const O: u8> CH2LIMITL_W<'a, O> { + #[doc = "Enable"] + #[inline(always)] + pub fn set(self) -> &'a mut W { + self.variant(CH2LIMITL_AW::SET) + } +} +#[doc = "Field `CH3LIMITH` reader - Write '1' to enable interrupt for event CH3LIMITH"] +pub type CH3LIMITH_R = crate::BitReader; +#[doc = "Write '1' to enable interrupt for event CH3LIMITH\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum CH3LIMITH_A { + #[doc = "0: Read: Disabled"] + DISABLED = 0, + #[doc = "1: Read: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: CH3LIMITH_A) -> Self { + variant as u8 != 0 + } +} +impl CH3LIMITH_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> CH3LIMITH_A { + match self.bits { + false => CH3LIMITH_A::DISABLED, + true => CH3LIMITH_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == CH3LIMITH_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == CH3LIMITH_A::ENABLED + } +} +#[doc = "Write '1' to enable interrupt for event CH3LIMITH\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum CH3LIMITH_AW { + #[doc = "1: Enable"] + SET = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: CH3LIMITH_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `CH3LIMITH` writer - Write '1' to enable interrupt for event CH3LIMITH"] +pub type CH3LIMITH_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENSET_SPEC, CH3LIMITH_AW, O>; +impl<'a, const O: u8> CH3LIMITH_W<'a, O> { + #[doc = "Enable"] + #[inline(always)] + pub fn set(self) -> &'a mut W { + self.variant(CH3LIMITH_AW::SET) + } +} +#[doc = "Field `CH3LIMITL` reader - Write '1' to enable interrupt for event CH3LIMITL"] +pub type CH3LIMITL_R = crate::BitReader; +#[doc = "Write '1' to enable interrupt for event CH3LIMITL\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum CH3LIMITL_A { + #[doc = "0: Read: Disabled"] + DISABLED = 0, + #[doc = "1: Read: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: CH3LIMITL_A) -> Self { + variant as u8 != 0 + } +} +impl CH3LIMITL_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> CH3LIMITL_A { + match self.bits { + false => CH3LIMITL_A::DISABLED, + true => CH3LIMITL_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == CH3LIMITL_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == CH3LIMITL_A::ENABLED + } +} +#[doc = "Write '1' to enable interrupt for event CH3LIMITL\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum CH3LIMITL_AW { + #[doc = "1: Enable"] + SET = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: CH3LIMITL_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `CH3LIMITL` writer - Write '1' to enable interrupt for event CH3LIMITL"] +pub type CH3LIMITL_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENSET_SPEC, CH3LIMITL_AW, O>; +impl<'a, const O: u8> CH3LIMITL_W<'a, O> { + #[doc = "Enable"] + #[inline(always)] + pub fn set(self) -> &'a mut W { + self.variant(CH3LIMITL_AW::SET) + } +} +#[doc = "Field `CH4LIMITH` reader - Write '1' to enable interrupt for event CH4LIMITH"] +pub type CH4LIMITH_R = crate::BitReader; +#[doc = "Write '1' to enable interrupt for event CH4LIMITH\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum CH4LIMITH_A { + #[doc = "0: Read: Disabled"] + DISABLED = 0, + #[doc = "1: Read: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: CH4LIMITH_A) -> Self { + variant as u8 != 0 + } +} +impl CH4LIMITH_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> CH4LIMITH_A { + match self.bits { + false => CH4LIMITH_A::DISABLED, + true => CH4LIMITH_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == CH4LIMITH_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == CH4LIMITH_A::ENABLED + } +} +#[doc = "Write '1' to enable interrupt for event CH4LIMITH\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum CH4LIMITH_AW { + #[doc = "1: Enable"] + SET = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: CH4LIMITH_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `CH4LIMITH` writer - Write '1' to enable interrupt for event CH4LIMITH"] +pub type CH4LIMITH_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENSET_SPEC, CH4LIMITH_AW, O>; +impl<'a, const O: u8> CH4LIMITH_W<'a, O> { + #[doc = "Enable"] + #[inline(always)] + pub fn set(self) -> &'a mut W { + self.variant(CH4LIMITH_AW::SET) + } +} +#[doc = "Field `CH4LIMITL` reader - Write '1' to enable interrupt for event CH4LIMITL"] +pub type CH4LIMITL_R = crate::BitReader; +#[doc = "Write '1' to enable interrupt for event CH4LIMITL\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum CH4LIMITL_A { + #[doc = "0: Read: Disabled"] + DISABLED = 0, + #[doc = "1: Read: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: CH4LIMITL_A) -> Self { + variant as u8 != 0 + } +} +impl CH4LIMITL_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> CH4LIMITL_A { + match self.bits { + false => CH4LIMITL_A::DISABLED, + true => CH4LIMITL_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == CH4LIMITL_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == CH4LIMITL_A::ENABLED + } +} +#[doc = "Write '1' to enable interrupt for event CH4LIMITL\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum CH4LIMITL_AW { + #[doc = "1: Enable"] + SET = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: CH4LIMITL_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `CH4LIMITL` writer - Write '1' to enable interrupt for event CH4LIMITL"] +pub type CH4LIMITL_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENSET_SPEC, CH4LIMITL_AW, O>; +impl<'a, const O: u8> CH4LIMITL_W<'a, O> { + #[doc = "Enable"] + #[inline(always)] + pub fn set(self) -> &'a mut W { + self.variant(CH4LIMITL_AW::SET) + } +} +#[doc = "Field `CH5LIMITH` reader - Write '1' to enable interrupt for event CH5LIMITH"] +pub type CH5LIMITH_R = crate::BitReader; +#[doc = "Write '1' to enable interrupt for event CH5LIMITH\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum CH5LIMITH_A { + #[doc = "0: Read: Disabled"] + DISABLED = 0, + #[doc = "1: Read: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: CH5LIMITH_A) -> Self { + variant as u8 != 0 + } +} +impl CH5LIMITH_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> CH5LIMITH_A { + match self.bits { + false => CH5LIMITH_A::DISABLED, + true => CH5LIMITH_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == CH5LIMITH_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == CH5LIMITH_A::ENABLED + } +} +#[doc = "Write '1' to enable interrupt for event CH5LIMITH\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum CH5LIMITH_AW { + #[doc = "1: Enable"] + SET = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: CH5LIMITH_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `CH5LIMITH` writer - Write '1' to enable interrupt for event CH5LIMITH"] +pub type CH5LIMITH_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENSET_SPEC, CH5LIMITH_AW, O>; +impl<'a, const O: u8> CH5LIMITH_W<'a, O> { + #[doc = "Enable"] + #[inline(always)] + pub fn set(self) -> &'a mut W { + self.variant(CH5LIMITH_AW::SET) + } +} +#[doc = "Field `CH5LIMITL` reader - Write '1' to enable interrupt for event CH5LIMITL"] +pub type CH5LIMITL_R = crate::BitReader; +#[doc = "Write '1' to enable interrupt for event CH5LIMITL\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum CH5LIMITL_A { + #[doc = "0: Read: Disabled"] + DISABLED = 0, + #[doc = "1: Read: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: CH5LIMITL_A) -> Self { + variant as u8 != 0 + } +} +impl CH5LIMITL_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> CH5LIMITL_A { + match self.bits { + false => CH5LIMITL_A::DISABLED, + true => CH5LIMITL_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == CH5LIMITL_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == CH5LIMITL_A::ENABLED + } +} +#[doc = "Write '1' to enable interrupt for event CH5LIMITL\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum CH5LIMITL_AW { + #[doc = "1: Enable"] + SET = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: CH5LIMITL_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `CH5LIMITL` writer - Write '1' to enable interrupt for event CH5LIMITL"] +pub type CH5LIMITL_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENSET_SPEC, CH5LIMITL_AW, O>; +impl<'a, const O: u8> CH5LIMITL_W<'a, O> { + #[doc = "Enable"] + #[inline(always)] + pub fn set(self) -> &'a mut W { + self.variant(CH5LIMITL_AW::SET) + } +} +#[doc = "Field `CH6LIMITH` reader - Write '1' to enable interrupt for event CH6LIMITH"] +pub type CH6LIMITH_R = crate::BitReader; +#[doc = "Write '1' to enable interrupt for event CH6LIMITH\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum CH6LIMITH_A { + #[doc = "0: Read: Disabled"] + DISABLED = 0, + #[doc = "1: Read: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: CH6LIMITH_A) -> Self { + variant as u8 != 0 + } +} +impl CH6LIMITH_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> CH6LIMITH_A { + match self.bits { + false => CH6LIMITH_A::DISABLED, + true => CH6LIMITH_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == CH6LIMITH_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == CH6LIMITH_A::ENABLED + } +} +#[doc = "Write '1' to enable interrupt for event CH6LIMITH\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum CH6LIMITH_AW { + #[doc = "1: Enable"] + SET = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: CH6LIMITH_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `CH6LIMITH` writer - Write '1' to enable interrupt for event CH6LIMITH"] +pub type CH6LIMITH_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENSET_SPEC, CH6LIMITH_AW, O>; +impl<'a, const O: u8> CH6LIMITH_W<'a, O> { + #[doc = "Enable"] + #[inline(always)] + pub fn set(self) -> &'a mut W { + self.variant(CH6LIMITH_AW::SET) + } +} +#[doc = "Field `CH6LIMITL` reader - Write '1' to enable interrupt for event CH6LIMITL"] +pub type CH6LIMITL_R = crate::BitReader; +#[doc = "Write '1' to enable interrupt for event CH6LIMITL\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum CH6LIMITL_A { + #[doc = "0: Read: Disabled"] + DISABLED = 0, + #[doc = "1: Read: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: CH6LIMITL_A) -> Self { + variant as u8 != 0 + } +} +impl CH6LIMITL_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> CH6LIMITL_A { + match self.bits { + false => CH6LIMITL_A::DISABLED, + true => CH6LIMITL_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == CH6LIMITL_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == CH6LIMITL_A::ENABLED + } +} +#[doc = "Write '1' to enable interrupt for event CH6LIMITL\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum CH6LIMITL_AW { + #[doc = "1: Enable"] + SET = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: CH6LIMITL_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `CH6LIMITL` writer - Write '1' to enable interrupt for event CH6LIMITL"] +pub type CH6LIMITL_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENSET_SPEC, CH6LIMITL_AW, O>; +impl<'a, const O: u8> CH6LIMITL_W<'a, O> { + #[doc = "Enable"] + #[inline(always)] + pub fn set(self) -> &'a mut W { + self.variant(CH6LIMITL_AW::SET) + } +} +#[doc = "Field `CH7LIMITH` reader - Write '1' to enable interrupt for event CH7LIMITH"] +pub type CH7LIMITH_R = crate::BitReader; +#[doc = "Write '1' to enable interrupt for event CH7LIMITH\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum CH7LIMITH_A { + #[doc = "0: Read: Disabled"] + DISABLED = 0, + #[doc = "1: Read: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: CH7LIMITH_A) -> Self { + variant as u8 != 0 + } +} +impl CH7LIMITH_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> CH7LIMITH_A { + match self.bits { + false => CH7LIMITH_A::DISABLED, + true => CH7LIMITH_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == CH7LIMITH_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == CH7LIMITH_A::ENABLED + } +} +#[doc = "Write '1' to enable interrupt for event CH7LIMITH\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum CH7LIMITH_AW { + #[doc = "1: Enable"] + SET = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: CH7LIMITH_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `CH7LIMITH` writer - Write '1' to enable interrupt for event CH7LIMITH"] +pub type CH7LIMITH_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENSET_SPEC, CH7LIMITH_AW, O>; +impl<'a, const O: u8> CH7LIMITH_W<'a, O> { + #[doc = "Enable"] + #[inline(always)] + pub fn set(self) -> &'a mut W { + self.variant(CH7LIMITH_AW::SET) + } +} +#[doc = "Field `CH7LIMITL` reader - Write '1' to enable interrupt for event CH7LIMITL"] +pub type CH7LIMITL_R = crate::BitReader; +#[doc = "Write '1' to enable interrupt for event CH7LIMITL\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum CH7LIMITL_A { + #[doc = "0: Read: Disabled"] + DISABLED = 0, + #[doc = "1: Read: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: CH7LIMITL_A) -> Self { + variant as u8 != 0 + } +} +impl CH7LIMITL_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> CH7LIMITL_A { + match self.bits { + false => CH7LIMITL_A::DISABLED, + true => CH7LIMITL_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == CH7LIMITL_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == CH7LIMITL_A::ENABLED + } +} +#[doc = "Write '1' to enable interrupt for event CH7LIMITL\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum CH7LIMITL_AW { + #[doc = "1: Enable"] + SET = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: CH7LIMITL_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `CH7LIMITL` writer - Write '1' to enable interrupt for event CH7LIMITL"] +pub type CH7LIMITL_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENSET_SPEC, CH7LIMITL_AW, O>; +impl<'a, const O: u8> CH7LIMITL_W<'a, O> { + #[doc = "Enable"] + #[inline(always)] + pub fn set(self) -> &'a mut W { + self.variant(CH7LIMITL_AW::SET) + } +} +impl R { + #[doc = "Bit 0 - Write '1' to enable interrupt for event STARTED"] + #[inline(always)] + pub fn started(&self) -> STARTED_R { + STARTED_R::new((self.bits & 1) != 0) + } + #[doc = "Bit 1 - Write '1' to enable interrupt for event END"] + #[inline(always)] + pub fn end(&self) -> END_R { + END_R::new(((self.bits >> 1) & 1) != 0) + } + #[doc = "Bit 2 - Write '1' to enable interrupt for event DONE"] + #[inline(always)] + pub fn done(&self) -> DONE_R { + DONE_R::new(((self.bits >> 2) & 1) != 0) + } + #[doc = "Bit 3 - Write '1' to enable interrupt for event RESULTDONE"] + #[inline(always)] + pub fn resultdone(&self) -> RESULTDONE_R { + RESULTDONE_R::new(((self.bits >> 3) & 1) != 0) + } + #[doc = "Bit 4 - Write '1' to enable interrupt for event CALIBRATEDONE"] + #[inline(always)] + pub fn calibratedone(&self) -> CALIBRATEDONE_R { + CALIBRATEDONE_R::new(((self.bits >> 4) & 1) != 0) + } + #[doc = "Bit 5 - Write '1' to enable interrupt for event STOPPED"] + #[inline(always)] + pub fn stopped(&self) -> STOPPED_R { + STOPPED_R::new(((self.bits >> 5) & 1) != 0) + } + #[doc = "Bit 6 - Write '1' to enable interrupt for event CH0LIMITH"] + #[inline(always)] + pub fn ch0limith(&self) -> CH0LIMITH_R { + CH0LIMITH_R::new(((self.bits >> 6) & 1) != 0) + } + #[doc = "Bit 7 - Write '1' to enable interrupt for event CH0LIMITL"] + #[inline(always)] + pub fn ch0limitl(&self) -> CH0LIMITL_R { + CH0LIMITL_R::new(((self.bits >> 7) & 1) != 0) + } + #[doc = "Bit 8 - Write '1' to enable interrupt for event CH1LIMITH"] + #[inline(always)] + pub fn ch1limith(&self) -> CH1LIMITH_R { + CH1LIMITH_R::new(((self.bits >> 8) & 1) != 0) + } + #[doc = "Bit 9 - Write '1' to enable interrupt for event CH1LIMITL"] + #[inline(always)] + pub fn ch1limitl(&self) -> CH1LIMITL_R { + CH1LIMITL_R::new(((self.bits >> 9) & 1) != 0) + } + #[doc = "Bit 10 - Write '1' to enable interrupt for event CH2LIMITH"] + #[inline(always)] + pub fn ch2limith(&self) -> CH2LIMITH_R { + CH2LIMITH_R::new(((self.bits >> 10) & 1) != 0) + } + #[doc = "Bit 11 - Write '1' to enable interrupt for event CH2LIMITL"] + #[inline(always)] + pub fn ch2limitl(&self) -> CH2LIMITL_R { + CH2LIMITL_R::new(((self.bits >> 11) & 1) != 0) + } + #[doc = "Bit 12 - Write '1' to enable interrupt for event CH3LIMITH"] + #[inline(always)] + pub fn ch3limith(&self) -> CH3LIMITH_R { + CH3LIMITH_R::new(((self.bits >> 12) & 1) != 0) + } + #[doc = "Bit 13 - Write '1' to enable interrupt for event CH3LIMITL"] + #[inline(always)] + pub fn ch3limitl(&self) -> CH3LIMITL_R { + CH3LIMITL_R::new(((self.bits >> 13) & 1) != 0) + } + #[doc = "Bit 14 - Write '1' to enable interrupt for event CH4LIMITH"] + #[inline(always)] + pub fn ch4limith(&self) -> CH4LIMITH_R { + CH4LIMITH_R::new(((self.bits >> 14) & 1) != 0) + } + #[doc = "Bit 15 - Write '1' to enable interrupt for event CH4LIMITL"] + #[inline(always)] + pub fn ch4limitl(&self) -> CH4LIMITL_R { + CH4LIMITL_R::new(((self.bits >> 15) & 1) != 0) + } + #[doc = "Bit 16 - Write '1' to enable interrupt for event CH5LIMITH"] + #[inline(always)] + pub fn ch5limith(&self) -> CH5LIMITH_R { + CH5LIMITH_R::new(((self.bits >> 16) & 1) != 0) + } + #[doc = "Bit 17 - Write '1' to enable interrupt for event CH5LIMITL"] + #[inline(always)] + pub fn ch5limitl(&self) -> CH5LIMITL_R { + CH5LIMITL_R::new(((self.bits >> 17) & 1) != 0) + } + #[doc = "Bit 18 - Write '1' to enable interrupt for event CH6LIMITH"] + #[inline(always)] + pub fn ch6limith(&self) -> CH6LIMITH_R { + CH6LIMITH_R::new(((self.bits >> 18) & 1) != 0) + } + #[doc = "Bit 19 - Write '1' to enable interrupt for event CH6LIMITL"] + #[inline(always)] + pub fn ch6limitl(&self) -> CH6LIMITL_R { + CH6LIMITL_R::new(((self.bits >> 19) & 1) != 0) + } + #[doc = "Bit 20 - Write '1' to enable interrupt for event CH7LIMITH"] + #[inline(always)] + pub fn ch7limith(&self) -> CH7LIMITH_R { + CH7LIMITH_R::new(((self.bits >> 20) & 1) != 0) + } + #[doc = "Bit 21 - Write '1' to enable interrupt for event CH7LIMITL"] + #[inline(always)] + pub fn ch7limitl(&self) -> CH7LIMITL_R { + CH7LIMITL_R::new(((self.bits >> 21) & 1) != 0) + } +} +impl W { + #[doc = "Bit 0 - Write '1' to enable interrupt for event STARTED"] + #[inline(always)] + #[must_use] + pub fn started(&mut self) -> STARTED_W<0> { + STARTED_W::new(self) + } + #[doc = "Bit 1 - Write '1' to enable interrupt for event END"] + #[inline(always)] + #[must_use] + pub fn end(&mut self) -> END_W<1> { + END_W::new(self) + } + #[doc = "Bit 2 - Write '1' to enable interrupt for event DONE"] + #[inline(always)] + #[must_use] + pub fn done(&mut self) -> DONE_W<2> { + DONE_W::new(self) + } + #[doc = "Bit 3 - Write '1' to enable interrupt for event RESULTDONE"] + #[inline(always)] + #[must_use] + pub fn resultdone(&mut self) -> RESULTDONE_W<3> { + RESULTDONE_W::new(self) + } + #[doc = "Bit 4 - Write '1' to enable interrupt for event CALIBRATEDONE"] + #[inline(always)] + #[must_use] + pub fn calibratedone(&mut self) -> CALIBRATEDONE_W<4> { + CALIBRATEDONE_W::new(self) + } + #[doc = "Bit 5 - Write '1' to enable interrupt for event STOPPED"] + #[inline(always)] + #[must_use] + pub fn stopped(&mut self) -> STOPPED_W<5> { + STOPPED_W::new(self) + } + #[doc = "Bit 6 - Write '1' to enable interrupt for event CH0LIMITH"] + #[inline(always)] + #[must_use] + pub fn ch0limith(&mut self) -> CH0LIMITH_W<6> { + CH0LIMITH_W::new(self) + } + #[doc = "Bit 7 - Write '1' to enable interrupt for event CH0LIMITL"] + #[inline(always)] + #[must_use] + pub fn ch0limitl(&mut self) -> CH0LIMITL_W<7> { + CH0LIMITL_W::new(self) + } + #[doc = "Bit 8 - Write '1' to enable interrupt for event CH1LIMITH"] + #[inline(always)] + #[must_use] + pub fn ch1limith(&mut self) -> CH1LIMITH_W<8> { + CH1LIMITH_W::new(self) + } + #[doc = "Bit 9 - Write '1' to enable interrupt for event CH1LIMITL"] + #[inline(always)] + #[must_use] + pub fn ch1limitl(&mut self) -> CH1LIMITL_W<9> { + CH1LIMITL_W::new(self) + } + #[doc = "Bit 10 - Write '1' to enable interrupt for event CH2LIMITH"] + #[inline(always)] + #[must_use] + pub fn ch2limith(&mut self) -> CH2LIMITH_W<10> { + CH2LIMITH_W::new(self) + } + #[doc = "Bit 11 - Write '1' to enable interrupt for event CH2LIMITL"] + #[inline(always)] + #[must_use] + pub fn ch2limitl(&mut self) -> CH2LIMITL_W<11> { + CH2LIMITL_W::new(self) + } + #[doc = "Bit 12 - Write '1' to enable interrupt for event CH3LIMITH"] + #[inline(always)] + #[must_use] + pub fn ch3limith(&mut self) -> CH3LIMITH_W<12> { + CH3LIMITH_W::new(self) + } + #[doc = "Bit 13 - Write '1' to enable interrupt for event CH3LIMITL"] + #[inline(always)] + #[must_use] + pub fn ch3limitl(&mut self) -> CH3LIMITL_W<13> { + CH3LIMITL_W::new(self) + } + #[doc = "Bit 14 - Write '1' to enable interrupt for event CH4LIMITH"] + #[inline(always)] + #[must_use] + pub fn ch4limith(&mut self) -> CH4LIMITH_W<14> { + CH4LIMITH_W::new(self) + } + #[doc = "Bit 15 - Write '1' to enable interrupt for event CH4LIMITL"] + #[inline(always)] + #[must_use] + pub fn ch4limitl(&mut self) -> CH4LIMITL_W<15> { + CH4LIMITL_W::new(self) + } + #[doc = "Bit 16 - Write '1' to enable interrupt for event CH5LIMITH"] + #[inline(always)] + #[must_use] + pub fn ch5limith(&mut self) -> CH5LIMITH_W<16> { + CH5LIMITH_W::new(self) + } + #[doc = "Bit 17 - Write '1' to enable interrupt for event CH5LIMITL"] + #[inline(always)] + #[must_use] + pub fn ch5limitl(&mut self) -> CH5LIMITL_W<17> { + CH5LIMITL_W::new(self) + } + #[doc = "Bit 18 - Write '1' to enable interrupt for event CH6LIMITH"] + #[inline(always)] + #[must_use] + pub fn ch6limith(&mut self) -> CH6LIMITH_W<18> { + CH6LIMITH_W::new(self) + } + #[doc = "Bit 19 - Write '1' to enable interrupt for event CH6LIMITL"] + #[inline(always)] + #[must_use] + pub fn ch6limitl(&mut self) -> CH6LIMITL_W<19> { + CH6LIMITL_W::new(self) + } + #[doc = "Bit 20 - Write '1' to enable interrupt for event CH7LIMITH"] + #[inline(always)] + #[must_use] + pub fn ch7limith(&mut self) -> CH7LIMITH_W<20> { + CH7LIMITH_W::new(self) + } + #[doc = "Bit 21 - Write '1' to enable interrupt for event CH7LIMITL"] + #[inline(always)] + #[must_use] + pub fn ch7limitl(&mut self) -> CH7LIMITL_W<21> { + CH7LIMITL_W::new(self) + } + #[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 = "Enable interrupt\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 [intenset](index.html) module"] +pub struct INTENSET_SPEC; +impl crate::RegisterSpec for INTENSET_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [intenset::R](R) reader structure"] +impl crate::Readable for INTENSET_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [intenset::W](W) writer structure"] +impl crate::Writable for INTENSET_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets INTENSET to value 0"] +impl crate::Resettable for INTENSET_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/saadc/oversample.rs b/down-the-stack/dk_pac/src/saadc/oversample.rs new file mode 100644 index 0000000..7162dcf --- /dev/null +++ b/down-the-stack/dk_pac/src/saadc/oversample.rs @@ -0,0 +1,220 @@ +#[doc = "Register `OVERSAMPLE` 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 `OVERSAMPLE` 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 `OVERSAMPLE` reader - Oversample control"] +pub type OVERSAMPLE_R = crate::FieldReader; +#[doc = "Oversample control\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +#[repr(u8)] +pub enum OVERSAMPLE_A { + #[doc = "0: Bypass oversampling"] + BYPASS = 0, + #[doc = "1: Oversample 2x"] + OVER2X = 1, + #[doc = "2: Oversample 4x"] + OVER4X = 2, + #[doc = "3: Oversample 8x"] + OVER8X = 3, + #[doc = "4: Oversample 16x"] + OVER16X = 4, + #[doc = "5: Oversample 32x"] + OVER32X = 5, + #[doc = "6: Oversample 64x"] + OVER64X = 6, + #[doc = "7: Oversample 128x"] + OVER128X = 7, + #[doc = "8: Oversample 256x"] + OVER256X = 8, +} +impl From for u8 { + #[inline(always)] + fn from(variant: OVERSAMPLE_A) -> Self { + variant as _ + } +} +impl OVERSAMPLE_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> Option { + match self.bits { + 0 => Some(OVERSAMPLE_A::BYPASS), + 1 => Some(OVERSAMPLE_A::OVER2X), + 2 => Some(OVERSAMPLE_A::OVER4X), + 3 => Some(OVERSAMPLE_A::OVER8X), + 4 => Some(OVERSAMPLE_A::OVER16X), + 5 => Some(OVERSAMPLE_A::OVER32X), + 6 => Some(OVERSAMPLE_A::OVER64X), + 7 => Some(OVERSAMPLE_A::OVER128X), + 8 => Some(OVERSAMPLE_A::OVER256X), + _ => None, + } + } + #[doc = "Checks if the value of the field is `BYPASS`"] + #[inline(always)] + pub fn is_bypass(&self) -> bool { + *self == OVERSAMPLE_A::BYPASS + } + #[doc = "Checks if the value of the field is `OVER2X`"] + #[inline(always)] + pub fn is_over2x(&self) -> bool { + *self == OVERSAMPLE_A::OVER2X + } + #[doc = "Checks if the value of the field is `OVER4X`"] + #[inline(always)] + pub fn is_over4x(&self) -> bool { + *self == OVERSAMPLE_A::OVER4X + } + #[doc = "Checks if the value of the field is `OVER8X`"] + #[inline(always)] + pub fn is_over8x(&self) -> bool { + *self == OVERSAMPLE_A::OVER8X + } + #[doc = "Checks if the value of the field is `OVER16X`"] + #[inline(always)] + pub fn is_over16x(&self) -> bool { + *self == OVERSAMPLE_A::OVER16X + } + #[doc = "Checks if the value of the field is `OVER32X`"] + #[inline(always)] + pub fn is_over32x(&self) -> bool { + *self == OVERSAMPLE_A::OVER32X + } + #[doc = "Checks if the value of the field is `OVER64X`"] + #[inline(always)] + pub fn is_over64x(&self) -> bool { + *self == OVERSAMPLE_A::OVER64X + } + #[doc = "Checks if the value of the field is `OVER128X`"] + #[inline(always)] + pub fn is_over128x(&self) -> bool { + *self == OVERSAMPLE_A::OVER128X + } + #[doc = "Checks if the value of the field is `OVER256X`"] + #[inline(always)] + pub fn is_over256x(&self) -> bool { + *self == OVERSAMPLE_A::OVER256X + } +} +#[doc = "Field `OVERSAMPLE` writer - Oversample control"] +pub type OVERSAMPLE_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, OVERSAMPLE_SPEC, u8, OVERSAMPLE_A, 4, O>; +impl<'a, const O: u8> OVERSAMPLE_W<'a, O> { + #[doc = "Bypass oversampling"] + #[inline(always)] + pub fn bypass(self) -> &'a mut W { + self.variant(OVERSAMPLE_A::BYPASS) + } + #[doc = "Oversample 2x"] + #[inline(always)] + pub fn over2x(self) -> &'a mut W { + self.variant(OVERSAMPLE_A::OVER2X) + } + #[doc = "Oversample 4x"] + #[inline(always)] + pub fn over4x(self) -> &'a mut W { + self.variant(OVERSAMPLE_A::OVER4X) + } + #[doc = "Oversample 8x"] + #[inline(always)] + pub fn over8x(self) -> &'a mut W { + self.variant(OVERSAMPLE_A::OVER8X) + } + #[doc = "Oversample 16x"] + #[inline(always)] + pub fn over16x(self) -> &'a mut W { + self.variant(OVERSAMPLE_A::OVER16X) + } + #[doc = "Oversample 32x"] + #[inline(always)] + pub fn over32x(self) -> &'a mut W { + self.variant(OVERSAMPLE_A::OVER32X) + } + #[doc = "Oversample 64x"] + #[inline(always)] + pub fn over64x(self) -> &'a mut W { + self.variant(OVERSAMPLE_A::OVER64X) + } + #[doc = "Oversample 128x"] + #[inline(always)] + pub fn over128x(self) -> &'a mut W { + self.variant(OVERSAMPLE_A::OVER128X) + } + #[doc = "Oversample 256x"] + #[inline(always)] + pub fn over256x(self) -> &'a mut W { + self.variant(OVERSAMPLE_A::OVER256X) + } +} +impl R { + #[doc = "Bits 0:3 - Oversample control"] + #[inline(always)] + pub fn oversample(&self) -> OVERSAMPLE_R { + OVERSAMPLE_R::new((self.bits & 0x0f) as u8) + } +} +impl W { + #[doc = "Bits 0:3 - Oversample control"] + #[inline(always)] + #[must_use] + pub fn oversample(&mut self) -> OVERSAMPLE_W<0> { + OVERSAMPLE_W::new(self) + } + #[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 = "Oversampling configuration. OVERSAMPLE should not be combined with SCAN. The RESOLUTION is applied before averaging, thus for high OVERSAMPLE a higher RESOLUTION should be used.\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 [oversample](index.html) module"] +pub struct OVERSAMPLE_SPEC; +impl crate::RegisterSpec for OVERSAMPLE_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [oversample::R](R) reader structure"] +impl crate::Readable for OVERSAMPLE_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [oversample::W](W) writer structure"] +impl crate::Writable for OVERSAMPLE_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets OVERSAMPLE to value 0"] +impl crate::Resettable for OVERSAMPLE_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/saadc/resolution.rs b/down-the-stack/dk_pac/src/saadc/resolution.rs new file mode 100644 index 0000000..b811b06 --- /dev/null +++ b/down-the-stack/dk_pac/src/saadc/resolution.rs @@ -0,0 +1,154 @@ +#[doc = "Register `RESOLUTION` 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 `RESOLUTION` 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 `VAL` reader - Set the resolution"] +pub type VAL_R = crate::FieldReader; +#[doc = "Set the resolution\n\nValue on reset: 1"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +#[repr(u8)] +pub enum VAL_A { + #[doc = "0: 8 bit"] + _8BIT = 0, + #[doc = "1: 10 bit"] + _10BIT = 1, + #[doc = "2: 12 bit"] + _12BIT = 2, + #[doc = "3: 14 bit"] + _14BIT = 3, +} +impl From for u8 { + #[inline(always)] + fn from(variant: VAL_A) -> Self { + variant as _ + } +} +impl VAL_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> Option { + match self.bits { + 0 => Some(VAL_A::_8BIT), + 1 => Some(VAL_A::_10BIT), + 2 => Some(VAL_A::_12BIT), + 3 => Some(VAL_A::_14BIT), + _ => None, + } + } + #[doc = "Checks if the value of the field is `_8BIT`"] + #[inline(always)] + pub fn is_8bit(&self) -> bool { + *self == VAL_A::_8BIT + } + #[doc = "Checks if the value of the field is `_10BIT`"] + #[inline(always)] + pub fn is_10bit(&self) -> bool { + *self == VAL_A::_10BIT + } + #[doc = "Checks if the value of the field is `_12BIT`"] + #[inline(always)] + pub fn is_12bit(&self) -> bool { + *self == VAL_A::_12BIT + } + #[doc = "Checks if the value of the field is `_14BIT`"] + #[inline(always)] + pub fn is_14bit(&self) -> bool { + *self == VAL_A::_14BIT + } +} +#[doc = "Field `VAL` writer - Set the resolution"] +pub type VAL_W<'a, const O: u8> = crate::FieldWriter<'a, u32, RESOLUTION_SPEC, u8, VAL_A, 3, O>; +impl<'a, const O: u8> VAL_W<'a, O> { + #[doc = "8 bit"] + #[inline(always)] + pub fn _8bit(self) -> &'a mut W { + self.variant(VAL_A::_8BIT) + } + #[doc = "10 bit"] + #[inline(always)] + pub fn _10bit(self) -> &'a mut W { + self.variant(VAL_A::_10BIT) + } + #[doc = "12 bit"] + #[inline(always)] + pub fn _12bit(self) -> &'a mut W { + self.variant(VAL_A::_12BIT) + } + #[doc = "14 bit"] + #[inline(always)] + pub fn _14bit(self) -> &'a mut W { + self.variant(VAL_A::_14BIT) + } +} +impl R { + #[doc = "Bits 0:2 - Set the resolution"] + #[inline(always)] + pub fn val(&self) -> VAL_R { + VAL_R::new((self.bits & 7) as u8) + } +} +impl W { + #[doc = "Bits 0:2 - Set the resolution"] + #[inline(always)] + #[must_use] + pub fn val(&mut self) -> VAL_W<0> { + VAL_W::new(self) + } + #[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 = "Resolution configuration\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 [resolution](index.html) module"] +pub struct RESOLUTION_SPEC; +impl crate::RegisterSpec for RESOLUTION_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [resolution::R](R) reader structure"] +impl crate::Readable for RESOLUTION_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [resolution::W](W) writer structure"] +impl crate::Writable for RESOLUTION_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets RESOLUTION to value 0x01"] +impl crate::Resettable for RESOLUTION_SPEC { + const RESET_VALUE: Self::Ux = 0x01; +} diff --git a/down-the-stack/dk_pac/src/saadc/result.rs b/down-the-stack/dk_pac/src/saadc/result.rs new file mode 100644 index 0000000..719c5f5 --- /dev/null +++ b/down-the-stack/dk_pac/src/saadc/result.rs @@ -0,0 +1,22 @@ +#[doc = r"Register block"] +#[repr(C)] +pub struct RESULT { + #[doc = "0x00 - Data pointer"] + pub ptr: PTR, + #[doc = "0x04 - Maximum number of buffer words to transfer"] + pub maxcnt: MAXCNT, + #[doc = "0x08 - Number of buffer words transferred since last START"] + pub amount: AMOUNT, +} +#[doc = "PTR (rw) register accessor: an alias for `Reg`"] +pub type PTR = crate::Reg; +#[doc = "Data pointer"] +pub mod ptr; +#[doc = "MAXCNT (rw) register accessor: an alias for `Reg`"] +pub type MAXCNT = crate::Reg; +#[doc = "Maximum number of buffer words to transfer"] +pub mod maxcnt; +#[doc = "AMOUNT (r) register accessor: an alias for `Reg`"] +pub type AMOUNT = crate::Reg; +#[doc = "Number of buffer words transferred since last START"] +pub mod amount; diff --git a/down-the-stack/dk_pac/src/saadc/result/amount.rs b/down-the-stack/dk_pac/src/saadc/result/amount.rs new file mode 100644 index 0000000..cdb00bd --- /dev/null +++ b/down-the-stack/dk_pac/src/saadc/result/amount.rs @@ -0,0 +1,37 @@ +#[doc = "Register `AMOUNT` 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 = "Field `AMOUNT` reader - Number of buffer words transferred since last START. This register can be read after an END or STOPPED event."] +pub type AMOUNT_R = crate::FieldReader; +impl R { + #[doc = "Bits 0:14 - Number of buffer words transferred since last START. This register can be read after an END or STOPPED event."] + #[inline(always)] + pub fn amount(&self) -> AMOUNT_R { + AMOUNT_R::new((self.bits & 0x7fff) as u16) + } +} +#[doc = "Number of buffer words transferred since last START\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 [amount](index.html) module"] +pub struct AMOUNT_SPEC; +impl crate::RegisterSpec for AMOUNT_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [amount::R](R) reader structure"] +impl crate::Readable for AMOUNT_SPEC { + type Reader = R; +} +#[doc = "`reset()` method sets AMOUNT to value 0"] +impl crate::Resettable for AMOUNT_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/saadc/result/maxcnt.rs b/down-the-stack/dk_pac/src/saadc/result/maxcnt.rs new file mode 100644 index 0000000..4f55922 --- /dev/null +++ b/down-the-stack/dk_pac/src/saadc/result/maxcnt.rs @@ -0,0 +1,80 @@ +#[doc = "Register `MAXCNT` 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 `MAXCNT` 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 `MAXCNT` reader - Maximum number of buffer words to transfer"] +pub type MAXCNT_R = crate::FieldReader; +#[doc = "Field `MAXCNT` writer - Maximum number of buffer words to transfer"] +pub type MAXCNT_W<'a, const O: u8> = crate::FieldWriter<'a, u32, MAXCNT_SPEC, u16, u16, 15, O>; +impl R { + #[doc = "Bits 0:14 - Maximum number of buffer words to transfer"] + #[inline(always)] + pub fn maxcnt(&self) -> MAXCNT_R { + MAXCNT_R::new((self.bits & 0x7fff) as u16) + } +} +impl W { + #[doc = "Bits 0:14 - Maximum number of buffer words to transfer"] + #[inline(always)] + #[must_use] + pub fn maxcnt(&mut self) -> MAXCNT_W<0> { + MAXCNT_W::new(self) + } + #[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 = "Maximum number of buffer words to transfer\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 [maxcnt](index.html) module"] +pub struct MAXCNT_SPEC; +impl crate::RegisterSpec for MAXCNT_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [maxcnt::R](R) reader structure"] +impl crate::Readable for MAXCNT_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [maxcnt::W](W) writer structure"] +impl crate::Writable for MAXCNT_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets MAXCNT to value 0"] +impl crate::Resettable for MAXCNT_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/saadc/result/ptr.rs b/down-the-stack/dk_pac/src/saadc/result/ptr.rs new file mode 100644 index 0000000..2f2c926 --- /dev/null +++ b/down-the-stack/dk_pac/src/saadc/result/ptr.rs @@ -0,0 +1,80 @@ +#[doc = "Register `PTR` 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 `PTR` 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 `PTR` reader - Data pointer"] +pub type PTR_R = crate::FieldReader; +#[doc = "Field `PTR` writer - Data pointer"] +pub type PTR_W<'a, const O: u8> = crate::FieldWriter<'a, u32, PTR_SPEC, u32, u32, 32, O>; +impl R { + #[doc = "Bits 0:31 - Data pointer"] + #[inline(always)] + pub fn ptr(&self) -> PTR_R { + PTR_R::new(self.bits) + } +} +impl W { + #[doc = "Bits 0:31 - Data pointer"] + #[inline(always)] + #[must_use] + pub fn ptr(&mut self) -> PTR_W<0> { + PTR_W::new(self) + } + #[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 = "Data pointer\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 [ptr](index.html) module"] +pub struct PTR_SPEC; +impl crate::RegisterSpec for PTR_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [ptr::R](R) reader structure"] +impl crate::Readable for PTR_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [ptr::W](W) writer structure"] +impl crate::Writable for PTR_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets PTR to value 0"] +impl crate::Resettable for PTR_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/saadc/samplerate.rs b/down-the-stack/dk_pac/src/saadc/samplerate.rs new file mode 100644 index 0000000..403aa98 --- /dev/null +++ b/down-the-stack/dk_pac/src/saadc/samplerate.rs @@ -0,0 +1,141 @@ +#[doc = "Register `SAMPLERATE` 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 `SAMPLERATE` 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 `CC` reader - Capture and compare value. Sample rate is 16 MHz/CC"] +pub type CC_R = crate::FieldReader; +#[doc = "Field `CC` writer - Capture and compare value. Sample rate is 16 MHz/CC"] +pub type CC_W<'a, const O: u8> = crate::FieldWriter<'a, u32, SAMPLERATE_SPEC, u16, u16, 11, O>; +#[doc = "Field `MODE` reader - Select mode for sample rate control"] +pub type MODE_R = crate::BitReader; +#[doc = "Select mode for sample rate control\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum MODE_A { + #[doc = "0: Rate is controlled from SAMPLE task"] + TASK = 0, + #[doc = "1: Rate is controlled from local timer (use CC to control the rate)"] + TIMERS = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: MODE_A) -> Self { + variant as u8 != 0 + } +} +impl MODE_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> MODE_A { + match self.bits { + false => MODE_A::TASK, + true => MODE_A::TIMERS, + } + } + #[doc = "Checks if the value of the field is `TASK`"] + #[inline(always)] + pub fn is_task(&self) -> bool { + *self == MODE_A::TASK + } + #[doc = "Checks if the value of the field is `TIMERS`"] + #[inline(always)] + pub fn is_timers(&self) -> bool { + *self == MODE_A::TIMERS + } +} +#[doc = "Field `MODE` writer - Select mode for sample rate control"] +pub type MODE_W<'a, const O: u8> = crate::BitWriter<'a, u32, SAMPLERATE_SPEC, MODE_A, O>; +impl<'a, const O: u8> MODE_W<'a, O> { + #[doc = "Rate is controlled from SAMPLE task"] + #[inline(always)] + pub fn task(self) -> &'a mut W { + self.variant(MODE_A::TASK) + } + #[doc = "Rate is controlled from local timer (use CC to control the rate)"] + #[inline(always)] + pub fn timers(self) -> &'a mut W { + self.variant(MODE_A::TIMERS) + } +} +impl R { + #[doc = "Bits 0:10 - Capture and compare value. Sample rate is 16 MHz/CC"] + #[inline(always)] + pub fn cc(&self) -> CC_R { + CC_R::new((self.bits & 0x07ff) as u16) + } + #[doc = "Bit 12 - Select mode for sample rate control"] + #[inline(always)] + pub fn mode(&self) -> MODE_R { + MODE_R::new(((self.bits >> 12) & 1) != 0) + } +} +impl W { + #[doc = "Bits 0:10 - Capture and compare value. Sample rate is 16 MHz/CC"] + #[inline(always)] + #[must_use] + pub fn cc(&mut self) -> CC_W<0> { + CC_W::new(self) + } + #[doc = "Bit 12 - Select mode for sample rate control"] + #[inline(always)] + #[must_use] + pub fn mode(&mut self) -> MODE_W<12> { + 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 + } +} +#[doc = "Controls normal or continuous sample rate\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 [samplerate](index.html) module"] +pub struct SAMPLERATE_SPEC; +impl crate::RegisterSpec for SAMPLERATE_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [samplerate::R](R) reader structure"] +impl crate::Readable for SAMPLERATE_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [samplerate::W](W) writer structure"] +impl crate::Writable for SAMPLERATE_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets SAMPLERATE to value 0"] +impl crate::Resettable for SAMPLERATE_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/saadc/status.rs b/down-the-stack/dk_pac/src/saadc/status.rs new file mode 100644 index 0000000..467cf57 --- /dev/null +++ b/down-the-stack/dk_pac/src/saadc/status.rs @@ -0,0 +1,71 @@ +#[doc = "Register `STATUS` 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 = "Field `STATUS` reader - Status"] +pub type STATUS_R = crate::BitReader; +#[doc = "Status\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum STATUS_A { + #[doc = "0: ADC is ready. No on-going conversion."] + READY = 0, + #[doc = "1: ADC is busy. Conversion in progress."] + BUSY = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: STATUS_A) -> Self { + variant as u8 != 0 + } +} +impl STATUS_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> STATUS_A { + match self.bits { + false => STATUS_A::READY, + true => STATUS_A::BUSY, + } + } + #[doc = "Checks if the value of the field is `READY`"] + #[inline(always)] + pub fn is_ready(&self) -> bool { + *self == STATUS_A::READY + } + #[doc = "Checks if the value of the field is `BUSY`"] + #[inline(always)] + pub fn is_busy(&self) -> bool { + *self == STATUS_A::BUSY + } +} +impl R { + #[doc = "Bit 0 - Status"] + #[inline(always)] + pub fn status(&self) -> STATUS_R { + STATUS_R::new((self.bits & 1) != 0) + } +} +#[doc = "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 [status](index.html) module"] +pub struct STATUS_SPEC; +impl crate::RegisterSpec for STATUS_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [status::R](R) reader structure"] +impl crate::Readable for STATUS_SPEC { + type Reader = R; +} +#[doc = "`reset()` method sets STATUS to value 0"] +impl crate::Resettable for STATUS_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/saadc/tasks_calibrateoffset.rs b/down-the-stack/dk_pac/src/saadc/tasks_calibrateoffset.rs new file mode 100644 index 0000000..e616dab --- /dev/null +++ b/down-the-stack/dk_pac/src/saadc/tasks_calibrateoffset.rs @@ -0,0 +1,72 @@ +#[doc = "Register `TASKS_CALIBRATEOFFSET` 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 = "Starts offset auto-calibration\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum TASKS_CALIBRATEOFFSET_AW { + #[doc = "1: Trigger task"] + TRIGGER = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: TASKS_CALIBRATEOFFSET_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `TASKS_CALIBRATEOFFSET` writer - Starts offset auto-calibration"] +pub type TASKS_CALIBRATEOFFSET_W<'a, const O: u8> = + crate::BitWriter<'a, u32, TASKS_CALIBRATEOFFSET_SPEC, TASKS_CALIBRATEOFFSET_AW, O>; +impl<'a, const O: u8> TASKS_CALIBRATEOFFSET_W<'a, O> { + #[doc = "Trigger task"] + #[inline(always)] + pub fn trigger(self) -> &'a mut W { + self.variant(TASKS_CALIBRATEOFFSET_AW::TRIGGER) + } +} +impl W { + #[doc = "Bit 0 - Starts offset auto-calibration"] + #[inline(always)] + #[must_use] + pub fn tasks_calibrateoffset(&mut self) -> TASKS_CALIBRATEOFFSET_W<0> { + TASKS_CALIBRATEOFFSET_W::new(self) + } + #[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 = "Starts offset auto-calibration\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 [tasks_calibrateoffset](index.html) module"] +pub struct TASKS_CALIBRATEOFFSET_SPEC; +impl crate::RegisterSpec for TASKS_CALIBRATEOFFSET_SPEC { + type Ux = u32; +} +#[doc = "`write(|w| ..)` method takes [tasks_calibrateoffset::W](W) writer structure"] +impl crate::Writable for TASKS_CALIBRATEOFFSET_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets TASKS_CALIBRATEOFFSET to value 0"] +impl crate::Resettable for TASKS_CALIBRATEOFFSET_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/saadc/tasks_sample.rs b/down-the-stack/dk_pac/src/saadc/tasks_sample.rs new file mode 100644 index 0000000..8e802ca --- /dev/null +++ b/down-the-stack/dk_pac/src/saadc/tasks_sample.rs @@ -0,0 +1,72 @@ +#[doc = "Register `TASKS_SAMPLE` 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 = "Take one ADC sample, if scan is enabled all channels are sampled\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum TASKS_SAMPLE_AW { + #[doc = "1: Trigger task"] + TRIGGER = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: TASKS_SAMPLE_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `TASKS_SAMPLE` writer - Take one ADC sample, if scan is enabled all channels are sampled"] +pub type TASKS_SAMPLE_W<'a, const O: u8> = + crate::BitWriter<'a, u32, TASKS_SAMPLE_SPEC, TASKS_SAMPLE_AW, O>; +impl<'a, const O: u8> TASKS_SAMPLE_W<'a, O> { + #[doc = "Trigger task"] + #[inline(always)] + pub fn trigger(self) -> &'a mut W { + self.variant(TASKS_SAMPLE_AW::TRIGGER) + } +} +impl W { + #[doc = "Bit 0 - Take one ADC sample, if scan is enabled all channels are sampled"] + #[inline(always)] + #[must_use] + pub fn tasks_sample(&mut self) -> TASKS_SAMPLE_W<0> { + TASKS_SAMPLE_W::new(self) + } + #[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 = "Take one ADC sample, if scan is enabled all channels are sampled\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 [tasks_sample](index.html) module"] +pub struct TASKS_SAMPLE_SPEC; +impl crate::RegisterSpec for TASKS_SAMPLE_SPEC { + type Ux = u32; +} +#[doc = "`write(|w| ..)` method takes [tasks_sample::W](W) writer structure"] +impl crate::Writable for TASKS_SAMPLE_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets TASKS_SAMPLE to value 0"] +impl crate::Resettable for TASKS_SAMPLE_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/saadc/tasks_start.rs b/down-the-stack/dk_pac/src/saadc/tasks_start.rs new file mode 100644 index 0000000..5a628b3 --- /dev/null +++ b/down-the-stack/dk_pac/src/saadc/tasks_start.rs @@ -0,0 +1,72 @@ +#[doc = "Register `TASKS_START` 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 = "Start the ADC and prepare the result buffer in RAM\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum TASKS_START_AW { + #[doc = "1: Trigger task"] + TRIGGER = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: TASKS_START_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `TASKS_START` writer - Start the ADC and prepare the result buffer in RAM"] +pub type TASKS_START_W<'a, const O: u8> = + crate::BitWriter<'a, u32, TASKS_START_SPEC, TASKS_START_AW, O>; +impl<'a, const O: u8> TASKS_START_W<'a, O> { + #[doc = "Trigger task"] + #[inline(always)] + pub fn trigger(self) -> &'a mut W { + self.variant(TASKS_START_AW::TRIGGER) + } +} +impl W { + #[doc = "Bit 0 - Start the ADC and prepare the result buffer in RAM"] + #[inline(always)] + #[must_use] + pub fn tasks_start(&mut self) -> TASKS_START_W<0> { + TASKS_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 + } +} +#[doc = "Start the ADC and prepare the result buffer in RAM\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 [tasks_start](index.html) module"] +pub struct TASKS_START_SPEC; +impl crate::RegisterSpec for TASKS_START_SPEC { + type Ux = u32; +} +#[doc = "`write(|w| ..)` method takes [tasks_start::W](W) writer structure"] +impl crate::Writable for TASKS_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 TASKS_START to value 0"] +impl crate::Resettable for TASKS_START_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/saadc/tasks_stop.rs b/down-the-stack/dk_pac/src/saadc/tasks_stop.rs new file mode 100644 index 0000000..4c4d298 --- /dev/null +++ b/down-the-stack/dk_pac/src/saadc/tasks_stop.rs @@ -0,0 +1,72 @@ +#[doc = "Register `TASKS_STOP` 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 = "Stop the ADC and terminate any on-going conversion\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum TASKS_STOP_AW { + #[doc = "1: Trigger task"] + TRIGGER = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: TASKS_STOP_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `TASKS_STOP` writer - Stop the ADC and terminate any on-going conversion"] +pub type TASKS_STOP_W<'a, const O: u8> = + crate::BitWriter<'a, u32, TASKS_STOP_SPEC, TASKS_STOP_AW, O>; +impl<'a, const O: u8> TASKS_STOP_W<'a, O> { + #[doc = "Trigger task"] + #[inline(always)] + pub fn trigger(self) -> &'a mut W { + self.variant(TASKS_STOP_AW::TRIGGER) + } +} +impl W { + #[doc = "Bit 0 - Stop the ADC and terminate any on-going conversion"] + #[inline(always)] + #[must_use] + pub fn tasks_stop(&mut self) -> TASKS_STOP_W<0> { + TASKS_STOP_W::new(self) + } + #[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 = "Stop the ADC and terminate any on-going conversion\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 [tasks_stop](index.html) module"] +pub struct TASKS_STOP_SPEC; +impl crate::RegisterSpec for TASKS_STOP_SPEC { + type Ux = u32; +} +#[doc = "`write(|w| ..)` method takes [tasks_stop::W](W) writer structure"] +impl crate::Writable for TASKS_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 TASKS_STOP to value 0"] +impl crate::Resettable for TASKS_STOP_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/spi0.rs b/down-the-stack/dk_pac/src/spi0.rs new file mode 100644 index 0000000..1a1b3d0 --- /dev/null +++ b/down-the-stack/dk_pac/src/spi0.rs @@ -0,0 +1,66 @@ +#[doc = r"Register block"] +#[repr(C)] +pub struct RegisterBlock { + _reserved0: [u8; 0x0108], + #[doc = "0x108 - TXD byte sent and RXD byte received"] + pub events_ready: EVENTS_READY, + _reserved1: [u8; 0x01f8], + #[doc = "0x304 - Enable interrupt"] + pub intenset: INTENSET, + #[doc = "0x308 - Disable interrupt"] + pub intenclr: INTENCLR, + _reserved3: [u8; 0x01f4], + #[doc = "0x500 - Enable SPI"] + pub enable: ENABLE, + _reserved4: [u8; 0x04], + #[doc = "0x508..0x514 - Unspecified"] + pub psel: PSEL, + _reserved5: [u8; 0x04], + #[doc = "0x518 - RXD register"] + pub rxd: RXD, + #[doc = "0x51c - TXD register"] + pub txd: TXD, + _reserved7: [u8; 0x04], + #[doc = "0x524 - SPI frequency"] + pub frequency: FREQUENCY, + _reserved8: [u8; 0x2c], + #[doc = "0x554 - Configuration register"] + pub config: CONFIG, +} +#[doc = "EVENTS_READY (rw) register accessor: an alias for `Reg`"] +pub type EVENTS_READY = crate::Reg; +#[doc = "TXD byte sent and RXD byte received"] +pub mod events_ready; +#[doc = "INTENSET (rw) register accessor: an alias for `Reg`"] +pub type INTENSET = crate::Reg; +#[doc = "Enable interrupt"] +pub mod intenset; +#[doc = "INTENCLR (rw) register accessor: an alias for `Reg`"] +pub type INTENCLR = crate::Reg; +#[doc = "Disable interrupt"] +pub mod intenclr; +#[doc = "ENABLE (rw) register accessor: an alias for `Reg`"] +pub type ENABLE = crate::Reg; +#[doc = "Enable SPI"] +pub mod enable; +#[doc = "Unspecified"] +pub use self::psel::PSEL; +#[doc = r"Cluster"] +#[doc = "Unspecified"] +pub mod psel; +#[doc = "RXD (r) register accessor: an alias for `Reg`"] +pub type RXD = crate::Reg; +#[doc = "RXD register"] +pub mod rxd; +#[doc = "TXD (rw) register accessor: an alias for `Reg`"] +pub type TXD = crate::Reg; +#[doc = "TXD register"] +pub mod txd; +#[doc = "FREQUENCY (rw) register accessor: an alias for `Reg`"] +pub type FREQUENCY = crate::Reg; +#[doc = "SPI frequency"] +pub mod frequency; +#[doc = "CONFIG (rw) register accessor: an alias for `Reg`"] +pub type CONFIG = crate::Reg; +#[doc = "Configuration register"] +pub mod config; diff --git a/down-the-stack/dk_pac/src/spi0/config.rs b/down-the-stack/dk_pac/src/spi0/config.rs new file mode 100644 index 0000000..daad954 --- /dev/null +++ b/down-the-stack/dk_pac/src/spi0/config.rs @@ -0,0 +1,248 @@ +#[doc = "Register `CONFIG` 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 `CONFIG` 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 `ORDER` reader - Bit order"] +pub type ORDER_R = crate::BitReader; +#[doc = "Bit order\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum ORDER_A { + #[doc = "0: Most significant bit shifted out first"] + MSB_FIRST = 0, + #[doc = "1: Least significant bit shifted out first"] + LSB_FIRST = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: ORDER_A) -> Self { + variant as u8 != 0 + } +} +impl ORDER_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> ORDER_A { + match self.bits { + false => ORDER_A::MSB_FIRST, + true => ORDER_A::LSB_FIRST, + } + } + #[doc = "Checks if the value of the field is `MSB_FIRST`"] + #[inline(always)] + pub fn is_msb_first(&self) -> bool { + *self == ORDER_A::MSB_FIRST + } + #[doc = "Checks if the value of the field is `LSB_FIRST`"] + #[inline(always)] + pub fn is_lsb_first(&self) -> bool { + *self == ORDER_A::LSB_FIRST + } +} +#[doc = "Field `ORDER` writer - Bit order"] +pub type ORDER_W<'a, const O: u8> = crate::BitWriter<'a, u32, CONFIG_SPEC, ORDER_A, O>; +impl<'a, const O: u8> ORDER_W<'a, O> { + #[doc = "Most significant bit shifted out first"] + #[inline(always)] + pub fn msb_first(self) -> &'a mut W { + self.variant(ORDER_A::MSB_FIRST) + } + #[doc = "Least significant bit shifted out first"] + #[inline(always)] + pub fn lsb_first(self) -> &'a mut W { + self.variant(ORDER_A::LSB_FIRST) + } +} +#[doc = "Field `CPHA` reader - Serial clock (SCK) phase"] +pub type CPHA_R = crate::BitReader; +#[doc = "Serial clock (SCK) phase\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum CPHA_A { + #[doc = "0: Sample on leading edge of clock, shift serial data on trailing edge"] + LEADING = 0, + #[doc = "1: Sample on trailing edge of clock, shift serial data on leading edge"] + TRAILING = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: CPHA_A) -> Self { + variant as u8 != 0 + } +} +impl CPHA_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> CPHA_A { + match self.bits { + false => CPHA_A::LEADING, + true => CPHA_A::TRAILING, + } + } + #[doc = "Checks if the value of the field is `LEADING`"] + #[inline(always)] + pub fn is_leading(&self) -> bool { + *self == CPHA_A::LEADING + } + #[doc = "Checks if the value of the field is `TRAILING`"] + #[inline(always)] + pub fn is_trailing(&self) -> bool { + *self == CPHA_A::TRAILING + } +} +#[doc = "Field `CPHA` writer - Serial clock (SCK) phase"] +pub type CPHA_W<'a, const O: u8> = crate::BitWriter<'a, u32, CONFIG_SPEC, CPHA_A, O>; +impl<'a, const O: u8> CPHA_W<'a, O> { + #[doc = "Sample on leading edge of clock, shift serial data on trailing edge"] + #[inline(always)] + pub fn leading(self) -> &'a mut W { + self.variant(CPHA_A::LEADING) + } + #[doc = "Sample on trailing edge of clock, shift serial data on leading edge"] + #[inline(always)] + pub fn trailing(self) -> &'a mut W { + self.variant(CPHA_A::TRAILING) + } +} +#[doc = "Field `CPOL` reader - Serial clock (SCK) polarity"] +pub type CPOL_R = crate::BitReader; +#[doc = "Serial clock (SCK) polarity\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum CPOL_A { + #[doc = "0: Active high"] + ACTIVE_HIGH = 0, + #[doc = "1: Active low"] + ACTIVE_LOW = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: CPOL_A) -> Self { + variant as u8 != 0 + } +} +impl CPOL_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> CPOL_A { + match self.bits { + false => CPOL_A::ACTIVE_HIGH, + true => CPOL_A::ACTIVE_LOW, + } + } + #[doc = "Checks if the value of the field is `ACTIVE_HIGH`"] + #[inline(always)] + pub fn is_active_high(&self) -> bool { + *self == CPOL_A::ACTIVE_HIGH + } + #[doc = "Checks if the value of the field is `ACTIVE_LOW`"] + #[inline(always)] + pub fn is_active_low(&self) -> bool { + *self == CPOL_A::ACTIVE_LOW + } +} +#[doc = "Field `CPOL` writer - Serial clock (SCK) polarity"] +pub type CPOL_W<'a, const O: u8> = crate::BitWriter<'a, u32, CONFIG_SPEC, CPOL_A, O>; +impl<'a, const O: u8> CPOL_W<'a, O> { + #[doc = "Active high"] + #[inline(always)] + pub fn active_high(self) -> &'a mut W { + self.variant(CPOL_A::ACTIVE_HIGH) + } + #[doc = "Active low"] + #[inline(always)] + pub fn active_low(self) -> &'a mut W { + self.variant(CPOL_A::ACTIVE_LOW) + } +} +impl R { + #[doc = "Bit 0 - Bit order"] + #[inline(always)] + pub fn order(&self) -> ORDER_R { + ORDER_R::new((self.bits & 1) != 0) + } + #[doc = "Bit 1 - Serial clock (SCK) phase"] + #[inline(always)] + pub fn cpha(&self) -> CPHA_R { + CPHA_R::new(((self.bits >> 1) & 1) != 0) + } + #[doc = "Bit 2 - Serial clock (SCK) polarity"] + #[inline(always)] + pub fn cpol(&self) -> CPOL_R { + CPOL_R::new(((self.bits >> 2) & 1) != 0) + } +} +impl W { + #[doc = "Bit 0 - Bit order"] + #[inline(always)] + #[must_use] + pub fn order(&mut self) -> ORDER_W<0> { + ORDER_W::new(self) + } + #[doc = "Bit 1 - Serial clock (SCK) phase"] + #[inline(always)] + #[must_use] + pub fn cpha(&mut self) -> CPHA_W<1> { + CPHA_W::new(self) + } + #[doc = "Bit 2 - Serial clock (SCK) polarity"] + #[inline(always)] + #[must_use] + pub fn cpol(&mut self) -> CPOL_W<2> { + CPOL_W::new(self) + } + #[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 = "Configuration register\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 [config](index.html) module"] +pub struct CONFIG_SPEC; +impl crate::RegisterSpec for CONFIG_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [config::R](R) reader structure"] +impl crate::Readable for CONFIG_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [config::W](W) writer structure"] +impl crate::Writable for 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 CONFIG to value 0"] +impl crate::Resettable for CONFIG_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/spi0/enable.rs b/down-the-stack/dk_pac/src/spi0/enable.rs new file mode 100644 index 0000000..838a827 --- /dev/null +++ b/down-the-stack/dk_pac/src/spi0/enable.rs @@ -0,0 +1,128 @@ +#[doc = "Register `ENABLE` 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 `ENABLE` 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 `ENABLE` reader - Enable or disable SPI"] +pub type ENABLE_R = crate::FieldReader; +#[doc = "Enable or disable SPI\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +#[repr(u8)] +pub enum ENABLE_A { + #[doc = "0: Disable SPI"] + DISABLED = 0, + #[doc = "1: Enable SPI"] + ENABLED = 1, +} +impl From for u8 { + #[inline(always)] + fn from(variant: ENABLE_A) -> Self { + variant as _ + } +} +impl ENABLE_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> Option { + match self.bits { + 0 => Some(ENABLE_A::DISABLED), + 1 => Some(ENABLE_A::ENABLED), + _ => None, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == ENABLE_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == ENABLE_A::ENABLED + } +} +#[doc = "Field `ENABLE` writer - Enable or disable SPI"] +pub type ENABLE_W<'a, const O: u8> = crate::FieldWriter<'a, u32, ENABLE_SPEC, u8, ENABLE_A, 4, O>; +impl<'a, const O: u8> ENABLE_W<'a, O> { + #[doc = "Disable SPI"] + #[inline(always)] + pub fn disabled(self) -> &'a mut W { + self.variant(ENABLE_A::DISABLED) + } + #[doc = "Enable SPI"] + #[inline(always)] + pub fn enabled(self) -> &'a mut W { + self.variant(ENABLE_A::ENABLED) + } +} +impl R { + #[doc = "Bits 0:3 - Enable or disable SPI"] + #[inline(always)] + pub fn enable(&self) -> ENABLE_R { + ENABLE_R::new((self.bits & 0x0f) as u8) + } +} +impl W { + #[doc = "Bits 0:3 - Enable or disable SPI"] + #[inline(always)] + #[must_use] + pub fn enable(&mut self) -> ENABLE_W<0> { + 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 + } +} +#[doc = "Enable SPI\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 [enable](index.html) module"] +pub struct ENABLE_SPEC; +impl crate::RegisterSpec for ENABLE_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [enable::R](R) reader structure"] +impl crate::Readable for ENABLE_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [enable::W](W) writer structure"] +impl crate::Writable for ENABLE_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets ENABLE to value 0"] +impl crate::Resettable for ENABLE_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/spi0/events_ready.rs b/down-the-stack/dk_pac/src/spi0/events_ready.rs new file mode 100644 index 0000000..a04a158 --- /dev/null +++ b/down-the-stack/dk_pac/src/spi0/events_ready.rs @@ -0,0 +1,127 @@ +#[doc = "Register `EVENTS_READY` 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 `EVENTS_READY` 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 `EVENTS_READY` reader - TXD byte sent and RXD byte received"] +pub type EVENTS_READY_R = crate::BitReader; +#[doc = "TXD byte sent and RXD byte received\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum EVENTS_READY_A { + #[doc = "0: Event not generated"] + NOT_GENERATED = 0, + #[doc = "1: Event generated"] + GENERATED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: EVENTS_READY_A) -> Self { + variant as u8 != 0 + } +} +impl EVENTS_READY_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> EVENTS_READY_A { + match self.bits { + false => EVENTS_READY_A::NOT_GENERATED, + true => EVENTS_READY_A::GENERATED, + } + } + #[doc = "Checks if the value of the field is `NOT_GENERATED`"] + #[inline(always)] + pub fn is_not_generated(&self) -> bool { + *self == EVENTS_READY_A::NOT_GENERATED + } + #[doc = "Checks if the value of the field is `GENERATED`"] + #[inline(always)] + pub fn is_generated(&self) -> bool { + *self == EVENTS_READY_A::GENERATED + } +} +#[doc = "Field `EVENTS_READY` writer - TXD byte sent and RXD byte received"] +pub type EVENTS_READY_W<'a, const O: u8> = + crate::BitWriter<'a, u32, EVENTS_READY_SPEC, EVENTS_READY_A, O>; +impl<'a, const O: u8> EVENTS_READY_W<'a, O> { + #[doc = "Event not generated"] + #[inline(always)] + pub fn not_generated(self) -> &'a mut W { + self.variant(EVENTS_READY_A::NOT_GENERATED) + } + #[doc = "Event generated"] + #[inline(always)] + pub fn generated(self) -> &'a mut W { + self.variant(EVENTS_READY_A::GENERATED) + } +} +impl R { + #[doc = "Bit 0 - TXD byte sent and RXD byte received"] + #[inline(always)] + pub fn events_ready(&self) -> EVENTS_READY_R { + EVENTS_READY_R::new((self.bits & 1) != 0) + } +} +impl W { + #[doc = "Bit 0 - TXD byte sent and RXD byte received"] + #[inline(always)] + #[must_use] + pub fn events_ready(&mut self) -> EVENTS_READY_W<0> { + EVENTS_READY_W::new(self) + } + #[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 = "TXD byte sent and RXD byte received\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 [events_ready](index.html) module"] +pub struct EVENTS_READY_SPEC; +impl crate::RegisterSpec for EVENTS_READY_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [events_ready::R](R) reader structure"] +impl crate::Readable for EVENTS_READY_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [events_ready::W](W) writer structure"] +impl crate::Writable for EVENTS_READY_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets EVENTS_READY to value 0"] +impl crate::Resettable for EVENTS_READY_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/spi0/frequency.rs b/down-the-stack/dk_pac/src/spi0/frequency.rs new file mode 100644 index 0000000..939a363 --- /dev/null +++ b/down-the-stack/dk_pac/src/spi0/frequency.rs @@ -0,0 +1,194 @@ +#[doc = "Register `FREQUENCY` 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 `FREQUENCY` 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 `FREQUENCY` reader - SPI master data rate"] +pub type FREQUENCY_R = crate::FieldReader; +#[doc = "SPI master data rate\n\nValue on reset: 67108864"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +#[repr(u32)] +pub enum FREQUENCY_A { + #[doc = "33554432: 125 kbps"] + K125 = 33554432, + #[doc = "67108864: 250 kbps"] + K250 = 67108864, + #[doc = "134217728: 500 kbps"] + K500 = 134217728, + #[doc = "268435456: 1 Mbps"] + M1 = 268435456, + #[doc = "536870912: 2 Mbps"] + M2 = 536870912, + #[doc = "1073741824: 4 Mbps"] + M4 = 1073741824, + #[doc = "2147483648: 8 Mbps"] + M8 = 2147483648, +} +impl From for u32 { + #[inline(always)] + fn from(variant: FREQUENCY_A) -> Self { + variant as _ + } +} +impl FREQUENCY_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> Option { + match self.bits { + 33554432 => Some(FREQUENCY_A::K125), + 67108864 => Some(FREQUENCY_A::K250), + 134217728 => Some(FREQUENCY_A::K500), + 268435456 => Some(FREQUENCY_A::M1), + 536870912 => Some(FREQUENCY_A::M2), + 1073741824 => Some(FREQUENCY_A::M4), + 2147483648 => Some(FREQUENCY_A::M8), + _ => None, + } + } + #[doc = "Checks if the value of the field is `K125`"] + #[inline(always)] + pub fn is_k125(&self) -> bool { + *self == FREQUENCY_A::K125 + } + #[doc = "Checks if the value of the field is `K250`"] + #[inline(always)] + pub fn is_k250(&self) -> bool { + *self == FREQUENCY_A::K250 + } + #[doc = "Checks if the value of the field is `K500`"] + #[inline(always)] + pub fn is_k500(&self) -> bool { + *self == FREQUENCY_A::K500 + } + #[doc = "Checks if the value of the field is `M1`"] + #[inline(always)] + pub fn is_m1(&self) -> bool { + *self == FREQUENCY_A::M1 + } + #[doc = "Checks if the value of the field is `M2`"] + #[inline(always)] + pub fn is_m2(&self) -> bool { + *self == FREQUENCY_A::M2 + } + #[doc = "Checks if the value of the field is `M4`"] + #[inline(always)] + pub fn is_m4(&self) -> bool { + *self == FREQUENCY_A::M4 + } + #[doc = "Checks if the value of the field is `M8`"] + #[inline(always)] + pub fn is_m8(&self) -> bool { + *self == FREQUENCY_A::M8 + } +} +#[doc = "Field `FREQUENCY` writer - SPI master data rate"] +pub type FREQUENCY_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, FREQUENCY_SPEC, u32, FREQUENCY_A, 32, O>; +impl<'a, const O: u8> FREQUENCY_W<'a, O> { + #[doc = "125 kbps"] + #[inline(always)] + pub fn k125(self) -> &'a mut W { + self.variant(FREQUENCY_A::K125) + } + #[doc = "250 kbps"] + #[inline(always)] + pub fn k250(self) -> &'a mut W { + self.variant(FREQUENCY_A::K250) + } + #[doc = "500 kbps"] + #[inline(always)] + pub fn k500(self) -> &'a mut W { + self.variant(FREQUENCY_A::K500) + } + #[doc = "1 Mbps"] + #[inline(always)] + pub fn m1(self) -> &'a mut W { + self.variant(FREQUENCY_A::M1) + } + #[doc = "2 Mbps"] + #[inline(always)] + pub fn m2(self) -> &'a mut W { + self.variant(FREQUENCY_A::M2) + } + #[doc = "4 Mbps"] + #[inline(always)] + pub fn m4(self) -> &'a mut W { + self.variant(FREQUENCY_A::M4) + } + #[doc = "8 Mbps"] + #[inline(always)] + pub fn m8(self) -> &'a mut W { + self.variant(FREQUENCY_A::M8) + } +} +impl R { + #[doc = "Bits 0:31 - SPI master data rate"] + #[inline(always)] + pub fn frequency(&self) -> FREQUENCY_R { + FREQUENCY_R::new(self.bits) + } +} +impl W { + #[doc = "Bits 0:31 - SPI master data rate"] + #[inline(always)] + #[must_use] + pub fn frequency(&mut self) -> FREQUENCY_W<0> { + FREQUENCY_W::new(self) + } + #[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 = "SPI frequency\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 [frequency](index.html) module"] +pub struct FREQUENCY_SPEC; +impl crate::RegisterSpec for FREQUENCY_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [frequency::R](R) reader structure"] +impl crate::Readable for FREQUENCY_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [frequency::W](W) writer structure"] +impl crate::Writable for FREQUENCY_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets FREQUENCY to value 0x0400_0000"] +impl crate::Resettable for FREQUENCY_SPEC { + const RESET_VALUE: Self::Ux = 0x0400_0000; +} diff --git a/down-the-stack/dk_pac/src/spi0/intenclr.rs b/down-the-stack/dk_pac/src/spi0/intenclr.rs new file mode 100644 index 0000000..60a9995 --- /dev/null +++ b/down-the-stack/dk_pac/src/spi0/intenclr.rs @@ -0,0 +1,133 @@ +#[doc = "Register `INTENCLR` 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 `INTENCLR` 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 `READY` reader - Write '1' to disable interrupt for event READY"] +pub type READY_R = crate::BitReader; +#[doc = "Write '1' to disable interrupt for event READY\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum READY_A { + #[doc = "0: Read: Disabled"] + DISABLED = 0, + #[doc = "1: Read: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: READY_A) -> Self { + variant as u8 != 0 + } +} +impl READY_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> READY_A { + match self.bits { + false => READY_A::DISABLED, + true => READY_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == READY_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == READY_A::ENABLED + } +} +#[doc = "Write '1' to disable interrupt for event READY\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum READY_AW { + #[doc = "1: Disable"] + CLEAR = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: READY_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `READY` writer - Write '1' to disable interrupt for event READY"] +pub type READY_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENCLR_SPEC, READY_AW, O>; +impl<'a, const O: u8> READY_W<'a, O> { + #[doc = "Disable"] + #[inline(always)] + pub fn clear(self) -> &'a mut W { + self.variant(READY_AW::CLEAR) + } +} +impl R { + #[doc = "Bit 2 - Write '1' to disable interrupt for event READY"] + #[inline(always)] + pub fn ready(&self) -> READY_R { + READY_R::new(((self.bits >> 2) & 1) != 0) + } +} +impl W { + #[doc = "Bit 2 - Write '1' to disable interrupt for event READY"] + #[inline(always)] + #[must_use] + pub fn ready(&mut self) -> READY_W<2> { + READY_W::new(self) + } + #[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 = "Disable interrupt\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 [intenclr](index.html) module"] +pub struct INTENCLR_SPEC; +impl crate::RegisterSpec for INTENCLR_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [intenclr::R](R) reader structure"] +impl crate::Readable for INTENCLR_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [intenclr::W](W) writer structure"] +impl crate::Writable for INTENCLR_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets INTENCLR to value 0"] +impl crate::Resettable for INTENCLR_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/spi0/intenset.rs b/down-the-stack/dk_pac/src/spi0/intenset.rs new file mode 100644 index 0000000..584992b --- /dev/null +++ b/down-the-stack/dk_pac/src/spi0/intenset.rs @@ -0,0 +1,133 @@ +#[doc = "Register `INTENSET` 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 `INTENSET` 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 `READY` reader - Write '1' to enable interrupt for event READY"] +pub type READY_R = crate::BitReader; +#[doc = "Write '1' to enable interrupt for event READY\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum READY_A { + #[doc = "0: Read: Disabled"] + DISABLED = 0, + #[doc = "1: Read: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: READY_A) -> Self { + variant as u8 != 0 + } +} +impl READY_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> READY_A { + match self.bits { + false => READY_A::DISABLED, + true => READY_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == READY_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == READY_A::ENABLED + } +} +#[doc = "Write '1' to enable interrupt for event READY\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum READY_AW { + #[doc = "1: Enable"] + SET = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: READY_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `READY` writer - Write '1' to enable interrupt for event READY"] +pub type READY_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENSET_SPEC, READY_AW, O>; +impl<'a, const O: u8> READY_W<'a, O> { + #[doc = "Enable"] + #[inline(always)] + pub fn set(self) -> &'a mut W { + self.variant(READY_AW::SET) + } +} +impl R { + #[doc = "Bit 2 - Write '1' to enable interrupt for event READY"] + #[inline(always)] + pub fn ready(&self) -> READY_R { + READY_R::new(((self.bits >> 2) & 1) != 0) + } +} +impl W { + #[doc = "Bit 2 - Write '1' to enable interrupt for event READY"] + #[inline(always)] + #[must_use] + pub fn ready(&mut self) -> READY_W<2> { + READY_W::new(self) + } + #[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 = "Enable interrupt\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 [intenset](index.html) module"] +pub struct INTENSET_SPEC; +impl crate::RegisterSpec for INTENSET_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [intenset::R](R) reader structure"] +impl crate::Readable for INTENSET_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [intenset::W](W) writer structure"] +impl crate::Writable for INTENSET_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets INTENSET to value 0"] +impl crate::Resettable for INTENSET_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/spi0/psel.rs b/down-the-stack/dk_pac/src/spi0/psel.rs new file mode 100644 index 0000000..560166b --- /dev/null +++ b/down-the-stack/dk_pac/src/spi0/psel.rs @@ -0,0 +1,22 @@ +#[doc = r"Register block"] +#[repr(C)] +pub struct PSEL { + #[doc = "0x00 - Pin select for SCK"] + pub sck: SCK, + #[doc = "0x04 - Pin select for MOSI"] + pub mosi: MOSI, + #[doc = "0x08 - Pin select for MISO"] + pub miso: MISO, +} +#[doc = "SCK (rw) register accessor: an alias for `Reg`"] +pub type SCK = crate::Reg; +#[doc = "Pin select for SCK"] +pub mod sck; +#[doc = "MOSI (rw) register accessor: an alias for `Reg`"] +pub type MOSI = crate::Reg; +#[doc = "Pin select for MOSI"] +pub mod mosi; +#[doc = "MISO (rw) register accessor: an alias for `Reg`"] +pub type MISO = crate::Reg; +#[doc = "Pin select for MISO"] +pub mod miso; diff --git a/down-the-stack/dk_pac/src/spi0/psel/miso.rs b/down-the-stack/dk_pac/src/spi0/psel/miso.rs new file mode 100644 index 0000000..0d76016 --- /dev/null +++ b/down-the-stack/dk_pac/src/spi0/psel/miso.rs @@ -0,0 +1,116 @@ +#[doc = "Register `MISO` 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 `MISO` 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 `PSELMISO` reader - Pin number configuration for SPI MISO signal"] +pub type PSELMISO_R = crate::FieldReader; +#[doc = "Pin number configuration for SPI MISO signal\n\nValue on reset: 4294967295"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +#[repr(u32)] +pub enum PSELMISO_A { + #[doc = "4294967295: Disconnect"] + DISCONNECTED = 4294967295, +} +impl From for u32 { + #[inline(always)] + fn from(variant: PSELMISO_A) -> Self { + variant as _ + } +} +impl PSELMISO_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> Option { + match self.bits { + 4294967295 => Some(PSELMISO_A::DISCONNECTED), + _ => None, + } + } + #[doc = "Checks if the value of the field is `DISCONNECTED`"] + #[inline(always)] + pub fn is_disconnected(&self) -> bool { + *self == PSELMISO_A::DISCONNECTED + } +} +#[doc = "Field `PSELMISO` writer - Pin number configuration for SPI MISO signal"] +pub type PSELMISO_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, MISO_SPEC, u32, PSELMISO_A, 32, O>; +impl<'a, const O: u8> PSELMISO_W<'a, O> { + #[doc = "Disconnect"] + #[inline(always)] + pub fn disconnected(self) -> &'a mut W { + self.variant(PSELMISO_A::DISCONNECTED) + } +} +impl R { + #[doc = "Bits 0:31 - Pin number configuration for SPI MISO signal"] + #[inline(always)] + pub fn pselmiso(&self) -> PSELMISO_R { + PSELMISO_R::new(self.bits) + } +} +impl W { + #[doc = "Bits 0:31 - Pin number configuration for SPI MISO signal"] + #[inline(always)] + #[must_use] + pub fn pselmiso(&mut self) -> PSELMISO_W<0> { + PSELMISO_W::new(self) + } + #[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 = "Pin select for MISO\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 [miso](index.html) module"] +pub struct MISO_SPEC; +impl crate::RegisterSpec for MISO_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [miso::R](R) reader structure"] +impl crate::Readable for MISO_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [miso::W](W) writer structure"] +impl crate::Writable for MISO_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets MISO to value 0xffff_ffff"] +impl crate::Resettable for MISO_SPEC { + const RESET_VALUE: Self::Ux = 0xffff_ffff; +} diff --git a/down-the-stack/dk_pac/src/spi0/psel/mosi.rs b/down-the-stack/dk_pac/src/spi0/psel/mosi.rs new file mode 100644 index 0000000..956ae3b --- /dev/null +++ b/down-the-stack/dk_pac/src/spi0/psel/mosi.rs @@ -0,0 +1,116 @@ +#[doc = "Register `MOSI` 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 `MOSI` 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 `PSELMOSI` reader - Pin number configuration for SPI MOSI signal"] +pub type PSELMOSI_R = crate::FieldReader; +#[doc = "Pin number configuration for SPI MOSI signal\n\nValue on reset: 4294967295"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +#[repr(u32)] +pub enum PSELMOSI_A { + #[doc = "4294967295: Disconnect"] + DISCONNECTED = 4294967295, +} +impl From for u32 { + #[inline(always)] + fn from(variant: PSELMOSI_A) -> Self { + variant as _ + } +} +impl PSELMOSI_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> Option { + match self.bits { + 4294967295 => Some(PSELMOSI_A::DISCONNECTED), + _ => None, + } + } + #[doc = "Checks if the value of the field is `DISCONNECTED`"] + #[inline(always)] + pub fn is_disconnected(&self) -> bool { + *self == PSELMOSI_A::DISCONNECTED + } +} +#[doc = "Field `PSELMOSI` writer - Pin number configuration for SPI MOSI signal"] +pub type PSELMOSI_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, MOSI_SPEC, u32, PSELMOSI_A, 32, O>; +impl<'a, const O: u8> PSELMOSI_W<'a, O> { + #[doc = "Disconnect"] + #[inline(always)] + pub fn disconnected(self) -> &'a mut W { + self.variant(PSELMOSI_A::DISCONNECTED) + } +} +impl R { + #[doc = "Bits 0:31 - Pin number configuration for SPI MOSI signal"] + #[inline(always)] + pub fn pselmosi(&self) -> PSELMOSI_R { + PSELMOSI_R::new(self.bits) + } +} +impl W { + #[doc = "Bits 0:31 - Pin number configuration for SPI MOSI signal"] + #[inline(always)] + #[must_use] + pub fn pselmosi(&mut self) -> PSELMOSI_W<0> { + PSELMOSI_W::new(self) + } + #[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 = "Pin select for MOSI\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 [mosi](index.html) module"] +pub struct MOSI_SPEC; +impl crate::RegisterSpec for MOSI_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [mosi::R](R) reader structure"] +impl crate::Readable for MOSI_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [mosi::W](W) writer structure"] +impl crate::Writable for MOSI_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets MOSI to value 0xffff_ffff"] +impl crate::Resettable for MOSI_SPEC { + const RESET_VALUE: Self::Ux = 0xffff_ffff; +} diff --git a/down-the-stack/dk_pac/src/spi0/psel/sck.rs b/down-the-stack/dk_pac/src/spi0/psel/sck.rs new file mode 100644 index 0000000..fccfad4 --- /dev/null +++ b/down-the-stack/dk_pac/src/spi0/psel/sck.rs @@ -0,0 +1,115 @@ +#[doc = "Register `SCK` 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 `SCK` 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 `PSELSCK` reader - Pin number configuration for SPI SCK signal"] +pub type PSELSCK_R = crate::FieldReader; +#[doc = "Pin number configuration for SPI SCK signal\n\nValue on reset: 4294967295"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +#[repr(u32)] +pub enum PSELSCK_A { + #[doc = "4294967295: Disconnect"] + DISCONNECTED = 4294967295, +} +impl From for u32 { + #[inline(always)] + fn from(variant: PSELSCK_A) -> Self { + variant as _ + } +} +impl PSELSCK_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> Option { + match self.bits { + 4294967295 => Some(PSELSCK_A::DISCONNECTED), + _ => None, + } + } + #[doc = "Checks if the value of the field is `DISCONNECTED`"] + #[inline(always)] + pub fn is_disconnected(&self) -> bool { + *self == PSELSCK_A::DISCONNECTED + } +} +#[doc = "Field `PSELSCK` writer - Pin number configuration for SPI SCK signal"] +pub type PSELSCK_W<'a, const O: u8> = crate::FieldWriter<'a, u32, SCK_SPEC, u32, PSELSCK_A, 32, O>; +impl<'a, const O: u8> PSELSCK_W<'a, O> { + #[doc = "Disconnect"] + #[inline(always)] + pub fn disconnected(self) -> &'a mut W { + self.variant(PSELSCK_A::DISCONNECTED) + } +} +impl R { + #[doc = "Bits 0:31 - Pin number configuration for SPI SCK signal"] + #[inline(always)] + pub fn pselsck(&self) -> PSELSCK_R { + PSELSCK_R::new(self.bits) + } +} +impl W { + #[doc = "Bits 0:31 - Pin number configuration for SPI SCK signal"] + #[inline(always)] + #[must_use] + pub fn pselsck(&mut self) -> PSELSCK_W<0> { + PSELSCK_W::new(self) + } + #[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 = "Pin select for SCK\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 [sck](index.html) module"] +pub struct SCK_SPEC; +impl crate::RegisterSpec for SCK_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [sck::R](R) reader structure"] +impl crate::Readable for SCK_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [sck::W](W) writer structure"] +impl crate::Writable for SCK_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets SCK to value 0xffff_ffff"] +impl crate::Resettable for SCK_SPEC { + const RESET_VALUE: Self::Ux = 0xffff_ffff; +} diff --git a/down-the-stack/dk_pac/src/spi0/rxd.rs b/down-the-stack/dk_pac/src/spi0/rxd.rs new file mode 100644 index 0000000..3e3de6d --- /dev/null +++ b/down-the-stack/dk_pac/src/spi0/rxd.rs @@ -0,0 +1,37 @@ +#[doc = "Register `RXD` 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 = "Field `RXD` reader - RX data received. Double buffered"] +pub type RXD_R = crate::FieldReader; +impl R { + #[doc = "Bits 0:7 - RX data received. Double buffered"] + #[inline(always)] + pub fn rxd(&self) -> RXD_R { + RXD_R::new((self.bits & 0xff) as u8) + } +} +#[doc = "RXD register\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 [rxd](index.html) module"] +pub struct RXD_SPEC; +impl crate::RegisterSpec for RXD_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [rxd::R](R) reader structure"] +impl crate::Readable for RXD_SPEC { + type Reader = R; +} +#[doc = "`reset()` method sets RXD to value 0"] +impl crate::Resettable for RXD_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/spi0/txd.rs b/down-the-stack/dk_pac/src/spi0/txd.rs new file mode 100644 index 0000000..ef270ad --- /dev/null +++ b/down-the-stack/dk_pac/src/spi0/txd.rs @@ -0,0 +1,80 @@ +#[doc = "Register `TXD` 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 `TXD` 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 `TXD` reader - TX data to send. Double buffered"] +pub type TXD_R = crate::FieldReader; +#[doc = "Field `TXD` writer - TX data to send. Double buffered"] +pub type TXD_W<'a, const O: u8> = crate::FieldWriter<'a, u32, TXD_SPEC, u8, u8, 8, O>; +impl R { + #[doc = "Bits 0:7 - TX data to send. Double buffered"] + #[inline(always)] + pub fn txd(&self) -> TXD_R { + TXD_R::new((self.bits & 0xff) as u8) + } +} +impl W { + #[doc = "Bits 0:7 - TX data to send. Double buffered"] + #[inline(always)] + #[must_use] + pub fn txd(&mut self) -> TXD_W<0> { + TXD_W::new(self) + } + #[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 = "TXD register\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 [txd](index.html) module"] +pub struct TXD_SPEC; +impl crate::RegisterSpec for TXD_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [txd::R](R) reader structure"] +impl crate::Readable for TXD_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [txd::W](W) writer structure"] +impl crate::Writable for TXD_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets TXD to value 0"] +impl crate::Resettable for TXD_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/spim0.rs b/down-the-stack/dk_pac/src/spim0.rs new file mode 100644 index 0000000..45ec0da --- /dev/null +++ b/down-the-stack/dk_pac/src/spim0.rs @@ -0,0 +1,135 @@ +#[doc = r"Register block"] +#[repr(C)] +pub struct RegisterBlock { + _reserved0: [u8; 0x10], + #[doc = "0x10 - Start SPI transaction"] + pub tasks_start: TASKS_START, + #[doc = "0x14 - Stop SPI transaction"] + pub tasks_stop: TASKS_STOP, + _reserved2: [u8; 0x04], + #[doc = "0x1c - Suspend SPI transaction"] + pub tasks_suspend: TASKS_SUSPEND, + #[doc = "0x20 - Resume SPI transaction"] + pub tasks_resume: TASKS_RESUME, + _reserved4: [u8; 0xe0], + #[doc = "0x104 - SPI transaction has stopped"] + pub events_stopped: EVENTS_STOPPED, + _reserved5: [u8; 0x08], + #[doc = "0x110 - End of RXD buffer reached"] + pub events_endrx: EVENTS_ENDRX, + _reserved6: [u8; 0x04], + #[doc = "0x118 - End of RXD buffer and TXD buffer reached"] + pub events_end: EVENTS_END, + _reserved7: [u8; 0x04], + #[doc = "0x120 - End of TXD buffer reached"] + pub events_endtx: EVENTS_ENDTX, + _reserved8: [u8; 0x28], + #[doc = "0x14c - Transaction started"] + pub events_started: EVENTS_STARTED, + _reserved9: [u8; 0xb0], + #[doc = "0x200 - Shortcuts between local events and tasks"] + pub shorts: SHORTS, + _reserved10: [u8; 0x0100], + #[doc = "0x304 - Enable interrupt"] + pub intenset: INTENSET, + #[doc = "0x308 - Disable interrupt"] + pub intenclr: INTENCLR, + _reserved12: [u8; 0x01f4], + #[doc = "0x500 - Enable SPIM"] + pub enable: ENABLE, + _reserved13: [u8; 0x04], + #[doc = "0x508..0x514 - Unspecified"] + pub psel: PSEL, + _reserved14: [u8; 0x10], + #[doc = "0x524 - SPI frequency. Accuracy depends on the HFCLK source selected."] + pub frequency: FREQUENCY, + _reserved15: [u8; 0x0c], + #[doc = "0x534..0x544 - RXD EasyDMA channel"] + pub rxd: RXD, + #[doc = "0x544..0x554 - TXD EasyDMA channel"] + pub txd: TXD, + #[doc = "0x554 - Configuration register"] + pub config: CONFIG, + _reserved18: [u8; 0x68], + #[doc = "0x5c0 - Over-read character. Character clocked out in case and over-read of the TXD buffer."] + pub orc: ORC, +} +#[doc = "TASKS_START (w) register accessor: an alias for `Reg`"] +pub type TASKS_START = crate::Reg; +#[doc = "Start SPI transaction"] +pub mod tasks_start; +#[doc = "TASKS_STOP (w) register accessor: an alias for `Reg`"] +pub type TASKS_STOP = crate::Reg; +#[doc = "Stop SPI transaction"] +pub mod tasks_stop; +#[doc = "TASKS_SUSPEND (w) register accessor: an alias for `Reg`"] +pub type TASKS_SUSPEND = crate::Reg; +#[doc = "Suspend SPI transaction"] +pub mod tasks_suspend; +#[doc = "TASKS_RESUME (w) register accessor: an alias for `Reg`"] +pub type TASKS_RESUME = crate::Reg; +#[doc = "Resume SPI transaction"] +pub mod tasks_resume; +#[doc = "EVENTS_STOPPED (rw) register accessor: an alias for `Reg`"] +pub type EVENTS_STOPPED = crate::Reg; +#[doc = "SPI transaction has stopped"] +pub mod events_stopped; +#[doc = "EVENTS_ENDRX (rw) register accessor: an alias for `Reg`"] +pub type EVENTS_ENDRX = crate::Reg; +#[doc = "End of RXD buffer reached"] +pub mod events_endrx; +#[doc = "EVENTS_END (rw) register accessor: an alias for `Reg`"] +pub type EVENTS_END = crate::Reg; +#[doc = "End of RXD buffer and TXD buffer reached"] +pub mod events_end; +#[doc = "EVENTS_ENDTX (rw) register accessor: an alias for `Reg`"] +pub type EVENTS_ENDTX = crate::Reg; +#[doc = "End of TXD buffer reached"] +pub mod events_endtx; +#[doc = "EVENTS_STARTED (rw) register accessor: an alias for `Reg`"] +pub type EVENTS_STARTED = crate::Reg; +#[doc = "Transaction started"] +pub mod events_started; +#[doc = "SHORTS (rw) register accessor: an alias for `Reg`"] +pub type SHORTS = crate::Reg; +#[doc = "Shortcuts between local events and tasks"] +pub mod shorts; +#[doc = "INTENSET (rw) register accessor: an alias for `Reg`"] +pub type INTENSET = crate::Reg; +#[doc = "Enable interrupt"] +pub mod intenset; +#[doc = "INTENCLR (rw) register accessor: an alias for `Reg`"] +pub type INTENCLR = crate::Reg; +#[doc = "Disable interrupt"] +pub mod intenclr; +#[doc = "ENABLE (rw) register accessor: an alias for `Reg`"] +pub type ENABLE = crate::Reg; +#[doc = "Enable SPIM"] +pub mod enable; +#[doc = "Unspecified"] +pub use self::psel::PSEL; +#[doc = r"Cluster"] +#[doc = "Unspecified"] +pub mod psel; +#[doc = "FREQUENCY (rw) register accessor: an alias for `Reg`"] +pub type FREQUENCY = crate::Reg; +#[doc = "SPI frequency. Accuracy depends on the HFCLK source selected."] +pub mod frequency; +#[doc = "RXD EasyDMA channel"] +pub use self::rxd::RXD; +#[doc = r"Cluster"] +#[doc = "RXD EasyDMA channel"] +pub mod rxd; +#[doc = "TXD EasyDMA channel"] +pub use self::txd::TXD; +#[doc = r"Cluster"] +#[doc = "TXD EasyDMA channel"] +pub mod txd; +#[doc = "CONFIG (rw) register accessor: an alias for `Reg`"] +pub type CONFIG = crate::Reg; +#[doc = "Configuration register"] +pub mod config; +#[doc = "ORC (rw) register accessor: an alias for `Reg`"] +pub type ORC = crate::Reg; +#[doc = "Over-read character. Character clocked out in case and over-read of the TXD buffer."] +pub mod orc; diff --git a/down-the-stack/dk_pac/src/spim0/config.rs b/down-the-stack/dk_pac/src/spim0/config.rs new file mode 100644 index 0000000..daad954 --- /dev/null +++ b/down-the-stack/dk_pac/src/spim0/config.rs @@ -0,0 +1,248 @@ +#[doc = "Register `CONFIG` 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 `CONFIG` 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 `ORDER` reader - Bit order"] +pub type ORDER_R = crate::BitReader; +#[doc = "Bit order\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum ORDER_A { + #[doc = "0: Most significant bit shifted out first"] + MSB_FIRST = 0, + #[doc = "1: Least significant bit shifted out first"] + LSB_FIRST = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: ORDER_A) -> Self { + variant as u8 != 0 + } +} +impl ORDER_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> ORDER_A { + match self.bits { + false => ORDER_A::MSB_FIRST, + true => ORDER_A::LSB_FIRST, + } + } + #[doc = "Checks if the value of the field is `MSB_FIRST`"] + #[inline(always)] + pub fn is_msb_first(&self) -> bool { + *self == ORDER_A::MSB_FIRST + } + #[doc = "Checks if the value of the field is `LSB_FIRST`"] + #[inline(always)] + pub fn is_lsb_first(&self) -> bool { + *self == ORDER_A::LSB_FIRST + } +} +#[doc = "Field `ORDER` writer - Bit order"] +pub type ORDER_W<'a, const O: u8> = crate::BitWriter<'a, u32, CONFIG_SPEC, ORDER_A, O>; +impl<'a, const O: u8> ORDER_W<'a, O> { + #[doc = "Most significant bit shifted out first"] + #[inline(always)] + pub fn msb_first(self) -> &'a mut W { + self.variant(ORDER_A::MSB_FIRST) + } + #[doc = "Least significant bit shifted out first"] + #[inline(always)] + pub fn lsb_first(self) -> &'a mut W { + self.variant(ORDER_A::LSB_FIRST) + } +} +#[doc = "Field `CPHA` reader - Serial clock (SCK) phase"] +pub type CPHA_R = crate::BitReader; +#[doc = "Serial clock (SCK) phase\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum CPHA_A { + #[doc = "0: Sample on leading edge of clock, shift serial data on trailing edge"] + LEADING = 0, + #[doc = "1: Sample on trailing edge of clock, shift serial data on leading edge"] + TRAILING = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: CPHA_A) -> Self { + variant as u8 != 0 + } +} +impl CPHA_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> CPHA_A { + match self.bits { + false => CPHA_A::LEADING, + true => CPHA_A::TRAILING, + } + } + #[doc = "Checks if the value of the field is `LEADING`"] + #[inline(always)] + pub fn is_leading(&self) -> bool { + *self == CPHA_A::LEADING + } + #[doc = "Checks if the value of the field is `TRAILING`"] + #[inline(always)] + pub fn is_trailing(&self) -> bool { + *self == CPHA_A::TRAILING + } +} +#[doc = "Field `CPHA` writer - Serial clock (SCK) phase"] +pub type CPHA_W<'a, const O: u8> = crate::BitWriter<'a, u32, CONFIG_SPEC, CPHA_A, O>; +impl<'a, const O: u8> CPHA_W<'a, O> { + #[doc = "Sample on leading edge of clock, shift serial data on trailing edge"] + #[inline(always)] + pub fn leading(self) -> &'a mut W { + self.variant(CPHA_A::LEADING) + } + #[doc = "Sample on trailing edge of clock, shift serial data on leading edge"] + #[inline(always)] + pub fn trailing(self) -> &'a mut W { + self.variant(CPHA_A::TRAILING) + } +} +#[doc = "Field `CPOL` reader - Serial clock (SCK) polarity"] +pub type CPOL_R = crate::BitReader; +#[doc = "Serial clock (SCK) polarity\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum CPOL_A { + #[doc = "0: Active high"] + ACTIVE_HIGH = 0, + #[doc = "1: Active low"] + ACTIVE_LOW = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: CPOL_A) -> Self { + variant as u8 != 0 + } +} +impl CPOL_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> CPOL_A { + match self.bits { + false => CPOL_A::ACTIVE_HIGH, + true => CPOL_A::ACTIVE_LOW, + } + } + #[doc = "Checks if the value of the field is `ACTIVE_HIGH`"] + #[inline(always)] + pub fn is_active_high(&self) -> bool { + *self == CPOL_A::ACTIVE_HIGH + } + #[doc = "Checks if the value of the field is `ACTIVE_LOW`"] + #[inline(always)] + pub fn is_active_low(&self) -> bool { + *self == CPOL_A::ACTIVE_LOW + } +} +#[doc = "Field `CPOL` writer - Serial clock (SCK) polarity"] +pub type CPOL_W<'a, const O: u8> = crate::BitWriter<'a, u32, CONFIG_SPEC, CPOL_A, O>; +impl<'a, const O: u8> CPOL_W<'a, O> { + #[doc = "Active high"] + #[inline(always)] + pub fn active_high(self) -> &'a mut W { + self.variant(CPOL_A::ACTIVE_HIGH) + } + #[doc = "Active low"] + #[inline(always)] + pub fn active_low(self) -> &'a mut W { + self.variant(CPOL_A::ACTIVE_LOW) + } +} +impl R { + #[doc = "Bit 0 - Bit order"] + #[inline(always)] + pub fn order(&self) -> ORDER_R { + ORDER_R::new((self.bits & 1) != 0) + } + #[doc = "Bit 1 - Serial clock (SCK) phase"] + #[inline(always)] + pub fn cpha(&self) -> CPHA_R { + CPHA_R::new(((self.bits >> 1) & 1) != 0) + } + #[doc = "Bit 2 - Serial clock (SCK) polarity"] + #[inline(always)] + pub fn cpol(&self) -> CPOL_R { + CPOL_R::new(((self.bits >> 2) & 1) != 0) + } +} +impl W { + #[doc = "Bit 0 - Bit order"] + #[inline(always)] + #[must_use] + pub fn order(&mut self) -> ORDER_W<0> { + ORDER_W::new(self) + } + #[doc = "Bit 1 - Serial clock (SCK) phase"] + #[inline(always)] + #[must_use] + pub fn cpha(&mut self) -> CPHA_W<1> { + CPHA_W::new(self) + } + #[doc = "Bit 2 - Serial clock (SCK) polarity"] + #[inline(always)] + #[must_use] + pub fn cpol(&mut self) -> CPOL_W<2> { + CPOL_W::new(self) + } + #[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 = "Configuration register\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 [config](index.html) module"] +pub struct CONFIG_SPEC; +impl crate::RegisterSpec for CONFIG_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [config::R](R) reader structure"] +impl crate::Readable for CONFIG_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [config::W](W) writer structure"] +impl crate::Writable for 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 CONFIG to value 0"] +impl crate::Resettable for CONFIG_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/spim0/enable.rs b/down-the-stack/dk_pac/src/spim0/enable.rs new file mode 100644 index 0000000..ec04164 --- /dev/null +++ b/down-the-stack/dk_pac/src/spim0/enable.rs @@ -0,0 +1,128 @@ +#[doc = "Register `ENABLE` 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 `ENABLE` 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 `ENABLE` reader - Enable or disable SPIM"] +pub type ENABLE_R = crate::FieldReader; +#[doc = "Enable or disable SPIM\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +#[repr(u8)] +pub enum ENABLE_A { + #[doc = "0: Disable SPIM"] + DISABLED = 0, + #[doc = "7: Enable SPIM"] + ENABLED = 7, +} +impl From for u8 { + #[inline(always)] + fn from(variant: ENABLE_A) -> Self { + variant as _ + } +} +impl ENABLE_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> Option { + match self.bits { + 0 => Some(ENABLE_A::DISABLED), + 7 => Some(ENABLE_A::ENABLED), + _ => None, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == ENABLE_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == ENABLE_A::ENABLED + } +} +#[doc = "Field `ENABLE` writer - Enable or disable SPIM"] +pub type ENABLE_W<'a, const O: u8> = crate::FieldWriter<'a, u32, ENABLE_SPEC, u8, ENABLE_A, 4, O>; +impl<'a, const O: u8> ENABLE_W<'a, O> { + #[doc = "Disable SPIM"] + #[inline(always)] + pub fn disabled(self) -> &'a mut W { + self.variant(ENABLE_A::DISABLED) + } + #[doc = "Enable SPIM"] + #[inline(always)] + pub fn enabled(self) -> &'a mut W { + self.variant(ENABLE_A::ENABLED) + } +} +impl R { + #[doc = "Bits 0:3 - Enable or disable SPIM"] + #[inline(always)] + pub fn enable(&self) -> ENABLE_R { + ENABLE_R::new((self.bits & 0x0f) as u8) + } +} +impl W { + #[doc = "Bits 0:3 - Enable or disable SPIM"] + #[inline(always)] + #[must_use] + pub fn enable(&mut self) -> ENABLE_W<0> { + 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 + } +} +#[doc = "Enable SPIM\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 [enable](index.html) module"] +pub struct ENABLE_SPEC; +impl crate::RegisterSpec for ENABLE_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [enable::R](R) reader structure"] +impl crate::Readable for ENABLE_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [enable::W](W) writer structure"] +impl crate::Writable for ENABLE_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets ENABLE to value 0"] +impl crate::Resettable for ENABLE_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/spim0/events_end.rs b/down-the-stack/dk_pac/src/spim0/events_end.rs new file mode 100644 index 0000000..81510b5 --- /dev/null +++ b/down-the-stack/dk_pac/src/spim0/events_end.rs @@ -0,0 +1,127 @@ +#[doc = "Register `EVENTS_END` 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 `EVENTS_END` 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 `EVENTS_END` reader - End of RXD buffer and TXD buffer reached"] +pub type EVENTS_END_R = crate::BitReader; +#[doc = "End of RXD buffer and TXD buffer reached\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum EVENTS_END_A { + #[doc = "0: Event not generated"] + NOT_GENERATED = 0, + #[doc = "1: Event generated"] + GENERATED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: EVENTS_END_A) -> Self { + variant as u8 != 0 + } +} +impl EVENTS_END_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> EVENTS_END_A { + match self.bits { + false => EVENTS_END_A::NOT_GENERATED, + true => EVENTS_END_A::GENERATED, + } + } + #[doc = "Checks if the value of the field is `NOT_GENERATED`"] + #[inline(always)] + pub fn is_not_generated(&self) -> bool { + *self == EVENTS_END_A::NOT_GENERATED + } + #[doc = "Checks if the value of the field is `GENERATED`"] + #[inline(always)] + pub fn is_generated(&self) -> bool { + *self == EVENTS_END_A::GENERATED + } +} +#[doc = "Field `EVENTS_END` writer - End of RXD buffer and TXD buffer reached"] +pub type EVENTS_END_W<'a, const O: u8> = + crate::BitWriter<'a, u32, EVENTS_END_SPEC, EVENTS_END_A, O>; +impl<'a, const O: u8> EVENTS_END_W<'a, O> { + #[doc = "Event not generated"] + #[inline(always)] + pub fn not_generated(self) -> &'a mut W { + self.variant(EVENTS_END_A::NOT_GENERATED) + } + #[doc = "Event generated"] + #[inline(always)] + pub fn generated(self) -> &'a mut W { + self.variant(EVENTS_END_A::GENERATED) + } +} +impl R { + #[doc = "Bit 0 - End of RXD buffer and TXD buffer reached"] + #[inline(always)] + pub fn events_end(&self) -> EVENTS_END_R { + EVENTS_END_R::new((self.bits & 1) != 0) + } +} +impl W { + #[doc = "Bit 0 - End of RXD buffer and TXD buffer reached"] + #[inline(always)] + #[must_use] + pub fn events_end(&mut self) -> EVENTS_END_W<0> { + EVENTS_END_W::new(self) + } + #[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 = "End of RXD buffer and TXD buffer reached\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 [events_end](index.html) module"] +pub struct EVENTS_END_SPEC; +impl crate::RegisterSpec for EVENTS_END_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [events_end::R](R) reader structure"] +impl crate::Readable for EVENTS_END_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [events_end::W](W) writer structure"] +impl crate::Writable for EVENTS_END_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets EVENTS_END to value 0"] +impl crate::Resettable for EVENTS_END_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/spim0/events_endrx.rs b/down-the-stack/dk_pac/src/spim0/events_endrx.rs new file mode 100644 index 0000000..0bafc6a --- /dev/null +++ b/down-the-stack/dk_pac/src/spim0/events_endrx.rs @@ -0,0 +1,127 @@ +#[doc = "Register `EVENTS_ENDRX` 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 `EVENTS_ENDRX` 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 `EVENTS_ENDRX` reader - End of RXD buffer reached"] +pub type EVENTS_ENDRX_R = crate::BitReader; +#[doc = "End of RXD buffer reached\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum EVENTS_ENDRX_A { + #[doc = "0: Event not generated"] + NOT_GENERATED = 0, + #[doc = "1: Event generated"] + GENERATED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: EVENTS_ENDRX_A) -> Self { + variant as u8 != 0 + } +} +impl EVENTS_ENDRX_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> EVENTS_ENDRX_A { + match self.bits { + false => EVENTS_ENDRX_A::NOT_GENERATED, + true => EVENTS_ENDRX_A::GENERATED, + } + } + #[doc = "Checks if the value of the field is `NOT_GENERATED`"] + #[inline(always)] + pub fn is_not_generated(&self) -> bool { + *self == EVENTS_ENDRX_A::NOT_GENERATED + } + #[doc = "Checks if the value of the field is `GENERATED`"] + #[inline(always)] + pub fn is_generated(&self) -> bool { + *self == EVENTS_ENDRX_A::GENERATED + } +} +#[doc = "Field `EVENTS_ENDRX` writer - End of RXD buffer reached"] +pub type EVENTS_ENDRX_W<'a, const O: u8> = + crate::BitWriter<'a, u32, EVENTS_ENDRX_SPEC, EVENTS_ENDRX_A, O>; +impl<'a, const O: u8> EVENTS_ENDRX_W<'a, O> { + #[doc = "Event not generated"] + #[inline(always)] + pub fn not_generated(self) -> &'a mut W { + self.variant(EVENTS_ENDRX_A::NOT_GENERATED) + } + #[doc = "Event generated"] + #[inline(always)] + pub fn generated(self) -> &'a mut W { + self.variant(EVENTS_ENDRX_A::GENERATED) + } +} +impl R { + #[doc = "Bit 0 - End of RXD buffer reached"] + #[inline(always)] + pub fn events_endrx(&self) -> EVENTS_ENDRX_R { + EVENTS_ENDRX_R::new((self.bits & 1) != 0) + } +} +impl W { + #[doc = "Bit 0 - End of RXD buffer reached"] + #[inline(always)] + #[must_use] + pub fn events_endrx(&mut self) -> EVENTS_ENDRX_W<0> { + EVENTS_ENDRX_W::new(self) + } + #[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 = "End of RXD buffer reached\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 [events_endrx](index.html) module"] +pub struct EVENTS_ENDRX_SPEC; +impl crate::RegisterSpec for EVENTS_ENDRX_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [events_endrx::R](R) reader structure"] +impl crate::Readable for EVENTS_ENDRX_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [events_endrx::W](W) writer structure"] +impl crate::Writable for EVENTS_ENDRX_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets EVENTS_ENDRX to value 0"] +impl crate::Resettable for EVENTS_ENDRX_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/spim0/events_endtx.rs b/down-the-stack/dk_pac/src/spim0/events_endtx.rs new file mode 100644 index 0000000..1302da9 --- /dev/null +++ b/down-the-stack/dk_pac/src/spim0/events_endtx.rs @@ -0,0 +1,127 @@ +#[doc = "Register `EVENTS_ENDTX` 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 `EVENTS_ENDTX` 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 `EVENTS_ENDTX` reader - End of TXD buffer reached"] +pub type EVENTS_ENDTX_R = crate::BitReader; +#[doc = "End of TXD buffer reached\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum EVENTS_ENDTX_A { + #[doc = "0: Event not generated"] + NOT_GENERATED = 0, + #[doc = "1: Event generated"] + GENERATED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: EVENTS_ENDTX_A) -> Self { + variant as u8 != 0 + } +} +impl EVENTS_ENDTX_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> EVENTS_ENDTX_A { + match self.bits { + false => EVENTS_ENDTX_A::NOT_GENERATED, + true => EVENTS_ENDTX_A::GENERATED, + } + } + #[doc = "Checks if the value of the field is `NOT_GENERATED`"] + #[inline(always)] + pub fn is_not_generated(&self) -> bool { + *self == EVENTS_ENDTX_A::NOT_GENERATED + } + #[doc = "Checks if the value of the field is `GENERATED`"] + #[inline(always)] + pub fn is_generated(&self) -> bool { + *self == EVENTS_ENDTX_A::GENERATED + } +} +#[doc = "Field `EVENTS_ENDTX` writer - End of TXD buffer reached"] +pub type EVENTS_ENDTX_W<'a, const O: u8> = + crate::BitWriter<'a, u32, EVENTS_ENDTX_SPEC, EVENTS_ENDTX_A, O>; +impl<'a, const O: u8> EVENTS_ENDTX_W<'a, O> { + #[doc = "Event not generated"] + #[inline(always)] + pub fn not_generated(self) -> &'a mut W { + self.variant(EVENTS_ENDTX_A::NOT_GENERATED) + } + #[doc = "Event generated"] + #[inline(always)] + pub fn generated(self) -> &'a mut W { + self.variant(EVENTS_ENDTX_A::GENERATED) + } +} +impl R { + #[doc = "Bit 0 - End of TXD buffer reached"] + #[inline(always)] + pub fn events_endtx(&self) -> EVENTS_ENDTX_R { + EVENTS_ENDTX_R::new((self.bits & 1) != 0) + } +} +impl W { + #[doc = "Bit 0 - End of TXD buffer reached"] + #[inline(always)] + #[must_use] + pub fn events_endtx(&mut self) -> EVENTS_ENDTX_W<0> { + EVENTS_ENDTX_W::new(self) + } + #[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 = "End of TXD buffer reached\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 [events_endtx](index.html) module"] +pub struct EVENTS_ENDTX_SPEC; +impl crate::RegisterSpec for EVENTS_ENDTX_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [events_endtx::R](R) reader structure"] +impl crate::Readable for EVENTS_ENDTX_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [events_endtx::W](W) writer structure"] +impl crate::Writable for EVENTS_ENDTX_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets EVENTS_ENDTX to value 0"] +impl crate::Resettable for EVENTS_ENDTX_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/spim0/events_started.rs b/down-the-stack/dk_pac/src/spim0/events_started.rs new file mode 100644 index 0000000..34ea6b2 --- /dev/null +++ b/down-the-stack/dk_pac/src/spim0/events_started.rs @@ -0,0 +1,127 @@ +#[doc = "Register `EVENTS_STARTED` 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 `EVENTS_STARTED` 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 `EVENTS_STARTED` reader - Transaction started"] +pub type EVENTS_STARTED_R = crate::BitReader; +#[doc = "Transaction started\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum EVENTS_STARTED_A { + #[doc = "0: Event not generated"] + NOT_GENERATED = 0, + #[doc = "1: Event generated"] + GENERATED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: EVENTS_STARTED_A) -> Self { + variant as u8 != 0 + } +} +impl EVENTS_STARTED_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> EVENTS_STARTED_A { + match self.bits { + false => EVENTS_STARTED_A::NOT_GENERATED, + true => EVENTS_STARTED_A::GENERATED, + } + } + #[doc = "Checks if the value of the field is `NOT_GENERATED`"] + #[inline(always)] + pub fn is_not_generated(&self) -> bool { + *self == EVENTS_STARTED_A::NOT_GENERATED + } + #[doc = "Checks if the value of the field is `GENERATED`"] + #[inline(always)] + pub fn is_generated(&self) -> bool { + *self == EVENTS_STARTED_A::GENERATED + } +} +#[doc = "Field `EVENTS_STARTED` writer - Transaction started"] +pub type EVENTS_STARTED_W<'a, const O: u8> = + crate::BitWriter<'a, u32, EVENTS_STARTED_SPEC, EVENTS_STARTED_A, O>; +impl<'a, const O: u8> EVENTS_STARTED_W<'a, O> { + #[doc = "Event not generated"] + #[inline(always)] + pub fn not_generated(self) -> &'a mut W { + self.variant(EVENTS_STARTED_A::NOT_GENERATED) + } + #[doc = "Event generated"] + #[inline(always)] + pub fn generated(self) -> &'a mut W { + self.variant(EVENTS_STARTED_A::GENERATED) + } +} +impl R { + #[doc = "Bit 0 - Transaction started"] + #[inline(always)] + pub fn events_started(&self) -> EVENTS_STARTED_R { + EVENTS_STARTED_R::new((self.bits & 1) != 0) + } +} +impl W { + #[doc = "Bit 0 - Transaction started"] + #[inline(always)] + #[must_use] + pub fn events_started(&mut self) -> EVENTS_STARTED_W<0> { + EVENTS_STARTED_W::new(self) + } + #[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 = "Transaction started\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 [events_started](index.html) module"] +pub struct EVENTS_STARTED_SPEC; +impl crate::RegisterSpec for EVENTS_STARTED_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [events_started::R](R) reader structure"] +impl crate::Readable for EVENTS_STARTED_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [events_started::W](W) writer structure"] +impl crate::Writable for EVENTS_STARTED_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets EVENTS_STARTED to value 0"] +impl crate::Resettable for EVENTS_STARTED_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/spim0/events_stopped.rs b/down-the-stack/dk_pac/src/spim0/events_stopped.rs new file mode 100644 index 0000000..a7d323b --- /dev/null +++ b/down-the-stack/dk_pac/src/spim0/events_stopped.rs @@ -0,0 +1,127 @@ +#[doc = "Register `EVENTS_STOPPED` 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 `EVENTS_STOPPED` 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 `EVENTS_STOPPED` reader - SPI transaction has stopped"] +pub type EVENTS_STOPPED_R = crate::BitReader; +#[doc = "SPI transaction has stopped\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum EVENTS_STOPPED_A { + #[doc = "0: Event not generated"] + NOT_GENERATED = 0, + #[doc = "1: Event generated"] + GENERATED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: EVENTS_STOPPED_A) -> Self { + variant as u8 != 0 + } +} +impl EVENTS_STOPPED_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> EVENTS_STOPPED_A { + match self.bits { + false => EVENTS_STOPPED_A::NOT_GENERATED, + true => EVENTS_STOPPED_A::GENERATED, + } + } + #[doc = "Checks if the value of the field is `NOT_GENERATED`"] + #[inline(always)] + pub fn is_not_generated(&self) -> bool { + *self == EVENTS_STOPPED_A::NOT_GENERATED + } + #[doc = "Checks if the value of the field is `GENERATED`"] + #[inline(always)] + pub fn is_generated(&self) -> bool { + *self == EVENTS_STOPPED_A::GENERATED + } +} +#[doc = "Field `EVENTS_STOPPED` writer - SPI transaction has stopped"] +pub type EVENTS_STOPPED_W<'a, const O: u8> = + crate::BitWriter<'a, u32, EVENTS_STOPPED_SPEC, EVENTS_STOPPED_A, O>; +impl<'a, const O: u8> EVENTS_STOPPED_W<'a, O> { + #[doc = "Event not generated"] + #[inline(always)] + pub fn not_generated(self) -> &'a mut W { + self.variant(EVENTS_STOPPED_A::NOT_GENERATED) + } + #[doc = "Event generated"] + #[inline(always)] + pub fn generated(self) -> &'a mut W { + self.variant(EVENTS_STOPPED_A::GENERATED) + } +} +impl R { + #[doc = "Bit 0 - SPI transaction has stopped"] + #[inline(always)] + pub fn events_stopped(&self) -> EVENTS_STOPPED_R { + EVENTS_STOPPED_R::new((self.bits & 1) != 0) + } +} +impl W { + #[doc = "Bit 0 - SPI transaction has stopped"] + #[inline(always)] + #[must_use] + pub fn events_stopped(&mut self) -> EVENTS_STOPPED_W<0> { + EVENTS_STOPPED_W::new(self) + } + #[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 = "SPI transaction has stopped\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 [events_stopped](index.html) module"] +pub struct EVENTS_STOPPED_SPEC; +impl crate::RegisterSpec for EVENTS_STOPPED_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [events_stopped::R](R) reader structure"] +impl crate::Readable for EVENTS_STOPPED_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [events_stopped::W](W) writer structure"] +impl crate::Writable for EVENTS_STOPPED_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets EVENTS_STOPPED to value 0"] +impl crate::Resettable for EVENTS_STOPPED_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/spim0/frequency.rs b/down-the-stack/dk_pac/src/spim0/frequency.rs new file mode 100644 index 0000000..78619a3 --- /dev/null +++ b/down-the-stack/dk_pac/src/spim0/frequency.rs @@ -0,0 +1,194 @@ +#[doc = "Register `FREQUENCY` 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 `FREQUENCY` 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 `FREQUENCY` reader - SPI master data rate"] +pub type FREQUENCY_R = crate::FieldReader; +#[doc = "SPI master data rate\n\nValue on reset: 67108864"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +#[repr(u32)] +pub enum FREQUENCY_A { + #[doc = "33554432: 125 kbps"] + K125 = 33554432, + #[doc = "67108864: 250 kbps"] + K250 = 67108864, + #[doc = "134217728: 500 kbps"] + K500 = 134217728, + #[doc = "268435456: 1 Mbps"] + M1 = 268435456, + #[doc = "536870912: 2 Mbps"] + M2 = 536870912, + #[doc = "1073741824: 4 Mbps"] + M4 = 1073741824, + #[doc = "2147483648: 8 Mbps"] + M8 = 2147483648, +} +impl From for u32 { + #[inline(always)] + fn from(variant: FREQUENCY_A) -> Self { + variant as _ + } +} +impl FREQUENCY_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> Option { + match self.bits { + 33554432 => Some(FREQUENCY_A::K125), + 67108864 => Some(FREQUENCY_A::K250), + 134217728 => Some(FREQUENCY_A::K500), + 268435456 => Some(FREQUENCY_A::M1), + 536870912 => Some(FREQUENCY_A::M2), + 1073741824 => Some(FREQUENCY_A::M4), + 2147483648 => Some(FREQUENCY_A::M8), + _ => None, + } + } + #[doc = "Checks if the value of the field is `K125`"] + #[inline(always)] + pub fn is_k125(&self) -> bool { + *self == FREQUENCY_A::K125 + } + #[doc = "Checks if the value of the field is `K250`"] + #[inline(always)] + pub fn is_k250(&self) -> bool { + *self == FREQUENCY_A::K250 + } + #[doc = "Checks if the value of the field is `K500`"] + #[inline(always)] + pub fn is_k500(&self) -> bool { + *self == FREQUENCY_A::K500 + } + #[doc = "Checks if the value of the field is `M1`"] + #[inline(always)] + pub fn is_m1(&self) -> bool { + *self == FREQUENCY_A::M1 + } + #[doc = "Checks if the value of the field is `M2`"] + #[inline(always)] + pub fn is_m2(&self) -> bool { + *self == FREQUENCY_A::M2 + } + #[doc = "Checks if the value of the field is `M4`"] + #[inline(always)] + pub fn is_m4(&self) -> bool { + *self == FREQUENCY_A::M4 + } + #[doc = "Checks if the value of the field is `M8`"] + #[inline(always)] + pub fn is_m8(&self) -> bool { + *self == FREQUENCY_A::M8 + } +} +#[doc = "Field `FREQUENCY` writer - SPI master data rate"] +pub type FREQUENCY_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, FREQUENCY_SPEC, u32, FREQUENCY_A, 32, O>; +impl<'a, const O: u8> FREQUENCY_W<'a, O> { + #[doc = "125 kbps"] + #[inline(always)] + pub fn k125(self) -> &'a mut W { + self.variant(FREQUENCY_A::K125) + } + #[doc = "250 kbps"] + #[inline(always)] + pub fn k250(self) -> &'a mut W { + self.variant(FREQUENCY_A::K250) + } + #[doc = "500 kbps"] + #[inline(always)] + pub fn k500(self) -> &'a mut W { + self.variant(FREQUENCY_A::K500) + } + #[doc = "1 Mbps"] + #[inline(always)] + pub fn m1(self) -> &'a mut W { + self.variant(FREQUENCY_A::M1) + } + #[doc = "2 Mbps"] + #[inline(always)] + pub fn m2(self) -> &'a mut W { + self.variant(FREQUENCY_A::M2) + } + #[doc = "4 Mbps"] + #[inline(always)] + pub fn m4(self) -> &'a mut W { + self.variant(FREQUENCY_A::M4) + } + #[doc = "8 Mbps"] + #[inline(always)] + pub fn m8(self) -> &'a mut W { + self.variant(FREQUENCY_A::M8) + } +} +impl R { + #[doc = "Bits 0:31 - SPI master data rate"] + #[inline(always)] + pub fn frequency(&self) -> FREQUENCY_R { + FREQUENCY_R::new(self.bits) + } +} +impl W { + #[doc = "Bits 0:31 - SPI master data rate"] + #[inline(always)] + #[must_use] + pub fn frequency(&mut self) -> FREQUENCY_W<0> { + FREQUENCY_W::new(self) + } + #[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 = "SPI frequency. Accuracy depends on the HFCLK source selected.\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 [frequency](index.html) module"] +pub struct FREQUENCY_SPEC; +impl crate::RegisterSpec for FREQUENCY_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [frequency::R](R) reader structure"] +impl crate::Readable for FREQUENCY_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [frequency::W](W) writer structure"] +impl crate::Writable for FREQUENCY_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets FREQUENCY to value 0x0400_0000"] +impl crate::Resettable for FREQUENCY_SPEC { + const RESET_VALUE: Self::Ux = 0x0400_0000; +} diff --git a/down-the-stack/dk_pac/src/spim0/intenclr.rs b/down-the-stack/dk_pac/src/spim0/intenclr.rs new file mode 100644 index 0000000..46a7141 --- /dev/null +++ b/down-the-stack/dk_pac/src/spim0/intenclr.rs @@ -0,0 +1,405 @@ +#[doc = "Register `INTENCLR` 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 `INTENCLR` 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 `STOPPED` reader - Write '1' to disable interrupt for event STOPPED"] +pub type STOPPED_R = crate::BitReader; +#[doc = "Write '1' to disable interrupt for event STOPPED\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum STOPPED_A { + #[doc = "0: Read: Disabled"] + DISABLED = 0, + #[doc = "1: Read: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: STOPPED_A) -> Self { + variant as u8 != 0 + } +} +impl STOPPED_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> STOPPED_A { + match self.bits { + false => STOPPED_A::DISABLED, + true => STOPPED_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == STOPPED_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == STOPPED_A::ENABLED + } +} +#[doc = "Write '1' to disable interrupt for event STOPPED\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum STOPPED_AW { + #[doc = "1: Disable"] + CLEAR = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: STOPPED_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `STOPPED` writer - Write '1' to disable interrupt for event STOPPED"] +pub type STOPPED_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENCLR_SPEC, STOPPED_AW, O>; +impl<'a, const O: u8> STOPPED_W<'a, O> { + #[doc = "Disable"] + #[inline(always)] + pub fn clear(self) -> &'a mut W { + self.variant(STOPPED_AW::CLEAR) + } +} +#[doc = "Field `ENDRX` reader - Write '1' to disable interrupt for event ENDRX"] +pub type ENDRX_R = crate::BitReader; +#[doc = "Write '1' to disable interrupt for event ENDRX\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum ENDRX_A { + #[doc = "0: Read: Disabled"] + DISABLED = 0, + #[doc = "1: Read: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: ENDRX_A) -> Self { + variant as u8 != 0 + } +} +impl ENDRX_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> ENDRX_A { + match self.bits { + false => ENDRX_A::DISABLED, + true => ENDRX_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == ENDRX_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == ENDRX_A::ENABLED + } +} +#[doc = "Write '1' to disable interrupt for event ENDRX\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum ENDRX_AW { + #[doc = "1: Disable"] + CLEAR = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: ENDRX_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `ENDRX` writer - Write '1' to disable interrupt for event ENDRX"] +pub type ENDRX_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENCLR_SPEC, ENDRX_AW, O>; +impl<'a, const O: u8> ENDRX_W<'a, O> { + #[doc = "Disable"] + #[inline(always)] + pub fn clear(self) -> &'a mut W { + self.variant(ENDRX_AW::CLEAR) + } +} +#[doc = "Field `END` reader - Write '1' to disable interrupt for event END"] +pub type END_R = crate::BitReader; +#[doc = "Write '1' to disable interrupt for event END\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum END_A { + #[doc = "0: Read: Disabled"] + DISABLED = 0, + #[doc = "1: Read: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: END_A) -> Self { + variant as u8 != 0 + } +} +impl END_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> END_A { + match self.bits { + false => END_A::DISABLED, + true => END_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == END_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == END_A::ENABLED + } +} +#[doc = "Write '1' to disable interrupt for event END\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum END_AW { + #[doc = "1: Disable"] + CLEAR = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: END_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `END` writer - Write '1' to disable interrupt for event END"] +pub type END_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENCLR_SPEC, END_AW, O>; +impl<'a, const O: u8> END_W<'a, O> { + #[doc = "Disable"] + #[inline(always)] + pub fn clear(self) -> &'a mut W { + self.variant(END_AW::CLEAR) + } +} +#[doc = "Field `ENDTX` reader - Write '1' to disable interrupt for event ENDTX"] +pub type ENDTX_R = crate::BitReader; +#[doc = "Write '1' to disable interrupt for event ENDTX\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum ENDTX_A { + #[doc = "0: Read: Disabled"] + DISABLED = 0, + #[doc = "1: Read: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: ENDTX_A) -> Self { + variant as u8 != 0 + } +} +impl ENDTX_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> ENDTX_A { + match self.bits { + false => ENDTX_A::DISABLED, + true => ENDTX_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == ENDTX_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == ENDTX_A::ENABLED + } +} +#[doc = "Write '1' to disable interrupt for event ENDTX\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum ENDTX_AW { + #[doc = "1: Disable"] + CLEAR = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: ENDTX_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `ENDTX` writer - Write '1' to disable interrupt for event ENDTX"] +pub type ENDTX_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENCLR_SPEC, ENDTX_AW, O>; +impl<'a, const O: u8> ENDTX_W<'a, O> { + #[doc = "Disable"] + #[inline(always)] + pub fn clear(self) -> &'a mut W { + self.variant(ENDTX_AW::CLEAR) + } +} +#[doc = "Field `STARTED` reader - Write '1' to disable interrupt for event STARTED"] +pub type STARTED_R = crate::BitReader; +#[doc = "Write '1' to disable interrupt for event STARTED\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum STARTED_A { + #[doc = "0: Read: Disabled"] + DISABLED = 0, + #[doc = "1: Read: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: STARTED_A) -> Self { + variant as u8 != 0 + } +} +impl STARTED_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> STARTED_A { + match self.bits { + false => STARTED_A::DISABLED, + true => STARTED_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == STARTED_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == STARTED_A::ENABLED + } +} +#[doc = "Write '1' to disable interrupt for event STARTED\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum STARTED_AW { + #[doc = "1: Disable"] + CLEAR = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: STARTED_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `STARTED` writer - Write '1' to disable interrupt for event STARTED"] +pub type STARTED_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENCLR_SPEC, STARTED_AW, O>; +impl<'a, const O: u8> STARTED_W<'a, O> { + #[doc = "Disable"] + #[inline(always)] + pub fn clear(self) -> &'a mut W { + self.variant(STARTED_AW::CLEAR) + } +} +impl R { + #[doc = "Bit 1 - Write '1' to disable interrupt for event STOPPED"] + #[inline(always)] + pub fn stopped(&self) -> STOPPED_R { + STOPPED_R::new(((self.bits >> 1) & 1) != 0) + } + #[doc = "Bit 4 - Write '1' to disable interrupt for event ENDRX"] + #[inline(always)] + pub fn endrx(&self) -> ENDRX_R { + ENDRX_R::new(((self.bits >> 4) & 1) != 0) + } + #[doc = "Bit 6 - Write '1' to disable interrupt for event END"] + #[inline(always)] + pub fn end(&self) -> END_R { + END_R::new(((self.bits >> 6) & 1) != 0) + } + #[doc = "Bit 8 - Write '1' to disable interrupt for event ENDTX"] + #[inline(always)] + pub fn endtx(&self) -> ENDTX_R { + ENDTX_R::new(((self.bits >> 8) & 1) != 0) + } + #[doc = "Bit 19 - Write '1' to disable interrupt for event STARTED"] + #[inline(always)] + pub fn started(&self) -> STARTED_R { + STARTED_R::new(((self.bits >> 19) & 1) != 0) + } +} +impl W { + #[doc = "Bit 1 - Write '1' to disable interrupt for event STOPPED"] + #[inline(always)] + #[must_use] + pub fn stopped(&mut self) -> STOPPED_W<1> { + STOPPED_W::new(self) + } + #[doc = "Bit 4 - Write '1' to disable interrupt for event ENDRX"] + #[inline(always)] + #[must_use] + pub fn endrx(&mut self) -> ENDRX_W<4> { + ENDRX_W::new(self) + } + #[doc = "Bit 6 - Write '1' to disable interrupt for event END"] + #[inline(always)] + #[must_use] + pub fn end(&mut self) -> END_W<6> { + END_W::new(self) + } + #[doc = "Bit 8 - Write '1' to disable interrupt for event ENDTX"] + #[inline(always)] + #[must_use] + pub fn endtx(&mut self) -> ENDTX_W<8> { + ENDTX_W::new(self) + } + #[doc = "Bit 19 - Write '1' to disable interrupt for event STARTED"] + #[inline(always)] + #[must_use] + pub fn started(&mut self) -> STARTED_W<19> { + STARTED_W::new(self) + } + #[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 = "Disable interrupt\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 [intenclr](index.html) module"] +pub struct INTENCLR_SPEC; +impl crate::RegisterSpec for INTENCLR_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [intenclr::R](R) reader structure"] +impl crate::Readable for INTENCLR_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [intenclr::W](W) writer structure"] +impl crate::Writable for INTENCLR_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets INTENCLR to value 0"] +impl crate::Resettable for INTENCLR_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/spim0/intenset.rs b/down-the-stack/dk_pac/src/spim0/intenset.rs new file mode 100644 index 0000000..423b165 --- /dev/null +++ b/down-the-stack/dk_pac/src/spim0/intenset.rs @@ -0,0 +1,405 @@ +#[doc = "Register `INTENSET` 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 `INTENSET` 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 `STOPPED` reader - Write '1' to enable interrupt for event STOPPED"] +pub type STOPPED_R = crate::BitReader; +#[doc = "Write '1' to enable interrupt for event STOPPED\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum STOPPED_A { + #[doc = "0: Read: Disabled"] + DISABLED = 0, + #[doc = "1: Read: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: STOPPED_A) -> Self { + variant as u8 != 0 + } +} +impl STOPPED_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> STOPPED_A { + match self.bits { + false => STOPPED_A::DISABLED, + true => STOPPED_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == STOPPED_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == STOPPED_A::ENABLED + } +} +#[doc = "Write '1' to enable interrupt for event STOPPED\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum STOPPED_AW { + #[doc = "1: Enable"] + SET = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: STOPPED_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `STOPPED` writer - Write '1' to enable interrupt for event STOPPED"] +pub type STOPPED_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENSET_SPEC, STOPPED_AW, O>; +impl<'a, const O: u8> STOPPED_W<'a, O> { + #[doc = "Enable"] + #[inline(always)] + pub fn set(self) -> &'a mut W { + self.variant(STOPPED_AW::SET) + } +} +#[doc = "Field `ENDRX` reader - Write '1' to enable interrupt for event ENDRX"] +pub type ENDRX_R = crate::BitReader; +#[doc = "Write '1' to enable interrupt for event ENDRX\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum ENDRX_A { + #[doc = "0: Read: Disabled"] + DISABLED = 0, + #[doc = "1: Read: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: ENDRX_A) -> Self { + variant as u8 != 0 + } +} +impl ENDRX_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> ENDRX_A { + match self.bits { + false => ENDRX_A::DISABLED, + true => ENDRX_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == ENDRX_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == ENDRX_A::ENABLED + } +} +#[doc = "Write '1' to enable interrupt for event ENDRX\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum ENDRX_AW { + #[doc = "1: Enable"] + SET = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: ENDRX_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `ENDRX` writer - Write '1' to enable interrupt for event ENDRX"] +pub type ENDRX_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENSET_SPEC, ENDRX_AW, O>; +impl<'a, const O: u8> ENDRX_W<'a, O> { + #[doc = "Enable"] + #[inline(always)] + pub fn set(self) -> &'a mut W { + self.variant(ENDRX_AW::SET) + } +} +#[doc = "Field `END` reader - Write '1' to enable interrupt for event END"] +pub type END_R = crate::BitReader; +#[doc = "Write '1' to enable interrupt for event END\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum END_A { + #[doc = "0: Read: Disabled"] + DISABLED = 0, + #[doc = "1: Read: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: END_A) -> Self { + variant as u8 != 0 + } +} +impl END_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> END_A { + match self.bits { + false => END_A::DISABLED, + true => END_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == END_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == END_A::ENABLED + } +} +#[doc = "Write '1' to enable interrupt for event END\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum END_AW { + #[doc = "1: Enable"] + SET = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: END_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `END` writer - Write '1' to enable interrupt for event END"] +pub type END_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENSET_SPEC, END_AW, O>; +impl<'a, const O: u8> END_W<'a, O> { + #[doc = "Enable"] + #[inline(always)] + pub fn set(self) -> &'a mut W { + self.variant(END_AW::SET) + } +} +#[doc = "Field `ENDTX` reader - Write '1' to enable interrupt for event ENDTX"] +pub type ENDTX_R = crate::BitReader; +#[doc = "Write '1' to enable interrupt for event ENDTX\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum ENDTX_A { + #[doc = "0: Read: Disabled"] + DISABLED = 0, + #[doc = "1: Read: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: ENDTX_A) -> Self { + variant as u8 != 0 + } +} +impl ENDTX_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> ENDTX_A { + match self.bits { + false => ENDTX_A::DISABLED, + true => ENDTX_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == ENDTX_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == ENDTX_A::ENABLED + } +} +#[doc = "Write '1' to enable interrupt for event ENDTX\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum ENDTX_AW { + #[doc = "1: Enable"] + SET = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: ENDTX_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `ENDTX` writer - Write '1' to enable interrupt for event ENDTX"] +pub type ENDTX_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENSET_SPEC, ENDTX_AW, O>; +impl<'a, const O: u8> ENDTX_W<'a, O> { + #[doc = "Enable"] + #[inline(always)] + pub fn set(self) -> &'a mut W { + self.variant(ENDTX_AW::SET) + } +} +#[doc = "Field `STARTED` reader - Write '1' to enable interrupt for event STARTED"] +pub type STARTED_R = crate::BitReader; +#[doc = "Write '1' to enable interrupt for event STARTED\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum STARTED_A { + #[doc = "0: Read: Disabled"] + DISABLED = 0, + #[doc = "1: Read: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: STARTED_A) -> Self { + variant as u8 != 0 + } +} +impl STARTED_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> STARTED_A { + match self.bits { + false => STARTED_A::DISABLED, + true => STARTED_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == STARTED_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == STARTED_A::ENABLED + } +} +#[doc = "Write '1' to enable interrupt for event STARTED\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum STARTED_AW { + #[doc = "1: Enable"] + SET = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: STARTED_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `STARTED` writer - Write '1' to enable interrupt for event STARTED"] +pub type STARTED_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENSET_SPEC, STARTED_AW, O>; +impl<'a, const O: u8> STARTED_W<'a, O> { + #[doc = "Enable"] + #[inline(always)] + pub fn set(self) -> &'a mut W { + self.variant(STARTED_AW::SET) + } +} +impl R { + #[doc = "Bit 1 - Write '1' to enable interrupt for event STOPPED"] + #[inline(always)] + pub fn stopped(&self) -> STOPPED_R { + STOPPED_R::new(((self.bits >> 1) & 1) != 0) + } + #[doc = "Bit 4 - Write '1' to enable interrupt for event ENDRX"] + #[inline(always)] + pub fn endrx(&self) -> ENDRX_R { + ENDRX_R::new(((self.bits >> 4) & 1) != 0) + } + #[doc = "Bit 6 - Write '1' to enable interrupt for event END"] + #[inline(always)] + pub fn end(&self) -> END_R { + END_R::new(((self.bits >> 6) & 1) != 0) + } + #[doc = "Bit 8 - Write '1' to enable interrupt for event ENDTX"] + #[inline(always)] + pub fn endtx(&self) -> ENDTX_R { + ENDTX_R::new(((self.bits >> 8) & 1) != 0) + } + #[doc = "Bit 19 - Write '1' to enable interrupt for event STARTED"] + #[inline(always)] + pub fn started(&self) -> STARTED_R { + STARTED_R::new(((self.bits >> 19) & 1) != 0) + } +} +impl W { + #[doc = "Bit 1 - Write '1' to enable interrupt for event STOPPED"] + #[inline(always)] + #[must_use] + pub fn stopped(&mut self) -> STOPPED_W<1> { + STOPPED_W::new(self) + } + #[doc = "Bit 4 - Write '1' to enable interrupt for event ENDRX"] + #[inline(always)] + #[must_use] + pub fn endrx(&mut self) -> ENDRX_W<4> { + ENDRX_W::new(self) + } + #[doc = "Bit 6 - Write '1' to enable interrupt for event END"] + #[inline(always)] + #[must_use] + pub fn end(&mut self) -> END_W<6> { + END_W::new(self) + } + #[doc = "Bit 8 - Write '1' to enable interrupt for event ENDTX"] + #[inline(always)] + #[must_use] + pub fn endtx(&mut self) -> ENDTX_W<8> { + ENDTX_W::new(self) + } + #[doc = "Bit 19 - Write '1' to enable interrupt for event STARTED"] + #[inline(always)] + #[must_use] + pub fn started(&mut self) -> STARTED_W<19> { + STARTED_W::new(self) + } + #[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 = "Enable interrupt\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 [intenset](index.html) module"] +pub struct INTENSET_SPEC; +impl crate::RegisterSpec for INTENSET_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [intenset::R](R) reader structure"] +impl crate::Readable for INTENSET_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [intenset::W](W) writer structure"] +impl crate::Writable for INTENSET_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets INTENSET to value 0"] +impl crate::Resettable for INTENSET_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/spim0/orc.rs b/down-the-stack/dk_pac/src/spim0/orc.rs new file mode 100644 index 0000000..e6471a8 --- /dev/null +++ b/down-the-stack/dk_pac/src/spim0/orc.rs @@ -0,0 +1,80 @@ +#[doc = "Register `ORC` 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 `ORC` 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 `ORC` reader - Over-read character. Character clocked out in case and over-read of the TXD buffer."] +pub type ORC_R = crate::FieldReader; +#[doc = "Field `ORC` writer - Over-read character. Character clocked out in case and over-read of the TXD buffer."] +pub type ORC_W<'a, const O: u8> = crate::FieldWriter<'a, u32, ORC_SPEC, u8, u8, 8, O>; +impl R { + #[doc = "Bits 0:7 - Over-read character. Character clocked out in case and over-read of the TXD buffer."] + #[inline(always)] + pub fn orc(&self) -> ORC_R { + ORC_R::new((self.bits & 0xff) as u8) + } +} +impl W { + #[doc = "Bits 0:7 - Over-read character. Character clocked out in case and over-read of the TXD buffer."] + #[inline(always)] + #[must_use] + pub fn orc(&mut self) -> ORC_W<0> { + ORC_W::new(self) + } + #[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 = "Over-read character. Character clocked out in case and over-read of the TXD buffer.\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 [orc](index.html) module"] +pub struct ORC_SPEC; +impl crate::RegisterSpec for ORC_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [orc::R](R) reader structure"] +impl crate::Readable for ORC_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [orc::W](W) writer structure"] +impl crate::Writable for ORC_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets ORC to value 0"] +impl crate::Resettable for ORC_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/spim0/psel.rs b/down-the-stack/dk_pac/src/spim0/psel.rs new file mode 100644 index 0000000..fc62a65 --- /dev/null +++ b/down-the-stack/dk_pac/src/spim0/psel.rs @@ -0,0 +1,22 @@ +#[doc = r"Register block"] +#[repr(C)] +pub struct PSEL { + #[doc = "0x00 - Pin select for SCK"] + pub sck: SCK, + #[doc = "0x04 - Pin select for MOSI signal"] + pub mosi: MOSI, + #[doc = "0x08 - Pin select for MISO signal"] + pub miso: MISO, +} +#[doc = "SCK (rw) register accessor: an alias for `Reg`"] +pub type SCK = crate::Reg; +#[doc = "Pin select for SCK"] +pub mod sck; +#[doc = "MOSI (rw) register accessor: an alias for `Reg`"] +pub type MOSI = crate::Reg; +#[doc = "Pin select for MOSI signal"] +pub mod mosi; +#[doc = "MISO (rw) register accessor: an alias for `Reg`"] +pub type MISO = crate::Reg; +#[doc = "Pin select for MISO signal"] +pub mod miso; diff --git a/down-the-stack/dk_pac/src/spim0/psel/miso.rs b/down-the-stack/dk_pac/src/spim0/psel/miso.rs new file mode 100644 index 0000000..d04a28b --- /dev/null +++ b/down-the-stack/dk_pac/src/spim0/psel/miso.rs @@ -0,0 +1,141 @@ +#[doc = "Register `MISO` 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 `MISO` 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 `PIN` reader - Pin number"] +pub type PIN_R = crate::FieldReader; +#[doc = "Field `PIN` writer - Pin number"] +pub type PIN_W<'a, const O: u8> = crate::FieldWriter<'a, u32, MISO_SPEC, u8, u8, 5, O>; +#[doc = "Field `CONNECT` reader - Connection"] +pub type CONNECT_R = crate::BitReader; +#[doc = "Connection\n\nValue on reset: 1"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum CONNECT_A { + #[doc = "1: Disconnect"] + DISCONNECTED = 1, + #[doc = "0: Connect"] + CONNECTED = 0, +} +impl From for bool { + #[inline(always)] + fn from(variant: CONNECT_A) -> Self { + variant as u8 != 0 + } +} +impl CONNECT_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> CONNECT_A { + match self.bits { + true => CONNECT_A::DISCONNECTED, + false => CONNECT_A::CONNECTED, + } + } + #[doc = "Checks if the value of the field is `DISCONNECTED`"] + #[inline(always)] + pub fn is_disconnected(&self) -> bool { + *self == CONNECT_A::DISCONNECTED + } + #[doc = "Checks if the value of the field is `CONNECTED`"] + #[inline(always)] + pub fn is_connected(&self) -> bool { + *self == CONNECT_A::CONNECTED + } +} +#[doc = "Field `CONNECT` writer - Connection"] +pub type CONNECT_W<'a, const O: u8> = crate::BitWriter<'a, u32, MISO_SPEC, CONNECT_A, O>; +impl<'a, const O: u8> CONNECT_W<'a, O> { + #[doc = "Disconnect"] + #[inline(always)] + pub fn disconnected(self) -> &'a mut W { + self.variant(CONNECT_A::DISCONNECTED) + } + #[doc = "Connect"] + #[inline(always)] + pub fn connected(self) -> &'a mut W { + self.variant(CONNECT_A::CONNECTED) + } +} +impl R { + #[doc = "Bits 0:4 - Pin number"] + #[inline(always)] + pub fn pin(&self) -> PIN_R { + PIN_R::new((self.bits & 0x1f) as u8) + } + #[doc = "Bit 31 - Connection"] + #[inline(always)] + pub fn connect(&self) -> CONNECT_R { + CONNECT_R::new(((self.bits >> 31) & 1) != 0) + } +} +impl W { + #[doc = "Bits 0:4 - Pin number"] + #[inline(always)] + #[must_use] + pub fn pin(&mut self) -> PIN_W<0> { + PIN_W::new(self) + } + #[doc = "Bit 31 - Connection"] + #[inline(always)] + #[must_use] + pub fn connect(&mut self) -> CONNECT_W<31> { + CONNECT_W::new(self) + } + #[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 = "Pin select for MISO signal\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 [miso](index.html) module"] +pub struct MISO_SPEC; +impl crate::RegisterSpec for MISO_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [miso::R](R) reader structure"] +impl crate::Readable for MISO_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [miso::W](W) writer structure"] +impl crate::Writable for MISO_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets MISO to value 0xffff_ffff"] +impl crate::Resettable for MISO_SPEC { + const RESET_VALUE: Self::Ux = 0xffff_ffff; +} diff --git a/down-the-stack/dk_pac/src/spim0/psel/mosi.rs b/down-the-stack/dk_pac/src/spim0/psel/mosi.rs new file mode 100644 index 0000000..8c4f76f --- /dev/null +++ b/down-the-stack/dk_pac/src/spim0/psel/mosi.rs @@ -0,0 +1,141 @@ +#[doc = "Register `MOSI` 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 `MOSI` 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 `PIN` reader - Pin number"] +pub type PIN_R = crate::FieldReader; +#[doc = "Field `PIN` writer - Pin number"] +pub type PIN_W<'a, const O: u8> = crate::FieldWriter<'a, u32, MOSI_SPEC, u8, u8, 5, O>; +#[doc = "Field `CONNECT` reader - Connection"] +pub type CONNECT_R = crate::BitReader; +#[doc = "Connection\n\nValue on reset: 1"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum CONNECT_A { + #[doc = "1: Disconnect"] + DISCONNECTED = 1, + #[doc = "0: Connect"] + CONNECTED = 0, +} +impl From for bool { + #[inline(always)] + fn from(variant: CONNECT_A) -> Self { + variant as u8 != 0 + } +} +impl CONNECT_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> CONNECT_A { + match self.bits { + true => CONNECT_A::DISCONNECTED, + false => CONNECT_A::CONNECTED, + } + } + #[doc = "Checks if the value of the field is `DISCONNECTED`"] + #[inline(always)] + pub fn is_disconnected(&self) -> bool { + *self == CONNECT_A::DISCONNECTED + } + #[doc = "Checks if the value of the field is `CONNECTED`"] + #[inline(always)] + pub fn is_connected(&self) -> bool { + *self == CONNECT_A::CONNECTED + } +} +#[doc = "Field `CONNECT` writer - Connection"] +pub type CONNECT_W<'a, const O: u8> = crate::BitWriter<'a, u32, MOSI_SPEC, CONNECT_A, O>; +impl<'a, const O: u8> CONNECT_W<'a, O> { + #[doc = "Disconnect"] + #[inline(always)] + pub fn disconnected(self) -> &'a mut W { + self.variant(CONNECT_A::DISCONNECTED) + } + #[doc = "Connect"] + #[inline(always)] + pub fn connected(self) -> &'a mut W { + self.variant(CONNECT_A::CONNECTED) + } +} +impl R { + #[doc = "Bits 0:4 - Pin number"] + #[inline(always)] + pub fn pin(&self) -> PIN_R { + PIN_R::new((self.bits & 0x1f) as u8) + } + #[doc = "Bit 31 - Connection"] + #[inline(always)] + pub fn connect(&self) -> CONNECT_R { + CONNECT_R::new(((self.bits >> 31) & 1) != 0) + } +} +impl W { + #[doc = "Bits 0:4 - Pin number"] + #[inline(always)] + #[must_use] + pub fn pin(&mut self) -> PIN_W<0> { + PIN_W::new(self) + } + #[doc = "Bit 31 - Connection"] + #[inline(always)] + #[must_use] + pub fn connect(&mut self) -> CONNECT_W<31> { + CONNECT_W::new(self) + } + #[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 = "Pin select for MOSI signal\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 [mosi](index.html) module"] +pub struct MOSI_SPEC; +impl crate::RegisterSpec for MOSI_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [mosi::R](R) reader structure"] +impl crate::Readable for MOSI_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [mosi::W](W) writer structure"] +impl crate::Writable for MOSI_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets MOSI to value 0xffff_ffff"] +impl crate::Resettable for MOSI_SPEC { + const RESET_VALUE: Self::Ux = 0xffff_ffff; +} diff --git a/down-the-stack/dk_pac/src/spim0/psel/sck.rs b/down-the-stack/dk_pac/src/spim0/psel/sck.rs new file mode 100644 index 0000000..d1b7a9e --- /dev/null +++ b/down-the-stack/dk_pac/src/spim0/psel/sck.rs @@ -0,0 +1,141 @@ +#[doc = "Register `SCK` 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 `SCK` 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 `PIN` reader - Pin number"] +pub type PIN_R = crate::FieldReader; +#[doc = "Field `PIN` writer - Pin number"] +pub type PIN_W<'a, const O: u8> = crate::FieldWriter<'a, u32, SCK_SPEC, u8, u8, 5, O>; +#[doc = "Field `CONNECT` reader - Connection"] +pub type CONNECT_R = crate::BitReader; +#[doc = "Connection\n\nValue on reset: 1"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum CONNECT_A { + #[doc = "1: Disconnect"] + DISCONNECTED = 1, + #[doc = "0: Connect"] + CONNECTED = 0, +} +impl From for bool { + #[inline(always)] + fn from(variant: CONNECT_A) -> Self { + variant as u8 != 0 + } +} +impl CONNECT_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> CONNECT_A { + match self.bits { + true => CONNECT_A::DISCONNECTED, + false => CONNECT_A::CONNECTED, + } + } + #[doc = "Checks if the value of the field is `DISCONNECTED`"] + #[inline(always)] + pub fn is_disconnected(&self) -> bool { + *self == CONNECT_A::DISCONNECTED + } + #[doc = "Checks if the value of the field is `CONNECTED`"] + #[inline(always)] + pub fn is_connected(&self) -> bool { + *self == CONNECT_A::CONNECTED + } +} +#[doc = "Field `CONNECT` writer - Connection"] +pub type CONNECT_W<'a, const O: u8> = crate::BitWriter<'a, u32, SCK_SPEC, CONNECT_A, O>; +impl<'a, const O: u8> CONNECT_W<'a, O> { + #[doc = "Disconnect"] + #[inline(always)] + pub fn disconnected(self) -> &'a mut W { + self.variant(CONNECT_A::DISCONNECTED) + } + #[doc = "Connect"] + #[inline(always)] + pub fn connected(self) -> &'a mut W { + self.variant(CONNECT_A::CONNECTED) + } +} +impl R { + #[doc = "Bits 0:4 - Pin number"] + #[inline(always)] + pub fn pin(&self) -> PIN_R { + PIN_R::new((self.bits & 0x1f) as u8) + } + #[doc = "Bit 31 - Connection"] + #[inline(always)] + pub fn connect(&self) -> CONNECT_R { + CONNECT_R::new(((self.bits >> 31) & 1) != 0) + } +} +impl W { + #[doc = "Bits 0:4 - Pin number"] + #[inline(always)] + #[must_use] + pub fn pin(&mut self) -> PIN_W<0> { + PIN_W::new(self) + } + #[doc = "Bit 31 - Connection"] + #[inline(always)] + #[must_use] + pub fn connect(&mut self) -> CONNECT_W<31> { + CONNECT_W::new(self) + } + #[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 = "Pin select for SCK\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 [sck](index.html) module"] +pub struct SCK_SPEC; +impl crate::RegisterSpec for SCK_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [sck::R](R) reader structure"] +impl crate::Readable for SCK_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [sck::W](W) writer structure"] +impl crate::Writable for SCK_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets SCK to value 0xffff_ffff"] +impl crate::Resettable for SCK_SPEC { + const RESET_VALUE: Self::Ux = 0xffff_ffff; +} diff --git a/down-the-stack/dk_pac/src/spim0/rxd.rs b/down-the-stack/dk_pac/src/spim0/rxd.rs new file mode 100644 index 0000000..6a26418 --- /dev/null +++ b/down-the-stack/dk_pac/src/spim0/rxd.rs @@ -0,0 +1,28 @@ +#[doc = r"Register block"] +#[repr(C)] +pub struct RXD { + #[doc = "0x00 - Data pointer"] + pub ptr: PTR, + #[doc = "0x04 - Maximum number of bytes in receive buffer"] + pub maxcnt: MAXCNT, + #[doc = "0x08 - Number of bytes transferred in the last transaction"] + pub amount: AMOUNT, + #[doc = "0x0c - EasyDMA list type"] + pub list: LIST, +} +#[doc = "PTR (rw) register accessor: an alias for `Reg`"] +pub type PTR = crate::Reg; +#[doc = "Data pointer"] +pub mod ptr; +#[doc = "MAXCNT (rw) register accessor: an alias for `Reg`"] +pub type MAXCNT = crate::Reg; +#[doc = "Maximum number of bytes in receive buffer"] +pub mod maxcnt; +#[doc = "AMOUNT (r) register accessor: an alias for `Reg`"] +pub type AMOUNT = crate::Reg; +#[doc = "Number of bytes transferred in the last transaction"] +pub mod amount; +#[doc = "LIST (rw) register accessor: an alias for `Reg`"] +pub type LIST = crate::Reg; +#[doc = "EasyDMA list type"] +pub mod list; diff --git a/down-the-stack/dk_pac/src/spim0/rxd/amount.rs b/down-the-stack/dk_pac/src/spim0/rxd/amount.rs new file mode 100644 index 0000000..b48d827 --- /dev/null +++ b/down-the-stack/dk_pac/src/spim0/rxd/amount.rs @@ -0,0 +1,37 @@ +#[doc = "Register `AMOUNT` 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 = "Field `AMOUNT` reader - Number of bytes transferred in the last transaction"] +pub type AMOUNT_R = crate::FieldReader; +impl R { + #[doc = "Bits 0:7 - Number of bytes transferred in the last transaction"] + #[inline(always)] + pub fn amount(&self) -> AMOUNT_R { + AMOUNT_R::new((self.bits & 0xff) as u8) + } +} +#[doc = "Number of bytes transferred in the last transaction\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 [amount](index.html) module"] +pub struct AMOUNT_SPEC; +impl crate::RegisterSpec for AMOUNT_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [amount::R](R) reader structure"] +impl crate::Readable for AMOUNT_SPEC { + type Reader = R; +} +#[doc = "`reset()` method sets AMOUNT to value 0"] +impl crate::Resettable for AMOUNT_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/spim0/rxd/list.rs b/down-the-stack/dk_pac/src/spim0/rxd/list.rs new file mode 100644 index 0000000..05243a5 --- /dev/null +++ b/down-the-stack/dk_pac/src/spim0/rxd/list.rs @@ -0,0 +1,128 @@ +#[doc = "Register `LIST` 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 `LIST` 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 `LIST` reader - List type"] +pub type LIST_R = crate::FieldReader; +#[doc = "List type\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +#[repr(u8)] +pub enum LIST_A { + #[doc = "0: Disable EasyDMA list"] + DISABLED = 0, + #[doc = "1: Use array list"] + ARRAY_LIST = 1, +} +impl From for u8 { + #[inline(always)] + fn from(variant: LIST_A) -> Self { + variant as _ + } +} +impl LIST_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> Option { + match self.bits { + 0 => Some(LIST_A::DISABLED), + 1 => Some(LIST_A::ARRAY_LIST), + _ => None, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == LIST_A::DISABLED + } + #[doc = "Checks if the value of the field is `ARRAY_LIST`"] + #[inline(always)] + pub fn is_array_list(&self) -> bool { + *self == LIST_A::ARRAY_LIST + } +} +#[doc = "Field `LIST` writer - List type"] +pub type LIST_W<'a, const O: u8> = crate::FieldWriter<'a, u32, LIST_SPEC, u8, LIST_A, 3, O>; +impl<'a, const O: u8> LIST_W<'a, O> { + #[doc = "Disable EasyDMA list"] + #[inline(always)] + pub fn disabled(self) -> &'a mut W { + self.variant(LIST_A::DISABLED) + } + #[doc = "Use array list"] + #[inline(always)] + pub fn array_list(self) -> &'a mut W { + self.variant(LIST_A::ARRAY_LIST) + } +} +impl R { + #[doc = "Bits 0:2 - List type"] + #[inline(always)] + pub fn list(&self) -> LIST_R { + LIST_R::new((self.bits & 7) as u8) + } +} +impl W { + #[doc = "Bits 0:2 - List type"] + #[inline(always)] + #[must_use] + pub fn list(&mut self) -> LIST_W<0> { + LIST_W::new(self) + } + #[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 = "EasyDMA list type\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 [list](index.html) module"] +pub struct LIST_SPEC; +impl crate::RegisterSpec for LIST_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [list::R](R) reader structure"] +impl crate::Readable for LIST_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [list::W](W) writer structure"] +impl crate::Writable for LIST_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets LIST to value 0"] +impl crate::Resettable for LIST_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/spim0/rxd/maxcnt.rs b/down-the-stack/dk_pac/src/spim0/rxd/maxcnt.rs new file mode 100644 index 0000000..7d9b79c --- /dev/null +++ b/down-the-stack/dk_pac/src/spim0/rxd/maxcnt.rs @@ -0,0 +1,80 @@ +#[doc = "Register `MAXCNT` 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 `MAXCNT` 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 `MAXCNT` reader - Maximum number of bytes in receive buffer"] +pub type MAXCNT_R = crate::FieldReader; +#[doc = "Field `MAXCNT` writer - Maximum number of bytes in receive buffer"] +pub type MAXCNT_W<'a, const O: u8> = crate::FieldWriter<'a, u32, MAXCNT_SPEC, u8, u8, 8, O>; +impl R { + #[doc = "Bits 0:7 - Maximum number of bytes in receive buffer"] + #[inline(always)] + pub fn maxcnt(&self) -> MAXCNT_R { + MAXCNT_R::new((self.bits & 0xff) as u8) + } +} +impl W { + #[doc = "Bits 0:7 - Maximum number of bytes in receive buffer"] + #[inline(always)] + #[must_use] + pub fn maxcnt(&mut self) -> MAXCNT_W<0> { + MAXCNT_W::new(self) + } + #[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 = "Maximum number of bytes in receive buffer\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 [maxcnt](index.html) module"] +pub struct MAXCNT_SPEC; +impl crate::RegisterSpec for MAXCNT_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [maxcnt::R](R) reader structure"] +impl crate::Readable for MAXCNT_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [maxcnt::W](W) writer structure"] +impl crate::Writable for MAXCNT_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets MAXCNT to value 0"] +impl crate::Resettable for MAXCNT_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/spim0/rxd/ptr.rs b/down-the-stack/dk_pac/src/spim0/rxd/ptr.rs new file mode 100644 index 0000000..2f2c926 --- /dev/null +++ b/down-the-stack/dk_pac/src/spim0/rxd/ptr.rs @@ -0,0 +1,80 @@ +#[doc = "Register `PTR` 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 `PTR` 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 `PTR` reader - Data pointer"] +pub type PTR_R = crate::FieldReader; +#[doc = "Field `PTR` writer - Data pointer"] +pub type PTR_W<'a, const O: u8> = crate::FieldWriter<'a, u32, PTR_SPEC, u32, u32, 32, O>; +impl R { + #[doc = "Bits 0:31 - Data pointer"] + #[inline(always)] + pub fn ptr(&self) -> PTR_R { + PTR_R::new(self.bits) + } +} +impl W { + #[doc = "Bits 0:31 - Data pointer"] + #[inline(always)] + #[must_use] + pub fn ptr(&mut self) -> PTR_W<0> { + PTR_W::new(self) + } + #[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 = "Data pointer\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 [ptr](index.html) module"] +pub struct PTR_SPEC; +impl crate::RegisterSpec for PTR_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [ptr::R](R) reader structure"] +impl crate::Readable for PTR_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [ptr::W](W) writer structure"] +impl crate::Writable for PTR_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets PTR to value 0"] +impl crate::Resettable for PTR_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/spim0/shorts.rs b/down-the-stack/dk_pac/src/spim0/shorts.rs new file mode 100644 index 0000000..b1ca2e3 --- /dev/null +++ b/down-the-stack/dk_pac/src/spim0/shorts.rs @@ -0,0 +1,126 @@ +#[doc = "Register `SHORTS` 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 `SHORTS` 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 `END_START` reader - Shortcut between event END and task START"] +pub type END_START_R = crate::BitReader; +#[doc = "Shortcut between event END and task START\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum END_START_A { + #[doc = "0: Disable shortcut"] + DISABLED = 0, + #[doc = "1: Enable shortcut"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: END_START_A) -> Self { + variant as u8 != 0 + } +} +impl END_START_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> END_START_A { + match self.bits { + false => END_START_A::DISABLED, + true => END_START_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == END_START_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == END_START_A::ENABLED + } +} +#[doc = "Field `END_START` writer - Shortcut between event END and task START"] +pub type END_START_W<'a, const O: u8> = crate::BitWriter<'a, u32, SHORTS_SPEC, END_START_A, O>; +impl<'a, const O: u8> END_START_W<'a, O> { + #[doc = "Disable shortcut"] + #[inline(always)] + pub fn disabled(self) -> &'a mut W { + self.variant(END_START_A::DISABLED) + } + #[doc = "Enable shortcut"] + #[inline(always)] + pub fn enabled(self) -> &'a mut W { + self.variant(END_START_A::ENABLED) + } +} +impl R { + #[doc = "Bit 17 - Shortcut between event END and task START"] + #[inline(always)] + pub fn end_start(&self) -> END_START_R { + END_START_R::new(((self.bits >> 17) & 1) != 0) + } +} +impl W { + #[doc = "Bit 17 - Shortcut between event END and task START"] + #[inline(always)] + #[must_use] + pub fn end_start(&mut self) -> END_START_W<17> { + END_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 + } +} +#[doc = "Shortcuts between local events and tasks\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 [shorts](index.html) module"] +pub struct SHORTS_SPEC; +impl crate::RegisterSpec for SHORTS_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [shorts::R](R) reader structure"] +impl crate::Readable for SHORTS_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [shorts::W](W) writer structure"] +impl crate::Writable for SHORTS_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets SHORTS to value 0"] +impl crate::Resettable for SHORTS_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/spim0/tasks_resume.rs b/down-the-stack/dk_pac/src/spim0/tasks_resume.rs new file mode 100644 index 0000000..2a2e100 --- /dev/null +++ b/down-the-stack/dk_pac/src/spim0/tasks_resume.rs @@ -0,0 +1,72 @@ +#[doc = "Register `TASKS_RESUME` 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 = "Resume SPI transaction\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum TASKS_RESUME_AW { + #[doc = "1: Trigger task"] + TRIGGER = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: TASKS_RESUME_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `TASKS_RESUME` writer - Resume SPI transaction"] +pub type TASKS_RESUME_W<'a, const O: u8> = + crate::BitWriter<'a, u32, TASKS_RESUME_SPEC, TASKS_RESUME_AW, O>; +impl<'a, const O: u8> TASKS_RESUME_W<'a, O> { + #[doc = "Trigger task"] + #[inline(always)] + pub fn trigger(self) -> &'a mut W { + self.variant(TASKS_RESUME_AW::TRIGGER) + } +} +impl W { + #[doc = "Bit 0 - Resume SPI transaction"] + #[inline(always)] + #[must_use] + pub fn tasks_resume(&mut self) -> TASKS_RESUME_W<0> { + TASKS_RESUME_W::new(self) + } + #[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 = "Resume SPI transaction\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 [tasks_resume](index.html) module"] +pub struct TASKS_RESUME_SPEC; +impl crate::RegisterSpec for TASKS_RESUME_SPEC { + type Ux = u32; +} +#[doc = "`write(|w| ..)` method takes [tasks_resume::W](W) writer structure"] +impl crate::Writable for TASKS_RESUME_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets TASKS_RESUME to value 0"] +impl crate::Resettable for TASKS_RESUME_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/spim0/tasks_start.rs b/down-the-stack/dk_pac/src/spim0/tasks_start.rs new file mode 100644 index 0000000..7a7f0a4 --- /dev/null +++ b/down-the-stack/dk_pac/src/spim0/tasks_start.rs @@ -0,0 +1,72 @@ +#[doc = "Register `TASKS_START` 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 = "Start SPI transaction\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum TASKS_START_AW { + #[doc = "1: Trigger task"] + TRIGGER = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: TASKS_START_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `TASKS_START` writer - Start SPI transaction"] +pub type TASKS_START_W<'a, const O: u8> = + crate::BitWriter<'a, u32, TASKS_START_SPEC, TASKS_START_AW, O>; +impl<'a, const O: u8> TASKS_START_W<'a, O> { + #[doc = "Trigger task"] + #[inline(always)] + pub fn trigger(self) -> &'a mut W { + self.variant(TASKS_START_AW::TRIGGER) + } +} +impl W { + #[doc = "Bit 0 - Start SPI transaction"] + #[inline(always)] + #[must_use] + pub fn tasks_start(&mut self) -> TASKS_START_W<0> { + TASKS_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 + } +} +#[doc = "Start SPI transaction\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 [tasks_start](index.html) module"] +pub struct TASKS_START_SPEC; +impl crate::RegisterSpec for TASKS_START_SPEC { + type Ux = u32; +} +#[doc = "`write(|w| ..)` method takes [tasks_start::W](W) writer structure"] +impl crate::Writable for TASKS_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 TASKS_START to value 0"] +impl crate::Resettable for TASKS_START_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/spim0/tasks_stop.rs b/down-the-stack/dk_pac/src/spim0/tasks_stop.rs new file mode 100644 index 0000000..02996d2 --- /dev/null +++ b/down-the-stack/dk_pac/src/spim0/tasks_stop.rs @@ -0,0 +1,72 @@ +#[doc = "Register `TASKS_STOP` 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 = "Stop SPI transaction\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum TASKS_STOP_AW { + #[doc = "1: Trigger task"] + TRIGGER = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: TASKS_STOP_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `TASKS_STOP` writer - Stop SPI transaction"] +pub type TASKS_STOP_W<'a, const O: u8> = + crate::BitWriter<'a, u32, TASKS_STOP_SPEC, TASKS_STOP_AW, O>; +impl<'a, const O: u8> TASKS_STOP_W<'a, O> { + #[doc = "Trigger task"] + #[inline(always)] + pub fn trigger(self) -> &'a mut W { + self.variant(TASKS_STOP_AW::TRIGGER) + } +} +impl W { + #[doc = "Bit 0 - Stop SPI transaction"] + #[inline(always)] + #[must_use] + pub fn tasks_stop(&mut self) -> TASKS_STOP_W<0> { + TASKS_STOP_W::new(self) + } + #[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 = "Stop SPI transaction\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 [tasks_stop](index.html) module"] +pub struct TASKS_STOP_SPEC; +impl crate::RegisterSpec for TASKS_STOP_SPEC { + type Ux = u32; +} +#[doc = "`write(|w| ..)` method takes [tasks_stop::W](W) writer structure"] +impl crate::Writable for TASKS_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 TASKS_STOP to value 0"] +impl crate::Resettable for TASKS_STOP_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/spim0/tasks_suspend.rs b/down-the-stack/dk_pac/src/spim0/tasks_suspend.rs new file mode 100644 index 0000000..cc4b6ee --- /dev/null +++ b/down-the-stack/dk_pac/src/spim0/tasks_suspend.rs @@ -0,0 +1,72 @@ +#[doc = "Register `TASKS_SUSPEND` 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 = "Suspend SPI transaction\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum TASKS_SUSPEND_AW { + #[doc = "1: Trigger task"] + TRIGGER = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: TASKS_SUSPEND_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `TASKS_SUSPEND` writer - Suspend SPI transaction"] +pub type TASKS_SUSPEND_W<'a, const O: u8> = + crate::BitWriter<'a, u32, TASKS_SUSPEND_SPEC, TASKS_SUSPEND_AW, O>; +impl<'a, const O: u8> TASKS_SUSPEND_W<'a, O> { + #[doc = "Trigger task"] + #[inline(always)] + pub fn trigger(self) -> &'a mut W { + self.variant(TASKS_SUSPEND_AW::TRIGGER) + } +} +impl W { + #[doc = "Bit 0 - Suspend SPI transaction"] + #[inline(always)] + #[must_use] + pub fn tasks_suspend(&mut self) -> TASKS_SUSPEND_W<0> { + TASKS_SUSPEND_W::new(self) + } + #[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 = "Suspend SPI transaction\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 [tasks_suspend](index.html) module"] +pub struct TASKS_SUSPEND_SPEC; +impl crate::RegisterSpec for TASKS_SUSPEND_SPEC { + type Ux = u32; +} +#[doc = "`write(|w| ..)` method takes [tasks_suspend::W](W) writer structure"] +impl crate::Writable for TASKS_SUSPEND_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets TASKS_SUSPEND to value 0"] +impl crate::Resettable for TASKS_SUSPEND_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/spim0/txd.rs b/down-the-stack/dk_pac/src/spim0/txd.rs new file mode 100644 index 0000000..19ea101 --- /dev/null +++ b/down-the-stack/dk_pac/src/spim0/txd.rs @@ -0,0 +1,28 @@ +#[doc = r"Register block"] +#[repr(C)] +pub struct TXD { + #[doc = "0x00 - Data pointer"] + pub ptr: PTR, + #[doc = "0x04 - Maximum number of bytes in transmit buffer"] + pub maxcnt: MAXCNT, + #[doc = "0x08 - Number of bytes transferred in the last transaction"] + pub amount: AMOUNT, + #[doc = "0x0c - EasyDMA list type"] + pub list: LIST, +} +#[doc = "PTR (rw) register accessor: an alias for `Reg`"] +pub type PTR = crate::Reg; +#[doc = "Data pointer"] +pub mod ptr; +#[doc = "MAXCNT (rw) register accessor: an alias for `Reg`"] +pub type MAXCNT = crate::Reg; +#[doc = "Maximum number of bytes in transmit buffer"] +pub mod maxcnt; +#[doc = "AMOUNT (r) register accessor: an alias for `Reg`"] +pub type AMOUNT = crate::Reg; +#[doc = "Number of bytes transferred in the last transaction"] +pub mod amount; +#[doc = "LIST (rw) register accessor: an alias for `Reg`"] +pub type LIST = crate::Reg; +#[doc = "EasyDMA list type"] +pub mod list; diff --git a/down-the-stack/dk_pac/src/spim0/txd/amount.rs b/down-the-stack/dk_pac/src/spim0/txd/amount.rs new file mode 100644 index 0000000..b48d827 --- /dev/null +++ b/down-the-stack/dk_pac/src/spim0/txd/amount.rs @@ -0,0 +1,37 @@ +#[doc = "Register `AMOUNT` 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 = "Field `AMOUNT` reader - Number of bytes transferred in the last transaction"] +pub type AMOUNT_R = crate::FieldReader; +impl R { + #[doc = "Bits 0:7 - Number of bytes transferred in the last transaction"] + #[inline(always)] + pub fn amount(&self) -> AMOUNT_R { + AMOUNT_R::new((self.bits & 0xff) as u8) + } +} +#[doc = "Number of bytes transferred in the last transaction\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 [amount](index.html) module"] +pub struct AMOUNT_SPEC; +impl crate::RegisterSpec for AMOUNT_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [amount::R](R) reader structure"] +impl crate::Readable for AMOUNT_SPEC { + type Reader = R; +} +#[doc = "`reset()` method sets AMOUNT to value 0"] +impl crate::Resettable for AMOUNT_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/spim0/txd/list.rs b/down-the-stack/dk_pac/src/spim0/txd/list.rs new file mode 100644 index 0000000..05243a5 --- /dev/null +++ b/down-the-stack/dk_pac/src/spim0/txd/list.rs @@ -0,0 +1,128 @@ +#[doc = "Register `LIST` 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 `LIST` 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 `LIST` reader - List type"] +pub type LIST_R = crate::FieldReader; +#[doc = "List type\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +#[repr(u8)] +pub enum LIST_A { + #[doc = "0: Disable EasyDMA list"] + DISABLED = 0, + #[doc = "1: Use array list"] + ARRAY_LIST = 1, +} +impl From for u8 { + #[inline(always)] + fn from(variant: LIST_A) -> Self { + variant as _ + } +} +impl LIST_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> Option { + match self.bits { + 0 => Some(LIST_A::DISABLED), + 1 => Some(LIST_A::ARRAY_LIST), + _ => None, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == LIST_A::DISABLED + } + #[doc = "Checks if the value of the field is `ARRAY_LIST`"] + #[inline(always)] + pub fn is_array_list(&self) -> bool { + *self == LIST_A::ARRAY_LIST + } +} +#[doc = "Field `LIST` writer - List type"] +pub type LIST_W<'a, const O: u8> = crate::FieldWriter<'a, u32, LIST_SPEC, u8, LIST_A, 3, O>; +impl<'a, const O: u8> LIST_W<'a, O> { + #[doc = "Disable EasyDMA list"] + #[inline(always)] + pub fn disabled(self) -> &'a mut W { + self.variant(LIST_A::DISABLED) + } + #[doc = "Use array list"] + #[inline(always)] + pub fn array_list(self) -> &'a mut W { + self.variant(LIST_A::ARRAY_LIST) + } +} +impl R { + #[doc = "Bits 0:2 - List type"] + #[inline(always)] + pub fn list(&self) -> LIST_R { + LIST_R::new((self.bits & 7) as u8) + } +} +impl W { + #[doc = "Bits 0:2 - List type"] + #[inline(always)] + #[must_use] + pub fn list(&mut self) -> LIST_W<0> { + LIST_W::new(self) + } + #[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 = "EasyDMA list type\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 [list](index.html) module"] +pub struct LIST_SPEC; +impl crate::RegisterSpec for LIST_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [list::R](R) reader structure"] +impl crate::Readable for LIST_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [list::W](W) writer structure"] +impl crate::Writable for LIST_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets LIST to value 0"] +impl crate::Resettable for LIST_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/spim0/txd/maxcnt.rs b/down-the-stack/dk_pac/src/spim0/txd/maxcnt.rs new file mode 100644 index 0000000..084733c --- /dev/null +++ b/down-the-stack/dk_pac/src/spim0/txd/maxcnt.rs @@ -0,0 +1,80 @@ +#[doc = "Register `MAXCNT` 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 `MAXCNT` 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 `MAXCNT` reader - Maximum number of bytes in transmit buffer"] +pub type MAXCNT_R = crate::FieldReader; +#[doc = "Field `MAXCNT` writer - Maximum number of bytes in transmit buffer"] +pub type MAXCNT_W<'a, const O: u8> = crate::FieldWriter<'a, u32, MAXCNT_SPEC, u8, u8, 8, O>; +impl R { + #[doc = "Bits 0:7 - Maximum number of bytes in transmit buffer"] + #[inline(always)] + pub fn maxcnt(&self) -> MAXCNT_R { + MAXCNT_R::new((self.bits & 0xff) as u8) + } +} +impl W { + #[doc = "Bits 0:7 - Maximum number of bytes in transmit buffer"] + #[inline(always)] + #[must_use] + pub fn maxcnt(&mut self) -> MAXCNT_W<0> { + MAXCNT_W::new(self) + } + #[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 = "Maximum number of bytes in transmit buffer\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 [maxcnt](index.html) module"] +pub struct MAXCNT_SPEC; +impl crate::RegisterSpec for MAXCNT_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [maxcnt::R](R) reader structure"] +impl crate::Readable for MAXCNT_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [maxcnt::W](W) writer structure"] +impl crate::Writable for MAXCNT_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets MAXCNT to value 0"] +impl crate::Resettable for MAXCNT_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/spim0/txd/ptr.rs b/down-the-stack/dk_pac/src/spim0/txd/ptr.rs new file mode 100644 index 0000000..2f2c926 --- /dev/null +++ b/down-the-stack/dk_pac/src/spim0/txd/ptr.rs @@ -0,0 +1,80 @@ +#[doc = "Register `PTR` 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 `PTR` 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 `PTR` reader - Data pointer"] +pub type PTR_R = crate::FieldReader; +#[doc = "Field `PTR` writer - Data pointer"] +pub type PTR_W<'a, const O: u8> = crate::FieldWriter<'a, u32, PTR_SPEC, u32, u32, 32, O>; +impl R { + #[doc = "Bits 0:31 - Data pointer"] + #[inline(always)] + pub fn ptr(&self) -> PTR_R { + PTR_R::new(self.bits) + } +} +impl W { + #[doc = "Bits 0:31 - Data pointer"] + #[inline(always)] + #[must_use] + pub fn ptr(&mut self) -> PTR_W<0> { + PTR_W::new(self) + } + #[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 = "Data pointer\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 [ptr](index.html) module"] +pub struct PTR_SPEC; +impl crate::RegisterSpec for PTR_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [ptr::R](R) reader structure"] +impl crate::Readable for PTR_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [ptr::W](W) writer structure"] +impl crate::Writable for PTR_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets PTR to value 0"] +impl crate::Resettable for PTR_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/spis0.rs b/down-the-stack/dk_pac/src/spis0.rs new file mode 100644 index 0000000..95c21b0 --- /dev/null +++ b/down-the-stack/dk_pac/src/spis0.rs @@ -0,0 +1,124 @@ +#[doc = r"Register block"] +#[repr(C)] +pub struct RegisterBlock { + _reserved0: [u8; 0x24], + #[doc = "0x24 - Acquire SPI semaphore"] + pub tasks_acquire: TASKS_ACQUIRE, + #[doc = "0x28 - Release SPI semaphore, enabling the SPI slave to acquire it"] + pub tasks_release: TASKS_RELEASE, + _reserved2: [u8; 0xd8], + #[doc = "0x104 - Granted transaction completed"] + pub events_end: EVENTS_END, + _reserved3: [u8; 0x08], + #[doc = "0x110 - End of RXD buffer reached"] + pub events_endrx: EVENTS_ENDRX, + _reserved4: [u8; 0x14], + #[doc = "0x128 - Semaphore acquired"] + pub events_acquired: EVENTS_ACQUIRED, + _reserved5: [u8; 0xd4], + #[doc = "0x200 - Shortcuts between local events and tasks"] + pub shorts: SHORTS, + _reserved6: [u8; 0x0100], + #[doc = "0x304 - Enable interrupt"] + pub intenset: INTENSET, + #[doc = "0x308 - Disable interrupt"] + pub intenclr: INTENCLR, + _reserved8: [u8; 0xf4], + #[doc = "0x400 - Semaphore status register"] + pub semstat: SEMSTAT, + _reserved9: [u8; 0x3c], + #[doc = "0x440 - Status from last transaction"] + pub status: STATUS, + _reserved10: [u8; 0xbc], + #[doc = "0x500 - Enable SPI slave"] + pub enable: ENABLE, + _reserved11: [u8; 0x04], + #[doc = "0x508..0x518 - Unspecified"] + pub psel: PSEL, + _reserved12: [u8; 0x1c], + #[doc = "0x534..0x540 - Unspecified"] + pub rxd: RXD, + _reserved13: [u8; 0x04], + #[doc = "0x544..0x550 - Unspecified"] + pub txd: TXD, + _reserved14: [u8; 0x04], + #[doc = "0x554 - Configuration register"] + pub config: CONFIG, + _reserved15: [u8; 0x04], + #[doc = "0x55c - Default character. Character clocked out in case of an ignored transaction."] + pub def: DEF, + _reserved16: [u8; 0x60], + #[doc = "0x5c0 - Over-read character"] + pub orc: ORC, +} +#[doc = "TASKS_ACQUIRE (w) register accessor: an alias for `Reg`"] +pub type TASKS_ACQUIRE = crate::Reg; +#[doc = "Acquire SPI semaphore"] +pub mod tasks_acquire; +#[doc = "TASKS_RELEASE (w) register accessor: an alias for `Reg`"] +pub type TASKS_RELEASE = crate::Reg; +#[doc = "Release SPI semaphore, enabling the SPI slave to acquire it"] +pub mod tasks_release; +#[doc = "EVENTS_END (rw) register accessor: an alias for `Reg`"] +pub type EVENTS_END = crate::Reg; +#[doc = "Granted transaction completed"] +pub mod events_end; +#[doc = "EVENTS_ENDRX (rw) register accessor: an alias for `Reg`"] +pub type EVENTS_ENDRX = crate::Reg; +#[doc = "End of RXD buffer reached"] +pub mod events_endrx; +#[doc = "EVENTS_ACQUIRED (rw) register accessor: an alias for `Reg`"] +pub type EVENTS_ACQUIRED = crate::Reg; +#[doc = "Semaphore acquired"] +pub mod events_acquired; +#[doc = "SHORTS (rw) register accessor: an alias for `Reg`"] +pub type SHORTS = crate::Reg; +#[doc = "Shortcuts between local events and tasks"] +pub mod shorts; +#[doc = "INTENSET (rw) register accessor: an alias for `Reg`"] +pub type INTENSET = crate::Reg; +#[doc = "Enable interrupt"] +pub mod intenset; +#[doc = "INTENCLR (rw) register accessor: an alias for `Reg`"] +pub type INTENCLR = crate::Reg; +#[doc = "Disable interrupt"] +pub mod intenclr; +#[doc = "SEMSTAT (r) register accessor: an alias for `Reg`"] +pub type SEMSTAT = crate::Reg; +#[doc = "Semaphore status register"] +pub mod semstat; +#[doc = "STATUS (rw) register accessor: an alias for `Reg`"] +pub type STATUS = crate::Reg; +#[doc = "Status from last transaction"] +pub mod status; +#[doc = "ENABLE (rw) register accessor: an alias for `Reg`"] +pub type ENABLE = crate::Reg; +#[doc = "Enable SPI slave"] +pub mod enable; +#[doc = "Unspecified"] +pub use self::psel::PSEL; +#[doc = r"Cluster"] +#[doc = "Unspecified"] +pub mod psel; +#[doc = "Unspecified"] +pub use self::rxd::RXD; +#[doc = r"Cluster"] +#[doc = "Unspecified"] +pub mod rxd; +#[doc = "Unspecified"] +pub use self::txd::TXD; +#[doc = r"Cluster"] +#[doc = "Unspecified"] +pub mod txd; +#[doc = "CONFIG (rw) register accessor: an alias for `Reg`"] +pub type CONFIG = crate::Reg; +#[doc = "Configuration register"] +pub mod config; +#[doc = "DEF (rw) register accessor: an alias for `Reg`"] +pub type DEF = crate::Reg; +#[doc = "Default character. Character clocked out in case of an ignored transaction."] +pub mod def; +#[doc = "ORC (rw) register accessor: an alias for `Reg`"] +pub type ORC = crate::Reg; +#[doc = "Over-read character"] +pub mod orc; diff --git a/down-the-stack/dk_pac/src/spis0/config.rs b/down-the-stack/dk_pac/src/spis0/config.rs new file mode 100644 index 0000000..daad954 --- /dev/null +++ b/down-the-stack/dk_pac/src/spis0/config.rs @@ -0,0 +1,248 @@ +#[doc = "Register `CONFIG` 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 `CONFIG` 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 `ORDER` reader - Bit order"] +pub type ORDER_R = crate::BitReader; +#[doc = "Bit order\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum ORDER_A { + #[doc = "0: Most significant bit shifted out first"] + MSB_FIRST = 0, + #[doc = "1: Least significant bit shifted out first"] + LSB_FIRST = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: ORDER_A) -> Self { + variant as u8 != 0 + } +} +impl ORDER_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> ORDER_A { + match self.bits { + false => ORDER_A::MSB_FIRST, + true => ORDER_A::LSB_FIRST, + } + } + #[doc = "Checks if the value of the field is `MSB_FIRST`"] + #[inline(always)] + pub fn is_msb_first(&self) -> bool { + *self == ORDER_A::MSB_FIRST + } + #[doc = "Checks if the value of the field is `LSB_FIRST`"] + #[inline(always)] + pub fn is_lsb_first(&self) -> bool { + *self == ORDER_A::LSB_FIRST + } +} +#[doc = "Field `ORDER` writer - Bit order"] +pub type ORDER_W<'a, const O: u8> = crate::BitWriter<'a, u32, CONFIG_SPEC, ORDER_A, O>; +impl<'a, const O: u8> ORDER_W<'a, O> { + #[doc = "Most significant bit shifted out first"] + #[inline(always)] + pub fn msb_first(self) -> &'a mut W { + self.variant(ORDER_A::MSB_FIRST) + } + #[doc = "Least significant bit shifted out first"] + #[inline(always)] + pub fn lsb_first(self) -> &'a mut W { + self.variant(ORDER_A::LSB_FIRST) + } +} +#[doc = "Field `CPHA` reader - Serial clock (SCK) phase"] +pub type CPHA_R = crate::BitReader; +#[doc = "Serial clock (SCK) phase\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum CPHA_A { + #[doc = "0: Sample on leading edge of clock, shift serial data on trailing edge"] + LEADING = 0, + #[doc = "1: Sample on trailing edge of clock, shift serial data on leading edge"] + TRAILING = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: CPHA_A) -> Self { + variant as u8 != 0 + } +} +impl CPHA_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> CPHA_A { + match self.bits { + false => CPHA_A::LEADING, + true => CPHA_A::TRAILING, + } + } + #[doc = "Checks if the value of the field is `LEADING`"] + #[inline(always)] + pub fn is_leading(&self) -> bool { + *self == CPHA_A::LEADING + } + #[doc = "Checks if the value of the field is `TRAILING`"] + #[inline(always)] + pub fn is_trailing(&self) -> bool { + *self == CPHA_A::TRAILING + } +} +#[doc = "Field `CPHA` writer - Serial clock (SCK) phase"] +pub type CPHA_W<'a, const O: u8> = crate::BitWriter<'a, u32, CONFIG_SPEC, CPHA_A, O>; +impl<'a, const O: u8> CPHA_W<'a, O> { + #[doc = "Sample on leading edge of clock, shift serial data on trailing edge"] + #[inline(always)] + pub fn leading(self) -> &'a mut W { + self.variant(CPHA_A::LEADING) + } + #[doc = "Sample on trailing edge of clock, shift serial data on leading edge"] + #[inline(always)] + pub fn trailing(self) -> &'a mut W { + self.variant(CPHA_A::TRAILING) + } +} +#[doc = "Field `CPOL` reader - Serial clock (SCK) polarity"] +pub type CPOL_R = crate::BitReader; +#[doc = "Serial clock (SCK) polarity\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum CPOL_A { + #[doc = "0: Active high"] + ACTIVE_HIGH = 0, + #[doc = "1: Active low"] + ACTIVE_LOW = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: CPOL_A) -> Self { + variant as u8 != 0 + } +} +impl CPOL_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> CPOL_A { + match self.bits { + false => CPOL_A::ACTIVE_HIGH, + true => CPOL_A::ACTIVE_LOW, + } + } + #[doc = "Checks if the value of the field is `ACTIVE_HIGH`"] + #[inline(always)] + pub fn is_active_high(&self) -> bool { + *self == CPOL_A::ACTIVE_HIGH + } + #[doc = "Checks if the value of the field is `ACTIVE_LOW`"] + #[inline(always)] + pub fn is_active_low(&self) -> bool { + *self == CPOL_A::ACTIVE_LOW + } +} +#[doc = "Field `CPOL` writer - Serial clock (SCK) polarity"] +pub type CPOL_W<'a, const O: u8> = crate::BitWriter<'a, u32, CONFIG_SPEC, CPOL_A, O>; +impl<'a, const O: u8> CPOL_W<'a, O> { + #[doc = "Active high"] + #[inline(always)] + pub fn active_high(self) -> &'a mut W { + self.variant(CPOL_A::ACTIVE_HIGH) + } + #[doc = "Active low"] + #[inline(always)] + pub fn active_low(self) -> &'a mut W { + self.variant(CPOL_A::ACTIVE_LOW) + } +} +impl R { + #[doc = "Bit 0 - Bit order"] + #[inline(always)] + pub fn order(&self) -> ORDER_R { + ORDER_R::new((self.bits & 1) != 0) + } + #[doc = "Bit 1 - Serial clock (SCK) phase"] + #[inline(always)] + pub fn cpha(&self) -> CPHA_R { + CPHA_R::new(((self.bits >> 1) & 1) != 0) + } + #[doc = "Bit 2 - Serial clock (SCK) polarity"] + #[inline(always)] + pub fn cpol(&self) -> CPOL_R { + CPOL_R::new(((self.bits >> 2) & 1) != 0) + } +} +impl W { + #[doc = "Bit 0 - Bit order"] + #[inline(always)] + #[must_use] + pub fn order(&mut self) -> ORDER_W<0> { + ORDER_W::new(self) + } + #[doc = "Bit 1 - Serial clock (SCK) phase"] + #[inline(always)] + #[must_use] + pub fn cpha(&mut self) -> CPHA_W<1> { + CPHA_W::new(self) + } + #[doc = "Bit 2 - Serial clock (SCK) polarity"] + #[inline(always)] + #[must_use] + pub fn cpol(&mut self) -> CPOL_W<2> { + CPOL_W::new(self) + } + #[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 = "Configuration register\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 [config](index.html) module"] +pub struct CONFIG_SPEC; +impl crate::RegisterSpec for CONFIG_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [config::R](R) reader structure"] +impl crate::Readable for CONFIG_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [config::W](W) writer structure"] +impl crate::Writable for 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 CONFIG to value 0"] +impl crate::Resettable for CONFIG_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/spis0/def.rs b/down-the-stack/dk_pac/src/spis0/def.rs new file mode 100644 index 0000000..f868e92 --- /dev/null +++ b/down-the-stack/dk_pac/src/spis0/def.rs @@ -0,0 +1,80 @@ +#[doc = "Register `DEF` 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 `DEF` 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 `DEF` reader - Default character. Character clocked out in case of an ignored transaction."] +pub type DEF_R = crate::FieldReader; +#[doc = "Field `DEF` writer - Default character. Character clocked out in case of an ignored transaction."] +pub type DEF_W<'a, const O: u8> = crate::FieldWriter<'a, u32, DEF_SPEC, u8, u8, 8, O>; +impl R { + #[doc = "Bits 0:7 - Default character. Character clocked out in case of an ignored transaction."] + #[inline(always)] + pub fn def(&self) -> DEF_R { + DEF_R::new((self.bits & 0xff) as u8) + } +} +impl W { + #[doc = "Bits 0:7 - Default character. Character clocked out in case of an ignored transaction."] + #[inline(always)] + #[must_use] + pub fn def(&mut self) -> DEF_W<0> { + DEF_W::new(self) + } + #[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 = "Default character. Character clocked out in case of an ignored transaction.\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 [def](index.html) module"] +pub struct DEF_SPEC; +impl crate::RegisterSpec for DEF_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [def::R](R) reader structure"] +impl crate::Readable for DEF_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [def::W](W) writer structure"] +impl crate::Writable for DEF_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets DEF to value 0"] +impl crate::Resettable for DEF_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/spis0/enable.rs b/down-the-stack/dk_pac/src/spis0/enable.rs new file mode 100644 index 0000000..83a999f --- /dev/null +++ b/down-the-stack/dk_pac/src/spis0/enable.rs @@ -0,0 +1,128 @@ +#[doc = "Register `ENABLE` 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 `ENABLE` 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 `ENABLE` reader - Enable or disable SPI slave"] +pub type ENABLE_R = crate::FieldReader; +#[doc = "Enable or disable SPI slave\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +#[repr(u8)] +pub enum ENABLE_A { + #[doc = "0: Disable SPI slave"] + DISABLED = 0, + #[doc = "2: Enable SPI slave"] + ENABLED = 2, +} +impl From for u8 { + #[inline(always)] + fn from(variant: ENABLE_A) -> Self { + variant as _ + } +} +impl ENABLE_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> Option { + match self.bits { + 0 => Some(ENABLE_A::DISABLED), + 2 => Some(ENABLE_A::ENABLED), + _ => None, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == ENABLE_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == ENABLE_A::ENABLED + } +} +#[doc = "Field `ENABLE` writer - Enable or disable SPI slave"] +pub type ENABLE_W<'a, const O: u8> = crate::FieldWriter<'a, u32, ENABLE_SPEC, u8, ENABLE_A, 4, O>; +impl<'a, const O: u8> ENABLE_W<'a, O> { + #[doc = "Disable SPI slave"] + #[inline(always)] + pub fn disabled(self) -> &'a mut W { + self.variant(ENABLE_A::DISABLED) + } + #[doc = "Enable SPI slave"] + #[inline(always)] + pub fn enabled(self) -> &'a mut W { + self.variant(ENABLE_A::ENABLED) + } +} +impl R { + #[doc = "Bits 0:3 - Enable or disable SPI slave"] + #[inline(always)] + pub fn enable(&self) -> ENABLE_R { + ENABLE_R::new((self.bits & 0x0f) as u8) + } +} +impl W { + #[doc = "Bits 0:3 - Enable or disable SPI slave"] + #[inline(always)] + #[must_use] + pub fn enable(&mut self) -> ENABLE_W<0> { + 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 + } +} +#[doc = "Enable SPI slave\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 [enable](index.html) module"] +pub struct ENABLE_SPEC; +impl crate::RegisterSpec for ENABLE_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [enable::R](R) reader structure"] +impl crate::Readable for ENABLE_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [enable::W](W) writer structure"] +impl crate::Writable for ENABLE_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets ENABLE to value 0"] +impl crate::Resettable for ENABLE_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/spis0/events_acquired.rs b/down-the-stack/dk_pac/src/spis0/events_acquired.rs new file mode 100644 index 0000000..ccd9ca2 --- /dev/null +++ b/down-the-stack/dk_pac/src/spis0/events_acquired.rs @@ -0,0 +1,127 @@ +#[doc = "Register `EVENTS_ACQUIRED` 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 `EVENTS_ACQUIRED` 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 `EVENTS_ACQUIRED` reader - Semaphore acquired"] +pub type EVENTS_ACQUIRED_R = crate::BitReader; +#[doc = "Semaphore acquired\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum EVENTS_ACQUIRED_A { + #[doc = "0: Event not generated"] + NOT_GENERATED = 0, + #[doc = "1: Event generated"] + GENERATED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: EVENTS_ACQUIRED_A) -> Self { + variant as u8 != 0 + } +} +impl EVENTS_ACQUIRED_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> EVENTS_ACQUIRED_A { + match self.bits { + false => EVENTS_ACQUIRED_A::NOT_GENERATED, + true => EVENTS_ACQUIRED_A::GENERATED, + } + } + #[doc = "Checks if the value of the field is `NOT_GENERATED`"] + #[inline(always)] + pub fn is_not_generated(&self) -> bool { + *self == EVENTS_ACQUIRED_A::NOT_GENERATED + } + #[doc = "Checks if the value of the field is `GENERATED`"] + #[inline(always)] + pub fn is_generated(&self) -> bool { + *self == EVENTS_ACQUIRED_A::GENERATED + } +} +#[doc = "Field `EVENTS_ACQUIRED` writer - Semaphore acquired"] +pub type EVENTS_ACQUIRED_W<'a, const O: u8> = + crate::BitWriter<'a, u32, EVENTS_ACQUIRED_SPEC, EVENTS_ACQUIRED_A, O>; +impl<'a, const O: u8> EVENTS_ACQUIRED_W<'a, O> { + #[doc = "Event not generated"] + #[inline(always)] + pub fn not_generated(self) -> &'a mut W { + self.variant(EVENTS_ACQUIRED_A::NOT_GENERATED) + } + #[doc = "Event generated"] + #[inline(always)] + pub fn generated(self) -> &'a mut W { + self.variant(EVENTS_ACQUIRED_A::GENERATED) + } +} +impl R { + #[doc = "Bit 0 - Semaphore acquired"] + #[inline(always)] + pub fn events_acquired(&self) -> EVENTS_ACQUIRED_R { + EVENTS_ACQUIRED_R::new((self.bits & 1) != 0) + } +} +impl W { + #[doc = "Bit 0 - Semaphore acquired"] + #[inline(always)] + #[must_use] + pub fn events_acquired(&mut self) -> EVENTS_ACQUIRED_W<0> { + EVENTS_ACQUIRED_W::new(self) + } + #[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 = "Semaphore acquired\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 [events_acquired](index.html) module"] +pub struct EVENTS_ACQUIRED_SPEC; +impl crate::RegisterSpec for EVENTS_ACQUIRED_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [events_acquired::R](R) reader structure"] +impl crate::Readable for EVENTS_ACQUIRED_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [events_acquired::W](W) writer structure"] +impl crate::Writable for EVENTS_ACQUIRED_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets EVENTS_ACQUIRED to value 0"] +impl crate::Resettable for EVENTS_ACQUIRED_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/spis0/events_end.rs b/down-the-stack/dk_pac/src/spis0/events_end.rs new file mode 100644 index 0000000..82f180c --- /dev/null +++ b/down-the-stack/dk_pac/src/spis0/events_end.rs @@ -0,0 +1,127 @@ +#[doc = "Register `EVENTS_END` 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 `EVENTS_END` 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 `EVENTS_END` reader - Granted transaction completed"] +pub type EVENTS_END_R = crate::BitReader; +#[doc = "Granted transaction completed\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum EVENTS_END_A { + #[doc = "0: Event not generated"] + NOT_GENERATED = 0, + #[doc = "1: Event generated"] + GENERATED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: EVENTS_END_A) -> Self { + variant as u8 != 0 + } +} +impl EVENTS_END_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> EVENTS_END_A { + match self.bits { + false => EVENTS_END_A::NOT_GENERATED, + true => EVENTS_END_A::GENERATED, + } + } + #[doc = "Checks if the value of the field is `NOT_GENERATED`"] + #[inline(always)] + pub fn is_not_generated(&self) -> bool { + *self == EVENTS_END_A::NOT_GENERATED + } + #[doc = "Checks if the value of the field is `GENERATED`"] + #[inline(always)] + pub fn is_generated(&self) -> bool { + *self == EVENTS_END_A::GENERATED + } +} +#[doc = "Field `EVENTS_END` writer - Granted transaction completed"] +pub type EVENTS_END_W<'a, const O: u8> = + crate::BitWriter<'a, u32, EVENTS_END_SPEC, EVENTS_END_A, O>; +impl<'a, const O: u8> EVENTS_END_W<'a, O> { + #[doc = "Event not generated"] + #[inline(always)] + pub fn not_generated(self) -> &'a mut W { + self.variant(EVENTS_END_A::NOT_GENERATED) + } + #[doc = "Event generated"] + #[inline(always)] + pub fn generated(self) -> &'a mut W { + self.variant(EVENTS_END_A::GENERATED) + } +} +impl R { + #[doc = "Bit 0 - Granted transaction completed"] + #[inline(always)] + pub fn events_end(&self) -> EVENTS_END_R { + EVENTS_END_R::new((self.bits & 1) != 0) + } +} +impl W { + #[doc = "Bit 0 - Granted transaction completed"] + #[inline(always)] + #[must_use] + pub fn events_end(&mut self) -> EVENTS_END_W<0> { + EVENTS_END_W::new(self) + } + #[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 = "Granted transaction completed\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 [events_end](index.html) module"] +pub struct EVENTS_END_SPEC; +impl crate::RegisterSpec for EVENTS_END_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [events_end::R](R) reader structure"] +impl crate::Readable for EVENTS_END_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [events_end::W](W) writer structure"] +impl crate::Writable for EVENTS_END_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets EVENTS_END to value 0"] +impl crate::Resettable for EVENTS_END_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/spis0/events_endrx.rs b/down-the-stack/dk_pac/src/spis0/events_endrx.rs new file mode 100644 index 0000000..0bafc6a --- /dev/null +++ b/down-the-stack/dk_pac/src/spis0/events_endrx.rs @@ -0,0 +1,127 @@ +#[doc = "Register `EVENTS_ENDRX` 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 `EVENTS_ENDRX` 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 `EVENTS_ENDRX` reader - End of RXD buffer reached"] +pub type EVENTS_ENDRX_R = crate::BitReader; +#[doc = "End of RXD buffer reached\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum EVENTS_ENDRX_A { + #[doc = "0: Event not generated"] + NOT_GENERATED = 0, + #[doc = "1: Event generated"] + GENERATED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: EVENTS_ENDRX_A) -> Self { + variant as u8 != 0 + } +} +impl EVENTS_ENDRX_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> EVENTS_ENDRX_A { + match self.bits { + false => EVENTS_ENDRX_A::NOT_GENERATED, + true => EVENTS_ENDRX_A::GENERATED, + } + } + #[doc = "Checks if the value of the field is `NOT_GENERATED`"] + #[inline(always)] + pub fn is_not_generated(&self) -> bool { + *self == EVENTS_ENDRX_A::NOT_GENERATED + } + #[doc = "Checks if the value of the field is `GENERATED`"] + #[inline(always)] + pub fn is_generated(&self) -> bool { + *self == EVENTS_ENDRX_A::GENERATED + } +} +#[doc = "Field `EVENTS_ENDRX` writer - End of RXD buffer reached"] +pub type EVENTS_ENDRX_W<'a, const O: u8> = + crate::BitWriter<'a, u32, EVENTS_ENDRX_SPEC, EVENTS_ENDRX_A, O>; +impl<'a, const O: u8> EVENTS_ENDRX_W<'a, O> { + #[doc = "Event not generated"] + #[inline(always)] + pub fn not_generated(self) -> &'a mut W { + self.variant(EVENTS_ENDRX_A::NOT_GENERATED) + } + #[doc = "Event generated"] + #[inline(always)] + pub fn generated(self) -> &'a mut W { + self.variant(EVENTS_ENDRX_A::GENERATED) + } +} +impl R { + #[doc = "Bit 0 - End of RXD buffer reached"] + #[inline(always)] + pub fn events_endrx(&self) -> EVENTS_ENDRX_R { + EVENTS_ENDRX_R::new((self.bits & 1) != 0) + } +} +impl W { + #[doc = "Bit 0 - End of RXD buffer reached"] + #[inline(always)] + #[must_use] + pub fn events_endrx(&mut self) -> EVENTS_ENDRX_W<0> { + EVENTS_ENDRX_W::new(self) + } + #[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 = "End of RXD buffer reached\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 [events_endrx](index.html) module"] +pub struct EVENTS_ENDRX_SPEC; +impl crate::RegisterSpec for EVENTS_ENDRX_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [events_endrx::R](R) reader structure"] +impl crate::Readable for EVENTS_ENDRX_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [events_endrx::W](W) writer structure"] +impl crate::Writable for EVENTS_ENDRX_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets EVENTS_ENDRX to value 0"] +impl crate::Resettable for EVENTS_ENDRX_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/spis0/intenclr.rs b/down-the-stack/dk_pac/src/spis0/intenclr.rs new file mode 100644 index 0000000..1804274 --- /dev/null +++ b/down-the-stack/dk_pac/src/spis0/intenclr.rs @@ -0,0 +1,269 @@ +#[doc = "Register `INTENCLR` 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 `INTENCLR` 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 `END` reader - Write '1' to disable interrupt for event END"] +pub type END_R = crate::BitReader; +#[doc = "Write '1' to disable interrupt for event END\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum END_A { + #[doc = "0: Read: Disabled"] + DISABLED = 0, + #[doc = "1: Read: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: END_A) -> Self { + variant as u8 != 0 + } +} +impl END_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> END_A { + match self.bits { + false => END_A::DISABLED, + true => END_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == END_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == END_A::ENABLED + } +} +#[doc = "Write '1' to disable interrupt for event END\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum END_AW { + #[doc = "1: Disable"] + CLEAR = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: END_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `END` writer - Write '1' to disable interrupt for event END"] +pub type END_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENCLR_SPEC, END_AW, O>; +impl<'a, const O: u8> END_W<'a, O> { + #[doc = "Disable"] + #[inline(always)] + pub fn clear(self) -> &'a mut W { + self.variant(END_AW::CLEAR) + } +} +#[doc = "Field `ENDRX` reader - Write '1' to disable interrupt for event ENDRX"] +pub type ENDRX_R = crate::BitReader; +#[doc = "Write '1' to disable interrupt for event ENDRX\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum ENDRX_A { + #[doc = "0: Read: Disabled"] + DISABLED = 0, + #[doc = "1: Read: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: ENDRX_A) -> Self { + variant as u8 != 0 + } +} +impl ENDRX_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> ENDRX_A { + match self.bits { + false => ENDRX_A::DISABLED, + true => ENDRX_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == ENDRX_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == ENDRX_A::ENABLED + } +} +#[doc = "Write '1' to disable interrupt for event ENDRX\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum ENDRX_AW { + #[doc = "1: Disable"] + CLEAR = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: ENDRX_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `ENDRX` writer - Write '1' to disable interrupt for event ENDRX"] +pub type ENDRX_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENCLR_SPEC, ENDRX_AW, O>; +impl<'a, const O: u8> ENDRX_W<'a, O> { + #[doc = "Disable"] + #[inline(always)] + pub fn clear(self) -> &'a mut W { + self.variant(ENDRX_AW::CLEAR) + } +} +#[doc = "Field `ACQUIRED` reader - Write '1' to disable interrupt for event ACQUIRED"] +pub type ACQUIRED_R = crate::BitReader; +#[doc = "Write '1' to disable interrupt for event ACQUIRED\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum ACQUIRED_A { + #[doc = "0: Read: Disabled"] + DISABLED = 0, + #[doc = "1: Read: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: ACQUIRED_A) -> Self { + variant as u8 != 0 + } +} +impl ACQUIRED_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> ACQUIRED_A { + match self.bits { + false => ACQUIRED_A::DISABLED, + true => ACQUIRED_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == ACQUIRED_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == ACQUIRED_A::ENABLED + } +} +#[doc = "Write '1' to disable interrupt for event ACQUIRED\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum ACQUIRED_AW { + #[doc = "1: Disable"] + CLEAR = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: ACQUIRED_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `ACQUIRED` writer - Write '1' to disable interrupt for event ACQUIRED"] +pub type ACQUIRED_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENCLR_SPEC, ACQUIRED_AW, O>; +impl<'a, const O: u8> ACQUIRED_W<'a, O> { + #[doc = "Disable"] + #[inline(always)] + pub fn clear(self) -> &'a mut W { + self.variant(ACQUIRED_AW::CLEAR) + } +} +impl R { + #[doc = "Bit 1 - Write '1' to disable interrupt for event END"] + #[inline(always)] + pub fn end(&self) -> END_R { + END_R::new(((self.bits >> 1) & 1) != 0) + } + #[doc = "Bit 4 - Write '1' to disable interrupt for event ENDRX"] + #[inline(always)] + pub fn endrx(&self) -> ENDRX_R { + ENDRX_R::new(((self.bits >> 4) & 1) != 0) + } + #[doc = "Bit 10 - Write '1' to disable interrupt for event ACQUIRED"] + #[inline(always)] + pub fn acquired(&self) -> ACQUIRED_R { + ACQUIRED_R::new(((self.bits >> 10) & 1) != 0) + } +} +impl W { + #[doc = "Bit 1 - Write '1' to disable interrupt for event END"] + #[inline(always)] + #[must_use] + pub fn end(&mut self) -> END_W<1> { + END_W::new(self) + } + #[doc = "Bit 4 - Write '1' to disable interrupt for event ENDRX"] + #[inline(always)] + #[must_use] + pub fn endrx(&mut self) -> ENDRX_W<4> { + ENDRX_W::new(self) + } + #[doc = "Bit 10 - Write '1' to disable interrupt for event ACQUIRED"] + #[inline(always)] + #[must_use] + pub fn acquired(&mut self) -> ACQUIRED_W<10> { + ACQUIRED_W::new(self) + } + #[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 = "Disable interrupt\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 [intenclr](index.html) module"] +pub struct INTENCLR_SPEC; +impl crate::RegisterSpec for INTENCLR_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [intenclr::R](R) reader structure"] +impl crate::Readable for INTENCLR_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [intenclr::W](W) writer structure"] +impl crate::Writable for INTENCLR_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets INTENCLR to value 0"] +impl crate::Resettable for INTENCLR_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/spis0/intenset.rs b/down-the-stack/dk_pac/src/spis0/intenset.rs new file mode 100644 index 0000000..4cacb4c --- /dev/null +++ b/down-the-stack/dk_pac/src/spis0/intenset.rs @@ -0,0 +1,269 @@ +#[doc = "Register `INTENSET` 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 `INTENSET` 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 `END` reader - Write '1' to enable interrupt for event END"] +pub type END_R = crate::BitReader; +#[doc = "Write '1' to enable interrupt for event END\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum END_A { + #[doc = "0: Read: Disabled"] + DISABLED = 0, + #[doc = "1: Read: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: END_A) -> Self { + variant as u8 != 0 + } +} +impl END_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> END_A { + match self.bits { + false => END_A::DISABLED, + true => END_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == END_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == END_A::ENABLED + } +} +#[doc = "Write '1' to enable interrupt for event END\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum END_AW { + #[doc = "1: Enable"] + SET = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: END_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `END` writer - Write '1' to enable interrupt for event END"] +pub type END_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENSET_SPEC, END_AW, O>; +impl<'a, const O: u8> END_W<'a, O> { + #[doc = "Enable"] + #[inline(always)] + pub fn set(self) -> &'a mut W { + self.variant(END_AW::SET) + } +} +#[doc = "Field `ENDRX` reader - Write '1' to enable interrupt for event ENDRX"] +pub type ENDRX_R = crate::BitReader; +#[doc = "Write '1' to enable interrupt for event ENDRX\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum ENDRX_A { + #[doc = "0: Read: Disabled"] + DISABLED = 0, + #[doc = "1: Read: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: ENDRX_A) -> Self { + variant as u8 != 0 + } +} +impl ENDRX_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> ENDRX_A { + match self.bits { + false => ENDRX_A::DISABLED, + true => ENDRX_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == ENDRX_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == ENDRX_A::ENABLED + } +} +#[doc = "Write '1' to enable interrupt for event ENDRX\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum ENDRX_AW { + #[doc = "1: Enable"] + SET = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: ENDRX_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `ENDRX` writer - Write '1' to enable interrupt for event ENDRX"] +pub type ENDRX_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENSET_SPEC, ENDRX_AW, O>; +impl<'a, const O: u8> ENDRX_W<'a, O> { + #[doc = "Enable"] + #[inline(always)] + pub fn set(self) -> &'a mut W { + self.variant(ENDRX_AW::SET) + } +} +#[doc = "Field `ACQUIRED` reader - Write '1' to enable interrupt for event ACQUIRED"] +pub type ACQUIRED_R = crate::BitReader; +#[doc = "Write '1' to enable interrupt for event ACQUIRED\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum ACQUIRED_A { + #[doc = "0: Read: Disabled"] + DISABLED = 0, + #[doc = "1: Read: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: ACQUIRED_A) -> Self { + variant as u8 != 0 + } +} +impl ACQUIRED_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> ACQUIRED_A { + match self.bits { + false => ACQUIRED_A::DISABLED, + true => ACQUIRED_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == ACQUIRED_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == ACQUIRED_A::ENABLED + } +} +#[doc = "Write '1' to enable interrupt for event ACQUIRED\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum ACQUIRED_AW { + #[doc = "1: Enable"] + SET = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: ACQUIRED_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `ACQUIRED` writer - Write '1' to enable interrupt for event ACQUIRED"] +pub type ACQUIRED_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENSET_SPEC, ACQUIRED_AW, O>; +impl<'a, const O: u8> ACQUIRED_W<'a, O> { + #[doc = "Enable"] + #[inline(always)] + pub fn set(self) -> &'a mut W { + self.variant(ACQUIRED_AW::SET) + } +} +impl R { + #[doc = "Bit 1 - Write '1' to enable interrupt for event END"] + #[inline(always)] + pub fn end(&self) -> END_R { + END_R::new(((self.bits >> 1) & 1) != 0) + } + #[doc = "Bit 4 - Write '1' to enable interrupt for event ENDRX"] + #[inline(always)] + pub fn endrx(&self) -> ENDRX_R { + ENDRX_R::new(((self.bits >> 4) & 1) != 0) + } + #[doc = "Bit 10 - Write '1' to enable interrupt for event ACQUIRED"] + #[inline(always)] + pub fn acquired(&self) -> ACQUIRED_R { + ACQUIRED_R::new(((self.bits >> 10) & 1) != 0) + } +} +impl W { + #[doc = "Bit 1 - Write '1' to enable interrupt for event END"] + #[inline(always)] + #[must_use] + pub fn end(&mut self) -> END_W<1> { + END_W::new(self) + } + #[doc = "Bit 4 - Write '1' to enable interrupt for event ENDRX"] + #[inline(always)] + #[must_use] + pub fn endrx(&mut self) -> ENDRX_W<4> { + ENDRX_W::new(self) + } + #[doc = "Bit 10 - Write '1' to enable interrupt for event ACQUIRED"] + #[inline(always)] + #[must_use] + pub fn acquired(&mut self) -> ACQUIRED_W<10> { + ACQUIRED_W::new(self) + } + #[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 = "Enable interrupt\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 [intenset](index.html) module"] +pub struct INTENSET_SPEC; +impl crate::RegisterSpec for INTENSET_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [intenset::R](R) reader structure"] +impl crate::Readable for INTENSET_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [intenset::W](W) writer structure"] +impl crate::Writable for INTENSET_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets INTENSET to value 0"] +impl crate::Resettable for INTENSET_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/spis0/orc.rs b/down-the-stack/dk_pac/src/spis0/orc.rs new file mode 100644 index 0000000..53d213c --- /dev/null +++ b/down-the-stack/dk_pac/src/spis0/orc.rs @@ -0,0 +1,80 @@ +#[doc = "Register `ORC` 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 `ORC` 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 `ORC` reader - Over-read character. Character clocked out after an over-read of the transmit buffer."] +pub type ORC_R = crate::FieldReader; +#[doc = "Field `ORC` writer - Over-read character. Character clocked out after an over-read of the transmit buffer."] +pub type ORC_W<'a, const O: u8> = crate::FieldWriter<'a, u32, ORC_SPEC, u8, u8, 8, O>; +impl R { + #[doc = "Bits 0:7 - Over-read character. Character clocked out after an over-read of the transmit buffer."] + #[inline(always)] + pub fn orc(&self) -> ORC_R { + ORC_R::new((self.bits & 0xff) as u8) + } +} +impl W { + #[doc = "Bits 0:7 - Over-read character. Character clocked out after an over-read of the transmit buffer."] + #[inline(always)] + #[must_use] + pub fn orc(&mut self) -> ORC_W<0> { + ORC_W::new(self) + } + #[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 = "Over-read character\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 [orc](index.html) module"] +pub struct ORC_SPEC; +impl crate::RegisterSpec for ORC_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [orc::R](R) reader structure"] +impl crate::Readable for ORC_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [orc::W](W) writer structure"] +impl crate::Writable for ORC_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets ORC to value 0"] +impl crate::Resettable for ORC_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/spis0/psel.rs b/down-the-stack/dk_pac/src/spis0/psel.rs new file mode 100644 index 0000000..e4b4d4b --- /dev/null +++ b/down-the-stack/dk_pac/src/spis0/psel.rs @@ -0,0 +1,28 @@ +#[doc = r"Register block"] +#[repr(C)] +pub struct PSEL { + #[doc = "0x00 - Pin select for SCK"] + pub sck: SCK, + #[doc = "0x04 - Pin select for MISO signal"] + pub miso: MISO, + #[doc = "0x08 - Pin select for MOSI signal"] + pub mosi: MOSI, + #[doc = "0x0c - Pin select for CSN signal"] + pub csn: CSN, +} +#[doc = "SCK (rw) register accessor: an alias for `Reg`"] +pub type SCK = crate::Reg; +#[doc = "Pin select for SCK"] +pub mod sck; +#[doc = "MISO (rw) register accessor: an alias for `Reg`"] +pub type MISO = crate::Reg; +#[doc = "Pin select for MISO signal"] +pub mod miso; +#[doc = "MOSI (rw) register accessor: an alias for `Reg`"] +pub type MOSI = crate::Reg; +#[doc = "Pin select for MOSI signal"] +pub mod mosi; +#[doc = "CSN (rw) register accessor: an alias for `Reg`"] +pub type CSN = crate::Reg; +#[doc = "Pin select for CSN signal"] +pub mod csn; diff --git a/down-the-stack/dk_pac/src/spis0/psel/csn.rs b/down-the-stack/dk_pac/src/spis0/psel/csn.rs new file mode 100644 index 0000000..9c6f484 --- /dev/null +++ b/down-the-stack/dk_pac/src/spis0/psel/csn.rs @@ -0,0 +1,141 @@ +#[doc = "Register `CSN` 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 `CSN` 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 `PIN` reader - Pin number"] +pub type PIN_R = crate::FieldReader; +#[doc = "Field `PIN` writer - Pin number"] +pub type PIN_W<'a, const O: u8> = crate::FieldWriter<'a, u32, CSN_SPEC, u8, u8, 5, O>; +#[doc = "Field `CONNECT` reader - Connection"] +pub type CONNECT_R = crate::BitReader; +#[doc = "Connection\n\nValue on reset: 1"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum CONNECT_A { + #[doc = "1: Disconnect"] + DISCONNECTED = 1, + #[doc = "0: Connect"] + CONNECTED = 0, +} +impl From for bool { + #[inline(always)] + fn from(variant: CONNECT_A) -> Self { + variant as u8 != 0 + } +} +impl CONNECT_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> CONNECT_A { + match self.bits { + true => CONNECT_A::DISCONNECTED, + false => CONNECT_A::CONNECTED, + } + } + #[doc = "Checks if the value of the field is `DISCONNECTED`"] + #[inline(always)] + pub fn is_disconnected(&self) -> bool { + *self == CONNECT_A::DISCONNECTED + } + #[doc = "Checks if the value of the field is `CONNECTED`"] + #[inline(always)] + pub fn is_connected(&self) -> bool { + *self == CONNECT_A::CONNECTED + } +} +#[doc = "Field `CONNECT` writer - Connection"] +pub type CONNECT_W<'a, const O: u8> = crate::BitWriter<'a, u32, CSN_SPEC, CONNECT_A, O>; +impl<'a, const O: u8> CONNECT_W<'a, O> { + #[doc = "Disconnect"] + #[inline(always)] + pub fn disconnected(self) -> &'a mut W { + self.variant(CONNECT_A::DISCONNECTED) + } + #[doc = "Connect"] + #[inline(always)] + pub fn connected(self) -> &'a mut W { + self.variant(CONNECT_A::CONNECTED) + } +} +impl R { + #[doc = "Bits 0:4 - Pin number"] + #[inline(always)] + pub fn pin(&self) -> PIN_R { + PIN_R::new((self.bits & 0x1f) as u8) + } + #[doc = "Bit 31 - Connection"] + #[inline(always)] + pub fn connect(&self) -> CONNECT_R { + CONNECT_R::new(((self.bits >> 31) & 1) != 0) + } +} +impl W { + #[doc = "Bits 0:4 - Pin number"] + #[inline(always)] + #[must_use] + pub fn pin(&mut self) -> PIN_W<0> { + PIN_W::new(self) + } + #[doc = "Bit 31 - Connection"] + #[inline(always)] + #[must_use] + pub fn connect(&mut self) -> CONNECT_W<31> { + CONNECT_W::new(self) + } + #[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 = "Pin select for CSN signal\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 [csn](index.html) module"] +pub struct CSN_SPEC; +impl crate::RegisterSpec for CSN_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [csn::R](R) reader structure"] +impl crate::Readable for CSN_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [csn::W](W) writer structure"] +impl crate::Writable for CSN_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets CSN to value 0xffff_ffff"] +impl crate::Resettable for CSN_SPEC { + const RESET_VALUE: Self::Ux = 0xffff_ffff; +} diff --git a/down-the-stack/dk_pac/src/spis0/psel/miso.rs b/down-the-stack/dk_pac/src/spis0/psel/miso.rs new file mode 100644 index 0000000..d04a28b --- /dev/null +++ b/down-the-stack/dk_pac/src/spis0/psel/miso.rs @@ -0,0 +1,141 @@ +#[doc = "Register `MISO` 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 `MISO` 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 `PIN` reader - Pin number"] +pub type PIN_R = crate::FieldReader; +#[doc = "Field `PIN` writer - Pin number"] +pub type PIN_W<'a, const O: u8> = crate::FieldWriter<'a, u32, MISO_SPEC, u8, u8, 5, O>; +#[doc = "Field `CONNECT` reader - Connection"] +pub type CONNECT_R = crate::BitReader; +#[doc = "Connection\n\nValue on reset: 1"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum CONNECT_A { + #[doc = "1: Disconnect"] + DISCONNECTED = 1, + #[doc = "0: Connect"] + CONNECTED = 0, +} +impl From for bool { + #[inline(always)] + fn from(variant: CONNECT_A) -> Self { + variant as u8 != 0 + } +} +impl CONNECT_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> CONNECT_A { + match self.bits { + true => CONNECT_A::DISCONNECTED, + false => CONNECT_A::CONNECTED, + } + } + #[doc = "Checks if the value of the field is `DISCONNECTED`"] + #[inline(always)] + pub fn is_disconnected(&self) -> bool { + *self == CONNECT_A::DISCONNECTED + } + #[doc = "Checks if the value of the field is `CONNECTED`"] + #[inline(always)] + pub fn is_connected(&self) -> bool { + *self == CONNECT_A::CONNECTED + } +} +#[doc = "Field `CONNECT` writer - Connection"] +pub type CONNECT_W<'a, const O: u8> = crate::BitWriter<'a, u32, MISO_SPEC, CONNECT_A, O>; +impl<'a, const O: u8> CONNECT_W<'a, O> { + #[doc = "Disconnect"] + #[inline(always)] + pub fn disconnected(self) -> &'a mut W { + self.variant(CONNECT_A::DISCONNECTED) + } + #[doc = "Connect"] + #[inline(always)] + pub fn connected(self) -> &'a mut W { + self.variant(CONNECT_A::CONNECTED) + } +} +impl R { + #[doc = "Bits 0:4 - Pin number"] + #[inline(always)] + pub fn pin(&self) -> PIN_R { + PIN_R::new((self.bits & 0x1f) as u8) + } + #[doc = "Bit 31 - Connection"] + #[inline(always)] + pub fn connect(&self) -> CONNECT_R { + CONNECT_R::new(((self.bits >> 31) & 1) != 0) + } +} +impl W { + #[doc = "Bits 0:4 - Pin number"] + #[inline(always)] + #[must_use] + pub fn pin(&mut self) -> PIN_W<0> { + PIN_W::new(self) + } + #[doc = "Bit 31 - Connection"] + #[inline(always)] + #[must_use] + pub fn connect(&mut self) -> CONNECT_W<31> { + CONNECT_W::new(self) + } + #[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 = "Pin select for MISO signal\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 [miso](index.html) module"] +pub struct MISO_SPEC; +impl crate::RegisterSpec for MISO_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [miso::R](R) reader structure"] +impl crate::Readable for MISO_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [miso::W](W) writer structure"] +impl crate::Writable for MISO_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets MISO to value 0xffff_ffff"] +impl crate::Resettable for MISO_SPEC { + const RESET_VALUE: Self::Ux = 0xffff_ffff; +} diff --git a/down-the-stack/dk_pac/src/spis0/psel/mosi.rs b/down-the-stack/dk_pac/src/spis0/psel/mosi.rs new file mode 100644 index 0000000..8c4f76f --- /dev/null +++ b/down-the-stack/dk_pac/src/spis0/psel/mosi.rs @@ -0,0 +1,141 @@ +#[doc = "Register `MOSI` 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 `MOSI` 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 `PIN` reader - Pin number"] +pub type PIN_R = crate::FieldReader; +#[doc = "Field `PIN` writer - Pin number"] +pub type PIN_W<'a, const O: u8> = crate::FieldWriter<'a, u32, MOSI_SPEC, u8, u8, 5, O>; +#[doc = "Field `CONNECT` reader - Connection"] +pub type CONNECT_R = crate::BitReader; +#[doc = "Connection\n\nValue on reset: 1"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum CONNECT_A { + #[doc = "1: Disconnect"] + DISCONNECTED = 1, + #[doc = "0: Connect"] + CONNECTED = 0, +} +impl From for bool { + #[inline(always)] + fn from(variant: CONNECT_A) -> Self { + variant as u8 != 0 + } +} +impl CONNECT_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> CONNECT_A { + match self.bits { + true => CONNECT_A::DISCONNECTED, + false => CONNECT_A::CONNECTED, + } + } + #[doc = "Checks if the value of the field is `DISCONNECTED`"] + #[inline(always)] + pub fn is_disconnected(&self) -> bool { + *self == CONNECT_A::DISCONNECTED + } + #[doc = "Checks if the value of the field is `CONNECTED`"] + #[inline(always)] + pub fn is_connected(&self) -> bool { + *self == CONNECT_A::CONNECTED + } +} +#[doc = "Field `CONNECT` writer - Connection"] +pub type CONNECT_W<'a, const O: u8> = crate::BitWriter<'a, u32, MOSI_SPEC, CONNECT_A, O>; +impl<'a, const O: u8> CONNECT_W<'a, O> { + #[doc = "Disconnect"] + #[inline(always)] + pub fn disconnected(self) -> &'a mut W { + self.variant(CONNECT_A::DISCONNECTED) + } + #[doc = "Connect"] + #[inline(always)] + pub fn connected(self) -> &'a mut W { + self.variant(CONNECT_A::CONNECTED) + } +} +impl R { + #[doc = "Bits 0:4 - Pin number"] + #[inline(always)] + pub fn pin(&self) -> PIN_R { + PIN_R::new((self.bits & 0x1f) as u8) + } + #[doc = "Bit 31 - Connection"] + #[inline(always)] + pub fn connect(&self) -> CONNECT_R { + CONNECT_R::new(((self.bits >> 31) & 1) != 0) + } +} +impl W { + #[doc = "Bits 0:4 - Pin number"] + #[inline(always)] + #[must_use] + pub fn pin(&mut self) -> PIN_W<0> { + PIN_W::new(self) + } + #[doc = "Bit 31 - Connection"] + #[inline(always)] + #[must_use] + pub fn connect(&mut self) -> CONNECT_W<31> { + CONNECT_W::new(self) + } + #[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 = "Pin select for MOSI signal\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 [mosi](index.html) module"] +pub struct MOSI_SPEC; +impl crate::RegisterSpec for MOSI_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [mosi::R](R) reader structure"] +impl crate::Readable for MOSI_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [mosi::W](W) writer structure"] +impl crate::Writable for MOSI_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets MOSI to value 0xffff_ffff"] +impl crate::Resettable for MOSI_SPEC { + const RESET_VALUE: Self::Ux = 0xffff_ffff; +} diff --git a/down-the-stack/dk_pac/src/spis0/psel/sck.rs b/down-the-stack/dk_pac/src/spis0/psel/sck.rs new file mode 100644 index 0000000..d1b7a9e --- /dev/null +++ b/down-the-stack/dk_pac/src/spis0/psel/sck.rs @@ -0,0 +1,141 @@ +#[doc = "Register `SCK` 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 `SCK` 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 `PIN` reader - Pin number"] +pub type PIN_R = crate::FieldReader; +#[doc = "Field `PIN` writer - Pin number"] +pub type PIN_W<'a, const O: u8> = crate::FieldWriter<'a, u32, SCK_SPEC, u8, u8, 5, O>; +#[doc = "Field `CONNECT` reader - Connection"] +pub type CONNECT_R = crate::BitReader; +#[doc = "Connection\n\nValue on reset: 1"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum CONNECT_A { + #[doc = "1: Disconnect"] + DISCONNECTED = 1, + #[doc = "0: Connect"] + CONNECTED = 0, +} +impl From for bool { + #[inline(always)] + fn from(variant: CONNECT_A) -> Self { + variant as u8 != 0 + } +} +impl CONNECT_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> CONNECT_A { + match self.bits { + true => CONNECT_A::DISCONNECTED, + false => CONNECT_A::CONNECTED, + } + } + #[doc = "Checks if the value of the field is `DISCONNECTED`"] + #[inline(always)] + pub fn is_disconnected(&self) -> bool { + *self == CONNECT_A::DISCONNECTED + } + #[doc = "Checks if the value of the field is `CONNECTED`"] + #[inline(always)] + pub fn is_connected(&self) -> bool { + *self == CONNECT_A::CONNECTED + } +} +#[doc = "Field `CONNECT` writer - Connection"] +pub type CONNECT_W<'a, const O: u8> = crate::BitWriter<'a, u32, SCK_SPEC, CONNECT_A, O>; +impl<'a, const O: u8> CONNECT_W<'a, O> { + #[doc = "Disconnect"] + #[inline(always)] + pub fn disconnected(self) -> &'a mut W { + self.variant(CONNECT_A::DISCONNECTED) + } + #[doc = "Connect"] + #[inline(always)] + pub fn connected(self) -> &'a mut W { + self.variant(CONNECT_A::CONNECTED) + } +} +impl R { + #[doc = "Bits 0:4 - Pin number"] + #[inline(always)] + pub fn pin(&self) -> PIN_R { + PIN_R::new((self.bits & 0x1f) as u8) + } + #[doc = "Bit 31 - Connection"] + #[inline(always)] + pub fn connect(&self) -> CONNECT_R { + CONNECT_R::new(((self.bits >> 31) & 1) != 0) + } +} +impl W { + #[doc = "Bits 0:4 - Pin number"] + #[inline(always)] + #[must_use] + pub fn pin(&mut self) -> PIN_W<0> { + PIN_W::new(self) + } + #[doc = "Bit 31 - Connection"] + #[inline(always)] + #[must_use] + pub fn connect(&mut self) -> CONNECT_W<31> { + CONNECT_W::new(self) + } + #[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 = "Pin select for SCK\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 [sck](index.html) module"] +pub struct SCK_SPEC; +impl crate::RegisterSpec for SCK_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [sck::R](R) reader structure"] +impl crate::Readable for SCK_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [sck::W](W) writer structure"] +impl crate::Writable for SCK_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets SCK to value 0xffff_ffff"] +impl crate::Resettable for SCK_SPEC { + const RESET_VALUE: Self::Ux = 0xffff_ffff; +} diff --git a/down-the-stack/dk_pac/src/spis0/rxd.rs b/down-the-stack/dk_pac/src/spis0/rxd.rs new file mode 100644 index 0000000..87f3461 --- /dev/null +++ b/down-the-stack/dk_pac/src/spis0/rxd.rs @@ -0,0 +1,22 @@ +#[doc = r"Register block"] +#[repr(C)] +pub struct RXD { + #[doc = "0x00 - RXD data pointer"] + pub ptr: PTR, + #[doc = "0x04 - Maximum number of bytes in receive buffer"] + pub maxcnt: MAXCNT, + #[doc = "0x08 - Number of bytes received in last granted transaction"] + pub amount: AMOUNT, +} +#[doc = "PTR (rw) register accessor: an alias for `Reg`"] +pub type PTR = crate::Reg; +#[doc = "RXD data pointer"] +pub mod ptr; +#[doc = "MAXCNT (rw) register accessor: an alias for `Reg`"] +pub type MAXCNT = crate::Reg; +#[doc = "Maximum number of bytes in receive buffer"] +pub mod maxcnt; +#[doc = "AMOUNT (r) register accessor: an alias for `Reg`"] +pub type AMOUNT = crate::Reg; +#[doc = "Number of bytes received in last granted transaction"] +pub mod amount; diff --git a/down-the-stack/dk_pac/src/spis0/rxd/amount.rs b/down-the-stack/dk_pac/src/spis0/rxd/amount.rs new file mode 100644 index 0000000..71b50d7 --- /dev/null +++ b/down-the-stack/dk_pac/src/spis0/rxd/amount.rs @@ -0,0 +1,37 @@ +#[doc = "Register `AMOUNT` 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 = "Field `AMOUNT` reader - Number of bytes received in the last granted transaction"] +pub type AMOUNT_R = crate::FieldReader; +impl R { + #[doc = "Bits 0:7 - Number of bytes received in the last granted transaction"] + #[inline(always)] + pub fn amount(&self) -> AMOUNT_R { + AMOUNT_R::new((self.bits & 0xff) as u8) + } +} +#[doc = "Number of bytes received in last granted transaction\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 [amount](index.html) module"] +pub struct AMOUNT_SPEC; +impl crate::RegisterSpec for AMOUNT_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [amount::R](R) reader structure"] +impl crate::Readable for AMOUNT_SPEC { + type Reader = R; +} +#[doc = "`reset()` method sets AMOUNT to value 0"] +impl crate::Resettable for AMOUNT_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/spis0/rxd/maxcnt.rs b/down-the-stack/dk_pac/src/spis0/rxd/maxcnt.rs new file mode 100644 index 0000000..7d9b79c --- /dev/null +++ b/down-the-stack/dk_pac/src/spis0/rxd/maxcnt.rs @@ -0,0 +1,80 @@ +#[doc = "Register `MAXCNT` 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 `MAXCNT` 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 `MAXCNT` reader - Maximum number of bytes in receive buffer"] +pub type MAXCNT_R = crate::FieldReader; +#[doc = "Field `MAXCNT` writer - Maximum number of bytes in receive buffer"] +pub type MAXCNT_W<'a, const O: u8> = crate::FieldWriter<'a, u32, MAXCNT_SPEC, u8, u8, 8, O>; +impl R { + #[doc = "Bits 0:7 - Maximum number of bytes in receive buffer"] + #[inline(always)] + pub fn maxcnt(&self) -> MAXCNT_R { + MAXCNT_R::new((self.bits & 0xff) as u8) + } +} +impl W { + #[doc = "Bits 0:7 - Maximum number of bytes in receive buffer"] + #[inline(always)] + #[must_use] + pub fn maxcnt(&mut self) -> MAXCNT_W<0> { + MAXCNT_W::new(self) + } + #[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 = "Maximum number of bytes in receive buffer\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 [maxcnt](index.html) module"] +pub struct MAXCNT_SPEC; +impl crate::RegisterSpec for MAXCNT_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [maxcnt::R](R) reader structure"] +impl crate::Readable for MAXCNT_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [maxcnt::W](W) writer structure"] +impl crate::Writable for MAXCNT_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets MAXCNT to value 0"] +impl crate::Resettable for MAXCNT_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/spis0/rxd/ptr.rs b/down-the-stack/dk_pac/src/spis0/rxd/ptr.rs new file mode 100644 index 0000000..296dff7 --- /dev/null +++ b/down-the-stack/dk_pac/src/spis0/rxd/ptr.rs @@ -0,0 +1,80 @@ +#[doc = "Register `PTR` 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 `PTR` 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 `PTR` reader - RXD data pointer"] +pub type PTR_R = crate::FieldReader; +#[doc = "Field `PTR` writer - RXD data pointer"] +pub type PTR_W<'a, const O: u8> = crate::FieldWriter<'a, u32, PTR_SPEC, u32, u32, 32, O>; +impl R { + #[doc = "Bits 0:31 - RXD data pointer"] + #[inline(always)] + pub fn ptr(&self) -> PTR_R { + PTR_R::new(self.bits) + } +} +impl W { + #[doc = "Bits 0:31 - RXD data pointer"] + #[inline(always)] + #[must_use] + pub fn ptr(&mut self) -> PTR_W<0> { + PTR_W::new(self) + } + #[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 = "RXD data pointer\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 [ptr](index.html) module"] +pub struct PTR_SPEC; +impl crate::RegisterSpec for PTR_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [ptr::R](R) reader structure"] +impl crate::Readable for PTR_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [ptr::W](W) writer structure"] +impl crate::Writable for PTR_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets PTR to value 0"] +impl crate::Resettable for PTR_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/spis0/semstat.rs b/down-the-stack/dk_pac/src/spis0/semstat.rs new file mode 100644 index 0000000..83debf7 --- /dev/null +++ b/down-the-stack/dk_pac/src/spis0/semstat.rs @@ -0,0 +1,89 @@ +#[doc = "Register `SEMSTAT` 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 = "Field `SEMSTAT` reader - Semaphore status"] +pub type SEMSTAT_R = crate::FieldReader; +#[doc = "Semaphore status\n\nValue on reset: 1"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +#[repr(u8)] +pub enum SEMSTAT_A { + #[doc = "0: Semaphore is free"] + FREE = 0, + #[doc = "1: Semaphore is assigned to CPU"] + CPU = 1, + #[doc = "2: Semaphore is assigned to SPI slave"] + SPIS = 2, + #[doc = "3: Semaphore is assigned to SPI but a handover to the CPU is pending"] + CPUPENDING = 3, +} +impl From for u8 { + #[inline(always)] + fn from(variant: SEMSTAT_A) -> Self { + variant as _ + } +} +impl SEMSTAT_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> SEMSTAT_A { + match self.bits { + 0 => SEMSTAT_A::FREE, + 1 => SEMSTAT_A::CPU, + 2 => SEMSTAT_A::SPIS, + 3 => SEMSTAT_A::CPUPENDING, + _ => unreachable!(), + } + } + #[doc = "Checks if the value of the field is `FREE`"] + #[inline(always)] + pub fn is_free(&self) -> bool { + *self == SEMSTAT_A::FREE + } + #[doc = "Checks if the value of the field is `CPU`"] + #[inline(always)] + pub fn is_cpu(&self) -> bool { + *self == SEMSTAT_A::CPU + } + #[doc = "Checks if the value of the field is `SPIS`"] + #[inline(always)] + pub fn is_spis(&self) -> bool { + *self == SEMSTAT_A::SPIS + } + #[doc = "Checks if the value of the field is `CPUPENDING`"] + #[inline(always)] + pub fn is_cpupending(&self) -> bool { + *self == SEMSTAT_A::CPUPENDING + } +} +impl R { + #[doc = "Bits 0:1 - Semaphore status"] + #[inline(always)] + pub fn semstat(&self) -> SEMSTAT_R { + SEMSTAT_R::new((self.bits & 3) as u8) + } +} +#[doc = "Semaphore status register\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 [semstat](index.html) module"] +pub struct SEMSTAT_SPEC; +impl crate::RegisterSpec for SEMSTAT_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [semstat::R](R) reader structure"] +impl crate::Readable for SEMSTAT_SPEC { + type Reader = R; +} +#[doc = "`reset()` method sets SEMSTAT to value 0x01"] +impl crate::Resettable for SEMSTAT_SPEC { + const RESET_VALUE: Self::Ux = 0x01; +} diff --git a/down-the-stack/dk_pac/src/spis0/shorts.rs b/down-the-stack/dk_pac/src/spis0/shorts.rs new file mode 100644 index 0000000..ddb1580 --- /dev/null +++ b/down-the-stack/dk_pac/src/spis0/shorts.rs @@ -0,0 +1,126 @@ +#[doc = "Register `SHORTS` 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 `SHORTS` 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 `END_ACQUIRE` reader - Shortcut between event END and task ACQUIRE"] +pub type END_ACQUIRE_R = crate::BitReader; +#[doc = "Shortcut between event END and task ACQUIRE\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum END_ACQUIRE_A { + #[doc = "0: Disable shortcut"] + DISABLED = 0, + #[doc = "1: Enable shortcut"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: END_ACQUIRE_A) -> Self { + variant as u8 != 0 + } +} +impl END_ACQUIRE_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> END_ACQUIRE_A { + match self.bits { + false => END_ACQUIRE_A::DISABLED, + true => END_ACQUIRE_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == END_ACQUIRE_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == END_ACQUIRE_A::ENABLED + } +} +#[doc = "Field `END_ACQUIRE` writer - Shortcut between event END and task ACQUIRE"] +pub type END_ACQUIRE_W<'a, const O: u8> = crate::BitWriter<'a, u32, SHORTS_SPEC, END_ACQUIRE_A, O>; +impl<'a, const O: u8> END_ACQUIRE_W<'a, O> { + #[doc = "Disable shortcut"] + #[inline(always)] + pub fn disabled(self) -> &'a mut W { + self.variant(END_ACQUIRE_A::DISABLED) + } + #[doc = "Enable shortcut"] + #[inline(always)] + pub fn enabled(self) -> &'a mut W { + self.variant(END_ACQUIRE_A::ENABLED) + } +} +impl R { + #[doc = "Bit 2 - Shortcut between event END and task ACQUIRE"] + #[inline(always)] + pub fn end_acquire(&self) -> END_ACQUIRE_R { + END_ACQUIRE_R::new(((self.bits >> 2) & 1) != 0) + } +} +impl W { + #[doc = "Bit 2 - Shortcut between event END and task ACQUIRE"] + #[inline(always)] + #[must_use] + pub fn end_acquire(&mut self) -> END_ACQUIRE_W<2> { + END_ACQUIRE_W::new(self) + } + #[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 = "Shortcuts between local events and tasks\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 [shorts](index.html) module"] +pub struct SHORTS_SPEC; +impl crate::RegisterSpec for SHORTS_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [shorts::R](R) reader structure"] +impl crate::Readable for SHORTS_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [shorts::W](W) writer structure"] +impl crate::Writable for SHORTS_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets SHORTS to value 0"] +impl crate::Resettable for SHORTS_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/spis0/status.rs b/down-the-stack/dk_pac/src/spis0/status.rs new file mode 100644 index 0000000..a63036f --- /dev/null +++ b/down-the-stack/dk_pac/src/spis0/status.rs @@ -0,0 +1,201 @@ +#[doc = "Register `STATUS` 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 `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 `OVERREAD` reader - TX buffer over-read detected, and prevented"] +pub type OVERREAD_R = crate::BitReader; +#[doc = "TX buffer over-read detected, and prevented\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum OVERREAD_A { + #[doc = "0: Read: error not present"] + NOT_PRESENT = 0, + #[doc = "1: Read: error present"] + PRESENT = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: OVERREAD_A) -> Self { + variant as u8 != 0 + } +} +impl OVERREAD_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> OVERREAD_A { + match self.bits { + false => OVERREAD_A::NOT_PRESENT, + true => OVERREAD_A::PRESENT, + } + } + #[doc = "Checks if the value of the field is `NOT_PRESENT`"] + #[inline(always)] + pub fn is_not_present(&self) -> bool { + *self == OVERREAD_A::NOT_PRESENT + } + #[doc = "Checks if the value of the field is `PRESENT`"] + #[inline(always)] + pub fn is_present(&self) -> bool { + *self == OVERREAD_A::PRESENT + } +} +#[doc = "TX buffer over-read detected, and prevented\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum OVERREAD_AW { + #[doc = "1: Write: clear error on writing '1'"] + CLEAR = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: OVERREAD_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `OVERREAD` writer - TX buffer over-read detected, and prevented"] +pub type OVERREAD_W<'a, const O: u8> = crate::BitWriter<'a, u32, STATUS_SPEC, OVERREAD_AW, O>; +impl<'a, const O: u8> OVERREAD_W<'a, O> { + #[doc = "Write: clear error on writing '1'"] + #[inline(always)] + pub fn clear(self) -> &'a mut W { + self.variant(OVERREAD_AW::CLEAR) + } +} +#[doc = "Field `OVERFLOW` reader - RX buffer overflow detected, and prevented"] +pub type OVERFLOW_R = crate::BitReader; +#[doc = "RX buffer overflow detected, and prevented\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum OVERFLOW_A { + #[doc = "0: Read: error not present"] + NOT_PRESENT = 0, + #[doc = "1: Read: error present"] + PRESENT = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: OVERFLOW_A) -> Self { + variant as u8 != 0 + } +} +impl OVERFLOW_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> OVERFLOW_A { + match self.bits { + false => OVERFLOW_A::NOT_PRESENT, + true => OVERFLOW_A::PRESENT, + } + } + #[doc = "Checks if the value of the field is `NOT_PRESENT`"] + #[inline(always)] + pub fn is_not_present(&self) -> bool { + *self == OVERFLOW_A::NOT_PRESENT + } + #[doc = "Checks if the value of the field is `PRESENT`"] + #[inline(always)] + pub fn is_present(&self) -> bool { + *self == OVERFLOW_A::PRESENT + } +} +#[doc = "RX buffer overflow detected, and prevented\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum OVERFLOW_AW { + #[doc = "1: Write: clear error on writing '1'"] + CLEAR = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: OVERFLOW_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `OVERFLOW` writer - RX buffer overflow detected, and prevented"] +pub type OVERFLOW_W<'a, const O: u8> = crate::BitWriter<'a, u32, STATUS_SPEC, OVERFLOW_AW, O>; +impl<'a, const O: u8> OVERFLOW_W<'a, O> { + #[doc = "Write: clear error on writing '1'"] + #[inline(always)] + pub fn clear(self) -> &'a mut W { + self.variant(OVERFLOW_AW::CLEAR) + } +} +impl R { + #[doc = "Bit 0 - TX buffer over-read detected, and prevented"] + #[inline(always)] + pub fn overread(&self) -> OVERREAD_R { + OVERREAD_R::new((self.bits & 1) != 0) + } + #[doc = "Bit 1 - RX buffer overflow detected, and prevented"] + #[inline(always)] + pub fn overflow(&self) -> OVERFLOW_R { + OVERFLOW_R::new(((self.bits >> 1) & 1) != 0) + } +} +impl W { + #[doc = "Bit 0 - TX buffer over-read detected, and prevented"] + #[inline(always)] + #[must_use] + pub fn overread(&mut self) -> OVERREAD_W<0> { + OVERREAD_W::new(self) + } + #[doc = "Bit 1 - RX buffer overflow detected, and prevented"] + #[inline(always)] + #[must_use] + pub fn overflow(&mut self) -> OVERFLOW_W<1> { + OVERFLOW_W::new(self) + } + #[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 = "Status from last transaction\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 [status](index.html) module"] +pub struct STATUS_SPEC; +impl crate::RegisterSpec for STATUS_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [status::R](R) reader structure"] +impl crate::Readable for STATUS_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [status::W](W) writer structure"] +impl crate::Writable for 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 STATUS to value 0"] +impl crate::Resettable for STATUS_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/spis0/tasks_acquire.rs b/down-the-stack/dk_pac/src/spis0/tasks_acquire.rs new file mode 100644 index 0000000..62e0268 --- /dev/null +++ b/down-the-stack/dk_pac/src/spis0/tasks_acquire.rs @@ -0,0 +1,72 @@ +#[doc = "Register `TASKS_ACQUIRE` 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 = "Acquire SPI semaphore\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum TASKS_ACQUIRE_AW { + #[doc = "1: Trigger task"] + TRIGGER = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: TASKS_ACQUIRE_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `TASKS_ACQUIRE` writer - Acquire SPI semaphore"] +pub type TASKS_ACQUIRE_W<'a, const O: u8> = + crate::BitWriter<'a, u32, TASKS_ACQUIRE_SPEC, TASKS_ACQUIRE_AW, O>; +impl<'a, const O: u8> TASKS_ACQUIRE_W<'a, O> { + #[doc = "Trigger task"] + #[inline(always)] + pub fn trigger(self) -> &'a mut W { + self.variant(TASKS_ACQUIRE_AW::TRIGGER) + } +} +impl W { + #[doc = "Bit 0 - Acquire SPI semaphore"] + #[inline(always)] + #[must_use] + pub fn tasks_acquire(&mut self) -> TASKS_ACQUIRE_W<0> { + TASKS_ACQUIRE_W::new(self) + } + #[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 = "Acquire SPI semaphore\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 [tasks_acquire](index.html) module"] +pub struct TASKS_ACQUIRE_SPEC; +impl crate::RegisterSpec for TASKS_ACQUIRE_SPEC { + type Ux = u32; +} +#[doc = "`write(|w| ..)` method takes [tasks_acquire::W](W) writer structure"] +impl crate::Writable for TASKS_ACQUIRE_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets TASKS_ACQUIRE to value 0"] +impl crate::Resettable for TASKS_ACQUIRE_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/spis0/tasks_release.rs b/down-the-stack/dk_pac/src/spis0/tasks_release.rs new file mode 100644 index 0000000..e700f5e --- /dev/null +++ b/down-the-stack/dk_pac/src/spis0/tasks_release.rs @@ -0,0 +1,72 @@ +#[doc = "Register `TASKS_RELEASE` 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 = "Release SPI semaphore, enabling the SPI slave to acquire it\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum TASKS_RELEASE_AW { + #[doc = "1: Trigger task"] + TRIGGER = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: TASKS_RELEASE_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `TASKS_RELEASE` writer - Release SPI semaphore, enabling the SPI slave to acquire it"] +pub type TASKS_RELEASE_W<'a, const O: u8> = + crate::BitWriter<'a, u32, TASKS_RELEASE_SPEC, TASKS_RELEASE_AW, O>; +impl<'a, const O: u8> TASKS_RELEASE_W<'a, O> { + #[doc = "Trigger task"] + #[inline(always)] + pub fn trigger(self) -> &'a mut W { + self.variant(TASKS_RELEASE_AW::TRIGGER) + } +} +impl W { + #[doc = "Bit 0 - Release SPI semaphore, enabling the SPI slave to acquire it"] + #[inline(always)] + #[must_use] + pub fn tasks_release(&mut self) -> TASKS_RELEASE_W<0> { + TASKS_RELEASE_W::new(self) + } + #[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 = "Release SPI semaphore, enabling the SPI slave to acquire it\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 [tasks_release](index.html) module"] +pub struct TASKS_RELEASE_SPEC; +impl crate::RegisterSpec for TASKS_RELEASE_SPEC { + type Ux = u32; +} +#[doc = "`write(|w| ..)` method takes [tasks_release::W](W) writer structure"] +impl crate::Writable for TASKS_RELEASE_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets TASKS_RELEASE to value 0"] +impl crate::Resettable for TASKS_RELEASE_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/spis0/txd.rs b/down-the-stack/dk_pac/src/spis0/txd.rs new file mode 100644 index 0000000..a3ec194 --- /dev/null +++ b/down-the-stack/dk_pac/src/spis0/txd.rs @@ -0,0 +1,22 @@ +#[doc = r"Register block"] +#[repr(C)] +pub struct TXD { + #[doc = "0x00 - TXD data pointer"] + pub ptr: PTR, + #[doc = "0x04 - Maximum number of bytes in transmit buffer"] + pub maxcnt: MAXCNT, + #[doc = "0x08 - Number of bytes transmitted in last granted transaction"] + pub amount: AMOUNT, +} +#[doc = "PTR (rw) register accessor: an alias for `Reg`"] +pub type PTR = crate::Reg; +#[doc = "TXD data pointer"] +pub mod ptr; +#[doc = "MAXCNT (rw) register accessor: an alias for `Reg`"] +pub type MAXCNT = crate::Reg; +#[doc = "Maximum number of bytes in transmit buffer"] +pub mod maxcnt; +#[doc = "AMOUNT (r) register accessor: an alias for `Reg`"] +pub type AMOUNT = crate::Reg; +#[doc = "Number of bytes transmitted in last granted transaction"] +pub mod amount; diff --git a/down-the-stack/dk_pac/src/spis0/txd/amount.rs b/down-the-stack/dk_pac/src/spis0/txd/amount.rs new file mode 100644 index 0000000..d931113 --- /dev/null +++ b/down-the-stack/dk_pac/src/spis0/txd/amount.rs @@ -0,0 +1,37 @@ +#[doc = "Register `AMOUNT` 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 = "Field `AMOUNT` reader - Number of bytes transmitted in last granted transaction"] +pub type AMOUNT_R = crate::FieldReader; +impl R { + #[doc = "Bits 0:7 - Number of bytes transmitted in last granted transaction"] + #[inline(always)] + pub fn amount(&self) -> AMOUNT_R { + AMOUNT_R::new((self.bits & 0xff) as u8) + } +} +#[doc = "Number of bytes transmitted in last granted transaction\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 [amount](index.html) module"] +pub struct AMOUNT_SPEC; +impl crate::RegisterSpec for AMOUNT_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [amount::R](R) reader structure"] +impl crate::Readable for AMOUNT_SPEC { + type Reader = R; +} +#[doc = "`reset()` method sets AMOUNT to value 0"] +impl crate::Resettable for AMOUNT_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/spis0/txd/maxcnt.rs b/down-the-stack/dk_pac/src/spis0/txd/maxcnt.rs new file mode 100644 index 0000000..084733c --- /dev/null +++ b/down-the-stack/dk_pac/src/spis0/txd/maxcnt.rs @@ -0,0 +1,80 @@ +#[doc = "Register `MAXCNT` 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 `MAXCNT` 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 `MAXCNT` reader - Maximum number of bytes in transmit buffer"] +pub type MAXCNT_R = crate::FieldReader; +#[doc = "Field `MAXCNT` writer - Maximum number of bytes in transmit buffer"] +pub type MAXCNT_W<'a, const O: u8> = crate::FieldWriter<'a, u32, MAXCNT_SPEC, u8, u8, 8, O>; +impl R { + #[doc = "Bits 0:7 - Maximum number of bytes in transmit buffer"] + #[inline(always)] + pub fn maxcnt(&self) -> MAXCNT_R { + MAXCNT_R::new((self.bits & 0xff) as u8) + } +} +impl W { + #[doc = "Bits 0:7 - Maximum number of bytes in transmit buffer"] + #[inline(always)] + #[must_use] + pub fn maxcnt(&mut self) -> MAXCNT_W<0> { + MAXCNT_W::new(self) + } + #[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 = "Maximum number of bytes in transmit buffer\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 [maxcnt](index.html) module"] +pub struct MAXCNT_SPEC; +impl crate::RegisterSpec for MAXCNT_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [maxcnt::R](R) reader structure"] +impl crate::Readable for MAXCNT_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [maxcnt::W](W) writer structure"] +impl crate::Writable for MAXCNT_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets MAXCNT to value 0"] +impl crate::Resettable for MAXCNT_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/spis0/txd/ptr.rs b/down-the-stack/dk_pac/src/spis0/txd/ptr.rs new file mode 100644 index 0000000..1d9af4a --- /dev/null +++ b/down-the-stack/dk_pac/src/spis0/txd/ptr.rs @@ -0,0 +1,80 @@ +#[doc = "Register `PTR` 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 `PTR` 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 `PTR` reader - TXD data pointer"] +pub type PTR_R = crate::FieldReader; +#[doc = "Field `PTR` writer - TXD data pointer"] +pub type PTR_W<'a, const O: u8> = crate::FieldWriter<'a, u32, PTR_SPEC, u32, u32, 32, O>; +impl R { + #[doc = "Bits 0:31 - TXD data pointer"] + #[inline(always)] + pub fn ptr(&self) -> PTR_R { + PTR_R::new(self.bits) + } +} +impl W { + #[doc = "Bits 0:31 - TXD data pointer"] + #[inline(always)] + #[must_use] + pub fn ptr(&mut self) -> PTR_W<0> { + PTR_W::new(self) + } + #[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 = "TXD data pointer\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 [ptr](index.html) module"] +pub struct PTR_SPEC; +impl crate::RegisterSpec for PTR_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [ptr::R](R) reader structure"] +impl crate::Readable for PTR_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [ptr::W](W) writer structure"] +impl crate::Writable for PTR_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets PTR to value 0"] +impl crate::Resettable for PTR_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/swi0.rs b/down-the-stack/dk_pac/src/swi0.rs new file mode 100644 index 0000000..ad42ba6 --- /dev/null +++ b/down-the-stack/dk_pac/src/swi0.rs @@ -0,0 +1,10 @@ +#[doc = r"Register block"] +#[repr(C)] +pub struct RegisterBlock { + #[doc = "0x00 - Unused."] + pub unused: UNUSED, +} +#[doc = "UNUSED (r) register accessor: an alias for `Reg`"] +pub type UNUSED = crate::Reg; +#[doc = "Unused."] +pub mod unused; diff --git a/down-the-stack/dk_pac/src/swi0/unused.rs b/down-the-stack/dk_pac/src/swi0/unused.rs new file mode 100644 index 0000000..4f087aa --- /dev/null +++ b/down-the-stack/dk_pac/src/swi0/unused.rs @@ -0,0 +1,28 @@ +#[doc = "Register `UNUSED` 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 = "Unused.\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 [unused](index.html) module"] +pub struct UNUSED_SPEC; +impl crate::RegisterSpec for UNUSED_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [unused::R](R) reader structure"] +impl crate::Readable for UNUSED_SPEC { + type Reader = R; +} +#[doc = "`reset()` method sets UNUSED to value 0"] +impl crate::Resettable for UNUSED_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/temp.rs b/down-the-stack/dk_pac/src/temp.rs new file mode 100644 index 0000000..eaca138 --- /dev/null +++ b/down-the-stack/dk_pac/src/temp.rs @@ -0,0 +1,148 @@ +#[doc = r"Register block"] +#[repr(C)] +pub struct RegisterBlock { + #[doc = "0x00 - Start temperature measurement"] + pub tasks_start: TASKS_START, + #[doc = "0x04 - Stop temperature measurement"] + pub tasks_stop: TASKS_STOP, + _reserved2: [u8; 0xf8], + #[doc = "0x100 - Temperature measurement complete, data ready"] + pub events_datardy: EVENTS_DATARDY, + _reserved3: [u8; 0x0200], + #[doc = "0x304 - Enable interrupt"] + pub intenset: INTENSET, + #[doc = "0x308 - Disable interrupt"] + pub intenclr: INTENCLR, + _reserved5: [u8; 0x01fc], + #[doc = "0x508 - Temperature in degC (0.25deg steps)"] + pub temp: TEMP, + _reserved6: [u8; 0x14], + #[doc = "0x520 - Slope of 1st piece wise linear function"] + pub a0: A0, + #[doc = "0x524 - Slope of 2nd piece wise linear function"] + pub a1: A1, + #[doc = "0x528 - Slope of 3rd piece wise linear function"] + pub a2: A2, + #[doc = "0x52c - Slope of 4th piece wise linear function"] + pub a3: A3, + #[doc = "0x530 - Slope of 5th piece wise linear function"] + pub a4: A4, + #[doc = "0x534 - Slope of 6th piece wise linear function"] + pub a5: A5, + _reserved12: [u8; 0x08], + #[doc = "0x540 - y-intercept of 1st piece wise linear function"] + pub b0: B0, + #[doc = "0x544 - y-intercept of 2nd piece wise linear function"] + pub b1: B1, + #[doc = "0x548 - y-intercept of 3rd piece wise linear function"] + pub b2: B2, + #[doc = "0x54c - y-intercept of 4th piece wise linear function"] + pub b3: B3, + #[doc = "0x550 - y-intercept of 5th piece wise linear function"] + pub b4: B4, + #[doc = "0x554 - y-intercept of 6th piece wise linear function"] + pub b5: B5, + _reserved18: [u8; 0x08], + #[doc = "0x560 - End point of 1st piece wise linear function"] + pub t0: T0, + #[doc = "0x564 - End point of 2nd piece wise linear function"] + pub t1: T1, + #[doc = "0x568 - End point of 3rd piece wise linear function"] + pub t2: T2, + #[doc = "0x56c - End point of 4th piece wise linear function"] + pub t3: T3, + #[doc = "0x570 - End point of 5th piece wise linear function"] + pub t4: T4, +} +#[doc = "TASKS_START (w) register accessor: an alias for `Reg`"] +pub type TASKS_START = crate::Reg; +#[doc = "Start temperature measurement"] +pub mod tasks_start; +#[doc = "TASKS_STOP (w) register accessor: an alias for `Reg`"] +pub type TASKS_STOP = crate::Reg; +#[doc = "Stop temperature measurement"] +pub mod tasks_stop; +#[doc = "EVENTS_DATARDY (rw) register accessor: an alias for `Reg`"] +pub type EVENTS_DATARDY = crate::Reg; +#[doc = "Temperature measurement complete, data ready"] +pub mod events_datardy; +#[doc = "INTENSET (rw) register accessor: an alias for `Reg`"] +pub type INTENSET = crate::Reg; +#[doc = "Enable interrupt"] +pub mod intenset; +#[doc = "INTENCLR (rw) register accessor: an alias for `Reg`"] +pub type INTENCLR = crate::Reg; +#[doc = "Disable interrupt"] +pub mod intenclr; +#[doc = "TEMP (r) register accessor: an alias for `Reg`"] +pub type TEMP = crate::Reg; +#[doc = "Temperature in degC (0.25deg steps)"] +pub mod temp; +#[doc = "A0 (rw) register accessor: an alias for `Reg`"] +pub type A0 = crate::Reg; +#[doc = "Slope of 1st piece wise linear function"] +pub mod a0; +#[doc = "A1 (rw) register accessor: an alias for `Reg`"] +pub type A1 = crate::Reg; +#[doc = "Slope of 2nd piece wise linear function"] +pub mod a1; +#[doc = "A2 (rw) register accessor: an alias for `Reg`"] +pub type A2 = crate::Reg; +#[doc = "Slope of 3rd piece wise linear function"] +pub mod a2; +#[doc = "A3 (rw) register accessor: an alias for `Reg`"] +pub type A3 = crate::Reg; +#[doc = "Slope of 4th piece wise linear function"] +pub mod a3; +#[doc = "A4 (rw) register accessor: an alias for `Reg`"] +pub type A4 = crate::Reg; +#[doc = "Slope of 5th piece wise linear function"] +pub mod a4; +#[doc = "A5 (rw) register accessor: an alias for `Reg`"] +pub type A5 = crate::Reg; +#[doc = "Slope of 6th piece wise linear function"] +pub mod a5; +#[doc = "B0 (rw) register accessor: an alias for `Reg`"] +pub type B0 = crate::Reg; +#[doc = "y-intercept of 1st piece wise linear function"] +pub mod b0; +#[doc = "B1 (rw) register accessor: an alias for `Reg`"] +pub type B1 = crate::Reg; +#[doc = "y-intercept of 2nd piece wise linear function"] +pub mod b1; +#[doc = "B2 (rw) register accessor: an alias for `Reg`"] +pub type B2 = crate::Reg; +#[doc = "y-intercept of 3rd piece wise linear function"] +pub mod b2; +#[doc = "B3 (rw) register accessor: an alias for `Reg`"] +pub type B3 = crate::Reg; +#[doc = "y-intercept of 4th piece wise linear function"] +pub mod b3; +#[doc = "B4 (rw) register accessor: an alias for `Reg`"] +pub type B4 = crate::Reg; +#[doc = "y-intercept of 5th piece wise linear function"] +pub mod b4; +#[doc = "B5 (rw) register accessor: an alias for `Reg`"] +pub type B5 = crate::Reg; +#[doc = "y-intercept of 6th piece wise linear function"] +pub mod b5; +#[doc = "T0 (rw) register accessor: an alias for `Reg`"] +pub type T0 = crate::Reg; +#[doc = "End point of 1st piece wise linear function"] +pub mod t0; +#[doc = "T1 (rw) register accessor: an alias for `Reg`"] +pub type T1 = crate::Reg; +#[doc = "End point of 2nd piece wise linear function"] +pub mod t1; +#[doc = "T2 (rw) register accessor: an alias for `Reg`"] +pub type T2 = crate::Reg; +#[doc = "End point of 3rd piece wise linear function"] +pub mod t2; +#[doc = "T3 (rw) register accessor: an alias for `Reg`"] +pub type T3 = crate::Reg; +#[doc = "End point of 4th piece wise linear function"] +pub mod t3; +#[doc = "T4 (rw) register accessor: an alias for `Reg`"] +pub type T4 = crate::Reg; +#[doc = "End point of 5th piece wise linear function"] +pub mod t4; diff --git a/down-the-stack/dk_pac/src/temp/a0.rs b/down-the-stack/dk_pac/src/temp/a0.rs new file mode 100644 index 0000000..90efb41 --- /dev/null +++ b/down-the-stack/dk_pac/src/temp/a0.rs @@ -0,0 +1,80 @@ +#[doc = "Register `A0` 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 `A0` 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 `A0` reader - Slope of 1st piece wise linear function"] +pub type A0_R = crate::FieldReader; +#[doc = "Field `A0` writer - Slope of 1st piece wise linear function"] +pub type A0_W<'a, const O: u8> = crate::FieldWriter<'a, u32, A0_SPEC, u16, u16, 12, O>; +impl R { + #[doc = "Bits 0:11 - Slope of 1st piece wise linear function"] + #[inline(always)] + pub fn a0(&self) -> A0_R { + A0_R::new((self.bits & 0x0fff) as u16) + } +} +impl W { + #[doc = "Bits 0:11 - Slope of 1st piece wise linear function"] + #[inline(always)] + #[must_use] + pub fn a0(&mut self) -> A0_W<0> { + A0_W::new(self) + } + #[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 = "Slope of 1st piece wise linear function\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 [a0](index.html) module"] +pub struct A0_SPEC; +impl crate::RegisterSpec for A0_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [a0::R](R) reader structure"] +impl crate::Readable for A0_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [a0::W](W) writer structure"] +impl crate::Writable for A0_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets A0 to value 0x0320"] +impl crate::Resettable for A0_SPEC { + const RESET_VALUE: Self::Ux = 0x0320; +} diff --git a/down-the-stack/dk_pac/src/temp/a1.rs b/down-the-stack/dk_pac/src/temp/a1.rs new file mode 100644 index 0000000..298c3b1 --- /dev/null +++ b/down-the-stack/dk_pac/src/temp/a1.rs @@ -0,0 +1,80 @@ +#[doc = "Register `A1` 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 `A1` 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 `A1` reader - Slope of 2nd piece wise linear function"] +pub type A1_R = crate::FieldReader; +#[doc = "Field `A1` writer - Slope of 2nd piece wise linear function"] +pub type A1_W<'a, const O: u8> = crate::FieldWriter<'a, u32, A1_SPEC, u16, u16, 12, O>; +impl R { + #[doc = "Bits 0:11 - Slope of 2nd piece wise linear function"] + #[inline(always)] + pub fn a1(&self) -> A1_R { + A1_R::new((self.bits & 0x0fff) as u16) + } +} +impl W { + #[doc = "Bits 0:11 - Slope of 2nd piece wise linear function"] + #[inline(always)] + #[must_use] + pub fn a1(&mut self) -> A1_W<0> { + A1_W::new(self) + } + #[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 = "Slope of 2nd piece wise linear function\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 [a1](index.html) module"] +pub struct A1_SPEC; +impl crate::RegisterSpec for A1_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [a1::R](R) reader structure"] +impl crate::Readable for A1_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [a1::W](W) writer structure"] +impl crate::Writable for A1_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets A1 to value 0x0343"] +impl crate::Resettable for A1_SPEC { + const RESET_VALUE: Self::Ux = 0x0343; +} diff --git a/down-the-stack/dk_pac/src/temp/a2.rs b/down-the-stack/dk_pac/src/temp/a2.rs new file mode 100644 index 0000000..a495f9b --- /dev/null +++ b/down-the-stack/dk_pac/src/temp/a2.rs @@ -0,0 +1,80 @@ +#[doc = "Register `A2` 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 `A2` 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 `A2` reader - Slope of 3rd piece wise linear function"] +pub type A2_R = crate::FieldReader; +#[doc = "Field `A2` writer - Slope of 3rd piece wise linear function"] +pub type A2_W<'a, const O: u8> = crate::FieldWriter<'a, u32, A2_SPEC, u16, u16, 12, O>; +impl R { + #[doc = "Bits 0:11 - Slope of 3rd piece wise linear function"] + #[inline(always)] + pub fn a2(&self) -> A2_R { + A2_R::new((self.bits & 0x0fff) as u16) + } +} +impl W { + #[doc = "Bits 0:11 - Slope of 3rd piece wise linear function"] + #[inline(always)] + #[must_use] + pub fn a2(&mut self) -> A2_W<0> { + A2_W::new(self) + } + #[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 = "Slope of 3rd piece wise linear function\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 [a2](index.html) module"] +pub struct A2_SPEC; +impl crate::RegisterSpec for A2_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [a2::R](R) reader structure"] +impl crate::Readable for A2_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [a2::W](W) writer structure"] +impl crate::Writable for A2_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets A2 to value 0x035d"] +impl crate::Resettable for A2_SPEC { + const RESET_VALUE: Self::Ux = 0x035d; +} diff --git a/down-the-stack/dk_pac/src/temp/a3.rs b/down-the-stack/dk_pac/src/temp/a3.rs new file mode 100644 index 0000000..b879c53 --- /dev/null +++ b/down-the-stack/dk_pac/src/temp/a3.rs @@ -0,0 +1,80 @@ +#[doc = "Register `A3` 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 `A3` 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 `A3` reader - Slope of 4th piece wise linear function"] +pub type A3_R = crate::FieldReader; +#[doc = "Field `A3` writer - Slope of 4th piece wise linear function"] +pub type A3_W<'a, const O: u8> = crate::FieldWriter<'a, u32, A3_SPEC, u16, u16, 12, O>; +impl R { + #[doc = "Bits 0:11 - Slope of 4th piece wise linear function"] + #[inline(always)] + pub fn a3(&self) -> A3_R { + A3_R::new((self.bits & 0x0fff) as u16) + } +} +impl W { + #[doc = "Bits 0:11 - Slope of 4th piece wise linear function"] + #[inline(always)] + #[must_use] + pub fn a3(&mut self) -> A3_W<0> { + A3_W::new(self) + } + #[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 = "Slope of 4th piece wise linear function\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 [a3](index.html) module"] +pub struct A3_SPEC; +impl crate::RegisterSpec for A3_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [a3::R](R) reader structure"] +impl crate::Readable for A3_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [a3::W](W) writer structure"] +impl crate::Writable for A3_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets A3 to value 0x0400"] +impl crate::Resettable for A3_SPEC { + const RESET_VALUE: Self::Ux = 0x0400; +} diff --git a/down-the-stack/dk_pac/src/temp/a4.rs b/down-the-stack/dk_pac/src/temp/a4.rs new file mode 100644 index 0000000..7fee010 --- /dev/null +++ b/down-the-stack/dk_pac/src/temp/a4.rs @@ -0,0 +1,80 @@ +#[doc = "Register `A4` 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 `A4` 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 `A4` reader - Slope of 5th piece wise linear function"] +pub type A4_R = crate::FieldReader; +#[doc = "Field `A4` writer - Slope of 5th piece wise linear function"] +pub type A4_W<'a, const O: u8> = crate::FieldWriter<'a, u32, A4_SPEC, u16, u16, 12, O>; +impl R { + #[doc = "Bits 0:11 - Slope of 5th piece wise linear function"] + #[inline(always)] + pub fn a4(&self) -> A4_R { + A4_R::new((self.bits & 0x0fff) as u16) + } +} +impl W { + #[doc = "Bits 0:11 - Slope of 5th piece wise linear function"] + #[inline(always)] + #[must_use] + pub fn a4(&mut self) -> A4_W<0> { + A4_W::new(self) + } + #[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 = "Slope of 5th piece wise linear function\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 [a4](index.html) module"] +pub struct A4_SPEC; +impl crate::RegisterSpec for A4_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [a4::R](R) reader structure"] +impl crate::Readable for A4_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [a4::W](W) writer structure"] +impl crate::Writable for A4_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets A4 to value 0x047f"] +impl crate::Resettable for A4_SPEC { + const RESET_VALUE: Self::Ux = 0x047f; +} diff --git a/down-the-stack/dk_pac/src/temp/a5.rs b/down-the-stack/dk_pac/src/temp/a5.rs new file mode 100644 index 0000000..96c32eb --- /dev/null +++ b/down-the-stack/dk_pac/src/temp/a5.rs @@ -0,0 +1,80 @@ +#[doc = "Register `A5` 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 `A5` 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 `A5` reader - Slope of 6th piece wise linear function"] +pub type A5_R = crate::FieldReader; +#[doc = "Field `A5` writer - Slope of 6th piece wise linear function"] +pub type A5_W<'a, const O: u8> = crate::FieldWriter<'a, u32, A5_SPEC, u16, u16, 12, O>; +impl R { + #[doc = "Bits 0:11 - Slope of 6th piece wise linear function"] + #[inline(always)] + pub fn a5(&self) -> A5_R { + A5_R::new((self.bits & 0x0fff) as u16) + } +} +impl W { + #[doc = "Bits 0:11 - Slope of 6th piece wise linear function"] + #[inline(always)] + #[must_use] + pub fn a5(&mut self) -> A5_W<0> { + A5_W::new(self) + } + #[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 = "Slope of 6th piece wise linear function\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 [a5](index.html) module"] +pub struct A5_SPEC; +impl crate::RegisterSpec for A5_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [a5::R](R) reader structure"] +impl crate::Readable for A5_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [a5::W](W) writer structure"] +impl crate::Writable for A5_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets A5 to value 0x037b"] +impl crate::Resettable for A5_SPEC { + const RESET_VALUE: Self::Ux = 0x037b; +} diff --git a/down-the-stack/dk_pac/src/temp/b0.rs b/down-the-stack/dk_pac/src/temp/b0.rs new file mode 100644 index 0000000..bfe0db2 --- /dev/null +++ b/down-the-stack/dk_pac/src/temp/b0.rs @@ -0,0 +1,80 @@ +#[doc = "Register `B0` 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 `B0` 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 `B0` reader - y-intercept of 1st piece wise linear function"] +pub type B0_R = crate::FieldReader; +#[doc = "Field `B0` writer - y-intercept of 1st piece wise linear function"] +pub type B0_W<'a, const O: u8> = crate::FieldWriter<'a, u32, B0_SPEC, u16, u16, 14, O>; +impl R { + #[doc = "Bits 0:13 - y-intercept of 1st piece wise linear function"] + #[inline(always)] + pub fn b0(&self) -> B0_R { + B0_R::new((self.bits & 0x3fff) as u16) + } +} +impl W { + #[doc = "Bits 0:13 - y-intercept of 1st piece wise linear function"] + #[inline(always)] + #[must_use] + pub fn b0(&mut self) -> B0_W<0> { + B0_W::new(self) + } + #[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 = "y-intercept of 1st piece wise linear function\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 [b0](index.html) module"] +pub struct B0_SPEC; +impl crate::RegisterSpec for B0_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [b0::R](R) reader structure"] +impl crate::Readable for B0_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [b0::W](W) writer structure"] +impl crate::Writable for B0_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets B0 to value 0x3fcc"] +impl crate::Resettable for B0_SPEC { + const RESET_VALUE: Self::Ux = 0x3fcc; +} diff --git a/down-the-stack/dk_pac/src/temp/b1.rs b/down-the-stack/dk_pac/src/temp/b1.rs new file mode 100644 index 0000000..10d8a60 --- /dev/null +++ b/down-the-stack/dk_pac/src/temp/b1.rs @@ -0,0 +1,80 @@ +#[doc = "Register `B1` 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 `B1` 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 `B1` reader - y-intercept of 2nd piece wise linear function"] +pub type B1_R = crate::FieldReader; +#[doc = "Field `B1` writer - y-intercept of 2nd piece wise linear function"] +pub type B1_W<'a, const O: u8> = crate::FieldWriter<'a, u32, B1_SPEC, u16, u16, 14, O>; +impl R { + #[doc = "Bits 0:13 - y-intercept of 2nd piece wise linear function"] + #[inline(always)] + pub fn b1(&self) -> B1_R { + B1_R::new((self.bits & 0x3fff) as u16) + } +} +impl W { + #[doc = "Bits 0:13 - y-intercept of 2nd piece wise linear function"] + #[inline(always)] + #[must_use] + pub fn b1(&mut self) -> B1_W<0> { + B1_W::new(self) + } + #[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 = "y-intercept of 2nd piece wise linear function\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 [b1](index.html) module"] +pub struct B1_SPEC; +impl crate::RegisterSpec for B1_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [b1::R](R) reader structure"] +impl crate::Readable for B1_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [b1::W](W) writer structure"] +impl crate::Writable for B1_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets B1 to value 0x3f98"] +impl crate::Resettable for B1_SPEC { + const RESET_VALUE: Self::Ux = 0x3f98; +} diff --git a/down-the-stack/dk_pac/src/temp/b2.rs b/down-the-stack/dk_pac/src/temp/b2.rs new file mode 100644 index 0000000..b72512d --- /dev/null +++ b/down-the-stack/dk_pac/src/temp/b2.rs @@ -0,0 +1,80 @@ +#[doc = "Register `B2` 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 `B2` 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 `B2` reader - y-intercept of 3rd piece wise linear function"] +pub type B2_R = crate::FieldReader; +#[doc = "Field `B2` writer - y-intercept of 3rd piece wise linear function"] +pub type B2_W<'a, const O: u8> = crate::FieldWriter<'a, u32, B2_SPEC, u16, u16, 14, O>; +impl R { + #[doc = "Bits 0:13 - y-intercept of 3rd piece wise linear function"] + #[inline(always)] + pub fn b2(&self) -> B2_R { + B2_R::new((self.bits & 0x3fff) as u16) + } +} +impl W { + #[doc = "Bits 0:13 - y-intercept of 3rd piece wise linear function"] + #[inline(always)] + #[must_use] + pub fn b2(&mut self) -> B2_W<0> { + B2_W::new(self) + } + #[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 = "y-intercept of 3rd piece wise linear function\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 [b2](index.html) module"] +pub struct B2_SPEC; +impl crate::RegisterSpec for B2_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [b2::R](R) reader structure"] +impl crate::Readable for B2_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [b2::W](W) writer structure"] +impl crate::Writable for B2_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets B2 to value 0x3f98"] +impl crate::Resettable for B2_SPEC { + const RESET_VALUE: Self::Ux = 0x3f98; +} diff --git a/down-the-stack/dk_pac/src/temp/b3.rs b/down-the-stack/dk_pac/src/temp/b3.rs new file mode 100644 index 0000000..3c93bdd --- /dev/null +++ b/down-the-stack/dk_pac/src/temp/b3.rs @@ -0,0 +1,80 @@ +#[doc = "Register `B3` 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 `B3` 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 `B3` reader - y-intercept of 4th piece wise linear function"] +pub type B3_R = crate::FieldReader; +#[doc = "Field `B3` writer - y-intercept of 4th piece wise linear function"] +pub type B3_W<'a, const O: u8> = crate::FieldWriter<'a, u32, B3_SPEC, u16, u16, 14, O>; +impl R { + #[doc = "Bits 0:13 - y-intercept of 4th piece wise linear function"] + #[inline(always)] + pub fn b3(&self) -> B3_R { + B3_R::new((self.bits & 0x3fff) as u16) + } +} +impl W { + #[doc = "Bits 0:13 - y-intercept of 4th piece wise linear function"] + #[inline(always)] + #[must_use] + pub fn b3(&mut self) -> B3_W<0> { + 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 + } +} +#[doc = "y-intercept of 4th piece wise linear function\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 [b3](index.html) module"] +pub struct B3_SPEC; +impl crate::RegisterSpec for B3_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [b3::R](R) reader structure"] +impl crate::Readable for B3_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [b3::W](W) writer structure"] +impl crate::Writable for B3_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets B3 to value 0x12"] +impl crate::Resettable for B3_SPEC { + const RESET_VALUE: Self::Ux = 0x12; +} diff --git a/down-the-stack/dk_pac/src/temp/b4.rs b/down-the-stack/dk_pac/src/temp/b4.rs new file mode 100644 index 0000000..41026aa --- /dev/null +++ b/down-the-stack/dk_pac/src/temp/b4.rs @@ -0,0 +1,80 @@ +#[doc = "Register `B4` 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 `B4` 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 `B4` reader - y-intercept of 5th piece wise linear function"] +pub type B4_R = crate::FieldReader; +#[doc = "Field `B4` writer - y-intercept of 5th piece wise linear function"] +pub type B4_W<'a, const O: u8> = crate::FieldWriter<'a, u32, B4_SPEC, u16, u16, 14, O>; +impl R { + #[doc = "Bits 0:13 - y-intercept of 5th piece wise linear function"] + #[inline(always)] + pub fn b4(&self) -> B4_R { + B4_R::new((self.bits & 0x3fff) as u16) + } +} +impl W { + #[doc = "Bits 0:13 - y-intercept of 5th piece wise linear function"] + #[inline(always)] + #[must_use] + pub fn b4(&mut self) -> B4_W<0> { + B4_W::new(self) + } + #[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 = "y-intercept of 5th piece wise linear function\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 [b4](index.html) module"] +pub struct B4_SPEC; +impl crate::RegisterSpec for B4_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [b4::R](R) reader structure"] +impl crate::Readable for B4_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [b4::W](W) writer structure"] +impl crate::Writable for B4_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets B4 to value 0x6a"] +impl crate::Resettable for B4_SPEC { + const RESET_VALUE: Self::Ux = 0x6a; +} diff --git a/down-the-stack/dk_pac/src/temp/b5.rs b/down-the-stack/dk_pac/src/temp/b5.rs new file mode 100644 index 0000000..7e89f39 --- /dev/null +++ b/down-the-stack/dk_pac/src/temp/b5.rs @@ -0,0 +1,80 @@ +#[doc = "Register `B5` 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 `B5` 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 `B5` reader - y-intercept of 6th piece wise linear function"] +pub type B5_R = crate::FieldReader; +#[doc = "Field `B5` writer - y-intercept of 6th piece wise linear function"] +pub type B5_W<'a, const O: u8> = crate::FieldWriter<'a, u32, B5_SPEC, u16, u16, 14, O>; +impl R { + #[doc = "Bits 0:13 - y-intercept of 6th piece wise linear function"] + #[inline(always)] + pub fn b5(&self) -> B5_R { + B5_R::new((self.bits & 0x3fff) as u16) + } +} +impl W { + #[doc = "Bits 0:13 - y-intercept of 6th piece wise linear function"] + #[inline(always)] + #[must_use] + pub fn b5(&mut self) -> B5_W<0> { + B5_W::new(self) + } + #[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 = "y-intercept of 6th piece wise linear function\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 [b5](index.html) module"] +pub struct B5_SPEC; +impl crate::RegisterSpec for B5_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [b5::R](R) reader structure"] +impl crate::Readable for B5_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [b5::W](W) writer structure"] +impl crate::Writable for B5_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets B5 to value 0x3dd0"] +impl crate::Resettable for B5_SPEC { + const RESET_VALUE: Self::Ux = 0x3dd0; +} diff --git a/down-the-stack/dk_pac/src/temp/events_datardy.rs b/down-the-stack/dk_pac/src/temp/events_datardy.rs new file mode 100644 index 0000000..742b352 --- /dev/null +++ b/down-the-stack/dk_pac/src/temp/events_datardy.rs @@ -0,0 +1,127 @@ +#[doc = "Register `EVENTS_DATARDY` 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 `EVENTS_DATARDY` 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 `EVENTS_DATARDY` reader - Temperature measurement complete, data ready"] +pub type EVENTS_DATARDY_R = crate::BitReader; +#[doc = "Temperature measurement complete, data ready\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum EVENTS_DATARDY_A { + #[doc = "0: Event not generated"] + NOT_GENERATED = 0, + #[doc = "1: Event generated"] + GENERATED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: EVENTS_DATARDY_A) -> Self { + variant as u8 != 0 + } +} +impl EVENTS_DATARDY_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> EVENTS_DATARDY_A { + match self.bits { + false => EVENTS_DATARDY_A::NOT_GENERATED, + true => EVENTS_DATARDY_A::GENERATED, + } + } + #[doc = "Checks if the value of the field is `NOT_GENERATED`"] + #[inline(always)] + pub fn is_not_generated(&self) -> bool { + *self == EVENTS_DATARDY_A::NOT_GENERATED + } + #[doc = "Checks if the value of the field is `GENERATED`"] + #[inline(always)] + pub fn is_generated(&self) -> bool { + *self == EVENTS_DATARDY_A::GENERATED + } +} +#[doc = "Field `EVENTS_DATARDY` writer - Temperature measurement complete, data ready"] +pub type EVENTS_DATARDY_W<'a, const O: u8> = + crate::BitWriter<'a, u32, EVENTS_DATARDY_SPEC, EVENTS_DATARDY_A, O>; +impl<'a, const O: u8> EVENTS_DATARDY_W<'a, O> { + #[doc = "Event not generated"] + #[inline(always)] + pub fn not_generated(self) -> &'a mut W { + self.variant(EVENTS_DATARDY_A::NOT_GENERATED) + } + #[doc = "Event generated"] + #[inline(always)] + pub fn generated(self) -> &'a mut W { + self.variant(EVENTS_DATARDY_A::GENERATED) + } +} +impl R { + #[doc = "Bit 0 - Temperature measurement complete, data ready"] + #[inline(always)] + pub fn events_datardy(&self) -> EVENTS_DATARDY_R { + EVENTS_DATARDY_R::new((self.bits & 1) != 0) + } +} +impl W { + #[doc = "Bit 0 - Temperature measurement complete, data ready"] + #[inline(always)] + #[must_use] + pub fn events_datardy(&mut self) -> EVENTS_DATARDY_W<0> { + EVENTS_DATARDY_W::new(self) + } + #[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 = "Temperature measurement complete, data ready\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 [events_datardy](index.html) module"] +pub struct EVENTS_DATARDY_SPEC; +impl crate::RegisterSpec for EVENTS_DATARDY_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [events_datardy::R](R) reader structure"] +impl crate::Readable for EVENTS_DATARDY_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [events_datardy::W](W) writer structure"] +impl crate::Writable for EVENTS_DATARDY_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets EVENTS_DATARDY to value 0"] +impl crate::Resettable for EVENTS_DATARDY_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/temp/intenclr.rs b/down-the-stack/dk_pac/src/temp/intenclr.rs new file mode 100644 index 0000000..96826ae --- /dev/null +++ b/down-the-stack/dk_pac/src/temp/intenclr.rs @@ -0,0 +1,133 @@ +#[doc = "Register `INTENCLR` 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 `INTENCLR` 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 `DATARDY` reader - Write '1' to disable interrupt for event DATARDY"] +pub type DATARDY_R = crate::BitReader; +#[doc = "Write '1' to disable interrupt for event DATARDY\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum DATARDY_A { + #[doc = "0: Read: Disabled"] + DISABLED = 0, + #[doc = "1: Read: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: DATARDY_A) -> Self { + variant as u8 != 0 + } +} +impl DATARDY_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> DATARDY_A { + match self.bits { + false => DATARDY_A::DISABLED, + true => DATARDY_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == DATARDY_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == DATARDY_A::ENABLED + } +} +#[doc = "Write '1' to disable interrupt for event DATARDY\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum DATARDY_AW { + #[doc = "1: Disable"] + CLEAR = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: DATARDY_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `DATARDY` writer - Write '1' to disable interrupt for event DATARDY"] +pub type DATARDY_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENCLR_SPEC, DATARDY_AW, O>; +impl<'a, const O: u8> DATARDY_W<'a, O> { + #[doc = "Disable"] + #[inline(always)] + pub fn clear(self) -> &'a mut W { + self.variant(DATARDY_AW::CLEAR) + } +} +impl R { + #[doc = "Bit 0 - Write '1' to disable interrupt for event DATARDY"] + #[inline(always)] + pub fn datardy(&self) -> DATARDY_R { + DATARDY_R::new((self.bits & 1) != 0) + } +} +impl W { + #[doc = "Bit 0 - Write '1' to disable interrupt for event DATARDY"] + #[inline(always)] + #[must_use] + pub fn datardy(&mut self) -> DATARDY_W<0> { + DATARDY_W::new(self) + } + #[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 = "Disable interrupt\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 [intenclr](index.html) module"] +pub struct INTENCLR_SPEC; +impl crate::RegisterSpec for INTENCLR_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [intenclr::R](R) reader structure"] +impl crate::Readable for INTENCLR_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [intenclr::W](W) writer structure"] +impl crate::Writable for INTENCLR_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets INTENCLR to value 0"] +impl crate::Resettable for INTENCLR_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/temp/intenset.rs b/down-the-stack/dk_pac/src/temp/intenset.rs new file mode 100644 index 0000000..e9fae65 --- /dev/null +++ b/down-the-stack/dk_pac/src/temp/intenset.rs @@ -0,0 +1,133 @@ +#[doc = "Register `INTENSET` 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 `INTENSET` 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 `DATARDY` reader - Write '1' to enable interrupt for event DATARDY"] +pub type DATARDY_R = crate::BitReader; +#[doc = "Write '1' to enable interrupt for event DATARDY\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum DATARDY_A { + #[doc = "0: Read: Disabled"] + DISABLED = 0, + #[doc = "1: Read: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: DATARDY_A) -> Self { + variant as u8 != 0 + } +} +impl DATARDY_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> DATARDY_A { + match self.bits { + false => DATARDY_A::DISABLED, + true => DATARDY_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == DATARDY_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == DATARDY_A::ENABLED + } +} +#[doc = "Write '1' to enable interrupt for event DATARDY\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum DATARDY_AW { + #[doc = "1: Enable"] + SET = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: DATARDY_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `DATARDY` writer - Write '1' to enable interrupt for event DATARDY"] +pub type DATARDY_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENSET_SPEC, DATARDY_AW, O>; +impl<'a, const O: u8> DATARDY_W<'a, O> { + #[doc = "Enable"] + #[inline(always)] + pub fn set(self) -> &'a mut W { + self.variant(DATARDY_AW::SET) + } +} +impl R { + #[doc = "Bit 0 - Write '1' to enable interrupt for event DATARDY"] + #[inline(always)] + pub fn datardy(&self) -> DATARDY_R { + DATARDY_R::new((self.bits & 1) != 0) + } +} +impl W { + #[doc = "Bit 0 - Write '1' to enable interrupt for event DATARDY"] + #[inline(always)] + #[must_use] + pub fn datardy(&mut self) -> DATARDY_W<0> { + DATARDY_W::new(self) + } + #[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 = "Enable interrupt\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 [intenset](index.html) module"] +pub struct INTENSET_SPEC; +impl crate::RegisterSpec for INTENSET_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [intenset::R](R) reader structure"] +impl crate::Readable for INTENSET_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [intenset::W](W) writer structure"] +impl crate::Writable for INTENSET_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets INTENSET to value 0"] +impl crate::Resettable for INTENSET_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/temp/t0.rs b/down-the-stack/dk_pac/src/temp/t0.rs new file mode 100644 index 0000000..59f688a --- /dev/null +++ b/down-the-stack/dk_pac/src/temp/t0.rs @@ -0,0 +1,80 @@ +#[doc = "Register `T0` 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 `T0` 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 `T0` reader - End point of 1st piece wise linear function"] +pub type T0_R = crate::FieldReader; +#[doc = "Field `T0` writer - End point of 1st piece wise linear function"] +pub type T0_W<'a, const O: u8> = crate::FieldWriter<'a, u32, T0_SPEC, u8, u8, 8, O>; +impl R { + #[doc = "Bits 0:7 - End point of 1st piece wise linear function"] + #[inline(always)] + pub fn t0(&self) -> T0_R { + T0_R::new((self.bits & 0xff) as u8) + } +} +impl W { + #[doc = "Bits 0:7 - End point of 1st piece wise linear function"] + #[inline(always)] + #[must_use] + pub fn t0(&mut self) -> T0_W<0> { + T0_W::new(self) + } + #[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 = "End point of 1st piece wise linear function\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 [t0](index.html) module"] +pub struct T0_SPEC; +impl crate::RegisterSpec for T0_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [t0::R](R) reader structure"] +impl crate::Readable for T0_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [t0::W](W) writer structure"] +impl crate::Writable for T0_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets T0 to value 0xe2"] +impl crate::Resettable for T0_SPEC { + const RESET_VALUE: Self::Ux = 0xe2; +} diff --git a/down-the-stack/dk_pac/src/temp/t1.rs b/down-the-stack/dk_pac/src/temp/t1.rs new file mode 100644 index 0000000..3d44362 --- /dev/null +++ b/down-the-stack/dk_pac/src/temp/t1.rs @@ -0,0 +1,80 @@ +#[doc = "Register `T1` 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 `T1` 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 `T1` reader - End point of 2nd piece wise linear function"] +pub type T1_R = crate::FieldReader; +#[doc = "Field `T1` writer - End point of 2nd piece wise linear function"] +pub type T1_W<'a, const O: u8> = crate::FieldWriter<'a, u32, T1_SPEC, u8, u8, 8, O>; +impl R { + #[doc = "Bits 0:7 - End point of 2nd piece wise linear function"] + #[inline(always)] + pub fn t1(&self) -> T1_R { + T1_R::new((self.bits & 0xff) as u8) + } +} +impl W { + #[doc = "Bits 0:7 - End point of 2nd piece wise linear function"] + #[inline(always)] + #[must_use] + pub fn t1(&mut self) -> T1_W<0> { + T1_W::new(self) + } + #[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 = "End point of 2nd piece wise linear function\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 [t1](index.html) module"] +pub struct T1_SPEC; +impl crate::RegisterSpec for T1_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [t1::R](R) reader structure"] +impl crate::Readable for T1_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [t1::W](W) writer structure"] +impl crate::Writable for T1_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets T1 to value 0"] +impl crate::Resettable for T1_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/temp/t2.rs b/down-the-stack/dk_pac/src/temp/t2.rs new file mode 100644 index 0000000..31f7884 --- /dev/null +++ b/down-the-stack/dk_pac/src/temp/t2.rs @@ -0,0 +1,80 @@ +#[doc = "Register `T2` 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 `T2` 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 `T2` reader - End point of 3rd piece wise linear function"] +pub type T2_R = crate::FieldReader; +#[doc = "Field `T2` writer - End point of 3rd piece wise linear function"] +pub type T2_W<'a, const O: u8> = crate::FieldWriter<'a, u32, T2_SPEC, u8, u8, 8, O>; +impl R { + #[doc = "Bits 0:7 - End point of 3rd piece wise linear function"] + #[inline(always)] + pub fn t2(&self) -> T2_R { + T2_R::new((self.bits & 0xff) as u8) + } +} +impl W { + #[doc = "Bits 0:7 - End point of 3rd piece wise linear function"] + #[inline(always)] + #[must_use] + pub fn t2(&mut self) -> T2_W<0> { + T2_W::new(self) + } + #[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 = "End point of 3rd piece wise linear function\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 [t2](index.html) module"] +pub struct T2_SPEC; +impl crate::RegisterSpec for T2_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [t2::R](R) reader structure"] +impl crate::Readable for T2_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [t2::W](W) writer structure"] +impl crate::Writable for T2_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets T2 to value 0x14"] +impl crate::Resettable for T2_SPEC { + const RESET_VALUE: Self::Ux = 0x14; +} diff --git a/down-the-stack/dk_pac/src/temp/t3.rs b/down-the-stack/dk_pac/src/temp/t3.rs new file mode 100644 index 0000000..e7a3e57 --- /dev/null +++ b/down-the-stack/dk_pac/src/temp/t3.rs @@ -0,0 +1,80 @@ +#[doc = "Register `T3` 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 `T3` 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 `T3` reader - End point of 4th piece wise linear function"] +pub type T3_R = crate::FieldReader; +#[doc = "Field `T3` writer - End point of 4th piece wise linear function"] +pub type T3_W<'a, const O: u8> = crate::FieldWriter<'a, u32, T3_SPEC, u8, u8, 8, O>; +impl R { + #[doc = "Bits 0:7 - End point of 4th piece wise linear function"] + #[inline(always)] + pub fn t3(&self) -> T3_R { + T3_R::new((self.bits & 0xff) as u8) + } +} +impl W { + #[doc = "Bits 0:7 - End point of 4th piece wise linear function"] + #[inline(always)] + #[must_use] + pub fn t3(&mut self) -> T3_W<0> { + T3_W::new(self) + } + #[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 = "End point of 4th piece wise linear function\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 [t3](index.html) module"] +pub struct T3_SPEC; +impl crate::RegisterSpec for T3_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [t3::R](R) reader structure"] +impl crate::Readable for T3_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [t3::W](W) writer structure"] +impl crate::Writable for T3_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets T3 to value 0x19"] +impl crate::Resettable for T3_SPEC { + const RESET_VALUE: Self::Ux = 0x19; +} diff --git a/down-the-stack/dk_pac/src/temp/t4.rs b/down-the-stack/dk_pac/src/temp/t4.rs new file mode 100644 index 0000000..dd1faf8 --- /dev/null +++ b/down-the-stack/dk_pac/src/temp/t4.rs @@ -0,0 +1,80 @@ +#[doc = "Register `T4` 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 `T4` 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 `T4` reader - End point of 5th piece wise linear function"] +pub type T4_R = crate::FieldReader; +#[doc = "Field `T4` writer - End point of 5th piece wise linear function"] +pub type T4_W<'a, const O: u8> = crate::FieldWriter<'a, u32, T4_SPEC, u8, u8, 8, O>; +impl R { + #[doc = "Bits 0:7 - End point of 5th piece wise linear function"] + #[inline(always)] + pub fn t4(&self) -> T4_R { + T4_R::new((self.bits & 0xff) as u8) + } +} +impl W { + #[doc = "Bits 0:7 - End point of 5th piece wise linear function"] + #[inline(always)] + #[must_use] + pub fn t4(&mut self) -> T4_W<0> { + T4_W::new(self) + } + #[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 = "End point of 5th piece wise linear function\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 [t4](index.html) module"] +pub struct T4_SPEC; +impl crate::RegisterSpec for T4_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [t4::R](R) reader structure"] +impl crate::Readable for T4_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [t4::W](W) writer structure"] +impl crate::Writable for T4_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets T4 to value 0x50"] +impl crate::Resettable for T4_SPEC { + const RESET_VALUE: Self::Ux = 0x50; +} diff --git a/down-the-stack/dk_pac/src/temp/tasks_start.rs b/down-the-stack/dk_pac/src/temp/tasks_start.rs new file mode 100644 index 0000000..1e08486 --- /dev/null +++ b/down-the-stack/dk_pac/src/temp/tasks_start.rs @@ -0,0 +1,72 @@ +#[doc = "Register `TASKS_START` 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 = "Start temperature measurement\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum TASKS_START_AW { + #[doc = "1: Trigger task"] + TRIGGER = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: TASKS_START_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `TASKS_START` writer - Start temperature measurement"] +pub type TASKS_START_W<'a, const O: u8> = + crate::BitWriter<'a, u32, TASKS_START_SPEC, TASKS_START_AW, O>; +impl<'a, const O: u8> TASKS_START_W<'a, O> { + #[doc = "Trigger task"] + #[inline(always)] + pub fn trigger(self) -> &'a mut W { + self.variant(TASKS_START_AW::TRIGGER) + } +} +impl W { + #[doc = "Bit 0 - Start temperature measurement"] + #[inline(always)] + #[must_use] + pub fn tasks_start(&mut self) -> TASKS_START_W<0> { + TASKS_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 + } +} +#[doc = "Start temperature measurement\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 [tasks_start](index.html) module"] +pub struct TASKS_START_SPEC; +impl crate::RegisterSpec for TASKS_START_SPEC { + type Ux = u32; +} +#[doc = "`write(|w| ..)` method takes [tasks_start::W](W) writer structure"] +impl crate::Writable for TASKS_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 TASKS_START to value 0"] +impl crate::Resettable for TASKS_START_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/temp/tasks_stop.rs b/down-the-stack/dk_pac/src/temp/tasks_stop.rs new file mode 100644 index 0000000..15f4883 --- /dev/null +++ b/down-the-stack/dk_pac/src/temp/tasks_stop.rs @@ -0,0 +1,72 @@ +#[doc = "Register `TASKS_STOP` 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 = "Stop temperature measurement\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum TASKS_STOP_AW { + #[doc = "1: Trigger task"] + TRIGGER = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: TASKS_STOP_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `TASKS_STOP` writer - Stop temperature measurement"] +pub type TASKS_STOP_W<'a, const O: u8> = + crate::BitWriter<'a, u32, TASKS_STOP_SPEC, TASKS_STOP_AW, O>; +impl<'a, const O: u8> TASKS_STOP_W<'a, O> { + #[doc = "Trigger task"] + #[inline(always)] + pub fn trigger(self) -> &'a mut W { + self.variant(TASKS_STOP_AW::TRIGGER) + } +} +impl W { + #[doc = "Bit 0 - Stop temperature measurement"] + #[inline(always)] + #[must_use] + pub fn tasks_stop(&mut self) -> TASKS_STOP_W<0> { + TASKS_STOP_W::new(self) + } + #[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 = "Stop temperature measurement\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 [tasks_stop](index.html) module"] +pub struct TASKS_STOP_SPEC; +impl crate::RegisterSpec for TASKS_STOP_SPEC { + type Ux = u32; +} +#[doc = "`write(|w| ..)` method takes [tasks_stop::W](W) writer structure"] +impl crate::Writable for TASKS_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 TASKS_STOP to value 0"] +impl crate::Resettable for TASKS_STOP_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/temp/temp.rs b/down-the-stack/dk_pac/src/temp/temp.rs new file mode 100644 index 0000000..b62d49e --- /dev/null +++ b/down-the-stack/dk_pac/src/temp/temp.rs @@ -0,0 +1,37 @@ +#[doc = "Register `TEMP` 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 = "Field `TEMP` reader - Temperature in degC (0.25deg steps)"] +pub type TEMP_R = crate::FieldReader; +impl R { + #[doc = "Bits 0:31 - Temperature in degC (0.25deg steps)"] + #[inline(always)] + pub fn temp(&self) -> TEMP_R { + TEMP_R::new(self.bits) + } +} +#[doc = "Temperature in degC (0.25deg steps)\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 [temp](index.html) module"] +pub struct TEMP_SPEC; +impl crate::RegisterSpec for TEMP_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [temp::R](R) reader structure"] +impl crate::Readable for TEMP_SPEC { + type Reader = R; +} +#[doc = "`reset()` method sets TEMP to value 0"] +impl crate::Resettable for TEMP_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/timer0.rs b/down-the-stack/dk_pac/src/timer0.rs new file mode 100644 index 0000000..8f355c6 --- /dev/null +++ b/down-the-stack/dk_pac/src/timer0.rs @@ -0,0 +1,99 @@ +#[doc = r"Register block"] +#[repr(C)] +pub struct RegisterBlock { + #[doc = "0x00 - Start Timer"] + pub tasks_start: TASKS_START, + #[doc = "0x04 - Stop Timer"] + pub tasks_stop: TASKS_STOP, + #[doc = "0x08 - Increment Timer (Counter mode only)"] + pub tasks_count: TASKS_COUNT, + #[doc = "0x0c - Clear time"] + pub tasks_clear: TASKS_CLEAR, + #[doc = "0x10 - Deprecated register - Shut down timer"] + pub tasks_shutdown: TASKS_SHUTDOWN, + _reserved5: [u8; 0x2c], + #[doc = "0x40..0x58 - Description collection: Capture Timer value to CC\\[n\\] +register"] + pub tasks_capture: [TASKS_CAPTURE; 6], + _reserved6: [u8; 0xe8], + #[doc = "0x140..0x158 - Description collection: Compare event on CC\\[n\\] +match"] + pub events_compare: [EVENTS_COMPARE; 6], + _reserved7: [u8; 0xa8], + #[doc = "0x200 - Shortcuts between local events and tasks"] + pub shorts: SHORTS, + _reserved8: [u8; 0x0100], + #[doc = "0x304 - Enable interrupt"] + pub intenset: INTENSET, + #[doc = "0x308 - Disable interrupt"] + pub intenclr: INTENCLR, + _reserved10: [u8; 0x01f8], + #[doc = "0x504 - Timer mode selection"] + pub mode: MODE, + #[doc = "0x508 - Configure the number of bits used by the TIMER"] + pub bitmode: BITMODE, + _reserved12: [u8; 0x04], + #[doc = "0x510 - Timer prescaler register"] + pub prescaler: PRESCALER, + _reserved13: [u8; 0x2c], + #[doc = "0x540..0x558 - Description collection: Capture/Compare register n"] + pub cc: [CC; 6], +} +#[doc = "TASKS_START (w) register accessor: an alias for `Reg`"] +pub type TASKS_START = crate::Reg; +#[doc = "Start Timer"] +pub mod tasks_start; +#[doc = "TASKS_STOP (w) register accessor: an alias for `Reg`"] +pub type TASKS_STOP = crate::Reg; +#[doc = "Stop Timer"] +pub mod tasks_stop; +#[doc = "TASKS_COUNT (w) register accessor: an alias for `Reg`"] +pub type TASKS_COUNT = crate::Reg; +#[doc = "Increment Timer (Counter mode only)"] +pub mod tasks_count; +#[doc = "TASKS_CLEAR (w) register accessor: an alias for `Reg`"] +pub type TASKS_CLEAR = crate::Reg; +#[doc = "Clear time"] +pub mod tasks_clear; +#[doc = "TASKS_SHUTDOWN (w) register accessor: an alias for `Reg`"] +pub type TASKS_SHUTDOWN = crate::Reg; +#[doc = "Deprecated register - Shut down timer"] +pub mod tasks_shutdown; +#[doc = "TASKS_CAPTURE (w) register accessor: an alias for `Reg`"] +pub type TASKS_CAPTURE = crate::Reg; +#[doc = "Description collection: Capture Timer value to CC\\[n\\] +register"] +pub mod tasks_capture; +#[doc = "EVENTS_COMPARE (rw) register accessor: an alias for `Reg`"] +pub type EVENTS_COMPARE = crate::Reg; +#[doc = "Description collection: Compare event on CC\\[n\\] +match"] +pub mod events_compare; +#[doc = "SHORTS (rw) register accessor: an alias for `Reg`"] +pub type SHORTS = crate::Reg; +#[doc = "Shortcuts between local events and tasks"] +pub mod shorts; +#[doc = "INTENSET (rw) register accessor: an alias for `Reg`"] +pub type INTENSET = crate::Reg; +#[doc = "Enable interrupt"] +pub mod intenset; +#[doc = "INTENCLR (rw) register accessor: an alias for `Reg`"] +pub type INTENCLR = crate::Reg; +#[doc = "Disable interrupt"] +pub mod intenclr; +#[doc = "MODE (rw) register accessor: an alias for `Reg`"] +pub type MODE = crate::Reg; +#[doc = "Timer mode selection"] +pub mod mode; +#[doc = "BITMODE (rw) register accessor: an alias for `Reg`"] +pub type BITMODE = crate::Reg; +#[doc = "Configure the number of bits used by the TIMER"] +pub mod bitmode; +#[doc = "PRESCALER (rw) register accessor: an alias for `Reg`"] +pub type PRESCALER = crate::Reg; +#[doc = "Timer prescaler register"] +pub mod prescaler; +#[doc = "CC (rw) register accessor: an alias for `Reg`"] +pub type CC = crate::Reg; +#[doc = "Description collection: Capture/Compare register n"] +pub mod cc; diff --git a/down-the-stack/dk_pac/src/timer0/bitmode.rs b/down-the-stack/dk_pac/src/timer0/bitmode.rs new file mode 100644 index 0000000..ec3fa7e --- /dev/null +++ b/down-the-stack/dk_pac/src/timer0/bitmode.rs @@ -0,0 +1,155 @@ +#[doc = "Register `BITMODE` 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 `BITMODE` 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 `BITMODE` reader - Timer bit width"] +pub type BITMODE_R = crate::FieldReader; +#[doc = "Timer bit width\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +#[repr(u8)] +pub enum BITMODE_A { + #[doc = "0: 16 bit timer bit width"] + _16BIT = 0, + #[doc = "1: 8 bit timer bit width"] + _08BIT = 1, + #[doc = "2: 24 bit timer bit width"] + _24BIT = 2, + #[doc = "3: 32 bit timer bit width"] + _32BIT = 3, +} +impl From for u8 { + #[inline(always)] + fn from(variant: BITMODE_A) -> Self { + variant as _ + } +} +impl BITMODE_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> BITMODE_A { + match self.bits { + 0 => BITMODE_A::_16BIT, + 1 => BITMODE_A::_08BIT, + 2 => BITMODE_A::_24BIT, + 3 => BITMODE_A::_32BIT, + _ => unreachable!(), + } + } + #[doc = "Checks if the value of the field is `_16BIT`"] + #[inline(always)] + pub fn is_16bit(&self) -> bool { + *self == BITMODE_A::_16BIT + } + #[doc = "Checks if the value of the field is `_08BIT`"] + #[inline(always)] + pub fn is_08bit(&self) -> bool { + *self == BITMODE_A::_08BIT + } + #[doc = "Checks if the value of the field is `_24BIT`"] + #[inline(always)] + pub fn is_24bit(&self) -> bool { + *self == BITMODE_A::_24BIT + } + #[doc = "Checks if the value of the field is `_32BIT`"] + #[inline(always)] + pub fn is_32bit(&self) -> bool { + *self == BITMODE_A::_32BIT + } +} +#[doc = "Field `BITMODE` writer - Timer bit width"] +pub type BITMODE_W<'a, const O: u8> = + crate::FieldWriterSafe<'a, u32, BITMODE_SPEC, u8, BITMODE_A, 2, O>; +impl<'a, const O: u8> BITMODE_W<'a, O> { + #[doc = "16 bit timer bit width"] + #[inline(always)] + pub fn _16bit(self) -> &'a mut W { + self.variant(BITMODE_A::_16BIT) + } + #[doc = "8 bit timer bit width"] + #[inline(always)] + pub fn _08bit(self) -> &'a mut W { + self.variant(BITMODE_A::_08BIT) + } + #[doc = "24 bit timer bit width"] + #[inline(always)] + pub fn _24bit(self) -> &'a mut W { + self.variant(BITMODE_A::_24BIT) + } + #[doc = "32 bit timer bit width"] + #[inline(always)] + pub fn _32bit(self) -> &'a mut W { + self.variant(BITMODE_A::_32BIT) + } +} +impl R { + #[doc = "Bits 0:1 - Timer bit width"] + #[inline(always)] + pub fn bitmode(&self) -> BITMODE_R { + BITMODE_R::new((self.bits & 3) as u8) + } +} +impl W { + #[doc = "Bits 0:1 - Timer bit width"] + #[inline(always)] + #[must_use] + pub fn bitmode(&mut self) -> BITMODE_W<0> { + BITMODE_W::new(self) + } + #[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 = "Configure the number of bits used by the TIMER\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 [bitmode](index.html) module"] +pub struct BITMODE_SPEC; +impl crate::RegisterSpec for BITMODE_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [bitmode::R](R) reader structure"] +impl crate::Readable for BITMODE_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [bitmode::W](W) writer structure"] +impl crate::Writable for BITMODE_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets BITMODE to value 0"] +impl crate::Resettable for BITMODE_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/timer0/cc.rs b/down-the-stack/dk_pac/src/timer0/cc.rs new file mode 100644 index 0000000..1482919 --- /dev/null +++ b/down-the-stack/dk_pac/src/timer0/cc.rs @@ -0,0 +1,81 @@ +#[doc = "Register `CC[%s]` 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 `CC[%s]` 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 `CC` reader - Capture/Compare value"] +pub type CC_R = crate::FieldReader; +#[doc = "Field `CC` writer - Capture/Compare value"] +pub type CC_W<'a, const O: u8> = crate::FieldWriter<'a, u32, CC_SPEC, u32, u32, 32, O>; +impl R { + #[doc = "Bits 0:31 - Capture/Compare value"] + #[inline(always)] + pub fn cc(&self) -> CC_R { + CC_R::new(self.bits) + } +} +impl W { + #[doc = "Bits 0:31 - Capture/Compare value"] + #[inline(always)] + #[must_use] + pub fn cc(&mut self) -> CC_W<0> { + CC_W::new(self) + } + #[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 = "Description collection: Capture/Compare register n\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 [cc](index.html) module"] +pub struct CC_SPEC; +impl crate::RegisterSpec for CC_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [cc::R](R) reader structure"] +impl crate::Readable for CC_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [cc::W](W) writer structure"] +impl crate::Writable for CC_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets CC[%s] +to value 0"] +impl crate::Resettable for CC_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/timer0/events_compare.rs b/down-the-stack/dk_pac/src/timer0/events_compare.rs new file mode 100644 index 0000000..c7e1693 --- /dev/null +++ b/down-the-stack/dk_pac/src/timer0/events_compare.rs @@ -0,0 +1,134 @@ +#[doc = "Register `EVENTS_COMPARE[%s]` 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 `EVENTS_COMPARE[%s]` 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 `EVENTS_COMPARE` reader - Compare event on CC\\[n\\] +match"] +pub type EVENTS_COMPARE_R = crate::BitReader; +#[doc = "Compare event on CC\\[n\\] +match\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum EVENTS_COMPARE_A { + #[doc = "0: Event not generated"] + NOT_GENERATED = 0, + #[doc = "1: Event generated"] + GENERATED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: EVENTS_COMPARE_A) -> Self { + variant as u8 != 0 + } +} +impl EVENTS_COMPARE_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> EVENTS_COMPARE_A { + match self.bits { + false => EVENTS_COMPARE_A::NOT_GENERATED, + true => EVENTS_COMPARE_A::GENERATED, + } + } + #[doc = "Checks if the value of the field is `NOT_GENERATED`"] + #[inline(always)] + pub fn is_not_generated(&self) -> bool { + *self == EVENTS_COMPARE_A::NOT_GENERATED + } + #[doc = "Checks if the value of the field is `GENERATED`"] + #[inline(always)] + pub fn is_generated(&self) -> bool { + *self == EVENTS_COMPARE_A::GENERATED + } +} +#[doc = "Field `EVENTS_COMPARE` writer - Compare event on CC\\[n\\] +match"] +pub type EVENTS_COMPARE_W<'a, const O: u8> = + crate::BitWriter<'a, u32, EVENTS_COMPARE_SPEC, EVENTS_COMPARE_A, O>; +impl<'a, const O: u8> EVENTS_COMPARE_W<'a, O> { + #[doc = "Event not generated"] + #[inline(always)] + pub fn not_generated(self) -> &'a mut W { + self.variant(EVENTS_COMPARE_A::NOT_GENERATED) + } + #[doc = "Event generated"] + #[inline(always)] + pub fn generated(self) -> &'a mut W { + self.variant(EVENTS_COMPARE_A::GENERATED) + } +} +impl R { + #[doc = "Bit 0 - Compare event on CC\\[n\\] +match"] + #[inline(always)] + pub fn events_compare(&self) -> EVENTS_COMPARE_R { + EVENTS_COMPARE_R::new((self.bits & 1) != 0) + } +} +impl W { + #[doc = "Bit 0 - Compare event on CC\\[n\\] +match"] + #[inline(always)] + #[must_use] + pub fn events_compare(&mut self) -> EVENTS_COMPARE_W<0> { + EVENTS_COMPARE_W::new(self) + } + #[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 = "Description collection: Compare event on CC\\[n\\] +match\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 [events_compare](index.html) module"] +pub struct EVENTS_COMPARE_SPEC; +impl crate::RegisterSpec for EVENTS_COMPARE_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [events_compare::R](R) reader structure"] +impl crate::Readable for EVENTS_COMPARE_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [events_compare::W](W) writer structure"] +impl crate::Writable for EVENTS_COMPARE_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets EVENTS_COMPARE[%s] +to value 0"] +impl crate::Resettable for EVENTS_COMPARE_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/timer0/intenclr.rs b/down-the-stack/dk_pac/src/timer0/intenclr.rs new file mode 100644 index 0000000..f750764 --- /dev/null +++ b/down-the-stack/dk_pac/src/timer0/intenclr.rs @@ -0,0 +1,473 @@ +#[doc = "Register `INTENCLR` 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 `INTENCLR` 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 `COMPARE0` reader - Write '1' to disable interrupt for event COMPARE\\[0\\]"] +pub type COMPARE0_R = crate::BitReader; +#[doc = "Write '1' to disable interrupt for event COMPARE\\[0\\]\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum COMPARE0_A { + #[doc = "0: Read: Disabled"] + DISABLED = 0, + #[doc = "1: Read: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: COMPARE0_A) -> Self { + variant as u8 != 0 + } +} +impl COMPARE0_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> COMPARE0_A { + match self.bits { + false => COMPARE0_A::DISABLED, + true => COMPARE0_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == COMPARE0_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == COMPARE0_A::ENABLED + } +} +#[doc = "Write '1' to disable interrupt for event COMPARE\\[0\\]\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum COMPARE0_AW { + #[doc = "1: Disable"] + CLEAR = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: COMPARE0_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `COMPARE0` writer - Write '1' to disable interrupt for event COMPARE\\[0\\]"] +pub type COMPARE0_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENCLR_SPEC, COMPARE0_AW, O>; +impl<'a, const O: u8> COMPARE0_W<'a, O> { + #[doc = "Disable"] + #[inline(always)] + pub fn clear(self) -> &'a mut W { + self.variant(COMPARE0_AW::CLEAR) + } +} +#[doc = "Field `COMPARE1` reader - Write '1' to disable interrupt for event COMPARE\\[1\\]"] +pub type COMPARE1_R = crate::BitReader; +#[doc = "Write '1' to disable interrupt for event COMPARE\\[1\\]\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum COMPARE1_A { + #[doc = "0: Read: Disabled"] + DISABLED = 0, + #[doc = "1: Read: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: COMPARE1_A) -> Self { + variant as u8 != 0 + } +} +impl COMPARE1_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> COMPARE1_A { + match self.bits { + false => COMPARE1_A::DISABLED, + true => COMPARE1_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == COMPARE1_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == COMPARE1_A::ENABLED + } +} +#[doc = "Write '1' to disable interrupt for event COMPARE\\[1\\]\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum COMPARE1_AW { + #[doc = "1: Disable"] + CLEAR = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: COMPARE1_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `COMPARE1` writer - Write '1' to disable interrupt for event COMPARE\\[1\\]"] +pub type COMPARE1_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENCLR_SPEC, COMPARE1_AW, O>; +impl<'a, const O: u8> COMPARE1_W<'a, O> { + #[doc = "Disable"] + #[inline(always)] + pub fn clear(self) -> &'a mut W { + self.variant(COMPARE1_AW::CLEAR) + } +} +#[doc = "Field `COMPARE2` reader - Write '1' to disable interrupt for event COMPARE\\[2\\]"] +pub type COMPARE2_R = crate::BitReader; +#[doc = "Write '1' to disable interrupt for event COMPARE\\[2\\]\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum COMPARE2_A { + #[doc = "0: Read: Disabled"] + DISABLED = 0, + #[doc = "1: Read: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: COMPARE2_A) -> Self { + variant as u8 != 0 + } +} +impl COMPARE2_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> COMPARE2_A { + match self.bits { + false => COMPARE2_A::DISABLED, + true => COMPARE2_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == COMPARE2_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == COMPARE2_A::ENABLED + } +} +#[doc = "Write '1' to disable interrupt for event COMPARE\\[2\\]\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum COMPARE2_AW { + #[doc = "1: Disable"] + CLEAR = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: COMPARE2_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `COMPARE2` writer - Write '1' to disable interrupt for event COMPARE\\[2\\]"] +pub type COMPARE2_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENCLR_SPEC, COMPARE2_AW, O>; +impl<'a, const O: u8> COMPARE2_W<'a, O> { + #[doc = "Disable"] + #[inline(always)] + pub fn clear(self) -> &'a mut W { + self.variant(COMPARE2_AW::CLEAR) + } +} +#[doc = "Field `COMPARE3` reader - Write '1' to disable interrupt for event COMPARE\\[3\\]"] +pub type COMPARE3_R = crate::BitReader; +#[doc = "Write '1' to disable interrupt for event COMPARE\\[3\\]\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum COMPARE3_A { + #[doc = "0: Read: Disabled"] + DISABLED = 0, + #[doc = "1: Read: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: COMPARE3_A) -> Self { + variant as u8 != 0 + } +} +impl COMPARE3_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> COMPARE3_A { + match self.bits { + false => COMPARE3_A::DISABLED, + true => COMPARE3_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == COMPARE3_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == COMPARE3_A::ENABLED + } +} +#[doc = "Write '1' to disable interrupt for event COMPARE\\[3\\]\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum COMPARE3_AW { + #[doc = "1: Disable"] + CLEAR = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: COMPARE3_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `COMPARE3` writer - Write '1' to disable interrupt for event COMPARE\\[3\\]"] +pub type COMPARE3_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENCLR_SPEC, COMPARE3_AW, O>; +impl<'a, const O: u8> COMPARE3_W<'a, O> { + #[doc = "Disable"] + #[inline(always)] + pub fn clear(self) -> &'a mut W { + self.variant(COMPARE3_AW::CLEAR) + } +} +#[doc = "Field `COMPARE4` reader - Write '1' to disable interrupt for event COMPARE\\[4\\]"] +pub type COMPARE4_R = crate::BitReader; +#[doc = "Write '1' to disable interrupt for event COMPARE\\[4\\]\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum COMPARE4_A { + #[doc = "0: Read: Disabled"] + DISABLED = 0, + #[doc = "1: Read: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: COMPARE4_A) -> Self { + variant as u8 != 0 + } +} +impl COMPARE4_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> COMPARE4_A { + match self.bits { + false => COMPARE4_A::DISABLED, + true => COMPARE4_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == COMPARE4_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == COMPARE4_A::ENABLED + } +} +#[doc = "Write '1' to disable interrupt for event COMPARE\\[4\\]\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum COMPARE4_AW { + #[doc = "1: Disable"] + CLEAR = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: COMPARE4_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `COMPARE4` writer - Write '1' to disable interrupt for event COMPARE\\[4\\]"] +pub type COMPARE4_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENCLR_SPEC, COMPARE4_AW, O>; +impl<'a, const O: u8> COMPARE4_W<'a, O> { + #[doc = "Disable"] + #[inline(always)] + pub fn clear(self) -> &'a mut W { + self.variant(COMPARE4_AW::CLEAR) + } +} +#[doc = "Field `COMPARE5` reader - Write '1' to disable interrupt for event COMPARE\\[5\\]"] +pub type COMPARE5_R = crate::BitReader; +#[doc = "Write '1' to disable interrupt for event COMPARE\\[5\\]\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum COMPARE5_A { + #[doc = "0: Read: Disabled"] + DISABLED = 0, + #[doc = "1: Read: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: COMPARE5_A) -> Self { + variant as u8 != 0 + } +} +impl COMPARE5_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> COMPARE5_A { + match self.bits { + false => COMPARE5_A::DISABLED, + true => COMPARE5_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == COMPARE5_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == COMPARE5_A::ENABLED + } +} +#[doc = "Write '1' to disable interrupt for event COMPARE\\[5\\]\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum COMPARE5_AW { + #[doc = "1: Disable"] + CLEAR = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: COMPARE5_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `COMPARE5` writer - Write '1' to disable interrupt for event COMPARE\\[5\\]"] +pub type COMPARE5_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENCLR_SPEC, COMPARE5_AW, O>; +impl<'a, const O: u8> COMPARE5_W<'a, O> { + #[doc = "Disable"] + #[inline(always)] + pub fn clear(self) -> &'a mut W { + self.variant(COMPARE5_AW::CLEAR) + } +} +impl R { + #[doc = "Bit 16 - Write '1' to disable interrupt for event COMPARE\\[0\\]"] + #[inline(always)] + pub fn compare0(&self) -> COMPARE0_R { + COMPARE0_R::new(((self.bits >> 16) & 1) != 0) + } + #[doc = "Bit 17 - Write '1' to disable interrupt for event COMPARE\\[1\\]"] + #[inline(always)] + pub fn compare1(&self) -> COMPARE1_R { + COMPARE1_R::new(((self.bits >> 17) & 1) != 0) + } + #[doc = "Bit 18 - Write '1' to disable interrupt for event COMPARE\\[2\\]"] + #[inline(always)] + pub fn compare2(&self) -> COMPARE2_R { + COMPARE2_R::new(((self.bits >> 18) & 1) != 0) + } + #[doc = "Bit 19 - Write '1' to disable interrupt for event COMPARE\\[3\\]"] + #[inline(always)] + pub fn compare3(&self) -> COMPARE3_R { + COMPARE3_R::new(((self.bits >> 19) & 1) != 0) + } + #[doc = "Bit 20 - Write '1' to disable interrupt for event COMPARE\\[4\\]"] + #[inline(always)] + pub fn compare4(&self) -> COMPARE4_R { + COMPARE4_R::new(((self.bits >> 20) & 1) != 0) + } + #[doc = "Bit 21 - Write '1' to disable interrupt for event COMPARE\\[5\\]"] + #[inline(always)] + pub fn compare5(&self) -> COMPARE5_R { + COMPARE5_R::new(((self.bits >> 21) & 1) != 0) + } +} +impl W { + #[doc = "Bit 16 - Write '1' to disable interrupt for event COMPARE\\[0\\]"] + #[inline(always)] + #[must_use] + pub fn compare0(&mut self) -> COMPARE0_W<16> { + COMPARE0_W::new(self) + } + #[doc = "Bit 17 - Write '1' to disable interrupt for event COMPARE\\[1\\]"] + #[inline(always)] + #[must_use] + pub fn compare1(&mut self) -> COMPARE1_W<17> { + COMPARE1_W::new(self) + } + #[doc = "Bit 18 - Write '1' to disable interrupt for event COMPARE\\[2\\]"] + #[inline(always)] + #[must_use] + pub fn compare2(&mut self) -> COMPARE2_W<18> { + COMPARE2_W::new(self) + } + #[doc = "Bit 19 - Write '1' to disable interrupt for event COMPARE\\[3\\]"] + #[inline(always)] + #[must_use] + pub fn compare3(&mut self) -> COMPARE3_W<19> { + COMPARE3_W::new(self) + } + #[doc = "Bit 20 - Write '1' to disable interrupt for event COMPARE\\[4\\]"] + #[inline(always)] + #[must_use] + pub fn compare4(&mut self) -> COMPARE4_W<20> { + COMPARE4_W::new(self) + } + #[doc = "Bit 21 - Write '1' to disable interrupt for event COMPARE\\[5\\]"] + #[inline(always)] + #[must_use] + pub fn compare5(&mut self) -> COMPARE5_W<21> { + COMPARE5_W::new(self) + } + #[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 = "Disable interrupt\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 [intenclr](index.html) module"] +pub struct INTENCLR_SPEC; +impl crate::RegisterSpec for INTENCLR_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [intenclr::R](R) reader structure"] +impl crate::Readable for INTENCLR_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [intenclr::W](W) writer structure"] +impl crate::Writable for INTENCLR_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets INTENCLR to value 0"] +impl crate::Resettable for INTENCLR_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/timer0/intenset.rs b/down-the-stack/dk_pac/src/timer0/intenset.rs new file mode 100644 index 0000000..fb5e522 --- /dev/null +++ b/down-the-stack/dk_pac/src/timer0/intenset.rs @@ -0,0 +1,473 @@ +#[doc = "Register `INTENSET` 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 `INTENSET` 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 `COMPARE0` reader - Write '1' to enable interrupt for event COMPARE\\[0\\]"] +pub type COMPARE0_R = crate::BitReader; +#[doc = "Write '1' to enable interrupt for event COMPARE\\[0\\]\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum COMPARE0_A { + #[doc = "0: Read: Disabled"] + DISABLED = 0, + #[doc = "1: Read: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: COMPARE0_A) -> Self { + variant as u8 != 0 + } +} +impl COMPARE0_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> COMPARE0_A { + match self.bits { + false => COMPARE0_A::DISABLED, + true => COMPARE0_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == COMPARE0_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == COMPARE0_A::ENABLED + } +} +#[doc = "Write '1' to enable interrupt for event COMPARE\\[0\\]\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum COMPARE0_AW { + #[doc = "1: Enable"] + SET = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: COMPARE0_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `COMPARE0` writer - Write '1' to enable interrupt for event COMPARE\\[0\\]"] +pub type COMPARE0_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENSET_SPEC, COMPARE0_AW, O>; +impl<'a, const O: u8> COMPARE0_W<'a, O> { + #[doc = "Enable"] + #[inline(always)] + pub fn set(self) -> &'a mut W { + self.variant(COMPARE0_AW::SET) + } +} +#[doc = "Field `COMPARE1` reader - Write '1' to enable interrupt for event COMPARE\\[1\\]"] +pub type COMPARE1_R = crate::BitReader; +#[doc = "Write '1' to enable interrupt for event COMPARE\\[1\\]\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum COMPARE1_A { + #[doc = "0: Read: Disabled"] + DISABLED = 0, + #[doc = "1: Read: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: COMPARE1_A) -> Self { + variant as u8 != 0 + } +} +impl COMPARE1_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> COMPARE1_A { + match self.bits { + false => COMPARE1_A::DISABLED, + true => COMPARE1_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == COMPARE1_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == COMPARE1_A::ENABLED + } +} +#[doc = "Write '1' to enable interrupt for event COMPARE\\[1\\]\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum COMPARE1_AW { + #[doc = "1: Enable"] + SET = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: COMPARE1_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `COMPARE1` writer - Write '1' to enable interrupt for event COMPARE\\[1\\]"] +pub type COMPARE1_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENSET_SPEC, COMPARE1_AW, O>; +impl<'a, const O: u8> COMPARE1_W<'a, O> { + #[doc = "Enable"] + #[inline(always)] + pub fn set(self) -> &'a mut W { + self.variant(COMPARE1_AW::SET) + } +} +#[doc = "Field `COMPARE2` reader - Write '1' to enable interrupt for event COMPARE\\[2\\]"] +pub type COMPARE2_R = crate::BitReader; +#[doc = "Write '1' to enable interrupt for event COMPARE\\[2\\]\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum COMPARE2_A { + #[doc = "0: Read: Disabled"] + DISABLED = 0, + #[doc = "1: Read: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: COMPARE2_A) -> Self { + variant as u8 != 0 + } +} +impl COMPARE2_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> COMPARE2_A { + match self.bits { + false => COMPARE2_A::DISABLED, + true => COMPARE2_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == COMPARE2_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == COMPARE2_A::ENABLED + } +} +#[doc = "Write '1' to enable interrupt for event COMPARE\\[2\\]\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum COMPARE2_AW { + #[doc = "1: Enable"] + SET = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: COMPARE2_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `COMPARE2` writer - Write '1' to enable interrupt for event COMPARE\\[2\\]"] +pub type COMPARE2_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENSET_SPEC, COMPARE2_AW, O>; +impl<'a, const O: u8> COMPARE2_W<'a, O> { + #[doc = "Enable"] + #[inline(always)] + pub fn set(self) -> &'a mut W { + self.variant(COMPARE2_AW::SET) + } +} +#[doc = "Field `COMPARE3` reader - Write '1' to enable interrupt for event COMPARE\\[3\\]"] +pub type COMPARE3_R = crate::BitReader; +#[doc = "Write '1' to enable interrupt for event COMPARE\\[3\\]\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum COMPARE3_A { + #[doc = "0: Read: Disabled"] + DISABLED = 0, + #[doc = "1: Read: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: COMPARE3_A) -> Self { + variant as u8 != 0 + } +} +impl COMPARE3_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> COMPARE3_A { + match self.bits { + false => COMPARE3_A::DISABLED, + true => COMPARE3_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == COMPARE3_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == COMPARE3_A::ENABLED + } +} +#[doc = "Write '1' to enable interrupt for event COMPARE\\[3\\]\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum COMPARE3_AW { + #[doc = "1: Enable"] + SET = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: COMPARE3_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `COMPARE3` writer - Write '1' to enable interrupt for event COMPARE\\[3\\]"] +pub type COMPARE3_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENSET_SPEC, COMPARE3_AW, O>; +impl<'a, const O: u8> COMPARE3_W<'a, O> { + #[doc = "Enable"] + #[inline(always)] + pub fn set(self) -> &'a mut W { + self.variant(COMPARE3_AW::SET) + } +} +#[doc = "Field `COMPARE4` reader - Write '1' to enable interrupt for event COMPARE\\[4\\]"] +pub type COMPARE4_R = crate::BitReader; +#[doc = "Write '1' to enable interrupt for event COMPARE\\[4\\]\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum COMPARE4_A { + #[doc = "0: Read: Disabled"] + DISABLED = 0, + #[doc = "1: Read: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: COMPARE4_A) -> Self { + variant as u8 != 0 + } +} +impl COMPARE4_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> COMPARE4_A { + match self.bits { + false => COMPARE4_A::DISABLED, + true => COMPARE4_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == COMPARE4_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == COMPARE4_A::ENABLED + } +} +#[doc = "Write '1' to enable interrupt for event COMPARE\\[4\\]\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum COMPARE4_AW { + #[doc = "1: Enable"] + SET = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: COMPARE4_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `COMPARE4` writer - Write '1' to enable interrupt for event COMPARE\\[4\\]"] +pub type COMPARE4_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENSET_SPEC, COMPARE4_AW, O>; +impl<'a, const O: u8> COMPARE4_W<'a, O> { + #[doc = "Enable"] + #[inline(always)] + pub fn set(self) -> &'a mut W { + self.variant(COMPARE4_AW::SET) + } +} +#[doc = "Field `COMPARE5` reader - Write '1' to enable interrupt for event COMPARE\\[5\\]"] +pub type COMPARE5_R = crate::BitReader; +#[doc = "Write '1' to enable interrupt for event COMPARE\\[5\\]\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum COMPARE5_A { + #[doc = "0: Read: Disabled"] + DISABLED = 0, + #[doc = "1: Read: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: COMPARE5_A) -> Self { + variant as u8 != 0 + } +} +impl COMPARE5_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> COMPARE5_A { + match self.bits { + false => COMPARE5_A::DISABLED, + true => COMPARE5_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == COMPARE5_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == COMPARE5_A::ENABLED + } +} +#[doc = "Write '1' to enable interrupt for event COMPARE\\[5\\]\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum COMPARE5_AW { + #[doc = "1: Enable"] + SET = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: COMPARE5_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `COMPARE5` writer - Write '1' to enable interrupt for event COMPARE\\[5\\]"] +pub type COMPARE5_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENSET_SPEC, COMPARE5_AW, O>; +impl<'a, const O: u8> COMPARE5_W<'a, O> { + #[doc = "Enable"] + #[inline(always)] + pub fn set(self) -> &'a mut W { + self.variant(COMPARE5_AW::SET) + } +} +impl R { + #[doc = "Bit 16 - Write '1' to enable interrupt for event COMPARE\\[0\\]"] + #[inline(always)] + pub fn compare0(&self) -> COMPARE0_R { + COMPARE0_R::new(((self.bits >> 16) & 1) != 0) + } + #[doc = "Bit 17 - Write '1' to enable interrupt for event COMPARE\\[1\\]"] + #[inline(always)] + pub fn compare1(&self) -> COMPARE1_R { + COMPARE1_R::new(((self.bits >> 17) & 1) != 0) + } + #[doc = "Bit 18 - Write '1' to enable interrupt for event COMPARE\\[2\\]"] + #[inline(always)] + pub fn compare2(&self) -> COMPARE2_R { + COMPARE2_R::new(((self.bits >> 18) & 1) != 0) + } + #[doc = "Bit 19 - Write '1' to enable interrupt for event COMPARE\\[3\\]"] + #[inline(always)] + pub fn compare3(&self) -> COMPARE3_R { + COMPARE3_R::new(((self.bits >> 19) & 1) != 0) + } + #[doc = "Bit 20 - Write '1' to enable interrupt for event COMPARE\\[4\\]"] + #[inline(always)] + pub fn compare4(&self) -> COMPARE4_R { + COMPARE4_R::new(((self.bits >> 20) & 1) != 0) + } + #[doc = "Bit 21 - Write '1' to enable interrupt for event COMPARE\\[5\\]"] + #[inline(always)] + pub fn compare5(&self) -> COMPARE5_R { + COMPARE5_R::new(((self.bits >> 21) & 1) != 0) + } +} +impl W { + #[doc = "Bit 16 - Write '1' to enable interrupt for event COMPARE\\[0\\]"] + #[inline(always)] + #[must_use] + pub fn compare0(&mut self) -> COMPARE0_W<16> { + COMPARE0_W::new(self) + } + #[doc = "Bit 17 - Write '1' to enable interrupt for event COMPARE\\[1\\]"] + #[inline(always)] + #[must_use] + pub fn compare1(&mut self) -> COMPARE1_W<17> { + COMPARE1_W::new(self) + } + #[doc = "Bit 18 - Write '1' to enable interrupt for event COMPARE\\[2\\]"] + #[inline(always)] + #[must_use] + pub fn compare2(&mut self) -> COMPARE2_W<18> { + COMPARE2_W::new(self) + } + #[doc = "Bit 19 - Write '1' to enable interrupt for event COMPARE\\[3\\]"] + #[inline(always)] + #[must_use] + pub fn compare3(&mut self) -> COMPARE3_W<19> { + COMPARE3_W::new(self) + } + #[doc = "Bit 20 - Write '1' to enable interrupt for event COMPARE\\[4\\]"] + #[inline(always)] + #[must_use] + pub fn compare4(&mut self) -> COMPARE4_W<20> { + COMPARE4_W::new(self) + } + #[doc = "Bit 21 - Write '1' to enable interrupt for event COMPARE\\[5\\]"] + #[inline(always)] + #[must_use] + pub fn compare5(&mut self) -> COMPARE5_W<21> { + COMPARE5_W::new(self) + } + #[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 = "Enable interrupt\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 [intenset](index.html) module"] +pub struct INTENSET_SPEC; +impl crate::RegisterSpec for INTENSET_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [intenset::R](R) reader structure"] +impl crate::Readable for INTENSET_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [intenset::W](W) writer structure"] +impl crate::Writable for INTENSET_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets INTENSET to value 0"] +impl crate::Resettable for INTENSET_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/timer0/mode.rs b/down-the-stack/dk_pac/src/timer0/mode.rs new file mode 100644 index 0000000..1b18118 --- /dev/null +++ b/down-the-stack/dk_pac/src/timer0/mode.rs @@ -0,0 +1,141 @@ +#[doc = "Register `MODE` 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 `MODE` 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 `MODE` reader - Timer mode"] +pub type MODE_R = crate::FieldReader; +#[doc = "Timer mode\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +#[repr(u8)] +pub enum MODE_A { + #[doc = "0: Select Timer mode"] + TIMER = 0, + #[doc = "1: Deprecated enumerator - Select Counter mode"] + COUNTER = 1, + #[doc = "2: Select Low Power Counter mode"] + LOW_POWER_COUNTER = 2, +} +impl From for u8 { + #[inline(always)] + fn from(variant: MODE_A) -> Self { + variant as _ + } +} +impl MODE_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> Option { + match self.bits { + 0 => Some(MODE_A::TIMER), + 1 => Some(MODE_A::COUNTER), + 2 => Some(MODE_A::LOW_POWER_COUNTER), + _ => None, + } + } + #[doc = "Checks if the value of the field is `TIMER`"] + #[inline(always)] + pub fn is_timer(&self) -> bool { + *self == MODE_A::TIMER + } + #[doc = "Checks if the value of the field is `COUNTER`"] + #[inline(always)] + pub fn is_counter(&self) -> bool { + *self == MODE_A::COUNTER + } + #[doc = "Checks if the value of the field is `LOW_POWER_COUNTER`"] + #[inline(always)] + pub fn is_low_power_counter(&self) -> bool { + *self == MODE_A::LOW_POWER_COUNTER + } +} +#[doc = "Field `MODE` writer - Timer mode"] +pub type MODE_W<'a, const O: u8> = crate::FieldWriter<'a, u32, MODE_SPEC, u8, MODE_A, 2, O>; +impl<'a, const O: u8> MODE_W<'a, O> { + #[doc = "Select Timer mode"] + #[inline(always)] + pub fn timer(self) -> &'a mut W { + self.variant(MODE_A::TIMER) + } + #[doc = "Deprecated enumerator - Select Counter mode"] + #[inline(always)] + pub fn counter(self) -> &'a mut W { + self.variant(MODE_A::COUNTER) + } + #[doc = "Select Low Power Counter mode"] + #[inline(always)] + pub fn low_power_counter(self) -> &'a mut W { + self.variant(MODE_A::LOW_POWER_COUNTER) + } +} +impl R { + #[doc = "Bits 0:1 - Timer mode"] + #[inline(always)] + pub fn mode(&self) -> MODE_R { + MODE_R::new((self.bits & 3) as u8) + } +} +impl W { + #[doc = "Bits 0:1 - Timer mode"] + #[inline(always)] + #[must_use] + pub fn mode(&mut self) -> MODE_W<0> { + 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 + } +} +#[doc = "Timer mode selection\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 [mode](index.html) module"] +pub struct MODE_SPEC; +impl crate::RegisterSpec for MODE_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [mode::R](R) reader structure"] +impl crate::Readable for MODE_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [mode::W](W) writer structure"] +impl crate::Writable for 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 MODE to value 0"] +impl crate::Resettable for MODE_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/timer0/prescaler.rs b/down-the-stack/dk_pac/src/timer0/prescaler.rs new file mode 100644 index 0000000..4ceca84 --- /dev/null +++ b/down-the-stack/dk_pac/src/timer0/prescaler.rs @@ -0,0 +1,80 @@ +#[doc = "Register `PRESCALER` 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 `PRESCALER` 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 `PRESCALER` reader - Prescaler value"] +pub type PRESCALER_R = crate::FieldReader; +#[doc = "Field `PRESCALER` writer - Prescaler value"] +pub type PRESCALER_W<'a, const O: u8> = crate::FieldWriter<'a, u32, PRESCALER_SPEC, u8, u8, 4, O>; +impl R { + #[doc = "Bits 0:3 - Prescaler value"] + #[inline(always)] + pub fn prescaler(&self) -> PRESCALER_R { + PRESCALER_R::new((self.bits & 0x0f) as u8) + } +} +impl W { + #[doc = "Bits 0:3 - Prescaler value"] + #[inline(always)] + #[must_use] + pub fn prescaler(&mut self) -> PRESCALER_W<0> { + PRESCALER_W::new(self) + } + #[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 = "Timer prescaler register\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 [prescaler](index.html) module"] +pub struct PRESCALER_SPEC; +impl crate::RegisterSpec for PRESCALER_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [prescaler::R](R) reader structure"] +impl crate::Readable for PRESCALER_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [prescaler::W](W) writer structure"] +impl crate::Writable for PRESCALER_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets PRESCALER to value 0x04"] +impl crate::Resettable for PRESCALER_SPEC { + const RESET_VALUE: Self::Ux = 0x04; +} diff --git a/down-the-stack/dk_pac/src/timer0/shorts.rs b/down-the-stack/dk_pac/src/timer0/shorts.rs new file mode 100644 index 0000000..33ca413 --- /dev/null +++ b/down-the-stack/dk_pac/src/timer0/shorts.rs @@ -0,0 +1,869 @@ +#[doc = "Register `SHORTS` 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 `SHORTS` 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 `COMPARE0_CLEAR` reader - Shortcut between event COMPARE\\[0\\] +and task CLEAR"] +pub type COMPARE0_CLEAR_R = crate::BitReader; +#[doc = "Shortcut between event COMPARE\\[0\\] +and task CLEAR\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum COMPARE0_CLEAR_A { + #[doc = "0: Disable shortcut"] + DISABLED = 0, + #[doc = "1: Enable shortcut"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: COMPARE0_CLEAR_A) -> Self { + variant as u8 != 0 + } +} +impl COMPARE0_CLEAR_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> COMPARE0_CLEAR_A { + match self.bits { + false => COMPARE0_CLEAR_A::DISABLED, + true => COMPARE0_CLEAR_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == COMPARE0_CLEAR_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == COMPARE0_CLEAR_A::ENABLED + } +} +#[doc = "Field `COMPARE0_CLEAR` writer - Shortcut between event COMPARE\\[0\\] +and task CLEAR"] +pub type COMPARE0_CLEAR_W<'a, const O: u8> = + crate::BitWriter<'a, u32, SHORTS_SPEC, COMPARE0_CLEAR_A, O>; +impl<'a, const O: u8> COMPARE0_CLEAR_W<'a, O> { + #[doc = "Disable shortcut"] + #[inline(always)] + pub fn disabled(self) -> &'a mut W { + self.variant(COMPARE0_CLEAR_A::DISABLED) + } + #[doc = "Enable shortcut"] + #[inline(always)] + pub fn enabled(self) -> &'a mut W { + self.variant(COMPARE0_CLEAR_A::ENABLED) + } +} +#[doc = "Field `COMPARE1_CLEAR` reader - Shortcut between event COMPARE\\[1\\] +and task CLEAR"] +pub type COMPARE1_CLEAR_R = crate::BitReader; +#[doc = "Shortcut between event COMPARE\\[1\\] +and task CLEAR\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum COMPARE1_CLEAR_A { + #[doc = "0: Disable shortcut"] + DISABLED = 0, + #[doc = "1: Enable shortcut"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: COMPARE1_CLEAR_A) -> Self { + variant as u8 != 0 + } +} +impl COMPARE1_CLEAR_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> COMPARE1_CLEAR_A { + match self.bits { + false => COMPARE1_CLEAR_A::DISABLED, + true => COMPARE1_CLEAR_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == COMPARE1_CLEAR_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == COMPARE1_CLEAR_A::ENABLED + } +} +#[doc = "Field `COMPARE1_CLEAR` writer - Shortcut between event COMPARE\\[1\\] +and task CLEAR"] +pub type COMPARE1_CLEAR_W<'a, const O: u8> = + crate::BitWriter<'a, u32, SHORTS_SPEC, COMPARE1_CLEAR_A, O>; +impl<'a, const O: u8> COMPARE1_CLEAR_W<'a, O> { + #[doc = "Disable shortcut"] + #[inline(always)] + pub fn disabled(self) -> &'a mut W { + self.variant(COMPARE1_CLEAR_A::DISABLED) + } + #[doc = "Enable shortcut"] + #[inline(always)] + pub fn enabled(self) -> &'a mut W { + self.variant(COMPARE1_CLEAR_A::ENABLED) + } +} +#[doc = "Field `COMPARE2_CLEAR` reader - Shortcut between event COMPARE\\[2\\] +and task CLEAR"] +pub type COMPARE2_CLEAR_R = crate::BitReader; +#[doc = "Shortcut between event COMPARE\\[2\\] +and task CLEAR\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum COMPARE2_CLEAR_A { + #[doc = "0: Disable shortcut"] + DISABLED = 0, + #[doc = "1: Enable shortcut"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: COMPARE2_CLEAR_A) -> Self { + variant as u8 != 0 + } +} +impl COMPARE2_CLEAR_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> COMPARE2_CLEAR_A { + match self.bits { + false => COMPARE2_CLEAR_A::DISABLED, + true => COMPARE2_CLEAR_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == COMPARE2_CLEAR_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == COMPARE2_CLEAR_A::ENABLED + } +} +#[doc = "Field `COMPARE2_CLEAR` writer - Shortcut between event COMPARE\\[2\\] +and task CLEAR"] +pub type COMPARE2_CLEAR_W<'a, const O: u8> = + crate::BitWriter<'a, u32, SHORTS_SPEC, COMPARE2_CLEAR_A, O>; +impl<'a, const O: u8> COMPARE2_CLEAR_W<'a, O> { + #[doc = "Disable shortcut"] + #[inline(always)] + pub fn disabled(self) -> &'a mut W { + self.variant(COMPARE2_CLEAR_A::DISABLED) + } + #[doc = "Enable shortcut"] + #[inline(always)] + pub fn enabled(self) -> &'a mut W { + self.variant(COMPARE2_CLEAR_A::ENABLED) + } +} +#[doc = "Field `COMPARE3_CLEAR` reader - Shortcut between event COMPARE\\[3\\] +and task CLEAR"] +pub type COMPARE3_CLEAR_R = crate::BitReader; +#[doc = "Shortcut between event COMPARE\\[3\\] +and task CLEAR\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum COMPARE3_CLEAR_A { + #[doc = "0: Disable shortcut"] + DISABLED = 0, + #[doc = "1: Enable shortcut"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: COMPARE3_CLEAR_A) -> Self { + variant as u8 != 0 + } +} +impl COMPARE3_CLEAR_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> COMPARE3_CLEAR_A { + match self.bits { + false => COMPARE3_CLEAR_A::DISABLED, + true => COMPARE3_CLEAR_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == COMPARE3_CLEAR_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == COMPARE3_CLEAR_A::ENABLED + } +} +#[doc = "Field `COMPARE3_CLEAR` writer - Shortcut between event COMPARE\\[3\\] +and task CLEAR"] +pub type COMPARE3_CLEAR_W<'a, const O: u8> = + crate::BitWriter<'a, u32, SHORTS_SPEC, COMPARE3_CLEAR_A, O>; +impl<'a, const O: u8> COMPARE3_CLEAR_W<'a, O> { + #[doc = "Disable shortcut"] + #[inline(always)] + pub fn disabled(self) -> &'a mut W { + self.variant(COMPARE3_CLEAR_A::DISABLED) + } + #[doc = "Enable shortcut"] + #[inline(always)] + pub fn enabled(self) -> &'a mut W { + self.variant(COMPARE3_CLEAR_A::ENABLED) + } +} +#[doc = "Field `COMPARE4_CLEAR` reader - Shortcut between event COMPARE\\[4\\] +and task CLEAR"] +pub type COMPARE4_CLEAR_R = crate::BitReader; +#[doc = "Shortcut between event COMPARE\\[4\\] +and task CLEAR\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum COMPARE4_CLEAR_A { + #[doc = "0: Disable shortcut"] + DISABLED = 0, + #[doc = "1: Enable shortcut"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: COMPARE4_CLEAR_A) -> Self { + variant as u8 != 0 + } +} +impl COMPARE4_CLEAR_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> COMPARE4_CLEAR_A { + match self.bits { + false => COMPARE4_CLEAR_A::DISABLED, + true => COMPARE4_CLEAR_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == COMPARE4_CLEAR_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == COMPARE4_CLEAR_A::ENABLED + } +} +#[doc = "Field `COMPARE4_CLEAR` writer - Shortcut between event COMPARE\\[4\\] +and task CLEAR"] +pub type COMPARE4_CLEAR_W<'a, const O: u8> = + crate::BitWriter<'a, u32, SHORTS_SPEC, COMPARE4_CLEAR_A, O>; +impl<'a, const O: u8> COMPARE4_CLEAR_W<'a, O> { + #[doc = "Disable shortcut"] + #[inline(always)] + pub fn disabled(self) -> &'a mut W { + self.variant(COMPARE4_CLEAR_A::DISABLED) + } + #[doc = "Enable shortcut"] + #[inline(always)] + pub fn enabled(self) -> &'a mut W { + self.variant(COMPARE4_CLEAR_A::ENABLED) + } +} +#[doc = "Field `COMPARE5_CLEAR` reader - Shortcut between event COMPARE\\[5\\] +and task CLEAR"] +pub type COMPARE5_CLEAR_R = crate::BitReader; +#[doc = "Shortcut between event COMPARE\\[5\\] +and task CLEAR\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum COMPARE5_CLEAR_A { + #[doc = "0: Disable shortcut"] + DISABLED = 0, + #[doc = "1: Enable shortcut"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: COMPARE5_CLEAR_A) -> Self { + variant as u8 != 0 + } +} +impl COMPARE5_CLEAR_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> COMPARE5_CLEAR_A { + match self.bits { + false => COMPARE5_CLEAR_A::DISABLED, + true => COMPARE5_CLEAR_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == COMPARE5_CLEAR_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == COMPARE5_CLEAR_A::ENABLED + } +} +#[doc = "Field `COMPARE5_CLEAR` writer - Shortcut between event COMPARE\\[5\\] +and task CLEAR"] +pub type COMPARE5_CLEAR_W<'a, const O: u8> = + crate::BitWriter<'a, u32, SHORTS_SPEC, COMPARE5_CLEAR_A, O>; +impl<'a, const O: u8> COMPARE5_CLEAR_W<'a, O> { + #[doc = "Disable shortcut"] + #[inline(always)] + pub fn disabled(self) -> &'a mut W { + self.variant(COMPARE5_CLEAR_A::DISABLED) + } + #[doc = "Enable shortcut"] + #[inline(always)] + pub fn enabled(self) -> &'a mut W { + self.variant(COMPARE5_CLEAR_A::ENABLED) + } +} +#[doc = "Field `COMPARE0_STOP` reader - Shortcut between event COMPARE\\[0\\] +and task STOP"] +pub type COMPARE0_STOP_R = crate::BitReader; +#[doc = "Shortcut between event COMPARE\\[0\\] +and task STOP\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum COMPARE0_STOP_A { + #[doc = "0: Disable shortcut"] + DISABLED = 0, + #[doc = "1: Enable shortcut"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: COMPARE0_STOP_A) -> Self { + variant as u8 != 0 + } +} +impl COMPARE0_STOP_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> COMPARE0_STOP_A { + match self.bits { + false => COMPARE0_STOP_A::DISABLED, + true => COMPARE0_STOP_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == COMPARE0_STOP_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == COMPARE0_STOP_A::ENABLED + } +} +#[doc = "Field `COMPARE0_STOP` writer - Shortcut between event COMPARE\\[0\\] +and task STOP"] +pub type COMPARE0_STOP_W<'a, const O: u8> = + crate::BitWriter<'a, u32, SHORTS_SPEC, COMPARE0_STOP_A, O>; +impl<'a, const O: u8> COMPARE0_STOP_W<'a, O> { + #[doc = "Disable shortcut"] + #[inline(always)] + pub fn disabled(self) -> &'a mut W { + self.variant(COMPARE0_STOP_A::DISABLED) + } + #[doc = "Enable shortcut"] + #[inline(always)] + pub fn enabled(self) -> &'a mut W { + self.variant(COMPARE0_STOP_A::ENABLED) + } +} +#[doc = "Field `COMPARE1_STOP` reader - Shortcut between event COMPARE\\[1\\] +and task STOP"] +pub type COMPARE1_STOP_R = crate::BitReader; +#[doc = "Shortcut between event COMPARE\\[1\\] +and task STOP\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum COMPARE1_STOP_A { + #[doc = "0: Disable shortcut"] + DISABLED = 0, + #[doc = "1: Enable shortcut"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: COMPARE1_STOP_A) -> Self { + variant as u8 != 0 + } +} +impl COMPARE1_STOP_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> COMPARE1_STOP_A { + match self.bits { + false => COMPARE1_STOP_A::DISABLED, + true => COMPARE1_STOP_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == COMPARE1_STOP_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == COMPARE1_STOP_A::ENABLED + } +} +#[doc = "Field `COMPARE1_STOP` writer - Shortcut between event COMPARE\\[1\\] +and task STOP"] +pub type COMPARE1_STOP_W<'a, const O: u8> = + crate::BitWriter<'a, u32, SHORTS_SPEC, COMPARE1_STOP_A, O>; +impl<'a, const O: u8> COMPARE1_STOP_W<'a, O> { + #[doc = "Disable shortcut"] + #[inline(always)] + pub fn disabled(self) -> &'a mut W { + self.variant(COMPARE1_STOP_A::DISABLED) + } + #[doc = "Enable shortcut"] + #[inline(always)] + pub fn enabled(self) -> &'a mut W { + self.variant(COMPARE1_STOP_A::ENABLED) + } +} +#[doc = "Field `COMPARE2_STOP` reader - Shortcut between event COMPARE\\[2\\] +and task STOP"] +pub type COMPARE2_STOP_R = crate::BitReader; +#[doc = "Shortcut between event COMPARE\\[2\\] +and task STOP\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum COMPARE2_STOP_A { + #[doc = "0: Disable shortcut"] + DISABLED = 0, + #[doc = "1: Enable shortcut"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: COMPARE2_STOP_A) -> Self { + variant as u8 != 0 + } +} +impl COMPARE2_STOP_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> COMPARE2_STOP_A { + match self.bits { + false => COMPARE2_STOP_A::DISABLED, + true => COMPARE2_STOP_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == COMPARE2_STOP_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == COMPARE2_STOP_A::ENABLED + } +} +#[doc = "Field `COMPARE2_STOP` writer - Shortcut between event COMPARE\\[2\\] +and task STOP"] +pub type COMPARE2_STOP_W<'a, const O: u8> = + crate::BitWriter<'a, u32, SHORTS_SPEC, COMPARE2_STOP_A, O>; +impl<'a, const O: u8> COMPARE2_STOP_W<'a, O> { + #[doc = "Disable shortcut"] + #[inline(always)] + pub fn disabled(self) -> &'a mut W { + self.variant(COMPARE2_STOP_A::DISABLED) + } + #[doc = "Enable shortcut"] + #[inline(always)] + pub fn enabled(self) -> &'a mut W { + self.variant(COMPARE2_STOP_A::ENABLED) + } +} +#[doc = "Field `COMPARE3_STOP` reader - Shortcut between event COMPARE\\[3\\] +and task STOP"] +pub type COMPARE3_STOP_R = crate::BitReader; +#[doc = "Shortcut between event COMPARE\\[3\\] +and task STOP\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum COMPARE3_STOP_A { + #[doc = "0: Disable shortcut"] + DISABLED = 0, + #[doc = "1: Enable shortcut"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: COMPARE3_STOP_A) -> Self { + variant as u8 != 0 + } +} +impl COMPARE3_STOP_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> COMPARE3_STOP_A { + match self.bits { + false => COMPARE3_STOP_A::DISABLED, + true => COMPARE3_STOP_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == COMPARE3_STOP_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == COMPARE3_STOP_A::ENABLED + } +} +#[doc = "Field `COMPARE3_STOP` writer - Shortcut between event COMPARE\\[3\\] +and task STOP"] +pub type COMPARE3_STOP_W<'a, const O: u8> = + crate::BitWriter<'a, u32, SHORTS_SPEC, COMPARE3_STOP_A, O>; +impl<'a, const O: u8> COMPARE3_STOP_W<'a, O> { + #[doc = "Disable shortcut"] + #[inline(always)] + pub fn disabled(self) -> &'a mut W { + self.variant(COMPARE3_STOP_A::DISABLED) + } + #[doc = "Enable shortcut"] + #[inline(always)] + pub fn enabled(self) -> &'a mut W { + self.variant(COMPARE3_STOP_A::ENABLED) + } +} +#[doc = "Field `COMPARE4_STOP` reader - Shortcut between event COMPARE\\[4\\] +and task STOP"] +pub type COMPARE4_STOP_R = crate::BitReader; +#[doc = "Shortcut between event COMPARE\\[4\\] +and task STOP\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum COMPARE4_STOP_A { + #[doc = "0: Disable shortcut"] + DISABLED = 0, + #[doc = "1: Enable shortcut"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: COMPARE4_STOP_A) -> Self { + variant as u8 != 0 + } +} +impl COMPARE4_STOP_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> COMPARE4_STOP_A { + match self.bits { + false => COMPARE4_STOP_A::DISABLED, + true => COMPARE4_STOP_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == COMPARE4_STOP_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == COMPARE4_STOP_A::ENABLED + } +} +#[doc = "Field `COMPARE4_STOP` writer - Shortcut between event COMPARE\\[4\\] +and task STOP"] +pub type COMPARE4_STOP_W<'a, const O: u8> = + crate::BitWriter<'a, u32, SHORTS_SPEC, COMPARE4_STOP_A, O>; +impl<'a, const O: u8> COMPARE4_STOP_W<'a, O> { + #[doc = "Disable shortcut"] + #[inline(always)] + pub fn disabled(self) -> &'a mut W { + self.variant(COMPARE4_STOP_A::DISABLED) + } + #[doc = "Enable shortcut"] + #[inline(always)] + pub fn enabled(self) -> &'a mut W { + self.variant(COMPARE4_STOP_A::ENABLED) + } +} +#[doc = "Field `COMPARE5_STOP` reader - Shortcut between event COMPARE\\[5\\] +and task STOP"] +pub type COMPARE5_STOP_R = crate::BitReader; +#[doc = "Shortcut between event COMPARE\\[5\\] +and task STOP\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum COMPARE5_STOP_A { + #[doc = "0: Disable shortcut"] + DISABLED = 0, + #[doc = "1: Enable shortcut"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: COMPARE5_STOP_A) -> Self { + variant as u8 != 0 + } +} +impl COMPARE5_STOP_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> COMPARE5_STOP_A { + match self.bits { + false => COMPARE5_STOP_A::DISABLED, + true => COMPARE5_STOP_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == COMPARE5_STOP_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == COMPARE5_STOP_A::ENABLED + } +} +#[doc = "Field `COMPARE5_STOP` writer - Shortcut between event COMPARE\\[5\\] +and task STOP"] +pub type COMPARE5_STOP_W<'a, const O: u8> = + crate::BitWriter<'a, u32, SHORTS_SPEC, COMPARE5_STOP_A, O>; +impl<'a, const O: u8> COMPARE5_STOP_W<'a, O> { + #[doc = "Disable shortcut"] + #[inline(always)] + pub fn disabled(self) -> &'a mut W { + self.variant(COMPARE5_STOP_A::DISABLED) + } + #[doc = "Enable shortcut"] + #[inline(always)] + pub fn enabled(self) -> &'a mut W { + self.variant(COMPARE5_STOP_A::ENABLED) + } +} +impl R { + #[doc = "Bit 0 - Shortcut between event COMPARE\\[0\\] +and task CLEAR"] + #[inline(always)] + pub fn compare0_clear(&self) -> COMPARE0_CLEAR_R { + COMPARE0_CLEAR_R::new((self.bits & 1) != 0) + } + #[doc = "Bit 1 - Shortcut between event COMPARE\\[1\\] +and task CLEAR"] + #[inline(always)] + pub fn compare1_clear(&self) -> COMPARE1_CLEAR_R { + COMPARE1_CLEAR_R::new(((self.bits >> 1) & 1) != 0) + } + #[doc = "Bit 2 - Shortcut between event COMPARE\\[2\\] +and task CLEAR"] + #[inline(always)] + pub fn compare2_clear(&self) -> COMPARE2_CLEAR_R { + COMPARE2_CLEAR_R::new(((self.bits >> 2) & 1) != 0) + } + #[doc = "Bit 3 - Shortcut between event COMPARE\\[3\\] +and task CLEAR"] + #[inline(always)] + pub fn compare3_clear(&self) -> COMPARE3_CLEAR_R { + COMPARE3_CLEAR_R::new(((self.bits >> 3) & 1) != 0) + } + #[doc = "Bit 4 - Shortcut between event COMPARE\\[4\\] +and task CLEAR"] + #[inline(always)] + pub fn compare4_clear(&self) -> COMPARE4_CLEAR_R { + COMPARE4_CLEAR_R::new(((self.bits >> 4) & 1) != 0) + } + #[doc = "Bit 5 - Shortcut between event COMPARE\\[5\\] +and task CLEAR"] + #[inline(always)] + pub fn compare5_clear(&self) -> COMPARE5_CLEAR_R { + COMPARE5_CLEAR_R::new(((self.bits >> 5) & 1) != 0) + } + #[doc = "Bit 8 - Shortcut between event COMPARE\\[0\\] +and task STOP"] + #[inline(always)] + pub fn compare0_stop(&self) -> COMPARE0_STOP_R { + COMPARE0_STOP_R::new(((self.bits >> 8) & 1) != 0) + } + #[doc = "Bit 9 - Shortcut between event COMPARE\\[1\\] +and task STOP"] + #[inline(always)] + pub fn compare1_stop(&self) -> COMPARE1_STOP_R { + COMPARE1_STOP_R::new(((self.bits >> 9) & 1) != 0) + } + #[doc = "Bit 10 - Shortcut between event COMPARE\\[2\\] +and task STOP"] + #[inline(always)] + pub fn compare2_stop(&self) -> COMPARE2_STOP_R { + COMPARE2_STOP_R::new(((self.bits >> 10) & 1) != 0) + } + #[doc = "Bit 11 - Shortcut between event COMPARE\\[3\\] +and task STOP"] + #[inline(always)] + pub fn compare3_stop(&self) -> COMPARE3_STOP_R { + COMPARE3_STOP_R::new(((self.bits >> 11) & 1) != 0) + } + #[doc = "Bit 12 - Shortcut between event COMPARE\\[4\\] +and task STOP"] + #[inline(always)] + pub fn compare4_stop(&self) -> COMPARE4_STOP_R { + COMPARE4_STOP_R::new(((self.bits >> 12) & 1) != 0) + } + #[doc = "Bit 13 - Shortcut between event COMPARE\\[5\\] +and task STOP"] + #[inline(always)] + pub fn compare5_stop(&self) -> COMPARE5_STOP_R { + COMPARE5_STOP_R::new(((self.bits >> 13) & 1) != 0) + } +} +impl W { + #[doc = "Bit 0 - Shortcut between event COMPARE\\[0\\] +and task CLEAR"] + #[inline(always)] + #[must_use] + pub fn compare0_clear(&mut self) -> COMPARE0_CLEAR_W<0> { + COMPARE0_CLEAR_W::new(self) + } + #[doc = "Bit 1 - Shortcut between event COMPARE\\[1\\] +and task CLEAR"] + #[inline(always)] + #[must_use] + pub fn compare1_clear(&mut self) -> COMPARE1_CLEAR_W<1> { + COMPARE1_CLEAR_W::new(self) + } + #[doc = "Bit 2 - Shortcut between event COMPARE\\[2\\] +and task CLEAR"] + #[inline(always)] + #[must_use] + pub fn compare2_clear(&mut self) -> COMPARE2_CLEAR_W<2> { + COMPARE2_CLEAR_W::new(self) + } + #[doc = "Bit 3 - Shortcut between event COMPARE\\[3\\] +and task CLEAR"] + #[inline(always)] + #[must_use] + pub fn compare3_clear(&mut self) -> COMPARE3_CLEAR_W<3> { + COMPARE3_CLEAR_W::new(self) + } + #[doc = "Bit 4 - Shortcut between event COMPARE\\[4\\] +and task CLEAR"] + #[inline(always)] + #[must_use] + pub fn compare4_clear(&mut self) -> COMPARE4_CLEAR_W<4> { + COMPARE4_CLEAR_W::new(self) + } + #[doc = "Bit 5 - Shortcut between event COMPARE\\[5\\] +and task CLEAR"] + #[inline(always)] + #[must_use] + pub fn compare5_clear(&mut self) -> COMPARE5_CLEAR_W<5> { + COMPARE5_CLEAR_W::new(self) + } + #[doc = "Bit 8 - Shortcut between event COMPARE\\[0\\] +and task STOP"] + #[inline(always)] + #[must_use] + pub fn compare0_stop(&mut self) -> COMPARE0_STOP_W<8> { + COMPARE0_STOP_W::new(self) + } + #[doc = "Bit 9 - Shortcut between event COMPARE\\[1\\] +and task STOP"] + #[inline(always)] + #[must_use] + pub fn compare1_stop(&mut self) -> COMPARE1_STOP_W<9> { + COMPARE1_STOP_W::new(self) + } + #[doc = "Bit 10 - Shortcut between event COMPARE\\[2\\] +and task STOP"] + #[inline(always)] + #[must_use] + pub fn compare2_stop(&mut self) -> COMPARE2_STOP_W<10> { + COMPARE2_STOP_W::new(self) + } + #[doc = "Bit 11 - Shortcut between event COMPARE\\[3\\] +and task STOP"] + #[inline(always)] + #[must_use] + pub fn compare3_stop(&mut self) -> COMPARE3_STOP_W<11> { + COMPARE3_STOP_W::new(self) + } + #[doc = "Bit 12 - Shortcut between event COMPARE\\[4\\] +and task STOP"] + #[inline(always)] + #[must_use] + pub fn compare4_stop(&mut self) -> COMPARE4_STOP_W<12> { + COMPARE4_STOP_W::new(self) + } + #[doc = "Bit 13 - Shortcut between event COMPARE\\[5\\] +and task STOP"] + #[inline(always)] + #[must_use] + pub fn compare5_stop(&mut self) -> COMPARE5_STOP_W<13> { + COMPARE5_STOP_W::new(self) + } + #[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 = "Shortcuts between local events and tasks\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 [shorts](index.html) module"] +pub struct SHORTS_SPEC; +impl crate::RegisterSpec for SHORTS_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [shorts::R](R) reader structure"] +impl crate::Readable for SHORTS_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [shorts::W](W) writer structure"] +impl crate::Writable for SHORTS_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets SHORTS to value 0"] +impl crate::Resettable for SHORTS_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/timer0/tasks_capture.rs b/down-the-stack/dk_pac/src/timer0/tasks_capture.rs new file mode 100644 index 0000000..46e516e --- /dev/null +++ b/down-the-stack/dk_pac/src/timer0/tasks_capture.rs @@ -0,0 +1,77 @@ +#[doc = "Register `TASKS_CAPTURE[%s]` 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 = "Capture Timer value to CC\\[n\\] +register\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum TASKS_CAPTURE_AW { + #[doc = "1: Trigger task"] + TRIGGER = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: TASKS_CAPTURE_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `TASKS_CAPTURE` writer - Capture Timer value to CC\\[n\\] +register"] +pub type TASKS_CAPTURE_W<'a, const O: u8> = + crate::BitWriter<'a, u32, TASKS_CAPTURE_SPEC, TASKS_CAPTURE_AW, O>; +impl<'a, const O: u8> TASKS_CAPTURE_W<'a, O> { + #[doc = "Trigger task"] + #[inline(always)] + pub fn trigger(self) -> &'a mut W { + self.variant(TASKS_CAPTURE_AW::TRIGGER) + } +} +impl W { + #[doc = "Bit 0 - Capture Timer value to CC\\[n\\] +register"] + #[inline(always)] + #[must_use] + pub fn tasks_capture(&mut self) -> TASKS_CAPTURE_W<0> { + TASKS_CAPTURE_W::new(self) + } + #[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 = "Description collection: Capture Timer value to CC\\[n\\] +register\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 [tasks_capture](index.html) module"] +pub struct TASKS_CAPTURE_SPEC; +impl crate::RegisterSpec for TASKS_CAPTURE_SPEC { + type Ux = u32; +} +#[doc = "`write(|w| ..)` method takes [tasks_capture::W](W) writer structure"] +impl crate::Writable for TASKS_CAPTURE_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets TASKS_CAPTURE[%s] +to value 0"] +impl crate::Resettable for TASKS_CAPTURE_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/timer0/tasks_clear.rs b/down-the-stack/dk_pac/src/timer0/tasks_clear.rs new file mode 100644 index 0000000..99de385 --- /dev/null +++ b/down-the-stack/dk_pac/src/timer0/tasks_clear.rs @@ -0,0 +1,72 @@ +#[doc = "Register `TASKS_CLEAR` 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 = "Clear time\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum TASKS_CLEAR_AW { + #[doc = "1: Trigger task"] + TRIGGER = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: TASKS_CLEAR_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `TASKS_CLEAR` writer - Clear time"] +pub type TASKS_CLEAR_W<'a, const O: u8> = + crate::BitWriter<'a, u32, TASKS_CLEAR_SPEC, TASKS_CLEAR_AW, O>; +impl<'a, const O: u8> TASKS_CLEAR_W<'a, O> { + #[doc = "Trigger task"] + #[inline(always)] + pub fn trigger(self) -> &'a mut W { + self.variant(TASKS_CLEAR_AW::TRIGGER) + } +} +impl W { + #[doc = "Bit 0 - Clear time"] + #[inline(always)] + #[must_use] + pub fn tasks_clear(&mut self) -> TASKS_CLEAR_W<0> { + TASKS_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 + } +} +#[doc = "Clear time\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 [tasks_clear](index.html) module"] +pub struct TASKS_CLEAR_SPEC; +impl crate::RegisterSpec for TASKS_CLEAR_SPEC { + type Ux = u32; +} +#[doc = "`write(|w| ..)` method takes [tasks_clear::W](W) writer structure"] +impl crate::Writable for TASKS_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 TASKS_CLEAR to value 0"] +impl crate::Resettable for TASKS_CLEAR_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/timer0/tasks_count.rs b/down-the-stack/dk_pac/src/timer0/tasks_count.rs new file mode 100644 index 0000000..9da0f92 --- /dev/null +++ b/down-the-stack/dk_pac/src/timer0/tasks_count.rs @@ -0,0 +1,72 @@ +#[doc = "Register `TASKS_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 = "Increment Timer (Counter mode only)\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum TASKS_COUNT_AW { + #[doc = "1: Trigger task"] + TRIGGER = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: TASKS_COUNT_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `TASKS_COUNT` writer - Increment Timer (Counter mode only)"] +pub type TASKS_COUNT_W<'a, const O: u8> = + crate::BitWriter<'a, u32, TASKS_COUNT_SPEC, TASKS_COUNT_AW, O>; +impl<'a, const O: u8> TASKS_COUNT_W<'a, O> { + #[doc = "Trigger task"] + #[inline(always)] + pub fn trigger(self) -> &'a mut W { + self.variant(TASKS_COUNT_AW::TRIGGER) + } +} +impl W { + #[doc = "Bit 0 - Increment Timer (Counter mode only)"] + #[inline(always)] + #[must_use] + pub fn tasks_count(&mut self) -> TASKS_COUNT_W<0> { + TASKS_COUNT_W::new(self) + } + #[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 = "Increment Timer (Counter mode only)\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 [tasks_count](index.html) module"] +pub struct TASKS_COUNT_SPEC; +impl crate::RegisterSpec for TASKS_COUNT_SPEC { + type Ux = u32; +} +#[doc = "`write(|w| ..)` method takes [tasks_count::W](W) writer structure"] +impl crate::Writable for TASKS_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 TASKS_COUNT to value 0"] +impl crate::Resettable for TASKS_COUNT_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/timer0/tasks_shutdown.rs b/down-the-stack/dk_pac/src/timer0/tasks_shutdown.rs new file mode 100644 index 0000000..a711658 --- /dev/null +++ b/down-the-stack/dk_pac/src/timer0/tasks_shutdown.rs @@ -0,0 +1,72 @@ +#[doc = "Register `TASKS_SHUTDOWN` 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 = "Deprecated field - Shut down timer\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum TASKS_SHUTDOWN_AW { + #[doc = "1: Trigger task"] + TRIGGER = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: TASKS_SHUTDOWN_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `TASKS_SHUTDOWN` writer - Deprecated field - Shut down timer"] +pub type TASKS_SHUTDOWN_W<'a, const O: u8> = + crate::BitWriter<'a, u32, TASKS_SHUTDOWN_SPEC, TASKS_SHUTDOWN_AW, O>; +impl<'a, const O: u8> TASKS_SHUTDOWN_W<'a, O> { + #[doc = "Trigger task"] + #[inline(always)] + pub fn trigger(self) -> &'a mut W { + self.variant(TASKS_SHUTDOWN_AW::TRIGGER) + } +} +impl W { + #[doc = "Bit 0 - Deprecated field - Shut down timer"] + #[inline(always)] + #[must_use] + pub fn tasks_shutdown(&mut self) -> TASKS_SHUTDOWN_W<0> { + TASKS_SHUTDOWN_W::new(self) + } + #[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 = "Deprecated register - Shut down timer\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 [tasks_shutdown](index.html) module"] +pub struct TASKS_SHUTDOWN_SPEC; +impl crate::RegisterSpec for TASKS_SHUTDOWN_SPEC { + type Ux = u32; +} +#[doc = "`write(|w| ..)` method takes [tasks_shutdown::W](W) writer structure"] +impl crate::Writable for TASKS_SHUTDOWN_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets TASKS_SHUTDOWN to value 0"] +impl crate::Resettable for TASKS_SHUTDOWN_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/timer0/tasks_start.rs b/down-the-stack/dk_pac/src/timer0/tasks_start.rs new file mode 100644 index 0000000..594c6bb --- /dev/null +++ b/down-the-stack/dk_pac/src/timer0/tasks_start.rs @@ -0,0 +1,72 @@ +#[doc = "Register `TASKS_START` 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 = "Start Timer\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum TASKS_START_AW { + #[doc = "1: Trigger task"] + TRIGGER = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: TASKS_START_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `TASKS_START` writer - Start Timer"] +pub type TASKS_START_W<'a, const O: u8> = + crate::BitWriter<'a, u32, TASKS_START_SPEC, TASKS_START_AW, O>; +impl<'a, const O: u8> TASKS_START_W<'a, O> { + #[doc = "Trigger task"] + #[inline(always)] + pub fn trigger(self) -> &'a mut W { + self.variant(TASKS_START_AW::TRIGGER) + } +} +impl W { + #[doc = "Bit 0 - Start Timer"] + #[inline(always)] + #[must_use] + pub fn tasks_start(&mut self) -> TASKS_START_W<0> { + TASKS_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 + } +} +#[doc = "Start Timer\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 [tasks_start](index.html) module"] +pub struct TASKS_START_SPEC; +impl crate::RegisterSpec for TASKS_START_SPEC { + type Ux = u32; +} +#[doc = "`write(|w| ..)` method takes [tasks_start::W](W) writer structure"] +impl crate::Writable for TASKS_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 TASKS_START to value 0"] +impl crate::Resettable for TASKS_START_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/timer0/tasks_stop.rs b/down-the-stack/dk_pac/src/timer0/tasks_stop.rs new file mode 100644 index 0000000..2b7608c --- /dev/null +++ b/down-the-stack/dk_pac/src/timer0/tasks_stop.rs @@ -0,0 +1,72 @@ +#[doc = "Register `TASKS_STOP` 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 = "Stop Timer\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum TASKS_STOP_AW { + #[doc = "1: Trigger task"] + TRIGGER = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: TASKS_STOP_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `TASKS_STOP` writer - Stop Timer"] +pub type TASKS_STOP_W<'a, const O: u8> = + crate::BitWriter<'a, u32, TASKS_STOP_SPEC, TASKS_STOP_AW, O>; +impl<'a, const O: u8> TASKS_STOP_W<'a, O> { + #[doc = "Trigger task"] + #[inline(always)] + pub fn trigger(self) -> &'a mut W { + self.variant(TASKS_STOP_AW::TRIGGER) + } +} +impl W { + #[doc = "Bit 0 - Stop Timer"] + #[inline(always)] + #[must_use] + pub fn tasks_stop(&mut self) -> TASKS_STOP_W<0> { + TASKS_STOP_W::new(self) + } + #[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 = "Stop Timer\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 [tasks_stop](index.html) module"] +pub struct TASKS_STOP_SPEC; +impl crate::RegisterSpec for TASKS_STOP_SPEC { + type Ux = u32; +} +#[doc = "`write(|w| ..)` method takes [tasks_stop::W](W) writer structure"] +impl crate::Writable for TASKS_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 TASKS_STOP to value 0"] +impl crate::Resettable for TASKS_STOP_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/twi0.rs b/down-the-stack/dk_pac/src/twi0.rs new file mode 100644 index 0000000..01da6fb --- /dev/null +++ b/down-the-stack/dk_pac/src/twi0.rs @@ -0,0 +1,152 @@ +#[doc = r"Register block"] +#[repr(C)] +pub struct RegisterBlock { + #[doc = "0x00 - Start TWI receive sequence"] + pub tasks_startrx: TASKS_STARTRX, + _reserved1: [u8; 0x04], + #[doc = "0x08 - Start TWI transmit sequence"] + pub tasks_starttx: TASKS_STARTTX, + _reserved2: [u8; 0x08], + #[doc = "0x14 - Stop TWI transaction"] + pub tasks_stop: TASKS_STOP, + _reserved3: [u8; 0x04], + #[doc = "0x1c - Suspend TWI transaction"] + pub tasks_suspend: TASKS_SUSPEND, + #[doc = "0x20 - Resume TWI transaction"] + pub tasks_resume: TASKS_RESUME, + _reserved5: [u8; 0xe0], + #[doc = "0x104 - TWI stopped"] + pub events_stopped: EVENTS_STOPPED, + #[doc = "0x108 - TWI RXD byte received"] + pub events_rxdready: EVENTS_RXDREADY, + _reserved7: [u8; 0x10], + #[doc = "0x11c - TWI TXD byte sent"] + pub events_txdsent: EVENTS_TXDSENT, + _reserved8: [u8; 0x04], + #[doc = "0x124 - TWI error"] + pub events_error: EVENTS_ERROR, + _reserved9: [u8; 0x10], + #[doc = "0x138 - TWI byte boundary, generated before each byte that is sent or received"] + pub events_bb: EVENTS_BB, + _reserved10: [u8; 0x0c], + #[doc = "0x148 - TWI entered the suspended state"] + pub events_suspended: EVENTS_SUSPENDED, + _reserved11: [u8; 0xb4], + #[doc = "0x200 - Shortcuts between local events and tasks"] + pub shorts: SHORTS, + _reserved12: [u8; 0x0100], + #[doc = "0x304 - Enable interrupt"] + pub intenset: INTENSET, + #[doc = "0x308 - Disable interrupt"] + pub intenclr: INTENCLR, + _reserved14: [u8; 0x01b8], + #[doc = "0x4c4 - Error source"] + pub errorsrc: ERRORSRC, + _reserved15: [u8; 0x38], + #[doc = "0x500 - Enable TWI"] + pub enable: ENABLE, + _reserved16: [u8; 0x04], + #[doc = "0x508 - Pin select for SCL"] + pub pselscl: PSELSCL, + #[doc = "0x50c - Pin select for SDA"] + pub pselsda: PSELSDA, + _reserved18: [u8; 0x08], + #[doc = "0x518 - RXD register"] + pub rxd: RXD, + #[doc = "0x51c - TXD register"] + pub txd: TXD, + _reserved20: [u8; 0x04], + #[doc = "0x524 - TWI frequency"] + pub frequency: FREQUENCY, + _reserved21: [u8; 0x60], + #[doc = "0x588 - Address used in the TWI transfer"] + pub address: ADDRESS, +} +#[doc = "TASKS_STARTRX (w) register accessor: an alias for `Reg`"] +pub type TASKS_STARTRX = crate::Reg; +#[doc = "Start TWI receive sequence"] +pub mod tasks_startrx; +#[doc = "TASKS_STARTTX (w) register accessor: an alias for `Reg`"] +pub type TASKS_STARTTX = crate::Reg; +#[doc = "Start TWI transmit sequence"] +pub mod tasks_starttx; +#[doc = "TASKS_STOP (w) register accessor: an alias for `Reg`"] +pub type TASKS_STOP = crate::Reg; +#[doc = "Stop TWI transaction"] +pub mod tasks_stop; +#[doc = "TASKS_SUSPEND (w) register accessor: an alias for `Reg`"] +pub type TASKS_SUSPEND = crate::Reg; +#[doc = "Suspend TWI transaction"] +pub mod tasks_suspend; +#[doc = "TASKS_RESUME (w) register accessor: an alias for `Reg`"] +pub type TASKS_RESUME = crate::Reg; +#[doc = "Resume TWI transaction"] +pub mod tasks_resume; +#[doc = "EVENTS_STOPPED (rw) register accessor: an alias for `Reg`"] +pub type EVENTS_STOPPED = crate::Reg; +#[doc = "TWI stopped"] +pub mod events_stopped; +#[doc = "EVENTS_RXDREADY (rw) register accessor: an alias for `Reg`"] +pub type EVENTS_RXDREADY = crate::Reg; +#[doc = "TWI RXD byte received"] +pub mod events_rxdready; +#[doc = "EVENTS_TXDSENT (rw) register accessor: an alias for `Reg`"] +pub type EVENTS_TXDSENT = crate::Reg; +#[doc = "TWI TXD byte sent"] +pub mod events_txdsent; +#[doc = "EVENTS_ERROR (rw) register accessor: an alias for `Reg`"] +pub type EVENTS_ERROR = crate::Reg; +#[doc = "TWI error"] +pub mod events_error; +#[doc = "EVENTS_BB (rw) register accessor: an alias for `Reg`"] +pub type EVENTS_BB = crate::Reg; +#[doc = "TWI byte boundary, generated before each byte that is sent or received"] +pub mod events_bb; +#[doc = "EVENTS_SUSPENDED (rw) register accessor: an alias for `Reg`"] +pub type EVENTS_SUSPENDED = crate::Reg; +#[doc = "TWI entered the suspended state"] +pub mod events_suspended; +#[doc = "SHORTS (rw) register accessor: an alias for `Reg`"] +pub type SHORTS = crate::Reg; +#[doc = "Shortcuts between local events and tasks"] +pub mod shorts; +#[doc = "INTENSET (rw) register accessor: an alias for `Reg`"] +pub type INTENSET = crate::Reg; +#[doc = "Enable interrupt"] +pub mod intenset; +#[doc = "INTENCLR (rw) register accessor: an alias for `Reg`"] +pub type INTENCLR = crate::Reg; +#[doc = "Disable interrupt"] +pub mod intenclr; +#[doc = "ERRORSRC (rw) register accessor: an alias for `Reg`"] +pub type ERRORSRC = crate::Reg; +#[doc = "Error source"] +pub mod errorsrc; +#[doc = "ENABLE (rw) register accessor: an alias for `Reg`"] +pub type ENABLE = crate::Reg; +#[doc = "Enable TWI"] +pub mod enable; +#[doc = "PSELSCL (rw) register accessor: an alias for `Reg`"] +pub type PSELSCL = crate::Reg; +#[doc = "Pin select for SCL"] +pub mod pselscl; +#[doc = "PSELSDA (rw) register accessor: an alias for `Reg`"] +pub type PSELSDA = crate::Reg; +#[doc = "Pin select for SDA"] +pub mod pselsda; +#[doc = "RXD (r) register accessor: an alias for `Reg`"] +pub type RXD = crate::Reg; +#[doc = "RXD register"] +pub mod rxd; +#[doc = "TXD (rw) register accessor: an alias for `Reg`"] +pub type TXD = crate::Reg; +#[doc = "TXD register"] +pub mod txd; +#[doc = "FREQUENCY (rw) register accessor: an alias for `Reg`"] +pub type FREQUENCY = crate::Reg; +#[doc = "TWI frequency"] +pub mod frequency; +#[doc = "ADDRESS (rw) register accessor: an alias for `Reg`"] +pub type ADDRESS = crate::Reg; +#[doc = "Address used in the TWI transfer"] +pub mod address; diff --git a/down-the-stack/dk_pac/src/twi0/address.rs b/down-the-stack/dk_pac/src/twi0/address.rs new file mode 100644 index 0000000..67780ec --- /dev/null +++ b/down-the-stack/dk_pac/src/twi0/address.rs @@ -0,0 +1,80 @@ +#[doc = "Register `ADDRESS` 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 `ADDRESS` 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 `ADDRESS` reader - Address used in the TWI transfer"] +pub type ADDRESS_R = crate::FieldReader; +#[doc = "Field `ADDRESS` writer - Address used in the TWI transfer"] +pub type ADDRESS_W<'a, const O: u8> = crate::FieldWriter<'a, u32, ADDRESS_SPEC, u8, u8, 7, O>; +impl R { + #[doc = "Bits 0:6 - Address used in the TWI transfer"] + #[inline(always)] + pub fn address(&self) -> ADDRESS_R { + ADDRESS_R::new((self.bits & 0x7f) as u8) + } +} +impl W { + #[doc = "Bits 0:6 - Address used in the TWI transfer"] + #[inline(always)] + #[must_use] + pub fn address(&mut self) -> ADDRESS_W<0> { + ADDRESS_W::new(self) + } + #[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 = "Address used in the TWI transfer\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 [address](index.html) module"] +pub struct ADDRESS_SPEC; +impl crate::RegisterSpec for ADDRESS_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [address::R](R) reader structure"] +impl crate::Readable for ADDRESS_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [address::W](W) writer structure"] +impl crate::Writable for ADDRESS_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets ADDRESS to value 0"] +impl crate::Resettable for ADDRESS_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/twi0/enable.rs b/down-the-stack/dk_pac/src/twi0/enable.rs new file mode 100644 index 0000000..018a158 --- /dev/null +++ b/down-the-stack/dk_pac/src/twi0/enable.rs @@ -0,0 +1,128 @@ +#[doc = "Register `ENABLE` 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 `ENABLE` 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 `ENABLE` reader - Enable or disable TWI"] +pub type ENABLE_R = crate::FieldReader; +#[doc = "Enable or disable TWI\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +#[repr(u8)] +pub enum ENABLE_A { + #[doc = "0: Disable TWI"] + DISABLED = 0, + #[doc = "5: Enable TWI"] + ENABLED = 5, +} +impl From for u8 { + #[inline(always)] + fn from(variant: ENABLE_A) -> Self { + variant as _ + } +} +impl ENABLE_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> Option { + match self.bits { + 0 => Some(ENABLE_A::DISABLED), + 5 => Some(ENABLE_A::ENABLED), + _ => None, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == ENABLE_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == ENABLE_A::ENABLED + } +} +#[doc = "Field `ENABLE` writer - Enable or disable TWI"] +pub type ENABLE_W<'a, const O: u8> = crate::FieldWriter<'a, u32, ENABLE_SPEC, u8, ENABLE_A, 4, O>; +impl<'a, const O: u8> ENABLE_W<'a, O> { + #[doc = "Disable TWI"] + #[inline(always)] + pub fn disabled(self) -> &'a mut W { + self.variant(ENABLE_A::DISABLED) + } + #[doc = "Enable TWI"] + #[inline(always)] + pub fn enabled(self) -> &'a mut W { + self.variant(ENABLE_A::ENABLED) + } +} +impl R { + #[doc = "Bits 0:3 - Enable or disable TWI"] + #[inline(always)] + pub fn enable(&self) -> ENABLE_R { + ENABLE_R::new((self.bits & 0x0f) as u8) + } +} +impl W { + #[doc = "Bits 0:3 - Enable or disable TWI"] + #[inline(always)] + #[must_use] + pub fn enable(&mut self) -> ENABLE_W<0> { + 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 + } +} +#[doc = "Enable TWI\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 [enable](index.html) module"] +pub struct ENABLE_SPEC; +impl crate::RegisterSpec for ENABLE_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [enable::R](R) reader structure"] +impl crate::Readable for ENABLE_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [enable::W](W) writer structure"] +impl crate::Writable for ENABLE_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets ENABLE to value 0"] +impl crate::Resettable for ENABLE_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/twi0/errorsrc.rs b/down-the-stack/dk_pac/src/twi0/errorsrc.rs new file mode 100644 index 0000000..30cf388 --- /dev/null +++ b/down-the-stack/dk_pac/src/twi0/errorsrc.rs @@ -0,0 +1,269 @@ +#[doc = "Register `ERRORSRC` 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 `ERRORSRC` 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 `OVERRUN` reader - Overrun error"] +pub type OVERRUN_R = crate::BitReader; +#[doc = "Overrun error\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum OVERRUN_A { + #[doc = "0: Read: no overrun occured"] + NOT_PRESENT = 0, + #[doc = "1: Read: overrun occured"] + PRESENT = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: OVERRUN_A) -> Self { + variant as u8 != 0 + } +} +impl OVERRUN_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> OVERRUN_A { + match self.bits { + false => OVERRUN_A::NOT_PRESENT, + true => OVERRUN_A::PRESENT, + } + } + #[doc = "Checks if the value of the field is `NOT_PRESENT`"] + #[inline(always)] + pub fn is_not_present(&self) -> bool { + *self == OVERRUN_A::NOT_PRESENT + } + #[doc = "Checks if the value of the field is `PRESENT`"] + #[inline(always)] + pub fn is_present(&self) -> bool { + *self == OVERRUN_A::PRESENT + } +} +#[doc = "Overrun error\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum OVERRUN_AW { + #[doc = "1: Write: clear error on writing '1'"] + CLEAR = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: OVERRUN_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `OVERRUN` writer - Overrun error"] +pub type OVERRUN_W<'a, const O: u8> = crate::BitWriter1C<'a, u32, ERRORSRC_SPEC, OVERRUN_AW, O>; +impl<'a, const O: u8> OVERRUN_W<'a, O> { + #[doc = "Write: clear error on writing '1'"] + #[inline(always)] + pub fn clear(self) -> &'a mut W { + self.variant(OVERRUN_AW::CLEAR) + } +} +#[doc = "Field `ANACK` reader - NACK received after sending the address (write '1' to clear)"] +pub type ANACK_R = crate::BitReader; +#[doc = "NACK received after sending the address (write '1' to clear)\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum ANACK_A { + #[doc = "0: Read: error not present"] + NOT_PRESENT = 0, + #[doc = "1: Read: error present"] + PRESENT = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: ANACK_A) -> Self { + variant as u8 != 0 + } +} +impl ANACK_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> ANACK_A { + match self.bits { + false => ANACK_A::NOT_PRESENT, + true => ANACK_A::PRESENT, + } + } + #[doc = "Checks if the value of the field is `NOT_PRESENT`"] + #[inline(always)] + pub fn is_not_present(&self) -> bool { + *self == ANACK_A::NOT_PRESENT + } + #[doc = "Checks if the value of the field is `PRESENT`"] + #[inline(always)] + pub fn is_present(&self) -> bool { + *self == ANACK_A::PRESENT + } +} +#[doc = "NACK received after sending the address (write '1' to clear)\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum ANACK_AW { + #[doc = "1: Write: clear error on writing '1'"] + CLEAR = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: ANACK_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `ANACK` writer - NACK received after sending the address (write '1' to clear)"] +pub type ANACK_W<'a, const O: u8> = crate::BitWriter1C<'a, u32, ERRORSRC_SPEC, ANACK_AW, O>; +impl<'a, const O: u8> ANACK_W<'a, O> { + #[doc = "Write: clear error on writing '1'"] + #[inline(always)] + pub fn clear(self) -> &'a mut W { + self.variant(ANACK_AW::CLEAR) + } +} +#[doc = "Field `DNACK` reader - NACK received after sending a data byte (write '1' to clear)"] +pub type DNACK_R = crate::BitReader; +#[doc = "NACK received after sending a data byte (write '1' to clear)\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum DNACK_A { + #[doc = "0: Read: error not present"] + NOT_PRESENT = 0, + #[doc = "1: Read: error present"] + PRESENT = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: DNACK_A) -> Self { + variant as u8 != 0 + } +} +impl DNACK_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> DNACK_A { + match self.bits { + false => DNACK_A::NOT_PRESENT, + true => DNACK_A::PRESENT, + } + } + #[doc = "Checks if the value of the field is `NOT_PRESENT`"] + #[inline(always)] + pub fn is_not_present(&self) -> bool { + *self == DNACK_A::NOT_PRESENT + } + #[doc = "Checks if the value of the field is `PRESENT`"] + #[inline(always)] + pub fn is_present(&self) -> bool { + *self == DNACK_A::PRESENT + } +} +#[doc = "NACK received after sending a data byte (write '1' to clear)\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum DNACK_AW { + #[doc = "1: Write: clear error on writing '1'"] + CLEAR = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: DNACK_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `DNACK` writer - NACK received after sending a data byte (write '1' to clear)"] +pub type DNACK_W<'a, const O: u8> = crate::BitWriter1C<'a, u32, ERRORSRC_SPEC, DNACK_AW, O>; +impl<'a, const O: u8> DNACK_W<'a, O> { + #[doc = "Write: clear error on writing '1'"] + #[inline(always)] + pub fn clear(self) -> &'a mut W { + self.variant(DNACK_AW::CLEAR) + } +} +impl R { + #[doc = "Bit 0 - Overrun error"] + #[inline(always)] + pub fn overrun(&self) -> OVERRUN_R { + OVERRUN_R::new((self.bits & 1) != 0) + } + #[doc = "Bit 1 - NACK received after sending the address (write '1' to clear)"] + #[inline(always)] + pub fn anack(&self) -> ANACK_R { + ANACK_R::new(((self.bits >> 1) & 1) != 0) + } + #[doc = "Bit 2 - NACK received after sending a data byte (write '1' to clear)"] + #[inline(always)] + pub fn dnack(&self) -> DNACK_R { + DNACK_R::new(((self.bits >> 2) & 1) != 0) + } +} +impl W { + #[doc = "Bit 0 - Overrun error"] + #[inline(always)] + #[must_use] + pub fn overrun(&mut self) -> OVERRUN_W<0> { + OVERRUN_W::new(self) + } + #[doc = "Bit 1 - NACK received after sending the address (write '1' to clear)"] + #[inline(always)] + #[must_use] + pub fn anack(&mut self) -> ANACK_W<1> { + ANACK_W::new(self) + } + #[doc = "Bit 2 - NACK received after sending a data byte (write '1' to clear)"] + #[inline(always)] + #[must_use] + pub fn dnack(&mut self) -> DNACK_W<2> { + DNACK_W::new(self) + } + #[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 = "Error source\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 [errorsrc](index.html) module"] +pub struct ERRORSRC_SPEC; +impl crate::RegisterSpec for ERRORSRC_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [errorsrc::R](R) reader structure"] +impl crate::Readable for ERRORSRC_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [errorsrc::W](W) writer structure"] +impl crate::Writable for ERRORSRC_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0x07; +} +#[doc = "`reset()` method sets ERRORSRC to value 0"] +impl crate::Resettable for ERRORSRC_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/twi0/events_bb.rs b/down-the-stack/dk_pac/src/twi0/events_bb.rs new file mode 100644 index 0000000..a470a52 --- /dev/null +++ b/down-the-stack/dk_pac/src/twi0/events_bb.rs @@ -0,0 +1,126 @@ +#[doc = "Register `EVENTS_BB` 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 `EVENTS_BB` 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 `EVENTS_BB` reader - TWI byte boundary, generated before each byte that is sent or received"] +pub type EVENTS_BB_R = crate::BitReader; +#[doc = "TWI byte boundary, generated before each byte that is sent or received\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum EVENTS_BB_A { + #[doc = "0: Event not generated"] + NOT_GENERATED = 0, + #[doc = "1: Event generated"] + GENERATED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: EVENTS_BB_A) -> Self { + variant as u8 != 0 + } +} +impl EVENTS_BB_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> EVENTS_BB_A { + match self.bits { + false => EVENTS_BB_A::NOT_GENERATED, + true => EVENTS_BB_A::GENERATED, + } + } + #[doc = "Checks if the value of the field is `NOT_GENERATED`"] + #[inline(always)] + pub fn is_not_generated(&self) -> bool { + *self == EVENTS_BB_A::NOT_GENERATED + } + #[doc = "Checks if the value of the field is `GENERATED`"] + #[inline(always)] + pub fn is_generated(&self) -> bool { + *self == EVENTS_BB_A::GENERATED + } +} +#[doc = "Field `EVENTS_BB` writer - TWI byte boundary, generated before each byte that is sent or received"] +pub type EVENTS_BB_W<'a, const O: u8> = crate::BitWriter<'a, u32, EVENTS_BB_SPEC, EVENTS_BB_A, O>; +impl<'a, const O: u8> EVENTS_BB_W<'a, O> { + #[doc = "Event not generated"] + #[inline(always)] + pub fn not_generated(self) -> &'a mut W { + self.variant(EVENTS_BB_A::NOT_GENERATED) + } + #[doc = "Event generated"] + #[inline(always)] + pub fn generated(self) -> &'a mut W { + self.variant(EVENTS_BB_A::GENERATED) + } +} +impl R { + #[doc = "Bit 0 - TWI byte boundary, generated before each byte that is sent or received"] + #[inline(always)] + pub fn events_bb(&self) -> EVENTS_BB_R { + EVENTS_BB_R::new((self.bits & 1) != 0) + } +} +impl W { + #[doc = "Bit 0 - TWI byte boundary, generated before each byte that is sent or received"] + #[inline(always)] + #[must_use] + pub fn events_bb(&mut self) -> EVENTS_BB_W<0> { + EVENTS_BB_W::new(self) + } + #[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 = "TWI byte boundary, generated before each byte that is sent or received\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 [events_bb](index.html) module"] +pub struct EVENTS_BB_SPEC; +impl crate::RegisterSpec for EVENTS_BB_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [events_bb::R](R) reader structure"] +impl crate::Readable for EVENTS_BB_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [events_bb::W](W) writer structure"] +impl crate::Writable for EVENTS_BB_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets EVENTS_BB to value 0"] +impl crate::Resettable for EVENTS_BB_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/twi0/events_error.rs b/down-the-stack/dk_pac/src/twi0/events_error.rs new file mode 100644 index 0000000..05b214c --- /dev/null +++ b/down-the-stack/dk_pac/src/twi0/events_error.rs @@ -0,0 +1,127 @@ +#[doc = "Register `EVENTS_ERROR` 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 `EVENTS_ERROR` 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 `EVENTS_ERROR` reader - TWI error"] +pub type EVENTS_ERROR_R = crate::BitReader; +#[doc = "TWI error\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum EVENTS_ERROR_A { + #[doc = "0: Event not generated"] + NOT_GENERATED = 0, + #[doc = "1: Event generated"] + GENERATED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: EVENTS_ERROR_A) -> Self { + variant as u8 != 0 + } +} +impl EVENTS_ERROR_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> EVENTS_ERROR_A { + match self.bits { + false => EVENTS_ERROR_A::NOT_GENERATED, + true => EVENTS_ERROR_A::GENERATED, + } + } + #[doc = "Checks if the value of the field is `NOT_GENERATED`"] + #[inline(always)] + pub fn is_not_generated(&self) -> bool { + *self == EVENTS_ERROR_A::NOT_GENERATED + } + #[doc = "Checks if the value of the field is `GENERATED`"] + #[inline(always)] + pub fn is_generated(&self) -> bool { + *self == EVENTS_ERROR_A::GENERATED + } +} +#[doc = "Field `EVENTS_ERROR` writer - TWI error"] +pub type EVENTS_ERROR_W<'a, const O: u8> = + crate::BitWriter<'a, u32, EVENTS_ERROR_SPEC, EVENTS_ERROR_A, O>; +impl<'a, const O: u8> EVENTS_ERROR_W<'a, O> { + #[doc = "Event not generated"] + #[inline(always)] + pub fn not_generated(self) -> &'a mut W { + self.variant(EVENTS_ERROR_A::NOT_GENERATED) + } + #[doc = "Event generated"] + #[inline(always)] + pub fn generated(self) -> &'a mut W { + self.variant(EVENTS_ERROR_A::GENERATED) + } +} +impl R { + #[doc = "Bit 0 - TWI error"] + #[inline(always)] + pub fn events_error(&self) -> EVENTS_ERROR_R { + EVENTS_ERROR_R::new((self.bits & 1) != 0) + } +} +impl W { + #[doc = "Bit 0 - TWI error"] + #[inline(always)] + #[must_use] + pub fn events_error(&mut self) -> EVENTS_ERROR_W<0> { + EVENTS_ERROR_W::new(self) + } + #[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 = "TWI error\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 [events_error](index.html) module"] +pub struct EVENTS_ERROR_SPEC; +impl crate::RegisterSpec for EVENTS_ERROR_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [events_error::R](R) reader structure"] +impl crate::Readable for EVENTS_ERROR_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [events_error::W](W) writer structure"] +impl crate::Writable for EVENTS_ERROR_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets EVENTS_ERROR to value 0"] +impl crate::Resettable for EVENTS_ERROR_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/twi0/events_rxdready.rs b/down-the-stack/dk_pac/src/twi0/events_rxdready.rs new file mode 100644 index 0000000..807e9d4 --- /dev/null +++ b/down-the-stack/dk_pac/src/twi0/events_rxdready.rs @@ -0,0 +1,127 @@ +#[doc = "Register `EVENTS_RXDREADY` 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 `EVENTS_RXDREADY` 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 `EVENTS_RXDREADY` reader - TWI RXD byte received"] +pub type EVENTS_RXDREADY_R = crate::BitReader; +#[doc = "TWI RXD byte received\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum EVENTS_RXDREADY_A { + #[doc = "0: Event not generated"] + NOT_GENERATED = 0, + #[doc = "1: Event generated"] + GENERATED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: EVENTS_RXDREADY_A) -> Self { + variant as u8 != 0 + } +} +impl EVENTS_RXDREADY_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> EVENTS_RXDREADY_A { + match self.bits { + false => EVENTS_RXDREADY_A::NOT_GENERATED, + true => EVENTS_RXDREADY_A::GENERATED, + } + } + #[doc = "Checks if the value of the field is `NOT_GENERATED`"] + #[inline(always)] + pub fn is_not_generated(&self) -> bool { + *self == EVENTS_RXDREADY_A::NOT_GENERATED + } + #[doc = "Checks if the value of the field is `GENERATED`"] + #[inline(always)] + pub fn is_generated(&self) -> bool { + *self == EVENTS_RXDREADY_A::GENERATED + } +} +#[doc = "Field `EVENTS_RXDREADY` writer - TWI RXD byte received"] +pub type EVENTS_RXDREADY_W<'a, const O: u8> = + crate::BitWriter<'a, u32, EVENTS_RXDREADY_SPEC, EVENTS_RXDREADY_A, O>; +impl<'a, const O: u8> EVENTS_RXDREADY_W<'a, O> { + #[doc = "Event not generated"] + #[inline(always)] + pub fn not_generated(self) -> &'a mut W { + self.variant(EVENTS_RXDREADY_A::NOT_GENERATED) + } + #[doc = "Event generated"] + #[inline(always)] + pub fn generated(self) -> &'a mut W { + self.variant(EVENTS_RXDREADY_A::GENERATED) + } +} +impl R { + #[doc = "Bit 0 - TWI RXD byte received"] + #[inline(always)] + pub fn events_rxdready(&self) -> EVENTS_RXDREADY_R { + EVENTS_RXDREADY_R::new((self.bits & 1) != 0) + } +} +impl W { + #[doc = "Bit 0 - TWI RXD byte received"] + #[inline(always)] + #[must_use] + pub fn events_rxdready(&mut self) -> EVENTS_RXDREADY_W<0> { + EVENTS_RXDREADY_W::new(self) + } + #[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 = "TWI RXD byte received\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 [events_rxdready](index.html) module"] +pub struct EVENTS_RXDREADY_SPEC; +impl crate::RegisterSpec for EVENTS_RXDREADY_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [events_rxdready::R](R) reader structure"] +impl crate::Readable for EVENTS_RXDREADY_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [events_rxdready::W](W) writer structure"] +impl crate::Writable for EVENTS_RXDREADY_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets EVENTS_RXDREADY to value 0"] +impl crate::Resettable for EVENTS_RXDREADY_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/twi0/events_stopped.rs b/down-the-stack/dk_pac/src/twi0/events_stopped.rs new file mode 100644 index 0000000..4663646 --- /dev/null +++ b/down-the-stack/dk_pac/src/twi0/events_stopped.rs @@ -0,0 +1,127 @@ +#[doc = "Register `EVENTS_STOPPED` 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 `EVENTS_STOPPED` 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 `EVENTS_STOPPED` reader - TWI stopped"] +pub type EVENTS_STOPPED_R = crate::BitReader; +#[doc = "TWI stopped\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum EVENTS_STOPPED_A { + #[doc = "0: Event not generated"] + NOT_GENERATED = 0, + #[doc = "1: Event generated"] + GENERATED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: EVENTS_STOPPED_A) -> Self { + variant as u8 != 0 + } +} +impl EVENTS_STOPPED_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> EVENTS_STOPPED_A { + match self.bits { + false => EVENTS_STOPPED_A::NOT_GENERATED, + true => EVENTS_STOPPED_A::GENERATED, + } + } + #[doc = "Checks if the value of the field is `NOT_GENERATED`"] + #[inline(always)] + pub fn is_not_generated(&self) -> bool { + *self == EVENTS_STOPPED_A::NOT_GENERATED + } + #[doc = "Checks if the value of the field is `GENERATED`"] + #[inline(always)] + pub fn is_generated(&self) -> bool { + *self == EVENTS_STOPPED_A::GENERATED + } +} +#[doc = "Field `EVENTS_STOPPED` writer - TWI stopped"] +pub type EVENTS_STOPPED_W<'a, const O: u8> = + crate::BitWriter<'a, u32, EVENTS_STOPPED_SPEC, EVENTS_STOPPED_A, O>; +impl<'a, const O: u8> EVENTS_STOPPED_W<'a, O> { + #[doc = "Event not generated"] + #[inline(always)] + pub fn not_generated(self) -> &'a mut W { + self.variant(EVENTS_STOPPED_A::NOT_GENERATED) + } + #[doc = "Event generated"] + #[inline(always)] + pub fn generated(self) -> &'a mut W { + self.variant(EVENTS_STOPPED_A::GENERATED) + } +} +impl R { + #[doc = "Bit 0 - TWI stopped"] + #[inline(always)] + pub fn events_stopped(&self) -> EVENTS_STOPPED_R { + EVENTS_STOPPED_R::new((self.bits & 1) != 0) + } +} +impl W { + #[doc = "Bit 0 - TWI stopped"] + #[inline(always)] + #[must_use] + pub fn events_stopped(&mut self) -> EVENTS_STOPPED_W<0> { + EVENTS_STOPPED_W::new(self) + } + #[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 = "TWI stopped\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 [events_stopped](index.html) module"] +pub struct EVENTS_STOPPED_SPEC; +impl crate::RegisterSpec for EVENTS_STOPPED_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [events_stopped::R](R) reader structure"] +impl crate::Readable for EVENTS_STOPPED_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [events_stopped::W](W) writer structure"] +impl crate::Writable for EVENTS_STOPPED_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets EVENTS_STOPPED to value 0"] +impl crate::Resettable for EVENTS_STOPPED_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/twi0/events_suspended.rs b/down-the-stack/dk_pac/src/twi0/events_suspended.rs new file mode 100644 index 0000000..9118d91 --- /dev/null +++ b/down-the-stack/dk_pac/src/twi0/events_suspended.rs @@ -0,0 +1,127 @@ +#[doc = "Register `EVENTS_SUSPENDED` 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 `EVENTS_SUSPENDED` 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 `EVENTS_SUSPENDED` reader - TWI entered the suspended state"] +pub type EVENTS_SUSPENDED_R = crate::BitReader; +#[doc = "TWI entered the suspended state\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum EVENTS_SUSPENDED_A { + #[doc = "0: Event not generated"] + NOT_GENERATED = 0, + #[doc = "1: Event generated"] + GENERATED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: EVENTS_SUSPENDED_A) -> Self { + variant as u8 != 0 + } +} +impl EVENTS_SUSPENDED_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> EVENTS_SUSPENDED_A { + match self.bits { + false => EVENTS_SUSPENDED_A::NOT_GENERATED, + true => EVENTS_SUSPENDED_A::GENERATED, + } + } + #[doc = "Checks if the value of the field is `NOT_GENERATED`"] + #[inline(always)] + pub fn is_not_generated(&self) -> bool { + *self == EVENTS_SUSPENDED_A::NOT_GENERATED + } + #[doc = "Checks if the value of the field is `GENERATED`"] + #[inline(always)] + pub fn is_generated(&self) -> bool { + *self == EVENTS_SUSPENDED_A::GENERATED + } +} +#[doc = "Field `EVENTS_SUSPENDED` writer - TWI entered the suspended state"] +pub type EVENTS_SUSPENDED_W<'a, const O: u8> = + crate::BitWriter<'a, u32, EVENTS_SUSPENDED_SPEC, EVENTS_SUSPENDED_A, O>; +impl<'a, const O: u8> EVENTS_SUSPENDED_W<'a, O> { + #[doc = "Event not generated"] + #[inline(always)] + pub fn not_generated(self) -> &'a mut W { + self.variant(EVENTS_SUSPENDED_A::NOT_GENERATED) + } + #[doc = "Event generated"] + #[inline(always)] + pub fn generated(self) -> &'a mut W { + self.variant(EVENTS_SUSPENDED_A::GENERATED) + } +} +impl R { + #[doc = "Bit 0 - TWI entered the suspended state"] + #[inline(always)] + pub fn events_suspended(&self) -> EVENTS_SUSPENDED_R { + EVENTS_SUSPENDED_R::new((self.bits & 1) != 0) + } +} +impl W { + #[doc = "Bit 0 - TWI entered the suspended state"] + #[inline(always)] + #[must_use] + pub fn events_suspended(&mut self) -> EVENTS_SUSPENDED_W<0> { + EVENTS_SUSPENDED_W::new(self) + } + #[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 = "TWI entered the suspended state\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 [events_suspended](index.html) module"] +pub struct EVENTS_SUSPENDED_SPEC; +impl crate::RegisterSpec for EVENTS_SUSPENDED_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [events_suspended::R](R) reader structure"] +impl crate::Readable for EVENTS_SUSPENDED_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [events_suspended::W](W) writer structure"] +impl crate::Writable for EVENTS_SUSPENDED_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets EVENTS_SUSPENDED to value 0"] +impl crate::Resettable for EVENTS_SUSPENDED_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/twi0/events_txdsent.rs b/down-the-stack/dk_pac/src/twi0/events_txdsent.rs new file mode 100644 index 0000000..6341bc8 --- /dev/null +++ b/down-the-stack/dk_pac/src/twi0/events_txdsent.rs @@ -0,0 +1,127 @@ +#[doc = "Register `EVENTS_TXDSENT` 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 `EVENTS_TXDSENT` 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 `EVENTS_TXDSENT` reader - TWI TXD byte sent"] +pub type EVENTS_TXDSENT_R = crate::BitReader; +#[doc = "TWI TXD byte sent\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum EVENTS_TXDSENT_A { + #[doc = "0: Event not generated"] + NOT_GENERATED = 0, + #[doc = "1: Event generated"] + GENERATED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: EVENTS_TXDSENT_A) -> Self { + variant as u8 != 0 + } +} +impl EVENTS_TXDSENT_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> EVENTS_TXDSENT_A { + match self.bits { + false => EVENTS_TXDSENT_A::NOT_GENERATED, + true => EVENTS_TXDSENT_A::GENERATED, + } + } + #[doc = "Checks if the value of the field is `NOT_GENERATED`"] + #[inline(always)] + pub fn is_not_generated(&self) -> bool { + *self == EVENTS_TXDSENT_A::NOT_GENERATED + } + #[doc = "Checks if the value of the field is `GENERATED`"] + #[inline(always)] + pub fn is_generated(&self) -> bool { + *self == EVENTS_TXDSENT_A::GENERATED + } +} +#[doc = "Field `EVENTS_TXDSENT` writer - TWI TXD byte sent"] +pub type EVENTS_TXDSENT_W<'a, const O: u8> = + crate::BitWriter<'a, u32, EVENTS_TXDSENT_SPEC, EVENTS_TXDSENT_A, O>; +impl<'a, const O: u8> EVENTS_TXDSENT_W<'a, O> { + #[doc = "Event not generated"] + #[inline(always)] + pub fn not_generated(self) -> &'a mut W { + self.variant(EVENTS_TXDSENT_A::NOT_GENERATED) + } + #[doc = "Event generated"] + #[inline(always)] + pub fn generated(self) -> &'a mut W { + self.variant(EVENTS_TXDSENT_A::GENERATED) + } +} +impl R { + #[doc = "Bit 0 - TWI TXD byte sent"] + #[inline(always)] + pub fn events_txdsent(&self) -> EVENTS_TXDSENT_R { + EVENTS_TXDSENT_R::new((self.bits & 1) != 0) + } +} +impl W { + #[doc = "Bit 0 - TWI TXD byte sent"] + #[inline(always)] + #[must_use] + pub fn events_txdsent(&mut self) -> EVENTS_TXDSENT_W<0> { + EVENTS_TXDSENT_W::new(self) + } + #[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 = "TWI TXD byte sent\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 [events_txdsent](index.html) module"] +pub struct EVENTS_TXDSENT_SPEC; +impl crate::RegisterSpec for EVENTS_TXDSENT_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [events_txdsent::R](R) reader structure"] +impl crate::Readable for EVENTS_TXDSENT_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [events_txdsent::W](W) writer structure"] +impl crate::Writable for EVENTS_TXDSENT_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets EVENTS_TXDSENT to value 0"] +impl crate::Resettable for EVENTS_TXDSENT_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/twi0/frequency.rs b/down-the-stack/dk_pac/src/twi0/frequency.rs new file mode 100644 index 0000000..e1a368e --- /dev/null +++ b/down-the-stack/dk_pac/src/twi0/frequency.rs @@ -0,0 +1,142 @@ +#[doc = "Register `FREQUENCY` 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 `FREQUENCY` 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 `FREQUENCY` reader - TWI master clock frequency"] +pub type FREQUENCY_R = crate::FieldReader; +#[doc = "TWI master clock frequency\n\nValue on reset: 67108864"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +#[repr(u32)] +pub enum FREQUENCY_A { + #[doc = "26738688: 100 kbps"] + K100 = 26738688, + #[doc = "67108864: 250 kbps"] + K250 = 67108864, + #[doc = "107479040: 400 kbps (actual rate 410.256 kbps)"] + K400 = 107479040, +} +impl From for u32 { + #[inline(always)] + fn from(variant: FREQUENCY_A) -> Self { + variant as _ + } +} +impl FREQUENCY_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> Option { + match self.bits { + 26738688 => Some(FREQUENCY_A::K100), + 67108864 => Some(FREQUENCY_A::K250), + 107479040 => Some(FREQUENCY_A::K400), + _ => None, + } + } + #[doc = "Checks if the value of the field is `K100`"] + #[inline(always)] + pub fn is_k100(&self) -> bool { + *self == FREQUENCY_A::K100 + } + #[doc = "Checks if the value of the field is `K250`"] + #[inline(always)] + pub fn is_k250(&self) -> bool { + *self == FREQUENCY_A::K250 + } + #[doc = "Checks if the value of the field is `K400`"] + #[inline(always)] + pub fn is_k400(&self) -> bool { + *self == FREQUENCY_A::K400 + } +} +#[doc = "Field `FREQUENCY` writer - TWI master clock frequency"] +pub type FREQUENCY_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, FREQUENCY_SPEC, u32, FREQUENCY_A, 32, O>; +impl<'a, const O: u8> FREQUENCY_W<'a, O> { + #[doc = "100 kbps"] + #[inline(always)] + pub fn k100(self) -> &'a mut W { + self.variant(FREQUENCY_A::K100) + } + #[doc = "250 kbps"] + #[inline(always)] + pub fn k250(self) -> &'a mut W { + self.variant(FREQUENCY_A::K250) + } + #[doc = "400 kbps (actual rate 410.256 kbps)"] + #[inline(always)] + pub fn k400(self) -> &'a mut W { + self.variant(FREQUENCY_A::K400) + } +} +impl R { + #[doc = "Bits 0:31 - TWI master clock frequency"] + #[inline(always)] + pub fn frequency(&self) -> FREQUENCY_R { + FREQUENCY_R::new(self.bits) + } +} +impl W { + #[doc = "Bits 0:31 - TWI master clock frequency"] + #[inline(always)] + #[must_use] + pub fn frequency(&mut self) -> FREQUENCY_W<0> { + FREQUENCY_W::new(self) + } + #[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 = "TWI frequency\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 [frequency](index.html) module"] +pub struct FREQUENCY_SPEC; +impl crate::RegisterSpec for FREQUENCY_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [frequency::R](R) reader structure"] +impl crate::Readable for FREQUENCY_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [frequency::W](W) writer structure"] +impl crate::Writable for FREQUENCY_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets FREQUENCY to value 0x0400_0000"] +impl crate::Resettable for FREQUENCY_SPEC { + const RESET_VALUE: Self::Ux = 0x0400_0000; +} diff --git a/down-the-stack/dk_pac/src/twi0/intenclr.rs b/down-the-stack/dk_pac/src/twi0/intenclr.rs new file mode 100644 index 0000000..a99d52f --- /dev/null +++ b/down-the-stack/dk_pac/src/twi0/intenclr.rs @@ -0,0 +1,473 @@ +#[doc = "Register `INTENCLR` 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 `INTENCLR` 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 `STOPPED` reader - Write '1' to disable interrupt for event STOPPED"] +pub type STOPPED_R = crate::BitReader; +#[doc = "Write '1' to disable interrupt for event STOPPED\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum STOPPED_A { + #[doc = "0: Read: Disabled"] + DISABLED = 0, + #[doc = "1: Read: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: STOPPED_A) -> Self { + variant as u8 != 0 + } +} +impl STOPPED_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> STOPPED_A { + match self.bits { + false => STOPPED_A::DISABLED, + true => STOPPED_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == STOPPED_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == STOPPED_A::ENABLED + } +} +#[doc = "Write '1' to disable interrupt for event STOPPED\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum STOPPED_AW { + #[doc = "1: Disable"] + CLEAR = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: STOPPED_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `STOPPED` writer - Write '1' to disable interrupt for event STOPPED"] +pub type STOPPED_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENCLR_SPEC, STOPPED_AW, O>; +impl<'a, const O: u8> STOPPED_W<'a, O> { + #[doc = "Disable"] + #[inline(always)] + pub fn clear(self) -> &'a mut W { + self.variant(STOPPED_AW::CLEAR) + } +} +#[doc = "Field `RXDREADY` reader - Write '1' to disable interrupt for event RXDREADY"] +pub type RXDREADY_R = crate::BitReader; +#[doc = "Write '1' to disable interrupt for event RXDREADY\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum RXDREADY_A { + #[doc = "0: Read: Disabled"] + DISABLED = 0, + #[doc = "1: Read: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: RXDREADY_A) -> Self { + variant as u8 != 0 + } +} +impl RXDREADY_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> RXDREADY_A { + match self.bits { + false => RXDREADY_A::DISABLED, + true => RXDREADY_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == RXDREADY_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == RXDREADY_A::ENABLED + } +} +#[doc = "Write '1' to disable interrupt for event RXDREADY\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum RXDREADY_AW { + #[doc = "1: Disable"] + CLEAR = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: RXDREADY_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `RXDREADY` writer - Write '1' to disable interrupt for event RXDREADY"] +pub type RXDREADY_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENCLR_SPEC, RXDREADY_AW, O>; +impl<'a, const O: u8> RXDREADY_W<'a, O> { + #[doc = "Disable"] + #[inline(always)] + pub fn clear(self) -> &'a mut W { + self.variant(RXDREADY_AW::CLEAR) + } +} +#[doc = "Field `TXDSENT` reader - Write '1' to disable interrupt for event TXDSENT"] +pub type TXDSENT_R = crate::BitReader; +#[doc = "Write '1' to disable interrupt for event TXDSENT\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum TXDSENT_A { + #[doc = "0: Read: Disabled"] + DISABLED = 0, + #[doc = "1: Read: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: TXDSENT_A) -> Self { + variant as u8 != 0 + } +} +impl TXDSENT_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> TXDSENT_A { + match self.bits { + false => TXDSENT_A::DISABLED, + true => TXDSENT_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == TXDSENT_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == TXDSENT_A::ENABLED + } +} +#[doc = "Write '1' to disable interrupt for event TXDSENT\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum TXDSENT_AW { + #[doc = "1: Disable"] + CLEAR = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: TXDSENT_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `TXDSENT` writer - Write '1' to disable interrupt for event TXDSENT"] +pub type TXDSENT_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENCLR_SPEC, TXDSENT_AW, O>; +impl<'a, const O: u8> TXDSENT_W<'a, O> { + #[doc = "Disable"] + #[inline(always)] + pub fn clear(self) -> &'a mut W { + self.variant(TXDSENT_AW::CLEAR) + } +} +#[doc = "Field `ERROR` reader - Write '1' to disable interrupt for event ERROR"] +pub type ERROR_R = crate::BitReader; +#[doc = "Write '1' to disable interrupt for event ERROR\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum ERROR_A { + #[doc = "0: Read: Disabled"] + DISABLED = 0, + #[doc = "1: Read: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: ERROR_A) -> Self { + variant as u8 != 0 + } +} +impl ERROR_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> ERROR_A { + match self.bits { + false => ERROR_A::DISABLED, + true => ERROR_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == ERROR_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == ERROR_A::ENABLED + } +} +#[doc = "Write '1' to disable interrupt for event ERROR\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum ERROR_AW { + #[doc = "1: Disable"] + CLEAR = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: ERROR_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `ERROR` writer - Write '1' to disable interrupt for event ERROR"] +pub type ERROR_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENCLR_SPEC, ERROR_AW, O>; +impl<'a, const O: u8> ERROR_W<'a, O> { + #[doc = "Disable"] + #[inline(always)] + pub fn clear(self) -> &'a mut W { + self.variant(ERROR_AW::CLEAR) + } +} +#[doc = "Field `BB` reader - Write '1' to disable interrupt for event BB"] +pub type BB_R = crate::BitReader; +#[doc = "Write '1' to disable interrupt for event BB\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum BB_A { + #[doc = "0: Read: Disabled"] + DISABLED = 0, + #[doc = "1: Read: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: BB_A) -> Self { + variant as u8 != 0 + } +} +impl BB_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> BB_A { + match self.bits { + false => BB_A::DISABLED, + true => BB_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == BB_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == BB_A::ENABLED + } +} +#[doc = "Write '1' to disable interrupt for event BB\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum BB_AW { + #[doc = "1: Disable"] + CLEAR = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: BB_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `BB` writer - Write '1' to disable interrupt for event BB"] +pub type BB_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENCLR_SPEC, BB_AW, O>; +impl<'a, const O: u8> BB_W<'a, O> { + #[doc = "Disable"] + #[inline(always)] + pub fn clear(self) -> &'a mut W { + self.variant(BB_AW::CLEAR) + } +} +#[doc = "Field `SUSPENDED` reader - Write '1' to disable interrupt for event SUSPENDED"] +pub type SUSPENDED_R = crate::BitReader; +#[doc = "Write '1' to disable interrupt for event SUSPENDED\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum SUSPENDED_A { + #[doc = "0: Read: Disabled"] + DISABLED = 0, + #[doc = "1: Read: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: SUSPENDED_A) -> Self { + variant as u8 != 0 + } +} +impl SUSPENDED_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> SUSPENDED_A { + match self.bits { + false => SUSPENDED_A::DISABLED, + true => SUSPENDED_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == SUSPENDED_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == SUSPENDED_A::ENABLED + } +} +#[doc = "Write '1' to disable interrupt for event SUSPENDED\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum SUSPENDED_AW { + #[doc = "1: Disable"] + CLEAR = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: SUSPENDED_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `SUSPENDED` writer - Write '1' to disable interrupt for event SUSPENDED"] +pub type SUSPENDED_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENCLR_SPEC, SUSPENDED_AW, O>; +impl<'a, const O: u8> SUSPENDED_W<'a, O> { + #[doc = "Disable"] + #[inline(always)] + pub fn clear(self) -> &'a mut W { + self.variant(SUSPENDED_AW::CLEAR) + } +} +impl R { + #[doc = "Bit 1 - Write '1' to disable interrupt for event STOPPED"] + #[inline(always)] + pub fn stopped(&self) -> STOPPED_R { + STOPPED_R::new(((self.bits >> 1) & 1) != 0) + } + #[doc = "Bit 2 - Write '1' to disable interrupt for event RXDREADY"] + #[inline(always)] + pub fn rxdready(&self) -> RXDREADY_R { + RXDREADY_R::new(((self.bits >> 2) & 1) != 0) + } + #[doc = "Bit 7 - Write '1' to disable interrupt for event TXDSENT"] + #[inline(always)] + pub fn txdsent(&self) -> TXDSENT_R { + TXDSENT_R::new(((self.bits >> 7) & 1) != 0) + } + #[doc = "Bit 9 - Write '1' to disable interrupt for event ERROR"] + #[inline(always)] + pub fn error(&self) -> ERROR_R { + ERROR_R::new(((self.bits >> 9) & 1) != 0) + } + #[doc = "Bit 14 - Write '1' to disable interrupt for event BB"] + #[inline(always)] + pub fn bb(&self) -> BB_R { + BB_R::new(((self.bits >> 14) & 1) != 0) + } + #[doc = "Bit 18 - Write '1' to disable interrupt for event SUSPENDED"] + #[inline(always)] + pub fn suspended(&self) -> SUSPENDED_R { + SUSPENDED_R::new(((self.bits >> 18) & 1) != 0) + } +} +impl W { + #[doc = "Bit 1 - Write '1' to disable interrupt for event STOPPED"] + #[inline(always)] + #[must_use] + pub fn stopped(&mut self) -> STOPPED_W<1> { + STOPPED_W::new(self) + } + #[doc = "Bit 2 - Write '1' to disable interrupt for event RXDREADY"] + #[inline(always)] + #[must_use] + pub fn rxdready(&mut self) -> RXDREADY_W<2> { + RXDREADY_W::new(self) + } + #[doc = "Bit 7 - Write '1' to disable interrupt for event TXDSENT"] + #[inline(always)] + #[must_use] + pub fn txdsent(&mut self) -> TXDSENT_W<7> { + TXDSENT_W::new(self) + } + #[doc = "Bit 9 - Write '1' to disable interrupt for event ERROR"] + #[inline(always)] + #[must_use] + pub fn error(&mut self) -> ERROR_W<9> { + ERROR_W::new(self) + } + #[doc = "Bit 14 - Write '1' to disable interrupt for event BB"] + #[inline(always)] + #[must_use] + pub fn bb(&mut self) -> BB_W<14> { + BB_W::new(self) + } + #[doc = "Bit 18 - Write '1' to disable interrupt for event SUSPENDED"] + #[inline(always)] + #[must_use] + pub fn suspended(&mut self) -> SUSPENDED_W<18> { + SUSPENDED_W::new(self) + } + #[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 = "Disable interrupt\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 [intenclr](index.html) module"] +pub struct INTENCLR_SPEC; +impl crate::RegisterSpec for INTENCLR_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [intenclr::R](R) reader structure"] +impl crate::Readable for INTENCLR_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [intenclr::W](W) writer structure"] +impl crate::Writable for INTENCLR_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets INTENCLR to value 0"] +impl crate::Resettable for INTENCLR_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/twi0/intenset.rs b/down-the-stack/dk_pac/src/twi0/intenset.rs new file mode 100644 index 0000000..8624808 --- /dev/null +++ b/down-the-stack/dk_pac/src/twi0/intenset.rs @@ -0,0 +1,473 @@ +#[doc = "Register `INTENSET` 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 `INTENSET` 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 `STOPPED` reader - Write '1' to enable interrupt for event STOPPED"] +pub type STOPPED_R = crate::BitReader; +#[doc = "Write '1' to enable interrupt for event STOPPED\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum STOPPED_A { + #[doc = "0: Read: Disabled"] + DISABLED = 0, + #[doc = "1: Read: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: STOPPED_A) -> Self { + variant as u8 != 0 + } +} +impl STOPPED_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> STOPPED_A { + match self.bits { + false => STOPPED_A::DISABLED, + true => STOPPED_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == STOPPED_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == STOPPED_A::ENABLED + } +} +#[doc = "Write '1' to enable interrupt for event STOPPED\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum STOPPED_AW { + #[doc = "1: Enable"] + SET = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: STOPPED_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `STOPPED` writer - Write '1' to enable interrupt for event STOPPED"] +pub type STOPPED_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENSET_SPEC, STOPPED_AW, O>; +impl<'a, const O: u8> STOPPED_W<'a, O> { + #[doc = "Enable"] + #[inline(always)] + pub fn set(self) -> &'a mut W { + self.variant(STOPPED_AW::SET) + } +} +#[doc = "Field `RXDREADY` reader - Write '1' to enable interrupt for event RXDREADY"] +pub type RXDREADY_R = crate::BitReader; +#[doc = "Write '1' to enable interrupt for event RXDREADY\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum RXDREADY_A { + #[doc = "0: Read: Disabled"] + DISABLED = 0, + #[doc = "1: Read: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: RXDREADY_A) -> Self { + variant as u8 != 0 + } +} +impl RXDREADY_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> RXDREADY_A { + match self.bits { + false => RXDREADY_A::DISABLED, + true => RXDREADY_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == RXDREADY_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == RXDREADY_A::ENABLED + } +} +#[doc = "Write '1' to enable interrupt for event RXDREADY\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum RXDREADY_AW { + #[doc = "1: Enable"] + SET = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: RXDREADY_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `RXDREADY` writer - Write '1' to enable interrupt for event RXDREADY"] +pub type RXDREADY_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENSET_SPEC, RXDREADY_AW, O>; +impl<'a, const O: u8> RXDREADY_W<'a, O> { + #[doc = "Enable"] + #[inline(always)] + pub fn set(self) -> &'a mut W { + self.variant(RXDREADY_AW::SET) + } +} +#[doc = "Field `TXDSENT` reader - Write '1' to enable interrupt for event TXDSENT"] +pub type TXDSENT_R = crate::BitReader; +#[doc = "Write '1' to enable interrupt for event TXDSENT\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum TXDSENT_A { + #[doc = "0: Read: Disabled"] + DISABLED = 0, + #[doc = "1: Read: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: TXDSENT_A) -> Self { + variant as u8 != 0 + } +} +impl TXDSENT_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> TXDSENT_A { + match self.bits { + false => TXDSENT_A::DISABLED, + true => TXDSENT_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == TXDSENT_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == TXDSENT_A::ENABLED + } +} +#[doc = "Write '1' to enable interrupt for event TXDSENT\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum TXDSENT_AW { + #[doc = "1: Enable"] + SET = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: TXDSENT_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `TXDSENT` writer - Write '1' to enable interrupt for event TXDSENT"] +pub type TXDSENT_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENSET_SPEC, TXDSENT_AW, O>; +impl<'a, const O: u8> TXDSENT_W<'a, O> { + #[doc = "Enable"] + #[inline(always)] + pub fn set(self) -> &'a mut W { + self.variant(TXDSENT_AW::SET) + } +} +#[doc = "Field `ERROR` reader - Write '1' to enable interrupt for event ERROR"] +pub type ERROR_R = crate::BitReader; +#[doc = "Write '1' to enable interrupt for event ERROR\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum ERROR_A { + #[doc = "0: Read: Disabled"] + DISABLED = 0, + #[doc = "1: Read: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: ERROR_A) -> Self { + variant as u8 != 0 + } +} +impl ERROR_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> ERROR_A { + match self.bits { + false => ERROR_A::DISABLED, + true => ERROR_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == ERROR_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == ERROR_A::ENABLED + } +} +#[doc = "Write '1' to enable interrupt for event ERROR\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum ERROR_AW { + #[doc = "1: Enable"] + SET = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: ERROR_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `ERROR` writer - Write '1' to enable interrupt for event ERROR"] +pub type ERROR_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENSET_SPEC, ERROR_AW, O>; +impl<'a, const O: u8> ERROR_W<'a, O> { + #[doc = "Enable"] + #[inline(always)] + pub fn set(self) -> &'a mut W { + self.variant(ERROR_AW::SET) + } +} +#[doc = "Field `BB` reader - Write '1' to enable interrupt for event BB"] +pub type BB_R = crate::BitReader; +#[doc = "Write '1' to enable interrupt for event BB\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum BB_A { + #[doc = "0: Read: Disabled"] + DISABLED = 0, + #[doc = "1: Read: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: BB_A) -> Self { + variant as u8 != 0 + } +} +impl BB_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> BB_A { + match self.bits { + false => BB_A::DISABLED, + true => BB_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == BB_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == BB_A::ENABLED + } +} +#[doc = "Write '1' to enable interrupt for event BB\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum BB_AW { + #[doc = "1: Enable"] + SET = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: BB_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `BB` writer - Write '1' to enable interrupt for event BB"] +pub type BB_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENSET_SPEC, BB_AW, O>; +impl<'a, const O: u8> BB_W<'a, O> { + #[doc = "Enable"] + #[inline(always)] + pub fn set(self) -> &'a mut W { + self.variant(BB_AW::SET) + } +} +#[doc = "Field `SUSPENDED` reader - Write '1' to enable interrupt for event SUSPENDED"] +pub type SUSPENDED_R = crate::BitReader; +#[doc = "Write '1' to enable interrupt for event SUSPENDED\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum SUSPENDED_A { + #[doc = "0: Read: Disabled"] + DISABLED = 0, + #[doc = "1: Read: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: SUSPENDED_A) -> Self { + variant as u8 != 0 + } +} +impl SUSPENDED_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> SUSPENDED_A { + match self.bits { + false => SUSPENDED_A::DISABLED, + true => SUSPENDED_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == SUSPENDED_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == SUSPENDED_A::ENABLED + } +} +#[doc = "Write '1' to enable interrupt for event SUSPENDED\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum SUSPENDED_AW { + #[doc = "1: Enable"] + SET = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: SUSPENDED_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `SUSPENDED` writer - Write '1' to enable interrupt for event SUSPENDED"] +pub type SUSPENDED_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENSET_SPEC, SUSPENDED_AW, O>; +impl<'a, const O: u8> SUSPENDED_W<'a, O> { + #[doc = "Enable"] + #[inline(always)] + pub fn set(self) -> &'a mut W { + self.variant(SUSPENDED_AW::SET) + } +} +impl R { + #[doc = "Bit 1 - Write '1' to enable interrupt for event STOPPED"] + #[inline(always)] + pub fn stopped(&self) -> STOPPED_R { + STOPPED_R::new(((self.bits >> 1) & 1) != 0) + } + #[doc = "Bit 2 - Write '1' to enable interrupt for event RXDREADY"] + #[inline(always)] + pub fn rxdready(&self) -> RXDREADY_R { + RXDREADY_R::new(((self.bits >> 2) & 1) != 0) + } + #[doc = "Bit 7 - Write '1' to enable interrupt for event TXDSENT"] + #[inline(always)] + pub fn txdsent(&self) -> TXDSENT_R { + TXDSENT_R::new(((self.bits >> 7) & 1) != 0) + } + #[doc = "Bit 9 - Write '1' to enable interrupt for event ERROR"] + #[inline(always)] + pub fn error(&self) -> ERROR_R { + ERROR_R::new(((self.bits >> 9) & 1) != 0) + } + #[doc = "Bit 14 - Write '1' to enable interrupt for event BB"] + #[inline(always)] + pub fn bb(&self) -> BB_R { + BB_R::new(((self.bits >> 14) & 1) != 0) + } + #[doc = "Bit 18 - Write '1' to enable interrupt for event SUSPENDED"] + #[inline(always)] + pub fn suspended(&self) -> SUSPENDED_R { + SUSPENDED_R::new(((self.bits >> 18) & 1) != 0) + } +} +impl W { + #[doc = "Bit 1 - Write '1' to enable interrupt for event STOPPED"] + #[inline(always)] + #[must_use] + pub fn stopped(&mut self) -> STOPPED_W<1> { + STOPPED_W::new(self) + } + #[doc = "Bit 2 - Write '1' to enable interrupt for event RXDREADY"] + #[inline(always)] + #[must_use] + pub fn rxdready(&mut self) -> RXDREADY_W<2> { + RXDREADY_W::new(self) + } + #[doc = "Bit 7 - Write '1' to enable interrupt for event TXDSENT"] + #[inline(always)] + #[must_use] + pub fn txdsent(&mut self) -> TXDSENT_W<7> { + TXDSENT_W::new(self) + } + #[doc = "Bit 9 - Write '1' to enable interrupt for event ERROR"] + #[inline(always)] + #[must_use] + pub fn error(&mut self) -> ERROR_W<9> { + ERROR_W::new(self) + } + #[doc = "Bit 14 - Write '1' to enable interrupt for event BB"] + #[inline(always)] + #[must_use] + pub fn bb(&mut self) -> BB_W<14> { + BB_W::new(self) + } + #[doc = "Bit 18 - Write '1' to enable interrupt for event SUSPENDED"] + #[inline(always)] + #[must_use] + pub fn suspended(&mut self) -> SUSPENDED_W<18> { + SUSPENDED_W::new(self) + } + #[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 = "Enable interrupt\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 [intenset](index.html) module"] +pub struct INTENSET_SPEC; +impl crate::RegisterSpec for INTENSET_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [intenset::R](R) reader structure"] +impl crate::Readable for INTENSET_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [intenset::W](W) writer structure"] +impl crate::Writable for INTENSET_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets INTENSET to value 0"] +impl crate::Resettable for INTENSET_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/twi0/pselscl.rs b/down-the-stack/dk_pac/src/twi0/pselscl.rs new file mode 100644 index 0000000..a358a88 --- /dev/null +++ b/down-the-stack/dk_pac/src/twi0/pselscl.rs @@ -0,0 +1,116 @@ +#[doc = "Register `PSELSCL` 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 `PSELSCL` 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 `PSELSCL` reader - Pin number configuration for TWI SCL signal"] +pub type PSELSCL_R = crate::FieldReader; +#[doc = "Pin number configuration for TWI SCL signal\n\nValue on reset: 4294967295"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +#[repr(u32)] +pub enum PSELSCL_A { + #[doc = "4294967295: Disconnect"] + DISCONNECTED = 4294967295, +} +impl From for u32 { + #[inline(always)] + fn from(variant: PSELSCL_A) -> Self { + variant as _ + } +} +impl PSELSCL_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> Option { + match self.bits { + 4294967295 => Some(PSELSCL_A::DISCONNECTED), + _ => None, + } + } + #[doc = "Checks if the value of the field is `DISCONNECTED`"] + #[inline(always)] + pub fn is_disconnected(&self) -> bool { + *self == PSELSCL_A::DISCONNECTED + } +} +#[doc = "Field `PSELSCL` writer - Pin number configuration for TWI SCL signal"] +pub type PSELSCL_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, PSELSCL_SPEC, u32, PSELSCL_A, 32, O>; +impl<'a, const O: u8> PSELSCL_W<'a, O> { + #[doc = "Disconnect"] + #[inline(always)] + pub fn disconnected(self) -> &'a mut W { + self.variant(PSELSCL_A::DISCONNECTED) + } +} +impl R { + #[doc = "Bits 0:31 - Pin number configuration for TWI SCL signal"] + #[inline(always)] + pub fn pselscl(&self) -> PSELSCL_R { + PSELSCL_R::new(self.bits) + } +} +impl W { + #[doc = "Bits 0:31 - Pin number configuration for TWI SCL signal"] + #[inline(always)] + #[must_use] + pub fn pselscl(&mut self) -> PSELSCL_W<0> { + PSELSCL_W::new(self) + } + #[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 = "Pin select for SCL\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 [pselscl](index.html) module"] +pub struct PSELSCL_SPEC; +impl crate::RegisterSpec for PSELSCL_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [pselscl::R](R) reader structure"] +impl crate::Readable for PSELSCL_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [pselscl::W](W) writer structure"] +impl crate::Writable for PSELSCL_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets PSELSCL to value 0xffff_ffff"] +impl crate::Resettable for PSELSCL_SPEC { + const RESET_VALUE: Self::Ux = 0xffff_ffff; +} diff --git a/down-the-stack/dk_pac/src/twi0/pselsda.rs b/down-the-stack/dk_pac/src/twi0/pselsda.rs new file mode 100644 index 0000000..c8b2a71 --- /dev/null +++ b/down-the-stack/dk_pac/src/twi0/pselsda.rs @@ -0,0 +1,116 @@ +#[doc = "Register `PSELSDA` 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 `PSELSDA` 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 `PSELSDA` reader - Pin number configuration for TWI SDA signal"] +pub type PSELSDA_R = crate::FieldReader; +#[doc = "Pin number configuration for TWI SDA signal\n\nValue on reset: 4294967295"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +#[repr(u32)] +pub enum PSELSDA_A { + #[doc = "4294967295: Disconnect"] + DISCONNECTED = 4294967295, +} +impl From for u32 { + #[inline(always)] + fn from(variant: PSELSDA_A) -> Self { + variant as _ + } +} +impl PSELSDA_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> Option { + match self.bits { + 4294967295 => Some(PSELSDA_A::DISCONNECTED), + _ => None, + } + } + #[doc = "Checks if the value of the field is `DISCONNECTED`"] + #[inline(always)] + pub fn is_disconnected(&self) -> bool { + *self == PSELSDA_A::DISCONNECTED + } +} +#[doc = "Field `PSELSDA` writer - Pin number configuration for TWI SDA signal"] +pub type PSELSDA_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, PSELSDA_SPEC, u32, PSELSDA_A, 32, O>; +impl<'a, const O: u8> PSELSDA_W<'a, O> { + #[doc = "Disconnect"] + #[inline(always)] + pub fn disconnected(self) -> &'a mut W { + self.variant(PSELSDA_A::DISCONNECTED) + } +} +impl R { + #[doc = "Bits 0:31 - Pin number configuration for TWI SDA signal"] + #[inline(always)] + pub fn pselsda(&self) -> PSELSDA_R { + PSELSDA_R::new(self.bits) + } +} +impl W { + #[doc = "Bits 0:31 - Pin number configuration for TWI SDA signal"] + #[inline(always)] + #[must_use] + pub fn pselsda(&mut self) -> PSELSDA_W<0> { + PSELSDA_W::new(self) + } + #[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 = "Pin select for SDA\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 [pselsda](index.html) module"] +pub struct PSELSDA_SPEC; +impl crate::RegisterSpec for PSELSDA_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [pselsda::R](R) reader structure"] +impl crate::Readable for PSELSDA_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [pselsda::W](W) writer structure"] +impl crate::Writable for PSELSDA_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets PSELSDA to value 0xffff_ffff"] +impl crate::Resettable for PSELSDA_SPEC { + const RESET_VALUE: Self::Ux = 0xffff_ffff; +} diff --git a/down-the-stack/dk_pac/src/twi0/rxd.rs b/down-the-stack/dk_pac/src/twi0/rxd.rs new file mode 100644 index 0000000..627ab0d --- /dev/null +++ b/down-the-stack/dk_pac/src/twi0/rxd.rs @@ -0,0 +1,37 @@ +#[doc = "Register `RXD` 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 = "Field `RXD` reader - RXD register"] +pub type RXD_R = crate::FieldReader; +impl R { + #[doc = "Bits 0:7 - RXD register"] + #[inline(always)] + pub fn rxd(&self) -> RXD_R { + RXD_R::new((self.bits & 0xff) as u8) + } +} +#[doc = "RXD register\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 [rxd](index.html) module"] +pub struct RXD_SPEC; +impl crate::RegisterSpec for RXD_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [rxd::R](R) reader structure"] +impl crate::Readable for RXD_SPEC { + type Reader = R; +} +#[doc = "`reset()` method sets RXD to value 0"] +impl crate::Resettable for RXD_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/twi0/shorts.rs b/down-the-stack/dk_pac/src/twi0/shorts.rs new file mode 100644 index 0000000..62d4477 --- /dev/null +++ b/down-the-stack/dk_pac/src/twi0/shorts.rs @@ -0,0 +1,187 @@ +#[doc = "Register `SHORTS` 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 `SHORTS` 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 `BB_SUSPEND` reader - Shortcut between event BB and task SUSPEND"] +pub type BB_SUSPEND_R = crate::BitReader; +#[doc = "Shortcut between event BB and task SUSPEND\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum BB_SUSPEND_A { + #[doc = "0: Disable shortcut"] + DISABLED = 0, + #[doc = "1: Enable shortcut"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: BB_SUSPEND_A) -> Self { + variant as u8 != 0 + } +} +impl BB_SUSPEND_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> BB_SUSPEND_A { + match self.bits { + false => BB_SUSPEND_A::DISABLED, + true => BB_SUSPEND_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == BB_SUSPEND_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == BB_SUSPEND_A::ENABLED + } +} +#[doc = "Field `BB_SUSPEND` writer - Shortcut between event BB and task SUSPEND"] +pub type BB_SUSPEND_W<'a, const O: u8> = crate::BitWriter<'a, u32, SHORTS_SPEC, BB_SUSPEND_A, O>; +impl<'a, const O: u8> BB_SUSPEND_W<'a, O> { + #[doc = "Disable shortcut"] + #[inline(always)] + pub fn disabled(self) -> &'a mut W { + self.variant(BB_SUSPEND_A::DISABLED) + } + #[doc = "Enable shortcut"] + #[inline(always)] + pub fn enabled(self) -> &'a mut W { + self.variant(BB_SUSPEND_A::ENABLED) + } +} +#[doc = "Field `BB_STOP` reader - Shortcut between event BB and task STOP"] +pub type BB_STOP_R = crate::BitReader; +#[doc = "Shortcut between event BB and task STOP\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum BB_STOP_A { + #[doc = "0: Disable shortcut"] + DISABLED = 0, + #[doc = "1: Enable shortcut"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: BB_STOP_A) -> Self { + variant as u8 != 0 + } +} +impl BB_STOP_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> BB_STOP_A { + match self.bits { + false => BB_STOP_A::DISABLED, + true => BB_STOP_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == BB_STOP_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == BB_STOP_A::ENABLED + } +} +#[doc = "Field `BB_STOP` writer - Shortcut between event BB and task STOP"] +pub type BB_STOP_W<'a, const O: u8> = crate::BitWriter<'a, u32, SHORTS_SPEC, BB_STOP_A, O>; +impl<'a, const O: u8> BB_STOP_W<'a, O> { + #[doc = "Disable shortcut"] + #[inline(always)] + pub fn disabled(self) -> &'a mut W { + self.variant(BB_STOP_A::DISABLED) + } + #[doc = "Enable shortcut"] + #[inline(always)] + pub fn enabled(self) -> &'a mut W { + self.variant(BB_STOP_A::ENABLED) + } +} +impl R { + #[doc = "Bit 0 - Shortcut between event BB and task SUSPEND"] + #[inline(always)] + pub fn bb_suspend(&self) -> BB_SUSPEND_R { + BB_SUSPEND_R::new((self.bits & 1) != 0) + } + #[doc = "Bit 1 - Shortcut between event BB and task STOP"] + #[inline(always)] + pub fn bb_stop(&self) -> BB_STOP_R { + BB_STOP_R::new(((self.bits >> 1) & 1) != 0) + } +} +impl W { + #[doc = "Bit 0 - Shortcut between event BB and task SUSPEND"] + #[inline(always)] + #[must_use] + pub fn bb_suspend(&mut self) -> BB_SUSPEND_W<0> { + BB_SUSPEND_W::new(self) + } + #[doc = "Bit 1 - Shortcut between event BB and task STOP"] + #[inline(always)] + #[must_use] + pub fn bb_stop(&mut self) -> BB_STOP_W<1> { + BB_STOP_W::new(self) + } + #[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 = "Shortcuts between local events and tasks\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 [shorts](index.html) module"] +pub struct SHORTS_SPEC; +impl crate::RegisterSpec for SHORTS_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [shorts::R](R) reader structure"] +impl crate::Readable for SHORTS_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [shorts::W](W) writer structure"] +impl crate::Writable for SHORTS_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets SHORTS to value 0"] +impl crate::Resettable for SHORTS_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/twi0/tasks_resume.rs b/down-the-stack/dk_pac/src/twi0/tasks_resume.rs new file mode 100644 index 0000000..47f0633 --- /dev/null +++ b/down-the-stack/dk_pac/src/twi0/tasks_resume.rs @@ -0,0 +1,72 @@ +#[doc = "Register `TASKS_RESUME` 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 = "Resume TWI transaction\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum TASKS_RESUME_AW { + #[doc = "1: Trigger task"] + TRIGGER = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: TASKS_RESUME_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `TASKS_RESUME` writer - Resume TWI transaction"] +pub type TASKS_RESUME_W<'a, const O: u8> = + crate::BitWriter<'a, u32, TASKS_RESUME_SPEC, TASKS_RESUME_AW, O>; +impl<'a, const O: u8> TASKS_RESUME_W<'a, O> { + #[doc = "Trigger task"] + #[inline(always)] + pub fn trigger(self) -> &'a mut W { + self.variant(TASKS_RESUME_AW::TRIGGER) + } +} +impl W { + #[doc = "Bit 0 - Resume TWI transaction"] + #[inline(always)] + #[must_use] + pub fn tasks_resume(&mut self) -> TASKS_RESUME_W<0> { + TASKS_RESUME_W::new(self) + } + #[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 = "Resume TWI transaction\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 [tasks_resume](index.html) module"] +pub struct TASKS_RESUME_SPEC; +impl crate::RegisterSpec for TASKS_RESUME_SPEC { + type Ux = u32; +} +#[doc = "`write(|w| ..)` method takes [tasks_resume::W](W) writer structure"] +impl crate::Writable for TASKS_RESUME_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets TASKS_RESUME to value 0"] +impl crate::Resettable for TASKS_RESUME_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/twi0/tasks_startrx.rs b/down-the-stack/dk_pac/src/twi0/tasks_startrx.rs new file mode 100644 index 0000000..c090f10 --- /dev/null +++ b/down-the-stack/dk_pac/src/twi0/tasks_startrx.rs @@ -0,0 +1,72 @@ +#[doc = "Register `TASKS_STARTRX` 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 = "Start TWI receive sequence\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum TASKS_STARTRX_AW { + #[doc = "1: Trigger task"] + TRIGGER = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: TASKS_STARTRX_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `TASKS_STARTRX` writer - Start TWI receive sequence"] +pub type TASKS_STARTRX_W<'a, const O: u8> = + crate::BitWriter<'a, u32, TASKS_STARTRX_SPEC, TASKS_STARTRX_AW, O>; +impl<'a, const O: u8> TASKS_STARTRX_W<'a, O> { + #[doc = "Trigger task"] + #[inline(always)] + pub fn trigger(self) -> &'a mut W { + self.variant(TASKS_STARTRX_AW::TRIGGER) + } +} +impl W { + #[doc = "Bit 0 - Start TWI receive sequence"] + #[inline(always)] + #[must_use] + pub fn tasks_startrx(&mut self) -> TASKS_STARTRX_W<0> { + TASKS_STARTRX_W::new(self) + } + #[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 = "Start TWI receive sequence\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 [tasks_startrx](index.html) module"] +pub struct TASKS_STARTRX_SPEC; +impl crate::RegisterSpec for TASKS_STARTRX_SPEC { + type Ux = u32; +} +#[doc = "`write(|w| ..)` method takes [tasks_startrx::W](W) writer structure"] +impl crate::Writable for TASKS_STARTRX_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets TASKS_STARTRX to value 0"] +impl crate::Resettable for TASKS_STARTRX_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/twi0/tasks_starttx.rs b/down-the-stack/dk_pac/src/twi0/tasks_starttx.rs new file mode 100644 index 0000000..a012c7b --- /dev/null +++ b/down-the-stack/dk_pac/src/twi0/tasks_starttx.rs @@ -0,0 +1,72 @@ +#[doc = "Register `TASKS_STARTTX` 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 = "Start TWI transmit sequence\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum TASKS_STARTTX_AW { + #[doc = "1: Trigger task"] + TRIGGER = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: TASKS_STARTTX_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `TASKS_STARTTX` writer - Start TWI transmit sequence"] +pub type TASKS_STARTTX_W<'a, const O: u8> = + crate::BitWriter<'a, u32, TASKS_STARTTX_SPEC, TASKS_STARTTX_AW, O>; +impl<'a, const O: u8> TASKS_STARTTX_W<'a, O> { + #[doc = "Trigger task"] + #[inline(always)] + pub fn trigger(self) -> &'a mut W { + self.variant(TASKS_STARTTX_AW::TRIGGER) + } +} +impl W { + #[doc = "Bit 0 - Start TWI transmit sequence"] + #[inline(always)] + #[must_use] + pub fn tasks_starttx(&mut self) -> TASKS_STARTTX_W<0> { + TASKS_STARTTX_W::new(self) + } + #[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 = "Start TWI transmit sequence\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 [tasks_starttx](index.html) module"] +pub struct TASKS_STARTTX_SPEC; +impl crate::RegisterSpec for TASKS_STARTTX_SPEC { + type Ux = u32; +} +#[doc = "`write(|w| ..)` method takes [tasks_starttx::W](W) writer structure"] +impl crate::Writable for TASKS_STARTTX_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets TASKS_STARTTX to value 0"] +impl crate::Resettable for TASKS_STARTTX_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/twi0/tasks_stop.rs b/down-the-stack/dk_pac/src/twi0/tasks_stop.rs new file mode 100644 index 0000000..7358178 --- /dev/null +++ b/down-the-stack/dk_pac/src/twi0/tasks_stop.rs @@ -0,0 +1,72 @@ +#[doc = "Register `TASKS_STOP` 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 = "Stop TWI transaction\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum TASKS_STOP_AW { + #[doc = "1: Trigger task"] + TRIGGER = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: TASKS_STOP_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `TASKS_STOP` writer - Stop TWI transaction"] +pub type TASKS_STOP_W<'a, const O: u8> = + crate::BitWriter<'a, u32, TASKS_STOP_SPEC, TASKS_STOP_AW, O>; +impl<'a, const O: u8> TASKS_STOP_W<'a, O> { + #[doc = "Trigger task"] + #[inline(always)] + pub fn trigger(self) -> &'a mut W { + self.variant(TASKS_STOP_AW::TRIGGER) + } +} +impl W { + #[doc = "Bit 0 - Stop TWI transaction"] + #[inline(always)] + #[must_use] + pub fn tasks_stop(&mut self) -> TASKS_STOP_W<0> { + TASKS_STOP_W::new(self) + } + #[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 = "Stop TWI transaction\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 [tasks_stop](index.html) module"] +pub struct TASKS_STOP_SPEC; +impl crate::RegisterSpec for TASKS_STOP_SPEC { + type Ux = u32; +} +#[doc = "`write(|w| ..)` method takes [tasks_stop::W](W) writer structure"] +impl crate::Writable for TASKS_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 TASKS_STOP to value 0"] +impl crate::Resettable for TASKS_STOP_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/twi0/tasks_suspend.rs b/down-the-stack/dk_pac/src/twi0/tasks_suspend.rs new file mode 100644 index 0000000..ae6f325 --- /dev/null +++ b/down-the-stack/dk_pac/src/twi0/tasks_suspend.rs @@ -0,0 +1,72 @@ +#[doc = "Register `TASKS_SUSPEND` 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 = "Suspend TWI transaction\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum TASKS_SUSPEND_AW { + #[doc = "1: Trigger task"] + TRIGGER = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: TASKS_SUSPEND_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `TASKS_SUSPEND` writer - Suspend TWI transaction"] +pub type TASKS_SUSPEND_W<'a, const O: u8> = + crate::BitWriter<'a, u32, TASKS_SUSPEND_SPEC, TASKS_SUSPEND_AW, O>; +impl<'a, const O: u8> TASKS_SUSPEND_W<'a, O> { + #[doc = "Trigger task"] + #[inline(always)] + pub fn trigger(self) -> &'a mut W { + self.variant(TASKS_SUSPEND_AW::TRIGGER) + } +} +impl W { + #[doc = "Bit 0 - Suspend TWI transaction"] + #[inline(always)] + #[must_use] + pub fn tasks_suspend(&mut self) -> TASKS_SUSPEND_W<0> { + TASKS_SUSPEND_W::new(self) + } + #[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 = "Suspend TWI transaction\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 [tasks_suspend](index.html) module"] +pub struct TASKS_SUSPEND_SPEC; +impl crate::RegisterSpec for TASKS_SUSPEND_SPEC { + type Ux = u32; +} +#[doc = "`write(|w| ..)` method takes [tasks_suspend::W](W) writer structure"] +impl crate::Writable for TASKS_SUSPEND_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets TASKS_SUSPEND to value 0"] +impl crate::Resettable for TASKS_SUSPEND_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/twi0/txd.rs b/down-the-stack/dk_pac/src/twi0/txd.rs new file mode 100644 index 0000000..4e9ee52 --- /dev/null +++ b/down-the-stack/dk_pac/src/twi0/txd.rs @@ -0,0 +1,80 @@ +#[doc = "Register `TXD` 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 `TXD` 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 `TXD` reader - TXD register"] +pub type TXD_R = crate::FieldReader; +#[doc = "Field `TXD` writer - TXD register"] +pub type TXD_W<'a, const O: u8> = crate::FieldWriter<'a, u32, TXD_SPEC, u8, u8, 8, O>; +impl R { + #[doc = "Bits 0:7 - TXD register"] + #[inline(always)] + pub fn txd(&self) -> TXD_R { + TXD_R::new((self.bits & 0xff) as u8) + } +} +impl W { + #[doc = "Bits 0:7 - TXD register"] + #[inline(always)] + #[must_use] + pub fn txd(&mut self) -> TXD_W<0> { + TXD_W::new(self) + } + #[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 = "TXD register\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 [txd](index.html) module"] +pub struct TXD_SPEC; +impl crate::RegisterSpec for TXD_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [txd::R](R) reader structure"] +impl crate::Readable for TXD_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [txd::W](W) writer structure"] +impl crate::Writable for TXD_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets TXD to value 0"] +impl crate::Resettable for TXD_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/twim0.rs b/down-the-stack/dk_pac/src/twim0.rs new file mode 100644 index 0000000..66fed19 --- /dev/null +++ b/down-the-stack/dk_pac/src/twim0.rs @@ -0,0 +1,160 @@ +#[doc = r"Register block"] +#[repr(C)] +pub struct RegisterBlock { + #[doc = "0x00 - Start TWI receive sequence"] + pub tasks_startrx: TASKS_STARTRX, + _reserved1: [u8; 0x04], + #[doc = "0x08 - Start TWI transmit sequence"] + pub tasks_starttx: TASKS_STARTTX, + _reserved2: [u8; 0x08], + #[doc = "0x14 - Stop TWI transaction. Must be issued while the TWI master is not suspended."] + pub tasks_stop: TASKS_STOP, + _reserved3: [u8; 0x04], + #[doc = "0x1c - Suspend TWI transaction"] + pub tasks_suspend: TASKS_SUSPEND, + #[doc = "0x20 - Resume TWI transaction"] + pub tasks_resume: TASKS_RESUME, + _reserved5: [u8; 0xe0], + #[doc = "0x104 - TWI stopped"] + pub events_stopped: EVENTS_STOPPED, + _reserved6: [u8; 0x1c], + #[doc = "0x124 - TWI error"] + pub events_error: EVENTS_ERROR, + _reserved7: [u8; 0x20], + #[doc = "0x148 - Last byte has been sent out after the SUSPEND task has been issued, TWI traffic is now suspended."] + pub events_suspended: EVENTS_SUSPENDED, + #[doc = "0x14c - Receive sequence started"] + pub events_rxstarted: EVENTS_RXSTARTED, + #[doc = "0x150 - Transmit sequence started"] + pub events_txstarted: EVENTS_TXSTARTED, + _reserved10: [u8; 0x08], + #[doc = "0x15c - Byte boundary, starting to receive the last byte"] + pub events_lastrx: EVENTS_LASTRX, + #[doc = "0x160 - Byte boundary, starting to transmit the last byte"] + pub events_lasttx: EVENTS_LASTTX, + _reserved12: [u8; 0x9c], + #[doc = "0x200 - Shortcuts between local events and tasks"] + pub shorts: SHORTS, + _reserved13: [u8; 0xfc], + #[doc = "0x300 - Enable or disable interrupt"] + pub inten: INTEN, + #[doc = "0x304 - Enable interrupt"] + pub intenset: INTENSET, + #[doc = "0x308 - Disable interrupt"] + pub intenclr: INTENCLR, + _reserved16: [u8; 0x01b8], + #[doc = "0x4c4 - Error source"] + pub errorsrc: ERRORSRC, + _reserved17: [u8; 0x38], + #[doc = "0x500 - Enable TWIM"] + pub enable: ENABLE, + _reserved18: [u8; 0x04], + #[doc = "0x508..0x510 - Unspecified"] + pub psel: PSEL, + _reserved19: [u8; 0x14], + #[doc = "0x524 - TWI frequency"] + pub frequency: FREQUENCY, + _reserved20: [u8; 0x0c], + #[doc = "0x534..0x544 - RXD EasyDMA channel"] + pub rxd: RXD, + #[doc = "0x544..0x554 - TXD EasyDMA channel"] + pub txd: TXD, + _reserved22: [u8; 0x34], + #[doc = "0x588 - Address used in the TWI transfer"] + pub address: ADDRESS, +} +#[doc = "TASKS_STARTRX (w) register accessor: an alias for `Reg`"] +pub type TASKS_STARTRX = crate::Reg; +#[doc = "Start TWI receive sequence"] +pub mod tasks_startrx; +#[doc = "TASKS_STARTTX (w) register accessor: an alias for `Reg`"] +pub type TASKS_STARTTX = crate::Reg; +#[doc = "Start TWI transmit sequence"] +pub mod tasks_starttx; +#[doc = "TASKS_STOP (w) register accessor: an alias for `Reg`"] +pub type TASKS_STOP = crate::Reg; +#[doc = "Stop TWI transaction. Must be issued while the TWI master is not suspended."] +pub mod tasks_stop; +#[doc = "TASKS_SUSPEND (w) register accessor: an alias for `Reg`"] +pub type TASKS_SUSPEND = crate::Reg; +#[doc = "Suspend TWI transaction"] +pub mod tasks_suspend; +#[doc = "TASKS_RESUME (w) register accessor: an alias for `Reg`"] +pub type TASKS_RESUME = crate::Reg; +#[doc = "Resume TWI transaction"] +pub mod tasks_resume; +#[doc = "EVENTS_STOPPED (rw) register accessor: an alias for `Reg`"] +pub type EVENTS_STOPPED = crate::Reg; +#[doc = "TWI stopped"] +pub mod events_stopped; +#[doc = "EVENTS_ERROR (rw) register accessor: an alias for `Reg`"] +pub type EVENTS_ERROR = crate::Reg; +#[doc = "TWI error"] +pub mod events_error; +#[doc = "EVENTS_SUSPENDED (rw) register accessor: an alias for `Reg`"] +pub type EVENTS_SUSPENDED = crate::Reg; +#[doc = "Last byte has been sent out after the SUSPEND task has been issued, TWI traffic is now suspended."] +pub mod events_suspended; +#[doc = "EVENTS_RXSTARTED (rw) register accessor: an alias for `Reg`"] +pub type EVENTS_RXSTARTED = crate::Reg; +#[doc = "Receive sequence started"] +pub mod events_rxstarted; +#[doc = "EVENTS_TXSTARTED (rw) register accessor: an alias for `Reg`"] +pub type EVENTS_TXSTARTED = crate::Reg; +#[doc = "Transmit sequence started"] +pub mod events_txstarted; +#[doc = "EVENTS_LASTRX (rw) register accessor: an alias for `Reg`"] +pub type EVENTS_LASTRX = crate::Reg; +#[doc = "Byte boundary, starting to receive the last byte"] +pub mod events_lastrx; +#[doc = "EVENTS_LASTTX (rw) register accessor: an alias for `Reg`"] +pub type EVENTS_LASTTX = crate::Reg; +#[doc = "Byte boundary, starting to transmit the last byte"] +pub mod events_lasttx; +#[doc = "SHORTS (rw) register accessor: an alias for `Reg`"] +pub type SHORTS = crate::Reg; +#[doc = "Shortcuts between local events and tasks"] +pub mod shorts; +#[doc = "INTEN (rw) register accessor: an alias for `Reg`"] +pub type INTEN = crate::Reg; +#[doc = "Enable or disable interrupt"] +pub mod inten; +#[doc = "INTENSET (rw) register accessor: an alias for `Reg`"] +pub type INTENSET = crate::Reg; +#[doc = "Enable interrupt"] +pub mod intenset; +#[doc = "INTENCLR (rw) register accessor: an alias for `Reg`"] +pub type INTENCLR = crate::Reg; +#[doc = "Disable interrupt"] +pub mod intenclr; +#[doc = "ERRORSRC (rw) register accessor: an alias for `Reg`"] +pub type ERRORSRC = crate::Reg; +#[doc = "Error source"] +pub mod errorsrc; +#[doc = "ENABLE (rw) register accessor: an alias for `Reg`"] +pub type ENABLE = crate::Reg; +#[doc = "Enable TWIM"] +pub mod enable; +#[doc = "Unspecified"] +pub use self::psel::PSEL; +#[doc = r"Cluster"] +#[doc = "Unspecified"] +pub mod psel; +#[doc = "FREQUENCY (rw) register accessor: an alias for `Reg`"] +pub type FREQUENCY = crate::Reg; +#[doc = "TWI frequency"] +pub mod frequency; +#[doc = "RXD EasyDMA channel"] +pub use self::rxd::RXD; +#[doc = r"Cluster"] +#[doc = "RXD EasyDMA channel"] +pub mod rxd; +#[doc = "TXD EasyDMA channel"] +pub use self::txd::TXD; +#[doc = r"Cluster"] +#[doc = "TXD EasyDMA channel"] +pub mod txd; +#[doc = "ADDRESS (rw) register accessor: an alias for `Reg`"] +pub type ADDRESS = crate::Reg; +#[doc = "Address used in the TWI transfer"] +pub mod address; diff --git a/down-the-stack/dk_pac/src/twim0/address.rs b/down-the-stack/dk_pac/src/twim0/address.rs new file mode 100644 index 0000000..67780ec --- /dev/null +++ b/down-the-stack/dk_pac/src/twim0/address.rs @@ -0,0 +1,80 @@ +#[doc = "Register `ADDRESS` 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 `ADDRESS` 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 `ADDRESS` reader - Address used in the TWI transfer"] +pub type ADDRESS_R = crate::FieldReader; +#[doc = "Field `ADDRESS` writer - Address used in the TWI transfer"] +pub type ADDRESS_W<'a, const O: u8> = crate::FieldWriter<'a, u32, ADDRESS_SPEC, u8, u8, 7, O>; +impl R { + #[doc = "Bits 0:6 - Address used in the TWI transfer"] + #[inline(always)] + pub fn address(&self) -> ADDRESS_R { + ADDRESS_R::new((self.bits & 0x7f) as u8) + } +} +impl W { + #[doc = "Bits 0:6 - Address used in the TWI transfer"] + #[inline(always)] + #[must_use] + pub fn address(&mut self) -> ADDRESS_W<0> { + ADDRESS_W::new(self) + } + #[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 = "Address used in the TWI transfer\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 [address](index.html) module"] +pub struct ADDRESS_SPEC; +impl crate::RegisterSpec for ADDRESS_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [address::R](R) reader structure"] +impl crate::Readable for ADDRESS_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [address::W](W) writer structure"] +impl crate::Writable for ADDRESS_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets ADDRESS to value 0"] +impl crate::Resettable for ADDRESS_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/twim0/enable.rs b/down-the-stack/dk_pac/src/twim0/enable.rs new file mode 100644 index 0000000..27e5ed6 --- /dev/null +++ b/down-the-stack/dk_pac/src/twim0/enable.rs @@ -0,0 +1,128 @@ +#[doc = "Register `ENABLE` 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 `ENABLE` 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 `ENABLE` reader - Enable or disable TWIM"] +pub type ENABLE_R = crate::FieldReader; +#[doc = "Enable or disable TWIM\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +#[repr(u8)] +pub enum ENABLE_A { + #[doc = "0: Disable TWIM"] + DISABLED = 0, + #[doc = "6: Enable TWIM"] + ENABLED = 6, +} +impl From for u8 { + #[inline(always)] + fn from(variant: ENABLE_A) -> Self { + variant as _ + } +} +impl ENABLE_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> Option { + match self.bits { + 0 => Some(ENABLE_A::DISABLED), + 6 => Some(ENABLE_A::ENABLED), + _ => None, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == ENABLE_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == ENABLE_A::ENABLED + } +} +#[doc = "Field `ENABLE` writer - Enable or disable TWIM"] +pub type ENABLE_W<'a, const O: u8> = crate::FieldWriter<'a, u32, ENABLE_SPEC, u8, ENABLE_A, 4, O>; +impl<'a, const O: u8> ENABLE_W<'a, O> { + #[doc = "Disable TWIM"] + #[inline(always)] + pub fn disabled(self) -> &'a mut W { + self.variant(ENABLE_A::DISABLED) + } + #[doc = "Enable TWIM"] + #[inline(always)] + pub fn enabled(self) -> &'a mut W { + self.variant(ENABLE_A::ENABLED) + } +} +impl R { + #[doc = "Bits 0:3 - Enable or disable TWIM"] + #[inline(always)] + pub fn enable(&self) -> ENABLE_R { + ENABLE_R::new((self.bits & 0x0f) as u8) + } +} +impl W { + #[doc = "Bits 0:3 - Enable or disable TWIM"] + #[inline(always)] + #[must_use] + pub fn enable(&mut self) -> ENABLE_W<0> { + 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 + } +} +#[doc = "Enable TWIM\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 [enable](index.html) module"] +pub struct ENABLE_SPEC; +impl crate::RegisterSpec for ENABLE_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [enable::R](R) reader structure"] +impl crate::Readable for ENABLE_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [enable::W](W) writer structure"] +impl crate::Writable for ENABLE_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets ENABLE to value 0"] +impl crate::Resettable for ENABLE_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/twim0/errorsrc.rs b/down-the-stack/dk_pac/src/twim0/errorsrc.rs new file mode 100644 index 0000000..0a10452 --- /dev/null +++ b/down-the-stack/dk_pac/src/twim0/errorsrc.rs @@ -0,0 +1,248 @@ +#[doc = "Register `ERRORSRC` 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 `ERRORSRC` 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 `OVERRUN` reader - Overrun error"] +pub type OVERRUN_R = crate::BitReader; +#[doc = "Overrun error\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum OVERRUN_A { + #[doc = "0: Error did not occur"] + NOT_RECEIVED = 0, + #[doc = "1: Error occurred"] + RECEIVED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: OVERRUN_A) -> Self { + variant as u8 != 0 + } +} +impl OVERRUN_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> OVERRUN_A { + match self.bits { + false => OVERRUN_A::NOT_RECEIVED, + true => OVERRUN_A::RECEIVED, + } + } + #[doc = "Checks if the value of the field is `NOT_RECEIVED`"] + #[inline(always)] + pub fn is_not_received(&self) -> bool { + *self == OVERRUN_A::NOT_RECEIVED + } + #[doc = "Checks if the value of the field is `RECEIVED`"] + #[inline(always)] + pub fn is_received(&self) -> bool { + *self == OVERRUN_A::RECEIVED + } +} +#[doc = "Field `OVERRUN` writer - Overrun error"] +pub type OVERRUN_W<'a, const O: u8> = crate::BitWriter1C<'a, u32, ERRORSRC_SPEC, OVERRUN_A, O>; +impl<'a, const O: u8> OVERRUN_W<'a, O> { + #[doc = "Error did not occur"] + #[inline(always)] + pub fn not_received(self) -> &'a mut W { + self.variant(OVERRUN_A::NOT_RECEIVED) + } + #[doc = "Error occurred"] + #[inline(always)] + pub fn received(self) -> &'a mut W { + self.variant(OVERRUN_A::RECEIVED) + } +} +#[doc = "Field `ANACK` reader - NACK received after sending the address (write '1' to clear)"] +pub type ANACK_R = crate::BitReader; +#[doc = "NACK received after sending the address (write '1' to clear)\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum ANACK_A { + #[doc = "0: Error did not occur"] + NOT_RECEIVED = 0, + #[doc = "1: Error occurred"] + RECEIVED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: ANACK_A) -> Self { + variant as u8 != 0 + } +} +impl ANACK_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> ANACK_A { + match self.bits { + false => ANACK_A::NOT_RECEIVED, + true => ANACK_A::RECEIVED, + } + } + #[doc = "Checks if the value of the field is `NOT_RECEIVED`"] + #[inline(always)] + pub fn is_not_received(&self) -> bool { + *self == ANACK_A::NOT_RECEIVED + } + #[doc = "Checks if the value of the field is `RECEIVED`"] + #[inline(always)] + pub fn is_received(&self) -> bool { + *self == ANACK_A::RECEIVED + } +} +#[doc = "Field `ANACK` writer - NACK received after sending the address (write '1' to clear)"] +pub type ANACK_W<'a, const O: u8> = crate::BitWriter1C<'a, u32, ERRORSRC_SPEC, ANACK_A, O>; +impl<'a, const O: u8> ANACK_W<'a, O> { + #[doc = "Error did not occur"] + #[inline(always)] + pub fn not_received(self) -> &'a mut W { + self.variant(ANACK_A::NOT_RECEIVED) + } + #[doc = "Error occurred"] + #[inline(always)] + pub fn received(self) -> &'a mut W { + self.variant(ANACK_A::RECEIVED) + } +} +#[doc = "Field `DNACK` reader - NACK received after sending a data byte (write '1' to clear)"] +pub type DNACK_R = crate::BitReader; +#[doc = "NACK received after sending a data byte (write '1' to clear)\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum DNACK_A { + #[doc = "0: Error did not occur"] + NOT_RECEIVED = 0, + #[doc = "1: Error occurred"] + RECEIVED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: DNACK_A) -> Self { + variant as u8 != 0 + } +} +impl DNACK_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> DNACK_A { + match self.bits { + false => DNACK_A::NOT_RECEIVED, + true => DNACK_A::RECEIVED, + } + } + #[doc = "Checks if the value of the field is `NOT_RECEIVED`"] + #[inline(always)] + pub fn is_not_received(&self) -> bool { + *self == DNACK_A::NOT_RECEIVED + } + #[doc = "Checks if the value of the field is `RECEIVED`"] + #[inline(always)] + pub fn is_received(&self) -> bool { + *self == DNACK_A::RECEIVED + } +} +#[doc = "Field `DNACK` writer - NACK received after sending a data byte (write '1' to clear)"] +pub type DNACK_W<'a, const O: u8> = crate::BitWriter1C<'a, u32, ERRORSRC_SPEC, DNACK_A, O>; +impl<'a, const O: u8> DNACK_W<'a, O> { + #[doc = "Error did not occur"] + #[inline(always)] + pub fn not_received(self) -> &'a mut W { + self.variant(DNACK_A::NOT_RECEIVED) + } + #[doc = "Error occurred"] + #[inline(always)] + pub fn received(self) -> &'a mut W { + self.variant(DNACK_A::RECEIVED) + } +} +impl R { + #[doc = "Bit 0 - Overrun error"] + #[inline(always)] + pub fn overrun(&self) -> OVERRUN_R { + OVERRUN_R::new((self.bits & 1) != 0) + } + #[doc = "Bit 1 - NACK received after sending the address (write '1' to clear)"] + #[inline(always)] + pub fn anack(&self) -> ANACK_R { + ANACK_R::new(((self.bits >> 1) & 1) != 0) + } + #[doc = "Bit 2 - NACK received after sending a data byte (write '1' to clear)"] + #[inline(always)] + pub fn dnack(&self) -> DNACK_R { + DNACK_R::new(((self.bits >> 2) & 1) != 0) + } +} +impl W { + #[doc = "Bit 0 - Overrun error"] + #[inline(always)] + #[must_use] + pub fn overrun(&mut self) -> OVERRUN_W<0> { + OVERRUN_W::new(self) + } + #[doc = "Bit 1 - NACK received after sending the address (write '1' to clear)"] + #[inline(always)] + #[must_use] + pub fn anack(&mut self) -> ANACK_W<1> { + ANACK_W::new(self) + } + #[doc = "Bit 2 - NACK received after sending a data byte (write '1' to clear)"] + #[inline(always)] + #[must_use] + pub fn dnack(&mut self) -> DNACK_W<2> { + DNACK_W::new(self) + } + #[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 = "Error source\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 [errorsrc](index.html) module"] +pub struct ERRORSRC_SPEC; +impl crate::RegisterSpec for ERRORSRC_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [errorsrc::R](R) reader structure"] +impl crate::Readable for ERRORSRC_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [errorsrc::W](W) writer structure"] +impl crate::Writable for ERRORSRC_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0x07; +} +#[doc = "`reset()` method sets ERRORSRC to value 0"] +impl crate::Resettable for ERRORSRC_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/twim0/events_error.rs b/down-the-stack/dk_pac/src/twim0/events_error.rs new file mode 100644 index 0000000..05b214c --- /dev/null +++ b/down-the-stack/dk_pac/src/twim0/events_error.rs @@ -0,0 +1,127 @@ +#[doc = "Register `EVENTS_ERROR` 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 `EVENTS_ERROR` 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 `EVENTS_ERROR` reader - TWI error"] +pub type EVENTS_ERROR_R = crate::BitReader; +#[doc = "TWI error\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum EVENTS_ERROR_A { + #[doc = "0: Event not generated"] + NOT_GENERATED = 0, + #[doc = "1: Event generated"] + GENERATED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: EVENTS_ERROR_A) -> Self { + variant as u8 != 0 + } +} +impl EVENTS_ERROR_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> EVENTS_ERROR_A { + match self.bits { + false => EVENTS_ERROR_A::NOT_GENERATED, + true => EVENTS_ERROR_A::GENERATED, + } + } + #[doc = "Checks if the value of the field is `NOT_GENERATED`"] + #[inline(always)] + pub fn is_not_generated(&self) -> bool { + *self == EVENTS_ERROR_A::NOT_GENERATED + } + #[doc = "Checks if the value of the field is `GENERATED`"] + #[inline(always)] + pub fn is_generated(&self) -> bool { + *self == EVENTS_ERROR_A::GENERATED + } +} +#[doc = "Field `EVENTS_ERROR` writer - TWI error"] +pub type EVENTS_ERROR_W<'a, const O: u8> = + crate::BitWriter<'a, u32, EVENTS_ERROR_SPEC, EVENTS_ERROR_A, O>; +impl<'a, const O: u8> EVENTS_ERROR_W<'a, O> { + #[doc = "Event not generated"] + #[inline(always)] + pub fn not_generated(self) -> &'a mut W { + self.variant(EVENTS_ERROR_A::NOT_GENERATED) + } + #[doc = "Event generated"] + #[inline(always)] + pub fn generated(self) -> &'a mut W { + self.variant(EVENTS_ERROR_A::GENERATED) + } +} +impl R { + #[doc = "Bit 0 - TWI error"] + #[inline(always)] + pub fn events_error(&self) -> EVENTS_ERROR_R { + EVENTS_ERROR_R::new((self.bits & 1) != 0) + } +} +impl W { + #[doc = "Bit 0 - TWI error"] + #[inline(always)] + #[must_use] + pub fn events_error(&mut self) -> EVENTS_ERROR_W<0> { + EVENTS_ERROR_W::new(self) + } + #[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 = "TWI error\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 [events_error](index.html) module"] +pub struct EVENTS_ERROR_SPEC; +impl crate::RegisterSpec for EVENTS_ERROR_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [events_error::R](R) reader structure"] +impl crate::Readable for EVENTS_ERROR_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [events_error::W](W) writer structure"] +impl crate::Writable for EVENTS_ERROR_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets EVENTS_ERROR to value 0"] +impl crate::Resettable for EVENTS_ERROR_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/twim0/events_lastrx.rs b/down-the-stack/dk_pac/src/twim0/events_lastrx.rs new file mode 100644 index 0000000..c647dd9 --- /dev/null +++ b/down-the-stack/dk_pac/src/twim0/events_lastrx.rs @@ -0,0 +1,127 @@ +#[doc = "Register `EVENTS_LASTRX` 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 `EVENTS_LASTRX` 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 `EVENTS_LASTRX` reader - Byte boundary, starting to receive the last byte"] +pub type EVENTS_LASTRX_R = crate::BitReader; +#[doc = "Byte boundary, starting to receive the last byte\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum EVENTS_LASTRX_A { + #[doc = "0: Event not generated"] + NOT_GENERATED = 0, + #[doc = "1: Event generated"] + GENERATED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: EVENTS_LASTRX_A) -> Self { + variant as u8 != 0 + } +} +impl EVENTS_LASTRX_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> EVENTS_LASTRX_A { + match self.bits { + false => EVENTS_LASTRX_A::NOT_GENERATED, + true => EVENTS_LASTRX_A::GENERATED, + } + } + #[doc = "Checks if the value of the field is `NOT_GENERATED`"] + #[inline(always)] + pub fn is_not_generated(&self) -> bool { + *self == EVENTS_LASTRX_A::NOT_GENERATED + } + #[doc = "Checks if the value of the field is `GENERATED`"] + #[inline(always)] + pub fn is_generated(&self) -> bool { + *self == EVENTS_LASTRX_A::GENERATED + } +} +#[doc = "Field `EVENTS_LASTRX` writer - Byte boundary, starting to receive the last byte"] +pub type EVENTS_LASTRX_W<'a, const O: u8> = + crate::BitWriter<'a, u32, EVENTS_LASTRX_SPEC, EVENTS_LASTRX_A, O>; +impl<'a, const O: u8> EVENTS_LASTRX_W<'a, O> { + #[doc = "Event not generated"] + #[inline(always)] + pub fn not_generated(self) -> &'a mut W { + self.variant(EVENTS_LASTRX_A::NOT_GENERATED) + } + #[doc = "Event generated"] + #[inline(always)] + pub fn generated(self) -> &'a mut W { + self.variant(EVENTS_LASTRX_A::GENERATED) + } +} +impl R { + #[doc = "Bit 0 - Byte boundary, starting to receive the last byte"] + #[inline(always)] + pub fn events_lastrx(&self) -> EVENTS_LASTRX_R { + EVENTS_LASTRX_R::new((self.bits & 1) != 0) + } +} +impl W { + #[doc = "Bit 0 - Byte boundary, starting to receive the last byte"] + #[inline(always)] + #[must_use] + pub fn events_lastrx(&mut self) -> EVENTS_LASTRX_W<0> { + EVENTS_LASTRX_W::new(self) + } + #[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 = "Byte boundary, starting to receive the last byte\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 [events_lastrx](index.html) module"] +pub struct EVENTS_LASTRX_SPEC; +impl crate::RegisterSpec for EVENTS_LASTRX_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [events_lastrx::R](R) reader structure"] +impl crate::Readable for EVENTS_LASTRX_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [events_lastrx::W](W) writer structure"] +impl crate::Writable for EVENTS_LASTRX_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets EVENTS_LASTRX to value 0"] +impl crate::Resettable for EVENTS_LASTRX_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/twim0/events_lasttx.rs b/down-the-stack/dk_pac/src/twim0/events_lasttx.rs new file mode 100644 index 0000000..8092a94 --- /dev/null +++ b/down-the-stack/dk_pac/src/twim0/events_lasttx.rs @@ -0,0 +1,127 @@ +#[doc = "Register `EVENTS_LASTTX` 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 `EVENTS_LASTTX` 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 `EVENTS_LASTTX` reader - Byte boundary, starting to transmit the last byte"] +pub type EVENTS_LASTTX_R = crate::BitReader; +#[doc = "Byte boundary, starting to transmit the last byte\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum EVENTS_LASTTX_A { + #[doc = "0: Event not generated"] + NOT_GENERATED = 0, + #[doc = "1: Event generated"] + GENERATED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: EVENTS_LASTTX_A) -> Self { + variant as u8 != 0 + } +} +impl EVENTS_LASTTX_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> EVENTS_LASTTX_A { + match self.bits { + false => EVENTS_LASTTX_A::NOT_GENERATED, + true => EVENTS_LASTTX_A::GENERATED, + } + } + #[doc = "Checks if the value of the field is `NOT_GENERATED`"] + #[inline(always)] + pub fn is_not_generated(&self) -> bool { + *self == EVENTS_LASTTX_A::NOT_GENERATED + } + #[doc = "Checks if the value of the field is `GENERATED`"] + #[inline(always)] + pub fn is_generated(&self) -> bool { + *self == EVENTS_LASTTX_A::GENERATED + } +} +#[doc = "Field `EVENTS_LASTTX` writer - Byte boundary, starting to transmit the last byte"] +pub type EVENTS_LASTTX_W<'a, const O: u8> = + crate::BitWriter<'a, u32, EVENTS_LASTTX_SPEC, EVENTS_LASTTX_A, O>; +impl<'a, const O: u8> EVENTS_LASTTX_W<'a, O> { + #[doc = "Event not generated"] + #[inline(always)] + pub fn not_generated(self) -> &'a mut W { + self.variant(EVENTS_LASTTX_A::NOT_GENERATED) + } + #[doc = "Event generated"] + #[inline(always)] + pub fn generated(self) -> &'a mut W { + self.variant(EVENTS_LASTTX_A::GENERATED) + } +} +impl R { + #[doc = "Bit 0 - Byte boundary, starting to transmit the last byte"] + #[inline(always)] + pub fn events_lasttx(&self) -> EVENTS_LASTTX_R { + EVENTS_LASTTX_R::new((self.bits & 1) != 0) + } +} +impl W { + #[doc = "Bit 0 - Byte boundary, starting to transmit the last byte"] + #[inline(always)] + #[must_use] + pub fn events_lasttx(&mut self) -> EVENTS_LASTTX_W<0> { + EVENTS_LASTTX_W::new(self) + } + #[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 = "Byte boundary, starting to transmit the last byte\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 [events_lasttx](index.html) module"] +pub struct EVENTS_LASTTX_SPEC; +impl crate::RegisterSpec for EVENTS_LASTTX_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [events_lasttx::R](R) reader structure"] +impl crate::Readable for EVENTS_LASTTX_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [events_lasttx::W](W) writer structure"] +impl crate::Writable for EVENTS_LASTTX_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets EVENTS_LASTTX to value 0"] +impl crate::Resettable for EVENTS_LASTTX_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/twim0/events_rxstarted.rs b/down-the-stack/dk_pac/src/twim0/events_rxstarted.rs new file mode 100644 index 0000000..194b098 --- /dev/null +++ b/down-the-stack/dk_pac/src/twim0/events_rxstarted.rs @@ -0,0 +1,127 @@ +#[doc = "Register `EVENTS_RXSTARTED` 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 `EVENTS_RXSTARTED` 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 `EVENTS_RXSTARTED` reader - Receive sequence started"] +pub type EVENTS_RXSTARTED_R = crate::BitReader; +#[doc = "Receive sequence started\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum EVENTS_RXSTARTED_A { + #[doc = "0: Event not generated"] + NOT_GENERATED = 0, + #[doc = "1: Event generated"] + GENERATED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: EVENTS_RXSTARTED_A) -> Self { + variant as u8 != 0 + } +} +impl EVENTS_RXSTARTED_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> EVENTS_RXSTARTED_A { + match self.bits { + false => EVENTS_RXSTARTED_A::NOT_GENERATED, + true => EVENTS_RXSTARTED_A::GENERATED, + } + } + #[doc = "Checks if the value of the field is `NOT_GENERATED`"] + #[inline(always)] + pub fn is_not_generated(&self) -> bool { + *self == EVENTS_RXSTARTED_A::NOT_GENERATED + } + #[doc = "Checks if the value of the field is `GENERATED`"] + #[inline(always)] + pub fn is_generated(&self) -> bool { + *self == EVENTS_RXSTARTED_A::GENERATED + } +} +#[doc = "Field `EVENTS_RXSTARTED` writer - Receive sequence started"] +pub type EVENTS_RXSTARTED_W<'a, const O: u8> = + crate::BitWriter<'a, u32, EVENTS_RXSTARTED_SPEC, EVENTS_RXSTARTED_A, O>; +impl<'a, const O: u8> EVENTS_RXSTARTED_W<'a, O> { + #[doc = "Event not generated"] + #[inline(always)] + pub fn not_generated(self) -> &'a mut W { + self.variant(EVENTS_RXSTARTED_A::NOT_GENERATED) + } + #[doc = "Event generated"] + #[inline(always)] + pub fn generated(self) -> &'a mut W { + self.variant(EVENTS_RXSTARTED_A::GENERATED) + } +} +impl R { + #[doc = "Bit 0 - Receive sequence started"] + #[inline(always)] + pub fn events_rxstarted(&self) -> EVENTS_RXSTARTED_R { + EVENTS_RXSTARTED_R::new((self.bits & 1) != 0) + } +} +impl W { + #[doc = "Bit 0 - Receive sequence started"] + #[inline(always)] + #[must_use] + pub fn events_rxstarted(&mut self) -> EVENTS_RXSTARTED_W<0> { + EVENTS_RXSTARTED_W::new(self) + } + #[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 = "Receive sequence started\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 [events_rxstarted](index.html) module"] +pub struct EVENTS_RXSTARTED_SPEC; +impl crate::RegisterSpec for EVENTS_RXSTARTED_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [events_rxstarted::R](R) reader structure"] +impl crate::Readable for EVENTS_RXSTARTED_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [events_rxstarted::W](W) writer structure"] +impl crate::Writable for EVENTS_RXSTARTED_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets EVENTS_RXSTARTED to value 0"] +impl crate::Resettable for EVENTS_RXSTARTED_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/twim0/events_stopped.rs b/down-the-stack/dk_pac/src/twim0/events_stopped.rs new file mode 100644 index 0000000..4663646 --- /dev/null +++ b/down-the-stack/dk_pac/src/twim0/events_stopped.rs @@ -0,0 +1,127 @@ +#[doc = "Register `EVENTS_STOPPED` 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 `EVENTS_STOPPED` 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 `EVENTS_STOPPED` reader - TWI stopped"] +pub type EVENTS_STOPPED_R = crate::BitReader; +#[doc = "TWI stopped\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum EVENTS_STOPPED_A { + #[doc = "0: Event not generated"] + NOT_GENERATED = 0, + #[doc = "1: Event generated"] + GENERATED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: EVENTS_STOPPED_A) -> Self { + variant as u8 != 0 + } +} +impl EVENTS_STOPPED_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> EVENTS_STOPPED_A { + match self.bits { + false => EVENTS_STOPPED_A::NOT_GENERATED, + true => EVENTS_STOPPED_A::GENERATED, + } + } + #[doc = "Checks if the value of the field is `NOT_GENERATED`"] + #[inline(always)] + pub fn is_not_generated(&self) -> bool { + *self == EVENTS_STOPPED_A::NOT_GENERATED + } + #[doc = "Checks if the value of the field is `GENERATED`"] + #[inline(always)] + pub fn is_generated(&self) -> bool { + *self == EVENTS_STOPPED_A::GENERATED + } +} +#[doc = "Field `EVENTS_STOPPED` writer - TWI stopped"] +pub type EVENTS_STOPPED_W<'a, const O: u8> = + crate::BitWriter<'a, u32, EVENTS_STOPPED_SPEC, EVENTS_STOPPED_A, O>; +impl<'a, const O: u8> EVENTS_STOPPED_W<'a, O> { + #[doc = "Event not generated"] + #[inline(always)] + pub fn not_generated(self) -> &'a mut W { + self.variant(EVENTS_STOPPED_A::NOT_GENERATED) + } + #[doc = "Event generated"] + #[inline(always)] + pub fn generated(self) -> &'a mut W { + self.variant(EVENTS_STOPPED_A::GENERATED) + } +} +impl R { + #[doc = "Bit 0 - TWI stopped"] + #[inline(always)] + pub fn events_stopped(&self) -> EVENTS_STOPPED_R { + EVENTS_STOPPED_R::new((self.bits & 1) != 0) + } +} +impl W { + #[doc = "Bit 0 - TWI stopped"] + #[inline(always)] + #[must_use] + pub fn events_stopped(&mut self) -> EVENTS_STOPPED_W<0> { + EVENTS_STOPPED_W::new(self) + } + #[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 = "TWI stopped\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 [events_stopped](index.html) module"] +pub struct EVENTS_STOPPED_SPEC; +impl crate::RegisterSpec for EVENTS_STOPPED_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [events_stopped::R](R) reader structure"] +impl crate::Readable for EVENTS_STOPPED_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [events_stopped::W](W) writer structure"] +impl crate::Writable for EVENTS_STOPPED_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets EVENTS_STOPPED to value 0"] +impl crate::Resettable for EVENTS_STOPPED_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/twim0/events_suspended.rs b/down-the-stack/dk_pac/src/twim0/events_suspended.rs new file mode 100644 index 0000000..1c45ba4 --- /dev/null +++ b/down-the-stack/dk_pac/src/twim0/events_suspended.rs @@ -0,0 +1,127 @@ +#[doc = "Register `EVENTS_SUSPENDED` 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 `EVENTS_SUSPENDED` 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 `EVENTS_SUSPENDED` reader - Last byte has been sent out after the SUSPEND task has been issued, TWI traffic is now suspended."] +pub type EVENTS_SUSPENDED_R = crate::BitReader; +#[doc = "Last byte has been sent out after the SUSPEND task has been issued, TWI traffic is now suspended.\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum EVENTS_SUSPENDED_A { + #[doc = "0: Event not generated"] + NOT_GENERATED = 0, + #[doc = "1: Event generated"] + GENERATED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: EVENTS_SUSPENDED_A) -> Self { + variant as u8 != 0 + } +} +impl EVENTS_SUSPENDED_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> EVENTS_SUSPENDED_A { + match self.bits { + false => EVENTS_SUSPENDED_A::NOT_GENERATED, + true => EVENTS_SUSPENDED_A::GENERATED, + } + } + #[doc = "Checks if the value of the field is `NOT_GENERATED`"] + #[inline(always)] + pub fn is_not_generated(&self) -> bool { + *self == EVENTS_SUSPENDED_A::NOT_GENERATED + } + #[doc = "Checks if the value of the field is `GENERATED`"] + #[inline(always)] + pub fn is_generated(&self) -> bool { + *self == EVENTS_SUSPENDED_A::GENERATED + } +} +#[doc = "Field `EVENTS_SUSPENDED` writer - Last byte has been sent out after the SUSPEND task has been issued, TWI traffic is now suspended."] +pub type EVENTS_SUSPENDED_W<'a, const O: u8> = + crate::BitWriter<'a, u32, EVENTS_SUSPENDED_SPEC, EVENTS_SUSPENDED_A, O>; +impl<'a, const O: u8> EVENTS_SUSPENDED_W<'a, O> { + #[doc = "Event not generated"] + #[inline(always)] + pub fn not_generated(self) -> &'a mut W { + self.variant(EVENTS_SUSPENDED_A::NOT_GENERATED) + } + #[doc = "Event generated"] + #[inline(always)] + pub fn generated(self) -> &'a mut W { + self.variant(EVENTS_SUSPENDED_A::GENERATED) + } +} +impl R { + #[doc = "Bit 0 - Last byte has been sent out after the SUSPEND task has been issued, TWI traffic is now suspended."] + #[inline(always)] + pub fn events_suspended(&self) -> EVENTS_SUSPENDED_R { + EVENTS_SUSPENDED_R::new((self.bits & 1) != 0) + } +} +impl W { + #[doc = "Bit 0 - Last byte has been sent out after the SUSPEND task has been issued, TWI traffic is now suspended."] + #[inline(always)] + #[must_use] + pub fn events_suspended(&mut self) -> EVENTS_SUSPENDED_W<0> { + EVENTS_SUSPENDED_W::new(self) + } + #[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 = "Last byte has been sent out after the SUSPEND task has been issued, TWI traffic is now suspended.\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 [events_suspended](index.html) module"] +pub struct EVENTS_SUSPENDED_SPEC; +impl crate::RegisterSpec for EVENTS_SUSPENDED_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [events_suspended::R](R) reader structure"] +impl crate::Readable for EVENTS_SUSPENDED_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [events_suspended::W](W) writer structure"] +impl crate::Writable for EVENTS_SUSPENDED_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets EVENTS_SUSPENDED to value 0"] +impl crate::Resettable for EVENTS_SUSPENDED_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/twim0/events_txstarted.rs b/down-the-stack/dk_pac/src/twim0/events_txstarted.rs new file mode 100644 index 0000000..0cb2e84 --- /dev/null +++ b/down-the-stack/dk_pac/src/twim0/events_txstarted.rs @@ -0,0 +1,127 @@ +#[doc = "Register `EVENTS_TXSTARTED` 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 `EVENTS_TXSTARTED` 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 `EVENTS_TXSTARTED` reader - Transmit sequence started"] +pub type EVENTS_TXSTARTED_R = crate::BitReader; +#[doc = "Transmit sequence started\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum EVENTS_TXSTARTED_A { + #[doc = "0: Event not generated"] + NOT_GENERATED = 0, + #[doc = "1: Event generated"] + GENERATED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: EVENTS_TXSTARTED_A) -> Self { + variant as u8 != 0 + } +} +impl EVENTS_TXSTARTED_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> EVENTS_TXSTARTED_A { + match self.bits { + false => EVENTS_TXSTARTED_A::NOT_GENERATED, + true => EVENTS_TXSTARTED_A::GENERATED, + } + } + #[doc = "Checks if the value of the field is `NOT_GENERATED`"] + #[inline(always)] + pub fn is_not_generated(&self) -> bool { + *self == EVENTS_TXSTARTED_A::NOT_GENERATED + } + #[doc = "Checks if the value of the field is `GENERATED`"] + #[inline(always)] + pub fn is_generated(&self) -> bool { + *self == EVENTS_TXSTARTED_A::GENERATED + } +} +#[doc = "Field `EVENTS_TXSTARTED` writer - Transmit sequence started"] +pub type EVENTS_TXSTARTED_W<'a, const O: u8> = + crate::BitWriter<'a, u32, EVENTS_TXSTARTED_SPEC, EVENTS_TXSTARTED_A, O>; +impl<'a, const O: u8> EVENTS_TXSTARTED_W<'a, O> { + #[doc = "Event not generated"] + #[inline(always)] + pub fn not_generated(self) -> &'a mut W { + self.variant(EVENTS_TXSTARTED_A::NOT_GENERATED) + } + #[doc = "Event generated"] + #[inline(always)] + pub fn generated(self) -> &'a mut W { + self.variant(EVENTS_TXSTARTED_A::GENERATED) + } +} +impl R { + #[doc = "Bit 0 - Transmit sequence started"] + #[inline(always)] + pub fn events_txstarted(&self) -> EVENTS_TXSTARTED_R { + EVENTS_TXSTARTED_R::new((self.bits & 1) != 0) + } +} +impl W { + #[doc = "Bit 0 - Transmit sequence started"] + #[inline(always)] + #[must_use] + pub fn events_txstarted(&mut self) -> EVENTS_TXSTARTED_W<0> { + EVENTS_TXSTARTED_W::new(self) + } + #[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 = "Transmit sequence started\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 [events_txstarted](index.html) module"] +pub struct EVENTS_TXSTARTED_SPEC; +impl crate::RegisterSpec for EVENTS_TXSTARTED_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [events_txstarted::R](R) reader structure"] +impl crate::Readable for EVENTS_TXSTARTED_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [events_txstarted::W](W) writer structure"] +impl crate::Writable for EVENTS_TXSTARTED_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets EVENTS_TXSTARTED to value 0"] +impl crate::Resettable for EVENTS_TXSTARTED_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/twim0/frequency.rs b/down-the-stack/dk_pac/src/twim0/frequency.rs new file mode 100644 index 0000000..b0e1cc8 --- /dev/null +++ b/down-the-stack/dk_pac/src/twim0/frequency.rs @@ -0,0 +1,142 @@ +#[doc = "Register `FREQUENCY` 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 `FREQUENCY` 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 `FREQUENCY` reader - TWI master clock frequency"] +pub type FREQUENCY_R = crate::FieldReader; +#[doc = "TWI master clock frequency\n\nValue on reset: 67108864"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +#[repr(u32)] +pub enum FREQUENCY_A { + #[doc = "26738688: 100 kbps"] + K100 = 26738688, + #[doc = "67108864: 250 kbps"] + K250 = 67108864, + #[doc = "104857600: 400 kbps"] + K400 = 104857600, +} +impl From for u32 { + #[inline(always)] + fn from(variant: FREQUENCY_A) -> Self { + variant as _ + } +} +impl FREQUENCY_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> Option { + match self.bits { + 26738688 => Some(FREQUENCY_A::K100), + 67108864 => Some(FREQUENCY_A::K250), + 104857600 => Some(FREQUENCY_A::K400), + _ => None, + } + } + #[doc = "Checks if the value of the field is `K100`"] + #[inline(always)] + pub fn is_k100(&self) -> bool { + *self == FREQUENCY_A::K100 + } + #[doc = "Checks if the value of the field is `K250`"] + #[inline(always)] + pub fn is_k250(&self) -> bool { + *self == FREQUENCY_A::K250 + } + #[doc = "Checks if the value of the field is `K400`"] + #[inline(always)] + pub fn is_k400(&self) -> bool { + *self == FREQUENCY_A::K400 + } +} +#[doc = "Field `FREQUENCY` writer - TWI master clock frequency"] +pub type FREQUENCY_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, FREQUENCY_SPEC, u32, FREQUENCY_A, 32, O>; +impl<'a, const O: u8> FREQUENCY_W<'a, O> { + #[doc = "100 kbps"] + #[inline(always)] + pub fn k100(self) -> &'a mut W { + self.variant(FREQUENCY_A::K100) + } + #[doc = "250 kbps"] + #[inline(always)] + pub fn k250(self) -> &'a mut W { + self.variant(FREQUENCY_A::K250) + } + #[doc = "400 kbps"] + #[inline(always)] + pub fn k400(self) -> &'a mut W { + self.variant(FREQUENCY_A::K400) + } +} +impl R { + #[doc = "Bits 0:31 - TWI master clock frequency"] + #[inline(always)] + pub fn frequency(&self) -> FREQUENCY_R { + FREQUENCY_R::new(self.bits) + } +} +impl W { + #[doc = "Bits 0:31 - TWI master clock frequency"] + #[inline(always)] + #[must_use] + pub fn frequency(&mut self) -> FREQUENCY_W<0> { + FREQUENCY_W::new(self) + } + #[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 = "TWI frequency\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 [frequency](index.html) module"] +pub struct FREQUENCY_SPEC; +impl crate::RegisterSpec for FREQUENCY_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [frequency::R](R) reader structure"] +impl crate::Readable for FREQUENCY_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [frequency::W](W) writer structure"] +impl crate::Writable for FREQUENCY_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets FREQUENCY to value 0x0400_0000"] +impl crate::Resettable for FREQUENCY_SPEC { + const RESET_VALUE: Self::Ux = 0x0400_0000; +} diff --git a/down-the-stack/dk_pac/src/twim0/inten.rs b/down-the-stack/dk_pac/src/twim0/inten.rs new file mode 100644 index 0000000..3014cdb --- /dev/null +++ b/down-the-stack/dk_pac/src/twim0/inten.rs @@ -0,0 +1,492 @@ +#[doc = "Register `INTEN` 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 `INTEN` 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 `STOPPED` reader - Enable or disable interrupt for event STOPPED"] +pub type STOPPED_R = crate::BitReader; +#[doc = "Enable or disable interrupt for event STOPPED\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum STOPPED_A { + #[doc = "0: Disable"] + DISABLED = 0, + #[doc = "1: Enable"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: STOPPED_A) -> Self { + variant as u8 != 0 + } +} +impl STOPPED_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> STOPPED_A { + match self.bits { + false => STOPPED_A::DISABLED, + true => STOPPED_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == STOPPED_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == STOPPED_A::ENABLED + } +} +#[doc = "Field `STOPPED` writer - Enable or disable interrupt for event STOPPED"] +pub type STOPPED_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTEN_SPEC, STOPPED_A, O>; +impl<'a, const O: u8> STOPPED_W<'a, O> { + #[doc = "Disable"] + #[inline(always)] + pub fn disabled(self) -> &'a mut W { + self.variant(STOPPED_A::DISABLED) + } + #[doc = "Enable"] + #[inline(always)] + pub fn enabled(self) -> &'a mut W { + self.variant(STOPPED_A::ENABLED) + } +} +#[doc = "Field `ERROR` reader - Enable or disable interrupt for event ERROR"] +pub type ERROR_R = crate::BitReader; +#[doc = "Enable or disable interrupt for event ERROR\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum ERROR_A { + #[doc = "0: Disable"] + DISABLED = 0, + #[doc = "1: Enable"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: ERROR_A) -> Self { + variant as u8 != 0 + } +} +impl ERROR_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> ERROR_A { + match self.bits { + false => ERROR_A::DISABLED, + true => ERROR_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == ERROR_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == ERROR_A::ENABLED + } +} +#[doc = "Field `ERROR` writer - Enable or disable interrupt for event ERROR"] +pub type ERROR_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTEN_SPEC, ERROR_A, O>; +impl<'a, const O: u8> ERROR_W<'a, O> { + #[doc = "Disable"] + #[inline(always)] + pub fn disabled(self) -> &'a mut W { + self.variant(ERROR_A::DISABLED) + } + #[doc = "Enable"] + #[inline(always)] + pub fn enabled(self) -> &'a mut W { + self.variant(ERROR_A::ENABLED) + } +} +#[doc = "Field `SUSPENDED` reader - Enable or disable interrupt for event SUSPENDED"] +pub type SUSPENDED_R = crate::BitReader; +#[doc = "Enable or disable interrupt for event SUSPENDED\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum SUSPENDED_A { + #[doc = "0: Disable"] + DISABLED = 0, + #[doc = "1: Enable"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: SUSPENDED_A) -> Self { + variant as u8 != 0 + } +} +impl SUSPENDED_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> SUSPENDED_A { + match self.bits { + false => SUSPENDED_A::DISABLED, + true => SUSPENDED_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == SUSPENDED_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == SUSPENDED_A::ENABLED + } +} +#[doc = "Field `SUSPENDED` writer - Enable or disable interrupt for event SUSPENDED"] +pub type SUSPENDED_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTEN_SPEC, SUSPENDED_A, O>; +impl<'a, const O: u8> SUSPENDED_W<'a, O> { + #[doc = "Disable"] + #[inline(always)] + pub fn disabled(self) -> &'a mut W { + self.variant(SUSPENDED_A::DISABLED) + } + #[doc = "Enable"] + #[inline(always)] + pub fn enabled(self) -> &'a mut W { + self.variant(SUSPENDED_A::ENABLED) + } +} +#[doc = "Field `RXSTARTED` reader - Enable or disable interrupt for event RXSTARTED"] +pub type RXSTARTED_R = crate::BitReader; +#[doc = "Enable or disable interrupt for event RXSTARTED\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum RXSTARTED_A { + #[doc = "0: Disable"] + DISABLED = 0, + #[doc = "1: Enable"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: RXSTARTED_A) -> Self { + variant as u8 != 0 + } +} +impl RXSTARTED_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> RXSTARTED_A { + match self.bits { + false => RXSTARTED_A::DISABLED, + true => RXSTARTED_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == RXSTARTED_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == RXSTARTED_A::ENABLED + } +} +#[doc = "Field `RXSTARTED` writer - Enable or disable interrupt for event RXSTARTED"] +pub type RXSTARTED_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTEN_SPEC, RXSTARTED_A, O>; +impl<'a, const O: u8> RXSTARTED_W<'a, O> { + #[doc = "Disable"] + #[inline(always)] + pub fn disabled(self) -> &'a mut W { + self.variant(RXSTARTED_A::DISABLED) + } + #[doc = "Enable"] + #[inline(always)] + pub fn enabled(self) -> &'a mut W { + self.variant(RXSTARTED_A::ENABLED) + } +} +#[doc = "Field `TXSTARTED` reader - Enable or disable interrupt for event TXSTARTED"] +pub type TXSTARTED_R = crate::BitReader; +#[doc = "Enable or disable interrupt for event TXSTARTED\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum TXSTARTED_A { + #[doc = "0: Disable"] + DISABLED = 0, + #[doc = "1: Enable"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: TXSTARTED_A) -> Self { + variant as u8 != 0 + } +} +impl TXSTARTED_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> TXSTARTED_A { + match self.bits { + false => TXSTARTED_A::DISABLED, + true => TXSTARTED_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == TXSTARTED_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == TXSTARTED_A::ENABLED + } +} +#[doc = "Field `TXSTARTED` writer - Enable or disable interrupt for event TXSTARTED"] +pub type TXSTARTED_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTEN_SPEC, TXSTARTED_A, O>; +impl<'a, const O: u8> TXSTARTED_W<'a, O> { + #[doc = "Disable"] + #[inline(always)] + pub fn disabled(self) -> &'a mut W { + self.variant(TXSTARTED_A::DISABLED) + } + #[doc = "Enable"] + #[inline(always)] + pub fn enabled(self) -> &'a mut W { + self.variant(TXSTARTED_A::ENABLED) + } +} +#[doc = "Field `LASTRX` reader - Enable or disable interrupt for event LASTRX"] +pub type LASTRX_R = crate::BitReader; +#[doc = "Enable or disable interrupt for event LASTRX\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum LASTRX_A { + #[doc = "0: Disable"] + DISABLED = 0, + #[doc = "1: Enable"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: LASTRX_A) -> Self { + variant as u8 != 0 + } +} +impl LASTRX_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> LASTRX_A { + match self.bits { + false => LASTRX_A::DISABLED, + true => LASTRX_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == LASTRX_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == LASTRX_A::ENABLED + } +} +#[doc = "Field `LASTRX` writer - Enable or disable interrupt for event LASTRX"] +pub type LASTRX_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTEN_SPEC, LASTRX_A, O>; +impl<'a, const O: u8> LASTRX_W<'a, O> { + #[doc = "Disable"] + #[inline(always)] + pub fn disabled(self) -> &'a mut W { + self.variant(LASTRX_A::DISABLED) + } + #[doc = "Enable"] + #[inline(always)] + pub fn enabled(self) -> &'a mut W { + self.variant(LASTRX_A::ENABLED) + } +} +#[doc = "Field `LASTTX` reader - Enable or disable interrupt for event LASTTX"] +pub type LASTTX_R = crate::BitReader; +#[doc = "Enable or disable interrupt for event LASTTX\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum LASTTX_A { + #[doc = "0: Disable"] + DISABLED = 0, + #[doc = "1: Enable"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: LASTTX_A) -> Self { + variant as u8 != 0 + } +} +impl LASTTX_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> LASTTX_A { + match self.bits { + false => LASTTX_A::DISABLED, + true => LASTTX_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == LASTTX_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == LASTTX_A::ENABLED + } +} +#[doc = "Field `LASTTX` writer - Enable or disable interrupt for event LASTTX"] +pub type LASTTX_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTEN_SPEC, LASTTX_A, O>; +impl<'a, const O: u8> LASTTX_W<'a, O> { + #[doc = "Disable"] + #[inline(always)] + pub fn disabled(self) -> &'a mut W { + self.variant(LASTTX_A::DISABLED) + } + #[doc = "Enable"] + #[inline(always)] + pub fn enabled(self) -> &'a mut W { + self.variant(LASTTX_A::ENABLED) + } +} +impl R { + #[doc = "Bit 1 - Enable or disable interrupt for event STOPPED"] + #[inline(always)] + pub fn stopped(&self) -> STOPPED_R { + STOPPED_R::new(((self.bits >> 1) & 1) != 0) + } + #[doc = "Bit 9 - Enable or disable interrupt for event ERROR"] + #[inline(always)] + pub fn error(&self) -> ERROR_R { + ERROR_R::new(((self.bits >> 9) & 1) != 0) + } + #[doc = "Bit 18 - Enable or disable interrupt for event SUSPENDED"] + #[inline(always)] + pub fn suspended(&self) -> SUSPENDED_R { + SUSPENDED_R::new(((self.bits >> 18) & 1) != 0) + } + #[doc = "Bit 19 - Enable or disable interrupt for event RXSTARTED"] + #[inline(always)] + pub fn rxstarted(&self) -> RXSTARTED_R { + RXSTARTED_R::new(((self.bits >> 19) & 1) != 0) + } + #[doc = "Bit 20 - Enable or disable interrupt for event TXSTARTED"] + #[inline(always)] + pub fn txstarted(&self) -> TXSTARTED_R { + TXSTARTED_R::new(((self.bits >> 20) & 1) != 0) + } + #[doc = "Bit 23 - Enable or disable interrupt for event LASTRX"] + #[inline(always)] + pub fn lastrx(&self) -> LASTRX_R { + LASTRX_R::new(((self.bits >> 23) & 1) != 0) + } + #[doc = "Bit 24 - Enable or disable interrupt for event LASTTX"] + #[inline(always)] + pub fn lasttx(&self) -> LASTTX_R { + LASTTX_R::new(((self.bits >> 24) & 1) != 0) + } +} +impl W { + #[doc = "Bit 1 - Enable or disable interrupt for event STOPPED"] + #[inline(always)] + #[must_use] + pub fn stopped(&mut self) -> STOPPED_W<1> { + STOPPED_W::new(self) + } + #[doc = "Bit 9 - Enable or disable interrupt for event ERROR"] + #[inline(always)] + #[must_use] + pub fn error(&mut self) -> ERROR_W<9> { + ERROR_W::new(self) + } + #[doc = "Bit 18 - Enable or disable interrupt for event SUSPENDED"] + #[inline(always)] + #[must_use] + pub fn suspended(&mut self) -> SUSPENDED_W<18> { + SUSPENDED_W::new(self) + } + #[doc = "Bit 19 - Enable or disable interrupt for event RXSTARTED"] + #[inline(always)] + #[must_use] + pub fn rxstarted(&mut self) -> RXSTARTED_W<19> { + RXSTARTED_W::new(self) + } + #[doc = "Bit 20 - Enable or disable interrupt for event TXSTARTED"] + #[inline(always)] + #[must_use] + pub fn txstarted(&mut self) -> TXSTARTED_W<20> { + TXSTARTED_W::new(self) + } + #[doc = "Bit 23 - Enable or disable interrupt for event LASTRX"] + #[inline(always)] + #[must_use] + pub fn lastrx(&mut self) -> LASTRX_W<23> { + LASTRX_W::new(self) + } + #[doc = "Bit 24 - Enable or disable interrupt for event LASTTX"] + #[inline(always)] + #[must_use] + pub fn lasttx(&mut self) -> LASTTX_W<24> { + LASTTX_W::new(self) + } + #[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 = "Enable or disable interrupt\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 [inten](index.html) module"] +pub struct INTEN_SPEC; +impl crate::RegisterSpec for INTEN_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [inten::R](R) reader structure"] +impl crate::Readable for INTEN_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [inten::W](W) writer structure"] +impl crate::Writable for INTEN_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets INTEN to value 0"] +impl crate::Resettable for INTEN_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/twim0/intenclr.rs b/down-the-stack/dk_pac/src/twim0/intenclr.rs new file mode 100644 index 0000000..13706aa --- /dev/null +++ b/down-the-stack/dk_pac/src/twim0/intenclr.rs @@ -0,0 +1,541 @@ +#[doc = "Register `INTENCLR` 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 `INTENCLR` 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 `STOPPED` reader - Write '1' to disable interrupt for event STOPPED"] +pub type STOPPED_R = crate::BitReader; +#[doc = "Write '1' to disable interrupt for event STOPPED\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum STOPPED_A { + #[doc = "0: Read: Disabled"] + DISABLED = 0, + #[doc = "1: Read: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: STOPPED_A) -> Self { + variant as u8 != 0 + } +} +impl STOPPED_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> STOPPED_A { + match self.bits { + false => STOPPED_A::DISABLED, + true => STOPPED_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == STOPPED_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == STOPPED_A::ENABLED + } +} +#[doc = "Write '1' to disable interrupt for event STOPPED\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum STOPPED_AW { + #[doc = "1: Disable"] + CLEAR = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: STOPPED_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `STOPPED` writer - Write '1' to disable interrupt for event STOPPED"] +pub type STOPPED_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENCLR_SPEC, STOPPED_AW, O>; +impl<'a, const O: u8> STOPPED_W<'a, O> { + #[doc = "Disable"] + #[inline(always)] + pub fn clear(self) -> &'a mut W { + self.variant(STOPPED_AW::CLEAR) + } +} +#[doc = "Field `ERROR` reader - Write '1' to disable interrupt for event ERROR"] +pub type ERROR_R = crate::BitReader; +#[doc = "Write '1' to disable interrupt for event ERROR\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum ERROR_A { + #[doc = "0: Read: Disabled"] + DISABLED = 0, + #[doc = "1: Read: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: ERROR_A) -> Self { + variant as u8 != 0 + } +} +impl ERROR_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> ERROR_A { + match self.bits { + false => ERROR_A::DISABLED, + true => ERROR_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == ERROR_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == ERROR_A::ENABLED + } +} +#[doc = "Write '1' to disable interrupt for event ERROR\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum ERROR_AW { + #[doc = "1: Disable"] + CLEAR = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: ERROR_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `ERROR` writer - Write '1' to disable interrupt for event ERROR"] +pub type ERROR_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENCLR_SPEC, ERROR_AW, O>; +impl<'a, const O: u8> ERROR_W<'a, O> { + #[doc = "Disable"] + #[inline(always)] + pub fn clear(self) -> &'a mut W { + self.variant(ERROR_AW::CLEAR) + } +} +#[doc = "Field `SUSPENDED` reader - Write '1' to disable interrupt for event SUSPENDED"] +pub type SUSPENDED_R = crate::BitReader; +#[doc = "Write '1' to disable interrupt for event SUSPENDED\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum SUSPENDED_A { + #[doc = "0: Read: Disabled"] + DISABLED = 0, + #[doc = "1: Read: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: SUSPENDED_A) -> Self { + variant as u8 != 0 + } +} +impl SUSPENDED_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> SUSPENDED_A { + match self.bits { + false => SUSPENDED_A::DISABLED, + true => SUSPENDED_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == SUSPENDED_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == SUSPENDED_A::ENABLED + } +} +#[doc = "Write '1' to disable interrupt for event SUSPENDED\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum SUSPENDED_AW { + #[doc = "1: Disable"] + CLEAR = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: SUSPENDED_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `SUSPENDED` writer - Write '1' to disable interrupt for event SUSPENDED"] +pub type SUSPENDED_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENCLR_SPEC, SUSPENDED_AW, O>; +impl<'a, const O: u8> SUSPENDED_W<'a, O> { + #[doc = "Disable"] + #[inline(always)] + pub fn clear(self) -> &'a mut W { + self.variant(SUSPENDED_AW::CLEAR) + } +} +#[doc = "Field `RXSTARTED` reader - Write '1' to disable interrupt for event RXSTARTED"] +pub type RXSTARTED_R = crate::BitReader; +#[doc = "Write '1' to disable interrupt for event RXSTARTED\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum RXSTARTED_A { + #[doc = "0: Read: Disabled"] + DISABLED = 0, + #[doc = "1: Read: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: RXSTARTED_A) -> Self { + variant as u8 != 0 + } +} +impl RXSTARTED_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> RXSTARTED_A { + match self.bits { + false => RXSTARTED_A::DISABLED, + true => RXSTARTED_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == RXSTARTED_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == RXSTARTED_A::ENABLED + } +} +#[doc = "Write '1' to disable interrupt for event RXSTARTED\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum RXSTARTED_AW { + #[doc = "1: Disable"] + CLEAR = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: RXSTARTED_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `RXSTARTED` writer - Write '1' to disable interrupt for event RXSTARTED"] +pub type RXSTARTED_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENCLR_SPEC, RXSTARTED_AW, O>; +impl<'a, const O: u8> RXSTARTED_W<'a, O> { + #[doc = "Disable"] + #[inline(always)] + pub fn clear(self) -> &'a mut W { + self.variant(RXSTARTED_AW::CLEAR) + } +} +#[doc = "Field `TXSTARTED` reader - Write '1' to disable interrupt for event TXSTARTED"] +pub type TXSTARTED_R = crate::BitReader; +#[doc = "Write '1' to disable interrupt for event TXSTARTED\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum TXSTARTED_A { + #[doc = "0: Read: Disabled"] + DISABLED = 0, + #[doc = "1: Read: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: TXSTARTED_A) -> Self { + variant as u8 != 0 + } +} +impl TXSTARTED_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> TXSTARTED_A { + match self.bits { + false => TXSTARTED_A::DISABLED, + true => TXSTARTED_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == TXSTARTED_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == TXSTARTED_A::ENABLED + } +} +#[doc = "Write '1' to disable interrupt for event TXSTARTED\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum TXSTARTED_AW { + #[doc = "1: Disable"] + CLEAR = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: TXSTARTED_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `TXSTARTED` writer - Write '1' to disable interrupt for event TXSTARTED"] +pub type TXSTARTED_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENCLR_SPEC, TXSTARTED_AW, O>; +impl<'a, const O: u8> TXSTARTED_W<'a, O> { + #[doc = "Disable"] + #[inline(always)] + pub fn clear(self) -> &'a mut W { + self.variant(TXSTARTED_AW::CLEAR) + } +} +#[doc = "Field `LASTRX` reader - Write '1' to disable interrupt for event LASTRX"] +pub type LASTRX_R = crate::BitReader; +#[doc = "Write '1' to disable interrupt for event LASTRX\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum LASTRX_A { + #[doc = "0: Read: Disabled"] + DISABLED = 0, + #[doc = "1: Read: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: LASTRX_A) -> Self { + variant as u8 != 0 + } +} +impl LASTRX_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> LASTRX_A { + match self.bits { + false => LASTRX_A::DISABLED, + true => LASTRX_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == LASTRX_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == LASTRX_A::ENABLED + } +} +#[doc = "Write '1' to disable interrupt for event LASTRX\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum LASTRX_AW { + #[doc = "1: Disable"] + CLEAR = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: LASTRX_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `LASTRX` writer - Write '1' to disable interrupt for event LASTRX"] +pub type LASTRX_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENCLR_SPEC, LASTRX_AW, O>; +impl<'a, const O: u8> LASTRX_W<'a, O> { + #[doc = "Disable"] + #[inline(always)] + pub fn clear(self) -> &'a mut W { + self.variant(LASTRX_AW::CLEAR) + } +} +#[doc = "Field `LASTTX` reader - Write '1' to disable interrupt for event LASTTX"] +pub type LASTTX_R = crate::BitReader; +#[doc = "Write '1' to disable interrupt for event LASTTX\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum LASTTX_A { + #[doc = "0: Read: Disabled"] + DISABLED = 0, + #[doc = "1: Read: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: LASTTX_A) -> Self { + variant as u8 != 0 + } +} +impl LASTTX_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> LASTTX_A { + match self.bits { + false => LASTTX_A::DISABLED, + true => LASTTX_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == LASTTX_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == LASTTX_A::ENABLED + } +} +#[doc = "Write '1' to disable interrupt for event LASTTX\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum LASTTX_AW { + #[doc = "1: Disable"] + CLEAR = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: LASTTX_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `LASTTX` writer - Write '1' to disable interrupt for event LASTTX"] +pub type LASTTX_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENCLR_SPEC, LASTTX_AW, O>; +impl<'a, const O: u8> LASTTX_W<'a, O> { + #[doc = "Disable"] + #[inline(always)] + pub fn clear(self) -> &'a mut W { + self.variant(LASTTX_AW::CLEAR) + } +} +impl R { + #[doc = "Bit 1 - Write '1' to disable interrupt for event STOPPED"] + #[inline(always)] + pub fn stopped(&self) -> STOPPED_R { + STOPPED_R::new(((self.bits >> 1) & 1) != 0) + } + #[doc = "Bit 9 - Write '1' to disable interrupt for event ERROR"] + #[inline(always)] + pub fn error(&self) -> ERROR_R { + ERROR_R::new(((self.bits >> 9) & 1) != 0) + } + #[doc = "Bit 18 - Write '1' to disable interrupt for event SUSPENDED"] + #[inline(always)] + pub fn suspended(&self) -> SUSPENDED_R { + SUSPENDED_R::new(((self.bits >> 18) & 1) != 0) + } + #[doc = "Bit 19 - Write '1' to disable interrupt for event RXSTARTED"] + #[inline(always)] + pub fn rxstarted(&self) -> RXSTARTED_R { + RXSTARTED_R::new(((self.bits >> 19) & 1) != 0) + } + #[doc = "Bit 20 - Write '1' to disable interrupt for event TXSTARTED"] + #[inline(always)] + pub fn txstarted(&self) -> TXSTARTED_R { + TXSTARTED_R::new(((self.bits >> 20) & 1) != 0) + } + #[doc = "Bit 23 - Write '1' to disable interrupt for event LASTRX"] + #[inline(always)] + pub fn lastrx(&self) -> LASTRX_R { + LASTRX_R::new(((self.bits >> 23) & 1) != 0) + } + #[doc = "Bit 24 - Write '1' to disable interrupt for event LASTTX"] + #[inline(always)] + pub fn lasttx(&self) -> LASTTX_R { + LASTTX_R::new(((self.bits >> 24) & 1) != 0) + } +} +impl W { + #[doc = "Bit 1 - Write '1' to disable interrupt for event STOPPED"] + #[inline(always)] + #[must_use] + pub fn stopped(&mut self) -> STOPPED_W<1> { + STOPPED_W::new(self) + } + #[doc = "Bit 9 - Write '1' to disable interrupt for event ERROR"] + #[inline(always)] + #[must_use] + pub fn error(&mut self) -> ERROR_W<9> { + ERROR_W::new(self) + } + #[doc = "Bit 18 - Write '1' to disable interrupt for event SUSPENDED"] + #[inline(always)] + #[must_use] + pub fn suspended(&mut self) -> SUSPENDED_W<18> { + SUSPENDED_W::new(self) + } + #[doc = "Bit 19 - Write '1' to disable interrupt for event RXSTARTED"] + #[inline(always)] + #[must_use] + pub fn rxstarted(&mut self) -> RXSTARTED_W<19> { + RXSTARTED_W::new(self) + } + #[doc = "Bit 20 - Write '1' to disable interrupt for event TXSTARTED"] + #[inline(always)] + #[must_use] + pub fn txstarted(&mut self) -> TXSTARTED_W<20> { + TXSTARTED_W::new(self) + } + #[doc = "Bit 23 - Write '1' to disable interrupt for event LASTRX"] + #[inline(always)] + #[must_use] + pub fn lastrx(&mut self) -> LASTRX_W<23> { + LASTRX_W::new(self) + } + #[doc = "Bit 24 - Write '1' to disable interrupt for event LASTTX"] + #[inline(always)] + #[must_use] + pub fn lasttx(&mut self) -> LASTTX_W<24> { + LASTTX_W::new(self) + } + #[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 = "Disable interrupt\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 [intenclr](index.html) module"] +pub struct INTENCLR_SPEC; +impl crate::RegisterSpec for INTENCLR_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [intenclr::R](R) reader structure"] +impl crate::Readable for INTENCLR_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [intenclr::W](W) writer structure"] +impl crate::Writable for INTENCLR_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets INTENCLR to value 0"] +impl crate::Resettable for INTENCLR_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/twim0/intenset.rs b/down-the-stack/dk_pac/src/twim0/intenset.rs new file mode 100644 index 0000000..c34fd92 --- /dev/null +++ b/down-the-stack/dk_pac/src/twim0/intenset.rs @@ -0,0 +1,541 @@ +#[doc = "Register `INTENSET` 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 `INTENSET` 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 `STOPPED` reader - Write '1' to enable interrupt for event STOPPED"] +pub type STOPPED_R = crate::BitReader; +#[doc = "Write '1' to enable interrupt for event STOPPED\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum STOPPED_A { + #[doc = "0: Read: Disabled"] + DISABLED = 0, + #[doc = "1: Read: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: STOPPED_A) -> Self { + variant as u8 != 0 + } +} +impl STOPPED_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> STOPPED_A { + match self.bits { + false => STOPPED_A::DISABLED, + true => STOPPED_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == STOPPED_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == STOPPED_A::ENABLED + } +} +#[doc = "Write '1' to enable interrupt for event STOPPED\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum STOPPED_AW { + #[doc = "1: Enable"] + SET = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: STOPPED_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `STOPPED` writer - Write '1' to enable interrupt for event STOPPED"] +pub type STOPPED_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENSET_SPEC, STOPPED_AW, O>; +impl<'a, const O: u8> STOPPED_W<'a, O> { + #[doc = "Enable"] + #[inline(always)] + pub fn set(self) -> &'a mut W { + self.variant(STOPPED_AW::SET) + } +} +#[doc = "Field `ERROR` reader - Write '1' to enable interrupt for event ERROR"] +pub type ERROR_R = crate::BitReader; +#[doc = "Write '1' to enable interrupt for event ERROR\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum ERROR_A { + #[doc = "0: Read: Disabled"] + DISABLED = 0, + #[doc = "1: Read: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: ERROR_A) -> Self { + variant as u8 != 0 + } +} +impl ERROR_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> ERROR_A { + match self.bits { + false => ERROR_A::DISABLED, + true => ERROR_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == ERROR_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == ERROR_A::ENABLED + } +} +#[doc = "Write '1' to enable interrupt for event ERROR\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum ERROR_AW { + #[doc = "1: Enable"] + SET = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: ERROR_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `ERROR` writer - Write '1' to enable interrupt for event ERROR"] +pub type ERROR_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENSET_SPEC, ERROR_AW, O>; +impl<'a, const O: u8> ERROR_W<'a, O> { + #[doc = "Enable"] + #[inline(always)] + pub fn set(self) -> &'a mut W { + self.variant(ERROR_AW::SET) + } +} +#[doc = "Field `SUSPENDED` reader - Write '1' to enable interrupt for event SUSPENDED"] +pub type SUSPENDED_R = crate::BitReader; +#[doc = "Write '1' to enable interrupt for event SUSPENDED\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum SUSPENDED_A { + #[doc = "0: Read: Disabled"] + DISABLED = 0, + #[doc = "1: Read: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: SUSPENDED_A) -> Self { + variant as u8 != 0 + } +} +impl SUSPENDED_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> SUSPENDED_A { + match self.bits { + false => SUSPENDED_A::DISABLED, + true => SUSPENDED_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == SUSPENDED_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == SUSPENDED_A::ENABLED + } +} +#[doc = "Write '1' to enable interrupt for event SUSPENDED\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum SUSPENDED_AW { + #[doc = "1: Enable"] + SET = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: SUSPENDED_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `SUSPENDED` writer - Write '1' to enable interrupt for event SUSPENDED"] +pub type SUSPENDED_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENSET_SPEC, SUSPENDED_AW, O>; +impl<'a, const O: u8> SUSPENDED_W<'a, O> { + #[doc = "Enable"] + #[inline(always)] + pub fn set(self) -> &'a mut W { + self.variant(SUSPENDED_AW::SET) + } +} +#[doc = "Field `RXSTARTED` reader - Write '1' to enable interrupt for event RXSTARTED"] +pub type RXSTARTED_R = crate::BitReader; +#[doc = "Write '1' to enable interrupt for event RXSTARTED\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum RXSTARTED_A { + #[doc = "0: Read: Disabled"] + DISABLED = 0, + #[doc = "1: Read: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: RXSTARTED_A) -> Self { + variant as u8 != 0 + } +} +impl RXSTARTED_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> RXSTARTED_A { + match self.bits { + false => RXSTARTED_A::DISABLED, + true => RXSTARTED_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == RXSTARTED_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == RXSTARTED_A::ENABLED + } +} +#[doc = "Write '1' to enable interrupt for event RXSTARTED\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum RXSTARTED_AW { + #[doc = "1: Enable"] + SET = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: RXSTARTED_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `RXSTARTED` writer - Write '1' to enable interrupt for event RXSTARTED"] +pub type RXSTARTED_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENSET_SPEC, RXSTARTED_AW, O>; +impl<'a, const O: u8> RXSTARTED_W<'a, O> { + #[doc = "Enable"] + #[inline(always)] + pub fn set(self) -> &'a mut W { + self.variant(RXSTARTED_AW::SET) + } +} +#[doc = "Field `TXSTARTED` reader - Write '1' to enable interrupt for event TXSTARTED"] +pub type TXSTARTED_R = crate::BitReader; +#[doc = "Write '1' to enable interrupt for event TXSTARTED\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum TXSTARTED_A { + #[doc = "0: Read: Disabled"] + DISABLED = 0, + #[doc = "1: Read: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: TXSTARTED_A) -> Self { + variant as u8 != 0 + } +} +impl TXSTARTED_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> TXSTARTED_A { + match self.bits { + false => TXSTARTED_A::DISABLED, + true => TXSTARTED_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == TXSTARTED_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == TXSTARTED_A::ENABLED + } +} +#[doc = "Write '1' to enable interrupt for event TXSTARTED\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum TXSTARTED_AW { + #[doc = "1: Enable"] + SET = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: TXSTARTED_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `TXSTARTED` writer - Write '1' to enable interrupt for event TXSTARTED"] +pub type TXSTARTED_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENSET_SPEC, TXSTARTED_AW, O>; +impl<'a, const O: u8> TXSTARTED_W<'a, O> { + #[doc = "Enable"] + #[inline(always)] + pub fn set(self) -> &'a mut W { + self.variant(TXSTARTED_AW::SET) + } +} +#[doc = "Field `LASTRX` reader - Write '1' to enable interrupt for event LASTRX"] +pub type LASTRX_R = crate::BitReader; +#[doc = "Write '1' to enable interrupt for event LASTRX\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum LASTRX_A { + #[doc = "0: Read: Disabled"] + DISABLED = 0, + #[doc = "1: Read: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: LASTRX_A) -> Self { + variant as u8 != 0 + } +} +impl LASTRX_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> LASTRX_A { + match self.bits { + false => LASTRX_A::DISABLED, + true => LASTRX_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == LASTRX_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == LASTRX_A::ENABLED + } +} +#[doc = "Write '1' to enable interrupt for event LASTRX\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum LASTRX_AW { + #[doc = "1: Enable"] + SET = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: LASTRX_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `LASTRX` writer - Write '1' to enable interrupt for event LASTRX"] +pub type LASTRX_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENSET_SPEC, LASTRX_AW, O>; +impl<'a, const O: u8> LASTRX_W<'a, O> { + #[doc = "Enable"] + #[inline(always)] + pub fn set(self) -> &'a mut W { + self.variant(LASTRX_AW::SET) + } +} +#[doc = "Field `LASTTX` reader - Write '1' to enable interrupt for event LASTTX"] +pub type LASTTX_R = crate::BitReader; +#[doc = "Write '1' to enable interrupt for event LASTTX\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum LASTTX_A { + #[doc = "0: Read: Disabled"] + DISABLED = 0, + #[doc = "1: Read: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: LASTTX_A) -> Self { + variant as u8 != 0 + } +} +impl LASTTX_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> LASTTX_A { + match self.bits { + false => LASTTX_A::DISABLED, + true => LASTTX_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == LASTTX_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == LASTTX_A::ENABLED + } +} +#[doc = "Write '1' to enable interrupt for event LASTTX\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum LASTTX_AW { + #[doc = "1: Enable"] + SET = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: LASTTX_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `LASTTX` writer - Write '1' to enable interrupt for event LASTTX"] +pub type LASTTX_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENSET_SPEC, LASTTX_AW, O>; +impl<'a, const O: u8> LASTTX_W<'a, O> { + #[doc = "Enable"] + #[inline(always)] + pub fn set(self) -> &'a mut W { + self.variant(LASTTX_AW::SET) + } +} +impl R { + #[doc = "Bit 1 - Write '1' to enable interrupt for event STOPPED"] + #[inline(always)] + pub fn stopped(&self) -> STOPPED_R { + STOPPED_R::new(((self.bits >> 1) & 1) != 0) + } + #[doc = "Bit 9 - Write '1' to enable interrupt for event ERROR"] + #[inline(always)] + pub fn error(&self) -> ERROR_R { + ERROR_R::new(((self.bits >> 9) & 1) != 0) + } + #[doc = "Bit 18 - Write '1' to enable interrupt for event SUSPENDED"] + #[inline(always)] + pub fn suspended(&self) -> SUSPENDED_R { + SUSPENDED_R::new(((self.bits >> 18) & 1) != 0) + } + #[doc = "Bit 19 - Write '1' to enable interrupt for event RXSTARTED"] + #[inline(always)] + pub fn rxstarted(&self) -> RXSTARTED_R { + RXSTARTED_R::new(((self.bits >> 19) & 1) != 0) + } + #[doc = "Bit 20 - Write '1' to enable interrupt for event TXSTARTED"] + #[inline(always)] + pub fn txstarted(&self) -> TXSTARTED_R { + TXSTARTED_R::new(((self.bits >> 20) & 1) != 0) + } + #[doc = "Bit 23 - Write '1' to enable interrupt for event LASTRX"] + #[inline(always)] + pub fn lastrx(&self) -> LASTRX_R { + LASTRX_R::new(((self.bits >> 23) & 1) != 0) + } + #[doc = "Bit 24 - Write '1' to enable interrupt for event LASTTX"] + #[inline(always)] + pub fn lasttx(&self) -> LASTTX_R { + LASTTX_R::new(((self.bits >> 24) & 1) != 0) + } +} +impl W { + #[doc = "Bit 1 - Write '1' to enable interrupt for event STOPPED"] + #[inline(always)] + #[must_use] + pub fn stopped(&mut self) -> STOPPED_W<1> { + STOPPED_W::new(self) + } + #[doc = "Bit 9 - Write '1' to enable interrupt for event ERROR"] + #[inline(always)] + #[must_use] + pub fn error(&mut self) -> ERROR_W<9> { + ERROR_W::new(self) + } + #[doc = "Bit 18 - Write '1' to enable interrupt for event SUSPENDED"] + #[inline(always)] + #[must_use] + pub fn suspended(&mut self) -> SUSPENDED_W<18> { + SUSPENDED_W::new(self) + } + #[doc = "Bit 19 - Write '1' to enable interrupt for event RXSTARTED"] + #[inline(always)] + #[must_use] + pub fn rxstarted(&mut self) -> RXSTARTED_W<19> { + RXSTARTED_W::new(self) + } + #[doc = "Bit 20 - Write '1' to enable interrupt for event TXSTARTED"] + #[inline(always)] + #[must_use] + pub fn txstarted(&mut self) -> TXSTARTED_W<20> { + TXSTARTED_W::new(self) + } + #[doc = "Bit 23 - Write '1' to enable interrupt for event LASTRX"] + #[inline(always)] + #[must_use] + pub fn lastrx(&mut self) -> LASTRX_W<23> { + LASTRX_W::new(self) + } + #[doc = "Bit 24 - Write '1' to enable interrupt for event LASTTX"] + #[inline(always)] + #[must_use] + pub fn lasttx(&mut self) -> LASTTX_W<24> { + LASTTX_W::new(self) + } + #[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 = "Enable interrupt\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 [intenset](index.html) module"] +pub struct INTENSET_SPEC; +impl crate::RegisterSpec for INTENSET_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [intenset::R](R) reader structure"] +impl crate::Readable for INTENSET_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [intenset::W](W) writer structure"] +impl crate::Writable for INTENSET_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets INTENSET to value 0"] +impl crate::Resettable for INTENSET_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/twim0/psel.rs b/down-the-stack/dk_pac/src/twim0/psel.rs new file mode 100644 index 0000000..6d71cdf --- /dev/null +++ b/down-the-stack/dk_pac/src/twim0/psel.rs @@ -0,0 +1,16 @@ +#[doc = r"Register block"] +#[repr(C)] +pub struct PSEL { + #[doc = "0x00 - Pin select for SCL signal"] + pub scl: SCL, + #[doc = "0x04 - Pin select for SDA signal"] + pub sda: SDA, +} +#[doc = "SCL (rw) register accessor: an alias for `Reg`"] +pub type SCL = crate::Reg; +#[doc = "Pin select for SCL signal"] +pub mod scl; +#[doc = "SDA (rw) register accessor: an alias for `Reg`"] +pub type SDA = crate::Reg; +#[doc = "Pin select for SDA signal"] +pub mod sda; diff --git a/down-the-stack/dk_pac/src/twim0/psel/scl.rs b/down-the-stack/dk_pac/src/twim0/psel/scl.rs new file mode 100644 index 0000000..05b9f95 --- /dev/null +++ b/down-the-stack/dk_pac/src/twim0/psel/scl.rs @@ -0,0 +1,141 @@ +#[doc = "Register `SCL` 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 `SCL` 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 `PIN` reader - Pin number"] +pub type PIN_R = crate::FieldReader; +#[doc = "Field `PIN` writer - Pin number"] +pub type PIN_W<'a, const O: u8> = crate::FieldWriter<'a, u32, SCL_SPEC, u8, u8, 5, O>; +#[doc = "Field `CONNECT` reader - Connection"] +pub type CONNECT_R = crate::BitReader; +#[doc = "Connection\n\nValue on reset: 1"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum CONNECT_A { + #[doc = "1: Disconnect"] + DISCONNECTED = 1, + #[doc = "0: Connect"] + CONNECTED = 0, +} +impl From for bool { + #[inline(always)] + fn from(variant: CONNECT_A) -> Self { + variant as u8 != 0 + } +} +impl CONNECT_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> CONNECT_A { + match self.bits { + true => CONNECT_A::DISCONNECTED, + false => CONNECT_A::CONNECTED, + } + } + #[doc = "Checks if the value of the field is `DISCONNECTED`"] + #[inline(always)] + pub fn is_disconnected(&self) -> bool { + *self == CONNECT_A::DISCONNECTED + } + #[doc = "Checks if the value of the field is `CONNECTED`"] + #[inline(always)] + pub fn is_connected(&self) -> bool { + *self == CONNECT_A::CONNECTED + } +} +#[doc = "Field `CONNECT` writer - Connection"] +pub type CONNECT_W<'a, const O: u8> = crate::BitWriter<'a, u32, SCL_SPEC, CONNECT_A, O>; +impl<'a, const O: u8> CONNECT_W<'a, O> { + #[doc = "Disconnect"] + #[inline(always)] + pub fn disconnected(self) -> &'a mut W { + self.variant(CONNECT_A::DISCONNECTED) + } + #[doc = "Connect"] + #[inline(always)] + pub fn connected(self) -> &'a mut W { + self.variant(CONNECT_A::CONNECTED) + } +} +impl R { + #[doc = "Bits 0:4 - Pin number"] + #[inline(always)] + pub fn pin(&self) -> PIN_R { + PIN_R::new((self.bits & 0x1f) as u8) + } + #[doc = "Bit 31 - Connection"] + #[inline(always)] + pub fn connect(&self) -> CONNECT_R { + CONNECT_R::new(((self.bits >> 31) & 1) != 0) + } +} +impl W { + #[doc = "Bits 0:4 - Pin number"] + #[inline(always)] + #[must_use] + pub fn pin(&mut self) -> PIN_W<0> { + PIN_W::new(self) + } + #[doc = "Bit 31 - Connection"] + #[inline(always)] + #[must_use] + pub fn connect(&mut self) -> CONNECT_W<31> { + CONNECT_W::new(self) + } + #[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 = "Pin select for SCL signal\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 [scl](index.html) module"] +pub struct SCL_SPEC; +impl crate::RegisterSpec for SCL_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [scl::R](R) reader structure"] +impl crate::Readable for SCL_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [scl::W](W) writer structure"] +impl crate::Writable for SCL_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets SCL to value 0xffff_ffff"] +impl crate::Resettable for SCL_SPEC { + const RESET_VALUE: Self::Ux = 0xffff_ffff; +} diff --git a/down-the-stack/dk_pac/src/twim0/psel/sda.rs b/down-the-stack/dk_pac/src/twim0/psel/sda.rs new file mode 100644 index 0000000..705af21 --- /dev/null +++ b/down-the-stack/dk_pac/src/twim0/psel/sda.rs @@ -0,0 +1,141 @@ +#[doc = "Register `SDA` 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 `SDA` 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 `PIN` reader - Pin number"] +pub type PIN_R = crate::FieldReader; +#[doc = "Field `PIN` writer - Pin number"] +pub type PIN_W<'a, const O: u8> = crate::FieldWriter<'a, u32, SDA_SPEC, u8, u8, 5, O>; +#[doc = "Field `CONNECT` reader - Connection"] +pub type CONNECT_R = crate::BitReader; +#[doc = "Connection\n\nValue on reset: 1"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum CONNECT_A { + #[doc = "1: Disconnect"] + DISCONNECTED = 1, + #[doc = "0: Connect"] + CONNECTED = 0, +} +impl From for bool { + #[inline(always)] + fn from(variant: CONNECT_A) -> Self { + variant as u8 != 0 + } +} +impl CONNECT_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> CONNECT_A { + match self.bits { + true => CONNECT_A::DISCONNECTED, + false => CONNECT_A::CONNECTED, + } + } + #[doc = "Checks if the value of the field is `DISCONNECTED`"] + #[inline(always)] + pub fn is_disconnected(&self) -> bool { + *self == CONNECT_A::DISCONNECTED + } + #[doc = "Checks if the value of the field is `CONNECTED`"] + #[inline(always)] + pub fn is_connected(&self) -> bool { + *self == CONNECT_A::CONNECTED + } +} +#[doc = "Field `CONNECT` writer - Connection"] +pub type CONNECT_W<'a, const O: u8> = crate::BitWriter<'a, u32, SDA_SPEC, CONNECT_A, O>; +impl<'a, const O: u8> CONNECT_W<'a, O> { + #[doc = "Disconnect"] + #[inline(always)] + pub fn disconnected(self) -> &'a mut W { + self.variant(CONNECT_A::DISCONNECTED) + } + #[doc = "Connect"] + #[inline(always)] + pub fn connected(self) -> &'a mut W { + self.variant(CONNECT_A::CONNECTED) + } +} +impl R { + #[doc = "Bits 0:4 - Pin number"] + #[inline(always)] + pub fn pin(&self) -> PIN_R { + PIN_R::new((self.bits & 0x1f) as u8) + } + #[doc = "Bit 31 - Connection"] + #[inline(always)] + pub fn connect(&self) -> CONNECT_R { + CONNECT_R::new(((self.bits >> 31) & 1) != 0) + } +} +impl W { + #[doc = "Bits 0:4 - Pin number"] + #[inline(always)] + #[must_use] + pub fn pin(&mut self) -> PIN_W<0> { + PIN_W::new(self) + } + #[doc = "Bit 31 - Connection"] + #[inline(always)] + #[must_use] + pub fn connect(&mut self) -> CONNECT_W<31> { + CONNECT_W::new(self) + } + #[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 = "Pin select for SDA signal\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 [sda](index.html) module"] +pub struct SDA_SPEC; +impl crate::RegisterSpec for SDA_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [sda::R](R) reader structure"] +impl crate::Readable for SDA_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [sda::W](W) writer structure"] +impl crate::Writable for SDA_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets SDA to value 0xffff_ffff"] +impl crate::Resettable for SDA_SPEC { + const RESET_VALUE: Self::Ux = 0xffff_ffff; +} diff --git a/down-the-stack/dk_pac/src/twim0/rxd.rs b/down-the-stack/dk_pac/src/twim0/rxd.rs new file mode 100644 index 0000000..6a26418 --- /dev/null +++ b/down-the-stack/dk_pac/src/twim0/rxd.rs @@ -0,0 +1,28 @@ +#[doc = r"Register block"] +#[repr(C)] +pub struct RXD { + #[doc = "0x00 - Data pointer"] + pub ptr: PTR, + #[doc = "0x04 - Maximum number of bytes in receive buffer"] + pub maxcnt: MAXCNT, + #[doc = "0x08 - Number of bytes transferred in the last transaction"] + pub amount: AMOUNT, + #[doc = "0x0c - EasyDMA list type"] + pub list: LIST, +} +#[doc = "PTR (rw) register accessor: an alias for `Reg`"] +pub type PTR = crate::Reg; +#[doc = "Data pointer"] +pub mod ptr; +#[doc = "MAXCNT (rw) register accessor: an alias for `Reg`"] +pub type MAXCNT = crate::Reg; +#[doc = "Maximum number of bytes in receive buffer"] +pub mod maxcnt; +#[doc = "AMOUNT (r) register accessor: an alias for `Reg`"] +pub type AMOUNT = crate::Reg; +#[doc = "Number of bytes transferred in the last transaction"] +pub mod amount; +#[doc = "LIST (rw) register accessor: an alias for `Reg`"] +pub type LIST = crate::Reg; +#[doc = "EasyDMA list type"] +pub mod list; diff --git a/down-the-stack/dk_pac/src/twim0/rxd/amount.rs b/down-the-stack/dk_pac/src/twim0/rxd/amount.rs new file mode 100644 index 0000000..f149407 --- /dev/null +++ b/down-the-stack/dk_pac/src/twim0/rxd/amount.rs @@ -0,0 +1,37 @@ +#[doc = "Register `AMOUNT` 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 = "Field `AMOUNT` reader - Number of bytes transferred in the last transaction. In case of NACK error, includes the NACK'ed byte."] +pub type AMOUNT_R = crate::FieldReader; +impl R { + #[doc = "Bits 0:7 - Number of bytes transferred in the last transaction. In case of NACK error, includes the NACK'ed byte."] + #[inline(always)] + pub fn amount(&self) -> AMOUNT_R { + AMOUNT_R::new((self.bits & 0xff) as u8) + } +} +#[doc = "Number of bytes transferred in the last transaction\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 [amount](index.html) module"] +pub struct AMOUNT_SPEC; +impl crate::RegisterSpec for AMOUNT_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [amount::R](R) reader structure"] +impl crate::Readable for AMOUNT_SPEC { + type Reader = R; +} +#[doc = "`reset()` method sets AMOUNT to value 0"] +impl crate::Resettable for AMOUNT_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/twim0/rxd/list.rs b/down-the-stack/dk_pac/src/twim0/rxd/list.rs new file mode 100644 index 0000000..05243a5 --- /dev/null +++ b/down-the-stack/dk_pac/src/twim0/rxd/list.rs @@ -0,0 +1,128 @@ +#[doc = "Register `LIST` 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 `LIST` 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 `LIST` reader - List type"] +pub type LIST_R = crate::FieldReader; +#[doc = "List type\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +#[repr(u8)] +pub enum LIST_A { + #[doc = "0: Disable EasyDMA list"] + DISABLED = 0, + #[doc = "1: Use array list"] + ARRAY_LIST = 1, +} +impl From for u8 { + #[inline(always)] + fn from(variant: LIST_A) -> Self { + variant as _ + } +} +impl LIST_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> Option { + match self.bits { + 0 => Some(LIST_A::DISABLED), + 1 => Some(LIST_A::ARRAY_LIST), + _ => None, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == LIST_A::DISABLED + } + #[doc = "Checks if the value of the field is `ARRAY_LIST`"] + #[inline(always)] + pub fn is_array_list(&self) -> bool { + *self == LIST_A::ARRAY_LIST + } +} +#[doc = "Field `LIST` writer - List type"] +pub type LIST_W<'a, const O: u8> = crate::FieldWriter<'a, u32, LIST_SPEC, u8, LIST_A, 3, O>; +impl<'a, const O: u8> LIST_W<'a, O> { + #[doc = "Disable EasyDMA list"] + #[inline(always)] + pub fn disabled(self) -> &'a mut W { + self.variant(LIST_A::DISABLED) + } + #[doc = "Use array list"] + #[inline(always)] + pub fn array_list(self) -> &'a mut W { + self.variant(LIST_A::ARRAY_LIST) + } +} +impl R { + #[doc = "Bits 0:2 - List type"] + #[inline(always)] + pub fn list(&self) -> LIST_R { + LIST_R::new((self.bits & 7) as u8) + } +} +impl W { + #[doc = "Bits 0:2 - List type"] + #[inline(always)] + #[must_use] + pub fn list(&mut self) -> LIST_W<0> { + LIST_W::new(self) + } + #[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 = "EasyDMA list type\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 [list](index.html) module"] +pub struct LIST_SPEC; +impl crate::RegisterSpec for LIST_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [list::R](R) reader structure"] +impl crate::Readable for LIST_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [list::W](W) writer structure"] +impl crate::Writable for LIST_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets LIST to value 0"] +impl crate::Resettable for LIST_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/twim0/rxd/maxcnt.rs b/down-the-stack/dk_pac/src/twim0/rxd/maxcnt.rs new file mode 100644 index 0000000..7d9b79c --- /dev/null +++ b/down-the-stack/dk_pac/src/twim0/rxd/maxcnt.rs @@ -0,0 +1,80 @@ +#[doc = "Register `MAXCNT` 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 `MAXCNT` 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 `MAXCNT` reader - Maximum number of bytes in receive buffer"] +pub type MAXCNT_R = crate::FieldReader; +#[doc = "Field `MAXCNT` writer - Maximum number of bytes in receive buffer"] +pub type MAXCNT_W<'a, const O: u8> = crate::FieldWriter<'a, u32, MAXCNT_SPEC, u8, u8, 8, O>; +impl R { + #[doc = "Bits 0:7 - Maximum number of bytes in receive buffer"] + #[inline(always)] + pub fn maxcnt(&self) -> MAXCNT_R { + MAXCNT_R::new((self.bits & 0xff) as u8) + } +} +impl W { + #[doc = "Bits 0:7 - Maximum number of bytes in receive buffer"] + #[inline(always)] + #[must_use] + pub fn maxcnt(&mut self) -> MAXCNT_W<0> { + MAXCNT_W::new(self) + } + #[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 = "Maximum number of bytes in receive buffer\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 [maxcnt](index.html) module"] +pub struct MAXCNT_SPEC; +impl crate::RegisterSpec for MAXCNT_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [maxcnt::R](R) reader structure"] +impl crate::Readable for MAXCNT_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [maxcnt::W](W) writer structure"] +impl crate::Writable for MAXCNT_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets MAXCNT to value 0"] +impl crate::Resettable for MAXCNT_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/twim0/rxd/ptr.rs b/down-the-stack/dk_pac/src/twim0/rxd/ptr.rs new file mode 100644 index 0000000..2f2c926 --- /dev/null +++ b/down-the-stack/dk_pac/src/twim0/rxd/ptr.rs @@ -0,0 +1,80 @@ +#[doc = "Register `PTR` 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 `PTR` 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 `PTR` reader - Data pointer"] +pub type PTR_R = crate::FieldReader; +#[doc = "Field `PTR` writer - Data pointer"] +pub type PTR_W<'a, const O: u8> = crate::FieldWriter<'a, u32, PTR_SPEC, u32, u32, 32, O>; +impl R { + #[doc = "Bits 0:31 - Data pointer"] + #[inline(always)] + pub fn ptr(&self) -> PTR_R { + PTR_R::new(self.bits) + } +} +impl W { + #[doc = "Bits 0:31 - Data pointer"] + #[inline(always)] + #[must_use] + pub fn ptr(&mut self) -> PTR_W<0> { + PTR_W::new(self) + } + #[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 = "Data pointer\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 [ptr](index.html) module"] +pub struct PTR_SPEC; +impl crate::RegisterSpec for PTR_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [ptr::R](R) reader structure"] +impl crate::Readable for PTR_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [ptr::W](W) writer structure"] +impl crate::Writable for PTR_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets PTR to value 0"] +impl crate::Resettable for PTR_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/twim0/shorts.rs b/down-the-stack/dk_pac/src/twim0/shorts.rs new file mode 100644 index 0000000..8f20d6a --- /dev/null +++ b/down-the-stack/dk_pac/src/twim0/shorts.rs @@ -0,0 +1,373 @@ +#[doc = "Register `SHORTS` 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 `SHORTS` 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 `LASTTX_STARTRX` reader - Shortcut between event LASTTX and task STARTRX"] +pub type LASTTX_STARTRX_R = crate::BitReader; +#[doc = "Shortcut between event LASTTX and task STARTRX\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum LASTTX_STARTRX_A { + #[doc = "0: Disable shortcut"] + DISABLED = 0, + #[doc = "1: Enable shortcut"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: LASTTX_STARTRX_A) -> Self { + variant as u8 != 0 + } +} +impl LASTTX_STARTRX_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> LASTTX_STARTRX_A { + match self.bits { + false => LASTTX_STARTRX_A::DISABLED, + true => LASTTX_STARTRX_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == LASTTX_STARTRX_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == LASTTX_STARTRX_A::ENABLED + } +} +#[doc = "Field `LASTTX_STARTRX` writer - Shortcut between event LASTTX and task STARTRX"] +pub type LASTTX_STARTRX_W<'a, const O: u8> = + crate::BitWriter<'a, u32, SHORTS_SPEC, LASTTX_STARTRX_A, O>; +impl<'a, const O: u8> LASTTX_STARTRX_W<'a, O> { + #[doc = "Disable shortcut"] + #[inline(always)] + pub fn disabled(self) -> &'a mut W { + self.variant(LASTTX_STARTRX_A::DISABLED) + } + #[doc = "Enable shortcut"] + #[inline(always)] + pub fn enabled(self) -> &'a mut W { + self.variant(LASTTX_STARTRX_A::ENABLED) + } +} +#[doc = "Field `LASTTX_SUSPEND` reader - Shortcut between event LASTTX and task SUSPEND"] +pub type LASTTX_SUSPEND_R = crate::BitReader; +#[doc = "Shortcut between event LASTTX and task SUSPEND\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum LASTTX_SUSPEND_A { + #[doc = "0: Disable shortcut"] + DISABLED = 0, + #[doc = "1: Enable shortcut"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: LASTTX_SUSPEND_A) -> Self { + variant as u8 != 0 + } +} +impl LASTTX_SUSPEND_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> LASTTX_SUSPEND_A { + match self.bits { + false => LASTTX_SUSPEND_A::DISABLED, + true => LASTTX_SUSPEND_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == LASTTX_SUSPEND_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == LASTTX_SUSPEND_A::ENABLED + } +} +#[doc = "Field `LASTTX_SUSPEND` writer - Shortcut between event LASTTX and task SUSPEND"] +pub type LASTTX_SUSPEND_W<'a, const O: u8> = + crate::BitWriter<'a, u32, SHORTS_SPEC, LASTTX_SUSPEND_A, O>; +impl<'a, const O: u8> LASTTX_SUSPEND_W<'a, O> { + #[doc = "Disable shortcut"] + #[inline(always)] + pub fn disabled(self) -> &'a mut W { + self.variant(LASTTX_SUSPEND_A::DISABLED) + } + #[doc = "Enable shortcut"] + #[inline(always)] + pub fn enabled(self) -> &'a mut W { + self.variant(LASTTX_SUSPEND_A::ENABLED) + } +} +#[doc = "Field `LASTTX_STOP` reader - Shortcut between event LASTTX and task STOP"] +pub type LASTTX_STOP_R = crate::BitReader; +#[doc = "Shortcut between event LASTTX and task STOP\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum LASTTX_STOP_A { + #[doc = "0: Disable shortcut"] + DISABLED = 0, + #[doc = "1: Enable shortcut"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: LASTTX_STOP_A) -> Self { + variant as u8 != 0 + } +} +impl LASTTX_STOP_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> LASTTX_STOP_A { + match self.bits { + false => LASTTX_STOP_A::DISABLED, + true => LASTTX_STOP_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == LASTTX_STOP_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == LASTTX_STOP_A::ENABLED + } +} +#[doc = "Field `LASTTX_STOP` writer - Shortcut between event LASTTX and task STOP"] +pub type LASTTX_STOP_W<'a, const O: u8> = crate::BitWriter<'a, u32, SHORTS_SPEC, LASTTX_STOP_A, O>; +impl<'a, const O: u8> LASTTX_STOP_W<'a, O> { + #[doc = "Disable shortcut"] + #[inline(always)] + pub fn disabled(self) -> &'a mut W { + self.variant(LASTTX_STOP_A::DISABLED) + } + #[doc = "Enable shortcut"] + #[inline(always)] + pub fn enabled(self) -> &'a mut W { + self.variant(LASTTX_STOP_A::ENABLED) + } +} +#[doc = "Field `LASTRX_STARTTX` reader - Shortcut between event LASTRX and task STARTTX"] +pub type LASTRX_STARTTX_R = crate::BitReader; +#[doc = "Shortcut between event LASTRX and task STARTTX\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum LASTRX_STARTTX_A { + #[doc = "0: Disable shortcut"] + DISABLED = 0, + #[doc = "1: Enable shortcut"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: LASTRX_STARTTX_A) -> Self { + variant as u8 != 0 + } +} +impl LASTRX_STARTTX_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> LASTRX_STARTTX_A { + match self.bits { + false => LASTRX_STARTTX_A::DISABLED, + true => LASTRX_STARTTX_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == LASTRX_STARTTX_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == LASTRX_STARTTX_A::ENABLED + } +} +#[doc = "Field `LASTRX_STARTTX` writer - Shortcut between event LASTRX and task STARTTX"] +pub type LASTRX_STARTTX_W<'a, const O: u8> = + crate::BitWriter<'a, u32, SHORTS_SPEC, LASTRX_STARTTX_A, O>; +impl<'a, const O: u8> LASTRX_STARTTX_W<'a, O> { + #[doc = "Disable shortcut"] + #[inline(always)] + pub fn disabled(self) -> &'a mut W { + self.variant(LASTRX_STARTTX_A::DISABLED) + } + #[doc = "Enable shortcut"] + #[inline(always)] + pub fn enabled(self) -> &'a mut W { + self.variant(LASTRX_STARTTX_A::ENABLED) + } +} +#[doc = "Field `LASTRX_STOP` reader - Shortcut between event LASTRX and task STOP"] +pub type LASTRX_STOP_R = crate::BitReader; +#[doc = "Shortcut between event LASTRX and task STOP\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum LASTRX_STOP_A { + #[doc = "0: Disable shortcut"] + DISABLED = 0, + #[doc = "1: Enable shortcut"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: LASTRX_STOP_A) -> Self { + variant as u8 != 0 + } +} +impl LASTRX_STOP_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> LASTRX_STOP_A { + match self.bits { + false => LASTRX_STOP_A::DISABLED, + true => LASTRX_STOP_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == LASTRX_STOP_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == LASTRX_STOP_A::ENABLED + } +} +#[doc = "Field `LASTRX_STOP` writer - Shortcut between event LASTRX and task STOP"] +pub type LASTRX_STOP_W<'a, const O: u8> = crate::BitWriter<'a, u32, SHORTS_SPEC, LASTRX_STOP_A, O>; +impl<'a, const O: u8> LASTRX_STOP_W<'a, O> { + #[doc = "Disable shortcut"] + #[inline(always)] + pub fn disabled(self) -> &'a mut W { + self.variant(LASTRX_STOP_A::DISABLED) + } + #[doc = "Enable shortcut"] + #[inline(always)] + pub fn enabled(self) -> &'a mut W { + self.variant(LASTRX_STOP_A::ENABLED) + } +} +impl R { + #[doc = "Bit 7 - Shortcut between event LASTTX and task STARTRX"] + #[inline(always)] + pub fn lasttx_startrx(&self) -> LASTTX_STARTRX_R { + LASTTX_STARTRX_R::new(((self.bits >> 7) & 1) != 0) + } + #[doc = "Bit 8 - Shortcut between event LASTTX and task SUSPEND"] + #[inline(always)] + pub fn lasttx_suspend(&self) -> LASTTX_SUSPEND_R { + LASTTX_SUSPEND_R::new(((self.bits >> 8) & 1) != 0) + } + #[doc = "Bit 9 - Shortcut between event LASTTX and task STOP"] + #[inline(always)] + pub fn lasttx_stop(&self) -> LASTTX_STOP_R { + LASTTX_STOP_R::new(((self.bits >> 9) & 1) != 0) + } + #[doc = "Bit 10 - Shortcut between event LASTRX and task STARTTX"] + #[inline(always)] + pub fn lastrx_starttx(&self) -> LASTRX_STARTTX_R { + LASTRX_STARTTX_R::new(((self.bits >> 10) & 1) != 0) + } + #[doc = "Bit 12 - Shortcut between event LASTRX and task STOP"] + #[inline(always)] + pub fn lastrx_stop(&self) -> LASTRX_STOP_R { + LASTRX_STOP_R::new(((self.bits >> 12) & 1) != 0) + } +} +impl W { + #[doc = "Bit 7 - Shortcut between event LASTTX and task STARTRX"] + #[inline(always)] + #[must_use] + pub fn lasttx_startrx(&mut self) -> LASTTX_STARTRX_W<7> { + LASTTX_STARTRX_W::new(self) + } + #[doc = "Bit 8 - Shortcut between event LASTTX and task SUSPEND"] + #[inline(always)] + #[must_use] + pub fn lasttx_suspend(&mut self) -> LASTTX_SUSPEND_W<8> { + LASTTX_SUSPEND_W::new(self) + } + #[doc = "Bit 9 - Shortcut between event LASTTX and task STOP"] + #[inline(always)] + #[must_use] + pub fn lasttx_stop(&mut self) -> LASTTX_STOP_W<9> { + LASTTX_STOP_W::new(self) + } + #[doc = "Bit 10 - Shortcut between event LASTRX and task STARTTX"] + #[inline(always)] + #[must_use] + pub fn lastrx_starttx(&mut self) -> LASTRX_STARTTX_W<10> { + LASTRX_STARTTX_W::new(self) + } + #[doc = "Bit 12 - Shortcut between event LASTRX and task STOP"] + #[inline(always)] + #[must_use] + pub fn lastrx_stop(&mut self) -> LASTRX_STOP_W<12> { + LASTRX_STOP_W::new(self) + } + #[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 = "Shortcuts between local events and tasks\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 [shorts](index.html) module"] +pub struct SHORTS_SPEC; +impl crate::RegisterSpec for SHORTS_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [shorts::R](R) reader structure"] +impl crate::Readable for SHORTS_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [shorts::W](W) writer structure"] +impl crate::Writable for SHORTS_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets SHORTS to value 0"] +impl crate::Resettable for SHORTS_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/twim0/tasks_resume.rs b/down-the-stack/dk_pac/src/twim0/tasks_resume.rs new file mode 100644 index 0000000..47f0633 --- /dev/null +++ b/down-the-stack/dk_pac/src/twim0/tasks_resume.rs @@ -0,0 +1,72 @@ +#[doc = "Register `TASKS_RESUME` 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 = "Resume TWI transaction\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum TASKS_RESUME_AW { + #[doc = "1: Trigger task"] + TRIGGER = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: TASKS_RESUME_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `TASKS_RESUME` writer - Resume TWI transaction"] +pub type TASKS_RESUME_W<'a, const O: u8> = + crate::BitWriter<'a, u32, TASKS_RESUME_SPEC, TASKS_RESUME_AW, O>; +impl<'a, const O: u8> TASKS_RESUME_W<'a, O> { + #[doc = "Trigger task"] + #[inline(always)] + pub fn trigger(self) -> &'a mut W { + self.variant(TASKS_RESUME_AW::TRIGGER) + } +} +impl W { + #[doc = "Bit 0 - Resume TWI transaction"] + #[inline(always)] + #[must_use] + pub fn tasks_resume(&mut self) -> TASKS_RESUME_W<0> { + TASKS_RESUME_W::new(self) + } + #[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 = "Resume TWI transaction\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 [tasks_resume](index.html) module"] +pub struct TASKS_RESUME_SPEC; +impl crate::RegisterSpec for TASKS_RESUME_SPEC { + type Ux = u32; +} +#[doc = "`write(|w| ..)` method takes [tasks_resume::W](W) writer structure"] +impl crate::Writable for TASKS_RESUME_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets TASKS_RESUME to value 0"] +impl crate::Resettable for TASKS_RESUME_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/twim0/tasks_startrx.rs b/down-the-stack/dk_pac/src/twim0/tasks_startrx.rs new file mode 100644 index 0000000..c090f10 --- /dev/null +++ b/down-the-stack/dk_pac/src/twim0/tasks_startrx.rs @@ -0,0 +1,72 @@ +#[doc = "Register `TASKS_STARTRX` 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 = "Start TWI receive sequence\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum TASKS_STARTRX_AW { + #[doc = "1: Trigger task"] + TRIGGER = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: TASKS_STARTRX_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `TASKS_STARTRX` writer - Start TWI receive sequence"] +pub type TASKS_STARTRX_W<'a, const O: u8> = + crate::BitWriter<'a, u32, TASKS_STARTRX_SPEC, TASKS_STARTRX_AW, O>; +impl<'a, const O: u8> TASKS_STARTRX_W<'a, O> { + #[doc = "Trigger task"] + #[inline(always)] + pub fn trigger(self) -> &'a mut W { + self.variant(TASKS_STARTRX_AW::TRIGGER) + } +} +impl W { + #[doc = "Bit 0 - Start TWI receive sequence"] + #[inline(always)] + #[must_use] + pub fn tasks_startrx(&mut self) -> TASKS_STARTRX_W<0> { + TASKS_STARTRX_W::new(self) + } + #[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 = "Start TWI receive sequence\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 [tasks_startrx](index.html) module"] +pub struct TASKS_STARTRX_SPEC; +impl crate::RegisterSpec for TASKS_STARTRX_SPEC { + type Ux = u32; +} +#[doc = "`write(|w| ..)` method takes [tasks_startrx::W](W) writer structure"] +impl crate::Writable for TASKS_STARTRX_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets TASKS_STARTRX to value 0"] +impl crate::Resettable for TASKS_STARTRX_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/twim0/tasks_starttx.rs b/down-the-stack/dk_pac/src/twim0/tasks_starttx.rs new file mode 100644 index 0000000..a012c7b --- /dev/null +++ b/down-the-stack/dk_pac/src/twim0/tasks_starttx.rs @@ -0,0 +1,72 @@ +#[doc = "Register `TASKS_STARTTX` 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 = "Start TWI transmit sequence\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum TASKS_STARTTX_AW { + #[doc = "1: Trigger task"] + TRIGGER = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: TASKS_STARTTX_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `TASKS_STARTTX` writer - Start TWI transmit sequence"] +pub type TASKS_STARTTX_W<'a, const O: u8> = + crate::BitWriter<'a, u32, TASKS_STARTTX_SPEC, TASKS_STARTTX_AW, O>; +impl<'a, const O: u8> TASKS_STARTTX_W<'a, O> { + #[doc = "Trigger task"] + #[inline(always)] + pub fn trigger(self) -> &'a mut W { + self.variant(TASKS_STARTTX_AW::TRIGGER) + } +} +impl W { + #[doc = "Bit 0 - Start TWI transmit sequence"] + #[inline(always)] + #[must_use] + pub fn tasks_starttx(&mut self) -> TASKS_STARTTX_W<0> { + TASKS_STARTTX_W::new(self) + } + #[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 = "Start TWI transmit sequence\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 [tasks_starttx](index.html) module"] +pub struct TASKS_STARTTX_SPEC; +impl crate::RegisterSpec for TASKS_STARTTX_SPEC { + type Ux = u32; +} +#[doc = "`write(|w| ..)` method takes [tasks_starttx::W](W) writer structure"] +impl crate::Writable for TASKS_STARTTX_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets TASKS_STARTTX to value 0"] +impl crate::Resettable for TASKS_STARTTX_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/twim0/tasks_stop.rs b/down-the-stack/dk_pac/src/twim0/tasks_stop.rs new file mode 100644 index 0000000..2fc8b5a --- /dev/null +++ b/down-the-stack/dk_pac/src/twim0/tasks_stop.rs @@ -0,0 +1,72 @@ +#[doc = "Register `TASKS_STOP` 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 = "Stop TWI transaction. Must be issued while the TWI master is not suspended.\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum TASKS_STOP_AW { + #[doc = "1: Trigger task"] + TRIGGER = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: TASKS_STOP_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `TASKS_STOP` writer - Stop TWI transaction. Must be issued while the TWI master is not suspended."] +pub type TASKS_STOP_W<'a, const O: u8> = + crate::BitWriter<'a, u32, TASKS_STOP_SPEC, TASKS_STOP_AW, O>; +impl<'a, const O: u8> TASKS_STOP_W<'a, O> { + #[doc = "Trigger task"] + #[inline(always)] + pub fn trigger(self) -> &'a mut W { + self.variant(TASKS_STOP_AW::TRIGGER) + } +} +impl W { + #[doc = "Bit 0 - Stop TWI transaction. Must be issued while the TWI master is not suspended."] + #[inline(always)] + #[must_use] + pub fn tasks_stop(&mut self) -> TASKS_STOP_W<0> { + TASKS_STOP_W::new(self) + } + #[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 = "Stop TWI transaction. Must be issued while the TWI master is not suspended.\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 [tasks_stop](index.html) module"] +pub struct TASKS_STOP_SPEC; +impl crate::RegisterSpec for TASKS_STOP_SPEC { + type Ux = u32; +} +#[doc = "`write(|w| ..)` method takes [tasks_stop::W](W) writer structure"] +impl crate::Writable for TASKS_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 TASKS_STOP to value 0"] +impl crate::Resettable for TASKS_STOP_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/twim0/tasks_suspend.rs b/down-the-stack/dk_pac/src/twim0/tasks_suspend.rs new file mode 100644 index 0000000..ae6f325 --- /dev/null +++ b/down-the-stack/dk_pac/src/twim0/tasks_suspend.rs @@ -0,0 +1,72 @@ +#[doc = "Register `TASKS_SUSPEND` 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 = "Suspend TWI transaction\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum TASKS_SUSPEND_AW { + #[doc = "1: Trigger task"] + TRIGGER = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: TASKS_SUSPEND_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `TASKS_SUSPEND` writer - Suspend TWI transaction"] +pub type TASKS_SUSPEND_W<'a, const O: u8> = + crate::BitWriter<'a, u32, TASKS_SUSPEND_SPEC, TASKS_SUSPEND_AW, O>; +impl<'a, const O: u8> TASKS_SUSPEND_W<'a, O> { + #[doc = "Trigger task"] + #[inline(always)] + pub fn trigger(self) -> &'a mut W { + self.variant(TASKS_SUSPEND_AW::TRIGGER) + } +} +impl W { + #[doc = "Bit 0 - Suspend TWI transaction"] + #[inline(always)] + #[must_use] + pub fn tasks_suspend(&mut self) -> TASKS_SUSPEND_W<0> { + TASKS_SUSPEND_W::new(self) + } + #[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 = "Suspend TWI transaction\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 [tasks_suspend](index.html) module"] +pub struct TASKS_SUSPEND_SPEC; +impl crate::RegisterSpec for TASKS_SUSPEND_SPEC { + type Ux = u32; +} +#[doc = "`write(|w| ..)` method takes [tasks_suspend::W](W) writer structure"] +impl crate::Writable for TASKS_SUSPEND_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets TASKS_SUSPEND to value 0"] +impl crate::Resettable for TASKS_SUSPEND_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/twim0/txd.rs b/down-the-stack/dk_pac/src/twim0/txd.rs new file mode 100644 index 0000000..19ea101 --- /dev/null +++ b/down-the-stack/dk_pac/src/twim0/txd.rs @@ -0,0 +1,28 @@ +#[doc = r"Register block"] +#[repr(C)] +pub struct TXD { + #[doc = "0x00 - Data pointer"] + pub ptr: PTR, + #[doc = "0x04 - Maximum number of bytes in transmit buffer"] + pub maxcnt: MAXCNT, + #[doc = "0x08 - Number of bytes transferred in the last transaction"] + pub amount: AMOUNT, + #[doc = "0x0c - EasyDMA list type"] + pub list: LIST, +} +#[doc = "PTR (rw) register accessor: an alias for `Reg`"] +pub type PTR = crate::Reg; +#[doc = "Data pointer"] +pub mod ptr; +#[doc = "MAXCNT (rw) register accessor: an alias for `Reg`"] +pub type MAXCNT = crate::Reg; +#[doc = "Maximum number of bytes in transmit buffer"] +pub mod maxcnt; +#[doc = "AMOUNT (r) register accessor: an alias for `Reg`"] +pub type AMOUNT = crate::Reg; +#[doc = "Number of bytes transferred in the last transaction"] +pub mod amount; +#[doc = "LIST (rw) register accessor: an alias for `Reg`"] +pub type LIST = crate::Reg; +#[doc = "EasyDMA list type"] +pub mod list; diff --git a/down-the-stack/dk_pac/src/twim0/txd/amount.rs b/down-the-stack/dk_pac/src/twim0/txd/amount.rs new file mode 100644 index 0000000..f149407 --- /dev/null +++ b/down-the-stack/dk_pac/src/twim0/txd/amount.rs @@ -0,0 +1,37 @@ +#[doc = "Register `AMOUNT` 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 = "Field `AMOUNT` reader - Number of bytes transferred in the last transaction. In case of NACK error, includes the NACK'ed byte."] +pub type AMOUNT_R = crate::FieldReader; +impl R { + #[doc = "Bits 0:7 - Number of bytes transferred in the last transaction. In case of NACK error, includes the NACK'ed byte."] + #[inline(always)] + pub fn amount(&self) -> AMOUNT_R { + AMOUNT_R::new((self.bits & 0xff) as u8) + } +} +#[doc = "Number of bytes transferred in the last transaction\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 [amount](index.html) module"] +pub struct AMOUNT_SPEC; +impl crate::RegisterSpec for AMOUNT_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [amount::R](R) reader structure"] +impl crate::Readable for AMOUNT_SPEC { + type Reader = R; +} +#[doc = "`reset()` method sets AMOUNT to value 0"] +impl crate::Resettable for AMOUNT_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/twim0/txd/list.rs b/down-the-stack/dk_pac/src/twim0/txd/list.rs new file mode 100644 index 0000000..05243a5 --- /dev/null +++ b/down-the-stack/dk_pac/src/twim0/txd/list.rs @@ -0,0 +1,128 @@ +#[doc = "Register `LIST` 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 `LIST` 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 `LIST` reader - List type"] +pub type LIST_R = crate::FieldReader; +#[doc = "List type\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +#[repr(u8)] +pub enum LIST_A { + #[doc = "0: Disable EasyDMA list"] + DISABLED = 0, + #[doc = "1: Use array list"] + ARRAY_LIST = 1, +} +impl From for u8 { + #[inline(always)] + fn from(variant: LIST_A) -> Self { + variant as _ + } +} +impl LIST_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> Option { + match self.bits { + 0 => Some(LIST_A::DISABLED), + 1 => Some(LIST_A::ARRAY_LIST), + _ => None, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == LIST_A::DISABLED + } + #[doc = "Checks if the value of the field is `ARRAY_LIST`"] + #[inline(always)] + pub fn is_array_list(&self) -> bool { + *self == LIST_A::ARRAY_LIST + } +} +#[doc = "Field `LIST` writer - List type"] +pub type LIST_W<'a, const O: u8> = crate::FieldWriter<'a, u32, LIST_SPEC, u8, LIST_A, 3, O>; +impl<'a, const O: u8> LIST_W<'a, O> { + #[doc = "Disable EasyDMA list"] + #[inline(always)] + pub fn disabled(self) -> &'a mut W { + self.variant(LIST_A::DISABLED) + } + #[doc = "Use array list"] + #[inline(always)] + pub fn array_list(self) -> &'a mut W { + self.variant(LIST_A::ARRAY_LIST) + } +} +impl R { + #[doc = "Bits 0:2 - List type"] + #[inline(always)] + pub fn list(&self) -> LIST_R { + LIST_R::new((self.bits & 7) as u8) + } +} +impl W { + #[doc = "Bits 0:2 - List type"] + #[inline(always)] + #[must_use] + pub fn list(&mut self) -> LIST_W<0> { + LIST_W::new(self) + } + #[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 = "EasyDMA list type\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 [list](index.html) module"] +pub struct LIST_SPEC; +impl crate::RegisterSpec for LIST_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [list::R](R) reader structure"] +impl crate::Readable for LIST_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [list::W](W) writer structure"] +impl crate::Writable for LIST_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets LIST to value 0"] +impl crate::Resettable for LIST_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/twim0/txd/maxcnt.rs b/down-the-stack/dk_pac/src/twim0/txd/maxcnt.rs new file mode 100644 index 0000000..084733c --- /dev/null +++ b/down-the-stack/dk_pac/src/twim0/txd/maxcnt.rs @@ -0,0 +1,80 @@ +#[doc = "Register `MAXCNT` 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 `MAXCNT` 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 `MAXCNT` reader - Maximum number of bytes in transmit buffer"] +pub type MAXCNT_R = crate::FieldReader; +#[doc = "Field `MAXCNT` writer - Maximum number of bytes in transmit buffer"] +pub type MAXCNT_W<'a, const O: u8> = crate::FieldWriter<'a, u32, MAXCNT_SPEC, u8, u8, 8, O>; +impl R { + #[doc = "Bits 0:7 - Maximum number of bytes in transmit buffer"] + #[inline(always)] + pub fn maxcnt(&self) -> MAXCNT_R { + MAXCNT_R::new((self.bits & 0xff) as u8) + } +} +impl W { + #[doc = "Bits 0:7 - Maximum number of bytes in transmit buffer"] + #[inline(always)] + #[must_use] + pub fn maxcnt(&mut self) -> MAXCNT_W<0> { + MAXCNT_W::new(self) + } + #[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 = "Maximum number of bytes in transmit buffer\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 [maxcnt](index.html) module"] +pub struct MAXCNT_SPEC; +impl crate::RegisterSpec for MAXCNT_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [maxcnt::R](R) reader structure"] +impl crate::Readable for MAXCNT_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [maxcnt::W](W) writer structure"] +impl crate::Writable for MAXCNT_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets MAXCNT to value 0"] +impl crate::Resettable for MAXCNT_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/twim0/txd/ptr.rs b/down-the-stack/dk_pac/src/twim0/txd/ptr.rs new file mode 100644 index 0000000..2f2c926 --- /dev/null +++ b/down-the-stack/dk_pac/src/twim0/txd/ptr.rs @@ -0,0 +1,80 @@ +#[doc = "Register `PTR` 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 `PTR` 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 `PTR` reader - Data pointer"] +pub type PTR_R = crate::FieldReader; +#[doc = "Field `PTR` writer - Data pointer"] +pub type PTR_W<'a, const O: u8> = crate::FieldWriter<'a, u32, PTR_SPEC, u32, u32, 32, O>; +impl R { + #[doc = "Bits 0:31 - Data pointer"] + #[inline(always)] + pub fn ptr(&self) -> PTR_R { + PTR_R::new(self.bits) + } +} +impl W { + #[doc = "Bits 0:31 - Data pointer"] + #[inline(always)] + #[must_use] + pub fn ptr(&mut self) -> PTR_W<0> { + PTR_W::new(self) + } + #[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 = "Data pointer\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 [ptr](index.html) module"] +pub struct PTR_SPEC; +impl crate::RegisterSpec for PTR_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [ptr::R](R) reader structure"] +impl crate::Readable for PTR_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [ptr::W](W) writer structure"] +impl crate::Writable for PTR_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets PTR to value 0"] +impl crate::Resettable for PTR_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/twis0.rs b/down-the-stack/dk_pac/src/twis0.rs new file mode 100644 index 0000000..a5197ac --- /dev/null +++ b/down-the-stack/dk_pac/src/twis0.rs @@ -0,0 +1,168 @@ +#[doc = r"Register block"] +#[repr(C)] +pub struct RegisterBlock { + _reserved0: [u8; 0x14], + #[doc = "0x14 - Stop TWI transaction"] + pub tasks_stop: TASKS_STOP, + _reserved1: [u8; 0x04], + #[doc = "0x1c - Suspend TWI transaction"] + pub tasks_suspend: TASKS_SUSPEND, + #[doc = "0x20 - Resume TWI transaction"] + pub tasks_resume: TASKS_RESUME, + _reserved3: [u8; 0x0c], + #[doc = "0x30 - Prepare the TWI slave to respond to a write command"] + pub tasks_preparerx: TASKS_PREPARERX, + #[doc = "0x34 - Prepare the TWI slave to respond to a read command"] + pub tasks_preparetx: TASKS_PREPARETX, + _reserved5: [u8; 0xcc], + #[doc = "0x104 - TWI stopped"] + pub events_stopped: EVENTS_STOPPED, + _reserved6: [u8; 0x1c], + #[doc = "0x124 - TWI error"] + pub events_error: EVENTS_ERROR, + _reserved7: [u8; 0x24], + #[doc = "0x14c - Receive sequence started"] + pub events_rxstarted: EVENTS_RXSTARTED, + #[doc = "0x150 - Transmit sequence started"] + pub events_txstarted: EVENTS_TXSTARTED, + _reserved9: [u8; 0x10], + #[doc = "0x164 - Write command received"] + pub events_write: EVENTS_WRITE, + #[doc = "0x168 - Read command received"] + pub events_read: EVENTS_READ, + _reserved11: [u8; 0x94], + #[doc = "0x200 - Shortcuts between local events and tasks"] + pub shorts: SHORTS, + _reserved12: [u8; 0xfc], + #[doc = "0x300 - Enable or disable interrupt"] + pub inten: INTEN, + #[doc = "0x304 - Enable interrupt"] + pub intenset: INTENSET, + #[doc = "0x308 - Disable interrupt"] + pub intenclr: INTENCLR, + _reserved15: [u8; 0x01c4], + #[doc = "0x4d0 - Error source"] + pub errorsrc: ERRORSRC, + #[doc = "0x4d4 - Status register indicating which address had a match"] + pub match_: MATCH, + _reserved17: [u8; 0x28], + #[doc = "0x500 - Enable TWIS"] + pub enable: ENABLE, + _reserved18: [u8; 0x04], + #[doc = "0x508..0x510 - Unspecified"] + pub psel: PSEL, + _reserved19: [u8; 0x24], + #[doc = "0x534..0x540 - RXD EasyDMA channel"] + pub rxd: RXD, + _reserved20: [u8; 0x04], + #[doc = "0x544..0x550 - TXD EasyDMA channel"] + pub txd: TXD, + _reserved21: [u8; 0x38], + #[doc = "0x588..0x590 - Description collection: TWI slave address n"] + pub address: [ADDRESS; 2], + _reserved22: [u8; 0x04], + #[doc = "0x594 - Configuration register for the address match mechanism"] + pub config: CONFIG, + _reserved23: [u8; 0x28], + #[doc = "0x5c0 - Over-read character. Character sent out in case of an over-read of the transmit buffer."] + pub orc: ORC, +} +#[doc = "TASKS_STOP (w) register accessor: an alias for `Reg`"] +pub type TASKS_STOP = crate::Reg; +#[doc = "Stop TWI transaction"] +pub mod tasks_stop; +#[doc = "TASKS_SUSPEND (w) register accessor: an alias for `Reg`"] +pub type TASKS_SUSPEND = crate::Reg; +#[doc = "Suspend TWI transaction"] +pub mod tasks_suspend; +#[doc = "TASKS_RESUME (w) register accessor: an alias for `Reg`"] +pub type TASKS_RESUME = crate::Reg; +#[doc = "Resume TWI transaction"] +pub mod tasks_resume; +#[doc = "TASKS_PREPARERX (w) register accessor: an alias for `Reg`"] +pub type TASKS_PREPARERX = crate::Reg; +#[doc = "Prepare the TWI slave to respond to a write command"] +pub mod tasks_preparerx; +#[doc = "TASKS_PREPARETX (w) register accessor: an alias for `Reg`"] +pub type TASKS_PREPARETX = crate::Reg; +#[doc = "Prepare the TWI slave to respond to a read command"] +pub mod tasks_preparetx; +#[doc = "EVENTS_STOPPED (rw) register accessor: an alias for `Reg`"] +pub type EVENTS_STOPPED = crate::Reg; +#[doc = "TWI stopped"] +pub mod events_stopped; +#[doc = "EVENTS_ERROR (rw) register accessor: an alias for `Reg`"] +pub type EVENTS_ERROR = crate::Reg; +#[doc = "TWI error"] +pub mod events_error; +#[doc = "EVENTS_RXSTARTED (rw) register accessor: an alias for `Reg`"] +pub type EVENTS_RXSTARTED = crate::Reg; +#[doc = "Receive sequence started"] +pub mod events_rxstarted; +#[doc = "EVENTS_TXSTARTED (rw) register accessor: an alias for `Reg`"] +pub type EVENTS_TXSTARTED = crate::Reg; +#[doc = "Transmit sequence started"] +pub mod events_txstarted; +#[doc = "EVENTS_WRITE (rw) register accessor: an alias for `Reg`"] +pub type EVENTS_WRITE = crate::Reg; +#[doc = "Write command received"] +pub mod events_write; +#[doc = "EVENTS_READ (rw) register accessor: an alias for `Reg`"] +pub type EVENTS_READ = crate::Reg; +#[doc = "Read command received"] +pub mod events_read; +#[doc = "SHORTS (rw) register accessor: an alias for `Reg`"] +pub type SHORTS = crate::Reg; +#[doc = "Shortcuts between local events and tasks"] +pub mod shorts; +#[doc = "INTEN (rw) register accessor: an alias for `Reg`"] +pub type INTEN = crate::Reg; +#[doc = "Enable or disable interrupt"] +pub mod inten; +#[doc = "INTENSET (rw) register accessor: an alias for `Reg`"] +pub type INTENSET = crate::Reg; +#[doc = "Enable interrupt"] +pub mod intenset; +#[doc = "INTENCLR (rw) register accessor: an alias for `Reg`"] +pub type INTENCLR = crate::Reg; +#[doc = "Disable interrupt"] +pub mod intenclr; +#[doc = "ERRORSRC (rw) register accessor: an alias for `Reg`"] +pub type ERRORSRC = crate::Reg; +#[doc = "Error source"] +pub mod errorsrc; +#[doc = "MATCH (r) register accessor: an alias for `Reg`"] +pub type MATCH = crate::Reg; +#[doc = "Status register indicating which address had a match"] +pub mod match_; +#[doc = "ENABLE (rw) register accessor: an alias for `Reg`"] +pub type ENABLE = crate::Reg; +#[doc = "Enable TWIS"] +pub mod enable; +#[doc = "Unspecified"] +pub use self::psel::PSEL; +#[doc = r"Cluster"] +#[doc = "Unspecified"] +pub mod psel; +#[doc = "RXD EasyDMA channel"] +pub use self::rxd::RXD; +#[doc = r"Cluster"] +#[doc = "RXD EasyDMA channel"] +pub mod rxd; +#[doc = "TXD EasyDMA channel"] +pub use self::txd::TXD; +#[doc = r"Cluster"] +#[doc = "TXD EasyDMA channel"] +pub mod txd; +#[doc = "ADDRESS (rw) register accessor: an alias for `Reg`"] +pub type ADDRESS = crate::Reg; +#[doc = "Description collection: TWI slave address n"] +pub mod address; +#[doc = "CONFIG (rw) register accessor: an alias for `Reg`"] +pub type CONFIG = crate::Reg; +#[doc = "Configuration register for the address match mechanism"] +pub mod config; +#[doc = "ORC (rw) register accessor: an alias for `Reg`"] +pub type ORC = crate::Reg; +#[doc = "Over-read character. Character sent out in case of an over-read of the transmit buffer."] +pub mod orc; diff --git a/down-the-stack/dk_pac/src/twis0/address.rs b/down-the-stack/dk_pac/src/twis0/address.rs new file mode 100644 index 0000000..9cbf33e --- /dev/null +++ b/down-the-stack/dk_pac/src/twis0/address.rs @@ -0,0 +1,81 @@ +#[doc = "Register `ADDRESS[%s]` 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 `ADDRESS[%s]` 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 `ADDRESS` reader - TWI slave address"] +pub type ADDRESS_R = crate::FieldReader; +#[doc = "Field `ADDRESS` writer - TWI slave address"] +pub type ADDRESS_W<'a, const O: u8> = crate::FieldWriter<'a, u32, ADDRESS_SPEC, u8, u8, 7, O>; +impl R { + #[doc = "Bits 0:6 - TWI slave address"] + #[inline(always)] + pub fn address(&self) -> ADDRESS_R { + ADDRESS_R::new((self.bits & 0x7f) as u8) + } +} +impl W { + #[doc = "Bits 0:6 - TWI slave address"] + #[inline(always)] + #[must_use] + pub fn address(&mut self) -> ADDRESS_W<0> { + ADDRESS_W::new(self) + } + #[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 = "Description collection: TWI slave address n\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 [address](index.html) module"] +pub struct ADDRESS_SPEC; +impl crate::RegisterSpec for ADDRESS_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [address::R](R) reader structure"] +impl crate::Readable for ADDRESS_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [address::W](W) writer structure"] +impl crate::Writable for ADDRESS_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets ADDRESS[%s] +to value 0"] +impl crate::Resettable for ADDRESS_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/twis0/config.rs b/down-the-stack/dk_pac/src/twis0/config.rs new file mode 100644 index 0000000..9be61fb --- /dev/null +++ b/down-the-stack/dk_pac/src/twis0/config.rs @@ -0,0 +1,187 @@ +#[doc = "Register `CONFIG` 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 `CONFIG` 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 `ADDRESS0` reader - Enable or disable address matching on ADDRESS\\[0\\]"] +pub type ADDRESS0_R = crate::BitReader; +#[doc = "Enable or disable address matching on ADDRESS\\[0\\]\n\nValue on reset: 1"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum ADDRESS0_A { + #[doc = "0: Disabled"] + DISABLED = 0, + #[doc = "1: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: ADDRESS0_A) -> Self { + variant as u8 != 0 + } +} +impl ADDRESS0_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> ADDRESS0_A { + match self.bits { + false => ADDRESS0_A::DISABLED, + true => ADDRESS0_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == ADDRESS0_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == ADDRESS0_A::ENABLED + } +} +#[doc = "Field `ADDRESS0` writer - Enable or disable address matching on ADDRESS\\[0\\]"] +pub type ADDRESS0_W<'a, const O: u8> = crate::BitWriter<'a, u32, CONFIG_SPEC, ADDRESS0_A, O>; +impl<'a, const O: u8> ADDRESS0_W<'a, O> { + #[doc = "Disabled"] + #[inline(always)] + pub fn disabled(self) -> &'a mut W { + self.variant(ADDRESS0_A::DISABLED) + } + #[doc = "Enabled"] + #[inline(always)] + pub fn enabled(self) -> &'a mut W { + self.variant(ADDRESS0_A::ENABLED) + } +} +#[doc = "Field `ADDRESS1` reader - Enable or disable address matching on ADDRESS\\[1\\]"] +pub type ADDRESS1_R = crate::BitReader; +#[doc = "Enable or disable address matching on ADDRESS\\[1\\]\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum ADDRESS1_A { + #[doc = "0: Disabled"] + DISABLED = 0, + #[doc = "1: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: ADDRESS1_A) -> Self { + variant as u8 != 0 + } +} +impl ADDRESS1_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> ADDRESS1_A { + match self.bits { + false => ADDRESS1_A::DISABLED, + true => ADDRESS1_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == ADDRESS1_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == ADDRESS1_A::ENABLED + } +} +#[doc = "Field `ADDRESS1` writer - Enable or disable address matching on ADDRESS\\[1\\]"] +pub type ADDRESS1_W<'a, const O: u8> = crate::BitWriter<'a, u32, CONFIG_SPEC, ADDRESS1_A, O>; +impl<'a, const O: u8> ADDRESS1_W<'a, O> { + #[doc = "Disabled"] + #[inline(always)] + pub fn disabled(self) -> &'a mut W { + self.variant(ADDRESS1_A::DISABLED) + } + #[doc = "Enabled"] + #[inline(always)] + pub fn enabled(self) -> &'a mut W { + self.variant(ADDRESS1_A::ENABLED) + } +} +impl R { + #[doc = "Bit 0 - Enable or disable address matching on ADDRESS\\[0\\]"] + #[inline(always)] + pub fn address0(&self) -> ADDRESS0_R { + ADDRESS0_R::new((self.bits & 1) != 0) + } + #[doc = "Bit 1 - Enable or disable address matching on ADDRESS\\[1\\]"] + #[inline(always)] + pub fn address1(&self) -> ADDRESS1_R { + ADDRESS1_R::new(((self.bits >> 1) & 1) != 0) + } +} +impl W { + #[doc = "Bit 0 - Enable or disable address matching on ADDRESS\\[0\\]"] + #[inline(always)] + #[must_use] + pub fn address0(&mut self) -> ADDRESS0_W<0> { + ADDRESS0_W::new(self) + } + #[doc = "Bit 1 - Enable or disable address matching on ADDRESS\\[1\\]"] + #[inline(always)] + #[must_use] + pub fn address1(&mut self) -> ADDRESS1_W<1> { + ADDRESS1_W::new(self) + } + #[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 = "Configuration register for the address match mechanism\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 [config](index.html) module"] +pub struct CONFIG_SPEC; +impl crate::RegisterSpec for CONFIG_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [config::R](R) reader structure"] +impl crate::Readable for CONFIG_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [config::W](W) writer structure"] +impl crate::Writable for 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 CONFIG to value 0x01"] +impl crate::Resettable for CONFIG_SPEC { + const RESET_VALUE: Self::Ux = 0x01; +} diff --git a/down-the-stack/dk_pac/src/twis0/enable.rs b/down-the-stack/dk_pac/src/twis0/enable.rs new file mode 100644 index 0000000..9f34186 --- /dev/null +++ b/down-the-stack/dk_pac/src/twis0/enable.rs @@ -0,0 +1,128 @@ +#[doc = "Register `ENABLE` 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 `ENABLE` 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 `ENABLE` reader - Enable or disable TWIS"] +pub type ENABLE_R = crate::FieldReader; +#[doc = "Enable or disable TWIS\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +#[repr(u8)] +pub enum ENABLE_A { + #[doc = "0: Disable TWIS"] + DISABLED = 0, + #[doc = "9: Enable TWIS"] + ENABLED = 9, +} +impl From for u8 { + #[inline(always)] + fn from(variant: ENABLE_A) -> Self { + variant as _ + } +} +impl ENABLE_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> Option { + match self.bits { + 0 => Some(ENABLE_A::DISABLED), + 9 => Some(ENABLE_A::ENABLED), + _ => None, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == ENABLE_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == ENABLE_A::ENABLED + } +} +#[doc = "Field `ENABLE` writer - Enable or disable TWIS"] +pub type ENABLE_W<'a, const O: u8> = crate::FieldWriter<'a, u32, ENABLE_SPEC, u8, ENABLE_A, 4, O>; +impl<'a, const O: u8> ENABLE_W<'a, O> { + #[doc = "Disable TWIS"] + #[inline(always)] + pub fn disabled(self) -> &'a mut W { + self.variant(ENABLE_A::DISABLED) + } + #[doc = "Enable TWIS"] + #[inline(always)] + pub fn enabled(self) -> &'a mut W { + self.variant(ENABLE_A::ENABLED) + } +} +impl R { + #[doc = "Bits 0:3 - Enable or disable TWIS"] + #[inline(always)] + pub fn enable(&self) -> ENABLE_R { + ENABLE_R::new((self.bits & 0x0f) as u8) + } +} +impl W { + #[doc = "Bits 0:3 - Enable or disable TWIS"] + #[inline(always)] + #[must_use] + pub fn enable(&mut self) -> ENABLE_W<0> { + 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 + } +} +#[doc = "Enable TWIS\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 [enable](index.html) module"] +pub struct ENABLE_SPEC; +impl crate::RegisterSpec for ENABLE_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [enable::R](R) reader structure"] +impl crate::Readable for ENABLE_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [enable::W](W) writer structure"] +impl crate::Writable for ENABLE_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets ENABLE to value 0"] +impl crate::Resettable for ENABLE_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/twis0/errorsrc.rs b/down-the-stack/dk_pac/src/twis0/errorsrc.rs new file mode 100644 index 0000000..322f6bc --- /dev/null +++ b/down-the-stack/dk_pac/src/twis0/errorsrc.rs @@ -0,0 +1,248 @@ +#[doc = "Register `ERRORSRC` 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 `ERRORSRC` 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 `OVERFLOW` reader - RX buffer overflow detected, and prevented"] +pub type OVERFLOW_R = crate::BitReader; +#[doc = "RX buffer overflow detected, and prevented\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum OVERFLOW_A { + #[doc = "0: Error did not occur"] + NOT_DETECTED = 0, + #[doc = "1: Error occurred"] + DETECTED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: OVERFLOW_A) -> Self { + variant as u8 != 0 + } +} +impl OVERFLOW_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> OVERFLOW_A { + match self.bits { + false => OVERFLOW_A::NOT_DETECTED, + true => OVERFLOW_A::DETECTED, + } + } + #[doc = "Checks if the value of the field is `NOT_DETECTED`"] + #[inline(always)] + pub fn is_not_detected(&self) -> bool { + *self == OVERFLOW_A::NOT_DETECTED + } + #[doc = "Checks if the value of the field is `DETECTED`"] + #[inline(always)] + pub fn is_detected(&self) -> bool { + *self == OVERFLOW_A::DETECTED + } +} +#[doc = "Field `OVERFLOW` writer - RX buffer overflow detected, and prevented"] +pub type OVERFLOW_W<'a, const O: u8> = crate::BitWriter1C<'a, u32, ERRORSRC_SPEC, OVERFLOW_A, O>; +impl<'a, const O: u8> OVERFLOW_W<'a, O> { + #[doc = "Error did not occur"] + #[inline(always)] + pub fn not_detected(self) -> &'a mut W { + self.variant(OVERFLOW_A::NOT_DETECTED) + } + #[doc = "Error occurred"] + #[inline(always)] + pub fn detected(self) -> &'a mut W { + self.variant(OVERFLOW_A::DETECTED) + } +} +#[doc = "Field `DNACK` reader - NACK sent after receiving a data byte"] +pub type DNACK_R = crate::BitReader; +#[doc = "NACK sent after receiving a data byte\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum DNACK_A { + #[doc = "0: Error did not occur"] + NOT_RECEIVED = 0, + #[doc = "1: Error occurred"] + RECEIVED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: DNACK_A) -> Self { + variant as u8 != 0 + } +} +impl DNACK_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> DNACK_A { + match self.bits { + false => DNACK_A::NOT_RECEIVED, + true => DNACK_A::RECEIVED, + } + } + #[doc = "Checks if the value of the field is `NOT_RECEIVED`"] + #[inline(always)] + pub fn is_not_received(&self) -> bool { + *self == DNACK_A::NOT_RECEIVED + } + #[doc = "Checks if the value of the field is `RECEIVED`"] + #[inline(always)] + pub fn is_received(&self) -> bool { + *self == DNACK_A::RECEIVED + } +} +#[doc = "Field `DNACK` writer - NACK sent after receiving a data byte"] +pub type DNACK_W<'a, const O: u8> = crate::BitWriter1C<'a, u32, ERRORSRC_SPEC, DNACK_A, O>; +impl<'a, const O: u8> DNACK_W<'a, O> { + #[doc = "Error did not occur"] + #[inline(always)] + pub fn not_received(self) -> &'a mut W { + self.variant(DNACK_A::NOT_RECEIVED) + } + #[doc = "Error occurred"] + #[inline(always)] + pub fn received(self) -> &'a mut W { + self.variant(DNACK_A::RECEIVED) + } +} +#[doc = "Field `OVERREAD` reader - TX buffer over-read detected, and prevented"] +pub type OVERREAD_R = crate::BitReader; +#[doc = "TX buffer over-read detected, and prevented\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum OVERREAD_A { + #[doc = "0: Error did not occur"] + NOT_DETECTED = 0, + #[doc = "1: Error occurred"] + DETECTED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: OVERREAD_A) -> Self { + variant as u8 != 0 + } +} +impl OVERREAD_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> OVERREAD_A { + match self.bits { + false => OVERREAD_A::NOT_DETECTED, + true => OVERREAD_A::DETECTED, + } + } + #[doc = "Checks if the value of the field is `NOT_DETECTED`"] + #[inline(always)] + pub fn is_not_detected(&self) -> bool { + *self == OVERREAD_A::NOT_DETECTED + } + #[doc = "Checks if the value of the field is `DETECTED`"] + #[inline(always)] + pub fn is_detected(&self) -> bool { + *self == OVERREAD_A::DETECTED + } +} +#[doc = "Field `OVERREAD` writer - TX buffer over-read detected, and prevented"] +pub type OVERREAD_W<'a, const O: u8> = crate::BitWriter1C<'a, u32, ERRORSRC_SPEC, OVERREAD_A, O>; +impl<'a, const O: u8> OVERREAD_W<'a, O> { + #[doc = "Error did not occur"] + #[inline(always)] + pub fn not_detected(self) -> &'a mut W { + self.variant(OVERREAD_A::NOT_DETECTED) + } + #[doc = "Error occurred"] + #[inline(always)] + pub fn detected(self) -> &'a mut W { + self.variant(OVERREAD_A::DETECTED) + } +} +impl R { + #[doc = "Bit 0 - RX buffer overflow detected, and prevented"] + #[inline(always)] + pub fn overflow(&self) -> OVERFLOW_R { + OVERFLOW_R::new((self.bits & 1) != 0) + } + #[doc = "Bit 2 - NACK sent after receiving a data byte"] + #[inline(always)] + pub fn dnack(&self) -> DNACK_R { + DNACK_R::new(((self.bits >> 2) & 1) != 0) + } + #[doc = "Bit 3 - TX buffer over-read detected, and prevented"] + #[inline(always)] + pub fn overread(&self) -> OVERREAD_R { + OVERREAD_R::new(((self.bits >> 3) & 1) != 0) + } +} +impl W { + #[doc = "Bit 0 - RX buffer overflow detected, and prevented"] + #[inline(always)] + #[must_use] + pub fn overflow(&mut self) -> OVERFLOW_W<0> { + OVERFLOW_W::new(self) + } + #[doc = "Bit 2 - NACK sent after receiving a data byte"] + #[inline(always)] + #[must_use] + pub fn dnack(&mut self) -> DNACK_W<2> { + DNACK_W::new(self) + } + #[doc = "Bit 3 - TX buffer over-read detected, and prevented"] + #[inline(always)] + #[must_use] + pub fn overread(&mut self) -> OVERREAD_W<3> { + OVERREAD_W::new(self) + } + #[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 = "Error source\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 [errorsrc](index.html) module"] +pub struct ERRORSRC_SPEC; +impl crate::RegisterSpec for ERRORSRC_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [errorsrc::R](R) reader structure"] +impl crate::Readable for ERRORSRC_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [errorsrc::W](W) writer structure"] +impl crate::Writable for ERRORSRC_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0x0d; +} +#[doc = "`reset()` method sets ERRORSRC to value 0"] +impl crate::Resettable for ERRORSRC_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/twis0/events_error.rs b/down-the-stack/dk_pac/src/twis0/events_error.rs new file mode 100644 index 0000000..05b214c --- /dev/null +++ b/down-the-stack/dk_pac/src/twis0/events_error.rs @@ -0,0 +1,127 @@ +#[doc = "Register `EVENTS_ERROR` 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 `EVENTS_ERROR` 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 `EVENTS_ERROR` reader - TWI error"] +pub type EVENTS_ERROR_R = crate::BitReader; +#[doc = "TWI error\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum EVENTS_ERROR_A { + #[doc = "0: Event not generated"] + NOT_GENERATED = 0, + #[doc = "1: Event generated"] + GENERATED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: EVENTS_ERROR_A) -> Self { + variant as u8 != 0 + } +} +impl EVENTS_ERROR_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> EVENTS_ERROR_A { + match self.bits { + false => EVENTS_ERROR_A::NOT_GENERATED, + true => EVENTS_ERROR_A::GENERATED, + } + } + #[doc = "Checks if the value of the field is `NOT_GENERATED`"] + #[inline(always)] + pub fn is_not_generated(&self) -> bool { + *self == EVENTS_ERROR_A::NOT_GENERATED + } + #[doc = "Checks if the value of the field is `GENERATED`"] + #[inline(always)] + pub fn is_generated(&self) -> bool { + *self == EVENTS_ERROR_A::GENERATED + } +} +#[doc = "Field `EVENTS_ERROR` writer - TWI error"] +pub type EVENTS_ERROR_W<'a, const O: u8> = + crate::BitWriter<'a, u32, EVENTS_ERROR_SPEC, EVENTS_ERROR_A, O>; +impl<'a, const O: u8> EVENTS_ERROR_W<'a, O> { + #[doc = "Event not generated"] + #[inline(always)] + pub fn not_generated(self) -> &'a mut W { + self.variant(EVENTS_ERROR_A::NOT_GENERATED) + } + #[doc = "Event generated"] + #[inline(always)] + pub fn generated(self) -> &'a mut W { + self.variant(EVENTS_ERROR_A::GENERATED) + } +} +impl R { + #[doc = "Bit 0 - TWI error"] + #[inline(always)] + pub fn events_error(&self) -> EVENTS_ERROR_R { + EVENTS_ERROR_R::new((self.bits & 1) != 0) + } +} +impl W { + #[doc = "Bit 0 - TWI error"] + #[inline(always)] + #[must_use] + pub fn events_error(&mut self) -> EVENTS_ERROR_W<0> { + EVENTS_ERROR_W::new(self) + } + #[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 = "TWI error\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 [events_error](index.html) module"] +pub struct EVENTS_ERROR_SPEC; +impl crate::RegisterSpec for EVENTS_ERROR_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [events_error::R](R) reader structure"] +impl crate::Readable for EVENTS_ERROR_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [events_error::W](W) writer structure"] +impl crate::Writable for EVENTS_ERROR_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets EVENTS_ERROR to value 0"] +impl crate::Resettable for EVENTS_ERROR_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/twis0/events_read.rs b/down-the-stack/dk_pac/src/twis0/events_read.rs new file mode 100644 index 0000000..e7cba96 --- /dev/null +++ b/down-the-stack/dk_pac/src/twis0/events_read.rs @@ -0,0 +1,127 @@ +#[doc = "Register `EVENTS_READ` 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 `EVENTS_READ` 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 `EVENTS_READ` reader - Read command received"] +pub type EVENTS_READ_R = crate::BitReader; +#[doc = "Read command received\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum EVENTS_READ_A { + #[doc = "0: Event not generated"] + NOT_GENERATED = 0, + #[doc = "1: Event generated"] + GENERATED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: EVENTS_READ_A) -> Self { + variant as u8 != 0 + } +} +impl EVENTS_READ_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> EVENTS_READ_A { + match self.bits { + false => EVENTS_READ_A::NOT_GENERATED, + true => EVENTS_READ_A::GENERATED, + } + } + #[doc = "Checks if the value of the field is `NOT_GENERATED`"] + #[inline(always)] + pub fn is_not_generated(&self) -> bool { + *self == EVENTS_READ_A::NOT_GENERATED + } + #[doc = "Checks if the value of the field is `GENERATED`"] + #[inline(always)] + pub fn is_generated(&self) -> bool { + *self == EVENTS_READ_A::GENERATED + } +} +#[doc = "Field `EVENTS_READ` writer - Read command received"] +pub type EVENTS_READ_W<'a, const O: u8> = + crate::BitWriter<'a, u32, EVENTS_READ_SPEC, EVENTS_READ_A, O>; +impl<'a, const O: u8> EVENTS_READ_W<'a, O> { + #[doc = "Event not generated"] + #[inline(always)] + pub fn not_generated(self) -> &'a mut W { + self.variant(EVENTS_READ_A::NOT_GENERATED) + } + #[doc = "Event generated"] + #[inline(always)] + pub fn generated(self) -> &'a mut W { + self.variant(EVENTS_READ_A::GENERATED) + } +} +impl R { + #[doc = "Bit 0 - Read command received"] + #[inline(always)] + pub fn events_read(&self) -> EVENTS_READ_R { + EVENTS_READ_R::new((self.bits & 1) != 0) + } +} +impl W { + #[doc = "Bit 0 - Read command received"] + #[inline(always)] + #[must_use] + pub fn events_read(&mut self) -> EVENTS_READ_W<0> { + EVENTS_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 + } +} +#[doc = "Read command received\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 [events_read](index.html) module"] +pub struct EVENTS_READ_SPEC; +impl crate::RegisterSpec for EVENTS_READ_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [events_read::R](R) reader structure"] +impl crate::Readable for EVENTS_READ_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [events_read::W](W) writer structure"] +impl crate::Writable for EVENTS_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 EVENTS_READ to value 0"] +impl crate::Resettable for EVENTS_READ_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/twis0/events_rxstarted.rs b/down-the-stack/dk_pac/src/twis0/events_rxstarted.rs new file mode 100644 index 0000000..194b098 --- /dev/null +++ b/down-the-stack/dk_pac/src/twis0/events_rxstarted.rs @@ -0,0 +1,127 @@ +#[doc = "Register `EVENTS_RXSTARTED` 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 `EVENTS_RXSTARTED` 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 `EVENTS_RXSTARTED` reader - Receive sequence started"] +pub type EVENTS_RXSTARTED_R = crate::BitReader; +#[doc = "Receive sequence started\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum EVENTS_RXSTARTED_A { + #[doc = "0: Event not generated"] + NOT_GENERATED = 0, + #[doc = "1: Event generated"] + GENERATED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: EVENTS_RXSTARTED_A) -> Self { + variant as u8 != 0 + } +} +impl EVENTS_RXSTARTED_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> EVENTS_RXSTARTED_A { + match self.bits { + false => EVENTS_RXSTARTED_A::NOT_GENERATED, + true => EVENTS_RXSTARTED_A::GENERATED, + } + } + #[doc = "Checks if the value of the field is `NOT_GENERATED`"] + #[inline(always)] + pub fn is_not_generated(&self) -> bool { + *self == EVENTS_RXSTARTED_A::NOT_GENERATED + } + #[doc = "Checks if the value of the field is `GENERATED`"] + #[inline(always)] + pub fn is_generated(&self) -> bool { + *self == EVENTS_RXSTARTED_A::GENERATED + } +} +#[doc = "Field `EVENTS_RXSTARTED` writer - Receive sequence started"] +pub type EVENTS_RXSTARTED_W<'a, const O: u8> = + crate::BitWriter<'a, u32, EVENTS_RXSTARTED_SPEC, EVENTS_RXSTARTED_A, O>; +impl<'a, const O: u8> EVENTS_RXSTARTED_W<'a, O> { + #[doc = "Event not generated"] + #[inline(always)] + pub fn not_generated(self) -> &'a mut W { + self.variant(EVENTS_RXSTARTED_A::NOT_GENERATED) + } + #[doc = "Event generated"] + #[inline(always)] + pub fn generated(self) -> &'a mut W { + self.variant(EVENTS_RXSTARTED_A::GENERATED) + } +} +impl R { + #[doc = "Bit 0 - Receive sequence started"] + #[inline(always)] + pub fn events_rxstarted(&self) -> EVENTS_RXSTARTED_R { + EVENTS_RXSTARTED_R::new((self.bits & 1) != 0) + } +} +impl W { + #[doc = "Bit 0 - Receive sequence started"] + #[inline(always)] + #[must_use] + pub fn events_rxstarted(&mut self) -> EVENTS_RXSTARTED_W<0> { + EVENTS_RXSTARTED_W::new(self) + } + #[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 = "Receive sequence started\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 [events_rxstarted](index.html) module"] +pub struct EVENTS_RXSTARTED_SPEC; +impl crate::RegisterSpec for EVENTS_RXSTARTED_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [events_rxstarted::R](R) reader structure"] +impl crate::Readable for EVENTS_RXSTARTED_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [events_rxstarted::W](W) writer structure"] +impl crate::Writable for EVENTS_RXSTARTED_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets EVENTS_RXSTARTED to value 0"] +impl crate::Resettable for EVENTS_RXSTARTED_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/twis0/events_stopped.rs b/down-the-stack/dk_pac/src/twis0/events_stopped.rs new file mode 100644 index 0000000..4663646 --- /dev/null +++ b/down-the-stack/dk_pac/src/twis0/events_stopped.rs @@ -0,0 +1,127 @@ +#[doc = "Register `EVENTS_STOPPED` 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 `EVENTS_STOPPED` 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 `EVENTS_STOPPED` reader - TWI stopped"] +pub type EVENTS_STOPPED_R = crate::BitReader; +#[doc = "TWI stopped\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum EVENTS_STOPPED_A { + #[doc = "0: Event not generated"] + NOT_GENERATED = 0, + #[doc = "1: Event generated"] + GENERATED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: EVENTS_STOPPED_A) -> Self { + variant as u8 != 0 + } +} +impl EVENTS_STOPPED_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> EVENTS_STOPPED_A { + match self.bits { + false => EVENTS_STOPPED_A::NOT_GENERATED, + true => EVENTS_STOPPED_A::GENERATED, + } + } + #[doc = "Checks if the value of the field is `NOT_GENERATED`"] + #[inline(always)] + pub fn is_not_generated(&self) -> bool { + *self == EVENTS_STOPPED_A::NOT_GENERATED + } + #[doc = "Checks if the value of the field is `GENERATED`"] + #[inline(always)] + pub fn is_generated(&self) -> bool { + *self == EVENTS_STOPPED_A::GENERATED + } +} +#[doc = "Field `EVENTS_STOPPED` writer - TWI stopped"] +pub type EVENTS_STOPPED_W<'a, const O: u8> = + crate::BitWriter<'a, u32, EVENTS_STOPPED_SPEC, EVENTS_STOPPED_A, O>; +impl<'a, const O: u8> EVENTS_STOPPED_W<'a, O> { + #[doc = "Event not generated"] + #[inline(always)] + pub fn not_generated(self) -> &'a mut W { + self.variant(EVENTS_STOPPED_A::NOT_GENERATED) + } + #[doc = "Event generated"] + #[inline(always)] + pub fn generated(self) -> &'a mut W { + self.variant(EVENTS_STOPPED_A::GENERATED) + } +} +impl R { + #[doc = "Bit 0 - TWI stopped"] + #[inline(always)] + pub fn events_stopped(&self) -> EVENTS_STOPPED_R { + EVENTS_STOPPED_R::new((self.bits & 1) != 0) + } +} +impl W { + #[doc = "Bit 0 - TWI stopped"] + #[inline(always)] + #[must_use] + pub fn events_stopped(&mut self) -> EVENTS_STOPPED_W<0> { + EVENTS_STOPPED_W::new(self) + } + #[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 = "TWI stopped\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 [events_stopped](index.html) module"] +pub struct EVENTS_STOPPED_SPEC; +impl crate::RegisterSpec for EVENTS_STOPPED_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [events_stopped::R](R) reader structure"] +impl crate::Readable for EVENTS_STOPPED_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [events_stopped::W](W) writer structure"] +impl crate::Writable for EVENTS_STOPPED_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets EVENTS_STOPPED to value 0"] +impl crate::Resettable for EVENTS_STOPPED_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/twis0/events_txstarted.rs b/down-the-stack/dk_pac/src/twis0/events_txstarted.rs new file mode 100644 index 0000000..0cb2e84 --- /dev/null +++ b/down-the-stack/dk_pac/src/twis0/events_txstarted.rs @@ -0,0 +1,127 @@ +#[doc = "Register `EVENTS_TXSTARTED` 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 `EVENTS_TXSTARTED` 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 `EVENTS_TXSTARTED` reader - Transmit sequence started"] +pub type EVENTS_TXSTARTED_R = crate::BitReader; +#[doc = "Transmit sequence started\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum EVENTS_TXSTARTED_A { + #[doc = "0: Event not generated"] + NOT_GENERATED = 0, + #[doc = "1: Event generated"] + GENERATED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: EVENTS_TXSTARTED_A) -> Self { + variant as u8 != 0 + } +} +impl EVENTS_TXSTARTED_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> EVENTS_TXSTARTED_A { + match self.bits { + false => EVENTS_TXSTARTED_A::NOT_GENERATED, + true => EVENTS_TXSTARTED_A::GENERATED, + } + } + #[doc = "Checks if the value of the field is `NOT_GENERATED`"] + #[inline(always)] + pub fn is_not_generated(&self) -> bool { + *self == EVENTS_TXSTARTED_A::NOT_GENERATED + } + #[doc = "Checks if the value of the field is `GENERATED`"] + #[inline(always)] + pub fn is_generated(&self) -> bool { + *self == EVENTS_TXSTARTED_A::GENERATED + } +} +#[doc = "Field `EVENTS_TXSTARTED` writer - Transmit sequence started"] +pub type EVENTS_TXSTARTED_W<'a, const O: u8> = + crate::BitWriter<'a, u32, EVENTS_TXSTARTED_SPEC, EVENTS_TXSTARTED_A, O>; +impl<'a, const O: u8> EVENTS_TXSTARTED_W<'a, O> { + #[doc = "Event not generated"] + #[inline(always)] + pub fn not_generated(self) -> &'a mut W { + self.variant(EVENTS_TXSTARTED_A::NOT_GENERATED) + } + #[doc = "Event generated"] + #[inline(always)] + pub fn generated(self) -> &'a mut W { + self.variant(EVENTS_TXSTARTED_A::GENERATED) + } +} +impl R { + #[doc = "Bit 0 - Transmit sequence started"] + #[inline(always)] + pub fn events_txstarted(&self) -> EVENTS_TXSTARTED_R { + EVENTS_TXSTARTED_R::new((self.bits & 1) != 0) + } +} +impl W { + #[doc = "Bit 0 - Transmit sequence started"] + #[inline(always)] + #[must_use] + pub fn events_txstarted(&mut self) -> EVENTS_TXSTARTED_W<0> { + EVENTS_TXSTARTED_W::new(self) + } + #[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 = "Transmit sequence started\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 [events_txstarted](index.html) module"] +pub struct EVENTS_TXSTARTED_SPEC; +impl crate::RegisterSpec for EVENTS_TXSTARTED_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [events_txstarted::R](R) reader structure"] +impl crate::Readable for EVENTS_TXSTARTED_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [events_txstarted::W](W) writer structure"] +impl crate::Writable for EVENTS_TXSTARTED_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets EVENTS_TXSTARTED to value 0"] +impl crate::Resettable for EVENTS_TXSTARTED_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/twis0/events_write.rs b/down-the-stack/dk_pac/src/twis0/events_write.rs new file mode 100644 index 0000000..c3c4d1f --- /dev/null +++ b/down-the-stack/dk_pac/src/twis0/events_write.rs @@ -0,0 +1,127 @@ +#[doc = "Register `EVENTS_WRITE` 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 `EVENTS_WRITE` 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 `EVENTS_WRITE` reader - Write command received"] +pub type EVENTS_WRITE_R = crate::BitReader; +#[doc = "Write command received\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum EVENTS_WRITE_A { + #[doc = "0: Event not generated"] + NOT_GENERATED = 0, + #[doc = "1: Event generated"] + GENERATED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: EVENTS_WRITE_A) -> Self { + variant as u8 != 0 + } +} +impl EVENTS_WRITE_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> EVENTS_WRITE_A { + match self.bits { + false => EVENTS_WRITE_A::NOT_GENERATED, + true => EVENTS_WRITE_A::GENERATED, + } + } + #[doc = "Checks if the value of the field is `NOT_GENERATED`"] + #[inline(always)] + pub fn is_not_generated(&self) -> bool { + *self == EVENTS_WRITE_A::NOT_GENERATED + } + #[doc = "Checks if the value of the field is `GENERATED`"] + #[inline(always)] + pub fn is_generated(&self) -> bool { + *self == EVENTS_WRITE_A::GENERATED + } +} +#[doc = "Field `EVENTS_WRITE` writer - Write command received"] +pub type EVENTS_WRITE_W<'a, const O: u8> = + crate::BitWriter<'a, u32, EVENTS_WRITE_SPEC, EVENTS_WRITE_A, O>; +impl<'a, const O: u8> EVENTS_WRITE_W<'a, O> { + #[doc = "Event not generated"] + #[inline(always)] + pub fn not_generated(self) -> &'a mut W { + self.variant(EVENTS_WRITE_A::NOT_GENERATED) + } + #[doc = "Event generated"] + #[inline(always)] + pub fn generated(self) -> &'a mut W { + self.variant(EVENTS_WRITE_A::GENERATED) + } +} +impl R { + #[doc = "Bit 0 - Write command received"] + #[inline(always)] + pub fn events_write(&self) -> EVENTS_WRITE_R { + EVENTS_WRITE_R::new((self.bits & 1) != 0) + } +} +impl W { + #[doc = "Bit 0 - Write command received"] + #[inline(always)] + #[must_use] + pub fn events_write(&mut self) -> EVENTS_WRITE_W<0> { + EVENTS_WRITE_W::new(self) + } + #[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 = "Write command received\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 [events_write](index.html) module"] +pub struct EVENTS_WRITE_SPEC; +impl crate::RegisterSpec for EVENTS_WRITE_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [events_write::R](R) reader structure"] +impl crate::Readable for EVENTS_WRITE_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [events_write::W](W) writer structure"] +impl crate::Writable for EVENTS_WRITE_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets EVENTS_WRITE to value 0"] +impl crate::Resettable for EVENTS_WRITE_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/twis0/inten.rs b/down-the-stack/dk_pac/src/twis0/inten.rs new file mode 100644 index 0000000..e66c7e5 --- /dev/null +++ b/down-the-stack/dk_pac/src/twis0/inten.rs @@ -0,0 +1,431 @@ +#[doc = "Register `INTEN` 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 `INTEN` 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 `STOPPED` reader - Enable or disable interrupt for event STOPPED"] +pub type STOPPED_R = crate::BitReader; +#[doc = "Enable or disable interrupt for event STOPPED\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum STOPPED_A { + #[doc = "0: Disable"] + DISABLED = 0, + #[doc = "1: Enable"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: STOPPED_A) -> Self { + variant as u8 != 0 + } +} +impl STOPPED_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> STOPPED_A { + match self.bits { + false => STOPPED_A::DISABLED, + true => STOPPED_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == STOPPED_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == STOPPED_A::ENABLED + } +} +#[doc = "Field `STOPPED` writer - Enable or disable interrupt for event STOPPED"] +pub type STOPPED_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTEN_SPEC, STOPPED_A, O>; +impl<'a, const O: u8> STOPPED_W<'a, O> { + #[doc = "Disable"] + #[inline(always)] + pub fn disabled(self) -> &'a mut W { + self.variant(STOPPED_A::DISABLED) + } + #[doc = "Enable"] + #[inline(always)] + pub fn enabled(self) -> &'a mut W { + self.variant(STOPPED_A::ENABLED) + } +} +#[doc = "Field `ERROR` reader - Enable or disable interrupt for event ERROR"] +pub type ERROR_R = crate::BitReader; +#[doc = "Enable or disable interrupt for event ERROR\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum ERROR_A { + #[doc = "0: Disable"] + DISABLED = 0, + #[doc = "1: Enable"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: ERROR_A) -> Self { + variant as u8 != 0 + } +} +impl ERROR_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> ERROR_A { + match self.bits { + false => ERROR_A::DISABLED, + true => ERROR_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == ERROR_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == ERROR_A::ENABLED + } +} +#[doc = "Field `ERROR` writer - Enable or disable interrupt for event ERROR"] +pub type ERROR_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTEN_SPEC, ERROR_A, O>; +impl<'a, const O: u8> ERROR_W<'a, O> { + #[doc = "Disable"] + #[inline(always)] + pub fn disabled(self) -> &'a mut W { + self.variant(ERROR_A::DISABLED) + } + #[doc = "Enable"] + #[inline(always)] + pub fn enabled(self) -> &'a mut W { + self.variant(ERROR_A::ENABLED) + } +} +#[doc = "Field `RXSTARTED` reader - Enable or disable interrupt for event RXSTARTED"] +pub type RXSTARTED_R = crate::BitReader; +#[doc = "Enable or disable interrupt for event RXSTARTED\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum RXSTARTED_A { + #[doc = "0: Disable"] + DISABLED = 0, + #[doc = "1: Enable"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: RXSTARTED_A) -> Self { + variant as u8 != 0 + } +} +impl RXSTARTED_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> RXSTARTED_A { + match self.bits { + false => RXSTARTED_A::DISABLED, + true => RXSTARTED_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == RXSTARTED_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == RXSTARTED_A::ENABLED + } +} +#[doc = "Field `RXSTARTED` writer - Enable or disable interrupt for event RXSTARTED"] +pub type RXSTARTED_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTEN_SPEC, RXSTARTED_A, O>; +impl<'a, const O: u8> RXSTARTED_W<'a, O> { + #[doc = "Disable"] + #[inline(always)] + pub fn disabled(self) -> &'a mut W { + self.variant(RXSTARTED_A::DISABLED) + } + #[doc = "Enable"] + #[inline(always)] + pub fn enabled(self) -> &'a mut W { + self.variant(RXSTARTED_A::ENABLED) + } +} +#[doc = "Field `TXSTARTED` reader - Enable or disable interrupt for event TXSTARTED"] +pub type TXSTARTED_R = crate::BitReader; +#[doc = "Enable or disable interrupt for event TXSTARTED\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum TXSTARTED_A { + #[doc = "0: Disable"] + DISABLED = 0, + #[doc = "1: Enable"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: TXSTARTED_A) -> Self { + variant as u8 != 0 + } +} +impl TXSTARTED_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> TXSTARTED_A { + match self.bits { + false => TXSTARTED_A::DISABLED, + true => TXSTARTED_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == TXSTARTED_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == TXSTARTED_A::ENABLED + } +} +#[doc = "Field `TXSTARTED` writer - Enable or disable interrupt for event TXSTARTED"] +pub type TXSTARTED_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTEN_SPEC, TXSTARTED_A, O>; +impl<'a, const O: u8> TXSTARTED_W<'a, O> { + #[doc = "Disable"] + #[inline(always)] + pub fn disabled(self) -> &'a mut W { + self.variant(TXSTARTED_A::DISABLED) + } + #[doc = "Enable"] + #[inline(always)] + pub fn enabled(self) -> &'a mut W { + self.variant(TXSTARTED_A::ENABLED) + } +} +#[doc = "Field `WRITE` reader - Enable or disable interrupt for event WRITE"] +pub type WRITE_R = crate::BitReader; +#[doc = "Enable or disable interrupt for event WRITE\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum WRITE_A { + #[doc = "0: Disable"] + DISABLED = 0, + #[doc = "1: Enable"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: WRITE_A) -> Self { + variant as u8 != 0 + } +} +impl WRITE_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> WRITE_A { + match self.bits { + false => WRITE_A::DISABLED, + true => WRITE_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == WRITE_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == WRITE_A::ENABLED + } +} +#[doc = "Field `WRITE` writer - Enable or disable interrupt for event WRITE"] +pub type WRITE_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTEN_SPEC, WRITE_A, O>; +impl<'a, const O: u8> WRITE_W<'a, O> { + #[doc = "Disable"] + #[inline(always)] + pub fn disabled(self) -> &'a mut W { + self.variant(WRITE_A::DISABLED) + } + #[doc = "Enable"] + #[inline(always)] + pub fn enabled(self) -> &'a mut W { + self.variant(WRITE_A::ENABLED) + } +} +#[doc = "Field `READ` reader - Enable or disable interrupt for event READ"] +pub type READ_R = crate::BitReader; +#[doc = "Enable or disable interrupt for event READ\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum READ_A { + #[doc = "0: Disable"] + DISABLED = 0, + #[doc = "1: Enable"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: READ_A) -> Self { + variant as u8 != 0 + } +} +impl READ_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> READ_A { + match self.bits { + false => READ_A::DISABLED, + true => READ_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == READ_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == READ_A::ENABLED + } +} +#[doc = "Field `READ` writer - Enable or disable interrupt for event READ"] +pub type READ_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTEN_SPEC, READ_A, O>; +impl<'a, const O: u8> READ_W<'a, O> { + #[doc = "Disable"] + #[inline(always)] + pub fn disabled(self) -> &'a mut W { + self.variant(READ_A::DISABLED) + } + #[doc = "Enable"] + #[inline(always)] + pub fn enabled(self) -> &'a mut W { + self.variant(READ_A::ENABLED) + } +} +impl R { + #[doc = "Bit 1 - Enable or disable interrupt for event STOPPED"] + #[inline(always)] + pub fn stopped(&self) -> STOPPED_R { + STOPPED_R::new(((self.bits >> 1) & 1) != 0) + } + #[doc = "Bit 9 - Enable or disable interrupt for event ERROR"] + #[inline(always)] + pub fn error(&self) -> ERROR_R { + ERROR_R::new(((self.bits >> 9) & 1) != 0) + } + #[doc = "Bit 19 - Enable or disable interrupt for event RXSTARTED"] + #[inline(always)] + pub fn rxstarted(&self) -> RXSTARTED_R { + RXSTARTED_R::new(((self.bits >> 19) & 1) != 0) + } + #[doc = "Bit 20 - Enable or disable interrupt for event TXSTARTED"] + #[inline(always)] + pub fn txstarted(&self) -> TXSTARTED_R { + TXSTARTED_R::new(((self.bits >> 20) & 1) != 0) + } + #[doc = "Bit 25 - Enable or disable interrupt for event WRITE"] + #[inline(always)] + pub fn write(&self) -> WRITE_R { + WRITE_R::new(((self.bits >> 25) & 1) != 0) + } + #[doc = "Bit 26 - Enable or disable interrupt for event READ"] + #[inline(always)] + pub fn read(&self) -> READ_R { + READ_R::new(((self.bits >> 26) & 1) != 0) + } +} +impl W { + #[doc = "Bit 1 - Enable or disable interrupt for event STOPPED"] + #[inline(always)] + #[must_use] + pub fn stopped(&mut self) -> STOPPED_W<1> { + STOPPED_W::new(self) + } + #[doc = "Bit 9 - Enable or disable interrupt for event ERROR"] + #[inline(always)] + #[must_use] + pub fn error(&mut self) -> ERROR_W<9> { + ERROR_W::new(self) + } + #[doc = "Bit 19 - Enable or disable interrupt for event RXSTARTED"] + #[inline(always)] + #[must_use] + pub fn rxstarted(&mut self) -> RXSTARTED_W<19> { + RXSTARTED_W::new(self) + } + #[doc = "Bit 20 - Enable or disable interrupt for event TXSTARTED"] + #[inline(always)] + #[must_use] + pub fn txstarted(&mut self) -> TXSTARTED_W<20> { + TXSTARTED_W::new(self) + } + #[doc = "Bit 25 - Enable or disable interrupt for event WRITE"] + #[inline(always)] + #[must_use] + pub fn write(&mut self) -> WRITE_W<25> { + WRITE_W::new(self) + } + #[doc = "Bit 26 - Enable or disable interrupt for event READ"] + #[inline(always)] + #[must_use] + pub fn read(&mut self) -> READ_W<26> { + 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 + } +} +#[doc = "Enable or disable interrupt\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 [inten](index.html) module"] +pub struct INTEN_SPEC; +impl crate::RegisterSpec for INTEN_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [inten::R](R) reader structure"] +impl crate::Readable for INTEN_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [inten::W](W) writer structure"] +impl crate::Writable for INTEN_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets INTEN to value 0"] +impl crate::Resettable for INTEN_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/twis0/intenclr.rs b/down-the-stack/dk_pac/src/twis0/intenclr.rs new file mode 100644 index 0000000..2176e3d --- /dev/null +++ b/down-the-stack/dk_pac/src/twis0/intenclr.rs @@ -0,0 +1,473 @@ +#[doc = "Register `INTENCLR` 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 `INTENCLR` 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 `STOPPED` reader - Write '1' to disable interrupt for event STOPPED"] +pub type STOPPED_R = crate::BitReader; +#[doc = "Write '1' to disable interrupt for event STOPPED\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum STOPPED_A { + #[doc = "0: Read: Disabled"] + DISABLED = 0, + #[doc = "1: Read: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: STOPPED_A) -> Self { + variant as u8 != 0 + } +} +impl STOPPED_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> STOPPED_A { + match self.bits { + false => STOPPED_A::DISABLED, + true => STOPPED_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == STOPPED_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == STOPPED_A::ENABLED + } +} +#[doc = "Write '1' to disable interrupt for event STOPPED\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum STOPPED_AW { + #[doc = "1: Disable"] + CLEAR = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: STOPPED_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `STOPPED` writer - Write '1' to disable interrupt for event STOPPED"] +pub type STOPPED_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENCLR_SPEC, STOPPED_AW, O>; +impl<'a, const O: u8> STOPPED_W<'a, O> { + #[doc = "Disable"] + #[inline(always)] + pub fn clear(self) -> &'a mut W { + self.variant(STOPPED_AW::CLEAR) + } +} +#[doc = "Field `ERROR` reader - Write '1' to disable interrupt for event ERROR"] +pub type ERROR_R = crate::BitReader; +#[doc = "Write '1' to disable interrupt for event ERROR\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum ERROR_A { + #[doc = "0: Read: Disabled"] + DISABLED = 0, + #[doc = "1: Read: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: ERROR_A) -> Self { + variant as u8 != 0 + } +} +impl ERROR_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> ERROR_A { + match self.bits { + false => ERROR_A::DISABLED, + true => ERROR_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == ERROR_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == ERROR_A::ENABLED + } +} +#[doc = "Write '1' to disable interrupt for event ERROR\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum ERROR_AW { + #[doc = "1: Disable"] + CLEAR = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: ERROR_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `ERROR` writer - Write '1' to disable interrupt for event ERROR"] +pub type ERROR_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENCLR_SPEC, ERROR_AW, O>; +impl<'a, const O: u8> ERROR_W<'a, O> { + #[doc = "Disable"] + #[inline(always)] + pub fn clear(self) -> &'a mut W { + self.variant(ERROR_AW::CLEAR) + } +} +#[doc = "Field `RXSTARTED` reader - Write '1' to disable interrupt for event RXSTARTED"] +pub type RXSTARTED_R = crate::BitReader; +#[doc = "Write '1' to disable interrupt for event RXSTARTED\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum RXSTARTED_A { + #[doc = "0: Read: Disabled"] + DISABLED = 0, + #[doc = "1: Read: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: RXSTARTED_A) -> Self { + variant as u8 != 0 + } +} +impl RXSTARTED_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> RXSTARTED_A { + match self.bits { + false => RXSTARTED_A::DISABLED, + true => RXSTARTED_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == RXSTARTED_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == RXSTARTED_A::ENABLED + } +} +#[doc = "Write '1' to disable interrupt for event RXSTARTED\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum RXSTARTED_AW { + #[doc = "1: Disable"] + CLEAR = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: RXSTARTED_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `RXSTARTED` writer - Write '1' to disable interrupt for event RXSTARTED"] +pub type RXSTARTED_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENCLR_SPEC, RXSTARTED_AW, O>; +impl<'a, const O: u8> RXSTARTED_W<'a, O> { + #[doc = "Disable"] + #[inline(always)] + pub fn clear(self) -> &'a mut W { + self.variant(RXSTARTED_AW::CLEAR) + } +} +#[doc = "Field `TXSTARTED` reader - Write '1' to disable interrupt for event TXSTARTED"] +pub type TXSTARTED_R = crate::BitReader; +#[doc = "Write '1' to disable interrupt for event TXSTARTED\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum TXSTARTED_A { + #[doc = "0: Read: Disabled"] + DISABLED = 0, + #[doc = "1: Read: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: TXSTARTED_A) -> Self { + variant as u8 != 0 + } +} +impl TXSTARTED_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> TXSTARTED_A { + match self.bits { + false => TXSTARTED_A::DISABLED, + true => TXSTARTED_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == TXSTARTED_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == TXSTARTED_A::ENABLED + } +} +#[doc = "Write '1' to disable interrupt for event TXSTARTED\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum TXSTARTED_AW { + #[doc = "1: Disable"] + CLEAR = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: TXSTARTED_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `TXSTARTED` writer - Write '1' to disable interrupt for event TXSTARTED"] +pub type TXSTARTED_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENCLR_SPEC, TXSTARTED_AW, O>; +impl<'a, const O: u8> TXSTARTED_W<'a, O> { + #[doc = "Disable"] + #[inline(always)] + pub fn clear(self) -> &'a mut W { + self.variant(TXSTARTED_AW::CLEAR) + } +} +#[doc = "Field `WRITE` reader - Write '1' to disable interrupt for event WRITE"] +pub type WRITE_R = crate::BitReader; +#[doc = "Write '1' to disable interrupt for event WRITE\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum WRITE_A { + #[doc = "0: Read: Disabled"] + DISABLED = 0, + #[doc = "1: Read: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: WRITE_A) -> Self { + variant as u8 != 0 + } +} +impl WRITE_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> WRITE_A { + match self.bits { + false => WRITE_A::DISABLED, + true => WRITE_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == WRITE_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == WRITE_A::ENABLED + } +} +#[doc = "Write '1' to disable interrupt for event WRITE\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum WRITE_AW { + #[doc = "1: Disable"] + CLEAR = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: WRITE_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `WRITE` writer - Write '1' to disable interrupt for event WRITE"] +pub type WRITE_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENCLR_SPEC, WRITE_AW, O>; +impl<'a, const O: u8> WRITE_W<'a, O> { + #[doc = "Disable"] + #[inline(always)] + pub fn clear(self) -> &'a mut W { + self.variant(WRITE_AW::CLEAR) + } +} +#[doc = "Field `READ` reader - Write '1' to disable interrupt for event READ"] +pub type READ_R = crate::BitReader; +#[doc = "Write '1' to disable interrupt for event READ\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum READ_A { + #[doc = "0: Read: Disabled"] + DISABLED = 0, + #[doc = "1: Read: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: READ_A) -> Self { + variant as u8 != 0 + } +} +impl READ_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> READ_A { + match self.bits { + false => READ_A::DISABLED, + true => READ_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == READ_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == READ_A::ENABLED + } +} +#[doc = "Write '1' to disable interrupt for event READ\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum READ_AW { + #[doc = "1: Disable"] + CLEAR = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: READ_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `READ` writer - Write '1' to disable interrupt for event READ"] +pub type READ_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENCLR_SPEC, READ_AW, O>; +impl<'a, const O: u8> READ_W<'a, O> { + #[doc = "Disable"] + #[inline(always)] + pub fn clear(self) -> &'a mut W { + self.variant(READ_AW::CLEAR) + } +} +impl R { + #[doc = "Bit 1 - Write '1' to disable interrupt for event STOPPED"] + #[inline(always)] + pub fn stopped(&self) -> STOPPED_R { + STOPPED_R::new(((self.bits >> 1) & 1) != 0) + } + #[doc = "Bit 9 - Write '1' to disable interrupt for event ERROR"] + #[inline(always)] + pub fn error(&self) -> ERROR_R { + ERROR_R::new(((self.bits >> 9) & 1) != 0) + } + #[doc = "Bit 19 - Write '1' to disable interrupt for event RXSTARTED"] + #[inline(always)] + pub fn rxstarted(&self) -> RXSTARTED_R { + RXSTARTED_R::new(((self.bits >> 19) & 1) != 0) + } + #[doc = "Bit 20 - Write '1' to disable interrupt for event TXSTARTED"] + #[inline(always)] + pub fn txstarted(&self) -> TXSTARTED_R { + TXSTARTED_R::new(((self.bits >> 20) & 1) != 0) + } + #[doc = "Bit 25 - Write '1' to disable interrupt for event WRITE"] + #[inline(always)] + pub fn write(&self) -> WRITE_R { + WRITE_R::new(((self.bits >> 25) & 1) != 0) + } + #[doc = "Bit 26 - Write '1' to disable interrupt for event READ"] + #[inline(always)] + pub fn read(&self) -> READ_R { + READ_R::new(((self.bits >> 26) & 1) != 0) + } +} +impl W { + #[doc = "Bit 1 - Write '1' to disable interrupt for event STOPPED"] + #[inline(always)] + #[must_use] + pub fn stopped(&mut self) -> STOPPED_W<1> { + STOPPED_W::new(self) + } + #[doc = "Bit 9 - Write '1' to disable interrupt for event ERROR"] + #[inline(always)] + #[must_use] + pub fn error(&mut self) -> ERROR_W<9> { + ERROR_W::new(self) + } + #[doc = "Bit 19 - Write '1' to disable interrupt for event RXSTARTED"] + #[inline(always)] + #[must_use] + pub fn rxstarted(&mut self) -> RXSTARTED_W<19> { + RXSTARTED_W::new(self) + } + #[doc = "Bit 20 - Write '1' to disable interrupt for event TXSTARTED"] + #[inline(always)] + #[must_use] + pub fn txstarted(&mut self) -> TXSTARTED_W<20> { + TXSTARTED_W::new(self) + } + #[doc = "Bit 25 - Write '1' to disable interrupt for event WRITE"] + #[inline(always)] + #[must_use] + pub fn write(&mut self) -> WRITE_W<25> { + WRITE_W::new(self) + } + #[doc = "Bit 26 - Write '1' to disable interrupt for event READ"] + #[inline(always)] + #[must_use] + pub fn read(&mut self) -> READ_W<26> { + 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 + } +} +#[doc = "Disable interrupt\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 [intenclr](index.html) module"] +pub struct INTENCLR_SPEC; +impl crate::RegisterSpec for INTENCLR_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [intenclr::R](R) reader structure"] +impl crate::Readable for INTENCLR_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [intenclr::W](W) writer structure"] +impl crate::Writable for INTENCLR_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets INTENCLR to value 0"] +impl crate::Resettable for INTENCLR_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/twis0/intenset.rs b/down-the-stack/dk_pac/src/twis0/intenset.rs new file mode 100644 index 0000000..8e4518a --- /dev/null +++ b/down-the-stack/dk_pac/src/twis0/intenset.rs @@ -0,0 +1,473 @@ +#[doc = "Register `INTENSET` 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 `INTENSET` 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 `STOPPED` reader - Write '1' to enable interrupt for event STOPPED"] +pub type STOPPED_R = crate::BitReader; +#[doc = "Write '1' to enable interrupt for event STOPPED\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum STOPPED_A { + #[doc = "0: Read: Disabled"] + DISABLED = 0, + #[doc = "1: Read: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: STOPPED_A) -> Self { + variant as u8 != 0 + } +} +impl STOPPED_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> STOPPED_A { + match self.bits { + false => STOPPED_A::DISABLED, + true => STOPPED_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == STOPPED_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == STOPPED_A::ENABLED + } +} +#[doc = "Write '1' to enable interrupt for event STOPPED\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum STOPPED_AW { + #[doc = "1: Enable"] + SET = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: STOPPED_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `STOPPED` writer - Write '1' to enable interrupt for event STOPPED"] +pub type STOPPED_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENSET_SPEC, STOPPED_AW, O>; +impl<'a, const O: u8> STOPPED_W<'a, O> { + #[doc = "Enable"] + #[inline(always)] + pub fn set(self) -> &'a mut W { + self.variant(STOPPED_AW::SET) + } +} +#[doc = "Field `ERROR` reader - Write '1' to enable interrupt for event ERROR"] +pub type ERROR_R = crate::BitReader; +#[doc = "Write '1' to enable interrupt for event ERROR\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum ERROR_A { + #[doc = "0: Read: Disabled"] + DISABLED = 0, + #[doc = "1: Read: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: ERROR_A) -> Self { + variant as u8 != 0 + } +} +impl ERROR_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> ERROR_A { + match self.bits { + false => ERROR_A::DISABLED, + true => ERROR_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == ERROR_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == ERROR_A::ENABLED + } +} +#[doc = "Write '1' to enable interrupt for event ERROR\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum ERROR_AW { + #[doc = "1: Enable"] + SET = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: ERROR_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `ERROR` writer - Write '1' to enable interrupt for event ERROR"] +pub type ERROR_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENSET_SPEC, ERROR_AW, O>; +impl<'a, const O: u8> ERROR_W<'a, O> { + #[doc = "Enable"] + #[inline(always)] + pub fn set(self) -> &'a mut W { + self.variant(ERROR_AW::SET) + } +} +#[doc = "Field `RXSTARTED` reader - Write '1' to enable interrupt for event RXSTARTED"] +pub type RXSTARTED_R = crate::BitReader; +#[doc = "Write '1' to enable interrupt for event RXSTARTED\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum RXSTARTED_A { + #[doc = "0: Read: Disabled"] + DISABLED = 0, + #[doc = "1: Read: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: RXSTARTED_A) -> Self { + variant as u8 != 0 + } +} +impl RXSTARTED_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> RXSTARTED_A { + match self.bits { + false => RXSTARTED_A::DISABLED, + true => RXSTARTED_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == RXSTARTED_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == RXSTARTED_A::ENABLED + } +} +#[doc = "Write '1' to enable interrupt for event RXSTARTED\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum RXSTARTED_AW { + #[doc = "1: Enable"] + SET = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: RXSTARTED_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `RXSTARTED` writer - Write '1' to enable interrupt for event RXSTARTED"] +pub type RXSTARTED_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENSET_SPEC, RXSTARTED_AW, O>; +impl<'a, const O: u8> RXSTARTED_W<'a, O> { + #[doc = "Enable"] + #[inline(always)] + pub fn set(self) -> &'a mut W { + self.variant(RXSTARTED_AW::SET) + } +} +#[doc = "Field `TXSTARTED` reader - Write '1' to enable interrupt for event TXSTARTED"] +pub type TXSTARTED_R = crate::BitReader; +#[doc = "Write '1' to enable interrupt for event TXSTARTED\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum TXSTARTED_A { + #[doc = "0: Read: Disabled"] + DISABLED = 0, + #[doc = "1: Read: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: TXSTARTED_A) -> Self { + variant as u8 != 0 + } +} +impl TXSTARTED_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> TXSTARTED_A { + match self.bits { + false => TXSTARTED_A::DISABLED, + true => TXSTARTED_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == TXSTARTED_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == TXSTARTED_A::ENABLED + } +} +#[doc = "Write '1' to enable interrupt for event TXSTARTED\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum TXSTARTED_AW { + #[doc = "1: Enable"] + SET = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: TXSTARTED_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `TXSTARTED` writer - Write '1' to enable interrupt for event TXSTARTED"] +pub type TXSTARTED_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENSET_SPEC, TXSTARTED_AW, O>; +impl<'a, const O: u8> TXSTARTED_W<'a, O> { + #[doc = "Enable"] + #[inline(always)] + pub fn set(self) -> &'a mut W { + self.variant(TXSTARTED_AW::SET) + } +} +#[doc = "Field `WRITE` reader - Write '1' to enable interrupt for event WRITE"] +pub type WRITE_R = crate::BitReader; +#[doc = "Write '1' to enable interrupt for event WRITE\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum WRITE_A { + #[doc = "0: Read: Disabled"] + DISABLED = 0, + #[doc = "1: Read: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: WRITE_A) -> Self { + variant as u8 != 0 + } +} +impl WRITE_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> WRITE_A { + match self.bits { + false => WRITE_A::DISABLED, + true => WRITE_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == WRITE_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == WRITE_A::ENABLED + } +} +#[doc = "Write '1' to enable interrupt for event WRITE\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum WRITE_AW { + #[doc = "1: Enable"] + SET = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: WRITE_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `WRITE` writer - Write '1' to enable interrupt for event WRITE"] +pub type WRITE_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENSET_SPEC, WRITE_AW, O>; +impl<'a, const O: u8> WRITE_W<'a, O> { + #[doc = "Enable"] + #[inline(always)] + pub fn set(self) -> &'a mut W { + self.variant(WRITE_AW::SET) + } +} +#[doc = "Field `READ` reader - Write '1' to enable interrupt for event READ"] +pub type READ_R = crate::BitReader; +#[doc = "Write '1' to enable interrupt for event READ\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum READ_A { + #[doc = "0: Read: Disabled"] + DISABLED = 0, + #[doc = "1: Read: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: READ_A) -> Self { + variant as u8 != 0 + } +} +impl READ_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> READ_A { + match self.bits { + false => READ_A::DISABLED, + true => READ_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == READ_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == READ_A::ENABLED + } +} +#[doc = "Write '1' to enable interrupt for event READ\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum READ_AW { + #[doc = "1: Enable"] + SET = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: READ_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `READ` writer - Write '1' to enable interrupt for event READ"] +pub type READ_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENSET_SPEC, READ_AW, O>; +impl<'a, const O: u8> READ_W<'a, O> { + #[doc = "Enable"] + #[inline(always)] + pub fn set(self) -> &'a mut W { + self.variant(READ_AW::SET) + } +} +impl R { + #[doc = "Bit 1 - Write '1' to enable interrupt for event STOPPED"] + #[inline(always)] + pub fn stopped(&self) -> STOPPED_R { + STOPPED_R::new(((self.bits >> 1) & 1) != 0) + } + #[doc = "Bit 9 - Write '1' to enable interrupt for event ERROR"] + #[inline(always)] + pub fn error(&self) -> ERROR_R { + ERROR_R::new(((self.bits >> 9) & 1) != 0) + } + #[doc = "Bit 19 - Write '1' to enable interrupt for event RXSTARTED"] + #[inline(always)] + pub fn rxstarted(&self) -> RXSTARTED_R { + RXSTARTED_R::new(((self.bits >> 19) & 1) != 0) + } + #[doc = "Bit 20 - Write '1' to enable interrupt for event TXSTARTED"] + #[inline(always)] + pub fn txstarted(&self) -> TXSTARTED_R { + TXSTARTED_R::new(((self.bits >> 20) & 1) != 0) + } + #[doc = "Bit 25 - Write '1' to enable interrupt for event WRITE"] + #[inline(always)] + pub fn write(&self) -> WRITE_R { + WRITE_R::new(((self.bits >> 25) & 1) != 0) + } + #[doc = "Bit 26 - Write '1' to enable interrupt for event READ"] + #[inline(always)] + pub fn read(&self) -> READ_R { + READ_R::new(((self.bits >> 26) & 1) != 0) + } +} +impl W { + #[doc = "Bit 1 - Write '1' to enable interrupt for event STOPPED"] + #[inline(always)] + #[must_use] + pub fn stopped(&mut self) -> STOPPED_W<1> { + STOPPED_W::new(self) + } + #[doc = "Bit 9 - Write '1' to enable interrupt for event ERROR"] + #[inline(always)] + #[must_use] + pub fn error(&mut self) -> ERROR_W<9> { + ERROR_W::new(self) + } + #[doc = "Bit 19 - Write '1' to enable interrupt for event RXSTARTED"] + #[inline(always)] + #[must_use] + pub fn rxstarted(&mut self) -> RXSTARTED_W<19> { + RXSTARTED_W::new(self) + } + #[doc = "Bit 20 - Write '1' to enable interrupt for event TXSTARTED"] + #[inline(always)] + #[must_use] + pub fn txstarted(&mut self) -> TXSTARTED_W<20> { + TXSTARTED_W::new(self) + } + #[doc = "Bit 25 - Write '1' to enable interrupt for event WRITE"] + #[inline(always)] + #[must_use] + pub fn write(&mut self) -> WRITE_W<25> { + WRITE_W::new(self) + } + #[doc = "Bit 26 - Write '1' to enable interrupt for event READ"] + #[inline(always)] + #[must_use] + pub fn read(&mut self) -> READ_W<26> { + 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 + } +} +#[doc = "Enable interrupt\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 [intenset](index.html) module"] +pub struct INTENSET_SPEC; +impl crate::RegisterSpec for INTENSET_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [intenset::R](R) reader structure"] +impl crate::Readable for INTENSET_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [intenset::W](W) writer structure"] +impl crate::Writable for INTENSET_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets INTENSET to value 0"] +impl crate::Resettable for INTENSET_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/twis0/match_.rs b/down-the-stack/dk_pac/src/twis0/match_.rs new file mode 100644 index 0000000..1e3cbd9 --- /dev/null +++ b/down-the-stack/dk_pac/src/twis0/match_.rs @@ -0,0 +1,37 @@ +#[doc = "Register `MATCH` 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 = "Field `MATCH` reader - Which of the addresses in {ADDRESS} matched the incoming address"] +pub type MATCH_R = crate::BitReader; +impl R { + #[doc = "Bit 0 - Which of the addresses in {ADDRESS} matched the incoming address"] + #[inline(always)] + pub fn match_(&self) -> MATCH_R { + MATCH_R::new((self.bits & 1) != 0) + } +} +#[doc = "Status register indicating which address had a match\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 [match_](index.html) module"] +pub struct MATCH_SPEC; +impl crate::RegisterSpec for MATCH_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [match_::R](R) reader structure"] +impl crate::Readable for MATCH_SPEC { + type Reader = R; +} +#[doc = "`reset()` method sets MATCH to value 0"] +impl crate::Resettable for MATCH_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/twis0/orc.rs b/down-the-stack/dk_pac/src/twis0/orc.rs new file mode 100644 index 0000000..b0e9a09 --- /dev/null +++ b/down-the-stack/dk_pac/src/twis0/orc.rs @@ -0,0 +1,80 @@ +#[doc = "Register `ORC` 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 `ORC` 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 `ORC` reader - Over-read character. Character sent out in case of an over-read of the transmit buffer."] +pub type ORC_R = crate::FieldReader; +#[doc = "Field `ORC` writer - Over-read character. Character sent out in case of an over-read of the transmit buffer."] +pub type ORC_W<'a, const O: u8> = crate::FieldWriter<'a, u32, ORC_SPEC, u8, u8, 8, O>; +impl R { + #[doc = "Bits 0:7 - Over-read character. Character sent out in case of an over-read of the transmit buffer."] + #[inline(always)] + pub fn orc(&self) -> ORC_R { + ORC_R::new((self.bits & 0xff) as u8) + } +} +impl W { + #[doc = "Bits 0:7 - Over-read character. Character sent out in case of an over-read of the transmit buffer."] + #[inline(always)] + #[must_use] + pub fn orc(&mut self) -> ORC_W<0> { + ORC_W::new(self) + } + #[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 = "Over-read character. Character sent out in case of an over-read of the transmit buffer.\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 [orc](index.html) module"] +pub struct ORC_SPEC; +impl crate::RegisterSpec for ORC_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [orc::R](R) reader structure"] +impl crate::Readable for ORC_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [orc::W](W) writer structure"] +impl crate::Writable for ORC_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets ORC to value 0"] +impl crate::Resettable for ORC_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/twis0/psel.rs b/down-the-stack/dk_pac/src/twis0/psel.rs new file mode 100644 index 0000000..6d71cdf --- /dev/null +++ b/down-the-stack/dk_pac/src/twis0/psel.rs @@ -0,0 +1,16 @@ +#[doc = r"Register block"] +#[repr(C)] +pub struct PSEL { + #[doc = "0x00 - Pin select for SCL signal"] + pub scl: SCL, + #[doc = "0x04 - Pin select for SDA signal"] + pub sda: SDA, +} +#[doc = "SCL (rw) register accessor: an alias for `Reg`"] +pub type SCL = crate::Reg; +#[doc = "Pin select for SCL signal"] +pub mod scl; +#[doc = "SDA (rw) register accessor: an alias for `Reg`"] +pub type SDA = crate::Reg; +#[doc = "Pin select for SDA signal"] +pub mod sda; diff --git a/down-the-stack/dk_pac/src/twis0/psel/scl.rs b/down-the-stack/dk_pac/src/twis0/psel/scl.rs new file mode 100644 index 0000000..05b9f95 --- /dev/null +++ b/down-the-stack/dk_pac/src/twis0/psel/scl.rs @@ -0,0 +1,141 @@ +#[doc = "Register `SCL` 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 `SCL` 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 `PIN` reader - Pin number"] +pub type PIN_R = crate::FieldReader; +#[doc = "Field `PIN` writer - Pin number"] +pub type PIN_W<'a, const O: u8> = crate::FieldWriter<'a, u32, SCL_SPEC, u8, u8, 5, O>; +#[doc = "Field `CONNECT` reader - Connection"] +pub type CONNECT_R = crate::BitReader; +#[doc = "Connection\n\nValue on reset: 1"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum CONNECT_A { + #[doc = "1: Disconnect"] + DISCONNECTED = 1, + #[doc = "0: Connect"] + CONNECTED = 0, +} +impl From for bool { + #[inline(always)] + fn from(variant: CONNECT_A) -> Self { + variant as u8 != 0 + } +} +impl CONNECT_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> CONNECT_A { + match self.bits { + true => CONNECT_A::DISCONNECTED, + false => CONNECT_A::CONNECTED, + } + } + #[doc = "Checks if the value of the field is `DISCONNECTED`"] + #[inline(always)] + pub fn is_disconnected(&self) -> bool { + *self == CONNECT_A::DISCONNECTED + } + #[doc = "Checks if the value of the field is `CONNECTED`"] + #[inline(always)] + pub fn is_connected(&self) -> bool { + *self == CONNECT_A::CONNECTED + } +} +#[doc = "Field `CONNECT` writer - Connection"] +pub type CONNECT_W<'a, const O: u8> = crate::BitWriter<'a, u32, SCL_SPEC, CONNECT_A, O>; +impl<'a, const O: u8> CONNECT_W<'a, O> { + #[doc = "Disconnect"] + #[inline(always)] + pub fn disconnected(self) -> &'a mut W { + self.variant(CONNECT_A::DISCONNECTED) + } + #[doc = "Connect"] + #[inline(always)] + pub fn connected(self) -> &'a mut W { + self.variant(CONNECT_A::CONNECTED) + } +} +impl R { + #[doc = "Bits 0:4 - Pin number"] + #[inline(always)] + pub fn pin(&self) -> PIN_R { + PIN_R::new((self.bits & 0x1f) as u8) + } + #[doc = "Bit 31 - Connection"] + #[inline(always)] + pub fn connect(&self) -> CONNECT_R { + CONNECT_R::new(((self.bits >> 31) & 1) != 0) + } +} +impl W { + #[doc = "Bits 0:4 - Pin number"] + #[inline(always)] + #[must_use] + pub fn pin(&mut self) -> PIN_W<0> { + PIN_W::new(self) + } + #[doc = "Bit 31 - Connection"] + #[inline(always)] + #[must_use] + pub fn connect(&mut self) -> CONNECT_W<31> { + CONNECT_W::new(self) + } + #[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 = "Pin select for SCL signal\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 [scl](index.html) module"] +pub struct SCL_SPEC; +impl crate::RegisterSpec for SCL_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [scl::R](R) reader structure"] +impl crate::Readable for SCL_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [scl::W](W) writer structure"] +impl crate::Writable for SCL_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets SCL to value 0xffff_ffff"] +impl crate::Resettable for SCL_SPEC { + const RESET_VALUE: Self::Ux = 0xffff_ffff; +} diff --git a/down-the-stack/dk_pac/src/twis0/psel/sda.rs b/down-the-stack/dk_pac/src/twis0/psel/sda.rs new file mode 100644 index 0000000..705af21 --- /dev/null +++ b/down-the-stack/dk_pac/src/twis0/psel/sda.rs @@ -0,0 +1,141 @@ +#[doc = "Register `SDA` 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 `SDA` 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 `PIN` reader - Pin number"] +pub type PIN_R = crate::FieldReader; +#[doc = "Field `PIN` writer - Pin number"] +pub type PIN_W<'a, const O: u8> = crate::FieldWriter<'a, u32, SDA_SPEC, u8, u8, 5, O>; +#[doc = "Field `CONNECT` reader - Connection"] +pub type CONNECT_R = crate::BitReader; +#[doc = "Connection\n\nValue on reset: 1"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum CONNECT_A { + #[doc = "1: Disconnect"] + DISCONNECTED = 1, + #[doc = "0: Connect"] + CONNECTED = 0, +} +impl From for bool { + #[inline(always)] + fn from(variant: CONNECT_A) -> Self { + variant as u8 != 0 + } +} +impl CONNECT_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> CONNECT_A { + match self.bits { + true => CONNECT_A::DISCONNECTED, + false => CONNECT_A::CONNECTED, + } + } + #[doc = "Checks if the value of the field is `DISCONNECTED`"] + #[inline(always)] + pub fn is_disconnected(&self) -> bool { + *self == CONNECT_A::DISCONNECTED + } + #[doc = "Checks if the value of the field is `CONNECTED`"] + #[inline(always)] + pub fn is_connected(&self) -> bool { + *self == CONNECT_A::CONNECTED + } +} +#[doc = "Field `CONNECT` writer - Connection"] +pub type CONNECT_W<'a, const O: u8> = crate::BitWriter<'a, u32, SDA_SPEC, CONNECT_A, O>; +impl<'a, const O: u8> CONNECT_W<'a, O> { + #[doc = "Disconnect"] + #[inline(always)] + pub fn disconnected(self) -> &'a mut W { + self.variant(CONNECT_A::DISCONNECTED) + } + #[doc = "Connect"] + #[inline(always)] + pub fn connected(self) -> &'a mut W { + self.variant(CONNECT_A::CONNECTED) + } +} +impl R { + #[doc = "Bits 0:4 - Pin number"] + #[inline(always)] + pub fn pin(&self) -> PIN_R { + PIN_R::new((self.bits & 0x1f) as u8) + } + #[doc = "Bit 31 - Connection"] + #[inline(always)] + pub fn connect(&self) -> CONNECT_R { + CONNECT_R::new(((self.bits >> 31) & 1) != 0) + } +} +impl W { + #[doc = "Bits 0:4 - Pin number"] + #[inline(always)] + #[must_use] + pub fn pin(&mut self) -> PIN_W<0> { + PIN_W::new(self) + } + #[doc = "Bit 31 - Connection"] + #[inline(always)] + #[must_use] + pub fn connect(&mut self) -> CONNECT_W<31> { + CONNECT_W::new(self) + } + #[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 = "Pin select for SDA signal\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 [sda](index.html) module"] +pub struct SDA_SPEC; +impl crate::RegisterSpec for SDA_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [sda::R](R) reader structure"] +impl crate::Readable for SDA_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [sda::W](W) writer structure"] +impl crate::Writable for SDA_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets SDA to value 0xffff_ffff"] +impl crate::Resettable for SDA_SPEC { + const RESET_VALUE: Self::Ux = 0xffff_ffff; +} diff --git a/down-the-stack/dk_pac/src/twis0/rxd.rs b/down-the-stack/dk_pac/src/twis0/rxd.rs new file mode 100644 index 0000000..54e95f7 --- /dev/null +++ b/down-the-stack/dk_pac/src/twis0/rxd.rs @@ -0,0 +1,22 @@ +#[doc = r"Register block"] +#[repr(C)] +pub struct RXD { + #[doc = "0x00 - RXD Data pointer"] + pub ptr: PTR, + #[doc = "0x04 - Maximum number of bytes in RXD buffer"] + pub maxcnt: MAXCNT, + #[doc = "0x08 - Number of bytes transferred in the last RXD transaction"] + pub amount: AMOUNT, +} +#[doc = "PTR (rw) register accessor: an alias for `Reg`"] +pub type PTR = crate::Reg; +#[doc = "RXD Data pointer"] +pub mod ptr; +#[doc = "MAXCNT (rw) register accessor: an alias for `Reg`"] +pub type MAXCNT = crate::Reg; +#[doc = "Maximum number of bytes in RXD buffer"] +pub mod maxcnt; +#[doc = "AMOUNT (r) register accessor: an alias for `Reg`"] +pub type AMOUNT = crate::Reg; +#[doc = "Number of bytes transferred in the last RXD transaction"] +pub mod amount; diff --git a/down-the-stack/dk_pac/src/twis0/rxd/amount.rs b/down-the-stack/dk_pac/src/twis0/rxd/amount.rs new file mode 100644 index 0000000..1e549d3 --- /dev/null +++ b/down-the-stack/dk_pac/src/twis0/rxd/amount.rs @@ -0,0 +1,37 @@ +#[doc = "Register `AMOUNT` 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 = "Field `AMOUNT` reader - Number of bytes transferred in the last RXD transaction"] +pub type AMOUNT_R = crate::FieldReader; +impl R { + #[doc = "Bits 0:7 - Number of bytes transferred in the last RXD transaction"] + #[inline(always)] + pub fn amount(&self) -> AMOUNT_R { + AMOUNT_R::new((self.bits & 0xff) as u8) + } +} +#[doc = "Number of bytes transferred in the last RXD transaction\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 [amount](index.html) module"] +pub struct AMOUNT_SPEC; +impl crate::RegisterSpec for AMOUNT_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [amount::R](R) reader structure"] +impl crate::Readable for AMOUNT_SPEC { + type Reader = R; +} +#[doc = "`reset()` method sets AMOUNT to value 0"] +impl crate::Resettable for AMOUNT_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/twis0/rxd/maxcnt.rs b/down-the-stack/dk_pac/src/twis0/rxd/maxcnt.rs new file mode 100644 index 0000000..be0bf29 --- /dev/null +++ b/down-the-stack/dk_pac/src/twis0/rxd/maxcnt.rs @@ -0,0 +1,80 @@ +#[doc = "Register `MAXCNT` 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 `MAXCNT` 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 `MAXCNT` reader - Maximum number of bytes in RXD buffer"] +pub type MAXCNT_R = crate::FieldReader; +#[doc = "Field `MAXCNT` writer - Maximum number of bytes in RXD buffer"] +pub type MAXCNT_W<'a, const O: u8> = crate::FieldWriter<'a, u32, MAXCNT_SPEC, u8, u8, 8, O>; +impl R { + #[doc = "Bits 0:7 - Maximum number of bytes in RXD buffer"] + #[inline(always)] + pub fn maxcnt(&self) -> MAXCNT_R { + MAXCNT_R::new((self.bits & 0xff) as u8) + } +} +impl W { + #[doc = "Bits 0:7 - Maximum number of bytes in RXD buffer"] + #[inline(always)] + #[must_use] + pub fn maxcnt(&mut self) -> MAXCNT_W<0> { + MAXCNT_W::new(self) + } + #[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 = "Maximum number of bytes in RXD buffer\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 [maxcnt](index.html) module"] +pub struct MAXCNT_SPEC; +impl crate::RegisterSpec for MAXCNT_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [maxcnt::R](R) reader structure"] +impl crate::Readable for MAXCNT_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [maxcnt::W](W) writer structure"] +impl crate::Writable for MAXCNT_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets MAXCNT to value 0"] +impl crate::Resettable for MAXCNT_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/twis0/rxd/ptr.rs b/down-the-stack/dk_pac/src/twis0/rxd/ptr.rs new file mode 100644 index 0000000..b5afe91 --- /dev/null +++ b/down-the-stack/dk_pac/src/twis0/rxd/ptr.rs @@ -0,0 +1,80 @@ +#[doc = "Register `PTR` 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 `PTR` 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 `PTR` reader - RXD Data pointer"] +pub type PTR_R = crate::FieldReader; +#[doc = "Field `PTR` writer - RXD Data pointer"] +pub type PTR_W<'a, const O: u8> = crate::FieldWriter<'a, u32, PTR_SPEC, u32, u32, 32, O>; +impl R { + #[doc = "Bits 0:31 - RXD Data pointer"] + #[inline(always)] + pub fn ptr(&self) -> PTR_R { + PTR_R::new(self.bits) + } +} +impl W { + #[doc = "Bits 0:31 - RXD Data pointer"] + #[inline(always)] + #[must_use] + pub fn ptr(&mut self) -> PTR_W<0> { + PTR_W::new(self) + } + #[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 = "RXD Data pointer\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 [ptr](index.html) module"] +pub struct PTR_SPEC; +impl crate::RegisterSpec for PTR_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [ptr::R](R) reader structure"] +impl crate::Readable for PTR_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [ptr::W](W) writer structure"] +impl crate::Writable for PTR_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets PTR to value 0"] +impl crate::Resettable for PTR_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/twis0/shorts.rs b/down-the-stack/dk_pac/src/twis0/shorts.rs new file mode 100644 index 0000000..7bdf6b0 --- /dev/null +++ b/down-the-stack/dk_pac/src/twis0/shorts.rs @@ -0,0 +1,189 @@ +#[doc = "Register `SHORTS` 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 `SHORTS` 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 `WRITE_SUSPEND` reader - Shortcut between event WRITE and task SUSPEND"] +pub type WRITE_SUSPEND_R = crate::BitReader; +#[doc = "Shortcut between event WRITE and task SUSPEND\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum WRITE_SUSPEND_A { + #[doc = "0: Disable shortcut"] + DISABLED = 0, + #[doc = "1: Enable shortcut"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: WRITE_SUSPEND_A) -> Self { + variant as u8 != 0 + } +} +impl WRITE_SUSPEND_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> WRITE_SUSPEND_A { + match self.bits { + false => WRITE_SUSPEND_A::DISABLED, + true => WRITE_SUSPEND_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == WRITE_SUSPEND_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == WRITE_SUSPEND_A::ENABLED + } +} +#[doc = "Field `WRITE_SUSPEND` writer - Shortcut between event WRITE and task SUSPEND"] +pub type WRITE_SUSPEND_W<'a, const O: u8> = + crate::BitWriter<'a, u32, SHORTS_SPEC, WRITE_SUSPEND_A, O>; +impl<'a, const O: u8> WRITE_SUSPEND_W<'a, O> { + #[doc = "Disable shortcut"] + #[inline(always)] + pub fn disabled(self) -> &'a mut W { + self.variant(WRITE_SUSPEND_A::DISABLED) + } + #[doc = "Enable shortcut"] + #[inline(always)] + pub fn enabled(self) -> &'a mut W { + self.variant(WRITE_SUSPEND_A::ENABLED) + } +} +#[doc = "Field `READ_SUSPEND` reader - Shortcut between event READ and task SUSPEND"] +pub type READ_SUSPEND_R = crate::BitReader; +#[doc = "Shortcut between event READ and task SUSPEND\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum READ_SUSPEND_A { + #[doc = "0: Disable shortcut"] + DISABLED = 0, + #[doc = "1: Enable shortcut"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: READ_SUSPEND_A) -> Self { + variant as u8 != 0 + } +} +impl READ_SUSPEND_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> READ_SUSPEND_A { + match self.bits { + false => READ_SUSPEND_A::DISABLED, + true => READ_SUSPEND_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == READ_SUSPEND_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == READ_SUSPEND_A::ENABLED + } +} +#[doc = "Field `READ_SUSPEND` writer - Shortcut between event READ and task SUSPEND"] +pub type READ_SUSPEND_W<'a, const O: u8> = + crate::BitWriter<'a, u32, SHORTS_SPEC, READ_SUSPEND_A, O>; +impl<'a, const O: u8> READ_SUSPEND_W<'a, O> { + #[doc = "Disable shortcut"] + #[inline(always)] + pub fn disabled(self) -> &'a mut W { + self.variant(READ_SUSPEND_A::DISABLED) + } + #[doc = "Enable shortcut"] + #[inline(always)] + pub fn enabled(self) -> &'a mut W { + self.variant(READ_SUSPEND_A::ENABLED) + } +} +impl R { + #[doc = "Bit 13 - Shortcut between event WRITE and task SUSPEND"] + #[inline(always)] + pub fn write_suspend(&self) -> WRITE_SUSPEND_R { + WRITE_SUSPEND_R::new(((self.bits >> 13) & 1) != 0) + } + #[doc = "Bit 14 - Shortcut between event READ and task SUSPEND"] + #[inline(always)] + pub fn read_suspend(&self) -> READ_SUSPEND_R { + READ_SUSPEND_R::new(((self.bits >> 14) & 1) != 0) + } +} +impl W { + #[doc = "Bit 13 - Shortcut between event WRITE and task SUSPEND"] + #[inline(always)] + #[must_use] + pub fn write_suspend(&mut self) -> WRITE_SUSPEND_W<13> { + WRITE_SUSPEND_W::new(self) + } + #[doc = "Bit 14 - Shortcut between event READ and task SUSPEND"] + #[inline(always)] + #[must_use] + pub fn read_suspend(&mut self) -> READ_SUSPEND_W<14> { + READ_SUSPEND_W::new(self) + } + #[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 = "Shortcuts between local events and tasks\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 [shorts](index.html) module"] +pub struct SHORTS_SPEC; +impl crate::RegisterSpec for SHORTS_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [shorts::R](R) reader structure"] +impl crate::Readable for SHORTS_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [shorts::W](W) writer structure"] +impl crate::Writable for SHORTS_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets SHORTS to value 0"] +impl crate::Resettable for SHORTS_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/twis0/tasks_preparerx.rs b/down-the-stack/dk_pac/src/twis0/tasks_preparerx.rs new file mode 100644 index 0000000..7487c89 --- /dev/null +++ b/down-the-stack/dk_pac/src/twis0/tasks_preparerx.rs @@ -0,0 +1,72 @@ +#[doc = "Register `TASKS_PREPARERX` 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 = "Prepare the TWI slave to respond to a write command\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum TASKS_PREPARERX_AW { + #[doc = "1: Trigger task"] + TRIGGER = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: TASKS_PREPARERX_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `TASKS_PREPARERX` writer - Prepare the TWI slave to respond to a write command"] +pub type TASKS_PREPARERX_W<'a, const O: u8> = + crate::BitWriter<'a, u32, TASKS_PREPARERX_SPEC, TASKS_PREPARERX_AW, O>; +impl<'a, const O: u8> TASKS_PREPARERX_W<'a, O> { + #[doc = "Trigger task"] + #[inline(always)] + pub fn trigger(self) -> &'a mut W { + self.variant(TASKS_PREPARERX_AW::TRIGGER) + } +} +impl W { + #[doc = "Bit 0 - Prepare the TWI slave to respond to a write command"] + #[inline(always)] + #[must_use] + pub fn tasks_preparerx(&mut self) -> TASKS_PREPARERX_W<0> { + TASKS_PREPARERX_W::new(self) + } + #[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 = "Prepare the TWI slave to respond to a write command\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 [tasks_preparerx](index.html) module"] +pub struct TASKS_PREPARERX_SPEC; +impl crate::RegisterSpec for TASKS_PREPARERX_SPEC { + type Ux = u32; +} +#[doc = "`write(|w| ..)` method takes [tasks_preparerx::W](W) writer structure"] +impl crate::Writable for TASKS_PREPARERX_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets TASKS_PREPARERX to value 0"] +impl crate::Resettable for TASKS_PREPARERX_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/twis0/tasks_preparetx.rs b/down-the-stack/dk_pac/src/twis0/tasks_preparetx.rs new file mode 100644 index 0000000..c20a0b8 --- /dev/null +++ b/down-the-stack/dk_pac/src/twis0/tasks_preparetx.rs @@ -0,0 +1,72 @@ +#[doc = "Register `TASKS_PREPARETX` 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 = "Prepare the TWI slave to respond to a read command\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum TASKS_PREPARETX_AW { + #[doc = "1: Trigger task"] + TRIGGER = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: TASKS_PREPARETX_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `TASKS_PREPARETX` writer - Prepare the TWI slave to respond to a read command"] +pub type TASKS_PREPARETX_W<'a, const O: u8> = + crate::BitWriter<'a, u32, TASKS_PREPARETX_SPEC, TASKS_PREPARETX_AW, O>; +impl<'a, const O: u8> TASKS_PREPARETX_W<'a, O> { + #[doc = "Trigger task"] + #[inline(always)] + pub fn trigger(self) -> &'a mut W { + self.variant(TASKS_PREPARETX_AW::TRIGGER) + } +} +impl W { + #[doc = "Bit 0 - Prepare the TWI slave to respond to a read command"] + #[inline(always)] + #[must_use] + pub fn tasks_preparetx(&mut self) -> TASKS_PREPARETX_W<0> { + TASKS_PREPARETX_W::new(self) + } + #[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 = "Prepare the TWI slave to respond to a read command\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 [tasks_preparetx](index.html) module"] +pub struct TASKS_PREPARETX_SPEC; +impl crate::RegisterSpec for TASKS_PREPARETX_SPEC { + type Ux = u32; +} +#[doc = "`write(|w| ..)` method takes [tasks_preparetx::W](W) writer structure"] +impl crate::Writable for TASKS_PREPARETX_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets TASKS_PREPARETX to value 0"] +impl crate::Resettable for TASKS_PREPARETX_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/twis0/tasks_resume.rs b/down-the-stack/dk_pac/src/twis0/tasks_resume.rs new file mode 100644 index 0000000..47f0633 --- /dev/null +++ b/down-the-stack/dk_pac/src/twis0/tasks_resume.rs @@ -0,0 +1,72 @@ +#[doc = "Register `TASKS_RESUME` 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 = "Resume TWI transaction\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum TASKS_RESUME_AW { + #[doc = "1: Trigger task"] + TRIGGER = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: TASKS_RESUME_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `TASKS_RESUME` writer - Resume TWI transaction"] +pub type TASKS_RESUME_W<'a, const O: u8> = + crate::BitWriter<'a, u32, TASKS_RESUME_SPEC, TASKS_RESUME_AW, O>; +impl<'a, const O: u8> TASKS_RESUME_W<'a, O> { + #[doc = "Trigger task"] + #[inline(always)] + pub fn trigger(self) -> &'a mut W { + self.variant(TASKS_RESUME_AW::TRIGGER) + } +} +impl W { + #[doc = "Bit 0 - Resume TWI transaction"] + #[inline(always)] + #[must_use] + pub fn tasks_resume(&mut self) -> TASKS_RESUME_W<0> { + TASKS_RESUME_W::new(self) + } + #[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 = "Resume TWI transaction\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 [tasks_resume](index.html) module"] +pub struct TASKS_RESUME_SPEC; +impl crate::RegisterSpec for TASKS_RESUME_SPEC { + type Ux = u32; +} +#[doc = "`write(|w| ..)` method takes [tasks_resume::W](W) writer structure"] +impl crate::Writable for TASKS_RESUME_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets TASKS_RESUME to value 0"] +impl crate::Resettable for TASKS_RESUME_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/twis0/tasks_stop.rs b/down-the-stack/dk_pac/src/twis0/tasks_stop.rs new file mode 100644 index 0000000..7358178 --- /dev/null +++ b/down-the-stack/dk_pac/src/twis0/tasks_stop.rs @@ -0,0 +1,72 @@ +#[doc = "Register `TASKS_STOP` 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 = "Stop TWI transaction\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum TASKS_STOP_AW { + #[doc = "1: Trigger task"] + TRIGGER = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: TASKS_STOP_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `TASKS_STOP` writer - Stop TWI transaction"] +pub type TASKS_STOP_W<'a, const O: u8> = + crate::BitWriter<'a, u32, TASKS_STOP_SPEC, TASKS_STOP_AW, O>; +impl<'a, const O: u8> TASKS_STOP_W<'a, O> { + #[doc = "Trigger task"] + #[inline(always)] + pub fn trigger(self) -> &'a mut W { + self.variant(TASKS_STOP_AW::TRIGGER) + } +} +impl W { + #[doc = "Bit 0 - Stop TWI transaction"] + #[inline(always)] + #[must_use] + pub fn tasks_stop(&mut self) -> TASKS_STOP_W<0> { + TASKS_STOP_W::new(self) + } + #[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 = "Stop TWI transaction\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 [tasks_stop](index.html) module"] +pub struct TASKS_STOP_SPEC; +impl crate::RegisterSpec for TASKS_STOP_SPEC { + type Ux = u32; +} +#[doc = "`write(|w| ..)` method takes [tasks_stop::W](W) writer structure"] +impl crate::Writable for TASKS_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 TASKS_STOP to value 0"] +impl crate::Resettable for TASKS_STOP_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/twis0/tasks_suspend.rs b/down-the-stack/dk_pac/src/twis0/tasks_suspend.rs new file mode 100644 index 0000000..ae6f325 --- /dev/null +++ b/down-the-stack/dk_pac/src/twis0/tasks_suspend.rs @@ -0,0 +1,72 @@ +#[doc = "Register `TASKS_SUSPEND` 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 = "Suspend TWI transaction\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum TASKS_SUSPEND_AW { + #[doc = "1: Trigger task"] + TRIGGER = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: TASKS_SUSPEND_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `TASKS_SUSPEND` writer - Suspend TWI transaction"] +pub type TASKS_SUSPEND_W<'a, const O: u8> = + crate::BitWriter<'a, u32, TASKS_SUSPEND_SPEC, TASKS_SUSPEND_AW, O>; +impl<'a, const O: u8> TASKS_SUSPEND_W<'a, O> { + #[doc = "Trigger task"] + #[inline(always)] + pub fn trigger(self) -> &'a mut W { + self.variant(TASKS_SUSPEND_AW::TRIGGER) + } +} +impl W { + #[doc = "Bit 0 - Suspend TWI transaction"] + #[inline(always)] + #[must_use] + pub fn tasks_suspend(&mut self) -> TASKS_SUSPEND_W<0> { + TASKS_SUSPEND_W::new(self) + } + #[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 = "Suspend TWI transaction\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 [tasks_suspend](index.html) module"] +pub struct TASKS_SUSPEND_SPEC; +impl crate::RegisterSpec for TASKS_SUSPEND_SPEC { + type Ux = u32; +} +#[doc = "`write(|w| ..)` method takes [tasks_suspend::W](W) writer structure"] +impl crate::Writable for TASKS_SUSPEND_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets TASKS_SUSPEND to value 0"] +impl crate::Resettable for TASKS_SUSPEND_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/twis0/txd.rs b/down-the-stack/dk_pac/src/twis0/txd.rs new file mode 100644 index 0000000..7cf9d2e --- /dev/null +++ b/down-the-stack/dk_pac/src/twis0/txd.rs @@ -0,0 +1,22 @@ +#[doc = r"Register block"] +#[repr(C)] +pub struct TXD { + #[doc = "0x00 - TXD Data pointer"] + pub ptr: PTR, + #[doc = "0x04 - Maximum number of bytes in TXD buffer"] + pub maxcnt: MAXCNT, + #[doc = "0x08 - Number of bytes transferred in the last TXD transaction"] + pub amount: AMOUNT, +} +#[doc = "PTR (rw) register accessor: an alias for `Reg`"] +pub type PTR = crate::Reg; +#[doc = "TXD Data pointer"] +pub mod ptr; +#[doc = "MAXCNT (rw) register accessor: an alias for `Reg`"] +pub type MAXCNT = crate::Reg; +#[doc = "Maximum number of bytes in TXD buffer"] +pub mod maxcnt; +#[doc = "AMOUNT (r) register accessor: an alias for `Reg`"] +pub type AMOUNT = crate::Reg; +#[doc = "Number of bytes transferred in the last TXD transaction"] +pub mod amount; diff --git a/down-the-stack/dk_pac/src/twis0/txd/amount.rs b/down-the-stack/dk_pac/src/twis0/txd/amount.rs new file mode 100644 index 0000000..8fa817c --- /dev/null +++ b/down-the-stack/dk_pac/src/twis0/txd/amount.rs @@ -0,0 +1,37 @@ +#[doc = "Register `AMOUNT` 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 = "Field `AMOUNT` reader - Number of bytes transferred in the last TXD transaction"] +pub type AMOUNT_R = crate::FieldReader; +impl R { + #[doc = "Bits 0:7 - Number of bytes transferred in the last TXD transaction"] + #[inline(always)] + pub fn amount(&self) -> AMOUNT_R { + AMOUNT_R::new((self.bits & 0xff) as u8) + } +} +#[doc = "Number of bytes transferred in the last TXD transaction\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 [amount](index.html) module"] +pub struct AMOUNT_SPEC; +impl crate::RegisterSpec for AMOUNT_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [amount::R](R) reader structure"] +impl crate::Readable for AMOUNT_SPEC { + type Reader = R; +} +#[doc = "`reset()` method sets AMOUNT to value 0"] +impl crate::Resettable for AMOUNT_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/twis0/txd/maxcnt.rs b/down-the-stack/dk_pac/src/twis0/txd/maxcnt.rs new file mode 100644 index 0000000..d39bad8 --- /dev/null +++ b/down-the-stack/dk_pac/src/twis0/txd/maxcnt.rs @@ -0,0 +1,80 @@ +#[doc = "Register `MAXCNT` 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 `MAXCNT` 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 `MAXCNT` reader - Maximum number of bytes in TXD buffer"] +pub type MAXCNT_R = crate::FieldReader; +#[doc = "Field `MAXCNT` writer - Maximum number of bytes in TXD buffer"] +pub type MAXCNT_W<'a, const O: u8> = crate::FieldWriter<'a, u32, MAXCNT_SPEC, u8, u8, 8, O>; +impl R { + #[doc = "Bits 0:7 - Maximum number of bytes in TXD buffer"] + #[inline(always)] + pub fn maxcnt(&self) -> MAXCNT_R { + MAXCNT_R::new((self.bits & 0xff) as u8) + } +} +impl W { + #[doc = "Bits 0:7 - Maximum number of bytes in TXD buffer"] + #[inline(always)] + #[must_use] + pub fn maxcnt(&mut self) -> MAXCNT_W<0> { + MAXCNT_W::new(self) + } + #[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 = "Maximum number of bytes in TXD buffer\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 [maxcnt](index.html) module"] +pub struct MAXCNT_SPEC; +impl crate::RegisterSpec for MAXCNT_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [maxcnt::R](R) reader structure"] +impl crate::Readable for MAXCNT_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [maxcnt::W](W) writer structure"] +impl crate::Writable for MAXCNT_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets MAXCNT to value 0"] +impl crate::Resettable for MAXCNT_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/twis0/txd/ptr.rs b/down-the-stack/dk_pac/src/twis0/txd/ptr.rs new file mode 100644 index 0000000..065ecb4 --- /dev/null +++ b/down-the-stack/dk_pac/src/twis0/txd/ptr.rs @@ -0,0 +1,80 @@ +#[doc = "Register `PTR` 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 `PTR` 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 `PTR` reader - TXD Data pointer"] +pub type PTR_R = crate::FieldReader; +#[doc = "Field `PTR` writer - TXD Data pointer"] +pub type PTR_W<'a, const O: u8> = crate::FieldWriter<'a, u32, PTR_SPEC, u32, u32, 32, O>; +impl R { + #[doc = "Bits 0:31 - TXD Data pointer"] + #[inline(always)] + pub fn ptr(&self) -> PTR_R { + PTR_R::new(self.bits) + } +} +impl W { + #[doc = "Bits 0:31 - TXD Data pointer"] + #[inline(always)] + #[must_use] + pub fn ptr(&mut self) -> PTR_W<0> { + PTR_W::new(self) + } + #[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 = "TXD Data pointer\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 [ptr](index.html) module"] +pub struct PTR_SPEC; +impl crate::RegisterSpec for PTR_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [ptr::R](R) reader structure"] +impl crate::Readable for PTR_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [ptr::W](W) writer structure"] +impl crate::Writable for PTR_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets PTR to value 0"] +impl crate::Resettable for PTR_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/uart0.rs b/down-the-stack/dk_pac/src/uart0.rs new file mode 100644 index 0000000..1d2aecc --- /dev/null +++ b/down-the-stack/dk_pac/src/uart0.rs @@ -0,0 +1,160 @@ +#[doc = r"Register block"] +#[repr(C)] +pub struct RegisterBlock { + #[doc = "0x00 - Start UART receiver"] + pub tasks_startrx: TASKS_STARTRX, + #[doc = "0x04 - Stop UART receiver"] + pub tasks_stoprx: TASKS_STOPRX, + #[doc = "0x08 - Start UART transmitter"] + pub tasks_starttx: TASKS_STARTTX, + #[doc = "0x0c - Stop UART transmitter"] + pub tasks_stoptx: TASKS_STOPTX, + _reserved4: [u8; 0x0c], + #[doc = "0x1c - Suspend UART"] + pub tasks_suspend: TASKS_SUSPEND, + _reserved5: [u8; 0xe0], + #[doc = "0x100 - CTS is activated (set low). Clear To Send."] + pub events_cts: EVENTS_CTS, + #[doc = "0x104 - CTS is deactivated (set high). Not Clear To Send."] + pub events_ncts: EVENTS_NCTS, + #[doc = "0x108 - Data received in RXD"] + pub events_rxdrdy: EVENTS_RXDRDY, + _reserved8: [u8; 0x10], + #[doc = "0x11c - Data sent from TXD"] + pub events_txdrdy: EVENTS_TXDRDY, + _reserved9: [u8; 0x04], + #[doc = "0x124 - Error detected"] + pub events_error: EVENTS_ERROR, + _reserved10: [u8; 0x1c], + #[doc = "0x144 - Receiver timeout"] + pub events_rxto: EVENTS_RXTO, + _reserved11: [u8; 0xb8], + #[doc = "0x200 - Shortcuts between local events and tasks"] + pub shorts: SHORTS, + _reserved12: [u8; 0x0100], + #[doc = "0x304 - Enable interrupt"] + pub intenset: INTENSET, + #[doc = "0x308 - Disable interrupt"] + pub intenclr: INTENCLR, + _reserved14: [u8; 0x0174], + #[doc = "0x480 - Error source"] + pub errorsrc: ERRORSRC, + _reserved15: [u8; 0x7c], + #[doc = "0x500 - Enable UART"] + pub enable: ENABLE, + _reserved16: [u8; 0x04], + #[doc = "0x508 - Pin select for RTS"] + pub pselrts: PSELRTS, + #[doc = "0x50c - Pin select for TXD"] + pub pseltxd: PSELTXD, + #[doc = "0x510 - Pin select for CTS"] + pub pselcts: PSELCTS, + #[doc = "0x514 - Pin select for RXD"] + pub pselrxd: PSELRXD, + #[doc = "0x518 - RXD register"] + pub rxd: RXD, + #[doc = "0x51c - TXD register"] + pub txd: TXD, + _reserved22: [u8; 0x04], + #[doc = "0x524 - Baud rate"] + pub baudrate: BAUDRATE, + _reserved23: [u8; 0x44], + #[doc = "0x56c - Configuration of parity and hardware flow control"] + pub config: CONFIG, +} +#[doc = "TASKS_STARTRX (w) register accessor: an alias for `Reg`"] +pub type TASKS_STARTRX = crate::Reg; +#[doc = "Start UART receiver"] +pub mod tasks_startrx; +#[doc = "TASKS_STOPRX (w) register accessor: an alias for `Reg`"] +pub type TASKS_STOPRX = crate::Reg; +#[doc = "Stop UART receiver"] +pub mod tasks_stoprx; +#[doc = "TASKS_STARTTX (w) register accessor: an alias for `Reg`"] +pub type TASKS_STARTTX = crate::Reg; +#[doc = "Start UART transmitter"] +pub mod tasks_starttx; +#[doc = "TASKS_STOPTX (w) register accessor: an alias for `Reg`"] +pub type TASKS_STOPTX = crate::Reg; +#[doc = "Stop UART transmitter"] +pub mod tasks_stoptx; +#[doc = "TASKS_SUSPEND (w) register accessor: an alias for `Reg`"] +pub type TASKS_SUSPEND = crate::Reg; +#[doc = "Suspend UART"] +pub mod tasks_suspend; +#[doc = "EVENTS_CTS (rw) register accessor: an alias for `Reg`"] +pub type EVENTS_CTS = crate::Reg; +#[doc = "CTS is activated (set low). Clear To Send."] +pub mod events_cts; +#[doc = "EVENTS_NCTS (rw) register accessor: an alias for `Reg`"] +pub type EVENTS_NCTS = crate::Reg; +#[doc = "CTS is deactivated (set high). Not Clear To Send."] +pub mod events_ncts; +#[doc = "EVENTS_RXDRDY (rw) register accessor: an alias for `Reg`"] +pub type EVENTS_RXDRDY = crate::Reg; +#[doc = "Data received in RXD"] +pub mod events_rxdrdy; +#[doc = "EVENTS_TXDRDY (rw) register accessor: an alias for `Reg`"] +pub type EVENTS_TXDRDY = crate::Reg; +#[doc = "Data sent from TXD"] +pub mod events_txdrdy; +#[doc = "EVENTS_ERROR (rw) register accessor: an alias for `Reg`"] +pub type EVENTS_ERROR = crate::Reg; +#[doc = "Error detected"] +pub mod events_error; +#[doc = "EVENTS_RXTO (rw) register accessor: an alias for `Reg`"] +pub type EVENTS_RXTO = crate::Reg; +#[doc = "Receiver timeout"] +pub mod events_rxto; +#[doc = "SHORTS (rw) register accessor: an alias for `Reg`"] +pub type SHORTS = crate::Reg; +#[doc = "Shortcuts between local events and tasks"] +pub mod shorts; +#[doc = "INTENSET (rw) register accessor: an alias for `Reg`"] +pub type INTENSET = crate::Reg; +#[doc = "Enable interrupt"] +pub mod intenset; +#[doc = "INTENCLR (rw) register accessor: an alias for `Reg`"] +pub type INTENCLR = crate::Reg; +#[doc = "Disable interrupt"] +pub mod intenclr; +#[doc = "ERRORSRC (rw) register accessor: an alias for `Reg`"] +pub type ERRORSRC = crate::Reg; +#[doc = "Error source"] +pub mod errorsrc; +#[doc = "ENABLE (rw) register accessor: an alias for `Reg`"] +pub type ENABLE = crate::Reg; +#[doc = "Enable UART"] +pub mod enable; +#[doc = "PSELRTS (rw) register accessor: an alias for `Reg`"] +pub type PSELRTS = crate::Reg; +#[doc = "Pin select for RTS"] +pub mod pselrts; +#[doc = "PSELTXD (rw) register accessor: an alias for `Reg`"] +pub type PSELTXD = crate::Reg; +#[doc = "Pin select for TXD"] +pub mod pseltxd; +#[doc = "PSELCTS (rw) register accessor: an alias for `Reg`"] +pub type PSELCTS = crate::Reg; +#[doc = "Pin select for CTS"] +pub mod pselcts; +#[doc = "PSELRXD (rw) register accessor: an alias for `Reg`"] +pub type PSELRXD = crate::Reg; +#[doc = "Pin select for RXD"] +pub mod pselrxd; +#[doc = "RXD (r) register accessor: an alias for `Reg`"] +pub type RXD = crate::Reg; +#[doc = "RXD register"] +pub mod rxd; +#[doc = "TXD (w) register accessor: an alias for `Reg`"] +pub type TXD = crate::Reg; +#[doc = "TXD register"] +pub mod txd; +#[doc = "BAUDRATE (rw) register accessor: an alias for `Reg`"] +pub type BAUDRATE = crate::Reg; +#[doc = "Baud rate"] +pub mod baudrate; +#[doc = "CONFIG (rw) register accessor: an alias for `Reg`"] +pub type CONFIG = crate::Reg; +#[doc = "Configuration of parity and hardware flow control"] +pub mod config; diff --git a/down-the-stack/dk_pac/src/uart0/baudrate.rs b/down-the-stack/dk_pac/src/uart0/baudrate.rs new file mode 100644 index 0000000..9f0dc06 --- /dev/null +++ b/down-the-stack/dk_pac/src/uart0/baudrate.rs @@ -0,0 +1,337 @@ +#[doc = "Register `BAUDRATE` 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 `BAUDRATE` 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 `BAUDRATE` reader - Baud rate"] +pub type BAUDRATE_R = crate::FieldReader; +#[doc = "Baud rate\n\nValue on reset: 67108864"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +#[repr(u32)] +pub enum BAUDRATE_A { + #[doc = "323584: 1200 baud (actual rate: 1205)"] + BAUD1200 = 323584, + #[doc = "643072: 2400 baud (actual rate: 2396)"] + BAUD2400 = 643072, + #[doc = "1290240: 4800 baud (actual rate: 4808)"] + BAUD4800 = 1290240, + #[doc = "2576384: 9600 baud (actual rate: 9598)"] + BAUD9600 = 2576384, + #[doc = "3866624: 14400 baud (actual rate: 14414)"] + BAUD14400 = 3866624, + #[doc = "5152768: 19200 baud (actual rate: 19208)"] + BAUD19200 = 5152768, + #[doc = "7729152: 28800 baud (actual rate: 28829)"] + BAUD28800 = 7729152, + #[doc = "8388608: 31250 baud"] + BAUD31250 = 8388608, + #[doc = "10309632: 38400 baud (actual rate: 38462)"] + BAUD38400 = 10309632, + #[doc = "15007744: 56000 baud (actual rate: 55944)"] + BAUD56000 = 15007744, + #[doc = "15462400: 57600 baud (actual rate: 57762)"] + BAUD57600 = 15462400, + #[doc = "20615168: 76800 baud (actual rate: 76923)"] + BAUD76800 = 20615168, + #[doc = "30924800: 115200 baud (actual rate: 115942)"] + BAUD115200 = 30924800, + #[doc = "61845504: 230400 baud (actual rate: 231884)"] + BAUD230400 = 61845504, + #[doc = "67108864: 250000 baud"] + BAUD250000 = 67108864, + #[doc = "123695104: 460800 baud (actual rate: 470588)"] + BAUD460800 = 123695104, + #[doc = "247386112: 921600 baud (actual rate: 941176)"] + BAUD921600 = 247386112, + #[doc = "268435456: 1Mega baud"] + BAUD1M = 268435456, +} +impl From for u32 { + #[inline(always)] + fn from(variant: BAUDRATE_A) -> Self { + variant as _ + } +} +impl BAUDRATE_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> Option { + match self.bits { + 323584 => Some(BAUDRATE_A::BAUD1200), + 643072 => Some(BAUDRATE_A::BAUD2400), + 1290240 => Some(BAUDRATE_A::BAUD4800), + 2576384 => Some(BAUDRATE_A::BAUD9600), + 3866624 => Some(BAUDRATE_A::BAUD14400), + 5152768 => Some(BAUDRATE_A::BAUD19200), + 7729152 => Some(BAUDRATE_A::BAUD28800), + 8388608 => Some(BAUDRATE_A::BAUD31250), + 10309632 => Some(BAUDRATE_A::BAUD38400), + 15007744 => Some(BAUDRATE_A::BAUD56000), + 15462400 => Some(BAUDRATE_A::BAUD57600), + 20615168 => Some(BAUDRATE_A::BAUD76800), + 30924800 => Some(BAUDRATE_A::BAUD115200), + 61845504 => Some(BAUDRATE_A::BAUD230400), + 67108864 => Some(BAUDRATE_A::BAUD250000), + 123695104 => Some(BAUDRATE_A::BAUD460800), + 247386112 => Some(BAUDRATE_A::BAUD921600), + 268435456 => Some(BAUDRATE_A::BAUD1M), + _ => None, + } + } + #[doc = "Checks if the value of the field is `BAUD1200`"] + #[inline(always)] + pub fn is_baud1200(&self) -> bool { + *self == BAUDRATE_A::BAUD1200 + } + #[doc = "Checks if the value of the field is `BAUD2400`"] + #[inline(always)] + pub fn is_baud2400(&self) -> bool { + *self == BAUDRATE_A::BAUD2400 + } + #[doc = "Checks if the value of the field is `BAUD4800`"] + #[inline(always)] + pub fn is_baud4800(&self) -> bool { + *self == BAUDRATE_A::BAUD4800 + } + #[doc = "Checks if the value of the field is `BAUD9600`"] + #[inline(always)] + pub fn is_baud9600(&self) -> bool { + *self == BAUDRATE_A::BAUD9600 + } + #[doc = "Checks if the value of the field is `BAUD14400`"] + #[inline(always)] + pub fn is_baud14400(&self) -> bool { + *self == BAUDRATE_A::BAUD14400 + } + #[doc = "Checks if the value of the field is `BAUD19200`"] + #[inline(always)] + pub fn is_baud19200(&self) -> bool { + *self == BAUDRATE_A::BAUD19200 + } + #[doc = "Checks if the value of the field is `BAUD28800`"] + #[inline(always)] + pub fn is_baud28800(&self) -> bool { + *self == BAUDRATE_A::BAUD28800 + } + #[doc = "Checks if the value of the field is `BAUD31250`"] + #[inline(always)] + pub fn is_baud31250(&self) -> bool { + *self == BAUDRATE_A::BAUD31250 + } + #[doc = "Checks if the value of the field is `BAUD38400`"] + #[inline(always)] + pub fn is_baud38400(&self) -> bool { + *self == BAUDRATE_A::BAUD38400 + } + #[doc = "Checks if the value of the field is `BAUD56000`"] + #[inline(always)] + pub fn is_baud56000(&self) -> bool { + *self == BAUDRATE_A::BAUD56000 + } + #[doc = "Checks if the value of the field is `BAUD57600`"] + #[inline(always)] + pub fn is_baud57600(&self) -> bool { + *self == BAUDRATE_A::BAUD57600 + } + #[doc = "Checks if the value of the field is `BAUD76800`"] + #[inline(always)] + pub fn is_baud76800(&self) -> bool { + *self == BAUDRATE_A::BAUD76800 + } + #[doc = "Checks if the value of the field is `BAUD115200`"] + #[inline(always)] + pub fn is_baud115200(&self) -> bool { + *self == BAUDRATE_A::BAUD115200 + } + #[doc = "Checks if the value of the field is `BAUD230400`"] + #[inline(always)] + pub fn is_baud230400(&self) -> bool { + *self == BAUDRATE_A::BAUD230400 + } + #[doc = "Checks if the value of the field is `BAUD250000`"] + #[inline(always)] + pub fn is_baud250000(&self) -> bool { + *self == BAUDRATE_A::BAUD250000 + } + #[doc = "Checks if the value of the field is `BAUD460800`"] + #[inline(always)] + pub fn is_baud460800(&self) -> bool { + *self == BAUDRATE_A::BAUD460800 + } + #[doc = "Checks if the value of the field is `BAUD921600`"] + #[inline(always)] + pub fn is_baud921600(&self) -> bool { + *self == BAUDRATE_A::BAUD921600 + } + #[doc = "Checks if the value of the field is `BAUD1M`"] + #[inline(always)] + pub fn is_baud1m(&self) -> bool { + *self == BAUDRATE_A::BAUD1M + } +} +#[doc = "Field `BAUDRATE` writer - Baud rate"] +pub type BAUDRATE_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, BAUDRATE_SPEC, u32, BAUDRATE_A, 32, O>; +impl<'a, const O: u8> BAUDRATE_W<'a, O> { + #[doc = "1200 baud (actual rate: 1205)"] + #[inline(always)] + pub fn baud1200(self) -> &'a mut W { + self.variant(BAUDRATE_A::BAUD1200) + } + #[doc = "2400 baud (actual rate: 2396)"] + #[inline(always)] + pub fn baud2400(self) -> &'a mut W { + self.variant(BAUDRATE_A::BAUD2400) + } + #[doc = "4800 baud (actual rate: 4808)"] + #[inline(always)] + pub fn baud4800(self) -> &'a mut W { + self.variant(BAUDRATE_A::BAUD4800) + } + #[doc = "9600 baud (actual rate: 9598)"] + #[inline(always)] + pub fn baud9600(self) -> &'a mut W { + self.variant(BAUDRATE_A::BAUD9600) + } + #[doc = "14400 baud (actual rate: 14414)"] + #[inline(always)] + pub fn baud14400(self) -> &'a mut W { + self.variant(BAUDRATE_A::BAUD14400) + } + #[doc = "19200 baud (actual rate: 19208)"] + #[inline(always)] + pub fn baud19200(self) -> &'a mut W { + self.variant(BAUDRATE_A::BAUD19200) + } + #[doc = "28800 baud (actual rate: 28829)"] + #[inline(always)] + pub fn baud28800(self) -> &'a mut W { + self.variant(BAUDRATE_A::BAUD28800) + } + #[doc = "31250 baud"] + #[inline(always)] + pub fn baud31250(self) -> &'a mut W { + self.variant(BAUDRATE_A::BAUD31250) + } + #[doc = "38400 baud (actual rate: 38462)"] + #[inline(always)] + pub fn baud38400(self) -> &'a mut W { + self.variant(BAUDRATE_A::BAUD38400) + } + #[doc = "56000 baud (actual rate: 55944)"] + #[inline(always)] + pub fn baud56000(self) -> &'a mut W { + self.variant(BAUDRATE_A::BAUD56000) + } + #[doc = "57600 baud (actual rate: 57762)"] + #[inline(always)] + pub fn baud57600(self) -> &'a mut W { + self.variant(BAUDRATE_A::BAUD57600) + } + #[doc = "76800 baud (actual rate: 76923)"] + #[inline(always)] + pub fn baud76800(self) -> &'a mut W { + self.variant(BAUDRATE_A::BAUD76800) + } + #[doc = "115200 baud (actual rate: 115942)"] + #[inline(always)] + pub fn baud115200(self) -> &'a mut W { + self.variant(BAUDRATE_A::BAUD115200) + } + #[doc = "230400 baud (actual rate: 231884)"] + #[inline(always)] + pub fn baud230400(self) -> &'a mut W { + self.variant(BAUDRATE_A::BAUD230400) + } + #[doc = "250000 baud"] + #[inline(always)] + pub fn baud250000(self) -> &'a mut W { + self.variant(BAUDRATE_A::BAUD250000) + } + #[doc = "460800 baud (actual rate: 470588)"] + #[inline(always)] + pub fn baud460800(self) -> &'a mut W { + self.variant(BAUDRATE_A::BAUD460800) + } + #[doc = "921600 baud (actual rate: 941176)"] + #[inline(always)] + pub fn baud921600(self) -> &'a mut W { + self.variant(BAUDRATE_A::BAUD921600) + } + #[doc = "1Mega baud"] + #[inline(always)] + pub fn baud1m(self) -> &'a mut W { + self.variant(BAUDRATE_A::BAUD1M) + } +} +impl R { + #[doc = "Bits 0:31 - Baud rate"] + #[inline(always)] + pub fn baudrate(&self) -> BAUDRATE_R { + BAUDRATE_R::new(self.bits) + } +} +impl W { + #[doc = "Bits 0:31 - Baud rate"] + #[inline(always)] + #[must_use] + pub fn baudrate(&mut self) -> BAUDRATE_W<0> { + BAUDRATE_W::new(self) + } + #[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 = "Baud rate\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 [baudrate](index.html) module"] +pub struct BAUDRATE_SPEC; +impl crate::RegisterSpec for BAUDRATE_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [baudrate::R](R) reader structure"] +impl crate::Readable for BAUDRATE_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [baudrate::W](W) writer structure"] +impl crate::Writable for BAUDRATE_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets BAUDRATE to value 0x0400_0000"] +impl crate::Resettable for BAUDRATE_SPEC { + const RESET_VALUE: Self::Ux = 0x0400_0000; +} diff --git a/down-the-stack/dk_pac/src/uart0/config.rs b/down-the-stack/dk_pac/src/uart0/config.rs new file mode 100644 index 0000000..87a5585 --- /dev/null +++ b/down-the-stack/dk_pac/src/uart0/config.rs @@ -0,0 +1,189 @@ +#[doc = "Register `CONFIG` 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 `CONFIG` 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 `HWFC` reader - Hardware flow control"] +pub type HWFC_R = crate::BitReader; +#[doc = "Hardware flow control\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum HWFC_A { + #[doc = "0: Disabled"] + DISABLED = 0, + #[doc = "1: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: HWFC_A) -> Self { + variant as u8 != 0 + } +} +impl HWFC_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> HWFC_A { + match self.bits { + false => HWFC_A::DISABLED, + true => HWFC_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == HWFC_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == HWFC_A::ENABLED + } +} +#[doc = "Field `HWFC` writer - Hardware flow control"] +pub type HWFC_W<'a, const O: u8> = crate::BitWriter<'a, u32, CONFIG_SPEC, HWFC_A, O>; +impl<'a, const O: u8> HWFC_W<'a, O> { + #[doc = "Disabled"] + #[inline(always)] + pub fn disabled(self) -> &'a mut W { + self.variant(HWFC_A::DISABLED) + } + #[doc = "Enabled"] + #[inline(always)] + pub fn enabled(self) -> &'a mut W { + self.variant(HWFC_A::ENABLED) + } +} +#[doc = "Field `PARITY` reader - Parity"] +pub type PARITY_R = crate::FieldReader; +#[doc = "Parity\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +#[repr(u8)] +pub enum PARITY_A { + #[doc = "0: Exclude parity bit"] + EXCLUDED = 0, + #[doc = "7: Include parity bit"] + INCLUDED = 7, +} +impl From for u8 { + #[inline(always)] + fn from(variant: PARITY_A) -> Self { + variant as _ + } +} +impl PARITY_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> Option { + match self.bits { + 0 => Some(PARITY_A::EXCLUDED), + 7 => Some(PARITY_A::INCLUDED), + _ => None, + } + } + #[doc = "Checks if the value of the field is `EXCLUDED`"] + #[inline(always)] + pub fn is_excluded(&self) -> bool { + *self == PARITY_A::EXCLUDED + } + #[doc = "Checks if the value of the field is `INCLUDED`"] + #[inline(always)] + pub fn is_included(&self) -> bool { + *self == PARITY_A::INCLUDED + } +} +#[doc = "Field `PARITY` writer - Parity"] +pub type PARITY_W<'a, const O: u8> = crate::FieldWriter<'a, u32, CONFIG_SPEC, u8, PARITY_A, 3, O>; +impl<'a, const O: u8> PARITY_W<'a, O> { + #[doc = "Exclude parity bit"] + #[inline(always)] + pub fn excluded(self) -> &'a mut W { + self.variant(PARITY_A::EXCLUDED) + } + #[doc = "Include parity bit"] + #[inline(always)] + pub fn included(self) -> &'a mut W { + self.variant(PARITY_A::INCLUDED) + } +} +impl R { + #[doc = "Bit 0 - Hardware flow control"] + #[inline(always)] + pub fn hwfc(&self) -> HWFC_R { + HWFC_R::new((self.bits & 1) != 0) + } + #[doc = "Bits 1:3 - Parity"] + #[inline(always)] + pub fn parity(&self) -> PARITY_R { + PARITY_R::new(((self.bits >> 1) & 7) as u8) + } +} +impl W { + #[doc = "Bit 0 - Hardware flow control"] + #[inline(always)] + #[must_use] + pub fn hwfc(&mut self) -> HWFC_W<0> { + HWFC_W::new(self) + } + #[doc = "Bits 1:3 - Parity"] + #[inline(always)] + #[must_use] + pub fn parity(&mut self) -> PARITY_W<1> { + PARITY_W::new(self) + } + #[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 = "Configuration of parity and hardware flow control\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 [config](index.html) module"] +pub struct CONFIG_SPEC; +impl crate::RegisterSpec for CONFIG_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [config::R](R) reader structure"] +impl crate::Readable for CONFIG_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [config::W](W) writer structure"] +impl crate::Writable for 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 CONFIG to value 0"] +impl crate::Resettable for CONFIG_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/uart0/enable.rs b/down-the-stack/dk_pac/src/uart0/enable.rs new file mode 100644 index 0000000..f5ba7e9 --- /dev/null +++ b/down-the-stack/dk_pac/src/uart0/enable.rs @@ -0,0 +1,128 @@ +#[doc = "Register `ENABLE` 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 `ENABLE` 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 `ENABLE` reader - Enable or disable UART"] +pub type ENABLE_R = crate::FieldReader; +#[doc = "Enable or disable UART\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +#[repr(u8)] +pub enum ENABLE_A { + #[doc = "0: Disable UART"] + DISABLED = 0, + #[doc = "4: Enable UART"] + ENABLED = 4, +} +impl From for u8 { + #[inline(always)] + fn from(variant: ENABLE_A) -> Self { + variant as _ + } +} +impl ENABLE_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> Option { + match self.bits { + 0 => Some(ENABLE_A::DISABLED), + 4 => Some(ENABLE_A::ENABLED), + _ => None, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == ENABLE_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == ENABLE_A::ENABLED + } +} +#[doc = "Field `ENABLE` writer - Enable or disable UART"] +pub type ENABLE_W<'a, const O: u8> = crate::FieldWriter<'a, u32, ENABLE_SPEC, u8, ENABLE_A, 4, O>; +impl<'a, const O: u8> ENABLE_W<'a, O> { + #[doc = "Disable UART"] + #[inline(always)] + pub fn disabled(self) -> &'a mut W { + self.variant(ENABLE_A::DISABLED) + } + #[doc = "Enable UART"] + #[inline(always)] + pub fn enabled(self) -> &'a mut W { + self.variant(ENABLE_A::ENABLED) + } +} +impl R { + #[doc = "Bits 0:3 - Enable or disable UART"] + #[inline(always)] + pub fn enable(&self) -> ENABLE_R { + ENABLE_R::new((self.bits & 0x0f) as u8) + } +} +impl W { + #[doc = "Bits 0:3 - Enable or disable UART"] + #[inline(always)] + #[must_use] + pub fn enable(&mut self) -> ENABLE_W<0> { + 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 + } +} +#[doc = "Enable UART\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 [enable](index.html) module"] +pub struct ENABLE_SPEC; +impl crate::RegisterSpec for ENABLE_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [enable::R](R) reader structure"] +impl crate::Readable for ENABLE_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [enable::W](W) writer structure"] +impl crate::Writable for ENABLE_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets ENABLE to value 0"] +impl crate::Resettable for ENABLE_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/uart0/errorsrc.rs b/down-the-stack/dk_pac/src/uart0/errorsrc.rs new file mode 100644 index 0000000..8a78d5a --- /dev/null +++ b/down-the-stack/dk_pac/src/uart0/errorsrc.rs @@ -0,0 +1,309 @@ +#[doc = "Register `ERRORSRC` 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 `ERRORSRC` 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 `OVERRUN` reader - Overrun error"] +pub type OVERRUN_R = crate::BitReader; +#[doc = "Overrun error\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum OVERRUN_A { + #[doc = "0: Read: error not present"] + NOT_PRESENT = 0, + #[doc = "1: Read: error present"] + PRESENT = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: OVERRUN_A) -> Self { + variant as u8 != 0 + } +} +impl OVERRUN_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> OVERRUN_A { + match self.bits { + false => OVERRUN_A::NOT_PRESENT, + true => OVERRUN_A::PRESENT, + } + } + #[doc = "Checks if the value of the field is `NOT_PRESENT`"] + #[inline(always)] + pub fn is_not_present(&self) -> bool { + *self == OVERRUN_A::NOT_PRESENT + } + #[doc = "Checks if the value of the field is `PRESENT`"] + #[inline(always)] + pub fn is_present(&self) -> bool { + *self == OVERRUN_A::PRESENT + } +} +#[doc = "Field `OVERRUN` writer - Overrun error"] +pub type OVERRUN_W<'a, const O: u8> = crate::BitWriter1C<'a, u32, ERRORSRC_SPEC, OVERRUN_A, O>; +impl<'a, const O: u8> OVERRUN_W<'a, O> { + #[doc = "Read: error not present"] + #[inline(always)] + pub fn not_present(self) -> &'a mut W { + self.variant(OVERRUN_A::NOT_PRESENT) + } + #[doc = "Read: error present"] + #[inline(always)] + pub fn present(self) -> &'a mut W { + self.variant(OVERRUN_A::PRESENT) + } +} +#[doc = "Field `PARITY` reader - Parity error"] +pub type PARITY_R = crate::BitReader; +#[doc = "Parity error\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PARITY_A { + #[doc = "0: Read: error not present"] + NOT_PRESENT = 0, + #[doc = "1: Read: error present"] + PRESENT = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PARITY_A) -> Self { + variant as u8 != 0 + } +} +impl PARITY_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> PARITY_A { + match self.bits { + false => PARITY_A::NOT_PRESENT, + true => PARITY_A::PRESENT, + } + } + #[doc = "Checks if the value of the field is `NOT_PRESENT`"] + #[inline(always)] + pub fn is_not_present(&self) -> bool { + *self == PARITY_A::NOT_PRESENT + } + #[doc = "Checks if the value of the field is `PRESENT`"] + #[inline(always)] + pub fn is_present(&self) -> bool { + *self == PARITY_A::PRESENT + } +} +#[doc = "Field `PARITY` writer - Parity error"] +pub type PARITY_W<'a, const O: u8> = crate::BitWriter1C<'a, u32, ERRORSRC_SPEC, PARITY_A, O>; +impl<'a, const O: u8> PARITY_W<'a, O> { + #[doc = "Read: error not present"] + #[inline(always)] + pub fn not_present(self) -> &'a mut W { + self.variant(PARITY_A::NOT_PRESENT) + } + #[doc = "Read: error present"] + #[inline(always)] + pub fn present(self) -> &'a mut W { + self.variant(PARITY_A::PRESENT) + } +} +#[doc = "Field `FRAMING` reader - Framing error occurred"] +pub type FRAMING_R = crate::BitReader; +#[doc = "Framing error occurred\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum FRAMING_A { + #[doc = "0: Read: error not present"] + NOT_PRESENT = 0, + #[doc = "1: Read: error present"] + PRESENT = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: FRAMING_A) -> Self { + variant as u8 != 0 + } +} +impl FRAMING_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> FRAMING_A { + match self.bits { + false => FRAMING_A::NOT_PRESENT, + true => FRAMING_A::PRESENT, + } + } + #[doc = "Checks if the value of the field is `NOT_PRESENT`"] + #[inline(always)] + pub fn is_not_present(&self) -> bool { + *self == FRAMING_A::NOT_PRESENT + } + #[doc = "Checks if the value of the field is `PRESENT`"] + #[inline(always)] + pub fn is_present(&self) -> bool { + *self == FRAMING_A::PRESENT + } +} +#[doc = "Field `FRAMING` writer - Framing error occurred"] +pub type FRAMING_W<'a, const O: u8> = crate::BitWriter1C<'a, u32, ERRORSRC_SPEC, FRAMING_A, O>; +impl<'a, const O: u8> FRAMING_W<'a, O> { + #[doc = "Read: error not present"] + #[inline(always)] + pub fn not_present(self) -> &'a mut W { + self.variant(FRAMING_A::NOT_PRESENT) + } + #[doc = "Read: error present"] + #[inline(always)] + pub fn present(self) -> &'a mut W { + self.variant(FRAMING_A::PRESENT) + } +} +#[doc = "Field `BREAK` reader - Break condition"] +pub type BREAK_R = crate::BitReader; +#[doc = "Break condition\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum BREAK_A { + #[doc = "0: Read: error not present"] + NOT_PRESENT = 0, + #[doc = "1: Read: error present"] + PRESENT = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: BREAK_A) -> Self { + variant as u8 != 0 + } +} +impl BREAK_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> BREAK_A { + match self.bits { + false => BREAK_A::NOT_PRESENT, + true => BREAK_A::PRESENT, + } + } + #[doc = "Checks if the value of the field is `NOT_PRESENT`"] + #[inline(always)] + pub fn is_not_present(&self) -> bool { + *self == BREAK_A::NOT_PRESENT + } + #[doc = "Checks if the value of the field is `PRESENT`"] + #[inline(always)] + pub fn is_present(&self) -> bool { + *self == BREAK_A::PRESENT + } +} +#[doc = "Field `BREAK` writer - Break condition"] +pub type BREAK_W<'a, const O: u8> = crate::BitWriter1C<'a, u32, ERRORSRC_SPEC, BREAK_A, O>; +impl<'a, const O: u8> BREAK_W<'a, O> { + #[doc = "Read: error not present"] + #[inline(always)] + pub fn not_present(self) -> &'a mut W { + self.variant(BREAK_A::NOT_PRESENT) + } + #[doc = "Read: error present"] + #[inline(always)] + pub fn present(self) -> &'a mut W { + self.variant(BREAK_A::PRESENT) + } +} +impl R { + #[doc = "Bit 0 - Overrun error"] + #[inline(always)] + pub fn overrun(&self) -> OVERRUN_R { + OVERRUN_R::new((self.bits & 1) != 0) + } + #[doc = "Bit 1 - Parity error"] + #[inline(always)] + pub fn parity(&self) -> PARITY_R { + PARITY_R::new(((self.bits >> 1) & 1) != 0) + } + #[doc = "Bit 2 - Framing error occurred"] + #[inline(always)] + pub fn framing(&self) -> FRAMING_R { + FRAMING_R::new(((self.bits >> 2) & 1) != 0) + } + #[doc = "Bit 3 - Break condition"] + #[inline(always)] + pub fn break_(&self) -> BREAK_R { + BREAK_R::new(((self.bits >> 3) & 1) != 0) + } +} +impl W { + #[doc = "Bit 0 - Overrun error"] + #[inline(always)] + #[must_use] + pub fn overrun(&mut self) -> OVERRUN_W<0> { + OVERRUN_W::new(self) + } + #[doc = "Bit 1 - Parity error"] + #[inline(always)] + #[must_use] + pub fn parity(&mut self) -> PARITY_W<1> { + PARITY_W::new(self) + } + #[doc = "Bit 2 - Framing error occurred"] + #[inline(always)] + #[must_use] + pub fn framing(&mut self) -> FRAMING_W<2> { + FRAMING_W::new(self) + } + #[doc = "Bit 3 - Break condition"] + #[inline(always)] + #[must_use] + pub fn break_(&mut self) -> BREAK_W<3> { + BREAK_W::new(self) + } + #[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 = "Error source\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 [errorsrc](index.html) module"] +pub struct ERRORSRC_SPEC; +impl crate::RegisterSpec for ERRORSRC_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [errorsrc::R](R) reader structure"] +impl crate::Readable for ERRORSRC_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [errorsrc::W](W) writer structure"] +impl crate::Writable for ERRORSRC_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0x0f; +} +#[doc = "`reset()` method sets ERRORSRC to value 0"] +impl crate::Resettable for ERRORSRC_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/uart0/events_cts.rs b/down-the-stack/dk_pac/src/uart0/events_cts.rs new file mode 100644 index 0000000..b3589f3 --- /dev/null +++ b/down-the-stack/dk_pac/src/uart0/events_cts.rs @@ -0,0 +1,127 @@ +#[doc = "Register `EVENTS_CTS` 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 `EVENTS_CTS` 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 `EVENTS_CTS` reader - CTS is activated (set low). Clear To Send."] +pub type EVENTS_CTS_R = crate::BitReader; +#[doc = "CTS is activated (set low). Clear To Send.\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum EVENTS_CTS_A { + #[doc = "0: Event not generated"] + NOT_GENERATED = 0, + #[doc = "1: Event generated"] + GENERATED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: EVENTS_CTS_A) -> Self { + variant as u8 != 0 + } +} +impl EVENTS_CTS_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> EVENTS_CTS_A { + match self.bits { + false => EVENTS_CTS_A::NOT_GENERATED, + true => EVENTS_CTS_A::GENERATED, + } + } + #[doc = "Checks if the value of the field is `NOT_GENERATED`"] + #[inline(always)] + pub fn is_not_generated(&self) -> bool { + *self == EVENTS_CTS_A::NOT_GENERATED + } + #[doc = "Checks if the value of the field is `GENERATED`"] + #[inline(always)] + pub fn is_generated(&self) -> bool { + *self == EVENTS_CTS_A::GENERATED + } +} +#[doc = "Field `EVENTS_CTS` writer - CTS is activated (set low). Clear To Send."] +pub type EVENTS_CTS_W<'a, const O: u8> = + crate::BitWriter<'a, u32, EVENTS_CTS_SPEC, EVENTS_CTS_A, O>; +impl<'a, const O: u8> EVENTS_CTS_W<'a, O> { + #[doc = "Event not generated"] + #[inline(always)] + pub fn not_generated(self) -> &'a mut W { + self.variant(EVENTS_CTS_A::NOT_GENERATED) + } + #[doc = "Event generated"] + #[inline(always)] + pub fn generated(self) -> &'a mut W { + self.variant(EVENTS_CTS_A::GENERATED) + } +} +impl R { + #[doc = "Bit 0 - CTS is activated (set low). Clear To Send."] + #[inline(always)] + pub fn events_cts(&self) -> EVENTS_CTS_R { + EVENTS_CTS_R::new((self.bits & 1) != 0) + } +} +impl W { + #[doc = "Bit 0 - CTS is activated (set low). Clear To Send."] + #[inline(always)] + #[must_use] + pub fn events_cts(&mut self) -> EVENTS_CTS_W<0> { + EVENTS_CTS_W::new(self) + } + #[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 = "CTS is activated (set low). Clear To Send.\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 [events_cts](index.html) module"] +pub struct EVENTS_CTS_SPEC; +impl crate::RegisterSpec for EVENTS_CTS_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [events_cts::R](R) reader structure"] +impl crate::Readable for EVENTS_CTS_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [events_cts::W](W) writer structure"] +impl crate::Writable for EVENTS_CTS_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets EVENTS_CTS to value 0"] +impl crate::Resettable for EVENTS_CTS_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/uart0/events_error.rs b/down-the-stack/dk_pac/src/uart0/events_error.rs new file mode 100644 index 0000000..ea836b3 --- /dev/null +++ b/down-the-stack/dk_pac/src/uart0/events_error.rs @@ -0,0 +1,127 @@ +#[doc = "Register `EVENTS_ERROR` 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 `EVENTS_ERROR` 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 `EVENTS_ERROR` reader - Error detected"] +pub type EVENTS_ERROR_R = crate::BitReader; +#[doc = "Error detected\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum EVENTS_ERROR_A { + #[doc = "0: Event not generated"] + NOT_GENERATED = 0, + #[doc = "1: Event generated"] + GENERATED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: EVENTS_ERROR_A) -> Self { + variant as u8 != 0 + } +} +impl EVENTS_ERROR_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> EVENTS_ERROR_A { + match self.bits { + false => EVENTS_ERROR_A::NOT_GENERATED, + true => EVENTS_ERROR_A::GENERATED, + } + } + #[doc = "Checks if the value of the field is `NOT_GENERATED`"] + #[inline(always)] + pub fn is_not_generated(&self) -> bool { + *self == EVENTS_ERROR_A::NOT_GENERATED + } + #[doc = "Checks if the value of the field is `GENERATED`"] + #[inline(always)] + pub fn is_generated(&self) -> bool { + *self == EVENTS_ERROR_A::GENERATED + } +} +#[doc = "Field `EVENTS_ERROR` writer - Error detected"] +pub type EVENTS_ERROR_W<'a, const O: u8> = + crate::BitWriter<'a, u32, EVENTS_ERROR_SPEC, EVENTS_ERROR_A, O>; +impl<'a, const O: u8> EVENTS_ERROR_W<'a, O> { + #[doc = "Event not generated"] + #[inline(always)] + pub fn not_generated(self) -> &'a mut W { + self.variant(EVENTS_ERROR_A::NOT_GENERATED) + } + #[doc = "Event generated"] + #[inline(always)] + pub fn generated(self) -> &'a mut W { + self.variant(EVENTS_ERROR_A::GENERATED) + } +} +impl R { + #[doc = "Bit 0 - Error detected"] + #[inline(always)] + pub fn events_error(&self) -> EVENTS_ERROR_R { + EVENTS_ERROR_R::new((self.bits & 1) != 0) + } +} +impl W { + #[doc = "Bit 0 - Error detected"] + #[inline(always)] + #[must_use] + pub fn events_error(&mut self) -> EVENTS_ERROR_W<0> { + EVENTS_ERROR_W::new(self) + } + #[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 = "Error detected\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 [events_error](index.html) module"] +pub struct EVENTS_ERROR_SPEC; +impl crate::RegisterSpec for EVENTS_ERROR_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [events_error::R](R) reader structure"] +impl crate::Readable for EVENTS_ERROR_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [events_error::W](W) writer structure"] +impl crate::Writable for EVENTS_ERROR_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets EVENTS_ERROR to value 0"] +impl crate::Resettable for EVENTS_ERROR_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/uart0/events_ncts.rs b/down-the-stack/dk_pac/src/uart0/events_ncts.rs new file mode 100644 index 0000000..4596a0a --- /dev/null +++ b/down-the-stack/dk_pac/src/uart0/events_ncts.rs @@ -0,0 +1,127 @@ +#[doc = "Register `EVENTS_NCTS` 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 `EVENTS_NCTS` 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 `EVENTS_NCTS` reader - CTS is deactivated (set high). Not Clear To Send."] +pub type EVENTS_NCTS_R = crate::BitReader; +#[doc = "CTS is deactivated (set high). Not Clear To Send.\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum EVENTS_NCTS_A { + #[doc = "0: Event not generated"] + NOT_GENERATED = 0, + #[doc = "1: Event generated"] + GENERATED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: EVENTS_NCTS_A) -> Self { + variant as u8 != 0 + } +} +impl EVENTS_NCTS_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> EVENTS_NCTS_A { + match self.bits { + false => EVENTS_NCTS_A::NOT_GENERATED, + true => EVENTS_NCTS_A::GENERATED, + } + } + #[doc = "Checks if the value of the field is `NOT_GENERATED`"] + #[inline(always)] + pub fn is_not_generated(&self) -> bool { + *self == EVENTS_NCTS_A::NOT_GENERATED + } + #[doc = "Checks if the value of the field is `GENERATED`"] + #[inline(always)] + pub fn is_generated(&self) -> bool { + *self == EVENTS_NCTS_A::GENERATED + } +} +#[doc = "Field `EVENTS_NCTS` writer - CTS is deactivated (set high). Not Clear To Send."] +pub type EVENTS_NCTS_W<'a, const O: u8> = + crate::BitWriter<'a, u32, EVENTS_NCTS_SPEC, EVENTS_NCTS_A, O>; +impl<'a, const O: u8> EVENTS_NCTS_W<'a, O> { + #[doc = "Event not generated"] + #[inline(always)] + pub fn not_generated(self) -> &'a mut W { + self.variant(EVENTS_NCTS_A::NOT_GENERATED) + } + #[doc = "Event generated"] + #[inline(always)] + pub fn generated(self) -> &'a mut W { + self.variant(EVENTS_NCTS_A::GENERATED) + } +} +impl R { + #[doc = "Bit 0 - CTS is deactivated (set high). Not Clear To Send."] + #[inline(always)] + pub fn events_ncts(&self) -> EVENTS_NCTS_R { + EVENTS_NCTS_R::new((self.bits & 1) != 0) + } +} +impl W { + #[doc = "Bit 0 - CTS is deactivated (set high). Not Clear To Send."] + #[inline(always)] + #[must_use] + pub fn events_ncts(&mut self) -> EVENTS_NCTS_W<0> { + EVENTS_NCTS_W::new(self) + } + #[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 = "CTS is deactivated (set high). Not Clear To Send.\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 [events_ncts](index.html) module"] +pub struct EVENTS_NCTS_SPEC; +impl crate::RegisterSpec for EVENTS_NCTS_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [events_ncts::R](R) reader structure"] +impl crate::Readable for EVENTS_NCTS_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [events_ncts::W](W) writer structure"] +impl crate::Writable for EVENTS_NCTS_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets EVENTS_NCTS to value 0"] +impl crate::Resettable for EVENTS_NCTS_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/uart0/events_rxdrdy.rs b/down-the-stack/dk_pac/src/uart0/events_rxdrdy.rs new file mode 100644 index 0000000..c26d9ec --- /dev/null +++ b/down-the-stack/dk_pac/src/uart0/events_rxdrdy.rs @@ -0,0 +1,127 @@ +#[doc = "Register `EVENTS_RXDRDY` 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 `EVENTS_RXDRDY` 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 `EVENTS_RXDRDY` reader - Data received in RXD"] +pub type EVENTS_RXDRDY_R = crate::BitReader; +#[doc = "Data received in RXD\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum EVENTS_RXDRDY_A { + #[doc = "0: Event not generated"] + NOT_GENERATED = 0, + #[doc = "1: Event generated"] + GENERATED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: EVENTS_RXDRDY_A) -> Self { + variant as u8 != 0 + } +} +impl EVENTS_RXDRDY_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> EVENTS_RXDRDY_A { + match self.bits { + false => EVENTS_RXDRDY_A::NOT_GENERATED, + true => EVENTS_RXDRDY_A::GENERATED, + } + } + #[doc = "Checks if the value of the field is `NOT_GENERATED`"] + #[inline(always)] + pub fn is_not_generated(&self) -> bool { + *self == EVENTS_RXDRDY_A::NOT_GENERATED + } + #[doc = "Checks if the value of the field is `GENERATED`"] + #[inline(always)] + pub fn is_generated(&self) -> bool { + *self == EVENTS_RXDRDY_A::GENERATED + } +} +#[doc = "Field `EVENTS_RXDRDY` writer - Data received in RXD"] +pub type EVENTS_RXDRDY_W<'a, const O: u8> = + crate::BitWriter<'a, u32, EVENTS_RXDRDY_SPEC, EVENTS_RXDRDY_A, O>; +impl<'a, const O: u8> EVENTS_RXDRDY_W<'a, O> { + #[doc = "Event not generated"] + #[inline(always)] + pub fn not_generated(self) -> &'a mut W { + self.variant(EVENTS_RXDRDY_A::NOT_GENERATED) + } + #[doc = "Event generated"] + #[inline(always)] + pub fn generated(self) -> &'a mut W { + self.variant(EVENTS_RXDRDY_A::GENERATED) + } +} +impl R { + #[doc = "Bit 0 - Data received in RXD"] + #[inline(always)] + pub fn events_rxdrdy(&self) -> EVENTS_RXDRDY_R { + EVENTS_RXDRDY_R::new((self.bits & 1) != 0) + } +} +impl W { + #[doc = "Bit 0 - Data received in RXD"] + #[inline(always)] + #[must_use] + pub fn events_rxdrdy(&mut self) -> EVENTS_RXDRDY_W<0> { + EVENTS_RXDRDY_W::new(self) + } + #[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 = "Data received in RXD\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 [events_rxdrdy](index.html) module"] +pub struct EVENTS_RXDRDY_SPEC; +impl crate::RegisterSpec for EVENTS_RXDRDY_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [events_rxdrdy::R](R) reader structure"] +impl crate::Readable for EVENTS_RXDRDY_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [events_rxdrdy::W](W) writer structure"] +impl crate::Writable for EVENTS_RXDRDY_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets EVENTS_RXDRDY to value 0"] +impl crate::Resettable for EVENTS_RXDRDY_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/uart0/events_rxto.rs b/down-the-stack/dk_pac/src/uart0/events_rxto.rs new file mode 100644 index 0000000..f3a1380 --- /dev/null +++ b/down-the-stack/dk_pac/src/uart0/events_rxto.rs @@ -0,0 +1,127 @@ +#[doc = "Register `EVENTS_RXTO` 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 `EVENTS_RXTO` 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 `EVENTS_RXTO` reader - Receiver timeout"] +pub type EVENTS_RXTO_R = crate::BitReader; +#[doc = "Receiver timeout\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum EVENTS_RXTO_A { + #[doc = "0: Event not generated"] + NOT_GENERATED = 0, + #[doc = "1: Event generated"] + GENERATED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: EVENTS_RXTO_A) -> Self { + variant as u8 != 0 + } +} +impl EVENTS_RXTO_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> EVENTS_RXTO_A { + match self.bits { + false => EVENTS_RXTO_A::NOT_GENERATED, + true => EVENTS_RXTO_A::GENERATED, + } + } + #[doc = "Checks if the value of the field is `NOT_GENERATED`"] + #[inline(always)] + pub fn is_not_generated(&self) -> bool { + *self == EVENTS_RXTO_A::NOT_GENERATED + } + #[doc = "Checks if the value of the field is `GENERATED`"] + #[inline(always)] + pub fn is_generated(&self) -> bool { + *self == EVENTS_RXTO_A::GENERATED + } +} +#[doc = "Field `EVENTS_RXTO` writer - Receiver timeout"] +pub type EVENTS_RXTO_W<'a, const O: u8> = + crate::BitWriter<'a, u32, EVENTS_RXTO_SPEC, EVENTS_RXTO_A, O>; +impl<'a, const O: u8> EVENTS_RXTO_W<'a, O> { + #[doc = "Event not generated"] + #[inline(always)] + pub fn not_generated(self) -> &'a mut W { + self.variant(EVENTS_RXTO_A::NOT_GENERATED) + } + #[doc = "Event generated"] + #[inline(always)] + pub fn generated(self) -> &'a mut W { + self.variant(EVENTS_RXTO_A::GENERATED) + } +} +impl R { + #[doc = "Bit 0 - Receiver timeout"] + #[inline(always)] + pub fn events_rxto(&self) -> EVENTS_RXTO_R { + EVENTS_RXTO_R::new((self.bits & 1) != 0) + } +} +impl W { + #[doc = "Bit 0 - Receiver timeout"] + #[inline(always)] + #[must_use] + pub fn events_rxto(&mut self) -> EVENTS_RXTO_W<0> { + EVENTS_RXTO_W::new(self) + } + #[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 = "Receiver timeout\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 [events_rxto](index.html) module"] +pub struct EVENTS_RXTO_SPEC; +impl crate::RegisterSpec for EVENTS_RXTO_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [events_rxto::R](R) reader structure"] +impl crate::Readable for EVENTS_RXTO_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [events_rxto::W](W) writer structure"] +impl crate::Writable for EVENTS_RXTO_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets EVENTS_RXTO to value 0"] +impl crate::Resettable for EVENTS_RXTO_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/uart0/events_txdrdy.rs b/down-the-stack/dk_pac/src/uart0/events_txdrdy.rs new file mode 100644 index 0000000..b5a9b5b --- /dev/null +++ b/down-the-stack/dk_pac/src/uart0/events_txdrdy.rs @@ -0,0 +1,127 @@ +#[doc = "Register `EVENTS_TXDRDY` 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 `EVENTS_TXDRDY` 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 `EVENTS_TXDRDY` reader - Data sent from TXD"] +pub type EVENTS_TXDRDY_R = crate::BitReader; +#[doc = "Data sent from TXD\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum EVENTS_TXDRDY_A { + #[doc = "0: Event not generated"] + NOT_GENERATED = 0, + #[doc = "1: Event generated"] + GENERATED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: EVENTS_TXDRDY_A) -> Self { + variant as u8 != 0 + } +} +impl EVENTS_TXDRDY_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> EVENTS_TXDRDY_A { + match self.bits { + false => EVENTS_TXDRDY_A::NOT_GENERATED, + true => EVENTS_TXDRDY_A::GENERATED, + } + } + #[doc = "Checks if the value of the field is `NOT_GENERATED`"] + #[inline(always)] + pub fn is_not_generated(&self) -> bool { + *self == EVENTS_TXDRDY_A::NOT_GENERATED + } + #[doc = "Checks if the value of the field is `GENERATED`"] + #[inline(always)] + pub fn is_generated(&self) -> bool { + *self == EVENTS_TXDRDY_A::GENERATED + } +} +#[doc = "Field `EVENTS_TXDRDY` writer - Data sent from TXD"] +pub type EVENTS_TXDRDY_W<'a, const O: u8> = + crate::BitWriter<'a, u32, EVENTS_TXDRDY_SPEC, EVENTS_TXDRDY_A, O>; +impl<'a, const O: u8> EVENTS_TXDRDY_W<'a, O> { + #[doc = "Event not generated"] + #[inline(always)] + pub fn not_generated(self) -> &'a mut W { + self.variant(EVENTS_TXDRDY_A::NOT_GENERATED) + } + #[doc = "Event generated"] + #[inline(always)] + pub fn generated(self) -> &'a mut W { + self.variant(EVENTS_TXDRDY_A::GENERATED) + } +} +impl R { + #[doc = "Bit 0 - Data sent from TXD"] + #[inline(always)] + pub fn events_txdrdy(&self) -> EVENTS_TXDRDY_R { + EVENTS_TXDRDY_R::new((self.bits & 1) != 0) + } +} +impl W { + #[doc = "Bit 0 - Data sent from TXD"] + #[inline(always)] + #[must_use] + pub fn events_txdrdy(&mut self) -> EVENTS_TXDRDY_W<0> { + EVENTS_TXDRDY_W::new(self) + } + #[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 = "Data sent from TXD\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 [events_txdrdy](index.html) module"] +pub struct EVENTS_TXDRDY_SPEC; +impl crate::RegisterSpec for EVENTS_TXDRDY_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [events_txdrdy::R](R) reader structure"] +impl crate::Readable for EVENTS_TXDRDY_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [events_txdrdy::W](W) writer structure"] +impl crate::Writable for EVENTS_TXDRDY_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets EVENTS_TXDRDY to value 0"] +impl crate::Resettable for EVENTS_TXDRDY_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/uart0/intenclr.rs b/down-the-stack/dk_pac/src/uart0/intenclr.rs new file mode 100644 index 0000000..bb90331 --- /dev/null +++ b/down-the-stack/dk_pac/src/uart0/intenclr.rs @@ -0,0 +1,473 @@ +#[doc = "Register `INTENCLR` 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 `INTENCLR` 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 `CTS` reader - Write '1' to disable interrupt for event CTS"] +pub type CTS_R = crate::BitReader; +#[doc = "Write '1' to disable interrupt for event CTS\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum CTS_A { + #[doc = "0: Read: Disabled"] + DISABLED = 0, + #[doc = "1: Read: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: CTS_A) -> Self { + variant as u8 != 0 + } +} +impl CTS_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> CTS_A { + match self.bits { + false => CTS_A::DISABLED, + true => CTS_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == CTS_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == CTS_A::ENABLED + } +} +#[doc = "Write '1' to disable interrupt for event CTS\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum CTS_AW { + #[doc = "1: Disable"] + CLEAR = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: CTS_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `CTS` writer - Write '1' to disable interrupt for event CTS"] +pub type CTS_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENCLR_SPEC, CTS_AW, O>; +impl<'a, const O: u8> CTS_W<'a, O> { + #[doc = "Disable"] + #[inline(always)] + pub fn clear(self) -> &'a mut W { + self.variant(CTS_AW::CLEAR) + } +} +#[doc = "Field `NCTS` reader - Write '1' to disable interrupt for event NCTS"] +pub type NCTS_R = crate::BitReader; +#[doc = "Write '1' to disable interrupt for event NCTS\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum NCTS_A { + #[doc = "0: Read: Disabled"] + DISABLED = 0, + #[doc = "1: Read: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: NCTS_A) -> Self { + variant as u8 != 0 + } +} +impl NCTS_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> NCTS_A { + match self.bits { + false => NCTS_A::DISABLED, + true => NCTS_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == NCTS_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == NCTS_A::ENABLED + } +} +#[doc = "Write '1' to disable interrupt for event NCTS\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum NCTS_AW { + #[doc = "1: Disable"] + CLEAR = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: NCTS_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `NCTS` writer - Write '1' to disable interrupt for event NCTS"] +pub type NCTS_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENCLR_SPEC, NCTS_AW, O>; +impl<'a, const O: u8> NCTS_W<'a, O> { + #[doc = "Disable"] + #[inline(always)] + pub fn clear(self) -> &'a mut W { + self.variant(NCTS_AW::CLEAR) + } +} +#[doc = "Field `RXDRDY` reader - Write '1' to disable interrupt for event RXDRDY"] +pub type RXDRDY_R = crate::BitReader; +#[doc = "Write '1' to disable interrupt for event RXDRDY\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum RXDRDY_A { + #[doc = "0: Read: Disabled"] + DISABLED = 0, + #[doc = "1: Read: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: RXDRDY_A) -> Self { + variant as u8 != 0 + } +} +impl RXDRDY_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> RXDRDY_A { + match self.bits { + false => RXDRDY_A::DISABLED, + true => RXDRDY_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == RXDRDY_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == RXDRDY_A::ENABLED + } +} +#[doc = "Write '1' to disable interrupt for event RXDRDY\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum RXDRDY_AW { + #[doc = "1: Disable"] + CLEAR = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: RXDRDY_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `RXDRDY` writer - Write '1' to disable interrupt for event RXDRDY"] +pub type RXDRDY_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENCLR_SPEC, RXDRDY_AW, O>; +impl<'a, const O: u8> RXDRDY_W<'a, O> { + #[doc = "Disable"] + #[inline(always)] + pub fn clear(self) -> &'a mut W { + self.variant(RXDRDY_AW::CLEAR) + } +} +#[doc = "Field `TXDRDY` reader - Write '1' to disable interrupt for event TXDRDY"] +pub type TXDRDY_R = crate::BitReader; +#[doc = "Write '1' to disable interrupt for event TXDRDY\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum TXDRDY_A { + #[doc = "0: Read: Disabled"] + DISABLED = 0, + #[doc = "1: Read: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: TXDRDY_A) -> Self { + variant as u8 != 0 + } +} +impl TXDRDY_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> TXDRDY_A { + match self.bits { + false => TXDRDY_A::DISABLED, + true => TXDRDY_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == TXDRDY_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == TXDRDY_A::ENABLED + } +} +#[doc = "Write '1' to disable interrupt for event TXDRDY\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum TXDRDY_AW { + #[doc = "1: Disable"] + CLEAR = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: TXDRDY_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `TXDRDY` writer - Write '1' to disable interrupt for event TXDRDY"] +pub type TXDRDY_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENCLR_SPEC, TXDRDY_AW, O>; +impl<'a, const O: u8> TXDRDY_W<'a, O> { + #[doc = "Disable"] + #[inline(always)] + pub fn clear(self) -> &'a mut W { + self.variant(TXDRDY_AW::CLEAR) + } +} +#[doc = "Field `ERROR` reader - Write '1' to disable interrupt for event ERROR"] +pub type ERROR_R = crate::BitReader; +#[doc = "Write '1' to disable interrupt for event ERROR\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum ERROR_A { + #[doc = "0: Read: Disabled"] + DISABLED = 0, + #[doc = "1: Read: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: ERROR_A) -> Self { + variant as u8 != 0 + } +} +impl ERROR_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> ERROR_A { + match self.bits { + false => ERROR_A::DISABLED, + true => ERROR_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == ERROR_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == ERROR_A::ENABLED + } +} +#[doc = "Write '1' to disable interrupt for event ERROR\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum ERROR_AW { + #[doc = "1: Disable"] + CLEAR = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: ERROR_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `ERROR` writer - Write '1' to disable interrupt for event ERROR"] +pub type ERROR_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENCLR_SPEC, ERROR_AW, O>; +impl<'a, const O: u8> ERROR_W<'a, O> { + #[doc = "Disable"] + #[inline(always)] + pub fn clear(self) -> &'a mut W { + self.variant(ERROR_AW::CLEAR) + } +} +#[doc = "Field `RXTO` reader - Write '1' to disable interrupt for event RXTO"] +pub type RXTO_R = crate::BitReader; +#[doc = "Write '1' to disable interrupt for event RXTO\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum RXTO_A { + #[doc = "0: Read: Disabled"] + DISABLED = 0, + #[doc = "1: Read: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: RXTO_A) -> Self { + variant as u8 != 0 + } +} +impl RXTO_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> RXTO_A { + match self.bits { + false => RXTO_A::DISABLED, + true => RXTO_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == RXTO_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == RXTO_A::ENABLED + } +} +#[doc = "Write '1' to disable interrupt for event RXTO\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum RXTO_AW { + #[doc = "1: Disable"] + CLEAR = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: RXTO_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `RXTO` writer - Write '1' to disable interrupt for event RXTO"] +pub type RXTO_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENCLR_SPEC, RXTO_AW, O>; +impl<'a, const O: u8> RXTO_W<'a, O> { + #[doc = "Disable"] + #[inline(always)] + pub fn clear(self) -> &'a mut W { + self.variant(RXTO_AW::CLEAR) + } +} +impl R { + #[doc = "Bit 0 - Write '1' to disable interrupt for event CTS"] + #[inline(always)] + pub fn cts(&self) -> CTS_R { + CTS_R::new((self.bits & 1) != 0) + } + #[doc = "Bit 1 - Write '1' to disable interrupt for event NCTS"] + #[inline(always)] + pub fn ncts(&self) -> NCTS_R { + NCTS_R::new(((self.bits >> 1) & 1) != 0) + } + #[doc = "Bit 2 - Write '1' to disable interrupt for event RXDRDY"] + #[inline(always)] + pub fn rxdrdy(&self) -> RXDRDY_R { + RXDRDY_R::new(((self.bits >> 2) & 1) != 0) + } + #[doc = "Bit 7 - Write '1' to disable interrupt for event TXDRDY"] + #[inline(always)] + pub fn txdrdy(&self) -> TXDRDY_R { + TXDRDY_R::new(((self.bits >> 7) & 1) != 0) + } + #[doc = "Bit 9 - Write '1' to disable interrupt for event ERROR"] + #[inline(always)] + pub fn error(&self) -> ERROR_R { + ERROR_R::new(((self.bits >> 9) & 1) != 0) + } + #[doc = "Bit 17 - Write '1' to disable interrupt for event RXTO"] + #[inline(always)] + pub fn rxto(&self) -> RXTO_R { + RXTO_R::new(((self.bits >> 17) & 1) != 0) + } +} +impl W { + #[doc = "Bit 0 - Write '1' to disable interrupt for event CTS"] + #[inline(always)] + #[must_use] + pub fn cts(&mut self) -> CTS_W<0> { + CTS_W::new(self) + } + #[doc = "Bit 1 - Write '1' to disable interrupt for event NCTS"] + #[inline(always)] + #[must_use] + pub fn ncts(&mut self) -> NCTS_W<1> { + NCTS_W::new(self) + } + #[doc = "Bit 2 - Write '1' to disable interrupt for event RXDRDY"] + #[inline(always)] + #[must_use] + pub fn rxdrdy(&mut self) -> RXDRDY_W<2> { + RXDRDY_W::new(self) + } + #[doc = "Bit 7 - Write '1' to disable interrupt for event TXDRDY"] + #[inline(always)] + #[must_use] + pub fn txdrdy(&mut self) -> TXDRDY_W<7> { + TXDRDY_W::new(self) + } + #[doc = "Bit 9 - Write '1' to disable interrupt for event ERROR"] + #[inline(always)] + #[must_use] + pub fn error(&mut self) -> ERROR_W<9> { + ERROR_W::new(self) + } + #[doc = "Bit 17 - Write '1' to disable interrupt for event RXTO"] + #[inline(always)] + #[must_use] + pub fn rxto(&mut self) -> RXTO_W<17> { + RXTO_W::new(self) + } + #[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 = "Disable interrupt\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 [intenclr](index.html) module"] +pub struct INTENCLR_SPEC; +impl crate::RegisterSpec for INTENCLR_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [intenclr::R](R) reader structure"] +impl crate::Readable for INTENCLR_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [intenclr::W](W) writer structure"] +impl crate::Writable for INTENCLR_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets INTENCLR to value 0"] +impl crate::Resettable for INTENCLR_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/uart0/intenset.rs b/down-the-stack/dk_pac/src/uart0/intenset.rs new file mode 100644 index 0000000..4a2ddfc --- /dev/null +++ b/down-the-stack/dk_pac/src/uart0/intenset.rs @@ -0,0 +1,473 @@ +#[doc = "Register `INTENSET` 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 `INTENSET` 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 `CTS` reader - Write '1' to enable interrupt for event CTS"] +pub type CTS_R = crate::BitReader; +#[doc = "Write '1' to enable interrupt for event CTS\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum CTS_A { + #[doc = "0: Read: Disabled"] + DISABLED = 0, + #[doc = "1: Read: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: CTS_A) -> Self { + variant as u8 != 0 + } +} +impl CTS_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> CTS_A { + match self.bits { + false => CTS_A::DISABLED, + true => CTS_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == CTS_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == CTS_A::ENABLED + } +} +#[doc = "Write '1' to enable interrupt for event CTS\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum CTS_AW { + #[doc = "1: Enable"] + SET = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: CTS_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `CTS` writer - Write '1' to enable interrupt for event CTS"] +pub type CTS_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENSET_SPEC, CTS_AW, O>; +impl<'a, const O: u8> CTS_W<'a, O> { + #[doc = "Enable"] + #[inline(always)] + pub fn set(self) -> &'a mut W { + self.variant(CTS_AW::SET) + } +} +#[doc = "Field `NCTS` reader - Write '1' to enable interrupt for event NCTS"] +pub type NCTS_R = crate::BitReader; +#[doc = "Write '1' to enable interrupt for event NCTS\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum NCTS_A { + #[doc = "0: Read: Disabled"] + DISABLED = 0, + #[doc = "1: Read: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: NCTS_A) -> Self { + variant as u8 != 0 + } +} +impl NCTS_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> NCTS_A { + match self.bits { + false => NCTS_A::DISABLED, + true => NCTS_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == NCTS_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == NCTS_A::ENABLED + } +} +#[doc = "Write '1' to enable interrupt for event NCTS\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum NCTS_AW { + #[doc = "1: Enable"] + SET = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: NCTS_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `NCTS` writer - Write '1' to enable interrupt for event NCTS"] +pub type NCTS_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENSET_SPEC, NCTS_AW, O>; +impl<'a, const O: u8> NCTS_W<'a, O> { + #[doc = "Enable"] + #[inline(always)] + pub fn set(self) -> &'a mut W { + self.variant(NCTS_AW::SET) + } +} +#[doc = "Field `RXDRDY` reader - Write '1' to enable interrupt for event RXDRDY"] +pub type RXDRDY_R = crate::BitReader; +#[doc = "Write '1' to enable interrupt for event RXDRDY\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum RXDRDY_A { + #[doc = "0: Read: Disabled"] + DISABLED = 0, + #[doc = "1: Read: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: RXDRDY_A) -> Self { + variant as u8 != 0 + } +} +impl RXDRDY_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> RXDRDY_A { + match self.bits { + false => RXDRDY_A::DISABLED, + true => RXDRDY_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == RXDRDY_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == RXDRDY_A::ENABLED + } +} +#[doc = "Write '1' to enable interrupt for event RXDRDY\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum RXDRDY_AW { + #[doc = "1: Enable"] + SET = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: RXDRDY_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `RXDRDY` writer - Write '1' to enable interrupt for event RXDRDY"] +pub type RXDRDY_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENSET_SPEC, RXDRDY_AW, O>; +impl<'a, const O: u8> RXDRDY_W<'a, O> { + #[doc = "Enable"] + #[inline(always)] + pub fn set(self) -> &'a mut W { + self.variant(RXDRDY_AW::SET) + } +} +#[doc = "Field `TXDRDY` reader - Write '1' to enable interrupt for event TXDRDY"] +pub type TXDRDY_R = crate::BitReader; +#[doc = "Write '1' to enable interrupt for event TXDRDY\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum TXDRDY_A { + #[doc = "0: Read: Disabled"] + DISABLED = 0, + #[doc = "1: Read: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: TXDRDY_A) -> Self { + variant as u8 != 0 + } +} +impl TXDRDY_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> TXDRDY_A { + match self.bits { + false => TXDRDY_A::DISABLED, + true => TXDRDY_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == TXDRDY_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == TXDRDY_A::ENABLED + } +} +#[doc = "Write '1' to enable interrupt for event TXDRDY\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum TXDRDY_AW { + #[doc = "1: Enable"] + SET = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: TXDRDY_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `TXDRDY` writer - Write '1' to enable interrupt for event TXDRDY"] +pub type TXDRDY_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENSET_SPEC, TXDRDY_AW, O>; +impl<'a, const O: u8> TXDRDY_W<'a, O> { + #[doc = "Enable"] + #[inline(always)] + pub fn set(self) -> &'a mut W { + self.variant(TXDRDY_AW::SET) + } +} +#[doc = "Field `ERROR` reader - Write '1' to enable interrupt for event ERROR"] +pub type ERROR_R = crate::BitReader; +#[doc = "Write '1' to enable interrupt for event ERROR\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum ERROR_A { + #[doc = "0: Read: Disabled"] + DISABLED = 0, + #[doc = "1: Read: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: ERROR_A) -> Self { + variant as u8 != 0 + } +} +impl ERROR_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> ERROR_A { + match self.bits { + false => ERROR_A::DISABLED, + true => ERROR_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == ERROR_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == ERROR_A::ENABLED + } +} +#[doc = "Write '1' to enable interrupt for event ERROR\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum ERROR_AW { + #[doc = "1: Enable"] + SET = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: ERROR_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `ERROR` writer - Write '1' to enable interrupt for event ERROR"] +pub type ERROR_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENSET_SPEC, ERROR_AW, O>; +impl<'a, const O: u8> ERROR_W<'a, O> { + #[doc = "Enable"] + #[inline(always)] + pub fn set(self) -> &'a mut W { + self.variant(ERROR_AW::SET) + } +} +#[doc = "Field `RXTO` reader - Write '1' to enable interrupt for event RXTO"] +pub type RXTO_R = crate::BitReader; +#[doc = "Write '1' to enable interrupt for event RXTO\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum RXTO_A { + #[doc = "0: Read: Disabled"] + DISABLED = 0, + #[doc = "1: Read: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: RXTO_A) -> Self { + variant as u8 != 0 + } +} +impl RXTO_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> RXTO_A { + match self.bits { + false => RXTO_A::DISABLED, + true => RXTO_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == RXTO_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == RXTO_A::ENABLED + } +} +#[doc = "Write '1' to enable interrupt for event RXTO\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum RXTO_AW { + #[doc = "1: Enable"] + SET = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: RXTO_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `RXTO` writer - Write '1' to enable interrupt for event RXTO"] +pub type RXTO_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENSET_SPEC, RXTO_AW, O>; +impl<'a, const O: u8> RXTO_W<'a, O> { + #[doc = "Enable"] + #[inline(always)] + pub fn set(self) -> &'a mut W { + self.variant(RXTO_AW::SET) + } +} +impl R { + #[doc = "Bit 0 - Write '1' to enable interrupt for event CTS"] + #[inline(always)] + pub fn cts(&self) -> CTS_R { + CTS_R::new((self.bits & 1) != 0) + } + #[doc = "Bit 1 - Write '1' to enable interrupt for event NCTS"] + #[inline(always)] + pub fn ncts(&self) -> NCTS_R { + NCTS_R::new(((self.bits >> 1) & 1) != 0) + } + #[doc = "Bit 2 - Write '1' to enable interrupt for event RXDRDY"] + #[inline(always)] + pub fn rxdrdy(&self) -> RXDRDY_R { + RXDRDY_R::new(((self.bits >> 2) & 1) != 0) + } + #[doc = "Bit 7 - Write '1' to enable interrupt for event TXDRDY"] + #[inline(always)] + pub fn txdrdy(&self) -> TXDRDY_R { + TXDRDY_R::new(((self.bits >> 7) & 1) != 0) + } + #[doc = "Bit 9 - Write '1' to enable interrupt for event ERROR"] + #[inline(always)] + pub fn error(&self) -> ERROR_R { + ERROR_R::new(((self.bits >> 9) & 1) != 0) + } + #[doc = "Bit 17 - Write '1' to enable interrupt for event RXTO"] + #[inline(always)] + pub fn rxto(&self) -> RXTO_R { + RXTO_R::new(((self.bits >> 17) & 1) != 0) + } +} +impl W { + #[doc = "Bit 0 - Write '1' to enable interrupt for event CTS"] + #[inline(always)] + #[must_use] + pub fn cts(&mut self) -> CTS_W<0> { + CTS_W::new(self) + } + #[doc = "Bit 1 - Write '1' to enable interrupt for event NCTS"] + #[inline(always)] + #[must_use] + pub fn ncts(&mut self) -> NCTS_W<1> { + NCTS_W::new(self) + } + #[doc = "Bit 2 - Write '1' to enable interrupt for event RXDRDY"] + #[inline(always)] + #[must_use] + pub fn rxdrdy(&mut self) -> RXDRDY_W<2> { + RXDRDY_W::new(self) + } + #[doc = "Bit 7 - Write '1' to enable interrupt for event TXDRDY"] + #[inline(always)] + #[must_use] + pub fn txdrdy(&mut self) -> TXDRDY_W<7> { + TXDRDY_W::new(self) + } + #[doc = "Bit 9 - Write '1' to enable interrupt for event ERROR"] + #[inline(always)] + #[must_use] + pub fn error(&mut self) -> ERROR_W<9> { + ERROR_W::new(self) + } + #[doc = "Bit 17 - Write '1' to enable interrupt for event RXTO"] + #[inline(always)] + #[must_use] + pub fn rxto(&mut self) -> RXTO_W<17> { + RXTO_W::new(self) + } + #[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 = "Enable interrupt\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 [intenset](index.html) module"] +pub struct INTENSET_SPEC; +impl crate::RegisterSpec for INTENSET_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [intenset::R](R) reader structure"] +impl crate::Readable for INTENSET_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [intenset::W](W) writer structure"] +impl crate::Writable for INTENSET_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets INTENSET to value 0"] +impl crate::Resettable for INTENSET_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/uart0/pselcts.rs b/down-the-stack/dk_pac/src/uart0/pselcts.rs new file mode 100644 index 0000000..572b752 --- /dev/null +++ b/down-the-stack/dk_pac/src/uart0/pselcts.rs @@ -0,0 +1,116 @@ +#[doc = "Register `PSELCTS` 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 `PSELCTS` 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 `PSELCTS` reader - Pin number configuration for UART CTS signal"] +pub type PSELCTS_R = crate::FieldReader; +#[doc = "Pin number configuration for UART CTS signal\n\nValue on reset: 4294967295"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +#[repr(u32)] +pub enum PSELCTS_A { + #[doc = "4294967295: Disconnect"] + DISCONNECTED = 4294967295, +} +impl From for u32 { + #[inline(always)] + fn from(variant: PSELCTS_A) -> Self { + variant as _ + } +} +impl PSELCTS_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> Option { + match self.bits { + 4294967295 => Some(PSELCTS_A::DISCONNECTED), + _ => None, + } + } + #[doc = "Checks if the value of the field is `DISCONNECTED`"] + #[inline(always)] + pub fn is_disconnected(&self) -> bool { + *self == PSELCTS_A::DISCONNECTED + } +} +#[doc = "Field `PSELCTS` writer - Pin number configuration for UART CTS signal"] +pub type PSELCTS_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, PSELCTS_SPEC, u32, PSELCTS_A, 32, O>; +impl<'a, const O: u8> PSELCTS_W<'a, O> { + #[doc = "Disconnect"] + #[inline(always)] + pub fn disconnected(self) -> &'a mut W { + self.variant(PSELCTS_A::DISCONNECTED) + } +} +impl R { + #[doc = "Bits 0:31 - Pin number configuration for UART CTS signal"] + #[inline(always)] + pub fn pselcts(&self) -> PSELCTS_R { + PSELCTS_R::new(self.bits) + } +} +impl W { + #[doc = "Bits 0:31 - Pin number configuration for UART CTS signal"] + #[inline(always)] + #[must_use] + pub fn pselcts(&mut self) -> PSELCTS_W<0> { + PSELCTS_W::new(self) + } + #[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 = "Pin select for CTS\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 [pselcts](index.html) module"] +pub struct PSELCTS_SPEC; +impl crate::RegisterSpec for PSELCTS_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [pselcts::R](R) reader structure"] +impl crate::Readable for PSELCTS_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [pselcts::W](W) writer structure"] +impl crate::Writable for PSELCTS_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets PSELCTS to value 0xffff_ffff"] +impl crate::Resettable for PSELCTS_SPEC { + const RESET_VALUE: Self::Ux = 0xffff_ffff; +} diff --git a/down-the-stack/dk_pac/src/uart0/pselrts.rs b/down-the-stack/dk_pac/src/uart0/pselrts.rs new file mode 100644 index 0000000..8f7d403 --- /dev/null +++ b/down-the-stack/dk_pac/src/uart0/pselrts.rs @@ -0,0 +1,116 @@ +#[doc = "Register `PSELRTS` 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 `PSELRTS` 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 `PSELRTS` reader - Pin number configuration for UART RTS signal"] +pub type PSELRTS_R = crate::FieldReader; +#[doc = "Pin number configuration for UART RTS signal\n\nValue on reset: 4294967295"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +#[repr(u32)] +pub enum PSELRTS_A { + #[doc = "4294967295: Disconnect"] + DISCONNECTED = 4294967295, +} +impl From for u32 { + #[inline(always)] + fn from(variant: PSELRTS_A) -> Self { + variant as _ + } +} +impl PSELRTS_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> Option { + match self.bits { + 4294967295 => Some(PSELRTS_A::DISCONNECTED), + _ => None, + } + } + #[doc = "Checks if the value of the field is `DISCONNECTED`"] + #[inline(always)] + pub fn is_disconnected(&self) -> bool { + *self == PSELRTS_A::DISCONNECTED + } +} +#[doc = "Field `PSELRTS` writer - Pin number configuration for UART RTS signal"] +pub type PSELRTS_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, PSELRTS_SPEC, u32, PSELRTS_A, 32, O>; +impl<'a, const O: u8> PSELRTS_W<'a, O> { + #[doc = "Disconnect"] + #[inline(always)] + pub fn disconnected(self) -> &'a mut W { + self.variant(PSELRTS_A::DISCONNECTED) + } +} +impl R { + #[doc = "Bits 0:31 - Pin number configuration for UART RTS signal"] + #[inline(always)] + pub fn pselrts(&self) -> PSELRTS_R { + PSELRTS_R::new(self.bits) + } +} +impl W { + #[doc = "Bits 0:31 - Pin number configuration for UART RTS signal"] + #[inline(always)] + #[must_use] + pub fn pselrts(&mut self) -> PSELRTS_W<0> { + PSELRTS_W::new(self) + } + #[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 = "Pin select for RTS\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 [pselrts](index.html) module"] +pub struct PSELRTS_SPEC; +impl crate::RegisterSpec for PSELRTS_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [pselrts::R](R) reader structure"] +impl crate::Readable for PSELRTS_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [pselrts::W](W) writer structure"] +impl crate::Writable for PSELRTS_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets PSELRTS to value 0xffff_ffff"] +impl crate::Resettable for PSELRTS_SPEC { + const RESET_VALUE: Self::Ux = 0xffff_ffff; +} diff --git a/down-the-stack/dk_pac/src/uart0/pselrxd.rs b/down-the-stack/dk_pac/src/uart0/pselrxd.rs new file mode 100644 index 0000000..9915569 --- /dev/null +++ b/down-the-stack/dk_pac/src/uart0/pselrxd.rs @@ -0,0 +1,116 @@ +#[doc = "Register `PSELRXD` 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 `PSELRXD` 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 `PSELRXD` reader - Pin number configuration for UART RXD signal"] +pub type PSELRXD_R = crate::FieldReader; +#[doc = "Pin number configuration for UART RXD signal\n\nValue on reset: 4294967295"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +#[repr(u32)] +pub enum PSELRXD_A { + #[doc = "4294967295: Disconnect"] + DISCONNECTED = 4294967295, +} +impl From for u32 { + #[inline(always)] + fn from(variant: PSELRXD_A) -> Self { + variant as _ + } +} +impl PSELRXD_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> Option { + match self.bits { + 4294967295 => Some(PSELRXD_A::DISCONNECTED), + _ => None, + } + } + #[doc = "Checks if the value of the field is `DISCONNECTED`"] + #[inline(always)] + pub fn is_disconnected(&self) -> bool { + *self == PSELRXD_A::DISCONNECTED + } +} +#[doc = "Field `PSELRXD` writer - Pin number configuration for UART RXD signal"] +pub type PSELRXD_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, PSELRXD_SPEC, u32, PSELRXD_A, 32, O>; +impl<'a, const O: u8> PSELRXD_W<'a, O> { + #[doc = "Disconnect"] + #[inline(always)] + pub fn disconnected(self) -> &'a mut W { + self.variant(PSELRXD_A::DISCONNECTED) + } +} +impl R { + #[doc = "Bits 0:31 - Pin number configuration for UART RXD signal"] + #[inline(always)] + pub fn pselrxd(&self) -> PSELRXD_R { + PSELRXD_R::new(self.bits) + } +} +impl W { + #[doc = "Bits 0:31 - Pin number configuration for UART RXD signal"] + #[inline(always)] + #[must_use] + pub fn pselrxd(&mut self) -> PSELRXD_W<0> { + PSELRXD_W::new(self) + } + #[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 = "Pin select for RXD\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 [pselrxd](index.html) module"] +pub struct PSELRXD_SPEC; +impl crate::RegisterSpec for PSELRXD_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [pselrxd::R](R) reader structure"] +impl crate::Readable for PSELRXD_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [pselrxd::W](W) writer structure"] +impl crate::Writable for PSELRXD_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets PSELRXD to value 0xffff_ffff"] +impl crate::Resettable for PSELRXD_SPEC { + const RESET_VALUE: Self::Ux = 0xffff_ffff; +} diff --git a/down-the-stack/dk_pac/src/uart0/pseltxd.rs b/down-the-stack/dk_pac/src/uart0/pseltxd.rs new file mode 100644 index 0000000..f4262fc --- /dev/null +++ b/down-the-stack/dk_pac/src/uart0/pseltxd.rs @@ -0,0 +1,116 @@ +#[doc = "Register `PSELTXD` 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 `PSELTXD` 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 `PSELTXD` reader - Pin number configuration for UART TXD signal"] +pub type PSELTXD_R = crate::FieldReader; +#[doc = "Pin number configuration for UART TXD signal\n\nValue on reset: 4294967295"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +#[repr(u32)] +pub enum PSELTXD_A { + #[doc = "4294967295: Disconnect"] + DISCONNECTED = 4294967295, +} +impl From for u32 { + #[inline(always)] + fn from(variant: PSELTXD_A) -> Self { + variant as _ + } +} +impl PSELTXD_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> Option { + match self.bits { + 4294967295 => Some(PSELTXD_A::DISCONNECTED), + _ => None, + } + } + #[doc = "Checks if the value of the field is `DISCONNECTED`"] + #[inline(always)] + pub fn is_disconnected(&self) -> bool { + *self == PSELTXD_A::DISCONNECTED + } +} +#[doc = "Field `PSELTXD` writer - Pin number configuration for UART TXD signal"] +pub type PSELTXD_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, PSELTXD_SPEC, u32, PSELTXD_A, 32, O>; +impl<'a, const O: u8> PSELTXD_W<'a, O> { + #[doc = "Disconnect"] + #[inline(always)] + pub fn disconnected(self) -> &'a mut W { + self.variant(PSELTXD_A::DISCONNECTED) + } +} +impl R { + #[doc = "Bits 0:31 - Pin number configuration for UART TXD signal"] + #[inline(always)] + pub fn pseltxd(&self) -> PSELTXD_R { + PSELTXD_R::new(self.bits) + } +} +impl W { + #[doc = "Bits 0:31 - Pin number configuration for UART TXD signal"] + #[inline(always)] + #[must_use] + pub fn pseltxd(&mut self) -> PSELTXD_W<0> { + PSELTXD_W::new(self) + } + #[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 = "Pin select for TXD\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 [pseltxd](index.html) module"] +pub struct PSELTXD_SPEC; +impl crate::RegisterSpec for PSELTXD_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [pseltxd::R](R) reader structure"] +impl crate::Readable for PSELTXD_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [pseltxd::W](W) writer structure"] +impl crate::Writable for PSELTXD_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets PSELTXD to value 0xffff_ffff"] +impl crate::Resettable for PSELTXD_SPEC { + const RESET_VALUE: Self::Ux = 0xffff_ffff; +} diff --git a/down-the-stack/dk_pac/src/uart0/rxd.rs b/down-the-stack/dk_pac/src/uart0/rxd.rs new file mode 100644 index 0000000..d638f3e --- /dev/null +++ b/down-the-stack/dk_pac/src/uart0/rxd.rs @@ -0,0 +1,37 @@ +#[doc = "Register `RXD` 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 = "Field `RXD` reader - RX data received in previous transfers, double buffered"] +pub type RXD_R = crate::FieldReader; +impl R { + #[doc = "Bits 0:7 - RX data received in previous transfers, double buffered"] + #[inline(always)] + pub fn rxd(&self) -> RXD_R { + RXD_R::new((self.bits & 0xff) as u8) + } +} +#[doc = "RXD register\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 [rxd](index.html) module"] +pub struct RXD_SPEC; +impl crate::RegisterSpec for RXD_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [rxd::R](R) reader structure"] +impl crate::Readable for RXD_SPEC { + type Reader = R; +} +#[doc = "`reset()` method sets RXD to value 0"] +impl crate::Resettable for RXD_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/uart0/shorts.rs b/down-the-stack/dk_pac/src/uart0/shorts.rs new file mode 100644 index 0000000..a2cd872 --- /dev/null +++ b/down-the-stack/dk_pac/src/uart0/shorts.rs @@ -0,0 +1,187 @@ +#[doc = "Register `SHORTS` 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 `SHORTS` 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 `CTS_STARTRX` reader - Shortcut between event CTS and task STARTRX"] +pub type CTS_STARTRX_R = crate::BitReader; +#[doc = "Shortcut between event CTS and task STARTRX\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum CTS_STARTRX_A { + #[doc = "0: Disable shortcut"] + DISABLED = 0, + #[doc = "1: Enable shortcut"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: CTS_STARTRX_A) -> Self { + variant as u8 != 0 + } +} +impl CTS_STARTRX_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> CTS_STARTRX_A { + match self.bits { + false => CTS_STARTRX_A::DISABLED, + true => CTS_STARTRX_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == CTS_STARTRX_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == CTS_STARTRX_A::ENABLED + } +} +#[doc = "Field `CTS_STARTRX` writer - Shortcut between event CTS and task STARTRX"] +pub type CTS_STARTRX_W<'a, const O: u8> = crate::BitWriter<'a, u32, SHORTS_SPEC, CTS_STARTRX_A, O>; +impl<'a, const O: u8> CTS_STARTRX_W<'a, O> { + #[doc = "Disable shortcut"] + #[inline(always)] + pub fn disabled(self) -> &'a mut W { + self.variant(CTS_STARTRX_A::DISABLED) + } + #[doc = "Enable shortcut"] + #[inline(always)] + pub fn enabled(self) -> &'a mut W { + self.variant(CTS_STARTRX_A::ENABLED) + } +} +#[doc = "Field `NCTS_STOPRX` reader - Shortcut between event NCTS and task STOPRX"] +pub type NCTS_STOPRX_R = crate::BitReader; +#[doc = "Shortcut between event NCTS and task STOPRX\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum NCTS_STOPRX_A { + #[doc = "0: Disable shortcut"] + DISABLED = 0, + #[doc = "1: Enable shortcut"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: NCTS_STOPRX_A) -> Self { + variant as u8 != 0 + } +} +impl NCTS_STOPRX_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> NCTS_STOPRX_A { + match self.bits { + false => NCTS_STOPRX_A::DISABLED, + true => NCTS_STOPRX_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == NCTS_STOPRX_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == NCTS_STOPRX_A::ENABLED + } +} +#[doc = "Field `NCTS_STOPRX` writer - Shortcut between event NCTS and task STOPRX"] +pub type NCTS_STOPRX_W<'a, const O: u8> = crate::BitWriter<'a, u32, SHORTS_SPEC, NCTS_STOPRX_A, O>; +impl<'a, const O: u8> NCTS_STOPRX_W<'a, O> { + #[doc = "Disable shortcut"] + #[inline(always)] + pub fn disabled(self) -> &'a mut W { + self.variant(NCTS_STOPRX_A::DISABLED) + } + #[doc = "Enable shortcut"] + #[inline(always)] + pub fn enabled(self) -> &'a mut W { + self.variant(NCTS_STOPRX_A::ENABLED) + } +} +impl R { + #[doc = "Bit 3 - Shortcut between event CTS and task STARTRX"] + #[inline(always)] + pub fn cts_startrx(&self) -> CTS_STARTRX_R { + CTS_STARTRX_R::new(((self.bits >> 3) & 1) != 0) + } + #[doc = "Bit 4 - Shortcut between event NCTS and task STOPRX"] + #[inline(always)] + pub fn ncts_stoprx(&self) -> NCTS_STOPRX_R { + NCTS_STOPRX_R::new(((self.bits >> 4) & 1) != 0) + } +} +impl W { + #[doc = "Bit 3 - Shortcut between event CTS and task STARTRX"] + #[inline(always)] + #[must_use] + pub fn cts_startrx(&mut self) -> CTS_STARTRX_W<3> { + CTS_STARTRX_W::new(self) + } + #[doc = "Bit 4 - Shortcut between event NCTS and task STOPRX"] + #[inline(always)] + #[must_use] + pub fn ncts_stoprx(&mut self) -> NCTS_STOPRX_W<4> { + NCTS_STOPRX_W::new(self) + } + #[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 = "Shortcuts between local events and tasks\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 [shorts](index.html) module"] +pub struct SHORTS_SPEC; +impl crate::RegisterSpec for SHORTS_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [shorts::R](R) reader structure"] +impl crate::Readable for SHORTS_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [shorts::W](W) writer structure"] +impl crate::Writable for SHORTS_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets SHORTS to value 0"] +impl crate::Resettable for SHORTS_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/uart0/tasks_startrx.rs b/down-the-stack/dk_pac/src/uart0/tasks_startrx.rs new file mode 100644 index 0000000..ec611e2 --- /dev/null +++ b/down-the-stack/dk_pac/src/uart0/tasks_startrx.rs @@ -0,0 +1,72 @@ +#[doc = "Register `TASKS_STARTRX` 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 = "Start UART receiver\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum TASKS_STARTRX_AW { + #[doc = "1: Trigger task"] + TRIGGER = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: TASKS_STARTRX_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `TASKS_STARTRX` writer - Start UART receiver"] +pub type TASKS_STARTRX_W<'a, const O: u8> = + crate::BitWriter<'a, u32, TASKS_STARTRX_SPEC, TASKS_STARTRX_AW, O>; +impl<'a, const O: u8> TASKS_STARTRX_W<'a, O> { + #[doc = "Trigger task"] + #[inline(always)] + pub fn trigger(self) -> &'a mut W { + self.variant(TASKS_STARTRX_AW::TRIGGER) + } +} +impl W { + #[doc = "Bit 0 - Start UART receiver"] + #[inline(always)] + #[must_use] + pub fn tasks_startrx(&mut self) -> TASKS_STARTRX_W<0> { + TASKS_STARTRX_W::new(self) + } + #[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 = "Start UART receiver\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 [tasks_startrx](index.html) module"] +pub struct TASKS_STARTRX_SPEC; +impl crate::RegisterSpec for TASKS_STARTRX_SPEC { + type Ux = u32; +} +#[doc = "`write(|w| ..)` method takes [tasks_startrx::W](W) writer structure"] +impl crate::Writable for TASKS_STARTRX_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets TASKS_STARTRX to value 0"] +impl crate::Resettable for TASKS_STARTRX_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/uart0/tasks_starttx.rs b/down-the-stack/dk_pac/src/uart0/tasks_starttx.rs new file mode 100644 index 0000000..de5aa37 --- /dev/null +++ b/down-the-stack/dk_pac/src/uart0/tasks_starttx.rs @@ -0,0 +1,72 @@ +#[doc = "Register `TASKS_STARTTX` 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 = "Start UART transmitter\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum TASKS_STARTTX_AW { + #[doc = "1: Trigger task"] + TRIGGER = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: TASKS_STARTTX_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `TASKS_STARTTX` writer - Start UART transmitter"] +pub type TASKS_STARTTX_W<'a, const O: u8> = + crate::BitWriter<'a, u32, TASKS_STARTTX_SPEC, TASKS_STARTTX_AW, O>; +impl<'a, const O: u8> TASKS_STARTTX_W<'a, O> { + #[doc = "Trigger task"] + #[inline(always)] + pub fn trigger(self) -> &'a mut W { + self.variant(TASKS_STARTTX_AW::TRIGGER) + } +} +impl W { + #[doc = "Bit 0 - Start UART transmitter"] + #[inline(always)] + #[must_use] + pub fn tasks_starttx(&mut self) -> TASKS_STARTTX_W<0> { + TASKS_STARTTX_W::new(self) + } + #[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 = "Start UART transmitter\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 [tasks_starttx](index.html) module"] +pub struct TASKS_STARTTX_SPEC; +impl crate::RegisterSpec for TASKS_STARTTX_SPEC { + type Ux = u32; +} +#[doc = "`write(|w| ..)` method takes [tasks_starttx::W](W) writer structure"] +impl crate::Writable for TASKS_STARTTX_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets TASKS_STARTTX to value 0"] +impl crate::Resettable for TASKS_STARTTX_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/uart0/tasks_stoprx.rs b/down-the-stack/dk_pac/src/uart0/tasks_stoprx.rs new file mode 100644 index 0000000..306c0e0 --- /dev/null +++ b/down-the-stack/dk_pac/src/uart0/tasks_stoprx.rs @@ -0,0 +1,72 @@ +#[doc = "Register `TASKS_STOPRX` 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 = "Stop UART receiver\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum TASKS_STOPRX_AW { + #[doc = "1: Trigger task"] + TRIGGER = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: TASKS_STOPRX_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `TASKS_STOPRX` writer - Stop UART receiver"] +pub type TASKS_STOPRX_W<'a, const O: u8> = + crate::BitWriter<'a, u32, TASKS_STOPRX_SPEC, TASKS_STOPRX_AW, O>; +impl<'a, const O: u8> TASKS_STOPRX_W<'a, O> { + #[doc = "Trigger task"] + #[inline(always)] + pub fn trigger(self) -> &'a mut W { + self.variant(TASKS_STOPRX_AW::TRIGGER) + } +} +impl W { + #[doc = "Bit 0 - Stop UART receiver"] + #[inline(always)] + #[must_use] + pub fn tasks_stoprx(&mut self) -> TASKS_STOPRX_W<0> { + TASKS_STOPRX_W::new(self) + } + #[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 = "Stop UART receiver\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 [tasks_stoprx](index.html) module"] +pub struct TASKS_STOPRX_SPEC; +impl crate::RegisterSpec for TASKS_STOPRX_SPEC { + type Ux = u32; +} +#[doc = "`write(|w| ..)` method takes [tasks_stoprx::W](W) writer structure"] +impl crate::Writable for TASKS_STOPRX_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets TASKS_STOPRX to value 0"] +impl crate::Resettable for TASKS_STOPRX_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/uart0/tasks_stoptx.rs b/down-the-stack/dk_pac/src/uart0/tasks_stoptx.rs new file mode 100644 index 0000000..5c99eef --- /dev/null +++ b/down-the-stack/dk_pac/src/uart0/tasks_stoptx.rs @@ -0,0 +1,72 @@ +#[doc = "Register `TASKS_STOPTX` 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 = "Stop UART transmitter\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum TASKS_STOPTX_AW { + #[doc = "1: Trigger task"] + TRIGGER = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: TASKS_STOPTX_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `TASKS_STOPTX` writer - Stop UART transmitter"] +pub type TASKS_STOPTX_W<'a, const O: u8> = + crate::BitWriter<'a, u32, TASKS_STOPTX_SPEC, TASKS_STOPTX_AW, O>; +impl<'a, const O: u8> TASKS_STOPTX_W<'a, O> { + #[doc = "Trigger task"] + #[inline(always)] + pub fn trigger(self) -> &'a mut W { + self.variant(TASKS_STOPTX_AW::TRIGGER) + } +} +impl W { + #[doc = "Bit 0 - Stop UART transmitter"] + #[inline(always)] + #[must_use] + pub fn tasks_stoptx(&mut self) -> TASKS_STOPTX_W<0> { + TASKS_STOPTX_W::new(self) + } + #[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 = "Stop UART transmitter\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 [tasks_stoptx](index.html) module"] +pub struct TASKS_STOPTX_SPEC; +impl crate::RegisterSpec for TASKS_STOPTX_SPEC { + type Ux = u32; +} +#[doc = "`write(|w| ..)` method takes [tasks_stoptx::W](W) writer structure"] +impl crate::Writable for TASKS_STOPTX_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets TASKS_STOPTX to value 0"] +impl crate::Resettable for TASKS_STOPTX_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/uart0/tasks_suspend.rs b/down-the-stack/dk_pac/src/uart0/tasks_suspend.rs new file mode 100644 index 0000000..c088472 --- /dev/null +++ b/down-the-stack/dk_pac/src/uart0/tasks_suspend.rs @@ -0,0 +1,72 @@ +#[doc = "Register `TASKS_SUSPEND` 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 = "Suspend UART\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum TASKS_SUSPEND_AW { + #[doc = "1: Trigger task"] + TRIGGER = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: TASKS_SUSPEND_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `TASKS_SUSPEND` writer - Suspend UART"] +pub type TASKS_SUSPEND_W<'a, const O: u8> = + crate::BitWriter<'a, u32, TASKS_SUSPEND_SPEC, TASKS_SUSPEND_AW, O>; +impl<'a, const O: u8> TASKS_SUSPEND_W<'a, O> { + #[doc = "Trigger task"] + #[inline(always)] + pub fn trigger(self) -> &'a mut W { + self.variant(TASKS_SUSPEND_AW::TRIGGER) + } +} +impl W { + #[doc = "Bit 0 - Suspend UART"] + #[inline(always)] + #[must_use] + pub fn tasks_suspend(&mut self) -> TASKS_SUSPEND_W<0> { + TASKS_SUSPEND_W::new(self) + } + #[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 = "Suspend UART\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 [tasks_suspend](index.html) module"] +pub struct TASKS_SUSPEND_SPEC; +impl crate::RegisterSpec for TASKS_SUSPEND_SPEC { + type Ux = u32; +} +#[doc = "`write(|w| ..)` method takes [tasks_suspend::W](W) writer structure"] +impl crate::Writable for TASKS_SUSPEND_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets TASKS_SUSPEND to value 0"] +impl crate::Resettable for TASKS_SUSPEND_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/uart0/txd.rs b/down-the-stack/dk_pac/src/uart0/txd.rs new file mode 100644 index 0000000..9a3dba8 --- /dev/null +++ b/down-the-stack/dk_pac/src/uart0/txd.rs @@ -0,0 +1,52 @@ +#[doc = "Register `TXD` 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 `TXD` writer - TX data to be transferred"] +pub type TXD_W<'a, const O: u8> = crate::FieldWriter<'a, u32, TXD_SPEC, u8, u8, 8, O>; +impl W { + #[doc = "Bits 0:7 - TX data to be transferred"] + #[inline(always)] + #[must_use] + pub fn txd(&mut self) -> TXD_W<0> { + TXD_W::new(self) + } + #[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 = "TXD register\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 [txd](index.html) module"] +pub struct TXD_SPEC; +impl crate::RegisterSpec for TXD_SPEC { + type Ux = u32; +} +#[doc = "`write(|w| ..)` method takes [txd::W](W) writer structure"] +impl crate::Writable for TXD_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets TXD to value 0"] +impl crate::Resettable for TXD_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/uarte0.rs b/down-the-stack/dk_pac/src/uarte0.rs new file mode 100644 index 0000000..cd61441 --- /dev/null +++ b/down-the-stack/dk_pac/src/uarte0.rs @@ -0,0 +1,185 @@ +#[doc = r"Register block"] +#[repr(C)] +pub struct RegisterBlock { + #[doc = "0x00 - Start UART receiver"] + pub tasks_startrx: TASKS_STARTRX, + #[doc = "0x04 - Stop UART receiver"] + pub tasks_stoprx: TASKS_STOPRX, + #[doc = "0x08 - Start UART transmitter"] + pub tasks_starttx: TASKS_STARTTX, + #[doc = "0x0c - Stop UART transmitter"] + pub tasks_stoptx: TASKS_STOPTX, + _reserved4: [u8; 0x1c], + #[doc = "0x2c - Flush RX FIFO into RX buffer"] + pub tasks_flushrx: TASKS_FLUSHRX, + _reserved5: [u8; 0xd0], + #[doc = "0x100 - CTS is activated (set low). Clear To Send."] + pub events_cts: EVENTS_CTS, + #[doc = "0x104 - CTS is deactivated (set high). Not Clear To Send."] + pub events_ncts: EVENTS_NCTS, + #[doc = "0x108 - Data received in RXD (but potentially not yet transferred to Data RAM)"] + pub events_rxdrdy: EVENTS_RXDRDY, + _reserved8: [u8; 0x04], + #[doc = "0x110 - Receive buffer is filled up"] + pub events_endrx: EVENTS_ENDRX, + _reserved9: [u8; 0x08], + #[doc = "0x11c - Data sent from TXD"] + pub events_txdrdy: EVENTS_TXDRDY, + #[doc = "0x120 - Last TX byte transmitted"] + pub events_endtx: EVENTS_ENDTX, + #[doc = "0x124 - Error detected"] + pub events_error: EVENTS_ERROR, + _reserved12: [u8; 0x1c], + #[doc = "0x144 - Receiver timeout"] + pub events_rxto: EVENTS_RXTO, + _reserved13: [u8; 0x04], + #[doc = "0x14c - UART receiver has started"] + pub events_rxstarted: EVENTS_RXSTARTED, + #[doc = "0x150 - UART transmitter has started"] + pub events_txstarted: EVENTS_TXSTARTED, + _reserved15: [u8; 0x04], + #[doc = "0x158 - Transmitter stopped"] + pub events_txstopped: EVENTS_TXSTOPPED, + _reserved16: [u8; 0xa4], + #[doc = "0x200 - Shortcuts between local events and tasks"] + pub shorts: SHORTS, + _reserved17: [u8; 0xfc], + #[doc = "0x300 - Enable or disable interrupt"] + pub inten: INTEN, + #[doc = "0x304 - Enable interrupt"] + pub intenset: INTENSET, + #[doc = "0x308 - Disable interrupt"] + pub intenclr: INTENCLR, + _reserved20: [u8; 0x0174], + #[doc = "0x480 - Error source"] + pub errorsrc: ERRORSRC, + _reserved21: [u8; 0x7c], + #[doc = "0x500 - Enable UART"] + pub enable: ENABLE, + _reserved22: [u8; 0x04], + #[doc = "0x508..0x518 - Unspecified"] + pub psel: PSEL, + _reserved23: [u8; 0x0c], + #[doc = "0x524 - Baud rate. Accuracy depends on the HFCLK source selected."] + pub baudrate: BAUDRATE, + _reserved24: [u8; 0x0c], + #[doc = "0x534..0x540 - RXD EasyDMA channel"] + pub rxd: RXD, + _reserved25: [u8; 0x04], + #[doc = "0x544..0x550 - TXD EasyDMA channel"] + pub txd: TXD, + _reserved26: [u8; 0x1c], + #[doc = "0x56c - Configuration of parity and hardware flow control"] + pub config: CONFIG, +} +#[doc = "TASKS_STARTRX (w) register accessor: an alias for `Reg`"] +pub type TASKS_STARTRX = crate::Reg; +#[doc = "Start UART receiver"] +pub mod tasks_startrx; +#[doc = "TASKS_STOPRX (w) register accessor: an alias for `Reg`"] +pub type TASKS_STOPRX = crate::Reg; +#[doc = "Stop UART receiver"] +pub mod tasks_stoprx; +#[doc = "TASKS_STARTTX (w) register accessor: an alias for `Reg`"] +pub type TASKS_STARTTX = crate::Reg; +#[doc = "Start UART transmitter"] +pub mod tasks_starttx; +#[doc = "TASKS_STOPTX (w) register accessor: an alias for `Reg`"] +pub type TASKS_STOPTX = crate::Reg; +#[doc = "Stop UART transmitter"] +pub mod tasks_stoptx; +#[doc = "TASKS_FLUSHRX (w) register accessor: an alias for `Reg`"] +pub type TASKS_FLUSHRX = crate::Reg; +#[doc = "Flush RX FIFO into RX buffer"] +pub mod tasks_flushrx; +#[doc = "EVENTS_CTS (rw) register accessor: an alias for `Reg`"] +pub type EVENTS_CTS = crate::Reg; +#[doc = "CTS is activated (set low). Clear To Send."] +pub mod events_cts; +#[doc = "EVENTS_NCTS (rw) register accessor: an alias for `Reg`"] +pub type EVENTS_NCTS = crate::Reg; +#[doc = "CTS is deactivated (set high). Not Clear To Send."] +pub mod events_ncts; +#[doc = "EVENTS_RXDRDY (rw) register accessor: an alias for `Reg`"] +pub type EVENTS_RXDRDY = crate::Reg; +#[doc = "Data received in RXD (but potentially not yet transferred to Data RAM)"] +pub mod events_rxdrdy; +#[doc = "EVENTS_ENDRX (rw) register accessor: an alias for `Reg`"] +pub type EVENTS_ENDRX = crate::Reg; +#[doc = "Receive buffer is filled up"] +pub mod events_endrx; +#[doc = "EVENTS_TXDRDY (rw) register accessor: an alias for `Reg`"] +pub type EVENTS_TXDRDY = crate::Reg; +#[doc = "Data sent from TXD"] +pub mod events_txdrdy; +#[doc = "EVENTS_ENDTX (rw) register accessor: an alias for `Reg`"] +pub type EVENTS_ENDTX = crate::Reg; +#[doc = "Last TX byte transmitted"] +pub mod events_endtx; +#[doc = "EVENTS_ERROR (rw) register accessor: an alias for `Reg`"] +pub type EVENTS_ERROR = crate::Reg; +#[doc = "Error detected"] +pub mod events_error; +#[doc = "EVENTS_RXTO (rw) register accessor: an alias for `Reg`"] +pub type EVENTS_RXTO = crate::Reg; +#[doc = "Receiver timeout"] +pub mod events_rxto; +#[doc = "EVENTS_RXSTARTED (rw) register accessor: an alias for `Reg`"] +pub type EVENTS_RXSTARTED = crate::Reg; +#[doc = "UART receiver has started"] +pub mod events_rxstarted; +#[doc = "EVENTS_TXSTARTED (rw) register accessor: an alias for `Reg`"] +pub type EVENTS_TXSTARTED = crate::Reg; +#[doc = "UART transmitter has started"] +pub mod events_txstarted; +#[doc = "EVENTS_TXSTOPPED (rw) register accessor: an alias for `Reg`"] +pub type EVENTS_TXSTOPPED = crate::Reg; +#[doc = "Transmitter stopped"] +pub mod events_txstopped; +#[doc = "SHORTS (rw) register accessor: an alias for `Reg`"] +pub type SHORTS = crate::Reg; +#[doc = "Shortcuts between local events and tasks"] +pub mod shorts; +#[doc = "INTEN (rw) register accessor: an alias for `Reg`"] +pub type INTEN = crate::Reg; +#[doc = "Enable or disable interrupt"] +pub mod inten; +#[doc = "INTENSET (rw) register accessor: an alias for `Reg`"] +pub type INTENSET = crate::Reg; +#[doc = "Enable interrupt"] +pub mod intenset; +#[doc = "INTENCLR (rw) register accessor: an alias for `Reg`"] +pub type INTENCLR = crate::Reg; +#[doc = "Disable interrupt"] +pub mod intenclr; +#[doc = "ERRORSRC (rw) register accessor: an alias for `Reg`"] +pub type ERRORSRC = crate::Reg; +#[doc = "Error source"] +pub mod errorsrc; +#[doc = "ENABLE (rw) register accessor: an alias for `Reg`"] +pub type ENABLE = crate::Reg; +#[doc = "Enable UART"] +pub mod enable; +#[doc = "Unspecified"] +pub use self::psel::PSEL; +#[doc = r"Cluster"] +#[doc = "Unspecified"] +pub mod psel; +#[doc = "BAUDRATE (rw) register accessor: an alias for `Reg`"] +pub type BAUDRATE = crate::Reg; +#[doc = "Baud rate. Accuracy depends on the HFCLK source selected."] +pub mod baudrate; +#[doc = "RXD EasyDMA channel"] +pub use self::rxd::RXD; +#[doc = r"Cluster"] +#[doc = "RXD EasyDMA channel"] +pub mod rxd; +#[doc = "TXD EasyDMA channel"] +pub use self::txd::TXD; +#[doc = r"Cluster"] +#[doc = "TXD EasyDMA channel"] +pub mod txd; +#[doc = "CONFIG (rw) register accessor: an alias for `Reg`"] +pub type CONFIG = crate::Reg; +#[doc = "Configuration of parity and hardware flow control"] +pub mod config; diff --git a/down-the-stack/dk_pac/src/uarte0/baudrate.rs b/down-the-stack/dk_pac/src/uarte0/baudrate.rs new file mode 100644 index 0000000..8df3583 --- /dev/null +++ b/down-the-stack/dk_pac/src/uarte0/baudrate.rs @@ -0,0 +1,337 @@ +#[doc = "Register `BAUDRATE` 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 `BAUDRATE` 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 `BAUDRATE` reader - Baud rate"] +pub type BAUDRATE_R = crate::FieldReader; +#[doc = "Baud rate\n\nValue on reset: 67108864"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +#[repr(u32)] +pub enum BAUDRATE_A { + #[doc = "323584: 1200 baud (actual rate: 1205)"] + BAUD1200 = 323584, + #[doc = "643072: 2400 baud (actual rate: 2396)"] + BAUD2400 = 643072, + #[doc = "1290240: 4800 baud (actual rate: 4808)"] + BAUD4800 = 1290240, + #[doc = "2576384: 9600 baud (actual rate: 9598)"] + BAUD9600 = 2576384, + #[doc = "3862528: 14400 baud (actual rate: 14401)"] + BAUD14400 = 3862528, + #[doc = "5152768: 19200 baud (actual rate: 19208)"] + BAUD19200 = 5152768, + #[doc = "7716864: 28800 baud (actual rate: 28777)"] + BAUD28800 = 7716864, + #[doc = "8388608: 31250 baud"] + BAUD31250 = 8388608, + #[doc = "10289152: 38400 baud (actual rate: 38369)"] + BAUD38400 = 10289152, + #[doc = "15007744: 56000 baud (actual rate: 55944)"] + BAUD56000 = 15007744, + #[doc = "15400960: 57600 baud (actual rate: 57554)"] + BAUD57600 = 15400960, + #[doc = "20615168: 76800 baud (actual rate: 76923)"] + BAUD76800 = 20615168, + #[doc = "30801920: 115200 baud (actual rate: 115108)"] + BAUD115200 = 30801920, + #[doc = "61865984: 230400 baud (actual rate: 231884)"] + BAUD230400 = 61865984, + #[doc = "67108864: 250000 baud"] + BAUD250000 = 67108864, + #[doc = "121634816: 460800 baud (actual rate: 457143)"] + BAUD460800 = 121634816, + #[doc = "251658240: 921600 baud (actual rate: 941176)"] + BAUD921600 = 251658240, + #[doc = "268435456: 1Mega baud"] + BAUD1M = 268435456, +} +impl From for u32 { + #[inline(always)] + fn from(variant: BAUDRATE_A) -> Self { + variant as _ + } +} +impl BAUDRATE_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> Option { + match self.bits { + 323584 => Some(BAUDRATE_A::BAUD1200), + 643072 => Some(BAUDRATE_A::BAUD2400), + 1290240 => Some(BAUDRATE_A::BAUD4800), + 2576384 => Some(BAUDRATE_A::BAUD9600), + 3862528 => Some(BAUDRATE_A::BAUD14400), + 5152768 => Some(BAUDRATE_A::BAUD19200), + 7716864 => Some(BAUDRATE_A::BAUD28800), + 8388608 => Some(BAUDRATE_A::BAUD31250), + 10289152 => Some(BAUDRATE_A::BAUD38400), + 15007744 => Some(BAUDRATE_A::BAUD56000), + 15400960 => Some(BAUDRATE_A::BAUD57600), + 20615168 => Some(BAUDRATE_A::BAUD76800), + 30801920 => Some(BAUDRATE_A::BAUD115200), + 61865984 => Some(BAUDRATE_A::BAUD230400), + 67108864 => Some(BAUDRATE_A::BAUD250000), + 121634816 => Some(BAUDRATE_A::BAUD460800), + 251658240 => Some(BAUDRATE_A::BAUD921600), + 268435456 => Some(BAUDRATE_A::BAUD1M), + _ => None, + } + } + #[doc = "Checks if the value of the field is `BAUD1200`"] + #[inline(always)] + pub fn is_baud1200(&self) -> bool { + *self == BAUDRATE_A::BAUD1200 + } + #[doc = "Checks if the value of the field is `BAUD2400`"] + #[inline(always)] + pub fn is_baud2400(&self) -> bool { + *self == BAUDRATE_A::BAUD2400 + } + #[doc = "Checks if the value of the field is `BAUD4800`"] + #[inline(always)] + pub fn is_baud4800(&self) -> bool { + *self == BAUDRATE_A::BAUD4800 + } + #[doc = "Checks if the value of the field is `BAUD9600`"] + #[inline(always)] + pub fn is_baud9600(&self) -> bool { + *self == BAUDRATE_A::BAUD9600 + } + #[doc = "Checks if the value of the field is `BAUD14400`"] + #[inline(always)] + pub fn is_baud14400(&self) -> bool { + *self == BAUDRATE_A::BAUD14400 + } + #[doc = "Checks if the value of the field is `BAUD19200`"] + #[inline(always)] + pub fn is_baud19200(&self) -> bool { + *self == BAUDRATE_A::BAUD19200 + } + #[doc = "Checks if the value of the field is `BAUD28800`"] + #[inline(always)] + pub fn is_baud28800(&self) -> bool { + *self == BAUDRATE_A::BAUD28800 + } + #[doc = "Checks if the value of the field is `BAUD31250`"] + #[inline(always)] + pub fn is_baud31250(&self) -> bool { + *self == BAUDRATE_A::BAUD31250 + } + #[doc = "Checks if the value of the field is `BAUD38400`"] + #[inline(always)] + pub fn is_baud38400(&self) -> bool { + *self == BAUDRATE_A::BAUD38400 + } + #[doc = "Checks if the value of the field is `BAUD56000`"] + #[inline(always)] + pub fn is_baud56000(&self) -> bool { + *self == BAUDRATE_A::BAUD56000 + } + #[doc = "Checks if the value of the field is `BAUD57600`"] + #[inline(always)] + pub fn is_baud57600(&self) -> bool { + *self == BAUDRATE_A::BAUD57600 + } + #[doc = "Checks if the value of the field is `BAUD76800`"] + #[inline(always)] + pub fn is_baud76800(&self) -> bool { + *self == BAUDRATE_A::BAUD76800 + } + #[doc = "Checks if the value of the field is `BAUD115200`"] + #[inline(always)] + pub fn is_baud115200(&self) -> bool { + *self == BAUDRATE_A::BAUD115200 + } + #[doc = "Checks if the value of the field is `BAUD230400`"] + #[inline(always)] + pub fn is_baud230400(&self) -> bool { + *self == BAUDRATE_A::BAUD230400 + } + #[doc = "Checks if the value of the field is `BAUD250000`"] + #[inline(always)] + pub fn is_baud250000(&self) -> bool { + *self == BAUDRATE_A::BAUD250000 + } + #[doc = "Checks if the value of the field is `BAUD460800`"] + #[inline(always)] + pub fn is_baud460800(&self) -> bool { + *self == BAUDRATE_A::BAUD460800 + } + #[doc = "Checks if the value of the field is `BAUD921600`"] + #[inline(always)] + pub fn is_baud921600(&self) -> bool { + *self == BAUDRATE_A::BAUD921600 + } + #[doc = "Checks if the value of the field is `BAUD1M`"] + #[inline(always)] + pub fn is_baud1m(&self) -> bool { + *self == BAUDRATE_A::BAUD1M + } +} +#[doc = "Field `BAUDRATE` writer - Baud rate"] +pub type BAUDRATE_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, BAUDRATE_SPEC, u32, BAUDRATE_A, 32, O>; +impl<'a, const O: u8> BAUDRATE_W<'a, O> { + #[doc = "1200 baud (actual rate: 1205)"] + #[inline(always)] + pub fn baud1200(self) -> &'a mut W { + self.variant(BAUDRATE_A::BAUD1200) + } + #[doc = "2400 baud (actual rate: 2396)"] + #[inline(always)] + pub fn baud2400(self) -> &'a mut W { + self.variant(BAUDRATE_A::BAUD2400) + } + #[doc = "4800 baud (actual rate: 4808)"] + #[inline(always)] + pub fn baud4800(self) -> &'a mut W { + self.variant(BAUDRATE_A::BAUD4800) + } + #[doc = "9600 baud (actual rate: 9598)"] + #[inline(always)] + pub fn baud9600(self) -> &'a mut W { + self.variant(BAUDRATE_A::BAUD9600) + } + #[doc = "14400 baud (actual rate: 14401)"] + #[inline(always)] + pub fn baud14400(self) -> &'a mut W { + self.variant(BAUDRATE_A::BAUD14400) + } + #[doc = "19200 baud (actual rate: 19208)"] + #[inline(always)] + pub fn baud19200(self) -> &'a mut W { + self.variant(BAUDRATE_A::BAUD19200) + } + #[doc = "28800 baud (actual rate: 28777)"] + #[inline(always)] + pub fn baud28800(self) -> &'a mut W { + self.variant(BAUDRATE_A::BAUD28800) + } + #[doc = "31250 baud"] + #[inline(always)] + pub fn baud31250(self) -> &'a mut W { + self.variant(BAUDRATE_A::BAUD31250) + } + #[doc = "38400 baud (actual rate: 38369)"] + #[inline(always)] + pub fn baud38400(self) -> &'a mut W { + self.variant(BAUDRATE_A::BAUD38400) + } + #[doc = "56000 baud (actual rate: 55944)"] + #[inline(always)] + pub fn baud56000(self) -> &'a mut W { + self.variant(BAUDRATE_A::BAUD56000) + } + #[doc = "57600 baud (actual rate: 57554)"] + #[inline(always)] + pub fn baud57600(self) -> &'a mut W { + self.variant(BAUDRATE_A::BAUD57600) + } + #[doc = "76800 baud (actual rate: 76923)"] + #[inline(always)] + pub fn baud76800(self) -> &'a mut W { + self.variant(BAUDRATE_A::BAUD76800) + } + #[doc = "115200 baud (actual rate: 115108)"] + #[inline(always)] + pub fn baud115200(self) -> &'a mut W { + self.variant(BAUDRATE_A::BAUD115200) + } + #[doc = "230400 baud (actual rate: 231884)"] + #[inline(always)] + pub fn baud230400(self) -> &'a mut W { + self.variant(BAUDRATE_A::BAUD230400) + } + #[doc = "250000 baud"] + #[inline(always)] + pub fn baud250000(self) -> &'a mut W { + self.variant(BAUDRATE_A::BAUD250000) + } + #[doc = "460800 baud (actual rate: 457143)"] + #[inline(always)] + pub fn baud460800(self) -> &'a mut W { + self.variant(BAUDRATE_A::BAUD460800) + } + #[doc = "921600 baud (actual rate: 941176)"] + #[inline(always)] + pub fn baud921600(self) -> &'a mut W { + self.variant(BAUDRATE_A::BAUD921600) + } + #[doc = "1Mega baud"] + #[inline(always)] + pub fn baud1m(self) -> &'a mut W { + self.variant(BAUDRATE_A::BAUD1M) + } +} +impl R { + #[doc = "Bits 0:31 - Baud rate"] + #[inline(always)] + pub fn baudrate(&self) -> BAUDRATE_R { + BAUDRATE_R::new(self.bits) + } +} +impl W { + #[doc = "Bits 0:31 - Baud rate"] + #[inline(always)] + #[must_use] + pub fn baudrate(&mut self) -> BAUDRATE_W<0> { + BAUDRATE_W::new(self) + } + #[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 = "Baud rate. Accuracy depends on the HFCLK source selected.\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 [baudrate](index.html) module"] +pub struct BAUDRATE_SPEC; +impl crate::RegisterSpec for BAUDRATE_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [baudrate::R](R) reader structure"] +impl crate::Readable for BAUDRATE_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [baudrate::W](W) writer structure"] +impl crate::Writable for BAUDRATE_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets BAUDRATE to value 0x0400_0000"] +impl crate::Resettable for BAUDRATE_SPEC { + const RESET_VALUE: Self::Ux = 0x0400_0000; +} diff --git a/down-the-stack/dk_pac/src/uarte0/config.rs b/down-the-stack/dk_pac/src/uarte0/config.rs new file mode 100644 index 0000000..87a5585 --- /dev/null +++ b/down-the-stack/dk_pac/src/uarte0/config.rs @@ -0,0 +1,189 @@ +#[doc = "Register `CONFIG` 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 `CONFIG` 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 `HWFC` reader - Hardware flow control"] +pub type HWFC_R = crate::BitReader; +#[doc = "Hardware flow control\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum HWFC_A { + #[doc = "0: Disabled"] + DISABLED = 0, + #[doc = "1: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: HWFC_A) -> Self { + variant as u8 != 0 + } +} +impl HWFC_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> HWFC_A { + match self.bits { + false => HWFC_A::DISABLED, + true => HWFC_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == HWFC_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == HWFC_A::ENABLED + } +} +#[doc = "Field `HWFC` writer - Hardware flow control"] +pub type HWFC_W<'a, const O: u8> = crate::BitWriter<'a, u32, CONFIG_SPEC, HWFC_A, O>; +impl<'a, const O: u8> HWFC_W<'a, O> { + #[doc = "Disabled"] + #[inline(always)] + pub fn disabled(self) -> &'a mut W { + self.variant(HWFC_A::DISABLED) + } + #[doc = "Enabled"] + #[inline(always)] + pub fn enabled(self) -> &'a mut W { + self.variant(HWFC_A::ENABLED) + } +} +#[doc = "Field `PARITY` reader - Parity"] +pub type PARITY_R = crate::FieldReader; +#[doc = "Parity\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +#[repr(u8)] +pub enum PARITY_A { + #[doc = "0: Exclude parity bit"] + EXCLUDED = 0, + #[doc = "7: Include parity bit"] + INCLUDED = 7, +} +impl From for u8 { + #[inline(always)] + fn from(variant: PARITY_A) -> Self { + variant as _ + } +} +impl PARITY_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> Option { + match self.bits { + 0 => Some(PARITY_A::EXCLUDED), + 7 => Some(PARITY_A::INCLUDED), + _ => None, + } + } + #[doc = "Checks if the value of the field is `EXCLUDED`"] + #[inline(always)] + pub fn is_excluded(&self) -> bool { + *self == PARITY_A::EXCLUDED + } + #[doc = "Checks if the value of the field is `INCLUDED`"] + #[inline(always)] + pub fn is_included(&self) -> bool { + *self == PARITY_A::INCLUDED + } +} +#[doc = "Field `PARITY` writer - Parity"] +pub type PARITY_W<'a, const O: u8> = crate::FieldWriter<'a, u32, CONFIG_SPEC, u8, PARITY_A, 3, O>; +impl<'a, const O: u8> PARITY_W<'a, O> { + #[doc = "Exclude parity bit"] + #[inline(always)] + pub fn excluded(self) -> &'a mut W { + self.variant(PARITY_A::EXCLUDED) + } + #[doc = "Include parity bit"] + #[inline(always)] + pub fn included(self) -> &'a mut W { + self.variant(PARITY_A::INCLUDED) + } +} +impl R { + #[doc = "Bit 0 - Hardware flow control"] + #[inline(always)] + pub fn hwfc(&self) -> HWFC_R { + HWFC_R::new((self.bits & 1) != 0) + } + #[doc = "Bits 1:3 - Parity"] + #[inline(always)] + pub fn parity(&self) -> PARITY_R { + PARITY_R::new(((self.bits >> 1) & 7) as u8) + } +} +impl W { + #[doc = "Bit 0 - Hardware flow control"] + #[inline(always)] + #[must_use] + pub fn hwfc(&mut self) -> HWFC_W<0> { + HWFC_W::new(self) + } + #[doc = "Bits 1:3 - Parity"] + #[inline(always)] + #[must_use] + pub fn parity(&mut self) -> PARITY_W<1> { + PARITY_W::new(self) + } + #[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 = "Configuration of parity and hardware flow control\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 [config](index.html) module"] +pub struct CONFIG_SPEC; +impl crate::RegisterSpec for CONFIG_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [config::R](R) reader structure"] +impl crate::Readable for CONFIG_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [config::W](W) writer structure"] +impl crate::Writable for 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 CONFIG to value 0"] +impl crate::Resettable for CONFIG_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/uarte0/enable.rs b/down-the-stack/dk_pac/src/uarte0/enable.rs new file mode 100644 index 0000000..4785b88 --- /dev/null +++ b/down-the-stack/dk_pac/src/uarte0/enable.rs @@ -0,0 +1,128 @@ +#[doc = "Register `ENABLE` 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 `ENABLE` 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 `ENABLE` reader - Enable or disable UARTE"] +pub type ENABLE_R = crate::FieldReader; +#[doc = "Enable or disable UARTE\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +#[repr(u8)] +pub enum ENABLE_A { + #[doc = "0: Disable UARTE"] + DISABLED = 0, + #[doc = "8: Enable UARTE"] + ENABLED = 8, +} +impl From for u8 { + #[inline(always)] + fn from(variant: ENABLE_A) -> Self { + variant as _ + } +} +impl ENABLE_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> Option { + match self.bits { + 0 => Some(ENABLE_A::DISABLED), + 8 => Some(ENABLE_A::ENABLED), + _ => None, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == ENABLE_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == ENABLE_A::ENABLED + } +} +#[doc = "Field `ENABLE` writer - Enable or disable UARTE"] +pub type ENABLE_W<'a, const O: u8> = crate::FieldWriter<'a, u32, ENABLE_SPEC, u8, ENABLE_A, 4, O>; +impl<'a, const O: u8> ENABLE_W<'a, O> { + #[doc = "Disable UARTE"] + #[inline(always)] + pub fn disabled(self) -> &'a mut W { + self.variant(ENABLE_A::DISABLED) + } + #[doc = "Enable UARTE"] + #[inline(always)] + pub fn enabled(self) -> &'a mut W { + self.variant(ENABLE_A::ENABLED) + } +} +impl R { + #[doc = "Bits 0:3 - Enable or disable UARTE"] + #[inline(always)] + pub fn enable(&self) -> ENABLE_R { + ENABLE_R::new((self.bits & 0x0f) as u8) + } +} +impl W { + #[doc = "Bits 0:3 - Enable or disable UARTE"] + #[inline(always)] + #[must_use] + pub fn enable(&mut self) -> ENABLE_W<0> { + 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 + } +} +#[doc = "Enable UART\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 [enable](index.html) module"] +pub struct ENABLE_SPEC; +impl crate::RegisterSpec for ENABLE_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [enable::R](R) reader structure"] +impl crate::Readable for ENABLE_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [enable::W](W) writer structure"] +impl crate::Writable for ENABLE_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets ENABLE to value 0"] +impl crate::Resettable for ENABLE_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/uarte0/errorsrc.rs b/down-the-stack/dk_pac/src/uarte0/errorsrc.rs new file mode 100644 index 0000000..8a78d5a --- /dev/null +++ b/down-the-stack/dk_pac/src/uarte0/errorsrc.rs @@ -0,0 +1,309 @@ +#[doc = "Register `ERRORSRC` 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 `ERRORSRC` 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 `OVERRUN` reader - Overrun error"] +pub type OVERRUN_R = crate::BitReader; +#[doc = "Overrun error\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum OVERRUN_A { + #[doc = "0: Read: error not present"] + NOT_PRESENT = 0, + #[doc = "1: Read: error present"] + PRESENT = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: OVERRUN_A) -> Self { + variant as u8 != 0 + } +} +impl OVERRUN_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> OVERRUN_A { + match self.bits { + false => OVERRUN_A::NOT_PRESENT, + true => OVERRUN_A::PRESENT, + } + } + #[doc = "Checks if the value of the field is `NOT_PRESENT`"] + #[inline(always)] + pub fn is_not_present(&self) -> bool { + *self == OVERRUN_A::NOT_PRESENT + } + #[doc = "Checks if the value of the field is `PRESENT`"] + #[inline(always)] + pub fn is_present(&self) -> bool { + *self == OVERRUN_A::PRESENT + } +} +#[doc = "Field `OVERRUN` writer - Overrun error"] +pub type OVERRUN_W<'a, const O: u8> = crate::BitWriter1C<'a, u32, ERRORSRC_SPEC, OVERRUN_A, O>; +impl<'a, const O: u8> OVERRUN_W<'a, O> { + #[doc = "Read: error not present"] + #[inline(always)] + pub fn not_present(self) -> &'a mut W { + self.variant(OVERRUN_A::NOT_PRESENT) + } + #[doc = "Read: error present"] + #[inline(always)] + pub fn present(self) -> &'a mut W { + self.variant(OVERRUN_A::PRESENT) + } +} +#[doc = "Field `PARITY` reader - Parity error"] +pub type PARITY_R = crate::BitReader; +#[doc = "Parity error\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PARITY_A { + #[doc = "0: Read: error not present"] + NOT_PRESENT = 0, + #[doc = "1: Read: error present"] + PRESENT = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PARITY_A) -> Self { + variant as u8 != 0 + } +} +impl PARITY_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> PARITY_A { + match self.bits { + false => PARITY_A::NOT_PRESENT, + true => PARITY_A::PRESENT, + } + } + #[doc = "Checks if the value of the field is `NOT_PRESENT`"] + #[inline(always)] + pub fn is_not_present(&self) -> bool { + *self == PARITY_A::NOT_PRESENT + } + #[doc = "Checks if the value of the field is `PRESENT`"] + #[inline(always)] + pub fn is_present(&self) -> bool { + *self == PARITY_A::PRESENT + } +} +#[doc = "Field `PARITY` writer - Parity error"] +pub type PARITY_W<'a, const O: u8> = crate::BitWriter1C<'a, u32, ERRORSRC_SPEC, PARITY_A, O>; +impl<'a, const O: u8> PARITY_W<'a, O> { + #[doc = "Read: error not present"] + #[inline(always)] + pub fn not_present(self) -> &'a mut W { + self.variant(PARITY_A::NOT_PRESENT) + } + #[doc = "Read: error present"] + #[inline(always)] + pub fn present(self) -> &'a mut W { + self.variant(PARITY_A::PRESENT) + } +} +#[doc = "Field `FRAMING` reader - Framing error occurred"] +pub type FRAMING_R = crate::BitReader; +#[doc = "Framing error occurred\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum FRAMING_A { + #[doc = "0: Read: error not present"] + NOT_PRESENT = 0, + #[doc = "1: Read: error present"] + PRESENT = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: FRAMING_A) -> Self { + variant as u8 != 0 + } +} +impl FRAMING_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> FRAMING_A { + match self.bits { + false => FRAMING_A::NOT_PRESENT, + true => FRAMING_A::PRESENT, + } + } + #[doc = "Checks if the value of the field is `NOT_PRESENT`"] + #[inline(always)] + pub fn is_not_present(&self) -> bool { + *self == FRAMING_A::NOT_PRESENT + } + #[doc = "Checks if the value of the field is `PRESENT`"] + #[inline(always)] + pub fn is_present(&self) -> bool { + *self == FRAMING_A::PRESENT + } +} +#[doc = "Field `FRAMING` writer - Framing error occurred"] +pub type FRAMING_W<'a, const O: u8> = crate::BitWriter1C<'a, u32, ERRORSRC_SPEC, FRAMING_A, O>; +impl<'a, const O: u8> FRAMING_W<'a, O> { + #[doc = "Read: error not present"] + #[inline(always)] + pub fn not_present(self) -> &'a mut W { + self.variant(FRAMING_A::NOT_PRESENT) + } + #[doc = "Read: error present"] + #[inline(always)] + pub fn present(self) -> &'a mut W { + self.variant(FRAMING_A::PRESENT) + } +} +#[doc = "Field `BREAK` reader - Break condition"] +pub type BREAK_R = crate::BitReader; +#[doc = "Break condition\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum BREAK_A { + #[doc = "0: Read: error not present"] + NOT_PRESENT = 0, + #[doc = "1: Read: error present"] + PRESENT = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: BREAK_A) -> Self { + variant as u8 != 0 + } +} +impl BREAK_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> BREAK_A { + match self.bits { + false => BREAK_A::NOT_PRESENT, + true => BREAK_A::PRESENT, + } + } + #[doc = "Checks if the value of the field is `NOT_PRESENT`"] + #[inline(always)] + pub fn is_not_present(&self) -> bool { + *self == BREAK_A::NOT_PRESENT + } + #[doc = "Checks if the value of the field is `PRESENT`"] + #[inline(always)] + pub fn is_present(&self) -> bool { + *self == BREAK_A::PRESENT + } +} +#[doc = "Field `BREAK` writer - Break condition"] +pub type BREAK_W<'a, const O: u8> = crate::BitWriter1C<'a, u32, ERRORSRC_SPEC, BREAK_A, O>; +impl<'a, const O: u8> BREAK_W<'a, O> { + #[doc = "Read: error not present"] + #[inline(always)] + pub fn not_present(self) -> &'a mut W { + self.variant(BREAK_A::NOT_PRESENT) + } + #[doc = "Read: error present"] + #[inline(always)] + pub fn present(self) -> &'a mut W { + self.variant(BREAK_A::PRESENT) + } +} +impl R { + #[doc = "Bit 0 - Overrun error"] + #[inline(always)] + pub fn overrun(&self) -> OVERRUN_R { + OVERRUN_R::new((self.bits & 1) != 0) + } + #[doc = "Bit 1 - Parity error"] + #[inline(always)] + pub fn parity(&self) -> PARITY_R { + PARITY_R::new(((self.bits >> 1) & 1) != 0) + } + #[doc = "Bit 2 - Framing error occurred"] + #[inline(always)] + pub fn framing(&self) -> FRAMING_R { + FRAMING_R::new(((self.bits >> 2) & 1) != 0) + } + #[doc = "Bit 3 - Break condition"] + #[inline(always)] + pub fn break_(&self) -> BREAK_R { + BREAK_R::new(((self.bits >> 3) & 1) != 0) + } +} +impl W { + #[doc = "Bit 0 - Overrun error"] + #[inline(always)] + #[must_use] + pub fn overrun(&mut self) -> OVERRUN_W<0> { + OVERRUN_W::new(self) + } + #[doc = "Bit 1 - Parity error"] + #[inline(always)] + #[must_use] + pub fn parity(&mut self) -> PARITY_W<1> { + PARITY_W::new(self) + } + #[doc = "Bit 2 - Framing error occurred"] + #[inline(always)] + #[must_use] + pub fn framing(&mut self) -> FRAMING_W<2> { + FRAMING_W::new(self) + } + #[doc = "Bit 3 - Break condition"] + #[inline(always)] + #[must_use] + pub fn break_(&mut self) -> BREAK_W<3> { + BREAK_W::new(self) + } + #[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 = "Error source\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 [errorsrc](index.html) module"] +pub struct ERRORSRC_SPEC; +impl crate::RegisterSpec for ERRORSRC_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [errorsrc::R](R) reader structure"] +impl crate::Readable for ERRORSRC_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [errorsrc::W](W) writer structure"] +impl crate::Writable for ERRORSRC_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0x0f; +} +#[doc = "`reset()` method sets ERRORSRC to value 0"] +impl crate::Resettable for ERRORSRC_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/uarte0/events_cts.rs b/down-the-stack/dk_pac/src/uarte0/events_cts.rs new file mode 100644 index 0000000..b3589f3 --- /dev/null +++ b/down-the-stack/dk_pac/src/uarte0/events_cts.rs @@ -0,0 +1,127 @@ +#[doc = "Register `EVENTS_CTS` 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 `EVENTS_CTS` 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 `EVENTS_CTS` reader - CTS is activated (set low). Clear To Send."] +pub type EVENTS_CTS_R = crate::BitReader; +#[doc = "CTS is activated (set low). Clear To Send.\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum EVENTS_CTS_A { + #[doc = "0: Event not generated"] + NOT_GENERATED = 0, + #[doc = "1: Event generated"] + GENERATED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: EVENTS_CTS_A) -> Self { + variant as u8 != 0 + } +} +impl EVENTS_CTS_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> EVENTS_CTS_A { + match self.bits { + false => EVENTS_CTS_A::NOT_GENERATED, + true => EVENTS_CTS_A::GENERATED, + } + } + #[doc = "Checks if the value of the field is `NOT_GENERATED`"] + #[inline(always)] + pub fn is_not_generated(&self) -> bool { + *self == EVENTS_CTS_A::NOT_GENERATED + } + #[doc = "Checks if the value of the field is `GENERATED`"] + #[inline(always)] + pub fn is_generated(&self) -> bool { + *self == EVENTS_CTS_A::GENERATED + } +} +#[doc = "Field `EVENTS_CTS` writer - CTS is activated (set low). Clear To Send."] +pub type EVENTS_CTS_W<'a, const O: u8> = + crate::BitWriter<'a, u32, EVENTS_CTS_SPEC, EVENTS_CTS_A, O>; +impl<'a, const O: u8> EVENTS_CTS_W<'a, O> { + #[doc = "Event not generated"] + #[inline(always)] + pub fn not_generated(self) -> &'a mut W { + self.variant(EVENTS_CTS_A::NOT_GENERATED) + } + #[doc = "Event generated"] + #[inline(always)] + pub fn generated(self) -> &'a mut W { + self.variant(EVENTS_CTS_A::GENERATED) + } +} +impl R { + #[doc = "Bit 0 - CTS is activated (set low). Clear To Send."] + #[inline(always)] + pub fn events_cts(&self) -> EVENTS_CTS_R { + EVENTS_CTS_R::new((self.bits & 1) != 0) + } +} +impl W { + #[doc = "Bit 0 - CTS is activated (set low). Clear To Send."] + #[inline(always)] + #[must_use] + pub fn events_cts(&mut self) -> EVENTS_CTS_W<0> { + EVENTS_CTS_W::new(self) + } + #[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 = "CTS is activated (set low). Clear To Send.\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 [events_cts](index.html) module"] +pub struct EVENTS_CTS_SPEC; +impl crate::RegisterSpec for EVENTS_CTS_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [events_cts::R](R) reader structure"] +impl crate::Readable for EVENTS_CTS_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [events_cts::W](W) writer structure"] +impl crate::Writable for EVENTS_CTS_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets EVENTS_CTS to value 0"] +impl crate::Resettable for EVENTS_CTS_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/uarte0/events_endrx.rs b/down-the-stack/dk_pac/src/uarte0/events_endrx.rs new file mode 100644 index 0000000..96e1adb --- /dev/null +++ b/down-the-stack/dk_pac/src/uarte0/events_endrx.rs @@ -0,0 +1,127 @@ +#[doc = "Register `EVENTS_ENDRX` 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 `EVENTS_ENDRX` 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 `EVENTS_ENDRX` reader - Receive buffer is filled up"] +pub type EVENTS_ENDRX_R = crate::BitReader; +#[doc = "Receive buffer is filled up\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum EVENTS_ENDRX_A { + #[doc = "0: Event not generated"] + NOT_GENERATED = 0, + #[doc = "1: Event generated"] + GENERATED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: EVENTS_ENDRX_A) -> Self { + variant as u8 != 0 + } +} +impl EVENTS_ENDRX_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> EVENTS_ENDRX_A { + match self.bits { + false => EVENTS_ENDRX_A::NOT_GENERATED, + true => EVENTS_ENDRX_A::GENERATED, + } + } + #[doc = "Checks if the value of the field is `NOT_GENERATED`"] + #[inline(always)] + pub fn is_not_generated(&self) -> bool { + *self == EVENTS_ENDRX_A::NOT_GENERATED + } + #[doc = "Checks if the value of the field is `GENERATED`"] + #[inline(always)] + pub fn is_generated(&self) -> bool { + *self == EVENTS_ENDRX_A::GENERATED + } +} +#[doc = "Field `EVENTS_ENDRX` writer - Receive buffer is filled up"] +pub type EVENTS_ENDRX_W<'a, const O: u8> = + crate::BitWriter<'a, u32, EVENTS_ENDRX_SPEC, EVENTS_ENDRX_A, O>; +impl<'a, const O: u8> EVENTS_ENDRX_W<'a, O> { + #[doc = "Event not generated"] + #[inline(always)] + pub fn not_generated(self) -> &'a mut W { + self.variant(EVENTS_ENDRX_A::NOT_GENERATED) + } + #[doc = "Event generated"] + #[inline(always)] + pub fn generated(self) -> &'a mut W { + self.variant(EVENTS_ENDRX_A::GENERATED) + } +} +impl R { + #[doc = "Bit 0 - Receive buffer is filled up"] + #[inline(always)] + pub fn events_endrx(&self) -> EVENTS_ENDRX_R { + EVENTS_ENDRX_R::new((self.bits & 1) != 0) + } +} +impl W { + #[doc = "Bit 0 - Receive buffer is filled up"] + #[inline(always)] + #[must_use] + pub fn events_endrx(&mut self) -> EVENTS_ENDRX_W<0> { + EVENTS_ENDRX_W::new(self) + } + #[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 = "Receive buffer is filled up\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 [events_endrx](index.html) module"] +pub struct EVENTS_ENDRX_SPEC; +impl crate::RegisterSpec for EVENTS_ENDRX_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [events_endrx::R](R) reader structure"] +impl crate::Readable for EVENTS_ENDRX_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [events_endrx::W](W) writer structure"] +impl crate::Writable for EVENTS_ENDRX_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets EVENTS_ENDRX to value 0"] +impl crate::Resettable for EVENTS_ENDRX_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/uarte0/events_endtx.rs b/down-the-stack/dk_pac/src/uarte0/events_endtx.rs new file mode 100644 index 0000000..3108439 --- /dev/null +++ b/down-the-stack/dk_pac/src/uarte0/events_endtx.rs @@ -0,0 +1,127 @@ +#[doc = "Register `EVENTS_ENDTX` 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 `EVENTS_ENDTX` 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 `EVENTS_ENDTX` reader - Last TX byte transmitted"] +pub type EVENTS_ENDTX_R = crate::BitReader; +#[doc = "Last TX byte transmitted\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum EVENTS_ENDTX_A { + #[doc = "0: Event not generated"] + NOT_GENERATED = 0, + #[doc = "1: Event generated"] + GENERATED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: EVENTS_ENDTX_A) -> Self { + variant as u8 != 0 + } +} +impl EVENTS_ENDTX_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> EVENTS_ENDTX_A { + match self.bits { + false => EVENTS_ENDTX_A::NOT_GENERATED, + true => EVENTS_ENDTX_A::GENERATED, + } + } + #[doc = "Checks if the value of the field is `NOT_GENERATED`"] + #[inline(always)] + pub fn is_not_generated(&self) -> bool { + *self == EVENTS_ENDTX_A::NOT_GENERATED + } + #[doc = "Checks if the value of the field is `GENERATED`"] + #[inline(always)] + pub fn is_generated(&self) -> bool { + *self == EVENTS_ENDTX_A::GENERATED + } +} +#[doc = "Field `EVENTS_ENDTX` writer - Last TX byte transmitted"] +pub type EVENTS_ENDTX_W<'a, const O: u8> = + crate::BitWriter<'a, u32, EVENTS_ENDTX_SPEC, EVENTS_ENDTX_A, O>; +impl<'a, const O: u8> EVENTS_ENDTX_W<'a, O> { + #[doc = "Event not generated"] + #[inline(always)] + pub fn not_generated(self) -> &'a mut W { + self.variant(EVENTS_ENDTX_A::NOT_GENERATED) + } + #[doc = "Event generated"] + #[inline(always)] + pub fn generated(self) -> &'a mut W { + self.variant(EVENTS_ENDTX_A::GENERATED) + } +} +impl R { + #[doc = "Bit 0 - Last TX byte transmitted"] + #[inline(always)] + pub fn events_endtx(&self) -> EVENTS_ENDTX_R { + EVENTS_ENDTX_R::new((self.bits & 1) != 0) + } +} +impl W { + #[doc = "Bit 0 - Last TX byte transmitted"] + #[inline(always)] + #[must_use] + pub fn events_endtx(&mut self) -> EVENTS_ENDTX_W<0> { + EVENTS_ENDTX_W::new(self) + } + #[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 = "Last TX byte transmitted\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 [events_endtx](index.html) module"] +pub struct EVENTS_ENDTX_SPEC; +impl crate::RegisterSpec for EVENTS_ENDTX_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [events_endtx::R](R) reader structure"] +impl crate::Readable for EVENTS_ENDTX_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [events_endtx::W](W) writer structure"] +impl crate::Writable for EVENTS_ENDTX_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets EVENTS_ENDTX to value 0"] +impl crate::Resettable for EVENTS_ENDTX_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/uarte0/events_error.rs b/down-the-stack/dk_pac/src/uarte0/events_error.rs new file mode 100644 index 0000000..ea836b3 --- /dev/null +++ b/down-the-stack/dk_pac/src/uarte0/events_error.rs @@ -0,0 +1,127 @@ +#[doc = "Register `EVENTS_ERROR` 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 `EVENTS_ERROR` 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 `EVENTS_ERROR` reader - Error detected"] +pub type EVENTS_ERROR_R = crate::BitReader; +#[doc = "Error detected\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum EVENTS_ERROR_A { + #[doc = "0: Event not generated"] + NOT_GENERATED = 0, + #[doc = "1: Event generated"] + GENERATED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: EVENTS_ERROR_A) -> Self { + variant as u8 != 0 + } +} +impl EVENTS_ERROR_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> EVENTS_ERROR_A { + match self.bits { + false => EVENTS_ERROR_A::NOT_GENERATED, + true => EVENTS_ERROR_A::GENERATED, + } + } + #[doc = "Checks if the value of the field is `NOT_GENERATED`"] + #[inline(always)] + pub fn is_not_generated(&self) -> bool { + *self == EVENTS_ERROR_A::NOT_GENERATED + } + #[doc = "Checks if the value of the field is `GENERATED`"] + #[inline(always)] + pub fn is_generated(&self) -> bool { + *self == EVENTS_ERROR_A::GENERATED + } +} +#[doc = "Field `EVENTS_ERROR` writer - Error detected"] +pub type EVENTS_ERROR_W<'a, const O: u8> = + crate::BitWriter<'a, u32, EVENTS_ERROR_SPEC, EVENTS_ERROR_A, O>; +impl<'a, const O: u8> EVENTS_ERROR_W<'a, O> { + #[doc = "Event not generated"] + #[inline(always)] + pub fn not_generated(self) -> &'a mut W { + self.variant(EVENTS_ERROR_A::NOT_GENERATED) + } + #[doc = "Event generated"] + #[inline(always)] + pub fn generated(self) -> &'a mut W { + self.variant(EVENTS_ERROR_A::GENERATED) + } +} +impl R { + #[doc = "Bit 0 - Error detected"] + #[inline(always)] + pub fn events_error(&self) -> EVENTS_ERROR_R { + EVENTS_ERROR_R::new((self.bits & 1) != 0) + } +} +impl W { + #[doc = "Bit 0 - Error detected"] + #[inline(always)] + #[must_use] + pub fn events_error(&mut self) -> EVENTS_ERROR_W<0> { + EVENTS_ERROR_W::new(self) + } + #[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 = "Error detected\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 [events_error](index.html) module"] +pub struct EVENTS_ERROR_SPEC; +impl crate::RegisterSpec for EVENTS_ERROR_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [events_error::R](R) reader structure"] +impl crate::Readable for EVENTS_ERROR_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [events_error::W](W) writer structure"] +impl crate::Writable for EVENTS_ERROR_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets EVENTS_ERROR to value 0"] +impl crate::Resettable for EVENTS_ERROR_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/uarte0/events_ncts.rs b/down-the-stack/dk_pac/src/uarte0/events_ncts.rs new file mode 100644 index 0000000..4596a0a --- /dev/null +++ b/down-the-stack/dk_pac/src/uarte0/events_ncts.rs @@ -0,0 +1,127 @@ +#[doc = "Register `EVENTS_NCTS` 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 `EVENTS_NCTS` 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 `EVENTS_NCTS` reader - CTS is deactivated (set high). Not Clear To Send."] +pub type EVENTS_NCTS_R = crate::BitReader; +#[doc = "CTS is deactivated (set high). Not Clear To Send.\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum EVENTS_NCTS_A { + #[doc = "0: Event not generated"] + NOT_GENERATED = 0, + #[doc = "1: Event generated"] + GENERATED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: EVENTS_NCTS_A) -> Self { + variant as u8 != 0 + } +} +impl EVENTS_NCTS_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> EVENTS_NCTS_A { + match self.bits { + false => EVENTS_NCTS_A::NOT_GENERATED, + true => EVENTS_NCTS_A::GENERATED, + } + } + #[doc = "Checks if the value of the field is `NOT_GENERATED`"] + #[inline(always)] + pub fn is_not_generated(&self) -> bool { + *self == EVENTS_NCTS_A::NOT_GENERATED + } + #[doc = "Checks if the value of the field is `GENERATED`"] + #[inline(always)] + pub fn is_generated(&self) -> bool { + *self == EVENTS_NCTS_A::GENERATED + } +} +#[doc = "Field `EVENTS_NCTS` writer - CTS is deactivated (set high). Not Clear To Send."] +pub type EVENTS_NCTS_W<'a, const O: u8> = + crate::BitWriter<'a, u32, EVENTS_NCTS_SPEC, EVENTS_NCTS_A, O>; +impl<'a, const O: u8> EVENTS_NCTS_W<'a, O> { + #[doc = "Event not generated"] + #[inline(always)] + pub fn not_generated(self) -> &'a mut W { + self.variant(EVENTS_NCTS_A::NOT_GENERATED) + } + #[doc = "Event generated"] + #[inline(always)] + pub fn generated(self) -> &'a mut W { + self.variant(EVENTS_NCTS_A::GENERATED) + } +} +impl R { + #[doc = "Bit 0 - CTS is deactivated (set high). Not Clear To Send."] + #[inline(always)] + pub fn events_ncts(&self) -> EVENTS_NCTS_R { + EVENTS_NCTS_R::new((self.bits & 1) != 0) + } +} +impl W { + #[doc = "Bit 0 - CTS is deactivated (set high). Not Clear To Send."] + #[inline(always)] + #[must_use] + pub fn events_ncts(&mut self) -> EVENTS_NCTS_W<0> { + EVENTS_NCTS_W::new(self) + } + #[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 = "CTS is deactivated (set high). Not Clear To Send.\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 [events_ncts](index.html) module"] +pub struct EVENTS_NCTS_SPEC; +impl crate::RegisterSpec for EVENTS_NCTS_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [events_ncts::R](R) reader structure"] +impl crate::Readable for EVENTS_NCTS_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [events_ncts::W](W) writer structure"] +impl crate::Writable for EVENTS_NCTS_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets EVENTS_NCTS to value 0"] +impl crate::Resettable for EVENTS_NCTS_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/uarte0/events_rxdrdy.rs b/down-the-stack/dk_pac/src/uarte0/events_rxdrdy.rs new file mode 100644 index 0000000..2360e9c --- /dev/null +++ b/down-the-stack/dk_pac/src/uarte0/events_rxdrdy.rs @@ -0,0 +1,127 @@ +#[doc = "Register `EVENTS_RXDRDY` 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 `EVENTS_RXDRDY` 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 `EVENTS_RXDRDY` reader - Data received in RXD (but potentially not yet transferred to Data RAM)"] +pub type EVENTS_RXDRDY_R = crate::BitReader; +#[doc = "Data received in RXD (but potentially not yet transferred to Data RAM)\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum EVENTS_RXDRDY_A { + #[doc = "0: Event not generated"] + NOT_GENERATED = 0, + #[doc = "1: Event generated"] + GENERATED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: EVENTS_RXDRDY_A) -> Self { + variant as u8 != 0 + } +} +impl EVENTS_RXDRDY_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> EVENTS_RXDRDY_A { + match self.bits { + false => EVENTS_RXDRDY_A::NOT_GENERATED, + true => EVENTS_RXDRDY_A::GENERATED, + } + } + #[doc = "Checks if the value of the field is `NOT_GENERATED`"] + #[inline(always)] + pub fn is_not_generated(&self) -> bool { + *self == EVENTS_RXDRDY_A::NOT_GENERATED + } + #[doc = "Checks if the value of the field is `GENERATED`"] + #[inline(always)] + pub fn is_generated(&self) -> bool { + *self == EVENTS_RXDRDY_A::GENERATED + } +} +#[doc = "Field `EVENTS_RXDRDY` writer - Data received in RXD (but potentially not yet transferred to Data RAM)"] +pub type EVENTS_RXDRDY_W<'a, const O: u8> = + crate::BitWriter<'a, u32, EVENTS_RXDRDY_SPEC, EVENTS_RXDRDY_A, O>; +impl<'a, const O: u8> EVENTS_RXDRDY_W<'a, O> { + #[doc = "Event not generated"] + #[inline(always)] + pub fn not_generated(self) -> &'a mut W { + self.variant(EVENTS_RXDRDY_A::NOT_GENERATED) + } + #[doc = "Event generated"] + #[inline(always)] + pub fn generated(self) -> &'a mut W { + self.variant(EVENTS_RXDRDY_A::GENERATED) + } +} +impl R { + #[doc = "Bit 0 - Data received in RXD (but potentially not yet transferred to Data RAM)"] + #[inline(always)] + pub fn events_rxdrdy(&self) -> EVENTS_RXDRDY_R { + EVENTS_RXDRDY_R::new((self.bits & 1) != 0) + } +} +impl W { + #[doc = "Bit 0 - Data received in RXD (but potentially not yet transferred to Data RAM)"] + #[inline(always)] + #[must_use] + pub fn events_rxdrdy(&mut self) -> EVENTS_RXDRDY_W<0> { + EVENTS_RXDRDY_W::new(self) + } + #[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 = "Data received in RXD (but potentially not yet transferred to Data RAM)\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 [events_rxdrdy](index.html) module"] +pub struct EVENTS_RXDRDY_SPEC; +impl crate::RegisterSpec for EVENTS_RXDRDY_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [events_rxdrdy::R](R) reader structure"] +impl crate::Readable for EVENTS_RXDRDY_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [events_rxdrdy::W](W) writer structure"] +impl crate::Writable for EVENTS_RXDRDY_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets EVENTS_RXDRDY to value 0"] +impl crate::Resettable for EVENTS_RXDRDY_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/uarte0/events_rxstarted.rs b/down-the-stack/dk_pac/src/uarte0/events_rxstarted.rs new file mode 100644 index 0000000..0542517 --- /dev/null +++ b/down-the-stack/dk_pac/src/uarte0/events_rxstarted.rs @@ -0,0 +1,127 @@ +#[doc = "Register `EVENTS_RXSTARTED` 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 `EVENTS_RXSTARTED` 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 `EVENTS_RXSTARTED` reader - UART receiver has started"] +pub type EVENTS_RXSTARTED_R = crate::BitReader; +#[doc = "UART receiver has started\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum EVENTS_RXSTARTED_A { + #[doc = "0: Event not generated"] + NOT_GENERATED = 0, + #[doc = "1: Event generated"] + GENERATED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: EVENTS_RXSTARTED_A) -> Self { + variant as u8 != 0 + } +} +impl EVENTS_RXSTARTED_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> EVENTS_RXSTARTED_A { + match self.bits { + false => EVENTS_RXSTARTED_A::NOT_GENERATED, + true => EVENTS_RXSTARTED_A::GENERATED, + } + } + #[doc = "Checks if the value of the field is `NOT_GENERATED`"] + #[inline(always)] + pub fn is_not_generated(&self) -> bool { + *self == EVENTS_RXSTARTED_A::NOT_GENERATED + } + #[doc = "Checks if the value of the field is `GENERATED`"] + #[inline(always)] + pub fn is_generated(&self) -> bool { + *self == EVENTS_RXSTARTED_A::GENERATED + } +} +#[doc = "Field `EVENTS_RXSTARTED` writer - UART receiver has started"] +pub type EVENTS_RXSTARTED_W<'a, const O: u8> = + crate::BitWriter<'a, u32, EVENTS_RXSTARTED_SPEC, EVENTS_RXSTARTED_A, O>; +impl<'a, const O: u8> EVENTS_RXSTARTED_W<'a, O> { + #[doc = "Event not generated"] + #[inline(always)] + pub fn not_generated(self) -> &'a mut W { + self.variant(EVENTS_RXSTARTED_A::NOT_GENERATED) + } + #[doc = "Event generated"] + #[inline(always)] + pub fn generated(self) -> &'a mut W { + self.variant(EVENTS_RXSTARTED_A::GENERATED) + } +} +impl R { + #[doc = "Bit 0 - UART receiver has started"] + #[inline(always)] + pub fn events_rxstarted(&self) -> EVENTS_RXSTARTED_R { + EVENTS_RXSTARTED_R::new((self.bits & 1) != 0) + } +} +impl W { + #[doc = "Bit 0 - UART receiver has started"] + #[inline(always)] + #[must_use] + pub fn events_rxstarted(&mut self) -> EVENTS_RXSTARTED_W<0> { + EVENTS_RXSTARTED_W::new(self) + } + #[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 = "UART receiver has started\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 [events_rxstarted](index.html) module"] +pub struct EVENTS_RXSTARTED_SPEC; +impl crate::RegisterSpec for EVENTS_RXSTARTED_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [events_rxstarted::R](R) reader structure"] +impl crate::Readable for EVENTS_RXSTARTED_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [events_rxstarted::W](W) writer structure"] +impl crate::Writable for EVENTS_RXSTARTED_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets EVENTS_RXSTARTED to value 0"] +impl crate::Resettable for EVENTS_RXSTARTED_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/uarte0/events_rxto.rs b/down-the-stack/dk_pac/src/uarte0/events_rxto.rs new file mode 100644 index 0000000..f3a1380 --- /dev/null +++ b/down-the-stack/dk_pac/src/uarte0/events_rxto.rs @@ -0,0 +1,127 @@ +#[doc = "Register `EVENTS_RXTO` 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 `EVENTS_RXTO` 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 `EVENTS_RXTO` reader - Receiver timeout"] +pub type EVENTS_RXTO_R = crate::BitReader; +#[doc = "Receiver timeout\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum EVENTS_RXTO_A { + #[doc = "0: Event not generated"] + NOT_GENERATED = 0, + #[doc = "1: Event generated"] + GENERATED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: EVENTS_RXTO_A) -> Self { + variant as u8 != 0 + } +} +impl EVENTS_RXTO_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> EVENTS_RXTO_A { + match self.bits { + false => EVENTS_RXTO_A::NOT_GENERATED, + true => EVENTS_RXTO_A::GENERATED, + } + } + #[doc = "Checks if the value of the field is `NOT_GENERATED`"] + #[inline(always)] + pub fn is_not_generated(&self) -> bool { + *self == EVENTS_RXTO_A::NOT_GENERATED + } + #[doc = "Checks if the value of the field is `GENERATED`"] + #[inline(always)] + pub fn is_generated(&self) -> bool { + *self == EVENTS_RXTO_A::GENERATED + } +} +#[doc = "Field `EVENTS_RXTO` writer - Receiver timeout"] +pub type EVENTS_RXTO_W<'a, const O: u8> = + crate::BitWriter<'a, u32, EVENTS_RXTO_SPEC, EVENTS_RXTO_A, O>; +impl<'a, const O: u8> EVENTS_RXTO_W<'a, O> { + #[doc = "Event not generated"] + #[inline(always)] + pub fn not_generated(self) -> &'a mut W { + self.variant(EVENTS_RXTO_A::NOT_GENERATED) + } + #[doc = "Event generated"] + #[inline(always)] + pub fn generated(self) -> &'a mut W { + self.variant(EVENTS_RXTO_A::GENERATED) + } +} +impl R { + #[doc = "Bit 0 - Receiver timeout"] + #[inline(always)] + pub fn events_rxto(&self) -> EVENTS_RXTO_R { + EVENTS_RXTO_R::new((self.bits & 1) != 0) + } +} +impl W { + #[doc = "Bit 0 - Receiver timeout"] + #[inline(always)] + #[must_use] + pub fn events_rxto(&mut self) -> EVENTS_RXTO_W<0> { + EVENTS_RXTO_W::new(self) + } + #[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 = "Receiver timeout\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 [events_rxto](index.html) module"] +pub struct EVENTS_RXTO_SPEC; +impl crate::RegisterSpec for EVENTS_RXTO_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [events_rxto::R](R) reader structure"] +impl crate::Readable for EVENTS_RXTO_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [events_rxto::W](W) writer structure"] +impl crate::Writable for EVENTS_RXTO_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets EVENTS_RXTO to value 0"] +impl crate::Resettable for EVENTS_RXTO_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/uarte0/events_txdrdy.rs b/down-the-stack/dk_pac/src/uarte0/events_txdrdy.rs new file mode 100644 index 0000000..b5a9b5b --- /dev/null +++ b/down-the-stack/dk_pac/src/uarte0/events_txdrdy.rs @@ -0,0 +1,127 @@ +#[doc = "Register `EVENTS_TXDRDY` 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 `EVENTS_TXDRDY` 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 `EVENTS_TXDRDY` reader - Data sent from TXD"] +pub type EVENTS_TXDRDY_R = crate::BitReader; +#[doc = "Data sent from TXD\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum EVENTS_TXDRDY_A { + #[doc = "0: Event not generated"] + NOT_GENERATED = 0, + #[doc = "1: Event generated"] + GENERATED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: EVENTS_TXDRDY_A) -> Self { + variant as u8 != 0 + } +} +impl EVENTS_TXDRDY_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> EVENTS_TXDRDY_A { + match self.bits { + false => EVENTS_TXDRDY_A::NOT_GENERATED, + true => EVENTS_TXDRDY_A::GENERATED, + } + } + #[doc = "Checks if the value of the field is `NOT_GENERATED`"] + #[inline(always)] + pub fn is_not_generated(&self) -> bool { + *self == EVENTS_TXDRDY_A::NOT_GENERATED + } + #[doc = "Checks if the value of the field is `GENERATED`"] + #[inline(always)] + pub fn is_generated(&self) -> bool { + *self == EVENTS_TXDRDY_A::GENERATED + } +} +#[doc = "Field `EVENTS_TXDRDY` writer - Data sent from TXD"] +pub type EVENTS_TXDRDY_W<'a, const O: u8> = + crate::BitWriter<'a, u32, EVENTS_TXDRDY_SPEC, EVENTS_TXDRDY_A, O>; +impl<'a, const O: u8> EVENTS_TXDRDY_W<'a, O> { + #[doc = "Event not generated"] + #[inline(always)] + pub fn not_generated(self) -> &'a mut W { + self.variant(EVENTS_TXDRDY_A::NOT_GENERATED) + } + #[doc = "Event generated"] + #[inline(always)] + pub fn generated(self) -> &'a mut W { + self.variant(EVENTS_TXDRDY_A::GENERATED) + } +} +impl R { + #[doc = "Bit 0 - Data sent from TXD"] + #[inline(always)] + pub fn events_txdrdy(&self) -> EVENTS_TXDRDY_R { + EVENTS_TXDRDY_R::new((self.bits & 1) != 0) + } +} +impl W { + #[doc = "Bit 0 - Data sent from TXD"] + #[inline(always)] + #[must_use] + pub fn events_txdrdy(&mut self) -> EVENTS_TXDRDY_W<0> { + EVENTS_TXDRDY_W::new(self) + } + #[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 = "Data sent from TXD\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 [events_txdrdy](index.html) module"] +pub struct EVENTS_TXDRDY_SPEC; +impl crate::RegisterSpec for EVENTS_TXDRDY_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [events_txdrdy::R](R) reader structure"] +impl crate::Readable for EVENTS_TXDRDY_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [events_txdrdy::W](W) writer structure"] +impl crate::Writable for EVENTS_TXDRDY_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets EVENTS_TXDRDY to value 0"] +impl crate::Resettable for EVENTS_TXDRDY_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/uarte0/events_txstarted.rs b/down-the-stack/dk_pac/src/uarte0/events_txstarted.rs new file mode 100644 index 0000000..2f21b79 --- /dev/null +++ b/down-the-stack/dk_pac/src/uarte0/events_txstarted.rs @@ -0,0 +1,127 @@ +#[doc = "Register `EVENTS_TXSTARTED` 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 `EVENTS_TXSTARTED` 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 `EVENTS_TXSTARTED` reader - UART transmitter has started"] +pub type EVENTS_TXSTARTED_R = crate::BitReader; +#[doc = "UART transmitter has started\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum EVENTS_TXSTARTED_A { + #[doc = "0: Event not generated"] + NOT_GENERATED = 0, + #[doc = "1: Event generated"] + GENERATED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: EVENTS_TXSTARTED_A) -> Self { + variant as u8 != 0 + } +} +impl EVENTS_TXSTARTED_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> EVENTS_TXSTARTED_A { + match self.bits { + false => EVENTS_TXSTARTED_A::NOT_GENERATED, + true => EVENTS_TXSTARTED_A::GENERATED, + } + } + #[doc = "Checks if the value of the field is `NOT_GENERATED`"] + #[inline(always)] + pub fn is_not_generated(&self) -> bool { + *self == EVENTS_TXSTARTED_A::NOT_GENERATED + } + #[doc = "Checks if the value of the field is `GENERATED`"] + #[inline(always)] + pub fn is_generated(&self) -> bool { + *self == EVENTS_TXSTARTED_A::GENERATED + } +} +#[doc = "Field `EVENTS_TXSTARTED` writer - UART transmitter has started"] +pub type EVENTS_TXSTARTED_W<'a, const O: u8> = + crate::BitWriter<'a, u32, EVENTS_TXSTARTED_SPEC, EVENTS_TXSTARTED_A, O>; +impl<'a, const O: u8> EVENTS_TXSTARTED_W<'a, O> { + #[doc = "Event not generated"] + #[inline(always)] + pub fn not_generated(self) -> &'a mut W { + self.variant(EVENTS_TXSTARTED_A::NOT_GENERATED) + } + #[doc = "Event generated"] + #[inline(always)] + pub fn generated(self) -> &'a mut W { + self.variant(EVENTS_TXSTARTED_A::GENERATED) + } +} +impl R { + #[doc = "Bit 0 - UART transmitter has started"] + #[inline(always)] + pub fn events_txstarted(&self) -> EVENTS_TXSTARTED_R { + EVENTS_TXSTARTED_R::new((self.bits & 1) != 0) + } +} +impl W { + #[doc = "Bit 0 - UART transmitter has started"] + #[inline(always)] + #[must_use] + pub fn events_txstarted(&mut self) -> EVENTS_TXSTARTED_W<0> { + EVENTS_TXSTARTED_W::new(self) + } + #[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 = "UART transmitter has started\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 [events_txstarted](index.html) module"] +pub struct EVENTS_TXSTARTED_SPEC; +impl crate::RegisterSpec for EVENTS_TXSTARTED_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [events_txstarted::R](R) reader structure"] +impl crate::Readable for EVENTS_TXSTARTED_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [events_txstarted::W](W) writer structure"] +impl crate::Writable for EVENTS_TXSTARTED_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets EVENTS_TXSTARTED to value 0"] +impl crate::Resettable for EVENTS_TXSTARTED_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/uarte0/events_txstopped.rs b/down-the-stack/dk_pac/src/uarte0/events_txstopped.rs new file mode 100644 index 0000000..6b37024 --- /dev/null +++ b/down-the-stack/dk_pac/src/uarte0/events_txstopped.rs @@ -0,0 +1,127 @@ +#[doc = "Register `EVENTS_TXSTOPPED` 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 `EVENTS_TXSTOPPED` 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 `EVENTS_TXSTOPPED` reader - Transmitter stopped"] +pub type EVENTS_TXSTOPPED_R = crate::BitReader; +#[doc = "Transmitter stopped\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum EVENTS_TXSTOPPED_A { + #[doc = "0: Event not generated"] + NOT_GENERATED = 0, + #[doc = "1: Event generated"] + GENERATED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: EVENTS_TXSTOPPED_A) -> Self { + variant as u8 != 0 + } +} +impl EVENTS_TXSTOPPED_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> EVENTS_TXSTOPPED_A { + match self.bits { + false => EVENTS_TXSTOPPED_A::NOT_GENERATED, + true => EVENTS_TXSTOPPED_A::GENERATED, + } + } + #[doc = "Checks if the value of the field is `NOT_GENERATED`"] + #[inline(always)] + pub fn is_not_generated(&self) -> bool { + *self == EVENTS_TXSTOPPED_A::NOT_GENERATED + } + #[doc = "Checks if the value of the field is `GENERATED`"] + #[inline(always)] + pub fn is_generated(&self) -> bool { + *self == EVENTS_TXSTOPPED_A::GENERATED + } +} +#[doc = "Field `EVENTS_TXSTOPPED` writer - Transmitter stopped"] +pub type EVENTS_TXSTOPPED_W<'a, const O: u8> = + crate::BitWriter<'a, u32, EVENTS_TXSTOPPED_SPEC, EVENTS_TXSTOPPED_A, O>; +impl<'a, const O: u8> EVENTS_TXSTOPPED_W<'a, O> { + #[doc = "Event not generated"] + #[inline(always)] + pub fn not_generated(self) -> &'a mut W { + self.variant(EVENTS_TXSTOPPED_A::NOT_GENERATED) + } + #[doc = "Event generated"] + #[inline(always)] + pub fn generated(self) -> &'a mut W { + self.variant(EVENTS_TXSTOPPED_A::GENERATED) + } +} +impl R { + #[doc = "Bit 0 - Transmitter stopped"] + #[inline(always)] + pub fn events_txstopped(&self) -> EVENTS_TXSTOPPED_R { + EVENTS_TXSTOPPED_R::new((self.bits & 1) != 0) + } +} +impl W { + #[doc = "Bit 0 - Transmitter stopped"] + #[inline(always)] + #[must_use] + pub fn events_txstopped(&mut self) -> EVENTS_TXSTOPPED_W<0> { + EVENTS_TXSTOPPED_W::new(self) + } + #[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 = "Transmitter stopped\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 [events_txstopped](index.html) module"] +pub struct EVENTS_TXSTOPPED_SPEC; +impl crate::RegisterSpec for EVENTS_TXSTOPPED_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [events_txstopped::R](R) reader structure"] +impl crate::Readable for EVENTS_TXSTOPPED_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [events_txstopped::W](W) writer structure"] +impl crate::Writable for EVENTS_TXSTOPPED_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets EVENTS_TXSTOPPED to value 0"] +impl crate::Resettable for EVENTS_TXSTOPPED_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/uarte0/inten.rs b/down-the-stack/dk_pac/src/uarte0/inten.rs new file mode 100644 index 0000000..a747107 --- /dev/null +++ b/down-the-stack/dk_pac/src/uarte0/inten.rs @@ -0,0 +1,736 @@ +#[doc = "Register `INTEN` 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 `INTEN` 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 `CTS` reader - Enable or disable interrupt for event CTS"] +pub type CTS_R = crate::BitReader; +#[doc = "Enable or disable interrupt for event CTS\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum CTS_A { + #[doc = "0: Disable"] + DISABLED = 0, + #[doc = "1: Enable"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: CTS_A) -> Self { + variant as u8 != 0 + } +} +impl CTS_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> CTS_A { + match self.bits { + false => CTS_A::DISABLED, + true => CTS_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == CTS_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == CTS_A::ENABLED + } +} +#[doc = "Field `CTS` writer - Enable or disable interrupt for event CTS"] +pub type CTS_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTEN_SPEC, CTS_A, O>; +impl<'a, const O: u8> CTS_W<'a, O> { + #[doc = "Disable"] + #[inline(always)] + pub fn disabled(self) -> &'a mut W { + self.variant(CTS_A::DISABLED) + } + #[doc = "Enable"] + #[inline(always)] + pub fn enabled(self) -> &'a mut W { + self.variant(CTS_A::ENABLED) + } +} +#[doc = "Field `NCTS` reader - Enable or disable interrupt for event NCTS"] +pub type NCTS_R = crate::BitReader; +#[doc = "Enable or disable interrupt for event NCTS\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum NCTS_A { + #[doc = "0: Disable"] + DISABLED = 0, + #[doc = "1: Enable"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: NCTS_A) -> Self { + variant as u8 != 0 + } +} +impl NCTS_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> NCTS_A { + match self.bits { + false => NCTS_A::DISABLED, + true => NCTS_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == NCTS_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == NCTS_A::ENABLED + } +} +#[doc = "Field `NCTS` writer - Enable or disable interrupt for event NCTS"] +pub type NCTS_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTEN_SPEC, NCTS_A, O>; +impl<'a, const O: u8> NCTS_W<'a, O> { + #[doc = "Disable"] + #[inline(always)] + pub fn disabled(self) -> &'a mut W { + self.variant(NCTS_A::DISABLED) + } + #[doc = "Enable"] + #[inline(always)] + pub fn enabled(self) -> &'a mut W { + self.variant(NCTS_A::ENABLED) + } +} +#[doc = "Field `RXDRDY` reader - Enable or disable interrupt for event RXDRDY"] +pub type RXDRDY_R = crate::BitReader; +#[doc = "Enable or disable interrupt for event RXDRDY\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum RXDRDY_A { + #[doc = "0: Disable"] + DISABLED = 0, + #[doc = "1: Enable"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: RXDRDY_A) -> Self { + variant as u8 != 0 + } +} +impl RXDRDY_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> RXDRDY_A { + match self.bits { + false => RXDRDY_A::DISABLED, + true => RXDRDY_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == RXDRDY_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == RXDRDY_A::ENABLED + } +} +#[doc = "Field `RXDRDY` writer - Enable or disable interrupt for event RXDRDY"] +pub type RXDRDY_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTEN_SPEC, RXDRDY_A, O>; +impl<'a, const O: u8> RXDRDY_W<'a, O> { + #[doc = "Disable"] + #[inline(always)] + pub fn disabled(self) -> &'a mut W { + self.variant(RXDRDY_A::DISABLED) + } + #[doc = "Enable"] + #[inline(always)] + pub fn enabled(self) -> &'a mut W { + self.variant(RXDRDY_A::ENABLED) + } +} +#[doc = "Field `ENDRX` reader - Enable or disable interrupt for event ENDRX"] +pub type ENDRX_R = crate::BitReader; +#[doc = "Enable or disable interrupt for event ENDRX\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum ENDRX_A { + #[doc = "0: Disable"] + DISABLED = 0, + #[doc = "1: Enable"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: ENDRX_A) -> Self { + variant as u8 != 0 + } +} +impl ENDRX_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> ENDRX_A { + match self.bits { + false => ENDRX_A::DISABLED, + true => ENDRX_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == ENDRX_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == ENDRX_A::ENABLED + } +} +#[doc = "Field `ENDRX` writer - Enable or disable interrupt for event ENDRX"] +pub type ENDRX_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTEN_SPEC, ENDRX_A, O>; +impl<'a, const O: u8> ENDRX_W<'a, O> { + #[doc = "Disable"] + #[inline(always)] + pub fn disabled(self) -> &'a mut W { + self.variant(ENDRX_A::DISABLED) + } + #[doc = "Enable"] + #[inline(always)] + pub fn enabled(self) -> &'a mut W { + self.variant(ENDRX_A::ENABLED) + } +} +#[doc = "Field `TXDRDY` reader - Enable or disable interrupt for event TXDRDY"] +pub type TXDRDY_R = crate::BitReader; +#[doc = "Enable or disable interrupt for event TXDRDY\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum TXDRDY_A { + #[doc = "0: Disable"] + DISABLED = 0, + #[doc = "1: Enable"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: TXDRDY_A) -> Self { + variant as u8 != 0 + } +} +impl TXDRDY_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> TXDRDY_A { + match self.bits { + false => TXDRDY_A::DISABLED, + true => TXDRDY_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == TXDRDY_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == TXDRDY_A::ENABLED + } +} +#[doc = "Field `TXDRDY` writer - Enable or disable interrupt for event TXDRDY"] +pub type TXDRDY_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTEN_SPEC, TXDRDY_A, O>; +impl<'a, const O: u8> TXDRDY_W<'a, O> { + #[doc = "Disable"] + #[inline(always)] + pub fn disabled(self) -> &'a mut W { + self.variant(TXDRDY_A::DISABLED) + } + #[doc = "Enable"] + #[inline(always)] + pub fn enabled(self) -> &'a mut W { + self.variant(TXDRDY_A::ENABLED) + } +} +#[doc = "Field `ENDTX` reader - Enable or disable interrupt for event ENDTX"] +pub type ENDTX_R = crate::BitReader; +#[doc = "Enable or disable interrupt for event ENDTX\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum ENDTX_A { + #[doc = "0: Disable"] + DISABLED = 0, + #[doc = "1: Enable"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: ENDTX_A) -> Self { + variant as u8 != 0 + } +} +impl ENDTX_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> ENDTX_A { + match self.bits { + false => ENDTX_A::DISABLED, + true => ENDTX_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == ENDTX_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == ENDTX_A::ENABLED + } +} +#[doc = "Field `ENDTX` writer - Enable or disable interrupt for event ENDTX"] +pub type ENDTX_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTEN_SPEC, ENDTX_A, O>; +impl<'a, const O: u8> ENDTX_W<'a, O> { + #[doc = "Disable"] + #[inline(always)] + pub fn disabled(self) -> &'a mut W { + self.variant(ENDTX_A::DISABLED) + } + #[doc = "Enable"] + #[inline(always)] + pub fn enabled(self) -> &'a mut W { + self.variant(ENDTX_A::ENABLED) + } +} +#[doc = "Field `ERROR` reader - Enable or disable interrupt for event ERROR"] +pub type ERROR_R = crate::BitReader; +#[doc = "Enable or disable interrupt for event ERROR\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum ERROR_A { + #[doc = "0: Disable"] + DISABLED = 0, + #[doc = "1: Enable"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: ERROR_A) -> Self { + variant as u8 != 0 + } +} +impl ERROR_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> ERROR_A { + match self.bits { + false => ERROR_A::DISABLED, + true => ERROR_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == ERROR_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == ERROR_A::ENABLED + } +} +#[doc = "Field `ERROR` writer - Enable or disable interrupt for event ERROR"] +pub type ERROR_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTEN_SPEC, ERROR_A, O>; +impl<'a, const O: u8> ERROR_W<'a, O> { + #[doc = "Disable"] + #[inline(always)] + pub fn disabled(self) -> &'a mut W { + self.variant(ERROR_A::DISABLED) + } + #[doc = "Enable"] + #[inline(always)] + pub fn enabled(self) -> &'a mut W { + self.variant(ERROR_A::ENABLED) + } +} +#[doc = "Field `RXTO` reader - Enable or disable interrupt for event RXTO"] +pub type RXTO_R = crate::BitReader; +#[doc = "Enable or disable interrupt for event RXTO\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum RXTO_A { + #[doc = "0: Disable"] + DISABLED = 0, + #[doc = "1: Enable"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: RXTO_A) -> Self { + variant as u8 != 0 + } +} +impl RXTO_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> RXTO_A { + match self.bits { + false => RXTO_A::DISABLED, + true => RXTO_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == RXTO_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == RXTO_A::ENABLED + } +} +#[doc = "Field `RXTO` writer - Enable or disable interrupt for event RXTO"] +pub type RXTO_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTEN_SPEC, RXTO_A, O>; +impl<'a, const O: u8> RXTO_W<'a, O> { + #[doc = "Disable"] + #[inline(always)] + pub fn disabled(self) -> &'a mut W { + self.variant(RXTO_A::DISABLED) + } + #[doc = "Enable"] + #[inline(always)] + pub fn enabled(self) -> &'a mut W { + self.variant(RXTO_A::ENABLED) + } +} +#[doc = "Field `RXSTARTED` reader - Enable or disable interrupt for event RXSTARTED"] +pub type RXSTARTED_R = crate::BitReader; +#[doc = "Enable or disable interrupt for event RXSTARTED\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum RXSTARTED_A { + #[doc = "0: Disable"] + DISABLED = 0, + #[doc = "1: Enable"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: RXSTARTED_A) -> Self { + variant as u8 != 0 + } +} +impl RXSTARTED_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> RXSTARTED_A { + match self.bits { + false => RXSTARTED_A::DISABLED, + true => RXSTARTED_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == RXSTARTED_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == RXSTARTED_A::ENABLED + } +} +#[doc = "Field `RXSTARTED` writer - Enable or disable interrupt for event RXSTARTED"] +pub type RXSTARTED_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTEN_SPEC, RXSTARTED_A, O>; +impl<'a, const O: u8> RXSTARTED_W<'a, O> { + #[doc = "Disable"] + #[inline(always)] + pub fn disabled(self) -> &'a mut W { + self.variant(RXSTARTED_A::DISABLED) + } + #[doc = "Enable"] + #[inline(always)] + pub fn enabled(self) -> &'a mut W { + self.variant(RXSTARTED_A::ENABLED) + } +} +#[doc = "Field `TXSTARTED` reader - Enable or disable interrupt for event TXSTARTED"] +pub type TXSTARTED_R = crate::BitReader; +#[doc = "Enable or disable interrupt for event TXSTARTED\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum TXSTARTED_A { + #[doc = "0: Disable"] + DISABLED = 0, + #[doc = "1: Enable"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: TXSTARTED_A) -> Self { + variant as u8 != 0 + } +} +impl TXSTARTED_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> TXSTARTED_A { + match self.bits { + false => TXSTARTED_A::DISABLED, + true => TXSTARTED_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == TXSTARTED_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == TXSTARTED_A::ENABLED + } +} +#[doc = "Field `TXSTARTED` writer - Enable or disable interrupt for event TXSTARTED"] +pub type TXSTARTED_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTEN_SPEC, TXSTARTED_A, O>; +impl<'a, const O: u8> TXSTARTED_W<'a, O> { + #[doc = "Disable"] + #[inline(always)] + pub fn disabled(self) -> &'a mut W { + self.variant(TXSTARTED_A::DISABLED) + } + #[doc = "Enable"] + #[inline(always)] + pub fn enabled(self) -> &'a mut W { + self.variant(TXSTARTED_A::ENABLED) + } +} +#[doc = "Field `TXSTOPPED` reader - Enable or disable interrupt for event TXSTOPPED"] +pub type TXSTOPPED_R = crate::BitReader; +#[doc = "Enable or disable interrupt for event TXSTOPPED\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum TXSTOPPED_A { + #[doc = "0: Disable"] + DISABLED = 0, + #[doc = "1: Enable"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: TXSTOPPED_A) -> Self { + variant as u8 != 0 + } +} +impl TXSTOPPED_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> TXSTOPPED_A { + match self.bits { + false => TXSTOPPED_A::DISABLED, + true => TXSTOPPED_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == TXSTOPPED_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == TXSTOPPED_A::ENABLED + } +} +#[doc = "Field `TXSTOPPED` writer - Enable or disable interrupt for event TXSTOPPED"] +pub type TXSTOPPED_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTEN_SPEC, TXSTOPPED_A, O>; +impl<'a, const O: u8> TXSTOPPED_W<'a, O> { + #[doc = "Disable"] + #[inline(always)] + pub fn disabled(self) -> &'a mut W { + self.variant(TXSTOPPED_A::DISABLED) + } + #[doc = "Enable"] + #[inline(always)] + pub fn enabled(self) -> &'a mut W { + self.variant(TXSTOPPED_A::ENABLED) + } +} +impl R { + #[doc = "Bit 0 - Enable or disable interrupt for event CTS"] + #[inline(always)] + pub fn cts(&self) -> CTS_R { + CTS_R::new((self.bits & 1) != 0) + } + #[doc = "Bit 1 - Enable or disable interrupt for event NCTS"] + #[inline(always)] + pub fn ncts(&self) -> NCTS_R { + NCTS_R::new(((self.bits >> 1) & 1) != 0) + } + #[doc = "Bit 2 - Enable or disable interrupt for event RXDRDY"] + #[inline(always)] + pub fn rxdrdy(&self) -> RXDRDY_R { + RXDRDY_R::new(((self.bits >> 2) & 1) != 0) + } + #[doc = "Bit 4 - Enable or disable interrupt for event ENDRX"] + #[inline(always)] + pub fn endrx(&self) -> ENDRX_R { + ENDRX_R::new(((self.bits >> 4) & 1) != 0) + } + #[doc = "Bit 7 - Enable or disable interrupt for event TXDRDY"] + #[inline(always)] + pub fn txdrdy(&self) -> TXDRDY_R { + TXDRDY_R::new(((self.bits >> 7) & 1) != 0) + } + #[doc = "Bit 8 - Enable or disable interrupt for event ENDTX"] + #[inline(always)] + pub fn endtx(&self) -> ENDTX_R { + ENDTX_R::new(((self.bits >> 8) & 1) != 0) + } + #[doc = "Bit 9 - Enable or disable interrupt for event ERROR"] + #[inline(always)] + pub fn error(&self) -> ERROR_R { + ERROR_R::new(((self.bits >> 9) & 1) != 0) + } + #[doc = "Bit 17 - Enable or disable interrupt for event RXTO"] + #[inline(always)] + pub fn rxto(&self) -> RXTO_R { + RXTO_R::new(((self.bits >> 17) & 1) != 0) + } + #[doc = "Bit 19 - Enable or disable interrupt for event RXSTARTED"] + #[inline(always)] + pub fn rxstarted(&self) -> RXSTARTED_R { + RXSTARTED_R::new(((self.bits >> 19) & 1) != 0) + } + #[doc = "Bit 20 - Enable or disable interrupt for event TXSTARTED"] + #[inline(always)] + pub fn txstarted(&self) -> TXSTARTED_R { + TXSTARTED_R::new(((self.bits >> 20) & 1) != 0) + } + #[doc = "Bit 22 - Enable or disable interrupt for event TXSTOPPED"] + #[inline(always)] + pub fn txstopped(&self) -> TXSTOPPED_R { + TXSTOPPED_R::new(((self.bits >> 22) & 1) != 0) + } +} +impl W { + #[doc = "Bit 0 - Enable or disable interrupt for event CTS"] + #[inline(always)] + #[must_use] + pub fn cts(&mut self) -> CTS_W<0> { + CTS_W::new(self) + } + #[doc = "Bit 1 - Enable or disable interrupt for event NCTS"] + #[inline(always)] + #[must_use] + pub fn ncts(&mut self) -> NCTS_W<1> { + NCTS_W::new(self) + } + #[doc = "Bit 2 - Enable or disable interrupt for event RXDRDY"] + #[inline(always)] + #[must_use] + pub fn rxdrdy(&mut self) -> RXDRDY_W<2> { + RXDRDY_W::new(self) + } + #[doc = "Bit 4 - Enable or disable interrupt for event ENDRX"] + #[inline(always)] + #[must_use] + pub fn endrx(&mut self) -> ENDRX_W<4> { + ENDRX_W::new(self) + } + #[doc = "Bit 7 - Enable or disable interrupt for event TXDRDY"] + #[inline(always)] + #[must_use] + pub fn txdrdy(&mut self) -> TXDRDY_W<7> { + TXDRDY_W::new(self) + } + #[doc = "Bit 8 - Enable or disable interrupt for event ENDTX"] + #[inline(always)] + #[must_use] + pub fn endtx(&mut self) -> ENDTX_W<8> { + ENDTX_W::new(self) + } + #[doc = "Bit 9 - Enable or disable interrupt for event ERROR"] + #[inline(always)] + #[must_use] + pub fn error(&mut self) -> ERROR_W<9> { + ERROR_W::new(self) + } + #[doc = "Bit 17 - Enable or disable interrupt for event RXTO"] + #[inline(always)] + #[must_use] + pub fn rxto(&mut self) -> RXTO_W<17> { + RXTO_W::new(self) + } + #[doc = "Bit 19 - Enable or disable interrupt for event RXSTARTED"] + #[inline(always)] + #[must_use] + pub fn rxstarted(&mut self) -> RXSTARTED_W<19> { + RXSTARTED_W::new(self) + } + #[doc = "Bit 20 - Enable or disable interrupt for event TXSTARTED"] + #[inline(always)] + #[must_use] + pub fn txstarted(&mut self) -> TXSTARTED_W<20> { + TXSTARTED_W::new(self) + } + #[doc = "Bit 22 - Enable or disable interrupt for event TXSTOPPED"] + #[inline(always)] + #[must_use] + pub fn txstopped(&mut self) -> TXSTOPPED_W<22> { + TXSTOPPED_W::new(self) + } + #[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 = "Enable or disable interrupt\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 [inten](index.html) module"] +pub struct INTEN_SPEC; +impl crate::RegisterSpec for INTEN_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [inten::R](R) reader structure"] +impl crate::Readable for INTEN_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [inten::W](W) writer structure"] +impl crate::Writable for INTEN_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets INTEN to value 0"] +impl crate::Resettable for INTEN_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/uarte0/intenclr.rs b/down-the-stack/dk_pac/src/uarte0/intenclr.rs new file mode 100644 index 0000000..0acfd42 --- /dev/null +++ b/down-the-stack/dk_pac/src/uarte0/intenclr.rs @@ -0,0 +1,813 @@ +#[doc = "Register `INTENCLR` 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 `INTENCLR` 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 `CTS` reader - Write '1' to disable interrupt for event CTS"] +pub type CTS_R = crate::BitReader; +#[doc = "Write '1' to disable interrupt for event CTS\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum CTS_A { + #[doc = "0: Read: Disabled"] + DISABLED = 0, + #[doc = "1: Read: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: CTS_A) -> Self { + variant as u8 != 0 + } +} +impl CTS_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> CTS_A { + match self.bits { + false => CTS_A::DISABLED, + true => CTS_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == CTS_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == CTS_A::ENABLED + } +} +#[doc = "Write '1' to disable interrupt for event CTS\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum CTS_AW { + #[doc = "1: Disable"] + CLEAR = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: CTS_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `CTS` writer - Write '1' to disable interrupt for event CTS"] +pub type CTS_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENCLR_SPEC, CTS_AW, O>; +impl<'a, const O: u8> CTS_W<'a, O> { + #[doc = "Disable"] + #[inline(always)] + pub fn clear(self) -> &'a mut W { + self.variant(CTS_AW::CLEAR) + } +} +#[doc = "Field `NCTS` reader - Write '1' to disable interrupt for event NCTS"] +pub type NCTS_R = crate::BitReader; +#[doc = "Write '1' to disable interrupt for event NCTS\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum NCTS_A { + #[doc = "0: Read: Disabled"] + DISABLED = 0, + #[doc = "1: Read: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: NCTS_A) -> Self { + variant as u8 != 0 + } +} +impl NCTS_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> NCTS_A { + match self.bits { + false => NCTS_A::DISABLED, + true => NCTS_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == NCTS_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == NCTS_A::ENABLED + } +} +#[doc = "Write '1' to disable interrupt for event NCTS\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum NCTS_AW { + #[doc = "1: Disable"] + CLEAR = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: NCTS_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `NCTS` writer - Write '1' to disable interrupt for event NCTS"] +pub type NCTS_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENCLR_SPEC, NCTS_AW, O>; +impl<'a, const O: u8> NCTS_W<'a, O> { + #[doc = "Disable"] + #[inline(always)] + pub fn clear(self) -> &'a mut W { + self.variant(NCTS_AW::CLEAR) + } +} +#[doc = "Field `RXDRDY` reader - Write '1' to disable interrupt for event RXDRDY"] +pub type RXDRDY_R = crate::BitReader; +#[doc = "Write '1' to disable interrupt for event RXDRDY\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum RXDRDY_A { + #[doc = "0: Read: Disabled"] + DISABLED = 0, + #[doc = "1: Read: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: RXDRDY_A) -> Self { + variant as u8 != 0 + } +} +impl RXDRDY_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> RXDRDY_A { + match self.bits { + false => RXDRDY_A::DISABLED, + true => RXDRDY_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == RXDRDY_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == RXDRDY_A::ENABLED + } +} +#[doc = "Write '1' to disable interrupt for event RXDRDY\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum RXDRDY_AW { + #[doc = "1: Disable"] + CLEAR = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: RXDRDY_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `RXDRDY` writer - Write '1' to disable interrupt for event RXDRDY"] +pub type RXDRDY_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENCLR_SPEC, RXDRDY_AW, O>; +impl<'a, const O: u8> RXDRDY_W<'a, O> { + #[doc = "Disable"] + #[inline(always)] + pub fn clear(self) -> &'a mut W { + self.variant(RXDRDY_AW::CLEAR) + } +} +#[doc = "Field `ENDRX` reader - Write '1' to disable interrupt for event ENDRX"] +pub type ENDRX_R = crate::BitReader; +#[doc = "Write '1' to disable interrupt for event ENDRX\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum ENDRX_A { + #[doc = "0: Read: Disabled"] + DISABLED = 0, + #[doc = "1: Read: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: ENDRX_A) -> Self { + variant as u8 != 0 + } +} +impl ENDRX_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> ENDRX_A { + match self.bits { + false => ENDRX_A::DISABLED, + true => ENDRX_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == ENDRX_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == ENDRX_A::ENABLED + } +} +#[doc = "Write '1' to disable interrupt for event ENDRX\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum ENDRX_AW { + #[doc = "1: Disable"] + CLEAR = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: ENDRX_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `ENDRX` writer - Write '1' to disable interrupt for event ENDRX"] +pub type ENDRX_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENCLR_SPEC, ENDRX_AW, O>; +impl<'a, const O: u8> ENDRX_W<'a, O> { + #[doc = "Disable"] + #[inline(always)] + pub fn clear(self) -> &'a mut W { + self.variant(ENDRX_AW::CLEAR) + } +} +#[doc = "Field `TXDRDY` reader - Write '1' to disable interrupt for event TXDRDY"] +pub type TXDRDY_R = crate::BitReader; +#[doc = "Write '1' to disable interrupt for event TXDRDY\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum TXDRDY_A { + #[doc = "0: Read: Disabled"] + DISABLED = 0, + #[doc = "1: Read: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: TXDRDY_A) -> Self { + variant as u8 != 0 + } +} +impl TXDRDY_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> TXDRDY_A { + match self.bits { + false => TXDRDY_A::DISABLED, + true => TXDRDY_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == TXDRDY_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == TXDRDY_A::ENABLED + } +} +#[doc = "Write '1' to disable interrupt for event TXDRDY\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum TXDRDY_AW { + #[doc = "1: Disable"] + CLEAR = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: TXDRDY_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `TXDRDY` writer - Write '1' to disable interrupt for event TXDRDY"] +pub type TXDRDY_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENCLR_SPEC, TXDRDY_AW, O>; +impl<'a, const O: u8> TXDRDY_W<'a, O> { + #[doc = "Disable"] + #[inline(always)] + pub fn clear(self) -> &'a mut W { + self.variant(TXDRDY_AW::CLEAR) + } +} +#[doc = "Field `ENDTX` reader - Write '1' to disable interrupt for event ENDTX"] +pub type ENDTX_R = crate::BitReader; +#[doc = "Write '1' to disable interrupt for event ENDTX\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum ENDTX_A { + #[doc = "0: Read: Disabled"] + DISABLED = 0, + #[doc = "1: Read: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: ENDTX_A) -> Self { + variant as u8 != 0 + } +} +impl ENDTX_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> ENDTX_A { + match self.bits { + false => ENDTX_A::DISABLED, + true => ENDTX_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == ENDTX_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == ENDTX_A::ENABLED + } +} +#[doc = "Write '1' to disable interrupt for event ENDTX\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum ENDTX_AW { + #[doc = "1: Disable"] + CLEAR = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: ENDTX_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `ENDTX` writer - Write '1' to disable interrupt for event ENDTX"] +pub type ENDTX_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENCLR_SPEC, ENDTX_AW, O>; +impl<'a, const O: u8> ENDTX_W<'a, O> { + #[doc = "Disable"] + #[inline(always)] + pub fn clear(self) -> &'a mut W { + self.variant(ENDTX_AW::CLEAR) + } +} +#[doc = "Field `ERROR` reader - Write '1' to disable interrupt for event ERROR"] +pub type ERROR_R = crate::BitReader; +#[doc = "Write '1' to disable interrupt for event ERROR\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum ERROR_A { + #[doc = "0: Read: Disabled"] + DISABLED = 0, + #[doc = "1: Read: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: ERROR_A) -> Self { + variant as u8 != 0 + } +} +impl ERROR_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> ERROR_A { + match self.bits { + false => ERROR_A::DISABLED, + true => ERROR_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == ERROR_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == ERROR_A::ENABLED + } +} +#[doc = "Write '1' to disable interrupt for event ERROR\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum ERROR_AW { + #[doc = "1: Disable"] + CLEAR = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: ERROR_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `ERROR` writer - Write '1' to disable interrupt for event ERROR"] +pub type ERROR_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENCLR_SPEC, ERROR_AW, O>; +impl<'a, const O: u8> ERROR_W<'a, O> { + #[doc = "Disable"] + #[inline(always)] + pub fn clear(self) -> &'a mut W { + self.variant(ERROR_AW::CLEAR) + } +} +#[doc = "Field `RXTO` reader - Write '1' to disable interrupt for event RXTO"] +pub type RXTO_R = crate::BitReader; +#[doc = "Write '1' to disable interrupt for event RXTO\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum RXTO_A { + #[doc = "0: Read: Disabled"] + DISABLED = 0, + #[doc = "1: Read: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: RXTO_A) -> Self { + variant as u8 != 0 + } +} +impl RXTO_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> RXTO_A { + match self.bits { + false => RXTO_A::DISABLED, + true => RXTO_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == RXTO_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == RXTO_A::ENABLED + } +} +#[doc = "Write '1' to disable interrupt for event RXTO\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum RXTO_AW { + #[doc = "1: Disable"] + CLEAR = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: RXTO_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `RXTO` writer - Write '1' to disable interrupt for event RXTO"] +pub type RXTO_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENCLR_SPEC, RXTO_AW, O>; +impl<'a, const O: u8> RXTO_W<'a, O> { + #[doc = "Disable"] + #[inline(always)] + pub fn clear(self) -> &'a mut W { + self.variant(RXTO_AW::CLEAR) + } +} +#[doc = "Field `RXSTARTED` reader - Write '1' to disable interrupt for event RXSTARTED"] +pub type RXSTARTED_R = crate::BitReader; +#[doc = "Write '1' to disable interrupt for event RXSTARTED\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum RXSTARTED_A { + #[doc = "0: Read: Disabled"] + DISABLED = 0, + #[doc = "1: Read: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: RXSTARTED_A) -> Self { + variant as u8 != 0 + } +} +impl RXSTARTED_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> RXSTARTED_A { + match self.bits { + false => RXSTARTED_A::DISABLED, + true => RXSTARTED_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == RXSTARTED_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == RXSTARTED_A::ENABLED + } +} +#[doc = "Write '1' to disable interrupt for event RXSTARTED\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum RXSTARTED_AW { + #[doc = "1: Disable"] + CLEAR = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: RXSTARTED_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `RXSTARTED` writer - Write '1' to disable interrupt for event RXSTARTED"] +pub type RXSTARTED_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENCLR_SPEC, RXSTARTED_AW, O>; +impl<'a, const O: u8> RXSTARTED_W<'a, O> { + #[doc = "Disable"] + #[inline(always)] + pub fn clear(self) -> &'a mut W { + self.variant(RXSTARTED_AW::CLEAR) + } +} +#[doc = "Field `TXSTARTED` reader - Write '1' to disable interrupt for event TXSTARTED"] +pub type TXSTARTED_R = crate::BitReader; +#[doc = "Write '1' to disable interrupt for event TXSTARTED\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum TXSTARTED_A { + #[doc = "0: Read: Disabled"] + DISABLED = 0, + #[doc = "1: Read: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: TXSTARTED_A) -> Self { + variant as u8 != 0 + } +} +impl TXSTARTED_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> TXSTARTED_A { + match self.bits { + false => TXSTARTED_A::DISABLED, + true => TXSTARTED_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == TXSTARTED_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == TXSTARTED_A::ENABLED + } +} +#[doc = "Write '1' to disable interrupt for event TXSTARTED\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum TXSTARTED_AW { + #[doc = "1: Disable"] + CLEAR = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: TXSTARTED_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `TXSTARTED` writer - Write '1' to disable interrupt for event TXSTARTED"] +pub type TXSTARTED_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENCLR_SPEC, TXSTARTED_AW, O>; +impl<'a, const O: u8> TXSTARTED_W<'a, O> { + #[doc = "Disable"] + #[inline(always)] + pub fn clear(self) -> &'a mut W { + self.variant(TXSTARTED_AW::CLEAR) + } +} +#[doc = "Field `TXSTOPPED` reader - Write '1' to disable interrupt for event TXSTOPPED"] +pub type TXSTOPPED_R = crate::BitReader; +#[doc = "Write '1' to disable interrupt for event TXSTOPPED\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum TXSTOPPED_A { + #[doc = "0: Read: Disabled"] + DISABLED = 0, + #[doc = "1: Read: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: TXSTOPPED_A) -> Self { + variant as u8 != 0 + } +} +impl TXSTOPPED_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> TXSTOPPED_A { + match self.bits { + false => TXSTOPPED_A::DISABLED, + true => TXSTOPPED_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == TXSTOPPED_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == TXSTOPPED_A::ENABLED + } +} +#[doc = "Write '1' to disable interrupt for event TXSTOPPED\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum TXSTOPPED_AW { + #[doc = "1: Disable"] + CLEAR = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: TXSTOPPED_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `TXSTOPPED` writer - Write '1' to disable interrupt for event TXSTOPPED"] +pub type TXSTOPPED_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENCLR_SPEC, TXSTOPPED_AW, O>; +impl<'a, const O: u8> TXSTOPPED_W<'a, O> { + #[doc = "Disable"] + #[inline(always)] + pub fn clear(self) -> &'a mut W { + self.variant(TXSTOPPED_AW::CLEAR) + } +} +impl R { + #[doc = "Bit 0 - Write '1' to disable interrupt for event CTS"] + #[inline(always)] + pub fn cts(&self) -> CTS_R { + CTS_R::new((self.bits & 1) != 0) + } + #[doc = "Bit 1 - Write '1' to disable interrupt for event NCTS"] + #[inline(always)] + pub fn ncts(&self) -> NCTS_R { + NCTS_R::new(((self.bits >> 1) & 1) != 0) + } + #[doc = "Bit 2 - Write '1' to disable interrupt for event RXDRDY"] + #[inline(always)] + pub fn rxdrdy(&self) -> RXDRDY_R { + RXDRDY_R::new(((self.bits >> 2) & 1) != 0) + } + #[doc = "Bit 4 - Write '1' to disable interrupt for event ENDRX"] + #[inline(always)] + pub fn endrx(&self) -> ENDRX_R { + ENDRX_R::new(((self.bits >> 4) & 1) != 0) + } + #[doc = "Bit 7 - Write '1' to disable interrupt for event TXDRDY"] + #[inline(always)] + pub fn txdrdy(&self) -> TXDRDY_R { + TXDRDY_R::new(((self.bits >> 7) & 1) != 0) + } + #[doc = "Bit 8 - Write '1' to disable interrupt for event ENDTX"] + #[inline(always)] + pub fn endtx(&self) -> ENDTX_R { + ENDTX_R::new(((self.bits >> 8) & 1) != 0) + } + #[doc = "Bit 9 - Write '1' to disable interrupt for event ERROR"] + #[inline(always)] + pub fn error(&self) -> ERROR_R { + ERROR_R::new(((self.bits >> 9) & 1) != 0) + } + #[doc = "Bit 17 - Write '1' to disable interrupt for event RXTO"] + #[inline(always)] + pub fn rxto(&self) -> RXTO_R { + RXTO_R::new(((self.bits >> 17) & 1) != 0) + } + #[doc = "Bit 19 - Write '1' to disable interrupt for event RXSTARTED"] + #[inline(always)] + pub fn rxstarted(&self) -> RXSTARTED_R { + RXSTARTED_R::new(((self.bits >> 19) & 1) != 0) + } + #[doc = "Bit 20 - Write '1' to disable interrupt for event TXSTARTED"] + #[inline(always)] + pub fn txstarted(&self) -> TXSTARTED_R { + TXSTARTED_R::new(((self.bits >> 20) & 1) != 0) + } + #[doc = "Bit 22 - Write '1' to disable interrupt for event TXSTOPPED"] + #[inline(always)] + pub fn txstopped(&self) -> TXSTOPPED_R { + TXSTOPPED_R::new(((self.bits >> 22) & 1) != 0) + } +} +impl W { + #[doc = "Bit 0 - Write '1' to disable interrupt for event CTS"] + #[inline(always)] + #[must_use] + pub fn cts(&mut self) -> CTS_W<0> { + CTS_W::new(self) + } + #[doc = "Bit 1 - Write '1' to disable interrupt for event NCTS"] + #[inline(always)] + #[must_use] + pub fn ncts(&mut self) -> NCTS_W<1> { + NCTS_W::new(self) + } + #[doc = "Bit 2 - Write '1' to disable interrupt for event RXDRDY"] + #[inline(always)] + #[must_use] + pub fn rxdrdy(&mut self) -> RXDRDY_W<2> { + RXDRDY_W::new(self) + } + #[doc = "Bit 4 - Write '1' to disable interrupt for event ENDRX"] + #[inline(always)] + #[must_use] + pub fn endrx(&mut self) -> ENDRX_W<4> { + ENDRX_W::new(self) + } + #[doc = "Bit 7 - Write '1' to disable interrupt for event TXDRDY"] + #[inline(always)] + #[must_use] + pub fn txdrdy(&mut self) -> TXDRDY_W<7> { + TXDRDY_W::new(self) + } + #[doc = "Bit 8 - Write '1' to disable interrupt for event ENDTX"] + #[inline(always)] + #[must_use] + pub fn endtx(&mut self) -> ENDTX_W<8> { + ENDTX_W::new(self) + } + #[doc = "Bit 9 - Write '1' to disable interrupt for event ERROR"] + #[inline(always)] + #[must_use] + pub fn error(&mut self) -> ERROR_W<9> { + ERROR_W::new(self) + } + #[doc = "Bit 17 - Write '1' to disable interrupt for event RXTO"] + #[inline(always)] + #[must_use] + pub fn rxto(&mut self) -> RXTO_W<17> { + RXTO_W::new(self) + } + #[doc = "Bit 19 - Write '1' to disable interrupt for event RXSTARTED"] + #[inline(always)] + #[must_use] + pub fn rxstarted(&mut self) -> RXSTARTED_W<19> { + RXSTARTED_W::new(self) + } + #[doc = "Bit 20 - Write '1' to disable interrupt for event TXSTARTED"] + #[inline(always)] + #[must_use] + pub fn txstarted(&mut self) -> TXSTARTED_W<20> { + TXSTARTED_W::new(self) + } + #[doc = "Bit 22 - Write '1' to disable interrupt for event TXSTOPPED"] + #[inline(always)] + #[must_use] + pub fn txstopped(&mut self) -> TXSTOPPED_W<22> { + TXSTOPPED_W::new(self) + } + #[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 = "Disable interrupt\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 [intenclr](index.html) module"] +pub struct INTENCLR_SPEC; +impl crate::RegisterSpec for INTENCLR_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [intenclr::R](R) reader structure"] +impl crate::Readable for INTENCLR_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [intenclr::W](W) writer structure"] +impl crate::Writable for INTENCLR_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets INTENCLR to value 0"] +impl crate::Resettable for INTENCLR_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/uarte0/intenset.rs b/down-the-stack/dk_pac/src/uarte0/intenset.rs new file mode 100644 index 0000000..8e53bc8 --- /dev/null +++ b/down-the-stack/dk_pac/src/uarte0/intenset.rs @@ -0,0 +1,813 @@ +#[doc = "Register `INTENSET` 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 `INTENSET` 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 `CTS` reader - Write '1' to enable interrupt for event CTS"] +pub type CTS_R = crate::BitReader; +#[doc = "Write '1' to enable interrupt for event CTS\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum CTS_A { + #[doc = "0: Read: Disabled"] + DISABLED = 0, + #[doc = "1: Read: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: CTS_A) -> Self { + variant as u8 != 0 + } +} +impl CTS_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> CTS_A { + match self.bits { + false => CTS_A::DISABLED, + true => CTS_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == CTS_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == CTS_A::ENABLED + } +} +#[doc = "Write '1' to enable interrupt for event CTS\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum CTS_AW { + #[doc = "1: Enable"] + SET = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: CTS_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `CTS` writer - Write '1' to enable interrupt for event CTS"] +pub type CTS_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENSET_SPEC, CTS_AW, O>; +impl<'a, const O: u8> CTS_W<'a, O> { + #[doc = "Enable"] + #[inline(always)] + pub fn set(self) -> &'a mut W { + self.variant(CTS_AW::SET) + } +} +#[doc = "Field `NCTS` reader - Write '1' to enable interrupt for event NCTS"] +pub type NCTS_R = crate::BitReader; +#[doc = "Write '1' to enable interrupt for event NCTS\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum NCTS_A { + #[doc = "0: Read: Disabled"] + DISABLED = 0, + #[doc = "1: Read: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: NCTS_A) -> Self { + variant as u8 != 0 + } +} +impl NCTS_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> NCTS_A { + match self.bits { + false => NCTS_A::DISABLED, + true => NCTS_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == NCTS_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == NCTS_A::ENABLED + } +} +#[doc = "Write '1' to enable interrupt for event NCTS\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum NCTS_AW { + #[doc = "1: Enable"] + SET = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: NCTS_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `NCTS` writer - Write '1' to enable interrupt for event NCTS"] +pub type NCTS_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENSET_SPEC, NCTS_AW, O>; +impl<'a, const O: u8> NCTS_W<'a, O> { + #[doc = "Enable"] + #[inline(always)] + pub fn set(self) -> &'a mut W { + self.variant(NCTS_AW::SET) + } +} +#[doc = "Field `RXDRDY` reader - Write '1' to enable interrupt for event RXDRDY"] +pub type RXDRDY_R = crate::BitReader; +#[doc = "Write '1' to enable interrupt for event RXDRDY\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum RXDRDY_A { + #[doc = "0: Read: Disabled"] + DISABLED = 0, + #[doc = "1: Read: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: RXDRDY_A) -> Self { + variant as u8 != 0 + } +} +impl RXDRDY_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> RXDRDY_A { + match self.bits { + false => RXDRDY_A::DISABLED, + true => RXDRDY_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == RXDRDY_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == RXDRDY_A::ENABLED + } +} +#[doc = "Write '1' to enable interrupt for event RXDRDY\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum RXDRDY_AW { + #[doc = "1: Enable"] + SET = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: RXDRDY_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `RXDRDY` writer - Write '1' to enable interrupt for event RXDRDY"] +pub type RXDRDY_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENSET_SPEC, RXDRDY_AW, O>; +impl<'a, const O: u8> RXDRDY_W<'a, O> { + #[doc = "Enable"] + #[inline(always)] + pub fn set(self) -> &'a mut W { + self.variant(RXDRDY_AW::SET) + } +} +#[doc = "Field `ENDRX` reader - Write '1' to enable interrupt for event ENDRX"] +pub type ENDRX_R = crate::BitReader; +#[doc = "Write '1' to enable interrupt for event ENDRX\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum ENDRX_A { + #[doc = "0: Read: Disabled"] + DISABLED = 0, + #[doc = "1: Read: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: ENDRX_A) -> Self { + variant as u8 != 0 + } +} +impl ENDRX_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> ENDRX_A { + match self.bits { + false => ENDRX_A::DISABLED, + true => ENDRX_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == ENDRX_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == ENDRX_A::ENABLED + } +} +#[doc = "Write '1' to enable interrupt for event ENDRX\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum ENDRX_AW { + #[doc = "1: Enable"] + SET = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: ENDRX_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `ENDRX` writer - Write '1' to enable interrupt for event ENDRX"] +pub type ENDRX_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENSET_SPEC, ENDRX_AW, O>; +impl<'a, const O: u8> ENDRX_W<'a, O> { + #[doc = "Enable"] + #[inline(always)] + pub fn set(self) -> &'a mut W { + self.variant(ENDRX_AW::SET) + } +} +#[doc = "Field `TXDRDY` reader - Write '1' to enable interrupt for event TXDRDY"] +pub type TXDRDY_R = crate::BitReader; +#[doc = "Write '1' to enable interrupt for event TXDRDY\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum TXDRDY_A { + #[doc = "0: Read: Disabled"] + DISABLED = 0, + #[doc = "1: Read: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: TXDRDY_A) -> Self { + variant as u8 != 0 + } +} +impl TXDRDY_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> TXDRDY_A { + match self.bits { + false => TXDRDY_A::DISABLED, + true => TXDRDY_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == TXDRDY_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == TXDRDY_A::ENABLED + } +} +#[doc = "Write '1' to enable interrupt for event TXDRDY\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum TXDRDY_AW { + #[doc = "1: Enable"] + SET = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: TXDRDY_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `TXDRDY` writer - Write '1' to enable interrupt for event TXDRDY"] +pub type TXDRDY_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENSET_SPEC, TXDRDY_AW, O>; +impl<'a, const O: u8> TXDRDY_W<'a, O> { + #[doc = "Enable"] + #[inline(always)] + pub fn set(self) -> &'a mut W { + self.variant(TXDRDY_AW::SET) + } +} +#[doc = "Field `ENDTX` reader - Write '1' to enable interrupt for event ENDTX"] +pub type ENDTX_R = crate::BitReader; +#[doc = "Write '1' to enable interrupt for event ENDTX\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum ENDTX_A { + #[doc = "0: Read: Disabled"] + DISABLED = 0, + #[doc = "1: Read: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: ENDTX_A) -> Self { + variant as u8 != 0 + } +} +impl ENDTX_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> ENDTX_A { + match self.bits { + false => ENDTX_A::DISABLED, + true => ENDTX_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == ENDTX_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == ENDTX_A::ENABLED + } +} +#[doc = "Write '1' to enable interrupt for event ENDTX\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum ENDTX_AW { + #[doc = "1: Enable"] + SET = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: ENDTX_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `ENDTX` writer - Write '1' to enable interrupt for event ENDTX"] +pub type ENDTX_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENSET_SPEC, ENDTX_AW, O>; +impl<'a, const O: u8> ENDTX_W<'a, O> { + #[doc = "Enable"] + #[inline(always)] + pub fn set(self) -> &'a mut W { + self.variant(ENDTX_AW::SET) + } +} +#[doc = "Field `ERROR` reader - Write '1' to enable interrupt for event ERROR"] +pub type ERROR_R = crate::BitReader; +#[doc = "Write '1' to enable interrupt for event ERROR\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum ERROR_A { + #[doc = "0: Read: Disabled"] + DISABLED = 0, + #[doc = "1: Read: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: ERROR_A) -> Self { + variant as u8 != 0 + } +} +impl ERROR_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> ERROR_A { + match self.bits { + false => ERROR_A::DISABLED, + true => ERROR_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == ERROR_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == ERROR_A::ENABLED + } +} +#[doc = "Write '1' to enable interrupt for event ERROR\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum ERROR_AW { + #[doc = "1: Enable"] + SET = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: ERROR_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `ERROR` writer - Write '1' to enable interrupt for event ERROR"] +pub type ERROR_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENSET_SPEC, ERROR_AW, O>; +impl<'a, const O: u8> ERROR_W<'a, O> { + #[doc = "Enable"] + #[inline(always)] + pub fn set(self) -> &'a mut W { + self.variant(ERROR_AW::SET) + } +} +#[doc = "Field `RXTO` reader - Write '1' to enable interrupt for event RXTO"] +pub type RXTO_R = crate::BitReader; +#[doc = "Write '1' to enable interrupt for event RXTO\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum RXTO_A { + #[doc = "0: Read: Disabled"] + DISABLED = 0, + #[doc = "1: Read: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: RXTO_A) -> Self { + variant as u8 != 0 + } +} +impl RXTO_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> RXTO_A { + match self.bits { + false => RXTO_A::DISABLED, + true => RXTO_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == RXTO_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == RXTO_A::ENABLED + } +} +#[doc = "Write '1' to enable interrupt for event RXTO\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum RXTO_AW { + #[doc = "1: Enable"] + SET = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: RXTO_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `RXTO` writer - Write '1' to enable interrupt for event RXTO"] +pub type RXTO_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENSET_SPEC, RXTO_AW, O>; +impl<'a, const O: u8> RXTO_W<'a, O> { + #[doc = "Enable"] + #[inline(always)] + pub fn set(self) -> &'a mut W { + self.variant(RXTO_AW::SET) + } +} +#[doc = "Field `RXSTARTED` reader - Write '1' to enable interrupt for event RXSTARTED"] +pub type RXSTARTED_R = crate::BitReader; +#[doc = "Write '1' to enable interrupt for event RXSTARTED\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum RXSTARTED_A { + #[doc = "0: Read: Disabled"] + DISABLED = 0, + #[doc = "1: Read: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: RXSTARTED_A) -> Self { + variant as u8 != 0 + } +} +impl RXSTARTED_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> RXSTARTED_A { + match self.bits { + false => RXSTARTED_A::DISABLED, + true => RXSTARTED_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == RXSTARTED_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == RXSTARTED_A::ENABLED + } +} +#[doc = "Write '1' to enable interrupt for event RXSTARTED\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum RXSTARTED_AW { + #[doc = "1: Enable"] + SET = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: RXSTARTED_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `RXSTARTED` writer - Write '1' to enable interrupt for event RXSTARTED"] +pub type RXSTARTED_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENSET_SPEC, RXSTARTED_AW, O>; +impl<'a, const O: u8> RXSTARTED_W<'a, O> { + #[doc = "Enable"] + #[inline(always)] + pub fn set(self) -> &'a mut W { + self.variant(RXSTARTED_AW::SET) + } +} +#[doc = "Field `TXSTARTED` reader - Write '1' to enable interrupt for event TXSTARTED"] +pub type TXSTARTED_R = crate::BitReader; +#[doc = "Write '1' to enable interrupt for event TXSTARTED\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum TXSTARTED_A { + #[doc = "0: Read: Disabled"] + DISABLED = 0, + #[doc = "1: Read: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: TXSTARTED_A) -> Self { + variant as u8 != 0 + } +} +impl TXSTARTED_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> TXSTARTED_A { + match self.bits { + false => TXSTARTED_A::DISABLED, + true => TXSTARTED_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == TXSTARTED_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == TXSTARTED_A::ENABLED + } +} +#[doc = "Write '1' to enable interrupt for event TXSTARTED\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum TXSTARTED_AW { + #[doc = "1: Enable"] + SET = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: TXSTARTED_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `TXSTARTED` writer - Write '1' to enable interrupt for event TXSTARTED"] +pub type TXSTARTED_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENSET_SPEC, TXSTARTED_AW, O>; +impl<'a, const O: u8> TXSTARTED_W<'a, O> { + #[doc = "Enable"] + #[inline(always)] + pub fn set(self) -> &'a mut W { + self.variant(TXSTARTED_AW::SET) + } +} +#[doc = "Field `TXSTOPPED` reader - Write '1' to enable interrupt for event TXSTOPPED"] +pub type TXSTOPPED_R = crate::BitReader; +#[doc = "Write '1' to enable interrupt for event TXSTOPPED\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum TXSTOPPED_A { + #[doc = "0: Read: Disabled"] + DISABLED = 0, + #[doc = "1: Read: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: TXSTOPPED_A) -> Self { + variant as u8 != 0 + } +} +impl TXSTOPPED_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> TXSTOPPED_A { + match self.bits { + false => TXSTOPPED_A::DISABLED, + true => TXSTOPPED_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == TXSTOPPED_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == TXSTOPPED_A::ENABLED + } +} +#[doc = "Write '1' to enable interrupt for event TXSTOPPED\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum TXSTOPPED_AW { + #[doc = "1: Enable"] + SET = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: TXSTOPPED_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `TXSTOPPED` writer - Write '1' to enable interrupt for event TXSTOPPED"] +pub type TXSTOPPED_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENSET_SPEC, TXSTOPPED_AW, O>; +impl<'a, const O: u8> TXSTOPPED_W<'a, O> { + #[doc = "Enable"] + #[inline(always)] + pub fn set(self) -> &'a mut W { + self.variant(TXSTOPPED_AW::SET) + } +} +impl R { + #[doc = "Bit 0 - Write '1' to enable interrupt for event CTS"] + #[inline(always)] + pub fn cts(&self) -> CTS_R { + CTS_R::new((self.bits & 1) != 0) + } + #[doc = "Bit 1 - Write '1' to enable interrupt for event NCTS"] + #[inline(always)] + pub fn ncts(&self) -> NCTS_R { + NCTS_R::new(((self.bits >> 1) & 1) != 0) + } + #[doc = "Bit 2 - Write '1' to enable interrupt for event RXDRDY"] + #[inline(always)] + pub fn rxdrdy(&self) -> RXDRDY_R { + RXDRDY_R::new(((self.bits >> 2) & 1) != 0) + } + #[doc = "Bit 4 - Write '1' to enable interrupt for event ENDRX"] + #[inline(always)] + pub fn endrx(&self) -> ENDRX_R { + ENDRX_R::new(((self.bits >> 4) & 1) != 0) + } + #[doc = "Bit 7 - Write '1' to enable interrupt for event TXDRDY"] + #[inline(always)] + pub fn txdrdy(&self) -> TXDRDY_R { + TXDRDY_R::new(((self.bits >> 7) & 1) != 0) + } + #[doc = "Bit 8 - Write '1' to enable interrupt for event ENDTX"] + #[inline(always)] + pub fn endtx(&self) -> ENDTX_R { + ENDTX_R::new(((self.bits >> 8) & 1) != 0) + } + #[doc = "Bit 9 - Write '1' to enable interrupt for event ERROR"] + #[inline(always)] + pub fn error(&self) -> ERROR_R { + ERROR_R::new(((self.bits >> 9) & 1) != 0) + } + #[doc = "Bit 17 - Write '1' to enable interrupt for event RXTO"] + #[inline(always)] + pub fn rxto(&self) -> RXTO_R { + RXTO_R::new(((self.bits >> 17) & 1) != 0) + } + #[doc = "Bit 19 - Write '1' to enable interrupt for event RXSTARTED"] + #[inline(always)] + pub fn rxstarted(&self) -> RXSTARTED_R { + RXSTARTED_R::new(((self.bits >> 19) & 1) != 0) + } + #[doc = "Bit 20 - Write '1' to enable interrupt for event TXSTARTED"] + #[inline(always)] + pub fn txstarted(&self) -> TXSTARTED_R { + TXSTARTED_R::new(((self.bits >> 20) & 1) != 0) + } + #[doc = "Bit 22 - Write '1' to enable interrupt for event TXSTOPPED"] + #[inline(always)] + pub fn txstopped(&self) -> TXSTOPPED_R { + TXSTOPPED_R::new(((self.bits >> 22) & 1) != 0) + } +} +impl W { + #[doc = "Bit 0 - Write '1' to enable interrupt for event CTS"] + #[inline(always)] + #[must_use] + pub fn cts(&mut self) -> CTS_W<0> { + CTS_W::new(self) + } + #[doc = "Bit 1 - Write '1' to enable interrupt for event NCTS"] + #[inline(always)] + #[must_use] + pub fn ncts(&mut self) -> NCTS_W<1> { + NCTS_W::new(self) + } + #[doc = "Bit 2 - Write '1' to enable interrupt for event RXDRDY"] + #[inline(always)] + #[must_use] + pub fn rxdrdy(&mut self) -> RXDRDY_W<2> { + RXDRDY_W::new(self) + } + #[doc = "Bit 4 - Write '1' to enable interrupt for event ENDRX"] + #[inline(always)] + #[must_use] + pub fn endrx(&mut self) -> ENDRX_W<4> { + ENDRX_W::new(self) + } + #[doc = "Bit 7 - Write '1' to enable interrupt for event TXDRDY"] + #[inline(always)] + #[must_use] + pub fn txdrdy(&mut self) -> TXDRDY_W<7> { + TXDRDY_W::new(self) + } + #[doc = "Bit 8 - Write '1' to enable interrupt for event ENDTX"] + #[inline(always)] + #[must_use] + pub fn endtx(&mut self) -> ENDTX_W<8> { + ENDTX_W::new(self) + } + #[doc = "Bit 9 - Write '1' to enable interrupt for event ERROR"] + #[inline(always)] + #[must_use] + pub fn error(&mut self) -> ERROR_W<9> { + ERROR_W::new(self) + } + #[doc = "Bit 17 - Write '1' to enable interrupt for event RXTO"] + #[inline(always)] + #[must_use] + pub fn rxto(&mut self) -> RXTO_W<17> { + RXTO_W::new(self) + } + #[doc = "Bit 19 - Write '1' to enable interrupt for event RXSTARTED"] + #[inline(always)] + #[must_use] + pub fn rxstarted(&mut self) -> RXSTARTED_W<19> { + RXSTARTED_W::new(self) + } + #[doc = "Bit 20 - Write '1' to enable interrupt for event TXSTARTED"] + #[inline(always)] + #[must_use] + pub fn txstarted(&mut self) -> TXSTARTED_W<20> { + TXSTARTED_W::new(self) + } + #[doc = "Bit 22 - Write '1' to enable interrupt for event TXSTOPPED"] + #[inline(always)] + #[must_use] + pub fn txstopped(&mut self) -> TXSTOPPED_W<22> { + TXSTOPPED_W::new(self) + } + #[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 = "Enable interrupt\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 [intenset](index.html) module"] +pub struct INTENSET_SPEC; +impl crate::RegisterSpec for INTENSET_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [intenset::R](R) reader structure"] +impl crate::Readable for INTENSET_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [intenset::W](W) writer structure"] +impl crate::Writable for INTENSET_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets INTENSET to value 0"] +impl crate::Resettable for INTENSET_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/uarte0/psel.rs b/down-the-stack/dk_pac/src/uarte0/psel.rs new file mode 100644 index 0000000..c25260e --- /dev/null +++ b/down-the-stack/dk_pac/src/uarte0/psel.rs @@ -0,0 +1,28 @@ +#[doc = r"Register block"] +#[repr(C)] +pub struct PSEL { + #[doc = "0x00 - Pin select for RTS signal"] + pub rts: RTS, + #[doc = "0x04 - Pin select for TXD signal"] + pub txd: TXD, + #[doc = "0x08 - Pin select for CTS signal"] + pub cts: CTS, + #[doc = "0x0c - Pin select for RXD signal"] + pub rxd: RXD, +} +#[doc = "RTS (rw) register accessor: an alias for `Reg`"] +pub type RTS = crate::Reg; +#[doc = "Pin select for RTS signal"] +pub mod rts; +#[doc = "TXD (rw) register accessor: an alias for `Reg`"] +pub type TXD = crate::Reg; +#[doc = "Pin select for TXD signal"] +pub mod txd; +#[doc = "CTS (rw) register accessor: an alias for `Reg`"] +pub type CTS = crate::Reg; +#[doc = "Pin select for CTS signal"] +pub mod cts; +#[doc = "RXD (rw) register accessor: an alias for `Reg`"] +pub type RXD = crate::Reg; +#[doc = "Pin select for RXD signal"] +pub mod rxd; diff --git a/down-the-stack/dk_pac/src/uarte0/psel/cts.rs b/down-the-stack/dk_pac/src/uarte0/psel/cts.rs new file mode 100644 index 0000000..0c48d3c --- /dev/null +++ b/down-the-stack/dk_pac/src/uarte0/psel/cts.rs @@ -0,0 +1,141 @@ +#[doc = "Register `CTS` 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 `CTS` 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 `PIN` reader - Pin number"] +pub type PIN_R = crate::FieldReader; +#[doc = "Field `PIN` writer - Pin number"] +pub type PIN_W<'a, const O: u8> = crate::FieldWriter<'a, u32, CTS_SPEC, u8, u8, 5, O>; +#[doc = "Field `CONNECT` reader - Connection"] +pub type CONNECT_R = crate::BitReader; +#[doc = "Connection\n\nValue on reset: 1"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum CONNECT_A { + #[doc = "1: Disconnect"] + DISCONNECTED = 1, + #[doc = "0: Connect"] + CONNECTED = 0, +} +impl From for bool { + #[inline(always)] + fn from(variant: CONNECT_A) -> Self { + variant as u8 != 0 + } +} +impl CONNECT_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> CONNECT_A { + match self.bits { + true => CONNECT_A::DISCONNECTED, + false => CONNECT_A::CONNECTED, + } + } + #[doc = "Checks if the value of the field is `DISCONNECTED`"] + #[inline(always)] + pub fn is_disconnected(&self) -> bool { + *self == CONNECT_A::DISCONNECTED + } + #[doc = "Checks if the value of the field is `CONNECTED`"] + #[inline(always)] + pub fn is_connected(&self) -> bool { + *self == CONNECT_A::CONNECTED + } +} +#[doc = "Field `CONNECT` writer - Connection"] +pub type CONNECT_W<'a, const O: u8> = crate::BitWriter<'a, u32, CTS_SPEC, CONNECT_A, O>; +impl<'a, const O: u8> CONNECT_W<'a, O> { + #[doc = "Disconnect"] + #[inline(always)] + pub fn disconnected(self) -> &'a mut W { + self.variant(CONNECT_A::DISCONNECTED) + } + #[doc = "Connect"] + #[inline(always)] + pub fn connected(self) -> &'a mut W { + self.variant(CONNECT_A::CONNECTED) + } +} +impl R { + #[doc = "Bits 0:4 - Pin number"] + #[inline(always)] + pub fn pin(&self) -> PIN_R { + PIN_R::new((self.bits & 0x1f) as u8) + } + #[doc = "Bit 31 - Connection"] + #[inline(always)] + pub fn connect(&self) -> CONNECT_R { + CONNECT_R::new(((self.bits >> 31) & 1) != 0) + } +} +impl W { + #[doc = "Bits 0:4 - Pin number"] + #[inline(always)] + #[must_use] + pub fn pin(&mut self) -> PIN_W<0> { + PIN_W::new(self) + } + #[doc = "Bit 31 - Connection"] + #[inline(always)] + #[must_use] + pub fn connect(&mut self) -> CONNECT_W<31> { + CONNECT_W::new(self) + } + #[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 = "Pin select for CTS signal\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 [cts](index.html) module"] +pub struct CTS_SPEC; +impl crate::RegisterSpec for CTS_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [cts::R](R) reader structure"] +impl crate::Readable for CTS_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [cts::W](W) writer structure"] +impl crate::Writable for CTS_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets CTS to value 0xffff_ffff"] +impl crate::Resettable for CTS_SPEC { + const RESET_VALUE: Self::Ux = 0xffff_ffff; +} diff --git a/down-the-stack/dk_pac/src/uarte0/psel/rts.rs b/down-the-stack/dk_pac/src/uarte0/psel/rts.rs new file mode 100644 index 0000000..1c6231f --- /dev/null +++ b/down-the-stack/dk_pac/src/uarte0/psel/rts.rs @@ -0,0 +1,141 @@ +#[doc = "Register `RTS` 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 `RTS` 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 `PIN` reader - Pin number"] +pub type PIN_R = crate::FieldReader; +#[doc = "Field `PIN` writer - Pin number"] +pub type PIN_W<'a, const O: u8> = crate::FieldWriter<'a, u32, RTS_SPEC, u8, u8, 5, O>; +#[doc = "Field `CONNECT` reader - Connection"] +pub type CONNECT_R = crate::BitReader; +#[doc = "Connection\n\nValue on reset: 1"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum CONNECT_A { + #[doc = "1: Disconnect"] + DISCONNECTED = 1, + #[doc = "0: Connect"] + CONNECTED = 0, +} +impl From for bool { + #[inline(always)] + fn from(variant: CONNECT_A) -> Self { + variant as u8 != 0 + } +} +impl CONNECT_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> CONNECT_A { + match self.bits { + true => CONNECT_A::DISCONNECTED, + false => CONNECT_A::CONNECTED, + } + } + #[doc = "Checks if the value of the field is `DISCONNECTED`"] + #[inline(always)] + pub fn is_disconnected(&self) -> bool { + *self == CONNECT_A::DISCONNECTED + } + #[doc = "Checks if the value of the field is `CONNECTED`"] + #[inline(always)] + pub fn is_connected(&self) -> bool { + *self == CONNECT_A::CONNECTED + } +} +#[doc = "Field `CONNECT` writer - Connection"] +pub type CONNECT_W<'a, const O: u8> = crate::BitWriter<'a, u32, RTS_SPEC, CONNECT_A, O>; +impl<'a, const O: u8> CONNECT_W<'a, O> { + #[doc = "Disconnect"] + #[inline(always)] + pub fn disconnected(self) -> &'a mut W { + self.variant(CONNECT_A::DISCONNECTED) + } + #[doc = "Connect"] + #[inline(always)] + pub fn connected(self) -> &'a mut W { + self.variant(CONNECT_A::CONNECTED) + } +} +impl R { + #[doc = "Bits 0:4 - Pin number"] + #[inline(always)] + pub fn pin(&self) -> PIN_R { + PIN_R::new((self.bits & 0x1f) as u8) + } + #[doc = "Bit 31 - Connection"] + #[inline(always)] + pub fn connect(&self) -> CONNECT_R { + CONNECT_R::new(((self.bits >> 31) & 1) != 0) + } +} +impl W { + #[doc = "Bits 0:4 - Pin number"] + #[inline(always)] + #[must_use] + pub fn pin(&mut self) -> PIN_W<0> { + PIN_W::new(self) + } + #[doc = "Bit 31 - Connection"] + #[inline(always)] + #[must_use] + pub fn connect(&mut self) -> CONNECT_W<31> { + CONNECT_W::new(self) + } + #[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 = "Pin select for RTS signal\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 [rts](index.html) module"] +pub struct RTS_SPEC; +impl crate::RegisterSpec for RTS_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [rts::R](R) reader structure"] +impl crate::Readable for RTS_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [rts::W](W) writer structure"] +impl crate::Writable for RTS_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets RTS to value 0xffff_ffff"] +impl crate::Resettable for RTS_SPEC { + const RESET_VALUE: Self::Ux = 0xffff_ffff; +} diff --git a/down-the-stack/dk_pac/src/uarte0/psel/rxd.rs b/down-the-stack/dk_pac/src/uarte0/psel/rxd.rs new file mode 100644 index 0000000..4b18dde --- /dev/null +++ b/down-the-stack/dk_pac/src/uarte0/psel/rxd.rs @@ -0,0 +1,141 @@ +#[doc = "Register `RXD` 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 `RXD` 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 `PIN` reader - Pin number"] +pub type PIN_R = crate::FieldReader; +#[doc = "Field `PIN` writer - Pin number"] +pub type PIN_W<'a, const O: u8> = crate::FieldWriter<'a, u32, RXD_SPEC, u8, u8, 5, O>; +#[doc = "Field `CONNECT` reader - Connection"] +pub type CONNECT_R = crate::BitReader; +#[doc = "Connection\n\nValue on reset: 1"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum CONNECT_A { + #[doc = "1: Disconnect"] + DISCONNECTED = 1, + #[doc = "0: Connect"] + CONNECTED = 0, +} +impl From for bool { + #[inline(always)] + fn from(variant: CONNECT_A) -> Self { + variant as u8 != 0 + } +} +impl CONNECT_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> CONNECT_A { + match self.bits { + true => CONNECT_A::DISCONNECTED, + false => CONNECT_A::CONNECTED, + } + } + #[doc = "Checks if the value of the field is `DISCONNECTED`"] + #[inline(always)] + pub fn is_disconnected(&self) -> bool { + *self == CONNECT_A::DISCONNECTED + } + #[doc = "Checks if the value of the field is `CONNECTED`"] + #[inline(always)] + pub fn is_connected(&self) -> bool { + *self == CONNECT_A::CONNECTED + } +} +#[doc = "Field `CONNECT` writer - Connection"] +pub type CONNECT_W<'a, const O: u8> = crate::BitWriter<'a, u32, RXD_SPEC, CONNECT_A, O>; +impl<'a, const O: u8> CONNECT_W<'a, O> { + #[doc = "Disconnect"] + #[inline(always)] + pub fn disconnected(self) -> &'a mut W { + self.variant(CONNECT_A::DISCONNECTED) + } + #[doc = "Connect"] + #[inline(always)] + pub fn connected(self) -> &'a mut W { + self.variant(CONNECT_A::CONNECTED) + } +} +impl R { + #[doc = "Bits 0:4 - Pin number"] + #[inline(always)] + pub fn pin(&self) -> PIN_R { + PIN_R::new((self.bits & 0x1f) as u8) + } + #[doc = "Bit 31 - Connection"] + #[inline(always)] + pub fn connect(&self) -> CONNECT_R { + CONNECT_R::new(((self.bits >> 31) & 1) != 0) + } +} +impl W { + #[doc = "Bits 0:4 - Pin number"] + #[inline(always)] + #[must_use] + pub fn pin(&mut self) -> PIN_W<0> { + PIN_W::new(self) + } + #[doc = "Bit 31 - Connection"] + #[inline(always)] + #[must_use] + pub fn connect(&mut self) -> CONNECT_W<31> { + CONNECT_W::new(self) + } + #[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 = "Pin select for RXD signal\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 [rxd](index.html) module"] +pub struct RXD_SPEC; +impl crate::RegisterSpec for RXD_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [rxd::R](R) reader structure"] +impl crate::Readable for RXD_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [rxd::W](W) writer structure"] +impl crate::Writable for RXD_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets RXD to value 0xffff_ffff"] +impl crate::Resettable for RXD_SPEC { + const RESET_VALUE: Self::Ux = 0xffff_ffff; +} diff --git a/down-the-stack/dk_pac/src/uarte0/psel/txd.rs b/down-the-stack/dk_pac/src/uarte0/psel/txd.rs new file mode 100644 index 0000000..db6909d --- /dev/null +++ b/down-the-stack/dk_pac/src/uarte0/psel/txd.rs @@ -0,0 +1,141 @@ +#[doc = "Register `TXD` 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 `TXD` 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 `PIN` reader - Pin number"] +pub type PIN_R = crate::FieldReader; +#[doc = "Field `PIN` writer - Pin number"] +pub type PIN_W<'a, const O: u8> = crate::FieldWriter<'a, u32, TXD_SPEC, u8, u8, 5, O>; +#[doc = "Field `CONNECT` reader - Connection"] +pub type CONNECT_R = crate::BitReader; +#[doc = "Connection\n\nValue on reset: 1"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum CONNECT_A { + #[doc = "1: Disconnect"] + DISCONNECTED = 1, + #[doc = "0: Connect"] + CONNECTED = 0, +} +impl From for bool { + #[inline(always)] + fn from(variant: CONNECT_A) -> Self { + variant as u8 != 0 + } +} +impl CONNECT_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> CONNECT_A { + match self.bits { + true => CONNECT_A::DISCONNECTED, + false => CONNECT_A::CONNECTED, + } + } + #[doc = "Checks if the value of the field is `DISCONNECTED`"] + #[inline(always)] + pub fn is_disconnected(&self) -> bool { + *self == CONNECT_A::DISCONNECTED + } + #[doc = "Checks if the value of the field is `CONNECTED`"] + #[inline(always)] + pub fn is_connected(&self) -> bool { + *self == CONNECT_A::CONNECTED + } +} +#[doc = "Field `CONNECT` writer - Connection"] +pub type CONNECT_W<'a, const O: u8> = crate::BitWriter<'a, u32, TXD_SPEC, CONNECT_A, O>; +impl<'a, const O: u8> CONNECT_W<'a, O> { + #[doc = "Disconnect"] + #[inline(always)] + pub fn disconnected(self) -> &'a mut W { + self.variant(CONNECT_A::DISCONNECTED) + } + #[doc = "Connect"] + #[inline(always)] + pub fn connected(self) -> &'a mut W { + self.variant(CONNECT_A::CONNECTED) + } +} +impl R { + #[doc = "Bits 0:4 - Pin number"] + #[inline(always)] + pub fn pin(&self) -> PIN_R { + PIN_R::new((self.bits & 0x1f) as u8) + } + #[doc = "Bit 31 - Connection"] + #[inline(always)] + pub fn connect(&self) -> CONNECT_R { + CONNECT_R::new(((self.bits >> 31) & 1) != 0) + } +} +impl W { + #[doc = "Bits 0:4 - Pin number"] + #[inline(always)] + #[must_use] + pub fn pin(&mut self) -> PIN_W<0> { + PIN_W::new(self) + } + #[doc = "Bit 31 - Connection"] + #[inline(always)] + #[must_use] + pub fn connect(&mut self) -> CONNECT_W<31> { + CONNECT_W::new(self) + } + #[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 = "Pin select for TXD signal\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 [txd](index.html) module"] +pub struct TXD_SPEC; +impl crate::RegisterSpec for TXD_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [txd::R](R) reader structure"] +impl crate::Readable for TXD_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [txd::W](W) writer structure"] +impl crate::Writable for TXD_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets TXD to value 0xffff_ffff"] +impl crate::Resettable for TXD_SPEC { + const RESET_VALUE: Self::Ux = 0xffff_ffff; +} diff --git a/down-the-stack/dk_pac/src/uarte0/rxd.rs b/down-the-stack/dk_pac/src/uarte0/rxd.rs new file mode 100644 index 0000000..e4c73ce --- /dev/null +++ b/down-the-stack/dk_pac/src/uarte0/rxd.rs @@ -0,0 +1,22 @@ +#[doc = r"Register block"] +#[repr(C)] +pub struct RXD { + #[doc = "0x00 - Data pointer"] + pub ptr: PTR, + #[doc = "0x04 - Maximum number of bytes in receive buffer"] + pub maxcnt: MAXCNT, + #[doc = "0x08 - Number of bytes transferred in the last transaction"] + pub amount: AMOUNT, +} +#[doc = "PTR (rw) register accessor: an alias for `Reg`"] +pub type PTR = crate::Reg; +#[doc = "Data pointer"] +pub mod ptr; +#[doc = "MAXCNT (rw) register accessor: an alias for `Reg`"] +pub type MAXCNT = crate::Reg; +#[doc = "Maximum number of bytes in receive buffer"] +pub mod maxcnt; +#[doc = "AMOUNT (r) register accessor: an alias for `Reg`"] +pub type AMOUNT = crate::Reg; +#[doc = "Number of bytes transferred in the last transaction"] +pub mod amount; diff --git a/down-the-stack/dk_pac/src/uarte0/rxd/amount.rs b/down-the-stack/dk_pac/src/uarte0/rxd/amount.rs new file mode 100644 index 0000000..b48d827 --- /dev/null +++ b/down-the-stack/dk_pac/src/uarte0/rxd/amount.rs @@ -0,0 +1,37 @@ +#[doc = "Register `AMOUNT` 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 = "Field `AMOUNT` reader - Number of bytes transferred in the last transaction"] +pub type AMOUNT_R = crate::FieldReader; +impl R { + #[doc = "Bits 0:7 - Number of bytes transferred in the last transaction"] + #[inline(always)] + pub fn amount(&self) -> AMOUNT_R { + AMOUNT_R::new((self.bits & 0xff) as u8) + } +} +#[doc = "Number of bytes transferred in the last transaction\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 [amount](index.html) module"] +pub struct AMOUNT_SPEC; +impl crate::RegisterSpec for AMOUNT_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [amount::R](R) reader structure"] +impl crate::Readable for AMOUNT_SPEC { + type Reader = R; +} +#[doc = "`reset()` method sets AMOUNT to value 0"] +impl crate::Resettable for AMOUNT_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/uarte0/rxd/maxcnt.rs b/down-the-stack/dk_pac/src/uarte0/rxd/maxcnt.rs new file mode 100644 index 0000000..7d9b79c --- /dev/null +++ b/down-the-stack/dk_pac/src/uarte0/rxd/maxcnt.rs @@ -0,0 +1,80 @@ +#[doc = "Register `MAXCNT` 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 `MAXCNT` 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 `MAXCNT` reader - Maximum number of bytes in receive buffer"] +pub type MAXCNT_R = crate::FieldReader; +#[doc = "Field `MAXCNT` writer - Maximum number of bytes in receive buffer"] +pub type MAXCNT_W<'a, const O: u8> = crate::FieldWriter<'a, u32, MAXCNT_SPEC, u8, u8, 8, O>; +impl R { + #[doc = "Bits 0:7 - Maximum number of bytes in receive buffer"] + #[inline(always)] + pub fn maxcnt(&self) -> MAXCNT_R { + MAXCNT_R::new((self.bits & 0xff) as u8) + } +} +impl W { + #[doc = "Bits 0:7 - Maximum number of bytes in receive buffer"] + #[inline(always)] + #[must_use] + pub fn maxcnt(&mut self) -> MAXCNT_W<0> { + MAXCNT_W::new(self) + } + #[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 = "Maximum number of bytes in receive buffer\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 [maxcnt](index.html) module"] +pub struct MAXCNT_SPEC; +impl crate::RegisterSpec for MAXCNT_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [maxcnt::R](R) reader structure"] +impl crate::Readable for MAXCNT_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [maxcnt::W](W) writer structure"] +impl crate::Writable for MAXCNT_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets MAXCNT to value 0"] +impl crate::Resettable for MAXCNT_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/uarte0/rxd/ptr.rs b/down-the-stack/dk_pac/src/uarte0/rxd/ptr.rs new file mode 100644 index 0000000..2f2c926 --- /dev/null +++ b/down-the-stack/dk_pac/src/uarte0/rxd/ptr.rs @@ -0,0 +1,80 @@ +#[doc = "Register `PTR` 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 `PTR` 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 `PTR` reader - Data pointer"] +pub type PTR_R = crate::FieldReader; +#[doc = "Field `PTR` writer - Data pointer"] +pub type PTR_W<'a, const O: u8> = crate::FieldWriter<'a, u32, PTR_SPEC, u32, u32, 32, O>; +impl R { + #[doc = "Bits 0:31 - Data pointer"] + #[inline(always)] + pub fn ptr(&self) -> PTR_R { + PTR_R::new(self.bits) + } +} +impl W { + #[doc = "Bits 0:31 - Data pointer"] + #[inline(always)] + #[must_use] + pub fn ptr(&mut self) -> PTR_W<0> { + PTR_W::new(self) + } + #[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 = "Data pointer\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 [ptr](index.html) module"] +pub struct PTR_SPEC; +impl crate::RegisterSpec for PTR_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [ptr::R](R) reader structure"] +impl crate::Readable for PTR_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [ptr::W](W) writer structure"] +impl crate::Writable for PTR_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets PTR to value 0"] +impl crate::Resettable for PTR_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/uarte0/shorts.rs b/down-the-stack/dk_pac/src/uarte0/shorts.rs new file mode 100644 index 0000000..6e9bc2f --- /dev/null +++ b/down-the-stack/dk_pac/src/uarte0/shorts.rs @@ -0,0 +1,189 @@ +#[doc = "Register `SHORTS` 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 `SHORTS` 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 `ENDRX_STARTRX` reader - Shortcut between event ENDRX and task STARTRX"] +pub type ENDRX_STARTRX_R = crate::BitReader; +#[doc = "Shortcut between event ENDRX and task STARTRX\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum ENDRX_STARTRX_A { + #[doc = "0: Disable shortcut"] + DISABLED = 0, + #[doc = "1: Enable shortcut"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: ENDRX_STARTRX_A) -> Self { + variant as u8 != 0 + } +} +impl ENDRX_STARTRX_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> ENDRX_STARTRX_A { + match self.bits { + false => ENDRX_STARTRX_A::DISABLED, + true => ENDRX_STARTRX_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == ENDRX_STARTRX_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == ENDRX_STARTRX_A::ENABLED + } +} +#[doc = "Field `ENDRX_STARTRX` writer - Shortcut between event ENDRX and task STARTRX"] +pub type ENDRX_STARTRX_W<'a, const O: u8> = + crate::BitWriter<'a, u32, SHORTS_SPEC, ENDRX_STARTRX_A, O>; +impl<'a, const O: u8> ENDRX_STARTRX_W<'a, O> { + #[doc = "Disable shortcut"] + #[inline(always)] + pub fn disabled(self) -> &'a mut W { + self.variant(ENDRX_STARTRX_A::DISABLED) + } + #[doc = "Enable shortcut"] + #[inline(always)] + pub fn enabled(self) -> &'a mut W { + self.variant(ENDRX_STARTRX_A::ENABLED) + } +} +#[doc = "Field `ENDRX_STOPRX` reader - Shortcut between event ENDRX and task STOPRX"] +pub type ENDRX_STOPRX_R = crate::BitReader; +#[doc = "Shortcut between event ENDRX and task STOPRX\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum ENDRX_STOPRX_A { + #[doc = "0: Disable shortcut"] + DISABLED = 0, + #[doc = "1: Enable shortcut"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: ENDRX_STOPRX_A) -> Self { + variant as u8 != 0 + } +} +impl ENDRX_STOPRX_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> ENDRX_STOPRX_A { + match self.bits { + false => ENDRX_STOPRX_A::DISABLED, + true => ENDRX_STOPRX_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == ENDRX_STOPRX_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == ENDRX_STOPRX_A::ENABLED + } +} +#[doc = "Field `ENDRX_STOPRX` writer - Shortcut between event ENDRX and task STOPRX"] +pub type ENDRX_STOPRX_W<'a, const O: u8> = + crate::BitWriter<'a, u32, SHORTS_SPEC, ENDRX_STOPRX_A, O>; +impl<'a, const O: u8> ENDRX_STOPRX_W<'a, O> { + #[doc = "Disable shortcut"] + #[inline(always)] + pub fn disabled(self) -> &'a mut W { + self.variant(ENDRX_STOPRX_A::DISABLED) + } + #[doc = "Enable shortcut"] + #[inline(always)] + pub fn enabled(self) -> &'a mut W { + self.variant(ENDRX_STOPRX_A::ENABLED) + } +} +impl R { + #[doc = "Bit 5 - Shortcut between event ENDRX and task STARTRX"] + #[inline(always)] + pub fn endrx_startrx(&self) -> ENDRX_STARTRX_R { + ENDRX_STARTRX_R::new(((self.bits >> 5) & 1) != 0) + } + #[doc = "Bit 6 - Shortcut between event ENDRX and task STOPRX"] + #[inline(always)] + pub fn endrx_stoprx(&self) -> ENDRX_STOPRX_R { + ENDRX_STOPRX_R::new(((self.bits >> 6) & 1) != 0) + } +} +impl W { + #[doc = "Bit 5 - Shortcut between event ENDRX and task STARTRX"] + #[inline(always)] + #[must_use] + pub fn endrx_startrx(&mut self) -> ENDRX_STARTRX_W<5> { + ENDRX_STARTRX_W::new(self) + } + #[doc = "Bit 6 - Shortcut between event ENDRX and task STOPRX"] + #[inline(always)] + #[must_use] + pub fn endrx_stoprx(&mut self) -> ENDRX_STOPRX_W<6> { + ENDRX_STOPRX_W::new(self) + } + #[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 = "Shortcuts between local events and tasks\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 [shorts](index.html) module"] +pub struct SHORTS_SPEC; +impl crate::RegisterSpec for SHORTS_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [shorts::R](R) reader structure"] +impl crate::Readable for SHORTS_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [shorts::W](W) writer structure"] +impl crate::Writable for SHORTS_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets SHORTS to value 0"] +impl crate::Resettable for SHORTS_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/uarte0/tasks_flushrx.rs b/down-the-stack/dk_pac/src/uarte0/tasks_flushrx.rs new file mode 100644 index 0000000..0d045d7 --- /dev/null +++ b/down-the-stack/dk_pac/src/uarte0/tasks_flushrx.rs @@ -0,0 +1,72 @@ +#[doc = "Register `TASKS_FLUSHRX` 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 = "Flush RX FIFO into RX buffer\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum TASKS_FLUSHRX_AW { + #[doc = "1: Trigger task"] + TRIGGER = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: TASKS_FLUSHRX_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `TASKS_FLUSHRX` writer - Flush RX FIFO into RX buffer"] +pub type TASKS_FLUSHRX_W<'a, const O: u8> = + crate::BitWriter<'a, u32, TASKS_FLUSHRX_SPEC, TASKS_FLUSHRX_AW, O>; +impl<'a, const O: u8> TASKS_FLUSHRX_W<'a, O> { + #[doc = "Trigger task"] + #[inline(always)] + pub fn trigger(self) -> &'a mut W { + self.variant(TASKS_FLUSHRX_AW::TRIGGER) + } +} +impl W { + #[doc = "Bit 0 - Flush RX FIFO into RX buffer"] + #[inline(always)] + #[must_use] + pub fn tasks_flushrx(&mut self) -> TASKS_FLUSHRX_W<0> { + TASKS_FLUSHRX_W::new(self) + } + #[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 = "Flush RX FIFO into RX buffer\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 [tasks_flushrx](index.html) module"] +pub struct TASKS_FLUSHRX_SPEC; +impl crate::RegisterSpec for TASKS_FLUSHRX_SPEC { + type Ux = u32; +} +#[doc = "`write(|w| ..)` method takes [tasks_flushrx::W](W) writer structure"] +impl crate::Writable for TASKS_FLUSHRX_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets TASKS_FLUSHRX to value 0"] +impl crate::Resettable for TASKS_FLUSHRX_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/uarte0/tasks_startrx.rs b/down-the-stack/dk_pac/src/uarte0/tasks_startrx.rs new file mode 100644 index 0000000..ec611e2 --- /dev/null +++ b/down-the-stack/dk_pac/src/uarte0/tasks_startrx.rs @@ -0,0 +1,72 @@ +#[doc = "Register `TASKS_STARTRX` 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 = "Start UART receiver\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum TASKS_STARTRX_AW { + #[doc = "1: Trigger task"] + TRIGGER = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: TASKS_STARTRX_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `TASKS_STARTRX` writer - Start UART receiver"] +pub type TASKS_STARTRX_W<'a, const O: u8> = + crate::BitWriter<'a, u32, TASKS_STARTRX_SPEC, TASKS_STARTRX_AW, O>; +impl<'a, const O: u8> TASKS_STARTRX_W<'a, O> { + #[doc = "Trigger task"] + #[inline(always)] + pub fn trigger(self) -> &'a mut W { + self.variant(TASKS_STARTRX_AW::TRIGGER) + } +} +impl W { + #[doc = "Bit 0 - Start UART receiver"] + #[inline(always)] + #[must_use] + pub fn tasks_startrx(&mut self) -> TASKS_STARTRX_W<0> { + TASKS_STARTRX_W::new(self) + } + #[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 = "Start UART receiver\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 [tasks_startrx](index.html) module"] +pub struct TASKS_STARTRX_SPEC; +impl crate::RegisterSpec for TASKS_STARTRX_SPEC { + type Ux = u32; +} +#[doc = "`write(|w| ..)` method takes [tasks_startrx::W](W) writer structure"] +impl crate::Writable for TASKS_STARTRX_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets TASKS_STARTRX to value 0"] +impl crate::Resettable for TASKS_STARTRX_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/uarte0/tasks_starttx.rs b/down-the-stack/dk_pac/src/uarte0/tasks_starttx.rs new file mode 100644 index 0000000..de5aa37 --- /dev/null +++ b/down-the-stack/dk_pac/src/uarte0/tasks_starttx.rs @@ -0,0 +1,72 @@ +#[doc = "Register `TASKS_STARTTX` 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 = "Start UART transmitter\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum TASKS_STARTTX_AW { + #[doc = "1: Trigger task"] + TRIGGER = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: TASKS_STARTTX_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `TASKS_STARTTX` writer - Start UART transmitter"] +pub type TASKS_STARTTX_W<'a, const O: u8> = + crate::BitWriter<'a, u32, TASKS_STARTTX_SPEC, TASKS_STARTTX_AW, O>; +impl<'a, const O: u8> TASKS_STARTTX_W<'a, O> { + #[doc = "Trigger task"] + #[inline(always)] + pub fn trigger(self) -> &'a mut W { + self.variant(TASKS_STARTTX_AW::TRIGGER) + } +} +impl W { + #[doc = "Bit 0 - Start UART transmitter"] + #[inline(always)] + #[must_use] + pub fn tasks_starttx(&mut self) -> TASKS_STARTTX_W<0> { + TASKS_STARTTX_W::new(self) + } + #[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 = "Start UART transmitter\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 [tasks_starttx](index.html) module"] +pub struct TASKS_STARTTX_SPEC; +impl crate::RegisterSpec for TASKS_STARTTX_SPEC { + type Ux = u32; +} +#[doc = "`write(|w| ..)` method takes [tasks_starttx::W](W) writer structure"] +impl crate::Writable for TASKS_STARTTX_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets TASKS_STARTTX to value 0"] +impl crate::Resettable for TASKS_STARTTX_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/uarte0/tasks_stoprx.rs b/down-the-stack/dk_pac/src/uarte0/tasks_stoprx.rs new file mode 100644 index 0000000..306c0e0 --- /dev/null +++ b/down-the-stack/dk_pac/src/uarte0/tasks_stoprx.rs @@ -0,0 +1,72 @@ +#[doc = "Register `TASKS_STOPRX` 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 = "Stop UART receiver\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum TASKS_STOPRX_AW { + #[doc = "1: Trigger task"] + TRIGGER = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: TASKS_STOPRX_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `TASKS_STOPRX` writer - Stop UART receiver"] +pub type TASKS_STOPRX_W<'a, const O: u8> = + crate::BitWriter<'a, u32, TASKS_STOPRX_SPEC, TASKS_STOPRX_AW, O>; +impl<'a, const O: u8> TASKS_STOPRX_W<'a, O> { + #[doc = "Trigger task"] + #[inline(always)] + pub fn trigger(self) -> &'a mut W { + self.variant(TASKS_STOPRX_AW::TRIGGER) + } +} +impl W { + #[doc = "Bit 0 - Stop UART receiver"] + #[inline(always)] + #[must_use] + pub fn tasks_stoprx(&mut self) -> TASKS_STOPRX_W<0> { + TASKS_STOPRX_W::new(self) + } + #[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 = "Stop UART receiver\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 [tasks_stoprx](index.html) module"] +pub struct TASKS_STOPRX_SPEC; +impl crate::RegisterSpec for TASKS_STOPRX_SPEC { + type Ux = u32; +} +#[doc = "`write(|w| ..)` method takes [tasks_stoprx::W](W) writer structure"] +impl crate::Writable for TASKS_STOPRX_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets TASKS_STOPRX to value 0"] +impl crate::Resettable for TASKS_STOPRX_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/uarte0/tasks_stoptx.rs b/down-the-stack/dk_pac/src/uarte0/tasks_stoptx.rs new file mode 100644 index 0000000..5c99eef --- /dev/null +++ b/down-the-stack/dk_pac/src/uarte0/tasks_stoptx.rs @@ -0,0 +1,72 @@ +#[doc = "Register `TASKS_STOPTX` 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 = "Stop UART transmitter\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum TASKS_STOPTX_AW { + #[doc = "1: Trigger task"] + TRIGGER = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: TASKS_STOPTX_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `TASKS_STOPTX` writer - Stop UART transmitter"] +pub type TASKS_STOPTX_W<'a, const O: u8> = + crate::BitWriter<'a, u32, TASKS_STOPTX_SPEC, TASKS_STOPTX_AW, O>; +impl<'a, const O: u8> TASKS_STOPTX_W<'a, O> { + #[doc = "Trigger task"] + #[inline(always)] + pub fn trigger(self) -> &'a mut W { + self.variant(TASKS_STOPTX_AW::TRIGGER) + } +} +impl W { + #[doc = "Bit 0 - Stop UART transmitter"] + #[inline(always)] + #[must_use] + pub fn tasks_stoptx(&mut self) -> TASKS_STOPTX_W<0> { + TASKS_STOPTX_W::new(self) + } + #[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 = "Stop UART transmitter\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 [tasks_stoptx](index.html) module"] +pub struct TASKS_STOPTX_SPEC; +impl crate::RegisterSpec for TASKS_STOPTX_SPEC { + type Ux = u32; +} +#[doc = "`write(|w| ..)` method takes [tasks_stoptx::W](W) writer structure"] +impl crate::Writable for TASKS_STOPTX_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets TASKS_STOPTX to value 0"] +impl crate::Resettable for TASKS_STOPTX_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/uarte0/txd.rs b/down-the-stack/dk_pac/src/uarte0/txd.rs new file mode 100644 index 0000000..8a19551 --- /dev/null +++ b/down-the-stack/dk_pac/src/uarte0/txd.rs @@ -0,0 +1,22 @@ +#[doc = r"Register block"] +#[repr(C)] +pub struct TXD { + #[doc = "0x00 - Data pointer"] + pub ptr: PTR, + #[doc = "0x04 - Maximum number of bytes in transmit buffer"] + pub maxcnt: MAXCNT, + #[doc = "0x08 - Number of bytes transferred in the last transaction"] + pub amount: AMOUNT, +} +#[doc = "PTR (rw) register accessor: an alias for `Reg`"] +pub type PTR = crate::Reg; +#[doc = "Data pointer"] +pub mod ptr; +#[doc = "MAXCNT (rw) register accessor: an alias for `Reg`"] +pub type MAXCNT = crate::Reg; +#[doc = "Maximum number of bytes in transmit buffer"] +pub mod maxcnt; +#[doc = "AMOUNT (r) register accessor: an alias for `Reg`"] +pub type AMOUNT = crate::Reg; +#[doc = "Number of bytes transferred in the last transaction"] +pub mod amount; diff --git a/down-the-stack/dk_pac/src/uarte0/txd/amount.rs b/down-the-stack/dk_pac/src/uarte0/txd/amount.rs new file mode 100644 index 0000000..b48d827 --- /dev/null +++ b/down-the-stack/dk_pac/src/uarte0/txd/amount.rs @@ -0,0 +1,37 @@ +#[doc = "Register `AMOUNT` 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 = "Field `AMOUNT` reader - Number of bytes transferred in the last transaction"] +pub type AMOUNT_R = crate::FieldReader; +impl R { + #[doc = "Bits 0:7 - Number of bytes transferred in the last transaction"] + #[inline(always)] + pub fn amount(&self) -> AMOUNT_R { + AMOUNT_R::new((self.bits & 0xff) as u8) + } +} +#[doc = "Number of bytes transferred in the last transaction\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 [amount](index.html) module"] +pub struct AMOUNT_SPEC; +impl crate::RegisterSpec for AMOUNT_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [amount::R](R) reader structure"] +impl crate::Readable for AMOUNT_SPEC { + type Reader = R; +} +#[doc = "`reset()` method sets AMOUNT to value 0"] +impl crate::Resettable for AMOUNT_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/uarte0/txd/maxcnt.rs b/down-the-stack/dk_pac/src/uarte0/txd/maxcnt.rs new file mode 100644 index 0000000..084733c --- /dev/null +++ b/down-the-stack/dk_pac/src/uarte0/txd/maxcnt.rs @@ -0,0 +1,80 @@ +#[doc = "Register `MAXCNT` 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 `MAXCNT` 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 `MAXCNT` reader - Maximum number of bytes in transmit buffer"] +pub type MAXCNT_R = crate::FieldReader; +#[doc = "Field `MAXCNT` writer - Maximum number of bytes in transmit buffer"] +pub type MAXCNT_W<'a, const O: u8> = crate::FieldWriter<'a, u32, MAXCNT_SPEC, u8, u8, 8, O>; +impl R { + #[doc = "Bits 0:7 - Maximum number of bytes in transmit buffer"] + #[inline(always)] + pub fn maxcnt(&self) -> MAXCNT_R { + MAXCNT_R::new((self.bits & 0xff) as u8) + } +} +impl W { + #[doc = "Bits 0:7 - Maximum number of bytes in transmit buffer"] + #[inline(always)] + #[must_use] + pub fn maxcnt(&mut self) -> MAXCNT_W<0> { + MAXCNT_W::new(self) + } + #[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 = "Maximum number of bytes in transmit buffer\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 [maxcnt](index.html) module"] +pub struct MAXCNT_SPEC; +impl crate::RegisterSpec for MAXCNT_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [maxcnt::R](R) reader structure"] +impl crate::Readable for MAXCNT_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [maxcnt::W](W) writer structure"] +impl crate::Writable for MAXCNT_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets MAXCNT to value 0"] +impl crate::Resettable for MAXCNT_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/uarte0/txd/ptr.rs b/down-the-stack/dk_pac/src/uarte0/txd/ptr.rs new file mode 100644 index 0000000..2f2c926 --- /dev/null +++ b/down-the-stack/dk_pac/src/uarte0/txd/ptr.rs @@ -0,0 +1,80 @@ +#[doc = "Register `PTR` 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 `PTR` 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 `PTR` reader - Data pointer"] +pub type PTR_R = crate::FieldReader; +#[doc = "Field `PTR` writer - Data pointer"] +pub type PTR_W<'a, const O: u8> = crate::FieldWriter<'a, u32, PTR_SPEC, u32, u32, 32, O>; +impl R { + #[doc = "Bits 0:31 - Data pointer"] + #[inline(always)] + pub fn ptr(&self) -> PTR_R { + PTR_R::new(self.bits) + } +} +impl W { + #[doc = "Bits 0:31 - Data pointer"] + #[inline(always)] + #[must_use] + pub fn ptr(&mut self) -> PTR_W<0> { + PTR_W::new(self) + } + #[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 = "Data pointer\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 [ptr](index.html) module"] +pub struct PTR_SPEC; +impl crate::RegisterSpec for PTR_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [ptr::R](R) reader structure"] +impl crate::Readable for PTR_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [ptr::W](W) writer structure"] +impl crate::Writable for PTR_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets PTR to value 0"] +impl crate::Resettable for PTR_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/uicr.rs b/down-the-stack/dk_pac/src/uicr.rs new file mode 100644 index 0000000..4ffaec6 --- /dev/null +++ b/down-the-stack/dk_pac/src/uicr.rs @@ -0,0 +1,42 @@ +#[doc = r"Register block"] +#[repr(C)] +pub struct RegisterBlock { + _reserved0: [u8; 0x14], + #[doc = "0x14..0x50 - Description collection: Reserved for Nordic firmware design"] + pub nrffw: [NRFFW; 15], + #[doc = "0x50..0x80 - Description collection: Reserved for Nordic hardware design"] + pub nrfhw: [NRFHW; 12], + #[doc = "0x80..0x100 - Description collection: Reserved for customer"] + pub customer: [CUSTOMER; 32], + _reserved3: [u8; 0x0100], + #[doc = "0x200..0x208 - Description collection: Mapping of the nRESET function (see POWER chapter for details)"] + pub pselreset: [PSELRESET; 2], + #[doc = "0x208 - Access port protection"] + pub approtect: APPROTECT, + #[doc = "0x20c - Setting of pins dedicated to NFC functionality: NFC antenna or GPIO"] + pub nfcpins: NFCPINS, +} +#[doc = "NRFFW (rw) register accessor: an alias for `Reg`"] +pub type NRFFW = crate::Reg; +#[doc = "Description collection: Reserved for Nordic firmware design"] +pub mod nrffw; +#[doc = "NRFHW (rw) register accessor: an alias for `Reg`"] +pub type NRFHW = crate::Reg; +#[doc = "Description collection: Reserved for Nordic hardware design"] +pub mod nrfhw; +#[doc = "CUSTOMER (rw) register accessor: an alias for `Reg`"] +pub type CUSTOMER = crate::Reg; +#[doc = "Description collection: Reserved for customer"] +pub mod customer; +#[doc = "PSELRESET (rw) register accessor: an alias for `Reg`"] +pub type PSELRESET = crate::Reg; +#[doc = "Description collection: Mapping of the nRESET function (see POWER chapter for details)"] +pub mod pselreset; +#[doc = "APPROTECT (rw) register accessor: an alias for `Reg`"] +pub type APPROTECT = crate::Reg; +#[doc = "Access port protection"] +pub mod approtect; +#[doc = "NFCPINS (rw) register accessor: an alias for `Reg`"] +pub type NFCPINS = crate::Reg; +#[doc = "Setting of pins dedicated to NFC functionality: NFC antenna or GPIO"] +pub mod nfcpins; diff --git a/down-the-stack/dk_pac/src/uicr/approtect.rs b/down-the-stack/dk_pac/src/uicr/approtect.rs new file mode 100644 index 0000000..df212ec --- /dev/null +++ b/down-the-stack/dk_pac/src/uicr/approtect.rs @@ -0,0 +1,141 @@ +#[doc = "Register `APPROTECT` 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 `APPROTECT` 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 `PALL` reader - Enable or disable access port protection."] +pub type PALL_R = crate::FieldReader; +#[doc = "Enable or disable access port protection.\n\nValue on reset: 255"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +#[repr(u8)] +pub enum PALL_A { + #[doc = "255: Hardware disable of access port protection for devices where access port protection is controlled by hardware"] + DISABLED = 255, + #[doc = "90: Hardware disable of access port protection for devices where access port protection is controlled by hardware and software"] + HW_DISABLED = 90, + #[doc = "0: Enable"] + ENABLED = 0, +} +impl From for u8 { + #[inline(always)] + fn from(variant: PALL_A) -> Self { + variant as _ + } +} +impl PALL_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> Option { + match self.bits { + 255 => Some(PALL_A::DISABLED), + 90 => Some(PALL_A::HW_DISABLED), + 0 => Some(PALL_A::ENABLED), + _ => None, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == PALL_A::DISABLED + } + #[doc = "Checks if the value of the field is `HW_DISABLED`"] + #[inline(always)] + pub fn is_hw_disabled(&self) -> bool { + *self == PALL_A::HW_DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == PALL_A::ENABLED + } +} +#[doc = "Field `PALL` writer - Enable or disable access port protection."] +pub type PALL_W<'a, const O: u8> = crate::FieldWriter<'a, u32, APPROTECT_SPEC, u8, PALL_A, 8, O>; +impl<'a, const O: u8> PALL_W<'a, O> { + #[doc = "Hardware disable of access port protection for devices where access port protection is controlled by hardware"] + #[inline(always)] + pub fn disabled(self) -> &'a mut W { + self.variant(PALL_A::DISABLED) + } + #[doc = "Hardware disable of access port protection for devices where access port protection is controlled by hardware and software"] + #[inline(always)] + pub fn hw_disabled(self) -> &'a mut W { + self.variant(PALL_A::HW_DISABLED) + } + #[doc = "Enable"] + #[inline(always)] + pub fn enabled(self) -> &'a mut W { + self.variant(PALL_A::ENABLED) + } +} +impl R { + #[doc = "Bits 0:7 - Enable or disable access port protection."] + #[inline(always)] + pub fn pall(&self) -> PALL_R { + PALL_R::new((self.bits & 0xff) as u8) + } +} +impl W { + #[doc = "Bits 0:7 - Enable or disable access port protection."] + #[inline(always)] + #[must_use] + pub fn pall(&mut self) -> PALL_W<0> { + PALL_W::new(self) + } + #[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 = "Access port protection\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 [approtect](index.html) module"] +pub struct APPROTECT_SPEC; +impl crate::RegisterSpec for APPROTECT_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [approtect::R](R) reader structure"] +impl crate::Readable for APPROTECT_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [approtect::W](W) writer structure"] +impl crate::Writable for APPROTECT_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets APPROTECT to value 0xffff_ffff"] +impl crate::Resettable for APPROTECT_SPEC { + const RESET_VALUE: Self::Ux = 0xffff_ffff; +} diff --git a/down-the-stack/dk_pac/src/uicr/customer.rs b/down-the-stack/dk_pac/src/uicr/customer.rs new file mode 100644 index 0000000..0142ff9 --- /dev/null +++ b/down-the-stack/dk_pac/src/uicr/customer.rs @@ -0,0 +1,81 @@ +#[doc = "Register `CUSTOMER[%s]` 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 `CUSTOMER[%s]` 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 `CUSTOMER` reader - Reserved for customer"] +pub type CUSTOMER_R = crate::FieldReader; +#[doc = "Field `CUSTOMER` writer - Reserved for customer"] +pub type CUSTOMER_W<'a, const O: u8> = crate::FieldWriter<'a, u32, CUSTOMER_SPEC, u32, u32, 32, O>; +impl R { + #[doc = "Bits 0:31 - Reserved for customer"] + #[inline(always)] + pub fn customer(&self) -> CUSTOMER_R { + CUSTOMER_R::new(self.bits) + } +} +impl W { + #[doc = "Bits 0:31 - Reserved for customer"] + #[inline(always)] + #[must_use] + pub fn customer(&mut self) -> CUSTOMER_W<0> { + CUSTOMER_W::new(self) + } + #[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 = "Description collection: Reserved for customer\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 [customer](index.html) module"] +pub struct CUSTOMER_SPEC; +impl crate::RegisterSpec for CUSTOMER_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [customer::R](R) reader structure"] +impl crate::Readable for CUSTOMER_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [customer::W](W) writer structure"] +impl crate::Writable for CUSTOMER_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets CUSTOMER[%s] +to value 0xffff_ffff"] +impl crate::Resettable for CUSTOMER_SPEC { + const RESET_VALUE: Self::Ux = 0xffff_ffff; +} diff --git a/down-the-stack/dk_pac/src/uicr/nfcpins.rs b/down-the-stack/dk_pac/src/uicr/nfcpins.rs new file mode 100644 index 0000000..57d421e --- /dev/null +++ b/down-the-stack/dk_pac/src/uicr/nfcpins.rs @@ -0,0 +1,126 @@ +#[doc = "Register `NFCPINS` 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 `NFCPINS` 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 `PROTECT` reader - Setting of pins dedicated to NFC functionality"] +pub type PROTECT_R = crate::BitReader; +#[doc = "Setting of pins dedicated to NFC functionality\n\nValue on reset: 1"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PROTECT_A { + #[doc = "0: Operation as GPIO pins. Same protection as normal GPIO pins."] + DISABLED = 0, + #[doc = "1: Operation as NFC antenna pins. Configures the protection for NFC operation."] + NFC = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: PROTECT_A) -> Self { + variant as u8 != 0 + } +} +impl PROTECT_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> PROTECT_A { + match self.bits { + false => PROTECT_A::DISABLED, + true => PROTECT_A::NFC, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == PROTECT_A::DISABLED + } + #[doc = "Checks if the value of the field is `NFC`"] + #[inline(always)] + pub fn is_nfc(&self) -> bool { + *self == PROTECT_A::NFC + } +} +#[doc = "Field `PROTECT` writer - Setting of pins dedicated to NFC functionality"] +pub type PROTECT_W<'a, const O: u8> = crate::BitWriter<'a, u32, NFCPINS_SPEC, PROTECT_A, O>; +impl<'a, const O: u8> PROTECT_W<'a, O> { + #[doc = "Operation as GPIO pins. Same protection as normal GPIO pins."] + #[inline(always)] + pub fn disabled(self) -> &'a mut W { + self.variant(PROTECT_A::DISABLED) + } + #[doc = "Operation as NFC antenna pins. Configures the protection for NFC operation."] + #[inline(always)] + pub fn nfc(self) -> &'a mut W { + self.variant(PROTECT_A::NFC) + } +} +impl R { + #[doc = "Bit 0 - Setting of pins dedicated to NFC functionality"] + #[inline(always)] + pub fn protect(&self) -> PROTECT_R { + PROTECT_R::new((self.bits & 1) != 0) + } +} +impl W { + #[doc = "Bit 0 - Setting of pins dedicated to NFC functionality"] + #[inline(always)] + #[must_use] + pub fn protect(&mut self) -> PROTECT_W<0> { + PROTECT_W::new(self) + } + #[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 = "Setting of pins dedicated to NFC functionality: NFC antenna or GPIO\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 [nfcpins](index.html) module"] +pub struct NFCPINS_SPEC; +impl crate::RegisterSpec for NFCPINS_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [nfcpins::R](R) reader structure"] +impl crate::Readable for NFCPINS_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [nfcpins::W](W) writer structure"] +impl crate::Writable for NFCPINS_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets NFCPINS to value 0xffff_ffff"] +impl crate::Resettable for NFCPINS_SPEC { + const RESET_VALUE: Self::Ux = 0xffff_ffff; +} diff --git a/down-the-stack/dk_pac/src/uicr/nrffw.rs b/down-the-stack/dk_pac/src/uicr/nrffw.rs new file mode 100644 index 0000000..4f313db --- /dev/null +++ b/down-the-stack/dk_pac/src/uicr/nrffw.rs @@ -0,0 +1,81 @@ +#[doc = "Register `NRFFW[%s]` 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 `NRFFW[%s]` 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 `NRFFW` reader - Reserved for Nordic firmware design"] +pub type NRFFW_R = crate::FieldReader; +#[doc = "Field `NRFFW` writer - Reserved for Nordic firmware design"] +pub type NRFFW_W<'a, const O: u8> = crate::FieldWriter<'a, u32, NRFFW_SPEC, u32, u32, 32, O>; +impl R { + #[doc = "Bits 0:31 - Reserved for Nordic firmware design"] + #[inline(always)] + pub fn nrffw(&self) -> NRFFW_R { + NRFFW_R::new(self.bits) + } +} +impl W { + #[doc = "Bits 0:31 - Reserved for Nordic firmware design"] + #[inline(always)] + #[must_use] + pub fn nrffw(&mut self) -> NRFFW_W<0> { + NRFFW_W::new(self) + } + #[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 = "Description collection: Reserved for Nordic firmware design\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 [nrffw](index.html) module"] +pub struct NRFFW_SPEC; +impl crate::RegisterSpec for NRFFW_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [nrffw::R](R) reader structure"] +impl crate::Readable for NRFFW_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [nrffw::W](W) writer structure"] +impl crate::Writable for NRFFW_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets NRFFW[%s] +to value 0xffff_ffff"] +impl crate::Resettable for NRFFW_SPEC { + const RESET_VALUE: Self::Ux = 0xffff_ffff; +} diff --git a/down-the-stack/dk_pac/src/uicr/nrfhw.rs b/down-the-stack/dk_pac/src/uicr/nrfhw.rs new file mode 100644 index 0000000..99f3f49 --- /dev/null +++ b/down-the-stack/dk_pac/src/uicr/nrfhw.rs @@ -0,0 +1,81 @@ +#[doc = "Register `NRFHW[%s]` 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 `NRFHW[%s]` 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 `NRFHW` reader - Reserved for Nordic hardware design"] +pub type NRFHW_R = crate::FieldReader; +#[doc = "Field `NRFHW` writer - Reserved for Nordic hardware design"] +pub type NRFHW_W<'a, const O: u8> = crate::FieldWriter<'a, u32, NRFHW_SPEC, u32, u32, 32, O>; +impl R { + #[doc = "Bits 0:31 - Reserved for Nordic hardware design"] + #[inline(always)] + pub fn nrfhw(&self) -> NRFHW_R { + NRFHW_R::new(self.bits) + } +} +impl W { + #[doc = "Bits 0:31 - Reserved for Nordic hardware design"] + #[inline(always)] + #[must_use] + pub fn nrfhw(&mut self) -> NRFHW_W<0> { + NRFHW_W::new(self) + } + #[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 = "Description collection: Reserved for Nordic hardware design\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 [nrfhw](index.html) module"] +pub struct NRFHW_SPEC; +impl crate::RegisterSpec for NRFHW_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [nrfhw::R](R) reader structure"] +impl crate::Readable for NRFHW_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [nrfhw::W](W) writer structure"] +impl crate::Writable for NRFHW_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets NRFHW[%s] +to value 0xffff_ffff"] +impl crate::Resettable for NRFHW_SPEC { + const RESET_VALUE: Self::Ux = 0xffff_ffff; +} diff --git a/down-the-stack/dk_pac/src/uicr/pselreset.rs b/down-the-stack/dk_pac/src/uicr/pselreset.rs new file mode 100644 index 0000000..7150cff --- /dev/null +++ b/down-the-stack/dk_pac/src/uicr/pselreset.rs @@ -0,0 +1,142 @@ +#[doc = "Register `PSELRESET[%s]` 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 `PSELRESET[%s]` 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 `PIN` reader - GPIO number P0.n onto which Reset is exposed"] +pub type PIN_R = crate::FieldReader; +#[doc = "Field `PIN` writer - GPIO number P0.n onto which Reset is exposed"] +pub type PIN_W<'a, const O: u8> = crate::FieldWriter<'a, u32, PSELRESET_SPEC, u8, u8, 6, O>; +#[doc = "Field `CONNECT` reader - Connection"] +pub type CONNECT_R = crate::BitReader; +#[doc = "Connection\n\nValue on reset: 1"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum CONNECT_A { + #[doc = "1: Disconnect"] + DISCONNECTED = 1, + #[doc = "0: Connect"] + CONNECTED = 0, +} +impl From for bool { + #[inline(always)] + fn from(variant: CONNECT_A) -> Self { + variant as u8 != 0 + } +} +impl CONNECT_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> CONNECT_A { + match self.bits { + true => CONNECT_A::DISCONNECTED, + false => CONNECT_A::CONNECTED, + } + } + #[doc = "Checks if the value of the field is `DISCONNECTED`"] + #[inline(always)] + pub fn is_disconnected(&self) -> bool { + *self == CONNECT_A::DISCONNECTED + } + #[doc = "Checks if the value of the field is `CONNECTED`"] + #[inline(always)] + pub fn is_connected(&self) -> bool { + *self == CONNECT_A::CONNECTED + } +} +#[doc = "Field `CONNECT` writer - Connection"] +pub type CONNECT_W<'a, const O: u8> = crate::BitWriter<'a, u32, PSELRESET_SPEC, CONNECT_A, O>; +impl<'a, const O: u8> CONNECT_W<'a, O> { + #[doc = "Disconnect"] + #[inline(always)] + pub fn disconnected(self) -> &'a mut W { + self.variant(CONNECT_A::DISCONNECTED) + } + #[doc = "Connect"] + #[inline(always)] + pub fn connected(self) -> &'a mut W { + self.variant(CONNECT_A::CONNECTED) + } +} +impl R { + #[doc = "Bits 0:5 - GPIO number P0.n onto which Reset is exposed"] + #[inline(always)] + pub fn pin(&self) -> PIN_R { + PIN_R::new((self.bits & 0x3f) as u8) + } + #[doc = "Bit 31 - Connection"] + #[inline(always)] + pub fn connect(&self) -> CONNECT_R { + CONNECT_R::new(((self.bits >> 31) & 1) != 0) + } +} +impl W { + #[doc = "Bits 0:5 - GPIO number P0.n onto which Reset is exposed"] + #[inline(always)] + #[must_use] + pub fn pin(&mut self) -> PIN_W<0> { + PIN_W::new(self) + } + #[doc = "Bit 31 - Connection"] + #[inline(always)] + #[must_use] + pub fn connect(&mut self) -> CONNECT_W<31> { + CONNECT_W::new(self) + } + #[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 = "Description collection: Mapping of the nRESET function (see POWER chapter for details)\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 [pselreset](index.html) module"] +pub struct PSELRESET_SPEC; +impl crate::RegisterSpec for PSELRESET_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [pselreset::R](R) reader structure"] +impl crate::Readable for PSELRESET_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [pselreset::W](W) writer structure"] +impl crate::Writable for PSELRESET_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets PSELRESET[%s] +to value 0xffff_ffff"] +impl crate::Resettable for PSELRESET_SPEC { + const RESET_VALUE: Self::Ux = 0xffff_ffff; +} diff --git a/down-the-stack/dk_pac/src/wdt.rs b/down-the-stack/dk_pac/src/wdt.rs new file mode 100644 index 0000000..e912d40 --- /dev/null +++ b/down-the-stack/dk_pac/src/wdt.rs @@ -0,0 +1,69 @@ +#[doc = r"Register block"] +#[repr(C)] +pub struct RegisterBlock { + #[doc = "0x00 - Start the watchdog"] + pub tasks_start: TASKS_START, + _reserved1: [u8; 0xfc], + #[doc = "0x100 - Watchdog timeout"] + pub events_timeout: EVENTS_TIMEOUT, + _reserved2: [u8; 0x0200], + #[doc = "0x304 - Enable interrupt"] + pub intenset: INTENSET, + #[doc = "0x308 - Disable interrupt"] + pub intenclr: INTENCLR, + _reserved4: [u8; 0xf4], + #[doc = "0x400 - Run status"] + pub runstatus: RUNSTATUS, + #[doc = "0x404 - Request status"] + pub reqstatus: REQSTATUS, + _reserved6: [u8; 0xfc], + #[doc = "0x504 - Counter reload value"] + pub crv: CRV, + #[doc = "0x508 - Enable register for reload request registers"] + pub rren: RREN, + #[doc = "0x50c - Configuration register"] + pub config: CONFIG, + _reserved9: [u8; 0xf0], + #[doc = "0x600..0x620 - Description collection: Reload request n"] + pub rr: [RR; 8], +} +#[doc = "TASKS_START (w) register accessor: an alias for `Reg`"] +pub type TASKS_START = crate::Reg; +#[doc = "Start the watchdog"] +pub mod tasks_start; +#[doc = "EVENTS_TIMEOUT (rw) register accessor: an alias for `Reg`"] +pub type EVENTS_TIMEOUT = crate::Reg; +#[doc = "Watchdog timeout"] +pub mod events_timeout; +#[doc = "INTENSET (rw) register accessor: an alias for `Reg`"] +pub type INTENSET = crate::Reg; +#[doc = "Enable interrupt"] +pub mod intenset; +#[doc = "INTENCLR (rw) register accessor: an alias for `Reg`"] +pub type INTENCLR = crate::Reg; +#[doc = "Disable interrupt"] +pub mod intenclr; +#[doc = "RUNSTATUS (r) register accessor: an alias for `Reg`"] +pub type RUNSTATUS = crate::Reg; +#[doc = "Run status"] +pub mod runstatus; +#[doc = "REQSTATUS (r) register accessor: an alias for `Reg`"] +pub type REQSTATUS = crate::Reg; +#[doc = "Request status"] +pub mod reqstatus; +#[doc = "CRV (rw) register accessor: an alias for `Reg`"] +pub type CRV = crate::Reg; +#[doc = "Counter reload value"] +pub mod crv; +#[doc = "RREN (rw) register accessor: an alias for `Reg`"] +pub type RREN = crate::Reg; +#[doc = "Enable register for reload request registers"] +pub mod rren; +#[doc = "CONFIG (rw) register accessor: an alias for `Reg`"] +pub type CONFIG = crate::Reg; +#[doc = "Configuration register"] +pub mod config; +#[doc = "RR (w) register accessor: an alias for `Reg`"] +pub type RR = crate::Reg; +#[doc = "Description collection: Reload request n"] +pub mod rr; diff --git a/down-the-stack/dk_pac/src/wdt/config.rs b/down-the-stack/dk_pac/src/wdt/config.rs new file mode 100644 index 0000000..e29a9c8 --- /dev/null +++ b/down-the-stack/dk_pac/src/wdt/config.rs @@ -0,0 +1,187 @@ +#[doc = "Register `CONFIG` 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 `CONFIG` 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 `SLEEP` reader - Configure the watchdog to either be paused, or kept running, while the CPU is sleeping"] +pub type SLEEP_R = crate::BitReader; +#[doc = "Configure the watchdog to either be paused, or kept running, while the CPU is sleeping\n\nValue on reset: 1"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum SLEEP_A { + #[doc = "0: Pause watchdog while the CPU is sleeping"] + PAUSE = 0, + #[doc = "1: Keep the watchdog running while the CPU is sleeping"] + RUN = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: SLEEP_A) -> Self { + variant as u8 != 0 + } +} +impl SLEEP_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> SLEEP_A { + match self.bits { + false => SLEEP_A::PAUSE, + true => SLEEP_A::RUN, + } + } + #[doc = "Checks if the value of the field is `PAUSE`"] + #[inline(always)] + pub fn is_pause(&self) -> bool { + *self == SLEEP_A::PAUSE + } + #[doc = "Checks if the value of the field is `RUN`"] + #[inline(always)] + pub fn is_run(&self) -> bool { + *self == SLEEP_A::RUN + } +} +#[doc = "Field `SLEEP` writer - Configure the watchdog to either be paused, or kept running, while the CPU is sleeping"] +pub type SLEEP_W<'a, const O: u8> = crate::BitWriter<'a, u32, CONFIG_SPEC, SLEEP_A, O>; +impl<'a, const O: u8> SLEEP_W<'a, O> { + #[doc = "Pause watchdog while the CPU is sleeping"] + #[inline(always)] + pub fn pause(self) -> &'a mut W { + self.variant(SLEEP_A::PAUSE) + } + #[doc = "Keep the watchdog running while the CPU is sleeping"] + #[inline(always)] + pub fn run(self) -> &'a mut W { + self.variant(SLEEP_A::RUN) + } +} +#[doc = "Field `HALT` reader - Configure the watchdog to either be paused, or kept running, while the CPU is halted by the debugger"] +pub type HALT_R = crate::BitReader; +#[doc = "Configure the watchdog to either be paused, or kept running, while the CPU is halted by the debugger\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum HALT_A { + #[doc = "0: Pause watchdog while the CPU is halted by the debugger"] + PAUSE = 0, + #[doc = "1: Keep the watchdog running while the CPU is halted by the debugger"] + RUN = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: HALT_A) -> Self { + variant as u8 != 0 + } +} +impl HALT_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> HALT_A { + match self.bits { + false => HALT_A::PAUSE, + true => HALT_A::RUN, + } + } + #[doc = "Checks if the value of the field is `PAUSE`"] + #[inline(always)] + pub fn is_pause(&self) -> bool { + *self == HALT_A::PAUSE + } + #[doc = "Checks if the value of the field is `RUN`"] + #[inline(always)] + pub fn is_run(&self) -> bool { + *self == HALT_A::RUN + } +} +#[doc = "Field `HALT` writer - Configure the watchdog to either be paused, or kept running, while the CPU is halted by the debugger"] +pub type HALT_W<'a, const O: u8> = crate::BitWriter<'a, u32, CONFIG_SPEC, HALT_A, O>; +impl<'a, const O: u8> HALT_W<'a, O> { + #[doc = "Pause watchdog while the CPU is halted by the debugger"] + #[inline(always)] + pub fn pause(self) -> &'a mut W { + self.variant(HALT_A::PAUSE) + } + #[doc = "Keep the watchdog running while the CPU is halted by the debugger"] + #[inline(always)] + pub fn run(self) -> &'a mut W { + self.variant(HALT_A::RUN) + } +} +impl R { + #[doc = "Bit 0 - Configure the watchdog to either be paused, or kept running, while the CPU is sleeping"] + #[inline(always)] + pub fn sleep(&self) -> SLEEP_R { + SLEEP_R::new((self.bits & 1) != 0) + } + #[doc = "Bit 3 - Configure the watchdog to either be paused, or kept running, while the CPU is halted by the debugger"] + #[inline(always)] + pub fn halt(&self) -> HALT_R { + HALT_R::new(((self.bits >> 3) & 1) != 0) + } +} +impl W { + #[doc = "Bit 0 - Configure the watchdog to either be paused, or kept running, while the CPU is sleeping"] + #[inline(always)] + #[must_use] + pub fn sleep(&mut self) -> SLEEP_W<0> { + SLEEP_W::new(self) + } + #[doc = "Bit 3 - Configure the watchdog to either be paused, or kept running, while the CPU is halted by the debugger"] + #[inline(always)] + #[must_use] + pub fn halt(&mut self) -> HALT_W<3> { + HALT_W::new(self) + } + #[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 = "Configuration register\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 [config](index.html) module"] +pub struct CONFIG_SPEC; +impl crate::RegisterSpec for CONFIG_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [config::R](R) reader structure"] +impl crate::Readable for CONFIG_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [config::W](W) writer structure"] +impl crate::Writable for 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 CONFIG to value 0x01"] +impl crate::Resettable for CONFIG_SPEC { + const RESET_VALUE: Self::Ux = 0x01; +} diff --git a/down-the-stack/dk_pac/src/wdt/crv.rs b/down-the-stack/dk_pac/src/wdt/crv.rs new file mode 100644 index 0000000..320c57b --- /dev/null +++ b/down-the-stack/dk_pac/src/wdt/crv.rs @@ -0,0 +1,80 @@ +#[doc = "Register `CRV` 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 `CRV` 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 `CRV` reader - Counter reload value in number of cycles of the 32.768 kHz clock"] +pub type CRV_R = crate::FieldReader; +#[doc = "Field `CRV` writer - Counter reload value in number of cycles of the 32.768 kHz clock"] +pub type CRV_W<'a, const O: u8> = crate::FieldWriter<'a, u32, CRV_SPEC, u32, u32, 32, O>; +impl R { + #[doc = "Bits 0:31 - Counter reload value in number of cycles of the 32.768 kHz clock"] + #[inline(always)] + pub fn crv(&self) -> CRV_R { + CRV_R::new(self.bits) + } +} +impl W { + #[doc = "Bits 0:31 - Counter reload value in number of cycles of the 32.768 kHz clock"] + #[inline(always)] + #[must_use] + pub fn crv(&mut self) -> CRV_W<0> { + CRV_W::new(self) + } + #[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 = "Counter reload value\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 [crv](index.html) module"] +pub struct CRV_SPEC; +impl crate::RegisterSpec for CRV_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [crv::R](R) reader structure"] +impl crate::Readable for CRV_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [crv::W](W) writer structure"] +impl crate::Writable for CRV_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets CRV to value 0xffff_ffff"] +impl crate::Resettable for CRV_SPEC { + const RESET_VALUE: Self::Ux = 0xffff_ffff; +} diff --git a/down-the-stack/dk_pac/src/wdt/events_timeout.rs b/down-the-stack/dk_pac/src/wdt/events_timeout.rs new file mode 100644 index 0000000..bd35395 --- /dev/null +++ b/down-the-stack/dk_pac/src/wdt/events_timeout.rs @@ -0,0 +1,127 @@ +#[doc = "Register `EVENTS_TIMEOUT` 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 `EVENTS_TIMEOUT` 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 `EVENTS_TIMEOUT` reader - Watchdog timeout"] +pub type EVENTS_TIMEOUT_R = crate::BitReader; +#[doc = "Watchdog timeout\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum EVENTS_TIMEOUT_A { + #[doc = "0: Event not generated"] + NOT_GENERATED = 0, + #[doc = "1: Event generated"] + GENERATED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: EVENTS_TIMEOUT_A) -> Self { + variant as u8 != 0 + } +} +impl EVENTS_TIMEOUT_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> EVENTS_TIMEOUT_A { + match self.bits { + false => EVENTS_TIMEOUT_A::NOT_GENERATED, + true => EVENTS_TIMEOUT_A::GENERATED, + } + } + #[doc = "Checks if the value of the field is `NOT_GENERATED`"] + #[inline(always)] + pub fn is_not_generated(&self) -> bool { + *self == EVENTS_TIMEOUT_A::NOT_GENERATED + } + #[doc = "Checks if the value of the field is `GENERATED`"] + #[inline(always)] + pub fn is_generated(&self) -> bool { + *self == EVENTS_TIMEOUT_A::GENERATED + } +} +#[doc = "Field `EVENTS_TIMEOUT` writer - Watchdog timeout"] +pub type EVENTS_TIMEOUT_W<'a, const O: u8> = + crate::BitWriter<'a, u32, EVENTS_TIMEOUT_SPEC, EVENTS_TIMEOUT_A, O>; +impl<'a, const O: u8> EVENTS_TIMEOUT_W<'a, O> { + #[doc = "Event not generated"] + #[inline(always)] + pub fn not_generated(self) -> &'a mut W { + self.variant(EVENTS_TIMEOUT_A::NOT_GENERATED) + } + #[doc = "Event generated"] + #[inline(always)] + pub fn generated(self) -> &'a mut W { + self.variant(EVENTS_TIMEOUT_A::GENERATED) + } +} +impl R { + #[doc = "Bit 0 - Watchdog timeout"] + #[inline(always)] + pub fn events_timeout(&self) -> EVENTS_TIMEOUT_R { + EVENTS_TIMEOUT_R::new((self.bits & 1) != 0) + } +} +impl W { + #[doc = "Bit 0 - Watchdog timeout"] + #[inline(always)] + #[must_use] + pub fn events_timeout(&mut self) -> EVENTS_TIMEOUT_W<0> { + EVENTS_TIMEOUT_W::new(self) + } + #[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 = "Watchdog timeout\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 [events_timeout](index.html) module"] +pub struct EVENTS_TIMEOUT_SPEC; +impl crate::RegisterSpec for EVENTS_TIMEOUT_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [events_timeout::R](R) reader structure"] +impl crate::Readable for EVENTS_TIMEOUT_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [events_timeout::W](W) writer structure"] +impl crate::Writable for EVENTS_TIMEOUT_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets EVENTS_TIMEOUT to value 0"] +impl crate::Resettable for EVENTS_TIMEOUT_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/wdt/intenclr.rs b/down-the-stack/dk_pac/src/wdt/intenclr.rs new file mode 100644 index 0000000..a6e662e --- /dev/null +++ b/down-the-stack/dk_pac/src/wdt/intenclr.rs @@ -0,0 +1,133 @@ +#[doc = "Register `INTENCLR` 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 `INTENCLR` 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 `TIMEOUT` reader - Write '1' to disable interrupt for event TIMEOUT"] +pub type TIMEOUT_R = crate::BitReader; +#[doc = "Write '1' to disable interrupt for event TIMEOUT\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum TIMEOUT_A { + #[doc = "0: Read: Disabled"] + DISABLED = 0, + #[doc = "1: Read: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: TIMEOUT_A) -> Self { + variant as u8 != 0 + } +} +impl TIMEOUT_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> TIMEOUT_A { + match self.bits { + false => TIMEOUT_A::DISABLED, + true => TIMEOUT_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == TIMEOUT_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == TIMEOUT_A::ENABLED + } +} +#[doc = "Write '1' to disable interrupt for event TIMEOUT\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum TIMEOUT_AW { + #[doc = "1: Disable"] + CLEAR = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: TIMEOUT_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `TIMEOUT` writer - Write '1' to disable interrupt for event TIMEOUT"] +pub type TIMEOUT_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENCLR_SPEC, TIMEOUT_AW, O>; +impl<'a, const O: u8> TIMEOUT_W<'a, O> { + #[doc = "Disable"] + #[inline(always)] + pub fn clear(self) -> &'a mut W { + self.variant(TIMEOUT_AW::CLEAR) + } +} +impl R { + #[doc = "Bit 0 - Write '1' to disable interrupt for event TIMEOUT"] + #[inline(always)] + pub fn timeout(&self) -> TIMEOUT_R { + TIMEOUT_R::new((self.bits & 1) != 0) + } +} +impl W { + #[doc = "Bit 0 - Write '1' to disable interrupt for event TIMEOUT"] + #[inline(always)] + #[must_use] + pub fn timeout(&mut self) -> TIMEOUT_W<0> { + TIMEOUT_W::new(self) + } + #[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 = "Disable interrupt\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 [intenclr](index.html) module"] +pub struct INTENCLR_SPEC; +impl crate::RegisterSpec for INTENCLR_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [intenclr::R](R) reader structure"] +impl crate::Readable for INTENCLR_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [intenclr::W](W) writer structure"] +impl crate::Writable for INTENCLR_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets INTENCLR to value 0"] +impl crate::Resettable for INTENCLR_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/wdt/intenset.rs b/down-the-stack/dk_pac/src/wdt/intenset.rs new file mode 100644 index 0000000..7059933 --- /dev/null +++ b/down-the-stack/dk_pac/src/wdt/intenset.rs @@ -0,0 +1,133 @@ +#[doc = "Register `INTENSET` 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 `INTENSET` 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 `TIMEOUT` reader - Write '1' to enable interrupt for event TIMEOUT"] +pub type TIMEOUT_R = crate::BitReader; +#[doc = "Write '1' to enable interrupt for event TIMEOUT\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum TIMEOUT_A { + #[doc = "0: Read: Disabled"] + DISABLED = 0, + #[doc = "1: Read: Enabled"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: TIMEOUT_A) -> Self { + variant as u8 != 0 + } +} +impl TIMEOUT_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> TIMEOUT_A { + match self.bits { + false => TIMEOUT_A::DISABLED, + true => TIMEOUT_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == TIMEOUT_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == TIMEOUT_A::ENABLED + } +} +#[doc = "Write '1' to enable interrupt for event TIMEOUT\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum TIMEOUT_AW { + #[doc = "1: Enable"] + SET = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: TIMEOUT_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `TIMEOUT` writer - Write '1' to enable interrupt for event TIMEOUT"] +pub type TIMEOUT_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENSET_SPEC, TIMEOUT_AW, O>; +impl<'a, const O: u8> TIMEOUT_W<'a, O> { + #[doc = "Enable"] + #[inline(always)] + pub fn set(self) -> &'a mut W { + self.variant(TIMEOUT_AW::SET) + } +} +impl R { + #[doc = "Bit 0 - Write '1' to enable interrupt for event TIMEOUT"] + #[inline(always)] + pub fn timeout(&self) -> TIMEOUT_R { + TIMEOUT_R::new((self.bits & 1) != 0) + } +} +impl W { + #[doc = "Bit 0 - Write '1' to enable interrupt for event TIMEOUT"] + #[inline(always)] + #[must_use] + pub fn timeout(&mut self) -> TIMEOUT_W<0> { + TIMEOUT_W::new(self) + } + #[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 = "Enable interrupt\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 [intenset](index.html) module"] +pub struct INTENSET_SPEC; +impl crate::RegisterSpec for INTENSET_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [intenset::R](R) reader structure"] +impl crate::Readable for INTENSET_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [intenset::W](W) writer structure"] +impl crate::Writable for INTENSET_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets INTENSET to value 0"] +impl crate::Resettable for INTENSET_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/wdt/reqstatus.rs b/down-the-stack/dk_pac/src/wdt/reqstatus.rs new file mode 100644 index 0000000..ea23e10 --- /dev/null +++ b/down-the-stack/dk_pac/src/wdt/reqstatus.rs @@ -0,0 +1,398 @@ +#[doc = "Register `REQSTATUS` 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 = "Field `RR0` reader - Request status for RR\\[0\\] +register"] +pub type RR0_R = crate::BitReader; +#[doc = "Request status for RR\\[0\\] +register\n\nValue on reset: 1"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum RR0_A { + #[doc = "0: RR\\[0\\] +register is not enabled, or are already requesting reload"] + DISABLED_OR_REQUESTED = 0, + #[doc = "1: RR\\[0\\] +register is enabled, and are not yet requesting reload"] + ENABLED_AND_UNREQUESTED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: RR0_A) -> Self { + variant as u8 != 0 + } +} +impl RR0_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> RR0_A { + match self.bits { + false => RR0_A::DISABLED_OR_REQUESTED, + true => RR0_A::ENABLED_AND_UNREQUESTED, + } + } + #[doc = "Checks if the value of the field is `DISABLED_OR_REQUESTED`"] + #[inline(always)] + pub fn is_disabled_or_requested(&self) -> bool { + *self == RR0_A::DISABLED_OR_REQUESTED + } + #[doc = "Checks if the value of the field is `ENABLED_AND_UNREQUESTED`"] + #[inline(always)] + pub fn is_enabled_and_unrequested(&self) -> bool { + *self == RR0_A::ENABLED_AND_UNREQUESTED + } +} +#[doc = "Field `RR1` reader - Request status for RR\\[1\\] +register"] +pub type RR1_R = crate::BitReader; +#[doc = "Request status for RR\\[1\\] +register\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum RR1_A { + #[doc = "0: RR\\[1\\] +register is not enabled, or are already requesting reload"] + DISABLED_OR_REQUESTED = 0, + #[doc = "1: RR\\[1\\] +register is enabled, and are not yet requesting reload"] + ENABLED_AND_UNREQUESTED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: RR1_A) -> Self { + variant as u8 != 0 + } +} +impl RR1_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> RR1_A { + match self.bits { + false => RR1_A::DISABLED_OR_REQUESTED, + true => RR1_A::ENABLED_AND_UNREQUESTED, + } + } + #[doc = "Checks if the value of the field is `DISABLED_OR_REQUESTED`"] + #[inline(always)] + pub fn is_disabled_or_requested(&self) -> bool { + *self == RR1_A::DISABLED_OR_REQUESTED + } + #[doc = "Checks if the value of the field is `ENABLED_AND_UNREQUESTED`"] + #[inline(always)] + pub fn is_enabled_and_unrequested(&self) -> bool { + *self == RR1_A::ENABLED_AND_UNREQUESTED + } +} +#[doc = "Field `RR2` reader - Request status for RR\\[2\\] +register"] +pub type RR2_R = crate::BitReader; +#[doc = "Request status for RR\\[2\\] +register\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum RR2_A { + #[doc = "0: RR\\[2\\] +register is not enabled, or are already requesting reload"] + DISABLED_OR_REQUESTED = 0, + #[doc = "1: RR\\[2\\] +register is enabled, and are not yet requesting reload"] + ENABLED_AND_UNREQUESTED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: RR2_A) -> Self { + variant as u8 != 0 + } +} +impl RR2_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> RR2_A { + match self.bits { + false => RR2_A::DISABLED_OR_REQUESTED, + true => RR2_A::ENABLED_AND_UNREQUESTED, + } + } + #[doc = "Checks if the value of the field is `DISABLED_OR_REQUESTED`"] + #[inline(always)] + pub fn is_disabled_or_requested(&self) -> bool { + *self == RR2_A::DISABLED_OR_REQUESTED + } + #[doc = "Checks if the value of the field is `ENABLED_AND_UNREQUESTED`"] + #[inline(always)] + pub fn is_enabled_and_unrequested(&self) -> bool { + *self == RR2_A::ENABLED_AND_UNREQUESTED + } +} +#[doc = "Field `RR3` reader - Request status for RR\\[3\\] +register"] +pub type RR3_R = crate::BitReader; +#[doc = "Request status for RR\\[3\\] +register\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum RR3_A { + #[doc = "0: RR\\[3\\] +register is not enabled, or are already requesting reload"] + DISABLED_OR_REQUESTED = 0, + #[doc = "1: RR\\[3\\] +register is enabled, and are not yet requesting reload"] + ENABLED_AND_UNREQUESTED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: RR3_A) -> Self { + variant as u8 != 0 + } +} +impl RR3_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> RR3_A { + match self.bits { + false => RR3_A::DISABLED_OR_REQUESTED, + true => RR3_A::ENABLED_AND_UNREQUESTED, + } + } + #[doc = "Checks if the value of the field is `DISABLED_OR_REQUESTED`"] + #[inline(always)] + pub fn is_disabled_or_requested(&self) -> bool { + *self == RR3_A::DISABLED_OR_REQUESTED + } + #[doc = "Checks if the value of the field is `ENABLED_AND_UNREQUESTED`"] + #[inline(always)] + pub fn is_enabled_and_unrequested(&self) -> bool { + *self == RR3_A::ENABLED_AND_UNREQUESTED + } +} +#[doc = "Field `RR4` reader - Request status for RR\\[4\\] +register"] +pub type RR4_R = crate::BitReader; +#[doc = "Request status for RR\\[4\\] +register\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum RR4_A { + #[doc = "0: RR\\[4\\] +register is not enabled, or are already requesting reload"] + DISABLED_OR_REQUESTED = 0, + #[doc = "1: RR\\[4\\] +register is enabled, and are not yet requesting reload"] + ENABLED_AND_UNREQUESTED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: RR4_A) -> Self { + variant as u8 != 0 + } +} +impl RR4_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> RR4_A { + match self.bits { + false => RR4_A::DISABLED_OR_REQUESTED, + true => RR4_A::ENABLED_AND_UNREQUESTED, + } + } + #[doc = "Checks if the value of the field is `DISABLED_OR_REQUESTED`"] + #[inline(always)] + pub fn is_disabled_or_requested(&self) -> bool { + *self == RR4_A::DISABLED_OR_REQUESTED + } + #[doc = "Checks if the value of the field is `ENABLED_AND_UNREQUESTED`"] + #[inline(always)] + pub fn is_enabled_and_unrequested(&self) -> bool { + *self == RR4_A::ENABLED_AND_UNREQUESTED + } +} +#[doc = "Field `RR5` reader - Request status for RR\\[5\\] +register"] +pub type RR5_R = crate::BitReader; +#[doc = "Request status for RR\\[5\\] +register\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum RR5_A { + #[doc = "0: RR\\[5\\] +register is not enabled, or are already requesting reload"] + DISABLED_OR_REQUESTED = 0, + #[doc = "1: RR\\[5\\] +register is enabled, and are not yet requesting reload"] + ENABLED_AND_UNREQUESTED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: RR5_A) -> Self { + variant as u8 != 0 + } +} +impl RR5_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> RR5_A { + match self.bits { + false => RR5_A::DISABLED_OR_REQUESTED, + true => RR5_A::ENABLED_AND_UNREQUESTED, + } + } + #[doc = "Checks if the value of the field is `DISABLED_OR_REQUESTED`"] + #[inline(always)] + pub fn is_disabled_or_requested(&self) -> bool { + *self == RR5_A::DISABLED_OR_REQUESTED + } + #[doc = "Checks if the value of the field is `ENABLED_AND_UNREQUESTED`"] + #[inline(always)] + pub fn is_enabled_and_unrequested(&self) -> bool { + *self == RR5_A::ENABLED_AND_UNREQUESTED + } +} +#[doc = "Field `RR6` reader - Request status for RR\\[6\\] +register"] +pub type RR6_R = crate::BitReader; +#[doc = "Request status for RR\\[6\\] +register\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum RR6_A { + #[doc = "0: RR\\[6\\] +register is not enabled, or are already requesting reload"] + DISABLED_OR_REQUESTED = 0, + #[doc = "1: RR\\[6\\] +register is enabled, and are not yet requesting reload"] + ENABLED_AND_UNREQUESTED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: RR6_A) -> Self { + variant as u8 != 0 + } +} +impl RR6_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> RR6_A { + match self.bits { + false => RR6_A::DISABLED_OR_REQUESTED, + true => RR6_A::ENABLED_AND_UNREQUESTED, + } + } + #[doc = "Checks if the value of the field is `DISABLED_OR_REQUESTED`"] + #[inline(always)] + pub fn is_disabled_or_requested(&self) -> bool { + *self == RR6_A::DISABLED_OR_REQUESTED + } + #[doc = "Checks if the value of the field is `ENABLED_AND_UNREQUESTED`"] + #[inline(always)] + pub fn is_enabled_and_unrequested(&self) -> bool { + *self == RR6_A::ENABLED_AND_UNREQUESTED + } +} +#[doc = "Field `RR7` reader - Request status for RR\\[7\\] +register"] +pub type RR7_R = crate::BitReader; +#[doc = "Request status for RR\\[7\\] +register\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum RR7_A { + #[doc = "0: RR\\[7\\] +register is not enabled, or are already requesting reload"] + DISABLED_OR_REQUESTED = 0, + #[doc = "1: RR\\[7\\] +register is enabled, and are not yet requesting reload"] + ENABLED_AND_UNREQUESTED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: RR7_A) -> Self { + variant as u8 != 0 + } +} +impl RR7_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> RR7_A { + match self.bits { + false => RR7_A::DISABLED_OR_REQUESTED, + true => RR7_A::ENABLED_AND_UNREQUESTED, + } + } + #[doc = "Checks if the value of the field is `DISABLED_OR_REQUESTED`"] + #[inline(always)] + pub fn is_disabled_or_requested(&self) -> bool { + *self == RR7_A::DISABLED_OR_REQUESTED + } + #[doc = "Checks if the value of the field is `ENABLED_AND_UNREQUESTED`"] + #[inline(always)] + pub fn is_enabled_and_unrequested(&self) -> bool { + *self == RR7_A::ENABLED_AND_UNREQUESTED + } +} +impl R { + #[doc = "Bit 0 - Request status for RR\\[0\\] +register"] + #[inline(always)] + pub fn rr0(&self) -> RR0_R { + RR0_R::new((self.bits & 1) != 0) + } + #[doc = "Bit 1 - Request status for RR\\[1\\] +register"] + #[inline(always)] + pub fn rr1(&self) -> RR1_R { + RR1_R::new(((self.bits >> 1) & 1) != 0) + } + #[doc = "Bit 2 - Request status for RR\\[2\\] +register"] + #[inline(always)] + pub fn rr2(&self) -> RR2_R { + RR2_R::new(((self.bits >> 2) & 1) != 0) + } + #[doc = "Bit 3 - Request status for RR\\[3\\] +register"] + #[inline(always)] + pub fn rr3(&self) -> RR3_R { + RR3_R::new(((self.bits >> 3) & 1) != 0) + } + #[doc = "Bit 4 - Request status for RR\\[4\\] +register"] + #[inline(always)] + pub fn rr4(&self) -> RR4_R { + RR4_R::new(((self.bits >> 4) & 1) != 0) + } + #[doc = "Bit 5 - Request status for RR\\[5\\] +register"] + #[inline(always)] + pub fn rr5(&self) -> RR5_R { + RR5_R::new(((self.bits >> 5) & 1) != 0) + } + #[doc = "Bit 6 - Request status for RR\\[6\\] +register"] + #[inline(always)] + pub fn rr6(&self) -> RR6_R { + RR6_R::new(((self.bits >> 6) & 1) != 0) + } + #[doc = "Bit 7 - Request status for RR\\[7\\] +register"] + #[inline(always)] + pub fn rr7(&self) -> RR7_R { + RR7_R::new(((self.bits >> 7) & 1) != 0) + } +} +#[doc = "Request 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 [reqstatus](index.html) module"] +pub struct REQSTATUS_SPEC; +impl crate::RegisterSpec for REQSTATUS_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [reqstatus::R](R) reader structure"] +impl crate::Readable for REQSTATUS_SPEC { + type Reader = R; +} +#[doc = "`reset()` method sets REQSTATUS to value 0x01"] +impl crate::Resettable for REQSTATUS_SPEC { + const RESET_VALUE: Self::Ux = 0x01; +} diff --git a/down-the-stack/dk_pac/src/wdt/rr.rs b/down-the-stack/dk_pac/src/wdt/rr.rs new file mode 100644 index 0000000..10722df --- /dev/null +++ b/down-the-stack/dk_pac/src/wdt/rr.rs @@ -0,0 +1,73 @@ +#[doc = "Register `RR[%s]` 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 = "Reload request register\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +#[repr(u32)] +pub enum RR_AW { + #[doc = "1850885685: Value to request a reload of the watchdog timer"] + RELOAD = 1850885685, +} +impl From for u32 { + #[inline(always)] + fn from(variant: RR_AW) -> Self { + variant as _ + } +} +#[doc = "Field `RR` writer - Reload request register"] +pub type RR_W<'a, const O: u8> = crate::FieldWriter<'a, u32, RR_SPEC, u32, RR_AW, 32, O>; +impl<'a, const O: u8> RR_W<'a, O> { + #[doc = "Value to request a reload of the watchdog timer"] + #[inline(always)] + pub fn reload(self) -> &'a mut W { + self.variant(RR_AW::RELOAD) + } +} +impl W { + #[doc = "Bits 0:31 - Reload request register"] + #[inline(always)] + #[must_use] + pub fn rr(&mut self) -> RR_W<0> { + RR_W::new(self) + } + #[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 = "Description collection: Reload request n\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 [rr](index.html) module"] +pub struct RR_SPEC; +impl crate::RegisterSpec for RR_SPEC { + type Ux = u32; +} +#[doc = "`write(|w| ..)` method takes [rr::W](W) writer structure"] +impl crate::Writable for RR_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets RR[%s] +to value 0"] +impl crate::Resettable for RR_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/wdt/rren.rs b/down-the-stack/dk_pac/src/wdt/rren.rs new file mode 100644 index 0000000..101a4e6 --- /dev/null +++ b/down-the-stack/dk_pac/src/wdt/rren.rs @@ -0,0 +1,625 @@ +#[doc = "Register `RREN` 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 `RREN` 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 `RR0` reader - Enable or disable RR\\[0\\] +register"] +pub type RR0_R = crate::BitReader; +#[doc = "Enable or disable RR\\[0\\] +register\n\nValue on reset: 1"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum RR0_A { + #[doc = "0: Disable RR\\[0\\] +register"] + DISABLED = 0, + #[doc = "1: Enable RR\\[0\\] +register"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: RR0_A) -> Self { + variant as u8 != 0 + } +} +impl RR0_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> RR0_A { + match self.bits { + false => RR0_A::DISABLED, + true => RR0_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == RR0_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == RR0_A::ENABLED + } +} +#[doc = "Field `RR0` writer - Enable or disable RR\\[0\\] +register"] +pub type RR0_W<'a, const O: u8> = crate::BitWriter<'a, u32, RREN_SPEC, RR0_A, O>; +impl<'a, const O: u8> RR0_W<'a, O> { + #[doc = "Disable RR\\[0\\] +register"] + #[inline(always)] + pub fn disabled(self) -> &'a mut W { + self.variant(RR0_A::DISABLED) + } + #[doc = "Enable RR\\[0\\] +register"] + #[inline(always)] + pub fn enabled(self) -> &'a mut W { + self.variant(RR0_A::ENABLED) + } +} +#[doc = "Field `RR1` reader - Enable or disable RR\\[1\\] +register"] +pub type RR1_R = crate::BitReader; +#[doc = "Enable or disable RR\\[1\\] +register\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum RR1_A { + #[doc = "0: Disable RR\\[1\\] +register"] + DISABLED = 0, + #[doc = "1: Enable RR\\[1\\] +register"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: RR1_A) -> Self { + variant as u8 != 0 + } +} +impl RR1_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> RR1_A { + match self.bits { + false => RR1_A::DISABLED, + true => RR1_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == RR1_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == RR1_A::ENABLED + } +} +#[doc = "Field `RR1` writer - Enable or disable RR\\[1\\] +register"] +pub type RR1_W<'a, const O: u8> = crate::BitWriter<'a, u32, RREN_SPEC, RR1_A, O>; +impl<'a, const O: u8> RR1_W<'a, O> { + #[doc = "Disable RR\\[1\\] +register"] + #[inline(always)] + pub fn disabled(self) -> &'a mut W { + self.variant(RR1_A::DISABLED) + } + #[doc = "Enable RR\\[1\\] +register"] + #[inline(always)] + pub fn enabled(self) -> &'a mut W { + self.variant(RR1_A::ENABLED) + } +} +#[doc = "Field `RR2` reader - Enable or disable RR\\[2\\] +register"] +pub type RR2_R = crate::BitReader; +#[doc = "Enable or disable RR\\[2\\] +register\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum RR2_A { + #[doc = "0: Disable RR\\[2\\] +register"] + DISABLED = 0, + #[doc = "1: Enable RR\\[2\\] +register"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: RR2_A) -> Self { + variant as u8 != 0 + } +} +impl RR2_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> RR2_A { + match self.bits { + false => RR2_A::DISABLED, + true => RR2_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == RR2_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == RR2_A::ENABLED + } +} +#[doc = "Field `RR2` writer - Enable or disable RR\\[2\\] +register"] +pub type RR2_W<'a, const O: u8> = crate::BitWriter<'a, u32, RREN_SPEC, RR2_A, O>; +impl<'a, const O: u8> RR2_W<'a, O> { + #[doc = "Disable RR\\[2\\] +register"] + #[inline(always)] + pub fn disabled(self) -> &'a mut W { + self.variant(RR2_A::DISABLED) + } + #[doc = "Enable RR\\[2\\] +register"] + #[inline(always)] + pub fn enabled(self) -> &'a mut W { + self.variant(RR2_A::ENABLED) + } +} +#[doc = "Field `RR3` reader - Enable or disable RR\\[3\\] +register"] +pub type RR3_R = crate::BitReader; +#[doc = "Enable or disable RR\\[3\\] +register\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum RR3_A { + #[doc = "0: Disable RR\\[3\\] +register"] + DISABLED = 0, + #[doc = "1: Enable RR\\[3\\] +register"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: RR3_A) -> Self { + variant as u8 != 0 + } +} +impl RR3_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> RR3_A { + match self.bits { + false => RR3_A::DISABLED, + true => RR3_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == RR3_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == RR3_A::ENABLED + } +} +#[doc = "Field `RR3` writer - Enable or disable RR\\[3\\] +register"] +pub type RR3_W<'a, const O: u8> = crate::BitWriter<'a, u32, RREN_SPEC, RR3_A, O>; +impl<'a, const O: u8> RR3_W<'a, O> { + #[doc = "Disable RR\\[3\\] +register"] + #[inline(always)] + pub fn disabled(self) -> &'a mut W { + self.variant(RR3_A::DISABLED) + } + #[doc = "Enable RR\\[3\\] +register"] + #[inline(always)] + pub fn enabled(self) -> &'a mut W { + self.variant(RR3_A::ENABLED) + } +} +#[doc = "Field `RR4` reader - Enable or disable RR\\[4\\] +register"] +pub type RR4_R = crate::BitReader; +#[doc = "Enable or disable RR\\[4\\] +register\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum RR4_A { + #[doc = "0: Disable RR\\[4\\] +register"] + DISABLED = 0, + #[doc = "1: Enable RR\\[4\\] +register"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: RR4_A) -> Self { + variant as u8 != 0 + } +} +impl RR4_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> RR4_A { + match self.bits { + false => RR4_A::DISABLED, + true => RR4_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == RR4_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == RR4_A::ENABLED + } +} +#[doc = "Field `RR4` writer - Enable or disable RR\\[4\\] +register"] +pub type RR4_W<'a, const O: u8> = crate::BitWriter<'a, u32, RREN_SPEC, RR4_A, O>; +impl<'a, const O: u8> RR4_W<'a, O> { + #[doc = "Disable RR\\[4\\] +register"] + #[inline(always)] + pub fn disabled(self) -> &'a mut W { + self.variant(RR4_A::DISABLED) + } + #[doc = "Enable RR\\[4\\] +register"] + #[inline(always)] + pub fn enabled(self) -> &'a mut W { + self.variant(RR4_A::ENABLED) + } +} +#[doc = "Field `RR5` reader - Enable or disable RR\\[5\\] +register"] +pub type RR5_R = crate::BitReader; +#[doc = "Enable or disable RR\\[5\\] +register\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum RR5_A { + #[doc = "0: Disable RR\\[5\\] +register"] + DISABLED = 0, + #[doc = "1: Enable RR\\[5\\] +register"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: RR5_A) -> Self { + variant as u8 != 0 + } +} +impl RR5_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> RR5_A { + match self.bits { + false => RR5_A::DISABLED, + true => RR5_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == RR5_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == RR5_A::ENABLED + } +} +#[doc = "Field `RR5` writer - Enable or disable RR\\[5\\] +register"] +pub type RR5_W<'a, const O: u8> = crate::BitWriter<'a, u32, RREN_SPEC, RR5_A, O>; +impl<'a, const O: u8> RR5_W<'a, O> { + #[doc = "Disable RR\\[5\\] +register"] + #[inline(always)] + pub fn disabled(self) -> &'a mut W { + self.variant(RR5_A::DISABLED) + } + #[doc = "Enable RR\\[5\\] +register"] + #[inline(always)] + pub fn enabled(self) -> &'a mut W { + self.variant(RR5_A::ENABLED) + } +} +#[doc = "Field `RR6` reader - Enable or disable RR\\[6\\] +register"] +pub type RR6_R = crate::BitReader; +#[doc = "Enable or disable RR\\[6\\] +register\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum RR6_A { + #[doc = "0: Disable RR\\[6\\] +register"] + DISABLED = 0, + #[doc = "1: Enable RR\\[6\\] +register"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: RR6_A) -> Self { + variant as u8 != 0 + } +} +impl RR6_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> RR6_A { + match self.bits { + false => RR6_A::DISABLED, + true => RR6_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == RR6_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == RR6_A::ENABLED + } +} +#[doc = "Field `RR6` writer - Enable or disable RR\\[6\\] +register"] +pub type RR6_W<'a, const O: u8> = crate::BitWriter<'a, u32, RREN_SPEC, RR6_A, O>; +impl<'a, const O: u8> RR6_W<'a, O> { + #[doc = "Disable RR\\[6\\] +register"] + #[inline(always)] + pub fn disabled(self) -> &'a mut W { + self.variant(RR6_A::DISABLED) + } + #[doc = "Enable RR\\[6\\] +register"] + #[inline(always)] + pub fn enabled(self) -> &'a mut W { + self.variant(RR6_A::ENABLED) + } +} +#[doc = "Field `RR7` reader - Enable or disable RR\\[7\\] +register"] +pub type RR7_R = crate::BitReader; +#[doc = "Enable or disable RR\\[7\\] +register\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum RR7_A { + #[doc = "0: Disable RR\\[7\\] +register"] + DISABLED = 0, + #[doc = "1: Enable RR\\[7\\] +register"] + ENABLED = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: RR7_A) -> Self { + variant as u8 != 0 + } +} +impl RR7_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> RR7_A { + match self.bits { + false => RR7_A::DISABLED, + true => RR7_A::ENABLED, + } + } + #[doc = "Checks if the value of the field is `DISABLED`"] + #[inline(always)] + pub fn is_disabled(&self) -> bool { + *self == RR7_A::DISABLED + } + #[doc = "Checks if the value of the field is `ENABLED`"] + #[inline(always)] + pub fn is_enabled(&self) -> bool { + *self == RR7_A::ENABLED + } +} +#[doc = "Field `RR7` writer - Enable or disable RR\\[7\\] +register"] +pub type RR7_W<'a, const O: u8> = crate::BitWriter<'a, u32, RREN_SPEC, RR7_A, O>; +impl<'a, const O: u8> RR7_W<'a, O> { + #[doc = "Disable RR\\[7\\] +register"] + #[inline(always)] + pub fn disabled(self) -> &'a mut W { + self.variant(RR7_A::DISABLED) + } + #[doc = "Enable RR\\[7\\] +register"] + #[inline(always)] + pub fn enabled(self) -> &'a mut W { + self.variant(RR7_A::ENABLED) + } +} +impl R { + #[doc = "Bit 0 - Enable or disable RR\\[0\\] +register"] + #[inline(always)] + pub fn rr0(&self) -> RR0_R { + RR0_R::new((self.bits & 1) != 0) + } + #[doc = "Bit 1 - Enable or disable RR\\[1\\] +register"] + #[inline(always)] + pub fn rr1(&self) -> RR1_R { + RR1_R::new(((self.bits >> 1) & 1) != 0) + } + #[doc = "Bit 2 - Enable or disable RR\\[2\\] +register"] + #[inline(always)] + pub fn rr2(&self) -> RR2_R { + RR2_R::new(((self.bits >> 2) & 1) != 0) + } + #[doc = "Bit 3 - Enable or disable RR\\[3\\] +register"] + #[inline(always)] + pub fn rr3(&self) -> RR3_R { + RR3_R::new(((self.bits >> 3) & 1) != 0) + } + #[doc = "Bit 4 - Enable or disable RR\\[4\\] +register"] + #[inline(always)] + pub fn rr4(&self) -> RR4_R { + RR4_R::new(((self.bits >> 4) & 1) != 0) + } + #[doc = "Bit 5 - Enable or disable RR\\[5\\] +register"] + #[inline(always)] + pub fn rr5(&self) -> RR5_R { + RR5_R::new(((self.bits >> 5) & 1) != 0) + } + #[doc = "Bit 6 - Enable or disable RR\\[6\\] +register"] + #[inline(always)] + pub fn rr6(&self) -> RR6_R { + RR6_R::new(((self.bits >> 6) & 1) != 0) + } + #[doc = "Bit 7 - Enable or disable RR\\[7\\] +register"] + #[inline(always)] + pub fn rr7(&self) -> RR7_R { + RR7_R::new(((self.bits >> 7) & 1) != 0) + } +} +impl W { + #[doc = "Bit 0 - Enable or disable RR\\[0\\] +register"] + #[inline(always)] + #[must_use] + pub fn rr0(&mut self) -> RR0_W<0> { + RR0_W::new(self) + } + #[doc = "Bit 1 - Enable or disable RR\\[1\\] +register"] + #[inline(always)] + #[must_use] + pub fn rr1(&mut self) -> RR1_W<1> { + RR1_W::new(self) + } + #[doc = "Bit 2 - Enable or disable RR\\[2\\] +register"] + #[inline(always)] + #[must_use] + pub fn rr2(&mut self) -> RR2_W<2> { + RR2_W::new(self) + } + #[doc = "Bit 3 - Enable or disable RR\\[3\\] +register"] + #[inline(always)] + #[must_use] + pub fn rr3(&mut self) -> RR3_W<3> { + RR3_W::new(self) + } + #[doc = "Bit 4 - Enable or disable RR\\[4\\] +register"] + #[inline(always)] + #[must_use] + pub fn rr4(&mut self) -> RR4_W<4> { + RR4_W::new(self) + } + #[doc = "Bit 5 - Enable or disable RR\\[5\\] +register"] + #[inline(always)] + #[must_use] + pub fn rr5(&mut self) -> RR5_W<5> { + RR5_W::new(self) + } + #[doc = "Bit 6 - Enable or disable RR\\[6\\] +register"] + #[inline(always)] + #[must_use] + pub fn rr6(&mut self) -> RR6_W<6> { + RR6_W::new(self) + } + #[doc = "Bit 7 - Enable or disable RR\\[7\\] +register"] + #[inline(always)] + #[must_use] + pub fn rr7(&mut self) -> RR7_W<7> { + RR7_W::new(self) + } + #[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 = "Enable register for reload request registers\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 [rren](index.html) module"] +pub struct RREN_SPEC; +impl crate::RegisterSpec for RREN_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [rren::R](R) reader structure"] +impl crate::Readable for RREN_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [rren::W](W) writer structure"] +impl crate::Writable for RREN_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} +#[doc = "`reset()` method sets RREN to value 0x01"] +impl crate::Resettable for RREN_SPEC { + const RESET_VALUE: Self::Ux = 0x01; +} diff --git a/down-the-stack/dk_pac/src/wdt/runstatus.rs b/down-the-stack/dk_pac/src/wdt/runstatus.rs new file mode 100644 index 0000000..9340f16 --- /dev/null +++ b/down-the-stack/dk_pac/src/wdt/runstatus.rs @@ -0,0 +1,71 @@ +#[doc = "Register `RUNSTATUS` 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 = "Field `RUNSTATUS` reader - Indicates whether or not the watchdog is running"] +pub type RUNSTATUS_R = crate::BitReader; +#[doc = "Indicates whether or not the watchdog is running\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum RUNSTATUS_A { + #[doc = "0: Watchdog not running"] + NOT_RUNNING = 0, + #[doc = "1: Watchdog is running"] + RUNNING = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: RUNSTATUS_A) -> Self { + variant as u8 != 0 + } +} +impl RUNSTATUS_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> RUNSTATUS_A { + match self.bits { + false => RUNSTATUS_A::NOT_RUNNING, + true => RUNSTATUS_A::RUNNING, + } + } + #[doc = "Checks if the value of the field is `NOT_RUNNING`"] + #[inline(always)] + pub fn is_not_running(&self) -> bool { + *self == RUNSTATUS_A::NOT_RUNNING + } + #[doc = "Checks if the value of the field is `RUNNING`"] + #[inline(always)] + pub fn is_running(&self) -> bool { + *self == RUNSTATUS_A::RUNNING + } +} +impl R { + #[doc = "Bit 0 - Indicates whether or not the watchdog is running"] + #[inline(always)] + pub fn runstatus(&self) -> RUNSTATUS_R { + RUNSTATUS_R::new((self.bits & 1) != 0) + } +} +#[doc = "Run 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 [runstatus](index.html) module"] +pub struct RUNSTATUS_SPEC; +impl crate::RegisterSpec for RUNSTATUS_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [runstatus::R](R) reader structure"] +impl crate::Readable for RUNSTATUS_SPEC { + type Reader = R; +} +#[doc = "`reset()` method sets RUNSTATUS to value 0"] +impl crate::Resettable for RUNSTATUS_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/down-the-stack/dk_pac/src/wdt/tasks_start.rs b/down-the-stack/dk_pac/src/wdt/tasks_start.rs new file mode 100644 index 0000000..e2ee469 --- /dev/null +++ b/down-the-stack/dk_pac/src/wdt/tasks_start.rs @@ -0,0 +1,72 @@ +#[doc = "Register `TASKS_START` 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 = "Start the watchdog\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum TASKS_START_AW { + #[doc = "1: Trigger task"] + TRIGGER = 1, +} +impl From for bool { + #[inline(always)] + fn from(variant: TASKS_START_AW) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `TASKS_START` writer - Start the watchdog"] +pub type TASKS_START_W<'a, const O: u8> = + crate::BitWriter<'a, u32, TASKS_START_SPEC, TASKS_START_AW, O>; +impl<'a, const O: u8> TASKS_START_W<'a, O> { + #[doc = "Trigger task"] + #[inline(always)] + pub fn trigger(self) -> &'a mut W { + self.variant(TASKS_START_AW::TRIGGER) + } +} +impl W { + #[doc = "Bit 0 - Start the watchdog"] + #[inline(always)] + #[must_use] + pub fn tasks_start(&mut self) -> TASKS_START_W<0> { + TASKS_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 + } +} +#[doc = "Start the watchdog\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 [tasks_start](index.html) module"] +pub struct TASKS_START_SPEC; +impl crate::RegisterSpec for TASKS_START_SPEC { + type Ux = u32; +} +#[doc = "`write(|w| ..)` method takes [tasks_start::W](W) writer structure"] +impl crate::Writable for TASKS_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 TASKS_START to value 0"] +impl crate::Resettable for TASKS_START_SPEC { + const RESET_VALUE: Self::Ux = 0; +} diff --git a/embedded-workshop-book/src/pac_exercise.md b/embedded-workshop-book/src/pac_exercise.md new file mode 100644 index 0000000..592d002 --- /dev/null +++ b/embedded-workshop-book/src/pac_exercise.md @@ -0,0 +1,20 @@ +# PAC Exercise + +In this exercise you will generate a PAC (Peripheral Access Crate) from an svd file. + +Install `svd2rust` via cargo +Download https://github.com/NordicSemiconductor/nrfx/blob/master/mdk/nrf52.svd (or some tagged version) + +Run svd2rust with the SVD file to generate a PAC using the `cortex-m` flag +Notice how it's one long line of text in the source file. (mine is clean?!) +Look at the PAC docs with cargo doc --open. (this needs a cargo.toml, make one yourself??, what do we want folks to see?) +cargo fmt the crate. No change to the docs, but a bit more readable. +cargo install form, use form to process the one-big-file into one-file-per-module. +form -i src/lib.rs -o src/ Re-run cargo fmt. +Find the definition of the ENABLE register for UARTE0, in the PDF datasheet and in the SVD file, and in the svd2rust generated code. +Write a simple program which uses the PAC to enable the UART. See how writing arbitrary values to the ENABLE field in the ENABLE register is unsafe, because only values 0 or 8 should be used. + +base address Uarte0 0x40002000 +enable UARTE 0x500 + +add pac to cargo.toml \ No newline at end of file From 8518686e9a440e9912c74602a75556c266138018 Mon Sep 17 00:00:00 2001 From: Mirabellensaft Date: Fri, 10 Mar 2023 15:44:41 +0100 Subject: [PATCH 05/42] unsafe and safe enable/disable --- down-the-stack/apps/src/bin/uarte_enable.rs | 39 +++++++++++++-------- 1 file changed, 25 insertions(+), 14 deletions(-) diff --git a/down-the-stack/apps/src/bin/uarte_enable.rs b/down-the-stack/apps/src/bin/uarte_enable.rs index 434f114..2f46d79 100644 --- a/down-the-stack/apps/src/bin/uarte_enable.rs +++ b/down-the-stack/apps/src/bin/uarte_enable.rs @@ -3,36 +3,47 @@ use cortex_m::asm; use cortex_m_rt::entry; -use dk_pac; +use dk_pac::UARTE0; // this imports `down-the-stack/apps/lib.rs` to retrieve our global logger + panicking-behavior use apps as _; use defmt; use defmt_rtt as _; // global logger - #[entry] fn main() -> ! { // to enable more verbose logs, go to your `Cargo.toml` and set defmt logging levels // to `defmt-trace` by changing the `default = []` entry in `[features]` - unsafe { - let periph = dk_pac::Peripherals::steal(); + + // takes ownership of the nRF52840-DK peripherals + let periph = dk_pac::Peripherals::take().unwrap(); let uarte = periph.UARTE0; - + + uarte_enabled(&uarte); + + // enable the UART0 peripheral the safe way uarte.enable.write(|w| w.enable().enabled()); - - if uarte.enable.read().bits() != 0 { - defmt::println!("Uarte0 is enabled"); - } else { - defmt::println!("Uarte0 is disabled"); + uarte_enabled(&uarte); + + // disable the UART0 peripheral by writing 0 directly into the register -- the unsafe way + unsafe { + uarte.enable.write(|w| w.bits(0x00 as u32)); } - } - - + uarte_enabled(&uarte); + // this program does not `exit`; use Ctrl+C to terminate it loop { asm::nop(); } -} \ No newline at end of file +} + +// Reads the bits in the UART0 register and prints `enabled` or `disabled` +fn uarte_enabled(uarte: &UARTE0) { + if uarte.enable.read().bits() != 0 { + defmt::println!("Uarte0 is enabled"); + } else { + defmt::println!("Uarte0 is disabled"); + } +} From eda4261eeeaace7ba5b875d7f258289b6b8bc64b Mon Sep 17 00:00:00 2001 From: Mirabellensaft Date: Fri, 10 Mar 2023 15:44:54 +0100 Subject: [PATCH 06/42] set flag --- down-the-stack/apps/Cargo.toml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/down-the-stack/apps/Cargo.toml b/down-the-stack/apps/Cargo.toml index cbb3cc1..d5414a9 100644 --- a/down-the-stack/apps/Cargo.toml +++ b/down-the-stack/apps/Cargo.toml @@ -9,7 +9,7 @@ version = "0.0.0" cortex-m = {version = "0.7.6", features = ["critical-section-single-core"]} cortex-m-rt = "0.7.2" dk_bsc = { path = "../dk_bsc" } -dk_pac = { path = "../dk_pac" } +dk_pac = { path = "../dk_pac", features = ["critical-section"]} heapless = "0.7.16" panic-probe = { version = "0.3.0", features = ["print-defmt"] } defmt = "0.3.2" @@ -36,6 +36,7 @@ overflow-checks = false [features] + default = [ "other-feature" ] From 53a7c72c19df402f659c257bad68eca507a039da Mon Sep 17 00:00:00 2001 From: Mirabellensaft Date: Fri, 10 Mar 2023 16:40:44 +0100 Subject: [PATCH 07/42] draft of exercise text --- embedded-workshop-book/src/pac_exercise.md | 102 ++++++++++++++++++--- 1 file changed, 91 insertions(+), 11 deletions(-) diff --git a/embedded-workshop-book/src/pac_exercise.md b/embedded-workshop-book/src/pac_exercise.md index 592d002..78fb56c 100644 --- a/embedded-workshop-book/src/pac_exercise.md +++ b/embedded-workshop-book/src/pac_exercise.md @@ -1,20 +1,100 @@ # PAC Exercise -In this exercise you will generate a PAC (Peripheral Access Crate) from an svd file. +In this exercise you will generate a PAC (Peripheral Access Crate) from an svd file, and write a small program that enables the UARTE0 register. + +## In this exercise you will learn how to +* Generate a Peripheral Access Crate from an svd file +* Two ways to write into a register to enable and disable it + +## Prerequisites +[todo!] + +## Tasks + + +## Generating the PAC + +✅ Install `svd2rust` using the following command: +``` +cargo install svd2rust +``` + +✅ Download https://github.com/NordicSemiconductor/nrfx/blob/master/mdk/nrf52.svd (This version has an error: writeonce needs to be changed to writeOnce) +Place the file into `down-the-stack/dk-pac`. Note how we provide a `Cargo.toml` file, as it will not be generated by svd2rust. + +✅ In the terminal, go to the file's location. Run svd2rust with the SVD file to generate a PAC using the `cortex-m` flag. + +``` +svd2rust --target cortex-m -i nrf52.svd +``` +If you check the folder `down-the-stack/dk-pac` now, you see three new files: +* lib.rs - the file that contains the generated code for the pac +* device.x - linker sections(?) +* build.rs - linker script + +✅ Open the generated `lib.rs` with an editor. +Notice how it's one long line of text in the source file. + +✅ Look at the PAC docs with cargo doc --open. + +✅ cargo fmt the crate. No change to the docs, but a bit more readable. + +✅ Install form with the following command: + +``` +cargo install form +``` + +``` +✅ use form to process the one-big-file into one-file-per-module with the following command: +``` +form -i src/lib.rs -o src/ +``` + +✅ Re-run `cargo fmt`. + + +## Enabling the UARTE0 peripheral + -Install `svd2rust` via cargo -Download https://github.com/NordicSemiconductor/nrfx/blob/master/mdk/nrf52.svd (or some tagged version) -Run svd2rust with the SVD file to generate a PAC using the `cortex-m` flag -Notice how it's one long line of text in the source file. (mine is clean?!) -Look at the PAC docs with cargo doc --open. (this needs a cargo.toml, make one yourself??, what do we want folks to see?) -cargo fmt the crate. No change to the docs, but a bit more readable. -cargo install form, use form to process the one-big-file into one-file-per-module. -form -i src/lib.rs -o src/ Re-run cargo fmt. -Find the definition of the ENABLE register for UARTE0, in the PDF datasheet and in the SVD file, and in the svd2rust generated code. Write a simple program which uses the PAC to enable the UART. See how writing arbitrary values to the ENABLE field in the ENABLE register is unsafe, because only values 0 or 8 should be used. +✅ Finding your way through the PAC + +find the "board" struct in docs und take() + +take() assures, that only one instance of this can exist. hence, it's safe. + +Find the definition of the ENABLE register for UARTE0, in the PDF datasheet and in the SVD file, and in the svd2rust generated code. + +✅ uarte0.rs/enable + +read().bits +write(closure) + + + +✅ Import the PAC + +cargo.toml + +``` +dk_pac = { path = "../dk_pac", features = ["critical-section"]} +``` +uarte_enable.rs + +```rust +use dk_pac::UARTE0; +``` + +✅ Take ownership of the peripherals with `take()` and bind the UARTE0 peripheral to it's own variable + +✅ Write a helper function that prints the status of the uarte peripheral. Check if the enable is not 0 + + base address Uarte0 0x40002000 enable UARTE 0x500 +✅ Enable the peripheral +✅ Disable the peropheral with an unsafe write -add pac to cargo.toml \ No newline at end of file From bb86aedeafdd7e3b9c66146e926f0b03b60edeb9 Mon Sep 17 00:00:00 2001 From: Mirabellensaft Date: Mon, 13 Mar 2023 17:26:47 +0100 Subject: [PATCH 08/42] add explanations --- embedded-workshop-book/src/pac_exercise.md | 84 +++++++++++++++++----- 1 file changed, 67 insertions(+), 17 deletions(-) diff --git a/embedded-workshop-book/src/pac_exercise.md b/embedded-workshop-book/src/pac_exercise.md index 78fb56c..bd885ed 100644 --- a/embedded-workshop-book/src/pac_exercise.md +++ b/embedded-workshop-book/src/pac_exercise.md @@ -7,7 +7,8 @@ In this exercise you will generate a PAC (Peripheral Access Crate) from an svd f * Two ways to write into a register to enable and disable it ## Prerequisites -[todo!] +* basic use of closures +* read/write/modify api ## Tasks @@ -22,7 +23,7 @@ cargo install svd2rust ✅ Download https://github.com/NordicSemiconductor/nrfx/blob/master/mdk/nrf52.svd (This version has an error: writeonce needs to be changed to writeOnce) Place the file into `down-the-stack/dk-pac`. Note how we provide a `Cargo.toml` file, as it will not be generated by svd2rust. -✅ In the terminal, go to the file's location. Run svd2rust with the SVD file to generate a PAC using the `cortex-m` flag. +✅ In the terminal, go to the file's location. Run `svd2rust` with the SVD file to generate a PAC using the `cortex-m` flag. ``` svd2rust --target cortex-m -i nrf52.svd @@ -60,41 +61,90 @@ form -i src/lib.rs -o src/ Write a simple program which uses the PAC to enable the UART. See how writing arbitrary values to the ENABLE field in the ENABLE register is unsafe, because only values 0 or 8 should be used. +✅ Finding your way through the docs: +(This better be a lecture) + +* In the `Structs` section look for the `struct Peripherals`. Taking ownerhip of it will be the first step later on. Note that only the method `steal()` is documented. It is an unsafe method, and to be avoided. `Peripherals` has a field named `UARTE0` +* In the `modules` section, look for the `uarte0` module. It is divided into submodules. `enable` is important for us. Clicking on it shows the associated type definitions. + + +* `W` - the register ENABLE writer with the following methods: + * `enable()` returns the field ENABLE writer `ENABLE_W`. + * `unsafe bits()` writes raw bits into the register. +* `R` - the register ENABLE reader writer with the following methods: + * `enable()` returns the field ENABLE reader `ENABLE_R`. + * `bits()` reads raw bits from the register. +The types `ENABLE_R` and `ENABLE_W` have useful methods themselves, check them out. + +Usage: if you want to write or read something from the uarte register and you want to avoid dealing with raw bits, you first have to call a method that gives you access to the respective reader or writer, and then call the method that does what you want. + +Example: + +uarte.enable.read(). + +Note the difference between the struct field `UARTE0` in `Peripherals` and the module `uarte0`. + ✅ Finding your way through the PAC -find the "board" struct in docs und take() +* `dk_pac/src/lib.rs` defines the single peripherals with their register block addresses and contains a struct defintion for the `struct Peripherals`. There are two methods for this struct: `take()` and `steal()`. `take()` assures, that only one instance of this can exist. Hence, it's safe. Note that `take()` is only available with the `critical-section` feature enabled. -take() assures, that only one instance of this can exist. hence, it's safe. +* `dk_pac/src/uarte0.rs` defines a struct that contains all the registers of the `UARTE0` register block. The `enable` field represents the register of the same name. -Find the definition of the ENABLE register for UARTE0, in the PDF datasheet and in the SVD file, and in the svd2rust generated code. +* `dk_pac/src/uarte0/enable.rs` defines the types associated with this register that you already saw in the docs. -✅ uarte0.rs/enable - -read().bits -write(closure) +* Find the definition of the ENABLE register for UARTE0, in the PDF datasheet and in the SVD file +* ✅ Import the PAC -cargo.toml +down-the-stack/apps/Cargo.toml ``` dk_pac = { path = "../dk_pac", features = ["critical-section"]} ``` -uarte_enable.rs +apps/bin/uarte_enable.rs ```rust use dk_pac::UARTE0; ``` -✅ Take ownership of the peripherals with `take()` and bind the UARTE0 peripheral to it's own variable +✅ Take ownership of the peripherals with `take()` and bind the `UARTE0` peripheral to it's own variable -✅ Write a helper function that prints the status of the uarte peripheral. Check if the enable is not 0 +```rust +let periph = dk_pac::Peripherals::take().unwrap(); +let uarte = periph.UARTE0; +``` +✅ Write a helper function that reads the bits of the enable register. It prints "Uarte0 is enabled", when the value is not 0. If it is 0, it prints "Uarte0 is disabled". Add a function call to `fn main()` -base address Uarte0 0x40002000 -enable UARTE 0x500 -✅ Enable the peripheral -✅ Disable the peropheral with an unsafe write +Run the code. The terminal output should read: "Uarte0 is disabled". +```rust +fn is_uarte_enabled(uarte: &UARTE0) { + if uarte.enable.read().enable().is_enabled() { + defmt::println!("Uarte0 is enabled"); + } else { + defmt::println!("Uarte0 is disabled"); + } +} +``` + +✅ Enable the peripheral safely by passing `w.enable().enabled()` in the closure. Call the helper function after this new line and run your code. + +It should print: +"Uarte0 is disabled" +"Uarte0 is ensabled" + +``` +uarte.enable.write(|w| w.enable().enabled()); +``` + +✅ Disable the peripheral with unsafely by writing raw bits into the register. + +```rust +unsafe { + uarte.enable.write(|w| w.bits(0x00 as u32)); + } +``` From 1424c7d45dcf6d68af866d5a742adf0d3a2e3140 Mon Sep 17 00:00:00 2001 From: Mirabellensaft Date: Mon, 13 Mar 2023 17:27:50 +0100 Subject: [PATCH 09/42] adding text to md book --- embedded-workshop-book/src/SUMMARY.md | 1 + embedded-workshop-book/src/{pac_exercise.md => pac-exercise.md} | 0 2 files changed, 1 insertion(+) rename embedded-workshop-book/src/{pac_exercise.md => pac-exercise.md} (100%) diff --git a/embedded-workshop-book/src/SUMMARY.md b/embedded-workshop-book/src/SUMMARY.md index 99701c3..d5d8dce 100644 --- a/embedded-workshop-book/src/SUMMARY.md +++ b/embedded-workshop-book/src/SUMMARY.md @@ -28,6 +28,7 @@ - [BSC Exercise](./bsc-exercise.md) - [Button Implementation](./button-implementation.md) - [UARTE Implementation](./uarte-implementation.md) + - [PAC Exercise](./pac-exercise.md) - [Advanced Workbook](./advanced-workbook.md) - [Code Organization](./code-organisation.md) - [Listing USB Devices](./listing-usb-devices.md) diff --git a/embedded-workshop-book/src/pac_exercise.md b/embedded-workshop-book/src/pac-exercise.md similarity index 100% rename from embedded-workshop-book/src/pac_exercise.md rename to embedded-workshop-book/src/pac-exercise.md From ed973e7497408e1a6dc0c9e8786f3a3cd57c5a3e Mon Sep 17 00:00:00 2001 From: Mirabellensaft Date: Mon, 13 Mar 2023 18:28:18 +0100 Subject: [PATCH 10/42] split exercise into several pages --- embedded-workshop-book/src/SUMMARY.md | 5 +- embedded-workshop-book/src/enabling-uarte.md | 89 +++++++++++ embedded-workshop-book/src/generating-pac.md | 67 +++++++++ embedded-workshop-book/src/pac-docs.md | 41 +++++ embedded-workshop-book/src/pac-exercise.md | 149 +------------------ 5 files changed, 203 insertions(+), 148 deletions(-) create mode 100644 embedded-workshop-book/src/enabling-uarte.md create mode 100644 embedded-workshop-book/src/generating-pac.md create mode 100644 embedded-workshop-book/src/pac-docs.md diff --git a/embedded-workshop-book/src/SUMMARY.md b/embedded-workshop-book/src/SUMMARY.md index d5d8dce..6f34aa0 100644 --- a/embedded-workshop-book/src/SUMMARY.md +++ b/embedded-workshop-book/src/SUMMARY.md @@ -28,7 +28,10 @@ - [BSC Exercise](./bsc-exercise.md) - [Button Implementation](./button-implementation.md) - [UARTE Implementation](./uarte-implementation.md) - - [PAC Exercise](./pac-exercise.md) + - [Generating and Using a PAC](./pac-exercise.md) + - [Exercise: Generating a PAC ](./generating-pac.md) + - [Reading PAC Documentation ](./pac-docs.md) + - [Exercise: Enabling the UARTE0 Peripheral ](./enabling-uarte.md) - [Advanced Workbook](./advanced-workbook.md) - [Code Organization](./code-organisation.md) - [Listing USB Devices](./listing-usb-devices.md) diff --git a/embedded-workshop-book/src/enabling-uarte.md b/embedded-workshop-book/src/enabling-uarte.md new file mode 100644 index 0000000..9e16a0a --- /dev/null +++ b/embedded-workshop-book/src/enabling-uarte.md @@ -0,0 +1,89 @@ +# Enabling the UARTE0 peripheral + +Write a simple program which uses the PAC to enable the UART. See how writing arbitrary values to the ENABLE field in the ENABLE register is unsafe, because only values 0 or 8 should be used. + +## In this exercise you will learn how to: +* to safely write into a register +* how to unsafely write into a register +* how to read a register + +## Prerequisites +* basic use of closures +* usage of the svd2rust's read/write/modify API + +## Tasks +* Find out which values can be written into the `enable` register. +* Take ownership of the boards peripherals +* Write a helper function that reads the UARTE0's `enable` register and print's status. +* Enable the UARTE0 peripheral using a safe method. +* Disable the UARTE0 peripheral by writing raw bits in it (unsafe). + +Final terminal output: + +```terminal +Uarte0 is disabled. +Uarte0 is ensabled. +Uarte0 is disabled. +``` + +## Step-by-Step Solution + +✅ Find the values that can be written in the `enable` register: + +0: disabled +8: enabled + +✅ Import the PAC + +In `down-the-stack/apps/Cargo.toml`: + +``` +dk_pac = { path = "../dk_pac", features = ["critical-section"]} +``` +In `apps/bin/uarte_enable.rs`: + +```rust +use dk_pac::UARTE0; +``` + +✅ Take ownership of the peripherals with `take()` and bind the `UARTE0` peripheral to it's own variable + +```rust +let periph = dk_pac::Peripherals::take().unwrap(); +let uarte = periph.UARTE0; +``` + +✅ Write a helper function that reads the bits of the enable register. It prints "Uarte0 is enabled", when the value is not 0. If it is 0, it prints "Uarte0 is disabled". Add a function call to `fn main()` + +Run the code. The terminal output should read: "Uarte0 is disabled". + +```rust +fn is_uarte_enabled(uarte: &UARTE0) { + if uarte.enable.read().enable().is_enabled() { + defmt::println!("Uarte0 is enabled"); + } else { + defmt::println!("Uarte0 is disabled"); + } +} +``` + +✅ Enable the peripheral safely by passing `w.enable().enabled()` in the closure. Call the helper function after this new line and run your code. + +It should print: + +```terminal +Uarte0 is disabled. +Uarte0 is ensabled. +``` + +```rust +uarte.enable.write(|w| w.enable().enabled()); +``` + +✅ Disable the peripheral unsafely by writing raw bits into the register. + +```rust +unsafe { + uarte.enable.write(|w| w.bits(0x00 as u32)); + } +``` diff --git a/embedded-workshop-book/src/generating-pac.md b/embedded-workshop-book/src/generating-pac.md new file mode 100644 index 0000000..ae22952 --- /dev/null +++ b/embedded-workshop-book/src/generating-pac.md @@ -0,0 +1,67 @@ +# Generating the PAC + +Generate your own PAC from an SVD file. + +## In this exercise you will learn how to +* generate a PAC from an SVD file. +* format the generated code. +* split the single PAC file into it's modules. + +## Prerequisites +* usage of cargo install +* generating docs + +## Tasks +* Install `svd2rust` and `form` via cargo. +* Download the [nrf-svd] file and place it into `down-the-stack/dk-pac`. +* Run svd2rust on the file using the `cortex-m` flag. +* Format the generated file to make it readable. +* Split the file into its modules using `form`. +* Check the documentation. + +## Step-by-Step Solution + + +✅ Install the necessary tools using the following commands: + +```terminal +cargo install svd2rust +cargo install form +``` + +✅ Download https://github.com/NordicSemiconductor/nrfx/blob/master/mdk/nrf52.svd (This version has an error: writeonce needs to be changed to writeOnce) +Place the file into `down-the-stack/dk-pac`. Note how we provide a `Cargo.toml` file, as it will not be generated by svd2rust. + +✅ In the terminal, go to the file's location. Run `svd2rust` with the SVD file to generate a PAC using the `cortex-m` flag. + +``` +svd2rust --target cortex-m -i nrf52.svd +``` +If you check the folder `down-the-stack/dk-pac` now, you see three new files: +* lib.rs - the file that contains the generated code for the pac +* device.x - linker sections(?) +* build.rs - linker script + +✅ Open the generated `lib.rs` with an editor. +Notice how it's barely correctly formatted. + +✅ Look at the PAC docs with the following command: + +```terminal +cargo doc --open +``` + +✅ Format the crate using `cargo fmt`. +This does not change to the docs, but `lib.rs` is a bit more readable. + + +✅ Use form to process the `lib.rs` to split it into modules, so that each module in in it's own file. + +```terminal +form -i src/lib.rs -o src/ +``` + +✅ Re-run `cargo fmt`. + + +[nrf svd]: (https://github.com/NordicSemiconductor/nrfx/blob/master/mdk/nrf52.svd ) \ No newline at end of file diff --git a/embedded-workshop-book/src/pac-docs.md b/embedded-workshop-book/src/pac-docs.md new file mode 100644 index 0000000..4d208bc --- /dev/null +++ b/embedded-workshop-book/src/pac-docs.md @@ -0,0 +1,41 @@ +# Reading PAC Documentation +(This should be covered or at least preceded by a lecture that includes basic use of closures and the read/write/modify API) + +Generate and open the PAC's docs using the following command: + +``` +cargo doc --open +``` + +In the `Structs` section look for the `struct Peripherals`. Taking ownership of it will be the first step later on. Note that only the method `steal()` is documented. It is an unsafe method, and to be avoided. `Peripherals` has a field named `UARTE0`. + +In the `modules` section, look for the `uarte0` module. It is divided into submodules. `enable` is the register we are concerned about. Clicking on it shows the associated type definitions. + +* `W` - the register ENABLE writer with the following methods: + * `enable()` returns the field ENABLE writer `ENABLE_W`. + * `unsafe bits()` writes raw bits into the register. +* `R` - the register ENABLE reader writer with the following methods: + * `enable()` returns the field ENABLE reader `ENABLE_R`. + * `bits()` reads raw bits from the register. + +The types `ENABLE_R` and `ENABLE_W` have methods that you can use if you don't want to deal with raw bits. Check them out! + +Usage: If you want to write or read something from the uarte register and you want to avoid dealing with raw bits, you first have to call a method that gives you access to the respective reader or writer, and then call the method that does what you want. + +Example: + +```rust +// this reads the enable register, and returns true if the register is disabled. +uarte.enable.read().is_disabled() +``` + +Note the difference between the struct field `UARTE0` in `Peripherals` and the module `uarte0`. + +## Finding corresponding sections in the PAC + +* `dk_pac/src/lib.rs` defines the single peripherals with their register block addresses and contains a struct defintion for the `struct Peripherals`. There are two methods for this struct: `take()` and `steal()`. `take()` assures, that only one instance of this can exist. Hence, it's safe. Note that `take()` is only available with the `critical-section` feature enabled. + +* `dk_pac/src/uarte0.rs` defines a struct that contains all the registers of the `UARTE0` register block. The `enable` field represents the register of the same name. + +* `dk_pac/src/uarte0/enable.rs` defines the types associated with this register that you already saw in the docs. + diff --git a/embedded-workshop-book/src/pac-exercise.md b/embedded-workshop-book/src/pac-exercise.md index bd885ed..7f66e4a 100644 --- a/embedded-workshop-book/src/pac-exercise.md +++ b/embedded-workshop-book/src/pac-exercise.md @@ -1,150 +1,5 @@ -# PAC Exercise +# Generating and Using a PAC -In this exercise you will generate a PAC (Peripheral Access Crate) from an svd file, and write a small program that enables the UARTE0 register. - -## In this exercise you will learn how to -* Generate a Peripheral Access Crate from an svd file -* Two ways to write into a register to enable and disable it - -## Prerequisites -* basic use of closures -* read/write/modify api - -## Tasks +In this module you will learn how to generate a PAC (Peripheral Access Crate) from an SVD file, read it's documentation and write a small program that enables the UARTE0 register. -## Generating the PAC - -✅ Install `svd2rust` using the following command: -``` -cargo install svd2rust -``` - -✅ Download https://github.com/NordicSemiconductor/nrfx/blob/master/mdk/nrf52.svd (This version has an error: writeonce needs to be changed to writeOnce) -Place the file into `down-the-stack/dk-pac`. Note how we provide a `Cargo.toml` file, as it will not be generated by svd2rust. - -✅ In the terminal, go to the file's location. Run `svd2rust` with the SVD file to generate a PAC using the `cortex-m` flag. - -``` -svd2rust --target cortex-m -i nrf52.svd -``` -If you check the folder `down-the-stack/dk-pac` now, you see three new files: -* lib.rs - the file that contains the generated code for the pac -* device.x - linker sections(?) -* build.rs - linker script - -✅ Open the generated `lib.rs` with an editor. -Notice how it's one long line of text in the source file. - -✅ Look at the PAC docs with cargo doc --open. - -✅ cargo fmt the crate. No change to the docs, but a bit more readable. - -✅ Install form with the following command: - -``` -cargo install form -``` - -``` -✅ use form to process the one-big-file into one-file-per-module with the following command: -``` -form -i src/lib.rs -o src/ -``` - -✅ Re-run `cargo fmt`. - - -## Enabling the UARTE0 peripheral - - - -Write a simple program which uses the PAC to enable the UART. See how writing arbitrary values to the ENABLE field in the ENABLE register is unsafe, because only values 0 or 8 should be used. - -✅ Finding your way through the docs: -(This better be a lecture) - -* In the `Structs` section look for the `struct Peripherals`. Taking ownerhip of it will be the first step later on. Note that only the method `steal()` is documented. It is an unsafe method, and to be avoided. `Peripherals` has a field named `UARTE0` -* In the `modules` section, look for the `uarte0` module. It is divided into submodules. `enable` is important for us. Clicking on it shows the associated type definitions. - - -* `W` - the register ENABLE writer with the following methods: - * `enable()` returns the field ENABLE writer `ENABLE_W`. - * `unsafe bits()` writes raw bits into the register. -* `R` - the register ENABLE reader writer with the following methods: - * `enable()` returns the field ENABLE reader `ENABLE_R`. - * `bits()` reads raw bits from the register. -The types `ENABLE_R` and `ENABLE_W` have useful methods themselves, check them out. - -Usage: if you want to write or read something from the uarte register and you want to avoid dealing with raw bits, you first have to call a method that gives you access to the respective reader or writer, and then call the method that does what you want. - -Example: - -uarte.enable.read(). - -Note the difference between the struct field `UARTE0` in `Peripherals` and the module `uarte0`. - -✅ Finding your way through the PAC - -* `dk_pac/src/lib.rs` defines the single peripherals with their register block addresses and contains a struct defintion for the `struct Peripherals`. There are two methods for this struct: `take()` and `steal()`. `take()` assures, that only one instance of this can exist. Hence, it's safe. Note that `take()` is only available with the `critical-section` feature enabled. - -* `dk_pac/src/uarte0.rs` defines a struct that contains all the registers of the `UARTE0` register block. The `enable` field represents the register of the same name. - -* `dk_pac/src/uarte0/enable.rs` defines the types associated with this register that you already saw in the docs. - -* Find the definition of the ENABLE register for UARTE0, in the PDF datasheet and in the SVD file - -* - - -✅ Import the PAC - -down-the-stack/apps/Cargo.toml - -``` -dk_pac = { path = "../dk_pac", features = ["critical-section"]} -``` -apps/bin/uarte_enable.rs - -```rust -use dk_pac::UARTE0; -``` - -✅ Take ownership of the peripherals with `take()` and bind the `UARTE0` peripheral to it's own variable - -```rust -let periph = dk_pac::Peripherals::take().unwrap(); -let uarte = periph.UARTE0; -``` - -✅ Write a helper function that reads the bits of the enable register. It prints "Uarte0 is enabled", when the value is not 0. If it is 0, it prints "Uarte0 is disabled". Add a function call to `fn main()` - -Run the code. The terminal output should read: "Uarte0 is disabled". - -```rust -fn is_uarte_enabled(uarte: &UARTE0) { - if uarte.enable.read().enable().is_enabled() { - defmt::println!("Uarte0 is enabled"); - } else { - defmt::println!("Uarte0 is disabled"); - } -} -``` - -✅ Enable the peripheral safely by passing `w.enable().enabled()` in the closure. Call the helper function after this new line and run your code. - -It should print: -"Uarte0 is disabled" -"Uarte0 is ensabled" - -``` -uarte.enable.write(|w| w.enable().enabled()); -``` - -✅ Disable the peripheral with unsafely by writing raw bits into the register. - -```rust -unsafe { - uarte.enable.write(|w| w.bits(0x00 as u32)); - } -``` From b4de9b3ed59818e5e6c236763f96a941ceb5ffc6 Mon Sep 17 00:00:00 2001 From: Mirabellensaft Date: Mon, 13 Mar 2023 18:33:02 +0100 Subject: [PATCH 11/42] add solution and template for uarte_enable --- down-the-stack/apps/src/bin/uarte_enable.rs | 31 ++---------- .../apps/src/bin/uarte_enable_solution.rs | 48 +++++++++++++++++++ 2 files changed, 53 insertions(+), 26 deletions(-) create mode 100644 down-the-stack/apps/src/bin/uarte_enable_solution.rs diff --git a/down-the-stack/apps/src/bin/uarte_enable.rs b/down-the-stack/apps/src/bin/uarte_enable.rs index 2f46d79..0f380e4 100644 --- a/down-the-stack/apps/src/bin/uarte_enable.rs +++ b/down-the-stack/apps/src/bin/uarte_enable.rs @@ -3,7 +3,8 @@ use cortex_m::asm; use cortex_m_rt::entry; -use dk_pac::UARTE0; + +// ^^^^ import the PAC here // this imports `down-the-stack/apps/lib.rs` to retrieve our global logger + panicking-behavior use apps as _; @@ -15,23 +16,8 @@ fn main() -> ! { // to enable more verbose logs, go to your `Cargo.toml` and set defmt logging levels // to `defmt-trace` by changing the `default = []` entry in `[features]` - // takes ownership of the nRF52840-DK peripherals - let periph = dk_pac::Peripherals::take().unwrap(); - let uarte = periph.UARTE0; - - uarte_enabled(&uarte); - - // enable the UART0 peripheral the safe way - uarte.enable.write(|w| w.enable().enabled()); - - uarte_enabled(&uarte); - - // disable the UART0 peripheral by writing 0 directly into the register -- the unsafe way - unsafe { - uarte.enable.write(|w| w.bits(0x00 as u32)); - } - - uarte_enabled(&uarte); + // Your code goes here... + // this program does not `exit`; use Ctrl+C to terminate it loop { @@ -39,11 +25,4 @@ fn main() -> ! { } } -// Reads the bits in the UART0 register and prints `enabled` or `disabled` -fn uarte_enabled(uarte: &UARTE0) { - if uarte.enable.read().bits() != 0 { - defmt::println!("Uarte0 is enabled"); - } else { - defmt::println!("Uarte0 is disabled"); - } -} +// The helper function goes here... diff --git a/down-the-stack/apps/src/bin/uarte_enable_solution.rs b/down-the-stack/apps/src/bin/uarte_enable_solution.rs new file mode 100644 index 0000000..ef29275 --- /dev/null +++ b/down-the-stack/apps/src/bin/uarte_enable_solution.rs @@ -0,0 +1,48 @@ +#![no_main] +#![no_std] + +use cortex_m::asm; +use cortex_m_rt::entry; +use dk_pac::UARTE0; + +// this imports `down-the-stack/apps/lib.rs` to retrieve our global logger + panicking-behavior +use apps as _; +use defmt; +use defmt_rtt as _; // global logger + +#[entry] +fn main() -> ! { + // to enable more verbose logs, go to your `Cargo.toml` and set defmt logging levels + // to `defmt-trace` by changing the `default = []` entry in `[features]` + + // takes ownership of the nRF52840-DK peripherals + let periph = dk_pac::Peripherals::take().unwrap(); + let uarte = periph.UARTE0; + + is_uarte_enabled(&uarte); + + // enable the UART0 peripheral the safe way + uarte.enable.write(|w| w.enable().enabled()); + + is_uarte_enabled(&uarte); + + // disable the UART0 peripheral by writing 0 directly into the register -- the unsafe way + unsafe { + uarte.enable.write(|w| w.bits(0x00 as u32)); + } + + is_uarte_enabled(&uarte); + + // this program does not `exit`; use Ctrl+C to terminate it + loop { + asm::nop(); + } +} + +fn is_uarte_enabled(uarte: &UARTE0) { + if uarte.enable.read().enable().is_enabled() { + defmt::println!("Uarte0 is enabled"); + } else { + defmt::println!("Uarte0 is disabled"); + } +} \ No newline at end of file From b8f34e47adf7ace2f8f02daefa420784a51ddaea Mon Sep 17 00:00:00 2001 From: Mirabellensaft Date: Mon, 13 Mar 2023 18:52:22 +0100 Subject: [PATCH 12/42] formatting and polishing --- embedded-workshop-book/src/enabling-uarte.md | 30 ++++++++++++++------ 1 file changed, 22 insertions(+), 8 deletions(-) diff --git a/embedded-workshop-book/src/enabling-uarte.md b/embedded-workshop-book/src/enabling-uarte.md index 9e16a0a..014fbdd 100644 --- a/embedded-workshop-book/src/enabling-uarte.md +++ b/embedded-workshop-book/src/enabling-uarte.md @@ -26,34 +26,44 @@ Uarte0 is ensabled. Uarte0 is disabled. ``` +Find the starter code in `down-the-stack/apps/uarte_enable.rs` +Find the full solution in `down-the-stack/apps/uarte_enable_solution.rs` + + ## Step-by-Step Solution -✅ Find the values that can be written in the `enable` register: +### Step 1: Find the values that can be written in the `enable` register: 0: disabled 8: enabled -✅ Import the PAC +### Step 2: Import the PAC -In `down-the-stack/apps/Cargo.toml`: +In `down-the-stack/apps/Cargo.toml` add: ``` dk_pac = { path = "../dk_pac", features = ["critical-section"]} ``` -In `apps/bin/uarte_enable.rs`: +In `apps/bin/uarte_enable.rs` add: ```rust use dk_pac::UARTE0; ``` -✅ Take ownership of the peripherals with `take()` and bind the `UARTE0` peripheral to it's own variable +### Step 3: Take ownership of the peripherals with `take()` + +Take ownership of the peripherals with `take()`. Take note, the take returns an `Option` so that needs to be taken care of. Bind the `UARTE0` peripheral to it's own variable. ```rust let periph = dk_pac::Peripherals::take().unwrap(); let uarte = periph.UARTE0; ``` -✅ Write a helper function that reads the bits of the enable register. It prints "Uarte0 is enabled", when the value is not 0. If it is 0, it prints "Uarte0 is disabled". Add a function call to `fn main()` +### Step 4: Write a helper function to get the status of the register. + +The helper function either reads the raw bits of the enable register or makes use of the specific method available. + +The function prints "Uarte0 is enabled" or "Uarte0 is disabled" depending on the case. Add a function call to `fn main()`. Run the code. The terminal output should read: "Uarte0 is disabled". @@ -67,7 +77,9 @@ fn is_uarte_enabled(uarte: &UARTE0) { } ``` -✅ Enable the peripheral safely by passing `w.enable().enabled()` in the closure. Call the helper function after this new line and run your code. +### Step 5: Enable the peripheral safely. + +Enable the peripheral safely by passing `w.enable().enabled()` in the closure of `write()`. Call the helper function after this new line and run your code. It should print: @@ -80,7 +92,9 @@ Uarte0 is ensabled. uarte.enable.write(|w| w.enable().enabled()); ``` -✅ Disable the peripheral unsafely by writing raw bits into the register. +### Step 6: Disable the peripheral unsafely by writing raw bits into the register. + +Write 0 into the register to disable it. Call the helper function once more and run your code. Compare your output with the expected output on top of this page. ```rust unsafe { From 13b90e15a570a4ee99b3facddb3134e32725b48a Mon Sep 17 00:00:00 2001 From: Mirabellensaft Date: Tue, 14 Mar 2023 12:07:46 +0100 Subject: [PATCH 13/42] move uarte solution to its own folder --- down-the-stack/solutions/.cargo/config.toml | 19 +++++++ down-the-stack/solutions/Cargo.toml | 50 +++++++++++++++++++ down-the-stack/solutions/README.md | 4 ++ .../src/bin/uarte_enable.rs} | 2 +- down-the-stack/solutions/src/lib.rs | 10 ++++ 5 files changed, 84 insertions(+), 1 deletion(-) create mode 100644 down-the-stack/solutions/.cargo/config.toml create mode 100644 down-the-stack/solutions/Cargo.toml create mode 100644 down-the-stack/solutions/README.md rename down-the-stack/{apps/src/bin/uarte_enable_solution.rs => solutions/src/bin/uarte_enable.rs} (97%) create mode 100644 down-the-stack/solutions/src/lib.rs diff --git a/down-the-stack/solutions/.cargo/config.toml b/down-the-stack/solutions/.cargo/config.toml new file mode 100644 index 0000000..abfd4b6 --- /dev/null +++ b/down-the-stack/solutions/.cargo/config.toml @@ -0,0 +1,19 @@ +[target.'cfg(all(target_arch = "arm", target_os = "none"))'] +# (..) +rustflags = [ + "-C", "linker=flip-link", # adds stack overflow protection + "-C", "link-arg=-Tdefmt.x", # defmt support + # (..) +] + +[target.thumbv7em-none-eabihf] +# set custom cargo runner to flash & run on embedded target when we call `cargo run` +# for more information, check out https://github.com/knurling-rs/probe-run +runner = "probe-run --chip nRF52840_xxAA" +rustflags = [ + "-C", "link-arg=-Tlink.x", +] + +[build] +# cross-compile to this target +target = "thumbv7em-none-eabihf" # = ARM Cortex-M4 \ No newline at end of file diff --git a/down-the-stack/solutions/Cargo.toml b/down-the-stack/solutions/Cargo.toml new file mode 100644 index 0000000..06950f5 --- /dev/null +++ b/down-the-stack/solutions/Cargo.toml @@ -0,0 +1,50 @@ +[package] +authors = ["Tanks Transfeld "] +edition = "2018" +license = "MIT OR Apache-2.0" +name = "uarte_enable_solution" +version = "0.0.0" + +[dependencies] +cortex-m = {version = "0.7.6", features = ["critical-section-single-core"]} +cortex-m-rt = "0.7.2" +dk_bsc = { path = "../dk_bsc" } +dk_pac = { path = "../dk_pac", features = ["critical-section"]} +heapless = "0.7.16" +panic-probe = { version = "0.3.0", features = ["print-defmt"] } +defmt = "0.3.2" +defmt-rtt = "0.3.2" + +# optimize code in both profiles +[profile.dev] +codegen-units = 1 +debug = 2 +debug-assertions = true # ! +incremental = false +lto = "fat" +opt-level = 'z' # ! +overflow-checks = false + +[profile.release] +codegen-units = 1 +debug = 1 +debug-assertions = false +incremental = false +lto = "fat" +opt-level = 3 +overflow-checks = false + +[features] + + +default = [ + "other-feature" +] +other-feature = [] +# do NOT modify these features +defmt-default = [] +defmt-trace = [] +defmt-debug = [] +defmt-info = [] +defmt-warn = [] +defmt-error = [] \ No newline at end of file diff --git a/down-the-stack/solutions/README.md b/down-the-stack/solutions/README.md new file mode 100644 index 0000000..2998083 --- /dev/null +++ b/down-the-stack/solutions/README.md @@ -0,0 +1,4 @@ +# Solutions + +This program does not build if the pac is not generated! +The file is only for reference. \ No newline at end of file diff --git a/down-the-stack/apps/src/bin/uarte_enable_solution.rs b/down-the-stack/solutions/src/bin/uarte_enable.rs similarity index 97% rename from down-the-stack/apps/src/bin/uarte_enable_solution.rs rename to down-the-stack/solutions/src/bin/uarte_enable.rs index ef29275..010d0d4 100644 --- a/down-the-stack/apps/src/bin/uarte_enable_solution.rs +++ b/down-the-stack/solutions/src/bin/uarte_enable.rs @@ -6,7 +6,7 @@ use cortex_m_rt::entry; use dk_pac::UARTE0; // this imports `down-the-stack/apps/lib.rs` to retrieve our global logger + panicking-behavior -use apps as _; +use uarte_enable_solution as _; use defmt; use defmt_rtt as _; // global logger diff --git a/down-the-stack/solutions/src/lib.rs b/down-the-stack/solutions/src/lib.rs new file mode 100644 index 0000000..3446a8d --- /dev/null +++ b/down-the-stack/solutions/src/lib.rs @@ -0,0 +1,10 @@ +#![no_std] + +use panic_probe as _; + +// same panicking *behavior* as `panic-probe` but doesn't print a panic message +// this prevents the panic message being printed *twice* when `defmt::panic` is invoked +#[defmt::panic_handler] +fn panic() -> ! { + cortex_m::asm::udf() +} From 4eb0ac3b9e8b59ab8717bd2d4c0fe0e3455359a4 Mon Sep 17 00:00:00 2001 From: Mirabellensaft Date: Tue, 14 Mar 2023 12:08:12 +0100 Subject: [PATCH 14/42] Clean up for testing (rm generated pac) --- down-the-stack/apps/Cargo.toml | 1 - down-the-stack/dk_pac/build.rs | 17 - down-the-stack/dk_pac/device.x | 38 - down-the-stack/dk_pac/src/aar.rs | 88 - down-the-stack/dk_pac/src/aar/addrptr.rs | 80 - down-the-stack/dk_pac/src/aar/enable.rs | 128 - down-the-stack/dk_pac/src/aar/events_end.rs | 127 - .../dk_pac/src/aar/events_notresolved.rs | 127 - .../dk_pac/src/aar/events_resolved.rs | 127 - down-the-stack/dk_pac/src/aar/intenclr.rs | 270 -- down-the-stack/dk_pac/src/aar/intenset.rs | 270 -- down-the-stack/dk_pac/src/aar/irkptr.rs | 80 - down-the-stack/dk_pac/src/aar/nirk.rs | 80 - down-the-stack/dk_pac/src/aar/scratchptr.rs | 81 - down-the-stack/dk_pac/src/aar/status.rs | 37 - down-the-stack/dk_pac/src/aar/tasks_start.rs | 72 - down-the-stack/dk_pac/src/aar/tasks_stop.rs | 72 - down-the-stack/dk_pac/src/approtect.rs | 18 - .../dk_pac/src/approtect/disable.rs | 116 - .../dk_pac/src/approtect/forceprotect.rs | 116 - down-the-stack/dk_pac/src/bprot.rs | 36 - down-the-stack/dk_pac/src/bprot/config0.rs | 2017 -------------- down-the-stack/dk_pac/src/bprot/config1.rs | 2017 -------------- down-the-stack/dk_pac/src/bprot/config2.rs | 2017 -------------- down-the-stack/dk_pac/src/bprot/config3.rs | 2017 -------------- .../dk_pac/src/bprot/disableindebug.rs | 127 - down-the-stack/dk_pac/src/ccm.rs | 105 - down-the-stack/dk_pac/src/ccm/cnfptr.rs | 80 - down-the-stack/dk_pac/src/ccm/enable.rs | 128 - .../dk_pac/src/ccm/events_endcrypt.rs | 127 - .../dk_pac/src/ccm/events_endksgen.rs | 127 - down-the-stack/dk_pac/src/ccm/events_error.rs | 127 - down-the-stack/dk_pac/src/ccm/inptr.rs | 80 - down-the-stack/dk_pac/src/ccm/intenclr.rs | 269 -- down-the-stack/dk_pac/src/ccm/intenset.rs | 269 -- down-the-stack/dk_pac/src/ccm/micstatus.rs | 71 - down-the-stack/dk_pac/src/ccm/mode.rs | 248 -- down-the-stack/dk_pac/src/ccm/outptr.rs | 80 - down-the-stack/dk_pac/src/ccm/scratchptr.rs | 81 - down-the-stack/dk_pac/src/ccm/shorts.rs | 127 - down-the-stack/dk_pac/src/ccm/tasks_crypt.rs | 72 - down-the-stack/dk_pac/src/ccm/tasks_ksgen.rs | 72 - down-the-stack/dk_pac/src/ccm/tasks_stop.rs | 72 - down-the-stack/dk_pac/src/clock.rs | 138 - down-the-stack/dk_pac/src/clock/ctiv.rs | 80 - .../dk_pac/src/clock/events_ctto.rs | 127 - .../dk_pac/src/clock/events_done.rs | 127 - .../dk_pac/src/clock/events_hfclkstarted.rs | 127 - .../dk_pac/src/clock/events_lfclkstarted.rs | 127 - down-the-stack/dk_pac/src/clock/hfclkrun.rs | 71 - down-the-stack/dk_pac/src/clock/hfclkstat.rs | 112 - down-the-stack/dk_pac/src/clock/intenclr.rs | 339 --- down-the-stack/dk_pac/src/clock/intenset.rs | 339 --- down-the-stack/dk_pac/src/clock/lfclkrun.rs | 71 - down-the-stack/dk_pac/src/clock/lfclksrc.rs | 263 -- .../dk_pac/src/clock/lfclksrccopy.rs | 81 - down-the-stack/dk_pac/src/clock/lfclkstat.rs | 122 - down-the-stack/dk_pac/src/clock/tasks_cal.rs | 71 - .../dk_pac/src/clock/tasks_ctstart.rs | 72 - .../dk_pac/src/clock/tasks_ctstop.rs | 72 - .../dk_pac/src/clock/tasks_hfclkstart.rs | 72 - .../dk_pac/src/clock/tasks_hfclkstop.rs | 72 - .../dk_pac/src/clock/tasks_lfclkstart.rs | 72 - .../dk_pac/src/clock/tasks_lfclkstop.rs | 72 - .../dk_pac/src/clock/traceconfig.rs | 232 -- down-the-stack/dk_pac/src/comp.rs | 130 - down-the-stack/dk_pac/src/comp/enable.rs | 128 - .../dk_pac/src/comp/events_cross.rs | 127 - down-the-stack/dk_pac/src/comp/events_down.rs | 127 - .../dk_pac/src/comp/events_ready.rs | 127 - down-the-stack/dk_pac/src/comp/events_up.rs | 126 - down-the-stack/dk_pac/src/comp/extrefsel.rs | 207 -- down-the-stack/dk_pac/src/comp/hyst.rs | 126 - down-the-stack/dk_pac/src/comp/inten.rs | 309 --- down-the-stack/dk_pac/src/comp/intenclr.rs | 337 --- down-the-stack/dk_pac/src/comp/intenset.rs | 337 --- down-the-stack/dk_pac/src/comp/isource.rs | 155 -- down-the-stack/dk_pac/src/comp/mode.rs | 202 -- down-the-stack/dk_pac/src/comp/psel.rs | 206 -- down-the-stack/dk_pac/src/comp/refsel.rs | 167 -- down-the-stack/dk_pac/src/comp/result.rs | 71 - down-the-stack/dk_pac/src/comp/shorts.rs | 371 --- .../dk_pac/src/comp/tasks_sample.rs | 72 - down-the-stack/dk_pac/src/comp/tasks_start.rs | 72 - down-the-stack/dk_pac/src/comp/tasks_stop.rs | 72 - down-the-stack/dk_pac/src/comp/th.rs | 95 - down-the-stack/dk_pac/src/ecb.rs | 49 - down-the-stack/dk_pac/src/ecb/ecbdataptr.rs | 81 - .../dk_pac/src/ecb/events_endecb.rs | 127 - .../dk_pac/src/ecb/events_errorecb.rs | 127 - down-the-stack/dk_pac/src/ecb/intenclr.rs | 201 -- down-the-stack/dk_pac/src/ecb/intenset.rs | 201 -- .../dk_pac/src/ecb/tasks_startecb.rs | 72 - .../dk_pac/src/ecb/tasks_stopecb.rs | 72 - down-the-stack/dk_pac/src/egu0.rs | 40 - .../dk_pac/src/egu0/events_triggered.rs | 134 - down-the-stack/dk_pac/src/egu0/inten.rs | 1041 ------- down-the-stack/dk_pac/src/egu0/intenclr.rs | 1159 -------- down-the-stack/dk_pac/src/egu0/intenset.rs | 1159 -------- .../dk_pac/src/egu0/tasks_trigger.rs | 77 - down-the-stack/dk_pac/src/ficr.rs | 73 - .../dk_pac/src/ficr/codepagesize.rs | 37 - down-the-stack/dk_pac/src/ficr/codesize.rs | 37 - down-the-stack/dk_pac/src/ficr/deviceaddr.rs | 38 - .../dk_pac/src/ficr/deviceaddrtype.rs | 71 - down-the-stack/dk_pac/src/ficr/deviceid.rs | 38 - down-the-stack/dk_pac/src/ficr/er.rs | 38 - down-the-stack/dk_pac/src/ficr/info.rs | 34 - down-the-stack/dk_pac/src/ficr/info/flash.rs | 89 - .../dk_pac/src/ficr/info/package.rs | 97 - down-the-stack/dk_pac/src/ficr/info/part.rs | 73 - down-the-stack/dk_pac/src/ficr/info/ram.rs | 89 - .../dk_pac/src/ficr/info/variant.rs | 161 -- down-the-stack/dk_pac/src/ficr/ir.rs | 38 - down-the-stack/dk_pac/src/ficr/nfc.rs | 28 - .../dk_pac/src/ficr/nfc/tagheader0.rs | 58 - .../dk_pac/src/ficr/nfc/tagheader1.rs | 58 - .../dk_pac/src/ficr/nfc/tagheader2.rs | 58 - .../dk_pac/src/ficr/nfc/tagheader3.rs | 58 - down-the-stack/dk_pac/src/ficr/temp.rs | 106 - down-the-stack/dk_pac/src/ficr/temp/a0.rs | 37 - down-the-stack/dk_pac/src/ficr/temp/a1.rs | 37 - down-the-stack/dk_pac/src/ficr/temp/a2.rs | 37 - down-the-stack/dk_pac/src/ficr/temp/a3.rs | 37 - down-the-stack/dk_pac/src/ficr/temp/a4.rs | 37 - down-the-stack/dk_pac/src/ficr/temp/a5.rs | 37 - down-the-stack/dk_pac/src/ficr/temp/b0.rs | 37 - down-the-stack/dk_pac/src/ficr/temp/b1.rs | 37 - down-the-stack/dk_pac/src/ficr/temp/b2.rs | 37 - down-the-stack/dk_pac/src/ficr/temp/b3.rs | 37 - down-the-stack/dk_pac/src/ficr/temp/b4.rs | 37 - down-the-stack/dk_pac/src/ficr/temp/b5.rs | 37 - down-the-stack/dk_pac/src/ficr/temp/t0.rs | 37 - down-the-stack/dk_pac/src/ficr/temp/t1.rs | 37 - down-the-stack/dk_pac/src/ficr/temp/t2.rs | 37 - down-the-stack/dk_pac/src/ficr/temp/t3.rs | 37 - down-the-stack/dk_pac/src/ficr/temp/t4.rs | 37 - down-the-stack/dk_pac/src/generic.rs | 634 ----- down-the-stack/dk_pac/src/gpiote.rs | 64 - down-the-stack/dk_pac/src/gpiote/config.rs | 347 --- down-the-stack/dk_pac/src/gpiote/events_in.rs | 127 - .../dk_pac/src/gpiote/events_port.rs | 127 - down-the-stack/dk_pac/src/gpiote/intenclr.rs | 677 ----- down-the-stack/dk_pac/src/gpiote/intenset.rs | 677 ----- down-the-stack/dk_pac/src/gpiote/tasks_clr.rs | 72 - down-the-stack/dk_pac/src/gpiote/tasks_out.rs | 72 - down-the-stack/dk_pac/src/gpiote/tasks_set.rs | 72 - down-the-stack/dk_pac/src/i2s.rs | 101 - down-the-stack/dk_pac/src/i2s/config.rs | 64 - down-the-stack/dk_pac/src/i2s/config/align.rs | 126 - .../dk_pac/src/i2s/config/channels.rs | 142 - .../dk_pac/src/i2s/config/format.rs | 126 - down-the-stack/dk_pac/src/i2s/config/mcken.rs | 126 - .../dk_pac/src/i2s/config/mckfreq.rs | 337 --- down-the-stack/dk_pac/src/i2s/config/mode.rs | 126 - down-the-stack/dk_pac/src/i2s/config/ratio.rs | 219 -- down-the-stack/dk_pac/src/i2s/config/rxen.rs | 126 - .../dk_pac/src/i2s/config/swidth.rs | 141 - down-the-stack/dk_pac/src/i2s/config/txen.rs | 126 - down-the-stack/dk_pac/src/i2s/enable.rs | 126 - .../dk_pac/src/i2s/events_rxptrupd.rs | 127 - .../dk_pac/src/i2s/events_stopped.rs | 127 - .../dk_pac/src/i2s/events_txptrupd.rs | 127 - down-the-stack/dk_pac/src/i2s/inten.rs | 248 -- down-the-stack/dk_pac/src/i2s/intenclr.rs | 269 -- down-the-stack/dk_pac/src/i2s/intenset.rs | 269 -- down-the-stack/dk_pac/src/i2s/psel.rs | 34 - down-the-stack/dk_pac/src/i2s/psel/lrck.rs | 141 - down-the-stack/dk_pac/src/i2s/psel/mck.rs | 141 - down-the-stack/dk_pac/src/i2s/psel/sck.rs | 141 - down-the-stack/dk_pac/src/i2s/psel/sdin.rs | 141 - down-the-stack/dk_pac/src/i2s/psel/sdout.rs | 141 - down-the-stack/dk_pac/src/i2s/rxd.rs | 10 - down-the-stack/dk_pac/src/i2s/rxd/ptr.rs | 80 - down-the-stack/dk_pac/src/i2s/rxtxd.rs | 10 - down-the-stack/dk_pac/src/i2s/rxtxd/maxcnt.rs | 80 - down-the-stack/dk_pac/src/i2s/tasks_start.rs | 72 - down-the-stack/dk_pac/src/i2s/tasks_stop.rs | 72 - down-the-stack/dk_pac/src/i2s/txd.rs | 10 - down-the-stack/dk_pac/src/i2s/txd/ptr.rs | 80 - down-the-stack/dk_pac/src/lib.rs | 2407 ----------------- down-the-stack/dk_pac/src/lpcomp.rs | 113 - down-the-stack/dk_pac/src/lpcomp/anadetect.rs | 142 - down-the-stack/dk_pac/src/lpcomp/enable.rs | 128 - .../dk_pac/src/lpcomp/events_cross.rs | 127 - .../dk_pac/src/lpcomp/events_down.rs | 127 - .../dk_pac/src/lpcomp/events_ready.rs | 127 - down-the-stack/dk_pac/src/lpcomp/events_up.rs | 126 - down-the-stack/dk_pac/src/lpcomp/extrefsel.rs | 126 - down-the-stack/dk_pac/src/lpcomp/hyst.rs | 126 - down-the-stack/dk_pac/src/lpcomp/intenclr.rs | 337 --- down-the-stack/dk_pac/src/lpcomp/intenset.rs | 337 --- down-the-stack/dk_pac/src/lpcomp/psel.rs | 206 -- down-the-stack/dk_pac/src/lpcomp/refsel.rs | 311 --- down-the-stack/dk_pac/src/lpcomp/result.rs | 71 - down-the-stack/dk_pac/src/lpcomp/shorts.rs | 371 --- .../dk_pac/src/lpcomp/tasks_sample.rs | 72 - .../dk_pac/src/lpcomp/tasks_start.rs | 72 - .../dk_pac/src/lpcomp/tasks_stop.rs | 72 - down-the-stack/dk_pac/src/mwu.rs | 113 - .../dk_pac/src/mwu/events_pregion.rs | 16 - .../dk_pac/src/mwu/events_pregion/ra.rs | 126 - .../dk_pac/src/mwu/events_pregion/wa.rs | 126 - .../dk_pac/src/mwu/events_region.rs | 16 - .../dk_pac/src/mwu/events_region/ra.rs | 126 - .../dk_pac/src/mwu/events_region/wa.rs | 126 - down-the-stack/dk_pac/src/mwu/inten.rs | 797 ------ down-the-stack/dk_pac/src/mwu/intenclr.rs | 881 ------ down-the-stack/dk_pac/src/mwu/intenset.rs | 881 ------ down-the-stack/dk_pac/src/mwu/nmien.rs | 797 ------ down-the-stack/dk_pac/src/mwu/nmienclr.rs | 881 ------ down-the-stack/dk_pac/src/mwu/nmienset.rs | 881 ------ down-the-stack/dk_pac/src/mwu/perregion.rs | 16 - .../dk_pac/src/mwu/perregion/substatra.rs | 2017 -------------- .../dk_pac/src/mwu/perregion/substatwa.rs | 2017 -------------- down-the-stack/dk_pac/src/mwu/pregion.rs | 22 - down-the-stack/dk_pac/src/mwu/pregion/end.rs | 37 - .../dk_pac/src/mwu/pregion/start.rs | 37 - down-the-stack/dk_pac/src/mwu/pregion/subs.rs | 2017 -------------- down-the-stack/dk_pac/src/mwu/region.rs | 16 - down-the-stack/dk_pac/src/mwu/region/end.rs | 80 - down-the-stack/dk_pac/src/mwu/region/start.rs | 80 - down-the-stack/dk_pac/src/mwu/regionen.rs | 797 ------ down-the-stack/dk_pac/src/mwu/regionenclr.rs | 881 ------ down-the-stack/dk_pac/src/mwu/regionenset.rs | 881 ------ down-the-stack/dk_pac/src/nfct.rs | 275 -- .../dk_pac/src/nfct/currentloadctrl.rs | 37 - down-the-stack/dk_pac/src/nfct/errorstatus.rs | 113 - .../src/nfct/events_autocolresstarted.rs | 127 - .../dk_pac/src/nfct/events_collision.rs | 127 - .../dk_pac/src/nfct/events_endrx.rs | 127 - .../dk_pac/src/nfct/events_endtx.rs | 127 - .../dk_pac/src/nfct/events_error.rs | 127 - .../dk_pac/src/nfct/events_fielddetected.rs | 127 - .../dk_pac/src/nfct/events_fieldlost.rs | 127 - .../dk_pac/src/nfct/events_ready.rs | 127 - .../dk_pac/src/nfct/events_rxerror.rs | 127 - .../dk_pac/src/nfct/events_rxframeend.rs | 127 - .../dk_pac/src/nfct/events_rxframestart.rs | 127 - .../dk_pac/src/nfct/events_selected.rs | 127 - .../dk_pac/src/nfct/events_started.rs | 127 - .../dk_pac/src/nfct/events_txframeend.rs | 127 - .../dk_pac/src/nfct/events_txframestart.rs | 127 - .../dk_pac/src/nfct/fieldpresent.rs | 112 - .../dk_pac/src/nfct/framedelaymax.rs | 81 - .../dk_pac/src/nfct/framedelaymin.rs | 81 - .../dk_pac/src/nfct/framedelaymode.rs | 155 -- down-the-stack/dk_pac/src/nfct/framestatus.rs | 10 - .../dk_pac/src/nfct/framestatus/rx.rs | 248 -- down-the-stack/dk_pac/src/nfct/inten.rs | 982 ------- down-the-stack/dk_pac/src/nfct/intenclr.rs | 1089 -------- down-the-stack/dk_pac/src/nfct/intenset.rs | 1089 -------- down-the-stack/dk_pac/src/nfct/maxlen.rs | 80 - .../dk_pac/src/nfct/nfcid1_2nd_last.rs | 113 - .../dk_pac/src/nfct/nfcid1_3rd_last.rs | 113 - down-the-stack/dk_pac/src/nfct/nfcid1_last.rs | 125 - down-the-stack/dk_pac/src/nfct/packetptr.rs | 80 - down-the-stack/dk_pac/src/nfct/rxd.rs | 16 - down-the-stack/dk_pac/src/nfct/rxd/amount.rs | 44 - .../dk_pac/src/nfct/rxd/frameconfig.rs | 248 -- down-the-stack/dk_pac/src/nfct/selres.rs | 186 -- down-the-stack/dk_pac/src/nfct/sensres.rs | 303 --- down-the-stack/dk_pac/src/nfct/shorts.rs | 189 -- .../dk_pac/src/nfct/tasks_activate.rs | 72 - .../dk_pac/src/nfct/tasks_disable.rs | 72 - .../dk_pac/src/nfct/tasks_enablerxdata.rs | 72 - .../dk_pac/src/nfct/tasks_goidle.rs | 72 - .../dk_pac/src/nfct/tasks_gosleep.rs | 72 - down-the-stack/dk_pac/src/nfct/tasks_sense.rs | 72 - .../dk_pac/src/nfct/tasks_starttx.rs | 72 - down-the-stack/dk_pac/src/nfct/txd.rs | 16 - down-the-stack/dk_pac/src/nfct/txd/amount.rs | 95 - .../dk_pac/src/nfct/txd/frameconfig.rs | 310 --- down-the-stack/dk_pac/src/nvmc.rs | 77 - down-the-stack/dk_pac/src/nvmc/config.rs | 141 - down-the-stack/dk_pac/src/nvmc/eraseall.rs | 126 - down-the-stack/dk_pac/src/nvmc/erasepage.rs | 81 - down-the-stack/dk_pac/src/nvmc/erasepcr0.rs | 81 - down-the-stack/dk_pac/src/nvmc/erasepcr1.rs | 81 - down-the-stack/dk_pac/src/nvmc/eraseuicr.rs | 126 - down-the-stack/dk_pac/src/nvmc/icachecnf.rs | 188 -- down-the-stack/dk_pac/src/nvmc/ihit.rs | 80 - down-the-stack/dk_pac/src/nvmc/imiss.rs | 80 - down-the-stack/dk_pac/src/nvmc/ready.rs | 71 - down-the-stack/dk_pac/src/p0.rs | 66 - down-the-stack/dk_pac/src/p0/detectmode.rs | 127 - down-the-stack/dk_pac/src/p0/dir.rs | 2017 -------------- down-the-stack/dk_pac/src/p0/dirclr.rs | 2241 --------------- down-the-stack/dk_pac/src/p0/dirset.rs | 2241 --------------- down-the-stack/dk_pac/src/p0/in_.rs | 1342 --------- down-the-stack/dk_pac/src/p0/latch.rs | 2017 -------------- down-the-stack/dk_pac/src/p0/out.rs | 2017 -------------- down-the-stack/dk_pac/src/p0/outclr.rs | 2241 --------------- down-the-stack/dk_pac/src/p0/outset.rs | 2241 --------------- down-the-stack/dk_pac/src/p0/pin_cnf.rs | 482 ---- down-the-stack/dk_pac/src/pdm.rs | 102 - down-the-stack/dk_pac/src/pdm/enable.rs | 126 - down-the-stack/dk_pac/src/pdm/events_end.rs | 127 - .../dk_pac/src/pdm/events_started.rs | 127 - .../dk_pac/src/pdm/events_stopped.rs | 127 - down-the-stack/dk_pac/src/pdm/gainl.rs | 141 - down-the-stack/dk_pac/src/pdm/gainr.rs | 141 - down-the-stack/dk_pac/src/pdm/inten.rs | 248 -- down-the-stack/dk_pac/src/pdm/intenclr.rs | 269 -- down-the-stack/dk_pac/src/pdm/intenset.rs | 269 -- down-the-stack/dk_pac/src/pdm/mode.rs | 187 -- down-the-stack/dk_pac/src/pdm/pdmclkctrl.rs | 141 - down-the-stack/dk_pac/src/pdm/psel.rs | 16 - down-the-stack/dk_pac/src/pdm/psel/clk.rs | 141 - down-the-stack/dk_pac/src/pdm/psel/din.rs | 141 - down-the-stack/dk_pac/src/pdm/sample.rs | 16 - .../dk_pac/src/pdm/sample/maxcnt.rs | 80 - down-the-stack/dk_pac/src/pdm/sample/ptr.rs | 80 - down-the-stack/dk_pac/src/pdm/tasks_start.rs | 72 - down-the-stack/dk_pac/src/pdm/tasks_stop.rs | 72 - down-the-stack/dk_pac/src/power.rs | 140 - down-the-stack/dk_pac/src/power/dcdcen.rs | 126 - .../dk_pac/src/power/events_pofwarn.rs | 127 - .../dk_pac/src/power/events_sleepenter.rs | 127 - .../dk_pac/src/power/events_sleepexit.rs | 127 - down-the-stack/dk_pac/src/power/gpregret.rs | 80 - down-the-stack/dk_pac/src/power/gpregret2.rs | 80 - down-the-stack/dk_pac/src/power/intenclr.rs | 269 -- down-the-stack/dk_pac/src/power/intenset.rs | 269 -- down-the-stack/dk_pac/src/power/pofcon.rs | 320 --- down-the-stack/dk_pac/src/power/ram.rs | 22 - down-the-stack/dk_pac/src/power/ram/power.rs | 309 --- .../dk_pac/src/power/ram/powerclr.rs | 154 -- .../dk_pac/src/power/ram/powerset.rs | 154 -- down-the-stack/dk_pac/src/power/ramon.rs | 309 --- down-the-stack/dk_pac/src/power/ramonb.rs | 309 --- down-the-stack/dk_pac/src/power/ramstatus.rs | 194 -- down-the-stack/dk_pac/src/power/resetreas.rs | 553 ---- down-the-stack/dk_pac/src/power/systemoff.rs | 71 - .../dk_pac/src/power/tasks_constlat.rs | 72 - .../dk_pac/src/power/tasks_lowpwr.rs | 72 - down-the-stack/dk_pac/src/ppi.rs | 53 - down-the-stack/dk_pac/src/ppi/ch.rs | 16 - down-the-stack/dk_pac/src/ppi/ch/eep.rs | 80 - down-the-stack/dk_pac/src/ppi/ch/tep.rs | 80 - down-the-stack/dk_pac/src/ppi/chen.rs | 2017 -------------- down-the-stack/dk_pac/src/ppi/chenclr.rs | 2241 --------------- down-the-stack/dk_pac/src/ppi/chenset.rs | 2241 --------------- down-the-stack/dk_pac/src/ppi/chg.rs | 2018 -------------- down-the-stack/dk_pac/src/ppi/fork.rs | 10 - down-the-stack/dk_pac/src/ppi/fork/tep.rs | 80 - down-the-stack/dk_pac/src/ppi/tasks_chg.rs | 16 - .../dk_pac/src/ppi/tasks_chg/dis.rs | 71 - down-the-stack/dk_pac/src/ppi/tasks_chg/en.rs | 71 - down-the-stack/dk_pac/src/pwm0.rs | 136 - down-the-stack/dk_pac/src/pwm0/countertop.rs | 81 - down-the-stack/dk_pac/src/pwm0/decoder.rs | 215 -- down-the-stack/dk_pac/src/pwm0/enable.rs | 126 - .../dk_pac/src/pwm0/events_loopsdone.rs | 127 - .../dk_pac/src/pwm0/events_pwmperiodend.rs | 127 - .../dk_pac/src/pwm0/events_seqend.rs | 128 - .../dk_pac/src/pwm0/events_seqstarted.rs | 128 - .../dk_pac/src/pwm0/events_stopped.rs | 127 - down-the-stack/dk_pac/src/pwm0/inten.rs | 492 ---- down-the-stack/dk_pac/src/pwm0/intenclr.rs | 544 ---- down-the-stack/dk_pac/src/pwm0/intenset.rs | 544 ---- down-the-stack/dk_pac/src/pwm0/loop_.rs | 115 - down-the-stack/dk_pac/src/pwm0/mode.rs | 126 - down-the-stack/dk_pac/src/pwm0/prescaler.rs | 207 -- down-the-stack/dk_pac/src/pwm0/psel.rs | 10 - down-the-stack/dk_pac/src/pwm0/psel/out.rs | 142 - down-the-stack/dk_pac/src/pwm0/seq.rs | 28 - down-the-stack/dk_pac/src/pwm0/seq/cnt.rs | 115 - .../dk_pac/src/pwm0/seq/enddelay.rs | 80 - down-the-stack/dk_pac/src/pwm0/seq/ptr.rs | 80 - down-the-stack/dk_pac/src/pwm0/seq/refresh.rs | 115 - down-the-stack/dk_pac/src/pwm0/shorts.rs | 385 --- .../dk_pac/src/pwm0/tasks_nextstep.rs | 72 - .../dk_pac/src/pwm0/tasks_seqstart.rs | 73 - down-the-stack/dk_pac/src/pwm0/tasks_stop.rs | 72 - down-the-stack/dk_pac/src/qdec.rs | 160 -- down-the-stack/dk_pac/src/qdec/acc.rs | 37 - down-the-stack/dk_pac/src/qdec/accdbl.rs | 37 - down-the-stack/dk_pac/src/qdec/accdblread.rs | 37 - down-the-stack/dk_pac/src/qdec/accread.rs | 37 - down-the-stack/dk_pac/src/qdec/dbfen.rs | 126 - down-the-stack/dk_pac/src/qdec/enable.rs | 126 - .../dk_pac/src/qdec/events_accof.rs | 127 - .../dk_pac/src/qdec/events_dblrdy.rs | 127 - .../dk_pac/src/qdec/events_reportrdy.rs | 127 - .../dk_pac/src/qdec/events_samplerdy.rs | 127 - .../dk_pac/src/qdec/events_stopped.rs | 127 - down-the-stack/dk_pac/src/qdec/intenclr.rs | 405 --- down-the-stack/dk_pac/src/qdec/intenset.rs | 405 --- down-the-stack/dk_pac/src/qdec/ledpol.rs | 126 - down-the-stack/dk_pac/src/qdec/ledpre.rs | 80 - down-the-stack/dk_pac/src/qdec/psel.rs | 22 - down-the-stack/dk_pac/src/qdec/psel/a.rs | 141 - down-the-stack/dk_pac/src/qdec/psel/b.rs | 141 - down-the-stack/dk_pac/src/qdec/psel/led.rs | 141 - down-the-stack/dk_pac/src/qdec/reportper.rs | 220 -- down-the-stack/dk_pac/src/qdec/sample.rs | 37 - down-the-stack/dk_pac/src/qdec/sampleper.rs | 246 -- down-the-stack/dk_pac/src/qdec/shorts.rs | 498 ---- .../dk_pac/src/qdec/tasks_rdclracc.rs | 72 - .../dk_pac/src/qdec/tasks_rdclrdbl.rs | 72 - .../dk_pac/src/qdec/tasks_readclracc.rs | 72 - down-the-stack/dk_pac/src/qdec/tasks_start.rs | 72 - down-the-stack/dk_pac/src/qdec/tasks_stop.rs | 72 - down-the-stack/dk_pac/src/radio.rs | 330 --- down-the-stack/dk_pac/src/radio/base0.rs | 80 - down-the-stack/dk_pac/src/radio/base1.rs | 80 - down-the-stack/dk_pac/src/radio/bcc.rs | 80 - down-the-stack/dk_pac/src/radio/crccnf.rs | 215 -- down-the-stack/dk_pac/src/radio/crcinit.rs | 80 - down-the-stack/dk_pac/src/radio/crcpoly.rs | 80 - down-the-stack/dk_pac/src/radio/crcstatus.rs | 71 - down-the-stack/dk_pac/src/radio/dab.rs | 81 - down-the-stack/dk_pac/src/radio/dacnf.rs | 673 ----- down-the-stack/dk_pac/src/radio/dai.rs | 37 - down-the-stack/dk_pac/src/radio/dap.rs | 81 - .../dk_pac/src/radio/datawhiteiv.rs | 81 - .../dk_pac/src/radio/events_address.rs | 127 - .../dk_pac/src/radio/events_bcmatch.rs | 127 - .../dk_pac/src/radio/events_crcerror.rs | 127 - .../dk_pac/src/radio/events_crcok.rs | 127 - .../dk_pac/src/radio/events_devmatch.rs | 127 - .../dk_pac/src/radio/events_devmiss.rs | 127 - .../dk_pac/src/radio/events_disabled.rs | 127 - down-the-stack/dk_pac/src/radio/events_end.rs | 127 - .../dk_pac/src/radio/events_payload.rs | 127 - .../dk_pac/src/radio/events_ready.rs | 127 - .../dk_pac/src/radio/events_rssiend.rs | 127 - down-the-stack/dk_pac/src/radio/frequency.rs | 141 - down-the-stack/dk_pac/src/radio/intenclr.rs | 813 ------ down-the-stack/dk_pac/src/radio/intenset.rs | 813 ------ down-the-stack/dk_pac/src/radio/mode.rs | 167 -- down-the-stack/dk_pac/src/radio/modecnf0.rs | 202 -- down-the-stack/dk_pac/src/radio/packetptr.rs | 81 - down-the-stack/dk_pac/src/radio/pcnf0.rs | 232 -- down-the-stack/dk_pac/src/radio/pcnf1.rs | 232 -- down-the-stack/dk_pac/src/radio/power.rs | 126 - down-the-stack/dk_pac/src/radio/prefix0.rs | 125 - down-the-stack/dk_pac/src/radio/prefix1.rs | 125 - down-the-stack/dk_pac/src/radio/rssisample.rs | 37 - .../dk_pac/src/radio/rxaddresses.rs | 553 ---- down-the-stack/dk_pac/src/radio/rxcrc.rs | 37 - down-the-stack/dk_pac/src/radio/rxmatch.rs | 37 - down-the-stack/dk_pac/src/radio/shorts.rs | 558 ---- down-the-stack/dk_pac/src/radio/state.rs | 129 - .../dk_pac/src/radio/tasks_bcstart.rs | 72 - .../dk_pac/src/radio/tasks_bcstop.rs | 72 - .../dk_pac/src/radio/tasks_disable.rs | 72 - .../dk_pac/src/radio/tasks_rssistart.rs | 72 - .../dk_pac/src/radio/tasks_rssistop.rs | 72 - down-the-stack/dk_pac/src/radio/tasks_rxen.rs | 72 - .../dk_pac/src/radio/tasks_start.rs | 72 - down-the-stack/dk_pac/src/radio/tasks_stop.rs | 72 - down-the-stack/dk_pac/src/radio/tasks_txen.rs | 72 - down-the-stack/dk_pac/src/radio/tifs.rs | 80 - down-the-stack/dk_pac/src/radio/txaddress.rs | 80 - down-the-stack/dk_pac/src/radio/txpower.rs | 233 -- down-the-stack/dk_pac/src/rng.rs | 56 - down-the-stack/dk_pac/src/rng/config.rs | 126 - .../dk_pac/src/rng/events_valrdy.rs | 127 - down-the-stack/dk_pac/src/rng/intenclr.rs | 133 - down-the-stack/dk_pac/src/rng/intenset.rs | 133 - down-the-stack/dk_pac/src/rng/shorts.rs | 126 - down-the-stack/dk_pac/src/rng/tasks_start.rs | 72 - down-the-stack/dk_pac/src/rng/tasks_stop.rs | 72 - down-the-stack/dk_pac/src/rng/value.rs | 37 - down-the-stack/dk_pac/src/rtc0.rs | 102 - down-the-stack/dk_pac/src/rtc0/cc.rs | 81 - down-the-stack/dk_pac/src/rtc0/counter.rs | 37 - .../dk_pac/src/rtc0/events_compare.rs | 134 - .../dk_pac/src/rtc0/events_ovrflw.rs | 127 - down-the-stack/dk_pac/src/rtc0/events_tick.rs | 127 - down-the-stack/dk_pac/src/rtc0/evten.rs | 431 --- down-the-stack/dk_pac/src/rtc0/evtenclr.rs | 473 ---- down-the-stack/dk_pac/src/rtc0/evtenset.rs | 473 ---- down-the-stack/dk_pac/src/rtc0/intenclr.rs | 473 ---- down-the-stack/dk_pac/src/rtc0/intenset.rs | 473 ---- down-the-stack/dk_pac/src/rtc0/prescaler.rs | 81 - down-the-stack/dk_pac/src/rtc0/tasks_clear.rs | 72 - down-the-stack/dk_pac/src/rtc0/tasks_start.rs | 72 - down-the-stack/dk_pac/src/rtc0/tasks_stop.rs | 72 - .../dk_pac/src/rtc0/tasks_trigovrflw.rs | 72 - down-the-stack/dk_pac/src/saadc.rs | 140 - down-the-stack/dk_pac/src/saadc/ch.rs | 28 - down-the-stack/dk_pac/src/saadc/ch/config.rs | 682 ----- down-the-stack/dk_pac/src/saadc/ch/limit.rs | 95 - down-the-stack/dk_pac/src/saadc/ch/pseln.rs | 232 -- down-the-stack/dk_pac/src/saadc/ch/pselp.rs | 232 -- down-the-stack/dk_pac/src/saadc/enable.rs | 126 - .../dk_pac/src/saadc/events_calibratedone.rs | 127 - down-the-stack/dk_pac/src/saadc/events_ch.rs | 16 - .../dk_pac/src/saadc/events_ch/limith.rs | 126 - .../dk_pac/src/saadc/events_ch/limitl.rs | 126 - .../dk_pac/src/saadc/events_done.rs | 127 - down-the-stack/dk_pac/src/saadc/events_end.rs | 127 - .../dk_pac/src/saadc/events_resultdone.rs | 127 - .../dk_pac/src/saadc/events_started.rs | 127 - .../dk_pac/src/saadc/events_stopped.rs | 127 - down-the-stack/dk_pac/src/saadc/inten.rs | 1408 ---------- down-the-stack/dk_pac/src/saadc/intenclr.rs | 1562 ----------- down-the-stack/dk_pac/src/saadc/intenset.rs | 1562 ----------- down-the-stack/dk_pac/src/saadc/oversample.rs | 220 -- down-the-stack/dk_pac/src/saadc/resolution.rs | 154 -- down-the-stack/dk_pac/src/saadc/result.rs | 22 - .../dk_pac/src/saadc/result/amount.rs | 37 - .../dk_pac/src/saadc/result/maxcnt.rs | 80 - down-the-stack/dk_pac/src/saadc/result/ptr.rs | 80 - down-the-stack/dk_pac/src/saadc/samplerate.rs | 141 - down-the-stack/dk_pac/src/saadc/status.rs | 71 - .../dk_pac/src/saadc/tasks_calibrateoffset.rs | 72 - .../dk_pac/src/saadc/tasks_sample.rs | 72 - .../dk_pac/src/saadc/tasks_start.rs | 72 - down-the-stack/dk_pac/src/saadc/tasks_stop.rs | 72 - down-the-stack/dk_pac/src/spi0.rs | 66 - down-the-stack/dk_pac/src/spi0/config.rs | 248 -- down-the-stack/dk_pac/src/spi0/enable.rs | 128 - .../dk_pac/src/spi0/events_ready.rs | 127 - down-the-stack/dk_pac/src/spi0/frequency.rs | 194 -- down-the-stack/dk_pac/src/spi0/intenclr.rs | 133 - down-the-stack/dk_pac/src/spi0/intenset.rs | 133 - down-the-stack/dk_pac/src/spi0/psel.rs | 22 - down-the-stack/dk_pac/src/spi0/psel/miso.rs | 116 - down-the-stack/dk_pac/src/spi0/psel/mosi.rs | 116 - down-the-stack/dk_pac/src/spi0/psel/sck.rs | 115 - down-the-stack/dk_pac/src/spi0/rxd.rs | 37 - down-the-stack/dk_pac/src/spi0/txd.rs | 80 - down-the-stack/dk_pac/src/spim0.rs | 135 - down-the-stack/dk_pac/src/spim0/config.rs | 248 -- down-the-stack/dk_pac/src/spim0/enable.rs | 128 - down-the-stack/dk_pac/src/spim0/events_end.rs | 127 - .../dk_pac/src/spim0/events_endrx.rs | 127 - .../dk_pac/src/spim0/events_endtx.rs | 127 - .../dk_pac/src/spim0/events_started.rs | 127 - .../dk_pac/src/spim0/events_stopped.rs | 127 - down-the-stack/dk_pac/src/spim0/frequency.rs | 194 -- down-the-stack/dk_pac/src/spim0/intenclr.rs | 405 --- down-the-stack/dk_pac/src/spim0/intenset.rs | 405 --- down-the-stack/dk_pac/src/spim0/orc.rs | 80 - down-the-stack/dk_pac/src/spim0/psel.rs | 22 - down-the-stack/dk_pac/src/spim0/psel/miso.rs | 141 - down-the-stack/dk_pac/src/spim0/psel/mosi.rs | 141 - down-the-stack/dk_pac/src/spim0/psel/sck.rs | 141 - down-the-stack/dk_pac/src/spim0/rxd.rs | 28 - down-the-stack/dk_pac/src/spim0/rxd/amount.rs | 37 - down-the-stack/dk_pac/src/spim0/rxd/list.rs | 128 - down-the-stack/dk_pac/src/spim0/rxd/maxcnt.rs | 80 - down-the-stack/dk_pac/src/spim0/rxd/ptr.rs | 80 - down-the-stack/dk_pac/src/spim0/shorts.rs | 126 - .../dk_pac/src/spim0/tasks_resume.rs | 72 - .../dk_pac/src/spim0/tasks_start.rs | 72 - down-the-stack/dk_pac/src/spim0/tasks_stop.rs | 72 - .../dk_pac/src/spim0/tasks_suspend.rs | 72 - down-the-stack/dk_pac/src/spim0/txd.rs | 28 - down-the-stack/dk_pac/src/spim0/txd/amount.rs | 37 - down-the-stack/dk_pac/src/spim0/txd/list.rs | 128 - down-the-stack/dk_pac/src/spim0/txd/maxcnt.rs | 80 - down-the-stack/dk_pac/src/spim0/txd/ptr.rs | 80 - down-the-stack/dk_pac/src/spis0.rs | 124 - down-the-stack/dk_pac/src/spis0/config.rs | 248 -- down-the-stack/dk_pac/src/spis0/def.rs | 80 - down-the-stack/dk_pac/src/spis0/enable.rs | 128 - .../dk_pac/src/spis0/events_acquired.rs | 127 - down-the-stack/dk_pac/src/spis0/events_end.rs | 127 - .../dk_pac/src/spis0/events_endrx.rs | 127 - down-the-stack/dk_pac/src/spis0/intenclr.rs | 269 -- down-the-stack/dk_pac/src/spis0/intenset.rs | 269 -- down-the-stack/dk_pac/src/spis0/orc.rs | 80 - down-the-stack/dk_pac/src/spis0/psel.rs | 28 - down-the-stack/dk_pac/src/spis0/psel/csn.rs | 141 - down-the-stack/dk_pac/src/spis0/psel/miso.rs | 141 - down-the-stack/dk_pac/src/spis0/psel/mosi.rs | 141 - down-the-stack/dk_pac/src/spis0/psel/sck.rs | 141 - down-the-stack/dk_pac/src/spis0/rxd.rs | 22 - down-the-stack/dk_pac/src/spis0/rxd/amount.rs | 37 - down-the-stack/dk_pac/src/spis0/rxd/maxcnt.rs | 80 - down-the-stack/dk_pac/src/spis0/rxd/ptr.rs | 80 - down-the-stack/dk_pac/src/spis0/semstat.rs | 89 - down-the-stack/dk_pac/src/spis0/shorts.rs | 126 - down-the-stack/dk_pac/src/spis0/status.rs | 201 -- .../dk_pac/src/spis0/tasks_acquire.rs | 72 - .../dk_pac/src/spis0/tasks_release.rs | 72 - down-the-stack/dk_pac/src/spis0/txd.rs | 22 - down-the-stack/dk_pac/src/spis0/txd/amount.rs | 37 - down-the-stack/dk_pac/src/spis0/txd/maxcnt.rs | 80 - down-the-stack/dk_pac/src/spis0/txd/ptr.rs | 80 - down-the-stack/dk_pac/src/swi0.rs | 10 - down-the-stack/dk_pac/src/swi0/unused.rs | 28 - down-the-stack/dk_pac/src/temp.rs | 148 - down-the-stack/dk_pac/src/temp/a0.rs | 80 - down-the-stack/dk_pac/src/temp/a1.rs | 80 - down-the-stack/dk_pac/src/temp/a2.rs | 80 - down-the-stack/dk_pac/src/temp/a3.rs | 80 - down-the-stack/dk_pac/src/temp/a4.rs | 80 - down-the-stack/dk_pac/src/temp/a5.rs | 80 - down-the-stack/dk_pac/src/temp/b0.rs | 80 - down-the-stack/dk_pac/src/temp/b1.rs | 80 - down-the-stack/dk_pac/src/temp/b2.rs | 80 - down-the-stack/dk_pac/src/temp/b3.rs | 80 - down-the-stack/dk_pac/src/temp/b4.rs | 80 - down-the-stack/dk_pac/src/temp/b5.rs | 80 - .../dk_pac/src/temp/events_datardy.rs | 127 - down-the-stack/dk_pac/src/temp/intenclr.rs | 133 - down-the-stack/dk_pac/src/temp/intenset.rs | 133 - down-the-stack/dk_pac/src/temp/t0.rs | 80 - down-the-stack/dk_pac/src/temp/t1.rs | 80 - down-the-stack/dk_pac/src/temp/t2.rs | 80 - down-the-stack/dk_pac/src/temp/t3.rs | 80 - down-the-stack/dk_pac/src/temp/t4.rs | 80 - down-the-stack/dk_pac/src/temp/tasks_start.rs | 72 - down-the-stack/dk_pac/src/temp/tasks_stop.rs | 72 - down-the-stack/dk_pac/src/temp/temp.rs | 37 - down-the-stack/dk_pac/src/timer0.rs | 99 - down-the-stack/dk_pac/src/timer0/bitmode.rs | 155 -- down-the-stack/dk_pac/src/timer0/cc.rs | 81 - .../dk_pac/src/timer0/events_compare.rs | 134 - down-the-stack/dk_pac/src/timer0/intenclr.rs | 473 ---- down-the-stack/dk_pac/src/timer0/intenset.rs | 473 ---- down-the-stack/dk_pac/src/timer0/mode.rs | 141 - down-the-stack/dk_pac/src/timer0/prescaler.rs | 80 - down-the-stack/dk_pac/src/timer0/shorts.rs | 869 ------ .../dk_pac/src/timer0/tasks_capture.rs | 77 - .../dk_pac/src/timer0/tasks_clear.rs | 72 - .../dk_pac/src/timer0/tasks_count.rs | 72 - .../dk_pac/src/timer0/tasks_shutdown.rs | 72 - .../dk_pac/src/timer0/tasks_start.rs | 72 - .../dk_pac/src/timer0/tasks_stop.rs | 72 - down-the-stack/dk_pac/src/twi0.rs | 152 -- down-the-stack/dk_pac/src/twi0/address.rs | 80 - down-the-stack/dk_pac/src/twi0/enable.rs | 128 - down-the-stack/dk_pac/src/twi0/errorsrc.rs | 269 -- down-the-stack/dk_pac/src/twi0/events_bb.rs | 126 - .../dk_pac/src/twi0/events_error.rs | 127 - .../dk_pac/src/twi0/events_rxdready.rs | 127 - .../dk_pac/src/twi0/events_stopped.rs | 127 - .../dk_pac/src/twi0/events_suspended.rs | 127 - .../dk_pac/src/twi0/events_txdsent.rs | 127 - down-the-stack/dk_pac/src/twi0/frequency.rs | 142 - down-the-stack/dk_pac/src/twi0/intenclr.rs | 473 ---- down-the-stack/dk_pac/src/twi0/intenset.rs | 473 ---- down-the-stack/dk_pac/src/twi0/pselscl.rs | 116 - down-the-stack/dk_pac/src/twi0/pselsda.rs | 116 - down-the-stack/dk_pac/src/twi0/rxd.rs | 37 - down-the-stack/dk_pac/src/twi0/shorts.rs | 187 -- .../dk_pac/src/twi0/tasks_resume.rs | 72 - .../dk_pac/src/twi0/tasks_startrx.rs | 72 - .../dk_pac/src/twi0/tasks_starttx.rs | 72 - down-the-stack/dk_pac/src/twi0/tasks_stop.rs | 72 - .../dk_pac/src/twi0/tasks_suspend.rs | 72 - down-the-stack/dk_pac/src/twi0/txd.rs | 80 - down-the-stack/dk_pac/src/twim0.rs | 160 -- down-the-stack/dk_pac/src/twim0/address.rs | 80 - down-the-stack/dk_pac/src/twim0/enable.rs | 128 - down-the-stack/dk_pac/src/twim0/errorsrc.rs | 248 -- .../dk_pac/src/twim0/events_error.rs | 127 - .../dk_pac/src/twim0/events_lastrx.rs | 127 - .../dk_pac/src/twim0/events_lasttx.rs | 127 - .../dk_pac/src/twim0/events_rxstarted.rs | 127 - .../dk_pac/src/twim0/events_stopped.rs | 127 - .../dk_pac/src/twim0/events_suspended.rs | 127 - .../dk_pac/src/twim0/events_txstarted.rs | 127 - down-the-stack/dk_pac/src/twim0/frequency.rs | 142 - down-the-stack/dk_pac/src/twim0/inten.rs | 492 ---- down-the-stack/dk_pac/src/twim0/intenclr.rs | 541 ---- down-the-stack/dk_pac/src/twim0/intenset.rs | 541 ---- down-the-stack/dk_pac/src/twim0/psel.rs | 16 - down-the-stack/dk_pac/src/twim0/psel/scl.rs | 141 - down-the-stack/dk_pac/src/twim0/psel/sda.rs | 141 - down-the-stack/dk_pac/src/twim0/rxd.rs | 28 - down-the-stack/dk_pac/src/twim0/rxd/amount.rs | 37 - down-the-stack/dk_pac/src/twim0/rxd/list.rs | 128 - down-the-stack/dk_pac/src/twim0/rxd/maxcnt.rs | 80 - down-the-stack/dk_pac/src/twim0/rxd/ptr.rs | 80 - down-the-stack/dk_pac/src/twim0/shorts.rs | 373 --- .../dk_pac/src/twim0/tasks_resume.rs | 72 - .../dk_pac/src/twim0/tasks_startrx.rs | 72 - .../dk_pac/src/twim0/tasks_starttx.rs | 72 - down-the-stack/dk_pac/src/twim0/tasks_stop.rs | 72 - .../dk_pac/src/twim0/tasks_suspend.rs | 72 - down-the-stack/dk_pac/src/twim0/txd.rs | 28 - down-the-stack/dk_pac/src/twim0/txd/amount.rs | 37 - down-the-stack/dk_pac/src/twim0/txd/list.rs | 128 - down-the-stack/dk_pac/src/twim0/txd/maxcnt.rs | 80 - down-the-stack/dk_pac/src/twim0/txd/ptr.rs | 80 - down-the-stack/dk_pac/src/twis0.rs | 168 -- down-the-stack/dk_pac/src/twis0/address.rs | 81 - down-the-stack/dk_pac/src/twis0/config.rs | 187 -- down-the-stack/dk_pac/src/twis0/enable.rs | 128 - down-the-stack/dk_pac/src/twis0/errorsrc.rs | 248 -- .../dk_pac/src/twis0/events_error.rs | 127 - .../dk_pac/src/twis0/events_read.rs | 127 - .../dk_pac/src/twis0/events_rxstarted.rs | 127 - .../dk_pac/src/twis0/events_stopped.rs | 127 - .../dk_pac/src/twis0/events_txstarted.rs | 127 - .../dk_pac/src/twis0/events_write.rs | 127 - down-the-stack/dk_pac/src/twis0/inten.rs | 431 --- down-the-stack/dk_pac/src/twis0/intenclr.rs | 473 ---- down-the-stack/dk_pac/src/twis0/intenset.rs | 473 ---- down-the-stack/dk_pac/src/twis0/match_.rs | 37 - down-the-stack/dk_pac/src/twis0/orc.rs | 80 - down-the-stack/dk_pac/src/twis0/psel.rs | 16 - down-the-stack/dk_pac/src/twis0/psel/scl.rs | 141 - down-the-stack/dk_pac/src/twis0/psel/sda.rs | 141 - down-the-stack/dk_pac/src/twis0/rxd.rs | 22 - down-the-stack/dk_pac/src/twis0/rxd/amount.rs | 37 - down-the-stack/dk_pac/src/twis0/rxd/maxcnt.rs | 80 - down-the-stack/dk_pac/src/twis0/rxd/ptr.rs | 80 - down-the-stack/dk_pac/src/twis0/shorts.rs | 189 -- .../dk_pac/src/twis0/tasks_preparerx.rs | 72 - .../dk_pac/src/twis0/tasks_preparetx.rs | 72 - .../dk_pac/src/twis0/tasks_resume.rs | 72 - down-the-stack/dk_pac/src/twis0/tasks_stop.rs | 72 - .../dk_pac/src/twis0/tasks_suspend.rs | 72 - down-the-stack/dk_pac/src/twis0/txd.rs | 22 - down-the-stack/dk_pac/src/twis0/txd/amount.rs | 37 - down-the-stack/dk_pac/src/twis0/txd/maxcnt.rs | 80 - down-the-stack/dk_pac/src/twis0/txd/ptr.rs | 80 - down-the-stack/dk_pac/src/uart0.rs | 160 -- down-the-stack/dk_pac/src/uart0/baudrate.rs | 337 --- down-the-stack/dk_pac/src/uart0/config.rs | 189 -- down-the-stack/dk_pac/src/uart0/enable.rs | 128 - down-the-stack/dk_pac/src/uart0/errorsrc.rs | 309 --- down-the-stack/dk_pac/src/uart0/events_cts.rs | 127 - .../dk_pac/src/uart0/events_error.rs | 127 - .../dk_pac/src/uart0/events_ncts.rs | 127 - .../dk_pac/src/uart0/events_rxdrdy.rs | 127 - .../dk_pac/src/uart0/events_rxto.rs | 127 - .../dk_pac/src/uart0/events_txdrdy.rs | 127 - down-the-stack/dk_pac/src/uart0/intenclr.rs | 473 ---- down-the-stack/dk_pac/src/uart0/intenset.rs | 473 ---- down-the-stack/dk_pac/src/uart0/pselcts.rs | 116 - down-the-stack/dk_pac/src/uart0/pselrts.rs | 116 - down-the-stack/dk_pac/src/uart0/pselrxd.rs | 116 - down-the-stack/dk_pac/src/uart0/pseltxd.rs | 116 - down-the-stack/dk_pac/src/uart0/rxd.rs | 37 - down-the-stack/dk_pac/src/uart0/shorts.rs | 187 -- .../dk_pac/src/uart0/tasks_startrx.rs | 72 - .../dk_pac/src/uart0/tasks_starttx.rs | 72 - .../dk_pac/src/uart0/tasks_stoprx.rs | 72 - .../dk_pac/src/uart0/tasks_stoptx.rs | 72 - .../dk_pac/src/uart0/tasks_suspend.rs | 72 - down-the-stack/dk_pac/src/uart0/txd.rs | 52 - down-the-stack/dk_pac/src/uarte0.rs | 185 -- down-the-stack/dk_pac/src/uarte0/baudrate.rs | 337 --- down-the-stack/dk_pac/src/uarte0/config.rs | 189 -- down-the-stack/dk_pac/src/uarte0/enable.rs | 128 - down-the-stack/dk_pac/src/uarte0/errorsrc.rs | 309 --- .../dk_pac/src/uarte0/events_cts.rs | 127 - .../dk_pac/src/uarte0/events_endrx.rs | 127 - .../dk_pac/src/uarte0/events_endtx.rs | 127 - .../dk_pac/src/uarte0/events_error.rs | 127 - .../dk_pac/src/uarte0/events_ncts.rs | 127 - .../dk_pac/src/uarte0/events_rxdrdy.rs | 127 - .../dk_pac/src/uarte0/events_rxstarted.rs | 127 - .../dk_pac/src/uarte0/events_rxto.rs | 127 - .../dk_pac/src/uarte0/events_txdrdy.rs | 127 - .../dk_pac/src/uarte0/events_txstarted.rs | 127 - .../dk_pac/src/uarte0/events_txstopped.rs | 127 - down-the-stack/dk_pac/src/uarte0/inten.rs | 736 ----- down-the-stack/dk_pac/src/uarte0/intenclr.rs | 813 ------ down-the-stack/dk_pac/src/uarte0/intenset.rs | 813 ------ down-the-stack/dk_pac/src/uarte0/psel.rs | 28 - down-the-stack/dk_pac/src/uarte0/psel/cts.rs | 141 - down-the-stack/dk_pac/src/uarte0/psel/rts.rs | 141 - down-the-stack/dk_pac/src/uarte0/psel/rxd.rs | 141 - down-the-stack/dk_pac/src/uarte0/psel/txd.rs | 141 - down-the-stack/dk_pac/src/uarte0/rxd.rs | 22 - .../dk_pac/src/uarte0/rxd/amount.rs | 37 - .../dk_pac/src/uarte0/rxd/maxcnt.rs | 80 - down-the-stack/dk_pac/src/uarte0/rxd/ptr.rs | 80 - down-the-stack/dk_pac/src/uarte0/shorts.rs | 189 -- .../dk_pac/src/uarte0/tasks_flushrx.rs | 72 - .../dk_pac/src/uarte0/tasks_startrx.rs | 72 - .../dk_pac/src/uarte0/tasks_starttx.rs | 72 - .../dk_pac/src/uarte0/tasks_stoprx.rs | 72 - .../dk_pac/src/uarte0/tasks_stoptx.rs | 72 - down-the-stack/dk_pac/src/uarte0/txd.rs | 22 - .../dk_pac/src/uarte0/txd/amount.rs | 37 - .../dk_pac/src/uarte0/txd/maxcnt.rs | 80 - down-the-stack/dk_pac/src/uarte0/txd/ptr.rs | 80 - down-the-stack/dk_pac/src/uicr.rs | 42 - down-the-stack/dk_pac/src/uicr/approtect.rs | 141 - down-the-stack/dk_pac/src/uicr/customer.rs | 81 - down-the-stack/dk_pac/src/uicr/nfcpins.rs | 126 - down-the-stack/dk_pac/src/uicr/nrffw.rs | 81 - down-the-stack/dk_pac/src/uicr/nrfhw.rs | 81 - down-the-stack/dk_pac/src/uicr/pselreset.rs | 142 - down-the-stack/dk_pac/src/wdt.rs | 69 - down-the-stack/dk_pac/src/wdt/config.rs | 187 -- down-the-stack/dk_pac/src/wdt/crv.rs | 80 - .../dk_pac/src/wdt/events_timeout.rs | 127 - down-the-stack/dk_pac/src/wdt/intenclr.rs | 133 - down-the-stack/dk_pac/src/wdt/intenset.rs | 133 - down-the-stack/dk_pac/src/wdt/reqstatus.rs | 398 --- down-the-stack/dk_pac/src/wdt/rr.rs | 73 - down-the-stack/dk_pac/src/wdt/rren.rs | 625 ----- down-the-stack/dk_pac/src/wdt/runstatus.rs | 71 - down-the-stack/dk_pac/src/wdt/tasks_start.rs | 72 - embedded-workshop-book/src/enabling-uarte.md | 2 +- 798 files changed, 1 insertion(+), 163489 deletions(-) delete mode 100644 down-the-stack/dk_pac/build.rs delete mode 100644 down-the-stack/dk_pac/device.x delete mode 100644 down-the-stack/dk_pac/src/aar.rs delete mode 100644 down-the-stack/dk_pac/src/aar/addrptr.rs delete mode 100644 down-the-stack/dk_pac/src/aar/enable.rs delete mode 100644 down-the-stack/dk_pac/src/aar/events_end.rs delete mode 100644 down-the-stack/dk_pac/src/aar/events_notresolved.rs delete mode 100644 down-the-stack/dk_pac/src/aar/events_resolved.rs delete mode 100644 down-the-stack/dk_pac/src/aar/intenclr.rs delete mode 100644 down-the-stack/dk_pac/src/aar/intenset.rs delete mode 100644 down-the-stack/dk_pac/src/aar/irkptr.rs delete mode 100644 down-the-stack/dk_pac/src/aar/nirk.rs delete mode 100644 down-the-stack/dk_pac/src/aar/scratchptr.rs delete mode 100644 down-the-stack/dk_pac/src/aar/status.rs delete mode 100644 down-the-stack/dk_pac/src/aar/tasks_start.rs delete mode 100644 down-the-stack/dk_pac/src/aar/tasks_stop.rs delete mode 100644 down-the-stack/dk_pac/src/approtect.rs delete mode 100644 down-the-stack/dk_pac/src/approtect/disable.rs delete mode 100644 down-the-stack/dk_pac/src/approtect/forceprotect.rs delete mode 100644 down-the-stack/dk_pac/src/bprot.rs delete mode 100644 down-the-stack/dk_pac/src/bprot/config0.rs delete mode 100644 down-the-stack/dk_pac/src/bprot/config1.rs delete mode 100644 down-the-stack/dk_pac/src/bprot/config2.rs delete mode 100644 down-the-stack/dk_pac/src/bprot/config3.rs delete mode 100644 down-the-stack/dk_pac/src/bprot/disableindebug.rs delete mode 100644 down-the-stack/dk_pac/src/ccm.rs delete mode 100644 down-the-stack/dk_pac/src/ccm/cnfptr.rs delete mode 100644 down-the-stack/dk_pac/src/ccm/enable.rs delete mode 100644 down-the-stack/dk_pac/src/ccm/events_endcrypt.rs delete mode 100644 down-the-stack/dk_pac/src/ccm/events_endksgen.rs delete mode 100644 down-the-stack/dk_pac/src/ccm/events_error.rs delete mode 100644 down-the-stack/dk_pac/src/ccm/inptr.rs delete mode 100644 down-the-stack/dk_pac/src/ccm/intenclr.rs delete mode 100644 down-the-stack/dk_pac/src/ccm/intenset.rs delete mode 100644 down-the-stack/dk_pac/src/ccm/micstatus.rs delete mode 100644 down-the-stack/dk_pac/src/ccm/mode.rs delete mode 100644 down-the-stack/dk_pac/src/ccm/outptr.rs delete mode 100644 down-the-stack/dk_pac/src/ccm/scratchptr.rs delete mode 100644 down-the-stack/dk_pac/src/ccm/shorts.rs delete mode 100644 down-the-stack/dk_pac/src/ccm/tasks_crypt.rs delete mode 100644 down-the-stack/dk_pac/src/ccm/tasks_ksgen.rs delete mode 100644 down-the-stack/dk_pac/src/ccm/tasks_stop.rs delete mode 100644 down-the-stack/dk_pac/src/clock.rs delete mode 100644 down-the-stack/dk_pac/src/clock/ctiv.rs delete mode 100644 down-the-stack/dk_pac/src/clock/events_ctto.rs delete mode 100644 down-the-stack/dk_pac/src/clock/events_done.rs delete mode 100644 down-the-stack/dk_pac/src/clock/events_hfclkstarted.rs delete mode 100644 down-the-stack/dk_pac/src/clock/events_lfclkstarted.rs delete mode 100644 down-the-stack/dk_pac/src/clock/hfclkrun.rs delete mode 100644 down-the-stack/dk_pac/src/clock/hfclkstat.rs delete mode 100644 down-the-stack/dk_pac/src/clock/intenclr.rs delete mode 100644 down-the-stack/dk_pac/src/clock/intenset.rs delete mode 100644 down-the-stack/dk_pac/src/clock/lfclkrun.rs delete mode 100644 down-the-stack/dk_pac/src/clock/lfclksrc.rs delete mode 100644 down-the-stack/dk_pac/src/clock/lfclksrccopy.rs delete mode 100644 down-the-stack/dk_pac/src/clock/lfclkstat.rs delete mode 100644 down-the-stack/dk_pac/src/clock/tasks_cal.rs delete mode 100644 down-the-stack/dk_pac/src/clock/tasks_ctstart.rs delete mode 100644 down-the-stack/dk_pac/src/clock/tasks_ctstop.rs delete mode 100644 down-the-stack/dk_pac/src/clock/tasks_hfclkstart.rs delete mode 100644 down-the-stack/dk_pac/src/clock/tasks_hfclkstop.rs delete mode 100644 down-the-stack/dk_pac/src/clock/tasks_lfclkstart.rs delete mode 100644 down-the-stack/dk_pac/src/clock/tasks_lfclkstop.rs delete mode 100644 down-the-stack/dk_pac/src/clock/traceconfig.rs delete mode 100644 down-the-stack/dk_pac/src/comp.rs delete mode 100644 down-the-stack/dk_pac/src/comp/enable.rs delete mode 100644 down-the-stack/dk_pac/src/comp/events_cross.rs delete mode 100644 down-the-stack/dk_pac/src/comp/events_down.rs delete mode 100644 down-the-stack/dk_pac/src/comp/events_ready.rs delete mode 100644 down-the-stack/dk_pac/src/comp/events_up.rs delete mode 100644 down-the-stack/dk_pac/src/comp/extrefsel.rs delete mode 100644 down-the-stack/dk_pac/src/comp/hyst.rs delete mode 100644 down-the-stack/dk_pac/src/comp/inten.rs delete mode 100644 down-the-stack/dk_pac/src/comp/intenclr.rs delete mode 100644 down-the-stack/dk_pac/src/comp/intenset.rs delete mode 100644 down-the-stack/dk_pac/src/comp/isource.rs delete mode 100644 down-the-stack/dk_pac/src/comp/mode.rs delete mode 100644 down-the-stack/dk_pac/src/comp/psel.rs delete mode 100644 down-the-stack/dk_pac/src/comp/refsel.rs delete mode 100644 down-the-stack/dk_pac/src/comp/result.rs delete mode 100644 down-the-stack/dk_pac/src/comp/shorts.rs delete mode 100644 down-the-stack/dk_pac/src/comp/tasks_sample.rs delete mode 100644 down-the-stack/dk_pac/src/comp/tasks_start.rs delete mode 100644 down-the-stack/dk_pac/src/comp/tasks_stop.rs delete mode 100644 down-the-stack/dk_pac/src/comp/th.rs delete mode 100644 down-the-stack/dk_pac/src/ecb.rs delete mode 100644 down-the-stack/dk_pac/src/ecb/ecbdataptr.rs delete mode 100644 down-the-stack/dk_pac/src/ecb/events_endecb.rs delete mode 100644 down-the-stack/dk_pac/src/ecb/events_errorecb.rs delete mode 100644 down-the-stack/dk_pac/src/ecb/intenclr.rs delete mode 100644 down-the-stack/dk_pac/src/ecb/intenset.rs delete mode 100644 down-the-stack/dk_pac/src/ecb/tasks_startecb.rs delete mode 100644 down-the-stack/dk_pac/src/ecb/tasks_stopecb.rs delete mode 100644 down-the-stack/dk_pac/src/egu0.rs delete mode 100644 down-the-stack/dk_pac/src/egu0/events_triggered.rs delete mode 100644 down-the-stack/dk_pac/src/egu0/inten.rs delete mode 100644 down-the-stack/dk_pac/src/egu0/intenclr.rs delete mode 100644 down-the-stack/dk_pac/src/egu0/intenset.rs delete mode 100644 down-the-stack/dk_pac/src/egu0/tasks_trigger.rs delete mode 100644 down-the-stack/dk_pac/src/ficr.rs delete mode 100644 down-the-stack/dk_pac/src/ficr/codepagesize.rs delete mode 100644 down-the-stack/dk_pac/src/ficr/codesize.rs delete mode 100644 down-the-stack/dk_pac/src/ficr/deviceaddr.rs delete mode 100644 down-the-stack/dk_pac/src/ficr/deviceaddrtype.rs delete mode 100644 down-the-stack/dk_pac/src/ficr/deviceid.rs delete mode 100644 down-the-stack/dk_pac/src/ficr/er.rs delete mode 100644 down-the-stack/dk_pac/src/ficr/info.rs delete mode 100644 down-the-stack/dk_pac/src/ficr/info/flash.rs delete mode 100644 down-the-stack/dk_pac/src/ficr/info/package.rs delete mode 100644 down-the-stack/dk_pac/src/ficr/info/part.rs delete mode 100644 down-the-stack/dk_pac/src/ficr/info/ram.rs delete mode 100644 down-the-stack/dk_pac/src/ficr/info/variant.rs delete mode 100644 down-the-stack/dk_pac/src/ficr/ir.rs delete mode 100644 down-the-stack/dk_pac/src/ficr/nfc.rs delete mode 100644 down-the-stack/dk_pac/src/ficr/nfc/tagheader0.rs delete mode 100644 down-the-stack/dk_pac/src/ficr/nfc/tagheader1.rs delete mode 100644 down-the-stack/dk_pac/src/ficr/nfc/tagheader2.rs delete mode 100644 down-the-stack/dk_pac/src/ficr/nfc/tagheader3.rs delete mode 100644 down-the-stack/dk_pac/src/ficr/temp.rs delete mode 100644 down-the-stack/dk_pac/src/ficr/temp/a0.rs delete mode 100644 down-the-stack/dk_pac/src/ficr/temp/a1.rs delete mode 100644 down-the-stack/dk_pac/src/ficr/temp/a2.rs delete mode 100644 down-the-stack/dk_pac/src/ficr/temp/a3.rs delete mode 100644 down-the-stack/dk_pac/src/ficr/temp/a4.rs delete mode 100644 down-the-stack/dk_pac/src/ficr/temp/a5.rs delete mode 100644 down-the-stack/dk_pac/src/ficr/temp/b0.rs delete mode 100644 down-the-stack/dk_pac/src/ficr/temp/b1.rs delete mode 100644 down-the-stack/dk_pac/src/ficr/temp/b2.rs delete mode 100644 down-the-stack/dk_pac/src/ficr/temp/b3.rs delete mode 100644 down-the-stack/dk_pac/src/ficr/temp/b4.rs delete mode 100644 down-the-stack/dk_pac/src/ficr/temp/b5.rs delete mode 100644 down-the-stack/dk_pac/src/ficr/temp/t0.rs delete mode 100644 down-the-stack/dk_pac/src/ficr/temp/t1.rs delete mode 100644 down-the-stack/dk_pac/src/ficr/temp/t2.rs delete mode 100644 down-the-stack/dk_pac/src/ficr/temp/t3.rs delete mode 100644 down-the-stack/dk_pac/src/ficr/temp/t4.rs delete mode 100644 down-the-stack/dk_pac/src/generic.rs delete mode 100644 down-the-stack/dk_pac/src/gpiote.rs delete mode 100644 down-the-stack/dk_pac/src/gpiote/config.rs delete mode 100644 down-the-stack/dk_pac/src/gpiote/events_in.rs delete mode 100644 down-the-stack/dk_pac/src/gpiote/events_port.rs delete mode 100644 down-the-stack/dk_pac/src/gpiote/intenclr.rs delete mode 100644 down-the-stack/dk_pac/src/gpiote/intenset.rs delete mode 100644 down-the-stack/dk_pac/src/gpiote/tasks_clr.rs delete mode 100644 down-the-stack/dk_pac/src/gpiote/tasks_out.rs delete mode 100644 down-the-stack/dk_pac/src/gpiote/tasks_set.rs delete mode 100644 down-the-stack/dk_pac/src/i2s.rs delete mode 100644 down-the-stack/dk_pac/src/i2s/config.rs delete mode 100644 down-the-stack/dk_pac/src/i2s/config/align.rs delete mode 100644 down-the-stack/dk_pac/src/i2s/config/channels.rs delete mode 100644 down-the-stack/dk_pac/src/i2s/config/format.rs delete mode 100644 down-the-stack/dk_pac/src/i2s/config/mcken.rs delete mode 100644 down-the-stack/dk_pac/src/i2s/config/mckfreq.rs delete mode 100644 down-the-stack/dk_pac/src/i2s/config/mode.rs delete mode 100644 down-the-stack/dk_pac/src/i2s/config/ratio.rs delete mode 100644 down-the-stack/dk_pac/src/i2s/config/rxen.rs delete mode 100644 down-the-stack/dk_pac/src/i2s/config/swidth.rs delete mode 100644 down-the-stack/dk_pac/src/i2s/config/txen.rs delete mode 100644 down-the-stack/dk_pac/src/i2s/enable.rs delete mode 100644 down-the-stack/dk_pac/src/i2s/events_rxptrupd.rs delete mode 100644 down-the-stack/dk_pac/src/i2s/events_stopped.rs delete mode 100644 down-the-stack/dk_pac/src/i2s/events_txptrupd.rs delete mode 100644 down-the-stack/dk_pac/src/i2s/inten.rs delete mode 100644 down-the-stack/dk_pac/src/i2s/intenclr.rs delete mode 100644 down-the-stack/dk_pac/src/i2s/intenset.rs delete mode 100644 down-the-stack/dk_pac/src/i2s/psel.rs delete mode 100644 down-the-stack/dk_pac/src/i2s/psel/lrck.rs delete mode 100644 down-the-stack/dk_pac/src/i2s/psel/mck.rs delete mode 100644 down-the-stack/dk_pac/src/i2s/psel/sck.rs delete mode 100644 down-the-stack/dk_pac/src/i2s/psel/sdin.rs delete mode 100644 down-the-stack/dk_pac/src/i2s/psel/sdout.rs delete mode 100644 down-the-stack/dk_pac/src/i2s/rxd.rs delete mode 100644 down-the-stack/dk_pac/src/i2s/rxd/ptr.rs delete mode 100644 down-the-stack/dk_pac/src/i2s/rxtxd.rs delete mode 100644 down-the-stack/dk_pac/src/i2s/rxtxd/maxcnt.rs delete mode 100644 down-the-stack/dk_pac/src/i2s/tasks_start.rs delete mode 100644 down-the-stack/dk_pac/src/i2s/tasks_stop.rs delete mode 100644 down-the-stack/dk_pac/src/i2s/txd.rs delete mode 100644 down-the-stack/dk_pac/src/i2s/txd/ptr.rs delete mode 100644 down-the-stack/dk_pac/src/lib.rs delete mode 100644 down-the-stack/dk_pac/src/lpcomp.rs delete mode 100644 down-the-stack/dk_pac/src/lpcomp/anadetect.rs delete mode 100644 down-the-stack/dk_pac/src/lpcomp/enable.rs delete mode 100644 down-the-stack/dk_pac/src/lpcomp/events_cross.rs delete mode 100644 down-the-stack/dk_pac/src/lpcomp/events_down.rs delete mode 100644 down-the-stack/dk_pac/src/lpcomp/events_ready.rs delete mode 100644 down-the-stack/dk_pac/src/lpcomp/events_up.rs delete mode 100644 down-the-stack/dk_pac/src/lpcomp/extrefsel.rs delete mode 100644 down-the-stack/dk_pac/src/lpcomp/hyst.rs delete mode 100644 down-the-stack/dk_pac/src/lpcomp/intenclr.rs delete mode 100644 down-the-stack/dk_pac/src/lpcomp/intenset.rs delete mode 100644 down-the-stack/dk_pac/src/lpcomp/psel.rs delete mode 100644 down-the-stack/dk_pac/src/lpcomp/refsel.rs delete mode 100644 down-the-stack/dk_pac/src/lpcomp/result.rs delete mode 100644 down-the-stack/dk_pac/src/lpcomp/shorts.rs delete mode 100644 down-the-stack/dk_pac/src/lpcomp/tasks_sample.rs delete mode 100644 down-the-stack/dk_pac/src/lpcomp/tasks_start.rs delete mode 100644 down-the-stack/dk_pac/src/lpcomp/tasks_stop.rs delete mode 100644 down-the-stack/dk_pac/src/mwu.rs delete mode 100644 down-the-stack/dk_pac/src/mwu/events_pregion.rs delete mode 100644 down-the-stack/dk_pac/src/mwu/events_pregion/ra.rs delete mode 100644 down-the-stack/dk_pac/src/mwu/events_pregion/wa.rs delete mode 100644 down-the-stack/dk_pac/src/mwu/events_region.rs delete mode 100644 down-the-stack/dk_pac/src/mwu/events_region/ra.rs delete mode 100644 down-the-stack/dk_pac/src/mwu/events_region/wa.rs delete mode 100644 down-the-stack/dk_pac/src/mwu/inten.rs delete mode 100644 down-the-stack/dk_pac/src/mwu/intenclr.rs delete mode 100644 down-the-stack/dk_pac/src/mwu/intenset.rs delete mode 100644 down-the-stack/dk_pac/src/mwu/nmien.rs delete mode 100644 down-the-stack/dk_pac/src/mwu/nmienclr.rs delete mode 100644 down-the-stack/dk_pac/src/mwu/nmienset.rs delete mode 100644 down-the-stack/dk_pac/src/mwu/perregion.rs delete mode 100644 down-the-stack/dk_pac/src/mwu/perregion/substatra.rs delete mode 100644 down-the-stack/dk_pac/src/mwu/perregion/substatwa.rs delete mode 100644 down-the-stack/dk_pac/src/mwu/pregion.rs delete mode 100644 down-the-stack/dk_pac/src/mwu/pregion/end.rs delete mode 100644 down-the-stack/dk_pac/src/mwu/pregion/start.rs delete mode 100644 down-the-stack/dk_pac/src/mwu/pregion/subs.rs delete mode 100644 down-the-stack/dk_pac/src/mwu/region.rs delete mode 100644 down-the-stack/dk_pac/src/mwu/region/end.rs delete mode 100644 down-the-stack/dk_pac/src/mwu/region/start.rs delete mode 100644 down-the-stack/dk_pac/src/mwu/regionen.rs delete mode 100644 down-the-stack/dk_pac/src/mwu/regionenclr.rs delete mode 100644 down-the-stack/dk_pac/src/mwu/regionenset.rs delete mode 100644 down-the-stack/dk_pac/src/nfct.rs delete mode 100644 down-the-stack/dk_pac/src/nfct/currentloadctrl.rs delete mode 100644 down-the-stack/dk_pac/src/nfct/errorstatus.rs delete mode 100644 down-the-stack/dk_pac/src/nfct/events_autocolresstarted.rs delete mode 100644 down-the-stack/dk_pac/src/nfct/events_collision.rs delete mode 100644 down-the-stack/dk_pac/src/nfct/events_endrx.rs delete mode 100644 down-the-stack/dk_pac/src/nfct/events_endtx.rs delete mode 100644 down-the-stack/dk_pac/src/nfct/events_error.rs delete mode 100644 down-the-stack/dk_pac/src/nfct/events_fielddetected.rs delete mode 100644 down-the-stack/dk_pac/src/nfct/events_fieldlost.rs delete mode 100644 down-the-stack/dk_pac/src/nfct/events_ready.rs delete mode 100644 down-the-stack/dk_pac/src/nfct/events_rxerror.rs delete mode 100644 down-the-stack/dk_pac/src/nfct/events_rxframeend.rs delete mode 100644 down-the-stack/dk_pac/src/nfct/events_rxframestart.rs delete mode 100644 down-the-stack/dk_pac/src/nfct/events_selected.rs delete mode 100644 down-the-stack/dk_pac/src/nfct/events_started.rs delete mode 100644 down-the-stack/dk_pac/src/nfct/events_txframeend.rs delete mode 100644 down-the-stack/dk_pac/src/nfct/events_txframestart.rs delete mode 100644 down-the-stack/dk_pac/src/nfct/fieldpresent.rs delete mode 100644 down-the-stack/dk_pac/src/nfct/framedelaymax.rs delete mode 100644 down-the-stack/dk_pac/src/nfct/framedelaymin.rs delete mode 100644 down-the-stack/dk_pac/src/nfct/framedelaymode.rs delete mode 100644 down-the-stack/dk_pac/src/nfct/framestatus.rs delete mode 100644 down-the-stack/dk_pac/src/nfct/framestatus/rx.rs delete mode 100644 down-the-stack/dk_pac/src/nfct/inten.rs delete mode 100644 down-the-stack/dk_pac/src/nfct/intenclr.rs delete mode 100644 down-the-stack/dk_pac/src/nfct/intenset.rs delete mode 100644 down-the-stack/dk_pac/src/nfct/maxlen.rs delete mode 100644 down-the-stack/dk_pac/src/nfct/nfcid1_2nd_last.rs delete mode 100644 down-the-stack/dk_pac/src/nfct/nfcid1_3rd_last.rs delete mode 100644 down-the-stack/dk_pac/src/nfct/nfcid1_last.rs delete mode 100644 down-the-stack/dk_pac/src/nfct/packetptr.rs delete mode 100644 down-the-stack/dk_pac/src/nfct/rxd.rs delete mode 100644 down-the-stack/dk_pac/src/nfct/rxd/amount.rs delete mode 100644 down-the-stack/dk_pac/src/nfct/rxd/frameconfig.rs delete mode 100644 down-the-stack/dk_pac/src/nfct/selres.rs delete mode 100644 down-the-stack/dk_pac/src/nfct/sensres.rs delete mode 100644 down-the-stack/dk_pac/src/nfct/shorts.rs delete mode 100644 down-the-stack/dk_pac/src/nfct/tasks_activate.rs delete mode 100644 down-the-stack/dk_pac/src/nfct/tasks_disable.rs delete mode 100644 down-the-stack/dk_pac/src/nfct/tasks_enablerxdata.rs delete mode 100644 down-the-stack/dk_pac/src/nfct/tasks_goidle.rs delete mode 100644 down-the-stack/dk_pac/src/nfct/tasks_gosleep.rs delete mode 100644 down-the-stack/dk_pac/src/nfct/tasks_sense.rs delete mode 100644 down-the-stack/dk_pac/src/nfct/tasks_starttx.rs delete mode 100644 down-the-stack/dk_pac/src/nfct/txd.rs delete mode 100644 down-the-stack/dk_pac/src/nfct/txd/amount.rs delete mode 100644 down-the-stack/dk_pac/src/nfct/txd/frameconfig.rs delete mode 100644 down-the-stack/dk_pac/src/nvmc.rs delete mode 100644 down-the-stack/dk_pac/src/nvmc/config.rs delete mode 100644 down-the-stack/dk_pac/src/nvmc/eraseall.rs delete mode 100644 down-the-stack/dk_pac/src/nvmc/erasepage.rs delete mode 100644 down-the-stack/dk_pac/src/nvmc/erasepcr0.rs delete mode 100644 down-the-stack/dk_pac/src/nvmc/erasepcr1.rs delete mode 100644 down-the-stack/dk_pac/src/nvmc/eraseuicr.rs delete mode 100644 down-the-stack/dk_pac/src/nvmc/icachecnf.rs delete mode 100644 down-the-stack/dk_pac/src/nvmc/ihit.rs delete mode 100644 down-the-stack/dk_pac/src/nvmc/imiss.rs delete mode 100644 down-the-stack/dk_pac/src/nvmc/ready.rs delete mode 100644 down-the-stack/dk_pac/src/p0.rs delete mode 100644 down-the-stack/dk_pac/src/p0/detectmode.rs delete mode 100644 down-the-stack/dk_pac/src/p0/dir.rs delete mode 100644 down-the-stack/dk_pac/src/p0/dirclr.rs delete mode 100644 down-the-stack/dk_pac/src/p0/dirset.rs delete mode 100644 down-the-stack/dk_pac/src/p0/in_.rs delete mode 100644 down-the-stack/dk_pac/src/p0/latch.rs delete mode 100644 down-the-stack/dk_pac/src/p0/out.rs delete mode 100644 down-the-stack/dk_pac/src/p0/outclr.rs delete mode 100644 down-the-stack/dk_pac/src/p0/outset.rs delete mode 100644 down-the-stack/dk_pac/src/p0/pin_cnf.rs delete mode 100644 down-the-stack/dk_pac/src/pdm.rs delete mode 100644 down-the-stack/dk_pac/src/pdm/enable.rs delete mode 100644 down-the-stack/dk_pac/src/pdm/events_end.rs delete mode 100644 down-the-stack/dk_pac/src/pdm/events_started.rs delete mode 100644 down-the-stack/dk_pac/src/pdm/events_stopped.rs delete mode 100644 down-the-stack/dk_pac/src/pdm/gainl.rs delete mode 100644 down-the-stack/dk_pac/src/pdm/gainr.rs delete mode 100644 down-the-stack/dk_pac/src/pdm/inten.rs delete mode 100644 down-the-stack/dk_pac/src/pdm/intenclr.rs delete mode 100644 down-the-stack/dk_pac/src/pdm/intenset.rs delete mode 100644 down-the-stack/dk_pac/src/pdm/mode.rs delete mode 100644 down-the-stack/dk_pac/src/pdm/pdmclkctrl.rs delete mode 100644 down-the-stack/dk_pac/src/pdm/psel.rs delete mode 100644 down-the-stack/dk_pac/src/pdm/psel/clk.rs delete mode 100644 down-the-stack/dk_pac/src/pdm/psel/din.rs delete mode 100644 down-the-stack/dk_pac/src/pdm/sample.rs delete mode 100644 down-the-stack/dk_pac/src/pdm/sample/maxcnt.rs delete mode 100644 down-the-stack/dk_pac/src/pdm/sample/ptr.rs delete mode 100644 down-the-stack/dk_pac/src/pdm/tasks_start.rs delete mode 100644 down-the-stack/dk_pac/src/pdm/tasks_stop.rs delete mode 100644 down-the-stack/dk_pac/src/power.rs delete mode 100644 down-the-stack/dk_pac/src/power/dcdcen.rs delete mode 100644 down-the-stack/dk_pac/src/power/events_pofwarn.rs delete mode 100644 down-the-stack/dk_pac/src/power/events_sleepenter.rs delete mode 100644 down-the-stack/dk_pac/src/power/events_sleepexit.rs delete mode 100644 down-the-stack/dk_pac/src/power/gpregret.rs delete mode 100644 down-the-stack/dk_pac/src/power/gpregret2.rs delete mode 100644 down-the-stack/dk_pac/src/power/intenclr.rs delete mode 100644 down-the-stack/dk_pac/src/power/intenset.rs delete mode 100644 down-the-stack/dk_pac/src/power/pofcon.rs delete mode 100644 down-the-stack/dk_pac/src/power/ram.rs delete mode 100644 down-the-stack/dk_pac/src/power/ram/power.rs delete mode 100644 down-the-stack/dk_pac/src/power/ram/powerclr.rs delete mode 100644 down-the-stack/dk_pac/src/power/ram/powerset.rs delete mode 100644 down-the-stack/dk_pac/src/power/ramon.rs delete mode 100644 down-the-stack/dk_pac/src/power/ramonb.rs delete mode 100644 down-the-stack/dk_pac/src/power/ramstatus.rs delete mode 100644 down-the-stack/dk_pac/src/power/resetreas.rs delete mode 100644 down-the-stack/dk_pac/src/power/systemoff.rs delete mode 100644 down-the-stack/dk_pac/src/power/tasks_constlat.rs delete mode 100644 down-the-stack/dk_pac/src/power/tasks_lowpwr.rs delete mode 100644 down-the-stack/dk_pac/src/ppi.rs delete mode 100644 down-the-stack/dk_pac/src/ppi/ch.rs delete mode 100644 down-the-stack/dk_pac/src/ppi/ch/eep.rs delete mode 100644 down-the-stack/dk_pac/src/ppi/ch/tep.rs delete mode 100644 down-the-stack/dk_pac/src/ppi/chen.rs delete mode 100644 down-the-stack/dk_pac/src/ppi/chenclr.rs delete mode 100644 down-the-stack/dk_pac/src/ppi/chenset.rs delete mode 100644 down-the-stack/dk_pac/src/ppi/chg.rs delete mode 100644 down-the-stack/dk_pac/src/ppi/fork.rs delete mode 100644 down-the-stack/dk_pac/src/ppi/fork/tep.rs delete mode 100644 down-the-stack/dk_pac/src/ppi/tasks_chg.rs delete mode 100644 down-the-stack/dk_pac/src/ppi/tasks_chg/dis.rs delete mode 100644 down-the-stack/dk_pac/src/ppi/tasks_chg/en.rs delete mode 100644 down-the-stack/dk_pac/src/pwm0.rs delete mode 100644 down-the-stack/dk_pac/src/pwm0/countertop.rs delete mode 100644 down-the-stack/dk_pac/src/pwm0/decoder.rs delete mode 100644 down-the-stack/dk_pac/src/pwm0/enable.rs delete mode 100644 down-the-stack/dk_pac/src/pwm0/events_loopsdone.rs delete mode 100644 down-the-stack/dk_pac/src/pwm0/events_pwmperiodend.rs delete mode 100644 down-the-stack/dk_pac/src/pwm0/events_seqend.rs delete mode 100644 down-the-stack/dk_pac/src/pwm0/events_seqstarted.rs delete mode 100644 down-the-stack/dk_pac/src/pwm0/events_stopped.rs delete mode 100644 down-the-stack/dk_pac/src/pwm0/inten.rs delete mode 100644 down-the-stack/dk_pac/src/pwm0/intenclr.rs delete mode 100644 down-the-stack/dk_pac/src/pwm0/intenset.rs delete mode 100644 down-the-stack/dk_pac/src/pwm0/loop_.rs delete mode 100644 down-the-stack/dk_pac/src/pwm0/mode.rs delete mode 100644 down-the-stack/dk_pac/src/pwm0/prescaler.rs delete mode 100644 down-the-stack/dk_pac/src/pwm0/psel.rs delete mode 100644 down-the-stack/dk_pac/src/pwm0/psel/out.rs delete mode 100644 down-the-stack/dk_pac/src/pwm0/seq.rs delete mode 100644 down-the-stack/dk_pac/src/pwm0/seq/cnt.rs delete mode 100644 down-the-stack/dk_pac/src/pwm0/seq/enddelay.rs delete mode 100644 down-the-stack/dk_pac/src/pwm0/seq/ptr.rs delete mode 100644 down-the-stack/dk_pac/src/pwm0/seq/refresh.rs delete mode 100644 down-the-stack/dk_pac/src/pwm0/shorts.rs delete mode 100644 down-the-stack/dk_pac/src/pwm0/tasks_nextstep.rs delete mode 100644 down-the-stack/dk_pac/src/pwm0/tasks_seqstart.rs delete mode 100644 down-the-stack/dk_pac/src/pwm0/tasks_stop.rs delete mode 100644 down-the-stack/dk_pac/src/qdec.rs delete mode 100644 down-the-stack/dk_pac/src/qdec/acc.rs delete mode 100644 down-the-stack/dk_pac/src/qdec/accdbl.rs delete mode 100644 down-the-stack/dk_pac/src/qdec/accdblread.rs delete mode 100644 down-the-stack/dk_pac/src/qdec/accread.rs delete mode 100644 down-the-stack/dk_pac/src/qdec/dbfen.rs delete mode 100644 down-the-stack/dk_pac/src/qdec/enable.rs delete mode 100644 down-the-stack/dk_pac/src/qdec/events_accof.rs delete mode 100644 down-the-stack/dk_pac/src/qdec/events_dblrdy.rs delete mode 100644 down-the-stack/dk_pac/src/qdec/events_reportrdy.rs delete mode 100644 down-the-stack/dk_pac/src/qdec/events_samplerdy.rs delete mode 100644 down-the-stack/dk_pac/src/qdec/events_stopped.rs delete mode 100644 down-the-stack/dk_pac/src/qdec/intenclr.rs delete mode 100644 down-the-stack/dk_pac/src/qdec/intenset.rs delete mode 100644 down-the-stack/dk_pac/src/qdec/ledpol.rs delete mode 100644 down-the-stack/dk_pac/src/qdec/ledpre.rs delete mode 100644 down-the-stack/dk_pac/src/qdec/psel.rs delete mode 100644 down-the-stack/dk_pac/src/qdec/psel/a.rs delete mode 100644 down-the-stack/dk_pac/src/qdec/psel/b.rs delete mode 100644 down-the-stack/dk_pac/src/qdec/psel/led.rs delete mode 100644 down-the-stack/dk_pac/src/qdec/reportper.rs delete mode 100644 down-the-stack/dk_pac/src/qdec/sample.rs delete mode 100644 down-the-stack/dk_pac/src/qdec/sampleper.rs delete mode 100644 down-the-stack/dk_pac/src/qdec/shorts.rs delete mode 100644 down-the-stack/dk_pac/src/qdec/tasks_rdclracc.rs delete mode 100644 down-the-stack/dk_pac/src/qdec/tasks_rdclrdbl.rs delete mode 100644 down-the-stack/dk_pac/src/qdec/tasks_readclracc.rs delete mode 100644 down-the-stack/dk_pac/src/qdec/tasks_start.rs delete mode 100644 down-the-stack/dk_pac/src/qdec/tasks_stop.rs delete mode 100644 down-the-stack/dk_pac/src/radio.rs delete mode 100644 down-the-stack/dk_pac/src/radio/base0.rs delete mode 100644 down-the-stack/dk_pac/src/radio/base1.rs delete mode 100644 down-the-stack/dk_pac/src/radio/bcc.rs delete mode 100644 down-the-stack/dk_pac/src/radio/crccnf.rs delete mode 100644 down-the-stack/dk_pac/src/radio/crcinit.rs delete mode 100644 down-the-stack/dk_pac/src/radio/crcpoly.rs delete mode 100644 down-the-stack/dk_pac/src/radio/crcstatus.rs delete mode 100644 down-the-stack/dk_pac/src/radio/dab.rs delete mode 100644 down-the-stack/dk_pac/src/radio/dacnf.rs delete mode 100644 down-the-stack/dk_pac/src/radio/dai.rs delete mode 100644 down-the-stack/dk_pac/src/radio/dap.rs delete mode 100644 down-the-stack/dk_pac/src/radio/datawhiteiv.rs delete mode 100644 down-the-stack/dk_pac/src/radio/events_address.rs delete mode 100644 down-the-stack/dk_pac/src/radio/events_bcmatch.rs delete mode 100644 down-the-stack/dk_pac/src/radio/events_crcerror.rs delete mode 100644 down-the-stack/dk_pac/src/radio/events_crcok.rs delete mode 100644 down-the-stack/dk_pac/src/radio/events_devmatch.rs delete mode 100644 down-the-stack/dk_pac/src/radio/events_devmiss.rs delete mode 100644 down-the-stack/dk_pac/src/radio/events_disabled.rs delete mode 100644 down-the-stack/dk_pac/src/radio/events_end.rs delete mode 100644 down-the-stack/dk_pac/src/radio/events_payload.rs delete mode 100644 down-the-stack/dk_pac/src/radio/events_ready.rs delete mode 100644 down-the-stack/dk_pac/src/radio/events_rssiend.rs delete mode 100644 down-the-stack/dk_pac/src/radio/frequency.rs delete mode 100644 down-the-stack/dk_pac/src/radio/intenclr.rs delete mode 100644 down-the-stack/dk_pac/src/radio/intenset.rs delete mode 100644 down-the-stack/dk_pac/src/radio/mode.rs delete mode 100644 down-the-stack/dk_pac/src/radio/modecnf0.rs delete mode 100644 down-the-stack/dk_pac/src/radio/packetptr.rs delete mode 100644 down-the-stack/dk_pac/src/radio/pcnf0.rs delete mode 100644 down-the-stack/dk_pac/src/radio/pcnf1.rs delete mode 100644 down-the-stack/dk_pac/src/radio/power.rs delete mode 100644 down-the-stack/dk_pac/src/radio/prefix0.rs delete mode 100644 down-the-stack/dk_pac/src/radio/prefix1.rs delete mode 100644 down-the-stack/dk_pac/src/radio/rssisample.rs delete mode 100644 down-the-stack/dk_pac/src/radio/rxaddresses.rs delete mode 100644 down-the-stack/dk_pac/src/radio/rxcrc.rs delete mode 100644 down-the-stack/dk_pac/src/radio/rxmatch.rs delete mode 100644 down-the-stack/dk_pac/src/radio/shorts.rs delete mode 100644 down-the-stack/dk_pac/src/radio/state.rs delete mode 100644 down-the-stack/dk_pac/src/radio/tasks_bcstart.rs delete mode 100644 down-the-stack/dk_pac/src/radio/tasks_bcstop.rs delete mode 100644 down-the-stack/dk_pac/src/radio/tasks_disable.rs delete mode 100644 down-the-stack/dk_pac/src/radio/tasks_rssistart.rs delete mode 100644 down-the-stack/dk_pac/src/radio/tasks_rssistop.rs delete mode 100644 down-the-stack/dk_pac/src/radio/tasks_rxen.rs delete mode 100644 down-the-stack/dk_pac/src/radio/tasks_start.rs delete mode 100644 down-the-stack/dk_pac/src/radio/tasks_stop.rs delete mode 100644 down-the-stack/dk_pac/src/radio/tasks_txen.rs delete mode 100644 down-the-stack/dk_pac/src/radio/tifs.rs delete mode 100644 down-the-stack/dk_pac/src/radio/txaddress.rs delete mode 100644 down-the-stack/dk_pac/src/radio/txpower.rs delete mode 100644 down-the-stack/dk_pac/src/rng.rs delete mode 100644 down-the-stack/dk_pac/src/rng/config.rs delete mode 100644 down-the-stack/dk_pac/src/rng/events_valrdy.rs delete mode 100644 down-the-stack/dk_pac/src/rng/intenclr.rs delete mode 100644 down-the-stack/dk_pac/src/rng/intenset.rs delete mode 100644 down-the-stack/dk_pac/src/rng/shorts.rs delete mode 100644 down-the-stack/dk_pac/src/rng/tasks_start.rs delete mode 100644 down-the-stack/dk_pac/src/rng/tasks_stop.rs delete mode 100644 down-the-stack/dk_pac/src/rng/value.rs delete mode 100644 down-the-stack/dk_pac/src/rtc0.rs delete mode 100644 down-the-stack/dk_pac/src/rtc0/cc.rs delete mode 100644 down-the-stack/dk_pac/src/rtc0/counter.rs delete mode 100644 down-the-stack/dk_pac/src/rtc0/events_compare.rs delete mode 100644 down-the-stack/dk_pac/src/rtc0/events_ovrflw.rs delete mode 100644 down-the-stack/dk_pac/src/rtc0/events_tick.rs delete mode 100644 down-the-stack/dk_pac/src/rtc0/evten.rs delete mode 100644 down-the-stack/dk_pac/src/rtc0/evtenclr.rs delete mode 100644 down-the-stack/dk_pac/src/rtc0/evtenset.rs delete mode 100644 down-the-stack/dk_pac/src/rtc0/intenclr.rs delete mode 100644 down-the-stack/dk_pac/src/rtc0/intenset.rs delete mode 100644 down-the-stack/dk_pac/src/rtc0/prescaler.rs delete mode 100644 down-the-stack/dk_pac/src/rtc0/tasks_clear.rs delete mode 100644 down-the-stack/dk_pac/src/rtc0/tasks_start.rs delete mode 100644 down-the-stack/dk_pac/src/rtc0/tasks_stop.rs delete mode 100644 down-the-stack/dk_pac/src/rtc0/tasks_trigovrflw.rs delete mode 100644 down-the-stack/dk_pac/src/saadc.rs delete mode 100644 down-the-stack/dk_pac/src/saadc/ch.rs delete mode 100644 down-the-stack/dk_pac/src/saadc/ch/config.rs delete mode 100644 down-the-stack/dk_pac/src/saadc/ch/limit.rs delete mode 100644 down-the-stack/dk_pac/src/saadc/ch/pseln.rs delete mode 100644 down-the-stack/dk_pac/src/saadc/ch/pselp.rs delete mode 100644 down-the-stack/dk_pac/src/saadc/enable.rs delete mode 100644 down-the-stack/dk_pac/src/saadc/events_calibratedone.rs delete mode 100644 down-the-stack/dk_pac/src/saadc/events_ch.rs delete mode 100644 down-the-stack/dk_pac/src/saadc/events_ch/limith.rs delete mode 100644 down-the-stack/dk_pac/src/saadc/events_ch/limitl.rs delete mode 100644 down-the-stack/dk_pac/src/saadc/events_done.rs delete mode 100644 down-the-stack/dk_pac/src/saadc/events_end.rs delete mode 100644 down-the-stack/dk_pac/src/saadc/events_resultdone.rs delete mode 100644 down-the-stack/dk_pac/src/saadc/events_started.rs delete mode 100644 down-the-stack/dk_pac/src/saadc/events_stopped.rs delete mode 100644 down-the-stack/dk_pac/src/saadc/inten.rs delete mode 100644 down-the-stack/dk_pac/src/saadc/intenclr.rs delete mode 100644 down-the-stack/dk_pac/src/saadc/intenset.rs delete mode 100644 down-the-stack/dk_pac/src/saadc/oversample.rs delete mode 100644 down-the-stack/dk_pac/src/saadc/resolution.rs delete mode 100644 down-the-stack/dk_pac/src/saadc/result.rs delete mode 100644 down-the-stack/dk_pac/src/saadc/result/amount.rs delete mode 100644 down-the-stack/dk_pac/src/saadc/result/maxcnt.rs delete mode 100644 down-the-stack/dk_pac/src/saadc/result/ptr.rs delete mode 100644 down-the-stack/dk_pac/src/saadc/samplerate.rs delete mode 100644 down-the-stack/dk_pac/src/saadc/status.rs delete mode 100644 down-the-stack/dk_pac/src/saadc/tasks_calibrateoffset.rs delete mode 100644 down-the-stack/dk_pac/src/saadc/tasks_sample.rs delete mode 100644 down-the-stack/dk_pac/src/saadc/tasks_start.rs delete mode 100644 down-the-stack/dk_pac/src/saadc/tasks_stop.rs delete mode 100644 down-the-stack/dk_pac/src/spi0.rs delete mode 100644 down-the-stack/dk_pac/src/spi0/config.rs delete mode 100644 down-the-stack/dk_pac/src/spi0/enable.rs delete mode 100644 down-the-stack/dk_pac/src/spi0/events_ready.rs delete mode 100644 down-the-stack/dk_pac/src/spi0/frequency.rs delete mode 100644 down-the-stack/dk_pac/src/spi0/intenclr.rs delete mode 100644 down-the-stack/dk_pac/src/spi0/intenset.rs delete mode 100644 down-the-stack/dk_pac/src/spi0/psel.rs delete mode 100644 down-the-stack/dk_pac/src/spi0/psel/miso.rs delete mode 100644 down-the-stack/dk_pac/src/spi0/psel/mosi.rs delete mode 100644 down-the-stack/dk_pac/src/spi0/psel/sck.rs delete mode 100644 down-the-stack/dk_pac/src/spi0/rxd.rs delete mode 100644 down-the-stack/dk_pac/src/spi0/txd.rs delete mode 100644 down-the-stack/dk_pac/src/spim0.rs delete mode 100644 down-the-stack/dk_pac/src/spim0/config.rs delete mode 100644 down-the-stack/dk_pac/src/spim0/enable.rs delete mode 100644 down-the-stack/dk_pac/src/spim0/events_end.rs delete mode 100644 down-the-stack/dk_pac/src/spim0/events_endrx.rs delete mode 100644 down-the-stack/dk_pac/src/spim0/events_endtx.rs delete mode 100644 down-the-stack/dk_pac/src/spim0/events_started.rs delete mode 100644 down-the-stack/dk_pac/src/spim0/events_stopped.rs delete mode 100644 down-the-stack/dk_pac/src/spim0/frequency.rs delete mode 100644 down-the-stack/dk_pac/src/spim0/intenclr.rs delete mode 100644 down-the-stack/dk_pac/src/spim0/intenset.rs delete mode 100644 down-the-stack/dk_pac/src/spim0/orc.rs delete mode 100644 down-the-stack/dk_pac/src/spim0/psel.rs delete mode 100644 down-the-stack/dk_pac/src/spim0/psel/miso.rs delete mode 100644 down-the-stack/dk_pac/src/spim0/psel/mosi.rs delete mode 100644 down-the-stack/dk_pac/src/spim0/psel/sck.rs delete mode 100644 down-the-stack/dk_pac/src/spim0/rxd.rs delete mode 100644 down-the-stack/dk_pac/src/spim0/rxd/amount.rs delete mode 100644 down-the-stack/dk_pac/src/spim0/rxd/list.rs delete mode 100644 down-the-stack/dk_pac/src/spim0/rxd/maxcnt.rs delete mode 100644 down-the-stack/dk_pac/src/spim0/rxd/ptr.rs delete mode 100644 down-the-stack/dk_pac/src/spim0/shorts.rs delete mode 100644 down-the-stack/dk_pac/src/spim0/tasks_resume.rs delete mode 100644 down-the-stack/dk_pac/src/spim0/tasks_start.rs delete mode 100644 down-the-stack/dk_pac/src/spim0/tasks_stop.rs delete mode 100644 down-the-stack/dk_pac/src/spim0/tasks_suspend.rs delete mode 100644 down-the-stack/dk_pac/src/spim0/txd.rs delete mode 100644 down-the-stack/dk_pac/src/spim0/txd/amount.rs delete mode 100644 down-the-stack/dk_pac/src/spim0/txd/list.rs delete mode 100644 down-the-stack/dk_pac/src/spim0/txd/maxcnt.rs delete mode 100644 down-the-stack/dk_pac/src/spim0/txd/ptr.rs delete mode 100644 down-the-stack/dk_pac/src/spis0.rs delete mode 100644 down-the-stack/dk_pac/src/spis0/config.rs delete mode 100644 down-the-stack/dk_pac/src/spis0/def.rs delete mode 100644 down-the-stack/dk_pac/src/spis0/enable.rs delete mode 100644 down-the-stack/dk_pac/src/spis0/events_acquired.rs delete mode 100644 down-the-stack/dk_pac/src/spis0/events_end.rs delete mode 100644 down-the-stack/dk_pac/src/spis0/events_endrx.rs delete mode 100644 down-the-stack/dk_pac/src/spis0/intenclr.rs delete mode 100644 down-the-stack/dk_pac/src/spis0/intenset.rs delete mode 100644 down-the-stack/dk_pac/src/spis0/orc.rs delete mode 100644 down-the-stack/dk_pac/src/spis0/psel.rs delete mode 100644 down-the-stack/dk_pac/src/spis0/psel/csn.rs delete mode 100644 down-the-stack/dk_pac/src/spis0/psel/miso.rs delete mode 100644 down-the-stack/dk_pac/src/spis0/psel/mosi.rs delete mode 100644 down-the-stack/dk_pac/src/spis0/psel/sck.rs delete mode 100644 down-the-stack/dk_pac/src/spis0/rxd.rs delete mode 100644 down-the-stack/dk_pac/src/spis0/rxd/amount.rs delete mode 100644 down-the-stack/dk_pac/src/spis0/rxd/maxcnt.rs delete mode 100644 down-the-stack/dk_pac/src/spis0/rxd/ptr.rs delete mode 100644 down-the-stack/dk_pac/src/spis0/semstat.rs delete mode 100644 down-the-stack/dk_pac/src/spis0/shorts.rs delete mode 100644 down-the-stack/dk_pac/src/spis0/status.rs delete mode 100644 down-the-stack/dk_pac/src/spis0/tasks_acquire.rs delete mode 100644 down-the-stack/dk_pac/src/spis0/tasks_release.rs delete mode 100644 down-the-stack/dk_pac/src/spis0/txd.rs delete mode 100644 down-the-stack/dk_pac/src/spis0/txd/amount.rs delete mode 100644 down-the-stack/dk_pac/src/spis0/txd/maxcnt.rs delete mode 100644 down-the-stack/dk_pac/src/spis0/txd/ptr.rs delete mode 100644 down-the-stack/dk_pac/src/swi0.rs delete mode 100644 down-the-stack/dk_pac/src/swi0/unused.rs delete mode 100644 down-the-stack/dk_pac/src/temp.rs delete mode 100644 down-the-stack/dk_pac/src/temp/a0.rs delete mode 100644 down-the-stack/dk_pac/src/temp/a1.rs delete mode 100644 down-the-stack/dk_pac/src/temp/a2.rs delete mode 100644 down-the-stack/dk_pac/src/temp/a3.rs delete mode 100644 down-the-stack/dk_pac/src/temp/a4.rs delete mode 100644 down-the-stack/dk_pac/src/temp/a5.rs delete mode 100644 down-the-stack/dk_pac/src/temp/b0.rs delete mode 100644 down-the-stack/dk_pac/src/temp/b1.rs delete mode 100644 down-the-stack/dk_pac/src/temp/b2.rs delete mode 100644 down-the-stack/dk_pac/src/temp/b3.rs delete mode 100644 down-the-stack/dk_pac/src/temp/b4.rs delete mode 100644 down-the-stack/dk_pac/src/temp/b5.rs delete mode 100644 down-the-stack/dk_pac/src/temp/events_datardy.rs delete mode 100644 down-the-stack/dk_pac/src/temp/intenclr.rs delete mode 100644 down-the-stack/dk_pac/src/temp/intenset.rs delete mode 100644 down-the-stack/dk_pac/src/temp/t0.rs delete mode 100644 down-the-stack/dk_pac/src/temp/t1.rs delete mode 100644 down-the-stack/dk_pac/src/temp/t2.rs delete mode 100644 down-the-stack/dk_pac/src/temp/t3.rs delete mode 100644 down-the-stack/dk_pac/src/temp/t4.rs delete mode 100644 down-the-stack/dk_pac/src/temp/tasks_start.rs delete mode 100644 down-the-stack/dk_pac/src/temp/tasks_stop.rs delete mode 100644 down-the-stack/dk_pac/src/temp/temp.rs delete mode 100644 down-the-stack/dk_pac/src/timer0.rs delete mode 100644 down-the-stack/dk_pac/src/timer0/bitmode.rs delete mode 100644 down-the-stack/dk_pac/src/timer0/cc.rs delete mode 100644 down-the-stack/dk_pac/src/timer0/events_compare.rs delete mode 100644 down-the-stack/dk_pac/src/timer0/intenclr.rs delete mode 100644 down-the-stack/dk_pac/src/timer0/intenset.rs delete mode 100644 down-the-stack/dk_pac/src/timer0/mode.rs delete mode 100644 down-the-stack/dk_pac/src/timer0/prescaler.rs delete mode 100644 down-the-stack/dk_pac/src/timer0/shorts.rs delete mode 100644 down-the-stack/dk_pac/src/timer0/tasks_capture.rs delete mode 100644 down-the-stack/dk_pac/src/timer0/tasks_clear.rs delete mode 100644 down-the-stack/dk_pac/src/timer0/tasks_count.rs delete mode 100644 down-the-stack/dk_pac/src/timer0/tasks_shutdown.rs delete mode 100644 down-the-stack/dk_pac/src/timer0/tasks_start.rs delete mode 100644 down-the-stack/dk_pac/src/timer0/tasks_stop.rs delete mode 100644 down-the-stack/dk_pac/src/twi0.rs delete mode 100644 down-the-stack/dk_pac/src/twi0/address.rs delete mode 100644 down-the-stack/dk_pac/src/twi0/enable.rs delete mode 100644 down-the-stack/dk_pac/src/twi0/errorsrc.rs delete mode 100644 down-the-stack/dk_pac/src/twi0/events_bb.rs delete mode 100644 down-the-stack/dk_pac/src/twi0/events_error.rs delete mode 100644 down-the-stack/dk_pac/src/twi0/events_rxdready.rs delete mode 100644 down-the-stack/dk_pac/src/twi0/events_stopped.rs delete mode 100644 down-the-stack/dk_pac/src/twi0/events_suspended.rs delete mode 100644 down-the-stack/dk_pac/src/twi0/events_txdsent.rs delete mode 100644 down-the-stack/dk_pac/src/twi0/frequency.rs delete mode 100644 down-the-stack/dk_pac/src/twi0/intenclr.rs delete mode 100644 down-the-stack/dk_pac/src/twi0/intenset.rs delete mode 100644 down-the-stack/dk_pac/src/twi0/pselscl.rs delete mode 100644 down-the-stack/dk_pac/src/twi0/pselsda.rs delete mode 100644 down-the-stack/dk_pac/src/twi0/rxd.rs delete mode 100644 down-the-stack/dk_pac/src/twi0/shorts.rs delete mode 100644 down-the-stack/dk_pac/src/twi0/tasks_resume.rs delete mode 100644 down-the-stack/dk_pac/src/twi0/tasks_startrx.rs delete mode 100644 down-the-stack/dk_pac/src/twi0/tasks_starttx.rs delete mode 100644 down-the-stack/dk_pac/src/twi0/tasks_stop.rs delete mode 100644 down-the-stack/dk_pac/src/twi0/tasks_suspend.rs delete mode 100644 down-the-stack/dk_pac/src/twi0/txd.rs delete mode 100644 down-the-stack/dk_pac/src/twim0.rs delete mode 100644 down-the-stack/dk_pac/src/twim0/address.rs delete mode 100644 down-the-stack/dk_pac/src/twim0/enable.rs delete mode 100644 down-the-stack/dk_pac/src/twim0/errorsrc.rs delete mode 100644 down-the-stack/dk_pac/src/twim0/events_error.rs delete mode 100644 down-the-stack/dk_pac/src/twim0/events_lastrx.rs delete mode 100644 down-the-stack/dk_pac/src/twim0/events_lasttx.rs delete mode 100644 down-the-stack/dk_pac/src/twim0/events_rxstarted.rs delete mode 100644 down-the-stack/dk_pac/src/twim0/events_stopped.rs delete mode 100644 down-the-stack/dk_pac/src/twim0/events_suspended.rs delete mode 100644 down-the-stack/dk_pac/src/twim0/events_txstarted.rs delete mode 100644 down-the-stack/dk_pac/src/twim0/frequency.rs delete mode 100644 down-the-stack/dk_pac/src/twim0/inten.rs delete mode 100644 down-the-stack/dk_pac/src/twim0/intenclr.rs delete mode 100644 down-the-stack/dk_pac/src/twim0/intenset.rs delete mode 100644 down-the-stack/dk_pac/src/twim0/psel.rs delete mode 100644 down-the-stack/dk_pac/src/twim0/psel/scl.rs delete mode 100644 down-the-stack/dk_pac/src/twim0/psel/sda.rs delete mode 100644 down-the-stack/dk_pac/src/twim0/rxd.rs delete mode 100644 down-the-stack/dk_pac/src/twim0/rxd/amount.rs delete mode 100644 down-the-stack/dk_pac/src/twim0/rxd/list.rs delete mode 100644 down-the-stack/dk_pac/src/twim0/rxd/maxcnt.rs delete mode 100644 down-the-stack/dk_pac/src/twim0/rxd/ptr.rs delete mode 100644 down-the-stack/dk_pac/src/twim0/shorts.rs delete mode 100644 down-the-stack/dk_pac/src/twim0/tasks_resume.rs delete mode 100644 down-the-stack/dk_pac/src/twim0/tasks_startrx.rs delete mode 100644 down-the-stack/dk_pac/src/twim0/tasks_starttx.rs delete mode 100644 down-the-stack/dk_pac/src/twim0/tasks_stop.rs delete mode 100644 down-the-stack/dk_pac/src/twim0/tasks_suspend.rs delete mode 100644 down-the-stack/dk_pac/src/twim0/txd.rs delete mode 100644 down-the-stack/dk_pac/src/twim0/txd/amount.rs delete mode 100644 down-the-stack/dk_pac/src/twim0/txd/list.rs delete mode 100644 down-the-stack/dk_pac/src/twim0/txd/maxcnt.rs delete mode 100644 down-the-stack/dk_pac/src/twim0/txd/ptr.rs delete mode 100644 down-the-stack/dk_pac/src/twis0.rs delete mode 100644 down-the-stack/dk_pac/src/twis0/address.rs delete mode 100644 down-the-stack/dk_pac/src/twis0/config.rs delete mode 100644 down-the-stack/dk_pac/src/twis0/enable.rs delete mode 100644 down-the-stack/dk_pac/src/twis0/errorsrc.rs delete mode 100644 down-the-stack/dk_pac/src/twis0/events_error.rs delete mode 100644 down-the-stack/dk_pac/src/twis0/events_read.rs delete mode 100644 down-the-stack/dk_pac/src/twis0/events_rxstarted.rs delete mode 100644 down-the-stack/dk_pac/src/twis0/events_stopped.rs delete mode 100644 down-the-stack/dk_pac/src/twis0/events_txstarted.rs delete mode 100644 down-the-stack/dk_pac/src/twis0/events_write.rs delete mode 100644 down-the-stack/dk_pac/src/twis0/inten.rs delete mode 100644 down-the-stack/dk_pac/src/twis0/intenclr.rs delete mode 100644 down-the-stack/dk_pac/src/twis0/intenset.rs delete mode 100644 down-the-stack/dk_pac/src/twis0/match_.rs delete mode 100644 down-the-stack/dk_pac/src/twis0/orc.rs delete mode 100644 down-the-stack/dk_pac/src/twis0/psel.rs delete mode 100644 down-the-stack/dk_pac/src/twis0/psel/scl.rs delete mode 100644 down-the-stack/dk_pac/src/twis0/psel/sda.rs delete mode 100644 down-the-stack/dk_pac/src/twis0/rxd.rs delete mode 100644 down-the-stack/dk_pac/src/twis0/rxd/amount.rs delete mode 100644 down-the-stack/dk_pac/src/twis0/rxd/maxcnt.rs delete mode 100644 down-the-stack/dk_pac/src/twis0/rxd/ptr.rs delete mode 100644 down-the-stack/dk_pac/src/twis0/shorts.rs delete mode 100644 down-the-stack/dk_pac/src/twis0/tasks_preparerx.rs delete mode 100644 down-the-stack/dk_pac/src/twis0/tasks_preparetx.rs delete mode 100644 down-the-stack/dk_pac/src/twis0/tasks_resume.rs delete mode 100644 down-the-stack/dk_pac/src/twis0/tasks_stop.rs delete mode 100644 down-the-stack/dk_pac/src/twis0/tasks_suspend.rs delete mode 100644 down-the-stack/dk_pac/src/twis0/txd.rs delete mode 100644 down-the-stack/dk_pac/src/twis0/txd/amount.rs delete mode 100644 down-the-stack/dk_pac/src/twis0/txd/maxcnt.rs delete mode 100644 down-the-stack/dk_pac/src/twis0/txd/ptr.rs delete mode 100644 down-the-stack/dk_pac/src/uart0.rs delete mode 100644 down-the-stack/dk_pac/src/uart0/baudrate.rs delete mode 100644 down-the-stack/dk_pac/src/uart0/config.rs delete mode 100644 down-the-stack/dk_pac/src/uart0/enable.rs delete mode 100644 down-the-stack/dk_pac/src/uart0/errorsrc.rs delete mode 100644 down-the-stack/dk_pac/src/uart0/events_cts.rs delete mode 100644 down-the-stack/dk_pac/src/uart0/events_error.rs delete mode 100644 down-the-stack/dk_pac/src/uart0/events_ncts.rs delete mode 100644 down-the-stack/dk_pac/src/uart0/events_rxdrdy.rs delete mode 100644 down-the-stack/dk_pac/src/uart0/events_rxto.rs delete mode 100644 down-the-stack/dk_pac/src/uart0/events_txdrdy.rs delete mode 100644 down-the-stack/dk_pac/src/uart0/intenclr.rs delete mode 100644 down-the-stack/dk_pac/src/uart0/intenset.rs delete mode 100644 down-the-stack/dk_pac/src/uart0/pselcts.rs delete mode 100644 down-the-stack/dk_pac/src/uart0/pselrts.rs delete mode 100644 down-the-stack/dk_pac/src/uart0/pselrxd.rs delete mode 100644 down-the-stack/dk_pac/src/uart0/pseltxd.rs delete mode 100644 down-the-stack/dk_pac/src/uart0/rxd.rs delete mode 100644 down-the-stack/dk_pac/src/uart0/shorts.rs delete mode 100644 down-the-stack/dk_pac/src/uart0/tasks_startrx.rs delete mode 100644 down-the-stack/dk_pac/src/uart0/tasks_starttx.rs delete mode 100644 down-the-stack/dk_pac/src/uart0/tasks_stoprx.rs delete mode 100644 down-the-stack/dk_pac/src/uart0/tasks_stoptx.rs delete mode 100644 down-the-stack/dk_pac/src/uart0/tasks_suspend.rs delete mode 100644 down-the-stack/dk_pac/src/uart0/txd.rs delete mode 100644 down-the-stack/dk_pac/src/uarte0.rs delete mode 100644 down-the-stack/dk_pac/src/uarte0/baudrate.rs delete mode 100644 down-the-stack/dk_pac/src/uarte0/config.rs delete mode 100644 down-the-stack/dk_pac/src/uarte0/enable.rs delete mode 100644 down-the-stack/dk_pac/src/uarte0/errorsrc.rs delete mode 100644 down-the-stack/dk_pac/src/uarte0/events_cts.rs delete mode 100644 down-the-stack/dk_pac/src/uarte0/events_endrx.rs delete mode 100644 down-the-stack/dk_pac/src/uarte0/events_endtx.rs delete mode 100644 down-the-stack/dk_pac/src/uarte0/events_error.rs delete mode 100644 down-the-stack/dk_pac/src/uarte0/events_ncts.rs delete mode 100644 down-the-stack/dk_pac/src/uarte0/events_rxdrdy.rs delete mode 100644 down-the-stack/dk_pac/src/uarte0/events_rxstarted.rs delete mode 100644 down-the-stack/dk_pac/src/uarte0/events_rxto.rs delete mode 100644 down-the-stack/dk_pac/src/uarte0/events_txdrdy.rs delete mode 100644 down-the-stack/dk_pac/src/uarte0/events_txstarted.rs delete mode 100644 down-the-stack/dk_pac/src/uarte0/events_txstopped.rs delete mode 100644 down-the-stack/dk_pac/src/uarte0/inten.rs delete mode 100644 down-the-stack/dk_pac/src/uarte0/intenclr.rs delete mode 100644 down-the-stack/dk_pac/src/uarte0/intenset.rs delete mode 100644 down-the-stack/dk_pac/src/uarte0/psel.rs delete mode 100644 down-the-stack/dk_pac/src/uarte0/psel/cts.rs delete mode 100644 down-the-stack/dk_pac/src/uarte0/psel/rts.rs delete mode 100644 down-the-stack/dk_pac/src/uarte0/psel/rxd.rs delete mode 100644 down-the-stack/dk_pac/src/uarte0/psel/txd.rs delete mode 100644 down-the-stack/dk_pac/src/uarte0/rxd.rs delete mode 100644 down-the-stack/dk_pac/src/uarte0/rxd/amount.rs delete mode 100644 down-the-stack/dk_pac/src/uarte0/rxd/maxcnt.rs delete mode 100644 down-the-stack/dk_pac/src/uarte0/rxd/ptr.rs delete mode 100644 down-the-stack/dk_pac/src/uarte0/shorts.rs delete mode 100644 down-the-stack/dk_pac/src/uarte0/tasks_flushrx.rs delete mode 100644 down-the-stack/dk_pac/src/uarte0/tasks_startrx.rs delete mode 100644 down-the-stack/dk_pac/src/uarte0/tasks_starttx.rs delete mode 100644 down-the-stack/dk_pac/src/uarte0/tasks_stoprx.rs delete mode 100644 down-the-stack/dk_pac/src/uarte0/tasks_stoptx.rs delete mode 100644 down-the-stack/dk_pac/src/uarte0/txd.rs delete mode 100644 down-the-stack/dk_pac/src/uarte0/txd/amount.rs delete mode 100644 down-the-stack/dk_pac/src/uarte0/txd/maxcnt.rs delete mode 100644 down-the-stack/dk_pac/src/uarte0/txd/ptr.rs delete mode 100644 down-the-stack/dk_pac/src/uicr.rs delete mode 100644 down-the-stack/dk_pac/src/uicr/approtect.rs delete mode 100644 down-the-stack/dk_pac/src/uicr/customer.rs delete mode 100644 down-the-stack/dk_pac/src/uicr/nfcpins.rs delete mode 100644 down-the-stack/dk_pac/src/uicr/nrffw.rs delete mode 100644 down-the-stack/dk_pac/src/uicr/nrfhw.rs delete mode 100644 down-the-stack/dk_pac/src/uicr/pselreset.rs delete mode 100644 down-the-stack/dk_pac/src/wdt.rs delete mode 100644 down-the-stack/dk_pac/src/wdt/config.rs delete mode 100644 down-the-stack/dk_pac/src/wdt/crv.rs delete mode 100644 down-the-stack/dk_pac/src/wdt/events_timeout.rs delete mode 100644 down-the-stack/dk_pac/src/wdt/intenclr.rs delete mode 100644 down-the-stack/dk_pac/src/wdt/intenset.rs delete mode 100644 down-the-stack/dk_pac/src/wdt/reqstatus.rs delete mode 100644 down-the-stack/dk_pac/src/wdt/rr.rs delete mode 100644 down-the-stack/dk_pac/src/wdt/rren.rs delete mode 100644 down-the-stack/dk_pac/src/wdt/runstatus.rs delete mode 100644 down-the-stack/dk_pac/src/wdt/tasks_start.rs diff --git a/down-the-stack/apps/Cargo.toml b/down-the-stack/apps/Cargo.toml index d5414a9..7d3372e 100644 --- a/down-the-stack/apps/Cargo.toml +++ b/down-the-stack/apps/Cargo.toml @@ -9,7 +9,6 @@ version = "0.0.0" cortex-m = {version = "0.7.6", features = ["critical-section-single-core"]} cortex-m-rt = "0.7.2" dk_bsc = { path = "../dk_bsc" } -dk_pac = { path = "../dk_pac", features = ["critical-section"]} heapless = "0.7.16" panic-probe = { version = "0.3.0", features = ["print-defmt"] } defmt = "0.3.2" diff --git a/down-the-stack/dk_pac/build.rs b/down-the-stack/dk_pac/build.rs deleted file mode 100644 index ff663b5..0000000 --- a/down-the-stack/dk_pac/build.rs +++ /dev/null @@ -1,17 +0,0 @@ -use std::env; -use std::fs::File; -use std::io::Write; -use std::path::PathBuf; -fn main() { - if env::var_os("CARGO_FEATURE_RT").is_some() { - let out = &PathBuf::from(env::var_os("OUT_DIR").unwrap()); - File::create(out.join("device.x")) - .unwrap() - .write_all(include_bytes!("device.x")) - .unwrap(); - println!("cargo:rustc-link-search={}", out.display()); - println!("cargo:rerun-if-changed=device.x"); - } - println!("cargo:rerun-if-changed=build.rs"); -} - diff --git a/down-the-stack/dk_pac/device.x b/down-the-stack/dk_pac/device.x deleted file mode 100644 index 8b4bb81..0000000 --- a/down-the-stack/dk_pac/device.x +++ /dev/null @@ -1,38 +0,0 @@ -PROVIDE(POWER_CLOCK = DefaultHandler); -PROVIDE(RADIO = DefaultHandler); -PROVIDE(UARTE0_UART0 = DefaultHandler); -PROVIDE(SPIM0_SPIS0_TWIM0_TWIS0_SPI0_TWI0 = DefaultHandler); -PROVIDE(SPIM1_SPIS1_TWIM1_TWIS1_SPI1_TWI1 = DefaultHandler); -PROVIDE(NFCT = DefaultHandler); -PROVIDE(GPIOTE = DefaultHandler); -PROVIDE(SAADC = DefaultHandler); -PROVIDE(TIMER0 = DefaultHandler); -PROVIDE(TIMER1 = DefaultHandler); -PROVIDE(TIMER2 = DefaultHandler); -PROVIDE(RTC0 = DefaultHandler); -PROVIDE(TEMP = DefaultHandler); -PROVIDE(RNG = DefaultHandler); -PROVIDE(ECB = DefaultHandler); -PROVIDE(CCM_AAR = DefaultHandler); -PROVIDE(WDT = DefaultHandler); -PROVIDE(RTC1 = DefaultHandler); -PROVIDE(QDEC = DefaultHandler); -PROVIDE(COMP_LPCOMP = DefaultHandler); -PROVIDE(SWI0_EGU0 = DefaultHandler); -PROVIDE(SWI1_EGU1 = DefaultHandler); -PROVIDE(SWI2_EGU2 = DefaultHandler); -PROVIDE(SWI3_EGU3 = DefaultHandler); -PROVIDE(SWI4_EGU4 = DefaultHandler); -PROVIDE(SWI5_EGU5 = DefaultHandler); -PROVIDE(TIMER3 = DefaultHandler); -PROVIDE(TIMER4 = DefaultHandler); -PROVIDE(PWM0 = DefaultHandler); -PROVIDE(PDM = DefaultHandler); -PROVIDE(MWU = DefaultHandler); -PROVIDE(PWM1 = DefaultHandler); -PROVIDE(PWM2 = DefaultHandler); -PROVIDE(SPIM2_SPIS2_SPI2 = DefaultHandler); -PROVIDE(RTC2 = DefaultHandler); -PROVIDE(I2S = DefaultHandler); -PROVIDE(FPU = DefaultHandler); - diff --git a/down-the-stack/dk_pac/src/aar.rs b/down-the-stack/dk_pac/src/aar.rs deleted file mode 100644 index 554320b..0000000 --- a/down-the-stack/dk_pac/src/aar.rs +++ /dev/null @@ -1,88 +0,0 @@ -#[doc = r"Register block"] -#[repr(C)] -pub struct RegisterBlock { - #[doc = "0x00 - Start resolving addresses based on IRKs specified in the IRK data structure"] - pub tasks_start: TASKS_START, - _reserved1: [u8; 0x04], - #[doc = "0x08 - Stop resolving addresses"] - pub tasks_stop: TASKS_STOP, - _reserved2: [u8; 0xf4], - #[doc = "0x100 - Address resolution procedure complete"] - pub events_end: EVENTS_END, - #[doc = "0x104 - Address resolved"] - pub events_resolved: EVENTS_RESOLVED, - #[doc = "0x108 - Address not resolved"] - pub events_notresolved: EVENTS_NOTRESOLVED, - _reserved5: [u8; 0x01f8], - #[doc = "0x304 - Enable interrupt"] - pub intenset: INTENSET, - #[doc = "0x308 - Disable interrupt"] - pub intenclr: INTENCLR, - _reserved7: [u8; 0xf4], - #[doc = "0x400 - Resolution status"] - pub status: STATUS, - _reserved8: [u8; 0xfc], - #[doc = "0x500 - Enable AAR"] - pub enable: ENABLE, - #[doc = "0x504 - Number of IRKs"] - pub nirk: NIRK, - #[doc = "0x508 - Pointer to IRK data structure"] - pub irkptr: IRKPTR, - _reserved11: [u8; 0x04], - #[doc = "0x510 - Pointer to the resolvable address"] - pub addrptr: ADDRPTR, - #[doc = "0x514 - Pointer to data area used for temporary storage"] - pub scratchptr: SCRATCHPTR, -} -#[doc = "TASKS_START (w) register accessor: an alias for `Reg`"] -pub type TASKS_START = crate::Reg; -#[doc = "Start resolving addresses based on IRKs specified in the IRK data structure"] -pub mod tasks_start; -#[doc = "TASKS_STOP (w) register accessor: an alias for `Reg`"] -pub type TASKS_STOP = crate::Reg; -#[doc = "Stop resolving addresses"] -pub mod tasks_stop; -#[doc = "EVENTS_END (rw) register accessor: an alias for `Reg`"] -pub type EVENTS_END = crate::Reg; -#[doc = "Address resolution procedure complete"] -pub mod events_end; -#[doc = "EVENTS_RESOLVED (rw) register accessor: an alias for `Reg`"] -pub type EVENTS_RESOLVED = crate::Reg; -#[doc = "Address resolved"] -pub mod events_resolved; -#[doc = "EVENTS_NOTRESOLVED (rw) register accessor: an alias for `Reg`"] -pub type EVENTS_NOTRESOLVED = crate::Reg; -#[doc = "Address not resolved"] -pub mod events_notresolved; -#[doc = "INTENSET (rw) register accessor: an alias for `Reg`"] -pub type INTENSET = crate::Reg; -#[doc = "Enable interrupt"] -pub mod intenset; -#[doc = "INTENCLR (rw) register accessor: an alias for `Reg`"] -pub type INTENCLR = crate::Reg; -#[doc = "Disable interrupt"] -pub mod intenclr; -#[doc = "STATUS (r) register accessor: an alias for `Reg`"] -pub type STATUS = crate::Reg; -#[doc = "Resolution status"] -pub mod status; -#[doc = "ENABLE (rw) register accessor: an alias for `Reg`"] -pub type ENABLE = crate::Reg; -#[doc = "Enable AAR"] -pub mod enable; -#[doc = "NIRK (rw) register accessor: an alias for `Reg`"] -pub type NIRK = crate::Reg; -#[doc = "Number of IRKs"] -pub mod nirk; -#[doc = "IRKPTR (rw) register accessor: an alias for `Reg`"] -pub type IRKPTR = crate::Reg; -#[doc = "Pointer to IRK data structure"] -pub mod irkptr; -#[doc = "ADDRPTR (rw) register accessor: an alias for `Reg`"] -pub type ADDRPTR = crate::Reg; -#[doc = "Pointer to the resolvable address"] -pub mod addrptr; -#[doc = "SCRATCHPTR (rw) register accessor: an alias for `Reg`"] -pub type SCRATCHPTR = crate::Reg; -#[doc = "Pointer to data area used for temporary storage"] -pub mod scratchptr; diff --git a/down-the-stack/dk_pac/src/aar/addrptr.rs b/down-the-stack/dk_pac/src/aar/addrptr.rs deleted file mode 100644 index fca9493..0000000 --- a/down-the-stack/dk_pac/src/aar/addrptr.rs +++ /dev/null @@ -1,80 +0,0 @@ -#[doc = "Register `ADDRPTR` 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 `ADDRPTR` 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 `ADDRPTR` reader - Pointer to the resolvable address (6-bytes)"] -pub type ADDRPTR_R = crate::FieldReader; -#[doc = "Field `ADDRPTR` writer - Pointer to the resolvable address (6-bytes)"] -pub type ADDRPTR_W<'a, const O: u8> = crate::FieldWriter<'a, u32, ADDRPTR_SPEC, u32, u32, 32, O>; -impl R { - #[doc = "Bits 0:31 - Pointer to the resolvable address (6-bytes)"] - #[inline(always)] - pub fn addrptr(&self) -> ADDRPTR_R { - ADDRPTR_R::new(self.bits) - } -} -impl W { - #[doc = "Bits 0:31 - Pointer to the resolvable address (6-bytes)"] - #[inline(always)] - #[must_use] - pub fn addrptr(&mut self) -> ADDRPTR_W<0> { - ADDRPTR_W::new(self) - } - #[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 = "Pointer to the resolvable address\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 [addrptr](index.html) module"] -pub struct ADDRPTR_SPEC; -impl crate::RegisterSpec for ADDRPTR_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [addrptr::R](R) reader structure"] -impl crate::Readable for ADDRPTR_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [addrptr::W](W) writer structure"] -impl crate::Writable for ADDRPTR_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets ADDRPTR to value 0"] -impl crate::Resettable for ADDRPTR_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/aar/enable.rs b/down-the-stack/dk_pac/src/aar/enable.rs deleted file mode 100644 index abfcf33..0000000 --- a/down-the-stack/dk_pac/src/aar/enable.rs +++ /dev/null @@ -1,128 +0,0 @@ -#[doc = "Register `ENABLE` 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 `ENABLE` 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 `ENABLE` reader - Enable or disable AAR"] -pub type ENABLE_R = crate::FieldReader; -#[doc = "Enable or disable AAR\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -#[repr(u8)] -pub enum ENABLE_A { - #[doc = "0: Disable"] - DISABLED = 0, - #[doc = "3: Enable"] - ENABLED = 3, -} -impl From for u8 { - #[inline(always)] - fn from(variant: ENABLE_A) -> Self { - variant as _ - } -} -impl ENABLE_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> Option { - match self.bits { - 0 => Some(ENABLE_A::DISABLED), - 3 => Some(ENABLE_A::ENABLED), - _ => None, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == ENABLE_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == ENABLE_A::ENABLED - } -} -#[doc = "Field `ENABLE` writer - Enable or disable AAR"] -pub type ENABLE_W<'a, const O: u8> = crate::FieldWriter<'a, u32, ENABLE_SPEC, u8, ENABLE_A, 2, O>; -impl<'a, const O: u8> ENABLE_W<'a, O> { - #[doc = "Disable"] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(ENABLE_A::DISABLED) - } - #[doc = "Enable"] - #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(ENABLE_A::ENABLED) - } -} -impl R { - #[doc = "Bits 0:1 - Enable or disable AAR"] - #[inline(always)] - pub fn enable(&self) -> ENABLE_R { - ENABLE_R::new((self.bits & 3) as u8) - } -} -impl W { - #[doc = "Bits 0:1 - Enable or disable AAR"] - #[inline(always)] - #[must_use] - pub fn enable(&mut self) -> ENABLE_W<0> { - 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 - } -} -#[doc = "Enable AAR\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 [enable](index.html) module"] -pub struct ENABLE_SPEC; -impl crate::RegisterSpec for ENABLE_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [enable::R](R) reader structure"] -impl crate::Readable for ENABLE_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [enable::W](W) writer structure"] -impl crate::Writable for ENABLE_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets ENABLE to value 0"] -impl crate::Resettable for ENABLE_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/aar/events_end.rs b/down-the-stack/dk_pac/src/aar/events_end.rs deleted file mode 100644 index 9fd544e..0000000 --- a/down-the-stack/dk_pac/src/aar/events_end.rs +++ /dev/null @@ -1,127 +0,0 @@ -#[doc = "Register `EVENTS_END` 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 `EVENTS_END` 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 `EVENTS_END` reader - Address resolution procedure complete"] -pub type EVENTS_END_R = crate::BitReader; -#[doc = "Address resolution procedure complete\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum EVENTS_END_A { - #[doc = "0: Event not generated"] - NOT_GENERATED = 0, - #[doc = "1: Event generated"] - GENERATED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: EVENTS_END_A) -> Self { - variant as u8 != 0 - } -} -impl EVENTS_END_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> EVENTS_END_A { - match self.bits { - false => EVENTS_END_A::NOT_GENERATED, - true => EVENTS_END_A::GENERATED, - } - } - #[doc = "Checks if the value of the field is `NOT_GENERATED`"] - #[inline(always)] - pub fn is_not_generated(&self) -> bool { - *self == EVENTS_END_A::NOT_GENERATED - } - #[doc = "Checks if the value of the field is `GENERATED`"] - #[inline(always)] - pub fn is_generated(&self) -> bool { - *self == EVENTS_END_A::GENERATED - } -} -#[doc = "Field `EVENTS_END` writer - Address resolution procedure complete"] -pub type EVENTS_END_W<'a, const O: u8> = - crate::BitWriter<'a, u32, EVENTS_END_SPEC, EVENTS_END_A, O>; -impl<'a, const O: u8> EVENTS_END_W<'a, O> { - #[doc = "Event not generated"] - #[inline(always)] - pub fn not_generated(self) -> &'a mut W { - self.variant(EVENTS_END_A::NOT_GENERATED) - } - #[doc = "Event generated"] - #[inline(always)] - pub fn generated(self) -> &'a mut W { - self.variant(EVENTS_END_A::GENERATED) - } -} -impl R { - #[doc = "Bit 0 - Address resolution procedure complete"] - #[inline(always)] - pub fn events_end(&self) -> EVENTS_END_R { - EVENTS_END_R::new((self.bits & 1) != 0) - } -} -impl W { - #[doc = "Bit 0 - Address resolution procedure complete"] - #[inline(always)] - #[must_use] - pub fn events_end(&mut self) -> EVENTS_END_W<0> { - EVENTS_END_W::new(self) - } - #[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 = "Address resolution procedure complete\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 [events_end](index.html) module"] -pub struct EVENTS_END_SPEC; -impl crate::RegisterSpec for EVENTS_END_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [events_end::R](R) reader structure"] -impl crate::Readable for EVENTS_END_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [events_end::W](W) writer structure"] -impl crate::Writable for EVENTS_END_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets EVENTS_END to value 0"] -impl crate::Resettable for EVENTS_END_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/aar/events_notresolved.rs b/down-the-stack/dk_pac/src/aar/events_notresolved.rs deleted file mode 100644 index 4eedb18..0000000 --- a/down-the-stack/dk_pac/src/aar/events_notresolved.rs +++ /dev/null @@ -1,127 +0,0 @@ -#[doc = "Register `EVENTS_NOTRESOLVED` 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 `EVENTS_NOTRESOLVED` 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 `EVENTS_NOTRESOLVED` reader - Address not resolved"] -pub type EVENTS_NOTRESOLVED_R = crate::BitReader; -#[doc = "Address not resolved\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum EVENTS_NOTRESOLVED_A { - #[doc = "0: Event not generated"] - NOT_GENERATED = 0, - #[doc = "1: Event generated"] - GENERATED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: EVENTS_NOTRESOLVED_A) -> Self { - variant as u8 != 0 - } -} -impl EVENTS_NOTRESOLVED_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> EVENTS_NOTRESOLVED_A { - match self.bits { - false => EVENTS_NOTRESOLVED_A::NOT_GENERATED, - true => EVENTS_NOTRESOLVED_A::GENERATED, - } - } - #[doc = "Checks if the value of the field is `NOT_GENERATED`"] - #[inline(always)] - pub fn is_not_generated(&self) -> bool { - *self == EVENTS_NOTRESOLVED_A::NOT_GENERATED - } - #[doc = "Checks if the value of the field is `GENERATED`"] - #[inline(always)] - pub fn is_generated(&self) -> bool { - *self == EVENTS_NOTRESOLVED_A::GENERATED - } -} -#[doc = "Field `EVENTS_NOTRESOLVED` writer - Address not resolved"] -pub type EVENTS_NOTRESOLVED_W<'a, const O: u8> = - crate::BitWriter<'a, u32, EVENTS_NOTRESOLVED_SPEC, EVENTS_NOTRESOLVED_A, O>; -impl<'a, const O: u8> EVENTS_NOTRESOLVED_W<'a, O> { - #[doc = "Event not generated"] - #[inline(always)] - pub fn not_generated(self) -> &'a mut W { - self.variant(EVENTS_NOTRESOLVED_A::NOT_GENERATED) - } - #[doc = "Event generated"] - #[inline(always)] - pub fn generated(self) -> &'a mut W { - self.variant(EVENTS_NOTRESOLVED_A::GENERATED) - } -} -impl R { - #[doc = "Bit 0 - Address not resolved"] - #[inline(always)] - pub fn events_notresolved(&self) -> EVENTS_NOTRESOLVED_R { - EVENTS_NOTRESOLVED_R::new((self.bits & 1) != 0) - } -} -impl W { - #[doc = "Bit 0 - Address not resolved"] - #[inline(always)] - #[must_use] - pub fn events_notresolved(&mut self) -> EVENTS_NOTRESOLVED_W<0> { - EVENTS_NOTRESOLVED_W::new(self) - } - #[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 = "Address not resolved\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 [events_notresolved](index.html) module"] -pub struct EVENTS_NOTRESOLVED_SPEC; -impl crate::RegisterSpec for EVENTS_NOTRESOLVED_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [events_notresolved::R](R) reader structure"] -impl crate::Readable for EVENTS_NOTRESOLVED_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [events_notresolved::W](W) writer structure"] -impl crate::Writable for EVENTS_NOTRESOLVED_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets EVENTS_NOTRESOLVED to value 0"] -impl crate::Resettable for EVENTS_NOTRESOLVED_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/aar/events_resolved.rs b/down-the-stack/dk_pac/src/aar/events_resolved.rs deleted file mode 100644 index 9372bfb..0000000 --- a/down-the-stack/dk_pac/src/aar/events_resolved.rs +++ /dev/null @@ -1,127 +0,0 @@ -#[doc = "Register `EVENTS_RESOLVED` 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 `EVENTS_RESOLVED` 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 `EVENTS_RESOLVED` reader - Address resolved"] -pub type EVENTS_RESOLVED_R = crate::BitReader; -#[doc = "Address resolved\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum EVENTS_RESOLVED_A { - #[doc = "0: Event not generated"] - NOT_GENERATED = 0, - #[doc = "1: Event generated"] - GENERATED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: EVENTS_RESOLVED_A) -> Self { - variant as u8 != 0 - } -} -impl EVENTS_RESOLVED_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> EVENTS_RESOLVED_A { - match self.bits { - false => EVENTS_RESOLVED_A::NOT_GENERATED, - true => EVENTS_RESOLVED_A::GENERATED, - } - } - #[doc = "Checks if the value of the field is `NOT_GENERATED`"] - #[inline(always)] - pub fn is_not_generated(&self) -> bool { - *self == EVENTS_RESOLVED_A::NOT_GENERATED - } - #[doc = "Checks if the value of the field is `GENERATED`"] - #[inline(always)] - pub fn is_generated(&self) -> bool { - *self == EVENTS_RESOLVED_A::GENERATED - } -} -#[doc = "Field `EVENTS_RESOLVED` writer - Address resolved"] -pub type EVENTS_RESOLVED_W<'a, const O: u8> = - crate::BitWriter<'a, u32, EVENTS_RESOLVED_SPEC, EVENTS_RESOLVED_A, O>; -impl<'a, const O: u8> EVENTS_RESOLVED_W<'a, O> { - #[doc = "Event not generated"] - #[inline(always)] - pub fn not_generated(self) -> &'a mut W { - self.variant(EVENTS_RESOLVED_A::NOT_GENERATED) - } - #[doc = "Event generated"] - #[inline(always)] - pub fn generated(self) -> &'a mut W { - self.variant(EVENTS_RESOLVED_A::GENERATED) - } -} -impl R { - #[doc = "Bit 0 - Address resolved"] - #[inline(always)] - pub fn events_resolved(&self) -> EVENTS_RESOLVED_R { - EVENTS_RESOLVED_R::new((self.bits & 1) != 0) - } -} -impl W { - #[doc = "Bit 0 - Address resolved"] - #[inline(always)] - #[must_use] - pub fn events_resolved(&mut self) -> EVENTS_RESOLVED_W<0> { - EVENTS_RESOLVED_W::new(self) - } - #[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 = "Address resolved\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 [events_resolved](index.html) module"] -pub struct EVENTS_RESOLVED_SPEC; -impl crate::RegisterSpec for EVENTS_RESOLVED_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [events_resolved::R](R) reader structure"] -impl crate::Readable for EVENTS_RESOLVED_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [events_resolved::W](W) writer structure"] -impl crate::Writable for EVENTS_RESOLVED_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets EVENTS_RESOLVED to value 0"] -impl crate::Resettable for EVENTS_RESOLVED_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/aar/intenclr.rs b/down-the-stack/dk_pac/src/aar/intenclr.rs deleted file mode 100644 index 53be582..0000000 --- a/down-the-stack/dk_pac/src/aar/intenclr.rs +++ /dev/null @@ -1,270 +0,0 @@ -#[doc = "Register `INTENCLR` 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 `INTENCLR` 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 `END` reader - Write '1' to disable interrupt for event END"] -pub type END_R = crate::BitReader; -#[doc = "Write '1' to disable interrupt for event END\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum END_A { - #[doc = "0: Read: Disabled"] - DISABLED = 0, - #[doc = "1: Read: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: END_A) -> Self { - variant as u8 != 0 - } -} -impl END_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> END_A { - match self.bits { - false => END_A::DISABLED, - true => END_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == END_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == END_A::ENABLED - } -} -#[doc = "Write '1' to disable interrupt for event END\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum END_AW { - #[doc = "1: Disable"] - CLEAR = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: END_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `END` writer - Write '1' to disable interrupt for event END"] -pub type END_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENCLR_SPEC, END_AW, O>; -impl<'a, const O: u8> END_W<'a, O> { - #[doc = "Disable"] - #[inline(always)] - pub fn clear(self) -> &'a mut W { - self.variant(END_AW::CLEAR) - } -} -#[doc = "Field `RESOLVED` reader - Write '1' to disable interrupt for event RESOLVED"] -pub type RESOLVED_R = crate::BitReader; -#[doc = "Write '1' to disable interrupt for event RESOLVED\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum RESOLVED_A { - #[doc = "0: Read: Disabled"] - DISABLED = 0, - #[doc = "1: Read: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: RESOLVED_A) -> Self { - variant as u8 != 0 - } -} -impl RESOLVED_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> RESOLVED_A { - match self.bits { - false => RESOLVED_A::DISABLED, - true => RESOLVED_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == RESOLVED_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == RESOLVED_A::ENABLED - } -} -#[doc = "Write '1' to disable interrupt for event RESOLVED\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum RESOLVED_AW { - #[doc = "1: Disable"] - CLEAR = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: RESOLVED_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `RESOLVED` writer - Write '1' to disable interrupt for event RESOLVED"] -pub type RESOLVED_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENCLR_SPEC, RESOLVED_AW, O>; -impl<'a, const O: u8> RESOLVED_W<'a, O> { - #[doc = "Disable"] - #[inline(always)] - pub fn clear(self) -> &'a mut W { - self.variant(RESOLVED_AW::CLEAR) - } -} -#[doc = "Field `NOTRESOLVED` reader - Write '1' to disable interrupt for event NOTRESOLVED"] -pub type NOTRESOLVED_R = crate::BitReader; -#[doc = "Write '1' to disable interrupt for event NOTRESOLVED\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum NOTRESOLVED_A { - #[doc = "0: Read: Disabled"] - DISABLED = 0, - #[doc = "1: Read: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: NOTRESOLVED_A) -> Self { - variant as u8 != 0 - } -} -impl NOTRESOLVED_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> NOTRESOLVED_A { - match self.bits { - false => NOTRESOLVED_A::DISABLED, - true => NOTRESOLVED_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == NOTRESOLVED_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == NOTRESOLVED_A::ENABLED - } -} -#[doc = "Write '1' to disable interrupt for event NOTRESOLVED\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum NOTRESOLVED_AW { - #[doc = "1: Disable"] - CLEAR = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: NOTRESOLVED_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `NOTRESOLVED` writer - Write '1' to disable interrupt for event NOTRESOLVED"] -pub type NOTRESOLVED_W<'a, const O: u8> = - crate::BitWriter<'a, u32, INTENCLR_SPEC, NOTRESOLVED_AW, O>; -impl<'a, const O: u8> NOTRESOLVED_W<'a, O> { - #[doc = "Disable"] - #[inline(always)] - pub fn clear(self) -> &'a mut W { - self.variant(NOTRESOLVED_AW::CLEAR) - } -} -impl R { - #[doc = "Bit 0 - Write '1' to disable interrupt for event END"] - #[inline(always)] - pub fn end(&self) -> END_R { - END_R::new((self.bits & 1) != 0) - } - #[doc = "Bit 1 - Write '1' to disable interrupt for event RESOLVED"] - #[inline(always)] - pub fn resolved(&self) -> RESOLVED_R { - RESOLVED_R::new(((self.bits >> 1) & 1) != 0) - } - #[doc = "Bit 2 - Write '1' to disable interrupt for event NOTRESOLVED"] - #[inline(always)] - pub fn notresolved(&self) -> NOTRESOLVED_R { - NOTRESOLVED_R::new(((self.bits >> 2) & 1) != 0) - } -} -impl W { - #[doc = "Bit 0 - Write '1' to disable interrupt for event END"] - #[inline(always)] - #[must_use] - pub fn end(&mut self) -> END_W<0> { - END_W::new(self) - } - #[doc = "Bit 1 - Write '1' to disable interrupt for event RESOLVED"] - #[inline(always)] - #[must_use] - pub fn resolved(&mut self) -> RESOLVED_W<1> { - RESOLVED_W::new(self) - } - #[doc = "Bit 2 - Write '1' to disable interrupt for event NOTRESOLVED"] - #[inline(always)] - #[must_use] - pub fn notresolved(&mut self) -> NOTRESOLVED_W<2> { - NOTRESOLVED_W::new(self) - } - #[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 = "Disable interrupt\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 [intenclr](index.html) module"] -pub struct INTENCLR_SPEC; -impl crate::RegisterSpec for INTENCLR_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [intenclr::R](R) reader structure"] -impl crate::Readable for INTENCLR_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [intenclr::W](W) writer structure"] -impl crate::Writable for INTENCLR_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets INTENCLR to value 0"] -impl crate::Resettable for INTENCLR_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/aar/intenset.rs b/down-the-stack/dk_pac/src/aar/intenset.rs deleted file mode 100644 index 91ecf85..0000000 --- a/down-the-stack/dk_pac/src/aar/intenset.rs +++ /dev/null @@ -1,270 +0,0 @@ -#[doc = "Register `INTENSET` 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 `INTENSET` 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 `END` reader - Write '1' to enable interrupt for event END"] -pub type END_R = crate::BitReader; -#[doc = "Write '1' to enable interrupt for event END\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum END_A { - #[doc = "0: Read: Disabled"] - DISABLED = 0, - #[doc = "1: Read: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: END_A) -> Self { - variant as u8 != 0 - } -} -impl END_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> END_A { - match self.bits { - false => END_A::DISABLED, - true => END_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == END_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == END_A::ENABLED - } -} -#[doc = "Write '1' to enable interrupt for event END\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum END_AW { - #[doc = "1: Enable"] - SET = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: END_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `END` writer - Write '1' to enable interrupt for event END"] -pub type END_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENSET_SPEC, END_AW, O>; -impl<'a, const O: u8> END_W<'a, O> { - #[doc = "Enable"] - #[inline(always)] - pub fn set(self) -> &'a mut W { - self.variant(END_AW::SET) - } -} -#[doc = "Field `RESOLVED` reader - Write '1' to enable interrupt for event RESOLVED"] -pub type RESOLVED_R = crate::BitReader; -#[doc = "Write '1' to enable interrupt for event RESOLVED\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum RESOLVED_A { - #[doc = "0: Read: Disabled"] - DISABLED = 0, - #[doc = "1: Read: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: RESOLVED_A) -> Self { - variant as u8 != 0 - } -} -impl RESOLVED_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> RESOLVED_A { - match self.bits { - false => RESOLVED_A::DISABLED, - true => RESOLVED_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == RESOLVED_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == RESOLVED_A::ENABLED - } -} -#[doc = "Write '1' to enable interrupt for event RESOLVED\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum RESOLVED_AW { - #[doc = "1: Enable"] - SET = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: RESOLVED_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `RESOLVED` writer - Write '1' to enable interrupt for event RESOLVED"] -pub type RESOLVED_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENSET_SPEC, RESOLVED_AW, O>; -impl<'a, const O: u8> RESOLVED_W<'a, O> { - #[doc = "Enable"] - #[inline(always)] - pub fn set(self) -> &'a mut W { - self.variant(RESOLVED_AW::SET) - } -} -#[doc = "Field `NOTRESOLVED` reader - Write '1' to enable interrupt for event NOTRESOLVED"] -pub type NOTRESOLVED_R = crate::BitReader; -#[doc = "Write '1' to enable interrupt for event NOTRESOLVED\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum NOTRESOLVED_A { - #[doc = "0: Read: Disabled"] - DISABLED = 0, - #[doc = "1: Read: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: NOTRESOLVED_A) -> Self { - variant as u8 != 0 - } -} -impl NOTRESOLVED_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> NOTRESOLVED_A { - match self.bits { - false => NOTRESOLVED_A::DISABLED, - true => NOTRESOLVED_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == NOTRESOLVED_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == NOTRESOLVED_A::ENABLED - } -} -#[doc = "Write '1' to enable interrupt for event NOTRESOLVED\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum NOTRESOLVED_AW { - #[doc = "1: Enable"] - SET = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: NOTRESOLVED_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `NOTRESOLVED` writer - Write '1' to enable interrupt for event NOTRESOLVED"] -pub type NOTRESOLVED_W<'a, const O: u8> = - crate::BitWriter<'a, u32, INTENSET_SPEC, NOTRESOLVED_AW, O>; -impl<'a, const O: u8> NOTRESOLVED_W<'a, O> { - #[doc = "Enable"] - #[inline(always)] - pub fn set(self) -> &'a mut W { - self.variant(NOTRESOLVED_AW::SET) - } -} -impl R { - #[doc = "Bit 0 - Write '1' to enable interrupt for event END"] - #[inline(always)] - pub fn end(&self) -> END_R { - END_R::new((self.bits & 1) != 0) - } - #[doc = "Bit 1 - Write '1' to enable interrupt for event RESOLVED"] - #[inline(always)] - pub fn resolved(&self) -> RESOLVED_R { - RESOLVED_R::new(((self.bits >> 1) & 1) != 0) - } - #[doc = "Bit 2 - Write '1' to enable interrupt for event NOTRESOLVED"] - #[inline(always)] - pub fn notresolved(&self) -> NOTRESOLVED_R { - NOTRESOLVED_R::new(((self.bits >> 2) & 1) != 0) - } -} -impl W { - #[doc = "Bit 0 - Write '1' to enable interrupt for event END"] - #[inline(always)] - #[must_use] - pub fn end(&mut self) -> END_W<0> { - END_W::new(self) - } - #[doc = "Bit 1 - Write '1' to enable interrupt for event RESOLVED"] - #[inline(always)] - #[must_use] - pub fn resolved(&mut self) -> RESOLVED_W<1> { - RESOLVED_W::new(self) - } - #[doc = "Bit 2 - Write '1' to enable interrupt for event NOTRESOLVED"] - #[inline(always)] - #[must_use] - pub fn notresolved(&mut self) -> NOTRESOLVED_W<2> { - NOTRESOLVED_W::new(self) - } - #[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 = "Enable interrupt\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 [intenset](index.html) module"] -pub struct INTENSET_SPEC; -impl crate::RegisterSpec for INTENSET_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [intenset::R](R) reader structure"] -impl crate::Readable for INTENSET_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [intenset::W](W) writer structure"] -impl crate::Writable for INTENSET_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets INTENSET to value 0"] -impl crate::Resettable for INTENSET_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/aar/irkptr.rs b/down-the-stack/dk_pac/src/aar/irkptr.rs deleted file mode 100644 index b0aea33..0000000 --- a/down-the-stack/dk_pac/src/aar/irkptr.rs +++ /dev/null @@ -1,80 +0,0 @@ -#[doc = "Register `IRKPTR` 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 `IRKPTR` 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 `IRKPTR` reader - Pointer to the IRK data structure"] -pub type IRKPTR_R = crate::FieldReader; -#[doc = "Field `IRKPTR` writer - Pointer to the IRK data structure"] -pub type IRKPTR_W<'a, const O: u8> = crate::FieldWriter<'a, u32, IRKPTR_SPEC, u32, u32, 32, O>; -impl R { - #[doc = "Bits 0:31 - Pointer to the IRK data structure"] - #[inline(always)] - pub fn irkptr(&self) -> IRKPTR_R { - IRKPTR_R::new(self.bits) - } -} -impl W { - #[doc = "Bits 0:31 - Pointer to the IRK data structure"] - #[inline(always)] - #[must_use] - pub fn irkptr(&mut self) -> IRKPTR_W<0> { - IRKPTR_W::new(self) - } - #[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 = "Pointer to IRK data structure\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 [irkptr](index.html) module"] -pub struct IRKPTR_SPEC; -impl crate::RegisterSpec for IRKPTR_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [irkptr::R](R) reader structure"] -impl crate::Readable for IRKPTR_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [irkptr::W](W) writer structure"] -impl crate::Writable for IRKPTR_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets IRKPTR to value 0"] -impl crate::Resettable for IRKPTR_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/aar/nirk.rs b/down-the-stack/dk_pac/src/aar/nirk.rs deleted file mode 100644 index 97998b6..0000000 --- a/down-the-stack/dk_pac/src/aar/nirk.rs +++ /dev/null @@ -1,80 +0,0 @@ -#[doc = "Register `NIRK` 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 `NIRK` 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 `NIRK` reader - Number of Identity root keys available in the IRK data structure"] -pub type NIRK_R = crate::FieldReader; -#[doc = "Field `NIRK` writer - Number of Identity root keys available in the IRK data structure"] -pub type NIRK_W<'a, const O: u8> = crate::FieldWriter<'a, u32, NIRK_SPEC, u8, u8, 5, O>; -impl R { - #[doc = "Bits 0:4 - Number of Identity root keys available in the IRK data structure"] - #[inline(always)] - pub fn nirk(&self) -> NIRK_R { - NIRK_R::new((self.bits & 0x1f) as u8) - } -} -impl W { - #[doc = "Bits 0:4 - Number of Identity root keys available in the IRK data structure"] - #[inline(always)] - #[must_use] - pub fn nirk(&mut self) -> NIRK_W<0> { - NIRK_W::new(self) - } - #[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 = "Number of IRKs\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 [nirk](index.html) module"] -pub struct NIRK_SPEC; -impl crate::RegisterSpec for NIRK_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [nirk::R](R) reader structure"] -impl crate::Readable for NIRK_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [nirk::W](W) writer structure"] -impl crate::Writable for NIRK_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets NIRK to value 0x01"] -impl crate::Resettable for NIRK_SPEC { - const RESET_VALUE: Self::Ux = 0x01; -} diff --git a/down-the-stack/dk_pac/src/aar/scratchptr.rs b/down-the-stack/dk_pac/src/aar/scratchptr.rs deleted file mode 100644 index a080319..0000000 --- a/down-the-stack/dk_pac/src/aar/scratchptr.rs +++ /dev/null @@ -1,81 +0,0 @@ -#[doc = "Register `SCRATCHPTR` 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 `SCRATCHPTR` 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 `SCRATCHPTR` reader - Pointer to a scratch data area used for temporary storage during resolution.A space of minimum 3 bytes must be reserved."] -pub type SCRATCHPTR_R = crate::FieldReader; -#[doc = "Field `SCRATCHPTR` writer - Pointer to a scratch data area used for temporary storage during resolution.A space of minimum 3 bytes must be reserved."] -pub type SCRATCHPTR_W<'a, const O: u8> = - crate::FieldWriter<'a, u32, SCRATCHPTR_SPEC, u32, u32, 32, O>; -impl R { - #[doc = "Bits 0:31 - Pointer to a scratch data area used for temporary storage during resolution.A space of minimum 3 bytes must be reserved."] - #[inline(always)] - pub fn scratchptr(&self) -> SCRATCHPTR_R { - SCRATCHPTR_R::new(self.bits) - } -} -impl W { - #[doc = "Bits 0:31 - Pointer to a scratch data area used for temporary storage during resolution.A space of minimum 3 bytes must be reserved."] - #[inline(always)] - #[must_use] - pub fn scratchptr(&mut self) -> SCRATCHPTR_W<0> { - SCRATCHPTR_W::new(self) - } - #[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 = "Pointer to data area used for temporary storage\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 [scratchptr](index.html) module"] -pub struct SCRATCHPTR_SPEC; -impl crate::RegisterSpec for SCRATCHPTR_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [scratchptr::R](R) reader structure"] -impl crate::Readable for SCRATCHPTR_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [scratchptr::W](W) writer structure"] -impl crate::Writable for SCRATCHPTR_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets SCRATCHPTR to value 0"] -impl crate::Resettable for SCRATCHPTR_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/aar/status.rs b/down-the-stack/dk_pac/src/aar/status.rs deleted file mode 100644 index d46a373..0000000 --- a/down-the-stack/dk_pac/src/aar/status.rs +++ /dev/null @@ -1,37 +0,0 @@ -#[doc = "Register `STATUS` 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 = "Field `STATUS` reader - The IRK that was used last time an address was resolved"] -pub type STATUS_R = crate::FieldReader; -impl R { - #[doc = "Bits 0:3 - The IRK that was used last time an address was resolved"] - #[inline(always)] - pub fn status(&self) -> STATUS_R { - STATUS_R::new((self.bits & 0x0f) as u8) - } -} -#[doc = "Resolution 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 [status](index.html) module"] -pub struct STATUS_SPEC; -impl crate::RegisterSpec for STATUS_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [status::R](R) reader structure"] -impl crate::Readable for STATUS_SPEC { - type Reader = R; -} -#[doc = "`reset()` method sets STATUS to value 0"] -impl crate::Resettable for STATUS_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/aar/tasks_start.rs b/down-the-stack/dk_pac/src/aar/tasks_start.rs deleted file mode 100644 index 22a37ed..0000000 --- a/down-the-stack/dk_pac/src/aar/tasks_start.rs +++ /dev/null @@ -1,72 +0,0 @@ -#[doc = "Register `TASKS_START` 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 = "Start resolving addresses based on IRKs specified in the IRK data structure\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum TASKS_START_AW { - #[doc = "1: Trigger task"] - TRIGGER = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: TASKS_START_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `TASKS_START` writer - Start resolving addresses based on IRKs specified in the IRK data structure"] -pub type TASKS_START_W<'a, const O: u8> = - crate::BitWriter<'a, u32, TASKS_START_SPEC, TASKS_START_AW, O>; -impl<'a, const O: u8> TASKS_START_W<'a, O> { - #[doc = "Trigger task"] - #[inline(always)] - pub fn trigger(self) -> &'a mut W { - self.variant(TASKS_START_AW::TRIGGER) - } -} -impl W { - #[doc = "Bit 0 - Start resolving addresses based on IRKs specified in the IRK data structure"] - #[inline(always)] - #[must_use] - pub fn tasks_start(&mut self) -> TASKS_START_W<0> { - TASKS_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 - } -} -#[doc = "Start resolving addresses based on IRKs specified in the IRK data structure\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 [tasks_start](index.html) module"] -pub struct TASKS_START_SPEC; -impl crate::RegisterSpec for TASKS_START_SPEC { - type Ux = u32; -} -#[doc = "`write(|w| ..)` method takes [tasks_start::W](W) writer structure"] -impl crate::Writable for TASKS_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 TASKS_START to value 0"] -impl crate::Resettable for TASKS_START_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/aar/tasks_stop.rs b/down-the-stack/dk_pac/src/aar/tasks_stop.rs deleted file mode 100644 index e7ab99b..0000000 --- a/down-the-stack/dk_pac/src/aar/tasks_stop.rs +++ /dev/null @@ -1,72 +0,0 @@ -#[doc = "Register `TASKS_STOP` 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 = "Stop resolving addresses\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum TASKS_STOP_AW { - #[doc = "1: Trigger task"] - TRIGGER = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: TASKS_STOP_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `TASKS_STOP` writer - Stop resolving addresses"] -pub type TASKS_STOP_W<'a, const O: u8> = - crate::BitWriter<'a, u32, TASKS_STOP_SPEC, TASKS_STOP_AW, O>; -impl<'a, const O: u8> TASKS_STOP_W<'a, O> { - #[doc = "Trigger task"] - #[inline(always)] - pub fn trigger(self) -> &'a mut W { - self.variant(TASKS_STOP_AW::TRIGGER) - } -} -impl W { - #[doc = "Bit 0 - Stop resolving addresses"] - #[inline(always)] - #[must_use] - pub fn tasks_stop(&mut self) -> TASKS_STOP_W<0> { - TASKS_STOP_W::new(self) - } - #[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 = "Stop resolving addresses\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 [tasks_stop](index.html) module"] -pub struct TASKS_STOP_SPEC; -impl crate::RegisterSpec for TASKS_STOP_SPEC { - type Ux = u32; -} -#[doc = "`write(|w| ..)` method takes [tasks_stop::W](W) writer structure"] -impl crate::Writable for TASKS_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 TASKS_STOP to value 0"] -impl crate::Resettable for TASKS_STOP_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/approtect.rs b/down-the-stack/dk_pac/src/approtect.rs deleted file mode 100644 index a5d7637..0000000 --- a/down-the-stack/dk_pac/src/approtect.rs +++ /dev/null @@ -1,18 +0,0 @@ -#[doc = r"Register block"] -#[repr(C)] -pub struct RegisterBlock { - _reserved0: [u8; 0x0550], - #[doc = "0x550 - Software force enable APPROTECT mechanism until next reset. This register can only be written once."] - pub forceprotect: FORCEPROTECT, - _reserved1: [u8; 0x04], - #[doc = "0x558 - Software disable APPROTECT mechanism"] - pub disable: DISABLE, -} -#[doc = "FORCEPROTECT (rw) register accessor: an alias for `Reg`"] -pub type FORCEPROTECT = crate::Reg; -#[doc = "Software force enable APPROTECT mechanism until next reset. This register can only be written once."] -pub mod forceprotect; -#[doc = "DISABLE (rw) register accessor: an alias for `Reg`"] -pub type DISABLE = crate::Reg; -#[doc = "Software disable APPROTECT mechanism"] -pub mod disable; diff --git a/down-the-stack/dk_pac/src/approtect/disable.rs b/down-the-stack/dk_pac/src/approtect/disable.rs deleted file mode 100644 index 21fb477..0000000 --- a/down-the-stack/dk_pac/src/approtect/disable.rs +++ /dev/null @@ -1,116 +0,0 @@ -#[doc = "Register `DISABLE` 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 `DISABLE` 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 `DISABLE` reader - Software disable APPROTECT mechanism"] -pub type DISABLE_R = crate::FieldReader; -#[doc = "Software disable APPROTECT mechanism\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -#[repr(u8)] -pub enum DISABLE_A { - #[doc = "90: Software disable APPROTECT mechanism"] - SW_DISABLE = 90, -} -impl From for u8 { - #[inline(always)] - fn from(variant: DISABLE_A) -> Self { - variant as _ - } -} -impl DISABLE_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> Option { - match self.bits { - 90 => Some(DISABLE_A::SW_DISABLE), - _ => None, - } - } - #[doc = "Checks if the value of the field is `SW_DISABLE`"] - #[inline(always)] - pub fn is_sw_disable(&self) -> bool { - *self == DISABLE_A::SW_DISABLE - } -} -#[doc = "Field `DISABLE` writer - Software disable APPROTECT mechanism"] -pub type DISABLE_W<'a, const O: u8> = - crate::FieldWriter<'a, u32, DISABLE_SPEC, u8, DISABLE_A, 8, O>; -impl<'a, const O: u8> DISABLE_W<'a, O> { - #[doc = "Software disable APPROTECT mechanism"] - #[inline(always)] - pub fn sw_disable(self) -> &'a mut W { - self.variant(DISABLE_A::SW_DISABLE) - } -} -impl R { - #[doc = "Bits 0:7 - Software disable APPROTECT mechanism"] - #[inline(always)] - pub fn disable(&self) -> DISABLE_R { - DISABLE_R::new((self.bits & 0xff) as u8) - } -} -impl W { - #[doc = "Bits 0:7 - Software disable APPROTECT mechanism"] - #[inline(always)] - #[must_use] - pub fn disable(&mut self) -> DISABLE_W<0> { - DISABLE_W::new(self) - } - #[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 = "Software disable APPROTECT mechanism\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 [disable](index.html) module"] -pub struct DISABLE_SPEC; -impl crate::RegisterSpec for DISABLE_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [disable::R](R) reader structure"] -impl crate::Readable for DISABLE_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [disable::W](W) writer structure"] -impl crate::Writable for DISABLE_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets DISABLE to value 0"] -impl crate::Resettable for DISABLE_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/approtect/forceprotect.rs b/down-the-stack/dk_pac/src/approtect/forceprotect.rs deleted file mode 100644 index 300abc0..0000000 --- a/down-the-stack/dk_pac/src/approtect/forceprotect.rs +++ /dev/null @@ -1,116 +0,0 @@ -#[doc = "Register `FORCEPROTECT` 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 `FORCEPROTECT` 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 `FORCEPROTECT` reader - Write 0x0 to force enable APPROTECT mechanism"] -pub type FORCEPROTECT_R = crate::FieldReader; -#[doc = "Write 0x0 to force enable APPROTECT mechanism\n\nValue on reset: 255"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -#[repr(u8)] -pub enum FORCEPROTECT_A { - #[doc = "0: Software force enable APPROTECT mechanism"] - FORCE = 0, -} -impl From for u8 { - #[inline(always)] - fn from(variant: FORCEPROTECT_A) -> Self { - variant as _ - } -} -impl FORCEPROTECT_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> Option { - match self.bits { - 0 => Some(FORCEPROTECT_A::FORCE), - _ => None, - } - } - #[doc = "Checks if the value of the field is `FORCE`"] - #[inline(always)] - pub fn is_force(&self) -> bool { - *self == FORCEPROTECT_A::FORCE - } -} -#[doc = "Field `FORCEPROTECT` writer - Write 0x0 to force enable APPROTECT mechanism"] -pub type FORCEPROTECT_W<'a, const O: u8> = - crate::FieldWriter<'a, u32, FORCEPROTECT_SPEC, u8, FORCEPROTECT_A, 8, O>; -impl<'a, const O: u8> FORCEPROTECT_W<'a, O> { - #[doc = "Software force enable APPROTECT mechanism"] - #[inline(always)] - pub fn force(self) -> &'a mut W { - self.variant(FORCEPROTECT_A::FORCE) - } -} -impl R { - #[doc = "Bits 0:7 - Write 0x0 to force enable APPROTECT mechanism"] - #[inline(always)] - pub fn forceprotect(&self) -> FORCEPROTECT_R { - FORCEPROTECT_R::new((self.bits & 0xff) as u8) - } -} -impl W { - #[doc = "Bits 0:7 - Write 0x0 to force enable APPROTECT mechanism"] - #[inline(always)] - #[must_use] - pub fn forceprotect(&mut self) -> FORCEPROTECT_W<0> { - FORCEPROTECT_W::new(self) - } - #[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 = "Software force enable APPROTECT mechanism until next reset. This register can only be written once.\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 [forceprotect](index.html) module"] -pub struct FORCEPROTECT_SPEC; -impl crate::RegisterSpec for FORCEPROTECT_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [forceprotect::R](R) reader structure"] -impl crate::Readable for FORCEPROTECT_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [forceprotect::W](W) writer structure"] -impl crate::Writable for FORCEPROTECT_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets FORCEPROTECT to value 0xffff_ffff"] -impl crate::Resettable for FORCEPROTECT_SPEC { - const RESET_VALUE: Self::Ux = 0xffff_ffff; -} diff --git a/down-the-stack/dk_pac/src/bprot.rs b/down-the-stack/dk_pac/src/bprot.rs deleted file mode 100644 index e9d8d35..0000000 --- a/down-the-stack/dk_pac/src/bprot.rs +++ /dev/null @@ -1,36 +0,0 @@ -#[doc = r"Register block"] -#[repr(C)] -pub struct RegisterBlock { - _reserved0: [u8; 0x0600], - #[doc = "0x600 - Block protect configuration register 0"] - pub config0: CONFIG0, - #[doc = "0x604 - Block protect configuration register 1"] - pub config1: CONFIG1, - #[doc = "0x608 - Disable protection mechanism in debug interface mode"] - pub disableindebug: DISABLEINDEBUG, - _reserved3: [u8; 0x04], - #[doc = "0x610 - Block protect configuration register 2"] - pub config2: CONFIG2, - #[doc = "0x614 - Block protect configuration register 3"] - pub config3: CONFIG3, -} -#[doc = "CONFIG0 (rw) register accessor: an alias for `Reg`"] -pub type CONFIG0 = crate::Reg; -#[doc = "Block protect configuration register 0"] -pub mod config0; -#[doc = "CONFIG1 (rw) register accessor: an alias for `Reg`"] -pub type CONFIG1 = crate::Reg; -#[doc = "Block protect configuration register 1"] -pub mod config1; -#[doc = "DISABLEINDEBUG (rw) register accessor: an alias for `Reg`"] -pub type DISABLEINDEBUG = crate::Reg; -#[doc = "Disable protection mechanism in debug interface mode"] -pub mod disableindebug; -#[doc = "CONFIG2 (rw) register accessor: an alias for `Reg`"] -pub type CONFIG2 = crate::Reg; -#[doc = "Block protect configuration register 2"] -pub mod config2; -#[doc = "CONFIG3 (rw) register accessor: an alias for `Reg`"] -pub type CONFIG3 = crate::Reg; -#[doc = "Block protect configuration register 3"] -pub mod config3; diff --git a/down-the-stack/dk_pac/src/bprot/config0.rs b/down-the-stack/dk_pac/src/bprot/config0.rs deleted file mode 100644 index ed97056..0000000 --- a/down-the-stack/dk_pac/src/bprot/config0.rs +++ /dev/null @@ -1,2017 +0,0 @@ -#[doc = "Register `CONFIG0` 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 `CONFIG0` 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 `REGION0` reader - Enable protection for region 0. Write '0' has no effect."] -pub type REGION0_R = crate::BitReader; -#[doc = "Enable protection for region 0. Write '0' has no effect.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum REGION0_A { - #[doc = "0: Protection disabled"] - DISABLED = 0, - #[doc = "1: Protection enable"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: REGION0_A) -> Self { - variant as u8 != 0 - } -} -impl REGION0_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> REGION0_A { - match self.bits { - false => REGION0_A::DISABLED, - true => REGION0_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == REGION0_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == REGION0_A::ENABLED - } -} -#[doc = "Field `REGION0` writer - Enable protection for region 0. Write '0' has no effect."] -pub type REGION0_W<'a, const O: u8> = crate::BitWriter<'a, u32, CONFIG0_SPEC, REGION0_A, O>; -impl<'a, const O: u8> REGION0_W<'a, O> { - #[doc = "Protection disabled"] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(REGION0_A::DISABLED) - } - #[doc = "Protection enable"] - #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(REGION0_A::ENABLED) - } -} -#[doc = "Field `REGION1` reader - Enable protection for region 1. Write '0' has no effect."] -pub type REGION1_R = crate::BitReader; -#[doc = "Enable protection for region 1. Write '0' has no effect.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum REGION1_A { - #[doc = "0: Protection disabled"] - DISABLED = 0, - #[doc = "1: Protection enable"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: REGION1_A) -> Self { - variant as u8 != 0 - } -} -impl REGION1_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> REGION1_A { - match self.bits { - false => REGION1_A::DISABLED, - true => REGION1_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == REGION1_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == REGION1_A::ENABLED - } -} -#[doc = "Field `REGION1` writer - Enable protection for region 1. Write '0' has no effect."] -pub type REGION1_W<'a, const O: u8> = crate::BitWriter<'a, u32, CONFIG0_SPEC, REGION1_A, O>; -impl<'a, const O: u8> REGION1_W<'a, O> { - #[doc = "Protection disabled"] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(REGION1_A::DISABLED) - } - #[doc = "Protection enable"] - #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(REGION1_A::ENABLED) - } -} -#[doc = "Field `REGION2` reader - Enable protection for region 2. Write '0' has no effect."] -pub type REGION2_R = crate::BitReader; -#[doc = "Enable protection for region 2. Write '0' has no effect.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum REGION2_A { - #[doc = "0: Protection disabled"] - DISABLED = 0, - #[doc = "1: Protection enable"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: REGION2_A) -> Self { - variant as u8 != 0 - } -} -impl REGION2_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> REGION2_A { - match self.bits { - false => REGION2_A::DISABLED, - true => REGION2_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == REGION2_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == REGION2_A::ENABLED - } -} -#[doc = "Field `REGION2` writer - Enable protection for region 2. Write '0' has no effect."] -pub type REGION2_W<'a, const O: u8> = crate::BitWriter<'a, u32, CONFIG0_SPEC, REGION2_A, O>; -impl<'a, const O: u8> REGION2_W<'a, O> { - #[doc = "Protection disabled"] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(REGION2_A::DISABLED) - } - #[doc = "Protection enable"] - #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(REGION2_A::ENABLED) - } -} -#[doc = "Field `REGION3` reader - Enable protection for region 3. Write '0' has no effect."] -pub type REGION3_R = crate::BitReader; -#[doc = "Enable protection for region 3. Write '0' has no effect.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum REGION3_A { - #[doc = "0: Protection disabled"] - DISABLED = 0, - #[doc = "1: Protection enable"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: REGION3_A) -> Self { - variant as u8 != 0 - } -} -impl REGION3_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> REGION3_A { - match self.bits { - false => REGION3_A::DISABLED, - true => REGION3_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == REGION3_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == REGION3_A::ENABLED - } -} -#[doc = "Field `REGION3` writer - Enable protection for region 3. Write '0' has no effect."] -pub type REGION3_W<'a, const O: u8> = crate::BitWriter<'a, u32, CONFIG0_SPEC, REGION3_A, O>; -impl<'a, const O: u8> REGION3_W<'a, O> { - #[doc = "Protection disabled"] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(REGION3_A::DISABLED) - } - #[doc = "Protection enable"] - #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(REGION3_A::ENABLED) - } -} -#[doc = "Field `REGION4` reader - Enable protection for region 4. Write '0' has no effect."] -pub type REGION4_R = crate::BitReader; -#[doc = "Enable protection for region 4. Write '0' has no effect.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum REGION4_A { - #[doc = "0: Protection disabled"] - DISABLED = 0, - #[doc = "1: Protection enable"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: REGION4_A) -> Self { - variant as u8 != 0 - } -} -impl REGION4_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> REGION4_A { - match self.bits { - false => REGION4_A::DISABLED, - true => REGION4_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == REGION4_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == REGION4_A::ENABLED - } -} -#[doc = "Field `REGION4` writer - Enable protection for region 4. Write '0' has no effect."] -pub type REGION4_W<'a, const O: u8> = crate::BitWriter<'a, u32, CONFIG0_SPEC, REGION4_A, O>; -impl<'a, const O: u8> REGION4_W<'a, O> { - #[doc = "Protection disabled"] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(REGION4_A::DISABLED) - } - #[doc = "Protection enable"] - #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(REGION4_A::ENABLED) - } -} -#[doc = "Field `REGION5` reader - Enable protection for region 5. Write '0' has no effect."] -pub type REGION5_R = crate::BitReader; -#[doc = "Enable protection for region 5. Write '0' has no effect.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum REGION5_A { - #[doc = "0: Protection disabled"] - DISABLED = 0, - #[doc = "1: Protection enable"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: REGION5_A) -> Self { - variant as u8 != 0 - } -} -impl REGION5_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> REGION5_A { - match self.bits { - false => REGION5_A::DISABLED, - true => REGION5_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == REGION5_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == REGION5_A::ENABLED - } -} -#[doc = "Field `REGION5` writer - Enable protection for region 5. Write '0' has no effect."] -pub type REGION5_W<'a, const O: u8> = crate::BitWriter<'a, u32, CONFIG0_SPEC, REGION5_A, O>; -impl<'a, const O: u8> REGION5_W<'a, O> { - #[doc = "Protection disabled"] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(REGION5_A::DISABLED) - } - #[doc = "Protection enable"] - #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(REGION5_A::ENABLED) - } -} -#[doc = "Field `REGION6` reader - Enable protection for region 6. Write '0' has no effect."] -pub type REGION6_R = crate::BitReader; -#[doc = "Enable protection for region 6. Write '0' has no effect.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum REGION6_A { - #[doc = "0: Protection disabled"] - DISABLED = 0, - #[doc = "1: Protection enable"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: REGION6_A) -> Self { - variant as u8 != 0 - } -} -impl REGION6_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> REGION6_A { - match self.bits { - false => REGION6_A::DISABLED, - true => REGION6_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == REGION6_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == REGION6_A::ENABLED - } -} -#[doc = "Field `REGION6` writer - Enable protection for region 6. Write '0' has no effect."] -pub type REGION6_W<'a, const O: u8> = crate::BitWriter<'a, u32, CONFIG0_SPEC, REGION6_A, O>; -impl<'a, const O: u8> REGION6_W<'a, O> { - #[doc = "Protection disabled"] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(REGION6_A::DISABLED) - } - #[doc = "Protection enable"] - #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(REGION6_A::ENABLED) - } -} -#[doc = "Field `REGION7` reader - Enable protection for region 7. Write '0' has no effect."] -pub type REGION7_R = crate::BitReader; -#[doc = "Enable protection for region 7. Write '0' has no effect.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum REGION7_A { - #[doc = "0: Protection disabled"] - DISABLED = 0, - #[doc = "1: Protection enable"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: REGION7_A) -> Self { - variant as u8 != 0 - } -} -impl REGION7_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> REGION7_A { - match self.bits { - false => REGION7_A::DISABLED, - true => REGION7_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == REGION7_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == REGION7_A::ENABLED - } -} -#[doc = "Field `REGION7` writer - Enable protection for region 7. Write '0' has no effect."] -pub type REGION7_W<'a, const O: u8> = crate::BitWriter<'a, u32, CONFIG0_SPEC, REGION7_A, O>; -impl<'a, const O: u8> REGION7_W<'a, O> { - #[doc = "Protection disabled"] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(REGION7_A::DISABLED) - } - #[doc = "Protection enable"] - #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(REGION7_A::ENABLED) - } -} -#[doc = "Field `REGION8` reader - Enable protection for region 8. Write '0' has no effect."] -pub type REGION8_R = crate::BitReader; -#[doc = "Enable protection for region 8. Write '0' has no effect.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum REGION8_A { - #[doc = "0: Protection disabled"] - DISABLED = 0, - #[doc = "1: Protection enable"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: REGION8_A) -> Self { - variant as u8 != 0 - } -} -impl REGION8_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> REGION8_A { - match self.bits { - false => REGION8_A::DISABLED, - true => REGION8_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == REGION8_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == REGION8_A::ENABLED - } -} -#[doc = "Field `REGION8` writer - Enable protection for region 8. Write '0' has no effect."] -pub type REGION8_W<'a, const O: u8> = crate::BitWriter<'a, u32, CONFIG0_SPEC, REGION8_A, O>; -impl<'a, const O: u8> REGION8_W<'a, O> { - #[doc = "Protection disabled"] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(REGION8_A::DISABLED) - } - #[doc = "Protection enable"] - #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(REGION8_A::ENABLED) - } -} -#[doc = "Field `REGION9` reader - Enable protection for region 9. Write '0' has no effect."] -pub type REGION9_R = crate::BitReader; -#[doc = "Enable protection for region 9. Write '0' has no effect.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum REGION9_A { - #[doc = "0: Protection disabled"] - DISABLED = 0, - #[doc = "1: Protection enable"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: REGION9_A) -> Self { - variant as u8 != 0 - } -} -impl REGION9_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> REGION9_A { - match self.bits { - false => REGION9_A::DISABLED, - true => REGION9_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == REGION9_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == REGION9_A::ENABLED - } -} -#[doc = "Field `REGION9` writer - Enable protection for region 9. Write '0' has no effect."] -pub type REGION9_W<'a, const O: u8> = crate::BitWriter<'a, u32, CONFIG0_SPEC, REGION9_A, O>; -impl<'a, const O: u8> REGION9_W<'a, O> { - #[doc = "Protection disabled"] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(REGION9_A::DISABLED) - } - #[doc = "Protection enable"] - #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(REGION9_A::ENABLED) - } -} -#[doc = "Field `REGION10` reader - Enable protection for region 10. Write '0' has no effect."] -pub type REGION10_R = crate::BitReader; -#[doc = "Enable protection for region 10. Write '0' has no effect.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum REGION10_A { - #[doc = "0: Protection disabled"] - DISABLED = 0, - #[doc = "1: Protection enable"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: REGION10_A) -> Self { - variant as u8 != 0 - } -} -impl REGION10_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> REGION10_A { - match self.bits { - false => REGION10_A::DISABLED, - true => REGION10_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == REGION10_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == REGION10_A::ENABLED - } -} -#[doc = "Field `REGION10` writer - Enable protection for region 10. Write '0' has no effect."] -pub type REGION10_W<'a, const O: u8> = crate::BitWriter<'a, u32, CONFIG0_SPEC, REGION10_A, O>; -impl<'a, const O: u8> REGION10_W<'a, O> { - #[doc = "Protection disabled"] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(REGION10_A::DISABLED) - } - #[doc = "Protection enable"] - #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(REGION10_A::ENABLED) - } -} -#[doc = "Field `REGION11` reader - Enable protection for region 11. Write '0' has no effect."] -pub type REGION11_R = crate::BitReader; -#[doc = "Enable protection for region 11. Write '0' has no effect.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum REGION11_A { - #[doc = "0: Protection disabled"] - DISABLED = 0, - #[doc = "1: Protection enable"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: REGION11_A) -> Self { - variant as u8 != 0 - } -} -impl REGION11_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> REGION11_A { - match self.bits { - false => REGION11_A::DISABLED, - true => REGION11_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == REGION11_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == REGION11_A::ENABLED - } -} -#[doc = "Field `REGION11` writer - Enable protection for region 11. Write '0' has no effect."] -pub type REGION11_W<'a, const O: u8> = crate::BitWriter<'a, u32, CONFIG0_SPEC, REGION11_A, O>; -impl<'a, const O: u8> REGION11_W<'a, O> { - #[doc = "Protection disabled"] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(REGION11_A::DISABLED) - } - #[doc = "Protection enable"] - #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(REGION11_A::ENABLED) - } -} -#[doc = "Field `REGION12` reader - Enable protection for region 12. Write '0' has no effect."] -pub type REGION12_R = crate::BitReader; -#[doc = "Enable protection for region 12. Write '0' has no effect.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum REGION12_A { - #[doc = "0: Protection disabled"] - DISABLED = 0, - #[doc = "1: Protection enable"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: REGION12_A) -> Self { - variant as u8 != 0 - } -} -impl REGION12_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> REGION12_A { - match self.bits { - false => REGION12_A::DISABLED, - true => REGION12_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == REGION12_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == REGION12_A::ENABLED - } -} -#[doc = "Field `REGION12` writer - Enable protection for region 12. Write '0' has no effect."] -pub type REGION12_W<'a, const O: u8> = crate::BitWriter<'a, u32, CONFIG0_SPEC, REGION12_A, O>; -impl<'a, const O: u8> REGION12_W<'a, O> { - #[doc = "Protection disabled"] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(REGION12_A::DISABLED) - } - #[doc = "Protection enable"] - #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(REGION12_A::ENABLED) - } -} -#[doc = "Field `REGION13` reader - Enable protection for region 13. Write '0' has no effect."] -pub type REGION13_R = crate::BitReader; -#[doc = "Enable protection for region 13. Write '0' has no effect.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum REGION13_A { - #[doc = "0: Protection disabled"] - DISABLED = 0, - #[doc = "1: Protection enable"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: REGION13_A) -> Self { - variant as u8 != 0 - } -} -impl REGION13_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> REGION13_A { - match self.bits { - false => REGION13_A::DISABLED, - true => REGION13_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == REGION13_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == REGION13_A::ENABLED - } -} -#[doc = "Field `REGION13` writer - Enable protection for region 13. Write '0' has no effect."] -pub type REGION13_W<'a, const O: u8> = crate::BitWriter<'a, u32, CONFIG0_SPEC, REGION13_A, O>; -impl<'a, const O: u8> REGION13_W<'a, O> { - #[doc = "Protection disabled"] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(REGION13_A::DISABLED) - } - #[doc = "Protection enable"] - #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(REGION13_A::ENABLED) - } -} -#[doc = "Field `REGION14` reader - Enable protection for region 14. Write '0' has no effect."] -pub type REGION14_R = crate::BitReader; -#[doc = "Enable protection for region 14. Write '0' has no effect.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum REGION14_A { - #[doc = "0: Protection disabled"] - DISABLED = 0, - #[doc = "1: Protection enable"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: REGION14_A) -> Self { - variant as u8 != 0 - } -} -impl REGION14_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> REGION14_A { - match self.bits { - false => REGION14_A::DISABLED, - true => REGION14_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == REGION14_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == REGION14_A::ENABLED - } -} -#[doc = "Field `REGION14` writer - Enable protection for region 14. Write '0' has no effect."] -pub type REGION14_W<'a, const O: u8> = crate::BitWriter<'a, u32, CONFIG0_SPEC, REGION14_A, O>; -impl<'a, const O: u8> REGION14_W<'a, O> { - #[doc = "Protection disabled"] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(REGION14_A::DISABLED) - } - #[doc = "Protection enable"] - #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(REGION14_A::ENABLED) - } -} -#[doc = "Field `REGION15` reader - Enable protection for region 15. Write '0' has no effect."] -pub type REGION15_R = crate::BitReader; -#[doc = "Enable protection for region 15. Write '0' has no effect.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum REGION15_A { - #[doc = "0: Protection disabled"] - DISABLED = 0, - #[doc = "1: Protection enable"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: REGION15_A) -> Self { - variant as u8 != 0 - } -} -impl REGION15_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> REGION15_A { - match self.bits { - false => REGION15_A::DISABLED, - true => REGION15_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == REGION15_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == REGION15_A::ENABLED - } -} -#[doc = "Field `REGION15` writer - Enable protection for region 15. Write '0' has no effect."] -pub type REGION15_W<'a, const O: u8> = crate::BitWriter<'a, u32, CONFIG0_SPEC, REGION15_A, O>; -impl<'a, const O: u8> REGION15_W<'a, O> { - #[doc = "Protection disabled"] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(REGION15_A::DISABLED) - } - #[doc = "Protection enable"] - #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(REGION15_A::ENABLED) - } -} -#[doc = "Field `REGION16` reader - Enable protection for region 16. Write '0' has no effect."] -pub type REGION16_R = crate::BitReader; -#[doc = "Enable protection for region 16. Write '0' has no effect.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum REGION16_A { - #[doc = "0: Protection disabled"] - DISABLED = 0, - #[doc = "1: Protection enable"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: REGION16_A) -> Self { - variant as u8 != 0 - } -} -impl REGION16_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> REGION16_A { - match self.bits { - false => REGION16_A::DISABLED, - true => REGION16_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == REGION16_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == REGION16_A::ENABLED - } -} -#[doc = "Field `REGION16` writer - Enable protection for region 16. Write '0' has no effect."] -pub type REGION16_W<'a, const O: u8> = crate::BitWriter<'a, u32, CONFIG0_SPEC, REGION16_A, O>; -impl<'a, const O: u8> REGION16_W<'a, O> { - #[doc = "Protection disabled"] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(REGION16_A::DISABLED) - } - #[doc = "Protection enable"] - #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(REGION16_A::ENABLED) - } -} -#[doc = "Field `REGION17` reader - Enable protection for region 17. Write '0' has no effect."] -pub type REGION17_R = crate::BitReader; -#[doc = "Enable protection for region 17. Write '0' has no effect.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum REGION17_A { - #[doc = "0: Protection disabled"] - DISABLED = 0, - #[doc = "1: Protection enable"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: REGION17_A) -> Self { - variant as u8 != 0 - } -} -impl REGION17_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> REGION17_A { - match self.bits { - false => REGION17_A::DISABLED, - true => REGION17_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == REGION17_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == REGION17_A::ENABLED - } -} -#[doc = "Field `REGION17` writer - Enable protection for region 17. Write '0' has no effect."] -pub type REGION17_W<'a, const O: u8> = crate::BitWriter<'a, u32, CONFIG0_SPEC, REGION17_A, O>; -impl<'a, const O: u8> REGION17_W<'a, O> { - #[doc = "Protection disabled"] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(REGION17_A::DISABLED) - } - #[doc = "Protection enable"] - #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(REGION17_A::ENABLED) - } -} -#[doc = "Field `REGION18` reader - Enable protection for region 18. Write '0' has no effect."] -pub type REGION18_R = crate::BitReader; -#[doc = "Enable protection for region 18. Write '0' has no effect.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum REGION18_A { - #[doc = "0: Protection disabled"] - DISABLED = 0, - #[doc = "1: Protection enable"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: REGION18_A) -> Self { - variant as u8 != 0 - } -} -impl REGION18_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> REGION18_A { - match self.bits { - false => REGION18_A::DISABLED, - true => REGION18_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == REGION18_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == REGION18_A::ENABLED - } -} -#[doc = "Field `REGION18` writer - Enable protection for region 18. Write '0' has no effect."] -pub type REGION18_W<'a, const O: u8> = crate::BitWriter<'a, u32, CONFIG0_SPEC, REGION18_A, O>; -impl<'a, const O: u8> REGION18_W<'a, O> { - #[doc = "Protection disabled"] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(REGION18_A::DISABLED) - } - #[doc = "Protection enable"] - #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(REGION18_A::ENABLED) - } -} -#[doc = "Field `REGION19` reader - Enable protection for region 19. Write '0' has no effect."] -pub type REGION19_R = crate::BitReader; -#[doc = "Enable protection for region 19. Write '0' has no effect.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum REGION19_A { - #[doc = "0: Protection disabled"] - DISABLED = 0, - #[doc = "1: Protection enable"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: REGION19_A) -> Self { - variant as u8 != 0 - } -} -impl REGION19_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> REGION19_A { - match self.bits { - false => REGION19_A::DISABLED, - true => REGION19_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == REGION19_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == REGION19_A::ENABLED - } -} -#[doc = "Field `REGION19` writer - Enable protection for region 19. Write '0' has no effect."] -pub type REGION19_W<'a, const O: u8> = crate::BitWriter<'a, u32, CONFIG0_SPEC, REGION19_A, O>; -impl<'a, const O: u8> REGION19_W<'a, O> { - #[doc = "Protection disabled"] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(REGION19_A::DISABLED) - } - #[doc = "Protection enable"] - #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(REGION19_A::ENABLED) - } -} -#[doc = "Field `REGION20` reader - Enable protection for region 20. Write '0' has no effect."] -pub type REGION20_R = crate::BitReader; -#[doc = "Enable protection for region 20. Write '0' has no effect.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum REGION20_A { - #[doc = "0: Protection disabled"] - DISABLED = 0, - #[doc = "1: Protection enable"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: REGION20_A) -> Self { - variant as u8 != 0 - } -} -impl REGION20_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> REGION20_A { - match self.bits { - false => REGION20_A::DISABLED, - true => REGION20_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == REGION20_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == REGION20_A::ENABLED - } -} -#[doc = "Field `REGION20` writer - Enable protection for region 20. Write '0' has no effect."] -pub type REGION20_W<'a, const O: u8> = crate::BitWriter<'a, u32, CONFIG0_SPEC, REGION20_A, O>; -impl<'a, const O: u8> REGION20_W<'a, O> { - #[doc = "Protection disabled"] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(REGION20_A::DISABLED) - } - #[doc = "Protection enable"] - #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(REGION20_A::ENABLED) - } -} -#[doc = "Field `REGION21` reader - Enable protection for region 21. Write '0' has no effect."] -pub type REGION21_R = crate::BitReader; -#[doc = "Enable protection for region 21. Write '0' has no effect.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum REGION21_A { - #[doc = "0: Protection disabled"] - DISABLED = 0, - #[doc = "1: Protection enable"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: REGION21_A) -> Self { - variant as u8 != 0 - } -} -impl REGION21_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> REGION21_A { - match self.bits { - false => REGION21_A::DISABLED, - true => REGION21_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == REGION21_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == REGION21_A::ENABLED - } -} -#[doc = "Field `REGION21` writer - Enable protection for region 21. Write '0' has no effect."] -pub type REGION21_W<'a, const O: u8> = crate::BitWriter<'a, u32, CONFIG0_SPEC, REGION21_A, O>; -impl<'a, const O: u8> REGION21_W<'a, O> { - #[doc = "Protection disabled"] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(REGION21_A::DISABLED) - } - #[doc = "Protection enable"] - #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(REGION21_A::ENABLED) - } -} -#[doc = "Field `REGION22` reader - Enable protection for region 22. Write '0' has no effect."] -pub type REGION22_R = crate::BitReader; -#[doc = "Enable protection for region 22. Write '0' has no effect.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum REGION22_A { - #[doc = "0: Protection disabled"] - DISABLED = 0, - #[doc = "1: Protection enable"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: REGION22_A) -> Self { - variant as u8 != 0 - } -} -impl REGION22_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> REGION22_A { - match self.bits { - false => REGION22_A::DISABLED, - true => REGION22_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == REGION22_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == REGION22_A::ENABLED - } -} -#[doc = "Field `REGION22` writer - Enable protection for region 22. Write '0' has no effect."] -pub type REGION22_W<'a, const O: u8> = crate::BitWriter<'a, u32, CONFIG0_SPEC, REGION22_A, O>; -impl<'a, const O: u8> REGION22_W<'a, O> { - #[doc = "Protection disabled"] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(REGION22_A::DISABLED) - } - #[doc = "Protection enable"] - #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(REGION22_A::ENABLED) - } -} -#[doc = "Field `REGION23` reader - Enable protection for region 23. Write '0' has no effect."] -pub type REGION23_R = crate::BitReader; -#[doc = "Enable protection for region 23. Write '0' has no effect.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum REGION23_A { - #[doc = "0: Protection disabled"] - DISABLED = 0, - #[doc = "1: Protection enable"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: REGION23_A) -> Self { - variant as u8 != 0 - } -} -impl REGION23_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> REGION23_A { - match self.bits { - false => REGION23_A::DISABLED, - true => REGION23_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == REGION23_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == REGION23_A::ENABLED - } -} -#[doc = "Field `REGION23` writer - Enable protection for region 23. Write '0' has no effect."] -pub type REGION23_W<'a, const O: u8> = crate::BitWriter<'a, u32, CONFIG0_SPEC, REGION23_A, O>; -impl<'a, const O: u8> REGION23_W<'a, O> { - #[doc = "Protection disabled"] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(REGION23_A::DISABLED) - } - #[doc = "Protection enable"] - #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(REGION23_A::ENABLED) - } -} -#[doc = "Field `REGION24` reader - Enable protection for region 24. Write '0' has no effect."] -pub type REGION24_R = crate::BitReader; -#[doc = "Enable protection for region 24. Write '0' has no effect.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum REGION24_A { - #[doc = "0: Protection disabled"] - DISABLED = 0, - #[doc = "1: Protection enable"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: REGION24_A) -> Self { - variant as u8 != 0 - } -} -impl REGION24_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> REGION24_A { - match self.bits { - false => REGION24_A::DISABLED, - true => REGION24_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == REGION24_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == REGION24_A::ENABLED - } -} -#[doc = "Field `REGION24` writer - Enable protection for region 24. Write '0' has no effect."] -pub type REGION24_W<'a, const O: u8> = crate::BitWriter<'a, u32, CONFIG0_SPEC, REGION24_A, O>; -impl<'a, const O: u8> REGION24_W<'a, O> { - #[doc = "Protection disabled"] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(REGION24_A::DISABLED) - } - #[doc = "Protection enable"] - #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(REGION24_A::ENABLED) - } -} -#[doc = "Field `REGION25` reader - Enable protection for region 25. Write '0' has no effect."] -pub type REGION25_R = crate::BitReader; -#[doc = "Enable protection for region 25. Write '0' has no effect.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum REGION25_A { - #[doc = "0: Protection disabled"] - DISABLED = 0, - #[doc = "1: Protection enable"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: REGION25_A) -> Self { - variant as u8 != 0 - } -} -impl REGION25_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> REGION25_A { - match self.bits { - false => REGION25_A::DISABLED, - true => REGION25_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == REGION25_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == REGION25_A::ENABLED - } -} -#[doc = "Field `REGION25` writer - Enable protection for region 25. Write '0' has no effect."] -pub type REGION25_W<'a, const O: u8> = crate::BitWriter<'a, u32, CONFIG0_SPEC, REGION25_A, O>; -impl<'a, const O: u8> REGION25_W<'a, O> { - #[doc = "Protection disabled"] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(REGION25_A::DISABLED) - } - #[doc = "Protection enable"] - #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(REGION25_A::ENABLED) - } -} -#[doc = "Field `REGION26` reader - Enable protection for region 26. Write '0' has no effect."] -pub type REGION26_R = crate::BitReader; -#[doc = "Enable protection for region 26. Write '0' has no effect.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum REGION26_A { - #[doc = "0: Protection disabled"] - DISABLED = 0, - #[doc = "1: Protection enable"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: REGION26_A) -> Self { - variant as u8 != 0 - } -} -impl REGION26_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> REGION26_A { - match self.bits { - false => REGION26_A::DISABLED, - true => REGION26_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == REGION26_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == REGION26_A::ENABLED - } -} -#[doc = "Field `REGION26` writer - Enable protection for region 26. Write '0' has no effect."] -pub type REGION26_W<'a, const O: u8> = crate::BitWriter<'a, u32, CONFIG0_SPEC, REGION26_A, O>; -impl<'a, const O: u8> REGION26_W<'a, O> { - #[doc = "Protection disabled"] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(REGION26_A::DISABLED) - } - #[doc = "Protection enable"] - #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(REGION26_A::ENABLED) - } -} -#[doc = "Field `REGION27` reader - Enable protection for region 27. Write '0' has no effect."] -pub type REGION27_R = crate::BitReader; -#[doc = "Enable protection for region 27. Write '0' has no effect.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum REGION27_A { - #[doc = "0: Protection disabled"] - DISABLED = 0, - #[doc = "1: Protection enable"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: REGION27_A) -> Self { - variant as u8 != 0 - } -} -impl REGION27_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> REGION27_A { - match self.bits { - false => REGION27_A::DISABLED, - true => REGION27_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == REGION27_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == REGION27_A::ENABLED - } -} -#[doc = "Field `REGION27` writer - Enable protection for region 27. Write '0' has no effect."] -pub type REGION27_W<'a, const O: u8> = crate::BitWriter<'a, u32, CONFIG0_SPEC, REGION27_A, O>; -impl<'a, const O: u8> REGION27_W<'a, O> { - #[doc = "Protection disabled"] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(REGION27_A::DISABLED) - } - #[doc = "Protection enable"] - #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(REGION27_A::ENABLED) - } -} -#[doc = "Field `REGION28` reader - Enable protection for region 28. Write '0' has no effect."] -pub type REGION28_R = crate::BitReader; -#[doc = "Enable protection for region 28. Write '0' has no effect.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum REGION28_A { - #[doc = "0: Protection disabled"] - DISABLED = 0, - #[doc = "1: Protection enable"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: REGION28_A) -> Self { - variant as u8 != 0 - } -} -impl REGION28_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> REGION28_A { - match self.bits { - false => REGION28_A::DISABLED, - true => REGION28_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == REGION28_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == REGION28_A::ENABLED - } -} -#[doc = "Field `REGION28` writer - Enable protection for region 28. Write '0' has no effect."] -pub type REGION28_W<'a, const O: u8> = crate::BitWriter<'a, u32, CONFIG0_SPEC, REGION28_A, O>; -impl<'a, const O: u8> REGION28_W<'a, O> { - #[doc = "Protection disabled"] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(REGION28_A::DISABLED) - } - #[doc = "Protection enable"] - #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(REGION28_A::ENABLED) - } -} -#[doc = "Field `REGION29` reader - Enable protection for region 29. Write '0' has no effect."] -pub type REGION29_R = crate::BitReader; -#[doc = "Enable protection for region 29. Write '0' has no effect.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum REGION29_A { - #[doc = "0: Protection disabled"] - DISABLED = 0, - #[doc = "1: Protection enable"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: REGION29_A) -> Self { - variant as u8 != 0 - } -} -impl REGION29_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> REGION29_A { - match self.bits { - false => REGION29_A::DISABLED, - true => REGION29_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == REGION29_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == REGION29_A::ENABLED - } -} -#[doc = "Field `REGION29` writer - Enable protection for region 29. Write '0' has no effect."] -pub type REGION29_W<'a, const O: u8> = crate::BitWriter<'a, u32, CONFIG0_SPEC, REGION29_A, O>; -impl<'a, const O: u8> REGION29_W<'a, O> { - #[doc = "Protection disabled"] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(REGION29_A::DISABLED) - } - #[doc = "Protection enable"] - #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(REGION29_A::ENABLED) - } -} -#[doc = "Field `REGION30` reader - Enable protection for region 30. Write '0' has no effect."] -pub type REGION30_R = crate::BitReader; -#[doc = "Enable protection for region 30. Write '0' has no effect.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum REGION30_A { - #[doc = "0: Protection disabled"] - DISABLED = 0, - #[doc = "1: Protection enable"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: REGION30_A) -> Self { - variant as u8 != 0 - } -} -impl REGION30_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> REGION30_A { - match self.bits { - false => REGION30_A::DISABLED, - true => REGION30_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == REGION30_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == REGION30_A::ENABLED - } -} -#[doc = "Field `REGION30` writer - Enable protection for region 30. Write '0' has no effect."] -pub type REGION30_W<'a, const O: u8> = crate::BitWriter<'a, u32, CONFIG0_SPEC, REGION30_A, O>; -impl<'a, const O: u8> REGION30_W<'a, O> { - #[doc = "Protection disabled"] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(REGION30_A::DISABLED) - } - #[doc = "Protection enable"] - #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(REGION30_A::ENABLED) - } -} -#[doc = "Field `REGION31` reader - Enable protection for region 31. Write '0' has no effect."] -pub type REGION31_R = crate::BitReader; -#[doc = "Enable protection for region 31. Write '0' has no effect.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum REGION31_A { - #[doc = "0: Protection disabled"] - DISABLED = 0, - #[doc = "1: Protection enable"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: REGION31_A) -> Self { - variant as u8 != 0 - } -} -impl REGION31_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> REGION31_A { - match self.bits { - false => REGION31_A::DISABLED, - true => REGION31_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == REGION31_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == REGION31_A::ENABLED - } -} -#[doc = "Field `REGION31` writer - Enable protection for region 31. Write '0' has no effect."] -pub type REGION31_W<'a, const O: u8> = crate::BitWriter<'a, u32, CONFIG0_SPEC, REGION31_A, O>; -impl<'a, const O: u8> REGION31_W<'a, O> { - #[doc = "Protection disabled"] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(REGION31_A::DISABLED) - } - #[doc = "Protection enable"] - #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(REGION31_A::ENABLED) - } -} -impl R { - #[doc = "Bit 0 - Enable protection for region 0. Write '0' has no effect."] - #[inline(always)] - pub fn region0(&self) -> REGION0_R { - REGION0_R::new((self.bits & 1) != 0) - } - #[doc = "Bit 1 - Enable protection for region 1. Write '0' has no effect."] - #[inline(always)] - pub fn region1(&self) -> REGION1_R { - REGION1_R::new(((self.bits >> 1) & 1) != 0) - } - #[doc = "Bit 2 - Enable protection for region 2. Write '0' has no effect."] - #[inline(always)] - pub fn region2(&self) -> REGION2_R { - REGION2_R::new(((self.bits >> 2) & 1) != 0) - } - #[doc = "Bit 3 - Enable protection for region 3. Write '0' has no effect."] - #[inline(always)] - pub fn region3(&self) -> REGION3_R { - REGION3_R::new(((self.bits >> 3) & 1) != 0) - } - #[doc = "Bit 4 - Enable protection for region 4. Write '0' has no effect."] - #[inline(always)] - pub fn region4(&self) -> REGION4_R { - REGION4_R::new(((self.bits >> 4) & 1) != 0) - } - #[doc = "Bit 5 - Enable protection for region 5. Write '0' has no effect."] - #[inline(always)] - pub fn region5(&self) -> REGION5_R { - REGION5_R::new(((self.bits >> 5) & 1) != 0) - } - #[doc = "Bit 6 - Enable protection for region 6. Write '0' has no effect."] - #[inline(always)] - pub fn region6(&self) -> REGION6_R { - REGION6_R::new(((self.bits >> 6) & 1) != 0) - } - #[doc = "Bit 7 - Enable protection for region 7. Write '0' has no effect."] - #[inline(always)] - pub fn region7(&self) -> REGION7_R { - REGION7_R::new(((self.bits >> 7) & 1) != 0) - } - #[doc = "Bit 8 - Enable protection for region 8. Write '0' has no effect."] - #[inline(always)] - pub fn region8(&self) -> REGION8_R { - REGION8_R::new(((self.bits >> 8) & 1) != 0) - } - #[doc = "Bit 9 - Enable protection for region 9. Write '0' has no effect."] - #[inline(always)] - pub fn region9(&self) -> REGION9_R { - REGION9_R::new(((self.bits >> 9) & 1) != 0) - } - #[doc = "Bit 10 - Enable protection for region 10. Write '0' has no effect."] - #[inline(always)] - pub fn region10(&self) -> REGION10_R { - REGION10_R::new(((self.bits >> 10) & 1) != 0) - } - #[doc = "Bit 11 - Enable protection for region 11. Write '0' has no effect."] - #[inline(always)] - pub fn region11(&self) -> REGION11_R { - REGION11_R::new(((self.bits >> 11) & 1) != 0) - } - #[doc = "Bit 12 - Enable protection for region 12. Write '0' has no effect."] - #[inline(always)] - pub fn region12(&self) -> REGION12_R { - REGION12_R::new(((self.bits >> 12) & 1) != 0) - } - #[doc = "Bit 13 - Enable protection for region 13. Write '0' has no effect."] - #[inline(always)] - pub fn region13(&self) -> REGION13_R { - REGION13_R::new(((self.bits >> 13) & 1) != 0) - } - #[doc = "Bit 14 - Enable protection for region 14. Write '0' has no effect."] - #[inline(always)] - pub fn region14(&self) -> REGION14_R { - REGION14_R::new(((self.bits >> 14) & 1) != 0) - } - #[doc = "Bit 15 - Enable protection for region 15. Write '0' has no effect."] - #[inline(always)] - pub fn region15(&self) -> REGION15_R { - REGION15_R::new(((self.bits >> 15) & 1) != 0) - } - #[doc = "Bit 16 - Enable protection for region 16. Write '0' has no effect."] - #[inline(always)] - pub fn region16(&self) -> REGION16_R { - REGION16_R::new(((self.bits >> 16) & 1) != 0) - } - #[doc = "Bit 17 - Enable protection for region 17. Write '0' has no effect."] - #[inline(always)] - pub fn region17(&self) -> REGION17_R { - REGION17_R::new(((self.bits >> 17) & 1) != 0) - } - #[doc = "Bit 18 - Enable protection for region 18. Write '0' has no effect."] - #[inline(always)] - pub fn region18(&self) -> REGION18_R { - REGION18_R::new(((self.bits >> 18) & 1) != 0) - } - #[doc = "Bit 19 - Enable protection for region 19. Write '0' has no effect."] - #[inline(always)] - pub fn region19(&self) -> REGION19_R { - REGION19_R::new(((self.bits >> 19) & 1) != 0) - } - #[doc = "Bit 20 - Enable protection for region 20. Write '0' has no effect."] - #[inline(always)] - pub fn region20(&self) -> REGION20_R { - REGION20_R::new(((self.bits >> 20) & 1) != 0) - } - #[doc = "Bit 21 - Enable protection for region 21. Write '0' has no effect."] - #[inline(always)] - pub fn region21(&self) -> REGION21_R { - REGION21_R::new(((self.bits >> 21) & 1) != 0) - } - #[doc = "Bit 22 - Enable protection for region 22. Write '0' has no effect."] - #[inline(always)] - pub fn region22(&self) -> REGION22_R { - REGION22_R::new(((self.bits >> 22) & 1) != 0) - } - #[doc = "Bit 23 - Enable protection for region 23. Write '0' has no effect."] - #[inline(always)] - pub fn region23(&self) -> REGION23_R { - REGION23_R::new(((self.bits >> 23) & 1) != 0) - } - #[doc = "Bit 24 - Enable protection for region 24. Write '0' has no effect."] - #[inline(always)] - pub fn region24(&self) -> REGION24_R { - REGION24_R::new(((self.bits >> 24) & 1) != 0) - } - #[doc = "Bit 25 - Enable protection for region 25. Write '0' has no effect."] - #[inline(always)] - pub fn region25(&self) -> REGION25_R { - REGION25_R::new(((self.bits >> 25) & 1) != 0) - } - #[doc = "Bit 26 - Enable protection for region 26. Write '0' has no effect."] - #[inline(always)] - pub fn region26(&self) -> REGION26_R { - REGION26_R::new(((self.bits >> 26) & 1) != 0) - } - #[doc = "Bit 27 - Enable protection for region 27. Write '0' has no effect."] - #[inline(always)] - pub fn region27(&self) -> REGION27_R { - REGION27_R::new(((self.bits >> 27) & 1) != 0) - } - #[doc = "Bit 28 - Enable protection for region 28. Write '0' has no effect."] - #[inline(always)] - pub fn region28(&self) -> REGION28_R { - REGION28_R::new(((self.bits >> 28) & 1) != 0) - } - #[doc = "Bit 29 - Enable protection for region 29. Write '0' has no effect."] - #[inline(always)] - pub fn region29(&self) -> REGION29_R { - REGION29_R::new(((self.bits >> 29) & 1) != 0) - } - #[doc = "Bit 30 - Enable protection for region 30. Write '0' has no effect."] - #[inline(always)] - pub fn region30(&self) -> REGION30_R { - REGION30_R::new(((self.bits >> 30) & 1) != 0) - } - #[doc = "Bit 31 - Enable protection for region 31. Write '0' has no effect."] - #[inline(always)] - pub fn region31(&self) -> REGION31_R { - REGION31_R::new(((self.bits >> 31) & 1) != 0) - } -} -impl W { - #[doc = "Bit 0 - Enable protection for region 0. Write '0' has no effect."] - #[inline(always)] - #[must_use] - pub fn region0(&mut self) -> REGION0_W<0> { - REGION0_W::new(self) - } - #[doc = "Bit 1 - Enable protection for region 1. Write '0' has no effect."] - #[inline(always)] - #[must_use] - pub fn region1(&mut self) -> REGION1_W<1> { - REGION1_W::new(self) - } - #[doc = "Bit 2 - Enable protection for region 2. Write '0' has no effect."] - #[inline(always)] - #[must_use] - pub fn region2(&mut self) -> REGION2_W<2> { - REGION2_W::new(self) - } - #[doc = "Bit 3 - Enable protection for region 3. Write '0' has no effect."] - #[inline(always)] - #[must_use] - pub fn region3(&mut self) -> REGION3_W<3> { - REGION3_W::new(self) - } - #[doc = "Bit 4 - Enable protection for region 4. Write '0' has no effect."] - #[inline(always)] - #[must_use] - pub fn region4(&mut self) -> REGION4_W<4> { - REGION4_W::new(self) - } - #[doc = "Bit 5 - Enable protection for region 5. Write '0' has no effect."] - #[inline(always)] - #[must_use] - pub fn region5(&mut self) -> REGION5_W<5> { - REGION5_W::new(self) - } - #[doc = "Bit 6 - Enable protection for region 6. Write '0' has no effect."] - #[inline(always)] - #[must_use] - pub fn region6(&mut self) -> REGION6_W<6> { - REGION6_W::new(self) - } - #[doc = "Bit 7 - Enable protection for region 7. Write '0' has no effect."] - #[inline(always)] - #[must_use] - pub fn region7(&mut self) -> REGION7_W<7> { - REGION7_W::new(self) - } - #[doc = "Bit 8 - Enable protection for region 8. Write '0' has no effect."] - #[inline(always)] - #[must_use] - pub fn region8(&mut self) -> REGION8_W<8> { - REGION8_W::new(self) - } - #[doc = "Bit 9 - Enable protection for region 9. Write '0' has no effect."] - #[inline(always)] - #[must_use] - pub fn region9(&mut self) -> REGION9_W<9> { - REGION9_W::new(self) - } - #[doc = "Bit 10 - Enable protection for region 10. Write '0' has no effect."] - #[inline(always)] - #[must_use] - pub fn region10(&mut self) -> REGION10_W<10> { - REGION10_W::new(self) - } - #[doc = "Bit 11 - Enable protection for region 11. Write '0' has no effect."] - #[inline(always)] - #[must_use] - pub fn region11(&mut self) -> REGION11_W<11> { - REGION11_W::new(self) - } - #[doc = "Bit 12 - Enable protection for region 12. Write '0' has no effect."] - #[inline(always)] - #[must_use] - pub fn region12(&mut self) -> REGION12_W<12> { - REGION12_W::new(self) - } - #[doc = "Bit 13 - Enable protection for region 13. Write '0' has no effect."] - #[inline(always)] - #[must_use] - pub fn region13(&mut self) -> REGION13_W<13> { - REGION13_W::new(self) - } - #[doc = "Bit 14 - Enable protection for region 14. Write '0' has no effect."] - #[inline(always)] - #[must_use] - pub fn region14(&mut self) -> REGION14_W<14> { - REGION14_W::new(self) - } - #[doc = "Bit 15 - Enable protection for region 15. Write '0' has no effect."] - #[inline(always)] - #[must_use] - pub fn region15(&mut self) -> REGION15_W<15> { - REGION15_W::new(self) - } - #[doc = "Bit 16 - Enable protection for region 16. Write '0' has no effect."] - #[inline(always)] - #[must_use] - pub fn region16(&mut self) -> REGION16_W<16> { - REGION16_W::new(self) - } - #[doc = "Bit 17 - Enable protection for region 17. Write '0' has no effect."] - #[inline(always)] - #[must_use] - pub fn region17(&mut self) -> REGION17_W<17> { - REGION17_W::new(self) - } - #[doc = "Bit 18 - Enable protection for region 18. Write '0' has no effect."] - #[inline(always)] - #[must_use] - pub fn region18(&mut self) -> REGION18_W<18> { - REGION18_W::new(self) - } - #[doc = "Bit 19 - Enable protection for region 19. Write '0' has no effect."] - #[inline(always)] - #[must_use] - pub fn region19(&mut self) -> REGION19_W<19> { - REGION19_W::new(self) - } - #[doc = "Bit 20 - Enable protection for region 20. Write '0' has no effect."] - #[inline(always)] - #[must_use] - pub fn region20(&mut self) -> REGION20_W<20> { - REGION20_W::new(self) - } - #[doc = "Bit 21 - Enable protection for region 21. Write '0' has no effect."] - #[inline(always)] - #[must_use] - pub fn region21(&mut self) -> REGION21_W<21> { - REGION21_W::new(self) - } - #[doc = "Bit 22 - Enable protection for region 22. Write '0' has no effect."] - #[inline(always)] - #[must_use] - pub fn region22(&mut self) -> REGION22_W<22> { - REGION22_W::new(self) - } - #[doc = "Bit 23 - Enable protection for region 23. Write '0' has no effect."] - #[inline(always)] - #[must_use] - pub fn region23(&mut self) -> REGION23_W<23> { - REGION23_W::new(self) - } - #[doc = "Bit 24 - Enable protection for region 24. Write '0' has no effect."] - #[inline(always)] - #[must_use] - pub fn region24(&mut self) -> REGION24_W<24> { - REGION24_W::new(self) - } - #[doc = "Bit 25 - Enable protection for region 25. Write '0' has no effect."] - #[inline(always)] - #[must_use] - pub fn region25(&mut self) -> REGION25_W<25> { - REGION25_W::new(self) - } - #[doc = "Bit 26 - Enable protection for region 26. Write '0' has no effect."] - #[inline(always)] - #[must_use] - pub fn region26(&mut self) -> REGION26_W<26> { - REGION26_W::new(self) - } - #[doc = "Bit 27 - Enable protection for region 27. Write '0' has no effect."] - #[inline(always)] - #[must_use] - pub fn region27(&mut self) -> REGION27_W<27> { - REGION27_W::new(self) - } - #[doc = "Bit 28 - Enable protection for region 28. Write '0' has no effect."] - #[inline(always)] - #[must_use] - pub fn region28(&mut self) -> REGION28_W<28> { - REGION28_W::new(self) - } - #[doc = "Bit 29 - Enable protection for region 29. Write '0' has no effect."] - #[inline(always)] - #[must_use] - pub fn region29(&mut self) -> REGION29_W<29> { - REGION29_W::new(self) - } - #[doc = "Bit 30 - Enable protection for region 30. Write '0' has no effect."] - #[inline(always)] - #[must_use] - pub fn region30(&mut self) -> REGION30_W<30> { - REGION30_W::new(self) - } - #[doc = "Bit 31 - Enable protection for region 31. Write '0' has no effect."] - #[inline(always)] - #[must_use] - pub fn region31(&mut self) -> REGION31_W<31> { - REGION31_W::new(self) - } - #[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 = "Block protect configuration register 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 [config0](index.html) module"] -pub struct CONFIG0_SPEC; -impl crate::RegisterSpec for CONFIG0_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [config0::R](R) reader structure"] -impl crate::Readable for CONFIG0_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [config0::W](W) writer structure"] -impl crate::Writable for CONFIG0_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets CONFIG0 to value 0"] -impl crate::Resettable for CONFIG0_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/bprot/config1.rs b/down-the-stack/dk_pac/src/bprot/config1.rs deleted file mode 100644 index 6d5c716..0000000 --- a/down-the-stack/dk_pac/src/bprot/config1.rs +++ /dev/null @@ -1,2017 +0,0 @@ -#[doc = "Register `CONFIG1` 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 `CONFIG1` 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 `REGION32` reader - Enable protection for region 32. Write '0' has no effect."] -pub type REGION32_R = crate::BitReader; -#[doc = "Enable protection for region 32. Write '0' has no effect.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum REGION32_A { - #[doc = "0: Protection disabled"] - DISABLED = 0, - #[doc = "1: Protection enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: REGION32_A) -> Self { - variant as u8 != 0 - } -} -impl REGION32_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> REGION32_A { - match self.bits { - false => REGION32_A::DISABLED, - true => REGION32_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == REGION32_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == REGION32_A::ENABLED - } -} -#[doc = "Field `REGION32` writer - Enable protection for region 32. Write '0' has no effect."] -pub type REGION32_W<'a, const O: u8> = crate::BitWriter<'a, u32, CONFIG1_SPEC, REGION32_A, O>; -impl<'a, const O: u8> REGION32_W<'a, O> { - #[doc = "Protection disabled"] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(REGION32_A::DISABLED) - } - #[doc = "Protection enabled"] - #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(REGION32_A::ENABLED) - } -} -#[doc = "Field `REGION33` reader - Enable protection for region 33. Write '0' has no effect."] -pub type REGION33_R = crate::BitReader; -#[doc = "Enable protection for region 33. Write '0' has no effect.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum REGION33_A { - #[doc = "0: Protection disabled"] - DISABLED = 0, - #[doc = "1: Protection enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: REGION33_A) -> Self { - variant as u8 != 0 - } -} -impl REGION33_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> REGION33_A { - match self.bits { - false => REGION33_A::DISABLED, - true => REGION33_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == REGION33_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == REGION33_A::ENABLED - } -} -#[doc = "Field `REGION33` writer - Enable protection for region 33. Write '0' has no effect."] -pub type REGION33_W<'a, const O: u8> = crate::BitWriter<'a, u32, CONFIG1_SPEC, REGION33_A, O>; -impl<'a, const O: u8> REGION33_W<'a, O> { - #[doc = "Protection disabled"] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(REGION33_A::DISABLED) - } - #[doc = "Protection enabled"] - #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(REGION33_A::ENABLED) - } -} -#[doc = "Field `REGION34` reader - Enable protection for region 34. Write '0' has no effect."] -pub type REGION34_R = crate::BitReader; -#[doc = "Enable protection for region 34. Write '0' has no effect.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum REGION34_A { - #[doc = "0: Protection disabled"] - DISABLED = 0, - #[doc = "1: Protection enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: REGION34_A) -> Self { - variant as u8 != 0 - } -} -impl REGION34_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> REGION34_A { - match self.bits { - false => REGION34_A::DISABLED, - true => REGION34_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == REGION34_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == REGION34_A::ENABLED - } -} -#[doc = "Field `REGION34` writer - Enable protection for region 34. Write '0' has no effect."] -pub type REGION34_W<'a, const O: u8> = crate::BitWriter<'a, u32, CONFIG1_SPEC, REGION34_A, O>; -impl<'a, const O: u8> REGION34_W<'a, O> { - #[doc = "Protection disabled"] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(REGION34_A::DISABLED) - } - #[doc = "Protection enabled"] - #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(REGION34_A::ENABLED) - } -} -#[doc = "Field `REGION35` reader - Enable protection for region 35. Write '0' has no effect."] -pub type REGION35_R = crate::BitReader; -#[doc = "Enable protection for region 35. Write '0' has no effect.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum REGION35_A { - #[doc = "0: Protection disabled"] - DISABLED = 0, - #[doc = "1: Protection enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: REGION35_A) -> Self { - variant as u8 != 0 - } -} -impl REGION35_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> REGION35_A { - match self.bits { - false => REGION35_A::DISABLED, - true => REGION35_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == REGION35_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == REGION35_A::ENABLED - } -} -#[doc = "Field `REGION35` writer - Enable protection for region 35. Write '0' has no effect."] -pub type REGION35_W<'a, const O: u8> = crate::BitWriter<'a, u32, CONFIG1_SPEC, REGION35_A, O>; -impl<'a, const O: u8> REGION35_W<'a, O> { - #[doc = "Protection disabled"] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(REGION35_A::DISABLED) - } - #[doc = "Protection enabled"] - #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(REGION35_A::ENABLED) - } -} -#[doc = "Field `REGION36` reader - Enable protection for region 36. Write '0' has no effect."] -pub type REGION36_R = crate::BitReader; -#[doc = "Enable protection for region 36. Write '0' has no effect.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum REGION36_A { - #[doc = "0: Protection disabled"] - DISABLED = 0, - #[doc = "1: Protection enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: REGION36_A) -> Self { - variant as u8 != 0 - } -} -impl REGION36_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> REGION36_A { - match self.bits { - false => REGION36_A::DISABLED, - true => REGION36_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == REGION36_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == REGION36_A::ENABLED - } -} -#[doc = "Field `REGION36` writer - Enable protection for region 36. Write '0' has no effect."] -pub type REGION36_W<'a, const O: u8> = crate::BitWriter<'a, u32, CONFIG1_SPEC, REGION36_A, O>; -impl<'a, const O: u8> REGION36_W<'a, O> { - #[doc = "Protection disabled"] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(REGION36_A::DISABLED) - } - #[doc = "Protection enabled"] - #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(REGION36_A::ENABLED) - } -} -#[doc = "Field `REGION37` reader - Enable protection for region 37. Write '0' has no effect."] -pub type REGION37_R = crate::BitReader; -#[doc = "Enable protection for region 37. Write '0' has no effect.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum REGION37_A { - #[doc = "0: Protection disabled"] - DISABLED = 0, - #[doc = "1: Protection enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: REGION37_A) -> Self { - variant as u8 != 0 - } -} -impl REGION37_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> REGION37_A { - match self.bits { - false => REGION37_A::DISABLED, - true => REGION37_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == REGION37_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == REGION37_A::ENABLED - } -} -#[doc = "Field `REGION37` writer - Enable protection for region 37. Write '0' has no effect."] -pub type REGION37_W<'a, const O: u8> = crate::BitWriter<'a, u32, CONFIG1_SPEC, REGION37_A, O>; -impl<'a, const O: u8> REGION37_W<'a, O> { - #[doc = "Protection disabled"] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(REGION37_A::DISABLED) - } - #[doc = "Protection enabled"] - #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(REGION37_A::ENABLED) - } -} -#[doc = "Field `REGION38` reader - Enable protection for region 38. Write '0' has no effect."] -pub type REGION38_R = crate::BitReader; -#[doc = "Enable protection for region 38. Write '0' has no effect.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum REGION38_A { - #[doc = "0: Protection disabled"] - DISABLED = 0, - #[doc = "1: Protection enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: REGION38_A) -> Self { - variant as u8 != 0 - } -} -impl REGION38_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> REGION38_A { - match self.bits { - false => REGION38_A::DISABLED, - true => REGION38_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == REGION38_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == REGION38_A::ENABLED - } -} -#[doc = "Field `REGION38` writer - Enable protection for region 38. Write '0' has no effect."] -pub type REGION38_W<'a, const O: u8> = crate::BitWriter<'a, u32, CONFIG1_SPEC, REGION38_A, O>; -impl<'a, const O: u8> REGION38_W<'a, O> { - #[doc = "Protection disabled"] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(REGION38_A::DISABLED) - } - #[doc = "Protection enabled"] - #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(REGION38_A::ENABLED) - } -} -#[doc = "Field `REGION39` reader - Enable protection for region 39. Write '0' has no effect."] -pub type REGION39_R = crate::BitReader; -#[doc = "Enable protection for region 39. Write '0' has no effect.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum REGION39_A { - #[doc = "0: Protection disabled"] - DISABLED = 0, - #[doc = "1: Protection enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: REGION39_A) -> Self { - variant as u8 != 0 - } -} -impl REGION39_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> REGION39_A { - match self.bits { - false => REGION39_A::DISABLED, - true => REGION39_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == REGION39_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == REGION39_A::ENABLED - } -} -#[doc = "Field `REGION39` writer - Enable protection for region 39. Write '0' has no effect."] -pub type REGION39_W<'a, const O: u8> = crate::BitWriter<'a, u32, CONFIG1_SPEC, REGION39_A, O>; -impl<'a, const O: u8> REGION39_W<'a, O> { - #[doc = "Protection disabled"] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(REGION39_A::DISABLED) - } - #[doc = "Protection enabled"] - #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(REGION39_A::ENABLED) - } -} -#[doc = "Field `REGION40` reader - Enable protection for region 40. Write '0' has no effect."] -pub type REGION40_R = crate::BitReader; -#[doc = "Enable protection for region 40. Write '0' has no effect.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum REGION40_A { - #[doc = "0: Protection disabled"] - DISABLED = 0, - #[doc = "1: Protection enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: REGION40_A) -> Self { - variant as u8 != 0 - } -} -impl REGION40_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> REGION40_A { - match self.bits { - false => REGION40_A::DISABLED, - true => REGION40_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == REGION40_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == REGION40_A::ENABLED - } -} -#[doc = "Field `REGION40` writer - Enable protection for region 40. Write '0' has no effect."] -pub type REGION40_W<'a, const O: u8> = crate::BitWriter<'a, u32, CONFIG1_SPEC, REGION40_A, O>; -impl<'a, const O: u8> REGION40_W<'a, O> { - #[doc = "Protection disabled"] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(REGION40_A::DISABLED) - } - #[doc = "Protection enabled"] - #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(REGION40_A::ENABLED) - } -} -#[doc = "Field `REGION41` reader - Enable protection for region 41. Write '0' has no effect."] -pub type REGION41_R = crate::BitReader; -#[doc = "Enable protection for region 41. Write '0' has no effect.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum REGION41_A { - #[doc = "0: Protection disabled"] - DISABLED = 0, - #[doc = "1: Protection enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: REGION41_A) -> Self { - variant as u8 != 0 - } -} -impl REGION41_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> REGION41_A { - match self.bits { - false => REGION41_A::DISABLED, - true => REGION41_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == REGION41_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == REGION41_A::ENABLED - } -} -#[doc = "Field `REGION41` writer - Enable protection for region 41. Write '0' has no effect."] -pub type REGION41_W<'a, const O: u8> = crate::BitWriter<'a, u32, CONFIG1_SPEC, REGION41_A, O>; -impl<'a, const O: u8> REGION41_W<'a, O> { - #[doc = "Protection disabled"] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(REGION41_A::DISABLED) - } - #[doc = "Protection enabled"] - #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(REGION41_A::ENABLED) - } -} -#[doc = "Field `REGION42` reader - Enable protection for region 42. Write '0' has no effect."] -pub type REGION42_R = crate::BitReader; -#[doc = "Enable protection for region 42. Write '0' has no effect.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum REGION42_A { - #[doc = "0: Protection disabled"] - DISABLED = 0, - #[doc = "1: Protection enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: REGION42_A) -> Self { - variant as u8 != 0 - } -} -impl REGION42_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> REGION42_A { - match self.bits { - false => REGION42_A::DISABLED, - true => REGION42_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == REGION42_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == REGION42_A::ENABLED - } -} -#[doc = "Field `REGION42` writer - Enable protection for region 42. Write '0' has no effect."] -pub type REGION42_W<'a, const O: u8> = crate::BitWriter<'a, u32, CONFIG1_SPEC, REGION42_A, O>; -impl<'a, const O: u8> REGION42_W<'a, O> { - #[doc = "Protection disabled"] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(REGION42_A::DISABLED) - } - #[doc = "Protection enabled"] - #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(REGION42_A::ENABLED) - } -} -#[doc = "Field `REGION43` reader - Enable protection for region 43. Write '0' has no effect."] -pub type REGION43_R = crate::BitReader; -#[doc = "Enable protection for region 43. Write '0' has no effect.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum REGION43_A { - #[doc = "0: Protection disabled"] - DISABLED = 0, - #[doc = "1: Protection enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: REGION43_A) -> Self { - variant as u8 != 0 - } -} -impl REGION43_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> REGION43_A { - match self.bits { - false => REGION43_A::DISABLED, - true => REGION43_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == REGION43_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == REGION43_A::ENABLED - } -} -#[doc = "Field `REGION43` writer - Enable protection for region 43. Write '0' has no effect."] -pub type REGION43_W<'a, const O: u8> = crate::BitWriter<'a, u32, CONFIG1_SPEC, REGION43_A, O>; -impl<'a, const O: u8> REGION43_W<'a, O> { - #[doc = "Protection disabled"] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(REGION43_A::DISABLED) - } - #[doc = "Protection enabled"] - #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(REGION43_A::ENABLED) - } -} -#[doc = "Field `REGION44` reader - Enable protection for region 44. Write '0' has no effect."] -pub type REGION44_R = crate::BitReader; -#[doc = "Enable protection for region 44. Write '0' has no effect.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum REGION44_A { - #[doc = "0: Protection disabled"] - DISABLED = 0, - #[doc = "1: Protection enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: REGION44_A) -> Self { - variant as u8 != 0 - } -} -impl REGION44_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> REGION44_A { - match self.bits { - false => REGION44_A::DISABLED, - true => REGION44_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == REGION44_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == REGION44_A::ENABLED - } -} -#[doc = "Field `REGION44` writer - Enable protection for region 44. Write '0' has no effect."] -pub type REGION44_W<'a, const O: u8> = crate::BitWriter<'a, u32, CONFIG1_SPEC, REGION44_A, O>; -impl<'a, const O: u8> REGION44_W<'a, O> { - #[doc = "Protection disabled"] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(REGION44_A::DISABLED) - } - #[doc = "Protection enabled"] - #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(REGION44_A::ENABLED) - } -} -#[doc = "Field `REGION45` reader - Enable protection for region 45. Write '0' has no effect."] -pub type REGION45_R = crate::BitReader; -#[doc = "Enable protection for region 45. Write '0' has no effect.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum REGION45_A { - #[doc = "0: Protection disabled"] - DISABLED = 0, - #[doc = "1: Protection enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: REGION45_A) -> Self { - variant as u8 != 0 - } -} -impl REGION45_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> REGION45_A { - match self.bits { - false => REGION45_A::DISABLED, - true => REGION45_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == REGION45_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == REGION45_A::ENABLED - } -} -#[doc = "Field `REGION45` writer - Enable protection for region 45. Write '0' has no effect."] -pub type REGION45_W<'a, const O: u8> = crate::BitWriter<'a, u32, CONFIG1_SPEC, REGION45_A, O>; -impl<'a, const O: u8> REGION45_W<'a, O> { - #[doc = "Protection disabled"] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(REGION45_A::DISABLED) - } - #[doc = "Protection enabled"] - #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(REGION45_A::ENABLED) - } -} -#[doc = "Field `REGION46` reader - Enable protection for region 46. Write '0' has no effect."] -pub type REGION46_R = crate::BitReader; -#[doc = "Enable protection for region 46. Write '0' has no effect.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum REGION46_A { - #[doc = "0: Protection disabled"] - DISABLED = 0, - #[doc = "1: Protection enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: REGION46_A) -> Self { - variant as u8 != 0 - } -} -impl REGION46_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> REGION46_A { - match self.bits { - false => REGION46_A::DISABLED, - true => REGION46_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == REGION46_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == REGION46_A::ENABLED - } -} -#[doc = "Field `REGION46` writer - Enable protection for region 46. Write '0' has no effect."] -pub type REGION46_W<'a, const O: u8> = crate::BitWriter<'a, u32, CONFIG1_SPEC, REGION46_A, O>; -impl<'a, const O: u8> REGION46_W<'a, O> { - #[doc = "Protection disabled"] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(REGION46_A::DISABLED) - } - #[doc = "Protection enabled"] - #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(REGION46_A::ENABLED) - } -} -#[doc = "Field `REGION47` reader - Enable protection for region 47. Write '0' has no effect."] -pub type REGION47_R = crate::BitReader; -#[doc = "Enable protection for region 47. Write '0' has no effect.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum REGION47_A { - #[doc = "0: Protection disabled"] - DISABLED = 0, - #[doc = "1: Protection enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: REGION47_A) -> Self { - variant as u8 != 0 - } -} -impl REGION47_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> REGION47_A { - match self.bits { - false => REGION47_A::DISABLED, - true => REGION47_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == REGION47_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == REGION47_A::ENABLED - } -} -#[doc = "Field `REGION47` writer - Enable protection for region 47. Write '0' has no effect."] -pub type REGION47_W<'a, const O: u8> = crate::BitWriter<'a, u32, CONFIG1_SPEC, REGION47_A, O>; -impl<'a, const O: u8> REGION47_W<'a, O> { - #[doc = "Protection disabled"] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(REGION47_A::DISABLED) - } - #[doc = "Protection enabled"] - #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(REGION47_A::ENABLED) - } -} -#[doc = "Field `REGION48` reader - Enable protection for region 48. Write '0' has no effect."] -pub type REGION48_R = crate::BitReader; -#[doc = "Enable protection for region 48. Write '0' has no effect.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum REGION48_A { - #[doc = "0: Protection disabled"] - DISABLED = 0, - #[doc = "1: Protection enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: REGION48_A) -> Self { - variant as u8 != 0 - } -} -impl REGION48_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> REGION48_A { - match self.bits { - false => REGION48_A::DISABLED, - true => REGION48_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == REGION48_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == REGION48_A::ENABLED - } -} -#[doc = "Field `REGION48` writer - Enable protection for region 48. Write '0' has no effect."] -pub type REGION48_W<'a, const O: u8> = crate::BitWriter<'a, u32, CONFIG1_SPEC, REGION48_A, O>; -impl<'a, const O: u8> REGION48_W<'a, O> { - #[doc = "Protection disabled"] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(REGION48_A::DISABLED) - } - #[doc = "Protection enabled"] - #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(REGION48_A::ENABLED) - } -} -#[doc = "Field `REGION49` reader - Enable protection for region 49. Write '0' has no effect."] -pub type REGION49_R = crate::BitReader; -#[doc = "Enable protection for region 49. Write '0' has no effect.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum REGION49_A { - #[doc = "0: Protection disabled"] - DISABLED = 0, - #[doc = "1: Protection enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: REGION49_A) -> Self { - variant as u8 != 0 - } -} -impl REGION49_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> REGION49_A { - match self.bits { - false => REGION49_A::DISABLED, - true => REGION49_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == REGION49_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == REGION49_A::ENABLED - } -} -#[doc = "Field `REGION49` writer - Enable protection for region 49. Write '0' has no effect."] -pub type REGION49_W<'a, const O: u8> = crate::BitWriter<'a, u32, CONFIG1_SPEC, REGION49_A, O>; -impl<'a, const O: u8> REGION49_W<'a, O> { - #[doc = "Protection disabled"] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(REGION49_A::DISABLED) - } - #[doc = "Protection enabled"] - #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(REGION49_A::ENABLED) - } -} -#[doc = "Field `REGION50` reader - Enable protection for region 50. Write '0' has no effect."] -pub type REGION50_R = crate::BitReader; -#[doc = "Enable protection for region 50. Write '0' has no effect.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum REGION50_A { - #[doc = "0: Protection disabled"] - DISABLED = 0, - #[doc = "1: Protection enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: REGION50_A) -> Self { - variant as u8 != 0 - } -} -impl REGION50_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> REGION50_A { - match self.bits { - false => REGION50_A::DISABLED, - true => REGION50_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == REGION50_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == REGION50_A::ENABLED - } -} -#[doc = "Field `REGION50` writer - Enable protection for region 50. Write '0' has no effect."] -pub type REGION50_W<'a, const O: u8> = crate::BitWriter<'a, u32, CONFIG1_SPEC, REGION50_A, O>; -impl<'a, const O: u8> REGION50_W<'a, O> { - #[doc = "Protection disabled"] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(REGION50_A::DISABLED) - } - #[doc = "Protection enabled"] - #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(REGION50_A::ENABLED) - } -} -#[doc = "Field `REGION51` reader - Enable protection for region 51. Write '0' has no effect."] -pub type REGION51_R = crate::BitReader; -#[doc = "Enable protection for region 51. Write '0' has no effect.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum REGION51_A { - #[doc = "0: Protection disabled"] - DISABLED = 0, - #[doc = "1: Protection enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: REGION51_A) -> Self { - variant as u8 != 0 - } -} -impl REGION51_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> REGION51_A { - match self.bits { - false => REGION51_A::DISABLED, - true => REGION51_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == REGION51_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == REGION51_A::ENABLED - } -} -#[doc = "Field `REGION51` writer - Enable protection for region 51. Write '0' has no effect."] -pub type REGION51_W<'a, const O: u8> = crate::BitWriter<'a, u32, CONFIG1_SPEC, REGION51_A, O>; -impl<'a, const O: u8> REGION51_W<'a, O> { - #[doc = "Protection disabled"] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(REGION51_A::DISABLED) - } - #[doc = "Protection enabled"] - #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(REGION51_A::ENABLED) - } -} -#[doc = "Field `REGION52` reader - Enable protection for region 52. Write '0' has no effect."] -pub type REGION52_R = crate::BitReader; -#[doc = "Enable protection for region 52. Write '0' has no effect.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum REGION52_A { - #[doc = "0: Protection disabled"] - DISABLED = 0, - #[doc = "1: Protection enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: REGION52_A) -> Self { - variant as u8 != 0 - } -} -impl REGION52_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> REGION52_A { - match self.bits { - false => REGION52_A::DISABLED, - true => REGION52_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == REGION52_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == REGION52_A::ENABLED - } -} -#[doc = "Field `REGION52` writer - Enable protection for region 52. Write '0' has no effect."] -pub type REGION52_W<'a, const O: u8> = crate::BitWriter<'a, u32, CONFIG1_SPEC, REGION52_A, O>; -impl<'a, const O: u8> REGION52_W<'a, O> { - #[doc = "Protection disabled"] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(REGION52_A::DISABLED) - } - #[doc = "Protection enabled"] - #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(REGION52_A::ENABLED) - } -} -#[doc = "Field `REGION53` reader - Enable protection for region 53. Write '0' has no effect."] -pub type REGION53_R = crate::BitReader; -#[doc = "Enable protection for region 53. Write '0' has no effect.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum REGION53_A { - #[doc = "0: Protection disabled"] - DISABLED = 0, - #[doc = "1: Protection enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: REGION53_A) -> Self { - variant as u8 != 0 - } -} -impl REGION53_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> REGION53_A { - match self.bits { - false => REGION53_A::DISABLED, - true => REGION53_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == REGION53_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == REGION53_A::ENABLED - } -} -#[doc = "Field `REGION53` writer - Enable protection for region 53. Write '0' has no effect."] -pub type REGION53_W<'a, const O: u8> = crate::BitWriter<'a, u32, CONFIG1_SPEC, REGION53_A, O>; -impl<'a, const O: u8> REGION53_W<'a, O> { - #[doc = "Protection disabled"] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(REGION53_A::DISABLED) - } - #[doc = "Protection enabled"] - #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(REGION53_A::ENABLED) - } -} -#[doc = "Field `REGION54` reader - Enable protection for region 54. Write '0' has no effect."] -pub type REGION54_R = crate::BitReader; -#[doc = "Enable protection for region 54. Write '0' has no effect.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum REGION54_A { - #[doc = "0: Protection disabled"] - DISABLED = 0, - #[doc = "1: Protection enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: REGION54_A) -> Self { - variant as u8 != 0 - } -} -impl REGION54_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> REGION54_A { - match self.bits { - false => REGION54_A::DISABLED, - true => REGION54_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == REGION54_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == REGION54_A::ENABLED - } -} -#[doc = "Field `REGION54` writer - Enable protection for region 54. Write '0' has no effect."] -pub type REGION54_W<'a, const O: u8> = crate::BitWriter<'a, u32, CONFIG1_SPEC, REGION54_A, O>; -impl<'a, const O: u8> REGION54_W<'a, O> { - #[doc = "Protection disabled"] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(REGION54_A::DISABLED) - } - #[doc = "Protection enabled"] - #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(REGION54_A::ENABLED) - } -} -#[doc = "Field `REGION55` reader - Enable protection for region 55. Write '0' has no effect."] -pub type REGION55_R = crate::BitReader; -#[doc = "Enable protection for region 55. Write '0' has no effect.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum REGION55_A { - #[doc = "0: Protection disabled"] - DISABLED = 0, - #[doc = "1: Protection enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: REGION55_A) -> Self { - variant as u8 != 0 - } -} -impl REGION55_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> REGION55_A { - match self.bits { - false => REGION55_A::DISABLED, - true => REGION55_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == REGION55_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == REGION55_A::ENABLED - } -} -#[doc = "Field `REGION55` writer - Enable protection for region 55. Write '0' has no effect."] -pub type REGION55_W<'a, const O: u8> = crate::BitWriter<'a, u32, CONFIG1_SPEC, REGION55_A, O>; -impl<'a, const O: u8> REGION55_W<'a, O> { - #[doc = "Protection disabled"] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(REGION55_A::DISABLED) - } - #[doc = "Protection enabled"] - #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(REGION55_A::ENABLED) - } -} -#[doc = "Field `REGION56` reader - Enable protection for region 56. Write '0' has no effect."] -pub type REGION56_R = crate::BitReader; -#[doc = "Enable protection for region 56. Write '0' has no effect.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum REGION56_A { - #[doc = "0: Protection disabled"] - DISABLED = 0, - #[doc = "1: Protection enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: REGION56_A) -> Self { - variant as u8 != 0 - } -} -impl REGION56_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> REGION56_A { - match self.bits { - false => REGION56_A::DISABLED, - true => REGION56_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == REGION56_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == REGION56_A::ENABLED - } -} -#[doc = "Field `REGION56` writer - Enable protection for region 56. Write '0' has no effect."] -pub type REGION56_W<'a, const O: u8> = crate::BitWriter<'a, u32, CONFIG1_SPEC, REGION56_A, O>; -impl<'a, const O: u8> REGION56_W<'a, O> { - #[doc = "Protection disabled"] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(REGION56_A::DISABLED) - } - #[doc = "Protection enabled"] - #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(REGION56_A::ENABLED) - } -} -#[doc = "Field `REGION57` reader - Enable protection for region 57. Write '0' has no effect."] -pub type REGION57_R = crate::BitReader; -#[doc = "Enable protection for region 57. Write '0' has no effect.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum REGION57_A { - #[doc = "0: Protection disabled"] - DISABLED = 0, - #[doc = "1: Protection enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: REGION57_A) -> Self { - variant as u8 != 0 - } -} -impl REGION57_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> REGION57_A { - match self.bits { - false => REGION57_A::DISABLED, - true => REGION57_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == REGION57_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == REGION57_A::ENABLED - } -} -#[doc = "Field `REGION57` writer - Enable protection for region 57. Write '0' has no effect."] -pub type REGION57_W<'a, const O: u8> = crate::BitWriter<'a, u32, CONFIG1_SPEC, REGION57_A, O>; -impl<'a, const O: u8> REGION57_W<'a, O> { - #[doc = "Protection disabled"] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(REGION57_A::DISABLED) - } - #[doc = "Protection enabled"] - #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(REGION57_A::ENABLED) - } -} -#[doc = "Field `REGION58` reader - Enable protection for region 58. Write '0' has no effect."] -pub type REGION58_R = crate::BitReader; -#[doc = "Enable protection for region 58. Write '0' has no effect.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum REGION58_A { - #[doc = "0: Protection disabled"] - DISABLED = 0, - #[doc = "1: Protection enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: REGION58_A) -> Self { - variant as u8 != 0 - } -} -impl REGION58_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> REGION58_A { - match self.bits { - false => REGION58_A::DISABLED, - true => REGION58_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == REGION58_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == REGION58_A::ENABLED - } -} -#[doc = "Field `REGION58` writer - Enable protection for region 58. Write '0' has no effect."] -pub type REGION58_W<'a, const O: u8> = crate::BitWriter<'a, u32, CONFIG1_SPEC, REGION58_A, O>; -impl<'a, const O: u8> REGION58_W<'a, O> { - #[doc = "Protection disabled"] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(REGION58_A::DISABLED) - } - #[doc = "Protection enabled"] - #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(REGION58_A::ENABLED) - } -} -#[doc = "Field `REGION59` reader - Enable protection for region 59. Write '0' has no effect."] -pub type REGION59_R = crate::BitReader; -#[doc = "Enable protection for region 59. Write '0' has no effect.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum REGION59_A { - #[doc = "0: Protection disabled"] - DISABLED = 0, - #[doc = "1: Protection enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: REGION59_A) -> Self { - variant as u8 != 0 - } -} -impl REGION59_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> REGION59_A { - match self.bits { - false => REGION59_A::DISABLED, - true => REGION59_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == REGION59_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == REGION59_A::ENABLED - } -} -#[doc = "Field `REGION59` writer - Enable protection for region 59. Write '0' has no effect."] -pub type REGION59_W<'a, const O: u8> = crate::BitWriter<'a, u32, CONFIG1_SPEC, REGION59_A, O>; -impl<'a, const O: u8> REGION59_W<'a, O> { - #[doc = "Protection disabled"] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(REGION59_A::DISABLED) - } - #[doc = "Protection enabled"] - #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(REGION59_A::ENABLED) - } -} -#[doc = "Field `REGION60` reader - Enable protection for region 60. Write '0' has no effect."] -pub type REGION60_R = crate::BitReader; -#[doc = "Enable protection for region 60. Write '0' has no effect.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum REGION60_A { - #[doc = "0: Protection disabled"] - DISABLED = 0, - #[doc = "1: Protection enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: REGION60_A) -> Self { - variant as u8 != 0 - } -} -impl REGION60_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> REGION60_A { - match self.bits { - false => REGION60_A::DISABLED, - true => REGION60_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == REGION60_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == REGION60_A::ENABLED - } -} -#[doc = "Field `REGION60` writer - Enable protection for region 60. Write '0' has no effect."] -pub type REGION60_W<'a, const O: u8> = crate::BitWriter<'a, u32, CONFIG1_SPEC, REGION60_A, O>; -impl<'a, const O: u8> REGION60_W<'a, O> { - #[doc = "Protection disabled"] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(REGION60_A::DISABLED) - } - #[doc = "Protection enabled"] - #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(REGION60_A::ENABLED) - } -} -#[doc = "Field `REGION61` reader - Enable protection for region 61. Write '0' has no effect."] -pub type REGION61_R = crate::BitReader; -#[doc = "Enable protection for region 61. Write '0' has no effect.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum REGION61_A { - #[doc = "0: Protection disabled"] - DISABLED = 0, - #[doc = "1: Protection enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: REGION61_A) -> Self { - variant as u8 != 0 - } -} -impl REGION61_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> REGION61_A { - match self.bits { - false => REGION61_A::DISABLED, - true => REGION61_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == REGION61_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == REGION61_A::ENABLED - } -} -#[doc = "Field `REGION61` writer - Enable protection for region 61. Write '0' has no effect."] -pub type REGION61_W<'a, const O: u8> = crate::BitWriter<'a, u32, CONFIG1_SPEC, REGION61_A, O>; -impl<'a, const O: u8> REGION61_W<'a, O> { - #[doc = "Protection disabled"] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(REGION61_A::DISABLED) - } - #[doc = "Protection enabled"] - #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(REGION61_A::ENABLED) - } -} -#[doc = "Field `REGION62` reader - Enable protection for region 62. Write '0' has no effect."] -pub type REGION62_R = crate::BitReader; -#[doc = "Enable protection for region 62. Write '0' has no effect.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum REGION62_A { - #[doc = "0: Protection disabled"] - DISABLED = 0, - #[doc = "1: Protection enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: REGION62_A) -> Self { - variant as u8 != 0 - } -} -impl REGION62_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> REGION62_A { - match self.bits { - false => REGION62_A::DISABLED, - true => REGION62_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == REGION62_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == REGION62_A::ENABLED - } -} -#[doc = "Field `REGION62` writer - Enable protection for region 62. Write '0' has no effect."] -pub type REGION62_W<'a, const O: u8> = crate::BitWriter<'a, u32, CONFIG1_SPEC, REGION62_A, O>; -impl<'a, const O: u8> REGION62_W<'a, O> { - #[doc = "Protection disabled"] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(REGION62_A::DISABLED) - } - #[doc = "Protection enabled"] - #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(REGION62_A::ENABLED) - } -} -#[doc = "Field `REGION63` reader - Enable protection for region 63. Write '0' has no effect."] -pub type REGION63_R = crate::BitReader; -#[doc = "Enable protection for region 63. Write '0' has no effect.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum REGION63_A { - #[doc = "0: Protection disabled"] - DISABLED = 0, - #[doc = "1: Protection enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: REGION63_A) -> Self { - variant as u8 != 0 - } -} -impl REGION63_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> REGION63_A { - match self.bits { - false => REGION63_A::DISABLED, - true => REGION63_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == REGION63_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == REGION63_A::ENABLED - } -} -#[doc = "Field `REGION63` writer - Enable protection for region 63. Write '0' has no effect."] -pub type REGION63_W<'a, const O: u8> = crate::BitWriter<'a, u32, CONFIG1_SPEC, REGION63_A, O>; -impl<'a, const O: u8> REGION63_W<'a, O> { - #[doc = "Protection disabled"] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(REGION63_A::DISABLED) - } - #[doc = "Protection enabled"] - #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(REGION63_A::ENABLED) - } -} -impl R { - #[doc = "Bit 0 - Enable protection for region 32. Write '0' has no effect."] - #[inline(always)] - pub fn region32(&self) -> REGION32_R { - REGION32_R::new((self.bits & 1) != 0) - } - #[doc = "Bit 1 - Enable protection for region 33. Write '0' has no effect."] - #[inline(always)] - pub fn region33(&self) -> REGION33_R { - REGION33_R::new(((self.bits >> 1) & 1) != 0) - } - #[doc = "Bit 2 - Enable protection for region 34. Write '0' has no effect."] - #[inline(always)] - pub fn region34(&self) -> REGION34_R { - REGION34_R::new(((self.bits >> 2) & 1) != 0) - } - #[doc = "Bit 3 - Enable protection for region 35. Write '0' has no effect."] - #[inline(always)] - pub fn region35(&self) -> REGION35_R { - REGION35_R::new(((self.bits >> 3) & 1) != 0) - } - #[doc = "Bit 4 - Enable protection for region 36. Write '0' has no effect."] - #[inline(always)] - pub fn region36(&self) -> REGION36_R { - REGION36_R::new(((self.bits >> 4) & 1) != 0) - } - #[doc = "Bit 5 - Enable protection for region 37. Write '0' has no effect."] - #[inline(always)] - pub fn region37(&self) -> REGION37_R { - REGION37_R::new(((self.bits >> 5) & 1) != 0) - } - #[doc = "Bit 6 - Enable protection for region 38. Write '0' has no effect."] - #[inline(always)] - pub fn region38(&self) -> REGION38_R { - REGION38_R::new(((self.bits >> 6) & 1) != 0) - } - #[doc = "Bit 7 - Enable protection for region 39. Write '0' has no effect."] - #[inline(always)] - pub fn region39(&self) -> REGION39_R { - REGION39_R::new(((self.bits >> 7) & 1) != 0) - } - #[doc = "Bit 8 - Enable protection for region 40. Write '0' has no effect."] - #[inline(always)] - pub fn region40(&self) -> REGION40_R { - REGION40_R::new(((self.bits >> 8) & 1) != 0) - } - #[doc = "Bit 9 - Enable protection for region 41. Write '0' has no effect."] - #[inline(always)] - pub fn region41(&self) -> REGION41_R { - REGION41_R::new(((self.bits >> 9) & 1) != 0) - } - #[doc = "Bit 10 - Enable protection for region 42. Write '0' has no effect."] - #[inline(always)] - pub fn region42(&self) -> REGION42_R { - REGION42_R::new(((self.bits >> 10) & 1) != 0) - } - #[doc = "Bit 11 - Enable protection for region 43. Write '0' has no effect."] - #[inline(always)] - pub fn region43(&self) -> REGION43_R { - REGION43_R::new(((self.bits >> 11) & 1) != 0) - } - #[doc = "Bit 12 - Enable protection for region 44. Write '0' has no effect."] - #[inline(always)] - pub fn region44(&self) -> REGION44_R { - REGION44_R::new(((self.bits >> 12) & 1) != 0) - } - #[doc = "Bit 13 - Enable protection for region 45. Write '0' has no effect."] - #[inline(always)] - pub fn region45(&self) -> REGION45_R { - REGION45_R::new(((self.bits >> 13) & 1) != 0) - } - #[doc = "Bit 14 - Enable protection for region 46. Write '0' has no effect."] - #[inline(always)] - pub fn region46(&self) -> REGION46_R { - REGION46_R::new(((self.bits >> 14) & 1) != 0) - } - #[doc = "Bit 15 - Enable protection for region 47. Write '0' has no effect."] - #[inline(always)] - pub fn region47(&self) -> REGION47_R { - REGION47_R::new(((self.bits >> 15) & 1) != 0) - } - #[doc = "Bit 16 - Enable protection for region 48. Write '0' has no effect."] - #[inline(always)] - pub fn region48(&self) -> REGION48_R { - REGION48_R::new(((self.bits >> 16) & 1) != 0) - } - #[doc = "Bit 17 - Enable protection for region 49. Write '0' has no effect."] - #[inline(always)] - pub fn region49(&self) -> REGION49_R { - REGION49_R::new(((self.bits >> 17) & 1) != 0) - } - #[doc = "Bit 18 - Enable protection for region 50. Write '0' has no effect."] - #[inline(always)] - pub fn region50(&self) -> REGION50_R { - REGION50_R::new(((self.bits >> 18) & 1) != 0) - } - #[doc = "Bit 19 - Enable protection for region 51. Write '0' has no effect."] - #[inline(always)] - pub fn region51(&self) -> REGION51_R { - REGION51_R::new(((self.bits >> 19) & 1) != 0) - } - #[doc = "Bit 20 - Enable protection for region 52. Write '0' has no effect."] - #[inline(always)] - pub fn region52(&self) -> REGION52_R { - REGION52_R::new(((self.bits >> 20) & 1) != 0) - } - #[doc = "Bit 21 - Enable protection for region 53. Write '0' has no effect."] - #[inline(always)] - pub fn region53(&self) -> REGION53_R { - REGION53_R::new(((self.bits >> 21) & 1) != 0) - } - #[doc = "Bit 22 - Enable protection for region 54. Write '0' has no effect."] - #[inline(always)] - pub fn region54(&self) -> REGION54_R { - REGION54_R::new(((self.bits >> 22) & 1) != 0) - } - #[doc = "Bit 23 - Enable protection for region 55. Write '0' has no effect."] - #[inline(always)] - pub fn region55(&self) -> REGION55_R { - REGION55_R::new(((self.bits >> 23) & 1) != 0) - } - #[doc = "Bit 24 - Enable protection for region 56. Write '0' has no effect."] - #[inline(always)] - pub fn region56(&self) -> REGION56_R { - REGION56_R::new(((self.bits >> 24) & 1) != 0) - } - #[doc = "Bit 25 - Enable protection for region 57. Write '0' has no effect."] - #[inline(always)] - pub fn region57(&self) -> REGION57_R { - REGION57_R::new(((self.bits >> 25) & 1) != 0) - } - #[doc = "Bit 26 - Enable protection for region 58. Write '0' has no effect."] - #[inline(always)] - pub fn region58(&self) -> REGION58_R { - REGION58_R::new(((self.bits >> 26) & 1) != 0) - } - #[doc = "Bit 27 - Enable protection for region 59. Write '0' has no effect."] - #[inline(always)] - pub fn region59(&self) -> REGION59_R { - REGION59_R::new(((self.bits >> 27) & 1) != 0) - } - #[doc = "Bit 28 - Enable protection for region 60. Write '0' has no effect."] - #[inline(always)] - pub fn region60(&self) -> REGION60_R { - REGION60_R::new(((self.bits >> 28) & 1) != 0) - } - #[doc = "Bit 29 - Enable protection for region 61. Write '0' has no effect."] - #[inline(always)] - pub fn region61(&self) -> REGION61_R { - REGION61_R::new(((self.bits >> 29) & 1) != 0) - } - #[doc = "Bit 30 - Enable protection for region 62. Write '0' has no effect."] - #[inline(always)] - pub fn region62(&self) -> REGION62_R { - REGION62_R::new(((self.bits >> 30) & 1) != 0) - } - #[doc = "Bit 31 - Enable protection for region 63. Write '0' has no effect."] - #[inline(always)] - pub fn region63(&self) -> REGION63_R { - REGION63_R::new(((self.bits >> 31) & 1) != 0) - } -} -impl W { - #[doc = "Bit 0 - Enable protection for region 32. Write '0' has no effect."] - #[inline(always)] - #[must_use] - pub fn region32(&mut self) -> REGION32_W<0> { - REGION32_W::new(self) - } - #[doc = "Bit 1 - Enable protection for region 33. Write '0' has no effect."] - #[inline(always)] - #[must_use] - pub fn region33(&mut self) -> REGION33_W<1> { - REGION33_W::new(self) - } - #[doc = "Bit 2 - Enable protection for region 34. Write '0' has no effect."] - #[inline(always)] - #[must_use] - pub fn region34(&mut self) -> REGION34_W<2> { - REGION34_W::new(self) - } - #[doc = "Bit 3 - Enable protection for region 35. Write '0' has no effect."] - #[inline(always)] - #[must_use] - pub fn region35(&mut self) -> REGION35_W<3> { - REGION35_W::new(self) - } - #[doc = "Bit 4 - Enable protection for region 36. Write '0' has no effect."] - #[inline(always)] - #[must_use] - pub fn region36(&mut self) -> REGION36_W<4> { - REGION36_W::new(self) - } - #[doc = "Bit 5 - Enable protection for region 37. Write '0' has no effect."] - #[inline(always)] - #[must_use] - pub fn region37(&mut self) -> REGION37_W<5> { - REGION37_W::new(self) - } - #[doc = "Bit 6 - Enable protection for region 38. Write '0' has no effect."] - #[inline(always)] - #[must_use] - pub fn region38(&mut self) -> REGION38_W<6> { - REGION38_W::new(self) - } - #[doc = "Bit 7 - Enable protection for region 39. Write '0' has no effect."] - #[inline(always)] - #[must_use] - pub fn region39(&mut self) -> REGION39_W<7> { - REGION39_W::new(self) - } - #[doc = "Bit 8 - Enable protection for region 40. Write '0' has no effect."] - #[inline(always)] - #[must_use] - pub fn region40(&mut self) -> REGION40_W<8> { - REGION40_W::new(self) - } - #[doc = "Bit 9 - Enable protection for region 41. Write '0' has no effect."] - #[inline(always)] - #[must_use] - pub fn region41(&mut self) -> REGION41_W<9> { - REGION41_W::new(self) - } - #[doc = "Bit 10 - Enable protection for region 42. Write '0' has no effect."] - #[inline(always)] - #[must_use] - pub fn region42(&mut self) -> REGION42_W<10> { - REGION42_W::new(self) - } - #[doc = "Bit 11 - Enable protection for region 43. Write '0' has no effect."] - #[inline(always)] - #[must_use] - pub fn region43(&mut self) -> REGION43_W<11> { - REGION43_W::new(self) - } - #[doc = "Bit 12 - Enable protection for region 44. Write '0' has no effect."] - #[inline(always)] - #[must_use] - pub fn region44(&mut self) -> REGION44_W<12> { - REGION44_W::new(self) - } - #[doc = "Bit 13 - Enable protection for region 45. Write '0' has no effect."] - #[inline(always)] - #[must_use] - pub fn region45(&mut self) -> REGION45_W<13> { - REGION45_W::new(self) - } - #[doc = "Bit 14 - Enable protection for region 46. Write '0' has no effect."] - #[inline(always)] - #[must_use] - pub fn region46(&mut self) -> REGION46_W<14> { - REGION46_W::new(self) - } - #[doc = "Bit 15 - Enable protection for region 47. Write '0' has no effect."] - #[inline(always)] - #[must_use] - pub fn region47(&mut self) -> REGION47_W<15> { - REGION47_W::new(self) - } - #[doc = "Bit 16 - Enable protection for region 48. Write '0' has no effect."] - #[inline(always)] - #[must_use] - pub fn region48(&mut self) -> REGION48_W<16> { - REGION48_W::new(self) - } - #[doc = "Bit 17 - Enable protection for region 49. Write '0' has no effect."] - #[inline(always)] - #[must_use] - pub fn region49(&mut self) -> REGION49_W<17> { - REGION49_W::new(self) - } - #[doc = "Bit 18 - Enable protection for region 50. Write '0' has no effect."] - #[inline(always)] - #[must_use] - pub fn region50(&mut self) -> REGION50_W<18> { - REGION50_W::new(self) - } - #[doc = "Bit 19 - Enable protection for region 51. Write '0' has no effect."] - #[inline(always)] - #[must_use] - pub fn region51(&mut self) -> REGION51_W<19> { - REGION51_W::new(self) - } - #[doc = "Bit 20 - Enable protection for region 52. Write '0' has no effect."] - #[inline(always)] - #[must_use] - pub fn region52(&mut self) -> REGION52_W<20> { - REGION52_W::new(self) - } - #[doc = "Bit 21 - Enable protection for region 53. Write '0' has no effect."] - #[inline(always)] - #[must_use] - pub fn region53(&mut self) -> REGION53_W<21> { - REGION53_W::new(self) - } - #[doc = "Bit 22 - Enable protection for region 54. Write '0' has no effect."] - #[inline(always)] - #[must_use] - pub fn region54(&mut self) -> REGION54_W<22> { - REGION54_W::new(self) - } - #[doc = "Bit 23 - Enable protection for region 55. Write '0' has no effect."] - #[inline(always)] - #[must_use] - pub fn region55(&mut self) -> REGION55_W<23> { - REGION55_W::new(self) - } - #[doc = "Bit 24 - Enable protection for region 56. Write '0' has no effect."] - #[inline(always)] - #[must_use] - pub fn region56(&mut self) -> REGION56_W<24> { - REGION56_W::new(self) - } - #[doc = "Bit 25 - Enable protection for region 57. Write '0' has no effect."] - #[inline(always)] - #[must_use] - pub fn region57(&mut self) -> REGION57_W<25> { - REGION57_W::new(self) - } - #[doc = "Bit 26 - Enable protection for region 58. Write '0' has no effect."] - #[inline(always)] - #[must_use] - pub fn region58(&mut self) -> REGION58_W<26> { - REGION58_W::new(self) - } - #[doc = "Bit 27 - Enable protection for region 59. Write '0' has no effect."] - #[inline(always)] - #[must_use] - pub fn region59(&mut self) -> REGION59_W<27> { - REGION59_W::new(self) - } - #[doc = "Bit 28 - Enable protection for region 60. Write '0' has no effect."] - #[inline(always)] - #[must_use] - pub fn region60(&mut self) -> REGION60_W<28> { - REGION60_W::new(self) - } - #[doc = "Bit 29 - Enable protection for region 61. Write '0' has no effect."] - #[inline(always)] - #[must_use] - pub fn region61(&mut self) -> REGION61_W<29> { - REGION61_W::new(self) - } - #[doc = "Bit 30 - Enable protection for region 62. Write '0' has no effect."] - #[inline(always)] - #[must_use] - pub fn region62(&mut self) -> REGION62_W<30> { - REGION62_W::new(self) - } - #[doc = "Bit 31 - Enable protection for region 63. Write '0' has no effect."] - #[inline(always)] - #[must_use] - pub fn region63(&mut self) -> REGION63_W<31> { - REGION63_W::new(self) - } - #[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 = "Block protect configuration register 1\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 [config1](index.html) module"] -pub struct CONFIG1_SPEC; -impl crate::RegisterSpec for CONFIG1_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [config1::R](R) reader structure"] -impl crate::Readable for CONFIG1_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [config1::W](W) writer structure"] -impl crate::Writable for 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 CONFIG1 to value 0"] -impl crate::Resettable for CONFIG1_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/bprot/config2.rs b/down-the-stack/dk_pac/src/bprot/config2.rs deleted file mode 100644 index 55c8f74..0000000 --- a/down-the-stack/dk_pac/src/bprot/config2.rs +++ /dev/null @@ -1,2017 +0,0 @@ -#[doc = "Register `CONFIG2` 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 `CONFIG2` 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 `REGION64` reader - Enable protection for region 64. Write '0' has no effect."] -pub type REGION64_R = crate::BitReader; -#[doc = "Enable protection for region 64. Write '0' has no effect.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum REGION64_A { - #[doc = "0: Protection disabled"] - DISABLED = 0, - #[doc = "1: Protection enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: REGION64_A) -> Self { - variant as u8 != 0 - } -} -impl REGION64_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> REGION64_A { - match self.bits { - false => REGION64_A::DISABLED, - true => REGION64_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == REGION64_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == REGION64_A::ENABLED - } -} -#[doc = "Field `REGION64` writer - Enable protection for region 64. Write '0' has no effect."] -pub type REGION64_W<'a, const O: u8> = crate::BitWriter<'a, u32, CONFIG2_SPEC, REGION64_A, O>; -impl<'a, const O: u8> REGION64_W<'a, O> { - #[doc = "Protection disabled"] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(REGION64_A::DISABLED) - } - #[doc = "Protection enabled"] - #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(REGION64_A::ENABLED) - } -} -#[doc = "Field `REGION65` reader - Enable protection for region 65. Write '0' has no effect."] -pub type REGION65_R = crate::BitReader; -#[doc = "Enable protection for region 65. Write '0' has no effect.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum REGION65_A { - #[doc = "0: Protection disabled"] - DISABLED = 0, - #[doc = "1: Protection enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: REGION65_A) -> Self { - variant as u8 != 0 - } -} -impl REGION65_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> REGION65_A { - match self.bits { - false => REGION65_A::DISABLED, - true => REGION65_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == REGION65_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == REGION65_A::ENABLED - } -} -#[doc = "Field `REGION65` writer - Enable protection for region 65. Write '0' has no effect."] -pub type REGION65_W<'a, const O: u8> = crate::BitWriter<'a, u32, CONFIG2_SPEC, REGION65_A, O>; -impl<'a, const O: u8> REGION65_W<'a, O> { - #[doc = "Protection disabled"] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(REGION65_A::DISABLED) - } - #[doc = "Protection enabled"] - #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(REGION65_A::ENABLED) - } -} -#[doc = "Field `REGION66` reader - Enable protection for region 66. Write '0' has no effect."] -pub type REGION66_R = crate::BitReader; -#[doc = "Enable protection for region 66. Write '0' has no effect.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum REGION66_A { - #[doc = "0: Protection disabled"] - DISABLED = 0, - #[doc = "1: Protection enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: REGION66_A) -> Self { - variant as u8 != 0 - } -} -impl REGION66_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> REGION66_A { - match self.bits { - false => REGION66_A::DISABLED, - true => REGION66_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == REGION66_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == REGION66_A::ENABLED - } -} -#[doc = "Field `REGION66` writer - Enable protection for region 66. Write '0' has no effect."] -pub type REGION66_W<'a, const O: u8> = crate::BitWriter<'a, u32, CONFIG2_SPEC, REGION66_A, O>; -impl<'a, const O: u8> REGION66_W<'a, O> { - #[doc = "Protection disabled"] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(REGION66_A::DISABLED) - } - #[doc = "Protection enabled"] - #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(REGION66_A::ENABLED) - } -} -#[doc = "Field `REGION67` reader - Enable protection for region 67. Write '0' has no effect."] -pub type REGION67_R = crate::BitReader; -#[doc = "Enable protection for region 67. Write '0' has no effect.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum REGION67_A { - #[doc = "0: Protection disabled"] - DISABLED = 0, - #[doc = "1: Protection enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: REGION67_A) -> Self { - variant as u8 != 0 - } -} -impl REGION67_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> REGION67_A { - match self.bits { - false => REGION67_A::DISABLED, - true => REGION67_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == REGION67_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == REGION67_A::ENABLED - } -} -#[doc = "Field `REGION67` writer - Enable protection for region 67. Write '0' has no effect."] -pub type REGION67_W<'a, const O: u8> = crate::BitWriter<'a, u32, CONFIG2_SPEC, REGION67_A, O>; -impl<'a, const O: u8> REGION67_W<'a, O> { - #[doc = "Protection disabled"] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(REGION67_A::DISABLED) - } - #[doc = "Protection enabled"] - #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(REGION67_A::ENABLED) - } -} -#[doc = "Field `REGION68` reader - Enable protection for region 68. Write '0' has no effect."] -pub type REGION68_R = crate::BitReader; -#[doc = "Enable protection for region 68. Write '0' has no effect.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum REGION68_A { - #[doc = "0: Protection disabled"] - DISABLED = 0, - #[doc = "1: Protection enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: REGION68_A) -> Self { - variant as u8 != 0 - } -} -impl REGION68_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> REGION68_A { - match self.bits { - false => REGION68_A::DISABLED, - true => REGION68_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == REGION68_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == REGION68_A::ENABLED - } -} -#[doc = "Field `REGION68` writer - Enable protection for region 68. Write '0' has no effect."] -pub type REGION68_W<'a, const O: u8> = crate::BitWriter<'a, u32, CONFIG2_SPEC, REGION68_A, O>; -impl<'a, const O: u8> REGION68_W<'a, O> { - #[doc = "Protection disabled"] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(REGION68_A::DISABLED) - } - #[doc = "Protection enabled"] - #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(REGION68_A::ENABLED) - } -} -#[doc = "Field `REGION69` reader - Enable protection for region 69. Write '0' has no effect."] -pub type REGION69_R = crate::BitReader; -#[doc = "Enable protection for region 69. Write '0' has no effect.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum REGION69_A { - #[doc = "0: Protection disabled"] - DISABLED = 0, - #[doc = "1: Protection enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: REGION69_A) -> Self { - variant as u8 != 0 - } -} -impl REGION69_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> REGION69_A { - match self.bits { - false => REGION69_A::DISABLED, - true => REGION69_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == REGION69_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == REGION69_A::ENABLED - } -} -#[doc = "Field `REGION69` writer - Enable protection for region 69. Write '0' has no effect."] -pub type REGION69_W<'a, const O: u8> = crate::BitWriter<'a, u32, CONFIG2_SPEC, REGION69_A, O>; -impl<'a, const O: u8> REGION69_W<'a, O> { - #[doc = "Protection disabled"] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(REGION69_A::DISABLED) - } - #[doc = "Protection enabled"] - #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(REGION69_A::ENABLED) - } -} -#[doc = "Field `REGION70` reader - Enable protection for region 70. Write '0' has no effect."] -pub type REGION70_R = crate::BitReader; -#[doc = "Enable protection for region 70. Write '0' has no effect.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum REGION70_A { - #[doc = "0: Protection disabled"] - DISABLED = 0, - #[doc = "1: Protection enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: REGION70_A) -> Self { - variant as u8 != 0 - } -} -impl REGION70_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> REGION70_A { - match self.bits { - false => REGION70_A::DISABLED, - true => REGION70_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == REGION70_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == REGION70_A::ENABLED - } -} -#[doc = "Field `REGION70` writer - Enable protection for region 70. Write '0' has no effect."] -pub type REGION70_W<'a, const O: u8> = crate::BitWriter<'a, u32, CONFIG2_SPEC, REGION70_A, O>; -impl<'a, const O: u8> REGION70_W<'a, O> { - #[doc = "Protection disabled"] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(REGION70_A::DISABLED) - } - #[doc = "Protection enabled"] - #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(REGION70_A::ENABLED) - } -} -#[doc = "Field `REGION71` reader - Enable protection for region 71. Write '0' has no effect."] -pub type REGION71_R = crate::BitReader; -#[doc = "Enable protection for region 71. Write '0' has no effect.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum REGION71_A { - #[doc = "0: Protection disabled"] - DISABLED = 0, - #[doc = "1: Protection enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: REGION71_A) -> Self { - variant as u8 != 0 - } -} -impl REGION71_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> REGION71_A { - match self.bits { - false => REGION71_A::DISABLED, - true => REGION71_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == REGION71_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == REGION71_A::ENABLED - } -} -#[doc = "Field `REGION71` writer - Enable protection for region 71. Write '0' has no effect."] -pub type REGION71_W<'a, const O: u8> = crate::BitWriter<'a, u32, CONFIG2_SPEC, REGION71_A, O>; -impl<'a, const O: u8> REGION71_W<'a, O> { - #[doc = "Protection disabled"] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(REGION71_A::DISABLED) - } - #[doc = "Protection enabled"] - #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(REGION71_A::ENABLED) - } -} -#[doc = "Field `REGION72` reader - Enable protection for region 72. Write '0' has no effect."] -pub type REGION72_R = crate::BitReader; -#[doc = "Enable protection for region 72. Write '0' has no effect.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum REGION72_A { - #[doc = "0: Protection disabled"] - DISABLED = 0, - #[doc = "1: Protection enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: REGION72_A) -> Self { - variant as u8 != 0 - } -} -impl REGION72_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> REGION72_A { - match self.bits { - false => REGION72_A::DISABLED, - true => REGION72_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == REGION72_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == REGION72_A::ENABLED - } -} -#[doc = "Field `REGION72` writer - Enable protection for region 72. Write '0' has no effect."] -pub type REGION72_W<'a, const O: u8> = crate::BitWriter<'a, u32, CONFIG2_SPEC, REGION72_A, O>; -impl<'a, const O: u8> REGION72_W<'a, O> { - #[doc = "Protection disabled"] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(REGION72_A::DISABLED) - } - #[doc = "Protection enabled"] - #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(REGION72_A::ENABLED) - } -} -#[doc = "Field `REGION73` reader - Enable protection for region 73. Write '0' has no effect."] -pub type REGION73_R = crate::BitReader; -#[doc = "Enable protection for region 73. Write '0' has no effect.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum REGION73_A { - #[doc = "0: Protection disabled"] - DISABLED = 0, - #[doc = "1: Protection enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: REGION73_A) -> Self { - variant as u8 != 0 - } -} -impl REGION73_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> REGION73_A { - match self.bits { - false => REGION73_A::DISABLED, - true => REGION73_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == REGION73_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == REGION73_A::ENABLED - } -} -#[doc = "Field `REGION73` writer - Enable protection for region 73. Write '0' has no effect."] -pub type REGION73_W<'a, const O: u8> = crate::BitWriter<'a, u32, CONFIG2_SPEC, REGION73_A, O>; -impl<'a, const O: u8> REGION73_W<'a, O> { - #[doc = "Protection disabled"] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(REGION73_A::DISABLED) - } - #[doc = "Protection enabled"] - #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(REGION73_A::ENABLED) - } -} -#[doc = "Field `REGION74` reader - Enable protection for region 74. Write '0' has no effect."] -pub type REGION74_R = crate::BitReader; -#[doc = "Enable protection for region 74. Write '0' has no effect.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum REGION74_A { - #[doc = "0: Protection disabled"] - DISABLED = 0, - #[doc = "1: Protection enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: REGION74_A) -> Self { - variant as u8 != 0 - } -} -impl REGION74_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> REGION74_A { - match self.bits { - false => REGION74_A::DISABLED, - true => REGION74_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == REGION74_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == REGION74_A::ENABLED - } -} -#[doc = "Field `REGION74` writer - Enable protection for region 74. Write '0' has no effect."] -pub type REGION74_W<'a, const O: u8> = crate::BitWriter<'a, u32, CONFIG2_SPEC, REGION74_A, O>; -impl<'a, const O: u8> REGION74_W<'a, O> { - #[doc = "Protection disabled"] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(REGION74_A::DISABLED) - } - #[doc = "Protection enabled"] - #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(REGION74_A::ENABLED) - } -} -#[doc = "Field `REGION75` reader - Enable protection for region 75. Write '0' has no effect."] -pub type REGION75_R = crate::BitReader; -#[doc = "Enable protection for region 75. Write '0' has no effect.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum REGION75_A { - #[doc = "0: Protection disabled"] - DISABLED = 0, - #[doc = "1: Protection enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: REGION75_A) -> Self { - variant as u8 != 0 - } -} -impl REGION75_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> REGION75_A { - match self.bits { - false => REGION75_A::DISABLED, - true => REGION75_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == REGION75_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == REGION75_A::ENABLED - } -} -#[doc = "Field `REGION75` writer - Enable protection for region 75. Write '0' has no effect."] -pub type REGION75_W<'a, const O: u8> = crate::BitWriter<'a, u32, CONFIG2_SPEC, REGION75_A, O>; -impl<'a, const O: u8> REGION75_W<'a, O> { - #[doc = "Protection disabled"] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(REGION75_A::DISABLED) - } - #[doc = "Protection enabled"] - #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(REGION75_A::ENABLED) - } -} -#[doc = "Field `REGION76` reader - Enable protection for region 76. Write '0' has no effect."] -pub type REGION76_R = crate::BitReader; -#[doc = "Enable protection for region 76. Write '0' has no effect.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum REGION76_A { - #[doc = "0: Protection disabled"] - DISABLED = 0, - #[doc = "1: Protection enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: REGION76_A) -> Self { - variant as u8 != 0 - } -} -impl REGION76_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> REGION76_A { - match self.bits { - false => REGION76_A::DISABLED, - true => REGION76_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == REGION76_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == REGION76_A::ENABLED - } -} -#[doc = "Field `REGION76` writer - Enable protection for region 76. Write '0' has no effect."] -pub type REGION76_W<'a, const O: u8> = crate::BitWriter<'a, u32, CONFIG2_SPEC, REGION76_A, O>; -impl<'a, const O: u8> REGION76_W<'a, O> { - #[doc = "Protection disabled"] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(REGION76_A::DISABLED) - } - #[doc = "Protection enabled"] - #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(REGION76_A::ENABLED) - } -} -#[doc = "Field `REGION77` reader - Enable protection for region 77. Write '0' has no effect."] -pub type REGION77_R = crate::BitReader; -#[doc = "Enable protection for region 77. Write '0' has no effect.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum REGION77_A { - #[doc = "0: Protection disabled"] - DISABLED = 0, - #[doc = "1: Protection enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: REGION77_A) -> Self { - variant as u8 != 0 - } -} -impl REGION77_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> REGION77_A { - match self.bits { - false => REGION77_A::DISABLED, - true => REGION77_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == REGION77_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == REGION77_A::ENABLED - } -} -#[doc = "Field `REGION77` writer - Enable protection for region 77. Write '0' has no effect."] -pub type REGION77_W<'a, const O: u8> = crate::BitWriter<'a, u32, CONFIG2_SPEC, REGION77_A, O>; -impl<'a, const O: u8> REGION77_W<'a, O> { - #[doc = "Protection disabled"] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(REGION77_A::DISABLED) - } - #[doc = "Protection enabled"] - #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(REGION77_A::ENABLED) - } -} -#[doc = "Field `REGION78` reader - Enable protection for region 78. Write '0' has no effect."] -pub type REGION78_R = crate::BitReader; -#[doc = "Enable protection for region 78. Write '0' has no effect.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum REGION78_A { - #[doc = "0: Protection disabled"] - DISABLED = 0, - #[doc = "1: Protection enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: REGION78_A) -> Self { - variant as u8 != 0 - } -} -impl REGION78_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> REGION78_A { - match self.bits { - false => REGION78_A::DISABLED, - true => REGION78_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == REGION78_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == REGION78_A::ENABLED - } -} -#[doc = "Field `REGION78` writer - Enable protection for region 78. Write '0' has no effect."] -pub type REGION78_W<'a, const O: u8> = crate::BitWriter<'a, u32, CONFIG2_SPEC, REGION78_A, O>; -impl<'a, const O: u8> REGION78_W<'a, O> { - #[doc = "Protection disabled"] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(REGION78_A::DISABLED) - } - #[doc = "Protection enabled"] - #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(REGION78_A::ENABLED) - } -} -#[doc = "Field `REGION79` reader - Enable protection for region 79. Write '0' has no effect."] -pub type REGION79_R = crate::BitReader; -#[doc = "Enable protection for region 79. Write '0' has no effect.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum REGION79_A { - #[doc = "0: Protection disabled"] - DISABLED = 0, - #[doc = "1: Protection enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: REGION79_A) -> Self { - variant as u8 != 0 - } -} -impl REGION79_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> REGION79_A { - match self.bits { - false => REGION79_A::DISABLED, - true => REGION79_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == REGION79_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == REGION79_A::ENABLED - } -} -#[doc = "Field `REGION79` writer - Enable protection for region 79. Write '0' has no effect."] -pub type REGION79_W<'a, const O: u8> = crate::BitWriter<'a, u32, CONFIG2_SPEC, REGION79_A, O>; -impl<'a, const O: u8> REGION79_W<'a, O> { - #[doc = "Protection disabled"] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(REGION79_A::DISABLED) - } - #[doc = "Protection enabled"] - #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(REGION79_A::ENABLED) - } -} -#[doc = "Field `REGION80` reader - Enable protection for region 80. Write '0' has no effect."] -pub type REGION80_R = crate::BitReader; -#[doc = "Enable protection for region 80. Write '0' has no effect.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum REGION80_A { - #[doc = "0: Protection disabled"] - DISABLED = 0, - #[doc = "1: Protection enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: REGION80_A) -> Self { - variant as u8 != 0 - } -} -impl REGION80_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> REGION80_A { - match self.bits { - false => REGION80_A::DISABLED, - true => REGION80_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == REGION80_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == REGION80_A::ENABLED - } -} -#[doc = "Field `REGION80` writer - Enable protection for region 80. Write '0' has no effect."] -pub type REGION80_W<'a, const O: u8> = crate::BitWriter<'a, u32, CONFIG2_SPEC, REGION80_A, O>; -impl<'a, const O: u8> REGION80_W<'a, O> { - #[doc = "Protection disabled"] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(REGION80_A::DISABLED) - } - #[doc = "Protection enabled"] - #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(REGION80_A::ENABLED) - } -} -#[doc = "Field `REGION81` reader - Enable protection for region 81. Write '0' has no effect."] -pub type REGION81_R = crate::BitReader; -#[doc = "Enable protection for region 81. Write '0' has no effect.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum REGION81_A { - #[doc = "0: Protection disabled"] - DISABLED = 0, - #[doc = "1: Protection enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: REGION81_A) -> Self { - variant as u8 != 0 - } -} -impl REGION81_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> REGION81_A { - match self.bits { - false => REGION81_A::DISABLED, - true => REGION81_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == REGION81_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == REGION81_A::ENABLED - } -} -#[doc = "Field `REGION81` writer - Enable protection for region 81. Write '0' has no effect."] -pub type REGION81_W<'a, const O: u8> = crate::BitWriter<'a, u32, CONFIG2_SPEC, REGION81_A, O>; -impl<'a, const O: u8> REGION81_W<'a, O> { - #[doc = "Protection disabled"] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(REGION81_A::DISABLED) - } - #[doc = "Protection enabled"] - #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(REGION81_A::ENABLED) - } -} -#[doc = "Field `REGION82` reader - Enable protection for region 82. Write '0' has no effect."] -pub type REGION82_R = crate::BitReader; -#[doc = "Enable protection for region 82. Write '0' has no effect.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum REGION82_A { - #[doc = "0: Protection disabled"] - DISABLED = 0, - #[doc = "1: Protection enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: REGION82_A) -> Self { - variant as u8 != 0 - } -} -impl REGION82_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> REGION82_A { - match self.bits { - false => REGION82_A::DISABLED, - true => REGION82_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == REGION82_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == REGION82_A::ENABLED - } -} -#[doc = "Field `REGION82` writer - Enable protection for region 82. Write '0' has no effect."] -pub type REGION82_W<'a, const O: u8> = crate::BitWriter<'a, u32, CONFIG2_SPEC, REGION82_A, O>; -impl<'a, const O: u8> REGION82_W<'a, O> { - #[doc = "Protection disabled"] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(REGION82_A::DISABLED) - } - #[doc = "Protection enabled"] - #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(REGION82_A::ENABLED) - } -} -#[doc = "Field `REGION83` reader - Enable protection for region 83. Write '0' has no effect."] -pub type REGION83_R = crate::BitReader; -#[doc = "Enable protection for region 83. Write '0' has no effect.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum REGION83_A { - #[doc = "0: Protection disabled"] - DISABLED = 0, - #[doc = "1: Protection enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: REGION83_A) -> Self { - variant as u8 != 0 - } -} -impl REGION83_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> REGION83_A { - match self.bits { - false => REGION83_A::DISABLED, - true => REGION83_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == REGION83_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == REGION83_A::ENABLED - } -} -#[doc = "Field `REGION83` writer - Enable protection for region 83. Write '0' has no effect."] -pub type REGION83_W<'a, const O: u8> = crate::BitWriter<'a, u32, CONFIG2_SPEC, REGION83_A, O>; -impl<'a, const O: u8> REGION83_W<'a, O> { - #[doc = "Protection disabled"] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(REGION83_A::DISABLED) - } - #[doc = "Protection enabled"] - #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(REGION83_A::ENABLED) - } -} -#[doc = "Field `REGION84` reader - Enable protection for region 84. Write '0' has no effect."] -pub type REGION84_R = crate::BitReader; -#[doc = "Enable protection for region 84. Write '0' has no effect.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum REGION84_A { - #[doc = "0: Protection disabled"] - DISABLED = 0, - #[doc = "1: Protection enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: REGION84_A) -> Self { - variant as u8 != 0 - } -} -impl REGION84_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> REGION84_A { - match self.bits { - false => REGION84_A::DISABLED, - true => REGION84_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == REGION84_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == REGION84_A::ENABLED - } -} -#[doc = "Field `REGION84` writer - Enable protection for region 84. Write '0' has no effect."] -pub type REGION84_W<'a, const O: u8> = crate::BitWriter<'a, u32, CONFIG2_SPEC, REGION84_A, O>; -impl<'a, const O: u8> REGION84_W<'a, O> { - #[doc = "Protection disabled"] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(REGION84_A::DISABLED) - } - #[doc = "Protection enabled"] - #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(REGION84_A::ENABLED) - } -} -#[doc = "Field `REGION85` reader - Enable protection for region 85. Write '0' has no effect."] -pub type REGION85_R = crate::BitReader; -#[doc = "Enable protection for region 85. Write '0' has no effect.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum REGION85_A { - #[doc = "0: Protection disabled"] - DISABLED = 0, - #[doc = "1: Protection enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: REGION85_A) -> Self { - variant as u8 != 0 - } -} -impl REGION85_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> REGION85_A { - match self.bits { - false => REGION85_A::DISABLED, - true => REGION85_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == REGION85_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == REGION85_A::ENABLED - } -} -#[doc = "Field `REGION85` writer - Enable protection for region 85. Write '0' has no effect."] -pub type REGION85_W<'a, const O: u8> = crate::BitWriter<'a, u32, CONFIG2_SPEC, REGION85_A, O>; -impl<'a, const O: u8> REGION85_W<'a, O> { - #[doc = "Protection disabled"] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(REGION85_A::DISABLED) - } - #[doc = "Protection enabled"] - #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(REGION85_A::ENABLED) - } -} -#[doc = "Field `REGION86` reader - Enable protection for region 86. Write '0' has no effect."] -pub type REGION86_R = crate::BitReader; -#[doc = "Enable protection for region 86. Write '0' has no effect.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum REGION86_A { - #[doc = "0: Protection disabled"] - DISABLED = 0, - #[doc = "1: Protection enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: REGION86_A) -> Self { - variant as u8 != 0 - } -} -impl REGION86_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> REGION86_A { - match self.bits { - false => REGION86_A::DISABLED, - true => REGION86_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == REGION86_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == REGION86_A::ENABLED - } -} -#[doc = "Field `REGION86` writer - Enable protection for region 86. Write '0' has no effect."] -pub type REGION86_W<'a, const O: u8> = crate::BitWriter<'a, u32, CONFIG2_SPEC, REGION86_A, O>; -impl<'a, const O: u8> REGION86_W<'a, O> { - #[doc = "Protection disabled"] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(REGION86_A::DISABLED) - } - #[doc = "Protection enabled"] - #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(REGION86_A::ENABLED) - } -} -#[doc = "Field `REGION87` reader - Enable protection for region 87. Write '0' has no effect."] -pub type REGION87_R = crate::BitReader; -#[doc = "Enable protection for region 87. Write '0' has no effect.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum REGION87_A { - #[doc = "0: Protection disabled"] - DISABLED = 0, - #[doc = "1: Protection enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: REGION87_A) -> Self { - variant as u8 != 0 - } -} -impl REGION87_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> REGION87_A { - match self.bits { - false => REGION87_A::DISABLED, - true => REGION87_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == REGION87_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == REGION87_A::ENABLED - } -} -#[doc = "Field `REGION87` writer - Enable protection for region 87. Write '0' has no effect."] -pub type REGION87_W<'a, const O: u8> = crate::BitWriter<'a, u32, CONFIG2_SPEC, REGION87_A, O>; -impl<'a, const O: u8> REGION87_W<'a, O> { - #[doc = "Protection disabled"] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(REGION87_A::DISABLED) - } - #[doc = "Protection enabled"] - #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(REGION87_A::ENABLED) - } -} -#[doc = "Field `REGION88` reader - Enable protection for region 88. Write '0' has no effect."] -pub type REGION88_R = crate::BitReader; -#[doc = "Enable protection for region 88. Write '0' has no effect.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum REGION88_A { - #[doc = "0: Protection disabled"] - DISABLED = 0, - #[doc = "1: Protection enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: REGION88_A) -> Self { - variant as u8 != 0 - } -} -impl REGION88_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> REGION88_A { - match self.bits { - false => REGION88_A::DISABLED, - true => REGION88_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == REGION88_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == REGION88_A::ENABLED - } -} -#[doc = "Field `REGION88` writer - Enable protection for region 88. Write '0' has no effect."] -pub type REGION88_W<'a, const O: u8> = crate::BitWriter<'a, u32, CONFIG2_SPEC, REGION88_A, O>; -impl<'a, const O: u8> REGION88_W<'a, O> { - #[doc = "Protection disabled"] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(REGION88_A::DISABLED) - } - #[doc = "Protection enabled"] - #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(REGION88_A::ENABLED) - } -} -#[doc = "Field `REGION89` reader - Enable protection for region 89. Write '0' has no effect."] -pub type REGION89_R = crate::BitReader; -#[doc = "Enable protection for region 89. Write '0' has no effect.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum REGION89_A { - #[doc = "0: Protection disabled"] - DISABLED = 0, - #[doc = "1: Protection enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: REGION89_A) -> Self { - variant as u8 != 0 - } -} -impl REGION89_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> REGION89_A { - match self.bits { - false => REGION89_A::DISABLED, - true => REGION89_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == REGION89_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == REGION89_A::ENABLED - } -} -#[doc = "Field `REGION89` writer - Enable protection for region 89. Write '0' has no effect."] -pub type REGION89_W<'a, const O: u8> = crate::BitWriter<'a, u32, CONFIG2_SPEC, REGION89_A, O>; -impl<'a, const O: u8> REGION89_W<'a, O> { - #[doc = "Protection disabled"] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(REGION89_A::DISABLED) - } - #[doc = "Protection enabled"] - #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(REGION89_A::ENABLED) - } -} -#[doc = "Field `REGION90` reader - Enable protection for region 90. Write '0' has no effect."] -pub type REGION90_R = crate::BitReader; -#[doc = "Enable protection for region 90. Write '0' has no effect.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum REGION90_A { - #[doc = "0: Protection disabled"] - DISABLED = 0, - #[doc = "1: Protection enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: REGION90_A) -> Self { - variant as u8 != 0 - } -} -impl REGION90_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> REGION90_A { - match self.bits { - false => REGION90_A::DISABLED, - true => REGION90_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == REGION90_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == REGION90_A::ENABLED - } -} -#[doc = "Field `REGION90` writer - Enable protection for region 90. Write '0' has no effect."] -pub type REGION90_W<'a, const O: u8> = crate::BitWriter<'a, u32, CONFIG2_SPEC, REGION90_A, O>; -impl<'a, const O: u8> REGION90_W<'a, O> { - #[doc = "Protection disabled"] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(REGION90_A::DISABLED) - } - #[doc = "Protection enabled"] - #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(REGION90_A::ENABLED) - } -} -#[doc = "Field `REGION91` reader - Enable protection for region 91. Write '0' has no effect."] -pub type REGION91_R = crate::BitReader; -#[doc = "Enable protection for region 91. Write '0' has no effect.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum REGION91_A { - #[doc = "0: Protection disabled"] - DISABLED = 0, - #[doc = "1: Protection enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: REGION91_A) -> Self { - variant as u8 != 0 - } -} -impl REGION91_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> REGION91_A { - match self.bits { - false => REGION91_A::DISABLED, - true => REGION91_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == REGION91_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == REGION91_A::ENABLED - } -} -#[doc = "Field `REGION91` writer - Enable protection for region 91. Write '0' has no effect."] -pub type REGION91_W<'a, const O: u8> = crate::BitWriter<'a, u32, CONFIG2_SPEC, REGION91_A, O>; -impl<'a, const O: u8> REGION91_W<'a, O> { - #[doc = "Protection disabled"] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(REGION91_A::DISABLED) - } - #[doc = "Protection enabled"] - #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(REGION91_A::ENABLED) - } -} -#[doc = "Field `REGION92` reader - Enable protection for region 92. Write '0' has no effect."] -pub type REGION92_R = crate::BitReader; -#[doc = "Enable protection for region 92. Write '0' has no effect.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum REGION92_A { - #[doc = "0: Protection disabled"] - DISABLED = 0, - #[doc = "1: Protection enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: REGION92_A) -> Self { - variant as u8 != 0 - } -} -impl REGION92_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> REGION92_A { - match self.bits { - false => REGION92_A::DISABLED, - true => REGION92_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == REGION92_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == REGION92_A::ENABLED - } -} -#[doc = "Field `REGION92` writer - Enable protection for region 92. Write '0' has no effect."] -pub type REGION92_W<'a, const O: u8> = crate::BitWriter<'a, u32, CONFIG2_SPEC, REGION92_A, O>; -impl<'a, const O: u8> REGION92_W<'a, O> { - #[doc = "Protection disabled"] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(REGION92_A::DISABLED) - } - #[doc = "Protection enabled"] - #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(REGION92_A::ENABLED) - } -} -#[doc = "Field `REGION93` reader - Enable protection for region 93. Write '0' has no effect."] -pub type REGION93_R = crate::BitReader; -#[doc = "Enable protection for region 93. Write '0' has no effect.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum REGION93_A { - #[doc = "0: Protection disabled"] - DISABLED = 0, - #[doc = "1: Protection enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: REGION93_A) -> Self { - variant as u8 != 0 - } -} -impl REGION93_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> REGION93_A { - match self.bits { - false => REGION93_A::DISABLED, - true => REGION93_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == REGION93_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == REGION93_A::ENABLED - } -} -#[doc = "Field `REGION93` writer - Enable protection for region 93. Write '0' has no effect."] -pub type REGION93_W<'a, const O: u8> = crate::BitWriter<'a, u32, CONFIG2_SPEC, REGION93_A, O>; -impl<'a, const O: u8> REGION93_W<'a, O> { - #[doc = "Protection disabled"] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(REGION93_A::DISABLED) - } - #[doc = "Protection enabled"] - #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(REGION93_A::ENABLED) - } -} -#[doc = "Field `REGION94` reader - Enable protection for region 94. Write '0' has no effect."] -pub type REGION94_R = crate::BitReader; -#[doc = "Enable protection for region 94. Write '0' has no effect.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum REGION94_A { - #[doc = "0: Protection disabled"] - DISABLED = 0, - #[doc = "1: Protection enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: REGION94_A) -> Self { - variant as u8 != 0 - } -} -impl REGION94_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> REGION94_A { - match self.bits { - false => REGION94_A::DISABLED, - true => REGION94_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == REGION94_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == REGION94_A::ENABLED - } -} -#[doc = "Field `REGION94` writer - Enable protection for region 94. Write '0' has no effect."] -pub type REGION94_W<'a, const O: u8> = crate::BitWriter<'a, u32, CONFIG2_SPEC, REGION94_A, O>; -impl<'a, const O: u8> REGION94_W<'a, O> { - #[doc = "Protection disabled"] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(REGION94_A::DISABLED) - } - #[doc = "Protection enabled"] - #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(REGION94_A::ENABLED) - } -} -#[doc = "Field `REGION95` reader - Enable protection for region 95. Write '0' has no effect."] -pub type REGION95_R = crate::BitReader; -#[doc = "Enable protection for region 95. Write '0' has no effect.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum REGION95_A { - #[doc = "0: Protection disabled"] - DISABLED = 0, - #[doc = "1: Protection enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: REGION95_A) -> Self { - variant as u8 != 0 - } -} -impl REGION95_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> REGION95_A { - match self.bits { - false => REGION95_A::DISABLED, - true => REGION95_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == REGION95_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == REGION95_A::ENABLED - } -} -#[doc = "Field `REGION95` writer - Enable protection for region 95. Write '0' has no effect."] -pub type REGION95_W<'a, const O: u8> = crate::BitWriter<'a, u32, CONFIG2_SPEC, REGION95_A, O>; -impl<'a, const O: u8> REGION95_W<'a, O> { - #[doc = "Protection disabled"] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(REGION95_A::DISABLED) - } - #[doc = "Protection enabled"] - #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(REGION95_A::ENABLED) - } -} -impl R { - #[doc = "Bit 0 - Enable protection for region 64. Write '0' has no effect."] - #[inline(always)] - pub fn region64(&self) -> REGION64_R { - REGION64_R::new((self.bits & 1) != 0) - } - #[doc = "Bit 1 - Enable protection for region 65. Write '0' has no effect."] - #[inline(always)] - pub fn region65(&self) -> REGION65_R { - REGION65_R::new(((self.bits >> 1) & 1) != 0) - } - #[doc = "Bit 2 - Enable protection for region 66. Write '0' has no effect."] - #[inline(always)] - pub fn region66(&self) -> REGION66_R { - REGION66_R::new(((self.bits >> 2) & 1) != 0) - } - #[doc = "Bit 3 - Enable protection for region 67. Write '0' has no effect."] - #[inline(always)] - pub fn region67(&self) -> REGION67_R { - REGION67_R::new(((self.bits >> 3) & 1) != 0) - } - #[doc = "Bit 4 - Enable protection for region 68. Write '0' has no effect."] - #[inline(always)] - pub fn region68(&self) -> REGION68_R { - REGION68_R::new(((self.bits >> 4) & 1) != 0) - } - #[doc = "Bit 5 - Enable protection for region 69. Write '0' has no effect."] - #[inline(always)] - pub fn region69(&self) -> REGION69_R { - REGION69_R::new(((self.bits >> 5) & 1) != 0) - } - #[doc = "Bit 6 - Enable protection for region 70. Write '0' has no effect."] - #[inline(always)] - pub fn region70(&self) -> REGION70_R { - REGION70_R::new(((self.bits >> 6) & 1) != 0) - } - #[doc = "Bit 7 - Enable protection for region 71. Write '0' has no effect."] - #[inline(always)] - pub fn region71(&self) -> REGION71_R { - REGION71_R::new(((self.bits >> 7) & 1) != 0) - } - #[doc = "Bit 8 - Enable protection for region 72. Write '0' has no effect."] - #[inline(always)] - pub fn region72(&self) -> REGION72_R { - REGION72_R::new(((self.bits >> 8) & 1) != 0) - } - #[doc = "Bit 9 - Enable protection for region 73. Write '0' has no effect."] - #[inline(always)] - pub fn region73(&self) -> REGION73_R { - REGION73_R::new(((self.bits >> 9) & 1) != 0) - } - #[doc = "Bit 10 - Enable protection for region 74. Write '0' has no effect."] - #[inline(always)] - pub fn region74(&self) -> REGION74_R { - REGION74_R::new(((self.bits >> 10) & 1) != 0) - } - #[doc = "Bit 11 - Enable protection for region 75. Write '0' has no effect."] - #[inline(always)] - pub fn region75(&self) -> REGION75_R { - REGION75_R::new(((self.bits >> 11) & 1) != 0) - } - #[doc = "Bit 12 - Enable protection for region 76. Write '0' has no effect."] - #[inline(always)] - pub fn region76(&self) -> REGION76_R { - REGION76_R::new(((self.bits >> 12) & 1) != 0) - } - #[doc = "Bit 13 - Enable protection for region 77. Write '0' has no effect."] - #[inline(always)] - pub fn region77(&self) -> REGION77_R { - REGION77_R::new(((self.bits >> 13) & 1) != 0) - } - #[doc = "Bit 14 - Enable protection for region 78. Write '0' has no effect."] - #[inline(always)] - pub fn region78(&self) -> REGION78_R { - REGION78_R::new(((self.bits >> 14) & 1) != 0) - } - #[doc = "Bit 15 - Enable protection for region 79. Write '0' has no effect."] - #[inline(always)] - pub fn region79(&self) -> REGION79_R { - REGION79_R::new(((self.bits >> 15) & 1) != 0) - } - #[doc = "Bit 16 - Enable protection for region 80. Write '0' has no effect."] - #[inline(always)] - pub fn region80(&self) -> REGION80_R { - REGION80_R::new(((self.bits >> 16) & 1) != 0) - } - #[doc = "Bit 17 - Enable protection for region 81. Write '0' has no effect."] - #[inline(always)] - pub fn region81(&self) -> REGION81_R { - REGION81_R::new(((self.bits >> 17) & 1) != 0) - } - #[doc = "Bit 18 - Enable protection for region 82. Write '0' has no effect."] - #[inline(always)] - pub fn region82(&self) -> REGION82_R { - REGION82_R::new(((self.bits >> 18) & 1) != 0) - } - #[doc = "Bit 19 - Enable protection for region 83. Write '0' has no effect."] - #[inline(always)] - pub fn region83(&self) -> REGION83_R { - REGION83_R::new(((self.bits >> 19) & 1) != 0) - } - #[doc = "Bit 20 - Enable protection for region 84. Write '0' has no effect."] - #[inline(always)] - pub fn region84(&self) -> REGION84_R { - REGION84_R::new(((self.bits >> 20) & 1) != 0) - } - #[doc = "Bit 21 - Enable protection for region 85. Write '0' has no effect."] - #[inline(always)] - pub fn region85(&self) -> REGION85_R { - REGION85_R::new(((self.bits >> 21) & 1) != 0) - } - #[doc = "Bit 22 - Enable protection for region 86. Write '0' has no effect."] - #[inline(always)] - pub fn region86(&self) -> REGION86_R { - REGION86_R::new(((self.bits >> 22) & 1) != 0) - } - #[doc = "Bit 23 - Enable protection for region 87. Write '0' has no effect."] - #[inline(always)] - pub fn region87(&self) -> REGION87_R { - REGION87_R::new(((self.bits >> 23) & 1) != 0) - } - #[doc = "Bit 24 - Enable protection for region 88. Write '0' has no effect."] - #[inline(always)] - pub fn region88(&self) -> REGION88_R { - REGION88_R::new(((self.bits >> 24) & 1) != 0) - } - #[doc = "Bit 25 - Enable protection for region 89. Write '0' has no effect."] - #[inline(always)] - pub fn region89(&self) -> REGION89_R { - REGION89_R::new(((self.bits >> 25) & 1) != 0) - } - #[doc = "Bit 26 - Enable protection for region 90. Write '0' has no effect."] - #[inline(always)] - pub fn region90(&self) -> REGION90_R { - REGION90_R::new(((self.bits >> 26) & 1) != 0) - } - #[doc = "Bit 27 - Enable protection for region 91. Write '0' has no effect."] - #[inline(always)] - pub fn region91(&self) -> REGION91_R { - REGION91_R::new(((self.bits >> 27) & 1) != 0) - } - #[doc = "Bit 28 - Enable protection for region 92. Write '0' has no effect."] - #[inline(always)] - pub fn region92(&self) -> REGION92_R { - REGION92_R::new(((self.bits >> 28) & 1) != 0) - } - #[doc = "Bit 29 - Enable protection for region 93. Write '0' has no effect."] - #[inline(always)] - pub fn region93(&self) -> REGION93_R { - REGION93_R::new(((self.bits >> 29) & 1) != 0) - } - #[doc = "Bit 30 - Enable protection for region 94. Write '0' has no effect."] - #[inline(always)] - pub fn region94(&self) -> REGION94_R { - REGION94_R::new(((self.bits >> 30) & 1) != 0) - } - #[doc = "Bit 31 - Enable protection for region 95. Write '0' has no effect."] - #[inline(always)] - pub fn region95(&self) -> REGION95_R { - REGION95_R::new(((self.bits >> 31) & 1) != 0) - } -} -impl W { - #[doc = "Bit 0 - Enable protection for region 64. Write '0' has no effect."] - #[inline(always)] - #[must_use] - pub fn region64(&mut self) -> REGION64_W<0> { - REGION64_W::new(self) - } - #[doc = "Bit 1 - Enable protection for region 65. Write '0' has no effect."] - #[inline(always)] - #[must_use] - pub fn region65(&mut self) -> REGION65_W<1> { - REGION65_W::new(self) - } - #[doc = "Bit 2 - Enable protection for region 66. Write '0' has no effect."] - #[inline(always)] - #[must_use] - pub fn region66(&mut self) -> REGION66_W<2> { - REGION66_W::new(self) - } - #[doc = "Bit 3 - Enable protection for region 67. Write '0' has no effect."] - #[inline(always)] - #[must_use] - pub fn region67(&mut self) -> REGION67_W<3> { - REGION67_W::new(self) - } - #[doc = "Bit 4 - Enable protection for region 68. Write '0' has no effect."] - #[inline(always)] - #[must_use] - pub fn region68(&mut self) -> REGION68_W<4> { - REGION68_W::new(self) - } - #[doc = "Bit 5 - Enable protection for region 69. Write '0' has no effect."] - #[inline(always)] - #[must_use] - pub fn region69(&mut self) -> REGION69_W<5> { - REGION69_W::new(self) - } - #[doc = "Bit 6 - Enable protection for region 70. Write '0' has no effect."] - #[inline(always)] - #[must_use] - pub fn region70(&mut self) -> REGION70_W<6> { - REGION70_W::new(self) - } - #[doc = "Bit 7 - Enable protection for region 71. Write '0' has no effect."] - #[inline(always)] - #[must_use] - pub fn region71(&mut self) -> REGION71_W<7> { - REGION71_W::new(self) - } - #[doc = "Bit 8 - Enable protection for region 72. Write '0' has no effect."] - #[inline(always)] - #[must_use] - pub fn region72(&mut self) -> REGION72_W<8> { - REGION72_W::new(self) - } - #[doc = "Bit 9 - Enable protection for region 73. Write '0' has no effect."] - #[inline(always)] - #[must_use] - pub fn region73(&mut self) -> REGION73_W<9> { - REGION73_W::new(self) - } - #[doc = "Bit 10 - Enable protection for region 74. Write '0' has no effect."] - #[inline(always)] - #[must_use] - pub fn region74(&mut self) -> REGION74_W<10> { - REGION74_W::new(self) - } - #[doc = "Bit 11 - Enable protection for region 75. Write '0' has no effect."] - #[inline(always)] - #[must_use] - pub fn region75(&mut self) -> REGION75_W<11> { - REGION75_W::new(self) - } - #[doc = "Bit 12 - Enable protection for region 76. Write '0' has no effect."] - #[inline(always)] - #[must_use] - pub fn region76(&mut self) -> REGION76_W<12> { - REGION76_W::new(self) - } - #[doc = "Bit 13 - Enable protection for region 77. Write '0' has no effect."] - #[inline(always)] - #[must_use] - pub fn region77(&mut self) -> REGION77_W<13> { - REGION77_W::new(self) - } - #[doc = "Bit 14 - Enable protection for region 78. Write '0' has no effect."] - #[inline(always)] - #[must_use] - pub fn region78(&mut self) -> REGION78_W<14> { - REGION78_W::new(self) - } - #[doc = "Bit 15 - Enable protection for region 79. Write '0' has no effect."] - #[inline(always)] - #[must_use] - pub fn region79(&mut self) -> REGION79_W<15> { - REGION79_W::new(self) - } - #[doc = "Bit 16 - Enable protection for region 80. Write '0' has no effect."] - #[inline(always)] - #[must_use] - pub fn region80(&mut self) -> REGION80_W<16> { - REGION80_W::new(self) - } - #[doc = "Bit 17 - Enable protection for region 81. Write '0' has no effect."] - #[inline(always)] - #[must_use] - pub fn region81(&mut self) -> REGION81_W<17> { - REGION81_W::new(self) - } - #[doc = "Bit 18 - Enable protection for region 82. Write '0' has no effect."] - #[inline(always)] - #[must_use] - pub fn region82(&mut self) -> REGION82_W<18> { - REGION82_W::new(self) - } - #[doc = "Bit 19 - Enable protection for region 83. Write '0' has no effect."] - #[inline(always)] - #[must_use] - pub fn region83(&mut self) -> REGION83_W<19> { - REGION83_W::new(self) - } - #[doc = "Bit 20 - Enable protection for region 84. Write '0' has no effect."] - #[inline(always)] - #[must_use] - pub fn region84(&mut self) -> REGION84_W<20> { - REGION84_W::new(self) - } - #[doc = "Bit 21 - Enable protection for region 85. Write '0' has no effect."] - #[inline(always)] - #[must_use] - pub fn region85(&mut self) -> REGION85_W<21> { - REGION85_W::new(self) - } - #[doc = "Bit 22 - Enable protection for region 86. Write '0' has no effect."] - #[inline(always)] - #[must_use] - pub fn region86(&mut self) -> REGION86_W<22> { - REGION86_W::new(self) - } - #[doc = "Bit 23 - Enable protection for region 87. Write '0' has no effect."] - #[inline(always)] - #[must_use] - pub fn region87(&mut self) -> REGION87_W<23> { - REGION87_W::new(self) - } - #[doc = "Bit 24 - Enable protection for region 88. Write '0' has no effect."] - #[inline(always)] - #[must_use] - pub fn region88(&mut self) -> REGION88_W<24> { - REGION88_W::new(self) - } - #[doc = "Bit 25 - Enable protection for region 89. Write '0' has no effect."] - #[inline(always)] - #[must_use] - pub fn region89(&mut self) -> REGION89_W<25> { - REGION89_W::new(self) - } - #[doc = "Bit 26 - Enable protection for region 90. Write '0' has no effect."] - #[inline(always)] - #[must_use] - pub fn region90(&mut self) -> REGION90_W<26> { - REGION90_W::new(self) - } - #[doc = "Bit 27 - Enable protection for region 91. Write '0' has no effect."] - #[inline(always)] - #[must_use] - pub fn region91(&mut self) -> REGION91_W<27> { - REGION91_W::new(self) - } - #[doc = "Bit 28 - Enable protection for region 92. Write '0' has no effect."] - #[inline(always)] - #[must_use] - pub fn region92(&mut self) -> REGION92_W<28> { - REGION92_W::new(self) - } - #[doc = "Bit 29 - Enable protection for region 93. Write '0' has no effect."] - #[inline(always)] - #[must_use] - pub fn region93(&mut self) -> REGION93_W<29> { - REGION93_W::new(self) - } - #[doc = "Bit 30 - Enable protection for region 94. Write '0' has no effect."] - #[inline(always)] - #[must_use] - pub fn region94(&mut self) -> REGION94_W<30> { - REGION94_W::new(self) - } - #[doc = "Bit 31 - Enable protection for region 95. Write '0' has no effect."] - #[inline(always)] - #[must_use] - pub fn region95(&mut self) -> REGION95_W<31> { - REGION95_W::new(self) - } - #[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 = "Block protect configuration register 2\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 [config2](index.html) module"] -pub struct CONFIG2_SPEC; -impl crate::RegisterSpec for CONFIG2_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [config2::R](R) reader structure"] -impl crate::Readable for CONFIG2_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [config2::W](W) writer structure"] -impl crate::Writable for 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 CONFIG2 to value 0"] -impl crate::Resettable for CONFIG2_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/bprot/config3.rs b/down-the-stack/dk_pac/src/bprot/config3.rs deleted file mode 100644 index c09b6d1..0000000 --- a/down-the-stack/dk_pac/src/bprot/config3.rs +++ /dev/null @@ -1,2017 +0,0 @@ -#[doc = "Register `CONFIG3` 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 `CONFIG3` 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 `REGION96` reader - Enable protection for region 96. Write '0' has no effect."] -pub type REGION96_R = crate::BitReader; -#[doc = "Enable protection for region 96. Write '0' has no effect.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum REGION96_A { - #[doc = "0: Protection disabled"] - DISABLED = 0, - #[doc = "1: Protection enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: REGION96_A) -> Self { - variant as u8 != 0 - } -} -impl REGION96_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> REGION96_A { - match self.bits { - false => REGION96_A::DISABLED, - true => REGION96_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == REGION96_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == REGION96_A::ENABLED - } -} -#[doc = "Field `REGION96` writer - Enable protection for region 96. Write '0' has no effect."] -pub type REGION96_W<'a, const O: u8> = crate::BitWriter<'a, u32, CONFIG3_SPEC, REGION96_A, O>; -impl<'a, const O: u8> REGION96_W<'a, O> { - #[doc = "Protection disabled"] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(REGION96_A::DISABLED) - } - #[doc = "Protection enabled"] - #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(REGION96_A::ENABLED) - } -} -#[doc = "Field `REGION97` reader - Enable protection for region 97. Write '0' has no effect."] -pub type REGION97_R = crate::BitReader; -#[doc = "Enable protection for region 97. Write '0' has no effect.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum REGION97_A { - #[doc = "0: Protection disabled"] - DISABLED = 0, - #[doc = "1: Protection enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: REGION97_A) -> Self { - variant as u8 != 0 - } -} -impl REGION97_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> REGION97_A { - match self.bits { - false => REGION97_A::DISABLED, - true => REGION97_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == REGION97_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == REGION97_A::ENABLED - } -} -#[doc = "Field `REGION97` writer - Enable protection for region 97. Write '0' has no effect."] -pub type REGION97_W<'a, const O: u8> = crate::BitWriter<'a, u32, CONFIG3_SPEC, REGION97_A, O>; -impl<'a, const O: u8> REGION97_W<'a, O> { - #[doc = "Protection disabled"] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(REGION97_A::DISABLED) - } - #[doc = "Protection enabled"] - #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(REGION97_A::ENABLED) - } -} -#[doc = "Field `REGION98` reader - Enable protection for region 98. Write '0' has no effect."] -pub type REGION98_R = crate::BitReader; -#[doc = "Enable protection for region 98. Write '0' has no effect.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum REGION98_A { - #[doc = "0: Protection disabled"] - DISABLED = 0, - #[doc = "1: Protection enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: REGION98_A) -> Self { - variant as u8 != 0 - } -} -impl REGION98_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> REGION98_A { - match self.bits { - false => REGION98_A::DISABLED, - true => REGION98_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == REGION98_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == REGION98_A::ENABLED - } -} -#[doc = "Field `REGION98` writer - Enable protection for region 98. Write '0' has no effect."] -pub type REGION98_W<'a, const O: u8> = crate::BitWriter<'a, u32, CONFIG3_SPEC, REGION98_A, O>; -impl<'a, const O: u8> REGION98_W<'a, O> { - #[doc = "Protection disabled"] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(REGION98_A::DISABLED) - } - #[doc = "Protection enabled"] - #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(REGION98_A::ENABLED) - } -} -#[doc = "Field `REGION99` reader - Enable protection for region 99. Write '0' has no effect."] -pub type REGION99_R = crate::BitReader; -#[doc = "Enable protection for region 99. Write '0' has no effect.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum REGION99_A { - #[doc = "0: Protection disabled"] - DISABLED = 0, - #[doc = "1: Protection enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: REGION99_A) -> Self { - variant as u8 != 0 - } -} -impl REGION99_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> REGION99_A { - match self.bits { - false => REGION99_A::DISABLED, - true => REGION99_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == REGION99_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == REGION99_A::ENABLED - } -} -#[doc = "Field `REGION99` writer - Enable protection for region 99. Write '0' has no effect."] -pub type REGION99_W<'a, const O: u8> = crate::BitWriter<'a, u32, CONFIG3_SPEC, REGION99_A, O>; -impl<'a, const O: u8> REGION99_W<'a, O> { - #[doc = "Protection disabled"] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(REGION99_A::DISABLED) - } - #[doc = "Protection enabled"] - #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(REGION99_A::ENABLED) - } -} -#[doc = "Field `REGION100` reader - Enable protection for region 100. Write '0' has no effect."] -pub type REGION100_R = crate::BitReader; -#[doc = "Enable protection for region 100. Write '0' has no effect.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum REGION100_A { - #[doc = "0: Protection disabled"] - DISABLED = 0, - #[doc = "1: Protection enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: REGION100_A) -> Self { - variant as u8 != 0 - } -} -impl REGION100_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> REGION100_A { - match self.bits { - false => REGION100_A::DISABLED, - true => REGION100_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == REGION100_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == REGION100_A::ENABLED - } -} -#[doc = "Field `REGION100` writer - Enable protection for region 100. Write '0' has no effect."] -pub type REGION100_W<'a, const O: u8> = crate::BitWriter<'a, u32, CONFIG3_SPEC, REGION100_A, O>; -impl<'a, const O: u8> REGION100_W<'a, O> { - #[doc = "Protection disabled"] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(REGION100_A::DISABLED) - } - #[doc = "Protection enabled"] - #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(REGION100_A::ENABLED) - } -} -#[doc = "Field `REGION101` reader - Enable protection for region 101. Write '0' has no effect."] -pub type REGION101_R = crate::BitReader; -#[doc = "Enable protection for region 101. Write '0' has no effect.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum REGION101_A { - #[doc = "0: Protection disabled"] - DISABLED = 0, - #[doc = "1: Protection enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: REGION101_A) -> Self { - variant as u8 != 0 - } -} -impl REGION101_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> REGION101_A { - match self.bits { - false => REGION101_A::DISABLED, - true => REGION101_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == REGION101_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == REGION101_A::ENABLED - } -} -#[doc = "Field `REGION101` writer - Enable protection for region 101. Write '0' has no effect."] -pub type REGION101_W<'a, const O: u8> = crate::BitWriter<'a, u32, CONFIG3_SPEC, REGION101_A, O>; -impl<'a, const O: u8> REGION101_W<'a, O> { - #[doc = "Protection disabled"] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(REGION101_A::DISABLED) - } - #[doc = "Protection enabled"] - #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(REGION101_A::ENABLED) - } -} -#[doc = "Field `REGION102` reader - Enable protection for region 102. Write '0' has no effect."] -pub type REGION102_R = crate::BitReader; -#[doc = "Enable protection for region 102. Write '0' has no effect.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum REGION102_A { - #[doc = "0: Protection disabled"] - DISABLED = 0, - #[doc = "1: Protection enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: REGION102_A) -> Self { - variant as u8 != 0 - } -} -impl REGION102_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> REGION102_A { - match self.bits { - false => REGION102_A::DISABLED, - true => REGION102_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == REGION102_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == REGION102_A::ENABLED - } -} -#[doc = "Field `REGION102` writer - Enable protection for region 102. Write '0' has no effect."] -pub type REGION102_W<'a, const O: u8> = crate::BitWriter<'a, u32, CONFIG3_SPEC, REGION102_A, O>; -impl<'a, const O: u8> REGION102_W<'a, O> { - #[doc = "Protection disabled"] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(REGION102_A::DISABLED) - } - #[doc = "Protection enabled"] - #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(REGION102_A::ENABLED) - } -} -#[doc = "Field `REGION103` reader - Enable protection for region 103. Write '0' has no effect."] -pub type REGION103_R = crate::BitReader; -#[doc = "Enable protection for region 103. Write '0' has no effect.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum REGION103_A { - #[doc = "0: Protection disabled"] - DISABLED = 0, - #[doc = "1: Protection enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: REGION103_A) -> Self { - variant as u8 != 0 - } -} -impl REGION103_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> REGION103_A { - match self.bits { - false => REGION103_A::DISABLED, - true => REGION103_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == REGION103_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == REGION103_A::ENABLED - } -} -#[doc = "Field `REGION103` writer - Enable protection for region 103. Write '0' has no effect."] -pub type REGION103_W<'a, const O: u8> = crate::BitWriter<'a, u32, CONFIG3_SPEC, REGION103_A, O>; -impl<'a, const O: u8> REGION103_W<'a, O> { - #[doc = "Protection disabled"] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(REGION103_A::DISABLED) - } - #[doc = "Protection enabled"] - #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(REGION103_A::ENABLED) - } -} -#[doc = "Field `REGION104` reader - Enable protection for region 104. Write '0' has no effect."] -pub type REGION104_R = crate::BitReader; -#[doc = "Enable protection for region 104. Write '0' has no effect.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum REGION104_A { - #[doc = "0: Protection disabled"] - DISABLED = 0, - #[doc = "1: Protection enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: REGION104_A) -> Self { - variant as u8 != 0 - } -} -impl REGION104_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> REGION104_A { - match self.bits { - false => REGION104_A::DISABLED, - true => REGION104_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == REGION104_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == REGION104_A::ENABLED - } -} -#[doc = "Field `REGION104` writer - Enable protection for region 104. Write '0' has no effect."] -pub type REGION104_W<'a, const O: u8> = crate::BitWriter<'a, u32, CONFIG3_SPEC, REGION104_A, O>; -impl<'a, const O: u8> REGION104_W<'a, O> { - #[doc = "Protection disabled"] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(REGION104_A::DISABLED) - } - #[doc = "Protection enabled"] - #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(REGION104_A::ENABLED) - } -} -#[doc = "Field `REGION105` reader - Enable protection for region 105. Write '0' has no effect."] -pub type REGION105_R = crate::BitReader; -#[doc = "Enable protection for region 105. Write '0' has no effect.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum REGION105_A { - #[doc = "0: Protection disabled"] - DISABLED = 0, - #[doc = "1: Protection enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: REGION105_A) -> Self { - variant as u8 != 0 - } -} -impl REGION105_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> REGION105_A { - match self.bits { - false => REGION105_A::DISABLED, - true => REGION105_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == REGION105_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == REGION105_A::ENABLED - } -} -#[doc = "Field `REGION105` writer - Enable protection for region 105. Write '0' has no effect."] -pub type REGION105_W<'a, const O: u8> = crate::BitWriter<'a, u32, CONFIG3_SPEC, REGION105_A, O>; -impl<'a, const O: u8> REGION105_W<'a, O> { - #[doc = "Protection disabled"] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(REGION105_A::DISABLED) - } - #[doc = "Protection enabled"] - #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(REGION105_A::ENABLED) - } -} -#[doc = "Field `REGION106` reader - Enable protection for region 106. Write '0' has no effect."] -pub type REGION106_R = crate::BitReader; -#[doc = "Enable protection for region 106. Write '0' has no effect.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum REGION106_A { - #[doc = "0: Protection disabled"] - DISABLED = 0, - #[doc = "1: Protection enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: REGION106_A) -> Self { - variant as u8 != 0 - } -} -impl REGION106_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> REGION106_A { - match self.bits { - false => REGION106_A::DISABLED, - true => REGION106_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == REGION106_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == REGION106_A::ENABLED - } -} -#[doc = "Field `REGION106` writer - Enable protection for region 106. Write '0' has no effect."] -pub type REGION106_W<'a, const O: u8> = crate::BitWriter<'a, u32, CONFIG3_SPEC, REGION106_A, O>; -impl<'a, const O: u8> REGION106_W<'a, O> { - #[doc = "Protection disabled"] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(REGION106_A::DISABLED) - } - #[doc = "Protection enabled"] - #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(REGION106_A::ENABLED) - } -} -#[doc = "Field `REGION107` reader - Enable protection for region 107. Write '0' has no effect."] -pub type REGION107_R = crate::BitReader; -#[doc = "Enable protection for region 107. Write '0' has no effect.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum REGION107_A { - #[doc = "0: Protection disabled"] - DISABLED = 0, - #[doc = "1: Protection enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: REGION107_A) -> Self { - variant as u8 != 0 - } -} -impl REGION107_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> REGION107_A { - match self.bits { - false => REGION107_A::DISABLED, - true => REGION107_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == REGION107_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == REGION107_A::ENABLED - } -} -#[doc = "Field `REGION107` writer - Enable protection for region 107. Write '0' has no effect."] -pub type REGION107_W<'a, const O: u8> = crate::BitWriter<'a, u32, CONFIG3_SPEC, REGION107_A, O>; -impl<'a, const O: u8> REGION107_W<'a, O> { - #[doc = "Protection disabled"] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(REGION107_A::DISABLED) - } - #[doc = "Protection enabled"] - #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(REGION107_A::ENABLED) - } -} -#[doc = "Field `REGION108` reader - Enable protection for region 108. Write '0' has no effect."] -pub type REGION108_R = crate::BitReader; -#[doc = "Enable protection for region 108. Write '0' has no effect.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum REGION108_A { - #[doc = "0: Protection disabled"] - DISABLED = 0, - #[doc = "1: Protection enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: REGION108_A) -> Self { - variant as u8 != 0 - } -} -impl REGION108_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> REGION108_A { - match self.bits { - false => REGION108_A::DISABLED, - true => REGION108_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == REGION108_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == REGION108_A::ENABLED - } -} -#[doc = "Field `REGION108` writer - Enable protection for region 108. Write '0' has no effect."] -pub type REGION108_W<'a, const O: u8> = crate::BitWriter<'a, u32, CONFIG3_SPEC, REGION108_A, O>; -impl<'a, const O: u8> REGION108_W<'a, O> { - #[doc = "Protection disabled"] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(REGION108_A::DISABLED) - } - #[doc = "Protection enabled"] - #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(REGION108_A::ENABLED) - } -} -#[doc = "Field `REGION109` reader - Enable protection for region 109. Write '0' has no effect."] -pub type REGION109_R = crate::BitReader; -#[doc = "Enable protection for region 109. Write '0' has no effect.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum REGION109_A { - #[doc = "0: Protection disabled"] - DISABLED = 0, - #[doc = "1: Protection enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: REGION109_A) -> Self { - variant as u8 != 0 - } -} -impl REGION109_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> REGION109_A { - match self.bits { - false => REGION109_A::DISABLED, - true => REGION109_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == REGION109_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == REGION109_A::ENABLED - } -} -#[doc = "Field `REGION109` writer - Enable protection for region 109. Write '0' has no effect."] -pub type REGION109_W<'a, const O: u8> = crate::BitWriter<'a, u32, CONFIG3_SPEC, REGION109_A, O>; -impl<'a, const O: u8> REGION109_W<'a, O> { - #[doc = "Protection disabled"] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(REGION109_A::DISABLED) - } - #[doc = "Protection enabled"] - #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(REGION109_A::ENABLED) - } -} -#[doc = "Field `REGION110` reader - Enable protection for region 110. Write '0' has no effect."] -pub type REGION110_R = crate::BitReader; -#[doc = "Enable protection for region 110. Write '0' has no effect.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum REGION110_A { - #[doc = "0: Protection disabled"] - DISABLED = 0, - #[doc = "1: Protection enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: REGION110_A) -> Self { - variant as u8 != 0 - } -} -impl REGION110_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> REGION110_A { - match self.bits { - false => REGION110_A::DISABLED, - true => REGION110_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == REGION110_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == REGION110_A::ENABLED - } -} -#[doc = "Field `REGION110` writer - Enable protection for region 110. Write '0' has no effect."] -pub type REGION110_W<'a, const O: u8> = crate::BitWriter<'a, u32, CONFIG3_SPEC, REGION110_A, O>; -impl<'a, const O: u8> REGION110_W<'a, O> { - #[doc = "Protection disabled"] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(REGION110_A::DISABLED) - } - #[doc = "Protection enabled"] - #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(REGION110_A::ENABLED) - } -} -#[doc = "Field `REGION111` reader - Enable protection for region 111. Write '0' has no effect."] -pub type REGION111_R = crate::BitReader; -#[doc = "Enable protection for region 111. Write '0' has no effect.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum REGION111_A { - #[doc = "0: Protection disabled"] - DISABLED = 0, - #[doc = "1: Protection enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: REGION111_A) -> Self { - variant as u8 != 0 - } -} -impl REGION111_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> REGION111_A { - match self.bits { - false => REGION111_A::DISABLED, - true => REGION111_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == REGION111_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == REGION111_A::ENABLED - } -} -#[doc = "Field `REGION111` writer - Enable protection for region 111. Write '0' has no effect."] -pub type REGION111_W<'a, const O: u8> = crate::BitWriter<'a, u32, CONFIG3_SPEC, REGION111_A, O>; -impl<'a, const O: u8> REGION111_W<'a, O> { - #[doc = "Protection disabled"] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(REGION111_A::DISABLED) - } - #[doc = "Protection enabled"] - #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(REGION111_A::ENABLED) - } -} -#[doc = "Field `REGION112` reader - Enable protection for region 112. Write '0' has no effect."] -pub type REGION112_R = crate::BitReader; -#[doc = "Enable protection for region 112. Write '0' has no effect.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum REGION112_A { - #[doc = "0: Protection disabled"] - DISABLED = 0, - #[doc = "1: Protection enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: REGION112_A) -> Self { - variant as u8 != 0 - } -} -impl REGION112_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> REGION112_A { - match self.bits { - false => REGION112_A::DISABLED, - true => REGION112_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == REGION112_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == REGION112_A::ENABLED - } -} -#[doc = "Field `REGION112` writer - Enable protection for region 112. Write '0' has no effect."] -pub type REGION112_W<'a, const O: u8> = crate::BitWriter<'a, u32, CONFIG3_SPEC, REGION112_A, O>; -impl<'a, const O: u8> REGION112_W<'a, O> { - #[doc = "Protection disabled"] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(REGION112_A::DISABLED) - } - #[doc = "Protection enabled"] - #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(REGION112_A::ENABLED) - } -} -#[doc = "Field `REGION113` reader - Enable protection for region 113. Write '0' has no effect."] -pub type REGION113_R = crate::BitReader; -#[doc = "Enable protection for region 113. Write '0' has no effect.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum REGION113_A { - #[doc = "0: Protection disabled"] - DISABLED = 0, - #[doc = "1: Protection enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: REGION113_A) -> Self { - variant as u8 != 0 - } -} -impl REGION113_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> REGION113_A { - match self.bits { - false => REGION113_A::DISABLED, - true => REGION113_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == REGION113_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == REGION113_A::ENABLED - } -} -#[doc = "Field `REGION113` writer - Enable protection for region 113. Write '0' has no effect."] -pub type REGION113_W<'a, const O: u8> = crate::BitWriter<'a, u32, CONFIG3_SPEC, REGION113_A, O>; -impl<'a, const O: u8> REGION113_W<'a, O> { - #[doc = "Protection disabled"] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(REGION113_A::DISABLED) - } - #[doc = "Protection enabled"] - #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(REGION113_A::ENABLED) - } -} -#[doc = "Field `REGION114` reader - Enable protection for region 114. Write '0' has no effect."] -pub type REGION114_R = crate::BitReader; -#[doc = "Enable protection for region 114. Write '0' has no effect.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum REGION114_A { - #[doc = "0: Protection disabled"] - DISABLED = 0, - #[doc = "1: Protection enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: REGION114_A) -> Self { - variant as u8 != 0 - } -} -impl REGION114_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> REGION114_A { - match self.bits { - false => REGION114_A::DISABLED, - true => REGION114_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == REGION114_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == REGION114_A::ENABLED - } -} -#[doc = "Field `REGION114` writer - Enable protection for region 114. Write '0' has no effect."] -pub type REGION114_W<'a, const O: u8> = crate::BitWriter<'a, u32, CONFIG3_SPEC, REGION114_A, O>; -impl<'a, const O: u8> REGION114_W<'a, O> { - #[doc = "Protection disabled"] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(REGION114_A::DISABLED) - } - #[doc = "Protection enabled"] - #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(REGION114_A::ENABLED) - } -} -#[doc = "Field `REGION115` reader - Enable protection for region 115. Write '0' has no effect."] -pub type REGION115_R = crate::BitReader; -#[doc = "Enable protection for region 115. Write '0' has no effect.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum REGION115_A { - #[doc = "0: Protection disabled"] - DISABLED = 0, - #[doc = "1: Protection enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: REGION115_A) -> Self { - variant as u8 != 0 - } -} -impl REGION115_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> REGION115_A { - match self.bits { - false => REGION115_A::DISABLED, - true => REGION115_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == REGION115_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == REGION115_A::ENABLED - } -} -#[doc = "Field `REGION115` writer - Enable protection for region 115. Write '0' has no effect."] -pub type REGION115_W<'a, const O: u8> = crate::BitWriter<'a, u32, CONFIG3_SPEC, REGION115_A, O>; -impl<'a, const O: u8> REGION115_W<'a, O> { - #[doc = "Protection disabled"] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(REGION115_A::DISABLED) - } - #[doc = "Protection enabled"] - #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(REGION115_A::ENABLED) - } -} -#[doc = "Field `REGION116` reader - Enable protection for region 116. Write '0' has no effect."] -pub type REGION116_R = crate::BitReader; -#[doc = "Enable protection for region 116. Write '0' has no effect.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum REGION116_A { - #[doc = "0: Protection disabled"] - DISABLED = 0, - #[doc = "1: Protection enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: REGION116_A) -> Self { - variant as u8 != 0 - } -} -impl REGION116_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> REGION116_A { - match self.bits { - false => REGION116_A::DISABLED, - true => REGION116_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == REGION116_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == REGION116_A::ENABLED - } -} -#[doc = "Field `REGION116` writer - Enable protection for region 116. Write '0' has no effect."] -pub type REGION116_W<'a, const O: u8> = crate::BitWriter<'a, u32, CONFIG3_SPEC, REGION116_A, O>; -impl<'a, const O: u8> REGION116_W<'a, O> { - #[doc = "Protection disabled"] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(REGION116_A::DISABLED) - } - #[doc = "Protection enabled"] - #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(REGION116_A::ENABLED) - } -} -#[doc = "Field `REGION117` reader - Enable protection for region 117. Write '0' has no effect."] -pub type REGION117_R = crate::BitReader; -#[doc = "Enable protection for region 117. Write '0' has no effect.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum REGION117_A { - #[doc = "0: Protection disabled"] - DISABLED = 0, - #[doc = "1: Protection enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: REGION117_A) -> Self { - variant as u8 != 0 - } -} -impl REGION117_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> REGION117_A { - match self.bits { - false => REGION117_A::DISABLED, - true => REGION117_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == REGION117_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == REGION117_A::ENABLED - } -} -#[doc = "Field `REGION117` writer - Enable protection for region 117. Write '0' has no effect."] -pub type REGION117_W<'a, const O: u8> = crate::BitWriter<'a, u32, CONFIG3_SPEC, REGION117_A, O>; -impl<'a, const O: u8> REGION117_W<'a, O> { - #[doc = "Protection disabled"] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(REGION117_A::DISABLED) - } - #[doc = "Protection enabled"] - #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(REGION117_A::ENABLED) - } -} -#[doc = "Field `REGION118` reader - Enable protection for region 118. Write '0' has no effect."] -pub type REGION118_R = crate::BitReader; -#[doc = "Enable protection for region 118. Write '0' has no effect.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum REGION118_A { - #[doc = "0: Protection disabled"] - DISABLED = 0, - #[doc = "1: Protection enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: REGION118_A) -> Self { - variant as u8 != 0 - } -} -impl REGION118_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> REGION118_A { - match self.bits { - false => REGION118_A::DISABLED, - true => REGION118_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == REGION118_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == REGION118_A::ENABLED - } -} -#[doc = "Field `REGION118` writer - Enable protection for region 118. Write '0' has no effect."] -pub type REGION118_W<'a, const O: u8> = crate::BitWriter<'a, u32, CONFIG3_SPEC, REGION118_A, O>; -impl<'a, const O: u8> REGION118_W<'a, O> { - #[doc = "Protection disabled"] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(REGION118_A::DISABLED) - } - #[doc = "Protection enabled"] - #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(REGION118_A::ENABLED) - } -} -#[doc = "Field `REGION119` reader - Enable protection for region 119. Write '0' has no effect."] -pub type REGION119_R = crate::BitReader; -#[doc = "Enable protection for region 119. Write '0' has no effect.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum REGION119_A { - #[doc = "0: Protection disabled"] - DISABLED = 0, - #[doc = "1: Protection enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: REGION119_A) -> Self { - variant as u8 != 0 - } -} -impl REGION119_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> REGION119_A { - match self.bits { - false => REGION119_A::DISABLED, - true => REGION119_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == REGION119_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == REGION119_A::ENABLED - } -} -#[doc = "Field `REGION119` writer - Enable protection for region 119. Write '0' has no effect."] -pub type REGION119_W<'a, const O: u8> = crate::BitWriter<'a, u32, CONFIG3_SPEC, REGION119_A, O>; -impl<'a, const O: u8> REGION119_W<'a, O> { - #[doc = "Protection disabled"] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(REGION119_A::DISABLED) - } - #[doc = "Protection enabled"] - #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(REGION119_A::ENABLED) - } -} -#[doc = "Field `REGION120` reader - Enable protection for region 120. Write '0' has no effect."] -pub type REGION120_R = crate::BitReader; -#[doc = "Enable protection for region 120. Write '0' has no effect.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum REGION120_A { - #[doc = "0: Protection disabled"] - DISABLED = 0, - #[doc = "1: Protection enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: REGION120_A) -> Self { - variant as u8 != 0 - } -} -impl REGION120_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> REGION120_A { - match self.bits { - false => REGION120_A::DISABLED, - true => REGION120_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == REGION120_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == REGION120_A::ENABLED - } -} -#[doc = "Field `REGION120` writer - Enable protection for region 120. Write '0' has no effect."] -pub type REGION120_W<'a, const O: u8> = crate::BitWriter<'a, u32, CONFIG3_SPEC, REGION120_A, O>; -impl<'a, const O: u8> REGION120_W<'a, O> { - #[doc = "Protection disabled"] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(REGION120_A::DISABLED) - } - #[doc = "Protection enabled"] - #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(REGION120_A::ENABLED) - } -} -#[doc = "Field `REGION121` reader - Enable protection for region 121. Write '0' has no effect."] -pub type REGION121_R = crate::BitReader; -#[doc = "Enable protection for region 121. Write '0' has no effect.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum REGION121_A { - #[doc = "0: Protection disabled"] - DISABLED = 0, - #[doc = "1: Protection enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: REGION121_A) -> Self { - variant as u8 != 0 - } -} -impl REGION121_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> REGION121_A { - match self.bits { - false => REGION121_A::DISABLED, - true => REGION121_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == REGION121_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == REGION121_A::ENABLED - } -} -#[doc = "Field `REGION121` writer - Enable protection for region 121. Write '0' has no effect."] -pub type REGION121_W<'a, const O: u8> = crate::BitWriter<'a, u32, CONFIG3_SPEC, REGION121_A, O>; -impl<'a, const O: u8> REGION121_W<'a, O> { - #[doc = "Protection disabled"] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(REGION121_A::DISABLED) - } - #[doc = "Protection enabled"] - #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(REGION121_A::ENABLED) - } -} -#[doc = "Field `REGION122` reader - Enable protection for region 122. Write '0' has no effect."] -pub type REGION122_R = crate::BitReader; -#[doc = "Enable protection for region 122. Write '0' has no effect.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum REGION122_A { - #[doc = "0: Protection disabled"] - DISABLED = 0, - #[doc = "1: Protection enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: REGION122_A) -> Self { - variant as u8 != 0 - } -} -impl REGION122_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> REGION122_A { - match self.bits { - false => REGION122_A::DISABLED, - true => REGION122_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == REGION122_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == REGION122_A::ENABLED - } -} -#[doc = "Field `REGION122` writer - Enable protection for region 122. Write '0' has no effect."] -pub type REGION122_W<'a, const O: u8> = crate::BitWriter<'a, u32, CONFIG3_SPEC, REGION122_A, O>; -impl<'a, const O: u8> REGION122_W<'a, O> { - #[doc = "Protection disabled"] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(REGION122_A::DISABLED) - } - #[doc = "Protection enabled"] - #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(REGION122_A::ENABLED) - } -} -#[doc = "Field `REGION123` reader - Enable protection for region 123. Write '0' has no effect."] -pub type REGION123_R = crate::BitReader; -#[doc = "Enable protection for region 123. Write '0' has no effect.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum REGION123_A { - #[doc = "0: Protection disabled"] - DISABLED = 0, - #[doc = "1: Protection enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: REGION123_A) -> Self { - variant as u8 != 0 - } -} -impl REGION123_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> REGION123_A { - match self.bits { - false => REGION123_A::DISABLED, - true => REGION123_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == REGION123_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == REGION123_A::ENABLED - } -} -#[doc = "Field `REGION123` writer - Enable protection for region 123. Write '0' has no effect."] -pub type REGION123_W<'a, const O: u8> = crate::BitWriter<'a, u32, CONFIG3_SPEC, REGION123_A, O>; -impl<'a, const O: u8> REGION123_W<'a, O> { - #[doc = "Protection disabled"] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(REGION123_A::DISABLED) - } - #[doc = "Protection enabled"] - #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(REGION123_A::ENABLED) - } -} -#[doc = "Field `REGION124` reader - Enable protection for region 124. Write '0' has no effect."] -pub type REGION124_R = crate::BitReader; -#[doc = "Enable protection for region 124. Write '0' has no effect.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum REGION124_A { - #[doc = "0: Protection disabled"] - DISABLED = 0, - #[doc = "1: Protection enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: REGION124_A) -> Self { - variant as u8 != 0 - } -} -impl REGION124_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> REGION124_A { - match self.bits { - false => REGION124_A::DISABLED, - true => REGION124_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == REGION124_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == REGION124_A::ENABLED - } -} -#[doc = "Field `REGION124` writer - Enable protection for region 124. Write '0' has no effect."] -pub type REGION124_W<'a, const O: u8> = crate::BitWriter<'a, u32, CONFIG3_SPEC, REGION124_A, O>; -impl<'a, const O: u8> REGION124_W<'a, O> { - #[doc = "Protection disabled"] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(REGION124_A::DISABLED) - } - #[doc = "Protection enabled"] - #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(REGION124_A::ENABLED) - } -} -#[doc = "Field `REGION125` reader - Enable protection for region 125. Write '0' has no effect."] -pub type REGION125_R = crate::BitReader; -#[doc = "Enable protection for region 125. Write '0' has no effect.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum REGION125_A { - #[doc = "0: Protection disabled"] - DISABLED = 0, - #[doc = "1: Protection enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: REGION125_A) -> Self { - variant as u8 != 0 - } -} -impl REGION125_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> REGION125_A { - match self.bits { - false => REGION125_A::DISABLED, - true => REGION125_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == REGION125_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == REGION125_A::ENABLED - } -} -#[doc = "Field `REGION125` writer - Enable protection for region 125. Write '0' has no effect."] -pub type REGION125_W<'a, const O: u8> = crate::BitWriter<'a, u32, CONFIG3_SPEC, REGION125_A, O>; -impl<'a, const O: u8> REGION125_W<'a, O> { - #[doc = "Protection disabled"] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(REGION125_A::DISABLED) - } - #[doc = "Protection enabled"] - #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(REGION125_A::ENABLED) - } -} -#[doc = "Field `REGION126` reader - Enable protection for region 126. Write '0' has no effect."] -pub type REGION126_R = crate::BitReader; -#[doc = "Enable protection for region 126. Write '0' has no effect.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum REGION126_A { - #[doc = "0: Protection disabled"] - DISABLED = 0, - #[doc = "1: Protection enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: REGION126_A) -> Self { - variant as u8 != 0 - } -} -impl REGION126_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> REGION126_A { - match self.bits { - false => REGION126_A::DISABLED, - true => REGION126_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == REGION126_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == REGION126_A::ENABLED - } -} -#[doc = "Field `REGION126` writer - Enable protection for region 126. Write '0' has no effect."] -pub type REGION126_W<'a, const O: u8> = crate::BitWriter<'a, u32, CONFIG3_SPEC, REGION126_A, O>; -impl<'a, const O: u8> REGION126_W<'a, O> { - #[doc = "Protection disabled"] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(REGION126_A::DISABLED) - } - #[doc = "Protection enabled"] - #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(REGION126_A::ENABLED) - } -} -#[doc = "Field `REGION127` reader - Enable protection for region 127. Write '0' has no effect."] -pub type REGION127_R = crate::BitReader; -#[doc = "Enable protection for region 127. Write '0' has no effect.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum REGION127_A { - #[doc = "0: Protection disabled"] - DISABLED = 0, - #[doc = "1: Protection enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: REGION127_A) -> Self { - variant as u8 != 0 - } -} -impl REGION127_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> REGION127_A { - match self.bits { - false => REGION127_A::DISABLED, - true => REGION127_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == REGION127_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == REGION127_A::ENABLED - } -} -#[doc = "Field `REGION127` writer - Enable protection for region 127. Write '0' has no effect."] -pub type REGION127_W<'a, const O: u8> = crate::BitWriter<'a, u32, CONFIG3_SPEC, REGION127_A, O>; -impl<'a, const O: u8> REGION127_W<'a, O> { - #[doc = "Protection disabled"] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(REGION127_A::DISABLED) - } - #[doc = "Protection enabled"] - #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(REGION127_A::ENABLED) - } -} -impl R { - #[doc = "Bit 0 - Enable protection for region 96. Write '0' has no effect."] - #[inline(always)] - pub fn region96(&self) -> REGION96_R { - REGION96_R::new((self.bits & 1) != 0) - } - #[doc = "Bit 1 - Enable protection for region 97. Write '0' has no effect."] - #[inline(always)] - pub fn region97(&self) -> REGION97_R { - REGION97_R::new(((self.bits >> 1) & 1) != 0) - } - #[doc = "Bit 2 - Enable protection for region 98. Write '0' has no effect."] - #[inline(always)] - pub fn region98(&self) -> REGION98_R { - REGION98_R::new(((self.bits >> 2) & 1) != 0) - } - #[doc = "Bit 3 - Enable protection for region 99. Write '0' has no effect."] - #[inline(always)] - pub fn region99(&self) -> REGION99_R { - REGION99_R::new(((self.bits >> 3) & 1) != 0) - } - #[doc = "Bit 4 - Enable protection for region 100. Write '0' has no effect."] - #[inline(always)] - pub fn region100(&self) -> REGION100_R { - REGION100_R::new(((self.bits >> 4) & 1) != 0) - } - #[doc = "Bit 5 - Enable protection for region 101. Write '0' has no effect."] - #[inline(always)] - pub fn region101(&self) -> REGION101_R { - REGION101_R::new(((self.bits >> 5) & 1) != 0) - } - #[doc = "Bit 6 - Enable protection for region 102. Write '0' has no effect."] - #[inline(always)] - pub fn region102(&self) -> REGION102_R { - REGION102_R::new(((self.bits >> 6) & 1) != 0) - } - #[doc = "Bit 7 - Enable protection for region 103. Write '0' has no effect."] - #[inline(always)] - pub fn region103(&self) -> REGION103_R { - REGION103_R::new(((self.bits >> 7) & 1) != 0) - } - #[doc = "Bit 8 - Enable protection for region 104. Write '0' has no effect."] - #[inline(always)] - pub fn region104(&self) -> REGION104_R { - REGION104_R::new(((self.bits >> 8) & 1) != 0) - } - #[doc = "Bit 9 - Enable protection for region 105. Write '0' has no effect."] - #[inline(always)] - pub fn region105(&self) -> REGION105_R { - REGION105_R::new(((self.bits >> 9) & 1) != 0) - } - #[doc = "Bit 10 - Enable protection for region 106. Write '0' has no effect."] - #[inline(always)] - pub fn region106(&self) -> REGION106_R { - REGION106_R::new(((self.bits >> 10) & 1) != 0) - } - #[doc = "Bit 11 - Enable protection for region 107. Write '0' has no effect."] - #[inline(always)] - pub fn region107(&self) -> REGION107_R { - REGION107_R::new(((self.bits >> 11) & 1) != 0) - } - #[doc = "Bit 12 - Enable protection for region 108. Write '0' has no effect."] - #[inline(always)] - pub fn region108(&self) -> REGION108_R { - REGION108_R::new(((self.bits >> 12) & 1) != 0) - } - #[doc = "Bit 13 - Enable protection for region 109. Write '0' has no effect."] - #[inline(always)] - pub fn region109(&self) -> REGION109_R { - REGION109_R::new(((self.bits >> 13) & 1) != 0) - } - #[doc = "Bit 14 - Enable protection for region 110. Write '0' has no effect."] - #[inline(always)] - pub fn region110(&self) -> REGION110_R { - REGION110_R::new(((self.bits >> 14) & 1) != 0) - } - #[doc = "Bit 15 - Enable protection for region 111. Write '0' has no effect."] - #[inline(always)] - pub fn region111(&self) -> REGION111_R { - REGION111_R::new(((self.bits >> 15) & 1) != 0) - } - #[doc = "Bit 16 - Enable protection for region 112. Write '0' has no effect."] - #[inline(always)] - pub fn region112(&self) -> REGION112_R { - REGION112_R::new(((self.bits >> 16) & 1) != 0) - } - #[doc = "Bit 17 - Enable protection for region 113. Write '0' has no effect."] - #[inline(always)] - pub fn region113(&self) -> REGION113_R { - REGION113_R::new(((self.bits >> 17) & 1) != 0) - } - #[doc = "Bit 18 - Enable protection for region 114. Write '0' has no effect."] - #[inline(always)] - pub fn region114(&self) -> REGION114_R { - REGION114_R::new(((self.bits >> 18) & 1) != 0) - } - #[doc = "Bit 19 - Enable protection for region 115. Write '0' has no effect."] - #[inline(always)] - pub fn region115(&self) -> REGION115_R { - REGION115_R::new(((self.bits >> 19) & 1) != 0) - } - #[doc = "Bit 20 - Enable protection for region 116. Write '0' has no effect."] - #[inline(always)] - pub fn region116(&self) -> REGION116_R { - REGION116_R::new(((self.bits >> 20) & 1) != 0) - } - #[doc = "Bit 21 - Enable protection for region 117. Write '0' has no effect."] - #[inline(always)] - pub fn region117(&self) -> REGION117_R { - REGION117_R::new(((self.bits >> 21) & 1) != 0) - } - #[doc = "Bit 22 - Enable protection for region 118. Write '0' has no effect."] - #[inline(always)] - pub fn region118(&self) -> REGION118_R { - REGION118_R::new(((self.bits >> 22) & 1) != 0) - } - #[doc = "Bit 23 - Enable protection for region 119. Write '0' has no effect."] - #[inline(always)] - pub fn region119(&self) -> REGION119_R { - REGION119_R::new(((self.bits >> 23) & 1) != 0) - } - #[doc = "Bit 24 - Enable protection for region 120. Write '0' has no effect."] - #[inline(always)] - pub fn region120(&self) -> REGION120_R { - REGION120_R::new(((self.bits >> 24) & 1) != 0) - } - #[doc = "Bit 25 - Enable protection for region 121. Write '0' has no effect."] - #[inline(always)] - pub fn region121(&self) -> REGION121_R { - REGION121_R::new(((self.bits >> 25) & 1) != 0) - } - #[doc = "Bit 26 - Enable protection for region 122. Write '0' has no effect."] - #[inline(always)] - pub fn region122(&self) -> REGION122_R { - REGION122_R::new(((self.bits >> 26) & 1) != 0) - } - #[doc = "Bit 27 - Enable protection for region 123. Write '0' has no effect."] - #[inline(always)] - pub fn region123(&self) -> REGION123_R { - REGION123_R::new(((self.bits >> 27) & 1) != 0) - } - #[doc = "Bit 28 - Enable protection for region 124. Write '0' has no effect."] - #[inline(always)] - pub fn region124(&self) -> REGION124_R { - REGION124_R::new(((self.bits >> 28) & 1) != 0) - } - #[doc = "Bit 29 - Enable protection for region 125. Write '0' has no effect."] - #[inline(always)] - pub fn region125(&self) -> REGION125_R { - REGION125_R::new(((self.bits >> 29) & 1) != 0) - } - #[doc = "Bit 30 - Enable protection for region 126. Write '0' has no effect."] - #[inline(always)] - pub fn region126(&self) -> REGION126_R { - REGION126_R::new(((self.bits >> 30) & 1) != 0) - } - #[doc = "Bit 31 - Enable protection for region 127. Write '0' has no effect."] - #[inline(always)] - pub fn region127(&self) -> REGION127_R { - REGION127_R::new(((self.bits >> 31) & 1) != 0) - } -} -impl W { - #[doc = "Bit 0 - Enable protection for region 96. Write '0' has no effect."] - #[inline(always)] - #[must_use] - pub fn region96(&mut self) -> REGION96_W<0> { - REGION96_W::new(self) - } - #[doc = "Bit 1 - Enable protection for region 97. Write '0' has no effect."] - #[inline(always)] - #[must_use] - pub fn region97(&mut self) -> REGION97_W<1> { - REGION97_W::new(self) - } - #[doc = "Bit 2 - Enable protection for region 98. Write '0' has no effect."] - #[inline(always)] - #[must_use] - pub fn region98(&mut self) -> REGION98_W<2> { - REGION98_W::new(self) - } - #[doc = "Bit 3 - Enable protection for region 99. Write '0' has no effect."] - #[inline(always)] - #[must_use] - pub fn region99(&mut self) -> REGION99_W<3> { - REGION99_W::new(self) - } - #[doc = "Bit 4 - Enable protection for region 100. Write '0' has no effect."] - #[inline(always)] - #[must_use] - pub fn region100(&mut self) -> REGION100_W<4> { - REGION100_W::new(self) - } - #[doc = "Bit 5 - Enable protection for region 101. Write '0' has no effect."] - #[inline(always)] - #[must_use] - pub fn region101(&mut self) -> REGION101_W<5> { - REGION101_W::new(self) - } - #[doc = "Bit 6 - Enable protection for region 102. Write '0' has no effect."] - #[inline(always)] - #[must_use] - pub fn region102(&mut self) -> REGION102_W<6> { - REGION102_W::new(self) - } - #[doc = "Bit 7 - Enable protection for region 103. Write '0' has no effect."] - #[inline(always)] - #[must_use] - pub fn region103(&mut self) -> REGION103_W<7> { - REGION103_W::new(self) - } - #[doc = "Bit 8 - Enable protection for region 104. Write '0' has no effect."] - #[inline(always)] - #[must_use] - pub fn region104(&mut self) -> REGION104_W<8> { - REGION104_W::new(self) - } - #[doc = "Bit 9 - Enable protection for region 105. Write '0' has no effect."] - #[inline(always)] - #[must_use] - pub fn region105(&mut self) -> REGION105_W<9> { - REGION105_W::new(self) - } - #[doc = "Bit 10 - Enable protection for region 106. Write '0' has no effect."] - #[inline(always)] - #[must_use] - pub fn region106(&mut self) -> REGION106_W<10> { - REGION106_W::new(self) - } - #[doc = "Bit 11 - Enable protection for region 107. Write '0' has no effect."] - #[inline(always)] - #[must_use] - pub fn region107(&mut self) -> REGION107_W<11> { - REGION107_W::new(self) - } - #[doc = "Bit 12 - Enable protection for region 108. Write '0' has no effect."] - #[inline(always)] - #[must_use] - pub fn region108(&mut self) -> REGION108_W<12> { - REGION108_W::new(self) - } - #[doc = "Bit 13 - Enable protection for region 109. Write '0' has no effect."] - #[inline(always)] - #[must_use] - pub fn region109(&mut self) -> REGION109_W<13> { - REGION109_W::new(self) - } - #[doc = "Bit 14 - Enable protection for region 110. Write '0' has no effect."] - #[inline(always)] - #[must_use] - pub fn region110(&mut self) -> REGION110_W<14> { - REGION110_W::new(self) - } - #[doc = "Bit 15 - Enable protection for region 111. Write '0' has no effect."] - #[inline(always)] - #[must_use] - pub fn region111(&mut self) -> REGION111_W<15> { - REGION111_W::new(self) - } - #[doc = "Bit 16 - Enable protection for region 112. Write '0' has no effect."] - #[inline(always)] - #[must_use] - pub fn region112(&mut self) -> REGION112_W<16> { - REGION112_W::new(self) - } - #[doc = "Bit 17 - Enable protection for region 113. Write '0' has no effect."] - #[inline(always)] - #[must_use] - pub fn region113(&mut self) -> REGION113_W<17> { - REGION113_W::new(self) - } - #[doc = "Bit 18 - Enable protection for region 114. Write '0' has no effect."] - #[inline(always)] - #[must_use] - pub fn region114(&mut self) -> REGION114_W<18> { - REGION114_W::new(self) - } - #[doc = "Bit 19 - Enable protection for region 115. Write '0' has no effect."] - #[inline(always)] - #[must_use] - pub fn region115(&mut self) -> REGION115_W<19> { - REGION115_W::new(self) - } - #[doc = "Bit 20 - Enable protection for region 116. Write '0' has no effect."] - #[inline(always)] - #[must_use] - pub fn region116(&mut self) -> REGION116_W<20> { - REGION116_W::new(self) - } - #[doc = "Bit 21 - Enable protection for region 117. Write '0' has no effect."] - #[inline(always)] - #[must_use] - pub fn region117(&mut self) -> REGION117_W<21> { - REGION117_W::new(self) - } - #[doc = "Bit 22 - Enable protection for region 118. Write '0' has no effect."] - #[inline(always)] - #[must_use] - pub fn region118(&mut self) -> REGION118_W<22> { - REGION118_W::new(self) - } - #[doc = "Bit 23 - Enable protection for region 119. Write '0' has no effect."] - #[inline(always)] - #[must_use] - pub fn region119(&mut self) -> REGION119_W<23> { - REGION119_W::new(self) - } - #[doc = "Bit 24 - Enable protection for region 120. Write '0' has no effect."] - #[inline(always)] - #[must_use] - pub fn region120(&mut self) -> REGION120_W<24> { - REGION120_W::new(self) - } - #[doc = "Bit 25 - Enable protection for region 121. Write '0' has no effect."] - #[inline(always)] - #[must_use] - pub fn region121(&mut self) -> REGION121_W<25> { - REGION121_W::new(self) - } - #[doc = "Bit 26 - Enable protection for region 122. Write '0' has no effect."] - #[inline(always)] - #[must_use] - pub fn region122(&mut self) -> REGION122_W<26> { - REGION122_W::new(self) - } - #[doc = "Bit 27 - Enable protection for region 123. Write '0' has no effect."] - #[inline(always)] - #[must_use] - pub fn region123(&mut self) -> REGION123_W<27> { - REGION123_W::new(self) - } - #[doc = "Bit 28 - Enable protection for region 124. Write '0' has no effect."] - #[inline(always)] - #[must_use] - pub fn region124(&mut self) -> REGION124_W<28> { - REGION124_W::new(self) - } - #[doc = "Bit 29 - Enable protection for region 125. Write '0' has no effect."] - #[inline(always)] - #[must_use] - pub fn region125(&mut self) -> REGION125_W<29> { - REGION125_W::new(self) - } - #[doc = "Bit 30 - Enable protection for region 126. Write '0' has no effect."] - #[inline(always)] - #[must_use] - pub fn region126(&mut self) -> REGION126_W<30> { - REGION126_W::new(self) - } - #[doc = "Bit 31 - Enable protection for region 127. Write '0' has no effect."] - #[inline(always)] - #[must_use] - pub fn region127(&mut self) -> REGION127_W<31> { - REGION127_W::new(self) - } - #[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 = "Block protect configuration register 3\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 [config3](index.html) module"] -pub struct CONFIG3_SPEC; -impl crate::RegisterSpec for CONFIG3_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [config3::R](R) reader structure"] -impl crate::Readable for CONFIG3_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [config3::W](W) writer structure"] -impl crate::Writable for CONFIG3_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets CONFIG3 to value 0"] -impl crate::Resettable for CONFIG3_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/bprot/disableindebug.rs b/down-the-stack/dk_pac/src/bprot/disableindebug.rs deleted file mode 100644 index 9f3535e..0000000 --- a/down-the-stack/dk_pac/src/bprot/disableindebug.rs +++ /dev/null @@ -1,127 +0,0 @@ -#[doc = "Register `DISABLEINDEBUG` 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 `DISABLEINDEBUG` 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 `DISABLEINDEBUG` reader - Disable the protection mechanism for NVM regions while in debug interface mode. This register will only disable the protection mechanism if the device is in debug interface mode."] -pub type DISABLEINDEBUG_R = crate::BitReader; -#[doc = "Disable the protection mechanism for NVM regions while in debug interface mode. This register will only disable the protection mechanism if the device is in debug interface mode.\n\nValue on reset: 1"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum DISABLEINDEBUG_A { - #[doc = "1: Disable in debug"] - DISABLED = 1, - #[doc = "0: Enable in debug"] - ENABLED = 0, -} -impl From for bool { - #[inline(always)] - fn from(variant: DISABLEINDEBUG_A) -> Self { - variant as u8 != 0 - } -} -impl DISABLEINDEBUG_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> DISABLEINDEBUG_A { - match self.bits { - true => DISABLEINDEBUG_A::DISABLED, - false => DISABLEINDEBUG_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == DISABLEINDEBUG_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == DISABLEINDEBUG_A::ENABLED - } -} -#[doc = "Field `DISABLEINDEBUG` writer - Disable the protection mechanism for NVM regions while in debug interface mode. This register will only disable the protection mechanism if the device is in debug interface mode."] -pub type DISABLEINDEBUG_W<'a, const O: u8> = - crate::BitWriter<'a, u32, DISABLEINDEBUG_SPEC, DISABLEINDEBUG_A, O>; -impl<'a, const O: u8> DISABLEINDEBUG_W<'a, O> { - #[doc = "Disable in debug"] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(DISABLEINDEBUG_A::DISABLED) - } - #[doc = "Enable in debug"] - #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(DISABLEINDEBUG_A::ENABLED) - } -} -impl R { - #[doc = "Bit 0 - Disable the protection mechanism for NVM regions while in debug interface mode. This register will only disable the protection mechanism if the device is in debug interface mode."] - #[inline(always)] - pub fn disableindebug(&self) -> DISABLEINDEBUG_R { - DISABLEINDEBUG_R::new((self.bits & 1) != 0) - } -} -impl W { - #[doc = "Bit 0 - Disable the protection mechanism for NVM regions while in debug interface mode. This register will only disable the protection mechanism if the device is in debug interface mode."] - #[inline(always)] - #[must_use] - pub fn disableindebug(&mut self) -> DISABLEINDEBUG_W<0> { - DISABLEINDEBUG_W::new(self) - } - #[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 = "Disable protection mechanism in debug interface mode\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 [disableindebug](index.html) module"] -pub struct DISABLEINDEBUG_SPEC; -impl crate::RegisterSpec for DISABLEINDEBUG_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [disableindebug::R](R) reader structure"] -impl crate::Readable for DISABLEINDEBUG_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [disableindebug::W](W) writer structure"] -impl crate::Writable for DISABLEINDEBUG_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets DISABLEINDEBUG to value 0x01"] -impl crate::Resettable for DISABLEINDEBUG_SPEC { - const RESET_VALUE: Self::Ux = 0x01; -} diff --git a/down-the-stack/dk_pac/src/ccm.rs b/down-the-stack/dk_pac/src/ccm.rs deleted file mode 100644 index 1e51d06..0000000 --- a/down-the-stack/dk_pac/src/ccm.rs +++ /dev/null @@ -1,105 +0,0 @@ -#[doc = r"Register block"] -#[repr(C)] -pub struct RegisterBlock { - #[doc = "0x00 - Start generation of key-stream. This operation will stop by itself when completed."] - pub tasks_ksgen: TASKS_KSGEN, - #[doc = "0x04 - Start encryption/decryption. This operation will stop by itself when completed."] - pub tasks_crypt: TASKS_CRYPT, - #[doc = "0x08 - Stop encryption/decryption"] - pub tasks_stop: TASKS_STOP, - _reserved3: [u8; 0xf4], - #[doc = "0x100 - Key-stream generation complete"] - pub events_endksgen: EVENTS_ENDKSGEN, - #[doc = "0x104 - Encrypt/decrypt complete"] - pub events_endcrypt: EVENTS_ENDCRYPT, - #[doc = "0x108 - CCM error event"] - pub events_error: EVENTS_ERROR, - _reserved6: [u8; 0xf4], - #[doc = "0x200 - Shortcuts between local events and tasks"] - pub shorts: SHORTS, - _reserved7: [u8; 0x0100], - #[doc = "0x304 - Enable interrupt"] - pub intenset: INTENSET, - #[doc = "0x308 - Disable interrupt"] - pub intenclr: INTENCLR, - _reserved9: [u8; 0xf4], - #[doc = "0x400 - MIC check result"] - pub micstatus: MICSTATUS, - _reserved10: [u8; 0xfc], - #[doc = "0x500 - Enable"] - pub enable: ENABLE, - #[doc = "0x504 - Operation mode"] - pub mode: MODE, - #[doc = "0x508 - Pointer to data structure holding AES key and NONCE vector"] - pub cnfptr: CNFPTR, - #[doc = "0x50c - Input pointer"] - pub inptr: INPTR, - #[doc = "0x510 - Output pointer"] - pub outptr: OUTPTR, - #[doc = "0x514 - Pointer to data area used for temporary storage"] - pub scratchptr: SCRATCHPTR, -} -#[doc = "TASKS_KSGEN (w) register accessor: an alias for `Reg`"] -pub type TASKS_KSGEN = crate::Reg; -#[doc = "Start generation of key-stream. This operation will stop by itself when completed."] -pub mod tasks_ksgen; -#[doc = "TASKS_CRYPT (w) register accessor: an alias for `Reg`"] -pub type TASKS_CRYPT = crate::Reg; -#[doc = "Start encryption/decryption. This operation will stop by itself when completed."] -pub mod tasks_crypt; -#[doc = "TASKS_STOP (w) register accessor: an alias for `Reg`"] -pub type TASKS_STOP = crate::Reg; -#[doc = "Stop encryption/decryption"] -pub mod tasks_stop; -#[doc = "EVENTS_ENDKSGEN (rw) register accessor: an alias for `Reg`"] -pub type EVENTS_ENDKSGEN = crate::Reg; -#[doc = "Key-stream generation complete"] -pub mod events_endksgen; -#[doc = "EVENTS_ENDCRYPT (rw) register accessor: an alias for `Reg`"] -pub type EVENTS_ENDCRYPT = crate::Reg; -#[doc = "Encrypt/decrypt complete"] -pub mod events_endcrypt; -#[doc = "EVENTS_ERROR (rw) register accessor: an alias for `Reg`"] -pub type EVENTS_ERROR = crate::Reg; -#[doc = "CCM error event"] -pub mod events_error; -#[doc = "SHORTS (rw) register accessor: an alias for `Reg`"] -pub type SHORTS = crate::Reg; -#[doc = "Shortcuts between local events and tasks"] -pub mod shorts; -#[doc = "INTENSET (rw) register accessor: an alias for `Reg`"] -pub type INTENSET = crate::Reg; -#[doc = "Enable interrupt"] -pub mod intenset; -#[doc = "INTENCLR (rw) register accessor: an alias for `Reg`"] -pub type INTENCLR = crate::Reg; -#[doc = "Disable interrupt"] -pub mod intenclr; -#[doc = "MICSTATUS (r) register accessor: an alias for `Reg`"] -pub type MICSTATUS = crate::Reg; -#[doc = "MIC check result"] -pub mod micstatus; -#[doc = "ENABLE (rw) register accessor: an alias for `Reg`"] -pub type ENABLE = crate::Reg; -#[doc = "Enable"] -pub mod enable; -#[doc = "MODE (rw) register accessor: an alias for `Reg`"] -pub type MODE = crate::Reg; -#[doc = "Operation mode"] -pub mod mode; -#[doc = "CNFPTR (rw) register accessor: an alias for `Reg`"] -pub type CNFPTR = crate::Reg; -#[doc = "Pointer to data structure holding AES key and NONCE vector"] -pub mod cnfptr; -#[doc = "INPTR (rw) register accessor: an alias for `Reg`"] -pub type INPTR = crate::Reg; -#[doc = "Input pointer"] -pub mod inptr; -#[doc = "OUTPTR (rw) register accessor: an alias for `Reg`"] -pub type OUTPTR = crate::Reg; -#[doc = "Output pointer"] -pub mod outptr; -#[doc = "SCRATCHPTR (rw) register accessor: an alias for `Reg`"] -pub type SCRATCHPTR = crate::Reg; -#[doc = "Pointer to data area used for temporary storage"] -pub mod scratchptr; diff --git a/down-the-stack/dk_pac/src/ccm/cnfptr.rs b/down-the-stack/dk_pac/src/ccm/cnfptr.rs deleted file mode 100644 index 09639b2..0000000 --- a/down-the-stack/dk_pac/src/ccm/cnfptr.rs +++ /dev/null @@ -1,80 +0,0 @@ -#[doc = "Register `CNFPTR` 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 `CNFPTR` 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 `CNFPTR` reader - Pointer to the data structure holding the AES key and the CCM NONCE vector (see Table 1 CCM data structure overview)"] -pub type CNFPTR_R = crate::FieldReader; -#[doc = "Field `CNFPTR` writer - Pointer to the data structure holding the AES key and the CCM NONCE vector (see Table 1 CCM data structure overview)"] -pub type CNFPTR_W<'a, const O: u8> = crate::FieldWriter<'a, u32, CNFPTR_SPEC, u32, u32, 32, O>; -impl R { - #[doc = "Bits 0:31 - Pointer to the data structure holding the AES key and the CCM NONCE vector (see Table 1 CCM data structure overview)"] - #[inline(always)] - pub fn cnfptr(&self) -> CNFPTR_R { - CNFPTR_R::new(self.bits) - } -} -impl W { - #[doc = "Bits 0:31 - Pointer to the data structure holding the AES key and the CCM NONCE vector (see Table 1 CCM data structure overview)"] - #[inline(always)] - #[must_use] - pub fn cnfptr(&mut self) -> CNFPTR_W<0> { - CNFPTR_W::new(self) - } - #[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 = "Pointer to data structure holding AES key and NONCE vector\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 [cnfptr](index.html) module"] -pub struct CNFPTR_SPEC; -impl crate::RegisterSpec for CNFPTR_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [cnfptr::R](R) reader structure"] -impl crate::Readable for CNFPTR_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [cnfptr::W](W) writer structure"] -impl crate::Writable for CNFPTR_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets CNFPTR to value 0"] -impl crate::Resettable for CNFPTR_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/ccm/enable.rs b/down-the-stack/dk_pac/src/ccm/enable.rs deleted file mode 100644 index a7ddc9c..0000000 --- a/down-the-stack/dk_pac/src/ccm/enable.rs +++ /dev/null @@ -1,128 +0,0 @@ -#[doc = "Register `ENABLE` 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 `ENABLE` 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 `ENABLE` reader - Enable or disable CCM"] -pub type ENABLE_R = crate::FieldReader; -#[doc = "Enable or disable CCM\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -#[repr(u8)] -pub enum ENABLE_A { - #[doc = "0: Disable"] - DISABLED = 0, - #[doc = "2: Enable"] - ENABLED = 2, -} -impl From for u8 { - #[inline(always)] - fn from(variant: ENABLE_A) -> Self { - variant as _ - } -} -impl ENABLE_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> Option { - match self.bits { - 0 => Some(ENABLE_A::DISABLED), - 2 => Some(ENABLE_A::ENABLED), - _ => None, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == ENABLE_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == ENABLE_A::ENABLED - } -} -#[doc = "Field `ENABLE` writer - Enable or disable CCM"] -pub type ENABLE_W<'a, const O: u8> = crate::FieldWriter<'a, u32, ENABLE_SPEC, u8, ENABLE_A, 2, O>; -impl<'a, const O: u8> ENABLE_W<'a, O> { - #[doc = "Disable"] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(ENABLE_A::DISABLED) - } - #[doc = "Enable"] - #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(ENABLE_A::ENABLED) - } -} -impl R { - #[doc = "Bits 0:1 - Enable or disable CCM"] - #[inline(always)] - pub fn enable(&self) -> ENABLE_R { - ENABLE_R::new((self.bits & 3) as u8) - } -} -impl W { - #[doc = "Bits 0:1 - Enable or disable CCM"] - #[inline(always)] - #[must_use] - pub fn enable(&mut self) -> ENABLE_W<0> { - 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 - } -} -#[doc = "Enable\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 [enable](index.html) module"] -pub struct ENABLE_SPEC; -impl crate::RegisterSpec for ENABLE_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [enable::R](R) reader structure"] -impl crate::Readable for ENABLE_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [enable::W](W) writer structure"] -impl crate::Writable for ENABLE_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets ENABLE to value 0"] -impl crate::Resettable for ENABLE_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/ccm/events_endcrypt.rs b/down-the-stack/dk_pac/src/ccm/events_endcrypt.rs deleted file mode 100644 index ad72653..0000000 --- a/down-the-stack/dk_pac/src/ccm/events_endcrypt.rs +++ /dev/null @@ -1,127 +0,0 @@ -#[doc = "Register `EVENTS_ENDCRYPT` 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 `EVENTS_ENDCRYPT` 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 `EVENTS_ENDCRYPT` reader - Encrypt/decrypt complete"] -pub type EVENTS_ENDCRYPT_R = crate::BitReader; -#[doc = "Encrypt/decrypt complete\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum EVENTS_ENDCRYPT_A { - #[doc = "0: Event not generated"] - NOT_GENERATED = 0, - #[doc = "1: Event generated"] - GENERATED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: EVENTS_ENDCRYPT_A) -> Self { - variant as u8 != 0 - } -} -impl EVENTS_ENDCRYPT_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> EVENTS_ENDCRYPT_A { - match self.bits { - false => EVENTS_ENDCRYPT_A::NOT_GENERATED, - true => EVENTS_ENDCRYPT_A::GENERATED, - } - } - #[doc = "Checks if the value of the field is `NOT_GENERATED`"] - #[inline(always)] - pub fn is_not_generated(&self) -> bool { - *self == EVENTS_ENDCRYPT_A::NOT_GENERATED - } - #[doc = "Checks if the value of the field is `GENERATED`"] - #[inline(always)] - pub fn is_generated(&self) -> bool { - *self == EVENTS_ENDCRYPT_A::GENERATED - } -} -#[doc = "Field `EVENTS_ENDCRYPT` writer - Encrypt/decrypt complete"] -pub type EVENTS_ENDCRYPT_W<'a, const O: u8> = - crate::BitWriter<'a, u32, EVENTS_ENDCRYPT_SPEC, EVENTS_ENDCRYPT_A, O>; -impl<'a, const O: u8> EVENTS_ENDCRYPT_W<'a, O> { - #[doc = "Event not generated"] - #[inline(always)] - pub fn not_generated(self) -> &'a mut W { - self.variant(EVENTS_ENDCRYPT_A::NOT_GENERATED) - } - #[doc = "Event generated"] - #[inline(always)] - pub fn generated(self) -> &'a mut W { - self.variant(EVENTS_ENDCRYPT_A::GENERATED) - } -} -impl R { - #[doc = "Bit 0 - Encrypt/decrypt complete"] - #[inline(always)] - pub fn events_endcrypt(&self) -> EVENTS_ENDCRYPT_R { - EVENTS_ENDCRYPT_R::new((self.bits & 1) != 0) - } -} -impl W { - #[doc = "Bit 0 - Encrypt/decrypt complete"] - #[inline(always)] - #[must_use] - pub fn events_endcrypt(&mut self) -> EVENTS_ENDCRYPT_W<0> { - EVENTS_ENDCRYPT_W::new(self) - } - #[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 = "Encrypt/decrypt complete\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 [events_endcrypt](index.html) module"] -pub struct EVENTS_ENDCRYPT_SPEC; -impl crate::RegisterSpec for EVENTS_ENDCRYPT_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [events_endcrypt::R](R) reader structure"] -impl crate::Readable for EVENTS_ENDCRYPT_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [events_endcrypt::W](W) writer structure"] -impl crate::Writable for EVENTS_ENDCRYPT_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets EVENTS_ENDCRYPT to value 0"] -impl crate::Resettable for EVENTS_ENDCRYPT_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/ccm/events_endksgen.rs b/down-the-stack/dk_pac/src/ccm/events_endksgen.rs deleted file mode 100644 index 66ed553..0000000 --- a/down-the-stack/dk_pac/src/ccm/events_endksgen.rs +++ /dev/null @@ -1,127 +0,0 @@ -#[doc = "Register `EVENTS_ENDKSGEN` 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 `EVENTS_ENDKSGEN` 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 `EVENTS_ENDKSGEN` reader - Key-stream generation complete"] -pub type EVENTS_ENDKSGEN_R = crate::BitReader; -#[doc = "Key-stream generation complete\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum EVENTS_ENDKSGEN_A { - #[doc = "0: Event not generated"] - NOT_GENERATED = 0, - #[doc = "1: Event generated"] - GENERATED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: EVENTS_ENDKSGEN_A) -> Self { - variant as u8 != 0 - } -} -impl EVENTS_ENDKSGEN_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> EVENTS_ENDKSGEN_A { - match self.bits { - false => EVENTS_ENDKSGEN_A::NOT_GENERATED, - true => EVENTS_ENDKSGEN_A::GENERATED, - } - } - #[doc = "Checks if the value of the field is `NOT_GENERATED`"] - #[inline(always)] - pub fn is_not_generated(&self) -> bool { - *self == EVENTS_ENDKSGEN_A::NOT_GENERATED - } - #[doc = "Checks if the value of the field is `GENERATED`"] - #[inline(always)] - pub fn is_generated(&self) -> bool { - *self == EVENTS_ENDKSGEN_A::GENERATED - } -} -#[doc = "Field `EVENTS_ENDKSGEN` writer - Key-stream generation complete"] -pub type EVENTS_ENDKSGEN_W<'a, const O: u8> = - crate::BitWriter<'a, u32, EVENTS_ENDKSGEN_SPEC, EVENTS_ENDKSGEN_A, O>; -impl<'a, const O: u8> EVENTS_ENDKSGEN_W<'a, O> { - #[doc = "Event not generated"] - #[inline(always)] - pub fn not_generated(self) -> &'a mut W { - self.variant(EVENTS_ENDKSGEN_A::NOT_GENERATED) - } - #[doc = "Event generated"] - #[inline(always)] - pub fn generated(self) -> &'a mut W { - self.variant(EVENTS_ENDKSGEN_A::GENERATED) - } -} -impl R { - #[doc = "Bit 0 - Key-stream generation complete"] - #[inline(always)] - pub fn events_endksgen(&self) -> EVENTS_ENDKSGEN_R { - EVENTS_ENDKSGEN_R::new((self.bits & 1) != 0) - } -} -impl W { - #[doc = "Bit 0 - Key-stream generation complete"] - #[inline(always)] - #[must_use] - pub fn events_endksgen(&mut self) -> EVENTS_ENDKSGEN_W<0> { - EVENTS_ENDKSGEN_W::new(self) - } - #[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 = "Key-stream generation complete\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 [events_endksgen](index.html) module"] -pub struct EVENTS_ENDKSGEN_SPEC; -impl crate::RegisterSpec for EVENTS_ENDKSGEN_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [events_endksgen::R](R) reader structure"] -impl crate::Readable for EVENTS_ENDKSGEN_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [events_endksgen::W](W) writer structure"] -impl crate::Writable for EVENTS_ENDKSGEN_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets EVENTS_ENDKSGEN to value 0"] -impl crate::Resettable for EVENTS_ENDKSGEN_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/ccm/events_error.rs b/down-the-stack/dk_pac/src/ccm/events_error.rs deleted file mode 100644 index 897b7d2..0000000 --- a/down-the-stack/dk_pac/src/ccm/events_error.rs +++ /dev/null @@ -1,127 +0,0 @@ -#[doc = "Register `EVENTS_ERROR` 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 `EVENTS_ERROR` 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 `EVENTS_ERROR` reader - CCM error event"] -pub type EVENTS_ERROR_R = crate::BitReader; -#[doc = "CCM error event\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum EVENTS_ERROR_A { - #[doc = "0: Event not generated"] - NOT_GENERATED = 0, - #[doc = "1: Event generated"] - GENERATED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: EVENTS_ERROR_A) -> Self { - variant as u8 != 0 - } -} -impl EVENTS_ERROR_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> EVENTS_ERROR_A { - match self.bits { - false => EVENTS_ERROR_A::NOT_GENERATED, - true => EVENTS_ERROR_A::GENERATED, - } - } - #[doc = "Checks if the value of the field is `NOT_GENERATED`"] - #[inline(always)] - pub fn is_not_generated(&self) -> bool { - *self == EVENTS_ERROR_A::NOT_GENERATED - } - #[doc = "Checks if the value of the field is `GENERATED`"] - #[inline(always)] - pub fn is_generated(&self) -> bool { - *self == EVENTS_ERROR_A::GENERATED - } -} -#[doc = "Field `EVENTS_ERROR` writer - CCM error event"] -pub type EVENTS_ERROR_W<'a, const O: u8> = - crate::BitWriter<'a, u32, EVENTS_ERROR_SPEC, EVENTS_ERROR_A, O>; -impl<'a, const O: u8> EVENTS_ERROR_W<'a, O> { - #[doc = "Event not generated"] - #[inline(always)] - pub fn not_generated(self) -> &'a mut W { - self.variant(EVENTS_ERROR_A::NOT_GENERATED) - } - #[doc = "Event generated"] - #[inline(always)] - pub fn generated(self) -> &'a mut W { - self.variant(EVENTS_ERROR_A::GENERATED) - } -} -impl R { - #[doc = "Bit 0 - CCM error event"] - #[inline(always)] - pub fn events_error(&self) -> EVENTS_ERROR_R { - EVENTS_ERROR_R::new((self.bits & 1) != 0) - } -} -impl W { - #[doc = "Bit 0 - CCM error event"] - #[inline(always)] - #[must_use] - pub fn events_error(&mut self) -> EVENTS_ERROR_W<0> { - EVENTS_ERROR_W::new(self) - } - #[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 = "CCM error event\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 [events_error](index.html) module"] -pub struct EVENTS_ERROR_SPEC; -impl crate::RegisterSpec for EVENTS_ERROR_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [events_error::R](R) reader structure"] -impl crate::Readable for EVENTS_ERROR_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [events_error::W](W) writer structure"] -impl crate::Writable for EVENTS_ERROR_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets EVENTS_ERROR to value 0"] -impl crate::Resettable for EVENTS_ERROR_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/ccm/inptr.rs b/down-the-stack/dk_pac/src/ccm/inptr.rs deleted file mode 100644 index fa6687c..0000000 --- a/down-the-stack/dk_pac/src/ccm/inptr.rs +++ /dev/null @@ -1,80 +0,0 @@ -#[doc = "Register `INPTR` 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 `INPTR` 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 `INPTR` reader - Input pointer"] -pub type INPTR_R = crate::FieldReader; -#[doc = "Field `INPTR` writer - Input pointer"] -pub type INPTR_W<'a, const O: u8> = crate::FieldWriter<'a, u32, INPTR_SPEC, u32, u32, 32, O>; -impl R { - #[doc = "Bits 0:31 - Input pointer"] - #[inline(always)] - pub fn inptr(&self) -> INPTR_R { - INPTR_R::new(self.bits) - } -} -impl W { - #[doc = "Bits 0:31 - Input pointer"] - #[inline(always)] - #[must_use] - pub fn inptr(&mut self) -> INPTR_W<0> { - INPTR_W::new(self) - } - #[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 = "Input pointer\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 [inptr](index.html) module"] -pub struct INPTR_SPEC; -impl crate::RegisterSpec for INPTR_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [inptr::R](R) reader structure"] -impl crate::Readable for INPTR_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [inptr::W](W) writer structure"] -impl crate::Writable for INPTR_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets INPTR to value 0"] -impl crate::Resettable for INPTR_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/ccm/intenclr.rs b/down-the-stack/dk_pac/src/ccm/intenclr.rs deleted file mode 100644 index aff948e..0000000 --- a/down-the-stack/dk_pac/src/ccm/intenclr.rs +++ /dev/null @@ -1,269 +0,0 @@ -#[doc = "Register `INTENCLR` 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 `INTENCLR` 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 `ENDKSGEN` reader - Write '1' to disable interrupt for event ENDKSGEN"] -pub type ENDKSGEN_R = crate::BitReader; -#[doc = "Write '1' to disable interrupt for event ENDKSGEN\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum ENDKSGEN_A { - #[doc = "0: Read: Disabled"] - DISABLED = 0, - #[doc = "1: Read: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: ENDKSGEN_A) -> Self { - variant as u8 != 0 - } -} -impl ENDKSGEN_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> ENDKSGEN_A { - match self.bits { - false => ENDKSGEN_A::DISABLED, - true => ENDKSGEN_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == ENDKSGEN_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == ENDKSGEN_A::ENABLED - } -} -#[doc = "Write '1' to disable interrupt for event ENDKSGEN\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum ENDKSGEN_AW { - #[doc = "1: Disable"] - CLEAR = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: ENDKSGEN_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `ENDKSGEN` writer - Write '1' to disable interrupt for event ENDKSGEN"] -pub type ENDKSGEN_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENCLR_SPEC, ENDKSGEN_AW, O>; -impl<'a, const O: u8> ENDKSGEN_W<'a, O> { - #[doc = "Disable"] - #[inline(always)] - pub fn clear(self) -> &'a mut W { - self.variant(ENDKSGEN_AW::CLEAR) - } -} -#[doc = "Field `ENDCRYPT` reader - Write '1' to disable interrupt for event ENDCRYPT"] -pub type ENDCRYPT_R = crate::BitReader; -#[doc = "Write '1' to disable interrupt for event ENDCRYPT\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum ENDCRYPT_A { - #[doc = "0: Read: Disabled"] - DISABLED = 0, - #[doc = "1: Read: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: ENDCRYPT_A) -> Self { - variant as u8 != 0 - } -} -impl ENDCRYPT_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> ENDCRYPT_A { - match self.bits { - false => ENDCRYPT_A::DISABLED, - true => ENDCRYPT_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == ENDCRYPT_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == ENDCRYPT_A::ENABLED - } -} -#[doc = "Write '1' to disable interrupt for event ENDCRYPT\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum ENDCRYPT_AW { - #[doc = "1: Disable"] - CLEAR = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: ENDCRYPT_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `ENDCRYPT` writer - Write '1' to disable interrupt for event ENDCRYPT"] -pub type ENDCRYPT_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENCLR_SPEC, ENDCRYPT_AW, O>; -impl<'a, const O: u8> ENDCRYPT_W<'a, O> { - #[doc = "Disable"] - #[inline(always)] - pub fn clear(self) -> &'a mut W { - self.variant(ENDCRYPT_AW::CLEAR) - } -} -#[doc = "Field `ERROR` reader - Write '1' to disable interrupt for event ERROR"] -pub type ERROR_R = crate::BitReader; -#[doc = "Write '1' to disable interrupt for event ERROR\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum ERROR_A { - #[doc = "0: Read: Disabled"] - DISABLED = 0, - #[doc = "1: Read: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: ERROR_A) -> Self { - variant as u8 != 0 - } -} -impl ERROR_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> ERROR_A { - match self.bits { - false => ERROR_A::DISABLED, - true => ERROR_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == ERROR_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == ERROR_A::ENABLED - } -} -#[doc = "Write '1' to disable interrupt for event ERROR\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum ERROR_AW { - #[doc = "1: Disable"] - CLEAR = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: ERROR_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `ERROR` writer - Write '1' to disable interrupt for event ERROR"] -pub type ERROR_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENCLR_SPEC, ERROR_AW, O>; -impl<'a, const O: u8> ERROR_W<'a, O> { - #[doc = "Disable"] - #[inline(always)] - pub fn clear(self) -> &'a mut W { - self.variant(ERROR_AW::CLEAR) - } -} -impl R { - #[doc = "Bit 0 - Write '1' to disable interrupt for event ENDKSGEN"] - #[inline(always)] - pub fn endksgen(&self) -> ENDKSGEN_R { - ENDKSGEN_R::new((self.bits & 1) != 0) - } - #[doc = "Bit 1 - Write '1' to disable interrupt for event ENDCRYPT"] - #[inline(always)] - pub fn endcrypt(&self) -> ENDCRYPT_R { - ENDCRYPT_R::new(((self.bits >> 1) & 1) != 0) - } - #[doc = "Bit 2 - Write '1' to disable interrupt for event ERROR"] - #[inline(always)] - pub fn error(&self) -> ERROR_R { - ERROR_R::new(((self.bits >> 2) & 1) != 0) - } -} -impl W { - #[doc = "Bit 0 - Write '1' to disable interrupt for event ENDKSGEN"] - #[inline(always)] - #[must_use] - pub fn endksgen(&mut self) -> ENDKSGEN_W<0> { - ENDKSGEN_W::new(self) - } - #[doc = "Bit 1 - Write '1' to disable interrupt for event ENDCRYPT"] - #[inline(always)] - #[must_use] - pub fn endcrypt(&mut self) -> ENDCRYPT_W<1> { - ENDCRYPT_W::new(self) - } - #[doc = "Bit 2 - Write '1' to disable interrupt for event ERROR"] - #[inline(always)] - #[must_use] - pub fn error(&mut self) -> ERROR_W<2> { - ERROR_W::new(self) - } - #[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 = "Disable interrupt\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 [intenclr](index.html) module"] -pub struct INTENCLR_SPEC; -impl crate::RegisterSpec for INTENCLR_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [intenclr::R](R) reader structure"] -impl crate::Readable for INTENCLR_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [intenclr::W](W) writer structure"] -impl crate::Writable for INTENCLR_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets INTENCLR to value 0"] -impl crate::Resettable for INTENCLR_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/ccm/intenset.rs b/down-the-stack/dk_pac/src/ccm/intenset.rs deleted file mode 100644 index 3c3facb..0000000 --- a/down-the-stack/dk_pac/src/ccm/intenset.rs +++ /dev/null @@ -1,269 +0,0 @@ -#[doc = "Register `INTENSET` 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 `INTENSET` 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 `ENDKSGEN` reader - Write '1' to enable interrupt for event ENDKSGEN"] -pub type ENDKSGEN_R = crate::BitReader; -#[doc = "Write '1' to enable interrupt for event ENDKSGEN\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum ENDKSGEN_A { - #[doc = "0: Read: Disabled"] - DISABLED = 0, - #[doc = "1: Read: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: ENDKSGEN_A) -> Self { - variant as u8 != 0 - } -} -impl ENDKSGEN_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> ENDKSGEN_A { - match self.bits { - false => ENDKSGEN_A::DISABLED, - true => ENDKSGEN_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == ENDKSGEN_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == ENDKSGEN_A::ENABLED - } -} -#[doc = "Write '1' to enable interrupt for event ENDKSGEN\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum ENDKSGEN_AW { - #[doc = "1: Enable"] - SET = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: ENDKSGEN_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `ENDKSGEN` writer - Write '1' to enable interrupt for event ENDKSGEN"] -pub type ENDKSGEN_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENSET_SPEC, ENDKSGEN_AW, O>; -impl<'a, const O: u8> ENDKSGEN_W<'a, O> { - #[doc = "Enable"] - #[inline(always)] - pub fn set(self) -> &'a mut W { - self.variant(ENDKSGEN_AW::SET) - } -} -#[doc = "Field `ENDCRYPT` reader - Write '1' to enable interrupt for event ENDCRYPT"] -pub type ENDCRYPT_R = crate::BitReader; -#[doc = "Write '1' to enable interrupt for event ENDCRYPT\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum ENDCRYPT_A { - #[doc = "0: Read: Disabled"] - DISABLED = 0, - #[doc = "1: Read: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: ENDCRYPT_A) -> Self { - variant as u8 != 0 - } -} -impl ENDCRYPT_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> ENDCRYPT_A { - match self.bits { - false => ENDCRYPT_A::DISABLED, - true => ENDCRYPT_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == ENDCRYPT_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == ENDCRYPT_A::ENABLED - } -} -#[doc = "Write '1' to enable interrupt for event ENDCRYPT\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum ENDCRYPT_AW { - #[doc = "1: Enable"] - SET = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: ENDCRYPT_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `ENDCRYPT` writer - Write '1' to enable interrupt for event ENDCRYPT"] -pub type ENDCRYPT_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENSET_SPEC, ENDCRYPT_AW, O>; -impl<'a, const O: u8> ENDCRYPT_W<'a, O> { - #[doc = "Enable"] - #[inline(always)] - pub fn set(self) -> &'a mut W { - self.variant(ENDCRYPT_AW::SET) - } -} -#[doc = "Field `ERROR` reader - Write '1' to enable interrupt for event ERROR"] -pub type ERROR_R = crate::BitReader; -#[doc = "Write '1' to enable interrupt for event ERROR\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum ERROR_A { - #[doc = "0: Read: Disabled"] - DISABLED = 0, - #[doc = "1: Read: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: ERROR_A) -> Self { - variant as u8 != 0 - } -} -impl ERROR_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> ERROR_A { - match self.bits { - false => ERROR_A::DISABLED, - true => ERROR_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == ERROR_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == ERROR_A::ENABLED - } -} -#[doc = "Write '1' to enable interrupt for event ERROR\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum ERROR_AW { - #[doc = "1: Enable"] - SET = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: ERROR_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `ERROR` writer - Write '1' to enable interrupt for event ERROR"] -pub type ERROR_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENSET_SPEC, ERROR_AW, O>; -impl<'a, const O: u8> ERROR_W<'a, O> { - #[doc = "Enable"] - #[inline(always)] - pub fn set(self) -> &'a mut W { - self.variant(ERROR_AW::SET) - } -} -impl R { - #[doc = "Bit 0 - Write '1' to enable interrupt for event ENDKSGEN"] - #[inline(always)] - pub fn endksgen(&self) -> ENDKSGEN_R { - ENDKSGEN_R::new((self.bits & 1) != 0) - } - #[doc = "Bit 1 - Write '1' to enable interrupt for event ENDCRYPT"] - #[inline(always)] - pub fn endcrypt(&self) -> ENDCRYPT_R { - ENDCRYPT_R::new(((self.bits >> 1) & 1) != 0) - } - #[doc = "Bit 2 - Write '1' to enable interrupt for event ERROR"] - #[inline(always)] - pub fn error(&self) -> ERROR_R { - ERROR_R::new(((self.bits >> 2) & 1) != 0) - } -} -impl W { - #[doc = "Bit 0 - Write '1' to enable interrupt for event ENDKSGEN"] - #[inline(always)] - #[must_use] - pub fn endksgen(&mut self) -> ENDKSGEN_W<0> { - ENDKSGEN_W::new(self) - } - #[doc = "Bit 1 - Write '1' to enable interrupt for event ENDCRYPT"] - #[inline(always)] - #[must_use] - pub fn endcrypt(&mut self) -> ENDCRYPT_W<1> { - ENDCRYPT_W::new(self) - } - #[doc = "Bit 2 - Write '1' to enable interrupt for event ERROR"] - #[inline(always)] - #[must_use] - pub fn error(&mut self) -> ERROR_W<2> { - ERROR_W::new(self) - } - #[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 = "Enable interrupt\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 [intenset](index.html) module"] -pub struct INTENSET_SPEC; -impl crate::RegisterSpec for INTENSET_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [intenset::R](R) reader structure"] -impl crate::Readable for INTENSET_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [intenset::W](W) writer structure"] -impl crate::Writable for INTENSET_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets INTENSET to value 0"] -impl crate::Resettable for INTENSET_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/ccm/micstatus.rs b/down-the-stack/dk_pac/src/ccm/micstatus.rs deleted file mode 100644 index 32a430a..0000000 --- a/down-the-stack/dk_pac/src/ccm/micstatus.rs +++ /dev/null @@ -1,71 +0,0 @@ -#[doc = "Register `MICSTATUS` 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 = "Field `MICSTATUS` reader - The result of the MIC check performed during the previous decryption operation"] -pub type MICSTATUS_R = crate::BitReader; -#[doc = "The result of the MIC check performed during the previous decryption operation\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum MICSTATUS_A { - #[doc = "0: MIC check failed"] - CHECK_FAILED = 0, - #[doc = "1: MIC check passed"] - CHECK_PASSED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: MICSTATUS_A) -> Self { - variant as u8 != 0 - } -} -impl MICSTATUS_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> MICSTATUS_A { - match self.bits { - false => MICSTATUS_A::CHECK_FAILED, - true => MICSTATUS_A::CHECK_PASSED, - } - } - #[doc = "Checks if the value of the field is `CHECK_FAILED`"] - #[inline(always)] - pub fn is_check_failed(&self) -> bool { - *self == MICSTATUS_A::CHECK_FAILED - } - #[doc = "Checks if the value of the field is `CHECK_PASSED`"] - #[inline(always)] - pub fn is_check_passed(&self) -> bool { - *self == MICSTATUS_A::CHECK_PASSED - } -} -impl R { - #[doc = "Bit 0 - The result of the MIC check performed during the previous decryption operation"] - #[inline(always)] - pub fn micstatus(&self) -> MICSTATUS_R { - MICSTATUS_R::new((self.bits & 1) != 0) - } -} -#[doc = "MIC check 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 [micstatus](index.html) module"] -pub struct MICSTATUS_SPEC; -impl crate::RegisterSpec for MICSTATUS_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [micstatus::R](R) reader structure"] -impl crate::Readable for MICSTATUS_SPEC { - type Reader = R; -} -#[doc = "`reset()` method sets MICSTATUS to value 0"] -impl crate::Resettable for MICSTATUS_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/ccm/mode.rs b/down-the-stack/dk_pac/src/ccm/mode.rs deleted file mode 100644 index c991790..0000000 --- a/down-the-stack/dk_pac/src/ccm/mode.rs +++ /dev/null @@ -1,248 +0,0 @@ -#[doc = "Register `MODE` 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 `MODE` 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 `MODE` reader - The mode of operation to be used"] -pub type MODE_R = crate::BitReader; -#[doc = "The mode of operation to be used\n\nValue on reset: 1"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum MODE_A { - #[doc = "0: AES CCM packet encryption mode"] - ENCRYPTION = 0, - #[doc = "1: AES CCM packet decryption mode"] - DECRYPTION = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: MODE_A) -> Self { - variant as u8 != 0 - } -} -impl MODE_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> MODE_A { - match self.bits { - false => MODE_A::ENCRYPTION, - true => MODE_A::DECRYPTION, - } - } - #[doc = "Checks if the value of the field is `ENCRYPTION`"] - #[inline(always)] - pub fn is_encryption(&self) -> bool { - *self == MODE_A::ENCRYPTION - } - #[doc = "Checks if the value of the field is `DECRYPTION`"] - #[inline(always)] - pub fn is_decryption(&self) -> bool { - *self == MODE_A::DECRYPTION - } -} -#[doc = "Field `MODE` writer - The mode of operation to be used"] -pub type MODE_W<'a, const O: u8> = crate::BitWriter<'a, u32, MODE_SPEC, MODE_A, O>; -impl<'a, const O: u8> MODE_W<'a, O> { - #[doc = "AES CCM packet encryption mode"] - #[inline(always)] - pub fn encryption(self) -> &'a mut W { - self.variant(MODE_A::ENCRYPTION) - } - #[doc = "AES CCM packet decryption mode"] - #[inline(always)] - pub fn decryption(self) -> &'a mut W { - self.variant(MODE_A::DECRYPTION) - } -} -#[doc = "Field `DATARATE` reader - Data rate that the CCM shall run in synch with"] -pub type DATARATE_R = crate::BitReader; -#[doc = "Data rate that the CCM shall run in synch with\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum DATARATE_A { - #[doc = "0: In synch with 1 Mbit data rate"] - _1MBIT = 0, - #[doc = "1: In synch with 2 Mbit data rate"] - _2MBIT = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: DATARATE_A) -> Self { - variant as u8 != 0 - } -} -impl DATARATE_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> DATARATE_A { - match self.bits { - false => DATARATE_A::_1MBIT, - true => DATARATE_A::_2MBIT, - } - } - #[doc = "Checks if the value of the field is `_1MBIT`"] - #[inline(always)] - pub fn is_1mbit(&self) -> bool { - *self == DATARATE_A::_1MBIT - } - #[doc = "Checks if the value of the field is `_2MBIT`"] - #[inline(always)] - pub fn is_2mbit(&self) -> bool { - *self == DATARATE_A::_2MBIT - } -} -#[doc = "Field `DATARATE` writer - Data rate that the CCM shall run in synch with"] -pub type DATARATE_W<'a, const O: u8> = crate::BitWriter<'a, u32, MODE_SPEC, DATARATE_A, O>; -impl<'a, const O: u8> DATARATE_W<'a, O> { - #[doc = "In synch with 1 Mbit data rate"] - #[inline(always)] - pub fn _1mbit(self) -> &'a mut W { - self.variant(DATARATE_A::_1MBIT) - } - #[doc = "In synch with 2 Mbit data rate"] - #[inline(always)] - pub fn _2mbit(self) -> &'a mut W { - self.variant(DATARATE_A::_2MBIT) - } -} -#[doc = "Field `LENGTH` reader - Packet length configuration"] -pub type LENGTH_R = crate::BitReader; -#[doc = "Packet length configuration\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum LENGTH_A { - #[doc = "0: Default length. Effective length of LENGTH field is 5-bit"] - DEFAULT = 0, - #[doc = "1: Extended length. Effective length of LENGTH field is 8-bit"] - EXTENDED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: LENGTH_A) -> Self { - variant as u8 != 0 - } -} -impl LENGTH_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> LENGTH_A { - match self.bits { - false => LENGTH_A::DEFAULT, - true => LENGTH_A::EXTENDED, - } - } - #[doc = "Checks if the value of the field is `DEFAULT`"] - #[inline(always)] - pub fn is_default(&self) -> bool { - *self == LENGTH_A::DEFAULT - } - #[doc = "Checks if the value of the field is `EXTENDED`"] - #[inline(always)] - pub fn is_extended(&self) -> bool { - *self == LENGTH_A::EXTENDED - } -} -#[doc = "Field `LENGTH` writer - Packet length configuration"] -pub type LENGTH_W<'a, const O: u8> = crate::BitWriter<'a, u32, MODE_SPEC, LENGTH_A, O>; -impl<'a, const O: u8> LENGTH_W<'a, O> { - #[doc = "Default length. Effective length of LENGTH field is 5-bit"] - #[inline(always)] - pub fn default(self) -> &'a mut W { - self.variant(LENGTH_A::DEFAULT) - } - #[doc = "Extended length. Effective length of LENGTH field is 8-bit"] - #[inline(always)] - pub fn extended(self) -> &'a mut W { - self.variant(LENGTH_A::EXTENDED) - } -} -impl R { - #[doc = "Bit 0 - The mode of operation to be used"] - #[inline(always)] - pub fn mode(&self) -> MODE_R { - MODE_R::new((self.bits & 1) != 0) - } - #[doc = "Bit 16 - Data rate that the CCM shall run in synch with"] - #[inline(always)] - pub fn datarate(&self) -> DATARATE_R { - DATARATE_R::new(((self.bits >> 16) & 1) != 0) - } - #[doc = "Bit 24 - Packet length configuration"] - #[inline(always)] - pub fn length(&self) -> LENGTH_R { - LENGTH_R::new(((self.bits >> 24) & 1) != 0) - } -} -impl W { - #[doc = "Bit 0 - The mode of operation to be used"] - #[inline(always)] - #[must_use] - pub fn mode(&mut self) -> MODE_W<0> { - MODE_W::new(self) - } - #[doc = "Bit 16 - Data rate that the CCM shall run in synch with"] - #[inline(always)] - #[must_use] - pub fn datarate(&mut self) -> DATARATE_W<16> { - DATARATE_W::new(self) - } - #[doc = "Bit 24 - Packet length configuration"] - #[inline(always)] - #[must_use] - pub fn length(&mut self) -> LENGTH_W<24> { - LENGTH_W::new(self) - } - #[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 = "Operation mode\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 [mode](index.html) module"] -pub struct MODE_SPEC; -impl crate::RegisterSpec for MODE_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [mode::R](R) reader structure"] -impl crate::Readable for MODE_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [mode::W](W) writer structure"] -impl crate::Writable for 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 MODE to value 0x01"] -impl crate::Resettable for MODE_SPEC { - const RESET_VALUE: Self::Ux = 0x01; -} diff --git a/down-the-stack/dk_pac/src/ccm/outptr.rs b/down-the-stack/dk_pac/src/ccm/outptr.rs deleted file mode 100644 index ec47115..0000000 --- a/down-the-stack/dk_pac/src/ccm/outptr.rs +++ /dev/null @@ -1,80 +0,0 @@ -#[doc = "Register `OUTPTR` 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 `OUTPTR` 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 `OUTPTR` reader - Output pointer"] -pub type OUTPTR_R = crate::FieldReader; -#[doc = "Field `OUTPTR` writer - Output pointer"] -pub type OUTPTR_W<'a, const O: u8> = crate::FieldWriter<'a, u32, OUTPTR_SPEC, u32, u32, 32, O>; -impl R { - #[doc = "Bits 0:31 - Output pointer"] - #[inline(always)] - pub fn outptr(&self) -> OUTPTR_R { - OUTPTR_R::new(self.bits) - } -} -impl W { - #[doc = "Bits 0:31 - Output pointer"] - #[inline(always)] - #[must_use] - pub fn outptr(&mut self) -> OUTPTR_W<0> { - OUTPTR_W::new(self) - } - #[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 = "Output pointer\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 [outptr](index.html) module"] -pub struct OUTPTR_SPEC; -impl crate::RegisterSpec for OUTPTR_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [outptr::R](R) reader structure"] -impl crate::Readable for OUTPTR_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [outptr::W](W) writer structure"] -impl crate::Writable for OUTPTR_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets OUTPTR to value 0"] -impl crate::Resettable for OUTPTR_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/ccm/scratchptr.rs b/down-the-stack/dk_pac/src/ccm/scratchptr.rs deleted file mode 100644 index c0df6e5..0000000 --- a/down-the-stack/dk_pac/src/ccm/scratchptr.rs +++ /dev/null @@ -1,81 +0,0 @@ -#[doc = "Register `SCRATCHPTR` 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 `SCRATCHPTR` 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 `SCRATCHPTR` reader - Pointer to a scratch data area used for temporary storage during key-stream generation, MIC generation and encryption/decryption."] -pub type SCRATCHPTR_R = crate::FieldReader; -#[doc = "Field `SCRATCHPTR` writer - Pointer to a scratch data area used for temporary storage during key-stream generation, MIC generation and encryption/decryption."] -pub type SCRATCHPTR_W<'a, const O: u8> = - crate::FieldWriter<'a, u32, SCRATCHPTR_SPEC, u32, u32, 32, O>; -impl R { - #[doc = "Bits 0:31 - Pointer to a scratch data area used for temporary storage during key-stream generation, MIC generation and encryption/decryption."] - #[inline(always)] - pub fn scratchptr(&self) -> SCRATCHPTR_R { - SCRATCHPTR_R::new(self.bits) - } -} -impl W { - #[doc = "Bits 0:31 - Pointer to a scratch data area used for temporary storage during key-stream generation, MIC generation and encryption/decryption."] - #[inline(always)] - #[must_use] - pub fn scratchptr(&mut self) -> SCRATCHPTR_W<0> { - SCRATCHPTR_W::new(self) - } - #[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 = "Pointer to data area used for temporary storage\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 [scratchptr](index.html) module"] -pub struct SCRATCHPTR_SPEC; -impl crate::RegisterSpec for SCRATCHPTR_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [scratchptr::R](R) reader structure"] -impl crate::Readable for SCRATCHPTR_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [scratchptr::W](W) writer structure"] -impl crate::Writable for SCRATCHPTR_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets SCRATCHPTR to value 0"] -impl crate::Resettable for SCRATCHPTR_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/ccm/shorts.rs b/down-the-stack/dk_pac/src/ccm/shorts.rs deleted file mode 100644 index 062d69c..0000000 --- a/down-the-stack/dk_pac/src/ccm/shorts.rs +++ /dev/null @@ -1,127 +0,0 @@ -#[doc = "Register `SHORTS` 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 `SHORTS` 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 `ENDKSGEN_CRYPT` reader - Shortcut between event ENDKSGEN and task CRYPT"] -pub type ENDKSGEN_CRYPT_R = crate::BitReader; -#[doc = "Shortcut between event ENDKSGEN and task CRYPT\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum ENDKSGEN_CRYPT_A { - #[doc = "0: Disable shortcut"] - DISABLED = 0, - #[doc = "1: Enable shortcut"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: ENDKSGEN_CRYPT_A) -> Self { - variant as u8 != 0 - } -} -impl ENDKSGEN_CRYPT_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> ENDKSGEN_CRYPT_A { - match self.bits { - false => ENDKSGEN_CRYPT_A::DISABLED, - true => ENDKSGEN_CRYPT_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == ENDKSGEN_CRYPT_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == ENDKSGEN_CRYPT_A::ENABLED - } -} -#[doc = "Field `ENDKSGEN_CRYPT` writer - Shortcut between event ENDKSGEN and task CRYPT"] -pub type ENDKSGEN_CRYPT_W<'a, const O: u8> = - crate::BitWriter<'a, u32, SHORTS_SPEC, ENDKSGEN_CRYPT_A, O>; -impl<'a, const O: u8> ENDKSGEN_CRYPT_W<'a, O> { - #[doc = "Disable shortcut"] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(ENDKSGEN_CRYPT_A::DISABLED) - } - #[doc = "Enable shortcut"] - #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(ENDKSGEN_CRYPT_A::ENABLED) - } -} -impl R { - #[doc = "Bit 0 - Shortcut between event ENDKSGEN and task CRYPT"] - #[inline(always)] - pub fn endksgen_crypt(&self) -> ENDKSGEN_CRYPT_R { - ENDKSGEN_CRYPT_R::new((self.bits & 1) != 0) - } -} -impl W { - #[doc = "Bit 0 - Shortcut between event ENDKSGEN and task CRYPT"] - #[inline(always)] - #[must_use] - pub fn endksgen_crypt(&mut self) -> ENDKSGEN_CRYPT_W<0> { - ENDKSGEN_CRYPT_W::new(self) - } - #[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 = "Shortcuts between local events and tasks\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 [shorts](index.html) module"] -pub struct SHORTS_SPEC; -impl crate::RegisterSpec for SHORTS_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [shorts::R](R) reader structure"] -impl crate::Readable for SHORTS_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [shorts::W](W) writer structure"] -impl crate::Writable for SHORTS_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets SHORTS to value 0"] -impl crate::Resettable for SHORTS_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/ccm/tasks_crypt.rs b/down-the-stack/dk_pac/src/ccm/tasks_crypt.rs deleted file mode 100644 index 1cd9e97..0000000 --- a/down-the-stack/dk_pac/src/ccm/tasks_crypt.rs +++ /dev/null @@ -1,72 +0,0 @@ -#[doc = "Register `TASKS_CRYPT` 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 = "Start encryption/decryption. This operation will stop by itself when completed.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum TASKS_CRYPT_AW { - #[doc = "1: Trigger task"] - TRIGGER = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: TASKS_CRYPT_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `TASKS_CRYPT` writer - Start encryption/decryption. This operation will stop by itself when completed."] -pub type TASKS_CRYPT_W<'a, const O: u8> = - crate::BitWriter<'a, u32, TASKS_CRYPT_SPEC, TASKS_CRYPT_AW, O>; -impl<'a, const O: u8> TASKS_CRYPT_W<'a, O> { - #[doc = "Trigger task"] - #[inline(always)] - pub fn trigger(self) -> &'a mut W { - self.variant(TASKS_CRYPT_AW::TRIGGER) - } -} -impl W { - #[doc = "Bit 0 - Start encryption/decryption. This operation will stop by itself when completed."] - #[inline(always)] - #[must_use] - pub fn tasks_crypt(&mut self) -> TASKS_CRYPT_W<0> { - TASKS_CRYPT_W::new(self) - } - #[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 = "Start encryption/decryption. This operation will stop by itself when completed.\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 [tasks_crypt](index.html) module"] -pub struct TASKS_CRYPT_SPEC; -impl crate::RegisterSpec for TASKS_CRYPT_SPEC { - type Ux = u32; -} -#[doc = "`write(|w| ..)` method takes [tasks_crypt::W](W) writer structure"] -impl crate::Writable for TASKS_CRYPT_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets TASKS_CRYPT to value 0"] -impl crate::Resettable for TASKS_CRYPT_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/ccm/tasks_ksgen.rs b/down-the-stack/dk_pac/src/ccm/tasks_ksgen.rs deleted file mode 100644 index eedcdb9..0000000 --- a/down-the-stack/dk_pac/src/ccm/tasks_ksgen.rs +++ /dev/null @@ -1,72 +0,0 @@ -#[doc = "Register `TASKS_KSGEN` 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 = "Start generation of key-stream. This operation will stop by itself when completed.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum TASKS_KSGEN_AW { - #[doc = "1: Trigger task"] - TRIGGER = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: TASKS_KSGEN_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `TASKS_KSGEN` writer - Start generation of key-stream. This operation will stop by itself when completed."] -pub type TASKS_KSGEN_W<'a, const O: u8> = - crate::BitWriter<'a, u32, TASKS_KSGEN_SPEC, TASKS_KSGEN_AW, O>; -impl<'a, const O: u8> TASKS_KSGEN_W<'a, O> { - #[doc = "Trigger task"] - #[inline(always)] - pub fn trigger(self) -> &'a mut W { - self.variant(TASKS_KSGEN_AW::TRIGGER) - } -} -impl W { - #[doc = "Bit 0 - Start generation of key-stream. This operation will stop by itself when completed."] - #[inline(always)] - #[must_use] - pub fn tasks_ksgen(&mut self) -> TASKS_KSGEN_W<0> { - TASKS_KSGEN_W::new(self) - } - #[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 = "Start generation of key-stream. This operation will stop by itself when completed.\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 [tasks_ksgen](index.html) module"] -pub struct TASKS_KSGEN_SPEC; -impl crate::RegisterSpec for TASKS_KSGEN_SPEC { - type Ux = u32; -} -#[doc = "`write(|w| ..)` method takes [tasks_ksgen::W](W) writer structure"] -impl crate::Writable for TASKS_KSGEN_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets TASKS_KSGEN to value 0"] -impl crate::Resettable for TASKS_KSGEN_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/ccm/tasks_stop.rs b/down-the-stack/dk_pac/src/ccm/tasks_stop.rs deleted file mode 100644 index e29cb52..0000000 --- a/down-the-stack/dk_pac/src/ccm/tasks_stop.rs +++ /dev/null @@ -1,72 +0,0 @@ -#[doc = "Register `TASKS_STOP` 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 = "Stop encryption/decryption\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum TASKS_STOP_AW { - #[doc = "1: Trigger task"] - TRIGGER = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: TASKS_STOP_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `TASKS_STOP` writer - Stop encryption/decryption"] -pub type TASKS_STOP_W<'a, const O: u8> = - crate::BitWriter<'a, u32, TASKS_STOP_SPEC, TASKS_STOP_AW, O>; -impl<'a, const O: u8> TASKS_STOP_W<'a, O> { - #[doc = "Trigger task"] - #[inline(always)] - pub fn trigger(self) -> &'a mut W { - self.variant(TASKS_STOP_AW::TRIGGER) - } -} -impl W { - #[doc = "Bit 0 - Stop encryption/decryption"] - #[inline(always)] - #[must_use] - pub fn tasks_stop(&mut self) -> TASKS_STOP_W<0> { - TASKS_STOP_W::new(self) - } - #[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 = "Stop encryption/decryption\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 [tasks_stop](index.html) module"] -pub struct TASKS_STOP_SPEC; -impl crate::RegisterSpec for TASKS_STOP_SPEC { - type Ux = u32; -} -#[doc = "`write(|w| ..)` method takes [tasks_stop::W](W) writer structure"] -impl crate::Writable for TASKS_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 TASKS_STOP to value 0"] -impl crate::Resettable for TASKS_STOP_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/clock.rs b/down-the-stack/dk_pac/src/clock.rs deleted file mode 100644 index 38404f0..0000000 --- a/down-the-stack/dk_pac/src/clock.rs +++ /dev/null @@ -1,138 +0,0 @@ -#[doc = r"Register block"] -#[repr(C)] -pub struct RegisterBlock { - #[doc = "0x00 - Start HFCLK crystal oscillator"] - pub tasks_hfclkstart: TASKS_HFCLKSTART, - #[doc = "0x04 - Stop HFCLK crystal oscillator"] - pub tasks_hfclkstop: TASKS_HFCLKSTOP, - #[doc = "0x08 - Start LFCLK source"] - pub tasks_lfclkstart: TASKS_LFCLKSTART, - #[doc = "0x0c - Stop LFCLK source"] - pub tasks_lfclkstop: TASKS_LFCLKSTOP, - #[doc = "0x10 - Start calibration of LFRC oscillator"] - pub tasks_cal: TASKS_CAL, - #[doc = "0x14 - Start calibration timer"] - pub tasks_ctstart: TASKS_CTSTART, - #[doc = "0x18 - Stop calibration timer"] - pub tasks_ctstop: TASKS_CTSTOP, - _reserved7: [u8; 0xe4], - #[doc = "0x100 - HFCLK oscillator started"] - pub events_hfclkstarted: EVENTS_HFCLKSTARTED, - #[doc = "0x104 - LFCLK started"] - pub events_lfclkstarted: EVENTS_LFCLKSTARTED, - _reserved9: [u8; 0x04], - #[doc = "0x10c - Calibration of LFCLK RC oscillator complete event"] - pub events_done: EVENTS_DONE, - #[doc = "0x110 - Calibration timer timeout"] - pub events_ctto: EVENTS_CTTO, - _reserved11: [u8; 0x01f0], - #[doc = "0x304 - Enable interrupt"] - pub intenset: INTENSET, - #[doc = "0x308 - Disable interrupt"] - pub intenclr: INTENCLR, - _reserved13: [u8; 0xfc], - #[doc = "0x408 - Status indicating that HFCLKSTART task has been triggered"] - pub hfclkrun: HFCLKRUN, - #[doc = "0x40c - HFCLK status"] - pub hfclkstat: HFCLKSTAT, - _reserved15: [u8; 0x04], - #[doc = "0x414 - Status indicating that LFCLKSTART task has been triggered"] - pub lfclkrun: LFCLKRUN, - #[doc = "0x418 - LFCLK status"] - pub lfclkstat: LFCLKSTAT, - #[doc = "0x41c - Copy of LFCLKSRC register, set when LFCLKSTART task was triggered"] - pub lfclksrccopy: LFCLKSRCCOPY, - _reserved18: [u8; 0xf8], - #[doc = "0x518 - Clock source for the LFCLK"] - pub lfclksrc: LFCLKSRC, - _reserved19: [u8; 0x1c], - #[doc = "0x538 - Calibration timer interval"] - pub ctiv: CTIV, - _reserved20: [u8; 0x20], - #[doc = "0x55c - Clocking options for the Trace Port debug interface"] - pub traceconfig: TRACECONFIG, -} -#[doc = "TASKS_HFCLKSTART (w) register accessor: an alias for `Reg`"] -pub type TASKS_HFCLKSTART = crate::Reg; -#[doc = "Start HFCLK crystal oscillator"] -pub mod tasks_hfclkstart; -#[doc = "TASKS_HFCLKSTOP (w) register accessor: an alias for `Reg`"] -pub type TASKS_HFCLKSTOP = crate::Reg; -#[doc = "Stop HFCLK crystal oscillator"] -pub mod tasks_hfclkstop; -#[doc = "TASKS_LFCLKSTART (w) register accessor: an alias for `Reg`"] -pub type TASKS_LFCLKSTART = crate::Reg; -#[doc = "Start LFCLK source"] -pub mod tasks_lfclkstart; -#[doc = "TASKS_LFCLKSTOP (w) register accessor: an alias for `Reg`"] -pub type TASKS_LFCLKSTOP = crate::Reg; -#[doc = "Stop LFCLK source"] -pub mod tasks_lfclkstop; -#[doc = "TASKS_CAL (w) register accessor: an alias for `Reg`"] -pub type TASKS_CAL = crate::Reg; -#[doc = "Start calibration of LFRC oscillator"] -pub mod tasks_cal; -#[doc = "TASKS_CTSTART (w) register accessor: an alias for `Reg`"] -pub type TASKS_CTSTART = crate::Reg; -#[doc = "Start calibration timer"] -pub mod tasks_ctstart; -#[doc = "TASKS_CTSTOP (w) register accessor: an alias for `Reg`"] -pub type TASKS_CTSTOP = crate::Reg; -#[doc = "Stop calibration timer"] -pub mod tasks_ctstop; -#[doc = "EVENTS_HFCLKSTARTED (rw) register accessor: an alias for `Reg`"] -pub type EVENTS_HFCLKSTARTED = crate::Reg; -#[doc = "HFCLK oscillator started"] -pub mod events_hfclkstarted; -#[doc = "EVENTS_LFCLKSTARTED (rw) register accessor: an alias for `Reg`"] -pub type EVENTS_LFCLKSTARTED = crate::Reg; -#[doc = "LFCLK started"] -pub mod events_lfclkstarted; -#[doc = "EVENTS_DONE (rw) register accessor: an alias for `Reg`"] -pub type EVENTS_DONE = crate::Reg; -#[doc = "Calibration of LFCLK RC oscillator complete event"] -pub mod events_done; -#[doc = "EVENTS_CTTO (rw) register accessor: an alias for `Reg`"] -pub type EVENTS_CTTO = crate::Reg; -#[doc = "Calibration timer timeout"] -pub mod events_ctto; -#[doc = "INTENSET (rw) register accessor: an alias for `Reg`"] -pub type INTENSET = crate::Reg; -#[doc = "Enable interrupt"] -pub mod intenset; -#[doc = "INTENCLR (rw) register accessor: an alias for `Reg`"] -pub type INTENCLR = crate::Reg; -#[doc = "Disable interrupt"] -pub mod intenclr; -#[doc = "HFCLKRUN (r) register accessor: an alias for `Reg`"] -pub type HFCLKRUN = crate::Reg; -#[doc = "Status indicating that HFCLKSTART task has been triggered"] -pub mod hfclkrun; -#[doc = "HFCLKSTAT (r) register accessor: an alias for `Reg`"] -pub type HFCLKSTAT = crate::Reg; -#[doc = "HFCLK status"] -pub mod hfclkstat; -#[doc = "LFCLKRUN (r) register accessor: an alias for `Reg`"] -pub type LFCLKRUN = crate::Reg; -#[doc = "Status indicating that LFCLKSTART task has been triggered"] -pub mod lfclkrun; -#[doc = "LFCLKSTAT (r) register accessor: an alias for `Reg`"] -pub type LFCLKSTAT = crate::Reg; -#[doc = "LFCLK status"] -pub mod lfclkstat; -#[doc = "LFCLKSRCCOPY (r) register accessor: an alias for `Reg`"] -pub type LFCLKSRCCOPY = crate::Reg; -#[doc = "Copy of LFCLKSRC register, set when LFCLKSTART task was triggered"] -pub mod lfclksrccopy; -#[doc = "LFCLKSRC (rw) register accessor: an alias for `Reg`"] -pub type LFCLKSRC = crate::Reg; -#[doc = "Clock source for the LFCLK"] -pub mod lfclksrc; -#[doc = "CTIV (rw) register accessor: an alias for `Reg`"] -pub type CTIV = crate::Reg; -#[doc = "Calibration timer interval"] -pub mod ctiv; -#[doc = "TRACECONFIG (rw) register accessor: an alias for `Reg`"] -pub type TRACECONFIG = crate::Reg; -#[doc = "Clocking options for the Trace Port debug interface"] -pub mod traceconfig; diff --git a/down-the-stack/dk_pac/src/clock/ctiv.rs b/down-the-stack/dk_pac/src/clock/ctiv.rs deleted file mode 100644 index f9bd1b5..0000000 --- a/down-the-stack/dk_pac/src/clock/ctiv.rs +++ /dev/null @@ -1,80 +0,0 @@ -#[doc = "Register `CTIV` 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 `CTIV` 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 `CTIV` reader - Calibration timer interval in multiple of 0.25 seconds. Range: 0.25 seconds to 31.75 seconds."] -pub type CTIV_R = crate::FieldReader; -#[doc = "Field `CTIV` writer - Calibration timer interval in multiple of 0.25 seconds. Range: 0.25 seconds to 31.75 seconds."] -pub type CTIV_W<'a, const O: u8> = crate::FieldWriter<'a, u32, CTIV_SPEC, u8, u8, 7, O>; -impl R { - #[doc = "Bits 0:6 - Calibration timer interval in multiple of 0.25 seconds. Range: 0.25 seconds to 31.75 seconds."] - #[inline(always)] - pub fn ctiv(&self) -> CTIV_R { - CTIV_R::new((self.bits & 0x7f) as u8) - } -} -impl W { - #[doc = "Bits 0:6 - Calibration timer interval in multiple of 0.25 seconds. Range: 0.25 seconds to 31.75 seconds."] - #[inline(always)] - #[must_use] - pub fn ctiv(&mut self) -> CTIV_W<0> { - CTIV_W::new(self) - } - #[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 = "Calibration timer interval\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 [ctiv](index.html) module"] -pub struct CTIV_SPEC; -impl crate::RegisterSpec for CTIV_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [ctiv::R](R) reader structure"] -impl crate::Readable for CTIV_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [ctiv::W](W) writer structure"] -impl crate::Writable for CTIV_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets CTIV to value 0"] -impl crate::Resettable for CTIV_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/clock/events_ctto.rs b/down-the-stack/dk_pac/src/clock/events_ctto.rs deleted file mode 100644 index c805b3e..0000000 --- a/down-the-stack/dk_pac/src/clock/events_ctto.rs +++ /dev/null @@ -1,127 +0,0 @@ -#[doc = "Register `EVENTS_CTTO` 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 `EVENTS_CTTO` 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 `EVENTS_CTTO` reader - Calibration timer timeout"] -pub type EVENTS_CTTO_R = crate::BitReader; -#[doc = "Calibration timer timeout\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum EVENTS_CTTO_A { - #[doc = "0: Event not generated"] - NOT_GENERATED = 0, - #[doc = "1: Event generated"] - GENERATED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: EVENTS_CTTO_A) -> Self { - variant as u8 != 0 - } -} -impl EVENTS_CTTO_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> EVENTS_CTTO_A { - match self.bits { - false => EVENTS_CTTO_A::NOT_GENERATED, - true => EVENTS_CTTO_A::GENERATED, - } - } - #[doc = "Checks if the value of the field is `NOT_GENERATED`"] - #[inline(always)] - pub fn is_not_generated(&self) -> bool { - *self == EVENTS_CTTO_A::NOT_GENERATED - } - #[doc = "Checks if the value of the field is `GENERATED`"] - #[inline(always)] - pub fn is_generated(&self) -> bool { - *self == EVENTS_CTTO_A::GENERATED - } -} -#[doc = "Field `EVENTS_CTTO` writer - Calibration timer timeout"] -pub type EVENTS_CTTO_W<'a, const O: u8> = - crate::BitWriter<'a, u32, EVENTS_CTTO_SPEC, EVENTS_CTTO_A, O>; -impl<'a, const O: u8> EVENTS_CTTO_W<'a, O> { - #[doc = "Event not generated"] - #[inline(always)] - pub fn not_generated(self) -> &'a mut W { - self.variant(EVENTS_CTTO_A::NOT_GENERATED) - } - #[doc = "Event generated"] - #[inline(always)] - pub fn generated(self) -> &'a mut W { - self.variant(EVENTS_CTTO_A::GENERATED) - } -} -impl R { - #[doc = "Bit 0 - Calibration timer timeout"] - #[inline(always)] - pub fn events_ctto(&self) -> EVENTS_CTTO_R { - EVENTS_CTTO_R::new((self.bits & 1) != 0) - } -} -impl W { - #[doc = "Bit 0 - Calibration timer timeout"] - #[inline(always)] - #[must_use] - pub fn events_ctto(&mut self) -> EVENTS_CTTO_W<0> { - EVENTS_CTTO_W::new(self) - } - #[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 = "Calibration timer timeout\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 [events_ctto](index.html) module"] -pub struct EVENTS_CTTO_SPEC; -impl crate::RegisterSpec for EVENTS_CTTO_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [events_ctto::R](R) reader structure"] -impl crate::Readable for EVENTS_CTTO_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [events_ctto::W](W) writer structure"] -impl crate::Writable for EVENTS_CTTO_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets EVENTS_CTTO to value 0"] -impl crate::Resettable for EVENTS_CTTO_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/clock/events_done.rs b/down-the-stack/dk_pac/src/clock/events_done.rs deleted file mode 100644 index f286ec7..0000000 --- a/down-the-stack/dk_pac/src/clock/events_done.rs +++ /dev/null @@ -1,127 +0,0 @@ -#[doc = "Register `EVENTS_DONE` 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 `EVENTS_DONE` 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 `EVENTS_DONE` reader - Calibration of LFCLK RC oscillator complete event"] -pub type EVENTS_DONE_R = crate::BitReader; -#[doc = "Calibration of LFCLK RC oscillator complete event\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum EVENTS_DONE_A { - #[doc = "0: Event not generated"] - NOT_GENERATED = 0, - #[doc = "1: Event generated"] - GENERATED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: EVENTS_DONE_A) -> Self { - variant as u8 != 0 - } -} -impl EVENTS_DONE_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> EVENTS_DONE_A { - match self.bits { - false => EVENTS_DONE_A::NOT_GENERATED, - true => EVENTS_DONE_A::GENERATED, - } - } - #[doc = "Checks if the value of the field is `NOT_GENERATED`"] - #[inline(always)] - pub fn is_not_generated(&self) -> bool { - *self == EVENTS_DONE_A::NOT_GENERATED - } - #[doc = "Checks if the value of the field is `GENERATED`"] - #[inline(always)] - pub fn is_generated(&self) -> bool { - *self == EVENTS_DONE_A::GENERATED - } -} -#[doc = "Field `EVENTS_DONE` writer - Calibration of LFCLK RC oscillator complete event"] -pub type EVENTS_DONE_W<'a, const O: u8> = - crate::BitWriter<'a, u32, EVENTS_DONE_SPEC, EVENTS_DONE_A, O>; -impl<'a, const O: u8> EVENTS_DONE_W<'a, O> { - #[doc = "Event not generated"] - #[inline(always)] - pub fn not_generated(self) -> &'a mut W { - self.variant(EVENTS_DONE_A::NOT_GENERATED) - } - #[doc = "Event generated"] - #[inline(always)] - pub fn generated(self) -> &'a mut W { - self.variant(EVENTS_DONE_A::GENERATED) - } -} -impl R { - #[doc = "Bit 0 - Calibration of LFCLK RC oscillator complete event"] - #[inline(always)] - pub fn events_done(&self) -> EVENTS_DONE_R { - EVENTS_DONE_R::new((self.bits & 1) != 0) - } -} -impl W { - #[doc = "Bit 0 - Calibration of LFCLK RC oscillator complete event"] - #[inline(always)] - #[must_use] - pub fn events_done(&mut self) -> EVENTS_DONE_W<0> { - EVENTS_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 - } -} -#[doc = "Calibration of LFCLK RC oscillator complete event\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 [events_done](index.html) module"] -pub struct EVENTS_DONE_SPEC; -impl crate::RegisterSpec for EVENTS_DONE_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [events_done::R](R) reader structure"] -impl crate::Readable for EVENTS_DONE_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [events_done::W](W) writer structure"] -impl crate::Writable for EVENTS_DONE_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets EVENTS_DONE to value 0"] -impl crate::Resettable for EVENTS_DONE_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/clock/events_hfclkstarted.rs b/down-the-stack/dk_pac/src/clock/events_hfclkstarted.rs deleted file mode 100644 index 069c086..0000000 --- a/down-the-stack/dk_pac/src/clock/events_hfclkstarted.rs +++ /dev/null @@ -1,127 +0,0 @@ -#[doc = "Register `EVENTS_HFCLKSTARTED` 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 `EVENTS_HFCLKSTARTED` 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 `EVENTS_HFCLKSTARTED` reader - HFCLK oscillator started"] -pub type EVENTS_HFCLKSTARTED_R = crate::BitReader; -#[doc = "HFCLK oscillator started\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum EVENTS_HFCLKSTARTED_A { - #[doc = "0: Event not generated"] - NOT_GENERATED = 0, - #[doc = "1: Event generated"] - GENERATED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: EVENTS_HFCLKSTARTED_A) -> Self { - variant as u8 != 0 - } -} -impl EVENTS_HFCLKSTARTED_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> EVENTS_HFCLKSTARTED_A { - match self.bits { - false => EVENTS_HFCLKSTARTED_A::NOT_GENERATED, - true => EVENTS_HFCLKSTARTED_A::GENERATED, - } - } - #[doc = "Checks if the value of the field is `NOT_GENERATED`"] - #[inline(always)] - pub fn is_not_generated(&self) -> bool { - *self == EVENTS_HFCLKSTARTED_A::NOT_GENERATED - } - #[doc = "Checks if the value of the field is `GENERATED`"] - #[inline(always)] - pub fn is_generated(&self) -> bool { - *self == EVENTS_HFCLKSTARTED_A::GENERATED - } -} -#[doc = "Field `EVENTS_HFCLKSTARTED` writer - HFCLK oscillator started"] -pub type EVENTS_HFCLKSTARTED_W<'a, const O: u8> = - crate::BitWriter<'a, u32, EVENTS_HFCLKSTARTED_SPEC, EVENTS_HFCLKSTARTED_A, O>; -impl<'a, const O: u8> EVENTS_HFCLKSTARTED_W<'a, O> { - #[doc = "Event not generated"] - #[inline(always)] - pub fn not_generated(self) -> &'a mut W { - self.variant(EVENTS_HFCLKSTARTED_A::NOT_GENERATED) - } - #[doc = "Event generated"] - #[inline(always)] - pub fn generated(self) -> &'a mut W { - self.variant(EVENTS_HFCLKSTARTED_A::GENERATED) - } -} -impl R { - #[doc = "Bit 0 - HFCLK oscillator started"] - #[inline(always)] - pub fn events_hfclkstarted(&self) -> EVENTS_HFCLKSTARTED_R { - EVENTS_HFCLKSTARTED_R::new((self.bits & 1) != 0) - } -} -impl W { - #[doc = "Bit 0 - HFCLK oscillator started"] - #[inline(always)] - #[must_use] - pub fn events_hfclkstarted(&mut self) -> EVENTS_HFCLKSTARTED_W<0> { - EVENTS_HFCLKSTARTED_W::new(self) - } - #[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 = "HFCLK oscillator started\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 [events_hfclkstarted](index.html) module"] -pub struct EVENTS_HFCLKSTARTED_SPEC; -impl crate::RegisterSpec for EVENTS_HFCLKSTARTED_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [events_hfclkstarted::R](R) reader structure"] -impl crate::Readable for EVENTS_HFCLKSTARTED_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [events_hfclkstarted::W](W) writer structure"] -impl crate::Writable for EVENTS_HFCLKSTARTED_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets EVENTS_HFCLKSTARTED to value 0"] -impl crate::Resettable for EVENTS_HFCLKSTARTED_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/clock/events_lfclkstarted.rs b/down-the-stack/dk_pac/src/clock/events_lfclkstarted.rs deleted file mode 100644 index 61274d2..0000000 --- a/down-the-stack/dk_pac/src/clock/events_lfclkstarted.rs +++ /dev/null @@ -1,127 +0,0 @@ -#[doc = "Register `EVENTS_LFCLKSTARTED` 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 `EVENTS_LFCLKSTARTED` 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 `EVENTS_LFCLKSTARTED` reader - LFCLK started"] -pub type EVENTS_LFCLKSTARTED_R = crate::BitReader; -#[doc = "LFCLK started\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum EVENTS_LFCLKSTARTED_A { - #[doc = "0: Event not generated"] - NOT_GENERATED = 0, - #[doc = "1: Event generated"] - GENERATED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: EVENTS_LFCLKSTARTED_A) -> Self { - variant as u8 != 0 - } -} -impl EVENTS_LFCLKSTARTED_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> EVENTS_LFCLKSTARTED_A { - match self.bits { - false => EVENTS_LFCLKSTARTED_A::NOT_GENERATED, - true => EVENTS_LFCLKSTARTED_A::GENERATED, - } - } - #[doc = "Checks if the value of the field is `NOT_GENERATED`"] - #[inline(always)] - pub fn is_not_generated(&self) -> bool { - *self == EVENTS_LFCLKSTARTED_A::NOT_GENERATED - } - #[doc = "Checks if the value of the field is `GENERATED`"] - #[inline(always)] - pub fn is_generated(&self) -> bool { - *self == EVENTS_LFCLKSTARTED_A::GENERATED - } -} -#[doc = "Field `EVENTS_LFCLKSTARTED` writer - LFCLK started"] -pub type EVENTS_LFCLKSTARTED_W<'a, const O: u8> = - crate::BitWriter<'a, u32, EVENTS_LFCLKSTARTED_SPEC, EVENTS_LFCLKSTARTED_A, O>; -impl<'a, const O: u8> EVENTS_LFCLKSTARTED_W<'a, O> { - #[doc = "Event not generated"] - #[inline(always)] - pub fn not_generated(self) -> &'a mut W { - self.variant(EVENTS_LFCLKSTARTED_A::NOT_GENERATED) - } - #[doc = "Event generated"] - #[inline(always)] - pub fn generated(self) -> &'a mut W { - self.variant(EVENTS_LFCLKSTARTED_A::GENERATED) - } -} -impl R { - #[doc = "Bit 0 - LFCLK started"] - #[inline(always)] - pub fn events_lfclkstarted(&self) -> EVENTS_LFCLKSTARTED_R { - EVENTS_LFCLKSTARTED_R::new((self.bits & 1) != 0) - } -} -impl W { - #[doc = "Bit 0 - LFCLK started"] - #[inline(always)] - #[must_use] - pub fn events_lfclkstarted(&mut self) -> EVENTS_LFCLKSTARTED_W<0> { - EVENTS_LFCLKSTARTED_W::new(self) - } - #[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 = "LFCLK started\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 [events_lfclkstarted](index.html) module"] -pub struct EVENTS_LFCLKSTARTED_SPEC; -impl crate::RegisterSpec for EVENTS_LFCLKSTARTED_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [events_lfclkstarted::R](R) reader structure"] -impl crate::Readable for EVENTS_LFCLKSTARTED_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [events_lfclkstarted::W](W) writer structure"] -impl crate::Writable for EVENTS_LFCLKSTARTED_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets EVENTS_LFCLKSTARTED to value 0"] -impl crate::Resettable for EVENTS_LFCLKSTARTED_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/clock/hfclkrun.rs b/down-the-stack/dk_pac/src/clock/hfclkrun.rs deleted file mode 100644 index 15c5c46..0000000 --- a/down-the-stack/dk_pac/src/clock/hfclkrun.rs +++ /dev/null @@ -1,71 +0,0 @@ -#[doc = "Register `HFCLKRUN` 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 = "Field `STATUS` reader - HFCLKSTART task triggered or not"] -pub type STATUS_R = crate::BitReader; -#[doc = "HFCLKSTART task triggered or not\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum STATUS_A { - #[doc = "0: Task not triggered"] - NOT_TRIGGERED = 0, - #[doc = "1: Task triggered"] - TRIGGERED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: STATUS_A) -> Self { - variant as u8 != 0 - } -} -impl STATUS_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> STATUS_A { - match self.bits { - false => STATUS_A::NOT_TRIGGERED, - true => STATUS_A::TRIGGERED, - } - } - #[doc = "Checks if the value of the field is `NOT_TRIGGERED`"] - #[inline(always)] - pub fn is_not_triggered(&self) -> bool { - *self == STATUS_A::NOT_TRIGGERED - } - #[doc = "Checks if the value of the field is `TRIGGERED`"] - #[inline(always)] - pub fn is_triggered(&self) -> bool { - *self == STATUS_A::TRIGGERED - } -} -impl R { - #[doc = "Bit 0 - HFCLKSTART task triggered or not"] - #[inline(always)] - pub fn status(&self) -> STATUS_R { - STATUS_R::new((self.bits & 1) != 0) - } -} -#[doc = "Status indicating that HFCLKSTART task has been triggered\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 [hfclkrun](index.html) module"] -pub struct HFCLKRUN_SPEC; -impl crate::RegisterSpec for HFCLKRUN_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [hfclkrun::R](R) reader structure"] -impl crate::Readable for HFCLKRUN_SPEC { - type Reader = R; -} -#[doc = "`reset()` method sets HFCLKRUN to value 0"] -impl crate::Resettable for HFCLKRUN_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/clock/hfclkstat.rs b/down-the-stack/dk_pac/src/clock/hfclkstat.rs deleted file mode 100644 index 0572092..0000000 --- a/down-the-stack/dk_pac/src/clock/hfclkstat.rs +++ /dev/null @@ -1,112 +0,0 @@ -#[doc = "Register `HFCLKSTAT` 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 = "Field `SRC` reader - Source of HFCLK"] -pub type SRC_R = crate::BitReader; -#[doc = "Source of HFCLK\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum SRC_A { - #[doc = "0: 64 MHz internal oscillator (HFINT)"] - RC = 0, - #[doc = "1: 64 MHz crystal oscillator (HFXO)"] - XTAL = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: SRC_A) -> Self { - variant as u8 != 0 - } -} -impl SRC_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> SRC_A { - match self.bits { - false => SRC_A::RC, - true => SRC_A::XTAL, - } - } - #[doc = "Checks if the value of the field is `RC`"] - #[inline(always)] - pub fn is_rc(&self) -> bool { - *self == SRC_A::RC - } - #[doc = "Checks if the value of the field is `XTAL`"] - #[inline(always)] - pub fn is_xtal(&self) -> bool { - *self == SRC_A::XTAL - } -} -#[doc = "Field `STATE` reader - HFCLK state"] -pub type STATE_R = crate::BitReader; -#[doc = "HFCLK state\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum STATE_A { - #[doc = "0: HFCLK not running"] - NOT_RUNNING = 0, - #[doc = "1: HFCLK running"] - RUNNING = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: STATE_A) -> Self { - variant as u8 != 0 - } -} -impl STATE_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> STATE_A { - match self.bits { - false => STATE_A::NOT_RUNNING, - true => STATE_A::RUNNING, - } - } - #[doc = "Checks if the value of the field is `NOT_RUNNING`"] - #[inline(always)] - pub fn is_not_running(&self) -> bool { - *self == STATE_A::NOT_RUNNING - } - #[doc = "Checks if the value of the field is `RUNNING`"] - #[inline(always)] - pub fn is_running(&self) -> bool { - *self == STATE_A::RUNNING - } -} -impl R { - #[doc = "Bit 0 - Source of HFCLK"] - #[inline(always)] - pub fn src(&self) -> SRC_R { - SRC_R::new((self.bits & 1) != 0) - } - #[doc = "Bit 16 - HFCLK state"] - #[inline(always)] - pub fn state(&self) -> STATE_R { - STATE_R::new(((self.bits >> 16) & 1) != 0) - } -} -#[doc = "HFCLK 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 [hfclkstat](index.html) module"] -pub struct HFCLKSTAT_SPEC; -impl crate::RegisterSpec for HFCLKSTAT_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [hfclkstat::R](R) reader structure"] -impl crate::Readable for HFCLKSTAT_SPEC { - type Reader = R; -} -#[doc = "`reset()` method sets HFCLKSTAT to value 0"] -impl crate::Resettable for HFCLKSTAT_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/clock/intenclr.rs b/down-the-stack/dk_pac/src/clock/intenclr.rs deleted file mode 100644 index 1d1e2f6..0000000 --- a/down-the-stack/dk_pac/src/clock/intenclr.rs +++ /dev/null @@ -1,339 +0,0 @@ -#[doc = "Register `INTENCLR` 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 `INTENCLR` 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 `HFCLKSTARTED` reader - Write '1' to disable interrupt for event HFCLKSTARTED"] -pub type HFCLKSTARTED_R = crate::BitReader; -#[doc = "Write '1' to disable interrupt for event HFCLKSTARTED\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum HFCLKSTARTED_A { - #[doc = "0: Read: Disabled"] - DISABLED = 0, - #[doc = "1: Read: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: HFCLKSTARTED_A) -> Self { - variant as u8 != 0 - } -} -impl HFCLKSTARTED_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> HFCLKSTARTED_A { - match self.bits { - false => HFCLKSTARTED_A::DISABLED, - true => HFCLKSTARTED_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == HFCLKSTARTED_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == HFCLKSTARTED_A::ENABLED - } -} -#[doc = "Write '1' to disable interrupt for event HFCLKSTARTED\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum HFCLKSTARTED_AW { - #[doc = "1: Disable"] - CLEAR = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: HFCLKSTARTED_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `HFCLKSTARTED` writer - Write '1' to disable interrupt for event HFCLKSTARTED"] -pub type HFCLKSTARTED_W<'a, const O: u8> = - crate::BitWriter<'a, u32, INTENCLR_SPEC, HFCLKSTARTED_AW, O>; -impl<'a, const O: u8> HFCLKSTARTED_W<'a, O> { - #[doc = "Disable"] - #[inline(always)] - pub fn clear(self) -> &'a mut W { - self.variant(HFCLKSTARTED_AW::CLEAR) - } -} -#[doc = "Field `LFCLKSTARTED` reader - Write '1' to disable interrupt for event LFCLKSTARTED"] -pub type LFCLKSTARTED_R = crate::BitReader; -#[doc = "Write '1' to disable interrupt for event LFCLKSTARTED\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum LFCLKSTARTED_A { - #[doc = "0: Read: Disabled"] - DISABLED = 0, - #[doc = "1: Read: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: LFCLKSTARTED_A) -> Self { - variant as u8 != 0 - } -} -impl LFCLKSTARTED_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> LFCLKSTARTED_A { - match self.bits { - false => LFCLKSTARTED_A::DISABLED, - true => LFCLKSTARTED_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == LFCLKSTARTED_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == LFCLKSTARTED_A::ENABLED - } -} -#[doc = "Write '1' to disable interrupt for event LFCLKSTARTED\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum LFCLKSTARTED_AW { - #[doc = "1: Disable"] - CLEAR = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: LFCLKSTARTED_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `LFCLKSTARTED` writer - Write '1' to disable interrupt for event LFCLKSTARTED"] -pub type LFCLKSTARTED_W<'a, const O: u8> = - crate::BitWriter<'a, u32, INTENCLR_SPEC, LFCLKSTARTED_AW, O>; -impl<'a, const O: u8> LFCLKSTARTED_W<'a, O> { - #[doc = "Disable"] - #[inline(always)] - pub fn clear(self) -> &'a mut W { - self.variant(LFCLKSTARTED_AW::CLEAR) - } -} -#[doc = "Field `DONE` reader - Write '1' to disable interrupt for event DONE"] -pub type DONE_R = crate::BitReader; -#[doc = "Write '1' to disable interrupt for event DONE\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum DONE_A { - #[doc = "0: Read: Disabled"] - DISABLED = 0, - #[doc = "1: Read: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: DONE_A) -> Self { - variant as u8 != 0 - } -} -impl DONE_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> DONE_A { - match self.bits { - false => DONE_A::DISABLED, - true => DONE_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == DONE_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == DONE_A::ENABLED - } -} -#[doc = "Write '1' to disable interrupt for event DONE\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum DONE_AW { - #[doc = "1: Disable"] - CLEAR = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: DONE_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `DONE` writer - Write '1' to disable interrupt for event DONE"] -pub type DONE_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENCLR_SPEC, DONE_AW, O>; -impl<'a, const O: u8> DONE_W<'a, O> { - #[doc = "Disable"] - #[inline(always)] - pub fn clear(self) -> &'a mut W { - self.variant(DONE_AW::CLEAR) - } -} -#[doc = "Field `CTTO` reader - Write '1' to disable interrupt for event CTTO"] -pub type CTTO_R = crate::BitReader; -#[doc = "Write '1' to disable interrupt for event CTTO\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum CTTO_A { - #[doc = "0: Read: Disabled"] - DISABLED = 0, - #[doc = "1: Read: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: CTTO_A) -> Self { - variant as u8 != 0 - } -} -impl CTTO_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> CTTO_A { - match self.bits { - false => CTTO_A::DISABLED, - true => CTTO_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == CTTO_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == CTTO_A::ENABLED - } -} -#[doc = "Write '1' to disable interrupt for event CTTO\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum CTTO_AW { - #[doc = "1: Disable"] - CLEAR = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: CTTO_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `CTTO` writer - Write '1' to disable interrupt for event CTTO"] -pub type CTTO_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENCLR_SPEC, CTTO_AW, O>; -impl<'a, const O: u8> CTTO_W<'a, O> { - #[doc = "Disable"] - #[inline(always)] - pub fn clear(self) -> &'a mut W { - self.variant(CTTO_AW::CLEAR) - } -} -impl R { - #[doc = "Bit 0 - Write '1' to disable interrupt for event HFCLKSTARTED"] - #[inline(always)] - pub fn hfclkstarted(&self) -> HFCLKSTARTED_R { - HFCLKSTARTED_R::new((self.bits & 1) != 0) - } - #[doc = "Bit 1 - Write '1' to disable interrupt for event LFCLKSTARTED"] - #[inline(always)] - pub fn lfclkstarted(&self) -> LFCLKSTARTED_R { - LFCLKSTARTED_R::new(((self.bits >> 1) & 1) != 0) - } - #[doc = "Bit 3 - Write '1' to disable interrupt for event DONE"] - #[inline(always)] - pub fn done(&self) -> DONE_R { - DONE_R::new(((self.bits >> 3) & 1) != 0) - } - #[doc = "Bit 4 - Write '1' to disable interrupt for event CTTO"] - #[inline(always)] - pub fn ctto(&self) -> CTTO_R { - CTTO_R::new(((self.bits >> 4) & 1) != 0) - } -} -impl W { - #[doc = "Bit 0 - Write '1' to disable interrupt for event HFCLKSTARTED"] - #[inline(always)] - #[must_use] - pub fn hfclkstarted(&mut self) -> HFCLKSTARTED_W<0> { - HFCLKSTARTED_W::new(self) - } - #[doc = "Bit 1 - Write '1' to disable interrupt for event LFCLKSTARTED"] - #[inline(always)] - #[must_use] - pub fn lfclkstarted(&mut self) -> LFCLKSTARTED_W<1> { - LFCLKSTARTED_W::new(self) - } - #[doc = "Bit 3 - Write '1' to disable interrupt for event DONE"] - #[inline(always)] - #[must_use] - pub fn done(&mut self) -> DONE_W<3> { - DONE_W::new(self) - } - #[doc = "Bit 4 - Write '1' to disable interrupt for event CTTO"] - #[inline(always)] - #[must_use] - pub fn ctto(&mut self) -> CTTO_W<4> { - CTTO_W::new(self) - } - #[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 = "Disable interrupt\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 [intenclr](index.html) module"] -pub struct INTENCLR_SPEC; -impl crate::RegisterSpec for INTENCLR_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [intenclr::R](R) reader structure"] -impl crate::Readable for INTENCLR_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [intenclr::W](W) writer structure"] -impl crate::Writable for INTENCLR_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets INTENCLR to value 0"] -impl crate::Resettable for INTENCLR_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/clock/intenset.rs b/down-the-stack/dk_pac/src/clock/intenset.rs deleted file mode 100644 index 10189c9..0000000 --- a/down-the-stack/dk_pac/src/clock/intenset.rs +++ /dev/null @@ -1,339 +0,0 @@ -#[doc = "Register `INTENSET` 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 `INTENSET` 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 `HFCLKSTARTED` reader - Write '1' to enable interrupt for event HFCLKSTARTED"] -pub type HFCLKSTARTED_R = crate::BitReader; -#[doc = "Write '1' to enable interrupt for event HFCLKSTARTED\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum HFCLKSTARTED_A { - #[doc = "0: Read: Disabled"] - DISABLED = 0, - #[doc = "1: Read: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: HFCLKSTARTED_A) -> Self { - variant as u8 != 0 - } -} -impl HFCLKSTARTED_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> HFCLKSTARTED_A { - match self.bits { - false => HFCLKSTARTED_A::DISABLED, - true => HFCLKSTARTED_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == HFCLKSTARTED_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == HFCLKSTARTED_A::ENABLED - } -} -#[doc = "Write '1' to enable interrupt for event HFCLKSTARTED\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum HFCLKSTARTED_AW { - #[doc = "1: Enable"] - SET = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: HFCLKSTARTED_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `HFCLKSTARTED` writer - Write '1' to enable interrupt for event HFCLKSTARTED"] -pub type HFCLKSTARTED_W<'a, const O: u8> = - crate::BitWriter<'a, u32, INTENSET_SPEC, HFCLKSTARTED_AW, O>; -impl<'a, const O: u8> HFCLKSTARTED_W<'a, O> { - #[doc = "Enable"] - #[inline(always)] - pub fn set(self) -> &'a mut W { - self.variant(HFCLKSTARTED_AW::SET) - } -} -#[doc = "Field `LFCLKSTARTED` reader - Write '1' to enable interrupt for event LFCLKSTARTED"] -pub type LFCLKSTARTED_R = crate::BitReader; -#[doc = "Write '1' to enable interrupt for event LFCLKSTARTED\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum LFCLKSTARTED_A { - #[doc = "0: Read: Disabled"] - DISABLED = 0, - #[doc = "1: Read: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: LFCLKSTARTED_A) -> Self { - variant as u8 != 0 - } -} -impl LFCLKSTARTED_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> LFCLKSTARTED_A { - match self.bits { - false => LFCLKSTARTED_A::DISABLED, - true => LFCLKSTARTED_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == LFCLKSTARTED_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == LFCLKSTARTED_A::ENABLED - } -} -#[doc = "Write '1' to enable interrupt for event LFCLKSTARTED\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum LFCLKSTARTED_AW { - #[doc = "1: Enable"] - SET = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: LFCLKSTARTED_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `LFCLKSTARTED` writer - Write '1' to enable interrupt for event LFCLKSTARTED"] -pub type LFCLKSTARTED_W<'a, const O: u8> = - crate::BitWriter<'a, u32, INTENSET_SPEC, LFCLKSTARTED_AW, O>; -impl<'a, const O: u8> LFCLKSTARTED_W<'a, O> { - #[doc = "Enable"] - #[inline(always)] - pub fn set(self) -> &'a mut W { - self.variant(LFCLKSTARTED_AW::SET) - } -} -#[doc = "Field `DONE` reader - Write '1' to enable interrupt for event DONE"] -pub type DONE_R = crate::BitReader; -#[doc = "Write '1' to enable interrupt for event DONE\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum DONE_A { - #[doc = "0: Read: Disabled"] - DISABLED = 0, - #[doc = "1: Read: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: DONE_A) -> Self { - variant as u8 != 0 - } -} -impl DONE_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> DONE_A { - match self.bits { - false => DONE_A::DISABLED, - true => DONE_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == DONE_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == DONE_A::ENABLED - } -} -#[doc = "Write '1' to enable interrupt for event DONE\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum DONE_AW { - #[doc = "1: Enable"] - SET = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: DONE_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `DONE` writer - Write '1' to enable interrupt for event DONE"] -pub type DONE_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENSET_SPEC, DONE_AW, O>; -impl<'a, const O: u8> DONE_W<'a, O> { - #[doc = "Enable"] - #[inline(always)] - pub fn set(self) -> &'a mut W { - self.variant(DONE_AW::SET) - } -} -#[doc = "Field `CTTO` reader - Write '1' to enable interrupt for event CTTO"] -pub type CTTO_R = crate::BitReader; -#[doc = "Write '1' to enable interrupt for event CTTO\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum CTTO_A { - #[doc = "0: Read: Disabled"] - DISABLED = 0, - #[doc = "1: Read: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: CTTO_A) -> Self { - variant as u8 != 0 - } -} -impl CTTO_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> CTTO_A { - match self.bits { - false => CTTO_A::DISABLED, - true => CTTO_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == CTTO_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == CTTO_A::ENABLED - } -} -#[doc = "Write '1' to enable interrupt for event CTTO\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum CTTO_AW { - #[doc = "1: Enable"] - SET = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: CTTO_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `CTTO` writer - Write '1' to enable interrupt for event CTTO"] -pub type CTTO_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENSET_SPEC, CTTO_AW, O>; -impl<'a, const O: u8> CTTO_W<'a, O> { - #[doc = "Enable"] - #[inline(always)] - pub fn set(self) -> &'a mut W { - self.variant(CTTO_AW::SET) - } -} -impl R { - #[doc = "Bit 0 - Write '1' to enable interrupt for event HFCLKSTARTED"] - #[inline(always)] - pub fn hfclkstarted(&self) -> HFCLKSTARTED_R { - HFCLKSTARTED_R::new((self.bits & 1) != 0) - } - #[doc = "Bit 1 - Write '1' to enable interrupt for event LFCLKSTARTED"] - #[inline(always)] - pub fn lfclkstarted(&self) -> LFCLKSTARTED_R { - LFCLKSTARTED_R::new(((self.bits >> 1) & 1) != 0) - } - #[doc = "Bit 3 - Write '1' to enable interrupt for event DONE"] - #[inline(always)] - pub fn done(&self) -> DONE_R { - DONE_R::new(((self.bits >> 3) & 1) != 0) - } - #[doc = "Bit 4 - Write '1' to enable interrupt for event CTTO"] - #[inline(always)] - pub fn ctto(&self) -> CTTO_R { - CTTO_R::new(((self.bits >> 4) & 1) != 0) - } -} -impl W { - #[doc = "Bit 0 - Write '1' to enable interrupt for event HFCLKSTARTED"] - #[inline(always)] - #[must_use] - pub fn hfclkstarted(&mut self) -> HFCLKSTARTED_W<0> { - HFCLKSTARTED_W::new(self) - } - #[doc = "Bit 1 - Write '1' to enable interrupt for event LFCLKSTARTED"] - #[inline(always)] - #[must_use] - pub fn lfclkstarted(&mut self) -> LFCLKSTARTED_W<1> { - LFCLKSTARTED_W::new(self) - } - #[doc = "Bit 3 - Write '1' to enable interrupt for event DONE"] - #[inline(always)] - #[must_use] - pub fn done(&mut self) -> DONE_W<3> { - DONE_W::new(self) - } - #[doc = "Bit 4 - Write '1' to enable interrupt for event CTTO"] - #[inline(always)] - #[must_use] - pub fn ctto(&mut self) -> CTTO_W<4> { - CTTO_W::new(self) - } - #[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 = "Enable interrupt\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 [intenset](index.html) module"] -pub struct INTENSET_SPEC; -impl crate::RegisterSpec for INTENSET_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [intenset::R](R) reader structure"] -impl crate::Readable for INTENSET_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [intenset::W](W) writer structure"] -impl crate::Writable for INTENSET_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets INTENSET to value 0"] -impl crate::Resettable for INTENSET_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/clock/lfclkrun.rs b/down-the-stack/dk_pac/src/clock/lfclkrun.rs deleted file mode 100644 index 0bdd484..0000000 --- a/down-the-stack/dk_pac/src/clock/lfclkrun.rs +++ /dev/null @@ -1,71 +0,0 @@ -#[doc = "Register `LFCLKRUN` 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 = "Field `STATUS` reader - LFCLKSTART task triggered or not"] -pub type STATUS_R = crate::BitReader; -#[doc = "LFCLKSTART task triggered or not\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum STATUS_A { - #[doc = "0: Task not triggered"] - NOT_TRIGGERED = 0, - #[doc = "1: Task triggered"] - TRIGGERED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: STATUS_A) -> Self { - variant as u8 != 0 - } -} -impl STATUS_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> STATUS_A { - match self.bits { - false => STATUS_A::NOT_TRIGGERED, - true => STATUS_A::TRIGGERED, - } - } - #[doc = "Checks if the value of the field is `NOT_TRIGGERED`"] - #[inline(always)] - pub fn is_not_triggered(&self) -> bool { - *self == STATUS_A::NOT_TRIGGERED - } - #[doc = "Checks if the value of the field is `TRIGGERED`"] - #[inline(always)] - pub fn is_triggered(&self) -> bool { - *self == STATUS_A::TRIGGERED - } -} -impl R { - #[doc = "Bit 0 - LFCLKSTART task triggered or not"] - #[inline(always)] - pub fn status(&self) -> STATUS_R { - STATUS_R::new((self.bits & 1) != 0) - } -} -#[doc = "Status indicating that LFCLKSTART task has been triggered\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 [lfclkrun](index.html) module"] -pub struct LFCLKRUN_SPEC; -impl crate::RegisterSpec for LFCLKRUN_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [lfclkrun::R](R) reader structure"] -impl crate::Readable for LFCLKRUN_SPEC { - type Reader = R; -} -#[doc = "`reset()` method sets LFCLKRUN to value 0"] -impl crate::Resettable for LFCLKRUN_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/clock/lfclksrc.rs b/down-the-stack/dk_pac/src/clock/lfclksrc.rs deleted file mode 100644 index ceeabda..0000000 --- a/down-the-stack/dk_pac/src/clock/lfclksrc.rs +++ /dev/null @@ -1,263 +0,0 @@ -#[doc = "Register `LFCLKSRC` 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 `LFCLKSRC` 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 `SRC` reader - Clock source"] -pub type SRC_R = crate::FieldReader; -#[doc = "Clock source\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -#[repr(u8)] -pub enum SRC_A { - #[doc = "0: 32.768 kHz RC oscillator"] - RC = 0, - #[doc = "1: 32.768 kHz crystal oscillator"] - XTAL = 1, - #[doc = "2: 32.768 kHz synthesized from HFCLK"] - SYNTH = 2, -} -impl From for u8 { - #[inline(always)] - fn from(variant: SRC_A) -> Self { - variant as _ - } -} -impl SRC_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> Option { - match self.bits { - 0 => Some(SRC_A::RC), - 1 => Some(SRC_A::XTAL), - 2 => Some(SRC_A::SYNTH), - _ => None, - } - } - #[doc = "Checks if the value of the field is `RC`"] - #[inline(always)] - pub fn is_rc(&self) -> bool { - *self == SRC_A::RC - } - #[doc = "Checks if the value of the field is `XTAL`"] - #[inline(always)] - pub fn is_xtal(&self) -> bool { - *self == SRC_A::XTAL - } - #[doc = "Checks if the value of the field is `SYNTH`"] - #[inline(always)] - pub fn is_synth(&self) -> bool { - *self == SRC_A::SYNTH - } -} -#[doc = "Field `SRC` writer - Clock source"] -pub type SRC_W<'a, const O: u8> = crate::FieldWriter<'a, u32, LFCLKSRC_SPEC, u8, SRC_A, 2, O>; -impl<'a, const O: u8> SRC_W<'a, O> { - #[doc = "32.768 kHz RC oscillator"] - #[inline(always)] - pub fn rc(self) -> &'a mut W { - self.variant(SRC_A::RC) - } - #[doc = "32.768 kHz crystal oscillator"] - #[inline(always)] - pub fn xtal(self) -> &'a mut W { - self.variant(SRC_A::XTAL) - } - #[doc = "32.768 kHz synthesized from HFCLK"] - #[inline(always)] - pub fn synth(self) -> &'a mut W { - self.variant(SRC_A::SYNTH) - } -} -#[doc = "Field `BYPASS` reader - Enable or disable bypass of LFCLK crystal oscillator with external clock source"] -pub type BYPASS_R = crate::BitReader; -#[doc = "Enable or disable bypass of LFCLK crystal oscillator with external clock source\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum BYPASS_A { - #[doc = "0: Disable (use with Xtal or low-swing external source)"] - DISABLED = 0, - #[doc = "1: Enable (use with rail-to-rail external source)"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: BYPASS_A) -> Self { - variant as u8 != 0 - } -} -impl BYPASS_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> BYPASS_A { - match self.bits { - false => BYPASS_A::DISABLED, - true => BYPASS_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == BYPASS_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == BYPASS_A::ENABLED - } -} -#[doc = "Field `BYPASS` writer - Enable or disable bypass of LFCLK crystal oscillator with external clock source"] -pub type BYPASS_W<'a, const O: u8> = crate::BitWriter<'a, u32, LFCLKSRC_SPEC, BYPASS_A, O>; -impl<'a, const O: u8> BYPASS_W<'a, O> { - #[doc = "Disable (use with Xtal or low-swing external source)"] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(BYPASS_A::DISABLED) - } - #[doc = "Enable (use with rail-to-rail external source)"] - #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(BYPASS_A::ENABLED) - } -} -#[doc = "Field `EXTERNAL` reader - Enable or disable external source for LFCLK"] -pub type EXTERNAL_R = crate::BitReader; -#[doc = "Enable or disable external source for LFCLK\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum EXTERNAL_A { - #[doc = "0: Disable external source (use with Xtal)"] - DISABLED = 0, - #[doc = "1: Enable use of external source instead of Xtal (SRC needs to be set to Xtal)"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: EXTERNAL_A) -> Self { - variant as u8 != 0 - } -} -impl EXTERNAL_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> EXTERNAL_A { - match self.bits { - false => EXTERNAL_A::DISABLED, - true => EXTERNAL_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == EXTERNAL_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == EXTERNAL_A::ENABLED - } -} -#[doc = "Field `EXTERNAL` writer - Enable or disable external source for LFCLK"] -pub type EXTERNAL_W<'a, const O: u8> = crate::BitWriter<'a, u32, LFCLKSRC_SPEC, EXTERNAL_A, O>; -impl<'a, const O: u8> EXTERNAL_W<'a, O> { - #[doc = "Disable external source (use with Xtal)"] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(EXTERNAL_A::DISABLED) - } - #[doc = "Enable use of external source instead of Xtal (SRC needs to be set to Xtal)"] - #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(EXTERNAL_A::ENABLED) - } -} -impl R { - #[doc = "Bits 0:1 - Clock source"] - #[inline(always)] - pub fn src(&self) -> SRC_R { - SRC_R::new((self.bits & 3) as u8) - } - #[doc = "Bit 16 - Enable or disable bypass of LFCLK crystal oscillator with external clock source"] - #[inline(always)] - pub fn bypass(&self) -> BYPASS_R { - BYPASS_R::new(((self.bits >> 16) & 1) != 0) - } - #[doc = "Bit 17 - Enable or disable external source for LFCLK"] - #[inline(always)] - pub fn external(&self) -> EXTERNAL_R { - EXTERNAL_R::new(((self.bits >> 17) & 1) != 0) - } -} -impl W { - #[doc = "Bits 0:1 - Clock source"] - #[inline(always)] - #[must_use] - pub fn src(&mut self) -> SRC_W<0> { - SRC_W::new(self) - } - #[doc = "Bit 16 - Enable or disable bypass of LFCLK crystal oscillator with external clock source"] - #[inline(always)] - #[must_use] - pub fn bypass(&mut self) -> BYPASS_W<16> { - BYPASS_W::new(self) - } - #[doc = "Bit 17 - Enable or disable external source for LFCLK"] - #[inline(always)] - #[must_use] - pub fn external(&mut self) -> EXTERNAL_W<17> { - EXTERNAL_W::new(self) - } - #[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 = "Clock source for the LFCLK\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 [lfclksrc](index.html) module"] -pub struct LFCLKSRC_SPEC; -impl crate::RegisterSpec for LFCLKSRC_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [lfclksrc::R](R) reader structure"] -impl crate::Readable for LFCLKSRC_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [lfclksrc::W](W) writer structure"] -impl crate::Writable for LFCLKSRC_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets LFCLKSRC to value 0"] -impl crate::Resettable for LFCLKSRC_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/clock/lfclksrccopy.rs b/down-the-stack/dk_pac/src/clock/lfclksrccopy.rs deleted file mode 100644 index a87fe00..0000000 --- a/down-the-stack/dk_pac/src/clock/lfclksrccopy.rs +++ /dev/null @@ -1,81 +0,0 @@ -#[doc = "Register `LFCLKSRCCOPY` 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 = "Field `SRC` reader - Clock source"] -pub type SRC_R = crate::FieldReader; -#[doc = "Clock source\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -#[repr(u8)] -pub enum SRC_A { - #[doc = "0: 32.768 kHz RC oscillator"] - RC = 0, - #[doc = "1: 32.768 kHz crystal oscillator"] - XTAL = 1, - #[doc = "2: 32.768 kHz synthesized from HFCLK"] - SYNTH = 2, -} -impl From for u8 { - #[inline(always)] - fn from(variant: SRC_A) -> Self { - variant as _ - } -} -impl SRC_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> Option { - match self.bits { - 0 => Some(SRC_A::RC), - 1 => Some(SRC_A::XTAL), - 2 => Some(SRC_A::SYNTH), - _ => None, - } - } - #[doc = "Checks if the value of the field is `RC`"] - #[inline(always)] - pub fn is_rc(&self) -> bool { - *self == SRC_A::RC - } - #[doc = "Checks if the value of the field is `XTAL`"] - #[inline(always)] - pub fn is_xtal(&self) -> bool { - *self == SRC_A::XTAL - } - #[doc = "Checks if the value of the field is `SYNTH`"] - #[inline(always)] - pub fn is_synth(&self) -> bool { - *self == SRC_A::SYNTH - } -} -impl R { - #[doc = "Bits 0:1 - Clock source"] - #[inline(always)] - pub fn src(&self) -> SRC_R { - SRC_R::new((self.bits & 3) as u8) - } -} -#[doc = "Copy of LFCLKSRC register, set when LFCLKSTART task was triggered\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 [lfclksrccopy](index.html) module"] -pub struct LFCLKSRCCOPY_SPEC; -impl crate::RegisterSpec for LFCLKSRCCOPY_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [lfclksrccopy::R](R) reader structure"] -impl crate::Readable for LFCLKSRCCOPY_SPEC { - type Reader = R; -} -#[doc = "`reset()` method sets LFCLKSRCCOPY to value 0"] -impl crate::Resettable for LFCLKSRCCOPY_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/clock/lfclkstat.rs b/down-the-stack/dk_pac/src/clock/lfclkstat.rs deleted file mode 100644 index 70c8e2b..0000000 --- a/down-the-stack/dk_pac/src/clock/lfclkstat.rs +++ /dev/null @@ -1,122 +0,0 @@ -#[doc = "Register `LFCLKSTAT` 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 = "Field `SRC` reader - Source of LFCLK"] -pub type SRC_R = crate::FieldReader; -#[doc = "Source of LFCLK\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -#[repr(u8)] -pub enum SRC_A { - #[doc = "0: 32.768 kHz RC oscillator"] - RC = 0, - #[doc = "1: 32.768 kHz crystal oscillator"] - XTAL = 1, - #[doc = "2: 32.768 kHz synthesized from HFCLK"] - SYNTH = 2, -} -impl From for u8 { - #[inline(always)] - fn from(variant: SRC_A) -> Self { - variant as _ - } -} -impl SRC_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> Option { - match self.bits { - 0 => Some(SRC_A::RC), - 1 => Some(SRC_A::XTAL), - 2 => Some(SRC_A::SYNTH), - _ => None, - } - } - #[doc = "Checks if the value of the field is `RC`"] - #[inline(always)] - pub fn is_rc(&self) -> bool { - *self == SRC_A::RC - } - #[doc = "Checks if the value of the field is `XTAL`"] - #[inline(always)] - pub fn is_xtal(&self) -> bool { - *self == SRC_A::XTAL - } - #[doc = "Checks if the value of the field is `SYNTH`"] - #[inline(always)] - pub fn is_synth(&self) -> bool { - *self == SRC_A::SYNTH - } -} -#[doc = "Field `STATE` reader - LFCLK state"] -pub type STATE_R = crate::BitReader; -#[doc = "LFCLK state\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum STATE_A { - #[doc = "0: LFCLK not running"] - NOT_RUNNING = 0, - #[doc = "1: LFCLK running"] - RUNNING = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: STATE_A) -> Self { - variant as u8 != 0 - } -} -impl STATE_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> STATE_A { - match self.bits { - false => STATE_A::NOT_RUNNING, - true => STATE_A::RUNNING, - } - } - #[doc = "Checks if the value of the field is `NOT_RUNNING`"] - #[inline(always)] - pub fn is_not_running(&self) -> bool { - *self == STATE_A::NOT_RUNNING - } - #[doc = "Checks if the value of the field is `RUNNING`"] - #[inline(always)] - pub fn is_running(&self) -> bool { - *self == STATE_A::RUNNING - } -} -impl R { - #[doc = "Bits 0:1 - Source of LFCLK"] - #[inline(always)] - pub fn src(&self) -> SRC_R { - SRC_R::new((self.bits & 3) as u8) - } - #[doc = "Bit 16 - LFCLK state"] - #[inline(always)] - pub fn state(&self) -> STATE_R { - STATE_R::new(((self.bits >> 16) & 1) != 0) - } -} -#[doc = "LFCLK 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 [lfclkstat](index.html) module"] -pub struct LFCLKSTAT_SPEC; -impl crate::RegisterSpec for LFCLKSTAT_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [lfclkstat::R](R) reader structure"] -impl crate::Readable for LFCLKSTAT_SPEC { - type Reader = R; -} -#[doc = "`reset()` method sets LFCLKSTAT to value 0"] -impl crate::Resettable for LFCLKSTAT_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/clock/tasks_cal.rs b/down-the-stack/dk_pac/src/clock/tasks_cal.rs deleted file mode 100644 index ba1a777..0000000 --- a/down-the-stack/dk_pac/src/clock/tasks_cal.rs +++ /dev/null @@ -1,71 +0,0 @@ -#[doc = "Register `TASKS_CAL` 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 = "Start calibration of LFRC oscillator\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum TASKS_CAL_AW { - #[doc = "1: Trigger task"] - TRIGGER = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: TASKS_CAL_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `TASKS_CAL` writer - Start calibration of LFRC oscillator"] -pub type TASKS_CAL_W<'a, const O: u8> = crate::BitWriter<'a, u32, TASKS_CAL_SPEC, TASKS_CAL_AW, O>; -impl<'a, const O: u8> TASKS_CAL_W<'a, O> { - #[doc = "Trigger task"] - #[inline(always)] - pub fn trigger(self) -> &'a mut W { - self.variant(TASKS_CAL_AW::TRIGGER) - } -} -impl W { - #[doc = "Bit 0 - Start calibration of LFRC oscillator"] - #[inline(always)] - #[must_use] - pub fn tasks_cal(&mut self) -> TASKS_CAL_W<0> { - TASKS_CAL_W::new(self) - } - #[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 = "Start calibration of LFRC oscillator\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 [tasks_cal](index.html) module"] -pub struct TASKS_CAL_SPEC; -impl crate::RegisterSpec for TASKS_CAL_SPEC { - type Ux = u32; -} -#[doc = "`write(|w| ..)` method takes [tasks_cal::W](W) writer structure"] -impl crate::Writable for TASKS_CAL_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets TASKS_CAL to value 0"] -impl crate::Resettable for TASKS_CAL_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/clock/tasks_ctstart.rs b/down-the-stack/dk_pac/src/clock/tasks_ctstart.rs deleted file mode 100644 index 22fcadc..0000000 --- a/down-the-stack/dk_pac/src/clock/tasks_ctstart.rs +++ /dev/null @@ -1,72 +0,0 @@ -#[doc = "Register `TASKS_CTSTART` 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 = "Start calibration timer\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum TASKS_CTSTART_AW { - #[doc = "1: Trigger task"] - TRIGGER = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: TASKS_CTSTART_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `TASKS_CTSTART` writer - Start calibration timer"] -pub type TASKS_CTSTART_W<'a, const O: u8> = - crate::BitWriter<'a, u32, TASKS_CTSTART_SPEC, TASKS_CTSTART_AW, O>; -impl<'a, const O: u8> TASKS_CTSTART_W<'a, O> { - #[doc = "Trigger task"] - #[inline(always)] - pub fn trigger(self) -> &'a mut W { - self.variant(TASKS_CTSTART_AW::TRIGGER) - } -} -impl W { - #[doc = "Bit 0 - Start calibration timer"] - #[inline(always)] - #[must_use] - pub fn tasks_ctstart(&mut self) -> TASKS_CTSTART_W<0> { - TASKS_CTSTART_W::new(self) - } - #[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 = "Start calibration timer\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 [tasks_ctstart](index.html) module"] -pub struct TASKS_CTSTART_SPEC; -impl crate::RegisterSpec for TASKS_CTSTART_SPEC { - type Ux = u32; -} -#[doc = "`write(|w| ..)` method takes [tasks_ctstart::W](W) writer structure"] -impl crate::Writable for TASKS_CTSTART_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets TASKS_CTSTART to value 0"] -impl crate::Resettable for TASKS_CTSTART_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/clock/tasks_ctstop.rs b/down-the-stack/dk_pac/src/clock/tasks_ctstop.rs deleted file mode 100644 index 4f4cf4c..0000000 --- a/down-the-stack/dk_pac/src/clock/tasks_ctstop.rs +++ /dev/null @@ -1,72 +0,0 @@ -#[doc = "Register `TASKS_CTSTOP` 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 = "Stop calibration timer\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum TASKS_CTSTOP_AW { - #[doc = "1: Trigger task"] - TRIGGER = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: TASKS_CTSTOP_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `TASKS_CTSTOP` writer - Stop calibration timer"] -pub type TASKS_CTSTOP_W<'a, const O: u8> = - crate::BitWriter<'a, u32, TASKS_CTSTOP_SPEC, TASKS_CTSTOP_AW, O>; -impl<'a, const O: u8> TASKS_CTSTOP_W<'a, O> { - #[doc = "Trigger task"] - #[inline(always)] - pub fn trigger(self) -> &'a mut W { - self.variant(TASKS_CTSTOP_AW::TRIGGER) - } -} -impl W { - #[doc = "Bit 0 - Stop calibration timer"] - #[inline(always)] - #[must_use] - pub fn tasks_ctstop(&mut self) -> TASKS_CTSTOP_W<0> { - TASKS_CTSTOP_W::new(self) - } - #[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 = "Stop calibration timer\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 [tasks_ctstop](index.html) module"] -pub struct TASKS_CTSTOP_SPEC; -impl crate::RegisterSpec for TASKS_CTSTOP_SPEC { - type Ux = u32; -} -#[doc = "`write(|w| ..)` method takes [tasks_ctstop::W](W) writer structure"] -impl crate::Writable for TASKS_CTSTOP_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets TASKS_CTSTOP to value 0"] -impl crate::Resettable for TASKS_CTSTOP_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/clock/tasks_hfclkstart.rs b/down-the-stack/dk_pac/src/clock/tasks_hfclkstart.rs deleted file mode 100644 index 5cc9079..0000000 --- a/down-the-stack/dk_pac/src/clock/tasks_hfclkstart.rs +++ /dev/null @@ -1,72 +0,0 @@ -#[doc = "Register `TASKS_HFCLKSTART` 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 = "Start HFCLK crystal oscillator\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum TASKS_HFCLKSTART_AW { - #[doc = "1: Trigger task"] - TRIGGER = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: TASKS_HFCLKSTART_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `TASKS_HFCLKSTART` writer - Start HFCLK crystal oscillator"] -pub type TASKS_HFCLKSTART_W<'a, const O: u8> = - crate::BitWriter<'a, u32, TASKS_HFCLKSTART_SPEC, TASKS_HFCLKSTART_AW, O>; -impl<'a, const O: u8> TASKS_HFCLKSTART_W<'a, O> { - #[doc = "Trigger task"] - #[inline(always)] - pub fn trigger(self) -> &'a mut W { - self.variant(TASKS_HFCLKSTART_AW::TRIGGER) - } -} -impl W { - #[doc = "Bit 0 - Start HFCLK crystal oscillator"] - #[inline(always)] - #[must_use] - pub fn tasks_hfclkstart(&mut self) -> TASKS_HFCLKSTART_W<0> { - TASKS_HFCLKSTART_W::new(self) - } - #[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 = "Start HFCLK crystal oscillator\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 [tasks_hfclkstart](index.html) module"] -pub struct TASKS_HFCLKSTART_SPEC; -impl crate::RegisterSpec for TASKS_HFCLKSTART_SPEC { - type Ux = u32; -} -#[doc = "`write(|w| ..)` method takes [tasks_hfclkstart::W](W) writer structure"] -impl crate::Writable for TASKS_HFCLKSTART_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets TASKS_HFCLKSTART to value 0"] -impl crate::Resettable for TASKS_HFCLKSTART_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/clock/tasks_hfclkstop.rs b/down-the-stack/dk_pac/src/clock/tasks_hfclkstop.rs deleted file mode 100644 index af6ead3..0000000 --- a/down-the-stack/dk_pac/src/clock/tasks_hfclkstop.rs +++ /dev/null @@ -1,72 +0,0 @@ -#[doc = "Register `TASKS_HFCLKSTOP` 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 = "Stop HFCLK crystal oscillator\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum TASKS_HFCLKSTOP_AW { - #[doc = "1: Trigger task"] - TRIGGER = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: TASKS_HFCLKSTOP_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `TASKS_HFCLKSTOP` writer - Stop HFCLK crystal oscillator"] -pub type TASKS_HFCLKSTOP_W<'a, const O: u8> = - crate::BitWriter<'a, u32, TASKS_HFCLKSTOP_SPEC, TASKS_HFCLKSTOP_AW, O>; -impl<'a, const O: u8> TASKS_HFCLKSTOP_W<'a, O> { - #[doc = "Trigger task"] - #[inline(always)] - pub fn trigger(self) -> &'a mut W { - self.variant(TASKS_HFCLKSTOP_AW::TRIGGER) - } -} -impl W { - #[doc = "Bit 0 - Stop HFCLK crystal oscillator"] - #[inline(always)] - #[must_use] - pub fn tasks_hfclkstop(&mut self) -> TASKS_HFCLKSTOP_W<0> { - TASKS_HFCLKSTOP_W::new(self) - } - #[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 = "Stop HFCLK crystal oscillator\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 [tasks_hfclkstop](index.html) module"] -pub struct TASKS_HFCLKSTOP_SPEC; -impl crate::RegisterSpec for TASKS_HFCLKSTOP_SPEC { - type Ux = u32; -} -#[doc = "`write(|w| ..)` method takes [tasks_hfclkstop::W](W) writer structure"] -impl crate::Writable for TASKS_HFCLKSTOP_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets TASKS_HFCLKSTOP to value 0"] -impl crate::Resettable for TASKS_HFCLKSTOP_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/clock/tasks_lfclkstart.rs b/down-the-stack/dk_pac/src/clock/tasks_lfclkstart.rs deleted file mode 100644 index 93bf213..0000000 --- a/down-the-stack/dk_pac/src/clock/tasks_lfclkstart.rs +++ /dev/null @@ -1,72 +0,0 @@ -#[doc = "Register `TASKS_LFCLKSTART` 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 = "Start LFCLK source\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum TASKS_LFCLKSTART_AW { - #[doc = "1: Trigger task"] - TRIGGER = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: TASKS_LFCLKSTART_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `TASKS_LFCLKSTART` writer - Start LFCLK source"] -pub type TASKS_LFCLKSTART_W<'a, const O: u8> = - crate::BitWriter<'a, u32, TASKS_LFCLKSTART_SPEC, TASKS_LFCLKSTART_AW, O>; -impl<'a, const O: u8> TASKS_LFCLKSTART_W<'a, O> { - #[doc = "Trigger task"] - #[inline(always)] - pub fn trigger(self) -> &'a mut W { - self.variant(TASKS_LFCLKSTART_AW::TRIGGER) - } -} -impl W { - #[doc = "Bit 0 - Start LFCLK source"] - #[inline(always)] - #[must_use] - pub fn tasks_lfclkstart(&mut self) -> TASKS_LFCLKSTART_W<0> { - TASKS_LFCLKSTART_W::new(self) - } - #[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 = "Start LFCLK source\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 [tasks_lfclkstart](index.html) module"] -pub struct TASKS_LFCLKSTART_SPEC; -impl crate::RegisterSpec for TASKS_LFCLKSTART_SPEC { - type Ux = u32; -} -#[doc = "`write(|w| ..)` method takes [tasks_lfclkstart::W](W) writer structure"] -impl crate::Writable for TASKS_LFCLKSTART_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets TASKS_LFCLKSTART to value 0"] -impl crate::Resettable for TASKS_LFCLKSTART_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/clock/tasks_lfclkstop.rs b/down-the-stack/dk_pac/src/clock/tasks_lfclkstop.rs deleted file mode 100644 index 1e4749e..0000000 --- a/down-the-stack/dk_pac/src/clock/tasks_lfclkstop.rs +++ /dev/null @@ -1,72 +0,0 @@ -#[doc = "Register `TASKS_LFCLKSTOP` 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 = "Stop LFCLK source\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum TASKS_LFCLKSTOP_AW { - #[doc = "1: Trigger task"] - TRIGGER = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: TASKS_LFCLKSTOP_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `TASKS_LFCLKSTOP` writer - Stop LFCLK source"] -pub type TASKS_LFCLKSTOP_W<'a, const O: u8> = - crate::BitWriter<'a, u32, TASKS_LFCLKSTOP_SPEC, TASKS_LFCLKSTOP_AW, O>; -impl<'a, const O: u8> TASKS_LFCLKSTOP_W<'a, O> { - #[doc = "Trigger task"] - #[inline(always)] - pub fn trigger(self) -> &'a mut W { - self.variant(TASKS_LFCLKSTOP_AW::TRIGGER) - } -} -impl W { - #[doc = "Bit 0 - Stop LFCLK source"] - #[inline(always)] - #[must_use] - pub fn tasks_lfclkstop(&mut self) -> TASKS_LFCLKSTOP_W<0> { - TASKS_LFCLKSTOP_W::new(self) - } - #[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 = "Stop LFCLK source\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 [tasks_lfclkstop](index.html) module"] -pub struct TASKS_LFCLKSTOP_SPEC; -impl crate::RegisterSpec for TASKS_LFCLKSTOP_SPEC { - type Ux = u32; -} -#[doc = "`write(|w| ..)` method takes [tasks_lfclkstop::W](W) writer structure"] -impl crate::Writable for TASKS_LFCLKSTOP_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets TASKS_LFCLKSTOP to value 0"] -impl crate::Resettable for TASKS_LFCLKSTOP_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/clock/traceconfig.rs b/down-the-stack/dk_pac/src/clock/traceconfig.rs deleted file mode 100644 index abbc195..0000000 --- a/down-the-stack/dk_pac/src/clock/traceconfig.rs +++ /dev/null @@ -1,232 +0,0 @@ -#[doc = "Register `TRACECONFIG` 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 `TRACECONFIG` 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 `TRACEPORTSPEED` reader - Speed of Trace Port clock. Note that the TRACECLK pin will output this clock divided by two."] -pub type TRACEPORTSPEED_R = crate::FieldReader; -#[doc = "Speed of Trace Port clock. Note that the TRACECLK pin will output this clock divided by two.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -#[repr(u8)] -pub enum TRACEPORTSPEED_A { - #[doc = "0: 32 MHz Trace Port clock (TRACECLK = 16 MHz)"] - _32MHZ = 0, - #[doc = "1: 16 MHz Trace Port clock (TRACECLK = 8 MHz)"] - _16MHZ = 1, - #[doc = "2: 8 MHz Trace Port clock (TRACECLK = 4 MHz)"] - _8MHZ = 2, - #[doc = "3: 4 MHz Trace Port clock (TRACECLK = 2 MHz)"] - _4MHZ = 3, -} -impl From for u8 { - #[inline(always)] - fn from(variant: TRACEPORTSPEED_A) -> Self { - variant as _ - } -} -impl TRACEPORTSPEED_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> TRACEPORTSPEED_A { - match self.bits { - 0 => TRACEPORTSPEED_A::_32MHZ, - 1 => TRACEPORTSPEED_A::_16MHZ, - 2 => TRACEPORTSPEED_A::_8MHZ, - 3 => TRACEPORTSPEED_A::_4MHZ, - _ => unreachable!(), - } - } - #[doc = "Checks if the value of the field is `_32MHZ`"] - #[inline(always)] - pub fn is_32mhz(&self) -> bool { - *self == TRACEPORTSPEED_A::_32MHZ - } - #[doc = "Checks if the value of the field is `_16MHZ`"] - #[inline(always)] - pub fn is_16mhz(&self) -> bool { - *self == TRACEPORTSPEED_A::_16MHZ - } - #[doc = "Checks if the value of the field is `_8MHZ`"] - #[inline(always)] - pub fn is_8mhz(&self) -> bool { - *self == TRACEPORTSPEED_A::_8MHZ - } - #[doc = "Checks if the value of the field is `_4MHZ`"] - #[inline(always)] - pub fn is_4mhz(&self) -> bool { - *self == TRACEPORTSPEED_A::_4MHZ - } -} -#[doc = "Field `TRACEPORTSPEED` writer - Speed of Trace Port clock. Note that the TRACECLK pin will output this clock divided by two."] -pub type TRACEPORTSPEED_W<'a, const O: u8> = - crate::FieldWriterSafe<'a, u32, TRACECONFIG_SPEC, u8, TRACEPORTSPEED_A, 2, O>; -impl<'a, const O: u8> TRACEPORTSPEED_W<'a, O> { - #[doc = "32 MHz Trace Port clock (TRACECLK = 16 MHz)"] - #[inline(always)] - pub fn _32mhz(self) -> &'a mut W { - self.variant(TRACEPORTSPEED_A::_32MHZ) - } - #[doc = "16 MHz Trace Port clock (TRACECLK = 8 MHz)"] - #[inline(always)] - pub fn _16mhz(self) -> &'a mut W { - self.variant(TRACEPORTSPEED_A::_16MHZ) - } - #[doc = "8 MHz Trace Port clock (TRACECLK = 4 MHz)"] - #[inline(always)] - pub fn _8mhz(self) -> &'a mut W { - self.variant(TRACEPORTSPEED_A::_8MHZ) - } - #[doc = "4 MHz Trace Port clock (TRACECLK = 2 MHz)"] - #[inline(always)] - pub fn _4mhz(self) -> &'a mut W { - self.variant(TRACEPORTSPEED_A::_4MHZ) - } -} -#[doc = "Field `TRACEMUX` reader - Pin multiplexing of trace signals."] -pub type TRACEMUX_R = crate::FieldReader; -#[doc = "Pin multiplexing of trace signals.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -#[repr(u8)] -pub enum TRACEMUX_A { - #[doc = "0: GPIOs multiplexed onto all trace-pins"] - GPIO = 0, - #[doc = "1: SWO multiplexed onto P0.18, GPIO multiplexed onto other trace pins"] - SERIAL = 1, - #[doc = "2: TRACECLK and TRACEDATA multiplexed onto P0.20, P0.18, P0.16, P0.15 and P0.14."] - PARALLEL = 2, -} -impl From for u8 { - #[inline(always)] - fn from(variant: TRACEMUX_A) -> Self { - variant as _ - } -} -impl TRACEMUX_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> Option { - match self.bits { - 0 => Some(TRACEMUX_A::GPIO), - 1 => Some(TRACEMUX_A::SERIAL), - 2 => Some(TRACEMUX_A::PARALLEL), - _ => None, - } - } - #[doc = "Checks if the value of the field is `GPIO`"] - #[inline(always)] - pub fn is_gpio(&self) -> bool { - *self == TRACEMUX_A::GPIO - } - #[doc = "Checks if the value of the field is `SERIAL`"] - #[inline(always)] - pub fn is_serial(&self) -> bool { - *self == TRACEMUX_A::SERIAL - } - #[doc = "Checks if the value of the field is `PARALLEL`"] - #[inline(always)] - pub fn is_parallel(&self) -> bool { - *self == TRACEMUX_A::PARALLEL - } -} -#[doc = "Field `TRACEMUX` writer - Pin multiplexing of trace signals."] -pub type TRACEMUX_W<'a, const O: u8> = - crate::FieldWriter<'a, u32, TRACECONFIG_SPEC, u8, TRACEMUX_A, 2, O>; -impl<'a, const O: u8> TRACEMUX_W<'a, O> { - #[doc = "GPIOs multiplexed onto all trace-pins"] - #[inline(always)] - pub fn gpio(self) -> &'a mut W { - self.variant(TRACEMUX_A::GPIO) - } - #[doc = "SWO multiplexed onto P0.18, GPIO multiplexed onto other trace pins"] - #[inline(always)] - pub fn serial(self) -> &'a mut W { - self.variant(TRACEMUX_A::SERIAL) - } - #[doc = "TRACECLK and TRACEDATA multiplexed onto P0.20, P0.18, P0.16, P0.15 and P0.14."] - #[inline(always)] - pub fn parallel(self) -> &'a mut W { - self.variant(TRACEMUX_A::PARALLEL) - } -} -impl R { - #[doc = "Bits 0:1 - Speed of Trace Port clock. Note that the TRACECLK pin will output this clock divided by two."] - #[inline(always)] - pub fn traceportspeed(&self) -> TRACEPORTSPEED_R { - TRACEPORTSPEED_R::new((self.bits & 3) as u8) - } - #[doc = "Bits 16:17 - Pin multiplexing of trace signals."] - #[inline(always)] - pub fn tracemux(&self) -> TRACEMUX_R { - TRACEMUX_R::new(((self.bits >> 16) & 3) as u8) - } -} -impl W { - #[doc = "Bits 0:1 - Speed of Trace Port clock. Note that the TRACECLK pin will output this clock divided by two."] - #[inline(always)] - #[must_use] - pub fn traceportspeed(&mut self) -> TRACEPORTSPEED_W<0> { - TRACEPORTSPEED_W::new(self) - } - #[doc = "Bits 16:17 - Pin multiplexing of trace signals."] - #[inline(always)] - #[must_use] - pub fn tracemux(&mut self) -> TRACEMUX_W<16> { - TRACEMUX_W::new(self) - } - #[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 = "Clocking options for the Trace Port debug interface\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 [traceconfig](index.html) module"] -pub struct TRACECONFIG_SPEC; -impl crate::RegisterSpec for TRACECONFIG_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [traceconfig::R](R) reader structure"] -impl crate::Readable for TRACECONFIG_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [traceconfig::W](W) writer structure"] -impl crate::Writable for TRACECONFIG_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets TRACECONFIG to value 0"] -impl crate::Resettable for TRACECONFIG_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/comp.rs b/down-the-stack/dk_pac/src/comp.rs deleted file mode 100644 index 5776789..0000000 --- a/down-the-stack/dk_pac/src/comp.rs +++ /dev/null @@ -1,130 +0,0 @@ -#[doc = r"Register block"] -#[repr(C)] -pub struct RegisterBlock { - #[doc = "0x00 - Start comparator"] - pub tasks_start: TASKS_START, - #[doc = "0x04 - Stop comparator"] - pub tasks_stop: TASKS_STOP, - #[doc = "0x08 - Sample comparator value"] - pub tasks_sample: TASKS_SAMPLE, - _reserved3: [u8; 0xf4], - #[doc = "0x100 - COMP is ready and output is valid"] - pub events_ready: EVENTS_READY, - #[doc = "0x104 - Downward crossing"] - pub events_down: EVENTS_DOWN, - #[doc = "0x108 - Upward crossing"] - pub events_up: EVENTS_UP, - #[doc = "0x10c - Downward or upward crossing"] - pub events_cross: EVENTS_CROSS, - _reserved7: [u8; 0xf0], - #[doc = "0x200 - Shortcuts between local events and tasks"] - pub shorts: SHORTS, - _reserved8: [u8; 0xfc], - #[doc = "0x300 - Enable or disable interrupt"] - pub inten: INTEN, - #[doc = "0x304 - Enable interrupt"] - pub intenset: INTENSET, - #[doc = "0x308 - Disable interrupt"] - pub intenclr: INTENCLR, - _reserved11: [u8; 0xf4], - #[doc = "0x400 - Compare result"] - pub result: RESULT, - _reserved12: [u8; 0xfc], - #[doc = "0x500 - COMP enable"] - pub enable: ENABLE, - #[doc = "0x504 - Pin select"] - pub psel: PSEL, - #[doc = "0x508 - Reference source select for single-ended mode"] - pub refsel: REFSEL, - #[doc = "0x50c - External reference select"] - pub extrefsel: EXTREFSEL, - _reserved16: [u8; 0x20], - #[doc = "0x530 - Threshold configuration for hysteresis unit"] - pub th: TH, - #[doc = "0x534 - Mode configuration"] - pub mode: MODE, - #[doc = "0x538 - Comparator hysteresis enable"] - pub hyst: HYST, - #[doc = "0x53c - Current source select on analog input"] - pub isource: ISOURCE, -} -#[doc = "TASKS_START (w) register accessor: an alias for `Reg`"] -pub type TASKS_START = crate::Reg; -#[doc = "Start comparator"] -pub mod tasks_start; -#[doc = "TASKS_STOP (w) register accessor: an alias for `Reg`"] -pub type TASKS_STOP = crate::Reg; -#[doc = "Stop comparator"] -pub mod tasks_stop; -#[doc = "TASKS_SAMPLE (w) register accessor: an alias for `Reg`"] -pub type TASKS_SAMPLE = crate::Reg; -#[doc = "Sample comparator value"] -pub mod tasks_sample; -#[doc = "EVENTS_READY (rw) register accessor: an alias for `Reg`"] -pub type EVENTS_READY = crate::Reg; -#[doc = "COMP is ready and output is valid"] -pub mod events_ready; -#[doc = "EVENTS_DOWN (rw) register accessor: an alias for `Reg`"] -pub type EVENTS_DOWN = crate::Reg; -#[doc = "Downward crossing"] -pub mod events_down; -#[doc = "EVENTS_UP (rw) register accessor: an alias for `Reg`"] -pub type EVENTS_UP = crate::Reg; -#[doc = "Upward crossing"] -pub mod events_up; -#[doc = "EVENTS_CROSS (rw) register accessor: an alias for `Reg`"] -pub type EVENTS_CROSS = crate::Reg; -#[doc = "Downward or upward crossing"] -pub mod events_cross; -#[doc = "SHORTS (rw) register accessor: an alias for `Reg`"] -pub type SHORTS = crate::Reg; -#[doc = "Shortcuts between local events and tasks"] -pub mod shorts; -#[doc = "INTEN (rw) register accessor: an alias for `Reg`"] -pub type INTEN = crate::Reg; -#[doc = "Enable or disable interrupt"] -pub mod inten; -#[doc = "INTENSET (rw) register accessor: an alias for `Reg`"] -pub type INTENSET = crate::Reg; -#[doc = "Enable interrupt"] -pub mod intenset; -#[doc = "INTENCLR (rw) register accessor: an alias for `Reg`"] -pub type INTENCLR = crate::Reg; -#[doc = "Disable interrupt"] -pub mod intenclr; -#[doc = "RESULT (r) register accessor: an alias for `Reg`"] -pub type RESULT = crate::Reg; -#[doc = "Compare result"] -pub mod result; -#[doc = "ENABLE (rw) register accessor: an alias for `Reg`"] -pub type ENABLE = crate::Reg; -#[doc = "COMP enable"] -pub mod enable; -#[doc = "PSEL (rw) register accessor: an alias for `Reg`"] -pub type PSEL = crate::Reg; -#[doc = "Pin select"] -pub mod psel; -#[doc = "REFSEL (rw) register accessor: an alias for `Reg`"] -pub type REFSEL = crate::Reg; -#[doc = "Reference source select for single-ended mode"] -pub mod refsel; -#[doc = "EXTREFSEL (rw) register accessor: an alias for `Reg`"] -pub type EXTREFSEL = crate::Reg; -#[doc = "External reference select"] -pub mod extrefsel; -#[doc = "TH (rw) register accessor: an alias for `Reg`"] -pub type TH = crate::Reg; -#[doc = "Threshold configuration for hysteresis unit"] -pub mod th; -#[doc = "MODE (rw) register accessor: an alias for `Reg`"] -pub type MODE = crate::Reg; -#[doc = "Mode configuration"] -pub mod mode; -#[doc = "HYST (rw) register accessor: an alias for `Reg`"] -pub type HYST = crate::Reg; -#[doc = "Comparator hysteresis enable"] -pub mod hyst; -#[doc = "ISOURCE (rw) register accessor: an alias for `Reg`"] -pub type ISOURCE = crate::Reg; -#[doc = "Current source select on analog input"] -pub mod isource; diff --git a/down-the-stack/dk_pac/src/comp/enable.rs b/down-the-stack/dk_pac/src/comp/enable.rs deleted file mode 100644 index 9a63495..0000000 --- a/down-the-stack/dk_pac/src/comp/enable.rs +++ /dev/null @@ -1,128 +0,0 @@ -#[doc = "Register `ENABLE` 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 `ENABLE` 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 `ENABLE` reader - Enable or disable COMP"] -pub type ENABLE_R = crate::FieldReader; -#[doc = "Enable or disable COMP\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -#[repr(u8)] -pub enum ENABLE_A { - #[doc = "0: Disable"] - DISABLED = 0, - #[doc = "2: Enable"] - ENABLED = 2, -} -impl From for u8 { - #[inline(always)] - fn from(variant: ENABLE_A) -> Self { - variant as _ - } -} -impl ENABLE_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> Option { - match self.bits { - 0 => Some(ENABLE_A::DISABLED), - 2 => Some(ENABLE_A::ENABLED), - _ => None, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == ENABLE_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == ENABLE_A::ENABLED - } -} -#[doc = "Field `ENABLE` writer - Enable or disable COMP"] -pub type ENABLE_W<'a, const O: u8> = crate::FieldWriter<'a, u32, ENABLE_SPEC, u8, ENABLE_A, 2, O>; -impl<'a, const O: u8> ENABLE_W<'a, O> { - #[doc = "Disable"] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(ENABLE_A::DISABLED) - } - #[doc = "Enable"] - #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(ENABLE_A::ENABLED) - } -} -impl R { - #[doc = "Bits 0:1 - Enable or disable COMP"] - #[inline(always)] - pub fn enable(&self) -> ENABLE_R { - ENABLE_R::new((self.bits & 3) as u8) - } -} -impl W { - #[doc = "Bits 0:1 - Enable or disable COMP"] - #[inline(always)] - #[must_use] - pub fn enable(&mut self) -> ENABLE_W<0> { - 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 - } -} -#[doc = "COMP enable\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 [enable](index.html) module"] -pub struct ENABLE_SPEC; -impl crate::RegisterSpec for ENABLE_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [enable::R](R) reader structure"] -impl crate::Readable for ENABLE_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [enable::W](W) writer structure"] -impl crate::Writable for ENABLE_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets ENABLE to value 0"] -impl crate::Resettable for ENABLE_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/comp/events_cross.rs b/down-the-stack/dk_pac/src/comp/events_cross.rs deleted file mode 100644 index e0925b7..0000000 --- a/down-the-stack/dk_pac/src/comp/events_cross.rs +++ /dev/null @@ -1,127 +0,0 @@ -#[doc = "Register `EVENTS_CROSS` 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 `EVENTS_CROSS` 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 `EVENTS_CROSS` reader - Downward or upward crossing"] -pub type EVENTS_CROSS_R = crate::BitReader; -#[doc = "Downward or upward crossing\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum EVENTS_CROSS_A { - #[doc = "0: Event not generated"] - NOT_GENERATED = 0, - #[doc = "1: Event generated"] - GENERATED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: EVENTS_CROSS_A) -> Self { - variant as u8 != 0 - } -} -impl EVENTS_CROSS_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> EVENTS_CROSS_A { - match self.bits { - false => EVENTS_CROSS_A::NOT_GENERATED, - true => EVENTS_CROSS_A::GENERATED, - } - } - #[doc = "Checks if the value of the field is `NOT_GENERATED`"] - #[inline(always)] - pub fn is_not_generated(&self) -> bool { - *self == EVENTS_CROSS_A::NOT_GENERATED - } - #[doc = "Checks if the value of the field is `GENERATED`"] - #[inline(always)] - pub fn is_generated(&self) -> bool { - *self == EVENTS_CROSS_A::GENERATED - } -} -#[doc = "Field `EVENTS_CROSS` writer - Downward or upward crossing"] -pub type EVENTS_CROSS_W<'a, const O: u8> = - crate::BitWriter<'a, u32, EVENTS_CROSS_SPEC, EVENTS_CROSS_A, O>; -impl<'a, const O: u8> EVENTS_CROSS_W<'a, O> { - #[doc = "Event not generated"] - #[inline(always)] - pub fn not_generated(self) -> &'a mut W { - self.variant(EVENTS_CROSS_A::NOT_GENERATED) - } - #[doc = "Event generated"] - #[inline(always)] - pub fn generated(self) -> &'a mut W { - self.variant(EVENTS_CROSS_A::GENERATED) - } -} -impl R { - #[doc = "Bit 0 - Downward or upward crossing"] - #[inline(always)] - pub fn events_cross(&self) -> EVENTS_CROSS_R { - EVENTS_CROSS_R::new((self.bits & 1) != 0) - } -} -impl W { - #[doc = "Bit 0 - Downward or upward crossing"] - #[inline(always)] - #[must_use] - pub fn events_cross(&mut self) -> EVENTS_CROSS_W<0> { - EVENTS_CROSS_W::new(self) - } - #[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 = "Downward or upward crossing\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 [events_cross](index.html) module"] -pub struct EVENTS_CROSS_SPEC; -impl crate::RegisterSpec for EVENTS_CROSS_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [events_cross::R](R) reader structure"] -impl crate::Readable for EVENTS_CROSS_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [events_cross::W](W) writer structure"] -impl crate::Writable for EVENTS_CROSS_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets EVENTS_CROSS to value 0"] -impl crate::Resettable for EVENTS_CROSS_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/comp/events_down.rs b/down-the-stack/dk_pac/src/comp/events_down.rs deleted file mode 100644 index febe130..0000000 --- a/down-the-stack/dk_pac/src/comp/events_down.rs +++ /dev/null @@ -1,127 +0,0 @@ -#[doc = "Register `EVENTS_DOWN` 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 `EVENTS_DOWN` 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 `EVENTS_DOWN` reader - Downward crossing"] -pub type EVENTS_DOWN_R = crate::BitReader; -#[doc = "Downward crossing\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum EVENTS_DOWN_A { - #[doc = "0: Event not generated"] - NOT_GENERATED = 0, - #[doc = "1: Event generated"] - GENERATED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: EVENTS_DOWN_A) -> Self { - variant as u8 != 0 - } -} -impl EVENTS_DOWN_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> EVENTS_DOWN_A { - match self.bits { - false => EVENTS_DOWN_A::NOT_GENERATED, - true => EVENTS_DOWN_A::GENERATED, - } - } - #[doc = "Checks if the value of the field is `NOT_GENERATED`"] - #[inline(always)] - pub fn is_not_generated(&self) -> bool { - *self == EVENTS_DOWN_A::NOT_GENERATED - } - #[doc = "Checks if the value of the field is `GENERATED`"] - #[inline(always)] - pub fn is_generated(&self) -> bool { - *self == EVENTS_DOWN_A::GENERATED - } -} -#[doc = "Field `EVENTS_DOWN` writer - Downward crossing"] -pub type EVENTS_DOWN_W<'a, const O: u8> = - crate::BitWriter<'a, u32, EVENTS_DOWN_SPEC, EVENTS_DOWN_A, O>; -impl<'a, const O: u8> EVENTS_DOWN_W<'a, O> { - #[doc = "Event not generated"] - #[inline(always)] - pub fn not_generated(self) -> &'a mut W { - self.variant(EVENTS_DOWN_A::NOT_GENERATED) - } - #[doc = "Event generated"] - #[inline(always)] - pub fn generated(self) -> &'a mut W { - self.variant(EVENTS_DOWN_A::GENERATED) - } -} -impl R { - #[doc = "Bit 0 - Downward crossing"] - #[inline(always)] - pub fn events_down(&self) -> EVENTS_DOWN_R { - EVENTS_DOWN_R::new((self.bits & 1) != 0) - } -} -impl W { - #[doc = "Bit 0 - Downward crossing"] - #[inline(always)] - #[must_use] - pub fn events_down(&mut self) -> EVENTS_DOWN_W<0> { - EVENTS_DOWN_W::new(self) - } - #[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 = "Downward crossing\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 [events_down](index.html) module"] -pub struct EVENTS_DOWN_SPEC; -impl crate::RegisterSpec for EVENTS_DOWN_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [events_down::R](R) reader structure"] -impl crate::Readable for EVENTS_DOWN_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [events_down::W](W) writer structure"] -impl crate::Writable for EVENTS_DOWN_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets EVENTS_DOWN to value 0"] -impl crate::Resettable for EVENTS_DOWN_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/comp/events_ready.rs b/down-the-stack/dk_pac/src/comp/events_ready.rs deleted file mode 100644 index f4cd3cc..0000000 --- a/down-the-stack/dk_pac/src/comp/events_ready.rs +++ /dev/null @@ -1,127 +0,0 @@ -#[doc = "Register `EVENTS_READY` 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 `EVENTS_READY` 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 `EVENTS_READY` reader - COMP is ready and output is valid"] -pub type EVENTS_READY_R = crate::BitReader; -#[doc = "COMP is ready and output is valid\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum EVENTS_READY_A { - #[doc = "0: Event not generated"] - NOT_GENERATED = 0, - #[doc = "1: Event generated"] - GENERATED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: EVENTS_READY_A) -> Self { - variant as u8 != 0 - } -} -impl EVENTS_READY_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> EVENTS_READY_A { - match self.bits { - false => EVENTS_READY_A::NOT_GENERATED, - true => EVENTS_READY_A::GENERATED, - } - } - #[doc = "Checks if the value of the field is `NOT_GENERATED`"] - #[inline(always)] - pub fn is_not_generated(&self) -> bool { - *self == EVENTS_READY_A::NOT_GENERATED - } - #[doc = "Checks if the value of the field is `GENERATED`"] - #[inline(always)] - pub fn is_generated(&self) -> bool { - *self == EVENTS_READY_A::GENERATED - } -} -#[doc = "Field `EVENTS_READY` writer - COMP is ready and output is valid"] -pub type EVENTS_READY_W<'a, const O: u8> = - crate::BitWriter<'a, u32, EVENTS_READY_SPEC, EVENTS_READY_A, O>; -impl<'a, const O: u8> EVENTS_READY_W<'a, O> { - #[doc = "Event not generated"] - #[inline(always)] - pub fn not_generated(self) -> &'a mut W { - self.variant(EVENTS_READY_A::NOT_GENERATED) - } - #[doc = "Event generated"] - #[inline(always)] - pub fn generated(self) -> &'a mut W { - self.variant(EVENTS_READY_A::GENERATED) - } -} -impl R { - #[doc = "Bit 0 - COMP is ready and output is valid"] - #[inline(always)] - pub fn events_ready(&self) -> EVENTS_READY_R { - EVENTS_READY_R::new((self.bits & 1) != 0) - } -} -impl W { - #[doc = "Bit 0 - COMP is ready and output is valid"] - #[inline(always)] - #[must_use] - pub fn events_ready(&mut self) -> EVENTS_READY_W<0> { - EVENTS_READY_W::new(self) - } - #[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 = "COMP is ready and output is valid\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 [events_ready](index.html) module"] -pub struct EVENTS_READY_SPEC; -impl crate::RegisterSpec for EVENTS_READY_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [events_ready::R](R) reader structure"] -impl crate::Readable for EVENTS_READY_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [events_ready::W](W) writer structure"] -impl crate::Writable for EVENTS_READY_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets EVENTS_READY to value 0"] -impl crate::Resettable for EVENTS_READY_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/comp/events_up.rs b/down-the-stack/dk_pac/src/comp/events_up.rs deleted file mode 100644 index 81b5382..0000000 --- a/down-the-stack/dk_pac/src/comp/events_up.rs +++ /dev/null @@ -1,126 +0,0 @@ -#[doc = "Register `EVENTS_UP` 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 `EVENTS_UP` 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 `EVENTS_UP` reader - Upward crossing"] -pub type EVENTS_UP_R = crate::BitReader; -#[doc = "Upward crossing\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum EVENTS_UP_A { - #[doc = "0: Event not generated"] - NOT_GENERATED = 0, - #[doc = "1: Event generated"] - GENERATED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: EVENTS_UP_A) -> Self { - variant as u8 != 0 - } -} -impl EVENTS_UP_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> EVENTS_UP_A { - match self.bits { - false => EVENTS_UP_A::NOT_GENERATED, - true => EVENTS_UP_A::GENERATED, - } - } - #[doc = "Checks if the value of the field is `NOT_GENERATED`"] - #[inline(always)] - pub fn is_not_generated(&self) -> bool { - *self == EVENTS_UP_A::NOT_GENERATED - } - #[doc = "Checks if the value of the field is `GENERATED`"] - #[inline(always)] - pub fn is_generated(&self) -> bool { - *self == EVENTS_UP_A::GENERATED - } -} -#[doc = "Field `EVENTS_UP` writer - Upward crossing"] -pub type EVENTS_UP_W<'a, const O: u8> = crate::BitWriter<'a, u32, EVENTS_UP_SPEC, EVENTS_UP_A, O>; -impl<'a, const O: u8> EVENTS_UP_W<'a, O> { - #[doc = "Event not generated"] - #[inline(always)] - pub fn not_generated(self) -> &'a mut W { - self.variant(EVENTS_UP_A::NOT_GENERATED) - } - #[doc = "Event generated"] - #[inline(always)] - pub fn generated(self) -> &'a mut W { - self.variant(EVENTS_UP_A::GENERATED) - } -} -impl R { - #[doc = "Bit 0 - Upward crossing"] - #[inline(always)] - pub fn events_up(&self) -> EVENTS_UP_R { - EVENTS_UP_R::new((self.bits & 1) != 0) - } -} -impl W { - #[doc = "Bit 0 - Upward crossing"] - #[inline(always)] - #[must_use] - pub fn events_up(&mut self) -> EVENTS_UP_W<0> { - EVENTS_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 - } -} -#[doc = "Upward crossing\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 [events_up](index.html) module"] -pub struct EVENTS_UP_SPEC; -impl crate::RegisterSpec for EVENTS_UP_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [events_up::R](R) reader structure"] -impl crate::Readable for EVENTS_UP_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [events_up::W](W) writer structure"] -impl crate::Writable for EVENTS_UP_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets EVENTS_UP to value 0"] -impl crate::Resettable for EVENTS_UP_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/comp/extrefsel.rs b/down-the-stack/dk_pac/src/comp/extrefsel.rs deleted file mode 100644 index f117f33..0000000 --- a/down-the-stack/dk_pac/src/comp/extrefsel.rs +++ /dev/null @@ -1,207 +0,0 @@ -#[doc = "Register `EXTREFSEL` 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 `EXTREFSEL` 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 `EXTREFSEL` reader - External analog reference select"] -pub type EXTREFSEL_R = crate::FieldReader; -#[doc = "External analog reference select\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -#[repr(u8)] -pub enum EXTREFSEL_A { - #[doc = "0: Use AIN0 as external analog reference"] - ANALOG_REFERENCE0 = 0, - #[doc = "1: Use AIN1 as external analog reference"] - ANALOG_REFERENCE1 = 1, - #[doc = "2: Use AIN2 as external analog reference"] - ANALOG_REFERENCE2 = 2, - #[doc = "3: Use AIN3 as external analog reference"] - ANALOG_REFERENCE3 = 3, - #[doc = "4: Use AIN4 as external analog reference"] - ANALOG_REFERENCE4 = 4, - #[doc = "5: Use AIN5 as external analog reference"] - ANALOG_REFERENCE5 = 5, - #[doc = "6: Use AIN6 as external analog reference"] - ANALOG_REFERENCE6 = 6, - #[doc = "7: Use AIN7 as external analog reference"] - ANALOG_REFERENCE7 = 7, -} -impl From for u8 { - #[inline(always)] - fn from(variant: EXTREFSEL_A) -> Self { - variant as _ - } -} -impl EXTREFSEL_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> EXTREFSEL_A { - match self.bits { - 0 => EXTREFSEL_A::ANALOG_REFERENCE0, - 1 => EXTREFSEL_A::ANALOG_REFERENCE1, - 2 => EXTREFSEL_A::ANALOG_REFERENCE2, - 3 => EXTREFSEL_A::ANALOG_REFERENCE3, - 4 => EXTREFSEL_A::ANALOG_REFERENCE4, - 5 => EXTREFSEL_A::ANALOG_REFERENCE5, - 6 => EXTREFSEL_A::ANALOG_REFERENCE6, - 7 => EXTREFSEL_A::ANALOG_REFERENCE7, - _ => unreachable!(), - } - } - #[doc = "Checks if the value of the field is `ANALOG_REFERENCE0`"] - #[inline(always)] - pub fn is_analog_reference0(&self) -> bool { - *self == EXTREFSEL_A::ANALOG_REFERENCE0 - } - #[doc = "Checks if the value of the field is `ANALOG_REFERENCE1`"] - #[inline(always)] - pub fn is_analog_reference1(&self) -> bool { - *self == EXTREFSEL_A::ANALOG_REFERENCE1 - } - #[doc = "Checks if the value of the field is `ANALOG_REFERENCE2`"] - #[inline(always)] - pub fn is_analog_reference2(&self) -> bool { - *self == EXTREFSEL_A::ANALOG_REFERENCE2 - } - #[doc = "Checks if the value of the field is `ANALOG_REFERENCE3`"] - #[inline(always)] - pub fn is_analog_reference3(&self) -> bool { - *self == EXTREFSEL_A::ANALOG_REFERENCE3 - } - #[doc = "Checks if the value of the field is `ANALOG_REFERENCE4`"] - #[inline(always)] - pub fn is_analog_reference4(&self) -> bool { - *self == EXTREFSEL_A::ANALOG_REFERENCE4 - } - #[doc = "Checks if the value of the field is `ANALOG_REFERENCE5`"] - #[inline(always)] - pub fn is_analog_reference5(&self) -> bool { - *self == EXTREFSEL_A::ANALOG_REFERENCE5 - } - #[doc = "Checks if the value of the field is `ANALOG_REFERENCE6`"] - #[inline(always)] - pub fn is_analog_reference6(&self) -> bool { - *self == EXTREFSEL_A::ANALOG_REFERENCE6 - } - #[doc = "Checks if the value of the field is `ANALOG_REFERENCE7`"] - #[inline(always)] - pub fn is_analog_reference7(&self) -> bool { - *self == EXTREFSEL_A::ANALOG_REFERENCE7 - } -} -#[doc = "Field `EXTREFSEL` writer - External analog reference select"] -pub type EXTREFSEL_W<'a, const O: u8> = - crate::FieldWriterSafe<'a, u32, EXTREFSEL_SPEC, u8, EXTREFSEL_A, 3, O>; -impl<'a, const O: u8> EXTREFSEL_W<'a, O> { - #[doc = "Use AIN0 as external analog reference"] - #[inline(always)] - pub fn analog_reference0(self) -> &'a mut W { - self.variant(EXTREFSEL_A::ANALOG_REFERENCE0) - } - #[doc = "Use AIN1 as external analog reference"] - #[inline(always)] - pub fn analog_reference1(self) -> &'a mut W { - self.variant(EXTREFSEL_A::ANALOG_REFERENCE1) - } - #[doc = "Use AIN2 as external analog reference"] - #[inline(always)] - pub fn analog_reference2(self) -> &'a mut W { - self.variant(EXTREFSEL_A::ANALOG_REFERENCE2) - } - #[doc = "Use AIN3 as external analog reference"] - #[inline(always)] - pub fn analog_reference3(self) -> &'a mut W { - self.variant(EXTREFSEL_A::ANALOG_REFERENCE3) - } - #[doc = "Use AIN4 as external analog reference"] - #[inline(always)] - pub fn analog_reference4(self) -> &'a mut W { - self.variant(EXTREFSEL_A::ANALOG_REFERENCE4) - } - #[doc = "Use AIN5 as external analog reference"] - #[inline(always)] - pub fn analog_reference5(self) -> &'a mut W { - self.variant(EXTREFSEL_A::ANALOG_REFERENCE5) - } - #[doc = "Use AIN6 as external analog reference"] - #[inline(always)] - pub fn analog_reference6(self) -> &'a mut W { - self.variant(EXTREFSEL_A::ANALOG_REFERENCE6) - } - #[doc = "Use AIN7 as external analog reference"] - #[inline(always)] - pub fn analog_reference7(self) -> &'a mut W { - self.variant(EXTREFSEL_A::ANALOG_REFERENCE7) - } -} -impl R { - #[doc = "Bits 0:2 - External analog reference select"] - #[inline(always)] - pub fn extrefsel(&self) -> EXTREFSEL_R { - EXTREFSEL_R::new((self.bits & 7) as u8) - } -} -impl W { - #[doc = "Bits 0:2 - External analog reference select"] - #[inline(always)] - #[must_use] - pub fn extrefsel(&mut self) -> EXTREFSEL_W<0> { - EXTREFSEL_W::new(self) - } - #[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 = "External reference select\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 [extrefsel](index.html) module"] -pub struct EXTREFSEL_SPEC; -impl crate::RegisterSpec for EXTREFSEL_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [extrefsel::R](R) reader structure"] -impl crate::Readable for EXTREFSEL_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [extrefsel::W](W) writer structure"] -impl crate::Writable for EXTREFSEL_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets EXTREFSEL to value 0"] -impl crate::Resettable for EXTREFSEL_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/comp/hyst.rs b/down-the-stack/dk_pac/src/comp/hyst.rs deleted file mode 100644 index fe64d86..0000000 --- a/down-the-stack/dk_pac/src/comp/hyst.rs +++ /dev/null @@ -1,126 +0,0 @@ -#[doc = "Register `HYST` 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 `HYST` 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 `HYST` reader - Comparator hysteresis"] -pub type HYST_R = crate::BitReader; -#[doc = "Comparator hysteresis\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum HYST_A { - #[doc = "0: Comparator hysteresis disabled"] - NO_HYST = 0, - #[doc = "1: Comparator hysteresis enabled"] - HYST50M_V = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: HYST_A) -> Self { - variant as u8 != 0 - } -} -impl HYST_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> HYST_A { - match self.bits { - false => HYST_A::NO_HYST, - true => HYST_A::HYST50M_V, - } - } - #[doc = "Checks if the value of the field is `NO_HYST`"] - #[inline(always)] - pub fn is_no_hyst(&self) -> bool { - *self == HYST_A::NO_HYST - } - #[doc = "Checks if the value of the field is `HYST50M_V`"] - #[inline(always)] - pub fn is_hyst50m_v(&self) -> bool { - *self == HYST_A::HYST50M_V - } -} -#[doc = "Field `HYST` writer - Comparator hysteresis"] -pub type HYST_W<'a, const O: u8> = crate::BitWriter<'a, u32, HYST_SPEC, HYST_A, O>; -impl<'a, const O: u8> HYST_W<'a, O> { - #[doc = "Comparator hysteresis disabled"] - #[inline(always)] - pub fn no_hyst(self) -> &'a mut W { - self.variant(HYST_A::NO_HYST) - } - #[doc = "Comparator hysteresis enabled"] - #[inline(always)] - pub fn hyst50m_v(self) -> &'a mut W { - self.variant(HYST_A::HYST50M_V) - } -} -impl R { - #[doc = "Bit 0 - Comparator hysteresis"] - #[inline(always)] - pub fn hyst(&self) -> HYST_R { - HYST_R::new((self.bits & 1) != 0) - } -} -impl W { - #[doc = "Bit 0 - Comparator hysteresis"] - #[inline(always)] - #[must_use] - pub fn hyst(&mut self) -> HYST_W<0> { - HYST_W::new(self) - } - #[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 = "Comparator hysteresis enable\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 [hyst](index.html) module"] -pub struct HYST_SPEC; -impl crate::RegisterSpec for HYST_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [hyst::R](R) reader structure"] -impl crate::Readable for HYST_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [hyst::W](W) writer structure"] -impl crate::Writable for HYST_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets HYST to value 0"] -impl crate::Resettable for HYST_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/comp/inten.rs b/down-the-stack/dk_pac/src/comp/inten.rs deleted file mode 100644 index e147b42..0000000 --- a/down-the-stack/dk_pac/src/comp/inten.rs +++ /dev/null @@ -1,309 +0,0 @@ -#[doc = "Register `INTEN` 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 `INTEN` 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 `READY` reader - Enable or disable interrupt for event READY"] -pub type READY_R = crate::BitReader; -#[doc = "Enable or disable interrupt for event READY\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum READY_A { - #[doc = "0: Disable"] - DISABLED = 0, - #[doc = "1: Enable"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: READY_A) -> Self { - variant as u8 != 0 - } -} -impl READY_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> READY_A { - match self.bits { - false => READY_A::DISABLED, - true => READY_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == READY_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == READY_A::ENABLED - } -} -#[doc = "Field `READY` writer - Enable or disable interrupt for event READY"] -pub type READY_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTEN_SPEC, READY_A, O>; -impl<'a, const O: u8> READY_W<'a, O> { - #[doc = "Disable"] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(READY_A::DISABLED) - } - #[doc = "Enable"] - #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(READY_A::ENABLED) - } -} -#[doc = "Field `DOWN` reader - Enable or disable interrupt for event DOWN"] -pub type DOWN_R = crate::BitReader; -#[doc = "Enable or disable interrupt for event DOWN\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum DOWN_A { - #[doc = "0: Disable"] - DISABLED = 0, - #[doc = "1: Enable"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: DOWN_A) -> Self { - variant as u8 != 0 - } -} -impl DOWN_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> DOWN_A { - match self.bits { - false => DOWN_A::DISABLED, - true => DOWN_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == DOWN_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == DOWN_A::ENABLED - } -} -#[doc = "Field `DOWN` writer - Enable or disable interrupt for event DOWN"] -pub type DOWN_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTEN_SPEC, DOWN_A, O>; -impl<'a, const O: u8> DOWN_W<'a, O> { - #[doc = "Disable"] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(DOWN_A::DISABLED) - } - #[doc = "Enable"] - #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(DOWN_A::ENABLED) - } -} -#[doc = "Field `UP` reader - Enable or disable interrupt for event UP"] -pub type UP_R = crate::BitReader; -#[doc = "Enable or disable interrupt for event UP\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum UP_A { - #[doc = "0: Disable"] - DISABLED = 0, - #[doc = "1: Enable"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: UP_A) -> Self { - variant as u8 != 0 - } -} -impl UP_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> UP_A { - match self.bits { - false => UP_A::DISABLED, - true => UP_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == UP_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == UP_A::ENABLED - } -} -#[doc = "Field `UP` writer - Enable or disable interrupt for event UP"] -pub type UP_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTEN_SPEC, UP_A, O>; -impl<'a, const O: u8> UP_W<'a, O> { - #[doc = "Disable"] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(UP_A::DISABLED) - } - #[doc = "Enable"] - #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(UP_A::ENABLED) - } -} -#[doc = "Field `CROSS` reader - Enable or disable interrupt for event CROSS"] -pub type CROSS_R = crate::BitReader; -#[doc = "Enable or disable interrupt for event CROSS\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum CROSS_A { - #[doc = "0: Disable"] - DISABLED = 0, - #[doc = "1: Enable"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: CROSS_A) -> Self { - variant as u8 != 0 - } -} -impl CROSS_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> CROSS_A { - match self.bits { - false => CROSS_A::DISABLED, - true => CROSS_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == CROSS_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == CROSS_A::ENABLED - } -} -#[doc = "Field `CROSS` writer - Enable or disable interrupt for event CROSS"] -pub type CROSS_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTEN_SPEC, CROSS_A, O>; -impl<'a, const O: u8> CROSS_W<'a, O> { - #[doc = "Disable"] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(CROSS_A::DISABLED) - } - #[doc = "Enable"] - #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(CROSS_A::ENABLED) - } -} -impl R { - #[doc = "Bit 0 - Enable or disable interrupt for event READY"] - #[inline(always)] - pub fn ready(&self) -> READY_R { - READY_R::new((self.bits & 1) != 0) - } - #[doc = "Bit 1 - Enable or disable interrupt for event DOWN"] - #[inline(always)] - pub fn down(&self) -> DOWN_R { - DOWN_R::new(((self.bits >> 1) & 1) != 0) - } - #[doc = "Bit 2 - Enable or disable interrupt for event UP"] - #[inline(always)] - pub fn up(&self) -> UP_R { - UP_R::new(((self.bits >> 2) & 1) != 0) - } - #[doc = "Bit 3 - Enable or disable interrupt for event CROSS"] - #[inline(always)] - pub fn cross(&self) -> CROSS_R { - CROSS_R::new(((self.bits >> 3) & 1) != 0) - } -} -impl W { - #[doc = "Bit 0 - Enable or disable interrupt for event READY"] - #[inline(always)] - #[must_use] - pub fn ready(&mut self) -> READY_W<0> { - READY_W::new(self) - } - #[doc = "Bit 1 - Enable or disable interrupt for event DOWN"] - #[inline(always)] - #[must_use] - pub fn down(&mut self) -> DOWN_W<1> { - DOWN_W::new(self) - } - #[doc = "Bit 2 - Enable or disable interrupt for event UP"] - #[inline(always)] - #[must_use] - pub fn up(&mut self) -> UP_W<2> { - UP_W::new(self) - } - #[doc = "Bit 3 - Enable or disable interrupt for event CROSS"] - #[inline(always)] - #[must_use] - pub fn cross(&mut self) -> CROSS_W<3> { - CROSS_W::new(self) - } - #[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 = "Enable or disable interrupt\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 [inten](index.html) module"] -pub struct INTEN_SPEC; -impl crate::RegisterSpec for INTEN_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [inten::R](R) reader structure"] -impl crate::Readable for INTEN_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [inten::W](W) writer structure"] -impl crate::Writable for INTEN_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets INTEN to value 0"] -impl crate::Resettable for INTEN_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/comp/intenclr.rs b/down-the-stack/dk_pac/src/comp/intenclr.rs deleted file mode 100644 index 83a9d57..0000000 --- a/down-the-stack/dk_pac/src/comp/intenclr.rs +++ /dev/null @@ -1,337 +0,0 @@ -#[doc = "Register `INTENCLR` 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 `INTENCLR` 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 `READY` reader - Write '1' to disable interrupt for event READY"] -pub type READY_R = crate::BitReader; -#[doc = "Write '1' to disable interrupt for event READY\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum READY_A { - #[doc = "0: Read: Disabled"] - DISABLED = 0, - #[doc = "1: Read: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: READY_A) -> Self { - variant as u8 != 0 - } -} -impl READY_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> READY_A { - match self.bits { - false => READY_A::DISABLED, - true => READY_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == READY_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == READY_A::ENABLED - } -} -#[doc = "Write '1' to disable interrupt for event READY\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum READY_AW { - #[doc = "1: Disable"] - CLEAR = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: READY_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `READY` writer - Write '1' to disable interrupt for event READY"] -pub type READY_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENCLR_SPEC, READY_AW, O>; -impl<'a, const O: u8> READY_W<'a, O> { - #[doc = "Disable"] - #[inline(always)] - pub fn clear(self) -> &'a mut W { - self.variant(READY_AW::CLEAR) - } -} -#[doc = "Field `DOWN` reader - Write '1' to disable interrupt for event DOWN"] -pub type DOWN_R = crate::BitReader; -#[doc = "Write '1' to disable interrupt for event DOWN\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum DOWN_A { - #[doc = "0: Read: Disabled"] - DISABLED = 0, - #[doc = "1: Read: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: DOWN_A) -> Self { - variant as u8 != 0 - } -} -impl DOWN_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> DOWN_A { - match self.bits { - false => DOWN_A::DISABLED, - true => DOWN_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == DOWN_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == DOWN_A::ENABLED - } -} -#[doc = "Write '1' to disable interrupt for event DOWN\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum DOWN_AW { - #[doc = "1: Disable"] - CLEAR = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: DOWN_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `DOWN` writer - Write '1' to disable interrupt for event DOWN"] -pub type DOWN_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENCLR_SPEC, DOWN_AW, O>; -impl<'a, const O: u8> DOWN_W<'a, O> { - #[doc = "Disable"] - #[inline(always)] - pub fn clear(self) -> &'a mut W { - self.variant(DOWN_AW::CLEAR) - } -} -#[doc = "Field `UP` reader - Write '1' to disable interrupt for event UP"] -pub type UP_R = crate::BitReader; -#[doc = "Write '1' to disable interrupt for event UP\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum UP_A { - #[doc = "0: Read: Disabled"] - DISABLED = 0, - #[doc = "1: Read: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: UP_A) -> Self { - variant as u8 != 0 - } -} -impl UP_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> UP_A { - match self.bits { - false => UP_A::DISABLED, - true => UP_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == UP_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == UP_A::ENABLED - } -} -#[doc = "Write '1' to disable interrupt for event UP\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum UP_AW { - #[doc = "1: Disable"] - CLEAR = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: UP_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `UP` writer - Write '1' to disable interrupt for event UP"] -pub type UP_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENCLR_SPEC, UP_AW, O>; -impl<'a, const O: u8> UP_W<'a, O> { - #[doc = "Disable"] - #[inline(always)] - pub fn clear(self) -> &'a mut W { - self.variant(UP_AW::CLEAR) - } -} -#[doc = "Field `CROSS` reader - Write '1' to disable interrupt for event CROSS"] -pub type CROSS_R = crate::BitReader; -#[doc = "Write '1' to disable interrupt for event CROSS\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum CROSS_A { - #[doc = "0: Read: Disabled"] - DISABLED = 0, - #[doc = "1: Read: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: CROSS_A) -> Self { - variant as u8 != 0 - } -} -impl CROSS_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> CROSS_A { - match self.bits { - false => CROSS_A::DISABLED, - true => CROSS_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == CROSS_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == CROSS_A::ENABLED - } -} -#[doc = "Write '1' to disable interrupt for event CROSS\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum CROSS_AW { - #[doc = "1: Disable"] - CLEAR = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: CROSS_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `CROSS` writer - Write '1' to disable interrupt for event CROSS"] -pub type CROSS_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENCLR_SPEC, CROSS_AW, O>; -impl<'a, const O: u8> CROSS_W<'a, O> { - #[doc = "Disable"] - #[inline(always)] - pub fn clear(self) -> &'a mut W { - self.variant(CROSS_AW::CLEAR) - } -} -impl R { - #[doc = "Bit 0 - Write '1' to disable interrupt for event READY"] - #[inline(always)] - pub fn ready(&self) -> READY_R { - READY_R::new((self.bits & 1) != 0) - } - #[doc = "Bit 1 - Write '1' to disable interrupt for event DOWN"] - #[inline(always)] - pub fn down(&self) -> DOWN_R { - DOWN_R::new(((self.bits >> 1) & 1) != 0) - } - #[doc = "Bit 2 - Write '1' to disable interrupt for event UP"] - #[inline(always)] - pub fn up(&self) -> UP_R { - UP_R::new(((self.bits >> 2) & 1) != 0) - } - #[doc = "Bit 3 - Write '1' to disable interrupt for event CROSS"] - #[inline(always)] - pub fn cross(&self) -> CROSS_R { - CROSS_R::new(((self.bits >> 3) & 1) != 0) - } -} -impl W { - #[doc = "Bit 0 - Write '1' to disable interrupt for event READY"] - #[inline(always)] - #[must_use] - pub fn ready(&mut self) -> READY_W<0> { - READY_W::new(self) - } - #[doc = "Bit 1 - Write '1' to disable interrupt for event DOWN"] - #[inline(always)] - #[must_use] - pub fn down(&mut self) -> DOWN_W<1> { - DOWN_W::new(self) - } - #[doc = "Bit 2 - Write '1' to disable interrupt for event UP"] - #[inline(always)] - #[must_use] - pub fn up(&mut self) -> UP_W<2> { - UP_W::new(self) - } - #[doc = "Bit 3 - Write '1' to disable interrupt for event CROSS"] - #[inline(always)] - #[must_use] - pub fn cross(&mut self) -> CROSS_W<3> { - CROSS_W::new(self) - } - #[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 = "Disable interrupt\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 [intenclr](index.html) module"] -pub struct INTENCLR_SPEC; -impl crate::RegisterSpec for INTENCLR_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [intenclr::R](R) reader structure"] -impl crate::Readable for INTENCLR_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [intenclr::W](W) writer structure"] -impl crate::Writable for INTENCLR_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets INTENCLR to value 0"] -impl crate::Resettable for INTENCLR_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/comp/intenset.rs b/down-the-stack/dk_pac/src/comp/intenset.rs deleted file mode 100644 index 362f006..0000000 --- a/down-the-stack/dk_pac/src/comp/intenset.rs +++ /dev/null @@ -1,337 +0,0 @@ -#[doc = "Register `INTENSET` 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 `INTENSET` 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 `READY` reader - Write '1' to enable interrupt for event READY"] -pub type READY_R = crate::BitReader; -#[doc = "Write '1' to enable interrupt for event READY\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum READY_A { - #[doc = "0: Read: Disabled"] - DISABLED = 0, - #[doc = "1: Read: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: READY_A) -> Self { - variant as u8 != 0 - } -} -impl READY_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> READY_A { - match self.bits { - false => READY_A::DISABLED, - true => READY_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == READY_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == READY_A::ENABLED - } -} -#[doc = "Write '1' to enable interrupt for event READY\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum READY_AW { - #[doc = "1: Enable"] - SET = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: READY_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `READY` writer - Write '1' to enable interrupt for event READY"] -pub type READY_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENSET_SPEC, READY_AW, O>; -impl<'a, const O: u8> READY_W<'a, O> { - #[doc = "Enable"] - #[inline(always)] - pub fn set(self) -> &'a mut W { - self.variant(READY_AW::SET) - } -} -#[doc = "Field `DOWN` reader - Write '1' to enable interrupt for event DOWN"] -pub type DOWN_R = crate::BitReader; -#[doc = "Write '1' to enable interrupt for event DOWN\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum DOWN_A { - #[doc = "0: Read: Disabled"] - DISABLED = 0, - #[doc = "1: Read: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: DOWN_A) -> Self { - variant as u8 != 0 - } -} -impl DOWN_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> DOWN_A { - match self.bits { - false => DOWN_A::DISABLED, - true => DOWN_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == DOWN_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == DOWN_A::ENABLED - } -} -#[doc = "Write '1' to enable interrupt for event DOWN\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum DOWN_AW { - #[doc = "1: Enable"] - SET = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: DOWN_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `DOWN` writer - Write '1' to enable interrupt for event DOWN"] -pub type DOWN_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENSET_SPEC, DOWN_AW, O>; -impl<'a, const O: u8> DOWN_W<'a, O> { - #[doc = "Enable"] - #[inline(always)] - pub fn set(self) -> &'a mut W { - self.variant(DOWN_AW::SET) - } -} -#[doc = "Field `UP` reader - Write '1' to enable interrupt for event UP"] -pub type UP_R = crate::BitReader; -#[doc = "Write '1' to enable interrupt for event UP\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum UP_A { - #[doc = "0: Read: Disabled"] - DISABLED = 0, - #[doc = "1: Read: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: UP_A) -> Self { - variant as u8 != 0 - } -} -impl UP_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> UP_A { - match self.bits { - false => UP_A::DISABLED, - true => UP_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == UP_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == UP_A::ENABLED - } -} -#[doc = "Write '1' to enable interrupt for event UP\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum UP_AW { - #[doc = "1: Enable"] - SET = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: UP_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `UP` writer - Write '1' to enable interrupt for event UP"] -pub type UP_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENSET_SPEC, UP_AW, O>; -impl<'a, const O: u8> UP_W<'a, O> { - #[doc = "Enable"] - #[inline(always)] - pub fn set(self) -> &'a mut W { - self.variant(UP_AW::SET) - } -} -#[doc = "Field `CROSS` reader - Write '1' to enable interrupt for event CROSS"] -pub type CROSS_R = crate::BitReader; -#[doc = "Write '1' to enable interrupt for event CROSS\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum CROSS_A { - #[doc = "0: Read: Disabled"] - DISABLED = 0, - #[doc = "1: Read: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: CROSS_A) -> Self { - variant as u8 != 0 - } -} -impl CROSS_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> CROSS_A { - match self.bits { - false => CROSS_A::DISABLED, - true => CROSS_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == CROSS_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == CROSS_A::ENABLED - } -} -#[doc = "Write '1' to enable interrupt for event CROSS\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum CROSS_AW { - #[doc = "1: Enable"] - SET = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: CROSS_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `CROSS` writer - Write '1' to enable interrupt for event CROSS"] -pub type CROSS_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENSET_SPEC, CROSS_AW, O>; -impl<'a, const O: u8> CROSS_W<'a, O> { - #[doc = "Enable"] - #[inline(always)] - pub fn set(self) -> &'a mut W { - self.variant(CROSS_AW::SET) - } -} -impl R { - #[doc = "Bit 0 - Write '1' to enable interrupt for event READY"] - #[inline(always)] - pub fn ready(&self) -> READY_R { - READY_R::new((self.bits & 1) != 0) - } - #[doc = "Bit 1 - Write '1' to enable interrupt for event DOWN"] - #[inline(always)] - pub fn down(&self) -> DOWN_R { - DOWN_R::new(((self.bits >> 1) & 1) != 0) - } - #[doc = "Bit 2 - Write '1' to enable interrupt for event UP"] - #[inline(always)] - pub fn up(&self) -> UP_R { - UP_R::new(((self.bits >> 2) & 1) != 0) - } - #[doc = "Bit 3 - Write '1' to enable interrupt for event CROSS"] - #[inline(always)] - pub fn cross(&self) -> CROSS_R { - CROSS_R::new(((self.bits >> 3) & 1) != 0) - } -} -impl W { - #[doc = "Bit 0 - Write '1' to enable interrupt for event READY"] - #[inline(always)] - #[must_use] - pub fn ready(&mut self) -> READY_W<0> { - READY_W::new(self) - } - #[doc = "Bit 1 - Write '1' to enable interrupt for event DOWN"] - #[inline(always)] - #[must_use] - pub fn down(&mut self) -> DOWN_W<1> { - DOWN_W::new(self) - } - #[doc = "Bit 2 - Write '1' to enable interrupt for event UP"] - #[inline(always)] - #[must_use] - pub fn up(&mut self) -> UP_W<2> { - UP_W::new(self) - } - #[doc = "Bit 3 - Write '1' to enable interrupt for event CROSS"] - #[inline(always)] - #[must_use] - pub fn cross(&mut self) -> CROSS_W<3> { - CROSS_W::new(self) - } - #[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 = "Enable interrupt\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 [intenset](index.html) module"] -pub struct INTENSET_SPEC; -impl crate::RegisterSpec for INTENSET_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [intenset::R](R) reader structure"] -impl crate::Readable for INTENSET_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [intenset::W](W) writer structure"] -impl crate::Writable for INTENSET_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets INTENSET to value 0"] -impl crate::Resettable for INTENSET_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/comp/isource.rs b/down-the-stack/dk_pac/src/comp/isource.rs deleted file mode 100644 index c88b2cf..0000000 --- a/down-the-stack/dk_pac/src/comp/isource.rs +++ /dev/null @@ -1,155 +0,0 @@ -#[doc = "Register `ISOURCE` 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 `ISOURCE` 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 `ISOURCE` reader - Comparator hysteresis"] -pub type ISOURCE_R = crate::FieldReader; -#[doc = "Comparator hysteresis\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -#[repr(u8)] -pub enum ISOURCE_A { - #[doc = "0: Current source disabled"] - OFF = 0, - #[doc = "1: Current source enabled (+/- 2.5 uA)"] - IEN2M_A5 = 1, - #[doc = "2: Current source enabled (+/- 5 uA)"] - IEN5M_A = 2, - #[doc = "3: Current source enabled (+/- 10 uA)"] - IEN10M_A = 3, -} -impl From for u8 { - #[inline(always)] - fn from(variant: ISOURCE_A) -> Self { - variant as _ - } -} -impl ISOURCE_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> ISOURCE_A { - match self.bits { - 0 => ISOURCE_A::OFF, - 1 => ISOURCE_A::IEN2M_A5, - 2 => ISOURCE_A::IEN5M_A, - 3 => ISOURCE_A::IEN10M_A, - _ => unreachable!(), - } - } - #[doc = "Checks if the value of the field is `OFF`"] - #[inline(always)] - pub fn is_off(&self) -> bool { - *self == ISOURCE_A::OFF - } - #[doc = "Checks if the value of the field is `IEN2M_A5`"] - #[inline(always)] - pub fn is_ien2m_a5(&self) -> bool { - *self == ISOURCE_A::IEN2M_A5 - } - #[doc = "Checks if the value of the field is `IEN5M_A`"] - #[inline(always)] - pub fn is_ien5m_a(&self) -> bool { - *self == ISOURCE_A::IEN5M_A - } - #[doc = "Checks if the value of the field is `IEN10M_A`"] - #[inline(always)] - pub fn is_ien10m_a(&self) -> bool { - *self == ISOURCE_A::IEN10M_A - } -} -#[doc = "Field `ISOURCE` writer - Comparator hysteresis"] -pub type ISOURCE_W<'a, const O: u8> = - crate::FieldWriterSafe<'a, u32, ISOURCE_SPEC, u8, ISOURCE_A, 2, O>; -impl<'a, const O: u8> ISOURCE_W<'a, O> { - #[doc = "Current source disabled"] - #[inline(always)] - pub fn off(self) -> &'a mut W { - self.variant(ISOURCE_A::OFF) - } - #[doc = "Current source enabled (+/- 2.5 uA)"] - #[inline(always)] - pub fn ien2m_a5(self) -> &'a mut W { - self.variant(ISOURCE_A::IEN2M_A5) - } - #[doc = "Current source enabled (+/- 5 uA)"] - #[inline(always)] - pub fn ien5m_a(self) -> &'a mut W { - self.variant(ISOURCE_A::IEN5M_A) - } - #[doc = "Current source enabled (+/- 10 uA)"] - #[inline(always)] - pub fn ien10m_a(self) -> &'a mut W { - self.variant(ISOURCE_A::IEN10M_A) - } -} -impl R { - #[doc = "Bits 0:1 - Comparator hysteresis"] - #[inline(always)] - pub fn isource(&self) -> ISOURCE_R { - ISOURCE_R::new((self.bits & 3) as u8) - } -} -impl W { - #[doc = "Bits 0:1 - Comparator hysteresis"] - #[inline(always)] - #[must_use] - pub fn isource(&mut self) -> ISOURCE_W<0> { - ISOURCE_W::new(self) - } - #[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 = "Current source select on analog input\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 [isource](index.html) module"] -pub struct ISOURCE_SPEC; -impl crate::RegisterSpec for ISOURCE_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [isource::R](R) reader structure"] -impl crate::Readable for ISOURCE_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [isource::W](W) writer structure"] -impl crate::Writable for ISOURCE_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets ISOURCE to value 0"] -impl crate::Resettable for ISOURCE_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/comp/mode.rs b/down-the-stack/dk_pac/src/comp/mode.rs deleted file mode 100644 index 4ac906d..0000000 --- a/down-the-stack/dk_pac/src/comp/mode.rs +++ /dev/null @@ -1,202 +0,0 @@ -#[doc = "Register `MODE` 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 `MODE` 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 `SP` reader - Speed and power modes"] -pub type SP_R = crate::FieldReader; -#[doc = "Speed and power modes\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -#[repr(u8)] -pub enum SP_A { - #[doc = "0: Low-power mode"] - LOW = 0, - #[doc = "1: Normal mode"] - NORMAL = 1, - #[doc = "2: High-speed mode"] - HIGH = 2, -} -impl From for u8 { - #[inline(always)] - fn from(variant: SP_A) -> Self { - variant as _ - } -} -impl SP_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> Option { - match self.bits { - 0 => Some(SP_A::LOW), - 1 => Some(SP_A::NORMAL), - 2 => Some(SP_A::HIGH), - _ => None, - } - } - #[doc = "Checks if the value of the field is `LOW`"] - #[inline(always)] - pub fn is_low(&self) -> bool { - *self == SP_A::LOW - } - #[doc = "Checks if the value of the field is `NORMAL`"] - #[inline(always)] - pub fn is_normal(&self) -> bool { - *self == SP_A::NORMAL - } - #[doc = "Checks if the value of the field is `HIGH`"] - #[inline(always)] - pub fn is_high(&self) -> bool { - *self == SP_A::HIGH - } -} -#[doc = "Field `SP` writer - Speed and power modes"] -pub type SP_W<'a, const O: u8> = crate::FieldWriter<'a, u32, MODE_SPEC, u8, SP_A, 2, O>; -impl<'a, const O: u8> SP_W<'a, O> { - #[doc = "Low-power mode"] - #[inline(always)] - pub fn low(self) -> &'a mut W { - self.variant(SP_A::LOW) - } - #[doc = "Normal mode"] - #[inline(always)] - pub fn normal(self) -> &'a mut W { - self.variant(SP_A::NORMAL) - } - #[doc = "High-speed mode"] - #[inline(always)] - pub fn high(self) -> &'a mut W { - self.variant(SP_A::HIGH) - } -} -#[doc = "Field `MAIN` reader - Main operation modes"] -pub type MAIN_R = crate::BitReader; -#[doc = "Main operation modes\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum MAIN_A { - #[doc = "0: Single-ended mode"] - SE = 0, - #[doc = "1: Differential mode"] - DIFF = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: MAIN_A) -> Self { - variant as u8 != 0 - } -} -impl MAIN_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> MAIN_A { - match self.bits { - false => MAIN_A::SE, - true => MAIN_A::DIFF, - } - } - #[doc = "Checks if the value of the field is `SE`"] - #[inline(always)] - pub fn is_se(&self) -> bool { - *self == MAIN_A::SE - } - #[doc = "Checks if the value of the field is `DIFF`"] - #[inline(always)] - pub fn is_diff(&self) -> bool { - *self == MAIN_A::DIFF - } -} -#[doc = "Field `MAIN` writer - Main operation modes"] -pub type MAIN_W<'a, const O: u8> = crate::BitWriter<'a, u32, MODE_SPEC, MAIN_A, O>; -impl<'a, const O: u8> MAIN_W<'a, O> { - #[doc = "Single-ended mode"] - #[inline(always)] - pub fn se(self) -> &'a mut W { - self.variant(MAIN_A::SE) - } - #[doc = "Differential mode"] - #[inline(always)] - pub fn diff(self) -> &'a mut W { - self.variant(MAIN_A::DIFF) - } -} -impl R { - #[doc = "Bits 0:1 - Speed and power modes"] - #[inline(always)] - pub fn sp(&self) -> SP_R { - SP_R::new((self.bits & 3) as u8) - } - #[doc = "Bit 8 - Main operation modes"] - #[inline(always)] - pub fn main(&self) -> MAIN_R { - MAIN_R::new(((self.bits >> 8) & 1) != 0) - } -} -impl W { - #[doc = "Bits 0:1 - Speed and power modes"] - #[inline(always)] - #[must_use] - pub fn sp(&mut self) -> SP_W<0> { - SP_W::new(self) - } - #[doc = "Bit 8 - Main operation modes"] - #[inline(always)] - #[must_use] - pub fn main(&mut self) -> MAIN_W<8> { - MAIN_W::new(self) - } - #[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 = "Mode configuration\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 [mode](index.html) module"] -pub struct MODE_SPEC; -impl crate::RegisterSpec for MODE_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [mode::R](R) reader structure"] -impl crate::Readable for MODE_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [mode::W](W) writer structure"] -impl crate::Writable for 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 MODE to value 0"] -impl crate::Resettable for MODE_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/comp/psel.rs b/down-the-stack/dk_pac/src/comp/psel.rs deleted file mode 100644 index 821771e..0000000 --- a/down-the-stack/dk_pac/src/comp/psel.rs +++ /dev/null @@ -1,206 +0,0 @@ -#[doc = "Register `PSEL` 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 `PSEL` 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 `PSEL` reader - Analog pin select"] -pub type PSEL_R = crate::FieldReader; -#[doc = "Analog pin select\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -#[repr(u8)] -pub enum PSEL_A { - #[doc = "0: AIN0 selected as analog input"] - ANALOG_INPUT0 = 0, - #[doc = "1: AIN1 selected as analog input"] - ANALOG_INPUT1 = 1, - #[doc = "2: AIN2 selected as analog input"] - ANALOG_INPUT2 = 2, - #[doc = "3: AIN3 selected as analog input"] - ANALOG_INPUT3 = 3, - #[doc = "4: AIN4 selected as analog input"] - ANALOG_INPUT4 = 4, - #[doc = "5: AIN5 selected as analog input"] - ANALOG_INPUT5 = 5, - #[doc = "6: AIN6 selected as analog input"] - ANALOG_INPUT6 = 6, - #[doc = "7: AIN7 selected as analog input"] - ANALOG_INPUT7 = 7, -} -impl From for u8 { - #[inline(always)] - fn from(variant: PSEL_A) -> Self { - variant as _ - } -} -impl PSEL_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> PSEL_A { - match self.bits { - 0 => PSEL_A::ANALOG_INPUT0, - 1 => PSEL_A::ANALOG_INPUT1, - 2 => PSEL_A::ANALOG_INPUT2, - 3 => PSEL_A::ANALOG_INPUT3, - 4 => PSEL_A::ANALOG_INPUT4, - 5 => PSEL_A::ANALOG_INPUT5, - 6 => PSEL_A::ANALOG_INPUT6, - 7 => PSEL_A::ANALOG_INPUT7, - _ => unreachable!(), - } - } - #[doc = "Checks if the value of the field is `ANALOG_INPUT0`"] - #[inline(always)] - pub fn is_analog_input0(&self) -> bool { - *self == PSEL_A::ANALOG_INPUT0 - } - #[doc = "Checks if the value of the field is `ANALOG_INPUT1`"] - #[inline(always)] - pub fn is_analog_input1(&self) -> bool { - *self == PSEL_A::ANALOG_INPUT1 - } - #[doc = "Checks if the value of the field is `ANALOG_INPUT2`"] - #[inline(always)] - pub fn is_analog_input2(&self) -> bool { - *self == PSEL_A::ANALOG_INPUT2 - } - #[doc = "Checks if the value of the field is `ANALOG_INPUT3`"] - #[inline(always)] - pub fn is_analog_input3(&self) -> bool { - *self == PSEL_A::ANALOG_INPUT3 - } - #[doc = "Checks if the value of the field is `ANALOG_INPUT4`"] - #[inline(always)] - pub fn is_analog_input4(&self) -> bool { - *self == PSEL_A::ANALOG_INPUT4 - } - #[doc = "Checks if the value of the field is `ANALOG_INPUT5`"] - #[inline(always)] - pub fn is_analog_input5(&self) -> bool { - *self == PSEL_A::ANALOG_INPUT5 - } - #[doc = "Checks if the value of the field is `ANALOG_INPUT6`"] - #[inline(always)] - pub fn is_analog_input6(&self) -> bool { - *self == PSEL_A::ANALOG_INPUT6 - } - #[doc = "Checks if the value of the field is `ANALOG_INPUT7`"] - #[inline(always)] - pub fn is_analog_input7(&self) -> bool { - *self == PSEL_A::ANALOG_INPUT7 - } -} -#[doc = "Field `PSEL` writer - Analog pin select"] -pub type PSEL_W<'a, const O: u8> = crate::FieldWriterSafe<'a, u32, PSEL_SPEC, u8, PSEL_A, 3, O>; -impl<'a, const O: u8> PSEL_W<'a, O> { - #[doc = "AIN0 selected as analog input"] - #[inline(always)] - pub fn analog_input0(self) -> &'a mut W { - self.variant(PSEL_A::ANALOG_INPUT0) - } - #[doc = "AIN1 selected as analog input"] - #[inline(always)] - pub fn analog_input1(self) -> &'a mut W { - self.variant(PSEL_A::ANALOG_INPUT1) - } - #[doc = "AIN2 selected as analog input"] - #[inline(always)] - pub fn analog_input2(self) -> &'a mut W { - self.variant(PSEL_A::ANALOG_INPUT2) - } - #[doc = "AIN3 selected as analog input"] - #[inline(always)] - pub fn analog_input3(self) -> &'a mut W { - self.variant(PSEL_A::ANALOG_INPUT3) - } - #[doc = "AIN4 selected as analog input"] - #[inline(always)] - pub fn analog_input4(self) -> &'a mut W { - self.variant(PSEL_A::ANALOG_INPUT4) - } - #[doc = "AIN5 selected as analog input"] - #[inline(always)] - pub fn analog_input5(self) -> &'a mut W { - self.variant(PSEL_A::ANALOG_INPUT5) - } - #[doc = "AIN6 selected as analog input"] - #[inline(always)] - pub fn analog_input6(self) -> &'a mut W { - self.variant(PSEL_A::ANALOG_INPUT6) - } - #[doc = "AIN7 selected as analog input"] - #[inline(always)] - pub fn analog_input7(self) -> &'a mut W { - self.variant(PSEL_A::ANALOG_INPUT7) - } -} -impl R { - #[doc = "Bits 0:2 - Analog pin select"] - #[inline(always)] - pub fn psel(&self) -> PSEL_R { - PSEL_R::new((self.bits & 7) as u8) - } -} -impl W { - #[doc = "Bits 0:2 - Analog pin select"] - #[inline(always)] - #[must_use] - pub fn psel(&mut self) -> PSEL_W<0> { - PSEL_W::new(self) - } - #[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 = "Pin select\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 [psel](index.html) module"] -pub struct PSEL_SPEC; -impl crate::RegisterSpec for PSEL_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [psel::R](R) reader structure"] -impl crate::Readable for PSEL_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [psel::W](W) writer structure"] -impl crate::Writable for PSEL_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets PSEL to value 0"] -impl crate::Resettable for PSEL_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/comp/refsel.rs b/down-the-stack/dk_pac/src/comp/refsel.rs deleted file mode 100644 index d937dc5..0000000 --- a/down-the-stack/dk_pac/src/comp/refsel.rs +++ /dev/null @@ -1,167 +0,0 @@ -#[doc = "Register `REFSEL` 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 `REFSEL` 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 `REFSEL` reader - Reference select"] -pub type REFSEL_R = crate::FieldReader; -#[doc = "Reference select\n\nValue on reset: 4"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -#[repr(u8)] -pub enum REFSEL_A { - #[doc = "0: VREF = internal 1.2 V reference (VDD >= 1.7 V)"] - INT1V2 = 0, - #[doc = "1: VREF = internal 1.8 V reference (VDD >= VREF + 0.2 V)"] - INT1V8 = 1, - #[doc = "2: VREF = internal 2.4 V reference (VDD >= VREF + 0.2 V)"] - INT2V4 = 2, - #[doc = "4: VREF = VDD"] - VDD = 4, - #[doc = "7: VREF = AREF (VDD >= VREF >= AREFMIN)"] - AREF = 7, -} -impl From for u8 { - #[inline(always)] - fn from(variant: REFSEL_A) -> Self { - variant as _ - } -} -impl REFSEL_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> Option { - match self.bits { - 0 => Some(REFSEL_A::INT1V2), - 1 => Some(REFSEL_A::INT1V8), - 2 => Some(REFSEL_A::INT2V4), - 4 => Some(REFSEL_A::VDD), - 7 => Some(REFSEL_A::AREF), - _ => None, - } - } - #[doc = "Checks if the value of the field is `INT1V2`"] - #[inline(always)] - pub fn is_int1v2(&self) -> bool { - *self == REFSEL_A::INT1V2 - } - #[doc = "Checks if the value of the field is `INT1V8`"] - #[inline(always)] - pub fn is_int1v8(&self) -> bool { - *self == REFSEL_A::INT1V8 - } - #[doc = "Checks if the value of the field is `INT2V4`"] - #[inline(always)] - pub fn is_int2v4(&self) -> bool { - *self == REFSEL_A::INT2V4 - } - #[doc = "Checks if the value of the field is `VDD`"] - #[inline(always)] - pub fn is_vdd(&self) -> bool { - *self == REFSEL_A::VDD - } - #[doc = "Checks if the value of the field is `AREF`"] - #[inline(always)] - pub fn is_aref(&self) -> bool { - *self == REFSEL_A::AREF - } -} -#[doc = "Field `REFSEL` writer - Reference select"] -pub type REFSEL_W<'a, const O: u8> = crate::FieldWriter<'a, u32, REFSEL_SPEC, u8, REFSEL_A, 3, O>; -impl<'a, const O: u8> REFSEL_W<'a, O> { - #[doc = "VREF = internal 1.2 V reference (VDD >= 1.7 V)"] - #[inline(always)] - pub fn int1v2(self) -> &'a mut W { - self.variant(REFSEL_A::INT1V2) - } - #[doc = "VREF = internal 1.8 V reference (VDD >= VREF + 0.2 V)"] - #[inline(always)] - pub fn int1v8(self) -> &'a mut W { - self.variant(REFSEL_A::INT1V8) - } - #[doc = "VREF = internal 2.4 V reference (VDD >= VREF + 0.2 V)"] - #[inline(always)] - pub fn int2v4(self) -> &'a mut W { - self.variant(REFSEL_A::INT2V4) - } - #[doc = "VREF = VDD"] - #[inline(always)] - pub fn vdd(self) -> &'a mut W { - self.variant(REFSEL_A::VDD) - } - #[doc = "VREF = AREF (VDD >= VREF >= AREFMIN)"] - #[inline(always)] - pub fn aref(self) -> &'a mut W { - self.variant(REFSEL_A::AREF) - } -} -impl R { - #[doc = "Bits 0:2 - Reference select"] - #[inline(always)] - pub fn refsel(&self) -> REFSEL_R { - REFSEL_R::new((self.bits & 7) as u8) - } -} -impl W { - #[doc = "Bits 0:2 - Reference select"] - #[inline(always)] - #[must_use] - pub fn refsel(&mut self) -> REFSEL_W<0> { - REFSEL_W::new(self) - } - #[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 = "Reference source select for single-ended mode\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 [refsel](index.html) module"] -pub struct REFSEL_SPEC; -impl crate::RegisterSpec for REFSEL_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [refsel::R](R) reader structure"] -impl crate::Readable for REFSEL_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [refsel::W](W) writer structure"] -impl crate::Writable for REFSEL_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets REFSEL to value 0x04"] -impl crate::Resettable for REFSEL_SPEC { - const RESET_VALUE: Self::Ux = 0x04; -} diff --git a/down-the-stack/dk_pac/src/comp/result.rs b/down-the-stack/dk_pac/src/comp/result.rs deleted file mode 100644 index 3a306c1..0000000 --- a/down-the-stack/dk_pac/src/comp/result.rs +++ /dev/null @@ -1,71 +0,0 @@ -#[doc = "Register `RESULT` 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 = "Field `RESULT` reader - Result of last compare. Decision point SAMPLE task."] -pub type RESULT_R = crate::BitReader; -#[doc = "Result of last compare. Decision point SAMPLE task.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum RESULT_A { - #[doc = "0: Input voltage is below the threshold (VIN+ < VIN-)"] - BELOW = 0, - #[doc = "1: Input voltage is above the threshold (VIN+ > VIN-)"] - ABOVE = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: RESULT_A) -> Self { - variant as u8 != 0 - } -} -impl RESULT_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> RESULT_A { - match self.bits { - false => RESULT_A::BELOW, - true => RESULT_A::ABOVE, - } - } - #[doc = "Checks if the value of the field is `BELOW`"] - #[inline(always)] - pub fn is_below(&self) -> bool { - *self == RESULT_A::BELOW - } - #[doc = "Checks if the value of the field is `ABOVE`"] - #[inline(always)] - pub fn is_above(&self) -> bool { - *self == RESULT_A::ABOVE - } -} -impl R { - #[doc = "Bit 0 - Result of last compare. Decision point SAMPLE task."] - #[inline(always)] - pub fn result(&self) -> RESULT_R { - RESULT_R::new((self.bits & 1) != 0) - } -} -#[doc = "Compare 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 [result](index.html) module"] -pub struct RESULT_SPEC; -impl crate::RegisterSpec for RESULT_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [result::R](R) reader structure"] -impl crate::Readable for RESULT_SPEC { - type Reader = R; -} -#[doc = "`reset()` method sets RESULT to value 0"] -impl crate::Resettable for RESULT_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/comp/shorts.rs b/down-the-stack/dk_pac/src/comp/shorts.rs deleted file mode 100644 index ddbbc06..0000000 --- a/down-the-stack/dk_pac/src/comp/shorts.rs +++ /dev/null @@ -1,371 +0,0 @@ -#[doc = "Register `SHORTS` 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 `SHORTS` 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 `READY_SAMPLE` reader - Shortcut between event READY and task SAMPLE"] -pub type READY_SAMPLE_R = crate::BitReader; -#[doc = "Shortcut between event READY and task SAMPLE\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum READY_SAMPLE_A { - #[doc = "0: Disable shortcut"] - DISABLED = 0, - #[doc = "1: Enable shortcut"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: READY_SAMPLE_A) -> Self { - variant as u8 != 0 - } -} -impl READY_SAMPLE_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> READY_SAMPLE_A { - match self.bits { - false => READY_SAMPLE_A::DISABLED, - true => READY_SAMPLE_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == READY_SAMPLE_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == READY_SAMPLE_A::ENABLED - } -} -#[doc = "Field `READY_SAMPLE` writer - Shortcut between event READY and task SAMPLE"] -pub type READY_SAMPLE_W<'a, const O: u8> = - crate::BitWriter<'a, u32, SHORTS_SPEC, READY_SAMPLE_A, O>; -impl<'a, const O: u8> READY_SAMPLE_W<'a, O> { - #[doc = "Disable shortcut"] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(READY_SAMPLE_A::DISABLED) - } - #[doc = "Enable shortcut"] - #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(READY_SAMPLE_A::ENABLED) - } -} -#[doc = "Field `READY_STOP` reader - Shortcut between event READY and task STOP"] -pub type READY_STOP_R = crate::BitReader; -#[doc = "Shortcut between event READY and task STOP\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum READY_STOP_A { - #[doc = "0: Disable shortcut"] - DISABLED = 0, - #[doc = "1: Enable shortcut"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: READY_STOP_A) -> Self { - variant as u8 != 0 - } -} -impl READY_STOP_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> READY_STOP_A { - match self.bits { - false => READY_STOP_A::DISABLED, - true => READY_STOP_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == READY_STOP_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == READY_STOP_A::ENABLED - } -} -#[doc = "Field `READY_STOP` writer - Shortcut between event READY and task STOP"] -pub type READY_STOP_W<'a, const O: u8> = crate::BitWriter<'a, u32, SHORTS_SPEC, READY_STOP_A, O>; -impl<'a, const O: u8> READY_STOP_W<'a, O> { - #[doc = "Disable shortcut"] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(READY_STOP_A::DISABLED) - } - #[doc = "Enable shortcut"] - #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(READY_STOP_A::ENABLED) - } -} -#[doc = "Field `DOWN_STOP` reader - Shortcut between event DOWN and task STOP"] -pub type DOWN_STOP_R = crate::BitReader; -#[doc = "Shortcut between event DOWN and task STOP\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum DOWN_STOP_A { - #[doc = "0: Disable shortcut"] - DISABLED = 0, - #[doc = "1: Enable shortcut"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: DOWN_STOP_A) -> Self { - variant as u8 != 0 - } -} -impl DOWN_STOP_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> DOWN_STOP_A { - match self.bits { - false => DOWN_STOP_A::DISABLED, - true => DOWN_STOP_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == DOWN_STOP_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == DOWN_STOP_A::ENABLED - } -} -#[doc = "Field `DOWN_STOP` writer - Shortcut between event DOWN and task STOP"] -pub type DOWN_STOP_W<'a, const O: u8> = crate::BitWriter<'a, u32, SHORTS_SPEC, DOWN_STOP_A, O>; -impl<'a, const O: u8> DOWN_STOP_W<'a, O> { - #[doc = "Disable shortcut"] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(DOWN_STOP_A::DISABLED) - } - #[doc = "Enable shortcut"] - #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(DOWN_STOP_A::ENABLED) - } -} -#[doc = "Field `UP_STOP` reader - Shortcut between event UP and task STOP"] -pub type UP_STOP_R = crate::BitReader; -#[doc = "Shortcut between event UP and task STOP\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum UP_STOP_A { - #[doc = "0: Disable shortcut"] - DISABLED = 0, - #[doc = "1: Enable shortcut"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: UP_STOP_A) -> Self { - variant as u8 != 0 - } -} -impl UP_STOP_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> UP_STOP_A { - match self.bits { - false => UP_STOP_A::DISABLED, - true => UP_STOP_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == UP_STOP_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == UP_STOP_A::ENABLED - } -} -#[doc = "Field `UP_STOP` writer - Shortcut between event UP and task STOP"] -pub type UP_STOP_W<'a, const O: u8> = crate::BitWriter<'a, u32, SHORTS_SPEC, UP_STOP_A, O>; -impl<'a, const O: u8> UP_STOP_W<'a, O> { - #[doc = "Disable shortcut"] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(UP_STOP_A::DISABLED) - } - #[doc = "Enable shortcut"] - #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(UP_STOP_A::ENABLED) - } -} -#[doc = "Field `CROSS_STOP` reader - Shortcut between event CROSS and task STOP"] -pub type CROSS_STOP_R = crate::BitReader; -#[doc = "Shortcut between event CROSS and task STOP\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum CROSS_STOP_A { - #[doc = "0: Disable shortcut"] - DISABLED = 0, - #[doc = "1: Enable shortcut"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: CROSS_STOP_A) -> Self { - variant as u8 != 0 - } -} -impl CROSS_STOP_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> CROSS_STOP_A { - match self.bits { - false => CROSS_STOP_A::DISABLED, - true => CROSS_STOP_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == CROSS_STOP_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == CROSS_STOP_A::ENABLED - } -} -#[doc = "Field `CROSS_STOP` writer - Shortcut between event CROSS and task STOP"] -pub type CROSS_STOP_W<'a, const O: u8> = crate::BitWriter<'a, u32, SHORTS_SPEC, CROSS_STOP_A, O>; -impl<'a, const O: u8> CROSS_STOP_W<'a, O> { - #[doc = "Disable shortcut"] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(CROSS_STOP_A::DISABLED) - } - #[doc = "Enable shortcut"] - #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(CROSS_STOP_A::ENABLED) - } -} -impl R { - #[doc = "Bit 0 - Shortcut between event READY and task SAMPLE"] - #[inline(always)] - pub fn ready_sample(&self) -> READY_SAMPLE_R { - READY_SAMPLE_R::new((self.bits & 1) != 0) - } - #[doc = "Bit 1 - Shortcut between event READY and task STOP"] - #[inline(always)] - pub fn ready_stop(&self) -> READY_STOP_R { - READY_STOP_R::new(((self.bits >> 1) & 1) != 0) - } - #[doc = "Bit 2 - Shortcut between event DOWN and task STOP"] - #[inline(always)] - pub fn down_stop(&self) -> DOWN_STOP_R { - DOWN_STOP_R::new(((self.bits >> 2) & 1) != 0) - } - #[doc = "Bit 3 - Shortcut between event UP and task STOP"] - #[inline(always)] - pub fn up_stop(&self) -> UP_STOP_R { - UP_STOP_R::new(((self.bits >> 3) & 1) != 0) - } - #[doc = "Bit 4 - Shortcut between event CROSS and task STOP"] - #[inline(always)] - pub fn cross_stop(&self) -> CROSS_STOP_R { - CROSS_STOP_R::new(((self.bits >> 4) & 1) != 0) - } -} -impl W { - #[doc = "Bit 0 - Shortcut between event READY and task SAMPLE"] - #[inline(always)] - #[must_use] - pub fn ready_sample(&mut self) -> READY_SAMPLE_W<0> { - READY_SAMPLE_W::new(self) - } - #[doc = "Bit 1 - Shortcut between event READY and task STOP"] - #[inline(always)] - #[must_use] - pub fn ready_stop(&mut self) -> READY_STOP_W<1> { - READY_STOP_W::new(self) - } - #[doc = "Bit 2 - Shortcut between event DOWN and task STOP"] - #[inline(always)] - #[must_use] - pub fn down_stop(&mut self) -> DOWN_STOP_W<2> { - DOWN_STOP_W::new(self) - } - #[doc = "Bit 3 - Shortcut between event UP and task STOP"] - #[inline(always)] - #[must_use] - pub fn up_stop(&mut self) -> UP_STOP_W<3> { - UP_STOP_W::new(self) - } - #[doc = "Bit 4 - Shortcut between event CROSS and task STOP"] - #[inline(always)] - #[must_use] - pub fn cross_stop(&mut self) -> CROSS_STOP_W<4> { - CROSS_STOP_W::new(self) - } - #[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 = "Shortcuts between local events and tasks\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 [shorts](index.html) module"] -pub struct SHORTS_SPEC; -impl crate::RegisterSpec for SHORTS_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [shorts::R](R) reader structure"] -impl crate::Readable for SHORTS_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [shorts::W](W) writer structure"] -impl crate::Writable for SHORTS_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets SHORTS to value 0"] -impl crate::Resettable for SHORTS_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/comp/tasks_sample.rs b/down-the-stack/dk_pac/src/comp/tasks_sample.rs deleted file mode 100644 index d0ef589..0000000 --- a/down-the-stack/dk_pac/src/comp/tasks_sample.rs +++ /dev/null @@ -1,72 +0,0 @@ -#[doc = "Register `TASKS_SAMPLE` 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 = "Sample comparator value\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum TASKS_SAMPLE_AW { - #[doc = "1: Trigger task"] - TRIGGER = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: TASKS_SAMPLE_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `TASKS_SAMPLE` writer - Sample comparator value"] -pub type TASKS_SAMPLE_W<'a, const O: u8> = - crate::BitWriter<'a, u32, TASKS_SAMPLE_SPEC, TASKS_SAMPLE_AW, O>; -impl<'a, const O: u8> TASKS_SAMPLE_W<'a, O> { - #[doc = "Trigger task"] - #[inline(always)] - pub fn trigger(self) -> &'a mut W { - self.variant(TASKS_SAMPLE_AW::TRIGGER) - } -} -impl W { - #[doc = "Bit 0 - Sample comparator value"] - #[inline(always)] - #[must_use] - pub fn tasks_sample(&mut self) -> TASKS_SAMPLE_W<0> { - TASKS_SAMPLE_W::new(self) - } - #[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 = "Sample comparator value\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 [tasks_sample](index.html) module"] -pub struct TASKS_SAMPLE_SPEC; -impl crate::RegisterSpec for TASKS_SAMPLE_SPEC { - type Ux = u32; -} -#[doc = "`write(|w| ..)` method takes [tasks_sample::W](W) writer structure"] -impl crate::Writable for TASKS_SAMPLE_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets TASKS_SAMPLE to value 0"] -impl crate::Resettable for TASKS_SAMPLE_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/comp/tasks_start.rs b/down-the-stack/dk_pac/src/comp/tasks_start.rs deleted file mode 100644 index 60fdc8e..0000000 --- a/down-the-stack/dk_pac/src/comp/tasks_start.rs +++ /dev/null @@ -1,72 +0,0 @@ -#[doc = "Register `TASKS_START` 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 = "Start comparator\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum TASKS_START_AW { - #[doc = "1: Trigger task"] - TRIGGER = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: TASKS_START_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `TASKS_START` writer - Start comparator"] -pub type TASKS_START_W<'a, const O: u8> = - crate::BitWriter<'a, u32, TASKS_START_SPEC, TASKS_START_AW, O>; -impl<'a, const O: u8> TASKS_START_W<'a, O> { - #[doc = "Trigger task"] - #[inline(always)] - pub fn trigger(self) -> &'a mut W { - self.variant(TASKS_START_AW::TRIGGER) - } -} -impl W { - #[doc = "Bit 0 - Start comparator"] - #[inline(always)] - #[must_use] - pub fn tasks_start(&mut self) -> TASKS_START_W<0> { - TASKS_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 - } -} -#[doc = "Start comparator\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 [tasks_start](index.html) module"] -pub struct TASKS_START_SPEC; -impl crate::RegisterSpec for TASKS_START_SPEC { - type Ux = u32; -} -#[doc = "`write(|w| ..)` method takes [tasks_start::W](W) writer structure"] -impl crate::Writable for TASKS_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 TASKS_START to value 0"] -impl crate::Resettable for TASKS_START_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/comp/tasks_stop.rs b/down-the-stack/dk_pac/src/comp/tasks_stop.rs deleted file mode 100644 index dd80ae5..0000000 --- a/down-the-stack/dk_pac/src/comp/tasks_stop.rs +++ /dev/null @@ -1,72 +0,0 @@ -#[doc = "Register `TASKS_STOP` 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 = "Stop comparator\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum TASKS_STOP_AW { - #[doc = "1: Trigger task"] - TRIGGER = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: TASKS_STOP_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `TASKS_STOP` writer - Stop comparator"] -pub type TASKS_STOP_W<'a, const O: u8> = - crate::BitWriter<'a, u32, TASKS_STOP_SPEC, TASKS_STOP_AW, O>; -impl<'a, const O: u8> TASKS_STOP_W<'a, O> { - #[doc = "Trigger task"] - #[inline(always)] - pub fn trigger(self) -> &'a mut W { - self.variant(TASKS_STOP_AW::TRIGGER) - } -} -impl W { - #[doc = "Bit 0 - Stop comparator"] - #[inline(always)] - #[must_use] - pub fn tasks_stop(&mut self) -> TASKS_STOP_W<0> { - TASKS_STOP_W::new(self) - } - #[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 = "Stop comparator\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 [tasks_stop](index.html) module"] -pub struct TASKS_STOP_SPEC; -impl crate::RegisterSpec for TASKS_STOP_SPEC { - type Ux = u32; -} -#[doc = "`write(|w| ..)` method takes [tasks_stop::W](W) writer structure"] -impl crate::Writable for TASKS_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 TASKS_STOP to value 0"] -impl crate::Resettable for TASKS_STOP_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/comp/th.rs b/down-the-stack/dk_pac/src/comp/th.rs deleted file mode 100644 index d4a6d13..0000000 --- a/down-the-stack/dk_pac/src/comp/th.rs +++ /dev/null @@ -1,95 +0,0 @@ -#[doc = "Register `TH` 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 `TH` 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 `THDOWN` reader - VDOWN = (THDOWN+1)/64*VREF"] -pub type THDOWN_R = crate::FieldReader; -#[doc = "Field `THDOWN` writer - VDOWN = (THDOWN+1)/64*VREF"] -pub type THDOWN_W<'a, const O: u8> = crate::FieldWriter<'a, u32, TH_SPEC, u8, u8, 6, O>; -#[doc = "Field `THUP` reader - VUP = (THUP+1)/64*VREF"] -pub type THUP_R = crate::FieldReader; -#[doc = "Field `THUP` writer - VUP = (THUP+1)/64*VREF"] -pub type THUP_W<'a, const O: u8> = crate::FieldWriter<'a, u32, TH_SPEC, u8, u8, 6, O>; -impl R { - #[doc = "Bits 0:5 - VDOWN = (THDOWN+1)/64*VREF"] - #[inline(always)] - pub fn thdown(&self) -> THDOWN_R { - THDOWN_R::new((self.bits & 0x3f) as u8) - } - #[doc = "Bits 8:13 - VUP = (THUP+1)/64*VREF"] - #[inline(always)] - pub fn thup(&self) -> THUP_R { - THUP_R::new(((self.bits >> 8) & 0x3f) as u8) - } -} -impl W { - #[doc = "Bits 0:5 - VDOWN = (THDOWN+1)/64*VREF"] - #[inline(always)] - #[must_use] - pub fn thdown(&mut self) -> THDOWN_W<0> { - THDOWN_W::new(self) - } - #[doc = "Bits 8:13 - VUP = (THUP+1)/64*VREF"] - #[inline(always)] - #[must_use] - pub fn thup(&mut self) -> THUP_W<8> { - THUP_W::new(self) - } - #[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 = "Threshold configuration for hysteresis unit\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 [th](index.html) module"] -pub struct TH_SPEC; -impl crate::RegisterSpec for TH_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [th::R](R) reader structure"] -impl crate::Readable for TH_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [th::W](W) writer structure"] -impl crate::Writable for TH_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets TH to value 0"] -impl crate::Resettable for TH_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/ecb.rs b/down-the-stack/dk_pac/src/ecb.rs deleted file mode 100644 index 985bfce..0000000 --- a/down-the-stack/dk_pac/src/ecb.rs +++ /dev/null @@ -1,49 +0,0 @@ -#[doc = r"Register block"] -#[repr(C)] -pub struct RegisterBlock { - #[doc = "0x00 - Start ECB block encrypt"] - pub tasks_startecb: TASKS_STARTECB, - #[doc = "0x04 - Abort a possible executing ECB operation"] - pub tasks_stopecb: TASKS_STOPECB, - _reserved2: [u8; 0xf8], - #[doc = "0x100 - ECB block encrypt complete"] - pub events_endecb: EVENTS_ENDECB, - #[doc = "0x104 - ECB block encrypt aborted because of a STOPECB task or due to an error"] - pub events_errorecb: EVENTS_ERRORECB, - _reserved4: [u8; 0x01fc], - #[doc = "0x304 - Enable interrupt"] - pub intenset: INTENSET, - #[doc = "0x308 - Disable interrupt"] - pub intenclr: INTENCLR, - _reserved6: [u8; 0x01f8], - #[doc = "0x504 - ECB block encrypt memory pointers"] - pub ecbdataptr: ECBDATAPTR, -} -#[doc = "TASKS_STARTECB (w) register accessor: an alias for `Reg`"] -pub type TASKS_STARTECB = crate::Reg; -#[doc = "Start ECB block encrypt"] -pub mod tasks_startecb; -#[doc = "TASKS_STOPECB (w) register accessor: an alias for `Reg`"] -pub type TASKS_STOPECB = crate::Reg; -#[doc = "Abort a possible executing ECB operation"] -pub mod tasks_stopecb; -#[doc = "EVENTS_ENDECB (rw) register accessor: an alias for `Reg`"] -pub type EVENTS_ENDECB = crate::Reg; -#[doc = "ECB block encrypt complete"] -pub mod events_endecb; -#[doc = "EVENTS_ERRORECB (rw) register accessor: an alias for `Reg`"] -pub type EVENTS_ERRORECB = crate::Reg; -#[doc = "ECB block encrypt aborted because of a STOPECB task or due to an error"] -pub mod events_errorecb; -#[doc = "INTENSET (rw) register accessor: an alias for `Reg`"] -pub type INTENSET = crate::Reg; -#[doc = "Enable interrupt"] -pub mod intenset; -#[doc = "INTENCLR (rw) register accessor: an alias for `Reg`"] -pub type INTENCLR = crate::Reg; -#[doc = "Disable interrupt"] -pub mod intenclr; -#[doc = "ECBDATAPTR (rw) register accessor: an alias for `Reg`"] -pub type ECBDATAPTR = crate::Reg; -#[doc = "ECB block encrypt memory pointers"] -pub mod ecbdataptr; diff --git a/down-the-stack/dk_pac/src/ecb/ecbdataptr.rs b/down-the-stack/dk_pac/src/ecb/ecbdataptr.rs deleted file mode 100644 index a11cc43..0000000 --- a/down-the-stack/dk_pac/src/ecb/ecbdataptr.rs +++ /dev/null @@ -1,81 +0,0 @@ -#[doc = "Register `ECBDATAPTR` 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 `ECBDATAPTR` 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 `ECBDATAPTR` reader - Pointer to the ECB data structure (see Table 1 ECB data structure overview)"] -pub type ECBDATAPTR_R = crate::FieldReader; -#[doc = "Field `ECBDATAPTR` writer - Pointer to the ECB data structure (see Table 1 ECB data structure overview)"] -pub type ECBDATAPTR_W<'a, const O: u8> = - crate::FieldWriter<'a, u32, ECBDATAPTR_SPEC, u32, u32, 32, O>; -impl R { - #[doc = "Bits 0:31 - Pointer to the ECB data structure (see Table 1 ECB data structure overview)"] - #[inline(always)] - pub fn ecbdataptr(&self) -> ECBDATAPTR_R { - ECBDATAPTR_R::new(self.bits) - } -} -impl W { - #[doc = "Bits 0:31 - Pointer to the ECB data structure (see Table 1 ECB data structure overview)"] - #[inline(always)] - #[must_use] - pub fn ecbdataptr(&mut self) -> ECBDATAPTR_W<0> { - ECBDATAPTR_W::new(self) - } - #[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 = "ECB block encrypt memory pointers\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 [ecbdataptr](index.html) module"] -pub struct ECBDATAPTR_SPEC; -impl crate::RegisterSpec for ECBDATAPTR_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [ecbdataptr::R](R) reader structure"] -impl crate::Readable for ECBDATAPTR_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [ecbdataptr::W](W) writer structure"] -impl crate::Writable for ECBDATAPTR_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets ECBDATAPTR to value 0"] -impl crate::Resettable for ECBDATAPTR_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/ecb/events_endecb.rs b/down-the-stack/dk_pac/src/ecb/events_endecb.rs deleted file mode 100644 index 2c54cc9..0000000 --- a/down-the-stack/dk_pac/src/ecb/events_endecb.rs +++ /dev/null @@ -1,127 +0,0 @@ -#[doc = "Register `EVENTS_ENDECB` 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 `EVENTS_ENDECB` 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 `EVENTS_ENDECB` reader - ECB block encrypt complete"] -pub type EVENTS_ENDECB_R = crate::BitReader; -#[doc = "ECB block encrypt complete\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum EVENTS_ENDECB_A { - #[doc = "0: Event not generated"] - NOT_GENERATED = 0, - #[doc = "1: Event generated"] - GENERATED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: EVENTS_ENDECB_A) -> Self { - variant as u8 != 0 - } -} -impl EVENTS_ENDECB_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> EVENTS_ENDECB_A { - match self.bits { - false => EVENTS_ENDECB_A::NOT_GENERATED, - true => EVENTS_ENDECB_A::GENERATED, - } - } - #[doc = "Checks if the value of the field is `NOT_GENERATED`"] - #[inline(always)] - pub fn is_not_generated(&self) -> bool { - *self == EVENTS_ENDECB_A::NOT_GENERATED - } - #[doc = "Checks if the value of the field is `GENERATED`"] - #[inline(always)] - pub fn is_generated(&self) -> bool { - *self == EVENTS_ENDECB_A::GENERATED - } -} -#[doc = "Field `EVENTS_ENDECB` writer - ECB block encrypt complete"] -pub type EVENTS_ENDECB_W<'a, const O: u8> = - crate::BitWriter<'a, u32, EVENTS_ENDECB_SPEC, EVENTS_ENDECB_A, O>; -impl<'a, const O: u8> EVENTS_ENDECB_W<'a, O> { - #[doc = "Event not generated"] - #[inline(always)] - pub fn not_generated(self) -> &'a mut W { - self.variant(EVENTS_ENDECB_A::NOT_GENERATED) - } - #[doc = "Event generated"] - #[inline(always)] - pub fn generated(self) -> &'a mut W { - self.variant(EVENTS_ENDECB_A::GENERATED) - } -} -impl R { - #[doc = "Bit 0 - ECB block encrypt complete"] - #[inline(always)] - pub fn events_endecb(&self) -> EVENTS_ENDECB_R { - EVENTS_ENDECB_R::new((self.bits & 1) != 0) - } -} -impl W { - #[doc = "Bit 0 - ECB block encrypt complete"] - #[inline(always)] - #[must_use] - pub fn events_endecb(&mut self) -> EVENTS_ENDECB_W<0> { - EVENTS_ENDECB_W::new(self) - } - #[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 = "ECB block encrypt complete\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 [events_endecb](index.html) module"] -pub struct EVENTS_ENDECB_SPEC; -impl crate::RegisterSpec for EVENTS_ENDECB_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [events_endecb::R](R) reader structure"] -impl crate::Readable for EVENTS_ENDECB_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [events_endecb::W](W) writer structure"] -impl crate::Writable for EVENTS_ENDECB_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets EVENTS_ENDECB to value 0"] -impl crate::Resettable for EVENTS_ENDECB_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/ecb/events_errorecb.rs b/down-the-stack/dk_pac/src/ecb/events_errorecb.rs deleted file mode 100644 index 93fdbc5..0000000 --- a/down-the-stack/dk_pac/src/ecb/events_errorecb.rs +++ /dev/null @@ -1,127 +0,0 @@ -#[doc = "Register `EVENTS_ERRORECB` 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 `EVENTS_ERRORECB` 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 `EVENTS_ERRORECB` reader - ECB block encrypt aborted because of a STOPECB task or due to an error"] -pub type EVENTS_ERRORECB_R = crate::BitReader; -#[doc = "ECB block encrypt aborted because of a STOPECB task or due to an error\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum EVENTS_ERRORECB_A { - #[doc = "0: Event not generated"] - NOT_GENERATED = 0, - #[doc = "1: Event generated"] - GENERATED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: EVENTS_ERRORECB_A) -> Self { - variant as u8 != 0 - } -} -impl EVENTS_ERRORECB_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> EVENTS_ERRORECB_A { - match self.bits { - false => EVENTS_ERRORECB_A::NOT_GENERATED, - true => EVENTS_ERRORECB_A::GENERATED, - } - } - #[doc = "Checks if the value of the field is `NOT_GENERATED`"] - #[inline(always)] - pub fn is_not_generated(&self) -> bool { - *self == EVENTS_ERRORECB_A::NOT_GENERATED - } - #[doc = "Checks if the value of the field is `GENERATED`"] - #[inline(always)] - pub fn is_generated(&self) -> bool { - *self == EVENTS_ERRORECB_A::GENERATED - } -} -#[doc = "Field `EVENTS_ERRORECB` writer - ECB block encrypt aborted because of a STOPECB task or due to an error"] -pub type EVENTS_ERRORECB_W<'a, const O: u8> = - crate::BitWriter<'a, u32, EVENTS_ERRORECB_SPEC, EVENTS_ERRORECB_A, O>; -impl<'a, const O: u8> EVENTS_ERRORECB_W<'a, O> { - #[doc = "Event not generated"] - #[inline(always)] - pub fn not_generated(self) -> &'a mut W { - self.variant(EVENTS_ERRORECB_A::NOT_GENERATED) - } - #[doc = "Event generated"] - #[inline(always)] - pub fn generated(self) -> &'a mut W { - self.variant(EVENTS_ERRORECB_A::GENERATED) - } -} -impl R { - #[doc = "Bit 0 - ECB block encrypt aborted because of a STOPECB task or due to an error"] - #[inline(always)] - pub fn events_errorecb(&self) -> EVENTS_ERRORECB_R { - EVENTS_ERRORECB_R::new((self.bits & 1) != 0) - } -} -impl W { - #[doc = "Bit 0 - ECB block encrypt aborted because of a STOPECB task or due to an error"] - #[inline(always)] - #[must_use] - pub fn events_errorecb(&mut self) -> EVENTS_ERRORECB_W<0> { - EVENTS_ERRORECB_W::new(self) - } - #[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 = "ECB block encrypt aborted because of a STOPECB task or due to an error\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 [events_errorecb](index.html) module"] -pub struct EVENTS_ERRORECB_SPEC; -impl crate::RegisterSpec for EVENTS_ERRORECB_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [events_errorecb::R](R) reader structure"] -impl crate::Readable for EVENTS_ERRORECB_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [events_errorecb::W](W) writer structure"] -impl crate::Writable for EVENTS_ERRORECB_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets EVENTS_ERRORECB to value 0"] -impl crate::Resettable for EVENTS_ERRORECB_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/ecb/intenclr.rs b/down-the-stack/dk_pac/src/ecb/intenclr.rs deleted file mode 100644 index 1300654..0000000 --- a/down-the-stack/dk_pac/src/ecb/intenclr.rs +++ /dev/null @@ -1,201 +0,0 @@ -#[doc = "Register `INTENCLR` 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 `INTENCLR` 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 `ENDECB` reader - Write '1' to disable interrupt for event ENDECB"] -pub type ENDECB_R = crate::BitReader; -#[doc = "Write '1' to disable interrupt for event ENDECB\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum ENDECB_A { - #[doc = "0: Read: Disabled"] - DISABLED = 0, - #[doc = "1: Read: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: ENDECB_A) -> Self { - variant as u8 != 0 - } -} -impl ENDECB_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> ENDECB_A { - match self.bits { - false => ENDECB_A::DISABLED, - true => ENDECB_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == ENDECB_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == ENDECB_A::ENABLED - } -} -#[doc = "Write '1' to disable interrupt for event ENDECB\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum ENDECB_AW { - #[doc = "1: Disable"] - CLEAR = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: ENDECB_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `ENDECB` writer - Write '1' to disable interrupt for event ENDECB"] -pub type ENDECB_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENCLR_SPEC, ENDECB_AW, O>; -impl<'a, const O: u8> ENDECB_W<'a, O> { - #[doc = "Disable"] - #[inline(always)] - pub fn clear(self) -> &'a mut W { - self.variant(ENDECB_AW::CLEAR) - } -} -#[doc = "Field `ERRORECB` reader - Write '1' to disable interrupt for event ERRORECB"] -pub type ERRORECB_R = crate::BitReader; -#[doc = "Write '1' to disable interrupt for event ERRORECB\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum ERRORECB_A { - #[doc = "0: Read: Disabled"] - DISABLED = 0, - #[doc = "1: Read: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: ERRORECB_A) -> Self { - variant as u8 != 0 - } -} -impl ERRORECB_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> ERRORECB_A { - match self.bits { - false => ERRORECB_A::DISABLED, - true => ERRORECB_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == ERRORECB_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == ERRORECB_A::ENABLED - } -} -#[doc = "Write '1' to disable interrupt for event ERRORECB\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum ERRORECB_AW { - #[doc = "1: Disable"] - CLEAR = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: ERRORECB_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `ERRORECB` writer - Write '1' to disable interrupt for event ERRORECB"] -pub type ERRORECB_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENCLR_SPEC, ERRORECB_AW, O>; -impl<'a, const O: u8> ERRORECB_W<'a, O> { - #[doc = "Disable"] - #[inline(always)] - pub fn clear(self) -> &'a mut W { - self.variant(ERRORECB_AW::CLEAR) - } -} -impl R { - #[doc = "Bit 0 - Write '1' to disable interrupt for event ENDECB"] - #[inline(always)] - pub fn endecb(&self) -> ENDECB_R { - ENDECB_R::new((self.bits & 1) != 0) - } - #[doc = "Bit 1 - Write '1' to disable interrupt for event ERRORECB"] - #[inline(always)] - pub fn errorecb(&self) -> ERRORECB_R { - ERRORECB_R::new(((self.bits >> 1) & 1) != 0) - } -} -impl W { - #[doc = "Bit 0 - Write '1' to disable interrupt for event ENDECB"] - #[inline(always)] - #[must_use] - pub fn endecb(&mut self) -> ENDECB_W<0> { - ENDECB_W::new(self) - } - #[doc = "Bit 1 - Write '1' to disable interrupt for event ERRORECB"] - #[inline(always)] - #[must_use] - pub fn errorecb(&mut self) -> ERRORECB_W<1> { - ERRORECB_W::new(self) - } - #[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 = "Disable interrupt\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 [intenclr](index.html) module"] -pub struct INTENCLR_SPEC; -impl crate::RegisterSpec for INTENCLR_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [intenclr::R](R) reader structure"] -impl crate::Readable for INTENCLR_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [intenclr::W](W) writer structure"] -impl crate::Writable for INTENCLR_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets INTENCLR to value 0"] -impl crate::Resettable for INTENCLR_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/ecb/intenset.rs b/down-the-stack/dk_pac/src/ecb/intenset.rs deleted file mode 100644 index c28acf8..0000000 --- a/down-the-stack/dk_pac/src/ecb/intenset.rs +++ /dev/null @@ -1,201 +0,0 @@ -#[doc = "Register `INTENSET` 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 `INTENSET` 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 `ENDECB` reader - Write '1' to enable interrupt for event ENDECB"] -pub type ENDECB_R = crate::BitReader; -#[doc = "Write '1' to enable interrupt for event ENDECB\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum ENDECB_A { - #[doc = "0: Read: Disabled"] - DISABLED = 0, - #[doc = "1: Read: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: ENDECB_A) -> Self { - variant as u8 != 0 - } -} -impl ENDECB_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> ENDECB_A { - match self.bits { - false => ENDECB_A::DISABLED, - true => ENDECB_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == ENDECB_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == ENDECB_A::ENABLED - } -} -#[doc = "Write '1' to enable interrupt for event ENDECB\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum ENDECB_AW { - #[doc = "1: Enable"] - SET = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: ENDECB_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `ENDECB` writer - Write '1' to enable interrupt for event ENDECB"] -pub type ENDECB_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENSET_SPEC, ENDECB_AW, O>; -impl<'a, const O: u8> ENDECB_W<'a, O> { - #[doc = "Enable"] - #[inline(always)] - pub fn set(self) -> &'a mut W { - self.variant(ENDECB_AW::SET) - } -} -#[doc = "Field `ERRORECB` reader - Write '1' to enable interrupt for event ERRORECB"] -pub type ERRORECB_R = crate::BitReader; -#[doc = "Write '1' to enable interrupt for event ERRORECB\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum ERRORECB_A { - #[doc = "0: Read: Disabled"] - DISABLED = 0, - #[doc = "1: Read: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: ERRORECB_A) -> Self { - variant as u8 != 0 - } -} -impl ERRORECB_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> ERRORECB_A { - match self.bits { - false => ERRORECB_A::DISABLED, - true => ERRORECB_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == ERRORECB_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == ERRORECB_A::ENABLED - } -} -#[doc = "Write '1' to enable interrupt for event ERRORECB\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum ERRORECB_AW { - #[doc = "1: Enable"] - SET = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: ERRORECB_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `ERRORECB` writer - Write '1' to enable interrupt for event ERRORECB"] -pub type ERRORECB_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENSET_SPEC, ERRORECB_AW, O>; -impl<'a, const O: u8> ERRORECB_W<'a, O> { - #[doc = "Enable"] - #[inline(always)] - pub fn set(self) -> &'a mut W { - self.variant(ERRORECB_AW::SET) - } -} -impl R { - #[doc = "Bit 0 - Write '1' to enable interrupt for event ENDECB"] - #[inline(always)] - pub fn endecb(&self) -> ENDECB_R { - ENDECB_R::new((self.bits & 1) != 0) - } - #[doc = "Bit 1 - Write '1' to enable interrupt for event ERRORECB"] - #[inline(always)] - pub fn errorecb(&self) -> ERRORECB_R { - ERRORECB_R::new(((self.bits >> 1) & 1) != 0) - } -} -impl W { - #[doc = "Bit 0 - Write '1' to enable interrupt for event ENDECB"] - #[inline(always)] - #[must_use] - pub fn endecb(&mut self) -> ENDECB_W<0> { - ENDECB_W::new(self) - } - #[doc = "Bit 1 - Write '1' to enable interrupt for event ERRORECB"] - #[inline(always)] - #[must_use] - pub fn errorecb(&mut self) -> ERRORECB_W<1> { - ERRORECB_W::new(self) - } - #[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 = "Enable interrupt\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 [intenset](index.html) module"] -pub struct INTENSET_SPEC; -impl crate::RegisterSpec for INTENSET_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [intenset::R](R) reader structure"] -impl crate::Readable for INTENSET_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [intenset::W](W) writer structure"] -impl crate::Writable for INTENSET_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets INTENSET to value 0"] -impl crate::Resettable for INTENSET_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/ecb/tasks_startecb.rs b/down-the-stack/dk_pac/src/ecb/tasks_startecb.rs deleted file mode 100644 index dd4d642..0000000 --- a/down-the-stack/dk_pac/src/ecb/tasks_startecb.rs +++ /dev/null @@ -1,72 +0,0 @@ -#[doc = "Register `TASKS_STARTECB` 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 = "Start ECB block encrypt\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum TASKS_STARTECB_AW { - #[doc = "1: Trigger task"] - TRIGGER = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: TASKS_STARTECB_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `TASKS_STARTECB` writer - Start ECB block encrypt"] -pub type TASKS_STARTECB_W<'a, const O: u8> = - crate::BitWriter<'a, u32, TASKS_STARTECB_SPEC, TASKS_STARTECB_AW, O>; -impl<'a, const O: u8> TASKS_STARTECB_W<'a, O> { - #[doc = "Trigger task"] - #[inline(always)] - pub fn trigger(self) -> &'a mut W { - self.variant(TASKS_STARTECB_AW::TRIGGER) - } -} -impl W { - #[doc = "Bit 0 - Start ECB block encrypt"] - #[inline(always)] - #[must_use] - pub fn tasks_startecb(&mut self) -> TASKS_STARTECB_W<0> { - TASKS_STARTECB_W::new(self) - } - #[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 = "Start ECB block encrypt\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 [tasks_startecb](index.html) module"] -pub struct TASKS_STARTECB_SPEC; -impl crate::RegisterSpec for TASKS_STARTECB_SPEC { - type Ux = u32; -} -#[doc = "`write(|w| ..)` method takes [tasks_startecb::W](W) writer structure"] -impl crate::Writable for TASKS_STARTECB_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets TASKS_STARTECB to value 0"] -impl crate::Resettable for TASKS_STARTECB_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/ecb/tasks_stopecb.rs b/down-the-stack/dk_pac/src/ecb/tasks_stopecb.rs deleted file mode 100644 index ece4af5..0000000 --- a/down-the-stack/dk_pac/src/ecb/tasks_stopecb.rs +++ /dev/null @@ -1,72 +0,0 @@ -#[doc = "Register `TASKS_STOPECB` 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 = "Abort a possible executing ECB operation\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum TASKS_STOPECB_AW { - #[doc = "1: Trigger task"] - TRIGGER = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: TASKS_STOPECB_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `TASKS_STOPECB` writer - Abort a possible executing ECB operation"] -pub type TASKS_STOPECB_W<'a, const O: u8> = - crate::BitWriter<'a, u32, TASKS_STOPECB_SPEC, TASKS_STOPECB_AW, O>; -impl<'a, const O: u8> TASKS_STOPECB_W<'a, O> { - #[doc = "Trigger task"] - #[inline(always)] - pub fn trigger(self) -> &'a mut W { - self.variant(TASKS_STOPECB_AW::TRIGGER) - } -} -impl W { - #[doc = "Bit 0 - Abort a possible executing ECB operation"] - #[inline(always)] - #[must_use] - pub fn tasks_stopecb(&mut self) -> TASKS_STOPECB_W<0> { - TASKS_STOPECB_W::new(self) - } - #[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 = "Abort a possible executing ECB operation\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 [tasks_stopecb](index.html) module"] -pub struct TASKS_STOPECB_SPEC; -impl crate::RegisterSpec for TASKS_STOPECB_SPEC { - type Ux = u32; -} -#[doc = "`write(|w| ..)` method takes [tasks_stopecb::W](W) writer structure"] -impl crate::Writable for TASKS_STOPECB_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets TASKS_STOPECB to value 0"] -impl crate::Resettable for TASKS_STOPECB_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/egu0.rs b/down-the-stack/dk_pac/src/egu0.rs deleted file mode 100644 index f19edf5..0000000 --- a/down-the-stack/dk_pac/src/egu0.rs +++ /dev/null @@ -1,40 +0,0 @@ -#[doc = r"Register block"] -#[repr(C)] -pub struct RegisterBlock { - #[doc = "0x00..0x40 - Description collection: Trigger n for triggering the corresponding TRIGGERED\\[n\\] -event"] - pub tasks_trigger: [TASKS_TRIGGER; 16], - _reserved1: [u8; 0xc0], - #[doc = "0x100..0x140 - Description collection: Event number n generated by triggering the corresponding TRIGGER\\[n\\] -task"] - pub events_triggered: [EVENTS_TRIGGERED; 16], - _reserved2: [u8; 0x01c0], - #[doc = "0x300 - Enable or disable interrupt"] - pub inten: INTEN, - #[doc = "0x304 - Enable interrupt"] - pub intenset: INTENSET, - #[doc = "0x308 - Disable interrupt"] - pub intenclr: INTENCLR, -} -#[doc = "TASKS_TRIGGER (w) register accessor: an alias for `Reg`"] -pub type TASKS_TRIGGER = crate::Reg; -#[doc = "Description collection: Trigger n for triggering the corresponding TRIGGERED\\[n\\] -event"] -pub mod tasks_trigger; -#[doc = "EVENTS_TRIGGERED (rw) register accessor: an alias for `Reg`"] -pub type EVENTS_TRIGGERED = crate::Reg; -#[doc = "Description collection: Event number n generated by triggering the corresponding TRIGGER\\[n\\] -task"] -pub mod events_triggered; -#[doc = "INTEN (rw) register accessor: an alias for `Reg`"] -pub type INTEN = crate::Reg; -#[doc = "Enable or disable interrupt"] -pub mod inten; -#[doc = "INTENSET (rw) register accessor: an alias for `Reg`"] -pub type INTENSET = crate::Reg; -#[doc = "Enable interrupt"] -pub mod intenset; -#[doc = "INTENCLR (rw) register accessor: an alias for `Reg`"] -pub type INTENCLR = crate::Reg; -#[doc = "Disable interrupt"] -pub mod intenclr; diff --git a/down-the-stack/dk_pac/src/egu0/events_triggered.rs b/down-the-stack/dk_pac/src/egu0/events_triggered.rs deleted file mode 100644 index d804e79..0000000 --- a/down-the-stack/dk_pac/src/egu0/events_triggered.rs +++ /dev/null @@ -1,134 +0,0 @@ -#[doc = "Register `EVENTS_TRIGGERED[%s]` 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 `EVENTS_TRIGGERED[%s]` 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 `EVENTS_TRIGGERED` reader - Event number n generated by triggering the corresponding TRIGGER\\[n\\] -task"] -pub type EVENTS_TRIGGERED_R = crate::BitReader; -#[doc = "Event number n generated by triggering the corresponding TRIGGER\\[n\\] -task\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum EVENTS_TRIGGERED_A { - #[doc = "0: Event not generated"] - NOT_GENERATED = 0, - #[doc = "1: Event generated"] - GENERATED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: EVENTS_TRIGGERED_A) -> Self { - variant as u8 != 0 - } -} -impl EVENTS_TRIGGERED_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> EVENTS_TRIGGERED_A { - match self.bits { - false => EVENTS_TRIGGERED_A::NOT_GENERATED, - true => EVENTS_TRIGGERED_A::GENERATED, - } - } - #[doc = "Checks if the value of the field is `NOT_GENERATED`"] - #[inline(always)] - pub fn is_not_generated(&self) -> bool { - *self == EVENTS_TRIGGERED_A::NOT_GENERATED - } - #[doc = "Checks if the value of the field is `GENERATED`"] - #[inline(always)] - pub fn is_generated(&self) -> bool { - *self == EVENTS_TRIGGERED_A::GENERATED - } -} -#[doc = "Field `EVENTS_TRIGGERED` writer - Event number n generated by triggering the corresponding TRIGGER\\[n\\] -task"] -pub type EVENTS_TRIGGERED_W<'a, const O: u8> = - crate::BitWriter<'a, u32, EVENTS_TRIGGERED_SPEC, EVENTS_TRIGGERED_A, O>; -impl<'a, const O: u8> EVENTS_TRIGGERED_W<'a, O> { - #[doc = "Event not generated"] - #[inline(always)] - pub fn not_generated(self) -> &'a mut W { - self.variant(EVENTS_TRIGGERED_A::NOT_GENERATED) - } - #[doc = "Event generated"] - #[inline(always)] - pub fn generated(self) -> &'a mut W { - self.variant(EVENTS_TRIGGERED_A::GENERATED) - } -} -impl R { - #[doc = "Bit 0 - Event number n generated by triggering the corresponding TRIGGER\\[n\\] -task"] - #[inline(always)] - pub fn events_triggered(&self) -> EVENTS_TRIGGERED_R { - EVENTS_TRIGGERED_R::new((self.bits & 1) != 0) - } -} -impl W { - #[doc = "Bit 0 - Event number n generated by triggering the corresponding TRIGGER\\[n\\] -task"] - #[inline(always)] - #[must_use] - pub fn events_triggered(&mut self) -> EVENTS_TRIGGERED_W<0> { - EVENTS_TRIGGERED_W::new(self) - } - #[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 = "Description collection: Event number n generated by triggering the corresponding TRIGGER\\[n\\] -task\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 [events_triggered](index.html) module"] -pub struct EVENTS_TRIGGERED_SPEC; -impl crate::RegisterSpec for EVENTS_TRIGGERED_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [events_triggered::R](R) reader structure"] -impl crate::Readable for EVENTS_TRIGGERED_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [events_triggered::W](W) writer structure"] -impl crate::Writable for EVENTS_TRIGGERED_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets EVENTS_TRIGGERED[%s] -to value 0"] -impl crate::Resettable for EVENTS_TRIGGERED_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/egu0/inten.rs b/down-the-stack/dk_pac/src/egu0/inten.rs deleted file mode 100644 index 3d1866a..0000000 --- a/down-the-stack/dk_pac/src/egu0/inten.rs +++ /dev/null @@ -1,1041 +0,0 @@ -#[doc = "Register `INTEN` 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 `INTEN` 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 `TRIGGERED0` reader - Enable or disable interrupt for event TRIGGERED\\[0\\]"] -pub type TRIGGERED0_R = crate::BitReader; -#[doc = "Enable or disable interrupt for event TRIGGERED\\[0\\]\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum TRIGGERED0_A { - #[doc = "0: Disable"] - DISABLED = 0, - #[doc = "1: Enable"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: TRIGGERED0_A) -> Self { - variant as u8 != 0 - } -} -impl TRIGGERED0_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> TRIGGERED0_A { - match self.bits { - false => TRIGGERED0_A::DISABLED, - true => TRIGGERED0_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == TRIGGERED0_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == TRIGGERED0_A::ENABLED - } -} -#[doc = "Field `TRIGGERED0` writer - Enable or disable interrupt for event TRIGGERED\\[0\\]"] -pub type TRIGGERED0_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTEN_SPEC, TRIGGERED0_A, O>; -impl<'a, const O: u8> TRIGGERED0_W<'a, O> { - #[doc = "Disable"] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(TRIGGERED0_A::DISABLED) - } - #[doc = "Enable"] - #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(TRIGGERED0_A::ENABLED) - } -} -#[doc = "Field `TRIGGERED1` reader - Enable or disable interrupt for event TRIGGERED\\[1\\]"] -pub type TRIGGERED1_R = crate::BitReader; -#[doc = "Enable or disable interrupt for event TRIGGERED\\[1\\]\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum TRIGGERED1_A { - #[doc = "0: Disable"] - DISABLED = 0, - #[doc = "1: Enable"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: TRIGGERED1_A) -> Self { - variant as u8 != 0 - } -} -impl TRIGGERED1_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> TRIGGERED1_A { - match self.bits { - false => TRIGGERED1_A::DISABLED, - true => TRIGGERED1_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == TRIGGERED1_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == TRIGGERED1_A::ENABLED - } -} -#[doc = "Field `TRIGGERED1` writer - Enable or disable interrupt for event TRIGGERED\\[1\\]"] -pub type TRIGGERED1_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTEN_SPEC, TRIGGERED1_A, O>; -impl<'a, const O: u8> TRIGGERED1_W<'a, O> { - #[doc = "Disable"] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(TRIGGERED1_A::DISABLED) - } - #[doc = "Enable"] - #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(TRIGGERED1_A::ENABLED) - } -} -#[doc = "Field `TRIGGERED2` reader - Enable or disable interrupt for event TRIGGERED\\[2\\]"] -pub type TRIGGERED2_R = crate::BitReader; -#[doc = "Enable or disable interrupt for event TRIGGERED\\[2\\]\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum TRIGGERED2_A { - #[doc = "0: Disable"] - DISABLED = 0, - #[doc = "1: Enable"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: TRIGGERED2_A) -> Self { - variant as u8 != 0 - } -} -impl TRIGGERED2_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> TRIGGERED2_A { - match self.bits { - false => TRIGGERED2_A::DISABLED, - true => TRIGGERED2_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == TRIGGERED2_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == TRIGGERED2_A::ENABLED - } -} -#[doc = "Field `TRIGGERED2` writer - Enable or disable interrupt for event TRIGGERED\\[2\\]"] -pub type TRIGGERED2_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTEN_SPEC, TRIGGERED2_A, O>; -impl<'a, const O: u8> TRIGGERED2_W<'a, O> { - #[doc = "Disable"] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(TRIGGERED2_A::DISABLED) - } - #[doc = "Enable"] - #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(TRIGGERED2_A::ENABLED) - } -} -#[doc = "Field `TRIGGERED3` reader - Enable or disable interrupt for event TRIGGERED\\[3\\]"] -pub type TRIGGERED3_R = crate::BitReader; -#[doc = "Enable or disable interrupt for event TRIGGERED\\[3\\]\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum TRIGGERED3_A { - #[doc = "0: Disable"] - DISABLED = 0, - #[doc = "1: Enable"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: TRIGGERED3_A) -> Self { - variant as u8 != 0 - } -} -impl TRIGGERED3_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> TRIGGERED3_A { - match self.bits { - false => TRIGGERED3_A::DISABLED, - true => TRIGGERED3_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == TRIGGERED3_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == TRIGGERED3_A::ENABLED - } -} -#[doc = "Field `TRIGGERED3` writer - Enable or disable interrupt for event TRIGGERED\\[3\\]"] -pub type TRIGGERED3_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTEN_SPEC, TRIGGERED3_A, O>; -impl<'a, const O: u8> TRIGGERED3_W<'a, O> { - #[doc = "Disable"] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(TRIGGERED3_A::DISABLED) - } - #[doc = "Enable"] - #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(TRIGGERED3_A::ENABLED) - } -} -#[doc = "Field `TRIGGERED4` reader - Enable or disable interrupt for event TRIGGERED\\[4\\]"] -pub type TRIGGERED4_R = crate::BitReader; -#[doc = "Enable or disable interrupt for event TRIGGERED\\[4\\]\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum TRIGGERED4_A { - #[doc = "0: Disable"] - DISABLED = 0, - #[doc = "1: Enable"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: TRIGGERED4_A) -> Self { - variant as u8 != 0 - } -} -impl TRIGGERED4_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> TRIGGERED4_A { - match self.bits { - false => TRIGGERED4_A::DISABLED, - true => TRIGGERED4_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == TRIGGERED4_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == TRIGGERED4_A::ENABLED - } -} -#[doc = "Field `TRIGGERED4` writer - Enable or disable interrupt for event TRIGGERED\\[4\\]"] -pub type TRIGGERED4_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTEN_SPEC, TRIGGERED4_A, O>; -impl<'a, const O: u8> TRIGGERED4_W<'a, O> { - #[doc = "Disable"] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(TRIGGERED4_A::DISABLED) - } - #[doc = "Enable"] - #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(TRIGGERED4_A::ENABLED) - } -} -#[doc = "Field `TRIGGERED5` reader - Enable or disable interrupt for event TRIGGERED\\[5\\]"] -pub type TRIGGERED5_R = crate::BitReader; -#[doc = "Enable or disable interrupt for event TRIGGERED\\[5\\]\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum TRIGGERED5_A { - #[doc = "0: Disable"] - DISABLED = 0, - #[doc = "1: Enable"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: TRIGGERED5_A) -> Self { - variant as u8 != 0 - } -} -impl TRIGGERED5_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> TRIGGERED5_A { - match self.bits { - false => TRIGGERED5_A::DISABLED, - true => TRIGGERED5_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == TRIGGERED5_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == TRIGGERED5_A::ENABLED - } -} -#[doc = "Field `TRIGGERED5` writer - Enable or disable interrupt for event TRIGGERED\\[5\\]"] -pub type TRIGGERED5_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTEN_SPEC, TRIGGERED5_A, O>; -impl<'a, const O: u8> TRIGGERED5_W<'a, O> { - #[doc = "Disable"] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(TRIGGERED5_A::DISABLED) - } - #[doc = "Enable"] - #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(TRIGGERED5_A::ENABLED) - } -} -#[doc = "Field `TRIGGERED6` reader - Enable or disable interrupt for event TRIGGERED\\[6\\]"] -pub type TRIGGERED6_R = crate::BitReader; -#[doc = "Enable or disable interrupt for event TRIGGERED\\[6\\]\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum TRIGGERED6_A { - #[doc = "0: Disable"] - DISABLED = 0, - #[doc = "1: Enable"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: TRIGGERED6_A) -> Self { - variant as u8 != 0 - } -} -impl TRIGGERED6_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> TRIGGERED6_A { - match self.bits { - false => TRIGGERED6_A::DISABLED, - true => TRIGGERED6_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == TRIGGERED6_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == TRIGGERED6_A::ENABLED - } -} -#[doc = "Field `TRIGGERED6` writer - Enable or disable interrupt for event TRIGGERED\\[6\\]"] -pub type TRIGGERED6_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTEN_SPEC, TRIGGERED6_A, O>; -impl<'a, const O: u8> TRIGGERED6_W<'a, O> { - #[doc = "Disable"] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(TRIGGERED6_A::DISABLED) - } - #[doc = "Enable"] - #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(TRIGGERED6_A::ENABLED) - } -} -#[doc = "Field `TRIGGERED7` reader - Enable or disable interrupt for event TRIGGERED\\[7\\]"] -pub type TRIGGERED7_R = crate::BitReader; -#[doc = "Enable or disable interrupt for event TRIGGERED\\[7\\]\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum TRIGGERED7_A { - #[doc = "0: Disable"] - DISABLED = 0, - #[doc = "1: Enable"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: TRIGGERED7_A) -> Self { - variant as u8 != 0 - } -} -impl TRIGGERED7_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> TRIGGERED7_A { - match self.bits { - false => TRIGGERED7_A::DISABLED, - true => TRIGGERED7_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == TRIGGERED7_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == TRIGGERED7_A::ENABLED - } -} -#[doc = "Field `TRIGGERED7` writer - Enable or disable interrupt for event TRIGGERED\\[7\\]"] -pub type TRIGGERED7_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTEN_SPEC, TRIGGERED7_A, O>; -impl<'a, const O: u8> TRIGGERED7_W<'a, O> { - #[doc = "Disable"] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(TRIGGERED7_A::DISABLED) - } - #[doc = "Enable"] - #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(TRIGGERED7_A::ENABLED) - } -} -#[doc = "Field `TRIGGERED8` reader - Enable or disable interrupt for event TRIGGERED\\[8\\]"] -pub type TRIGGERED8_R = crate::BitReader; -#[doc = "Enable or disable interrupt for event TRIGGERED\\[8\\]\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum TRIGGERED8_A { - #[doc = "0: Disable"] - DISABLED = 0, - #[doc = "1: Enable"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: TRIGGERED8_A) -> Self { - variant as u8 != 0 - } -} -impl TRIGGERED8_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> TRIGGERED8_A { - match self.bits { - false => TRIGGERED8_A::DISABLED, - true => TRIGGERED8_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == TRIGGERED8_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == TRIGGERED8_A::ENABLED - } -} -#[doc = "Field `TRIGGERED8` writer - Enable or disable interrupt for event TRIGGERED\\[8\\]"] -pub type TRIGGERED8_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTEN_SPEC, TRIGGERED8_A, O>; -impl<'a, const O: u8> TRIGGERED8_W<'a, O> { - #[doc = "Disable"] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(TRIGGERED8_A::DISABLED) - } - #[doc = "Enable"] - #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(TRIGGERED8_A::ENABLED) - } -} -#[doc = "Field `TRIGGERED9` reader - Enable or disable interrupt for event TRIGGERED\\[9\\]"] -pub type TRIGGERED9_R = crate::BitReader; -#[doc = "Enable or disable interrupt for event TRIGGERED\\[9\\]\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum TRIGGERED9_A { - #[doc = "0: Disable"] - DISABLED = 0, - #[doc = "1: Enable"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: TRIGGERED9_A) -> Self { - variant as u8 != 0 - } -} -impl TRIGGERED9_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> TRIGGERED9_A { - match self.bits { - false => TRIGGERED9_A::DISABLED, - true => TRIGGERED9_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == TRIGGERED9_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == TRIGGERED9_A::ENABLED - } -} -#[doc = "Field `TRIGGERED9` writer - Enable or disable interrupt for event TRIGGERED\\[9\\]"] -pub type TRIGGERED9_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTEN_SPEC, TRIGGERED9_A, O>; -impl<'a, const O: u8> TRIGGERED9_W<'a, O> { - #[doc = "Disable"] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(TRIGGERED9_A::DISABLED) - } - #[doc = "Enable"] - #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(TRIGGERED9_A::ENABLED) - } -} -#[doc = "Field `TRIGGERED10` reader - Enable or disable interrupt for event TRIGGERED\\[10\\]"] -pub type TRIGGERED10_R = crate::BitReader; -#[doc = "Enable or disable interrupt for event TRIGGERED\\[10\\]\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum TRIGGERED10_A { - #[doc = "0: Disable"] - DISABLED = 0, - #[doc = "1: Enable"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: TRIGGERED10_A) -> Self { - variant as u8 != 0 - } -} -impl TRIGGERED10_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> TRIGGERED10_A { - match self.bits { - false => TRIGGERED10_A::DISABLED, - true => TRIGGERED10_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == TRIGGERED10_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == TRIGGERED10_A::ENABLED - } -} -#[doc = "Field `TRIGGERED10` writer - Enable or disable interrupt for event TRIGGERED\\[10\\]"] -pub type TRIGGERED10_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTEN_SPEC, TRIGGERED10_A, O>; -impl<'a, const O: u8> TRIGGERED10_W<'a, O> { - #[doc = "Disable"] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(TRIGGERED10_A::DISABLED) - } - #[doc = "Enable"] - #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(TRIGGERED10_A::ENABLED) - } -} -#[doc = "Field `TRIGGERED11` reader - Enable or disable interrupt for event TRIGGERED\\[11\\]"] -pub type TRIGGERED11_R = crate::BitReader; -#[doc = "Enable or disable interrupt for event TRIGGERED\\[11\\]\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum TRIGGERED11_A { - #[doc = "0: Disable"] - DISABLED = 0, - #[doc = "1: Enable"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: TRIGGERED11_A) -> Self { - variant as u8 != 0 - } -} -impl TRIGGERED11_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> TRIGGERED11_A { - match self.bits { - false => TRIGGERED11_A::DISABLED, - true => TRIGGERED11_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == TRIGGERED11_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == TRIGGERED11_A::ENABLED - } -} -#[doc = "Field `TRIGGERED11` writer - Enable or disable interrupt for event TRIGGERED\\[11\\]"] -pub type TRIGGERED11_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTEN_SPEC, TRIGGERED11_A, O>; -impl<'a, const O: u8> TRIGGERED11_W<'a, O> { - #[doc = "Disable"] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(TRIGGERED11_A::DISABLED) - } - #[doc = "Enable"] - #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(TRIGGERED11_A::ENABLED) - } -} -#[doc = "Field `TRIGGERED12` reader - Enable or disable interrupt for event TRIGGERED\\[12\\]"] -pub type TRIGGERED12_R = crate::BitReader; -#[doc = "Enable or disable interrupt for event TRIGGERED\\[12\\]\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum TRIGGERED12_A { - #[doc = "0: Disable"] - DISABLED = 0, - #[doc = "1: Enable"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: TRIGGERED12_A) -> Self { - variant as u8 != 0 - } -} -impl TRIGGERED12_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> TRIGGERED12_A { - match self.bits { - false => TRIGGERED12_A::DISABLED, - true => TRIGGERED12_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == TRIGGERED12_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == TRIGGERED12_A::ENABLED - } -} -#[doc = "Field `TRIGGERED12` writer - Enable or disable interrupt for event TRIGGERED\\[12\\]"] -pub type TRIGGERED12_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTEN_SPEC, TRIGGERED12_A, O>; -impl<'a, const O: u8> TRIGGERED12_W<'a, O> { - #[doc = "Disable"] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(TRIGGERED12_A::DISABLED) - } - #[doc = "Enable"] - #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(TRIGGERED12_A::ENABLED) - } -} -#[doc = "Field `TRIGGERED13` reader - Enable or disable interrupt for event TRIGGERED\\[13\\]"] -pub type TRIGGERED13_R = crate::BitReader; -#[doc = "Enable or disable interrupt for event TRIGGERED\\[13\\]\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum TRIGGERED13_A { - #[doc = "0: Disable"] - DISABLED = 0, - #[doc = "1: Enable"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: TRIGGERED13_A) -> Self { - variant as u8 != 0 - } -} -impl TRIGGERED13_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> TRIGGERED13_A { - match self.bits { - false => TRIGGERED13_A::DISABLED, - true => TRIGGERED13_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == TRIGGERED13_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == TRIGGERED13_A::ENABLED - } -} -#[doc = "Field `TRIGGERED13` writer - Enable or disable interrupt for event TRIGGERED\\[13\\]"] -pub type TRIGGERED13_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTEN_SPEC, TRIGGERED13_A, O>; -impl<'a, const O: u8> TRIGGERED13_W<'a, O> { - #[doc = "Disable"] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(TRIGGERED13_A::DISABLED) - } - #[doc = "Enable"] - #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(TRIGGERED13_A::ENABLED) - } -} -#[doc = "Field `TRIGGERED14` reader - Enable or disable interrupt for event TRIGGERED\\[14\\]"] -pub type TRIGGERED14_R = crate::BitReader; -#[doc = "Enable or disable interrupt for event TRIGGERED\\[14\\]\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum TRIGGERED14_A { - #[doc = "0: Disable"] - DISABLED = 0, - #[doc = "1: Enable"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: TRIGGERED14_A) -> Self { - variant as u8 != 0 - } -} -impl TRIGGERED14_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> TRIGGERED14_A { - match self.bits { - false => TRIGGERED14_A::DISABLED, - true => TRIGGERED14_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == TRIGGERED14_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == TRIGGERED14_A::ENABLED - } -} -#[doc = "Field `TRIGGERED14` writer - Enable or disable interrupt for event TRIGGERED\\[14\\]"] -pub type TRIGGERED14_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTEN_SPEC, TRIGGERED14_A, O>; -impl<'a, const O: u8> TRIGGERED14_W<'a, O> { - #[doc = "Disable"] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(TRIGGERED14_A::DISABLED) - } - #[doc = "Enable"] - #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(TRIGGERED14_A::ENABLED) - } -} -#[doc = "Field `TRIGGERED15` reader - Enable or disable interrupt for event TRIGGERED\\[15\\]"] -pub type TRIGGERED15_R = crate::BitReader; -#[doc = "Enable or disable interrupt for event TRIGGERED\\[15\\]\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum TRIGGERED15_A { - #[doc = "0: Disable"] - DISABLED = 0, - #[doc = "1: Enable"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: TRIGGERED15_A) -> Self { - variant as u8 != 0 - } -} -impl TRIGGERED15_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> TRIGGERED15_A { - match self.bits { - false => TRIGGERED15_A::DISABLED, - true => TRIGGERED15_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == TRIGGERED15_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == TRIGGERED15_A::ENABLED - } -} -#[doc = "Field `TRIGGERED15` writer - Enable or disable interrupt for event TRIGGERED\\[15\\]"] -pub type TRIGGERED15_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTEN_SPEC, TRIGGERED15_A, O>; -impl<'a, const O: u8> TRIGGERED15_W<'a, O> { - #[doc = "Disable"] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(TRIGGERED15_A::DISABLED) - } - #[doc = "Enable"] - #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(TRIGGERED15_A::ENABLED) - } -} -impl R { - #[doc = "Bit 0 - Enable or disable interrupt for event TRIGGERED\\[0\\]"] - #[inline(always)] - pub fn triggered0(&self) -> TRIGGERED0_R { - TRIGGERED0_R::new((self.bits & 1) != 0) - } - #[doc = "Bit 1 - Enable or disable interrupt for event TRIGGERED\\[1\\]"] - #[inline(always)] - pub fn triggered1(&self) -> TRIGGERED1_R { - TRIGGERED1_R::new(((self.bits >> 1) & 1) != 0) - } - #[doc = "Bit 2 - Enable or disable interrupt for event TRIGGERED\\[2\\]"] - #[inline(always)] - pub fn triggered2(&self) -> TRIGGERED2_R { - TRIGGERED2_R::new(((self.bits >> 2) & 1) != 0) - } - #[doc = "Bit 3 - Enable or disable interrupt for event TRIGGERED\\[3\\]"] - #[inline(always)] - pub fn triggered3(&self) -> TRIGGERED3_R { - TRIGGERED3_R::new(((self.bits >> 3) & 1) != 0) - } - #[doc = "Bit 4 - Enable or disable interrupt for event TRIGGERED\\[4\\]"] - #[inline(always)] - pub fn triggered4(&self) -> TRIGGERED4_R { - TRIGGERED4_R::new(((self.bits >> 4) & 1) != 0) - } - #[doc = "Bit 5 - Enable or disable interrupt for event TRIGGERED\\[5\\]"] - #[inline(always)] - pub fn triggered5(&self) -> TRIGGERED5_R { - TRIGGERED5_R::new(((self.bits >> 5) & 1) != 0) - } - #[doc = "Bit 6 - Enable or disable interrupt for event TRIGGERED\\[6\\]"] - #[inline(always)] - pub fn triggered6(&self) -> TRIGGERED6_R { - TRIGGERED6_R::new(((self.bits >> 6) & 1) != 0) - } - #[doc = "Bit 7 - Enable or disable interrupt for event TRIGGERED\\[7\\]"] - #[inline(always)] - pub fn triggered7(&self) -> TRIGGERED7_R { - TRIGGERED7_R::new(((self.bits >> 7) & 1) != 0) - } - #[doc = "Bit 8 - Enable or disable interrupt for event TRIGGERED\\[8\\]"] - #[inline(always)] - pub fn triggered8(&self) -> TRIGGERED8_R { - TRIGGERED8_R::new(((self.bits >> 8) & 1) != 0) - } - #[doc = "Bit 9 - Enable or disable interrupt for event TRIGGERED\\[9\\]"] - #[inline(always)] - pub fn triggered9(&self) -> TRIGGERED9_R { - TRIGGERED9_R::new(((self.bits >> 9) & 1) != 0) - } - #[doc = "Bit 10 - Enable or disable interrupt for event TRIGGERED\\[10\\]"] - #[inline(always)] - pub fn triggered10(&self) -> TRIGGERED10_R { - TRIGGERED10_R::new(((self.bits >> 10) & 1) != 0) - } - #[doc = "Bit 11 - Enable or disable interrupt for event TRIGGERED\\[11\\]"] - #[inline(always)] - pub fn triggered11(&self) -> TRIGGERED11_R { - TRIGGERED11_R::new(((self.bits >> 11) & 1) != 0) - } - #[doc = "Bit 12 - Enable or disable interrupt for event TRIGGERED\\[12\\]"] - #[inline(always)] - pub fn triggered12(&self) -> TRIGGERED12_R { - TRIGGERED12_R::new(((self.bits >> 12) & 1) != 0) - } - #[doc = "Bit 13 - Enable or disable interrupt for event TRIGGERED\\[13\\]"] - #[inline(always)] - pub fn triggered13(&self) -> TRIGGERED13_R { - TRIGGERED13_R::new(((self.bits >> 13) & 1) != 0) - } - #[doc = "Bit 14 - Enable or disable interrupt for event TRIGGERED\\[14\\]"] - #[inline(always)] - pub fn triggered14(&self) -> TRIGGERED14_R { - TRIGGERED14_R::new(((self.bits >> 14) & 1) != 0) - } - #[doc = "Bit 15 - Enable or disable interrupt for event TRIGGERED\\[15\\]"] - #[inline(always)] - pub fn triggered15(&self) -> TRIGGERED15_R { - TRIGGERED15_R::new(((self.bits >> 15) & 1) != 0) - } -} -impl W { - #[doc = "Bit 0 - Enable or disable interrupt for event TRIGGERED\\[0\\]"] - #[inline(always)] - #[must_use] - pub fn triggered0(&mut self) -> TRIGGERED0_W<0> { - TRIGGERED0_W::new(self) - } - #[doc = "Bit 1 - Enable or disable interrupt for event TRIGGERED\\[1\\]"] - #[inline(always)] - #[must_use] - pub fn triggered1(&mut self) -> TRIGGERED1_W<1> { - TRIGGERED1_W::new(self) - } - #[doc = "Bit 2 - Enable or disable interrupt for event TRIGGERED\\[2\\]"] - #[inline(always)] - #[must_use] - pub fn triggered2(&mut self) -> TRIGGERED2_W<2> { - TRIGGERED2_W::new(self) - } - #[doc = "Bit 3 - Enable or disable interrupt for event TRIGGERED\\[3\\]"] - #[inline(always)] - #[must_use] - pub fn triggered3(&mut self) -> TRIGGERED3_W<3> { - TRIGGERED3_W::new(self) - } - #[doc = "Bit 4 - Enable or disable interrupt for event TRIGGERED\\[4\\]"] - #[inline(always)] - #[must_use] - pub fn triggered4(&mut self) -> TRIGGERED4_W<4> { - TRIGGERED4_W::new(self) - } - #[doc = "Bit 5 - Enable or disable interrupt for event TRIGGERED\\[5\\]"] - #[inline(always)] - #[must_use] - pub fn triggered5(&mut self) -> TRIGGERED5_W<5> { - TRIGGERED5_W::new(self) - } - #[doc = "Bit 6 - Enable or disable interrupt for event TRIGGERED\\[6\\]"] - #[inline(always)] - #[must_use] - pub fn triggered6(&mut self) -> TRIGGERED6_W<6> { - TRIGGERED6_W::new(self) - } - #[doc = "Bit 7 - Enable or disable interrupt for event TRIGGERED\\[7\\]"] - #[inline(always)] - #[must_use] - pub fn triggered7(&mut self) -> TRIGGERED7_W<7> { - TRIGGERED7_W::new(self) - } - #[doc = "Bit 8 - Enable or disable interrupt for event TRIGGERED\\[8\\]"] - #[inline(always)] - #[must_use] - pub fn triggered8(&mut self) -> TRIGGERED8_W<8> { - TRIGGERED8_W::new(self) - } - #[doc = "Bit 9 - Enable or disable interrupt for event TRIGGERED\\[9\\]"] - #[inline(always)] - #[must_use] - pub fn triggered9(&mut self) -> TRIGGERED9_W<9> { - TRIGGERED9_W::new(self) - } - #[doc = "Bit 10 - Enable or disable interrupt for event TRIGGERED\\[10\\]"] - #[inline(always)] - #[must_use] - pub fn triggered10(&mut self) -> TRIGGERED10_W<10> { - TRIGGERED10_W::new(self) - } - #[doc = "Bit 11 - Enable or disable interrupt for event TRIGGERED\\[11\\]"] - #[inline(always)] - #[must_use] - pub fn triggered11(&mut self) -> TRIGGERED11_W<11> { - TRIGGERED11_W::new(self) - } - #[doc = "Bit 12 - Enable or disable interrupt for event TRIGGERED\\[12\\]"] - #[inline(always)] - #[must_use] - pub fn triggered12(&mut self) -> TRIGGERED12_W<12> { - TRIGGERED12_W::new(self) - } - #[doc = "Bit 13 - Enable or disable interrupt for event TRIGGERED\\[13\\]"] - #[inline(always)] - #[must_use] - pub fn triggered13(&mut self) -> TRIGGERED13_W<13> { - TRIGGERED13_W::new(self) - } - #[doc = "Bit 14 - Enable or disable interrupt for event TRIGGERED\\[14\\]"] - #[inline(always)] - #[must_use] - pub fn triggered14(&mut self) -> TRIGGERED14_W<14> { - TRIGGERED14_W::new(self) - } - #[doc = "Bit 15 - Enable or disable interrupt for event TRIGGERED\\[15\\]"] - #[inline(always)] - #[must_use] - pub fn triggered15(&mut self) -> TRIGGERED15_W<15> { - TRIGGERED15_W::new(self) - } - #[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 = "Enable or disable interrupt\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 [inten](index.html) module"] -pub struct INTEN_SPEC; -impl crate::RegisterSpec for INTEN_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [inten::R](R) reader structure"] -impl crate::Readable for INTEN_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [inten::W](W) writer structure"] -impl crate::Writable for INTEN_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets INTEN to value 0"] -impl crate::Resettable for INTEN_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/egu0/intenclr.rs b/down-the-stack/dk_pac/src/egu0/intenclr.rs deleted file mode 100644 index d31f03f..0000000 --- a/down-the-stack/dk_pac/src/egu0/intenclr.rs +++ /dev/null @@ -1,1159 +0,0 @@ -#[doc = "Register `INTENCLR` 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 `INTENCLR` 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 `TRIGGERED0` reader - Write '1' to disable interrupt for event TRIGGERED\\[0\\]"] -pub type TRIGGERED0_R = crate::BitReader; -#[doc = "Write '1' to disable interrupt for event TRIGGERED\\[0\\]\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum TRIGGERED0_A { - #[doc = "0: Read: Disabled"] - DISABLED = 0, - #[doc = "1: Read: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: TRIGGERED0_A) -> Self { - variant as u8 != 0 - } -} -impl TRIGGERED0_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> TRIGGERED0_A { - match self.bits { - false => TRIGGERED0_A::DISABLED, - true => TRIGGERED0_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == TRIGGERED0_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == TRIGGERED0_A::ENABLED - } -} -#[doc = "Write '1' to disable interrupt for event TRIGGERED\\[0\\]\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum TRIGGERED0_AW { - #[doc = "1: Disable"] - CLEAR = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: TRIGGERED0_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `TRIGGERED0` writer - Write '1' to disable interrupt for event TRIGGERED\\[0\\]"] -pub type TRIGGERED0_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENCLR_SPEC, TRIGGERED0_AW, O>; -impl<'a, const O: u8> TRIGGERED0_W<'a, O> { - #[doc = "Disable"] - #[inline(always)] - pub fn clear(self) -> &'a mut W { - self.variant(TRIGGERED0_AW::CLEAR) - } -} -#[doc = "Field `TRIGGERED1` reader - Write '1' to disable interrupt for event TRIGGERED\\[1\\]"] -pub type TRIGGERED1_R = crate::BitReader; -#[doc = "Write '1' to disable interrupt for event TRIGGERED\\[1\\]\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum TRIGGERED1_A { - #[doc = "0: Read: Disabled"] - DISABLED = 0, - #[doc = "1: Read: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: TRIGGERED1_A) -> Self { - variant as u8 != 0 - } -} -impl TRIGGERED1_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> TRIGGERED1_A { - match self.bits { - false => TRIGGERED1_A::DISABLED, - true => TRIGGERED1_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == TRIGGERED1_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == TRIGGERED1_A::ENABLED - } -} -#[doc = "Write '1' to disable interrupt for event TRIGGERED\\[1\\]\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum TRIGGERED1_AW { - #[doc = "1: Disable"] - CLEAR = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: TRIGGERED1_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `TRIGGERED1` writer - Write '1' to disable interrupt for event TRIGGERED\\[1\\]"] -pub type TRIGGERED1_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENCLR_SPEC, TRIGGERED1_AW, O>; -impl<'a, const O: u8> TRIGGERED1_W<'a, O> { - #[doc = "Disable"] - #[inline(always)] - pub fn clear(self) -> &'a mut W { - self.variant(TRIGGERED1_AW::CLEAR) - } -} -#[doc = "Field `TRIGGERED2` reader - Write '1' to disable interrupt for event TRIGGERED\\[2\\]"] -pub type TRIGGERED2_R = crate::BitReader; -#[doc = "Write '1' to disable interrupt for event TRIGGERED\\[2\\]\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum TRIGGERED2_A { - #[doc = "0: Read: Disabled"] - DISABLED = 0, - #[doc = "1: Read: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: TRIGGERED2_A) -> Self { - variant as u8 != 0 - } -} -impl TRIGGERED2_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> TRIGGERED2_A { - match self.bits { - false => TRIGGERED2_A::DISABLED, - true => TRIGGERED2_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == TRIGGERED2_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == TRIGGERED2_A::ENABLED - } -} -#[doc = "Write '1' to disable interrupt for event TRIGGERED\\[2\\]\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum TRIGGERED2_AW { - #[doc = "1: Disable"] - CLEAR = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: TRIGGERED2_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `TRIGGERED2` writer - Write '1' to disable interrupt for event TRIGGERED\\[2\\]"] -pub type TRIGGERED2_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENCLR_SPEC, TRIGGERED2_AW, O>; -impl<'a, const O: u8> TRIGGERED2_W<'a, O> { - #[doc = "Disable"] - #[inline(always)] - pub fn clear(self) -> &'a mut W { - self.variant(TRIGGERED2_AW::CLEAR) - } -} -#[doc = "Field `TRIGGERED3` reader - Write '1' to disable interrupt for event TRIGGERED\\[3\\]"] -pub type TRIGGERED3_R = crate::BitReader; -#[doc = "Write '1' to disable interrupt for event TRIGGERED\\[3\\]\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum TRIGGERED3_A { - #[doc = "0: Read: Disabled"] - DISABLED = 0, - #[doc = "1: Read: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: TRIGGERED3_A) -> Self { - variant as u8 != 0 - } -} -impl TRIGGERED3_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> TRIGGERED3_A { - match self.bits { - false => TRIGGERED3_A::DISABLED, - true => TRIGGERED3_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == TRIGGERED3_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == TRIGGERED3_A::ENABLED - } -} -#[doc = "Write '1' to disable interrupt for event TRIGGERED\\[3\\]\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum TRIGGERED3_AW { - #[doc = "1: Disable"] - CLEAR = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: TRIGGERED3_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `TRIGGERED3` writer - Write '1' to disable interrupt for event TRIGGERED\\[3\\]"] -pub type TRIGGERED3_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENCLR_SPEC, TRIGGERED3_AW, O>; -impl<'a, const O: u8> TRIGGERED3_W<'a, O> { - #[doc = "Disable"] - #[inline(always)] - pub fn clear(self) -> &'a mut W { - self.variant(TRIGGERED3_AW::CLEAR) - } -} -#[doc = "Field `TRIGGERED4` reader - Write '1' to disable interrupt for event TRIGGERED\\[4\\]"] -pub type TRIGGERED4_R = crate::BitReader; -#[doc = "Write '1' to disable interrupt for event TRIGGERED\\[4\\]\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum TRIGGERED4_A { - #[doc = "0: Read: Disabled"] - DISABLED = 0, - #[doc = "1: Read: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: TRIGGERED4_A) -> Self { - variant as u8 != 0 - } -} -impl TRIGGERED4_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> TRIGGERED4_A { - match self.bits { - false => TRIGGERED4_A::DISABLED, - true => TRIGGERED4_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == TRIGGERED4_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == TRIGGERED4_A::ENABLED - } -} -#[doc = "Write '1' to disable interrupt for event TRIGGERED\\[4\\]\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum TRIGGERED4_AW { - #[doc = "1: Disable"] - CLEAR = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: TRIGGERED4_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `TRIGGERED4` writer - Write '1' to disable interrupt for event TRIGGERED\\[4\\]"] -pub type TRIGGERED4_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENCLR_SPEC, TRIGGERED4_AW, O>; -impl<'a, const O: u8> TRIGGERED4_W<'a, O> { - #[doc = "Disable"] - #[inline(always)] - pub fn clear(self) -> &'a mut W { - self.variant(TRIGGERED4_AW::CLEAR) - } -} -#[doc = "Field `TRIGGERED5` reader - Write '1' to disable interrupt for event TRIGGERED\\[5\\]"] -pub type TRIGGERED5_R = crate::BitReader; -#[doc = "Write '1' to disable interrupt for event TRIGGERED\\[5\\]\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum TRIGGERED5_A { - #[doc = "0: Read: Disabled"] - DISABLED = 0, - #[doc = "1: Read: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: TRIGGERED5_A) -> Self { - variant as u8 != 0 - } -} -impl TRIGGERED5_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> TRIGGERED5_A { - match self.bits { - false => TRIGGERED5_A::DISABLED, - true => TRIGGERED5_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == TRIGGERED5_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == TRIGGERED5_A::ENABLED - } -} -#[doc = "Write '1' to disable interrupt for event TRIGGERED\\[5\\]\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum TRIGGERED5_AW { - #[doc = "1: Disable"] - CLEAR = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: TRIGGERED5_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `TRIGGERED5` writer - Write '1' to disable interrupt for event TRIGGERED\\[5\\]"] -pub type TRIGGERED5_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENCLR_SPEC, TRIGGERED5_AW, O>; -impl<'a, const O: u8> TRIGGERED5_W<'a, O> { - #[doc = "Disable"] - #[inline(always)] - pub fn clear(self) -> &'a mut W { - self.variant(TRIGGERED5_AW::CLEAR) - } -} -#[doc = "Field `TRIGGERED6` reader - Write '1' to disable interrupt for event TRIGGERED\\[6\\]"] -pub type TRIGGERED6_R = crate::BitReader; -#[doc = "Write '1' to disable interrupt for event TRIGGERED\\[6\\]\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum TRIGGERED6_A { - #[doc = "0: Read: Disabled"] - DISABLED = 0, - #[doc = "1: Read: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: TRIGGERED6_A) -> Self { - variant as u8 != 0 - } -} -impl TRIGGERED6_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> TRIGGERED6_A { - match self.bits { - false => TRIGGERED6_A::DISABLED, - true => TRIGGERED6_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == TRIGGERED6_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == TRIGGERED6_A::ENABLED - } -} -#[doc = "Write '1' to disable interrupt for event TRIGGERED\\[6\\]\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum TRIGGERED6_AW { - #[doc = "1: Disable"] - CLEAR = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: TRIGGERED6_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `TRIGGERED6` writer - Write '1' to disable interrupt for event TRIGGERED\\[6\\]"] -pub type TRIGGERED6_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENCLR_SPEC, TRIGGERED6_AW, O>; -impl<'a, const O: u8> TRIGGERED6_W<'a, O> { - #[doc = "Disable"] - #[inline(always)] - pub fn clear(self) -> &'a mut W { - self.variant(TRIGGERED6_AW::CLEAR) - } -} -#[doc = "Field `TRIGGERED7` reader - Write '1' to disable interrupt for event TRIGGERED\\[7\\]"] -pub type TRIGGERED7_R = crate::BitReader; -#[doc = "Write '1' to disable interrupt for event TRIGGERED\\[7\\]\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum TRIGGERED7_A { - #[doc = "0: Read: Disabled"] - DISABLED = 0, - #[doc = "1: Read: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: TRIGGERED7_A) -> Self { - variant as u8 != 0 - } -} -impl TRIGGERED7_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> TRIGGERED7_A { - match self.bits { - false => TRIGGERED7_A::DISABLED, - true => TRIGGERED7_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == TRIGGERED7_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == TRIGGERED7_A::ENABLED - } -} -#[doc = "Write '1' to disable interrupt for event TRIGGERED\\[7\\]\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum TRIGGERED7_AW { - #[doc = "1: Disable"] - CLEAR = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: TRIGGERED7_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `TRIGGERED7` writer - Write '1' to disable interrupt for event TRIGGERED\\[7\\]"] -pub type TRIGGERED7_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENCLR_SPEC, TRIGGERED7_AW, O>; -impl<'a, const O: u8> TRIGGERED7_W<'a, O> { - #[doc = "Disable"] - #[inline(always)] - pub fn clear(self) -> &'a mut W { - self.variant(TRIGGERED7_AW::CLEAR) - } -} -#[doc = "Field `TRIGGERED8` reader - Write '1' to disable interrupt for event TRIGGERED\\[8\\]"] -pub type TRIGGERED8_R = crate::BitReader; -#[doc = "Write '1' to disable interrupt for event TRIGGERED\\[8\\]\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum TRIGGERED8_A { - #[doc = "0: Read: Disabled"] - DISABLED = 0, - #[doc = "1: Read: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: TRIGGERED8_A) -> Self { - variant as u8 != 0 - } -} -impl TRIGGERED8_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> TRIGGERED8_A { - match self.bits { - false => TRIGGERED8_A::DISABLED, - true => TRIGGERED8_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == TRIGGERED8_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == TRIGGERED8_A::ENABLED - } -} -#[doc = "Write '1' to disable interrupt for event TRIGGERED\\[8\\]\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum TRIGGERED8_AW { - #[doc = "1: Disable"] - CLEAR = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: TRIGGERED8_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `TRIGGERED8` writer - Write '1' to disable interrupt for event TRIGGERED\\[8\\]"] -pub type TRIGGERED8_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENCLR_SPEC, TRIGGERED8_AW, O>; -impl<'a, const O: u8> TRIGGERED8_W<'a, O> { - #[doc = "Disable"] - #[inline(always)] - pub fn clear(self) -> &'a mut W { - self.variant(TRIGGERED8_AW::CLEAR) - } -} -#[doc = "Field `TRIGGERED9` reader - Write '1' to disable interrupt for event TRIGGERED\\[9\\]"] -pub type TRIGGERED9_R = crate::BitReader; -#[doc = "Write '1' to disable interrupt for event TRIGGERED\\[9\\]\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum TRIGGERED9_A { - #[doc = "0: Read: Disabled"] - DISABLED = 0, - #[doc = "1: Read: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: TRIGGERED9_A) -> Self { - variant as u8 != 0 - } -} -impl TRIGGERED9_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> TRIGGERED9_A { - match self.bits { - false => TRIGGERED9_A::DISABLED, - true => TRIGGERED9_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == TRIGGERED9_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == TRIGGERED9_A::ENABLED - } -} -#[doc = "Write '1' to disable interrupt for event TRIGGERED\\[9\\]\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum TRIGGERED9_AW { - #[doc = "1: Disable"] - CLEAR = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: TRIGGERED9_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `TRIGGERED9` writer - Write '1' to disable interrupt for event TRIGGERED\\[9\\]"] -pub type TRIGGERED9_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENCLR_SPEC, TRIGGERED9_AW, O>; -impl<'a, const O: u8> TRIGGERED9_W<'a, O> { - #[doc = "Disable"] - #[inline(always)] - pub fn clear(self) -> &'a mut W { - self.variant(TRIGGERED9_AW::CLEAR) - } -} -#[doc = "Field `TRIGGERED10` reader - Write '1' to disable interrupt for event TRIGGERED\\[10\\]"] -pub type TRIGGERED10_R = crate::BitReader; -#[doc = "Write '1' to disable interrupt for event TRIGGERED\\[10\\]\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum TRIGGERED10_A { - #[doc = "0: Read: Disabled"] - DISABLED = 0, - #[doc = "1: Read: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: TRIGGERED10_A) -> Self { - variant as u8 != 0 - } -} -impl TRIGGERED10_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> TRIGGERED10_A { - match self.bits { - false => TRIGGERED10_A::DISABLED, - true => TRIGGERED10_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == TRIGGERED10_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == TRIGGERED10_A::ENABLED - } -} -#[doc = "Write '1' to disable interrupt for event TRIGGERED\\[10\\]\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum TRIGGERED10_AW { - #[doc = "1: Disable"] - CLEAR = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: TRIGGERED10_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `TRIGGERED10` writer - Write '1' to disable interrupt for event TRIGGERED\\[10\\]"] -pub type TRIGGERED10_W<'a, const O: u8> = - crate::BitWriter<'a, u32, INTENCLR_SPEC, TRIGGERED10_AW, O>; -impl<'a, const O: u8> TRIGGERED10_W<'a, O> { - #[doc = "Disable"] - #[inline(always)] - pub fn clear(self) -> &'a mut W { - self.variant(TRIGGERED10_AW::CLEAR) - } -} -#[doc = "Field `TRIGGERED11` reader - Write '1' to disable interrupt for event TRIGGERED\\[11\\]"] -pub type TRIGGERED11_R = crate::BitReader; -#[doc = "Write '1' to disable interrupt for event TRIGGERED\\[11\\]\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum TRIGGERED11_A { - #[doc = "0: Read: Disabled"] - DISABLED = 0, - #[doc = "1: Read: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: TRIGGERED11_A) -> Self { - variant as u8 != 0 - } -} -impl TRIGGERED11_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> TRIGGERED11_A { - match self.bits { - false => TRIGGERED11_A::DISABLED, - true => TRIGGERED11_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == TRIGGERED11_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == TRIGGERED11_A::ENABLED - } -} -#[doc = "Write '1' to disable interrupt for event TRIGGERED\\[11\\]\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum TRIGGERED11_AW { - #[doc = "1: Disable"] - CLEAR = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: TRIGGERED11_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `TRIGGERED11` writer - Write '1' to disable interrupt for event TRIGGERED\\[11\\]"] -pub type TRIGGERED11_W<'a, const O: u8> = - crate::BitWriter<'a, u32, INTENCLR_SPEC, TRIGGERED11_AW, O>; -impl<'a, const O: u8> TRIGGERED11_W<'a, O> { - #[doc = "Disable"] - #[inline(always)] - pub fn clear(self) -> &'a mut W { - self.variant(TRIGGERED11_AW::CLEAR) - } -} -#[doc = "Field `TRIGGERED12` reader - Write '1' to disable interrupt for event TRIGGERED\\[12\\]"] -pub type TRIGGERED12_R = crate::BitReader; -#[doc = "Write '1' to disable interrupt for event TRIGGERED\\[12\\]\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum TRIGGERED12_A { - #[doc = "0: Read: Disabled"] - DISABLED = 0, - #[doc = "1: Read: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: TRIGGERED12_A) -> Self { - variant as u8 != 0 - } -} -impl TRIGGERED12_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> TRIGGERED12_A { - match self.bits { - false => TRIGGERED12_A::DISABLED, - true => TRIGGERED12_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == TRIGGERED12_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == TRIGGERED12_A::ENABLED - } -} -#[doc = "Write '1' to disable interrupt for event TRIGGERED\\[12\\]\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum TRIGGERED12_AW { - #[doc = "1: Disable"] - CLEAR = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: TRIGGERED12_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `TRIGGERED12` writer - Write '1' to disable interrupt for event TRIGGERED\\[12\\]"] -pub type TRIGGERED12_W<'a, const O: u8> = - crate::BitWriter<'a, u32, INTENCLR_SPEC, TRIGGERED12_AW, O>; -impl<'a, const O: u8> TRIGGERED12_W<'a, O> { - #[doc = "Disable"] - #[inline(always)] - pub fn clear(self) -> &'a mut W { - self.variant(TRIGGERED12_AW::CLEAR) - } -} -#[doc = "Field `TRIGGERED13` reader - Write '1' to disable interrupt for event TRIGGERED\\[13\\]"] -pub type TRIGGERED13_R = crate::BitReader; -#[doc = "Write '1' to disable interrupt for event TRIGGERED\\[13\\]\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum TRIGGERED13_A { - #[doc = "0: Read: Disabled"] - DISABLED = 0, - #[doc = "1: Read: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: TRIGGERED13_A) -> Self { - variant as u8 != 0 - } -} -impl TRIGGERED13_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> TRIGGERED13_A { - match self.bits { - false => TRIGGERED13_A::DISABLED, - true => TRIGGERED13_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == TRIGGERED13_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == TRIGGERED13_A::ENABLED - } -} -#[doc = "Write '1' to disable interrupt for event TRIGGERED\\[13\\]\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum TRIGGERED13_AW { - #[doc = "1: Disable"] - CLEAR = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: TRIGGERED13_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `TRIGGERED13` writer - Write '1' to disable interrupt for event TRIGGERED\\[13\\]"] -pub type TRIGGERED13_W<'a, const O: u8> = - crate::BitWriter<'a, u32, INTENCLR_SPEC, TRIGGERED13_AW, O>; -impl<'a, const O: u8> TRIGGERED13_W<'a, O> { - #[doc = "Disable"] - #[inline(always)] - pub fn clear(self) -> &'a mut W { - self.variant(TRIGGERED13_AW::CLEAR) - } -} -#[doc = "Field `TRIGGERED14` reader - Write '1' to disable interrupt for event TRIGGERED\\[14\\]"] -pub type TRIGGERED14_R = crate::BitReader; -#[doc = "Write '1' to disable interrupt for event TRIGGERED\\[14\\]\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum TRIGGERED14_A { - #[doc = "0: Read: Disabled"] - DISABLED = 0, - #[doc = "1: Read: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: TRIGGERED14_A) -> Self { - variant as u8 != 0 - } -} -impl TRIGGERED14_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> TRIGGERED14_A { - match self.bits { - false => TRIGGERED14_A::DISABLED, - true => TRIGGERED14_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == TRIGGERED14_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == TRIGGERED14_A::ENABLED - } -} -#[doc = "Write '1' to disable interrupt for event TRIGGERED\\[14\\]\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum TRIGGERED14_AW { - #[doc = "1: Disable"] - CLEAR = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: TRIGGERED14_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `TRIGGERED14` writer - Write '1' to disable interrupt for event TRIGGERED\\[14\\]"] -pub type TRIGGERED14_W<'a, const O: u8> = - crate::BitWriter<'a, u32, INTENCLR_SPEC, TRIGGERED14_AW, O>; -impl<'a, const O: u8> TRIGGERED14_W<'a, O> { - #[doc = "Disable"] - #[inline(always)] - pub fn clear(self) -> &'a mut W { - self.variant(TRIGGERED14_AW::CLEAR) - } -} -#[doc = "Field `TRIGGERED15` reader - Write '1' to disable interrupt for event TRIGGERED\\[15\\]"] -pub type TRIGGERED15_R = crate::BitReader; -#[doc = "Write '1' to disable interrupt for event TRIGGERED\\[15\\]\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum TRIGGERED15_A { - #[doc = "0: Read: Disabled"] - DISABLED = 0, - #[doc = "1: Read: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: TRIGGERED15_A) -> Self { - variant as u8 != 0 - } -} -impl TRIGGERED15_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> TRIGGERED15_A { - match self.bits { - false => TRIGGERED15_A::DISABLED, - true => TRIGGERED15_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == TRIGGERED15_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == TRIGGERED15_A::ENABLED - } -} -#[doc = "Write '1' to disable interrupt for event TRIGGERED\\[15\\]\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum TRIGGERED15_AW { - #[doc = "1: Disable"] - CLEAR = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: TRIGGERED15_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `TRIGGERED15` writer - Write '1' to disable interrupt for event TRIGGERED\\[15\\]"] -pub type TRIGGERED15_W<'a, const O: u8> = - crate::BitWriter<'a, u32, INTENCLR_SPEC, TRIGGERED15_AW, O>; -impl<'a, const O: u8> TRIGGERED15_W<'a, O> { - #[doc = "Disable"] - #[inline(always)] - pub fn clear(self) -> &'a mut W { - self.variant(TRIGGERED15_AW::CLEAR) - } -} -impl R { - #[doc = "Bit 0 - Write '1' to disable interrupt for event TRIGGERED\\[0\\]"] - #[inline(always)] - pub fn triggered0(&self) -> TRIGGERED0_R { - TRIGGERED0_R::new((self.bits & 1) != 0) - } - #[doc = "Bit 1 - Write '1' to disable interrupt for event TRIGGERED\\[1\\]"] - #[inline(always)] - pub fn triggered1(&self) -> TRIGGERED1_R { - TRIGGERED1_R::new(((self.bits >> 1) & 1) != 0) - } - #[doc = "Bit 2 - Write '1' to disable interrupt for event TRIGGERED\\[2\\]"] - #[inline(always)] - pub fn triggered2(&self) -> TRIGGERED2_R { - TRIGGERED2_R::new(((self.bits >> 2) & 1) != 0) - } - #[doc = "Bit 3 - Write '1' to disable interrupt for event TRIGGERED\\[3\\]"] - #[inline(always)] - pub fn triggered3(&self) -> TRIGGERED3_R { - TRIGGERED3_R::new(((self.bits >> 3) & 1) != 0) - } - #[doc = "Bit 4 - Write '1' to disable interrupt for event TRIGGERED\\[4\\]"] - #[inline(always)] - pub fn triggered4(&self) -> TRIGGERED4_R { - TRIGGERED4_R::new(((self.bits >> 4) & 1) != 0) - } - #[doc = "Bit 5 - Write '1' to disable interrupt for event TRIGGERED\\[5\\]"] - #[inline(always)] - pub fn triggered5(&self) -> TRIGGERED5_R { - TRIGGERED5_R::new(((self.bits >> 5) & 1) != 0) - } - #[doc = "Bit 6 - Write '1' to disable interrupt for event TRIGGERED\\[6\\]"] - #[inline(always)] - pub fn triggered6(&self) -> TRIGGERED6_R { - TRIGGERED6_R::new(((self.bits >> 6) & 1) != 0) - } - #[doc = "Bit 7 - Write '1' to disable interrupt for event TRIGGERED\\[7\\]"] - #[inline(always)] - pub fn triggered7(&self) -> TRIGGERED7_R { - TRIGGERED7_R::new(((self.bits >> 7) & 1) != 0) - } - #[doc = "Bit 8 - Write '1' to disable interrupt for event TRIGGERED\\[8\\]"] - #[inline(always)] - pub fn triggered8(&self) -> TRIGGERED8_R { - TRIGGERED8_R::new(((self.bits >> 8) & 1) != 0) - } - #[doc = "Bit 9 - Write '1' to disable interrupt for event TRIGGERED\\[9\\]"] - #[inline(always)] - pub fn triggered9(&self) -> TRIGGERED9_R { - TRIGGERED9_R::new(((self.bits >> 9) & 1) != 0) - } - #[doc = "Bit 10 - Write '1' to disable interrupt for event TRIGGERED\\[10\\]"] - #[inline(always)] - pub fn triggered10(&self) -> TRIGGERED10_R { - TRIGGERED10_R::new(((self.bits >> 10) & 1) != 0) - } - #[doc = "Bit 11 - Write '1' to disable interrupt for event TRIGGERED\\[11\\]"] - #[inline(always)] - pub fn triggered11(&self) -> TRIGGERED11_R { - TRIGGERED11_R::new(((self.bits >> 11) & 1) != 0) - } - #[doc = "Bit 12 - Write '1' to disable interrupt for event TRIGGERED\\[12\\]"] - #[inline(always)] - pub fn triggered12(&self) -> TRIGGERED12_R { - TRIGGERED12_R::new(((self.bits >> 12) & 1) != 0) - } - #[doc = "Bit 13 - Write '1' to disable interrupt for event TRIGGERED\\[13\\]"] - #[inline(always)] - pub fn triggered13(&self) -> TRIGGERED13_R { - TRIGGERED13_R::new(((self.bits >> 13) & 1) != 0) - } - #[doc = "Bit 14 - Write '1' to disable interrupt for event TRIGGERED\\[14\\]"] - #[inline(always)] - pub fn triggered14(&self) -> TRIGGERED14_R { - TRIGGERED14_R::new(((self.bits >> 14) & 1) != 0) - } - #[doc = "Bit 15 - Write '1' to disable interrupt for event TRIGGERED\\[15\\]"] - #[inline(always)] - pub fn triggered15(&self) -> TRIGGERED15_R { - TRIGGERED15_R::new(((self.bits >> 15) & 1) != 0) - } -} -impl W { - #[doc = "Bit 0 - Write '1' to disable interrupt for event TRIGGERED\\[0\\]"] - #[inline(always)] - #[must_use] - pub fn triggered0(&mut self) -> TRIGGERED0_W<0> { - TRIGGERED0_W::new(self) - } - #[doc = "Bit 1 - Write '1' to disable interrupt for event TRIGGERED\\[1\\]"] - #[inline(always)] - #[must_use] - pub fn triggered1(&mut self) -> TRIGGERED1_W<1> { - TRIGGERED1_W::new(self) - } - #[doc = "Bit 2 - Write '1' to disable interrupt for event TRIGGERED\\[2\\]"] - #[inline(always)] - #[must_use] - pub fn triggered2(&mut self) -> TRIGGERED2_W<2> { - TRIGGERED2_W::new(self) - } - #[doc = "Bit 3 - Write '1' to disable interrupt for event TRIGGERED\\[3\\]"] - #[inline(always)] - #[must_use] - pub fn triggered3(&mut self) -> TRIGGERED3_W<3> { - TRIGGERED3_W::new(self) - } - #[doc = "Bit 4 - Write '1' to disable interrupt for event TRIGGERED\\[4\\]"] - #[inline(always)] - #[must_use] - pub fn triggered4(&mut self) -> TRIGGERED4_W<4> { - TRIGGERED4_W::new(self) - } - #[doc = "Bit 5 - Write '1' to disable interrupt for event TRIGGERED\\[5\\]"] - #[inline(always)] - #[must_use] - pub fn triggered5(&mut self) -> TRIGGERED5_W<5> { - TRIGGERED5_W::new(self) - } - #[doc = "Bit 6 - Write '1' to disable interrupt for event TRIGGERED\\[6\\]"] - #[inline(always)] - #[must_use] - pub fn triggered6(&mut self) -> TRIGGERED6_W<6> { - TRIGGERED6_W::new(self) - } - #[doc = "Bit 7 - Write '1' to disable interrupt for event TRIGGERED\\[7\\]"] - #[inline(always)] - #[must_use] - pub fn triggered7(&mut self) -> TRIGGERED7_W<7> { - TRIGGERED7_W::new(self) - } - #[doc = "Bit 8 - Write '1' to disable interrupt for event TRIGGERED\\[8\\]"] - #[inline(always)] - #[must_use] - pub fn triggered8(&mut self) -> TRIGGERED8_W<8> { - TRIGGERED8_W::new(self) - } - #[doc = "Bit 9 - Write '1' to disable interrupt for event TRIGGERED\\[9\\]"] - #[inline(always)] - #[must_use] - pub fn triggered9(&mut self) -> TRIGGERED9_W<9> { - TRIGGERED9_W::new(self) - } - #[doc = "Bit 10 - Write '1' to disable interrupt for event TRIGGERED\\[10\\]"] - #[inline(always)] - #[must_use] - pub fn triggered10(&mut self) -> TRIGGERED10_W<10> { - TRIGGERED10_W::new(self) - } - #[doc = "Bit 11 - Write '1' to disable interrupt for event TRIGGERED\\[11\\]"] - #[inline(always)] - #[must_use] - pub fn triggered11(&mut self) -> TRIGGERED11_W<11> { - TRIGGERED11_W::new(self) - } - #[doc = "Bit 12 - Write '1' to disable interrupt for event TRIGGERED\\[12\\]"] - #[inline(always)] - #[must_use] - pub fn triggered12(&mut self) -> TRIGGERED12_W<12> { - TRIGGERED12_W::new(self) - } - #[doc = "Bit 13 - Write '1' to disable interrupt for event TRIGGERED\\[13\\]"] - #[inline(always)] - #[must_use] - pub fn triggered13(&mut self) -> TRIGGERED13_W<13> { - TRIGGERED13_W::new(self) - } - #[doc = "Bit 14 - Write '1' to disable interrupt for event TRIGGERED\\[14\\]"] - #[inline(always)] - #[must_use] - pub fn triggered14(&mut self) -> TRIGGERED14_W<14> { - TRIGGERED14_W::new(self) - } - #[doc = "Bit 15 - Write '1' to disable interrupt for event TRIGGERED\\[15\\]"] - #[inline(always)] - #[must_use] - pub fn triggered15(&mut self) -> TRIGGERED15_W<15> { - TRIGGERED15_W::new(self) - } - #[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 = "Disable interrupt\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 [intenclr](index.html) module"] -pub struct INTENCLR_SPEC; -impl crate::RegisterSpec for INTENCLR_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [intenclr::R](R) reader structure"] -impl crate::Readable for INTENCLR_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [intenclr::W](W) writer structure"] -impl crate::Writable for INTENCLR_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets INTENCLR to value 0"] -impl crate::Resettable for INTENCLR_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/egu0/intenset.rs b/down-the-stack/dk_pac/src/egu0/intenset.rs deleted file mode 100644 index 6d96b8c..0000000 --- a/down-the-stack/dk_pac/src/egu0/intenset.rs +++ /dev/null @@ -1,1159 +0,0 @@ -#[doc = "Register `INTENSET` 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 `INTENSET` 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 `TRIGGERED0` reader - Write '1' to enable interrupt for event TRIGGERED\\[0\\]"] -pub type TRIGGERED0_R = crate::BitReader; -#[doc = "Write '1' to enable interrupt for event TRIGGERED\\[0\\]\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum TRIGGERED0_A { - #[doc = "0: Read: Disabled"] - DISABLED = 0, - #[doc = "1: Read: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: TRIGGERED0_A) -> Self { - variant as u8 != 0 - } -} -impl TRIGGERED0_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> TRIGGERED0_A { - match self.bits { - false => TRIGGERED0_A::DISABLED, - true => TRIGGERED0_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == TRIGGERED0_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == TRIGGERED0_A::ENABLED - } -} -#[doc = "Write '1' to enable interrupt for event TRIGGERED\\[0\\]\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum TRIGGERED0_AW { - #[doc = "1: Enable"] - SET = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: TRIGGERED0_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `TRIGGERED0` writer - Write '1' to enable interrupt for event TRIGGERED\\[0\\]"] -pub type TRIGGERED0_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENSET_SPEC, TRIGGERED0_AW, O>; -impl<'a, const O: u8> TRIGGERED0_W<'a, O> { - #[doc = "Enable"] - #[inline(always)] - pub fn set(self) -> &'a mut W { - self.variant(TRIGGERED0_AW::SET) - } -} -#[doc = "Field `TRIGGERED1` reader - Write '1' to enable interrupt for event TRIGGERED\\[1\\]"] -pub type TRIGGERED1_R = crate::BitReader; -#[doc = "Write '1' to enable interrupt for event TRIGGERED\\[1\\]\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum TRIGGERED1_A { - #[doc = "0: Read: Disabled"] - DISABLED = 0, - #[doc = "1: Read: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: TRIGGERED1_A) -> Self { - variant as u8 != 0 - } -} -impl TRIGGERED1_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> TRIGGERED1_A { - match self.bits { - false => TRIGGERED1_A::DISABLED, - true => TRIGGERED1_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == TRIGGERED1_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == TRIGGERED1_A::ENABLED - } -} -#[doc = "Write '1' to enable interrupt for event TRIGGERED\\[1\\]\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum TRIGGERED1_AW { - #[doc = "1: Enable"] - SET = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: TRIGGERED1_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `TRIGGERED1` writer - Write '1' to enable interrupt for event TRIGGERED\\[1\\]"] -pub type TRIGGERED1_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENSET_SPEC, TRIGGERED1_AW, O>; -impl<'a, const O: u8> TRIGGERED1_W<'a, O> { - #[doc = "Enable"] - #[inline(always)] - pub fn set(self) -> &'a mut W { - self.variant(TRIGGERED1_AW::SET) - } -} -#[doc = "Field `TRIGGERED2` reader - Write '1' to enable interrupt for event TRIGGERED\\[2\\]"] -pub type TRIGGERED2_R = crate::BitReader; -#[doc = "Write '1' to enable interrupt for event TRIGGERED\\[2\\]\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum TRIGGERED2_A { - #[doc = "0: Read: Disabled"] - DISABLED = 0, - #[doc = "1: Read: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: TRIGGERED2_A) -> Self { - variant as u8 != 0 - } -} -impl TRIGGERED2_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> TRIGGERED2_A { - match self.bits { - false => TRIGGERED2_A::DISABLED, - true => TRIGGERED2_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == TRIGGERED2_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == TRIGGERED2_A::ENABLED - } -} -#[doc = "Write '1' to enable interrupt for event TRIGGERED\\[2\\]\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum TRIGGERED2_AW { - #[doc = "1: Enable"] - SET = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: TRIGGERED2_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `TRIGGERED2` writer - Write '1' to enable interrupt for event TRIGGERED\\[2\\]"] -pub type TRIGGERED2_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENSET_SPEC, TRIGGERED2_AW, O>; -impl<'a, const O: u8> TRIGGERED2_W<'a, O> { - #[doc = "Enable"] - #[inline(always)] - pub fn set(self) -> &'a mut W { - self.variant(TRIGGERED2_AW::SET) - } -} -#[doc = "Field `TRIGGERED3` reader - Write '1' to enable interrupt for event TRIGGERED\\[3\\]"] -pub type TRIGGERED3_R = crate::BitReader; -#[doc = "Write '1' to enable interrupt for event TRIGGERED\\[3\\]\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum TRIGGERED3_A { - #[doc = "0: Read: Disabled"] - DISABLED = 0, - #[doc = "1: Read: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: TRIGGERED3_A) -> Self { - variant as u8 != 0 - } -} -impl TRIGGERED3_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> TRIGGERED3_A { - match self.bits { - false => TRIGGERED3_A::DISABLED, - true => TRIGGERED3_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == TRIGGERED3_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == TRIGGERED3_A::ENABLED - } -} -#[doc = "Write '1' to enable interrupt for event TRIGGERED\\[3\\]\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum TRIGGERED3_AW { - #[doc = "1: Enable"] - SET = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: TRIGGERED3_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `TRIGGERED3` writer - Write '1' to enable interrupt for event TRIGGERED\\[3\\]"] -pub type TRIGGERED3_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENSET_SPEC, TRIGGERED3_AW, O>; -impl<'a, const O: u8> TRIGGERED3_W<'a, O> { - #[doc = "Enable"] - #[inline(always)] - pub fn set(self) -> &'a mut W { - self.variant(TRIGGERED3_AW::SET) - } -} -#[doc = "Field `TRIGGERED4` reader - Write '1' to enable interrupt for event TRIGGERED\\[4\\]"] -pub type TRIGGERED4_R = crate::BitReader; -#[doc = "Write '1' to enable interrupt for event TRIGGERED\\[4\\]\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum TRIGGERED4_A { - #[doc = "0: Read: Disabled"] - DISABLED = 0, - #[doc = "1: Read: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: TRIGGERED4_A) -> Self { - variant as u8 != 0 - } -} -impl TRIGGERED4_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> TRIGGERED4_A { - match self.bits { - false => TRIGGERED4_A::DISABLED, - true => TRIGGERED4_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == TRIGGERED4_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == TRIGGERED4_A::ENABLED - } -} -#[doc = "Write '1' to enable interrupt for event TRIGGERED\\[4\\]\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum TRIGGERED4_AW { - #[doc = "1: Enable"] - SET = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: TRIGGERED4_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `TRIGGERED4` writer - Write '1' to enable interrupt for event TRIGGERED\\[4\\]"] -pub type TRIGGERED4_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENSET_SPEC, TRIGGERED4_AW, O>; -impl<'a, const O: u8> TRIGGERED4_W<'a, O> { - #[doc = "Enable"] - #[inline(always)] - pub fn set(self) -> &'a mut W { - self.variant(TRIGGERED4_AW::SET) - } -} -#[doc = "Field `TRIGGERED5` reader - Write '1' to enable interrupt for event TRIGGERED\\[5\\]"] -pub type TRIGGERED5_R = crate::BitReader; -#[doc = "Write '1' to enable interrupt for event TRIGGERED\\[5\\]\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum TRIGGERED5_A { - #[doc = "0: Read: Disabled"] - DISABLED = 0, - #[doc = "1: Read: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: TRIGGERED5_A) -> Self { - variant as u8 != 0 - } -} -impl TRIGGERED5_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> TRIGGERED5_A { - match self.bits { - false => TRIGGERED5_A::DISABLED, - true => TRIGGERED5_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == TRIGGERED5_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == TRIGGERED5_A::ENABLED - } -} -#[doc = "Write '1' to enable interrupt for event TRIGGERED\\[5\\]\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum TRIGGERED5_AW { - #[doc = "1: Enable"] - SET = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: TRIGGERED5_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `TRIGGERED5` writer - Write '1' to enable interrupt for event TRIGGERED\\[5\\]"] -pub type TRIGGERED5_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENSET_SPEC, TRIGGERED5_AW, O>; -impl<'a, const O: u8> TRIGGERED5_W<'a, O> { - #[doc = "Enable"] - #[inline(always)] - pub fn set(self) -> &'a mut W { - self.variant(TRIGGERED5_AW::SET) - } -} -#[doc = "Field `TRIGGERED6` reader - Write '1' to enable interrupt for event TRIGGERED\\[6\\]"] -pub type TRIGGERED6_R = crate::BitReader; -#[doc = "Write '1' to enable interrupt for event TRIGGERED\\[6\\]\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum TRIGGERED6_A { - #[doc = "0: Read: Disabled"] - DISABLED = 0, - #[doc = "1: Read: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: TRIGGERED6_A) -> Self { - variant as u8 != 0 - } -} -impl TRIGGERED6_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> TRIGGERED6_A { - match self.bits { - false => TRIGGERED6_A::DISABLED, - true => TRIGGERED6_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == TRIGGERED6_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == TRIGGERED6_A::ENABLED - } -} -#[doc = "Write '1' to enable interrupt for event TRIGGERED\\[6\\]\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum TRIGGERED6_AW { - #[doc = "1: Enable"] - SET = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: TRIGGERED6_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `TRIGGERED6` writer - Write '1' to enable interrupt for event TRIGGERED\\[6\\]"] -pub type TRIGGERED6_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENSET_SPEC, TRIGGERED6_AW, O>; -impl<'a, const O: u8> TRIGGERED6_W<'a, O> { - #[doc = "Enable"] - #[inline(always)] - pub fn set(self) -> &'a mut W { - self.variant(TRIGGERED6_AW::SET) - } -} -#[doc = "Field `TRIGGERED7` reader - Write '1' to enable interrupt for event TRIGGERED\\[7\\]"] -pub type TRIGGERED7_R = crate::BitReader; -#[doc = "Write '1' to enable interrupt for event TRIGGERED\\[7\\]\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum TRIGGERED7_A { - #[doc = "0: Read: Disabled"] - DISABLED = 0, - #[doc = "1: Read: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: TRIGGERED7_A) -> Self { - variant as u8 != 0 - } -} -impl TRIGGERED7_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> TRIGGERED7_A { - match self.bits { - false => TRIGGERED7_A::DISABLED, - true => TRIGGERED7_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == TRIGGERED7_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == TRIGGERED7_A::ENABLED - } -} -#[doc = "Write '1' to enable interrupt for event TRIGGERED\\[7\\]\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum TRIGGERED7_AW { - #[doc = "1: Enable"] - SET = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: TRIGGERED7_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `TRIGGERED7` writer - Write '1' to enable interrupt for event TRIGGERED\\[7\\]"] -pub type TRIGGERED7_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENSET_SPEC, TRIGGERED7_AW, O>; -impl<'a, const O: u8> TRIGGERED7_W<'a, O> { - #[doc = "Enable"] - #[inline(always)] - pub fn set(self) -> &'a mut W { - self.variant(TRIGGERED7_AW::SET) - } -} -#[doc = "Field `TRIGGERED8` reader - Write '1' to enable interrupt for event TRIGGERED\\[8\\]"] -pub type TRIGGERED8_R = crate::BitReader; -#[doc = "Write '1' to enable interrupt for event TRIGGERED\\[8\\]\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum TRIGGERED8_A { - #[doc = "0: Read: Disabled"] - DISABLED = 0, - #[doc = "1: Read: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: TRIGGERED8_A) -> Self { - variant as u8 != 0 - } -} -impl TRIGGERED8_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> TRIGGERED8_A { - match self.bits { - false => TRIGGERED8_A::DISABLED, - true => TRIGGERED8_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == TRIGGERED8_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == TRIGGERED8_A::ENABLED - } -} -#[doc = "Write '1' to enable interrupt for event TRIGGERED\\[8\\]\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum TRIGGERED8_AW { - #[doc = "1: Enable"] - SET = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: TRIGGERED8_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `TRIGGERED8` writer - Write '1' to enable interrupt for event TRIGGERED\\[8\\]"] -pub type TRIGGERED8_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENSET_SPEC, TRIGGERED8_AW, O>; -impl<'a, const O: u8> TRIGGERED8_W<'a, O> { - #[doc = "Enable"] - #[inline(always)] - pub fn set(self) -> &'a mut W { - self.variant(TRIGGERED8_AW::SET) - } -} -#[doc = "Field `TRIGGERED9` reader - Write '1' to enable interrupt for event TRIGGERED\\[9\\]"] -pub type TRIGGERED9_R = crate::BitReader; -#[doc = "Write '1' to enable interrupt for event TRIGGERED\\[9\\]\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum TRIGGERED9_A { - #[doc = "0: Read: Disabled"] - DISABLED = 0, - #[doc = "1: Read: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: TRIGGERED9_A) -> Self { - variant as u8 != 0 - } -} -impl TRIGGERED9_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> TRIGGERED9_A { - match self.bits { - false => TRIGGERED9_A::DISABLED, - true => TRIGGERED9_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == TRIGGERED9_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == TRIGGERED9_A::ENABLED - } -} -#[doc = "Write '1' to enable interrupt for event TRIGGERED\\[9\\]\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum TRIGGERED9_AW { - #[doc = "1: Enable"] - SET = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: TRIGGERED9_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `TRIGGERED9` writer - Write '1' to enable interrupt for event TRIGGERED\\[9\\]"] -pub type TRIGGERED9_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENSET_SPEC, TRIGGERED9_AW, O>; -impl<'a, const O: u8> TRIGGERED9_W<'a, O> { - #[doc = "Enable"] - #[inline(always)] - pub fn set(self) -> &'a mut W { - self.variant(TRIGGERED9_AW::SET) - } -} -#[doc = "Field `TRIGGERED10` reader - Write '1' to enable interrupt for event TRIGGERED\\[10\\]"] -pub type TRIGGERED10_R = crate::BitReader; -#[doc = "Write '1' to enable interrupt for event TRIGGERED\\[10\\]\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum TRIGGERED10_A { - #[doc = "0: Read: Disabled"] - DISABLED = 0, - #[doc = "1: Read: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: TRIGGERED10_A) -> Self { - variant as u8 != 0 - } -} -impl TRIGGERED10_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> TRIGGERED10_A { - match self.bits { - false => TRIGGERED10_A::DISABLED, - true => TRIGGERED10_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == TRIGGERED10_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == TRIGGERED10_A::ENABLED - } -} -#[doc = "Write '1' to enable interrupt for event TRIGGERED\\[10\\]\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum TRIGGERED10_AW { - #[doc = "1: Enable"] - SET = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: TRIGGERED10_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `TRIGGERED10` writer - Write '1' to enable interrupt for event TRIGGERED\\[10\\]"] -pub type TRIGGERED10_W<'a, const O: u8> = - crate::BitWriter<'a, u32, INTENSET_SPEC, TRIGGERED10_AW, O>; -impl<'a, const O: u8> TRIGGERED10_W<'a, O> { - #[doc = "Enable"] - #[inline(always)] - pub fn set(self) -> &'a mut W { - self.variant(TRIGGERED10_AW::SET) - } -} -#[doc = "Field `TRIGGERED11` reader - Write '1' to enable interrupt for event TRIGGERED\\[11\\]"] -pub type TRIGGERED11_R = crate::BitReader; -#[doc = "Write '1' to enable interrupt for event TRIGGERED\\[11\\]\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum TRIGGERED11_A { - #[doc = "0: Read: Disabled"] - DISABLED = 0, - #[doc = "1: Read: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: TRIGGERED11_A) -> Self { - variant as u8 != 0 - } -} -impl TRIGGERED11_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> TRIGGERED11_A { - match self.bits { - false => TRIGGERED11_A::DISABLED, - true => TRIGGERED11_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == TRIGGERED11_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == TRIGGERED11_A::ENABLED - } -} -#[doc = "Write '1' to enable interrupt for event TRIGGERED\\[11\\]\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum TRIGGERED11_AW { - #[doc = "1: Enable"] - SET = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: TRIGGERED11_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `TRIGGERED11` writer - Write '1' to enable interrupt for event TRIGGERED\\[11\\]"] -pub type TRIGGERED11_W<'a, const O: u8> = - crate::BitWriter<'a, u32, INTENSET_SPEC, TRIGGERED11_AW, O>; -impl<'a, const O: u8> TRIGGERED11_W<'a, O> { - #[doc = "Enable"] - #[inline(always)] - pub fn set(self) -> &'a mut W { - self.variant(TRIGGERED11_AW::SET) - } -} -#[doc = "Field `TRIGGERED12` reader - Write '1' to enable interrupt for event TRIGGERED\\[12\\]"] -pub type TRIGGERED12_R = crate::BitReader; -#[doc = "Write '1' to enable interrupt for event TRIGGERED\\[12\\]\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum TRIGGERED12_A { - #[doc = "0: Read: Disabled"] - DISABLED = 0, - #[doc = "1: Read: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: TRIGGERED12_A) -> Self { - variant as u8 != 0 - } -} -impl TRIGGERED12_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> TRIGGERED12_A { - match self.bits { - false => TRIGGERED12_A::DISABLED, - true => TRIGGERED12_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == TRIGGERED12_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == TRIGGERED12_A::ENABLED - } -} -#[doc = "Write '1' to enable interrupt for event TRIGGERED\\[12\\]\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum TRIGGERED12_AW { - #[doc = "1: Enable"] - SET = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: TRIGGERED12_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `TRIGGERED12` writer - Write '1' to enable interrupt for event TRIGGERED\\[12\\]"] -pub type TRIGGERED12_W<'a, const O: u8> = - crate::BitWriter<'a, u32, INTENSET_SPEC, TRIGGERED12_AW, O>; -impl<'a, const O: u8> TRIGGERED12_W<'a, O> { - #[doc = "Enable"] - #[inline(always)] - pub fn set(self) -> &'a mut W { - self.variant(TRIGGERED12_AW::SET) - } -} -#[doc = "Field `TRIGGERED13` reader - Write '1' to enable interrupt for event TRIGGERED\\[13\\]"] -pub type TRIGGERED13_R = crate::BitReader; -#[doc = "Write '1' to enable interrupt for event TRIGGERED\\[13\\]\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum TRIGGERED13_A { - #[doc = "0: Read: Disabled"] - DISABLED = 0, - #[doc = "1: Read: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: TRIGGERED13_A) -> Self { - variant as u8 != 0 - } -} -impl TRIGGERED13_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> TRIGGERED13_A { - match self.bits { - false => TRIGGERED13_A::DISABLED, - true => TRIGGERED13_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == TRIGGERED13_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == TRIGGERED13_A::ENABLED - } -} -#[doc = "Write '1' to enable interrupt for event TRIGGERED\\[13\\]\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum TRIGGERED13_AW { - #[doc = "1: Enable"] - SET = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: TRIGGERED13_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `TRIGGERED13` writer - Write '1' to enable interrupt for event TRIGGERED\\[13\\]"] -pub type TRIGGERED13_W<'a, const O: u8> = - crate::BitWriter<'a, u32, INTENSET_SPEC, TRIGGERED13_AW, O>; -impl<'a, const O: u8> TRIGGERED13_W<'a, O> { - #[doc = "Enable"] - #[inline(always)] - pub fn set(self) -> &'a mut W { - self.variant(TRIGGERED13_AW::SET) - } -} -#[doc = "Field `TRIGGERED14` reader - Write '1' to enable interrupt for event TRIGGERED\\[14\\]"] -pub type TRIGGERED14_R = crate::BitReader; -#[doc = "Write '1' to enable interrupt for event TRIGGERED\\[14\\]\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum TRIGGERED14_A { - #[doc = "0: Read: Disabled"] - DISABLED = 0, - #[doc = "1: Read: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: TRIGGERED14_A) -> Self { - variant as u8 != 0 - } -} -impl TRIGGERED14_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> TRIGGERED14_A { - match self.bits { - false => TRIGGERED14_A::DISABLED, - true => TRIGGERED14_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == TRIGGERED14_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == TRIGGERED14_A::ENABLED - } -} -#[doc = "Write '1' to enable interrupt for event TRIGGERED\\[14\\]\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum TRIGGERED14_AW { - #[doc = "1: Enable"] - SET = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: TRIGGERED14_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `TRIGGERED14` writer - Write '1' to enable interrupt for event TRIGGERED\\[14\\]"] -pub type TRIGGERED14_W<'a, const O: u8> = - crate::BitWriter<'a, u32, INTENSET_SPEC, TRIGGERED14_AW, O>; -impl<'a, const O: u8> TRIGGERED14_W<'a, O> { - #[doc = "Enable"] - #[inline(always)] - pub fn set(self) -> &'a mut W { - self.variant(TRIGGERED14_AW::SET) - } -} -#[doc = "Field `TRIGGERED15` reader - Write '1' to enable interrupt for event TRIGGERED\\[15\\]"] -pub type TRIGGERED15_R = crate::BitReader; -#[doc = "Write '1' to enable interrupt for event TRIGGERED\\[15\\]\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum TRIGGERED15_A { - #[doc = "0: Read: Disabled"] - DISABLED = 0, - #[doc = "1: Read: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: TRIGGERED15_A) -> Self { - variant as u8 != 0 - } -} -impl TRIGGERED15_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> TRIGGERED15_A { - match self.bits { - false => TRIGGERED15_A::DISABLED, - true => TRIGGERED15_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == TRIGGERED15_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == TRIGGERED15_A::ENABLED - } -} -#[doc = "Write '1' to enable interrupt for event TRIGGERED\\[15\\]\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum TRIGGERED15_AW { - #[doc = "1: Enable"] - SET = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: TRIGGERED15_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `TRIGGERED15` writer - Write '1' to enable interrupt for event TRIGGERED\\[15\\]"] -pub type TRIGGERED15_W<'a, const O: u8> = - crate::BitWriter<'a, u32, INTENSET_SPEC, TRIGGERED15_AW, O>; -impl<'a, const O: u8> TRIGGERED15_W<'a, O> { - #[doc = "Enable"] - #[inline(always)] - pub fn set(self) -> &'a mut W { - self.variant(TRIGGERED15_AW::SET) - } -} -impl R { - #[doc = "Bit 0 - Write '1' to enable interrupt for event TRIGGERED\\[0\\]"] - #[inline(always)] - pub fn triggered0(&self) -> TRIGGERED0_R { - TRIGGERED0_R::new((self.bits & 1) != 0) - } - #[doc = "Bit 1 - Write '1' to enable interrupt for event TRIGGERED\\[1\\]"] - #[inline(always)] - pub fn triggered1(&self) -> TRIGGERED1_R { - TRIGGERED1_R::new(((self.bits >> 1) & 1) != 0) - } - #[doc = "Bit 2 - Write '1' to enable interrupt for event TRIGGERED\\[2\\]"] - #[inline(always)] - pub fn triggered2(&self) -> TRIGGERED2_R { - TRIGGERED2_R::new(((self.bits >> 2) & 1) != 0) - } - #[doc = "Bit 3 - Write '1' to enable interrupt for event TRIGGERED\\[3\\]"] - #[inline(always)] - pub fn triggered3(&self) -> TRIGGERED3_R { - TRIGGERED3_R::new(((self.bits >> 3) & 1) != 0) - } - #[doc = "Bit 4 - Write '1' to enable interrupt for event TRIGGERED\\[4\\]"] - #[inline(always)] - pub fn triggered4(&self) -> TRIGGERED4_R { - TRIGGERED4_R::new(((self.bits >> 4) & 1) != 0) - } - #[doc = "Bit 5 - Write '1' to enable interrupt for event TRIGGERED\\[5\\]"] - #[inline(always)] - pub fn triggered5(&self) -> TRIGGERED5_R { - TRIGGERED5_R::new(((self.bits >> 5) & 1) != 0) - } - #[doc = "Bit 6 - Write '1' to enable interrupt for event TRIGGERED\\[6\\]"] - #[inline(always)] - pub fn triggered6(&self) -> TRIGGERED6_R { - TRIGGERED6_R::new(((self.bits >> 6) & 1) != 0) - } - #[doc = "Bit 7 - Write '1' to enable interrupt for event TRIGGERED\\[7\\]"] - #[inline(always)] - pub fn triggered7(&self) -> TRIGGERED7_R { - TRIGGERED7_R::new(((self.bits >> 7) & 1) != 0) - } - #[doc = "Bit 8 - Write '1' to enable interrupt for event TRIGGERED\\[8\\]"] - #[inline(always)] - pub fn triggered8(&self) -> TRIGGERED8_R { - TRIGGERED8_R::new(((self.bits >> 8) & 1) != 0) - } - #[doc = "Bit 9 - Write '1' to enable interrupt for event TRIGGERED\\[9\\]"] - #[inline(always)] - pub fn triggered9(&self) -> TRIGGERED9_R { - TRIGGERED9_R::new(((self.bits >> 9) & 1) != 0) - } - #[doc = "Bit 10 - Write '1' to enable interrupt for event TRIGGERED\\[10\\]"] - #[inline(always)] - pub fn triggered10(&self) -> TRIGGERED10_R { - TRIGGERED10_R::new(((self.bits >> 10) & 1) != 0) - } - #[doc = "Bit 11 - Write '1' to enable interrupt for event TRIGGERED\\[11\\]"] - #[inline(always)] - pub fn triggered11(&self) -> TRIGGERED11_R { - TRIGGERED11_R::new(((self.bits >> 11) & 1) != 0) - } - #[doc = "Bit 12 - Write '1' to enable interrupt for event TRIGGERED\\[12\\]"] - #[inline(always)] - pub fn triggered12(&self) -> TRIGGERED12_R { - TRIGGERED12_R::new(((self.bits >> 12) & 1) != 0) - } - #[doc = "Bit 13 - Write '1' to enable interrupt for event TRIGGERED\\[13\\]"] - #[inline(always)] - pub fn triggered13(&self) -> TRIGGERED13_R { - TRIGGERED13_R::new(((self.bits >> 13) & 1) != 0) - } - #[doc = "Bit 14 - Write '1' to enable interrupt for event TRIGGERED\\[14\\]"] - #[inline(always)] - pub fn triggered14(&self) -> TRIGGERED14_R { - TRIGGERED14_R::new(((self.bits >> 14) & 1) != 0) - } - #[doc = "Bit 15 - Write '1' to enable interrupt for event TRIGGERED\\[15\\]"] - #[inline(always)] - pub fn triggered15(&self) -> TRIGGERED15_R { - TRIGGERED15_R::new(((self.bits >> 15) & 1) != 0) - } -} -impl W { - #[doc = "Bit 0 - Write '1' to enable interrupt for event TRIGGERED\\[0\\]"] - #[inline(always)] - #[must_use] - pub fn triggered0(&mut self) -> TRIGGERED0_W<0> { - TRIGGERED0_W::new(self) - } - #[doc = "Bit 1 - Write '1' to enable interrupt for event TRIGGERED\\[1\\]"] - #[inline(always)] - #[must_use] - pub fn triggered1(&mut self) -> TRIGGERED1_W<1> { - TRIGGERED1_W::new(self) - } - #[doc = "Bit 2 - Write '1' to enable interrupt for event TRIGGERED\\[2\\]"] - #[inline(always)] - #[must_use] - pub fn triggered2(&mut self) -> TRIGGERED2_W<2> { - TRIGGERED2_W::new(self) - } - #[doc = "Bit 3 - Write '1' to enable interrupt for event TRIGGERED\\[3\\]"] - #[inline(always)] - #[must_use] - pub fn triggered3(&mut self) -> TRIGGERED3_W<3> { - TRIGGERED3_W::new(self) - } - #[doc = "Bit 4 - Write '1' to enable interrupt for event TRIGGERED\\[4\\]"] - #[inline(always)] - #[must_use] - pub fn triggered4(&mut self) -> TRIGGERED4_W<4> { - TRIGGERED4_W::new(self) - } - #[doc = "Bit 5 - Write '1' to enable interrupt for event TRIGGERED\\[5\\]"] - #[inline(always)] - #[must_use] - pub fn triggered5(&mut self) -> TRIGGERED5_W<5> { - TRIGGERED5_W::new(self) - } - #[doc = "Bit 6 - Write '1' to enable interrupt for event TRIGGERED\\[6\\]"] - #[inline(always)] - #[must_use] - pub fn triggered6(&mut self) -> TRIGGERED6_W<6> { - TRIGGERED6_W::new(self) - } - #[doc = "Bit 7 - Write '1' to enable interrupt for event TRIGGERED\\[7\\]"] - #[inline(always)] - #[must_use] - pub fn triggered7(&mut self) -> TRIGGERED7_W<7> { - TRIGGERED7_W::new(self) - } - #[doc = "Bit 8 - Write '1' to enable interrupt for event TRIGGERED\\[8\\]"] - #[inline(always)] - #[must_use] - pub fn triggered8(&mut self) -> TRIGGERED8_W<8> { - TRIGGERED8_W::new(self) - } - #[doc = "Bit 9 - Write '1' to enable interrupt for event TRIGGERED\\[9\\]"] - #[inline(always)] - #[must_use] - pub fn triggered9(&mut self) -> TRIGGERED9_W<9> { - TRIGGERED9_W::new(self) - } - #[doc = "Bit 10 - Write '1' to enable interrupt for event TRIGGERED\\[10\\]"] - #[inline(always)] - #[must_use] - pub fn triggered10(&mut self) -> TRIGGERED10_W<10> { - TRIGGERED10_W::new(self) - } - #[doc = "Bit 11 - Write '1' to enable interrupt for event TRIGGERED\\[11\\]"] - #[inline(always)] - #[must_use] - pub fn triggered11(&mut self) -> TRIGGERED11_W<11> { - TRIGGERED11_W::new(self) - } - #[doc = "Bit 12 - Write '1' to enable interrupt for event TRIGGERED\\[12\\]"] - #[inline(always)] - #[must_use] - pub fn triggered12(&mut self) -> TRIGGERED12_W<12> { - TRIGGERED12_W::new(self) - } - #[doc = "Bit 13 - Write '1' to enable interrupt for event TRIGGERED\\[13\\]"] - #[inline(always)] - #[must_use] - pub fn triggered13(&mut self) -> TRIGGERED13_W<13> { - TRIGGERED13_W::new(self) - } - #[doc = "Bit 14 - Write '1' to enable interrupt for event TRIGGERED\\[14\\]"] - #[inline(always)] - #[must_use] - pub fn triggered14(&mut self) -> TRIGGERED14_W<14> { - TRIGGERED14_W::new(self) - } - #[doc = "Bit 15 - Write '1' to enable interrupt for event TRIGGERED\\[15\\]"] - #[inline(always)] - #[must_use] - pub fn triggered15(&mut self) -> TRIGGERED15_W<15> { - TRIGGERED15_W::new(self) - } - #[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 = "Enable interrupt\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 [intenset](index.html) module"] -pub struct INTENSET_SPEC; -impl crate::RegisterSpec for INTENSET_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [intenset::R](R) reader structure"] -impl crate::Readable for INTENSET_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [intenset::W](W) writer structure"] -impl crate::Writable for INTENSET_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets INTENSET to value 0"] -impl crate::Resettable for INTENSET_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/egu0/tasks_trigger.rs b/down-the-stack/dk_pac/src/egu0/tasks_trigger.rs deleted file mode 100644 index 14d7c5f..0000000 --- a/down-the-stack/dk_pac/src/egu0/tasks_trigger.rs +++ /dev/null @@ -1,77 +0,0 @@ -#[doc = "Register `TASKS_TRIGGER[%s]` 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 = "Trigger n for triggering the corresponding TRIGGERED\\[n\\] -event\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum TASKS_TRIGGER_AW { - #[doc = "1: Trigger task"] - TRIGGER = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: TASKS_TRIGGER_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `TASKS_TRIGGER` writer - Trigger n for triggering the corresponding TRIGGERED\\[n\\] -event"] -pub type TASKS_TRIGGER_W<'a, const O: u8> = - crate::BitWriter<'a, u32, TASKS_TRIGGER_SPEC, TASKS_TRIGGER_AW, O>; -impl<'a, const O: u8> TASKS_TRIGGER_W<'a, O> { - #[doc = "Trigger task"] - #[inline(always)] - pub fn trigger(self) -> &'a mut W { - self.variant(TASKS_TRIGGER_AW::TRIGGER) - } -} -impl W { - #[doc = "Bit 0 - Trigger n for triggering the corresponding TRIGGERED\\[n\\] -event"] - #[inline(always)] - #[must_use] - pub fn tasks_trigger(&mut self) -> TASKS_TRIGGER_W<0> { - TASKS_TRIGGER_W::new(self) - } - #[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 = "Description collection: Trigger n for triggering the corresponding TRIGGERED\\[n\\] -event\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 [tasks_trigger](index.html) module"] -pub struct TASKS_TRIGGER_SPEC; -impl crate::RegisterSpec for TASKS_TRIGGER_SPEC { - type Ux = u32; -} -#[doc = "`write(|w| ..)` method takes [tasks_trigger::W](W) writer structure"] -impl crate::Writable for TASKS_TRIGGER_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets TASKS_TRIGGER[%s] -to value 0"] -impl crate::Resettable for TASKS_TRIGGER_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/ficr.rs b/down-the-stack/dk_pac/src/ficr.rs deleted file mode 100644 index 3f5c361..0000000 --- a/down-the-stack/dk_pac/src/ficr.rs +++ /dev/null @@ -1,73 +0,0 @@ -#[doc = r"Register block"] -#[repr(C)] -pub struct RegisterBlock { - _reserved0: [u8; 0x10], - #[doc = "0x10 - Code memory page size"] - pub codepagesize: CODEPAGESIZE, - #[doc = "0x14 - Code memory size"] - pub codesize: CODESIZE, - _reserved2: [u8; 0x48], - #[doc = "0x60..0x68 - Description collection: Device identifier"] - pub deviceid: [DEVICEID; 2], - _reserved3: [u8; 0x18], - #[doc = "0x80..0x90 - Description collection: Encryption Root, word n"] - pub er: [ER; 4], - #[doc = "0x90..0xa0 - Description collection: Identity Root, word n"] - pub ir: [IR; 4], - #[doc = "0xa0 - Device address type"] - pub deviceaddrtype: DEVICEADDRTYPE, - #[doc = "0xa4..0xac - Description collection: Device address n"] - pub deviceaddr: [DEVICEADDR; 2], - _reserved7: [u8; 0x54], - #[doc = "0x100..0x114 - Device info"] - pub info: INFO, - _reserved8: [u8; 0x02f0], - #[doc = "0x404..0x448 - Registers storing factory TEMP module linearization coefficients"] - pub temp: TEMP, - _reserved9: [u8; 0x08], - #[doc = "0x450..0x460 - Unspecified"] - pub nfc: NFC, -} -#[doc = "CODEPAGESIZE (r) register accessor: an alias for `Reg`"] -pub type CODEPAGESIZE = crate::Reg; -#[doc = "Code memory page size"] -pub mod codepagesize; -#[doc = "CODESIZE (r) register accessor: an alias for `Reg`"] -pub type CODESIZE = crate::Reg; -#[doc = "Code memory size"] -pub mod codesize; -#[doc = "DEVICEID (r) register accessor: an alias for `Reg`"] -pub type DEVICEID = crate::Reg; -#[doc = "Description collection: Device identifier"] -pub mod deviceid; -#[doc = "ER (r) register accessor: an alias for `Reg`"] -pub type ER = crate::Reg; -#[doc = "Description collection: Encryption Root, word n"] -pub mod er; -#[doc = "IR (r) register accessor: an alias for `Reg`"] -pub type IR = crate::Reg; -#[doc = "Description collection: Identity Root, word n"] -pub mod ir; -#[doc = "DEVICEADDRTYPE (r) register accessor: an alias for `Reg`"] -pub type DEVICEADDRTYPE = crate::Reg; -#[doc = "Device address type"] -pub mod deviceaddrtype; -#[doc = "DEVICEADDR (r) register accessor: an alias for `Reg`"] -pub type DEVICEADDR = crate::Reg; -#[doc = "Description collection: Device address n"] -pub mod deviceaddr; -#[doc = "Device info"] -pub use self::info::INFO; -#[doc = r"Cluster"] -#[doc = "Device info"] -pub mod info; -#[doc = "Registers storing factory TEMP module linearization coefficients"] -pub use self::temp::TEMP; -#[doc = r"Cluster"] -#[doc = "Registers storing factory TEMP module linearization coefficients"] -pub mod temp; -#[doc = "Unspecified"] -pub use self::nfc::NFC; -#[doc = r"Cluster"] -#[doc = "Unspecified"] -pub mod nfc; diff --git a/down-the-stack/dk_pac/src/ficr/codepagesize.rs b/down-the-stack/dk_pac/src/ficr/codepagesize.rs deleted file mode 100644 index 695f00d..0000000 --- a/down-the-stack/dk_pac/src/ficr/codepagesize.rs +++ /dev/null @@ -1,37 +0,0 @@ -#[doc = "Register `CODEPAGESIZE` 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 = "Field `CODEPAGESIZE` reader - Code memory page size"] -pub type CODEPAGESIZE_R = crate::FieldReader; -impl R { - #[doc = "Bits 0:31 - Code memory page size"] - #[inline(always)] - pub fn codepagesize(&self) -> CODEPAGESIZE_R { - CODEPAGESIZE_R::new(self.bits) - } -} -#[doc = "Code memory page size\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 [codepagesize](index.html) module"] -pub struct CODEPAGESIZE_SPEC; -impl crate::RegisterSpec for CODEPAGESIZE_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [codepagesize::R](R) reader structure"] -impl crate::Readable for CODEPAGESIZE_SPEC { - type Reader = R; -} -#[doc = "`reset()` method sets CODEPAGESIZE to value 0xffff_ffff"] -impl crate::Resettable for CODEPAGESIZE_SPEC { - const RESET_VALUE: Self::Ux = 0xffff_ffff; -} diff --git a/down-the-stack/dk_pac/src/ficr/codesize.rs b/down-the-stack/dk_pac/src/ficr/codesize.rs deleted file mode 100644 index 06578e2..0000000 --- a/down-the-stack/dk_pac/src/ficr/codesize.rs +++ /dev/null @@ -1,37 +0,0 @@ -#[doc = "Register `CODESIZE` 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 = "Field `CODESIZE` reader - Code memory size in number of pages"] -pub type CODESIZE_R = crate::FieldReader; -impl R { - #[doc = "Bits 0:31 - Code memory size in number of pages"] - #[inline(always)] - pub fn codesize(&self) -> CODESIZE_R { - CODESIZE_R::new(self.bits) - } -} -#[doc = "Code memory size\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 [codesize](index.html) module"] -pub struct CODESIZE_SPEC; -impl crate::RegisterSpec for CODESIZE_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [codesize::R](R) reader structure"] -impl crate::Readable for CODESIZE_SPEC { - type Reader = R; -} -#[doc = "`reset()` method sets CODESIZE to value 0xffff_ffff"] -impl crate::Resettable for CODESIZE_SPEC { - const RESET_VALUE: Self::Ux = 0xffff_ffff; -} diff --git a/down-the-stack/dk_pac/src/ficr/deviceaddr.rs b/down-the-stack/dk_pac/src/ficr/deviceaddr.rs deleted file mode 100644 index 74e4d0e..0000000 --- a/down-the-stack/dk_pac/src/ficr/deviceaddr.rs +++ /dev/null @@ -1,38 +0,0 @@ -#[doc = "Register `DEVICEADDR[%s]` 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 = "Field `DEVICEADDR` reader - 48 bit device address"] -pub type DEVICEADDR_R = crate::FieldReader; -impl R { - #[doc = "Bits 0:31 - 48 bit device address"] - #[inline(always)] - pub fn deviceaddr(&self) -> DEVICEADDR_R { - DEVICEADDR_R::new(self.bits) - } -} -#[doc = "Description collection: Device address n\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 [deviceaddr](index.html) module"] -pub struct DEVICEADDR_SPEC; -impl crate::RegisterSpec for DEVICEADDR_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [deviceaddr::R](R) reader structure"] -impl crate::Readable for DEVICEADDR_SPEC { - type Reader = R; -} -#[doc = "`reset()` method sets DEVICEADDR[%s] -to value 0xffff_ffff"] -impl crate::Resettable for DEVICEADDR_SPEC { - const RESET_VALUE: Self::Ux = 0xffff_ffff; -} diff --git a/down-the-stack/dk_pac/src/ficr/deviceaddrtype.rs b/down-the-stack/dk_pac/src/ficr/deviceaddrtype.rs deleted file mode 100644 index 8f82ab6..0000000 --- a/down-the-stack/dk_pac/src/ficr/deviceaddrtype.rs +++ /dev/null @@ -1,71 +0,0 @@ -#[doc = "Register `DEVICEADDRTYPE` 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 = "Field `DEVICEADDRTYPE` reader - Device address type"] -pub type DEVICEADDRTYPE_R = crate::BitReader; -#[doc = "Device address type\n\nValue on reset: 1"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum DEVICEADDRTYPE_A { - #[doc = "0: Public address"] - PUBLIC = 0, - #[doc = "1: Random address"] - RANDOM = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: DEVICEADDRTYPE_A) -> Self { - variant as u8 != 0 - } -} -impl DEVICEADDRTYPE_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> DEVICEADDRTYPE_A { - match self.bits { - false => DEVICEADDRTYPE_A::PUBLIC, - true => DEVICEADDRTYPE_A::RANDOM, - } - } - #[doc = "Checks if the value of the field is `PUBLIC`"] - #[inline(always)] - pub fn is_public(&self) -> bool { - *self == DEVICEADDRTYPE_A::PUBLIC - } - #[doc = "Checks if the value of the field is `RANDOM`"] - #[inline(always)] - pub fn is_random(&self) -> bool { - *self == DEVICEADDRTYPE_A::RANDOM - } -} -impl R { - #[doc = "Bit 0 - Device address type"] - #[inline(always)] - pub fn deviceaddrtype(&self) -> DEVICEADDRTYPE_R { - DEVICEADDRTYPE_R::new((self.bits & 1) != 0) - } -} -#[doc = "Device address type\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 [deviceaddrtype](index.html) module"] -pub struct DEVICEADDRTYPE_SPEC; -impl crate::RegisterSpec for DEVICEADDRTYPE_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [deviceaddrtype::R](R) reader structure"] -impl crate::Readable for DEVICEADDRTYPE_SPEC { - type Reader = R; -} -#[doc = "`reset()` method sets DEVICEADDRTYPE to value 0xffff_ffff"] -impl crate::Resettable for DEVICEADDRTYPE_SPEC { - const RESET_VALUE: Self::Ux = 0xffff_ffff; -} diff --git a/down-the-stack/dk_pac/src/ficr/deviceid.rs b/down-the-stack/dk_pac/src/ficr/deviceid.rs deleted file mode 100644 index c307d38..0000000 --- a/down-the-stack/dk_pac/src/ficr/deviceid.rs +++ /dev/null @@ -1,38 +0,0 @@ -#[doc = "Register `DEVICEID[%s]` 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 = "Field `DEVICEID` reader - 64 bit unique device identifier"] -pub type DEVICEID_R = crate::FieldReader; -impl R { - #[doc = "Bits 0:31 - 64 bit unique device identifier"] - #[inline(always)] - pub fn deviceid(&self) -> DEVICEID_R { - DEVICEID_R::new(self.bits) - } -} -#[doc = "Description collection: Device identifier\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 [deviceid](index.html) module"] -pub struct DEVICEID_SPEC; -impl crate::RegisterSpec for DEVICEID_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [deviceid::R](R) reader structure"] -impl crate::Readable for DEVICEID_SPEC { - type Reader = R; -} -#[doc = "`reset()` method sets DEVICEID[%s] -to value 0xffff_ffff"] -impl crate::Resettable for DEVICEID_SPEC { - const RESET_VALUE: Self::Ux = 0xffff_ffff; -} diff --git a/down-the-stack/dk_pac/src/ficr/er.rs b/down-the-stack/dk_pac/src/ficr/er.rs deleted file mode 100644 index b321253..0000000 --- a/down-the-stack/dk_pac/src/ficr/er.rs +++ /dev/null @@ -1,38 +0,0 @@ -#[doc = "Register `ER[%s]` 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 = "Field `ER` reader - Encryption Root, word n"] -pub type ER_R = crate::FieldReader; -impl R { - #[doc = "Bits 0:31 - Encryption Root, word n"] - #[inline(always)] - pub fn er(&self) -> ER_R { - ER_R::new(self.bits) - } -} -#[doc = "Description collection: Encryption Root, word n\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 [er](index.html) module"] -pub struct ER_SPEC; -impl crate::RegisterSpec for ER_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [er::R](R) reader structure"] -impl crate::Readable for ER_SPEC { - type Reader = R; -} -#[doc = "`reset()` method sets ER[%s] -to value 0xffff_ffff"] -impl crate::Resettable for ER_SPEC { - const RESET_VALUE: Self::Ux = 0xffff_ffff; -} diff --git a/down-the-stack/dk_pac/src/ficr/info.rs b/down-the-stack/dk_pac/src/ficr/info.rs deleted file mode 100644 index c2a353e..0000000 --- a/down-the-stack/dk_pac/src/ficr/info.rs +++ /dev/null @@ -1,34 +0,0 @@ -#[doc = r"Register block"] -#[repr(C)] -pub struct INFO { - #[doc = "0x00 - Part code"] - pub part: PART, - #[doc = "0x04 - Part Variant, Hardware version and Production configuration"] - pub variant: VARIANT, - #[doc = "0x08 - Package option"] - pub package: PACKAGE, - #[doc = "0x0c - RAM variant"] - pub ram: RAM, - #[doc = "0x10 - Flash variant"] - pub flash: FLASH, -} -#[doc = "PART (r) register accessor: an alias for `Reg`"] -pub type PART = crate::Reg; -#[doc = "Part code"] -pub mod part; -#[doc = "VARIANT (r) register accessor: an alias for `Reg`"] -pub type VARIANT = crate::Reg; -#[doc = "Part Variant, Hardware version and Production configuration"] -pub mod variant; -#[doc = "PACKAGE (r) register accessor: an alias for `Reg`"] -pub type PACKAGE = crate::Reg; -#[doc = "Package option"] -pub mod package; -#[doc = "RAM (r) register accessor: an alias for `Reg`"] -pub type RAM = crate::Reg; -#[doc = "RAM variant"] -pub mod ram; -#[doc = "FLASH (r) register accessor: an alias for `Reg`"] -pub type FLASH = crate::Reg; -#[doc = "Flash variant"] -pub mod flash; diff --git a/down-the-stack/dk_pac/src/ficr/info/flash.rs b/down-the-stack/dk_pac/src/ficr/info/flash.rs deleted file mode 100644 index 5dbf82d..0000000 --- a/down-the-stack/dk_pac/src/ficr/info/flash.rs +++ /dev/null @@ -1,89 +0,0 @@ -#[doc = "Register `FLASH` 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 = "Field `FLASH` reader - Flash variant"] -pub type FLASH_R = crate::FieldReader; -#[doc = "Flash variant\n\nValue on reset: 512"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -#[repr(u32)] -pub enum FLASH_A { - #[doc = "128: 128 kByte FLASH"] - K128 = 128, - #[doc = "256: 256 kByte FLASH"] - K256 = 256, - #[doc = "512: 512 kByte FLASH"] - K512 = 512, - #[doc = "4294967295: Unspecified"] - UNSPECIFIED = 4294967295, -} -impl From for u32 { - #[inline(always)] - fn from(variant: FLASH_A) -> Self { - variant as _ - } -} -impl FLASH_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> Option { - match self.bits { - 128 => Some(FLASH_A::K128), - 256 => Some(FLASH_A::K256), - 512 => Some(FLASH_A::K512), - 4294967295 => Some(FLASH_A::UNSPECIFIED), - _ => None, - } - } - #[doc = "Checks if the value of the field is `K128`"] - #[inline(always)] - pub fn is_k128(&self) -> bool { - *self == FLASH_A::K128 - } - #[doc = "Checks if the value of the field is `K256`"] - #[inline(always)] - pub fn is_k256(&self) -> bool { - *self == FLASH_A::K256 - } - #[doc = "Checks if the value of the field is `K512`"] - #[inline(always)] - pub fn is_k512(&self) -> bool { - *self == FLASH_A::K512 - } - #[doc = "Checks if the value of the field is `UNSPECIFIED`"] - #[inline(always)] - pub fn is_unspecified(&self) -> bool { - *self == FLASH_A::UNSPECIFIED - } -} -impl R { - #[doc = "Bits 0:31 - Flash variant"] - #[inline(always)] - pub fn flash(&self) -> FLASH_R { - FLASH_R::new(self.bits) - } -} -#[doc = "Flash variant\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 [flash](index.html) module"] -pub struct FLASH_SPEC; -impl crate::RegisterSpec for FLASH_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [flash::R](R) reader structure"] -impl crate::Readable for FLASH_SPEC { - type Reader = R; -} -#[doc = "`reset()` method sets FLASH to value 0x0200"] -impl crate::Resettable for FLASH_SPEC { - const RESET_VALUE: Self::Ux = 0x0200; -} diff --git a/down-the-stack/dk_pac/src/ficr/info/package.rs b/down-the-stack/dk_pac/src/ficr/info/package.rs deleted file mode 100644 index efe8f5e..0000000 --- a/down-the-stack/dk_pac/src/ficr/info/package.rs +++ /dev/null @@ -1,97 +0,0 @@ -#[doc = "Register `PACKAGE` 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 = "Field `PACKAGE` reader - Package option"] -pub type PACKAGE_R = crate::FieldReader; -#[doc = "Package option\n\nValue on reset: 8192"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -#[repr(u32)] -pub enum PACKAGE_A { - #[doc = "8192: QFxx - 48-pin QFN"] - QF = 8192, - #[doc = "8193: CHxx - 7x8 WLCSP 56 balls"] - CH = 8193, - #[doc = "8194: CIxx - 7x8 WLCSP 56 balls"] - CI = 8194, - #[doc = "8197: CKxx - 7x8 WLCSP 56 balls with backside coating for light protection"] - CK = 8197, - #[doc = "4294967295: Unspecified"] - UNSPECIFIED = 4294967295, -} -impl From for u32 { - #[inline(always)] - fn from(variant: PACKAGE_A) -> Self { - variant as _ - } -} -impl PACKAGE_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> Option { - match self.bits { - 8192 => Some(PACKAGE_A::QF), - 8193 => Some(PACKAGE_A::CH), - 8194 => Some(PACKAGE_A::CI), - 8197 => Some(PACKAGE_A::CK), - 4294967295 => Some(PACKAGE_A::UNSPECIFIED), - _ => None, - } - } - #[doc = "Checks if the value of the field is `QF`"] - #[inline(always)] - pub fn is_qf(&self) -> bool { - *self == PACKAGE_A::QF - } - #[doc = "Checks if the value of the field is `CH`"] - #[inline(always)] - pub fn is_ch(&self) -> bool { - *self == PACKAGE_A::CH - } - #[doc = "Checks if the value of the field is `CI`"] - #[inline(always)] - pub fn is_ci(&self) -> bool { - *self == PACKAGE_A::CI - } - #[doc = "Checks if the value of the field is `CK`"] - #[inline(always)] - pub fn is_ck(&self) -> bool { - *self == PACKAGE_A::CK - } - #[doc = "Checks if the value of the field is `UNSPECIFIED`"] - #[inline(always)] - pub fn is_unspecified(&self) -> bool { - *self == PACKAGE_A::UNSPECIFIED - } -} -impl R { - #[doc = "Bits 0:31 - Package option"] - #[inline(always)] - pub fn package(&self) -> PACKAGE_R { - PACKAGE_R::new(self.bits) - } -} -#[doc = "Package option\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 [package](index.html) module"] -pub struct PACKAGE_SPEC; -impl crate::RegisterSpec for PACKAGE_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [package::R](R) reader structure"] -impl crate::Readable for PACKAGE_SPEC { - type Reader = R; -} -#[doc = "`reset()` method sets PACKAGE to value 0x2000"] -impl crate::Resettable for PACKAGE_SPEC { - const RESET_VALUE: Self::Ux = 0x2000; -} diff --git a/down-the-stack/dk_pac/src/ficr/info/part.rs b/down-the-stack/dk_pac/src/ficr/info/part.rs deleted file mode 100644 index ba7011c..0000000 --- a/down-the-stack/dk_pac/src/ficr/info/part.rs +++ /dev/null @@ -1,73 +0,0 @@ -#[doc = "Register `PART` 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 = "Field `PART` reader - Part code"] -pub type PART_R = crate::FieldReader; -#[doc = "Part code\n\nValue on reset: 337970"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -#[repr(u32)] -pub enum PART_A { - #[doc = "337970: nRF52832"] - N52832 = 337970, - #[doc = "4294967295: Unspecified"] - UNSPECIFIED = 4294967295, -} -impl From for u32 { - #[inline(always)] - fn from(variant: PART_A) -> Self { - variant as _ - } -} -impl PART_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> Option { - match self.bits { - 337970 => Some(PART_A::N52832), - 4294967295 => Some(PART_A::UNSPECIFIED), - _ => None, - } - } - #[doc = "Checks if the value of the field is `N52832`"] - #[inline(always)] - pub fn is_n52832(&self) -> bool { - *self == PART_A::N52832 - } - #[doc = "Checks if the value of the field is `UNSPECIFIED`"] - #[inline(always)] - pub fn is_unspecified(&self) -> bool { - *self == PART_A::UNSPECIFIED - } -} -impl R { - #[doc = "Bits 0:31 - Part code"] - #[inline(always)] - pub fn part(&self) -> PART_R { - PART_R::new(self.bits) - } -} -#[doc = "Part code\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 [part](index.html) module"] -pub struct PART_SPEC; -impl crate::RegisterSpec for PART_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [part::R](R) reader structure"] -impl crate::Readable for PART_SPEC { - type Reader = R; -} -#[doc = "`reset()` method sets PART to value 0x0005_2832"] -impl crate::Resettable for PART_SPEC { - const RESET_VALUE: Self::Ux = 0x0005_2832; -} diff --git a/down-the-stack/dk_pac/src/ficr/info/ram.rs b/down-the-stack/dk_pac/src/ficr/info/ram.rs deleted file mode 100644 index 521818a..0000000 --- a/down-the-stack/dk_pac/src/ficr/info/ram.rs +++ /dev/null @@ -1,89 +0,0 @@ -#[doc = "Register `RAM` 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 = "Field `RAM` reader - RAM variant"] -pub type RAM_R = crate::FieldReader; -#[doc = "RAM variant\n\nValue on reset: 64"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -#[repr(u32)] -pub enum RAM_A { - #[doc = "16: 16 kByte RAM"] - K16 = 16, - #[doc = "32: 32 kByte RAM"] - K32 = 32, - #[doc = "64: 64 kByte RAM"] - K64 = 64, - #[doc = "4294967295: Unspecified"] - UNSPECIFIED = 4294967295, -} -impl From for u32 { - #[inline(always)] - fn from(variant: RAM_A) -> Self { - variant as _ - } -} -impl RAM_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> Option { - match self.bits { - 16 => Some(RAM_A::K16), - 32 => Some(RAM_A::K32), - 64 => Some(RAM_A::K64), - 4294967295 => Some(RAM_A::UNSPECIFIED), - _ => None, - } - } - #[doc = "Checks if the value of the field is `K16`"] - #[inline(always)] - pub fn is_k16(&self) -> bool { - *self == RAM_A::K16 - } - #[doc = "Checks if the value of the field is `K32`"] - #[inline(always)] - pub fn is_k32(&self) -> bool { - *self == RAM_A::K32 - } - #[doc = "Checks if the value of the field is `K64`"] - #[inline(always)] - pub fn is_k64(&self) -> bool { - *self == RAM_A::K64 - } - #[doc = "Checks if the value of the field is `UNSPECIFIED`"] - #[inline(always)] - pub fn is_unspecified(&self) -> bool { - *self == RAM_A::UNSPECIFIED - } -} -impl R { - #[doc = "Bits 0:31 - RAM variant"] - #[inline(always)] - pub fn ram(&self) -> RAM_R { - RAM_R::new(self.bits) - } -} -#[doc = "RAM variant\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 [ram](index.html) module"] -pub struct RAM_SPEC; -impl crate::RegisterSpec for RAM_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [ram::R](R) reader structure"] -impl crate::Readable for RAM_SPEC { - type Reader = R; -} -#[doc = "`reset()` method sets RAM to value 0x40"] -impl crate::Resettable for RAM_SPEC { - const RESET_VALUE: Self::Ux = 0x40; -} diff --git a/down-the-stack/dk_pac/src/ficr/info/variant.rs b/down-the-stack/dk_pac/src/ficr/info/variant.rs deleted file mode 100644 index 35cf83a..0000000 --- a/down-the-stack/dk_pac/src/ficr/info/variant.rs +++ /dev/null @@ -1,161 +0,0 @@ -#[doc = "Register `VARIANT` 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 = "Field `VARIANT` reader - Part Variant, Hardware version and Production configuration, encoded as ASCII"] -pub type VARIANT_R = crate::FieldReader; -#[doc = "Part Variant, Hardware version and Production configuration, encoded as ASCII\n\nValue on reset: 1094795586"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -#[repr(u32)] -pub enum VARIANT_A { - #[doc = "1094795585: AAAA"] - AAAA = 1094795585, - #[doc = "1094795587: AAAC"] - AAAC = 1094795587, - #[doc = "1094795841: AABA"] - AABA = 1094795841, - #[doc = "1094795842: AABB"] - AABB = 1094795842, - #[doc = "1094795824: AAB0"] - AAB0 = 1094795824, - #[doc = "1094861360: ABB0"] - ABB0 = 1094861360, - #[doc = "1094796592: AAE0"] - AAE0 = 1094796592, - #[doc = "1094862128: ABE0"] - ABE0 = 1094862128, - #[doc = "1094797122: AAGB"] - AAGB = 1094797122, - #[doc = "1094862658: ABGB"] - ABGB = 1094862658, - #[doc = "1094797104: AAG0"] - AAG0 = 1094797104, - #[doc = "1094862640: ABG0"] - ABG0 = 1094862640, - #[doc = "4294967295: Unspecified"] - UNSPECIFIED = 4294967295, -} -impl From for u32 { - #[inline(always)] - fn from(variant: VARIANT_A) -> Self { - variant as _ - } -} -impl VARIANT_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> Option { - match self.bits { - 1094795585 => Some(VARIANT_A::AAAA), - 1094795587 => Some(VARIANT_A::AAAC), - 1094795841 => Some(VARIANT_A::AABA), - 1094795842 => Some(VARIANT_A::AABB), - 1094795824 => Some(VARIANT_A::AAB0), - 1094861360 => Some(VARIANT_A::ABB0), - 1094796592 => Some(VARIANT_A::AAE0), - 1094862128 => Some(VARIANT_A::ABE0), - 1094797122 => Some(VARIANT_A::AAGB), - 1094862658 => Some(VARIANT_A::ABGB), - 1094797104 => Some(VARIANT_A::AAG0), - 1094862640 => Some(VARIANT_A::ABG0), - 4294967295 => Some(VARIANT_A::UNSPECIFIED), - _ => None, - } - } - #[doc = "Checks if the value of the field is `AAAA`"] - #[inline(always)] - pub fn is_aaaa(&self) -> bool { - *self == VARIANT_A::AAAA - } - #[doc = "Checks if the value of the field is `AAAC`"] - #[inline(always)] - pub fn is_aaac(&self) -> bool { - *self == VARIANT_A::AAAC - } - #[doc = "Checks if the value of the field is `AABA`"] - #[inline(always)] - pub fn is_aaba(&self) -> bool { - *self == VARIANT_A::AABA - } - #[doc = "Checks if the value of the field is `AABB`"] - #[inline(always)] - pub fn is_aabb(&self) -> bool { - *self == VARIANT_A::AABB - } - #[doc = "Checks if the value of the field is `AAB0`"] - #[inline(always)] - pub fn is_aab0(&self) -> bool { - *self == VARIANT_A::AAB0 - } - #[doc = "Checks if the value of the field is `ABB0`"] - #[inline(always)] - pub fn is_abb0(&self) -> bool { - *self == VARIANT_A::ABB0 - } - #[doc = "Checks if the value of the field is `AAE0`"] - #[inline(always)] - pub fn is_aae0(&self) -> bool { - *self == VARIANT_A::AAE0 - } - #[doc = "Checks if the value of the field is `ABE0`"] - #[inline(always)] - pub fn is_abe0(&self) -> bool { - *self == VARIANT_A::ABE0 - } - #[doc = "Checks if the value of the field is `AAGB`"] - #[inline(always)] - pub fn is_aagb(&self) -> bool { - *self == VARIANT_A::AAGB - } - #[doc = "Checks if the value of the field is `ABGB`"] - #[inline(always)] - pub fn is_abgb(&self) -> bool { - *self == VARIANT_A::ABGB - } - #[doc = "Checks if the value of the field is `AAG0`"] - #[inline(always)] - pub fn is_aag0(&self) -> bool { - *self == VARIANT_A::AAG0 - } - #[doc = "Checks if the value of the field is `ABG0`"] - #[inline(always)] - pub fn is_abg0(&self) -> bool { - *self == VARIANT_A::ABG0 - } - #[doc = "Checks if the value of the field is `UNSPECIFIED`"] - #[inline(always)] - pub fn is_unspecified(&self) -> bool { - *self == VARIANT_A::UNSPECIFIED - } -} -impl R { - #[doc = "Bits 0:31 - Part Variant, Hardware version and Production configuration, encoded as ASCII"] - #[inline(always)] - pub fn variant(&self) -> VARIANT_R { - VARIANT_R::new(self.bits) - } -} -#[doc = "Part Variant, Hardware version and Production configuration\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 [variant](index.html) module"] -pub struct VARIANT_SPEC; -impl crate::RegisterSpec for VARIANT_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [variant::R](R) reader structure"] -impl crate::Readable for VARIANT_SPEC { - type Reader = R; -} -#[doc = "`reset()` method sets VARIANT to value 0x4141_4142"] -impl crate::Resettable for VARIANT_SPEC { - const RESET_VALUE: Self::Ux = 0x4141_4142; -} diff --git a/down-the-stack/dk_pac/src/ficr/ir.rs b/down-the-stack/dk_pac/src/ficr/ir.rs deleted file mode 100644 index 1d6bc72..0000000 --- a/down-the-stack/dk_pac/src/ficr/ir.rs +++ /dev/null @@ -1,38 +0,0 @@ -#[doc = "Register `IR[%s]` 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 = "Field `IR` reader - Identity Root, word n"] -pub type IR_R = crate::FieldReader; -impl R { - #[doc = "Bits 0:31 - Identity Root, word n"] - #[inline(always)] - pub fn ir(&self) -> IR_R { - IR_R::new(self.bits) - } -} -#[doc = "Description collection: Identity Root, word n\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 [ir](index.html) module"] -pub struct IR_SPEC; -impl crate::RegisterSpec for IR_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [ir::R](R) reader structure"] -impl crate::Readable for IR_SPEC { - type Reader = R; -} -#[doc = "`reset()` method sets IR[%s] -to value 0xffff_ffff"] -impl crate::Resettable for IR_SPEC { - const RESET_VALUE: Self::Ux = 0xffff_ffff; -} diff --git a/down-the-stack/dk_pac/src/ficr/nfc.rs b/down-the-stack/dk_pac/src/ficr/nfc.rs deleted file mode 100644 index fed6f1c..0000000 --- a/down-the-stack/dk_pac/src/ficr/nfc.rs +++ /dev/null @@ -1,28 +0,0 @@ -#[doc = r"Register block"] -#[repr(C)] -pub struct NFC { - #[doc = "0x00 - Default header for NFC Tag. Software can read these values to populate NFCID1_3RD_LAST, NFCID1_2ND_LAST and NFCID1_LAST."] - pub tagheader0: TAGHEADER0, - #[doc = "0x04 - Default header for NFC Tag. Software can read these values to populate NFCID1_3RD_LAST, NFCID1_2ND_LAST and NFCID1_LAST."] - pub tagheader1: TAGHEADER1, - #[doc = "0x08 - Default header for NFC Tag. Software can read these values to populate NFCID1_3RD_LAST, NFCID1_2ND_LAST and NFCID1_LAST."] - pub tagheader2: TAGHEADER2, - #[doc = "0x0c - Default header for NFC Tag. Software can read these values to populate NFCID1_3RD_LAST, NFCID1_2ND_LAST and NFCID1_LAST."] - pub tagheader3: TAGHEADER3, -} -#[doc = "TAGHEADER0 (r) register accessor: an alias for `Reg`"] -pub type TAGHEADER0 = crate::Reg; -#[doc = "Default header for NFC Tag. Software can read these values to populate NFCID1_3RD_LAST, NFCID1_2ND_LAST and NFCID1_LAST."] -pub mod tagheader0; -#[doc = "TAGHEADER1 (r) register accessor: an alias for `Reg`"] -pub type TAGHEADER1 = crate::Reg; -#[doc = "Default header for NFC Tag. Software can read these values to populate NFCID1_3RD_LAST, NFCID1_2ND_LAST and NFCID1_LAST."] -pub mod tagheader1; -#[doc = "TAGHEADER2 (r) register accessor: an alias for `Reg`"] -pub type TAGHEADER2 = crate::Reg; -#[doc = "Default header for NFC Tag. Software can read these values to populate NFCID1_3RD_LAST, NFCID1_2ND_LAST and NFCID1_LAST."] -pub mod tagheader2; -#[doc = "TAGHEADER3 (r) register accessor: an alias for `Reg`"] -pub type TAGHEADER3 = crate::Reg; -#[doc = "Default header for NFC Tag. Software can read these values to populate NFCID1_3RD_LAST, NFCID1_2ND_LAST and NFCID1_LAST."] -pub mod tagheader3; diff --git a/down-the-stack/dk_pac/src/ficr/nfc/tagheader0.rs b/down-the-stack/dk_pac/src/ficr/nfc/tagheader0.rs deleted file mode 100644 index 3cb731a..0000000 --- a/down-the-stack/dk_pac/src/ficr/nfc/tagheader0.rs +++ /dev/null @@ -1,58 +0,0 @@ -#[doc = "Register `TAGHEADER0` 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 = "Field `MFGID` reader - Default Manufacturer ID: Nordic Semiconductor ASA has ICM 0x5F"] -pub type MFGID_R = crate::FieldReader; -#[doc = "Field `UD1` reader - Unique identifier byte 1"] -pub type UD1_R = crate::FieldReader; -#[doc = "Field `UD2` reader - Unique identifier byte 2"] -pub type UD2_R = crate::FieldReader; -#[doc = "Field `UD3` reader - Unique identifier byte 3"] -pub type UD3_R = crate::FieldReader; -impl R { - #[doc = "Bits 0:7 - Default Manufacturer ID: Nordic Semiconductor ASA has ICM 0x5F"] - #[inline(always)] - pub fn mfgid(&self) -> MFGID_R { - MFGID_R::new((self.bits & 0xff) as u8) - } - #[doc = "Bits 8:15 - Unique identifier byte 1"] - #[inline(always)] - pub fn ud1(&self) -> UD1_R { - UD1_R::new(((self.bits >> 8) & 0xff) as u8) - } - #[doc = "Bits 16:23 - Unique identifier byte 2"] - #[inline(always)] - pub fn ud2(&self) -> UD2_R { - UD2_R::new(((self.bits >> 16) & 0xff) as u8) - } - #[doc = "Bits 24:31 - Unique identifier byte 3"] - #[inline(always)] - pub fn ud3(&self) -> UD3_R { - UD3_R::new(((self.bits >> 24) & 0xff) as u8) - } -} -#[doc = "Default header for NFC Tag. Software can read these values to populate NFCID1_3RD_LAST, NFCID1_2ND_LAST and NFCID1_LAST.\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 [tagheader0](index.html) module"] -pub struct TAGHEADER0_SPEC; -impl crate::RegisterSpec for TAGHEADER0_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [tagheader0::R](R) reader structure"] -impl crate::Readable for TAGHEADER0_SPEC { - type Reader = R; -} -#[doc = "`reset()` method sets TAGHEADER0 to value 0xffff_ff5f"] -impl crate::Resettable for TAGHEADER0_SPEC { - const RESET_VALUE: Self::Ux = 0xffff_ff5f; -} diff --git a/down-the-stack/dk_pac/src/ficr/nfc/tagheader1.rs b/down-the-stack/dk_pac/src/ficr/nfc/tagheader1.rs deleted file mode 100644 index ad65728..0000000 --- a/down-the-stack/dk_pac/src/ficr/nfc/tagheader1.rs +++ /dev/null @@ -1,58 +0,0 @@ -#[doc = "Register `TAGHEADER1` 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 = "Field `UD4` reader - Unique identifier byte 4"] -pub type UD4_R = crate::FieldReader; -#[doc = "Field `UD5` reader - Unique identifier byte 5"] -pub type UD5_R = crate::FieldReader; -#[doc = "Field `UD6` reader - Unique identifier byte 6"] -pub type UD6_R = crate::FieldReader; -#[doc = "Field `UD7` reader - Unique identifier byte 7"] -pub type UD7_R = crate::FieldReader; -impl R { - #[doc = "Bits 0:7 - Unique identifier byte 4"] - #[inline(always)] - pub fn ud4(&self) -> UD4_R { - UD4_R::new((self.bits & 0xff) as u8) - } - #[doc = "Bits 8:15 - Unique identifier byte 5"] - #[inline(always)] - pub fn ud5(&self) -> UD5_R { - UD5_R::new(((self.bits >> 8) & 0xff) as u8) - } - #[doc = "Bits 16:23 - Unique identifier byte 6"] - #[inline(always)] - pub fn ud6(&self) -> UD6_R { - UD6_R::new(((self.bits >> 16) & 0xff) as u8) - } - #[doc = "Bits 24:31 - Unique identifier byte 7"] - #[inline(always)] - pub fn ud7(&self) -> UD7_R { - UD7_R::new(((self.bits >> 24) & 0xff) as u8) - } -} -#[doc = "Default header for NFC Tag. Software can read these values to populate NFCID1_3RD_LAST, NFCID1_2ND_LAST and NFCID1_LAST.\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 [tagheader1](index.html) module"] -pub struct TAGHEADER1_SPEC; -impl crate::RegisterSpec for TAGHEADER1_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [tagheader1::R](R) reader structure"] -impl crate::Readable for TAGHEADER1_SPEC { - type Reader = R; -} -#[doc = "`reset()` method sets TAGHEADER1 to value 0xffff_ffff"] -impl crate::Resettable for TAGHEADER1_SPEC { - const RESET_VALUE: Self::Ux = 0xffff_ffff; -} diff --git a/down-the-stack/dk_pac/src/ficr/nfc/tagheader2.rs b/down-the-stack/dk_pac/src/ficr/nfc/tagheader2.rs deleted file mode 100644 index d55515d..0000000 --- a/down-the-stack/dk_pac/src/ficr/nfc/tagheader2.rs +++ /dev/null @@ -1,58 +0,0 @@ -#[doc = "Register `TAGHEADER2` 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 = "Field `UD8` reader - Unique identifier byte 8"] -pub type UD8_R = crate::FieldReader; -#[doc = "Field `UD9` reader - Unique identifier byte 9"] -pub type UD9_R = crate::FieldReader; -#[doc = "Field `UD10` reader - Unique identifier byte 10"] -pub type UD10_R = crate::FieldReader; -#[doc = "Field `UD11` reader - Unique identifier byte 11"] -pub type UD11_R = crate::FieldReader; -impl R { - #[doc = "Bits 0:7 - Unique identifier byte 8"] - #[inline(always)] - pub fn ud8(&self) -> UD8_R { - UD8_R::new((self.bits & 0xff) as u8) - } - #[doc = "Bits 8:15 - Unique identifier byte 9"] - #[inline(always)] - pub fn ud9(&self) -> UD9_R { - UD9_R::new(((self.bits >> 8) & 0xff) as u8) - } - #[doc = "Bits 16:23 - Unique identifier byte 10"] - #[inline(always)] - pub fn ud10(&self) -> UD10_R { - UD10_R::new(((self.bits >> 16) & 0xff) as u8) - } - #[doc = "Bits 24:31 - Unique identifier byte 11"] - #[inline(always)] - pub fn ud11(&self) -> UD11_R { - UD11_R::new(((self.bits >> 24) & 0xff) as u8) - } -} -#[doc = "Default header for NFC Tag. Software can read these values to populate NFCID1_3RD_LAST, NFCID1_2ND_LAST and NFCID1_LAST.\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 [tagheader2](index.html) module"] -pub struct TAGHEADER2_SPEC; -impl crate::RegisterSpec for TAGHEADER2_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [tagheader2::R](R) reader structure"] -impl crate::Readable for TAGHEADER2_SPEC { - type Reader = R; -} -#[doc = "`reset()` method sets TAGHEADER2 to value 0xffff_ffff"] -impl crate::Resettable for TAGHEADER2_SPEC { - const RESET_VALUE: Self::Ux = 0xffff_ffff; -} diff --git a/down-the-stack/dk_pac/src/ficr/nfc/tagheader3.rs b/down-the-stack/dk_pac/src/ficr/nfc/tagheader3.rs deleted file mode 100644 index a5b84b2..0000000 --- a/down-the-stack/dk_pac/src/ficr/nfc/tagheader3.rs +++ /dev/null @@ -1,58 +0,0 @@ -#[doc = "Register `TAGHEADER3` 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 = "Field `UD12` reader - Unique identifier byte 12"] -pub type UD12_R = crate::FieldReader; -#[doc = "Field `UD13` reader - Unique identifier byte 13"] -pub type UD13_R = crate::FieldReader; -#[doc = "Field `UD14` reader - Unique identifier byte 14"] -pub type UD14_R = crate::FieldReader; -#[doc = "Field `UD15` reader - Unique identifier byte 15"] -pub type UD15_R = crate::FieldReader; -impl R { - #[doc = "Bits 0:7 - Unique identifier byte 12"] - #[inline(always)] - pub fn ud12(&self) -> UD12_R { - UD12_R::new((self.bits & 0xff) as u8) - } - #[doc = "Bits 8:15 - Unique identifier byte 13"] - #[inline(always)] - pub fn ud13(&self) -> UD13_R { - UD13_R::new(((self.bits >> 8) & 0xff) as u8) - } - #[doc = "Bits 16:23 - Unique identifier byte 14"] - #[inline(always)] - pub fn ud14(&self) -> UD14_R { - UD14_R::new(((self.bits >> 16) & 0xff) as u8) - } - #[doc = "Bits 24:31 - Unique identifier byte 15"] - #[inline(always)] - pub fn ud15(&self) -> UD15_R { - UD15_R::new(((self.bits >> 24) & 0xff) as u8) - } -} -#[doc = "Default header for NFC Tag. Software can read these values to populate NFCID1_3RD_LAST, NFCID1_2ND_LAST and NFCID1_LAST.\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 [tagheader3](index.html) module"] -pub struct TAGHEADER3_SPEC; -impl crate::RegisterSpec for TAGHEADER3_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [tagheader3::R](R) reader structure"] -impl crate::Readable for TAGHEADER3_SPEC { - type Reader = R; -} -#[doc = "`reset()` method sets TAGHEADER3 to value 0xffff_ffff"] -impl crate::Resettable for TAGHEADER3_SPEC { - const RESET_VALUE: Self::Ux = 0xffff_ffff; -} diff --git a/down-the-stack/dk_pac/src/ficr/temp.rs b/down-the-stack/dk_pac/src/ficr/temp.rs deleted file mode 100644 index 320b3d0..0000000 --- a/down-the-stack/dk_pac/src/ficr/temp.rs +++ /dev/null @@ -1,106 +0,0 @@ -#[doc = r"Register block"] -#[repr(C)] -pub struct TEMP { - #[doc = "0x00 - Slope definition A0."] - pub a0: A0, - #[doc = "0x04 - Slope definition A1."] - pub a1: A1, - #[doc = "0x08 - Slope definition A2."] - pub a2: A2, - #[doc = "0x0c - Slope definition A3."] - pub a3: A3, - #[doc = "0x10 - Slope definition A4."] - pub a4: A4, - #[doc = "0x14 - Slope definition A5."] - pub a5: A5, - #[doc = "0x18 - y-intercept B0."] - pub b0: B0, - #[doc = "0x1c - y-intercept B1."] - pub b1: B1, - #[doc = "0x20 - y-intercept B2."] - pub b2: B2, - #[doc = "0x24 - y-intercept B3."] - pub b3: B3, - #[doc = "0x28 - y-intercept B4."] - pub b4: B4, - #[doc = "0x2c - y-intercept B5."] - pub b5: B5, - #[doc = "0x30 - Segment end T0."] - pub t0: T0, - #[doc = "0x34 - Segment end T1."] - pub t1: T1, - #[doc = "0x38 - Segment end T2."] - pub t2: T2, - #[doc = "0x3c - Segment end T3."] - pub t3: T3, - #[doc = "0x40 - Segment end T4."] - pub t4: T4, -} -#[doc = "A0 (r) register accessor: an alias for `Reg`"] -pub type A0 = crate::Reg; -#[doc = "Slope definition A0."] -pub mod a0; -#[doc = "A1 (r) register accessor: an alias for `Reg`"] -pub type A1 = crate::Reg; -#[doc = "Slope definition A1."] -pub mod a1; -#[doc = "A2 (r) register accessor: an alias for `Reg`"] -pub type A2 = crate::Reg; -#[doc = "Slope definition A2."] -pub mod a2; -#[doc = "A3 (r) register accessor: an alias for `Reg`"] -pub type A3 = crate::Reg; -#[doc = "Slope definition A3."] -pub mod a3; -#[doc = "A4 (r) register accessor: an alias for `Reg`"] -pub type A4 = crate::Reg; -#[doc = "Slope definition A4."] -pub mod a4; -#[doc = "A5 (r) register accessor: an alias for `Reg`"] -pub type A5 = crate::Reg; -#[doc = "Slope definition A5."] -pub mod a5; -#[doc = "B0 (r) register accessor: an alias for `Reg`"] -pub type B0 = crate::Reg; -#[doc = "y-intercept B0."] -pub mod b0; -#[doc = "B1 (r) register accessor: an alias for `Reg`"] -pub type B1 = crate::Reg; -#[doc = "y-intercept B1."] -pub mod b1; -#[doc = "B2 (r) register accessor: an alias for `Reg`"] -pub type B2 = crate::Reg; -#[doc = "y-intercept B2."] -pub mod b2; -#[doc = "B3 (r) register accessor: an alias for `Reg`"] -pub type B3 = crate::Reg; -#[doc = "y-intercept B3."] -pub mod b3; -#[doc = "B4 (r) register accessor: an alias for `Reg`"] -pub type B4 = crate::Reg; -#[doc = "y-intercept B4."] -pub mod b4; -#[doc = "B5 (r) register accessor: an alias for `Reg`"] -pub type B5 = crate::Reg; -#[doc = "y-intercept B5."] -pub mod b5; -#[doc = "T0 (r) register accessor: an alias for `Reg`"] -pub type T0 = crate::Reg; -#[doc = "Segment end T0."] -pub mod t0; -#[doc = "T1 (r) register accessor: an alias for `Reg`"] -pub type T1 = crate::Reg; -#[doc = "Segment end T1."] -pub mod t1; -#[doc = "T2 (r) register accessor: an alias for `Reg`"] -pub type T2 = crate::Reg; -#[doc = "Segment end T2."] -pub mod t2; -#[doc = "T3 (r) register accessor: an alias for `Reg`"] -pub type T3 = crate::Reg; -#[doc = "Segment end T3."] -pub mod t3; -#[doc = "T4 (r) register accessor: an alias for `Reg`"] -pub type T4 = crate::Reg; -#[doc = "Segment end T4."] -pub mod t4; diff --git a/down-the-stack/dk_pac/src/ficr/temp/a0.rs b/down-the-stack/dk_pac/src/ficr/temp/a0.rs deleted file mode 100644 index 7cca9fb..0000000 --- a/down-the-stack/dk_pac/src/ficr/temp/a0.rs +++ /dev/null @@ -1,37 +0,0 @@ -#[doc = "Register `A0` 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 = "Field `A` reader - A (slope definition) register."] -pub type A_R = crate::FieldReader; -impl R { - #[doc = "Bits 0:11 - A (slope definition) register."] - #[inline(always)] - pub fn a(&self) -> A_R { - A_R::new((self.bits & 0x0fff) as u16) - } -} -#[doc = "Slope definition A0.\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 [a0](index.html) module"] -pub struct A0_SPEC; -impl crate::RegisterSpec for A0_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [a0::R](R) reader structure"] -impl crate::Readable for A0_SPEC { - type Reader = R; -} -#[doc = "`reset()` method sets A0 to value 0x0320"] -impl crate::Resettable for A0_SPEC { - const RESET_VALUE: Self::Ux = 0x0320; -} diff --git a/down-the-stack/dk_pac/src/ficr/temp/a1.rs b/down-the-stack/dk_pac/src/ficr/temp/a1.rs deleted file mode 100644 index 395e273..0000000 --- a/down-the-stack/dk_pac/src/ficr/temp/a1.rs +++ /dev/null @@ -1,37 +0,0 @@ -#[doc = "Register `A1` 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 = "Field `A` reader - A (slope definition) register."] -pub type A_R = crate::FieldReader; -impl R { - #[doc = "Bits 0:11 - A (slope definition) register."] - #[inline(always)] - pub fn a(&self) -> A_R { - A_R::new((self.bits & 0x0fff) as u16) - } -} -#[doc = "Slope definition A1.\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 [a1](index.html) module"] -pub struct A1_SPEC; -impl crate::RegisterSpec for A1_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [a1::R](R) reader structure"] -impl crate::Readable for A1_SPEC { - type Reader = R; -} -#[doc = "`reset()` method sets A1 to value 0x0343"] -impl crate::Resettable for A1_SPEC { - const RESET_VALUE: Self::Ux = 0x0343; -} diff --git a/down-the-stack/dk_pac/src/ficr/temp/a2.rs b/down-the-stack/dk_pac/src/ficr/temp/a2.rs deleted file mode 100644 index 1857a3d..0000000 --- a/down-the-stack/dk_pac/src/ficr/temp/a2.rs +++ /dev/null @@ -1,37 +0,0 @@ -#[doc = "Register `A2` 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 = "Field `A` reader - A (slope definition) register."] -pub type A_R = crate::FieldReader; -impl R { - #[doc = "Bits 0:11 - A (slope definition) register."] - #[inline(always)] - pub fn a(&self) -> A_R { - A_R::new((self.bits & 0x0fff) as u16) - } -} -#[doc = "Slope definition A2.\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 [a2](index.html) module"] -pub struct A2_SPEC; -impl crate::RegisterSpec for A2_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [a2::R](R) reader structure"] -impl crate::Readable for A2_SPEC { - type Reader = R; -} -#[doc = "`reset()` method sets A2 to value 0x035d"] -impl crate::Resettable for A2_SPEC { - const RESET_VALUE: Self::Ux = 0x035d; -} diff --git a/down-the-stack/dk_pac/src/ficr/temp/a3.rs b/down-the-stack/dk_pac/src/ficr/temp/a3.rs deleted file mode 100644 index a2d2e24..0000000 --- a/down-the-stack/dk_pac/src/ficr/temp/a3.rs +++ /dev/null @@ -1,37 +0,0 @@ -#[doc = "Register `A3` 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 = "Field `A` reader - A (slope definition) register."] -pub type A_R = crate::FieldReader; -impl R { - #[doc = "Bits 0:11 - A (slope definition) register."] - #[inline(always)] - pub fn a(&self) -> A_R { - A_R::new((self.bits & 0x0fff) as u16) - } -} -#[doc = "Slope definition A3.\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 [a3](index.html) module"] -pub struct A3_SPEC; -impl crate::RegisterSpec for A3_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [a3::R](R) reader structure"] -impl crate::Readable for A3_SPEC { - type Reader = R; -} -#[doc = "`reset()` method sets A3 to value 0x0400"] -impl crate::Resettable for A3_SPEC { - const RESET_VALUE: Self::Ux = 0x0400; -} diff --git a/down-the-stack/dk_pac/src/ficr/temp/a4.rs b/down-the-stack/dk_pac/src/ficr/temp/a4.rs deleted file mode 100644 index 39a2ec8..0000000 --- a/down-the-stack/dk_pac/src/ficr/temp/a4.rs +++ /dev/null @@ -1,37 +0,0 @@ -#[doc = "Register `A4` 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 = "Field `A` reader - A (slope definition) register."] -pub type A_R = crate::FieldReader; -impl R { - #[doc = "Bits 0:11 - A (slope definition) register."] - #[inline(always)] - pub fn a(&self) -> A_R { - A_R::new((self.bits & 0x0fff) as u16) - } -} -#[doc = "Slope definition A4.\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 [a4](index.html) module"] -pub struct A4_SPEC; -impl crate::RegisterSpec for A4_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [a4::R](R) reader structure"] -impl crate::Readable for A4_SPEC { - type Reader = R; -} -#[doc = "`reset()` method sets A4 to value 0x0452"] -impl crate::Resettable for A4_SPEC { - const RESET_VALUE: Self::Ux = 0x0452; -} diff --git a/down-the-stack/dk_pac/src/ficr/temp/a5.rs b/down-the-stack/dk_pac/src/ficr/temp/a5.rs deleted file mode 100644 index 7314ae2..0000000 --- a/down-the-stack/dk_pac/src/ficr/temp/a5.rs +++ /dev/null @@ -1,37 +0,0 @@ -#[doc = "Register `A5` 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 = "Field `A` reader - A (slope definition) register."] -pub type A_R = crate::FieldReader; -impl R { - #[doc = "Bits 0:11 - A (slope definition) register."] - #[inline(always)] - pub fn a(&self) -> A_R { - A_R::new((self.bits & 0x0fff) as u16) - } -} -#[doc = "Slope definition A5.\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 [a5](index.html) module"] -pub struct A5_SPEC; -impl crate::RegisterSpec for A5_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [a5::R](R) reader structure"] -impl crate::Readable for A5_SPEC { - type Reader = R; -} -#[doc = "`reset()` method sets A5 to value 0x037b"] -impl crate::Resettable for A5_SPEC { - const RESET_VALUE: Self::Ux = 0x037b; -} diff --git a/down-the-stack/dk_pac/src/ficr/temp/b0.rs b/down-the-stack/dk_pac/src/ficr/temp/b0.rs deleted file mode 100644 index fabf946..0000000 --- a/down-the-stack/dk_pac/src/ficr/temp/b0.rs +++ /dev/null @@ -1,37 +0,0 @@ -#[doc = "Register `B0` 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 = "Field `B` reader - B (y-intercept)"] -pub type B_R = crate::FieldReader; -impl R { - #[doc = "Bits 0:13 - B (y-intercept)"] - #[inline(always)] - pub fn b(&self) -> B_R { - B_R::new((self.bits & 0x3fff) as u16) - } -} -#[doc = "y-intercept B0.\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 [b0](index.html) module"] -pub struct B0_SPEC; -impl crate::RegisterSpec for B0_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [b0::R](R) reader structure"] -impl crate::Readable for B0_SPEC { - type Reader = R; -} -#[doc = "`reset()` method sets B0 to value 0x3fcc"] -impl crate::Resettable for B0_SPEC { - const RESET_VALUE: Self::Ux = 0x3fcc; -} diff --git a/down-the-stack/dk_pac/src/ficr/temp/b1.rs b/down-the-stack/dk_pac/src/ficr/temp/b1.rs deleted file mode 100644 index f056f0e..0000000 --- a/down-the-stack/dk_pac/src/ficr/temp/b1.rs +++ /dev/null @@ -1,37 +0,0 @@ -#[doc = "Register `B1` 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 = "Field `B` reader - B (y-intercept)"] -pub type B_R = crate::FieldReader; -impl R { - #[doc = "Bits 0:13 - B (y-intercept)"] - #[inline(always)] - pub fn b(&self) -> B_R { - B_R::new((self.bits & 0x3fff) as u16) - } -} -#[doc = "y-intercept B1.\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 [b1](index.html) module"] -pub struct B1_SPEC; -impl crate::RegisterSpec for B1_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [b1::R](R) reader structure"] -impl crate::Readable for B1_SPEC { - type Reader = R; -} -#[doc = "`reset()` method sets B1 to value 0x3f98"] -impl crate::Resettable for B1_SPEC { - const RESET_VALUE: Self::Ux = 0x3f98; -} diff --git a/down-the-stack/dk_pac/src/ficr/temp/b2.rs b/down-the-stack/dk_pac/src/ficr/temp/b2.rs deleted file mode 100644 index 17d4665..0000000 --- a/down-the-stack/dk_pac/src/ficr/temp/b2.rs +++ /dev/null @@ -1,37 +0,0 @@ -#[doc = "Register `B2` 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 = "Field `B` reader - B (y-intercept)"] -pub type B_R = crate::FieldReader; -impl R { - #[doc = "Bits 0:13 - B (y-intercept)"] - #[inline(always)] - pub fn b(&self) -> B_R { - B_R::new((self.bits & 0x3fff) as u16) - } -} -#[doc = "y-intercept B2.\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 [b2](index.html) module"] -pub struct B2_SPEC; -impl crate::RegisterSpec for B2_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [b2::R](R) reader structure"] -impl crate::Readable for B2_SPEC { - type Reader = R; -} -#[doc = "`reset()` method sets B2 to value 0x3f98"] -impl crate::Resettable for B2_SPEC { - const RESET_VALUE: Self::Ux = 0x3f98; -} diff --git a/down-the-stack/dk_pac/src/ficr/temp/b3.rs b/down-the-stack/dk_pac/src/ficr/temp/b3.rs deleted file mode 100644 index 865d5c0..0000000 --- a/down-the-stack/dk_pac/src/ficr/temp/b3.rs +++ /dev/null @@ -1,37 +0,0 @@ -#[doc = "Register `B3` 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 = "Field `B` reader - B (y-intercept)"] -pub type B_R = crate::FieldReader; -impl R { - #[doc = "Bits 0:13 - B (y-intercept)"] - #[inline(always)] - pub fn b(&self) -> B_R { - B_R::new((self.bits & 0x3fff) as u16) - } -} -#[doc = "y-intercept B3.\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 [b3](index.html) module"] -pub struct B3_SPEC; -impl crate::RegisterSpec for B3_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [b3::R](R) reader structure"] -impl crate::Readable for B3_SPEC { - type Reader = R; -} -#[doc = "`reset()` method sets B3 to value 0x12"] -impl crate::Resettable for B3_SPEC { - const RESET_VALUE: Self::Ux = 0x12; -} diff --git a/down-the-stack/dk_pac/src/ficr/temp/b4.rs b/down-the-stack/dk_pac/src/ficr/temp/b4.rs deleted file mode 100644 index e747f2a..0000000 --- a/down-the-stack/dk_pac/src/ficr/temp/b4.rs +++ /dev/null @@ -1,37 +0,0 @@ -#[doc = "Register `B4` 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 = "Field `B` reader - B (y-intercept)"] -pub type B_R = crate::FieldReader; -impl R { - #[doc = "Bits 0:13 - B (y-intercept)"] - #[inline(always)] - pub fn b(&self) -> B_R { - B_R::new((self.bits & 0x3fff) as u16) - } -} -#[doc = "y-intercept B4.\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 [b4](index.html) module"] -pub struct B4_SPEC; -impl crate::RegisterSpec for B4_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [b4::R](R) reader structure"] -impl crate::Readable for B4_SPEC { - type Reader = R; -} -#[doc = "`reset()` method sets B4 to value 0x4d"] -impl crate::Resettable for B4_SPEC { - const RESET_VALUE: Self::Ux = 0x4d; -} diff --git a/down-the-stack/dk_pac/src/ficr/temp/b5.rs b/down-the-stack/dk_pac/src/ficr/temp/b5.rs deleted file mode 100644 index 2b48f61..0000000 --- a/down-the-stack/dk_pac/src/ficr/temp/b5.rs +++ /dev/null @@ -1,37 +0,0 @@ -#[doc = "Register `B5` 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 = "Field `B` reader - B (y-intercept)"] -pub type B_R = crate::FieldReader; -impl R { - #[doc = "Bits 0:13 - B (y-intercept)"] - #[inline(always)] - pub fn b(&self) -> B_R { - B_R::new((self.bits & 0x3fff) as u16) - } -} -#[doc = "y-intercept B5.\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 [b5](index.html) module"] -pub struct B5_SPEC; -impl crate::RegisterSpec for B5_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [b5::R](R) reader structure"] -impl crate::Readable for B5_SPEC { - type Reader = R; -} -#[doc = "`reset()` method sets B5 to value 0x3e10"] -impl crate::Resettable for B5_SPEC { - const RESET_VALUE: Self::Ux = 0x3e10; -} diff --git a/down-the-stack/dk_pac/src/ficr/temp/t0.rs b/down-the-stack/dk_pac/src/ficr/temp/t0.rs deleted file mode 100644 index 3d0754c..0000000 --- a/down-the-stack/dk_pac/src/ficr/temp/t0.rs +++ /dev/null @@ -1,37 +0,0 @@ -#[doc = "Register `T0` 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 = "Field `T` reader - T (segment end)register."] -pub type T_R = crate::FieldReader; -impl R { - #[doc = "Bits 0:7 - T (segment end)register."] - #[inline(always)] - pub fn t(&self) -> T_R { - T_R::new((self.bits & 0xff) as u8) - } -} -#[doc = "Segment end T0.\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 [t0](index.html) module"] -pub struct T0_SPEC; -impl crate::RegisterSpec for T0_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [t0::R](R) reader structure"] -impl crate::Readable for T0_SPEC { - type Reader = R; -} -#[doc = "`reset()` method sets T0 to value 0xe2"] -impl crate::Resettable for T0_SPEC { - const RESET_VALUE: Self::Ux = 0xe2; -} diff --git a/down-the-stack/dk_pac/src/ficr/temp/t1.rs b/down-the-stack/dk_pac/src/ficr/temp/t1.rs deleted file mode 100644 index a2bfb70..0000000 --- a/down-the-stack/dk_pac/src/ficr/temp/t1.rs +++ /dev/null @@ -1,37 +0,0 @@ -#[doc = "Register `T1` 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 = "Field `T` reader - T (segment end)register."] -pub type T_R = crate::FieldReader; -impl R { - #[doc = "Bits 0:7 - T (segment end)register."] - #[inline(always)] - pub fn t(&self) -> T_R { - T_R::new((self.bits & 0xff) as u8) - } -} -#[doc = "Segment end T1.\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 [t1](index.html) module"] -pub struct T1_SPEC; -impl crate::RegisterSpec for T1_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [t1::R](R) reader structure"] -impl crate::Readable for T1_SPEC { - type Reader = R; -} -#[doc = "`reset()` method sets T1 to value 0"] -impl crate::Resettable for T1_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/ficr/temp/t2.rs b/down-the-stack/dk_pac/src/ficr/temp/t2.rs deleted file mode 100644 index 693de6e..0000000 --- a/down-the-stack/dk_pac/src/ficr/temp/t2.rs +++ /dev/null @@ -1,37 +0,0 @@ -#[doc = "Register `T2` 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 = "Field `T` reader - T (segment end)register."] -pub type T_R = crate::FieldReader; -impl R { - #[doc = "Bits 0:7 - T (segment end)register."] - #[inline(always)] - pub fn t(&self) -> T_R { - T_R::new((self.bits & 0xff) as u8) - } -} -#[doc = "Segment end T2.\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 [t2](index.html) module"] -pub struct T2_SPEC; -impl crate::RegisterSpec for T2_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [t2::R](R) reader structure"] -impl crate::Readable for T2_SPEC { - type Reader = R; -} -#[doc = "`reset()` method sets T2 to value 0x14"] -impl crate::Resettable for T2_SPEC { - const RESET_VALUE: Self::Ux = 0x14; -} diff --git a/down-the-stack/dk_pac/src/ficr/temp/t3.rs b/down-the-stack/dk_pac/src/ficr/temp/t3.rs deleted file mode 100644 index a6efd0a..0000000 --- a/down-the-stack/dk_pac/src/ficr/temp/t3.rs +++ /dev/null @@ -1,37 +0,0 @@ -#[doc = "Register `T3` 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 = "Field `T` reader - T (segment end)register."] -pub type T_R = crate::FieldReader; -impl R { - #[doc = "Bits 0:7 - T (segment end)register."] - #[inline(always)] - pub fn t(&self) -> T_R { - T_R::new((self.bits & 0xff) as u8) - } -} -#[doc = "Segment end T3.\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 [t3](index.html) module"] -pub struct T3_SPEC; -impl crate::RegisterSpec for T3_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [t3::R](R) reader structure"] -impl crate::Readable for T3_SPEC { - type Reader = R; -} -#[doc = "`reset()` method sets T3 to value 0x19"] -impl crate::Resettable for T3_SPEC { - const RESET_VALUE: Self::Ux = 0x19; -} diff --git a/down-the-stack/dk_pac/src/ficr/temp/t4.rs b/down-the-stack/dk_pac/src/ficr/temp/t4.rs deleted file mode 100644 index c9bf79e..0000000 --- a/down-the-stack/dk_pac/src/ficr/temp/t4.rs +++ /dev/null @@ -1,37 +0,0 @@ -#[doc = "Register `T4` 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 = "Field `T` reader - T (segment end)register."] -pub type T_R = crate::FieldReader; -impl R { - #[doc = "Bits 0:7 - T (segment end)register."] - #[inline(always)] - pub fn t(&self) -> T_R { - T_R::new((self.bits & 0xff) as u8) - } -} -#[doc = "Segment end T4.\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 [t4](index.html) module"] -pub struct T4_SPEC; -impl crate::RegisterSpec for T4_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [t4::R](R) reader structure"] -impl crate::Readable for T4_SPEC { - type Reader = R; -} -#[doc = "`reset()` method sets T4 to value 0x50"] -impl crate::Resettable for T4_SPEC { - const RESET_VALUE: Self::Ux = 0x50; -} diff --git a/down-the-stack/dk_pac/src/generic.rs b/down-the-stack/dk_pac/src/generic.rs deleted file mode 100644 index da9c619..0000000 --- a/down-the-stack/dk_pac/src/generic.rs +++ /dev/null @@ -1,634 +0,0 @@ -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: RawReg; -} -#[doc = " Trait implemented by readable registers to enable the `read` method."] -#[doc = ""] -#[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: 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 be `modify`'ed."] -pub trait Writable: RegisterSpec { - #[doc = " Writer type argument to `write`, et al."] - 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 = ""] -#[doc = " This value is the initial value for the `write` method. It can also be directly written to the"] -#[doc = " register by using the `reset` method."] -pub trait Resettable: RegisterSpec { - #[doc = " Reset value of the register."] - 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)] -pub struct Reg { - register: vcell::VolatileCell, - _marker: marker::PhantomData, -} -unsafe impl Send for Reg where REG::Ux: Send {} -impl Reg { - #[doc = " Returns the underlying memory address of register."] - #[doc = ""] - #[doc = " ```ignore"] - #[doc = " let reg_ptr = periph.reg.as_ptr();"] - #[doc = " ```"] - #[inline(always)] - pub fn as_ptr(&self) -> *mut REG::Ux { - self.register.as_ptr() - } -} -impl Reg { - #[doc = " Reads the contents of a `Readable` register."] - #[doc = ""] - #[doc = " You can read the raw contents of a register by using `bits`:"] - #[doc = " ```ignore"] - #[doc = " let bits = periph.reg.read().bits();"] - #[doc = " ```"] - #[doc = " or get the content of a particular field of a register:"] - #[doc = " ```ignore"] - #[doc = " let reader = periph.reg.read();"] - #[doc = " let bits = reader.field1().bits();"] - #[doc = " let flag = reader.field2().bit_is_set();"] - #[doc = " ```"] - #[inline(always)] - pub fn read(&self) -> REG::Reader { - REG::Reader::from(R { - bits: self.register.get(), - _reg: marker::PhantomData, - }) - } -} -impl Reg { - #[doc = " Writes the reset value to `Writable` register."] - #[doc = ""] - #[doc = " Resets the register to its initial state."] - #[inline(always)] - pub fn reset(&self) { - self.register.set(REG::RESET_VALUE) - } - #[doc = " Writes bits to a `Writable` register."] - #[doc = ""] - #[doc = " You can write raw bits into a register:"] - #[doc = " ```ignore"] - #[doc = " periph.reg.write(|w| unsafe { w.bits(rawbits) });"] - #[doc = " ```"] - #[doc = " or write only the fields you need:"] - #[doc = " ```ignore"] - #[doc = " periph.reg.write(|w| w"] - #[doc = " .field1().bits(newfield1bits)"] - #[doc = " .field2().set_bit()"] - #[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) - where - F: FnOnce(&mut REG::Writer) -> &mut W, - { - self.register.set( - f(&mut REG::Writer::from(W { - bits: REG::RESET_VALUE & !REG::ONE_TO_MODIFY_FIELDS_BITMAP - | REG::ZERO_TO_MODIFY_FIELDS_BITMAP, - _reg: marker::PhantomData, - })) - .bits, - ); - } -} -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 { - bits: REG::Ux::default(), - _reg: marker::PhantomData, - })) - .bits, - ); - } -} -impl Reg { - #[doc = " Modifies the contents of the register by reading and then writing it."] - #[doc = ""] - #[doc = " E.g. to do a read-modify-write sequence to change parts of a register:"] - #[doc = " ```ignore"] - #[doc = " periph.reg.modify(|r, w| unsafe { w.bits("] - #[doc = " r.bits() | 3"] - #[doc = " ) });"] - #[doc = " ```"] - #[doc = " or"] - #[doc = " ```ignore"] - #[doc = " periph.reg.modify(|_, w| w"] - #[doc = " .field1().bits(newfield1bits)"] - #[doc = " .field2().set_bit()"] - #[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) - where - for<'w> F: FnOnce(®::Reader, &'w mut REG::Writer) -> &'w mut W, - { - let bits = self.register.get(); - self.register.set( - f( - ®::Reader::from(R { - bits, - _reg: marker::PhantomData, - }), - &mut REG::Writer::from(W { - bits: bits & !REG::ONE_TO_MODIFY_FIELDS_BITMAP - | REG::ZERO_TO_MODIFY_FIELDS_BITMAP, - _reg: marker::PhantomData, - }), - ) - .bits, - ); - } -} -#[doc = " Register reader."] -#[doc = ""] -#[doc = " Result of the `read` methods of registers. Also used as a closure argument in the `modify`"] -#[doc = " method."] -pub struct R { - pub(crate) bits: REG::Ux, - _reg: marker::PhantomData, -} -impl R { - #[doc = " Reads raw bits from register."] - #[inline(always)] - pub fn bits(&self) -> REG::Ux { - self.bits - } -} -impl PartialEq for R -where - REG::Ux: PartialEq, - FI: Copy, - REG::Ux: From, -{ - #[inline(always)] - fn eq(&self, other: &FI) -> bool { - self.bits.eq(®::Ux::from(*other)) - } -} -#[doc = " Register writer."] -#[doc = ""] -#[doc = " Used as an argument to the closures in the `write` and `modify` methods of the register."] -pub struct W { - #[doc = "Writable bits"] - pub(crate) bits: REG::Ux, - _reg: marker::PhantomData, -} -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(hidden)] -pub struct FieldReaderRaw { - pub(crate) bits: U, - _reg: marker::PhantomData, -} -impl FieldReaderRaw -where - U: Copy, -{ - #[doc = " Creates a new instance of the reader."] - #[allow(unused)] - #[inline(always)] - pub(crate) fn new(bits: U) -> Self { - Self { - bits, - _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 -where - U: PartialEq, - FI: Copy, - U: From, -{ - #[inline(always)] - fn eq(&self, other: &FI) -> bool { - self.bits.eq(&U::from(*other)) - } -} -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 { - self.bits - } - #[doc = " Returns `true` if the bit is clear (0)."] - #[inline(always)] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = " Returns `true` if the bit is set (1)."] - #[inline(always)] - pub fn bit_is_set(&self) -> bool { - 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/down-the-stack/dk_pac/src/gpiote.rs b/down-the-stack/dk_pac/src/gpiote.rs deleted file mode 100644 index 58b6f2e..0000000 --- a/down-the-stack/dk_pac/src/gpiote.rs +++ /dev/null @@ -1,64 +0,0 @@ -#[doc = r"Register block"] -#[repr(C)] -pub struct RegisterBlock { - #[doc = "0x00..0x20 - Description collection: Task for writing to pin specified in CONFIG\\[n\\].PSEL. Action on pin is configured in CONFIG\\[n\\].POLARITY."] - pub tasks_out: [TASKS_OUT; 8], - _reserved1: [u8; 0x10], - #[doc = "0x30..0x50 - Description collection: Task for writing to pin specified in CONFIG\\[n\\].PSEL. Action on pin is to set it high."] - pub tasks_set: [TASKS_SET; 8], - _reserved2: [u8; 0x10], - #[doc = "0x60..0x80 - Description collection: Task for writing to pin specified in CONFIG\\[n\\].PSEL. Action on pin is to set it low."] - pub tasks_clr: [TASKS_CLR; 8], - _reserved3: [u8; 0x80], - #[doc = "0x100..0x120 - Description collection: Event generated from pin specified in CONFIG\\[n\\].PSEL"] - pub events_in: [EVENTS_IN; 8], - _reserved4: [u8; 0x5c], - #[doc = "0x17c - Event generated from multiple input GPIO pins with SENSE mechanism enabled"] - pub events_port: EVENTS_PORT, - _reserved5: [u8; 0x0184], - #[doc = "0x304 - Enable interrupt"] - pub intenset: INTENSET, - #[doc = "0x308 - Disable interrupt"] - pub intenclr: INTENCLR, - _reserved7: [u8; 0x0204], - #[doc = "0x510..0x530 - Description collection: Configuration for OUT\\[n\\], SET\\[n\\] -and CLR\\[n\\] -tasks and IN\\[n\\] -event"] - pub config: [CONFIG; 8], -} -#[doc = "TASKS_OUT (w) register accessor: an alias for `Reg`"] -pub type TASKS_OUT = crate::Reg; -#[doc = "Description collection: Task for writing to pin specified in CONFIG\\[n\\].PSEL. Action on pin is configured in CONFIG\\[n\\].POLARITY."] -pub mod tasks_out; -#[doc = "TASKS_SET (w) register accessor: an alias for `Reg`"] -pub type TASKS_SET = crate::Reg; -#[doc = "Description collection: Task for writing to pin specified in CONFIG\\[n\\].PSEL. Action on pin is to set it high."] -pub mod tasks_set; -#[doc = "TASKS_CLR (w) register accessor: an alias for `Reg`"] -pub type TASKS_CLR = crate::Reg; -#[doc = "Description collection: Task for writing to pin specified in CONFIG\\[n\\].PSEL. Action on pin is to set it low."] -pub mod tasks_clr; -#[doc = "EVENTS_IN (rw) register accessor: an alias for `Reg`"] -pub type EVENTS_IN = crate::Reg; -#[doc = "Description collection: Event generated from pin specified in CONFIG\\[n\\].PSEL"] -pub mod events_in; -#[doc = "EVENTS_PORT (rw) register accessor: an alias for `Reg`"] -pub type EVENTS_PORT = crate::Reg; -#[doc = "Event generated from multiple input GPIO pins with SENSE mechanism enabled"] -pub mod events_port; -#[doc = "INTENSET (rw) register accessor: an alias for `Reg`"] -pub type INTENSET = crate::Reg; -#[doc = "Enable interrupt"] -pub mod intenset; -#[doc = "INTENCLR (rw) register accessor: an alias for `Reg`"] -pub type INTENCLR = crate::Reg; -#[doc = "Disable interrupt"] -pub mod intenclr; -#[doc = "CONFIG (rw) register accessor: an alias for `Reg`"] -pub type CONFIG = crate::Reg; -#[doc = "Description collection: Configuration for OUT\\[n\\], SET\\[n\\] -and CLR\\[n\\] -tasks and IN\\[n\\] -event"] -pub mod config; diff --git a/down-the-stack/dk_pac/src/gpiote/config.rs b/down-the-stack/dk_pac/src/gpiote/config.rs deleted file mode 100644 index 052eca6..0000000 --- a/down-the-stack/dk_pac/src/gpiote/config.rs +++ /dev/null @@ -1,347 +0,0 @@ -#[doc = "Register `CONFIG[%s]` 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 `CONFIG[%s]` 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 `MODE` reader - Mode"] -pub type MODE_R = crate::FieldReader; -#[doc = "Mode\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -#[repr(u8)] -pub enum MODE_A { - #[doc = "0: Disabled. Pin specified by PSEL will not be acquired by the GPIOTE module."] - DISABLED = 0, - #[doc = "1: Event mode"] - EVENT = 1, - #[doc = "3: Task mode"] - TASK = 3, -} -impl From for u8 { - #[inline(always)] - fn from(variant: MODE_A) -> Self { - variant as _ - } -} -impl MODE_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> Option { - match self.bits { - 0 => Some(MODE_A::DISABLED), - 1 => Some(MODE_A::EVENT), - 3 => Some(MODE_A::TASK), - _ => None, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == MODE_A::DISABLED - } - #[doc = "Checks if the value of the field is `EVENT`"] - #[inline(always)] - pub fn is_event(&self) -> bool { - *self == MODE_A::EVENT - } - #[doc = "Checks if the value of the field is `TASK`"] - #[inline(always)] - pub fn is_task(&self) -> bool { - *self == MODE_A::TASK - } -} -#[doc = "Field `MODE` writer - Mode"] -pub type MODE_W<'a, const O: u8> = crate::FieldWriter<'a, u32, CONFIG_SPEC, u8, MODE_A, 2, O>; -impl<'a, const O: u8> MODE_W<'a, O> { - #[doc = "Disabled. Pin specified by PSEL will not be acquired by the GPIOTE module."] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(MODE_A::DISABLED) - } - #[doc = "Event mode"] - #[inline(always)] - pub fn event(self) -> &'a mut W { - self.variant(MODE_A::EVENT) - } - #[doc = "Task mode"] - #[inline(always)] - pub fn task(self) -> &'a mut W { - self.variant(MODE_A::TASK) - } -} -#[doc = "Field `PSEL` reader - GPIO number associated with SET\\[n\\], CLR\\[n\\] -and OUT\\[n\\] -tasks and IN\\[n\\] -event"] -pub type PSEL_R = crate::FieldReader; -#[doc = "Field `PSEL` writer - GPIO number associated with SET\\[n\\], CLR\\[n\\] -and OUT\\[n\\] -tasks and IN\\[n\\] -event"] -pub type PSEL_W<'a, const O: u8> = crate::FieldWriter<'a, u32, CONFIG_SPEC, u8, u8, 5, O>; -#[doc = "Field `POLARITY` reader - When In task mode: Operation to be performed on output when OUT\\[n\\] -task is triggered. When In event mode: Operation on input that shall trigger IN\\[n\\] -event."] -pub type POLARITY_R = crate::FieldReader; -#[doc = "When In task mode: Operation to be performed on output when OUT\\[n\\] -task is triggered. When In event mode: Operation on input that shall trigger IN\\[n\\] -event.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -#[repr(u8)] -pub enum POLARITY_A { - #[doc = "0: Task mode: No effect on pin from OUT\\[n\\] -task. Event mode: no IN\\[n\\] -event generated on pin activity."] - NONE = 0, - #[doc = "1: Task mode: Set pin from OUT\\[n\\] -task. Event mode: Generate IN\\[n\\] -event when rising edge on pin."] - LO_TO_HI = 1, - #[doc = "2: Task mode: Clear pin from OUT\\[n\\] -task. Event mode: Generate IN\\[n\\] -event when falling edge on pin."] - HI_TO_LO = 2, - #[doc = "3: Task mode: Toggle pin from OUT\\[n\\]. Event mode: Generate IN\\[n\\] -when any change on pin."] - TOGGLE = 3, -} -impl From for u8 { - #[inline(always)] - fn from(variant: POLARITY_A) -> Self { - variant as _ - } -} -impl POLARITY_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> POLARITY_A { - match self.bits { - 0 => POLARITY_A::NONE, - 1 => POLARITY_A::LO_TO_HI, - 2 => POLARITY_A::HI_TO_LO, - 3 => POLARITY_A::TOGGLE, - _ => unreachable!(), - } - } - #[doc = "Checks if the value of the field is `NONE`"] - #[inline(always)] - pub fn is_none(&self) -> bool { - *self == POLARITY_A::NONE - } - #[doc = "Checks if the value of the field is `LO_TO_HI`"] - #[inline(always)] - pub fn is_lo_to_hi(&self) -> bool { - *self == POLARITY_A::LO_TO_HI - } - #[doc = "Checks if the value of the field is `HI_TO_LO`"] - #[inline(always)] - pub fn is_hi_to_lo(&self) -> bool { - *self == POLARITY_A::HI_TO_LO - } - #[doc = "Checks if the value of the field is `TOGGLE`"] - #[inline(always)] - pub fn is_toggle(&self) -> bool { - *self == POLARITY_A::TOGGLE - } -} -#[doc = "Field `POLARITY` writer - When In task mode: Operation to be performed on output when OUT\\[n\\] -task is triggered. When In event mode: Operation on input that shall trigger IN\\[n\\] -event."] -pub type POLARITY_W<'a, const O: u8> = - crate::FieldWriterSafe<'a, u32, CONFIG_SPEC, u8, POLARITY_A, 2, O>; -impl<'a, const O: u8> POLARITY_W<'a, O> { - #[doc = "Task mode: No effect on pin from OUT\\[n\\] -task. Event mode: no IN\\[n\\] -event generated on pin activity."] - #[inline(always)] - pub fn none(self) -> &'a mut W { - self.variant(POLARITY_A::NONE) - } - #[doc = "Task mode: Set pin from OUT\\[n\\] -task. Event mode: Generate IN\\[n\\] -event when rising edge on pin."] - #[inline(always)] - pub fn lo_to_hi(self) -> &'a mut W { - self.variant(POLARITY_A::LO_TO_HI) - } - #[doc = "Task mode: Clear pin from OUT\\[n\\] -task. Event mode: Generate IN\\[n\\] -event when falling edge on pin."] - #[inline(always)] - pub fn hi_to_lo(self) -> &'a mut W { - self.variant(POLARITY_A::HI_TO_LO) - } - #[doc = "Task mode: Toggle pin from OUT\\[n\\]. Event mode: Generate IN\\[n\\] -when any change on pin."] - #[inline(always)] - pub fn toggle(self) -> &'a mut W { - self.variant(POLARITY_A::TOGGLE) - } -} -#[doc = "Field `OUTINIT` reader - When in task mode: Initial value of the output when the GPIOTE channel is configured. When in event mode: No effect."] -pub type OUTINIT_R = crate::BitReader; -#[doc = "When in task mode: Initial value of the output when the GPIOTE channel is configured. When in event mode: No effect.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum OUTINIT_A { - #[doc = "0: Task mode: Initial value of pin before task triggering is low"] - LOW = 0, - #[doc = "1: Task mode: Initial value of pin before task triggering is high"] - HIGH = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: OUTINIT_A) -> Self { - variant as u8 != 0 - } -} -impl OUTINIT_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> OUTINIT_A { - match self.bits { - false => OUTINIT_A::LOW, - true => OUTINIT_A::HIGH, - } - } - #[doc = "Checks if the value of the field is `LOW`"] - #[inline(always)] - pub fn is_low(&self) -> bool { - *self == OUTINIT_A::LOW - } - #[doc = "Checks if the value of the field is `HIGH`"] - #[inline(always)] - pub fn is_high(&self) -> bool { - *self == OUTINIT_A::HIGH - } -} -#[doc = "Field `OUTINIT` writer - When in task mode: Initial value of the output when the GPIOTE channel is configured. When in event mode: No effect."] -pub type OUTINIT_W<'a, const O: u8> = crate::BitWriter<'a, u32, CONFIG_SPEC, OUTINIT_A, O>; -impl<'a, const O: u8> OUTINIT_W<'a, O> { - #[doc = "Task mode: Initial value of pin before task triggering is low"] - #[inline(always)] - pub fn low(self) -> &'a mut W { - self.variant(OUTINIT_A::LOW) - } - #[doc = "Task mode: Initial value of pin before task triggering is high"] - #[inline(always)] - pub fn high(self) -> &'a mut W { - self.variant(OUTINIT_A::HIGH) - } -} -impl R { - #[doc = "Bits 0:1 - Mode"] - #[inline(always)] - pub fn mode(&self) -> MODE_R { - MODE_R::new((self.bits & 3) as u8) - } - #[doc = "Bits 8:12 - GPIO number associated with SET\\[n\\], CLR\\[n\\] -and OUT\\[n\\] -tasks and IN\\[n\\] -event"] - #[inline(always)] - pub fn psel(&self) -> PSEL_R { - PSEL_R::new(((self.bits >> 8) & 0x1f) as u8) - } - #[doc = "Bits 16:17 - When In task mode: Operation to be performed on output when OUT\\[n\\] -task is triggered. When In event mode: Operation on input that shall trigger IN\\[n\\] -event."] - #[inline(always)] - pub fn polarity(&self) -> POLARITY_R { - POLARITY_R::new(((self.bits >> 16) & 3) as u8) - } - #[doc = "Bit 20 - When in task mode: Initial value of the output when the GPIOTE channel is configured. When in event mode: No effect."] - #[inline(always)] - pub fn outinit(&self) -> OUTINIT_R { - OUTINIT_R::new(((self.bits >> 20) & 1) != 0) - } -} -impl W { - #[doc = "Bits 0:1 - Mode"] - #[inline(always)] - #[must_use] - pub fn mode(&mut self) -> MODE_W<0> { - MODE_W::new(self) - } - #[doc = "Bits 8:12 - GPIO number associated with SET\\[n\\], CLR\\[n\\] -and OUT\\[n\\] -tasks and IN\\[n\\] -event"] - #[inline(always)] - #[must_use] - pub fn psel(&mut self) -> PSEL_W<8> { - PSEL_W::new(self) - } - #[doc = "Bits 16:17 - When In task mode: Operation to be performed on output when OUT\\[n\\] -task is triggered. When In event mode: Operation on input that shall trigger IN\\[n\\] -event."] - #[inline(always)] - #[must_use] - pub fn polarity(&mut self) -> POLARITY_W<16> { - POLARITY_W::new(self) - } - #[doc = "Bit 20 - When in task mode: Initial value of the output when the GPIOTE channel is configured. When in event mode: No effect."] - #[inline(always)] - #[must_use] - pub fn outinit(&mut self) -> OUTINIT_W<20> { - OUTINIT_W::new(self) - } - #[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 = "Description collection: Configuration for OUT\\[n\\], SET\\[n\\] -and CLR\\[n\\] -tasks and IN\\[n\\] -event\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 [config](index.html) module"] -pub struct CONFIG_SPEC; -impl crate::RegisterSpec for CONFIG_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [config::R](R) reader structure"] -impl crate::Readable for CONFIG_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [config::W](W) writer structure"] -impl crate::Writable for 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 CONFIG[%s] -to value 0"] -impl crate::Resettable for CONFIG_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/gpiote/events_in.rs b/down-the-stack/dk_pac/src/gpiote/events_in.rs deleted file mode 100644 index d70d8ad..0000000 --- a/down-the-stack/dk_pac/src/gpiote/events_in.rs +++ /dev/null @@ -1,127 +0,0 @@ -#[doc = "Register `EVENTS_IN[%s]` 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 `EVENTS_IN[%s]` 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 `EVENTS_IN` reader - Event generated from pin specified in CONFIG\\[n\\].PSEL"] -pub type EVENTS_IN_R = crate::BitReader; -#[doc = "Event generated from pin specified in CONFIG\\[n\\].PSEL\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum EVENTS_IN_A { - #[doc = "0: Event not generated"] - NOT_GENERATED = 0, - #[doc = "1: Event generated"] - GENERATED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: EVENTS_IN_A) -> Self { - variant as u8 != 0 - } -} -impl EVENTS_IN_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> EVENTS_IN_A { - match self.bits { - false => EVENTS_IN_A::NOT_GENERATED, - true => EVENTS_IN_A::GENERATED, - } - } - #[doc = "Checks if the value of the field is `NOT_GENERATED`"] - #[inline(always)] - pub fn is_not_generated(&self) -> bool { - *self == EVENTS_IN_A::NOT_GENERATED - } - #[doc = "Checks if the value of the field is `GENERATED`"] - #[inline(always)] - pub fn is_generated(&self) -> bool { - *self == EVENTS_IN_A::GENERATED - } -} -#[doc = "Field `EVENTS_IN` writer - Event generated from pin specified in CONFIG\\[n\\].PSEL"] -pub type EVENTS_IN_W<'a, const O: u8> = crate::BitWriter<'a, u32, EVENTS_IN_SPEC, EVENTS_IN_A, O>; -impl<'a, const O: u8> EVENTS_IN_W<'a, O> { - #[doc = "Event not generated"] - #[inline(always)] - pub fn not_generated(self) -> &'a mut W { - self.variant(EVENTS_IN_A::NOT_GENERATED) - } - #[doc = "Event generated"] - #[inline(always)] - pub fn generated(self) -> &'a mut W { - self.variant(EVENTS_IN_A::GENERATED) - } -} -impl R { - #[doc = "Bit 0 - Event generated from pin specified in CONFIG\\[n\\].PSEL"] - #[inline(always)] - pub fn events_in(&self) -> EVENTS_IN_R { - EVENTS_IN_R::new((self.bits & 1) != 0) - } -} -impl W { - #[doc = "Bit 0 - Event generated from pin specified in CONFIG\\[n\\].PSEL"] - #[inline(always)] - #[must_use] - pub fn events_in(&mut self) -> EVENTS_IN_W<0> { - EVENTS_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 = "Description collection: Event generated from pin specified in CONFIG\\[n\\].PSEL\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 [events_in](index.html) module"] -pub struct EVENTS_IN_SPEC; -impl crate::RegisterSpec for EVENTS_IN_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [events_in::R](R) reader structure"] -impl crate::Readable for EVENTS_IN_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [events_in::W](W) writer structure"] -impl crate::Writable for EVENTS_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 EVENTS_IN[%s] -to value 0"] -impl crate::Resettable for EVENTS_IN_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/gpiote/events_port.rs b/down-the-stack/dk_pac/src/gpiote/events_port.rs deleted file mode 100644 index 6fd4f03..0000000 --- a/down-the-stack/dk_pac/src/gpiote/events_port.rs +++ /dev/null @@ -1,127 +0,0 @@ -#[doc = "Register `EVENTS_PORT` 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 `EVENTS_PORT` 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 `EVENTS_PORT` reader - Event generated from multiple input GPIO pins with SENSE mechanism enabled"] -pub type EVENTS_PORT_R = crate::BitReader; -#[doc = "Event generated from multiple input GPIO pins with SENSE mechanism enabled\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum EVENTS_PORT_A { - #[doc = "0: Event not generated"] - NOT_GENERATED = 0, - #[doc = "1: Event generated"] - GENERATED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: EVENTS_PORT_A) -> Self { - variant as u8 != 0 - } -} -impl EVENTS_PORT_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> EVENTS_PORT_A { - match self.bits { - false => EVENTS_PORT_A::NOT_GENERATED, - true => EVENTS_PORT_A::GENERATED, - } - } - #[doc = "Checks if the value of the field is `NOT_GENERATED`"] - #[inline(always)] - pub fn is_not_generated(&self) -> bool { - *self == EVENTS_PORT_A::NOT_GENERATED - } - #[doc = "Checks if the value of the field is `GENERATED`"] - #[inline(always)] - pub fn is_generated(&self) -> bool { - *self == EVENTS_PORT_A::GENERATED - } -} -#[doc = "Field `EVENTS_PORT` writer - Event generated from multiple input GPIO pins with SENSE mechanism enabled"] -pub type EVENTS_PORT_W<'a, const O: u8> = - crate::BitWriter<'a, u32, EVENTS_PORT_SPEC, EVENTS_PORT_A, O>; -impl<'a, const O: u8> EVENTS_PORT_W<'a, O> { - #[doc = "Event not generated"] - #[inline(always)] - pub fn not_generated(self) -> &'a mut W { - self.variant(EVENTS_PORT_A::NOT_GENERATED) - } - #[doc = "Event generated"] - #[inline(always)] - pub fn generated(self) -> &'a mut W { - self.variant(EVENTS_PORT_A::GENERATED) - } -} -impl R { - #[doc = "Bit 0 - Event generated from multiple input GPIO pins with SENSE mechanism enabled"] - #[inline(always)] - pub fn events_port(&self) -> EVENTS_PORT_R { - EVENTS_PORT_R::new((self.bits & 1) != 0) - } -} -impl W { - #[doc = "Bit 0 - Event generated from multiple input GPIO pins with SENSE mechanism enabled"] - #[inline(always)] - #[must_use] - pub fn events_port(&mut self) -> EVENTS_PORT_W<0> { - EVENTS_PORT_W::new(self) - } - #[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 = "Event generated from multiple input GPIO pins with SENSE mechanism enabled\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 [events_port](index.html) module"] -pub struct EVENTS_PORT_SPEC; -impl crate::RegisterSpec for EVENTS_PORT_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [events_port::R](R) reader structure"] -impl crate::Readable for EVENTS_PORT_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [events_port::W](W) writer structure"] -impl crate::Writable for EVENTS_PORT_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets EVENTS_PORT to value 0"] -impl crate::Resettable for EVENTS_PORT_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/gpiote/intenclr.rs b/down-the-stack/dk_pac/src/gpiote/intenclr.rs deleted file mode 100644 index a415168..0000000 --- a/down-the-stack/dk_pac/src/gpiote/intenclr.rs +++ /dev/null @@ -1,677 +0,0 @@ -#[doc = "Register `INTENCLR` 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 `INTENCLR` 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 `IN0` reader - Write '1' to disable interrupt for event IN\\[0\\]"] -pub type IN0_R = crate::BitReader; -#[doc = "Write '1' to disable interrupt for event IN\\[0\\]\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum IN0_A { - #[doc = "0: Read: Disabled"] - DISABLED = 0, - #[doc = "1: Read: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: IN0_A) -> Self { - variant as u8 != 0 - } -} -impl IN0_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> IN0_A { - match self.bits { - false => IN0_A::DISABLED, - true => IN0_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == IN0_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == IN0_A::ENABLED - } -} -#[doc = "Write '1' to disable interrupt for event IN\\[0\\]\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum IN0_AW { - #[doc = "1: Disable"] - CLEAR = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: IN0_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `IN0` writer - Write '1' to disable interrupt for event IN\\[0\\]"] -pub type IN0_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENCLR_SPEC, IN0_AW, O>; -impl<'a, const O: u8> IN0_W<'a, O> { - #[doc = "Disable"] - #[inline(always)] - pub fn clear(self) -> &'a mut W { - self.variant(IN0_AW::CLEAR) - } -} -#[doc = "Field `IN1` reader - Write '1' to disable interrupt for event IN\\[1\\]"] -pub type IN1_R = crate::BitReader; -#[doc = "Write '1' to disable interrupt for event IN\\[1\\]\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum IN1_A { - #[doc = "0: Read: Disabled"] - DISABLED = 0, - #[doc = "1: Read: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: IN1_A) -> Self { - variant as u8 != 0 - } -} -impl IN1_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> IN1_A { - match self.bits { - false => IN1_A::DISABLED, - true => IN1_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == IN1_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == IN1_A::ENABLED - } -} -#[doc = "Write '1' to disable interrupt for event IN\\[1\\]\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum IN1_AW { - #[doc = "1: Disable"] - CLEAR = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: IN1_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `IN1` writer - Write '1' to disable interrupt for event IN\\[1\\]"] -pub type IN1_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENCLR_SPEC, IN1_AW, O>; -impl<'a, const O: u8> IN1_W<'a, O> { - #[doc = "Disable"] - #[inline(always)] - pub fn clear(self) -> &'a mut W { - self.variant(IN1_AW::CLEAR) - } -} -#[doc = "Field `IN2` reader - Write '1' to disable interrupt for event IN\\[2\\]"] -pub type IN2_R = crate::BitReader; -#[doc = "Write '1' to disable interrupt for event IN\\[2\\]\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum IN2_A { - #[doc = "0: Read: Disabled"] - DISABLED = 0, - #[doc = "1: Read: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: IN2_A) -> Self { - variant as u8 != 0 - } -} -impl IN2_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> IN2_A { - match self.bits { - false => IN2_A::DISABLED, - true => IN2_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == IN2_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == IN2_A::ENABLED - } -} -#[doc = "Write '1' to disable interrupt for event IN\\[2\\]\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum IN2_AW { - #[doc = "1: Disable"] - CLEAR = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: IN2_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `IN2` writer - Write '1' to disable interrupt for event IN\\[2\\]"] -pub type IN2_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENCLR_SPEC, IN2_AW, O>; -impl<'a, const O: u8> IN2_W<'a, O> { - #[doc = "Disable"] - #[inline(always)] - pub fn clear(self) -> &'a mut W { - self.variant(IN2_AW::CLEAR) - } -} -#[doc = "Field `IN3` reader - Write '1' to disable interrupt for event IN\\[3\\]"] -pub type IN3_R = crate::BitReader; -#[doc = "Write '1' to disable interrupt for event IN\\[3\\]\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum IN3_A { - #[doc = "0: Read: Disabled"] - DISABLED = 0, - #[doc = "1: Read: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: IN3_A) -> Self { - variant as u8 != 0 - } -} -impl IN3_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> IN3_A { - match self.bits { - false => IN3_A::DISABLED, - true => IN3_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == IN3_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == IN3_A::ENABLED - } -} -#[doc = "Write '1' to disable interrupt for event IN\\[3\\]\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum IN3_AW { - #[doc = "1: Disable"] - CLEAR = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: IN3_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `IN3` writer - Write '1' to disable interrupt for event IN\\[3\\]"] -pub type IN3_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENCLR_SPEC, IN3_AW, O>; -impl<'a, const O: u8> IN3_W<'a, O> { - #[doc = "Disable"] - #[inline(always)] - pub fn clear(self) -> &'a mut W { - self.variant(IN3_AW::CLEAR) - } -} -#[doc = "Field `IN4` reader - Write '1' to disable interrupt for event IN\\[4\\]"] -pub type IN4_R = crate::BitReader; -#[doc = "Write '1' to disable interrupt for event IN\\[4\\]\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum IN4_A { - #[doc = "0: Read: Disabled"] - DISABLED = 0, - #[doc = "1: Read: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: IN4_A) -> Self { - variant as u8 != 0 - } -} -impl IN4_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> IN4_A { - match self.bits { - false => IN4_A::DISABLED, - true => IN4_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == IN4_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == IN4_A::ENABLED - } -} -#[doc = "Write '1' to disable interrupt for event IN\\[4\\]\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum IN4_AW { - #[doc = "1: Disable"] - CLEAR = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: IN4_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `IN4` writer - Write '1' to disable interrupt for event IN\\[4\\]"] -pub type IN4_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENCLR_SPEC, IN4_AW, O>; -impl<'a, const O: u8> IN4_W<'a, O> { - #[doc = "Disable"] - #[inline(always)] - pub fn clear(self) -> &'a mut W { - self.variant(IN4_AW::CLEAR) - } -} -#[doc = "Field `IN5` reader - Write '1' to disable interrupt for event IN\\[5\\]"] -pub type IN5_R = crate::BitReader; -#[doc = "Write '1' to disable interrupt for event IN\\[5\\]\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum IN5_A { - #[doc = "0: Read: Disabled"] - DISABLED = 0, - #[doc = "1: Read: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: IN5_A) -> Self { - variant as u8 != 0 - } -} -impl IN5_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> IN5_A { - match self.bits { - false => IN5_A::DISABLED, - true => IN5_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == IN5_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == IN5_A::ENABLED - } -} -#[doc = "Write '1' to disable interrupt for event IN\\[5\\]\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum IN5_AW { - #[doc = "1: Disable"] - CLEAR = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: IN5_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `IN5` writer - Write '1' to disable interrupt for event IN\\[5\\]"] -pub type IN5_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENCLR_SPEC, IN5_AW, O>; -impl<'a, const O: u8> IN5_W<'a, O> { - #[doc = "Disable"] - #[inline(always)] - pub fn clear(self) -> &'a mut W { - self.variant(IN5_AW::CLEAR) - } -} -#[doc = "Field `IN6` reader - Write '1' to disable interrupt for event IN\\[6\\]"] -pub type IN6_R = crate::BitReader; -#[doc = "Write '1' to disable interrupt for event IN\\[6\\]\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum IN6_A { - #[doc = "0: Read: Disabled"] - DISABLED = 0, - #[doc = "1: Read: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: IN6_A) -> Self { - variant as u8 != 0 - } -} -impl IN6_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> IN6_A { - match self.bits { - false => IN6_A::DISABLED, - true => IN6_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == IN6_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == IN6_A::ENABLED - } -} -#[doc = "Write '1' to disable interrupt for event IN\\[6\\]\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum IN6_AW { - #[doc = "1: Disable"] - CLEAR = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: IN6_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `IN6` writer - Write '1' to disable interrupt for event IN\\[6\\]"] -pub type IN6_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENCLR_SPEC, IN6_AW, O>; -impl<'a, const O: u8> IN6_W<'a, O> { - #[doc = "Disable"] - #[inline(always)] - pub fn clear(self) -> &'a mut W { - self.variant(IN6_AW::CLEAR) - } -} -#[doc = "Field `IN7` reader - Write '1' to disable interrupt for event IN\\[7\\]"] -pub type IN7_R = crate::BitReader; -#[doc = "Write '1' to disable interrupt for event IN\\[7\\]\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum IN7_A { - #[doc = "0: Read: Disabled"] - DISABLED = 0, - #[doc = "1: Read: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: IN7_A) -> Self { - variant as u8 != 0 - } -} -impl IN7_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> IN7_A { - match self.bits { - false => IN7_A::DISABLED, - true => IN7_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == IN7_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == IN7_A::ENABLED - } -} -#[doc = "Write '1' to disable interrupt for event IN\\[7\\]\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum IN7_AW { - #[doc = "1: Disable"] - CLEAR = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: IN7_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `IN7` writer - Write '1' to disable interrupt for event IN\\[7\\]"] -pub type IN7_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENCLR_SPEC, IN7_AW, O>; -impl<'a, const O: u8> IN7_W<'a, O> { - #[doc = "Disable"] - #[inline(always)] - pub fn clear(self) -> &'a mut W { - self.variant(IN7_AW::CLEAR) - } -} -#[doc = "Field `PORT` reader - Write '1' to disable interrupt for event PORT"] -pub type PORT_R = crate::BitReader; -#[doc = "Write '1' to disable interrupt for event PORT\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PORT_A { - #[doc = "0: Read: Disabled"] - DISABLED = 0, - #[doc = "1: Read: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PORT_A) -> Self { - variant as u8 != 0 - } -} -impl PORT_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> PORT_A { - match self.bits { - false => PORT_A::DISABLED, - true => PORT_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == PORT_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == PORT_A::ENABLED - } -} -#[doc = "Write '1' to disable interrupt for event PORT\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PORT_AW { - #[doc = "1: Disable"] - CLEAR = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PORT_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `PORT` writer - Write '1' to disable interrupt for event PORT"] -pub type PORT_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENCLR_SPEC, PORT_AW, O>; -impl<'a, const O: u8> PORT_W<'a, O> { - #[doc = "Disable"] - #[inline(always)] - pub fn clear(self) -> &'a mut W { - self.variant(PORT_AW::CLEAR) - } -} -impl R { - #[doc = "Bit 0 - Write '1' to disable interrupt for event IN\\[0\\]"] - #[inline(always)] - pub fn in0(&self) -> IN0_R { - IN0_R::new((self.bits & 1) != 0) - } - #[doc = "Bit 1 - Write '1' to disable interrupt for event IN\\[1\\]"] - #[inline(always)] - pub fn in1(&self) -> IN1_R { - IN1_R::new(((self.bits >> 1) & 1) != 0) - } - #[doc = "Bit 2 - Write '1' to disable interrupt for event IN\\[2\\]"] - #[inline(always)] - pub fn in2(&self) -> IN2_R { - IN2_R::new(((self.bits >> 2) & 1) != 0) - } - #[doc = "Bit 3 - Write '1' to disable interrupt for event IN\\[3\\]"] - #[inline(always)] - pub fn in3(&self) -> IN3_R { - IN3_R::new(((self.bits >> 3) & 1) != 0) - } - #[doc = "Bit 4 - Write '1' to disable interrupt for event IN\\[4\\]"] - #[inline(always)] - pub fn in4(&self) -> IN4_R { - IN4_R::new(((self.bits >> 4) & 1) != 0) - } - #[doc = "Bit 5 - Write '1' to disable interrupt for event IN\\[5\\]"] - #[inline(always)] - pub fn in5(&self) -> IN5_R { - IN5_R::new(((self.bits >> 5) & 1) != 0) - } - #[doc = "Bit 6 - Write '1' to disable interrupt for event IN\\[6\\]"] - #[inline(always)] - pub fn in6(&self) -> IN6_R { - IN6_R::new(((self.bits >> 6) & 1) != 0) - } - #[doc = "Bit 7 - Write '1' to disable interrupt for event IN\\[7\\]"] - #[inline(always)] - pub fn in7(&self) -> IN7_R { - IN7_R::new(((self.bits >> 7) & 1) != 0) - } - #[doc = "Bit 31 - Write '1' to disable interrupt for event PORT"] - #[inline(always)] - pub fn port(&self) -> PORT_R { - PORT_R::new(((self.bits >> 31) & 1) != 0) - } -} -impl W { - #[doc = "Bit 0 - Write '1' to disable interrupt for event IN\\[0\\]"] - #[inline(always)] - #[must_use] - pub fn in0(&mut self) -> IN0_W<0> { - IN0_W::new(self) - } - #[doc = "Bit 1 - Write '1' to disable interrupt for event IN\\[1\\]"] - #[inline(always)] - #[must_use] - pub fn in1(&mut self) -> IN1_W<1> { - IN1_W::new(self) - } - #[doc = "Bit 2 - Write '1' to disable interrupt for event IN\\[2\\]"] - #[inline(always)] - #[must_use] - pub fn in2(&mut self) -> IN2_W<2> { - IN2_W::new(self) - } - #[doc = "Bit 3 - Write '1' to disable interrupt for event IN\\[3\\]"] - #[inline(always)] - #[must_use] - pub fn in3(&mut self) -> IN3_W<3> { - IN3_W::new(self) - } - #[doc = "Bit 4 - Write '1' to disable interrupt for event IN\\[4\\]"] - #[inline(always)] - #[must_use] - pub fn in4(&mut self) -> IN4_W<4> { - IN4_W::new(self) - } - #[doc = "Bit 5 - Write '1' to disable interrupt for event IN\\[5\\]"] - #[inline(always)] - #[must_use] - pub fn in5(&mut self) -> IN5_W<5> { - IN5_W::new(self) - } - #[doc = "Bit 6 - Write '1' to disable interrupt for event IN\\[6\\]"] - #[inline(always)] - #[must_use] - pub fn in6(&mut self) -> IN6_W<6> { - IN6_W::new(self) - } - #[doc = "Bit 7 - Write '1' to disable interrupt for event IN\\[7\\]"] - #[inline(always)] - #[must_use] - pub fn in7(&mut self) -> IN7_W<7> { - IN7_W::new(self) - } - #[doc = "Bit 31 - Write '1' to disable interrupt for event PORT"] - #[inline(always)] - #[must_use] - pub fn port(&mut self) -> PORT_W<31> { - PORT_W::new(self) - } - #[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 = "Disable interrupt\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 [intenclr](index.html) module"] -pub struct INTENCLR_SPEC; -impl crate::RegisterSpec for INTENCLR_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [intenclr::R](R) reader structure"] -impl crate::Readable for INTENCLR_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [intenclr::W](W) writer structure"] -impl crate::Writable for INTENCLR_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets INTENCLR to value 0"] -impl crate::Resettable for INTENCLR_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/gpiote/intenset.rs b/down-the-stack/dk_pac/src/gpiote/intenset.rs deleted file mode 100644 index efd4758..0000000 --- a/down-the-stack/dk_pac/src/gpiote/intenset.rs +++ /dev/null @@ -1,677 +0,0 @@ -#[doc = "Register `INTENSET` 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 `INTENSET` 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 `IN0` reader - Write '1' to enable interrupt for event IN\\[0\\]"] -pub type IN0_R = crate::BitReader; -#[doc = "Write '1' to enable interrupt for event IN\\[0\\]\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum IN0_A { - #[doc = "0: Read: Disabled"] - DISABLED = 0, - #[doc = "1: Read: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: IN0_A) -> Self { - variant as u8 != 0 - } -} -impl IN0_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> IN0_A { - match self.bits { - false => IN0_A::DISABLED, - true => IN0_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == IN0_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == IN0_A::ENABLED - } -} -#[doc = "Write '1' to enable interrupt for event IN\\[0\\]\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum IN0_AW { - #[doc = "1: Enable"] - SET = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: IN0_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `IN0` writer - Write '1' to enable interrupt for event IN\\[0\\]"] -pub type IN0_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENSET_SPEC, IN0_AW, O>; -impl<'a, const O: u8> IN0_W<'a, O> { - #[doc = "Enable"] - #[inline(always)] - pub fn set(self) -> &'a mut W { - self.variant(IN0_AW::SET) - } -} -#[doc = "Field `IN1` reader - Write '1' to enable interrupt for event IN\\[1\\]"] -pub type IN1_R = crate::BitReader; -#[doc = "Write '1' to enable interrupt for event IN\\[1\\]\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum IN1_A { - #[doc = "0: Read: Disabled"] - DISABLED = 0, - #[doc = "1: Read: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: IN1_A) -> Self { - variant as u8 != 0 - } -} -impl IN1_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> IN1_A { - match self.bits { - false => IN1_A::DISABLED, - true => IN1_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == IN1_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == IN1_A::ENABLED - } -} -#[doc = "Write '1' to enable interrupt for event IN\\[1\\]\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum IN1_AW { - #[doc = "1: Enable"] - SET = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: IN1_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `IN1` writer - Write '1' to enable interrupt for event IN\\[1\\]"] -pub type IN1_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENSET_SPEC, IN1_AW, O>; -impl<'a, const O: u8> IN1_W<'a, O> { - #[doc = "Enable"] - #[inline(always)] - pub fn set(self) -> &'a mut W { - self.variant(IN1_AW::SET) - } -} -#[doc = "Field `IN2` reader - Write '1' to enable interrupt for event IN\\[2\\]"] -pub type IN2_R = crate::BitReader; -#[doc = "Write '1' to enable interrupt for event IN\\[2\\]\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum IN2_A { - #[doc = "0: Read: Disabled"] - DISABLED = 0, - #[doc = "1: Read: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: IN2_A) -> Self { - variant as u8 != 0 - } -} -impl IN2_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> IN2_A { - match self.bits { - false => IN2_A::DISABLED, - true => IN2_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == IN2_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == IN2_A::ENABLED - } -} -#[doc = "Write '1' to enable interrupt for event IN\\[2\\]\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum IN2_AW { - #[doc = "1: Enable"] - SET = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: IN2_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `IN2` writer - Write '1' to enable interrupt for event IN\\[2\\]"] -pub type IN2_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENSET_SPEC, IN2_AW, O>; -impl<'a, const O: u8> IN2_W<'a, O> { - #[doc = "Enable"] - #[inline(always)] - pub fn set(self) -> &'a mut W { - self.variant(IN2_AW::SET) - } -} -#[doc = "Field `IN3` reader - Write '1' to enable interrupt for event IN\\[3\\]"] -pub type IN3_R = crate::BitReader; -#[doc = "Write '1' to enable interrupt for event IN\\[3\\]\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum IN3_A { - #[doc = "0: Read: Disabled"] - DISABLED = 0, - #[doc = "1: Read: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: IN3_A) -> Self { - variant as u8 != 0 - } -} -impl IN3_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> IN3_A { - match self.bits { - false => IN3_A::DISABLED, - true => IN3_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == IN3_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == IN3_A::ENABLED - } -} -#[doc = "Write '1' to enable interrupt for event IN\\[3\\]\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum IN3_AW { - #[doc = "1: Enable"] - SET = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: IN3_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `IN3` writer - Write '1' to enable interrupt for event IN\\[3\\]"] -pub type IN3_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENSET_SPEC, IN3_AW, O>; -impl<'a, const O: u8> IN3_W<'a, O> { - #[doc = "Enable"] - #[inline(always)] - pub fn set(self) -> &'a mut W { - self.variant(IN3_AW::SET) - } -} -#[doc = "Field `IN4` reader - Write '1' to enable interrupt for event IN\\[4\\]"] -pub type IN4_R = crate::BitReader; -#[doc = "Write '1' to enable interrupt for event IN\\[4\\]\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum IN4_A { - #[doc = "0: Read: Disabled"] - DISABLED = 0, - #[doc = "1: Read: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: IN4_A) -> Self { - variant as u8 != 0 - } -} -impl IN4_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> IN4_A { - match self.bits { - false => IN4_A::DISABLED, - true => IN4_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == IN4_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == IN4_A::ENABLED - } -} -#[doc = "Write '1' to enable interrupt for event IN\\[4\\]\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum IN4_AW { - #[doc = "1: Enable"] - SET = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: IN4_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `IN4` writer - Write '1' to enable interrupt for event IN\\[4\\]"] -pub type IN4_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENSET_SPEC, IN4_AW, O>; -impl<'a, const O: u8> IN4_W<'a, O> { - #[doc = "Enable"] - #[inline(always)] - pub fn set(self) -> &'a mut W { - self.variant(IN4_AW::SET) - } -} -#[doc = "Field `IN5` reader - Write '1' to enable interrupt for event IN\\[5\\]"] -pub type IN5_R = crate::BitReader; -#[doc = "Write '1' to enable interrupt for event IN\\[5\\]\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum IN5_A { - #[doc = "0: Read: Disabled"] - DISABLED = 0, - #[doc = "1: Read: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: IN5_A) -> Self { - variant as u8 != 0 - } -} -impl IN5_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> IN5_A { - match self.bits { - false => IN5_A::DISABLED, - true => IN5_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == IN5_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == IN5_A::ENABLED - } -} -#[doc = "Write '1' to enable interrupt for event IN\\[5\\]\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum IN5_AW { - #[doc = "1: Enable"] - SET = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: IN5_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `IN5` writer - Write '1' to enable interrupt for event IN\\[5\\]"] -pub type IN5_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENSET_SPEC, IN5_AW, O>; -impl<'a, const O: u8> IN5_W<'a, O> { - #[doc = "Enable"] - #[inline(always)] - pub fn set(self) -> &'a mut W { - self.variant(IN5_AW::SET) - } -} -#[doc = "Field `IN6` reader - Write '1' to enable interrupt for event IN\\[6\\]"] -pub type IN6_R = crate::BitReader; -#[doc = "Write '1' to enable interrupt for event IN\\[6\\]\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum IN6_A { - #[doc = "0: Read: Disabled"] - DISABLED = 0, - #[doc = "1: Read: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: IN6_A) -> Self { - variant as u8 != 0 - } -} -impl IN6_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> IN6_A { - match self.bits { - false => IN6_A::DISABLED, - true => IN6_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == IN6_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == IN6_A::ENABLED - } -} -#[doc = "Write '1' to enable interrupt for event IN\\[6\\]\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum IN6_AW { - #[doc = "1: Enable"] - SET = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: IN6_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `IN6` writer - Write '1' to enable interrupt for event IN\\[6\\]"] -pub type IN6_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENSET_SPEC, IN6_AW, O>; -impl<'a, const O: u8> IN6_W<'a, O> { - #[doc = "Enable"] - #[inline(always)] - pub fn set(self) -> &'a mut W { - self.variant(IN6_AW::SET) - } -} -#[doc = "Field `IN7` reader - Write '1' to enable interrupt for event IN\\[7\\]"] -pub type IN7_R = crate::BitReader; -#[doc = "Write '1' to enable interrupt for event IN\\[7\\]\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum IN7_A { - #[doc = "0: Read: Disabled"] - DISABLED = 0, - #[doc = "1: Read: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: IN7_A) -> Self { - variant as u8 != 0 - } -} -impl IN7_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> IN7_A { - match self.bits { - false => IN7_A::DISABLED, - true => IN7_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == IN7_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == IN7_A::ENABLED - } -} -#[doc = "Write '1' to enable interrupt for event IN\\[7\\]\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum IN7_AW { - #[doc = "1: Enable"] - SET = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: IN7_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `IN7` writer - Write '1' to enable interrupt for event IN\\[7\\]"] -pub type IN7_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENSET_SPEC, IN7_AW, O>; -impl<'a, const O: u8> IN7_W<'a, O> { - #[doc = "Enable"] - #[inline(always)] - pub fn set(self) -> &'a mut W { - self.variant(IN7_AW::SET) - } -} -#[doc = "Field `PORT` reader - Write '1' to enable interrupt for event PORT"] -pub type PORT_R = crate::BitReader; -#[doc = "Write '1' to enable interrupt for event PORT\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PORT_A { - #[doc = "0: Read: Disabled"] - DISABLED = 0, - #[doc = "1: Read: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PORT_A) -> Self { - variant as u8 != 0 - } -} -impl PORT_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> PORT_A { - match self.bits { - false => PORT_A::DISABLED, - true => PORT_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == PORT_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == PORT_A::ENABLED - } -} -#[doc = "Write '1' to enable interrupt for event PORT\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PORT_AW { - #[doc = "1: Enable"] - SET = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PORT_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `PORT` writer - Write '1' to enable interrupt for event PORT"] -pub type PORT_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENSET_SPEC, PORT_AW, O>; -impl<'a, const O: u8> PORT_W<'a, O> { - #[doc = "Enable"] - #[inline(always)] - pub fn set(self) -> &'a mut W { - self.variant(PORT_AW::SET) - } -} -impl R { - #[doc = "Bit 0 - Write '1' to enable interrupt for event IN\\[0\\]"] - #[inline(always)] - pub fn in0(&self) -> IN0_R { - IN0_R::new((self.bits & 1) != 0) - } - #[doc = "Bit 1 - Write '1' to enable interrupt for event IN\\[1\\]"] - #[inline(always)] - pub fn in1(&self) -> IN1_R { - IN1_R::new(((self.bits >> 1) & 1) != 0) - } - #[doc = "Bit 2 - Write '1' to enable interrupt for event IN\\[2\\]"] - #[inline(always)] - pub fn in2(&self) -> IN2_R { - IN2_R::new(((self.bits >> 2) & 1) != 0) - } - #[doc = "Bit 3 - Write '1' to enable interrupt for event IN\\[3\\]"] - #[inline(always)] - pub fn in3(&self) -> IN3_R { - IN3_R::new(((self.bits >> 3) & 1) != 0) - } - #[doc = "Bit 4 - Write '1' to enable interrupt for event IN\\[4\\]"] - #[inline(always)] - pub fn in4(&self) -> IN4_R { - IN4_R::new(((self.bits >> 4) & 1) != 0) - } - #[doc = "Bit 5 - Write '1' to enable interrupt for event IN\\[5\\]"] - #[inline(always)] - pub fn in5(&self) -> IN5_R { - IN5_R::new(((self.bits >> 5) & 1) != 0) - } - #[doc = "Bit 6 - Write '1' to enable interrupt for event IN\\[6\\]"] - #[inline(always)] - pub fn in6(&self) -> IN6_R { - IN6_R::new(((self.bits >> 6) & 1) != 0) - } - #[doc = "Bit 7 - Write '1' to enable interrupt for event IN\\[7\\]"] - #[inline(always)] - pub fn in7(&self) -> IN7_R { - IN7_R::new(((self.bits >> 7) & 1) != 0) - } - #[doc = "Bit 31 - Write '1' to enable interrupt for event PORT"] - #[inline(always)] - pub fn port(&self) -> PORT_R { - PORT_R::new(((self.bits >> 31) & 1) != 0) - } -} -impl W { - #[doc = "Bit 0 - Write '1' to enable interrupt for event IN\\[0\\]"] - #[inline(always)] - #[must_use] - pub fn in0(&mut self) -> IN0_W<0> { - IN0_W::new(self) - } - #[doc = "Bit 1 - Write '1' to enable interrupt for event IN\\[1\\]"] - #[inline(always)] - #[must_use] - pub fn in1(&mut self) -> IN1_W<1> { - IN1_W::new(self) - } - #[doc = "Bit 2 - Write '1' to enable interrupt for event IN\\[2\\]"] - #[inline(always)] - #[must_use] - pub fn in2(&mut self) -> IN2_W<2> { - IN2_W::new(self) - } - #[doc = "Bit 3 - Write '1' to enable interrupt for event IN\\[3\\]"] - #[inline(always)] - #[must_use] - pub fn in3(&mut self) -> IN3_W<3> { - IN3_W::new(self) - } - #[doc = "Bit 4 - Write '1' to enable interrupt for event IN\\[4\\]"] - #[inline(always)] - #[must_use] - pub fn in4(&mut self) -> IN4_W<4> { - IN4_W::new(self) - } - #[doc = "Bit 5 - Write '1' to enable interrupt for event IN\\[5\\]"] - #[inline(always)] - #[must_use] - pub fn in5(&mut self) -> IN5_W<5> { - IN5_W::new(self) - } - #[doc = "Bit 6 - Write '1' to enable interrupt for event IN\\[6\\]"] - #[inline(always)] - #[must_use] - pub fn in6(&mut self) -> IN6_W<6> { - IN6_W::new(self) - } - #[doc = "Bit 7 - Write '1' to enable interrupt for event IN\\[7\\]"] - #[inline(always)] - #[must_use] - pub fn in7(&mut self) -> IN7_W<7> { - IN7_W::new(self) - } - #[doc = "Bit 31 - Write '1' to enable interrupt for event PORT"] - #[inline(always)] - #[must_use] - pub fn port(&mut self) -> PORT_W<31> { - PORT_W::new(self) - } - #[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 = "Enable interrupt\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 [intenset](index.html) module"] -pub struct INTENSET_SPEC; -impl crate::RegisterSpec for INTENSET_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [intenset::R](R) reader structure"] -impl crate::Readable for INTENSET_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [intenset::W](W) writer structure"] -impl crate::Writable for INTENSET_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets INTENSET to value 0"] -impl crate::Resettable for INTENSET_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/gpiote/tasks_clr.rs b/down-the-stack/dk_pac/src/gpiote/tasks_clr.rs deleted file mode 100644 index 6ee81d7..0000000 --- a/down-the-stack/dk_pac/src/gpiote/tasks_clr.rs +++ /dev/null @@ -1,72 +0,0 @@ -#[doc = "Register `TASKS_CLR[%s]` 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 = "Task for writing to pin specified in CONFIG\\[n\\].PSEL. Action on pin is to set it low.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum TASKS_CLR_AW { - #[doc = "1: Trigger task"] - TRIGGER = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: TASKS_CLR_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `TASKS_CLR` writer - Task for writing to pin specified in CONFIG\\[n\\].PSEL. Action on pin is to set it low."] -pub type TASKS_CLR_W<'a, const O: u8> = crate::BitWriter<'a, u32, TASKS_CLR_SPEC, TASKS_CLR_AW, O>; -impl<'a, const O: u8> TASKS_CLR_W<'a, O> { - #[doc = "Trigger task"] - #[inline(always)] - pub fn trigger(self) -> &'a mut W { - self.variant(TASKS_CLR_AW::TRIGGER) - } -} -impl W { - #[doc = "Bit 0 - Task for writing to pin specified in CONFIG\\[n\\].PSEL. Action on pin is to set it low."] - #[inline(always)] - #[must_use] - pub fn tasks_clr(&mut self) -> TASKS_CLR_W<0> { - TASKS_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 = "Description collection: Task for writing to pin specified in CONFIG\\[n\\].PSEL. Action on pin is to set it low.\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 [tasks_clr](index.html) module"] -pub struct TASKS_CLR_SPEC; -impl crate::RegisterSpec for TASKS_CLR_SPEC { - type Ux = u32; -} -#[doc = "`write(|w| ..)` method takes [tasks_clr::W](W) writer structure"] -impl crate::Writable for TASKS_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 TASKS_CLR[%s] -to value 0"] -impl crate::Resettable for TASKS_CLR_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/gpiote/tasks_out.rs b/down-the-stack/dk_pac/src/gpiote/tasks_out.rs deleted file mode 100644 index 5e48bdb..0000000 --- a/down-the-stack/dk_pac/src/gpiote/tasks_out.rs +++ /dev/null @@ -1,72 +0,0 @@ -#[doc = "Register `TASKS_OUT[%s]` 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 = "Task for writing to pin specified in CONFIG\\[n\\].PSEL. Action on pin is configured in CONFIG\\[n\\].POLARITY.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum TASKS_OUT_AW { - #[doc = "1: Trigger task"] - TRIGGER = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: TASKS_OUT_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `TASKS_OUT` writer - Task for writing to pin specified in CONFIG\\[n\\].PSEL. Action on pin is configured in CONFIG\\[n\\].POLARITY."] -pub type TASKS_OUT_W<'a, const O: u8> = crate::BitWriter<'a, u32, TASKS_OUT_SPEC, TASKS_OUT_AW, O>; -impl<'a, const O: u8> TASKS_OUT_W<'a, O> { - #[doc = "Trigger task"] - #[inline(always)] - pub fn trigger(self) -> &'a mut W { - self.variant(TASKS_OUT_AW::TRIGGER) - } -} -impl W { - #[doc = "Bit 0 - Task for writing to pin specified in CONFIG\\[n\\].PSEL. Action on pin is configured in CONFIG\\[n\\].POLARITY."] - #[inline(always)] - #[must_use] - pub fn tasks_out(&mut self) -> TASKS_OUT_W<0> { - TASKS_OUT_W::new(self) - } - #[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 = "Description collection: Task for writing to pin specified in CONFIG\\[n\\].PSEL. Action on pin is configured in CONFIG\\[n\\].POLARITY.\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 [tasks_out](index.html) module"] -pub struct TASKS_OUT_SPEC; -impl crate::RegisterSpec for TASKS_OUT_SPEC { - type Ux = u32; -} -#[doc = "`write(|w| ..)` method takes [tasks_out::W](W) writer structure"] -impl crate::Writable for TASKS_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 TASKS_OUT[%s] -to value 0"] -impl crate::Resettable for TASKS_OUT_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/gpiote/tasks_set.rs b/down-the-stack/dk_pac/src/gpiote/tasks_set.rs deleted file mode 100644 index efa95c6..0000000 --- a/down-the-stack/dk_pac/src/gpiote/tasks_set.rs +++ /dev/null @@ -1,72 +0,0 @@ -#[doc = "Register `TASKS_SET[%s]` 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 = "Task for writing to pin specified in CONFIG\\[n\\].PSEL. Action on pin is to set it high.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum TASKS_SET_AW { - #[doc = "1: Trigger task"] - TRIGGER = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: TASKS_SET_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `TASKS_SET` writer - Task for writing to pin specified in CONFIG\\[n\\].PSEL. Action on pin is to set it high."] -pub type TASKS_SET_W<'a, const O: u8> = crate::BitWriter<'a, u32, TASKS_SET_SPEC, TASKS_SET_AW, O>; -impl<'a, const O: u8> TASKS_SET_W<'a, O> { - #[doc = "Trigger task"] - #[inline(always)] - pub fn trigger(self) -> &'a mut W { - self.variant(TASKS_SET_AW::TRIGGER) - } -} -impl W { - #[doc = "Bit 0 - Task for writing to pin specified in CONFIG\\[n\\].PSEL. Action on pin is to set it high."] - #[inline(always)] - #[must_use] - pub fn tasks_set(&mut self) -> TASKS_SET_W<0> { - TASKS_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 - } -} -#[doc = "Description collection: Task for writing to pin specified in CONFIG\\[n\\].PSEL. Action on pin is to set it high.\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 [tasks_set](index.html) module"] -pub struct TASKS_SET_SPEC; -impl crate::RegisterSpec for TASKS_SET_SPEC { - type Ux = u32; -} -#[doc = "`write(|w| ..)` method takes [tasks_set::W](W) writer structure"] -impl crate::Writable for TASKS_SET_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets TASKS_SET[%s] -to value 0"] -impl crate::Resettable for TASKS_SET_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/i2s.rs b/down-the-stack/dk_pac/src/i2s.rs deleted file mode 100644 index b970aa6..0000000 --- a/down-the-stack/dk_pac/src/i2s.rs +++ /dev/null @@ -1,101 +0,0 @@ -#[doc = r"Register block"] -#[repr(C)] -pub struct RegisterBlock { - #[doc = "0x00 - Starts continuous I2S transfer. Also starts MCK generator when this is enabled."] - pub tasks_start: TASKS_START, - #[doc = "0x04 - Stops I2S transfer. Also stops MCK generator. Triggering this task will cause the {event:STOPPED} event to be generated."] - pub tasks_stop: TASKS_STOP, - _reserved2: [u8; 0xfc], - #[doc = "0x104 - The RXD.PTR register has been copied to internal double-buffers. When the I2S module is started and RX is enabled, this event will be generated for every RXTXD.MAXCNT words that are received on the SDIN pin."] - pub events_rxptrupd: EVENTS_RXPTRUPD, - #[doc = "0x108 - I2S transfer stopped."] - pub events_stopped: EVENTS_STOPPED, - _reserved4: [u8; 0x08], - #[doc = "0x114 - The TDX.PTR register has been copied to internal double-buffers. When the I2S module is started and TX is enabled, this event will be generated for every RXTXD.MAXCNT words that are sent on the SDOUT pin."] - pub events_txptrupd: EVENTS_TXPTRUPD, - _reserved5: [u8; 0x01e8], - #[doc = "0x300 - Enable or disable interrupt"] - pub inten: INTEN, - #[doc = "0x304 - Enable interrupt"] - pub intenset: INTENSET, - #[doc = "0x308 - Disable interrupt"] - pub intenclr: INTENCLR, - _reserved8: [u8; 0x01f4], - #[doc = "0x500 - Enable I2S module."] - pub enable: ENABLE, - #[doc = "0x504..0x52c - Unspecified"] - pub config: CONFIG, - _reserved10: [u8; 0x0c], - #[doc = "0x538 - Unspecified"] - pub rxd: RXD, - _reserved11: [u8; 0x04], - #[doc = "0x540 - Unspecified"] - pub txd: TXD, - _reserved12: [u8; 0x0c], - #[doc = "0x550 - Unspecified"] - pub rxtxd: RXTXD, - _reserved13: [u8; 0x0c], - #[doc = "0x560..0x574 - Unspecified"] - pub psel: PSEL, -} -#[doc = "TASKS_START (w) register accessor: an alias for `Reg`"] -pub type TASKS_START = crate::Reg; -#[doc = "Starts continuous I2S transfer. Also starts MCK generator when this is enabled."] -pub mod tasks_start; -#[doc = "TASKS_STOP (w) register accessor: an alias for `Reg`"] -pub type TASKS_STOP = crate::Reg; -#[doc = "Stops I2S transfer. Also stops MCK generator. Triggering this task will cause the {event:STOPPED} event to be generated."] -pub mod tasks_stop; -#[doc = "EVENTS_RXPTRUPD (rw) register accessor: an alias for `Reg`"] -pub type EVENTS_RXPTRUPD = crate::Reg; -#[doc = "The RXD.PTR register has been copied to internal double-buffers. When the I2S module is started and RX is enabled, this event will be generated for every RXTXD.MAXCNT words that are received on the SDIN pin."] -pub mod events_rxptrupd; -#[doc = "EVENTS_STOPPED (rw) register accessor: an alias for `Reg`"] -pub type EVENTS_STOPPED = crate::Reg; -#[doc = "I2S transfer stopped."] -pub mod events_stopped; -#[doc = "EVENTS_TXPTRUPD (rw) register accessor: an alias for `Reg`"] -pub type EVENTS_TXPTRUPD = crate::Reg; -#[doc = "The TDX.PTR register has been copied to internal double-buffers. When the I2S module is started and TX is enabled, this event will be generated for every RXTXD.MAXCNT words that are sent on the SDOUT pin."] -pub mod events_txptrupd; -#[doc = "INTEN (rw) register accessor: an alias for `Reg`"] -pub type INTEN = crate::Reg; -#[doc = "Enable or disable interrupt"] -pub mod inten; -#[doc = "INTENSET (rw) register accessor: an alias for `Reg`"] -pub type INTENSET = crate::Reg; -#[doc = "Enable interrupt"] -pub mod intenset; -#[doc = "INTENCLR (rw) register accessor: an alias for `Reg`"] -pub type INTENCLR = crate::Reg; -#[doc = "Disable interrupt"] -pub mod intenclr; -#[doc = "ENABLE (rw) register accessor: an alias for `Reg`"] -pub type ENABLE = crate::Reg; -#[doc = "Enable I2S module."] -pub mod enable; -#[doc = "Unspecified"] -pub use self::config::CONFIG; -#[doc = r"Cluster"] -#[doc = "Unspecified"] -pub mod config; -#[doc = "Unspecified"] -pub use self::rxd::RXD; -#[doc = r"Cluster"] -#[doc = "Unspecified"] -pub mod rxd; -#[doc = "Unspecified"] -pub use self::txd::TXD; -#[doc = r"Cluster"] -#[doc = "Unspecified"] -pub mod txd; -#[doc = "Unspecified"] -pub use self::rxtxd::RXTXD; -#[doc = r"Cluster"] -#[doc = "Unspecified"] -pub mod rxtxd; -#[doc = "Unspecified"] -pub use self::psel::PSEL; -#[doc = r"Cluster"] -#[doc = "Unspecified"] -pub mod psel; diff --git a/down-the-stack/dk_pac/src/i2s/config.rs b/down-the-stack/dk_pac/src/i2s/config.rs deleted file mode 100644 index 38d9d51..0000000 --- a/down-the-stack/dk_pac/src/i2s/config.rs +++ /dev/null @@ -1,64 +0,0 @@ -#[doc = r"Register block"] -#[repr(C)] -pub struct CONFIG { - #[doc = "0x00 - I2S mode."] - pub mode: MODE, - #[doc = "0x04 - Reception (RX) enable."] - pub rxen: RXEN, - #[doc = "0x08 - Transmission (TX) enable."] - pub txen: TXEN, - #[doc = "0x0c - Master clock generator enable."] - pub mcken: MCKEN, - #[doc = "0x10 - Master clock generator frequency."] - pub mckfreq: MCKFREQ, - #[doc = "0x14 - MCK / LRCK ratio."] - pub ratio: RATIO, - #[doc = "0x18 - Sample width."] - pub swidth: SWIDTH, - #[doc = "0x1c - Alignment of sample within a frame."] - pub align: ALIGN, - #[doc = "0x20 - Frame format."] - pub format: FORMAT, - #[doc = "0x24 - Enable channels."] - pub channels: CHANNELS, -} -#[doc = "MODE (rw) register accessor: an alias for `Reg`"] -pub type MODE = crate::Reg; -#[doc = "I2S mode."] -pub mod mode; -#[doc = "RXEN (rw) register accessor: an alias for `Reg`"] -pub type RXEN = crate::Reg; -#[doc = "Reception (RX) enable."] -pub mod rxen; -#[doc = "TXEN (rw) register accessor: an alias for `Reg`"] -pub type TXEN = crate::Reg; -#[doc = "Transmission (TX) enable."] -pub mod txen; -#[doc = "MCKEN (rw) register accessor: an alias for `Reg`"] -pub type MCKEN = crate::Reg; -#[doc = "Master clock generator enable."] -pub mod mcken; -#[doc = "MCKFREQ (rw) register accessor: an alias for `Reg`"] -pub type MCKFREQ = crate::Reg; -#[doc = "Master clock generator frequency."] -pub mod mckfreq; -#[doc = "RATIO (rw) register accessor: an alias for `Reg`"] -pub type RATIO = crate::Reg; -#[doc = "MCK / LRCK ratio."] -pub mod ratio; -#[doc = "SWIDTH (rw) register accessor: an alias for `Reg`"] -pub type SWIDTH = crate::Reg; -#[doc = "Sample width."] -pub mod swidth; -#[doc = "ALIGN (rw) register accessor: an alias for `Reg`"] -pub type ALIGN = crate::Reg; -#[doc = "Alignment of sample within a frame."] -pub mod align; -#[doc = "FORMAT (rw) register accessor: an alias for `Reg`"] -pub type FORMAT = crate::Reg; -#[doc = "Frame format."] -pub mod format; -#[doc = "CHANNELS (rw) register accessor: an alias for `Reg`"] -pub type CHANNELS = crate::Reg; -#[doc = "Enable channels."] -pub mod channels; diff --git a/down-the-stack/dk_pac/src/i2s/config/align.rs b/down-the-stack/dk_pac/src/i2s/config/align.rs deleted file mode 100644 index e383d5b..0000000 --- a/down-the-stack/dk_pac/src/i2s/config/align.rs +++ /dev/null @@ -1,126 +0,0 @@ -#[doc = "Register `ALIGN` 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 `ALIGN` 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 `ALIGN` reader - Alignment of sample within a frame."] -pub type ALIGN_R = crate::BitReader; -#[doc = "Alignment of sample within a frame.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum ALIGN_A { - #[doc = "0: Left-aligned."] - LEFT = 0, - #[doc = "1: Right-aligned."] - RIGHT = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: ALIGN_A) -> Self { - variant as u8 != 0 - } -} -impl ALIGN_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> ALIGN_A { - match self.bits { - false => ALIGN_A::LEFT, - true => ALIGN_A::RIGHT, - } - } - #[doc = "Checks if the value of the field is `LEFT`"] - #[inline(always)] - pub fn is_left(&self) -> bool { - *self == ALIGN_A::LEFT - } - #[doc = "Checks if the value of the field is `RIGHT`"] - #[inline(always)] - pub fn is_right(&self) -> bool { - *self == ALIGN_A::RIGHT - } -} -#[doc = "Field `ALIGN` writer - Alignment of sample within a frame."] -pub type ALIGN_W<'a, const O: u8> = crate::BitWriter<'a, u32, ALIGN_SPEC, ALIGN_A, O>; -impl<'a, const O: u8> ALIGN_W<'a, O> { - #[doc = "Left-aligned."] - #[inline(always)] - pub fn left(self) -> &'a mut W { - self.variant(ALIGN_A::LEFT) - } - #[doc = "Right-aligned."] - #[inline(always)] - pub fn right(self) -> &'a mut W { - self.variant(ALIGN_A::RIGHT) - } -} -impl R { - #[doc = "Bit 0 - Alignment of sample within a frame."] - #[inline(always)] - pub fn align(&self) -> ALIGN_R { - ALIGN_R::new((self.bits & 1) != 0) - } -} -impl W { - #[doc = "Bit 0 - Alignment of sample within a frame."] - #[inline(always)] - #[must_use] - pub fn align(&mut self) -> ALIGN_W<0> { - ALIGN_W::new(self) - } - #[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 = "Alignment of sample within a frame.\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 [align](index.html) module"] -pub struct ALIGN_SPEC; -impl crate::RegisterSpec for ALIGN_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [align::R](R) reader structure"] -impl crate::Readable for ALIGN_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [align::W](W) writer structure"] -impl crate::Writable for ALIGN_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets ALIGN to value 0"] -impl crate::Resettable for ALIGN_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/i2s/config/channels.rs b/down-the-stack/dk_pac/src/i2s/config/channels.rs deleted file mode 100644 index f52ecba..0000000 --- a/down-the-stack/dk_pac/src/i2s/config/channels.rs +++ /dev/null @@ -1,142 +0,0 @@ -#[doc = "Register `CHANNELS` 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 `CHANNELS` 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 `CHANNELS` reader - Enable channels."] -pub type CHANNELS_R = crate::FieldReader; -#[doc = "Enable channels.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -#[repr(u8)] -pub enum CHANNELS_A { - #[doc = "0: Stereo."] - STEREO = 0, - #[doc = "1: Left only."] - LEFT = 1, - #[doc = "2: Right only."] - RIGHT = 2, -} -impl From for u8 { - #[inline(always)] - fn from(variant: CHANNELS_A) -> Self { - variant as _ - } -} -impl CHANNELS_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> Option { - match self.bits { - 0 => Some(CHANNELS_A::STEREO), - 1 => Some(CHANNELS_A::LEFT), - 2 => Some(CHANNELS_A::RIGHT), - _ => None, - } - } - #[doc = "Checks if the value of the field is `STEREO`"] - #[inline(always)] - pub fn is_stereo(&self) -> bool { - *self == CHANNELS_A::STEREO - } - #[doc = "Checks if the value of the field is `LEFT`"] - #[inline(always)] - pub fn is_left(&self) -> bool { - *self == CHANNELS_A::LEFT - } - #[doc = "Checks if the value of the field is `RIGHT`"] - #[inline(always)] - pub fn is_right(&self) -> bool { - *self == CHANNELS_A::RIGHT - } -} -#[doc = "Field `CHANNELS` writer - Enable channels."] -pub type CHANNELS_W<'a, const O: u8> = - crate::FieldWriter<'a, u32, CHANNELS_SPEC, u8, CHANNELS_A, 2, O>; -impl<'a, const O: u8> CHANNELS_W<'a, O> { - #[doc = "Stereo."] - #[inline(always)] - pub fn stereo(self) -> &'a mut W { - self.variant(CHANNELS_A::STEREO) - } - #[doc = "Left only."] - #[inline(always)] - pub fn left(self) -> &'a mut W { - self.variant(CHANNELS_A::LEFT) - } - #[doc = "Right only."] - #[inline(always)] - pub fn right(self) -> &'a mut W { - self.variant(CHANNELS_A::RIGHT) - } -} -impl R { - #[doc = "Bits 0:1 - Enable channels."] - #[inline(always)] - pub fn channels(&self) -> CHANNELS_R { - CHANNELS_R::new((self.bits & 3) as u8) - } -} -impl W { - #[doc = "Bits 0:1 - Enable channels."] - #[inline(always)] - #[must_use] - pub fn channels(&mut self) -> CHANNELS_W<0> { - CHANNELS_W::new(self) - } - #[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 = "Enable channels.\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 [channels](index.html) module"] -pub struct CHANNELS_SPEC; -impl crate::RegisterSpec for CHANNELS_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [channels::R](R) reader structure"] -impl crate::Readable for CHANNELS_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [channels::W](W) writer structure"] -impl crate::Writable for CHANNELS_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets CHANNELS to value 0"] -impl crate::Resettable for CHANNELS_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/i2s/config/format.rs b/down-the-stack/dk_pac/src/i2s/config/format.rs deleted file mode 100644 index 5e1bf8d..0000000 --- a/down-the-stack/dk_pac/src/i2s/config/format.rs +++ /dev/null @@ -1,126 +0,0 @@ -#[doc = "Register `FORMAT` 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 `FORMAT` 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 `FORMAT` reader - Frame format."] -pub type FORMAT_R = crate::BitReader; -#[doc = "Frame format.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum FORMAT_A { - #[doc = "0: Original I2S format."] - I2S = 0, - #[doc = "1: Alternate (left- or right-aligned) format."] - ALIGNED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: FORMAT_A) -> Self { - variant as u8 != 0 - } -} -impl FORMAT_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> FORMAT_A { - match self.bits { - false => FORMAT_A::I2S, - true => FORMAT_A::ALIGNED, - } - } - #[doc = "Checks if the value of the field is `I2S`"] - #[inline(always)] - pub fn is_i2s(&self) -> bool { - *self == FORMAT_A::I2S - } - #[doc = "Checks if the value of the field is `ALIGNED`"] - #[inline(always)] - pub fn is_aligned(&self) -> bool { - *self == FORMAT_A::ALIGNED - } -} -#[doc = "Field `FORMAT` writer - Frame format."] -pub type FORMAT_W<'a, const O: u8> = crate::BitWriter<'a, u32, FORMAT_SPEC, FORMAT_A, O>; -impl<'a, const O: u8> FORMAT_W<'a, O> { - #[doc = "Original I2S format."] - #[inline(always)] - pub fn i2s(self) -> &'a mut W { - self.variant(FORMAT_A::I2S) - } - #[doc = "Alternate (left- or right-aligned) format."] - #[inline(always)] - pub fn aligned(self) -> &'a mut W { - self.variant(FORMAT_A::ALIGNED) - } -} -impl R { - #[doc = "Bit 0 - Frame format."] - #[inline(always)] - pub fn format(&self) -> FORMAT_R { - FORMAT_R::new((self.bits & 1) != 0) - } -} -impl W { - #[doc = "Bit 0 - Frame format."] - #[inline(always)] - #[must_use] - pub fn format(&mut self) -> FORMAT_W<0> { - 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 - } -} -#[doc = "Frame format.\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 [format](index.html) module"] -pub struct FORMAT_SPEC; -impl crate::RegisterSpec for FORMAT_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [format::R](R) reader structure"] -impl crate::Readable for FORMAT_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [format::W](W) writer structure"] -impl crate::Writable for FORMAT_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets FORMAT to value 0"] -impl crate::Resettable for FORMAT_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/i2s/config/mcken.rs b/down-the-stack/dk_pac/src/i2s/config/mcken.rs deleted file mode 100644 index ee72a0c..0000000 --- a/down-the-stack/dk_pac/src/i2s/config/mcken.rs +++ /dev/null @@ -1,126 +0,0 @@ -#[doc = "Register `MCKEN` 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 `MCKEN` 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 `MCKEN` reader - Master clock generator enable."] -pub type MCKEN_R = crate::BitReader; -#[doc = "Master clock generator enable.\n\nValue on reset: 1"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum MCKEN_A { - #[doc = "0: Master clock generator disabled and PSEL.MCK not connected(available as GPIO)."] - DISABLED = 0, - #[doc = "1: Master clock generator running and MCK output on PSEL.MCK."] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: MCKEN_A) -> Self { - variant as u8 != 0 - } -} -impl MCKEN_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> MCKEN_A { - match self.bits { - false => MCKEN_A::DISABLED, - true => MCKEN_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == MCKEN_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == MCKEN_A::ENABLED - } -} -#[doc = "Field `MCKEN` writer - Master clock generator enable."] -pub type MCKEN_W<'a, const O: u8> = crate::BitWriter<'a, u32, MCKEN_SPEC, MCKEN_A, O>; -impl<'a, const O: u8> MCKEN_W<'a, O> { - #[doc = "Master clock generator disabled and PSEL.MCK not connected(available as GPIO)."] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(MCKEN_A::DISABLED) - } - #[doc = "Master clock generator running and MCK output on PSEL.MCK."] - #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(MCKEN_A::ENABLED) - } -} -impl R { - #[doc = "Bit 0 - Master clock generator enable."] - #[inline(always)] - pub fn mcken(&self) -> MCKEN_R { - MCKEN_R::new((self.bits & 1) != 0) - } -} -impl W { - #[doc = "Bit 0 - Master clock generator enable."] - #[inline(always)] - #[must_use] - pub fn mcken(&mut self) -> MCKEN_W<0> { - MCKEN_W::new(self) - } - #[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 = "Master clock generator enable.\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 [mcken](index.html) module"] -pub struct MCKEN_SPEC; -impl crate::RegisterSpec for MCKEN_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [mcken::R](R) reader structure"] -impl crate::Readable for MCKEN_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [mcken::W](W) writer structure"] -impl crate::Writable for MCKEN_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets MCKEN to value 0x01"] -impl crate::Resettable for MCKEN_SPEC { - const RESET_VALUE: Self::Ux = 0x01; -} diff --git a/down-the-stack/dk_pac/src/i2s/config/mckfreq.rs b/down-the-stack/dk_pac/src/i2s/config/mckfreq.rs deleted file mode 100644 index 9809e57..0000000 --- a/down-the-stack/dk_pac/src/i2s/config/mckfreq.rs +++ /dev/null @@ -1,337 +0,0 @@ -#[doc = "Register `MCKFREQ` 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 `MCKFREQ` 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 `MCKFREQ` reader - Master clock generator frequency."] -pub type MCKFREQ_R = crate::FieldReader; -#[doc = "Master clock generator frequency.\n\nValue on reset: 536870912"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -#[repr(u32)] -pub enum MCKFREQ_A { - #[doc = "2147483648: 32 MHz / 2 = 16.0 MHz"] - _32MDIV2 = 2147483648, - #[doc = "1342177280: 32 MHz / 3 = 10.6666667 MHz"] - _32MDIV3 = 1342177280, - #[doc = "1073741824: 32 MHz / 4 = 8.0 MHz"] - _32MDIV4 = 1073741824, - #[doc = "805306368: 32 MHz / 5 = 6.4 MHz"] - _32MDIV5 = 805306368, - #[doc = "671088640: 32 MHz / 6 = 5.3333333 MHz"] - _32MDIV6 = 671088640, - #[doc = "536870912: 32 MHz / 8 = 4.0 MHz"] - _32MDIV8 = 536870912, - #[doc = "402653184: 32 MHz / 10 = 3.2 MHz"] - _32MDIV10 = 402653184, - #[doc = "369098752: 32 MHz / 11 = 2.9090909 MHz"] - _32MDIV11 = 369098752, - #[doc = "285212672: 32 MHz / 15 = 2.1333333 MHz"] - _32MDIV15 = 285212672, - #[doc = "268435456: 32 MHz / 16 = 2.0 MHz"] - _32MDIV16 = 268435456, - #[doc = "201326592: 32 MHz / 21 = 1.5238095"] - _32MDIV21 = 201326592, - #[doc = "184549376: 32 MHz / 23 = 1.3913043 MHz"] - _32MDIV23 = 184549376, - #[doc = "142606336: 32 MHz / 30 = 1.0666667 MHz"] - _32MDIV30 = 142606336, - #[doc = "138412032: 32 MHz / 31 = 1.0322581 MHz"] - _32MDIV31 = 138412032, - #[doc = "134217728: 32 MHz / 32 = 1.0 MHz"] - _32MDIV32 = 134217728, - #[doc = "100663296: 32 MHz / 42 = 0.7619048 MHz"] - _32MDIV42 = 100663296, - #[doc = "68157440: 32 MHz / 63 = 0.5079365 MHz"] - _32MDIV63 = 68157440, - #[doc = "34340864: 32 MHz / 125 = 0.256 MHz"] - _32MDIV125 = 34340864, -} -impl From for u32 { - #[inline(always)] - fn from(variant: MCKFREQ_A) -> Self { - variant as _ - } -} -impl MCKFREQ_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> Option { - match self.bits { - 2147483648 => Some(MCKFREQ_A::_32MDIV2), - 1342177280 => Some(MCKFREQ_A::_32MDIV3), - 1073741824 => Some(MCKFREQ_A::_32MDIV4), - 805306368 => Some(MCKFREQ_A::_32MDIV5), - 671088640 => Some(MCKFREQ_A::_32MDIV6), - 536870912 => Some(MCKFREQ_A::_32MDIV8), - 402653184 => Some(MCKFREQ_A::_32MDIV10), - 369098752 => Some(MCKFREQ_A::_32MDIV11), - 285212672 => Some(MCKFREQ_A::_32MDIV15), - 268435456 => Some(MCKFREQ_A::_32MDIV16), - 201326592 => Some(MCKFREQ_A::_32MDIV21), - 184549376 => Some(MCKFREQ_A::_32MDIV23), - 142606336 => Some(MCKFREQ_A::_32MDIV30), - 138412032 => Some(MCKFREQ_A::_32MDIV31), - 134217728 => Some(MCKFREQ_A::_32MDIV32), - 100663296 => Some(MCKFREQ_A::_32MDIV42), - 68157440 => Some(MCKFREQ_A::_32MDIV63), - 34340864 => Some(MCKFREQ_A::_32MDIV125), - _ => None, - } - } - #[doc = "Checks if the value of the field is `_32MDIV2`"] - #[inline(always)] - pub fn is_32mdiv2(&self) -> bool { - *self == MCKFREQ_A::_32MDIV2 - } - #[doc = "Checks if the value of the field is `_32MDIV3`"] - #[inline(always)] - pub fn is_32mdiv3(&self) -> bool { - *self == MCKFREQ_A::_32MDIV3 - } - #[doc = "Checks if the value of the field is `_32MDIV4`"] - #[inline(always)] - pub fn is_32mdiv4(&self) -> bool { - *self == MCKFREQ_A::_32MDIV4 - } - #[doc = "Checks if the value of the field is `_32MDIV5`"] - #[inline(always)] - pub fn is_32mdiv5(&self) -> bool { - *self == MCKFREQ_A::_32MDIV5 - } - #[doc = "Checks if the value of the field is `_32MDIV6`"] - #[inline(always)] - pub fn is_32mdiv6(&self) -> bool { - *self == MCKFREQ_A::_32MDIV6 - } - #[doc = "Checks if the value of the field is `_32MDIV8`"] - #[inline(always)] - pub fn is_32mdiv8(&self) -> bool { - *self == MCKFREQ_A::_32MDIV8 - } - #[doc = "Checks if the value of the field is `_32MDIV10`"] - #[inline(always)] - pub fn is_32mdiv10(&self) -> bool { - *self == MCKFREQ_A::_32MDIV10 - } - #[doc = "Checks if the value of the field is `_32MDIV11`"] - #[inline(always)] - pub fn is_32mdiv11(&self) -> bool { - *self == MCKFREQ_A::_32MDIV11 - } - #[doc = "Checks if the value of the field is `_32MDIV15`"] - #[inline(always)] - pub fn is_32mdiv15(&self) -> bool { - *self == MCKFREQ_A::_32MDIV15 - } - #[doc = "Checks if the value of the field is `_32MDIV16`"] - #[inline(always)] - pub fn is_32mdiv16(&self) -> bool { - *self == MCKFREQ_A::_32MDIV16 - } - #[doc = "Checks if the value of the field is `_32MDIV21`"] - #[inline(always)] - pub fn is_32mdiv21(&self) -> bool { - *self == MCKFREQ_A::_32MDIV21 - } - #[doc = "Checks if the value of the field is `_32MDIV23`"] - #[inline(always)] - pub fn is_32mdiv23(&self) -> bool { - *self == MCKFREQ_A::_32MDIV23 - } - #[doc = "Checks if the value of the field is `_32MDIV30`"] - #[inline(always)] - pub fn is_32mdiv30(&self) -> bool { - *self == MCKFREQ_A::_32MDIV30 - } - #[doc = "Checks if the value of the field is `_32MDIV31`"] - #[inline(always)] - pub fn is_32mdiv31(&self) -> bool { - *self == MCKFREQ_A::_32MDIV31 - } - #[doc = "Checks if the value of the field is `_32MDIV32`"] - #[inline(always)] - pub fn is_32mdiv32(&self) -> bool { - *self == MCKFREQ_A::_32MDIV32 - } - #[doc = "Checks if the value of the field is `_32MDIV42`"] - #[inline(always)] - pub fn is_32mdiv42(&self) -> bool { - *self == MCKFREQ_A::_32MDIV42 - } - #[doc = "Checks if the value of the field is `_32MDIV63`"] - #[inline(always)] - pub fn is_32mdiv63(&self) -> bool { - *self == MCKFREQ_A::_32MDIV63 - } - #[doc = "Checks if the value of the field is `_32MDIV125`"] - #[inline(always)] - pub fn is_32mdiv125(&self) -> bool { - *self == MCKFREQ_A::_32MDIV125 - } -} -#[doc = "Field `MCKFREQ` writer - Master clock generator frequency."] -pub type MCKFREQ_W<'a, const O: u8> = - crate::FieldWriter<'a, u32, MCKFREQ_SPEC, u32, MCKFREQ_A, 32, O>; -impl<'a, const O: u8> MCKFREQ_W<'a, O> { - #[doc = "32 MHz / 2 = 16.0 MHz"] - #[inline(always)] - pub fn _32mdiv2(self) -> &'a mut W { - self.variant(MCKFREQ_A::_32MDIV2) - } - #[doc = "32 MHz / 3 = 10.6666667 MHz"] - #[inline(always)] - pub fn _32mdiv3(self) -> &'a mut W { - self.variant(MCKFREQ_A::_32MDIV3) - } - #[doc = "32 MHz / 4 = 8.0 MHz"] - #[inline(always)] - pub fn _32mdiv4(self) -> &'a mut W { - self.variant(MCKFREQ_A::_32MDIV4) - } - #[doc = "32 MHz / 5 = 6.4 MHz"] - #[inline(always)] - pub fn _32mdiv5(self) -> &'a mut W { - self.variant(MCKFREQ_A::_32MDIV5) - } - #[doc = "32 MHz / 6 = 5.3333333 MHz"] - #[inline(always)] - pub fn _32mdiv6(self) -> &'a mut W { - self.variant(MCKFREQ_A::_32MDIV6) - } - #[doc = "32 MHz / 8 = 4.0 MHz"] - #[inline(always)] - pub fn _32mdiv8(self) -> &'a mut W { - self.variant(MCKFREQ_A::_32MDIV8) - } - #[doc = "32 MHz / 10 = 3.2 MHz"] - #[inline(always)] - pub fn _32mdiv10(self) -> &'a mut W { - self.variant(MCKFREQ_A::_32MDIV10) - } - #[doc = "32 MHz / 11 = 2.9090909 MHz"] - #[inline(always)] - pub fn _32mdiv11(self) -> &'a mut W { - self.variant(MCKFREQ_A::_32MDIV11) - } - #[doc = "32 MHz / 15 = 2.1333333 MHz"] - #[inline(always)] - pub fn _32mdiv15(self) -> &'a mut W { - self.variant(MCKFREQ_A::_32MDIV15) - } - #[doc = "32 MHz / 16 = 2.0 MHz"] - #[inline(always)] - pub fn _32mdiv16(self) -> &'a mut W { - self.variant(MCKFREQ_A::_32MDIV16) - } - #[doc = "32 MHz / 21 = 1.5238095"] - #[inline(always)] - pub fn _32mdiv21(self) -> &'a mut W { - self.variant(MCKFREQ_A::_32MDIV21) - } - #[doc = "32 MHz / 23 = 1.3913043 MHz"] - #[inline(always)] - pub fn _32mdiv23(self) -> &'a mut W { - self.variant(MCKFREQ_A::_32MDIV23) - } - #[doc = "32 MHz / 30 = 1.0666667 MHz"] - #[inline(always)] - pub fn _32mdiv30(self) -> &'a mut W { - self.variant(MCKFREQ_A::_32MDIV30) - } - #[doc = "32 MHz / 31 = 1.0322581 MHz"] - #[inline(always)] - pub fn _32mdiv31(self) -> &'a mut W { - self.variant(MCKFREQ_A::_32MDIV31) - } - #[doc = "32 MHz / 32 = 1.0 MHz"] - #[inline(always)] - pub fn _32mdiv32(self) -> &'a mut W { - self.variant(MCKFREQ_A::_32MDIV32) - } - #[doc = "32 MHz / 42 = 0.7619048 MHz"] - #[inline(always)] - pub fn _32mdiv42(self) -> &'a mut W { - self.variant(MCKFREQ_A::_32MDIV42) - } - #[doc = "32 MHz / 63 = 0.5079365 MHz"] - #[inline(always)] - pub fn _32mdiv63(self) -> &'a mut W { - self.variant(MCKFREQ_A::_32MDIV63) - } - #[doc = "32 MHz / 125 = 0.256 MHz"] - #[inline(always)] - pub fn _32mdiv125(self) -> &'a mut W { - self.variant(MCKFREQ_A::_32MDIV125) - } -} -impl R { - #[doc = "Bits 0:31 - Master clock generator frequency."] - #[inline(always)] - pub fn mckfreq(&self) -> MCKFREQ_R { - MCKFREQ_R::new(self.bits) - } -} -impl W { - #[doc = "Bits 0:31 - Master clock generator frequency."] - #[inline(always)] - #[must_use] - pub fn mckfreq(&mut self) -> MCKFREQ_W<0> { - MCKFREQ_W::new(self) - } - #[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 = "Master clock generator frequency.\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 [mckfreq](index.html) module"] -pub struct MCKFREQ_SPEC; -impl crate::RegisterSpec for MCKFREQ_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [mckfreq::R](R) reader structure"] -impl crate::Readable for MCKFREQ_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [mckfreq::W](W) writer structure"] -impl crate::Writable for MCKFREQ_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets MCKFREQ to value 0x2000_0000"] -impl crate::Resettable for MCKFREQ_SPEC { - const RESET_VALUE: Self::Ux = 0x2000_0000; -} diff --git a/down-the-stack/dk_pac/src/i2s/config/mode.rs b/down-the-stack/dk_pac/src/i2s/config/mode.rs deleted file mode 100644 index 39a92e0..0000000 --- a/down-the-stack/dk_pac/src/i2s/config/mode.rs +++ /dev/null @@ -1,126 +0,0 @@ -#[doc = "Register `MODE` 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 `MODE` 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 `MODE` reader - I2S mode."] -pub type MODE_R = crate::BitReader; -#[doc = "I2S mode.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum MODE_A { - #[doc = "0: Master mode. SCK and LRCK generated from internal master clcok (MCK) and output on pins defined by PSEL.xxx."] - MASTER = 0, - #[doc = "1: Slave mode. SCK and LRCK generated by external master and received on pins defined by PSEL.xxx"] - SLAVE = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: MODE_A) -> Self { - variant as u8 != 0 - } -} -impl MODE_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> MODE_A { - match self.bits { - false => MODE_A::MASTER, - true => MODE_A::SLAVE, - } - } - #[doc = "Checks if the value of the field is `MASTER`"] - #[inline(always)] - pub fn is_master(&self) -> bool { - *self == MODE_A::MASTER - } - #[doc = "Checks if the value of the field is `SLAVE`"] - #[inline(always)] - pub fn is_slave(&self) -> bool { - *self == MODE_A::SLAVE - } -} -#[doc = "Field `MODE` writer - I2S mode."] -pub type MODE_W<'a, const O: u8> = crate::BitWriter<'a, u32, MODE_SPEC, MODE_A, O>; -impl<'a, const O: u8> MODE_W<'a, O> { - #[doc = "Master mode. SCK and LRCK generated from internal master clcok (MCK) and output on pins defined by PSEL.xxx."] - #[inline(always)] - pub fn master(self) -> &'a mut W { - self.variant(MODE_A::MASTER) - } - #[doc = "Slave mode. SCK and LRCK generated by external master and received on pins defined by PSEL.xxx"] - #[inline(always)] - pub fn slave(self) -> &'a mut W { - self.variant(MODE_A::SLAVE) - } -} -impl R { - #[doc = "Bit 0 - I2S mode."] - #[inline(always)] - pub fn mode(&self) -> MODE_R { - MODE_R::new((self.bits & 1) != 0) - } -} -impl W { - #[doc = "Bit 0 - I2S mode."] - #[inline(always)] - #[must_use] - pub fn mode(&mut self) -> MODE_W<0> { - 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 - } -} -#[doc = "I2S mode.\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 [mode](index.html) module"] -pub struct MODE_SPEC; -impl crate::RegisterSpec for MODE_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [mode::R](R) reader structure"] -impl crate::Readable for MODE_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [mode::W](W) writer structure"] -impl crate::Writable for 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 MODE to value 0"] -impl crate::Resettable for MODE_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/i2s/config/ratio.rs b/down-the-stack/dk_pac/src/i2s/config/ratio.rs deleted file mode 100644 index ccd97bd..0000000 --- a/down-the-stack/dk_pac/src/i2s/config/ratio.rs +++ /dev/null @@ -1,219 +0,0 @@ -#[doc = "Register `RATIO` 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 `RATIO` 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 `RATIO` reader - MCK / LRCK ratio."] -pub type RATIO_R = crate::FieldReader; -#[doc = "MCK / LRCK ratio.\n\nValue on reset: 6"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -#[repr(u8)] -pub enum RATIO_A { - #[doc = "0: LRCK = MCK / 32"] - _32X = 0, - #[doc = "1: LRCK = MCK / 48"] - _48X = 1, - #[doc = "2: LRCK = MCK / 64"] - _64X = 2, - #[doc = "3: LRCK = MCK / 96"] - _96X = 3, - #[doc = "4: LRCK = MCK / 128"] - _128X = 4, - #[doc = "5: LRCK = MCK / 192"] - _192X = 5, - #[doc = "6: LRCK = MCK / 256"] - _256X = 6, - #[doc = "7: LRCK = MCK / 384"] - _384X = 7, - #[doc = "8: LRCK = MCK / 512"] - _512X = 8, -} -impl From for u8 { - #[inline(always)] - fn from(variant: RATIO_A) -> Self { - variant as _ - } -} -impl RATIO_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> Option { - match self.bits { - 0 => Some(RATIO_A::_32X), - 1 => Some(RATIO_A::_48X), - 2 => Some(RATIO_A::_64X), - 3 => Some(RATIO_A::_96X), - 4 => Some(RATIO_A::_128X), - 5 => Some(RATIO_A::_192X), - 6 => Some(RATIO_A::_256X), - 7 => Some(RATIO_A::_384X), - 8 => Some(RATIO_A::_512X), - _ => None, - } - } - #[doc = "Checks if the value of the field is `_32X`"] - #[inline(always)] - pub fn is_32x(&self) -> bool { - *self == RATIO_A::_32X - } - #[doc = "Checks if the value of the field is `_48X`"] - #[inline(always)] - pub fn is_48x(&self) -> bool { - *self == RATIO_A::_48X - } - #[doc = "Checks if the value of the field is `_64X`"] - #[inline(always)] - pub fn is_64x(&self) -> bool { - *self == RATIO_A::_64X - } - #[doc = "Checks if the value of the field is `_96X`"] - #[inline(always)] - pub fn is_96x(&self) -> bool { - *self == RATIO_A::_96X - } - #[doc = "Checks if the value of the field is `_128X`"] - #[inline(always)] - pub fn is_128x(&self) -> bool { - *self == RATIO_A::_128X - } - #[doc = "Checks if the value of the field is `_192X`"] - #[inline(always)] - pub fn is_192x(&self) -> bool { - *self == RATIO_A::_192X - } - #[doc = "Checks if the value of the field is `_256X`"] - #[inline(always)] - pub fn is_256x(&self) -> bool { - *self == RATIO_A::_256X - } - #[doc = "Checks if the value of the field is `_384X`"] - #[inline(always)] - pub fn is_384x(&self) -> bool { - *self == RATIO_A::_384X - } - #[doc = "Checks if the value of the field is `_512X`"] - #[inline(always)] - pub fn is_512x(&self) -> bool { - *self == RATIO_A::_512X - } -} -#[doc = "Field `RATIO` writer - MCK / LRCK ratio."] -pub type RATIO_W<'a, const O: u8> = crate::FieldWriter<'a, u32, RATIO_SPEC, u8, RATIO_A, 4, O>; -impl<'a, const O: u8> RATIO_W<'a, O> { - #[doc = "LRCK = MCK / 32"] - #[inline(always)] - pub fn _32x(self) -> &'a mut W { - self.variant(RATIO_A::_32X) - } - #[doc = "LRCK = MCK / 48"] - #[inline(always)] - pub fn _48x(self) -> &'a mut W { - self.variant(RATIO_A::_48X) - } - #[doc = "LRCK = MCK / 64"] - #[inline(always)] - pub fn _64x(self) -> &'a mut W { - self.variant(RATIO_A::_64X) - } - #[doc = "LRCK = MCK / 96"] - #[inline(always)] - pub fn _96x(self) -> &'a mut W { - self.variant(RATIO_A::_96X) - } - #[doc = "LRCK = MCK / 128"] - #[inline(always)] - pub fn _128x(self) -> &'a mut W { - self.variant(RATIO_A::_128X) - } - #[doc = "LRCK = MCK / 192"] - #[inline(always)] - pub fn _192x(self) -> &'a mut W { - self.variant(RATIO_A::_192X) - } - #[doc = "LRCK = MCK / 256"] - #[inline(always)] - pub fn _256x(self) -> &'a mut W { - self.variant(RATIO_A::_256X) - } - #[doc = "LRCK = MCK / 384"] - #[inline(always)] - pub fn _384x(self) -> &'a mut W { - self.variant(RATIO_A::_384X) - } - #[doc = "LRCK = MCK / 512"] - #[inline(always)] - pub fn _512x(self) -> &'a mut W { - self.variant(RATIO_A::_512X) - } -} -impl R { - #[doc = "Bits 0:3 - MCK / LRCK ratio."] - #[inline(always)] - pub fn ratio(&self) -> RATIO_R { - RATIO_R::new((self.bits & 0x0f) as u8) - } -} -impl W { - #[doc = "Bits 0:3 - MCK / LRCK ratio."] - #[inline(always)] - #[must_use] - pub fn ratio(&mut self) -> RATIO_W<0> { - RATIO_W::new(self) - } - #[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 = "MCK / LRCK ratio.\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 [ratio](index.html) module"] -pub struct RATIO_SPEC; -impl crate::RegisterSpec for RATIO_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [ratio::R](R) reader structure"] -impl crate::Readable for RATIO_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [ratio::W](W) writer structure"] -impl crate::Writable for RATIO_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets RATIO to value 0x06"] -impl crate::Resettable for RATIO_SPEC { - const RESET_VALUE: Self::Ux = 0x06; -} diff --git a/down-the-stack/dk_pac/src/i2s/config/rxen.rs b/down-the-stack/dk_pac/src/i2s/config/rxen.rs deleted file mode 100644 index e803ddb..0000000 --- a/down-the-stack/dk_pac/src/i2s/config/rxen.rs +++ /dev/null @@ -1,126 +0,0 @@ -#[doc = "Register `RXEN` 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 `RXEN` 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 `RXEN` reader - Reception (RX) enable."] -pub type RXEN_R = crate::BitReader; -#[doc = "Reception (RX) enable.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum RXEN_A { - #[doc = "0: Reception disabled and now data will be written to the RXD.PTR address."] - DISABLED = 0, - #[doc = "1: Reception enabled."] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: RXEN_A) -> Self { - variant as u8 != 0 - } -} -impl RXEN_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> RXEN_A { - match self.bits { - false => RXEN_A::DISABLED, - true => RXEN_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == RXEN_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == RXEN_A::ENABLED - } -} -#[doc = "Field `RXEN` writer - Reception (RX) enable."] -pub type RXEN_W<'a, const O: u8> = crate::BitWriter<'a, u32, RXEN_SPEC, RXEN_A, O>; -impl<'a, const O: u8> RXEN_W<'a, O> { - #[doc = "Reception disabled and now data will be written to the RXD.PTR address."] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(RXEN_A::DISABLED) - } - #[doc = "Reception enabled."] - #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(RXEN_A::ENABLED) - } -} -impl R { - #[doc = "Bit 0 - Reception (RX) enable."] - #[inline(always)] - pub fn rxen(&self) -> RXEN_R { - RXEN_R::new((self.bits & 1) != 0) - } -} -impl W { - #[doc = "Bit 0 - Reception (RX) enable."] - #[inline(always)] - #[must_use] - pub fn rxen(&mut self) -> RXEN_W<0> { - RXEN_W::new(self) - } - #[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 = "Reception (RX) enable.\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 [rxen](index.html) module"] -pub struct RXEN_SPEC; -impl crate::RegisterSpec for RXEN_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [rxen::R](R) reader structure"] -impl crate::Readable for RXEN_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [rxen::W](W) writer structure"] -impl crate::Writable for RXEN_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets RXEN to value 0"] -impl crate::Resettable for RXEN_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/i2s/config/swidth.rs b/down-the-stack/dk_pac/src/i2s/config/swidth.rs deleted file mode 100644 index 259ea98..0000000 --- a/down-the-stack/dk_pac/src/i2s/config/swidth.rs +++ /dev/null @@ -1,141 +0,0 @@ -#[doc = "Register `SWIDTH` 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 `SWIDTH` 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 `SWIDTH` reader - Sample width."] -pub type SWIDTH_R = crate::FieldReader; -#[doc = "Sample width.\n\nValue on reset: 1"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -#[repr(u8)] -pub enum SWIDTH_A { - #[doc = "0: 8 bit."] - _8BIT = 0, - #[doc = "1: 16 bit."] - _16BIT = 1, - #[doc = "2: 24 bit."] - _24BIT = 2, -} -impl From for u8 { - #[inline(always)] - fn from(variant: SWIDTH_A) -> Self { - variant as _ - } -} -impl SWIDTH_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> Option { - match self.bits { - 0 => Some(SWIDTH_A::_8BIT), - 1 => Some(SWIDTH_A::_16BIT), - 2 => Some(SWIDTH_A::_24BIT), - _ => None, - } - } - #[doc = "Checks if the value of the field is `_8BIT`"] - #[inline(always)] - pub fn is_8bit(&self) -> bool { - *self == SWIDTH_A::_8BIT - } - #[doc = "Checks if the value of the field is `_16BIT`"] - #[inline(always)] - pub fn is_16bit(&self) -> bool { - *self == SWIDTH_A::_16BIT - } - #[doc = "Checks if the value of the field is `_24BIT`"] - #[inline(always)] - pub fn is_24bit(&self) -> bool { - *self == SWIDTH_A::_24BIT - } -} -#[doc = "Field `SWIDTH` writer - Sample width."] -pub type SWIDTH_W<'a, const O: u8> = crate::FieldWriter<'a, u32, SWIDTH_SPEC, u8, SWIDTH_A, 2, O>; -impl<'a, const O: u8> SWIDTH_W<'a, O> { - #[doc = "8 bit."] - #[inline(always)] - pub fn _8bit(self) -> &'a mut W { - self.variant(SWIDTH_A::_8BIT) - } - #[doc = "16 bit."] - #[inline(always)] - pub fn _16bit(self) -> &'a mut W { - self.variant(SWIDTH_A::_16BIT) - } - #[doc = "24 bit."] - #[inline(always)] - pub fn _24bit(self) -> &'a mut W { - self.variant(SWIDTH_A::_24BIT) - } -} -impl R { - #[doc = "Bits 0:1 - Sample width."] - #[inline(always)] - pub fn swidth(&self) -> SWIDTH_R { - SWIDTH_R::new((self.bits & 3) as u8) - } -} -impl W { - #[doc = "Bits 0:1 - Sample width."] - #[inline(always)] - #[must_use] - pub fn swidth(&mut self) -> SWIDTH_W<0> { - SWIDTH_W::new(self) - } - #[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 = "Sample width.\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 [swidth](index.html) module"] -pub struct SWIDTH_SPEC; -impl crate::RegisterSpec for SWIDTH_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [swidth::R](R) reader structure"] -impl crate::Readable for SWIDTH_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [swidth::W](W) writer structure"] -impl crate::Writable for SWIDTH_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets SWIDTH to value 0x01"] -impl crate::Resettable for SWIDTH_SPEC { - const RESET_VALUE: Self::Ux = 0x01; -} diff --git a/down-the-stack/dk_pac/src/i2s/config/txen.rs b/down-the-stack/dk_pac/src/i2s/config/txen.rs deleted file mode 100644 index b5e3655..0000000 --- a/down-the-stack/dk_pac/src/i2s/config/txen.rs +++ /dev/null @@ -1,126 +0,0 @@ -#[doc = "Register `TXEN` 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 `TXEN` 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 `TXEN` reader - Transmission (TX) enable."] -pub type TXEN_R = crate::BitReader; -#[doc = "Transmission (TX) enable.\n\nValue on reset: 1"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum TXEN_A { - #[doc = "0: Transmission disabled and now data will be read from the RXD.TXD address."] - DISABLED = 0, - #[doc = "1: Transmission enabled."] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: TXEN_A) -> Self { - variant as u8 != 0 - } -} -impl TXEN_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> TXEN_A { - match self.bits { - false => TXEN_A::DISABLED, - true => TXEN_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == TXEN_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == TXEN_A::ENABLED - } -} -#[doc = "Field `TXEN` writer - Transmission (TX) enable."] -pub type TXEN_W<'a, const O: u8> = crate::BitWriter<'a, u32, TXEN_SPEC, TXEN_A, O>; -impl<'a, const O: u8> TXEN_W<'a, O> { - #[doc = "Transmission disabled and now data will be read from the RXD.TXD address."] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(TXEN_A::DISABLED) - } - #[doc = "Transmission enabled."] - #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(TXEN_A::ENABLED) - } -} -impl R { - #[doc = "Bit 0 - Transmission (TX) enable."] - #[inline(always)] - pub fn txen(&self) -> TXEN_R { - TXEN_R::new((self.bits & 1) != 0) - } -} -impl W { - #[doc = "Bit 0 - Transmission (TX) enable."] - #[inline(always)] - #[must_use] - pub fn txen(&mut self) -> TXEN_W<0> { - TXEN_W::new(self) - } - #[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 = "Transmission (TX) enable.\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 [txen](index.html) module"] -pub struct TXEN_SPEC; -impl crate::RegisterSpec for TXEN_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [txen::R](R) reader structure"] -impl crate::Readable for TXEN_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [txen::W](W) writer structure"] -impl crate::Writable for TXEN_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets TXEN to value 0x01"] -impl crate::Resettable for TXEN_SPEC { - const RESET_VALUE: Self::Ux = 0x01; -} diff --git a/down-the-stack/dk_pac/src/i2s/enable.rs b/down-the-stack/dk_pac/src/i2s/enable.rs deleted file mode 100644 index a893d58..0000000 --- a/down-the-stack/dk_pac/src/i2s/enable.rs +++ /dev/null @@ -1,126 +0,0 @@ -#[doc = "Register `ENABLE` 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 `ENABLE` 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 `ENABLE` reader - Enable I2S module."] -pub type ENABLE_R = crate::BitReader; -#[doc = "Enable I2S module.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum ENABLE_A { - #[doc = "0: Disable"] - DISABLED = 0, - #[doc = "1: Enable"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: ENABLE_A) -> Self { - variant as u8 != 0 - } -} -impl ENABLE_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> ENABLE_A { - match self.bits { - false => ENABLE_A::DISABLED, - true => ENABLE_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == ENABLE_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == ENABLE_A::ENABLED - } -} -#[doc = "Field `ENABLE` writer - Enable I2S module."] -pub type ENABLE_W<'a, const O: u8> = crate::BitWriter<'a, u32, ENABLE_SPEC, ENABLE_A, O>; -impl<'a, const O: u8> ENABLE_W<'a, O> { - #[doc = "Disable"] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(ENABLE_A::DISABLED) - } - #[doc = "Enable"] - #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(ENABLE_A::ENABLED) - } -} -impl R { - #[doc = "Bit 0 - Enable I2S module."] - #[inline(always)] - pub fn enable(&self) -> ENABLE_R { - ENABLE_R::new((self.bits & 1) != 0) - } -} -impl W { - #[doc = "Bit 0 - Enable I2S module."] - #[inline(always)] - #[must_use] - pub fn enable(&mut self) -> ENABLE_W<0> { - 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 - } -} -#[doc = "Enable I2S module.\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 [enable](index.html) module"] -pub struct ENABLE_SPEC; -impl crate::RegisterSpec for ENABLE_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [enable::R](R) reader structure"] -impl crate::Readable for ENABLE_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [enable::W](W) writer structure"] -impl crate::Writable for ENABLE_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets ENABLE to value 0"] -impl crate::Resettable for ENABLE_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/i2s/events_rxptrupd.rs b/down-the-stack/dk_pac/src/i2s/events_rxptrupd.rs deleted file mode 100644 index c1b9d95..0000000 --- a/down-the-stack/dk_pac/src/i2s/events_rxptrupd.rs +++ /dev/null @@ -1,127 +0,0 @@ -#[doc = "Register `EVENTS_RXPTRUPD` 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 `EVENTS_RXPTRUPD` 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 `EVENTS_RXPTRUPD` reader - The RXD.PTR register has been copied to internal double-buffers. When the I2S module is started and RX is enabled, this event will be generated for every RXTXD.MAXCNT words that are received on the SDIN pin."] -pub type EVENTS_RXPTRUPD_R = crate::BitReader; -#[doc = "The RXD.PTR register has been copied to internal double-buffers. When the I2S module is started and RX is enabled, this event will be generated for every RXTXD.MAXCNT words that are received on the SDIN pin.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum EVENTS_RXPTRUPD_A { - #[doc = "0: Event not generated"] - NOT_GENERATED = 0, - #[doc = "1: Event generated"] - GENERATED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: EVENTS_RXPTRUPD_A) -> Self { - variant as u8 != 0 - } -} -impl EVENTS_RXPTRUPD_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> EVENTS_RXPTRUPD_A { - match self.bits { - false => EVENTS_RXPTRUPD_A::NOT_GENERATED, - true => EVENTS_RXPTRUPD_A::GENERATED, - } - } - #[doc = "Checks if the value of the field is `NOT_GENERATED`"] - #[inline(always)] - pub fn is_not_generated(&self) -> bool { - *self == EVENTS_RXPTRUPD_A::NOT_GENERATED - } - #[doc = "Checks if the value of the field is `GENERATED`"] - #[inline(always)] - pub fn is_generated(&self) -> bool { - *self == EVENTS_RXPTRUPD_A::GENERATED - } -} -#[doc = "Field `EVENTS_RXPTRUPD` writer - The RXD.PTR register has been copied to internal double-buffers. When the I2S module is started and RX is enabled, this event will be generated for every RXTXD.MAXCNT words that are received on the SDIN pin."] -pub type EVENTS_RXPTRUPD_W<'a, const O: u8> = - crate::BitWriter<'a, u32, EVENTS_RXPTRUPD_SPEC, EVENTS_RXPTRUPD_A, O>; -impl<'a, const O: u8> EVENTS_RXPTRUPD_W<'a, O> { - #[doc = "Event not generated"] - #[inline(always)] - pub fn not_generated(self) -> &'a mut W { - self.variant(EVENTS_RXPTRUPD_A::NOT_GENERATED) - } - #[doc = "Event generated"] - #[inline(always)] - pub fn generated(self) -> &'a mut W { - self.variant(EVENTS_RXPTRUPD_A::GENERATED) - } -} -impl R { - #[doc = "Bit 0 - The RXD.PTR register has been copied to internal double-buffers. When the I2S module is started and RX is enabled, this event will be generated for every RXTXD.MAXCNT words that are received on the SDIN pin."] - #[inline(always)] - pub fn events_rxptrupd(&self) -> EVENTS_RXPTRUPD_R { - EVENTS_RXPTRUPD_R::new((self.bits & 1) != 0) - } -} -impl W { - #[doc = "Bit 0 - The RXD.PTR register has been copied to internal double-buffers. When the I2S module is started and RX is enabled, this event will be generated for every RXTXD.MAXCNT words that are received on the SDIN pin."] - #[inline(always)] - #[must_use] - pub fn events_rxptrupd(&mut self) -> EVENTS_RXPTRUPD_W<0> { - EVENTS_RXPTRUPD_W::new(self) - } - #[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 = "The RXD.PTR register has been copied to internal double-buffers. When the I2S module is started and RX is enabled, this event will be generated for every RXTXD.MAXCNT words that are received on the SDIN pin.\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 [events_rxptrupd](index.html) module"] -pub struct EVENTS_RXPTRUPD_SPEC; -impl crate::RegisterSpec for EVENTS_RXPTRUPD_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [events_rxptrupd::R](R) reader structure"] -impl crate::Readable for EVENTS_RXPTRUPD_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [events_rxptrupd::W](W) writer structure"] -impl crate::Writable for EVENTS_RXPTRUPD_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets EVENTS_RXPTRUPD to value 0"] -impl crate::Resettable for EVENTS_RXPTRUPD_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/i2s/events_stopped.rs b/down-the-stack/dk_pac/src/i2s/events_stopped.rs deleted file mode 100644 index b1e81de..0000000 --- a/down-the-stack/dk_pac/src/i2s/events_stopped.rs +++ /dev/null @@ -1,127 +0,0 @@ -#[doc = "Register `EVENTS_STOPPED` 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 `EVENTS_STOPPED` 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 `EVENTS_STOPPED` reader - I2S transfer stopped."] -pub type EVENTS_STOPPED_R = crate::BitReader; -#[doc = "I2S transfer stopped.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum EVENTS_STOPPED_A { - #[doc = "0: Event not generated"] - NOT_GENERATED = 0, - #[doc = "1: Event generated"] - GENERATED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: EVENTS_STOPPED_A) -> Self { - variant as u8 != 0 - } -} -impl EVENTS_STOPPED_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> EVENTS_STOPPED_A { - match self.bits { - false => EVENTS_STOPPED_A::NOT_GENERATED, - true => EVENTS_STOPPED_A::GENERATED, - } - } - #[doc = "Checks if the value of the field is `NOT_GENERATED`"] - #[inline(always)] - pub fn is_not_generated(&self) -> bool { - *self == EVENTS_STOPPED_A::NOT_GENERATED - } - #[doc = "Checks if the value of the field is `GENERATED`"] - #[inline(always)] - pub fn is_generated(&self) -> bool { - *self == EVENTS_STOPPED_A::GENERATED - } -} -#[doc = "Field `EVENTS_STOPPED` writer - I2S transfer stopped."] -pub type EVENTS_STOPPED_W<'a, const O: u8> = - crate::BitWriter<'a, u32, EVENTS_STOPPED_SPEC, EVENTS_STOPPED_A, O>; -impl<'a, const O: u8> EVENTS_STOPPED_W<'a, O> { - #[doc = "Event not generated"] - #[inline(always)] - pub fn not_generated(self) -> &'a mut W { - self.variant(EVENTS_STOPPED_A::NOT_GENERATED) - } - #[doc = "Event generated"] - #[inline(always)] - pub fn generated(self) -> &'a mut W { - self.variant(EVENTS_STOPPED_A::GENERATED) - } -} -impl R { - #[doc = "Bit 0 - I2S transfer stopped."] - #[inline(always)] - pub fn events_stopped(&self) -> EVENTS_STOPPED_R { - EVENTS_STOPPED_R::new((self.bits & 1) != 0) - } -} -impl W { - #[doc = "Bit 0 - I2S transfer stopped."] - #[inline(always)] - #[must_use] - pub fn events_stopped(&mut self) -> EVENTS_STOPPED_W<0> { - EVENTS_STOPPED_W::new(self) - } - #[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 = "I2S transfer stopped.\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 [events_stopped](index.html) module"] -pub struct EVENTS_STOPPED_SPEC; -impl crate::RegisterSpec for EVENTS_STOPPED_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [events_stopped::R](R) reader structure"] -impl crate::Readable for EVENTS_STOPPED_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [events_stopped::W](W) writer structure"] -impl crate::Writable for EVENTS_STOPPED_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets EVENTS_STOPPED to value 0"] -impl crate::Resettable for EVENTS_STOPPED_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/i2s/events_txptrupd.rs b/down-the-stack/dk_pac/src/i2s/events_txptrupd.rs deleted file mode 100644 index f049ac0..0000000 --- a/down-the-stack/dk_pac/src/i2s/events_txptrupd.rs +++ /dev/null @@ -1,127 +0,0 @@ -#[doc = "Register `EVENTS_TXPTRUPD` 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 `EVENTS_TXPTRUPD` 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 `EVENTS_TXPTRUPD` reader - The TDX.PTR register has been copied to internal double-buffers. When the I2S module is started and TX is enabled, this event will be generated for every RXTXD.MAXCNT words that are sent on the SDOUT pin."] -pub type EVENTS_TXPTRUPD_R = crate::BitReader; -#[doc = "The TDX.PTR register has been copied to internal double-buffers. When the I2S module is started and TX is enabled, this event will be generated for every RXTXD.MAXCNT words that are sent on the SDOUT pin.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum EVENTS_TXPTRUPD_A { - #[doc = "0: Event not generated"] - NOT_GENERATED = 0, - #[doc = "1: Event generated"] - GENERATED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: EVENTS_TXPTRUPD_A) -> Self { - variant as u8 != 0 - } -} -impl EVENTS_TXPTRUPD_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> EVENTS_TXPTRUPD_A { - match self.bits { - false => EVENTS_TXPTRUPD_A::NOT_GENERATED, - true => EVENTS_TXPTRUPD_A::GENERATED, - } - } - #[doc = "Checks if the value of the field is `NOT_GENERATED`"] - #[inline(always)] - pub fn is_not_generated(&self) -> bool { - *self == EVENTS_TXPTRUPD_A::NOT_GENERATED - } - #[doc = "Checks if the value of the field is `GENERATED`"] - #[inline(always)] - pub fn is_generated(&self) -> bool { - *self == EVENTS_TXPTRUPD_A::GENERATED - } -} -#[doc = "Field `EVENTS_TXPTRUPD` writer - The TDX.PTR register has been copied to internal double-buffers. When the I2S module is started and TX is enabled, this event will be generated for every RXTXD.MAXCNT words that are sent on the SDOUT pin."] -pub type EVENTS_TXPTRUPD_W<'a, const O: u8> = - crate::BitWriter<'a, u32, EVENTS_TXPTRUPD_SPEC, EVENTS_TXPTRUPD_A, O>; -impl<'a, const O: u8> EVENTS_TXPTRUPD_W<'a, O> { - #[doc = "Event not generated"] - #[inline(always)] - pub fn not_generated(self) -> &'a mut W { - self.variant(EVENTS_TXPTRUPD_A::NOT_GENERATED) - } - #[doc = "Event generated"] - #[inline(always)] - pub fn generated(self) -> &'a mut W { - self.variant(EVENTS_TXPTRUPD_A::GENERATED) - } -} -impl R { - #[doc = "Bit 0 - The TDX.PTR register has been copied to internal double-buffers. When the I2S module is started and TX is enabled, this event will be generated for every RXTXD.MAXCNT words that are sent on the SDOUT pin."] - #[inline(always)] - pub fn events_txptrupd(&self) -> EVENTS_TXPTRUPD_R { - EVENTS_TXPTRUPD_R::new((self.bits & 1) != 0) - } -} -impl W { - #[doc = "Bit 0 - The TDX.PTR register has been copied to internal double-buffers. When the I2S module is started and TX is enabled, this event will be generated for every RXTXD.MAXCNT words that are sent on the SDOUT pin."] - #[inline(always)] - #[must_use] - pub fn events_txptrupd(&mut self) -> EVENTS_TXPTRUPD_W<0> { - EVENTS_TXPTRUPD_W::new(self) - } - #[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 = "The TDX.PTR register has been copied to internal double-buffers. When the I2S module is started and TX is enabled, this event will be generated for every RXTXD.MAXCNT words that are sent on the SDOUT pin.\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 [events_txptrupd](index.html) module"] -pub struct EVENTS_TXPTRUPD_SPEC; -impl crate::RegisterSpec for EVENTS_TXPTRUPD_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [events_txptrupd::R](R) reader structure"] -impl crate::Readable for EVENTS_TXPTRUPD_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [events_txptrupd::W](W) writer structure"] -impl crate::Writable for EVENTS_TXPTRUPD_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets EVENTS_TXPTRUPD to value 0"] -impl crate::Resettable for EVENTS_TXPTRUPD_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/i2s/inten.rs b/down-the-stack/dk_pac/src/i2s/inten.rs deleted file mode 100644 index be54b72..0000000 --- a/down-the-stack/dk_pac/src/i2s/inten.rs +++ /dev/null @@ -1,248 +0,0 @@ -#[doc = "Register `INTEN` 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 `INTEN` 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 `RXPTRUPD` reader - Enable or disable interrupt for event RXPTRUPD"] -pub type RXPTRUPD_R = crate::BitReader; -#[doc = "Enable or disable interrupt for event RXPTRUPD\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum RXPTRUPD_A { - #[doc = "0: Disable"] - DISABLED = 0, - #[doc = "1: Enable"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: RXPTRUPD_A) -> Self { - variant as u8 != 0 - } -} -impl RXPTRUPD_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> RXPTRUPD_A { - match self.bits { - false => RXPTRUPD_A::DISABLED, - true => RXPTRUPD_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == RXPTRUPD_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == RXPTRUPD_A::ENABLED - } -} -#[doc = "Field `RXPTRUPD` writer - Enable or disable interrupt for event RXPTRUPD"] -pub type RXPTRUPD_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTEN_SPEC, RXPTRUPD_A, O>; -impl<'a, const O: u8> RXPTRUPD_W<'a, O> { - #[doc = "Disable"] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(RXPTRUPD_A::DISABLED) - } - #[doc = "Enable"] - #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(RXPTRUPD_A::ENABLED) - } -} -#[doc = "Field `STOPPED` reader - Enable or disable interrupt for event STOPPED"] -pub type STOPPED_R = crate::BitReader; -#[doc = "Enable or disable interrupt for event STOPPED\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum STOPPED_A { - #[doc = "0: Disable"] - DISABLED = 0, - #[doc = "1: Enable"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: STOPPED_A) -> Self { - variant as u8 != 0 - } -} -impl STOPPED_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> STOPPED_A { - match self.bits { - false => STOPPED_A::DISABLED, - true => STOPPED_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == STOPPED_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == STOPPED_A::ENABLED - } -} -#[doc = "Field `STOPPED` writer - Enable or disable interrupt for event STOPPED"] -pub type STOPPED_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTEN_SPEC, STOPPED_A, O>; -impl<'a, const O: u8> STOPPED_W<'a, O> { - #[doc = "Disable"] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(STOPPED_A::DISABLED) - } - #[doc = "Enable"] - #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(STOPPED_A::ENABLED) - } -} -#[doc = "Field `TXPTRUPD` reader - Enable or disable interrupt for event TXPTRUPD"] -pub type TXPTRUPD_R = crate::BitReader; -#[doc = "Enable or disable interrupt for event TXPTRUPD\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum TXPTRUPD_A { - #[doc = "0: Disable"] - DISABLED = 0, - #[doc = "1: Enable"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: TXPTRUPD_A) -> Self { - variant as u8 != 0 - } -} -impl TXPTRUPD_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> TXPTRUPD_A { - match self.bits { - false => TXPTRUPD_A::DISABLED, - true => TXPTRUPD_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == TXPTRUPD_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == TXPTRUPD_A::ENABLED - } -} -#[doc = "Field `TXPTRUPD` writer - Enable or disable interrupt for event TXPTRUPD"] -pub type TXPTRUPD_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTEN_SPEC, TXPTRUPD_A, O>; -impl<'a, const O: u8> TXPTRUPD_W<'a, O> { - #[doc = "Disable"] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(TXPTRUPD_A::DISABLED) - } - #[doc = "Enable"] - #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(TXPTRUPD_A::ENABLED) - } -} -impl R { - #[doc = "Bit 1 - Enable or disable interrupt for event RXPTRUPD"] - #[inline(always)] - pub fn rxptrupd(&self) -> RXPTRUPD_R { - RXPTRUPD_R::new(((self.bits >> 1) & 1) != 0) - } - #[doc = "Bit 2 - Enable or disable interrupt for event STOPPED"] - #[inline(always)] - pub fn stopped(&self) -> STOPPED_R { - STOPPED_R::new(((self.bits >> 2) & 1) != 0) - } - #[doc = "Bit 5 - Enable or disable interrupt for event TXPTRUPD"] - #[inline(always)] - pub fn txptrupd(&self) -> TXPTRUPD_R { - TXPTRUPD_R::new(((self.bits >> 5) & 1) != 0) - } -} -impl W { - #[doc = "Bit 1 - Enable or disable interrupt for event RXPTRUPD"] - #[inline(always)] - #[must_use] - pub fn rxptrupd(&mut self) -> RXPTRUPD_W<1> { - RXPTRUPD_W::new(self) - } - #[doc = "Bit 2 - Enable or disable interrupt for event STOPPED"] - #[inline(always)] - #[must_use] - pub fn stopped(&mut self) -> STOPPED_W<2> { - STOPPED_W::new(self) - } - #[doc = "Bit 5 - Enable or disable interrupt for event TXPTRUPD"] - #[inline(always)] - #[must_use] - pub fn txptrupd(&mut self) -> TXPTRUPD_W<5> { - TXPTRUPD_W::new(self) - } - #[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 = "Enable or disable interrupt\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 [inten](index.html) module"] -pub struct INTEN_SPEC; -impl crate::RegisterSpec for INTEN_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [inten::R](R) reader structure"] -impl crate::Readable for INTEN_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [inten::W](W) writer structure"] -impl crate::Writable for INTEN_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets INTEN to value 0"] -impl crate::Resettable for INTEN_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/i2s/intenclr.rs b/down-the-stack/dk_pac/src/i2s/intenclr.rs deleted file mode 100644 index aad1d91..0000000 --- a/down-the-stack/dk_pac/src/i2s/intenclr.rs +++ /dev/null @@ -1,269 +0,0 @@ -#[doc = "Register `INTENCLR` 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 `INTENCLR` 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 `RXPTRUPD` reader - Write '1' to disable interrupt for event RXPTRUPD"] -pub type RXPTRUPD_R = crate::BitReader; -#[doc = "Write '1' to disable interrupt for event RXPTRUPD\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum RXPTRUPD_A { - #[doc = "0: Read: Disabled"] - DISABLED = 0, - #[doc = "1: Read: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: RXPTRUPD_A) -> Self { - variant as u8 != 0 - } -} -impl RXPTRUPD_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> RXPTRUPD_A { - match self.bits { - false => RXPTRUPD_A::DISABLED, - true => RXPTRUPD_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == RXPTRUPD_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == RXPTRUPD_A::ENABLED - } -} -#[doc = "Write '1' to disable interrupt for event RXPTRUPD\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum RXPTRUPD_AW { - #[doc = "1: Disable"] - CLEAR = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: RXPTRUPD_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `RXPTRUPD` writer - Write '1' to disable interrupt for event RXPTRUPD"] -pub type RXPTRUPD_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENCLR_SPEC, RXPTRUPD_AW, O>; -impl<'a, const O: u8> RXPTRUPD_W<'a, O> { - #[doc = "Disable"] - #[inline(always)] - pub fn clear(self) -> &'a mut W { - self.variant(RXPTRUPD_AW::CLEAR) - } -} -#[doc = "Field `STOPPED` reader - Write '1' to disable interrupt for event STOPPED"] -pub type STOPPED_R = crate::BitReader; -#[doc = "Write '1' to disable interrupt for event STOPPED\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum STOPPED_A { - #[doc = "0: Read: Disabled"] - DISABLED = 0, - #[doc = "1: Read: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: STOPPED_A) -> Self { - variant as u8 != 0 - } -} -impl STOPPED_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> STOPPED_A { - match self.bits { - false => STOPPED_A::DISABLED, - true => STOPPED_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == STOPPED_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == STOPPED_A::ENABLED - } -} -#[doc = "Write '1' to disable interrupt for event STOPPED\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum STOPPED_AW { - #[doc = "1: Disable"] - CLEAR = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: STOPPED_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `STOPPED` writer - Write '1' to disable interrupt for event STOPPED"] -pub type STOPPED_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENCLR_SPEC, STOPPED_AW, O>; -impl<'a, const O: u8> STOPPED_W<'a, O> { - #[doc = "Disable"] - #[inline(always)] - pub fn clear(self) -> &'a mut W { - self.variant(STOPPED_AW::CLEAR) - } -} -#[doc = "Field `TXPTRUPD` reader - Write '1' to disable interrupt for event TXPTRUPD"] -pub type TXPTRUPD_R = crate::BitReader; -#[doc = "Write '1' to disable interrupt for event TXPTRUPD\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum TXPTRUPD_A { - #[doc = "0: Read: Disabled"] - DISABLED = 0, - #[doc = "1: Read: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: TXPTRUPD_A) -> Self { - variant as u8 != 0 - } -} -impl TXPTRUPD_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> TXPTRUPD_A { - match self.bits { - false => TXPTRUPD_A::DISABLED, - true => TXPTRUPD_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == TXPTRUPD_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == TXPTRUPD_A::ENABLED - } -} -#[doc = "Write '1' to disable interrupt for event TXPTRUPD\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum TXPTRUPD_AW { - #[doc = "1: Disable"] - CLEAR = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: TXPTRUPD_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `TXPTRUPD` writer - Write '1' to disable interrupt for event TXPTRUPD"] -pub type TXPTRUPD_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENCLR_SPEC, TXPTRUPD_AW, O>; -impl<'a, const O: u8> TXPTRUPD_W<'a, O> { - #[doc = "Disable"] - #[inline(always)] - pub fn clear(self) -> &'a mut W { - self.variant(TXPTRUPD_AW::CLEAR) - } -} -impl R { - #[doc = "Bit 1 - Write '1' to disable interrupt for event RXPTRUPD"] - #[inline(always)] - pub fn rxptrupd(&self) -> RXPTRUPD_R { - RXPTRUPD_R::new(((self.bits >> 1) & 1) != 0) - } - #[doc = "Bit 2 - Write '1' to disable interrupt for event STOPPED"] - #[inline(always)] - pub fn stopped(&self) -> STOPPED_R { - STOPPED_R::new(((self.bits >> 2) & 1) != 0) - } - #[doc = "Bit 5 - Write '1' to disable interrupt for event TXPTRUPD"] - #[inline(always)] - pub fn txptrupd(&self) -> TXPTRUPD_R { - TXPTRUPD_R::new(((self.bits >> 5) & 1) != 0) - } -} -impl W { - #[doc = "Bit 1 - Write '1' to disable interrupt for event RXPTRUPD"] - #[inline(always)] - #[must_use] - pub fn rxptrupd(&mut self) -> RXPTRUPD_W<1> { - RXPTRUPD_W::new(self) - } - #[doc = "Bit 2 - Write '1' to disable interrupt for event STOPPED"] - #[inline(always)] - #[must_use] - pub fn stopped(&mut self) -> STOPPED_W<2> { - STOPPED_W::new(self) - } - #[doc = "Bit 5 - Write '1' to disable interrupt for event TXPTRUPD"] - #[inline(always)] - #[must_use] - pub fn txptrupd(&mut self) -> TXPTRUPD_W<5> { - TXPTRUPD_W::new(self) - } - #[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 = "Disable interrupt\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 [intenclr](index.html) module"] -pub struct INTENCLR_SPEC; -impl crate::RegisterSpec for INTENCLR_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [intenclr::R](R) reader structure"] -impl crate::Readable for INTENCLR_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [intenclr::W](W) writer structure"] -impl crate::Writable for INTENCLR_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets INTENCLR to value 0"] -impl crate::Resettable for INTENCLR_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/i2s/intenset.rs b/down-the-stack/dk_pac/src/i2s/intenset.rs deleted file mode 100644 index 3a9ed58..0000000 --- a/down-the-stack/dk_pac/src/i2s/intenset.rs +++ /dev/null @@ -1,269 +0,0 @@ -#[doc = "Register `INTENSET` 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 `INTENSET` 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 `RXPTRUPD` reader - Write '1' to enable interrupt for event RXPTRUPD"] -pub type RXPTRUPD_R = crate::BitReader; -#[doc = "Write '1' to enable interrupt for event RXPTRUPD\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum RXPTRUPD_A { - #[doc = "0: Read: Disabled"] - DISABLED = 0, - #[doc = "1: Read: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: RXPTRUPD_A) -> Self { - variant as u8 != 0 - } -} -impl RXPTRUPD_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> RXPTRUPD_A { - match self.bits { - false => RXPTRUPD_A::DISABLED, - true => RXPTRUPD_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == RXPTRUPD_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == RXPTRUPD_A::ENABLED - } -} -#[doc = "Write '1' to enable interrupt for event RXPTRUPD\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum RXPTRUPD_AW { - #[doc = "1: Enable"] - SET = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: RXPTRUPD_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `RXPTRUPD` writer - Write '1' to enable interrupt for event RXPTRUPD"] -pub type RXPTRUPD_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENSET_SPEC, RXPTRUPD_AW, O>; -impl<'a, const O: u8> RXPTRUPD_W<'a, O> { - #[doc = "Enable"] - #[inline(always)] - pub fn set(self) -> &'a mut W { - self.variant(RXPTRUPD_AW::SET) - } -} -#[doc = "Field `STOPPED` reader - Write '1' to enable interrupt for event STOPPED"] -pub type STOPPED_R = crate::BitReader; -#[doc = "Write '1' to enable interrupt for event STOPPED\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum STOPPED_A { - #[doc = "0: Read: Disabled"] - DISABLED = 0, - #[doc = "1: Read: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: STOPPED_A) -> Self { - variant as u8 != 0 - } -} -impl STOPPED_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> STOPPED_A { - match self.bits { - false => STOPPED_A::DISABLED, - true => STOPPED_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == STOPPED_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == STOPPED_A::ENABLED - } -} -#[doc = "Write '1' to enable interrupt for event STOPPED\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum STOPPED_AW { - #[doc = "1: Enable"] - SET = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: STOPPED_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `STOPPED` writer - Write '1' to enable interrupt for event STOPPED"] -pub type STOPPED_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENSET_SPEC, STOPPED_AW, O>; -impl<'a, const O: u8> STOPPED_W<'a, O> { - #[doc = "Enable"] - #[inline(always)] - pub fn set(self) -> &'a mut W { - self.variant(STOPPED_AW::SET) - } -} -#[doc = "Field `TXPTRUPD` reader - Write '1' to enable interrupt for event TXPTRUPD"] -pub type TXPTRUPD_R = crate::BitReader; -#[doc = "Write '1' to enable interrupt for event TXPTRUPD\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum TXPTRUPD_A { - #[doc = "0: Read: Disabled"] - DISABLED = 0, - #[doc = "1: Read: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: TXPTRUPD_A) -> Self { - variant as u8 != 0 - } -} -impl TXPTRUPD_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> TXPTRUPD_A { - match self.bits { - false => TXPTRUPD_A::DISABLED, - true => TXPTRUPD_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == TXPTRUPD_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == TXPTRUPD_A::ENABLED - } -} -#[doc = "Write '1' to enable interrupt for event TXPTRUPD\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum TXPTRUPD_AW { - #[doc = "1: Enable"] - SET = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: TXPTRUPD_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `TXPTRUPD` writer - Write '1' to enable interrupt for event TXPTRUPD"] -pub type TXPTRUPD_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENSET_SPEC, TXPTRUPD_AW, O>; -impl<'a, const O: u8> TXPTRUPD_W<'a, O> { - #[doc = "Enable"] - #[inline(always)] - pub fn set(self) -> &'a mut W { - self.variant(TXPTRUPD_AW::SET) - } -} -impl R { - #[doc = "Bit 1 - Write '1' to enable interrupt for event RXPTRUPD"] - #[inline(always)] - pub fn rxptrupd(&self) -> RXPTRUPD_R { - RXPTRUPD_R::new(((self.bits >> 1) & 1) != 0) - } - #[doc = "Bit 2 - Write '1' to enable interrupt for event STOPPED"] - #[inline(always)] - pub fn stopped(&self) -> STOPPED_R { - STOPPED_R::new(((self.bits >> 2) & 1) != 0) - } - #[doc = "Bit 5 - Write '1' to enable interrupt for event TXPTRUPD"] - #[inline(always)] - pub fn txptrupd(&self) -> TXPTRUPD_R { - TXPTRUPD_R::new(((self.bits >> 5) & 1) != 0) - } -} -impl W { - #[doc = "Bit 1 - Write '1' to enable interrupt for event RXPTRUPD"] - #[inline(always)] - #[must_use] - pub fn rxptrupd(&mut self) -> RXPTRUPD_W<1> { - RXPTRUPD_W::new(self) - } - #[doc = "Bit 2 - Write '1' to enable interrupt for event STOPPED"] - #[inline(always)] - #[must_use] - pub fn stopped(&mut self) -> STOPPED_W<2> { - STOPPED_W::new(self) - } - #[doc = "Bit 5 - Write '1' to enable interrupt for event TXPTRUPD"] - #[inline(always)] - #[must_use] - pub fn txptrupd(&mut self) -> TXPTRUPD_W<5> { - TXPTRUPD_W::new(self) - } - #[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 = "Enable interrupt\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 [intenset](index.html) module"] -pub struct INTENSET_SPEC; -impl crate::RegisterSpec for INTENSET_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [intenset::R](R) reader structure"] -impl crate::Readable for INTENSET_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [intenset::W](W) writer structure"] -impl crate::Writable for INTENSET_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets INTENSET to value 0"] -impl crate::Resettable for INTENSET_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/i2s/psel.rs b/down-the-stack/dk_pac/src/i2s/psel.rs deleted file mode 100644 index b36fccf..0000000 --- a/down-the-stack/dk_pac/src/i2s/psel.rs +++ /dev/null @@ -1,34 +0,0 @@ -#[doc = r"Register block"] -#[repr(C)] -pub struct PSEL { - #[doc = "0x00 - Pin select for MCK signal."] - pub mck: MCK, - #[doc = "0x04 - Pin select for SCK signal."] - pub sck: SCK, - #[doc = "0x08 - Pin select for LRCK signal."] - pub lrck: LRCK, - #[doc = "0x0c - Pin select for SDIN signal."] - pub sdin: SDIN, - #[doc = "0x10 - Pin select for SDOUT signal."] - pub sdout: SDOUT, -} -#[doc = "MCK (rw) register accessor: an alias for `Reg`"] -pub type MCK = crate::Reg; -#[doc = "Pin select for MCK signal."] -pub mod mck; -#[doc = "SCK (rw) register accessor: an alias for `Reg`"] -pub type SCK = crate::Reg; -#[doc = "Pin select for SCK signal."] -pub mod sck; -#[doc = "LRCK (rw) register accessor: an alias for `Reg`"] -pub type LRCK = crate::Reg; -#[doc = "Pin select for LRCK signal."] -pub mod lrck; -#[doc = "SDIN (rw) register accessor: an alias for `Reg`"] -pub type SDIN = crate::Reg; -#[doc = "Pin select for SDIN signal."] -pub mod sdin; -#[doc = "SDOUT (rw) register accessor: an alias for `Reg`"] -pub type SDOUT = crate::Reg; -#[doc = "Pin select for SDOUT signal."] -pub mod sdout; diff --git a/down-the-stack/dk_pac/src/i2s/psel/lrck.rs b/down-the-stack/dk_pac/src/i2s/psel/lrck.rs deleted file mode 100644 index 9fcf428..0000000 --- a/down-the-stack/dk_pac/src/i2s/psel/lrck.rs +++ /dev/null @@ -1,141 +0,0 @@ -#[doc = "Register `LRCK` 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 `LRCK` 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 `PIN` reader - Pin number"] -pub type PIN_R = crate::FieldReader; -#[doc = "Field `PIN` writer - Pin number"] -pub type PIN_W<'a, const O: u8> = crate::FieldWriter<'a, u32, LRCK_SPEC, u8, u8, 5, O>; -#[doc = "Field `CONNECT` reader - Connection"] -pub type CONNECT_R = crate::BitReader; -#[doc = "Connection\n\nValue on reset: 1"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum CONNECT_A { - #[doc = "1: Disconnect"] - DISCONNECTED = 1, - #[doc = "0: Connect"] - CONNECTED = 0, -} -impl From for bool { - #[inline(always)] - fn from(variant: CONNECT_A) -> Self { - variant as u8 != 0 - } -} -impl CONNECT_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> CONNECT_A { - match self.bits { - true => CONNECT_A::DISCONNECTED, - false => CONNECT_A::CONNECTED, - } - } - #[doc = "Checks if the value of the field is `DISCONNECTED`"] - #[inline(always)] - pub fn is_disconnected(&self) -> bool { - *self == CONNECT_A::DISCONNECTED - } - #[doc = "Checks if the value of the field is `CONNECTED`"] - #[inline(always)] - pub fn is_connected(&self) -> bool { - *self == CONNECT_A::CONNECTED - } -} -#[doc = "Field `CONNECT` writer - Connection"] -pub type CONNECT_W<'a, const O: u8> = crate::BitWriter<'a, u32, LRCK_SPEC, CONNECT_A, O>; -impl<'a, const O: u8> CONNECT_W<'a, O> { - #[doc = "Disconnect"] - #[inline(always)] - pub fn disconnected(self) -> &'a mut W { - self.variant(CONNECT_A::DISCONNECTED) - } - #[doc = "Connect"] - #[inline(always)] - pub fn connected(self) -> &'a mut W { - self.variant(CONNECT_A::CONNECTED) - } -} -impl R { - #[doc = "Bits 0:4 - Pin number"] - #[inline(always)] - pub fn pin(&self) -> PIN_R { - PIN_R::new((self.bits & 0x1f) as u8) - } - #[doc = "Bit 31 - Connection"] - #[inline(always)] - pub fn connect(&self) -> CONNECT_R { - CONNECT_R::new(((self.bits >> 31) & 1) != 0) - } -} -impl W { - #[doc = "Bits 0:4 - Pin number"] - #[inline(always)] - #[must_use] - pub fn pin(&mut self) -> PIN_W<0> { - PIN_W::new(self) - } - #[doc = "Bit 31 - Connection"] - #[inline(always)] - #[must_use] - pub fn connect(&mut self) -> CONNECT_W<31> { - CONNECT_W::new(self) - } - #[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 = "Pin select for LRCK signal.\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 [lrck](index.html) module"] -pub struct LRCK_SPEC; -impl crate::RegisterSpec for LRCK_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [lrck::R](R) reader structure"] -impl crate::Readable for LRCK_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [lrck::W](W) writer structure"] -impl crate::Writable for LRCK_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets LRCK to value 0xffff_ffff"] -impl crate::Resettable for LRCK_SPEC { - const RESET_VALUE: Self::Ux = 0xffff_ffff; -} diff --git a/down-the-stack/dk_pac/src/i2s/psel/mck.rs b/down-the-stack/dk_pac/src/i2s/psel/mck.rs deleted file mode 100644 index 40b43b2..0000000 --- a/down-the-stack/dk_pac/src/i2s/psel/mck.rs +++ /dev/null @@ -1,141 +0,0 @@ -#[doc = "Register `MCK` 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 `MCK` 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 `PIN` reader - Pin number"] -pub type PIN_R = crate::FieldReader; -#[doc = "Field `PIN` writer - Pin number"] -pub type PIN_W<'a, const O: u8> = crate::FieldWriter<'a, u32, MCK_SPEC, u8, u8, 5, O>; -#[doc = "Field `CONNECT` reader - Connection"] -pub type CONNECT_R = crate::BitReader; -#[doc = "Connection\n\nValue on reset: 1"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum CONNECT_A { - #[doc = "1: Disconnect"] - DISCONNECTED = 1, - #[doc = "0: Connect"] - CONNECTED = 0, -} -impl From for bool { - #[inline(always)] - fn from(variant: CONNECT_A) -> Self { - variant as u8 != 0 - } -} -impl CONNECT_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> CONNECT_A { - match self.bits { - true => CONNECT_A::DISCONNECTED, - false => CONNECT_A::CONNECTED, - } - } - #[doc = "Checks if the value of the field is `DISCONNECTED`"] - #[inline(always)] - pub fn is_disconnected(&self) -> bool { - *self == CONNECT_A::DISCONNECTED - } - #[doc = "Checks if the value of the field is `CONNECTED`"] - #[inline(always)] - pub fn is_connected(&self) -> bool { - *self == CONNECT_A::CONNECTED - } -} -#[doc = "Field `CONNECT` writer - Connection"] -pub type CONNECT_W<'a, const O: u8> = crate::BitWriter<'a, u32, MCK_SPEC, CONNECT_A, O>; -impl<'a, const O: u8> CONNECT_W<'a, O> { - #[doc = "Disconnect"] - #[inline(always)] - pub fn disconnected(self) -> &'a mut W { - self.variant(CONNECT_A::DISCONNECTED) - } - #[doc = "Connect"] - #[inline(always)] - pub fn connected(self) -> &'a mut W { - self.variant(CONNECT_A::CONNECTED) - } -} -impl R { - #[doc = "Bits 0:4 - Pin number"] - #[inline(always)] - pub fn pin(&self) -> PIN_R { - PIN_R::new((self.bits & 0x1f) as u8) - } - #[doc = "Bit 31 - Connection"] - #[inline(always)] - pub fn connect(&self) -> CONNECT_R { - CONNECT_R::new(((self.bits >> 31) & 1) != 0) - } -} -impl W { - #[doc = "Bits 0:4 - Pin number"] - #[inline(always)] - #[must_use] - pub fn pin(&mut self) -> PIN_W<0> { - PIN_W::new(self) - } - #[doc = "Bit 31 - Connection"] - #[inline(always)] - #[must_use] - pub fn connect(&mut self) -> CONNECT_W<31> { - CONNECT_W::new(self) - } - #[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 = "Pin select for MCK signal.\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 [mck](index.html) module"] -pub struct MCK_SPEC; -impl crate::RegisterSpec for MCK_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [mck::R](R) reader structure"] -impl crate::Readable for MCK_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [mck::W](W) writer structure"] -impl crate::Writable for MCK_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets MCK to value 0xffff_ffff"] -impl crate::Resettable for MCK_SPEC { - const RESET_VALUE: Self::Ux = 0xffff_ffff; -} diff --git a/down-the-stack/dk_pac/src/i2s/psel/sck.rs b/down-the-stack/dk_pac/src/i2s/psel/sck.rs deleted file mode 100644 index 89689a3..0000000 --- a/down-the-stack/dk_pac/src/i2s/psel/sck.rs +++ /dev/null @@ -1,141 +0,0 @@ -#[doc = "Register `SCK` 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 `SCK` 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 `PIN` reader - Pin number"] -pub type PIN_R = crate::FieldReader; -#[doc = "Field `PIN` writer - Pin number"] -pub type PIN_W<'a, const O: u8> = crate::FieldWriter<'a, u32, SCK_SPEC, u8, u8, 5, O>; -#[doc = "Field `CONNECT` reader - Connection"] -pub type CONNECT_R = crate::BitReader; -#[doc = "Connection\n\nValue on reset: 1"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum CONNECT_A { - #[doc = "1: Disconnect"] - DISCONNECTED = 1, - #[doc = "0: Connect"] - CONNECTED = 0, -} -impl From for bool { - #[inline(always)] - fn from(variant: CONNECT_A) -> Self { - variant as u8 != 0 - } -} -impl CONNECT_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> CONNECT_A { - match self.bits { - true => CONNECT_A::DISCONNECTED, - false => CONNECT_A::CONNECTED, - } - } - #[doc = "Checks if the value of the field is `DISCONNECTED`"] - #[inline(always)] - pub fn is_disconnected(&self) -> bool { - *self == CONNECT_A::DISCONNECTED - } - #[doc = "Checks if the value of the field is `CONNECTED`"] - #[inline(always)] - pub fn is_connected(&self) -> bool { - *self == CONNECT_A::CONNECTED - } -} -#[doc = "Field `CONNECT` writer - Connection"] -pub type CONNECT_W<'a, const O: u8> = crate::BitWriter<'a, u32, SCK_SPEC, CONNECT_A, O>; -impl<'a, const O: u8> CONNECT_W<'a, O> { - #[doc = "Disconnect"] - #[inline(always)] - pub fn disconnected(self) -> &'a mut W { - self.variant(CONNECT_A::DISCONNECTED) - } - #[doc = "Connect"] - #[inline(always)] - pub fn connected(self) -> &'a mut W { - self.variant(CONNECT_A::CONNECTED) - } -} -impl R { - #[doc = "Bits 0:4 - Pin number"] - #[inline(always)] - pub fn pin(&self) -> PIN_R { - PIN_R::new((self.bits & 0x1f) as u8) - } - #[doc = "Bit 31 - Connection"] - #[inline(always)] - pub fn connect(&self) -> CONNECT_R { - CONNECT_R::new(((self.bits >> 31) & 1) != 0) - } -} -impl W { - #[doc = "Bits 0:4 - Pin number"] - #[inline(always)] - #[must_use] - pub fn pin(&mut self) -> PIN_W<0> { - PIN_W::new(self) - } - #[doc = "Bit 31 - Connection"] - #[inline(always)] - #[must_use] - pub fn connect(&mut self) -> CONNECT_W<31> { - CONNECT_W::new(self) - } - #[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 = "Pin select for SCK signal.\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 [sck](index.html) module"] -pub struct SCK_SPEC; -impl crate::RegisterSpec for SCK_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [sck::R](R) reader structure"] -impl crate::Readable for SCK_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [sck::W](W) writer structure"] -impl crate::Writable for SCK_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets SCK to value 0xffff_ffff"] -impl crate::Resettable for SCK_SPEC { - const RESET_VALUE: Self::Ux = 0xffff_ffff; -} diff --git a/down-the-stack/dk_pac/src/i2s/psel/sdin.rs b/down-the-stack/dk_pac/src/i2s/psel/sdin.rs deleted file mode 100644 index 29c868b..0000000 --- a/down-the-stack/dk_pac/src/i2s/psel/sdin.rs +++ /dev/null @@ -1,141 +0,0 @@ -#[doc = "Register `SDIN` 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 `SDIN` 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 `PIN` reader - Pin number"] -pub type PIN_R = crate::FieldReader; -#[doc = "Field `PIN` writer - Pin number"] -pub type PIN_W<'a, const O: u8> = crate::FieldWriter<'a, u32, SDIN_SPEC, u8, u8, 5, O>; -#[doc = "Field `CONNECT` reader - Connection"] -pub type CONNECT_R = crate::BitReader; -#[doc = "Connection\n\nValue on reset: 1"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum CONNECT_A { - #[doc = "1: Disconnect"] - DISCONNECTED = 1, - #[doc = "0: Connect"] - CONNECTED = 0, -} -impl From for bool { - #[inline(always)] - fn from(variant: CONNECT_A) -> Self { - variant as u8 != 0 - } -} -impl CONNECT_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> CONNECT_A { - match self.bits { - true => CONNECT_A::DISCONNECTED, - false => CONNECT_A::CONNECTED, - } - } - #[doc = "Checks if the value of the field is `DISCONNECTED`"] - #[inline(always)] - pub fn is_disconnected(&self) -> bool { - *self == CONNECT_A::DISCONNECTED - } - #[doc = "Checks if the value of the field is `CONNECTED`"] - #[inline(always)] - pub fn is_connected(&self) -> bool { - *self == CONNECT_A::CONNECTED - } -} -#[doc = "Field `CONNECT` writer - Connection"] -pub type CONNECT_W<'a, const O: u8> = crate::BitWriter<'a, u32, SDIN_SPEC, CONNECT_A, O>; -impl<'a, const O: u8> CONNECT_W<'a, O> { - #[doc = "Disconnect"] - #[inline(always)] - pub fn disconnected(self) -> &'a mut W { - self.variant(CONNECT_A::DISCONNECTED) - } - #[doc = "Connect"] - #[inline(always)] - pub fn connected(self) -> &'a mut W { - self.variant(CONNECT_A::CONNECTED) - } -} -impl R { - #[doc = "Bits 0:4 - Pin number"] - #[inline(always)] - pub fn pin(&self) -> PIN_R { - PIN_R::new((self.bits & 0x1f) as u8) - } - #[doc = "Bit 31 - Connection"] - #[inline(always)] - pub fn connect(&self) -> CONNECT_R { - CONNECT_R::new(((self.bits >> 31) & 1) != 0) - } -} -impl W { - #[doc = "Bits 0:4 - Pin number"] - #[inline(always)] - #[must_use] - pub fn pin(&mut self) -> PIN_W<0> { - PIN_W::new(self) - } - #[doc = "Bit 31 - Connection"] - #[inline(always)] - #[must_use] - pub fn connect(&mut self) -> CONNECT_W<31> { - CONNECT_W::new(self) - } - #[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 = "Pin select for SDIN signal.\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 [sdin](index.html) module"] -pub struct SDIN_SPEC; -impl crate::RegisterSpec for SDIN_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [sdin::R](R) reader structure"] -impl crate::Readable for SDIN_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [sdin::W](W) writer structure"] -impl crate::Writable for SDIN_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets SDIN to value 0xffff_ffff"] -impl crate::Resettable for SDIN_SPEC { - const RESET_VALUE: Self::Ux = 0xffff_ffff; -} diff --git a/down-the-stack/dk_pac/src/i2s/psel/sdout.rs b/down-the-stack/dk_pac/src/i2s/psel/sdout.rs deleted file mode 100644 index c81a05c..0000000 --- a/down-the-stack/dk_pac/src/i2s/psel/sdout.rs +++ /dev/null @@ -1,141 +0,0 @@ -#[doc = "Register `SDOUT` 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 `SDOUT` 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 `PIN` reader - Pin number"] -pub type PIN_R = crate::FieldReader; -#[doc = "Field `PIN` writer - Pin number"] -pub type PIN_W<'a, const O: u8> = crate::FieldWriter<'a, u32, SDOUT_SPEC, u8, u8, 5, O>; -#[doc = "Field `CONNECT` reader - Connection"] -pub type CONNECT_R = crate::BitReader; -#[doc = "Connection\n\nValue on reset: 1"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum CONNECT_A { - #[doc = "1: Disconnect"] - DISCONNECTED = 1, - #[doc = "0: Connect"] - CONNECTED = 0, -} -impl From for bool { - #[inline(always)] - fn from(variant: CONNECT_A) -> Self { - variant as u8 != 0 - } -} -impl CONNECT_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> CONNECT_A { - match self.bits { - true => CONNECT_A::DISCONNECTED, - false => CONNECT_A::CONNECTED, - } - } - #[doc = "Checks if the value of the field is `DISCONNECTED`"] - #[inline(always)] - pub fn is_disconnected(&self) -> bool { - *self == CONNECT_A::DISCONNECTED - } - #[doc = "Checks if the value of the field is `CONNECTED`"] - #[inline(always)] - pub fn is_connected(&self) -> bool { - *self == CONNECT_A::CONNECTED - } -} -#[doc = "Field `CONNECT` writer - Connection"] -pub type CONNECT_W<'a, const O: u8> = crate::BitWriter<'a, u32, SDOUT_SPEC, CONNECT_A, O>; -impl<'a, const O: u8> CONNECT_W<'a, O> { - #[doc = "Disconnect"] - #[inline(always)] - pub fn disconnected(self) -> &'a mut W { - self.variant(CONNECT_A::DISCONNECTED) - } - #[doc = "Connect"] - #[inline(always)] - pub fn connected(self) -> &'a mut W { - self.variant(CONNECT_A::CONNECTED) - } -} -impl R { - #[doc = "Bits 0:4 - Pin number"] - #[inline(always)] - pub fn pin(&self) -> PIN_R { - PIN_R::new((self.bits & 0x1f) as u8) - } - #[doc = "Bit 31 - Connection"] - #[inline(always)] - pub fn connect(&self) -> CONNECT_R { - CONNECT_R::new(((self.bits >> 31) & 1) != 0) - } -} -impl W { - #[doc = "Bits 0:4 - Pin number"] - #[inline(always)] - #[must_use] - pub fn pin(&mut self) -> PIN_W<0> { - PIN_W::new(self) - } - #[doc = "Bit 31 - Connection"] - #[inline(always)] - #[must_use] - pub fn connect(&mut self) -> CONNECT_W<31> { - CONNECT_W::new(self) - } - #[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 = "Pin select for SDOUT signal.\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 [sdout](index.html) module"] -pub struct SDOUT_SPEC; -impl crate::RegisterSpec for SDOUT_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [sdout::R](R) reader structure"] -impl crate::Readable for SDOUT_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [sdout::W](W) writer structure"] -impl crate::Writable for SDOUT_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets SDOUT to value 0xffff_ffff"] -impl crate::Resettable for SDOUT_SPEC { - const RESET_VALUE: Self::Ux = 0xffff_ffff; -} diff --git a/down-the-stack/dk_pac/src/i2s/rxd.rs b/down-the-stack/dk_pac/src/i2s/rxd.rs deleted file mode 100644 index 56ceed6..0000000 --- a/down-the-stack/dk_pac/src/i2s/rxd.rs +++ /dev/null @@ -1,10 +0,0 @@ -#[doc = r"Register block"] -#[repr(C)] -pub struct RXD { - #[doc = "0x00 - Receive buffer RAM start address."] - pub ptr: PTR, -} -#[doc = "PTR (rw) register accessor: an alias for `Reg`"] -pub type PTR = crate::Reg; -#[doc = "Receive buffer RAM start address."] -pub mod ptr; diff --git a/down-the-stack/dk_pac/src/i2s/rxd/ptr.rs b/down-the-stack/dk_pac/src/i2s/rxd/ptr.rs deleted file mode 100644 index db6dac7..0000000 --- a/down-the-stack/dk_pac/src/i2s/rxd/ptr.rs +++ /dev/null @@ -1,80 +0,0 @@ -#[doc = "Register `PTR` 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 `PTR` 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 `PTR` reader - Receive buffer Data RAM start address. When receiving, words containing samples will be written to this address. This address is a word aligned Data RAM address."] -pub type PTR_R = crate::FieldReader; -#[doc = "Field `PTR` writer - Receive buffer Data RAM start address. When receiving, words containing samples will be written to this address. This address is a word aligned Data RAM address."] -pub type PTR_W<'a, const O: u8> = crate::FieldWriter<'a, u32, PTR_SPEC, u32, u32, 32, O>; -impl R { - #[doc = "Bits 0:31 - Receive buffer Data RAM start address. When receiving, words containing samples will be written to this address. This address is a word aligned Data RAM address."] - #[inline(always)] - pub fn ptr(&self) -> PTR_R { - PTR_R::new(self.bits) - } -} -impl W { - #[doc = "Bits 0:31 - Receive buffer Data RAM start address. When receiving, words containing samples will be written to this address. This address is a word aligned Data RAM address."] - #[inline(always)] - #[must_use] - pub fn ptr(&mut self) -> PTR_W<0> { - PTR_W::new(self) - } - #[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 = "Receive buffer RAM start address.\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 [ptr](index.html) module"] -pub struct PTR_SPEC; -impl crate::RegisterSpec for PTR_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [ptr::R](R) reader structure"] -impl crate::Readable for PTR_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [ptr::W](W) writer structure"] -impl crate::Writable for PTR_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets PTR to value 0"] -impl crate::Resettable for PTR_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/i2s/rxtxd.rs b/down-the-stack/dk_pac/src/i2s/rxtxd.rs deleted file mode 100644 index 8f4bd2b..0000000 --- a/down-the-stack/dk_pac/src/i2s/rxtxd.rs +++ /dev/null @@ -1,10 +0,0 @@ -#[doc = r"Register block"] -#[repr(C)] -pub struct RXTXD { - #[doc = "0x00 - Size of RXD and TXD buffers."] - pub maxcnt: MAXCNT, -} -#[doc = "MAXCNT (rw) register accessor: an alias for `Reg`"] -pub type MAXCNT = crate::Reg; -#[doc = "Size of RXD and TXD buffers."] -pub mod maxcnt; diff --git a/down-the-stack/dk_pac/src/i2s/rxtxd/maxcnt.rs b/down-the-stack/dk_pac/src/i2s/rxtxd/maxcnt.rs deleted file mode 100644 index 687f90c..0000000 --- a/down-the-stack/dk_pac/src/i2s/rxtxd/maxcnt.rs +++ /dev/null @@ -1,80 +0,0 @@ -#[doc = "Register `MAXCNT` 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 `MAXCNT` 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 `MAXCNT` reader - Size of RXD and TXD buffers in number of 32 bit words."] -pub type MAXCNT_R = crate::FieldReader; -#[doc = "Field `MAXCNT` writer - Size of RXD and TXD buffers in number of 32 bit words."] -pub type MAXCNT_W<'a, const O: u8> = crate::FieldWriter<'a, u32, MAXCNT_SPEC, u16, u16, 14, O>; -impl R { - #[doc = "Bits 0:13 - Size of RXD and TXD buffers in number of 32 bit words."] - #[inline(always)] - pub fn maxcnt(&self) -> MAXCNT_R { - MAXCNT_R::new((self.bits & 0x3fff) as u16) - } -} -impl W { - #[doc = "Bits 0:13 - Size of RXD and TXD buffers in number of 32 bit words."] - #[inline(always)] - #[must_use] - pub fn maxcnt(&mut self) -> MAXCNT_W<0> { - MAXCNT_W::new(self) - } - #[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 = "Size of RXD and TXD buffers.\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 [maxcnt](index.html) module"] -pub struct MAXCNT_SPEC; -impl crate::RegisterSpec for MAXCNT_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [maxcnt::R](R) reader structure"] -impl crate::Readable for MAXCNT_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [maxcnt::W](W) writer structure"] -impl crate::Writable for MAXCNT_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets MAXCNT to value 0"] -impl crate::Resettable for MAXCNT_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/i2s/tasks_start.rs b/down-the-stack/dk_pac/src/i2s/tasks_start.rs deleted file mode 100644 index 280ea95..0000000 --- a/down-the-stack/dk_pac/src/i2s/tasks_start.rs +++ /dev/null @@ -1,72 +0,0 @@ -#[doc = "Register `TASKS_START` 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 = "Starts continuous I2S transfer. Also starts MCK generator when this is enabled.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum TASKS_START_AW { - #[doc = "1: Trigger task"] - TRIGGER = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: TASKS_START_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `TASKS_START` writer - Starts continuous I2S transfer. Also starts MCK generator when this is enabled."] -pub type TASKS_START_W<'a, const O: u8> = - crate::BitWriter<'a, u32, TASKS_START_SPEC, TASKS_START_AW, O>; -impl<'a, const O: u8> TASKS_START_W<'a, O> { - #[doc = "Trigger task"] - #[inline(always)] - pub fn trigger(self) -> &'a mut W { - self.variant(TASKS_START_AW::TRIGGER) - } -} -impl W { - #[doc = "Bit 0 - Starts continuous I2S transfer. Also starts MCK generator when this is enabled."] - #[inline(always)] - #[must_use] - pub fn tasks_start(&mut self) -> TASKS_START_W<0> { - TASKS_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 - } -} -#[doc = "Starts continuous I2S transfer. Also starts MCK generator when this is enabled.\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 [tasks_start](index.html) module"] -pub struct TASKS_START_SPEC; -impl crate::RegisterSpec for TASKS_START_SPEC { - type Ux = u32; -} -#[doc = "`write(|w| ..)` method takes [tasks_start::W](W) writer structure"] -impl crate::Writable for TASKS_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 TASKS_START to value 0"] -impl crate::Resettable for TASKS_START_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/i2s/tasks_stop.rs b/down-the-stack/dk_pac/src/i2s/tasks_stop.rs deleted file mode 100644 index 5f4560c..0000000 --- a/down-the-stack/dk_pac/src/i2s/tasks_stop.rs +++ /dev/null @@ -1,72 +0,0 @@ -#[doc = "Register `TASKS_STOP` 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 = "Stops I2S transfer. Also stops MCK generator. Triggering this task will cause the {event:STOPPED} event to be generated.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum TASKS_STOP_AW { - #[doc = "1: Trigger task"] - TRIGGER = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: TASKS_STOP_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `TASKS_STOP` writer - Stops I2S transfer. Also stops MCK generator. Triggering this task will cause the {event:STOPPED} event to be generated."] -pub type TASKS_STOP_W<'a, const O: u8> = - crate::BitWriter<'a, u32, TASKS_STOP_SPEC, TASKS_STOP_AW, O>; -impl<'a, const O: u8> TASKS_STOP_W<'a, O> { - #[doc = "Trigger task"] - #[inline(always)] - pub fn trigger(self) -> &'a mut W { - self.variant(TASKS_STOP_AW::TRIGGER) - } -} -impl W { - #[doc = "Bit 0 - Stops I2S transfer. Also stops MCK generator. Triggering this task will cause the {event:STOPPED} event to be generated."] - #[inline(always)] - #[must_use] - pub fn tasks_stop(&mut self) -> TASKS_STOP_W<0> { - TASKS_STOP_W::new(self) - } - #[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 = "Stops I2S transfer. Also stops MCK generator. Triggering this task will cause the {event:STOPPED} event to be generated.\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 [tasks_stop](index.html) module"] -pub struct TASKS_STOP_SPEC; -impl crate::RegisterSpec for TASKS_STOP_SPEC { - type Ux = u32; -} -#[doc = "`write(|w| ..)` method takes [tasks_stop::W](W) writer structure"] -impl crate::Writable for TASKS_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 TASKS_STOP to value 0"] -impl crate::Resettable for TASKS_STOP_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/i2s/txd.rs b/down-the-stack/dk_pac/src/i2s/txd.rs deleted file mode 100644 index 9abfe8c..0000000 --- a/down-the-stack/dk_pac/src/i2s/txd.rs +++ /dev/null @@ -1,10 +0,0 @@ -#[doc = r"Register block"] -#[repr(C)] -pub struct TXD { - #[doc = "0x00 - Transmit buffer RAM start address."] - pub ptr: PTR, -} -#[doc = "PTR (rw) register accessor: an alias for `Reg`"] -pub type PTR = crate::Reg; -#[doc = "Transmit buffer RAM start address."] -pub mod ptr; diff --git a/down-the-stack/dk_pac/src/i2s/txd/ptr.rs b/down-the-stack/dk_pac/src/i2s/txd/ptr.rs deleted file mode 100644 index a7b8dbe..0000000 --- a/down-the-stack/dk_pac/src/i2s/txd/ptr.rs +++ /dev/null @@ -1,80 +0,0 @@ -#[doc = "Register `PTR` 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 `PTR` 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 `PTR` reader - Transmit buffer Data RAM start address. When transmitting, words containing samples will be fetched from this address. This address is a word aligned Data RAM address."] -pub type PTR_R = crate::FieldReader; -#[doc = "Field `PTR` writer - Transmit buffer Data RAM start address. When transmitting, words containing samples will be fetched from this address. This address is a word aligned Data RAM address."] -pub type PTR_W<'a, const O: u8> = crate::FieldWriter<'a, u32, PTR_SPEC, u32, u32, 32, O>; -impl R { - #[doc = "Bits 0:31 - Transmit buffer Data RAM start address. When transmitting, words containing samples will be fetched from this address. This address is a word aligned Data RAM address."] - #[inline(always)] - pub fn ptr(&self) -> PTR_R { - PTR_R::new(self.bits) - } -} -impl W { - #[doc = "Bits 0:31 - Transmit buffer Data RAM start address. When transmitting, words containing samples will be fetched from this address. This address is a word aligned Data RAM address."] - #[inline(always)] - #[must_use] - pub fn ptr(&mut self) -> PTR_W<0> { - PTR_W::new(self) - } - #[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 = "Transmit buffer RAM start address.\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 [ptr](index.html) module"] -pub struct PTR_SPEC; -impl crate::RegisterSpec for PTR_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [ptr::R](R) reader structure"] -impl crate::Readable for PTR_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [ptr::W](W) writer structure"] -impl crate::Writable for PTR_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets PTR to value 0"] -impl crate::Resettable for PTR_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/lib.rs b/down-the-stack/dk_pac/src/lib.rs deleted file mode 100644 index 67149bf..0000000 --- a/down-the-stack/dk_pac/src/lib.rs +++ /dev/null @@ -1,2407 +0,0 @@ -#![doc = "Peripheral access API for NRF52 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)] -#![deny(no_mangle_generic_items)] -#![deny(non_shorthand_field_patterns)] -#![deny(overflowing_literals)] -#![deny(path_statements)] -#![deny(patterns_in_fns_without_body)] -#![deny(private_in_public)] -#![deny(unconditional_recursion)] -#![deny(unused_allocation)] -#![deny(unused_comparisons)] -#![deny(unused_parens)] -#![deny(while_true)] -#![allow(non_camel_case_types)] -#![allow(non_snake_case)] -#![no_std] -use core::marker::PhantomData; -use core::ops::Deref; -#[doc = r"Number available in the NVIC for configuring priority"] -pub const NVIC_PRIO_BITS: u8 = 3; -#[cfg(feature = "rt")] -pub use self::Interrupt as interrupt; -pub use cortex_m::peripheral::Peripherals as CorePeripherals; -pub use cortex_m::peripheral::{CBP, CPUID, DCB, DWT, FPB, FPU, ITM, MPU, NVIC, SCB, SYST, TPIU}; -#[cfg(feature = "rt")] -pub use cortex_m_rt::interrupt; -#[allow(unused_imports)] -use generic::*; -#[doc = r"Common register and bit access and modify traits"] -pub mod generic; -#[cfg(feature = "rt")] -extern "C" { - fn POWER_CLOCK(); - fn RADIO(); - fn UARTE0_UART0(); - fn SPIM0_SPIS0_TWIM0_TWIS0_SPI0_TWI0(); - fn SPIM1_SPIS1_TWIM1_TWIS1_SPI1_TWI1(); - fn NFCT(); - fn GPIOTE(); - fn SAADC(); - fn TIMER0(); - fn TIMER1(); - fn TIMER2(); - fn RTC0(); - fn TEMP(); - fn RNG(); - fn ECB(); - fn CCM_AAR(); - fn WDT(); - fn RTC1(); - fn QDEC(); - fn COMP_LPCOMP(); - fn SWI0_EGU0(); - fn SWI1_EGU1(); - fn SWI2_EGU2(); - fn SWI3_EGU3(); - fn SWI4_EGU4(); - fn SWI5_EGU5(); - fn TIMER3(); - fn TIMER4(); - fn PWM0(); - fn PDM(); - fn MWU(); - fn PWM1(); - fn PWM2(); - fn SPIM2_SPIS2_SPI2(); - fn RTC2(); - fn I2S(); - fn FPU(); -} -#[doc(hidden)] -pub union Vector { - _handler: unsafe extern "C" fn(), - _reserved: u32, -} -#[cfg(feature = "rt")] -#[doc(hidden)] -#[link_section = ".vector_table.interrupts"] -#[no_mangle] -pub static __INTERRUPTS: [Vector; 39] = [ - Vector { - _handler: POWER_CLOCK, - }, - Vector { _handler: RADIO }, - Vector { - _handler: UARTE0_UART0, - }, - Vector { - _handler: SPIM0_SPIS0_TWIM0_TWIS0_SPI0_TWI0, - }, - Vector { - _handler: SPIM1_SPIS1_TWIM1_TWIS1_SPI1_TWI1, - }, - Vector { _handler: NFCT }, - Vector { _handler: GPIOTE }, - Vector { _handler: SAADC }, - Vector { _handler: TIMER0 }, - Vector { _handler: TIMER1 }, - Vector { _handler: TIMER2 }, - Vector { _handler: RTC0 }, - Vector { _handler: TEMP }, - Vector { _handler: RNG }, - Vector { _handler: ECB }, - Vector { _handler: CCM_AAR }, - Vector { _handler: WDT }, - Vector { _handler: RTC1 }, - Vector { _handler: QDEC }, - Vector { - _handler: COMP_LPCOMP, - }, - Vector { - _handler: SWI0_EGU0, - }, - Vector { - _handler: SWI1_EGU1, - }, - Vector { - _handler: SWI2_EGU2, - }, - Vector { - _handler: SWI3_EGU3, - }, - Vector { - _handler: SWI4_EGU4, - }, - Vector { - _handler: SWI5_EGU5, - }, - Vector { _handler: TIMER3 }, - Vector { _handler: TIMER4 }, - Vector { _handler: PWM0 }, - Vector { _handler: PDM }, - Vector { _reserved: 0 }, - Vector { _reserved: 0 }, - Vector { _handler: MWU }, - Vector { _handler: PWM1 }, - Vector { _handler: PWM2 }, - Vector { - _handler: SPIM2_SPIS2_SPI2, - }, - Vector { _handler: RTC2 }, - Vector { _handler: I2S }, - Vector { _handler: FPU }, -]; -#[doc = r"Enumeration of all the interrupts."] -#[derive(Copy, Clone, Debug, PartialEq, Eq)] -#[repr(u16)] -pub enum Interrupt { - #[doc = "0 - POWER_CLOCK"] - POWER_CLOCK = 0, - #[doc = "1 - RADIO"] - RADIO = 1, - #[doc = "2 - UARTE0_UART0"] - UARTE0_UART0 = 2, - #[doc = "3 - SPIM0_SPIS0_TWIM0_TWIS0_SPI0_TWI0"] - SPIM0_SPIS0_TWIM0_TWIS0_SPI0_TWI0 = 3, - #[doc = "4 - SPIM1_SPIS1_TWIM1_TWIS1_SPI1_TWI1"] - SPIM1_SPIS1_TWIM1_TWIS1_SPI1_TWI1 = 4, - #[doc = "5 - NFCT"] - NFCT = 5, - #[doc = "6 - GPIOTE"] - GPIOTE = 6, - #[doc = "7 - SAADC"] - SAADC = 7, - #[doc = "8 - TIMER0"] - TIMER0 = 8, - #[doc = "9 - TIMER1"] - TIMER1 = 9, - #[doc = "10 - TIMER2"] - TIMER2 = 10, - #[doc = "11 - RTC0"] - RTC0 = 11, - #[doc = "12 - TEMP"] - TEMP = 12, - #[doc = "13 - RNG"] - RNG = 13, - #[doc = "14 - ECB"] - ECB = 14, - #[doc = "15 - CCM_AAR"] - CCM_AAR = 15, - #[doc = "16 - WDT"] - WDT = 16, - #[doc = "17 - RTC1"] - RTC1 = 17, - #[doc = "18 - QDEC"] - QDEC = 18, - #[doc = "19 - COMP_LPCOMP"] - COMP_LPCOMP = 19, - #[doc = "20 - SWI0_EGU0"] - SWI0_EGU0 = 20, - #[doc = "21 - SWI1_EGU1"] - SWI1_EGU1 = 21, - #[doc = "22 - SWI2_EGU2"] - SWI2_EGU2 = 22, - #[doc = "23 - SWI3_EGU3"] - SWI3_EGU3 = 23, - #[doc = "24 - SWI4_EGU4"] - SWI4_EGU4 = 24, - #[doc = "25 - SWI5_EGU5"] - SWI5_EGU5 = 25, - #[doc = "26 - TIMER3"] - TIMER3 = 26, - #[doc = "27 - TIMER4"] - TIMER4 = 27, - #[doc = "28 - PWM0"] - PWM0 = 28, - #[doc = "29 - PDM"] - PDM = 29, - #[doc = "32 - MWU"] - MWU = 32, - #[doc = "33 - PWM1"] - PWM1 = 33, - #[doc = "34 - PWM2"] - PWM2 = 34, - #[doc = "35 - SPIM2_SPIS2_SPI2"] - SPIM2_SPIS2_SPI2 = 35, - #[doc = "36 - RTC2"] - RTC2 = 36, - #[doc = "37 - I2S"] - I2S = 37, - #[doc = "38 - FPU"] - FPU = 38, -} -unsafe impl cortex_m::interrupt::InterruptNumber for Interrupt { - #[inline(always)] - fn number(self) -> u16 { - self as u16 - } -} -#[doc = "Factory Information Configuration Registers"] -pub struct FICR { - _marker: PhantomData<*const ()>, -} -unsafe impl Send for FICR {} -impl FICR { - #[doc = r"Pointer to the register block"] - pub const PTR: *const ficr::RegisterBlock = 0x1000_0000 as *const _; - #[doc = r"Return the pointer to the register block"] - #[inline(always)] - pub const fn ptr() -> *const ficr::RegisterBlock { - Self::PTR - } -} -impl Deref for FICR { - type Target = ficr::RegisterBlock; - #[inline(always)] - fn deref(&self) -> &Self::Target { - unsafe { &*Self::PTR } - } -} -impl core::fmt::Debug for FICR { - fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result { - f.debug_struct("FICR").finish() - } -} -#[doc = "Factory Information Configuration Registers"] -pub mod ficr; -#[doc = "User Information Configuration Registers"] -pub struct UICR { - _marker: PhantomData<*const ()>, -} -unsafe impl Send for UICR {} -impl UICR { - #[doc = r"Pointer to the register block"] - pub const PTR: *const uicr::RegisterBlock = 0x1000_1000 as *const _; - #[doc = r"Return the pointer to the register block"] - #[inline(always)] - pub const fn ptr() -> *const uicr::RegisterBlock { - Self::PTR - } -} -impl Deref for UICR { - type Target = uicr::RegisterBlock; - #[inline(always)] - fn deref(&self) -> &Self::Target { - unsafe { &*Self::PTR } - } -} -impl core::fmt::Debug for UICR { - fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result { - f.debug_struct("UICR").finish() - } -} -#[doc = "User Information Configuration Registers"] -pub mod uicr; -#[doc = "Access Port Protection"] -pub struct APPROTECT { - _marker: PhantomData<*const ()>, -} -unsafe impl Send for APPROTECT {} -impl APPROTECT { - #[doc = r"Pointer to the register block"] - pub const PTR: *const approtect::RegisterBlock = 0x4000_0000 as *const _; - #[doc = r"Return the pointer to the register block"] - #[inline(always)] - pub const fn ptr() -> *const approtect::RegisterBlock { - Self::PTR - } -} -impl Deref for APPROTECT { - type Target = approtect::RegisterBlock; - #[inline(always)] - fn deref(&self) -> &Self::Target { - unsafe { &*Self::PTR } - } -} -impl core::fmt::Debug for APPROTECT { - fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result { - f.debug_struct("APPROTECT").finish() - } -} -#[doc = "Access Port Protection"] -pub mod approtect; -#[doc = "Block Protect"] -pub struct BPROT { - _marker: PhantomData<*const ()>, -} -unsafe impl Send for BPROT {} -impl BPROT { - #[doc = r"Pointer to the register block"] - pub const PTR: *const bprot::RegisterBlock = 0x4000_0000 as *const _; - #[doc = r"Return the pointer to the register block"] - #[inline(always)] - pub const fn ptr() -> *const bprot::RegisterBlock { - Self::PTR - } -} -impl Deref for BPROT { - type Target = bprot::RegisterBlock; - #[inline(always)] - fn deref(&self) -> &Self::Target { - unsafe { &*Self::PTR } - } -} -impl core::fmt::Debug for BPROT { - fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result { - f.debug_struct("BPROT").finish() - } -} -#[doc = "Block Protect"] -pub mod bprot; -#[doc = "Clock control"] -pub struct CLOCK { - _marker: PhantomData<*const ()>, -} -unsafe impl Send for CLOCK {} -impl CLOCK { - #[doc = r"Pointer to the register block"] - pub const PTR: *const clock::RegisterBlock = 0x4000_0000 as *const _; - #[doc = r"Return the pointer to the register block"] - #[inline(always)] - pub const fn ptr() -> *const clock::RegisterBlock { - Self::PTR - } -} -impl Deref for CLOCK { - type Target = clock::RegisterBlock; - #[inline(always)] - fn deref(&self) -> &Self::Target { - unsafe { &*Self::PTR } - } -} -impl core::fmt::Debug for CLOCK { - fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result { - f.debug_struct("CLOCK").finish() - } -} -#[doc = "Clock control"] -pub mod clock; -#[doc = "Power control"] -pub struct POWER { - _marker: PhantomData<*const ()>, -} -unsafe impl Send for POWER {} -impl POWER { - #[doc = r"Pointer to the register block"] - pub const PTR: *const power::RegisterBlock = 0x4000_0000 as *const _; - #[doc = r"Return the pointer to the register block"] - #[inline(always)] - pub const fn ptr() -> *const power::RegisterBlock { - Self::PTR - } -} -impl Deref for POWER { - type Target = power::RegisterBlock; - #[inline(always)] - fn deref(&self) -> &Self::Target { - unsafe { &*Self::PTR } - } -} -impl core::fmt::Debug for POWER { - fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result { - f.debug_struct("POWER").finish() - } -} -#[doc = "Power control"] -pub mod power; -#[doc = "GPIO Port 1"] -pub struct P0 { - _marker: PhantomData<*const ()>, -} -unsafe impl Send for P0 {} -impl P0 { - #[doc = r"Pointer to the register block"] - pub const PTR: *const p0::RegisterBlock = 0x5000_0000 as *const _; - #[doc = r"Return the pointer to the register block"] - #[inline(always)] - pub const fn ptr() -> *const p0::RegisterBlock { - Self::PTR - } -} -impl Deref for P0 { - type Target = p0::RegisterBlock; - #[inline(always)] - fn deref(&self) -> &Self::Target { - unsafe { &*Self::PTR } - } -} -impl core::fmt::Debug for P0 { - fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result { - f.debug_struct("P0").finish() - } -} -#[doc = "GPIO Port 1"] -pub mod p0; -#[doc = "2.4 GHz Radio"] -pub struct RADIO { - _marker: PhantomData<*const ()>, -} -unsafe impl Send for RADIO {} -impl RADIO { - #[doc = r"Pointer to the register block"] - pub const PTR: *const radio::RegisterBlock = 0x4000_1000 as *const _; - #[doc = r"Return the pointer to the register block"] - #[inline(always)] - pub const fn ptr() -> *const radio::RegisterBlock { - Self::PTR - } -} -impl Deref for RADIO { - type Target = radio::RegisterBlock; - #[inline(always)] - fn deref(&self) -> &Self::Target { - unsafe { &*Self::PTR } - } -} -impl core::fmt::Debug for RADIO { - fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result { - f.debug_struct("RADIO").finish() - } -} -#[doc = "2.4 GHz Radio"] -pub mod radio; -#[doc = "Universal Asynchronous Receiver/Transmitter"] -pub struct UART0 { - _marker: PhantomData<*const ()>, -} -unsafe impl Send for UART0 {} -impl UART0 { - #[doc = r"Pointer to the register block"] - pub const PTR: *const uart0::RegisterBlock = 0x4000_2000 as *const _; - #[doc = r"Return the pointer to the register block"] - #[inline(always)] - pub const fn ptr() -> *const uart0::RegisterBlock { - Self::PTR - } -} -impl Deref for UART0 { - type Target = uart0::RegisterBlock; - #[inline(always)] - fn deref(&self) -> &Self::Target { - unsafe { &*Self::PTR } - } -} -impl core::fmt::Debug for UART0 { - fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result { - f.debug_struct("UART0").finish() - } -} -#[doc = "Universal Asynchronous Receiver/Transmitter"] -pub mod uart0; -#[doc = "UART with EasyDMA"] -pub struct UARTE0 { - _marker: PhantomData<*const ()>, -} -unsafe impl Send for UARTE0 {} -impl UARTE0 { - #[doc = r"Pointer to the register block"] - pub const PTR: *const uarte0::RegisterBlock = 0x4000_2000 as *const _; - #[doc = r"Return the pointer to the register block"] - #[inline(always)] - pub const fn ptr() -> *const uarte0::RegisterBlock { - Self::PTR - } -} -impl Deref for UARTE0 { - type Target = uarte0::RegisterBlock; - #[inline(always)] - fn deref(&self) -> &Self::Target { - unsafe { &*Self::PTR } - } -} -impl core::fmt::Debug for UARTE0 { - fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result { - f.debug_struct("UARTE0").finish() - } -} -#[doc = "UART with EasyDMA"] -pub mod uarte0; -#[doc = "Serial Peripheral Interface 0"] -pub struct SPI0 { - _marker: PhantomData<*const ()>, -} -unsafe impl Send for SPI0 {} -impl SPI0 { - #[doc = r"Pointer to the register block"] - pub const PTR: *const spi0::RegisterBlock = 0x4000_3000 as *const _; - #[doc = r"Return the pointer to the register block"] - #[inline(always)] - pub const fn ptr() -> *const spi0::RegisterBlock { - Self::PTR - } -} -impl Deref for SPI0 { - type Target = spi0::RegisterBlock; - #[inline(always)] - fn deref(&self) -> &Self::Target { - unsafe { &*Self::PTR } - } -} -impl core::fmt::Debug for SPI0 { - fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result { - f.debug_struct("SPI0").finish() - } -} -#[doc = "Serial Peripheral Interface 0"] -pub mod spi0; -#[doc = "Serial Peripheral Interface Master with EasyDMA 0"] -pub struct SPIM0 { - _marker: PhantomData<*const ()>, -} -unsafe impl Send for SPIM0 {} -impl SPIM0 { - #[doc = r"Pointer to the register block"] - pub const PTR: *const spim0::RegisterBlock = 0x4000_3000 as *const _; - #[doc = r"Return the pointer to the register block"] - #[inline(always)] - pub const fn ptr() -> *const spim0::RegisterBlock { - Self::PTR - } -} -impl Deref for SPIM0 { - type Target = spim0::RegisterBlock; - #[inline(always)] - fn deref(&self) -> &Self::Target { - unsafe { &*Self::PTR } - } -} -impl core::fmt::Debug for SPIM0 { - fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result { - f.debug_struct("SPIM0").finish() - } -} -#[doc = "Serial Peripheral Interface Master with EasyDMA 0"] -pub mod spim0; -#[doc = "SPI Slave 0"] -pub struct SPIS0 { - _marker: PhantomData<*const ()>, -} -unsafe impl Send for SPIS0 {} -impl SPIS0 { - #[doc = r"Pointer to the register block"] - pub const PTR: *const spis0::RegisterBlock = 0x4000_3000 as *const _; - #[doc = r"Return the pointer to the register block"] - #[inline(always)] - pub const fn ptr() -> *const spis0::RegisterBlock { - Self::PTR - } -} -impl Deref for SPIS0 { - type Target = spis0::RegisterBlock; - #[inline(always)] - fn deref(&self) -> &Self::Target { - unsafe { &*Self::PTR } - } -} -impl core::fmt::Debug for SPIS0 { - fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result { - f.debug_struct("SPIS0").finish() - } -} -#[doc = "SPI Slave 0"] -pub mod spis0; -#[doc = "I2C compatible Two-Wire Interface 0"] -pub struct TWI0 { - _marker: PhantomData<*const ()>, -} -unsafe impl Send for TWI0 {} -impl TWI0 { - #[doc = r"Pointer to the register block"] - pub const PTR: *const twi0::RegisterBlock = 0x4000_3000 as *const _; - #[doc = r"Return the pointer to the register block"] - #[inline(always)] - pub const fn ptr() -> *const twi0::RegisterBlock { - Self::PTR - } -} -impl Deref for TWI0 { - type Target = twi0::RegisterBlock; - #[inline(always)] - fn deref(&self) -> &Self::Target { - unsafe { &*Self::PTR } - } -} -impl core::fmt::Debug for TWI0 { - fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result { - f.debug_struct("TWI0").finish() - } -} -#[doc = "I2C compatible Two-Wire Interface 0"] -pub mod twi0; -#[doc = "I2C compatible Two-Wire Master Interface with EasyDMA 0"] -pub struct TWIM0 { - _marker: PhantomData<*const ()>, -} -unsafe impl Send for TWIM0 {} -impl TWIM0 { - #[doc = r"Pointer to the register block"] - pub const PTR: *const twim0::RegisterBlock = 0x4000_3000 as *const _; - #[doc = r"Return the pointer to the register block"] - #[inline(always)] - pub const fn ptr() -> *const twim0::RegisterBlock { - Self::PTR - } -} -impl Deref for TWIM0 { - type Target = twim0::RegisterBlock; - #[inline(always)] - fn deref(&self) -> &Self::Target { - unsafe { &*Self::PTR } - } -} -impl core::fmt::Debug for TWIM0 { - fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result { - f.debug_struct("TWIM0").finish() - } -} -#[doc = "I2C compatible Two-Wire Master Interface with EasyDMA 0"] -pub mod twim0; -#[doc = "I2C compatible Two-Wire Slave Interface with EasyDMA 0"] -pub struct TWIS0 { - _marker: PhantomData<*const ()>, -} -unsafe impl Send for TWIS0 {} -impl TWIS0 { - #[doc = r"Pointer to the register block"] - pub const PTR: *const twis0::RegisterBlock = 0x4000_3000 as *const _; - #[doc = r"Return the pointer to the register block"] - #[inline(always)] - pub const fn ptr() -> *const twis0::RegisterBlock { - Self::PTR - } -} -impl Deref for TWIS0 { - type Target = twis0::RegisterBlock; - #[inline(always)] - fn deref(&self) -> &Self::Target { - unsafe { &*Self::PTR } - } -} -impl core::fmt::Debug for TWIS0 { - fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result { - f.debug_struct("TWIS0").finish() - } -} -#[doc = "I2C compatible Two-Wire Slave Interface with EasyDMA 0"] -pub mod twis0; -#[doc = "Serial Peripheral Interface 1"] -pub struct SPI1 { - _marker: PhantomData<*const ()>, -} -unsafe impl Send for SPI1 {} -impl SPI1 { - #[doc = r"Pointer to the register block"] - pub const PTR: *const spi0::RegisterBlock = 0x4000_4000 as *const _; - #[doc = r"Return the pointer to the register block"] - #[inline(always)] - pub const fn ptr() -> *const spi0::RegisterBlock { - Self::PTR - } -} -impl Deref for SPI1 { - type Target = spi0::RegisterBlock; - #[inline(always)] - fn deref(&self) -> &Self::Target { - unsafe { &*Self::PTR } - } -} -impl core::fmt::Debug for SPI1 { - fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result { - f.debug_struct("SPI1").finish() - } -} -#[doc = "Serial Peripheral Interface 1"] -pub use self::spi0 as spi1; -#[doc = "Serial Peripheral Interface Master with EasyDMA 1"] -pub struct SPIM1 { - _marker: PhantomData<*const ()>, -} -unsafe impl Send for SPIM1 {} -impl SPIM1 { - #[doc = r"Pointer to the register block"] - pub const PTR: *const spim0::RegisterBlock = 0x4000_4000 as *const _; - #[doc = r"Return the pointer to the register block"] - #[inline(always)] - pub const fn ptr() -> *const spim0::RegisterBlock { - Self::PTR - } -} -impl Deref for SPIM1 { - type Target = spim0::RegisterBlock; - #[inline(always)] - fn deref(&self) -> &Self::Target { - unsafe { &*Self::PTR } - } -} -impl core::fmt::Debug for SPIM1 { - fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result { - f.debug_struct("SPIM1").finish() - } -} -#[doc = "Serial Peripheral Interface Master with EasyDMA 1"] -pub use self::spim0 as spim1; -#[doc = "SPI Slave 1"] -pub struct SPIS1 { - _marker: PhantomData<*const ()>, -} -unsafe impl Send for SPIS1 {} -impl SPIS1 { - #[doc = r"Pointer to the register block"] - pub const PTR: *const spis0::RegisterBlock = 0x4000_4000 as *const _; - #[doc = r"Return the pointer to the register block"] - #[inline(always)] - pub const fn ptr() -> *const spis0::RegisterBlock { - Self::PTR - } -} -impl Deref for SPIS1 { - type Target = spis0::RegisterBlock; - #[inline(always)] - fn deref(&self) -> &Self::Target { - unsafe { &*Self::PTR } - } -} -impl core::fmt::Debug for SPIS1 { - fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result { - f.debug_struct("SPIS1").finish() - } -} -#[doc = "SPI Slave 1"] -pub use self::spis0 as spis1; -#[doc = "I2C compatible Two-Wire Interface 1"] -pub struct TWI1 { - _marker: PhantomData<*const ()>, -} -unsafe impl Send for TWI1 {} -impl TWI1 { - #[doc = r"Pointer to the register block"] - pub const PTR: *const twi0::RegisterBlock = 0x4000_4000 as *const _; - #[doc = r"Return the pointer to the register block"] - #[inline(always)] - pub const fn ptr() -> *const twi0::RegisterBlock { - Self::PTR - } -} -impl Deref for TWI1 { - type Target = twi0::RegisterBlock; - #[inline(always)] - fn deref(&self) -> &Self::Target { - unsafe { &*Self::PTR } - } -} -impl core::fmt::Debug for TWI1 { - fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result { - f.debug_struct("TWI1").finish() - } -} -#[doc = "I2C compatible Two-Wire Interface 1"] -pub use self::twi0 as twi1; -#[doc = "I2C compatible Two-Wire Master Interface with EasyDMA 1"] -pub struct TWIM1 { - _marker: PhantomData<*const ()>, -} -unsafe impl Send for TWIM1 {} -impl TWIM1 { - #[doc = r"Pointer to the register block"] - pub const PTR: *const twim0::RegisterBlock = 0x4000_4000 as *const _; - #[doc = r"Return the pointer to the register block"] - #[inline(always)] - pub const fn ptr() -> *const twim0::RegisterBlock { - Self::PTR - } -} -impl Deref for TWIM1 { - type Target = twim0::RegisterBlock; - #[inline(always)] - fn deref(&self) -> &Self::Target { - unsafe { &*Self::PTR } - } -} -impl core::fmt::Debug for TWIM1 { - fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result { - f.debug_struct("TWIM1").finish() - } -} -#[doc = "I2C compatible Two-Wire Master Interface with EasyDMA 1"] -pub use self::twim0 as twim1; -#[doc = "I2C compatible Two-Wire Slave Interface with EasyDMA 1"] -pub struct TWIS1 { - _marker: PhantomData<*const ()>, -} -unsafe impl Send for TWIS1 {} -impl TWIS1 { - #[doc = r"Pointer to the register block"] - pub const PTR: *const twis0::RegisterBlock = 0x4000_4000 as *const _; - #[doc = r"Return the pointer to the register block"] - #[inline(always)] - pub const fn ptr() -> *const twis0::RegisterBlock { - Self::PTR - } -} -impl Deref for TWIS1 { - type Target = twis0::RegisterBlock; - #[inline(always)] - fn deref(&self) -> &Self::Target { - unsafe { &*Self::PTR } - } -} -impl core::fmt::Debug for TWIS1 { - fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result { - f.debug_struct("TWIS1").finish() - } -} -#[doc = "I2C compatible Two-Wire Slave Interface with EasyDMA 1"] -pub use self::twis0 as twis1; -#[doc = "NFC-A compatible radio"] -pub struct NFCT { - _marker: PhantomData<*const ()>, -} -unsafe impl Send for NFCT {} -impl NFCT { - #[doc = r"Pointer to the register block"] - pub const PTR: *const nfct::RegisterBlock = 0x4000_5000 as *const _; - #[doc = r"Return the pointer to the register block"] - #[inline(always)] - pub const fn ptr() -> *const nfct::RegisterBlock { - Self::PTR - } -} -impl Deref for NFCT { - type Target = nfct::RegisterBlock; - #[inline(always)] - fn deref(&self) -> &Self::Target { - unsafe { &*Self::PTR } - } -} -impl core::fmt::Debug for NFCT { - fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result { - f.debug_struct("NFCT").finish() - } -} -#[doc = "NFC-A compatible radio"] -pub mod nfct; -#[doc = "GPIO Tasks and Events"] -pub struct GPIOTE { - _marker: PhantomData<*const ()>, -} -unsafe impl Send for GPIOTE {} -impl GPIOTE { - #[doc = r"Pointer to the register block"] - pub const PTR: *const gpiote::RegisterBlock = 0x4000_6000 as *const _; - #[doc = r"Return the pointer to the register block"] - #[inline(always)] - pub const fn ptr() -> *const gpiote::RegisterBlock { - Self::PTR - } -} -impl Deref for GPIOTE { - type Target = gpiote::RegisterBlock; - #[inline(always)] - fn deref(&self) -> &Self::Target { - unsafe { &*Self::PTR } - } -} -impl core::fmt::Debug for GPIOTE { - fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result { - f.debug_struct("GPIOTE").finish() - } -} -#[doc = "GPIO Tasks and Events"] -pub mod gpiote; -#[doc = "Analog to Digital Converter"] -pub struct SAADC { - _marker: PhantomData<*const ()>, -} -unsafe impl Send for SAADC {} -impl SAADC { - #[doc = r"Pointer to the register block"] - pub const PTR: *const saadc::RegisterBlock = 0x4000_7000 as *const _; - #[doc = r"Return the pointer to the register block"] - #[inline(always)] - pub const fn ptr() -> *const saadc::RegisterBlock { - Self::PTR - } -} -impl Deref for SAADC { - type Target = saadc::RegisterBlock; - #[inline(always)] - fn deref(&self) -> &Self::Target { - unsafe { &*Self::PTR } - } -} -impl core::fmt::Debug for SAADC { - fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result { - f.debug_struct("SAADC").finish() - } -} -#[doc = "Analog to Digital Converter"] -pub mod saadc; -#[doc = "Timer/Counter 0"] -pub struct TIMER0 { - _marker: PhantomData<*const ()>, -} -unsafe impl Send for TIMER0 {} -impl TIMER0 { - #[doc = r"Pointer to the register block"] - pub const PTR: *const timer0::RegisterBlock = 0x4000_8000 as *const _; - #[doc = r"Return the pointer to the register block"] - #[inline(always)] - pub const fn ptr() -> *const timer0::RegisterBlock { - Self::PTR - } -} -impl Deref for TIMER0 { - type Target = timer0::RegisterBlock; - #[inline(always)] - fn deref(&self) -> &Self::Target { - unsafe { &*Self::PTR } - } -} -impl core::fmt::Debug for TIMER0 { - fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result { - f.debug_struct("TIMER0").finish() - } -} -#[doc = "Timer/Counter 0"] -pub mod timer0; -#[doc = "Timer/Counter 1"] -pub struct TIMER1 { - _marker: PhantomData<*const ()>, -} -unsafe impl Send for TIMER1 {} -impl TIMER1 { - #[doc = r"Pointer to the register block"] - pub const PTR: *const timer0::RegisterBlock = 0x4000_9000 as *const _; - #[doc = r"Return the pointer to the register block"] - #[inline(always)] - pub const fn ptr() -> *const timer0::RegisterBlock { - Self::PTR - } -} -impl Deref for TIMER1 { - type Target = timer0::RegisterBlock; - #[inline(always)] - fn deref(&self) -> &Self::Target { - unsafe { &*Self::PTR } - } -} -impl core::fmt::Debug for TIMER1 { - fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result { - f.debug_struct("TIMER1").finish() - } -} -#[doc = "Timer/Counter 1"] -pub use self::timer0 as timer1; -#[doc = "Timer/Counter 2"] -pub struct TIMER2 { - _marker: PhantomData<*const ()>, -} -unsafe impl Send for TIMER2 {} -impl TIMER2 { - #[doc = r"Pointer to the register block"] - pub const PTR: *const timer0::RegisterBlock = 0x4000_a000 as *const _; - #[doc = r"Return the pointer to the register block"] - #[inline(always)] - pub const fn ptr() -> *const timer0::RegisterBlock { - Self::PTR - } -} -impl Deref for TIMER2 { - type Target = timer0::RegisterBlock; - #[inline(always)] - fn deref(&self) -> &Self::Target { - unsafe { &*Self::PTR } - } -} -impl core::fmt::Debug for TIMER2 { - fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result { - f.debug_struct("TIMER2").finish() - } -} -#[doc = "Timer/Counter 2"] -pub use self::timer0 as timer2; -#[doc = "Real time counter 0"] -pub struct RTC0 { - _marker: PhantomData<*const ()>, -} -unsafe impl Send for RTC0 {} -impl RTC0 { - #[doc = r"Pointer to the register block"] - pub const PTR: *const rtc0::RegisterBlock = 0x4000_b000 as *const _; - #[doc = r"Return the pointer to the register block"] - #[inline(always)] - pub const fn ptr() -> *const rtc0::RegisterBlock { - Self::PTR - } -} -impl Deref for RTC0 { - type Target = rtc0::RegisterBlock; - #[inline(always)] - fn deref(&self) -> &Self::Target { - unsafe { &*Self::PTR } - } -} -impl core::fmt::Debug for RTC0 { - fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result { - f.debug_struct("RTC0").finish() - } -} -#[doc = "Real time counter 0"] -pub mod rtc0; -#[doc = "Temperature Sensor"] -pub struct TEMP { - _marker: PhantomData<*const ()>, -} -unsafe impl Send for TEMP {} -impl TEMP { - #[doc = r"Pointer to the register block"] - pub const PTR: *const temp::RegisterBlock = 0x4000_c000 as *const _; - #[doc = r"Return the pointer to the register block"] - #[inline(always)] - pub const fn ptr() -> *const temp::RegisterBlock { - Self::PTR - } -} -impl Deref for TEMP { - type Target = temp::RegisterBlock; - #[inline(always)] - fn deref(&self) -> &Self::Target { - unsafe { &*Self::PTR } - } -} -impl core::fmt::Debug for TEMP { - fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result { - f.debug_struct("TEMP").finish() - } -} -#[doc = "Temperature Sensor"] -pub mod temp; -#[doc = "Random Number Generator"] -pub struct RNG { - _marker: PhantomData<*const ()>, -} -unsafe impl Send for RNG {} -impl RNG { - #[doc = r"Pointer to the register block"] - pub const PTR: *const rng::RegisterBlock = 0x4000_d000 as *const _; - #[doc = r"Return the pointer to the register block"] - #[inline(always)] - pub const fn ptr() -> *const rng::RegisterBlock { - Self::PTR - } -} -impl Deref for RNG { - type Target = rng::RegisterBlock; - #[inline(always)] - fn deref(&self) -> &Self::Target { - unsafe { &*Self::PTR } - } -} -impl core::fmt::Debug for RNG { - fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result { - f.debug_struct("RNG").finish() - } -} -#[doc = "Random Number Generator"] -pub mod rng; -#[doc = "AES ECB Mode Encryption"] -pub struct ECB { - _marker: PhantomData<*const ()>, -} -unsafe impl Send for ECB {} -impl ECB { - #[doc = r"Pointer to the register block"] - pub const PTR: *const ecb::RegisterBlock = 0x4000_e000 as *const _; - #[doc = r"Return the pointer to the register block"] - #[inline(always)] - pub const fn ptr() -> *const ecb::RegisterBlock { - Self::PTR - } -} -impl Deref for ECB { - type Target = ecb::RegisterBlock; - #[inline(always)] - fn deref(&self) -> &Self::Target { - unsafe { &*Self::PTR } - } -} -impl core::fmt::Debug for ECB { - fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result { - f.debug_struct("ECB").finish() - } -} -#[doc = "AES ECB Mode Encryption"] -pub mod ecb; -#[doc = "Accelerated Address Resolver"] -pub struct AAR { - _marker: PhantomData<*const ()>, -} -unsafe impl Send for AAR {} -impl AAR { - #[doc = r"Pointer to the register block"] - pub const PTR: *const aar::RegisterBlock = 0x4000_f000 as *const _; - #[doc = r"Return the pointer to the register block"] - #[inline(always)] - pub const fn ptr() -> *const aar::RegisterBlock { - Self::PTR - } -} -impl Deref for AAR { - type Target = aar::RegisterBlock; - #[inline(always)] - fn deref(&self) -> &Self::Target { - unsafe { &*Self::PTR } - } -} -impl core::fmt::Debug for AAR { - fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result { - f.debug_struct("AAR").finish() - } -} -#[doc = "Accelerated Address Resolver"] -pub mod aar; -#[doc = "AES CCM Mode Encryption"] -pub struct CCM { - _marker: PhantomData<*const ()>, -} -unsafe impl Send for CCM {} -impl CCM { - #[doc = r"Pointer to the register block"] - pub const PTR: *const ccm::RegisterBlock = 0x4000_f000 as *const _; - #[doc = r"Return the pointer to the register block"] - #[inline(always)] - pub const fn ptr() -> *const ccm::RegisterBlock { - Self::PTR - } -} -impl Deref for CCM { - type Target = ccm::RegisterBlock; - #[inline(always)] - fn deref(&self) -> &Self::Target { - unsafe { &*Self::PTR } - } -} -impl core::fmt::Debug for CCM { - fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result { - f.debug_struct("CCM").finish() - } -} -#[doc = "AES CCM Mode Encryption"] -pub mod ccm; -#[doc = "Watchdog Timer"] -pub struct WDT { - _marker: PhantomData<*const ()>, -} -unsafe impl Send for WDT {} -impl WDT { - #[doc = r"Pointer to the register block"] - pub const PTR: *const wdt::RegisterBlock = 0x4001_0000 as *const _; - #[doc = r"Return the pointer to the register block"] - #[inline(always)] - pub const fn ptr() -> *const wdt::RegisterBlock { - Self::PTR - } -} -impl Deref for WDT { - type Target = wdt::RegisterBlock; - #[inline(always)] - fn deref(&self) -> &Self::Target { - unsafe { &*Self::PTR } - } -} -impl core::fmt::Debug for WDT { - fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result { - f.debug_struct("WDT").finish() - } -} -#[doc = "Watchdog Timer"] -pub mod wdt; -#[doc = "Real time counter 1"] -pub struct RTC1 { - _marker: PhantomData<*const ()>, -} -unsafe impl Send for RTC1 {} -impl RTC1 { - #[doc = r"Pointer to the register block"] - pub const PTR: *const rtc0::RegisterBlock = 0x4001_1000 as *const _; - #[doc = r"Return the pointer to the register block"] - #[inline(always)] - pub const fn ptr() -> *const rtc0::RegisterBlock { - Self::PTR - } -} -impl Deref for RTC1 { - type Target = rtc0::RegisterBlock; - #[inline(always)] - fn deref(&self) -> &Self::Target { - unsafe { &*Self::PTR } - } -} -impl core::fmt::Debug for RTC1 { - fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result { - f.debug_struct("RTC1").finish() - } -} -#[doc = "Real time counter 1"] -pub use self::rtc0 as rtc1; -#[doc = "Quadrature Decoder"] -pub struct QDEC { - _marker: PhantomData<*const ()>, -} -unsafe impl Send for QDEC {} -impl QDEC { - #[doc = r"Pointer to the register block"] - pub const PTR: *const qdec::RegisterBlock = 0x4001_2000 as *const _; - #[doc = r"Return the pointer to the register block"] - #[inline(always)] - pub const fn ptr() -> *const qdec::RegisterBlock { - Self::PTR - } -} -impl Deref for QDEC { - type Target = qdec::RegisterBlock; - #[inline(always)] - fn deref(&self) -> &Self::Target { - unsafe { &*Self::PTR } - } -} -impl core::fmt::Debug for QDEC { - fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result { - f.debug_struct("QDEC").finish() - } -} -#[doc = "Quadrature Decoder"] -pub mod qdec; -#[doc = "Comparator"] -pub struct COMP { - _marker: PhantomData<*const ()>, -} -unsafe impl Send for COMP {} -impl COMP { - #[doc = r"Pointer to the register block"] - pub const PTR: *const comp::RegisterBlock = 0x4001_3000 as *const _; - #[doc = r"Return the pointer to the register block"] - #[inline(always)] - pub const fn ptr() -> *const comp::RegisterBlock { - Self::PTR - } -} -impl Deref for COMP { - type Target = comp::RegisterBlock; - #[inline(always)] - fn deref(&self) -> &Self::Target { - unsafe { &*Self::PTR } - } -} -impl core::fmt::Debug for COMP { - fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result { - f.debug_struct("COMP").finish() - } -} -#[doc = "Comparator"] -pub mod comp; -#[doc = "Low Power Comparator"] -pub struct LPCOMP { - _marker: PhantomData<*const ()>, -} -unsafe impl Send for LPCOMP {} -impl LPCOMP { - #[doc = r"Pointer to the register block"] - pub const PTR: *const lpcomp::RegisterBlock = 0x4001_3000 as *const _; - #[doc = r"Return the pointer to the register block"] - #[inline(always)] - pub const fn ptr() -> *const lpcomp::RegisterBlock { - Self::PTR - } -} -impl Deref for LPCOMP { - type Target = lpcomp::RegisterBlock; - #[inline(always)] - fn deref(&self) -> &Self::Target { - unsafe { &*Self::PTR } - } -} -impl core::fmt::Debug for LPCOMP { - fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result { - f.debug_struct("LPCOMP").finish() - } -} -#[doc = "Low Power Comparator"] -pub mod lpcomp; -#[doc = "Event Generator Unit 0"] -pub struct EGU0 { - _marker: PhantomData<*const ()>, -} -unsafe impl Send for EGU0 {} -impl EGU0 { - #[doc = r"Pointer to the register block"] - pub const PTR: *const egu0::RegisterBlock = 0x4001_4000 as *const _; - #[doc = r"Return the pointer to the register block"] - #[inline(always)] - pub const fn ptr() -> *const egu0::RegisterBlock { - Self::PTR - } -} -impl Deref for EGU0 { - type Target = egu0::RegisterBlock; - #[inline(always)] - fn deref(&self) -> &Self::Target { - unsafe { &*Self::PTR } - } -} -impl core::fmt::Debug for EGU0 { - fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result { - f.debug_struct("EGU0").finish() - } -} -#[doc = "Event Generator Unit 0"] -pub mod egu0; -#[doc = "Software interrupt 0"] -pub struct SWI0 { - _marker: PhantomData<*const ()>, -} -unsafe impl Send for SWI0 {} -impl SWI0 { - #[doc = r"Pointer to the register block"] - pub const PTR: *const swi0::RegisterBlock = 0x4001_4000 as *const _; - #[doc = r"Return the pointer to the register block"] - #[inline(always)] - pub const fn ptr() -> *const swi0::RegisterBlock { - Self::PTR - } -} -impl Deref for SWI0 { - type Target = swi0::RegisterBlock; - #[inline(always)] - fn deref(&self) -> &Self::Target { - unsafe { &*Self::PTR } - } -} -impl core::fmt::Debug for SWI0 { - fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result { - f.debug_struct("SWI0").finish() - } -} -#[doc = "Software interrupt 0"] -pub mod swi0; -#[doc = "Event Generator Unit 1"] -pub struct EGU1 { - _marker: PhantomData<*const ()>, -} -unsafe impl Send for EGU1 {} -impl EGU1 { - #[doc = r"Pointer to the register block"] - pub const PTR: *const egu0::RegisterBlock = 0x4001_5000 as *const _; - #[doc = r"Return the pointer to the register block"] - #[inline(always)] - pub const fn ptr() -> *const egu0::RegisterBlock { - Self::PTR - } -} -impl Deref for EGU1 { - type Target = egu0::RegisterBlock; - #[inline(always)] - fn deref(&self) -> &Self::Target { - unsafe { &*Self::PTR } - } -} -impl core::fmt::Debug for EGU1 { - fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result { - f.debug_struct("EGU1").finish() - } -} -#[doc = "Event Generator Unit 1"] -pub use self::egu0 as egu1; -#[doc = "Software interrupt 1"] -pub struct SWI1 { - _marker: PhantomData<*const ()>, -} -unsafe impl Send for SWI1 {} -impl SWI1 { - #[doc = r"Pointer to the register block"] - pub const PTR: *const swi0::RegisterBlock = 0x4001_5000 as *const _; - #[doc = r"Return the pointer to the register block"] - #[inline(always)] - pub const fn ptr() -> *const swi0::RegisterBlock { - Self::PTR - } -} -impl Deref for SWI1 { - type Target = swi0::RegisterBlock; - #[inline(always)] - fn deref(&self) -> &Self::Target { - unsafe { &*Self::PTR } - } -} -impl core::fmt::Debug for SWI1 { - fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result { - f.debug_struct("SWI1").finish() - } -} -#[doc = "Software interrupt 1"] -pub use self::swi0 as swi1; -#[doc = "Event Generator Unit 2"] -pub struct EGU2 { - _marker: PhantomData<*const ()>, -} -unsafe impl Send for EGU2 {} -impl EGU2 { - #[doc = r"Pointer to the register block"] - pub const PTR: *const egu0::RegisterBlock = 0x4001_6000 as *const _; - #[doc = r"Return the pointer to the register block"] - #[inline(always)] - pub const fn ptr() -> *const egu0::RegisterBlock { - Self::PTR - } -} -impl Deref for EGU2 { - type Target = egu0::RegisterBlock; - #[inline(always)] - fn deref(&self) -> &Self::Target { - unsafe { &*Self::PTR } - } -} -impl core::fmt::Debug for EGU2 { - fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result { - f.debug_struct("EGU2").finish() - } -} -#[doc = "Event Generator Unit 2"] -pub use self::egu0 as egu2; -#[doc = "Software interrupt 2"] -pub struct SWI2 { - _marker: PhantomData<*const ()>, -} -unsafe impl Send for SWI2 {} -impl SWI2 { - #[doc = r"Pointer to the register block"] - pub const PTR: *const swi0::RegisterBlock = 0x4001_6000 as *const _; - #[doc = r"Return the pointer to the register block"] - #[inline(always)] - pub const fn ptr() -> *const swi0::RegisterBlock { - Self::PTR - } -} -impl Deref for SWI2 { - type Target = swi0::RegisterBlock; - #[inline(always)] - fn deref(&self) -> &Self::Target { - unsafe { &*Self::PTR } - } -} -impl core::fmt::Debug for SWI2 { - fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result { - f.debug_struct("SWI2").finish() - } -} -#[doc = "Software interrupt 2"] -pub use self::swi0 as swi2; -#[doc = "Event Generator Unit 3"] -pub struct EGU3 { - _marker: PhantomData<*const ()>, -} -unsafe impl Send for EGU3 {} -impl EGU3 { - #[doc = r"Pointer to the register block"] - pub const PTR: *const egu0::RegisterBlock = 0x4001_7000 as *const _; - #[doc = r"Return the pointer to the register block"] - #[inline(always)] - pub const fn ptr() -> *const egu0::RegisterBlock { - Self::PTR - } -} -impl Deref for EGU3 { - type Target = egu0::RegisterBlock; - #[inline(always)] - fn deref(&self) -> &Self::Target { - unsafe { &*Self::PTR } - } -} -impl core::fmt::Debug for EGU3 { - fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result { - f.debug_struct("EGU3").finish() - } -} -#[doc = "Event Generator Unit 3"] -pub use self::egu0 as egu3; -#[doc = "Software interrupt 3"] -pub struct SWI3 { - _marker: PhantomData<*const ()>, -} -unsafe impl Send for SWI3 {} -impl SWI3 { - #[doc = r"Pointer to the register block"] - pub const PTR: *const swi0::RegisterBlock = 0x4001_7000 as *const _; - #[doc = r"Return the pointer to the register block"] - #[inline(always)] - pub const fn ptr() -> *const swi0::RegisterBlock { - Self::PTR - } -} -impl Deref for SWI3 { - type Target = swi0::RegisterBlock; - #[inline(always)] - fn deref(&self) -> &Self::Target { - unsafe { &*Self::PTR } - } -} -impl core::fmt::Debug for SWI3 { - fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result { - f.debug_struct("SWI3").finish() - } -} -#[doc = "Software interrupt 3"] -pub use self::swi0 as swi3; -#[doc = "Event Generator Unit 4"] -pub struct EGU4 { - _marker: PhantomData<*const ()>, -} -unsafe impl Send for EGU4 {} -impl EGU4 { - #[doc = r"Pointer to the register block"] - pub const PTR: *const egu0::RegisterBlock = 0x4001_8000 as *const _; - #[doc = r"Return the pointer to the register block"] - #[inline(always)] - pub const fn ptr() -> *const egu0::RegisterBlock { - Self::PTR - } -} -impl Deref for EGU4 { - type Target = egu0::RegisterBlock; - #[inline(always)] - fn deref(&self) -> &Self::Target { - unsafe { &*Self::PTR } - } -} -impl core::fmt::Debug for EGU4 { - fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result { - f.debug_struct("EGU4").finish() - } -} -#[doc = "Event Generator Unit 4"] -pub use self::egu0 as egu4; -#[doc = "Software interrupt 4"] -pub struct SWI4 { - _marker: PhantomData<*const ()>, -} -unsafe impl Send for SWI4 {} -impl SWI4 { - #[doc = r"Pointer to the register block"] - pub const PTR: *const swi0::RegisterBlock = 0x4001_8000 as *const _; - #[doc = r"Return the pointer to the register block"] - #[inline(always)] - pub const fn ptr() -> *const swi0::RegisterBlock { - Self::PTR - } -} -impl Deref for SWI4 { - type Target = swi0::RegisterBlock; - #[inline(always)] - fn deref(&self) -> &Self::Target { - unsafe { &*Self::PTR } - } -} -impl core::fmt::Debug for SWI4 { - fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result { - f.debug_struct("SWI4").finish() - } -} -#[doc = "Software interrupt 4"] -pub use self::swi0 as swi4; -#[doc = "Event Generator Unit 5"] -pub struct EGU5 { - _marker: PhantomData<*const ()>, -} -unsafe impl Send for EGU5 {} -impl EGU5 { - #[doc = r"Pointer to the register block"] - pub const PTR: *const egu0::RegisterBlock = 0x4001_9000 as *const _; - #[doc = r"Return the pointer to the register block"] - #[inline(always)] - pub const fn ptr() -> *const egu0::RegisterBlock { - Self::PTR - } -} -impl Deref for EGU5 { - type Target = egu0::RegisterBlock; - #[inline(always)] - fn deref(&self) -> &Self::Target { - unsafe { &*Self::PTR } - } -} -impl core::fmt::Debug for EGU5 { - fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result { - f.debug_struct("EGU5").finish() - } -} -#[doc = "Event Generator Unit 5"] -pub use self::egu0 as egu5; -#[doc = "Software interrupt 5"] -pub struct SWI5 { - _marker: PhantomData<*const ()>, -} -unsafe impl Send for SWI5 {} -impl SWI5 { - #[doc = r"Pointer to the register block"] - pub const PTR: *const swi0::RegisterBlock = 0x4001_9000 as *const _; - #[doc = r"Return the pointer to the register block"] - #[inline(always)] - pub const fn ptr() -> *const swi0::RegisterBlock { - Self::PTR - } -} -impl Deref for SWI5 { - type Target = swi0::RegisterBlock; - #[inline(always)] - fn deref(&self) -> &Self::Target { - unsafe { &*Self::PTR } - } -} -impl core::fmt::Debug for SWI5 { - fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result { - f.debug_struct("SWI5").finish() - } -} -#[doc = "Software interrupt 5"] -pub use self::swi0 as swi5; -#[doc = "Timer/Counter 3"] -pub struct TIMER3 { - _marker: PhantomData<*const ()>, -} -unsafe impl Send for TIMER3 {} -impl TIMER3 { - #[doc = r"Pointer to the register block"] - pub const PTR: *const timer0::RegisterBlock = 0x4001_a000 as *const _; - #[doc = r"Return the pointer to the register block"] - #[inline(always)] - pub const fn ptr() -> *const timer0::RegisterBlock { - Self::PTR - } -} -impl Deref for TIMER3 { - type Target = timer0::RegisterBlock; - #[inline(always)] - fn deref(&self) -> &Self::Target { - unsafe { &*Self::PTR } - } -} -impl core::fmt::Debug for TIMER3 { - fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result { - f.debug_struct("TIMER3").finish() - } -} -#[doc = "Timer/Counter 3"] -pub use self::timer0 as timer3; -#[doc = "Timer/Counter 4"] -pub struct TIMER4 { - _marker: PhantomData<*const ()>, -} -unsafe impl Send for TIMER4 {} -impl TIMER4 { - #[doc = r"Pointer to the register block"] - pub const PTR: *const timer0::RegisterBlock = 0x4001_b000 as *const _; - #[doc = r"Return the pointer to the register block"] - #[inline(always)] - pub const fn ptr() -> *const timer0::RegisterBlock { - Self::PTR - } -} -impl Deref for TIMER4 { - type Target = timer0::RegisterBlock; - #[inline(always)] - fn deref(&self) -> &Self::Target { - unsafe { &*Self::PTR } - } -} -impl core::fmt::Debug for TIMER4 { - fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result { - f.debug_struct("TIMER4").finish() - } -} -#[doc = "Timer/Counter 4"] -pub use self::timer0 as timer4; -#[doc = "Pulse Width Modulation Unit 0"] -pub struct PWM0 { - _marker: PhantomData<*const ()>, -} -unsafe impl Send for PWM0 {} -impl PWM0 { - #[doc = r"Pointer to the register block"] - pub const PTR: *const pwm0::RegisterBlock = 0x4001_c000 as *const _; - #[doc = r"Return the pointer to the register block"] - #[inline(always)] - pub const fn ptr() -> *const pwm0::RegisterBlock { - Self::PTR - } -} -impl Deref for PWM0 { - type Target = pwm0::RegisterBlock; - #[inline(always)] - fn deref(&self) -> &Self::Target { - unsafe { &*Self::PTR } - } -} -impl core::fmt::Debug for PWM0 { - fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result { - f.debug_struct("PWM0").finish() - } -} -#[doc = "Pulse Width Modulation Unit 0"] -pub mod pwm0; -#[doc = "Pulse Density Modulation (Digital Microphone) Interface"] -pub struct PDM { - _marker: PhantomData<*const ()>, -} -unsafe impl Send for PDM {} -impl PDM { - #[doc = r"Pointer to the register block"] - pub const PTR: *const pdm::RegisterBlock = 0x4001_d000 as *const _; - #[doc = r"Return the pointer to the register block"] - #[inline(always)] - pub const fn ptr() -> *const pdm::RegisterBlock { - Self::PTR - } -} -impl Deref for PDM { - type Target = pdm::RegisterBlock; - #[inline(always)] - fn deref(&self) -> &Self::Target { - unsafe { &*Self::PTR } - } -} -impl core::fmt::Debug for PDM { - fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result { - f.debug_struct("PDM").finish() - } -} -#[doc = "Pulse Density Modulation (Digital Microphone) Interface"] -pub mod pdm; -#[doc = "Non Volatile Memory Controller"] -pub struct NVMC { - _marker: PhantomData<*const ()>, -} -unsafe impl Send for NVMC {} -impl NVMC { - #[doc = r"Pointer to the register block"] - pub const PTR: *const nvmc::RegisterBlock = 0x4001_e000 as *const _; - #[doc = r"Return the pointer to the register block"] - #[inline(always)] - pub const fn ptr() -> *const nvmc::RegisterBlock { - Self::PTR - } -} -impl Deref for NVMC { - type Target = nvmc::RegisterBlock; - #[inline(always)] - fn deref(&self) -> &Self::Target { - unsafe { &*Self::PTR } - } -} -impl core::fmt::Debug for NVMC { - fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result { - f.debug_struct("NVMC").finish() - } -} -#[doc = "Non Volatile Memory Controller"] -pub mod nvmc; -#[doc = "Programmable Peripheral Interconnect"] -pub struct PPI { - _marker: PhantomData<*const ()>, -} -unsafe impl Send for PPI {} -impl PPI { - #[doc = r"Pointer to the register block"] - pub const PTR: *const ppi::RegisterBlock = 0x4001_f000 as *const _; - #[doc = r"Return the pointer to the register block"] - #[inline(always)] - pub const fn ptr() -> *const ppi::RegisterBlock { - Self::PTR - } -} -impl Deref for PPI { - type Target = ppi::RegisterBlock; - #[inline(always)] - fn deref(&self) -> &Self::Target { - unsafe { &*Self::PTR } - } -} -impl core::fmt::Debug for PPI { - fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result { - f.debug_struct("PPI").finish() - } -} -#[doc = "Programmable Peripheral Interconnect"] -pub mod ppi; -#[doc = "Memory Watch Unit"] -pub struct MWU { - _marker: PhantomData<*const ()>, -} -unsafe impl Send for MWU {} -impl MWU { - #[doc = r"Pointer to the register block"] - pub const PTR: *const mwu::RegisterBlock = 0x4002_0000 as *const _; - #[doc = r"Return the pointer to the register block"] - #[inline(always)] - pub const fn ptr() -> *const mwu::RegisterBlock { - Self::PTR - } -} -impl Deref for MWU { - type Target = mwu::RegisterBlock; - #[inline(always)] - fn deref(&self) -> &Self::Target { - unsafe { &*Self::PTR } - } -} -impl core::fmt::Debug for MWU { - fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result { - f.debug_struct("MWU").finish() - } -} -#[doc = "Memory Watch Unit"] -pub mod mwu; -#[doc = "Pulse Width Modulation Unit 1"] -pub struct PWM1 { - _marker: PhantomData<*const ()>, -} -unsafe impl Send for PWM1 {} -impl PWM1 { - #[doc = r"Pointer to the register block"] - pub const PTR: *const pwm0::RegisterBlock = 0x4002_1000 as *const _; - #[doc = r"Return the pointer to the register block"] - #[inline(always)] - pub const fn ptr() -> *const pwm0::RegisterBlock { - Self::PTR - } -} -impl Deref for PWM1 { - type Target = pwm0::RegisterBlock; - #[inline(always)] - fn deref(&self) -> &Self::Target { - unsafe { &*Self::PTR } - } -} -impl core::fmt::Debug for PWM1 { - fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result { - f.debug_struct("PWM1").finish() - } -} -#[doc = "Pulse Width Modulation Unit 1"] -pub use self::pwm0 as pwm1; -#[doc = "Pulse Width Modulation Unit 2"] -pub struct PWM2 { - _marker: PhantomData<*const ()>, -} -unsafe impl Send for PWM2 {} -impl PWM2 { - #[doc = r"Pointer to the register block"] - pub const PTR: *const pwm0::RegisterBlock = 0x4002_2000 as *const _; - #[doc = r"Return the pointer to the register block"] - #[inline(always)] - pub const fn ptr() -> *const pwm0::RegisterBlock { - Self::PTR - } -} -impl Deref for PWM2 { - type Target = pwm0::RegisterBlock; - #[inline(always)] - fn deref(&self) -> &Self::Target { - unsafe { &*Self::PTR } - } -} -impl core::fmt::Debug for PWM2 { - fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result { - f.debug_struct("PWM2").finish() - } -} -#[doc = "Pulse Width Modulation Unit 2"] -pub use self::pwm0 as pwm2; -#[doc = "Serial Peripheral Interface 2"] -pub struct SPI2 { - _marker: PhantomData<*const ()>, -} -unsafe impl Send for SPI2 {} -impl SPI2 { - #[doc = r"Pointer to the register block"] - pub const PTR: *const spi0::RegisterBlock = 0x4002_3000 as *const _; - #[doc = r"Return the pointer to the register block"] - #[inline(always)] - pub const fn ptr() -> *const spi0::RegisterBlock { - Self::PTR - } -} -impl Deref for SPI2 { - type Target = spi0::RegisterBlock; - #[inline(always)] - fn deref(&self) -> &Self::Target { - unsafe { &*Self::PTR } - } -} -impl core::fmt::Debug for SPI2 { - fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result { - f.debug_struct("SPI2").finish() - } -} -#[doc = "Serial Peripheral Interface 2"] -pub use self::spi0 as spi2; -#[doc = "Serial Peripheral Interface Master with EasyDMA 2"] -pub struct SPIM2 { - _marker: PhantomData<*const ()>, -} -unsafe impl Send for SPIM2 {} -impl SPIM2 { - #[doc = r"Pointer to the register block"] - pub const PTR: *const spim0::RegisterBlock = 0x4002_3000 as *const _; - #[doc = r"Return the pointer to the register block"] - #[inline(always)] - pub const fn ptr() -> *const spim0::RegisterBlock { - Self::PTR - } -} -impl Deref for SPIM2 { - type Target = spim0::RegisterBlock; - #[inline(always)] - fn deref(&self) -> &Self::Target { - unsafe { &*Self::PTR } - } -} -impl core::fmt::Debug for SPIM2 { - fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result { - f.debug_struct("SPIM2").finish() - } -} -#[doc = "Serial Peripheral Interface Master with EasyDMA 2"] -pub use self::spim0 as spim2; -#[doc = "SPI Slave 2"] -pub struct SPIS2 { - _marker: PhantomData<*const ()>, -} -unsafe impl Send for SPIS2 {} -impl SPIS2 { - #[doc = r"Pointer to the register block"] - pub const PTR: *const spis0::RegisterBlock = 0x4002_3000 as *const _; - #[doc = r"Return the pointer to the register block"] - #[inline(always)] - pub const fn ptr() -> *const spis0::RegisterBlock { - Self::PTR - } -} -impl Deref for SPIS2 { - type Target = spis0::RegisterBlock; - #[inline(always)] - fn deref(&self) -> &Self::Target { - unsafe { &*Self::PTR } - } -} -impl core::fmt::Debug for SPIS2 { - fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result { - f.debug_struct("SPIS2").finish() - } -} -#[doc = "SPI Slave 2"] -pub use self::spis0 as spis2; -#[doc = "Real time counter 2"] -pub struct RTC2 { - _marker: PhantomData<*const ()>, -} -unsafe impl Send for RTC2 {} -impl RTC2 { - #[doc = r"Pointer to the register block"] - pub const PTR: *const rtc0::RegisterBlock = 0x4002_4000 as *const _; - #[doc = r"Return the pointer to the register block"] - #[inline(always)] - pub const fn ptr() -> *const rtc0::RegisterBlock { - Self::PTR - } -} -impl Deref for RTC2 { - type Target = rtc0::RegisterBlock; - #[inline(always)] - fn deref(&self) -> &Self::Target { - unsafe { &*Self::PTR } - } -} -impl core::fmt::Debug for RTC2 { - fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result { - f.debug_struct("RTC2").finish() - } -} -#[doc = "Real time counter 2"] -pub use self::rtc0 as rtc2; -#[doc = "Inter-IC Sound"] -pub struct I2S { - _marker: PhantomData<*const ()>, -} -unsafe impl Send for I2S {} -impl I2S { - #[doc = r"Pointer to the register block"] - pub const PTR: *const i2s::RegisterBlock = 0x4002_5000 as *const _; - #[doc = r"Return the pointer to the register block"] - #[inline(always)] - pub const fn ptr() -> *const i2s::RegisterBlock { - Self::PTR - } -} -impl Deref for I2S { - type Target = i2s::RegisterBlock; - #[inline(always)] - fn deref(&self) -> &Self::Target { - unsafe { &*Self::PTR } - } -} -impl core::fmt::Debug for I2S { - fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result { - f.debug_struct("I2S").finish() - } -} -#[doc = "Inter-IC Sound"] -pub mod i2s; -#[no_mangle] -static mut DEVICE_PERIPHERALS: bool = false; -#[doc = r" All the peripherals."] -#[allow(non_snake_case)] -pub struct Peripherals { - #[doc = "FICR"] - pub FICR: FICR, - #[doc = "UICR"] - pub UICR: UICR, - #[doc = "APPROTECT"] - pub APPROTECT: APPROTECT, - #[doc = "BPROT"] - pub BPROT: BPROT, - #[doc = "CLOCK"] - pub CLOCK: CLOCK, - #[doc = "POWER"] - pub POWER: POWER, - #[doc = "P0"] - pub P0: P0, - #[doc = "RADIO"] - pub RADIO: RADIO, - #[doc = "UART0"] - pub UART0: UART0, - #[doc = "UARTE0"] - pub UARTE0: UARTE0, - #[doc = "SPI0"] - pub SPI0: SPI0, - #[doc = "SPIM0"] - pub SPIM0: SPIM0, - #[doc = "SPIS0"] - pub SPIS0: SPIS0, - #[doc = "TWI0"] - pub TWI0: TWI0, - #[doc = "TWIM0"] - pub TWIM0: TWIM0, - #[doc = "TWIS0"] - pub TWIS0: TWIS0, - #[doc = "SPI1"] - pub SPI1: SPI1, - #[doc = "SPIM1"] - pub SPIM1: SPIM1, - #[doc = "SPIS1"] - pub SPIS1: SPIS1, - #[doc = "TWI1"] - pub TWI1: TWI1, - #[doc = "TWIM1"] - pub TWIM1: TWIM1, - #[doc = "TWIS1"] - pub TWIS1: TWIS1, - #[doc = "NFCT"] - pub NFCT: NFCT, - #[doc = "GPIOTE"] - pub GPIOTE: GPIOTE, - #[doc = "SAADC"] - pub SAADC: SAADC, - #[doc = "TIMER0"] - pub TIMER0: TIMER0, - #[doc = "TIMER1"] - pub TIMER1: TIMER1, - #[doc = "TIMER2"] - pub TIMER2: TIMER2, - #[doc = "RTC0"] - pub RTC0: RTC0, - #[doc = "TEMP"] - pub TEMP: TEMP, - #[doc = "RNG"] - pub RNG: RNG, - #[doc = "ECB"] - pub ECB: ECB, - #[doc = "AAR"] - pub AAR: AAR, - #[doc = "CCM"] - pub CCM: CCM, - #[doc = "WDT"] - pub WDT: WDT, - #[doc = "RTC1"] - pub RTC1: RTC1, - #[doc = "QDEC"] - pub QDEC: QDEC, - #[doc = "COMP"] - pub COMP: COMP, - #[doc = "LPCOMP"] - pub LPCOMP: LPCOMP, - #[doc = "EGU0"] - pub EGU0: EGU0, - #[doc = "SWI0"] - pub SWI0: SWI0, - #[doc = "EGU1"] - pub EGU1: EGU1, - #[doc = "SWI1"] - pub SWI1: SWI1, - #[doc = "EGU2"] - pub EGU2: EGU2, - #[doc = "SWI2"] - pub SWI2: SWI2, - #[doc = "EGU3"] - pub EGU3: EGU3, - #[doc = "SWI3"] - pub SWI3: SWI3, - #[doc = "EGU4"] - pub EGU4: EGU4, - #[doc = "SWI4"] - pub SWI4: SWI4, - #[doc = "EGU5"] - pub EGU5: EGU5, - #[doc = "SWI5"] - pub SWI5: SWI5, - #[doc = "TIMER3"] - pub TIMER3: TIMER3, - #[doc = "TIMER4"] - pub TIMER4: TIMER4, - #[doc = "PWM0"] - pub PWM0: PWM0, - #[doc = "PDM"] - pub PDM: PDM, - #[doc = "NVMC"] - pub NVMC: NVMC, - #[doc = "PPI"] - pub PPI: PPI, - #[doc = "MWU"] - pub MWU: MWU, - #[doc = "PWM1"] - pub PWM1: PWM1, - #[doc = "PWM2"] - pub PWM2: PWM2, - #[doc = "SPI2"] - pub SPI2: SPI2, - #[doc = "SPIM2"] - pub SPIM2: SPIM2, - #[doc = "SPIS2"] - pub SPIS2: SPIS2, - #[doc = "RTC2"] - pub RTC2: RTC2, - #[doc = "I2S"] - pub I2S: I2S, -} -impl Peripherals { - #[doc = r" Returns all the peripherals *once*."] - #[cfg(feature = "critical-section")] - #[inline] - pub fn take() -> Option { - critical_section::with(|_| { - if unsafe { DEVICE_PERIPHERALS } { - return None; - } - Some(unsafe { Peripherals::steal() }) - }) - } - #[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; - Peripherals { - FICR: FICR { - _marker: PhantomData, - }, - UICR: UICR { - _marker: PhantomData, - }, - APPROTECT: APPROTECT { - _marker: PhantomData, - }, - BPROT: BPROT { - _marker: PhantomData, - }, - CLOCK: CLOCK { - _marker: PhantomData, - }, - POWER: POWER { - _marker: PhantomData, - }, - P0: P0 { - _marker: PhantomData, - }, - RADIO: RADIO { - _marker: PhantomData, - }, - UART0: UART0 { - _marker: PhantomData, - }, - UARTE0: UARTE0 { - _marker: PhantomData, - }, - SPI0: SPI0 { - _marker: PhantomData, - }, - SPIM0: SPIM0 { - _marker: PhantomData, - }, - SPIS0: SPIS0 { - _marker: PhantomData, - }, - TWI0: TWI0 { - _marker: PhantomData, - }, - TWIM0: TWIM0 { - _marker: PhantomData, - }, - TWIS0: TWIS0 { - _marker: PhantomData, - }, - SPI1: SPI1 { - _marker: PhantomData, - }, - SPIM1: SPIM1 { - _marker: PhantomData, - }, - SPIS1: SPIS1 { - _marker: PhantomData, - }, - TWI1: TWI1 { - _marker: PhantomData, - }, - TWIM1: TWIM1 { - _marker: PhantomData, - }, - TWIS1: TWIS1 { - _marker: PhantomData, - }, - NFCT: NFCT { - _marker: PhantomData, - }, - GPIOTE: GPIOTE { - _marker: PhantomData, - }, - SAADC: SAADC { - _marker: PhantomData, - }, - TIMER0: TIMER0 { - _marker: PhantomData, - }, - TIMER1: TIMER1 { - _marker: PhantomData, - }, - TIMER2: TIMER2 { - _marker: PhantomData, - }, - RTC0: RTC0 { - _marker: PhantomData, - }, - TEMP: TEMP { - _marker: PhantomData, - }, - RNG: RNG { - _marker: PhantomData, - }, - ECB: ECB { - _marker: PhantomData, - }, - AAR: AAR { - _marker: PhantomData, - }, - CCM: CCM { - _marker: PhantomData, - }, - WDT: WDT { - _marker: PhantomData, - }, - RTC1: RTC1 { - _marker: PhantomData, - }, - QDEC: QDEC { - _marker: PhantomData, - }, - COMP: COMP { - _marker: PhantomData, - }, - LPCOMP: LPCOMP { - _marker: PhantomData, - }, - EGU0: EGU0 { - _marker: PhantomData, - }, - SWI0: SWI0 { - _marker: PhantomData, - }, - EGU1: EGU1 { - _marker: PhantomData, - }, - SWI1: SWI1 { - _marker: PhantomData, - }, - EGU2: EGU2 { - _marker: PhantomData, - }, - SWI2: SWI2 { - _marker: PhantomData, - }, - EGU3: EGU3 { - _marker: PhantomData, - }, - SWI3: SWI3 { - _marker: PhantomData, - }, - EGU4: EGU4 { - _marker: PhantomData, - }, - SWI4: SWI4 { - _marker: PhantomData, - }, - EGU5: EGU5 { - _marker: PhantomData, - }, - SWI5: SWI5 { - _marker: PhantomData, - }, - TIMER3: TIMER3 { - _marker: PhantomData, - }, - TIMER4: TIMER4 { - _marker: PhantomData, - }, - PWM0: PWM0 { - _marker: PhantomData, - }, - PDM: PDM { - _marker: PhantomData, - }, - NVMC: NVMC { - _marker: PhantomData, - }, - PPI: PPI { - _marker: PhantomData, - }, - MWU: MWU { - _marker: PhantomData, - }, - PWM1: PWM1 { - _marker: PhantomData, - }, - PWM2: PWM2 { - _marker: PhantomData, - }, - SPI2: SPI2 { - _marker: PhantomData, - }, - SPIM2: SPIM2 { - _marker: PhantomData, - }, - SPIS2: SPIS2 { - _marker: PhantomData, - }, - RTC2: RTC2 { - _marker: PhantomData, - }, - I2S: I2S { - _marker: PhantomData, - }, - } - } -} diff --git a/down-the-stack/dk_pac/src/lpcomp.rs b/down-the-stack/dk_pac/src/lpcomp.rs deleted file mode 100644 index 914b3d1..0000000 --- a/down-the-stack/dk_pac/src/lpcomp.rs +++ /dev/null @@ -1,113 +0,0 @@ -#[doc = r"Register block"] -#[repr(C)] -pub struct RegisterBlock { - #[doc = "0x00 - Start comparator"] - pub tasks_start: TASKS_START, - #[doc = "0x04 - Stop comparator"] - pub tasks_stop: TASKS_STOP, - #[doc = "0x08 - Sample comparator value"] - pub tasks_sample: TASKS_SAMPLE, - _reserved3: [u8; 0xf4], - #[doc = "0x100 - LPCOMP is ready and output is valid"] - pub events_ready: EVENTS_READY, - #[doc = "0x104 - Downward crossing"] - pub events_down: EVENTS_DOWN, - #[doc = "0x108 - Upward crossing"] - pub events_up: EVENTS_UP, - #[doc = "0x10c - Downward or upward crossing"] - pub events_cross: EVENTS_CROSS, - _reserved7: [u8; 0xf0], - #[doc = "0x200 - Shortcuts between local events and tasks"] - pub shorts: SHORTS, - _reserved8: [u8; 0x0100], - #[doc = "0x304 - Enable interrupt"] - pub intenset: INTENSET, - #[doc = "0x308 - Disable interrupt"] - pub intenclr: INTENCLR, - _reserved10: [u8; 0xf4], - #[doc = "0x400 - Compare result"] - pub result: RESULT, - _reserved11: [u8; 0xfc], - #[doc = "0x500 - Enable LPCOMP"] - pub enable: ENABLE, - #[doc = "0x504 - Input pin select"] - pub psel: PSEL, - #[doc = "0x508 - Reference select"] - pub refsel: REFSEL, - #[doc = "0x50c - External reference select"] - pub extrefsel: EXTREFSEL, - _reserved15: [u8; 0x10], - #[doc = "0x520 - Analog detect configuration"] - pub anadetect: ANADETECT, - _reserved16: [u8; 0x14], - #[doc = "0x538 - Comparator hysteresis enable"] - pub hyst: HYST, -} -#[doc = "TASKS_START (w) register accessor: an alias for `Reg`"] -pub type TASKS_START = crate::Reg; -#[doc = "Start comparator"] -pub mod tasks_start; -#[doc = "TASKS_STOP (w) register accessor: an alias for `Reg`"] -pub type TASKS_STOP = crate::Reg; -#[doc = "Stop comparator"] -pub mod tasks_stop; -#[doc = "TASKS_SAMPLE (w) register accessor: an alias for `Reg`"] -pub type TASKS_SAMPLE = crate::Reg; -#[doc = "Sample comparator value"] -pub mod tasks_sample; -#[doc = "EVENTS_READY (rw) register accessor: an alias for `Reg`"] -pub type EVENTS_READY = crate::Reg; -#[doc = "LPCOMP is ready and output is valid"] -pub mod events_ready; -#[doc = "EVENTS_DOWN (rw) register accessor: an alias for `Reg`"] -pub type EVENTS_DOWN = crate::Reg; -#[doc = "Downward crossing"] -pub mod events_down; -#[doc = "EVENTS_UP (rw) register accessor: an alias for `Reg`"] -pub type EVENTS_UP = crate::Reg; -#[doc = "Upward crossing"] -pub mod events_up; -#[doc = "EVENTS_CROSS (rw) register accessor: an alias for `Reg`"] -pub type EVENTS_CROSS = crate::Reg; -#[doc = "Downward or upward crossing"] -pub mod events_cross; -#[doc = "SHORTS (rw) register accessor: an alias for `Reg`"] -pub type SHORTS = crate::Reg; -#[doc = "Shortcuts between local events and tasks"] -pub mod shorts; -#[doc = "INTENSET (rw) register accessor: an alias for `Reg`"] -pub type INTENSET = crate::Reg; -#[doc = "Enable interrupt"] -pub mod intenset; -#[doc = "INTENCLR (rw) register accessor: an alias for `Reg`"] -pub type INTENCLR = crate::Reg; -#[doc = "Disable interrupt"] -pub mod intenclr; -#[doc = "RESULT (r) register accessor: an alias for `Reg`"] -pub type RESULT = crate::Reg; -#[doc = "Compare result"] -pub mod result; -#[doc = "ENABLE (rw) register accessor: an alias for `Reg`"] -pub type ENABLE = crate::Reg; -#[doc = "Enable LPCOMP"] -pub mod enable; -#[doc = "PSEL (rw) register accessor: an alias for `Reg`"] -pub type PSEL = crate::Reg; -#[doc = "Input pin select"] -pub mod psel; -#[doc = "REFSEL (rw) register accessor: an alias for `Reg`"] -pub type REFSEL = crate::Reg; -#[doc = "Reference select"] -pub mod refsel; -#[doc = "EXTREFSEL (rw) register accessor: an alias for `Reg`"] -pub type EXTREFSEL = crate::Reg; -#[doc = "External reference select"] -pub mod extrefsel; -#[doc = "ANADETECT (rw) register accessor: an alias for `Reg`"] -pub type ANADETECT = crate::Reg; -#[doc = "Analog detect configuration"] -pub mod anadetect; -#[doc = "HYST (rw) register accessor: an alias for `Reg`"] -pub type HYST = crate::Reg; -#[doc = "Comparator hysteresis enable"] -pub mod hyst; diff --git a/down-the-stack/dk_pac/src/lpcomp/anadetect.rs b/down-the-stack/dk_pac/src/lpcomp/anadetect.rs deleted file mode 100644 index c2db126..0000000 --- a/down-the-stack/dk_pac/src/lpcomp/anadetect.rs +++ /dev/null @@ -1,142 +0,0 @@ -#[doc = "Register `ANADETECT` 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 `ANADETECT` 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 `ANADETECT` reader - Analog detect configuration"] -pub type ANADETECT_R = crate::FieldReader; -#[doc = "Analog detect configuration\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -#[repr(u8)] -pub enum ANADETECT_A { - #[doc = "0: Generate ANADETECT on crossing, both upward crossing and downward crossing"] - CROSS = 0, - #[doc = "1: Generate ANADETECT on upward crossing only"] - UP = 1, - #[doc = "2: Generate ANADETECT on downward crossing only"] - DOWN = 2, -} -impl From for u8 { - #[inline(always)] - fn from(variant: ANADETECT_A) -> Self { - variant as _ - } -} -impl ANADETECT_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> Option { - match self.bits { - 0 => Some(ANADETECT_A::CROSS), - 1 => Some(ANADETECT_A::UP), - 2 => Some(ANADETECT_A::DOWN), - _ => None, - } - } - #[doc = "Checks if the value of the field is `CROSS`"] - #[inline(always)] - pub fn is_cross(&self) -> bool { - *self == ANADETECT_A::CROSS - } - #[doc = "Checks if the value of the field is `UP`"] - #[inline(always)] - pub fn is_up(&self) -> bool { - *self == ANADETECT_A::UP - } - #[doc = "Checks if the value of the field is `DOWN`"] - #[inline(always)] - pub fn is_down(&self) -> bool { - *self == ANADETECT_A::DOWN - } -} -#[doc = "Field `ANADETECT` writer - Analog detect configuration"] -pub type ANADETECT_W<'a, const O: u8> = - crate::FieldWriter<'a, u32, ANADETECT_SPEC, u8, ANADETECT_A, 2, O>; -impl<'a, const O: u8> ANADETECT_W<'a, O> { - #[doc = "Generate ANADETECT on crossing, both upward crossing and downward crossing"] - #[inline(always)] - pub fn cross(self) -> &'a mut W { - self.variant(ANADETECT_A::CROSS) - } - #[doc = "Generate ANADETECT on upward crossing only"] - #[inline(always)] - pub fn up(self) -> &'a mut W { - self.variant(ANADETECT_A::UP) - } - #[doc = "Generate ANADETECT on downward crossing only"] - #[inline(always)] - pub fn down(self) -> &'a mut W { - self.variant(ANADETECT_A::DOWN) - } -} -impl R { - #[doc = "Bits 0:1 - Analog detect configuration"] - #[inline(always)] - pub fn anadetect(&self) -> ANADETECT_R { - ANADETECT_R::new((self.bits & 3) as u8) - } -} -impl W { - #[doc = "Bits 0:1 - Analog detect configuration"] - #[inline(always)] - #[must_use] - pub fn anadetect(&mut self) -> ANADETECT_W<0> { - ANADETECT_W::new(self) - } - #[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 = "Analog detect configuration\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 [anadetect](index.html) module"] -pub struct ANADETECT_SPEC; -impl crate::RegisterSpec for ANADETECT_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [anadetect::R](R) reader structure"] -impl crate::Readable for ANADETECT_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [anadetect::W](W) writer structure"] -impl crate::Writable for ANADETECT_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets ANADETECT to value 0"] -impl crate::Resettable for ANADETECT_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/lpcomp/enable.rs b/down-the-stack/dk_pac/src/lpcomp/enable.rs deleted file mode 100644 index 4d93bb5..0000000 --- a/down-the-stack/dk_pac/src/lpcomp/enable.rs +++ /dev/null @@ -1,128 +0,0 @@ -#[doc = "Register `ENABLE` 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 `ENABLE` 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 `ENABLE` reader - Enable or disable LPCOMP"] -pub type ENABLE_R = crate::FieldReader; -#[doc = "Enable or disable LPCOMP\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -#[repr(u8)] -pub enum ENABLE_A { - #[doc = "0: Disable"] - DISABLED = 0, - #[doc = "1: Enable"] - ENABLED = 1, -} -impl From for u8 { - #[inline(always)] - fn from(variant: ENABLE_A) -> Self { - variant as _ - } -} -impl ENABLE_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> Option { - match self.bits { - 0 => Some(ENABLE_A::DISABLED), - 1 => Some(ENABLE_A::ENABLED), - _ => None, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == ENABLE_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == ENABLE_A::ENABLED - } -} -#[doc = "Field `ENABLE` writer - Enable or disable LPCOMP"] -pub type ENABLE_W<'a, const O: u8> = crate::FieldWriter<'a, u32, ENABLE_SPEC, u8, ENABLE_A, 2, O>; -impl<'a, const O: u8> ENABLE_W<'a, O> { - #[doc = "Disable"] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(ENABLE_A::DISABLED) - } - #[doc = "Enable"] - #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(ENABLE_A::ENABLED) - } -} -impl R { - #[doc = "Bits 0:1 - Enable or disable LPCOMP"] - #[inline(always)] - pub fn enable(&self) -> ENABLE_R { - ENABLE_R::new((self.bits & 3) as u8) - } -} -impl W { - #[doc = "Bits 0:1 - Enable or disable LPCOMP"] - #[inline(always)] - #[must_use] - pub fn enable(&mut self) -> ENABLE_W<0> { - 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 - } -} -#[doc = "Enable LPCOMP\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 [enable](index.html) module"] -pub struct ENABLE_SPEC; -impl crate::RegisterSpec for ENABLE_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [enable::R](R) reader structure"] -impl crate::Readable for ENABLE_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [enable::W](W) writer structure"] -impl crate::Writable for ENABLE_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets ENABLE to value 0"] -impl crate::Resettable for ENABLE_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/lpcomp/events_cross.rs b/down-the-stack/dk_pac/src/lpcomp/events_cross.rs deleted file mode 100644 index e0925b7..0000000 --- a/down-the-stack/dk_pac/src/lpcomp/events_cross.rs +++ /dev/null @@ -1,127 +0,0 @@ -#[doc = "Register `EVENTS_CROSS` 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 `EVENTS_CROSS` 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 `EVENTS_CROSS` reader - Downward or upward crossing"] -pub type EVENTS_CROSS_R = crate::BitReader; -#[doc = "Downward or upward crossing\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum EVENTS_CROSS_A { - #[doc = "0: Event not generated"] - NOT_GENERATED = 0, - #[doc = "1: Event generated"] - GENERATED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: EVENTS_CROSS_A) -> Self { - variant as u8 != 0 - } -} -impl EVENTS_CROSS_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> EVENTS_CROSS_A { - match self.bits { - false => EVENTS_CROSS_A::NOT_GENERATED, - true => EVENTS_CROSS_A::GENERATED, - } - } - #[doc = "Checks if the value of the field is `NOT_GENERATED`"] - #[inline(always)] - pub fn is_not_generated(&self) -> bool { - *self == EVENTS_CROSS_A::NOT_GENERATED - } - #[doc = "Checks if the value of the field is `GENERATED`"] - #[inline(always)] - pub fn is_generated(&self) -> bool { - *self == EVENTS_CROSS_A::GENERATED - } -} -#[doc = "Field `EVENTS_CROSS` writer - Downward or upward crossing"] -pub type EVENTS_CROSS_W<'a, const O: u8> = - crate::BitWriter<'a, u32, EVENTS_CROSS_SPEC, EVENTS_CROSS_A, O>; -impl<'a, const O: u8> EVENTS_CROSS_W<'a, O> { - #[doc = "Event not generated"] - #[inline(always)] - pub fn not_generated(self) -> &'a mut W { - self.variant(EVENTS_CROSS_A::NOT_GENERATED) - } - #[doc = "Event generated"] - #[inline(always)] - pub fn generated(self) -> &'a mut W { - self.variant(EVENTS_CROSS_A::GENERATED) - } -} -impl R { - #[doc = "Bit 0 - Downward or upward crossing"] - #[inline(always)] - pub fn events_cross(&self) -> EVENTS_CROSS_R { - EVENTS_CROSS_R::new((self.bits & 1) != 0) - } -} -impl W { - #[doc = "Bit 0 - Downward or upward crossing"] - #[inline(always)] - #[must_use] - pub fn events_cross(&mut self) -> EVENTS_CROSS_W<0> { - EVENTS_CROSS_W::new(self) - } - #[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 = "Downward or upward crossing\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 [events_cross](index.html) module"] -pub struct EVENTS_CROSS_SPEC; -impl crate::RegisterSpec for EVENTS_CROSS_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [events_cross::R](R) reader structure"] -impl crate::Readable for EVENTS_CROSS_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [events_cross::W](W) writer structure"] -impl crate::Writable for EVENTS_CROSS_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets EVENTS_CROSS to value 0"] -impl crate::Resettable for EVENTS_CROSS_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/lpcomp/events_down.rs b/down-the-stack/dk_pac/src/lpcomp/events_down.rs deleted file mode 100644 index febe130..0000000 --- a/down-the-stack/dk_pac/src/lpcomp/events_down.rs +++ /dev/null @@ -1,127 +0,0 @@ -#[doc = "Register `EVENTS_DOWN` 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 `EVENTS_DOWN` 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 `EVENTS_DOWN` reader - Downward crossing"] -pub type EVENTS_DOWN_R = crate::BitReader; -#[doc = "Downward crossing\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum EVENTS_DOWN_A { - #[doc = "0: Event not generated"] - NOT_GENERATED = 0, - #[doc = "1: Event generated"] - GENERATED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: EVENTS_DOWN_A) -> Self { - variant as u8 != 0 - } -} -impl EVENTS_DOWN_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> EVENTS_DOWN_A { - match self.bits { - false => EVENTS_DOWN_A::NOT_GENERATED, - true => EVENTS_DOWN_A::GENERATED, - } - } - #[doc = "Checks if the value of the field is `NOT_GENERATED`"] - #[inline(always)] - pub fn is_not_generated(&self) -> bool { - *self == EVENTS_DOWN_A::NOT_GENERATED - } - #[doc = "Checks if the value of the field is `GENERATED`"] - #[inline(always)] - pub fn is_generated(&self) -> bool { - *self == EVENTS_DOWN_A::GENERATED - } -} -#[doc = "Field `EVENTS_DOWN` writer - Downward crossing"] -pub type EVENTS_DOWN_W<'a, const O: u8> = - crate::BitWriter<'a, u32, EVENTS_DOWN_SPEC, EVENTS_DOWN_A, O>; -impl<'a, const O: u8> EVENTS_DOWN_W<'a, O> { - #[doc = "Event not generated"] - #[inline(always)] - pub fn not_generated(self) -> &'a mut W { - self.variant(EVENTS_DOWN_A::NOT_GENERATED) - } - #[doc = "Event generated"] - #[inline(always)] - pub fn generated(self) -> &'a mut W { - self.variant(EVENTS_DOWN_A::GENERATED) - } -} -impl R { - #[doc = "Bit 0 - Downward crossing"] - #[inline(always)] - pub fn events_down(&self) -> EVENTS_DOWN_R { - EVENTS_DOWN_R::new((self.bits & 1) != 0) - } -} -impl W { - #[doc = "Bit 0 - Downward crossing"] - #[inline(always)] - #[must_use] - pub fn events_down(&mut self) -> EVENTS_DOWN_W<0> { - EVENTS_DOWN_W::new(self) - } - #[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 = "Downward crossing\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 [events_down](index.html) module"] -pub struct EVENTS_DOWN_SPEC; -impl crate::RegisterSpec for EVENTS_DOWN_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [events_down::R](R) reader structure"] -impl crate::Readable for EVENTS_DOWN_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [events_down::W](W) writer structure"] -impl crate::Writable for EVENTS_DOWN_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets EVENTS_DOWN to value 0"] -impl crate::Resettable for EVENTS_DOWN_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/lpcomp/events_ready.rs b/down-the-stack/dk_pac/src/lpcomp/events_ready.rs deleted file mode 100644 index b071899..0000000 --- a/down-the-stack/dk_pac/src/lpcomp/events_ready.rs +++ /dev/null @@ -1,127 +0,0 @@ -#[doc = "Register `EVENTS_READY` 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 `EVENTS_READY` 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 `EVENTS_READY` reader - LPCOMP is ready and output is valid"] -pub type EVENTS_READY_R = crate::BitReader; -#[doc = "LPCOMP is ready and output is valid\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum EVENTS_READY_A { - #[doc = "0: Event not generated"] - NOT_GENERATED = 0, - #[doc = "1: Event generated"] - GENERATED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: EVENTS_READY_A) -> Self { - variant as u8 != 0 - } -} -impl EVENTS_READY_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> EVENTS_READY_A { - match self.bits { - false => EVENTS_READY_A::NOT_GENERATED, - true => EVENTS_READY_A::GENERATED, - } - } - #[doc = "Checks if the value of the field is `NOT_GENERATED`"] - #[inline(always)] - pub fn is_not_generated(&self) -> bool { - *self == EVENTS_READY_A::NOT_GENERATED - } - #[doc = "Checks if the value of the field is `GENERATED`"] - #[inline(always)] - pub fn is_generated(&self) -> bool { - *self == EVENTS_READY_A::GENERATED - } -} -#[doc = "Field `EVENTS_READY` writer - LPCOMP is ready and output is valid"] -pub type EVENTS_READY_W<'a, const O: u8> = - crate::BitWriter<'a, u32, EVENTS_READY_SPEC, EVENTS_READY_A, O>; -impl<'a, const O: u8> EVENTS_READY_W<'a, O> { - #[doc = "Event not generated"] - #[inline(always)] - pub fn not_generated(self) -> &'a mut W { - self.variant(EVENTS_READY_A::NOT_GENERATED) - } - #[doc = "Event generated"] - #[inline(always)] - pub fn generated(self) -> &'a mut W { - self.variant(EVENTS_READY_A::GENERATED) - } -} -impl R { - #[doc = "Bit 0 - LPCOMP is ready and output is valid"] - #[inline(always)] - pub fn events_ready(&self) -> EVENTS_READY_R { - EVENTS_READY_R::new((self.bits & 1) != 0) - } -} -impl W { - #[doc = "Bit 0 - LPCOMP is ready and output is valid"] - #[inline(always)] - #[must_use] - pub fn events_ready(&mut self) -> EVENTS_READY_W<0> { - EVENTS_READY_W::new(self) - } - #[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 = "LPCOMP is ready and output is valid\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 [events_ready](index.html) module"] -pub struct EVENTS_READY_SPEC; -impl crate::RegisterSpec for EVENTS_READY_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [events_ready::R](R) reader structure"] -impl crate::Readable for EVENTS_READY_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [events_ready::W](W) writer structure"] -impl crate::Writable for EVENTS_READY_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets EVENTS_READY to value 0"] -impl crate::Resettable for EVENTS_READY_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/lpcomp/events_up.rs b/down-the-stack/dk_pac/src/lpcomp/events_up.rs deleted file mode 100644 index 81b5382..0000000 --- a/down-the-stack/dk_pac/src/lpcomp/events_up.rs +++ /dev/null @@ -1,126 +0,0 @@ -#[doc = "Register `EVENTS_UP` 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 `EVENTS_UP` 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 `EVENTS_UP` reader - Upward crossing"] -pub type EVENTS_UP_R = crate::BitReader; -#[doc = "Upward crossing\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum EVENTS_UP_A { - #[doc = "0: Event not generated"] - NOT_GENERATED = 0, - #[doc = "1: Event generated"] - GENERATED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: EVENTS_UP_A) -> Self { - variant as u8 != 0 - } -} -impl EVENTS_UP_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> EVENTS_UP_A { - match self.bits { - false => EVENTS_UP_A::NOT_GENERATED, - true => EVENTS_UP_A::GENERATED, - } - } - #[doc = "Checks if the value of the field is `NOT_GENERATED`"] - #[inline(always)] - pub fn is_not_generated(&self) -> bool { - *self == EVENTS_UP_A::NOT_GENERATED - } - #[doc = "Checks if the value of the field is `GENERATED`"] - #[inline(always)] - pub fn is_generated(&self) -> bool { - *self == EVENTS_UP_A::GENERATED - } -} -#[doc = "Field `EVENTS_UP` writer - Upward crossing"] -pub type EVENTS_UP_W<'a, const O: u8> = crate::BitWriter<'a, u32, EVENTS_UP_SPEC, EVENTS_UP_A, O>; -impl<'a, const O: u8> EVENTS_UP_W<'a, O> { - #[doc = "Event not generated"] - #[inline(always)] - pub fn not_generated(self) -> &'a mut W { - self.variant(EVENTS_UP_A::NOT_GENERATED) - } - #[doc = "Event generated"] - #[inline(always)] - pub fn generated(self) -> &'a mut W { - self.variant(EVENTS_UP_A::GENERATED) - } -} -impl R { - #[doc = "Bit 0 - Upward crossing"] - #[inline(always)] - pub fn events_up(&self) -> EVENTS_UP_R { - EVENTS_UP_R::new((self.bits & 1) != 0) - } -} -impl W { - #[doc = "Bit 0 - Upward crossing"] - #[inline(always)] - #[must_use] - pub fn events_up(&mut self) -> EVENTS_UP_W<0> { - EVENTS_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 - } -} -#[doc = "Upward crossing\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 [events_up](index.html) module"] -pub struct EVENTS_UP_SPEC; -impl crate::RegisterSpec for EVENTS_UP_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [events_up::R](R) reader structure"] -impl crate::Readable for EVENTS_UP_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [events_up::W](W) writer structure"] -impl crate::Writable for EVENTS_UP_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets EVENTS_UP to value 0"] -impl crate::Resettable for EVENTS_UP_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/lpcomp/extrefsel.rs b/down-the-stack/dk_pac/src/lpcomp/extrefsel.rs deleted file mode 100644 index 9d06c2e..0000000 --- a/down-the-stack/dk_pac/src/lpcomp/extrefsel.rs +++ /dev/null @@ -1,126 +0,0 @@ -#[doc = "Register `EXTREFSEL` 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 `EXTREFSEL` 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 `EXTREFSEL` reader - External analog reference select"] -pub type EXTREFSEL_R = crate::BitReader; -#[doc = "External analog reference select\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum EXTREFSEL_A { - #[doc = "0: Use AIN0 as external analog reference"] - ANALOG_REFERENCE0 = 0, - #[doc = "1: Use AIN1 as external analog reference"] - ANALOG_REFERENCE1 = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: EXTREFSEL_A) -> Self { - variant as u8 != 0 - } -} -impl EXTREFSEL_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> EXTREFSEL_A { - match self.bits { - false => EXTREFSEL_A::ANALOG_REFERENCE0, - true => EXTREFSEL_A::ANALOG_REFERENCE1, - } - } - #[doc = "Checks if the value of the field is `ANALOG_REFERENCE0`"] - #[inline(always)] - pub fn is_analog_reference0(&self) -> bool { - *self == EXTREFSEL_A::ANALOG_REFERENCE0 - } - #[doc = "Checks if the value of the field is `ANALOG_REFERENCE1`"] - #[inline(always)] - pub fn is_analog_reference1(&self) -> bool { - *self == EXTREFSEL_A::ANALOG_REFERENCE1 - } -} -#[doc = "Field `EXTREFSEL` writer - External analog reference select"] -pub type EXTREFSEL_W<'a, const O: u8> = crate::BitWriter<'a, u32, EXTREFSEL_SPEC, EXTREFSEL_A, O>; -impl<'a, const O: u8> EXTREFSEL_W<'a, O> { - #[doc = "Use AIN0 as external analog reference"] - #[inline(always)] - pub fn analog_reference0(self) -> &'a mut W { - self.variant(EXTREFSEL_A::ANALOG_REFERENCE0) - } - #[doc = "Use AIN1 as external analog reference"] - #[inline(always)] - pub fn analog_reference1(self) -> &'a mut W { - self.variant(EXTREFSEL_A::ANALOG_REFERENCE1) - } -} -impl R { - #[doc = "Bit 0 - External analog reference select"] - #[inline(always)] - pub fn extrefsel(&self) -> EXTREFSEL_R { - EXTREFSEL_R::new((self.bits & 1) != 0) - } -} -impl W { - #[doc = "Bit 0 - External analog reference select"] - #[inline(always)] - #[must_use] - pub fn extrefsel(&mut self) -> EXTREFSEL_W<0> { - EXTREFSEL_W::new(self) - } - #[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 = "External reference select\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 [extrefsel](index.html) module"] -pub struct EXTREFSEL_SPEC; -impl crate::RegisterSpec for EXTREFSEL_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [extrefsel::R](R) reader structure"] -impl crate::Readable for EXTREFSEL_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [extrefsel::W](W) writer structure"] -impl crate::Writable for EXTREFSEL_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets EXTREFSEL to value 0"] -impl crate::Resettable for EXTREFSEL_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/lpcomp/hyst.rs b/down-the-stack/dk_pac/src/lpcomp/hyst.rs deleted file mode 100644 index da5f961..0000000 --- a/down-the-stack/dk_pac/src/lpcomp/hyst.rs +++ /dev/null @@ -1,126 +0,0 @@ -#[doc = "Register `HYST` 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 `HYST` 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 `HYST` reader - Comparator hysteresis enable"] -pub type HYST_R = crate::BitReader; -#[doc = "Comparator hysteresis enable\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum HYST_A { - #[doc = "0: Comparator hysteresis disabled"] - NO_HYST = 0, - #[doc = "1: Comparator hysteresis disabled (typ. 50 mV)"] - HYST50M_V = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: HYST_A) -> Self { - variant as u8 != 0 - } -} -impl HYST_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> HYST_A { - match self.bits { - false => HYST_A::NO_HYST, - true => HYST_A::HYST50M_V, - } - } - #[doc = "Checks if the value of the field is `NO_HYST`"] - #[inline(always)] - pub fn is_no_hyst(&self) -> bool { - *self == HYST_A::NO_HYST - } - #[doc = "Checks if the value of the field is `HYST50M_V`"] - #[inline(always)] - pub fn is_hyst50m_v(&self) -> bool { - *self == HYST_A::HYST50M_V - } -} -#[doc = "Field `HYST` writer - Comparator hysteresis enable"] -pub type HYST_W<'a, const O: u8> = crate::BitWriter<'a, u32, HYST_SPEC, HYST_A, O>; -impl<'a, const O: u8> HYST_W<'a, O> { - #[doc = "Comparator hysteresis disabled"] - #[inline(always)] - pub fn no_hyst(self) -> &'a mut W { - self.variant(HYST_A::NO_HYST) - } - #[doc = "Comparator hysteresis disabled (typ. 50 mV)"] - #[inline(always)] - pub fn hyst50m_v(self) -> &'a mut W { - self.variant(HYST_A::HYST50M_V) - } -} -impl R { - #[doc = "Bit 0 - Comparator hysteresis enable"] - #[inline(always)] - pub fn hyst(&self) -> HYST_R { - HYST_R::new((self.bits & 1) != 0) - } -} -impl W { - #[doc = "Bit 0 - Comparator hysteresis enable"] - #[inline(always)] - #[must_use] - pub fn hyst(&mut self) -> HYST_W<0> { - HYST_W::new(self) - } - #[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 = "Comparator hysteresis enable\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 [hyst](index.html) module"] -pub struct HYST_SPEC; -impl crate::RegisterSpec for HYST_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [hyst::R](R) reader structure"] -impl crate::Readable for HYST_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [hyst::W](W) writer structure"] -impl crate::Writable for HYST_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets HYST to value 0"] -impl crate::Resettable for HYST_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/lpcomp/intenclr.rs b/down-the-stack/dk_pac/src/lpcomp/intenclr.rs deleted file mode 100644 index 83a9d57..0000000 --- a/down-the-stack/dk_pac/src/lpcomp/intenclr.rs +++ /dev/null @@ -1,337 +0,0 @@ -#[doc = "Register `INTENCLR` 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 `INTENCLR` 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 `READY` reader - Write '1' to disable interrupt for event READY"] -pub type READY_R = crate::BitReader; -#[doc = "Write '1' to disable interrupt for event READY\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum READY_A { - #[doc = "0: Read: Disabled"] - DISABLED = 0, - #[doc = "1: Read: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: READY_A) -> Self { - variant as u8 != 0 - } -} -impl READY_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> READY_A { - match self.bits { - false => READY_A::DISABLED, - true => READY_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == READY_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == READY_A::ENABLED - } -} -#[doc = "Write '1' to disable interrupt for event READY\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum READY_AW { - #[doc = "1: Disable"] - CLEAR = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: READY_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `READY` writer - Write '1' to disable interrupt for event READY"] -pub type READY_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENCLR_SPEC, READY_AW, O>; -impl<'a, const O: u8> READY_W<'a, O> { - #[doc = "Disable"] - #[inline(always)] - pub fn clear(self) -> &'a mut W { - self.variant(READY_AW::CLEAR) - } -} -#[doc = "Field `DOWN` reader - Write '1' to disable interrupt for event DOWN"] -pub type DOWN_R = crate::BitReader; -#[doc = "Write '1' to disable interrupt for event DOWN\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum DOWN_A { - #[doc = "0: Read: Disabled"] - DISABLED = 0, - #[doc = "1: Read: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: DOWN_A) -> Self { - variant as u8 != 0 - } -} -impl DOWN_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> DOWN_A { - match self.bits { - false => DOWN_A::DISABLED, - true => DOWN_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == DOWN_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == DOWN_A::ENABLED - } -} -#[doc = "Write '1' to disable interrupt for event DOWN\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum DOWN_AW { - #[doc = "1: Disable"] - CLEAR = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: DOWN_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `DOWN` writer - Write '1' to disable interrupt for event DOWN"] -pub type DOWN_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENCLR_SPEC, DOWN_AW, O>; -impl<'a, const O: u8> DOWN_W<'a, O> { - #[doc = "Disable"] - #[inline(always)] - pub fn clear(self) -> &'a mut W { - self.variant(DOWN_AW::CLEAR) - } -} -#[doc = "Field `UP` reader - Write '1' to disable interrupt for event UP"] -pub type UP_R = crate::BitReader; -#[doc = "Write '1' to disable interrupt for event UP\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum UP_A { - #[doc = "0: Read: Disabled"] - DISABLED = 0, - #[doc = "1: Read: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: UP_A) -> Self { - variant as u8 != 0 - } -} -impl UP_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> UP_A { - match self.bits { - false => UP_A::DISABLED, - true => UP_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == UP_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == UP_A::ENABLED - } -} -#[doc = "Write '1' to disable interrupt for event UP\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum UP_AW { - #[doc = "1: Disable"] - CLEAR = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: UP_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `UP` writer - Write '1' to disable interrupt for event UP"] -pub type UP_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENCLR_SPEC, UP_AW, O>; -impl<'a, const O: u8> UP_W<'a, O> { - #[doc = "Disable"] - #[inline(always)] - pub fn clear(self) -> &'a mut W { - self.variant(UP_AW::CLEAR) - } -} -#[doc = "Field `CROSS` reader - Write '1' to disable interrupt for event CROSS"] -pub type CROSS_R = crate::BitReader; -#[doc = "Write '1' to disable interrupt for event CROSS\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum CROSS_A { - #[doc = "0: Read: Disabled"] - DISABLED = 0, - #[doc = "1: Read: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: CROSS_A) -> Self { - variant as u8 != 0 - } -} -impl CROSS_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> CROSS_A { - match self.bits { - false => CROSS_A::DISABLED, - true => CROSS_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == CROSS_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == CROSS_A::ENABLED - } -} -#[doc = "Write '1' to disable interrupt for event CROSS\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum CROSS_AW { - #[doc = "1: Disable"] - CLEAR = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: CROSS_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `CROSS` writer - Write '1' to disable interrupt for event CROSS"] -pub type CROSS_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENCLR_SPEC, CROSS_AW, O>; -impl<'a, const O: u8> CROSS_W<'a, O> { - #[doc = "Disable"] - #[inline(always)] - pub fn clear(self) -> &'a mut W { - self.variant(CROSS_AW::CLEAR) - } -} -impl R { - #[doc = "Bit 0 - Write '1' to disable interrupt for event READY"] - #[inline(always)] - pub fn ready(&self) -> READY_R { - READY_R::new((self.bits & 1) != 0) - } - #[doc = "Bit 1 - Write '1' to disable interrupt for event DOWN"] - #[inline(always)] - pub fn down(&self) -> DOWN_R { - DOWN_R::new(((self.bits >> 1) & 1) != 0) - } - #[doc = "Bit 2 - Write '1' to disable interrupt for event UP"] - #[inline(always)] - pub fn up(&self) -> UP_R { - UP_R::new(((self.bits >> 2) & 1) != 0) - } - #[doc = "Bit 3 - Write '1' to disable interrupt for event CROSS"] - #[inline(always)] - pub fn cross(&self) -> CROSS_R { - CROSS_R::new(((self.bits >> 3) & 1) != 0) - } -} -impl W { - #[doc = "Bit 0 - Write '1' to disable interrupt for event READY"] - #[inline(always)] - #[must_use] - pub fn ready(&mut self) -> READY_W<0> { - READY_W::new(self) - } - #[doc = "Bit 1 - Write '1' to disable interrupt for event DOWN"] - #[inline(always)] - #[must_use] - pub fn down(&mut self) -> DOWN_W<1> { - DOWN_W::new(self) - } - #[doc = "Bit 2 - Write '1' to disable interrupt for event UP"] - #[inline(always)] - #[must_use] - pub fn up(&mut self) -> UP_W<2> { - UP_W::new(self) - } - #[doc = "Bit 3 - Write '1' to disable interrupt for event CROSS"] - #[inline(always)] - #[must_use] - pub fn cross(&mut self) -> CROSS_W<3> { - CROSS_W::new(self) - } - #[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 = "Disable interrupt\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 [intenclr](index.html) module"] -pub struct INTENCLR_SPEC; -impl crate::RegisterSpec for INTENCLR_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [intenclr::R](R) reader structure"] -impl crate::Readable for INTENCLR_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [intenclr::W](W) writer structure"] -impl crate::Writable for INTENCLR_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets INTENCLR to value 0"] -impl crate::Resettable for INTENCLR_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/lpcomp/intenset.rs b/down-the-stack/dk_pac/src/lpcomp/intenset.rs deleted file mode 100644 index 362f006..0000000 --- a/down-the-stack/dk_pac/src/lpcomp/intenset.rs +++ /dev/null @@ -1,337 +0,0 @@ -#[doc = "Register `INTENSET` 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 `INTENSET` 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 `READY` reader - Write '1' to enable interrupt for event READY"] -pub type READY_R = crate::BitReader; -#[doc = "Write '1' to enable interrupt for event READY\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum READY_A { - #[doc = "0: Read: Disabled"] - DISABLED = 0, - #[doc = "1: Read: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: READY_A) -> Self { - variant as u8 != 0 - } -} -impl READY_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> READY_A { - match self.bits { - false => READY_A::DISABLED, - true => READY_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == READY_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == READY_A::ENABLED - } -} -#[doc = "Write '1' to enable interrupt for event READY\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum READY_AW { - #[doc = "1: Enable"] - SET = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: READY_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `READY` writer - Write '1' to enable interrupt for event READY"] -pub type READY_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENSET_SPEC, READY_AW, O>; -impl<'a, const O: u8> READY_W<'a, O> { - #[doc = "Enable"] - #[inline(always)] - pub fn set(self) -> &'a mut W { - self.variant(READY_AW::SET) - } -} -#[doc = "Field `DOWN` reader - Write '1' to enable interrupt for event DOWN"] -pub type DOWN_R = crate::BitReader; -#[doc = "Write '1' to enable interrupt for event DOWN\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum DOWN_A { - #[doc = "0: Read: Disabled"] - DISABLED = 0, - #[doc = "1: Read: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: DOWN_A) -> Self { - variant as u8 != 0 - } -} -impl DOWN_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> DOWN_A { - match self.bits { - false => DOWN_A::DISABLED, - true => DOWN_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == DOWN_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == DOWN_A::ENABLED - } -} -#[doc = "Write '1' to enable interrupt for event DOWN\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum DOWN_AW { - #[doc = "1: Enable"] - SET = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: DOWN_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `DOWN` writer - Write '1' to enable interrupt for event DOWN"] -pub type DOWN_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENSET_SPEC, DOWN_AW, O>; -impl<'a, const O: u8> DOWN_W<'a, O> { - #[doc = "Enable"] - #[inline(always)] - pub fn set(self) -> &'a mut W { - self.variant(DOWN_AW::SET) - } -} -#[doc = "Field `UP` reader - Write '1' to enable interrupt for event UP"] -pub type UP_R = crate::BitReader; -#[doc = "Write '1' to enable interrupt for event UP\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum UP_A { - #[doc = "0: Read: Disabled"] - DISABLED = 0, - #[doc = "1: Read: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: UP_A) -> Self { - variant as u8 != 0 - } -} -impl UP_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> UP_A { - match self.bits { - false => UP_A::DISABLED, - true => UP_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == UP_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == UP_A::ENABLED - } -} -#[doc = "Write '1' to enable interrupt for event UP\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum UP_AW { - #[doc = "1: Enable"] - SET = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: UP_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `UP` writer - Write '1' to enable interrupt for event UP"] -pub type UP_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENSET_SPEC, UP_AW, O>; -impl<'a, const O: u8> UP_W<'a, O> { - #[doc = "Enable"] - #[inline(always)] - pub fn set(self) -> &'a mut W { - self.variant(UP_AW::SET) - } -} -#[doc = "Field `CROSS` reader - Write '1' to enable interrupt for event CROSS"] -pub type CROSS_R = crate::BitReader; -#[doc = "Write '1' to enable interrupt for event CROSS\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum CROSS_A { - #[doc = "0: Read: Disabled"] - DISABLED = 0, - #[doc = "1: Read: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: CROSS_A) -> Self { - variant as u8 != 0 - } -} -impl CROSS_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> CROSS_A { - match self.bits { - false => CROSS_A::DISABLED, - true => CROSS_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == CROSS_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == CROSS_A::ENABLED - } -} -#[doc = "Write '1' to enable interrupt for event CROSS\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum CROSS_AW { - #[doc = "1: Enable"] - SET = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: CROSS_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `CROSS` writer - Write '1' to enable interrupt for event CROSS"] -pub type CROSS_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENSET_SPEC, CROSS_AW, O>; -impl<'a, const O: u8> CROSS_W<'a, O> { - #[doc = "Enable"] - #[inline(always)] - pub fn set(self) -> &'a mut W { - self.variant(CROSS_AW::SET) - } -} -impl R { - #[doc = "Bit 0 - Write '1' to enable interrupt for event READY"] - #[inline(always)] - pub fn ready(&self) -> READY_R { - READY_R::new((self.bits & 1) != 0) - } - #[doc = "Bit 1 - Write '1' to enable interrupt for event DOWN"] - #[inline(always)] - pub fn down(&self) -> DOWN_R { - DOWN_R::new(((self.bits >> 1) & 1) != 0) - } - #[doc = "Bit 2 - Write '1' to enable interrupt for event UP"] - #[inline(always)] - pub fn up(&self) -> UP_R { - UP_R::new(((self.bits >> 2) & 1) != 0) - } - #[doc = "Bit 3 - Write '1' to enable interrupt for event CROSS"] - #[inline(always)] - pub fn cross(&self) -> CROSS_R { - CROSS_R::new(((self.bits >> 3) & 1) != 0) - } -} -impl W { - #[doc = "Bit 0 - Write '1' to enable interrupt for event READY"] - #[inline(always)] - #[must_use] - pub fn ready(&mut self) -> READY_W<0> { - READY_W::new(self) - } - #[doc = "Bit 1 - Write '1' to enable interrupt for event DOWN"] - #[inline(always)] - #[must_use] - pub fn down(&mut self) -> DOWN_W<1> { - DOWN_W::new(self) - } - #[doc = "Bit 2 - Write '1' to enable interrupt for event UP"] - #[inline(always)] - #[must_use] - pub fn up(&mut self) -> UP_W<2> { - UP_W::new(self) - } - #[doc = "Bit 3 - Write '1' to enable interrupt for event CROSS"] - #[inline(always)] - #[must_use] - pub fn cross(&mut self) -> CROSS_W<3> { - CROSS_W::new(self) - } - #[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 = "Enable interrupt\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 [intenset](index.html) module"] -pub struct INTENSET_SPEC; -impl crate::RegisterSpec for INTENSET_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [intenset::R](R) reader structure"] -impl crate::Readable for INTENSET_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [intenset::W](W) writer structure"] -impl crate::Writable for INTENSET_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets INTENSET to value 0"] -impl crate::Resettable for INTENSET_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/lpcomp/psel.rs b/down-the-stack/dk_pac/src/lpcomp/psel.rs deleted file mode 100644 index 2f240c2..0000000 --- a/down-the-stack/dk_pac/src/lpcomp/psel.rs +++ /dev/null @@ -1,206 +0,0 @@ -#[doc = "Register `PSEL` 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 `PSEL` 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 `PSEL` reader - Analog pin select"] -pub type PSEL_R = crate::FieldReader; -#[doc = "Analog pin select\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -#[repr(u8)] -pub enum PSEL_A { - #[doc = "0: AIN0 selected as analog input"] - ANALOG_INPUT0 = 0, - #[doc = "1: AIN1 selected as analog input"] - ANALOG_INPUT1 = 1, - #[doc = "2: AIN2 selected as analog input"] - ANALOG_INPUT2 = 2, - #[doc = "3: AIN3 selected as analog input"] - ANALOG_INPUT3 = 3, - #[doc = "4: AIN4 selected as analog input"] - ANALOG_INPUT4 = 4, - #[doc = "5: AIN5 selected as analog input"] - ANALOG_INPUT5 = 5, - #[doc = "6: AIN6 selected as analog input"] - ANALOG_INPUT6 = 6, - #[doc = "7: AIN7 selected as analog input"] - ANALOG_INPUT7 = 7, -} -impl From for u8 { - #[inline(always)] - fn from(variant: PSEL_A) -> Self { - variant as _ - } -} -impl PSEL_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> PSEL_A { - match self.bits { - 0 => PSEL_A::ANALOG_INPUT0, - 1 => PSEL_A::ANALOG_INPUT1, - 2 => PSEL_A::ANALOG_INPUT2, - 3 => PSEL_A::ANALOG_INPUT3, - 4 => PSEL_A::ANALOG_INPUT4, - 5 => PSEL_A::ANALOG_INPUT5, - 6 => PSEL_A::ANALOG_INPUT6, - 7 => PSEL_A::ANALOG_INPUT7, - _ => unreachable!(), - } - } - #[doc = "Checks if the value of the field is `ANALOG_INPUT0`"] - #[inline(always)] - pub fn is_analog_input0(&self) -> bool { - *self == PSEL_A::ANALOG_INPUT0 - } - #[doc = "Checks if the value of the field is `ANALOG_INPUT1`"] - #[inline(always)] - pub fn is_analog_input1(&self) -> bool { - *self == PSEL_A::ANALOG_INPUT1 - } - #[doc = "Checks if the value of the field is `ANALOG_INPUT2`"] - #[inline(always)] - pub fn is_analog_input2(&self) -> bool { - *self == PSEL_A::ANALOG_INPUT2 - } - #[doc = "Checks if the value of the field is `ANALOG_INPUT3`"] - #[inline(always)] - pub fn is_analog_input3(&self) -> bool { - *self == PSEL_A::ANALOG_INPUT3 - } - #[doc = "Checks if the value of the field is `ANALOG_INPUT4`"] - #[inline(always)] - pub fn is_analog_input4(&self) -> bool { - *self == PSEL_A::ANALOG_INPUT4 - } - #[doc = "Checks if the value of the field is `ANALOG_INPUT5`"] - #[inline(always)] - pub fn is_analog_input5(&self) -> bool { - *self == PSEL_A::ANALOG_INPUT5 - } - #[doc = "Checks if the value of the field is `ANALOG_INPUT6`"] - #[inline(always)] - pub fn is_analog_input6(&self) -> bool { - *self == PSEL_A::ANALOG_INPUT6 - } - #[doc = "Checks if the value of the field is `ANALOG_INPUT7`"] - #[inline(always)] - pub fn is_analog_input7(&self) -> bool { - *self == PSEL_A::ANALOG_INPUT7 - } -} -#[doc = "Field `PSEL` writer - Analog pin select"] -pub type PSEL_W<'a, const O: u8> = crate::FieldWriterSafe<'a, u32, PSEL_SPEC, u8, PSEL_A, 3, O>; -impl<'a, const O: u8> PSEL_W<'a, O> { - #[doc = "AIN0 selected as analog input"] - #[inline(always)] - pub fn analog_input0(self) -> &'a mut W { - self.variant(PSEL_A::ANALOG_INPUT0) - } - #[doc = "AIN1 selected as analog input"] - #[inline(always)] - pub fn analog_input1(self) -> &'a mut W { - self.variant(PSEL_A::ANALOG_INPUT1) - } - #[doc = "AIN2 selected as analog input"] - #[inline(always)] - pub fn analog_input2(self) -> &'a mut W { - self.variant(PSEL_A::ANALOG_INPUT2) - } - #[doc = "AIN3 selected as analog input"] - #[inline(always)] - pub fn analog_input3(self) -> &'a mut W { - self.variant(PSEL_A::ANALOG_INPUT3) - } - #[doc = "AIN4 selected as analog input"] - #[inline(always)] - pub fn analog_input4(self) -> &'a mut W { - self.variant(PSEL_A::ANALOG_INPUT4) - } - #[doc = "AIN5 selected as analog input"] - #[inline(always)] - pub fn analog_input5(self) -> &'a mut W { - self.variant(PSEL_A::ANALOG_INPUT5) - } - #[doc = "AIN6 selected as analog input"] - #[inline(always)] - pub fn analog_input6(self) -> &'a mut W { - self.variant(PSEL_A::ANALOG_INPUT6) - } - #[doc = "AIN7 selected as analog input"] - #[inline(always)] - pub fn analog_input7(self) -> &'a mut W { - self.variant(PSEL_A::ANALOG_INPUT7) - } -} -impl R { - #[doc = "Bits 0:2 - Analog pin select"] - #[inline(always)] - pub fn psel(&self) -> PSEL_R { - PSEL_R::new((self.bits & 7) as u8) - } -} -impl W { - #[doc = "Bits 0:2 - Analog pin select"] - #[inline(always)] - #[must_use] - pub fn psel(&mut self) -> PSEL_W<0> { - PSEL_W::new(self) - } - #[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 = "Input pin select\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 [psel](index.html) module"] -pub struct PSEL_SPEC; -impl crate::RegisterSpec for PSEL_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [psel::R](R) reader structure"] -impl crate::Readable for PSEL_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [psel::W](W) writer structure"] -impl crate::Writable for PSEL_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets PSEL to value 0"] -impl crate::Resettable for PSEL_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/lpcomp/refsel.rs b/down-the-stack/dk_pac/src/lpcomp/refsel.rs deleted file mode 100644 index a4bc81f..0000000 --- a/down-the-stack/dk_pac/src/lpcomp/refsel.rs +++ /dev/null @@ -1,311 +0,0 @@ -#[doc = "Register `REFSEL` 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 `REFSEL` 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 `REFSEL` reader - Reference select"] -pub type REFSEL_R = crate::FieldReader; -#[doc = "Reference select\n\nValue on reset: 4"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -#[repr(u8)] -pub enum REFSEL_A { - #[doc = "0: VDD * 1/8 selected as reference"] - REF1_8VDD = 0, - #[doc = "1: VDD * 2/8 selected as reference"] - REF2_8VDD = 1, - #[doc = "2: VDD * 3/8 selected as reference"] - REF3_8VDD = 2, - #[doc = "3: VDD * 4/8 selected as reference"] - REF4_8VDD = 3, - #[doc = "4: VDD * 5/8 selected as reference"] - REF5_8VDD = 4, - #[doc = "5: VDD * 6/8 selected as reference"] - REF6_8VDD = 5, - #[doc = "6: VDD * 7/8 selected as reference"] - REF7_8VDD = 6, - #[doc = "7: External analog reference selected"] - AREF = 7, - #[doc = "8: VDD * 1/16 selected as reference"] - REF1_16VDD = 8, - #[doc = "9: VDD * 3/16 selected as reference"] - REF3_16VDD = 9, - #[doc = "10: VDD * 5/16 selected as reference"] - REF5_16VDD = 10, - #[doc = "11: VDD * 7/16 selected as reference"] - REF7_16VDD = 11, - #[doc = "12: VDD * 9/16 selected as reference"] - REF9_16VDD = 12, - #[doc = "13: VDD * 11/16 selected as reference"] - REF11_16VDD = 13, - #[doc = "14: VDD * 13/16 selected as reference"] - REF13_16VDD = 14, - #[doc = "15: VDD * 15/16 selected as reference"] - REF15_16VDD = 15, -} -impl From for u8 { - #[inline(always)] - fn from(variant: REFSEL_A) -> Self { - variant as _ - } -} -impl REFSEL_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> REFSEL_A { - match self.bits { - 0 => REFSEL_A::REF1_8VDD, - 1 => REFSEL_A::REF2_8VDD, - 2 => REFSEL_A::REF3_8VDD, - 3 => REFSEL_A::REF4_8VDD, - 4 => REFSEL_A::REF5_8VDD, - 5 => REFSEL_A::REF6_8VDD, - 6 => REFSEL_A::REF7_8VDD, - 7 => REFSEL_A::AREF, - 8 => REFSEL_A::REF1_16VDD, - 9 => REFSEL_A::REF3_16VDD, - 10 => REFSEL_A::REF5_16VDD, - 11 => REFSEL_A::REF7_16VDD, - 12 => REFSEL_A::REF9_16VDD, - 13 => REFSEL_A::REF11_16VDD, - 14 => REFSEL_A::REF13_16VDD, - 15 => REFSEL_A::REF15_16VDD, - _ => unreachable!(), - } - } - #[doc = "Checks if the value of the field is `REF1_8VDD`"] - #[inline(always)] - pub fn is_ref1_8vdd(&self) -> bool { - *self == REFSEL_A::REF1_8VDD - } - #[doc = "Checks if the value of the field is `REF2_8VDD`"] - #[inline(always)] - pub fn is_ref2_8vdd(&self) -> bool { - *self == REFSEL_A::REF2_8VDD - } - #[doc = "Checks if the value of the field is `REF3_8VDD`"] - #[inline(always)] - pub fn is_ref3_8vdd(&self) -> bool { - *self == REFSEL_A::REF3_8VDD - } - #[doc = "Checks if the value of the field is `REF4_8VDD`"] - #[inline(always)] - pub fn is_ref4_8vdd(&self) -> bool { - *self == REFSEL_A::REF4_8VDD - } - #[doc = "Checks if the value of the field is `REF5_8VDD`"] - #[inline(always)] - pub fn is_ref5_8vdd(&self) -> bool { - *self == REFSEL_A::REF5_8VDD - } - #[doc = "Checks if the value of the field is `REF6_8VDD`"] - #[inline(always)] - pub fn is_ref6_8vdd(&self) -> bool { - *self == REFSEL_A::REF6_8VDD - } - #[doc = "Checks if the value of the field is `REF7_8VDD`"] - #[inline(always)] - pub fn is_ref7_8vdd(&self) -> bool { - *self == REFSEL_A::REF7_8VDD - } - #[doc = "Checks if the value of the field is `AREF`"] - #[inline(always)] - pub fn is_aref(&self) -> bool { - *self == REFSEL_A::AREF - } - #[doc = "Checks if the value of the field is `REF1_16VDD`"] - #[inline(always)] - pub fn is_ref1_16vdd(&self) -> bool { - *self == REFSEL_A::REF1_16VDD - } - #[doc = "Checks if the value of the field is `REF3_16VDD`"] - #[inline(always)] - pub fn is_ref3_16vdd(&self) -> bool { - *self == REFSEL_A::REF3_16VDD - } - #[doc = "Checks if the value of the field is `REF5_16VDD`"] - #[inline(always)] - pub fn is_ref5_16vdd(&self) -> bool { - *self == REFSEL_A::REF5_16VDD - } - #[doc = "Checks if the value of the field is `REF7_16VDD`"] - #[inline(always)] - pub fn is_ref7_16vdd(&self) -> bool { - *self == REFSEL_A::REF7_16VDD - } - #[doc = "Checks if the value of the field is `REF9_16VDD`"] - #[inline(always)] - pub fn is_ref9_16vdd(&self) -> bool { - *self == REFSEL_A::REF9_16VDD - } - #[doc = "Checks if the value of the field is `REF11_16VDD`"] - #[inline(always)] - pub fn is_ref11_16vdd(&self) -> bool { - *self == REFSEL_A::REF11_16VDD - } - #[doc = "Checks if the value of the field is `REF13_16VDD`"] - #[inline(always)] - pub fn is_ref13_16vdd(&self) -> bool { - *self == REFSEL_A::REF13_16VDD - } - #[doc = "Checks if the value of the field is `REF15_16VDD`"] - #[inline(always)] - pub fn is_ref15_16vdd(&self) -> bool { - *self == REFSEL_A::REF15_16VDD - } -} -#[doc = "Field `REFSEL` writer - Reference select"] -pub type REFSEL_W<'a, const O: u8> = - crate::FieldWriterSafe<'a, u32, REFSEL_SPEC, u8, REFSEL_A, 4, O>; -impl<'a, const O: u8> REFSEL_W<'a, O> { - #[doc = "VDD * 1/8 selected as reference"] - #[inline(always)] - pub fn ref1_8vdd(self) -> &'a mut W { - self.variant(REFSEL_A::REF1_8VDD) - } - #[doc = "VDD * 2/8 selected as reference"] - #[inline(always)] - pub fn ref2_8vdd(self) -> &'a mut W { - self.variant(REFSEL_A::REF2_8VDD) - } - #[doc = "VDD * 3/8 selected as reference"] - #[inline(always)] - pub fn ref3_8vdd(self) -> &'a mut W { - self.variant(REFSEL_A::REF3_8VDD) - } - #[doc = "VDD * 4/8 selected as reference"] - #[inline(always)] - pub fn ref4_8vdd(self) -> &'a mut W { - self.variant(REFSEL_A::REF4_8VDD) - } - #[doc = "VDD * 5/8 selected as reference"] - #[inline(always)] - pub fn ref5_8vdd(self) -> &'a mut W { - self.variant(REFSEL_A::REF5_8VDD) - } - #[doc = "VDD * 6/8 selected as reference"] - #[inline(always)] - pub fn ref6_8vdd(self) -> &'a mut W { - self.variant(REFSEL_A::REF6_8VDD) - } - #[doc = "VDD * 7/8 selected as reference"] - #[inline(always)] - pub fn ref7_8vdd(self) -> &'a mut W { - self.variant(REFSEL_A::REF7_8VDD) - } - #[doc = "External analog reference selected"] - #[inline(always)] - pub fn aref(self) -> &'a mut W { - self.variant(REFSEL_A::AREF) - } - #[doc = "VDD * 1/16 selected as reference"] - #[inline(always)] - pub fn ref1_16vdd(self) -> &'a mut W { - self.variant(REFSEL_A::REF1_16VDD) - } - #[doc = "VDD * 3/16 selected as reference"] - #[inline(always)] - pub fn ref3_16vdd(self) -> &'a mut W { - self.variant(REFSEL_A::REF3_16VDD) - } - #[doc = "VDD * 5/16 selected as reference"] - #[inline(always)] - pub fn ref5_16vdd(self) -> &'a mut W { - self.variant(REFSEL_A::REF5_16VDD) - } - #[doc = "VDD * 7/16 selected as reference"] - #[inline(always)] - pub fn ref7_16vdd(self) -> &'a mut W { - self.variant(REFSEL_A::REF7_16VDD) - } - #[doc = "VDD * 9/16 selected as reference"] - #[inline(always)] - pub fn ref9_16vdd(self) -> &'a mut W { - self.variant(REFSEL_A::REF9_16VDD) - } - #[doc = "VDD * 11/16 selected as reference"] - #[inline(always)] - pub fn ref11_16vdd(self) -> &'a mut W { - self.variant(REFSEL_A::REF11_16VDD) - } - #[doc = "VDD * 13/16 selected as reference"] - #[inline(always)] - pub fn ref13_16vdd(self) -> &'a mut W { - self.variant(REFSEL_A::REF13_16VDD) - } - #[doc = "VDD * 15/16 selected as reference"] - #[inline(always)] - pub fn ref15_16vdd(self) -> &'a mut W { - self.variant(REFSEL_A::REF15_16VDD) - } -} -impl R { - #[doc = "Bits 0:3 - Reference select"] - #[inline(always)] - pub fn refsel(&self) -> REFSEL_R { - REFSEL_R::new((self.bits & 0x0f) as u8) - } -} -impl W { - #[doc = "Bits 0:3 - Reference select"] - #[inline(always)] - #[must_use] - pub fn refsel(&mut self) -> REFSEL_W<0> { - REFSEL_W::new(self) - } - #[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 = "Reference select\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 [refsel](index.html) module"] -pub struct REFSEL_SPEC; -impl crate::RegisterSpec for REFSEL_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [refsel::R](R) reader structure"] -impl crate::Readable for REFSEL_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [refsel::W](W) writer structure"] -impl crate::Writable for REFSEL_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets REFSEL to value 0x04"] -impl crate::Resettable for REFSEL_SPEC { - const RESET_VALUE: Self::Ux = 0x04; -} diff --git a/down-the-stack/dk_pac/src/lpcomp/result.rs b/down-the-stack/dk_pac/src/lpcomp/result.rs deleted file mode 100644 index 2583cf7..0000000 --- a/down-the-stack/dk_pac/src/lpcomp/result.rs +++ /dev/null @@ -1,71 +0,0 @@ -#[doc = "Register `RESULT` 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 = "Field `RESULT` reader - Result of last compare. Decision point SAMPLE task."] -pub type RESULT_R = crate::BitReader; -#[doc = "Result of last compare. Decision point SAMPLE task.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum RESULT_A { - #[doc = "0: Input voltage is below the reference threshold (VIN+ < VIN-)."] - BELOW = 0, - #[doc = "1: Input voltage is above the reference threshold (VIN+ > VIN-)."] - ABOVE = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: RESULT_A) -> Self { - variant as u8 != 0 - } -} -impl RESULT_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> RESULT_A { - match self.bits { - false => RESULT_A::BELOW, - true => RESULT_A::ABOVE, - } - } - #[doc = "Checks if the value of the field is `BELOW`"] - #[inline(always)] - pub fn is_below(&self) -> bool { - *self == RESULT_A::BELOW - } - #[doc = "Checks if the value of the field is `ABOVE`"] - #[inline(always)] - pub fn is_above(&self) -> bool { - *self == RESULT_A::ABOVE - } -} -impl R { - #[doc = "Bit 0 - Result of last compare. Decision point SAMPLE task."] - #[inline(always)] - pub fn result(&self) -> RESULT_R { - RESULT_R::new((self.bits & 1) != 0) - } -} -#[doc = "Compare 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 [result](index.html) module"] -pub struct RESULT_SPEC; -impl crate::RegisterSpec for RESULT_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [result::R](R) reader structure"] -impl crate::Readable for RESULT_SPEC { - type Reader = R; -} -#[doc = "`reset()` method sets RESULT to value 0"] -impl crate::Resettable for RESULT_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/lpcomp/shorts.rs b/down-the-stack/dk_pac/src/lpcomp/shorts.rs deleted file mode 100644 index ddbbc06..0000000 --- a/down-the-stack/dk_pac/src/lpcomp/shorts.rs +++ /dev/null @@ -1,371 +0,0 @@ -#[doc = "Register `SHORTS` 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 `SHORTS` 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 `READY_SAMPLE` reader - Shortcut between event READY and task SAMPLE"] -pub type READY_SAMPLE_R = crate::BitReader; -#[doc = "Shortcut between event READY and task SAMPLE\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum READY_SAMPLE_A { - #[doc = "0: Disable shortcut"] - DISABLED = 0, - #[doc = "1: Enable shortcut"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: READY_SAMPLE_A) -> Self { - variant as u8 != 0 - } -} -impl READY_SAMPLE_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> READY_SAMPLE_A { - match self.bits { - false => READY_SAMPLE_A::DISABLED, - true => READY_SAMPLE_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == READY_SAMPLE_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == READY_SAMPLE_A::ENABLED - } -} -#[doc = "Field `READY_SAMPLE` writer - Shortcut between event READY and task SAMPLE"] -pub type READY_SAMPLE_W<'a, const O: u8> = - crate::BitWriter<'a, u32, SHORTS_SPEC, READY_SAMPLE_A, O>; -impl<'a, const O: u8> READY_SAMPLE_W<'a, O> { - #[doc = "Disable shortcut"] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(READY_SAMPLE_A::DISABLED) - } - #[doc = "Enable shortcut"] - #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(READY_SAMPLE_A::ENABLED) - } -} -#[doc = "Field `READY_STOP` reader - Shortcut between event READY and task STOP"] -pub type READY_STOP_R = crate::BitReader; -#[doc = "Shortcut between event READY and task STOP\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum READY_STOP_A { - #[doc = "0: Disable shortcut"] - DISABLED = 0, - #[doc = "1: Enable shortcut"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: READY_STOP_A) -> Self { - variant as u8 != 0 - } -} -impl READY_STOP_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> READY_STOP_A { - match self.bits { - false => READY_STOP_A::DISABLED, - true => READY_STOP_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == READY_STOP_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == READY_STOP_A::ENABLED - } -} -#[doc = "Field `READY_STOP` writer - Shortcut between event READY and task STOP"] -pub type READY_STOP_W<'a, const O: u8> = crate::BitWriter<'a, u32, SHORTS_SPEC, READY_STOP_A, O>; -impl<'a, const O: u8> READY_STOP_W<'a, O> { - #[doc = "Disable shortcut"] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(READY_STOP_A::DISABLED) - } - #[doc = "Enable shortcut"] - #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(READY_STOP_A::ENABLED) - } -} -#[doc = "Field `DOWN_STOP` reader - Shortcut between event DOWN and task STOP"] -pub type DOWN_STOP_R = crate::BitReader; -#[doc = "Shortcut between event DOWN and task STOP\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum DOWN_STOP_A { - #[doc = "0: Disable shortcut"] - DISABLED = 0, - #[doc = "1: Enable shortcut"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: DOWN_STOP_A) -> Self { - variant as u8 != 0 - } -} -impl DOWN_STOP_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> DOWN_STOP_A { - match self.bits { - false => DOWN_STOP_A::DISABLED, - true => DOWN_STOP_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == DOWN_STOP_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == DOWN_STOP_A::ENABLED - } -} -#[doc = "Field `DOWN_STOP` writer - Shortcut between event DOWN and task STOP"] -pub type DOWN_STOP_W<'a, const O: u8> = crate::BitWriter<'a, u32, SHORTS_SPEC, DOWN_STOP_A, O>; -impl<'a, const O: u8> DOWN_STOP_W<'a, O> { - #[doc = "Disable shortcut"] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(DOWN_STOP_A::DISABLED) - } - #[doc = "Enable shortcut"] - #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(DOWN_STOP_A::ENABLED) - } -} -#[doc = "Field `UP_STOP` reader - Shortcut between event UP and task STOP"] -pub type UP_STOP_R = crate::BitReader; -#[doc = "Shortcut between event UP and task STOP\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum UP_STOP_A { - #[doc = "0: Disable shortcut"] - DISABLED = 0, - #[doc = "1: Enable shortcut"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: UP_STOP_A) -> Self { - variant as u8 != 0 - } -} -impl UP_STOP_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> UP_STOP_A { - match self.bits { - false => UP_STOP_A::DISABLED, - true => UP_STOP_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == UP_STOP_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == UP_STOP_A::ENABLED - } -} -#[doc = "Field `UP_STOP` writer - Shortcut between event UP and task STOP"] -pub type UP_STOP_W<'a, const O: u8> = crate::BitWriter<'a, u32, SHORTS_SPEC, UP_STOP_A, O>; -impl<'a, const O: u8> UP_STOP_W<'a, O> { - #[doc = "Disable shortcut"] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(UP_STOP_A::DISABLED) - } - #[doc = "Enable shortcut"] - #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(UP_STOP_A::ENABLED) - } -} -#[doc = "Field `CROSS_STOP` reader - Shortcut between event CROSS and task STOP"] -pub type CROSS_STOP_R = crate::BitReader; -#[doc = "Shortcut between event CROSS and task STOP\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum CROSS_STOP_A { - #[doc = "0: Disable shortcut"] - DISABLED = 0, - #[doc = "1: Enable shortcut"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: CROSS_STOP_A) -> Self { - variant as u8 != 0 - } -} -impl CROSS_STOP_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> CROSS_STOP_A { - match self.bits { - false => CROSS_STOP_A::DISABLED, - true => CROSS_STOP_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == CROSS_STOP_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == CROSS_STOP_A::ENABLED - } -} -#[doc = "Field `CROSS_STOP` writer - Shortcut between event CROSS and task STOP"] -pub type CROSS_STOP_W<'a, const O: u8> = crate::BitWriter<'a, u32, SHORTS_SPEC, CROSS_STOP_A, O>; -impl<'a, const O: u8> CROSS_STOP_W<'a, O> { - #[doc = "Disable shortcut"] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(CROSS_STOP_A::DISABLED) - } - #[doc = "Enable shortcut"] - #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(CROSS_STOP_A::ENABLED) - } -} -impl R { - #[doc = "Bit 0 - Shortcut between event READY and task SAMPLE"] - #[inline(always)] - pub fn ready_sample(&self) -> READY_SAMPLE_R { - READY_SAMPLE_R::new((self.bits & 1) != 0) - } - #[doc = "Bit 1 - Shortcut between event READY and task STOP"] - #[inline(always)] - pub fn ready_stop(&self) -> READY_STOP_R { - READY_STOP_R::new(((self.bits >> 1) & 1) != 0) - } - #[doc = "Bit 2 - Shortcut between event DOWN and task STOP"] - #[inline(always)] - pub fn down_stop(&self) -> DOWN_STOP_R { - DOWN_STOP_R::new(((self.bits >> 2) & 1) != 0) - } - #[doc = "Bit 3 - Shortcut between event UP and task STOP"] - #[inline(always)] - pub fn up_stop(&self) -> UP_STOP_R { - UP_STOP_R::new(((self.bits >> 3) & 1) != 0) - } - #[doc = "Bit 4 - Shortcut between event CROSS and task STOP"] - #[inline(always)] - pub fn cross_stop(&self) -> CROSS_STOP_R { - CROSS_STOP_R::new(((self.bits >> 4) & 1) != 0) - } -} -impl W { - #[doc = "Bit 0 - Shortcut between event READY and task SAMPLE"] - #[inline(always)] - #[must_use] - pub fn ready_sample(&mut self) -> READY_SAMPLE_W<0> { - READY_SAMPLE_W::new(self) - } - #[doc = "Bit 1 - Shortcut between event READY and task STOP"] - #[inline(always)] - #[must_use] - pub fn ready_stop(&mut self) -> READY_STOP_W<1> { - READY_STOP_W::new(self) - } - #[doc = "Bit 2 - Shortcut between event DOWN and task STOP"] - #[inline(always)] - #[must_use] - pub fn down_stop(&mut self) -> DOWN_STOP_W<2> { - DOWN_STOP_W::new(self) - } - #[doc = "Bit 3 - Shortcut between event UP and task STOP"] - #[inline(always)] - #[must_use] - pub fn up_stop(&mut self) -> UP_STOP_W<3> { - UP_STOP_W::new(self) - } - #[doc = "Bit 4 - Shortcut between event CROSS and task STOP"] - #[inline(always)] - #[must_use] - pub fn cross_stop(&mut self) -> CROSS_STOP_W<4> { - CROSS_STOP_W::new(self) - } - #[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 = "Shortcuts between local events and tasks\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 [shorts](index.html) module"] -pub struct SHORTS_SPEC; -impl crate::RegisterSpec for SHORTS_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [shorts::R](R) reader structure"] -impl crate::Readable for SHORTS_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [shorts::W](W) writer structure"] -impl crate::Writable for SHORTS_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets SHORTS to value 0"] -impl crate::Resettable for SHORTS_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/lpcomp/tasks_sample.rs b/down-the-stack/dk_pac/src/lpcomp/tasks_sample.rs deleted file mode 100644 index d0ef589..0000000 --- a/down-the-stack/dk_pac/src/lpcomp/tasks_sample.rs +++ /dev/null @@ -1,72 +0,0 @@ -#[doc = "Register `TASKS_SAMPLE` 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 = "Sample comparator value\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum TASKS_SAMPLE_AW { - #[doc = "1: Trigger task"] - TRIGGER = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: TASKS_SAMPLE_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `TASKS_SAMPLE` writer - Sample comparator value"] -pub type TASKS_SAMPLE_W<'a, const O: u8> = - crate::BitWriter<'a, u32, TASKS_SAMPLE_SPEC, TASKS_SAMPLE_AW, O>; -impl<'a, const O: u8> TASKS_SAMPLE_W<'a, O> { - #[doc = "Trigger task"] - #[inline(always)] - pub fn trigger(self) -> &'a mut W { - self.variant(TASKS_SAMPLE_AW::TRIGGER) - } -} -impl W { - #[doc = "Bit 0 - Sample comparator value"] - #[inline(always)] - #[must_use] - pub fn tasks_sample(&mut self) -> TASKS_SAMPLE_W<0> { - TASKS_SAMPLE_W::new(self) - } - #[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 = "Sample comparator value\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 [tasks_sample](index.html) module"] -pub struct TASKS_SAMPLE_SPEC; -impl crate::RegisterSpec for TASKS_SAMPLE_SPEC { - type Ux = u32; -} -#[doc = "`write(|w| ..)` method takes [tasks_sample::W](W) writer structure"] -impl crate::Writable for TASKS_SAMPLE_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets TASKS_SAMPLE to value 0"] -impl crate::Resettable for TASKS_SAMPLE_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/lpcomp/tasks_start.rs b/down-the-stack/dk_pac/src/lpcomp/tasks_start.rs deleted file mode 100644 index 60fdc8e..0000000 --- a/down-the-stack/dk_pac/src/lpcomp/tasks_start.rs +++ /dev/null @@ -1,72 +0,0 @@ -#[doc = "Register `TASKS_START` 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 = "Start comparator\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum TASKS_START_AW { - #[doc = "1: Trigger task"] - TRIGGER = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: TASKS_START_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `TASKS_START` writer - Start comparator"] -pub type TASKS_START_W<'a, const O: u8> = - crate::BitWriter<'a, u32, TASKS_START_SPEC, TASKS_START_AW, O>; -impl<'a, const O: u8> TASKS_START_W<'a, O> { - #[doc = "Trigger task"] - #[inline(always)] - pub fn trigger(self) -> &'a mut W { - self.variant(TASKS_START_AW::TRIGGER) - } -} -impl W { - #[doc = "Bit 0 - Start comparator"] - #[inline(always)] - #[must_use] - pub fn tasks_start(&mut self) -> TASKS_START_W<0> { - TASKS_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 - } -} -#[doc = "Start comparator\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 [tasks_start](index.html) module"] -pub struct TASKS_START_SPEC; -impl crate::RegisterSpec for TASKS_START_SPEC { - type Ux = u32; -} -#[doc = "`write(|w| ..)` method takes [tasks_start::W](W) writer structure"] -impl crate::Writable for TASKS_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 TASKS_START to value 0"] -impl crate::Resettable for TASKS_START_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/lpcomp/tasks_stop.rs b/down-the-stack/dk_pac/src/lpcomp/tasks_stop.rs deleted file mode 100644 index dd80ae5..0000000 --- a/down-the-stack/dk_pac/src/lpcomp/tasks_stop.rs +++ /dev/null @@ -1,72 +0,0 @@ -#[doc = "Register `TASKS_STOP` 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 = "Stop comparator\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum TASKS_STOP_AW { - #[doc = "1: Trigger task"] - TRIGGER = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: TASKS_STOP_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `TASKS_STOP` writer - Stop comparator"] -pub type TASKS_STOP_W<'a, const O: u8> = - crate::BitWriter<'a, u32, TASKS_STOP_SPEC, TASKS_STOP_AW, O>; -impl<'a, const O: u8> TASKS_STOP_W<'a, O> { - #[doc = "Trigger task"] - #[inline(always)] - pub fn trigger(self) -> &'a mut W { - self.variant(TASKS_STOP_AW::TRIGGER) - } -} -impl W { - #[doc = "Bit 0 - Stop comparator"] - #[inline(always)] - #[must_use] - pub fn tasks_stop(&mut self) -> TASKS_STOP_W<0> { - TASKS_STOP_W::new(self) - } - #[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 = "Stop comparator\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 [tasks_stop](index.html) module"] -pub struct TASKS_STOP_SPEC; -impl crate::RegisterSpec for TASKS_STOP_SPEC { - type Ux = u32; -} -#[doc = "`write(|w| ..)` method takes [tasks_stop::W](W) writer structure"] -impl crate::Writable for TASKS_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 TASKS_STOP to value 0"] -impl crate::Resettable for TASKS_STOP_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/mwu.rs b/down-the-stack/dk_pac/src/mwu.rs deleted file mode 100644 index aef117b..0000000 --- a/down-the-stack/dk_pac/src/mwu.rs +++ /dev/null @@ -1,113 +0,0 @@ -#[doc = r"Register block"] -#[repr(C)] -pub struct RegisterBlock { - _reserved0: [u8; 0x0100], - #[doc = "0x100..0x120 - Peripheral events."] - pub events_region: [EVENTS_REGION; 4], - _reserved1: [u8; 0x40], - #[doc = "0x160..0x170 - Peripheral events."] - pub events_pregion: [EVENTS_PREGION; 2], - _reserved2: [u8; 0x0190], - #[doc = "0x300 - Enable or disable interrupt"] - pub inten: INTEN, - #[doc = "0x304 - Enable interrupt"] - pub intenset: INTENSET, - #[doc = "0x308 - Disable interrupt"] - pub intenclr: INTENCLR, - _reserved5: [u8; 0x14], - #[doc = "0x320 - Enable or disable interrupt"] - pub nmien: NMIEN, - #[doc = "0x324 - Enable interrupt"] - pub nmienset: NMIENSET, - #[doc = "0x328 - Disable interrupt"] - pub nmienclr: NMIENCLR, - _reserved8: [u8; 0xd4], - #[doc = "0x400..0x410 - Unspecified"] - pub perregion: [PERREGION; 2], - _reserved9: [u8; 0x0100], - #[doc = "0x510 - Enable/disable regions watch"] - pub regionen: REGIONEN, - #[doc = "0x514 - Enable regions watch"] - pub regionenset: REGIONENSET, - #[doc = "0x518 - Disable regions watch"] - pub regionenclr: REGIONENCLR, - _reserved12: [u8; 0xe4], - #[doc = "0x600..0x608 - Unspecified"] - pub region0: REGION, - _reserved13: [u8; 0x08], - #[doc = "0x610..0x618 - Unspecified"] - pub region1: REGION, - _reserved14: [u8; 0x08], - #[doc = "0x620..0x628 - Unspecified"] - pub region2: REGION, - _reserved15: [u8; 0x08], - #[doc = "0x630..0x638 - Unspecified"] - pub region3: REGION, - _reserved16: [u8; 0x88], - #[doc = "0x6c0..0x6cc - Unspecified"] - pub pregion0: PREGION, - _reserved17: [u8; 0x04], - #[doc = "0x6d0..0x6dc - Unspecified"] - pub pregion1: PREGION, -} -#[doc = "Peripheral events."] -pub use self::events_region::EVENTS_REGION; -#[doc = r"Cluster"] -#[doc = "Peripheral events."] -pub mod events_region; -#[doc = "Peripheral events."] -pub use self::events_pregion::EVENTS_PREGION; -#[doc = r"Cluster"] -#[doc = "Peripheral events."] -pub mod events_pregion; -#[doc = "INTEN (rw) register accessor: an alias for `Reg`"] -pub type INTEN = crate::Reg; -#[doc = "Enable or disable interrupt"] -pub mod inten; -#[doc = "INTENSET (rw) register accessor: an alias for `Reg`"] -pub type INTENSET = crate::Reg; -#[doc = "Enable interrupt"] -pub mod intenset; -#[doc = "INTENCLR (rw) register accessor: an alias for `Reg`"] -pub type INTENCLR = crate::Reg; -#[doc = "Disable interrupt"] -pub mod intenclr; -#[doc = "NMIEN (rw) register accessor: an alias for `Reg`"] -pub type NMIEN = crate::Reg; -#[doc = "Enable or disable interrupt"] -pub mod nmien; -#[doc = "NMIENSET (rw) register accessor: an alias for `Reg`"] -pub type NMIENSET = crate::Reg; -#[doc = "Enable interrupt"] -pub mod nmienset; -#[doc = "NMIENCLR (rw) register accessor: an alias for `Reg`"] -pub type NMIENCLR = crate::Reg; -#[doc = "Disable interrupt"] -pub mod nmienclr; -#[doc = "Unspecified"] -pub use self::perregion::PERREGION; -#[doc = r"Cluster"] -#[doc = "Unspecified"] -pub mod perregion; -#[doc = "REGIONEN (rw) register accessor: an alias for `Reg`"] -pub type REGIONEN = crate::Reg; -#[doc = "Enable/disable regions watch"] -pub mod regionen; -#[doc = "REGIONENSET (rw) register accessor: an alias for `Reg`"] -pub type REGIONENSET = crate::Reg; -#[doc = "Enable regions watch"] -pub mod regionenset; -#[doc = "REGIONENCLR (rw) register accessor: an alias for `Reg`"] -pub type REGIONENCLR = crate::Reg; -#[doc = "Disable regions watch"] -pub mod regionenclr; -#[doc = "Unspecified"] -pub use self::region::REGION; -#[doc = r"Cluster"] -#[doc = "Unspecified"] -pub mod region; -#[doc = "Unspecified"] -pub use self::pregion::PREGION; -#[doc = r"Cluster"] -#[doc = "Unspecified"] -pub mod pregion; diff --git a/down-the-stack/dk_pac/src/mwu/events_pregion.rs b/down-the-stack/dk_pac/src/mwu/events_pregion.rs deleted file mode 100644 index a94ba1a..0000000 --- a/down-the-stack/dk_pac/src/mwu/events_pregion.rs +++ /dev/null @@ -1,16 +0,0 @@ -#[doc = r"Register block"] -#[repr(C)] -pub struct EVENTS_PREGION { - #[doc = "0x00 - Description cluster: Write access to peripheral region n detected"] - pub wa: WA, - #[doc = "0x04 - Description cluster: Read access to peripheral region n detected"] - pub ra: RA, -} -#[doc = "WA (rw) register accessor: an alias for `Reg`"] -pub type WA = crate::Reg; -#[doc = "Description cluster: Write access to peripheral region n detected"] -pub mod wa; -#[doc = "RA (rw) register accessor: an alias for `Reg`"] -pub type RA = crate::Reg; -#[doc = "Description cluster: Read access to peripheral region n detected"] -pub mod ra; diff --git a/down-the-stack/dk_pac/src/mwu/events_pregion/ra.rs b/down-the-stack/dk_pac/src/mwu/events_pregion/ra.rs deleted file mode 100644 index 363fae7..0000000 --- a/down-the-stack/dk_pac/src/mwu/events_pregion/ra.rs +++ /dev/null @@ -1,126 +0,0 @@ -#[doc = "Register `RA` 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 `RA` 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 `RA` reader - Read access to peripheral region n detected"] -pub type RA_R = crate::BitReader; -#[doc = "Read access to peripheral region n detected\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum RA_A { - #[doc = "0: Event not generated"] - NOT_GENERATED = 0, - #[doc = "1: Event generated"] - GENERATED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: RA_A) -> Self { - variant as u8 != 0 - } -} -impl RA_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> RA_A { - match self.bits { - false => RA_A::NOT_GENERATED, - true => RA_A::GENERATED, - } - } - #[doc = "Checks if the value of the field is `NOT_GENERATED`"] - #[inline(always)] - pub fn is_not_generated(&self) -> bool { - *self == RA_A::NOT_GENERATED - } - #[doc = "Checks if the value of the field is `GENERATED`"] - #[inline(always)] - pub fn is_generated(&self) -> bool { - *self == RA_A::GENERATED - } -} -#[doc = "Field `RA` writer - Read access to peripheral region n detected"] -pub type RA_W<'a, const O: u8> = crate::BitWriter<'a, u32, RA_SPEC, RA_A, O>; -impl<'a, const O: u8> RA_W<'a, O> { - #[doc = "Event not generated"] - #[inline(always)] - pub fn not_generated(self) -> &'a mut W { - self.variant(RA_A::NOT_GENERATED) - } - #[doc = "Event generated"] - #[inline(always)] - pub fn generated(self) -> &'a mut W { - self.variant(RA_A::GENERATED) - } -} -impl R { - #[doc = "Bit 0 - Read access to peripheral region n detected"] - #[inline(always)] - pub fn ra(&self) -> RA_R { - RA_R::new((self.bits & 1) != 0) - } -} -impl W { - #[doc = "Bit 0 - Read access to peripheral region n detected"] - #[inline(always)] - #[must_use] - pub fn ra(&mut self) -> RA_W<0> { - RA_W::new(self) - } - #[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 = "Description cluster: Read access to peripheral region n detected\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 [ra](index.html) module"] -pub struct RA_SPEC; -impl crate::RegisterSpec for RA_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [ra::R](R) reader structure"] -impl crate::Readable for RA_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [ra::W](W) writer structure"] -impl crate::Writable for RA_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets RA to value 0"] -impl crate::Resettable for RA_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/mwu/events_pregion/wa.rs b/down-the-stack/dk_pac/src/mwu/events_pregion/wa.rs deleted file mode 100644 index 889d85e..0000000 --- a/down-the-stack/dk_pac/src/mwu/events_pregion/wa.rs +++ /dev/null @@ -1,126 +0,0 @@ -#[doc = "Register `WA` 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 `WA` 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 `WA` reader - Write access to peripheral region n detected"] -pub type WA_R = crate::BitReader; -#[doc = "Write access to peripheral region n detected\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum WA_A { - #[doc = "0: Event not generated"] - NOT_GENERATED = 0, - #[doc = "1: Event generated"] - GENERATED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: WA_A) -> Self { - variant as u8 != 0 - } -} -impl WA_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> WA_A { - match self.bits { - false => WA_A::NOT_GENERATED, - true => WA_A::GENERATED, - } - } - #[doc = "Checks if the value of the field is `NOT_GENERATED`"] - #[inline(always)] - pub fn is_not_generated(&self) -> bool { - *self == WA_A::NOT_GENERATED - } - #[doc = "Checks if the value of the field is `GENERATED`"] - #[inline(always)] - pub fn is_generated(&self) -> bool { - *self == WA_A::GENERATED - } -} -#[doc = "Field `WA` writer - Write access to peripheral region n detected"] -pub type WA_W<'a, const O: u8> = crate::BitWriter<'a, u32, WA_SPEC, WA_A, O>; -impl<'a, const O: u8> WA_W<'a, O> { - #[doc = "Event not generated"] - #[inline(always)] - pub fn not_generated(self) -> &'a mut W { - self.variant(WA_A::NOT_GENERATED) - } - #[doc = "Event generated"] - #[inline(always)] - pub fn generated(self) -> &'a mut W { - self.variant(WA_A::GENERATED) - } -} -impl R { - #[doc = "Bit 0 - Write access to peripheral region n detected"] - #[inline(always)] - pub fn wa(&self) -> WA_R { - WA_R::new((self.bits & 1) != 0) - } -} -impl W { - #[doc = "Bit 0 - Write access to peripheral region n detected"] - #[inline(always)] - #[must_use] - pub fn wa(&mut self) -> WA_W<0> { - WA_W::new(self) - } - #[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 = "Description cluster: Write access to peripheral region n detected\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 [wa](index.html) module"] -pub struct WA_SPEC; -impl crate::RegisterSpec for WA_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [wa::R](R) reader structure"] -impl crate::Readable for WA_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [wa::W](W) writer structure"] -impl crate::Writable for WA_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets WA to value 0"] -impl crate::Resettable for WA_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/mwu/events_region.rs b/down-the-stack/dk_pac/src/mwu/events_region.rs deleted file mode 100644 index 51f3bae..0000000 --- a/down-the-stack/dk_pac/src/mwu/events_region.rs +++ /dev/null @@ -1,16 +0,0 @@ -#[doc = r"Register block"] -#[repr(C)] -pub struct EVENTS_REGION { - #[doc = "0x00 - Description cluster: Write access to region n detected"] - pub wa: WA, - #[doc = "0x04 - Description cluster: Read access to region n detected"] - pub ra: RA, -} -#[doc = "WA (rw) register accessor: an alias for `Reg`"] -pub type WA = crate::Reg; -#[doc = "Description cluster: Write access to region n detected"] -pub mod wa; -#[doc = "RA (rw) register accessor: an alias for `Reg`"] -pub type RA = crate::Reg; -#[doc = "Description cluster: Read access to region n detected"] -pub mod ra; diff --git a/down-the-stack/dk_pac/src/mwu/events_region/ra.rs b/down-the-stack/dk_pac/src/mwu/events_region/ra.rs deleted file mode 100644 index b395a25..0000000 --- a/down-the-stack/dk_pac/src/mwu/events_region/ra.rs +++ /dev/null @@ -1,126 +0,0 @@ -#[doc = "Register `RA` 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 `RA` 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 `RA` reader - Read access to region n detected"] -pub type RA_R = crate::BitReader; -#[doc = "Read access to region n detected\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum RA_A { - #[doc = "0: Event not generated"] - NOT_GENERATED = 0, - #[doc = "1: Event generated"] - GENERATED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: RA_A) -> Self { - variant as u8 != 0 - } -} -impl RA_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> RA_A { - match self.bits { - false => RA_A::NOT_GENERATED, - true => RA_A::GENERATED, - } - } - #[doc = "Checks if the value of the field is `NOT_GENERATED`"] - #[inline(always)] - pub fn is_not_generated(&self) -> bool { - *self == RA_A::NOT_GENERATED - } - #[doc = "Checks if the value of the field is `GENERATED`"] - #[inline(always)] - pub fn is_generated(&self) -> bool { - *self == RA_A::GENERATED - } -} -#[doc = "Field `RA` writer - Read access to region n detected"] -pub type RA_W<'a, const O: u8> = crate::BitWriter<'a, u32, RA_SPEC, RA_A, O>; -impl<'a, const O: u8> RA_W<'a, O> { - #[doc = "Event not generated"] - #[inline(always)] - pub fn not_generated(self) -> &'a mut W { - self.variant(RA_A::NOT_GENERATED) - } - #[doc = "Event generated"] - #[inline(always)] - pub fn generated(self) -> &'a mut W { - self.variant(RA_A::GENERATED) - } -} -impl R { - #[doc = "Bit 0 - Read access to region n detected"] - #[inline(always)] - pub fn ra(&self) -> RA_R { - RA_R::new((self.bits & 1) != 0) - } -} -impl W { - #[doc = "Bit 0 - Read access to region n detected"] - #[inline(always)] - #[must_use] - pub fn ra(&mut self) -> RA_W<0> { - RA_W::new(self) - } - #[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 = "Description cluster: Read access to region n detected\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 [ra](index.html) module"] -pub struct RA_SPEC; -impl crate::RegisterSpec for RA_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [ra::R](R) reader structure"] -impl crate::Readable for RA_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [ra::W](W) writer structure"] -impl crate::Writable for RA_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets RA to value 0"] -impl crate::Resettable for RA_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/mwu/events_region/wa.rs b/down-the-stack/dk_pac/src/mwu/events_region/wa.rs deleted file mode 100644 index a31518d..0000000 --- a/down-the-stack/dk_pac/src/mwu/events_region/wa.rs +++ /dev/null @@ -1,126 +0,0 @@ -#[doc = "Register `WA` 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 `WA` 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 `WA` reader - Write access to region n detected"] -pub type WA_R = crate::BitReader; -#[doc = "Write access to region n detected\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum WA_A { - #[doc = "0: Event not generated"] - NOT_GENERATED = 0, - #[doc = "1: Event generated"] - GENERATED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: WA_A) -> Self { - variant as u8 != 0 - } -} -impl WA_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> WA_A { - match self.bits { - false => WA_A::NOT_GENERATED, - true => WA_A::GENERATED, - } - } - #[doc = "Checks if the value of the field is `NOT_GENERATED`"] - #[inline(always)] - pub fn is_not_generated(&self) -> bool { - *self == WA_A::NOT_GENERATED - } - #[doc = "Checks if the value of the field is `GENERATED`"] - #[inline(always)] - pub fn is_generated(&self) -> bool { - *self == WA_A::GENERATED - } -} -#[doc = "Field `WA` writer - Write access to region n detected"] -pub type WA_W<'a, const O: u8> = crate::BitWriter<'a, u32, WA_SPEC, WA_A, O>; -impl<'a, const O: u8> WA_W<'a, O> { - #[doc = "Event not generated"] - #[inline(always)] - pub fn not_generated(self) -> &'a mut W { - self.variant(WA_A::NOT_GENERATED) - } - #[doc = "Event generated"] - #[inline(always)] - pub fn generated(self) -> &'a mut W { - self.variant(WA_A::GENERATED) - } -} -impl R { - #[doc = "Bit 0 - Write access to region n detected"] - #[inline(always)] - pub fn wa(&self) -> WA_R { - WA_R::new((self.bits & 1) != 0) - } -} -impl W { - #[doc = "Bit 0 - Write access to region n detected"] - #[inline(always)] - #[must_use] - pub fn wa(&mut self) -> WA_W<0> { - WA_W::new(self) - } - #[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 = "Description cluster: Write access to region n detected\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 [wa](index.html) module"] -pub struct WA_SPEC; -impl crate::RegisterSpec for WA_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [wa::R](R) reader structure"] -impl crate::Readable for WA_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [wa::W](W) writer structure"] -impl crate::Writable for WA_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets WA to value 0"] -impl crate::Resettable for WA_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/mwu/inten.rs b/down-the-stack/dk_pac/src/mwu/inten.rs deleted file mode 100644 index 3e8832f..0000000 --- a/down-the-stack/dk_pac/src/mwu/inten.rs +++ /dev/null @@ -1,797 +0,0 @@ -#[doc = "Register `INTEN` 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 `INTEN` 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 `REGION0WA` reader - Enable or disable interrupt for event REGION0WA"] -pub type REGION0WA_R = crate::BitReader; -#[doc = "Enable or disable interrupt for event REGION0WA\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum REGION0WA_A { - #[doc = "0: Disable"] - DISABLED = 0, - #[doc = "1: Enable"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: REGION0WA_A) -> Self { - variant as u8 != 0 - } -} -impl REGION0WA_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> REGION0WA_A { - match self.bits { - false => REGION0WA_A::DISABLED, - true => REGION0WA_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == REGION0WA_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == REGION0WA_A::ENABLED - } -} -#[doc = "Field `REGION0WA` writer - Enable or disable interrupt for event REGION0WA"] -pub type REGION0WA_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTEN_SPEC, REGION0WA_A, O>; -impl<'a, const O: u8> REGION0WA_W<'a, O> { - #[doc = "Disable"] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(REGION0WA_A::DISABLED) - } - #[doc = "Enable"] - #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(REGION0WA_A::ENABLED) - } -} -#[doc = "Field `REGION0RA` reader - Enable or disable interrupt for event REGION0RA"] -pub type REGION0RA_R = crate::BitReader; -#[doc = "Enable or disable interrupt for event REGION0RA\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum REGION0RA_A { - #[doc = "0: Disable"] - DISABLED = 0, - #[doc = "1: Enable"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: REGION0RA_A) -> Self { - variant as u8 != 0 - } -} -impl REGION0RA_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> REGION0RA_A { - match self.bits { - false => REGION0RA_A::DISABLED, - true => REGION0RA_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == REGION0RA_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == REGION0RA_A::ENABLED - } -} -#[doc = "Field `REGION0RA` writer - Enable or disable interrupt for event REGION0RA"] -pub type REGION0RA_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTEN_SPEC, REGION0RA_A, O>; -impl<'a, const O: u8> REGION0RA_W<'a, O> { - #[doc = "Disable"] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(REGION0RA_A::DISABLED) - } - #[doc = "Enable"] - #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(REGION0RA_A::ENABLED) - } -} -#[doc = "Field `REGION1WA` reader - Enable or disable interrupt for event REGION1WA"] -pub type REGION1WA_R = crate::BitReader; -#[doc = "Enable or disable interrupt for event REGION1WA\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum REGION1WA_A { - #[doc = "0: Disable"] - DISABLED = 0, - #[doc = "1: Enable"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: REGION1WA_A) -> Self { - variant as u8 != 0 - } -} -impl REGION1WA_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> REGION1WA_A { - match self.bits { - false => REGION1WA_A::DISABLED, - true => REGION1WA_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == REGION1WA_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == REGION1WA_A::ENABLED - } -} -#[doc = "Field `REGION1WA` writer - Enable or disable interrupt for event REGION1WA"] -pub type REGION1WA_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTEN_SPEC, REGION1WA_A, O>; -impl<'a, const O: u8> REGION1WA_W<'a, O> { - #[doc = "Disable"] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(REGION1WA_A::DISABLED) - } - #[doc = "Enable"] - #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(REGION1WA_A::ENABLED) - } -} -#[doc = "Field `REGION1RA` reader - Enable or disable interrupt for event REGION1RA"] -pub type REGION1RA_R = crate::BitReader; -#[doc = "Enable or disable interrupt for event REGION1RA\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum REGION1RA_A { - #[doc = "0: Disable"] - DISABLED = 0, - #[doc = "1: Enable"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: REGION1RA_A) -> Self { - variant as u8 != 0 - } -} -impl REGION1RA_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> REGION1RA_A { - match self.bits { - false => REGION1RA_A::DISABLED, - true => REGION1RA_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == REGION1RA_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == REGION1RA_A::ENABLED - } -} -#[doc = "Field `REGION1RA` writer - Enable or disable interrupt for event REGION1RA"] -pub type REGION1RA_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTEN_SPEC, REGION1RA_A, O>; -impl<'a, const O: u8> REGION1RA_W<'a, O> { - #[doc = "Disable"] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(REGION1RA_A::DISABLED) - } - #[doc = "Enable"] - #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(REGION1RA_A::ENABLED) - } -} -#[doc = "Field `REGION2WA` reader - Enable or disable interrupt for event REGION2WA"] -pub type REGION2WA_R = crate::BitReader; -#[doc = "Enable or disable interrupt for event REGION2WA\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum REGION2WA_A { - #[doc = "0: Disable"] - DISABLED = 0, - #[doc = "1: Enable"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: REGION2WA_A) -> Self { - variant as u8 != 0 - } -} -impl REGION2WA_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> REGION2WA_A { - match self.bits { - false => REGION2WA_A::DISABLED, - true => REGION2WA_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == REGION2WA_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == REGION2WA_A::ENABLED - } -} -#[doc = "Field `REGION2WA` writer - Enable or disable interrupt for event REGION2WA"] -pub type REGION2WA_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTEN_SPEC, REGION2WA_A, O>; -impl<'a, const O: u8> REGION2WA_W<'a, O> { - #[doc = "Disable"] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(REGION2WA_A::DISABLED) - } - #[doc = "Enable"] - #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(REGION2WA_A::ENABLED) - } -} -#[doc = "Field `REGION2RA` reader - Enable or disable interrupt for event REGION2RA"] -pub type REGION2RA_R = crate::BitReader; -#[doc = "Enable or disable interrupt for event REGION2RA\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum REGION2RA_A { - #[doc = "0: Disable"] - DISABLED = 0, - #[doc = "1: Enable"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: REGION2RA_A) -> Self { - variant as u8 != 0 - } -} -impl REGION2RA_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> REGION2RA_A { - match self.bits { - false => REGION2RA_A::DISABLED, - true => REGION2RA_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == REGION2RA_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == REGION2RA_A::ENABLED - } -} -#[doc = "Field `REGION2RA` writer - Enable or disable interrupt for event REGION2RA"] -pub type REGION2RA_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTEN_SPEC, REGION2RA_A, O>; -impl<'a, const O: u8> REGION2RA_W<'a, O> { - #[doc = "Disable"] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(REGION2RA_A::DISABLED) - } - #[doc = "Enable"] - #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(REGION2RA_A::ENABLED) - } -} -#[doc = "Field `REGION3WA` reader - Enable or disable interrupt for event REGION3WA"] -pub type REGION3WA_R = crate::BitReader; -#[doc = "Enable or disable interrupt for event REGION3WA\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum REGION3WA_A { - #[doc = "0: Disable"] - DISABLED = 0, - #[doc = "1: Enable"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: REGION3WA_A) -> Self { - variant as u8 != 0 - } -} -impl REGION3WA_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> REGION3WA_A { - match self.bits { - false => REGION3WA_A::DISABLED, - true => REGION3WA_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == REGION3WA_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == REGION3WA_A::ENABLED - } -} -#[doc = "Field `REGION3WA` writer - Enable or disable interrupt for event REGION3WA"] -pub type REGION3WA_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTEN_SPEC, REGION3WA_A, O>; -impl<'a, const O: u8> REGION3WA_W<'a, O> { - #[doc = "Disable"] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(REGION3WA_A::DISABLED) - } - #[doc = "Enable"] - #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(REGION3WA_A::ENABLED) - } -} -#[doc = "Field `REGION3RA` reader - Enable or disable interrupt for event REGION3RA"] -pub type REGION3RA_R = crate::BitReader; -#[doc = "Enable or disable interrupt for event REGION3RA\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum REGION3RA_A { - #[doc = "0: Disable"] - DISABLED = 0, - #[doc = "1: Enable"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: REGION3RA_A) -> Self { - variant as u8 != 0 - } -} -impl REGION3RA_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> REGION3RA_A { - match self.bits { - false => REGION3RA_A::DISABLED, - true => REGION3RA_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == REGION3RA_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == REGION3RA_A::ENABLED - } -} -#[doc = "Field `REGION3RA` writer - Enable or disable interrupt for event REGION3RA"] -pub type REGION3RA_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTEN_SPEC, REGION3RA_A, O>; -impl<'a, const O: u8> REGION3RA_W<'a, O> { - #[doc = "Disable"] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(REGION3RA_A::DISABLED) - } - #[doc = "Enable"] - #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(REGION3RA_A::ENABLED) - } -} -#[doc = "Field `PREGION0WA` reader - Enable or disable interrupt for event PREGION0WA"] -pub type PREGION0WA_R = crate::BitReader; -#[doc = "Enable or disable interrupt for event PREGION0WA\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PREGION0WA_A { - #[doc = "0: Disable"] - DISABLED = 0, - #[doc = "1: Enable"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PREGION0WA_A) -> Self { - variant as u8 != 0 - } -} -impl PREGION0WA_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> PREGION0WA_A { - match self.bits { - false => PREGION0WA_A::DISABLED, - true => PREGION0WA_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == PREGION0WA_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == PREGION0WA_A::ENABLED - } -} -#[doc = "Field `PREGION0WA` writer - Enable or disable interrupt for event PREGION0WA"] -pub type PREGION0WA_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTEN_SPEC, PREGION0WA_A, O>; -impl<'a, const O: u8> PREGION0WA_W<'a, O> { - #[doc = "Disable"] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(PREGION0WA_A::DISABLED) - } - #[doc = "Enable"] - #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(PREGION0WA_A::ENABLED) - } -} -#[doc = "Field `PREGION0RA` reader - Enable or disable interrupt for event PREGION0RA"] -pub type PREGION0RA_R = crate::BitReader; -#[doc = "Enable or disable interrupt for event PREGION0RA\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PREGION0RA_A { - #[doc = "0: Disable"] - DISABLED = 0, - #[doc = "1: Enable"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PREGION0RA_A) -> Self { - variant as u8 != 0 - } -} -impl PREGION0RA_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> PREGION0RA_A { - match self.bits { - false => PREGION0RA_A::DISABLED, - true => PREGION0RA_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == PREGION0RA_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == PREGION0RA_A::ENABLED - } -} -#[doc = "Field `PREGION0RA` writer - Enable or disable interrupt for event PREGION0RA"] -pub type PREGION0RA_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTEN_SPEC, PREGION0RA_A, O>; -impl<'a, const O: u8> PREGION0RA_W<'a, O> { - #[doc = "Disable"] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(PREGION0RA_A::DISABLED) - } - #[doc = "Enable"] - #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(PREGION0RA_A::ENABLED) - } -} -#[doc = "Field `PREGION1WA` reader - Enable or disable interrupt for event PREGION1WA"] -pub type PREGION1WA_R = crate::BitReader; -#[doc = "Enable or disable interrupt for event PREGION1WA\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PREGION1WA_A { - #[doc = "0: Disable"] - DISABLED = 0, - #[doc = "1: Enable"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PREGION1WA_A) -> Self { - variant as u8 != 0 - } -} -impl PREGION1WA_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> PREGION1WA_A { - match self.bits { - false => PREGION1WA_A::DISABLED, - true => PREGION1WA_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == PREGION1WA_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == PREGION1WA_A::ENABLED - } -} -#[doc = "Field `PREGION1WA` writer - Enable or disable interrupt for event PREGION1WA"] -pub type PREGION1WA_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTEN_SPEC, PREGION1WA_A, O>; -impl<'a, const O: u8> PREGION1WA_W<'a, O> { - #[doc = "Disable"] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(PREGION1WA_A::DISABLED) - } - #[doc = "Enable"] - #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(PREGION1WA_A::ENABLED) - } -} -#[doc = "Field `PREGION1RA` reader - Enable or disable interrupt for event PREGION1RA"] -pub type PREGION1RA_R = crate::BitReader; -#[doc = "Enable or disable interrupt for event PREGION1RA\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PREGION1RA_A { - #[doc = "0: Disable"] - DISABLED = 0, - #[doc = "1: Enable"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PREGION1RA_A) -> Self { - variant as u8 != 0 - } -} -impl PREGION1RA_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> PREGION1RA_A { - match self.bits { - false => PREGION1RA_A::DISABLED, - true => PREGION1RA_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == PREGION1RA_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == PREGION1RA_A::ENABLED - } -} -#[doc = "Field `PREGION1RA` writer - Enable or disable interrupt for event PREGION1RA"] -pub type PREGION1RA_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTEN_SPEC, PREGION1RA_A, O>; -impl<'a, const O: u8> PREGION1RA_W<'a, O> { - #[doc = "Disable"] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(PREGION1RA_A::DISABLED) - } - #[doc = "Enable"] - #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(PREGION1RA_A::ENABLED) - } -} -impl R { - #[doc = "Bit 0 - Enable or disable interrupt for event REGION0WA"] - #[inline(always)] - pub fn region0wa(&self) -> REGION0WA_R { - REGION0WA_R::new((self.bits & 1) != 0) - } - #[doc = "Bit 1 - Enable or disable interrupt for event REGION0RA"] - #[inline(always)] - pub fn region0ra(&self) -> REGION0RA_R { - REGION0RA_R::new(((self.bits >> 1) & 1) != 0) - } - #[doc = "Bit 2 - Enable or disable interrupt for event REGION1WA"] - #[inline(always)] - pub fn region1wa(&self) -> REGION1WA_R { - REGION1WA_R::new(((self.bits >> 2) & 1) != 0) - } - #[doc = "Bit 3 - Enable or disable interrupt for event REGION1RA"] - #[inline(always)] - pub fn region1ra(&self) -> REGION1RA_R { - REGION1RA_R::new(((self.bits >> 3) & 1) != 0) - } - #[doc = "Bit 4 - Enable or disable interrupt for event REGION2WA"] - #[inline(always)] - pub fn region2wa(&self) -> REGION2WA_R { - REGION2WA_R::new(((self.bits >> 4) & 1) != 0) - } - #[doc = "Bit 5 - Enable or disable interrupt for event REGION2RA"] - #[inline(always)] - pub fn region2ra(&self) -> REGION2RA_R { - REGION2RA_R::new(((self.bits >> 5) & 1) != 0) - } - #[doc = "Bit 6 - Enable or disable interrupt for event REGION3WA"] - #[inline(always)] - pub fn region3wa(&self) -> REGION3WA_R { - REGION3WA_R::new(((self.bits >> 6) & 1) != 0) - } - #[doc = "Bit 7 - Enable or disable interrupt for event REGION3RA"] - #[inline(always)] - pub fn region3ra(&self) -> REGION3RA_R { - REGION3RA_R::new(((self.bits >> 7) & 1) != 0) - } - #[doc = "Bit 24 - Enable or disable interrupt for event PREGION0WA"] - #[inline(always)] - pub fn pregion0wa(&self) -> PREGION0WA_R { - PREGION0WA_R::new(((self.bits >> 24) & 1) != 0) - } - #[doc = "Bit 25 - Enable or disable interrupt for event PREGION0RA"] - #[inline(always)] - pub fn pregion0ra(&self) -> PREGION0RA_R { - PREGION0RA_R::new(((self.bits >> 25) & 1) != 0) - } - #[doc = "Bit 26 - Enable or disable interrupt for event PREGION1WA"] - #[inline(always)] - pub fn pregion1wa(&self) -> PREGION1WA_R { - PREGION1WA_R::new(((self.bits >> 26) & 1) != 0) - } - #[doc = "Bit 27 - Enable or disable interrupt for event PREGION1RA"] - #[inline(always)] - pub fn pregion1ra(&self) -> PREGION1RA_R { - PREGION1RA_R::new(((self.bits >> 27) & 1) != 0) - } -} -impl W { - #[doc = "Bit 0 - Enable or disable interrupt for event REGION0WA"] - #[inline(always)] - #[must_use] - pub fn region0wa(&mut self) -> REGION0WA_W<0> { - REGION0WA_W::new(self) - } - #[doc = "Bit 1 - Enable or disable interrupt for event REGION0RA"] - #[inline(always)] - #[must_use] - pub fn region0ra(&mut self) -> REGION0RA_W<1> { - REGION0RA_W::new(self) - } - #[doc = "Bit 2 - Enable or disable interrupt for event REGION1WA"] - #[inline(always)] - #[must_use] - pub fn region1wa(&mut self) -> REGION1WA_W<2> { - REGION1WA_W::new(self) - } - #[doc = "Bit 3 - Enable or disable interrupt for event REGION1RA"] - #[inline(always)] - #[must_use] - pub fn region1ra(&mut self) -> REGION1RA_W<3> { - REGION1RA_W::new(self) - } - #[doc = "Bit 4 - Enable or disable interrupt for event REGION2WA"] - #[inline(always)] - #[must_use] - pub fn region2wa(&mut self) -> REGION2WA_W<4> { - REGION2WA_W::new(self) - } - #[doc = "Bit 5 - Enable or disable interrupt for event REGION2RA"] - #[inline(always)] - #[must_use] - pub fn region2ra(&mut self) -> REGION2RA_W<5> { - REGION2RA_W::new(self) - } - #[doc = "Bit 6 - Enable or disable interrupt for event REGION3WA"] - #[inline(always)] - #[must_use] - pub fn region3wa(&mut self) -> REGION3WA_W<6> { - REGION3WA_W::new(self) - } - #[doc = "Bit 7 - Enable or disable interrupt for event REGION3RA"] - #[inline(always)] - #[must_use] - pub fn region3ra(&mut self) -> REGION3RA_W<7> { - REGION3RA_W::new(self) - } - #[doc = "Bit 24 - Enable or disable interrupt for event PREGION0WA"] - #[inline(always)] - #[must_use] - pub fn pregion0wa(&mut self) -> PREGION0WA_W<24> { - PREGION0WA_W::new(self) - } - #[doc = "Bit 25 - Enable or disable interrupt for event PREGION0RA"] - #[inline(always)] - #[must_use] - pub fn pregion0ra(&mut self) -> PREGION0RA_W<25> { - PREGION0RA_W::new(self) - } - #[doc = "Bit 26 - Enable or disable interrupt for event PREGION1WA"] - #[inline(always)] - #[must_use] - pub fn pregion1wa(&mut self) -> PREGION1WA_W<26> { - PREGION1WA_W::new(self) - } - #[doc = "Bit 27 - Enable or disable interrupt for event PREGION1RA"] - #[inline(always)] - #[must_use] - pub fn pregion1ra(&mut self) -> PREGION1RA_W<27> { - PREGION1RA_W::new(self) - } - #[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 = "Enable or disable interrupt\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 [inten](index.html) module"] -pub struct INTEN_SPEC; -impl crate::RegisterSpec for INTEN_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [inten::R](R) reader structure"] -impl crate::Readable for INTEN_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [inten::W](W) writer structure"] -impl crate::Writable for INTEN_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets INTEN to value 0"] -impl crate::Resettable for INTEN_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/mwu/intenclr.rs b/down-the-stack/dk_pac/src/mwu/intenclr.rs deleted file mode 100644 index 05ce51f..0000000 --- a/down-the-stack/dk_pac/src/mwu/intenclr.rs +++ /dev/null @@ -1,881 +0,0 @@ -#[doc = "Register `INTENCLR` 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 `INTENCLR` 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 `REGION0WA` reader - Write '1' to disable interrupt for event REGION0WA"] -pub type REGION0WA_R = crate::BitReader; -#[doc = "Write '1' to disable interrupt for event REGION0WA\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum REGION0WA_A { - #[doc = "0: Read: Disabled"] - DISABLED = 0, - #[doc = "1: Read: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: REGION0WA_A) -> Self { - variant as u8 != 0 - } -} -impl REGION0WA_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> REGION0WA_A { - match self.bits { - false => REGION0WA_A::DISABLED, - true => REGION0WA_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == REGION0WA_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == REGION0WA_A::ENABLED - } -} -#[doc = "Write '1' to disable interrupt for event REGION0WA\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum REGION0WA_AW { - #[doc = "1: Disable"] - CLEAR = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: REGION0WA_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `REGION0WA` writer - Write '1' to disable interrupt for event REGION0WA"] -pub type REGION0WA_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENCLR_SPEC, REGION0WA_AW, O>; -impl<'a, const O: u8> REGION0WA_W<'a, O> { - #[doc = "Disable"] - #[inline(always)] - pub fn clear(self) -> &'a mut W { - self.variant(REGION0WA_AW::CLEAR) - } -} -#[doc = "Field `REGION0RA` reader - Write '1' to disable interrupt for event REGION0RA"] -pub type REGION0RA_R = crate::BitReader; -#[doc = "Write '1' to disable interrupt for event REGION0RA\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum REGION0RA_A { - #[doc = "0: Read: Disabled"] - DISABLED = 0, - #[doc = "1: Read: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: REGION0RA_A) -> Self { - variant as u8 != 0 - } -} -impl REGION0RA_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> REGION0RA_A { - match self.bits { - false => REGION0RA_A::DISABLED, - true => REGION0RA_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == REGION0RA_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == REGION0RA_A::ENABLED - } -} -#[doc = "Write '1' to disable interrupt for event REGION0RA\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum REGION0RA_AW { - #[doc = "1: Disable"] - CLEAR = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: REGION0RA_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `REGION0RA` writer - Write '1' to disable interrupt for event REGION0RA"] -pub type REGION0RA_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENCLR_SPEC, REGION0RA_AW, O>; -impl<'a, const O: u8> REGION0RA_W<'a, O> { - #[doc = "Disable"] - #[inline(always)] - pub fn clear(self) -> &'a mut W { - self.variant(REGION0RA_AW::CLEAR) - } -} -#[doc = "Field `REGION1WA` reader - Write '1' to disable interrupt for event REGION1WA"] -pub type REGION1WA_R = crate::BitReader; -#[doc = "Write '1' to disable interrupt for event REGION1WA\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum REGION1WA_A { - #[doc = "0: Read: Disabled"] - DISABLED = 0, - #[doc = "1: Read: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: REGION1WA_A) -> Self { - variant as u8 != 0 - } -} -impl REGION1WA_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> REGION1WA_A { - match self.bits { - false => REGION1WA_A::DISABLED, - true => REGION1WA_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == REGION1WA_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == REGION1WA_A::ENABLED - } -} -#[doc = "Write '1' to disable interrupt for event REGION1WA\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum REGION1WA_AW { - #[doc = "1: Disable"] - CLEAR = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: REGION1WA_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `REGION1WA` writer - Write '1' to disable interrupt for event REGION1WA"] -pub type REGION1WA_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENCLR_SPEC, REGION1WA_AW, O>; -impl<'a, const O: u8> REGION1WA_W<'a, O> { - #[doc = "Disable"] - #[inline(always)] - pub fn clear(self) -> &'a mut W { - self.variant(REGION1WA_AW::CLEAR) - } -} -#[doc = "Field `REGION1RA` reader - Write '1' to disable interrupt for event REGION1RA"] -pub type REGION1RA_R = crate::BitReader; -#[doc = "Write '1' to disable interrupt for event REGION1RA\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum REGION1RA_A { - #[doc = "0: Read: Disabled"] - DISABLED = 0, - #[doc = "1: Read: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: REGION1RA_A) -> Self { - variant as u8 != 0 - } -} -impl REGION1RA_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> REGION1RA_A { - match self.bits { - false => REGION1RA_A::DISABLED, - true => REGION1RA_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == REGION1RA_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == REGION1RA_A::ENABLED - } -} -#[doc = "Write '1' to disable interrupt for event REGION1RA\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum REGION1RA_AW { - #[doc = "1: Disable"] - CLEAR = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: REGION1RA_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `REGION1RA` writer - Write '1' to disable interrupt for event REGION1RA"] -pub type REGION1RA_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENCLR_SPEC, REGION1RA_AW, O>; -impl<'a, const O: u8> REGION1RA_W<'a, O> { - #[doc = "Disable"] - #[inline(always)] - pub fn clear(self) -> &'a mut W { - self.variant(REGION1RA_AW::CLEAR) - } -} -#[doc = "Field `REGION2WA` reader - Write '1' to disable interrupt for event REGION2WA"] -pub type REGION2WA_R = crate::BitReader; -#[doc = "Write '1' to disable interrupt for event REGION2WA\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum REGION2WA_A { - #[doc = "0: Read: Disabled"] - DISABLED = 0, - #[doc = "1: Read: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: REGION2WA_A) -> Self { - variant as u8 != 0 - } -} -impl REGION2WA_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> REGION2WA_A { - match self.bits { - false => REGION2WA_A::DISABLED, - true => REGION2WA_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == REGION2WA_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == REGION2WA_A::ENABLED - } -} -#[doc = "Write '1' to disable interrupt for event REGION2WA\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum REGION2WA_AW { - #[doc = "1: Disable"] - CLEAR = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: REGION2WA_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `REGION2WA` writer - Write '1' to disable interrupt for event REGION2WA"] -pub type REGION2WA_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENCLR_SPEC, REGION2WA_AW, O>; -impl<'a, const O: u8> REGION2WA_W<'a, O> { - #[doc = "Disable"] - #[inline(always)] - pub fn clear(self) -> &'a mut W { - self.variant(REGION2WA_AW::CLEAR) - } -} -#[doc = "Field `REGION2RA` reader - Write '1' to disable interrupt for event REGION2RA"] -pub type REGION2RA_R = crate::BitReader; -#[doc = "Write '1' to disable interrupt for event REGION2RA\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum REGION2RA_A { - #[doc = "0: Read: Disabled"] - DISABLED = 0, - #[doc = "1: Read: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: REGION2RA_A) -> Self { - variant as u8 != 0 - } -} -impl REGION2RA_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> REGION2RA_A { - match self.bits { - false => REGION2RA_A::DISABLED, - true => REGION2RA_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == REGION2RA_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == REGION2RA_A::ENABLED - } -} -#[doc = "Write '1' to disable interrupt for event REGION2RA\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum REGION2RA_AW { - #[doc = "1: Disable"] - CLEAR = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: REGION2RA_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `REGION2RA` writer - Write '1' to disable interrupt for event REGION2RA"] -pub type REGION2RA_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENCLR_SPEC, REGION2RA_AW, O>; -impl<'a, const O: u8> REGION2RA_W<'a, O> { - #[doc = "Disable"] - #[inline(always)] - pub fn clear(self) -> &'a mut W { - self.variant(REGION2RA_AW::CLEAR) - } -} -#[doc = "Field `REGION3WA` reader - Write '1' to disable interrupt for event REGION3WA"] -pub type REGION3WA_R = crate::BitReader; -#[doc = "Write '1' to disable interrupt for event REGION3WA\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum REGION3WA_A { - #[doc = "0: Read: Disabled"] - DISABLED = 0, - #[doc = "1: Read: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: REGION3WA_A) -> Self { - variant as u8 != 0 - } -} -impl REGION3WA_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> REGION3WA_A { - match self.bits { - false => REGION3WA_A::DISABLED, - true => REGION3WA_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == REGION3WA_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == REGION3WA_A::ENABLED - } -} -#[doc = "Write '1' to disable interrupt for event REGION3WA\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum REGION3WA_AW { - #[doc = "1: Disable"] - CLEAR = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: REGION3WA_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `REGION3WA` writer - Write '1' to disable interrupt for event REGION3WA"] -pub type REGION3WA_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENCLR_SPEC, REGION3WA_AW, O>; -impl<'a, const O: u8> REGION3WA_W<'a, O> { - #[doc = "Disable"] - #[inline(always)] - pub fn clear(self) -> &'a mut W { - self.variant(REGION3WA_AW::CLEAR) - } -} -#[doc = "Field `REGION3RA` reader - Write '1' to disable interrupt for event REGION3RA"] -pub type REGION3RA_R = crate::BitReader; -#[doc = "Write '1' to disable interrupt for event REGION3RA\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum REGION3RA_A { - #[doc = "0: Read: Disabled"] - DISABLED = 0, - #[doc = "1: Read: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: REGION3RA_A) -> Self { - variant as u8 != 0 - } -} -impl REGION3RA_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> REGION3RA_A { - match self.bits { - false => REGION3RA_A::DISABLED, - true => REGION3RA_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == REGION3RA_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == REGION3RA_A::ENABLED - } -} -#[doc = "Write '1' to disable interrupt for event REGION3RA\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum REGION3RA_AW { - #[doc = "1: Disable"] - CLEAR = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: REGION3RA_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `REGION3RA` writer - Write '1' to disable interrupt for event REGION3RA"] -pub type REGION3RA_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENCLR_SPEC, REGION3RA_AW, O>; -impl<'a, const O: u8> REGION3RA_W<'a, O> { - #[doc = "Disable"] - #[inline(always)] - pub fn clear(self) -> &'a mut W { - self.variant(REGION3RA_AW::CLEAR) - } -} -#[doc = "Field `PREGION0WA` reader - Write '1' to disable interrupt for event PREGION0WA"] -pub type PREGION0WA_R = crate::BitReader; -#[doc = "Write '1' to disable interrupt for event PREGION0WA\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PREGION0WA_A { - #[doc = "0: Read: Disabled"] - DISABLED = 0, - #[doc = "1: Read: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PREGION0WA_A) -> Self { - variant as u8 != 0 - } -} -impl PREGION0WA_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> PREGION0WA_A { - match self.bits { - false => PREGION0WA_A::DISABLED, - true => PREGION0WA_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == PREGION0WA_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == PREGION0WA_A::ENABLED - } -} -#[doc = "Write '1' to disable interrupt for event PREGION0WA\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PREGION0WA_AW { - #[doc = "1: Disable"] - CLEAR = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PREGION0WA_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `PREGION0WA` writer - Write '1' to disable interrupt for event PREGION0WA"] -pub type PREGION0WA_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENCLR_SPEC, PREGION0WA_AW, O>; -impl<'a, const O: u8> PREGION0WA_W<'a, O> { - #[doc = "Disable"] - #[inline(always)] - pub fn clear(self) -> &'a mut W { - self.variant(PREGION0WA_AW::CLEAR) - } -} -#[doc = "Field `PREGION0RA` reader - Write '1' to disable interrupt for event PREGION0RA"] -pub type PREGION0RA_R = crate::BitReader; -#[doc = "Write '1' to disable interrupt for event PREGION0RA\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PREGION0RA_A { - #[doc = "0: Read: Disabled"] - DISABLED = 0, - #[doc = "1: Read: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PREGION0RA_A) -> Self { - variant as u8 != 0 - } -} -impl PREGION0RA_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> PREGION0RA_A { - match self.bits { - false => PREGION0RA_A::DISABLED, - true => PREGION0RA_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == PREGION0RA_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == PREGION0RA_A::ENABLED - } -} -#[doc = "Write '1' to disable interrupt for event PREGION0RA\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PREGION0RA_AW { - #[doc = "1: Disable"] - CLEAR = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PREGION0RA_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `PREGION0RA` writer - Write '1' to disable interrupt for event PREGION0RA"] -pub type PREGION0RA_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENCLR_SPEC, PREGION0RA_AW, O>; -impl<'a, const O: u8> PREGION0RA_W<'a, O> { - #[doc = "Disable"] - #[inline(always)] - pub fn clear(self) -> &'a mut W { - self.variant(PREGION0RA_AW::CLEAR) - } -} -#[doc = "Field `PREGION1WA` reader - Write '1' to disable interrupt for event PREGION1WA"] -pub type PREGION1WA_R = crate::BitReader; -#[doc = "Write '1' to disable interrupt for event PREGION1WA\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PREGION1WA_A { - #[doc = "0: Read: Disabled"] - DISABLED = 0, - #[doc = "1: Read: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PREGION1WA_A) -> Self { - variant as u8 != 0 - } -} -impl PREGION1WA_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> PREGION1WA_A { - match self.bits { - false => PREGION1WA_A::DISABLED, - true => PREGION1WA_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == PREGION1WA_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == PREGION1WA_A::ENABLED - } -} -#[doc = "Write '1' to disable interrupt for event PREGION1WA\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PREGION1WA_AW { - #[doc = "1: Disable"] - CLEAR = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PREGION1WA_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `PREGION1WA` writer - Write '1' to disable interrupt for event PREGION1WA"] -pub type PREGION1WA_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENCLR_SPEC, PREGION1WA_AW, O>; -impl<'a, const O: u8> PREGION1WA_W<'a, O> { - #[doc = "Disable"] - #[inline(always)] - pub fn clear(self) -> &'a mut W { - self.variant(PREGION1WA_AW::CLEAR) - } -} -#[doc = "Field `PREGION1RA` reader - Write '1' to disable interrupt for event PREGION1RA"] -pub type PREGION1RA_R = crate::BitReader; -#[doc = "Write '1' to disable interrupt for event PREGION1RA\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PREGION1RA_A { - #[doc = "0: Read: Disabled"] - DISABLED = 0, - #[doc = "1: Read: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PREGION1RA_A) -> Self { - variant as u8 != 0 - } -} -impl PREGION1RA_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> PREGION1RA_A { - match self.bits { - false => PREGION1RA_A::DISABLED, - true => PREGION1RA_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == PREGION1RA_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == PREGION1RA_A::ENABLED - } -} -#[doc = "Write '1' to disable interrupt for event PREGION1RA\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PREGION1RA_AW { - #[doc = "1: Disable"] - CLEAR = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PREGION1RA_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `PREGION1RA` writer - Write '1' to disable interrupt for event PREGION1RA"] -pub type PREGION1RA_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENCLR_SPEC, PREGION1RA_AW, O>; -impl<'a, const O: u8> PREGION1RA_W<'a, O> { - #[doc = "Disable"] - #[inline(always)] - pub fn clear(self) -> &'a mut W { - self.variant(PREGION1RA_AW::CLEAR) - } -} -impl R { - #[doc = "Bit 0 - Write '1' to disable interrupt for event REGION0WA"] - #[inline(always)] - pub fn region0wa(&self) -> REGION0WA_R { - REGION0WA_R::new((self.bits & 1) != 0) - } - #[doc = "Bit 1 - Write '1' to disable interrupt for event REGION0RA"] - #[inline(always)] - pub fn region0ra(&self) -> REGION0RA_R { - REGION0RA_R::new(((self.bits >> 1) & 1) != 0) - } - #[doc = "Bit 2 - Write '1' to disable interrupt for event REGION1WA"] - #[inline(always)] - pub fn region1wa(&self) -> REGION1WA_R { - REGION1WA_R::new(((self.bits >> 2) & 1) != 0) - } - #[doc = "Bit 3 - Write '1' to disable interrupt for event REGION1RA"] - #[inline(always)] - pub fn region1ra(&self) -> REGION1RA_R { - REGION1RA_R::new(((self.bits >> 3) & 1) != 0) - } - #[doc = "Bit 4 - Write '1' to disable interrupt for event REGION2WA"] - #[inline(always)] - pub fn region2wa(&self) -> REGION2WA_R { - REGION2WA_R::new(((self.bits >> 4) & 1) != 0) - } - #[doc = "Bit 5 - Write '1' to disable interrupt for event REGION2RA"] - #[inline(always)] - pub fn region2ra(&self) -> REGION2RA_R { - REGION2RA_R::new(((self.bits >> 5) & 1) != 0) - } - #[doc = "Bit 6 - Write '1' to disable interrupt for event REGION3WA"] - #[inline(always)] - pub fn region3wa(&self) -> REGION3WA_R { - REGION3WA_R::new(((self.bits >> 6) & 1) != 0) - } - #[doc = "Bit 7 - Write '1' to disable interrupt for event REGION3RA"] - #[inline(always)] - pub fn region3ra(&self) -> REGION3RA_R { - REGION3RA_R::new(((self.bits >> 7) & 1) != 0) - } - #[doc = "Bit 24 - Write '1' to disable interrupt for event PREGION0WA"] - #[inline(always)] - pub fn pregion0wa(&self) -> PREGION0WA_R { - PREGION0WA_R::new(((self.bits >> 24) & 1) != 0) - } - #[doc = "Bit 25 - Write '1' to disable interrupt for event PREGION0RA"] - #[inline(always)] - pub fn pregion0ra(&self) -> PREGION0RA_R { - PREGION0RA_R::new(((self.bits >> 25) & 1) != 0) - } - #[doc = "Bit 26 - Write '1' to disable interrupt for event PREGION1WA"] - #[inline(always)] - pub fn pregion1wa(&self) -> PREGION1WA_R { - PREGION1WA_R::new(((self.bits >> 26) & 1) != 0) - } - #[doc = "Bit 27 - Write '1' to disable interrupt for event PREGION1RA"] - #[inline(always)] - pub fn pregion1ra(&self) -> PREGION1RA_R { - PREGION1RA_R::new(((self.bits >> 27) & 1) != 0) - } -} -impl W { - #[doc = "Bit 0 - Write '1' to disable interrupt for event REGION0WA"] - #[inline(always)] - #[must_use] - pub fn region0wa(&mut self) -> REGION0WA_W<0> { - REGION0WA_W::new(self) - } - #[doc = "Bit 1 - Write '1' to disable interrupt for event REGION0RA"] - #[inline(always)] - #[must_use] - pub fn region0ra(&mut self) -> REGION0RA_W<1> { - REGION0RA_W::new(self) - } - #[doc = "Bit 2 - Write '1' to disable interrupt for event REGION1WA"] - #[inline(always)] - #[must_use] - pub fn region1wa(&mut self) -> REGION1WA_W<2> { - REGION1WA_W::new(self) - } - #[doc = "Bit 3 - Write '1' to disable interrupt for event REGION1RA"] - #[inline(always)] - #[must_use] - pub fn region1ra(&mut self) -> REGION1RA_W<3> { - REGION1RA_W::new(self) - } - #[doc = "Bit 4 - Write '1' to disable interrupt for event REGION2WA"] - #[inline(always)] - #[must_use] - pub fn region2wa(&mut self) -> REGION2WA_W<4> { - REGION2WA_W::new(self) - } - #[doc = "Bit 5 - Write '1' to disable interrupt for event REGION2RA"] - #[inline(always)] - #[must_use] - pub fn region2ra(&mut self) -> REGION2RA_W<5> { - REGION2RA_W::new(self) - } - #[doc = "Bit 6 - Write '1' to disable interrupt for event REGION3WA"] - #[inline(always)] - #[must_use] - pub fn region3wa(&mut self) -> REGION3WA_W<6> { - REGION3WA_W::new(self) - } - #[doc = "Bit 7 - Write '1' to disable interrupt for event REGION3RA"] - #[inline(always)] - #[must_use] - pub fn region3ra(&mut self) -> REGION3RA_W<7> { - REGION3RA_W::new(self) - } - #[doc = "Bit 24 - Write '1' to disable interrupt for event PREGION0WA"] - #[inline(always)] - #[must_use] - pub fn pregion0wa(&mut self) -> PREGION0WA_W<24> { - PREGION0WA_W::new(self) - } - #[doc = "Bit 25 - Write '1' to disable interrupt for event PREGION0RA"] - #[inline(always)] - #[must_use] - pub fn pregion0ra(&mut self) -> PREGION0RA_W<25> { - PREGION0RA_W::new(self) - } - #[doc = "Bit 26 - Write '1' to disable interrupt for event PREGION1WA"] - #[inline(always)] - #[must_use] - pub fn pregion1wa(&mut self) -> PREGION1WA_W<26> { - PREGION1WA_W::new(self) - } - #[doc = "Bit 27 - Write '1' to disable interrupt for event PREGION1RA"] - #[inline(always)] - #[must_use] - pub fn pregion1ra(&mut self) -> PREGION1RA_W<27> { - PREGION1RA_W::new(self) - } - #[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 = "Disable interrupt\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 [intenclr](index.html) module"] -pub struct INTENCLR_SPEC; -impl crate::RegisterSpec for INTENCLR_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [intenclr::R](R) reader structure"] -impl crate::Readable for INTENCLR_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [intenclr::W](W) writer structure"] -impl crate::Writable for INTENCLR_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets INTENCLR to value 0"] -impl crate::Resettable for INTENCLR_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/mwu/intenset.rs b/down-the-stack/dk_pac/src/mwu/intenset.rs deleted file mode 100644 index 1c47fda..0000000 --- a/down-the-stack/dk_pac/src/mwu/intenset.rs +++ /dev/null @@ -1,881 +0,0 @@ -#[doc = "Register `INTENSET` 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 `INTENSET` 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 `REGION0WA` reader - Write '1' to enable interrupt for event REGION0WA"] -pub type REGION0WA_R = crate::BitReader; -#[doc = "Write '1' to enable interrupt for event REGION0WA\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum REGION0WA_A { - #[doc = "0: Read: Disabled"] - DISABLED = 0, - #[doc = "1: Read: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: REGION0WA_A) -> Self { - variant as u8 != 0 - } -} -impl REGION0WA_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> REGION0WA_A { - match self.bits { - false => REGION0WA_A::DISABLED, - true => REGION0WA_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == REGION0WA_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == REGION0WA_A::ENABLED - } -} -#[doc = "Write '1' to enable interrupt for event REGION0WA\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum REGION0WA_AW { - #[doc = "1: Enable"] - SET = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: REGION0WA_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `REGION0WA` writer - Write '1' to enable interrupt for event REGION0WA"] -pub type REGION0WA_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENSET_SPEC, REGION0WA_AW, O>; -impl<'a, const O: u8> REGION0WA_W<'a, O> { - #[doc = "Enable"] - #[inline(always)] - pub fn set(self) -> &'a mut W { - self.variant(REGION0WA_AW::SET) - } -} -#[doc = "Field `REGION0RA` reader - Write '1' to enable interrupt for event REGION0RA"] -pub type REGION0RA_R = crate::BitReader; -#[doc = "Write '1' to enable interrupt for event REGION0RA\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum REGION0RA_A { - #[doc = "0: Read: Disabled"] - DISABLED = 0, - #[doc = "1: Read: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: REGION0RA_A) -> Self { - variant as u8 != 0 - } -} -impl REGION0RA_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> REGION0RA_A { - match self.bits { - false => REGION0RA_A::DISABLED, - true => REGION0RA_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == REGION0RA_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == REGION0RA_A::ENABLED - } -} -#[doc = "Write '1' to enable interrupt for event REGION0RA\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum REGION0RA_AW { - #[doc = "1: Enable"] - SET = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: REGION0RA_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `REGION0RA` writer - Write '1' to enable interrupt for event REGION0RA"] -pub type REGION0RA_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENSET_SPEC, REGION0RA_AW, O>; -impl<'a, const O: u8> REGION0RA_W<'a, O> { - #[doc = "Enable"] - #[inline(always)] - pub fn set(self) -> &'a mut W { - self.variant(REGION0RA_AW::SET) - } -} -#[doc = "Field `REGION1WA` reader - Write '1' to enable interrupt for event REGION1WA"] -pub type REGION1WA_R = crate::BitReader; -#[doc = "Write '1' to enable interrupt for event REGION1WA\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum REGION1WA_A { - #[doc = "0: Read: Disabled"] - DISABLED = 0, - #[doc = "1: Read: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: REGION1WA_A) -> Self { - variant as u8 != 0 - } -} -impl REGION1WA_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> REGION1WA_A { - match self.bits { - false => REGION1WA_A::DISABLED, - true => REGION1WA_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == REGION1WA_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == REGION1WA_A::ENABLED - } -} -#[doc = "Write '1' to enable interrupt for event REGION1WA\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum REGION1WA_AW { - #[doc = "1: Enable"] - SET = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: REGION1WA_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `REGION1WA` writer - Write '1' to enable interrupt for event REGION1WA"] -pub type REGION1WA_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENSET_SPEC, REGION1WA_AW, O>; -impl<'a, const O: u8> REGION1WA_W<'a, O> { - #[doc = "Enable"] - #[inline(always)] - pub fn set(self) -> &'a mut W { - self.variant(REGION1WA_AW::SET) - } -} -#[doc = "Field `REGION1RA` reader - Write '1' to enable interrupt for event REGION1RA"] -pub type REGION1RA_R = crate::BitReader; -#[doc = "Write '1' to enable interrupt for event REGION1RA\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum REGION1RA_A { - #[doc = "0: Read: Disabled"] - DISABLED = 0, - #[doc = "1: Read: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: REGION1RA_A) -> Self { - variant as u8 != 0 - } -} -impl REGION1RA_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> REGION1RA_A { - match self.bits { - false => REGION1RA_A::DISABLED, - true => REGION1RA_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == REGION1RA_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == REGION1RA_A::ENABLED - } -} -#[doc = "Write '1' to enable interrupt for event REGION1RA\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum REGION1RA_AW { - #[doc = "1: Enable"] - SET = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: REGION1RA_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `REGION1RA` writer - Write '1' to enable interrupt for event REGION1RA"] -pub type REGION1RA_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENSET_SPEC, REGION1RA_AW, O>; -impl<'a, const O: u8> REGION1RA_W<'a, O> { - #[doc = "Enable"] - #[inline(always)] - pub fn set(self) -> &'a mut W { - self.variant(REGION1RA_AW::SET) - } -} -#[doc = "Field `REGION2WA` reader - Write '1' to enable interrupt for event REGION2WA"] -pub type REGION2WA_R = crate::BitReader; -#[doc = "Write '1' to enable interrupt for event REGION2WA\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum REGION2WA_A { - #[doc = "0: Read: Disabled"] - DISABLED = 0, - #[doc = "1: Read: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: REGION2WA_A) -> Self { - variant as u8 != 0 - } -} -impl REGION2WA_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> REGION2WA_A { - match self.bits { - false => REGION2WA_A::DISABLED, - true => REGION2WA_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == REGION2WA_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == REGION2WA_A::ENABLED - } -} -#[doc = "Write '1' to enable interrupt for event REGION2WA\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum REGION2WA_AW { - #[doc = "1: Enable"] - SET = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: REGION2WA_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `REGION2WA` writer - Write '1' to enable interrupt for event REGION2WA"] -pub type REGION2WA_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENSET_SPEC, REGION2WA_AW, O>; -impl<'a, const O: u8> REGION2WA_W<'a, O> { - #[doc = "Enable"] - #[inline(always)] - pub fn set(self) -> &'a mut W { - self.variant(REGION2WA_AW::SET) - } -} -#[doc = "Field `REGION2RA` reader - Write '1' to enable interrupt for event REGION2RA"] -pub type REGION2RA_R = crate::BitReader; -#[doc = "Write '1' to enable interrupt for event REGION2RA\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum REGION2RA_A { - #[doc = "0: Read: Disabled"] - DISABLED = 0, - #[doc = "1: Read: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: REGION2RA_A) -> Self { - variant as u8 != 0 - } -} -impl REGION2RA_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> REGION2RA_A { - match self.bits { - false => REGION2RA_A::DISABLED, - true => REGION2RA_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == REGION2RA_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == REGION2RA_A::ENABLED - } -} -#[doc = "Write '1' to enable interrupt for event REGION2RA\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum REGION2RA_AW { - #[doc = "1: Enable"] - SET = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: REGION2RA_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `REGION2RA` writer - Write '1' to enable interrupt for event REGION2RA"] -pub type REGION2RA_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENSET_SPEC, REGION2RA_AW, O>; -impl<'a, const O: u8> REGION2RA_W<'a, O> { - #[doc = "Enable"] - #[inline(always)] - pub fn set(self) -> &'a mut W { - self.variant(REGION2RA_AW::SET) - } -} -#[doc = "Field `REGION3WA` reader - Write '1' to enable interrupt for event REGION3WA"] -pub type REGION3WA_R = crate::BitReader; -#[doc = "Write '1' to enable interrupt for event REGION3WA\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum REGION3WA_A { - #[doc = "0: Read: Disabled"] - DISABLED = 0, - #[doc = "1: Read: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: REGION3WA_A) -> Self { - variant as u8 != 0 - } -} -impl REGION3WA_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> REGION3WA_A { - match self.bits { - false => REGION3WA_A::DISABLED, - true => REGION3WA_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == REGION3WA_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == REGION3WA_A::ENABLED - } -} -#[doc = "Write '1' to enable interrupt for event REGION3WA\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum REGION3WA_AW { - #[doc = "1: Enable"] - SET = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: REGION3WA_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `REGION3WA` writer - Write '1' to enable interrupt for event REGION3WA"] -pub type REGION3WA_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENSET_SPEC, REGION3WA_AW, O>; -impl<'a, const O: u8> REGION3WA_W<'a, O> { - #[doc = "Enable"] - #[inline(always)] - pub fn set(self) -> &'a mut W { - self.variant(REGION3WA_AW::SET) - } -} -#[doc = "Field `REGION3RA` reader - Write '1' to enable interrupt for event REGION3RA"] -pub type REGION3RA_R = crate::BitReader; -#[doc = "Write '1' to enable interrupt for event REGION3RA\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum REGION3RA_A { - #[doc = "0: Read: Disabled"] - DISABLED = 0, - #[doc = "1: Read: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: REGION3RA_A) -> Self { - variant as u8 != 0 - } -} -impl REGION3RA_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> REGION3RA_A { - match self.bits { - false => REGION3RA_A::DISABLED, - true => REGION3RA_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == REGION3RA_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == REGION3RA_A::ENABLED - } -} -#[doc = "Write '1' to enable interrupt for event REGION3RA\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum REGION3RA_AW { - #[doc = "1: Enable"] - SET = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: REGION3RA_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `REGION3RA` writer - Write '1' to enable interrupt for event REGION3RA"] -pub type REGION3RA_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENSET_SPEC, REGION3RA_AW, O>; -impl<'a, const O: u8> REGION3RA_W<'a, O> { - #[doc = "Enable"] - #[inline(always)] - pub fn set(self) -> &'a mut W { - self.variant(REGION3RA_AW::SET) - } -} -#[doc = "Field `PREGION0WA` reader - Write '1' to enable interrupt for event PREGION0WA"] -pub type PREGION0WA_R = crate::BitReader; -#[doc = "Write '1' to enable interrupt for event PREGION0WA\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PREGION0WA_A { - #[doc = "0: Read: Disabled"] - DISABLED = 0, - #[doc = "1: Read: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PREGION0WA_A) -> Self { - variant as u8 != 0 - } -} -impl PREGION0WA_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> PREGION0WA_A { - match self.bits { - false => PREGION0WA_A::DISABLED, - true => PREGION0WA_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == PREGION0WA_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == PREGION0WA_A::ENABLED - } -} -#[doc = "Write '1' to enable interrupt for event PREGION0WA\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PREGION0WA_AW { - #[doc = "1: Enable"] - SET = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PREGION0WA_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `PREGION0WA` writer - Write '1' to enable interrupt for event PREGION0WA"] -pub type PREGION0WA_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENSET_SPEC, PREGION0WA_AW, O>; -impl<'a, const O: u8> PREGION0WA_W<'a, O> { - #[doc = "Enable"] - #[inline(always)] - pub fn set(self) -> &'a mut W { - self.variant(PREGION0WA_AW::SET) - } -} -#[doc = "Field `PREGION0RA` reader - Write '1' to enable interrupt for event PREGION0RA"] -pub type PREGION0RA_R = crate::BitReader; -#[doc = "Write '1' to enable interrupt for event PREGION0RA\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PREGION0RA_A { - #[doc = "0: Read: Disabled"] - DISABLED = 0, - #[doc = "1: Read: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PREGION0RA_A) -> Self { - variant as u8 != 0 - } -} -impl PREGION0RA_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> PREGION0RA_A { - match self.bits { - false => PREGION0RA_A::DISABLED, - true => PREGION0RA_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == PREGION0RA_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == PREGION0RA_A::ENABLED - } -} -#[doc = "Write '1' to enable interrupt for event PREGION0RA\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PREGION0RA_AW { - #[doc = "1: Enable"] - SET = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PREGION0RA_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `PREGION0RA` writer - Write '1' to enable interrupt for event PREGION0RA"] -pub type PREGION0RA_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENSET_SPEC, PREGION0RA_AW, O>; -impl<'a, const O: u8> PREGION0RA_W<'a, O> { - #[doc = "Enable"] - #[inline(always)] - pub fn set(self) -> &'a mut W { - self.variant(PREGION0RA_AW::SET) - } -} -#[doc = "Field `PREGION1WA` reader - Write '1' to enable interrupt for event PREGION1WA"] -pub type PREGION1WA_R = crate::BitReader; -#[doc = "Write '1' to enable interrupt for event PREGION1WA\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PREGION1WA_A { - #[doc = "0: Read: Disabled"] - DISABLED = 0, - #[doc = "1: Read: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PREGION1WA_A) -> Self { - variant as u8 != 0 - } -} -impl PREGION1WA_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> PREGION1WA_A { - match self.bits { - false => PREGION1WA_A::DISABLED, - true => PREGION1WA_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == PREGION1WA_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == PREGION1WA_A::ENABLED - } -} -#[doc = "Write '1' to enable interrupt for event PREGION1WA\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PREGION1WA_AW { - #[doc = "1: Enable"] - SET = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PREGION1WA_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `PREGION1WA` writer - Write '1' to enable interrupt for event PREGION1WA"] -pub type PREGION1WA_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENSET_SPEC, PREGION1WA_AW, O>; -impl<'a, const O: u8> PREGION1WA_W<'a, O> { - #[doc = "Enable"] - #[inline(always)] - pub fn set(self) -> &'a mut W { - self.variant(PREGION1WA_AW::SET) - } -} -#[doc = "Field `PREGION1RA` reader - Write '1' to enable interrupt for event PREGION1RA"] -pub type PREGION1RA_R = crate::BitReader; -#[doc = "Write '1' to enable interrupt for event PREGION1RA\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PREGION1RA_A { - #[doc = "0: Read: Disabled"] - DISABLED = 0, - #[doc = "1: Read: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PREGION1RA_A) -> Self { - variant as u8 != 0 - } -} -impl PREGION1RA_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> PREGION1RA_A { - match self.bits { - false => PREGION1RA_A::DISABLED, - true => PREGION1RA_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == PREGION1RA_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == PREGION1RA_A::ENABLED - } -} -#[doc = "Write '1' to enable interrupt for event PREGION1RA\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PREGION1RA_AW { - #[doc = "1: Enable"] - SET = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PREGION1RA_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `PREGION1RA` writer - Write '1' to enable interrupt for event PREGION1RA"] -pub type PREGION1RA_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENSET_SPEC, PREGION1RA_AW, O>; -impl<'a, const O: u8> PREGION1RA_W<'a, O> { - #[doc = "Enable"] - #[inline(always)] - pub fn set(self) -> &'a mut W { - self.variant(PREGION1RA_AW::SET) - } -} -impl R { - #[doc = "Bit 0 - Write '1' to enable interrupt for event REGION0WA"] - #[inline(always)] - pub fn region0wa(&self) -> REGION0WA_R { - REGION0WA_R::new((self.bits & 1) != 0) - } - #[doc = "Bit 1 - Write '1' to enable interrupt for event REGION0RA"] - #[inline(always)] - pub fn region0ra(&self) -> REGION0RA_R { - REGION0RA_R::new(((self.bits >> 1) & 1) != 0) - } - #[doc = "Bit 2 - Write '1' to enable interrupt for event REGION1WA"] - #[inline(always)] - pub fn region1wa(&self) -> REGION1WA_R { - REGION1WA_R::new(((self.bits >> 2) & 1) != 0) - } - #[doc = "Bit 3 - Write '1' to enable interrupt for event REGION1RA"] - #[inline(always)] - pub fn region1ra(&self) -> REGION1RA_R { - REGION1RA_R::new(((self.bits >> 3) & 1) != 0) - } - #[doc = "Bit 4 - Write '1' to enable interrupt for event REGION2WA"] - #[inline(always)] - pub fn region2wa(&self) -> REGION2WA_R { - REGION2WA_R::new(((self.bits >> 4) & 1) != 0) - } - #[doc = "Bit 5 - Write '1' to enable interrupt for event REGION2RA"] - #[inline(always)] - pub fn region2ra(&self) -> REGION2RA_R { - REGION2RA_R::new(((self.bits >> 5) & 1) != 0) - } - #[doc = "Bit 6 - Write '1' to enable interrupt for event REGION3WA"] - #[inline(always)] - pub fn region3wa(&self) -> REGION3WA_R { - REGION3WA_R::new(((self.bits >> 6) & 1) != 0) - } - #[doc = "Bit 7 - Write '1' to enable interrupt for event REGION3RA"] - #[inline(always)] - pub fn region3ra(&self) -> REGION3RA_R { - REGION3RA_R::new(((self.bits >> 7) & 1) != 0) - } - #[doc = "Bit 24 - Write '1' to enable interrupt for event PREGION0WA"] - #[inline(always)] - pub fn pregion0wa(&self) -> PREGION0WA_R { - PREGION0WA_R::new(((self.bits >> 24) & 1) != 0) - } - #[doc = "Bit 25 - Write '1' to enable interrupt for event PREGION0RA"] - #[inline(always)] - pub fn pregion0ra(&self) -> PREGION0RA_R { - PREGION0RA_R::new(((self.bits >> 25) & 1) != 0) - } - #[doc = "Bit 26 - Write '1' to enable interrupt for event PREGION1WA"] - #[inline(always)] - pub fn pregion1wa(&self) -> PREGION1WA_R { - PREGION1WA_R::new(((self.bits >> 26) & 1) != 0) - } - #[doc = "Bit 27 - Write '1' to enable interrupt for event PREGION1RA"] - #[inline(always)] - pub fn pregion1ra(&self) -> PREGION1RA_R { - PREGION1RA_R::new(((self.bits >> 27) & 1) != 0) - } -} -impl W { - #[doc = "Bit 0 - Write '1' to enable interrupt for event REGION0WA"] - #[inline(always)] - #[must_use] - pub fn region0wa(&mut self) -> REGION0WA_W<0> { - REGION0WA_W::new(self) - } - #[doc = "Bit 1 - Write '1' to enable interrupt for event REGION0RA"] - #[inline(always)] - #[must_use] - pub fn region0ra(&mut self) -> REGION0RA_W<1> { - REGION0RA_W::new(self) - } - #[doc = "Bit 2 - Write '1' to enable interrupt for event REGION1WA"] - #[inline(always)] - #[must_use] - pub fn region1wa(&mut self) -> REGION1WA_W<2> { - REGION1WA_W::new(self) - } - #[doc = "Bit 3 - Write '1' to enable interrupt for event REGION1RA"] - #[inline(always)] - #[must_use] - pub fn region1ra(&mut self) -> REGION1RA_W<3> { - REGION1RA_W::new(self) - } - #[doc = "Bit 4 - Write '1' to enable interrupt for event REGION2WA"] - #[inline(always)] - #[must_use] - pub fn region2wa(&mut self) -> REGION2WA_W<4> { - REGION2WA_W::new(self) - } - #[doc = "Bit 5 - Write '1' to enable interrupt for event REGION2RA"] - #[inline(always)] - #[must_use] - pub fn region2ra(&mut self) -> REGION2RA_W<5> { - REGION2RA_W::new(self) - } - #[doc = "Bit 6 - Write '1' to enable interrupt for event REGION3WA"] - #[inline(always)] - #[must_use] - pub fn region3wa(&mut self) -> REGION3WA_W<6> { - REGION3WA_W::new(self) - } - #[doc = "Bit 7 - Write '1' to enable interrupt for event REGION3RA"] - #[inline(always)] - #[must_use] - pub fn region3ra(&mut self) -> REGION3RA_W<7> { - REGION3RA_W::new(self) - } - #[doc = "Bit 24 - Write '1' to enable interrupt for event PREGION0WA"] - #[inline(always)] - #[must_use] - pub fn pregion0wa(&mut self) -> PREGION0WA_W<24> { - PREGION0WA_W::new(self) - } - #[doc = "Bit 25 - Write '1' to enable interrupt for event PREGION0RA"] - #[inline(always)] - #[must_use] - pub fn pregion0ra(&mut self) -> PREGION0RA_W<25> { - PREGION0RA_W::new(self) - } - #[doc = "Bit 26 - Write '1' to enable interrupt for event PREGION1WA"] - #[inline(always)] - #[must_use] - pub fn pregion1wa(&mut self) -> PREGION1WA_W<26> { - PREGION1WA_W::new(self) - } - #[doc = "Bit 27 - Write '1' to enable interrupt for event PREGION1RA"] - #[inline(always)] - #[must_use] - pub fn pregion1ra(&mut self) -> PREGION1RA_W<27> { - PREGION1RA_W::new(self) - } - #[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 = "Enable interrupt\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 [intenset](index.html) module"] -pub struct INTENSET_SPEC; -impl crate::RegisterSpec for INTENSET_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [intenset::R](R) reader structure"] -impl crate::Readable for INTENSET_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [intenset::W](W) writer structure"] -impl crate::Writable for INTENSET_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets INTENSET to value 0"] -impl crate::Resettable for INTENSET_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/mwu/nmien.rs b/down-the-stack/dk_pac/src/mwu/nmien.rs deleted file mode 100644 index 16fb3c1..0000000 --- a/down-the-stack/dk_pac/src/mwu/nmien.rs +++ /dev/null @@ -1,797 +0,0 @@ -#[doc = "Register `NMIEN` 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 `NMIEN` 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 `REGION0WA` reader - Enable or disable interrupt for event REGION0WA"] -pub type REGION0WA_R = crate::BitReader; -#[doc = "Enable or disable interrupt for event REGION0WA\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum REGION0WA_A { - #[doc = "0: Disable"] - DISABLED = 0, - #[doc = "1: Enable"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: REGION0WA_A) -> Self { - variant as u8 != 0 - } -} -impl REGION0WA_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> REGION0WA_A { - match self.bits { - false => REGION0WA_A::DISABLED, - true => REGION0WA_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == REGION0WA_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == REGION0WA_A::ENABLED - } -} -#[doc = "Field `REGION0WA` writer - Enable or disable interrupt for event REGION0WA"] -pub type REGION0WA_W<'a, const O: u8> = crate::BitWriter<'a, u32, NMIEN_SPEC, REGION0WA_A, O>; -impl<'a, const O: u8> REGION0WA_W<'a, O> { - #[doc = "Disable"] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(REGION0WA_A::DISABLED) - } - #[doc = "Enable"] - #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(REGION0WA_A::ENABLED) - } -} -#[doc = "Field `REGION0RA` reader - Enable or disable interrupt for event REGION0RA"] -pub type REGION0RA_R = crate::BitReader; -#[doc = "Enable or disable interrupt for event REGION0RA\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum REGION0RA_A { - #[doc = "0: Disable"] - DISABLED = 0, - #[doc = "1: Enable"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: REGION0RA_A) -> Self { - variant as u8 != 0 - } -} -impl REGION0RA_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> REGION0RA_A { - match self.bits { - false => REGION0RA_A::DISABLED, - true => REGION0RA_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == REGION0RA_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == REGION0RA_A::ENABLED - } -} -#[doc = "Field `REGION0RA` writer - Enable or disable interrupt for event REGION0RA"] -pub type REGION0RA_W<'a, const O: u8> = crate::BitWriter<'a, u32, NMIEN_SPEC, REGION0RA_A, O>; -impl<'a, const O: u8> REGION0RA_W<'a, O> { - #[doc = "Disable"] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(REGION0RA_A::DISABLED) - } - #[doc = "Enable"] - #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(REGION0RA_A::ENABLED) - } -} -#[doc = "Field `REGION1WA` reader - Enable or disable interrupt for event REGION1WA"] -pub type REGION1WA_R = crate::BitReader; -#[doc = "Enable or disable interrupt for event REGION1WA\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum REGION1WA_A { - #[doc = "0: Disable"] - DISABLED = 0, - #[doc = "1: Enable"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: REGION1WA_A) -> Self { - variant as u8 != 0 - } -} -impl REGION1WA_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> REGION1WA_A { - match self.bits { - false => REGION1WA_A::DISABLED, - true => REGION1WA_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == REGION1WA_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == REGION1WA_A::ENABLED - } -} -#[doc = "Field `REGION1WA` writer - Enable or disable interrupt for event REGION1WA"] -pub type REGION1WA_W<'a, const O: u8> = crate::BitWriter<'a, u32, NMIEN_SPEC, REGION1WA_A, O>; -impl<'a, const O: u8> REGION1WA_W<'a, O> { - #[doc = "Disable"] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(REGION1WA_A::DISABLED) - } - #[doc = "Enable"] - #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(REGION1WA_A::ENABLED) - } -} -#[doc = "Field `REGION1RA` reader - Enable or disable interrupt for event REGION1RA"] -pub type REGION1RA_R = crate::BitReader; -#[doc = "Enable or disable interrupt for event REGION1RA\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum REGION1RA_A { - #[doc = "0: Disable"] - DISABLED = 0, - #[doc = "1: Enable"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: REGION1RA_A) -> Self { - variant as u8 != 0 - } -} -impl REGION1RA_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> REGION1RA_A { - match self.bits { - false => REGION1RA_A::DISABLED, - true => REGION1RA_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == REGION1RA_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == REGION1RA_A::ENABLED - } -} -#[doc = "Field `REGION1RA` writer - Enable or disable interrupt for event REGION1RA"] -pub type REGION1RA_W<'a, const O: u8> = crate::BitWriter<'a, u32, NMIEN_SPEC, REGION1RA_A, O>; -impl<'a, const O: u8> REGION1RA_W<'a, O> { - #[doc = "Disable"] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(REGION1RA_A::DISABLED) - } - #[doc = "Enable"] - #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(REGION1RA_A::ENABLED) - } -} -#[doc = "Field `REGION2WA` reader - Enable or disable interrupt for event REGION2WA"] -pub type REGION2WA_R = crate::BitReader; -#[doc = "Enable or disable interrupt for event REGION2WA\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum REGION2WA_A { - #[doc = "0: Disable"] - DISABLED = 0, - #[doc = "1: Enable"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: REGION2WA_A) -> Self { - variant as u8 != 0 - } -} -impl REGION2WA_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> REGION2WA_A { - match self.bits { - false => REGION2WA_A::DISABLED, - true => REGION2WA_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == REGION2WA_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == REGION2WA_A::ENABLED - } -} -#[doc = "Field `REGION2WA` writer - Enable or disable interrupt for event REGION2WA"] -pub type REGION2WA_W<'a, const O: u8> = crate::BitWriter<'a, u32, NMIEN_SPEC, REGION2WA_A, O>; -impl<'a, const O: u8> REGION2WA_W<'a, O> { - #[doc = "Disable"] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(REGION2WA_A::DISABLED) - } - #[doc = "Enable"] - #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(REGION2WA_A::ENABLED) - } -} -#[doc = "Field `REGION2RA` reader - Enable or disable interrupt for event REGION2RA"] -pub type REGION2RA_R = crate::BitReader; -#[doc = "Enable or disable interrupt for event REGION2RA\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum REGION2RA_A { - #[doc = "0: Disable"] - DISABLED = 0, - #[doc = "1: Enable"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: REGION2RA_A) -> Self { - variant as u8 != 0 - } -} -impl REGION2RA_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> REGION2RA_A { - match self.bits { - false => REGION2RA_A::DISABLED, - true => REGION2RA_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == REGION2RA_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == REGION2RA_A::ENABLED - } -} -#[doc = "Field `REGION2RA` writer - Enable or disable interrupt for event REGION2RA"] -pub type REGION2RA_W<'a, const O: u8> = crate::BitWriter<'a, u32, NMIEN_SPEC, REGION2RA_A, O>; -impl<'a, const O: u8> REGION2RA_W<'a, O> { - #[doc = "Disable"] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(REGION2RA_A::DISABLED) - } - #[doc = "Enable"] - #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(REGION2RA_A::ENABLED) - } -} -#[doc = "Field `REGION3WA` reader - Enable or disable interrupt for event REGION3WA"] -pub type REGION3WA_R = crate::BitReader; -#[doc = "Enable or disable interrupt for event REGION3WA\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum REGION3WA_A { - #[doc = "0: Disable"] - DISABLED = 0, - #[doc = "1: Enable"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: REGION3WA_A) -> Self { - variant as u8 != 0 - } -} -impl REGION3WA_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> REGION3WA_A { - match self.bits { - false => REGION3WA_A::DISABLED, - true => REGION3WA_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == REGION3WA_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == REGION3WA_A::ENABLED - } -} -#[doc = "Field `REGION3WA` writer - Enable or disable interrupt for event REGION3WA"] -pub type REGION3WA_W<'a, const O: u8> = crate::BitWriter<'a, u32, NMIEN_SPEC, REGION3WA_A, O>; -impl<'a, const O: u8> REGION3WA_W<'a, O> { - #[doc = "Disable"] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(REGION3WA_A::DISABLED) - } - #[doc = "Enable"] - #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(REGION3WA_A::ENABLED) - } -} -#[doc = "Field `REGION3RA` reader - Enable or disable interrupt for event REGION3RA"] -pub type REGION3RA_R = crate::BitReader; -#[doc = "Enable or disable interrupt for event REGION3RA\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum REGION3RA_A { - #[doc = "0: Disable"] - DISABLED = 0, - #[doc = "1: Enable"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: REGION3RA_A) -> Self { - variant as u8 != 0 - } -} -impl REGION3RA_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> REGION3RA_A { - match self.bits { - false => REGION3RA_A::DISABLED, - true => REGION3RA_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == REGION3RA_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == REGION3RA_A::ENABLED - } -} -#[doc = "Field `REGION3RA` writer - Enable or disable interrupt for event REGION3RA"] -pub type REGION3RA_W<'a, const O: u8> = crate::BitWriter<'a, u32, NMIEN_SPEC, REGION3RA_A, O>; -impl<'a, const O: u8> REGION3RA_W<'a, O> { - #[doc = "Disable"] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(REGION3RA_A::DISABLED) - } - #[doc = "Enable"] - #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(REGION3RA_A::ENABLED) - } -} -#[doc = "Field `PREGION0WA` reader - Enable or disable interrupt for event PREGION0WA"] -pub type PREGION0WA_R = crate::BitReader; -#[doc = "Enable or disable interrupt for event PREGION0WA\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PREGION0WA_A { - #[doc = "0: Disable"] - DISABLED = 0, - #[doc = "1: Enable"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PREGION0WA_A) -> Self { - variant as u8 != 0 - } -} -impl PREGION0WA_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> PREGION0WA_A { - match self.bits { - false => PREGION0WA_A::DISABLED, - true => PREGION0WA_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == PREGION0WA_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == PREGION0WA_A::ENABLED - } -} -#[doc = "Field `PREGION0WA` writer - Enable or disable interrupt for event PREGION0WA"] -pub type PREGION0WA_W<'a, const O: u8> = crate::BitWriter<'a, u32, NMIEN_SPEC, PREGION0WA_A, O>; -impl<'a, const O: u8> PREGION0WA_W<'a, O> { - #[doc = "Disable"] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(PREGION0WA_A::DISABLED) - } - #[doc = "Enable"] - #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(PREGION0WA_A::ENABLED) - } -} -#[doc = "Field `PREGION0RA` reader - Enable or disable interrupt for event PREGION0RA"] -pub type PREGION0RA_R = crate::BitReader; -#[doc = "Enable or disable interrupt for event PREGION0RA\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PREGION0RA_A { - #[doc = "0: Disable"] - DISABLED = 0, - #[doc = "1: Enable"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PREGION0RA_A) -> Self { - variant as u8 != 0 - } -} -impl PREGION0RA_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> PREGION0RA_A { - match self.bits { - false => PREGION0RA_A::DISABLED, - true => PREGION0RA_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == PREGION0RA_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == PREGION0RA_A::ENABLED - } -} -#[doc = "Field `PREGION0RA` writer - Enable or disable interrupt for event PREGION0RA"] -pub type PREGION0RA_W<'a, const O: u8> = crate::BitWriter<'a, u32, NMIEN_SPEC, PREGION0RA_A, O>; -impl<'a, const O: u8> PREGION0RA_W<'a, O> { - #[doc = "Disable"] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(PREGION0RA_A::DISABLED) - } - #[doc = "Enable"] - #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(PREGION0RA_A::ENABLED) - } -} -#[doc = "Field `PREGION1WA` reader - Enable or disable interrupt for event PREGION1WA"] -pub type PREGION1WA_R = crate::BitReader; -#[doc = "Enable or disable interrupt for event PREGION1WA\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PREGION1WA_A { - #[doc = "0: Disable"] - DISABLED = 0, - #[doc = "1: Enable"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PREGION1WA_A) -> Self { - variant as u8 != 0 - } -} -impl PREGION1WA_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> PREGION1WA_A { - match self.bits { - false => PREGION1WA_A::DISABLED, - true => PREGION1WA_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == PREGION1WA_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == PREGION1WA_A::ENABLED - } -} -#[doc = "Field `PREGION1WA` writer - Enable or disable interrupt for event PREGION1WA"] -pub type PREGION1WA_W<'a, const O: u8> = crate::BitWriter<'a, u32, NMIEN_SPEC, PREGION1WA_A, O>; -impl<'a, const O: u8> PREGION1WA_W<'a, O> { - #[doc = "Disable"] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(PREGION1WA_A::DISABLED) - } - #[doc = "Enable"] - #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(PREGION1WA_A::ENABLED) - } -} -#[doc = "Field `PREGION1RA` reader - Enable or disable interrupt for event PREGION1RA"] -pub type PREGION1RA_R = crate::BitReader; -#[doc = "Enable or disable interrupt for event PREGION1RA\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PREGION1RA_A { - #[doc = "0: Disable"] - DISABLED = 0, - #[doc = "1: Enable"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PREGION1RA_A) -> Self { - variant as u8 != 0 - } -} -impl PREGION1RA_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> PREGION1RA_A { - match self.bits { - false => PREGION1RA_A::DISABLED, - true => PREGION1RA_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == PREGION1RA_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == PREGION1RA_A::ENABLED - } -} -#[doc = "Field `PREGION1RA` writer - Enable or disable interrupt for event PREGION1RA"] -pub type PREGION1RA_W<'a, const O: u8> = crate::BitWriter<'a, u32, NMIEN_SPEC, PREGION1RA_A, O>; -impl<'a, const O: u8> PREGION1RA_W<'a, O> { - #[doc = "Disable"] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(PREGION1RA_A::DISABLED) - } - #[doc = "Enable"] - #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(PREGION1RA_A::ENABLED) - } -} -impl R { - #[doc = "Bit 0 - Enable or disable interrupt for event REGION0WA"] - #[inline(always)] - pub fn region0wa(&self) -> REGION0WA_R { - REGION0WA_R::new((self.bits & 1) != 0) - } - #[doc = "Bit 1 - Enable or disable interrupt for event REGION0RA"] - #[inline(always)] - pub fn region0ra(&self) -> REGION0RA_R { - REGION0RA_R::new(((self.bits >> 1) & 1) != 0) - } - #[doc = "Bit 2 - Enable or disable interrupt for event REGION1WA"] - #[inline(always)] - pub fn region1wa(&self) -> REGION1WA_R { - REGION1WA_R::new(((self.bits >> 2) & 1) != 0) - } - #[doc = "Bit 3 - Enable or disable interrupt for event REGION1RA"] - #[inline(always)] - pub fn region1ra(&self) -> REGION1RA_R { - REGION1RA_R::new(((self.bits >> 3) & 1) != 0) - } - #[doc = "Bit 4 - Enable or disable interrupt for event REGION2WA"] - #[inline(always)] - pub fn region2wa(&self) -> REGION2WA_R { - REGION2WA_R::new(((self.bits >> 4) & 1) != 0) - } - #[doc = "Bit 5 - Enable or disable interrupt for event REGION2RA"] - #[inline(always)] - pub fn region2ra(&self) -> REGION2RA_R { - REGION2RA_R::new(((self.bits >> 5) & 1) != 0) - } - #[doc = "Bit 6 - Enable or disable interrupt for event REGION3WA"] - #[inline(always)] - pub fn region3wa(&self) -> REGION3WA_R { - REGION3WA_R::new(((self.bits >> 6) & 1) != 0) - } - #[doc = "Bit 7 - Enable or disable interrupt for event REGION3RA"] - #[inline(always)] - pub fn region3ra(&self) -> REGION3RA_R { - REGION3RA_R::new(((self.bits >> 7) & 1) != 0) - } - #[doc = "Bit 24 - Enable or disable interrupt for event PREGION0WA"] - #[inline(always)] - pub fn pregion0wa(&self) -> PREGION0WA_R { - PREGION0WA_R::new(((self.bits >> 24) & 1) != 0) - } - #[doc = "Bit 25 - Enable or disable interrupt for event PREGION0RA"] - #[inline(always)] - pub fn pregion0ra(&self) -> PREGION0RA_R { - PREGION0RA_R::new(((self.bits >> 25) & 1) != 0) - } - #[doc = "Bit 26 - Enable or disable interrupt for event PREGION1WA"] - #[inline(always)] - pub fn pregion1wa(&self) -> PREGION1WA_R { - PREGION1WA_R::new(((self.bits >> 26) & 1) != 0) - } - #[doc = "Bit 27 - Enable or disable interrupt for event PREGION1RA"] - #[inline(always)] - pub fn pregion1ra(&self) -> PREGION1RA_R { - PREGION1RA_R::new(((self.bits >> 27) & 1) != 0) - } -} -impl W { - #[doc = "Bit 0 - Enable or disable interrupt for event REGION0WA"] - #[inline(always)] - #[must_use] - pub fn region0wa(&mut self) -> REGION0WA_W<0> { - REGION0WA_W::new(self) - } - #[doc = "Bit 1 - Enable or disable interrupt for event REGION0RA"] - #[inline(always)] - #[must_use] - pub fn region0ra(&mut self) -> REGION0RA_W<1> { - REGION0RA_W::new(self) - } - #[doc = "Bit 2 - Enable or disable interrupt for event REGION1WA"] - #[inline(always)] - #[must_use] - pub fn region1wa(&mut self) -> REGION1WA_W<2> { - REGION1WA_W::new(self) - } - #[doc = "Bit 3 - Enable or disable interrupt for event REGION1RA"] - #[inline(always)] - #[must_use] - pub fn region1ra(&mut self) -> REGION1RA_W<3> { - REGION1RA_W::new(self) - } - #[doc = "Bit 4 - Enable or disable interrupt for event REGION2WA"] - #[inline(always)] - #[must_use] - pub fn region2wa(&mut self) -> REGION2WA_W<4> { - REGION2WA_W::new(self) - } - #[doc = "Bit 5 - Enable or disable interrupt for event REGION2RA"] - #[inline(always)] - #[must_use] - pub fn region2ra(&mut self) -> REGION2RA_W<5> { - REGION2RA_W::new(self) - } - #[doc = "Bit 6 - Enable or disable interrupt for event REGION3WA"] - #[inline(always)] - #[must_use] - pub fn region3wa(&mut self) -> REGION3WA_W<6> { - REGION3WA_W::new(self) - } - #[doc = "Bit 7 - Enable or disable interrupt for event REGION3RA"] - #[inline(always)] - #[must_use] - pub fn region3ra(&mut self) -> REGION3RA_W<7> { - REGION3RA_W::new(self) - } - #[doc = "Bit 24 - Enable or disable interrupt for event PREGION0WA"] - #[inline(always)] - #[must_use] - pub fn pregion0wa(&mut self) -> PREGION0WA_W<24> { - PREGION0WA_W::new(self) - } - #[doc = "Bit 25 - Enable or disable interrupt for event PREGION0RA"] - #[inline(always)] - #[must_use] - pub fn pregion0ra(&mut self) -> PREGION0RA_W<25> { - PREGION0RA_W::new(self) - } - #[doc = "Bit 26 - Enable or disable interrupt for event PREGION1WA"] - #[inline(always)] - #[must_use] - pub fn pregion1wa(&mut self) -> PREGION1WA_W<26> { - PREGION1WA_W::new(self) - } - #[doc = "Bit 27 - Enable or disable interrupt for event PREGION1RA"] - #[inline(always)] - #[must_use] - pub fn pregion1ra(&mut self) -> PREGION1RA_W<27> { - PREGION1RA_W::new(self) - } - #[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 = "Enable or disable interrupt\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 [nmien](index.html) module"] -pub struct NMIEN_SPEC; -impl crate::RegisterSpec for NMIEN_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [nmien::R](R) reader structure"] -impl crate::Readable for NMIEN_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [nmien::W](W) writer structure"] -impl crate::Writable for NMIEN_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets NMIEN to value 0"] -impl crate::Resettable for NMIEN_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/mwu/nmienclr.rs b/down-the-stack/dk_pac/src/mwu/nmienclr.rs deleted file mode 100644 index 09a9014..0000000 --- a/down-the-stack/dk_pac/src/mwu/nmienclr.rs +++ /dev/null @@ -1,881 +0,0 @@ -#[doc = "Register `NMIENCLR` 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 `NMIENCLR` 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 `REGION0WA` reader - Write '1' to disable interrupt for event REGION0WA"] -pub type REGION0WA_R = crate::BitReader; -#[doc = "Write '1' to disable interrupt for event REGION0WA\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum REGION0WA_A { - #[doc = "0: Read: Disabled"] - DISABLED = 0, - #[doc = "1: Read: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: REGION0WA_A) -> Self { - variant as u8 != 0 - } -} -impl REGION0WA_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> REGION0WA_A { - match self.bits { - false => REGION0WA_A::DISABLED, - true => REGION0WA_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == REGION0WA_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == REGION0WA_A::ENABLED - } -} -#[doc = "Write '1' to disable interrupt for event REGION0WA\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum REGION0WA_AW { - #[doc = "1: Disable"] - CLEAR = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: REGION0WA_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `REGION0WA` writer - Write '1' to disable interrupt for event REGION0WA"] -pub type REGION0WA_W<'a, const O: u8> = crate::BitWriter<'a, u32, NMIENCLR_SPEC, REGION0WA_AW, O>; -impl<'a, const O: u8> REGION0WA_W<'a, O> { - #[doc = "Disable"] - #[inline(always)] - pub fn clear(self) -> &'a mut W { - self.variant(REGION0WA_AW::CLEAR) - } -} -#[doc = "Field `REGION0RA` reader - Write '1' to disable interrupt for event REGION0RA"] -pub type REGION0RA_R = crate::BitReader; -#[doc = "Write '1' to disable interrupt for event REGION0RA\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum REGION0RA_A { - #[doc = "0: Read: Disabled"] - DISABLED = 0, - #[doc = "1: Read: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: REGION0RA_A) -> Self { - variant as u8 != 0 - } -} -impl REGION0RA_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> REGION0RA_A { - match self.bits { - false => REGION0RA_A::DISABLED, - true => REGION0RA_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == REGION0RA_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == REGION0RA_A::ENABLED - } -} -#[doc = "Write '1' to disable interrupt for event REGION0RA\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum REGION0RA_AW { - #[doc = "1: Disable"] - CLEAR = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: REGION0RA_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `REGION0RA` writer - Write '1' to disable interrupt for event REGION0RA"] -pub type REGION0RA_W<'a, const O: u8> = crate::BitWriter<'a, u32, NMIENCLR_SPEC, REGION0RA_AW, O>; -impl<'a, const O: u8> REGION0RA_W<'a, O> { - #[doc = "Disable"] - #[inline(always)] - pub fn clear(self) -> &'a mut W { - self.variant(REGION0RA_AW::CLEAR) - } -} -#[doc = "Field `REGION1WA` reader - Write '1' to disable interrupt for event REGION1WA"] -pub type REGION1WA_R = crate::BitReader; -#[doc = "Write '1' to disable interrupt for event REGION1WA\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum REGION1WA_A { - #[doc = "0: Read: Disabled"] - DISABLED = 0, - #[doc = "1: Read: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: REGION1WA_A) -> Self { - variant as u8 != 0 - } -} -impl REGION1WA_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> REGION1WA_A { - match self.bits { - false => REGION1WA_A::DISABLED, - true => REGION1WA_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == REGION1WA_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == REGION1WA_A::ENABLED - } -} -#[doc = "Write '1' to disable interrupt for event REGION1WA\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum REGION1WA_AW { - #[doc = "1: Disable"] - CLEAR = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: REGION1WA_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `REGION1WA` writer - Write '1' to disable interrupt for event REGION1WA"] -pub type REGION1WA_W<'a, const O: u8> = crate::BitWriter<'a, u32, NMIENCLR_SPEC, REGION1WA_AW, O>; -impl<'a, const O: u8> REGION1WA_W<'a, O> { - #[doc = "Disable"] - #[inline(always)] - pub fn clear(self) -> &'a mut W { - self.variant(REGION1WA_AW::CLEAR) - } -} -#[doc = "Field `REGION1RA` reader - Write '1' to disable interrupt for event REGION1RA"] -pub type REGION1RA_R = crate::BitReader; -#[doc = "Write '1' to disable interrupt for event REGION1RA\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum REGION1RA_A { - #[doc = "0: Read: Disabled"] - DISABLED = 0, - #[doc = "1: Read: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: REGION1RA_A) -> Self { - variant as u8 != 0 - } -} -impl REGION1RA_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> REGION1RA_A { - match self.bits { - false => REGION1RA_A::DISABLED, - true => REGION1RA_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == REGION1RA_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == REGION1RA_A::ENABLED - } -} -#[doc = "Write '1' to disable interrupt for event REGION1RA\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum REGION1RA_AW { - #[doc = "1: Disable"] - CLEAR = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: REGION1RA_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `REGION1RA` writer - Write '1' to disable interrupt for event REGION1RA"] -pub type REGION1RA_W<'a, const O: u8> = crate::BitWriter<'a, u32, NMIENCLR_SPEC, REGION1RA_AW, O>; -impl<'a, const O: u8> REGION1RA_W<'a, O> { - #[doc = "Disable"] - #[inline(always)] - pub fn clear(self) -> &'a mut W { - self.variant(REGION1RA_AW::CLEAR) - } -} -#[doc = "Field `REGION2WA` reader - Write '1' to disable interrupt for event REGION2WA"] -pub type REGION2WA_R = crate::BitReader; -#[doc = "Write '1' to disable interrupt for event REGION2WA\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum REGION2WA_A { - #[doc = "0: Read: Disabled"] - DISABLED = 0, - #[doc = "1: Read: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: REGION2WA_A) -> Self { - variant as u8 != 0 - } -} -impl REGION2WA_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> REGION2WA_A { - match self.bits { - false => REGION2WA_A::DISABLED, - true => REGION2WA_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == REGION2WA_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == REGION2WA_A::ENABLED - } -} -#[doc = "Write '1' to disable interrupt for event REGION2WA\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum REGION2WA_AW { - #[doc = "1: Disable"] - CLEAR = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: REGION2WA_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `REGION2WA` writer - Write '1' to disable interrupt for event REGION2WA"] -pub type REGION2WA_W<'a, const O: u8> = crate::BitWriter<'a, u32, NMIENCLR_SPEC, REGION2WA_AW, O>; -impl<'a, const O: u8> REGION2WA_W<'a, O> { - #[doc = "Disable"] - #[inline(always)] - pub fn clear(self) -> &'a mut W { - self.variant(REGION2WA_AW::CLEAR) - } -} -#[doc = "Field `REGION2RA` reader - Write '1' to disable interrupt for event REGION2RA"] -pub type REGION2RA_R = crate::BitReader; -#[doc = "Write '1' to disable interrupt for event REGION2RA\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum REGION2RA_A { - #[doc = "0: Read: Disabled"] - DISABLED = 0, - #[doc = "1: Read: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: REGION2RA_A) -> Self { - variant as u8 != 0 - } -} -impl REGION2RA_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> REGION2RA_A { - match self.bits { - false => REGION2RA_A::DISABLED, - true => REGION2RA_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == REGION2RA_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == REGION2RA_A::ENABLED - } -} -#[doc = "Write '1' to disable interrupt for event REGION2RA\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum REGION2RA_AW { - #[doc = "1: Disable"] - CLEAR = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: REGION2RA_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `REGION2RA` writer - Write '1' to disable interrupt for event REGION2RA"] -pub type REGION2RA_W<'a, const O: u8> = crate::BitWriter<'a, u32, NMIENCLR_SPEC, REGION2RA_AW, O>; -impl<'a, const O: u8> REGION2RA_W<'a, O> { - #[doc = "Disable"] - #[inline(always)] - pub fn clear(self) -> &'a mut W { - self.variant(REGION2RA_AW::CLEAR) - } -} -#[doc = "Field `REGION3WA` reader - Write '1' to disable interrupt for event REGION3WA"] -pub type REGION3WA_R = crate::BitReader; -#[doc = "Write '1' to disable interrupt for event REGION3WA\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum REGION3WA_A { - #[doc = "0: Read: Disabled"] - DISABLED = 0, - #[doc = "1: Read: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: REGION3WA_A) -> Self { - variant as u8 != 0 - } -} -impl REGION3WA_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> REGION3WA_A { - match self.bits { - false => REGION3WA_A::DISABLED, - true => REGION3WA_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == REGION3WA_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == REGION3WA_A::ENABLED - } -} -#[doc = "Write '1' to disable interrupt for event REGION3WA\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum REGION3WA_AW { - #[doc = "1: Disable"] - CLEAR = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: REGION3WA_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `REGION3WA` writer - Write '1' to disable interrupt for event REGION3WA"] -pub type REGION3WA_W<'a, const O: u8> = crate::BitWriter<'a, u32, NMIENCLR_SPEC, REGION3WA_AW, O>; -impl<'a, const O: u8> REGION3WA_W<'a, O> { - #[doc = "Disable"] - #[inline(always)] - pub fn clear(self) -> &'a mut W { - self.variant(REGION3WA_AW::CLEAR) - } -} -#[doc = "Field `REGION3RA` reader - Write '1' to disable interrupt for event REGION3RA"] -pub type REGION3RA_R = crate::BitReader; -#[doc = "Write '1' to disable interrupt for event REGION3RA\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum REGION3RA_A { - #[doc = "0: Read: Disabled"] - DISABLED = 0, - #[doc = "1: Read: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: REGION3RA_A) -> Self { - variant as u8 != 0 - } -} -impl REGION3RA_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> REGION3RA_A { - match self.bits { - false => REGION3RA_A::DISABLED, - true => REGION3RA_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == REGION3RA_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == REGION3RA_A::ENABLED - } -} -#[doc = "Write '1' to disable interrupt for event REGION3RA\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum REGION3RA_AW { - #[doc = "1: Disable"] - CLEAR = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: REGION3RA_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `REGION3RA` writer - Write '1' to disable interrupt for event REGION3RA"] -pub type REGION3RA_W<'a, const O: u8> = crate::BitWriter<'a, u32, NMIENCLR_SPEC, REGION3RA_AW, O>; -impl<'a, const O: u8> REGION3RA_W<'a, O> { - #[doc = "Disable"] - #[inline(always)] - pub fn clear(self) -> &'a mut W { - self.variant(REGION3RA_AW::CLEAR) - } -} -#[doc = "Field `PREGION0WA` reader - Write '1' to disable interrupt for event PREGION0WA"] -pub type PREGION0WA_R = crate::BitReader; -#[doc = "Write '1' to disable interrupt for event PREGION0WA\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PREGION0WA_A { - #[doc = "0: Read: Disabled"] - DISABLED = 0, - #[doc = "1: Read: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PREGION0WA_A) -> Self { - variant as u8 != 0 - } -} -impl PREGION0WA_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> PREGION0WA_A { - match self.bits { - false => PREGION0WA_A::DISABLED, - true => PREGION0WA_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == PREGION0WA_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == PREGION0WA_A::ENABLED - } -} -#[doc = "Write '1' to disable interrupt for event PREGION0WA\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PREGION0WA_AW { - #[doc = "1: Disable"] - CLEAR = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PREGION0WA_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `PREGION0WA` writer - Write '1' to disable interrupt for event PREGION0WA"] -pub type PREGION0WA_W<'a, const O: u8> = crate::BitWriter<'a, u32, NMIENCLR_SPEC, PREGION0WA_AW, O>; -impl<'a, const O: u8> PREGION0WA_W<'a, O> { - #[doc = "Disable"] - #[inline(always)] - pub fn clear(self) -> &'a mut W { - self.variant(PREGION0WA_AW::CLEAR) - } -} -#[doc = "Field `PREGION0RA` reader - Write '1' to disable interrupt for event PREGION0RA"] -pub type PREGION0RA_R = crate::BitReader; -#[doc = "Write '1' to disable interrupt for event PREGION0RA\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PREGION0RA_A { - #[doc = "0: Read: Disabled"] - DISABLED = 0, - #[doc = "1: Read: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PREGION0RA_A) -> Self { - variant as u8 != 0 - } -} -impl PREGION0RA_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> PREGION0RA_A { - match self.bits { - false => PREGION0RA_A::DISABLED, - true => PREGION0RA_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == PREGION0RA_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == PREGION0RA_A::ENABLED - } -} -#[doc = "Write '1' to disable interrupt for event PREGION0RA\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PREGION0RA_AW { - #[doc = "1: Disable"] - CLEAR = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PREGION0RA_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `PREGION0RA` writer - Write '1' to disable interrupt for event PREGION0RA"] -pub type PREGION0RA_W<'a, const O: u8> = crate::BitWriter<'a, u32, NMIENCLR_SPEC, PREGION0RA_AW, O>; -impl<'a, const O: u8> PREGION0RA_W<'a, O> { - #[doc = "Disable"] - #[inline(always)] - pub fn clear(self) -> &'a mut W { - self.variant(PREGION0RA_AW::CLEAR) - } -} -#[doc = "Field `PREGION1WA` reader - Write '1' to disable interrupt for event PREGION1WA"] -pub type PREGION1WA_R = crate::BitReader; -#[doc = "Write '1' to disable interrupt for event PREGION1WA\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PREGION1WA_A { - #[doc = "0: Read: Disabled"] - DISABLED = 0, - #[doc = "1: Read: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PREGION1WA_A) -> Self { - variant as u8 != 0 - } -} -impl PREGION1WA_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> PREGION1WA_A { - match self.bits { - false => PREGION1WA_A::DISABLED, - true => PREGION1WA_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == PREGION1WA_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == PREGION1WA_A::ENABLED - } -} -#[doc = "Write '1' to disable interrupt for event PREGION1WA\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PREGION1WA_AW { - #[doc = "1: Disable"] - CLEAR = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PREGION1WA_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `PREGION1WA` writer - Write '1' to disable interrupt for event PREGION1WA"] -pub type PREGION1WA_W<'a, const O: u8> = crate::BitWriter<'a, u32, NMIENCLR_SPEC, PREGION1WA_AW, O>; -impl<'a, const O: u8> PREGION1WA_W<'a, O> { - #[doc = "Disable"] - #[inline(always)] - pub fn clear(self) -> &'a mut W { - self.variant(PREGION1WA_AW::CLEAR) - } -} -#[doc = "Field `PREGION1RA` reader - Write '1' to disable interrupt for event PREGION1RA"] -pub type PREGION1RA_R = crate::BitReader; -#[doc = "Write '1' to disable interrupt for event PREGION1RA\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PREGION1RA_A { - #[doc = "0: Read: Disabled"] - DISABLED = 0, - #[doc = "1: Read: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PREGION1RA_A) -> Self { - variant as u8 != 0 - } -} -impl PREGION1RA_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> PREGION1RA_A { - match self.bits { - false => PREGION1RA_A::DISABLED, - true => PREGION1RA_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == PREGION1RA_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == PREGION1RA_A::ENABLED - } -} -#[doc = "Write '1' to disable interrupt for event PREGION1RA\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PREGION1RA_AW { - #[doc = "1: Disable"] - CLEAR = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PREGION1RA_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `PREGION1RA` writer - Write '1' to disable interrupt for event PREGION1RA"] -pub type PREGION1RA_W<'a, const O: u8> = crate::BitWriter<'a, u32, NMIENCLR_SPEC, PREGION1RA_AW, O>; -impl<'a, const O: u8> PREGION1RA_W<'a, O> { - #[doc = "Disable"] - #[inline(always)] - pub fn clear(self) -> &'a mut W { - self.variant(PREGION1RA_AW::CLEAR) - } -} -impl R { - #[doc = "Bit 0 - Write '1' to disable interrupt for event REGION0WA"] - #[inline(always)] - pub fn region0wa(&self) -> REGION0WA_R { - REGION0WA_R::new((self.bits & 1) != 0) - } - #[doc = "Bit 1 - Write '1' to disable interrupt for event REGION0RA"] - #[inline(always)] - pub fn region0ra(&self) -> REGION0RA_R { - REGION0RA_R::new(((self.bits >> 1) & 1) != 0) - } - #[doc = "Bit 2 - Write '1' to disable interrupt for event REGION1WA"] - #[inline(always)] - pub fn region1wa(&self) -> REGION1WA_R { - REGION1WA_R::new(((self.bits >> 2) & 1) != 0) - } - #[doc = "Bit 3 - Write '1' to disable interrupt for event REGION1RA"] - #[inline(always)] - pub fn region1ra(&self) -> REGION1RA_R { - REGION1RA_R::new(((self.bits >> 3) & 1) != 0) - } - #[doc = "Bit 4 - Write '1' to disable interrupt for event REGION2WA"] - #[inline(always)] - pub fn region2wa(&self) -> REGION2WA_R { - REGION2WA_R::new(((self.bits >> 4) & 1) != 0) - } - #[doc = "Bit 5 - Write '1' to disable interrupt for event REGION2RA"] - #[inline(always)] - pub fn region2ra(&self) -> REGION2RA_R { - REGION2RA_R::new(((self.bits >> 5) & 1) != 0) - } - #[doc = "Bit 6 - Write '1' to disable interrupt for event REGION3WA"] - #[inline(always)] - pub fn region3wa(&self) -> REGION3WA_R { - REGION3WA_R::new(((self.bits >> 6) & 1) != 0) - } - #[doc = "Bit 7 - Write '1' to disable interrupt for event REGION3RA"] - #[inline(always)] - pub fn region3ra(&self) -> REGION3RA_R { - REGION3RA_R::new(((self.bits >> 7) & 1) != 0) - } - #[doc = "Bit 24 - Write '1' to disable interrupt for event PREGION0WA"] - #[inline(always)] - pub fn pregion0wa(&self) -> PREGION0WA_R { - PREGION0WA_R::new(((self.bits >> 24) & 1) != 0) - } - #[doc = "Bit 25 - Write '1' to disable interrupt for event PREGION0RA"] - #[inline(always)] - pub fn pregion0ra(&self) -> PREGION0RA_R { - PREGION0RA_R::new(((self.bits >> 25) & 1) != 0) - } - #[doc = "Bit 26 - Write '1' to disable interrupt for event PREGION1WA"] - #[inline(always)] - pub fn pregion1wa(&self) -> PREGION1WA_R { - PREGION1WA_R::new(((self.bits >> 26) & 1) != 0) - } - #[doc = "Bit 27 - Write '1' to disable interrupt for event PREGION1RA"] - #[inline(always)] - pub fn pregion1ra(&self) -> PREGION1RA_R { - PREGION1RA_R::new(((self.bits >> 27) & 1) != 0) - } -} -impl W { - #[doc = "Bit 0 - Write '1' to disable interrupt for event REGION0WA"] - #[inline(always)] - #[must_use] - pub fn region0wa(&mut self) -> REGION0WA_W<0> { - REGION0WA_W::new(self) - } - #[doc = "Bit 1 - Write '1' to disable interrupt for event REGION0RA"] - #[inline(always)] - #[must_use] - pub fn region0ra(&mut self) -> REGION0RA_W<1> { - REGION0RA_W::new(self) - } - #[doc = "Bit 2 - Write '1' to disable interrupt for event REGION1WA"] - #[inline(always)] - #[must_use] - pub fn region1wa(&mut self) -> REGION1WA_W<2> { - REGION1WA_W::new(self) - } - #[doc = "Bit 3 - Write '1' to disable interrupt for event REGION1RA"] - #[inline(always)] - #[must_use] - pub fn region1ra(&mut self) -> REGION1RA_W<3> { - REGION1RA_W::new(self) - } - #[doc = "Bit 4 - Write '1' to disable interrupt for event REGION2WA"] - #[inline(always)] - #[must_use] - pub fn region2wa(&mut self) -> REGION2WA_W<4> { - REGION2WA_W::new(self) - } - #[doc = "Bit 5 - Write '1' to disable interrupt for event REGION2RA"] - #[inline(always)] - #[must_use] - pub fn region2ra(&mut self) -> REGION2RA_W<5> { - REGION2RA_W::new(self) - } - #[doc = "Bit 6 - Write '1' to disable interrupt for event REGION3WA"] - #[inline(always)] - #[must_use] - pub fn region3wa(&mut self) -> REGION3WA_W<6> { - REGION3WA_W::new(self) - } - #[doc = "Bit 7 - Write '1' to disable interrupt for event REGION3RA"] - #[inline(always)] - #[must_use] - pub fn region3ra(&mut self) -> REGION3RA_W<7> { - REGION3RA_W::new(self) - } - #[doc = "Bit 24 - Write '1' to disable interrupt for event PREGION0WA"] - #[inline(always)] - #[must_use] - pub fn pregion0wa(&mut self) -> PREGION0WA_W<24> { - PREGION0WA_W::new(self) - } - #[doc = "Bit 25 - Write '1' to disable interrupt for event PREGION0RA"] - #[inline(always)] - #[must_use] - pub fn pregion0ra(&mut self) -> PREGION0RA_W<25> { - PREGION0RA_W::new(self) - } - #[doc = "Bit 26 - Write '1' to disable interrupt for event PREGION1WA"] - #[inline(always)] - #[must_use] - pub fn pregion1wa(&mut self) -> PREGION1WA_W<26> { - PREGION1WA_W::new(self) - } - #[doc = "Bit 27 - Write '1' to disable interrupt for event PREGION1RA"] - #[inline(always)] - #[must_use] - pub fn pregion1ra(&mut self) -> PREGION1RA_W<27> { - PREGION1RA_W::new(self) - } - #[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 = "Disable interrupt\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 [nmienclr](index.html) module"] -pub struct NMIENCLR_SPEC; -impl crate::RegisterSpec for NMIENCLR_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [nmienclr::R](R) reader structure"] -impl crate::Readable for NMIENCLR_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [nmienclr::W](W) writer structure"] -impl crate::Writable for NMIENCLR_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets NMIENCLR to value 0"] -impl crate::Resettable for NMIENCLR_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/mwu/nmienset.rs b/down-the-stack/dk_pac/src/mwu/nmienset.rs deleted file mode 100644 index be79dc1..0000000 --- a/down-the-stack/dk_pac/src/mwu/nmienset.rs +++ /dev/null @@ -1,881 +0,0 @@ -#[doc = "Register `NMIENSET` 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 `NMIENSET` 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 `REGION0WA` reader - Write '1' to enable interrupt for event REGION0WA"] -pub type REGION0WA_R = crate::BitReader; -#[doc = "Write '1' to enable interrupt for event REGION0WA\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum REGION0WA_A { - #[doc = "0: Read: Disabled"] - DISABLED = 0, - #[doc = "1: Read: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: REGION0WA_A) -> Self { - variant as u8 != 0 - } -} -impl REGION0WA_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> REGION0WA_A { - match self.bits { - false => REGION0WA_A::DISABLED, - true => REGION0WA_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == REGION0WA_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == REGION0WA_A::ENABLED - } -} -#[doc = "Write '1' to enable interrupt for event REGION0WA\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum REGION0WA_AW { - #[doc = "1: Enable"] - SET = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: REGION0WA_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `REGION0WA` writer - Write '1' to enable interrupt for event REGION0WA"] -pub type REGION0WA_W<'a, const O: u8> = crate::BitWriter<'a, u32, NMIENSET_SPEC, REGION0WA_AW, O>; -impl<'a, const O: u8> REGION0WA_W<'a, O> { - #[doc = "Enable"] - #[inline(always)] - pub fn set(self) -> &'a mut W { - self.variant(REGION0WA_AW::SET) - } -} -#[doc = "Field `REGION0RA` reader - Write '1' to enable interrupt for event REGION0RA"] -pub type REGION0RA_R = crate::BitReader; -#[doc = "Write '1' to enable interrupt for event REGION0RA\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum REGION0RA_A { - #[doc = "0: Read: Disabled"] - DISABLED = 0, - #[doc = "1: Read: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: REGION0RA_A) -> Self { - variant as u8 != 0 - } -} -impl REGION0RA_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> REGION0RA_A { - match self.bits { - false => REGION0RA_A::DISABLED, - true => REGION0RA_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == REGION0RA_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == REGION0RA_A::ENABLED - } -} -#[doc = "Write '1' to enable interrupt for event REGION0RA\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum REGION0RA_AW { - #[doc = "1: Enable"] - SET = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: REGION0RA_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `REGION0RA` writer - Write '1' to enable interrupt for event REGION0RA"] -pub type REGION0RA_W<'a, const O: u8> = crate::BitWriter<'a, u32, NMIENSET_SPEC, REGION0RA_AW, O>; -impl<'a, const O: u8> REGION0RA_W<'a, O> { - #[doc = "Enable"] - #[inline(always)] - pub fn set(self) -> &'a mut W { - self.variant(REGION0RA_AW::SET) - } -} -#[doc = "Field `REGION1WA` reader - Write '1' to enable interrupt for event REGION1WA"] -pub type REGION1WA_R = crate::BitReader; -#[doc = "Write '1' to enable interrupt for event REGION1WA\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum REGION1WA_A { - #[doc = "0: Read: Disabled"] - DISABLED = 0, - #[doc = "1: Read: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: REGION1WA_A) -> Self { - variant as u8 != 0 - } -} -impl REGION1WA_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> REGION1WA_A { - match self.bits { - false => REGION1WA_A::DISABLED, - true => REGION1WA_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == REGION1WA_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == REGION1WA_A::ENABLED - } -} -#[doc = "Write '1' to enable interrupt for event REGION1WA\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum REGION1WA_AW { - #[doc = "1: Enable"] - SET = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: REGION1WA_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `REGION1WA` writer - Write '1' to enable interrupt for event REGION1WA"] -pub type REGION1WA_W<'a, const O: u8> = crate::BitWriter<'a, u32, NMIENSET_SPEC, REGION1WA_AW, O>; -impl<'a, const O: u8> REGION1WA_W<'a, O> { - #[doc = "Enable"] - #[inline(always)] - pub fn set(self) -> &'a mut W { - self.variant(REGION1WA_AW::SET) - } -} -#[doc = "Field `REGION1RA` reader - Write '1' to enable interrupt for event REGION1RA"] -pub type REGION1RA_R = crate::BitReader; -#[doc = "Write '1' to enable interrupt for event REGION1RA\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum REGION1RA_A { - #[doc = "0: Read: Disabled"] - DISABLED = 0, - #[doc = "1: Read: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: REGION1RA_A) -> Self { - variant as u8 != 0 - } -} -impl REGION1RA_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> REGION1RA_A { - match self.bits { - false => REGION1RA_A::DISABLED, - true => REGION1RA_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == REGION1RA_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == REGION1RA_A::ENABLED - } -} -#[doc = "Write '1' to enable interrupt for event REGION1RA\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum REGION1RA_AW { - #[doc = "1: Enable"] - SET = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: REGION1RA_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `REGION1RA` writer - Write '1' to enable interrupt for event REGION1RA"] -pub type REGION1RA_W<'a, const O: u8> = crate::BitWriter<'a, u32, NMIENSET_SPEC, REGION1RA_AW, O>; -impl<'a, const O: u8> REGION1RA_W<'a, O> { - #[doc = "Enable"] - #[inline(always)] - pub fn set(self) -> &'a mut W { - self.variant(REGION1RA_AW::SET) - } -} -#[doc = "Field `REGION2WA` reader - Write '1' to enable interrupt for event REGION2WA"] -pub type REGION2WA_R = crate::BitReader; -#[doc = "Write '1' to enable interrupt for event REGION2WA\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum REGION2WA_A { - #[doc = "0: Read: Disabled"] - DISABLED = 0, - #[doc = "1: Read: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: REGION2WA_A) -> Self { - variant as u8 != 0 - } -} -impl REGION2WA_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> REGION2WA_A { - match self.bits { - false => REGION2WA_A::DISABLED, - true => REGION2WA_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == REGION2WA_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == REGION2WA_A::ENABLED - } -} -#[doc = "Write '1' to enable interrupt for event REGION2WA\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum REGION2WA_AW { - #[doc = "1: Enable"] - SET = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: REGION2WA_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `REGION2WA` writer - Write '1' to enable interrupt for event REGION2WA"] -pub type REGION2WA_W<'a, const O: u8> = crate::BitWriter<'a, u32, NMIENSET_SPEC, REGION2WA_AW, O>; -impl<'a, const O: u8> REGION2WA_W<'a, O> { - #[doc = "Enable"] - #[inline(always)] - pub fn set(self) -> &'a mut W { - self.variant(REGION2WA_AW::SET) - } -} -#[doc = "Field `REGION2RA` reader - Write '1' to enable interrupt for event REGION2RA"] -pub type REGION2RA_R = crate::BitReader; -#[doc = "Write '1' to enable interrupt for event REGION2RA\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum REGION2RA_A { - #[doc = "0: Read: Disabled"] - DISABLED = 0, - #[doc = "1: Read: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: REGION2RA_A) -> Self { - variant as u8 != 0 - } -} -impl REGION2RA_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> REGION2RA_A { - match self.bits { - false => REGION2RA_A::DISABLED, - true => REGION2RA_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == REGION2RA_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == REGION2RA_A::ENABLED - } -} -#[doc = "Write '1' to enable interrupt for event REGION2RA\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum REGION2RA_AW { - #[doc = "1: Enable"] - SET = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: REGION2RA_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `REGION2RA` writer - Write '1' to enable interrupt for event REGION2RA"] -pub type REGION2RA_W<'a, const O: u8> = crate::BitWriter<'a, u32, NMIENSET_SPEC, REGION2RA_AW, O>; -impl<'a, const O: u8> REGION2RA_W<'a, O> { - #[doc = "Enable"] - #[inline(always)] - pub fn set(self) -> &'a mut W { - self.variant(REGION2RA_AW::SET) - } -} -#[doc = "Field `REGION3WA` reader - Write '1' to enable interrupt for event REGION3WA"] -pub type REGION3WA_R = crate::BitReader; -#[doc = "Write '1' to enable interrupt for event REGION3WA\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum REGION3WA_A { - #[doc = "0: Read: Disabled"] - DISABLED = 0, - #[doc = "1: Read: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: REGION3WA_A) -> Self { - variant as u8 != 0 - } -} -impl REGION3WA_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> REGION3WA_A { - match self.bits { - false => REGION3WA_A::DISABLED, - true => REGION3WA_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == REGION3WA_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == REGION3WA_A::ENABLED - } -} -#[doc = "Write '1' to enable interrupt for event REGION3WA\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum REGION3WA_AW { - #[doc = "1: Enable"] - SET = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: REGION3WA_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `REGION3WA` writer - Write '1' to enable interrupt for event REGION3WA"] -pub type REGION3WA_W<'a, const O: u8> = crate::BitWriter<'a, u32, NMIENSET_SPEC, REGION3WA_AW, O>; -impl<'a, const O: u8> REGION3WA_W<'a, O> { - #[doc = "Enable"] - #[inline(always)] - pub fn set(self) -> &'a mut W { - self.variant(REGION3WA_AW::SET) - } -} -#[doc = "Field `REGION3RA` reader - Write '1' to enable interrupt for event REGION3RA"] -pub type REGION3RA_R = crate::BitReader; -#[doc = "Write '1' to enable interrupt for event REGION3RA\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum REGION3RA_A { - #[doc = "0: Read: Disabled"] - DISABLED = 0, - #[doc = "1: Read: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: REGION3RA_A) -> Self { - variant as u8 != 0 - } -} -impl REGION3RA_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> REGION3RA_A { - match self.bits { - false => REGION3RA_A::DISABLED, - true => REGION3RA_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == REGION3RA_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == REGION3RA_A::ENABLED - } -} -#[doc = "Write '1' to enable interrupt for event REGION3RA\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum REGION3RA_AW { - #[doc = "1: Enable"] - SET = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: REGION3RA_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `REGION3RA` writer - Write '1' to enable interrupt for event REGION3RA"] -pub type REGION3RA_W<'a, const O: u8> = crate::BitWriter<'a, u32, NMIENSET_SPEC, REGION3RA_AW, O>; -impl<'a, const O: u8> REGION3RA_W<'a, O> { - #[doc = "Enable"] - #[inline(always)] - pub fn set(self) -> &'a mut W { - self.variant(REGION3RA_AW::SET) - } -} -#[doc = "Field `PREGION0WA` reader - Write '1' to enable interrupt for event PREGION0WA"] -pub type PREGION0WA_R = crate::BitReader; -#[doc = "Write '1' to enable interrupt for event PREGION0WA\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PREGION0WA_A { - #[doc = "0: Read: Disabled"] - DISABLED = 0, - #[doc = "1: Read: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PREGION0WA_A) -> Self { - variant as u8 != 0 - } -} -impl PREGION0WA_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> PREGION0WA_A { - match self.bits { - false => PREGION0WA_A::DISABLED, - true => PREGION0WA_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == PREGION0WA_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == PREGION0WA_A::ENABLED - } -} -#[doc = "Write '1' to enable interrupt for event PREGION0WA\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PREGION0WA_AW { - #[doc = "1: Enable"] - SET = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PREGION0WA_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `PREGION0WA` writer - Write '1' to enable interrupt for event PREGION0WA"] -pub type PREGION0WA_W<'a, const O: u8> = crate::BitWriter<'a, u32, NMIENSET_SPEC, PREGION0WA_AW, O>; -impl<'a, const O: u8> PREGION0WA_W<'a, O> { - #[doc = "Enable"] - #[inline(always)] - pub fn set(self) -> &'a mut W { - self.variant(PREGION0WA_AW::SET) - } -} -#[doc = "Field `PREGION0RA` reader - Write '1' to enable interrupt for event PREGION0RA"] -pub type PREGION0RA_R = crate::BitReader; -#[doc = "Write '1' to enable interrupt for event PREGION0RA\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PREGION0RA_A { - #[doc = "0: Read: Disabled"] - DISABLED = 0, - #[doc = "1: Read: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PREGION0RA_A) -> Self { - variant as u8 != 0 - } -} -impl PREGION0RA_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> PREGION0RA_A { - match self.bits { - false => PREGION0RA_A::DISABLED, - true => PREGION0RA_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == PREGION0RA_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == PREGION0RA_A::ENABLED - } -} -#[doc = "Write '1' to enable interrupt for event PREGION0RA\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PREGION0RA_AW { - #[doc = "1: Enable"] - SET = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PREGION0RA_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `PREGION0RA` writer - Write '1' to enable interrupt for event PREGION0RA"] -pub type PREGION0RA_W<'a, const O: u8> = crate::BitWriter<'a, u32, NMIENSET_SPEC, PREGION0RA_AW, O>; -impl<'a, const O: u8> PREGION0RA_W<'a, O> { - #[doc = "Enable"] - #[inline(always)] - pub fn set(self) -> &'a mut W { - self.variant(PREGION0RA_AW::SET) - } -} -#[doc = "Field `PREGION1WA` reader - Write '1' to enable interrupt for event PREGION1WA"] -pub type PREGION1WA_R = crate::BitReader; -#[doc = "Write '1' to enable interrupt for event PREGION1WA\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PREGION1WA_A { - #[doc = "0: Read: Disabled"] - DISABLED = 0, - #[doc = "1: Read: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PREGION1WA_A) -> Self { - variant as u8 != 0 - } -} -impl PREGION1WA_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> PREGION1WA_A { - match self.bits { - false => PREGION1WA_A::DISABLED, - true => PREGION1WA_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == PREGION1WA_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == PREGION1WA_A::ENABLED - } -} -#[doc = "Write '1' to enable interrupt for event PREGION1WA\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PREGION1WA_AW { - #[doc = "1: Enable"] - SET = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PREGION1WA_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `PREGION1WA` writer - Write '1' to enable interrupt for event PREGION1WA"] -pub type PREGION1WA_W<'a, const O: u8> = crate::BitWriter<'a, u32, NMIENSET_SPEC, PREGION1WA_AW, O>; -impl<'a, const O: u8> PREGION1WA_W<'a, O> { - #[doc = "Enable"] - #[inline(always)] - pub fn set(self) -> &'a mut W { - self.variant(PREGION1WA_AW::SET) - } -} -#[doc = "Field `PREGION1RA` reader - Write '1' to enable interrupt for event PREGION1RA"] -pub type PREGION1RA_R = crate::BitReader; -#[doc = "Write '1' to enable interrupt for event PREGION1RA\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PREGION1RA_A { - #[doc = "0: Read: Disabled"] - DISABLED = 0, - #[doc = "1: Read: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PREGION1RA_A) -> Self { - variant as u8 != 0 - } -} -impl PREGION1RA_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> PREGION1RA_A { - match self.bits { - false => PREGION1RA_A::DISABLED, - true => PREGION1RA_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == PREGION1RA_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == PREGION1RA_A::ENABLED - } -} -#[doc = "Write '1' to enable interrupt for event PREGION1RA\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PREGION1RA_AW { - #[doc = "1: Enable"] - SET = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PREGION1RA_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `PREGION1RA` writer - Write '1' to enable interrupt for event PREGION1RA"] -pub type PREGION1RA_W<'a, const O: u8> = crate::BitWriter<'a, u32, NMIENSET_SPEC, PREGION1RA_AW, O>; -impl<'a, const O: u8> PREGION1RA_W<'a, O> { - #[doc = "Enable"] - #[inline(always)] - pub fn set(self) -> &'a mut W { - self.variant(PREGION1RA_AW::SET) - } -} -impl R { - #[doc = "Bit 0 - Write '1' to enable interrupt for event REGION0WA"] - #[inline(always)] - pub fn region0wa(&self) -> REGION0WA_R { - REGION0WA_R::new((self.bits & 1) != 0) - } - #[doc = "Bit 1 - Write '1' to enable interrupt for event REGION0RA"] - #[inline(always)] - pub fn region0ra(&self) -> REGION0RA_R { - REGION0RA_R::new(((self.bits >> 1) & 1) != 0) - } - #[doc = "Bit 2 - Write '1' to enable interrupt for event REGION1WA"] - #[inline(always)] - pub fn region1wa(&self) -> REGION1WA_R { - REGION1WA_R::new(((self.bits >> 2) & 1) != 0) - } - #[doc = "Bit 3 - Write '1' to enable interrupt for event REGION1RA"] - #[inline(always)] - pub fn region1ra(&self) -> REGION1RA_R { - REGION1RA_R::new(((self.bits >> 3) & 1) != 0) - } - #[doc = "Bit 4 - Write '1' to enable interrupt for event REGION2WA"] - #[inline(always)] - pub fn region2wa(&self) -> REGION2WA_R { - REGION2WA_R::new(((self.bits >> 4) & 1) != 0) - } - #[doc = "Bit 5 - Write '1' to enable interrupt for event REGION2RA"] - #[inline(always)] - pub fn region2ra(&self) -> REGION2RA_R { - REGION2RA_R::new(((self.bits >> 5) & 1) != 0) - } - #[doc = "Bit 6 - Write '1' to enable interrupt for event REGION3WA"] - #[inline(always)] - pub fn region3wa(&self) -> REGION3WA_R { - REGION3WA_R::new(((self.bits >> 6) & 1) != 0) - } - #[doc = "Bit 7 - Write '1' to enable interrupt for event REGION3RA"] - #[inline(always)] - pub fn region3ra(&self) -> REGION3RA_R { - REGION3RA_R::new(((self.bits >> 7) & 1) != 0) - } - #[doc = "Bit 24 - Write '1' to enable interrupt for event PREGION0WA"] - #[inline(always)] - pub fn pregion0wa(&self) -> PREGION0WA_R { - PREGION0WA_R::new(((self.bits >> 24) & 1) != 0) - } - #[doc = "Bit 25 - Write '1' to enable interrupt for event PREGION0RA"] - #[inline(always)] - pub fn pregion0ra(&self) -> PREGION0RA_R { - PREGION0RA_R::new(((self.bits >> 25) & 1) != 0) - } - #[doc = "Bit 26 - Write '1' to enable interrupt for event PREGION1WA"] - #[inline(always)] - pub fn pregion1wa(&self) -> PREGION1WA_R { - PREGION1WA_R::new(((self.bits >> 26) & 1) != 0) - } - #[doc = "Bit 27 - Write '1' to enable interrupt for event PREGION1RA"] - #[inline(always)] - pub fn pregion1ra(&self) -> PREGION1RA_R { - PREGION1RA_R::new(((self.bits >> 27) & 1) != 0) - } -} -impl W { - #[doc = "Bit 0 - Write '1' to enable interrupt for event REGION0WA"] - #[inline(always)] - #[must_use] - pub fn region0wa(&mut self) -> REGION0WA_W<0> { - REGION0WA_W::new(self) - } - #[doc = "Bit 1 - Write '1' to enable interrupt for event REGION0RA"] - #[inline(always)] - #[must_use] - pub fn region0ra(&mut self) -> REGION0RA_W<1> { - REGION0RA_W::new(self) - } - #[doc = "Bit 2 - Write '1' to enable interrupt for event REGION1WA"] - #[inline(always)] - #[must_use] - pub fn region1wa(&mut self) -> REGION1WA_W<2> { - REGION1WA_W::new(self) - } - #[doc = "Bit 3 - Write '1' to enable interrupt for event REGION1RA"] - #[inline(always)] - #[must_use] - pub fn region1ra(&mut self) -> REGION1RA_W<3> { - REGION1RA_W::new(self) - } - #[doc = "Bit 4 - Write '1' to enable interrupt for event REGION2WA"] - #[inline(always)] - #[must_use] - pub fn region2wa(&mut self) -> REGION2WA_W<4> { - REGION2WA_W::new(self) - } - #[doc = "Bit 5 - Write '1' to enable interrupt for event REGION2RA"] - #[inline(always)] - #[must_use] - pub fn region2ra(&mut self) -> REGION2RA_W<5> { - REGION2RA_W::new(self) - } - #[doc = "Bit 6 - Write '1' to enable interrupt for event REGION3WA"] - #[inline(always)] - #[must_use] - pub fn region3wa(&mut self) -> REGION3WA_W<6> { - REGION3WA_W::new(self) - } - #[doc = "Bit 7 - Write '1' to enable interrupt for event REGION3RA"] - #[inline(always)] - #[must_use] - pub fn region3ra(&mut self) -> REGION3RA_W<7> { - REGION3RA_W::new(self) - } - #[doc = "Bit 24 - Write '1' to enable interrupt for event PREGION0WA"] - #[inline(always)] - #[must_use] - pub fn pregion0wa(&mut self) -> PREGION0WA_W<24> { - PREGION0WA_W::new(self) - } - #[doc = "Bit 25 - Write '1' to enable interrupt for event PREGION0RA"] - #[inline(always)] - #[must_use] - pub fn pregion0ra(&mut self) -> PREGION0RA_W<25> { - PREGION0RA_W::new(self) - } - #[doc = "Bit 26 - Write '1' to enable interrupt for event PREGION1WA"] - #[inline(always)] - #[must_use] - pub fn pregion1wa(&mut self) -> PREGION1WA_W<26> { - PREGION1WA_W::new(self) - } - #[doc = "Bit 27 - Write '1' to enable interrupt for event PREGION1RA"] - #[inline(always)] - #[must_use] - pub fn pregion1ra(&mut self) -> PREGION1RA_W<27> { - PREGION1RA_W::new(self) - } - #[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 = "Enable interrupt\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 [nmienset](index.html) module"] -pub struct NMIENSET_SPEC; -impl crate::RegisterSpec for NMIENSET_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [nmienset::R](R) reader structure"] -impl crate::Readable for NMIENSET_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [nmienset::W](W) writer structure"] -impl crate::Writable for NMIENSET_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets NMIENSET to value 0"] -impl crate::Resettable for NMIENSET_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/mwu/perregion.rs b/down-the-stack/dk_pac/src/mwu/perregion.rs deleted file mode 100644 index 0be46d6..0000000 --- a/down-the-stack/dk_pac/src/mwu/perregion.rs +++ /dev/null @@ -1,16 +0,0 @@ -#[doc = r"Register block"] -#[repr(C)] -pub struct PERREGION { - #[doc = "0x00 - Description cluster: Source of event/interrupt in region n, write access detected while corresponding subregion was enabled for watching"] - pub substatwa: SUBSTATWA, - #[doc = "0x04 - Description cluster: Source of event/interrupt in region n, read access detected while corresponding subregion was enabled for watching"] - pub substatra: SUBSTATRA, -} -#[doc = "SUBSTATWA (rw) register accessor: an alias for `Reg`"] -pub type SUBSTATWA = crate::Reg; -#[doc = "Description cluster: Source of event/interrupt in region n, write access detected while corresponding subregion was enabled for watching"] -pub mod substatwa; -#[doc = "SUBSTATRA (rw) register accessor: an alias for `Reg`"] -pub type SUBSTATRA = crate::Reg; -#[doc = "Description cluster: Source of event/interrupt in region n, read access detected while corresponding subregion was enabled for watching"] -pub mod substatra; diff --git a/down-the-stack/dk_pac/src/mwu/perregion/substatra.rs b/down-the-stack/dk_pac/src/mwu/perregion/substatra.rs deleted file mode 100644 index 2924341..0000000 --- a/down-the-stack/dk_pac/src/mwu/perregion/substatra.rs +++ /dev/null @@ -1,2017 +0,0 @@ -#[doc = "Register `SUBSTATRA` 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 `SUBSTATRA` 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 `SR0` reader - Subregion 0 in region n (write '1' to clear)"] -pub type SR0_R = crate::BitReader; -#[doc = "Subregion 0 in region n (write '1' to clear)\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum SR0_A { - #[doc = "0: No read access occurred in this subregion"] - NO_ACCESS = 0, - #[doc = "1: Read access(es) occurred in this subregion"] - ACCESS = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: SR0_A) -> Self { - variant as u8 != 0 - } -} -impl SR0_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> SR0_A { - match self.bits { - false => SR0_A::NO_ACCESS, - true => SR0_A::ACCESS, - } - } - #[doc = "Checks if the value of the field is `NO_ACCESS`"] - #[inline(always)] - pub fn is_no_access(&self) -> bool { - *self == SR0_A::NO_ACCESS - } - #[doc = "Checks if the value of the field is `ACCESS`"] - #[inline(always)] - pub fn is_access(&self) -> bool { - *self == SR0_A::ACCESS - } -} -#[doc = "Field `SR0` writer - Subregion 0 in region n (write '1' to clear)"] -pub type SR0_W<'a, const O: u8> = crate::BitWriter1C<'a, u32, SUBSTATRA_SPEC, SR0_A, O>; -impl<'a, const O: u8> SR0_W<'a, O> { - #[doc = "No read access occurred in this subregion"] - #[inline(always)] - pub fn no_access(self) -> &'a mut W { - self.variant(SR0_A::NO_ACCESS) - } - #[doc = "Read access(es) occurred in this subregion"] - #[inline(always)] - pub fn access(self) -> &'a mut W { - self.variant(SR0_A::ACCESS) - } -} -#[doc = "Field `SR1` reader - Subregion 1 in region n (write '1' to clear)"] -pub type SR1_R = crate::BitReader; -#[doc = "Subregion 1 in region n (write '1' to clear)\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum SR1_A { - #[doc = "0: No read access occurred in this subregion"] - NO_ACCESS = 0, - #[doc = "1: Read access(es) occurred in this subregion"] - ACCESS = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: SR1_A) -> Self { - variant as u8 != 0 - } -} -impl SR1_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> SR1_A { - match self.bits { - false => SR1_A::NO_ACCESS, - true => SR1_A::ACCESS, - } - } - #[doc = "Checks if the value of the field is `NO_ACCESS`"] - #[inline(always)] - pub fn is_no_access(&self) -> bool { - *self == SR1_A::NO_ACCESS - } - #[doc = "Checks if the value of the field is `ACCESS`"] - #[inline(always)] - pub fn is_access(&self) -> bool { - *self == SR1_A::ACCESS - } -} -#[doc = "Field `SR1` writer - Subregion 1 in region n (write '1' to clear)"] -pub type SR1_W<'a, const O: u8> = crate::BitWriter1C<'a, u32, SUBSTATRA_SPEC, SR1_A, O>; -impl<'a, const O: u8> SR1_W<'a, O> { - #[doc = "No read access occurred in this subregion"] - #[inline(always)] - pub fn no_access(self) -> &'a mut W { - self.variant(SR1_A::NO_ACCESS) - } - #[doc = "Read access(es) occurred in this subregion"] - #[inline(always)] - pub fn access(self) -> &'a mut W { - self.variant(SR1_A::ACCESS) - } -} -#[doc = "Field `SR2` reader - Subregion 2 in region n (write '1' to clear)"] -pub type SR2_R = crate::BitReader; -#[doc = "Subregion 2 in region n (write '1' to clear)\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum SR2_A { - #[doc = "0: No read access occurred in this subregion"] - NO_ACCESS = 0, - #[doc = "1: Read access(es) occurred in this subregion"] - ACCESS = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: SR2_A) -> Self { - variant as u8 != 0 - } -} -impl SR2_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> SR2_A { - match self.bits { - false => SR2_A::NO_ACCESS, - true => SR2_A::ACCESS, - } - } - #[doc = "Checks if the value of the field is `NO_ACCESS`"] - #[inline(always)] - pub fn is_no_access(&self) -> bool { - *self == SR2_A::NO_ACCESS - } - #[doc = "Checks if the value of the field is `ACCESS`"] - #[inline(always)] - pub fn is_access(&self) -> bool { - *self == SR2_A::ACCESS - } -} -#[doc = "Field `SR2` writer - Subregion 2 in region n (write '1' to clear)"] -pub type SR2_W<'a, const O: u8> = crate::BitWriter1C<'a, u32, SUBSTATRA_SPEC, SR2_A, O>; -impl<'a, const O: u8> SR2_W<'a, O> { - #[doc = "No read access occurred in this subregion"] - #[inline(always)] - pub fn no_access(self) -> &'a mut W { - self.variant(SR2_A::NO_ACCESS) - } - #[doc = "Read access(es) occurred in this subregion"] - #[inline(always)] - pub fn access(self) -> &'a mut W { - self.variant(SR2_A::ACCESS) - } -} -#[doc = "Field `SR3` reader - Subregion 3 in region n (write '1' to clear)"] -pub type SR3_R = crate::BitReader; -#[doc = "Subregion 3 in region n (write '1' to clear)\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum SR3_A { - #[doc = "0: No read access occurred in this subregion"] - NO_ACCESS = 0, - #[doc = "1: Read access(es) occurred in this subregion"] - ACCESS = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: SR3_A) -> Self { - variant as u8 != 0 - } -} -impl SR3_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> SR3_A { - match self.bits { - false => SR3_A::NO_ACCESS, - true => SR3_A::ACCESS, - } - } - #[doc = "Checks if the value of the field is `NO_ACCESS`"] - #[inline(always)] - pub fn is_no_access(&self) -> bool { - *self == SR3_A::NO_ACCESS - } - #[doc = "Checks if the value of the field is `ACCESS`"] - #[inline(always)] - pub fn is_access(&self) -> bool { - *self == SR3_A::ACCESS - } -} -#[doc = "Field `SR3` writer - Subregion 3 in region n (write '1' to clear)"] -pub type SR3_W<'a, const O: u8> = crate::BitWriter1C<'a, u32, SUBSTATRA_SPEC, SR3_A, O>; -impl<'a, const O: u8> SR3_W<'a, O> { - #[doc = "No read access occurred in this subregion"] - #[inline(always)] - pub fn no_access(self) -> &'a mut W { - self.variant(SR3_A::NO_ACCESS) - } - #[doc = "Read access(es) occurred in this subregion"] - #[inline(always)] - pub fn access(self) -> &'a mut W { - self.variant(SR3_A::ACCESS) - } -} -#[doc = "Field `SR4` reader - Subregion 4 in region n (write '1' to clear)"] -pub type SR4_R = crate::BitReader; -#[doc = "Subregion 4 in region n (write '1' to clear)\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum SR4_A { - #[doc = "0: No read access occurred in this subregion"] - NO_ACCESS = 0, - #[doc = "1: Read access(es) occurred in this subregion"] - ACCESS = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: SR4_A) -> Self { - variant as u8 != 0 - } -} -impl SR4_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> SR4_A { - match self.bits { - false => SR4_A::NO_ACCESS, - true => SR4_A::ACCESS, - } - } - #[doc = "Checks if the value of the field is `NO_ACCESS`"] - #[inline(always)] - pub fn is_no_access(&self) -> bool { - *self == SR4_A::NO_ACCESS - } - #[doc = "Checks if the value of the field is `ACCESS`"] - #[inline(always)] - pub fn is_access(&self) -> bool { - *self == SR4_A::ACCESS - } -} -#[doc = "Field `SR4` writer - Subregion 4 in region n (write '1' to clear)"] -pub type SR4_W<'a, const O: u8> = crate::BitWriter1C<'a, u32, SUBSTATRA_SPEC, SR4_A, O>; -impl<'a, const O: u8> SR4_W<'a, O> { - #[doc = "No read access occurred in this subregion"] - #[inline(always)] - pub fn no_access(self) -> &'a mut W { - self.variant(SR4_A::NO_ACCESS) - } - #[doc = "Read access(es) occurred in this subregion"] - #[inline(always)] - pub fn access(self) -> &'a mut W { - self.variant(SR4_A::ACCESS) - } -} -#[doc = "Field `SR5` reader - Subregion 5 in region n (write '1' to clear)"] -pub type SR5_R = crate::BitReader; -#[doc = "Subregion 5 in region n (write '1' to clear)\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum SR5_A { - #[doc = "0: No read access occurred in this subregion"] - NO_ACCESS = 0, - #[doc = "1: Read access(es) occurred in this subregion"] - ACCESS = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: SR5_A) -> Self { - variant as u8 != 0 - } -} -impl SR5_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> SR5_A { - match self.bits { - false => SR5_A::NO_ACCESS, - true => SR5_A::ACCESS, - } - } - #[doc = "Checks if the value of the field is `NO_ACCESS`"] - #[inline(always)] - pub fn is_no_access(&self) -> bool { - *self == SR5_A::NO_ACCESS - } - #[doc = "Checks if the value of the field is `ACCESS`"] - #[inline(always)] - pub fn is_access(&self) -> bool { - *self == SR5_A::ACCESS - } -} -#[doc = "Field `SR5` writer - Subregion 5 in region n (write '1' to clear)"] -pub type SR5_W<'a, const O: u8> = crate::BitWriter1C<'a, u32, SUBSTATRA_SPEC, SR5_A, O>; -impl<'a, const O: u8> SR5_W<'a, O> { - #[doc = "No read access occurred in this subregion"] - #[inline(always)] - pub fn no_access(self) -> &'a mut W { - self.variant(SR5_A::NO_ACCESS) - } - #[doc = "Read access(es) occurred in this subregion"] - #[inline(always)] - pub fn access(self) -> &'a mut W { - self.variant(SR5_A::ACCESS) - } -} -#[doc = "Field `SR6` reader - Subregion 6 in region n (write '1' to clear)"] -pub type SR6_R = crate::BitReader; -#[doc = "Subregion 6 in region n (write '1' to clear)\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum SR6_A { - #[doc = "0: No read access occurred in this subregion"] - NO_ACCESS = 0, - #[doc = "1: Read access(es) occurred in this subregion"] - ACCESS = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: SR6_A) -> Self { - variant as u8 != 0 - } -} -impl SR6_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> SR6_A { - match self.bits { - false => SR6_A::NO_ACCESS, - true => SR6_A::ACCESS, - } - } - #[doc = "Checks if the value of the field is `NO_ACCESS`"] - #[inline(always)] - pub fn is_no_access(&self) -> bool { - *self == SR6_A::NO_ACCESS - } - #[doc = "Checks if the value of the field is `ACCESS`"] - #[inline(always)] - pub fn is_access(&self) -> bool { - *self == SR6_A::ACCESS - } -} -#[doc = "Field `SR6` writer - Subregion 6 in region n (write '1' to clear)"] -pub type SR6_W<'a, const O: u8> = crate::BitWriter1C<'a, u32, SUBSTATRA_SPEC, SR6_A, O>; -impl<'a, const O: u8> SR6_W<'a, O> { - #[doc = "No read access occurred in this subregion"] - #[inline(always)] - pub fn no_access(self) -> &'a mut W { - self.variant(SR6_A::NO_ACCESS) - } - #[doc = "Read access(es) occurred in this subregion"] - #[inline(always)] - pub fn access(self) -> &'a mut W { - self.variant(SR6_A::ACCESS) - } -} -#[doc = "Field `SR7` reader - Subregion 7 in region n (write '1' to clear)"] -pub type SR7_R = crate::BitReader; -#[doc = "Subregion 7 in region n (write '1' to clear)\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum SR7_A { - #[doc = "0: No read access occurred in this subregion"] - NO_ACCESS = 0, - #[doc = "1: Read access(es) occurred in this subregion"] - ACCESS = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: SR7_A) -> Self { - variant as u8 != 0 - } -} -impl SR7_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> SR7_A { - match self.bits { - false => SR7_A::NO_ACCESS, - true => SR7_A::ACCESS, - } - } - #[doc = "Checks if the value of the field is `NO_ACCESS`"] - #[inline(always)] - pub fn is_no_access(&self) -> bool { - *self == SR7_A::NO_ACCESS - } - #[doc = "Checks if the value of the field is `ACCESS`"] - #[inline(always)] - pub fn is_access(&self) -> bool { - *self == SR7_A::ACCESS - } -} -#[doc = "Field `SR7` writer - Subregion 7 in region n (write '1' to clear)"] -pub type SR7_W<'a, const O: u8> = crate::BitWriter1C<'a, u32, SUBSTATRA_SPEC, SR7_A, O>; -impl<'a, const O: u8> SR7_W<'a, O> { - #[doc = "No read access occurred in this subregion"] - #[inline(always)] - pub fn no_access(self) -> &'a mut W { - self.variant(SR7_A::NO_ACCESS) - } - #[doc = "Read access(es) occurred in this subregion"] - #[inline(always)] - pub fn access(self) -> &'a mut W { - self.variant(SR7_A::ACCESS) - } -} -#[doc = "Field `SR8` reader - Subregion 8 in region n (write '1' to clear)"] -pub type SR8_R = crate::BitReader; -#[doc = "Subregion 8 in region n (write '1' to clear)\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum SR8_A { - #[doc = "0: No read access occurred in this subregion"] - NO_ACCESS = 0, - #[doc = "1: Read access(es) occurred in this subregion"] - ACCESS = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: SR8_A) -> Self { - variant as u8 != 0 - } -} -impl SR8_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> SR8_A { - match self.bits { - false => SR8_A::NO_ACCESS, - true => SR8_A::ACCESS, - } - } - #[doc = "Checks if the value of the field is `NO_ACCESS`"] - #[inline(always)] - pub fn is_no_access(&self) -> bool { - *self == SR8_A::NO_ACCESS - } - #[doc = "Checks if the value of the field is `ACCESS`"] - #[inline(always)] - pub fn is_access(&self) -> bool { - *self == SR8_A::ACCESS - } -} -#[doc = "Field `SR8` writer - Subregion 8 in region n (write '1' to clear)"] -pub type SR8_W<'a, const O: u8> = crate::BitWriter1C<'a, u32, SUBSTATRA_SPEC, SR8_A, O>; -impl<'a, const O: u8> SR8_W<'a, O> { - #[doc = "No read access occurred in this subregion"] - #[inline(always)] - pub fn no_access(self) -> &'a mut W { - self.variant(SR8_A::NO_ACCESS) - } - #[doc = "Read access(es) occurred in this subregion"] - #[inline(always)] - pub fn access(self) -> &'a mut W { - self.variant(SR8_A::ACCESS) - } -} -#[doc = "Field `SR9` reader - Subregion 9 in region n (write '1' to clear)"] -pub type SR9_R = crate::BitReader; -#[doc = "Subregion 9 in region n (write '1' to clear)\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum SR9_A { - #[doc = "0: No read access occurred in this subregion"] - NO_ACCESS = 0, - #[doc = "1: Read access(es) occurred in this subregion"] - ACCESS = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: SR9_A) -> Self { - variant as u8 != 0 - } -} -impl SR9_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> SR9_A { - match self.bits { - false => SR9_A::NO_ACCESS, - true => SR9_A::ACCESS, - } - } - #[doc = "Checks if the value of the field is `NO_ACCESS`"] - #[inline(always)] - pub fn is_no_access(&self) -> bool { - *self == SR9_A::NO_ACCESS - } - #[doc = "Checks if the value of the field is `ACCESS`"] - #[inline(always)] - pub fn is_access(&self) -> bool { - *self == SR9_A::ACCESS - } -} -#[doc = "Field `SR9` writer - Subregion 9 in region n (write '1' to clear)"] -pub type SR9_W<'a, const O: u8> = crate::BitWriter1C<'a, u32, SUBSTATRA_SPEC, SR9_A, O>; -impl<'a, const O: u8> SR9_W<'a, O> { - #[doc = "No read access occurred in this subregion"] - #[inline(always)] - pub fn no_access(self) -> &'a mut W { - self.variant(SR9_A::NO_ACCESS) - } - #[doc = "Read access(es) occurred in this subregion"] - #[inline(always)] - pub fn access(self) -> &'a mut W { - self.variant(SR9_A::ACCESS) - } -} -#[doc = "Field `SR10` reader - Subregion 10 in region n (write '1' to clear)"] -pub type SR10_R = crate::BitReader; -#[doc = "Subregion 10 in region n (write '1' to clear)\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum SR10_A { - #[doc = "0: No read access occurred in this subregion"] - NO_ACCESS = 0, - #[doc = "1: Read access(es) occurred in this subregion"] - ACCESS = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: SR10_A) -> Self { - variant as u8 != 0 - } -} -impl SR10_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> SR10_A { - match self.bits { - false => SR10_A::NO_ACCESS, - true => SR10_A::ACCESS, - } - } - #[doc = "Checks if the value of the field is `NO_ACCESS`"] - #[inline(always)] - pub fn is_no_access(&self) -> bool { - *self == SR10_A::NO_ACCESS - } - #[doc = "Checks if the value of the field is `ACCESS`"] - #[inline(always)] - pub fn is_access(&self) -> bool { - *self == SR10_A::ACCESS - } -} -#[doc = "Field `SR10` writer - Subregion 10 in region n (write '1' to clear)"] -pub type SR10_W<'a, const O: u8> = crate::BitWriter1C<'a, u32, SUBSTATRA_SPEC, SR10_A, O>; -impl<'a, const O: u8> SR10_W<'a, O> { - #[doc = "No read access occurred in this subregion"] - #[inline(always)] - pub fn no_access(self) -> &'a mut W { - self.variant(SR10_A::NO_ACCESS) - } - #[doc = "Read access(es) occurred in this subregion"] - #[inline(always)] - pub fn access(self) -> &'a mut W { - self.variant(SR10_A::ACCESS) - } -} -#[doc = "Field `SR11` reader - Subregion 11 in region n (write '1' to clear)"] -pub type SR11_R = crate::BitReader; -#[doc = "Subregion 11 in region n (write '1' to clear)\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum SR11_A { - #[doc = "0: No read access occurred in this subregion"] - NO_ACCESS = 0, - #[doc = "1: Read access(es) occurred in this subregion"] - ACCESS = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: SR11_A) -> Self { - variant as u8 != 0 - } -} -impl SR11_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> SR11_A { - match self.bits { - false => SR11_A::NO_ACCESS, - true => SR11_A::ACCESS, - } - } - #[doc = "Checks if the value of the field is `NO_ACCESS`"] - #[inline(always)] - pub fn is_no_access(&self) -> bool { - *self == SR11_A::NO_ACCESS - } - #[doc = "Checks if the value of the field is `ACCESS`"] - #[inline(always)] - pub fn is_access(&self) -> bool { - *self == SR11_A::ACCESS - } -} -#[doc = "Field `SR11` writer - Subregion 11 in region n (write '1' to clear)"] -pub type SR11_W<'a, const O: u8> = crate::BitWriter1C<'a, u32, SUBSTATRA_SPEC, SR11_A, O>; -impl<'a, const O: u8> SR11_W<'a, O> { - #[doc = "No read access occurred in this subregion"] - #[inline(always)] - pub fn no_access(self) -> &'a mut W { - self.variant(SR11_A::NO_ACCESS) - } - #[doc = "Read access(es) occurred in this subregion"] - #[inline(always)] - pub fn access(self) -> &'a mut W { - self.variant(SR11_A::ACCESS) - } -} -#[doc = "Field `SR12` reader - Subregion 12 in region n (write '1' to clear)"] -pub type SR12_R = crate::BitReader; -#[doc = "Subregion 12 in region n (write '1' to clear)\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum SR12_A { - #[doc = "0: No read access occurred in this subregion"] - NO_ACCESS = 0, - #[doc = "1: Read access(es) occurred in this subregion"] - ACCESS = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: SR12_A) -> Self { - variant as u8 != 0 - } -} -impl SR12_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> SR12_A { - match self.bits { - false => SR12_A::NO_ACCESS, - true => SR12_A::ACCESS, - } - } - #[doc = "Checks if the value of the field is `NO_ACCESS`"] - #[inline(always)] - pub fn is_no_access(&self) -> bool { - *self == SR12_A::NO_ACCESS - } - #[doc = "Checks if the value of the field is `ACCESS`"] - #[inline(always)] - pub fn is_access(&self) -> bool { - *self == SR12_A::ACCESS - } -} -#[doc = "Field `SR12` writer - Subregion 12 in region n (write '1' to clear)"] -pub type SR12_W<'a, const O: u8> = crate::BitWriter1C<'a, u32, SUBSTATRA_SPEC, SR12_A, O>; -impl<'a, const O: u8> SR12_W<'a, O> { - #[doc = "No read access occurred in this subregion"] - #[inline(always)] - pub fn no_access(self) -> &'a mut W { - self.variant(SR12_A::NO_ACCESS) - } - #[doc = "Read access(es) occurred in this subregion"] - #[inline(always)] - pub fn access(self) -> &'a mut W { - self.variant(SR12_A::ACCESS) - } -} -#[doc = "Field `SR13` reader - Subregion 13 in region n (write '1' to clear)"] -pub type SR13_R = crate::BitReader; -#[doc = "Subregion 13 in region n (write '1' to clear)\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum SR13_A { - #[doc = "0: No read access occurred in this subregion"] - NO_ACCESS = 0, - #[doc = "1: Read access(es) occurred in this subregion"] - ACCESS = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: SR13_A) -> Self { - variant as u8 != 0 - } -} -impl SR13_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> SR13_A { - match self.bits { - false => SR13_A::NO_ACCESS, - true => SR13_A::ACCESS, - } - } - #[doc = "Checks if the value of the field is `NO_ACCESS`"] - #[inline(always)] - pub fn is_no_access(&self) -> bool { - *self == SR13_A::NO_ACCESS - } - #[doc = "Checks if the value of the field is `ACCESS`"] - #[inline(always)] - pub fn is_access(&self) -> bool { - *self == SR13_A::ACCESS - } -} -#[doc = "Field `SR13` writer - Subregion 13 in region n (write '1' to clear)"] -pub type SR13_W<'a, const O: u8> = crate::BitWriter1C<'a, u32, SUBSTATRA_SPEC, SR13_A, O>; -impl<'a, const O: u8> SR13_W<'a, O> { - #[doc = "No read access occurred in this subregion"] - #[inline(always)] - pub fn no_access(self) -> &'a mut W { - self.variant(SR13_A::NO_ACCESS) - } - #[doc = "Read access(es) occurred in this subregion"] - #[inline(always)] - pub fn access(self) -> &'a mut W { - self.variant(SR13_A::ACCESS) - } -} -#[doc = "Field `SR14` reader - Subregion 14 in region n (write '1' to clear)"] -pub type SR14_R = crate::BitReader; -#[doc = "Subregion 14 in region n (write '1' to clear)\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum SR14_A { - #[doc = "0: No read access occurred in this subregion"] - NO_ACCESS = 0, - #[doc = "1: Read access(es) occurred in this subregion"] - ACCESS = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: SR14_A) -> Self { - variant as u8 != 0 - } -} -impl SR14_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> SR14_A { - match self.bits { - false => SR14_A::NO_ACCESS, - true => SR14_A::ACCESS, - } - } - #[doc = "Checks if the value of the field is `NO_ACCESS`"] - #[inline(always)] - pub fn is_no_access(&self) -> bool { - *self == SR14_A::NO_ACCESS - } - #[doc = "Checks if the value of the field is `ACCESS`"] - #[inline(always)] - pub fn is_access(&self) -> bool { - *self == SR14_A::ACCESS - } -} -#[doc = "Field `SR14` writer - Subregion 14 in region n (write '1' to clear)"] -pub type SR14_W<'a, const O: u8> = crate::BitWriter1C<'a, u32, SUBSTATRA_SPEC, SR14_A, O>; -impl<'a, const O: u8> SR14_W<'a, O> { - #[doc = "No read access occurred in this subregion"] - #[inline(always)] - pub fn no_access(self) -> &'a mut W { - self.variant(SR14_A::NO_ACCESS) - } - #[doc = "Read access(es) occurred in this subregion"] - #[inline(always)] - pub fn access(self) -> &'a mut W { - self.variant(SR14_A::ACCESS) - } -} -#[doc = "Field `SR15` reader - Subregion 15 in region n (write '1' to clear)"] -pub type SR15_R = crate::BitReader; -#[doc = "Subregion 15 in region n (write '1' to clear)\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum SR15_A { - #[doc = "0: No read access occurred in this subregion"] - NO_ACCESS = 0, - #[doc = "1: Read access(es) occurred in this subregion"] - ACCESS = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: SR15_A) -> Self { - variant as u8 != 0 - } -} -impl SR15_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> SR15_A { - match self.bits { - false => SR15_A::NO_ACCESS, - true => SR15_A::ACCESS, - } - } - #[doc = "Checks if the value of the field is `NO_ACCESS`"] - #[inline(always)] - pub fn is_no_access(&self) -> bool { - *self == SR15_A::NO_ACCESS - } - #[doc = "Checks if the value of the field is `ACCESS`"] - #[inline(always)] - pub fn is_access(&self) -> bool { - *self == SR15_A::ACCESS - } -} -#[doc = "Field `SR15` writer - Subregion 15 in region n (write '1' to clear)"] -pub type SR15_W<'a, const O: u8> = crate::BitWriter1C<'a, u32, SUBSTATRA_SPEC, SR15_A, O>; -impl<'a, const O: u8> SR15_W<'a, O> { - #[doc = "No read access occurred in this subregion"] - #[inline(always)] - pub fn no_access(self) -> &'a mut W { - self.variant(SR15_A::NO_ACCESS) - } - #[doc = "Read access(es) occurred in this subregion"] - #[inline(always)] - pub fn access(self) -> &'a mut W { - self.variant(SR15_A::ACCESS) - } -} -#[doc = "Field `SR16` reader - Subregion 16 in region n (write '1' to clear)"] -pub type SR16_R = crate::BitReader; -#[doc = "Subregion 16 in region n (write '1' to clear)\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum SR16_A { - #[doc = "0: No read access occurred in this subregion"] - NO_ACCESS = 0, - #[doc = "1: Read access(es) occurred in this subregion"] - ACCESS = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: SR16_A) -> Self { - variant as u8 != 0 - } -} -impl SR16_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> SR16_A { - match self.bits { - false => SR16_A::NO_ACCESS, - true => SR16_A::ACCESS, - } - } - #[doc = "Checks if the value of the field is `NO_ACCESS`"] - #[inline(always)] - pub fn is_no_access(&self) -> bool { - *self == SR16_A::NO_ACCESS - } - #[doc = "Checks if the value of the field is `ACCESS`"] - #[inline(always)] - pub fn is_access(&self) -> bool { - *self == SR16_A::ACCESS - } -} -#[doc = "Field `SR16` writer - Subregion 16 in region n (write '1' to clear)"] -pub type SR16_W<'a, const O: u8> = crate::BitWriter1C<'a, u32, SUBSTATRA_SPEC, SR16_A, O>; -impl<'a, const O: u8> SR16_W<'a, O> { - #[doc = "No read access occurred in this subregion"] - #[inline(always)] - pub fn no_access(self) -> &'a mut W { - self.variant(SR16_A::NO_ACCESS) - } - #[doc = "Read access(es) occurred in this subregion"] - #[inline(always)] - pub fn access(self) -> &'a mut W { - self.variant(SR16_A::ACCESS) - } -} -#[doc = "Field `SR17` reader - Subregion 17 in region n (write '1' to clear)"] -pub type SR17_R = crate::BitReader; -#[doc = "Subregion 17 in region n (write '1' to clear)\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum SR17_A { - #[doc = "0: No read access occurred in this subregion"] - NO_ACCESS = 0, - #[doc = "1: Read access(es) occurred in this subregion"] - ACCESS = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: SR17_A) -> Self { - variant as u8 != 0 - } -} -impl SR17_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> SR17_A { - match self.bits { - false => SR17_A::NO_ACCESS, - true => SR17_A::ACCESS, - } - } - #[doc = "Checks if the value of the field is `NO_ACCESS`"] - #[inline(always)] - pub fn is_no_access(&self) -> bool { - *self == SR17_A::NO_ACCESS - } - #[doc = "Checks if the value of the field is `ACCESS`"] - #[inline(always)] - pub fn is_access(&self) -> bool { - *self == SR17_A::ACCESS - } -} -#[doc = "Field `SR17` writer - Subregion 17 in region n (write '1' to clear)"] -pub type SR17_W<'a, const O: u8> = crate::BitWriter1C<'a, u32, SUBSTATRA_SPEC, SR17_A, O>; -impl<'a, const O: u8> SR17_W<'a, O> { - #[doc = "No read access occurred in this subregion"] - #[inline(always)] - pub fn no_access(self) -> &'a mut W { - self.variant(SR17_A::NO_ACCESS) - } - #[doc = "Read access(es) occurred in this subregion"] - #[inline(always)] - pub fn access(self) -> &'a mut W { - self.variant(SR17_A::ACCESS) - } -} -#[doc = "Field `SR18` reader - Subregion 18 in region n (write '1' to clear)"] -pub type SR18_R = crate::BitReader; -#[doc = "Subregion 18 in region n (write '1' to clear)\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum SR18_A { - #[doc = "0: No read access occurred in this subregion"] - NO_ACCESS = 0, - #[doc = "1: Read access(es) occurred in this subregion"] - ACCESS = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: SR18_A) -> Self { - variant as u8 != 0 - } -} -impl SR18_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> SR18_A { - match self.bits { - false => SR18_A::NO_ACCESS, - true => SR18_A::ACCESS, - } - } - #[doc = "Checks if the value of the field is `NO_ACCESS`"] - #[inline(always)] - pub fn is_no_access(&self) -> bool { - *self == SR18_A::NO_ACCESS - } - #[doc = "Checks if the value of the field is `ACCESS`"] - #[inline(always)] - pub fn is_access(&self) -> bool { - *self == SR18_A::ACCESS - } -} -#[doc = "Field `SR18` writer - Subregion 18 in region n (write '1' to clear)"] -pub type SR18_W<'a, const O: u8> = crate::BitWriter1C<'a, u32, SUBSTATRA_SPEC, SR18_A, O>; -impl<'a, const O: u8> SR18_W<'a, O> { - #[doc = "No read access occurred in this subregion"] - #[inline(always)] - pub fn no_access(self) -> &'a mut W { - self.variant(SR18_A::NO_ACCESS) - } - #[doc = "Read access(es) occurred in this subregion"] - #[inline(always)] - pub fn access(self) -> &'a mut W { - self.variant(SR18_A::ACCESS) - } -} -#[doc = "Field `SR19` reader - Subregion 19 in region n (write '1' to clear)"] -pub type SR19_R = crate::BitReader; -#[doc = "Subregion 19 in region n (write '1' to clear)\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum SR19_A { - #[doc = "0: No read access occurred in this subregion"] - NO_ACCESS = 0, - #[doc = "1: Read access(es) occurred in this subregion"] - ACCESS = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: SR19_A) -> Self { - variant as u8 != 0 - } -} -impl SR19_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> SR19_A { - match self.bits { - false => SR19_A::NO_ACCESS, - true => SR19_A::ACCESS, - } - } - #[doc = "Checks if the value of the field is `NO_ACCESS`"] - #[inline(always)] - pub fn is_no_access(&self) -> bool { - *self == SR19_A::NO_ACCESS - } - #[doc = "Checks if the value of the field is `ACCESS`"] - #[inline(always)] - pub fn is_access(&self) -> bool { - *self == SR19_A::ACCESS - } -} -#[doc = "Field `SR19` writer - Subregion 19 in region n (write '1' to clear)"] -pub type SR19_W<'a, const O: u8> = crate::BitWriter1C<'a, u32, SUBSTATRA_SPEC, SR19_A, O>; -impl<'a, const O: u8> SR19_W<'a, O> { - #[doc = "No read access occurred in this subregion"] - #[inline(always)] - pub fn no_access(self) -> &'a mut W { - self.variant(SR19_A::NO_ACCESS) - } - #[doc = "Read access(es) occurred in this subregion"] - #[inline(always)] - pub fn access(self) -> &'a mut W { - self.variant(SR19_A::ACCESS) - } -} -#[doc = "Field `SR20` reader - Subregion 20 in region n (write '1' to clear)"] -pub type SR20_R = crate::BitReader; -#[doc = "Subregion 20 in region n (write '1' to clear)\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum SR20_A { - #[doc = "0: No read access occurred in this subregion"] - NO_ACCESS = 0, - #[doc = "1: Read access(es) occurred in this subregion"] - ACCESS = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: SR20_A) -> Self { - variant as u8 != 0 - } -} -impl SR20_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> SR20_A { - match self.bits { - false => SR20_A::NO_ACCESS, - true => SR20_A::ACCESS, - } - } - #[doc = "Checks if the value of the field is `NO_ACCESS`"] - #[inline(always)] - pub fn is_no_access(&self) -> bool { - *self == SR20_A::NO_ACCESS - } - #[doc = "Checks if the value of the field is `ACCESS`"] - #[inline(always)] - pub fn is_access(&self) -> bool { - *self == SR20_A::ACCESS - } -} -#[doc = "Field `SR20` writer - Subregion 20 in region n (write '1' to clear)"] -pub type SR20_W<'a, const O: u8> = crate::BitWriter1C<'a, u32, SUBSTATRA_SPEC, SR20_A, O>; -impl<'a, const O: u8> SR20_W<'a, O> { - #[doc = "No read access occurred in this subregion"] - #[inline(always)] - pub fn no_access(self) -> &'a mut W { - self.variant(SR20_A::NO_ACCESS) - } - #[doc = "Read access(es) occurred in this subregion"] - #[inline(always)] - pub fn access(self) -> &'a mut W { - self.variant(SR20_A::ACCESS) - } -} -#[doc = "Field `SR21` reader - Subregion 21 in region n (write '1' to clear)"] -pub type SR21_R = crate::BitReader; -#[doc = "Subregion 21 in region n (write '1' to clear)\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum SR21_A { - #[doc = "0: No read access occurred in this subregion"] - NO_ACCESS = 0, - #[doc = "1: Read access(es) occurred in this subregion"] - ACCESS = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: SR21_A) -> Self { - variant as u8 != 0 - } -} -impl SR21_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> SR21_A { - match self.bits { - false => SR21_A::NO_ACCESS, - true => SR21_A::ACCESS, - } - } - #[doc = "Checks if the value of the field is `NO_ACCESS`"] - #[inline(always)] - pub fn is_no_access(&self) -> bool { - *self == SR21_A::NO_ACCESS - } - #[doc = "Checks if the value of the field is `ACCESS`"] - #[inline(always)] - pub fn is_access(&self) -> bool { - *self == SR21_A::ACCESS - } -} -#[doc = "Field `SR21` writer - Subregion 21 in region n (write '1' to clear)"] -pub type SR21_W<'a, const O: u8> = crate::BitWriter1C<'a, u32, SUBSTATRA_SPEC, SR21_A, O>; -impl<'a, const O: u8> SR21_W<'a, O> { - #[doc = "No read access occurred in this subregion"] - #[inline(always)] - pub fn no_access(self) -> &'a mut W { - self.variant(SR21_A::NO_ACCESS) - } - #[doc = "Read access(es) occurred in this subregion"] - #[inline(always)] - pub fn access(self) -> &'a mut W { - self.variant(SR21_A::ACCESS) - } -} -#[doc = "Field `SR22` reader - Subregion 22 in region n (write '1' to clear)"] -pub type SR22_R = crate::BitReader; -#[doc = "Subregion 22 in region n (write '1' to clear)\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum SR22_A { - #[doc = "0: No read access occurred in this subregion"] - NO_ACCESS = 0, - #[doc = "1: Read access(es) occurred in this subregion"] - ACCESS = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: SR22_A) -> Self { - variant as u8 != 0 - } -} -impl SR22_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> SR22_A { - match self.bits { - false => SR22_A::NO_ACCESS, - true => SR22_A::ACCESS, - } - } - #[doc = "Checks if the value of the field is `NO_ACCESS`"] - #[inline(always)] - pub fn is_no_access(&self) -> bool { - *self == SR22_A::NO_ACCESS - } - #[doc = "Checks if the value of the field is `ACCESS`"] - #[inline(always)] - pub fn is_access(&self) -> bool { - *self == SR22_A::ACCESS - } -} -#[doc = "Field `SR22` writer - Subregion 22 in region n (write '1' to clear)"] -pub type SR22_W<'a, const O: u8> = crate::BitWriter1C<'a, u32, SUBSTATRA_SPEC, SR22_A, O>; -impl<'a, const O: u8> SR22_W<'a, O> { - #[doc = "No read access occurred in this subregion"] - #[inline(always)] - pub fn no_access(self) -> &'a mut W { - self.variant(SR22_A::NO_ACCESS) - } - #[doc = "Read access(es) occurred in this subregion"] - #[inline(always)] - pub fn access(self) -> &'a mut W { - self.variant(SR22_A::ACCESS) - } -} -#[doc = "Field `SR23` reader - Subregion 23 in region n (write '1' to clear)"] -pub type SR23_R = crate::BitReader; -#[doc = "Subregion 23 in region n (write '1' to clear)\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum SR23_A { - #[doc = "0: No read access occurred in this subregion"] - NO_ACCESS = 0, - #[doc = "1: Read access(es) occurred in this subregion"] - ACCESS = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: SR23_A) -> Self { - variant as u8 != 0 - } -} -impl SR23_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> SR23_A { - match self.bits { - false => SR23_A::NO_ACCESS, - true => SR23_A::ACCESS, - } - } - #[doc = "Checks if the value of the field is `NO_ACCESS`"] - #[inline(always)] - pub fn is_no_access(&self) -> bool { - *self == SR23_A::NO_ACCESS - } - #[doc = "Checks if the value of the field is `ACCESS`"] - #[inline(always)] - pub fn is_access(&self) -> bool { - *self == SR23_A::ACCESS - } -} -#[doc = "Field `SR23` writer - Subregion 23 in region n (write '1' to clear)"] -pub type SR23_W<'a, const O: u8> = crate::BitWriter1C<'a, u32, SUBSTATRA_SPEC, SR23_A, O>; -impl<'a, const O: u8> SR23_W<'a, O> { - #[doc = "No read access occurred in this subregion"] - #[inline(always)] - pub fn no_access(self) -> &'a mut W { - self.variant(SR23_A::NO_ACCESS) - } - #[doc = "Read access(es) occurred in this subregion"] - #[inline(always)] - pub fn access(self) -> &'a mut W { - self.variant(SR23_A::ACCESS) - } -} -#[doc = "Field `SR24` reader - Subregion 24 in region n (write '1' to clear)"] -pub type SR24_R = crate::BitReader; -#[doc = "Subregion 24 in region n (write '1' to clear)\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum SR24_A { - #[doc = "0: No read access occurred in this subregion"] - NO_ACCESS = 0, - #[doc = "1: Read access(es) occurred in this subregion"] - ACCESS = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: SR24_A) -> Self { - variant as u8 != 0 - } -} -impl SR24_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> SR24_A { - match self.bits { - false => SR24_A::NO_ACCESS, - true => SR24_A::ACCESS, - } - } - #[doc = "Checks if the value of the field is `NO_ACCESS`"] - #[inline(always)] - pub fn is_no_access(&self) -> bool { - *self == SR24_A::NO_ACCESS - } - #[doc = "Checks if the value of the field is `ACCESS`"] - #[inline(always)] - pub fn is_access(&self) -> bool { - *self == SR24_A::ACCESS - } -} -#[doc = "Field `SR24` writer - Subregion 24 in region n (write '1' to clear)"] -pub type SR24_W<'a, const O: u8> = crate::BitWriter1C<'a, u32, SUBSTATRA_SPEC, SR24_A, O>; -impl<'a, const O: u8> SR24_W<'a, O> { - #[doc = "No read access occurred in this subregion"] - #[inline(always)] - pub fn no_access(self) -> &'a mut W { - self.variant(SR24_A::NO_ACCESS) - } - #[doc = "Read access(es) occurred in this subregion"] - #[inline(always)] - pub fn access(self) -> &'a mut W { - self.variant(SR24_A::ACCESS) - } -} -#[doc = "Field `SR25` reader - Subregion 25 in region n (write '1' to clear)"] -pub type SR25_R = crate::BitReader; -#[doc = "Subregion 25 in region n (write '1' to clear)\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum SR25_A { - #[doc = "0: No read access occurred in this subregion"] - NO_ACCESS = 0, - #[doc = "1: Read access(es) occurred in this subregion"] - ACCESS = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: SR25_A) -> Self { - variant as u8 != 0 - } -} -impl SR25_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> SR25_A { - match self.bits { - false => SR25_A::NO_ACCESS, - true => SR25_A::ACCESS, - } - } - #[doc = "Checks if the value of the field is `NO_ACCESS`"] - #[inline(always)] - pub fn is_no_access(&self) -> bool { - *self == SR25_A::NO_ACCESS - } - #[doc = "Checks if the value of the field is `ACCESS`"] - #[inline(always)] - pub fn is_access(&self) -> bool { - *self == SR25_A::ACCESS - } -} -#[doc = "Field `SR25` writer - Subregion 25 in region n (write '1' to clear)"] -pub type SR25_W<'a, const O: u8> = crate::BitWriter1C<'a, u32, SUBSTATRA_SPEC, SR25_A, O>; -impl<'a, const O: u8> SR25_W<'a, O> { - #[doc = "No read access occurred in this subregion"] - #[inline(always)] - pub fn no_access(self) -> &'a mut W { - self.variant(SR25_A::NO_ACCESS) - } - #[doc = "Read access(es) occurred in this subregion"] - #[inline(always)] - pub fn access(self) -> &'a mut W { - self.variant(SR25_A::ACCESS) - } -} -#[doc = "Field `SR26` reader - Subregion 26 in region n (write '1' to clear)"] -pub type SR26_R = crate::BitReader; -#[doc = "Subregion 26 in region n (write '1' to clear)\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum SR26_A { - #[doc = "0: No read access occurred in this subregion"] - NO_ACCESS = 0, - #[doc = "1: Read access(es) occurred in this subregion"] - ACCESS = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: SR26_A) -> Self { - variant as u8 != 0 - } -} -impl SR26_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> SR26_A { - match self.bits { - false => SR26_A::NO_ACCESS, - true => SR26_A::ACCESS, - } - } - #[doc = "Checks if the value of the field is `NO_ACCESS`"] - #[inline(always)] - pub fn is_no_access(&self) -> bool { - *self == SR26_A::NO_ACCESS - } - #[doc = "Checks if the value of the field is `ACCESS`"] - #[inline(always)] - pub fn is_access(&self) -> bool { - *self == SR26_A::ACCESS - } -} -#[doc = "Field `SR26` writer - Subregion 26 in region n (write '1' to clear)"] -pub type SR26_W<'a, const O: u8> = crate::BitWriter1C<'a, u32, SUBSTATRA_SPEC, SR26_A, O>; -impl<'a, const O: u8> SR26_W<'a, O> { - #[doc = "No read access occurred in this subregion"] - #[inline(always)] - pub fn no_access(self) -> &'a mut W { - self.variant(SR26_A::NO_ACCESS) - } - #[doc = "Read access(es) occurred in this subregion"] - #[inline(always)] - pub fn access(self) -> &'a mut W { - self.variant(SR26_A::ACCESS) - } -} -#[doc = "Field `SR27` reader - Subregion 27 in region n (write '1' to clear)"] -pub type SR27_R = crate::BitReader; -#[doc = "Subregion 27 in region n (write '1' to clear)\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum SR27_A { - #[doc = "0: No read access occurred in this subregion"] - NO_ACCESS = 0, - #[doc = "1: Read access(es) occurred in this subregion"] - ACCESS = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: SR27_A) -> Self { - variant as u8 != 0 - } -} -impl SR27_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> SR27_A { - match self.bits { - false => SR27_A::NO_ACCESS, - true => SR27_A::ACCESS, - } - } - #[doc = "Checks if the value of the field is `NO_ACCESS`"] - #[inline(always)] - pub fn is_no_access(&self) -> bool { - *self == SR27_A::NO_ACCESS - } - #[doc = "Checks if the value of the field is `ACCESS`"] - #[inline(always)] - pub fn is_access(&self) -> bool { - *self == SR27_A::ACCESS - } -} -#[doc = "Field `SR27` writer - Subregion 27 in region n (write '1' to clear)"] -pub type SR27_W<'a, const O: u8> = crate::BitWriter1C<'a, u32, SUBSTATRA_SPEC, SR27_A, O>; -impl<'a, const O: u8> SR27_W<'a, O> { - #[doc = "No read access occurred in this subregion"] - #[inline(always)] - pub fn no_access(self) -> &'a mut W { - self.variant(SR27_A::NO_ACCESS) - } - #[doc = "Read access(es) occurred in this subregion"] - #[inline(always)] - pub fn access(self) -> &'a mut W { - self.variant(SR27_A::ACCESS) - } -} -#[doc = "Field `SR28` reader - Subregion 28 in region n (write '1' to clear)"] -pub type SR28_R = crate::BitReader; -#[doc = "Subregion 28 in region n (write '1' to clear)\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum SR28_A { - #[doc = "0: No read access occurred in this subregion"] - NO_ACCESS = 0, - #[doc = "1: Read access(es) occurred in this subregion"] - ACCESS = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: SR28_A) -> Self { - variant as u8 != 0 - } -} -impl SR28_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> SR28_A { - match self.bits { - false => SR28_A::NO_ACCESS, - true => SR28_A::ACCESS, - } - } - #[doc = "Checks if the value of the field is `NO_ACCESS`"] - #[inline(always)] - pub fn is_no_access(&self) -> bool { - *self == SR28_A::NO_ACCESS - } - #[doc = "Checks if the value of the field is `ACCESS`"] - #[inline(always)] - pub fn is_access(&self) -> bool { - *self == SR28_A::ACCESS - } -} -#[doc = "Field `SR28` writer - Subregion 28 in region n (write '1' to clear)"] -pub type SR28_W<'a, const O: u8> = crate::BitWriter1C<'a, u32, SUBSTATRA_SPEC, SR28_A, O>; -impl<'a, const O: u8> SR28_W<'a, O> { - #[doc = "No read access occurred in this subregion"] - #[inline(always)] - pub fn no_access(self) -> &'a mut W { - self.variant(SR28_A::NO_ACCESS) - } - #[doc = "Read access(es) occurred in this subregion"] - #[inline(always)] - pub fn access(self) -> &'a mut W { - self.variant(SR28_A::ACCESS) - } -} -#[doc = "Field `SR29` reader - Subregion 29 in region n (write '1' to clear)"] -pub type SR29_R = crate::BitReader; -#[doc = "Subregion 29 in region n (write '1' to clear)\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum SR29_A { - #[doc = "0: No read access occurred in this subregion"] - NO_ACCESS = 0, - #[doc = "1: Read access(es) occurred in this subregion"] - ACCESS = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: SR29_A) -> Self { - variant as u8 != 0 - } -} -impl SR29_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> SR29_A { - match self.bits { - false => SR29_A::NO_ACCESS, - true => SR29_A::ACCESS, - } - } - #[doc = "Checks if the value of the field is `NO_ACCESS`"] - #[inline(always)] - pub fn is_no_access(&self) -> bool { - *self == SR29_A::NO_ACCESS - } - #[doc = "Checks if the value of the field is `ACCESS`"] - #[inline(always)] - pub fn is_access(&self) -> bool { - *self == SR29_A::ACCESS - } -} -#[doc = "Field `SR29` writer - Subregion 29 in region n (write '1' to clear)"] -pub type SR29_W<'a, const O: u8> = crate::BitWriter1C<'a, u32, SUBSTATRA_SPEC, SR29_A, O>; -impl<'a, const O: u8> SR29_W<'a, O> { - #[doc = "No read access occurred in this subregion"] - #[inline(always)] - pub fn no_access(self) -> &'a mut W { - self.variant(SR29_A::NO_ACCESS) - } - #[doc = "Read access(es) occurred in this subregion"] - #[inline(always)] - pub fn access(self) -> &'a mut W { - self.variant(SR29_A::ACCESS) - } -} -#[doc = "Field `SR30` reader - Subregion 30 in region n (write '1' to clear)"] -pub type SR30_R = crate::BitReader; -#[doc = "Subregion 30 in region n (write '1' to clear)\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum SR30_A { - #[doc = "0: No read access occurred in this subregion"] - NO_ACCESS = 0, - #[doc = "1: Read access(es) occurred in this subregion"] - ACCESS = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: SR30_A) -> Self { - variant as u8 != 0 - } -} -impl SR30_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> SR30_A { - match self.bits { - false => SR30_A::NO_ACCESS, - true => SR30_A::ACCESS, - } - } - #[doc = "Checks if the value of the field is `NO_ACCESS`"] - #[inline(always)] - pub fn is_no_access(&self) -> bool { - *self == SR30_A::NO_ACCESS - } - #[doc = "Checks if the value of the field is `ACCESS`"] - #[inline(always)] - pub fn is_access(&self) -> bool { - *self == SR30_A::ACCESS - } -} -#[doc = "Field `SR30` writer - Subregion 30 in region n (write '1' to clear)"] -pub type SR30_W<'a, const O: u8> = crate::BitWriter1C<'a, u32, SUBSTATRA_SPEC, SR30_A, O>; -impl<'a, const O: u8> SR30_W<'a, O> { - #[doc = "No read access occurred in this subregion"] - #[inline(always)] - pub fn no_access(self) -> &'a mut W { - self.variant(SR30_A::NO_ACCESS) - } - #[doc = "Read access(es) occurred in this subregion"] - #[inline(always)] - pub fn access(self) -> &'a mut W { - self.variant(SR30_A::ACCESS) - } -} -#[doc = "Field `SR31` reader - Subregion 31 in region n (write '1' to clear)"] -pub type SR31_R = crate::BitReader; -#[doc = "Subregion 31 in region n (write '1' to clear)\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum SR31_A { - #[doc = "0: No read access occurred in this subregion"] - NO_ACCESS = 0, - #[doc = "1: Read access(es) occurred in this subregion"] - ACCESS = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: SR31_A) -> Self { - variant as u8 != 0 - } -} -impl SR31_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> SR31_A { - match self.bits { - false => SR31_A::NO_ACCESS, - true => SR31_A::ACCESS, - } - } - #[doc = "Checks if the value of the field is `NO_ACCESS`"] - #[inline(always)] - pub fn is_no_access(&self) -> bool { - *self == SR31_A::NO_ACCESS - } - #[doc = "Checks if the value of the field is `ACCESS`"] - #[inline(always)] - pub fn is_access(&self) -> bool { - *self == SR31_A::ACCESS - } -} -#[doc = "Field `SR31` writer - Subregion 31 in region n (write '1' to clear)"] -pub type SR31_W<'a, const O: u8> = crate::BitWriter1C<'a, u32, SUBSTATRA_SPEC, SR31_A, O>; -impl<'a, const O: u8> SR31_W<'a, O> { - #[doc = "No read access occurred in this subregion"] - #[inline(always)] - pub fn no_access(self) -> &'a mut W { - self.variant(SR31_A::NO_ACCESS) - } - #[doc = "Read access(es) occurred in this subregion"] - #[inline(always)] - pub fn access(self) -> &'a mut W { - self.variant(SR31_A::ACCESS) - } -} -impl R { - #[doc = "Bit 0 - Subregion 0 in region n (write '1' to clear)"] - #[inline(always)] - pub fn sr0(&self) -> SR0_R { - SR0_R::new((self.bits & 1) != 0) - } - #[doc = "Bit 1 - Subregion 1 in region n (write '1' to clear)"] - #[inline(always)] - pub fn sr1(&self) -> SR1_R { - SR1_R::new(((self.bits >> 1) & 1) != 0) - } - #[doc = "Bit 2 - Subregion 2 in region n (write '1' to clear)"] - #[inline(always)] - pub fn sr2(&self) -> SR2_R { - SR2_R::new(((self.bits >> 2) & 1) != 0) - } - #[doc = "Bit 3 - Subregion 3 in region n (write '1' to clear)"] - #[inline(always)] - pub fn sr3(&self) -> SR3_R { - SR3_R::new(((self.bits >> 3) & 1) != 0) - } - #[doc = "Bit 4 - Subregion 4 in region n (write '1' to clear)"] - #[inline(always)] - pub fn sr4(&self) -> SR4_R { - SR4_R::new(((self.bits >> 4) & 1) != 0) - } - #[doc = "Bit 5 - Subregion 5 in region n (write '1' to clear)"] - #[inline(always)] - pub fn sr5(&self) -> SR5_R { - SR5_R::new(((self.bits >> 5) & 1) != 0) - } - #[doc = "Bit 6 - Subregion 6 in region n (write '1' to clear)"] - #[inline(always)] - pub fn sr6(&self) -> SR6_R { - SR6_R::new(((self.bits >> 6) & 1) != 0) - } - #[doc = "Bit 7 - Subregion 7 in region n (write '1' to clear)"] - #[inline(always)] - pub fn sr7(&self) -> SR7_R { - SR7_R::new(((self.bits >> 7) & 1) != 0) - } - #[doc = "Bit 8 - Subregion 8 in region n (write '1' to clear)"] - #[inline(always)] - pub fn sr8(&self) -> SR8_R { - SR8_R::new(((self.bits >> 8) & 1) != 0) - } - #[doc = "Bit 9 - Subregion 9 in region n (write '1' to clear)"] - #[inline(always)] - pub fn sr9(&self) -> SR9_R { - SR9_R::new(((self.bits >> 9) & 1) != 0) - } - #[doc = "Bit 10 - Subregion 10 in region n (write '1' to clear)"] - #[inline(always)] - pub fn sr10(&self) -> SR10_R { - SR10_R::new(((self.bits >> 10) & 1) != 0) - } - #[doc = "Bit 11 - Subregion 11 in region n (write '1' to clear)"] - #[inline(always)] - pub fn sr11(&self) -> SR11_R { - SR11_R::new(((self.bits >> 11) & 1) != 0) - } - #[doc = "Bit 12 - Subregion 12 in region n (write '1' to clear)"] - #[inline(always)] - pub fn sr12(&self) -> SR12_R { - SR12_R::new(((self.bits >> 12) & 1) != 0) - } - #[doc = "Bit 13 - Subregion 13 in region n (write '1' to clear)"] - #[inline(always)] - pub fn sr13(&self) -> SR13_R { - SR13_R::new(((self.bits >> 13) & 1) != 0) - } - #[doc = "Bit 14 - Subregion 14 in region n (write '1' to clear)"] - #[inline(always)] - pub fn sr14(&self) -> SR14_R { - SR14_R::new(((self.bits >> 14) & 1) != 0) - } - #[doc = "Bit 15 - Subregion 15 in region n (write '1' to clear)"] - #[inline(always)] - pub fn sr15(&self) -> SR15_R { - SR15_R::new(((self.bits >> 15) & 1) != 0) - } - #[doc = "Bit 16 - Subregion 16 in region n (write '1' to clear)"] - #[inline(always)] - pub fn sr16(&self) -> SR16_R { - SR16_R::new(((self.bits >> 16) & 1) != 0) - } - #[doc = "Bit 17 - Subregion 17 in region n (write '1' to clear)"] - #[inline(always)] - pub fn sr17(&self) -> SR17_R { - SR17_R::new(((self.bits >> 17) & 1) != 0) - } - #[doc = "Bit 18 - Subregion 18 in region n (write '1' to clear)"] - #[inline(always)] - pub fn sr18(&self) -> SR18_R { - SR18_R::new(((self.bits >> 18) & 1) != 0) - } - #[doc = "Bit 19 - Subregion 19 in region n (write '1' to clear)"] - #[inline(always)] - pub fn sr19(&self) -> SR19_R { - SR19_R::new(((self.bits >> 19) & 1) != 0) - } - #[doc = "Bit 20 - Subregion 20 in region n (write '1' to clear)"] - #[inline(always)] - pub fn sr20(&self) -> SR20_R { - SR20_R::new(((self.bits >> 20) & 1) != 0) - } - #[doc = "Bit 21 - Subregion 21 in region n (write '1' to clear)"] - #[inline(always)] - pub fn sr21(&self) -> SR21_R { - SR21_R::new(((self.bits >> 21) & 1) != 0) - } - #[doc = "Bit 22 - Subregion 22 in region n (write '1' to clear)"] - #[inline(always)] - pub fn sr22(&self) -> SR22_R { - SR22_R::new(((self.bits >> 22) & 1) != 0) - } - #[doc = "Bit 23 - Subregion 23 in region n (write '1' to clear)"] - #[inline(always)] - pub fn sr23(&self) -> SR23_R { - SR23_R::new(((self.bits >> 23) & 1) != 0) - } - #[doc = "Bit 24 - Subregion 24 in region n (write '1' to clear)"] - #[inline(always)] - pub fn sr24(&self) -> SR24_R { - SR24_R::new(((self.bits >> 24) & 1) != 0) - } - #[doc = "Bit 25 - Subregion 25 in region n (write '1' to clear)"] - #[inline(always)] - pub fn sr25(&self) -> SR25_R { - SR25_R::new(((self.bits >> 25) & 1) != 0) - } - #[doc = "Bit 26 - Subregion 26 in region n (write '1' to clear)"] - #[inline(always)] - pub fn sr26(&self) -> SR26_R { - SR26_R::new(((self.bits >> 26) & 1) != 0) - } - #[doc = "Bit 27 - Subregion 27 in region n (write '1' to clear)"] - #[inline(always)] - pub fn sr27(&self) -> SR27_R { - SR27_R::new(((self.bits >> 27) & 1) != 0) - } - #[doc = "Bit 28 - Subregion 28 in region n (write '1' to clear)"] - #[inline(always)] - pub fn sr28(&self) -> SR28_R { - SR28_R::new(((self.bits >> 28) & 1) != 0) - } - #[doc = "Bit 29 - Subregion 29 in region n (write '1' to clear)"] - #[inline(always)] - pub fn sr29(&self) -> SR29_R { - SR29_R::new(((self.bits >> 29) & 1) != 0) - } - #[doc = "Bit 30 - Subregion 30 in region n (write '1' to clear)"] - #[inline(always)] - pub fn sr30(&self) -> SR30_R { - SR30_R::new(((self.bits >> 30) & 1) != 0) - } - #[doc = "Bit 31 - Subregion 31 in region n (write '1' to clear)"] - #[inline(always)] - pub fn sr31(&self) -> SR31_R { - SR31_R::new(((self.bits >> 31) & 1) != 0) - } -} -impl W { - #[doc = "Bit 0 - Subregion 0 in region n (write '1' to clear)"] - #[inline(always)] - #[must_use] - pub fn sr0(&mut self) -> SR0_W<0> { - SR0_W::new(self) - } - #[doc = "Bit 1 - Subregion 1 in region n (write '1' to clear)"] - #[inline(always)] - #[must_use] - pub fn sr1(&mut self) -> SR1_W<1> { - SR1_W::new(self) - } - #[doc = "Bit 2 - Subregion 2 in region n (write '1' to clear)"] - #[inline(always)] - #[must_use] - pub fn sr2(&mut self) -> SR2_W<2> { - SR2_W::new(self) - } - #[doc = "Bit 3 - Subregion 3 in region n (write '1' to clear)"] - #[inline(always)] - #[must_use] - pub fn sr3(&mut self) -> SR3_W<3> { - SR3_W::new(self) - } - #[doc = "Bit 4 - Subregion 4 in region n (write '1' to clear)"] - #[inline(always)] - #[must_use] - pub fn sr4(&mut self) -> SR4_W<4> { - SR4_W::new(self) - } - #[doc = "Bit 5 - Subregion 5 in region n (write '1' to clear)"] - #[inline(always)] - #[must_use] - pub fn sr5(&mut self) -> SR5_W<5> { - SR5_W::new(self) - } - #[doc = "Bit 6 - Subregion 6 in region n (write '1' to clear)"] - #[inline(always)] - #[must_use] - pub fn sr6(&mut self) -> SR6_W<6> { - SR6_W::new(self) - } - #[doc = "Bit 7 - Subregion 7 in region n (write '1' to clear)"] - #[inline(always)] - #[must_use] - pub fn sr7(&mut self) -> SR7_W<7> { - SR7_W::new(self) - } - #[doc = "Bit 8 - Subregion 8 in region n (write '1' to clear)"] - #[inline(always)] - #[must_use] - pub fn sr8(&mut self) -> SR8_W<8> { - SR8_W::new(self) - } - #[doc = "Bit 9 - Subregion 9 in region n (write '1' to clear)"] - #[inline(always)] - #[must_use] - pub fn sr9(&mut self) -> SR9_W<9> { - SR9_W::new(self) - } - #[doc = "Bit 10 - Subregion 10 in region n (write '1' to clear)"] - #[inline(always)] - #[must_use] - pub fn sr10(&mut self) -> SR10_W<10> { - SR10_W::new(self) - } - #[doc = "Bit 11 - Subregion 11 in region n (write '1' to clear)"] - #[inline(always)] - #[must_use] - pub fn sr11(&mut self) -> SR11_W<11> { - SR11_W::new(self) - } - #[doc = "Bit 12 - Subregion 12 in region n (write '1' to clear)"] - #[inline(always)] - #[must_use] - pub fn sr12(&mut self) -> SR12_W<12> { - SR12_W::new(self) - } - #[doc = "Bit 13 - Subregion 13 in region n (write '1' to clear)"] - #[inline(always)] - #[must_use] - pub fn sr13(&mut self) -> SR13_W<13> { - SR13_W::new(self) - } - #[doc = "Bit 14 - Subregion 14 in region n (write '1' to clear)"] - #[inline(always)] - #[must_use] - pub fn sr14(&mut self) -> SR14_W<14> { - SR14_W::new(self) - } - #[doc = "Bit 15 - Subregion 15 in region n (write '1' to clear)"] - #[inline(always)] - #[must_use] - pub fn sr15(&mut self) -> SR15_W<15> { - SR15_W::new(self) - } - #[doc = "Bit 16 - Subregion 16 in region n (write '1' to clear)"] - #[inline(always)] - #[must_use] - pub fn sr16(&mut self) -> SR16_W<16> { - SR16_W::new(self) - } - #[doc = "Bit 17 - Subregion 17 in region n (write '1' to clear)"] - #[inline(always)] - #[must_use] - pub fn sr17(&mut self) -> SR17_W<17> { - SR17_W::new(self) - } - #[doc = "Bit 18 - Subregion 18 in region n (write '1' to clear)"] - #[inline(always)] - #[must_use] - pub fn sr18(&mut self) -> SR18_W<18> { - SR18_W::new(self) - } - #[doc = "Bit 19 - Subregion 19 in region n (write '1' to clear)"] - #[inline(always)] - #[must_use] - pub fn sr19(&mut self) -> SR19_W<19> { - SR19_W::new(self) - } - #[doc = "Bit 20 - Subregion 20 in region n (write '1' to clear)"] - #[inline(always)] - #[must_use] - pub fn sr20(&mut self) -> SR20_W<20> { - SR20_W::new(self) - } - #[doc = "Bit 21 - Subregion 21 in region n (write '1' to clear)"] - #[inline(always)] - #[must_use] - pub fn sr21(&mut self) -> SR21_W<21> { - SR21_W::new(self) - } - #[doc = "Bit 22 - Subregion 22 in region n (write '1' to clear)"] - #[inline(always)] - #[must_use] - pub fn sr22(&mut self) -> SR22_W<22> { - SR22_W::new(self) - } - #[doc = "Bit 23 - Subregion 23 in region n (write '1' to clear)"] - #[inline(always)] - #[must_use] - pub fn sr23(&mut self) -> SR23_W<23> { - SR23_W::new(self) - } - #[doc = "Bit 24 - Subregion 24 in region n (write '1' to clear)"] - #[inline(always)] - #[must_use] - pub fn sr24(&mut self) -> SR24_W<24> { - SR24_W::new(self) - } - #[doc = "Bit 25 - Subregion 25 in region n (write '1' to clear)"] - #[inline(always)] - #[must_use] - pub fn sr25(&mut self) -> SR25_W<25> { - SR25_W::new(self) - } - #[doc = "Bit 26 - Subregion 26 in region n (write '1' to clear)"] - #[inline(always)] - #[must_use] - pub fn sr26(&mut self) -> SR26_W<26> { - SR26_W::new(self) - } - #[doc = "Bit 27 - Subregion 27 in region n (write '1' to clear)"] - #[inline(always)] - #[must_use] - pub fn sr27(&mut self) -> SR27_W<27> { - SR27_W::new(self) - } - #[doc = "Bit 28 - Subregion 28 in region n (write '1' to clear)"] - #[inline(always)] - #[must_use] - pub fn sr28(&mut self) -> SR28_W<28> { - SR28_W::new(self) - } - #[doc = "Bit 29 - Subregion 29 in region n (write '1' to clear)"] - #[inline(always)] - #[must_use] - pub fn sr29(&mut self) -> SR29_W<29> { - SR29_W::new(self) - } - #[doc = "Bit 30 - Subregion 30 in region n (write '1' to clear)"] - #[inline(always)] - #[must_use] - pub fn sr30(&mut self) -> SR30_W<30> { - SR30_W::new(self) - } - #[doc = "Bit 31 - Subregion 31 in region n (write '1' to clear)"] - #[inline(always)] - #[must_use] - pub fn sr31(&mut self) -> SR31_W<31> { - SR31_W::new(self) - } - #[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 = "Description cluster: Source of event/interrupt in region n, read access detected while corresponding subregion was enabled for watching\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 [substatra](index.html) module"] -pub struct SUBSTATRA_SPEC; -impl crate::RegisterSpec for SUBSTATRA_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [substatra::R](R) reader structure"] -impl crate::Readable for SUBSTATRA_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [substatra::W](W) writer structure"] -impl crate::Writable for SUBSTATRA_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0xffff_ffff; -} -#[doc = "`reset()` method sets SUBSTATRA to value 0"] -impl crate::Resettable for SUBSTATRA_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/mwu/perregion/substatwa.rs b/down-the-stack/dk_pac/src/mwu/perregion/substatwa.rs deleted file mode 100644 index 24e50c8..0000000 --- a/down-the-stack/dk_pac/src/mwu/perregion/substatwa.rs +++ /dev/null @@ -1,2017 +0,0 @@ -#[doc = "Register `SUBSTATWA` 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 `SUBSTATWA` 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 `SR0` reader - Subregion 0 in region n (write '1' to clear)"] -pub type SR0_R = crate::BitReader; -#[doc = "Subregion 0 in region n (write '1' to clear)\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum SR0_A { - #[doc = "0: No write access occurred in this subregion"] - NO_ACCESS = 0, - #[doc = "1: Write access(es) occurred in this subregion"] - ACCESS = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: SR0_A) -> Self { - variant as u8 != 0 - } -} -impl SR0_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> SR0_A { - match self.bits { - false => SR0_A::NO_ACCESS, - true => SR0_A::ACCESS, - } - } - #[doc = "Checks if the value of the field is `NO_ACCESS`"] - #[inline(always)] - pub fn is_no_access(&self) -> bool { - *self == SR0_A::NO_ACCESS - } - #[doc = "Checks if the value of the field is `ACCESS`"] - #[inline(always)] - pub fn is_access(&self) -> bool { - *self == SR0_A::ACCESS - } -} -#[doc = "Field `SR0` writer - Subregion 0 in region n (write '1' to clear)"] -pub type SR0_W<'a, const O: u8> = crate::BitWriter1C<'a, u32, SUBSTATWA_SPEC, SR0_A, O>; -impl<'a, const O: u8> SR0_W<'a, O> { - #[doc = "No write access occurred in this subregion"] - #[inline(always)] - pub fn no_access(self) -> &'a mut W { - self.variant(SR0_A::NO_ACCESS) - } - #[doc = "Write access(es) occurred in this subregion"] - #[inline(always)] - pub fn access(self) -> &'a mut W { - self.variant(SR0_A::ACCESS) - } -} -#[doc = "Field `SR1` reader - Subregion 1 in region n (write '1' to clear)"] -pub type SR1_R = crate::BitReader; -#[doc = "Subregion 1 in region n (write '1' to clear)\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum SR1_A { - #[doc = "0: No write access occurred in this subregion"] - NO_ACCESS = 0, - #[doc = "1: Write access(es) occurred in this subregion"] - ACCESS = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: SR1_A) -> Self { - variant as u8 != 0 - } -} -impl SR1_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> SR1_A { - match self.bits { - false => SR1_A::NO_ACCESS, - true => SR1_A::ACCESS, - } - } - #[doc = "Checks if the value of the field is `NO_ACCESS`"] - #[inline(always)] - pub fn is_no_access(&self) -> bool { - *self == SR1_A::NO_ACCESS - } - #[doc = "Checks if the value of the field is `ACCESS`"] - #[inline(always)] - pub fn is_access(&self) -> bool { - *self == SR1_A::ACCESS - } -} -#[doc = "Field `SR1` writer - Subregion 1 in region n (write '1' to clear)"] -pub type SR1_W<'a, const O: u8> = crate::BitWriter1C<'a, u32, SUBSTATWA_SPEC, SR1_A, O>; -impl<'a, const O: u8> SR1_W<'a, O> { - #[doc = "No write access occurred in this subregion"] - #[inline(always)] - pub fn no_access(self) -> &'a mut W { - self.variant(SR1_A::NO_ACCESS) - } - #[doc = "Write access(es) occurred in this subregion"] - #[inline(always)] - pub fn access(self) -> &'a mut W { - self.variant(SR1_A::ACCESS) - } -} -#[doc = "Field `SR2` reader - Subregion 2 in region n (write '1' to clear)"] -pub type SR2_R = crate::BitReader; -#[doc = "Subregion 2 in region n (write '1' to clear)\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum SR2_A { - #[doc = "0: No write access occurred in this subregion"] - NO_ACCESS = 0, - #[doc = "1: Write access(es) occurred in this subregion"] - ACCESS = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: SR2_A) -> Self { - variant as u8 != 0 - } -} -impl SR2_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> SR2_A { - match self.bits { - false => SR2_A::NO_ACCESS, - true => SR2_A::ACCESS, - } - } - #[doc = "Checks if the value of the field is `NO_ACCESS`"] - #[inline(always)] - pub fn is_no_access(&self) -> bool { - *self == SR2_A::NO_ACCESS - } - #[doc = "Checks if the value of the field is `ACCESS`"] - #[inline(always)] - pub fn is_access(&self) -> bool { - *self == SR2_A::ACCESS - } -} -#[doc = "Field `SR2` writer - Subregion 2 in region n (write '1' to clear)"] -pub type SR2_W<'a, const O: u8> = crate::BitWriter1C<'a, u32, SUBSTATWA_SPEC, SR2_A, O>; -impl<'a, const O: u8> SR2_W<'a, O> { - #[doc = "No write access occurred in this subregion"] - #[inline(always)] - pub fn no_access(self) -> &'a mut W { - self.variant(SR2_A::NO_ACCESS) - } - #[doc = "Write access(es) occurred in this subregion"] - #[inline(always)] - pub fn access(self) -> &'a mut W { - self.variant(SR2_A::ACCESS) - } -} -#[doc = "Field `SR3` reader - Subregion 3 in region n (write '1' to clear)"] -pub type SR3_R = crate::BitReader; -#[doc = "Subregion 3 in region n (write '1' to clear)\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum SR3_A { - #[doc = "0: No write access occurred in this subregion"] - NO_ACCESS = 0, - #[doc = "1: Write access(es) occurred in this subregion"] - ACCESS = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: SR3_A) -> Self { - variant as u8 != 0 - } -} -impl SR3_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> SR3_A { - match self.bits { - false => SR3_A::NO_ACCESS, - true => SR3_A::ACCESS, - } - } - #[doc = "Checks if the value of the field is `NO_ACCESS`"] - #[inline(always)] - pub fn is_no_access(&self) -> bool { - *self == SR3_A::NO_ACCESS - } - #[doc = "Checks if the value of the field is `ACCESS`"] - #[inline(always)] - pub fn is_access(&self) -> bool { - *self == SR3_A::ACCESS - } -} -#[doc = "Field `SR3` writer - Subregion 3 in region n (write '1' to clear)"] -pub type SR3_W<'a, const O: u8> = crate::BitWriter1C<'a, u32, SUBSTATWA_SPEC, SR3_A, O>; -impl<'a, const O: u8> SR3_W<'a, O> { - #[doc = "No write access occurred in this subregion"] - #[inline(always)] - pub fn no_access(self) -> &'a mut W { - self.variant(SR3_A::NO_ACCESS) - } - #[doc = "Write access(es) occurred in this subregion"] - #[inline(always)] - pub fn access(self) -> &'a mut W { - self.variant(SR3_A::ACCESS) - } -} -#[doc = "Field `SR4` reader - Subregion 4 in region n (write '1' to clear)"] -pub type SR4_R = crate::BitReader; -#[doc = "Subregion 4 in region n (write '1' to clear)\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum SR4_A { - #[doc = "0: No write access occurred in this subregion"] - NO_ACCESS = 0, - #[doc = "1: Write access(es) occurred in this subregion"] - ACCESS = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: SR4_A) -> Self { - variant as u8 != 0 - } -} -impl SR4_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> SR4_A { - match self.bits { - false => SR4_A::NO_ACCESS, - true => SR4_A::ACCESS, - } - } - #[doc = "Checks if the value of the field is `NO_ACCESS`"] - #[inline(always)] - pub fn is_no_access(&self) -> bool { - *self == SR4_A::NO_ACCESS - } - #[doc = "Checks if the value of the field is `ACCESS`"] - #[inline(always)] - pub fn is_access(&self) -> bool { - *self == SR4_A::ACCESS - } -} -#[doc = "Field `SR4` writer - Subregion 4 in region n (write '1' to clear)"] -pub type SR4_W<'a, const O: u8> = crate::BitWriter1C<'a, u32, SUBSTATWA_SPEC, SR4_A, O>; -impl<'a, const O: u8> SR4_W<'a, O> { - #[doc = "No write access occurred in this subregion"] - #[inline(always)] - pub fn no_access(self) -> &'a mut W { - self.variant(SR4_A::NO_ACCESS) - } - #[doc = "Write access(es) occurred in this subregion"] - #[inline(always)] - pub fn access(self) -> &'a mut W { - self.variant(SR4_A::ACCESS) - } -} -#[doc = "Field `SR5` reader - Subregion 5 in region n (write '1' to clear)"] -pub type SR5_R = crate::BitReader; -#[doc = "Subregion 5 in region n (write '1' to clear)\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum SR5_A { - #[doc = "0: No write access occurred in this subregion"] - NO_ACCESS = 0, - #[doc = "1: Write access(es) occurred in this subregion"] - ACCESS = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: SR5_A) -> Self { - variant as u8 != 0 - } -} -impl SR5_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> SR5_A { - match self.bits { - false => SR5_A::NO_ACCESS, - true => SR5_A::ACCESS, - } - } - #[doc = "Checks if the value of the field is `NO_ACCESS`"] - #[inline(always)] - pub fn is_no_access(&self) -> bool { - *self == SR5_A::NO_ACCESS - } - #[doc = "Checks if the value of the field is `ACCESS`"] - #[inline(always)] - pub fn is_access(&self) -> bool { - *self == SR5_A::ACCESS - } -} -#[doc = "Field `SR5` writer - Subregion 5 in region n (write '1' to clear)"] -pub type SR5_W<'a, const O: u8> = crate::BitWriter1C<'a, u32, SUBSTATWA_SPEC, SR5_A, O>; -impl<'a, const O: u8> SR5_W<'a, O> { - #[doc = "No write access occurred in this subregion"] - #[inline(always)] - pub fn no_access(self) -> &'a mut W { - self.variant(SR5_A::NO_ACCESS) - } - #[doc = "Write access(es) occurred in this subregion"] - #[inline(always)] - pub fn access(self) -> &'a mut W { - self.variant(SR5_A::ACCESS) - } -} -#[doc = "Field `SR6` reader - Subregion 6 in region n (write '1' to clear)"] -pub type SR6_R = crate::BitReader; -#[doc = "Subregion 6 in region n (write '1' to clear)\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum SR6_A { - #[doc = "0: No write access occurred in this subregion"] - NO_ACCESS = 0, - #[doc = "1: Write access(es) occurred in this subregion"] - ACCESS = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: SR6_A) -> Self { - variant as u8 != 0 - } -} -impl SR6_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> SR6_A { - match self.bits { - false => SR6_A::NO_ACCESS, - true => SR6_A::ACCESS, - } - } - #[doc = "Checks if the value of the field is `NO_ACCESS`"] - #[inline(always)] - pub fn is_no_access(&self) -> bool { - *self == SR6_A::NO_ACCESS - } - #[doc = "Checks if the value of the field is `ACCESS`"] - #[inline(always)] - pub fn is_access(&self) -> bool { - *self == SR6_A::ACCESS - } -} -#[doc = "Field `SR6` writer - Subregion 6 in region n (write '1' to clear)"] -pub type SR6_W<'a, const O: u8> = crate::BitWriter1C<'a, u32, SUBSTATWA_SPEC, SR6_A, O>; -impl<'a, const O: u8> SR6_W<'a, O> { - #[doc = "No write access occurred in this subregion"] - #[inline(always)] - pub fn no_access(self) -> &'a mut W { - self.variant(SR6_A::NO_ACCESS) - } - #[doc = "Write access(es) occurred in this subregion"] - #[inline(always)] - pub fn access(self) -> &'a mut W { - self.variant(SR6_A::ACCESS) - } -} -#[doc = "Field `SR7` reader - Subregion 7 in region n (write '1' to clear)"] -pub type SR7_R = crate::BitReader; -#[doc = "Subregion 7 in region n (write '1' to clear)\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum SR7_A { - #[doc = "0: No write access occurred in this subregion"] - NO_ACCESS = 0, - #[doc = "1: Write access(es) occurred in this subregion"] - ACCESS = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: SR7_A) -> Self { - variant as u8 != 0 - } -} -impl SR7_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> SR7_A { - match self.bits { - false => SR7_A::NO_ACCESS, - true => SR7_A::ACCESS, - } - } - #[doc = "Checks if the value of the field is `NO_ACCESS`"] - #[inline(always)] - pub fn is_no_access(&self) -> bool { - *self == SR7_A::NO_ACCESS - } - #[doc = "Checks if the value of the field is `ACCESS`"] - #[inline(always)] - pub fn is_access(&self) -> bool { - *self == SR7_A::ACCESS - } -} -#[doc = "Field `SR7` writer - Subregion 7 in region n (write '1' to clear)"] -pub type SR7_W<'a, const O: u8> = crate::BitWriter1C<'a, u32, SUBSTATWA_SPEC, SR7_A, O>; -impl<'a, const O: u8> SR7_W<'a, O> { - #[doc = "No write access occurred in this subregion"] - #[inline(always)] - pub fn no_access(self) -> &'a mut W { - self.variant(SR7_A::NO_ACCESS) - } - #[doc = "Write access(es) occurred in this subregion"] - #[inline(always)] - pub fn access(self) -> &'a mut W { - self.variant(SR7_A::ACCESS) - } -} -#[doc = "Field `SR8` reader - Subregion 8 in region n (write '1' to clear)"] -pub type SR8_R = crate::BitReader; -#[doc = "Subregion 8 in region n (write '1' to clear)\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum SR8_A { - #[doc = "0: No write access occurred in this subregion"] - NO_ACCESS = 0, - #[doc = "1: Write access(es) occurred in this subregion"] - ACCESS = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: SR8_A) -> Self { - variant as u8 != 0 - } -} -impl SR8_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> SR8_A { - match self.bits { - false => SR8_A::NO_ACCESS, - true => SR8_A::ACCESS, - } - } - #[doc = "Checks if the value of the field is `NO_ACCESS`"] - #[inline(always)] - pub fn is_no_access(&self) -> bool { - *self == SR8_A::NO_ACCESS - } - #[doc = "Checks if the value of the field is `ACCESS`"] - #[inline(always)] - pub fn is_access(&self) -> bool { - *self == SR8_A::ACCESS - } -} -#[doc = "Field `SR8` writer - Subregion 8 in region n (write '1' to clear)"] -pub type SR8_W<'a, const O: u8> = crate::BitWriter1C<'a, u32, SUBSTATWA_SPEC, SR8_A, O>; -impl<'a, const O: u8> SR8_W<'a, O> { - #[doc = "No write access occurred in this subregion"] - #[inline(always)] - pub fn no_access(self) -> &'a mut W { - self.variant(SR8_A::NO_ACCESS) - } - #[doc = "Write access(es) occurred in this subregion"] - #[inline(always)] - pub fn access(self) -> &'a mut W { - self.variant(SR8_A::ACCESS) - } -} -#[doc = "Field `SR9` reader - Subregion 9 in region n (write '1' to clear)"] -pub type SR9_R = crate::BitReader; -#[doc = "Subregion 9 in region n (write '1' to clear)\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum SR9_A { - #[doc = "0: No write access occurred in this subregion"] - NO_ACCESS = 0, - #[doc = "1: Write access(es) occurred in this subregion"] - ACCESS = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: SR9_A) -> Self { - variant as u8 != 0 - } -} -impl SR9_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> SR9_A { - match self.bits { - false => SR9_A::NO_ACCESS, - true => SR9_A::ACCESS, - } - } - #[doc = "Checks if the value of the field is `NO_ACCESS`"] - #[inline(always)] - pub fn is_no_access(&self) -> bool { - *self == SR9_A::NO_ACCESS - } - #[doc = "Checks if the value of the field is `ACCESS`"] - #[inline(always)] - pub fn is_access(&self) -> bool { - *self == SR9_A::ACCESS - } -} -#[doc = "Field `SR9` writer - Subregion 9 in region n (write '1' to clear)"] -pub type SR9_W<'a, const O: u8> = crate::BitWriter1C<'a, u32, SUBSTATWA_SPEC, SR9_A, O>; -impl<'a, const O: u8> SR9_W<'a, O> { - #[doc = "No write access occurred in this subregion"] - #[inline(always)] - pub fn no_access(self) -> &'a mut W { - self.variant(SR9_A::NO_ACCESS) - } - #[doc = "Write access(es) occurred in this subregion"] - #[inline(always)] - pub fn access(self) -> &'a mut W { - self.variant(SR9_A::ACCESS) - } -} -#[doc = "Field `SR10` reader - Subregion 10 in region n (write '1' to clear)"] -pub type SR10_R = crate::BitReader; -#[doc = "Subregion 10 in region n (write '1' to clear)\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum SR10_A { - #[doc = "0: No write access occurred in this subregion"] - NO_ACCESS = 0, - #[doc = "1: Write access(es) occurred in this subregion"] - ACCESS = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: SR10_A) -> Self { - variant as u8 != 0 - } -} -impl SR10_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> SR10_A { - match self.bits { - false => SR10_A::NO_ACCESS, - true => SR10_A::ACCESS, - } - } - #[doc = "Checks if the value of the field is `NO_ACCESS`"] - #[inline(always)] - pub fn is_no_access(&self) -> bool { - *self == SR10_A::NO_ACCESS - } - #[doc = "Checks if the value of the field is `ACCESS`"] - #[inline(always)] - pub fn is_access(&self) -> bool { - *self == SR10_A::ACCESS - } -} -#[doc = "Field `SR10` writer - Subregion 10 in region n (write '1' to clear)"] -pub type SR10_W<'a, const O: u8> = crate::BitWriter1C<'a, u32, SUBSTATWA_SPEC, SR10_A, O>; -impl<'a, const O: u8> SR10_W<'a, O> { - #[doc = "No write access occurred in this subregion"] - #[inline(always)] - pub fn no_access(self) -> &'a mut W { - self.variant(SR10_A::NO_ACCESS) - } - #[doc = "Write access(es) occurred in this subregion"] - #[inline(always)] - pub fn access(self) -> &'a mut W { - self.variant(SR10_A::ACCESS) - } -} -#[doc = "Field `SR11` reader - Subregion 11 in region n (write '1' to clear)"] -pub type SR11_R = crate::BitReader; -#[doc = "Subregion 11 in region n (write '1' to clear)\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum SR11_A { - #[doc = "0: No write access occurred in this subregion"] - NO_ACCESS = 0, - #[doc = "1: Write access(es) occurred in this subregion"] - ACCESS = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: SR11_A) -> Self { - variant as u8 != 0 - } -} -impl SR11_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> SR11_A { - match self.bits { - false => SR11_A::NO_ACCESS, - true => SR11_A::ACCESS, - } - } - #[doc = "Checks if the value of the field is `NO_ACCESS`"] - #[inline(always)] - pub fn is_no_access(&self) -> bool { - *self == SR11_A::NO_ACCESS - } - #[doc = "Checks if the value of the field is `ACCESS`"] - #[inline(always)] - pub fn is_access(&self) -> bool { - *self == SR11_A::ACCESS - } -} -#[doc = "Field `SR11` writer - Subregion 11 in region n (write '1' to clear)"] -pub type SR11_W<'a, const O: u8> = crate::BitWriter1C<'a, u32, SUBSTATWA_SPEC, SR11_A, O>; -impl<'a, const O: u8> SR11_W<'a, O> { - #[doc = "No write access occurred in this subregion"] - #[inline(always)] - pub fn no_access(self) -> &'a mut W { - self.variant(SR11_A::NO_ACCESS) - } - #[doc = "Write access(es) occurred in this subregion"] - #[inline(always)] - pub fn access(self) -> &'a mut W { - self.variant(SR11_A::ACCESS) - } -} -#[doc = "Field `SR12` reader - Subregion 12 in region n (write '1' to clear)"] -pub type SR12_R = crate::BitReader; -#[doc = "Subregion 12 in region n (write '1' to clear)\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum SR12_A { - #[doc = "0: No write access occurred in this subregion"] - NO_ACCESS = 0, - #[doc = "1: Write access(es) occurred in this subregion"] - ACCESS = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: SR12_A) -> Self { - variant as u8 != 0 - } -} -impl SR12_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> SR12_A { - match self.bits { - false => SR12_A::NO_ACCESS, - true => SR12_A::ACCESS, - } - } - #[doc = "Checks if the value of the field is `NO_ACCESS`"] - #[inline(always)] - pub fn is_no_access(&self) -> bool { - *self == SR12_A::NO_ACCESS - } - #[doc = "Checks if the value of the field is `ACCESS`"] - #[inline(always)] - pub fn is_access(&self) -> bool { - *self == SR12_A::ACCESS - } -} -#[doc = "Field `SR12` writer - Subregion 12 in region n (write '1' to clear)"] -pub type SR12_W<'a, const O: u8> = crate::BitWriter1C<'a, u32, SUBSTATWA_SPEC, SR12_A, O>; -impl<'a, const O: u8> SR12_W<'a, O> { - #[doc = "No write access occurred in this subregion"] - #[inline(always)] - pub fn no_access(self) -> &'a mut W { - self.variant(SR12_A::NO_ACCESS) - } - #[doc = "Write access(es) occurred in this subregion"] - #[inline(always)] - pub fn access(self) -> &'a mut W { - self.variant(SR12_A::ACCESS) - } -} -#[doc = "Field `SR13` reader - Subregion 13 in region n (write '1' to clear)"] -pub type SR13_R = crate::BitReader; -#[doc = "Subregion 13 in region n (write '1' to clear)\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum SR13_A { - #[doc = "0: No write access occurred in this subregion"] - NO_ACCESS = 0, - #[doc = "1: Write access(es) occurred in this subregion"] - ACCESS = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: SR13_A) -> Self { - variant as u8 != 0 - } -} -impl SR13_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> SR13_A { - match self.bits { - false => SR13_A::NO_ACCESS, - true => SR13_A::ACCESS, - } - } - #[doc = "Checks if the value of the field is `NO_ACCESS`"] - #[inline(always)] - pub fn is_no_access(&self) -> bool { - *self == SR13_A::NO_ACCESS - } - #[doc = "Checks if the value of the field is `ACCESS`"] - #[inline(always)] - pub fn is_access(&self) -> bool { - *self == SR13_A::ACCESS - } -} -#[doc = "Field `SR13` writer - Subregion 13 in region n (write '1' to clear)"] -pub type SR13_W<'a, const O: u8> = crate::BitWriter1C<'a, u32, SUBSTATWA_SPEC, SR13_A, O>; -impl<'a, const O: u8> SR13_W<'a, O> { - #[doc = "No write access occurred in this subregion"] - #[inline(always)] - pub fn no_access(self) -> &'a mut W { - self.variant(SR13_A::NO_ACCESS) - } - #[doc = "Write access(es) occurred in this subregion"] - #[inline(always)] - pub fn access(self) -> &'a mut W { - self.variant(SR13_A::ACCESS) - } -} -#[doc = "Field `SR14` reader - Subregion 14 in region n (write '1' to clear)"] -pub type SR14_R = crate::BitReader; -#[doc = "Subregion 14 in region n (write '1' to clear)\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum SR14_A { - #[doc = "0: No write access occurred in this subregion"] - NO_ACCESS = 0, - #[doc = "1: Write access(es) occurred in this subregion"] - ACCESS = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: SR14_A) -> Self { - variant as u8 != 0 - } -} -impl SR14_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> SR14_A { - match self.bits { - false => SR14_A::NO_ACCESS, - true => SR14_A::ACCESS, - } - } - #[doc = "Checks if the value of the field is `NO_ACCESS`"] - #[inline(always)] - pub fn is_no_access(&self) -> bool { - *self == SR14_A::NO_ACCESS - } - #[doc = "Checks if the value of the field is `ACCESS`"] - #[inline(always)] - pub fn is_access(&self) -> bool { - *self == SR14_A::ACCESS - } -} -#[doc = "Field `SR14` writer - Subregion 14 in region n (write '1' to clear)"] -pub type SR14_W<'a, const O: u8> = crate::BitWriter1C<'a, u32, SUBSTATWA_SPEC, SR14_A, O>; -impl<'a, const O: u8> SR14_W<'a, O> { - #[doc = "No write access occurred in this subregion"] - #[inline(always)] - pub fn no_access(self) -> &'a mut W { - self.variant(SR14_A::NO_ACCESS) - } - #[doc = "Write access(es) occurred in this subregion"] - #[inline(always)] - pub fn access(self) -> &'a mut W { - self.variant(SR14_A::ACCESS) - } -} -#[doc = "Field `SR15` reader - Subregion 15 in region n (write '1' to clear)"] -pub type SR15_R = crate::BitReader; -#[doc = "Subregion 15 in region n (write '1' to clear)\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum SR15_A { - #[doc = "0: No write access occurred in this subregion"] - NO_ACCESS = 0, - #[doc = "1: Write access(es) occurred in this subregion"] - ACCESS = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: SR15_A) -> Self { - variant as u8 != 0 - } -} -impl SR15_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> SR15_A { - match self.bits { - false => SR15_A::NO_ACCESS, - true => SR15_A::ACCESS, - } - } - #[doc = "Checks if the value of the field is `NO_ACCESS`"] - #[inline(always)] - pub fn is_no_access(&self) -> bool { - *self == SR15_A::NO_ACCESS - } - #[doc = "Checks if the value of the field is `ACCESS`"] - #[inline(always)] - pub fn is_access(&self) -> bool { - *self == SR15_A::ACCESS - } -} -#[doc = "Field `SR15` writer - Subregion 15 in region n (write '1' to clear)"] -pub type SR15_W<'a, const O: u8> = crate::BitWriter1C<'a, u32, SUBSTATWA_SPEC, SR15_A, O>; -impl<'a, const O: u8> SR15_W<'a, O> { - #[doc = "No write access occurred in this subregion"] - #[inline(always)] - pub fn no_access(self) -> &'a mut W { - self.variant(SR15_A::NO_ACCESS) - } - #[doc = "Write access(es) occurred in this subregion"] - #[inline(always)] - pub fn access(self) -> &'a mut W { - self.variant(SR15_A::ACCESS) - } -} -#[doc = "Field `SR16` reader - Subregion 16 in region n (write '1' to clear)"] -pub type SR16_R = crate::BitReader; -#[doc = "Subregion 16 in region n (write '1' to clear)\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum SR16_A { - #[doc = "0: No write access occurred in this subregion"] - NO_ACCESS = 0, - #[doc = "1: Write access(es) occurred in this subregion"] - ACCESS = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: SR16_A) -> Self { - variant as u8 != 0 - } -} -impl SR16_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> SR16_A { - match self.bits { - false => SR16_A::NO_ACCESS, - true => SR16_A::ACCESS, - } - } - #[doc = "Checks if the value of the field is `NO_ACCESS`"] - #[inline(always)] - pub fn is_no_access(&self) -> bool { - *self == SR16_A::NO_ACCESS - } - #[doc = "Checks if the value of the field is `ACCESS`"] - #[inline(always)] - pub fn is_access(&self) -> bool { - *self == SR16_A::ACCESS - } -} -#[doc = "Field `SR16` writer - Subregion 16 in region n (write '1' to clear)"] -pub type SR16_W<'a, const O: u8> = crate::BitWriter1C<'a, u32, SUBSTATWA_SPEC, SR16_A, O>; -impl<'a, const O: u8> SR16_W<'a, O> { - #[doc = "No write access occurred in this subregion"] - #[inline(always)] - pub fn no_access(self) -> &'a mut W { - self.variant(SR16_A::NO_ACCESS) - } - #[doc = "Write access(es) occurred in this subregion"] - #[inline(always)] - pub fn access(self) -> &'a mut W { - self.variant(SR16_A::ACCESS) - } -} -#[doc = "Field `SR17` reader - Subregion 17 in region n (write '1' to clear)"] -pub type SR17_R = crate::BitReader; -#[doc = "Subregion 17 in region n (write '1' to clear)\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum SR17_A { - #[doc = "0: No write access occurred in this subregion"] - NO_ACCESS = 0, - #[doc = "1: Write access(es) occurred in this subregion"] - ACCESS = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: SR17_A) -> Self { - variant as u8 != 0 - } -} -impl SR17_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> SR17_A { - match self.bits { - false => SR17_A::NO_ACCESS, - true => SR17_A::ACCESS, - } - } - #[doc = "Checks if the value of the field is `NO_ACCESS`"] - #[inline(always)] - pub fn is_no_access(&self) -> bool { - *self == SR17_A::NO_ACCESS - } - #[doc = "Checks if the value of the field is `ACCESS`"] - #[inline(always)] - pub fn is_access(&self) -> bool { - *self == SR17_A::ACCESS - } -} -#[doc = "Field `SR17` writer - Subregion 17 in region n (write '1' to clear)"] -pub type SR17_W<'a, const O: u8> = crate::BitWriter1C<'a, u32, SUBSTATWA_SPEC, SR17_A, O>; -impl<'a, const O: u8> SR17_W<'a, O> { - #[doc = "No write access occurred in this subregion"] - #[inline(always)] - pub fn no_access(self) -> &'a mut W { - self.variant(SR17_A::NO_ACCESS) - } - #[doc = "Write access(es) occurred in this subregion"] - #[inline(always)] - pub fn access(self) -> &'a mut W { - self.variant(SR17_A::ACCESS) - } -} -#[doc = "Field `SR18` reader - Subregion 18 in region n (write '1' to clear)"] -pub type SR18_R = crate::BitReader; -#[doc = "Subregion 18 in region n (write '1' to clear)\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum SR18_A { - #[doc = "0: No write access occurred in this subregion"] - NO_ACCESS = 0, - #[doc = "1: Write access(es) occurred in this subregion"] - ACCESS = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: SR18_A) -> Self { - variant as u8 != 0 - } -} -impl SR18_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> SR18_A { - match self.bits { - false => SR18_A::NO_ACCESS, - true => SR18_A::ACCESS, - } - } - #[doc = "Checks if the value of the field is `NO_ACCESS`"] - #[inline(always)] - pub fn is_no_access(&self) -> bool { - *self == SR18_A::NO_ACCESS - } - #[doc = "Checks if the value of the field is `ACCESS`"] - #[inline(always)] - pub fn is_access(&self) -> bool { - *self == SR18_A::ACCESS - } -} -#[doc = "Field `SR18` writer - Subregion 18 in region n (write '1' to clear)"] -pub type SR18_W<'a, const O: u8> = crate::BitWriter1C<'a, u32, SUBSTATWA_SPEC, SR18_A, O>; -impl<'a, const O: u8> SR18_W<'a, O> { - #[doc = "No write access occurred in this subregion"] - #[inline(always)] - pub fn no_access(self) -> &'a mut W { - self.variant(SR18_A::NO_ACCESS) - } - #[doc = "Write access(es) occurred in this subregion"] - #[inline(always)] - pub fn access(self) -> &'a mut W { - self.variant(SR18_A::ACCESS) - } -} -#[doc = "Field `SR19` reader - Subregion 19 in region n (write '1' to clear)"] -pub type SR19_R = crate::BitReader; -#[doc = "Subregion 19 in region n (write '1' to clear)\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum SR19_A { - #[doc = "0: No write access occurred in this subregion"] - NO_ACCESS = 0, - #[doc = "1: Write access(es) occurred in this subregion"] - ACCESS = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: SR19_A) -> Self { - variant as u8 != 0 - } -} -impl SR19_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> SR19_A { - match self.bits { - false => SR19_A::NO_ACCESS, - true => SR19_A::ACCESS, - } - } - #[doc = "Checks if the value of the field is `NO_ACCESS`"] - #[inline(always)] - pub fn is_no_access(&self) -> bool { - *self == SR19_A::NO_ACCESS - } - #[doc = "Checks if the value of the field is `ACCESS`"] - #[inline(always)] - pub fn is_access(&self) -> bool { - *self == SR19_A::ACCESS - } -} -#[doc = "Field `SR19` writer - Subregion 19 in region n (write '1' to clear)"] -pub type SR19_W<'a, const O: u8> = crate::BitWriter1C<'a, u32, SUBSTATWA_SPEC, SR19_A, O>; -impl<'a, const O: u8> SR19_W<'a, O> { - #[doc = "No write access occurred in this subregion"] - #[inline(always)] - pub fn no_access(self) -> &'a mut W { - self.variant(SR19_A::NO_ACCESS) - } - #[doc = "Write access(es) occurred in this subregion"] - #[inline(always)] - pub fn access(self) -> &'a mut W { - self.variant(SR19_A::ACCESS) - } -} -#[doc = "Field `SR20` reader - Subregion 20 in region n (write '1' to clear)"] -pub type SR20_R = crate::BitReader; -#[doc = "Subregion 20 in region n (write '1' to clear)\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum SR20_A { - #[doc = "0: No write access occurred in this subregion"] - NO_ACCESS = 0, - #[doc = "1: Write access(es) occurred in this subregion"] - ACCESS = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: SR20_A) -> Self { - variant as u8 != 0 - } -} -impl SR20_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> SR20_A { - match self.bits { - false => SR20_A::NO_ACCESS, - true => SR20_A::ACCESS, - } - } - #[doc = "Checks if the value of the field is `NO_ACCESS`"] - #[inline(always)] - pub fn is_no_access(&self) -> bool { - *self == SR20_A::NO_ACCESS - } - #[doc = "Checks if the value of the field is `ACCESS`"] - #[inline(always)] - pub fn is_access(&self) -> bool { - *self == SR20_A::ACCESS - } -} -#[doc = "Field `SR20` writer - Subregion 20 in region n (write '1' to clear)"] -pub type SR20_W<'a, const O: u8> = crate::BitWriter1C<'a, u32, SUBSTATWA_SPEC, SR20_A, O>; -impl<'a, const O: u8> SR20_W<'a, O> { - #[doc = "No write access occurred in this subregion"] - #[inline(always)] - pub fn no_access(self) -> &'a mut W { - self.variant(SR20_A::NO_ACCESS) - } - #[doc = "Write access(es) occurred in this subregion"] - #[inline(always)] - pub fn access(self) -> &'a mut W { - self.variant(SR20_A::ACCESS) - } -} -#[doc = "Field `SR21` reader - Subregion 21 in region n (write '1' to clear)"] -pub type SR21_R = crate::BitReader; -#[doc = "Subregion 21 in region n (write '1' to clear)\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum SR21_A { - #[doc = "0: No write access occurred in this subregion"] - NO_ACCESS = 0, - #[doc = "1: Write access(es) occurred in this subregion"] - ACCESS = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: SR21_A) -> Self { - variant as u8 != 0 - } -} -impl SR21_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> SR21_A { - match self.bits { - false => SR21_A::NO_ACCESS, - true => SR21_A::ACCESS, - } - } - #[doc = "Checks if the value of the field is `NO_ACCESS`"] - #[inline(always)] - pub fn is_no_access(&self) -> bool { - *self == SR21_A::NO_ACCESS - } - #[doc = "Checks if the value of the field is `ACCESS`"] - #[inline(always)] - pub fn is_access(&self) -> bool { - *self == SR21_A::ACCESS - } -} -#[doc = "Field `SR21` writer - Subregion 21 in region n (write '1' to clear)"] -pub type SR21_W<'a, const O: u8> = crate::BitWriter1C<'a, u32, SUBSTATWA_SPEC, SR21_A, O>; -impl<'a, const O: u8> SR21_W<'a, O> { - #[doc = "No write access occurred in this subregion"] - #[inline(always)] - pub fn no_access(self) -> &'a mut W { - self.variant(SR21_A::NO_ACCESS) - } - #[doc = "Write access(es) occurred in this subregion"] - #[inline(always)] - pub fn access(self) -> &'a mut W { - self.variant(SR21_A::ACCESS) - } -} -#[doc = "Field `SR22` reader - Subregion 22 in region n (write '1' to clear)"] -pub type SR22_R = crate::BitReader; -#[doc = "Subregion 22 in region n (write '1' to clear)\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum SR22_A { - #[doc = "0: No write access occurred in this subregion"] - NO_ACCESS = 0, - #[doc = "1: Write access(es) occurred in this subregion"] - ACCESS = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: SR22_A) -> Self { - variant as u8 != 0 - } -} -impl SR22_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> SR22_A { - match self.bits { - false => SR22_A::NO_ACCESS, - true => SR22_A::ACCESS, - } - } - #[doc = "Checks if the value of the field is `NO_ACCESS`"] - #[inline(always)] - pub fn is_no_access(&self) -> bool { - *self == SR22_A::NO_ACCESS - } - #[doc = "Checks if the value of the field is `ACCESS`"] - #[inline(always)] - pub fn is_access(&self) -> bool { - *self == SR22_A::ACCESS - } -} -#[doc = "Field `SR22` writer - Subregion 22 in region n (write '1' to clear)"] -pub type SR22_W<'a, const O: u8> = crate::BitWriter1C<'a, u32, SUBSTATWA_SPEC, SR22_A, O>; -impl<'a, const O: u8> SR22_W<'a, O> { - #[doc = "No write access occurred in this subregion"] - #[inline(always)] - pub fn no_access(self) -> &'a mut W { - self.variant(SR22_A::NO_ACCESS) - } - #[doc = "Write access(es) occurred in this subregion"] - #[inline(always)] - pub fn access(self) -> &'a mut W { - self.variant(SR22_A::ACCESS) - } -} -#[doc = "Field `SR23` reader - Subregion 23 in region n (write '1' to clear)"] -pub type SR23_R = crate::BitReader; -#[doc = "Subregion 23 in region n (write '1' to clear)\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum SR23_A { - #[doc = "0: No write access occurred in this subregion"] - NO_ACCESS = 0, - #[doc = "1: Write access(es) occurred in this subregion"] - ACCESS = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: SR23_A) -> Self { - variant as u8 != 0 - } -} -impl SR23_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> SR23_A { - match self.bits { - false => SR23_A::NO_ACCESS, - true => SR23_A::ACCESS, - } - } - #[doc = "Checks if the value of the field is `NO_ACCESS`"] - #[inline(always)] - pub fn is_no_access(&self) -> bool { - *self == SR23_A::NO_ACCESS - } - #[doc = "Checks if the value of the field is `ACCESS`"] - #[inline(always)] - pub fn is_access(&self) -> bool { - *self == SR23_A::ACCESS - } -} -#[doc = "Field `SR23` writer - Subregion 23 in region n (write '1' to clear)"] -pub type SR23_W<'a, const O: u8> = crate::BitWriter1C<'a, u32, SUBSTATWA_SPEC, SR23_A, O>; -impl<'a, const O: u8> SR23_W<'a, O> { - #[doc = "No write access occurred in this subregion"] - #[inline(always)] - pub fn no_access(self) -> &'a mut W { - self.variant(SR23_A::NO_ACCESS) - } - #[doc = "Write access(es) occurred in this subregion"] - #[inline(always)] - pub fn access(self) -> &'a mut W { - self.variant(SR23_A::ACCESS) - } -} -#[doc = "Field `SR24` reader - Subregion 24 in region n (write '1' to clear)"] -pub type SR24_R = crate::BitReader; -#[doc = "Subregion 24 in region n (write '1' to clear)\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum SR24_A { - #[doc = "0: No write access occurred in this subregion"] - NO_ACCESS = 0, - #[doc = "1: Write access(es) occurred in this subregion"] - ACCESS = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: SR24_A) -> Self { - variant as u8 != 0 - } -} -impl SR24_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> SR24_A { - match self.bits { - false => SR24_A::NO_ACCESS, - true => SR24_A::ACCESS, - } - } - #[doc = "Checks if the value of the field is `NO_ACCESS`"] - #[inline(always)] - pub fn is_no_access(&self) -> bool { - *self == SR24_A::NO_ACCESS - } - #[doc = "Checks if the value of the field is `ACCESS`"] - #[inline(always)] - pub fn is_access(&self) -> bool { - *self == SR24_A::ACCESS - } -} -#[doc = "Field `SR24` writer - Subregion 24 in region n (write '1' to clear)"] -pub type SR24_W<'a, const O: u8> = crate::BitWriter1C<'a, u32, SUBSTATWA_SPEC, SR24_A, O>; -impl<'a, const O: u8> SR24_W<'a, O> { - #[doc = "No write access occurred in this subregion"] - #[inline(always)] - pub fn no_access(self) -> &'a mut W { - self.variant(SR24_A::NO_ACCESS) - } - #[doc = "Write access(es) occurred in this subregion"] - #[inline(always)] - pub fn access(self) -> &'a mut W { - self.variant(SR24_A::ACCESS) - } -} -#[doc = "Field `SR25` reader - Subregion 25 in region n (write '1' to clear)"] -pub type SR25_R = crate::BitReader; -#[doc = "Subregion 25 in region n (write '1' to clear)\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum SR25_A { - #[doc = "0: No write access occurred in this subregion"] - NO_ACCESS = 0, - #[doc = "1: Write access(es) occurred in this subregion"] - ACCESS = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: SR25_A) -> Self { - variant as u8 != 0 - } -} -impl SR25_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> SR25_A { - match self.bits { - false => SR25_A::NO_ACCESS, - true => SR25_A::ACCESS, - } - } - #[doc = "Checks if the value of the field is `NO_ACCESS`"] - #[inline(always)] - pub fn is_no_access(&self) -> bool { - *self == SR25_A::NO_ACCESS - } - #[doc = "Checks if the value of the field is `ACCESS`"] - #[inline(always)] - pub fn is_access(&self) -> bool { - *self == SR25_A::ACCESS - } -} -#[doc = "Field `SR25` writer - Subregion 25 in region n (write '1' to clear)"] -pub type SR25_W<'a, const O: u8> = crate::BitWriter1C<'a, u32, SUBSTATWA_SPEC, SR25_A, O>; -impl<'a, const O: u8> SR25_W<'a, O> { - #[doc = "No write access occurred in this subregion"] - #[inline(always)] - pub fn no_access(self) -> &'a mut W { - self.variant(SR25_A::NO_ACCESS) - } - #[doc = "Write access(es) occurred in this subregion"] - #[inline(always)] - pub fn access(self) -> &'a mut W { - self.variant(SR25_A::ACCESS) - } -} -#[doc = "Field `SR26` reader - Subregion 26 in region n (write '1' to clear)"] -pub type SR26_R = crate::BitReader; -#[doc = "Subregion 26 in region n (write '1' to clear)\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum SR26_A { - #[doc = "0: No write access occurred in this subregion"] - NO_ACCESS = 0, - #[doc = "1: Write access(es) occurred in this subregion"] - ACCESS = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: SR26_A) -> Self { - variant as u8 != 0 - } -} -impl SR26_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> SR26_A { - match self.bits { - false => SR26_A::NO_ACCESS, - true => SR26_A::ACCESS, - } - } - #[doc = "Checks if the value of the field is `NO_ACCESS`"] - #[inline(always)] - pub fn is_no_access(&self) -> bool { - *self == SR26_A::NO_ACCESS - } - #[doc = "Checks if the value of the field is `ACCESS`"] - #[inline(always)] - pub fn is_access(&self) -> bool { - *self == SR26_A::ACCESS - } -} -#[doc = "Field `SR26` writer - Subregion 26 in region n (write '1' to clear)"] -pub type SR26_W<'a, const O: u8> = crate::BitWriter1C<'a, u32, SUBSTATWA_SPEC, SR26_A, O>; -impl<'a, const O: u8> SR26_W<'a, O> { - #[doc = "No write access occurred in this subregion"] - #[inline(always)] - pub fn no_access(self) -> &'a mut W { - self.variant(SR26_A::NO_ACCESS) - } - #[doc = "Write access(es) occurred in this subregion"] - #[inline(always)] - pub fn access(self) -> &'a mut W { - self.variant(SR26_A::ACCESS) - } -} -#[doc = "Field `SR27` reader - Subregion 27 in region n (write '1' to clear)"] -pub type SR27_R = crate::BitReader; -#[doc = "Subregion 27 in region n (write '1' to clear)\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum SR27_A { - #[doc = "0: No write access occurred in this subregion"] - NO_ACCESS = 0, - #[doc = "1: Write access(es) occurred in this subregion"] - ACCESS = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: SR27_A) -> Self { - variant as u8 != 0 - } -} -impl SR27_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> SR27_A { - match self.bits { - false => SR27_A::NO_ACCESS, - true => SR27_A::ACCESS, - } - } - #[doc = "Checks if the value of the field is `NO_ACCESS`"] - #[inline(always)] - pub fn is_no_access(&self) -> bool { - *self == SR27_A::NO_ACCESS - } - #[doc = "Checks if the value of the field is `ACCESS`"] - #[inline(always)] - pub fn is_access(&self) -> bool { - *self == SR27_A::ACCESS - } -} -#[doc = "Field `SR27` writer - Subregion 27 in region n (write '1' to clear)"] -pub type SR27_W<'a, const O: u8> = crate::BitWriter1C<'a, u32, SUBSTATWA_SPEC, SR27_A, O>; -impl<'a, const O: u8> SR27_W<'a, O> { - #[doc = "No write access occurred in this subregion"] - #[inline(always)] - pub fn no_access(self) -> &'a mut W { - self.variant(SR27_A::NO_ACCESS) - } - #[doc = "Write access(es) occurred in this subregion"] - #[inline(always)] - pub fn access(self) -> &'a mut W { - self.variant(SR27_A::ACCESS) - } -} -#[doc = "Field `SR28` reader - Subregion 28 in region n (write '1' to clear)"] -pub type SR28_R = crate::BitReader; -#[doc = "Subregion 28 in region n (write '1' to clear)\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum SR28_A { - #[doc = "0: No write access occurred in this subregion"] - NO_ACCESS = 0, - #[doc = "1: Write access(es) occurred in this subregion"] - ACCESS = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: SR28_A) -> Self { - variant as u8 != 0 - } -} -impl SR28_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> SR28_A { - match self.bits { - false => SR28_A::NO_ACCESS, - true => SR28_A::ACCESS, - } - } - #[doc = "Checks if the value of the field is `NO_ACCESS`"] - #[inline(always)] - pub fn is_no_access(&self) -> bool { - *self == SR28_A::NO_ACCESS - } - #[doc = "Checks if the value of the field is `ACCESS`"] - #[inline(always)] - pub fn is_access(&self) -> bool { - *self == SR28_A::ACCESS - } -} -#[doc = "Field `SR28` writer - Subregion 28 in region n (write '1' to clear)"] -pub type SR28_W<'a, const O: u8> = crate::BitWriter1C<'a, u32, SUBSTATWA_SPEC, SR28_A, O>; -impl<'a, const O: u8> SR28_W<'a, O> { - #[doc = "No write access occurred in this subregion"] - #[inline(always)] - pub fn no_access(self) -> &'a mut W { - self.variant(SR28_A::NO_ACCESS) - } - #[doc = "Write access(es) occurred in this subregion"] - #[inline(always)] - pub fn access(self) -> &'a mut W { - self.variant(SR28_A::ACCESS) - } -} -#[doc = "Field `SR29` reader - Subregion 29 in region n (write '1' to clear)"] -pub type SR29_R = crate::BitReader; -#[doc = "Subregion 29 in region n (write '1' to clear)\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum SR29_A { - #[doc = "0: No write access occurred in this subregion"] - NO_ACCESS = 0, - #[doc = "1: Write access(es) occurred in this subregion"] - ACCESS = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: SR29_A) -> Self { - variant as u8 != 0 - } -} -impl SR29_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> SR29_A { - match self.bits { - false => SR29_A::NO_ACCESS, - true => SR29_A::ACCESS, - } - } - #[doc = "Checks if the value of the field is `NO_ACCESS`"] - #[inline(always)] - pub fn is_no_access(&self) -> bool { - *self == SR29_A::NO_ACCESS - } - #[doc = "Checks if the value of the field is `ACCESS`"] - #[inline(always)] - pub fn is_access(&self) -> bool { - *self == SR29_A::ACCESS - } -} -#[doc = "Field `SR29` writer - Subregion 29 in region n (write '1' to clear)"] -pub type SR29_W<'a, const O: u8> = crate::BitWriter1C<'a, u32, SUBSTATWA_SPEC, SR29_A, O>; -impl<'a, const O: u8> SR29_W<'a, O> { - #[doc = "No write access occurred in this subregion"] - #[inline(always)] - pub fn no_access(self) -> &'a mut W { - self.variant(SR29_A::NO_ACCESS) - } - #[doc = "Write access(es) occurred in this subregion"] - #[inline(always)] - pub fn access(self) -> &'a mut W { - self.variant(SR29_A::ACCESS) - } -} -#[doc = "Field `SR30` reader - Subregion 30 in region n (write '1' to clear)"] -pub type SR30_R = crate::BitReader; -#[doc = "Subregion 30 in region n (write '1' to clear)\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum SR30_A { - #[doc = "0: No write access occurred in this subregion"] - NO_ACCESS = 0, - #[doc = "1: Write access(es) occurred in this subregion"] - ACCESS = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: SR30_A) -> Self { - variant as u8 != 0 - } -} -impl SR30_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> SR30_A { - match self.bits { - false => SR30_A::NO_ACCESS, - true => SR30_A::ACCESS, - } - } - #[doc = "Checks if the value of the field is `NO_ACCESS`"] - #[inline(always)] - pub fn is_no_access(&self) -> bool { - *self == SR30_A::NO_ACCESS - } - #[doc = "Checks if the value of the field is `ACCESS`"] - #[inline(always)] - pub fn is_access(&self) -> bool { - *self == SR30_A::ACCESS - } -} -#[doc = "Field `SR30` writer - Subregion 30 in region n (write '1' to clear)"] -pub type SR30_W<'a, const O: u8> = crate::BitWriter1C<'a, u32, SUBSTATWA_SPEC, SR30_A, O>; -impl<'a, const O: u8> SR30_W<'a, O> { - #[doc = "No write access occurred in this subregion"] - #[inline(always)] - pub fn no_access(self) -> &'a mut W { - self.variant(SR30_A::NO_ACCESS) - } - #[doc = "Write access(es) occurred in this subregion"] - #[inline(always)] - pub fn access(self) -> &'a mut W { - self.variant(SR30_A::ACCESS) - } -} -#[doc = "Field `SR31` reader - Subregion 31 in region n (write '1' to clear)"] -pub type SR31_R = crate::BitReader; -#[doc = "Subregion 31 in region n (write '1' to clear)\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum SR31_A { - #[doc = "0: No write access occurred in this subregion"] - NO_ACCESS = 0, - #[doc = "1: Write access(es) occurred in this subregion"] - ACCESS = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: SR31_A) -> Self { - variant as u8 != 0 - } -} -impl SR31_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> SR31_A { - match self.bits { - false => SR31_A::NO_ACCESS, - true => SR31_A::ACCESS, - } - } - #[doc = "Checks if the value of the field is `NO_ACCESS`"] - #[inline(always)] - pub fn is_no_access(&self) -> bool { - *self == SR31_A::NO_ACCESS - } - #[doc = "Checks if the value of the field is `ACCESS`"] - #[inline(always)] - pub fn is_access(&self) -> bool { - *self == SR31_A::ACCESS - } -} -#[doc = "Field `SR31` writer - Subregion 31 in region n (write '1' to clear)"] -pub type SR31_W<'a, const O: u8> = crate::BitWriter1C<'a, u32, SUBSTATWA_SPEC, SR31_A, O>; -impl<'a, const O: u8> SR31_W<'a, O> { - #[doc = "No write access occurred in this subregion"] - #[inline(always)] - pub fn no_access(self) -> &'a mut W { - self.variant(SR31_A::NO_ACCESS) - } - #[doc = "Write access(es) occurred in this subregion"] - #[inline(always)] - pub fn access(self) -> &'a mut W { - self.variant(SR31_A::ACCESS) - } -} -impl R { - #[doc = "Bit 0 - Subregion 0 in region n (write '1' to clear)"] - #[inline(always)] - pub fn sr0(&self) -> SR0_R { - SR0_R::new((self.bits & 1) != 0) - } - #[doc = "Bit 1 - Subregion 1 in region n (write '1' to clear)"] - #[inline(always)] - pub fn sr1(&self) -> SR1_R { - SR1_R::new(((self.bits >> 1) & 1) != 0) - } - #[doc = "Bit 2 - Subregion 2 in region n (write '1' to clear)"] - #[inline(always)] - pub fn sr2(&self) -> SR2_R { - SR2_R::new(((self.bits >> 2) & 1) != 0) - } - #[doc = "Bit 3 - Subregion 3 in region n (write '1' to clear)"] - #[inline(always)] - pub fn sr3(&self) -> SR3_R { - SR3_R::new(((self.bits >> 3) & 1) != 0) - } - #[doc = "Bit 4 - Subregion 4 in region n (write '1' to clear)"] - #[inline(always)] - pub fn sr4(&self) -> SR4_R { - SR4_R::new(((self.bits >> 4) & 1) != 0) - } - #[doc = "Bit 5 - Subregion 5 in region n (write '1' to clear)"] - #[inline(always)] - pub fn sr5(&self) -> SR5_R { - SR5_R::new(((self.bits >> 5) & 1) != 0) - } - #[doc = "Bit 6 - Subregion 6 in region n (write '1' to clear)"] - #[inline(always)] - pub fn sr6(&self) -> SR6_R { - SR6_R::new(((self.bits >> 6) & 1) != 0) - } - #[doc = "Bit 7 - Subregion 7 in region n (write '1' to clear)"] - #[inline(always)] - pub fn sr7(&self) -> SR7_R { - SR7_R::new(((self.bits >> 7) & 1) != 0) - } - #[doc = "Bit 8 - Subregion 8 in region n (write '1' to clear)"] - #[inline(always)] - pub fn sr8(&self) -> SR8_R { - SR8_R::new(((self.bits >> 8) & 1) != 0) - } - #[doc = "Bit 9 - Subregion 9 in region n (write '1' to clear)"] - #[inline(always)] - pub fn sr9(&self) -> SR9_R { - SR9_R::new(((self.bits >> 9) & 1) != 0) - } - #[doc = "Bit 10 - Subregion 10 in region n (write '1' to clear)"] - #[inline(always)] - pub fn sr10(&self) -> SR10_R { - SR10_R::new(((self.bits >> 10) & 1) != 0) - } - #[doc = "Bit 11 - Subregion 11 in region n (write '1' to clear)"] - #[inline(always)] - pub fn sr11(&self) -> SR11_R { - SR11_R::new(((self.bits >> 11) & 1) != 0) - } - #[doc = "Bit 12 - Subregion 12 in region n (write '1' to clear)"] - #[inline(always)] - pub fn sr12(&self) -> SR12_R { - SR12_R::new(((self.bits >> 12) & 1) != 0) - } - #[doc = "Bit 13 - Subregion 13 in region n (write '1' to clear)"] - #[inline(always)] - pub fn sr13(&self) -> SR13_R { - SR13_R::new(((self.bits >> 13) & 1) != 0) - } - #[doc = "Bit 14 - Subregion 14 in region n (write '1' to clear)"] - #[inline(always)] - pub fn sr14(&self) -> SR14_R { - SR14_R::new(((self.bits >> 14) & 1) != 0) - } - #[doc = "Bit 15 - Subregion 15 in region n (write '1' to clear)"] - #[inline(always)] - pub fn sr15(&self) -> SR15_R { - SR15_R::new(((self.bits >> 15) & 1) != 0) - } - #[doc = "Bit 16 - Subregion 16 in region n (write '1' to clear)"] - #[inline(always)] - pub fn sr16(&self) -> SR16_R { - SR16_R::new(((self.bits >> 16) & 1) != 0) - } - #[doc = "Bit 17 - Subregion 17 in region n (write '1' to clear)"] - #[inline(always)] - pub fn sr17(&self) -> SR17_R { - SR17_R::new(((self.bits >> 17) & 1) != 0) - } - #[doc = "Bit 18 - Subregion 18 in region n (write '1' to clear)"] - #[inline(always)] - pub fn sr18(&self) -> SR18_R { - SR18_R::new(((self.bits >> 18) & 1) != 0) - } - #[doc = "Bit 19 - Subregion 19 in region n (write '1' to clear)"] - #[inline(always)] - pub fn sr19(&self) -> SR19_R { - SR19_R::new(((self.bits >> 19) & 1) != 0) - } - #[doc = "Bit 20 - Subregion 20 in region n (write '1' to clear)"] - #[inline(always)] - pub fn sr20(&self) -> SR20_R { - SR20_R::new(((self.bits >> 20) & 1) != 0) - } - #[doc = "Bit 21 - Subregion 21 in region n (write '1' to clear)"] - #[inline(always)] - pub fn sr21(&self) -> SR21_R { - SR21_R::new(((self.bits >> 21) & 1) != 0) - } - #[doc = "Bit 22 - Subregion 22 in region n (write '1' to clear)"] - #[inline(always)] - pub fn sr22(&self) -> SR22_R { - SR22_R::new(((self.bits >> 22) & 1) != 0) - } - #[doc = "Bit 23 - Subregion 23 in region n (write '1' to clear)"] - #[inline(always)] - pub fn sr23(&self) -> SR23_R { - SR23_R::new(((self.bits >> 23) & 1) != 0) - } - #[doc = "Bit 24 - Subregion 24 in region n (write '1' to clear)"] - #[inline(always)] - pub fn sr24(&self) -> SR24_R { - SR24_R::new(((self.bits >> 24) & 1) != 0) - } - #[doc = "Bit 25 - Subregion 25 in region n (write '1' to clear)"] - #[inline(always)] - pub fn sr25(&self) -> SR25_R { - SR25_R::new(((self.bits >> 25) & 1) != 0) - } - #[doc = "Bit 26 - Subregion 26 in region n (write '1' to clear)"] - #[inline(always)] - pub fn sr26(&self) -> SR26_R { - SR26_R::new(((self.bits >> 26) & 1) != 0) - } - #[doc = "Bit 27 - Subregion 27 in region n (write '1' to clear)"] - #[inline(always)] - pub fn sr27(&self) -> SR27_R { - SR27_R::new(((self.bits >> 27) & 1) != 0) - } - #[doc = "Bit 28 - Subregion 28 in region n (write '1' to clear)"] - #[inline(always)] - pub fn sr28(&self) -> SR28_R { - SR28_R::new(((self.bits >> 28) & 1) != 0) - } - #[doc = "Bit 29 - Subregion 29 in region n (write '1' to clear)"] - #[inline(always)] - pub fn sr29(&self) -> SR29_R { - SR29_R::new(((self.bits >> 29) & 1) != 0) - } - #[doc = "Bit 30 - Subregion 30 in region n (write '1' to clear)"] - #[inline(always)] - pub fn sr30(&self) -> SR30_R { - SR30_R::new(((self.bits >> 30) & 1) != 0) - } - #[doc = "Bit 31 - Subregion 31 in region n (write '1' to clear)"] - #[inline(always)] - pub fn sr31(&self) -> SR31_R { - SR31_R::new(((self.bits >> 31) & 1) != 0) - } -} -impl W { - #[doc = "Bit 0 - Subregion 0 in region n (write '1' to clear)"] - #[inline(always)] - #[must_use] - pub fn sr0(&mut self) -> SR0_W<0> { - SR0_W::new(self) - } - #[doc = "Bit 1 - Subregion 1 in region n (write '1' to clear)"] - #[inline(always)] - #[must_use] - pub fn sr1(&mut self) -> SR1_W<1> { - SR1_W::new(self) - } - #[doc = "Bit 2 - Subregion 2 in region n (write '1' to clear)"] - #[inline(always)] - #[must_use] - pub fn sr2(&mut self) -> SR2_W<2> { - SR2_W::new(self) - } - #[doc = "Bit 3 - Subregion 3 in region n (write '1' to clear)"] - #[inline(always)] - #[must_use] - pub fn sr3(&mut self) -> SR3_W<3> { - SR3_W::new(self) - } - #[doc = "Bit 4 - Subregion 4 in region n (write '1' to clear)"] - #[inline(always)] - #[must_use] - pub fn sr4(&mut self) -> SR4_W<4> { - SR4_W::new(self) - } - #[doc = "Bit 5 - Subregion 5 in region n (write '1' to clear)"] - #[inline(always)] - #[must_use] - pub fn sr5(&mut self) -> SR5_W<5> { - SR5_W::new(self) - } - #[doc = "Bit 6 - Subregion 6 in region n (write '1' to clear)"] - #[inline(always)] - #[must_use] - pub fn sr6(&mut self) -> SR6_W<6> { - SR6_W::new(self) - } - #[doc = "Bit 7 - Subregion 7 in region n (write '1' to clear)"] - #[inline(always)] - #[must_use] - pub fn sr7(&mut self) -> SR7_W<7> { - SR7_W::new(self) - } - #[doc = "Bit 8 - Subregion 8 in region n (write '1' to clear)"] - #[inline(always)] - #[must_use] - pub fn sr8(&mut self) -> SR8_W<8> { - SR8_W::new(self) - } - #[doc = "Bit 9 - Subregion 9 in region n (write '1' to clear)"] - #[inline(always)] - #[must_use] - pub fn sr9(&mut self) -> SR9_W<9> { - SR9_W::new(self) - } - #[doc = "Bit 10 - Subregion 10 in region n (write '1' to clear)"] - #[inline(always)] - #[must_use] - pub fn sr10(&mut self) -> SR10_W<10> { - SR10_W::new(self) - } - #[doc = "Bit 11 - Subregion 11 in region n (write '1' to clear)"] - #[inline(always)] - #[must_use] - pub fn sr11(&mut self) -> SR11_W<11> { - SR11_W::new(self) - } - #[doc = "Bit 12 - Subregion 12 in region n (write '1' to clear)"] - #[inline(always)] - #[must_use] - pub fn sr12(&mut self) -> SR12_W<12> { - SR12_W::new(self) - } - #[doc = "Bit 13 - Subregion 13 in region n (write '1' to clear)"] - #[inline(always)] - #[must_use] - pub fn sr13(&mut self) -> SR13_W<13> { - SR13_W::new(self) - } - #[doc = "Bit 14 - Subregion 14 in region n (write '1' to clear)"] - #[inline(always)] - #[must_use] - pub fn sr14(&mut self) -> SR14_W<14> { - SR14_W::new(self) - } - #[doc = "Bit 15 - Subregion 15 in region n (write '1' to clear)"] - #[inline(always)] - #[must_use] - pub fn sr15(&mut self) -> SR15_W<15> { - SR15_W::new(self) - } - #[doc = "Bit 16 - Subregion 16 in region n (write '1' to clear)"] - #[inline(always)] - #[must_use] - pub fn sr16(&mut self) -> SR16_W<16> { - SR16_W::new(self) - } - #[doc = "Bit 17 - Subregion 17 in region n (write '1' to clear)"] - #[inline(always)] - #[must_use] - pub fn sr17(&mut self) -> SR17_W<17> { - SR17_W::new(self) - } - #[doc = "Bit 18 - Subregion 18 in region n (write '1' to clear)"] - #[inline(always)] - #[must_use] - pub fn sr18(&mut self) -> SR18_W<18> { - SR18_W::new(self) - } - #[doc = "Bit 19 - Subregion 19 in region n (write '1' to clear)"] - #[inline(always)] - #[must_use] - pub fn sr19(&mut self) -> SR19_W<19> { - SR19_W::new(self) - } - #[doc = "Bit 20 - Subregion 20 in region n (write '1' to clear)"] - #[inline(always)] - #[must_use] - pub fn sr20(&mut self) -> SR20_W<20> { - SR20_W::new(self) - } - #[doc = "Bit 21 - Subregion 21 in region n (write '1' to clear)"] - #[inline(always)] - #[must_use] - pub fn sr21(&mut self) -> SR21_W<21> { - SR21_W::new(self) - } - #[doc = "Bit 22 - Subregion 22 in region n (write '1' to clear)"] - #[inline(always)] - #[must_use] - pub fn sr22(&mut self) -> SR22_W<22> { - SR22_W::new(self) - } - #[doc = "Bit 23 - Subregion 23 in region n (write '1' to clear)"] - #[inline(always)] - #[must_use] - pub fn sr23(&mut self) -> SR23_W<23> { - SR23_W::new(self) - } - #[doc = "Bit 24 - Subregion 24 in region n (write '1' to clear)"] - #[inline(always)] - #[must_use] - pub fn sr24(&mut self) -> SR24_W<24> { - SR24_W::new(self) - } - #[doc = "Bit 25 - Subregion 25 in region n (write '1' to clear)"] - #[inline(always)] - #[must_use] - pub fn sr25(&mut self) -> SR25_W<25> { - SR25_W::new(self) - } - #[doc = "Bit 26 - Subregion 26 in region n (write '1' to clear)"] - #[inline(always)] - #[must_use] - pub fn sr26(&mut self) -> SR26_W<26> { - SR26_W::new(self) - } - #[doc = "Bit 27 - Subregion 27 in region n (write '1' to clear)"] - #[inline(always)] - #[must_use] - pub fn sr27(&mut self) -> SR27_W<27> { - SR27_W::new(self) - } - #[doc = "Bit 28 - Subregion 28 in region n (write '1' to clear)"] - #[inline(always)] - #[must_use] - pub fn sr28(&mut self) -> SR28_W<28> { - SR28_W::new(self) - } - #[doc = "Bit 29 - Subregion 29 in region n (write '1' to clear)"] - #[inline(always)] - #[must_use] - pub fn sr29(&mut self) -> SR29_W<29> { - SR29_W::new(self) - } - #[doc = "Bit 30 - Subregion 30 in region n (write '1' to clear)"] - #[inline(always)] - #[must_use] - pub fn sr30(&mut self) -> SR30_W<30> { - SR30_W::new(self) - } - #[doc = "Bit 31 - Subregion 31 in region n (write '1' to clear)"] - #[inline(always)] - #[must_use] - pub fn sr31(&mut self) -> SR31_W<31> { - SR31_W::new(self) - } - #[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 = "Description cluster: Source of event/interrupt in region n, write access detected while corresponding subregion was enabled for watching\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 [substatwa](index.html) module"] -pub struct SUBSTATWA_SPEC; -impl crate::RegisterSpec for SUBSTATWA_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [substatwa::R](R) reader structure"] -impl crate::Readable for SUBSTATWA_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [substatwa::W](W) writer structure"] -impl crate::Writable for SUBSTATWA_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0xffff_ffff; -} -#[doc = "`reset()` method sets SUBSTATWA to value 0"] -impl crate::Resettable for SUBSTATWA_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/mwu/pregion.rs b/down-the-stack/dk_pac/src/mwu/pregion.rs deleted file mode 100644 index a6b37e4..0000000 --- a/down-the-stack/dk_pac/src/mwu/pregion.rs +++ /dev/null @@ -1,22 +0,0 @@ -#[doc = r"Register block"] -#[repr(C)] -pub struct PREGION { - #[doc = "0x00 - Description cluster: Reserved for future use"] - pub start: START, - #[doc = "0x04 - Description cluster: Reserved for future use"] - pub end: END, - #[doc = "0x08 - Description cluster: Subregions of region n"] - pub subs: SUBS, -} -#[doc = "START (r) register accessor: an alias for `Reg`"] -pub type START = crate::Reg; -#[doc = "Description cluster: Reserved for future use"] -pub mod start; -#[doc = "END (r) register accessor: an alias for `Reg`"] -pub type END = crate::Reg; -#[doc = "Description cluster: Reserved for future use"] -pub mod end; -#[doc = "SUBS (rw) register accessor: an alias for `Reg`"] -pub type SUBS = crate::Reg; -#[doc = "Description cluster: Subregions of region n"] -pub mod subs; diff --git a/down-the-stack/dk_pac/src/mwu/pregion/end.rs b/down-the-stack/dk_pac/src/mwu/pregion/end.rs deleted file mode 100644 index 4daab61..0000000 --- a/down-the-stack/dk_pac/src/mwu/pregion/end.rs +++ /dev/null @@ -1,37 +0,0 @@ -#[doc = "Register `END` 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 = "Field `END` reader - Reserved for future use"] -pub type END_R = crate::FieldReader; -impl R { - #[doc = "Bits 0:31 - Reserved for future use"] - #[inline(always)] - pub fn end(&self) -> END_R { - END_R::new(self.bits) - } -} -#[doc = "Description cluster: Reserved for future use\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 [end](index.html) module"] -pub struct END_SPEC; -impl crate::RegisterSpec for END_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [end::R](R) reader structure"] -impl crate::Readable for END_SPEC { - type Reader = R; -} -#[doc = "`reset()` method sets END to value 0"] -impl crate::Resettable for END_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/mwu/pregion/start.rs b/down-the-stack/dk_pac/src/mwu/pregion/start.rs deleted file mode 100644 index e92c3f6..0000000 --- a/down-the-stack/dk_pac/src/mwu/pregion/start.rs +++ /dev/null @@ -1,37 +0,0 @@ -#[doc = "Register `START` 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 = "Field `START` reader - Reserved for future use"] -pub type START_R = crate::FieldReader; -impl R { - #[doc = "Bits 0:31 - Reserved for future use"] - #[inline(always)] - pub fn start(&self) -> START_R { - START_R::new(self.bits) - } -} -#[doc = "Description cluster: Reserved for future use\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 [start](index.html) module"] -pub struct START_SPEC; -impl crate::RegisterSpec for START_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [start::R](R) reader structure"] -impl crate::Readable for START_SPEC { - type Reader = R; -} -#[doc = "`reset()` method sets START to value 0"] -impl crate::Resettable for START_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/mwu/pregion/subs.rs b/down-the-stack/dk_pac/src/mwu/pregion/subs.rs deleted file mode 100644 index 8997656..0000000 --- a/down-the-stack/dk_pac/src/mwu/pregion/subs.rs +++ /dev/null @@ -1,2017 +0,0 @@ -#[doc = "Register `SUBS` 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 `SUBS` 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 `SR0` reader - Include or exclude subregion 0 in region"] -pub type SR0_R = crate::BitReader; -#[doc = "Include or exclude subregion 0 in region\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum SR0_A { - #[doc = "0: Exclude"] - EXCLUDE = 0, - #[doc = "1: Include"] - INCLUDE = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: SR0_A) -> Self { - variant as u8 != 0 - } -} -impl SR0_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> SR0_A { - match self.bits { - false => SR0_A::EXCLUDE, - true => SR0_A::INCLUDE, - } - } - #[doc = "Checks if the value of the field is `EXCLUDE`"] - #[inline(always)] - pub fn is_exclude(&self) -> bool { - *self == SR0_A::EXCLUDE - } - #[doc = "Checks if the value of the field is `INCLUDE`"] - #[inline(always)] - pub fn is_include(&self) -> bool { - *self == SR0_A::INCLUDE - } -} -#[doc = "Field `SR0` writer - Include or exclude subregion 0 in region"] -pub type SR0_W<'a, const O: u8> = crate::BitWriter<'a, u32, SUBS_SPEC, SR0_A, O>; -impl<'a, const O: u8> SR0_W<'a, O> { - #[doc = "Exclude"] - #[inline(always)] - pub fn exclude(self) -> &'a mut W { - self.variant(SR0_A::EXCLUDE) - } - #[doc = "Include"] - #[inline(always)] - pub fn include(self) -> &'a mut W { - self.variant(SR0_A::INCLUDE) - } -} -#[doc = "Field `SR1` reader - Include or exclude subregion 1 in region"] -pub type SR1_R = crate::BitReader; -#[doc = "Include or exclude subregion 1 in region\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum SR1_A { - #[doc = "0: Exclude"] - EXCLUDE = 0, - #[doc = "1: Include"] - INCLUDE = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: SR1_A) -> Self { - variant as u8 != 0 - } -} -impl SR1_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> SR1_A { - match self.bits { - false => SR1_A::EXCLUDE, - true => SR1_A::INCLUDE, - } - } - #[doc = "Checks if the value of the field is `EXCLUDE`"] - #[inline(always)] - pub fn is_exclude(&self) -> bool { - *self == SR1_A::EXCLUDE - } - #[doc = "Checks if the value of the field is `INCLUDE`"] - #[inline(always)] - pub fn is_include(&self) -> bool { - *self == SR1_A::INCLUDE - } -} -#[doc = "Field `SR1` writer - Include or exclude subregion 1 in region"] -pub type SR1_W<'a, const O: u8> = crate::BitWriter<'a, u32, SUBS_SPEC, SR1_A, O>; -impl<'a, const O: u8> SR1_W<'a, O> { - #[doc = "Exclude"] - #[inline(always)] - pub fn exclude(self) -> &'a mut W { - self.variant(SR1_A::EXCLUDE) - } - #[doc = "Include"] - #[inline(always)] - pub fn include(self) -> &'a mut W { - self.variant(SR1_A::INCLUDE) - } -} -#[doc = "Field `SR2` reader - Include or exclude subregion 2 in region"] -pub type SR2_R = crate::BitReader; -#[doc = "Include or exclude subregion 2 in region\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum SR2_A { - #[doc = "0: Exclude"] - EXCLUDE = 0, - #[doc = "1: Include"] - INCLUDE = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: SR2_A) -> Self { - variant as u8 != 0 - } -} -impl SR2_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> SR2_A { - match self.bits { - false => SR2_A::EXCLUDE, - true => SR2_A::INCLUDE, - } - } - #[doc = "Checks if the value of the field is `EXCLUDE`"] - #[inline(always)] - pub fn is_exclude(&self) -> bool { - *self == SR2_A::EXCLUDE - } - #[doc = "Checks if the value of the field is `INCLUDE`"] - #[inline(always)] - pub fn is_include(&self) -> bool { - *self == SR2_A::INCLUDE - } -} -#[doc = "Field `SR2` writer - Include or exclude subregion 2 in region"] -pub type SR2_W<'a, const O: u8> = crate::BitWriter<'a, u32, SUBS_SPEC, SR2_A, O>; -impl<'a, const O: u8> SR2_W<'a, O> { - #[doc = "Exclude"] - #[inline(always)] - pub fn exclude(self) -> &'a mut W { - self.variant(SR2_A::EXCLUDE) - } - #[doc = "Include"] - #[inline(always)] - pub fn include(self) -> &'a mut W { - self.variant(SR2_A::INCLUDE) - } -} -#[doc = "Field `SR3` reader - Include or exclude subregion 3 in region"] -pub type SR3_R = crate::BitReader; -#[doc = "Include or exclude subregion 3 in region\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum SR3_A { - #[doc = "0: Exclude"] - EXCLUDE = 0, - #[doc = "1: Include"] - INCLUDE = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: SR3_A) -> Self { - variant as u8 != 0 - } -} -impl SR3_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> SR3_A { - match self.bits { - false => SR3_A::EXCLUDE, - true => SR3_A::INCLUDE, - } - } - #[doc = "Checks if the value of the field is `EXCLUDE`"] - #[inline(always)] - pub fn is_exclude(&self) -> bool { - *self == SR3_A::EXCLUDE - } - #[doc = "Checks if the value of the field is `INCLUDE`"] - #[inline(always)] - pub fn is_include(&self) -> bool { - *self == SR3_A::INCLUDE - } -} -#[doc = "Field `SR3` writer - Include or exclude subregion 3 in region"] -pub type SR3_W<'a, const O: u8> = crate::BitWriter<'a, u32, SUBS_SPEC, SR3_A, O>; -impl<'a, const O: u8> SR3_W<'a, O> { - #[doc = "Exclude"] - #[inline(always)] - pub fn exclude(self) -> &'a mut W { - self.variant(SR3_A::EXCLUDE) - } - #[doc = "Include"] - #[inline(always)] - pub fn include(self) -> &'a mut W { - self.variant(SR3_A::INCLUDE) - } -} -#[doc = "Field `SR4` reader - Include or exclude subregion 4 in region"] -pub type SR4_R = crate::BitReader; -#[doc = "Include or exclude subregion 4 in region\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum SR4_A { - #[doc = "0: Exclude"] - EXCLUDE = 0, - #[doc = "1: Include"] - INCLUDE = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: SR4_A) -> Self { - variant as u8 != 0 - } -} -impl SR4_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> SR4_A { - match self.bits { - false => SR4_A::EXCLUDE, - true => SR4_A::INCLUDE, - } - } - #[doc = "Checks if the value of the field is `EXCLUDE`"] - #[inline(always)] - pub fn is_exclude(&self) -> bool { - *self == SR4_A::EXCLUDE - } - #[doc = "Checks if the value of the field is `INCLUDE`"] - #[inline(always)] - pub fn is_include(&self) -> bool { - *self == SR4_A::INCLUDE - } -} -#[doc = "Field `SR4` writer - Include or exclude subregion 4 in region"] -pub type SR4_W<'a, const O: u8> = crate::BitWriter<'a, u32, SUBS_SPEC, SR4_A, O>; -impl<'a, const O: u8> SR4_W<'a, O> { - #[doc = "Exclude"] - #[inline(always)] - pub fn exclude(self) -> &'a mut W { - self.variant(SR4_A::EXCLUDE) - } - #[doc = "Include"] - #[inline(always)] - pub fn include(self) -> &'a mut W { - self.variant(SR4_A::INCLUDE) - } -} -#[doc = "Field `SR5` reader - Include or exclude subregion 5 in region"] -pub type SR5_R = crate::BitReader; -#[doc = "Include or exclude subregion 5 in region\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum SR5_A { - #[doc = "0: Exclude"] - EXCLUDE = 0, - #[doc = "1: Include"] - INCLUDE = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: SR5_A) -> Self { - variant as u8 != 0 - } -} -impl SR5_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> SR5_A { - match self.bits { - false => SR5_A::EXCLUDE, - true => SR5_A::INCLUDE, - } - } - #[doc = "Checks if the value of the field is `EXCLUDE`"] - #[inline(always)] - pub fn is_exclude(&self) -> bool { - *self == SR5_A::EXCLUDE - } - #[doc = "Checks if the value of the field is `INCLUDE`"] - #[inline(always)] - pub fn is_include(&self) -> bool { - *self == SR5_A::INCLUDE - } -} -#[doc = "Field `SR5` writer - Include or exclude subregion 5 in region"] -pub type SR5_W<'a, const O: u8> = crate::BitWriter<'a, u32, SUBS_SPEC, SR5_A, O>; -impl<'a, const O: u8> SR5_W<'a, O> { - #[doc = "Exclude"] - #[inline(always)] - pub fn exclude(self) -> &'a mut W { - self.variant(SR5_A::EXCLUDE) - } - #[doc = "Include"] - #[inline(always)] - pub fn include(self) -> &'a mut W { - self.variant(SR5_A::INCLUDE) - } -} -#[doc = "Field `SR6` reader - Include or exclude subregion 6 in region"] -pub type SR6_R = crate::BitReader; -#[doc = "Include or exclude subregion 6 in region\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum SR6_A { - #[doc = "0: Exclude"] - EXCLUDE = 0, - #[doc = "1: Include"] - INCLUDE = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: SR6_A) -> Self { - variant as u8 != 0 - } -} -impl SR6_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> SR6_A { - match self.bits { - false => SR6_A::EXCLUDE, - true => SR6_A::INCLUDE, - } - } - #[doc = "Checks if the value of the field is `EXCLUDE`"] - #[inline(always)] - pub fn is_exclude(&self) -> bool { - *self == SR6_A::EXCLUDE - } - #[doc = "Checks if the value of the field is `INCLUDE`"] - #[inline(always)] - pub fn is_include(&self) -> bool { - *self == SR6_A::INCLUDE - } -} -#[doc = "Field `SR6` writer - Include or exclude subregion 6 in region"] -pub type SR6_W<'a, const O: u8> = crate::BitWriter<'a, u32, SUBS_SPEC, SR6_A, O>; -impl<'a, const O: u8> SR6_W<'a, O> { - #[doc = "Exclude"] - #[inline(always)] - pub fn exclude(self) -> &'a mut W { - self.variant(SR6_A::EXCLUDE) - } - #[doc = "Include"] - #[inline(always)] - pub fn include(self) -> &'a mut W { - self.variant(SR6_A::INCLUDE) - } -} -#[doc = "Field `SR7` reader - Include or exclude subregion 7 in region"] -pub type SR7_R = crate::BitReader; -#[doc = "Include or exclude subregion 7 in region\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum SR7_A { - #[doc = "0: Exclude"] - EXCLUDE = 0, - #[doc = "1: Include"] - INCLUDE = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: SR7_A) -> Self { - variant as u8 != 0 - } -} -impl SR7_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> SR7_A { - match self.bits { - false => SR7_A::EXCLUDE, - true => SR7_A::INCLUDE, - } - } - #[doc = "Checks if the value of the field is `EXCLUDE`"] - #[inline(always)] - pub fn is_exclude(&self) -> bool { - *self == SR7_A::EXCLUDE - } - #[doc = "Checks if the value of the field is `INCLUDE`"] - #[inline(always)] - pub fn is_include(&self) -> bool { - *self == SR7_A::INCLUDE - } -} -#[doc = "Field `SR7` writer - Include or exclude subregion 7 in region"] -pub type SR7_W<'a, const O: u8> = crate::BitWriter<'a, u32, SUBS_SPEC, SR7_A, O>; -impl<'a, const O: u8> SR7_W<'a, O> { - #[doc = "Exclude"] - #[inline(always)] - pub fn exclude(self) -> &'a mut W { - self.variant(SR7_A::EXCLUDE) - } - #[doc = "Include"] - #[inline(always)] - pub fn include(self) -> &'a mut W { - self.variant(SR7_A::INCLUDE) - } -} -#[doc = "Field `SR8` reader - Include or exclude subregion 8 in region"] -pub type SR8_R = crate::BitReader; -#[doc = "Include or exclude subregion 8 in region\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum SR8_A { - #[doc = "0: Exclude"] - EXCLUDE = 0, - #[doc = "1: Include"] - INCLUDE = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: SR8_A) -> Self { - variant as u8 != 0 - } -} -impl SR8_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> SR8_A { - match self.bits { - false => SR8_A::EXCLUDE, - true => SR8_A::INCLUDE, - } - } - #[doc = "Checks if the value of the field is `EXCLUDE`"] - #[inline(always)] - pub fn is_exclude(&self) -> bool { - *self == SR8_A::EXCLUDE - } - #[doc = "Checks if the value of the field is `INCLUDE`"] - #[inline(always)] - pub fn is_include(&self) -> bool { - *self == SR8_A::INCLUDE - } -} -#[doc = "Field `SR8` writer - Include or exclude subregion 8 in region"] -pub type SR8_W<'a, const O: u8> = crate::BitWriter<'a, u32, SUBS_SPEC, SR8_A, O>; -impl<'a, const O: u8> SR8_W<'a, O> { - #[doc = "Exclude"] - #[inline(always)] - pub fn exclude(self) -> &'a mut W { - self.variant(SR8_A::EXCLUDE) - } - #[doc = "Include"] - #[inline(always)] - pub fn include(self) -> &'a mut W { - self.variant(SR8_A::INCLUDE) - } -} -#[doc = "Field `SR9` reader - Include or exclude subregion 9 in region"] -pub type SR9_R = crate::BitReader; -#[doc = "Include or exclude subregion 9 in region\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum SR9_A { - #[doc = "0: Exclude"] - EXCLUDE = 0, - #[doc = "1: Include"] - INCLUDE = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: SR9_A) -> Self { - variant as u8 != 0 - } -} -impl SR9_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> SR9_A { - match self.bits { - false => SR9_A::EXCLUDE, - true => SR9_A::INCLUDE, - } - } - #[doc = "Checks if the value of the field is `EXCLUDE`"] - #[inline(always)] - pub fn is_exclude(&self) -> bool { - *self == SR9_A::EXCLUDE - } - #[doc = "Checks if the value of the field is `INCLUDE`"] - #[inline(always)] - pub fn is_include(&self) -> bool { - *self == SR9_A::INCLUDE - } -} -#[doc = "Field `SR9` writer - Include or exclude subregion 9 in region"] -pub type SR9_W<'a, const O: u8> = crate::BitWriter<'a, u32, SUBS_SPEC, SR9_A, O>; -impl<'a, const O: u8> SR9_W<'a, O> { - #[doc = "Exclude"] - #[inline(always)] - pub fn exclude(self) -> &'a mut W { - self.variant(SR9_A::EXCLUDE) - } - #[doc = "Include"] - #[inline(always)] - pub fn include(self) -> &'a mut W { - self.variant(SR9_A::INCLUDE) - } -} -#[doc = "Field `SR10` reader - Include or exclude subregion 10 in region"] -pub type SR10_R = crate::BitReader; -#[doc = "Include or exclude subregion 10 in region\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum SR10_A { - #[doc = "0: Exclude"] - EXCLUDE = 0, - #[doc = "1: Include"] - INCLUDE = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: SR10_A) -> Self { - variant as u8 != 0 - } -} -impl SR10_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> SR10_A { - match self.bits { - false => SR10_A::EXCLUDE, - true => SR10_A::INCLUDE, - } - } - #[doc = "Checks if the value of the field is `EXCLUDE`"] - #[inline(always)] - pub fn is_exclude(&self) -> bool { - *self == SR10_A::EXCLUDE - } - #[doc = "Checks if the value of the field is `INCLUDE`"] - #[inline(always)] - pub fn is_include(&self) -> bool { - *self == SR10_A::INCLUDE - } -} -#[doc = "Field `SR10` writer - Include or exclude subregion 10 in region"] -pub type SR10_W<'a, const O: u8> = crate::BitWriter<'a, u32, SUBS_SPEC, SR10_A, O>; -impl<'a, const O: u8> SR10_W<'a, O> { - #[doc = "Exclude"] - #[inline(always)] - pub fn exclude(self) -> &'a mut W { - self.variant(SR10_A::EXCLUDE) - } - #[doc = "Include"] - #[inline(always)] - pub fn include(self) -> &'a mut W { - self.variant(SR10_A::INCLUDE) - } -} -#[doc = "Field `SR11` reader - Include or exclude subregion 11 in region"] -pub type SR11_R = crate::BitReader; -#[doc = "Include or exclude subregion 11 in region\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum SR11_A { - #[doc = "0: Exclude"] - EXCLUDE = 0, - #[doc = "1: Include"] - INCLUDE = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: SR11_A) -> Self { - variant as u8 != 0 - } -} -impl SR11_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> SR11_A { - match self.bits { - false => SR11_A::EXCLUDE, - true => SR11_A::INCLUDE, - } - } - #[doc = "Checks if the value of the field is `EXCLUDE`"] - #[inline(always)] - pub fn is_exclude(&self) -> bool { - *self == SR11_A::EXCLUDE - } - #[doc = "Checks if the value of the field is `INCLUDE`"] - #[inline(always)] - pub fn is_include(&self) -> bool { - *self == SR11_A::INCLUDE - } -} -#[doc = "Field `SR11` writer - Include or exclude subregion 11 in region"] -pub type SR11_W<'a, const O: u8> = crate::BitWriter<'a, u32, SUBS_SPEC, SR11_A, O>; -impl<'a, const O: u8> SR11_W<'a, O> { - #[doc = "Exclude"] - #[inline(always)] - pub fn exclude(self) -> &'a mut W { - self.variant(SR11_A::EXCLUDE) - } - #[doc = "Include"] - #[inline(always)] - pub fn include(self) -> &'a mut W { - self.variant(SR11_A::INCLUDE) - } -} -#[doc = "Field `SR12` reader - Include or exclude subregion 12 in region"] -pub type SR12_R = crate::BitReader; -#[doc = "Include or exclude subregion 12 in region\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum SR12_A { - #[doc = "0: Exclude"] - EXCLUDE = 0, - #[doc = "1: Include"] - INCLUDE = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: SR12_A) -> Self { - variant as u8 != 0 - } -} -impl SR12_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> SR12_A { - match self.bits { - false => SR12_A::EXCLUDE, - true => SR12_A::INCLUDE, - } - } - #[doc = "Checks if the value of the field is `EXCLUDE`"] - #[inline(always)] - pub fn is_exclude(&self) -> bool { - *self == SR12_A::EXCLUDE - } - #[doc = "Checks if the value of the field is `INCLUDE`"] - #[inline(always)] - pub fn is_include(&self) -> bool { - *self == SR12_A::INCLUDE - } -} -#[doc = "Field `SR12` writer - Include or exclude subregion 12 in region"] -pub type SR12_W<'a, const O: u8> = crate::BitWriter<'a, u32, SUBS_SPEC, SR12_A, O>; -impl<'a, const O: u8> SR12_W<'a, O> { - #[doc = "Exclude"] - #[inline(always)] - pub fn exclude(self) -> &'a mut W { - self.variant(SR12_A::EXCLUDE) - } - #[doc = "Include"] - #[inline(always)] - pub fn include(self) -> &'a mut W { - self.variant(SR12_A::INCLUDE) - } -} -#[doc = "Field `SR13` reader - Include or exclude subregion 13 in region"] -pub type SR13_R = crate::BitReader; -#[doc = "Include or exclude subregion 13 in region\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum SR13_A { - #[doc = "0: Exclude"] - EXCLUDE = 0, - #[doc = "1: Include"] - INCLUDE = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: SR13_A) -> Self { - variant as u8 != 0 - } -} -impl SR13_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> SR13_A { - match self.bits { - false => SR13_A::EXCLUDE, - true => SR13_A::INCLUDE, - } - } - #[doc = "Checks if the value of the field is `EXCLUDE`"] - #[inline(always)] - pub fn is_exclude(&self) -> bool { - *self == SR13_A::EXCLUDE - } - #[doc = "Checks if the value of the field is `INCLUDE`"] - #[inline(always)] - pub fn is_include(&self) -> bool { - *self == SR13_A::INCLUDE - } -} -#[doc = "Field `SR13` writer - Include or exclude subregion 13 in region"] -pub type SR13_W<'a, const O: u8> = crate::BitWriter<'a, u32, SUBS_SPEC, SR13_A, O>; -impl<'a, const O: u8> SR13_W<'a, O> { - #[doc = "Exclude"] - #[inline(always)] - pub fn exclude(self) -> &'a mut W { - self.variant(SR13_A::EXCLUDE) - } - #[doc = "Include"] - #[inline(always)] - pub fn include(self) -> &'a mut W { - self.variant(SR13_A::INCLUDE) - } -} -#[doc = "Field `SR14` reader - Include or exclude subregion 14 in region"] -pub type SR14_R = crate::BitReader; -#[doc = "Include or exclude subregion 14 in region\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum SR14_A { - #[doc = "0: Exclude"] - EXCLUDE = 0, - #[doc = "1: Include"] - INCLUDE = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: SR14_A) -> Self { - variant as u8 != 0 - } -} -impl SR14_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> SR14_A { - match self.bits { - false => SR14_A::EXCLUDE, - true => SR14_A::INCLUDE, - } - } - #[doc = "Checks if the value of the field is `EXCLUDE`"] - #[inline(always)] - pub fn is_exclude(&self) -> bool { - *self == SR14_A::EXCLUDE - } - #[doc = "Checks if the value of the field is `INCLUDE`"] - #[inline(always)] - pub fn is_include(&self) -> bool { - *self == SR14_A::INCLUDE - } -} -#[doc = "Field `SR14` writer - Include or exclude subregion 14 in region"] -pub type SR14_W<'a, const O: u8> = crate::BitWriter<'a, u32, SUBS_SPEC, SR14_A, O>; -impl<'a, const O: u8> SR14_W<'a, O> { - #[doc = "Exclude"] - #[inline(always)] - pub fn exclude(self) -> &'a mut W { - self.variant(SR14_A::EXCLUDE) - } - #[doc = "Include"] - #[inline(always)] - pub fn include(self) -> &'a mut W { - self.variant(SR14_A::INCLUDE) - } -} -#[doc = "Field `SR15` reader - Include or exclude subregion 15 in region"] -pub type SR15_R = crate::BitReader; -#[doc = "Include or exclude subregion 15 in region\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum SR15_A { - #[doc = "0: Exclude"] - EXCLUDE = 0, - #[doc = "1: Include"] - INCLUDE = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: SR15_A) -> Self { - variant as u8 != 0 - } -} -impl SR15_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> SR15_A { - match self.bits { - false => SR15_A::EXCLUDE, - true => SR15_A::INCLUDE, - } - } - #[doc = "Checks if the value of the field is `EXCLUDE`"] - #[inline(always)] - pub fn is_exclude(&self) -> bool { - *self == SR15_A::EXCLUDE - } - #[doc = "Checks if the value of the field is `INCLUDE`"] - #[inline(always)] - pub fn is_include(&self) -> bool { - *self == SR15_A::INCLUDE - } -} -#[doc = "Field `SR15` writer - Include or exclude subregion 15 in region"] -pub type SR15_W<'a, const O: u8> = crate::BitWriter<'a, u32, SUBS_SPEC, SR15_A, O>; -impl<'a, const O: u8> SR15_W<'a, O> { - #[doc = "Exclude"] - #[inline(always)] - pub fn exclude(self) -> &'a mut W { - self.variant(SR15_A::EXCLUDE) - } - #[doc = "Include"] - #[inline(always)] - pub fn include(self) -> &'a mut W { - self.variant(SR15_A::INCLUDE) - } -} -#[doc = "Field `SR16` reader - Include or exclude subregion 16 in region"] -pub type SR16_R = crate::BitReader; -#[doc = "Include or exclude subregion 16 in region\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum SR16_A { - #[doc = "0: Exclude"] - EXCLUDE = 0, - #[doc = "1: Include"] - INCLUDE = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: SR16_A) -> Self { - variant as u8 != 0 - } -} -impl SR16_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> SR16_A { - match self.bits { - false => SR16_A::EXCLUDE, - true => SR16_A::INCLUDE, - } - } - #[doc = "Checks if the value of the field is `EXCLUDE`"] - #[inline(always)] - pub fn is_exclude(&self) -> bool { - *self == SR16_A::EXCLUDE - } - #[doc = "Checks if the value of the field is `INCLUDE`"] - #[inline(always)] - pub fn is_include(&self) -> bool { - *self == SR16_A::INCLUDE - } -} -#[doc = "Field `SR16` writer - Include or exclude subregion 16 in region"] -pub type SR16_W<'a, const O: u8> = crate::BitWriter<'a, u32, SUBS_SPEC, SR16_A, O>; -impl<'a, const O: u8> SR16_W<'a, O> { - #[doc = "Exclude"] - #[inline(always)] - pub fn exclude(self) -> &'a mut W { - self.variant(SR16_A::EXCLUDE) - } - #[doc = "Include"] - #[inline(always)] - pub fn include(self) -> &'a mut W { - self.variant(SR16_A::INCLUDE) - } -} -#[doc = "Field `SR17` reader - Include or exclude subregion 17 in region"] -pub type SR17_R = crate::BitReader; -#[doc = "Include or exclude subregion 17 in region\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum SR17_A { - #[doc = "0: Exclude"] - EXCLUDE = 0, - #[doc = "1: Include"] - INCLUDE = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: SR17_A) -> Self { - variant as u8 != 0 - } -} -impl SR17_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> SR17_A { - match self.bits { - false => SR17_A::EXCLUDE, - true => SR17_A::INCLUDE, - } - } - #[doc = "Checks if the value of the field is `EXCLUDE`"] - #[inline(always)] - pub fn is_exclude(&self) -> bool { - *self == SR17_A::EXCLUDE - } - #[doc = "Checks if the value of the field is `INCLUDE`"] - #[inline(always)] - pub fn is_include(&self) -> bool { - *self == SR17_A::INCLUDE - } -} -#[doc = "Field `SR17` writer - Include or exclude subregion 17 in region"] -pub type SR17_W<'a, const O: u8> = crate::BitWriter<'a, u32, SUBS_SPEC, SR17_A, O>; -impl<'a, const O: u8> SR17_W<'a, O> { - #[doc = "Exclude"] - #[inline(always)] - pub fn exclude(self) -> &'a mut W { - self.variant(SR17_A::EXCLUDE) - } - #[doc = "Include"] - #[inline(always)] - pub fn include(self) -> &'a mut W { - self.variant(SR17_A::INCLUDE) - } -} -#[doc = "Field `SR18` reader - Include or exclude subregion 18 in region"] -pub type SR18_R = crate::BitReader; -#[doc = "Include or exclude subregion 18 in region\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum SR18_A { - #[doc = "0: Exclude"] - EXCLUDE = 0, - #[doc = "1: Include"] - INCLUDE = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: SR18_A) -> Self { - variant as u8 != 0 - } -} -impl SR18_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> SR18_A { - match self.bits { - false => SR18_A::EXCLUDE, - true => SR18_A::INCLUDE, - } - } - #[doc = "Checks if the value of the field is `EXCLUDE`"] - #[inline(always)] - pub fn is_exclude(&self) -> bool { - *self == SR18_A::EXCLUDE - } - #[doc = "Checks if the value of the field is `INCLUDE`"] - #[inline(always)] - pub fn is_include(&self) -> bool { - *self == SR18_A::INCLUDE - } -} -#[doc = "Field `SR18` writer - Include or exclude subregion 18 in region"] -pub type SR18_W<'a, const O: u8> = crate::BitWriter<'a, u32, SUBS_SPEC, SR18_A, O>; -impl<'a, const O: u8> SR18_W<'a, O> { - #[doc = "Exclude"] - #[inline(always)] - pub fn exclude(self) -> &'a mut W { - self.variant(SR18_A::EXCLUDE) - } - #[doc = "Include"] - #[inline(always)] - pub fn include(self) -> &'a mut W { - self.variant(SR18_A::INCLUDE) - } -} -#[doc = "Field `SR19` reader - Include or exclude subregion 19 in region"] -pub type SR19_R = crate::BitReader; -#[doc = "Include or exclude subregion 19 in region\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum SR19_A { - #[doc = "0: Exclude"] - EXCLUDE = 0, - #[doc = "1: Include"] - INCLUDE = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: SR19_A) -> Self { - variant as u8 != 0 - } -} -impl SR19_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> SR19_A { - match self.bits { - false => SR19_A::EXCLUDE, - true => SR19_A::INCLUDE, - } - } - #[doc = "Checks if the value of the field is `EXCLUDE`"] - #[inline(always)] - pub fn is_exclude(&self) -> bool { - *self == SR19_A::EXCLUDE - } - #[doc = "Checks if the value of the field is `INCLUDE`"] - #[inline(always)] - pub fn is_include(&self) -> bool { - *self == SR19_A::INCLUDE - } -} -#[doc = "Field `SR19` writer - Include or exclude subregion 19 in region"] -pub type SR19_W<'a, const O: u8> = crate::BitWriter<'a, u32, SUBS_SPEC, SR19_A, O>; -impl<'a, const O: u8> SR19_W<'a, O> { - #[doc = "Exclude"] - #[inline(always)] - pub fn exclude(self) -> &'a mut W { - self.variant(SR19_A::EXCLUDE) - } - #[doc = "Include"] - #[inline(always)] - pub fn include(self) -> &'a mut W { - self.variant(SR19_A::INCLUDE) - } -} -#[doc = "Field `SR20` reader - Include or exclude subregion 20 in region"] -pub type SR20_R = crate::BitReader; -#[doc = "Include or exclude subregion 20 in region\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum SR20_A { - #[doc = "0: Exclude"] - EXCLUDE = 0, - #[doc = "1: Include"] - INCLUDE = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: SR20_A) -> Self { - variant as u8 != 0 - } -} -impl SR20_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> SR20_A { - match self.bits { - false => SR20_A::EXCLUDE, - true => SR20_A::INCLUDE, - } - } - #[doc = "Checks if the value of the field is `EXCLUDE`"] - #[inline(always)] - pub fn is_exclude(&self) -> bool { - *self == SR20_A::EXCLUDE - } - #[doc = "Checks if the value of the field is `INCLUDE`"] - #[inline(always)] - pub fn is_include(&self) -> bool { - *self == SR20_A::INCLUDE - } -} -#[doc = "Field `SR20` writer - Include or exclude subregion 20 in region"] -pub type SR20_W<'a, const O: u8> = crate::BitWriter<'a, u32, SUBS_SPEC, SR20_A, O>; -impl<'a, const O: u8> SR20_W<'a, O> { - #[doc = "Exclude"] - #[inline(always)] - pub fn exclude(self) -> &'a mut W { - self.variant(SR20_A::EXCLUDE) - } - #[doc = "Include"] - #[inline(always)] - pub fn include(self) -> &'a mut W { - self.variant(SR20_A::INCLUDE) - } -} -#[doc = "Field `SR21` reader - Include or exclude subregion 21 in region"] -pub type SR21_R = crate::BitReader; -#[doc = "Include or exclude subregion 21 in region\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum SR21_A { - #[doc = "0: Exclude"] - EXCLUDE = 0, - #[doc = "1: Include"] - INCLUDE = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: SR21_A) -> Self { - variant as u8 != 0 - } -} -impl SR21_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> SR21_A { - match self.bits { - false => SR21_A::EXCLUDE, - true => SR21_A::INCLUDE, - } - } - #[doc = "Checks if the value of the field is `EXCLUDE`"] - #[inline(always)] - pub fn is_exclude(&self) -> bool { - *self == SR21_A::EXCLUDE - } - #[doc = "Checks if the value of the field is `INCLUDE`"] - #[inline(always)] - pub fn is_include(&self) -> bool { - *self == SR21_A::INCLUDE - } -} -#[doc = "Field `SR21` writer - Include or exclude subregion 21 in region"] -pub type SR21_W<'a, const O: u8> = crate::BitWriter<'a, u32, SUBS_SPEC, SR21_A, O>; -impl<'a, const O: u8> SR21_W<'a, O> { - #[doc = "Exclude"] - #[inline(always)] - pub fn exclude(self) -> &'a mut W { - self.variant(SR21_A::EXCLUDE) - } - #[doc = "Include"] - #[inline(always)] - pub fn include(self) -> &'a mut W { - self.variant(SR21_A::INCLUDE) - } -} -#[doc = "Field `SR22` reader - Include or exclude subregion 22 in region"] -pub type SR22_R = crate::BitReader; -#[doc = "Include or exclude subregion 22 in region\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum SR22_A { - #[doc = "0: Exclude"] - EXCLUDE = 0, - #[doc = "1: Include"] - INCLUDE = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: SR22_A) -> Self { - variant as u8 != 0 - } -} -impl SR22_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> SR22_A { - match self.bits { - false => SR22_A::EXCLUDE, - true => SR22_A::INCLUDE, - } - } - #[doc = "Checks if the value of the field is `EXCLUDE`"] - #[inline(always)] - pub fn is_exclude(&self) -> bool { - *self == SR22_A::EXCLUDE - } - #[doc = "Checks if the value of the field is `INCLUDE`"] - #[inline(always)] - pub fn is_include(&self) -> bool { - *self == SR22_A::INCLUDE - } -} -#[doc = "Field `SR22` writer - Include or exclude subregion 22 in region"] -pub type SR22_W<'a, const O: u8> = crate::BitWriter<'a, u32, SUBS_SPEC, SR22_A, O>; -impl<'a, const O: u8> SR22_W<'a, O> { - #[doc = "Exclude"] - #[inline(always)] - pub fn exclude(self) -> &'a mut W { - self.variant(SR22_A::EXCLUDE) - } - #[doc = "Include"] - #[inline(always)] - pub fn include(self) -> &'a mut W { - self.variant(SR22_A::INCLUDE) - } -} -#[doc = "Field `SR23` reader - Include or exclude subregion 23 in region"] -pub type SR23_R = crate::BitReader; -#[doc = "Include or exclude subregion 23 in region\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum SR23_A { - #[doc = "0: Exclude"] - EXCLUDE = 0, - #[doc = "1: Include"] - INCLUDE = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: SR23_A) -> Self { - variant as u8 != 0 - } -} -impl SR23_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> SR23_A { - match self.bits { - false => SR23_A::EXCLUDE, - true => SR23_A::INCLUDE, - } - } - #[doc = "Checks if the value of the field is `EXCLUDE`"] - #[inline(always)] - pub fn is_exclude(&self) -> bool { - *self == SR23_A::EXCLUDE - } - #[doc = "Checks if the value of the field is `INCLUDE`"] - #[inline(always)] - pub fn is_include(&self) -> bool { - *self == SR23_A::INCLUDE - } -} -#[doc = "Field `SR23` writer - Include or exclude subregion 23 in region"] -pub type SR23_W<'a, const O: u8> = crate::BitWriter<'a, u32, SUBS_SPEC, SR23_A, O>; -impl<'a, const O: u8> SR23_W<'a, O> { - #[doc = "Exclude"] - #[inline(always)] - pub fn exclude(self) -> &'a mut W { - self.variant(SR23_A::EXCLUDE) - } - #[doc = "Include"] - #[inline(always)] - pub fn include(self) -> &'a mut W { - self.variant(SR23_A::INCLUDE) - } -} -#[doc = "Field `SR24` reader - Include or exclude subregion 24 in region"] -pub type SR24_R = crate::BitReader; -#[doc = "Include or exclude subregion 24 in region\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum SR24_A { - #[doc = "0: Exclude"] - EXCLUDE = 0, - #[doc = "1: Include"] - INCLUDE = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: SR24_A) -> Self { - variant as u8 != 0 - } -} -impl SR24_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> SR24_A { - match self.bits { - false => SR24_A::EXCLUDE, - true => SR24_A::INCLUDE, - } - } - #[doc = "Checks if the value of the field is `EXCLUDE`"] - #[inline(always)] - pub fn is_exclude(&self) -> bool { - *self == SR24_A::EXCLUDE - } - #[doc = "Checks if the value of the field is `INCLUDE`"] - #[inline(always)] - pub fn is_include(&self) -> bool { - *self == SR24_A::INCLUDE - } -} -#[doc = "Field `SR24` writer - Include or exclude subregion 24 in region"] -pub type SR24_W<'a, const O: u8> = crate::BitWriter<'a, u32, SUBS_SPEC, SR24_A, O>; -impl<'a, const O: u8> SR24_W<'a, O> { - #[doc = "Exclude"] - #[inline(always)] - pub fn exclude(self) -> &'a mut W { - self.variant(SR24_A::EXCLUDE) - } - #[doc = "Include"] - #[inline(always)] - pub fn include(self) -> &'a mut W { - self.variant(SR24_A::INCLUDE) - } -} -#[doc = "Field `SR25` reader - Include or exclude subregion 25 in region"] -pub type SR25_R = crate::BitReader; -#[doc = "Include or exclude subregion 25 in region\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum SR25_A { - #[doc = "0: Exclude"] - EXCLUDE = 0, - #[doc = "1: Include"] - INCLUDE = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: SR25_A) -> Self { - variant as u8 != 0 - } -} -impl SR25_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> SR25_A { - match self.bits { - false => SR25_A::EXCLUDE, - true => SR25_A::INCLUDE, - } - } - #[doc = "Checks if the value of the field is `EXCLUDE`"] - #[inline(always)] - pub fn is_exclude(&self) -> bool { - *self == SR25_A::EXCLUDE - } - #[doc = "Checks if the value of the field is `INCLUDE`"] - #[inline(always)] - pub fn is_include(&self) -> bool { - *self == SR25_A::INCLUDE - } -} -#[doc = "Field `SR25` writer - Include or exclude subregion 25 in region"] -pub type SR25_W<'a, const O: u8> = crate::BitWriter<'a, u32, SUBS_SPEC, SR25_A, O>; -impl<'a, const O: u8> SR25_W<'a, O> { - #[doc = "Exclude"] - #[inline(always)] - pub fn exclude(self) -> &'a mut W { - self.variant(SR25_A::EXCLUDE) - } - #[doc = "Include"] - #[inline(always)] - pub fn include(self) -> &'a mut W { - self.variant(SR25_A::INCLUDE) - } -} -#[doc = "Field `SR26` reader - Include or exclude subregion 26 in region"] -pub type SR26_R = crate::BitReader; -#[doc = "Include or exclude subregion 26 in region\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum SR26_A { - #[doc = "0: Exclude"] - EXCLUDE = 0, - #[doc = "1: Include"] - INCLUDE = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: SR26_A) -> Self { - variant as u8 != 0 - } -} -impl SR26_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> SR26_A { - match self.bits { - false => SR26_A::EXCLUDE, - true => SR26_A::INCLUDE, - } - } - #[doc = "Checks if the value of the field is `EXCLUDE`"] - #[inline(always)] - pub fn is_exclude(&self) -> bool { - *self == SR26_A::EXCLUDE - } - #[doc = "Checks if the value of the field is `INCLUDE`"] - #[inline(always)] - pub fn is_include(&self) -> bool { - *self == SR26_A::INCLUDE - } -} -#[doc = "Field `SR26` writer - Include or exclude subregion 26 in region"] -pub type SR26_W<'a, const O: u8> = crate::BitWriter<'a, u32, SUBS_SPEC, SR26_A, O>; -impl<'a, const O: u8> SR26_W<'a, O> { - #[doc = "Exclude"] - #[inline(always)] - pub fn exclude(self) -> &'a mut W { - self.variant(SR26_A::EXCLUDE) - } - #[doc = "Include"] - #[inline(always)] - pub fn include(self) -> &'a mut W { - self.variant(SR26_A::INCLUDE) - } -} -#[doc = "Field `SR27` reader - Include or exclude subregion 27 in region"] -pub type SR27_R = crate::BitReader; -#[doc = "Include or exclude subregion 27 in region\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum SR27_A { - #[doc = "0: Exclude"] - EXCLUDE = 0, - #[doc = "1: Include"] - INCLUDE = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: SR27_A) -> Self { - variant as u8 != 0 - } -} -impl SR27_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> SR27_A { - match self.bits { - false => SR27_A::EXCLUDE, - true => SR27_A::INCLUDE, - } - } - #[doc = "Checks if the value of the field is `EXCLUDE`"] - #[inline(always)] - pub fn is_exclude(&self) -> bool { - *self == SR27_A::EXCLUDE - } - #[doc = "Checks if the value of the field is `INCLUDE`"] - #[inline(always)] - pub fn is_include(&self) -> bool { - *self == SR27_A::INCLUDE - } -} -#[doc = "Field `SR27` writer - Include or exclude subregion 27 in region"] -pub type SR27_W<'a, const O: u8> = crate::BitWriter<'a, u32, SUBS_SPEC, SR27_A, O>; -impl<'a, const O: u8> SR27_W<'a, O> { - #[doc = "Exclude"] - #[inline(always)] - pub fn exclude(self) -> &'a mut W { - self.variant(SR27_A::EXCLUDE) - } - #[doc = "Include"] - #[inline(always)] - pub fn include(self) -> &'a mut W { - self.variant(SR27_A::INCLUDE) - } -} -#[doc = "Field `SR28` reader - Include or exclude subregion 28 in region"] -pub type SR28_R = crate::BitReader; -#[doc = "Include or exclude subregion 28 in region\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum SR28_A { - #[doc = "0: Exclude"] - EXCLUDE = 0, - #[doc = "1: Include"] - INCLUDE = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: SR28_A) -> Self { - variant as u8 != 0 - } -} -impl SR28_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> SR28_A { - match self.bits { - false => SR28_A::EXCLUDE, - true => SR28_A::INCLUDE, - } - } - #[doc = "Checks if the value of the field is `EXCLUDE`"] - #[inline(always)] - pub fn is_exclude(&self) -> bool { - *self == SR28_A::EXCLUDE - } - #[doc = "Checks if the value of the field is `INCLUDE`"] - #[inline(always)] - pub fn is_include(&self) -> bool { - *self == SR28_A::INCLUDE - } -} -#[doc = "Field `SR28` writer - Include or exclude subregion 28 in region"] -pub type SR28_W<'a, const O: u8> = crate::BitWriter<'a, u32, SUBS_SPEC, SR28_A, O>; -impl<'a, const O: u8> SR28_W<'a, O> { - #[doc = "Exclude"] - #[inline(always)] - pub fn exclude(self) -> &'a mut W { - self.variant(SR28_A::EXCLUDE) - } - #[doc = "Include"] - #[inline(always)] - pub fn include(self) -> &'a mut W { - self.variant(SR28_A::INCLUDE) - } -} -#[doc = "Field `SR29` reader - Include or exclude subregion 29 in region"] -pub type SR29_R = crate::BitReader; -#[doc = "Include or exclude subregion 29 in region\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum SR29_A { - #[doc = "0: Exclude"] - EXCLUDE = 0, - #[doc = "1: Include"] - INCLUDE = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: SR29_A) -> Self { - variant as u8 != 0 - } -} -impl SR29_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> SR29_A { - match self.bits { - false => SR29_A::EXCLUDE, - true => SR29_A::INCLUDE, - } - } - #[doc = "Checks if the value of the field is `EXCLUDE`"] - #[inline(always)] - pub fn is_exclude(&self) -> bool { - *self == SR29_A::EXCLUDE - } - #[doc = "Checks if the value of the field is `INCLUDE`"] - #[inline(always)] - pub fn is_include(&self) -> bool { - *self == SR29_A::INCLUDE - } -} -#[doc = "Field `SR29` writer - Include or exclude subregion 29 in region"] -pub type SR29_W<'a, const O: u8> = crate::BitWriter<'a, u32, SUBS_SPEC, SR29_A, O>; -impl<'a, const O: u8> SR29_W<'a, O> { - #[doc = "Exclude"] - #[inline(always)] - pub fn exclude(self) -> &'a mut W { - self.variant(SR29_A::EXCLUDE) - } - #[doc = "Include"] - #[inline(always)] - pub fn include(self) -> &'a mut W { - self.variant(SR29_A::INCLUDE) - } -} -#[doc = "Field `SR30` reader - Include or exclude subregion 30 in region"] -pub type SR30_R = crate::BitReader; -#[doc = "Include or exclude subregion 30 in region\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum SR30_A { - #[doc = "0: Exclude"] - EXCLUDE = 0, - #[doc = "1: Include"] - INCLUDE = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: SR30_A) -> Self { - variant as u8 != 0 - } -} -impl SR30_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> SR30_A { - match self.bits { - false => SR30_A::EXCLUDE, - true => SR30_A::INCLUDE, - } - } - #[doc = "Checks if the value of the field is `EXCLUDE`"] - #[inline(always)] - pub fn is_exclude(&self) -> bool { - *self == SR30_A::EXCLUDE - } - #[doc = "Checks if the value of the field is `INCLUDE`"] - #[inline(always)] - pub fn is_include(&self) -> bool { - *self == SR30_A::INCLUDE - } -} -#[doc = "Field `SR30` writer - Include or exclude subregion 30 in region"] -pub type SR30_W<'a, const O: u8> = crate::BitWriter<'a, u32, SUBS_SPEC, SR30_A, O>; -impl<'a, const O: u8> SR30_W<'a, O> { - #[doc = "Exclude"] - #[inline(always)] - pub fn exclude(self) -> &'a mut W { - self.variant(SR30_A::EXCLUDE) - } - #[doc = "Include"] - #[inline(always)] - pub fn include(self) -> &'a mut W { - self.variant(SR30_A::INCLUDE) - } -} -#[doc = "Field `SR31` reader - Include or exclude subregion 31 in region"] -pub type SR31_R = crate::BitReader; -#[doc = "Include or exclude subregion 31 in region\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum SR31_A { - #[doc = "0: Exclude"] - EXCLUDE = 0, - #[doc = "1: Include"] - INCLUDE = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: SR31_A) -> Self { - variant as u8 != 0 - } -} -impl SR31_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> SR31_A { - match self.bits { - false => SR31_A::EXCLUDE, - true => SR31_A::INCLUDE, - } - } - #[doc = "Checks if the value of the field is `EXCLUDE`"] - #[inline(always)] - pub fn is_exclude(&self) -> bool { - *self == SR31_A::EXCLUDE - } - #[doc = "Checks if the value of the field is `INCLUDE`"] - #[inline(always)] - pub fn is_include(&self) -> bool { - *self == SR31_A::INCLUDE - } -} -#[doc = "Field `SR31` writer - Include or exclude subregion 31 in region"] -pub type SR31_W<'a, const O: u8> = crate::BitWriter<'a, u32, SUBS_SPEC, SR31_A, O>; -impl<'a, const O: u8> SR31_W<'a, O> { - #[doc = "Exclude"] - #[inline(always)] - pub fn exclude(self) -> &'a mut W { - self.variant(SR31_A::EXCLUDE) - } - #[doc = "Include"] - #[inline(always)] - pub fn include(self) -> &'a mut W { - self.variant(SR31_A::INCLUDE) - } -} -impl R { - #[doc = "Bit 0 - Include or exclude subregion 0 in region"] - #[inline(always)] - pub fn sr0(&self) -> SR0_R { - SR0_R::new((self.bits & 1) != 0) - } - #[doc = "Bit 1 - Include or exclude subregion 1 in region"] - #[inline(always)] - pub fn sr1(&self) -> SR1_R { - SR1_R::new(((self.bits >> 1) & 1) != 0) - } - #[doc = "Bit 2 - Include or exclude subregion 2 in region"] - #[inline(always)] - pub fn sr2(&self) -> SR2_R { - SR2_R::new(((self.bits >> 2) & 1) != 0) - } - #[doc = "Bit 3 - Include or exclude subregion 3 in region"] - #[inline(always)] - pub fn sr3(&self) -> SR3_R { - SR3_R::new(((self.bits >> 3) & 1) != 0) - } - #[doc = "Bit 4 - Include or exclude subregion 4 in region"] - #[inline(always)] - pub fn sr4(&self) -> SR4_R { - SR4_R::new(((self.bits >> 4) & 1) != 0) - } - #[doc = "Bit 5 - Include or exclude subregion 5 in region"] - #[inline(always)] - pub fn sr5(&self) -> SR5_R { - SR5_R::new(((self.bits >> 5) & 1) != 0) - } - #[doc = "Bit 6 - Include or exclude subregion 6 in region"] - #[inline(always)] - pub fn sr6(&self) -> SR6_R { - SR6_R::new(((self.bits >> 6) & 1) != 0) - } - #[doc = "Bit 7 - Include or exclude subregion 7 in region"] - #[inline(always)] - pub fn sr7(&self) -> SR7_R { - SR7_R::new(((self.bits >> 7) & 1) != 0) - } - #[doc = "Bit 8 - Include or exclude subregion 8 in region"] - #[inline(always)] - pub fn sr8(&self) -> SR8_R { - SR8_R::new(((self.bits >> 8) & 1) != 0) - } - #[doc = "Bit 9 - Include or exclude subregion 9 in region"] - #[inline(always)] - pub fn sr9(&self) -> SR9_R { - SR9_R::new(((self.bits >> 9) & 1) != 0) - } - #[doc = "Bit 10 - Include or exclude subregion 10 in region"] - #[inline(always)] - pub fn sr10(&self) -> SR10_R { - SR10_R::new(((self.bits >> 10) & 1) != 0) - } - #[doc = "Bit 11 - Include or exclude subregion 11 in region"] - #[inline(always)] - pub fn sr11(&self) -> SR11_R { - SR11_R::new(((self.bits >> 11) & 1) != 0) - } - #[doc = "Bit 12 - Include or exclude subregion 12 in region"] - #[inline(always)] - pub fn sr12(&self) -> SR12_R { - SR12_R::new(((self.bits >> 12) & 1) != 0) - } - #[doc = "Bit 13 - Include or exclude subregion 13 in region"] - #[inline(always)] - pub fn sr13(&self) -> SR13_R { - SR13_R::new(((self.bits >> 13) & 1) != 0) - } - #[doc = "Bit 14 - Include or exclude subregion 14 in region"] - #[inline(always)] - pub fn sr14(&self) -> SR14_R { - SR14_R::new(((self.bits >> 14) & 1) != 0) - } - #[doc = "Bit 15 - Include or exclude subregion 15 in region"] - #[inline(always)] - pub fn sr15(&self) -> SR15_R { - SR15_R::new(((self.bits >> 15) & 1) != 0) - } - #[doc = "Bit 16 - Include or exclude subregion 16 in region"] - #[inline(always)] - pub fn sr16(&self) -> SR16_R { - SR16_R::new(((self.bits >> 16) & 1) != 0) - } - #[doc = "Bit 17 - Include or exclude subregion 17 in region"] - #[inline(always)] - pub fn sr17(&self) -> SR17_R { - SR17_R::new(((self.bits >> 17) & 1) != 0) - } - #[doc = "Bit 18 - Include or exclude subregion 18 in region"] - #[inline(always)] - pub fn sr18(&self) -> SR18_R { - SR18_R::new(((self.bits >> 18) & 1) != 0) - } - #[doc = "Bit 19 - Include or exclude subregion 19 in region"] - #[inline(always)] - pub fn sr19(&self) -> SR19_R { - SR19_R::new(((self.bits >> 19) & 1) != 0) - } - #[doc = "Bit 20 - Include or exclude subregion 20 in region"] - #[inline(always)] - pub fn sr20(&self) -> SR20_R { - SR20_R::new(((self.bits >> 20) & 1) != 0) - } - #[doc = "Bit 21 - Include or exclude subregion 21 in region"] - #[inline(always)] - pub fn sr21(&self) -> SR21_R { - SR21_R::new(((self.bits >> 21) & 1) != 0) - } - #[doc = "Bit 22 - Include or exclude subregion 22 in region"] - #[inline(always)] - pub fn sr22(&self) -> SR22_R { - SR22_R::new(((self.bits >> 22) & 1) != 0) - } - #[doc = "Bit 23 - Include or exclude subregion 23 in region"] - #[inline(always)] - pub fn sr23(&self) -> SR23_R { - SR23_R::new(((self.bits >> 23) & 1) != 0) - } - #[doc = "Bit 24 - Include or exclude subregion 24 in region"] - #[inline(always)] - pub fn sr24(&self) -> SR24_R { - SR24_R::new(((self.bits >> 24) & 1) != 0) - } - #[doc = "Bit 25 - Include or exclude subregion 25 in region"] - #[inline(always)] - pub fn sr25(&self) -> SR25_R { - SR25_R::new(((self.bits >> 25) & 1) != 0) - } - #[doc = "Bit 26 - Include or exclude subregion 26 in region"] - #[inline(always)] - pub fn sr26(&self) -> SR26_R { - SR26_R::new(((self.bits >> 26) & 1) != 0) - } - #[doc = "Bit 27 - Include or exclude subregion 27 in region"] - #[inline(always)] - pub fn sr27(&self) -> SR27_R { - SR27_R::new(((self.bits >> 27) & 1) != 0) - } - #[doc = "Bit 28 - Include or exclude subregion 28 in region"] - #[inline(always)] - pub fn sr28(&self) -> SR28_R { - SR28_R::new(((self.bits >> 28) & 1) != 0) - } - #[doc = "Bit 29 - Include or exclude subregion 29 in region"] - #[inline(always)] - pub fn sr29(&self) -> SR29_R { - SR29_R::new(((self.bits >> 29) & 1) != 0) - } - #[doc = "Bit 30 - Include or exclude subregion 30 in region"] - #[inline(always)] - pub fn sr30(&self) -> SR30_R { - SR30_R::new(((self.bits >> 30) & 1) != 0) - } - #[doc = "Bit 31 - Include or exclude subregion 31 in region"] - #[inline(always)] - pub fn sr31(&self) -> SR31_R { - SR31_R::new(((self.bits >> 31) & 1) != 0) - } -} -impl W { - #[doc = "Bit 0 - Include or exclude subregion 0 in region"] - #[inline(always)] - #[must_use] - pub fn sr0(&mut self) -> SR0_W<0> { - SR0_W::new(self) - } - #[doc = "Bit 1 - Include or exclude subregion 1 in region"] - #[inline(always)] - #[must_use] - pub fn sr1(&mut self) -> SR1_W<1> { - SR1_W::new(self) - } - #[doc = "Bit 2 - Include or exclude subregion 2 in region"] - #[inline(always)] - #[must_use] - pub fn sr2(&mut self) -> SR2_W<2> { - SR2_W::new(self) - } - #[doc = "Bit 3 - Include or exclude subregion 3 in region"] - #[inline(always)] - #[must_use] - pub fn sr3(&mut self) -> SR3_W<3> { - SR3_W::new(self) - } - #[doc = "Bit 4 - Include or exclude subregion 4 in region"] - #[inline(always)] - #[must_use] - pub fn sr4(&mut self) -> SR4_W<4> { - SR4_W::new(self) - } - #[doc = "Bit 5 - Include or exclude subregion 5 in region"] - #[inline(always)] - #[must_use] - pub fn sr5(&mut self) -> SR5_W<5> { - SR5_W::new(self) - } - #[doc = "Bit 6 - Include or exclude subregion 6 in region"] - #[inline(always)] - #[must_use] - pub fn sr6(&mut self) -> SR6_W<6> { - SR6_W::new(self) - } - #[doc = "Bit 7 - Include or exclude subregion 7 in region"] - #[inline(always)] - #[must_use] - pub fn sr7(&mut self) -> SR7_W<7> { - SR7_W::new(self) - } - #[doc = "Bit 8 - Include or exclude subregion 8 in region"] - #[inline(always)] - #[must_use] - pub fn sr8(&mut self) -> SR8_W<8> { - SR8_W::new(self) - } - #[doc = "Bit 9 - Include or exclude subregion 9 in region"] - #[inline(always)] - #[must_use] - pub fn sr9(&mut self) -> SR9_W<9> { - SR9_W::new(self) - } - #[doc = "Bit 10 - Include or exclude subregion 10 in region"] - #[inline(always)] - #[must_use] - pub fn sr10(&mut self) -> SR10_W<10> { - SR10_W::new(self) - } - #[doc = "Bit 11 - Include or exclude subregion 11 in region"] - #[inline(always)] - #[must_use] - pub fn sr11(&mut self) -> SR11_W<11> { - SR11_W::new(self) - } - #[doc = "Bit 12 - Include or exclude subregion 12 in region"] - #[inline(always)] - #[must_use] - pub fn sr12(&mut self) -> SR12_W<12> { - SR12_W::new(self) - } - #[doc = "Bit 13 - Include or exclude subregion 13 in region"] - #[inline(always)] - #[must_use] - pub fn sr13(&mut self) -> SR13_W<13> { - SR13_W::new(self) - } - #[doc = "Bit 14 - Include or exclude subregion 14 in region"] - #[inline(always)] - #[must_use] - pub fn sr14(&mut self) -> SR14_W<14> { - SR14_W::new(self) - } - #[doc = "Bit 15 - Include or exclude subregion 15 in region"] - #[inline(always)] - #[must_use] - pub fn sr15(&mut self) -> SR15_W<15> { - SR15_W::new(self) - } - #[doc = "Bit 16 - Include or exclude subregion 16 in region"] - #[inline(always)] - #[must_use] - pub fn sr16(&mut self) -> SR16_W<16> { - SR16_W::new(self) - } - #[doc = "Bit 17 - Include or exclude subregion 17 in region"] - #[inline(always)] - #[must_use] - pub fn sr17(&mut self) -> SR17_W<17> { - SR17_W::new(self) - } - #[doc = "Bit 18 - Include or exclude subregion 18 in region"] - #[inline(always)] - #[must_use] - pub fn sr18(&mut self) -> SR18_W<18> { - SR18_W::new(self) - } - #[doc = "Bit 19 - Include or exclude subregion 19 in region"] - #[inline(always)] - #[must_use] - pub fn sr19(&mut self) -> SR19_W<19> { - SR19_W::new(self) - } - #[doc = "Bit 20 - Include or exclude subregion 20 in region"] - #[inline(always)] - #[must_use] - pub fn sr20(&mut self) -> SR20_W<20> { - SR20_W::new(self) - } - #[doc = "Bit 21 - Include or exclude subregion 21 in region"] - #[inline(always)] - #[must_use] - pub fn sr21(&mut self) -> SR21_W<21> { - SR21_W::new(self) - } - #[doc = "Bit 22 - Include or exclude subregion 22 in region"] - #[inline(always)] - #[must_use] - pub fn sr22(&mut self) -> SR22_W<22> { - SR22_W::new(self) - } - #[doc = "Bit 23 - Include or exclude subregion 23 in region"] - #[inline(always)] - #[must_use] - pub fn sr23(&mut self) -> SR23_W<23> { - SR23_W::new(self) - } - #[doc = "Bit 24 - Include or exclude subregion 24 in region"] - #[inline(always)] - #[must_use] - pub fn sr24(&mut self) -> SR24_W<24> { - SR24_W::new(self) - } - #[doc = "Bit 25 - Include or exclude subregion 25 in region"] - #[inline(always)] - #[must_use] - pub fn sr25(&mut self) -> SR25_W<25> { - SR25_W::new(self) - } - #[doc = "Bit 26 - Include or exclude subregion 26 in region"] - #[inline(always)] - #[must_use] - pub fn sr26(&mut self) -> SR26_W<26> { - SR26_W::new(self) - } - #[doc = "Bit 27 - Include or exclude subregion 27 in region"] - #[inline(always)] - #[must_use] - pub fn sr27(&mut self) -> SR27_W<27> { - SR27_W::new(self) - } - #[doc = "Bit 28 - Include or exclude subregion 28 in region"] - #[inline(always)] - #[must_use] - pub fn sr28(&mut self) -> SR28_W<28> { - SR28_W::new(self) - } - #[doc = "Bit 29 - Include or exclude subregion 29 in region"] - #[inline(always)] - #[must_use] - pub fn sr29(&mut self) -> SR29_W<29> { - SR29_W::new(self) - } - #[doc = "Bit 30 - Include or exclude subregion 30 in region"] - #[inline(always)] - #[must_use] - pub fn sr30(&mut self) -> SR30_W<30> { - SR30_W::new(self) - } - #[doc = "Bit 31 - Include or exclude subregion 31 in region"] - #[inline(always)] - #[must_use] - pub fn sr31(&mut self) -> SR31_W<31> { - SR31_W::new(self) - } - #[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 = "Description cluster: Subregions of region n\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 [subs](index.html) module"] -pub struct SUBS_SPEC; -impl crate::RegisterSpec for SUBS_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [subs::R](R) reader structure"] -impl crate::Readable for SUBS_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [subs::W](W) writer structure"] -impl crate::Writable for SUBS_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets SUBS to value 0"] -impl crate::Resettable for SUBS_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/mwu/region.rs b/down-the-stack/dk_pac/src/mwu/region.rs deleted file mode 100644 index 7dbf477..0000000 --- a/down-the-stack/dk_pac/src/mwu/region.rs +++ /dev/null @@ -1,16 +0,0 @@ -#[doc = r"Register block"] -#[repr(C)] -pub struct REGION { - #[doc = "0x00 - Description cluster: Start address for region n"] - pub start: START, - #[doc = "0x04 - Description cluster: End address of region n"] - pub end: END, -} -#[doc = "START (rw) register accessor: an alias for `Reg`"] -pub type START = crate::Reg; -#[doc = "Description cluster: Start address for region n"] -pub mod start; -#[doc = "END (rw) register accessor: an alias for `Reg`"] -pub type END = crate::Reg; -#[doc = "Description cluster: End address of region n"] -pub mod end; diff --git a/down-the-stack/dk_pac/src/mwu/region/end.rs b/down-the-stack/dk_pac/src/mwu/region/end.rs deleted file mode 100644 index 18aefa0..0000000 --- a/down-the-stack/dk_pac/src/mwu/region/end.rs +++ /dev/null @@ -1,80 +0,0 @@ -#[doc = "Register `END` 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 `END` 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 `END` reader - End address of region."] -pub type END_R = crate::FieldReader; -#[doc = "Field `END` writer - End address of region."] -pub type END_W<'a, const O: u8> = crate::FieldWriter<'a, u32, END_SPEC, u32, u32, 32, O>; -impl R { - #[doc = "Bits 0:31 - End address of region."] - #[inline(always)] - pub fn end(&self) -> END_R { - END_R::new(self.bits) - } -} -impl W { - #[doc = "Bits 0:31 - End address of region."] - #[inline(always)] - #[must_use] - pub fn end(&mut self) -> END_W<0> { - END_W::new(self) - } - #[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 = "Description cluster: End address of region n\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 [end](index.html) module"] -pub struct END_SPEC; -impl crate::RegisterSpec for END_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [end::R](R) reader structure"] -impl crate::Readable for END_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [end::W](W) writer structure"] -impl crate::Writable for END_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets END to value 0"] -impl crate::Resettable for END_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/mwu/region/start.rs b/down-the-stack/dk_pac/src/mwu/region/start.rs deleted file mode 100644 index 7bb666e..0000000 --- a/down-the-stack/dk_pac/src/mwu/region/start.rs +++ /dev/null @@ -1,80 +0,0 @@ -#[doc = "Register `START` 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 `START` 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 `START` reader - Start address for region"] -pub type START_R = crate::FieldReader; -#[doc = "Field `START` writer - Start address for region"] -pub type START_W<'a, const O: u8> = crate::FieldWriter<'a, u32, START_SPEC, u32, u32, 32, O>; -impl R { - #[doc = "Bits 0:31 - Start address for region"] - #[inline(always)] - pub fn start(&self) -> START_R { - START_R::new(self.bits) - } -} -impl W { - #[doc = "Bits 0:31 - Start address for region"] - #[inline(always)] - #[must_use] - pub fn start(&mut self) -> START_W<0> { - 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 - } -} -#[doc = "Description cluster: Start address for region n\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 [start](index.html) module"] -pub struct START_SPEC; -impl crate::RegisterSpec for START_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [start::R](R) reader structure"] -impl crate::Readable for START_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [start::W](W) writer structure"] -impl crate::Writable for 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 START to value 0"] -impl crate::Resettable for START_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/mwu/regionen.rs b/down-the-stack/dk_pac/src/mwu/regionen.rs deleted file mode 100644 index 41fca1e..0000000 --- a/down-the-stack/dk_pac/src/mwu/regionen.rs +++ /dev/null @@ -1,797 +0,0 @@ -#[doc = "Register `REGIONEN` 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 `REGIONEN` 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 `RGN0WA` reader - Enable/disable write access watch in region\\[0\\]"] -pub type RGN0WA_R = crate::BitReader; -#[doc = "Enable/disable write access watch in region\\[0\\]\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum RGN0WA_A { - #[doc = "0: Disable write access watch in this region"] - DISABLE = 0, - #[doc = "1: Enable write access watch in this region"] - ENABLE = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: RGN0WA_A) -> Self { - variant as u8 != 0 - } -} -impl RGN0WA_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> RGN0WA_A { - match self.bits { - false => RGN0WA_A::DISABLE, - true => RGN0WA_A::ENABLE, - } - } - #[doc = "Checks if the value of the field is `DISABLE`"] - #[inline(always)] - pub fn is_disable(&self) -> bool { - *self == RGN0WA_A::DISABLE - } - #[doc = "Checks if the value of the field is `ENABLE`"] - #[inline(always)] - pub fn is_enable(&self) -> bool { - *self == RGN0WA_A::ENABLE - } -} -#[doc = "Field `RGN0WA` writer - Enable/disable write access watch in region\\[0\\]"] -pub type RGN0WA_W<'a, const O: u8> = crate::BitWriter<'a, u32, REGIONEN_SPEC, RGN0WA_A, O>; -impl<'a, const O: u8> RGN0WA_W<'a, O> { - #[doc = "Disable write access watch in this region"] - #[inline(always)] - pub fn disable(self) -> &'a mut W { - self.variant(RGN0WA_A::DISABLE) - } - #[doc = "Enable write access watch in this region"] - #[inline(always)] - pub fn enable(self) -> &'a mut W { - self.variant(RGN0WA_A::ENABLE) - } -} -#[doc = "Field `RGN0RA` reader - Enable/disable read access watch in region\\[0\\]"] -pub type RGN0RA_R = crate::BitReader; -#[doc = "Enable/disable read access watch in region\\[0\\]\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum RGN0RA_A { - #[doc = "0: Disable read access watch in this region"] - DISABLE = 0, - #[doc = "1: Enable read access watch in this region"] - ENABLE = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: RGN0RA_A) -> Self { - variant as u8 != 0 - } -} -impl RGN0RA_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> RGN0RA_A { - match self.bits { - false => RGN0RA_A::DISABLE, - true => RGN0RA_A::ENABLE, - } - } - #[doc = "Checks if the value of the field is `DISABLE`"] - #[inline(always)] - pub fn is_disable(&self) -> bool { - *self == RGN0RA_A::DISABLE - } - #[doc = "Checks if the value of the field is `ENABLE`"] - #[inline(always)] - pub fn is_enable(&self) -> bool { - *self == RGN0RA_A::ENABLE - } -} -#[doc = "Field `RGN0RA` writer - Enable/disable read access watch in region\\[0\\]"] -pub type RGN0RA_W<'a, const O: u8> = crate::BitWriter<'a, u32, REGIONEN_SPEC, RGN0RA_A, O>; -impl<'a, const O: u8> RGN0RA_W<'a, O> { - #[doc = "Disable read access watch in this region"] - #[inline(always)] - pub fn disable(self) -> &'a mut W { - self.variant(RGN0RA_A::DISABLE) - } - #[doc = "Enable read access watch in this region"] - #[inline(always)] - pub fn enable(self) -> &'a mut W { - self.variant(RGN0RA_A::ENABLE) - } -} -#[doc = "Field `RGN1WA` reader - Enable/disable write access watch in region\\[1\\]"] -pub type RGN1WA_R = crate::BitReader; -#[doc = "Enable/disable write access watch in region\\[1\\]\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum RGN1WA_A { - #[doc = "0: Disable write access watch in this region"] - DISABLE = 0, - #[doc = "1: Enable write access watch in this region"] - ENABLE = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: RGN1WA_A) -> Self { - variant as u8 != 0 - } -} -impl RGN1WA_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> RGN1WA_A { - match self.bits { - false => RGN1WA_A::DISABLE, - true => RGN1WA_A::ENABLE, - } - } - #[doc = "Checks if the value of the field is `DISABLE`"] - #[inline(always)] - pub fn is_disable(&self) -> bool { - *self == RGN1WA_A::DISABLE - } - #[doc = "Checks if the value of the field is `ENABLE`"] - #[inline(always)] - pub fn is_enable(&self) -> bool { - *self == RGN1WA_A::ENABLE - } -} -#[doc = "Field `RGN1WA` writer - Enable/disable write access watch in region\\[1\\]"] -pub type RGN1WA_W<'a, const O: u8> = crate::BitWriter<'a, u32, REGIONEN_SPEC, RGN1WA_A, O>; -impl<'a, const O: u8> RGN1WA_W<'a, O> { - #[doc = "Disable write access watch in this region"] - #[inline(always)] - pub fn disable(self) -> &'a mut W { - self.variant(RGN1WA_A::DISABLE) - } - #[doc = "Enable write access watch in this region"] - #[inline(always)] - pub fn enable(self) -> &'a mut W { - self.variant(RGN1WA_A::ENABLE) - } -} -#[doc = "Field `RGN1RA` reader - Enable/disable read access watch in region\\[1\\]"] -pub type RGN1RA_R = crate::BitReader; -#[doc = "Enable/disable read access watch in region\\[1\\]\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum RGN1RA_A { - #[doc = "0: Disable read access watch in this region"] - DISABLE = 0, - #[doc = "1: Enable read access watch in this region"] - ENABLE = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: RGN1RA_A) -> Self { - variant as u8 != 0 - } -} -impl RGN1RA_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> RGN1RA_A { - match self.bits { - false => RGN1RA_A::DISABLE, - true => RGN1RA_A::ENABLE, - } - } - #[doc = "Checks if the value of the field is `DISABLE`"] - #[inline(always)] - pub fn is_disable(&self) -> bool { - *self == RGN1RA_A::DISABLE - } - #[doc = "Checks if the value of the field is `ENABLE`"] - #[inline(always)] - pub fn is_enable(&self) -> bool { - *self == RGN1RA_A::ENABLE - } -} -#[doc = "Field `RGN1RA` writer - Enable/disable read access watch in region\\[1\\]"] -pub type RGN1RA_W<'a, const O: u8> = crate::BitWriter<'a, u32, REGIONEN_SPEC, RGN1RA_A, O>; -impl<'a, const O: u8> RGN1RA_W<'a, O> { - #[doc = "Disable read access watch in this region"] - #[inline(always)] - pub fn disable(self) -> &'a mut W { - self.variant(RGN1RA_A::DISABLE) - } - #[doc = "Enable read access watch in this region"] - #[inline(always)] - pub fn enable(self) -> &'a mut W { - self.variant(RGN1RA_A::ENABLE) - } -} -#[doc = "Field `RGN2WA` reader - Enable/disable write access watch in region\\[2\\]"] -pub type RGN2WA_R = crate::BitReader; -#[doc = "Enable/disable write access watch in region\\[2\\]\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum RGN2WA_A { - #[doc = "0: Disable write access watch in this region"] - DISABLE = 0, - #[doc = "1: Enable write access watch in this region"] - ENABLE = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: RGN2WA_A) -> Self { - variant as u8 != 0 - } -} -impl RGN2WA_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> RGN2WA_A { - match self.bits { - false => RGN2WA_A::DISABLE, - true => RGN2WA_A::ENABLE, - } - } - #[doc = "Checks if the value of the field is `DISABLE`"] - #[inline(always)] - pub fn is_disable(&self) -> bool { - *self == RGN2WA_A::DISABLE - } - #[doc = "Checks if the value of the field is `ENABLE`"] - #[inline(always)] - pub fn is_enable(&self) -> bool { - *self == RGN2WA_A::ENABLE - } -} -#[doc = "Field `RGN2WA` writer - Enable/disable write access watch in region\\[2\\]"] -pub type RGN2WA_W<'a, const O: u8> = crate::BitWriter<'a, u32, REGIONEN_SPEC, RGN2WA_A, O>; -impl<'a, const O: u8> RGN2WA_W<'a, O> { - #[doc = "Disable write access watch in this region"] - #[inline(always)] - pub fn disable(self) -> &'a mut W { - self.variant(RGN2WA_A::DISABLE) - } - #[doc = "Enable write access watch in this region"] - #[inline(always)] - pub fn enable(self) -> &'a mut W { - self.variant(RGN2WA_A::ENABLE) - } -} -#[doc = "Field `RGN2RA` reader - Enable/disable read access watch in region\\[2\\]"] -pub type RGN2RA_R = crate::BitReader; -#[doc = "Enable/disable read access watch in region\\[2\\]\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum RGN2RA_A { - #[doc = "0: Disable read access watch in this region"] - DISABLE = 0, - #[doc = "1: Enable read access watch in this region"] - ENABLE = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: RGN2RA_A) -> Self { - variant as u8 != 0 - } -} -impl RGN2RA_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> RGN2RA_A { - match self.bits { - false => RGN2RA_A::DISABLE, - true => RGN2RA_A::ENABLE, - } - } - #[doc = "Checks if the value of the field is `DISABLE`"] - #[inline(always)] - pub fn is_disable(&self) -> bool { - *self == RGN2RA_A::DISABLE - } - #[doc = "Checks if the value of the field is `ENABLE`"] - #[inline(always)] - pub fn is_enable(&self) -> bool { - *self == RGN2RA_A::ENABLE - } -} -#[doc = "Field `RGN2RA` writer - Enable/disable read access watch in region\\[2\\]"] -pub type RGN2RA_W<'a, const O: u8> = crate::BitWriter<'a, u32, REGIONEN_SPEC, RGN2RA_A, O>; -impl<'a, const O: u8> RGN2RA_W<'a, O> { - #[doc = "Disable read access watch in this region"] - #[inline(always)] - pub fn disable(self) -> &'a mut W { - self.variant(RGN2RA_A::DISABLE) - } - #[doc = "Enable read access watch in this region"] - #[inline(always)] - pub fn enable(self) -> &'a mut W { - self.variant(RGN2RA_A::ENABLE) - } -} -#[doc = "Field `RGN3WA` reader - Enable/disable write access watch in region\\[3\\]"] -pub type RGN3WA_R = crate::BitReader; -#[doc = "Enable/disable write access watch in region\\[3\\]\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum RGN3WA_A { - #[doc = "0: Disable write access watch in this region"] - DISABLE = 0, - #[doc = "1: Enable write access watch in this region"] - ENABLE = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: RGN3WA_A) -> Self { - variant as u8 != 0 - } -} -impl RGN3WA_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> RGN3WA_A { - match self.bits { - false => RGN3WA_A::DISABLE, - true => RGN3WA_A::ENABLE, - } - } - #[doc = "Checks if the value of the field is `DISABLE`"] - #[inline(always)] - pub fn is_disable(&self) -> bool { - *self == RGN3WA_A::DISABLE - } - #[doc = "Checks if the value of the field is `ENABLE`"] - #[inline(always)] - pub fn is_enable(&self) -> bool { - *self == RGN3WA_A::ENABLE - } -} -#[doc = "Field `RGN3WA` writer - Enable/disable write access watch in region\\[3\\]"] -pub type RGN3WA_W<'a, const O: u8> = crate::BitWriter<'a, u32, REGIONEN_SPEC, RGN3WA_A, O>; -impl<'a, const O: u8> RGN3WA_W<'a, O> { - #[doc = "Disable write access watch in this region"] - #[inline(always)] - pub fn disable(self) -> &'a mut W { - self.variant(RGN3WA_A::DISABLE) - } - #[doc = "Enable write access watch in this region"] - #[inline(always)] - pub fn enable(self) -> &'a mut W { - self.variant(RGN3WA_A::ENABLE) - } -} -#[doc = "Field `RGN3RA` reader - Enable/disable read access watch in region\\[3\\]"] -pub type RGN3RA_R = crate::BitReader; -#[doc = "Enable/disable read access watch in region\\[3\\]\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum RGN3RA_A { - #[doc = "0: Disable read access watch in this region"] - DISABLE = 0, - #[doc = "1: Enable read access watch in this region"] - ENABLE = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: RGN3RA_A) -> Self { - variant as u8 != 0 - } -} -impl RGN3RA_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> RGN3RA_A { - match self.bits { - false => RGN3RA_A::DISABLE, - true => RGN3RA_A::ENABLE, - } - } - #[doc = "Checks if the value of the field is `DISABLE`"] - #[inline(always)] - pub fn is_disable(&self) -> bool { - *self == RGN3RA_A::DISABLE - } - #[doc = "Checks if the value of the field is `ENABLE`"] - #[inline(always)] - pub fn is_enable(&self) -> bool { - *self == RGN3RA_A::ENABLE - } -} -#[doc = "Field `RGN3RA` writer - Enable/disable read access watch in region\\[3\\]"] -pub type RGN3RA_W<'a, const O: u8> = crate::BitWriter<'a, u32, REGIONEN_SPEC, RGN3RA_A, O>; -impl<'a, const O: u8> RGN3RA_W<'a, O> { - #[doc = "Disable read access watch in this region"] - #[inline(always)] - pub fn disable(self) -> &'a mut W { - self.variant(RGN3RA_A::DISABLE) - } - #[doc = "Enable read access watch in this region"] - #[inline(always)] - pub fn enable(self) -> &'a mut W { - self.variant(RGN3RA_A::ENABLE) - } -} -#[doc = "Field `PRGN0WA` reader - Enable/disable write access watch in PREGION\\[0\\]"] -pub type PRGN0WA_R = crate::BitReader; -#[doc = "Enable/disable write access watch in PREGION\\[0\\]\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PRGN0WA_A { - #[doc = "0: Disable write access watch in this PREGION"] - DISABLE = 0, - #[doc = "1: Enable write access watch in this PREGION"] - ENABLE = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PRGN0WA_A) -> Self { - variant as u8 != 0 - } -} -impl PRGN0WA_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> PRGN0WA_A { - match self.bits { - false => PRGN0WA_A::DISABLE, - true => PRGN0WA_A::ENABLE, - } - } - #[doc = "Checks if the value of the field is `DISABLE`"] - #[inline(always)] - pub fn is_disable(&self) -> bool { - *self == PRGN0WA_A::DISABLE - } - #[doc = "Checks if the value of the field is `ENABLE`"] - #[inline(always)] - pub fn is_enable(&self) -> bool { - *self == PRGN0WA_A::ENABLE - } -} -#[doc = "Field `PRGN0WA` writer - Enable/disable write access watch in PREGION\\[0\\]"] -pub type PRGN0WA_W<'a, const O: u8> = crate::BitWriter<'a, u32, REGIONEN_SPEC, PRGN0WA_A, O>; -impl<'a, const O: u8> PRGN0WA_W<'a, O> { - #[doc = "Disable write access watch in this PREGION"] - #[inline(always)] - pub fn disable(self) -> &'a mut W { - self.variant(PRGN0WA_A::DISABLE) - } - #[doc = "Enable write access watch in this PREGION"] - #[inline(always)] - pub fn enable(self) -> &'a mut W { - self.variant(PRGN0WA_A::ENABLE) - } -} -#[doc = "Field `PRGN0RA` reader - Enable/disable read access watch in PREGION\\[0\\]"] -pub type PRGN0RA_R = crate::BitReader; -#[doc = "Enable/disable read access watch in PREGION\\[0\\]\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PRGN0RA_A { - #[doc = "0: Disable read access watch in this PREGION"] - DISABLE = 0, - #[doc = "1: Enable read access watch in this PREGION"] - ENABLE = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PRGN0RA_A) -> Self { - variant as u8 != 0 - } -} -impl PRGN0RA_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> PRGN0RA_A { - match self.bits { - false => PRGN0RA_A::DISABLE, - true => PRGN0RA_A::ENABLE, - } - } - #[doc = "Checks if the value of the field is `DISABLE`"] - #[inline(always)] - pub fn is_disable(&self) -> bool { - *self == PRGN0RA_A::DISABLE - } - #[doc = "Checks if the value of the field is `ENABLE`"] - #[inline(always)] - pub fn is_enable(&self) -> bool { - *self == PRGN0RA_A::ENABLE - } -} -#[doc = "Field `PRGN0RA` writer - Enable/disable read access watch in PREGION\\[0\\]"] -pub type PRGN0RA_W<'a, const O: u8> = crate::BitWriter<'a, u32, REGIONEN_SPEC, PRGN0RA_A, O>; -impl<'a, const O: u8> PRGN0RA_W<'a, O> { - #[doc = "Disable read access watch in this PREGION"] - #[inline(always)] - pub fn disable(self) -> &'a mut W { - self.variant(PRGN0RA_A::DISABLE) - } - #[doc = "Enable read access watch in this PREGION"] - #[inline(always)] - pub fn enable(self) -> &'a mut W { - self.variant(PRGN0RA_A::ENABLE) - } -} -#[doc = "Field `PRGN1WA` reader - Enable/disable write access watch in PREGION\\[1\\]"] -pub type PRGN1WA_R = crate::BitReader; -#[doc = "Enable/disable write access watch in PREGION\\[1\\]\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PRGN1WA_A { - #[doc = "0: Disable write access watch in this PREGION"] - DISABLE = 0, - #[doc = "1: Enable write access watch in this PREGION"] - ENABLE = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PRGN1WA_A) -> Self { - variant as u8 != 0 - } -} -impl PRGN1WA_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> PRGN1WA_A { - match self.bits { - false => PRGN1WA_A::DISABLE, - true => PRGN1WA_A::ENABLE, - } - } - #[doc = "Checks if the value of the field is `DISABLE`"] - #[inline(always)] - pub fn is_disable(&self) -> bool { - *self == PRGN1WA_A::DISABLE - } - #[doc = "Checks if the value of the field is `ENABLE`"] - #[inline(always)] - pub fn is_enable(&self) -> bool { - *self == PRGN1WA_A::ENABLE - } -} -#[doc = "Field `PRGN1WA` writer - Enable/disable write access watch in PREGION\\[1\\]"] -pub type PRGN1WA_W<'a, const O: u8> = crate::BitWriter<'a, u32, REGIONEN_SPEC, PRGN1WA_A, O>; -impl<'a, const O: u8> PRGN1WA_W<'a, O> { - #[doc = "Disable write access watch in this PREGION"] - #[inline(always)] - pub fn disable(self) -> &'a mut W { - self.variant(PRGN1WA_A::DISABLE) - } - #[doc = "Enable write access watch in this PREGION"] - #[inline(always)] - pub fn enable(self) -> &'a mut W { - self.variant(PRGN1WA_A::ENABLE) - } -} -#[doc = "Field `PRGN1RA` reader - Enable/disable read access watch in PREGION\\[1\\]"] -pub type PRGN1RA_R = crate::BitReader; -#[doc = "Enable/disable read access watch in PREGION\\[1\\]\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PRGN1RA_A { - #[doc = "0: Disable read access watch in this PREGION"] - DISABLE = 0, - #[doc = "1: Enable read access watch in this PREGION"] - ENABLE = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PRGN1RA_A) -> Self { - variant as u8 != 0 - } -} -impl PRGN1RA_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> PRGN1RA_A { - match self.bits { - false => PRGN1RA_A::DISABLE, - true => PRGN1RA_A::ENABLE, - } - } - #[doc = "Checks if the value of the field is `DISABLE`"] - #[inline(always)] - pub fn is_disable(&self) -> bool { - *self == PRGN1RA_A::DISABLE - } - #[doc = "Checks if the value of the field is `ENABLE`"] - #[inline(always)] - pub fn is_enable(&self) -> bool { - *self == PRGN1RA_A::ENABLE - } -} -#[doc = "Field `PRGN1RA` writer - Enable/disable read access watch in PREGION\\[1\\]"] -pub type PRGN1RA_W<'a, const O: u8> = crate::BitWriter<'a, u32, REGIONEN_SPEC, PRGN1RA_A, O>; -impl<'a, const O: u8> PRGN1RA_W<'a, O> { - #[doc = "Disable read access watch in this PREGION"] - #[inline(always)] - pub fn disable(self) -> &'a mut W { - self.variant(PRGN1RA_A::DISABLE) - } - #[doc = "Enable read access watch in this PREGION"] - #[inline(always)] - pub fn enable(self) -> &'a mut W { - self.variant(PRGN1RA_A::ENABLE) - } -} -impl R { - #[doc = "Bit 0 - Enable/disable write access watch in region\\[0\\]"] - #[inline(always)] - pub fn rgn0wa(&self) -> RGN0WA_R { - RGN0WA_R::new((self.bits & 1) != 0) - } - #[doc = "Bit 1 - Enable/disable read access watch in region\\[0\\]"] - #[inline(always)] - pub fn rgn0ra(&self) -> RGN0RA_R { - RGN0RA_R::new(((self.bits >> 1) & 1) != 0) - } - #[doc = "Bit 2 - Enable/disable write access watch in region\\[1\\]"] - #[inline(always)] - pub fn rgn1wa(&self) -> RGN1WA_R { - RGN1WA_R::new(((self.bits >> 2) & 1) != 0) - } - #[doc = "Bit 3 - Enable/disable read access watch in region\\[1\\]"] - #[inline(always)] - pub fn rgn1ra(&self) -> RGN1RA_R { - RGN1RA_R::new(((self.bits >> 3) & 1) != 0) - } - #[doc = "Bit 4 - Enable/disable write access watch in region\\[2\\]"] - #[inline(always)] - pub fn rgn2wa(&self) -> RGN2WA_R { - RGN2WA_R::new(((self.bits >> 4) & 1) != 0) - } - #[doc = "Bit 5 - Enable/disable read access watch in region\\[2\\]"] - #[inline(always)] - pub fn rgn2ra(&self) -> RGN2RA_R { - RGN2RA_R::new(((self.bits >> 5) & 1) != 0) - } - #[doc = "Bit 6 - Enable/disable write access watch in region\\[3\\]"] - #[inline(always)] - pub fn rgn3wa(&self) -> RGN3WA_R { - RGN3WA_R::new(((self.bits >> 6) & 1) != 0) - } - #[doc = "Bit 7 - Enable/disable read access watch in region\\[3\\]"] - #[inline(always)] - pub fn rgn3ra(&self) -> RGN3RA_R { - RGN3RA_R::new(((self.bits >> 7) & 1) != 0) - } - #[doc = "Bit 24 - Enable/disable write access watch in PREGION\\[0\\]"] - #[inline(always)] - pub fn prgn0wa(&self) -> PRGN0WA_R { - PRGN0WA_R::new(((self.bits >> 24) & 1) != 0) - } - #[doc = "Bit 25 - Enable/disable read access watch in PREGION\\[0\\]"] - #[inline(always)] - pub fn prgn0ra(&self) -> PRGN0RA_R { - PRGN0RA_R::new(((self.bits >> 25) & 1) != 0) - } - #[doc = "Bit 26 - Enable/disable write access watch in PREGION\\[1\\]"] - #[inline(always)] - pub fn prgn1wa(&self) -> PRGN1WA_R { - PRGN1WA_R::new(((self.bits >> 26) & 1) != 0) - } - #[doc = "Bit 27 - Enable/disable read access watch in PREGION\\[1\\]"] - #[inline(always)] - pub fn prgn1ra(&self) -> PRGN1RA_R { - PRGN1RA_R::new(((self.bits >> 27) & 1) != 0) - } -} -impl W { - #[doc = "Bit 0 - Enable/disable write access watch in region\\[0\\]"] - #[inline(always)] - #[must_use] - pub fn rgn0wa(&mut self) -> RGN0WA_W<0> { - RGN0WA_W::new(self) - } - #[doc = "Bit 1 - Enable/disable read access watch in region\\[0\\]"] - #[inline(always)] - #[must_use] - pub fn rgn0ra(&mut self) -> RGN0RA_W<1> { - RGN0RA_W::new(self) - } - #[doc = "Bit 2 - Enable/disable write access watch in region\\[1\\]"] - #[inline(always)] - #[must_use] - pub fn rgn1wa(&mut self) -> RGN1WA_W<2> { - RGN1WA_W::new(self) - } - #[doc = "Bit 3 - Enable/disable read access watch in region\\[1\\]"] - #[inline(always)] - #[must_use] - pub fn rgn1ra(&mut self) -> RGN1RA_W<3> { - RGN1RA_W::new(self) - } - #[doc = "Bit 4 - Enable/disable write access watch in region\\[2\\]"] - #[inline(always)] - #[must_use] - pub fn rgn2wa(&mut self) -> RGN2WA_W<4> { - RGN2WA_W::new(self) - } - #[doc = "Bit 5 - Enable/disable read access watch in region\\[2\\]"] - #[inline(always)] - #[must_use] - pub fn rgn2ra(&mut self) -> RGN2RA_W<5> { - RGN2RA_W::new(self) - } - #[doc = "Bit 6 - Enable/disable write access watch in region\\[3\\]"] - #[inline(always)] - #[must_use] - pub fn rgn3wa(&mut self) -> RGN3WA_W<6> { - RGN3WA_W::new(self) - } - #[doc = "Bit 7 - Enable/disable read access watch in region\\[3\\]"] - #[inline(always)] - #[must_use] - pub fn rgn3ra(&mut self) -> RGN3RA_W<7> { - RGN3RA_W::new(self) - } - #[doc = "Bit 24 - Enable/disable write access watch in PREGION\\[0\\]"] - #[inline(always)] - #[must_use] - pub fn prgn0wa(&mut self) -> PRGN0WA_W<24> { - PRGN0WA_W::new(self) - } - #[doc = "Bit 25 - Enable/disable read access watch in PREGION\\[0\\]"] - #[inline(always)] - #[must_use] - pub fn prgn0ra(&mut self) -> PRGN0RA_W<25> { - PRGN0RA_W::new(self) - } - #[doc = "Bit 26 - Enable/disable write access watch in PREGION\\[1\\]"] - #[inline(always)] - #[must_use] - pub fn prgn1wa(&mut self) -> PRGN1WA_W<26> { - PRGN1WA_W::new(self) - } - #[doc = "Bit 27 - Enable/disable read access watch in PREGION\\[1\\]"] - #[inline(always)] - #[must_use] - pub fn prgn1ra(&mut self) -> PRGN1RA_W<27> { - PRGN1RA_W::new(self) - } - #[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 = "Enable/disable regions watch\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 [regionen](index.html) module"] -pub struct REGIONEN_SPEC; -impl crate::RegisterSpec for REGIONEN_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [regionen::R](R) reader structure"] -impl crate::Readable for REGIONEN_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [regionen::W](W) writer structure"] -impl crate::Writable for REGIONEN_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets REGIONEN to value 0"] -impl crate::Resettable for REGIONEN_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/mwu/regionenclr.rs b/down-the-stack/dk_pac/src/mwu/regionenclr.rs deleted file mode 100644 index ad2e65d..0000000 --- a/down-the-stack/dk_pac/src/mwu/regionenclr.rs +++ /dev/null @@ -1,881 +0,0 @@ -#[doc = "Register `REGIONENCLR` 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 `REGIONENCLR` 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 `RGN0WA` reader - Disable write access watch in region\\[0\\]"] -pub type RGN0WA_R = crate::BitReader; -#[doc = "Disable write access watch in region\\[0\\]\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum RGN0WA_A { - #[doc = "0: Write access watch in this region is disabled"] - DISABLED = 0, - #[doc = "1: Write access watch in this region is enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: RGN0WA_A) -> Self { - variant as u8 != 0 - } -} -impl RGN0WA_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> RGN0WA_A { - match self.bits { - false => RGN0WA_A::DISABLED, - true => RGN0WA_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == RGN0WA_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == RGN0WA_A::ENABLED - } -} -#[doc = "Disable write access watch in region\\[0\\]\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum RGN0WA_AW { - #[doc = "1: Disable write access watch in this region"] - CLEAR = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: RGN0WA_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `RGN0WA` writer - Disable write access watch in region\\[0\\]"] -pub type RGN0WA_W<'a, const O: u8> = crate::BitWriter<'a, u32, REGIONENCLR_SPEC, RGN0WA_AW, O>; -impl<'a, const O: u8> RGN0WA_W<'a, O> { - #[doc = "Disable write access watch in this region"] - #[inline(always)] - pub fn clear(self) -> &'a mut W { - self.variant(RGN0WA_AW::CLEAR) - } -} -#[doc = "Field `RGN0RA` reader - Disable read access watch in region\\[0\\]"] -pub type RGN0RA_R = crate::BitReader; -#[doc = "Disable read access watch in region\\[0\\]\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum RGN0RA_A { - #[doc = "0: Read access watch in this region is disabled"] - DISABLED = 0, - #[doc = "1: Read access watch in this region is enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: RGN0RA_A) -> Self { - variant as u8 != 0 - } -} -impl RGN0RA_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> RGN0RA_A { - match self.bits { - false => RGN0RA_A::DISABLED, - true => RGN0RA_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == RGN0RA_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == RGN0RA_A::ENABLED - } -} -#[doc = "Disable read access watch in region\\[0\\]\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum RGN0RA_AW { - #[doc = "1: Disable read access watch in this region"] - CLEAR = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: RGN0RA_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `RGN0RA` writer - Disable read access watch in region\\[0\\]"] -pub type RGN0RA_W<'a, const O: u8> = crate::BitWriter<'a, u32, REGIONENCLR_SPEC, RGN0RA_AW, O>; -impl<'a, const O: u8> RGN0RA_W<'a, O> { - #[doc = "Disable read access watch in this region"] - #[inline(always)] - pub fn clear(self) -> &'a mut W { - self.variant(RGN0RA_AW::CLEAR) - } -} -#[doc = "Field `RGN1WA` reader - Disable write access watch in region\\[1\\]"] -pub type RGN1WA_R = crate::BitReader; -#[doc = "Disable write access watch in region\\[1\\]\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum RGN1WA_A { - #[doc = "0: Write access watch in this region is disabled"] - DISABLED = 0, - #[doc = "1: Write access watch in this region is enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: RGN1WA_A) -> Self { - variant as u8 != 0 - } -} -impl RGN1WA_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> RGN1WA_A { - match self.bits { - false => RGN1WA_A::DISABLED, - true => RGN1WA_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == RGN1WA_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == RGN1WA_A::ENABLED - } -} -#[doc = "Disable write access watch in region\\[1\\]\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum RGN1WA_AW { - #[doc = "1: Disable write access watch in this region"] - CLEAR = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: RGN1WA_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `RGN1WA` writer - Disable write access watch in region\\[1\\]"] -pub type RGN1WA_W<'a, const O: u8> = crate::BitWriter<'a, u32, REGIONENCLR_SPEC, RGN1WA_AW, O>; -impl<'a, const O: u8> RGN1WA_W<'a, O> { - #[doc = "Disable write access watch in this region"] - #[inline(always)] - pub fn clear(self) -> &'a mut W { - self.variant(RGN1WA_AW::CLEAR) - } -} -#[doc = "Field `RGN1RA` reader - Disable read access watch in region\\[1\\]"] -pub type RGN1RA_R = crate::BitReader; -#[doc = "Disable read access watch in region\\[1\\]\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum RGN1RA_A { - #[doc = "0: Read access watch in this region is disabled"] - DISABLED = 0, - #[doc = "1: Read access watch in this region is enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: RGN1RA_A) -> Self { - variant as u8 != 0 - } -} -impl RGN1RA_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> RGN1RA_A { - match self.bits { - false => RGN1RA_A::DISABLED, - true => RGN1RA_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == RGN1RA_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == RGN1RA_A::ENABLED - } -} -#[doc = "Disable read access watch in region\\[1\\]\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum RGN1RA_AW { - #[doc = "1: Disable read access watch in this region"] - CLEAR = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: RGN1RA_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `RGN1RA` writer - Disable read access watch in region\\[1\\]"] -pub type RGN1RA_W<'a, const O: u8> = crate::BitWriter<'a, u32, REGIONENCLR_SPEC, RGN1RA_AW, O>; -impl<'a, const O: u8> RGN1RA_W<'a, O> { - #[doc = "Disable read access watch in this region"] - #[inline(always)] - pub fn clear(self) -> &'a mut W { - self.variant(RGN1RA_AW::CLEAR) - } -} -#[doc = "Field `RGN2WA` reader - Disable write access watch in region\\[2\\]"] -pub type RGN2WA_R = crate::BitReader; -#[doc = "Disable write access watch in region\\[2\\]\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum RGN2WA_A { - #[doc = "0: Write access watch in this region is disabled"] - DISABLED = 0, - #[doc = "1: Write access watch in this region is enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: RGN2WA_A) -> Self { - variant as u8 != 0 - } -} -impl RGN2WA_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> RGN2WA_A { - match self.bits { - false => RGN2WA_A::DISABLED, - true => RGN2WA_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == RGN2WA_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == RGN2WA_A::ENABLED - } -} -#[doc = "Disable write access watch in region\\[2\\]\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum RGN2WA_AW { - #[doc = "1: Disable write access watch in this region"] - CLEAR = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: RGN2WA_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `RGN2WA` writer - Disable write access watch in region\\[2\\]"] -pub type RGN2WA_W<'a, const O: u8> = crate::BitWriter<'a, u32, REGIONENCLR_SPEC, RGN2WA_AW, O>; -impl<'a, const O: u8> RGN2WA_W<'a, O> { - #[doc = "Disable write access watch in this region"] - #[inline(always)] - pub fn clear(self) -> &'a mut W { - self.variant(RGN2WA_AW::CLEAR) - } -} -#[doc = "Field `RGN2RA` reader - Disable read access watch in region\\[2\\]"] -pub type RGN2RA_R = crate::BitReader; -#[doc = "Disable read access watch in region\\[2\\]\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum RGN2RA_A { - #[doc = "0: Read access watch in this region is disabled"] - DISABLED = 0, - #[doc = "1: Read access watch in this region is enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: RGN2RA_A) -> Self { - variant as u8 != 0 - } -} -impl RGN2RA_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> RGN2RA_A { - match self.bits { - false => RGN2RA_A::DISABLED, - true => RGN2RA_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == RGN2RA_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == RGN2RA_A::ENABLED - } -} -#[doc = "Disable read access watch in region\\[2\\]\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum RGN2RA_AW { - #[doc = "1: Disable read access watch in this region"] - CLEAR = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: RGN2RA_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `RGN2RA` writer - Disable read access watch in region\\[2\\]"] -pub type RGN2RA_W<'a, const O: u8> = crate::BitWriter<'a, u32, REGIONENCLR_SPEC, RGN2RA_AW, O>; -impl<'a, const O: u8> RGN2RA_W<'a, O> { - #[doc = "Disable read access watch in this region"] - #[inline(always)] - pub fn clear(self) -> &'a mut W { - self.variant(RGN2RA_AW::CLEAR) - } -} -#[doc = "Field `RGN3WA` reader - Disable write access watch in region\\[3\\]"] -pub type RGN3WA_R = crate::BitReader; -#[doc = "Disable write access watch in region\\[3\\]\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum RGN3WA_A { - #[doc = "0: Write access watch in this region is disabled"] - DISABLED = 0, - #[doc = "1: Write access watch in this region is enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: RGN3WA_A) -> Self { - variant as u8 != 0 - } -} -impl RGN3WA_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> RGN3WA_A { - match self.bits { - false => RGN3WA_A::DISABLED, - true => RGN3WA_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == RGN3WA_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == RGN3WA_A::ENABLED - } -} -#[doc = "Disable write access watch in region\\[3\\]\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum RGN3WA_AW { - #[doc = "1: Disable write access watch in this region"] - CLEAR = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: RGN3WA_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `RGN3WA` writer - Disable write access watch in region\\[3\\]"] -pub type RGN3WA_W<'a, const O: u8> = crate::BitWriter<'a, u32, REGIONENCLR_SPEC, RGN3WA_AW, O>; -impl<'a, const O: u8> RGN3WA_W<'a, O> { - #[doc = "Disable write access watch in this region"] - #[inline(always)] - pub fn clear(self) -> &'a mut W { - self.variant(RGN3WA_AW::CLEAR) - } -} -#[doc = "Field `RGN3RA` reader - Disable read access watch in region\\[3\\]"] -pub type RGN3RA_R = crate::BitReader; -#[doc = "Disable read access watch in region\\[3\\]\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum RGN3RA_A { - #[doc = "0: Read access watch in this region is disabled"] - DISABLED = 0, - #[doc = "1: Read access watch in this region is enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: RGN3RA_A) -> Self { - variant as u8 != 0 - } -} -impl RGN3RA_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> RGN3RA_A { - match self.bits { - false => RGN3RA_A::DISABLED, - true => RGN3RA_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == RGN3RA_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == RGN3RA_A::ENABLED - } -} -#[doc = "Disable read access watch in region\\[3\\]\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum RGN3RA_AW { - #[doc = "1: Disable read access watch in this region"] - CLEAR = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: RGN3RA_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `RGN3RA` writer - Disable read access watch in region\\[3\\]"] -pub type RGN3RA_W<'a, const O: u8> = crate::BitWriter<'a, u32, REGIONENCLR_SPEC, RGN3RA_AW, O>; -impl<'a, const O: u8> RGN3RA_W<'a, O> { - #[doc = "Disable read access watch in this region"] - #[inline(always)] - pub fn clear(self) -> &'a mut W { - self.variant(RGN3RA_AW::CLEAR) - } -} -#[doc = "Field `PRGN0WA` reader - Disable write access watch in PREGION\\[0\\]"] -pub type PRGN0WA_R = crate::BitReader; -#[doc = "Disable write access watch in PREGION\\[0\\]\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PRGN0WA_A { - #[doc = "0: Write access watch in this PREGION is disabled"] - DISABLED = 0, - #[doc = "1: Write access watch in this PREGION is enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PRGN0WA_A) -> Self { - variant as u8 != 0 - } -} -impl PRGN0WA_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> PRGN0WA_A { - match self.bits { - false => PRGN0WA_A::DISABLED, - true => PRGN0WA_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == PRGN0WA_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == PRGN0WA_A::ENABLED - } -} -#[doc = "Disable write access watch in PREGION\\[0\\]\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PRGN0WA_AW { - #[doc = "1: Disable write access watch in this PREGION"] - CLEAR = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PRGN0WA_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `PRGN0WA` writer - Disable write access watch in PREGION\\[0\\]"] -pub type PRGN0WA_W<'a, const O: u8> = crate::BitWriter<'a, u32, REGIONENCLR_SPEC, PRGN0WA_AW, O>; -impl<'a, const O: u8> PRGN0WA_W<'a, O> { - #[doc = "Disable write access watch in this PREGION"] - #[inline(always)] - pub fn clear(self) -> &'a mut W { - self.variant(PRGN0WA_AW::CLEAR) - } -} -#[doc = "Field `PRGN0RA` reader - Disable read access watch in PREGION\\[0\\]"] -pub type PRGN0RA_R = crate::BitReader; -#[doc = "Disable read access watch in PREGION\\[0\\]\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PRGN0RA_A { - #[doc = "0: Read access watch in this PREGION is disabled"] - DISABLED = 0, - #[doc = "1: Read access watch in this PREGION is enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PRGN0RA_A) -> Self { - variant as u8 != 0 - } -} -impl PRGN0RA_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> PRGN0RA_A { - match self.bits { - false => PRGN0RA_A::DISABLED, - true => PRGN0RA_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == PRGN0RA_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == PRGN0RA_A::ENABLED - } -} -#[doc = "Disable read access watch in PREGION\\[0\\]\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PRGN0RA_AW { - #[doc = "1: Disable read access watch in this PREGION"] - CLEAR = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PRGN0RA_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `PRGN0RA` writer - Disable read access watch in PREGION\\[0\\]"] -pub type PRGN0RA_W<'a, const O: u8> = crate::BitWriter<'a, u32, REGIONENCLR_SPEC, PRGN0RA_AW, O>; -impl<'a, const O: u8> PRGN0RA_W<'a, O> { - #[doc = "Disable read access watch in this PREGION"] - #[inline(always)] - pub fn clear(self) -> &'a mut W { - self.variant(PRGN0RA_AW::CLEAR) - } -} -#[doc = "Field `PRGN1WA` reader - Disable write access watch in PREGION\\[1\\]"] -pub type PRGN1WA_R = crate::BitReader; -#[doc = "Disable write access watch in PREGION\\[1\\]\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PRGN1WA_A { - #[doc = "0: Write access watch in this PREGION is disabled"] - DISABLED = 0, - #[doc = "1: Write access watch in this PREGION is enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PRGN1WA_A) -> Self { - variant as u8 != 0 - } -} -impl PRGN1WA_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> PRGN1WA_A { - match self.bits { - false => PRGN1WA_A::DISABLED, - true => PRGN1WA_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == PRGN1WA_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == PRGN1WA_A::ENABLED - } -} -#[doc = "Disable write access watch in PREGION\\[1\\]\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PRGN1WA_AW { - #[doc = "1: Disable write access watch in this PREGION"] - CLEAR = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PRGN1WA_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `PRGN1WA` writer - Disable write access watch in PREGION\\[1\\]"] -pub type PRGN1WA_W<'a, const O: u8> = crate::BitWriter<'a, u32, REGIONENCLR_SPEC, PRGN1WA_AW, O>; -impl<'a, const O: u8> PRGN1WA_W<'a, O> { - #[doc = "Disable write access watch in this PREGION"] - #[inline(always)] - pub fn clear(self) -> &'a mut W { - self.variant(PRGN1WA_AW::CLEAR) - } -} -#[doc = "Field `PRGN1RA` reader - Disable read access watch in PREGION\\[1\\]"] -pub type PRGN1RA_R = crate::BitReader; -#[doc = "Disable read access watch in PREGION\\[1\\]\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PRGN1RA_A { - #[doc = "0: Read access watch in this PREGION is disabled"] - DISABLED = 0, - #[doc = "1: Read access watch in this PREGION is enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PRGN1RA_A) -> Self { - variant as u8 != 0 - } -} -impl PRGN1RA_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> PRGN1RA_A { - match self.bits { - false => PRGN1RA_A::DISABLED, - true => PRGN1RA_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == PRGN1RA_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == PRGN1RA_A::ENABLED - } -} -#[doc = "Disable read access watch in PREGION\\[1\\]\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PRGN1RA_AW { - #[doc = "1: Disable read access watch in this PREGION"] - CLEAR = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PRGN1RA_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `PRGN1RA` writer - Disable read access watch in PREGION\\[1\\]"] -pub type PRGN1RA_W<'a, const O: u8> = crate::BitWriter<'a, u32, REGIONENCLR_SPEC, PRGN1RA_AW, O>; -impl<'a, const O: u8> PRGN1RA_W<'a, O> { - #[doc = "Disable read access watch in this PREGION"] - #[inline(always)] - pub fn clear(self) -> &'a mut W { - self.variant(PRGN1RA_AW::CLEAR) - } -} -impl R { - #[doc = "Bit 0 - Disable write access watch in region\\[0\\]"] - #[inline(always)] - pub fn rgn0wa(&self) -> RGN0WA_R { - RGN0WA_R::new((self.bits & 1) != 0) - } - #[doc = "Bit 1 - Disable read access watch in region\\[0\\]"] - #[inline(always)] - pub fn rgn0ra(&self) -> RGN0RA_R { - RGN0RA_R::new(((self.bits >> 1) & 1) != 0) - } - #[doc = "Bit 2 - Disable write access watch in region\\[1\\]"] - #[inline(always)] - pub fn rgn1wa(&self) -> RGN1WA_R { - RGN1WA_R::new(((self.bits >> 2) & 1) != 0) - } - #[doc = "Bit 3 - Disable read access watch in region\\[1\\]"] - #[inline(always)] - pub fn rgn1ra(&self) -> RGN1RA_R { - RGN1RA_R::new(((self.bits >> 3) & 1) != 0) - } - #[doc = "Bit 4 - Disable write access watch in region\\[2\\]"] - #[inline(always)] - pub fn rgn2wa(&self) -> RGN2WA_R { - RGN2WA_R::new(((self.bits >> 4) & 1) != 0) - } - #[doc = "Bit 5 - Disable read access watch in region\\[2\\]"] - #[inline(always)] - pub fn rgn2ra(&self) -> RGN2RA_R { - RGN2RA_R::new(((self.bits >> 5) & 1) != 0) - } - #[doc = "Bit 6 - Disable write access watch in region\\[3\\]"] - #[inline(always)] - pub fn rgn3wa(&self) -> RGN3WA_R { - RGN3WA_R::new(((self.bits >> 6) & 1) != 0) - } - #[doc = "Bit 7 - Disable read access watch in region\\[3\\]"] - #[inline(always)] - pub fn rgn3ra(&self) -> RGN3RA_R { - RGN3RA_R::new(((self.bits >> 7) & 1) != 0) - } - #[doc = "Bit 24 - Disable write access watch in PREGION\\[0\\]"] - #[inline(always)] - pub fn prgn0wa(&self) -> PRGN0WA_R { - PRGN0WA_R::new(((self.bits >> 24) & 1) != 0) - } - #[doc = "Bit 25 - Disable read access watch in PREGION\\[0\\]"] - #[inline(always)] - pub fn prgn0ra(&self) -> PRGN0RA_R { - PRGN0RA_R::new(((self.bits >> 25) & 1) != 0) - } - #[doc = "Bit 26 - Disable write access watch in PREGION\\[1\\]"] - #[inline(always)] - pub fn prgn1wa(&self) -> PRGN1WA_R { - PRGN1WA_R::new(((self.bits >> 26) & 1) != 0) - } - #[doc = "Bit 27 - Disable read access watch in PREGION\\[1\\]"] - #[inline(always)] - pub fn prgn1ra(&self) -> PRGN1RA_R { - PRGN1RA_R::new(((self.bits >> 27) & 1) != 0) - } -} -impl W { - #[doc = "Bit 0 - Disable write access watch in region\\[0\\]"] - #[inline(always)] - #[must_use] - pub fn rgn0wa(&mut self) -> RGN0WA_W<0> { - RGN0WA_W::new(self) - } - #[doc = "Bit 1 - Disable read access watch in region\\[0\\]"] - #[inline(always)] - #[must_use] - pub fn rgn0ra(&mut self) -> RGN0RA_W<1> { - RGN0RA_W::new(self) - } - #[doc = "Bit 2 - Disable write access watch in region\\[1\\]"] - #[inline(always)] - #[must_use] - pub fn rgn1wa(&mut self) -> RGN1WA_W<2> { - RGN1WA_W::new(self) - } - #[doc = "Bit 3 - Disable read access watch in region\\[1\\]"] - #[inline(always)] - #[must_use] - pub fn rgn1ra(&mut self) -> RGN1RA_W<3> { - RGN1RA_W::new(self) - } - #[doc = "Bit 4 - Disable write access watch in region\\[2\\]"] - #[inline(always)] - #[must_use] - pub fn rgn2wa(&mut self) -> RGN2WA_W<4> { - RGN2WA_W::new(self) - } - #[doc = "Bit 5 - Disable read access watch in region\\[2\\]"] - #[inline(always)] - #[must_use] - pub fn rgn2ra(&mut self) -> RGN2RA_W<5> { - RGN2RA_W::new(self) - } - #[doc = "Bit 6 - Disable write access watch in region\\[3\\]"] - #[inline(always)] - #[must_use] - pub fn rgn3wa(&mut self) -> RGN3WA_W<6> { - RGN3WA_W::new(self) - } - #[doc = "Bit 7 - Disable read access watch in region\\[3\\]"] - #[inline(always)] - #[must_use] - pub fn rgn3ra(&mut self) -> RGN3RA_W<7> { - RGN3RA_W::new(self) - } - #[doc = "Bit 24 - Disable write access watch in PREGION\\[0\\]"] - #[inline(always)] - #[must_use] - pub fn prgn0wa(&mut self) -> PRGN0WA_W<24> { - PRGN0WA_W::new(self) - } - #[doc = "Bit 25 - Disable read access watch in PREGION\\[0\\]"] - #[inline(always)] - #[must_use] - pub fn prgn0ra(&mut self) -> PRGN0RA_W<25> { - PRGN0RA_W::new(self) - } - #[doc = "Bit 26 - Disable write access watch in PREGION\\[1\\]"] - #[inline(always)] - #[must_use] - pub fn prgn1wa(&mut self) -> PRGN1WA_W<26> { - PRGN1WA_W::new(self) - } - #[doc = "Bit 27 - Disable read access watch in PREGION\\[1\\]"] - #[inline(always)] - #[must_use] - pub fn prgn1ra(&mut self) -> PRGN1RA_W<27> { - PRGN1RA_W::new(self) - } - #[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 = "Disable regions watch\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 [regionenclr](index.html) module"] -pub struct REGIONENCLR_SPEC; -impl crate::RegisterSpec for REGIONENCLR_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [regionenclr::R](R) reader structure"] -impl crate::Readable for REGIONENCLR_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [regionenclr::W](W) writer structure"] -impl crate::Writable for REGIONENCLR_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets REGIONENCLR to value 0"] -impl crate::Resettable for REGIONENCLR_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/mwu/regionenset.rs b/down-the-stack/dk_pac/src/mwu/regionenset.rs deleted file mode 100644 index 2ef99b0..0000000 --- a/down-the-stack/dk_pac/src/mwu/regionenset.rs +++ /dev/null @@ -1,881 +0,0 @@ -#[doc = "Register `REGIONENSET` 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 `REGIONENSET` 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 `RGN0WA` reader - Enable write access watch in region\\[0\\]"] -pub type RGN0WA_R = crate::BitReader; -#[doc = "Enable write access watch in region\\[0\\]\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum RGN0WA_A { - #[doc = "0: Write access watch in this region is disabled"] - DISABLED = 0, - #[doc = "1: Write access watch in this region is enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: RGN0WA_A) -> Self { - variant as u8 != 0 - } -} -impl RGN0WA_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> RGN0WA_A { - match self.bits { - false => RGN0WA_A::DISABLED, - true => RGN0WA_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == RGN0WA_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == RGN0WA_A::ENABLED - } -} -#[doc = "Enable write access watch in region\\[0\\]\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum RGN0WA_AW { - #[doc = "1: Enable write access watch in this region"] - SET = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: RGN0WA_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `RGN0WA` writer - Enable write access watch in region\\[0\\]"] -pub type RGN0WA_W<'a, const O: u8> = crate::BitWriter<'a, u32, REGIONENSET_SPEC, RGN0WA_AW, O>; -impl<'a, const O: u8> RGN0WA_W<'a, O> { - #[doc = "Enable write access watch in this region"] - #[inline(always)] - pub fn set(self) -> &'a mut W { - self.variant(RGN0WA_AW::SET) - } -} -#[doc = "Field `RGN0RA` reader - Enable read access watch in region\\[0\\]"] -pub type RGN0RA_R = crate::BitReader; -#[doc = "Enable read access watch in region\\[0\\]\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum RGN0RA_A { - #[doc = "0: Read access watch in this region is disabled"] - DISABLED = 0, - #[doc = "1: Read access watch in this region is enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: RGN0RA_A) -> Self { - variant as u8 != 0 - } -} -impl RGN0RA_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> RGN0RA_A { - match self.bits { - false => RGN0RA_A::DISABLED, - true => RGN0RA_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == RGN0RA_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == RGN0RA_A::ENABLED - } -} -#[doc = "Enable read access watch in region\\[0\\]\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum RGN0RA_AW { - #[doc = "1: Enable read access watch in this region"] - SET = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: RGN0RA_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `RGN0RA` writer - Enable read access watch in region\\[0\\]"] -pub type RGN0RA_W<'a, const O: u8> = crate::BitWriter<'a, u32, REGIONENSET_SPEC, RGN0RA_AW, O>; -impl<'a, const O: u8> RGN0RA_W<'a, O> { - #[doc = "Enable read access watch in this region"] - #[inline(always)] - pub fn set(self) -> &'a mut W { - self.variant(RGN0RA_AW::SET) - } -} -#[doc = "Field `RGN1WA` reader - Enable write access watch in region\\[1\\]"] -pub type RGN1WA_R = crate::BitReader; -#[doc = "Enable write access watch in region\\[1\\]\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum RGN1WA_A { - #[doc = "0: Write access watch in this region is disabled"] - DISABLED = 0, - #[doc = "1: Write access watch in this region is enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: RGN1WA_A) -> Self { - variant as u8 != 0 - } -} -impl RGN1WA_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> RGN1WA_A { - match self.bits { - false => RGN1WA_A::DISABLED, - true => RGN1WA_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == RGN1WA_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == RGN1WA_A::ENABLED - } -} -#[doc = "Enable write access watch in region\\[1\\]\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum RGN1WA_AW { - #[doc = "1: Enable write access watch in this region"] - SET = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: RGN1WA_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `RGN1WA` writer - Enable write access watch in region\\[1\\]"] -pub type RGN1WA_W<'a, const O: u8> = crate::BitWriter<'a, u32, REGIONENSET_SPEC, RGN1WA_AW, O>; -impl<'a, const O: u8> RGN1WA_W<'a, O> { - #[doc = "Enable write access watch in this region"] - #[inline(always)] - pub fn set(self) -> &'a mut W { - self.variant(RGN1WA_AW::SET) - } -} -#[doc = "Field `RGN1RA` reader - Enable read access watch in region\\[1\\]"] -pub type RGN1RA_R = crate::BitReader; -#[doc = "Enable read access watch in region\\[1\\]\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum RGN1RA_A { - #[doc = "0: Read access watch in this region is disabled"] - DISABLED = 0, - #[doc = "1: Read access watch in this region is enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: RGN1RA_A) -> Self { - variant as u8 != 0 - } -} -impl RGN1RA_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> RGN1RA_A { - match self.bits { - false => RGN1RA_A::DISABLED, - true => RGN1RA_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == RGN1RA_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == RGN1RA_A::ENABLED - } -} -#[doc = "Enable read access watch in region\\[1\\]\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum RGN1RA_AW { - #[doc = "1: Enable read access watch in this region"] - SET = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: RGN1RA_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `RGN1RA` writer - Enable read access watch in region\\[1\\]"] -pub type RGN1RA_W<'a, const O: u8> = crate::BitWriter<'a, u32, REGIONENSET_SPEC, RGN1RA_AW, O>; -impl<'a, const O: u8> RGN1RA_W<'a, O> { - #[doc = "Enable read access watch in this region"] - #[inline(always)] - pub fn set(self) -> &'a mut W { - self.variant(RGN1RA_AW::SET) - } -} -#[doc = "Field `RGN2WA` reader - Enable write access watch in region\\[2\\]"] -pub type RGN2WA_R = crate::BitReader; -#[doc = "Enable write access watch in region\\[2\\]\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum RGN2WA_A { - #[doc = "0: Write access watch in this region is disabled"] - DISABLED = 0, - #[doc = "1: Write access watch in this region is enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: RGN2WA_A) -> Self { - variant as u8 != 0 - } -} -impl RGN2WA_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> RGN2WA_A { - match self.bits { - false => RGN2WA_A::DISABLED, - true => RGN2WA_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == RGN2WA_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == RGN2WA_A::ENABLED - } -} -#[doc = "Enable write access watch in region\\[2\\]\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum RGN2WA_AW { - #[doc = "1: Enable write access watch in this region"] - SET = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: RGN2WA_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `RGN2WA` writer - Enable write access watch in region\\[2\\]"] -pub type RGN2WA_W<'a, const O: u8> = crate::BitWriter<'a, u32, REGIONENSET_SPEC, RGN2WA_AW, O>; -impl<'a, const O: u8> RGN2WA_W<'a, O> { - #[doc = "Enable write access watch in this region"] - #[inline(always)] - pub fn set(self) -> &'a mut W { - self.variant(RGN2WA_AW::SET) - } -} -#[doc = "Field `RGN2RA` reader - Enable read access watch in region\\[2\\]"] -pub type RGN2RA_R = crate::BitReader; -#[doc = "Enable read access watch in region\\[2\\]\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum RGN2RA_A { - #[doc = "0: Read access watch in this region is disabled"] - DISABLED = 0, - #[doc = "1: Read access watch in this region is enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: RGN2RA_A) -> Self { - variant as u8 != 0 - } -} -impl RGN2RA_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> RGN2RA_A { - match self.bits { - false => RGN2RA_A::DISABLED, - true => RGN2RA_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == RGN2RA_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == RGN2RA_A::ENABLED - } -} -#[doc = "Enable read access watch in region\\[2\\]\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum RGN2RA_AW { - #[doc = "1: Enable read access watch in this region"] - SET = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: RGN2RA_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `RGN2RA` writer - Enable read access watch in region\\[2\\]"] -pub type RGN2RA_W<'a, const O: u8> = crate::BitWriter<'a, u32, REGIONENSET_SPEC, RGN2RA_AW, O>; -impl<'a, const O: u8> RGN2RA_W<'a, O> { - #[doc = "Enable read access watch in this region"] - #[inline(always)] - pub fn set(self) -> &'a mut W { - self.variant(RGN2RA_AW::SET) - } -} -#[doc = "Field `RGN3WA` reader - Enable write access watch in region\\[3\\]"] -pub type RGN3WA_R = crate::BitReader; -#[doc = "Enable write access watch in region\\[3\\]\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum RGN3WA_A { - #[doc = "0: Write access watch in this region is disabled"] - DISABLED = 0, - #[doc = "1: Write access watch in this region is enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: RGN3WA_A) -> Self { - variant as u8 != 0 - } -} -impl RGN3WA_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> RGN3WA_A { - match self.bits { - false => RGN3WA_A::DISABLED, - true => RGN3WA_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == RGN3WA_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == RGN3WA_A::ENABLED - } -} -#[doc = "Enable write access watch in region\\[3\\]\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum RGN3WA_AW { - #[doc = "1: Enable write access watch in this region"] - SET = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: RGN3WA_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `RGN3WA` writer - Enable write access watch in region\\[3\\]"] -pub type RGN3WA_W<'a, const O: u8> = crate::BitWriter<'a, u32, REGIONENSET_SPEC, RGN3WA_AW, O>; -impl<'a, const O: u8> RGN3WA_W<'a, O> { - #[doc = "Enable write access watch in this region"] - #[inline(always)] - pub fn set(self) -> &'a mut W { - self.variant(RGN3WA_AW::SET) - } -} -#[doc = "Field `RGN3RA` reader - Enable read access watch in region\\[3\\]"] -pub type RGN3RA_R = crate::BitReader; -#[doc = "Enable read access watch in region\\[3\\]\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum RGN3RA_A { - #[doc = "0: Read access watch in this region is disabled"] - DISABLED = 0, - #[doc = "1: Read access watch in this region is enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: RGN3RA_A) -> Self { - variant as u8 != 0 - } -} -impl RGN3RA_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> RGN3RA_A { - match self.bits { - false => RGN3RA_A::DISABLED, - true => RGN3RA_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == RGN3RA_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == RGN3RA_A::ENABLED - } -} -#[doc = "Enable read access watch in region\\[3\\]\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum RGN3RA_AW { - #[doc = "1: Enable read access watch in this region"] - SET = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: RGN3RA_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `RGN3RA` writer - Enable read access watch in region\\[3\\]"] -pub type RGN3RA_W<'a, const O: u8> = crate::BitWriter<'a, u32, REGIONENSET_SPEC, RGN3RA_AW, O>; -impl<'a, const O: u8> RGN3RA_W<'a, O> { - #[doc = "Enable read access watch in this region"] - #[inline(always)] - pub fn set(self) -> &'a mut W { - self.variant(RGN3RA_AW::SET) - } -} -#[doc = "Field `PRGN0WA` reader - Enable write access watch in PREGION\\[0\\]"] -pub type PRGN0WA_R = crate::BitReader; -#[doc = "Enable write access watch in PREGION\\[0\\]\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PRGN0WA_A { - #[doc = "0: Write access watch in this PREGION is disabled"] - DISABLED = 0, - #[doc = "1: Write access watch in this PREGION is enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PRGN0WA_A) -> Self { - variant as u8 != 0 - } -} -impl PRGN0WA_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> PRGN0WA_A { - match self.bits { - false => PRGN0WA_A::DISABLED, - true => PRGN0WA_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == PRGN0WA_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == PRGN0WA_A::ENABLED - } -} -#[doc = "Enable write access watch in PREGION\\[0\\]\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PRGN0WA_AW { - #[doc = "1: Enable write access watch in this PREGION"] - SET = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PRGN0WA_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `PRGN0WA` writer - Enable write access watch in PREGION\\[0\\]"] -pub type PRGN0WA_W<'a, const O: u8> = crate::BitWriter<'a, u32, REGIONENSET_SPEC, PRGN0WA_AW, O>; -impl<'a, const O: u8> PRGN0WA_W<'a, O> { - #[doc = "Enable write access watch in this PREGION"] - #[inline(always)] - pub fn set(self) -> &'a mut W { - self.variant(PRGN0WA_AW::SET) - } -} -#[doc = "Field `PRGN0RA` reader - Enable read access watch in PREGION\\[0\\]"] -pub type PRGN0RA_R = crate::BitReader; -#[doc = "Enable read access watch in PREGION\\[0\\]\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PRGN0RA_A { - #[doc = "0: Read access watch in this PREGION is disabled"] - DISABLED = 0, - #[doc = "1: Read access watch in this PREGION is enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PRGN0RA_A) -> Self { - variant as u8 != 0 - } -} -impl PRGN0RA_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> PRGN0RA_A { - match self.bits { - false => PRGN0RA_A::DISABLED, - true => PRGN0RA_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == PRGN0RA_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == PRGN0RA_A::ENABLED - } -} -#[doc = "Enable read access watch in PREGION\\[0\\]\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PRGN0RA_AW { - #[doc = "1: Enable read access watch in this PREGION"] - SET = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PRGN0RA_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `PRGN0RA` writer - Enable read access watch in PREGION\\[0\\]"] -pub type PRGN0RA_W<'a, const O: u8> = crate::BitWriter<'a, u32, REGIONENSET_SPEC, PRGN0RA_AW, O>; -impl<'a, const O: u8> PRGN0RA_W<'a, O> { - #[doc = "Enable read access watch in this PREGION"] - #[inline(always)] - pub fn set(self) -> &'a mut W { - self.variant(PRGN0RA_AW::SET) - } -} -#[doc = "Field `PRGN1WA` reader - Enable write access watch in PREGION\\[1\\]"] -pub type PRGN1WA_R = crate::BitReader; -#[doc = "Enable write access watch in PREGION\\[1\\]\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PRGN1WA_A { - #[doc = "0: Write access watch in this PREGION is disabled"] - DISABLED = 0, - #[doc = "1: Write access watch in this PREGION is enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PRGN1WA_A) -> Self { - variant as u8 != 0 - } -} -impl PRGN1WA_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> PRGN1WA_A { - match self.bits { - false => PRGN1WA_A::DISABLED, - true => PRGN1WA_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == PRGN1WA_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == PRGN1WA_A::ENABLED - } -} -#[doc = "Enable write access watch in PREGION\\[1\\]\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PRGN1WA_AW { - #[doc = "1: Enable write access watch in this PREGION"] - SET = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PRGN1WA_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `PRGN1WA` writer - Enable write access watch in PREGION\\[1\\]"] -pub type PRGN1WA_W<'a, const O: u8> = crate::BitWriter<'a, u32, REGIONENSET_SPEC, PRGN1WA_AW, O>; -impl<'a, const O: u8> PRGN1WA_W<'a, O> { - #[doc = "Enable write access watch in this PREGION"] - #[inline(always)] - pub fn set(self) -> &'a mut W { - self.variant(PRGN1WA_AW::SET) - } -} -#[doc = "Field `PRGN1RA` reader - Enable read access watch in PREGION\\[1\\]"] -pub type PRGN1RA_R = crate::BitReader; -#[doc = "Enable read access watch in PREGION\\[1\\]\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PRGN1RA_A { - #[doc = "0: Read access watch in this PREGION is disabled"] - DISABLED = 0, - #[doc = "1: Read access watch in this PREGION is enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PRGN1RA_A) -> Self { - variant as u8 != 0 - } -} -impl PRGN1RA_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> PRGN1RA_A { - match self.bits { - false => PRGN1RA_A::DISABLED, - true => PRGN1RA_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == PRGN1RA_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == PRGN1RA_A::ENABLED - } -} -#[doc = "Enable read access watch in PREGION\\[1\\]\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PRGN1RA_AW { - #[doc = "1: Enable read access watch in this PREGION"] - SET = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PRGN1RA_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `PRGN1RA` writer - Enable read access watch in PREGION\\[1\\]"] -pub type PRGN1RA_W<'a, const O: u8> = crate::BitWriter<'a, u32, REGIONENSET_SPEC, PRGN1RA_AW, O>; -impl<'a, const O: u8> PRGN1RA_W<'a, O> { - #[doc = "Enable read access watch in this PREGION"] - #[inline(always)] - pub fn set(self) -> &'a mut W { - self.variant(PRGN1RA_AW::SET) - } -} -impl R { - #[doc = "Bit 0 - Enable write access watch in region\\[0\\]"] - #[inline(always)] - pub fn rgn0wa(&self) -> RGN0WA_R { - RGN0WA_R::new((self.bits & 1) != 0) - } - #[doc = "Bit 1 - Enable read access watch in region\\[0\\]"] - #[inline(always)] - pub fn rgn0ra(&self) -> RGN0RA_R { - RGN0RA_R::new(((self.bits >> 1) & 1) != 0) - } - #[doc = "Bit 2 - Enable write access watch in region\\[1\\]"] - #[inline(always)] - pub fn rgn1wa(&self) -> RGN1WA_R { - RGN1WA_R::new(((self.bits >> 2) & 1) != 0) - } - #[doc = "Bit 3 - Enable read access watch in region\\[1\\]"] - #[inline(always)] - pub fn rgn1ra(&self) -> RGN1RA_R { - RGN1RA_R::new(((self.bits >> 3) & 1) != 0) - } - #[doc = "Bit 4 - Enable write access watch in region\\[2\\]"] - #[inline(always)] - pub fn rgn2wa(&self) -> RGN2WA_R { - RGN2WA_R::new(((self.bits >> 4) & 1) != 0) - } - #[doc = "Bit 5 - Enable read access watch in region\\[2\\]"] - #[inline(always)] - pub fn rgn2ra(&self) -> RGN2RA_R { - RGN2RA_R::new(((self.bits >> 5) & 1) != 0) - } - #[doc = "Bit 6 - Enable write access watch in region\\[3\\]"] - #[inline(always)] - pub fn rgn3wa(&self) -> RGN3WA_R { - RGN3WA_R::new(((self.bits >> 6) & 1) != 0) - } - #[doc = "Bit 7 - Enable read access watch in region\\[3\\]"] - #[inline(always)] - pub fn rgn3ra(&self) -> RGN3RA_R { - RGN3RA_R::new(((self.bits >> 7) & 1) != 0) - } - #[doc = "Bit 24 - Enable write access watch in PREGION\\[0\\]"] - #[inline(always)] - pub fn prgn0wa(&self) -> PRGN0WA_R { - PRGN0WA_R::new(((self.bits >> 24) & 1) != 0) - } - #[doc = "Bit 25 - Enable read access watch in PREGION\\[0\\]"] - #[inline(always)] - pub fn prgn0ra(&self) -> PRGN0RA_R { - PRGN0RA_R::new(((self.bits >> 25) & 1) != 0) - } - #[doc = "Bit 26 - Enable write access watch in PREGION\\[1\\]"] - #[inline(always)] - pub fn prgn1wa(&self) -> PRGN1WA_R { - PRGN1WA_R::new(((self.bits >> 26) & 1) != 0) - } - #[doc = "Bit 27 - Enable read access watch in PREGION\\[1\\]"] - #[inline(always)] - pub fn prgn1ra(&self) -> PRGN1RA_R { - PRGN1RA_R::new(((self.bits >> 27) & 1) != 0) - } -} -impl W { - #[doc = "Bit 0 - Enable write access watch in region\\[0\\]"] - #[inline(always)] - #[must_use] - pub fn rgn0wa(&mut self) -> RGN0WA_W<0> { - RGN0WA_W::new(self) - } - #[doc = "Bit 1 - Enable read access watch in region\\[0\\]"] - #[inline(always)] - #[must_use] - pub fn rgn0ra(&mut self) -> RGN0RA_W<1> { - RGN0RA_W::new(self) - } - #[doc = "Bit 2 - Enable write access watch in region\\[1\\]"] - #[inline(always)] - #[must_use] - pub fn rgn1wa(&mut self) -> RGN1WA_W<2> { - RGN1WA_W::new(self) - } - #[doc = "Bit 3 - Enable read access watch in region\\[1\\]"] - #[inline(always)] - #[must_use] - pub fn rgn1ra(&mut self) -> RGN1RA_W<3> { - RGN1RA_W::new(self) - } - #[doc = "Bit 4 - Enable write access watch in region\\[2\\]"] - #[inline(always)] - #[must_use] - pub fn rgn2wa(&mut self) -> RGN2WA_W<4> { - RGN2WA_W::new(self) - } - #[doc = "Bit 5 - Enable read access watch in region\\[2\\]"] - #[inline(always)] - #[must_use] - pub fn rgn2ra(&mut self) -> RGN2RA_W<5> { - RGN2RA_W::new(self) - } - #[doc = "Bit 6 - Enable write access watch in region\\[3\\]"] - #[inline(always)] - #[must_use] - pub fn rgn3wa(&mut self) -> RGN3WA_W<6> { - RGN3WA_W::new(self) - } - #[doc = "Bit 7 - Enable read access watch in region\\[3\\]"] - #[inline(always)] - #[must_use] - pub fn rgn3ra(&mut self) -> RGN3RA_W<7> { - RGN3RA_W::new(self) - } - #[doc = "Bit 24 - Enable write access watch in PREGION\\[0\\]"] - #[inline(always)] - #[must_use] - pub fn prgn0wa(&mut self) -> PRGN0WA_W<24> { - PRGN0WA_W::new(self) - } - #[doc = "Bit 25 - Enable read access watch in PREGION\\[0\\]"] - #[inline(always)] - #[must_use] - pub fn prgn0ra(&mut self) -> PRGN0RA_W<25> { - PRGN0RA_W::new(self) - } - #[doc = "Bit 26 - Enable write access watch in PREGION\\[1\\]"] - #[inline(always)] - #[must_use] - pub fn prgn1wa(&mut self) -> PRGN1WA_W<26> { - PRGN1WA_W::new(self) - } - #[doc = "Bit 27 - Enable read access watch in PREGION\\[1\\]"] - #[inline(always)] - #[must_use] - pub fn prgn1ra(&mut self) -> PRGN1RA_W<27> { - PRGN1RA_W::new(self) - } - #[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 = "Enable regions watch\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 [regionenset](index.html) module"] -pub struct REGIONENSET_SPEC; -impl crate::RegisterSpec for REGIONENSET_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [regionenset::R](R) reader structure"] -impl crate::Readable for REGIONENSET_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [regionenset::W](W) writer structure"] -impl crate::Writable for REGIONENSET_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets REGIONENSET to value 0"] -impl crate::Resettable for REGIONENSET_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/nfct.rs b/down-the-stack/dk_pac/src/nfct.rs deleted file mode 100644 index 938f37a..0000000 --- a/down-the-stack/dk_pac/src/nfct.rs +++ /dev/null @@ -1,275 +0,0 @@ -#[doc = r"Register block"] -#[repr(C)] -pub struct RegisterBlock { - #[doc = "0x00 - Activate NFC peripheral for incoming and outgoing frames, change state to activated"] - pub tasks_activate: TASKS_ACTIVATE, - #[doc = "0x04 - Disable NFC peripheral"] - pub tasks_disable: TASKS_DISABLE, - #[doc = "0x08 - Enable NFC sense field mode, change state to sense mode"] - pub tasks_sense: TASKS_SENSE, - #[doc = "0x0c - Start transmission of a outgoing frame, change state to transmit"] - pub tasks_starttx: TASKS_STARTTX, - _reserved4: [u8; 0x0c], - #[doc = "0x1c - Initializes the EasyDMA for receive."] - pub tasks_enablerxdata: TASKS_ENABLERXDATA, - _reserved5: [u8; 0x04], - #[doc = "0x24 - Force state machine to IDLE state"] - pub tasks_goidle: TASKS_GOIDLE, - #[doc = "0x28 - Force state machine to SLEEP_A state"] - pub tasks_gosleep: TASKS_GOSLEEP, - _reserved7: [u8; 0xd4], - #[doc = "0x100 - The NFC peripheral is ready to receive and send frames"] - pub events_ready: EVENTS_READY, - #[doc = "0x104 - Remote NFC field detected"] - pub events_fielddetected: EVENTS_FIELDDETECTED, - #[doc = "0x108 - Remote NFC field lost"] - pub events_fieldlost: EVENTS_FIELDLOST, - #[doc = "0x10c - Marks the start of the first symbol of a transmitted frame"] - pub events_txframestart: EVENTS_TXFRAMESTART, - #[doc = "0x110 - Marks the end of the last transmitted on-air symbol of a frame"] - pub events_txframeend: EVENTS_TXFRAMEEND, - #[doc = "0x114 - Marks the end of the first symbol of a received frame"] - pub events_rxframestart: EVENTS_RXFRAMESTART, - #[doc = "0x118 - Received data have been checked (CRC, parity) and transferred to RAM, and EasyDMA has ended accessing the RX buffer"] - pub events_rxframeend: EVENTS_RXFRAMEEND, - #[doc = "0x11c - NFC error reported. The ERRORSTATUS register contains details on the source of the error."] - pub events_error: EVENTS_ERROR, - _reserved15: [u8; 0x08], - #[doc = "0x128 - NFC RX frame error reported. The FRAMESTATUS.RX register contains details on the source of the error."] - pub events_rxerror: EVENTS_RXERROR, - #[doc = "0x12c - RX buffer (as defined by PACKETPTR and MAXLEN) in Data RAM full."] - pub events_endrx: EVENTS_ENDRX, - #[doc = "0x130 - Transmission of data in RAM has ended, and EasyDMA has ended accessing the TX buffer"] - pub events_endtx: EVENTS_ENDTX, - _reserved18: [u8; 0x04], - #[doc = "0x138 - Auto collision resolution process has started"] - pub events_autocolresstarted: EVENTS_AUTOCOLRESSTARTED, - _reserved19: [u8; 0x0c], - #[doc = "0x148 - NFC Auto collision resolution error reported."] - pub events_collision: EVENTS_COLLISION, - #[doc = "0x14c - NFC Auto collision resolution successfully completed"] - pub events_selected: EVENTS_SELECTED, - #[doc = "0x150 - EasyDMA is ready to receive or send frames."] - pub events_started: EVENTS_STARTED, - _reserved22: [u8; 0xac], - #[doc = "0x200 - Shortcuts between local events and tasks"] - pub shorts: SHORTS, - _reserved23: [u8; 0xfc], - #[doc = "0x300 - Enable or disable interrupt"] - pub inten: INTEN, - #[doc = "0x304 - Enable interrupt"] - pub intenset: INTENSET, - #[doc = "0x308 - Disable interrupt"] - pub intenclr: INTENCLR, - _reserved26: [u8; 0xf8], - #[doc = "0x404 - NFC Error Status register"] - pub errorstatus: ERRORSTATUS, - _reserved27: [u8; 0x04], - #[doc = "0x40c - Unspecified"] - pub framestatus: FRAMESTATUS, - _reserved28: [u8; 0x20], - #[doc = "0x430 - Current value driven to the NFC Load Control"] - pub currentloadctrl: CURRENTLOADCTRL, - _reserved29: [u8; 0x08], - #[doc = "0x43c - Indicates the presence or not of a valid field"] - pub fieldpresent: FIELDPRESENT, - _reserved30: [u8; 0xc4], - #[doc = "0x504 - Minimum frame delay"] - pub framedelaymin: FRAMEDELAYMIN, - #[doc = "0x508 - Maximum frame delay"] - pub framedelaymax: FRAMEDELAYMAX, - #[doc = "0x50c - Configuration register for the Frame Delay Timer"] - pub framedelaymode: FRAMEDELAYMODE, - #[doc = "0x510 - Packet pointer for TXD and RXD data storage in Data RAM"] - pub packetptr: PACKETPTR, - #[doc = "0x514 - Size of allocated for TXD and RXD data storage buffer in Data RAM"] - pub maxlen: MAXLEN, - #[doc = "0x518..0x520 - Unspecified"] - pub txd: TXD, - #[doc = "0x520..0x528 - Unspecified"] - pub rxd: RXD, - _reserved37: [u8; 0x68], - #[doc = "0x590 - Last NFCID1 part (4, 7 or 10 bytes ID)"] - pub nfcid1_last: NFCID1_LAST, - #[doc = "0x594 - Second last NFCID1 part (7 or 10 bytes ID)"] - pub nfcid1_2nd_last: NFCID1_2ND_LAST, - #[doc = "0x598 - Third last NFCID1 part (10 bytes ID)"] - pub nfcid1_3rd_last: NFCID1_3RD_LAST, - _reserved40: [u8; 0x04], - #[doc = "0x5a0 - NFC-A SENS_RES auto-response settings"] - pub sensres: SENSRES, - #[doc = "0x5a4 - NFC-A SEL_RES auto-response settings"] - pub selres: SELRES, -} -#[doc = "TASKS_ACTIVATE (w) register accessor: an alias for `Reg`"] -pub type TASKS_ACTIVATE = crate::Reg; -#[doc = "Activate NFC peripheral for incoming and outgoing frames, change state to activated"] -pub mod tasks_activate; -#[doc = "TASKS_DISABLE (w) register accessor: an alias for `Reg`"] -pub type TASKS_DISABLE = crate::Reg; -#[doc = "Disable NFC peripheral"] -pub mod tasks_disable; -#[doc = "TASKS_SENSE (w) register accessor: an alias for `Reg`"] -pub type TASKS_SENSE = crate::Reg; -#[doc = "Enable NFC sense field mode, change state to sense mode"] -pub mod tasks_sense; -#[doc = "TASKS_STARTTX (w) register accessor: an alias for `Reg`"] -pub type TASKS_STARTTX = crate::Reg; -#[doc = "Start transmission of a outgoing frame, change state to transmit"] -pub mod tasks_starttx; -#[doc = "TASKS_ENABLERXDATA (w) register accessor: an alias for `Reg`"] -pub type TASKS_ENABLERXDATA = crate::Reg; -#[doc = "Initializes the EasyDMA for receive."] -pub mod tasks_enablerxdata; -#[doc = "TASKS_GOIDLE (w) register accessor: an alias for `Reg`"] -pub type TASKS_GOIDLE = crate::Reg; -#[doc = "Force state machine to IDLE state"] -pub mod tasks_goidle; -#[doc = "TASKS_GOSLEEP (w) register accessor: an alias for `Reg`"] -pub type TASKS_GOSLEEP = crate::Reg; -#[doc = "Force state machine to SLEEP_A state"] -pub mod tasks_gosleep; -#[doc = "EVENTS_READY (rw) register accessor: an alias for `Reg`"] -pub type EVENTS_READY = crate::Reg; -#[doc = "The NFC peripheral is ready to receive and send frames"] -pub mod events_ready; -#[doc = "EVENTS_FIELDDETECTED (rw) register accessor: an alias for `Reg`"] -pub type EVENTS_FIELDDETECTED = crate::Reg; -#[doc = "Remote NFC field detected"] -pub mod events_fielddetected; -#[doc = "EVENTS_FIELDLOST (rw) register accessor: an alias for `Reg`"] -pub type EVENTS_FIELDLOST = crate::Reg; -#[doc = "Remote NFC field lost"] -pub mod events_fieldlost; -#[doc = "EVENTS_TXFRAMESTART (rw) register accessor: an alias for `Reg`"] -pub type EVENTS_TXFRAMESTART = crate::Reg; -#[doc = "Marks the start of the first symbol of a transmitted frame"] -pub mod events_txframestart; -#[doc = "EVENTS_TXFRAMEEND (rw) register accessor: an alias for `Reg`"] -pub type EVENTS_TXFRAMEEND = crate::Reg; -#[doc = "Marks the end of the last transmitted on-air symbol of a frame"] -pub mod events_txframeend; -#[doc = "EVENTS_RXFRAMESTART (rw) register accessor: an alias for `Reg`"] -pub type EVENTS_RXFRAMESTART = crate::Reg; -#[doc = "Marks the end of the first symbol of a received frame"] -pub mod events_rxframestart; -#[doc = "EVENTS_RXFRAMEEND (rw) register accessor: an alias for `Reg`"] -pub type EVENTS_RXFRAMEEND = crate::Reg; -#[doc = "Received data have been checked (CRC, parity) and transferred to RAM, and EasyDMA has ended accessing the RX buffer"] -pub mod events_rxframeend; -#[doc = "EVENTS_ERROR (rw) register accessor: an alias for `Reg`"] -pub type EVENTS_ERROR = crate::Reg; -#[doc = "NFC error reported. The ERRORSTATUS register contains details on the source of the error."] -pub mod events_error; -#[doc = "EVENTS_RXERROR (rw) register accessor: an alias for `Reg`"] -pub type EVENTS_RXERROR = crate::Reg; -#[doc = "NFC RX frame error reported. The FRAMESTATUS.RX register contains details on the source of the error."] -pub mod events_rxerror; -#[doc = "EVENTS_ENDRX (rw) register accessor: an alias for `Reg`"] -pub type EVENTS_ENDRX = crate::Reg; -#[doc = "RX buffer (as defined by PACKETPTR and MAXLEN) in Data RAM full."] -pub mod events_endrx; -#[doc = "EVENTS_ENDTX (rw) register accessor: an alias for `Reg`"] -pub type EVENTS_ENDTX = crate::Reg; -#[doc = "Transmission of data in RAM has ended, and EasyDMA has ended accessing the TX buffer"] -pub mod events_endtx; -#[doc = "EVENTS_AUTOCOLRESSTARTED (rw) register accessor: an alias for `Reg`"] -pub type EVENTS_AUTOCOLRESSTARTED = - crate::Reg; -#[doc = "Auto collision resolution process has started"] -pub mod events_autocolresstarted; -#[doc = "EVENTS_COLLISION (rw) register accessor: an alias for `Reg`"] -pub type EVENTS_COLLISION = crate::Reg; -#[doc = "NFC Auto collision resolution error reported."] -pub mod events_collision; -#[doc = "EVENTS_SELECTED (rw) register accessor: an alias for `Reg`"] -pub type EVENTS_SELECTED = crate::Reg; -#[doc = "NFC Auto collision resolution successfully completed"] -pub mod events_selected; -#[doc = "EVENTS_STARTED (rw) register accessor: an alias for `Reg`"] -pub type EVENTS_STARTED = crate::Reg; -#[doc = "EasyDMA is ready to receive or send frames."] -pub mod events_started; -#[doc = "SHORTS (rw) register accessor: an alias for `Reg`"] -pub type SHORTS = crate::Reg; -#[doc = "Shortcuts between local events and tasks"] -pub mod shorts; -#[doc = "INTEN (rw) register accessor: an alias for `Reg`"] -pub type INTEN = crate::Reg; -#[doc = "Enable or disable interrupt"] -pub mod inten; -#[doc = "INTENSET (rw) register accessor: an alias for `Reg`"] -pub type INTENSET = crate::Reg; -#[doc = "Enable interrupt"] -pub mod intenset; -#[doc = "INTENCLR (rw) register accessor: an alias for `Reg`"] -pub type INTENCLR = crate::Reg; -#[doc = "Disable interrupt"] -pub mod intenclr; -#[doc = "ERRORSTATUS (rw) register accessor: an alias for `Reg`"] -pub type ERRORSTATUS = crate::Reg; -#[doc = "NFC Error Status register"] -pub mod errorstatus; -#[doc = "Unspecified"] -pub use self::framestatus::FRAMESTATUS; -#[doc = r"Cluster"] -#[doc = "Unspecified"] -pub mod framestatus; -#[doc = "CURRENTLOADCTRL (r) register accessor: an alias for `Reg`"] -pub type CURRENTLOADCTRL = crate::Reg; -#[doc = "Current value driven to the NFC Load Control"] -pub mod currentloadctrl; -#[doc = "FIELDPRESENT (r) register accessor: an alias for `Reg`"] -pub type FIELDPRESENT = crate::Reg; -#[doc = "Indicates the presence or not of a valid field"] -pub mod fieldpresent; -#[doc = "FRAMEDELAYMIN (rw) register accessor: an alias for `Reg`"] -pub type FRAMEDELAYMIN = crate::Reg; -#[doc = "Minimum frame delay"] -pub mod framedelaymin; -#[doc = "FRAMEDELAYMAX (rw) register accessor: an alias for `Reg`"] -pub type FRAMEDELAYMAX = crate::Reg; -#[doc = "Maximum frame delay"] -pub mod framedelaymax; -#[doc = "FRAMEDELAYMODE (rw) register accessor: an alias for `Reg`"] -pub type FRAMEDELAYMODE = crate::Reg; -#[doc = "Configuration register for the Frame Delay Timer"] -pub mod framedelaymode; -#[doc = "PACKETPTR (rw) register accessor: an alias for `Reg`"] -pub type PACKETPTR = crate::Reg; -#[doc = "Packet pointer for TXD and RXD data storage in Data RAM"] -pub mod packetptr; -#[doc = "MAXLEN (rw) register accessor: an alias for `Reg`"] -pub type MAXLEN = crate::Reg; -#[doc = "Size of allocated for TXD and RXD data storage buffer in Data RAM"] -pub mod maxlen; -#[doc = "Unspecified"] -pub use self::txd::TXD; -#[doc = r"Cluster"] -#[doc = "Unspecified"] -pub mod txd; -#[doc = "Unspecified"] -pub use self::rxd::RXD; -#[doc = r"Cluster"] -#[doc = "Unspecified"] -pub mod rxd; -#[doc = "NFCID1_LAST (rw) register accessor: an alias for `Reg`"] -pub type NFCID1_LAST = crate::Reg; -#[doc = "Last NFCID1 part (4, 7 or 10 bytes ID)"] -pub mod nfcid1_last; -#[doc = "NFCID1_2ND_LAST (rw) register accessor: an alias for `Reg`"] -pub type NFCID1_2ND_LAST = crate::Reg; -#[doc = "Second last NFCID1 part (7 or 10 bytes ID)"] -pub mod nfcid1_2nd_last; -#[doc = "NFCID1_3RD_LAST (rw) register accessor: an alias for `Reg`"] -pub type NFCID1_3RD_LAST = crate::Reg; -#[doc = "Third last NFCID1 part (10 bytes ID)"] -pub mod nfcid1_3rd_last; -#[doc = "SENSRES (rw) register accessor: an alias for `Reg`"] -pub type SENSRES = crate::Reg; -#[doc = "NFC-A SENS_RES auto-response settings"] -pub mod sensres; -#[doc = "SELRES (rw) register accessor: an alias for `Reg`"] -pub type SELRES = crate::Reg; -#[doc = "NFC-A SEL_RES auto-response settings"] -pub mod selres; diff --git a/down-the-stack/dk_pac/src/nfct/currentloadctrl.rs b/down-the-stack/dk_pac/src/nfct/currentloadctrl.rs deleted file mode 100644 index 86f5a61..0000000 --- a/down-the-stack/dk_pac/src/nfct/currentloadctrl.rs +++ /dev/null @@ -1,37 +0,0 @@ -#[doc = "Register `CURRENTLOADCTRL` 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 = "Field `CURRENTLOADCTRL` reader - Current value driven to the NFC Load Control"] -pub type CURRENTLOADCTRL_R = crate::FieldReader; -impl R { - #[doc = "Bits 0:5 - Current value driven to the NFC Load Control"] - #[inline(always)] - pub fn currentloadctrl(&self) -> CURRENTLOADCTRL_R { - CURRENTLOADCTRL_R::new((self.bits & 0x3f) as u8) - } -} -#[doc = "Current value driven to the NFC Load Control\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 [currentloadctrl](index.html) module"] -pub struct CURRENTLOADCTRL_SPEC; -impl crate::RegisterSpec for CURRENTLOADCTRL_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [currentloadctrl::R](R) reader structure"] -impl crate::Readable for CURRENTLOADCTRL_SPEC { - type Reader = R; -} -#[doc = "`reset()` method sets CURRENTLOADCTRL to value 0"] -impl crate::Resettable for CURRENTLOADCTRL_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/nfct/errorstatus.rs b/down-the-stack/dk_pac/src/nfct/errorstatus.rs deleted file mode 100644 index ca528ea..0000000 --- a/down-the-stack/dk_pac/src/nfct/errorstatus.rs +++ /dev/null @@ -1,113 +0,0 @@ -#[doc = "Register `ERRORSTATUS` 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 `ERRORSTATUS` 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 `FRAMEDELAYTIMEOUT` reader - No STARTTX task triggered before expiration of the time set in FRAMEDELAYMAX"] -pub type FRAMEDELAYTIMEOUT_R = crate::BitReader; -#[doc = "Field `FRAMEDELAYTIMEOUT` writer - No STARTTX task triggered before expiration of the time set in FRAMEDELAYMAX"] -pub type FRAMEDELAYTIMEOUT_W<'a, const O: u8> = - crate::BitWriter1C<'a, u32, ERRORSTATUS_SPEC, bool, O>; -#[doc = "Field `NFCFIELDTOOSTRONG` reader - Field level is too high at max load resistance"] -pub type NFCFIELDTOOSTRONG_R = crate::BitReader; -#[doc = "Field `NFCFIELDTOOSTRONG` writer - Field level is too high at max load resistance"] -pub type NFCFIELDTOOSTRONG_W<'a, const O: u8> = - crate::BitWriter1C<'a, u32, ERRORSTATUS_SPEC, bool, O>; -#[doc = "Field `NFCFIELDTOOWEAK` reader - Field level is too low at min load resistance"] -pub type NFCFIELDTOOWEAK_R = crate::BitReader; -#[doc = "Field `NFCFIELDTOOWEAK` writer - Field level is too low at min load resistance"] -pub type NFCFIELDTOOWEAK_W<'a, const O: u8> = - crate::BitWriter1C<'a, u32, ERRORSTATUS_SPEC, bool, O>; -impl R { - #[doc = "Bit 0 - No STARTTX task triggered before expiration of the time set in FRAMEDELAYMAX"] - #[inline(always)] - pub fn framedelaytimeout(&self) -> FRAMEDELAYTIMEOUT_R { - FRAMEDELAYTIMEOUT_R::new((self.bits & 1) != 0) - } - #[doc = "Bit 2 - Field level is too high at max load resistance"] - #[inline(always)] - pub fn nfcfieldtoostrong(&self) -> NFCFIELDTOOSTRONG_R { - NFCFIELDTOOSTRONG_R::new(((self.bits >> 2) & 1) != 0) - } - #[doc = "Bit 3 - Field level is too low at min load resistance"] - #[inline(always)] - pub fn nfcfieldtooweak(&self) -> NFCFIELDTOOWEAK_R { - NFCFIELDTOOWEAK_R::new(((self.bits >> 3) & 1) != 0) - } -} -impl W { - #[doc = "Bit 0 - No STARTTX task triggered before expiration of the time set in FRAMEDELAYMAX"] - #[inline(always)] - #[must_use] - pub fn framedelaytimeout(&mut self) -> FRAMEDELAYTIMEOUT_W<0> { - FRAMEDELAYTIMEOUT_W::new(self) - } - #[doc = "Bit 2 - Field level is too high at max load resistance"] - #[inline(always)] - #[must_use] - pub fn nfcfieldtoostrong(&mut self) -> NFCFIELDTOOSTRONG_W<2> { - NFCFIELDTOOSTRONG_W::new(self) - } - #[doc = "Bit 3 - Field level is too low at min load resistance"] - #[inline(always)] - #[must_use] - pub fn nfcfieldtooweak(&mut self) -> NFCFIELDTOOWEAK_W<3> { - NFCFIELDTOOWEAK_W::new(self) - } - #[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 = "NFC Error Status register\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 [errorstatus](index.html) module"] -pub struct ERRORSTATUS_SPEC; -impl crate::RegisterSpec for ERRORSTATUS_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [errorstatus::R](R) reader structure"] -impl crate::Readable for ERRORSTATUS_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [errorstatus::W](W) writer structure"] -impl crate::Writable for ERRORSTATUS_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0x0d; -} -#[doc = "`reset()` method sets ERRORSTATUS to value 0"] -impl crate::Resettable for ERRORSTATUS_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/nfct/events_autocolresstarted.rs b/down-the-stack/dk_pac/src/nfct/events_autocolresstarted.rs deleted file mode 100644 index 002ca01..0000000 --- a/down-the-stack/dk_pac/src/nfct/events_autocolresstarted.rs +++ /dev/null @@ -1,127 +0,0 @@ -#[doc = "Register `EVENTS_AUTOCOLRESSTARTED` 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 `EVENTS_AUTOCOLRESSTARTED` 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 `EVENTS_AUTOCOLRESSTARTED` reader - Auto collision resolution process has started"] -pub type EVENTS_AUTOCOLRESSTARTED_R = crate::BitReader; -#[doc = "Auto collision resolution process has started\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum EVENTS_AUTOCOLRESSTARTED_A { - #[doc = "0: Event not generated"] - NOT_GENERATED = 0, - #[doc = "1: Event generated"] - GENERATED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: EVENTS_AUTOCOLRESSTARTED_A) -> Self { - variant as u8 != 0 - } -} -impl EVENTS_AUTOCOLRESSTARTED_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> EVENTS_AUTOCOLRESSTARTED_A { - match self.bits { - false => EVENTS_AUTOCOLRESSTARTED_A::NOT_GENERATED, - true => EVENTS_AUTOCOLRESSTARTED_A::GENERATED, - } - } - #[doc = "Checks if the value of the field is `NOT_GENERATED`"] - #[inline(always)] - pub fn is_not_generated(&self) -> bool { - *self == EVENTS_AUTOCOLRESSTARTED_A::NOT_GENERATED - } - #[doc = "Checks if the value of the field is `GENERATED`"] - #[inline(always)] - pub fn is_generated(&self) -> bool { - *self == EVENTS_AUTOCOLRESSTARTED_A::GENERATED - } -} -#[doc = "Field `EVENTS_AUTOCOLRESSTARTED` writer - Auto collision resolution process has started"] -pub type EVENTS_AUTOCOLRESSTARTED_W<'a, const O: u8> = - crate::BitWriter<'a, u32, EVENTS_AUTOCOLRESSTARTED_SPEC, EVENTS_AUTOCOLRESSTARTED_A, O>; -impl<'a, const O: u8> EVENTS_AUTOCOLRESSTARTED_W<'a, O> { - #[doc = "Event not generated"] - #[inline(always)] - pub fn not_generated(self) -> &'a mut W { - self.variant(EVENTS_AUTOCOLRESSTARTED_A::NOT_GENERATED) - } - #[doc = "Event generated"] - #[inline(always)] - pub fn generated(self) -> &'a mut W { - self.variant(EVENTS_AUTOCOLRESSTARTED_A::GENERATED) - } -} -impl R { - #[doc = "Bit 0 - Auto collision resolution process has started"] - #[inline(always)] - pub fn events_autocolresstarted(&self) -> EVENTS_AUTOCOLRESSTARTED_R { - EVENTS_AUTOCOLRESSTARTED_R::new((self.bits & 1) != 0) - } -} -impl W { - #[doc = "Bit 0 - Auto collision resolution process has started"] - #[inline(always)] - #[must_use] - pub fn events_autocolresstarted(&mut self) -> EVENTS_AUTOCOLRESSTARTED_W<0> { - EVENTS_AUTOCOLRESSTARTED_W::new(self) - } - #[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 = "Auto collision resolution process has started\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 [events_autocolresstarted](index.html) module"] -pub struct EVENTS_AUTOCOLRESSTARTED_SPEC; -impl crate::RegisterSpec for EVENTS_AUTOCOLRESSTARTED_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [events_autocolresstarted::R](R) reader structure"] -impl crate::Readable for EVENTS_AUTOCOLRESSTARTED_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [events_autocolresstarted::W](W) writer structure"] -impl crate::Writable for EVENTS_AUTOCOLRESSTARTED_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets EVENTS_AUTOCOLRESSTARTED to value 0"] -impl crate::Resettable for EVENTS_AUTOCOLRESSTARTED_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/nfct/events_collision.rs b/down-the-stack/dk_pac/src/nfct/events_collision.rs deleted file mode 100644 index ed21d9b..0000000 --- a/down-the-stack/dk_pac/src/nfct/events_collision.rs +++ /dev/null @@ -1,127 +0,0 @@ -#[doc = "Register `EVENTS_COLLISION` 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 `EVENTS_COLLISION` 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 `EVENTS_COLLISION` reader - NFC Auto collision resolution error reported."] -pub type EVENTS_COLLISION_R = crate::BitReader; -#[doc = "NFC Auto collision resolution error reported.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum EVENTS_COLLISION_A { - #[doc = "0: Event not generated"] - NOT_GENERATED = 0, - #[doc = "1: Event generated"] - GENERATED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: EVENTS_COLLISION_A) -> Self { - variant as u8 != 0 - } -} -impl EVENTS_COLLISION_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> EVENTS_COLLISION_A { - match self.bits { - false => EVENTS_COLLISION_A::NOT_GENERATED, - true => EVENTS_COLLISION_A::GENERATED, - } - } - #[doc = "Checks if the value of the field is `NOT_GENERATED`"] - #[inline(always)] - pub fn is_not_generated(&self) -> bool { - *self == EVENTS_COLLISION_A::NOT_GENERATED - } - #[doc = "Checks if the value of the field is `GENERATED`"] - #[inline(always)] - pub fn is_generated(&self) -> bool { - *self == EVENTS_COLLISION_A::GENERATED - } -} -#[doc = "Field `EVENTS_COLLISION` writer - NFC Auto collision resolution error reported."] -pub type EVENTS_COLLISION_W<'a, const O: u8> = - crate::BitWriter<'a, u32, EVENTS_COLLISION_SPEC, EVENTS_COLLISION_A, O>; -impl<'a, const O: u8> EVENTS_COLLISION_W<'a, O> { - #[doc = "Event not generated"] - #[inline(always)] - pub fn not_generated(self) -> &'a mut W { - self.variant(EVENTS_COLLISION_A::NOT_GENERATED) - } - #[doc = "Event generated"] - #[inline(always)] - pub fn generated(self) -> &'a mut W { - self.variant(EVENTS_COLLISION_A::GENERATED) - } -} -impl R { - #[doc = "Bit 0 - NFC Auto collision resolution error reported."] - #[inline(always)] - pub fn events_collision(&self) -> EVENTS_COLLISION_R { - EVENTS_COLLISION_R::new((self.bits & 1) != 0) - } -} -impl W { - #[doc = "Bit 0 - NFC Auto collision resolution error reported."] - #[inline(always)] - #[must_use] - pub fn events_collision(&mut self) -> EVENTS_COLLISION_W<0> { - EVENTS_COLLISION_W::new(self) - } - #[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 = "NFC Auto collision resolution error reported.\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 [events_collision](index.html) module"] -pub struct EVENTS_COLLISION_SPEC; -impl crate::RegisterSpec for EVENTS_COLLISION_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [events_collision::R](R) reader structure"] -impl crate::Readable for EVENTS_COLLISION_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [events_collision::W](W) writer structure"] -impl crate::Writable for EVENTS_COLLISION_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets EVENTS_COLLISION to value 0"] -impl crate::Resettable for EVENTS_COLLISION_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/nfct/events_endrx.rs b/down-the-stack/dk_pac/src/nfct/events_endrx.rs deleted file mode 100644 index 97cbd95..0000000 --- a/down-the-stack/dk_pac/src/nfct/events_endrx.rs +++ /dev/null @@ -1,127 +0,0 @@ -#[doc = "Register `EVENTS_ENDRX` 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 `EVENTS_ENDRX` 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 `EVENTS_ENDRX` reader - RX buffer (as defined by PACKETPTR and MAXLEN) in Data RAM full."] -pub type EVENTS_ENDRX_R = crate::BitReader; -#[doc = "RX buffer (as defined by PACKETPTR and MAXLEN) in Data RAM full.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum EVENTS_ENDRX_A { - #[doc = "0: Event not generated"] - NOT_GENERATED = 0, - #[doc = "1: Event generated"] - GENERATED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: EVENTS_ENDRX_A) -> Self { - variant as u8 != 0 - } -} -impl EVENTS_ENDRX_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> EVENTS_ENDRX_A { - match self.bits { - false => EVENTS_ENDRX_A::NOT_GENERATED, - true => EVENTS_ENDRX_A::GENERATED, - } - } - #[doc = "Checks if the value of the field is `NOT_GENERATED`"] - #[inline(always)] - pub fn is_not_generated(&self) -> bool { - *self == EVENTS_ENDRX_A::NOT_GENERATED - } - #[doc = "Checks if the value of the field is `GENERATED`"] - #[inline(always)] - pub fn is_generated(&self) -> bool { - *self == EVENTS_ENDRX_A::GENERATED - } -} -#[doc = "Field `EVENTS_ENDRX` writer - RX buffer (as defined by PACKETPTR and MAXLEN) in Data RAM full."] -pub type EVENTS_ENDRX_W<'a, const O: u8> = - crate::BitWriter<'a, u32, EVENTS_ENDRX_SPEC, EVENTS_ENDRX_A, O>; -impl<'a, const O: u8> EVENTS_ENDRX_W<'a, O> { - #[doc = "Event not generated"] - #[inline(always)] - pub fn not_generated(self) -> &'a mut W { - self.variant(EVENTS_ENDRX_A::NOT_GENERATED) - } - #[doc = "Event generated"] - #[inline(always)] - pub fn generated(self) -> &'a mut W { - self.variant(EVENTS_ENDRX_A::GENERATED) - } -} -impl R { - #[doc = "Bit 0 - RX buffer (as defined by PACKETPTR and MAXLEN) in Data RAM full."] - #[inline(always)] - pub fn events_endrx(&self) -> EVENTS_ENDRX_R { - EVENTS_ENDRX_R::new((self.bits & 1) != 0) - } -} -impl W { - #[doc = "Bit 0 - RX buffer (as defined by PACKETPTR and MAXLEN) in Data RAM full."] - #[inline(always)] - #[must_use] - pub fn events_endrx(&mut self) -> EVENTS_ENDRX_W<0> { - EVENTS_ENDRX_W::new(self) - } - #[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 = "RX buffer (as defined by PACKETPTR and MAXLEN) in Data RAM full.\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 [events_endrx](index.html) module"] -pub struct EVENTS_ENDRX_SPEC; -impl crate::RegisterSpec for EVENTS_ENDRX_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [events_endrx::R](R) reader structure"] -impl crate::Readable for EVENTS_ENDRX_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [events_endrx::W](W) writer structure"] -impl crate::Writable for EVENTS_ENDRX_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets EVENTS_ENDRX to value 0"] -impl crate::Resettable for EVENTS_ENDRX_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/nfct/events_endtx.rs b/down-the-stack/dk_pac/src/nfct/events_endtx.rs deleted file mode 100644 index b5df0f9..0000000 --- a/down-the-stack/dk_pac/src/nfct/events_endtx.rs +++ /dev/null @@ -1,127 +0,0 @@ -#[doc = "Register `EVENTS_ENDTX` 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 `EVENTS_ENDTX` 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 `EVENTS_ENDTX` reader - Transmission of data in RAM has ended, and EasyDMA has ended accessing the TX buffer"] -pub type EVENTS_ENDTX_R = crate::BitReader; -#[doc = "Transmission of data in RAM has ended, and EasyDMA has ended accessing the TX buffer\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum EVENTS_ENDTX_A { - #[doc = "0: Event not generated"] - NOT_GENERATED = 0, - #[doc = "1: Event generated"] - GENERATED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: EVENTS_ENDTX_A) -> Self { - variant as u8 != 0 - } -} -impl EVENTS_ENDTX_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> EVENTS_ENDTX_A { - match self.bits { - false => EVENTS_ENDTX_A::NOT_GENERATED, - true => EVENTS_ENDTX_A::GENERATED, - } - } - #[doc = "Checks if the value of the field is `NOT_GENERATED`"] - #[inline(always)] - pub fn is_not_generated(&self) -> bool { - *self == EVENTS_ENDTX_A::NOT_GENERATED - } - #[doc = "Checks if the value of the field is `GENERATED`"] - #[inline(always)] - pub fn is_generated(&self) -> bool { - *self == EVENTS_ENDTX_A::GENERATED - } -} -#[doc = "Field `EVENTS_ENDTX` writer - Transmission of data in RAM has ended, and EasyDMA has ended accessing the TX buffer"] -pub type EVENTS_ENDTX_W<'a, const O: u8> = - crate::BitWriter<'a, u32, EVENTS_ENDTX_SPEC, EVENTS_ENDTX_A, O>; -impl<'a, const O: u8> EVENTS_ENDTX_W<'a, O> { - #[doc = "Event not generated"] - #[inline(always)] - pub fn not_generated(self) -> &'a mut W { - self.variant(EVENTS_ENDTX_A::NOT_GENERATED) - } - #[doc = "Event generated"] - #[inline(always)] - pub fn generated(self) -> &'a mut W { - self.variant(EVENTS_ENDTX_A::GENERATED) - } -} -impl R { - #[doc = "Bit 0 - Transmission of data in RAM has ended, and EasyDMA has ended accessing the TX buffer"] - #[inline(always)] - pub fn events_endtx(&self) -> EVENTS_ENDTX_R { - EVENTS_ENDTX_R::new((self.bits & 1) != 0) - } -} -impl W { - #[doc = "Bit 0 - Transmission of data in RAM has ended, and EasyDMA has ended accessing the TX buffer"] - #[inline(always)] - #[must_use] - pub fn events_endtx(&mut self) -> EVENTS_ENDTX_W<0> { - EVENTS_ENDTX_W::new(self) - } - #[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 = "Transmission of data in RAM has ended, and EasyDMA has ended accessing the TX buffer\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 [events_endtx](index.html) module"] -pub struct EVENTS_ENDTX_SPEC; -impl crate::RegisterSpec for EVENTS_ENDTX_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [events_endtx::R](R) reader structure"] -impl crate::Readable for EVENTS_ENDTX_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [events_endtx::W](W) writer structure"] -impl crate::Writable for EVENTS_ENDTX_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets EVENTS_ENDTX to value 0"] -impl crate::Resettable for EVENTS_ENDTX_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/nfct/events_error.rs b/down-the-stack/dk_pac/src/nfct/events_error.rs deleted file mode 100644 index ac4d2c0..0000000 --- a/down-the-stack/dk_pac/src/nfct/events_error.rs +++ /dev/null @@ -1,127 +0,0 @@ -#[doc = "Register `EVENTS_ERROR` 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 `EVENTS_ERROR` 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 `EVENTS_ERROR` reader - NFC error reported. The ERRORSTATUS register contains details on the source of the error."] -pub type EVENTS_ERROR_R = crate::BitReader; -#[doc = "NFC error reported. The ERRORSTATUS register contains details on the source of the error.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum EVENTS_ERROR_A { - #[doc = "0: Event not generated"] - NOT_GENERATED = 0, - #[doc = "1: Event generated"] - GENERATED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: EVENTS_ERROR_A) -> Self { - variant as u8 != 0 - } -} -impl EVENTS_ERROR_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> EVENTS_ERROR_A { - match self.bits { - false => EVENTS_ERROR_A::NOT_GENERATED, - true => EVENTS_ERROR_A::GENERATED, - } - } - #[doc = "Checks if the value of the field is `NOT_GENERATED`"] - #[inline(always)] - pub fn is_not_generated(&self) -> bool { - *self == EVENTS_ERROR_A::NOT_GENERATED - } - #[doc = "Checks if the value of the field is `GENERATED`"] - #[inline(always)] - pub fn is_generated(&self) -> bool { - *self == EVENTS_ERROR_A::GENERATED - } -} -#[doc = "Field `EVENTS_ERROR` writer - NFC error reported. The ERRORSTATUS register contains details on the source of the error."] -pub type EVENTS_ERROR_W<'a, const O: u8> = - crate::BitWriter<'a, u32, EVENTS_ERROR_SPEC, EVENTS_ERROR_A, O>; -impl<'a, const O: u8> EVENTS_ERROR_W<'a, O> { - #[doc = "Event not generated"] - #[inline(always)] - pub fn not_generated(self) -> &'a mut W { - self.variant(EVENTS_ERROR_A::NOT_GENERATED) - } - #[doc = "Event generated"] - #[inline(always)] - pub fn generated(self) -> &'a mut W { - self.variant(EVENTS_ERROR_A::GENERATED) - } -} -impl R { - #[doc = "Bit 0 - NFC error reported. The ERRORSTATUS register contains details on the source of the error."] - #[inline(always)] - pub fn events_error(&self) -> EVENTS_ERROR_R { - EVENTS_ERROR_R::new((self.bits & 1) != 0) - } -} -impl W { - #[doc = "Bit 0 - NFC error reported. The ERRORSTATUS register contains details on the source of the error."] - #[inline(always)] - #[must_use] - pub fn events_error(&mut self) -> EVENTS_ERROR_W<0> { - EVENTS_ERROR_W::new(self) - } - #[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 = "NFC error reported. The ERRORSTATUS register contains details on the source of the error.\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 [events_error](index.html) module"] -pub struct EVENTS_ERROR_SPEC; -impl crate::RegisterSpec for EVENTS_ERROR_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [events_error::R](R) reader structure"] -impl crate::Readable for EVENTS_ERROR_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [events_error::W](W) writer structure"] -impl crate::Writable for EVENTS_ERROR_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets EVENTS_ERROR to value 0"] -impl crate::Resettable for EVENTS_ERROR_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/nfct/events_fielddetected.rs b/down-the-stack/dk_pac/src/nfct/events_fielddetected.rs deleted file mode 100644 index f696305..0000000 --- a/down-the-stack/dk_pac/src/nfct/events_fielddetected.rs +++ /dev/null @@ -1,127 +0,0 @@ -#[doc = "Register `EVENTS_FIELDDETECTED` 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 `EVENTS_FIELDDETECTED` 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 `EVENTS_FIELDDETECTED` reader - Remote NFC field detected"] -pub type EVENTS_FIELDDETECTED_R = crate::BitReader; -#[doc = "Remote NFC field detected\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum EVENTS_FIELDDETECTED_A { - #[doc = "0: Event not generated"] - NOT_GENERATED = 0, - #[doc = "1: Event generated"] - GENERATED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: EVENTS_FIELDDETECTED_A) -> Self { - variant as u8 != 0 - } -} -impl EVENTS_FIELDDETECTED_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> EVENTS_FIELDDETECTED_A { - match self.bits { - false => EVENTS_FIELDDETECTED_A::NOT_GENERATED, - true => EVENTS_FIELDDETECTED_A::GENERATED, - } - } - #[doc = "Checks if the value of the field is `NOT_GENERATED`"] - #[inline(always)] - pub fn is_not_generated(&self) -> bool { - *self == EVENTS_FIELDDETECTED_A::NOT_GENERATED - } - #[doc = "Checks if the value of the field is `GENERATED`"] - #[inline(always)] - pub fn is_generated(&self) -> bool { - *self == EVENTS_FIELDDETECTED_A::GENERATED - } -} -#[doc = "Field `EVENTS_FIELDDETECTED` writer - Remote NFC field detected"] -pub type EVENTS_FIELDDETECTED_W<'a, const O: u8> = - crate::BitWriter<'a, u32, EVENTS_FIELDDETECTED_SPEC, EVENTS_FIELDDETECTED_A, O>; -impl<'a, const O: u8> EVENTS_FIELDDETECTED_W<'a, O> { - #[doc = "Event not generated"] - #[inline(always)] - pub fn not_generated(self) -> &'a mut W { - self.variant(EVENTS_FIELDDETECTED_A::NOT_GENERATED) - } - #[doc = "Event generated"] - #[inline(always)] - pub fn generated(self) -> &'a mut W { - self.variant(EVENTS_FIELDDETECTED_A::GENERATED) - } -} -impl R { - #[doc = "Bit 0 - Remote NFC field detected"] - #[inline(always)] - pub fn events_fielddetected(&self) -> EVENTS_FIELDDETECTED_R { - EVENTS_FIELDDETECTED_R::new((self.bits & 1) != 0) - } -} -impl W { - #[doc = "Bit 0 - Remote NFC field detected"] - #[inline(always)] - #[must_use] - pub fn events_fielddetected(&mut self) -> EVENTS_FIELDDETECTED_W<0> { - EVENTS_FIELDDETECTED_W::new(self) - } - #[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 = "Remote NFC field detected\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 [events_fielddetected](index.html) module"] -pub struct EVENTS_FIELDDETECTED_SPEC; -impl crate::RegisterSpec for EVENTS_FIELDDETECTED_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [events_fielddetected::R](R) reader structure"] -impl crate::Readable for EVENTS_FIELDDETECTED_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [events_fielddetected::W](W) writer structure"] -impl crate::Writable for EVENTS_FIELDDETECTED_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets EVENTS_FIELDDETECTED to value 0"] -impl crate::Resettable for EVENTS_FIELDDETECTED_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/nfct/events_fieldlost.rs b/down-the-stack/dk_pac/src/nfct/events_fieldlost.rs deleted file mode 100644 index 7bcf51d..0000000 --- a/down-the-stack/dk_pac/src/nfct/events_fieldlost.rs +++ /dev/null @@ -1,127 +0,0 @@ -#[doc = "Register `EVENTS_FIELDLOST` 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 `EVENTS_FIELDLOST` 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 `EVENTS_FIELDLOST` reader - Remote NFC field lost"] -pub type EVENTS_FIELDLOST_R = crate::BitReader; -#[doc = "Remote NFC field lost\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum EVENTS_FIELDLOST_A { - #[doc = "0: Event not generated"] - NOT_GENERATED = 0, - #[doc = "1: Event generated"] - GENERATED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: EVENTS_FIELDLOST_A) -> Self { - variant as u8 != 0 - } -} -impl EVENTS_FIELDLOST_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> EVENTS_FIELDLOST_A { - match self.bits { - false => EVENTS_FIELDLOST_A::NOT_GENERATED, - true => EVENTS_FIELDLOST_A::GENERATED, - } - } - #[doc = "Checks if the value of the field is `NOT_GENERATED`"] - #[inline(always)] - pub fn is_not_generated(&self) -> bool { - *self == EVENTS_FIELDLOST_A::NOT_GENERATED - } - #[doc = "Checks if the value of the field is `GENERATED`"] - #[inline(always)] - pub fn is_generated(&self) -> bool { - *self == EVENTS_FIELDLOST_A::GENERATED - } -} -#[doc = "Field `EVENTS_FIELDLOST` writer - Remote NFC field lost"] -pub type EVENTS_FIELDLOST_W<'a, const O: u8> = - crate::BitWriter<'a, u32, EVENTS_FIELDLOST_SPEC, EVENTS_FIELDLOST_A, O>; -impl<'a, const O: u8> EVENTS_FIELDLOST_W<'a, O> { - #[doc = "Event not generated"] - #[inline(always)] - pub fn not_generated(self) -> &'a mut W { - self.variant(EVENTS_FIELDLOST_A::NOT_GENERATED) - } - #[doc = "Event generated"] - #[inline(always)] - pub fn generated(self) -> &'a mut W { - self.variant(EVENTS_FIELDLOST_A::GENERATED) - } -} -impl R { - #[doc = "Bit 0 - Remote NFC field lost"] - #[inline(always)] - pub fn events_fieldlost(&self) -> EVENTS_FIELDLOST_R { - EVENTS_FIELDLOST_R::new((self.bits & 1) != 0) - } -} -impl W { - #[doc = "Bit 0 - Remote NFC field lost"] - #[inline(always)] - #[must_use] - pub fn events_fieldlost(&mut self) -> EVENTS_FIELDLOST_W<0> { - EVENTS_FIELDLOST_W::new(self) - } - #[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 = "Remote NFC field lost\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 [events_fieldlost](index.html) module"] -pub struct EVENTS_FIELDLOST_SPEC; -impl crate::RegisterSpec for EVENTS_FIELDLOST_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [events_fieldlost::R](R) reader structure"] -impl crate::Readable for EVENTS_FIELDLOST_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [events_fieldlost::W](W) writer structure"] -impl crate::Writable for EVENTS_FIELDLOST_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets EVENTS_FIELDLOST to value 0"] -impl crate::Resettable for EVENTS_FIELDLOST_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/nfct/events_ready.rs b/down-the-stack/dk_pac/src/nfct/events_ready.rs deleted file mode 100644 index 5ffd19b..0000000 --- a/down-the-stack/dk_pac/src/nfct/events_ready.rs +++ /dev/null @@ -1,127 +0,0 @@ -#[doc = "Register `EVENTS_READY` 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 `EVENTS_READY` 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 `EVENTS_READY` reader - The NFC peripheral is ready to receive and send frames"] -pub type EVENTS_READY_R = crate::BitReader; -#[doc = "The NFC peripheral is ready to receive and send frames\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum EVENTS_READY_A { - #[doc = "0: Event not generated"] - NOT_GENERATED = 0, - #[doc = "1: Event generated"] - GENERATED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: EVENTS_READY_A) -> Self { - variant as u8 != 0 - } -} -impl EVENTS_READY_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> EVENTS_READY_A { - match self.bits { - false => EVENTS_READY_A::NOT_GENERATED, - true => EVENTS_READY_A::GENERATED, - } - } - #[doc = "Checks if the value of the field is `NOT_GENERATED`"] - #[inline(always)] - pub fn is_not_generated(&self) -> bool { - *self == EVENTS_READY_A::NOT_GENERATED - } - #[doc = "Checks if the value of the field is `GENERATED`"] - #[inline(always)] - pub fn is_generated(&self) -> bool { - *self == EVENTS_READY_A::GENERATED - } -} -#[doc = "Field `EVENTS_READY` writer - The NFC peripheral is ready to receive and send frames"] -pub type EVENTS_READY_W<'a, const O: u8> = - crate::BitWriter<'a, u32, EVENTS_READY_SPEC, EVENTS_READY_A, O>; -impl<'a, const O: u8> EVENTS_READY_W<'a, O> { - #[doc = "Event not generated"] - #[inline(always)] - pub fn not_generated(self) -> &'a mut W { - self.variant(EVENTS_READY_A::NOT_GENERATED) - } - #[doc = "Event generated"] - #[inline(always)] - pub fn generated(self) -> &'a mut W { - self.variant(EVENTS_READY_A::GENERATED) - } -} -impl R { - #[doc = "Bit 0 - The NFC peripheral is ready to receive and send frames"] - #[inline(always)] - pub fn events_ready(&self) -> EVENTS_READY_R { - EVENTS_READY_R::new((self.bits & 1) != 0) - } -} -impl W { - #[doc = "Bit 0 - The NFC peripheral is ready to receive and send frames"] - #[inline(always)] - #[must_use] - pub fn events_ready(&mut self) -> EVENTS_READY_W<0> { - EVENTS_READY_W::new(self) - } - #[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 = "The NFC peripheral is ready to receive and send frames\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 [events_ready](index.html) module"] -pub struct EVENTS_READY_SPEC; -impl crate::RegisterSpec for EVENTS_READY_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [events_ready::R](R) reader structure"] -impl crate::Readable for EVENTS_READY_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [events_ready::W](W) writer structure"] -impl crate::Writable for EVENTS_READY_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets EVENTS_READY to value 0"] -impl crate::Resettable for EVENTS_READY_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/nfct/events_rxerror.rs b/down-the-stack/dk_pac/src/nfct/events_rxerror.rs deleted file mode 100644 index 0f874a8..0000000 --- a/down-the-stack/dk_pac/src/nfct/events_rxerror.rs +++ /dev/null @@ -1,127 +0,0 @@ -#[doc = "Register `EVENTS_RXERROR` 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 `EVENTS_RXERROR` 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 `EVENTS_RXERROR` reader - NFC RX frame error reported. The FRAMESTATUS.RX register contains details on the source of the error."] -pub type EVENTS_RXERROR_R = crate::BitReader; -#[doc = "NFC RX frame error reported. The FRAMESTATUS.RX register contains details on the source of the error.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum EVENTS_RXERROR_A { - #[doc = "0: Event not generated"] - NOT_GENERATED = 0, - #[doc = "1: Event generated"] - GENERATED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: EVENTS_RXERROR_A) -> Self { - variant as u8 != 0 - } -} -impl EVENTS_RXERROR_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> EVENTS_RXERROR_A { - match self.bits { - false => EVENTS_RXERROR_A::NOT_GENERATED, - true => EVENTS_RXERROR_A::GENERATED, - } - } - #[doc = "Checks if the value of the field is `NOT_GENERATED`"] - #[inline(always)] - pub fn is_not_generated(&self) -> bool { - *self == EVENTS_RXERROR_A::NOT_GENERATED - } - #[doc = "Checks if the value of the field is `GENERATED`"] - #[inline(always)] - pub fn is_generated(&self) -> bool { - *self == EVENTS_RXERROR_A::GENERATED - } -} -#[doc = "Field `EVENTS_RXERROR` writer - NFC RX frame error reported. The FRAMESTATUS.RX register contains details on the source of the error."] -pub type EVENTS_RXERROR_W<'a, const O: u8> = - crate::BitWriter<'a, u32, EVENTS_RXERROR_SPEC, EVENTS_RXERROR_A, O>; -impl<'a, const O: u8> EVENTS_RXERROR_W<'a, O> { - #[doc = "Event not generated"] - #[inline(always)] - pub fn not_generated(self) -> &'a mut W { - self.variant(EVENTS_RXERROR_A::NOT_GENERATED) - } - #[doc = "Event generated"] - #[inline(always)] - pub fn generated(self) -> &'a mut W { - self.variant(EVENTS_RXERROR_A::GENERATED) - } -} -impl R { - #[doc = "Bit 0 - NFC RX frame error reported. The FRAMESTATUS.RX register contains details on the source of the error."] - #[inline(always)] - pub fn events_rxerror(&self) -> EVENTS_RXERROR_R { - EVENTS_RXERROR_R::new((self.bits & 1) != 0) - } -} -impl W { - #[doc = "Bit 0 - NFC RX frame error reported. The FRAMESTATUS.RX register contains details on the source of the error."] - #[inline(always)] - #[must_use] - pub fn events_rxerror(&mut self) -> EVENTS_RXERROR_W<0> { - EVENTS_RXERROR_W::new(self) - } - #[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 = "NFC RX frame error reported. The FRAMESTATUS.RX register contains details on the source of the error.\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 [events_rxerror](index.html) module"] -pub struct EVENTS_RXERROR_SPEC; -impl crate::RegisterSpec for EVENTS_RXERROR_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [events_rxerror::R](R) reader structure"] -impl crate::Readable for EVENTS_RXERROR_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [events_rxerror::W](W) writer structure"] -impl crate::Writable for EVENTS_RXERROR_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets EVENTS_RXERROR to value 0"] -impl crate::Resettable for EVENTS_RXERROR_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/nfct/events_rxframeend.rs b/down-the-stack/dk_pac/src/nfct/events_rxframeend.rs deleted file mode 100644 index 57a8997..0000000 --- a/down-the-stack/dk_pac/src/nfct/events_rxframeend.rs +++ /dev/null @@ -1,127 +0,0 @@ -#[doc = "Register `EVENTS_RXFRAMEEND` 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 `EVENTS_RXFRAMEEND` 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 `EVENTS_RXFRAMEEND` reader - Received data have been checked (CRC, parity) and transferred to RAM, and EasyDMA has ended accessing the RX buffer"] -pub type EVENTS_RXFRAMEEND_R = crate::BitReader; -#[doc = "Received data have been checked (CRC, parity) and transferred to RAM, and EasyDMA has ended accessing the RX buffer\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum EVENTS_RXFRAMEEND_A { - #[doc = "0: Event not generated"] - NOT_GENERATED = 0, - #[doc = "1: Event generated"] - GENERATED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: EVENTS_RXFRAMEEND_A) -> Self { - variant as u8 != 0 - } -} -impl EVENTS_RXFRAMEEND_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> EVENTS_RXFRAMEEND_A { - match self.bits { - false => EVENTS_RXFRAMEEND_A::NOT_GENERATED, - true => EVENTS_RXFRAMEEND_A::GENERATED, - } - } - #[doc = "Checks if the value of the field is `NOT_GENERATED`"] - #[inline(always)] - pub fn is_not_generated(&self) -> bool { - *self == EVENTS_RXFRAMEEND_A::NOT_GENERATED - } - #[doc = "Checks if the value of the field is `GENERATED`"] - #[inline(always)] - pub fn is_generated(&self) -> bool { - *self == EVENTS_RXFRAMEEND_A::GENERATED - } -} -#[doc = "Field `EVENTS_RXFRAMEEND` writer - Received data have been checked (CRC, parity) and transferred to RAM, and EasyDMA has ended accessing the RX buffer"] -pub type EVENTS_RXFRAMEEND_W<'a, const O: u8> = - crate::BitWriter<'a, u32, EVENTS_RXFRAMEEND_SPEC, EVENTS_RXFRAMEEND_A, O>; -impl<'a, const O: u8> EVENTS_RXFRAMEEND_W<'a, O> { - #[doc = "Event not generated"] - #[inline(always)] - pub fn not_generated(self) -> &'a mut W { - self.variant(EVENTS_RXFRAMEEND_A::NOT_GENERATED) - } - #[doc = "Event generated"] - #[inline(always)] - pub fn generated(self) -> &'a mut W { - self.variant(EVENTS_RXFRAMEEND_A::GENERATED) - } -} -impl R { - #[doc = "Bit 0 - Received data have been checked (CRC, parity) and transferred to RAM, and EasyDMA has ended accessing the RX buffer"] - #[inline(always)] - pub fn events_rxframeend(&self) -> EVENTS_RXFRAMEEND_R { - EVENTS_RXFRAMEEND_R::new((self.bits & 1) != 0) - } -} -impl W { - #[doc = "Bit 0 - Received data have been checked (CRC, parity) and transferred to RAM, and EasyDMA has ended accessing the RX buffer"] - #[inline(always)] - #[must_use] - pub fn events_rxframeend(&mut self) -> EVENTS_RXFRAMEEND_W<0> { - EVENTS_RXFRAMEEND_W::new(self) - } - #[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 = "Received data have been checked (CRC, parity) and transferred to RAM, and EasyDMA has ended accessing the RX buffer\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 [events_rxframeend](index.html) module"] -pub struct EVENTS_RXFRAMEEND_SPEC; -impl crate::RegisterSpec for EVENTS_RXFRAMEEND_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [events_rxframeend::R](R) reader structure"] -impl crate::Readable for EVENTS_RXFRAMEEND_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [events_rxframeend::W](W) writer structure"] -impl crate::Writable for EVENTS_RXFRAMEEND_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets EVENTS_RXFRAMEEND to value 0"] -impl crate::Resettable for EVENTS_RXFRAMEEND_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/nfct/events_rxframestart.rs b/down-the-stack/dk_pac/src/nfct/events_rxframestart.rs deleted file mode 100644 index c74333b..0000000 --- a/down-the-stack/dk_pac/src/nfct/events_rxframestart.rs +++ /dev/null @@ -1,127 +0,0 @@ -#[doc = "Register `EVENTS_RXFRAMESTART` 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 `EVENTS_RXFRAMESTART` 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 `EVENTS_RXFRAMESTART` reader - Marks the end of the first symbol of a received frame"] -pub type EVENTS_RXFRAMESTART_R = crate::BitReader; -#[doc = "Marks the end of the first symbol of a received frame\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum EVENTS_RXFRAMESTART_A { - #[doc = "0: Event not generated"] - NOT_GENERATED = 0, - #[doc = "1: Event generated"] - GENERATED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: EVENTS_RXFRAMESTART_A) -> Self { - variant as u8 != 0 - } -} -impl EVENTS_RXFRAMESTART_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> EVENTS_RXFRAMESTART_A { - match self.bits { - false => EVENTS_RXFRAMESTART_A::NOT_GENERATED, - true => EVENTS_RXFRAMESTART_A::GENERATED, - } - } - #[doc = "Checks if the value of the field is `NOT_GENERATED`"] - #[inline(always)] - pub fn is_not_generated(&self) -> bool { - *self == EVENTS_RXFRAMESTART_A::NOT_GENERATED - } - #[doc = "Checks if the value of the field is `GENERATED`"] - #[inline(always)] - pub fn is_generated(&self) -> bool { - *self == EVENTS_RXFRAMESTART_A::GENERATED - } -} -#[doc = "Field `EVENTS_RXFRAMESTART` writer - Marks the end of the first symbol of a received frame"] -pub type EVENTS_RXFRAMESTART_W<'a, const O: u8> = - crate::BitWriter<'a, u32, EVENTS_RXFRAMESTART_SPEC, EVENTS_RXFRAMESTART_A, O>; -impl<'a, const O: u8> EVENTS_RXFRAMESTART_W<'a, O> { - #[doc = "Event not generated"] - #[inline(always)] - pub fn not_generated(self) -> &'a mut W { - self.variant(EVENTS_RXFRAMESTART_A::NOT_GENERATED) - } - #[doc = "Event generated"] - #[inline(always)] - pub fn generated(self) -> &'a mut W { - self.variant(EVENTS_RXFRAMESTART_A::GENERATED) - } -} -impl R { - #[doc = "Bit 0 - Marks the end of the first symbol of a received frame"] - #[inline(always)] - pub fn events_rxframestart(&self) -> EVENTS_RXFRAMESTART_R { - EVENTS_RXFRAMESTART_R::new((self.bits & 1) != 0) - } -} -impl W { - #[doc = "Bit 0 - Marks the end of the first symbol of a received frame"] - #[inline(always)] - #[must_use] - pub fn events_rxframestart(&mut self) -> EVENTS_RXFRAMESTART_W<0> { - EVENTS_RXFRAMESTART_W::new(self) - } - #[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 = "Marks the end of the first symbol of a received frame\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 [events_rxframestart](index.html) module"] -pub struct EVENTS_RXFRAMESTART_SPEC; -impl crate::RegisterSpec for EVENTS_RXFRAMESTART_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [events_rxframestart::R](R) reader structure"] -impl crate::Readable for EVENTS_RXFRAMESTART_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [events_rxframestart::W](W) writer structure"] -impl crate::Writable for EVENTS_RXFRAMESTART_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets EVENTS_RXFRAMESTART to value 0"] -impl crate::Resettable for EVENTS_RXFRAMESTART_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/nfct/events_selected.rs b/down-the-stack/dk_pac/src/nfct/events_selected.rs deleted file mode 100644 index 1c709d3..0000000 --- a/down-the-stack/dk_pac/src/nfct/events_selected.rs +++ /dev/null @@ -1,127 +0,0 @@ -#[doc = "Register `EVENTS_SELECTED` 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 `EVENTS_SELECTED` 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 `EVENTS_SELECTED` reader - NFC Auto collision resolution successfully completed"] -pub type EVENTS_SELECTED_R = crate::BitReader; -#[doc = "NFC Auto collision resolution successfully completed\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum EVENTS_SELECTED_A { - #[doc = "0: Event not generated"] - NOT_GENERATED = 0, - #[doc = "1: Event generated"] - GENERATED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: EVENTS_SELECTED_A) -> Self { - variant as u8 != 0 - } -} -impl EVENTS_SELECTED_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> EVENTS_SELECTED_A { - match self.bits { - false => EVENTS_SELECTED_A::NOT_GENERATED, - true => EVENTS_SELECTED_A::GENERATED, - } - } - #[doc = "Checks if the value of the field is `NOT_GENERATED`"] - #[inline(always)] - pub fn is_not_generated(&self) -> bool { - *self == EVENTS_SELECTED_A::NOT_GENERATED - } - #[doc = "Checks if the value of the field is `GENERATED`"] - #[inline(always)] - pub fn is_generated(&self) -> bool { - *self == EVENTS_SELECTED_A::GENERATED - } -} -#[doc = "Field `EVENTS_SELECTED` writer - NFC Auto collision resolution successfully completed"] -pub type EVENTS_SELECTED_W<'a, const O: u8> = - crate::BitWriter<'a, u32, EVENTS_SELECTED_SPEC, EVENTS_SELECTED_A, O>; -impl<'a, const O: u8> EVENTS_SELECTED_W<'a, O> { - #[doc = "Event not generated"] - #[inline(always)] - pub fn not_generated(self) -> &'a mut W { - self.variant(EVENTS_SELECTED_A::NOT_GENERATED) - } - #[doc = "Event generated"] - #[inline(always)] - pub fn generated(self) -> &'a mut W { - self.variant(EVENTS_SELECTED_A::GENERATED) - } -} -impl R { - #[doc = "Bit 0 - NFC Auto collision resolution successfully completed"] - #[inline(always)] - pub fn events_selected(&self) -> EVENTS_SELECTED_R { - EVENTS_SELECTED_R::new((self.bits & 1) != 0) - } -} -impl W { - #[doc = "Bit 0 - NFC Auto collision resolution successfully completed"] - #[inline(always)] - #[must_use] - pub fn events_selected(&mut self) -> EVENTS_SELECTED_W<0> { - EVENTS_SELECTED_W::new(self) - } - #[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 = "NFC Auto collision resolution successfully completed\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 [events_selected](index.html) module"] -pub struct EVENTS_SELECTED_SPEC; -impl crate::RegisterSpec for EVENTS_SELECTED_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [events_selected::R](R) reader structure"] -impl crate::Readable for EVENTS_SELECTED_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [events_selected::W](W) writer structure"] -impl crate::Writable for EVENTS_SELECTED_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets EVENTS_SELECTED to value 0"] -impl crate::Resettable for EVENTS_SELECTED_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/nfct/events_started.rs b/down-the-stack/dk_pac/src/nfct/events_started.rs deleted file mode 100644 index 4114e7c..0000000 --- a/down-the-stack/dk_pac/src/nfct/events_started.rs +++ /dev/null @@ -1,127 +0,0 @@ -#[doc = "Register `EVENTS_STARTED` 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 `EVENTS_STARTED` 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 `EVENTS_STARTED` reader - EasyDMA is ready to receive or send frames."] -pub type EVENTS_STARTED_R = crate::BitReader; -#[doc = "EasyDMA is ready to receive or send frames.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum EVENTS_STARTED_A { - #[doc = "0: Event not generated"] - NOT_GENERATED = 0, - #[doc = "1: Event generated"] - GENERATED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: EVENTS_STARTED_A) -> Self { - variant as u8 != 0 - } -} -impl EVENTS_STARTED_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> EVENTS_STARTED_A { - match self.bits { - false => EVENTS_STARTED_A::NOT_GENERATED, - true => EVENTS_STARTED_A::GENERATED, - } - } - #[doc = "Checks if the value of the field is `NOT_GENERATED`"] - #[inline(always)] - pub fn is_not_generated(&self) -> bool { - *self == EVENTS_STARTED_A::NOT_GENERATED - } - #[doc = "Checks if the value of the field is `GENERATED`"] - #[inline(always)] - pub fn is_generated(&self) -> bool { - *self == EVENTS_STARTED_A::GENERATED - } -} -#[doc = "Field `EVENTS_STARTED` writer - EasyDMA is ready to receive or send frames."] -pub type EVENTS_STARTED_W<'a, const O: u8> = - crate::BitWriter<'a, u32, EVENTS_STARTED_SPEC, EVENTS_STARTED_A, O>; -impl<'a, const O: u8> EVENTS_STARTED_W<'a, O> { - #[doc = "Event not generated"] - #[inline(always)] - pub fn not_generated(self) -> &'a mut W { - self.variant(EVENTS_STARTED_A::NOT_GENERATED) - } - #[doc = "Event generated"] - #[inline(always)] - pub fn generated(self) -> &'a mut W { - self.variant(EVENTS_STARTED_A::GENERATED) - } -} -impl R { - #[doc = "Bit 0 - EasyDMA is ready to receive or send frames."] - #[inline(always)] - pub fn events_started(&self) -> EVENTS_STARTED_R { - EVENTS_STARTED_R::new((self.bits & 1) != 0) - } -} -impl W { - #[doc = "Bit 0 - EasyDMA is ready to receive or send frames."] - #[inline(always)] - #[must_use] - pub fn events_started(&mut self) -> EVENTS_STARTED_W<0> { - EVENTS_STARTED_W::new(self) - } - #[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 = "EasyDMA is ready to receive or send frames.\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 [events_started](index.html) module"] -pub struct EVENTS_STARTED_SPEC; -impl crate::RegisterSpec for EVENTS_STARTED_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [events_started::R](R) reader structure"] -impl crate::Readable for EVENTS_STARTED_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [events_started::W](W) writer structure"] -impl crate::Writable for EVENTS_STARTED_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets EVENTS_STARTED to value 0"] -impl crate::Resettable for EVENTS_STARTED_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/nfct/events_txframeend.rs b/down-the-stack/dk_pac/src/nfct/events_txframeend.rs deleted file mode 100644 index 95236f2..0000000 --- a/down-the-stack/dk_pac/src/nfct/events_txframeend.rs +++ /dev/null @@ -1,127 +0,0 @@ -#[doc = "Register `EVENTS_TXFRAMEEND` 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 `EVENTS_TXFRAMEEND` 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 `EVENTS_TXFRAMEEND` reader - Marks the end of the last transmitted on-air symbol of a frame"] -pub type EVENTS_TXFRAMEEND_R = crate::BitReader; -#[doc = "Marks the end of the last transmitted on-air symbol of a frame\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum EVENTS_TXFRAMEEND_A { - #[doc = "0: Event not generated"] - NOT_GENERATED = 0, - #[doc = "1: Event generated"] - GENERATED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: EVENTS_TXFRAMEEND_A) -> Self { - variant as u8 != 0 - } -} -impl EVENTS_TXFRAMEEND_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> EVENTS_TXFRAMEEND_A { - match self.bits { - false => EVENTS_TXFRAMEEND_A::NOT_GENERATED, - true => EVENTS_TXFRAMEEND_A::GENERATED, - } - } - #[doc = "Checks if the value of the field is `NOT_GENERATED`"] - #[inline(always)] - pub fn is_not_generated(&self) -> bool { - *self == EVENTS_TXFRAMEEND_A::NOT_GENERATED - } - #[doc = "Checks if the value of the field is `GENERATED`"] - #[inline(always)] - pub fn is_generated(&self) -> bool { - *self == EVENTS_TXFRAMEEND_A::GENERATED - } -} -#[doc = "Field `EVENTS_TXFRAMEEND` writer - Marks the end of the last transmitted on-air symbol of a frame"] -pub type EVENTS_TXFRAMEEND_W<'a, const O: u8> = - crate::BitWriter<'a, u32, EVENTS_TXFRAMEEND_SPEC, EVENTS_TXFRAMEEND_A, O>; -impl<'a, const O: u8> EVENTS_TXFRAMEEND_W<'a, O> { - #[doc = "Event not generated"] - #[inline(always)] - pub fn not_generated(self) -> &'a mut W { - self.variant(EVENTS_TXFRAMEEND_A::NOT_GENERATED) - } - #[doc = "Event generated"] - #[inline(always)] - pub fn generated(self) -> &'a mut W { - self.variant(EVENTS_TXFRAMEEND_A::GENERATED) - } -} -impl R { - #[doc = "Bit 0 - Marks the end of the last transmitted on-air symbol of a frame"] - #[inline(always)] - pub fn events_txframeend(&self) -> EVENTS_TXFRAMEEND_R { - EVENTS_TXFRAMEEND_R::new((self.bits & 1) != 0) - } -} -impl W { - #[doc = "Bit 0 - Marks the end of the last transmitted on-air symbol of a frame"] - #[inline(always)] - #[must_use] - pub fn events_txframeend(&mut self) -> EVENTS_TXFRAMEEND_W<0> { - EVENTS_TXFRAMEEND_W::new(self) - } - #[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 = "Marks the end of the last transmitted on-air symbol of a frame\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 [events_txframeend](index.html) module"] -pub struct EVENTS_TXFRAMEEND_SPEC; -impl crate::RegisterSpec for EVENTS_TXFRAMEEND_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [events_txframeend::R](R) reader structure"] -impl crate::Readable for EVENTS_TXFRAMEEND_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [events_txframeend::W](W) writer structure"] -impl crate::Writable for EVENTS_TXFRAMEEND_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets EVENTS_TXFRAMEEND to value 0"] -impl crate::Resettable for EVENTS_TXFRAMEEND_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/nfct/events_txframestart.rs b/down-the-stack/dk_pac/src/nfct/events_txframestart.rs deleted file mode 100644 index ee9d666..0000000 --- a/down-the-stack/dk_pac/src/nfct/events_txframestart.rs +++ /dev/null @@ -1,127 +0,0 @@ -#[doc = "Register `EVENTS_TXFRAMESTART` 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 `EVENTS_TXFRAMESTART` 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 `EVENTS_TXFRAMESTART` reader - Marks the start of the first symbol of a transmitted frame"] -pub type EVENTS_TXFRAMESTART_R = crate::BitReader; -#[doc = "Marks the start of the first symbol of a transmitted frame\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum EVENTS_TXFRAMESTART_A { - #[doc = "0: Event not generated"] - NOT_GENERATED = 0, - #[doc = "1: Event generated"] - GENERATED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: EVENTS_TXFRAMESTART_A) -> Self { - variant as u8 != 0 - } -} -impl EVENTS_TXFRAMESTART_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> EVENTS_TXFRAMESTART_A { - match self.bits { - false => EVENTS_TXFRAMESTART_A::NOT_GENERATED, - true => EVENTS_TXFRAMESTART_A::GENERATED, - } - } - #[doc = "Checks if the value of the field is `NOT_GENERATED`"] - #[inline(always)] - pub fn is_not_generated(&self) -> bool { - *self == EVENTS_TXFRAMESTART_A::NOT_GENERATED - } - #[doc = "Checks if the value of the field is `GENERATED`"] - #[inline(always)] - pub fn is_generated(&self) -> bool { - *self == EVENTS_TXFRAMESTART_A::GENERATED - } -} -#[doc = "Field `EVENTS_TXFRAMESTART` writer - Marks the start of the first symbol of a transmitted frame"] -pub type EVENTS_TXFRAMESTART_W<'a, const O: u8> = - crate::BitWriter<'a, u32, EVENTS_TXFRAMESTART_SPEC, EVENTS_TXFRAMESTART_A, O>; -impl<'a, const O: u8> EVENTS_TXFRAMESTART_W<'a, O> { - #[doc = "Event not generated"] - #[inline(always)] - pub fn not_generated(self) -> &'a mut W { - self.variant(EVENTS_TXFRAMESTART_A::NOT_GENERATED) - } - #[doc = "Event generated"] - #[inline(always)] - pub fn generated(self) -> &'a mut W { - self.variant(EVENTS_TXFRAMESTART_A::GENERATED) - } -} -impl R { - #[doc = "Bit 0 - Marks the start of the first symbol of a transmitted frame"] - #[inline(always)] - pub fn events_txframestart(&self) -> EVENTS_TXFRAMESTART_R { - EVENTS_TXFRAMESTART_R::new((self.bits & 1) != 0) - } -} -impl W { - #[doc = "Bit 0 - Marks the start of the first symbol of a transmitted frame"] - #[inline(always)] - #[must_use] - pub fn events_txframestart(&mut self) -> EVENTS_TXFRAMESTART_W<0> { - EVENTS_TXFRAMESTART_W::new(self) - } - #[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 = "Marks the start of the first symbol of a transmitted frame\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 [events_txframestart](index.html) module"] -pub struct EVENTS_TXFRAMESTART_SPEC; -impl crate::RegisterSpec for EVENTS_TXFRAMESTART_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [events_txframestart::R](R) reader structure"] -impl crate::Readable for EVENTS_TXFRAMESTART_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [events_txframestart::W](W) writer structure"] -impl crate::Writable for EVENTS_TXFRAMESTART_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets EVENTS_TXFRAMESTART to value 0"] -impl crate::Resettable for EVENTS_TXFRAMESTART_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/nfct/fieldpresent.rs b/down-the-stack/dk_pac/src/nfct/fieldpresent.rs deleted file mode 100644 index 299be9e..0000000 --- a/down-the-stack/dk_pac/src/nfct/fieldpresent.rs +++ /dev/null @@ -1,112 +0,0 @@ -#[doc = "Register `FIELDPRESENT` 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 = "Field `FIELDPRESENT` reader - Indicates the presence or not of a valid field. Available only in the activated state."] -pub type FIELDPRESENT_R = crate::BitReader; -#[doc = "Indicates the presence or not of a valid field. Available only in the activated state.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum FIELDPRESENT_A { - #[doc = "0: No valid field detected"] - NO_FIELD = 0, - #[doc = "1: Valid field detected"] - FIELD_PRESENT = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: FIELDPRESENT_A) -> Self { - variant as u8 != 0 - } -} -impl FIELDPRESENT_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> FIELDPRESENT_A { - match self.bits { - false => FIELDPRESENT_A::NO_FIELD, - true => FIELDPRESENT_A::FIELD_PRESENT, - } - } - #[doc = "Checks if the value of the field is `NO_FIELD`"] - #[inline(always)] - pub fn is_no_field(&self) -> bool { - *self == FIELDPRESENT_A::NO_FIELD - } - #[doc = "Checks if the value of the field is `FIELD_PRESENT`"] - #[inline(always)] - pub fn is_field_present(&self) -> bool { - *self == FIELDPRESENT_A::FIELD_PRESENT - } -} -#[doc = "Field `LOCKDETECT` reader - Indicates if the low level has locked to the field"] -pub type LOCKDETECT_R = crate::BitReader; -#[doc = "Indicates if the low level has locked to the field\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum LOCKDETECT_A { - #[doc = "0: Not locked to field"] - NOT_LOCKED = 0, - #[doc = "1: Locked to field"] - LOCKED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: LOCKDETECT_A) -> Self { - variant as u8 != 0 - } -} -impl LOCKDETECT_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> LOCKDETECT_A { - match self.bits { - false => LOCKDETECT_A::NOT_LOCKED, - true => LOCKDETECT_A::LOCKED, - } - } - #[doc = "Checks if the value of the field is `NOT_LOCKED`"] - #[inline(always)] - pub fn is_not_locked(&self) -> bool { - *self == LOCKDETECT_A::NOT_LOCKED - } - #[doc = "Checks if the value of the field is `LOCKED`"] - #[inline(always)] - pub fn is_locked(&self) -> bool { - *self == LOCKDETECT_A::LOCKED - } -} -impl R { - #[doc = "Bit 0 - Indicates the presence or not of a valid field. Available only in the activated state."] - #[inline(always)] - pub fn fieldpresent(&self) -> FIELDPRESENT_R { - FIELDPRESENT_R::new((self.bits & 1) != 0) - } - #[doc = "Bit 1 - Indicates if the low level has locked to the field"] - #[inline(always)] - pub fn lockdetect(&self) -> LOCKDETECT_R { - LOCKDETECT_R::new(((self.bits >> 1) & 1) != 0) - } -} -#[doc = "Indicates the presence or not of a valid field\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 [fieldpresent](index.html) module"] -pub struct FIELDPRESENT_SPEC; -impl crate::RegisterSpec for FIELDPRESENT_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [fieldpresent::R](R) reader structure"] -impl crate::Readable for FIELDPRESENT_SPEC { - type Reader = R; -} -#[doc = "`reset()` method sets FIELDPRESENT to value 0"] -impl crate::Resettable for FIELDPRESENT_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/nfct/framedelaymax.rs b/down-the-stack/dk_pac/src/nfct/framedelaymax.rs deleted file mode 100644 index 287ae64..0000000 --- a/down-the-stack/dk_pac/src/nfct/framedelaymax.rs +++ /dev/null @@ -1,81 +0,0 @@ -#[doc = "Register `FRAMEDELAYMAX` 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 `FRAMEDELAYMAX` 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 `FRAMEDELAYMAX` reader - Maximum frame delay in number of 13.56 MHz clocks"] -pub type FRAMEDELAYMAX_R = crate::FieldReader; -#[doc = "Field `FRAMEDELAYMAX` writer - Maximum frame delay in number of 13.56 MHz clocks"] -pub type FRAMEDELAYMAX_W<'a, const O: u8> = - crate::FieldWriter<'a, u32, FRAMEDELAYMAX_SPEC, u16, u16, 16, O>; -impl R { - #[doc = "Bits 0:15 - Maximum frame delay in number of 13.56 MHz clocks"] - #[inline(always)] - pub fn framedelaymax(&self) -> FRAMEDELAYMAX_R { - FRAMEDELAYMAX_R::new((self.bits & 0xffff) as u16) - } -} -impl W { - #[doc = "Bits 0:15 - Maximum frame delay in number of 13.56 MHz clocks"] - #[inline(always)] - #[must_use] - pub fn framedelaymax(&mut self) -> FRAMEDELAYMAX_W<0> { - FRAMEDELAYMAX_W::new(self) - } - #[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 = "Maximum frame delay\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 [framedelaymax](index.html) module"] -pub struct FRAMEDELAYMAX_SPEC; -impl crate::RegisterSpec for FRAMEDELAYMAX_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [framedelaymax::R](R) reader structure"] -impl crate::Readable for FRAMEDELAYMAX_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [framedelaymax::W](W) writer structure"] -impl crate::Writable for FRAMEDELAYMAX_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets FRAMEDELAYMAX to value 0x1000"] -impl crate::Resettable for FRAMEDELAYMAX_SPEC { - const RESET_VALUE: Self::Ux = 0x1000; -} diff --git a/down-the-stack/dk_pac/src/nfct/framedelaymin.rs b/down-the-stack/dk_pac/src/nfct/framedelaymin.rs deleted file mode 100644 index 089bc0f..0000000 --- a/down-the-stack/dk_pac/src/nfct/framedelaymin.rs +++ /dev/null @@ -1,81 +0,0 @@ -#[doc = "Register `FRAMEDELAYMIN` 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 `FRAMEDELAYMIN` 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 `FRAMEDELAYMIN` reader - Minimum frame delay in number of 13.56 MHz clocks"] -pub type FRAMEDELAYMIN_R = crate::FieldReader; -#[doc = "Field `FRAMEDELAYMIN` writer - Minimum frame delay in number of 13.56 MHz clocks"] -pub type FRAMEDELAYMIN_W<'a, const O: u8> = - crate::FieldWriter<'a, u32, FRAMEDELAYMIN_SPEC, u16, u16, 16, O>; -impl R { - #[doc = "Bits 0:15 - Minimum frame delay in number of 13.56 MHz clocks"] - #[inline(always)] - pub fn framedelaymin(&self) -> FRAMEDELAYMIN_R { - FRAMEDELAYMIN_R::new((self.bits & 0xffff) as u16) - } -} -impl W { - #[doc = "Bits 0:15 - Minimum frame delay in number of 13.56 MHz clocks"] - #[inline(always)] - #[must_use] - pub fn framedelaymin(&mut self) -> FRAMEDELAYMIN_W<0> { - FRAMEDELAYMIN_W::new(self) - } - #[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 = "Minimum frame delay\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 [framedelaymin](index.html) module"] -pub struct FRAMEDELAYMIN_SPEC; -impl crate::RegisterSpec for FRAMEDELAYMIN_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [framedelaymin::R](R) reader structure"] -impl crate::Readable for FRAMEDELAYMIN_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [framedelaymin::W](W) writer structure"] -impl crate::Writable for FRAMEDELAYMIN_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets FRAMEDELAYMIN to value 0x0480"] -impl crate::Resettable for FRAMEDELAYMIN_SPEC { - const RESET_VALUE: Self::Ux = 0x0480; -} diff --git a/down-the-stack/dk_pac/src/nfct/framedelaymode.rs b/down-the-stack/dk_pac/src/nfct/framedelaymode.rs deleted file mode 100644 index 802ab02..0000000 --- a/down-the-stack/dk_pac/src/nfct/framedelaymode.rs +++ /dev/null @@ -1,155 +0,0 @@ -#[doc = "Register `FRAMEDELAYMODE` 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 `FRAMEDELAYMODE` 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 `FRAMEDELAYMODE` reader - Configuration register for the Frame Delay Timer"] -pub type FRAMEDELAYMODE_R = crate::FieldReader; -#[doc = "Configuration register for the Frame Delay Timer\n\nValue on reset: 1"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -#[repr(u8)] -pub enum FRAMEDELAYMODE_A { - #[doc = "0: Transmission is independent of frame timer and will start when the STARTTX task is triggered. No timeout."] - FREE_RUN = 0, - #[doc = "1: Frame is transmitted between FRAMEDELAYMIN and FRAMEDELAYMAX"] - WINDOW = 1, - #[doc = "2: Frame is transmitted exactly at FRAMEDELAYMAX"] - EXACT_VAL = 2, - #[doc = "3: Frame is transmitted on a bit grid between FRAMEDELAYMIN and FRAMEDELAYMAX"] - WINDOW_GRID = 3, -} -impl From for u8 { - #[inline(always)] - fn from(variant: FRAMEDELAYMODE_A) -> Self { - variant as _ - } -} -impl FRAMEDELAYMODE_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> FRAMEDELAYMODE_A { - match self.bits { - 0 => FRAMEDELAYMODE_A::FREE_RUN, - 1 => FRAMEDELAYMODE_A::WINDOW, - 2 => FRAMEDELAYMODE_A::EXACT_VAL, - 3 => FRAMEDELAYMODE_A::WINDOW_GRID, - _ => unreachable!(), - } - } - #[doc = "Checks if the value of the field is `FREE_RUN`"] - #[inline(always)] - pub fn is_free_run(&self) -> bool { - *self == FRAMEDELAYMODE_A::FREE_RUN - } - #[doc = "Checks if the value of the field is `WINDOW`"] - #[inline(always)] - pub fn is_window(&self) -> bool { - *self == FRAMEDELAYMODE_A::WINDOW - } - #[doc = "Checks if the value of the field is `EXACT_VAL`"] - #[inline(always)] - pub fn is_exact_val(&self) -> bool { - *self == FRAMEDELAYMODE_A::EXACT_VAL - } - #[doc = "Checks if the value of the field is `WINDOW_GRID`"] - #[inline(always)] - pub fn is_window_grid(&self) -> bool { - *self == FRAMEDELAYMODE_A::WINDOW_GRID - } -} -#[doc = "Field `FRAMEDELAYMODE` writer - Configuration register for the Frame Delay Timer"] -pub type FRAMEDELAYMODE_W<'a, const O: u8> = - crate::FieldWriterSafe<'a, u32, FRAMEDELAYMODE_SPEC, u8, FRAMEDELAYMODE_A, 2, O>; -impl<'a, const O: u8> FRAMEDELAYMODE_W<'a, O> { - #[doc = "Transmission is independent of frame timer and will start when the STARTTX task is triggered. No timeout."] - #[inline(always)] - pub fn free_run(self) -> &'a mut W { - self.variant(FRAMEDELAYMODE_A::FREE_RUN) - } - #[doc = "Frame is transmitted between FRAMEDELAYMIN and FRAMEDELAYMAX"] - #[inline(always)] - pub fn window(self) -> &'a mut W { - self.variant(FRAMEDELAYMODE_A::WINDOW) - } - #[doc = "Frame is transmitted exactly at FRAMEDELAYMAX"] - #[inline(always)] - pub fn exact_val(self) -> &'a mut W { - self.variant(FRAMEDELAYMODE_A::EXACT_VAL) - } - #[doc = "Frame is transmitted on a bit grid between FRAMEDELAYMIN and FRAMEDELAYMAX"] - #[inline(always)] - pub fn window_grid(self) -> &'a mut W { - self.variant(FRAMEDELAYMODE_A::WINDOW_GRID) - } -} -impl R { - #[doc = "Bits 0:1 - Configuration register for the Frame Delay Timer"] - #[inline(always)] - pub fn framedelaymode(&self) -> FRAMEDELAYMODE_R { - FRAMEDELAYMODE_R::new((self.bits & 3) as u8) - } -} -impl W { - #[doc = "Bits 0:1 - Configuration register for the Frame Delay Timer"] - #[inline(always)] - #[must_use] - pub fn framedelaymode(&mut self) -> FRAMEDELAYMODE_W<0> { - FRAMEDELAYMODE_W::new(self) - } - #[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 = "Configuration register for the Frame Delay Timer\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 [framedelaymode](index.html) module"] -pub struct FRAMEDELAYMODE_SPEC; -impl crate::RegisterSpec for FRAMEDELAYMODE_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [framedelaymode::R](R) reader structure"] -impl crate::Readable for FRAMEDELAYMODE_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [framedelaymode::W](W) writer structure"] -impl crate::Writable for FRAMEDELAYMODE_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets FRAMEDELAYMODE to value 0x01"] -impl crate::Resettable for FRAMEDELAYMODE_SPEC { - const RESET_VALUE: Self::Ux = 0x01; -} diff --git a/down-the-stack/dk_pac/src/nfct/framestatus.rs b/down-the-stack/dk_pac/src/nfct/framestatus.rs deleted file mode 100644 index f7ef317..0000000 --- a/down-the-stack/dk_pac/src/nfct/framestatus.rs +++ /dev/null @@ -1,10 +0,0 @@ -#[doc = r"Register block"] -#[repr(C)] -pub struct FRAMESTATUS { - #[doc = "0x00 - Result of last incoming frames"] - pub rx: RX, -} -#[doc = "RX (rw) register accessor: an alias for `Reg`"] -pub type RX = crate::Reg; -#[doc = "Result of last incoming frames"] -pub mod rx; diff --git a/down-the-stack/dk_pac/src/nfct/framestatus/rx.rs b/down-the-stack/dk_pac/src/nfct/framestatus/rx.rs deleted file mode 100644 index ad66408..0000000 --- a/down-the-stack/dk_pac/src/nfct/framestatus/rx.rs +++ /dev/null @@ -1,248 +0,0 @@ -#[doc = "Register `RX` 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 `RX` 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 `CRCERROR` reader - No valid End of Frame detected"] -pub type CRCERROR_R = crate::BitReader; -#[doc = "No valid End of Frame detected\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum CRCERROR_A { - #[doc = "0: Valid CRC detected"] - CRCCORRECT = 0, - #[doc = "1: CRC received does not match local check"] - CRCERROR = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: CRCERROR_A) -> Self { - variant as u8 != 0 - } -} -impl CRCERROR_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> CRCERROR_A { - match self.bits { - false => CRCERROR_A::CRCCORRECT, - true => CRCERROR_A::CRCERROR, - } - } - #[doc = "Checks if the value of the field is `CRCCORRECT`"] - #[inline(always)] - pub fn is_crccorrect(&self) -> bool { - *self == CRCERROR_A::CRCCORRECT - } - #[doc = "Checks if the value of the field is `CRCERROR`"] - #[inline(always)] - pub fn is_crcerror(&self) -> bool { - *self == CRCERROR_A::CRCERROR - } -} -#[doc = "Field `CRCERROR` writer - No valid End of Frame detected"] -pub type CRCERROR_W<'a, const O: u8> = crate::BitWriter1C<'a, u32, RX_SPEC, CRCERROR_A, O>; -impl<'a, const O: u8> CRCERROR_W<'a, O> { - #[doc = "Valid CRC detected"] - #[inline(always)] - pub fn crccorrect(self) -> &'a mut W { - self.variant(CRCERROR_A::CRCCORRECT) - } - #[doc = "CRC received does not match local check"] - #[inline(always)] - pub fn crcerror(self) -> &'a mut W { - self.variant(CRCERROR_A::CRCERROR) - } -} -#[doc = "Field `PARITYSTATUS` reader - Parity status of received frame"] -pub type PARITYSTATUS_R = crate::BitReader; -#[doc = "Parity status of received frame\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PARITYSTATUS_A { - #[doc = "0: Frame received with parity OK"] - PARITY_OK = 0, - #[doc = "1: Frame received with parity error"] - PARITY_ERROR = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PARITYSTATUS_A) -> Self { - variant as u8 != 0 - } -} -impl PARITYSTATUS_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> PARITYSTATUS_A { - match self.bits { - false => PARITYSTATUS_A::PARITY_OK, - true => PARITYSTATUS_A::PARITY_ERROR, - } - } - #[doc = "Checks if the value of the field is `PARITY_OK`"] - #[inline(always)] - pub fn is_parity_ok(&self) -> bool { - *self == PARITYSTATUS_A::PARITY_OK - } - #[doc = "Checks if the value of the field is `PARITY_ERROR`"] - #[inline(always)] - pub fn is_parity_error(&self) -> bool { - *self == PARITYSTATUS_A::PARITY_ERROR - } -} -#[doc = "Field `PARITYSTATUS` writer - Parity status of received frame"] -pub type PARITYSTATUS_W<'a, const O: u8> = crate::BitWriter1C<'a, u32, RX_SPEC, PARITYSTATUS_A, O>; -impl<'a, const O: u8> PARITYSTATUS_W<'a, O> { - #[doc = "Frame received with parity OK"] - #[inline(always)] - pub fn parity_ok(self) -> &'a mut W { - self.variant(PARITYSTATUS_A::PARITY_OK) - } - #[doc = "Frame received with parity error"] - #[inline(always)] - pub fn parity_error(self) -> &'a mut W { - self.variant(PARITYSTATUS_A::PARITY_ERROR) - } -} -#[doc = "Field `OVERRUN` reader - Overrun detected"] -pub type OVERRUN_R = crate::BitReader; -#[doc = "Overrun detected\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum OVERRUN_A { - #[doc = "0: No overrun detected"] - NO_OVERRUN = 0, - #[doc = "1: Overrun error"] - OVERRUN = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: OVERRUN_A) -> Self { - variant as u8 != 0 - } -} -impl OVERRUN_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> OVERRUN_A { - match self.bits { - false => OVERRUN_A::NO_OVERRUN, - true => OVERRUN_A::OVERRUN, - } - } - #[doc = "Checks if the value of the field is `NO_OVERRUN`"] - #[inline(always)] - pub fn is_no_overrun(&self) -> bool { - *self == OVERRUN_A::NO_OVERRUN - } - #[doc = "Checks if the value of the field is `OVERRUN`"] - #[inline(always)] - pub fn is_overrun(&self) -> bool { - *self == OVERRUN_A::OVERRUN - } -} -#[doc = "Field `OVERRUN` writer - Overrun detected"] -pub type OVERRUN_W<'a, const O: u8> = crate::BitWriter1C<'a, u32, RX_SPEC, OVERRUN_A, O>; -impl<'a, const O: u8> OVERRUN_W<'a, O> { - #[doc = "No overrun detected"] - #[inline(always)] - pub fn no_overrun(self) -> &'a mut W { - self.variant(OVERRUN_A::NO_OVERRUN) - } - #[doc = "Overrun error"] - #[inline(always)] - pub fn overrun(self) -> &'a mut W { - self.variant(OVERRUN_A::OVERRUN) - } -} -impl R { - #[doc = "Bit 0 - No valid End of Frame detected"] - #[inline(always)] - pub fn crcerror(&self) -> CRCERROR_R { - CRCERROR_R::new((self.bits & 1) != 0) - } - #[doc = "Bit 2 - Parity status of received frame"] - #[inline(always)] - pub fn paritystatus(&self) -> PARITYSTATUS_R { - PARITYSTATUS_R::new(((self.bits >> 2) & 1) != 0) - } - #[doc = "Bit 3 - Overrun detected"] - #[inline(always)] - pub fn overrun(&self) -> OVERRUN_R { - OVERRUN_R::new(((self.bits >> 3) & 1) != 0) - } -} -impl W { - #[doc = "Bit 0 - No valid End of Frame detected"] - #[inline(always)] - #[must_use] - pub fn crcerror(&mut self) -> CRCERROR_W<0> { - CRCERROR_W::new(self) - } - #[doc = "Bit 2 - Parity status of received frame"] - #[inline(always)] - #[must_use] - pub fn paritystatus(&mut self) -> PARITYSTATUS_W<2> { - PARITYSTATUS_W::new(self) - } - #[doc = "Bit 3 - Overrun detected"] - #[inline(always)] - #[must_use] - pub fn overrun(&mut self) -> OVERRUN_W<3> { - OVERRUN_W::new(self) - } - #[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 = "Result of last incoming frames\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 [rx](index.html) module"] -pub struct RX_SPEC; -impl crate::RegisterSpec for RX_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [rx::R](R) reader structure"] -impl crate::Readable for RX_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [rx::W](W) writer structure"] -impl crate::Writable for RX_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0x0d; -} -#[doc = "`reset()` method sets RX to value 0"] -impl crate::Resettable for RX_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/nfct/inten.rs b/down-the-stack/dk_pac/src/nfct/inten.rs deleted file mode 100644 index 846e298..0000000 --- a/down-the-stack/dk_pac/src/nfct/inten.rs +++ /dev/null @@ -1,982 +0,0 @@ -#[doc = "Register `INTEN` 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 `INTEN` 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 `READY` reader - Enable or disable interrupt for event READY"] -pub type READY_R = crate::BitReader; -#[doc = "Enable or disable interrupt for event READY\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum READY_A { - #[doc = "0: Disable"] - DISABLED = 0, - #[doc = "1: Enable"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: READY_A) -> Self { - variant as u8 != 0 - } -} -impl READY_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> READY_A { - match self.bits { - false => READY_A::DISABLED, - true => READY_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == READY_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == READY_A::ENABLED - } -} -#[doc = "Field `READY` writer - Enable or disable interrupt for event READY"] -pub type READY_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTEN_SPEC, READY_A, O>; -impl<'a, const O: u8> READY_W<'a, O> { - #[doc = "Disable"] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(READY_A::DISABLED) - } - #[doc = "Enable"] - #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(READY_A::ENABLED) - } -} -#[doc = "Field `FIELDDETECTED` reader - Enable or disable interrupt for event FIELDDETECTED"] -pub type FIELDDETECTED_R = crate::BitReader; -#[doc = "Enable or disable interrupt for event FIELDDETECTED\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum FIELDDETECTED_A { - #[doc = "0: Disable"] - DISABLED = 0, - #[doc = "1: Enable"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: FIELDDETECTED_A) -> Self { - variant as u8 != 0 - } -} -impl FIELDDETECTED_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> FIELDDETECTED_A { - match self.bits { - false => FIELDDETECTED_A::DISABLED, - true => FIELDDETECTED_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == FIELDDETECTED_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == FIELDDETECTED_A::ENABLED - } -} -#[doc = "Field `FIELDDETECTED` writer - Enable or disable interrupt for event FIELDDETECTED"] -pub type FIELDDETECTED_W<'a, const O: u8> = - crate::BitWriter<'a, u32, INTEN_SPEC, FIELDDETECTED_A, O>; -impl<'a, const O: u8> FIELDDETECTED_W<'a, O> { - #[doc = "Disable"] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(FIELDDETECTED_A::DISABLED) - } - #[doc = "Enable"] - #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(FIELDDETECTED_A::ENABLED) - } -} -#[doc = "Field `FIELDLOST` reader - Enable or disable interrupt for event FIELDLOST"] -pub type FIELDLOST_R = crate::BitReader; -#[doc = "Enable or disable interrupt for event FIELDLOST\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum FIELDLOST_A { - #[doc = "0: Disable"] - DISABLED = 0, - #[doc = "1: Enable"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: FIELDLOST_A) -> Self { - variant as u8 != 0 - } -} -impl FIELDLOST_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> FIELDLOST_A { - match self.bits { - false => FIELDLOST_A::DISABLED, - true => FIELDLOST_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == FIELDLOST_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == FIELDLOST_A::ENABLED - } -} -#[doc = "Field `FIELDLOST` writer - Enable or disable interrupt for event FIELDLOST"] -pub type FIELDLOST_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTEN_SPEC, FIELDLOST_A, O>; -impl<'a, const O: u8> FIELDLOST_W<'a, O> { - #[doc = "Disable"] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(FIELDLOST_A::DISABLED) - } - #[doc = "Enable"] - #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(FIELDLOST_A::ENABLED) - } -} -#[doc = "Field `TXFRAMESTART` reader - Enable or disable interrupt for event TXFRAMESTART"] -pub type TXFRAMESTART_R = crate::BitReader; -#[doc = "Enable or disable interrupt for event TXFRAMESTART\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum TXFRAMESTART_A { - #[doc = "0: Disable"] - DISABLED = 0, - #[doc = "1: Enable"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: TXFRAMESTART_A) -> Self { - variant as u8 != 0 - } -} -impl TXFRAMESTART_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> TXFRAMESTART_A { - match self.bits { - false => TXFRAMESTART_A::DISABLED, - true => TXFRAMESTART_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == TXFRAMESTART_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == TXFRAMESTART_A::ENABLED - } -} -#[doc = "Field `TXFRAMESTART` writer - Enable or disable interrupt for event TXFRAMESTART"] -pub type TXFRAMESTART_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTEN_SPEC, TXFRAMESTART_A, O>; -impl<'a, const O: u8> TXFRAMESTART_W<'a, O> { - #[doc = "Disable"] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(TXFRAMESTART_A::DISABLED) - } - #[doc = "Enable"] - #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(TXFRAMESTART_A::ENABLED) - } -} -#[doc = "Field `TXFRAMEEND` reader - Enable or disable interrupt for event TXFRAMEEND"] -pub type TXFRAMEEND_R = crate::BitReader; -#[doc = "Enable or disable interrupt for event TXFRAMEEND\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum TXFRAMEEND_A { - #[doc = "0: Disable"] - DISABLED = 0, - #[doc = "1: Enable"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: TXFRAMEEND_A) -> Self { - variant as u8 != 0 - } -} -impl TXFRAMEEND_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> TXFRAMEEND_A { - match self.bits { - false => TXFRAMEEND_A::DISABLED, - true => TXFRAMEEND_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == TXFRAMEEND_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == TXFRAMEEND_A::ENABLED - } -} -#[doc = "Field `TXFRAMEEND` writer - Enable or disable interrupt for event TXFRAMEEND"] -pub type TXFRAMEEND_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTEN_SPEC, TXFRAMEEND_A, O>; -impl<'a, const O: u8> TXFRAMEEND_W<'a, O> { - #[doc = "Disable"] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(TXFRAMEEND_A::DISABLED) - } - #[doc = "Enable"] - #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(TXFRAMEEND_A::ENABLED) - } -} -#[doc = "Field `RXFRAMESTART` reader - Enable or disable interrupt for event RXFRAMESTART"] -pub type RXFRAMESTART_R = crate::BitReader; -#[doc = "Enable or disable interrupt for event RXFRAMESTART\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum RXFRAMESTART_A { - #[doc = "0: Disable"] - DISABLED = 0, - #[doc = "1: Enable"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: RXFRAMESTART_A) -> Self { - variant as u8 != 0 - } -} -impl RXFRAMESTART_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> RXFRAMESTART_A { - match self.bits { - false => RXFRAMESTART_A::DISABLED, - true => RXFRAMESTART_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == RXFRAMESTART_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == RXFRAMESTART_A::ENABLED - } -} -#[doc = "Field `RXFRAMESTART` writer - Enable or disable interrupt for event RXFRAMESTART"] -pub type RXFRAMESTART_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTEN_SPEC, RXFRAMESTART_A, O>; -impl<'a, const O: u8> RXFRAMESTART_W<'a, O> { - #[doc = "Disable"] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(RXFRAMESTART_A::DISABLED) - } - #[doc = "Enable"] - #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(RXFRAMESTART_A::ENABLED) - } -} -#[doc = "Field `RXFRAMEEND` reader - Enable or disable interrupt for event RXFRAMEEND"] -pub type RXFRAMEEND_R = crate::BitReader; -#[doc = "Enable or disable interrupt for event RXFRAMEEND\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum RXFRAMEEND_A { - #[doc = "0: Disable"] - DISABLED = 0, - #[doc = "1: Enable"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: RXFRAMEEND_A) -> Self { - variant as u8 != 0 - } -} -impl RXFRAMEEND_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> RXFRAMEEND_A { - match self.bits { - false => RXFRAMEEND_A::DISABLED, - true => RXFRAMEEND_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == RXFRAMEEND_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == RXFRAMEEND_A::ENABLED - } -} -#[doc = "Field `RXFRAMEEND` writer - Enable or disable interrupt for event RXFRAMEEND"] -pub type RXFRAMEEND_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTEN_SPEC, RXFRAMEEND_A, O>; -impl<'a, const O: u8> RXFRAMEEND_W<'a, O> { - #[doc = "Disable"] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(RXFRAMEEND_A::DISABLED) - } - #[doc = "Enable"] - #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(RXFRAMEEND_A::ENABLED) - } -} -#[doc = "Field `ERROR` reader - Enable or disable interrupt for event ERROR"] -pub type ERROR_R = crate::BitReader; -#[doc = "Enable or disable interrupt for event ERROR\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum ERROR_A { - #[doc = "0: Disable"] - DISABLED = 0, - #[doc = "1: Enable"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: ERROR_A) -> Self { - variant as u8 != 0 - } -} -impl ERROR_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> ERROR_A { - match self.bits { - false => ERROR_A::DISABLED, - true => ERROR_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == ERROR_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == ERROR_A::ENABLED - } -} -#[doc = "Field `ERROR` writer - Enable or disable interrupt for event ERROR"] -pub type ERROR_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTEN_SPEC, ERROR_A, O>; -impl<'a, const O: u8> ERROR_W<'a, O> { - #[doc = "Disable"] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(ERROR_A::DISABLED) - } - #[doc = "Enable"] - #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(ERROR_A::ENABLED) - } -} -#[doc = "Field `RXERROR` reader - Enable or disable interrupt for event RXERROR"] -pub type RXERROR_R = crate::BitReader; -#[doc = "Enable or disable interrupt for event RXERROR\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum RXERROR_A { - #[doc = "0: Disable"] - DISABLED = 0, - #[doc = "1: Enable"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: RXERROR_A) -> Self { - variant as u8 != 0 - } -} -impl RXERROR_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> RXERROR_A { - match self.bits { - false => RXERROR_A::DISABLED, - true => RXERROR_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == RXERROR_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == RXERROR_A::ENABLED - } -} -#[doc = "Field `RXERROR` writer - Enable or disable interrupt for event RXERROR"] -pub type RXERROR_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTEN_SPEC, RXERROR_A, O>; -impl<'a, const O: u8> RXERROR_W<'a, O> { - #[doc = "Disable"] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(RXERROR_A::DISABLED) - } - #[doc = "Enable"] - #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(RXERROR_A::ENABLED) - } -} -#[doc = "Field `ENDRX` reader - Enable or disable interrupt for event ENDRX"] -pub type ENDRX_R = crate::BitReader; -#[doc = "Enable or disable interrupt for event ENDRX\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum ENDRX_A { - #[doc = "0: Disable"] - DISABLED = 0, - #[doc = "1: Enable"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: ENDRX_A) -> Self { - variant as u8 != 0 - } -} -impl ENDRX_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> ENDRX_A { - match self.bits { - false => ENDRX_A::DISABLED, - true => ENDRX_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == ENDRX_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == ENDRX_A::ENABLED - } -} -#[doc = "Field `ENDRX` writer - Enable or disable interrupt for event ENDRX"] -pub type ENDRX_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTEN_SPEC, ENDRX_A, O>; -impl<'a, const O: u8> ENDRX_W<'a, O> { - #[doc = "Disable"] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(ENDRX_A::DISABLED) - } - #[doc = "Enable"] - #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(ENDRX_A::ENABLED) - } -} -#[doc = "Field `ENDTX` reader - Enable or disable interrupt for event ENDTX"] -pub type ENDTX_R = crate::BitReader; -#[doc = "Enable or disable interrupt for event ENDTX\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum ENDTX_A { - #[doc = "0: Disable"] - DISABLED = 0, - #[doc = "1: Enable"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: ENDTX_A) -> Self { - variant as u8 != 0 - } -} -impl ENDTX_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> ENDTX_A { - match self.bits { - false => ENDTX_A::DISABLED, - true => ENDTX_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == ENDTX_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == ENDTX_A::ENABLED - } -} -#[doc = "Field `ENDTX` writer - Enable or disable interrupt for event ENDTX"] -pub type ENDTX_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTEN_SPEC, ENDTX_A, O>; -impl<'a, const O: u8> ENDTX_W<'a, O> { - #[doc = "Disable"] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(ENDTX_A::DISABLED) - } - #[doc = "Enable"] - #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(ENDTX_A::ENABLED) - } -} -#[doc = "Field `AUTOCOLRESSTARTED` reader - Enable or disable interrupt for event AUTOCOLRESSTARTED"] -pub type AUTOCOLRESSTARTED_R = crate::BitReader; -#[doc = "Enable or disable interrupt for event AUTOCOLRESSTARTED\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum AUTOCOLRESSTARTED_A { - #[doc = "0: Disable"] - DISABLED = 0, - #[doc = "1: Enable"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: AUTOCOLRESSTARTED_A) -> Self { - variant as u8 != 0 - } -} -impl AUTOCOLRESSTARTED_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> AUTOCOLRESSTARTED_A { - match self.bits { - false => AUTOCOLRESSTARTED_A::DISABLED, - true => AUTOCOLRESSTARTED_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == AUTOCOLRESSTARTED_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == AUTOCOLRESSTARTED_A::ENABLED - } -} -#[doc = "Field `AUTOCOLRESSTARTED` writer - Enable or disable interrupt for event AUTOCOLRESSTARTED"] -pub type AUTOCOLRESSTARTED_W<'a, const O: u8> = - crate::BitWriter<'a, u32, INTEN_SPEC, AUTOCOLRESSTARTED_A, O>; -impl<'a, const O: u8> AUTOCOLRESSTARTED_W<'a, O> { - #[doc = "Disable"] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(AUTOCOLRESSTARTED_A::DISABLED) - } - #[doc = "Enable"] - #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(AUTOCOLRESSTARTED_A::ENABLED) - } -} -#[doc = "Field `COLLISION` reader - Enable or disable interrupt for event COLLISION"] -pub type COLLISION_R = crate::BitReader; -#[doc = "Enable or disable interrupt for event COLLISION\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum COLLISION_A { - #[doc = "0: Disable"] - DISABLED = 0, - #[doc = "1: Enable"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: COLLISION_A) -> Self { - variant as u8 != 0 - } -} -impl COLLISION_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> COLLISION_A { - match self.bits { - false => COLLISION_A::DISABLED, - true => COLLISION_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == COLLISION_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == COLLISION_A::ENABLED - } -} -#[doc = "Field `COLLISION` writer - Enable or disable interrupt for event COLLISION"] -pub type COLLISION_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTEN_SPEC, COLLISION_A, O>; -impl<'a, const O: u8> COLLISION_W<'a, O> { - #[doc = "Disable"] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(COLLISION_A::DISABLED) - } - #[doc = "Enable"] - #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(COLLISION_A::ENABLED) - } -} -#[doc = "Field `SELECTED` reader - Enable or disable interrupt for event SELECTED"] -pub type SELECTED_R = crate::BitReader; -#[doc = "Enable or disable interrupt for event SELECTED\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum SELECTED_A { - #[doc = "0: Disable"] - DISABLED = 0, - #[doc = "1: Enable"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: SELECTED_A) -> Self { - variant as u8 != 0 - } -} -impl SELECTED_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> SELECTED_A { - match self.bits { - false => SELECTED_A::DISABLED, - true => SELECTED_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == SELECTED_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == SELECTED_A::ENABLED - } -} -#[doc = "Field `SELECTED` writer - Enable or disable interrupt for event SELECTED"] -pub type SELECTED_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTEN_SPEC, SELECTED_A, O>; -impl<'a, const O: u8> SELECTED_W<'a, O> { - #[doc = "Disable"] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(SELECTED_A::DISABLED) - } - #[doc = "Enable"] - #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(SELECTED_A::ENABLED) - } -} -#[doc = "Field `STARTED` reader - Enable or disable interrupt for event STARTED"] -pub type STARTED_R = crate::BitReader; -#[doc = "Enable or disable interrupt for event STARTED\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum STARTED_A { - #[doc = "0: Disable"] - DISABLED = 0, - #[doc = "1: Enable"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: STARTED_A) -> Self { - variant as u8 != 0 - } -} -impl STARTED_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> STARTED_A { - match self.bits { - false => STARTED_A::DISABLED, - true => STARTED_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == STARTED_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == STARTED_A::ENABLED - } -} -#[doc = "Field `STARTED` writer - Enable or disable interrupt for event STARTED"] -pub type STARTED_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTEN_SPEC, STARTED_A, O>; -impl<'a, const O: u8> STARTED_W<'a, O> { - #[doc = "Disable"] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(STARTED_A::DISABLED) - } - #[doc = "Enable"] - #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(STARTED_A::ENABLED) - } -} -impl R { - #[doc = "Bit 0 - Enable or disable interrupt for event READY"] - #[inline(always)] - pub fn ready(&self) -> READY_R { - READY_R::new((self.bits & 1) != 0) - } - #[doc = "Bit 1 - Enable or disable interrupt for event FIELDDETECTED"] - #[inline(always)] - pub fn fielddetected(&self) -> FIELDDETECTED_R { - FIELDDETECTED_R::new(((self.bits >> 1) & 1) != 0) - } - #[doc = "Bit 2 - Enable or disable interrupt for event FIELDLOST"] - #[inline(always)] - pub fn fieldlost(&self) -> FIELDLOST_R { - FIELDLOST_R::new(((self.bits >> 2) & 1) != 0) - } - #[doc = "Bit 3 - Enable or disable interrupt for event TXFRAMESTART"] - #[inline(always)] - pub fn txframestart(&self) -> TXFRAMESTART_R { - TXFRAMESTART_R::new(((self.bits >> 3) & 1) != 0) - } - #[doc = "Bit 4 - Enable or disable interrupt for event TXFRAMEEND"] - #[inline(always)] - pub fn txframeend(&self) -> TXFRAMEEND_R { - TXFRAMEEND_R::new(((self.bits >> 4) & 1) != 0) - } - #[doc = "Bit 5 - Enable or disable interrupt for event RXFRAMESTART"] - #[inline(always)] - pub fn rxframestart(&self) -> RXFRAMESTART_R { - RXFRAMESTART_R::new(((self.bits >> 5) & 1) != 0) - } - #[doc = "Bit 6 - Enable or disable interrupt for event RXFRAMEEND"] - #[inline(always)] - pub fn rxframeend(&self) -> RXFRAMEEND_R { - RXFRAMEEND_R::new(((self.bits >> 6) & 1) != 0) - } - #[doc = "Bit 7 - Enable or disable interrupt for event ERROR"] - #[inline(always)] - pub fn error(&self) -> ERROR_R { - ERROR_R::new(((self.bits >> 7) & 1) != 0) - } - #[doc = "Bit 10 - Enable or disable interrupt for event RXERROR"] - #[inline(always)] - pub fn rxerror(&self) -> RXERROR_R { - RXERROR_R::new(((self.bits >> 10) & 1) != 0) - } - #[doc = "Bit 11 - Enable or disable interrupt for event ENDRX"] - #[inline(always)] - pub fn endrx(&self) -> ENDRX_R { - ENDRX_R::new(((self.bits >> 11) & 1) != 0) - } - #[doc = "Bit 12 - Enable or disable interrupt for event ENDTX"] - #[inline(always)] - pub fn endtx(&self) -> ENDTX_R { - ENDTX_R::new(((self.bits >> 12) & 1) != 0) - } - #[doc = "Bit 14 - Enable or disable interrupt for event AUTOCOLRESSTARTED"] - #[inline(always)] - pub fn autocolresstarted(&self) -> AUTOCOLRESSTARTED_R { - AUTOCOLRESSTARTED_R::new(((self.bits >> 14) & 1) != 0) - } - #[doc = "Bit 18 - Enable or disable interrupt for event COLLISION"] - #[inline(always)] - pub fn collision(&self) -> COLLISION_R { - COLLISION_R::new(((self.bits >> 18) & 1) != 0) - } - #[doc = "Bit 19 - Enable or disable interrupt for event SELECTED"] - #[inline(always)] - pub fn selected(&self) -> SELECTED_R { - SELECTED_R::new(((self.bits >> 19) & 1) != 0) - } - #[doc = "Bit 20 - Enable or disable interrupt for event STARTED"] - #[inline(always)] - pub fn started(&self) -> STARTED_R { - STARTED_R::new(((self.bits >> 20) & 1) != 0) - } -} -impl W { - #[doc = "Bit 0 - Enable or disable interrupt for event READY"] - #[inline(always)] - #[must_use] - pub fn ready(&mut self) -> READY_W<0> { - READY_W::new(self) - } - #[doc = "Bit 1 - Enable or disable interrupt for event FIELDDETECTED"] - #[inline(always)] - #[must_use] - pub fn fielddetected(&mut self) -> FIELDDETECTED_W<1> { - FIELDDETECTED_W::new(self) - } - #[doc = "Bit 2 - Enable or disable interrupt for event FIELDLOST"] - #[inline(always)] - #[must_use] - pub fn fieldlost(&mut self) -> FIELDLOST_W<2> { - FIELDLOST_W::new(self) - } - #[doc = "Bit 3 - Enable or disable interrupt for event TXFRAMESTART"] - #[inline(always)] - #[must_use] - pub fn txframestart(&mut self) -> TXFRAMESTART_W<3> { - TXFRAMESTART_W::new(self) - } - #[doc = "Bit 4 - Enable or disable interrupt for event TXFRAMEEND"] - #[inline(always)] - #[must_use] - pub fn txframeend(&mut self) -> TXFRAMEEND_W<4> { - TXFRAMEEND_W::new(self) - } - #[doc = "Bit 5 - Enable or disable interrupt for event RXFRAMESTART"] - #[inline(always)] - #[must_use] - pub fn rxframestart(&mut self) -> RXFRAMESTART_W<5> { - RXFRAMESTART_W::new(self) - } - #[doc = "Bit 6 - Enable or disable interrupt for event RXFRAMEEND"] - #[inline(always)] - #[must_use] - pub fn rxframeend(&mut self) -> RXFRAMEEND_W<6> { - RXFRAMEEND_W::new(self) - } - #[doc = "Bit 7 - Enable or disable interrupt for event ERROR"] - #[inline(always)] - #[must_use] - pub fn error(&mut self) -> ERROR_W<7> { - ERROR_W::new(self) - } - #[doc = "Bit 10 - Enable or disable interrupt for event RXERROR"] - #[inline(always)] - #[must_use] - pub fn rxerror(&mut self) -> RXERROR_W<10> { - RXERROR_W::new(self) - } - #[doc = "Bit 11 - Enable or disable interrupt for event ENDRX"] - #[inline(always)] - #[must_use] - pub fn endrx(&mut self) -> ENDRX_W<11> { - ENDRX_W::new(self) - } - #[doc = "Bit 12 - Enable or disable interrupt for event ENDTX"] - #[inline(always)] - #[must_use] - pub fn endtx(&mut self) -> ENDTX_W<12> { - ENDTX_W::new(self) - } - #[doc = "Bit 14 - Enable or disable interrupt for event AUTOCOLRESSTARTED"] - #[inline(always)] - #[must_use] - pub fn autocolresstarted(&mut self) -> AUTOCOLRESSTARTED_W<14> { - AUTOCOLRESSTARTED_W::new(self) - } - #[doc = "Bit 18 - Enable or disable interrupt for event COLLISION"] - #[inline(always)] - #[must_use] - pub fn collision(&mut self) -> COLLISION_W<18> { - COLLISION_W::new(self) - } - #[doc = "Bit 19 - Enable or disable interrupt for event SELECTED"] - #[inline(always)] - #[must_use] - pub fn selected(&mut self) -> SELECTED_W<19> { - SELECTED_W::new(self) - } - #[doc = "Bit 20 - Enable or disable interrupt for event STARTED"] - #[inline(always)] - #[must_use] - pub fn started(&mut self) -> STARTED_W<20> { - STARTED_W::new(self) - } - #[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 = "Enable or disable interrupt\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 [inten](index.html) module"] -pub struct INTEN_SPEC; -impl crate::RegisterSpec for INTEN_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [inten::R](R) reader structure"] -impl crate::Readable for INTEN_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [inten::W](W) writer structure"] -impl crate::Writable for INTEN_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets INTEN to value 0"] -impl crate::Resettable for INTEN_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/nfct/intenclr.rs b/down-the-stack/dk_pac/src/nfct/intenclr.rs deleted file mode 100644 index 358a7ca..0000000 --- a/down-the-stack/dk_pac/src/nfct/intenclr.rs +++ /dev/null @@ -1,1089 +0,0 @@ -#[doc = "Register `INTENCLR` 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 `INTENCLR` 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 `READY` reader - Write '1' to disable interrupt for event READY"] -pub type READY_R = crate::BitReader; -#[doc = "Write '1' to disable interrupt for event READY\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum READY_A { - #[doc = "0: Read: Disabled"] - DISABLED = 0, - #[doc = "1: Read: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: READY_A) -> Self { - variant as u8 != 0 - } -} -impl READY_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> READY_A { - match self.bits { - false => READY_A::DISABLED, - true => READY_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == READY_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == READY_A::ENABLED - } -} -#[doc = "Write '1' to disable interrupt for event READY\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum READY_AW { - #[doc = "1: Disable"] - CLEAR = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: READY_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `READY` writer - Write '1' to disable interrupt for event READY"] -pub type READY_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENCLR_SPEC, READY_AW, O>; -impl<'a, const O: u8> READY_W<'a, O> { - #[doc = "Disable"] - #[inline(always)] - pub fn clear(self) -> &'a mut W { - self.variant(READY_AW::CLEAR) - } -} -#[doc = "Field `FIELDDETECTED` reader - Write '1' to disable interrupt for event FIELDDETECTED"] -pub type FIELDDETECTED_R = crate::BitReader; -#[doc = "Write '1' to disable interrupt for event FIELDDETECTED\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum FIELDDETECTED_A { - #[doc = "0: Read: Disabled"] - DISABLED = 0, - #[doc = "1: Read: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: FIELDDETECTED_A) -> Self { - variant as u8 != 0 - } -} -impl FIELDDETECTED_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> FIELDDETECTED_A { - match self.bits { - false => FIELDDETECTED_A::DISABLED, - true => FIELDDETECTED_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == FIELDDETECTED_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == FIELDDETECTED_A::ENABLED - } -} -#[doc = "Write '1' to disable interrupt for event FIELDDETECTED\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum FIELDDETECTED_AW { - #[doc = "1: Disable"] - CLEAR = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: FIELDDETECTED_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `FIELDDETECTED` writer - Write '1' to disable interrupt for event FIELDDETECTED"] -pub type FIELDDETECTED_W<'a, const O: u8> = - crate::BitWriter<'a, u32, INTENCLR_SPEC, FIELDDETECTED_AW, O>; -impl<'a, const O: u8> FIELDDETECTED_W<'a, O> { - #[doc = "Disable"] - #[inline(always)] - pub fn clear(self) -> &'a mut W { - self.variant(FIELDDETECTED_AW::CLEAR) - } -} -#[doc = "Field `FIELDLOST` reader - Write '1' to disable interrupt for event FIELDLOST"] -pub type FIELDLOST_R = crate::BitReader; -#[doc = "Write '1' to disable interrupt for event FIELDLOST\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum FIELDLOST_A { - #[doc = "0: Read: Disabled"] - DISABLED = 0, - #[doc = "1: Read: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: FIELDLOST_A) -> Self { - variant as u8 != 0 - } -} -impl FIELDLOST_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> FIELDLOST_A { - match self.bits { - false => FIELDLOST_A::DISABLED, - true => FIELDLOST_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == FIELDLOST_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == FIELDLOST_A::ENABLED - } -} -#[doc = "Write '1' to disable interrupt for event FIELDLOST\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum FIELDLOST_AW { - #[doc = "1: Disable"] - CLEAR = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: FIELDLOST_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `FIELDLOST` writer - Write '1' to disable interrupt for event FIELDLOST"] -pub type FIELDLOST_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENCLR_SPEC, FIELDLOST_AW, O>; -impl<'a, const O: u8> FIELDLOST_W<'a, O> { - #[doc = "Disable"] - #[inline(always)] - pub fn clear(self) -> &'a mut W { - self.variant(FIELDLOST_AW::CLEAR) - } -} -#[doc = "Field `TXFRAMESTART` reader - Write '1' to disable interrupt for event TXFRAMESTART"] -pub type TXFRAMESTART_R = crate::BitReader; -#[doc = "Write '1' to disable interrupt for event TXFRAMESTART\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum TXFRAMESTART_A { - #[doc = "0: Read: Disabled"] - DISABLED = 0, - #[doc = "1: Read: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: TXFRAMESTART_A) -> Self { - variant as u8 != 0 - } -} -impl TXFRAMESTART_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> TXFRAMESTART_A { - match self.bits { - false => TXFRAMESTART_A::DISABLED, - true => TXFRAMESTART_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == TXFRAMESTART_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == TXFRAMESTART_A::ENABLED - } -} -#[doc = "Write '1' to disable interrupt for event TXFRAMESTART\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum TXFRAMESTART_AW { - #[doc = "1: Disable"] - CLEAR = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: TXFRAMESTART_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `TXFRAMESTART` writer - Write '1' to disable interrupt for event TXFRAMESTART"] -pub type TXFRAMESTART_W<'a, const O: u8> = - crate::BitWriter<'a, u32, INTENCLR_SPEC, TXFRAMESTART_AW, O>; -impl<'a, const O: u8> TXFRAMESTART_W<'a, O> { - #[doc = "Disable"] - #[inline(always)] - pub fn clear(self) -> &'a mut W { - self.variant(TXFRAMESTART_AW::CLEAR) - } -} -#[doc = "Field `TXFRAMEEND` reader - Write '1' to disable interrupt for event TXFRAMEEND"] -pub type TXFRAMEEND_R = crate::BitReader; -#[doc = "Write '1' to disable interrupt for event TXFRAMEEND\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum TXFRAMEEND_A { - #[doc = "0: Read: Disabled"] - DISABLED = 0, - #[doc = "1: Read: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: TXFRAMEEND_A) -> Self { - variant as u8 != 0 - } -} -impl TXFRAMEEND_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> TXFRAMEEND_A { - match self.bits { - false => TXFRAMEEND_A::DISABLED, - true => TXFRAMEEND_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == TXFRAMEEND_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == TXFRAMEEND_A::ENABLED - } -} -#[doc = "Write '1' to disable interrupt for event TXFRAMEEND\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum TXFRAMEEND_AW { - #[doc = "1: Disable"] - CLEAR = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: TXFRAMEEND_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `TXFRAMEEND` writer - Write '1' to disable interrupt for event TXFRAMEEND"] -pub type TXFRAMEEND_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENCLR_SPEC, TXFRAMEEND_AW, O>; -impl<'a, const O: u8> TXFRAMEEND_W<'a, O> { - #[doc = "Disable"] - #[inline(always)] - pub fn clear(self) -> &'a mut W { - self.variant(TXFRAMEEND_AW::CLEAR) - } -} -#[doc = "Field `RXFRAMESTART` reader - Write '1' to disable interrupt for event RXFRAMESTART"] -pub type RXFRAMESTART_R = crate::BitReader; -#[doc = "Write '1' to disable interrupt for event RXFRAMESTART\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum RXFRAMESTART_A { - #[doc = "0: Read: Disabled"] - DISABLED = 0, - #[doc = "1: Read: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: RXFRAMESTART_A) -> Self { - variant as u8 != 0 - } -} -impl RXFRAMESTART_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> RXFRAMESTART_A { - match self.bits { - false => RXFRAMESTART_A::DISABLED, - true => RXFRAMESTART_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == RXFRAMESTART_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == RXFRAMESTART_A::ENABLED - } -} -#[doc = "Write '1' to disable interrupt for event RXFRAMESTART\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum RXFRAMESTART_AW { - #[doc = "1: Disable"] - CLEAR = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: RXFRAMESTART_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `RXFRAMESTART` writer - Write '1' to disable interrupt for event RXFRAMESTART"] -pub type RXFRAMESTART_W<'a, const O: u8> = - crate::BitWriter<'a, u32, INTENCLR_SPEC, RXFRAMESTART_AW, O>; -impl<'a, const O: u8> RXFRAMESTART_W<'a, O> { - #[doc = "Disable"] - #[inline(always)] - pub fn clear(self) -> &'a mut W { - self.variant(RXFRAMESTART_AW::CLEAR) - } -} -#[doc = "Field `RXFRAMEEND` reader - Write '1' to disable interrupt for event RXFRAMEEND"] -pub type RXFRAMEEND_R = crate::BitReader; -#[doc = "Write '1' to disable interrupt for event RXFRAMEEND\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum RXFRAMEEND_A { - #[doc = "0: Read: Disabled"] - DISABLED = 0, - #[doc = "1: Read: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: RXFRAMEEND_A) -> Self { - variant as u8 != 0 - } -} -impl RXFRAMEEND_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> RXFRAMEEND_A { - match self.bits { - false => RXFRAMEEND_A::DISABLED, - true => RXFRAMEEND_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == RXFRAMEEND_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == RXFRAMEEND_A::ENABLED - } -} -#[doc = "Write '1' to disable interrupt for event RXFRAMEEND\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum RXFRAMEEND_AW { - #[doc = "1: Disable"] - CLEAR = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: RXFRAMEEND_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `RXFRAMEEND` writer - Write '1' to disable interrupt for event RXFRAMEEND"] -pub type RXFRAMEEND_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENCLR_SPEC, RXFRAMEEND_AW, O>; -impl<'a, const O: u8> RXFRAMEEND_W<'a, O> { - #[doc = "Disable"] - #[inline(always)] - pub fn clear(self) -> &'a mut W { - self.variant(RXFRAMEEND_AW::CLEAR) - } -} -#[doc = "Field `ERROR` reader - Write '1' to disable interrupt for event ERROR"] -pub type ERROR_R = crate::BitReader; -#[doc = "Write '1' to disable interrupt for event ERROR\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum ERROR_A { - #[doc = "0: Read: Disabled"] - DISABLED = 0, - #[doc = "1: Read: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: ERROR_A) -> Self { - variant as u8 != 0 - } -} -impl ERROR_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> ERROR_A { - match self.bits { - false => ERROR_A::DISABLED, - true => ERROR_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == ERROR_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == ERROR_A::ENABLED - } -} -#[doc = "Write '1' to disable interrupt for event ERROR\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum ERROR_AW { - #[doc = "1: Disable"] - CLEAR = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: ERROR_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `ERROR` writer - Write '1' to disable interrupt for event ERROR"] -pub type ERROR_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENCLR_SPEC, ERROR_AW, O>; -impl<'a, const O: u8> ERROR_W<'a, O> { - #[doc = "Disable"] - #[inline(always)] - pub fn clear(self) -> &'a mut W { - self.variant(ERROR_AW::CLEAR) - } -} -#[doc = "Field `RXERROR` reader - Write '1' to disable interrupt for event RXERROR"] -pub type RXERROR_R = crate::BitReader; -#[doc = "Write '1' to disable interrupt for event RXERROR\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum RXERROR_A { - #[doc = "0: Read: Disabled"] - DISABLED = 0, - #[doc = "1: Read: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: RXERROR_A) -> Self { - variant as u8 != 0 - } -} -impl RXERROR_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> RXERROR_A { - match self.bits { - false => RXERROR_A::DISABLED, - true => RXERROR_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == RXERROR_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == RXERROR_A::ENABLED - } -} -#[doc = "Write '1' to disable interrupt for event RXERROR\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum RXERROR_AW { - #[doc = "1: Disable"] - CLEAR = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: RXERROR_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `RXERROR` writer - Write '1' to disable interrupt for event RXERROR"] -pub type RXERROR_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENCLR_SPEC, RXERROR_AW, O>; -impl<'a, const O: u8> RXERROR_W<'a, O> { - #[doc = "Disable"] - #[inline(always)] - pub fn clear(self) -> &'a mut W { - self.variant(RXERROR_AW::CLEAR) - } -} -#[doc = "Field `ENDRX` reader - Write '1' to disable interrupt for event ENDRX"] -pub type ENDRX_R = crate::BitReader; -#[doc = "Write '1' to disable interrupt for event ENDRX\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum ENDRX_A { - #[doc = "0: Read: Disabled"] - DISABLED = 0, - #[doc = "1: Read: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: ENDRX_A) -> Self { - variant as u8 != 0 - } -} -impl ENDRX_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> ENDRX_A { - match self.bits { - false => ENDRX_A::DISABLED, - true => ENDRX_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == ENDRX_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == ENDRX_A::ENABLED - } -} -#[doc = "Write '1' to disable interrupt for event ENDRX\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum ENDRX_AW { - #[doc = "1: Disable"] - CLEAR = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: ENDRX_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `ENDRX` writer - Write '1' to disable interrupt for event ENDRX"] -pub type ENDRX_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENCLR_SPEC, ENDRX_AW, O>; -impl<'a, const O: u8> ENDRX_W<'a, O> { - #[doc = "Disable"] - #[inline(always)] - pub fn clear(self) -> &'a mut W { - self.variant(ENDRX_AW::CLEAR) - } -} -#[doc = "Field `ENDTX` reader - Write '1' to disable interrupt for event ENDTX"] -pub type ENDTX_R = crate::BitReader; -#[doc = "Write '1' to disable interrupt for event ENDTX\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum ENDTX_A { - #[doc = "0: Read: Disabled"] - DISABLED = 0, - #[doc = "1: Read: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: ENDTX_A) -> Self { - variant as u8 != 0 - } -} -impl ENDTX_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> ENDTX_A { - match self.bits { - false => ENDTX_A::DISABLED, - true => ENDTX_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == ENDTX_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == ENDTX_A::ENABLED - } -} -#[doc = "Write '1' to disable interrupt for event ENDTX\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum ENDTX_AW { - #[doc = "1: Disable"] - CLEAR = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: ENDTX_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `ENDTX` writer - Write '1' to disable interrupt for event ENDTX"] -pub type ENDTX_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENCLR_SPEC, ENDTX_AW, O>; -impl<'a, const O: u8> ENDTX_W<'a, O> { - #[doc = "Disable"] - #[inline(always)] - pub fn clear(self) -> &'a mut W { - self.variant(ENDTX_AW::CLEAR) - } -} -#[doc = "Field `AUTOCOLRESSTARTED` reader - Write '1' to disable interrupt for event AUTOCOLRESSTARTED"] -pub type AUTOCOLRESSTARTED_R = crate::BitReader; -#[doc = "Write '1' to disable interrupt for event AUTOCOLRESSTARTED\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum AUTOCOLRESSTARTED_A { - #[doc = "0: Read: Disabled"] - DISABLED = 0, - #[doc = "1: Read: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: AUTOCOLRESSTARTED_A) -> Self { - variant as u8 != 0 - } -} -impl AUTOCOLRESSTARTED_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> AUTOCOLRESSTARTED_A { - match self.bits { - false => AUTOCOLRESSTARTED_A::DISABLED, - true => AUTOCOLRESSTARTED_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == AUTOCOLRESSTARTED_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == AUTOCOLRESSTARTED_A::ENABLED - } -} -#[doc = "Write '1' to disable interrupt for event AUTOCOLRESSTARTED\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum AUTOCOLRESSTARTED_AW { - #[doc = "1: Disable"] - CLEAR = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: AUTOCOLRESSTARTED_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `AUTOCOLRESSTARTED` writer - Write '1' to disable interrupt for event AUTOCOLRESSTARTED"] -pub type AUTOCOLRESSTARTED_W<'a, const O: u8> = - crate::BitWriter<'a, u32, INTENCLR_SPEC, AUTOCOLRESSTARTED_AW, O>; -impl<'a, const O: u8> AUTOCOLRESSTARTED_W<'a, O> { - #[doc = "Disable"] - #[inline(always)] - pub fn clear(self) -> &'a mut W { - self.variant(AUTOCOLRESSTARTED_AW::CLEAR) - } -} -#[doc = "Field `COLLISION` reader - Write '1' to disable interrupt for event COLLISION"] -pub type COLLISION_R = crate::BitReader; -#[doc = "Write '1' to disable interrupt for event COLLISION\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum COLLISION_A { - #[doc = "0: Read: Disabled"] - DISABLED = 0, - #[doc = "1: Read: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: COLLISION_A) -> Self { - variant as u8 != 0 - } -} -impl COLLISION_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> COLLISION_A { - match self.bits { - false => COLLISION_A::DISABLED, - true => COLLISION_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == COLLISION_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == COLLISION_A::ENABLED - } -} -#[doc = "Write '1' to disable interrupt for event COLLISION\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum COLLISION_AW { - #[doc = "1: Disable"] - CLEAR = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: COLLISION_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `COLLISION` writer - Write '1' to disable interrupt for event COLLISION"] -pub type COLLISION_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENCLR_SPEC, COLLISION_AW, O>; -impl<'a, const O: u8> COLLISION_W<'a, O> { - #[doc = "Disable"] - #[inline(always)] - pub fn clear(self) -> &'a mut W { - self.variant(COLLISION_AW::CLEAR) - } -} -#[doc = "Field `SELECTED` reader - Write '1' to disable interrupt for event SELECTED"] -pub type SELECTED_R = crate::BitReader; -#[doc = "Write '1' to disable interrupt for event SELECTED\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum SELECTED_A { - #[doc = "0: Read: Disabled"] - DISABLED = 0, - #[doc = "1: Read: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: SELECTED_A) -> Self { - variant as u8 != 0 - } -} -impl SELECTED_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> SELECTED_A { - match self.bits { - false => SELECTED_A::DISABLED, - true => SELECTED_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == SELECTED_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == SELECTED_A::ENABLED - } -} -#[doc = "Write '1' to disable interrupt for event SELECTED\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum SELECTED_AW { - #[doc = "1: Disable"] - CLEAR = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: SELECTED_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `SELECTED` writer - Write '1' to disable interrupt for event SELECTED"] -pub type SELECTED_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENCLR_SPEC, SELECTED_AW, O>; -impl<'a, const O: u8> SELECTED_W<'a, O> { - #[doc = "Disable"] - #[inline(always)] - pub fn clear(self) -> &'a mut W { - self.variant(SELECTED_AW::CLEAR) - } -} -#[doc = "Field `STARTED` reader - Write '1' to disable interrupt for event STARTED"] -pub type STARTED_R = crate::BitReader; -#[doc = "Write '1' to disable interrupt for event STARTED\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum STARTED_A { - #[doc = "0: Read: Disabled"] - DISABLED = 0, - #[doc = "1: Read: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: STARTED_A) -> Self { - variant as u8 != 0 - } -} -impl STARTED_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> STARTED_A { - match self.bits { - false => STARTED_A::DISABLED, - true => STARTED_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == STARTED_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == STARTED_A::ENABLED - } -} -#[doc = "Write '1' to disable interrupt for event STARTED\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum STARTED_AW { - #[doc = "1: Disable"] - CLEAR = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: STARTED_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `STARTED` writer - Write '1' to disable interrupt for event STARTED"] -pub type STARTED_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENCLR_SPEC, STARTED_AW, O>; -impl<'a, const O: u8> STARTED_W<'a, O> { - #[doc = "Disable"] - #[inline(always)] - pub fn clear(self) -> &'a mut W { - self.variant(STARTED_AW::CLEAR) - } -} -impl R { - #[doc = "Bit 0 - Write '1' to disable interrupt for event READY"] - #[inline(always)] - pub fn ready(&self) -> READY_R { - READY_R::new((self.bits & 1) != 0) - } - #[doc = "Bit 1 - Write '1' to disable interrupt for event FIELDDETECTED"] - #[inline(always)] - pub fn fielddetected(&self) -> FIELDDETECTED_R { - FIELDDETECTED_R::new(((self.bits >> 1) & 1) != 0) - } - #[doc = "Bit 2 - Write '1' to disable interrupt for event FIELDLOST"] - #[inline(always)] - pub fn fieldlost(&self) -> FIELDLOST_R { - FIELDLOST_R::new(((self.bits >> 2) & 1) != 0) - } - #[doc = "Bit 3 - Write '1' to disable interrupt for event TXFRAMESTART"] - #[inline(always)] - pub fn txframestart(&self) -> TXFRAMESTART_R { - TXFRAMESTART_R::new(((self.bits >> 3) & 1) != 0) - } - #[doc = "Bit 4 - Write '1' to disable interrupt for event TXFRAMEEND"] - #[inline(always)] - pub fn txframeend(&self) -> TXFRAMEEND_R { - TXFRAMEEND_R::new(((self.bits >> 4) & 1) != 0) - } - #[doc = "Bit 5 - Write '1' to disable interrupt for event RXFRAMESTART"] - #[inline(always)] - pub fn rxframestart(&self) -> RXFRAMESTART_R { - RXFRAMESTART_R::new(((self.bits >> 5) & 1) != 0) - } - #[doc = "Bit 6 - Write '1' to disable interrupt for event RXFRAMEEND"] - #[inline(always)] - pub fn rxframeend(&self) -> RXFRAMEEND_R { - RXFRAMEEND_R::new(((self.bits >> 6) & 1) != 0) - } - #[doc = "Bit 7 - Write '1' to disable interrupt for event ERROR"] - #[inline(always)] - pub fn error(&self) -> ERROR_R { - ERROR_R::new(((self.bits >> 7) & 1) != 0) - } - #[doc = "Bit 10 - Write '1' to disable interrupt for event RXERROR"] - #[inline(always)] - pub fn rxerror(&self) -> RXERROR_R { - RXERROR_R::new(((self.bits >> 10) & 1) != 0) - } - #[doc = "Bit 11 - Write '1' to disable interrupt for event ENDRX"] - #[inline(always)] - pub fn endrx(&self) -> ENDRX_R { - ENDRX_R::new(((self.bits >> 11) & 1) != 0) - } - #[doc = "Bit 12 - Write '1' to disable interrupt for event ENDTX"] - #[inline(always)] - pub fn endtx(&self) -> ENDTX_R { - ENDTX_R::new(((self.bits >> 12) & 1) != 0) - } - #[doc = "Bit 14 - Write '1' to disable interrupt for event AUTOCOLRESSTARTED"] - #[inline(always)] - pub fn autocolresstarted(&self) -> AUTOCOLRESSTARTED_R { - AUTOCOLRESSTARTED_R::new(((self.bits >> 14) & 1) != 0) - } - #[doc = "Bit 18 - Write '1' to disable interrupt for event COLLISION"] - #[inline(always)] - pub fn collision(&self) -> COLLISION_R { - COLLISION_R::new(((self.bits >> 18) & 1) != 0) - } - #[doc = "Bit 19 - Write '1' to disable interrupt for event SELECTED"] - #[inline(always)] - pub fn selected(&self) -> SELECTED_R { - SELECTED_R::new(((self.bits >> 19) & 1) != 0) - } - #[doc = "Bit 20 - Write '1' to disable interrupt for event STARTED"] - #[inline(always)] - pub fn started(&self) -> STARTED_R { - STARTED_R::new(((self.bits >> 20) & 1) != 0) - } -} -impl W { - #[doc = "Bit 0 - Write '1' to disable interrupt for event READY"] - #[inline(always)] - #[must_use] - pub fn ready(&mut self) -> READY_W<0> { - READY_W::new(self) - } - #[doc = "Bit 1 - Write '1' to disable interrupt for event FIELDDETECTED"] - #[inline(always)] - #[must_use] - pub fn fielddetected(&mut self) -> FIELDDETECTED_W<1> { - FIELDDETECTED_W::new(self) - } - #[doc = "Bit 2 - Write '1' to disable interrupt for event FIELDLOST"] - #[inline(always)] - #[must_use] - pub fn fieldlost(&mut self) -> FIELDLOST_W<2> { - FIELDLOST_W::new(self) - } - #[doc = "Bit 3 - Write '1' to disable interrupt for event TXFRAMESTART"] - #[inline(always)] - #[must_use] - pub fn txframestart(&mut self) -> TXFRAMESTART_W<3> { - TXFRAMESTART_W::new(self) - } - #[doc = "Bit 4 - Write '1' to disable interrupt for event TXFRAMEEND"] - #[inline(always)] - #[must_use] - pub fn txframeend(&mut self) -> TXFRAMEEND_W<4> { - TXFRAMEEND_W::new(self) - } - #[doc = "Bit 5 - Write '1' to disable interrupt for event RXFRAMESTART"] - #[inline(always)] - #[must_use] - pub fn rxframestart(&mut self) -> RXFRAMESTART_W<5> { - RXFRAMESTART_W::new(self) - } - #[doc = "Bit 6 - Write '1' to disable interrupt for event RXFRAMEEND"] - #[inline(always)] - #[must_use] - pub fn rxframeend(&mut self) -> RXFRAMEEND_W<6> { - RXFRAMEEND_W::new(self) - } - #[doc = "Bit 7 - Write '1' to disable interrupt for event ERROR"] - #[inline(always)] - #[must_use] - pub fn error(&mut self) -> ERROR_W<7> { - ERROR_W::new(self) - } - #[doc = "Bit 10 - Write '1' to disable interrupt for event RXERROR"] - #[inline(always)] - #[must_use] - pub fn rxerror(&mut self) -> RXERROR_W<10> { - RXERROR_W::new(self) - } - #[doc = "Bit 11 - Write '1' to disable interrupt for event ENDRX"] - #[inline(always)] - #[must_use] - pub fn endrx(&mut self) -> ENDRX_W<11> { - ENDRX_W::new(self) - } - #[doc = "Bit 12 - Write '1' to disable interrupt for event ENDTX"] - #[inline(always)] - #[must_use] - pub fn endtx(&mut self) -> ENDTX_W<12> { - ENDTX_W::new(self) - } - #[doc = "Bit 14 - Write '1' to disable interrupt for event AUTOCOLRESSTARTED"] - #[inline(always)] - #[must_use] - pub fn autocolresstarted(&mut self) -> AUTOCOLRESSTARTED_W<14> { - AUTOCOLRESSTARTED_W::new(self) - } - #[doc = "Bit 18 - Write '1' to disable interrupt for event COLLISION"] - #[inline(always)] - #[must_use] - pub fn collision(&mut self) -> COLLISION_W<18> { - COLLISION_W::new(self) - } - #[doc = "Bit 19 - Write '1' to disable interrupt for event SELECTED"] - #[inline(always)] - #[must_use] - pub fn selected(&mut self) -> SELECTED_W<19> { - SELECTED_W::new(self) - } - #[doc = "Bit 20 - Write '1' to disable interrupt for event STARTED"] - #[inline(always)] - #[must_use] - pub fn started(&mut self) -> STARTED_W<20> { - STARTED_W::new(self) - } - #[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 = "Disable interrupt\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 [intenclr](index.html) module"] -pub struct INTENCLR_SPEC; -impl crate::RegisterSpec for INTENCLR_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [intenclr::R](R) reader structure"] -impl crate::Readable for INTENCLR_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [intenclr::W](W) writer structure"] -impl crate::Writable for INTENCLR_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets INTENCLR to value 0"] -impl crate::Resettable for INTENCLR_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/nfct/intenset.rs b/down-the-stack/dk_pac/src/nfct/intenset.rs deleted file mode 100644 index 1ae3019..0000000 --- a/down-the-stack/dk_pac/src/nfct/intenset.rs +++ /dev/null @@ -1,1089 +0,0 @@ -#[doc = "Register `INTENSET` 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 `INTENSET` 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 `READY` reader - Write '1' to enable interrupt for event READY"] -pub type READY_R = crate::BitReader; -#[doc = "Write '1' to enable interrupt for event READY\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum READY_A { - #[doc = "0: Read: Disabled"] - DISABLED = 0, - #[doc = "1: Read: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: READY_A) -> Self { - variant as u8 != 0 - } -} -impl READY_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> READY_A { - match self.bits { - false => READY_A::DISABLED, - true => READY_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == READY_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == READY_A::ENABLED - } -} -#[doc = "Write '1' to enable interrupt for event READY\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum READY_AW { - #[doc = "1: Enable"] - SET = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: READY_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `READY` writer - Write '1' to enable interrupt for event READY"] -pub type READY_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENSET_SPEC, READY_AW, O>; -impl<'a, const O: u8> READY_W<'a, O> { - #[doc = "Enable"] - #[inline(always)] - pub fn set(self) -> &'a mut W { - self.variant(READY_AW::SET) - } -} -#[doc = "Field `FIELDDETECTED` reader - Write '1' to enable interrupt for event FIELDDETECTED"] -pub type FIELDDETECTED_R = crate::BitReader; -#[doc = "Write '1' to enable interrupt for event FIELDDETECTED\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum FIELDDETECTED_A { - #[doc = "0: Read: Disabled"] - DISABLED = 0, - #[doc = "1: Read: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: FIELDDETECTED_A) -> Self { - variant as u8 != 0 - } -} -impl FIELDDETECTED_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> FIELDDETECTED_A { - match self.bits { - false => FIELDDETECTED_A::DISABLED, - true => FIELDDETECTED_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == FIELDDETECTED_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == FIELDDETECTED_A::ENABLED - } -} -#[doc = "Write '1' to enable interrupt for event FIELDDETECTED\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum FIELDDETECTED_AW { - #[doc = "1: Enable"] - SET = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: FIELDDETECTED_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `FIELDDETECTED` writer - Write '1' to enable interrupt for event FIELDDETECTED"] -pub type FIELDDETECTED_W<'a, const O: u8> = - crate::BitWriter<'a, u32, INTENSET_SPEC, FIELDDETECTED_AW, O>; -impl<'a, const O: u8> FIELDDETECTED_W<'a, O> { - #[doc = "Enable"] - #[inline(always)] - pub fn set(self) -> &'a mut W { - self.variant(FIELDDETECTED_AW::SET) - } -} -#[doc = "Field `FIELDLOST` reader - Write '1' to enable interrupt for event FIELDLOST"] -pub type FIELDLOST_R = crate::BitReader; -#[doc = "Write '1' to enable interrupt for event FIELDLOST\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum FIELDLOST_A { - #[doc = "0: Read: Disabled"] - DISABLED = 0, - #[doc = "1: Read: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: FIELDLOST_A) -> Self { - variant as u8 != 0 - } -} -impl FIELDLOST_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> FIELDLOST_A { - match self.bits { - false => FIELDLOST_A::DISABLED, - true => FIELDLOST_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == FIELDLOST_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == FIELDLOST_A::ENABLED - } -} -#[doc = "Write '1' to enable interrupt for event FIELDLOST\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum FIELDLOST_AW { - #[doc = "1: Enable"] - SET = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: FIELDLOST_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `FIELDLOST` writer - Write '1' to enable interrupt for event FIELDLOST"] -pub type FIELDLOST_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENSET_SPEC, FIELDLOST_AW, O>; -impl<'a, const O: u8> FIELDLOST_W<'a, O> { - #[doc = "Enable"] - #[inline(always)] - pub fn set(self) -> &'a mut W { - self.variant(FIELDLOST_AW::SET) - } -} -#[doc = "Field `TXFRAMESTART` reader - Write '1' to enable interrupt for event TXFRAMESTART"] -pub type TXFRAMESTART_R = crate::BitReader; -#[doc = "Write '1' to enable interrupt for event TXFRAMESTART\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum TXFRAMESTART_A { - #[doc = "0: Read: Disabled"] - DISABLED = 0, - #[doc = "1: Read: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: TXFRAMESTART_A) -> Self { - variant as u8 != 0 - } -} -impl TXFRAMESTART_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> TXFRAMESTART_A { - match self.bits { - false => TXFRAMESTART_A::DISABLED, - true => TXFRAMESTART_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == TXFRAMESTART_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == TXFRAMESTART_A::ENABLED - } -} -#[doc = "Write '1' to enable interrupt for event TXFRAMESTART\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum TXFRAMESTART_AW { - #[doc = "1: Enable"] - SET = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: TXFRAMESTART_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `TXFRAMESTART` writer - Write '1' to enable interrupt for event TXFRAMESTART"] -pub type TXFRAMESTART_W<'a, const O: u8> = - crate::BitWriter<'a, u32, INTENSET_SPEC, TXFRAMESTART_AW, O>; -impl<'a, const O: u8> TXFRAMESTART_W<'a, O> { - #[doc = "Enable"] - #[inline(always)] - pub fn set(self) -> &'a mut W { - self.variant(TXFRAMESTART_AW::SET) - } -} -#[doc = "Field `TXFRAMEEND` reader - Write '1' to enable interrupt for event TXFRAMEEND"] -pub type TXFRAMEEND_R = crate::BitReader; -#[doc = "Write '1' to enable interrupt for event TXFRAMEEND\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum TXFRAMEEND_A { - #[doc = "0: Read: Disabled"] - DISABLED = 0, - #[doc = "1: Read: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: TXFRAMEEND_A) -> Self { - variant as u8 != 0 - } -} -impl TXFRAMEEND_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> TXFRAMEEND_A { - match self.bits { - false => TXFRAMEEND_A::DISABLED, - true => TXFRAMEEND_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == TXFRAMEEND_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == TXFRAMEEND_A::ENABLED - } -} -#[doc = "Write '1' to enable interrupt for event TXFRAMEEND\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum TXFRAMEEND_AW { - #[doc = "1: Enable"] - SET = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: TXFRAMEEND_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `TXFRAMEEND` writer - Write '1' to enable interrupt for event TXFRAMEEND"] -pub type TXFRAMEEND_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENSET_SPEC, TXFRAMEEND_AW, O>; -impl<'a, const O: u8> TXFRAMEEND_W<'a, O> { - #[doc = "Enable"] - #[inline(always)] - pub fn set(self) -> &'a mut W { - self.variant(TXFRAMEEND_AW::SET) - } -} -#[doc = "Field `RXFRAMESTART` reader - Write '1' to enable interrupt for event RXFRAMESTART"] -pub type RXFRAMESTART_R = crate::BitReader; -#[doc = "Write '1' to enable interrupt for event RXFRAMESTART\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum RXFRAMESTART_A { - #[doc = "0: Read: Disabled"] - DISABLED = 0, - #[doc = "1: Read: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: RXFRAMESTART_A) -> Self { - variant as u8 != 0 - } -} -impl RXFRAMESTART_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> RXFRAMESTART_A { - match self.bits { - false => RXFRAMESTART_A::DISABLED, - true => RXFRAMESTART_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == RXFRAMESTART_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == RXFRAMESTART_A::ENABLED - } -} -#[doc = "Write '1' to enable interrupt for event RXFRAMESTART\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum RXFRAMESTART_AW { - #[doc = "1: Enable"] - SET = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: RXFRAMESTART_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `RXFRAMESTART` writer - Write '1' to enable interrupt for event RXFRAMESTART"] -pub type RXFRAMESTART_W<'a, const O: u8> = - crate::BitWriter<'a, u32, INTENSET_SPEC, RXFRAMESTART_AW, O>; -impl<'a, const O: u8> RXFRAMESTART_W<'a, O> { - #[doc = "Enable"] - #[inline(always)] - pub fn set(self) -> &'a mut W { - self.variant(RXFRAMESTART_AW::SET) - } -} -#[doc = "Field `RXFRAMEEND` reader - Write '1' to enable interrupt for event RXFRAMEEND"] -pub type RXFRAMEEND_R = crate::BitReader; -#[doc = "Write '1' to enable interrupt for event RXFRAMEEND\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum RXFRAMEEND_A { - #[doc = "0: Read: Disabled"] - DISABLED = 0, - #[doc = "1: Read: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: RXFRAMEEND_A) -> Self { - variant as u8 != 0 - } -} -impl RXFRAMEEND_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> RXFRAMEEND_A { - match self.bits { - false => RXFRAMEEND_A::DISABLED, - true => RXFRAMEEND_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == RXFRAMEEND_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == RXFRAMEEND_A::ENABLED - } -} -#[doc = "Write '1' to enable interrupt for event RXFRAMEEND\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum RXFRAMEEND_AW { - #[doc = "1: Enable"] - SET = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: RXFRAMEEND_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `RXFRAMEEND` writer - Write '1' to enable interrupt for event RXFRAMEEND"] -pub type RXFRAMEEND_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENSET_SPEC, RXFRAMEEND_AW, O>; -impl<'a, const O: u8> RXFRAMEEND_W<'a, O> { - #[doc = "Enable"] - #[inline(always)] - pub fn set(self) -> &'a mut W { - self.variant(RXFRAMEEND_AW::SET) - } -} -#[doc = "Field `ERROR` reader - Write '1' to enable interrupt for event ERROR"] -pub type ERROR_R = crate::BitReader; -#[doc = "Write '1' to enable interrupt for event ERROR\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum ERROR_A { - #[doc = "0: Read: Disabled"] - DISABLED = 0, - #[doc = "1: Read: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: ERROR_A) -> Self { - variant as u8 != 0 - } -} -impl ERROR_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> ERROR_A { - match self.bits { - false => ERROR_A::DISABLED, - true => ERROR_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == ERROR_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == ERROR_A::ENABLED - } -} -#[doc = "Write '1' to enable interrupt for event ERROR\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum ERROR_AW { - #[doc = "1: Enable"] - SET = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: ERROR_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `ERROR` writer - Write '1' to enable interrupt for event ERROR"] -pub type ERROR_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENSET_SPEC, ERROR_AW, O>; -impl<'a, const O: u8> ERROR_W<'a, O> { - #[doc = "Enable"] - #[inline(always)] - pub fn set(self) -> &'a mut W { - self.variant(ERROR_AW::SET) - } -} -#[doc = "Field `RXERROR` reader - Write '1' to enable interrupt for event RXERROR"] -pub type RXERROR_R = crate::BitReader; -#[doc = "Write '1' to enable interrupt for event RXERROR\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum RXERROR_A { - #[doc = "0: Read: Disabled"] - DISABLED = 0, - #[doc = "1: Read: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: RXERROR_A) -> Self { - variant as u8 != 0 - } -} -impl RXERROR_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> RXERROR_A { - match self.bits { - false => RXERROR_A::DISABLED, - true => RXERROR_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == RXERROR_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == RXERROR_A::ENABLED - } -} -#[doc = "Write '1' to enable interrupt for event RXERROR\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum RXERROR_AW { - #[doc = "1: Enable"] - SET = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: RXERROR_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `RXERROR` writer - Write '1' to enable interrupt for event RXERROR"] -pub type RXERROR_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENSET_SPEC, RXERROR_AW, O>; -impl<'a, const O: u8> RXERROR_W<'a, O> { - #[doc = "Enable"] - #[inline(always)] - pub fn set(self) -> &'a mut W { - self.variant(RXERROR_AW::SET) - } -} -#[doc = "Field `ENDRX` reader - Write '1' to enable interrupt for event ENDRX"] -pub type ENDRX_R = crate::BitReader; -#[doc = "Write '1' to enable interrupt for event ENDRX\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum ENDRX_A { - #[doc = "0: Read: Disabled"] - DISABLED = 0, - #[doc = "1: Read: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: ENDRX_A) -> Self { - variant as u8 != 0 - } -} -impl ENDRX_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> ENDRX_A { - match self.bits { - false => ENDRX_A::DISABLED, - true => ENDRX_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == ENDRX_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == ENDRX_A::ENABLED - } -} -#[doc = "Write '1' to enable interrupt for event ENDRX\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum ENDRX_AW { - #[doc = "1: Enable"] - SET = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: ENDRX_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `ENDRX` writer - Write '1' to enable interrupt for event ENDRX"] -pub type ENDRX_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENSET_SPEC, ENDRX_AW, O>; -impl<'a, const O: u8> ENDRX_W<'a, O> { - #[doc = "Enable"] - #[inline(always)] - pub fn set(self) -> &'a mut W { - self.variant(ENDRX_AW::SET) - } -} -#[doc = "Field `ENDTX` reader - Write '1' to enable interrupt for event ENDTX"] -pub type ENDTX_R = crate::BitReader; -#[doc = "Write '1' to enable interrupt for event ENDTX\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum ENDTX_A { - #[doc = "0: Read: Disabled"] - DISABLED = 0, - #[doc = "1: Read: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: ENDTX_A) -> Self { - variant as u8 != 0 - } -} -impl ENDTX_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> ENDTX_A { - match self.bits { - false => ENDTX_A::DISABLED, - true => ENDTX_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == ENDTX_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == ENDTX_A::ENABLED - } -} -#[doc = "Write '1' to enable interrupt for event ENDTX\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum ENDTX_AW { - #[doc = "1: Enable"] - SET = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: ENDTX_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `ENDTX` writer - Write '1' to enable interrupt for event ENDTX"] -pub type ENDTX_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENSET_SPEC, ENDTX_AW, O>; -impl<'a, const O: u8> ENDTX_W<'a, O> { - #[doc = "Enable"] - #[inline(always)] - pub fn set(self) -> &'a mut W { - self.variant(ENDTX_AW::SET) - } -} -#[doc = "Field `AUTOCOLRESSTARTED` reader - Write '1' to enable interrupt for event AUTOCOLRESSTARTED"] -pub type AUTOCOLRESSTARTED_R = crate::BitReader; -#[doc = "Write '1' to enable interrupt for event AUTOCOLRESSTARTED\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum AUTOCOLRESSTARTED_A { - #[doc = "0: Read: Disabled"] - DISABLED = 0, - #[doc = "1: Read: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: AUTOCOLRESSTARTED_A) -> Self { - variant as u8 != 0 - } -} -impl AUTOCOLRESSTARTED_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> AUTOCOLRESSTARTED_A { - match self.bits { - false => AUTOCOLRESSTARTED_A::DISABLED, - true => AUTOCOLRESSTARTED_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == AUTOCOLRESSTARTED_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == AUTOCOLRESSTARTED_A::ENABLED - } -} -#[doc = "Write '1' to enable interrupt for event AUTOCOLRESSTARTED\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum AUTOCOLRESSTARTED_AW { - #[doc = "1: Enable"] - SET = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: AUTOCOLRESSTARTED_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `AUTOCOLRESSTARTED` writer - Write '1' to enable interrupt for event AUTOCOLRESSTARTED"] -pub type AUTOCOLRESSTARTED_W<'a, const O: u8> = - crate::BitWriter<'a, u32, INTENSET_SPEC, AUTOCOLRESSTARTED_AW, O>; -impl<'a, const O: u8> AUTOCOLRESSTARTED_W<'a, O> { - #[doc = "Enable"] - #[inline(always)] - pub fn set(self) -> &'a mut W { - self.variant(AUTOCOLRESSTARTED_AW::SET) - } -} -#[doc = "Field `COLLISION` reader - Write '1' to enable interrupt for event COLLISION"] -pub type COLLISION_R = crate::BitReader; -#[doc = "Write '1' to enable interrupt for event COLLISION\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum COLLISION_A { - #[doc = "0: Read: Disabled"] - DISABLED = 0, - #[doc = "1: Read: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: COLLISION_A) -> Self { - variant as u8 != 0 - } -} -impl COLLISION_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> COLLISION_A { - match self.bits { - false => COLLISION_A::DISABLED, - true => COLLISION_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == COLLISION_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == COLLISION_A::ENABLED - } -} -#[doc = "Write '1' to enable interrupt for event COLLISION\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum COLLISION_AW { - #[doc = "1: Enable"] - SET = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: COLLISION_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `COLLISION` writer - Write '1' to enable interrupt for event COLLISION"] -pub type COLLISION_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENSET_SPEC, COLLISION_AW, O>; -impl<'a, const O: u8> COLLISION_W<'a, O> { - #[doc = "Enable"] - #[inline(always)] - pub fn set(self) -> &'a mut W { - self.variant(COLLISION_AW::SET) - } -} -#[doc = "Field `SELECTED` reader - Write '1' to enable interrupt for event SELECTED"] -pub type SELECTED_R = crate::BitReader; -#[doc = "Write '1' to enable interrupt for event SELECTED\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum SELECTED_A { - #[doc = "0: Read: Disabled"] - DISABLED = 0, - #[doc = "1: Read: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: SELECTED_A) -> Self { - variant as u8 != 0 - } -} -impl SELECTED_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> SELECTED_A { - match self.bits { - false => SELECTED_A::DISABLED, - true => SELECTED_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == SELECTED_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == SELECTED_A::ENABLED - } -} -#[doc = "Write '1' to enable interrupt for event SELECTED\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum SELECTED_AW { - #[doc = "1: Enable"] - SET = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: SELECTED_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `SELECTED` writer - Write '1' to enable interrupt for event SELECTED"] -pub type SELECTED_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENSET_SPEC, SELECTED_AW, O>; -impl<'a, const O: u8> SELECTED_W<'a, O> { - #[doc = "Enable"] - #[inline(always)] - pub fn set(self) -> &'a mut W { - self.variant(SELECTED_AW::SET) - } -} -#[doc = "Field `STARTED` reader - Write '1' to enable interrupt for event STARTED"] -pub type STARTED_R = crate::BitReader; -#[doc = "Write '1' to enable interrupt for event STARTED\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum STARTED_A { - #[doc = "0: Read: Disabled"] - DISABLED = 0, - #[doc = "1: Read: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: STARTED_A) -> Self { - variant as u8 != 0 - } -} -impl STARTED_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> STARTED_A { - match self.bits { - false => STARTED_A::DISABLED, - true => STARTED_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == STARTED_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == STARTED_A::ENABLED - } -} -#[doc = "Write '1' to enable interrupt for event STARTED\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum STARTED_AW { - #[doc = "1: Enable"] - SET = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: STARTED_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `STARTED` writer - Write '1' to enable interrupt for event STARTED"] -pub type STARTED_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENSET_SPEC, STARTED_AW, O>; -impl<'a, const O: u8> STARTED_W<'a, O> { - #[doc = "Enable"] - #[inline(always)] - pub fn set(self) -> &'a mut W { - self.variant(STARTED_AW::SET) - } -} -impl R { - #[doc = "Bit 0 - Write '1' to enable interrupt for event READY"] - #[inline(always)] - pub fn ready(&self) -> READY_R { - READY_R::new((self.bits & 1) != 0) - } - #[doc = "Bit 1 - Write '1' to enable interrupt for event FIELDDETECTED"] - #[inline(always)] - pub fn fielddetected(&self) -> FIELDDETECTED_R { - FIELDDETECTED_R::new(((self.bits >> 1) & 1) != 0) - } - #[doc = "Bit 2 - Write '1' to enable interrupt for event FIELDLOST"] - #[inline(always)] - pub fn fieldlost(&self) -> FIELDLOST_R { - FIELDLOST_R::new(((self.bits >> 2) & 1) != 0) - } - #[doc = "Bit 3 - Write '1' to enable interrupt for event TXFRAMESTART"] - #[inline(always)] - pub fn txframestart(&self) -> TXFRAMESTART_R { - TXFRAMESTART_R::new(((self.bits >> 3) & 1) != 0) - } - #[doc = "Bit 4 - Write '1' to enable interrupt for event TXFRAMEEND"] - #[inline(always)] - pub fn txframeend(&self) -> TXFRAMEEND_R { - TXFRAMEEND_R::new(((self.bits >> 4) & 1) != 0) - } - #[doc = "Bit 5 - Write '1' to enable interrupt for event RXFRAMESTART"] - #[inline(always)] - pub fn rxframestart(&self) -> RXFRAMESTART_R { - RXFRAMESTART_R::new(((self.bits >> 5) & 1) != 0) - } - #[doc = "Bit 6 - Write '1' to enable interrupt for event RXFRAMEEND"] - #[inline(always)] - pub fn rxframeend(&self) -> RXFRAMEEND_R { - RXFRAMEEND_R::new(((self.bits >> 6) & 1) != 0) - } - #[doc = "Bit 7 - Write '1' to enable interrupt for event ERROR"] - #[inline(always)] - pub fn error(&self) -> ERROR_R { - ERROR_R::new(((self.bits >> 7) & 1) != 0) - } - #[doc = "Bit 10 - Write '1' to enable interrupt for event RXERROR"] - #[inline(always)] - pub fn rxerror(&self) -> RXERROR_R { - RXERROR_R::new(((self.bits >> 10) & 1) != 0) - } - #[doc = "Bit 11 - Write '1' to enable interrupt for event ENDRX"] - #[inline(always)] - pub fn endrx(&self) -> ENDRX_R { - ENDRX_R::new(((self.bits >> 11) & 1) != 0) - } - #[doc = "Bit 12 - Write '1' to enable interrupt for event ENDTX"] - #[inline(always)] - pub fn endtx(&self) -> ENDTX_R { - ENDTX_R::new(((self.bits >> 12) & 1) != 0) - } - #[doc = "Bit 14 - Write '1' to enable interrupt for event AUTOCOLRESSTARTED"] - #[inline(always)] - pub fn autocolresstarted(&self) -> AUTOCOLRESSTARTED_R { - AUTOCOLRESSTARTED_R::new(((self.bits >> 14) & 1) != 0) - } - #[doc = "Bit 18 - Write '1' to enable interrupt for event COLLISION"] - #[inline(always)] - pub fn collision(&self) -> COLLISION_R { - COLLISION_R::new(((self.bits >> 18) & 1) != 0) - } - #[doc = "Bit 19 - Write '1' to enable interrupt for event SELECTED"] - #[inline(always)] - pub fn selected(&self) -> SELECTED_R { - SELECTED_R::new(((self.bits >> 19) & 1) != 0) - } - #[doc = "Bit 20 - Write '1' to enable interrupt for event STARTED"] - #[inline(always)] - pub fn started(&self) -> STARTED_R { - STARTED_R::new(((self.bits >> 20) & 1) != 0) - } -} -impl W { - #[doc = "Bit 0 - Write '1' to enable interrupt for event READY"] - #[inline(always)] - #[must_use] - pub fn ready(&mut self) -> READY_W<0> { - READY_W::new(self) - } - #[doc = "Bit 1 - Write '1' to enable interrupt for event FIELDDETECTED"] - #[inline(always)] - #[must_use] - pub fn fielddetected(&mut self) -> FIELDDETECTED_W<1> { - FIELDDETECTED_W::new(self) - } - #[doc = "Bit 2 - Write '1' to enable interrupt for event FIELDLOST"] - #[inline(always)] - #[must_use] - pub fn fieldlost(&mut self) -> FIELDLOST_W<2> { - FIELDLOST_W::new(self) - } - #[doc = "Bit 3 - Write '1' to enable interrupt for event TXFRAMESTART"] - #[inline(always)] - #[must_use] - pub fn txframestart(&mut self) -> TXFRAMESTART_W<3> { - TXFRAMESTART_W::new(self) - } - #[doc = "Bit 4 - Write '1' to enable interrupt for event TXFRAMEEND"] - #[inline(always)] - #[must_use] - pub fn txframeend(&mut self) -> TXFRAMEEND_W<4> { - TXFRAMEEND_W::new(self) - } - #[doc = "Bit 5 - Write '1' to enable interrupt for event RXFRAMESTART"] - #[inline(always)] - #[must_use] - pub fn rxframestart(&mut self) -> RXFRAMESTART_W<5> { - RXFRAMESTART_W::new(self) - } - #[doc = "Bit 6 - Write '1' to enable interrupt for event RXFRAMEEND"] - #[inline(always)] - #[must_use] - pub fn rxframeend(&mut self) -> RXFRAMEEND_W<6> { - RXFRAMEEND_W::new(self) - } - #[doc = "Bit 7 - Write '1' to enable interrupt for event ERROR"] - #[inline(always)] - #[must_use] - pub fn error(&mut self) -> ERROR_W<7> { - ERROR_W::new(self) - } - #[doc = "Bit 10 - Write '1' to enable interrupt for event RXERROR"] - #[inline(always)] - #[must_use] - pub fn rxerror(&mut self) -> RXERROR_W<10> { - RXERROR_W::new(self) - } - #[doc = "Bit 11 - Write '1' to enable interrupt for event ENDRX"] - #[inline(always)] - #[must_use] - pub fn endrx(&mut self) -> ENDRX_W<11> { - ENDRX_W::new(self) - } - #[doc = "Bit 12 - Write '1' to enable interrupt for event ENDTX"] - #[inline(always)] - #[must_use] - pub fn endtx(&mut self) -> ENDTX_W<12> { - ENDTX_W::new(self) - } - #[doc = "Bit 14 - Write '1' to enable interrupt for event AUTOCOLRESSTARTED"] - #[inline(always)] - #[must_use] - pub fn autocolresstarted(&mut self) -> AUTOCOLRESSTARTED_W<14> { - AUTOCOLRESSTARTED_W::new(self) - } - #[doc = "Bit 18 - Write '1' to enable interrupt for event COLLISION"] - #[inline(always)] - #[must_use] - pub fn collision(&mut self) -> COLLISION_W<18> { - COLLISION_W::new(self) - } - #[doc = "Bit 19 - Write '1' to enable interrupt for event SELECTED"] - #[inline(always)] - #[must_use] - pub fn selected(&mut self) -> SELECTED_W<19> { - SELECTED_W::new(self) - } - #[doc = "Bit 20 - Write '1' to enable interrupt for event STARTED"] - #[inline(always)] - #[must_use] - pub fn started(&mut self) -> STARTED_W<20> { - STARTED_W::new(self) - } - #[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 = "Enable interrupt\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 [intenset](index.html) module"] -pub struct INTENSET_SPEC; -impl crate::RegisterSpec for INTENSET_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [intenset::R](R) reader structure"] -impl crate::Readable for INTENSET_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [intenset::W](W) writer structure"] -impl crate::Writable for INTENSET_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets INTENSET to value 0"] -impl crate::Resettable for INTENSET_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/nfct/maxlen.rs b/down-the-stack/dk_pac/src/nfct/maxlen.rs deleted file mode 100644 index 1f624de..0000000 --- a/down-the-stack/dk_pac/src/nfct/maxlen.rs +++ /dev/null @@ -1,80 +0,0 @@ -#[doc = "Register `MAXLEN` 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 `MAXLEN` 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 `MAXLEN` reader - Size of allocated for TXD and RXD data storage buffer in Data RAM"] -pub type MAXLEN_R = crate::FieldReader; -#[doc = "Field `MAXLEN` writer - Size of allocated for TXD and RXD data storage buffer in Data RAM"] -pub type MAXLEN_W<'a, const O: u8> = crate::FieldWriter<'a, u32, MAXLEN_SPEC, u16, u16, 9, O>; -impl R { - #[doc = "Bits 0:8 - Size of allocated for TXD and RXD data storage buffer in Data RAM"] - #[inline(always)] - pub fn maxlen(&self) -> MAXLEN_R { - MAXLEN_R::new((self.bits & 0x01ff) as u16) - } -} -impl W { - #[doc = "Bits 0:8 - Size of allocated for TXD and RXD data storage buffer in Data RAM"] - #[inline(always)] - #[must_use] - pub fn maxlen(&mut self) -> MAXLEN_W<0> { - MAXLEN_W::new(self) - } - #[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 = "Size of allocated for TXD and RXD data storage buffer in Data RAM\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 [maxlen](index.html) module"] -pub struct MAXLEN_SPEC; -impl crate::RegisterSpec for MAXLEN_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [maxlen::R](R) reader structure"] -impl crate::Readable for MAXLEN_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [maxlen::W](W) writer structure"] -impl crate::Writable for MAXLEN_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets MAXLEN to value 0"] -impl crate::Resettable for MAXLEN_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/nfct/nfcid1_2nd_last.rs b/down-the-stack/dk_pac/src/nfct/nfcid1_2nd_last.rs deleted file mode 100644 index 44d5fb4..0000000 --- a/down-the-stack/dk_pac/src/nfct/nfcid1_2nd_last.rs +++ /dev/null @@ -1,113 +0,0 @@ -#[doc = "Register `NFCID1_2ND_LAST` 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 `NFCID1_2ND_LAST` 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 `NFCID1_V` reader - NFCID1 byte V"] -pub type NFCID1_V_R = crate::FieldReader; -#[doc = "Field `NFCID1_V` writer - NFCID1 byte V"] -pub type NFCID1_V_W<'a, const O: u8> = - crate::FieldWriter<'a, u32, NFCID1_2ND_LAST_SPEC, u8, u8, 8, O>; -#[doc = "Field `NFCID1_U` reader - NFCID1 byte U"] -pub type NFCID1_U_R = crate::FieldReader; -#[doc = "Field `NFCID1_U` writer - NFCID1 byte U"] -pub type NFCID1_U_W<'a, const O: u8> = - crate::FieldWriter<'a, u32, NFCID1_2ND_LAST_SPEC, u8, u8, 8, O>; -#[doc = "Field `NFCID1_T` reader - NFCID1 byte T"] -pub type NFCID1_T_R = crate::FieldReader; -#[doc = "Field `NFCID1_T` writer - NFCID1 byte T"] -pub type NFCID1_T_W<'a, const O: u8> = - crate::FieldWriter<'a, u32, NFCID1_2ND_LAST_SPEC, u8, u8, 8, O>; -impl R { - #[doc = "Bits 0:7 - NFCID1 byte V"] - #[inline(always)] - pub fn nfcid1_v(&self) -> NFCID1_V_R { - NFCID1_V_R::new((self.bits & 0xff) as u8) - } - #[doc = "Bits 8:15 - NFCID1 byte U"] - #[inline(always)] - pub fn nfcid1_u(&self) -> NFCID1_U_R { - NFCID1_U_R::new(((self.bits >> 8) & 0xff) as u8) - } - #[doc = "Bits 16:23 - NFCID1 byte T"] - #[inline(always)] - pub fn nfcid1_t(&self) -> NFCID1_T_R { - NFCID1_T_R::new(((self.bits >> 16) & 0xff) as u8) - } -} -impl W { - #[doc = "Bits 0:7 - NFCID1 byte V"] - #[inline(always)] - #[must_use] - pub fn nfcid1_v(&mut self) -> NFCID1_V_W<0> { - NFCID1_V_W::new(self) - } - #[doc = "Bits 8:15 - NFCID1 byte U"] - #[inline(always)] - #[must_use] - pub fn nfcid1_u(&mut self) -> NFCID1_U_W<8> { - NFCID1_U_W::new(self) - } - #[doc = "Bits 16:23 - NFCID1 byte T"] - #[inline(always)] - #[must_use] - pub fn nfcid1_t(&mut self) -> NFCID1_T_W<16> { - NFCID1_T_W::new(self) - } - #[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 = "Second last NFCID1 part (7 or 10 bytes ID)\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 [nfcid1_2nd_last](index.html) module"] -pub struct NFCID1_2ND_LAST_SPEC; -impl crate::RegisterSpec for NFCID1_2ND_LAST_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [nfcid1_2nd_last::R](R) reader structure"] -impl crate::Readable for NFCID1_2ND_LAST_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [nfcid1_2nd_last::W](W) writer structure"] -impl crate::Writable for NFCID1_2ND_LAST_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets NFCID1_2ND_LAST to value 0"] -impl crate::Resettable for NFCID1_2ND_LAST_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/nfct/nfcid1_3rd_last.rs b/down-the-stack/dk_pac/src/nfct/nfcid1_3rd_last.rs deleted file mode 100644 index 5230296..0000000 --- a/down-the-stack/dk_pac/src/nfct/nfcid1_3rd_last.rs +++ /dev/null @@ -1,113 +0,0 @@ -#[doc = "Register `NFCID1_3RD_LAST` 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 `NFCID1_3RD_LAST` 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 `NFCID1_S` reader - NFCID1 byte S"] -pub type NFCID1_S_R = crate::FieldReader; -#[doc = "Field `NFCID1_S` writer - NFCID1 byte S"] -pub type NFCID1_S_W<'a, const O: u8> = - crate::FieldWriter<'a, u32, NFCID1_3RD_LAST_SPEC, u8, u8, 8, O>; -#[doc = "Field `NFCID1_R` reader - NFCID1 byte R"] -pub type NFCID1_R_R = crate::FieldReader; -#[doc = "Field `NFCID1_R` writer - NFCID1 byte R"] -pub type NFCID1_R_W<'a, const O: u8> = - crate::FieldWriter<'a, u32, NFCID1_3RD_LAST_SPEC, u8, u8, 8, O>; -#[doc = "Field `NFCID1_Q` reader - NFCID1 byte Q"] -pub type NFCID1_Q_R = crate::FieldReader; -#[doc = "Field `NFCID1_Q` writer - NFCID1 byte Q"] -pub type NFCID1_Q_W<'a, const O: u8> = - crate::FieldWriter<'a, u32, NFCID1_3RD_LAST_SPEC, u8, u8, 8, O>; -impl R { - #[doc = "Bits 0:7 - NFCID1 byte S"] - #[inline(always)] - pub fn nfcid1_s(&self) -> NFCID1_S_R { - NFCID1_S_R::new((self.bits & 0xff) as u8) - } - #[doc = "Bits 8:15 - NFCID1 byte R"] - #[inline(always)] - pub fn nfcid1_r(&self) -> NFCID1_R_R { - NFCID1_R_R::new(((self.bits >> 8) & 0xff) as u8) - } - #[doc = "Bits 16:23 - NFCID1 byte Q"] - #[inline(always)] - pub fn nfcid1_q(&self) -> NFCID1_Q_R { - NFCID1_Q_R::new(((self.bits >> 16) & 0xff) as u8) - } -} -impl W { - #[doc = "Bits 0:7 - NFCID1 byte S"] - #[inline(always)] - #[must_use] - pub fn nfcid1_s(&mut self) -> NFCID1_S_W<0> { - NFCID1_S_W::new(self) - } - #[doc = "Bits 8:15 - NFCID1 byte R"] - #[inline(always)] - #[must_use] - pub fn nfcid1_r(&mut self) -> NFCID1_R_W<8> { - NFCID1_R_W::new(self) - } - #[doc = "Bits 16:23 - NFCID1 byte Q"] - #[inline(always)] - #[must_use] - pub fn nfcid1_q(&mut self) -> NFCID1_Q_W<16> { - NFCID1_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 - } -} -#[doc = "Third last NFCID1 part (10 bytes ID)\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 [nfcid1_3rd_last](index.html) module"] -pub struct NFCID1_3RD_LAST_SPEC; -impl crate::RegisterSpec for NFCID1_3RD_LAST_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [nfcid1_3rd_last::R](R) reader structure"] -impl crate::Readable for NFCID1_3RD_LAST_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [nfcid1_3rd_last::W](W) writer structure"] -impl crate::Writable for NFCID1_3RD_LAST_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets NFCID1_3RD_LAST to value 0"] -impl crate::Resettable for NFCID1_3RD_LAST_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/nfct/nfcid1_last.rs b/down-the-stack/dk_pac/src/nfct/nfcid1_last.rs deleted file mode 100644 index 303fd7a..0000000 --- a/down-the-stack/dk_pac/src/nfct/nfcid1_last.rs +++ /dev/null @@ -1,125 +0,0 @@ -#[doc = "Register `NFCID1_LAST` 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 `NFCID1_LAST` 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 `NFCID1_Z` reader - NFCID1 byte Z (very last byte sent)"] -pub type NFCID1_Z_R = crate::FieldReader; -#[doc = "Field `NFCID1_Z` writer - NFCID1 byte Z (very last byte sent)"] -pub type NFCID1_Z_W<'a, const O: u8> = crate::FieldWriter<'a, u32, NFCID1_LAST_SPEC, u8, u8, 8, O>; -#[doc = "Field `NFCID1_Y` reader - NFCID1 byte Y"] -pub type NFCID1_Y_R = crate::FieldReader; -#[doc = "Field `NFCID1_Y` writer - NFCID1 byte Y"] -pub type NFCID1_Y_W<'a, const O: u8> = crate::FieldWriter<'a, u32, NFCID1_LAST_SPEC, u8, u8, 8, O>; -#[doc = "Field `NFCID1_X` reader - NFCID1 byte X"] -pub type NFCID1_X_R = crate::FieldReader; -#[doc = "Field `NFCID1_X` writer - NFCID1 byte X"] -pub type NFCID1_X_W<'a, const O: u8> = crate::FieldWriter<'a, u32, NFCID1_LAST_SPEC, u8, u8, 8, O>; -#[doc = "Field `NFCID1_W` reader - NFCID1 byte W"] -pub type NFCID1_W_R = crate::FieldReader; -#[doc = "Field `NFCID1_W` writer - NFCID1 byte W"] -pub type NFCID1_W_W<'a, const O: u8> = crate::FieldWriter<'a, u32, NFCID1_LAST_SPEC, u8, u8, 8, O>; -impl R { - #[doc = "Bits 0:7 - NFCID1 byte Z (very last byte sent)"] - #[inline(always)] - pub fn nfcid1_z(&self) -> NFCID1_Z_R { - NFCID1_Z_R::new((self.bits & 0xff) as u8) - } - #[doc = "Bits 8:15 - NFCID1 byte Y"] - #[inline(always)] - pub fn nfcid1_y(&self) -> NFCID1_Y_R { - NFCID1_Y_R::new(((self.bits >> 8) & 0xff) as u8) - } - #[doc = "Bits 16:23 - NFCID1 byte X"] - #[inline(always)] - pub fn nfcid1_x(&self) -> NFCID1_X_R { - NFCID1_X_R::new(((self.bits >> 16) & 0xff) as u8) - } - #[doc = "Bits 24:31 - NFCID1 byte W"] - #[inline(always)] - pub fn nfcid1_w(&self) -> NFCID1_W_R { - NFCID1_W_R::new(((self.bits >> 24) & 0xff) as u8) - } -} -impl W { - #[doc = "Bits 0:7 - NFCID1 byte Z (very last byte sent)"] - #[inline(always)] - #[must_use] - pub fn nfcid1_z(&mut self) -> NFCID1_Z_W<0> { - NFCID1_Z_W::new(self) - } - #[doc = "Bits 8:15 - NFCID1 byte Y"] - #[inline(always)] - #[must_use] - pub fn nfcid1_y(&mut self) -> NFCID1_Y_W<8> { - NFCID1_Y_W::new(self) - } - #[doc = "Bits 16:23 - NFCID1 byte X"] - #[inline(always)] - #[must_use] - pub fn nfcid1_x(&mut self) -> NFCID1_X_W<16> { - NFCID1_X_W::new(self) - } - #[doc = "Bits 24:31 - NFCID1 byte W"] - #[inline(always)] - #[must_use] - pub fn nfcid1_w(&mut self) -> NFCID1_W_W<24> { - NFCID1_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 - } -} -#[doc = "Last NFCID1 part (4, 7 or 10 bytes ID)\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 [nfcid1_last](index.html) module"] -pub struct NFCID1_LAST_SPEC; -impl crate::RegisterSpec for NFCID1_LAST_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [nfcid1_last::R](R) reader structure"] -impl crate::Readable for NFCID1_LAST_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [nfcid1_last::W](W) writer structure"] -impl crate::Writable for NFCID1_LAST_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets NFCID1_LAST to value 0x6363"] -impl crate::Resettable for NFCID1_LAST_SPEC { - const RESET_VALUE: Self::Ux = 0x6363; -} diff --git a/down-the-stack/dk_pac/src/nfct/packetptr.rs b/down-the-stack/dk_pac/src/nfct/packetptr.rs deleted file mode 100644 index 320087a..0000000 --- a/down-the-stack/dk_pac/src/nfct/packetptr.rs +++ /dev/null @@ -1,80 +0,0 @@ -#[doc = "Register `PACKETPTR` 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 `PACKETPTR` 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 `PTR` reader - Packet pointer for TXD and RXD data storage in Data RAM. This address is a byte aligned RAM address."] -pub type PTR_R = crate::FieldReader; -#[doc = "Field `PTR` writer - Packet pointer for TXD and RXD data storage in Data RAM. This address is a byte aligned RAM address."] -pub type PTR_W<'a, const O: u8> = crate::FieldWriter<'a, u32, PACKETPTR_SPEC, u32, u32, 32, O>; -impl R { - #[doc = "Bits 0:31 - Packet pointer for TXD and RXD data storage in Data RAM. This address is a byte aligned RAM address."] - #[inline(always)] - pub fn ptr(&self) -> PTR_R { - PTR_R::new(self.bits) - } -} -impl W { - #[doc = "Bits 0:31 - Packet pointer for TXD and RXD data storage in Data RAM. This address is a byte aligned RAM address."] - #[inline(always)] - #[must_use] - pub fn ptr(&mut self) -> PTR_W<0> { - PTR_W::new(self) - } - #[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 = "Packet pointer for TXD and RXD data storage in Data RAM\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 [packetptr](index.html) module"] -pub struct PACKETPTR_SPEC; -impl crate::RegisterSpec for PACKETPTR_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [packetptr::R](R) reader structure"] -impl crate::Readable for PACKETPTR_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [packetptr::W](W) writer structure"] -impl crate::Writable for PACKETPTR_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets PACKETPTR to value 0"] -impl crate::Resettable for PACKETPTR_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/nfct/rxd.rs b/down-the-stack/dk_pac/src/nfct/rxd.rs deleted file mode 100644 index 3154e82..0000000 --- a/down-the-stack/dk_pac/src/nfct/rxd.rs +++ /dev/null @@ -1,16 +0,0 @@ -#[doc = r"Register block"] -#[repr(C)] -pub struct RXD { - #[doc = "0x00 - Configuration of incoming frames"] - pub frameconfig: FRAMECONFIG, - #[doc = "0x04 - Size of last incoming frame"] - pub amount: AMOUNT, -} -#[doc = "FRAMECONFIG (rw) register accessor: an alias for `Reg`"] -pub type FRAMECONFIG = crate::Reg; -#[doc = "Configuration of incoming frames"] -pub mod frameconfig; -#[doc = "AMOUNT (r) register accessor: an alias for `Reg`"] -pub type AMOUNT = crate::Reg; -#[doc = "Size of last incoming frame"] -pub mod amount; diff --git a/down-the-stack/dk_pac/src/nfct/rxd/amount.rs b/down-the-stack/dk_pac/src/nfct/rxd/amount.rs deleted file mode 100644 index 613b1cf..0000000 --- a/down-the-stack/dk_pac/src/nfct/rxd/amount.rs +++ /dev/null @@ -1,44 +0,0 @@ -#[doc = "Register `AMOUNT` 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 = "Field `RXDATABITS` reader - Number of bits in the last byte in the frame, if less than 8 (including CRC, but excluding parity and SoF/EoF framing)."] -pub type RXDATABITS_R = crate::FieldReader; -#[doc = "Field `RXDATABYTES` reader - Number of complete bytes received in the frame (including CRC, but excluding parity and SoF/EoF framing)"] -pub type RXDATABYTES_R = crate::FieldReader; -impl R { - #[doc = "Bits 0:2 - Number of bits in the last byte in the frame, if less than 8 (including CRC, but excluding parity and SoF/EoF framing)."] - #[inline(always)] - pub fn rxdatabits(&self) -> RXDATABITS_R { - RXDATABITS_R::new((self.bits & 7) as u8) - } - #[doc = "Bits 3:11 - Number of complete bytes received in the frame (including CRC, but excluding parity and SoF/EoF framing)"] - #[inline(always)] - pub fn rxdatabytes(&self) -> RXDATABYTES_R { - RXDATABYTES_R::new(((self.bits >> 3) & 0x01ff) as u16) - } -} -#[doc = "Size of last incoming frame\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 [amount](index.html) module"] -pub struct AMOUNT_SPEC; -impl crate::RegisterSpec for AMOUNT_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [amount::R](R) reader structure"] -impl crate::Readable for AMOUNT_SPEC { - type Reader = R; -} -#[doc = "`reset()` method sets AMOUNT to value 0"] -impl crate::Resettable for AMOUNT_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/nfct/rxd/frameconfig.rs b/down-the-stack/dk_pac/src/nfct/rxd/frameconfig.rs deleted file mode 100644 index 3f7ad2c..0000000 --- a/down-the-stack/dk_pac/src/nfct/rxd/frameconfig.rs +++ /dev/null @@ -1,248 +0,0 @@ -#[doc = "Register `FRAMECONFIG` 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 `FRAMECONFIG` 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 `PARITY` reader - Parity expected or not in RX frame"] -pub type PARITY_R = crate::BitReader; -#[doc = "Parity expected or not in RX frame\n\nValue on reset: 1"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PARITY_A { - #[doc = "0: Parity is not expected in RX frames"] - NO_PARITY = 0, - #[doc = "1: Parity is expected in RX frames"] - PARITY = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PARITY_A) -> Self { - variant as u8 != 0 - } -} -impl PARITY_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> PARITY_A { - match self.bits { - false => PARITY_A::NO_PARITY, - true => PARITY_A::PARITY, - } - } - #[doc = "Checks if the value of the field is `NO_PARITY`"] - #[inline(always)] - pub fn is_no_parity(&self) -> bool { - *self == PARITY_A::NO_PARITY - } - #[doc = "Checks if the value of the field is `PARITY`"] - #[inline(always)] - pub fn is_parity(&self) -> bool { - *self == PARITY_A::PARITY - } -} -#[doc = "Field `PARITY` writer - Parity expected or not in RX frame"] -pub type PARITY_W<'a, const O: u8> = crate::BitWriter<'a, u32, FRAMECONFIG_SPEC, PARITY_A, O>; -impl<'a, const O: u8> PARITY_W<'a, O> { - #[doc = "Parity is not expected in RX frames"] - #[inline(always)] - pub fn no_parity(self) -> &'a mut W { - self.variant(PARITY_A::NO_PARITY) - } - #[doc = "Parity is expected in RX frames"] - #[inline(always)] - pub fn parity(self) -> &'a mut W { - self.variant(PARITY_A::PARITY) - } -} -#[doc = "Field `SOF` reader - SoF expected or not in RX frames"] -pub type SOF_R = crate::BitReader; -#[doc = "SoF expected or not in RX frames\n\nValue on reset: 1"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum SOF_A { - #[doc = "0: Start of Frame symbol is not expected in RX frames"] - NO_SO_F = 0, - #[doc = "1: Start of Frame symbol is expected in RX frames"] - SO_F = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: SOF_A) -> Self { - variant as u8 != 0 - } -} -impl SOF_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> SOF_A { - match self.bits { - false => SOF_A::NO_SO_F, - true => SOF_A::SO_F, - } - } - #[doc = "Checks if the value of the field is `NO_SO_F`"] - #[inline(always)] - pub fn is_no_so_f(&self) -> bool { - *self == SOF_A::NO_SO_F - } - #[doc = "Checks if the value of the field is `SO_F`"] - #[inline(always)] - pub fn is_so_f(&self) -> bool { - *self == SOF_A::SO_F - } -} -#[doc = "Field `SOF` writer - SoF expected or not in RX frames"] -pub type SOF_W<'a, const O: u8> = crate::BitWriter<'a, u32, FRAMECONFIG_SPEC, SOF_A, O>; -impl<'a, const O: u8> SOF_W<'a, O> { - #[doc = "Start of Frame symbol is not expected in RX frames"] - #[inline(always)] - pub fn no_so_f(self) -> &'a mut W { - self.variant(SOF_A::NO_SO_F) - } - #[doc = "Start of Frame symbol is expected in RX frames"] - #[inline(always)] - pub fn so_f(self) -> &'a mut W { - self.variant(SOF_A::SO_F) - } -} -#[doc = "Field `CRCMODERX` reader - CRC mode for incoming frames"] -pub type CRCMODERX_R = crate::BitReader; -#[doc = "CRC mode for incoming frames\n\nValue on reset: 1"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum CRCMODERX_A { - #[doc = "0: CRC is not expected in RX frames"] - NO_CRCRX = 0, - #[doc = "1: Last 16 bits in RX frame is CRC, CRC is checked and CRCSTATUS updated"] - CRC16RX = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: CRCMODERX_A) -> Self { - variant as u8 != 0 - } -} -impl CRCMODERX_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> CRCMODERX_A { - match self.bits { - false => CRCMODERX_A::NO_CRCRX, - true => CRCMODERX_A::CRC16RX, - } - } - #[doc = "Checks if the value of the field is `NO_CRCRX`"] - #[inline(always)] - pub fn is_no_crcrx(&self) -> bool { - *self == CRCMODERX_A::NO_CRCRX - } - #[doc = "Checks if the value of the field is `CRC16RX`"] - #[inline(always)] - pub fn is_crc16rx(&self) -> bool { - *self == CRCMODERX_A::CRC16RX - } -} -#[doc = "Field `CRCMODERX` writer - CRC mode for incoming frames"] -pub type CRCMODERX_W<'a, const O: u8> = crate::BitWriter<'a, u32, FRAMECONFIG_SPEC, CRCMODERX_A, O>; -impl<'a, const O: u8> CRCMODERX_W<'a, O> { - #[doc = "CRC is not expected in RX frames"] - #[inline(always)] - pub fn no_crcrx(self) -> &'a mut W { - self.variant(CRCMODERX_A::NO_CRCRX) - } - #[doc = "Last 16 bits in RX frame is CRC, CRC is checked and CRCSTATUS updated"] - #[inline(always)] - pub fn crc16rx(self) -> &'a mut W { - self.variant(CRCMODERX_A::CRC16RX) - } -} -impl R { - #[doc = "Bit 0 - Parity expected or not in RX frame"] - #[inline(always)] - pub fn parity(&self) -> PARITY_R { - PARITY_R::new((self.bits & 1) != 0) - } - #[doc = "Bit 2 - SoF expected or not in RX frames"] - #[inline(always)] - pub fn sof(&self) -> SOF_R { - SOF_R::new(((self.bits >> 2) & 1) != 0) - } - #[doc = "Bit 4 - CRC mode for incoming frames"] - #[inline(always)] - pub fn crcmoderx(&self) -> CRCMODERX_R { - CRCMODERX_R::new(((self.bits >> 4) & 1) != 0) - } -} -impl W { - #[doc = "Bit 0 - Parity expected or not in RX frame"] - #[inline(always)] - #[must_use] - pub fn parity(&mut self) -> PARITY_W<0> { - PARITY_W::new(self) - } - #[doc = "Bit 2 - SoF expected or not in RX frames"] - #[inline(always)] - #[must_use] - pub fn sof(&mut self) -> SOF_W<2> { - SOF_W::new(self) - } - #[doc = "Bit 4 - CRC mode for incoming frames"] - #[inline(always)] - #[must_use] - pub fn crcmoderx(&mut self) -> CRCMODERX_W<4> { - CRCMODERX_W::new(self) - } - #[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 = "Configuration of incoming frames\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 [frameconfig](index.html) module"] -pub struct FRAMECONFIG_SPEC; -impl crate::RegisterSpec for FRAMECONFIG_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [frameconfig::R](R) reader structure"] -impl crate::Readable for FRAMECONFIG_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [frameconfig::W](W) writer structure"] -impl crate::Writable for FRAMECONFIG_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets FRAMECONFIG to value 0x15"] -impl crate::Resettable for FRAMECONFIG_SPEC { - const RESET_VALUE: Self::Ux = 0x15; -} diff --git a/down-the-stack/dk_pac/src/nfct/selres.rs b/down-the-stack/dk_pac/src/nfct/selres.rs deleted file mode 100644 index 8a139d5..0000000 --- a/down-the-stack/dk_pac/src/nfct/selres.rs +++ /dev/null @@ -1,186 +0,0 @@ -#[doc = "Register `SELRES` 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 `SELRES` 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 `RFU10` reader - Reserved for future use. Shall be 0."] -pub type RFU10_R = crate::FieldReader; -#[doc = "Field `RFU10` writer - Reserved for future use. Shall be 0."] -pub type RFU10_W<'a, const O: u8> = crate::FieldWriter<'a, u32, SELRES_SPEC, u8, u8, 2, O>; -#[doc = "Field `CASCADE` reader - Cascade bit (controlled by hardware, write has no effect)"] -pub type CASCADE_R = crate::BitReader; -#[doc = "Cascade bit (controlled by hardware, write has no effect)\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum CASCADE_A { - #[doc = "0: NFCID1 complete"] - COMPLETE = 0, - #[doc = "1: NFCID1 not complete"] - NOT_COMPLETE = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: CASCADE_A) -> Self { - variant as u8 != 0 - } -} -impl CASCADE_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> CASCADE_A { - match self.bits { - false => CASCADE_A::COMPLETE, - true => CASCADE_A::NOT_COMPLETE, - } - } - #[doc = "Checks if the value of the field is `COMPLETE`"] - #[inline(always)] - pub fn is_complete(&self) -> bool { - *self == CASCADE_A::COMPLETE - } - #[doc = "Checks if the value of the field is `NOT_COMPLETE`"] - #[inline(always)] - pub fn is_not_complete(&self) -> bool { - *self == CASCADE_A::NOT_COMPLETE - } -} -#[doc = "Field `CASCADE` writer - Cascade bit (controlled by hardware, write has no effect)"] -pub type CASCADE_W<'a, const O: u8> = crate::BitWriter<'a, u32, SELRES_SPEC, CASCADE_A, O>; -impl<'a, const O: u8> CASCADE_W<'a, O> { - #[doc = "NFCID1 complete"] - #[inline(always)] - pub fn complete(self) -> &'a mut W { - self.variant(CASCADE_A::COMPLETE) - } - #[doc = "NFCID1 not complete"] - #[inline(always)] - pub fn not_complete(self) -> &'a mut W { - self.variant(CASCADE_A::NOT_COMPLETE) - } -} -#[doc = "Field `RFU43` reader - Reserved for future use. Shall be 0."] -pub type RFU43_R = crate::FieldReader; -#[doc = "Field `RFU43` writer - Reserved for future use. Shall be 0."] -pub type RFU43_W<'a, const O: u8> = crate::FieldWriter<'a, u32, SELRES_SPEC, u8, u8, 2, O>; -#[doc = "Field `PROTOCOL` reader - Protocol as defined by the b7:b6 of SEL_RES response in the NFC Forum, NFC Digital Protocol Technical Specification"] -pub type PROTOCOL_R = crate::FieldReader; -#[doc = "Field `PROTOCOL` writer - Protocol as defined by the b7:b6 of SEL_RES response in the NFC Forum, NFC Digital Protocol Technical Specification"] -pub type PROTOCOL_W<'a, const O: u8> = crate::FieldWriter<'a, u32, SELRES_SPEC, u8, u8, 2, O>; -#[doc = "Field `RFU7` reader - Reserved for future use. Shall be 0."] -pub type RFU7_R = crate::BitReader; -#[doc = "Field `RFU7` writer - Reserved for future use. Shall be 0."] -pub type RFU7_W<'a, const O: u8> = crate::BitWriter<'a, u32, SELRES_SPEC, bool, O>; -impl R { - #[doc = "Bits 0:1 - Reserved for future use. Shall be 0."] - #[inline(always)] - pub fn rfu10(&self) -> RFU10_R { - RFU10_R::new((self.bits & 3) as u8) - } - #[doc = "Bit 2 - Cascade bit (controlled by hardware, write has no effect)"] - #[inline(always)] - pub fn cascade(&self) -> CASCADE_R { - CASCADE_R::new(((self.bits >> 2) & 1) != 0) - } - #[doc = "Bits 3:4 - Reserved for future use. Shall be 0."] - #[inline(always)] - pub fn rfu43(&self) -> RFU43_R { - RFU43_R::new(((self.bits >> 3) & 3) as u8) - } - #[doc = "Bits 5:6 - Protocol as defined by the b7:b6 of SEL_RES response in the NFC Forum, NFC Digital Protocol Technical Specification"] - #[inline(always)] - pub fn protocol(&self) -> PROTOCOL_R { - PROTOCOL_R::new(((self.bits >> 5) & 3) as u8) - } - #[doc = "Bit 7 - Reserved for future use. Shall be 0."] - #[inline(always)] - pub fn rfu7(&self) -> RFU7_R { - RFU7_R::new(((self.bits >> 7) & 1) != 0) - } -} -impl W { - #[doc = "Bits 0:1 - Reserved for future use. Shall be 0."] - #[inline(always)] - #[must_use] - pub fn rfu10(&mut self) -> RFU10_W<0> { - RFU10_W::new(self) - } - #[doc = "Bit 2 - Cascade bit (controlled by hardware, write has no effect)"] - #[inline(always)] - #[must_use] - pub fn cascade(&mut self) -> CASCADE_W<2> { - CASCADE_W::new(self) - } - #[doc = "Bits 3:4 - Reserved for future use. Shall be 0."] - #[inline(always)] - #[must_use] - pub fn rfu43(&mut self) -> RFU43_W<3> { - RFU43_W::new(self) - } - #[doc = "Bits 5:6 - Protocol as defined by the b7:b6 of SEL_RES response in the NFC Forum, NFC Digital Protocol Technical Specification"] - #[inline(always)] - #[must_use] - pub fn protocol(&mut self) -> PROTOCOL_W<5> { - PROTOCOL_W::new(self) - } - #[doc = "Bit 7 - Reserved for future use. Shall be 0."] - #[inline(always)] - #[must_use] - pub fn rfu7(&mut self) -> RFU7_W<7> { - RFU7_W::new(self) - } - #[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 = "NFC-A SEL_RES auto-response settings\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 [selres](index.html) module"] -pub struct SELRES_SPEC; -impl crate::RegisterSpec for SELRES_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [selres::R](R) reader structure"] -impl crate::Readable for SELRES_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [selres::W](W) writer structure"] -impl crate::Writable for SELRES_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets SELRES to value 0"] -impl crate::Resettable for SELRES_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/nfct/sensres.rs b/down-the-stack/dk_pac/src/nfct/sensres.rs deleted file mode 100644 index 202470a..0000000 --- a/down-the-stack/dk_pac/src/nfct/sensres.rs +++ /dev/null @@ -1,303 +0,0 @@ -#[doc = "Register `SENSRES` 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 `SENSRES` 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 `BITFRAMESDD` reader - Bit frame SDD as defined by the b5:b1 of byte 1 in SENS_RES response in the NFC Forum, NFC Digital Protocol Technical Specification"] -pub type BITFRAMESDD_R = crate::FieldReader; -#[doc = "Bit frame SDD as defined by the b5:b1 of byte 1 in SENS_RES response in the NFC Forum, NFC Digital Protocol Technical Specification\n\nValue on reset: 1"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -#[repr(u8)] -pub enum BITFRAMESDD_A { - #[doc = "0: SDD pattern 00000"] - SDD00000 = 0, - #[doc = "1: SDD pattern 00001"] - SDD00001 = 1, - #[doc = "2: SDD pattern 00010"] - SDD00010 = 2, - #[doc = "4: SDD pattern 00100"] - SDD00100 = 4, - #[doc = "8: SDD pattern 01000"] - SDD01000 = 8, - #[doc = "16: SDD pattern 10000"] - SDD10000 = 16, -} -impl From for u8 { - #[inline(always)] - fn from(variant: BITFRAMESDD_A) -> Self { - variant as _ - } -} -impl BITFRAMESDD_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> Option { - match self.bits { - 0 => Some(BITFRAMESDD_A::SDD00000), - 1 => Some(BITFRAMESDD_A::SDD00001), - 2 => Some(BITFRAMESDD_A::SDD00010), - 4 => Some(BITFRAMESDD_A::SDD00100), - 8 => Some(BITFRAMESDD_A::SDD01000), - 16 => Some(BITFRAMESDD_A::SDD10000), - _ => None, - } - } - #[doc = "Checks if the value of the field is `SDD00000`"] - #[inline(always)] - pub fn is_sdd00000(&self) -> bool { - *self == BITFRAMESDD_A::SDD00000 - } - #[doc = "Checks if the value of the field is `SDD00001`"] - #[inline(always)] - pub fn is_sdd00001(&self) -> bool { - *self == BITFRAMESDD_A::SDD00001 - } - #[doc = "Checks if the value of the field is `SDD00010`"] - #[inline(always)] - pub fn is_sdd00010(&self) -> bool { - *self == BITFRAMESDD_A::SDD00010 - } - #[doc = "Checks if the value of the field is `SDD00100`"] - #[inline(always)] - pub fn is_sdd00100(&self) -> bool { - *self == BITFRAMESDD_A::SDD00100 - } - #[doc = "Checks if the value of the field is `SDD01000`"] - #[inline(always)] - pub fn is_sdd01000(&self) -> bool { - *self == BITFRAMESDD_A::SDD01000 - } - #[doc = "Checks if the value of the field is `SDD10000`"] - #[inline(always)] - pub fn is_sdd10000(&self) -> bool { - *self == BITFRAMESDD_A::SDD10000 - } -} -#[doc = "Field `BITFRAMESDD` writer - Bit frame SDD as defined by the b5:b1 of byte 1 in SENS_RES response in the NFC Forum, NFC Digital Protocol Technical Specification"] -pub type BITFRAMESDD_W<'a, const O: u8> = - crate::FieldWriter<'a, u32, SENSRES_SPEC, u8, BITFRAMESDD_A, 5, O>; -impl<'a, const O: u8> BITFRAMESDD_W<'a, O> { - #[doc = "SDD pattern 00000"] - #[inline(always)] - pub fn sdd00000(self) -> &'a mut W { - self.variant(BITFRAMESDD_A::SDD00000) - } - #[doc = "SDD pattern 00001"] - #[inline(always)] - pub fn sdd00001(self) -> &'a mut W { - self.variant(BITFRAMESDD_A::SDD00001) - } - #[doc = "SDD pattern 00010"] - #[inline(always)] - pub fn sdd00010(self) -> &'a mut W { - self.variant(BITFRAMESDD_A::SDD00010) - } - #[doc = "SDD pattern 00100"] - #[inline(always)] - pub fn sdd00100(self) -> &'a mut W { - self.variant(BITFRAMESDD_A::SDD00100) - } - #[doc = "SDD pattern 01000"] - #[inline(always)] - pub fn sdd01000(self) -> &'a mut W { - self.variant(BITFRAMESDD_A::SDD01000) - } - #[doc = "SDD pattern 10000"] - #[inline(always)] - pub fn sdd10000(self) -> &'a mut W { - self.variant(BITFRAMESDD_A::SDD10000) - } -} -#[doc = "Field `RFU5` reader - Reserved for future use. Shall be 0."] -pub type RFU5_R = crate::BitReader; -#[doc = "Field `RFU5` writer - Reserved for future use. Shall be 0."] -pub type RFU5_W<'a, const O: u8> = crate::BitWriter<'a, u32, SENSRES_SPEC, bool, O>; -#[doc = "Field `NFCIDSIZE` reader - NFCID1 size. This value is used by the Auto collision resolution engine."] -pub type NFCIDSIZE_R = crate::FieldReader; -#[doc = "NFCID1 size. This value is used by the Auto collision resolution engine.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -#[repr(u8)] -pub enum NFCIDSIZE_A { - #[doc = "0: NFCID1 size: single (4 bytes)"] - NFCID1SINGLE = 0, - #[doc = "1: NFCID1 size: double (7 bytes)"] - NFCID1DOUBLE = 1, - #[doc = "2: NFCID1 size: triple (10 bytes)"] - NFCID1TRIPLE = 2, -} -impl From for u8 { - #[inline(always)] - fn from(variant: NFCIDSIZE_A) -> Self { - variant as _ - } -} -impl NFCIDSIZE_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> Option { - match self.bits { - 0 => Some(NFCIDSIZE_A::NFCID1SINGLE), - 1 => Some(NFCIDSIZE_A::NFCID1DOUBLE), - 2 => Some(NFCIDSIZE_A::NFCID1TRIPLE), - _ => None, - } - } - #[doc = "Checks if the value of the field is `NFCID1SINGLE`"] - #[inline(always)] - pub fn is_nfcid1single(&self) -> bool { - *self == NFCIDSIZE_A::NFCID1SINGLE - } - #[doc = "Checks if the value of the field is `NFCID1DOUBLE`"] - #[inline(always)] - pub fn is_nfcid1double(&self) -> bool { - *self == NFCIDSIZE_A::NFCID1DOUBLE - } - #[doc = "Checks if the value of the field is `NFCID1TRIPLE`"] - #[inline(always)] - pub fn is_nfcid1triple(&self) -> bool { - *self == NFCIDSIZE_A::NFCID1TRIPLE - } -} -#[doc = "Field `NFCIDSIZE` writer - NFCID1 size. This value is used by the Auto collision resolution engine."] -pub type NFCIDSIZE_W<'a, const O: u8> = - crate::FieldWriter<'a, u32, SENSRES_SPEC, u8, NFCIDSIZE_A, 2, O>; -impl<'a, const O: u8> NFCIDSIZE_W<'a, O> { - #[doc = "NFCID1 size: single (4 bytes)"] - #[inline(always)] - pub fn nfcid1single(self) -> &'a mut W { - self.variant(NFCIDSIZE_A::NFCID1SINGLE) - } - #[doc = "NFCID1 size: double (7 bytes)"] - #[inline(always)] - pub fn nfcid1double(self) -> &'a mut W { - self.variant(NFCIDSIZE_A::NFCID1DOUBLE) - } - #[doc = "NFCID1 size: triple (10 bytes)"] - #[inline(always)] - pub fn nfcid1triple(self) -> &'a mut W { - self.variant(NFCIDSIZE_A::NFCID1TRIPLE) - } -} -#[doc = "Field `PLATFCONFIG` reader - Tag platform configuration as defined by the b4:b1 of byte 2 in SENS_RES response in the NFC Forum, NFC Digital Protocol Technical Specification"] -pub type PLATFCONFIG_R = crate::FieldReader; -#[doc = "Field `PLATFCONFIG` writer - Tag platform configuration as defined by the b4:b1 of byte 2 in SENS_RES response in the NFC Forum, NFC Digital Protocol Technical Specification"] -pub type PLATFCONFIG_W<'a, const O: u8> = crate::FieldWriter<'a, u32, SENSRES_SPEC, u8, u8, 4, O>; -#[doc = "Field `RFU74` reader - Reserved for future use. Shall be 0."] -pub type RFU74_R = crate::FieldReader; -#[doc = "Field `RFU74` writer - Reserved for future use. Shall be 0."] -pub type RFU74_W<'a, const O: u8> = crate::FieldWriter<'a, u32, SENSRES_SPEC, u8, u8, 4, O>; -impl R { - #[doc = "Bits 0:4 - Bit frame SDD as defined by the b5:b1 of byte 1 in SENS_RES response in the NFC Forum, NFC Digital Protocol Technical Specification"] - #[inline(always)] - pub fn bitframesdd(&self) -> BITFRAMESDD_R { - BITFRAMESDD_R::new((self.bits & 0x1f) as u8) - } - #[doc = "Bit 5 - Reserved for future use. Shall be 0."] - #[inline(always)] - pub fn rfu5(&self) -> RFU5_R { - RFU5_R::new(((self.bits >> 5) & 1) != 0) - } - #[doc = "Bits 6:7 - NFCID1 size. This value is used by the Auto collision resolution engine."] - #[inline(always)] - pub fn nfcidsize(&self) -> NFCIDSIZE_R { - NFCIDSIZE_R::new(((self.bits >> 6) & 3) as u8) - } - #[doc = "Bits 8:11 - Tag platform configuration as defined by the b4:b1 of byte 2 in SENS_RES response in the NFC Forum, NFC Digital Protocol Technical Specification"] - #[inline(always)] - pub fn platfconfig(&self) -> PLATFCONFIG_R { - PLATFCONFIG_R::new(((self.bits >> 8) & 0x0f) as u8) - } - #[doc = "Bits 12:15 - Reserved for future use. Shall be 0."] - #[inline(always)] - pub fn rfu74(&self) -> RFU74_R { - RFU74_R::new(((self.bits >> 12) & 0x0f) as u8) - } -} -impl W { - #[doc = "Bits 0:4 - Bit frame SDD as defined by the b5:b1 of byte 1 in SENS_RES response in the NFC Forum, NFC Digital Protocol Technical Specification"] - #[inline(always)] - #[must_use] - pub fn bitframesdd(&mut self) -> BITFRAMESDD_W<0> { - BITFRAMESDD_W::new(self) - } - #[doc = "Bit 5 - Reserved for future use. Shall be 0."] - #[inline(always)] - #[must_use] - pub fn rfu5(&mut self) -> RFU5_W<5> { - RFU5_W::new(self) - } - #[doc = "Bits 6:7 - NFCID1 size. This value is used by the Auto collision resolution engine."] - #[inline(always)] - #[must_use] - pub fn nfcidsize(&mut self) -> NFCIDSIZE_W<6> { - NFCIDSIZE_W::new(self) - } - #[doc = "Bits 8:11 - Tag platform configuration as defined by the b4:b1 of byte 2 in SENS_RES response in the NFC Forum, NFC Digital Protocol Technical Specification"] - #[inline(always)] - #[must_use] - pub fn platfconfig(&mut self) -> PLATFCONFIG_W<8> { - PLATFCONFIG_W::new(self) - } - #[doc = "Bits 12:15 - Reserved for future use. Shall be 0."] - #[inline(always)] - #[must_use] - pub fn rfu74(&mut self) -> RFU74_W<12> { - RFU74_W::new(self) - } - #[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 = "NFC-A SENS_RES auto-response settings\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 [sensres](index.html) module"] -pub struct SENSRES_SPEC; -impl crate::RegisterSpec for SENSRES_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [sensres::R](R) reader structure"] -impl crate::Readable for SENSRES_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [sensres::W](W) writer structure"] -impl crate::Writable for SENSRES_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets SENSRES to value 0x01"] -impl crate::Resettable for SENSRES_SPEC { - const RESET_VALUE: Self::Ux = 0x01; -} diff --git a/down-the-stack/dk_pac/src/nfct/shorts.rs b/down-the-stack/dk_pac/src/nfct/shorts.rs deleted file mode 100644 index 7fbe6cf..0000000 --- a/down-the-stack/dk_pac/src/nfct/shorts.rs +++ /dev/null @@ -1,189 +0,0 @@ -#[doc = "Register `SHORTS` 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 `SHORTS` 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 `FIELDDETECTED_ACTIVATE` reader - Shortcut between event FIELDDETECTED and task ACTIVATE"] -pub type FIELDDETECTED_ACTIVATE_R = crate::BitReader; -#[doc = "Shortcut between event FIELDDETECTED and task ACTIVATE\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum FIELDDETECTED_ACTIVATE_A { - #[doc = "0: Disable shortcut"] - DISABLED = 0, - #[doc = "1: Enable shortcut"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: FIELDDETECTED_ACTIVATE_A) -> Self { - variant as u8 != 0 - } -} -impl FIELDDETECTED_ACTIVATE_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> FIELDDETECTED_ACTIVATE_A { - match self.bits { - false => FIELDDETECTED_ACTIVATE_A::DISABLED, - true => FIELDDETECTED_ACTIVATE_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == FIELDDETECTED_ACTIVATE_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == FIELDDETECTED_ACTIVATE_A::ENABLED - } -} -#[doc = "Field `FIELDDETECTED_ACTIVATE` writer - Shortcut between event FIELDDETECTED and task ACTIVATE"] -pub type FIELDDETECTED_ACTIVATE_W<'a, const O: u8> = - crate::BitWriter<'a, u32, SHORTS_SPEC, FIELDDETECTED_ACTIVATE_A, O>; -impl<'a, const O: u8> FIELDDETECTED_ACTIVATE_W<'a, O> { - #[doc = "Disable shortcut"] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(FIELDDETECTED_ACTIVATE_A::DISABLED) - } - #[doc = "Enable shortcut"] - #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(FIELDDETECTED_ACTIVATE_A::ENABLED) - } -} -#[doc = "Field `FIELDLOST_SENSE` reader - Shortcut between event FIELDLOST and task SENSE"] -pub type FIELDLOST_SENSE_R = crate::BitReader; -#[doc = "Shortcut between event FIELDLOST and task SENSE\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum FIELDLOST_SENSE_A { - #[doc = "0: Disable shortcut"] - DISABLED = 0, - #[doc = "1: Enable shortcut"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: FIELDLOST_SENSE_A) -> Self { - variant as u8 != 0 - } -} -impl FIELDLOST_SENSE_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> FIELDLOST_SENSE_A { - match self.bits { - false => FIELDLOST_SENSE_A::DISABLED, - true => FIELDLOST_SENSE_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == FIELDLOST_SENSE_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == FIELDLOST_SENSE_A::ENABLED - } -} -#[doc = "Field `FIELDLOST_SENSE` writer - Shortcut between event FIELDLOST and task SENSE"] -pub type FIELDLOST_SENSE_W<'a, const O: u8> = - crate::BitWriter<'a, u32, SHORTS_SPEC, FIELDLOST_SENSE_A, O>; -impl<'a, const O: u8> FIELDLOST_SENSE_W<'a, O> { - #[doc = "Disable shortcut"] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(FIELDLOST_SENSE_A::DISABLED) - } - #[doc = "Enable shortcut"] - #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(FIELDLOST_SENSE_A::ENABLED) - } -} -impl R { - #[doc = "Bit 0 - Shortcut between event FIELDDETECTED and task ACTIVATE"] - #[inline(always)] - pub fn fielddetected_activate(&self) -> FIELDDETECTED_ACTIVATE_R { - FIELDDETECTED_ACTIVATE_R::new((self.bits & 1) != 0) - } - #[doc = "Bit 1 - Shortcut between event FIELDLOST and task SENSE"] - #[inline(always)] - pub fn fieldlost_sense(&self) -> FIELDLOST_SENSE_R { - FIELDLOST_SENSE_R::new(((self.bits >> 1) & 1) != 0) - } -} -impl W { - #[doc = "Bit 0 - Shortcut between event FIELDDETECTED and task ACTIVATE"] - #[inline(always)] - #[must_use] - pub fn fielddetected_activate(&mut self) -> FIELDDETECTED_ACTIVATE_W<0> { - FIELDDETECTED_ACTIVATE_W::new(self) - } - #[doc = "Bit 1 - Shortcut between event FIELDLOST and task SENSE"] - #[inline(always)] - #[must_use] - pub fn fieldlost_sense(&mut self) -> FIELDLOST_SENSE_W<1> { - FIELDLOST_SENSE_W::new(self) - } - #[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 = "Shortcuts between local events and tasks\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 [shorts](index.html) module"] -pub struct SHORTS_SPEC; -impl crate::RegisterSpec for SHORTS_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [shorts::R](R) reader structure"] -impl crate::Readable for SHORTS_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [shorts::W](W) writer structure"] -impl crate::Writable for SHORTS_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets SHORTS to value 0"] -impl crate::Resettable for SHORTS_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/nfct/tasks_activate.rs b/down-the-stack/dk_pac/src/nfct/tasks_activate.rs deleted file mode 100644 index d109b58..0000000 --- a/down-the-stack/dk_pac/src/nfct/tasks_activate.rs +++ /dev/null @@ -1,72 +0,0 @@ -#[doc = "Register `TASKS_ACTIVATE` 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 = "Activate NFC peripheral for incoming and outgoing frames, change state to activated\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum TASKS_ACTIVATE_AW { - #[doc = "1: Trigger task"] - TRIGGER = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: TASKS_ACTIVATE_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `TASKS_ACTIVATE` writer - Activate NFC peripheral for incoming and outgoing frames, change state to activated"] -pub type TASKS_ACTIVATE_W<'a, const O: u8> = - crate::BitWriter<'a, u32, TASKS_ACTIVATE_SPEC, TASKS_ACTIVATE_AW, O>; -impl<'a, const O: u8> TASKS_ACTIVATE_W<'a, O> { - #[doc = "Trigger task"] - #[inline(always)] - pub fn trigger(self) -> &'a mut W { - self.variant(TASKS_ACTIVATE_AW::TRIGGER) - } -} -impl W { - #[doc = "Bit 0 - Activate NFC peripheral for incoming and outgoing frames, change state to activated"] - #[inline(always)] - #[must_use] - pub fn tasks_activate(&mut self) -> TASKS_ACTIVATE_W<0> { - TASKS_ACTIVATE_W::new(self) - } - #[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 = "Activate NFC peripheral for incoming and outgoing frames, change state to activated\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 [tasks_activate](index.html) module"] -pub struct TASKS_ACTIVATE_SPEC; -impl crate::RegisterSpec for TASKS_ACTIVATE_SPEC { - type Ux = u32; -} -#[doc = "`write(|w| ..)` method takes [tasks_activate::W](W) writer structure"] -impl crate::Writable for TASKS_ACTIVATE_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets TASKS_ACTIVATE to value 0"] -impl crate::Resettable for TASKS_ACTIVATE_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/nfct/tasks_disable.rs b/down-the-stack/dk_pac/src/nfct/tasks_disable.rs deleted file mode 100644 index c1d0023..0000000 --- a/down-the-stack/dk_pac/src/nfct/tasks_disable.rs +++ /dev/null @@ -1,72 +0,0 @@ -#[doc = "Register `TASKS_DISABLE` 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 = "Disable NFC peripheral\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum TASKS_DISABLE_AW { - #[doc = "1: Trigger task"] - TRIGGER = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: TASKS_DISABLE_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `TASKS_DISABLE` writer - Disable NFC peripheral"] -pub type TASKS_DISABLE_W<'a, const O: u8> = - crate::BitWriter<'a, u32, TASKS_DISABLE_SPEC, TASKS_DISABLE_AW, O>; -impl<'a, const O: u8> TASKS_DISABLE_W<'a, O> { - #[doc = "Trigger task"] - #[inline(always)] - pub fn trigger(self) -> &'a mut W { - self.variant(TASKS_DISABLE_AW::TRIGGER) - } -} -impl W { - #[doc = "Bit 0 - Disable NFC peripheral"] - #[inline(always)] - #[must_use] - pub fn tasks_disable(&mut self) -> TASKS_DISABLE_W<0> { - TASKS_DISABLE_W::new(self) - } - #[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 = "Disable NFC peripheral\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 [tasks_disable](index.html) module"] -pub struct TASKS_DISABLE_SPEC; -impl crate::RegisterSpec for TASKS_DISABLE_SPEC { - type Ux = u32; -} -#[doc = "`write(|w| ..)` method takes [tasks_disable::W](W) writer structure"] -impl crate::Writable for TASKS_DISABLE_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets TASKS_DISABLE to value 0"] -impl crate::Resettable for TASKS_DISABLE_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/nfct/tasks_enablerxdata.rs b/down-the-stack/dk_pac/src/nfct/tasks_enablerxdata.rs deleted file mode 100644 index 2c6f0d9..0000000 --- a/down-the-stack/dk_pac/src/nfct/tasks_enablerxdata.rs +++ /dev/null @@ -1,72 +0,0 @@ -#[doc = "Register `TASKS_ENABLERXDATA` 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 = "Initializes the EasyDMA for receive.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum TASKS_ENABLERXDATA_AW { - #[doc = "1: Trigger task"] - TRIGGER = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: TASKS_ENABLERXDATA_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `TASKS_ENABLERXDATA` writer - Initializes the EasyDMA for receive."] -pub type TASKS_ENABLERXDATA_W<'a, const O: u8> = - crate::BitWriter<'a, u32, TASKS_ENABLERXDATA_SPEC, TASKS_ENABLERXDATA_AW, O>; -impl<'a, const O: u8> TASKS_ENABLERXDATA_W<'a, O> { - #[doc = "Trigger task"] - #[inline(always)] - pub fn trigger(self) -> &'a mut W { - self.variant(TASKS_ENABLERXDATA_AW::TRIGGER) - } -} -impl W { - #[doc = "Bit 0 - Initializes the EasyDMA for receive."] - #[inline(always)] - #[must_use] - pub fn tasks_enablerxdata(&mut self) -> TASKS_ENABLERXDATA_W<0> { - TASKS_ENABLERXDATA_W::new(self) - } - #[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 = "Initializes the EasyDMA for receive.\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 [tasks_enablerxdata](index.html) module"] -pub struct TASKS_ENABLERXDATA_SPEC; -impl crate::RegisterSpec for TASKS_ENABLERXDATA_SPEC { - type Ux = u32; -} -#[doc = "`write(|w| ..)` method takes [tasks_enablerxdata::W](W) writer structure"] -impl crate::Writable for TASKS_ENABLERXDATA_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets TASKS_ENABLERXDATA to value 0"] -impl crate::Resettable for TASKS_ENABLERXDATA_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/nfct/tasks_goidle.rs b/down-the-stack/dk_pac/src/nfct/tasks_goidle.rs deleted file mode 100644 index b3f211a..0000000 --- a/down-the-stack/dk_pac/src/nfct/tasks_goidle.rs +++ /dev/null @@ -1,72 +0,0 @@ -#[doc = "Register `TASKS_GOIDLE` 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 = "Force state machine to IDLE state\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum TASKS_GOIDLE_AW { - #[doc = "1: Trigger task"] - TRIGGER = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: TASKS_GOIDLE_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `TASKS_GOIDLE` writer - Force state machine to IDLE state"] -pub type TASKS_GOIDLE_W<'a, const O: u8> = - crate::BitWriter<'a, u32, TASKS_GOIDLE_SPEC, TASKS_GOIDLE_AW, O>; -impl<'a, const O: u8> TASKS_GOIDLE_W<'a, O> { - #[doc = "Trigger task"] - #[inline(always)] - pub fn trigger(self) -> &'a mut W { - self.variant(TASKS_GOIDLE_AW::TRIGGER) - } -} -impl W { - #[doc = "Bit 0 - Force state machine to IDLE state"] - #[inline(always)] - #[must_use] - pub fn tasks_goidle(&mut self) -> TASKS_GOIDLE_W<0> { - TASKS_GOIDLE_W::new(self) - } - #[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 = "Force state machine to IDLE state\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 [tasks_goidle](index.html) module"] -pub struct TASKS_GOIDLE_SPEC; -impl crate::RegisterSpec for TASKS_GOIDLE_SPEC { - type Ux = u32; -} -#[doc = "`write(|w| ..)` method takes [tasks_goidle::W](W) writer structure"] -impl crate::Writable for TASKS_GOIDLE_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets TASKS_GOIDLE to value 0"] -impl crate::Resettable for TASKS_GOIDLE_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/nfct/tasks_gosleep.rs b/down-the-stack/dk_pac/src/nfct/tasks_gosleep.rs deleted file mode 100644 index edcbc0d..0000000 --- a/down-the-stack/dk_pac/src/nfct/tasks_gosleep.rs +++ /dev/null @@ -1,72 +0,0 @@ -#[doc = "Register `TASKS_GOSLEEP` 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 = "Force state machine to SLEEP_A state\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum TASKS_GOSLEEP_AW { - #[doc = "1: Trigger task"] - TRIGGER = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: TASKS_GOSLEEP_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `TASKS_GOSLEEP` writer - Force state machine to SLEEP_A state"] -pub type TASKS_GOSLEEP_W<'a, const O: u8> = - crate::BitWriter<'a, u32, TASKS_GOSLEEP_SPEC, TASKS_GOSLEEP_AW, O>; -impl<'a, const O: u8> TASKS_GOSLEEP_W<'a, O> { - #[doc = "Trigger task"] - #[inline(always)] - pub fn trigger(self) -> &'a mut W { - self.variant(TASKS_GOSLEEP_AW::TRIGGER) - } -} -impl W { - #[doc = "Bit 0 - Force state machine to SLEEP_A state"] - #[inline(always)] - #[must_use] - pub fn tasks_gosleep(&mut self) -> TASKS_GOSLEEP_W<0> { - TASKS_GOSLEEP_W::new(self) - } - #[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 = "Force state machine to SLEEP_A state\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 [tasks_gosleep](index.html) module"] -pub struct TASKS_GOSLEEP_SPEC; -impl crate::RegisterSpec for TASKS_GOSLEEP_SPEC { - type Ux = u32; -} -#[doc = "`write(|w| ..)` method takes [tasks_gosleep::W](W) writer structure"] -impl crate::Writable for TASKS_GOSLEEP_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets TASKS_GOSLEEP to value 0"] -impl crate::Resettable for TASKS_GOSLEEP_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/nfct/tasks_sense.rs b/down-the-stack/dk_pac/src/nfct/tasks_sense.rs deleted file mode 100644 index 542bcb8..0000000 --- a/down-the-stack/dk_pac/src/nfct/tasks_sense.rs +++ /dev/null @@ -1,72 +0,0 @@ -#[doc = "Register `TASKS_SENSE` 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 = "Enable NFC sense field mode, change state to sense mode\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum TASKS_SENSE_AW { - #[doc = "1: Trigger task"] - TRIGGER = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: TASKS_SENSE_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `TASKS_SENSE` writer - Enable NFC sense field mode, change state to sense mode"] -pub type TASKS_SENSE_W<'a, const O: u8> = - crate::BitWriter<'a, u32, TASKS_SENSE_SPEC, TASKS_SENSE_AW, O>; -impl<'a, const O: u8> TASKS_SENSE_W<'a, O> { - #[doc = "Trigger task"] - #[inline(always)] - pub fn trigger(self) -> &'a mut W { - self.variant(TASKS_SENSE_AW::TRIGGER) - } -} -impl W { - #[doc = "Bit 0 - Enable NFC sense field mode, change state to sense mode"] - #[inline(always)] - #[must_use] - pub fn tasks_sense(&mut self) -> TASKS_SENSE_W<0> { - TASKS_SENSE_W::new(self) - } - #[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 = "Enable NFC sense field mode, change state to sense mode\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 [tasks_sense](index.html) module"] -pub struct TASKS_SENSE_SPEC; -impl crate::RegisterSpec for TASKS_SENSE_SPEC { - type Ux = u32; -} -#[doc = "`write(|w| ..)` method takes [tasks_sense::W](W) writer structure"] -impl crate::Writable for TASKS_SENSE_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets TASKS_SENSE to value 0"] -impl crate::Resettable for TASKS_SENSE_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/nfct/tasks_starttx.rs b/down-the-stack/dk_pac/src/nfct/tasks_starttx.rs deleted file mode 100644 index 2e6fa8f..0000000 --- a/down-the-stack/dk_pac/src/nfct/tasks_starttx.rs +++ /dev/null @@ -1,72 +0,0 @@ -#[doc = "Register `TASKS_STARTTX` 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 = "Start transmission of a outgoing frame, change state to transmit\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum TASKS_STARTTX_AW { - #[doc = "1: Trigger task"] - TRIGGER = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: TASKS_STARTTX_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `TASKS_STARTTX` writer - Start transmission of a outgoing frame, change state to transmit"] -pub type TASKS_STARTTX_W<'a, const O: u8> = - crate::BitWriter<'a, u32, TASKS_STARTTX_SPEC, TASKS_STARTTX_AW, O>; -impl<'a, const O: u8> TASKS_STARTTX_W<'a, O> { - #[doc = "Trigger task"] - #[inline(always)] - pub fn trigger(self) -> &'a mut W { - self.variant(TASKS_STARTTX_AW::TRIGGER) - } -} -impl W { - #[doc = "Bit 0 - Start transmission of a outgoing frame, change state to transmit"] - #[inline(always)] - #[must_use] - pub fn tasks_starttx(&mut self) -> TASKS_STARTTX_W<0> { - TASKS_STARTTX_W::new(self) - } - #[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 = "Start transmission of a outgoing frame, change state to transmit\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 [tasks_starttx](index.html) module"] -pub struct TASKS_STARTTX_SPEC; -impl crate::RegisterSpec for TASKS_STARTTX_SPEC { - type Ux = u32; -} -#[doc = "`write(|w| ..)` method takes [tasks_starttx::W](W) writer structure"] -impl crate::Writable for TASKS_STARTTX_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets TASKS_STARTTX to value 0"] -impl crate::Resettable for TASKS_STARTTX_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/nfct/txd.rs b/down-the-stack/dk_pac/src/nfct/txd.rs deleted file mode 100644 index 21bbb0e..0000000 --- a/down-the-stack/dk_pac/src/nfct/txd.rs +++ /dev/null @@ -1,16 +0,0 @@ -#[doc = r"Register block"] -#[repr(C)] -pub struct TXD { - #[doc = "0x00 - Configuration of outgoing frames"] - pub frameconfig: FRAMECONFIG, - #[doc = "0x04 - Size of outgoing frame"] - pub amount: AMOUNT, -} -#[doc = "FRAMECONFIG (rw) register accessor: an alias for `Reg`"] -pub type FRAMECONFIG = crate::Reg; -#[doc = "Configuration of outgoing frames"] -pub mod frameconfig; -#[doc = "AMOUNT (rw) register accessor: an alias for `Reg`"] -pub type AMOUNT = crate::Reg; -#[doc = "Size of outgoing frame"] -pub mod amount; diff --git a/down-the-stack/dk_pac/src/nfct/txd/amount.rs b/down-the-stack/dk_pac/src/nfct/txd/amount.rs deleted file mode 100644 index 1ed9216..0000000 --- a/down-the-stack/dk_pac/src/nfct/txd/amount.rs +++ /dev/null @@ -1,95 +0,0 @@ -#[doc = "Register `AMOUNT` 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 `AMOUNT` 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 `TXDATABITS` reader - Number of bits in the last or first byte read from RAM that shall be included in the frame (excluding parity bit)."] -pub type TXDATABITS_R = crate::FieldReader; -#[doc = "Field `TXDATABITS` writer - Number of bits in the last or first byte read from RAM that shall be included in the frame (excluding parity bit)."] -pub type TXDATABITS_W<'a, const O: u8> = crate::FieldWriter<'a, u32, AMOUNT_SPEC, u8, u8, 3, O>; -#[doc = "Field `TXDATABYTES` reader - Number of complete bytes that shall be included in the frame, excluding CRC, parity and framing"] -pub type TXDATABYTES_R = crate::FieldReader; -#[doc = "Field `TXDATABYTES` writer - Number of complete bytes that shall be included in the frame, excluding CRC, parity and framing"] -pub type TXDATABYTES_W<'a, const O: u8> = crate::FieldWriter<'a, u32, AMOUNT_SPEC, u16, u16, 9, O>; -impl R { - #[doc = "Bits 0:2 - Number of bits in the last or first byte read from RAM that shall be included in the frame (excluding parity bit)."] - #[inline(always)] - pub fn txdatabits(&self) -> TXDATABITS_R { - TXDATABITS_R::new((self.bits & 7) as u8) - } - #[doc = "Bits 3:11 - Number of complete bytes that shall be included in the frame, excluding CRC, parity and framing"] - #[inline(always)] - pub fn txdatabytes(&self) -> TXDATABYTES_R { - TXDATABYTES_R::new(((self.bits >> 3) & 0x01ff) as u16) - } -} -impl W { - #[doc = "Bits 0:2 - Number of bits in the last or first byte read from RAM that shall be included in the frame (excluding parity bit)."] - #[inline(always)] - #[must_use] - pub fn txdatabits(&mut self) -> TXDATABITS_W<0> { - TXDATABITS_W::new(self) - } - #[doc = "Bits 3:11 - Number of complete bytes that shall be included in the frame, excluding CRC, parity and framing"] - #[inline(always)] - #[must_use] - pub fn txdatabytes(&mut self) -> TXDATABYTES_W<3> { - TXDATABYTES_W::new(self) - } - #[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 = "Size of outgoing frame\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 [amount](index.html) module"] -pub struct AMOUNT_SPEC; -impl crate::RegisterSpec for AMOUNT_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [amount::R](R) reader structure"] -impl crate::Readable for AMOUNT_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [amount::W](W) writer structure"] -impl crate::Writable for AMOUNT_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets AMOUNT to value 0"] -impl crate::Resettable for AMOUNT_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/nfct/txd/frameconfig.rs b/down-the-stack/dk_pac/src/nfct/txd/frameconfig.rs deleted file mode 100644 index db34b9d..0000000 --- a/down-the-stack/dk_pac/src/nfct/txd/frameconfig.rs +++ /dev/null @@ -1,310 +0,0 @@ -#[doc = "Register `FRAMECONFIG` 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 `FRAMECONFIG` 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 `PARITY` reader - Adding parity or not in the frame"] -pub type PARITY_R = crate::BitReader; -#[doc = "Adding parity or not in the frame\n\nValue on reset: 1"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PARITY_A { - #[doc = "0: Parity is not added in TX frames"] - NO_PARITY = 0, - #[doc = "1: Parity is added TX frames"] - PARITY = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PARITY_A) -> Self { - variant as u8 != 0 - } -} -impl PARITY_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> PARITY_A { - match self.bits { - false => PARITY_A::NO_PARITY, - true => PARITY_A::PARITY, - } - } - #[doc = "Checks if the value of the field is `NO_PARITY`"] - #[inline(always)] - pub fn is_no_parity(&self) -> bool { - *self == PARITY_A::NO_PARITY - } - #[doc = "Checks if the value of the field is `PARITY`"] - #[inline(always)] - pub fn is_parity(&self) -> bool { - *self == PARITY_A::PARITY - } -} -#[doc = "Field `PARITY` writer - Adding parity or not in the frame"] -pub type PARITY_W<'a, const O: u8> = crate::BitWriter<'a, u32, FRAMECONFIG_SPEC, PARITY_A, O>; -impl<'a, const O: u8> PARITY_W<'a, O> { - #[doc = "Parity is not added in TX frames"] - #[inline(always)] - pub fn no_parity(self) -> &'a mut W { - self.variant(PARITY_A::NO_PARITY) - } - #[doc = "Parity is added TX frames"] - #[inline(always)] - pub fn parity(self) -> &'a mut W { - self.variant(PARITY_A::PARITY) - } -} -#[doc = "Field `DISCARDMODE` reader - Discarding unused bits in start or at end of a Frame"] -pub type DISCARDMODE_R = crate::BitReader; -#[doc = "Discarding unused bits in start or at end of a Frame\n\nValue on reset: 1"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum DISCARDMODE_A { - #[doc = "0: Unused bits is discarded at end of frame"] - DISCARD_END = 0, - #[doc = "1: Unused bits is discarded at start of frame"] - DISCARD_START = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: DISCARDMODE_A) -> Self { - variant as u8 != 0 - } -} -impl DISCARDMODE_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> DISCARDMODE_A { - match self.bits { - false => DISCARDMODE_A::DISCARD_END, - true => DISCARDMODE_A::DISCARD_START, - } - } - #[doc = "Checks if the value of the field is `DISCARD_END`"] - #[inline(always)] - pub fn is_discard_end(&self) -> bool { - *self == DISCARDMODE_A::DISCARD_END - } - #[doc = "Checks if the value of the field is `DISCARD_START`"] - #[inline(always)] - pub fn is_discard_start(&self) -> bool { - *self == DISCARDMODE_A::DISCARD_START - } -} -#[doc = "Field `DISCARDMODE` writer - Discarding unused bits in start or at end of a Frame"] -pub type DISCARDMODE_W<'a, const O: u8> = - crate::BitWriter<'a, u32, FRAMECONFIG_SPEC, DISCARDMODE_A, O>; -impl<'a, const O: u8> DISCARDMODE_W<'a, O> { - #[doc = "Unused bits is discarded at end of frame"] - #[inline(always)] - pub fn discard_end(self) -> &'a mut W { - self.variant(DISCARDMODE_A::DISCARD_END) - } - #[doc = "Unused bits is discarded at start of frame"] - #[inline(always)] - pub fn discard_start(self) -> &'a mut W { - self.variant(DISCARDMODE_A::DISCARD_START) - } -} -#[doc = "Field `SOF` reader - Adding SoF or not in TX frames"] -pub type SOF_R = crate::BitReader; -#[doc = "Adding SoF or not in TX frames\n\nValue on reset: 1"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum SOF_A { - #[doc = "0: Start of Frame symbol not added"] - NO_SO_F = 0, - #[doc = "1: Start of Frame symbol added"] - SO_F = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: SOF_A) -> Self { - variant as u8 != 0 - } -} -impl SOF_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> SOF_A { - match self.bits { - false => SOF_A::NO_SO_F, - true => SOF_A::SO_F, - } - } - #[doc = "Checks if the value of the field is `NO_SO_F`"] - #[inline(always)] - pub fn is_no_so_f(&self) -> bool { - *self == SOF_A::NO_SO_F - } - #[doc = "Checks if the value of the field is `SO_F`"] - #[inline(always)] - pub fn is_so_f(&self) -> bool { - *self == SOF_A::SO_F - } -} -#[doc = "Field `SOF` writer - Adding SoF or not in TX frames"] -pub type SOF_W<'a, const O: u8> = crate::BitWriter<'a, u32, FRAMECONFIG_SPEC, SOF_A, O>; -impl<'a, const O: u8> SOF_W<'a, O> { - #[doc = "Start of Frame symbol not added"] - #[inline(always)] - pub fn no_so_f(self) -> &'a mut W { - self.variant(SOF_A::NO_SO_F) - } - #[doc = "Start of Frame symbol added"] - #[inline(always)] - pub fn so_f(self) -> &'a mut W { - self.variant(SOF_A::SO_F) - } -} -#[doc = "Field `CRCMODETX` reader - CRC mode for outgoing frames"] -pub type CRCMODETX_R = crate::BitReader; -#[doc = "CRC mode for outgoing frames\n\nValue on reset: 1"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum CRCMODETX_A { - #[doc = "0: CRC is not added to the frame"] - NO_CRCTX = 0, - #[doc = "1: 16 bit CRC added to the frame based on all the data read from RAM that is used in the frame"] - CRC16TX = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: CRCMODETX_A) -> Self { - variant as u8 != 0 - } -} -impl CRCMODETX_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> CRCMODETX_A { - match self.bits { - false => CRCMODETX_A::NO_CRCTX, - true => CRCMODETX_A::CRC16TX, - } - } - #[doc = "Checks if the value of the field is `NO_CRCTX`"] - #[inline(always)] - pub fn is_no_crctx(&self) -> bool { - *self == CRCMODETX_A::NO_CRCTX - } - #[doc = "Checks if the value of the field is `CRC16TX`"] - #[inline(always)] - pub fn is_crc16tx(&self) -> bool { - *self == CRCMODETX_A::CRC16TX - } -} -#[doc = "Field `CRCMODETX` writer - CRC mode for outgoing frames"] -pub type CRCMODETX_W<'a, const O: u8> = crate::BitWriter<'a, u32, FRAMECONFIG_SPEC, CRCMODETX_A, O>; -impl<'a, const O: u8> CRCMODETX_W<'a, O> { - #[doc = "CRC is not added to the frame"] - #[inline(always)] - pub fn no_crctx(self) -> &'a mut W { - self.variant(CRCMODETX_A::NO_CRCTX) - } - #[doc = "16 bit CRC added to the frame based on all the data read from RAM that is used in the frame"] - #[inline(always)] - pub fn crc16tx(self) -> &'a mut W { - self.variant(CRCMODETX_A::CRC16TX) - } -} -impl R { - #[doc = "Bit 0 - Adding parity or not in the frame"] - #[inline(always)] - pub fn parity(&self) -> PARITY_R { - PARITY_R::new((self.bits & 1) != 0) - } - #[doc = "Bit 1 - Discarding unused bits in start or at end of a Frame"] - #[inline(always)] - pub fn discardmode(&self) -> DISCARDMODE_R { - DISCARDMODE_R::new(((self.bits >> 1) & 1) != 0) - } - #[doc = "Bit 2 - Adding SoF or not in TX frames"] - #[inline(always)] - pub fn sof(&self) -> SOF_R { - SOF_R::new(((self.bits >> 2) & 1) != 0) - } - #[doc = "Bit 4 - CRC mode for outgoing frames"] - #[inline(always)] - pub fn crcmodetx(&self) -> CRCMODETX_R { - CRCMODETX_R::new(((self.bits >> 4) & 1) != 0) - } -} -impl W { - #[doc = "Bit 0 - Adding parity or not in the frame"] - #[inline(always)] - #[must_use] - pub fn parity(&mut self) -> PARITY_W<0> { - PARITY_W::new(self) - } - #[doc = "Bit 1 - Discarding unused bits in start or at end of a Frame"] - #[inline(always)] - #[must_use] - pub fn discardmode(&mut self) -> DISCARDMODE_W<1> { - DISCARDMODE_W::new(self) - } - #[doc = "Bit 2 - Adding SoF or not in TX frames"] - #[inline(always)] - #[must_use] - pub fn sof(&mut self) -> SOF_W<2> { - SOF_W::new(self) - } - #[doc = "Bit 4 - CRC mode for outgoing frames"] - #[inline(always)] - #[must_use] - pub fn crcmodetx(&mut self) -> CRCMODETX_W<4> { - CRCMODETX_W::new(self) - } - #[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 = "Configuration of outgoing frames\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 [frameconfig](index.html) module"] -pub struct FRAMECONFIG_SPEC; -impl crate::RegisterSpec for FRAMECONFIG_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [frameconfig::R](R) reader structure"] -impl crate::Readable for FRAMECONFIG_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [frameconfig::W](W) writer structure"] -impl crate::Writable for FRAMECONFIG_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets FRAMECONFIG to value 0x17"] -impl crate::Resettable for FRAMECONFIG_SPEC { - const RESET_VALUE: Self::Ux = 0x17; -} diff --git a/down-the-stack/dk_pac/src/nvmc.rs b/down-the-stack/dk_pac/src/nvmc.rs deleted file mode 100644 index 15d6831..0000000 --- a/down-the-stack/dk_pac/src/nvmc.rs +++ /dev/null @@ -1,77 +0,0 @@ -#[doc = r"Register block"] -#[repr(C)] -pub struct RegisterBlock { - _reserved0: [u8; 0x0400], - #[doc = "0x400 - Ready flag"] - pub ready: READY, - _reserved1: [u8; 0x0100], - #[doc = "0x504 - Configuration register"] - pub config: CONFIG, - _reserved_2_erasepage: [u8; 0x04], - #[doc = "0x50c - Register for erasing all non-volatile user memory"] - pub eraseall: ERASEALL, - #[doc = "0x510 - Deprecated register - Register for erasing a page in Code area. Equivalent to ERASEPAGE."] - pub erasepcr0: ERASEPCR0, - #[doc = "0x514 - Register for erasing User Information Configuration Registers"] - pub eraseuicr: ERASEUICR, - _reserved6: [u8; 0x28], - #[doc = "0x540 - I-Code cache configuration register."] - pub icachecnf: ICACHECNF, - _reserved7: [u8; 0x04], - #[doc = "0x548 - I-Code cache hit counter."] - pub ihit: IHIT, - #[doc = "0x54c - I-Code cache miss counter."] - pub imiss: IMISS, -} -impl RegisterBlock { - #[doc = "0x508 - Deprecated register - Register for erasing a page in Code area. Equivalent to ERASEPAGE."] - #[inline(always)] - pub const fn erasepcr1(&self) -> &ERASEPCR1 { - unsafe { &*(self as *const Self).cast::().add(1288usize).cast() } - } - #[doc = "0x508 - Register for erasing a page in Code area"] - #[inline(always)] - pub const fn erasepage(&self) -> &ERASEPAGE { - unsafe { &*(self as *const Self).cast::().add(1288usize).cast() } - } -} -#[doc = "READY (r) register accessor: an alias for `Reg`"] -pub type READY = crate::Reg; -#[doc = "Ready flag"] -pub mod ready; -#[doc = "CONFIG (rw) register accessor: an alias for `Reg`"] -pub type CONFIG = crate::Reg; -#[doc = "Configuration register"] -pub mod config; -#[doc = "ERASEPAGE (rw) register accessor: an alias for `Reg`"] -pub type ERASEPAGE = crate::Reg; -#[doc = "Register for erasing a page in Code area"] -pub mod erasepage; -#[doc = "ERASEPCR1 (rw) register accessor: an alias for `Reg`"] -pub type ERASEPCR1 = crate::Reg; -#[doc = "Deprecated register - Register for erasing a page in Code area. Equivalent to ERASEPAGE."] -pub mod erasepcr1; -#[doc = "ERASEALL (rw) register accessor: an alias for `Reg`"] -pub type ERASEALL = crate::Reg; -#[doc = "Register for erasing all non-volatile user memory"] -pub mod eraseall; -#[doc = "ERASEPCR0 (rw) register accessor: an alias for `Reg`"] -pub type ERASEPCR0 = crate::Reg; -#[doc = "Deprecated register - Register for erasing a page in Code area. Equivalent to ERASEPAGE."] -pub mod erasepcr0; -#[doc = "ERASEUICR (rw) register accessor: an alias for `Reg`"] -pub type ERASEUICR = crate::Reg; -#[doc = "Register for erasing User Information Configuration Registers"] -pub mod eraseuicr; -#[doc = "ICACHECNF (rw) register accessor: an alias for `Reg`"] -pub type ICACHECNF = crate::Reg; -#[doc = "I-Code cache configuration register."] -pub mod icachecnf; -#[doc = "IHIT (rw) register accessor: an alias for `Reg`"] -pub type IHIT = crate::Reg; -#[doc = "I-Code cache hit counter."] -pub mod ihit; -#[doc = "IMISS (rw) register accessor: an alias for `Reg`"] -pub type IMISS = crate::Reg; -#[doc = "I-Code cache miss counter."] -pub mod imiss; diff --git a/down-the-stack/dk_pac/src/nvmc/config.rs b/down-the-stack/dk_pac/src/nvmc/config.rs deleted file mode 100644 index bd37f39..0000000 --- a/down-the-stack/dk_pac/src/nvmc/config.rs +++ /dev/null @@ -1,141 +0,0 @@ -#[doc = "Register `CONFIG` 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 `CONFIG` 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 `WEN` reader - Program memory access mode. It is strongly recommended to only activate erase and write modes when they are actively used. Enabling write or erase will invalidate the cache and keep it invalidated."] -pub type WEN_R = crate::FieldReader; -#[doc = "Program memory access mode. It is strongly recommended to only activate erase and write modes when they are actively used. Enabling write or erase will invalidate the cache and keep it invalidated.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -#[repr(u8)] -pub enum WEN_A { - #[doc = "0: Read only access"] - REN = 0, - #[doc = "1: Write Enabled"] - WEN = 1, - #[doc = "2: Erase enabled"] - EEN = 2, -} -impl From for u8 { - #[inline(always)] - fn from(variant: WEN_A) -> Self { - variant as _ - } -} -impl WEN_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> Option { - match self.bits { - 0 => Some(WEN_A::REN), - 1 => Some(WEN_A::WEN), - 2 => Some(WEN_A::EEN), - _ => None, - } - } - #[doc = "Checks if the value of the field is `REN`"] - #[inline(always)] - pub fn is_ren(&self) -> bool { - *self == WEN_A::REN - } - #[doc = "Checks if the value of the field is `WEN`"] - #[inline(always)] - pub fn is_wen(&self) -> bool { - *self == WEN_A::WEN - } - #[doc = "Checks if the value of the field is `EEN`"] - #[inline(always)] - pub fn is_een(&self) -> bool { - *self == WEN_A::EEN - } -} -#[doc = "Field `WEN` writer - Program memory access mode. It is strongly recommended to only activate erase and write modes when they are actively used. Enabling write or erase will invalidate the cache and keep it invalidated."] -pub type WEN_W<'a, const O: u8> = crate::FieldWriter<'a, u32, CONFIG_SPEC, u8, WEN_A, 2, O>; -impl<'a, const O: u8> WEN_W<'a, O> { - #[doc = "Read only access"] - #[inline(always)] - pub fn ren(self) -> &'a mut W { - self.variant(WEN_A::REN) - } - #[doc = "Write Enabled"] - #[inline(always)] - pub fn wen(self) -> &'a mut W { - self.variant(WEN_A::WEN) - } - #[doc = "Erase enabled"] - #[inline(always)] - pub fn een(self) -> &'a mut W { - self.variant(WEN_A::EEN) - } -} -impl R { - #[doc = "Bits 0:1 - Program memory access mode. It is strongly recommended to only activate erase and write modes when they are actively used. Enabling write or erase will invalidate the cache and keep it invalidated."] - #[inline(always)] - pub fn wen(&self) -> WEN_R { - WEN_R::new((self.bits & 3) as u8) - } -} -impl W { - #[doc = "Bits 0:1 - Program memory access mode. It is strongly recommended to only activate erase and write modes when they are actively used. Enabling write or erase will invalidate the cache and keep it invalidated."] - #[inline(always)] - #[must_use] - pub fn wen(&mut self) -> WEN_W<0> { - WEN_W::new(self) - } - #[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 = "Configuration register\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 [config](index.html) module"] -pub struct CONFIG_SPEC; -impl crate::RegisterSpec for CONFIG_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [config::R](R) reader structure"] -impl crate::Readable for CONFIG_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [config::W](W) writer structure"] -impl crate::Writable for 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 CONFIG to value 0"] -impl crate::Resettable for CONFIG_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/nvmc/eraseall.rs b/down-the-stack/dk_pac/src/nvmc/eraseall.rs deleted file mode 100644 index c49c2b1..0000000 --- a/down-the-stack/dk_pac/src/nvmc/eraseall.rs +++ /dev/null @@ -1,126 +0,0 @@ -#[doc = "Register `ERASEALL` 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 `ERASEALL` 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 `ERASEALL` reader - Erase all non-volatile memory including UICR registers. Note that code erase has to be enabled by CONFIG.EEN before the UICR can be erased."] -pub type ERASEALL_R = crate::BitReader; -#[doc = "Erase all non-volatile memory including UICR registers. Note that code erase has to be enabled by CONFIG.EEN before the UICR can be erased.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum ERASEALL_A { - #[doc = "0: No operation"] - NO_OPERATION = 0, - #[doc = "1: Start chip erase"] - ERASE = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: ERASEALL_A) -> Self { - variant as u8 != 0 - } -} -impl ERASEALL_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> ERASEALL_A { - match self.bits { - false => ERASEALL_A::NO_OPERATION, - true => ERASEALL_A::ERASE, - } - } - #[doc = "Checks if the value of the field is `NO_OPERATION`"] - #[inline(always)] - pub fn is_no_operation(&self) -> bool { - *self == ERASEALL_A::NO_OPERATION - } - #[doc = "Checks if the value of the field is `ERASE`"] - #[inline(always)] - pub fn is_erase(&self) -> bool { - *self == ERASEALL_A::ERASE - } -} -#[doc = "Field `ERASEALL` writer - Erase all non-volatile memory including UICR registers. Note that code erase has to be enabled by CONFIG.EEN before the UICR can be erased."] -pub type ERASEALL_W<'a, const O: u8> = crate::BitWriter<'a, u32, ERASEALL_SPEC, ERASEALL_A, O>; -impl<'a, const O: u8> ERASEALL_W<'a, O> { - #[doc = "No operation"] - #[inline(always)] - pub fn no_operation(self) -> &'a mut W { - self.variant(ERASEALL_A::NO_OPERATION) - } - #[doc = "Start chip erase"] - #[inline(always)] - pub fn erase(self) -> &'a mut W { - self.variant(ERASEALL_A::ERASE) - } -} -impl R { - #[doc = "Bit 0 - Erase all non-volatile memory including UICR registers. Note that code erase has to be enabled by CONFIG.EEN before the UICR can be erased."] - #[inline(always)] - pub fn eraseall(&self) -> ERASEALL_R { - ERASEALL_R::new((self.bits & 1) != 0) - } -} -impl W { - #[doc = "Bit 0 - Erase all non-volatile memory including UICR registers. Note that code erase has to be enabled by CONFIG.EEN before the UICR can be erased."] - #[inline(always)] - #[must_use] - pub fn eraseall(&mut self) -> ERASEALL_W<0> { - ERASEALL_W::new(self) - } - #[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 = "Register for erasing all non-volatile user memory\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 [eraseall](index.html) module"] -pub struct ERASEALL_SPEC; -impl crate::RegisterSpec for ERASEALL_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [eraseall::R](R) reader structure"] -impl crate::Readable for ERASEALL_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [eraseall::W](W) writer structure"] -impl crate::Writable for ERASEALL_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets ERASEALL to value 0"] -impl crate::Resettable for ERASEALL_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/nvmc/erasepage.rs b/down-the-stack/dk_pac/src/nvmc/erasepage.rs deleted file mode 100644 index 219102c..0000000 --- a/down-the-stack/dk_pac/src/nvmc/erasepage.rs +++ /dev/null @@ -1,81 +0,0 @@ -#[doc = "Register `ERASEPAGE` 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 `ERASEPAGE` 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 `ERASEPAGE` reader - Register for starting erase of a page in Code area"] -pub type ERASEPAGE_R = crate::FieldReader; -#[doc = "Field `ERASEPAGE` writer - Register for starting erase of a page in Code area"] -pub type ERASEPAGE_W<'a, const O: u8> = - crate::FieldWriter<'a, u32, ERASEPAGE_SPEC, u32, u32, 32, O>; -impl R { - #[doc = "Bits 0:31 - Register for starting erase of a page in Code area"] - #[inline(always)] - pub fn erasepage(&self) -> ERASEPAGE_R { - ERASEPAGE_R::new(self.bits) - } -} -impl W { - #[doc = "Bits 0:31 - Register for starting erase of a page in Code area"] - #[inline(always)] - #[must_use] - pub fn erasepage(&mut self) -> ERASEPAGE_W<0> { - ERASEPAGE_W::new(self) - } - #[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 = "Register for erasing a page in Code area\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 [erasepage](index.html) module"] -pub struct ERASEPAGE_SPEC; -impl crate::RegisterSpec for ERASEPAGE_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [erasepage::R](R) reader structure"] -impl crate::Readable for ERASEPAGE_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [erasepage::W](W) writer structure"] -impl crate::Writable for ERASEPAGE_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets ERASEPAGE to value 0"] -impl crate::Resettable for ERASEPAGE_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/nvmc/erasepcr0.rs b/down-the-stack/dk_pac/src/nvmc/erasepcr0.rs deleted file mode 100644 index 5335cce..0000000 --- a/down-the-stack/dk_pac/src/nvmc/erasepcr0.rs +++ /dev/null @@ -1,81 +0,0 @@ -#[doc = "Register `ERASEPCR0` 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 `ERASEPCR0` 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 `ERASEPCR0` reader - Register for starting erase of a page in Code area. Equivalent to ERASEPAGE."] -pub type ERASEPCR0_R = crate::FieldReader; -#[doc = "Field `ERASEPCR0` writer - Register for starting erase of a page in Code area. Equivalent to ERASEPAGE."] -pub type ERASEPCR0_W<'a, const O: u8> = - crate::FieldWriter<'a, u32, ERASEPCR0_SPEC, u32, u32, 32, O>; -impl R { - #[doc = "Bits 0:31 - Register for starting erase of a page in Code area. Equivalent to ERASEPAGE."] - #[inline(always)] - pub fn erasepcr0(&self) -> ERASEPCR0_R { - ERASEPCR0_R::new(self.bits) - } -} -impl W { - #[doc = "Bits 0:31 - Register for starting erase of a page in Code area. Equivalent to ERASEPAGE."] - #[inline(always)] - #[must_use] - pub fn erasepcr0(&mut self) -> ERASEPCR0_W<0> { - ERASEPCR0_W::new(self) - } - #[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 = "Deprecated register - Register for erasing a page in Code area. Equivalent to ERASEPAGE.\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 [erasepcr0](index.html) module"] -pub struct ERASEPCR0_SPEC; -impl crate::RegisterSpec for ERASEPCR0_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [erasepcr0::R](R) reader structure"] -impl crate::Readable for ERASEPCR0_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [erasepcr0::W](W) writer structure"] -impl crate::Writable for ERASEPCR0_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets ERASEPCR0 to value 0"] -impl crate::Resettable for ERASEPCR0_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/nvmc/erasepcr1.rs b/down-the-stack/dk_pac/src/nvmc/erasepcr1.rs deleted file mode 100644 index 40020ea..0000000 --- a/down-the-stack/dk_pac/src/nvmc/erasepcr1.rs +++ /dev/null @@ -1,81 +0,0 @@ -#[doc = "Register `ERASEPCR1` 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 `ERASEPCR1` 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 `ERASEPCR1` reader - Register for erasing a page in Code area. Equivalent to ERASEPAGE."] -pub type ERASEPCR1_R = crate::FieldReader; -#[doc = "Field `ERASEPCR1` writer - Register for erasing a page in Code area. Equivalent to ERASEPAGE."] -pub type ERASEPCR1_W<'a, const O: u8> = - crate::FieldWriter<'a, u32, ERASEPCR1_SPEC, u32, u32, 32, O>; -impl R { - #[doc = "Bits 0:31 - Register for erasing a page in Code area. Equivalent to ERASEPAGE."] - #[inline(always)] - pub fn erasepcr1(&self) -> ERASEPCR1_R { - ERASEPCR1_R::new(self.bits) - } -} -impl W { - #[doc = "Bits 0:31 - Register for erasing a page in Code area. Equivalent to ERASEPAGE."] - #[inline(always)] - #[must_use] - pub fn erasepcr1(&mut self) -> ERASEPCR1_W<0> { - ERASEPCR1_W::new(self) - } - #[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 = "Deprecated register - Register for erasing a page in Code area. Equivalent to ERASEPAGE.\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 [erasepcr1](index.html) module"] -pub struct ERASEPCR1_SPEC; -impl crate::RegisterSpec for ERASEPCR1_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [erasepcr1::R](R) reader structure"] -impl crate::Readable for ERASEPCR1_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [erasepcr1::W](W) writer structure"] -impl crate::Writable for ERASEPCR1_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets ERASEPCR1 to value 0"] -impl crate::Resettable for ERASEPCR1_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/nvmc/eraseuicr.rs b/down-the-stack/dk_pac/src/nvmc/eraseuicr.rs deleted file mode 100644 index 07c3e97..0000000 --- a/down-the-stack/dk_pac/src/nvmc/eraseuicr.rs +++ /dev/null @@ -1,126 +0,0 @@ -#[doc = "Register `ERASEUICR` 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 `ERASEUICR` 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 `ERASEUICR` reader - Register starting erase of all User Information Configuration Registers. Note that code erase has to be enabled by CONFIG.EEN before the UICR can be erased."] -pub type ERASEUICR_R = crate::BitReader; -#[doc = "Register starting erase of all User Information Configuration Registers. Note that code erase has to be enabled by CONFIG.EEN before the UICR can be erased.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum ERASEUICR_A { - #[doc = "0: No operation"] - NO_OPERATION = 0, - #[doc = "1: Start erase of UICR"] - ERASE = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: ERASEUICR_A) -> Self { - variant as u8 != 0 - } -} -impl ERASEUICR_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> ERASEUICR_A { - match self.bits { - false => ERASEUICR_A::NO_OPERATION, - true => ERASEUICR_A::ERASE, - } - } - #[doc = "Checks if the value of the field is `NO_OPERATION`"] - #[inline(always)] - pub fn is_no_operation(&self) -> bool { - *self == ERASEUICR_A::NO_OPERATION - } - #[doc = "Checks if the value of the field is `ERASE`"] - #[inline(always)] - pub fn is_erase(&self) -> bool { - *self == ERASEUICR_A::ERASE - } -} -#[doc = "Field `ERASEUICR` writer - Register starting erase of all User Information Configuration Registers. Note that code erase has to be enabled by CONFIG.EEN before the UICR can be erased."] -pub type ERASEUICR_W<'a, const O: u8> = crate::BitWriter<'a, u32, ERASEUICR_SPEC, ERASEUICR_A, O>; -impl<'a, const O: u8> ERASEUICR_W<'a, O> { - #[doc = "No operation"] - #[inline(always)] - pub fn no_operation(self) -> &'a mut W { - self.variant(ERASEUICR_A::NO_OPERATION) - } - #[doc = "Start erase of UICR"] - #[inline(always)] - pub fn erase(self) -> &'a mut W { - self.variant(ERASEUICR_A::ERASE) - } -} -impl R { - #[doc = "Bit 0 - Register starting erase of all User Information Configuration Registers. Note that code erase has to be enabled by CONFIG.EEN before the UICR can be erased."] - #[inline(always)] - pub fn eraseuicr(&self) -> ERASEUICR_R { - ERASEUICR_R::new((self.bits & 1) != 0) - } -} -impl W { - #[doc = "Bit 0 - Register starting erase of all User Information Configuration Registers. Note that code erase has to be enabled by CONFIG.EEN before the UICR can be erased."] - #[inline(always)] - #[must_use] - pub fn eraseuicr(&mut self) -> ERASEUICR_W<0> { - ERASEUICR_W::new(self) - } - #[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 = "Register for erasing User Information Configuration Registers\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 [eraseuicr](index.html) module"] -pub struct ERASEUICR_SPEC; -impl crate::RegisterSpec for ERASEUICR_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [eraseuicr::R](R) reader structure"] -impl crate::Readable for ERASEUICR_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [eraseuicr::W](W) writer structure"] -impl crate::Writable for ERASEUICR_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets ERASEUICR to value 0"] -impl crate::Resettable for ERASEUICR_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/nvmc/icachecnf.rs b/down-the-stack/dk_pac/src/nvmc/icachecnf.rs deleted file mode 100644 index dc4d94e..0000000 --- a/down-the-stack/dk_pac/src/nvmc/icachecnf.rs +++ /dev/null @@ -1,188 +0,0 @@ -#[doc = "Register `ICACHECNF` 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 `ICACHECNF` 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 `CACHEEN` reader - Cache enable"] -pub type CACHEEN_R = crate::BitReader; -#[doc = "Cache enable\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum CACHEEN_A { - #[doc = "0: Disable cache. Invalidates all cache entries."] - DISABLED = 0, - #[doc = "1: Enable cache"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: CACHEEN_A) -> Self { - variant as u8 != 0 - } -} -impl CACHEEN_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> CACHEEN_A { - match self.bits { - false => CACHEEN_A::DISABLED, - true => CACHEEN_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == CACHEEN_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == CACHEEN_A::ENABLED - } -} -#[doc = "Field `CACHEEN` writer - Cache enable"] -pub type CACHEEN_W<'a, const O: u8> = crate::BitWriter<'a, u32, ICACHECNF_SPEC, CACHEEN_A, O>; -impl<'a, const O: u8> CACHEEN_W<'a, O> { - #[doc = "Disable cache. Invalidates all cache entries."] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(CACHEEN_A::DISABLED) - } - #[doc = "Enable cache"] - #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(CACHEEN_A::ENABLED) - } -} -#[doc = "Field `CACHEPROFEN` reader - Cache profiling enable"] -pub type CACHEPROFEN_R = crate::BitReader; -#[doc = "Cache profiling enable\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum CACHEPROFEN_A { - #[doc = "0: Disable cache profiling"] - DISABLED = 0, - #[doc = "1: Enable cache profiling"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: CACHEPROFEN_A) -> Self { - variant as u8 != 0 - } -} -impl CACHEPROFEN_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> CACHEPROFEN_A { - match self.bits { - false => CACHEPROFEN_A::DISABLED, - true => CACHEPROFEN_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == CACHEPROFEN_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == CACHEPROFEN_A::ENABLED - } -} -#[doc = "Field `CACHEPROFEN` writer - Cache profiling enable"] -pub type CACHEPROFEN_W<'a, const O: u8> = - crate::BitWriter<'a, u32, ICACHECNF_SPEC, CACHEPROFEN_A, O>; -impl<'a, const O: u8> CACHEPROFEN_W<'a, O> { - #[doc = "Disable cache profiling"] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(CACHEPROFEN_A::DISABLED) - } - #[doc = "Enable cache profiling"] - #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(CACHEPROFEN_A::ENABLED) - } -} -impl R { - #[doc = "Bit 0 - Cache enable"] - #[inline(always)] - pub fn cacheen(&self) -> CACHEEN_R { - CACHEEN_R::new((self.bits & 1) != 0) - } - #[doc = "Bit 8 - Cache profiling enable"] - #[inline(always)] - pub fn cacheprofen(&self) -> CACHEPROFEN_R { - CACHEPROFEN_R::new(((self.bits >> 8) & 1) != 0) - } -} -impl W { - #[doc = "Bit 0 - Cache enable"] - #[inline(always)] - #[must_use] - pub fn cacheen(&mut self) -> CACHEEN_W<0> { - CACHEEN_W::new(self) - } - #[doc = "Bit 8 - Cache profiling enable"] - #[inline(always)] - #[must_use] - pub fn cacheprofen(&mut self) -> CACHEPROFEN_W<8> { - CACHEPROFEN_W::new(self) - } - #[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 = "I-Code cache configuration register.\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 [icachecnf](index.html) module"] -pub struct ICACHECNF_SPEC; -impl crate::RegisterSpec for ICACHECNF_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [icachecnf::R](R) reader structure"] -impl crate::Readable for ICACHECNF_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [icachecnf::W](W) writer structure"] -impl crate::Writable for ICACHECNF_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets ICACHECNF to value 0"] -impl crate::Resettable for ICACHECNF_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/nvmc/ihit.rs b/down-the-stack/dk_pac/src/nvmc/ihit.rs deleted file mode 100644 index 023c50f..0000000 --- a/down-the-stack/dk_pac/src/nvmc/ihit.rs +++ /dev/null @@ -1,80 +0,0 @@ -#[doc = "Register `IHIT` 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 `IHIT` 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 `HITS` reader - Number of cache hits"] -pub type HITS_R = crate::FieldReader; -#[doc = "Field `HITS` writer - Number of cache hits"] -pub type HITS_W<'a, const O: u8> = crate::FieldWriter<'a, u32, IHIT_SPEC, u32, u32, 32, O>; -impl R { - #[doc = "Bits 0:31 - Number of cache hits"] - #[inline(always)] - pub fn hits(&self) -> HITS_R { - HITS_R::new(self.bits) - } -} -impl W { - #[doc = "Bits 0:31 - Number of cache hits"] - #[inline(always)] - #[must_use] - pub fn hits(&mut self) -> HITS_W<0> { - HITS_W::new(self) - } - #[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 = "I-Code cache hit counter.\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 [ihit](index.html) module"] -pub struct IHIT_SPEC; -impl crate::RegisterSpec for IHIT_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [ihit::R](R) reader structure"] -impl crate::Readable for IHIT_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [ihit::W](W) writer structure"] -impl crate::Writable for IHIT_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets IHIT to value 0"] -impl crate::Resettable for IHIT_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/nvmc/imiss.rs b/down-the-stack/dk_pac/src/nvmc/imiss.rs deleted file mode 100644 index 54a866b..0000000 --- a/down-the-stack/dk_pac/src/nvmc/imiss.rs +++ /dev/null @@ -1,80 +0,0 @@ -#[doc = "Register `IMISS` 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 `IMISS` 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 `MISSES` reader - Number of cache misses"] -pub type MISSES_R = crate::FieldReader; -#[doc = "Field `MISSES` writer - Number of cache misses"] -pub type MISSES_W<'a, const O: u8> = crate::FieldWriter<'a, u32, IMISS_SPEC, u32, u32, 32, O>; -impl R { - #[doc = "Bits 0:31 - Number of cache misses"] - #[inline(always)] - pub fn misses(&self) -> MISSES_R { - MISSES_R::new(self.bits) - } -} -impl W { - #[doc = "Bits 0:31 - Number of cache misses"] - #[inline(always)] - #[must_use] - pub fn misses(&mut self) -> MISSES_W<0> { - MISSES_W::new(self) - } - #[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 = "I-Code cache miss counter.\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 [imiss](index.html) module"] -pub struct IMISS_SPEC; -impl crate::RegisterSpec for IMISS_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [imiss::R](R) reader structure"] -impl crate::Readable for IMISS_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [imiss::W](W) writer structure"] -impl crate::Writable for IMISS_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets IMISS to value 0"] -impl crate::Resettable for IMISS_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/nvmc/ready.rs b/down-the-stack/dk_pac/src/nvmc/ready.rs deleted file mode 100644 index 6dc491e..0000000 --- a/down-the-stack/dk_pac/src/nvmc/ready.rs +++ /dev/null @@ -1,71 +0,0 @@ -#[doc = "Register `READY` 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 = "Field `READY` reader - NVMC is ready or busy"] -pub type READY_R = crate::BitReader; -#[doc = "NVMC is ready or busy\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum READY_A { - #[doc = "0: NVMC is busy (on-going write or erase operation)"] - BUSY = 0, - #[doc = "1: NVMC is ready"] - READY = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: READY_A) -> Self { - variant as u8 != 0 - } -} -impl READY_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> READY_A { - match self.bits { - false => READY_A::BUSY, - true => READY_A::READY, - } - } - #[doc = "Checks if the value of the field is `BUSY`"] - #[inline(always)] - pub fn is_busy(&self) -> bool { - *self == READY_A::BUSY - } - #[doc = "Checks if the value of the field is `READY`"] - #[inline(always)] - pub fn is_ready(&self) -> bool { - *self == READY_A::READY - } -} -impl R { - #[doc = "Bit 0 - NVMC is ready or busy"] - #[inline(always)] - pub fn ready(&self) -> READY_R { - READY_R::new((self.bits & 1) != 0) - } -} -#[doc = "Ready flag\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 [ready](index.html) module"] -pub struct READY_SPEC; -impl crate::RegisterSpec for READY_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [ready::R](R) reader structure"] -impl crate::Readable for READY_SPEC { - type Reader = R; -} -#[doc = "`reset()` method sets READY to value 0"] -impl crate::Resettable for READY_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/p0.rs b/down-the-stack/dk_pac/src/p0.rs deleted file mode 100644 index 8637552..0000000 --- a/down-the-stack/dk_pac/src/p0.rs +++ /dev/null @@ -1,66 +0,0 @@ -#[doc = r"Register block"] -#[repr(C)] -pub struct RegisterBlock { - _reserved0: [u8; 0x0504], - #[doc = "0x504 - Write GPIO port"] - pub out: OUT, - #[doc = "0x508 - Set individual bits in GPIO port"] - pub outset: OUTSET, - #[doc = "0x50c - Clear individual bits in GPIO port"] - pub outclr: OUTCLR, - #[doc = "0x510 - Read GPIO port"] - pub in_: IN, - #[doc = "0x514 - Direction of GPIO pins"] - pub dir: DIR, - #[doc = "0x518 - DIR set register"] - pub dirset: DIRSET, - #[doc = "0x51c - DIR clear register"] - pub dirclr: DIRCLR, - #[doc = "0x520 - Latch register indicating what GPIO pins that have met the criteria set in the PIN_CNF\\[n\\].SENSE registers"] - pub latch: LATCH, - #[doc = "0x524 - Select between default DETECT signal behaviour and LDETECT mode"] - pub detectmode: DETECTMODE, - _reserved9: [u8; 0x01d8], - #[doc = "0x700..0x780 - Description collection: Configuration of GPIO pins"] - pub pin_cnf: [PIN_CNF; 32], -} -#[doc = "OUT (rw) register accessor: an alias for `Reg`"] -pub type OUT = crate::Reg; -#[doc = "Write GPIO port"] -pub mod out; -#[doc = "OUTSET (rw) register accessor: an alias for `Reg`"] -pub type OUTSET = crate::Reg; -#[doc = "Set individual bits in GPIO port"] -pub mod outset; -#[doc = "OUTCLR (rw) register accessor: an alias for `Reg`"] -pub type OUTCLR = crate::Reg; -#[doc = "Clear individual bits in GPIO port"] -pub mod outclr; -#[doc = "IN (r) register accessor: an alias for `Reg`"] -pub type IN = crate::Reg; -#[doc = "Read GPIO port"] -pub mod in_; -#[doc = "DIR (rw) register accessor: an alias for `Reg`"] -pub type DIR = crate::Reg; -#[doc = "Direction of GPIO pins"] -pub mod dir; -#[doc = "DIRSET (rw) register accessor: an alias for `Reg`"] -pub type DIRSET = crate::Reg; -#[doc = "DIR set register"] -pub mod dirset; -#[doc = "DIRCLR (rw) register accessor: an alias for `Reg`"] -pub type DIRCLR = crate::Reg; -#[doc = "DIR clear register"] -pub mod dirclr; -#[doc = "LATCH (rw) register accessor: an alias for `Reg`"] -pub type LATCH = crate::Reg; -#[doc = "Latch register indicating what GPIO pins that have met the criteria set in the PIN_CNF\\[n\\].SENSE registers"] -pub mod latch; -#[doc = "DETECTMODE (rw) register accessor: an alias for `Reg`"] -pub type DETECTMODE = crate::Reg; -#[doc = "Select between default DETECT signal behaviour and LDETECT mode"] -pub mod detectmode; -#[doc = "PIN_CNF (rw) register accessor: an alias for `Reg`"] -pub type PIN_CNF = crate::Reg; -#[doc = "Description collection: Configuration of GPIO pins"] -pub mod pin_cnf; diff --git a/down-the-stack/dk_pac/src/p0/detectmode.rs b/down-the-stack/dk_pac/src/p0/detectmode.rs deleted file mode 100644 index 0eafb2d..0000000 --- a/down-the-stack/dk_pac/src/p0/detectmode.rs +++ /dev/null @@ -1,127 +0,0 @@ -#[doc = "Register `DETECTMODE` 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 `DETECTMODE` 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 `DETECTMODE` reader - Select between default DETECT signal behaviour and LDETECT mode"] -pub type DETECTMODE_R = crate::BitReader; -#[doc = "Select between default DETECT signal behaviour and LDETECT mode\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum DETECTMODE_A { - #[doc = "0: DETECT directly connected to PIN DETECT signals"] - DEFAULT = 0, - #[doc = "1: Use the latched LDETECT behaviour"] - LDETECT = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: DETECTMODE_A) -> Self { - variant as u8 != 0 - } -} -impl DETECTMODE_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> DETECTMODE_A { - match self.bits { - false => DETECTMODE_A::DEFAULT, - true => DETECTMODE_A::LDETECT, - } - } - #[doc = "Checks if the value of the field is `DEFAULT`"] - #[inline(always)] - pub fn is_default(&self) -> bool { - *self == DETECTMODE_A::DEFAULT - } - #[doc = "Checks if the value of the field is `LDETECT`"] - #[inline(always)] - pub fn is_ldetect(&self) -> bool { - *self == DETECTMODE_A::LDETECT - } -} -#[doc = "Field `DETECTMODE` writer - Select between default DETECT signal behaviour and LDETECT mode"] -pub type DETECTMODE_W<'a, const O: u8> = - crate::BitWriter<'a, u32, DETECTMODE_SPEC, DETECTMODE_A, O>; -impl<'a, const O: u8> DETECTMODE_W<'a, O> { - #[doc = "DETECT directly connected to PIN DETECT signals"] - #[inline(always)] - pub fn default(self) -> &'a mut W { - self.variant(DETECTMODE_A::DEFAULT) - } - #[doc = "Use the latched LDETECT behaviour"] - #[inline(always)] - pub fn ldetect(self) -> &'a mut W { - self.variant(DETECTMODE_A::LDETECT) - } -} -impl R { - #[doc = "Bit 0 - Select between default DETECT signal behaviour and LDETECT mode"] - #[inline(always)] - pub fn detectmode(&self) -> DETECTMODE_R { - DETECTMODE_R::new((self.bits & 1) != 0) - } -} -impl W { - #[doc = "Bit 0 - Select between default DETECT signal behaviour and LDETECT mode"] - #[inline(always)] - #[must_use] - pub fn detectmode(&mut self) -> DETECTMODE_W<0> { - DETECTMODE_W::new(self) - } - #[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 = "Select between default DETECT signal behaviour and LDETECT mode\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 [detectmode](index.html) module"] -pub struct DETECTMODE_SPEC; -impl crate::RegisterSpec for DETECTMODE_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [detectmode::R](R) reader structure"] -impl crate::Readable for DETECTMODE_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [detectmode::W](W) writer structure"] -impl crate::Writable for DETECTMODE_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets DETECTMODE to value 0"] -impl crate::Resettable for DETECTMODE_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/p0/dir.rs b/down-the-stack/dk_pac/src/p0/dir.rs deleted file mode 100644 index 99ea401..0000000 --- a/down-the-stack/dk_pac/src/p0/dir.rs +++ /dev/null @@ -1,2017 +0,0 @@ -#[doc = "Register `DIR` 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 `DIR` 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 `PIN0` reader - Pin 0"] -pub type PIN0_R = crate::BitReader; -#[doc = "Pin 0\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PIN0_A { - #[doc = "0: Pin set as input"] - INPUT = 0, - #[doc = "1: Pin set as output"] - OUTPUT = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PIN0_A) -> Self { - variant as u8 != 0 - } -} -impl PIN0_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> PIN0_A { - match self.bits { - false => PIN0_A::INPUT, - true => PIN0_A::OUTPUT, - } - } - #[doc = "Checks if the value of the field is `INPUT`"] - #[inline(always)] - pub fn is_input(&self) -> bool { - *self == PIN0_A::INPUT - } - #[doc = "Checks if the value of the field is `OUTPUT`"] - #[inline(always)] - pub fn is_output(&self) -> bool { - *self == PIN0_A::OUTPUT - } -} -#[doc = "Field `PIN0` writer - Pin 0"] -pub type PIN0_W<'a, const O: u8> = crate::BitWriter<'a, u32, DIR_SPEC, PIN0_A, O>; -impl<'a, const O: u8> PIN0_W<'a, O> { - #[doc = "Pin set as input"] - #[inline(always)] - pub fn input(self) -> &'a mut W { - self.variant(PIN0_A::INPUT) - } - #[doc = "Pin set as output"] - #[inline(always)] - pub fn output(self) -> &'a mut W { - self.variant(PIN0_A::OUTPUT) - } -} -#[doc = "Field `PIN1` reader - Pin 1"] -pub type PIN1_R = crate::BitReader; -#[doc = "Pin 1\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PIN1_A { - #[doc = "0: Pin set as input"] - INPUT = 0, - #[doc = "1: Pin set as output"] - OUTPUT = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PIN1_A) -> Self { - variant as u8 != 0 - } -} -impl PIN1_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> PIN1_A { - match self.bits { - false => PIN1_A::INPUT, - true => PIN1_A::OUTPUT, - } - } - #[doc = "Checks if the value of the field is `INPUT`"] - #[inline(always)] - pub fn is_input(&self) -> bool { - *self == PIN1_A::INPUT - } - #[doc = "Checks if the value of the field is `OUTPUT`"] - #[inline(always)] - pub fn is_output(&self) -> bool { - *self == PIN1_A::OUTPUT - } -} -#[doc = "Field `PIN1` writer - Pin 1"] -pub type PIN1_W<'a, const O: u8> = crate::BitWriter<'a, u32, DIR_SPEC, PIN1_A, O>; -impl<'a, const O: u8> PIN1_W<'a, O> { - #[doc = "Pin set as input"] - #[inline(always)] - pub fn input(self) -> &'a mut W { - self.variant(PIN1_A::INPUT) - } - #[doc = "Pin set as output"] - #[inline(always)] - pub fn output(self) -> &'a mut W { - self.variant(PIN1_A::OUTPUT) - } -} -#[doc = "Field `PIN2` reader - Pin 2"] -pub type PIN2_R = crate::BitReader; -#[doc = "Pin 2\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PIN2_A { - #[doc = "0: Pin set as input"] - INPUT = 0, - #[doc = "1: Pin set as output"] - OUTPUT = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PIN2_A) -> Self { - variant as u8 != 0 - } -} -impl PIN2_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> PIN2_A { - match self.bits { - false => PIN2_A::INPUT, - true => PIN2_A::OUTPUT, - } - } - #[doc = "Checks if the value of the field is `INPUT`"] - #[inline(always)] - pub fn is_input(&self) -> bool { - *self == PIN2_A::INPUT - } - #[doc = "Checks if the value of the field is `OUTPUT`"] - #[inline(always)] - pub fn is_output(&self) -> bool { - *self == PIN2_A::OUTPUT - } -} -#[doc = "Field `PIN2` writer - Pin 2"] -pub type PIN2_W<'a, const O: u8> = crate::BitWriter<'a, u32, DIR_SPEC, PIN2_A, O>; -impl<'a, const O: u8> PIN2_W<'a, O> { - #[doc = "Pin set as input"] - #[inline(always)] - pub fn input(self) -> &'a mut W { - self.variant(PIN2_A::INPUT) - } - #[doc = "Pin set as output"] - #[inline(always)] - pub fn output(self) -> &'a mut W { - self.variant(PIN2_A::OUTPUT) - } -} -#[doc = "Field `PIN3` reader - Pin 3"] -pub type PIN3_R = crate::BitReader; -#[doc = "Pin 3\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PIN3_A { - #[doc = "0: Pin set as input"] - INPUT = 0, - #[doc = "1: Pin set as output"] - OUTPUT = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PIN3_A) -> Self { - variant as u8 != 0 - } -} -impl PIN3_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> PIN3_A { - match self.bits { - false => PIN3_A::INPUT, - true => PIN3_A::OUTPUT, - } - } - #[doc = "Checks if the value of the field is `INPUT`"] - #[inline(always)] - pub fn is_input(&self) -> bool { - *self == PIN3_A::INPUT - } - #[doc = "Checks if the value of the field is `OUTPUT`"] - #[inline(always)] - pub fn is_output(&self) -> bool { - *self == PIN3_A::OUTPUT - } -} -#[doc = "Field `PIN3` writer - Pin 3"] -pub type PIN3_W<'a, const O: u8> = crate::BitWriter<'a, u32, DIR_SPEC, PIN3_A, O>; -impl<'a, const O: u8> PIN3_W<'a, O> { - #[doc = "Pin set as input"] - #[inline(always)] - pub fn input(self) -> &'a mut W { - self.variant(PIN3_A::INPUT) - } - #[doc = "Pin set as output"] - #[inline(always)] - pub fn output(self) -> &'a mut W { - self.variant(PIN3_A::OUTPUT) - } -} -#[doc = "Field `PIN4` reader - Pin 4"] -pub type PIN4_R = crate::BitReader; -#[doc = "Pin 4\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PIN4_A { - #[doc = "0: Pin set as input"] - INPUT = 0, - #[doc = "1: Pin set as output"] - OUTPUT = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PIN4_A) -> Self { - variant as u8 != 0 - } -} -impl PIN4_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> PIN4_A { - match self.bits { - false => PIN4_A::INPUT, - true => PIN4_A::OUTPUT, - } - } - #[doc = "Checks if the value of the field is `INPUT`"] - #[inline(always)] - pub fn is_input(&self) -> bool { - *self == PIN4_A::INPUT - } - #[doc = "Checks if the value of the field is `OUTPUT`"] - #[inline(always)] - pub fn is_output(&self) -> bool { - *self == PIN4_A::OUTPUT - } -} -#[doc = "Field `PIN4` writer - Pin 4"] -pub type PIN4_W<'a, const O: u8> = crate::BitWriter<'a, u32, DIR_SPEC, PIN4_A, O>; -impl<'a, const O: u8> PIN4_W<'a, O> { - #[doc = "Pin set as input"] - #[inline(always)] - pub fn input(self) -> &'a mut W { - self.variant(PIN4_A::INPUT) - } - #[doc = "Pin set as output"] - #[inline(always)] - pub fn output(self) -> &'a mut W { - self.variant(PIN4_A::OUTPUT) - } -} -#[doc = "Field `PIN5` reader - Pin 5"] -pub type PIN5_R = crate::BitReader; -#[doc = "Pin 5\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PIN5_A { - #[doc = "0: Pin set as input"] - INPUT = 0, - #[doc = "1: Pin set as output"] - OUTPUT = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PIN5_A) -> Self { - variant as u8 != 0 - } -} -impl PIN5_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> PIN5_A { - match self.bits { - false => PIN5_A::INPUT, - true => PIN5_A::OUTPUT, - } - } - #[doc = "Checks if the value of the field is `INPUT`"] - #[inline(always)] - pub fn is_input(&self) -> bool { - *self == PIN5_A::INPUT - } - #[doc = "Checks if the value of the field is `OUTPUT`"] - #[inline(always)] - pub fn is_output(&self) -> bool { - *self == PIN5_A::OUTPUT - } -} -#[doc = "Field `PIN5` writer - Pin 5"] -pub type PIN5_W<'a, const O: u8> = crate::BitWriter<'a, u32, DIR_SPEC, PIN5_A, O>; -impl<'a, const O: u8> PIN5_W<'a, O> { - #[doc = "Pin set as input"] - #[inline(always)] - pub fn input(self) -> &'a mut W { - self.variant(PIN5_A::INPUT) - } - #[doc = "Pin set as output"] - #[inline(always)] - pub fn output(self) -> &'a mut W { - self.variant(PIN5_A::OUTPUT) - } -} -#[doc = "Field `PIN6` reader - Pin 6"] -pub type PIN6_R = crate::BitReader; -#[doc = "Pin 6\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PIN6_A { - #[doc = "0: Pin set as input"] - INPUT = 0, - #[doc = "1: Pin set as output"] - OUTPUT = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PIN6_A) -> Self { - variant as u8 != 0 - } -} -impl PIN6_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> PIN6_A { - match self.bits { - false => PIN6_A::INPUT, - true => PIN6_A::OUTPUT, - } - } - #[doc = "Checks if the value of the field is `INPUT`"] - #[inline(always)] - pub fn is_input(&self) -> bool { - *self == PIN6_A::INPUT - } - #[doc = "Checks if the value of the field is `OUTPUT`"] - #[inline(always)] - pub fn is_output(&self) -> bool { - *self == PIN6_A::OUTPUT - } -} -#[doc = "Field `PIN6` writer - Pin 6"] -pub type PIN6_W<'a, const O: u8> = crate::BitWriter<'a, u32, DIR_SPEC, PIN6_A, O>; -impl<'a, const O: u8> PIN6_W<'a, O> { - #[doc = "Pin set as input"] - #[inline(always)] - pub fn input(self) -> &'a mut W { - self.variant(PIN6_A::INPUT) - } - #[doc = "Pin set as output"] - #[inline(always)] - pub fn output(self) -> &'a mut W { - self.variant(PIN6_A::OUTPUT) - } -} -#[doc = "Field `PIN7` reader - Pin 7"] -pub type PIN7_R = crate::BitReader; -#[doc = "Pin 7\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PIN7_A { - #[doc = "0: Pin set as input"] - INPUT = 0, - #[doc = "1: Pin set as output"] - OUTPUT = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PIN7_A) -> Self { - variant as u8 != 0 - } -} -impl PIN7_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> PIN7_A { - match self.bits { - false => PIN7_A::INPUT, - true => PIN7_A::OUTPUT, - } - } - #[doc = "Checks if the value of the field is `INPUT`"] - #[inline(always)] - pub fn is_input(&self) -> bool { - *self == PIN7_A::INPUT - } - #[doc = "Checks if the value of the field is `OUTPUT`"] - #[inline(always)] - pub fn is_output(&self) -> bool { - *self == PIN7_A::OUTPUT - } -} -#[doc = "Field `PIN7` writer - Pin 7"] -pub type PIN7_W<'a, const O: u8> = crate::BitWriter<'a, u32, DIR_SPEC, PIN7_A, O>; -impl<'a, const O: u8> PIN7_W<'a, O> { - #[doc = "Pin set as input"] - #[inline(always)] - pub fn input(self) -> &'a mut W { - self.variant(PIN7_A::INPUT) - } - #[doc = "Pin set as output"] - #[inline(always)] - pub fn output(self) -> &'a mut W { - self.variant(PIN7_A::OUTPUT) - } -} -#[doc = "Field `PIN8` reader - Pin 8"] -pub type PIN8_R = crate::BitReader; -#[doc = "Pin 8\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PIN8_A { - #[doc = "0: Pin set as input"] - INPUT = 0, - #[doc = "1: Pin set as output"] - OUTPUT = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PIN8_A) -> Self { - variant as u8 != 0 - } -} -impl PIN8_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> PIN8_A { - match self.bits { - false => PIN8_A::INPUT, - true => PIN8_A::OUTPUT, - } - } - #[doc = "Checks if the value of the field is `INPUT`"] - #[inline(always)] - pub fn is_input(&self) -> bool { - *self == PIN8_A::INPUT - } - #[doc = "Checks if the value of the field is `OUTPUT`"] - #[inline(always)] - pub fn is_output(&self) -> bool { - *self == PIN8_A::OUTPUT - } -} -#[doc = "Field `PIN8` writer - Pin 8"] -pub type PIN8_W<'a, const O: u8> = crate::BitWriter<'a, u32, DIR_SPEC, PIN8_A, O>; -impl<'a, const O: u8> PIN8_W<'a, O> { - #[doc = "Pin set as input"] - #[inline(always)] - pub fn input(self) -> &'a mut W { - self.variant(PIN8_A::INPUT) - } - #[doc = "Pin set as output"] - #[inline(always)] - pub fn output(self) -> &'a mut W { - self.variant(PIN8_A::OUTPUT) - } -} -#[doc = "Field `PIN9` reader - Pin 9"] -pub type PIN9_R = crate::BitReader; -#[doc = "Pin 9\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PIN9_A { - #[doc = "0: Pin set as input"] - INPUT = 0, - #[doc = "1: Pin set as output"] - OUTPUT = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PIN9_A) -> Self { - variant as u8 != 0 - } -} -impl PIN9_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> PIN9_A { - match self.bits { - false => PIN9_A::INPUT, - true => PIN9_A::OUTPUT, - } - } - #[doc = "Checks if the value of the field is `INPUT`"] - #[inline(always)] - pub fn is_input(&self) -> bool { - *self == PIN9_A::INPUT - } - #[doc = "Checks if the value of the field is `OUTPUT`"] - #[inline(always)] - pub fn is_output(&self) -> bool { - *self == PIN9_A::OUTPUT - } -} -#[doc = "Field `PIN9` writer - Pin 9"] -pub type PIN9_W<'a, const O: u8> = crate::BitWriter<'a, u32, DIR_SPEC, PIN9_A, O>; -impl<'a, const O: u8> PIN9_W<'a, O> { - #[doc = "Pin set as input"] - #[inline(always)] - pub fn input(self) -> &'a mut W { - self.variant(PIN9_A::INPUT) - } - #[doc = "Pin set as output"] - #[inline(always)] - pub fn output(self) -> &'a mut W { - self.variant(PIN9_A::OUTPUT) - } -} -#[doc = "Field `PIN10` reader - Pin 10"] -pub type PIN10_R = crate::BitReader; -#[doc = "Pin 10\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PIN10_A { - #[doc = "0: Pin set as input"] - INPUT = 0, - #[doc = "1: Pin set as output"] - OUTPUT = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PIN10_A) -> Self { - variant as u8 != 0 - } -} -impl PIN10_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> PIN10_A { - match self.bits { - false => PIN10_A::INPUT, - true => PIN10_A::OUTPUT, - } - } - #[doc = "Checks if the value of the field is `INPUT`"] - #[inline(always)] - pub fn is_input(&self) -> bool { - *self == PIN10_A::INPUT - } - #[doc = "Checks if the value of the field is `OUTPUT`"] - #[inline(always)] - pub fn is_output(&self) -> bool { - *self == PIN10_A::OUTPUT - } -} -#[doc = "Field `PIN10` writer - Pin 10"] -pub type PIN10_W<'a, const O: u8> = crate::BitWriter<'a, u32, DIR_SPEC, PIN10_A, O>; -impl<'a, const O: u8> PIN10_W<'a, O> { - #[doc = "Pin set as input"] - #[inline(always)] - pub fn input(self) -> &'a mut W { - self.variant(PIN10_A::INPUT) - } - #[doc = "Pin set as output"] - #[inline(always)] - pub fn output(self) -> &'a mut W { - self.variant(PIN10_A::OUTPUT) - } -} -#[doc = "Field `PIN11` reader - Pin 11"] -pub type PIN11_R = crate::BitReader; -#[doc = "Pin 11\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PIN11_A { - #[doc = "0: Pin set as input"] - INPUT = 0, - #[doc = "1: Pin set as output"] - OUTPUT = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PIN11_A) -> Self { - variant as u8 != 0 - } -} -impl PIN11_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> PIN11_A { - match self.bits { - false => PIN11_A::INPUT, - true => PIN11_A::OUTPUT, - } - } - #[doc = "Checks if the value of the field is `INPUT`"] - #[inline(always)] - pub fn is_input(&self) -> bool { - *self == PIN11_A::INPUT - } - #[doc = "Checks if the value of the field is `OUTPUT`"] - #[inline(always)] - pub fn is_output(&self) -> bool { - *self == PIN11_A::OUTPUT - } -} -#[doc = "Field `PIN11` writer - Pin 11"] -pub type PIN11_W<'a, const O: u8> = crate::BitWriter<'a, u32, DIR_SPEC, PIN11_A, O>; -impl<'a, const O: u8> PIN11_W<'a, O> { - #[doc = "Pin set as input"] - #[inline(always)] - pub fn input(self) -> &'a mut W { - self.variant(PIN11_A::INPUT) - } - #[doc = "Pin set as output"] - #[inline(always)] - pub fn output(self) -> &'a mut W { - self.variant(PIN11_A::OUTPUT) - } -} -#[doc = "Field `PIN12` reader - Pin 12"] -pub type PIN12_R = crate::BitReader; -#[doc = "Pin 12\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PIN12_A { - #[doc = "0: Pin set as input"] - INPUT = 0, - #[doc = "1: Pin set as output"] - OUTPUT = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PIN12_A) -> Self { - variant as u8 != 0 - } -} -impl PIN12_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> PIN12_A { - match self.bits { - false => PIN12_A::INPUT, - true => PIN12_A::OUTPUT, - } - } - #[doc = "Checks if the value of the field is `INPUT`"] - #[inline(always)] - pub fn is_input(&self) -> bool { - *self == PIN12_A::INPUT - } - #[doc = "Checks if the value of the field is `OUTPUT`"] - #[inline(always)] - pub fn is_output(&self) -> bool { - *self == PIN12_A::OUTPUT - } -} -#[doc = "Field `PIN12` writer - Pin 12"] -pub type PIN12_W<'a, const O: u8> = crate::BitWriter<'a, u32, DIR_SPEC, PIN12_A, O>; -impl<'a, const O: u8> PIN12_W<'a, O> { - #[doc = "Pin set as input"] - #[inline(always)] - pub fn input(self) -> &'a mut W { - self.variant(PIN12_A::INPUT) - } - #[doc = "Pin set as output"] - #[inline(always)] - pub fn output(self) -> &'a mut W { - self.variant(PIN12_A::OUTPUT) - } -} -#[doc = "Field `PIN13` reader - Pin 13"] -pub type PIN13_R = crate::BitReader; -#[doc = "Pin 13\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PIN13_A { - #[doc = "0: Pin set as input"] - INPUT = 0, - #[doc = "1: Pin set as output"] - OUTPUT = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PIN13_A) -> Self { - variant as u8 != 0 - } -} -impl PIN13_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> PIN13_A { - match self.bits { - false => PIN13_A::INPUT, - true => PIN13_A::OUTPUT, - } - } - #[doc = "Checks if the value of the field is `INPUT`"] - #[inline(always)] - pub fn is_input(&self) -> bool { - *self == PIN13_A::INPUT - } - #[doc = "Checks if the value of the field is `OUTPUT`"] - #[inline(always)] - pub fn is_output(&self) -> bool { - *self == PIN13_A::OUTPUT - } -} -#[doc = "Field `PIN13` writer - Pin 13"] -pub type PIN13_W<'a, const O: u8> = crate::BitWriter<'a, u32, DIR_SPEC, PIN13_A, O>; -impl<'a, const O: u8> PIN13_W<'a, O> { - #[doc = "Pin set as input"] - #[inline(always)] - pub fn input(self) -> &'a mut W { - self.variant(PIN13_A::INPUT) - } - #[doc = "Pin set as output"] - #[inline(always)] - pub fn output(self) -> &'a mut W { - self.variant(PIN13_A::OUTPUT) - } -} -#[doc = "Field `PIN14` reader - Pin 14"] -pub type PIN14_R = crate::BitReader; -#[doc = "Pin 14\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PIN14_A { - #[doc = "0: Pin set as input"] - INPUT = 0, - #[doc = "1: Pin set as output"] - OUTPUT = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PIN14_A) -> Self { - variant as u8 != 0 - } -} -impl PIN14_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> PIN14_A { - match self.bits { - false => PIN14_A::INPUT, - true => PIN14_A::OUTPUT, - } - } - #[doc = "Checks if the value of the field is `INPUT`"] - #[inline(always)] - pub fn is_input(&self) -> bool { - *self == PIN14_A::INPUT - } - #[doc = "Checks if the value of the field is `OUTPUT`"] - #[inline(always)] - pub fn is_output(&self) -> bool { - *self == PIN14_A::OUTPUT - } -} -#[doc = "Field `PIN14` writer - Pin 14"] -pub type PIN14_W<'a, const O: u8> = crate::BitWriter<'a, u32, DIR_SPEC, PIN14_A, O>; -impl<'a, const O: u8> PIN14_W<'a, O> { - #[doc = "Pin set as input"] - #[inline(always)] - pub fn input(self) -> &'a mut W { - self.variant(PIN14_A::INPUT) - } - #[doc = "Pin set as output"] - #[inline(always)] - pub fn output(self) -> &'a mut W { - self.variant(PIN14_A::OUTPUT) - } -} -#[doc = "Field `PIN15` reader - Pin 15"] -pub type PIN15_R = crate::BitReader; -#[doc = "Pin 15\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PIN15_A { - #[doc = "0: Pin set as input"] - INPUT = 0, - #[doc = "1: Pin set as output"] - OUTPUT = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PIN15_A) -> Self { - variant as u8 != 0 - } -} -impl PIN15_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> PIN15_A { - match self.bits { - false => PIN15_A::INPUT, - true => PIN15_A::OUTPUT, - } - } - #[doc = "Checks if the value of the field is `INPUT`"] - #[inline(always)] - pub fn is_input(&self) -> bool { - *self == PIN15_A::INPUT - } - #[doc = "Checks if the value of the field is `OUTPUT`"] - #[inline(always)] - pub fn is_output(&self) -> bool { - *self == PIN15_A::OUTPUT - } -} -#[doc = "Field `PIN15` writer - Pin 15"] -pub type PIN15_W<'a, const O: u8> = crate::BitWriter<'a, u32, DIR_SPEC, PIN15_A, O>; -impl<'a, const O: u8> PIN15_W<'a, O> { - #[doc = "Pin set as input"] - #[inline(always)] - pub fn input(self) -> &'a mut W { - self.variant(PIN15_A::INPUT) - } - #[doc = "Pin set as output"] - #[inline(always)] - pub fn output(self) -> &'a mut W { - self.variant(PIN15_A::OUTPUT) - } -} -#[doc = "Field `PIN16` reader - Pin 16"] -pub type PIN16_R = crate::BitReader; -#[doc = "Pin 16\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PIN16_A { - #[doc = "0: Pin set as input"] - INPUT = 0, - #[doc = "1: Pin set as output"] - OUTPUT = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PIN16_A) -> Self { - variant as u8 != 0 - } -} -impl PIN16_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> PIN16_A { - match self.bits { - false => PIN16_A::INPUT, - true => PIN16_A::OUTPUT, - } - } - #[doc = "Checks if the value of the field is `INPUT`"] - #[inline(always)] - pub fn is_input(&self) -> bool { - *self == PIN16_A::INPUT - } - #[doc = "Checks if the value of the field is `OUTPUT`"] - #[inline(always)] - pub fn is_output(&self) -> bool { - *self == PIN16_A::OUTPUT - } -} -#[doc = "Field `PIN16` writer - Pin 16"] -pub type PIN16_W<'a, const O: u8> = crate::BitWriter<'a, u32, DIR_SPEC, PIN16_A, O>; -impl<'a, const O: u8> PIN16_W<'a, O> { - #[doc = "Pin set as input"] - #[inline(always)] - pub fn input(self) -> &'a mut W { - self.variant(PIN16_A::INPUT) - } - #[doc = "Pin set as output"] - #[inline(always)] - pub fn output(self) -> &'a mut W { - self.variant(PIN16_A::OUTPUT) - } -} -#[doc = "Field `PIN17` reader - Pin 17"] -pub type PIN17_R = crate::BitReader; -#[doc = "Pin 17\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PIN17_A { - #[doc = "0: Pin set as input"] - INPUT = 0, - #[doc = "1: Pin set as output"] - OUTPUT = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PIN17_A) -> Self { - variant as u8 != 0 - } -} -impl PIN17_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> PIN17_A { - match self.bits { - false => PIN17_A::INPUT, - true => PIN17_A::OUTPUT, - } - } - #[doc = "Checks if the value of the field is `INPUT`"] - #[inline(always)] - pub fn is_input(&self) -> bool { - *self == PIN17_A::INPUT - } - #[doc = "Checks if the value of the field is `OUTPUT`"] - #[inline(always)] - pub fn is_output(&self) -> bool { - *self == PIN17_A::OUTPUT - } -} -#[doc = "Field `PIN17` writer - Pin 17"] -pub type PIN17_W<'a, const O: u8> = crate::BitWriter<'a, u32, DIR_SPEC, PIN17_A, O>; -impl<'a, const O: u8> PIN17_W<'a, O> { - #[doc = "Pin set as input"] - #[inline(always)] - pub fn input(self) -> &'a mut W { - self.variant(PIN17_A::INPUT) - } - #[doc = "Pin set as output"] - #[inline(always)] - pub fn output(self) -> &'a mut W { - self.variant(PIN17_A::OUTPUT) - } -} -#[doc = "Field `PIN18` reader - Pin 18"] -pub type PIN18_R = crate::BitReader; -#[doc = "Pin 18\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PIN18_A { - #[doc = "0: Pin set as input"] - INPUT = 0, - #[doc = "1: Pin set as output"] - OUTPUT = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PIN18_A) -> Self { - variant as u8 != 0 - } -} -impl PIN18_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> PIN18_A { - match self.bits { - false => PIN18_A::INPUT, - true => PIN18_A::OUTPUT, - } - } - #[doc = "Checks if the value of the field is `INPUT`"] - #[inline(always)] - pub fn is_input(&self) -> bool { - *self == PIN18_A::INPUT - } - #[doc = "Checks if the value of the field is `OUTPUT`"] - #[inline(always)] - pub fn is_output(&self) -> bool { - *self == PIN18_A::OUTPUT - } -} -#[doc = "Field `PIN18` writer - Pin 18"] -pub type PIN18_W<'a, const O: u8> = crate::BitWriter<'a, u32, DIR_SPEC, PIN18_A, O>; -impl<'a, const O: u8> PIN18_W<'a, O> { - #[doc = "Pin set as input"] - #[inline(always)] - pub fn input(self) -> &'a mut W { - self.variant(PIN18_A::INPUT) - } - #[doc = "Pin set as output"] - #[inline(always)] - pub fn output(self) -> &'a mut W { - self.variant(PIN18_A::OUTPUT) - } -} -#[doc = "Field `PIN19` reader - Pin 19"] -pub type PIN19_R = crate::BitReader; -#[doc = "Pin 19\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PIN19_A { - #[doc = "0: Pin set as input"] - INPUT = 0, - #[doc = "1: Pin set as output"] - OUTPUT = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PIN19_A) -> Self { - variant as u8 != 0 - } -} -impl PIN19_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> PIN19_A { - match self.bits { - false => PIN19_A::INPUT, - true => PIN19_A::OUTPUT, - } - } - #[doc = "Checks if the value of the field is `INPUT`"] - #[inline(always)] - pub fn is_input(&self) -> bool { - *self == PIN19_A::INPUT - } - #[doc = "Checks if the value of the field is `OUTPUT`"] - #[inline(always)] - pub fn is_output(&self) -> bool { - *self == PIN19_A::OUTPUT - } -} -#[doc = "Field `PIN19` writer - Pin 19"] -pub type PIN19_W<'a, const O: u8> = crate::BitWriter<'a, u32, DIR_SPEC, PIN19_A, O>; -impl<'a, const O: u8> PIN19_W<'a, O> { - #[doc = "Pin set as input"] - #[inline(always)] - pub fn input(self) -> &'a mut W { - self.variant(PIN19_A::INPUT) - } - #[doc = "Pin set as output"] - #[inline(always)] - pub fn output(self) -> &'a mut W { - self.variant(PIN19_A::OUTPUT) - } -} -#[doc = "Field `PIN20` reader - Pin 20"] -pub type PIN20_R = crate::BitReader; -#[doc = "Pin 20\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PIN20_A { - #[doc = "0: Pin set as input"] - INPUT = 0, - #[doc = "1: Pin set as output"] - OUTPUT = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PIN20_A) -> Self { - variant as u8 != 0 - } -} -impl PIN20_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> PIN20_A { - match self.bits { - false => PIN20_A::INPUT, - true => PIN20_A::OUTPUT, - } - } - #[doc = "Checks if the value of the field is `INPUT`"] - #[inline(always)] - pub fn is_input(&self) -> bool { - *self == PIN20_A::INPUT - } - #[doc = "Checks if the value of the field is `OUTPUT`"] - #[inline(always)] - pub fn is_output(&self) -> bool { - *self == PIN20_A::OUTPUT - } -} -#[doc = "Field `PIN20` writer - Pin 20"] -pub type PIN20_W<'a, const O: u8> = crate::BitWriter<'a, u32, DIR_SPEC, PIN20_A, O>; -impl<'a, const O: u8> PIN20_W<'a, O> { - #[doc = "Pin set as input"] - #[inline(always)] - pub fn input(self) -> &'a mut W { - self.variant(PIN20_A::INPUT) - } - #[doc = "Pin set as output"] - #[inline(always)] - pub fn output(self) -> &'a mut W { - self.variant(PIN20_A::OUTPUT) - } -} -#[doc = "Field `PIN21` reader - Pin 21"] -pub type PIN21_R = crate::BitReader; -#[doc = "Pin 21\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PIN21_A { - #[doc = "0: Pin set as input"] - INPUT = 0, - #[doc = "1: Pin set as output"] - OUTPUT = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PIN21_A) -> Self { - variant as u8 != 0 - } -} -impl PIN21_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> PIN21_A { - match self.bits { - false => PIN21_A::INPUT, - true => PIN21_A::OUTPUT, - } - } - #[doc = "Checks if the value of the field is `INPUT`"] - #[inline(always)] - pub fn is_input(&self) -> bool { - *self == PIN21_A::INPUT - } - #[doc = "Checks if the value of the field is `OUTPUT`"] - #[inline(always)] - pub fn is_output(&self) -> bool { - *self == PIN21_A::OUTPUT - } -} -#[doc = "Field `PIN21` writer - Pin 21"] -pub type PIN21_W<'a, const O: u8> = crate::BitWriter<'a, u32, DIR_SPEC, PIN21_A, O>; -impl<'a, const O: u8> PIN21_W<'a, O> { - #[doc = "Pin set as input"] - #[inline(always)] - pub fn input(self) -> &'a mut W { - self.variant(PIN21_A::INPUT) - } - #[doc = "Pin set as output"] - #[inline(always)] - pub fn output(self) -> &'a mut W { - self.variant(PIN21_A::OUTPUT) - } -} -#[doc = "Field `PIN22` reader - Pin 22"] -pub type PIN22_R = crate::BitReader; -#[doc = "Pin 22\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PIN22_A { - #[doc = "0: Pin set as input"] - INPUT = 0, - #[doc = "1: Pin set as output"] - OUTPUT = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PIN22_A) -> Self { - variant as u8 != 0 - } -} -impl PIN22_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> PIN22_A { - match self.bits { - false => PIN22_A::INPUT, - true => PIN22_A::OUTPUT, - } - } - #[doc = "Checks if the value of the field is `INPUT`"] - #[inline(always)] - pub fn is_input(&self) -> bool { - *self == PIN22_A::INPUT - } - #[doc = "Checks if the value of the field is `OUTPUT`"] - #[inline(always)] - pub fn is_output(&self) -> bool { - *self == PIN22_A::OUTPUT - } -} -#[doc = "Field `PIN22` writer - Pin 22"] -pub type PIN22_W<'a, const O: u8> = crate::BitWriter<'a, u32, DIR_SPEC, PIN22_A, O>; -impl<'a, const O: u8> PIN22_W<'a, O> { - #[doc = "Pin set as input"] - #[inline(always)] - pub fn input(self) -> &'a mut W { - self.variant(PIN22_A::INPUT) - } - #[doc = "Pin set as output"] - #[inline(always)] - pub fn output(self) -> &'a mut W { - self.variant(PIN22_A::OUTPUT) - } -} -#[doc = "Field `PIN23` reader - Pin 23"] -pub type PIN23_R = crate::BitReader; -#[doc = "Pin 23\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PIN23_A { - #[doc = "0: Pin set as input"] - INPUT = 0, - #[doc = "1: Pin set as output"] - OUTPUT = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PIN23_A) -> Self { - variant as u8 != 0 - } -} -impl PIN23_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> PIN23_A { - match self.bits { - false => PIN23_A::INPUT, - true => PIN23_A::OUTPUT, - } - } - #[doc = "Checks if the value of the field is `INPUT`"] - #[inline(always)] - pub fn is_input(&self) -> bool { - *self == PIN23_A::INPUT - } - #[doc = "Checks if the value of the field is `OUTPUT`"] - #[inline(always)] - pub fn is_output(&self) -> bool { - *self == PIN23_A::OUTPUT - } -} -#[doc = "Field `PIN23` writer - Pin 23"] -pub type PIN23_W<'a, const O: u8> = crate::BitWriter<'a, u32, DIR_SPEC, PIN23_A, O>; -impl<'a, const O: u8> PIN23_W<'a, O> { - #[doc = "Pin set as input"] - #[inline(always)] - pub fn input(self) -> &'a mut W { - self.variant(PIN23_A::INPUT) - } - #[doc = "Pin set as output"] - #[inline(always)] - pub fn output(self) -> &'a mut W { - self.variant(PIN23_A::OUTPUT) - } -} -#[doc = "Field `PIN24` reader - Pin 24"] -pub type PIN24_R = crate::BitReader; -#[doc = "Pin 24\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PIN24_A { - #[doc = "0: Pin set as input"] - INPUT = 0, - #[doc = "1: Pin set as output"] - OUTPUT = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PIN24_A) -> Self { - variant as u8 != 0 - } -} -impl PIN24_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> PIN24_A { - match self.bits { - false => PIN24_A::INPUT, - true => PIN24_A::OUTPUT, - } - } - #[doc = "Checks if the value of the field is `INPUT`"] - #[inline(always)] - pub fn is_input(&self) -> bool { - *self == PIN24_A::INPUT - } - #[doc = "Checks if the value of the field is `OUTPUT`"] - #[inline(always)] - pub fn is_output(&self) -> bool { - *self == PIN24_A::OUTPUT - } -} -#[doc = "Field `PIN24` writer - Pin 24"] -pub type PIN24_W<'a, const O: u8> = crate::BitWriter<'a, u32, DIR_SPEC, PIN24_A, O>; -impl<'a, const O: u8> PIN24_W<'a, O> { - #[doc = "Pin set as input"] - #[inline(always)] - pub fn input(self) -> &'a mut W { - self.variant(PIN24_A::INPUT) - } - #[doc = "Pin set as output"] - #[inline(always)] - pub fn output(self) -> &'a mut W { - self.variant(PIN24_A::OUTPUT) - } -} -#[doc = "Field `PIN25` reader - Pin 25"] -pub type PIN25_R = crate::BitReader; -#[doc = "Pin 25\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PIN25_A { - #[doc = "0: Pin set as input"] - INPUT = 0, - #[doc = "1: Pin set as output"] - OUTPUT = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PIN25_A) -> Self { - variant as u8 != 0 - } -} -impl PIN25_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> PIN25_A { - match self.bits { - false => PIN25_A::INPUT, - true => PIN25_A::OUTPUT, - } - } - #[doc = "Checks if the value of the field is `INPUT`"] - #[inline(always)] - pub fn is_input(&self) -> bool { - *self == PIN25_A::INPUT - } - #[doc = "Checks if the value of the field is `OUTPUT`"] - #[inline(always)] - pub fn is_output(&self) -> bool { - *self == PIN25_A::OUTPUT - } -} -#[doc = "Field `PIN25` writer - Pin 25"] -pub type PIN25_W<'a, const O: u8> = crate::BitWriter<'a, u32, DIR_SPEC, PIN25_A, O>; -impl<'a, const O: u8> PIN25_W<'a, O> { - #[doc = "Pin set as input"] - #[inline(always)] - pub fn input(self) -> &'a mut W { - self.variant(PIN25_A::INPUT) - } - #[doc = "Pin set as output"] - #[inline(always)] - pub fn output(self) -> &'a mut W { - self.variant(PIN25_A::OUTPUT) - } -} -#[doc = "Field `PIN26` reader - Pin 26"] -pub type PIN26_R = crate::BitReader; -#[doc = "Pin 26\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PIN26_A { - #[doc = "0: Pin set as input"] - INPUT = 0, - #[doc = "1: Pin set as output"] - OUTPUT = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PIN26_A) -> Self { - variant as u8 != 0 - } -} -impl PIN26_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> PIN26_A { - match self.bits { - false => PIN26_A::INPUT, - true => PIN26_A::OUTPUT, - } - } - #[doc = "Checks if the value of the field is `INPUT`"] - #[inline(always)] - pub fn is_input(&self) -> bool { - *self == PIN26_A::INPUT - } - #[doc = "Checks if the value of the field is `OUTPUT`"] - #[inline(always)] - pub fn is_output(&self) -> bool { - *self == PIN26_A::OUTPUT - } -} -#[doc = "Field `PIN26` writer - Pin 26"] -pub type PIN26_W<'a, const O: u8> = crate::BitWriter<'a, u32, DIR_SPEC, PIN26_A, O>; -impl<'a, const O: u8> PIN26_W<'a, O> { - #[doc = "Pin set as input"] - #[inline(always)] - pub fn input(self) -> &'a mut W { - self.variant(PIN26_A::INPUT) - } - #[doc = "Pin set as output"] - #[inline(always)] - pub fn output(self) -> &'a mut W { - self.variant(PIN26_A::OUTPUT) - } -} -#[doc = "Field `PIN27` reader - Pin 27"] -pub type PIN27_R = crate::BitReader; -#[doc = "Pin 27\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PIN27_A { - #[doc = "0: Pin set as input"] - INPUT = 0, - #[doc = "1: Pin set as output"] - OUTPUT = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PIN27_A) -> Self { - variant as u8 != 0 - } -} -impl PIN27_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> PIN27_A { - match self.bits { - false => PIN27_A::INPUT, - true => PIN27_A::OUTPUT, - } - } - #[doc = "Checks if the value of the field is `INPUT`"] - #[inline(always)] - pub fn is_input(&self) -> bool { - *self == PIN27_A::INPUT - } - #[doc = "Checks if the value of the field is `OUTPUT`"] - #[inline(always)] - pub fn is_output(&self) -> bool { - *self == PIN27_A::OUTPUT - } -} -#[doc = "Field `PIN27` writer - Pin 27"] -pub type PIN27_W<'a, const O: u8> = crate::BitWriter<'a, u32, DIR_SPEC, PIN27_A, O>; -impl<'a, const O: u8> PIN27_W<'a, O> { - #[doc = "Pin set as input"] - #[inline(always)] - pub fn input(self) -> &'a mut W { - self.variant(PIN27_A::INPUT) - } - #[doc = "Pin set as output"] - #[inline(always)] - pub fn output(self) -> &'a mut W { - self.variant(PIN27_A::OUTPUT) - } -} -#[doc = "Field `PIN28` reader - Pin 28"] -pub type PIN28_R = crate::BitReader; -#[doc = "Pin 28\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PIN28_A { - #[doc = "0: Pin set as input"] - INPUT = 0, - #[doc = "1: Pin set as output"] - OUTPUT = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PIN28_A) -> Self { - variant as u8 != 0 - } -} -impl PIN28_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> PIN28_A { - match self.bits { - false => PIN28_A::INPUT, - true => PIN28_A::OUTPUT, - } - } - #[doc = "Checks if the value of the field is `INPUT`"] - #[inline(always)] - pub fn is_input(&self) -> bool { - *self == PIN28_A::INPUT - } - #[doc = "Checks if the value of the field is `OUTPUT`"] - #[inline(always)] - pub fn is_output(&self) -> bool { - *self == PIN28_A::OUTPUT - } -} -#[doc = "Field `PIN28` writer - Pin 28"] -pub type PIN28_W<'a, const O: u8> = crate::BitWriter<'a, u32, DIR_SPEC, PIN28_A, O>; -impl<'a, const O: u8> PIN28_W<'a, O> { - #[doc = "Pin set as input"] - #[inline(always)] - pub fn input(self) -> &'a mut W { - self.variant(PIN28_A::INPUT) - } - #[doc = "Pin set as output"] - #[inline(always)] - pub fn output(self) -> &'a mut W { - self.variant(PIN28_A::OUTPUT) - } -} -#[doc = "Field `PIN29` reader - Pin 29"] -pub type PIN29_R = crate::BitReader; -#[doc = "Pin 29\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PIN29_A { - #[doc = "0: Pin set as input"] - INPUT = 0, - #[doc = "1: Pin set as output"] - OUTPUT = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PIN29_A) -> Self { - variant as u8 != 0 - } -} -impl PIN29_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> PIN29_A { - match self.bits { - false => PIN29_A::INPUT, - true => PIN29_A::OUTPUT, - } - } - #[doc = "Checks if the value of the field is `INPUT`"] - #[inline(always)] - pub fn is_input(&self) -> bool { - *self == PIN29_A::INPUT - } - #[doc = "Checks if the value of the field is `OUTPUT`"] - #[inline(always)] - pub fn is_output(&self) -> bool { - *self == PIN29_A::OUTPUT - } -} -#[doc = "Field `PIN29` writer - Pin 29"] -pub type PIN29_W<'a, const O: u8> = crate::BitWriter<'a, u32, DIR_SPEC, PIN29_A, O>; -impl<'a, const O: u8> PIN29_W<'a, O> { - #[doc = "Pin set as input"] - #[inline(always)] - pub fn input(self) -> &'a mut W { - self.variant(PIN29_A::INPUT) - } - #[doc = "Pin set as output"] - #[inline(always)] - pub fn output(self) -> &'a mut W { - self.variant(PIN29_A::OUTPUT) - } -} -#[doc = "Field `PIN30` reader - Pin 30"] -pub type PIN30_R = crate::BitReader; -#[doc = "Pin 30\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PIN30_A { - #[doc = "0: Pin set as input"] - INPUT = 0, - #[doc = "1: Pin set as output"] - OUTPUT = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PIN30_A) -> Self { - variant as u8 != 0 - } -} -impl PIN30_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> PIN30_A { - match self.bits { - false => PIN30_A::INPUT, - true => PIN30_A::OUTPUT, - } - } - #[doc = "Checks if the value of the field is `INPUT`"] - #[inline(always)] - pub fn is_input(&self) -> bool { - *self == PIN30_A::INPUT - } - #[doc = "Checks if the value of the field is `OUTPUT`"] - #[inline(always)] - pub fn is_output(&self) -> bool { - *self == PIN30_A::OUTPUT - } -} -#[doc = "Field `PIN30` writer - Pin 30"] -pub type PIN30_W<'a, const O: u8> = crate::BitWriter<'a, u32, DIR_SPEC, PIN30_A, O>; -impl<'a, const O: u8> PIN30_W<'a, O> { - #[doc = "Pin set as input"] - #[inline(always)] - pub fn input(self) -> &'a mut W { - self.variant(PIN30_A::INPUT) - } - #[doc = "Pin set as output"] - #[inline(always)] - pub fn output(self) -> &'a mut W { - self.variant(PIN30_A::OUTPUT) - } -} -#[doc = "Field `PIN31` reader - Pin 31"] -pub type PIN31_R = crate::BitReader; -#[doc = "Pin 31\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PIN31_A { - #[doc = "0: Pin set as input"] - INPUT = 0, - #[doc = "1: Pin set as output"] - OUTPUT = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PIN31_A) -> Self { - variant as u8 != 0 - } -} -impl PIN31_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> PIN31_A { - match self.bits { - false => PIN31_A::INPUT, - true => PIN31_A::OUTPUT, - } - } - #[doc = "Checks if the value of the field is `INPUT`"] - #[inline(always)] - pub fn is_input(&self) -> bool { - *self == PIN31_A::INPUT - } - #[doc = "Checks if the value of the field is `OUTPUT`"] - #[inline(always)] - pub fn is_output(&self) -> bool { - *self == PIN31_A::OUTPUT - } -} -#[doc = "Field `PIN31` writer - Pin 31"] -pub type PIN31_W<'a, const O: u8> = crate::BitWriter<'a, u32, DIR_SPEC, PIN31_A, O>; -impl<'a, const O: u8> PIN31_W<'a, O> { - #[doc = "Pin set as input"] - #[inline(always)] - pub fn input(self) -> &'a mut W { - self.variant(PIN31_A::INPUT) - } - #[doc = "Pin set as output"] - #[inline(always)] - pub fn output(self) -> &'a mut W { - self.variant(PIN31_A::OUTPUT) - } -} -impl R { - #[doc = "Bit 0 - Pin 0"] - #[inline(always)] - pub fn pin0(&self) -> PIN0_R { - PIN0_R::new((self.bits & 1) != 0) - } - #[doc = "Bit 1 - Pin 1"] - #[inline(always)] - pub fn pin1(&self) -> PIN1_R { - PIN1_R::new(((self.bits >> 1) & 1) != 0) - } - #[doc = "Bit 2 - Pin 2"] - #[inline(always)] - pub fn pin2(&self) -> PIN2_R { - PIN2_R::new(((self.bits >> 2) & 1) != 0) - } - #[doc = "Bit 3 - Pin 3"] - #[inline(always)] - pub fn pin3(&self) -> PIN3_R { - PIN3_R::new(((self.bits >> 3) & 1) != 0) - } - #[doc = "Bit 4 - Pin 4"] - #[inline(always)] - pub fn pin4(&self) -> PIN4_R { - PIN4_R::new(((self.bits >> 4) & 1) != 0) - } - #[doc = "Bit 5 - Pin 5"] - #[inline(always)] - pub fn pin5(&self) -> PIN5_R { - PIN5_R::new(((self.bits >> 5) & 1) != 0) - } - #[doc = "Bit 6 - Pin 6"] - #[inline(always)] - pub fn pin6(&self) -> PIN6_R { - PIN6_R::new(((self.bits >> 6) & 1) != 0) - } - #[doc = "Bit 7 - Pin 7"] - #[inline(always)] - pub fn pin7(&self) -> PIN7_R { - PIN7_R::new(((self.bits >> 7) & 1) != 0) - } - #[doc = "Bit 8 - Pin 8"] - #[inline(always)] - pub fn pin8(&self) -> PIN8_R { - PIN8_R::new(((self.bits >> 8) & 1) != 0) - } - #[doc = "Bit 9 - Pin 9"] - #[inline(always)] - pub fn pin9(&self) -> PIN9_R { - PIN9_R::new(((self.bits >> 9) & 1) != 0) - } - #[doc = "Bit 10 - Pin 10"] - #[inline(always)] - pub fn pin10(&self) -> PIN10_R { - PIN10_R::new(((self.bits >> 10) & 1) != 0) - } - #[doc = "Bit 11 - Pin 11"] - #[inline(always)] - pub fn pin11(&self) -> PIN11_R { - PIN11_R::new(((self.bits >> 11) & 1) != 0) - } - #[doc = "Bit 12 - Pin 12"] - #[inline(always)] - pub fn pin12(&self) -> PIN12_R { - PIN12_R::new(((self.bits >> 12) & 1) != 0) - } - #[doc = "Bit 13 - Pin 13"] - #[inline(always)] - pub fn pin13(&self) -> PIN13_R { - PIN13_R::new(((self.bits >> 13) & 1) != 0) - } - #[doc = "Bit 14 - Pin 14"] - #[inline(always)] - pub fn pin14(&self) -> PIN14_R { - PIN14_R::new(((self.bits >> 14) & 1) != 0) - } - #[doc = "Bit 15 - Pin 15"] - #[inline(always)] - pub fn pin15(&self) -> PIN15_R { - PIN15_R::new(((self.bits >> 15) & 1) != 0) - } - #[doc = "Bit 16 - Pin 16"] - #[inline(always)] - pub fn pin16(&self) -> PIN16_R { - PIN16_R::new(((self.bits >> 16) & 1) != 0) - } - #[doc = "Bit 17 - Pin 17"] - #[inline(always)] - pub fn pin17(&self) -> PIN17_R { - PIN17_R::new(((self.bits >> 17) & 1) != 0) - } - #[doc = "Bit 18 - Pin 18"] - #[inline(always)] - pub fn pin18(&self) -> PIN18_R { - PIN18_R::new(((self.bits >> 18) & 1) != 0) - } - #[doc = "Bit 19 - Pin 19"] - #[inline(always)] - pub fn pin19(&self) -> PIN19_R { - PIN19_R::new(((self.bits >> 19) & 1) != 0) - } - #[doc = "Bit 20 - Pin 20"] - #[inline(always)] - pub fn pin20(&self) -> PIN20_R { - PIN20_R::new(((self.bits >> 20) & 1) != 0) - } - #[doc = "Bit 21 - Pin 21"] - #[inline(always)] - pub fn pin21(&self) -> PIN21_R { - PIN21_R::new(((self.bits >> 21) & 1) != 0) - } - #[doc = "Bit 22 - Pin 22"] - #[inline(always)] - pub fn pin22(&self) -> PIN22_R { - PIN22_R::new(((self.bits >> 22) & 1) != 0) - } - #[doc = "Bit 23 - Pin 23"] - #[inline(always)] - pub fn pin23(&self) -> PIN23_R { - PIN23_R::new(((self.bits >> 23) & 1) != 0) - } - #[doc = "Bit 24 - Pin 24"] - #[inline(always)] - pub fn pin24(&self) -> PIN24_R { - PIN24_R::new(((self.bits >> 24) & 1) != 0) - } - #[doc = "Bit 25 - Pin 25"] - #[inline(always)] - pub fn pin25(&self) -> PIN25_R { - PIN25_R::new(((self.bits >> 25) & 1) != 0) - } - #[doc = "Bit 26 - Pin 26"] - #[inline(always)] - pub fn pin26(&self) -> PIN26_R { - PIN26_R::new(((self.bits >> 26) & 1) != 0) - } - #[doc = "Bit 27 - Pin 27"] - #[inline(always)] - pub fn pin27(&self) -> PIN27_R { - PIN27_R::new(((self.bits >> 27) & 1) != 0) - } - #[doc = "Bit 28 - Pin 28"] - #[inline(always)] - pub fn pin28(&self) -> PIN28_R { - PIN28_R::new(((self.bits >> 28) & 1) != 0) - } - #[doc = "Bit 29 - Pin 29"] - #[inline(always)] - pub fn pin29(&self) -> PIN29_R { - PIN29_R::new(((self.bits >> 29) & 1) != 0) - } - #[doc = "Bit 30 - Pin 30"] - #[inline(always)] - pub fn pin30(&self) -> PIN30_R { - PIN30_R::new(((self.bits >> 30) & 1) != 0) - } - #[doc = "Bit 31 - Pin 31"] - #[inline(always)] - pub fn pin31(&self) -> PIN31_R { - PIN31_R::new(((self.bits >> 31) & 1) != 0) - } -} -impl W { - #[doc = "Bit 0 - Pin 0"] - #[inline(always)] - #[must_use] - pub fn pin0(&mut self) -> PIN0_W<0> { - PIN0_W::new(self) - } - #[doc = "Bit 1 - Pin 1"] - #[inline(always)] - #[must_use] - pub fn pin1(&mut self) -> PIN1_W<1> { - PIN1_W::new(self) - } - #[doc = "Bit 2 - Pin 2"] - #[inline(always)] - #[must_use] - pub fn pin2(&mut self) -> PIN2_W<2> { - PIN2_W::new(self) - } - #[doc = "Bit 3 - Pin 3"] - #[inline(always)] - #[must_use] - pub fn pin3(&mut self) -> PIN3_W<3> { - PIN3_W::new(self) - } - #[doc = "Bit 4 - Pin 4"] - #[inline(always)] - #[must_use] - pub fn pin4(&mut self) -> PIN4_W<4> { - PIN4_W::new(self) - } - #[doc = "Bit 5 - Pin 5"] - #[inline(always)] - #[must_use] - pub fn pin5(&mut self) -> PIN5_W<5> { - PIN5_W::new(self) - } - #[doc = "Bit 6 - Pin 6"] - #[inline(always)] - #[must_use] - pub fn pin6(&mut self) -> PIN6_W<6> { - PIN6_W::new(self) - } - #[doc = "Bit 7 - Pin 7"] - #[inline(always)] - #[must_use] - pub fn pin7(&mut self) -> PIN7_W<7> { - PIN7_W::new(self) - } - #[doc = "Bit 8 - Pin 8"] - #[inline(always)] - #[must_use] - pub fn pin8(&mut self) -> PIN8_W<8> { - PIN8_W::new(self) - } - #[doc = "Bit 9 - Pin 9"] - #[inline(always)] - #[must_use] - pub fn pin9(&mut self) -> PIN9_W<9> { - PIN9_W::new(self) - } - #[doc = "Bit 10 - Pin 10"] - #[inline(always)] - #[must_use] - pub fn pin10(&mut self) -> PIN10_W<10> { - PIN10_W::new(self) - } - #[doc = "Bit 11 - Pin 11"] - #[inline(always)] - #[must_use] - pub fn pin11(&mut self) -> PIN11_W<11> { - PIN11_W::new(self) - } - #[doc = "Bit 12 - Pin 12"] - #[inline(always)] - #[must_use] - pub fn pin12(&mut self) -> PIN12_W<12> { - PIN12_W::new(self) - } - #[doc = "Bit 13 - Pin 13"] - #[inline(always)] - #[must_use] - pub fn pin13(&mut self) -> PIN13_W<13> { - PIN13_W::new(self) - } - #[doc = "Bit 14 - Pin 14"] - #[inline(always)] - #[must_use] - pub fn pin14(&mut self) -> PIN14_W<14> { - PIN14_W::new(self) - } - #[doc = "Bit 15 - Pin 15"] - #[inline(always)] - #[must_use] - pub fn pin15(&mut self) -> PIN15_W<15> { - PIN15_W::new(self) - } - #[doc = "Bit 16 - Pin 16"] - #[inline(always)] - #[must_use] - pub fn pin16(&mut self) -> PIN16_W<16> { - PIN16_W::new(self) - } - #[doc = "Bit 17 - Pin 17"] - #[inline(always)] - #[must_use] - pub fn pin17(&mut self) -> PIN17_W<17> { - PIN17_W::new(self) - } - #[doc = "Bit 18 - Pin 18"] - #[inline(always)] - #[must_use] - pub fn pin18(&mut self) -> PIN18_W<18> { - PIN18_W::new(self) - } - #[doc = "Bit 19 - Pin 19"] - #[inline(always)] - #[must_use] - pub fn pin19(&mut self) -> PIN19_W<19> { - PIN19_W::new(self) - } - #[doc = "Bit 20 - Pin 20"] - #[inline(always)] - #[must_use] - pub fn pin20(&mut self) -> PIN20_W<20> { - PIN20_W::new(self) - } - #[doc = "Bit 21 - Pin 21"] - #[inline(always)] - #[must_use] - pub fn pin21(&mut self) -> PIN21_W<21> { - PIN21_W::new(self) - } - #[doc = "Bit 22 - Pin 22"] - #[inline(always)] - #[must_use] - pub fn pin22(&mut self) -> PIN22_W<22> { - PIN22_W::new(self) - } - #[doc = "Bit 23 - Pin 23"] - #[inline(always)] - #[must_use] - pub fn pin23(&mut self) -> PIN23_W<23> { - PIN23_W::new(self) - } - #[doc = "Bit 24 - Pin 24"] - #[inline(always)] - #[must_use] - pub fn pin24(&mut self) -> PIN24_W<24> { - PIN24_W::new(self) - } - #[doc = "Bit 25 - Pin 25"] - #[inline(always)] - #[must_use] - pub fn pin25(&mut self) -> PIN25_W<25> { - PIN25_W::new(self) - } - #[doc = "Bit 26 - Pin 26"] - #[inline(always)] - #[must_use] - pub fn pin26(&mut self) -> PIN26_W<26> { - PIN26_W::new(self) - } - #[doc = "Bit 27 - Pin 27"] - #[inline(always)] - #[must_use] - pub fn pin27(&mut self) -> PIN27_W<27> { - PIN27_W::new(self) - } - #[doc = "Bit 28 - Pin 28"] - #[inline(always)] - #[must_use] - pub fn pin28(&mut self) -> PIN28_W<28> { - PIN28_W::new(self) - } - #[doc = "Bit 29 - Pin 29"] - #[inline(always)] - #[must_use] - pub fn pin29(&mut self) -> PIN29_W<29> { - PIN29_W::new(self) - } - #[doc = "Bit 30 - Pin 30"] - #[inline(always)] - #[must_use] - pub fn pin30(&mut self) -> PIN30_W<30> { - PIN30_W::new(self) - } - #[doc = "Bit 31 - Pin 31"] - #[inline(always)] - #[must_use] - pub fn pin31(&mut self) -> PIN31_W<31> { - PIN31_W::new(self) - } - #[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 = "Direction of GPIO pins\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 [dir](index.html) module"] -pub struct DIR_SPEC; -impl crate::RegisterSpec for DIR_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [dir::R](R) reader structure"] -impl crate::Readable for DIR_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [dir::W](W) writer structure"] -impl crate::Writable for DIR_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets DIR to value 0"] -impl crate::Resettable for DIR_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/p0/dirclr.rs b/down-the-stack/dk_pac/src/p0/dirclr.rs deleted file mode 100644 index 97978e6..0000000 --- a/down-the-stack/dk_pac/src/p0/dirclr.rs +++ /dev/null @@ -1,2241 +0,0 @@ -#[doc = "Register `DIRCLR` 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 `DIRCLR` 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 `PIN0` reader - Set as input pin 0"] -pub type PIN0_R = crate::BitReader; -#[doc = "Set as input pin 0\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PIN0_A { - #[doc = "0: Read: pin set as input"] - INPUT = 0, - #[doc = "1: Read: pin set as output"] - OUTPUT = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PIN0_A) -> Self { - variant as u8 != 0 - } -} -impl PIN0_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> PIN0_A { - match self.bits { - false => PIN0_A::INPUT, - true => PIN0_A::OUTPUT, - } - } - #[doc = "Checks if the value of the field is `INPUT`"] - #[inline(always)] - pub fn is_input(&self) -> bool { - *self == PIN0_A::INPUT - } - #[doc = "Checks if the value of the field is `OUTPUT`"] - #[inline(always)] - pub fn is_output(&self) -> bool { - *self == PIN0_A::OUTPUT - } -} -#[doc = "Set as input pin 0\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PIN0_AW { - #[doc = "1: Write: writing a '1' sets pin to input; writing a '0' has no effect"] - CLEAR = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PIN0_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `PIN0` writer - Set as input pin 0"] -pub type PIN0_W<'a, const O: u8> = crate::BitWriter1C<'a, u32, DIRCLR_SPEC, PIN0_AW, O>; -impl<'a, const O: u8> PIN0_W<'a, O> { - #[doc = "Write: writing a '1' sets pin to input; writing a '0' has no effect"] - #[inline(always)] - pub fn clear(self) -> &'a mut W { - self.variant(PIN0_AW::CLEAR) - } -} -#[doc = "Field `PIN1` reader - Set as input pin 1"] -pub type PIN1_R = crate::BitReader; -#[doc = "Set as input pin 1\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PIN1_A { - #[doc = "0: Read: pin set as input"] - INPUT = 0, - #[doc = "1: Read: pin set as output"] - OUTPUT = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PIN1_A) -> Self { - variant as u8 != 0 - } -} -impl PIN1_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> PIN1_A { - match self.bits { - false => PIN1_A::INPUT, - true => PIN1_A::OUTPUT, - } - } - #[doc = "Checks if the value of the field is `INPUT`"] - #[inline(always)] - pub fn is_input(&self) -> bool { - *self == PIN1_A::INPUT - } - #[doc = "Checks if the value of the field is `OUTPUT`"] - #[inline(always)] - pub fn is_output(&self) -> bool { - *self == PIN1_A::OUTPUT - } -} -#[doc = "Set as input pin 1\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PIN1_AW { - #[doc = "1: Write: writing a '1' sets pin to input; writing a '0' has no effect"] - CLEAR = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PIN1_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `PIN1` writer - Set as input pin 1"] -pub type PIN1_W<'a, const O: u8> = crate::BitWriter1C<'a, u32, DIRCLR_SPEC, PIN1_AW, O>; -impl<'a, const O: u8> PIN1_W<'a, O> { - #[doc = "Write: writing a '1' sets pin to input; writing a '0' has no effect"] - #[inline(always)] - pub fn clear(self) -> &'a mut W { - self.variant(PIN1_AW::CLEAR) - } -} -#[doc = "Field `PIN2` reader - Set as input pin 2"] -pub type PIN2_R = crate::BitReader; -#[doc = "Set as input pin 2\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PIN2_A { - #[doc = "0: Read: pin set as input"] - INPUT = 0, - #[doc = "1: Read: pin set as output"] - OUTPUT = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PIN2_A) -> Self { - variant as u8 != 0 - } -} -impl PIN2_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> PIN2_A { - match self.bits { - false => PIN2_A::INPUT, - true => PIN2_A::OUTPUT, - } - } - #[doc = "Checks if the value of the field is `INPUT`"] - #[inline(always)] - pub fn is_input(&self) -> bool { - *self == PIN2_A::INPUT - } - #[doc = "Checks if the value of the field is `OUTPUT`"] - #[inline(always)] - pub fn is_output(&self) -> bool { - *self == PIN2_A::OUTPUT - } -} -#[doc = "Set as input pin 2\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PIN2_AW { - #[doc = "1: Write: writing a '1' sets pin to input; writing a '0' has no effect"] - CLEAR = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PIN2_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `PIN2` writer - Set as input pin 2"] -pub type PIN2_W<'a, const O: u8> = crate::BitWriter1C<'a, u32, DIRCLR_SPEC, PIN2_AW, O>; -impl<'a, const O: u8> PIN2_W<'a, O> { - #[doc = "Write: writing a '1' sets pin to input; writing a '0' has no effect"] - #[inline(always)] - pub fn clear(self) -> &'a mut W { - self.variant(PIN2_AW::CLEAR) - } -} -#[doc = "Field `PIN3` reader - Set as input pin 3"] -pub type PIN3_R = crate::BitReader; -#[doc = "Set as input pin 3\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PIN3_A { - #[doc = "0: Read: pin set as input"] - INPUT = 0, - #[doc = "1: Read: pin set as output"] - OUTPUT = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PIN3_A) -> Self { - variant as u8 != 0 - } -} -impl PIN3_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> PIN3_A { - match self.bits { - false => PIN3_A::INPUT, - true => PIN3_A::OUTPUT, - } - } - #[doc = "Checks if the value of the field is `INPUT`"] - #[inline(always)] - pub fn is_input(&self) -> bool { - *self == PIN3_A::INPUT - } - #[doc = "Checks if the value of the field is `OUTPUT`"] - #[inline(always)] - pub fn is_output(&self) -> bool { - *self == PIN3_A::OUTPUT - } -} -#[doc = "Set as input pin 3\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PIN3_AW { - #[doc = "1: Write: writing a '1' sets pin to input; writing a '0' has no effect"] - CLEAR = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PIN3_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `PIN3` writer - Set as input pin 3"] -pub type PIN3_W<'a, const O: u8> = crate::BitWriter1C<'a, u32, DIRCLR_SPEC, PIN3_AW, O>; -impl<'a, const O: u8> PIN3_W<'a, O> { - #[doc = "Write: writing a '1' sets pin to input; writing a '0' has no effect"] - #[inline(always)] - pub fn clear(self) -> &'a mut W { - self.variant(PIN3_AW::CLEAR) - } -} -#[doc = "Field `PIN4` reader - Set as input pin 4"] -pub type PIN4_R = crate::BitReader; -#[doc = "Set as input pin 4\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PIN4_A { - #[doc = "0: Read: pin set as input"] - INPUT = 0, - #[doc = "1: Read: pin set as output"] - OUTPUT = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PIN4_A) -> Self { - variant as u8 != 0 - } -} -impl PIN4_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> PIN4_A { - match self.bits { - false => PIN4_A::INPUT, - true => PIN4_A::OUTPUT, - } - } - #[doc = "Checks if the value of the field is `INPUT`"] - #[inline(always)] - pub fn is_input(&self) -> bool { - *self == PIN4_A::INPUT - } - #[doc = "Checks if the value of the field is `OUTPUT`"] - #[inline(always)] - pub fn is_output(&self) -> bool { - *self == PIN4_A::OUTPUT - } -} -#[doc = "Set as input pin 4\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PIN4_AW { - #[doc = "1: Write: writing a '1' sets pin to input; writing a '0' has no effect"] - CLEAR = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PIN4_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `PIN4` writer - Set as input pin 4"] -pub type PIN4_W<'a, const O: u8> = crate::BitWriter1C<'a, u32, DIRCLR_SPEC, PIN4_AW, O>; -impl<'a, const O: u8> PIN4_W<'a, O> { - #[doc = "Write: writing a '1' sets pin to input; writing a '0' has no effect"] - #[inline(always)] - pub fn clear(self) -> &'a mut W { - self.variant(PIN4_AW::CLEAR) - } -} -#[doc = "Field `PIN5` reader - Set as input pin 5"] -pub type PIN5_R = crate::BitReader; -#[doc = "Set as input pin 5\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PIN5_A { - #[doc = "0: Read: pin set as input"] - INPUT = 0, - #[doc = "1: Read: pin set as output"] - OUTPUT = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PIN5_A) -> Self { - variant as u8 != 0 - } -} -impl PIN5_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> PIN5_A { - match self.bits { - false => PIN5_A::INPUT, - true => PIN5_A::OUTPUT, - } - } - #[doc = "Checks if the value of the field is `INPUT`"] - #[inline(always)] - pub fn is_input(&self) -> bool { - *self == PIN5_A::INPUT - } - #[doc = "Checks if the value of the field is `OUTPUT`"] - #[inline(always)] - pub fn is_output(&self) -> bool { - *self == PIN5_A::OUTPUT - } -} -#[doc = "Set as input pin 5\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PIN5_AW { - #[doc = "1: Write: writing a '1' sets pin to input; writing a '0' has no effect"] - CLEAR = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PIN5_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `PIN5` writer - Set as input pin 5"] -pub type PIN5_W<'a, const O: u8> = crate::BitWriter1C<'a, u32, DIRCLR_SPEC, PIN5_AW, O>; -impl<'a, const O: u8> PIN5_W<'a, O> { - #[doc = "Write: writing a '1' sets pin to input; writing a '0' has no effect"] - #[inline(always)] - pub fn clear(self) -> &'a mut W { - self.variant(PIN5_AW::CLEAR) - } -} -#[doc = "Field `PIN6` reader - Set as input pin 6"] -pub type PIN6_R = crate::BitReader; -#[doc = "Set as input pin 6\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PIN6_A { - #[doc = "0: Read: pin set as input"] - INPUT = 0, - #[doc = "1: Read: pin set as output"] - OUTPUT = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PIN6_A) -> Self { - variant as u8 != 0 - } -} -impl PIN6_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> PIN6_A { - match self.bits { - false => PIN6_A::INPUT, - true => PIN6_A::OUTPUT, - } - } - #[doc = "Checks if the value of the field is `INPUT`"] - #[inline(always)] - pub fn is_input(&self) -> bool { - *self == PIN6_A::INPUT - } - #[doc = "Checks if the value of the field is `OUTPUT`"] - #[inline(always)] - pub fn is_output(&self) -> bool { - *self == PIN6_A::OUTPUT - } -} -#[doc = "Set as input pin 6\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PIN6_AW { - #[doc = "1: Write: writing a '1' sets pin to input; writing a '0' has no effect"] - CLEAR = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PIN6_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `PIN6` writer - Set as input pin 6"] -pub type PIN6_W<'a, const O: u8> = crate::BitWriter1C<'a, u32, DIRCLR_SPEC, PIN6_AW, O>; -impl<'a, const O: u8> PIN6_W<'a, O> { - #[doc = "Write: writing a '1' sets pin to input; writing a '0' has no effect"] - #[inline(always)] - pub fn clear(self) -> &'a mut W { - self.variant(PIN6_AW::CLEAR) - } -} -#[doc = "Field `PIN7` reader - Set as input pin 7"] -pub type PIN7_R = crate::BitReader; -#[doc = "Set as input pin 7\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PIN7_A { - #[doc = "0: Read: pin set as input"] - INPUT = 0, - #[doc = "1: Read: pin set as output"] - OUTPUT = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PIN7_A) -> Self { - variant as u8 != 0 - } -} -impl PIN7_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> PIN7_A { - match self.bits { - false => PIN7_A::INPUT, - true => PIN7_A::OUTPUT, - } - } - #[doc = "Checks if the value of the field is `INPUT`"] - #[inline(always)] - pub fn is_input(&self) -> bool { - *self == PIN7_A::INPUT - } - #[doc = "Checks if the value of the field is `OUTPUT`"] - #[inline(always)] - pub fn is_output(&self) -> bool { - *self == PIN7_A::OUTPUT - } -} -#[doc = "Set as input pin 7\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PIN7_AW { - #[doc = "1: Write: writing a '1' sets pin to input; writing a '0' has no effect"] - CLEAR = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PIN7_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `PIN7` writer - Set as input pin 7"] -pub type PIN7_W<'a, const O: u8> = crate::BitWriter1C<'a, u32, DIRCLR_SPEC, PIN7_AW, O>; -impl<'a, const O: u8> PIN7_W<'a, O> { - #[doc = "Write: writing a '1' sets pin to input; writing a '0' has no effect"] - #[inline(always)] - pub fn clear(self) -> &'a mut W { - self.variant(PIN7_AW::CLEAR) - } -} -#[doc = "Field `PIN8` reader - Set as input pin 8"] -pub type PIN8_R = crate::BitReader; -#[doc = "Set as input pin 8\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PIN8_A { - #[doc = "0: Read: pin set as input"] - INPUT = 0, - #[doc = "1: Read: pin set as output"] - OUTPUT = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PIN8_A) -> Self { - variant as u8 != 0 - } -} -impl PIN8_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> PIN8_A { - match self.bits { - false => PIN8_A::INPUT, - true => PIN8_A::OUTPUT, - } - } - #[doc = "Checks if the value of the field is `INPUT`"] - #[inline(always)] - pub fn is_input(&self) -> bool { - *self == PIN8_A::INPUT - } - #[doc = "Checks if the value of the field is `OUTPUT`"] - #[inline(always)] - pub fn is_output(&self) -> bool { - *self == PIN8_A::OUTPUT - } -} -#[doc = "Set as input pin 8\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PIN8_AW { - #[doc = "1: Write: writing a '1' sets pin to input; writing a '0' has no effect"] - CLEAR = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PIN8_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `PIN8` writer - Set as input pin 8"] -pub type PIN8_W<'a, const O: u8> = crate::BitWriter1C<'a, u32, DIRCLR_SPEC, PIN8_AW, O>; -impl<'a, const O: u8> PIN8_W<'a, O> { - #[doc = "Write: writing a '1' sets pin to input; writing a '0' has no effect"] - #[inline(always)] - pub fn clear(self) -> &'a mut W { - self.variant(PIN8_AW::CLEAR) - } -} -#[doc = "Field `PIN9` reader - Set as input pin 9"] -pub type PIN9_R = crate::BitReader; -#[doc = "Set as input pin 9\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PIN9_A { - #[doc = "0: Read: pin set as input"] - INPUT = 0, - #[doc = "1: Read: pin set as output"] - OUTPUT = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PIN9_A) -> Self { - variant as u8 != 0 - } -} -impl PIN9_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> PIN9_A { - match self.bits { - false => PIN9_A::INPUT, - true => PIN9_A::OUTPUT, - } - } - #[doc = "Checks if the value of the field is `INPUT`"] - #[inline(always)] - pub fn is_input(&self) -> bool { - *self == PIN9_A::INPUT - } - #[doc = "Checks if the value of the field is `OUTPUT`"] - #[inline(always)] - pub fn is_output(&self) -> bool { - *self == PIN9_A::OUTPUT - } -} -#[doc = "Set as input pin 9\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PIN9_AW { - #[doc = "1: Write: writing a '1' sets pin to input; writing a '0' has no effect"] - CLEAR = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PIN9_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `PIN9` writer - Set as input pin 9"] -pub type PIN9_W<'a, const O: u8> = crate::BitWriter1C<'a, u32, DIRCLR_SPEC, PIN9_AW, O>; -impl<'a, const O: u8> PIN9_W<'a, O> { - #[doc = "Write: writing a '1' sets pin to input; writing a '0' has no effect"] - #[inline(always)] - pub fn clear(self) -> &'a mut W { - self.variant(PIN9_AW::CLEAR) - } -} -#[doc = "Field `PIN10` reader - Set as input pin 10"] -pub type PIN10_R = crate::BitReader; -#[doc = "Set as input pin 10\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PIN10_A { - #[doc = "0: Read: pin set as input"] - INPUT = 0, - #[doc = "1: Read: pin set as output"] - OUTPUT = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PIN10_A) -> Self { - variant as u8 != 0 - } -} -impl PIN10_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> PIN10_A { - match self.bits { - false => PIN10_A::INPUT, - true => PIN10_A::OUTPUT, - } - } - #[doc = "Checks if the value of the field is `INPUT`"] - #[inline(always)] - pub fn is_input(&self) -> bool { - *self == PIN10_A::INPUT - } - #[doc = "Checks if the value of the field is `OUTPUT`"] - #[inline(always)] - pub fn is_output(&self) -> bool { - *self == PIN10_A::OUTPUT - } -} -#[doc = "Set as input pin 10\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PIN10_AW { - #[doc = "1: Write: writing a '1' sets pin to input; writing a '0' has no effect"] - CLEAR = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PIN10_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `PIN10` writer - Set as input pin 10"] -pub type PIN10_W<'a, const O: u8> = crate::BitWriter1C<'a, u32, DIRCLR_SPEC, PIN10_AW, O>; -impl<'a, const O: u8> PIN10_W<'a, O> { - #[doc = "Write: writing a '1' sets pin to input; writing a '0' has no effect"] - #[inline(always)] - pub fn clear(self) -> &'a mut W { - self.variant(PIN10_AW::CLEAR) - } -} -#[doc = "Field `PIN11` reader - Set as input pin 11"] -pub type PIN11_R = crate::BitReader; -#[doc = "Set as input pin 11\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PIN11_A { - #[doc = "0: Read: pin set as input"] - INPUT = 0, - #[doc = "1: Read: pin set as output"] - OUTPUT = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PIN11_A) -> Self { - variant as u8 != 0 - } -} -impl PIN11_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> PIN11_A { - match self.bits { - false => PIN11_A::INPUT, - true => PIN11_A::OUTPUT, - } - } - #[doc = "Checks if the value of the field is `INPUT`"] - #[inline(always)] - pub fn is_input(&self) -> bool { - *self == PIN11_A::INPUT - } - #[doc = "Checks if the value of the field is `OUTPUT`"] - #[inline(always)] - pub fn is_output(&self) -> bool { - *self == PIN11_A::OUTPUT - } -} -#[doc = "Set as input pin 11\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PIN11_AW { - #[doc = "1: Write: writing a '1' sets pin to input; writing a '0' has no effect"] - CLEAR = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PIN11_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `PIN11` writer - Set as input pin 11"] -pub type PIN11_W<'a, const O: u8> = crate::BitWriter1C<'a, u32, DIRCLR_SPEC, PIN11_AW, O>; -impl<'a, const O: u8> PIN11_W<'a, O> { - #[doc = "Write: writing a '1' sets pin to input; writing a '0' has no effect"] - #[inline(always)] - pub fn clear(self) -> &'a mut W { - self.variant(PIN11_AW::CLEAR) - } -} -#[doc = "Field `PIN12` reader - Set as input pin 12"] -pub type PIN12_R = crate::BitReader; -#[doc = "Set as input pin 12\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PIN12_A { - #[doc = "0: Read: pin set as input"] - INPUT = 0, - #[doc = "1: Read: pin set as output"] - OUTPUT = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PIN12_A) -> Self { - variant as u8 != 0 - } -} -impl PIN12_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> PIN12_A { - match self.bits { - false => PIN12_A::INPUT, - true => PIN12_A::OUTPUT, - } - } - #[doc = "Checks if the value of the field is `INPUT`"] - #[inline(always)] - pub fn is_input(&self) -> bool { - *self == PIN12_A::INPUT - } - #[doc = "Checks if the value of the field is `OUTPUT`"] - #[inline(always)] - pub fn is_output(&self) -> bool { - *self == PIN12_A::OUTPUT - } -} -#[doc = "Set as input pin 12\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PIN12_AW { - #[doc = "1: Write: writing a '1' sets pin to input; writing a '0' has no effect"] - CLEAR = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PIN12_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `PIN12` writer - Set as input pin 12"] -pub type PIN12_W<'a, const O: u8> = crate::BitWriter1C<'a, u32, DIRCLR_SPEC, PIN12_AW, O>; -impl<'a, const O: u8> PIN12_W<'a, O> { - #[doc = "Write: writing a '1' sets pin to input; writing a '0' has no effect"] - #[inline(always)] - pub fn clear(self) -> &'a mut W { - self.variant(PIN12_AW::CLEAR) - } -} -#[doc = "Field `PIN13` reader - Set as input pin 13"] -pub type PIN13_R = crate::BitReader; -#[doc = "Set as input pin 13\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PIN13_A { - #[doc = "0: Read: pin set as input"] - INPUT = 0, - #[doc = "1: Read: pin set as output"] - OUTPUT = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PIN13_A) -> Self { - variant as u8 != 0 - } -} -impl PIN13_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> PIN13_A { - match self.bits { - false => PIN13_A::INPUT, - true => PIN13_A::OUTPUT, - } - } - #[doc = "Checks if the value of the field is `INPUT`"] - #[inline(always)] - pub fn is_input(&self) -> bool { - *self == PIN13_A::INPUT - } - #[doc = "Checks if the value of the field is `OUTPUT`"] - #[inline(always)] - pub fn is_output(&self) -> bool { - *self == PIN13_A::OUTPUT - } -} -#[doc = "Set as input pin 13\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PIN13_AW { - #[doc = "1: Write: writing a '1' sets pin to input; writing a '0' has no effect"] - CLEAR = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PIN13_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `PIN13` writer - Set as input pin 13"] -pub type PIN13_W<'a, const O: u8> = crate::BitWriter1C<'a, u32, DIRCLR_SPEC, PIN13_AW, O>; -impl<'a, const O: u8> PIN13_W<'a, O> { - #[doc = "Write: writing a '1' sets pin to input; writing a '0' has no effect"] - #[inline(always)] - pub fn clear(self) -> &'a mut W { - self.variant(PIN13_AW::CLEAR) - } -} -#[doc = "Field `PIN14` reader - Set as input pin 14"] -pub type PIN14_R = crate::BitReader; -#[doc = "Set as input pin 14\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PIN14_A { - #[doc = "0: Read: pin set as input"] - INPUT = 0, - #[doc = "1: Read: pin set as output"] - OUTPUT = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PIN14_A) -> Self { - variant as u8 != 0 - } -} -impl PIN14_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> PIN14_A { - match self.bits { - false => PIN14_A::INPUT, - true => PIN14_A::OUTPUT, - } - } - #[doc = "Checks if the value of the field is `INPUT`"] - #[inline(always)] - pub fn is_input(&self) -> bool { - *self == PIN14_A::INPUT - } - #[doc = "Checks if the value of the field is `OUTPUT`"] - #[inline(always)] - pub fn is_output(&self) -> bool { - *self == PIN14_A::OUTPUT - } -} -#[doc = "Set as input pin 14\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PIN14_AW { - #[doc = "1: Write: writing a '1' sets pin to input; writing a '0' has no effect"] - CLEAR = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PIN14_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `PIN14` writer - Set as input pin 14"] -pub type PIN14_W<'a, const O: u8> = crate::BitWriter1C<'a, u32, DIRCLR_SPEC, PIN14_AW, O>; -impl<'a, const O: u8> PIN14_W<'a, O> { - #[doc = "Write: writing a '1' sets pin to input; writing a '0' has no effect"] - #[inline(always)] - pub fn clear(self) -> &'a mut W { - self.variant(PIN14_AW::CLEAR) - } -} -#[doc = "Field `PIN15` reader - Set as input pin 15"] -pub type PIN15_R = crate::BitReader; -#[doc = "Set as input pin 15\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PIN15_A { - #[doc = "0: Read: pin set as input"] - INPUT = 0, - #[doc = "1: Read: pin set as output"] - OUTPUT = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PIN15_A) -> Self { - variant as u8 != 0 - } -} -impl PIN15_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> PIN15_A { - match self.bits { - false => PIN15_A::INPUT, - true => PIN15_A::OUTPUT, - } - } - #[doc = "Checks if the value of the field is `INPUT`"] - #[inline(always)] - pub fn is_input(&self) -> bool { - *self == PIN15_A::INPUT - } - #[doc = "Checks if the value of the field is `OUTPUT`"] - #[inline(always)] - pub fn is_output(&self) -> bool { - *self == PIN15_A::OUTPUT - } -} -#[doc = "Set as input pin 15\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PIN15_AW { - #[doc = "1: Write: writing a '1' sets pin to input; writing a '0' has no effect"] - CLEAR = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PIN15_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `PIN15` writer - Set as input pin 15"] -pub type PIN15_W<'a, const O: u8> = crate::BitWriter1C<'a, u32, DIRCLR_SPEC, PIN15_AW, O>; -impl<'a, const O: u8> PIN15_W<'a, O> { - #[doc = "Write: writing a '1' sets pin to input; writing a '0' has no effect"] - #[inline(always)] - pub fn clear(self) -> &'a mut W { - self.variant(PIN15_AW::CLEAR) - } -} -#[doc = "Field `PIN16` reader - Set as input pin 16"] -pub type PIN16_R = crate::BitReader; -#[doc = "Set as input pin 16\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PIN16_A { - #[doc = "0: Read: pin set as input"] - INPUT = 0, - #[doc = "1: Read: pin set as output"] - OUTPUT = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PIN16_A) -> Self { - variant as u8 != 0 - } -} -impl PIN16_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> PIN16_A { - match self.bits { - false => PIN16_A::INPUT, - true => PIN16_A::OUTPUT, - } - } - #[doc = "Checks if the value of the field is `INPUT`"] - #[inline(always)] - pub fn is_input(&self) -> bool { - *self == PIN16_A::INPUT - } - #[doc = "Checks if the value of the field is `OUTPUT`"] - #[inline(always)] - pub fn is_output(&self) -> bool { - *self == PIN16_A::OUTPUT - } -} -#[doc = "Set as input pin 16\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PIN16_AW { - #[doc = "1: Write: writing a '1' sets pin to input; writing a '0' has no effect"] - CLEAR = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PIN16_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `PIN16` writer - Set as input pin 16"] -pub type PIN16_W<'a, const O: u8> = crate::BitWriter1C<'a, u32, DIRCLR_SPEC, PIN16_AW, O>; -impl<'a, const O: u8> PIN16_W<'a, O> { - #[doc = "Write: writing a '1' sets pin to input; writing a '0' has no effect"] - #[inline(always)] - pub fn clear(self) -> &'a mut W { - self.variant(PIN16_AW::CLEAR) - } -} -#[doc = "Field `PIN17` reader - Set as input pin 17"] -pub type PIN17_R = crate::BitReader; -#[doc = "Set as input pin 17\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PIN17_A { - #[doc = "0: Read: pin set as input"] - INPUT = 0, - #[doc = "1: Read: pin set as output"] - OUTPUT = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PIN17_A) -> Self { - variant as u8 != 0 - } -} -impl PIN17_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> PIN17_A { - match self.bits { - false => PIN17_A::INPUT, - true => PIN17_A::OUTPUT, - } - } - #[doc = "Checks if the value of the field is `INPUT`"] - #[inline(always)] - pub fn is_input(&self) -> bool { - *self == PIN17_A::INPUT - } - #[doc = "Checks if the value of the field is `OUTPUT`"] - #[inline(always)] - pub fn is_output(&self) -> bool { - *self == PIN17_A::OUTPUT - } -} -#[doc = "Set as input pin 17\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PIN17_AW { - #[doc = "1: Write: writing a '1' sets pin to input; writing a '0' has no effect"] - CLEAR = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PIN17_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `PIN17` writer - Set as input pin 17"] -pub type PIN17_W<'a, const O: u8> = crate::BitWriter1C<'a, u32, DIRCLR_SPEC, PIN17_AW, O>; -impl<'a, const O: u8> PIN17_W<'a, O> { - #[doc = "Write: writing a '1' sets pin to input; writing a '0' has no effect"] - #[inline(always)] - pub fn clear(self) -> &'a mut W { - self.variant(PIN17_AW::CLEAR) - } -} -#[doc = "Field `PIN18` reader - Set as input pin 18"] -pub type PIN18_R = crate::BitReader; -#[doc = "Set as input pin 18\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PIN18_A { - #[doc = "0: Read: pin set as input"] - INPUT = 0, - #[doc = "1: Read: pin set as output"] - OUTPUT = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PIN18_A) -> Self { - variant as u8 != 0 - } -} -impl PIN18_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> PIN18_A { - match self.bits { - false => PIN18_A::INPUT, - true => PIN18_A::OUTPUT, - } - } - #[doc = "Checks if the value of the field is `INPUT`"] - #[inline(always)] - pub fn is_input(&self) -> bool { - *self == PIN18_A::INPUT - } - #[doc = "Checks if the value of the field is `OUTPUT`"] - #[inline(always)] - pub fn is_output(&self) -> bool { - *self == PIN18_A::OUTPUT - } -} -#[doc = "Set as input pin 18\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PIN18_AW { - #[doc = "1: Write: writing a '1' sets pin to input; writing a '0' has no effect"] - CLEAR = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PIN18_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `PIN18` writer - Set as input pin 18"] -pub type PIN18_W<'a, const O: u8> = crate::BitWriter1C<'a, u32, DIRCLR_SPEC, PIN18_AW, O>; -impl<'a, const O: u8> PIN18_W<'a, O> { - #[doc = "Write: writing a '1' sets pin to input; writing a '0' has no effect"] - #[inline(always)] - pub fn clear(self) -> &'a mut W { - self.variant(PIN18_AW::CLEAR) - } -} -#[doc = "Field `PIN19` reader - Set as input pin 19"] -pub type PIN19_R = crate::BitReader; -#[doc = "Set as input pin 19\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PIN19_A { - #[doc = "0: Read: pin set as input"] - INPUT = 0, - #[doc = "1: Read: pin set as output"] - OUTPUT = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PIN19_A) -> Self { - variant as u8 != 0 - } -} -impl PIN19_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> PIN19_A { - match self.bits { - false => PIN19_A::INPUT, - true => PIN19_A::OUTPUT, - } - } - #[doc = "Checks if the value of the field is `INPUT`"] - #[inline(always)] - pub fn is_input(&self) -> bool { - *self == PIN19_A::INPUT - } - #[doc = "Checks if the value of the field is `OUTPUT`"] - #[inline(always)] - pub fn is_output(&self) -> bool { - *self == PIN19_A::OUTPUT - } -} -#[doc = "Set as input pin 19\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PIN19_AW { - #[doc = "1: Write: writing a '1' sets pin to input; writing a '0' has no effect"] - CLEAR = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PIN19_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `PIN19` writer - Set as input pin 19"] -pub type PIN19_W<'a, const O: u8> = crate::BitWriter1C<'a, u32, DIRCLR_SPEC, PIN19_AW, O>; -impl<'a, const O: u8> PIN19_W<'a, O> { - #[doc = "Write: writing a '1' sets pin to input; writing a '0' has no effect"] - #[inline(always)] - pub fn clear(self) -> &'a mut W { - self.variant(PIN19_AW::CLEAR) - } -} -#[doc = "Field `PIN20` reader - Set as input pin 20"] -pub type PIN20_R = crate::BitReader; -#[doc = "Set as input pin 20\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PIN20_A { - #[doc = "0: Read: pin set as input"] - INPUT = 0, - #[doc = "1: Read: pin set as output"] - OUTPUT = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PIN20_A) -> Self { - variant as u8 != 0 - } -} -impl PIN20_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> PIN20_A { - match self.bits { - false => PIN20_A::INPUT, - true => PIN20_A::OUTPUT, - } - } - #[doc = "Checks if the value of the field is `INPUT`"] - #[inline(always)] - pub fn is_input(&self) -> bool { - *self == PIN20_A::INPUT - } - #[doc = "Checks if the value of the field is `OUTPUT`"] - #[inline(always)] - pub fn is_output(&self) -> bool { - *self == PIN20_A::OUTPUT - } -} -#[doc = "Set as input pin 20\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PIN20_AW { - #[doc = "1: Write: writing a '1' sets pin to input; writing a '0' has no effect"] - CLEAR = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PIN20_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `PIN20` writer - Set as input pin 20"] -pub type PIN20_W<'a, const O: u8> = crate::BitWriter1C<'a, u32, DIRCLR_SPEC, PIN20_AW, O>; -impl<'a, const O: u8> PIN20_W<'a, O> { - #[doc = "Write: writing a '1' sets pin to input; writing a '0' has no effect"] - #[inline(always)] - pub fn clear(self) -> &'a mut W { - self.variant(PIN20_AW::CLEAR) - } -} -#[doc = "Field `PIN21` reader - Set as input pin 21"] -pub type PIN21_R = crate::BitReader; -#[doc = "Set as input pin 21\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PIN21_A { - #[doc = "0: Read: pin set as input"] - INPUT = 0, - #[doc = "1: Read: pin set as output"] - OUTPUT = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PIN21_A) -> Self { - variant as u8 != 0 - } -} -impl PIN21_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> PIN21_A { - match self.bits { - false => PIN21_A::INPUT, - true => PIN21_A::OUTPUT, - } - } - #[doc = "Checks if the value of the field is `INPUT`"] - #[inline(always)] - pub fn is_input(&self) -> bool { - *self == PIN21_A::INPUT - } - #[doc = "Checks if the value of the field is `OUTPUT`"] - #[inline(always)] - pub fn is_output(&self) -> bool { - *self == PIN21_A::OUTPUT - } -} -#[doc = "Set as input pin 21\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PIN21_AW { - #[doc = "1: Write: writing a '1' sets pin to input; writing a '0' has no effect"] - CLEAR = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PIN21_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `PIN21` writer - Set as input pin 21"] -pub type PIN21_W<'a, const O: u8> = crate::BitWriter1C<'a, u32, DIRCLR_SPEC, PIN21_AW, O>; -impl<'a, const O: u8> PIN21_W<'a, O> { - #[doc = "Write: writing a '1' sets pin to input; writing a '0' has no effect"] - #[inline(always)] - pub fn clear(self) -> &'a mut W { - self.variant(PIN21_AW::CLEAR) - } -} -#[doc = "Field `PIN22` reader - Set as input pin 22"] -pub type PIN22_R = crate::BitReader; -#[doc = "Set as input pin 22\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PIN22_A { - #[doc = "0: Read: pin set as input"] - INPUT = 0, - #[doc = "1: Read: pin set as output"] - OUTPUT = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PIN22_A) -> Self { - variant as u8 != 0 - } -} -impl PIN22_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> PIN22_A { - match self.bits { - false => PIN22_A::INPUT, - true => PIN22_A::OUTPUT, - } - } - #[doc = "Checks if the value of the field is `INPUT`"] - #[inline(always)] - pub fn is_input(&self) -> bool { - *self == PIN22_A::INPUT - } - #[doc = "Checks if the value of the field is `OUTPUT`"] - #[inline(always)] - pub fn is_output(&self) -> bool { - *self == PIN22_A::OUTPUT - } -} -#[doc = "Set as input pin 22\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PIN22_AW { - #[doc = "1: Write: writing a '1' sets pin to input; writing a '0' has no effect"] - CLEAR = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PIN22_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `PIN22` writer - Set as input pin 22"] -pub type PIN22_W<'a, const O: u8> = crate::BitWriter1C<'a, u32, DIRCLR_SPEC, PIN22_AW, O>; -impl<'a, const O: u8> PIN22_W<'a, O> { - #[doc = "Write: writing a '1' sets pin to input; writing a '0' has no effect"] - #[inline(always)] - pub fn clear(self) -> &'a mut W { - self.variant(PIN22_AW::CLEAR) - } -} -#[doc = "Field `PIN23` reader - Set as input pin 23"] -pub type PIN23_R = crate::BitReader; -#[doc = "Set as input pin 23\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PIN23_A { - #[doc = "0: Read: pin set as input"] - INPUT = 0, - #[doc = "1: Read: pin set as output"] - OUTPUT = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PIN23_A) -> Self { - variant as u8 != 0 - } -} -impl PIN23_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> PIN23_A { - match self.bits { - false => PIN23_A::INPUT, - true => PIN23_A::OUTPUT, - } - } - #[doc = "Checks if the value of the field is `INPUT`"] - #[inline(always)] - pub fn is_input(&self) -> bool { - *self == PIN23_A::INPUT - } - #[doc = "Checks if the value of the field is `OUTPUT`"] - #[inline(always)] - pub fn is_output(&self) -> bool { - *self == PIN23_A::OUTPUT - } -} -#[doc = "Set as input pin 23\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PIN23_AW { - #[doc = "1: Write: writing a '1' sets pin to input; writing a '0' has no effect"] - CLEAR = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PIN23_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `PIN23` writer - Set as input pin 23"] -pub type PIN23_W<'a, const O: u8> = crate::BitWriter1C<'a, u32, DIRCLR_SPEC, PIN23_AW, O>; -impl<'a, const O: u8> PIN23_W<'a, O> { - #[doc = "Write: writing a '1' sets pin to input; writing a '0' has no effect"] - #[inline(always)] - pub fn clear(self) -> &'a mut W { - self.variant(PIN23_AW::CLEAR) - } -} -#[doc = "Field `PIN24` reader - Set as input pin 24"] -pub type PIN24_R = crate::BitReader; -#[doc = "Set as input pin 24\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PIN24_A { - #[doc = "0: Read: pin set as input"] - INPUT = 0, - #[doc = "1: Read: pin set as output"] - OUTPUT = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PIN24_A) -> Self { - variant as u8 != 0 - } -} -impl PIN24_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> PIN24_A { - match self.bits { - false => PIN24_A::INPUT, - true => PIN24_A::OUTPUT, - } - } - #[doc = "Checks if the value of the field is `INPUT`"] - #[inline(always)] - pub fn is_input(&self) -> bool { - *self == PIN24_A::INPUT - } - #[doc = "Checks if the value of the field is `OUTPUT`"] - #[inline(always)] - pub fn is_output(&self) -> bool { - *self == PIN24_A::OUTPUT - } -} -#[doc = "Set as input pin 24\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PIN24_AW { - #[doc = "1: Write: writing a '1' sets pin to input; writing a '0' has no effect"] - CLEAR = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PIN24_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `PIN24` writer - Set as input pin 24"] -pub type PIN24_W<'a, const O: u8> = crate::BitWriter1C<'a, u32, DIRCLR_SPEC, PIN24_AW, O>; -impl<'a, const O: u8> PIN24_W<'a, O> { - #[doc = "Write: writing a '1' sets pin to input; writing a '0' has no effect"] - #[inline(always)] - pub fn clear(self) -> &'a mut W { - self.variant(PIN24_AW::CLEAR) - } -} -#[doc = "Field `PIN25` reader - Set as input pin 25"] -pub type PIN25_R = crate::BitReader; -#[doc = "Set as input pin 25\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PIN25_A { - #[doc = "0: Read: pin set as input"] - INPUT = 0, - #[doc = "1: Read: pin set as output"] - OUTPUT = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PIN25_A) -> Self { - variant as u8 != 0 - } -} -impl PIN25_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> PIN25_A { - match self.bits { - false => PIN25_A::INPUT, - true => PIN25_A::OUTPUT, - } - } - #[doc = "Checks if the value of the field is `INPUT`"] - #[inline(always)] - pub fn is_input(&self) -> bool { - *self == PIN25_A::INPUT - } - #[doc = "Checks if the value of the field is `OUTPUT`"] - #[inline(always)] - pub fn is_output(&self) -> bool { - *self == PIN25_A::OUTPUT - } -} -#[doc = "Set as input pin 25\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PIN25_AW { - #[doc = "1: Write: writing a '1' sets pin to input; writing a '0' has no effect"] - CLEAR = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PIN25_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `PIN25` writer - Set as input pin 25"] -pub type PIN25_W<'a, const O: u8> = crate::BitWriter1C<'a, u32, DIRCLR_SPEC, PIN25_AW, O>; -impl<'a, const O: u8> PIN25_W<'a, O> { - #[doc = "Write: writing a '1' sets pin to input; writing a '0' has no effect"] - #[inline(always)] - pub fn clear(self) -> &'a mut W { - self.variant(PIN25_AW::CLEAR) - } -} -#[doc = "Field `PIN26` reader - Set as input pin 26"] -pub type PIN26_R = crate::BitReader; -#[doc = "Set as input pin 26\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PIN26_A { - #[doc = "0: Read: pin set as input"] - INPUT = 0, - #[doc = "1: Read: pin set as output"] - OUTPUT = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PIN26_A) -> Self { - variant as u8 != 0 - } -} -impl PIN26_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> PIN26_A { - match self.bits { - false => PIN26_A::INPUT, - true => PIN26_A::OUTPUT, - } - } - #[doc = "Checks if the value of the field is `INPUT`"] - #[inline(always)] - pub fn is_input(&self) -> bool { - *self == PIN26_A::INPUT - } - #[doc = "Checks if the value of the field is `OUTPUT`"] - #[inline(always)] - pub fn is_output(&self) -> bool { - *self == PIN26_A::OUTPUT - } -} -#[doc = "Set as input pin 26\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PIN26_AW { - #[doc = "1: Write: writing a '1' sets pin to input; writing a '0' has no effect"] - CLEAR = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PIN26_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `PIN26` writer - Set as input pin 26"] -pub type PIN26_W<'a, const O: u8> = crate::BitWriter1C<'a, u32, DIRCLR_SPEC, PIN26_AW, O>; -impl<'a, const O: u8> PIN26_W<'a, O> { - #[doc = "Write: writing a '1' sets pin to input; writing a '0' has no effect"] - #[inline(always)] - pub fn clear(self) -> &'a mut W { - self.variant(PIN26_AW::CLEAR) - } -} -#[doc = "Field `PIN27` reader - Set as input pin 27"] -pub type PIN27_R = crate::BitReader; -#[doc = "Set as input pin 27\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PIN27_A { - #[doc = "0: Read: pin set as input"] - INPUT = 0, - #[doc = "1: Read: pin set as output"] - OUTPUT = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PIN27_A) -> Self { - variant as u8 != 0 - } -} -impl PIN27_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> PIN27_A { - match self.bits { - false => PIN27_A::INPUT, - true => PIN27_A::OUTPUT, - } - } - #[doc = "Checks if the value of the field is `INPUT`"] - #[inline(always)] - pub fn is_input(&self) -> bool { - *self == PIN27_A::INPUT - } - #[doc = "Checks if the value of the field is `OUTPUT`"] - #[inline(always)] - pub fn is_output(&self) -> bool { - *self == PIN27_A::OUTPUT - } -} -#[doc = "Set as input pin 27\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PIN27_AW { - #[doc = "1: Write: writing a '1' sets pin to input; writing a '0' has no effect"] - CLEAR = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PIN27_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `PIN27` writer - Set as input pin 27"] -pub type PIN27_W<'a, const O: u8> = crate::BitWriter1C<'a, u32, DIRCLR_SPEC, PIN27_AW, O>; -impl<'a, const O: u8> PIN27_W<'a, O> { - #[doc = "Write: writing a '1' sets pin to input; writing a '0' has no effect"] - #[inline(always)] - pub fn clear(self) -> &'a mut W { - self.variant(PIN27_AW::CLEAR) - } -} -#[doc = "Field `PIN28` reader - Set as input pin 28"] -pub type PIN28_R = crate::BitReader; -#[doc = "Set as input pin 28\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PIN28_A { - #[doc = "0: Read: pin set as input"] - INPUT = 0, - #[doc = "1: Read: pin set as output"] - OUTPUT = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PIN28_A) -> Self { - variant as u8 != 0 - } -} -impl PIN28_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> PIN28_A { - match self.bits { - false => PIN28_A::INPUT, - true => PIN28_A::OUTPUT, - } - } - #[doc = "Checks if the value of the field is `INPUT`"] - #[inline(always)] - pub fn is_input(&self) -> bool { - *self == PIN28_A::INPUT - } - #[doc = "Checks if the value of the field is `OUTPUT`"] - #[inline(always)] - pub fn is_output(&self) -> bool { - *self == PIN28_A::OUTPUT - } -} -#[doc = "Set as input pin 28\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PIN28_AW { - #[doc = "1: Write: writing a '1' sets pin to input; writing a '0' has no effect"] - CLEAR = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PIN28_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `PIN28` writer - Set as input pin 28"] -pub type PIN28_W<'a, const O: u8> = crate::BitWriter1C<'a, u32, DIRCLR_SPEC, PIN28_AW, O>; -impl<'a, const O: u8> PIN28_W<'a, O> { - #[doc = "Write: writing a '1' sets pin to input; writing a '0' has no effect"] - #[inline(always)] - pub fn clear(self) -> &'a mut W { - self.variant(PIN28_AW::CLEAR) - } -} -#[doc = "Field `PIN29` reader - Set as input pin 29"] -pub type PIN29_R = crate::BitReader; -#[doc = "Set as input pin 29\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PIN29_A { - #[doc = "0: Read: pin set as input"] - INPUT = 0, - #[doc = "1: Read: pin set as output"] - OUTPUT = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PIN29_A) -> Self { - variant as u8 != 0 - } -} -impl PIN29_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> PIN29_A { - match self.bits { - false => PIN29_A::INPUT, - true => PIN29_A::OUTPUT, - } - } - #[doc = "Checks if the value of the field is `INPUT`"] - #[inline(always)] - pub fn is_input(&self) -> bool { - *self == PIN29_A::INPUT - } - #[doc = "Checks if the value of the field is `OUTPUT`"] - #[inline(always)] - pub fn is_output(&self) -> bool { - *self == PIN29_A::OUTPUT - } -} -#[doc = "Set as input pin 29\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PIN29_AW { - #[doc = "1: Write: writing a '1' sets pin to input; writing a '0' has no effect"] - CLEAR = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PIN29_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `PIN29` writer - Set as input pin 29"] -pub type PIN29_W<'a, const O: u8> = crate::BitWriter1C<'a, u32, DIRCLR_SPEC, PIN29_AW, O>; -impl<'a, const O: u8> PIN29_W<'a, O> { - #[doc = "Write: writing a '1' sets pin to input; writing a '0' has no effect"] - #[inline(always)] - pub fn clear(self) -> &'a mut W { - self.variant(PIN29_AW::CLEAR) - } -} -#[doc = "Field `PIN30` reader - Set as input pin 30"] -pub type PIN30_R = crate::BitReader; -#[doc = "Set as input pin 30\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PIN30_A { - #[doc = "0: Read: pin set as input"] - INPUT = 0, - #[doc = "1: Read: pin set as output"] - OUTPUT = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PIN30_A) -> Self { - variant as u8 != 0 - } -} -impl PIN30_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> PIN30_A { - match self.bits { - false => PIN30_A::INPUT, - true => PIN30_A::OUTPUT, - } - } - #[doc = "Checks if the value of the field is `INPUT`"] - #[inline(always)] - pub fn is_input(&self) -> bool { - *self == PIN30_A::INPUT - } - #[doc = "Checks if the value of the field is `OUTPUT`"] - #[inline(always)] - pub fn is_output(&self) -> bool { - *self == PIN30_A::OUTPUT - } -} -#[doc = "Set as input pin 30\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PIN30_AW { - #[doc = "1: Write: writing a '1' sets pin to input; writing a '0' has no effect"] - CLEAR = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PIN30_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `PIN30` writer - Set as input pin 30"] -pub type PIN30_W<'a, const O: u8> = crate::BitWriter1C<'a, u32, DIRCLR_SPEC, PIN30_AW, O>; -impl<'a, const O: u8> PIN30_W<'a, O> { - #[doc = "Write: writing a '1' sets pin to input; writing a '0' has no effect"] - #[inline(always)] - pub fn clear(self) -> &'a mut W { - self.variant(PIN30_AW::CLEAR) - } -} -#[doc = "Field `PIN31` reader - Set as input pin 31"] -pub type PIN31_R = crate::BitReader; -#[doc = "Set as input pin 31\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PIN31_A { - #[doc = "0: Read: pin set as input"] - INPUT = 0, - #[doc = "1: Read: pin set as output"] - OUTPUT = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PIN31_A) -> Self { - variant as u8 != 0 - } -} -impl PIN31_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> PIN31_A { - match self.bits { - false => PIN31_A::INPUT, - true => PIN31_A::OUTPUT, - } - } - #[doc = "Checks if the value of the field is `INPUT`"] - #[inline(always)] - pub fn is_input(&self) -> bool { - *self == PIN31_A::INPUT - } - #[doc = "Checks if the value of the field is `OUTPUT`"] - #[inline(always)] - pub fn is_output(&self) -> bool { - *self == PIN31_A::OUTPUT - } -} -#[doc = "Set as input pin 31\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PIN31_AW { - #[doc = "1: Write: writing a '1' sets pin to input; writing a '0' has no effect"] - CLEAR = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PIN31_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `PIN31` writer - Set as input pin 31"] -pub type PIN31_W<'a, const O: u8> = crate::BitWriter1C<'a, u32, DIRCLR_SPEC, PIN31_AW, O>; -impl<'a, const O: u8> PIN31_W<'a, O> { - #[doc = "Write: writing a '1' sets pin to input; writing a '0' has no effect"] - #[inline(always)] - pub fn clear(self) -> &'a mut W { - self.variant(PIN31_AW::CLEAR) - } -} -impl R { - #[doc = "Bit 0 - Set as input pin 0"] - #[inline(always)] - pub fn pin0(&self) -> PIN0_R { - PIN0_R::new((self.bits & 1) != 0) - } - #[doc = "Bit 1 - Set as input pin 1"] - #[inline(always)] - pub fn pin1(&self) -> PIN1_R { - PIN1_R::new(((self.bits >> 1) & 1) != 0) - } - #[doc = "Bit 2 - Set as input pin 2"] - #[inline(always)] - pub fn pin2(&self) -> PIN2_R { - PIN2_R::new(((self.bits >> 2) & 1) != 0) - } - #[doc = "Bit 3 - Set as input pin 3"] - #[inline(always)] - pub fn pin3(&self) -> PIN3_R { - PIN3_R::new(((self.bits >> 3) & 1) != 0) - } - #[doc = "Bit 4 - Set as input pin 4"] - #[inline(always)] - pub fn pin4(&self) -> PIN4_R { - PIN4_R::new(((self.bits >> 4) & 1) != 0) - } - #[doc = "Bit 5 - Set as input pin 5"] - #[inline(always)] - pub fn pin5(&self) -> PIN5_R { - PIN5_R::new(((self.bits >> 5) & 1) != 0) - } - #[doc = "Bit 6 - Set as input pin 6"] - #[inline(always)] - pub fn pin6(&self) -> PIN6_R { - PIN6_R::new(((self.bits >> 6) & 1) != 0) - } - #[doc = "Bit 7 - Set as input pin 7"] - #[inline(always)] - pub fn pin7(&self) -> PIN7_R { - PIN7_R::new(((self.bits >> 7) & 1) != 0) - } - #[doc = "Bit 8 - Set as input pin 8"] - #[inline(always)] - pub fn pin8(&self) -> PIN8_R { - PIN8_R::new(((self.bits >> 8) & 1) != 0) - } - #[doc = "Bit 9 - Set as input pin 9"] - #[inline(always)] - pub fn pin9(&self) -> PIN9_R { - PIN9_R::new(((self.bits >> 9) & 1) != 0) - } - #[doc = "Bit 10 - Set as input pin 10"] - #[inline(always)] - pub fn pin10(&self) -> PIN10_R { - PIN10_R::new(((self.bits >> 10) & 1) != 0) - } - #[doc = "Bit 11 - Set as input pin 11"] - #[inline(always)] - pub fn pin11(&self) -> PIN11_R { - PIN11_R::new(((self.bits >> 11) & 1) != 0) - } - #[doc = "Bit 12 - Set as input pin 12"] - #[inline(always)] - pub fn pin12(&self) -> PIN12_R { - PIN12_R::new(((self.bits >> 12) & 1) != 0) - } - #[doc = "Bit 13 - Set as input pin 13"] - #[inline(always)] - pub fn pin13(&self) -> PIN13_R { - PIN13_R::new(((self.bits >> 13) & 1) != 0) - } - #[doc = "Bit 14 - Set as input pin 14"] - #[inline(always)] - pub fn pin14(&self) -> PIN14_R { - PIN14_R::new(((self.bits >> 14) & 1) != 0) - } - #[doc = "Bit 15 - Set as input pin 15"] - #[inline(always)] - pub fn pin15(&self) -> PIN15_R { - PIN15_R::new(((self.bits >> 15) & 1) != 0) - } - #[doc = "Bit 16 - Set as input pin 16"] - #[inline(always)] - pub fn pin16(&self) -> PIN16_R { - PIN16_R::new(((self.bits >> 16) & 1) != 0) - } - #[doc = "Bit 17 - Set as input pin 17"] - #[inline(always)] - pub fn pin17(&self) -> PIN17_R { - PIN17_R::new(((self.bits >> 17) & 1) != 0) - } - #[doc = "Bit 18 - Set as input pin 18"] - #[inline(always)] - pub fn pin18(&self) -> PIN18_R { - PIN18_R::new(((self.bits >> 18) & 1) != 0) - } - #[doc = "Bit 19 - Set as input pin 19"] - #[inline(always)] - pub fn pin19(&self) -> PIN19_R { - PIN19_R::new(((self.bits >> 19) & 1) != 0) - } - #[doc = "Bit 20 - Set as input pin 20"] - #[inline(always)] - pub fn pin20(&self) -> PIN20_R { - PIN20_R::new(((self.bits >> 20) & 1) != 0) - } - #[doc = "Bit 21 - Set as input pin 21"] - #[inline(always)] - pub fn pin21(&self) -> PIN21_R { - PIN21_R::new(((self.bits >> 21) & 1) != 0) - } - #[doc = "Bit 22 - Set as input pin 22"] - #[inline(always)] - pub fn pin22(&self) -> PIN22_R { - PIN22_R::new(((self.bits >> 22) & 1) != 0) - } - #[doc = "Bit 23 - Set as input pin 23"] - #[inline(always)] - pub fn pin23(&self) -> PIN23_R { - PIN23_R::new(((self.bits >> 23) & 1) != 0) - } - #[doc = "Bit 24 - Set as input pin 24"] - #[inline(always)] - pub fn pin24(&self) -> PIN24_R { - PIN24_R::new(((self.bits >> 24) & 1) != 0) - } - #[doc = "Bit 25 - Set as input pin 25"] - #[inline(always)] - pub fn pin25(&self) -> PIN25_R { - PIN25_R::new(((self.bits >> 25) & 1) != 0) - } - #[doc = "Bit 26 - Set as input pin 26"] - #[inline(always)] - pub fn pin26(&self) -> PIN26_R { - PIN26_R::new(((self.bits >> 26) & 1) != 0) - } - #[doc = "Bit 27 - Set as input pin 27"] - #[inline(always)] - pub fn pin27(&self) -> PIN27_R { - PIN27_R::new(((self.bits >> 27) & 1) != 0) - } - #[doc = "Bit 28 - Set as input pin 28"] - #[inline(always)] - pub fn pin28(&self) -> PIN28_R { - PIN28_R::new(((self.bits >> 28) & 1) != 0) - } - #[doc = "Bit 29 - Set as input pin 29"] - #[inline(always)] - pub fn pin29(&self) -> PIN29_R { - PIN29_R::new(((self.bits >> 29) & 1) != 0) - } - #[doc = "Bit 30 - Set as input pin 30"] - #[inline(always)] - pub fn pin30(&self) -> PIN30_R { - PIN30_R::new(((self.bits >> 30) & 1) != 0) - } - #[doc = "Bit 31 - Set as input pin 31"] - #[inline(always)] - pub fn pin31(&self) -> PIN31_R { - PIN31_R::new(((self.bits >> 31) & 1) != 0) - } -} -impl W { - #[doc = "Bit 0 - Set as input pin 0"] - #[inline(always)] - #[must_use] - pub fn pin0(&mut self) -> PIN0_W<0> { - PIN0_W::new(self) - } - #[doc = "Bit 1 - Set as input pin 1"] - #[inline(always)] - #[must_use] - pub fn pin1(&mut self) -> PIN1_W<1> { - PIN1_W::new(self) - } - #[doc = "Bit 2 - Set as input pin 2"] - #[inline(always)] - #[must_use] - pub fn pin2(&mut self) -> PIN2_W<2> { - PIN2_W::new(self) - } - #[doc = "Bit 3 - Set as input pin 3"] - #[inline(always)] - #[must_use] - pub fn pin3(&mut self) -> PIN3_W<3> { - PIN3_W::new(self) - } - #[doc = "Bit 4 - Set as input pin 4"] - #[inline(always)] - #[must_use] - pub fn pin4(&mut self) -> PIN4_W<4> { - PIN4_W::new(self) - } - #[doc = "Bit 5 - Set as input pin 5"] - #[inline(always)] - #[must_use] - pub fn pin5(&mut self) -> PIN5_W<5> { - PIN5_W::new(self) - } - #[doc = "Bit 6 - Set as input pin 6"] - #[inline(always)] - #[must_use] - pub fn pin6(&mut self) -> PIN6_W<6> { - PIN6_W::new(self) - } - #[doc = "Bit 7 - Set as input pin 7"] - #[inline(always)] - #[must_use] - pub fn pin7(&mut self) -> PIN7_W<7> { - PIN7_W::new(self) - } - #[doc = "Bit 8 - Set as input pin 8"] - #[inline(always)] - #[must_use] - pub fn pin8(&mut self) -> PIN8_W<8> { - PIN8_W::new(self) - } - #[doc = "Bit 9 - Set as input pin 9"] - #[inline(always)] - #[must_use] - pub fn pin9(&mut self) -> PIN9_W<9> { - PIN9_W::new(self) - } - #[doc = "Bit 10 - Set as input pin 10"] - #[inline(always)] - #[must_use] - pub fn pin10(&mut self) -> PIN10_W<10> { - PIN10_W::new(self) - } - #[doc = "Bit 11 - Set as input pin 11"] - #[inline(always)] - #[must_use] - pub fn pin11(&mut self) -> PIN11_W<11> { - PIN11_W::new(self) - } - #[doc = "Bit 12 - Set as input pin 12"] - #[inline(always)] - #[must_use] - pub fn pin12(&mut self) -> PIN12_W<12> { - PIN12_W::new(self) - } - #[doc = "Bit 13 - Set as input pin 13"] - #[inline(always)] - #[must_use] - pub fn pin13(&mut self) -> PIN13_W<13> { - PIN13_W::new(self) - } - #[doc = "Bit 14 - Set as input pin 14"] - #[inline(always)] - #[must_use] - pub fn pin14(&mut self) -> PIN14_W<14> { - PIN14_W::new(self) - } - #[doc = "Bit 15 - Set as input pin 15"] - #[inline(always)] - #[must_use] - pub fn pin15(&mut self) -> PIN15_W<15> { - PIN15_W::new(self) - } - #[doc = "Bit 16 - Set as input pin 16"] - #[inline(always)] - #[must_use] - pub fn pin16(&mut self) -> PIN16_W<16> { - PIN16_W::new(self) - } - #[doc = "Bit 17 - Set as input pin 17"] - #[inline(always)] - #[must_use] - pub fn pin17(&mut self) -> PIN17_W<17> { - PIN17_W::new(self) - } - #[doc = "Bit 18 - Set as input pin 18"] - #[inline(always)] - #[must_use] - pub fn pin18(&mut self) -> PIN18_W<18> { - PIN18_W::new(self) - } - #[doc = "Bit 19 - Set as input pin 19"] - #[inline(always)] - #[must_use] - pub fn pin19(&mut self) -> PIN19_W<19> { - PIN19_W::new(self) - } - #[doc = "Bit 20 - Set as input pin 20"] - #[inline(always)] - #[must_use] - pub fn pin20(&mut self) -> PIN20_W<20> { - PIN20_W::new(self) - } - #[doc = "Bit 21 - Set as input pin 21"] - #[inline(always)] - #[must_use] - pub fn pin21(&mut self) -> PIN21_W<21> { - PIN21_W::new(self) - } - #[doc = "Bit 22 - Set as input pin 22"] - #[inline(always)] - #[must_use] - pub fn pin22(&mut self) -> PIN22_W<22> { - PIN22_W::new(self) - } - #[doc = "Bit 23 - Set as input pin 23"] - #[inline(always)] - #[must_use] - pub fn pin23(&mut self) -> PIN23_W<23> { - PIN23_W::new(self) - } - #[doc = "Bit 24 - Set as input pin 24"] - #[inline(always)] - #[must_use] - pub fn pin24(&mut self) -> PIN24_W<24> { - PIN24_W::new(self) - } - #[doc = "Bit 25 - Set as input pin 25"] - #[inline(always)] - #[must_use] - pub fn pin25(&mut self) -> PIN25_W<25> { - PIN25_W::new(self) - } - #[doc = "Bit 26 - Set as input pin 26"] - #[inline(always)] - #[must_use] - pub fn pin26(&mut self) -> PIN26_W<26> { - PIN26_W::new(self) - } - #[doc = "Bit 27 - Set as input pin 27"] - #[inline(always)] - #[must_use] - pub fn pin27(&mut self) -> PIN27_W<27> { - PIN27_W::new(self) - } - #[doc = "Bit 28 - Set as input pin 28"] - #[inline(always)] - #[must_use] - pub fn pin28(&mut self) -> PIN28_W<28> { - PIN28_W::new(self) - } - #[doc = "Bit 29 - Set as input pin 29"] - #[inline(always)] - #[must_use] - pub fn pin29(&mut self) -> PIN29_W<29> { - PIN29_W::new(self) - } - #[doc = "Bit 30 - Set as input pin 30"] - #[inline(always)] - #[must_use] - pub fn pin30(&mut self) -> PIN30_W<30> { - PIN30_W::new(self) - } - #[doc = "Bit 31 - Set as input pin 31"] - #[inline(always)] - #[must_use] - pub fn pin31(&mut self) -> PIN31_W<31> { - PIN31_W::new(self) - } - #[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 = "DIR clear register\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 [dirclr](index.html) module"] -pub struct DIRCLR_SPEC; -impl crate::RegisterSpec for DIRCLR_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [dirclr::R](R) reader structure"] -impl crate::Readable for DIRCLR_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [dirclr::W](W) writer structure"] -impl crate::Writable for DIRCLR_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0xffff_ffff; -} -#[doc = "`reset()` method sets DIRCLR to value 0"] -impl crate::Resettable for DIRCLR_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/p0/dirset.rs b/down-the-stack/dk_pac/src/p0/dirset.rs deleted file mode 100644 index 51baaca..0000000 --- a/down-the-stack/dk_pac/src/p0/dirset.rs +++ /dev/null @@ -1,2241 +0,0 @@ -#[doc = "Register `DIRSET` 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 `DIRSET` 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 `PIN0` reader - Set as output pin 0"] -pub type PIN0_R = crate::BitReader; -#[doc = "Set as output pin 0\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PIN0_A { - #[doc = "0: Read: pin set as input"] - INPUT = 0, - #[doc = "1: Read: pin set as output"] - OUTPUT = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PIN0_A) -> Self { - variant as u8 != 0 - } -} -impl PIN0_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> PIN0_A { - match self.bits { - false => PIN0_A::INPUT, - true => PIN0_A::OUTPUT, - } - } - #[doc = "Checks if the value of the field is `INPUT`"] - #[inline(always)] - pub fn is_input(&self) -> bool { - *self == PIN0_A::INPUT - } - #[doc = "Checks if the value of the field is `OUTPUT`"] - #[inline(always)] - pub fn is_output(&self) -> bool { - *self == PIN0_A::OUTPUT - } -} -#[doc = "Set as output pin 0\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PIN0_AW { - #[doc = "1: Write: writing a '1' sets pin to output; writing a '0' has no effect"] - SET = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PIN0_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `PIN0` writer - Set as output pin 0"] -pub type PIN0_W<'a, const O: u8> = crate::BitWriter1S<'a, u32, DIRSET_SPEC, PIN0_AW, O>; -impl<'a, const O: u8> PIN0_W<'a, O> { - #[doc = "Write: writing a '1' sets pin to output; writing a '0' has no effect"] - #[inline(always)] - pub fn set(self) -> &'a mut W { - self.variant(PIN0_AW::SET) - } -} -#[doc = "Field `PIN1` reader - Set as output pin 1"] -pub type PIN1_R = crate::BitReader; -#[doc = "Set as output pin 1\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PIN1_A { - #[doc = "0: Read: pin set as input"] - INPUT = 0, - #[doc = "1: Read: pin set as output"] - OUTPUT = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PIN1_A) -> Self { - variant as u8 != 0 - } -} -impl PIN1_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> PIN1_A { - match self.bits { - false => PIN1_A::INPUT, - true => PIN1_A::OUTPUT, - } - } - #[doc = "Checks if the value of the field is `INPUT`"] - #[inline(always)] - pub fn is_input(&self) -> bool { - *self == PIN1_A::INPUT - } - #[doc = "Checks if the value of the field is `OUTPUT`"] - #[inline(always)] - pub fn is_output(&self) -> bool { - *self == PIN1_A::OUTPUT - } -} -#[doc = "Set as output pin 1\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PIN1_AW { - #[doc = "1: Write: writing a '1' sets pin to output; writing a '0' has no effect"] - SET = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PIN1_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `PIN1` writer - Set as output pin 1"] -pub type PIN1_W<'a, const O: u8> = crate::BitWriter1S<'a, u32, DIRSET_SPEC, PIN1_AW, O>; -impl<'a, const O: u8> PIN1_W<'a, O> { - #[doc = "Write: writing a '1' sets pin to output; writing a '0' has no effect"] - #[inline(always)] - pub fn set(self) -> &'a mut W { - self.variant(PIN1_AW::SET) - } -} -#[doc = "Field `PIN2` reader - Set as output pin 2"] -pub type PIN2_R = crate::BitReader; -#[doc = "Set as output pin 2\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PIN2_A { - #[doc = "0: Read: pin set as input"] - INPUT = 0, - #[doc = "1: Read: pin set as output"] - OUTPUT = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PIN2_A) -> Self { - variant as u8 != 0 - } -} -impl PIN2_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> PIN2_A { - match self.bits { - false => PIN2_A::INPUT, - true => PIN2_A::OUTPUT, - } - } - #[doc = "Checks if the value of the field is `INPUT`"] - #[inline(always)] - pub fn is_input(&self) -> bool { - *self == PIN2_A::INPUT - } - #[doc = "Checks if the value of the field is `OUTPUT`"] - #[inline(always)] - pub fn is_output(&self) -> bool { - *self == PIN2_A::OUTPUT - } -} -#[doc = "Set as output pin 2\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PIN2_AW { - #[doc = "1: Write: writing a '1' sets pin to output; writing a '0' has no effect"] - SET = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PIN2_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `PIN2` writer - Set as output pin 2"] -pub type PIN2_W<'a, const O: u8> = crate::BitWriter1S<'a, u32, DIRSET_SPEC, PIN2_AW, O>; -impl<'a, const O: u8> PIN2_W<'a, O> { - #[doc = "Write: writing a '1' sets pin to output; writing a '0' has no effect"] - #[inline(always)] - pub fn set(self) -> &'a mut W { - self.variant(PIN2_AW::SET) - } -} -#[doc = "Field `PIN3` reader - Set as output pin 3"] -pub type PIN3_R = crate::BitReader; -#[doc = "Set as output pin 3\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PIN3_A { - #[doc = "0: Read: pin set as input"] - INPUT = 0, - #[doc = "1: Read: pin set as output"] - OUTPUT = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PIN3_A) -> Self { - variant as u8 != 0 - } -} -impl PIN3_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> PIN3_A { - match self.bits { - false => PIN3_A::INPUT, - true => PIN3_A::OUTPUT, - } - } - #[doc = "Checks if the value of the field is `INPUT`"] - #[inline(always)] - pub fn is_input(&self) -> bool { - *self == PIN3_A::INPUT - } - #[doc = "Checks if the value of the field is `OUTPUT`"] - #[inline(always)] - pub fn is_output(&self) -> bool { - *self == PIN3_A::OUTPUT - } -} -#[doc = "Set as output pin 3\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PIN3_AW { - #[doc = "1: Write: writing a '1' sets pin to output; writing a '0' has no effect"] - SET = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PIN3_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `PIN3` writer - Set as output pin 3"] -pub type PIN3_W<'a, const O: u8> = crate::BitWriter1S<'a, u32, DIRSET_SPEC, PIN3_AW, O>; -impl<'a, const O: u8> PIN3_W<'a, O> { - #[doc = "Write: writing a '1' sets pin to output; writing a '0' has no effect"] - #[inline(always)] - pub fn set(self) -> &'a mut W { - self.variant(PIN3_AW::SET) - } -} -#[doc = "Field `PIN4` reader - Set as output pin 4"] -pub type PIN4_R = crate::BitReader; -#[doc = "Set as output pin 4\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PIN4_A { - #[doc = "0: Read: pin set as input"] - INPUT = 0, - #[doc = "1: Read: pin set as output"] - OUTPUT = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PIN4_A) -> Self { - variant as u8 != 0 - } -} -impl PIN4_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> PIN4_A { - match self.bits { - false => PIN4_A::INPUT, - true => PIN4_A::OUTPUT, - } - } - #[doc = "Checks if the value of the field is `INPUT`"] - #[inline(always)] - pub fn is_input(&self) -> bool { - *self == PIN4_A::INPUT - } - #[doc = "Checks if the value of the field is `OUTPUT`"] - #[inline(always)] - pub fn is_output(&self) -> bool { - *self == PIN4_A::OUTPUT - } -} -#[doc = "Set as output pin 4\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PIN4_AW { - #[doc = "1: Write: writing a '1' sets pin to output; writing a '0' has no effect"] - SET = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PIN4_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `PIN4` writer - Set as output pin 4"] -pub type PIN4_W<'a, const O: u8> = crate::BitWriter1S<'a, u32, DIRSET_SPEC, PIN4_AW, O>; -impl<'a, const O: u8> PIN4_W<'a, O> { - #[doc = "Write: writing a '1' sets pin to output; writing a '0' has no effect"] - #[inline(always)] - pub fn set(self) -> &'a mut W { - self.variant(PIN4_AW::SET) - } -} -#[doc = "Field `PIN5` reader - Set as output pin 5"] -pub type PIN5_R = crate::BitReader; -#[doc = "Set as output pin 5\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PIN5_A { - #[doc = "0: Read: pin set as input"] - INPUT = 0, - #[doc = "1: Read: pin set as output"] - OUTPUT = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PIN5_A) -> Self { - variant as u8 != 0 - } -} -impl PIN5_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> PIN5_A { - match self.bits { - false => PIN5_A::INPUT, - true => PIN5_A::OUTPUT, - } - } - #[doc = "Checks if the value of the field is `INPUT`"] - #[inline(always)] - pub fn is_input(&self) -> bool { - *self == PIN5_A::INPUT - } - #[doc = "Checks if the value of the field is `OUTPUT`"] - #[inline(always)] - pub fn is_output(&self) -> bool { - *self == PIN5_A::OUTPUT - } -} -#[doc = "Set as output pin 5\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PIN5_AW { - #[doc = "1: Write: writing a '1' sets pin to output; writing a '0' has no effect"] - SET = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PIN5_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `PIN5` writer - Set as output pin 5"] -pub type PIN5_W<'a, const O: u8> = crate::BitWriter1S<'a, u32, DIRSET_SPEC, PIN5_AW, O>; -impl<'a, const O: u8> PIN5_W<'a, O> { - #[doc = "Write: writing a '1' sets pin to output; writing a '0' has no effect"] - #[inline(always)] - pub fn set(self) -> &'a mut W { - self.variant(PIN5_AW::SET) - } -} -#[doc = "Field `PIN6` reader - Set as output pin 6"] -pub type PIN6_R = crate::BitReader; -#[doc = "Set as output pin 6\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PIN6_A { - #[doc = "0: Read: pin set as input"] - INPUT = 0, - #[doc = "1: Read: pin set as output"] - OUTPUT = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PIN6_A) -> Self { - variant as u8 != 0 - } -} -impl PIN6_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> PIN6_A { - match self.bits { - false => PIN6_A::INPUT, - true => PIN6_A::OUTPUT, - } - } - #[doc = "Checks if the value of the field is `INPUT`"] - #[inline(always)] - pub fn is_input(&self) -> bool { - *self == PIN6_A::INPUT - } - #[doc = "Checks if the value of the field is `OUTPUT`"] - #[inline(always)] - pub fn is_output(&self) -> bool { - *self == PIN6_A::OUTPUT - } -} -#[doc = "Set as output pin 6\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PIN6_AW { - #[doc = "1: Write: writing a '1' sets pin to output; writing a '0' has no effect"] - SET = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PIN6_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `PIN6` writer - Set as output pin 6"] -pub type PIN6_W<'a, const O: u8> = crate::BitWriter1S<'a, u32, DIRSET_SPEC, PIN6_AW, O>; -impl<'a, const O: u8> PIN6_W<'a, O> { - #[doc = "Write: writing a '1' sets pin to output; writing a '0' has no effect"] - #[inline(always)] - pub fn set(self) -> &'a mut W { - self.variant(PIN6_AW::SET) - } -} -#[doc = "Field `PIN7` reader - Set as output pin 7"] -pub type PIN7_R = crate::BitReader; -#[doc = "Set as output pin 7\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PIN7_A { - #[doc = "0: Read: pin set as input"] - INPUT = 0, - #[doc = "1: Read: pin set as output"] - OUTPUT = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PIN7_A) -> Self { - variant as u8 != 0 - } -} -impl PIN7_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> PIN7_A { - match self.bits { - false => PIN7_A::INPUT, - true => PIN7_A::OUTPUT, - } - } - #[doc = "Checks if the value of the field is `INPUT`"] - #[inline(always)] - pub fn is_input(&self) -> bool { - *self == PIN7_A::INPUT - } - #[doc = "Checks if the value of the field is `OUTPUT`"] - #[inline(always)] - pub fn is_output(&self) -> bool { - *self == PIN7_A::OUTPUT - } -} -#[doc = "Set as output pin 7\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PIN7_AW { - #[doc = "1: Write: writing a '1' sets pin to output; writing a '0' has no effect"] - SET = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PIN7_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `PIN7` writer - Set as output pin 7"] -pub type PIN7_W<'a, const O: u8> = crate::BitWriter1S<'a, u32, DIRSET_SPEC, PIN7_AW, O>; -impl<'a, const O: u8> PIN7_W<'a, O> { - #[doc = "Write: writing a '1' sets pin to output; writing a '0' has no effect"] - #[inline(always)] - pub fn set(self) -> &'a mut W { - self.variant(PIN7_AW::SET) - } -} -#[doc = "Field `PIN8` reader - Set as output pin 8"] -pub type PIN8_R = crate::BitReader; -#[doc = "Set as output pin 8\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PIN8_A { - #[doc = "0: Read: pin set as input"] - INPUT = 0, - #[doc = "1: Read: pin set as output"] - OUTPUT = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PIN8_A) -> Self { - variant as u8 != 0 - } -} -impl PIN8_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> PIN8_A { - match self.bits { - false => PIN8_A::INPUT, - true => PIN8_A::OUTPUT, - } - } - #[doc = "Checks if the value of the field is `INPUT`"] - #[inline(always)] - pub fn is_input(&self) -> bool { - *self == PIN8_A::INPUT - } - #[doc = "Checks if the value of the field is `OUTPUT`"] - #[inline(always)] - pub fn is_output(&self) -> bool { - *self == PIN8_A::OUTPUT - } -} -#[doc = "Set as output pin 8\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PIN8_AW { - #[doc = "1: Write: writing a '1' sets pin to output; writing a '0' has no effect"] - SET = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PIN8_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `PIN8` writer - Set as output pin 8"] -pub type PIN8_W<'a, const O: u8> = crate::BitWriter1S<'a, u32, DIRSET_SPEC, PIN8_AW, O>; -impl<'a, const O: u8> PIN8_W<'a, O> { - #[doc = "Write: writing a '1' sets pin to output; writing a '0' has no effect"] - #[inline(always)] - pub fn set(self) -> &'a mut W { - self.variant(PIN8_AW::SET) - } -} -#[doc = "Field `PIN9` reader - Set as output pin 9"] -pub type PIN9_R = crate::BitReader; -#[doc = "Set as output pin 9\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PIN9_A { - #[doc = "0: Read: pin set as input"] - INPUT = 0, - #[doc = "1: Read: pin set as output"] - OUTPUT = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PIN9_A) -> Self { - variant as u8 != 0 - } -} -impl PIN9_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> PIN9_A { - match self.bits { - false => PIN9_A::INPUT, - true => PIN9_A::OUTPUT, - } - } - #[doc = "Checks if the value of the field is `INPUT`"] - #[inline(always)] - pub fn is_input(&self) -> bool { - *self == PIN9_A::INPUT - } - #[doc = "Checks if the value of the field is `OUTPUT`"] - #[inline(always)] - pub fn is_output(&self) -> bool { - *self == PIN9_A::OUTPUT - } -} -#[doc = "Set as output pin 9\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PIN9_AW { - #[doc = "1: Write: writing a '1' sets pin to output; writing a '0' has no effect"] - SET = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PIN9_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `PIN9` writer - Set as output pin 9"] -pub type PIN9_W<'a, const O: u8> = crate::BitWriter1S<'a, u32, DIRSET_SPEC, PIN9_AW, O>; -impl<'a, const O: u8> PIN9_W<'a, O> { - #[doc = "Write: writing a '1' sets pin to output; writing a '0' has no effect"] - #[inline(always)] - pub fn set(self) -> &'a mut W { - self.variant(PIN9_AW::SET) - } -} -#[doc = "Field `PIN10` reader - Set as output pin 10"] -pub type PIN10_R = crate::BitReader; -#[doc = "Set as output pin 10\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PIN10_A { - #[doc = "0: Read: pin set as input"] - INPUT = 0, - #[doc = "1: Read: pin set as output"] - OUTPUT = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PIN10_A) -> Self { - variant as u8 != 0 - } -} -impl PIN10_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> PIN10_A { - match self.bits { - false => PIN10_A::INPUT, - true => PIN10_A::OUTPUT, - } - } - #[doc = "Checks if the value of the field is `INPUT`"] - #[inline(always)] - pub fn is_input(&self) -> bool { - *self == PIN10_A::INPUT - } - #[doc = "Checks if the value of the field is `OUTPUT`"] - #[inline(always)] - pub fn is_output(&self) -> bool { - *self == PIN10_A::OUTPUT - } -} -#[doc = "Set as output pin 10\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PIN10_AW { - #[doc = "1: Write: writing a '1' sets pin to output; writing a '0' has no effect"] - SET = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PIN10_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `PIN10` writer - Set as output pin 10"] -pub type PIN10_W<'a, const O: u8> = crate::BitWriter1S<'a, u32, DIRSET_SPEC, PIN10_AW, O>; -impl<'a, const O: u8> PIN10_W<'a, O> { - #[doc = "Write: writing a '1' sets pin to output; writing a '0' has no effect"] - #[inline(always)] - pub fn set(self) -> &'a mut W { - self.variant(PIN10_AW::SET) - } -} -#[doc = "Field `PIN11` reader - Set as output pin 11"] -pub type PIN11_R = crate::BitReader; -#[doc = "Set as output pin 11\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PIN11_A { - #[doc = "0: Read: pin set as input"] - INPUT = 0, - #[doc = "1: Read: pin set as output"] - OUTPUT = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PIN11_A) -> Self { - variant as u8 != 0 - } -} -impl PIN11_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> PIN11_A { - match self.bits { - false => PIN11_A::INPUT, - true => PIN11_A::OUTPUT, - } - } - #[doc = "Checks if the value of the field is `INPUT`"] - #[inline(always)] - pub fn is_input(&self) -> bool { - *self == PIN11_A::INPUT - } - #[doc = "Checks if the value of the field is `OUTPUT`"] - #[inline(always)] - pub fn is_output(&self) -> bool { - *self == PIN11_A::OUTPUT - } -} -#[doc = "Set as output pin 11\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PIN11_AW { - #[doc = "1: Write: writing a '1' sets pin to output; writing a '0' has no effect"] - SET = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PIN11_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `PIN11` writer - Set as output pin 11"] -pub type PIN11_W<'a, const O: u8> = crate::BitWriter1S<'a, u32, DIRSET_SPEC, PIN11_AW, O>; -impl<'a, const O: u8> PIN11_W<'a, O> { - #[doc = "Write: writing a '1' sets pin to output; writing a '0' has no effect"] - #[inline(always)] - pub fn set(self) -> &'a mut W { - self.variant(PIN11_AW::SET) - } -} -#[doc = "Field `PIN12` reader - Set as output pin 12"] -pub type PIN12_R = crate::BitReader; -#[doc = "Set as output pin 12\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PIN12_A { - #[doc = "0: Read: pin set as input"] - INPUT = 0, - #[doc = "1: Read: pin set as output"] - OUTPUT = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PIN12_A) -> Self { - variant as u8 != 0 - } -} -impl PIN12_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> PIN12_A { - match self.bits { - false => PIN12_A::INPUT, - true => PIN12_A::OUTPUT, - } - } - #[doc = "Checks if the value of the field is `INPUT`"] - #[inline(always)] - pub fn is_input(&self) -> bool { - *self == PIN12_A::INPUT - } - #[doc = "Checks if the value of the field is `OUTPUT`"] - #[inline(always)] - pub fn is_output(&self) -> bool { - *self == PIN12_A::OUTPUT - } -} -#[doc = "Set as output pin 12\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PIN12_AW { - #[doc = "1: Write: writing a '1' sets pin to output; writing a '0' has no effect"] - SET = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PIN12_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `PIN12` writer - Set as output pin 12"] -pub type PIN12_W<'a, const O: u8> = crate::BitWriter1S<'a, u32, DIRSET_SPEC, PIN12_AW, O>; -impl<'a, const O: u8> PIN12_W<'a, O> { - #[doc = "Write: writing a '1' sets pin to output; writing a '0' has no effect"] - #[inline(always)] - pub fn set(self) -> &'a mut W { - self.variant(PIN12_AW::SET) - } -} -#[doc = "Field `PIN13` reader - Set as output pin 13"] -pub type PIN13_R = crate::BitReader; -#[doc = "Set as output pin 13\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PIN13_A { - #[doc = "0: Read: pin set as input"] - INPUT = 0, - #[doc = "1: Read: pin set as output"] - OUTPUT = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PIN13_A) -> Self { - variant as u8 != 0 - } -} -impl PIN13_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> PIN13_A { - match self.bits { - false => PIN13_A::INPUT, - true => PIN13_A::OUTPUT, - } - } - #[doc = "Checks if the value of the field is `INPUT`"] - #[inline(always)] - pub fn is_input(&self) -> bool { - *self == PIN13_A::INPUT - } - #[doc = "Checks if the value of the field is `OUTPUT`"] - #[inline(always)] - pub fn is_output(&self) -> bool { - *self == PIN13_A::OUTPUT - } -} -#[doc = "Set as output pin 13\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PIN13_AW { - #[doc = "1: Write: writing a '1' sets pin to output; writing a '0' has no effect"] - SET = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PIN13_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `PIN13` writer - Set as output pin 13"] -pub type PIN13_W<'a, const O: u8> = crate::BitWriter1S<'a, u32, DIRSET_SPEC, PIN13_AW, O>; -impl<'a, const O: u8> PIN13_W<'a, O> { - #[doc = "Write: writing a '1' sets pin to output; writing a '0' has no effect"] - #[inline(always)] - pub fn set(self) -> &'a mut W { - self.variant(PIN13_AW::SET) - } -} -#[doc = "Field `PIN14` reader - Set as output pin 14"] -pub type PIN14_R = crate::BitReader; -#[doc = "Set as output pin 14\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PIN14_A { - #[doc = "0: Read: pin set as input"] - INPUT = 0, - #[doc = "1: Read: pin set as output"] - OUTPUT = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PIN14_A) -> Self { - variant as u8 != 0 - } -} -impl PIN14_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> PIN14_A { - match self.bits { - false => PIN14_A::INPUT, - true => PIN14_A::OUTPUT, - } - } - #[doc = "Checks if the value of the field is `INPUT`"] - #[inline(always)] - pub fn is_input(&self) -> bool { - *self == PIN14_A::INPUT - } - #[doc = "Checks if the value of the field is `OUTPUT`"] - #[inline(always)] - pub fn is_output(&self) -> bool { - *self == PIN14_A::OUTPUT - } -} -#[doc = "Set as output pin 14\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PIN14_AW { - #[doc = "1: Write: writing a '1' sets pin to output; writing a '0' has no effect"] - SET = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PIN14_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `PIN14` writer - Set as output pin 14"] -pub type PIN14_W<'a, const O: u8> = crate::BitWriter1S<'a, u32, DIRSET_SPEC, PIN14_AW, O>; -impl<'a, const O: u8> PIN14_W<'a, O> { - #[doc = "Write: writing a '1' sets pin to output; writing a '0' has no effect"] - #[inline(always)] - pub fn set(self) -> &'a mut W { - self.variant(PIN14_AW::SET) - } -} -#[doc = "Field `PIN15` reader - Set as output pin 15"] -pub type PIN15_R = crate::BitReader; -#[doc = "Set as output pin 15\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PIN15_A { - #[doc = "0: Read: pin set as input"] - INPUT = 0, - #[doc = "1: Read: pin set as output"] - OUTPUT = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PIN15_A) -> Self { - variant as u8 != 0 - } -} -impl PIN15_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> PIN15_A { - match self.bits { - false => PIN15_A::INPUT, - true => PIN15_A::OUTPUT, - } - } - #[doc = "Checks if the value of the field is `INPUT`"] - #[inline(always)] - pub fn is_input(&self) -> bool { - *self == PIN15_A::INPUT - } - #[doc = "Checks if the value of the field is `OUTPUT`"] - #[inline(always)] - pub fn is_output(&self) -> bool { - *self == PIN15_A::OUTPUT - } -} -#[doc = "Set as output pin 15\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PIN15_AW { - #[doc = "1: Write: writing a '1' sets pin to output; writing a '0' has no effect"] - SET = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PIN15_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `PIN15` writer - Set as output pin 15"] -pub type PIN15_W<'a, const O: u8> = crate::BitWriter1S<'a, u32, DIRSET_SPEC, PIN15_AW, O>; -impl<'a, const O: u8> PIN15_W<'a, O> { - #[doc = "Write: writing a '1' sets pin to output; writing a '0' has no effect"] - #[inline(always)] - pub fn set(self) -> &'a mut W { - self.variant(PIN15_AW::SET) - } -} -#[doc = "Field `PIN16` reader - Set as output pin 16"] -pub type PIN16_R = crate::BitReader; -#[doc = "Set as output pin 16\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PIN16_A { - #[doc = "0: Read: pin set as input"] - INPUT = 0, - #[doc = "1: Read: pin set as output"] - OUTPUT = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PIN16_A) -> Self { - variant as u8 != 0 - } -} -impl PIN16_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> PIN16_A { - match self.bits { - false => PIN16_A::INPUT, - true => PIN16_A::OUTPUT, - } - } - #[doc = "Checks if the value of the field is `INPUT`"] - #[inline(always)] - pub fn is_input(&self) -> bool { - *self == PIN16_A::INPUT - } - #[doc = "Checks if the value of the field is `OUTPUT`"] - #[inline(always)] - pub fn is_output(&self) -> bool { - *self == PIN16_A::OUTPUT - } -} -#[doc = "Set as output pin 16\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PIN16_AW { - #[doc = "1: Write: writing a '1' sets pin to output; writing a '0' has no effect"] - SET = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PIN16_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `PIN16` writer - Set as output pin 16"] -pub type PIN16_W<'a, const O: u8> = crate::BitWriter1S<'a, u32, DIRSET_SPEC, PIN16_AW, O>; -impl<'a, const O: u8> PIN16_W<'a, O> { - #[doc = "Write: writing a '1' sets pin to output; writing a '0' has no effect"] - #[inline(always)] - pub fn set(self) -> &'a mut W { - self.variant(PIN16_AW::SET) - } -} -#[doc = "Field `PIN17` reader - Set as output pin 17"] -pub type PIN17_R = crate::BitReader; -#[doc = "Set as output pin 17\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PIN17_A { - #[doc = "0: Read: pin set as input"] - INPUT = 0, - #[doc = "1: Read: pin set as output"] - OUTPUT = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PIN17_A) -> Self { - variant as u8 != 0 - } -} -impl PIN17_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> PIN17_A { - match self.bits { - false => PIN17_A::INPUT, - true => PIN17_A::OUTPUT, - } - } - #[doc = "Checks if the value of the field is `INPUT`"] - #[inline(always)] - pub fn is_input(&self) -> bool { - *self == PIN17_A::INPUT - } - #[doc = "Checks if the value of the field is `OUTPUT`"] - #[inline(always)] - pub fn is_output(&self) -> bool { - *self == PIN17_A::OUTPUT - } -} -#[doc = "Set as output pin 17\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PIN17_AW { - #[doc = "1: Write: writing a '1' sets pin to output; writing a '0' has no effect"] - SET = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PIN17_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `PIN17` writer - Set as output pin 17"] -pub type PIN17_W<'a, const O: u8> = crate::BitWriter1S<'a, u32, DIRSET_SPEC, PIN17_AW, O>; -impl<'a, const O: u8> PIN17_W<'a, O> { - #[doc = "Write: writing a '1' sets pin to output; writing a '0' has no effect"] - #[inline(always)] - pub fn set(self) -> &'a mut W { - self.variant(PIN17_AW::SET) - } -} -#[doc = "Field `PIN18` reader - Set as output pin 18"] -pub type PIN18_R = crate::BitReader; -#[doc = "Set as output pin 18\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PIN18_A { - #[doc = "0: Read: pin set as input"] - INPUT = 0, - #[doc = "1: Read: pin set as output"] - OUTPUT = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PIN18_A) -> Self { - variant as u8 != 0 - } -} -impl PIN18_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> PIN18_A { - match self.bits { - false => PIN18_A::INPUT, - true => PIN18_A::OUTPUT, - } - } - #[doc = "Checks if the value of the field is `INPUT`"] - #[inline(always)] - pub fn is_input(&self) -> bool { - *self == PIN18_A::INPUT - } - #[doc = "Checks if the value of the field is `OUTPUT`"] - #[inline(always)] - pub fn is_output(&self) -> bool { - *self == PIN18_A::OUTPUT - } -} -#[doc = "Set as output pin 18\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PIN18_AW { - #[doc = "1: Write: writing a '1' sets pin to output; writing a '0' has no effect"] - SET = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PIN18_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `PIN18` writer - Set as output pin 18"] -pub type PIN18_W<'a, const O: u8> = crate::BitWriter1S<'a, u32, DIRSET_SPEC, PIN18_AW, O>; -impl<'a, const O: u8> PIN18_W<'a, O> { - #[doc = "Write: writing a '1' sets pin to output; writing a '0' has no effect"] - #[inline(always)] - pub fn set(self) -> &'a mut W { - self.variant(PIN18_AW::SET) - } -} -#[doc = "Field `PIN19` reader - Set as output pin 19"] -pub type PIN19_R = crate::BitReader; -#[doc = "Set as output pin 19\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PIN19_A { - #[doc = "0: Read: pin set as input"] - INPUT = 0, - #[doc = "1: Read: pin set as output"] - OUTPUT = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PIN19_A) -> Self { - variant as u8 != 0 - } -} -impl PIN19_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> PIN19_A { - match self.bits { - false => PIN19_A::INPUT, - true => PIN19_A::OUTPUT, - } - } - #[doc = "Checks if the value of the field is `INPUT`"] - #[inline(always)] - pub fn is_input(&self) -> bool { - *self == PIN19_A::INPUT - } - #[doc = "Checks if the value of the field is `OUTPUT`"] - #[inline(always)] - pub fn is_output(&self) -> bool { - *self == PIN19_A::OUTPUT - } -} -#[doc = "Set as output pin 19\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PIN19_AW { - #[doc = "1: Write: writing a '1' sets pin to output; writing a '0' has no effect"] - SET = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PIN19_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `PIN19` writer - Set as output pin 19"] -pub type PIN19_W<'a, const O: u8> = crate::BitWriter1S<'a, u32, DIRSET_SPEC, PIN19_AW, O>; -impl<'a, const O: u8> PIN19_W<'a, O> { - #[doc = "Write: writing a '1' sets pin to output; writing a '0' has no effect"] - #[inline(always)] - pub fn set(self) -> &'a mut W { - self.variant(PIN19_AW::SET) - } -} -#[doc = "Field `PIN20` reader - Set as output pin 20"] -pub type PIN20_R = crate::BitReader; -#[doc = "Set as output pin 20\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PIN20_A { - #[doc = "0: Read: pin set as input"] - INPUT = 0, - #[doc = "1: Read: pin set as output"] - OUTPUT = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PIN20_A) -> Self { - variant as u8 != 0 - } -} -impl PIN20_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> PIN20_A { - match self.bits { - false => PIN20_A::INPUT, - true => PIN20_A::OUTPUT, - } - } - #[doc = "Checks if the value of the field is `INPUT`"] - #[inline(always)] - pub fn is_input(&self) -> bool { - *self == PIN20_A::INPUT - } - #[doc = "Checks if the value of the field is `OUTPUT`"] - #[inline(always)] - pub fn is_output(&self) -> bool { - *self == PIN20_A::OUTPUT - } -} -#[doc = "Set as output pin 20\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PIN20_AW { - #[doc = "1: Write: writing a '1' sets pin to output; writing a '0' has no effect"] - SET = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PIN20_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `PIN20` writer - Set as output pin 20"] -pub type PIN20_W<'a, const O: u8> = crate::BitWriter1S<'a, u32, DIRSET_SPEC, PIN20_AW, O>; -impl<'a, const O: u8> PIN20_W<'a, O> { - #[doc = "Write: writing a '1' sets pin to output; writing a '0' has no effect"] - #[inline(always)] - pub fn set(self) -> &'a mut W { - self.variant(PIN20_AW::SET) - } -} -#[doc = "Field `PIN21` reader - Set as output pin 21"] -pub type PIN21_R = crate::BitReader; -#[doc = "Set as output pin 21\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PIN21_A { - #[doc = "0: Read: pin set as input"] - INPUT = 0, - #[doc = "1: Read: pin set as output"] - OUTPUT = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PIN21_A) -> Self { - variant as u8 != 0 - } -} -impl PIN21_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> PIN21_A { - match self.bits { - false => PIN21_A::INPUT, - true => PIN21_A::OUTPUT, - } - } - #[doc = "Checks if the value of the field is `INPUT`"] - #[inline(always)] - pub fn is_input(&self) -> bool { - *self == PIN21_A::INPUT - } - #[doc = "Checks if the value of the field is `OUTPUT`"] - #[inline(always)] - pub fn is_output(&self) -> bool { - *self == PIN21_A::OUTPUT - } -} -#[doc = "Set as output pin 21\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PIN21_AW { - #[doc = "1: Write: writing a '1' sets pin to output; writing a '0' has no effect"] - SET = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PIN21_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `PIN21` writer - Set as output pin 21"] -pub type PIN21_W<'a, const O: u8> = crate::BitWriter1S<'a, u32, DIRSET_SPEC, PIN21_AW, O>; -impl<'a, const O: u8> PIN21_W<'a, O> { - #[doc = "Write: writing a '1' sets pin to output; writing a '0' has no effect"] - #[inline(always)] - pub fn set(self) -> &'a mut W { - self.variant(PIN21_AW::SET) - } -} -#[doc = "Field `PIN22` reader - Set as output pin 22"] -pub type PIN22_R = crate::BitReader; -#[doc = "Set as output pin 22\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PIN22_A { - #[doc = "0: Read: pin set as input"] - INPUT = 0, - #[doc = "1: Read: pin set as output"] - OUTPUT = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PIN22_A) -> Self { - variant as u8 != 0 - } -} -impl PIN22_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> PIN22_A { - match self.bits { - false => PIN22_A::INPUT, - true => PIN22_A::OUTPUT, - } - } - #[doc = "Checks if the value of the field is `INPUT`"] - #[inline(always)] - pub fn is_input(&self) -> bool { - *self == PIN22_A::INPUT - } - #[doc = "Checks if the value of the field is `OUTPUT`"] - #[inline(always)] - pub fn is_output(&self) -> bool { - *self == PIN22_A::OUTPUT - } -} -#[doc = "Set as output pin 22\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PIN22_AW { - #[doc = "1: Write: writing a '1' sets pin to output; writing a '0' has no effect"] - SET = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PIN22_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `PIN22` writer - Set as output pin 22"] -pub type PIN22_W<'a, const O: u8> = crate::BitWriter1S<'a, u32, DIRSET_SPEC, PIN22_AW, O>; -impl<'a, const O: u8> PIN22_W<'a, O> { - #[doc = "Write: writing a '1' sets pin to output; writing a '0' has no effect"] - #[inline(always)] - pub fn set(self) -> &'a mut W { - self.variant(PIN22_AW::SET) - } -} -#[doc = "Field `PIN23` reader - Set as output pin 23"] -pub type PIN23_R = crate::BitReader; -#[doc = "Set as output pin 23\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PIN23_A { - #[doc = "0: Read: pin set as input"] - INPUT = 0, - #[doc = "1: Read: pin set as output"] - OUTPUT = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PIN23_A) -> Self { - variant as u8 != 0 - } -} -impl PIN23_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> PIN23_A { - match self.bits { - false => PIN23_A::INPUT, - true => PIN23_A::OUTPUT, - } - } - #[doc = "Checks if the value of the field is `INPUT`"] - #[inline(always)] - pub fn is_input(&self) -> bool { - *self == PIN23_A::INPUT - } - #[doc = "Checks if the value of the field is `OUTPUT`"] - #[inline(always)] - pub fn is_output(&self) -> bool { - *self == PIN23_A::OUTPUT - } -} -#[doc = "Set as output pin 23\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PIN23_AW { - #[doc = "1: Write: writing a '1' sets pin to output; writing a '0' has no effect"] - SET = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PIN23_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `PIN23` writer - Set as output pin 23"] -pub type PIN23_W<'a, const O: u8> = crate::BitWriter1S<'a, u32, DIRSET_SPEC, PIN23_AW, O>; -impl<'a, const O: u8> PIN23_W<'a, O> { - #[doc = "Write: writing a '1' sets pin to output; writing a '0' has no effect"] - #[inline(always)] - pub fn set(self) -> &'a mut W { - self.variant(PIN23_AW::SET) - } -} -#[doc = "Field `PIN24` reader - Set as output pin 24"] -pub type PIN24_R = crate::BitReader; -#[doc = "Set as output pin 24\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PIN24_A { - #[doc = "0: Read: pin set as input"] - INPUT = 0, - #[doc = "1: Read: pin set as output"] - OUTPUT = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PIN24_A) -> Self { - variant as u8 != 0 - } -} -impl PIN24_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> PIN24_A { - match self.bits { - false => PIN24_A::INPUT, - true => PIN24_A::OUTPUT, - } - } - #[doc = "Checks if the value of the field is `INPUT`"] - #[inline(always)] - pub fn is_input(&self) -> bool { - *self == PIN24_A::INPUT - } - #[doc = "Checks if the value of the field is `OUTPUT`"] - #[inline(always)] - pub fn is_output(&self) -> bool { - *self == PIN24_A::OUTPUT - } -} -#[doc = "Set as output pin 24\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PIN24_AW { - #[doc = "1: Write: writing a '1' sets pin to output; writing a '0' has no effect"] - SET = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PIN24_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `PIN24` writer - Set as output pin 24"] -pub type PIN24_W<'a, const O: u8> = crate::BitWriter1S<'a, u32, DIRSET_SPEC, PIN24_AW, O>; -impl<'a, const O: u8> PIN24_W<'a, O> { - #[doc = "Write: writing a '1' sets pin to output; writing a '0' has no effect"] - #[inline(always)] - pub fn set(self) -> &'a mut W { - self.variant(PIN24_AW::SET) - } -} -#[doc = "Field `PIN25` reader - Set as output pin 25"] -pub type PIN25_R = crate::BitReader; -#[doc = "Set as output pin 25\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PIN25_A { - #[doc = "0: Read: pin set as input"] - INPUT = 0, - #[doc = "1: Read: pin set as output"] - OUTPUT = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PIN25_A) -> Self { - variant as u8 != 0 - } -} -impl PIN25_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> PIN25_A { - match self.bits { - false => PIN25_A::INPUT, - true => PIN25_A::OUTPUT, - } - } - #[doc = "Checks if the value of the field is `INPUT`"] - #[inline(always)] - pub fn is_input(&self) -> bool { - *self == PIN25_A::INPUT - } - #[doc = "Checks if the value of the field is `OUTPUT`"] - #[inline(always)] - pub fn is_output(&self) -> bool { - *self == PIN25_A::OUTPUT - } -} -#[doc = "Set as output pin 25\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PIN25_AW { - #[doc = "1: Write: writing a '1' sets pin to output; writing a '0' has no effect"] - SET = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PIN25_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `PIN25` writer - Set as output pin 25"] -pub type PIN25_W<'a, const O: u8> = crate::BitWriter1S<'a, u32, DIRSET_SPEC, PIN25_AW, O>; -impl<'a, const O: u8> PIN25_W<'a, O> { - #[doc = "Write: writing a '1' sets pin to output; writing a '0' has no effect"] - #[inline(always)] - pub fn set(self) -> &'a mut W { - self.variant(PIN25_AW::SET) - } -} -#[doc = "Field `PIN26` reader - Set as output pin 26"] -pub type PIN26_R = crate::BitReader; -#[doc = "Set as output pin 26\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PIN26_A { - #[doc = "0: Read: pin set as input"] - INPUT = 0, - #[doc = "1: Read: pin set as output"] - OUTPUT = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PIN26_A) -> Self { - variant as u8 != 0 - } -} -impl PIN26_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> PIN26_A { - match self.bits { - false => PIN26_A::INPUT, - true => PIN26_A::OUTPUT, - } - } - #[doc = "Checks if the value of the field is `INPUT`"] - #[inline(always)] - pub fn is_input(&self) -> bool { - *self == PIN26_A::INPUT - } - #[doc = "Checks if the value of the field is `OUTPUT`"] - #[inline(always)] - pub fn is_output(&self) -> bool { - *self == PIN26_A::OUTPUT - } -} -#[doc = "Set as output pin 26\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PIN26_AW { - #[doc = "1: Write: writing a '1' sets pin to output; writing a '0' has no effect"] - SET = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PIN26_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `PIN26` writer - Set as output pin 26"] -pub type PIN26_W<'a, const O: u8> = crate::BitWriter1S<'a, u32, DIRSET_SPEC, PIN26_AW, O>; -impl<'a, const O: u8> PIN26_W<'a, O> { - #[doc = "Write: writing a '1' sets pin to output; writing a '0' has no effect"] - #[inline(always)] - pub fn set(self) -> &'a mut W { - self.variant(PIN26_AW::SET) - } -} -#[doc = "Field `PIN27` reader - Set as output pin 27"] -pub type PIN27_R = crate::BitReader; -#[doc = "Set as output pin 27\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PIN27_A { - #[doc = "0: Read: pin set as input"] - INPUT = 0, - #[doc = "1: Read: pin set as output"] - OUTPUT = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PIN27_A) -> Self { - variant as u8 != 0 - } -} -impl PIN27_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> PIN27_A { - match self.bits { - false => PIN27_A::INPUT, - true => PIN27_A::OUTPUT, - } - } - #[doc = "Checks if the value of the field is `INPUT`"] - #[inline(always)] - pub fn is_input(&self) -> bool { - *self == PIN27_A::INPUT - } - #[doc = "Checks if the value of the field is `OUTPUT`"] - #[inline(always)] - pub fn is_output(&self) -> bool { - *self == PIN27_A::OUTPUT - } -} -#[doc = "Set as output pin 27\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PIN27_AW { - #[doc = "1: Write: writing a '1' sets pin to output; writing a '0' has no effect"] - SET = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PIN27_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `PIN27` writer - Set as output pin 27"] -pub type PIN27_W<'a, const O: u8> = crate::BitWriter1S<'a, u32, DIRSET_SPEC, PIN27_AW, O>; -impl<'a, const O: u8> PIN27_W<'a, O> { - #[doc = "Write: writing a '1' sets pin to output; writing a '0' has no effect"] - #[inline(always)] - pub fn set(self) -> &'a mut W { - self.variant(PIN27_AW::SET) - } -} -#[doc = "Field `PIN28` reader - Set as output pin 28"] -pub type PIN28_R = crate::BitReader; -#[doc = "Set as output pin 28\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PIN28_A { - #[doc = "0: Read: pin set as input"] - INPUT = 0, - #[doc = "1: Read: pin set as output"] - OUTPUT = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PIN28_A) -> Self { - variant as u8 != 0 - } -} -impl PIN28_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> PIN28_A { - match self.bits { - false => PIN28_A::INPUT, - true => PIN28_A::OUTPUT, - } - } - #[doc = "Checks if the value of the field is `INPUT`"] - #[inline(always)] - pub fn is_input(&self) -> bool { - *self == PIN28_A::INPUT - } - #[doc = "Checks if the value of the field is `OUTPUT`"] - #[inline(always)] - pub fn is_output(&self) -> bool { - *self == PIN28_A::OUTPUT - } -} -#[doc = "Set as output pin 28\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PIN28_AW { - #[doc = "1: Write: writing a '1' sets pin to output; writing a '0' has no effect"] - SET = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PIN28_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `PIN28` writer - Set as output pin 28"] -pub type PIN28_W<'a, const O: u8> = crate::BitWriter1S<'a, u32, DIRSET_SPEC, PIN28_AW, O>; -impl<'a, const O: u8> PIN28_W<'a, O> { - #[doc = "Write: writing a '1' sets pin to output; writing a '0' has no effect"] - #[inline(always)] - pub fn set(self) -> &'a mut W { - self.variant(PIN28_AW::SET) - } -} -#[doc = "Field `PIN29` reader - Set as output pin 29"] -pub type PIN29_R = crate::BitReader; -#[doc = "Set as output pin 29\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PIN29_A { - #[doc = "0: Read: pin set as input"] - INPUT = 0, - #[doc = "1: Read: pin set as output"] - OUTPUT = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PIN29_A) -> Self { - variant as u8 != 0 - } -} -impl PIN29_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> PIN29_A { - match self.bits { - false => PIN29_A::INPUT, - true => PIN29_A::OUTPUT, - } - } - #[doc = "Checks if the value of the field is `INPUT`"] - #[inline(always)] - pub fn is_input(&self) -> bool { - *self == PIN29_A::INPUT - } - #[doc = "Checks if the value of the field is `OUTPUT`"] - #[inline(always)] - pub fn is_output(&self) -> bool { - *self == PIN29_A::OUTPUT - } -} -#[doc = "Set as output pin 29\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PIN29_AW { - #[doc = "1: Write: writing a '1' sets pin to output; writing a '0' has no effect"] - SET = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PIN29_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `PIN29` writer - Set as output pin 29"] -pub type PIN29_W<'a, const O: u8> = crate::BitWriter1S<'a, u32, DIRSET_SPEC, PIN29_AW, O>; -impl<'a, const O: u8> PIN29_W<'a, O> { - #[doc = "Write: writing a '1' sets pin to output; writing a '0' has no effect"] - #[inline(always)] - pub fn set(self) -> &'a mut W { - self.variant(PIN29_AW::SET) - } -} -#[doc = "Field `PIN30` reader - Set as output pin 30"] -pub type PIN30_R = crate::BitReader; -#[doc = "Set as output pin 30\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PIN30_A { - #[doc = "0: Read: pin set as input"] - INPUT = 0, - #[doc = "1: Read: pin set as output"] - OUTPUT = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PIN30_A) -> Self { - variant as u8 != 0 - } -} -impl PIN30_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> PIN30_A { - match self.bits { - false => PIN30_A::INPUT, - true => PIN30_A::OUTPUT, - } - } - #[doc = "Checks if the value of the field is `INPUT`"] - #[inline(always)] - pub fn is_input(&self) -> bool { - *self == PIN30_A::INPUT - } - #[doc = "Checks if the value of the field is `OUTPUT`"] - #[inline(always)] - pub fn is_output(&self) -> bool { - *self == PIN30_A::OUTPUT - } -} -#[doc = "Set as output pin 30\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PIN30_AW { - #[doc = "1: Write: writing a '1' sets pin to output; writing a '0' has no effect"] - SET = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PIN30_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `PIN30` writer - Set as output pin 30"] -pub type PIN30_W<'a, const O: u8> = crate::BitWriter1S<'a, u32, DIRSET_SPEC, PIN30_AW, O>; -impl<'a, const O: u8> PIN30_W<'a, O> { - #[doc = "Write: writing a '1' sets pin to output; writing a '0' has no effect"] - #[inline(always)] - pub fn set(self) -> &'a mut W { - self.variant(PIN30_AW::SET) - } -} -#[doc = "Field `PIN31` reader - Set as output pin 31"] -pub type PIN31_R = crate::BitReader; -#[doc = "Set as output pin 31\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PIN31_A { - #[doc = "0: Read: pin set as input"] - INPUT = 0, - #[doc = "1: Read: pin set as output"] - OUTPUT = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PIN31_A) -> Self { - variant as u8 != 0 - } -} -impl PIN31_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> PIN31_A { - match self.bits { - false => PIN31_A::INPUT, - true => PIN31_A::OUTPUT, - } - } - #[doc = "Checks if the value of the field is `INPUT`"] - #[inline(always)] - pub fn is_input(&self) -> bool { - *self == PIN31_A::INPUT - } - #[doc = "Checks if the value of the field is `OUTPUT`"] - #[inline(always)] - pub fn is_output(&self) -> bool { - *self == PIN31_A::OUTPUT - } -} -#[doc = "Set as output pin 31\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PIN31_AW { - #[doc = "1: Write: writing a '1' sets pin to output; writing a '0' has no effect"] - SET = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PIN31_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `PIN31` writer - Set as output pin 31"] -pub type PIN31_W<'a, const O: u8> = crate::BitWriter1S<'a, u32, DIRSET_SPEC, PIN31_AW, O>; -impl<'a, const O: u8> PIN31_W<'a, O> { - #[doc = "Write: writing a '1' sets pin to output; writing a '0' has no effect"] - #[inline(always)] - pub fn set(self) -> &'a mut W { - self.variant(PIN31_AW::SET) - } -} -impl R { - #[doc = "Bit 0 - Set as output pin 0"] - #[inline(always)] - pub fn pin0(&self) -> PIN0_R { - PIN0_R::new((self.bits & 1) != 0) - } - #[doc = "Bit 1 - Set as output pin 1"] - #[inline(always)] - pub fn pin1(&self) -> PIN1_R { - PIN1_R::new(((self.bits >> 1) & 1) != 0) - } - #[doc = "Bit 2 - Set as output pin 2"] - #[inline(always)] - pub fn pin2(&self) -> PIN2_R { - PIN2_R::new(((self.bits >> 2) & 1) != 0) - } - #[doc = "Bit 3 - Set as output pin 3"] - #[inline(always)] - pub fn pin3(&self) -> PIN3_R { - PIN3_R::new(((self.bits >> 3) & 1) != 0) - } - #[doc = "Bit 4 - Set as output pin 4"] - #[inline(always)] - pub fn pin4(&self) -> PIN4_R { - PIN4_R::new(((self.bits >> 4) & 1) != 0) - } - #[doc = "Bit 5 - Set as output pin 5"] - #[inline(always)] - pub fn pin5(&self) -> PIN5_R { - PIN5_R::new(((self.bits >> 5) & 1) != 0) - } - #[doc = "Bit 6 - Set as output pin 6"] - #[inline(always)] - pub fn pin6(&self) -> PIN6_R { - PIN6_R::new(((self.bits >> 6) & 1) != 0) - } - #[doc = "Bit 7 - Set as output pin 7"] - #[inline(always)] - pub fn pin7(&self) -> PIN7_R { - PIN7_R::new(((self.bits >> 7) & 1) != 0) - } - #[doc = "Bit 8 - Set as output pin 8"] - #[inline(always)] - pub fn pin8(&self) -> PIN8_R { - PIN8_R::new(((self.bits >> 8) & 1) != 0) - } - #[doc = "Bit 9 - Set as output pin 9"] - #[inline(always)] - pub fn pin9(&self) -> PIN9_R { - PIN9_R::new(((self.bits >> 9) & 1) != 0) - } - #[doc = "Bit 10 - Set as output pin 10"] - #[inline(always)] - pub fn pin10(&self) -> PIN10_R { - PIN10_R::new(((self.bits >> 10) & 1) != 0) - } - #[doc = "Bit 11 - Set as output pin 11"] - #[inline(always)] - pub fn pin11(&self) -> PIN11_R { - PIN11_R::new(((self.bits >> 11) & 1) != 0) - } - #[doc = "Bit 12 - Set as output pin 12"] - #[inline(always)] - pub fn pin12(&self) -> PIN12_R { - PIN12_R::new(((self.bits >> 12) & 1) != 0) - } - #[doc = "Bit 13 - Set as output pin 13"] - #[inline(always)] - pub fn pin13(&self) -> PIN13_R { - PIN13_R::new(((self.bits >> 13) & 1) != 0) - } - #[doc = "Bit 14 - Set as output pin 14"] - #[inline(always)] - pub fn pin14(&self) -> PIN14_R { - PIN14_R::new(((self.bits >> 14) & 1) != 0) - } - #[doc = "Bit 15 - Set as output pin 15"] - #[inline(always)] - pub fn pin15(&self) -> PIN15_R { - PIN15_R::new(((self.bits >> 15) & 1) != 0) - } - #[doc = "Bit 16 - Set as output pin 16"] - #[inline(always)] - pub fn pin16(&self) -> PIN16_R { - PIN16_R::new(((self.bits >> 16) & 1) != 0) - } - #[doc = "Bit 17 - Set as output pin 17"] - #[inline(always)] - pub fn pin17(&self) -> PIN17_R { - PIN17_R::new(((self.bits >> 17) & 1) != 0) - } - #[doc = "Bit 18 - Set as output pin 18"] - #[inline(always)] - pub fn pin18(&self) -> PIN18_R { - PIN18_R::new(((self.bits >> 18) & 1) != 0) - } - #[doc = "Bit 19 - Set as output pin 19"] - #[inline(always)] - pub fn pin19(&self) -> PIN19_R { - PIN19_R::new(((self.bits >> 19) & 1) != 0) - } - #[doc = "Bit 20 - Set as output pin 20"] - #[inline(always)] - pub fn pin20(&self) -> PIN20_R { - PIN20_R::new(((self.bits >> 20) & 1) != 0) - } - #[doc = "Bit 21 - Set as output pin 21"] - #[inline(always)] - pub fn pin21(&self) -> PIN21_R { - PIN21_R::new(((self.bits >> 21) & 1) != 0) - } - #[doc = "Bit 22 - Set as output pin 22"] - #[inline(always)] - pub fn pin22(&self) -> PIN22_R { - PIN22_R::new(((self.bits >> 22) & 1) != 0) - } - #[doc = "Bit 23 - Set as output pin 23"] - #[inline(always)] - pub fn pin23(&self) -> PIN23_R { - PIN23_R::new(((self.bits >> 23) & 1) != 0) - } - #[doc = "Bit 24 - Set as output pin 24"] - #[inline(always)] - pub fn pin24(&self) -> PIN24_R { - PIN24_R::new(((self.bits >> 24) & 1) != 0) - } - #[doc = "Bit 25 - Set as output pin 25"] - #[inline(always)] - pub fn pin25(&self) -> PIN25_R { - PIN25_R::new(((self.bits >> 25) & 1) != 0) - } - #[doc = "Bit 26 - Set as output pin 26"] - #[inline(always)] - pub fn pin26(&self) -> PIN26_R { - PIN26_R::new(((self.bits >> 26) & 1) != 0) - } - #[doc = "Bit 27 - Set as output pin 27"] - #[inline(always)] - pub fn pin27(&self) -> PIN27_R { - PIN27_R::new(((self.bits >> 27) & 1) != 0) - } - #[doc = "Bit 28 - Set as output pin 28"] - #[inline(always)] - pub fn pin28(&self) -> PIN28_R { - PIN28_R::new(((self.bits >> 28) & 1) != 0) - } - #[doc = "Bit 29 - Set as output pin 29"] - #[inline(always)] - pub fn pin29(&self) -> PIN29_R { - PIN29_R::new(((self.bits >> 29) & 1) != 0) - } - #[doc = "Bit 30 - Set as output pin 30"] - #[inline(always)] - pub fn pin30(&self) -> PIN30_R { - PIN30_R::new(((self.bits >> 30) & 1) != 0) - } - #[doc = "Bit 31 - Set as output pin 31"] - #[inline(always)] - pub fn pin31(&self) -> PIN31_R { - PIN31_R::new(((self.bits >> 31) & 1) != 0) - } -} -impl W { - #[doc = "Bit 0 - Set as output pin 0"] - #[inline(always)] - #[must_use] - pub fn pin0(&mut self) -> PIN0_W<0> { - PIN0_W::new(self) - } - #[doc = "Bit 1 - Set as output pin 1"] - #[inline(always)] - #[must_use] - pub fn pin1(&mut self) -> PIN1_W<1> { - PIN1_W::new(self) - } - #[doc = "Bit 2 - Set as output pin 2"] - #[inline(always)] - #[must_use] - pub fn pin2(&mut self) -> PIN2_W<2> { - PIN2_W::new(self) - } - #[doc = "Bit 3 - Set as output pin 3"] - #[inline(always)] - #[must_use] - pub fn pin3(&mut self) -> PIN3_W<3> { - PIN3_W::new(self) - } - #[doc = "Bit 4 - Set as output pin 4"] - #[inline(always)] - #[must_use] - pub fn pin4(&mut self) -> PIN4_W<4> { - PIN4_W::new(self) - } - #[doc = "Bit 5 - Set as output pin 5"] - #[inline(always)] - #[must_use] - pub fn pin5(&mut self) -> PIN5_W<5> { - PIN5_W::new(self) - } - #[doc = "Bit 6 - Set as output pin 6"] - #[inline(always)] - #[must_use] - pub fn pin6(&mut self) -> PIN6_W<6> { - PIN6_W::new(self) - } - #[doc = "Bit 7 - Set as output pin 7"] - #[inline(always)] - #[must_use] - pub fn pin7(&mut self) -> PIN7_W<7> { - PIN7_W::new(self) - } - #[doc = "Bit 8 - Set as output pin 8"] - #[inline(always)] - #[must_use] - pub fn pin8(&mut self) -> PIN8_W<8> { - PIN8_W::new(self) - } - #[doc = "Bit 9 - Set as output pin 9"] - #[inline(always)] - #[must_use] - pub fn pin9(&mut self) -> PIN9_W<9> { - PIN9_W::new(self) - } - #[doc = "Bit 10 - Set as output pin 10"] - #[inline(always)] - #[must_use] - pub fn pin10(&mut self) -> PIN10_W<10> { - PIN10_W::new(self) - } - #[doc = "Bit 11 - Set as output pin 11"] - #[inline(always)] - #[must_use] - pub fn pin11(&mut self) -> PIN11_W<11> { - PIN11_W::new(self) - } - #[doc = "Bit 12 - Set as output pin 12"] - #[inline(always)] - #[must_use] - pub fn pin12(&mut self) -> PIN12_W<12> { - PIN12_W::new(self) - } - #[doc = "Bit 13 - Set as output pin 13"] - #[inline(always)] - #[must_use] - pub fn pin13(&mut self) -> PIN13_W<13> { - PIN13_W::new(self) - } - #[doc = "Bit 14 - Set as output pin 14"] - #[inline(always)] - #[must_use] - pub fn pin14(&mut self) -> PIN14_W<14> { - PIN14_W::new(self) - } - #[doc = "Bit 15 - Set as output pin 15"] - #[inline(always)] - #[must_use] - pub fn pin15(&mut self) -> PIN15_W<15> { - PIN15_W::new(self) - } - #[doc = "Bit 16 - Set as output pin 16"] - #[inline(always)] - #[must_use] - pub fn pin16(&mut self) -> PIN16_W<16> { - PIN16_W::new(self) - } - #[doc = "Bit 17 - Set as output pin 17"] - #[inline(always)] - #[must_use] - pub fn pin17(&mut self) -> PIN17_W<17> { - PIN17_W::new(self) - } - #[doc = "Bit 18 - Set as output pin 18"] - #[inline(always)] - #[must_use] - pub fn pin18(&mut self) -> PIN18_W<18> { - PIN18_W::new(self) - } - #[doc = "Bit 19 - Set as output pin 19"] - #[inline(always)] - #[must_use] - pub fn pin19(&mut self) -> PIN19_W<19> { - PIN19_W::new(self) - } - #[doc = "Bit 20 - Set as output pin 20"] - #[inline(always)] - #[must_use] - pub fn pin20(&mut self) -> PIN20_W<20> { - PIN20_W::new(self) - } - #[doc = "Bit 21 - Set as output pin 21"] - #[inline(always)] - #[must_use] - pub fn pin21(&mut self) -> PIN21_W<21> { - PIN21_W::new(self) - } - #[doc = "Bit 22 - Set as output pin 22"] - #[inline(always)] - #[must_use] - pub fn pin22(&mut self) -> PIN22_W<22> { - PIN22_W::new(self) - } - #[doc = "Bit 23 - Set as output pin 23"] - #[inline(always)] - #[must_use] - pub fn pin23(&mut self) -> PIN23_W<23> { - PIN23_W::new(self) - } - #[doc = "Bit 24 - Set as output pin 24"] - #[inline(always)] - #[must_use] - pub fn pin24(&mut self) -> PIN24_W<24> { - PIN24_W::new(self) - } - #[doc = "Bit 25 - Set as output pin 25"] - #[inline(always)] - #[must_use] - pub fn pin25(&mut self) -> PIN25_W<25> { - PIN25_W::new(self) - } - #[doc = "Bit 26 - Set as output pin 26"] - #[inline(always)] - #[must_use] - pub fn pin26(&mut self) -> PIN26_W<26> { - PIN26_W::new(self) - } - #[doc = "Bit 27 - Set as output pin 27"] - #[inline(always)] - #[must_use] - pub fn pin27(&mut self) -> PIN27_W<27> { - PIN27_W::new(self) - } - #[doc = "Bit 28 - Set as output pin 28"] - #[inline(always)] - #[must_use] - pub fn pin28(&mut self) -> PIN28_W<28> { - PIN28_W::new(self) - } - #[doc = "Bit 29 - Set as output pin 29"] - #[inline(always)] - #[must_use] - pub fn pin29(&mut self) -> PIN29_W<29> { - PIN29_W::new(self) - } - #[doc = "Bit 30 - Set as output pin 30"] - #[inline(always)] - #[must_use] - pub fn pin30(&mut self) -> PIN30_W<30> { - PIN30_W::new(self) - } - #[doc = "Bit 31 - Set as output pin 31"] - #[inline(always)] - #[must_use] - pub fn pin31(&mut self) -> PIN31_W<31> { - PIN31_W::new(self) - } - #[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 = "DIR set register\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 [dirset](index.html) module"] -pub struct DIRSET_SPEC; -impl crate::RegisterSpec for DIRSET_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [dirset::R](R) reader structure"] -impl crate::Readable for DIRSET_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [dirset::W](W) writer structure"] -impl crate::Writable for DIRSET_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0xffff_ffff; -} -#[doc = "`reset()` method sets DIRSET to value 0"] -impl crate::Resettable for DIRSET_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/p0/in_.rs b/down-the-stack/dk_pac/src/p0/in_.rs deleted file mode 100644 index f82c819..0000000 --- a/down-the-stack/dk_pac/src/p0/in_.rs +++ /dev/null @@ -1,1342 +0,0 @@ -#[doc = "Register `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 = "Field `PIN0` reader - Pin 0"] -pub type PIN0_R = crate::BitReader; -#[doc = "Pin 0\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PIN0_A { - #[doc = "0: Pin input is low"] - LOW = 0, - #[doc = "1: Pin input is high"] - HIGH = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PIN0_A) -> Self { - variant as u8 != 0 - } -} -impl PIN0_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> PIN0_A { - match self.bits { - false => PIN0_A::LOW, - true => PIN0_A::HIGH, - } - } - #[doc = "Checks if the value of the field is `LOW`"] - #[inline(always)] - pub fn is_low(&self) -> bool { - *self == PIN0_A::LOW - } - #[doc = "Checks if the value of the field is `HIGH`"] - #[inline(always)] - pub fn is_high(&self) -> bool { - *self == PIN0_A::HIGH - } -} -#[doc = "Field `PIN1` reader - Pin 1"] -pub type PIN1_R = crate::BitReader; -#[doc = "Pin 1\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PIN1_A { - #[doc = "0: Pin input is low"] - LOW = 0, - #[doc = "1: Pin input is high"] - HIGH = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PIN1_A) -> Self { - variant as u8 != 0 - } -} -impl PIN1_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> PIN1_A { - match self.bits { - false => PIN1_A::LOW, - true => PIN1_A::HIGH, - } - } - #[doc = "Checks if the value of the field is `LOW`"] - #[inline(always)] - pub fn is_low(&self) -> bool { - *self == PIN1_A::LOW - } - #[doc = "Checks if the value of the field is `HIGH`"] - #[inline(always)] - pub fn is_high(&self) -> bool { - *self == PIN1_A::HIGH - } -} -#[doc = "Field `PIN2` reader - Pin 2"] -pub type PIN2_R = crate::BitReader; -#[doc = "Pin 2\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PIN2_A { - #[doc = "0: Pin input is low"] - LOW = 0, - #[doc = "1: Pin input is high"] - HIGH = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PIN2_A) -> Self { - variant as u8 != 0 - } -} -impl PIN2_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> PIN2_A { - match self.bits { - false => PIN2_A::LOW, - true => PIN2_A::HIGH, - } - } - #[doc = "Checks if the value of the field is `LOW`"] - #[inline(always)] - pub fn is_low(&self) -> bool { - *self == PIN2_A::LOW - } - #[doc = "Checks if the value of the field is `HIGH`"] - #[inline(always)] - pub fn is_high(&self) -> bool { - *self == PIN2_A::HIGH - } -} -#[doc = "Field `PIN3` reader - Pin 3"] -pub type PIN3_R = crate::BitReader; -#[doc = "Pin 3\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PIN3_A { - #[doc = "0: Pin input is low"] - LOW = 0, - #[doc = "1: Pin input is high"] - HIGH = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PIN3_A) -> Self { - variant as u8 != 0 - } -} -impl PIN3_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> PIN3_A { - match self.bits { - false => PIN3_A::LOW, - true => PIN3_A::HIGH, - } - } - #[doc = "Checks if the value of the field is `LOW`"] - #[inline(always)] - pub fn is_low(&self) -> bool { - *self == PIN3_A::LOW - } - #[doc = "Checks if the value of the field is `HIGH`"] - #[inline(always)] - pub fn is_high(&self) -> bool { - *self == PIN3_A::HIGH - } -} -#[doc = "Field `PIN4` reader - Pin 4"] -pub type PIN4_R = crate::BitReader; -#[doc = "Pin 4\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PIN4_A { - #[doc = "0: Pin input is low"] - LOW = 0, - #[doc = "1: Pin input is high"] - HIGH = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PIN4_A) -> Self { - variant as u8 != 0 - } -} -impl PIN4_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> PIN4_A { - match self.bits { - false => PIN4_A::LOW, - true => PIN4_A::HIGH, - } - } - #[doc = "Checks if the value of the field is `LOW`"] - #[inline(always)] - pub fn is_low(&self) -> bool { - *self == PIN4_A::LOW - } - #[doc = "Checks if the value of the field is `HIGH`"] - #[inline(always)] - pub fn is_high(&self) -> bool { - *self == PIN4_A::HIGH - } -} -#[doc = "Field `PIN5` reader - Pin 5"] -pub type PIN5_R = crate::BitReader; -#[doc = "Pin 5\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PIN5_A { - #[doc = "0: Pin input is low"] - LOW = 0, - #[doc = "1: Pin input is high"] - HIGH = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PIN5_A) -> Self { - variant as u8 != 0 - } -} -impl PIN5_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> PIN5_A { - match self.bits { - false => PIN5_A::LOW, - true => PIN5_A::HIGH, - } - } - #[doc = "Checks if the value of the field is `LOW`"] - #[inline(always)] - pub fn is_low(&self) -> bool { - *self == PIN5_A::LOW - } - #[doc = "Checks if the value of the field is `HIGH`"] - #[inline(always)] - pub fn is_high(&self) -> bool { - *self == PIN5_A::HIGH - } -} -#[doc = "Field `PIN6` reader - Pin 6"] -pub type PIN6_R = crate::BitReader; -#[doc = "Pin 6\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PIN6_A { - #[doc = "0: Pin input is low"] - LOW = 0, - #[doc = "1: Pin input is high"] - HIGH = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PIN6_A) -> Self { - variant as u8 != 0 - } -} -impl PIN6_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> PIN6_A { - match self.bits { - false => PIN6_A::LOW, - true => PIN6_A::HIGH, - } - } - #[doc = "Checks if the value of the field is `LOW`"] - #[inline(always)] - pub fn is_low(&self) -> bool { - *self == PIN6_A::LOW - } - #[doc = "Checks if the value of the field is `HIGH`"] - #[inline(always)] - pub fn is_high(&self) -> bool { - *self == PIN6_A::HIGH - } -} -#[doc = "Field `PIN7` reader - Pin 7"] -pub type PIN7_R = crate::BitReader; -#[doc = "Pin 7\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PIN7_A { - #[doc = "0: Pin input is low"] - LOW = 0, - #[doc = "1: Pin input is high"] - HIGH = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PIN7_A) -> Self { - variant as u8 != 0 - } -} -impl PIN7_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> PIN7_A { - match self.bits { - false => PIN7_A::LOW, - true => PIN7_A::HIGH, - } - } - #[doc = "Checks if the value of the field is `LOW`"] - #[inline(always)] - pub fn is_low(&self) -> bool { - *self == PIN7_A::LOW - } - #[doc = "Checks if the value of the field is `HIGH`"] - #[inline(always)] - pub fn is_high(&self) -> bool { - *self == PIN7_A::HIGH - } -} -#[doc = "Field `PIN8` reader - Pin 8"] -pub type PIN8_R = crate::BitReader; -#[doc = "Pin 8\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PIN8_A { - #[doc = "0: Pin input is low"] - LOW = 0, - #[doc = "1: Pin input is high"] - HIGH = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PIN8_A) -> Self { - variant as u8 != 0 - } -} -impl PIN8_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> PIN8_A { - match self.bits { - false => PIN8_A::LOW, - true => PIN8_A::HIGH, - } - } - #[doc = "Checks if the value of the field is `LOW`"] - #[inline(always)] - pub fn is_low(&self) -> bool { - *self == PIN8_A::LOW - } - #[doc = "Checks if the value of the field is `HIGH`"] - #[inline(always)] - pub fn is_high(&self) -> bool { - *self == PIN8_A::HIGH - } -} -#[doc = "Field `PIN9` reader - Pin 9"] -pub type PIN9_R = crate::BitReader; -#[doc = "Pin 9\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PIN9_A { - #[doc = "0: Pin input is low"] - LOW = 0, - #[doc = "1: Pin input is high"] - HIGH = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PIN9_A) -> Self { - variant as u8 != 0 - } -} -impl PIN9_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> PIN9_A { - match self.bits { - false => PIN9_A::LOW, - true => PIN9_A::HIGH, - } - } - #[doc = "Checks if the value of the field is `LOW`"] - #[inline(always)] - pub fn is_low(&self) -> bool { - *self == PIN9_A::LOW - } - #[doc = "Checks if the value of the field is `HIGH`"] - #[inline(always)] - pub fn is_high(&self) -> bool { - *self == PIN9_A::HIGH - } -} -#[doc = "Field `PIN10` reader - Pin 10"] -pub type PIN10_R = crate::BitReader; -#[doc = "Pin 10\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PIN10_A { - #[doc = "0: Pin input is low"] - LOW = 0, - #[doc = "1: Pin input is high"] - HIGH = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PIN10_A) -> Self { - variant as u8 != 0 - } -} -impl PIN10_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> PIN10_A { - match self.bits { - false => PIN10_A::LOW, - true => PIN10_A::HIGH, - } - } - #[doc = "Checks if the value of the field is `LOW`"] - #[inline(always)] - pub fn is_low(&self) -> bool { - *self == PIN10_A::LOW - } - #[doc = "Checks if the value of the field is `HIGH`"] - #[inline(always)] - pub fn is_high(&self) -> bool { - *self == PIN10_A::HIGH - } -} -#[doc = "Field `PIN11` reader - Pin 11"] -pub type PIN11_R = crate::BitReader; -#[doc = "Pin 11\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PIN11_A { - #[doc = "0: Pin input is low"] - LOW = 0, - #[doc = "1: Pin input is high"] - HIGH = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PIN11_A) -> Self { - variant as u8 != 0 - } -} -impl PIN11_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> PIN11_A { - match self.bits { - false => PIN11_A::LOW, - true => PIN11_A::HIGH, - } - } - #[doc = "Checks if the value of the field is `LOW`"] - #[inline(always)] - pub fn is_low(&self) -> bool { - *self == PIN11_A::LOW - } - #[doc = "Checks if the value of the field is `HIGH`"] - #[inline(always)] - pub fn is_high(&self) -> bool { - *self == PIN11_A::HIGH - } -} -#[doc = "Field `PIN12` reader - Pin 12"] -pub type PIN12_R = crate::BitReader; -#[doc = "Pin 12\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PIN12_A { - #[doc = "0: Pin input is low"] - LOW = 0, - #[doc = "1: Pin input is high"] - HIGH = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PIN12_A) -> Self { - variant as u8 != 0 - } -} -impl PIN12_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> PIN12_A { - match self.bits { - false => PIN12_A::LOW, - true => PIN12_A::HIGH, - } - } - #[doc = "Checks if the value of the field is `LOW`"] - #[inline(always)] - pub fn is_low(&self) -> bool { - *self == PIN12_A::LOW - } - #[doc = "Checks if the value of the field is `HIGH`"] - #[inline(always)] - pub fn is_high(&self) -> bool { - *self == PIN12_A::HIGH - } -} -#[doc = "Field `PIN13` reader - Pin 13"] -pub type PIN13_R = crate::BitReader; -#[doc = "Pin 13\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PIN13_A { - #[doc = "0: Pin input is low"] - LOW = 0, - #[doc = "1: Pin input is high"] - HIGH = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PIN13_A) -> Self { - variant as u8 != 0 - } -} -impl PIN13_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> PIN13_A { - match self.bits { - false => PIN13_A::LOW, - true => PIN13_A::HIGH, - } - } - #[doc = "Checks if the value of the field is `LOW`"] - #[inline(always)] - pub fn is_low(&self) -> bool { - *self == PIN13_A::LOW - } - #[doc = "Checks if the value of the field is `HIGH`"] - #[inline(always)] - pub fn is_high(&self) -> bool { - *self == PIN13_A::HIGH - } -} -#[doc = "Field `PIN14` reader - Pin 14"] -pub type PIN14_R = crate::BitReader; -#[doc = "Pin 14\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PIN14_A { - #[doc = "0: Pin input is low"] - LOW = 0, - #[doc = "1: Pin input is high"] - HIGH = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PIN14_A) -> Self { - variant as u8 != 0 - } -} -impl PIN14_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> PIN14_A { - match self.bits { - false => PIN14_A::LOW, - true => PIN14_A::HIGH, - } - } - #[doc = "Checks if the value of the field is `LOW`"] - #[inline(always)] - pub fn is_low(&self) -> bool { - *self == PIN14_A::LOW - } - #[doc = "Checks if the value of the field is `HIGH`"] - #[inline(always)] - pub fn is_high(&self) -> bool { - *self == PIN14_A::HIGH - } -} -#[doc = "Field `PIN15` reader - Pin 15"] -pub type PIN15_R = crate::BitReader; -#[doc = "Pin 15\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PIN15_A { - #[doc = "0: Pin input is low"] - LOW = 0, - #[doc = "1: Pin input is high"] - HIGH = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PIN15_A) -> Self { - variant as u8 != 0 - } -} -impl PIN15_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> PIN15_A { - match self.bits { - false => PIN15_A::LOW, - true => PIN15_A::HIGH, - } - } - #[doc = "Checks if the value of the field is `LOW`"] - #[inline(always)] - pub fn is_low(&self) -> bool { - *self == PIN15_A::LOW - } - #[doc = "Checks if the value of the field is `HIGH`"] - #[inline(always)] - pub fn is_high(&self) -> bool { - *self == PIN15_A::HIGH - } -} -#[doc = "Field `PIN16` reader - Pin 16"] -pub type PIN16_R = crate::BitReader; -#[doc = "Pin 16\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PIN16_A { - #[doc = "0: Pin input is low"] - LOW = 0, - #[doc = "1: Pin input is high"] - HIGH = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PIN16_A) -> Self { - variant as u8 != 0 - } -} -impl PIN16_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> PIN16_A { - match self.bits { - false => PIN16_A::LOW, - true => PIN16_A::HIGH, - } - } - #[doc = "Checks if the value of the field is `LOW`"] - #[inline(always)] - pub fn is_low(&self) -> bool { - *self == PIN16_A::LOW - } - #[doc = "Checks if the value of the field is `HIGH`"] - #[inline(always)] - pub fn is_high(&self) -> bool { - *self == PIN16_A::HIGH - } -} -#[doc = "Field `PIN17` reader - Pin 17"] -pub type PIN17_R = crate::BitReader; -#[doc = "Pin 17\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PIN17_A { - #[doc = "0: Pin input is low"] - LOW = 0, - #[doc = "1: Pin input is high"] - HIGH = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PIN17_A) -> Self { - variant as u8 != 0 - } -} -impl PIN17_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> PIN17_A { - match self.bits { - false => PIN17_A::LOW, - true => PIN17_A::HIGH, - } - } - #[doc = "Checks if the value of the field is `LOW`"] - #[inline(always)] - pub fn is_low(&self) -> bool { - *self == PIN17_A::LOW - } - #[doc = "Checks if the value of the field is `HIGH`"] - #[inline(always)] - pub fn is_high(&self) -> bool { - *self == PIN17_A::HIGH - } -} -#[doc = "Field `PIN18` reader - Pin 18"] -pub type PIN18_R = crate::BitReader; -#[doc = "Pin 18\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PIN18_A { - #[doc = "0: Pin input is low"] - LOW = 0, - #[doc = "1: Pin input is high"] - HIGH = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PIN18_A) -> Self { - variant as u8 != 0 - } -} -impl PIN18_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> PIN18_A { - match self.bits { - false => PIN18_A::LOW, - true => PIN18_A::HIGH, - } - } - #[doc = "Checks if the value of the field is `LOW`"] - #[inline(always)] - pub fn is_low(&self) -> bool { - *self == PIN18_A::LOW - } - #[doc = "Checks if the value of the field is `HIGH`"] - #[inline(always)] - pub fn is_high(&self) -> bool { - *self == PIN18_A::HIGH - } -} -#[doc = "Field `PIN19` reader - Pin 19"] -pub type PIN19_R = crate::BitReader; -#[doc = "Pin 19\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PIN19_A { - #[doc = "0: Pin input is low"] - LOW = 0, - #[doc = "1: Pin input is high"] - HIGH = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PIN19_A) -> Self { - variant as u8 != 0 - } -} -impl PIN19_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> PIN19_A { - match self.bits { - false => PIN19_A::LOW, - true => PIN19_A::HIGH, - } - } - #[doc = "Checks if the value of the field is `LOW`"] - #[inline(always)] - pub fn is_low(&self) -> bool { - *self == PIN19_A::LOW - } - #[doc = "Checks if the value of the field is `HIGH`"] - #[inline(always)] - pub fn is_high(&self) -> bool { - *self == PIN19_A::HIGH - } -} -#[doc = "Field `PIN20` reader - Pin 20"] -pub type PIN20_R = crate::BitReader; -#[doc = "Pin 20\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PIN20_A { - #[doc = "0: Pin input is low"] - LOW = 0, - #[doc = "1: Pin input is high"] - HIGH = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PIN20_A) -> Self { - variant as u8 != 0 - } -} -impl PIN20_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> PIN20_A { - match self.bits { - false => PIN20_A::LOW, - true => PIN20_A::HIGH, - } - } - #[doc = "Checks if the value of the field is `LOW`"] - #[inline(always)] - pub fn is_low(&self) -> bool { - *self == PIN20_A::LOW - } - #[doc = "Checks if the value of the field is `HIGH`"] - #[inline(always)] - pub fn is_high(&self) -> bool { - *self == PIN20_A::HIGH - } -} -#[doc = "Field `PIN21` reader - Pin 21"] -pub type PIN21_R = crate::BitReader; -#[doc = "Pin 21\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PIN21_A { - #[doc = "0: Pin input is low"] - LOW = 0, - #[doc = "1: Pin input is high"] - HIGH = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PIN21_A) -> Self { - variant as u8 != 0 - } -} -impl PIN21_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> PIN21_A { - match self.bits { - false => PIN21_A::LOW, - true => PIN21_A::HIGH, - } - } - #[doc = "Checks if the value of the field is `LOW`"] - #[inline(always)] - pub fn is_low(&self) -> bool { - *self == PIN21_A::LOW - } - #[doc = "Checks if the value of the field is `HIGH`"] - #[inline(always)] - pub fn is_high(&self) -> bool { - *self == PIN21_A::HIGH - } -} -#[doc = "Field `PIN22` reader - Pin 22"] -pub type PIN22_R = crate::BitReader; -#[doc = "Pin 22\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PIN22_A { - #[doc = "0: Pin input is low"] - LOW = 0, - #[doc = "1: Pin input is high"] - HIGH = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PIN22_A) -> Self { - variant as u8 != 0 - } -} -impl PIN22_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> PIN22_A { - match self.bits { - false => PIN22_A::LOW, - true => PIN22_A::HIGH, - } - } - #[doc = "Checks if the value of the field is `LOW`"] - #[inline(always)] - pub fn is_low(&self) -> bool { - *self == PIN22_A::LOW - } - #[doc = "Checks if the value of the field is `HIGH`"] - #[inline(always)] - pub fn is_high(&self) -> bool { - *self == PIN22_A::HIGH - } -} -#[doc = "Field `PIN23` reader - Pin 23"] -pub type PIN23_R = crate::BitReader; -#[doc = "Pin 23\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PIN23_A { - #[doc = "0: Pin input is low"] - LOW = 0, - #[doc = "1: Pin input is high"] - HIGH = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PIN23_A) -> Self { - variant as u8 != 0 - } -} -impl PIN23_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> PIN23_A { - match self.bits { - false => PIN23_A::LOW, - true => PIN23_A::HIGH, - } - } - #[doc = "Checks if the value of the field is `LOW`"] - #[inline(always)] - pub fn is_low(&self) -> bool { - *self == PIN23_A::LOW - } - #[doc = "Checks if the value of the field is `HIGH`"] - #[inline(always)] - pub fn is_high(&self) -> bool { - *self == PIN23_A::HIGH - } -} -#[doc = "Field `PIN24` reader - Pin 24"] -pub type PIN24_R = crate::BitReader; -#[doc = "Pin 24\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PIN24_A { - #[doc = "0: Pin input is low"] - LOW = 0, - #[doc = "1: Pin input is high"] - HIGH = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PIN24_A) -> Self { - variant as u8 != 0 - } -} -impl PIN24_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> PIN24_A { - match self.bits { - false => PIN24_A::LOW, - true => PIN24_A::HIGH, - } - } - #[doc = "Checks if the value of the field is `LOW`"] - #[inline(always)] - pub fn is_low(&self) -> bool { - *self == PIN24_A::LOW - } - #[doc = "Checks if the value of the field is `HIGH`"] - #[inline(always)] - pub fn is_high(&self) -> bool { - *self == PIN24_A::HIGH - } -} -#[doc = "Field `PIN25` reader - Pin 25"] -pub type PIN25_R = crate::BitReader; -#[doc = "Pin 25\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PIN25_A { - #[doc = "0: Pin input is low"] - LOW = 0, - #[doc = "1: Pin input is high"] - HIGH = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PIN25_A) -> Self { - variant as u8 != 0 - } -} -impl PIN25_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> PIN25_A { - match self.bits { - false => PIN25_A::LOW, - true => PIN25_A::HIGH, - } - } - #[doc = "Checks if the value of the field is `LOW`"] - #[inline(always)] - pub fn is_low(&self) -> bool { - *self == PIN25_A::LOW - } - #[doc = "Checks if the value of the field is `HIGH`"] - #[inline(always)] - pub fn is_high(&self) -> bool { - *self == PIN25_A::HIGH - } -} -#[doc = "Field `PIN26` reader - Pin 26"] -pub type PIN26_R = crate::BitReader; -#[doc = "Pin 26\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PIN26_A { - #[doc = "0: Pin input is low"] - LOW = 0, - #[doc = "1: Pin input is high"] - HIGH = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PIN26_A) -> Self { - variant as u8 != 0 - } -} -impl PIN26_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> PIN26_A { - match self.bits { - false => PIN26_A::LOW, - true => PIN26_A::HIGH, - } - } - #[doc = "Checks if the value of the field is `LOW`"] - #[inline(always)] - pub fn is_low(&self) -> bool { - *self == PIN26_A::LOW - } - #[doc = "Checks if the value of the field is `HIGH`"] - #[inline(always)] - pub fn is_high(&self) -> bool { - *self == PIN26_A::HIGH - } -} -#[doc = "Field `PIN27` reader - Pin 27"] -pub type PIN27_R = crate::BitReader; -#[doc = "Pin 27\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PIN27_A { - #[doc = "0: Pin input is low"] - LOW = 0, - #[doc = "1: Pin input is high"] - HIGH = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PIN27_A) -> Self { - variant as u8 != 0 - } -} -impl PIN27_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> PIN27_A { - match self.bits { - false => PIN27_A::LOW, - true => PIN27_A::HIGH, - } - } - #[doc = "Checks if the value of the field is `LOW`"] - #[inline(always)] - pub fn is_low(&self) -> bool { - *self == PIN27_A::LOW - } - #[doc = "Checks if the value of the field is `HIGH`"] - #[inline(always)] - pub fn is_high(&self) -> bool { - *self == PIN27_A::HIGH - } -} -#[doc = "Field `PIN28` reader - Pin 28"] -pub type PIN28_R = crate::BitReader; -#[doc = "Pin 28\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PIN28_A { - #[doc = "0: Pin input is low"] - LOW = 0, - #[doc = "1: Pin input is high"] - HIGH = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PIN28_A) -> Self { - variant as u8 != 0 - } -} -impl PIN28_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> PIN28_A { - match self.bits { - false => PIN28_A::LOW, - true => PIN28_A::HIGH, - } - } - #[doc = "Checks if the value of the field is `LOW`"] - #[inline(always)] - pub fn is_low(&self) -> bool { - *self == PIN28_A::LOW - } - #[doc = "Checks if the value of the field is `HIGH`"] - #[inline(always)] - pub fn is_high(&self) -> bool { - *self == PIN28_A::HIGH - } -} -#[doc = "Field `PIN29` reader - Pin 29"] -pub type PIN29_R = crate::BitReader; -#[doc = "Pin 29\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PIN29_A { - #[doc = "0: Pin input is low"] - LOW = 0, - #[doc = "1: Pin input is high"] - HIGH = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PIN29_A) -> Self { - variant as u8 != 0 - } -} -impl PIN29_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> PIN29_A { - match self.bits { - false => PIN29_A::LOW, - true => PIN29_A::HIGH, - } - } - #[doc = "Checks if the value of the field is `LOW`"] - #[inline(always)] - pub fn is_low(&self) -> bool { - *self == PIN29_A::LOW - } - #[doc = "Checks if the value of the field is `HIGH`"] - #[inline(always)] - pub fn is_high(&self) -> bool { - *self == PIN29_A::HIGH - } -} -#[doc = "Field `PIN30` reader - Pin 30"] -pub type PIN30_R = crate::BitReader; -#[doc = "Pin 30\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PIN30_A { - #[doc = "0: Pin input is low"] - LOW = 0, - #[doc = "1: Pin input is high"] - HIGH = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PIN30_A) -> Self { - variant as u8 != 0 - } -} -impl PIN30_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> PIN30_A { - match self.bits { - false => PIN30_A::LOW, - true => PIN30_A::HIGH, - } - } - #[doc = "Checks if the value of the field is `LOW`"] - #[inline(always)] - pub fn is_low(&self) -> bool { - *self == PIN30_A::LOW - } - #[doc = "Checks if the value of the field is `HIGH`"] - #[inline(always)] - pub fn is_high(&self) -> bool { - *self == PIN30_A::HIGH - } -} -#[doc = "Field `PIN31` reader - Pin 31"] -pub type PIN31_R = crate::BitReader; -#[doc = "Pin 31\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PIN31_A { - #[doc = "0: Pin input is low"] - LOW = 0, - #[doc = "1: Pin input is high"] - HIGH = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PIN31_A) -> Self { - variant as u8 != 0 - } -} -impl PIN31_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> PIN31_A { - match self.bits { - false => PIN31_A::LOW, - true => PIN31_A::HIGH, - } - } - #[doc = "Checks if the value of the field is `LOW`"] - #[inline(always)] - pub fn is_low(&self) -> bool { - *self == PIN31_A::LOW - } - #[doc = "Checks if the value of the field is `HIGH`"] - #[inline(always)] - pub fn is_high(&self) -> bool { - *self == PIN31_A::HIGH - } -} -impl R { - #[doc = "Bit 0 - Pin 0"] - #[inline(always)] - pub fn pin0(&self) -> PIN0_R { - PIN0_R::new((self.bits & 1) != 0) - } - #[doc = "Bit 1 - Pin 1"] - #[inline(always)] - pub fn pin1(&self) -> PIN1_R { - PIN1_R::new(((self.bits >> 1) & 1) != 0) - } - #[doc = "Bit 2 - Pin 2"] - #[inline(always)] - pub fn pin2(&self) -> PIN2_R { - PIN2_R::new(((self.bits >> 2) & 1) != 0) - } - #[doc = "Bit 3 - Pin 3"] - #[inline(always)] - pub fn pin3(&self) -> PIN3_R { - PIN3_R::new(((self.bits >> 3) & 1) != 0) - } - #[doc = "Bit 4 - Pin 4"] - #[inline(always)] - pub fn pin4(&self) -> PIN4_R { - PIN4_R::new(((self.bits >> 4) & 1) != 0) - } - #[doc = "Bit 5 - Pin 5"] - #[inline(always)] - pub fn pin5(&self) -> PIN5_R { - PIN5_R::new(((self.bits >> 5) & 1) != 0) - } - #[doc = "Bit 6 - Pin 6"] - #[inline(always)] - pub fn pin6(&self) -> PIN6_R { - PIN6_R::new(((self.bits >> 6) & 1) != 0) - } - #[doc = "Bit 7 - Pin 7"] - #[inline(always)] - pub fn pin7(&self) -> PIN7_R { - PIN7_R::new(((self.bits >> 7) & 1) != 0) - } - #[doc = "Bit 8 - Pin 8"] - #[inline(always)] - pub fn pin8(&self) -> PIN8_R { - PIN8_R::new(((self.bits >> 8) & 1) != 0) - } - #[doc = "Bit 9 - Pin 9"] - #[inline(always)] - pub fn pin9(&self) -> PIN9_R { - PIN9_R::new(((self.bits >> 9) & 1) != 0) - } - #[doc = "Bit 10 - Pin 10"] - #[inline(always)] - pub fn pin10(&self) -> PIN10_R { - PIN10_R::new(((self.bits >> 10) & 1) != 0) - } - #[doc = "Bit 11 - Pin 11"] - #[inline(always)] - pub fn pin11(&self) -> PIN11_R { - PIN11_R::new(((self.bits >> 11) & 1) != 0) - } - #[doc = "Bit 12 - Pin 12"] - #[inline(always)] - pub fn pin12(&self) -> PIN12_R { - PIN12_R::new(((self.bits >> 12) & 1) != 0) - } - #[doc = "Bit 13 - Pin 13"] - #[inline(always)] - pub fn pin13(&self) -> PIN13_R { - PIN13_R::new(((self.bits >> 13) & 1) != 0) - } - #[doc = "Bit 14 - Pin 14"] - #[inline(always)] - pub fn pin14(&self) -> PIN14_R { - PIN14_R::new(((self.bits >> 14) & 1) != 0) - } - #[doc = "Bit 15 - Pin 15"] - #[inline(always)] - pub fn pin15(&self) -> PIN15_R { - PIN15_R::new(((self.bits >> 15) & 1) != 0) - } - #[doc = "Bit 16 - Pin 16"] - #[inline(always)] - pub fn pin16(&self) -> PIN16_R { - PIN16_R::new(((self.bits >> 16) & 1) != 0) - } - #[doc = "Bit 17 - Pin 17"] - #[inline(always)] - pub fn pin17(&self) -> PIN17_R { - PIN17_R::new(((self.bits >> 17) & 1) != 0) - } - #[doc = "Bit 18 - Pin 18"] - #[inline(always)] - pub fn pin18(&self) -> PIN18_R { - PIN18_R::new(((self.bits >> 18) & 1) != 0) - } - #[doc = "Bit 19 - Pin 19"] - #[inline(always)] - pub fn pin19(&self) -> PIN19_R { - PIN19_R::new(((self.bits >> 19) & 1) != 0) - } - #[doc = "Bit 20 - Pin 20"] - #[inline(always)] - pub fn pin20(&self) -> PIN20_R { - PIN20_R::new(((self.bits >> 20) & 1) != 0) - } - #[doc = "Bit 21 - Pin 21"] - #[inline(always)] - pub fn pin21(&self) -> PIN21_R { - PIN21_R::new(((self.bits >> 21) & 1) != 0) - } - #[doc = "Bit 22 - Pin 22"] - #[inline(always)] - pub fn pin22(&self) -> PIN22_R { - PIN22_R::new(((self.bits >> 22) & 1) != 0) - } - #[doc = "Bit 23 - Pin 23"] - #[inline(always)] - pub fn pin23(&self) -> PIN23_R { - PIN23_R::new(((self.bits >> 23) & 1) != 0) - } - #[doc = "Bit 24 - Pin 24"] - #[inline(always)] - pub fn pin24(&self) -> PIN24_R { - PIN24_R::new(((self.bits >> 24) & 1) != 0) - } - #[doc = "Bit 25 - Pin 25"] - #[inline(always)] - pub fn pin25(&self) -> PIN25_R { - PIN25_R::new(((self.bits >> 25) & 1) != 0) - } - #[doc = "Bit 26 - Pin 26"] - #[inline(always)] - pub fn pin26(&self) -> PIN26_R { - PIN26_R::new(((self.bits >> 26) & 1) != 0) - } - #[doc = "Bit 27 - Pin 27"] - #[inline(always)] - pub fn pin27(&self) -> PIN27_R { - PIN27_R::new(((self.bits >> 27) & 1) != 0) - } - #[doc = "Bit 28 - Pin 28"] - #[inline(always)] - pub fn pin28(&self) -> PIN28_R { - PIN28_R::new(((self.bits >> 28) & 1) != 0) - } - #[doc = "Bit 29 - Pin 29"] - #[inline(always)] - pub fn pin29(&self) -> PIN29_R { - PIN29_R::new(((self.bits >> 29) & 1) != 0) - } - #[doc = "Bit 30 - Pin 30"] - #[inline(always)] - pub fn pin30(&self) -> PIN30_R { - PIN30_R::new(((self.bits >> 30) & 1) != 0) - } - #[doc = "Bit 31 - Pin 31"] - #[inline(always)] - pub fn pin31(&self) -> PIN31_R { - PIN31_R::new(((self.bits >> 31) & 1) != 0) - } -} -#[doc = "Read GPIO port\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 [in_](index.html) module"] -pub struct IN_SPEC; -impl crate::RegisterSpec for IN_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [in_::R](R) reader structure"] -impl crate::Readable for IN_SPEC { - type Reader = R; -} -#[doc = "`reset()` method sets IN to value 0"] -impl crate::Resettable for IN_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/p0/latch.rs b/down-the-stack/dk_pac/src/p0/latch.rs deleted file mode 100644 index a7ecc44..0000000 --- a/down-the-stack/dk_pac/src/p0/latch.rs +++ /dev/null @@ -1,2017 +0,0 @@ -#[doc = "Register `LATCH` 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 `LATCH` 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 `PIN0` reader - Status on whether PIN0 has met criteria set in PIN_CNF0.SENSE register. Write '1' to clear."] -pub type PIN0_R = crate::BitReader; -#[doc = "Status on whether PIN0 has met criteria set in PIN_CNF0.SENSE register. Write '1' to clear.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PIN0_A { - #[doc = "0: Criteria has not been met"] - NOT_LATCHED = 0, - #[doc = "1: Criteria has been met"] - LATCHED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PIN0_A) -> Self { - variant as u8 != 0 - } -} -impl PIN0_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> PIN0_A { - match self.bits { - false => PIN0_A::NOT_LATCHED, - true => PIN0_A::LATCHED, - } - } - #[doc = "Checks if the value of the field is `NOT_LATCHED`"] - #[inline(always)] - pub fn is_not_latched(&self) -> bool { - *self == PIN0_A::NOT_LATCHED - } - #[doc = "Checks if the value of the field is `LATCHED`"] - #[inline(always)] - pub fn is_latched(&self) -> bool { - *self == PIN0_A::LATCHED - } -} -#[doc = "Field `PIN0` writer - Status on whether PIN0 has met criteria set in PIN_CNF0.SENSE register. Write '1' to clear."] -pub type PIN0_W<'a, const O: u8> = crate::BitWriter<'a, u32, LATCH_SPEC, PIN0_A, O>; -impl<'a, const O: u8> PIN0_W<'a, O> { - #[doc = "Criteria has not been met"] - #[inline(always)] - pub fn not_latched(self) -> &'a mut W { - self.variant(PIN0_A::NOT_LATCHED) - } - #[doc = "Criteria has been met"] - #[inline(always)] - pub fn latched(self) -> &'a mut W { - self.variant(PIN0_A::LATCHED) - } -} -#[doc = "Field `PIN1` reader - Status on whether PIN1 has met criteria set in PIN_CNF1.SENSE register. Write '1' to clear."] -pub type PIN1_R = crate::BitReader; -#[doc = "Status on whether PIN1 has met criteria set in PIN_CNF1.SENSE register. Write '1' to clear.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PIN1_A { - #[doc = "0: Criteria has not been met"] - NOT_LATCHED = 0, - #[doc = "1: Criteria has been met"] - LATCHED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PIN1_A) -> Self { - variant as u8 != 0 - } -} -impl PIN1_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> PIN1_A { - match self.bits { - false => PIN1_A::NOT_LATCHED, - true => PIN1_A::LATCHED, - } - } - #[doc = "Checks if the value of the field is `NOT_LATCHED`"] - #[inline(always)] - pub fn is_not_latched(&self) -> bool { - *self == PIN1_A::NOT_LATCHED - } - #[doc = "Checks if the value of the field is `LATCHED`"] - #[inline(always)] - pub fn is_latched(&self) -> bool { - *self == PIN1_A::LATCHED - } -} -#[doc = "Field `PIN1` writer - Status on whether PIN1 has met criteria set in PIN_CNF1.SENSE register. Write '1' to clear."] -pub type PIN1_W<'a, const O: u8> = crate::BitWriter<'a, u32, LATCH_SPEC, PIN1_A, O>; -impl<'a, const O: u8> PIN1_W<'a, O> { - #[doc = "Criteria has not been met"] - #[inline(always)] - pub fn not_latched(self) -> &'a mut W { - self.variant(PIN1_A::NOT_LATCHED) - } - #[doc = "Criteria has been met"] - #[inline(always)] - pub fn latched(self) -> &'a mut W { - self.variant(PIN1_A::LATCHED) - } -} -#[doc = "Field `PIN2` reader - Status on whether PIN2 has met criteria set in PIN_CNF2.SENSE register. Write '1' to clear."] -pub type PIN2_R = crate::BitReader; -#[doc = "Status on whether PIN2 has met criteria set in PIN_CNF2.SENSE register. Write '1' to clear.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PIN2_A { - #[doc = "0: Criteria has not been met"] - NOT_LATCHED = 0, - #[doc = "1: Criteria has been met"] - LATCHED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PIN2_A) -> Self { - variant as u8 != 0 - } -} -impl PIN2_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> PIN2_A { - match self.bits { - false => PIN2_A::NOT_LATCHED, - true => PIN2_A::LATCHED, - } - } - #[doc = "Checks if the value of the field is `NOT_LATCHED`"] - #[inline(always)] - pub fn is_not_latched(&self) -> bool { - *self == PIN2_A::NOT_LATCHED - } - #[doc = "Checks if the value of the field is `LATCHED`"] - #[inline(always)] - pub fn is_latched(&self) -> bool { - *self == PIN2_A::LATCHED - } -} -#[doc = "Field `PIN2` writer - Status on whether PIN2 has met criteria set in PIN_CNF2.SENSE register. Write '1' to clear."] -pub type PIN2_W<'a, const O: u8> = crate::BitWriter<'a, u32, LATCH_SPEC, PIN2_A, O>; -impl<'a, const O: u8> PIN2_W<'a, O> { - #[doc = "Criteria has not been met"] - #[inline(always)] - pub fn not_latched(self) -> &'a mut W { - self.variant(PIN2_A::NOT_LATCHED) - } - #[doc = "Criteria has been met"] - #[inline(always)] - pub fn latched(self) -> &'a mut W { - self.variant(PIN2_A::LATCHED) - } -} -#[doc = "Field `PIN3` reader - Status on whether PIN3 has met criteria set in PIN_CNF3.SENSE register. Write '1' to clear."] -pub type PIN3_R = crate::BitReader; -#[doc = "Status on whether PIN3 has met criteria set in PIN_CNF3.SENSE register. Write '1' to clear.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PIN3_A { - #[doc = "0: Criteria has not been met"] - NOT_LATCHED = 0, - #[doc = "1: Criteria has been met"] - LATCHED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PIN3_A) -> Self { - variant as u8 != 0 - } -} -impl PIN3_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> PIN3_A { - match self.bits { - false => PIN3_A::NOT_LATCHED, - true => PIN3_A::LATCHED, - } - } - #[doc = "Checks if the value of the field is `NOT_LATCHED`"] - #[inline(always)] - pub fn is_not_latched(&self) -> bool { - *self == PIN3_A::NOT_LATCHED - } - #[doc = "Checks if the value of the field is `LATCHED`"] - #[inline(always)] - pub fn is_latched(&self) -> bool { - *self == PIN3_A::LATCHED - } -} -#[doc = "Field `PIN3` writer - Status on whether PIN3 has met criteria set in PIN_CNF3.SENSE register. Write '1' to clear."] -pub type PIN3_W<'a, const O: u8> = crate::BitWriter<'a, u32, LATCH_SPEC, PIN3_A, O>; -impl<'a, const O: u8> PIN3_W<'a, O> { - #[doc = "Criteria has not been met"] - #[inline(always)] - pub fn not_latched(self) -> &'a mut W { - self.variant(PIN3_A::NOT_LATCHED) - } - #[doc = "Criteria has been met"] - #[inline(always)] - pub fn latched(self) -> &'a mut W { - self.variant(PIN3_A::LATCHED) - } -} -#[doc = "Field `PIN4` reader - Status on whether PIN4 has met criteria set in PIN_CNF4.SENSE register. Write '1' to clear."] -pub type PIN4_R = crate::BitReader; -#[doc = "Status on whether PIN4 has met criteria set in PIN_CNF4.SENSE register. Write '1' to clear.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PIN4_A { - #[doc = "0: Criteria has not been met"] - NOT_LATCHED = 0, - #[doc = "1: Criteria has been met"] - LATCHED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PIN4_A) -> Self { - variant as u8 != 0 - } -} -impl PIN4_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> PIN4_A { - match self.bits { - false => PIN4_A::NOT_LATCHED, - true => PIN4_A::LATCHED, - } - } - #[doc = "Checks if the value of the field is `NOT_LATCHED`"] - #[inline(always)] - pub fn is_not_latched(&self) -> bool { - *self == PIN4_A::NOT_LATCHED - } - #[doc = "Checks if the value of the field is `LATCHED`"] - #[inline(always)] - pub fn is_latched(&self) -> bool { - *self == PIN4_A::LATCHED - } -} -#[doc = "Field `PIN4` writer - Status on whether PIN4 has met criteria set in PIN_CNF4.SENSE register. Write '1' to clear."] -pub type PIN4_W<'a, const O: u8> = crate::BitWriter<'a, u32, LATCH_SPEC, PIN4_A, O>; -impl<'a, const O: u8> PIN4_W<'a, O> { - #[doc = "Criteria has not been met"] - #[inline(always)] - pub fn not_latched(self) -> &'a mut W { - self.variant(PIN4_A::NOT_LATCHED) - } - #[doc = "Criteria has been met"] - #[inline(always)] - pub fn latched(self) -> &'a mut W { - self.variant(PIN4_A::LATCHED) - } -} -#[doc = "Field `PIN5` reader - Status on whether PIN5 has met criteria set in PIN_CNF5.SENSE register. Write '1' to clear."] -pub type PIN5_R = crate::BitReader; -#[doc = "Status on whether PIN5 has met criteria set in PIN_CNF5.SENSE register. Write '1' to clear.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PIN5_A { - #[doc = "0: Criteria has not been met"] - NOT_LATCHED = 0, - #[doc = "1: Criteria has been met"] - LATCHED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PIN5_A) -> Self { - variant as u8 != 0 - } -} -impl PIN5_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> PIN5_A { - match self.bits { - false => PIN5_A::NOT_LATCHED, - true => PIN5_A::LATCHED, - } - } - #[doc = "Checks if the value of the field is `NOT_LATCHED`"] - #[inline(always)] - pub fn is_not_latched(&self) -> bool { - *self == PIN5_A::NOT_LATCHED - } - #[doc = "Checks if the value of the field is `LATCHED`"] - #[inline(always)] - pub fn is_latched(&self) -> bool { - *self == PIN5_A::LATCHED - } -} -#[doc = "Field `PIN5` writer - Status on whether PIN5 has met criteria set in PIN_CNF5.SENSE register. Write '1' to clear."] -pub type PIN5_W<'a, const O: u8> = crate::BitWriter<'a, u32, LATCH_SPEC, PIN5_A, O>; -impl<'a, const O: u8> PIN5_W<'a, O> { - #[doc = "Criteria has not been met"] - #[inline(always)] - pub fn not_latched(self) -> &'a mut W { - self.variant(PIN5_A::NOT_LATCHED) - } - #[doc = "Criteria has been met"] - #[inline(always)] - pub fn latched(self) -> &'a mut W { - self.variant(PIN5_A::LATCHED) - } -} -#[doc = "Field `PIN6` reader - Status on whether PIN6 has met criteria set in PIN_CNF6.SENSE register. Write '1' to clear."] -pub type PIN6_R = crate::BitReader; -#[doc = "Status on whether PIN6 has met criteria set in PIN_CNF6.SENSE register. Write '1' to clear.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PIN6_A { - #[doc = "0: Criteria has not been met"] - NOT_LATCHED = 0, - #[doc = "1: Criteria has been met"] - LATCHED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PIN6_A) -> Self { - variant as u8 != 0 - } -} -impl PIN6_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> PIN6_A { - match self.bits { - false => PIN6_A::NOT_LATCHED, - true => PIN6_A::LATCHED, - } - } - #[doc = "Checks if the value of the field is `NOT_LATCHED`"] - #[inline(always)] - pub fn is_not_latched(&self) -> bool { - *self == PIN6_A::NOT_LATCHED - } - #[doc = "Checks if the value of the field is `LATCHED`"] - #[inline(always)] - pub fn is_latched(&self) -> bool { - *self == PIN6_A::LATCHED - } -} -#[doc = "Field `PIN6` writer - Status on whether PIN6 has met criteria set in PIN_CNF6.SENSE register. Write '1' to clear."] -pub type PIN6_W<'a, const O: u8> = crate::BitWriter<'a, u32, LATCH_SPEC, PIN6_A, O>; -impl<'a, const O: u8> PIN6_W<'a, O> { - #[doc = "Criteria has not been met"] - #[inline(always)] - pub fn not_latched(self) -> &'a mut W { - self.variant(PIN6_A::NOT_LATCHED) - } - #[doc = "Criteria has been met"] - #[inline(always)] - pub fn latched(self) -> &'a mut W { - self.variant(PIN6_A::LATCHED) - } -} -#[doc = "Field `PIN7` reader - Status on whether PIN7 has met criteria set in PIN_CNF7.SENSE register. Write '1' to clear."] -pub type PIN7_R = crate::BitReader; -#[doc = "Status on whether PIN7 has met criteria set in PIN_CNF7.SENSE register. Write '1' to clear.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PIN7_A { - #[doc = "0: Criteria has not been met"] - NOT_LATCHED = 0, - #[doc = "1: Criteria has been met"] - LATCHED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PIN7_A) -> Self { - variant as u8 != 0 - } -} -impl PIN7_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> PIN7_A { - match self.bits { - false => PIN7_A::NOT_LATCHED, - true => PIN7_A::LATCHED, - } - } - #[doc = "Checks if the value of the field is `NOT_LATCHED`"] - #[inline(always)] - pub fn is_not_latched(&self) -> bool { - *self == PIN7_A::NOT_LATCHED - } - #[doc = "Checks if the value of the field is `LATCHED`"] - #[inline(always)] - pub fn is_latched(&self) -> bool { - *self == PIN7_A::LATCHED - } -} -#[doc = "Field `PIN7` writer - Status on whether PIN7 has met criteria set in PIN_CNF7.SENSE register. Write '1' to clear."] -pub type PIN7_W<'a, const O: u8> = crate::BitWriter<'a, u32, LATCH_SPEC, PIN7_A, O>; -impl<'a, const O: u8> PIN7_W<'a, O> { - #[doc = "Criteria has not been met"] - #[inline(always)] - pub fn not_latched(self) -> &'a mut W { - self.variant(PIN7_A::NOT_LATCHED) - } - #[doc = "Criteria has been met"] - #[inline(always)] - pub fn latched(self) -> &'a mut W { - self.variant(PIN7_A::LATCHED) - } -} -#[doc = "Field `PIN8` reader - Status on whether PIN8 has met criteria set in PIN_CNF8.SENSE register. Write '1' to clear."] -pub type PIN8_R = crate::BitReader; -#[doc = "Status on whether PIN8 has met criteria set in PIN_CNF8.SENSE register. Write '1' to clear.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PIN8_A { - #[doc = "0: Criteria has not been met"] - NOT_LATCHED = 0, - #[doc = "1: Criteria has been met"] - LATCHED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PIN8_A) -> Self { - variant as u8 != 0 - } -} -impl PIN8_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> PIN8_A { - match self.bits { - false => PIN8_A::NOT_LATCHED, - true => PIN8_A::LATCHED, - } - } - #[doc = "Checks if the value of the field is `NOT_LATCHED`"] - #[inline(always)] - pub fn is_not_latched(&self) -> bool { - *self == PIN8_A::NOT_LATCHED - } - #[doc = "Checks if the value of the field is `LATCHED`"] - #[inline(always)] - pub fn is_latched(&self) -> bool { - *self == PIN8_A::LATCHED - } -} -#[doc = "Field `PIN8` writer - Status on whether PIN8 has met criteria set in PIN_CNF8.SENSE register. Write '1' to clear."] -pub type PIN8_W<'a, const O: u8> = crate::BitWriter<'a, u32, LATCH_SPEC, PIN8_A, O>; -impl<'a, const O: u8> PIN8_W<'a, O> { - #[doc = "Criteria has not been met"] - #[inline(always)] - pub fn not_latched(self) -> &'a mut W { - self.variant(PIN8_A::NOT_LATCHED) - } - #[doc = "Criteria has been met"] - #[inline(always)] - pub fn latched(self) -> &'a mut W { - self.variant(PIN8_A::LATCHED) - } -} -#[doc = "Field `PIN9` reader - Status on whether PIN9 has met criteria set in PIN_CNF9.SENSE register. Write '1' to clear."] -pub type PIN9_R = crate::BitReader; -#[doc = "Status on whether PIN9 has met criteria set in PIN_CNF9.SENSE register. Write '1' to clear.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PIN9_A { - #[doc = "0: Criteria has not been met"] - NOT_LATCHED = 0, - #[doc = "1: Criteria has been met"] - LATCHED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PIN9_A) -> Self { - variant as u8 != 0 - } -} -impl PIN9_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> PIN9_A { - match self.bits { - false => PIN9_A::NOT_LATCHED, - true => PIN9_A::LATCHED, - } - } - #[doc = "Checks if the value of the field is `NOT_LATCHED`"] - #[inline(always)] - pub fn is_not_latched(&self) -> bool { - *self == PIN9_A::NOT_LATCHED - } - #[doc = "Checks if the value of the field is `LATCHED`"] - #[inline(always)] - pub fn is_latched(&self) -> bool { - *self == PIN9_A::LATCHED - } -} -#[doc = "Field `PIN9` writer - Status on whether PIN9 has met criteria set in PIN_CNF9.SENSE register. Write '1' to clear."] -pub type PIN9_W<'a, const O: u8> = crate::BitWriter<'a, u32, LATCH_SPEC, PIN9_A, O>; -impl<'a, const O: u8> PIN9_W<'a, O> { - #[doc = "Criteria has not been met"] - #[inline(always)] - pub fn not_latched(self) -> &'a mut W { - self.variant(PIN9_A::NOT_LATCHED) - } - #[doc = "Criteria has been met"] - #[inline(always)] - pub fn latched(self) -> &'a mut W { - self.variant(PIN9_A::LATCHED) - } -} -#[doc = "Field `PIN10` reader - Status on whether PIN10 has met criteria set in PIN_CNF10.SENSE register. Write '1' to clear."] -pub type PIN10_R = crate::BitReader; -#[doc = "Status on whether PIN10 has met criteria set in PIN_CNF10.SENSE register. Write '1' to clear.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PIN10_A { - #[doc = "0: Criteria has not been met"] - NOT_LATCHED = 0, - #[doc = "1: Criteria has been met"] - LATCHED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PIN10_A) -> Self { - variant as u8 != 0 - } -} -impl PIN10_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> PIN10_A { - match self.bits { - false => PIN10_A::NOT_LATCHED, - true => PIN10_A::LATCHED, - } - } - #[doc = "Checks if the value of the field is `NOT_LATCHED`"] - #[inline(always)] - pub fn is_not_latched(&self) -> bool { - *self == PIN10_A::NOT_LATCHED - } - #[doc = "Checks if the value of the field is `LATCHED`"] - #[inline(always)] - pub fn is_latched(&self) -> bool { - *self == PIN10_A::LATCHED - } -} -#[doc = "Field `PIN10` writer - Status on whether PIN10 has met criteria set in PIN_CNF10.SENSE register. Write '1' to clear."] -pub type PIN10_W<'a, const O: u8> = crate::BitWriter<'a, u32, LATCH_SPEC, PIN10_A, O>; -impl<'a, const O: u8> PIN10_W<'a, O> { - #[doc = "Criteria has not been met"] - #[inline(always)] - pub fn not_latched(self) -> &'a mut W { - self.variant(PIN10_A::NOT_LATCHED) - } - #[doc = "Criteria has been met"] - #[inline(always)] - pub fn latched(self) -> &'a mut W { - self.variant(PIN10_A::LATCHED) - } -} -#[doc = "Field `PIN11` reader - Status on whether PIN11 has met criteria set in PIN_CNF11.SENSE register. Write '1' to clear."] -pub type PIN11_R = crate::BitReader; -#[doc = "Status on whether PIN11 has met criteria set in PIN_CNF11.SENSE register. Write '1' to clear.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PIN11_A { - #[doc = "0: Criteria has not been met"] - NOT_LATCHED = 0, - #[doc = "1: Criteria has been met"] - LATCHED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PIN11_A) -> Self { - variant as u8 != 0 - } -} -impl PIN11_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> PIN11_A { - match self.bits { - false => PIN11_A::NOT_LATCHED, - true => PIN11_A::LATCHED, - } - } - #[doc = "Checks if the value of the field is `NOT_LATCHED`"] - #[inline(always)] - pub fn is_not_latched(&self) -> bool { - *self == PIN11_A::NOT_LATCHED - } - #[doc = "Checks if the value of the field is `LATCHED`"] - #[inline(always)] - pub fn is_latched(&self) -> bool { - *self == PIN11_A::LATCHED - } -} -#[doc = "Field `PIN11` writer - Status on whether PIN11 has met criteria set in PIN_CNF11.SENSE register. Write '1' to clear."] -pub type PIN11_W<'a, const O: u8> = crate::BitWriter<'a, u32, LATCH_SPEC, PIN11_A, O>; -impl<'a, const O: u8> PIN11_W<'a, O> { - #[doc = "Criteria has not been met"] - #[inline(always)] - pub fn not_latched(self) -> &'a mut W { - self.variant(PIN11_A::NOT_LATCHED) - } - #[doc = "Criteria has been met"] - #[inline(always)] - pub fn latched(self) -> &'a mut W { - self.variant(PIN11_A::LATCHED) - } -} -#[doc = "Field `PIN12` reader - Status on whether PIN12 has met criteria set in PIN_CNF12.SENSE register. Write '1' to clear."] -pub type PIN12_R = crate::BitReader; -#[doc = "Status on whether PIN12 has met criteria set in PIN_CNF12.SENSE register. Write '1' to clear.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PIN12_A { - #[doc = "0: Criteria has not been met"] - NOT_LATCHED = 0, - #[doc = "1: Criteria has been met"] - LATCHED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PIN12_A) -> Self { - variant as u8 != 0 - } -} -impl PIN12_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> PIN12_A { - match self.bits { - false => PIN12_A::NOT_LATCHED, - true => PIN12_A::LATCHED, - } - } - #[doc = "Checks if the value of the field is `NOT_LATCHED`"] - #[inline(always)] - pub fn is_not_latched(&self) -> bool { - *self == PIN12_A::NOT_LATCHED - } - #[doc = "Checks if the value of the field is `LATCHED`"] - #[inline(always)] - pub fn is_latched(&self) -> bool { - *self == PIN12_A::LATCHED - } -} -#[doc = "Field `PIN12` writer - Status on whether PIN12 has met criteria set in PIN_CNF12.SENSE register. Write '1' to clear."] -pub type PIN12_W<'a, const O: u8> = crate::BitWriter<'a, u32, LATCH_SPEC, PIN12_A, O>; -impl<'a, const O: u8> PIN12_W<'a, O> { - #[doc = "Criteria has not been met"] - #[inline(always)] - pub fn not_latched(self) -> &'a mut W { - self.variant(PIN12_A::NOT_LATCHED) - } - #[doc = "Criteria has been met"] - #[inline(always)] - pub fn latched(self) -> &'a mut W { - self.variant(PIN12_A::LATCHED) - } -} -#[doc = "Field `PIN13` reader - Status on whether PIN13 has met criteria set in PIN_CNF13.SENSE register. Write '1' to clear."] -pub type PIN13_R = crate::BitReader; -#[doc = "Status on whether PIN13 has met criteria set in PIN_CNF13.SENSE register. Write '1' to clear.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PIN13_A { - #[doc = "0: Criteria has not been met"] - NOT_LATCHED = 0, - #[doc = "1: Criteria has been met"] - LATCHED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PIN13_A) -> Self { - variant as u8 != 0 - } -} -impl PIN13_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> PIN13_A { - match self.bits { - false => PIN13_A::NOT_LATCHED, - true => PIN13_A::LATCHED, - } - } - #[doc = "Checks if the value of the field is `NOT_LATCHED`"] - #[inline(always)] - pub fn is_not_latched(&self) -> bool { - *self == PIN13_A::NOT_LATCHED - } - #[doc = "Checks if the value of the field is `LATCHED`"] - #[inline(always)] - pub fn is_latched(&self) -> bool { - *self == PIN13_A::LATCHED - } -} -#[doc = "Field `PIN13` writer - Status on whether PIN13 has met criteria set in PIN_CNF13.SENSE register. Write '1' to clear."] -pub type PIN13_W<'a, const O: u8> = crate::BitWriter<'a, u32, LATCH_SPEC, PIN13_A, O>; -impl<'a, const O: u8> PIN13_W<'a, O> { - #[doc = "Criteria has not been met"] - #[inline(always)] - pub fn not_latched(self) -> &'a mut W { - self.variant(PIN13_A::NOT_LATCHED) - } - #[doc = "Criteria has been met"] - #[inline(always)] - pub fn latched(self) -> &'a mut W { - self.variant(PIN13_A::LATCHED) - } -} -#[doc = "Field `PIN14` reader - Status on whether PIN14 has met criteria set in PIN_CNF14.SENSE register. Write '1' to clear."] -pub type PIN14_R = crate::BitReader; -#[doc = "Status on whether PIN14 has met criteria set in PIN_CNF14.SENSE register. Write '1' to clear.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PIN14_A { - #[doc = "0: Criteria has not been met"] - NOT_LATCHED = 0, - #[doc = "1: Criteria has been met"] - LATCHED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PIN14_A) -> Self { - variant as u8 != 0 - } -} -impl PIN14_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> PIN14_A { - match self.bits { - false => PIN14_A::NOT_LATCHED, - true => PIN14_A::LATCHED, - } - } - #[doc = "Checks if the value of the field is `NOT_LATCHED`"] - #[inline(always)] - pub fn is_not_latched(&self) -> bool { - *self == PIN14_A::NOT_LATCHED - } - #[doc = "Checks if the value of the field is `LATCHED`"] - #[inline(always)] - pub fn is_latched(&self) -> bool { - *self == PIN14_A::LATCHED - } -} -#[doc = "Field `PIN14` writer - Status on whether PIN14 has met criteria set in PIN_CNF14.SENSE register. Write '1' to clear."] -pub type PIN14_W<'a, const O: u8> = crate::BitWriter<'a, u32, LATCH_SPEC, PIN14_A, O>; -impl<'a, const O: u8> PIN14_W<'a, O> { - #[doc = "Criteria has not been met"] - #[inline(always)] - pub fn not_latched(self) -> &'a mut W { - self.variant(PIN14_A::NOT_LATCHED) - } - #[doc = "Criteria has been met"] - #[inline(always)] - pub fn latched(self) -> &'a mut W { - self.variant(PIN14_A::LATCHED) - } -} -#[doc = "Field `PIN15` reader - Status on whether PIN15 has met criteria set in PIN_CNF15.SENSE register. Write '1' to clear."] -pub type PIN15_R = crate::BitReader; -#[doc = "Status on whether PIN15 has met criteria set in PIN_CNF15.SENSE register. Write '1' to clear.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PIN15_A { - #[doc = "0: Criteria has not been met"] - NOT_LATCHED = 0, - #[doc = "1: Criteria has been met"] - LATCHED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PIN15_A) -> Self { - variant as u8 != 0 - } -} -impl PIN15_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> PIN15_A { - match self.bits { - false => PIN15_A::NOT_LATCHED, - true => PIN15_A::LATCHED, - } - } - #[doc = "Checks if the value of the field is `NOT_LATCHED`"] - #[inline(always)] - pub fn is_not_latched(&self) -> bool { - *self == PIN15_A::NOT_LATCHED - } - #[doc = "Checks if the value of the field is `LATCHED`"] - #[inline(always)] - pub fn is_latched(&self) -> bool { - *self == PIN15_A::LATCHED - } -} -#[doc = "Field `PIN15` writer - Status on whether PIN15 has met criteria set in PIN_CNF15.SENSE register. Write '1' to clear."] -pub type PIN15_W<'a, const O: u8> = crate::BitWriter<'a, u32, LATCH_SPEC, PIN15_A, O>; -impl<'a, const O: u8> PIN15_W<'a, O> { - #[doc = "Criteria has not been met"] - #[inline(always)] - pub fn not_latched(self) -> &'a mut W { - self.variant(PIN15_A::NOT_LATCHED) - } - #[doc = "Criteria has been met"] - #[inline(always)] - pub fn latched(self) -> &'a mut W { - self.variant(PIN15_A::LATCHED) - } -} -#[doc = "Field `PIN16` reader - Status on whether PIN16 has met criteria set in PIN_CNF16.SENSE register. Write '1' to clear."] -pub type PIN16_R = crate::BitReader; -#[doc = "Status on whether PIN16 has met criteria set in PIN_CNF16.SENSE register. Write '1' to clear.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PIN16_A { - #[doc = "0: Criteria has not been met"] - NOT_LATCHED = 0, - #[doc = "1: Criteria has been met"] - LATCHED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PIN16_A) -> Self { - variant as u8 != 0 - } -} -impl PIN16_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> PIN16_A { - match self.bits { - false => PIN16_A::NOT_LATCHED, - true => PIN16_A::LATCHED, - } - } - #[doc = "Checks if the value of the field is `NOT_LATCHED`"] - #[inline(always)] - pub fn is_not_latched(&self) -> bool { - *self == PIN16_A::NOT_LATCHED - } - #[doc = "Checks if the value of the field is `LATCHED`"] - #[inline(always)] - pub fn is_latched(&self) -> bool { - *self == PIN16_A::LATCHED - } -} -#[doc = "Field `PIN16` writer - Status on whether PIN16 has met criteria set in PIN_CNF16.SENSE register. Write '1' to clear."] -pub type PIN16_W<'a, const O: u8> = crate::BitWriter<'a, u32, LATCH_SPEC, PIN16_A, O>; -impl<'a, const O: u8> PIN16_W<'a, O> { - #[doc = "Criteria has not been met"] - #[inline(always)] - pub fn not_latched(self) -> &'a mut W { - self.variant(PIN16_A::NOT_LATCHED) - } - #[doc = "Criteria has been met"] - #[inline(always)] - pub fn latched(self) -> &'a mut W { - self.variant(PIN16_A::LATCHED) - } -} -#[doc = "Field `PIN17` reader - Status on whether PIN17 has met criteria set in PIN_CNF17.SENSE register. Write '1' to clear."] -pub type PIN17_R = crate::BitReader; -#[doc = "Status on whether PIN17 has met criteria set in PIN_CNF17.SENSE register. Write '1' to clear.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PIN17_A { - #[doc = "0: Criteria has not been met"] - NOT_LATCHED = 0, - #[doc = "1: Criteria has been met"] - LATCHED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PIN17_A) -> Self { - variant as u8 != 0 - } -} -impl PIN17_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> PIN17_A { - match self.bits { - false => PIN17_A::NOT_LATCHED, - true => PIN17_A::LATCHED, - } - } - #[doc = "Checks if the value of the field is `NOT_LATCHED`"] - #[inline(always)] - pub fn is_not_latched(&self) -> bool { - *self == PIN17_A::NOT_LATCHED - } - #[doc = "Checks if the value of the field is `LATCHED`"] - #[inline(always)] - pub fn is_latched(&self) -> bool { - *self == PIN17_A::LATCHED - } -} -#[doc = "Field `PIN17` writer - Status on whether PIN17 has met criteria set in PIN_CNF17.SENSE register. Write '1' to clear."] -pub type PIN17_W<'a, const O: u8> = crate::BitWriter<'a, u32, LATCH_SPEC, PIN17_A, O>; -impl<'a, const O: u8> PIN17_W<'a, O> { - #[doc = "Criteria has not been met"] - #[inline(always)] - pub fn not_latched(self) -> &'a mut W { - self.variant(PIN17_A::NOT_LATCHED) - } - #[doc = "Criteria has been met"] - #[inline(always)] - pub fn latched(self) -> &'a mut W { - self.variant(PIN17_A::LATCHED) - } -} -#[doc = "Field `PIN18` reader - Status on whether PIN18 has met criteria set in PIN_CNF18.SENSE register. Write '1' to clear."] -pub type PIN18_R = crate::BitReader; -#[doc = "Status on whether PIN18 has met criteria set in PIN_CNF18.SENSE register. Write '1' to clear.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PIN18_A { - #[doc = "0: Criteria has not been met"] - NOT_LATCHED = 0, - #[doc = "1: Criteria has been met"] - LATCHED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PIN18_A) -> Self { - variant as u8 != 0 - } -} -impl PIN18_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> PIN18_A { - match self.bits { - false => PIN18_A::NOT_LATCHED, - true => PIN18_A::LATCHED, - } - } - #[doc = "Checks if the value of the field is `NOT_LATCHED`"] - #[inline(always)] - pub fn is_not_latched(&self) -> bool { - *self == PIN18_A::NOT_LATCHED - } - #[doc = "Checks if the value of the field is `LATCHED`"] - #[inline(always)] - pub fn is_latched(&self) -> bool { - *self == PIN18_A::LATCHED - } -} -#[doc = "Field `PIN18` writer - Status on whether PIN18 has met criteria set in PIN_CNF18.SENSE register. Write '1' to clear."] -pub type PIN18_W<'a, const O: u8> = crate::BitWriter<'a, u32, LATCH_SPEC, PIN18_A, O>; -impl<'a, const O: u8> PIN18_W<'a, O> { - #[doc = "Criteria has not been met"] - #[inline(always)] - pub fn not_latched(self) -> &'a mut W { - self.variant(PIN18_A::NOT_LATCHED) - } - #[doc = "Criteria has been met"] - #[inline(always)] - pub fn latched(self) -> &'a mut W { - self.variant(PIN18_A::LATCHED) - } -} -#[doc = "Field `PIN19` reader - Status on whether PIN19 has met criteria set in PIN_CNF19.SENSE register. Write '1' to clear."] -pub type PIN19_R = crate::BitReader; -#[doc = "Status on whether PIN19 has met criteria set in PIN_CNF19.SENSE register. Write '1' to clear.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PIN19_A { - #[doc = "0: Criteria has not been met"] - NOT_LATCHED = 0, - #[doc = "1: Criteria has been met"] - LATCHED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PIN19_A) -> Self { - variant as u8 != 0 - } -} -impl PIN19_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> PIN19_A { - match self.bits { - false => PIN19_A::NOT_LATCHED, - true => PIN19_A::LATCHED, - } - } - #[doc = "Checks if the value of the field is `NOT_LATCHED`"] - #[inline(always)] - pub fn is_not_latched(&self) -> bool { - *self == PIN19_A::NOT_LATCHED - } - #[doc = "Checks if the value of the field is `LATCHED`"] - #[inline(always)] - pub fn is_latched(&self) -> bool { - *self == PIN19_A::LATCHED - } -} -#[doc = "Field `PIN19` writer - Status on whether PIN19 has met criteria set in PIN_CNF19.SENSE register. Write '1' to clear."] -pub type PIN19_W<'a, const O: u8> = crate::BitWriter<'a, u32, LATCH_SPEC, PIN19_A, O>; -impl<'a, const O: u8> PIN19_W<'a, O> { - #[doc = "Criteria has not been met"] - #[inline(always)] - pub fn not_latched(self) -> &'a mut W { - self.variant(PIN19_A::NOT_LATCHED) - } - #[doc = "Criteria has been met"] - #[inline(always)] - pub fn latched(self) -> &'a mut W { - self.variant(PIN19_A::LATCHED) - } -} -#[doc = "Field `PIN20` reader - Status on whether PIN20 has met criteria set in PIN_CNF20.SENSE register. Write '1' to clear."] -pub type PIN20_R = crate::BitReader; -#[doc = "Status on whether PIN20 has met criteria set in PIN_CNF20.SENSE register. Write '1' to clear.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PIN20_A { - #[doc = "0: Criteria has not been met"] - NOT_LATCHED = 0, - #[doc = "1: Criteria has been met"] - LATCHED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PIN20_A) -> Self { - variant as u8 != 0 - } -} -impl PIN20_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> PIN20_A { - match self.bits { - false => PIN20_A::NOT_LATCHED, - true => PIN20_A::LATCHED, - } - } - #[doc = "Checks if the value of the field is `NOT_LATCHED`"] - #[inline(always)] - pub fn is_not_latched(&self) -> bool { - *self == PIN20_A::NOT_LATCHED - } - #[doc = "Checks if the value of the field is `LATCHED`"] - #[inline(always)] - pub fn is_latched(&self) -> bool { - *self == PIN20_A::LATCHED - } -} -#[doc = "Field `PIN20` writer - Status on whether PIN20 has met criteria set in PIN_CNF20.SENSE register. Write '1' to clear."] -pub type PIN20_W<'a, const O: u8> = crate::BitWriter<'a, u32, LATCH_SPEC, PIN20_A, O>; -impl<'a, const O: u8> PIN20_W<'a, O> { - #[doc = "Criteria has not been met"] - #[inline(always)] - pub fn not_latched(self) -> &'a mut W { - self.variant(PIN20_A::NOT_LATCHED) - } - #[doc = "Criteria has been met"] - #[inline(always)] - pub fn latched(self) -> &'a mut W { - self.variant(PIN20_A::LATCHED) - } -} -#[doc = "Field `PIN21` reader - Status on whether PIN21 has met criteria set in PIN_CNF21.SENSE register. Write '1' to clear."] -pub type PIN21_R = crate::BitReader; -#[doc = "Status on whether PIN21 has met criteria set in PIN_CNF21.SENSE register. Write '1' to clear.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PIN21_A { - #[doc = "0: Criteria has not been met"] - NOT_LATCHED = 0, - #[doc = "1: Criteria has been met"] - LATCHED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PIN21_A) -> Self { - variant as u8 != 0 - } -} -impl PIN21_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> PIN21_A { - match self.bits { - false => PIN21_A::NOT_LATCHED, - true => PIN21_A::LATCHED, - } - } - #[doc = "Checks if the value of the field is `NOT_LATCHED`"] - #[inline(always)] - pub fn is_not_latched(&self) -> bool { - *self == PIN21_A::NOT_LATCHED - } - #[doc = "Checks if the value of the field is `LATCHED`"] - #[inline(always)] - pub fn is_latched(&self) -> bool { - *self == PIN21_A::LATCHED - } -} -#[doc = "Field `PIN21` writer - Status on whether PIN21 has met criteria set in PIN_CNF21.SENSE register. Write '1' to clear."] -pub type PIN21_W<'a, const O: u8> = crate::BitWriter<'a, u32, LATCH_SPEC, PIN21_A, O>; -impl<'a, const O: u8> PIN21_W<'a, O> { - #[doc = "Criteria has not been met"] - #[inline(always)] - pub fn not_latched(self) -> &'a mut W { - self.variant(PIN21_A::NOT_LATCHED) - } - #[doc = "Criteria has been met"] - #[inline(always)] - pub fn latched(self) -> &'a mut W { - self.variant(PIN21_A::LATCHED) - } -} -#[doc = "Field `PIN22` reader - Status on whether PIN22 has met criteria set in PIN_CNF22.SENSE register. Write '1' to clear."] -pub type PIN22_R = crate::BitReader; -#[doc = "Status on whether PIN22 has met criteria set in PIN_CNF22.SENSE register. Write '1' to clear.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PIN22_A { - #[doc = "0: Criteria has not been met"] - NOT_LATCHED = 0, - #[doc = "1: Criteria has been met"] - LATCHED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PIN22_A) -> Self { - variant as u8 != 0 - } -} -impl PIN22_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> PIN22_A { - match self.bits { - false => PIN22_A::NOT_LATCHED, - true => PIN22_A::LATCHED, - } - } - #[doc = "Checks if the value of the field is `NOT_LATCHED`"] - #[inline(always)] - pub fn is_not_latched(&self) -> bool { - *self == PIN22_A::NOT_LATCHED - } - #[doc = "Checks if the value of the field is `LATCHED`"] - #[inline(always)] - pub fn is_latched(&self) -> bool { - *self == PIN22_A::LATCHED - } -} -#[doc = "Field `PIN22` writer - Status on whether PIN22 has met criteria set in PIN_CNF22.SENSE register. Write '1' to clear."] -pub type PIN22_W<'a, const O: u8> = crate::BitWriter<'a, u32, LATCH_SPEC, PIN22_A, O>; -impl<'a, const O: u8> PIN22_W<'a, O> { - #[doc = "Criteria has not been met"] - #[inline(always)] - pub fn not_latched(self) -> &'a mut W { - self.variant(PIN22_A::NOT_LATCHED) - } - #[doc = "Criteria has been met"] - #[inline(always)] - pub fn latched(self) -> &'a mut W { - self.variant(PIN22_A::LATCHED) - } -} -#[doc = "Field `PIN23` reader - Status on whether PIN23 has met criteria set in PIN_CNF23.SENSE register. Write '1' to clear."] -pub type PIN23_R = crate::BitReader; -#[doc = "Status on whether PIN23 has met criteria set in PIN_CNF23.SENSE register. Write '1' to clear.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PIN23_A { - #[doc = "0: Criteria has not been met"] - NOT_LATCHED = 0, - #[doc = "1: Criteria has been met"] - LATCHED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PIN23_A) -> Self { - variant as u8 != 0 - } -} -impl PIN23_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> PIN23_A { - match self.bits { - false => PIN23_A::NOT_LATCHED, - true => PIN23_A::LATCHED, - } - } - #[doc = "Checks if the value of the field is `NOT_LATCHED`"] - #[inline(always)] - pub fn is_not_latched(&self) -> bool { - *self == PIN23_A::NOT_LATCHED - } - #[doc = "Checks if the value of the field is `LATCHED`"] - #[inline(always)] - pub fn is_latched(&self) -> bool { - *self == PIN23_A::LATCHED - } -} -#[doc = "Field `PIN23` writer - Status on whether PIN23 has met criteria set in PIN_CNF23.SENSE register. Write '1' to clear."] -pub type PIN23_W<'a, const O: u8> = crate::BitWriter<'a, u32, LATCH_SPEC, PIN23_A, O>; -impl<'a, const O: u8> PIN23_W<'a, O> { - #[doc = "Criteria has not been met"] - #[inline(always)] - pub fn not_latched(self) -> &'a mut W { - self.variant(PIN23_A::NOT_LATCHED) - } - #[doc = "Criteria has been met"] - #[inline(always)] - pub fn latched(self) -> &'a mut W { - self.variant(PIN23_A::LATCHED) - } -} -#[doc = "Field `PIN24` reader - Status on whether PIN24 has met criteria set in PIN_CNF24.SENSE register. Write '1' to clear."] -pub type PIN24_R = crate::BitReader; -#[doc = "Status on whether PIN24 has met criteria set in PIN_CNF24.SENSE register. Write '1' to clear.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PIN24_A { - #[doc = "0: Criteria has not been met"] - NOT_LATCHED = 0, - #[doc = "1: Criteria has been met"] - LATCHED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PIN24_A) -> Self { - variant as u8 != 0 - } -} -impl PIN24_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> PIN24_A { - match self.bits { - false => PIN24_A::NOT_LATCHED, - true => PIN24_A::LATCHED, - } - } - #[doc = "Checks if the value of the field is `NOT_LATCHED`"] - #[inline(always)] - pub fn is_not_latched(&self) -> bool { - *self == PIN24_A::NOT_LATCHED - } - #[doc = "Checks if the value of the field is `LATCHED`"] - #[inline(always)] - pub fn is_latched(&self) -> bool { - *self == PIN24_A::LATCHED - } -} -#[doc = "Field `PIN24` writer - Status on whether PIN24 has met criteria set in PIN_CNF24.SENSE register. Write '1' to clear."] -pub type PIN24_W<'a, const O: u8> = crate::BitWriter<'a, u32, LATCH_SPEC, PIN24_A, O>; -impl<'a, const O: u8> PIN24_W<'a, O> { - #[doc = "Criteria has not been met"] - #[inline(always)] - pub fn not_latched(self) -> &'a mut W { - self.variant(PIN24_A::NOT_LATCHED) - } - #[doc = "Criteria has been met"] - #[inline(always)] - pub fn latched(self) -> &'a mut W { - self.variant(PIN24_A::LATCHED) - } -} -#[doc = "Field `PIN25` reader - Status on whether PIN25 has met criteria set in PIN_CNF25.SENSE register. Write '1' to clear."] -pub type PIN25_R = crate::BitReader; -#[doc = "Status on whether PIN25 has met criteria set in PIN_CNF25.SENSE register. Write '1' to clear.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PIN25_A { - #[doc = "0: Criteria has not been met"] - NOT_LATCHED = 0, - #[doc = "1: Criteria has been met"] - LATCHED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PIN25_A) -> Self { - variant as u8 != 0 - } -} -impl PIN25_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> PIN25_A { - match self.bits { - false => PIN25_A::NOT_LATCHED, - true => PIN25_A::LATCHED, - } - } - #[doc = "Checks if the value of the field is `NOT_LATCHED`"] - #[inline(always)] - pub fn is_not_latched(&self) -> bool { - *self == PIN25_A::NOT_LATCHED - } - #[doc = "Checks if the value of the field is `LATCHED`"] - #[inline(always)] - pub fn is_latched(&self) -> bool { - *self == PIN25_A::LATCHED - } -} -#[doc = "Field `PIN25` writer - Status on whether PIN25 has met criteria set in PIN_CNF25.SENSE register. Write '1' to clear."] -pub type PIN25_W<'a, const O: u8> = crate::BitWriter<'a, u32, LATCH_SPEC, PIN25_A, O>; -impl<'a, const O: u8> PIN25_W<'a, O> { - #[doc = "Criteria has not been met"] - #[inline(always)] - pub fn not_latched(self) -> &'a mut W { - self.variant(PIN25_A::NOT_LATCHED) - } - #[doc = "Criteria has been met"] - #[inline(always)] - pub fn latched(self) -> &'a mut W { - self.variant(PIN25_A::LATCHED) - } -} -#[doc = "Field `PIN26` reader - Status on whether PIN26 has met criteria set in PIN_CNF26.SENSE register. Write '1' to clear."] -pub type PIN26_R = crate::BitReader; -#[doc = "Status on whether PIN26 has met criteria set in PIN_CNF26.SENSE register. Write '1' to clear.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PIN26_A { - #[doc = "0: Criteria has not been met"] - NOT_LATCHED = 0, - #[doc = "1: Criteria has been met"] - LATCHED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PIN26_A) -> Self { - variant as u8 != 0 - } -} -impl PIN26_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> PIN26_A { - match self.bits { - false => PIN26_A::NOT_LATCHED, - true => PIN26_A::LATCHED, - } - } - #[doc = "Checks if the value of the field is `NOT_LATCHED`"] - #[inline(always)] - pub fn is_not_latched(&self) -> bool { - *self == PIN26_A::NOT_LATCHED - } - #[doc = "Checks if the value of the field is `LATCHED`"] - #[inline(always)] - pub fn is_latched(&self) -> bool { - *self == PIN26_A::LATCHED - } -} -#[doc = "Field `PIN26` writer - Status on whether PIN26 has met criteria set in PIN_CNF26.SENSE register. Write '1' to clear."] -pub type PIN26_W<'a, const O: u8> = crate::BitWriter<'a, u32, LATCH_SPEC, PIN26_A, O>; -impl<'a, const O: u8> PIN26_W<'a, O> { - #[doc = "Criteria has not been met"] - #[inline(always)] - pub fn not_latched(self) -> &'a mut W { - self.variant(PIN26_A::NOT_LATCHED) - } - #[doc = "Criteria has been met"] - #[inline(always)] - pub fn latched(self) -> &'a mut W { - self.variant(PIN26_A::LATCHED) - } -} -#[doc = "Field `PIN27` reader - Status on whether PIN27 has met criteria set in PIN_CNF27.SENSE register. Write '1' to clear."] -pub type PIN27_R = crate::BitReader; -#[doc = "Status on whether PIN27 has met criteria set in PIN_CNF27.SENSE register. Write '1' to clear.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PIN27_A { - #[doc = "0: Criteria has not been met"] - NOT_LATCHED = 0, - #[doc = "1: Criteria has been met"] - LATCHED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PIN27_A) -> Self { - variant as u8 != 0 - } -} -impl PIN27_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> PIN27_A { - match self.bits { - false => PIN27_A::NOT_LATCHED, - true => PIN27_A::LATCHED, - } - } - #[doc = "Checks if the value of the field is `NOT_LATCHED`"] - #[inline(always)] - pub fn is_not_latched(&self) -> bool { - *self == PIN27_A::NOT_LATCHED - } - #[doc = "Checks if the value of the field is `LATCHED`"] - #[inline(always)] - pub fn is_latched(&self) -> bool { - *self == PIN27_A::LATCHED - } -} -#[doc = "Field `PIN27` writer - Status on whether PIN27 has met criteria set in PIN_CNF27.SENSE register. Write '1' to clear."] -pub type PIN27_W<'a, const O: u8> = crate::BitWriter<'a, u32, LATCH_SPEC, PIN27_A, O>; -impl<'a, const O: u8> PIN27_W<'a, O> { - #[doc = "Criteria has not been met"] - #[inline(always)] - pub fn not_latched(self) -> &'a mut W { - self.variant(PIN27_A::NOT_LATCHED) - } - #[doc = "Criteria has been met"] - #[inline(always)] - pub fn latched(self) -> &'a mut W { - self.variant(PIN27_A::LATCHED) - } -} -#[doc = "Field `PIN28` reader - Status on whether PIN28 has met criteria set in PIN_CNF28.SENSE register. Write '1' to clear."] -pub type PIN28_R = crate::BitReader; -#[doc = "Status on whether PIN28 has met criteria set in PIN_CNF28.SENSE register. Write '1' to clear.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PIN28_A { - #[doc = "0: Criteria has not been met"] - NOT_LATCHED = 0, - #[doc = "1: Criteria has been met"] - LATCHED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PIN28_A) -> Self { - variant as u8 != 0 - } -} -impl PIN28_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> PIN28_A { - match self.bits { - false => PIN28_A::NOT_LATCHED, - true => PIN28_A::LATCHED, - } - } - #[doc = "Checks if the value of the field is `NOT_LATCHED`"] - #[inline(always)] - pub fn is_not_latched(&self) -> bool { - *self == PIN28_A::NOT_LATCHED - } - #[doc = "Checks if the value of the field is `LATCHED`"] - #[inline(always)] - pub fn is_latched(&self) -> bool { - *self == PIN28_A::LATCHED - } -} -#[doc = "Field `PIN28` writer - Status on whether PIN28 has met criteria set in PIN_CNF28.SENSE register. Write '1' to clear."] -pub type PIN28_W<'a, const O: u8> = crate::BitWriter<'a, u32, LATCH_SPEC, PIN28_A, O>; -impl<'a, const O: u8> PIN28_W<'a, O> { - #[doc = "Criteria has not been met"] - #[inline(always)] - pub fn not_latched(self) -> &'a mut W { - self.variant(PIN28_A::NOT_LATCHED) - } - #[doc = "Criteria has been met"] - #[inline(always)] - pub fn latched(self) -> &'a mut W { - self.variant(PIN28_A::LATCHED) - } -} -#[doc = "Field `PIN29` reader - Status on whether PIN29 has met criteria set in PIN_CNF29.SENSE register. Write '1' to clear."] -pub type PIN29_R = crate::BitReader; -#[doc = "Status on whether PIN29 has met criteria set in PIN_CNF29.SENSE register. Write '1' to clear.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PIN29_A { - #[doc = "0: Criteria has not been met"] - NOT_LATCHED = 0, - #[doc = "1: Criteria has been met"] - LATCHED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PIN29_A) -> Self { - variant as u8 != 0 - } -} -impl PIN29_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> PIN29_A { - match self.bits { - false => PIN29_A::NOT_LATCHED, - true => PIN29_A::LATCHED, - } - } - #[doc = "Checks if the value of the field is `NOT_LATCHED`"] - #[inline(always)] - pub fn is_not_latched(&self) -> bool { - *self == PIN29_A::NOT_LATCHED - } - #[doc = "Checks if the value of the field is `LATCHED`"] - #[inline(always)] - pub fn is_latched(&self) -> bool { - *self == PIN29_A::LATCHED - } -} -#[doc = "Field `PIN29` writer - Status on whether PIN29 has met criteria set in PIN_CNF29.SENSE register. Write '1' to clear."] -pub type PIN29_W<'a, const O: u8> = crate::BitWriter<'a, u32, LATCH_SPEC, PIN29_A, O>; -impl<'a, const O: u8> PIN29_W<'a, O> { - #[doc = "Criteria has not been met"] - #[inline(always)] - pub fn not_latched(self) -> &'a mut W { - self.variant(PIN29_A::NOT_LATCHED) - } - #[doc = "Criteria has been met"] - #[inline(always)] - pub fn latched(self) -> &'a mut W { - self.variant(PIN29_A::LATCHED) - } -} -#[doc = "Field `PIN30` reader - Status on whether PIN30 has met criteria set in PIN_CNF30.SENSE register. Write '1' to clear."] -pub type PIN30_R = crate::BitReader; -#[doc = "Status on whether PIN30 has met criteria set in PIN_CNF30.SENSE register. Write '1' to clear.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PIN30_A { - #[doc = "0: Criteria has not been met"] - NOT_LATCHED = 0, - #[doc = "1: Criteria has been met"] - LATCHED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PIN30_A) -> Self { - variant as u8 != 0 - } -} -impl PIN30_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> PIN30_A { - match self.bits { - false => PIN30_A::NOT_LATCHED, - true => PIN30_A::LATCHED, - } - } - #[doc = "Checks if the value of the field is `NOT_LATCHED`"] - #[inline(always)] - pub fn is_not_latched(&self) -> bool { - *self == PIN30_A::NOT_LATCHED - } - #[doc = "Checks if the value of the field is `LATCHED`"] - #[inline(always)] - pub fn is_latched(&self) -> bool { - *self == PIN30_A::LATCHED - } -} -#[doc = "Field `PIN30` writer - Status on whether PIN30 has met criteria set in PIN_CNF30.SENSE register. Write '1' to clear."] -pub type PIN30_W<'a, const O: u8> = crate::BitWriter<'a, u32, LATCH_SPEC, PIN30_A, O>; -impl<'a, const O: u8> PIN30_W<'a, O> { - #[doc = "Criteria has not been met"] - #[inline(always)] - pub fn not_latched(self) -> &'a mut W { - self.variant(PIN30_A::NOT_LATCHED) - } - #[doc = "Criteria has been met"] - #[inline(always)] - pub fn latched(self) -> &'a mut W { - self.variant(PIN30_A::LATCHED) - } -} -#[doc = "Field `PIN31` reader - Status on whether PIN31 has met criteria set in PIN_CNF31.SENSE register. Write '1' to clear."] -pub type PIN31_R = crate::BitReader; -#[doc = "Status on whether PIN31 has met criteria set in PIN_CNF31.SENSE register. Write '1' to clear.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PIN31_A { - #[doc = "0: Criteria has not been met"] - NOT_LATCHED = 0, - #[doc = "1: Criteria has been met"] - LATCHED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PIN31_A) -> Self { - variant as u8 != 0 - } -} -impl PIN31_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> PIN31_A { - match self.bits { - false => PIN31_A::NOT_LATCHED, - true => PIN31_A::LATCHED, - } - } - #[doc = "Checks if the value of the field is `NOT_LATCHED`"] - #[inline(always)] - pub fn is_not_latched(&self) -> bool { - *self == PIN31_A::NOT_LATCHED - } - #[doc = "Checks if the value of the field is `LATCHED`"] - #[inline(always)] - pub fn is_latched(&self) -> bool { - *self == PIN31_A::LATCHED - } -} -#[doc = "Field `PIN31` writer - Status on whether PIN31 has met criteria set in PIN_CNF31.SENSE register. Write '1' to clear."] -pub type PIN31_W<'a, const O: u8> = crate::BitWriter<'a, u32, LATCH_SPEC, PIN31_A, O>; -impl<'a, const O: u8> PIN31_W<'a, O> { - #[doc = "Criteria has not been met"] - #[inline(always)] - pub fn not_latched(self) -> &'a mut W { - self.variant(PIN31_A::NOT_LATCHED) - } - #[doc = "Criteria has been met"] - #[inline(always)] - pub fn latched(self) -> &'a mut W { - self.variant(PIN31_A::LATCHED) - } -} -impl R { - #[doc = "Bit 0 - Status on whether PIN0 has met criteria set in PIN_CNF0.SENSE register. Write '1' to clear."] - #[inline(always)] - pub fn pin0(&self) -> PIN0_R { - PIN0_R::new((self.bits & 1) != 0) - } - #[doc = "Bit 1 - Status on whether PIN1 has met criteria set in PIN_CNF1.SENSE register. Write '1' to clear."] - #[inline(always)] - pub fn pin1(&self) -> PIN1_R { - PIN1_R::new(((self.bits >> 1) & 1) != 0) - } - #[doc = "Bit 2 - Status on whether PIN2 has met criteria set in PIN_CNF2.SENSE register. Write '1' to clear."] - #[inline(always)] - pub fn pin2(&self) -> PIN2_R { - PIN2_R::new(((self.bits >> 2) & 1) != 0) - } - #[doc = "Bit 3 - Status on whether PIN3 has met criteria set in PIN_CNF3.SENSE register. Write '1' to clear."] - #[inline(always)] - pub fn pin3(&self) -> PIN3_R { - PIN3_R::new(((self.bits >> 3) & 1) != 0) - } - #[doc = "Bit 4 - Status on whether PIN4 has met criteria set in PIN_CNF4.SENSE register. Write '1' to clear."] - #[inline(always)] - pub fn pin4(&self) -> PIN4_R { - PIN4_R::new(((self.bits >> 4) & 1) != 0) - } - #[doc = "Bit 5 - Status on whether PIN5 has met criteria set in PIN_CNF5.SENSE register. Write '1' to clear."] - #[inline(always)] - pub fn pin5(&self) -> PIN5_R { - PIN5_R::new(((self.bits >> 5) & 1) != 0) - } - #[doc = "Bit 6 - Status on whether PIN6 has met criteria set in PIN_CNF6.SENSE register. Write '1' to clear."] - #[inline(always)] - pub fn pin6(&self) -> PIN6_R { - PIN6_R::new(((self.bits >> 6) & 1) != 0) - } - #[doc = "Bit 7 - Status on whether PIN7 has met criteria set in PIN_CNF7.SENSE register. Write '1' to clear."] - #[inline(always)] - pub fn pin7(&self) -> PIN7_R { - PIN7_R::new(((self.bits >> 7) & 1) != 0) - } - #[doc = "Bit 8 - Status on whether PIN8 has met criteria set in PIN_CNF8.SENSE register. Write '1' to clear."] - #[inline(always)] - pub fn pin8(&self) -> PIN8_R { - PIN8_R::new(((self.bits >> 8) & 1) != 0) - } - #[doc = "Bit 9 - Status on whether PIN9 has met criteria set in PIN_CNF9.SENSE register. Write '1' to clear."] - #[inline(always)] - pub fn pin9(&self) -> PIN9_R { - PIN9_R::new(((self.bits >> 9) & 1) != 0) - } - #[doc = "Bit 10 - Status on whether PIN10 has met criteria set in PIN_CNF10.SENSE register. Write '1' to clear."] - #[inline(always)] - pub fn pin10(&self) -> PIN10_R { - PIN10_R::new(((self.bits >> 10) & 1) != 0) - } - #[doc = "Bit 11 - Status on whether PIN11 has met criteria set in PIN_CNF11.SENSE register. Write '1' to clear."] - #[inline(always)] - pub fn pin11(&self) -> PIN11_R { - PIN11_R::new(((self.bits >> 11) & 1) != 0) - } - #[doc = "Bit 12 - Status on whether PIN12 has met criteria set in PIN_CNF12.SENSE register. Write '1' to clear."] - #[inline(always)] - pub fn pin12(&self) -> PIN12_R { - PIN12_R::new(((self.bits >> 12) & 1) != 0) - } - #[doc = "Bit 13 - Status on whether PIN13 has met criteria set in PIN_CNF13.SENSE register. Write '1' to clear."] - #[inline(always)] - pub fn pin13(&self) -> PIN13_R { - PIN13_R::new(((self.bits >> 13) & 1) != 0) - } - #[doc = "Bit 14 - Status on whether PIN14 has met criteria set in PIN_CNF14.SENSE register. Write '1' to clear."] - #[inline(always)] - pub fn pin14(&self) -> PIN14_R { - PIN14_R::new(((self.bits >> 14) & 1) != 0) - } - #[doc = "Bit 15 - Status on whether PIN15 has met criteria set in PIN_CNF15.SENSE register. Write '1' to clear."] - #[inline(always)] - pub fn pin15(&self) -> PIN15_R { - PIN15_R::new(((self.bits >> 15) & 1) != 0) - } - #[doc = "Bit 16 - Status on whether PIN16 has met criteria set in PIN_CNF16.SENSE register. Write '1' to clear."] - #[inline(always)] - pub fn pin16(&self) -> PIN16_R { - PIN16_R::new(((self.bits >> 16) & 1) != 0) - } - #[doc = "Bit 17 - Status on whether PIN17 has met criteria set in PIN_CNF17.SENSE register. Write '1' to clear."] - #[inline(always)] - pub fn pin17(&self) -> PIN17_R { - PIN17_R::new(((self.bits >> 17) & 1) != 0) - } - #[doc = "Bit 18 - Status on whether PIN18 has met criteria set in PIN_CNF18.SENSE register. Write '1' to clear."] - #[inline(always)] - pub fn pin18(&self) -> PIN18_R { - PIN18_R::new(((self.bits >> 18) & 1) != 0) - } - #[doc = "Bit 19 - Status on whether PIN19 has met criteria set in PIN_CNF19.SENSE register. Write '1' to clear."] - #[inline(always)] - pub fn pin19(&self) -> PIN19_R { - PIN19_R::new(((self.bits >> 19) & 1) != 0) - } - #[doc = "Bit 20 - Status on whether PIN20 has met criteria set in PIN_CNF20.SENSE register. Write '1' to clear."] - #[inline(always)] - pub fn pin20(&self) -> PIN20_R { - PIN20_R::new(((self.bits >> 20) & 1) != 0) - } - #[doc = "Bit 21 - Status on whether PIN21 has met criteria set in PIN_CNF21.SENSE register. Write '1' to clear."] - #[inline(always)] - pub fn pin21(&self) -> PIN21_R { - PIN21_R::new(((self.bits >> 21) & 1) != 0) - } - #[doc = "Bit 22 - Status on whether PIN22 has met criteria set in PIN_CNF22.SENSE register. Write '1' to clear."] - #[inline(always)] - pub fn pin22(&self) -> PIN22_R { - PIN22_R::new(((self.bits >> 22) & 1) != 0) - } - #[doc = "Bit 23 - Status on whether PIN23 has met criteria set in PIN_CNF23.SENSE register. Write '1' to clear."] - #[inline(always)] - pub fn pin23(&self) -> PIN23_R { - PIN23_R::new(((self.bits >> 23) & 1) != 0) - } - #[doc = "Bit 24 - Status on whether PIN24 has met criteria set in PIN_CNF24.SENSE register. Write '1' to clear."] - #[inline(always)] - pub fn pin24(&self) -> PIN24_R { - PIN24_R::new(((self.bits >> 24) & 1) != 0) - } - #[doc = "Bit 25 - Status on whether PIN25 has met criteria set in PIN_CNF25.SENSE register. Write '1' to clear."] - #[inline(always)] - pub fn pin25(&self) -> PIN25_R { - PIN25_R::new(((self.bits >> 25) & 1) != 0) - } - #[doc = "Bit 26 - Status on whether PIN26 has met criteria set in PIN_CNF26.SENSE register. Write '1' to clear."] - #[inline(always)] - pub fn pin26(&self) -> PIN26_R { - PIN26_R::new(((self.bits >> 26) & 1) != 0) - } - #[doc = "Bit 27 - Status on whether PIN27 has met criteria set in PIN_CNF27.SENSE register. Write '1' to clear."] - #[inline(always)] - pub fn pin27(&self) -> PIN27_R { - PIN27_R::new(((self.bits >> 27) & 1) != 0) - } - #[doc = "Bit 28 - Status on whether PIN28 has met criteria set in PIN_CNF28.SENSE register. Write '1' to clear."] - #[inline(always)] - pub fn pin28(&self) -> PIN28_R { - PIN28_R::new(((self.bits >> 28) & 1) != 0) - } - #[doc = "Bit 29 - Status on whether PIN29 has met criteria set in PIN_CNF29.SENSE register. Write '1' to clear."] - #[inline(always)] - pub fn pin29(&self) -> PIN29_R { - PIN29_R::new(((self.bits >> 29) & 1) != 0) - } - #[doc = "Bit 30 - Status on whether PIN30 has met criteria set in PIN_CNF30.SENSE register. Write '1' to clear."] - #[inline(always)] - pub fn pin30(&self) -> PIN30_R { - PIN30_R::new(((self.bits >> 30) & 1) != 0) - } - #[doc = "Bit 31 - Status on whether PIN31 has met criteria set in PIN_CNF31.SENSE register. Write '1' to clear."] - #[inline(always)] - pub fn pin31(&self) -> PIN31_R { - PIN31_R::new(((self.bits >> 31) & 1) != 0) - } -} -impl W { - #[doc = "Bit 0 - Status on whether PIN0 has met criteria set in PIN_CNF0.SENSE register. Write '1' to clear."] - #[inline(always)] - #[must_use] - pub fn pin0(&mut self) -> PIN0_W<0> { - PIN0_W::new(self) - } - #[doc = "Bit 1 - Status on whether PIN1 has met criteria set in PIN_CNF1.SENSE register. Write '1' to clear."] - #[inline(always)] - #[must_use] - pub fn pin1(&mut self) -> PIN1_W<1> { - PIN1_W::new(self) - } - #[doc = "Bit 2 - Status on whether PIN2 has met criteria set in PIN_CNF2.SENSE register. Write '1' to clear."] - #[inline(always)] - #[must_use] - pub fn pin2(&mut self) -> PIN2_W<2> { - PIN2_W::new(self) - } - #[doc = "Bit 3 - Status on whether PIN3 has met criteria set in PIN_CNF3.SENSE register. Write '1' to clear."] - #[inline(always)] - #[must_use] - pub fn pin3(&mut self) -> PIN3_W<3> { - PIN3_W::new(self) - } - #[doc = "Bit 4 - Status on whether PIN4 has met criteria set in PIN_CNF4.SENSE register. Write '1' to clear."] - #[inline(always)] - #[must_use] - pub fn pin4(&mut self) -> PIN4_W<4> { - PIN4_W::new(self) - } - #[doc = "Bit 5 - Status on whether PIN5 has met criteria set in PIN_CNF5.SENSE register. Write '1' to clear."] - #[inline(always)] - #[must_use] - pub fn pin5(&mut self) -> PIN5_W<5> { - PIN5_W::new(self) - } - #[doc = "Bit 6 - Status on whether PIN6 has met criteria set in PIN_CNF6.SENSE register. Write '1' to clear."] - #[inline(always)] - #[must_use] - pub fn pin6(&mut self) -> PIN6_W<6> { - PIN6_W::new(self) - } - #[doc = "Bit 7 - Status on whether PIN7 has met criteria set in PIN_CNF7.SENSE register. Write '1' to clear."] - #[inline(always)] - #[must_use] - pub fn pin7(&mut self) -> PIN7_W<7> { - PIN7_W::new(self) - } - #[doc = "Bit 8 - Status on whether PIN8 has met criteria set in PIN_CNF8.SENSE register. Write '1' to clear."] - #[inline(always)] - #[must_use] - pub fn pin8(&mut self) -> PIN8_W<8> { - PIN8_W::new(self) - } - #[doc = "Bit 9 - Status on whether PIN9 has met criteria set in PIN_CNF9.SENSE register. Write '1' to clear."] - #[inline(always)] - #[must_use] - pub fn pin9(&mut self) -> PIN9_W<9> { - PIN9_W::new(self) - } - #[doc = "Bit 10 - Status on whether PIN10 has met criteria set in PIN_CNF10.SENSE register. Write '1' to clear."] - #[inline(always)] - #[must_use] - pub fn pin10(&mut self) -> PIN10_W<10> { - PIN10_W::new(self) - } - #[doc = "Bit 11 - Status on whether PIN11 has met criteria set in PIN_CNF11.SENSE register. Write '1' to clear."] - #[inline(always)] - #[must_use] - pub fn pin11(&mut self) -> PIN11_W<11> { - PIN11_W::new(self) - } - #[doc = "Bit 12 - Status on whether PIN12 has met criteria set in PIN_CNF12.SENSE register. Write '1' to clear."] - #[inline(always)] - #[must_use] - pub fn pin12(&mut self) -> PIN12_W<12> { - PIN12_W::new(self) - } - #[doc = "Bit 13 - Status on whether PIN13 has met criteria set in PIN_CNF13.SENSE register. Write '1' to clear."] - #[inline(always)] - #[must_use] - pub fn pin13(&mut self) -> PIN13_W<13> { - PIN13_W::new(self) - } - #[doc = "Bit 14 - Status on whether PIN14 has met criteria set in PIN_CNF14.SENSE register. Write '1' to clear."] - #[inline(always)] - #[must_use] - pub fn pin14(&mut self) -> PIN14_W<14> { - PIN14_W::new(self) - } - #[doc = "Bit 15 - Status on whether PIN15 has met criteria set in PIN_CNF15.SENSE register. Write '1' to clear."] - #[inline(always)] - #[must_use] - pub fn pin15(&mut self) -> PIN15_W<15> { - PIN15_W::new(self) - } - #[doc = "Bit 16 - Status on whether PIN16 has met criteria set in PIN_CNF16.SENSE register. Write '1' to clear."] - #[inline(always)] - #[must_use] - pub fn pin16(&mut self) -> PIN16_W<16> { - PIN16_W::new(self) - } - #[doc = "Bit 17 - Status on whether PIN17 has met criteria set in PIN_CNF17.SENSE register. Write '1' to clear."] - #[inline(always)] - #[must_use] - pub fn pin17(&mut self) -> PIN17_W<17> { - PIN17_W::new(self) - } - #[doc = "Bit 18 - Status on whether PIN18 has met criteria set in PIN_CNF18.SENSE register. Write '1' to clear."] - #[inline(always)] - #[must_use] - pub fn pin18(&mut self) -> PIN18_W<18> { - PIN18_W::new(self) - } - #[doc = "Bit 19 - Status on whether PIN19 has met criteria set in PIN_CNF19.SENSE register. Write '1' to clear."] - #[inline(always)] - #[must_use] - pub fn pin19(&mut self) -> PIN19_W<19> { - PIN19_W::new(self) - } - #[doc = "Bit 20 - Status on whether PIN20 has met criteria set in PIN_CNF20.SENSE register. Write '1' to clear."] - #[inline(always)] - #[must_use] - pub fn pin20(&mut self) -> PIN20_W<20> { - PIN20_W::new(self) - } - #[doc = "Bit 21 - Status on whether PIN21 has met criteria set in PIN_CNF21.SENSE register. Write '1' to clear."] - #[inline(always)] - #[must_use] - pub fn pin21(&mut self) -> PIN21_W<21> { - PIN21_W::new(self) - } - #[doc = "Bit 22 - Status on whether PIN22 has met criteria set in PIN_CNF22.SENSE register. Write '1' to clear."] - #[inline(always)] - #[must_use] - pub fn pin22(&mut self) -> PIN22_W<22> { - PIN22_W::new(self) - } - #[doc = "Bit 23 - Status on whether PIN23 has met criteria set in PIN_CNF23.SENSE register. Write '1' to clear."] - #[inline(always)] - #[must_use] - pub fn pin23(&mut self) -> PIN23_W<23> { - PIN23_W::new(self) - } - #[doc = "Bit 24 - Status on whether PIN24 has met criteria set in PIN_CNF24.SENSE register. Write '1' to clear."] - #[inline(always)] - #[must_use] - pub fn pin24(&mut self) -> PIN24_W<24> { - PIN24_W::new(self) - } - #[doc = "Bit 25 - Status on whether PIN25 has met criteria set in PIN_CNF25.SENSE register. Write '1' to clear."] - #[inline(always)] - #[must_use] - pub fn pin25(&mut self) -> PIN25_W<25> { - PIN25_W::new(self) - } - #[doc = "Bit 26 - Status on whether PIN26 has met criteria set in PIN_CNF26.SENSE register. Write '1' to clear."] - #[inline(always)] - #[must_use] - pub fn pin26(&mut self) -> PIN26_W<26> { - PIN26_W::new(self) - } - #[doc = "Bit 27 - Status on whether PIN27 has met criteria set in PIN_CNF27.SENSE register. Write '1' to clear."] - #[inline(always)] - #[must_use] - pub fn pin27(&mut self) -> PIN27_W<27> { - PIN27_W::new(self) - } - #[doc = "Bit 28 - Status on whether PIN28 has met criteria set in PIN_CNF28.SENSE register. Write '1' to clear."] - #[inline(always)] - #[must_use] - pub fn pin28(&mut self) -> PIN28_W<28> { - PIN28_W::new(self) - } - #[doc = "Bit 29 - Status on whether PIN29 has met criteria set in PIN_CNF29.SENSE register. Write '1' to clear."] - #[inline(always)] - #[must_use] - pub fn pin29(&mut self) -> PIN29_W<29> { - PIN29_W::new(self) - } - #[doc = "Bit 30 - Status on whether PIN30 has met criteria set in PIN_CNF30.SENSE register. Write '1' to clear."] - #[inline(always)] - #[must_use] - pub fn pin30(&mut self) -> PIN30_W<30> { - PIN30_W::new(self) - } - #[doc = "Bit 31 - Status on whether PIN31 has met criteria set in PIN_CNF31.SENSE register. Write '1' to clear."] - #[inline(always)] - #[must_use] - pub fn pin31(&mut self) -> PIN31_W<31> { - PIN31_W::new(self) - } - #[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 = "Latch register indicating what GPIO pins that have met the criteria set in the PIN_CNF\\[n\\].SENSE registers\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 [latch](index.html) module"] -pub struct LATCH_SPEC; -impl crate::RegisterSpec for LATCH_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [latch::R](R) reader structure"] -impl crate::Readable for LATCH_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [latch::W](W) writer structure"] -impl crate::Writable for LATCH_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets LATCH to value 0"] -impl crate::Resettable for LATCH_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/p0/out.rs b/down-the-stack/dk_pac/src/p0/out.rs deleted file mode 100644 index 004f8db..0000000 --- a/down-the-stack/dk_pac/src/p0/out.rs +++ /dev/null @@ -1,2017 +0,0 @@ -#[doc = "Register `OUT` 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 `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 `PIN0` reader - Pin 0"] -pub type PIN0_R = crate::BitReader; -#[doc = "Pin 0\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PIN0_A { - #[doc = "0: Pin driver is low"] - LOW = 0, - #[doc = "1: Pin driver is high"] - HIGH = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PIN0_A) -> Self { - variant as u8 != 0 - } -} -impl PIN0_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> PIN0_A { - match self.bits { - false => PIN0_A::LOW, - true => PIN0_A::HIGH, - } - } - #[doc = "Checks if the value of the field is `LOW`"] - #[inline(always)] - pub fn is_low(&self) -> bool { - *self == PIN0_A::LOW - } - #[doc = "Checks if the value of the field is `HIGH`"] - #[inline(always)] - pub fn is_high(&self) -> bool { - *self == PIN0_A::HIGH - } -} -#[doc = "Field `PIN0` writer - Pin 0"] -pub type PIN0_W<'a, const O: u8> = crate::BitWriter<'a, u32, OUT_SPEC, PIN0_A, O>; -impl<'a, const O: u8> PIN0_W<'a, O> { - #[doc = "Pin driver is low"] - #[inline(always)] - pub fn low(self) -> &'a mut W { - self.variant(PIN0_A::LOW) - } - #[doc = "Pin driver is high"] - #[inline(always)] - pub fn high(self) -> &'a mut W { - self.variant(PIN0_A::HIGH) - } -} -#[doc = "Field `PIN1` reader - Pin 1"] -pub type PIN1_R = crate::BitReader; -#[doc = "Pin 1\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PIN1_A { - #[doc = "0: Pin driver is low"] - LOW = 0, - #[doc = "1: Pin driver is high"] - HIGH = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PIN1_A) -> Self { - variant as u8 != 0 - } -} -impl PIN1_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> PIN1_A { - match self.bits { - false => PIN1_A::LOW, - true => PIN1_A::HIGH, - } - } - #[doc = "Checks if the value of the field is `LOW`"] - #[inline(always)] - pub fn is_low(&self) -> bool { - *self == PIN1_A::LOW - } - #[doc = "Checks if the value of the field is `HIGH`"] - #[inline(always)] - pub fn is_high(&self) -> bool { - *self == PIN1_A::HIGH - } -} -#[doc = "Field `PIN1` writer - Pin 1"] -pub type PIN1_W<'a, const O: u8> = crate::BitWriter<'a, u32, OUT_SPEC, PIN1_A, O>; -impl<'a, const O: u8> PIN1_W<'a, O> { - #[doc = "Pin driver is low"] - #[inline(always)] - pub fn low(self) -> &'a mut W { - self.variant(PIN1_A::LOW) - } - #[doc = "Pin driver is high"] - #[inline(always)] - pub fn high(self) -> &'a mut W { - self.variant(PIN1_A::HIGH) - } -} -#[doc = "Field `PIN2` reader - Pin 2"] -pub type PIN2_R = crate::BitReader; -#[doc = "Pin 2\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PIN2_A { - #[doc = "0: Pin driver is low"] - LOW = 0, - #[doc = "1: Pin driver is high"] - HIGH = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PIN2_A) -> Self { - variant as u8 != 0 - } -} -impl PIN2_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> PIN2_A { - match self.bits { - false => PIN2_A::LOW, - true => PIN2_A::HIGH, - } - } - #[doc = "Checks if the value of the field is `LOW`"] - #[inline(always)] - pub fn is_low(&self) -> bool { - *self == PIN2_A::LOW - } - #[doc = "Checks if the value of the field is `HIGH`"] - #[inline(always)] - pub fn is_high(&self) -> bool { - *self == PIN2_A::HIGH - } -} -#[doc = "Field `PIN2` writer - Pin 2"] -pub type PIN2_W<'a, const O: u8> = crate::BitWriter<'a, u32, OUT_SPEC, PIN2_A, O>; -impl<'a, const O: u8> PIN2_W<'a, O> { - #[doc = "Pin driver is low"] - #[inline(always)] - pub fn low(self) -> &'a mut W { - self.variant(PIN2_A::LOW) - } - #[doc = "Pin driver is high"] - #[inline(always)] - pub fn high(self) -> &'a mut W { - self.variant(PIN2_A::HIGH) - } -} -#[doc = "Field `PIN3` reader - Pin 3"] -pub type PIN3_R = crate::BitReader; -#[doc = "Pin 3\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PIN3_A { - #[doc = "0: Pin driver is low"] - LOW = 0, - #[doc = "1: Pin driver is high"] - HIGH = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PIN3_A) -> Self { - variant as u8 != 0 - } -} -impl PIN3_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> PIN3_A { - match self.bits { - false => PIN3_A::LOW, - true => PIN3_A::HIGH, - } - } - #[doc = "Checks if the value of the field is `LOW`"] - #[inline(always)] - pub fn is_low(&self) -> bool { - *self == PIN3_A::LOW - } - #[doc = "Checks if the value of the field is `HIGH`"] - #[inline(always)] - pub fn is_high(&self) -> bool { - *self == PIN3_A::HIGH - } -} -#[doc = "Field `PIN3` writer - Pin 3"] -pub type PIN3_W<'a, const O: u8> = crate::BitWriter<'a, u32, OUT_SPEC, PIN3_A, O>; -impl<'a, const O: u8> PIN3_W<'a, O> { - #[doc = "Pin driver is low"] - #[inline(always)] - pub fn low(self) -> &'a mut W { - self.variant(PIN3_A::LOW) - } - #[doc = "Pin driver is high"] - #[inline(always)] - pub fn high(self) -> &'a mut W { - self.variant(PIN3_A::HIGH) - } -} -#[doc = "Field `PIN4` reader - Pin 4"] -pub type PIN4_R = crate::BitReader; -#[doc = "Pin 4\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PIN4_A { - #[doc = "0: Pin driver is low"] - LOW = 0, - #[doc = "1: Pin driver is high"] - HIGH = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PIN4_A) -> Self { - variant as u8 != 0 - } -} -impl PIN4_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> PIN4_A { - match self.bits { - false => PIN4_A::LOW, - true => PIN4_A::HIGH, - } - } - #[doc = "Checks if the value of the field is `LOW`"] - #[inline(always)] - pub fn is_low(&self) -> bool { - *self == PIN4_A::LOW - } - #[doc = "Checks if the value of the field is `HIGH`"] - #[inline(always)] - pub fn is_high(&self) -> bool { - *self == PIN4_A::HIGH - } -} -#[doc = "Field `PIN4` writer - Pin 4"] -pub type PIN4_W<'a, const O: u8> = crate::BitWriter<'a, u32, OUT_SPEC, PIN4_A, O>; -impl<'a, const O: u8> PIN4_W<'a, O> { - #[doc = "Pin driver is low"] - #[inline(always)] - pub fn low(self) -> &'a mut W { - self.variant(PIN4_A::LOW) - } - #[doc = "Pin driver is high"] - #[inline(always)] - pub fn high(self) -> &'a mut W { - self.variant(PIN4_A::HIGH) - } -} -#[doc = "Field `PIN5` reader - Pin 5"] -pub type PIN5_R = crate::BitReader; -#[doc = "Pin 5\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PIN5_A { - #[doc = "0: Pin driver is low"] - LOW = 0, - #[doc = "1: Pin driver is high"] - HIGH = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PIN5_A) -> Self { - variant as u8 != 0 - } -} -impl PIN5_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> PIN5_A { - match self.bits { - false => PIN5_A::LOW, - true => PIN5_A::HIGH, - } - } - #[doc = "Checks if the value of the field is `LOW`"] - #[inline(always)] - pub fn is_low(&self) -> bool { - *self == PIN5_A::LOW - } - #[doc = "Checks if the value of the field is `HIGH`"] - #[inline(always)] - pub fn is_high(&self) -> bool { - *self == PIN5_A::HIGH - } -} -#[doc = "Field `PIN5` writer - Pin 5"] -pub type PIN5_W<'a, const O: u8> = crate::BitWriter<'a, u32, OUT_SPEC, PIN5_A, O>; -impl<'a, const O: u8> PIN5_W<'a, O> { - #[doc = "Pin driver is low"] - #[inline(always)] - pub fn low(self) -> &'a mut W { - self.variant(PIN5_A::LOW) - } - #[doc = "Pin driver is high"] - #[inline(always)] - pub fn high(self) -> &'a mut W { - self.variant(PIN5_A::HIGH) - } -} -#[doc = "Field `PIN6` reader - Pin 6"] -pub type PIN6_R = crate::BitReader; -#[doc = "Pin 6\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PIN6_A { - #[doc = "0: Pin driver is low"] - LOW = 0, - #[doc = "1: Pin driver is high"] - HIGH = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PIN6_A) -> Self { - variant as u8 != 0 - } -} -impl PIN6_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> PIN6_A { - match self.bits { - false => PIN6_A::LOW, - true => PIN6_A::HIGH, - } - } - #[doc = "Checks if the value of the field is `LOW`"] - #[inline(always)] - pub fn is_low(&self) -> bool { - *self == PIN6_A::LOW - } - #[doc = "Checks if the value of the field is `HIGH`"] - #[inline(always)] - pub fn is_high(&self) -> bool { - *self == PIN6_A::HIGH - } -} -#[doc = "Field `PIN6` writer - Pin 6"] -pub type PIN6_W<'a, const O: u8> = crate::BitWriter<'a, u32, OUT_SPEC, PIN6_A, O>; -impl<'a, const O: u8> PIN6_W<'a, O> { - #[doc = "Pin driver is low"] - #[inline(always)] - pub fn low(self) -> &'a mut W { - self.variant(PIN6_A::LOW) - } - #[doc = "Pin driver is high"] - #[inline(always)] - pub fn high(self) -> &'a mut W { - self.variant(PIN6_A::HIGH) - } -} -#[doc = "Field `PIN7` reader - Pin 7"] -pub type PIN7_R = crate::BitReader; -#[doc = "Pin 7\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PIN7_A { - #[doc = "0: Pin driver is low"] - LOW = 0, - #[doc = "1: Pin driver is high"] - HIGH = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PIN7_A) -> Self { - variant as u8 != 0 - } -} -impl PIN7_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> PIN7_A { - match self.bits { - false => PIN7_A::LOW, - true => PIN7_A::HIGH, - } - } - #[doc = "Checks if the value of the field is `LOW`"] - #[inline(always)] - pub fn is_low(&self) -> bool { - *self == PIN7_A::LOW - } - #[doc = "Checks if the value of the field is `HIGH`"] - #[inline(always)] - pub fn is_high(&self) -> bool { - *self == PIN7_A::HIGH - } -} -#[doc = "Field `PIN7` writer - Pin 7"] -pub type PIN7_W<'a, const O: u8> = crate::BitWriter<'a, u32, OUT_SPEC, PIN7_A, O>; -impl<'a, const O: u8> PIN7_W<'a, O> { - #[doc = "Pin driver is low"] - #[inline(always)] - pub fn low(self) -> &'a mut W { - self.variant(PIN7_A::LOW) - } - #[doc = "Pin driver is high"] - #[inline(always)] - pub fn high(self) -> &'a mut W { - self.variant(PIN7_A::HIGH) - } -} -#[doc = "Field `PIN8` reader - Pin 8"] -pub type PIN8_R = crate::BitReader; -#[doc = "Pin 8\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PIN8_A { - #[doc = "0: Pin driver is low"] - LOW = 0, - #[doc = "1: Pin driver is high"] - HIGH = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PIN8_A) -> Self { - variant as u8 != 0 - } -} -impl PIN8_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> PIN8_A { - match self.bits { - false => PIN8_A::LOW, - true => PIN8_A::HIGH, - } - } - #[doc = "Checks if the value of the field is `LOW`"] - #[inline(always)] - pub fn is_low(&self) -> bool { - *self == PIN8_A::LOW - } - #[doc = "Checks if the value of the field is `HIGH`"] - #[inline(always)] - pub fn is_high(&self) -> bool { - *self == PIN8_A::HIGH - } -} -#[doc = "Field `PIN8` writer - Pin 8"] -pub type PIN8_W<'a, const O: u8> = crate::BitWriter<'a, u32, OUT_SPEC, PIN8_A, O>; -impl<'a, const O: u8> PIN8_W<'a, O> { - #[doc = "Pin driver is low"] - #[inline(always)] - pub fn low(self) -> &'a mut W { - self.variant(PIN8_A::LOW) - } - #[doc = "Pin driver is high"] - #[inline(always)] - pub fn high(self) -> &'a mut W { - self.variant(PIN8_A::HIGH) - } -} -#[doc = "Field `PIN9` reader - Pin 9"] -pub type PIN9_R = crate::BitReader; -#[doc = "Pin 9\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PIN9_A { - #[doc = "0: Pin driver is low"] - LOW = 0, - #[doc = "1: Pin driver is high"] - HIGH = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PIN9_A) -> Self { - variant as u8 != 0 - } -} -impl PIN9_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> PIN9_A { - match self.bits { - false => PIN9_A::LOW, - true => PIN9_A::HIGH, - } - } - #[doc = "Checks if the value of the field is `LOW`"] - #[inline(always)] - pub fn is_low(&self) -> bool { - *self == PIN9_A::LOW - } - #[doc = "Checks if the value of the field is `HIGH`"] - #[inline(always)] - pub fn is_high(&self) -> bool { - *self == PIN9_A::HIGH - } -} -#[doc = "Field `PIN9` writer - Pin 9"] -pub type PIN9_W<'a, const O: u8> = crate::BitWriter<'a, u32, OUT_SPEC, PIN9_A, O>; -impl<'a, const O: u8> PIN9_W<'a, O> { - #[doc = "Pin driver is low"] - #[inline(always)] - pub fn low(self) -> &'a mut W { - self.variant(PIN9_A::LOW) - } - #[doc = "Pin driver is high"] - #[inline(always)] - pub fn high(self) -> &'a mut W { - self.variant(PIN9_A::HIGH) - } -} -#[doc = "Field `PIN10` reader - Pin 10"] -pub type PIN10_R = crate::BitReader; -#[doc = "Pin 10\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PIN10_A { - #[doc = "0: Pin driver is low"] - LOW = 0, - #[doc = "1: Pin driver is high"] - HIGH = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PIN10_A) -> Self { - variant as u8 != 0 - } -} -impl PIN10_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> PIN10_A { - match self.bits { - false => PIN10_A::LOW, - true => PIN10_A::HIGH, - } - } - #[doc = "Checks if the value of the field is `LOW`"] - #[inline(always)] - pub fn is_low(&self) -> bool { - *self == PIN10_A::LOW - } - #[doc = "Checks if the value of the field is `HIGH`"] - #[inline(always)] - pub fn is_high(&self) -> bool { - *self == PIN10_A::HIGH - } -} -#[doc = "Field `PIN10` writer - Pin 10"] -pub type PIN10_W<'a, const O: u8> = crate::BitWriter<'a, u32, OUT_SPEC, PIN10_A, O>; -impl<'a, const O: u8> PIN10_W<'a, O> { - #[doc = "Pin driver is low"] - #[inline(always)] - pub fn low(self) -> &'a mut W { - self.variant(PIN10_A::LOW) - } - #[doc = "Pin driver is high"] - #[inline(always)] - pub fn high(self) -> &'a mut W { - self.variant(PIN10_A::HIGH) - } -} -#[doc = "Field `PIN11` reader - Pin 11"] -pub type PIN11_R = crate::BitReader; -#[doc = "Pin 11\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PIN11_A { - #[doc = "0: Pin driver is low"] - LOW = 0, - #[doc = "1: Pin driver is high"] - HIGH = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PIN11_A) -> Self { - variant as u8 != 0 - } -} -impl PIN11_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> PIN11_A { - match self.bits { - false => PIN11_A::LOW, - true => PIN11_A::HIGH, - } - } - #[doc = "Checks if the value of the field is `LOW`"] - #[inline(always)] - pub fn is_low(&self) -> bool { - *self == PIN11_A::LOW - } - #[doc = "Checks if the value of the field is `HIGH`"] - #[inline(always)] - pub fn is_high(&self) -> bool { - *self == PIN11_A::HIGH - } -} -#[doc = "Field `PIN11` writer - Pin 11"] -pub type PIN11_W<'a, const O: u8> = crate::BitWriter<'a, u32, OUT_SPEC, PIN11_A, O>; -impl<'a, const O: u8> PIN11_W<'a, O> { - #[doc = "Pin driver is low"] - #[inline(always)] - pub fn low(self) -> &'a mut W { - self.variant(PIN11_A::LOW) - } - #[doc = "Pin driver is high"] - #[inline(always)] - pub fn high(self) -> &'a mut W { - self.variant(PIN11_A::HIGH) - } -} -#[doc = "Field `PIN12` reader - Pin 12"] -pub type PIN12_R = crate::BitReader; -#[doc = "Pin 12\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PIN12_A { - #[doc = "0: Pin driver is low"] - LOW = 0, - #[doc = "1: Pin driver is high"] - HIGH = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PIN12_A) -> Self { - variant as u8 != 0 - } -} -impl PIN12_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> PIN12_A { - match self.bits { - false => PIN12_A::LOW, - true => PIN12_A::HIGH, - } - } - #[doc = "Checks if the value of the field is `LOW`"] - #[inline(always)] - pub fn is_low(&self) -> bool { - *self == PIN12_A::LOW - } - #[doc = "Checks if the value of the field is `HIGH`"] - #[inline(always)] - pub fn is_high(&self) -> bool { - *self == PIN12_A::HIGH - } -} -#[doc = "Field `PIN12` writer - Pin 12"] -pub type PIN12_W<'a, const O: u8> = crate::BitWriter<'a, u32, OUT_SPEC, PIN12_A, O>; -impl<'a, const O: u8> PIN12_W<'a, O> { - #[doc = "Pin driver is low"] - #[inline(always)] - pub fn low(self) -> &'a mut W { - self.variant(PIN12_A::LOW) - } - #[doc = "Pin driver is high"] - #[inline(always)] - pub fn high(self) -> &'a mut W { - self.variant(PIN12_A::HIGH) - } -} -#[doc = "Field `PIN13` reader - Pin 13"] -pub type PIN13_R = crate::BitReader; -#[doc = "Pin 13\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PIN13_A { - #[doc = "0: Pin driver is low"] - LOW = 0, - #[doc = "1: Pin driver is high"] - HIGH = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PIN13_A) -> Self { - variant as u8 != 0 - } -} -impl PIN13_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> PIN13_A { - match self.bits { - false => PIN13_A::LOW, - true => PIN13_A::HIGH, - } - } - #[doc = "Checks if the value of the field is `LOW`"] - #[inline(always)] - pub fn is_low(&self) -> bool { - *self == PIN13_A::LOW - } - #[doc = "Checks if the value of the field is `HIGH`"] - #[inline(always)] - pub fn is_high(&self) -> bool { - *self == PIN13_A::HIGH - } -} -#[doc = "Field `PIN13` writer - Pin 13"] -pub type PIN13_W<'a, const O: u8> = crate::BitWriter<'a, u32, OUT_SPEC, PIN13_A, O>; -impl<'a, const O: u8> PIN13_W<'a, O> { - #[doc = "Pin driver is low"] - #[inline(always)] - pub fn low(self) -> &'a mut W { - self.variant(PIN13_A::LOW) - } - #[doc = "Pin driver is high"] - #[inline(always)] - pub fn high(self) -> &'a mut W { - self.variant(PIN13_A::HIGH) - } -} -#[doc = "Field `PIN14` reader - Pin 14"] -pub type PIN14_R = crate::BitReader; -#[doc = "Pin 14\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PIN14_A { - #[doc = "0: Pin driver is low"] - LOW = 0, - #[doc = "1: Pin driver is high"] - HIGH = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PIN14_A) -> Self { - variant as u8 != 0 - } -} -impl PIN14_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> PIN14_A { - match self.bits { - false => PIN14_A::LOW, - true => PIN14_A::HIGH, - } - } - #[doc = "Checks if the value of the field is `LOW`"] - #[inline(always)] - pub fn is_low(&self) -> bool { - *self == PIN14_A::LOW - } - #[doc = "Checks if the value of the field is `HIGH`"] - #[inline(always)] - pub fn is_high(&self) -> bool { - *self == PIN14_A::HIGH - } -} -#[doc = "Field `PIN14` writer - Pin 14"] -pub type PIN14_W<'a, const O: u8> = crate::BitWriter<'a, u32, OUT_SPEC, PIN14_A, O>; -impl<'a, const O: u8> PIN14_W<'a, O> { - #[doc = "Pin driver is low"] - #[inline(always)] - pub fn low(self) -> &'a mut W { - self.variant(PIN14_A::LOW) - } - #[doc = "Pin driver is high"] - #[inline(always)] - pub fn high(self) -> &'a mut W { - self.variant(PIN14_A::HIGH) - } -} -#[doc = "Field `PIN15` reader - Pin 15"] -pub type PIN15_R = crate::BitReader; -#[doc = "Pin 15\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PIN15_A { - #[doc = "0: Pin driver is low"] - LOW = 0, - #[doc = "1: Pin driver is high"] - HIGH = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PIN15_A) -> Self { - variant as u8 != 0 - } -} -impl PIN15_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> PIN15_A { - match self.bits { - false => PIN15_A::LOW, - true => PIN15_A::HIGH, - } - } - #[doc = "Checks if the value of the field is `LOW`"] - #[inline(always)] - pub fn is_low(&self) -> bool { - *self == PIN15_A::LOW - } - #[doc = "Checks if the value of the field is `HIGH`"] - #[inline(always)] - pub fn is_high(&self) -> bool { - *self == PIN15_A::HIGH - } -} -#[doc = "Field `PIN15` writer - Pin 15"] -pub type PIN15_W<'a, const O: u8> = crate::BitWriter<'a, u32, OUT_SPEC, PIN15_A, O>; -impl<'a, const O: u8> PIN15_W<'a, O> { - #[doc = "Pin driver is low"] - #[inline(always)] - pub fn low(self) -> &'a mut W { - self.variant(PIN15_A::LOW) - } - #[doc = "Pin driver is high"] - #[inline(always)] - pub fn high(self) -> &'a mut W { - self.variant(PIN15_A::HIGH) - } -} -#[doc = "Field `PIN16` reader - Pin 16"] -pub type PIN16_R = crate::BitReader; -#[doc = "Pin 16\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PIN16_A { - #[doc = "0: Pin driver is low"] - LOW = 0, - #[doc = "1: Pin driver is high"] - HIGH = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PIN16_A) -> Self { - variant as u8 != 0 - } -} -impl PIN16_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> PIN16_A { - match self.bits { - false => PIN16_A::LOW, - true => PIN16_A::HIGH, - } - } - #[doc = "Checks if the value of the field is `LOW`"] - #[inline(always)] - pub fn is_low(&self) -> bool { - *self == PIN16_A::LOW - } - #[doc = "Checks if the value of the field is `HIGH`"] - #[inline(always)] - pub fn is_high(&self) -> bool { - *self == PIN16_A::HIGH - } -} -#[doc = "Field `PIN16` writer - Pin 16"] -pub type PIN16_W<'a, const O: u8> = crate::BitWriter<'a, u32, OUT_SPEC, PIN16_A, O>; -impl<'a, const O: u8> PIN16_W<'a, O> { - #[doc = "Pin driver is low"] - #[inline(always)] - pub fn low(self) -> &'a mut W { - self.variant(PIN16_A::LOW) - } - #[doc = "Pin driver is high"] - #[inline(always)] - pub fn high(self) -> &'a mut W { - self.variant(PIN16_A::HIGH) - } -} -#[doc = "Field `PIN17` reader - Pin 17"] -pub type PIN17_R = crate::BitReader; -#[doc = "Pin 17\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PIN17_A { - #[doc = "0: Pin driver is low"] - LOW = 0, - #[doc = "1: Pin driver is high"] - HIGH = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PIN17_A) -> Self { - variant as u8 != 0 - } -} -impl PIN17_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> PIN17_A { - match self.bits { - false => PIN17_A::LOW, - true => PIN17_A::HIGH, - } - } - #[doc = "Checks if the value of the field is `LOW`"] - #[inline(always)] - pub fn is_low(&self) -> bool { - *self == PIN17_A::LOW - } - #[doc = "Checks if the value of the field is `HIGH`"] - #[inline(always)] - pub fn is_high(&self) -> bool { - *self == PIN17_A::HIGH - } -} -#[doc = "Field `PIN17` writer - Pin 17"] -pub type PIN17_W<'a, const O: u8> = crate::BitWriter<'a, u32, OUT_SPEC, PIN17_A, O>; -impl<'a, const O: u8> PIN17_W<'a, O> { - #[doc = "Pin driver is low"] - #[inline(always)] - pub fn low(self) -> &'a mut W { - self.variant(PIN17_A::LOW) - } - #[doc = "Pin driver is high"] - #[inline(always)] - pub fn high(self) -> &'a mut W { - self.variant(PIN17_A::HIGH) - } -} -#[doc = "Field `PIN18` reader - Pin 18"] -pub type PIN18_R = crate::BitReader; -#[doc = "Pin 18\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PIN18_A { - #[doc = "0: Pin driver is low"] - LOW = 0, - #[doc = "1: Pin driver is high"] - HIGH = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PIN18_A) -> Self { - variant as u8 != 0 - } -} -impl PIN18_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> PIN18_A { - match self.bits { - false => PIN18_A::LOW, - true => PIN18_A::HIGH, - } - } - #[doc = "Checks if the value of the field is `LOW`"] - #[inline(always)] - pub fn is_low(&self) -> bool { - *self == PIN18_A::LOW - } - #[doc = "Checks if the value of the field is `HIGH`"] - #[inline(always)] - pub fn is_high(&self) -> bool { - *self == PIN18_A::HIGH - } -} -#[doc = "Field `PIN18` writer - Pin 18"] -pub type PIN18_W<'a, const O: u8> = crate::BitWriter<'a, u32, OUT_SPEC, PIN18_A, O>; -impl<'a, const O: u8> PIN18_W<'a, O> { - #[doc = "Pin driver is low"] - #[inline(always)] - pub fn low(self) -> &'a mut W { - self.variant(PIN18_A::LOW) - } - #[doc = "Pin driver is high"] - #[inline(always)] - pub fn high(self) -> &'a mut W { - self.variant(PIN18_A::HIGH) - } -} -#[doc = "Field `PIN19` reader - Pin 19"] -pub type PIN19_R = crate::BitReader; -#[doc = "Pin 19\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PIN19_A { - #[doc = "0: Pin driver is low"] - LOW = 0, - #[doc = "1: Pin driver is high"] - HIGH = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PIN19_A) -> Self { - variant as u8 != 0 - } -} -impl PIN19_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> PIN19_A { - match self.bits { - false => PIN19_A::LOW, - true => PIN19_A::HIGH, - } - } - #[doc = "Checks if the value of the field is `LOW`"] - #[inline(always)] - pub fn is_low(&self) -> bool { - *self == PIN19_A::LOW - } - #[doc = "Checks if the value of the field is `HIGH`"] - #[inline(always)] - pub fn is_high(&self) -> bool { - *self == PIN19_A::HIGH - } -} -#[doc = "Field `PIN19` writer - Pin 19"] -pub type PIN19_W<'a, const O: u8> = crate::BitWriter<'a, u32, OUT_SPEC, PIN19_A, O>; -impl<'a, const O: u8> PIN19_W<'a, O> { - #[doc = "Pin driver is low"] - #[inline(always)] - pub fn low(self) -> &'a mut W { - self.variant(PIN19_A::LOW) - } - #[doc = "Pin driver is high"] - #[inline(always)] - pub fn high(self) -> &'a mut W { - self.variant(PIN19_A::HIGH) - } -} -#[doc = "Field `PIN20` reader - Pin 20"] -pub type PIN20_R = crate::BitReader; -#[doc = "Pin 20\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PIN20_A { - #[doc = "0: Pin driver is low"] - LOW = 0, - #[doc = "1: Pin driver is high"] - HIGH = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PIN20_A) -> Self { - variant as u8 != 0 - } -} -impl PIN20_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> PIN20_A { - match self.bits { - false => PIN20_A::LOW, - true => PIN20_A::HIGH, - } - } - #[doc = "Checks if the value of the field is `LOW`"] - #[inline(always)] - pub fn is_low(&self) -> bool { - *self == PIN20_A::LOW - } - #[doc = "Checks if the value of the field is `HIGH`"] - #[inline(always)] - pub fn is_high(&self) -> bool { - *self == PIN20_A::HIGH - } -} -#[doc = "Field `PIN20` writer - Pin 20"] -pub type PIN20_W<'a, const O: u8> = crate::BitWriter<'a, u32, OUT_SPEC, PIN20_A, O>; -impl<'a, const O: u8> PIN20_W<'a, O> { - #[doc = "Pin driver is low"] - #[inline(always)] - pub fn low(self) -> &'a mut W { - self.variant(PIN20_A::LOW) - } - #[doc = "Pin driver is high"] - #[inline(always)] - pub fn high(self) -> &'a mut W { - self.variant(PIN20_A::HIGH) - } -} -#[doc = "Field `PIN21` reader - Pin 21"] -pub type PIN21_R = crate::BitReader; -#[doc = "Pin 21\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PIN21_A { - #[doc = "0: Pin driver is low"] - LOW = 0, - #[doc = "1: Pin driver is high"] - HIGH = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PIN21_A) -> Self { - variant as u8 != 0 - } -} -impl PIN21_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> PIN21_A { - match self.bits { - false => PIN21_A::LOW, - true => PIN21_A::HIGH, - } - } - #[doc = "Checks if the value of the field is `LOW`"] - #[inline(always)] - pub fn is_low(&self) -> bool { - *self == PIN21_A::LOW - } - #[doc = "Checks if the value of the field is `HIGH`"] - #[inline(always)] - pub fn is_high(&self) -> bool { - *self == PIN21_A::HIGH - } -} -#[doc = "Field `PIN21` writer - Pin 21"] -pub type PIN21_W<'a, const O: u8> = crate::BitWriter<'a, u32, OUT_SPEC, PIN21_A, O>; -impl<'a, const O: u8> PIN21_W<'a, O> { - #[doc = "Pin driver is low"] - #[inline(always)] - pub fn low(self) -> &'a mut W { - self.variant(PIN21_A::LOW) - } - #[doc = "Pin driver is high"] - #[inline(always)] - pub fn high(self) -> &'a mut W { - self.variant(PIN21_A::HIGH) - } -} -#[doc = "Field `PIN22` reader - Pin 22"] -pub type PIN22_R = crate::BitReader; -#[doc = "Pin 22\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PIN22_A { - #[doc = "0: Pin driver is low"] - LOW = 0, - #[doc = "1: Pin driver is high"] - HIGH = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PIN22_A) -> Self { - variant as u8 != 0 - } -} -impl PIN22_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> PIN22_A { - match self.bits { - false => PIN22_A::LOW, - true => PIN22_A::HIGH, - } - } - #[doc = "Checks if the value of the field is `LOW`"] - #[inline(always)] - pub fn is_low(&self) -> bool { - *self == PIN22_A::LOW - } - #[doc = "Checks if the value of the field is `HIGH`"] - #[inline(always)] - pub fn is_high(&self) -> bool { - *self == PIN22_A::HIGH - } -} -#[doc = "Field `PIN22` writer - Pin 22"] -pub type PIN22_W<'a, const O: u8> = crate::BitWriter<'a, u32, OUT_SPEC, PIN22_A, O>; -impl<'a, const O: u8> PIN22_W<'a, O> { - #[doc = "Pin driver is low"] - #[inline(always)] - pub fn low(self) -> &'a mut W { - self.variant(PIN22_A::LOW) - } - #[doc = "Pin driver is high"] - #[inline(always)] - pub fn high(self) -> &'a mut W { - self.variant(PIN22_A::HIGH) - } -} -#[doc = "Field `PIN23` reader - Pin 23"] -pub type PIN23_R = crate::BitReader; -#[doc = "Pin 23\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PIN23_A { - #[doc = "0: Pin driver is low"] - LOW = 0, - #[doc = "1: Pin driver is high"] - HIGH = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PIN23_A) -> Self { - variant as u8 != 0 - } -} -impl PIN23_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> PIN23_A { - match self.bits { - false => PIN23_A::LOW, - true => PIN23_A::HIGH, - } - } - #[doc = "Checks if the value of the field is `LOW`"] - #[inline(always)] - pub fn is_low(&self) -> bool { - *self == PIN23_A::LOW - } - #[doc = "Checks if the value of the field is `HIGH`"] - #[inline(always)] - pub fn is_high(&self) -> bool { - *self == PIN23_A::HIGH - } -} -#[doc = "Field `PIN23` writer - Pin 23"] -pub type PIN23_W<'a, const O: u8> = crate::BitWriter<'a, u32, OUT_SPEC, PIN23_A, O>; -impl<'a, const O: u8> PIN23_W<'a, O> { - #[doc = "Pin driver is low"] - #[inline(always)] - pub fn low(self) -> &'a mut W { - self.variant(PIN23_A::LOW) - } - #[doc = "Pin driver is high"] - #[inline(always)] - pub fn high(self) -> &'a mut W { - self.variant(PIN23_A::HIGH) - } -} -#[doc = "Field `PIN24` reader - Pin 24"] -pub type PIN24_R = crate::BitReader; -#[doc = "Pin 24\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PIN24_A { - #[doc = "0: Pin driver is low"] - LOW = 0, - #[doc = "1: Pin driver is high"] - HIGH = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PIN24_A) -> Self { - variant as u8 != 0 - } -} -impl PIN24_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> PIN24_A { - match self.bits { - false => PIN24_A::LOW, - true => PIN24_A::HIGH, - } - } - #[doc = "Checks if the value of the field is `LOW`"] - #[inline(always)] - pub fn is_low(&self) -> bool { - *self == PIN24_A::LOW - } - #[doc = "Checks if the value of the field is `HIGH`"] - #[inline(always)] - pub fn is_high(&self) -> bool { - *self == PIN24_A::HIGH - } -} -#[doc = "Field `PIN24` writer - Pin 24"] -pub type PIN24_W<'a, const O: u8> = crate::BitWriter<'a, u32, OUT_SPEC, PIN24_A, O>; -impl<'a, const O: u8> PIN24_W<'a, O> { - #[doc = "Pin driver is low"] - #[inline(always)] - pub fn low(self) -> &'a mut W { - self.variant(PIN24_A::LOW) - } - #[doc = "Pin driver is high"] - #[inline(always)] - pub fn high(self) -> &'a mut W { - self.variant(PIN24_A::HIGH) - } -} -#[doc = "Field `PIN25` reader - Pin 25"] -pub type PIN25_R = crate::BitReader; -#[doc = "Pin 25\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PIN25_A { - #[doc = "0: Pin driver is low"] - LOW = 0, - #[doc = "1: Pin driver is high"] - HIGH = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PIN25_A) -> Self { - variant as u8 != 0 - } -} -impl PIN25_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> PIN25_A { - match self.bits { - false => PIN25_A::LOW, - true => PIN25_A::HIGH, - } - } - #[doc = "Checks if the value of the field is `LOW`"] - #[inline(always)] - pub fn is_low(&self) -> bool { - *self == PIN25_A::LOW - } - #[doc = "Checks if the value of the field is `HIGH`"] - #[inline(always)] - pub fn is_high(&self) -> bool { - *self == PIN25_A::HIGH - } -} -#[doc = "Field `PIN25` writer - Pin 25"] -pub type PIN25_W<'a, const O: u8> = crate::BitWriter<'a, u32, OUT_SPEC, PIN25_A, O>; -impl<'a, const O: u8> PIN25_W<'a, O> { - #[doc = "Pin driver is low"] - #[inline(always)] - pub fn low(self) -> &'a mut W { - self.variant(PIN25_A::LOW) - } - #[doc = "Pin driver is high"] - #[inline(always)] - pub fn high(self) -> &'a mut W { - self.variant(PIN25_A::HIGH) - } -} -#[doc = "Field `PIN26` reader - Pin 26"] -pub type PIN26_R = crate::BitReader; -#[doc = "Pin 26\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PIN26_A { - #[doc = "0: Pin driver is low"] - LOW = 0, - #[doc = "1: Pin driver is high"] - HIGH = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PIN26_A) -> Self { - variant as u8 != 0 - } -} -impl PIN26_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> PIN26_A { - match self.bits { - false => PIN26_A::LOW, - true => PIN26_A::HIGH, - } - } - #[doc = "Checks if the value of the field is `LOW`"] - #[inline(always)] - pub fn is_low(&self) -> bool { - *self == PIN26_A::LOW - } - #[doc = "Checks if the value of the field is `HIGH`"] - #[inline(always)] - pub fn is_high(&self) -> bool { - *self == PIN26_A::HIGH - } -} -#[doc = "Field `PIN26` writer - Pin 26"] -pub type PIN26_W<'a, const O: u8> = crate::BitWriter<'a, u32, OUT_SPEC, PIN26_A, O>; -impl<'a, const O: u8> PIN26_W<'a, O> { - #[doc = "Pin driver is low"] - #[inline(always)] - pub fn low(self) -> &'a mut W { - self.variant(PIN26_A::LOW) - } - #[doc = "Pin driver is high"] - #[inline(always)] - pub fn high(self) -> &'a mut W { - self.variant(PIN26_A::HIGH) - } -} -#[doc = "Field `PIN27` reader - Pin 27"] -pub type PIN27_R = crate::BitReader; -#[doc = "Pin 27\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PIN27_A { - #[doc = "0: Pin driver is low"] - LOW = 0, - #[doc = "1: Pin driver is high"] - HIGH = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PIN27_A) -> Self { - variant as u8 != 0 - } -} -impl PIN27_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> PIN27_A { - match self.bits { - false => PIN27_A::LOW, - true => PIN27_A::HIGH, - } - } - #[doc = "Checks if the value of the field is `LOW`"] - #[inline(always)] - pub fn is_low(&self) -> bool { - *self == PIN27_A::LOW - } - #[doc = "Checks if the value of the field is `HIGH`"] - #[inline(always)] - pub fn is_high(&self) -> bool { - *self == PIN27_A::HIGH - } -} -#[doc = "Field `PIN27` writer - Pin 27"] -pub type PIN27_W<'a, const O: u8> = crate::BitWriter<'a, u32, OUT_SPEC, PIN27_A, O>; -impl<'a, const O: u8> PIN27_W<'a, O> { - #[doc = "Pin driver is low"] - #[inline(always)] - pub fn low(self) -> &'a mut W { - self.variant(PIN27_A::LOW) - } - #[doc = "Pin driver is high"] - #[inline(always)] - pub fn high(self) -> &'a mut W { - self.variant(PIN27_A::HIGH) - } -} -#[doc = "Field `PIN28` reader - Pin 28"] -pub type PIN28_R = crate::BitReader; -#[doc = "Pin 28\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PIN28_A { - #[doc = "0: Pin driver is low"] - LOW = 0, - #[doc = "1: Pin driver is high"] - HIGH = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PIN28_A) -> Self { - variant as u8 != 0 - } -} -impl PIN28_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> PIN28_A { - match self.bits { - false => PIN28_A::LOW, - true => PIN28_A::HIGH, - } - } - #[doc = "Checks if the value of the field is `LOW`"] - #[inline(always)] - pub fn is_low(&self) -> bool { - *self == PIN28_A::LOW - } - #[doc = "Checks if the value of the field is `HIGH`"] - #[inline(always)] - pub fn is_high(&self) -> bool { - *self == PIN28_A::HIGH - } -} -#[doc = "Field `PIN28` writer - Pin 28"] -pub type PIN28_W<'a, const O: u8> = crate::BitWriter<'a, u32, OUT_SPEC, PIN28_A, O>; -impl<'a, const O: u8> PIN28_W<'a, O> { - #[doc = "Pin driver is low"] - #[inline(always)] - pub fn low(self) -> &'a mut W { - self.variant(PIN28_A::LOW) - } - #[doc = "Pin driver is high"] - #[inline(always)] - pub fn high(self) -> &'a mut W { - self.variant(PIN28_A::HIGH) - } -} -#[doc = "Field `PIN29` reader - Pin 29"] -pub type PIN29_R = crate::BitReader; -#[doc = "Pin 29\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PIN29_A { - #[doc = "0: Pin driver is low"] - LOW = 0, - #[doc = "1: Pin driver is high"] - HIGH = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PIN29_A) -> Self { - variant as u8 != 0 - } -} -impl PIN29_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> PIN29_A { - match self.bits { - false => PIN29_A::LOW, - true => PIN29_A::HIGH, - } - } - #[doc = "Checks if the value of the field is `LOW`"] - #[inline(always)] - pub fn is_low(&self) -> bool { - *self == PIN29_A::LOW - } - #[doc = "Checks if the value of the field is `HIGH`"] - #[inline(always)] - pub fn is_high(&self) -> bool { - *self == PIN29_A::HIGH - } -} -#[doc = "Field `PIN29` writer - Pin 29"] -pub type PIN29_W<'a, const O: u8> = crate::BitWriter<'a, u32, OUT_SPEC, PIN29_A, O>; -impl<'a, const O: u8> PIN29_W<'a, O> { - #[doc = "Pin driver is low"] - #[inline(always)] - pub fn low(self) -> &'a mut W { - self.variant(PIN29_A::LOW) - } - #[doc = "Pin driver is high"] - #[inline(always)] - pub fn high(self) -> &'a mut W { - self.variant(PIN29_A::HIGH) - } -} -#[doc = "Field `PIN30` reader - Pin 30"] -pub type PIN30_R = crate::BitReader; -#[doc = "Pin 30\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PIN30_A { - #[doc = "0: Pin driver is low"] - LOW = 0, - #[doc = "1: Pin driver is high"] - HIGH = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PIN30_A) -> Self { - variant as u8 != 0 - } -} -impl PIN30_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> PIN30_A { - match self.bits { - false => PIN30_A::LOW, - true => PIN30_A::HIGH, - } - } - #[doc = "Checks if the value of the field is `LOW`"] - #[inline(always)] - pub fn is_low(&self) -> bool { - *self == PIN30_A::LOW - } - #[doc = "Checks if the value of the field is `HIGH`"] - #[inline(always)] - pub fn is_high(&self) -> bool { - *self == PIN30_A::HIGH - } -} -#[doc = "Field `PIN30` writer - Pin 30"] -pub type PIN30_W<'a, const O: u8> = crate::BitWriter<'a, u32, OUT_SPEC, PIN30_A, O>; -impl<'a, const O: u8> PIN30_W<'a, O> { - #[doc = "Pin driver is low"] - #[inline(always)] - pub fn low(self) -> &'a mut W { - self.variant(PIN30_A::LOW) - } - #[doc = "Pin driver is high"] - #[inline(always)] - pub fn high(self) -> &'a mut W { - self.variant(PIN30_A::HIGH) - } -} -#[doc = "Field `PIN31` reader - Pin 31"] -pub type PIN31_R = crate::BitReader; -#[doc = "Pin 31\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PIN31_A { - #[doc = "0: Pin driver is low"] - LOW = 0, - #[doc = "1: Pin driver is high"] - HIGH = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PIN31_A) -> Self { - variant as u8 != 0 - } -} -impl PIN31_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> PIN31_A { - match self.bits { - false => PIN31_A::LOW, - true => PIN31_A::HIGH, - } - } - #[doc = "Checks if the value of the field is `LOW`"] - #[inline(always)] - pub fn is_low(&self) -> bool { - *self == PIN31_A::LOW - } - #[doc = "Checks if the value of the field is `HIGH`"] - #[inline(always)] - pub fn is_high(&self) -> bool { - *self == PIN31_A::HIGH - } -} -#[doc = "Field `PIN31` writer - Pin 31"] -pub type PIN31_W<'a, const O: u8> = crate::BitWriter<'a, u32, OUT_SPEC, PIN31_A, O>; -impl<'a, const O: u8> PIN31_W<'a, O> { - #[doc = "Pin driver is low"] - #[inline(always)] - pub fn low(self) -> &'a mut W { - self.variant(PIN31_A::LOW) - } - #[doc = "Pin driver is high"] - #[inline(always)] - pub fn high(self) -> &'a mut W { - self.variant(PIN31_A::HIGH) - } -} -impl R { - #[doc = "Bit 0 - Pin 0"] - #[inline(always)] - pub fn pin0(&self) -> PIN0_R { - PIN0_R::new((self.bits & 1) != 0) - } - #[doc = "Bit 1 - Pin 1"] - #[inline(always)] - pub fn pin1(&self) -> PIN1_R { - PIN1_R::new(((self.bits >> 1) & 1) != 0) - } - #[doc = "Bit 2 - Pin 2"] - #[inline(always)] - pub fn pin2(&self) -> PIN2_R { - PIN2_R::new(((self.bits >> 2) & 1) != 0) - } - #[doc = "Bit 3 - Pin 3"] - #[inline(always)] - pub fn pin3(&self) -> PIN3_R { - PIN3_R::new(((self.bits >> 3) & 1) != 0) - } - #[doc = "Bit 4 - Pin 4"] - #[inline(always)] - pub fn pin4(&self) -> PIN4_R { - PIN4_R::new(((self.bits >> 4) & 1) != 0) - } - #[doc = "Bit 5 - Pin 5"] - #[inline(always)] - pub fn pin5(&self) -> PIN5_R { - PIN5_R::new(((self.bits >> 5) & 1) != 0) - } - #[doc = "Bit 6 - Pin 6"] - #[inline(always)] - pub fn pin6(&self) -> PIN6_R { - PIN6_R::new(((self.bits >> 6) & 1) != 0) - } - #[doc = "Bit 7 - Pin 7"] - #[inline(always)] - pub fn pin7(&self) -> PIN7_R { - PIN7_R::new(((self.bits >> 7) & 1) != 0) - } - #[doc = "Bit 8 - Pin 8"] - #[inline(always)] - pub fn pin8(&self) -> PIN8_R { - PIN8_R::new(((self.bits >> 8) & 1) != 0) - } - #[doc = "Bit 9 - Pin 9"] - #[inline(always)] - pub fn pin9(&self) -> PIN9_R { - PIN9_R::new(((self.bits >> 9) & 1) != 0) - } - #[doc = "Bit 10 - Pin 10"] - #[inline(always)] - pub fn pin10(&self) -> PIN10_R { - PIN10_R::new(((self.bits >> 10) & 1) != 0) - } - #[doc = "Bit 11 - Pin 11"] - #[inline(always)] - pub fn pin11(&self) -> PIN11_R { - PIN11_R::new(((self.bits >> 11) & 1) != 0) - } - #[doc = "Bit 12 - Pin 12"] - #[inline(always)] - pub fn pin12(&self) -> PIN12_R { - PIN12_R::new(((self.bits >> 12) & 1) != 0) - } - #[doc = "Bit 13 - Pin 13"] - #[inline(always)] - pub fn pin13(&self) -> PIN13_R { - PIN13_R::new(((self.bits >> 13) & 1) != 0) - } - #[doc = "Bit 14 - Pin 14"] - #[inline(always)] - pub fn pin14(&self) -> PIN14_R { - PIN14_R::new(((self.bits >> 14) & 1) != 0) - } - #[doc = "Bit 15 - Pin 15"] - #[inline(always)] - pub fn pin15(&self) -> PIN15_R { - PIN15_R::new(((self.bits >> 15) & 1) != 0) - } - #[doc = "Bit 16 - Pin 16"] - #[inline(always)] - pub fn pin16(&self) -> PIN16_R { - PIN16_R::new(((self.bits >> 16) & 1) != 0) - } - #[doc = "Bit 17 - Pin 17"] - #[inline(always)] - pub fn pin17(&self) -> PIN17_R { - PIN17_R::new(((self.bits >> 17) & 1) != 0) - } - #[doc = "Bit 18 - Pin 18"] - #[inline(always)] - pub fn pin18(&self) -> PIN18_R { - PIN18_R::new(((self.bits >> 18) & 1) != 0) - } - #[doc = "Bit 19 - Pin 19"] - #[inline(always)] - pub fn pin19(&self) -> PIN19_R { - PIN19_R::new(((self.bits >> 19) & 1) != 0) - } - #[doc = "Bit 20 - Pin 20"] - #[inline(always)] - pub fn pin20(&self) -> PIN20_R { - PIN20_R::new(((self.bits >> 20) & 1) != 0) - } - #[doc = "Bit 21 - Pin 21"] - #[inline(always)] - pub fn pin21(&self) -> PIN21_R { - PIN21_R::new(((self.bits >> 21) & 1) != 0) - } - #[doc = "Bit 22 - Pin 22"] - #[inline(always)] - pub fn pin22(&self) -> PIN22_R { - PIN22_R::new(((self.bits >> 22) & 1) != 0) - } - #[doc = "Bit 23 - Pin 23"] - #[inline(always)] - pub fn pin23(&self) -> PIN23_R { - PIN23_R::new(((self.bits >> 23) & 1) != 0) - } - #[doc = "Bit 24 - Pin 24"] - #[inline(always)] - pub fn pin24(&self) -> PIN24_R { - PIN24_R::new(((self.bits >> 24) & 1) != 0) - } - #[doc = "Bit 25 - Pin 25"] - #[inline(always)] - pub fn pin25(&self) -> PIN25_R { - PIN25_R::new(((self.bits >> 25) & 1) != 0) - } - #[doc = "Bit 26 - Pin 26"] - #[inline(always)] - pub fn pin26(&self) -> PIN26_R { - PIN26_R::new(((self.bits >> 26) & 1) != 0) - } - #[doc = "Bit 27 - Pin 27"] - #[inline(always)] - pub fn pin27(&self) -> PIN27_R { - PIN27_R::new(((self.bits >> 27) & 1) != 0) - } - #[doc = "Bit 28 - Pin 28"] - #[inline(always)] - pub fn pin28(&self) -> PIN28_R { - PIN28_R::new(((self.bits >> 28) & 1) != 0) - } - #[doc = "Bit 29 - Pin 29"] - #[inline(always)] - pub fn pin29(&self) -> PIN29_R { - PIN29_R::new(((self.bits >> 29) & 1) != 0) - } - #[doc = "Bit 30 - Pin 30"] - #[inline(always)] - pub fn pin30(&self) -> PIN30_R { - PIN30_R::new(((self.bits >> 30) & 1) != 0) - } - #[doc = "Bit 31 - Pin 31"] - #[inline(always)] - pub fn pin31(&self) -> PIN31_R { - PIN31_R::new(((self.bits >> 31) & 1) != 0) - } -} -impl W { - #[doc = "Bit 0 - Pin 0"] - #[inline(always)] - #[must_use] - pub fn pin0(&mut self) -> PIN0_W<0> { - PIN0_W::new(self) - } - #[doc = "Bit 1 - Pin 1"] - #[inline(always)] - #[must_use] - pub fn pin1(&mut self) -> PIN1_W<1> { - PIN1_W::new(self) - } - #[doc = "Bit 2 - Pin 2"] - #[inline(always)] - #[must_use] - pub fn pin2(&mut self) -> PIN2_W<2> { - PIN2_W::new(self) - } - #[doc = "Bit 3 - Pin 3"] - #[inline(always)] - #[must_use] - pub fn pin3(&mut self) -> PIN3_W<3> { - PIN3_W::new(self) - } - #[doc = "Bit 4 - Pin 4"] - #[inline(always)] - #[must_use] - pub fn pin4(&mut self) -> PIN4_W<4> { - PIN4_W::new(self) - } - #[doc = "Bit 5 - Pin 5"] - #[inline(always)] - #[must_use] - pub fn pin5(&mut self) -> PIN5_W<5> { - PIN5_W::new(self) - } - #[doc = "Bit 6 - Pin 6"] - #[inline(always)] - #[must_use] - pub fn pin6(&mut self) -> PIN6_W<6> { - PIN6_W::new(self) - } - #[doc = "Bit 7 - Pin 7"] - #[inline(always)] - #[must_use] - pub fn pin7(&mut self) -> PIN7_W<7> { - PIN7_W::new(self) - } - #[doc = "Bit 8 - Pin 8"] - #[inline(always)] - #[must_use] - pub fn pin8(&mut self) -> PIN8_W<8> { - PIN8_W::new(self) - } - #[doc = "Bit 9 - Pin 9"] - #[inline(always)] - #[must_use] - pub fn pin9(&mut self) -> PIN9_W<9> { - PIN9_W::new(self) - } - #[doc = "Bit 10 - Pin 10"] - #[inline(always)] - #[must_use] - pub fn pin10(&mut self) -> PIN10_W<10> { - PIN10_W::new(self) - } - #[doc = "Bit 11 - Pin 11"] - #[inline(always)] - #[must_use] - pub fn pin11(&mut self) -> PIN11_W<11> { - PIN11_W::new(self) - } - #[doc = "Bit 12 - Pin 12"] - #[inline(always)] - #[must_use] - pub fn pin12(&mut self) -> PIN12_W<12> { - PIN12_W::new(self) - } - #[doc = "Bit 13 - Pin 13"] - #[inline(always)] - #[must_use] - pub fn pin13(&mut self) -> PIN13_W<13> { - PIN13_W::new(self) - } - #[doc = "Bit 14 - Pin 14"] - #[inline(always)] - #[must_use] - pub fn pin14(&mut self) -> PIN14_W<14> { - PIN14_W::new(self) - } - #[doc = "Bit 15 - Pin 15"] - #[inline(always)] - #[must_use] - pub fn pin15(&mut self) -> PIN15_W<15> { - PIN15_W::new(self) - } - #[doc = "Bit 16 - Pin 16"] - #[inline(always)] - #[must_use] - pub fn pin16(&mut self) -> PIN16_W<16> { - PIN16_W::new(self) - } - #[doc = "Bit 17 - Pin 17"] - #[inline(always)] - #[must_use] - pub fn pin17(&mut self) -> PIN17_W<17> { - PIN17_W::new(self) - } - #[doc = "Bit 18 - Pin 18"] - #[inline(always)] - #[must_use] - pub fn pin18(&mut self) -> PIN18_W<18> { - PIN18_W::new(self) - } - #[doc = "Bit 19 - Pin 19"] - #[inline(always)] - #[must_use] - pub fn pin19(&mut self) -> PIN19_W<19> { - PIN19_W::new(self) - } - #[doc = "Bit 20 - Pin 20"] - #[inline(always)] - #[must_use] - pub fn pin20(&mut self) -> PIN20_W<20> { - PIN20_W::new(self) - } - #[doc = "Bit 21 - Pin 21"] - #[inline(always)] - #[must_use] - pub fn pin21(&mut self) -> PIN21_W<21> { - PIN21_W::new(self) - } - #[doc = "Bit 22 - Pin 22"] - #[inline(always)] - #[must_use] - pub fn pin22(&mut self) -> PIN22_W<22> { - PIN22_W::new(self) - } - #[doc = "Bit 23 - Pin 23"] - #[inline(always)] - #[must_use] - pub fn pin23(&mut self) -> PIN23_W<23> { - PIN23_W::new(self) - } - #[doc = "Bit 24 - Pin 24"] - #[inline(always)] - #[must_use] - pub fn pin24(&mut self) -> PIN24_W<24> { - PIN24_W::new(self) - } - #[doc = "Bit 25 - Pin 25"] - #[inline(always)] - #[must_use] - pub fn pin25(&mut self) -> PIN25_W<25> { - PIN25_W::new(self) - } - #[doc = "Bit 26 - Pin 26"] - #[inline(always)] - #[must_use] - pub fn pin26(&mut self) -> PIN26_W<26> { - PIN26_W::new(self) - } - #[doc = "Bit 27 - Pin 27"] - #[inline(always)] - #[must_use] - pub fn pin27(&mut self) -> PIN27_W<27> { - PIN27_W::new(self) - } - #[doc = "Bit 28 - Pin 28"] - #[inline(always)] - #[must_use] - pub fn pin28(&mut self) -> PIN28_W<28> { - PIN28_W::new(self) - } - #[doc = "Bit 29 - Pin 29"] - #[inline(always)] - #[must_use] - pub fn pin29(&mut self) -> PIN29_W<29> { - PIN29_W::new(self) - } - #[doc = "Bit 30 - Pin 30"] - #[inline(always)] - #[must_use] - pub fn pin30(&mut self) -> PIN30_W<30> { - PIN30_W::new(self) - } - #[doc = "Bit 31 - Pin 31"] - #[inline(always)] - #[must_use] - pub fn pin31(&mut self) -> PIN31_W<31> { - PIN31_W::new(self) - } - #[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 = "Write GPIO port\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 [out](index.html) module"] -pub struct OUT_SPEC; -impl crate::RegisterSpec for OUT_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [out::R](R) reader structure"] -impl crate::Readable for OUT_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [out::W](W) writer structure"] -impl crate::Writable for 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 OUT to value 0"] -impl crate::Resettable for OUT_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/p0/outclr.rs b/down-the-stack/dk_pac/src/p0/outclr.rs deleted file mode 100644 index 737e2bd..0000000 --- a/down-the-stack/dk_pac/src/p0/outclr.rs +++ /dev/null @@ -1,2241 +0,0 @@ -#[doc = "Register `OUTCLR` 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 `OUTCLR` 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 `PIN0` reader - Pin 0"] -pub type PIN0_R = crate::BitReader; -#[doc = "Pin 0\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PIN0_A { - #[doc = "0: Read: pin driver is low"] - LOW = 0, - #[doc = "1: Read: pin driver is high"] - HIGH = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PIN0_A) -> Self { - variant as u8 != 0 - } -} -impl PIN0_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> PIN0_A { - match self.bits { - false => PIN0_A::LOW, - true => PIN0_A::HIGH, - } - } - #[doc = "Checks if the value of the field is `LOW`"] - #[inline(always)] - pub fn is_low(&self) -> bool { - *self == PIN0_A::LOW - } - #[doc = "Checks if the value of the field is `HIGH`"] - #[inline(always)] - pub fn is_high(&self) -> bool { - *self == PIN0_A::HIGH - } -} -#[doc = "Pin 0\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PIN0_AW { - #[doc = "1: Write: writing a '1' sets the pin low; writing a '0' has no effect"] - CLEAR = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PIN0_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `PIN0` writer - Pin 0"] -pub type PIN0_W<'a, const O: u8> = crate::BitWriter1C<'a, u32, OUTCLR_SPEC, PIN0_AW, O>; -impl<'a, const O: u8> PIN0_W<'a, O> { - #[doc = "Write: writing a '1' sets the pin low; writing a '0' has no effect"] - #[inline(always)] - pub fn clear(self) -> &'a mut W { - self.variant(PIN0_AW::CLEAR) - } -} -#[doc = "Field `PIN1` reader - Pin 1"] -pub type PIN1_R = crate::BitReader; -#[doc = "Pin 1\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PIN1_A { - #[doc = "0: Read: pin driver is low"] - LOW = 0, - #[doc = "1: Read: pin driver is high"] - HIGH = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PIN1_A) -> Self { - variant as u8 != 0 - } -} -impl PIN1_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> PIN1_A { - match self.bits { - false => PIN1_A::LOW, - true => PIN1_A::HIGH, - } - } - #[doc = "Checks if the value of the field is `LOW`"] - #[inline(always)] - pub fn is_low(&self) -> bool { - *self == PIN1_A::LOW - } - #[doc = "Checks if the value of the field is `HIGH`"] - #[inline(always)] - pub fn is_high(&self) -> bool { - *self == PIN1_A::HIGH - } -} -#[doc = "Pin 1\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PIN1_AW { - #[doc = "1: Write: writing a '1' sets the pin low; writing a '0' has no effect"] - CLEAR = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PIN1_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `PIN1` writer - Pin 1"] -pub type PIN1_W<'a, const O: u8> = crate::BitWriter1C<'a, u32, OUTCLR_SPEC, PIN1_AW, O>; -impl<'a, const O: u8> PIN1_W<'a, O> { - #[doc = "Write: writing a '1' sets the pin low; writing a '0' has no effect"] - #[inline(always)] - pub fn clear(self) -> &'a mut W { - self.variant(PIN1_AW::CLEAR) - } -} -#[doc = "Field `PIN2` reader - Pin 2"] -pub type PIN2_R = crate::BitReader; -#[doc = "Pin 2\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PIN2_A { - #[doc = "0: Read: pin driver is low"] - LOW = 0, - #[doc = "1: Read: pin driver is high"] - HIGH = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PIN2_A) -> Self { - variant as u8 != 0 - } -} -impl PIN2_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> PIN2_A { - match self.bits { - false => PIN2_A::LOW, - true => PIN2_A::HIGH, - } - } - #[doc = "Checks if the value of the field is `LOW`"] - #[inline(always)] - pub fn is_low(&self) -> bool { - *self == PIN2_A::LOW - } - #[doc = "Checks if the value of the field is `HIGH`"] - #[inline(always)] - pub fn is_high(&self) -> bool { - *self == PIN2_A::HIGH - } -} -#[doc = "Pin 2\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PIN2_AW { - #[doc = "1: Write: writing a '1' sets the pin low; writing a '0' has no effect"] - CLEAR = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PIN2_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `PIN2` writer - Pin 2"] -pub type PIN2_W<'a, const O: u8> = crate::BitWriter1C<'a, u32, OUTCLR_SPEC, PIN2_AW, O>; -impl<'a, const O: u8> PIN2_W<'a, O> { - #[doc = "Write: writing a '1' sets the pin low; writing a '0' has no effect"] - #[inline(always)] - pub fn clear(self) -> &'a mut W { - self.variant(PIN2_AW::CLEAR) - } -} -#[doc = "Field `PIN3` reader - Pin 3"] -pub type PIN3_R = crate::BitReader; -#[doc = "Pin 3\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PIN3_A { - #[doc = "0: Read: pin driver is low"] - LOW = 0, - #[doc = "1: Read: pin driver is high"] - HIGH = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PIN3_A) -> Self { - variant as u8 != 0 - } -} -impl PIN3_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> PIN3_A { - match self.bits { - false => PIN3_A::LOW, - true => PIN3_A::HIGH, - } - } - #[doc = "Checks if the value of the field is `LOW`"] - #[inline(always)] - pub fn is_low(&self) -> bool { - *self == PIN3_A::LOW - } - #[doc = "Checks if the value of the field is `HIGH`"] - #[inline(always)] - pub fn is_high(&self) -> bool { - *self == PIN3_A::HIGH - } -} -#[doc = "Pin 3\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PIN3_AW { - #[doc = "1: Write: writing a '1' sets the pin low; writing a '0' has no effect"] - CLEAR = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PIN3_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `PIN3` writer - Pin 3"] -pub type PIN3_W<'a, const O: u8> = crate::BitWriter1C<'a, u32, OUTCLR_SPEC, PIN3_AW, O>; -impl<'a, const O: u8> PIN3_W<'a, O> { - #[doc = "Write: writing a '1' sets the pin low; writing a '0' has no effect"] - #[inline(always)] - pub fn clear(self) -> &'a mut W { - self.variant(PIN3_AW::CLEAR) - } -} -#[doc = "Field `PIN4` reader - Pin 4"] -pub type PIN4_R = crate::BitReader; -#[doc = "Pin 4\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PIN4_A { - #[doc = "0: Read: pin driver is low"] - LOW = 0, - #[doc = "1: Read: pin driver is high"] - HIGH = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PIN4_A) -> Self { - variant as u8 != 0 - } -} -impl PIN4_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> PIN4_A { - match self.bits { - false => PIN4_A::LOW, - true => PIN4_A::HIGH, - } - } - #[doc = "Checks if the value of the field is `LOW`"] - #[inline(always)] - pub fn is_low(&self) -> bool { - *self == PIN4_A::LOW - } - #[doc = "Checks if the value of the field is `HIGH`"] - #[inline(always)] - pub fn is_high(&self) -> bool { - *self == PIN4_A::HIGH - } -} -#[doc = "Pin 4\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PIN4_AW { - #[doc = "1: Write: writing a '1' sets the pin low; writing a '0' has no effect"] - CLEAR = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PIN4_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `PIN4` writer - Pin 4"] -pub type PIN4_W<'a, const O: u8> = crate::BitWriter1C<'a, u32, OUTCLR_SPEC, PIN4_AW, O>; -impl<'a, const O: u8> PIN4_W<'a, O> { - #[doc = "Write: writing a '1' sets the pin low; writing a '0' has no effect"] - #[inline(always)] - pub fn clear(self) -> &'a mut W { - self.variant(PIN4_AW::CLEAR) - } -} -#[doc = "Field `PIN5` reader - Pin 5"] -pub type PIN5_R = crate::BitReader; -#[doc = "Pin 5\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PIN5_A { - #[doc = "0: Read: pin driver is low"] - LOW = 0, - #[doc = "1: Read: pin driver is high"] - HIGH = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PIN5_A) -> Self { - variant as u8 != 0 - } -} -impl PIN5_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> PIN5_A { - match self.bits { - false => PIN5_A::LOW, - true => PIN5_A::HIGH, - } - } - #[doc = "Checks if the value of the field is `LOW`"] - #[inline(always)] - pub fn is_low(&self) -> bool { - *self == PIN5_A::LOW - } - #[doc = "Checks if the value of the field is `HIGH`"] - #[inline(always)] - pub fn is_high(&self) -> bool { - *self == PIN5_A::HIGH - } -} -#[doc = "Pin 5\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PIN5_AW { - #[doc = "1: Write: writing a '1' sets the pin low; writing a '0' has no effect"] - CLEAR = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PIN5_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `PIN5` writer - Pin 5"] -pub type PIN5_W<'a, const O: u8> = crate::BitWriter1C<'a, u32, OUTCLR_SPEC, PIN5_AW, O>; -impl<'a, const O: u8> PIN5_W<'a, O> { - #[doc = "Write: writing a '1' sets the pin low; writing a '0' has no effect"] - #[inline(always)] - pub fn clear(self) -> &'a mut W { - self.variant(PIN5_AW::CLEAR) - } -} -#[doc = "Field `PIN6` reader - Pin 6"] -pub type PIN6_R = crate::BitReader; -#[doc = "Pin 6\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PIN6_A { - #[doc = "0: Read: pin driver is low"] - LOW = 0, - #[doc = "1: Read: pin driver is high"] - HIGH = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PIN6_A) -> Self { - variant as u8 != 0 - } -} -impl PIN6_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> PIN6_A { - match self.bits { - false => PIN6_A::LOW, - true => PIN6_A::HIGH, - } - } - #[doc = "Checks if the value of the field is `LOW`"] - #[inline(always)] - pub fn is_low(&self) -> bool { - *self == PIN6_A::LOW - } - #[doc = "Checks if the value of the field is `HIGH`"] - #[inline(always)] - pub fn is_high(&self) -> bool { - *self == PIN6_A::HIGH - } -} -#[doc = "Pin 6\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PIN6_AW { - #[doc = "1: Write: writing a '1' sets the pin low; writing a '0' has no effect"] - CLEAR = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PIN6_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `PIN6` writer - Pin 6"] -pub type PIN6_W<'a, const O: u8> = crate::BitWriter1C<'a, u32, OUTCLR_SPEC, PIN6_AW, O>; -impl<'a, const O: u8> PIN6_W<'a, O> { - #[doc = "Write: writing a '1' sets the pin low; writing a '0' has no effect"] - #[inline(always)] - pub fn clear(self) -> &'a mut W { - self.variant(PIN6_AW::CLEAR) - } -} -#[doc = "Field `PIN7` reader - Pin 7"] -pub type PIN7_R = crate::BitReader; -#[doc = "Pin 7\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PIN7_A { - #[doc = "0: Read: pin driver is low"] - LOW = 0, - #[doc = "1: Read: pin driver is high"] - HIGH = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PIN7_A) -> Self { - variant as u8 != 0 - } -} -impl PIN7_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> PIN7_A { - match self.bits { - false => PIN7_A::LOW, - true => PIN7_A::HIGH, - } - } - #[doc = "Checks if the value of the field is `LOW`"] - #[inline(always)] - pub fn is_low(&self) -> bool { - *self == PIN7_A::LOW - } - #[doc = "Checks if the value of the field is `HIGH`"] - #[inline(always)] - pub fn is_high(&self) -> bool { - *self == PIN7_A::HIGH - } -} -#[doc = "Pin 7\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PIN7_AW { - #[doc = "1: Write: writing a '1' sets the pin low; writing a '0' has no effect"] - CLEAR = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PIN7_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `PIN7` writer - Pin 7"] -pub type PIN7_W<'a, const O: u8> = crate::BitWriter1C<'a, u32, OUTCLR_SPEC, PIN7_AW, O>; -impl<'a, const O: u8> PIN7_W<'a, O> { - #[doc = "Write: writing a '1' sets the pin low; writing a '0' has no effect"] - #[inline(always)] - pub fn clear(self) -> &'a mut W { - self.variant(PIN7_AW::CLEAR) - } -} -#[doc = "Field `PIN8` reader - Pin 8"] -pub type PIN8_R = crate::BitReader; -#[doc = "Pin 8\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PIN8_A { - #[doc = "0: Read: pin driver is low"] - LOW = 0, - #[doc = "1: Read: pin driver is high"] - HIGH = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PIN8_A) -> Self { - variant as u8 != 0 - } -} -impl PIN8_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> PIN8_A { - match self.bits { - false => PIN8_A::LOW, - true => PIN8_A::HIGH, - } - } - #[doc = "Checks if the value of the field is `LOW`"] - #[inline(always)] - pub fn is_low(&self) -> bool { - *self == PIN8_A::LOW - } - #[doc = "Checks if the value of the field is `HIGH`"] - #[inline(always)] - pub fn is_high(&self) -> bool { - *self == PIN8_A::HIGH - } -} -#[doc = "Pin 8\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PIN8_AW { - #[doc = "1: Write: writing a '1' sets the pin low; writing a '0' has no effect"] - CLEAR = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PIN8_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `PIN8` writer - Pin 8"] -pub type PIN8_W<'a, const O: u8> = crate::BitWriter1C<'a, u32, OUTCLR_SPEC, PIN8_AW, O>; -impl<'a, const O: u8> PIN8_W<'a, O> { - #[doc = "Write: writing a '1' sets the pin low; writing a '0' has no effect"] - #[inline(always)] - pub fn clear(self) -> &'a mut W { - self.variant(PIN8_AW::CLEAR) - } -} -#[doc = "Field `PIN9` reader - Pin 9"] -pub type PIN9_R = crate::BitReader; -#[doc = "Pin 9\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PIN9_A { - #[doc = "0: Read: pin driver is low"] - LOW = 0, - #[doc = "1: Read: pin driver is high"] - HIGH = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PIN9_A) -> Self { - variant as u8 != 0 - } -} -impl PIN9_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> PIN9_A { - match self.bits { - false => PIN9_A::LOW, - true => PIN9_A::HIGH, - } - } - #[doc = "Checks if the value of the field is `LOW`"] - #[inline(always)] - pub fn is_low(&self) -> bool { - *self == PIN9_A::LOW - } - #[doc = "Checks if the value of the field is `HIGH`"] - #[inline(always)] - pub fn is_high(&self) -> bool { - *self == PIN9_A::HIGH - } -} -#[doc = "Pin 9\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PIN9_AW { - #[doc = "1: Write: writing a '1' sets the pin low; writing a '0' has no effect"] - CLEAR = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PIN9_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `PIN9` writer - Pin 9"] -pub type PIN9_W<'a, const O: u8> = crate::BitWriter1C<'a, u32, OUTCLR_SPEC, PIN9_AW, O>; -impl<'a, const O: u8> PIN9_W<'a, O> { - #[doc = "Write: writing a '1' sets the pin low; writing a '0' has no effect"] - #[inline(always)] - pub fn clear(self) -> &'a mut W { - self.variant(PIN9_AW::CLEAR) - } -} -#[doc = "Field `PIN10` reader - Pin 10"] -pub type PIN10_R = crate::BitReader; -#[doc = "Pin 10\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PIN10_A { - #[doc = "0: Read: pin driver is low"] - LOW = 0, - #[doc = "1: Read: pin driver is high"] - HIGH = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PIN10_A) -> Self { - variant as u8 != 0 - } -} -impl PIN10_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> PIN10_A { - match self.bits { - false => PIN10_A::LOW, - true => PIN10_A::HIGH, - } - } - #[doc = "Checks if the value of the field is `LOW`"] - #[inline(always)] - pub fn is_low(&self) -> bool { - *self == PIN10_A::LOW - } - #[doc = "Checks if the value of the field is `HIGH`"] - #[inline(always)] - pub fn is_high(&self) -> bool { - *self == PIN10_A::HIGH - } -} -#[doc = "Pin 10\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PIN10_AW { - #[doc = "1: Write: writing a '1' sets the pin low; writing a '0' has no effect"] - CLEAR = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PIN10_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `PIN10` writer - Pin 10"] -pub type PIN10_W<'a, const O: u8> = crate::BitWriter1C<'a, u32, OUTCLR_SPEC, PIN10_AW, O>; -impl<'a, const O: u8> PIN10_W<'a, O> { - #[doc = "Write: writing a '1' sets the pin low; writing a '0' has no effect"] - #[inline(always)] - pub fn clear(self) -> &'a mut W { - self.variant(PIN10_AW::CLEAR) - } -} -#[doc = "Field `PIN11` reader - Pin 11"] -pub type PIN11_R = crate::BitReader; -#[doc = "Pin 11\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PIN11_A { - #[doc = "0: Read: pin driver is low"] - LOW = 0, - #[doc = "1: Read: pin driver is high"] - HIGH = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PIN11_A) -> Self { - variant as u8 != 0 - } -} -impl PIN11_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> PIN11_A { - match self.bits { - false => PIN11_A::LOW, - true => PIN11_A::HIGH, - } - } - #[doc = "Checks if the value of the field is `LOW`"] - #[inline(always)] - pub fn is_low(&self) -> bool { - *self == PIN11_A::LOW - } - #[doc = "Checks if the value of the field is `HIGH`"] - #[inline(always)] - pub fn is_high(&self) -> bool { - *self == PIN11_A::HIGH - } -} -#[doc = "Pin 11\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PIN11_AW { - #[doc = "1: Write: writing a '1' sets the pin low; writing a '0' has no effect"] - CLEAR = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PIN11_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `PIN11` writer - Pin 11"] -pub type PIN11_W<'a, const O: u8> = crate::BitWriter1C<'a, u32, OUTCLR_SPEC, PIN11_AW, O>; -impl<'a, const O: u8> PIN11_W<'a, O> { - #[doc = "Write: writing a '1' sets the pin low; writing a '0' has no effect"] - #[inline(always)] - pub fn clear(self) -> &'a mut W { - self.variant(PIN11_AW::CLEAR) - } -} -#[doc = "Field `PIN12` reader - Pin 12"] -pub type PIN12_R = crate::BitReader; -#[doc = "Pin 12\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PIN12_A { - #[doc = "0: Read: pin driver is low"] - LOW = 0, - #[doc = "1: Read: pin driver is high"] - HIGH = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PIN12_A) -> Self { - variant as u8 != 0 - } -} -impl PIN12_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> PIN12_A { - match self.bits { - false => PIN12_A::LOW, - true => PIN12_A::HIGH, - } - } - #[doc = "Checks if the value of the field is `LOW`"] - #[inline(always)] - pub fn is_low(&self) -> bool { - *self == PIN12_A::LOW - } - #[doc = "Checks if the value of the field is `HIGH`"] - #[inline(always)] - pub fn is_high(&self) -> bool { - *self == PIN12_A::HIGH - } -} -#[doc = "Pin 12\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PIN12_AW { - #[doc = "1: Write: writing a '1' sets the pin low; writing a '0' has no effect"] - CLEAR = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PIN12_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `PIN12` writer - Pin 12"] -pub type PIN12_W<'a, const O: u8> = crate::BitWriter1C<'a, u32, OUTCLR_SPEC, PIN12_AW, O>; -impl<'a, const O: u8> PIN12_W<'a, O> { - #[doc = "Write: writing a '1' sets the pin low; writing a '0' has no effect"] - #[inline(always)] - pub fn clear(self) -> &'a mut W { - self.variant(PIN12_AW::CLEAR) - } -} -#[doc = "Field `PIN13` reader - Pin 13"] -pub type PIN13_R = crate::BitReader; -#[doc = "Pin 13\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PIN13_A { - #[doc = "0: Read: pin driver is low"] - LOW = 0, - #[doc = "1: Read: pin driver is high"] - HIGH = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PIN13_A) -> Self { - variant as u8 != 0 - } -} -impl PIN13_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> PIN13_A { - match self.bits { - false => PIN13_A::LOW, - true => PIN13_A::HIGH, - } - } - #[doc = "Checks if the value of the field is `LOW`"] - #[inline(always)] - pub fn is_low(&self) -> bool { - *self == PIN13_A::LOW - } - #[doc = "Checks if the value of the field is `HIGH`"] - #[inline(always)] - pub fn is_high(&self) -> bool { - *self == PIN13_A::HIGH - } -} -#[doc = "Pin 13\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PIN13_AW { - #[doc = "1: Write: writing a '1' sets the pin low; writing a '0' has no effect"] - CLEAR = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PIN13_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `PIN13` writer - Pin 13"] -pub type PIN13_W<'a, const O: u8> = crate::BitWriter1C<'a, u32, OUTCLR_SPEC, PIN13_AW, O>; -impl<'a, const O: u8> PIN13_W<'a, O> { - #[doc = "Write: writing a '1' sets the pin low; writing a '0' has no effect"] - #[inline(always)] - pub fn clear(self) -> &'a mut W { - self.variant(PIN13_AW::CLEAR) - } -} -#[doc = "Field `PIN14` reader - Pin 14"] -pub type PIN14_R = crate::BitReader; -#[doc = "Pin 14\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PIN14_A { - #[doc = "0: Read: pin driver is low"] - LOW = 0, - #[doc = "1: Read: pin driver is high"] - HIGH = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PIN14_A) -> Self { - variant as u8 != 0 - } -} -impl PIN14_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> PIN14_A { - match self.bits { - false => PIN14_A::LOW, - true => PIN14_A::HIGH, - } - } - #[doc = "Checks if the value of the field is `LOW`"] - #[inline(always)] - pub fn is_low(&self) -> bool { - *self == PIN14_A::LOW - } - #[doc = "Checks if the value of the field is `HIGH`"] - #[inline(always)] - pub fn is_high(&self) -> bool { - *self == PIN14_A::HIGH - } -} -#[doc = "Pin 14\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PIN14_AW { - #[doc = "1: Write: writing a '1' sets the pin low; writing a '0' has no effect"] - CLEAR = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PIN14_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `PIN14` writer - Pin 14"] -pub type PIN14_W<'a, const O: u8> = crate::BitWriter1C<'a, u32, OUTCLR_SPEC, PIN14_AW, O>; -impl<'a, const O: u8> PIN14_W<'a, O> { - #[doc = "Write: writing a '1' sets the pin low; writing a '0' has no effect"] - #[inline(always)] - pub fn clear(self) -> &'a mut W { - self.variant(PIN14_AW::CLEAR) - } -} -#[doc = "Field `PIN15` reader - Pin 15"] -pub type PIN15_R = crate::BitReader; -#[doc = "Pin 15\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PIN15_A { - #[doc = "0: Read: pin driver is low"] - LOW = 0, - #[doc = "1: Read: pin driver is high"] - HIGH = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PIN15_A) -> Self { - variant as u8 != 0 - } -} -impl PIN15_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> PIN15_A { - match self.bits { - false => PIN15_A::LOW, - true => PIN15_A::HIGH, - } - } - #[doc = "Checks if the value of the field is `LOW`"] - #[inline(always)] - pub fn is_low(&self) -> bool { - *self == PIN15_A::LOW - } - #[doc = "Checks if the value of the field is `HIGH`"] - #[inline(always)] - pub fn is_high(&self) -> bool { - *self == PIN15_A::HIGH - } -} -#[doc = "Pin 15\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PIN15_AW { - #[doc = "1: Write: writing a '1' sets the pin low; writing a '0' has no effect"] - CLEAR = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PIN15_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `PIN15` writer - Pin 15"] -pub type PIN15_W<'a, const O: u8> = crate::BitWriter1C<'a, u32, OUTCLR_SPEC, PIN15_AW, O>; -impl<'a, const O: u8> PIN15_W<'a, O> { - #[doc = "Write: writing a '1' sets the pin low; writing a '0' has no effect"] - #[inline(always)] - pub fn clear(self) -> &'a mut W { - self.variant(PIN15_AW::CLEAR) - } -} -#[doc = "Field `PIN16` reader - Pin 16"] -pub type PIN16_R = crate::BitReader; -#[doc = "Pin 16\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PIN16_A { - #[doc = "0: Read: pin driver is low"] - LOW = 0, - #[doc = "1: Read: pin driver is high"] - HIGH = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PIN16_A) -> Self { - variant as u8 != 0 - } -} -impl PIN16_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> PIN16_A { - match self.bits { - false => PIN16_A::LOW, - true => PIN16_A::HIGH, - } - } - #[doc = "Checks if the value of the field is `LOW`"] - #[inline(always)] - pub fn is_low(&self) -> bool { - *self == PIN16_A::LOW - } - #[doc = "Checks if the value of the field is `HIGH`"] - #[inline(always)] - pub fn is_high(&self) -> bool { - *self == PIN16_A::HIGH - } -} -#[doc = "Pin 16\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PIN16_AW { - #[doc = "1: Write: writing a '1' sets the pin low; writing a '0' has no effect"] - CLEAR = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PIN16_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `PIN16` writer - Pin 16"] -pub type PIN16_W<'a, const O: u8> = crate::BitWriter1C<'a, u32, OUTCLR_SPEC, PIN16_AW, O>; -impl<'a, const O: u8> PIN16_W<'a, O> { - #[doc = "Write: writing a '1' sets the pin low; writing a '0' has no effect"] - #[inline(always)] - pub fn clear(self) -> &'a mut W { - self.variant(PIN16_AW::CLEAR) - } -} -#[doc = "Field `PIN17` reader - Pin 17"] -pub type PIN17_R = crate::BitReader; -#[doc = "Pin 17\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PIN17_A { - #[doc = "0: Read: pin driver is low"] - LOW = 0, - #[doc = "1: Read: pin driver is high"] - HIGH = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PIN17_A) -> Self { - variant as u8 != 0 - } -} -impl PIN17_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> PIN17_A { - match self.bits { - false => PIN17_A::LOW, - true => PIN17_A::HIGH, - } - } - #[doc = "Checks if the value of the field is `LOW`"] - #[inline(always)] - pub fn is_low(&self) -> bool { - *self == PIN17_A::LOW - } - #[doc = "Checks if the value of the field is `HIGH`"] - #[inline(always)] - pub fn is_high(&self) -> bool { - *self == PIN17_A::HIGH - } -} -#[doc = "Pin 17\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PIN17_AW { - #[doc = "1: Write: writing a '1' sets the pin low; writing a '0' has no effect"] - CLEAR = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PIN17_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `PIN17` writer - Pin 17"] -pub type PIN17_W<'a, const O: u8> = crate::BitWriter1C<'a, u32, OUTCLR_SPEC, PIN17_AW, O>; -impl<'a, const O: u8> PIN17_W<'a, O> { - #[doc = "Write: writing a '1' sets the pin low; writing a '0' has no effect"] - #[inline(always)] - pub fn clear(self) -> &'a mut W { - self.variant(PIN17_AW::CLEAR) - } -} -#[doc = "Field `PIN18` reader - Pin 18"] -pub type PIN18_R = crate::BitReader; -#[doc = "Pin 18\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PIN18_A { - #[doc = "0: Read: pin driver is low"] - LOW = 0, - #[doc = "1: Read: pin driver is high"] - HIGH = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PIN18_A) -> Self { - variant as u8 != 0 - } -} -impl PIN18_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> PIN18_A { - match self.bits { - false => PIN18_A::LOW, - true => PIN18_A::HIGH, - } - } - #[doc = "Checks if the value of the field is `LOW`"] - #[inline(always)] - pub fn is_low(&self) -> bool { - *self == PIN18_A::LOW - } - #[doc = "Checks if the value of the field is `HIGH`"] - #[inline(always)] - pub fn is_high(&self) -> bool { - *self == PIN18_A::HIGH - } -} -#[doc = "Pin 18\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PIN18_AW { - #[doc = "1: Write: writing a '1' sets the pin low; writing a '0' has no effect"] - CLEAR = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PIN18_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `PIN18` writer - Pin 18"] -pub type PIN18_W<'a, const O: u8> = crate::BitWriter1C<'a, u32, OUTCLR_SPEC, PIN18_AW, O>; -impl<'a, const O: u8> PIN18_W<'a, O> { - #[doc = "Write: writing a '1' sets the pin low; writing a '0' has no effect"] - #[inline(always)] - pub fn clear(self) -> &'a mut W { - self.variant(PIN18_AW::CLEAR) - } -} -#[doc = "Field `PIN19` reader - Pin 19"] -pub type PIN19_R = crate::BitReader; -#[doc = "Pin 19\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PIN19_A { - #[doc = "0: Read: pin driver is low"] - LOW = 0, - #[doc = "1: Read: pin driver is high"] - HIGH = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PIN19_A) -> Self { - variant as u8 != 0 - } -} -impl PIN19_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> PIN19_A { - match self.bits { - false => PIN19_A::LOW, - true => PIN19_A::HIGH, - } - } - #[doc = "Checks if the value of the field is `LOW`"] - #[inline(always)] - pub fn is_low(&self) -> bool { - *self == PIN19_A::LOW - } - #[doc = "Checks if the value of the field is `HIGH`"] - #[inline(always)] - pub fn is_high(&self) -> bool { - *self == PIN19_A::HIGH - } -} -#[doc = "Pin 19\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PIN19_AW { - #[doc = "1: Write: writing a '1' sets the pin low; writing a '0' has no effect"] - CLEAR = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PIN19_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `PIN19` writer - Pin 19"] -pub type PIN19_W<'a, const O: u8> = crate::BitWriter1C<'a, u32, OUTCLR_SPEC, PIN19_AW, O>; -impl<'a, const O: u8> PIN19_W<'a, O> { - #[doc = "Write: writing a '1' sets the pin low; writing a '0' has no effect"] - #[inline(always)] - pub fn clear(self) -> &'a mut W { - self.variant(PIN19_AW::CLEAR) - } -} -#[doc = "Field `PIN20` reader - Pin 20"] -pub type PIN20_R = crate::BitReader; -#[doc = "Pin 20\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PIN20_A { - #[doc = "0: Read: pin driver is low"] - LOW = 0, - #[doc = "1: Read: pin driver is high"] - HIGH = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PIN20_A) -> Self { - variant as u8 != 0 - } -} -impl PIN20_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> PIN20_A { - match self.bits { - false => PIN20_A::LOW, - true => PIN20_A::HIGH, - } - } - #[doc = "Checks if the value of the field is `LOW`"] - #[inline(always)] - pub fn is_low(&self) -> bool { - *self == PIN20_A::LOW - } - #[doc = "Checks if the value of the field is `HIGH`"] - #[inline(always)] - pub fn is_high(&self) -> bool { - *self == PIN20_A::HIGH - } -} -#[doc = "Pin 20\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PIN20_AW { - #[doc = "1: Write: writing a '1' sets the pin low; writing a '0' has no effect"] - CLEAR = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PIN20_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `PIN20` writer - Pin 20"] -pub type PIN20_W<'a, const O: u8> = crate::BitWriter1C<'a, u32, OUTCLR_SPEC, PIN20_AW, O>; -impl<'a, const O: u8> PIN20_W<'a, O> { - #[doc = "Write: writing a '1' sets the pin low; writing a '0' has no effect"] - #[inline(always)] - pub fn clear(self) -> &'a mut W { - self.variant(PIN20_AW::CLEAR) - } -} -#[doc = "Field `PIN21` reader - Pin 21"] -pub type PIN21_R = crate::BitReader; -#[doc = "Pin 21\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PIN21_A { - #[doc = "0: Read: pin driver is low"] - LOW = 0, - #[doc = "1: Read: pin driver is high"] - HIGH = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PIN21_A) -> Self { - variant as u8 != 0 - } -} -impl PIN21_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> PIN21_A { - match self.bits { - false => PIN21_A::LOW, - true => PIN21_A::HIGH, - } - } - #[doc = "Checks if the value of the field is `LOW`"] - #[inline(always)] - pub fn is_low(&self) -> bool { - *self == PIN21_A::LOW - } - #[doc = "Checks if the value of the field is `HIGH`"] - #[inline(always)] - pub fn is_high(&self) -> bool { - *self == PIN21_A::HIGH - } -} -#[doc = "Pin 21\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PIN21_AW { - #[doc = "1: Write: writing a '1' sets the pin low; writing a '0' has no effect"] - CLEAR = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PIN21_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `PIN21` writer - Pin 21"] -pub type PIN21_W<'a, const O: u8> = crate::BitWriter1C<'a, u32, OUTCLR_SPEC, PIN21_AW, O>; -impl<'a, const O: u8> PIN21_W<'a, O> { - #[doc = "Write: writing a '1' sets the pin low; writing a '0' has no effect"] - #[inline(always)] - pub fn clear(self) -> &'a mut W { - self.variant(PIN21_AW::CLEAR) - } -} -#[doc = "Field `PIN22` reader - Pin 22"] -pub type PIN22_R = crate::BitReader; -#[doc = "Pin 22\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PIN22_A { - #[doc = "0: Read: pin driver is low"] - LOW = 0, - #[doc = "1: Read: pin driver is high"] - HIGH = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PIN22_A) -> Self { - variant as u8 != 0 - } -} -impl PIN22_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> PIN22_A { - match self.bits { - false => PIN22_A::LOW, - true => PIN22_A::HIGH, - } - } - #[doc = "Checks if the value of the field is `LOW`"] - #[inline(always)] - pub fn is_low(&self) -> bool { - *self == PIN22_A::LOW - } - #[doc = "Checks if the value of the field is `HIGH`"] - #[inline(always)] - pub fn is_high(&self) -> bool { - *self == PIN22_A::HIGH - } -} -#[doc = "Pin 22\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PIN22_AW { - #[doc = "1: Write: writing a '1' sets the pin low; writing a '0' has no effect"] - CLEAR = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PIN22_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `PIN22` writer - Pin 22"] -pub type PIN22_W<'a, const O: u8> = crate::BitWriter1C<'a, u32, OUTCLR_SPEC, PIN22_AW, O>; -impl<'a, const O: u8> PIN22_W<'a, O> { - #[doc = "Write: writing a '1' sets the pin low; writing a '0' has no effect"] - #[inline(always)] - pub fn clear(self) -> &'a mut W { - self.variant(PIN22_AW::CLEAR) - } -} -#[doc = "Field `PIN23` reader - Pin 23"] -pub type PIN23_R = crate::BitReader; -#[doc = "Pin 23\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PIN23_A { - #[doc = "0: Read: pin driver is low"] - LOW = 0, - #[doc = "1: Read: pin driver is high"] - HIGH = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PIN23_A) -> Self { - variant as u8 != 0 - } -} -impl PIN23_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> PIN23_A { - match self.bits { - false => PIN23_A::LOW, - true => PIN23_A::HIGH, - } - } - #[doc = "Checks if the value of the field is `LOW`"] - #[inline(always)] - pub fn is_low(&self) -> bool { - *self == PIN23_A::LOW - } - #[doc = "Checks if the value of the field is `HIGH`"] - #[inline(always)] - pub fn is_high(&self) -> bool { - *self == PIN23_A::HIGH - } -} -#[doc = "Pin 23\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PIN23_AW { - #[doc = "1: Write: writing a '1' sets the pin low; writing a '0' has no effect"] - CLEAR = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PIN23_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `PIN23` writer - Pin 23"] -pub type PIN23_W<'a, const O: u8> = crate::BitWriter1C<'a, u32, OUTCLR_SPEC, PIN23_AW, O>; -impl<'a, const O: u8> PIN23_W<'a, O> { - #[doc = "Write: writing a '1' sets the pin low; writing a '0' has no effect"] - #[inline(always)] - pub fn clear(self) -> &'a mut W { - self.variant(PIN23_AW::CLEAR) - } -} -#[doc = "Field `PIN24` reader - Pin 24"] -pub type PIN24_R = crate::BitReader; -#[doc = "Pin 24\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PIN24_A { - #[doc = "0: Read: pin driver is low"] - LOW = 0, - #[doc = "1: Read: pin driver is high"] - HIGH = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PIN24_A) -> Self { - variant as u8 != 0 - } -} -impl PIN24_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> PIN24_A { - match self.bits { - false => PIN24_A::LOW, - true => PIN24_A::HIGH, - } - } - #[doc = "Checks if the value of the field is `LOW`"] - #[inline(always)] - pub fn is_low(&self) -> bool { - *self == PIN24_A::LOW - } - #[doc = "Checks if the value of the field is `HIGH`"] - #[inline(always)] - pub fn is_high(&self) -> bool { - *self == PIN24_A::HIGH - } -} -#[doc = "Pin 24\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PIN24_AW { - #[doc = "1: Write: writing a '1' sets the pin low; writing a '0' has no effect"] - CLEAR = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PIN24_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `PIN24` writer - Pin 24"] -pub type PIN24_W<'a, const O: u8> = crate::BitWriter1C<'a, u32, OUTCLR_SPEC, PIN24_AW, O>; -impl<'a, const O: u8> PIN24_W<'a, O> { - #[doc = "Write: writing a '1' sets the pin low; writing a '0' has no effect"] - #[inline(always)] - pub fn clear(self) -> &'a mut W { - self.variant(PIN24_AW::CLEAR) - } -} -#[doc = "Field `PIN25` reader - Pin 25"] -pub type PIN25_R = crate::BitReader; -#[doc = "Pin 25\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PIN25_A { - #[doc = "0: Read: pin driver is low"] - LOW = 0, - #[doc = "1: Read: pin driver is high"] - HIGH = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PIN25_A) -> Self { - variant as u8 != 0 - } -} -impl PIN25_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> PIN25_A { - match self.bits { - false => PIN25_A::LOW, - true => PIN25_A::HIGH, - } - } - #[doc = "Checks if the value of the field is `LOW`"] - #[inline(always)] - pub fn is_low(&self) -> bool { - *self == PIN25_A::LOW - } - #[doc = "Checks if the value of the field is `HIGH`"] - #[inline(always)] - pub fn is_high(&self) -> bool { - *self == PIN25_A::HIGH - } -} -#[doc = "Pin 25\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PIN25_AW { - #[doc = "1: Write: writing a '1' sets the pin low; writing a '0' has no effect"] - CLEAR = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PIN25_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `PIN25` writer - Pin 25"] -pub type PIN25_W<'a, const O: u8> = crate::BitWriter1C<'a, u32, OUTCLR_SPEC, PIN25_AW, O>; -impl<'a, const O: u8> PIN25_W<'a, O> { - #[doc = "Write: writing a '1' sets the pin low; writing a '0' has no effect"] - #[inline(always)] - pub fn clear(self) -> &'a mut W { - self.variant(PIN25_AW::CLEAR) - } -} -#[doc = "Field `PIN26` reader - Pin 26"] -pub type PIN26_R = crate::BitReader; -#[doc = "Pin 26\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PIN26_A { - #[doc = "0: Read: pin driver is low"] - LOW = 0, - #[doc = "1: Read: pin driver is high"] - HIGH = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PIN26_A) -> Self { - variant as u8 != 0 - } -} -impl PIN26_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> PIN26_A { - match self.bits { - false => PIN26_A::LOW, - true => PIN26_A::HIGH, - } - } - #[doc = "Checks if the value of the field is `LOW`"] - #[inline(always)] - pub fn is_low(&self) -> bool { - *self == PIN26_A::LOW - } - #[doc = "Checks if the value of the field is `HIGH`"] - #[inline(always)] - pub fn is_high(&self) -> bool { - *self == PIN26_A::HIGH - } -} -#[doc = "Pin 26\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PIN26_AW { - #[doc = "1: Write: writing a '1' sets the pin low; writing a '0' has no effect"] - CLEAR = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PIN26_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `PIN26` writer - Pin 26"] -pub type PIN26_W<'a, const O: u8> = crate::BitWriter1C<'a, u32, OUTCLR_SPEC, PIN26_AW, O>; -impl<'a, const O: u8> PIN26_W<'a, O> { - #[doc = "Write: writing a '1' sets the pin low; writing a '0' has no effect"] - #[inline(always)] - pub fn clear(self) -> &'a mut W { - self.variant(PIN26_AW::CLEAR) - } -} -#[doc = "Field `PIN27` reader - Pin 27"] -pub type PIN27_R = crate::BitReader; -#[doc = "Pin 27\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PIN27_A { - #[doc = "0: Read: pin driver is low"] - LOW = 0, - #[doc = "1: Read: pin driver is high"] - HIGH = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PIN27_A) -> Self { - variant as u8 != 0 - } -} -impl PIN27_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> PIN27_A { - match self.bits { - false => PIN27_A::LOW, - true => PIN27_A::HIGH, - } - } - #[doc = "Checks if the value of the field is `LOW`"] - #[inline(always)] - pub fn is_low(&self) -> bool { - *self == PIN27_A::LOW - } - #[doc = "Checks if the value of the field is `HIGH`"] - #[inline(always)] - pub fn is_high(&self) -> bool { - *self == PIN27_A::HIGH - } -} -#[doc = "Pin 27\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PIN27_AW { - #[doc = "1: Write: writing a '1' sets the pin low; writing a '0' has no effect"] - CLEAR = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PIN27_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `PIN27` writer - Pin 27"] -pub type PIN27_W<'a, const O: u8> = crate::BitWriter1C<'a, u32, OUTCLR_SPEC, PIN27_AW, O>; -impl<'a, const O: u8> PIN27_W<'a, O> { - #[doc = "Write: writing a '1' sets the pin low; writing a '0' has no effect"] - #[inline(always)] - pub fn clear(self) -> &'a mut W { - self.variant(PIN27_AW::CLEAR) - } -} -#[doc = "Field `PIN28` reader - Pin 28"] -pub type PIN28_R = crate::BitReader; -#[doc = "Pin 28\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PIN28_A { - #[doc = "0: Read: pin driver is low"] - LOW = 0, - #[doc = "1: Read: pin driver is high"] - HIGH = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PIN28_A) -> Self { - variant as u8 != 0 - } -} -impl PIN28_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> PIN28_A { - match self.bits { - false => PIN28_A::LOW, - true => PIN28_A::HIGH, - } - } - #[doc = "Checks if the value of the field is `LOW`"] - #[inline(always)] - pub fn is_low(&self) -> bool { - *self == PIN28_A::LOW - } - #[doc = "Checks if the value of the field is `HIGH`"] - #[inline(always)] - pub fn is_high(&self) -> bool { - *self == PIN28_A::HIGH - } -} -#[doc = "Pin 28\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PIN28_AW { - #[doc = "1: Write: writing a '1' sets the pin low; writing a '0' has no effect"] - CLEAR = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PIN28_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `PIN28` writer - Pin 28"] -pub type PIN28_W<'a, const O: u8> = crate::BitWriter1C<'a, u32, OUTCLR_SPEC, PIN28_AW, O>; -impl<'a, const O: u8> PIN28_W<'a, O> { - #[doc = "Write: writing a '1' sets the pin low; writing a '0' has no effect"] - #[inline(always)] - pub fn clear(self) -> &'a mut W { - self.variant(PIN28_AW::CLEAR) - } -} -#[doc = "Field `PIN29` reader - Pin 29"] -pub type PIN29_R = crate::BitReader; -#[doc = "Pin 29\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PIN29_A { - #[doc = "0: Read: pin driver is low"] - LOW = 0, - #[doc = "1: Read: pin driver is high"] - HIGH = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PIN29_A) -> Self { - variant as u8 != 0 - } -} -impl PIN29_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> PIN29_A { - match self.bits { - false => PIN29_A::LOW, - true => PIN29_A::HIGH, - } - } - #[doc = "Checks if the value of the field is `LOW`"] - #[inline(always)] - pub fn is_low(&self) -> bool { - *self == PIN29_A::LOW - } - #[doc = "Checks if the value of the field is `HIGH`"] - #[inline(always)] - pub fn is_high(&self) -> bool { - *self == PIN29_A::HIGH - } -} -#[doc = "Pin 29\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PIN29_AW { - #[doc = "1: Write: writing a '1' sets the pin low; writing a '0' has no effect"] - CLEAR = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PIN29_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `PIN29` writer - Pin 29"] -pub type PIN29_W<'a, const O: u8> = crate::BitWriter1C<'a, u32, OUTCLR_SPEC, PIN29_AW, O>; -impl<'a, const O: u8> PIN29_W<'a, O> { - #[doc = "Write: writing a '1' sets the pin low; writing a '0' has no effect"] - #[inline(always)] - pub fn clear(self) -> &'a mut W { - self.variant(PIN29_AW::CLEAR) - } -} -#[doc = "Field `PIN30` reader - Pin 30"] -pub type PIN30_R = crate::BitReader; -#[doc = "Pin 30\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PIN30_A { - #[doc = "0: Read: pin driver is low"] - LOW = 0, - #[doc = "1: Read: pin driver is high"] - HIGH = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PIN30_A) -> Self { - variant as u8 != 0 - } -} -impl PIN30_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> PIN30_A { - match self.bits { - false => PIN30_A::LOW, - true => PIN30_A::HIGH, - } - } - #[doc = "Checks if the value of the field is `LOW`"] - #[inline(always)] - pub fn is_low(&self) -> bool { - *self == PIN30_A::LOW - } - #[doc = "Checks if the value of the field is `HIGH`"] - #[inline(always)] - pub fn is_high(&self) -> bool { - *self == PIN30_A::HIGH - } -} -#[doc = "Pin 30\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PIN30_AW { - #[doc = "1: Write: writing a '1' sets the pin low; writing a '0' has no effect"] - CLEAR = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PIN30_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `PIN30` writer - Pin 30"] -pub type PIN30_W<'a, const O: u8> = crate::BitWriter1C<'a, u32, OUTCLR_SPEC, PIN30_AW, O>; -impl<'a, const O: u8> PIN30_W<'a, O> { - #[doc = "Write: writing a '1' sets the pin low; writing a '0' has no effect"] - #[inline(always)] - pub fn clear(self) -> &'a mut W { - self.variant(PIN30_AW::CLEAR) - } -} -#[doc = "Field `PIN31` reader - Pin 31"] -pub type PIN31_R = crate::BitReader; -#[doc = "Pin 31\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PIN31_A { - #[doc = "0: Read: pin driver is low"] - LOW = 0, - #[doc = "1: Read: pin driver is high"] - HIGH = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PIN31_A) -> Self { - variant as u8 != 0 - } -} -impl PIN31_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> PIN31_A { - match self.bits { - false => PIN31_A::LOW, - true => PIN31_A::HIGH, - } - } - #[doc = "Checks if the value of the field is `LOW`"] - #[inline(always)] - pub fn is_low(&self) -> bool { - *self == PIN31_A::LOW - } - #[doc = "Checks if the value of the field is `HIGH`"] - #[inline(always)] - pub fn is_high(&self) -> bool { - *self == PIN31_A::HIGH - } -} -#[doc = "Pin 31\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PIN31_AW { - #[doc = "1: Write: writing a '1' sets the pin low; writing a '0' has no effect"] - CLEAR = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PIN31_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `PIN31` writer - Pin 31"] -pub type PIN31_W<'a, const O: u8> = crate::BitWriter1C<'a, u32, OUTCLR_SPEC, PIN31_AW, O>; -impl<'a, const O: u8> PIN31_W<'a, O> { - #[doc = "Write: writing a '1' sets the pin low; writing a '0' has no effect"] - #[inline(always)] - pub fn clear(self) -> &'a mut W { - self.variant(PIN31_AW::CLEAR) - } -} -impl R { - #[doc = "Bit 0 - Pin 0"] - #[inline(always)] - pub fn pin0(&self) -> PIN0_R { - PIN0_R::new((self.bits & 1) != 0) - } - #[doc = "Bit 1 - Pin 1"] - #[inline(always)] - pub fn pin1(&self) -> PIN1_R { - PIN1_R::new(((self.bits >> 1) & 1) != 0) - } - #[doc = "Bit 2 - Pin 2"] - #[inline(always)] - pub fn pin2(&self) -> PIN2_R { - PIN2_R::new(((self.bits >> 2) & 1) != 0) - } - #[doc = "Bit 3 - Pin 3"] - #[inline(always)] - pub fn pin3(&self) -> PIN3_R { - PIN3_R::new(((self.bits >> 3) & 1) != 0) - } - #[doc = "Bit 4 - Pin 4"] - #[inline(always)] - pub fn pin4(&self) -> PIN4_R { - PIN4_R::new(((self.bits >> 4) & 1) != 0) - } - #[doc = "Bit 5 - Pin 5"] - #[inline(always)] - pub fn pin5(&self) -> PIN5_R { - PIN5_R::new(((self.bits >> 5) & 1) != 0) - } - #[doc = "Bit 6 - Pin 6"] - #[inline(always)] - pub fn pin6(&self) -> PIN6_R { - PIN6_R::new(((self.bits >> 6) & 1) != 0) - } - #[doc = "Bit 7 - Pin 7"] - #[inline(always)] - pub fn pin7(&self) -> PIN7_R { - PIN7_R::new(((self.bits >> 7) & 1) != 0) - } - #[doc = "Bit 8 - Pin 8"] - #[inline(always)] - pub fn pin8(&self) -> PIN8_R { - PIN8_R::new(((self.bits >> 8) & 1) != 0) - } - #[doc = "Bit 9 - Pin 9"] - #[inline(always)] - pub fn pin9(&self) -> PIN9_R { - PIN9_R::new(((self.bits >> 9) & 1) != 0) - } - #[doc = "Bit 10 - Pin 10"] - #[inline(always)] - pub fn pin10(&self) -> PIN10_R { - PIN10_R::new(((self.bits >> 10) & 1) != 0) - } - #[doc = "Bit 11 - Pin 11"] - #[inline(always)] - pub fn pin11(&self) -> PIN11_R { - PIN11_R::new(((self.bits >> 11) & 1) != 0) - } - #[doc = "Bit 12 - Pin 12"] - #[inline(always)] - pub fn pin12(&self) -> PIN12_R { - PIN12_R::new(((self.bits >> 12) & 1) != 0) - } - #[doc = "Bit 13 - Pin 13"] - #[inline(always)] - pub fn pin13(&self) -> PIN13_R { - PIN13_R::new(((self.bits >> 13) & 1) != 0) - } - #[doc = "Bit 14 - Pin 14"] - #[inline(always)] - pub fn pin14(&self) -> PIN14_R { - PIN14_R::new(((self.bits >> 14) & 1) != 0) - } - #[doc = "Bit 15 - Pin 15"] - #[inline(always)] - pub fn pin15(&self) -> PIN15_R { - PIN15_R::new(((self.bits >> 15) & 1) != 0) - } - #[doc = "Bit 16 - Pin 16"] - #[inline(always)] - pub fn pin16(&self) -> PIN16_R { - PIN16_R::new(((self.bits >> 16) & 1) != 0) - } - #[doc = "Bit 17 - Pin 17"] - #[inline(always)] - pub fn pin17(&self) -> PIN17_R { - PIN17_R::new(((self.bits >> 17) & 1) != 0) - } - #[doc = "Bit 18 - Pin 18"] - #[inline(always)] - pub fn pin18(&self) -> PIN18_R { - PIN18_R::new(((self.bits >> 18) & 1) != 0) - } - #[doc = "Bit 19 - Pin 19"] - #[inline(always)] - pub fn pin19(&self) -> PIN19_R { - PIN19_R::new(((self.bits >> 19) & 1) != 0) - } - #[doc = "Bit 20 - Pin 20"] - #[inline(always)] - pub fn pin20(&self) -> PIN20_R { - PIN20_R::new(((self.bits >> 20) & 1) != 0) - } - #[doc = "Bit 21 - Pin 21"] - #[inline(always)] - pub fn pin21(&self) -> PIN21_R { - PIN21_R::new(((self.bits >> 21) & 1) != 0) - } - #[doc = "Bit 22 - Pin 22"] - #[inline(always)] - pub fn pin22(&self) -> PIN22_R { - PIN22_R::new(((self.bits >> 22) & 1) != 0) - } - #[doc = "Bit 23 - Pin 23"] - #[inline(always)] - pub fn pin23(&self) -> PIN23_R { - PIN23_R::new(((self.bits >> 23) & 1) != 0) - } - #[doc = "Bit 24 - Pin 24"] - #[inline(always)] - pub fn pin24(&self) -> PIN24_R { - PIN24_R::new(((self.bits >> 24) & 1) != 0) - } - #[doc = "Bit 25 - Pin 25"] - #[inline(always)] - pub fn pin25(&self) -> PIN25_R { - PIN25_R::new(((self.bits >> 25) & 1) != 0) - } - #[doc = "Bit 26 - Pin 26"] - #[inline(always)] - pub fn pin26(&self) -> PIN26_R { - PIN26_R::new(((self.bits >> 26) & 1) != 0) - } - #[doc = "Bit 27 - Pin 27"] - #[inline(always)] - pub fn pin27(&self) -> PIN27_R { - PIN27_R::new(((self.bits >> 27) & 1) != 0) - } - #[doc = "Bit 28 - Pin 28"] - #[inline(always)] - pub fn pin28(&self) -> PIN28_R { - PIN28_R::new(((self.bits >> 28) & 1) != 0) - } - #[doc = "Bit 29 - Pin 29"] - #[inline(always)] - pub fn pin29(&self) -> PIN29_R { - PIN29_R::new(((self.bits >> 29) & 1) != 0) - } - #[doc = "Bit 30 - Pin 30"] - #[inline(always)] - pub fn pin30(&self) -> PIN30_R { - PIN30_R::new(((self.bits >> 30) & 1) != 0) - } - #[doc = "Bit 31 - Pin 31"] - #[inline(always)] - pub fn pin31(&self) -> PIN31_R { - PIN31_R::new(((self.bits >> 31) & 1) != 0) - } -} -impl W { - #[doc = "Bit 0 - Pin 0"] - #[inline(always)] - #[must_use] - pub fn pin0(&mut self) -> PIN0_W<0> { - PIN0_W::new(self) - } - #[doc = "Bit 1 - Pin 1"] - #[inline(always)] - #[must_use] - pub fn pin1(&mut self) -> PIN1_W<1> { - PIN1_W::new(self) - } - #[doc = "Bit 2 - Pin 2"] - #[inline(always)] - #[must_use] - pub fn pin2(&mut self) -> PIN2_W<2> { - PIN2_W::new(self) - } - #[doc = "Bit 3 - Pin 3"] - #[inline(always)] - #[must_use] - pub fn pin3(&mut self) -> PIN3_W<3> { - PIN3_W::new(self) - } - #[doc = "Bit 4 - Pin 4"] - #[inline(always)] - #[must_use] - pub fn pin4(&mut self) -> PIN4_W<4> { - PIN4_W::new(self) - } - #[doc = "Bit 5 - Pin 5"] - #[inline(always)] - #[must_use] - pub fn pin5(&mut self) -> PIN5_W<5> { - PIN5_W::new(self) - } - #[doc = "Bit 6 - Pin 6"] - #[inline(always)] - #[must_use] - pub fn pin6(&mut self) -> PIN6_W<6> { - PIN6_W::new(self) - } - #[doc = "Bit 7 - Pin 7"] - #[inline(always)] - #[must_use] - pub fn pin7(&mut self) -> PIN7_W<7> { - PIN7_W::new(self) - } - #[doc = "Bit 8 - Pin 8"] - #[inline(always)] - #[must_use] - pub fn pin8(&mut self) -> PIN8_W<8> { - PIN8_W::new(self) - } - #[doc = "Bit 9 - Pin 9"] - #[inline(always)] - #[must_use] - pub fn pin9(&mut self) -> PIN9_W<9> { - PIN9_W::new(self) - } - #[doc = "Bit 10 - Pin 10"] - #[inline(always)] - #[must_use] - pub fn pin10(&mut self) -> PIN10_W<10> { - PIN10_W::new(self) - } - #[doc = "Bit 11 - Pin 11"] - #[inline(always)] - #[must_use] - pub fn pin11(&mut self) -> PIN11_W<11> { - PIN11_W::new(self) - } - #[doc = "Bit 12 - Pin 12"] - #[inline(always)] - #[must_use] - pub fn pin12(&mut self) -> PIN12_W<12> { - PIN12_W::new(self) - } - #[doc = "Bit 13 - Pin 13"] - #[inline(always)] - #[must_use] - pub fn pin13(&mut self) -> PIN13_W<13> { - PIN13_W::new(self) - } - #[doc = "Bit 14 - Pin 14"] - #[inline(always)] - #[must_use] - pub fn pin14(&mut self) -> PIN14_W<14> { - PIN14_W::new(self) - } - #[doc = "Bit 15 - Pin 15"] - #[inline(always)] - #[must_use] - pub fn pin15(&mut self) -> PIN15_W<15> { - PIN15_W::new(self) - } - #[doc = "Bit 16 - Pin 16"] - #[inline(always)] - #[must_use] - pub fn pin16(&mut self) -> PIN16_W<16> { - PIN16_W::new(self) - } - #[doc = "Bit 17 - Pin 17"] - #[inline(always)] - #[must_use] - pub fn pin17(&mut self) -> PIN17_W<17> { - PIN17_W::new(self) - } - #[doc = "Bit 18 - Pin 18"] - #[inline(always)] - #[must_use] - pub fn pin18(&mut self) -> PIN18_W<18> { - PIN18_W::new(self) - } - #[doc = "Bit 19 - Pin 19"] - #[inline(always)] - #[must_use] - pub fn pin19(&mut self) -> PIN19_W<19> { - PIN19_W::new(self) - } - #[doc = "Bit 20 - Pin 20"] - #[inline(always)] - #[must_use] - pub fn pin20(&mut self) -> PIN20_W<20> { - PIN20_W::new(self) - } - #[doc = "Bit 21 - Pin 21"] - #[inline(always)] - #[must_use] - pub fn pin21(&mut self) -> PIN21_W<21> { - PIN21_W::new(self) - } - #[doc = "Bit 22 - Pin 22"] - #[inline(always)] - #[must_use] - pub fn pin22(&mut self) -> PIN22_W<22> { - PIN22_W::new(self) - } - #[doc = "Bit 23 - Pin 23"] - #[inline(always)] - #[must_use] - pub fn pin23(&mut self) -> PIN23_W<23> { - PIN23_W::new(self) - } - #[doc = "Bit 24 - Pin 24"] - #[inline(always)] - #[must_use] - pub fn pin24(&mut self) -> PIN24_W<24> { - PIN24_W::new(self) - } - #[doc = "Bit 25 - Pin 25"] - #[inline(always)] - #[must_use] - pub fn pin25(&mut self) -> PIN25_W<25> { - PIN25_W::new(self) - } - #[doc = "Bit 26 - Pin 26"] - #[inline(always)] - #[must_use] - pub fn pin26(&mut self) -> PIN26_W<26> { - PIN26_W::new(self) - } - #[doc = "Bit 27 - Pin 27"] - #[inline(always)] - #[must_use] - pub fn pin27(&mut self) -> PIN27_W<27> { - PIN27_W::new(self) - } - #[doc = "Bit 28 - Pin 28"] - #[inline(always)] - #[must_use] - pub fn pin28(&mut self) -> PIN28_W<28> { - PIN28_W::new(self) - } - #[doc = "Bit 29 - Pin 29"] - #[inline(always)] - #[must_use] - pub fn pin29(&mut self) -> PIN29_W<29> { - PIN29_W::new(self) - } - #[doc = "Bit 30 - Pin 30"] - #[inline(always)] - #[must_use] - pub fn pin30(&mut self) -> PIN30_W<30> { - PIN30_W::new(self) - } - #[doc = "Bit 31 - Pin 31"] - #[inline(always)] - #[must_use] - pub fn pin31(&mut self) -> PIN31_W<31> { - PIN31_W::new(self) - } - #[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 = "Clear individual bits in GPIO port\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 [outclr](index.html) module"] -pub struct OUTCLR_SPEC; -impl crate::RegisterSpec for OUTCLR_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [outclr::R](R) reader structure"] -impl crate::Readable for OUTCLR_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [outclr::W](W) writer structure"] -impl crate::Writable for OUTCLR_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0xffff_ffff; -} -#[doc = "`reset()` method sets OUTCLR to value 0"] -impl crate::Resettable for OUTCLR_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/p0/outset.rs b/down-the-stack/dk_pac/src/p0/outset.rs deleted file mode 100644 index a6cc1b6..0000000 --- a/down-the-stack/dk_pac/src/p0/outset.rs +++ /dev/null @@ -1,2241 +0,0 @@ -#[doc = "Register `OUTSET` 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 `OUTSET` 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 `PIN0` reader - Pin 0"] -pub type PIN0_R = crate::BitReader; -#[doc = "Pin 0\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PIN0_A { - #[doc = "0: Read: pin driver is low"] - LOW = 0, - #[doc = "1: Read: pin driver is high"] - HIGH = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PIN0_A) -> Self { - variant as u8 != 0 - } -} -impl PIN0_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> PIN0_A { - match self.bits { - false => PIN0_A::LOW, - true => PIN0_A::HIGH, - } - } - #[doc = "Checks if the value of the field is `LOW`"] - #[inline(always)] - pub fn is_low(&self) -> bool { - *self == PIN0_A::LOW - } - #[doc = "Checks if the value of the field is `HIGH`"] - #[inline(always)] - pub fn is_high(&self) -> bool { - *self == PIN0_A::HIGH - } -} -#[doc = "Pin 0\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PIN0_AW { - #[doc = "1: Write: writing a '1' sets the pin high; writing a '0' has no effect"] - SET = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PIN0_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `PIN0` writer - Pin 0"] -pub type PIN0_W<'a, const O: u8> = crate::BitWriter1S<'a, u32, OUTSET_SPEC, PIN0_AW, O>; -impl<'a, const O: u8> PIN0_W<'a, O> { - #[doc = "Write: writing a '1' sets the pin high; writing a '0' has no effect"] - #[inline(always)] - pub fn set(self) -> &'a mut W { - self.variant(PIN0_AW::SET) - } -} -#[doc = "Field `PIN1` reader - Pin 1"] -pub type PIN1_R = crate::BitReader; -#[doc = "Pin 1\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PIN1_A { - #[doc = "0: Read: pin driver is low"] - LOW = 0, - #[doc = "1: Read: pin driver is high"] - HIGH = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PIN1_A) -> Self { - variant as u8 != 0 - } -} -impl PIN1_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> PIN1_A { - match self.bits { - false => PIN1_A::LOW, - true => PIN1_A::HIGH, - } - } - #[doc = "Checks if the value of the field is `LOW`"] - #[inline(always)] - pub fn is_low(&self) -> bool { - *self == PIN1_A::LOW - } - #[doc = "Checks if the value of the field is `HIGH`"] - #[inline(always)] - pub fn is_high(&self) -> bool { - *self == PIN1_A::HIGH - } -} -#[doc = "Pin 1\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PIN1_AW { - #[doc = "1: Write: writing a '1' sets the pin high; writing a '0' has no effect"] - SET = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PIN1_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `PIN1` writer - Pin 1"] -pub type PIN1_W<'a, const O: u8> = crate::BitWriter1S<'a, u32, OUTSET_SPEC, PIN1_AW, O>; -impl<'a, const O: u8> PIN1_W<'a, O> { - #[doc = "Write: writing a '1' sets the pin high; writing a '0' has no effect"] - #[inline(always)] - pub fn set(self) -> &'a mut W { - self.variant(PIN1_AW::SET) - } -} -#[doc = "Field `PIN2` reader - Pin 2"] -pub type PIN2_R = crate::BitReader; -#[doc = "Pin 2\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PIN2_A { - #[doc = "0: Read: pin driver is low"] - LOW = 0, - #[doc = "1: Read: pin driver is high"] - HIGH = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PIN2_A) -> Self { - variant as u8 != 0 - } -} -impl PIN2_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> PIN2_A { - match self.bits { - false => PIN2_A::LOW, - true => PIN2_A::HIGH, - } - } - #[doc = "Checks if the value of the field is `LOW`"] - #[inline(always)] - pub fn is_low(&self) -> bool { - *self == PIN2_A::LOW - } - #[doc = "Checks if the value of the field is `HIGH`"] - #[inline(always)] - pub fn is_high(&self) -> bool { - *self == PIN2_A::HIGH - } -} -#[doc = "Pin 2\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PIN2_AW { - #[doc = "1: Write: writing a '1' sets the pin high; writing a '0' has no effect"] - SET = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PIN2_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `PIN2` writer - Pin 2"] -pub type PIN2_W<'a, const O: u8> = crate::BitWriter1S<'a, u32, OUTSET_SPEC, PIN2_AW, O>; -impl<'a, const O: u8> PIN2_W<'a, O> { - #[doc = "Write: writing a '1' sets the pin high; writing a '0' has no effect"] - #[inline(always)] - pub fn set(self) -> &'a mut W { - self.variant(PIN2_AW::SET) - } -} -#[doc = "Field `PIN3` reader - Pin 3"] -pub type PIN3_R = crate::BitReader; -#[doc = "Pin 3\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PIN3_A { - #[doc = "0: Read: pin driver is low"] - LOW = 0, - #[doc = "1: Read: pin driver is high"] - HIGH = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PIN3_A) -> Self { - variant as u8 != 0 - } -} -impl PIN3_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> PIN3_A { - match self.bits { - false => PIN3_A::LOW, - true => PIN3_A::HIGH, - } - } - #[doc = "Checks if the value of the field is `LOW`"] - #[inline(always)] - pub fn is_low(&self) -> bool { - *self == PIN3_A::LOW - } - #[doc = "Checks if the value of the field is `HIGH`"] - #[inline(always)] - pub fn is_high(&self) -> bool { - *self == PIN3_A::HIGH - } -} -#[doc = "Pin 3\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PIN3_AW { - #[doc = "1: Write: writing a '1' sets the pin high; writing a '0' has no effect"] - SET = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PIN3_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `PIN3` writer - Pin 3"] -pub type PIN3_W<'a, const O: u8> = crate::BitWriter1S<'a, u32, OUTSET_SPEC, PIN3_AW, O>; -impl<'a, const O: u8> PIN3_W<'a, O> { - #[doc = "Write: writing a '1' sets the pin high; writing a '0' has no effect"] - #[inline(always)] - pub fn set(self) -> &'a mut W { - self.variant(PIN3_AW::SET) - } -} -#[doc = "Field `PIN4` reader - Pin 4"] -pub type PIN4_R = crate::BitReader; -#[doc = "Pin 4\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PIN4_A { - #[doc = "0: Read: pin driver is low"] - LOW = 0, - #[doc = "1: Read: pin driver is high"] - HIGH = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PIN4_A) -> Self { - variant as u8 != 0 - } -} -impl PIN4_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> PIN4_A { - match self.bits { - false => PIN4_A::LOW, - true => PIN4_A::HIGH, - } - } - #[doc = "Checks if the value of the field is `LOW`"] - #[inline(always)] - pub fn is_low(&self) -> bool { - *self == PIN4_A::LOW - } - #[doc = "Checks if the value of the field is `HIGH`"] - #[inline(always)] - pub fn is_high(&self) -> bool { - *self == PIN4_A::HIGH - } -} -#[doc = "Pin 4\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PIN4_AW { - #[doc = "1: Write: writing a '1' sets the pin high; writing a '0' has no effect"] - SET = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PIN4_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `PIN4` writer - Pin 4"] -pub type PIN4_W<'a, const O: u8> = crate::BitWriter1S<'a, u32, OUTSET_SPEC, PIN4_AW, O>; -impl<'a, const O: u8> PIN4_W<'a, O> { - #[doc = "Write: writing a '1' sets the pin high; writing a '0' has no effect"] - #[inline(always)] - pub fn set(self) -> &'a mut W { - self.variant(PIN4_AW::SET) - } -} -#[doc = "Field `PIN5` reader - Pin 5"] -pub type PIN5_R = crate::BitReader; -#[doc = "Pin 5\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PIN5_A { - #[doc = "0: Read: pin driver is low"] - LOW = 0, - #[doc = "1: Read: pin driver is high"] - HIGH = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PIN5_A) -> Self { - variant as u8 != 0 - } -} -impl PIN5_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> PIN5_A { - match self.bits { - false => PIN5_A::LOW, - true => PIN5_A::HIGH, - } - } - #[doc = "Checks if the value of the field is `LOW`"] - #[inline(always)] - pub fn is_low(&self) -> bool { - *self == PIN5_A::LOW - } - #[doc = "Checks if the value of the field is `HIGH`"] - #[inline(always)] - pub fn is_high(&self) -> bool { - *self == PIN5_A::HIGH - } -} -#[doc = "Pin 5\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PIN5_AW { - #[doc = "1: Write: writing a '1' sets the pin high; writing a '0' has no effect"] - SET = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PIN5_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `PIN5` writer - Pin 5"] -pub type PIN5_W<'a, const O: u8> = crate::BitWriter1S<'a, u32, OUTSET_SPEC, PIN5_AW, O>; -impl<'a, const O: u8> PIN5_W<'a, O> { - #[doc = "Write: writing a '1' sets the pin high; writing a '0' has no effect"] - #[inline(always)] - pub fn set(self) -> &'a mut W { - self.variant(PIN5_AW::SET) - } -} -#[doc = "Field `PIN6` reader - Pin 6"] -pub type PIN6_R = crate::BitReader; -#[doc = "Pin 6\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PIN6_A { - #[doc = "0: Read: pin driver is low"] - LOW = 0, - #[doc = "1: Read: pin driver is high"] - HIGH = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PIN6_A) -> Self { - variant as u8 != 0 - } -} -impl PIN6_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> PIN6_A { - match self.bits { - false => PIN6_A::LOW, - true => PIN6_A::HIGH, - } - } - #[doc = "Checks if the value of the field is `LOW`"] - #[inline(always)] - pub fn is_low(&self) -> bool { - *self == PIN6_A::LOW - } - #[doc = "Checks if the value of the field is `HIGH`"] - #[inline(always)] - pub fn is_high(&self) -> bool { - *self == PIN6_A::HIGH - } -} -#[doc = "Pin 6\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PIN6_AW { - #[doc = "1: Write: writing a '1' sets the pin high; writing a '0' has no effect"] - SET = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PIN6_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `PIN6` writer - Pin 6"] -pub type PIN6_W<'a, const O: u8> = crate::BitWriter1S<'a, u32, OUTSET_SPEC, PIN6_AW, O>; -impl<'a, const O: u8> PIN6_W<'a, O> { - #[doc = "Write: writing a '1' sets the pin high; writing a '0' has no effect"] - #[inline(always)] - pub fn set(self) -> &'a mut W { - self.variant(PIN6_AW::SET) - } -} -#[doc = "Field `PIN7` reader - Pin 7"] -pub type PIN7_R = crate::BitReader; -#[doc = "Pin 7\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PIN7_A { - #[doc = "0: Read: pin driver is low"] - LOW = 0, - #[doc = "1: Read: pin driver is high"] - HIGH = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PIN7_A) -> Self { - variant as u8 != 0 - } -} -impl PIN7_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> PIN7_A { - match self.bits { - false => PIN7_A::LOW, - true => PIN7_A::HIGH, - } - } - #[doc = "Checks if the value of the field is `LOW`"] - #[inline(always)] - pub fn is_low(&self) -> bool { - *self == PIN7_A::LOW - } - #[doc = "Checks if the value of the field is `HIGH`"] - #[inline(always)] - pub fn is_high(&self) -> bool { - *self == PIN7_A::HIGH - } -} -#[doc = "Pin 7\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PIN7_AW { - #[doc = "1: Write: writing a '1' sets the pin high; writing a '0' has no effect"] - SET = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PIN7_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `PIN7` writer - Pin 7"] -pub type PIN7_W<'a, const O: u8> = crate::BitWriter1S<'a, u32, OUTSET_SPEC, PIN7_AW, O>; -impl<'a, const O: u8> PIN7_W<'a, O> { - #[doc = "Write: writing a '1' sets the pin high; writing a '0' has no effect"] - #[inline(always)] - pub fn set(self) -> &'a mut W { - self.variant(PIN7_AW::SET) - } -} -#[doc = "Field `PIN8` reader - Pin 8"] -pub type PIN8_R = crate::BitReader; -#[doc = "Pin 8\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PIN8_A { - #[doc = "0: Read: pin driver is low"] - LOW = 0, - #[doc = "1: Read: pin driver is high"] - HIGH = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PIN8_A) -> Self { - variant as u8 != 0 - } -} -impl PIN8_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> PIN8_A { - match self.bits { - false => PIN8_A::LOW, - true => PIN8_A::HIGH, - } - } - #[doc = "Checks if the value of the field is `LOW`"] - #[inline(always)] - pub fn is_low(&self) -> bool { - *self == PIN8_A::LOW - } - #[doc = "Checks if the value of the field is `HIGH`"] - #[inline(always)] - pub fn is_high(&self) -> bool { - *self == PIN8_A::HIGH - } -} -#[doc = "Pin 8\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PIN8_AW { - #[doc = "1: Write: writing a '1' sets the pin high; writing a '0' has no effect"] - SET = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PIN8_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `PIN8` writer - Pin 8"] -pub type PIN8_W<'a, const O: u8> = crate::BitWriter1S<'a, u32, OUTSET_SPEC, PIN8_AW, O>; -impl<'a, const O: u8> PIN8_W<'a, O> { - #[doc = "Write: writing a '1' sets the pin high; writing a '0' has no effect"] - #[inline(always)] - pub fn set(self) -> &'a mut W { - self.variant(PIN8_AW::SET) - } -} -#[doc = "Field `PIN9` reader - Pin 9"] -pub type PIN9_R = crate::BitReader; -#[doc = "Pin 9\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PIN9_A { - #[doc = "0: Read: pin driver is low"] - LOW = 0, - #[doc = "1: Read: pin driver is high"] - HIGH = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PIN9_A) -> Self { - variant as u8 != 0 - } -} -impl PIN9_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> PIN9_A { - match self.bits { - false => PIN9_A::LOW, - true => PIN9_A::HIGH, - } - } - #[doc = "Checks if the value of the field is `LOW`"] - #[inline(always)] - pub fn is_low(&self) -> bool { - *self == PIN9_A::LOW - } - #[doc = "Checks if the value of the field is `HIGH`"] - #[inline(always)] - pub fn is_high(&self) -> bool { - *self == PIN9_A::HIGH - } -} -#[doc = "Pin 9\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PIN9_AW { - #[doc = "1: Write: writing a '1' sets the pin high; writing a '0' has no effect"] - SET = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PIN9_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `PIN9` writer - Pin 9"] -pub type PIN9_W<'a, const O: u8> = crate::BitWriter1S<'a, u32, OUTSET_SPEC, PIN9_AW, O>; -impl<'a, const O: u8> PIN9_W<'a, O> { - #[doc = "Write: writing a '1' sets the pin high; writing a '0' has no effect"] - #[inline(always)] - pub fn set(self) -> &'a mut W { - self.variant(PIN9_AW::SET) - } -} -#[doc = "Field `PIN10` reader - Pin 10"] -pub type PIN10_R = crate::BitReader; -#[doc = "Pin 10\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PIN10_A { - #[doc = "0: Read: pin driver is low"] - LOW = 0, - #[doc = "1: Read: pin driver is high"] - HIGH = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PIN10_A) -> Self { - variant as u8 != 0 - } -} -impl PIN10_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> PIN10_A { - match self.bits { - false => PIN10_A::LOW, - true => PIN10_A::HIGH, - } - } - #[doc = "Checks if the value of the field is `LOW`"] - #[inline(always)] - pub fn is_low(&self) -> bool { - *self == PIN10_A::LOW - } - #[doc = "Checks if the value of the field is `HIGH`"] - #[inline(always)] - pub fn is_high(&self) -> bool { - *self == PIN10_A::HIGH - } -} -#[doc = "Pin 10\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PIN10_AW { - #[doc = "1: Write: writing a '1' sets the pin high; writing a '0' has no effect"] - SET = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PIN10_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `PIN10` writer - Pin 10"] -pub type PIN10_W<'a, const O: u8> = crate::BitWriter1S<'a, u32, OUTSET_SPEC, PIN10_AW, O>; -impl<'a, const O: u8> PIN10_W<'a, O> { - #[doc = "Write: writing a '1' sets the pin high; writing a '0' has no effect"] - #[inline(always)] - pub fn set(self) -> &'a mut W { - self.variant(PIN10_AW::SET) - } -} -#[doc = "Field `PIN11` reader - Pin 11"] -pub type PIN11_R = crate::BitReader; -#[doc = "Pin 11\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PIN11_A { - #[doc = "0: Read: pin driver is low"] - LOW = 0, - #[doc = "1: Read: pin driver is high"] - HIGH = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PIN11_A) -> Self { - variant as u8 != 0 - } -} -impl PIN11_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> PIN11_A { - match self.bits { - false => PIN11_A::LOW, - true => PIN11_A::HIGH, - } - } - #[doc = "Checks if the value of the field is `LOW`"] - #[inline(always)] - pub fn is_low(&self) -> bool { - *self == PIN11_A::LOW - } - #[doc = "Checks if the value of the field is `HIGH`"] - #[inline(always)] - pub fn is_high(&self) -> bool { - *self == PIN11_A::HIGH - } -} -#[doc = "Pin 11\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PIN11_AW { - #[doc = "1: Write: writing a '1' sets the pin high; writing a '0' has no effect"] - SET = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PIN11_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `PIN11` writer - Pin 11"] -pub type PIN11_W<'a, const O: u8> = crate::BitWriter1S<'a, u32, OUTSET_SPEC, PIN11_AW, O>; -impl<'a, const O: u8> PIN11_W<'a, O> { - #[doc = "Write: writing a '1' sets the pin high; writing a '0' has no effect"] - #[inline(always)] - pub fn set(self) -> &'a mut W { - self.variant(PIN11_AW::SET) - } -} -#[doc = "Field `PIN12` reader - Pin 12"] -pub type PIN12_R = crate::BitReader; -#[doc = "Pin 12\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PIN12_A { - #[doc = "0: Read: pin driver is low"] - LOW = 0, - #[doc = "1: Read: pin driver is high"] - HIGH = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PIN12_A) -> Self { - variant as u8 != 0 - } -} -impl PIN12_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> PIN12_A { - match self.bits { - false => PIN12_A::LOW, - true => PIN12_A::HIGH, - } - } - #[doc = "Checks if the value of the field is `LOW`"] - #[inline(always)] - pub fn is_low(&self) -> bool { - *self == PIN12_A::LOW - } - #[doc = "Checks if the value of the field is `HIGH`"] - #[inline(always)] - pub fn is_high(&self) -> bool { - *self == PIN12_A::HIGH - } -} -#[doc = "Pin 12\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PIN12_AW { - #[doc = "1: Write: writing a '1' sets the pin high; writing a '0' has no effect"] - SET = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PIN12_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `PIN12` writer - Pin 12"] -pub type PIN12_W<'a, const O: u8> = crate::BitWriter1S<'a, u32, OUTSET_SPEC, PIN12_AW, O>; -impl<'a, const O: u8> PIN12_W<'a, O> { - #[doc = "Write: writing a '1' sets the pin high; writing a '0' has no effect"] - #[inline(always)] - pub fn set(self) -> &'a mut W { - self.variant(PIN12_AW::SET) - } -} -#[doc = "Field `PIN13` reader - Pin 13"] -pub type PIN13_R = crate::BitReader; -#[doc = "Pin 13\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PIN13_A { - #[doc = "0: Read: pin driver is low"] - LOW = 0, - #[doc = "1: Read: pin driver is high"] - HIGH = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PIN13_A) -> Self { - variant as u8 != 0 - } -} -impl PIN13_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> PIN13_A { - match self.bits { - false => PIN13_A::LOW, - true => PIN13_A::HIGH, - } - } - #[doc = "Checks if the value of the field is `LOW`"] - #[inline(always)] - pub fn is_low(&self) -> bool { - *self == PIN13_A::LOW - } - #[doc = "Checks if the value of the field is `HIGH`"] - #[inline(always)] - pub fn is_high(&self) -> bool { - *self == PIN13_A::HIGH - } -} -#[doc = "Pin 13\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PIN13_AW { - #[doc = "1: Write: writing a '1' sets the pin high; writing a '0' has no effect"] - SET = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PIN13_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `PIN13` writer - Pin 13"] -pub type PIN13_W<'a, const O: u8> = crate::BitWriter1S<'a, u32, OUTSET_SPEC, PIN13_AW, O>; -impl<'a, const O: u8> PIN13_W<'a, O> { - #[doc = "Write: writing a '1' sets the pin high; writing a '0' has no effect"] - #[inline(always)] - pub fn set(self) -> &'a mut W { - self.variant(PIN13_AW::SET) - } -} -#[doc = "Field `PIN14` reader - Pin 14"] -pub type PIN14_R = crate::BitReader; -#[doc = "Pin 14\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PIN14_A { - #[doc = "0: Read: pin driver is low"] - LOW = 0, - #[doc = "1: Read: pin driver is high"] - HIGH = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PIN14_A) -> Self { - variant as u8 != 0 - } -} -impl PIN14_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> PIN14_A { - match self.bits { - false => PIN14_A::LOW, - true => PIN14_A::HIGH, - } - } - #[doc = "Checks if the value of the field is `LOW`"] - #[inline(always)] - pub fn is_low(&self) -> bool { - *self == PIN14_A::LOW - } - #[doc = "Checks if the value of the field is `HIGH`"] - #[inline(always)] - pub fn is_high(&self) -> bool { - *self == PIN14_A::HIGH - } -} -#[doc = "Pin 14\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PIN14_AW { - #[doc = "1: Write: writing a '1' sets the pin high; writing a '0' has no effect"] - SET = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PIN14_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `PIN14` writer - Pin 14"] -pub type PIN14_W<'a, const O: u8> = crate::BitWriter1S<'a, u32, OUTSET_SPEC, PIN14_AW, O>; -impl<'a, const O: u8> PIN14_W<'a, O> { - #[doc = "Write: writing a '1' sets the pin high; writing a '0' has no effect"] - #[inline(always)] - pub fn set(self) -> &'a mut W { - self.variant(PIN14_AW::SET) - } -} -#[doc = "Field `PIN15` reader - Pin 15"] -pub type PIN15_R = crate::BitReader; -#[doc = "Pin 15\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PIN15_A { - #[doc = "0: Read: pin driver is low"] - LOW = 0, - #[doc = "1: Read: pin driver is high"] - HIGH = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PIN15_A) -> Self { - variant as u8 != 0 - } -} -impl PIN15_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> PIN15_A { - match self.bits { - false => PIN15_A::LOW, - true => PIN15_A::HIGH, - } - } - #[doc = "Checks if the value of the field is `LOW`"] - #[inline(always)] - pub fn is_low(&self) -> bool { - *self == PIN15_A::LOW - } - #[doc = "Checks if the value of the field is `HIGH`"] - #[inline(always)] - pub fn is_high(&self) -> bool { - *self == PIN15_A::HIGH - } -} -#[doc = "Pin 15\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PIN15_AW { - #[doc = "1: Write: writing a '1' sets the pin high; writing a '0' has no effect"] - SET = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PIN15_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `PIN15` writer - Pin 15"] -pub type PIN15_W<'a, const O: u8> = crate::BitWriter1S<'a, u32, OUTSET_SPEC, PIN15_AW, O>; -impl<'a, const O: u8> PIN15_W<'a, O> { - #[doc = "Write: writing a '1' sets the pin high; writing a '0' has no effect"] - #[inline(always)] - pub fn set(self) -> &'a mut W { - self.variant(PIN15_AW::SET) - } -} -#[doc = "Field `PIN16` reader - Pin 16"] -pub type PIN16_R = crate::BitReader; -#[doc = "Pin 16\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PIN16_A { - #[doc = "0: Read: pin driver is low"] - LOW = 0, - #[doc = "1: Read: pin driver is high"] - HIGH = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PIN16_A) -> Self { - variant as u8 != 0 - } -} -impl PIN16_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> PIN16_A { - match self.bits { - false => PIN16_A::LOW, - true => PIN16_A::HIGH, - } - } - #[doc = "Checks if the value of the field is `LOW`"] - #[inline(always)] - pub fn is_low(&self) -> bool { - *self == PIN16_A::LOW - } - #[doc = "Checks if the value of the field is `HIGH`"] - #[inline(always)] - pub fn is_high(&self) -> bool { - *self == PIN16_A::HIGH - } -} -#[doc = "Pin 16\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PIN16_AW { - #[doc = "1: Write: writing a '1' sets the pin high; writing a '0' has no effect"] - SET = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PIN16_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `PIN16` writer - Pin 16"] -pub type PIN16_W<'a, const O: u8> = crate::BitWriter1S<'a, u32, OUTSET_SPEC, PIN16_AW, O>; -impl<'a, const O: u8> PIN16_W<'a, O> { - #[doc = "Write: writing a '1' sets the pin high; writing a '0' has no effect"] - #[inline(always)] - pub fn set(self) -> &'a mut W { - self.variant(PIN16_AW::SET) - } -} -#[doc = "Field `PIN17` reader - Pin 17"] -pub type PIN17_R = crate::BitReader; -#[doc = "Pin 17\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PIN17_A { - #[doc = "0: Read: pin driver is low"] - LOW = 0, - #[doc = "1: Read: pin driver is high"] - HIGH = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PIN17_A) -> Self { - variant as u8 != 0 - } -} -impl PIN17_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> PIN17_A { - match self.bits { - false => PIN17_A::LOW, - true => PIN17_A::HIGH, - } - } - #[doc = "Checks if the value of the field is `LOW`"] - #[inline(always)] - pub fn is_low(&self) -> bool { - *self == PIN17_A::LOW - } - #[doc = "Checks if the value of the field is `HIGH`"] - #[inline(always)] - pub fn is_high(&self) -> bool { - *self == PIN17_A::HIGH - } -} -#[doc = "Pin 17\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PIN17_AW { - #[doc = "1: Write: writing a '1' sets the pin high; writing a '0' has no effect"] - SET = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PIN17_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `PIN17` writer - Pin 17"] -pub type PIN17_W<'a, const O: u8> = crate::BitWriter1S<'a, u32, OUTSET_SPEC, PIN17_AW, O>; -impl<'a, const O: u8> PIN17_W<'a, O> { - #[doc = "Write: writing a '1' sets the pin high; writing a '0' has no effect"] - #[inline(always)] - pub fn set(self) -> &'a mut W { - self.variant(PIN17_AW::SET) - } -} -#[doc = "Field `PIN18` reader - Pin 18"] -pub type PIN18_R = crate::BitReader; -#[doc = "Pin 18\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PIN18_A { - #[doc = "0: Read: pin driver is low"] - LOW = 0, - #[doc = "1: Read: pin driver is high"] - HIGH = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PIN18_A) -> Self { - variant as u8 != 0 - } -} -impl PIN18_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> PIN18_A { - match self.bits { - false => PIN18_A::LOW, - true => PIN18_A::HIGH, - } - } - #[doc = "Checks if the value of the field is `LOW`"] - #[inline(always)] - pub fn is_low(&self) -> bool { - *self == PIN18_A::LOW - } - #[doc = "Checks if the value of the field is `HIGH`"] - #[inline(always)] - pub fn is_high(&self) -> bool { - *self == PIN18_A::HIGH - } -} -#[doc = "Pin 18\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PIN18_AW { - #[doc = "1: Write: writing a '1' sets the pin high; writing a '0' has no effect"] - SET = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PIN18_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `PIN18` writer - Pin 18"] -pub type PIN18_W<'a, const O: u8> = crate::BitWriter1S<'a, u32, OUTSET_SPEC, PIN18_AW, O>; -impl<'a, const O: u8> PIN18_W<'a, O> { - #[doc = "Write: writing a '1' sets the pin high; writing a '0' has no effect"] - #[inline(always)] - pub fn set(self) -> &'a mut W { - self.variant(PIN18_AW::SET) - } -} -#[doc = "Field `PIN19` reader - Pin 19"] -pub type PIN19_R = crate::BitReader; -#[doc = "Pin 19\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PIN19_A { - #[doc = "0: Read: pin driver is low"] - LOW = 0, - #[doc = "1: Read: pin driver is high"] - HIGH = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PIN19_A) -> Self { - variant as u8 != 0 - } -} -impl PIN19_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> PIN19_A { - match self.bits { - false => PIN19_A::LOW, - true => PIN19_A::HIGH, - } - } - #[doc = "Checks if the value of the field is `LOW`"] - #[inline(always)] - pub fn is_low(&self) -> bool { - *self == PIN19_A::LOW - } - #[doc = "Checks if the value of the field is `HIGH`"] - #[inline(always)] - pub fn is_high(&self) -> bool { - *self == PIN19_A::HIGH - } -} -#[doc = "Pin 19\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PIN19_AW { - #[doc = "1: Write: writing a '1' sets the pin high; writing a '0' has no effect"] - SET = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PIN19_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `PIN19` writer - Pin 19"] -pub type PIN19_W<'a, const O: u8> = crate::BitWriter1S<'a, u32, OUTSET_SPEC, PIN19_AW, O>; -impl<'a, const O: u8> PIN19_W<'a, O> { - #[doc = "Write: writing a '1' sets the pin high; writing a '0' has no effect"] - #[inline(always)] - pub fn set(self) -> &'a mut W { - self.variant(PIN19_AW::SET) - } -} -#[doc = "Field `PIN20` reader - Pin 20"] -pub type PIN20_R = crate::BitReader; -#[doc = "Pin 20\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PIN20_A { - #[doc = "0: Read: pin driver is low"] - LOW = 0, - #[doc = "1: Read: pin driver is high"] - HIGH = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PIN20_A) -> Self { - variant as u8 != 0 - } -} -impl PIN20_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> PIN20_A { - match self.bits { - false => PIN20_A::LOW, - true => PIN20_A::HIGH, - } - } - #[doc = "Checks if the value of the field is `LOW`"] - #[inline(always)] - pub fn is_low(&self) -> bool { - *self == PIN20_A::LOW - } - #[doc = "Checks if the value of the field is `HIGH`"] - #[inline(always)] - pub fn is_high(&self) -> bool { - *self == PIN20_A::HIGH - } -} -#[doc = "Pin 20\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PIN20_AW { - #[doc = "1: Write: writing a '1' sets the pin high; writing a '0' has no effect"] - SET = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PIN20_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `PIN20` writer - Pin 20"] -pub type PIN20_W<'a, const O: u8> = crate::BitWriter1S<'a, u32, OUTSET_SPEC, PIN20_AW, O>; -impl<'a, const O: u8> PIN20_W<'a, O> { - #[doc = "Write: writing a '1' sets the pin high; writing a '0' has no effect"] - #[inline(always)] - pub fn set(self) -> &'a mut W { - self.variant(PIN20_AW::SET) - } -} -#[doc = "Field `PIN21` reader - Pin 21"] -pub type PIN21_R = crate::BitReader; -#[doc = "Pin 21\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PIN21_A { - #[doc = "0: Read: pin driver is low"] - LOW = 0, - #[doc = "1: Read: pin driver is high"] - HIGH = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PIN21_A) -> Self { - variant as u8 != 0 - } -} -impl PIN21_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> PIN21_A { - match self.bits { - false => PIN21_A::LOW, - true => PIN21_A::HIGH, - } - } - #[doc = "Checks if the value of the field is `LOW`"] - #[inline(always)] - pub fn is_low(&self) -> bool { - *self == PIN21_A::LOW - } - #[doc = "Checks if the value of the field is `HIGH`"] - #[inline(always)] - pub fn is_high(&self) -> bool { - *self == PIN21_A::HIGH - } -} -#[doc = "Pin 21\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PIN21_AW { - #[doc = "1: Write: writing a '1' sets the pin high; writing a '0' has no effect"] - SET = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PIN21_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `PIN21` writer - Pin 21"] -pub type PIN21_W<'a, const O: u8> = crate::BitWriter1S<'a, u32, OUTSET_SPEC, PIN21_AW, O>; -impl<'a, const O: u8> PIN21_W<'a, O> { - #[doc = "Write: writing a '1' sets the pin high; writing a '0' has no effect"] - #[inline(always)] - pub fn set(self) -> &'a mut W { - self.variant(PIN21_AW::SET) - } -} -#[doc = "Field `PIN22` reader - Pin 22"] -pub type PIN22_R = crate::BitReader; -#[doc = "Pin 22\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PIN22_A { - #[doc = "0: Read: pin driver is low"] - LOW = 0, - #[doc = "1: Read: pin driver is high"] - HIGH = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PIN22_A) -> Self { - variant as u8 != 0 - } -} -impl PIN22_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> PIN22_A { - match self.bits { - false => PIN22_A::LOW, - true => PIN22_A::HIGH, - } - } - #[doc = "Checks if the value of the field is `LOW`"] - #[inline(always)] - pub fn is_low(&self) -> bool { - *self == PIN22_A::LOW - } - #[doc = "Checks if the value of the field is `HIGH`"] - #[inline(always)] - pub fn is_high(&self) -> bool { - *self == PIN22_A::HIGH - } -} -#[doc = "Pin 22\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PIN22_AW { - #[doc = "1: Write: writing a '1' sets the pin high; writing a '0' has no effect"] - SET = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PIN22_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `PIN22` writer - Pin 22"] -pub type PIN22_W<'a, const O: u8> = crate::BitWriter1S<'a, u32, OUTSET_SPEC, PIN22_AW, O>; -impl<'a, const O: u8> PIN22_W<'a, O> { - #[doc = "Write: writing a '1' sets the pin high; writing a '0' has no effect"] - #[inline(always)] - pub fn set(self) -> &'a mut W { - self.variant(PIN22_AW::SET) - } -} -#[doc = "Field `PIN23` reader - Pin 23"] -pub type PIN23_R = crate::BitReader; -#[doc = "Pin 23\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PIN23_A { - #[doc = "0: Read: pin driver is low"] - LOW = 0, - #[doc = "1: Read: pin driver is high"] - HIGH = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PIN23_A) -> Self { - variant as u8 != 0 - } -} -impl PIN23_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> PIN23_A { - match self.bits { - false => PIN23_A::LOW, - true => PIN23_A::HIGH, - } - } - #[doc = "Checks if the value of the field is `LOW`"] - #[inline(always)] - pub fn is_low(&self) -> bool { - *self == PIN23_A::LOW - } - #[doc = "Checks if the value of the field is `HIGH`"] - #[inline(always)] - pub fn is_high(&self) -> bool { - *self == PIN23_A::HIGH - } -} -#[doc = "Pin 23\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PIN23_AW { - #[doc = "1: Write: writing a '1' sets the pin high; writing a '0' has no effect"] - SET = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PIN23_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `PIN23` writer - Pin 23"] -pub type PIN23_W<'a, const O: u8> = crate::BitWriter1S<'a, u32, OUTSET_SPEC, PIN23_AW, O>; -impl<'a, const O: u8> PIN23_W<'a, O> { - #[doc = "Write: writing a '1' sets the pin high; writing a '0' has no effect"] - #[inline(always)] - pub fn set(self) -> &'a mut W { - self.variant(PIN23_AW::SET) - } -} -#[doc = "Field `PIN24` reader - Pin 24"] -pub type PIN24_R = crate::BitReader; -#[doc = "Pin 24\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PIN24_A { - #[doc = "0: Read: pin driver is low"] - LOW = 0, - #[doc = "1: Read: pin driver is high"] - HIGH = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PIN24_A) -> Self { - variant as u8 != 0 - } -} -impl PIN24_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> PIN24_A { - match self.bits { - false => PIN24_A::LOW, - true => PIN24_A::HIGH, - } - } - #[doc = "Checks if the value of the field is `LOW`"] - #[inline(always)] - pub fn is_low(&self) -> bool { - *self == PIN24_A::LOW - } - #[doc = "Checks if the value of the field is `HIGH`"] - #[inline(always)] - pub fn is_high(&self) -> bool { - *self == PIN24_A::HIGH - } -} -#[doc = "Pin 24\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PIN24_AW { - #[doc = "1: Write: writing a '1' sets the pin high; writing a '0' has no effect"] - SET = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PIN24_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `PIN24` writer - Pin 24"] -pub type PIN24_W<'a, const O: u8> = crate::BitWriter1S<'a, u32, OUTSET_SPEC, PIN24_AW, O>; -impl<'a, const O: u8> PIN24_W<'a, O> { - #[doc = "Write: writing a '1' sets the pin high; writing a '0' has no effect"] - #[inline(always)] - pub fn set(self) -> &'a mut W { - self.variant(PIN24_AW::SET) - } -} -#[doc = "Field `PIN25` reader - Pin 25"] -pub type PIN25_R = crate::BitReader; -#[doc = "Pin 25\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PIN25_A { - #[doc = "0: Read: pin driver is low"] - LOW = 0, - #[doc = "1: Read: pin driver is high"] - HIGH = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PIN25_A) -> Self { - variant as u8 != 0 - } -} -impl PIN25_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> PIN25_A { - match self.bits { - false => PIN25_A::LOW, - true => PIN25_A::HIGH, - } - } - #[doc = "Checks if the value of the field is `LOW`"] - #[inline(always)] - pub fn is_low(&self) -> bool { - *self == PIN25_A::LOW - } - #[doc = "Checks if the value of the field is `HIGH`"] - #[inline(always)] - pub fn is_high(&self) -> bool { - *self == PIN25_A::HIGH - } -} -#[doc = "Pin 25\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PIN25_AW { - #[doc = "1: Write: writing a '1' sets the pin high; writing a '0' has no effect"] - SET = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PIN25_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `PIN25` writer - Pin 25"] -pub type PIN25_W<'a, const O: u8> = crate::BitWriter1S<'a, u32, OUTSET_SPEC, PIN25_AW, O>; -impl<'a, const O: u8> PIN25_W<'a, O> { - #[doc = "Write: writing a '1' sets the pin high; writing a '0' has no effect"] - #[inline(always)] - pub fn set(self) -> &'a mut W { - self.variant(PIN25_AW::SET) - } -} -#[doc = "Field `PIN26` reader - Pin 26"] -pub type PIN26_R = crate::BitReader; -#[doc = "Pin 26\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PIN26_A { - #[doc = "0: Read: pin driver is low"] - LOW = 0, - #[doc = "1: Read: pin driver is high"] - HIGH = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PIN26_A) -> Self { - variant as u8 != 0 - } -} -impl PIN26_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> PIN26_A { - match self.bits { - false => PIN26_A::LOW, - true => PIN26_A::HIGH, - } - } - #[doc = "Checks if the value of the field is `LOW`"] - #[inline(always)] - pub fn is_low(&self) -> bool { - *self == PIN26_A::LOW - } - #[doc = "Checks if the value of the field is `HIGH`"] - #[inline(always)] - pub fn is_high(&self) -> bool { - *self == PIN26_A::HIGH - } -} -#[doc = "Pin 26\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PIN26_AW { - #[doc = "1: Write: writing a '1' sets the pin high; writing a '0' has no effect"] - SET = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PIN26_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `PIN26` writer - Pin 26"] -pub type PIN26_W<'a, const O: u8> = crate::BitWriter1S<'a, u32, OUTSET_SPEC, PIN26_AW, O>; -impl<'a, const O: u8> PIN26_W<'a, O> { - #[doc = "Write: writing a '1' sets the pin high; writing a '0' has no effect"] - #[inline(always)] - pub fn set(self) -> &'a mut W { - self.variant(PIN26_AW::SET) - } -} -#[doc = "Field `PIN27` reader - Pin 27"] -pub type PIN27_R = crate::BitReader; -#[doc = "Pin 27\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PIN27_A { - #[doc = "0: Read: pin driver is low"] - LOW = 0, - #[doc = "1: Read: pin driver is high"] - HIGH = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PIN27_A) -> Self { - variant as u8 != 0 - } -} -impl PIN27_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> PIN27_A { - match self.bits { - false => PIN27_A::LOW, - true => PIN27_A::HIGH, - } - } - #[doc = "Checks if the value of the field is `LOW`"] - #[inline(always)] - pub fn is_low(&self) -> bool { - *self == PIN27_A::LOW - } - #[doc = "Checks if the value of the field is `HIGH`"] - #[inline(always)] - pub fn is_high(&self) -> bool { - *self == PIN27_A::HIGH - } -} -#[doc = "Pin 27\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PIN27_AW { - #[doc = "1: Write: writing a '1' sets the pin high; writing a '0' has no effect"] - SET = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PIN27_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `PIN27` writer - Pin 27"] -pub type PIN27_W<'a, const O: u8> = crate::BitWriter1S<'a, u32, OUTSET_SPEC, PIN27_AW, O>; -impl<'a, const O: u8> PIN27_W<'a, O> { - #[doc = "Write: writing a '1' sets the pin high; writing a '0' has no effect"] - #[inline(always)] - pub fn set(self) -> &'a mut W { - self.variant(PIN27_AW::SET) - } -} -#[doc = "Field `PIN28` reader - Pin 28"] -pub type PIN28_R = crate::BitReader; -#[doc = "Pin 28\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PIN28_A { - #[doc = "0: Read: pin driver is low"] - LOW = 0, - #[doc = "1: Read: pin driver is high"] - HIGH = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PIN28_A) -> Self { - variant as u8 != 0 - } -} -impl PIN28_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> PIN28_A { - match self.bits { - false => PIN28_A::LOW, - true => PIN28_A::HIGH, - } - } - #[doc = "Checks if the value of the field is `LOW`"] - #[inline(always)] - pub fn is_low(&self) -> bool { - *self == PIN28_A::LOW - } - #[doc = "Checks if the value of the field is `HIGH`"] - #[inline(always)] - pub fn is_high(&self) -> bool { - *self == PIN28_A::HIGH - } -} -#[doc = "Pin 28\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PIN28_AW { - #[doc = "1: Write: writing a '1' sets the pin high; writing a '0' has no effect"] - SET = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PIN28_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `PIN28` writer - Pin 28"] -pub type PIN28_W<'a, const O: u8> = crate::BitWriter1S<'a, u32, OUTSET_SPEC, PIN28_AW, O>; -impl<'a, const O: u8> PIN28_W<'a, O> { - #[doc = "Write: writing a '1' sets the pin high; writing a '0' has no effect"] - #[inline(always)] - pub fn set(self) -> &'a mut W { - self.variant(PIN28_AW::SET) - } -} -#[doc = "Field `PIN29` reader - Pin 29"] -pub type PIN29_R = crate::BitReader; -#[doc = "Pin 29\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PIN29_A { - #[doc = "0: Read: pin driver is low"] - LOW = 0, - #[doc = "1: Read: pin driver is high"] - HIGH = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PIN29_A) -> Self { - variant as u8 != 0 - } -} -impl PIN29_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> PIN29_A { - match self.bits { - false => PIN29_A::LOW, - true => PIN29_A::HIGH, - } - } - #[doc = "Checks if the value of the field is `LOW`"] - #[inline(always)] - pub fn is_low(&self) -> bool { - *self == PIN29_A::LOW - } - #[doc = "Checks if the value of the field is `HIGH`"] - #[inline(always)] - pub fn is_high(&self) -> bool { - *self == PIN29_A::HIGH - } -} -#[doc = "Pin 29\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PIN29_AW { - #[doc = "1: Write: writing a '1' sets the pin high; writing a '0' has no effect"] - SET = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PIN29_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `PIN29` writer - Pin 29"] -pub type PIN29_W<'a, const O: u8> = crate::BitWriter1S<'a, u32, OUTSET_SPEC, PIN29_AW, O>; -impl<'a, const O: u8> PIN29_W<'a, O> { - #[doc = "Write: writing a '1' sets the pin high; writing a '0' has no effect"] - #[inline(always)] - pub fn set(self) -> &'a mut W { - self.variant(PIN29_AW::SET) - } -} -#[doc = "Field `PIN30` reader - Pin 30"] -pub type PIN30_R = crate::BitReader; -#[doc = "Pin 30\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PIN30_A { - #[doc = "0: Read: pin driver is low"] - LOW = 0, - #[doc = "1: Read: pin driver is high"] - HIGH = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PIN30_A) -> Self { - variant as u8 != 0 - } -} -impl PIN30_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> PIN30_A { - match self.bits { - false => PIN30_A::LOW, - true => PIN30_A::HIGH, - } - } - #[doc = "Checks if the value of the field is `LOW`"] - #[inline(always)] - pub fn is_low(&self) -> bool { - *self == PIN30_A::LOW - } - #[doc = "Checks if the value of the field is `HIGH`"] - #[inline(always)] - pub fn is_high(&self) -> bool { - *self == PIN30_A::HIGH - } -} -#[doc = "Pin 30\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PIN30_AW { - #[doc = "1: Write: writing a '1' sets the pin high; writing a '0' has no effect"] - SET = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PIN30_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `PIN30` writer - Pin 30"] -pub type PIN30_W<'a, const O: u8> = crate::BitWriter1S<'a, u32, OUTSET_SPEC, PIN30_AW, O>; -impl<'a, const O: u8> PIN30_W<'a, O> { - #[doc = "Write: writing a '1' sets the pin high; writing a '0' has no effect"] - #[inline(always)] - pub fn set(self) -> &'a mut W { - self.variant(PIN30_AW::SET) - } -} -#[doc = "Field `PIN31` reader - Pin 31"] -pub type PIN31_R = crate::BitReader; -#[doc = "Pin 31\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PIN31_A { - #[doc = "0: Read: pin driver is low"] - LOW = 0, - #[doc = "1: Read: pin driver is high"] - HIGH = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PIN31_A) -> Self { - variant as u8 != 0 - } -} -impl PIN31_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> PIN31_A { - match self.bits { - false => PIN31_A::LOW, - true => PIN31_A::HIGH, - } - } - #[doc = "Checks if the value of the field is `LOW`"] - #[inline(always)] - pub fn is_low(&self) -> bool { - *self == PIN31_A::LOW - } - #[doc = "Checks if the value of the field is `HIGH`"] - #[inline(always)] - pub fn is_high(&self) -> bool { - *self == PIN31_A::HIGH - } -} -#[doc = "Pin 31\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PIN31_AW { - #[doc = "1: Write: writing a '1' sets the pin high; writing a '0' has no effect"] - SET = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PIN31_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `PIN31` writer - Pin 31"] -pub type PIN31_W<'a, const O: u8> = crate::BitWriter1S<'a, u32, OUTSET_SPEC, PIN31_AW, O>; -impl<'a, const O: u8> PIN31_W<'a, O> { - #[doc = "Write: writing a '1' sets the pin high; writing a '0' has no effect"] - #[inline(always)] - pub fn set(self) -> &'a mut W { - self.variant(PIN31_AW::SET) - } -} -impl R { - #[doc = "Bit 0 - Pin 0"] - #[inline(always)] - pub fn pin0(&self) -> PIN0_R { - PIN0_R::new((self.bits & 1) != 0) - } - #[doc = "Bit 1 - Pin 1"] - #[inline(always)] - pub fn pin1(&self) -> PIN1_R { - PIN1_R::new(((self.bits >> 1) & 1) != 0) - } - #[doc = "Bit 2 - Pin 2"] - #[inline(always)] - pub fn pin2(&self) -> PIN2_R { - PIN2_R::new(((self.bits >> 2) & 1) != 0) - } - #[doc = "Bit 3 - Pin 3"] - #[inline(always)] - pub fn pin3(&self) -> PIN3_R { - PIN3_R::new(((self.bits >> 3) & 1) != 0) - } - #[doc = "Bit 4 - Pin 4"] - #[inline(always)] - pub fn pin4(&self) -> PIN4_R { - PIN4_R::new(((self.bits >> 4) & 1) != 0) - } - #[doc = "Bit 5 - Pin 5"] - #[inline(always)] - pub fn pin5(&self) -> PIN5_R { - PIN5_R::new(((self.bits >> 5) & 1) != 0) - } - #[doc = "Bit 6 - Pin 6"] - #[inline(always)] - pub fn pin6(&self) -> PIN6_R { - PIN6_R::new(((self.bits >> 6) & 1) != 0) - } - #[doc = "Bit 7 - Pin 7"] - #[inline(always)] - pub fn pin7(&self) -> PIN7_R { - PIN7_R::new(((self.bits >> 7) & 1) != 0) - } - #[doc = "Bit 8 - Pin 8"] - #[inline(always)] - pub fn pin8(&self) -> PIN8_R { - PIN8_R::new(((self.bits >> 8) & 1) != 0) - } - #[doc = "Bit 9 - Pin 9"] - #[inline(always)] - pub fn pin9(&self) -> PIN9_R { - PIN9_R::new(((self.bits >> 9) & 1) != 0) - } - #[doc = "Bit 10 - Pin 10"] - #[inline(always)] - pub fn pin10(&self) -> PIN10_R { - PIN10_R::new(((self.bits >> 10) & 1) != 0) - } - #[doc = "Bit 11 - Pin 11"] - #[inline(always)] - pub fn pin11(&self) -> PIN11_R { - PIN11_R::new(((self.bits >> 11) & 1) != 0) - } - #[doc = "Bit 12 - Pin 12"] - #[inline(always)] - pub fn pin12(&self) -> PIN12_R { - PIN12_R::new(((self.bits >> 12) & 1) != 0) - } - #[doc = "Bit 13 - Pin 13"] - #[inline(always)] - pub fn pin13(&self) -> PIN13_R { - PIN13_R::new(((self.bits >> 13) & 1) != 0) - } - #[doc = "Bit 14 - Pin 14"] - #[inline(always)] - pub fn pin14(&self) -> PIN14_R { - PIN14_R::new(((self.bits >> 14) & 1) != 0) - } - #[doc = "Bit 15 - Pin 15"] - #[inline(always)] - pub fn pin15(&self) -> PIN15_R { - PIN15_R::new(((self.bits >> 15) & 1) != 0) - } - #[doc = "Bit 16 - Pin 16"] - #[inline(always)] - pub fn pin16(&self) -> PIN16_R { - PIN16_R::new(((self.bits >> 16) & 1) != 0) - } - #[doc = "Bit 17 - Pin 17"] - #[inline(always)] - pub fn pin17(&self) -> PIN17_R { - PIN17_R::new(((self.bits >> 17) & 1) != 0) - } - #[doc = "Bit 18 - Pin 18"] - #[inline(always)] - pub fn pin18(&self) -> PIN18_R { - PIN18_R::new(((self.bits >> 18) & 1) != 0) - } - #[doc = "Bit 19 - Pin 19"] - #[inline(always)] - pub fn pin19(&self) -> PIN19_R { - PIN19_R::new(((self.bits >> 19) & 1) != 0) - } - #[doc = "Bit 20 - Pin 20"] - #[inline(always)] - pub fn pin20(&self) -> PIN20_R { - PIN20_R::new(((self.bits >> 20) & 1) != 0) - } - #[doc = "Bit 21 - Pin 21"] - #[inline(always)] - pub fn pin21(&self) -> PIN21_R { - PIN21_R::new(((self.bits >> 21) & 1) != 0) - } - #[doc = "Bit 22 - Pin 22"] - #[inline(always)] - pub fn pin22(&self) -> PIN22_R { - PIN22_R::new(((self.bits >> 22) & 1) != 0) - } - #[doc = "Bit 23 - Pin 23"] - #[inline(always)] - pub fn pin23(&self) -> PIN23_R { - PIN23_R::new(((self.bits >> 23) & 1) != 0) - } - #[doc = "Bit 24 - Pin 24"] - #[inline(always)] - pub fn pin24(&self) -> PIN24_R { - PIN24_R::new(((self.bits >> 24) & 1) != 0) - } - #[doc = "Bit 25 - Pin 25"] - #[inline(always)] - pub fn pin25(&self) -> PIN25_R { - PIN25_R::new(((self.bits >> 25) & 1) != 0) - } - #[doc = "Bit 26 - Pin 26"] - #[inline(always)] - pub fn pin26(&self) -> PIN26_R { - PIN26_R::new(((self.bits >> 26) & 1) != 0) - } - #[doc = "Bit 27 - Pin 27"] - #[inline(always)] - pub fn pin27(&self) -> PIN27_R { - PIN27_R::new(((self.bits >> 27) & 1) != 0) - } - #[doc = "Bit 28 - Pin 28"] - #[inline(always)] - pub fn pin28(&self) -> PIN28_R { - PIN28_R::new(((self.bits >> 28) & 1) != 0) - } - #[doc = "Bit 29 - Pin 29"] - #[inline(always)] - pub fn pin29(&self) -> PIN29_R { - PIN29_R::new(((self.bits >> 29) & 1) != 0) - } - #[doc = "Bit 30 - Pin 30"] - #[inline(always)] - pub fn pin30(&self) -> PIN30_R { - PIN30_R::new(((self.bits >> 30) & 1) != 0) - } - #[doc = "Bit 31 - Pin 31"] - #[inline(always)] - pub fn pin31(&self) -> PIN31_R { - PIN31_R::new(((self.bits >> 31) & 1) != 0) - } -} -impl W { - #[doc = "Bit 0 - Pin 0"] - #[inline(always)] - #[must_use] - pub fn pin0(&mut self) -> PIN0_W<0> { - PIN0_W::new(self) - } - #[doc = "Bit 1 - Pin 1"] - #[inline(always)] - #[must_use] - pub fn pin1(&mut self) -> PIN1_W<1> { - PIN1_W::new(self) - } - #[doc = "Bit 2 - Pin 2"] - #[inline(always)] - #[must_use] - pub fn pin2(&mut self) -> PIN2_W<2> { - PIN2_W::new(self) - } - #[doc = "Bit 3 - Pin 3"] - #[inline(always)] - #[must_use] - pub fn pin3(&mut self) -> PIN3_W<3> { - PIN3_W::new(self) - } - #[doc = "Bit 4 - Pin 4"] - #[inline(always)] - #[must_use] - pub fn pin4(&mut self) -> PIN4_W<4> { - PIN4_W::new(self) - } - #[doc = "Bit 5 - Pin 5"] - #[inline(always)] - #[must_use] - pub fn pin5(&mut self) -> PIN5_W<5> { - PIN5_W::new(self) - } - #[doc = "Bit 6 - Pin 6"] - #[inline(always)] - #[must_use] - pub fn pin6(&mut self) -> PIN6_W<6> { - PIN6_W::new(self) - } - #[doc = "Bit 7 - Pin 7"] - #[inline(always)] - #[must_use] - pub fn pin7(&mut self) -> PIN7_W<7> { - PIN7_W::new(self) - } - #[doc = "Bit 8 - Pin 8"] - #[inline(always)] - #[must_use] - pub fn pin8(&mut self) -> PIN8_W<8> { - PIN8_W::new(self) - } - #[doc = "Bit 9 - Pin 9"] - #[inline(always)] - #[must_use] - pub fn pin9(&mut self) -> PIN9_W<9> { - PIN9_W::new(self) - } - #[doc = "Bit 10 - Pin 10"] - #[inline(always)] - #[must_use] - pub fn pin10(&mut self) -> PIN10_W<10> { - PIN10_W::new(self) - } - #[doc = "Bit 11 - Pin 11"] - #[inline(always)] - #[must_use] - pub fn pin11(&mut self) -> PIN11_W<11> { - PIN11_W::new(self) - } - #[doc = "Bit 12 - Pin 12"] - #[inline(always)] - #[must_use] - pub fn pin12(&mut self) -> PIN12_W<12> { - PIN12_W::new(self) - } - #[doc = "Bit 13 - Pin 13"] - #[inline(always)] - #[must_use] - pub fn pin13(&mut self) -> PIN13_W<13> { - PIN13_W::new(self) - } - #[doc = "Bit 14 - Pin 14"] - #[inline(always)] - #[must_use] - pub fn pin14(&mut self) -> PIN14_W<14> { - PIN14_W::new(self) - } - #[doc = "Bit 15 - Pin 15"] - #[inline(always)] - #[must_use] - pub fn pin15(&mut self) -> PIN15_W<15> { - PIN15_W::new(self) - } - #[doc = "Bit 16 - Pin 16"] - #[inline(always)] - #[must_use] - pub fn pin16(&mut self) -> PIN16_W<16> { - PIN16_W::new(self) - } - #[doc = "Bit 17 - Pin 17"] - #[inline(always)] - #[must_use] - pub fn pin17(&mut self) -> PIN17_W<17> { - PIN17_W::new(self) - } - #[doc = "Bit 18 - Pin 18"] - #[inline(always)] - #[must_use] - pub fn pin18(&mut self) -> PIN18_W<18> { - PIN18_W::new(self) - } - #[doc = "Bit 19 - Pin 19"] - #[inline(always)] - #[must_use] - pub fn pin19(&mut self) -> PIN19_W<19> { - PIN19_W::new(self) - } - #[doc = "Bit 20 - Pin 20"] - #[inline(always)] - #[must_use] - pub fn pin20(&mut self) -> PIN20_W<20> { - PIN20_W::new(self) - } - #[doc = "Bit 21 - Pin 21"] - #[inline(always)] - #[must_use] - pub fn pin21(&mut self) -> PIN21_W<21> { - PIN21_W::new(self) - } - #[doc = "Bit 22 - Pin 22"] - #[inline(always)] - #[must_use] - pub fn pin22(&mut self) -> PIN22_W<22> { - PIN22_W::new(self) - } - #[doc = "Bit 23 - Pin 23"] - #[inline(always)] - #[must_use] - pub fn pin23(&mut self) -> PIN23_W<23> { - PIN23_W::new(self) - } - #[doc = "Bit 24 - Pin 24"] - #[inline(always)] - #[must_use] - pub fn pin24(&mut self) -> PIN24_W<24> { - PIN24_W::new(self) - } - #[doc = "Bit 25 - Pin 25"] - #[inline(always)] - #[must_use] - pub fn pin25(&mut self) -> PIN25_W<25> { - PIN25_W::new(self) - } - #[doc = "Bit 26 - Pin 26"] - #[inline(always)] - #[must_use] - pub fn pin26(&mut self) -> PIN26_W<26> { - PIN26_W::new(self) - } - #[doc = "Bit 27 - Pin 27"] - #[inline(always)] - #[must_use] - pub fn pin27(&mut self) -> PIN27_W<27> { - PIN27_W::new(self) - } - #[doc = "Bit 28 - Pin 28"] - #[inline(always)] - #[must_use] - pub fn pin28(&mut self) -> PIN28_W<28> { - PIN28_W::new(self) - } - #[doc = "Bit 29 - Pin 29"] - #[inline(always)] - #[must_use] - pub fn pin29(&mut self) -> PIN29_W<29> { - PIN29_W::new(self) - } - #[doc = "Bit 30 - Pin 30"] - #[inline(always)] - #[must_use] - pub fn pin30(&mut self) -> PIN30_W<30> { - PIN30_W::new(self) - } - #[doc = "Bit 31 - Pin 31"] - #[inline(always)] - #[must_use] - pub fn pin31(&mut self) -> PIN31_W<31> { - PIN31_W::new(self) - } - #[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 = "Set individual bits in GPIO port\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 [outset](index.html) module"] -pub struct OUTSET_SPEC; -impl crate::RegisterSpec for OUTSET_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [outset::R](R) reader structure"] -impl crate::Readable for OUTSET_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [outset::W](W) writer structure"] -impl crate::Writable for OUTSET_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0xffff_ffff; -} -#[doc = "`reset()` method sets OUTSET to value 0"] -impl crate::Resettable for OUTSET_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/p0/pin_cnf.rs b/down-the-stack/dk_pac/src/p0/pin_cnf.rs deleted file mode 100644 index 8b53a85..0000000 --- a/down-the-stack/dk_pac/src/p0/pin_cnf.rs +++ /dev/null @@ -1,482 +0,0 @@ -#[doc = "Register `PIN_CNF[%s]` 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 `PIN_CNF[%s]` 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 `DIR` reader - Pin direction. Same physical register as DIR register"] -pub type DIR_R = crate::BitReader; -#[doc = "Pin direction. Same physical register as DIR register\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum DIR_A { - #[doc = "0: Configure pin as an input pin"] - INPUT = 0, - #[doc = "1: Configure pin as an output pin"] - OUTPUT = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: DIR_A) -> Self { - variant as u8 != 0 - } -} -impl DIR_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> DIR_A { - match self.bits { - false => DIR_A::INPUT, - true => DIR_A::OUTPUT, - } - } - #[doc = "Checks if the value of the field is `INPUT`"] - #[inline(always)] - pub fn is_input(&self) -> bool { - *self == DIR_A::INPUT - } - #[doc = "Checks if the value of the field is `OUTPUT`"] - #[inline(always)] - pub fn is_output(&self) -> bool { - *self == DIR_A::OUTPUT - } -} -#[doc = "Field `DIR` writer - Pin direction. Same physical register as DIR register"] -pub type DIR_W<'a, const O: u8> = crate::BitWriter<'a, u32, PIN_CNF_SPEC, DIR_A, O>; -impl<'a, const O: u8> DIR_W<'a, O> { - #[doc = "Configure pin as an input pin"] - #[inline(always)] - pub fn input(self) -> &'a mut W { - self.variant(DIR_A::INPUT) - } - #[doc = "Configure pin as an output pin"] - #[inline(always)] - pub fn output(self) -> &'a mut W { - self.variant(DIR_A::OUTPUT) - } -} -#[doc = "Field `INPUT` reader - Connect or disconnect input buffer"] -pub type INPUT_R = crate::BitReader; -#[doc = "Connect or disconnect input buffer\n\nValue on reset: 1"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum INPUT_A { - #[doc = "0: Connect input buffer"] - CONNECT = 0, - #[doc = "1: Disconnect input buffer"] - DISCONNECT = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: INPUT_A) -> Self { - variant as u8 != 0 - } -} -impl INPUT_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> INPUT_A { - match self.bits { - false => INPUT_A::CONNECT, - true => INPUT_A::DISCONNECT, - } - } - #[doc = "Checks if the value of the field is `CONNECT`"] - #[inline(always)] - pub fn is_connect(&self) -> bool { - *self == INPUT_A::CONNECT - } - #[doc = "Checks if the value of the field is `DISCONNECT`"] - #[inline(always)] - pub fn is_disconnect(&self) -> bool { - *self == INPUT_A::DISCONNECT - } -} -#[doc = "Field `INPUT` writer - Connect or disconnect input buffer"] -pub type INPUT_W<'a, const O: u8> = crate::BitWriter<'a, u32, PIN_CNF_SPEC, INPUT_A, O>; -impl<'a, const O: u8> INPUT_W<'a, O> { - #[doc = "Connect input buffer"] - #[inline(always)] - pub fn connect(self) -> &'a mut W { - self.variant(INPUT_A::CONNECT) - } - #[doc = "Disconnect input buffer"] - #[inline(always)] - pub fn disconnect(self) -> &'a mut W { - self.variant(INPUT_A::DISCONNECT) - } -} -#[doc = "Field `PULL` reader - Pull configuration"] -pub type PULL_R = crate::FieldReader; -#[doc = "Pull configuration\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -#[repr(u8)] -pub enum PULL_A { - #[doc = "0: No pull"] - DISABLED = 0, - #[doc = "1: Pull down on pin"] - PULLDOWN = 1, - #[doc = "3: Pull up on pin"] - PULLUP = 3, -} -impl From for u8 { - #[inline(always)] - fn from(variant: PULL_A) -> Self { - variant as _ - } -} -impl PULL_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> Option { - match self.bits { - 0 => Some(PULL_A::DISABLED), - 1 => Some(PULL_A::PULLDOWN), - 3 => Some(PULL_A::PULLUP), - _ => None, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == PULL_A::DISABLED - } - #[doc = "Checks if the value of the field is `PULLDOWN`"] - #[inline(always)] - pub fn is_pulldown(&self) -> bool { - *self == PULL_A::PULLDOWN - } - #[doc = "Checks if the value of the field is `PULLUP`"] - #[inline(always)] - pub fn is_pullup(&self) -> bool { - *self == PULL_A::PULLUP - } -} -#[doc = "Field `PULL` writer - Pull configuration"] -pub type PULL_W<'a, const O: u8> = crate::FieldWriter<'a, u32, PIN_CNF_SPEC, u8, PULL_A, 2, O>; -impl<'a, const O: u8> PULL_W<'a, O> { - #[doc = "No pull"] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(PULL_A::DISABLED) - } - #[doc = "Pull down on pin"] - #[inline(always)] - pub fn pulldown(self) -> &'a mut W { - self.variant(PULL_A::PULLDOWN) - } - #[doc = "Pull up on pin"] - #[inline(always)] - pub fn pullup(self) -> &'a mut W { - self.variant(PULL_A::PULLUP) - } -} -#[doc = "Field `DRIVE` reader - Drive configuration"] -pub type DRIVE_R = crate::FieldReader; -#[doc = "Drive configuration\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -#[repr(u8)] -pub enum DRIVE_A { - #[doc = "0: Standard '0', standard '1'"] - S0S1 = 0, - #[doc = "1: High drive '0', standard '1'"] - H0S1 = 1, - #[doc = "2: Standard '0', high drive '1'"] - S0H1 = 2, - #[doc = "3: High drive '0', high 'drive '1''"] - H0H1 = 3, - #[doc = "4: Disconnect '0' standard '1' (normally used for wired-or connections)"] - D0S1 = 4, - #[doc = "5: Disconnect '0', high drive '1' (normally used for wired-or connections)"] - D0H1 = 5, - #[doc = "6: Standard '0'. disconnect '1' (normally used for wired-and connections)"] - S0D1 = 6, - #[doc = "7: High drive '0', disconnect '1' (normally used for wired-and connections)"] - H0D1 = 7, -} -impl From for u8 { - #[inline(always)] - fn from(variant: DRIVE_A) -> Self { - variant as _ - } -} -impl DRIVE_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> DRIVE_A { - match self.bits { - 0 => DRIVE_A::S0S1, - 1 => DRIVE_A::H0S1, - 2 => DRIVE_A::S0H1, - 3 => DRIVE_A::H0H1, - 4 => DRIVE_A::D0S1, - 5 => DRIVE_A::D0H1, - 6 => DRIVE_A::S0D1, - 7 => DRIVE_A::H0D1, - _ => unreachable!(), - } - } - #[doc = "Checks if the value of the field is `S0S1`"] - #[inline(always)] - pub fn is_s0s1(&self) -> bool { - *self == DRIVE_A::S0S1 - } - #[doc = "Checks if the value of the field is `H0S1`"] - #[inline(always)] - pub fn is_h0s1(&self) -> bool { - *self == DRIVE_A::H0S1 - } - #[doc = "Checks if the value of the field is `S0H1`"] - #[inline(always)] - pub fn is_s0h1(&self) -> bool { - *self == DRIVE_A::S0H1 - } - #[doc = "Checks if the value of the field is `H0H1`"] - #[inline(always)] - pub fn is_h0h1(&self) -> bool { - *self == DRIVE_A::H0H1 - } - #[doc = "Checks if the value of the field is `D0S1`"] - #[inline(always)] - pub fn is_d0s1(&self) -> bool { - *self == DRIVE_A::D0S1 - } - #[doc = "Checks if the value of the field is `D0H1`"] - #[inline(always)] - pub fn is_d0h1(&self) -> bool { - *self == DRIVE_A::D0H1 - } - #[doc = "Checks if the value of the field is `S0D1`"] - #[inline(always)] - pub fn is_s0d1(&self) -> bool { - *self == DRIVE_A::S0D1 - } - #[doc = "Checks if the value of the field is `H0D1`"] - #[inline(always)] - pub fn is_h0d1(&self) -> bool { - *self == DRIVE_A::H0D1 - } -} -#[doc = "Field `DRIVE` writer - Drive configuration"] -pub type DRIVE_W<'a, const O: u8> = - crate::FieldWriterSafe<'a, u32, PIN_CNF_SPEC, u8, DRIVE_A, 3, O>; -impl<'a, const O: u8> DRIVE_W<'a, O> { - #[doc = "Standard '0', standard '1'"] - #[inline(always)] - pub fn s0s1(self) -> &'a mut W { - self.variant(DRIVE_A::S0S1) - } - #[doc = "High drive '0', standard '1'"] - #[inline(always)] - pub fn h0s1(self) -> &'a mut W { - self.variant(DRIVE_A::H0S1) - } - #[doc = "Standard '0', high drive '1'"] - #[inline(always)] - pub fn s0h1(self) -> &'a mut W { - self.variant(DRIVE_A::S0H1) - } - #[doc = "High drive '0', high 'drive '1''"] - #[inline(always)] - pub fn h0h1(self) -> &'a mut W { - self.variant(DRIVE_A::H0H1) - } - #[doc = "Disconnect '0' standard '1' (normally used for wired-or connections)"] - #[inline(always)] - pub fn d0s1(self) -> &'a mut W { - self.variant(DRIVE_A::D0S1) - } - #[doc = "Disconnect '0', high drive '1' (normally used for wired-or connections)"] - #[inline(always)] - pub fn d0h1(self) -> &'a mut W { - self.variant(DRIVE_A::D0H1) - } - #[doc = "Standard '0'. disconnect '1' (normally used for wired-and connections)"] - #[inline(always)] - pub fn s0d1(self) -> &'a mut W { - self.variant(DRIVE_A::S0D1) - } - #[doc = "High drive '0', disconnect '1' (normally used for wired-and connections)"] - #[inline(always)] - pub fn h0d1(self) -> &'a mut W { - self.variant(DRIVE_A::H0D1) - } -} -#[doc = "Field `SENSE` reader - Pin sensing mechanism"] -pub type SENSE_R = crate::FieldReader; -#[doc = "Pin sensing mechanism\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -#[repr(u8)] -pub enum SENSE_A { - #[doc = "0: Disabled"] - DISABLED = 0, - #[doc = "2: Sense for high level"] - HIGH = 2, - #[doc = "3: Sense for low level"] - LOW = 3, -} -impl From for u8 { - #[inline(always)] - fn from(variant: SENSE_A) -> Self { - variant as _ - } -} -impl SENSE_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> Option { - match self.bits { - 0 => Some(SENSE_A::DISABLED), - 2 => Some(SENSE_A::HIGH), - 3 => Some(SENSE_A::LOW), - _ => None, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == SENSE_A::DISABLED - } - #[doc = "Checks if the value of the field is `HIGH`"] - #[inline(always)] - pub fn is_high(&self) -> bool { - *self == SENSE_A::HIGH - } - #[doc = "Checks if the value of the field is `LOW`"] - #[inline(always)] - pub fn is_low(&self) -> bool { - *self == SENSE_A::LOW - } -} -#[doc = "Field `SENSE` writer - Pin sensing mechanism"] -pub type SENSE_W<'a, const O: u8> = crate::FieldWriter<'a, u32, PIN_CNF_SPEC, u8, SENSE_A, 2, O>; -impl<'a, const O: u8> SENSE_W<'a, O> { - #[doc = "Disabled"] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(SENSE_A::DISABLED) - } - #[doc = "Sense for high level"] - #[inline(always)] - pub fn high(self) -> &'a mut W { - self.variant(SENSE_A::HIGH) - } - #[doc = "Sense for low level"] - #[inline(always)] - pub fn low(self) -> &'a mut W { - self.variant(SENSE_A::LOW) - } -} -impl R { - #[doc = "Bit 0 - Pin direction. Same physical register as DIR register"] - #[inline(always)] - pub fn dir(&self) -> DIR_R { - DIR_R::new((self.bits & 1) != 0) - } - #[doc = "Bit 1 - Connect or disconnect input buffer"] - #[inline(always)] - pub fn input(&self) -> INPUT_R { - INPUT_R::new(((self.bits >> 1) & 1) != 0) - } - #[doc = "Bits 2:3 - Pull configuration"] - #[inline(always)] - pub fn pull(&self) -> PULL_R { - PULL_R::new(((self.bits >> 2) & 3) as u8) - } - #[doc = "Bits 8:10 - Drive configuration"] - #[inline(always)] - pub fn drive(&self) -> DRIVE_R { - DRIVE_R::new(((self.bits >> 8) & 7) as u8) - } - #[doc = "Bits 16:17 - Pin sensing mechanism"] - #[inline(always)] - pub fn sense(&self) -> SENSE_R { - SENSE_R::new(((self.bits >> 16) & 3) as u8) - } -} -impl W { - #[doc = "Bit 0 - Pin direction. Same physical register as DIR register"] - #[inline(always)] - #[must_use] - pub fn dir(&mut self) -> DIR_W<0> { - DIR_W::new(self) - } - #[doc = "Bit 1 - Connect or disconnect input buffer"] - #[inline(always)] - #[must_use] - pub fn input(&mut self) -> INPUT_W<1> { - INPUT_W::new(self) - } - #[doc = "Bits 2:3 - Pull configuration"] - #[inline(always)] - #[must_use] - pub fn pull(&mut self) -> PULL_W<2> { - PULL_W::new(self) - } - #[doc = "Bits 8:10 - Drive configuration"] - #[inline(always)] - #[must_use] - pub fn drive(&mut self) -> DRIVE_W<8> { - DRIVE_W::new(self) - } - #[doc = "Bits 16:17 - Pin sensing mechanism"] - #[inline(always)] - #[must_use] - pub fn sense(&mut self) -> SENSE_W<16> { - SENSE_W::new(self) - } - #[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 = "Description collection: Configuration of GPIO pins\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 [pin_cnf](index.html) module"] -pub struct PIN_CNF_SPEC; -impl crate::RegisterSpec for PIN_CNF_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [pin_cnf::R](R) reader structure"] -impl crate::Readable for PIN_CNF_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [pin_cnf::W](W) writer structure"] -impl crate::Writable for PIN_CNF_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets PIN_CNF[%s] -to value 0x02"] -impl crate::Resettable for PIN_CNF_SPEC { - const RESET_VALUE: Self::Ux = 0x02; -} diff --git a/down-the-stack/dk_pac/src/pdm.rs b/down-the-stack/dk_pac/src/pdm.rs deleted file mode 100644 index 304691a..0000000 --- a/down-the-stack/dk_pac/src/pdm.rs +++ /dev/null @@ -1,102 +0,0 @@ -#[doc = r"Register block"] -#[repr(C)] -pub struct RegisterBlock { - #[doc = "0x00 - Starts continuous PDM transfer"] - pub tasks_start: TASKS_START, - #[doc = "0x04 - Stops PDM transfer"] - pub tasks_stop: TASKS_STOP, - _reserved2: [u8; 0xf8], - #[doc = "0x100 - PDM transfer has started"] - pub events_started: EVENTS_STARTED, - #[doc = "0x104 - PDM transfer has finished"] - pub events_stopped: EVENTS_STOPPED, - #[doc = "0x108 - The PDM has written the last sample specified by SAMPLE.MAXCNT (or the last sample after a STOP task has been received) to Data RAM"] - pub events_end: EVENTS_END, - _reserved5: [u8; 0x01f4], - #[doc = "0x300 - Enable or disable interrupt"] - pub inten: INTEN, - #[doc = "0x304 - Enable interrupt"] - pub intenset: INTENSET, - #[doc = "0x308 - Disable interrupt"] - pub intenclr: INTENCLR, - _reserved8: [u8; 0x01f4], - #[doc = "0x500 - PDM module enable register"] - pub enable: ENABLE, - #[doc = "0x504 - PDM clock generator control"] - pub pdmclkctrl: PDMCLKCTRL, - #[doc = "0x508 - Defines the routing of the connected PDM microphones' signals"] - pub mode: MODE, - _reserved11: [u8; 0x0c], - #[doc = "0x518 - Left output gain adjustment"] - pub gainl: GAINL, - #[doc = "0x51c - Right output gain adjustment"] - pub gainr: GAINR, - _reserved13: [u8; 0x20], - #[doc = "0x540..0x548 - Unspecified"] - pub psel: PSEL, - _reserved14: [u8; 0x18], - #[doc = "0x560..0x568 - Unspecified"] - pub sample: SAMPLE, -} -#[doc = "TASKS_START (w) register accessor: an alias for `Reg`"] -pub type TASKS_START = crate::Reg; -#[doc = "Starts continuous PDM transfer"] -pub mod tasks_start; -#[doc = "TASKS_STOP (w) register accessor: an alias for `Reg`"] -pub type TASKS_STOP = crate::Reg; -#[doc = "Stops PDM transfer"] -pub mod tasks_stop; -#[doc = "EVENTS_STARTED (rw) register accessor: an alias for `Reg`"] -pub type EVENTS_STARTED = crate::Reg; -#[doc = "PDM transfer has started"] -pub mod events_started; -#[doc = "EVENTS_STOPPED (rw) register accessor: an alias for `Reg`"] -pub type EVENTS_STOPPED = crate::Reg; -#[doc = "PDM transfer has finished"] -pub mod events_stopped; -#[doc = "EVENTS_END (rw) register accessor: an alias for `Reg`"] -pub type EVENTS_END = crate::Reg; -#[doc = "The PDM has written the last sample specified by SAMPLE.MAXCNT (or the last sample after a STOP task has been received) to Data RAM"] -pub mod events_end; -#[doc = "INTEN (rw) register accessor: an alias for `Reg`"] -pub type INTEN = crate::Reg; -#[doc = "Enable or disable interrupt"] -pub mod inten; -#[doc = "INTENSET (rw) register accessor: an alias for `Reg`"] -pub type INTENSET = crate::Reg; -#[doc = "Enable interrupt"] -pub mod intenset; -#[doc = "INTENCLR (rw) register accessor: an alias for `Reg`"] -pub type INTENCLR = crate::Reg; -#[doc = "Disable interrupt"] -pub mod intenclr; -#[doc = "ENABLE (rw) register accessor: an alias for `Reg`"] -pub type ENABLE = crate::Reg; -#[doc = "PDM module enable register"] -pub mod enable; -#[doc = "PDMCLKCTRL (rw) register accessor: an alias for `Reg`"] -pub type PDMCLKCTRL = crate::Reg; -#[doc = "PDM clock generator control"] -pub mod pdmclkctrl; -#[doc = "MODE (rw) register accessor: an alias for `Reg`"] -pub type MODE = crate::Reg; -#[doc = "Defines the routing of the connected PDM microphones' signals"] -pub mod mode; -#[doc = "GAINL (rw) register accessor: an alias for `Reg`"] -pub type GAINL = crate::Reg; -#[doc = "Left output gain adjustment"] -pub mod gainl; -#[doc = "GAINR (rw) register accessor: an alias for `Reg`"] -pub type GAINR = crate::Reg; -#[doc = "Right output gain adjustment"] -pub mod gainr; -#[doc = "Unspecified"] -pub use self::psel::PSEL; -#[doc = r"Cluster"] -#[doc = "Unspecified"] -pub mod psel; -#[doc = "Unspecified"] -pub use self::sample::SAMPLE; -#[doc = r"Cluster"] -#[doc = "Unspecified"] -pub mod sample; diff --git a/down-the-stack/dk_pac/src/pdm/enable.rs b/down-the-stack/dk_pac/src/pdm/enable.rs deleted file mode 100644 index 201bfb5..0000000 --- a/down-the-stack/dk_pac/src/pdm/enable.rs +++ /dev/null @@ -1,126 +0,0 @@ -#[doc = "Register `ENABLE` 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 `ENABLE` 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 `ENABLE` reader - Enable or disable PDM module"] -pub type ENABLE_R = crate::BitReader; -#[doc = "Enable or disable PDM module\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum ENABLE_A { - #[doc = "0: Disable"] - DISABLED = 0, - #[doc = "1: Enable"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: ENABLE_A) -> Self { - variant as u8 != 0 - } -} -impl ENABLE_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> ENABLE_A { - match self.bits { - false => ENABLE_A::DISABLED, - true => ENABLE_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == ENABLE_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == ENABLE_A::ENABLED - } -} -#[doc = "Field `ENABLE` writer - Enable or disable PDM module"] -pub type ENABLE_W<'a, const O: u8> = crate::BitWriter<'a, u32, ENABLE_SPEC, ENABLE_A, O>; -impl<'a, const O: u8> ENABLE_W<'a, O> { - #[doc = "Disable"] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(ENABLE_A::DISABLED) - } - #[doc = "Enable"] - #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(ENABLE_A::ENABLED) - } -} -impl R { - #[doc = "Bit 0 - Enable or disable PDM module"] - #[inline(always)] - pub fn enable(&self) -> ENABLE_R { - ENABLE_R::new((self.bits & 1) != 0) - } -} -impl W { - #[doc = "Bit 0 - Enable or disable PDM module"] - #[inline(always)] - #[must_use] - pub fn enable(&mut self) -> ENABLE_W<0> { - 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 - } -} -#[doc = "PDM module enable register\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 [enable](index.html) module"] -pub struct ENABLE_SPEC; -impl crate::RegisterSpec for ENABLE_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [enable::R](R) reader structure"] -impl crate::Readable for ENABLE_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [enable::W](W) writer structure"] -impl crate::Writable for ENABLE_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets ENABLE to value 0"] -impl crate::Resettable for ENABLE_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/pdm/events_end.rs b/down-the-stack/dk_pac/src/pdm/events_end.rs deleted file mode 100644 index 6fea207..0000000 --- a/down-the-stack/dk_pac/src/pdm/events_end.rs +++ /dev/null @@ -1,127 +0,0 @@ -#[doc = "Register `EVENTS_END` 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 `EVENTS_END` 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 `EVENTS_END` reader - The PDM has written the last sample specified by SAMPLE.MAXCNT (or the last sample after a STOP task has been received) to Data RAM"] -pub type EVENTS_END_R = crate::BitReader; -#[doc = "The PDM has written the last sample specified by SAMPLE.MAXCNT (or the last sample after a STOP task has been received) to Data RAM\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum EVENTS_END_A { - #[doc = "0: Event not generated"] - NOT_GENERATED = 0, - #[doc = "1: Event generated"] - GENERATED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: EVENTS_END_A) -> Self { - variant as u8 != 0 - } -} -impl EVENTS_END_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> EVENTS_END_A { - match self.bits { - false => EVENTS_END_A::NOT_GENERATED, - true => EVENTS_END_A::GENERATED, - } - } - #[doc = "Checks if the value of the field is `NOT_GENERATED`"] - #[inline(always)] - pub fn is_not_generated(&self) -> bool { - *self == EVENTS_END_A::NOT_GENERATED - } - #[doc = "Checks if the value of the field is `GENERATED`"] - #[inline(always)] - pub fn is_generated(&self) -> bool { - *self == EVENTS_END_A::GENERATED - } -} -#[doc = "Field `EVENTS_END` writer - The PDM has written the last sample specified by SAMPLE.MAXCNT (or the last sample after a STOP task has been received) to Data RAM"] -pub type EVENTS_END_W<'a, const O: u8> = - crate::BitWriter<'a, u32, EVENTS_END_SPEC, EVENTS_END_A, O>; -impl<'a, const O: u8> EVENTS_END_W<'a, O> { - #[doc = "Event not generated"] - #[inline(always)] - pub fn not_generated(self) -> &'a mut W { - self.variant(EVENTS_END_A::NOT_GENERATED) - } - #[doc = "Event generated"] - #[inline(always)] - pub fn generated(self) -> &'a mut W { - self.variant(EVENTS_END_A::GENERATED) - } -} -impl R { - #[doc = "Bit 0 - The PDM has written the last sample specified by SAMPLE.MAXCNT (or the last sample after a STOP task has been received) to Data RAM"] - #[inline(always)] - pub fn events_end(&self) -> EVENTS_END_R { - EVENTS_END_R::new((self.bits & 1) != 0) - } -} -impl W { - #[doc = "Bit 0 - The PDM has written the last sample specified by SAMPLE.MAXCNT (or the last sample after a STOP task has been received) to Data RAM"] - #[inline(always)] - #[must_use] - pub fn events_end(&mut self) -> EVENTS_END_W<0> { - EVENTS_END_W::new(self) - } - #[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 = "The PDM has written the last sample specified by SAMPLE.MAXCNT (or the last sample after a STOP task has been received) to Data RAM\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 [events_end](index.html) module"] -pub struct EVENTS_END_SPEC; -impl crate::RegisterSpec for EVENTS_END_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [events_end::R](R) reader structure"] -impl crate::Readable for EVENTS_END_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [events_end::W](W) writer structure"] -impl crate::Writable for EVENTS_END_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets EVENTS_END to value 0"] -impl crate::Resettable for EVENTS_END_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/pdm/events_started.rs b/down-the-stack/dk_pac/src/pdm/events_started.rs deleted file mode 100644 index a547b36..0000000 --- a/down-the-stack/dk_pac/src/pdm/events_started.rs +++ /dev/null @@ -1,127 +0,0 @@ -#[doc = "Register `EVENTS_STARTED` 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 `EVENTS_STARTED` 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 `EVENTS_STARTED` reader - PDM transfer has started"] -pub type EVENTS_STARTED_R = crate::BitReader; -#[doc = "PDM transfer has started\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum EVENTS_STARTED_A { - #[doc = "0: Event not generated"] - NOT_GENERATED = 0, - #[doc = "1: Event generated"] - GENERATED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: EVENTS_STARTED_A) -> Self { - variant as u8 != 0 - } -} -impl EVENTS_STARTED_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> EVENTS_STARTED_A { - match self.bits { - false => EVENTS_STARTED_A::NOT_GENERATED, - true => EVENTS_STARTED_A::GENERATED, - } - } - #[doc = "Checks if the value of the field is `NOT_GENERATED`"] - #[inline(always)] - pub fn is_not_generated(&self) -> bool { - *self == EVENTS_STARTED_A::NOT_GENERATED - } - #[doc = "Checks if the value of the field is `GENERATED`"] - #[inline(always)] - pub fn is_generated(&self) -> bool { - *self == EVENTS_STARTED_A::GENERATED - } -} -#[doc = "Field `EVENTS_STARTED` writer - PDM transfer has started"] -pub type EVENTS_STARTED_W<'a, const O: u8> = - crate::BitWriter<'a, u32, EVENTS_STARTED_SPEC, EVENTS_STARTED_A, O>; -impl<'a, const O: u8> EVENTS_STARTED_W<'a, O> { - #[doc = "Event not generated"] - #[inline(always)] - pub fn not_generated(self) -> &'a mut W { - self.variant(EVENTS_STARTED_A::NOT_GENERATED) - } - #[doc = "Event generated"] - #[inline(always)] - pub fn generated(self) -> &'a mut W { - self.variant(EVENTS_STARTED_A::GENERATED) - } -} -impl R { - #[doc = "Bit 0 - PDM transfer has started"] - #[inline(always)] - pub fn events_started(&self) -> EVENTS_STARTED_R { - EVENTS_STARTED_R::new((self.bits & 1) != 0) - } -} -impl W { - #[doc = "Bit 0 - PDM transfer has started"] - #[inline(always)] - #[must_use] - pub fn events_started(&mut self) -> EVENTS_STARTED_W<0> { - EVENTS_STARTED_W::new(self) - } - #[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 = "PDM transfer has started\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 [events_started](index.html) module"] -pub struct EVENTS_STARTED_SPEC; -impl crate::RegisterSpec for EVENTS_STARTED_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [events_started::R](R) reader structure"] -impl crate::Readable for EVENTS_STARTED_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [events_started::W](W) writer structure"] -impl crate::Writable for EVENTS_STARTED_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets EVENTS_STARTED to value 0"] -impl crate::Resettable for EVENTS_STARTED_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/pdm/events_stopped.rs b/down-the-stack/dk_pac/src/pdm/events_stopped.rs deleted file mode 100644 index 2ab1a75..0000000 --- a/down-the-stack/dk_pac/src/pdm/events_stopped.rs +++ /dev/null @@ -1,127 +0,0 @@ -#[doc = "Register `EVENTS_STOPPED` 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 `EVENTS_STOPPED` 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 `EVENTS_STOPPED` reader - PDM transfer has finished"] -pub type EVENTS_STOPPED_R = crate::BitReader; -#[doc = "PDM transfer has finished\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum EVENTS_STOPPED_A { - #[doc = "0: Event not generated"] - NOT_GENERATED = 0, - #[doc = "1: Event generated"] - GENERATED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: EVENTS_STOPPED_A) -> Self { - variant as u8 != 0 - } -} -impl EVENTS_STOPPED_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> EVENTS_STOPPED_A { - match self.bits { - false => EVENTS_STOPPED_A::NOT_GENERATED, - true => EVENTS_STOPPED_A::GENERATED, - } - } - #[doc = "Checks if the value of the field is `NOT_GENERATED`"] - #[inline(always)] - pub fn is_not_generated(&self) -> bool { - *self == EVENTS_STOPPED_A::NOT_GENERATED - } - #[doc = "Checks if the value of the field is `GENERATED`"] - #[inline(always)] - pub fn is_generated(&self) -> bool { - *self == EVENTS_STOPPED_A::GENERATED - } -} -#[doc = "Field `EVENTS_STOPPED` writer - PDM transfer has finished"] -pub type EVENTS_STOPPED_W<'a, const O: u8> = - crate::BitWriter<'a, u32, EVENTS_STOPPED_SPEC, EVENTS_STOPPED_A, O>; -impl<'a, const O: u8> EVENTS_STOPPED_W<'a, O> { - #[doc = "Event not generated"] - #[inline(always)] - pub fn not_generated(self) -> &'a mut W { - self.variant(EVENTS_STOPPED_A::NOT_GENERATED) - } - #[doc = "Event generated"] - #[inline(always)] - pub fn generated(self) -> &'a mut W { - self.variant(EVENTS_STOPPED_A::GENERATED) - } -} -impl R { - #[doc = "Bit 0 - PDM transfer has finished"] - #[inline(always)] - pub fn events_stopped(&self) -> EVENTS_STOPPED_R { - EVENTS_STOPPED_R::new((self.bits & 1) != 0) - } -} -impl W { - #[doc = "Bit 0 - PDM transfer has finished"] - #[inline(always)] - #[must_use] - pub fn events_stopped(&mut self) -> EVENTS_STOPPED_W<0> { - EVENTS_STOPPED_W::new(self) - } - #[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 = "PDM transfer has finished\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 [events_stopped](index.html) module"] -pub struct EVENTS_STOPPED_SPEC; -impl crate::RegisterSpec for EVENTS_STOPPED_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [events_stopped::R](R) reader structure"] -impl crate::Readable for EVENTS_STOPPED_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [events_stopped::W](W) writer structure"] -impl crate::Writable for EVENTS_STOPPED_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets EVENTS_STOPPED to value 0"] -impl crate::Resettable for EVENTS_STOPPED_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/pdm/gainl.rs b/down-the-stack/dk_pac/src/pdm/gainl.rs deleted file mode 100644 index cea3412..0000000 --- a/down-the-stack/dk_pac/src/pdm/gainl.rs +++ /dev/null @@ -1,141 +0,0 @@ -#[doc = "Register `GAINL` 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 `GAINL` 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 `GAINL` reader - Left output gain adjustment, in 0.5 dB steps, around the default module gain (see electrical parameters) 0x00 -20 dB gain adjust 0x01 -19.5 dB gain adjust (...) 0x27 -0.5 dB gain adjust 0x28 0 dB gain adjust 0x29 +0.5 dB gain adjust (...) 0x4F +19.5 dB gain adjust 0x50 +20 dB gain adjust"] -pub type GAINL_R = crate::FieldReader; -#[doc = "Left output gain adjustment, in 0.5 dB steps, around the default module gain (see electrical parameters) 0x00 -20 dB gain adjust 0x01 -19.5 dB gain adjust (...) 0x27 -0.5 dB gain adjust 0x28 0 dB gain adjust 0x29 +0.5 dB gain adjust (...) 0x4F +19.5 dB gain adjust 0x50 +20 dB gain adjust\n\nValue on reset: 40"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -#[repr(u8)] -pub enum GAINL_A { - #[doc = "0: -20dB gain adjustment (minimum)"] - MIN_GAIN = 0, - #[doc = "40: 0dB gain adjustment ('2500 RMS' requirement)"] - DEFAULT_GAIN = 40, - #[doc = "80: +20dB gain adjustment (maximum)"] - MAX_GAIN = 80, -} -impl From for u8 { - #[inline(always)] - fn from(variant: GAINL_A) -> Self { - variant as _ - } -} -impl GAINL_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> Option { - match self.bits { - 0 => Some(GAINL_A::MIN_GAIN), - 40 => Some(GAINL_A::DEFAULT_GAIN), - 80 => Some(GAINL_A::MAX_GAIN), - _ => None, - } - } - #[doc = "Checks if the value of the field is `MIN_GAIN`"] - #[inline(always)] - pub fn is_min_gain(&self) -> bool { - *self == GAINL_A::MIN_GAIN - } - #[doc = "Checks if the value of the field is `DEFAULT_GAIN`"] - #[inline(always)] - pub fn is_default_gain(&self) -> bool { - *self == GAINL_A::DEFAULT_GAIN - } - #[doc = "Checks if the value of the field is `MAX_GAIN`"] - #[inline(always)] - pub fn is_max_gain(&self) -> bool { - *self == GAINL_A::MAX_GAIN - } -} -#[doc = "Field `GAINL` writer - Left output gain adjustment, in 0.5 dB steps, around the default module gain (see electrical parameters) 0x00 -20 dB gain adjust 0x01 -19.5 dB gain adjust (...) 0x27 -0.5 dB gain adjust 0x28 0 dB gain adjust 0x29 +0.5 dB gain adjust (...) 0x4F +19.5 dB gain adjust 0x50 +20 dB gain adjust"] -pub type GAINL_W<'a, const O: u8> = crate::FieldWriter<'a, u32, GAINL_SPEC, u8, GAINL_A, 7, O>; -impl<'a, const O: u8> GAINL_W<'a, O> { - #[doc = "-20dB gain adjustment (minimum)"] - #[inline(always)] - pub fn min_gain(self) -> &'a mut W { - self.variant(GAINL_A::MIN_GAIN) - } - #[doc = "0dB gain adjustment ('2500 RMS' requirement)"] - #[inline(always)] - pub fn default_gain(self) -> &'a mut W { - self.variant(GAINL_A::DEFAULT_GAIN) - } - #[doc = "+20dB gain adjustment (maximum)"] - #[inline(always)] - pub fn max_gain(self) -> &'a mut W { - self.variant(GAINL_A::MAX_GAIN) - } -} -impl R { - #[doc = "Bits 0:6 - Left output gain adjustment, in 0.5 dB steps, around the default module gain (see electrical parameters) 0x00 -20 dB gain adjust 0x01 -19.5 dB gain adjust (...) 0x27 -0.5 dB gain adjust 0x28 0 dB gain adjust 0x29 +0.5 dB gain adjust (...) 0x4F +19.5 dB gain adjust 0x50 +20 dB gain adjust"] - #[inline(always)] - pub fn gainl(&self) -> GAINL_R { - GAINL_R::new((self.bits & 0x7f) as u8) - } -} -impl W { - #[doc = "Bits 0:6 - Left output gain adjustment, in 0.5 dB steps, around the default module gain (see electrical parameters) 0x00 -20 dB gain adjust 0x01 -19.5 dB gain adjust (...) 0x27 -0.5 dB gain adjust 0x28 0 dB gain adjust 0x29 +0.5 dB gain adjust (...) 0x4F +19.5 dB gain adjust 0x50 +20 dB gain adjust"] - #[inline(always)] - #[must_use] - pub fn gainl(&mut self) -> GAINL_W<0> { - GAINL_W::new(self) - } - #[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 = "Left output gain adjustment\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 [gainl](index.html) module"] -pub struct GAINL_SPEC; -impl crate::RegisterSpec for GAINL_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [gainl::R](R) reader structure"] -impl crate::Readable for GAINL_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [gainl::W](W) writer structure"] -impl crate::Writable for GAINL_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets GAINL to value 0x28"] -impl crate::Resettable for GAINL_SPEC { - const RESET_VALUE: Self::Ux = 0x28; -} diff --git a/down-the-stack/dk_pac/src/pdm/gainr.rs b/down-the-stack/dk_pac/src/pdm/gainr.rs deleted file mode 100644 index 9c9e128..0000000 --- a/down-the-stack/dk_pac/src/pdm/gainr.rs +++ /dev/null @@ -1,141 +0,0 @@ -#[doc = "Register `GAINR` 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 `GAINR` 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 `GAINR` reader - Right output gain adjustment, in 0.5 dB steps, around the default module gain (see electrical parameters)"] -pub type GAINR_R = crate::FieldReader; -#[doc = "Right output gain adjustment, in 0.5 dB steps, around the default module gain (see electrical parameters)\n\nValue on reset: 40"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -#[repr(u8)] -pub enum GAINR_A { - #[doc = "0: -20dB gain adjustment (minimum)"] - MIN_GAIN = 0, - #[doc = "40: 0dB gain adjustment ('2500 RMS' requirement)"] - DEFAULT_GAIN = 40, - #[doc = "80: +20dB gain adjustment (maximum)"] - MAX_GAIN = 80, -} -impl From for u8 { - #[inline(always)] - fn from(variant: GAINR_A) -> Self { - variant as _ - } -} -impl GAINR_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> Option { - match self.bits { - 0 => Some(GAINR_A::MIN_GAIN), - 40 => Some(GAINR_A::DEFAULT_GAIN), - 80 => Some(GAINR_A::MAX_GAIN), - _ => None, - } - } - #[doc = "Checks if the value of the field is `MIN_GAIN`"] - #[inline(always)] - pub fn is_min_gain(&self) -> bool { - *self == GAINR_A::MIN_GAIN - } - #[doc = "Checks if the value of the field is `DEFAULT_GAIN`"] - #[inline(always)] - pub fn is_default_gain(&self) -> bool { - *self == GAINR_A::DEFAULT_GAIN - } - #[doc = "Checks if the value of the field is `MAX_GAIN`"] - #[inline(always)] - pub fn is_max_gain(&self) -> bool { - *self == GAINR_A::MAX_GAIN - } -} -#[doc = "Field `GAINR` writer - Right output gain adjustment, in 0.5 dB steps, around the default module gain (see electrical parameters)"] -pub type GAINR_W<'a, const O: u8> = crate::FieldWriter<'a, u32, GAINR_SPEC, u8, GAINR_A, 8, O>; -impl<'a, const O: u8> GAINR_W<'a, O> { - #[doc = "-20dB gain adjustment (minimum)"] - #[inline(always)] - pub fn min_gain(self) -> &'a mut W { - self.variant(GAINR_A::MIN_GAIN) - } - #[doc = "0dB gain adjustment ('2500 RMS' requirement)"] - #[inline(always)] - pub fn default_gain(self) -> &'a mut W { - self.variant(GAINR_A::DEFAULT_GAIN) - } - #[doc = "+20dB gain adjustment (maximum)"] - #[inline(always)] - pub fn max_gain(self) -> &'a mut W { - self.variant(GAINR_A::MAX_GAIN) - } -} -impl R { - #[doc = "Bits 0:7 - Right output gain adjustment, in 0.5 dB steps, around the default module gain (see electrical parameters)"] - #[inline(always)] - pub fn gainr(&self) -> GAINR_R { - GAINR_R::new((self.bits & 0xff) as u8) - } -} -impl W { - #[doc = "Bits 0:7 - Right output gain adjustment, in 0.5 dB steps, around the default module gain (see electrical parameters)"] - #[inline(always)] - #[must_use] - pub fn gainr(&mut self) -> GAINR_W<0> { - GAINR_W::new(self) - } - #[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 = "Right output gain adjustment\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 [gainr](index.html) module"] -pub struct GAINR_SPEC; -impl crate::RegisterSpec for GAINR_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [gainr::R](R) reader structure"] -impl crate::Readable for GAINR_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [gainr::W](W) writer structure"] -impl crate::Writable for GAINR_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets GAINR to value 0x28"] -impl crate::Resettable for GAINR_SPEC { - const RESET_VALUE: Self::Ux = 0x28; -} diff --git a/down-the-stack/dk_pac/src/pdm/inten.rs b/down-the-stack/dk_pac/src/pdm/inten.rs deleted file mode 100644 index 6e96d08..0000000 --- a/down-the-stack/dk_pac/src/pdm/inten.rs +++ /dev/null @@ -1,248 +0,0 @@ -#[doc = "Register `INTEN` 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 `INTEN` 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 `STARTED` reader - Enable or disable interrupt for event STARTED"] -pub type STARTED_R = crate::BitReader; -#[doc = "Enable or disable interrupt for event STARTED\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum STARTED_A { - #[doc = "0: Disable"] - DISABLED = 0, - #[doc = "1: Enable"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: STARTED_A) -> Self { - variant as u8 != 0 - } -} -impl STARTED_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> STARTED_A { - match self.bits { - false => STARTED_A::DISABLED, - true => STARTED_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == STARTED_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == STARTED_A::ENABLED - } -} -#[doc = "Field `STARTED` writer - Enable or disable interrupt for event STARTED"] -pub type STARTED_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTEN_SPEC, STARTED_A, O>; -impl<'a, const O: u8> STARTED_W<'a, O> { - #[doc = "Disable"] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(STARTED_A::DISABLED) - } - #[doc = "Enable"] - #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(STARTED_A::ENABLED) - } -} -#[doc = "Field `STOPPED` reader - Enable or disable interrupt for event STOPPED"] -pub type STOPPED_R = crate::BitReader; -#[doc = "Enable or disable interrupt for event STOPPED\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum STOPPED_A { - #[doc = "0: Disable"] - DISABLED = 0, - #[doc = "1: Enable"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: STOPPED_A) -> Self { - variant as u8 != 0 - } -} -impl STOPPED_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> STOPPED_A { - match self.bits { - false => STOPPED_A::DISABLED, - true => STOPPED_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == STOPPED_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == STOPPED_A::ENABLED - } -} -#[doc = "Field `STOPPED` writer - Enable or disable interrupt for event STOPPED"] -pub type STOPPED_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTEN_SPEC, STOPPED_A, O>; -impl<'a, const O: u8> STOPPED_W<'a, O> { - #[doc = "Disable"] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(STOPPED_A::DISABLED) - } - #[doc = "Enable"] - #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(STOPPED_A::ENABLED) - } -} -#[doc = "Field `END` reader - Enable or disable interrupt for event END"] -pub type END_R = crate::BitReader; -#[doc = "Enable or disable interrupt for event END\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum END_A { - #[doc = "0: Disable"] - DISABLED = 0, - #[doc = "1: Enable"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: END_A) -> Self { - variant as u8 != 0 - } -} -impl END_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> END_A { - match self.bits { - false => END_A::DISABLED, - true => END_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == END_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == END_A::ENABLED - } -} -#[doc = "Field `END` writer - Enable or disable interrupt for event END"] -pub type END_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTEN_SPEC, END_A, O>; -impl<'a, const O: u8> END_W<'a, O> { - #[doc = "Disable"] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(END_A::DISABLED) - } - #[doc = "Enable"] - #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(END_A::ENABLED) - } -} -impl R { - #[doc = "Bit 0 - Enable or disable interrupt for event STARTED"] - #[inline(always)] - pub fn started(&self) -> STARTED_R { - STARTED_R::new((self.bits & 1) != 0) - } - #[doc = "Bit 1 - Enable or disable interrupt for event STOPPED"] - #[inline(always)] - pub fn stopped(&self) -> STOPPED_R { - STOPPED_R::new(((self.bits >> 1) & 1) != 0) - } - #[doc = "Bit 2 - Enable or disable interrupt for event END"] - #[inline(always)] - pub fn end(&self) -> END_R { - END_R::new(((self.bits >> 2) & 1) != 0) - } -} -impl W { - #[doc = "Bit 0 - Enable or disable interrupt for event STARTED"] - #[inline(always)] - #[must_use] - pub fn started(&mut self) -> STARTED_W<0> { - STARTED_W::new(self) - } - #[doc = "Bit 1 - Enable or disable interrupt for event STOPPED"] - #[inline(always)] - #[must_use] - pub fn stopped(&mut self) -> STOPPED_W<1> { - STOPPED_W::new(self) - } - #[doc = "Bit 2 - Enable or disable interrupt for event END"] - #[inline(always)] - #[must_use] - pub fn end(&mut self) -> END_W<2> { - END_W::new(self) - } - #[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 = "Enable or disable interrupt\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 [inten](index.html) module"] -pub struct INTEN_SPEC; -impl crate::RegisterSpec for INTEN_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [inten::R](R) reader structure"] -impl crate::Readable for INTEN_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [inten::W](W) writer structure"] -impl crate::Writable for INTEN_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets INTEN to value 0"] -impl crate::Resettable for INTEN_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/pdm/intenclr.rs b/down-the-stack/dk_pac/src/pdm/intenclr.rs deleted file mode 100644 index dbc9e0c..0000000 --- a/down-the-stack/dk_pac/src/pdm/intenclr.rs +++ /dev/null @@ -1,269 +0,0 @@ -#[doc = "Register `INTENCLR` 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 `INTENCLR` 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 `STARTED` reader - Write '1' to disable interrupt for event STARTED"] -pub type STARTED_R = crate::BitReader; -#[doc = "Write '1' to disable interrupt for event STARTED\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum STARTED_A { - #[doc = "0: Read: Disabled"] - DISABLED = 0, - #[doc = "1: Read: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: STARTED_A) -> Self { - variant as u8 != 0 - } -} -impl STARTED_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> STARTED_A { - match self.bits { - false => STARTED_A::DISABLED, - true => STARTED_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == STARTED_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == STARTED_A::ENABLED - } -} -#[doc = "Write '1' to disable interrupt for event STARTED\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum STARTED_AW { - #[doc = "1: Disable"] - CLEAR = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: STARTED_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `STARTED` writer - Write '1' to disable interrupt for event STARTED"] -pub type STARTED_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENCLR_SPEC, STARTED_AW, O>; -impl<'a, const O: u8> STARTED_W<'a, O> { - #[doc = "Disable"] - #[inline(always)] - pub fn clear(self) -> &'a mut W { - self.variant(STARTED_AW::CLEAR) - } -} -#[doc = "Field `STOPPED` reader - Write '1' to disable interrupt for event STOPPED"] -pub type STOPPED_R = crate::BitReader; -#[doc = "Write '1' to disable interrupt for event STOPPED\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum STOPPED_A { - #[doc = "0: Read: Disabled"] - DISABLED = 0, - #[doc = "1: Read: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: STOPPED_A) -> Self { - variant as u8 != 0 - } -} -impl STOPPED_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> STOPPED_A { - match self.bits { - false => STOPPED_A::DISABLED, - true => STOPPED_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == STOPPED_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == STOPPED_A::ENABLED - } -} -#[doc = "Write '1' to disable interrupt for event STOPPED\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum STOPPED_AW { - #[doc = "1: Disable"] - CLEAR = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: STOPPED_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `STOPPED` writer - Write '1' to disable interrupt for event STOPPED"] -pub type STOPPED_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENCLR_SPEC, STOPPED_AW, O>; -impl<'a, const O: u8> STOPPED_W<'a, O> { - #[doc = "Disable"] - #[inline(always)] - pub fn clear(self) -> &'a mut W { - self.variant(STOPPED_AW::CLEAR) - } -} -#[doc = "Field `END` reader - Write '1' to disable interrupt for event END"] -pub type END_R = crate::BitReader; -#[doc = "Write '1' to disable interrupt for event END\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum END_A { - #[doc = "0: Read: Disabled"] - DISABLED = 0, - #[doc = "1: Read: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: END_A) -> Self { - variant as u8 != 0 - } -} -impl END_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> END_A { - match self.bits { - false => END_A::DISABLED, - true => END_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == END_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == END_A::ENABLED - } -} -#[doc = "Write '1' to disable interrupt for event END\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum END_AW { - #[doc = "1: Disable"] - CLEAR = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: END_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `END` writer - Write '1' to disable interrupt for event END"] -pub type END_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENCLR_SPEC, END_AW, O>; -impl<'a, const O: u8> END_W<'a, O> { - #[doc = "Disable"] - #[inline(always)] - pub fn clear(self) -> &'a mut W { - self.variant(END_AW::CLEAR) - } -} -impl R { - #[doc = "Bit 0 - Write '1' to disable interrupt for event STARTED"] - #[inline(always)] - pub fn started(&self) -> STARTED_R { - STARTED_R::new((self.bits & 1) != 0) - } - #[doc = "Bit 1 - Write '1' to disable interrupt for event STOPPED"] - #[inline(always)] - pub fn stopped(&self) -> STOPPED_R { - STOPPED_R::new(((self.bits >> 1) & 1) != 0) - } - #[doc = "Bit 2 - Write '1' to disable interrupt for event END"] - #[inline(always)] - pub fn end(&self) -> END_R { - END_R::new(((self.bits >> 2) & 1) != 0) - } -} -impl W { - #[doc = "Bit 0 - Write '1' to disable interrupt for event STARTED"] - #[inline(always)] - #[must_use] - pub fn started(&mut self) -> STARTED_W<0> { - STARTED_W::new(self) - } - #[doc = "Bit 1 - Write '1' to disable interrupt for event STOPPED"] - #[inline(always)] - #[must_use] - pub fn stopped(&mut self) -> STOPPED_W<1> { - STOPPED_W::new(self) - } - #[doc = "Bit 2 - Write '1' to disable interrupt for event END"] - #[inline(always)] - #[must_use] - pub fn end(&mut self) -> END_W<2> { - END_W::new(self) - } - #[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 = "Disable interrupt\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 [intenclr](index.html) module"] -pub struct INTENCLR_SPEC; -impl crate::RegisterSpec for INTENCLR_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [intenclr::R](R) reader structure"] -impl crate::Readable for INTENCLR_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [intenclr::W](W) writer structure"] -impl crate::Writable for INTENCLR_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets INTENCLR to value 0"] -impl crate::Resettable for INTENCLR_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/pdm/intenset.rs b/down-the-stack/dk_pac/src/pdm/intenset.rs deleted file mode 100644 index 52cbbf2..0000000 --- a/down-the-stack/dk_pac/src/pdm/intenset.rs +++ /dev/null @@ -1,269 +0,0 @@ -#[doc = "Register `INTENSET` 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 `INTENSET` 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 `STARTED` reader - Write '1' to enable interrupt for event STARTED"] -pub type STARTED_R = crate::BitReader; -#[doc = "Write '1' to enable interrupt for event STARTED\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum STARTED_A { - #[doc = "0: Read: Disabled"] - DISABLED = 0, - #[doc = "1: Read: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: STARTED_A) -> Self { - variant as u8 != 0 - } -} -impl STARTED_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> STARTED_A { - match self.bits { - false => STARTED_A::DISABLED, - true => STARTED_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == STARTED_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == STARTED_A::ENABLED - } -} -#[doc = "Write '1' to enable interrupt for event STARTED\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum STARTED_AW { - #[doc = "1: Enable"] - SET = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: STARTED_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `STARTED` writer - Write '1' to enable interrupt for event STARTED"] -pub type STARTED_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENSET_SPEC, STARTED_AW, O>; -impl<'a, const O: u8> STARTED_W<'a, O> { - #[doc = "Enable"] - #[inline(always)] - pub fn set(self) -> &'a mut W { - self.variant(STARTED_AW::SET) - } -} -#[doc = "Field `STOPPED` reader - Write '1' to enable interrupt for event STOPPED"] -pub type STOPPED_R = crate::BitReader; -#[doc = "Write '1' to enable interrupt for event STOPPED\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum STOPPED_A { - #[doc = "0: Read: Disabled"] - DISABLED = 0, - #[doc = "1: Read: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: STOPPED_A) -> Self { - variant as u8 != 0 - } -} -impl STOPPED_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> STOPPED_A { - match self.bits { - false => STOPPED_A::DISABLED, - true => STOPPED_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == STOPPED_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == STOPPED_A::ENABLED - } -} -#[doc = "Write '1' to enable interrupt for event STOPPED\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum STOPPED_AW { - #[doc = "1: Enable"] - SET = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: STOPPED_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `STOPPED` writer - Write '1' to enable interrupt for event STOPPED"] -pub type STOPPED_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENSET_SPEC, STOPPED_AW, O>; -impl<'a, const O: u8> STOPPED_W<'a, O> { - #[doc = "Enable"] - #[inline(always)] - pub fn set(self) -> &'a mut W { - self.variant(STOPPED_AW::SET) - } -} -#[doc = "Field `END` reader - Write '1' to enable interrupt for event END"] -pub type END_R = crate::BitReader; -#[doc = "Write '1' to enable interrupt for event END\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum END_A { - #[doc = "0: Read: Disabled"] - DISABLED = 0, - #[doc = "1: Read: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: END_A) -> Self { - variant as u8 != 0 - } -} -impl END_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> END_A { - match self.bits { - false => END_A::DISABLED, - true => END_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == END_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == END_A::ENABLED - } -} -#[doc = "Write '1' to enable interrupt for event END\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum END_AW { - #[doc = "1: Enable"] - SET = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: END_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `END` writer - Write '1' to enable interrupt for event END"] -pub type END_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENSET_SPEC, END_AW, O>; -impl<'a, const O: u8> END_W<'a, O> { - #[doc = "Enable"] - #[inline(always)] - pub fn set(self) -> &'a mut W { - self.variant(END_AW::SET) - } -} -impl R { - #[doc = "Bit 0 - Write '1' to enable interrupt for event STARTED"] - #[inline(always)] - pub fn started(&self) -> STARTED_R { - STARTED_R::new((self.bits & 1) != 0) - } - #[doc = "Bit 1 - Write '1' to enable interrupt for event STOPPED"] - #[inline(always)] - pub fn stopped(&self) -> STOPPED_R { - STOPPED_R::new(((self.bits >> 1) & 1) != 0) - } - #[doc = "Bit 2 - Write '1' to enable interrupt for event END"] - #[inline(always)] - pub fn end(&self) -> END_R { - END_R::new(((self.bits >> 2) & 1) != 0) - } -} -impl W { - #[doc = "Bit 0 - Write '1' to enable interrupt for event STARTED"] - #[inline(always)] - #[must_use] - pub fn started(&mut self) -> STARTED_W<0> { - STARTED_W::new(self) - } - #[doc = "Bit 1 - Write '1' to enable interrupt for event STOPPED"] - #[inline(always)] - #[must_use] - pub fn stopped(&mut self) -> STOPPED_W<1> { - STOPPED_W::new(self) - } - #[doc = "Bit 2 - Write '1' to enable interrupt for event END"] - #[inline(always)] - #[must_use] - pub fn end(&mut self) -> END_W<2> { - END_W::new(self) - } - #[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 = "Enable interrupt\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 [intenset](index.html) module"] -pub struct INTENSET_SPEC; -impl crate::RegisterSpec for INTENSET_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [intenset::R](R) reader structure"] -impl crate::Readable for INTENSET_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [intenset::W](W) writer structure"] -impl crate::Writable for INTENSET_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets INTENSET to value 0"] -impl crate::Resettable for INTENSET_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/pdm/mode.rs b/down-the-stack/dk_pac/src/pdm/mode.rs deleted file mode 100644 index 8089100..0000000 --- a/down-the-stack/dk_pac/src/pdm/mode.rs +++ /dev/null @@ -1,187 +0,0 @@ -#[doc = "Register `MODE` 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 `MODE` 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 `OPERATION` reader - Mono or stereo operation"] -pub type OPERATION_R = crate::BitReader; -#[doc = "Mono or stereo operation\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum OPERATION_A { - #[doc = "0: Sample and store one pair (Left + Right) of 16bit samples per RAM word R=\\[31:16\\]; L=\\[15:0\\]"] - STEREO = 0, - #[doc = "1: Sample and store two successive Left samples (16 bit each) per RAM word L1=\\[31:16\\]; L0=\\[15:0\\]"] - MONO = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: OPERATION_A) -> Self { - variant as u8 != 0 - } -} -impl OPERATION_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> OPERATION_A { - match self.bits { - false => OPERATION_A::STEREO, - true => OPERATION_A::MONO, - } - } - #[doc = "Checks if the value of the field is `STEREO`"] - #[inline(always)] - pub fn is_stereo(&self) -> bool { - *self == OPERATION_A::STEREO - } - #[doc = "Checks if the value of the field is `MONO`"] - #[inline(always)] - pub fn is_mono(&self) -> bool { - *self == OPERATION_A::MONO - } -} -#[doc = "Field `OPERATION` writer - Mono or stereo operation"] -pub type OPERATION_W<'a, const O: u8> = crate::BitWriter<'a, u32, MODE_SPEC, OPERATION_A, O>; -impl<'a, const O: u8> OPERATION_W<'a, O> { - #[doc = "Sample and store one pair (Left + Right) of 16bit samples per RAM word R=\\[31:16\\]; L=\\[15:0\\]"] - #[inline(always)] - pub fn stereo(self) -> &'a mut W { - self.variant(OPERATION_A::STEREO) - } - #[doc = "Sample and store two successive Left samples (16 bit each) per RAM word L1=\\[31:16\\]; L0=\\[15:0\\]"] - #[inline(always)] - pub fn mono(self) -> &'a mut W { - self.variant(OPERATION_A::MONO) - } -} -#[doc = "Field `EDGE` reader - Defines on which PDM_CLK edge Left (or mono) is sampled"] -pub type EDGE_R = crate::BitReader; -#[doc = "Defines on which PDM_CLK edge Left (or mono) is sampled\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum EDGE_A { - #[doc = "0: Left (or mono) is sampled on falling edge of PDM_CLK"] - LEFT_FALLING = 0, - #[doc = "1: Left (or mono) is sampled on rising edge of PDM_CLK"] - LEFT_RISING = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: EDGE_A) -> Self { - variant as u8 != 0 - } -} -impl EDGE_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> EDGE_A { - match self.bits { - false => EDGE_A::LEFT_FALLING, - true => EDGE_A::LEFT_RISING, - } - } - #[doc = "Checks if the value of the field is `LEFT_FALLING`"] - #[inline(always)] - pub fn is_left_falling(&self) -> bool { - *self == EDGE_A::LEFT_FALLING - } - #[doc = "Checks if the value of the field is `LEFT_RISING`"] - #[inline(always)] - pub fn is_left_rising(&self) -> bool { - *self == EDGE_A::LEFT_RISING - } -} -#[doc = "Field `EDGE` writer - Defines on which PDM_CLK edge Left (or mono) is sampled"] -pub type EDGE_W<'a, const O: u8> = crate::BitWriter<'a, u32, MODE_SPEC, EDGE_A, O>; -impl<'a, const O: u8> EDGE_W<'a, O> { - #[doc = "Left (or mono) is sampled on falling edge of PDM_CLK"] - #[inline(always)] - pub fn left_falling(self) -> &'a mut W { - self.variant(EDGE_A::LEFT_FALLING) - } - #[doc = "Left (or mono) is sampled on rising edge of PDM_CLK"] - #[inline(always)] - pub fn left_rising(self) -> &'a mut W { - self.variant(EDGE_A::LEFT_RISING) - } -} -impl R { - #[doc = "Bit 0 - Mono or stereo operation"] - #[inline(always)] - pub fn operation(&self) -> OPERATION_R { - OPERATION_R::new((self.bits & 1) != 0) - } - #[doc = "Bit 1 - Defines on which PDM_CLK edge Left (or mono) is sampled"] - #[inline(always)] - pub fn edge(&self) -> EDGE_R { - EDGE_R::new(((self.bits >> 1) & 1) != 0) - } -} -impl W { - #[doc = "Bit 0 - Mono or stereo operation"] - #[inline(always)] - #[must_use] - pub fn operation(&mut self) -> OPERATION_W<0> { - OPERATION_W::new(self) - } - #[doc = "Bit 1 - Defines on which PDM_CLK edge Left (or mono) is sampled"] - #[inline(always)] - #[must_use] - pub fn edge(&mut self) -> EDGE_W<1> { - EDGE_W::new(self) - } - #[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 = "Defines the routing of the connected PDM microphones' signals\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 [mode](index.html) module"] -pub struct MODE_SPEC; -impl crate::RegisterSpec for MODE_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [mode::R](R) reader structure"] -impl crate::Readable for MODE_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [mode::W](W) writer structure"] -impl crate::Writable for 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 MODE to value 0"] -impl crate::Resettable for MODE_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/pdm/pdmclkctrl.rs b/down-the-stack/dk_pac/src/pdm/pdmclkctrl.rs deleted file mode 100644 index 7d49132..0000000 --- a/down-the-stack/dk_pac/src/pdm/pdmclkctrl.rs +++ /dev/null @@ -1,141 +0,0 @@ -#[doc = "Register `PDMCLKCTRL` 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 `PDMCLKCTRL` 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 `FREQ` reader - PDM_CLK frequency"] -pub type FREQ_R = crate::FieldReader; -#[doc = "PDM_CLK frequency\n\nValue on reset: 138412032"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -#[repr(u32)] -pub enum FREQ_A { - #[doc = "134217728: PDM_CLK = 32 MHz / 32 = 1.000 MHz"] - _1000K = 134217728, - #[doc = "138412032: PDM_CLK = 32 MHz / 31 = 1.032 MHz"] - DEFAULT = 138412032, - #[doc = "142606336: PDM_CLK = 32 MHz / 30 = 1.067 MHz"] - _1067K = 142606336, -} -impl From for u32 { - #[inline(always)] - fn from(variant: FREQ_A) -> Self { - variant as _ - } -} -impl FREQ_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> Option { - match self.bits { - 134217728 => Some(FREQ_A::_1000K), - 138412032 => Some(FREQ_A::DEFAULT), - 142606336 => Some(FREQ_A::_1067K), - _ => None, - } - } - #[doc = "Checks if the value of the field is `_1000K`"] - #[inline(always)] - pub fn is_1000k(&self) -> bool { - *self == FREQ_A::_1000K - } - #[doc = "Checks if the value of the field is `DEFAULT`"] - #[inline(always)] - pub fn is_default(&self) -> bool { - *self == FREQ_A::DEFAULT - } - #[doc = "Checks if the value of the field is `_1067K`"] - #[inline(always)] - pub fn is_1067k(&self) -> bool { - *self == FREQ_A::_1067K - } -} -#[doc = "Field `FREQ` writer - PDM_CLK frequency"] -pub type FREQ_W<'a, const O: u8> = crate::FieldWriter<'a, u32, PDMCLKCTRL_SPEC, u32, FREQ_A, 32, O>; -impl<'a, const O: u8> FREQ_W<'a, O> { - #[doc = "PDM_CLK = 32 MHz / 32 = 1.000 MHz"] - #[inline(always)] - pub fn _1000k(self) -> &'a mut W { - self.variant(FREQ_A::_1000K) - } - #[doc = "PDM_CLK = 32 MHz / 31 = 1.032 MHz"] - #[inline(always)] - pub fn default(self) -> &'a mut W { - self.variant(FREQ_A::DEFAULT) - } - #[doc = "PDM_CLK = 32 MHz / 30 = 1.067 MHz"] - #[inline(always)] - pub fn _1067k(self) -> &'a mut W { - self.variant(FREQ_A::_1067K) - } -} -impl R { - #[doc = "Bits 0:31 - PDM_CLK frequency"] - #[inline(always)] - pub fn freq(&self) -> FREQ_R { - FREQ_R::new(self.bits) - } -} -impl W { - #[doc = "Bits 0:31 - PDM_CLK frequency"] - #[inline(always)] - #[must_use] - pub fn freq(&mut self) -> FREQ_W<0> { - FREQ_W::new(self) - } - #[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 = "PDM clock generator control\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 [pdmclkctrl](index.html) module"] -pub struct PDMCLKCTRL_SPEC; -impl crate::RegisterSpec for PDMCLKCTRL_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [pdmclkctrl::R](R) reader structure"] -impl crate::Readable for PDMCLKCTRL_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [pdmclkctrl::W](W) writer structure"] -impl crate::Writable for PDMCLKCTRL_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets PDMCLKCTRL to value 0x0840_0000"] -impl crate::Resettable for PDMCLKCTRL_SPEC { - const RESET_VALUE: Self::Ux = 0x0840_0000; -} diff --git a/down-the-stack/dk_pac/src/pdm/psel.rs b/down-the-stack/dk_pac/src/pdm/psel.rs deleted file mode 100644 index c471ca0..0000000 --- a/down-the-stack/dk_pac/src/pdm/psel.rs +++ /dev/null @@ -1,16 +0,0 @@ -#[doc = r"Register block"] -#[repr(C)] -pub struct PSEL { - #[doc = "0x00 - Pin number configuration for PDM CLK signal"] - pub clk: CLK, - #[doc = "0x04 - Pin number configuration for PDM DIN signal"] - pub din: DIN, -} -#[doc = "CLK (rw) register accessor: an alias for `Reg`"] -pub type CLK = crate::Reg; -#[doc = "Pin number configuration for PDM CLK signal"] -pub mod clk; -#[doc = "DIN (rw) register accessor: an alias for `Reg`"] -pub type DIN = crate::Reg; -#[doc = "Pin number configuration for PDM DIN signal"] -pub mod din; diff --git a/down-the-stack/dk_pac/src/pdm/psel/clk.rs b/down-the-stack/dk_pac/src/pdm/psel/clk.rs deleted file mode 100644 index 84bb3fc..0000000 --- a/down-the-stack/dk_pac/src/pdm/psel/clk.rs +++ /dev/null @@ -1,141 +0,0 @@ -#[doc = "Register `CLK` 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 `CLK` 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 `PIN` reader - Pin number"] -pub type PIN_R = crate::FieldReader; -#[doc = "Field `PIN` writer - Pin number"] -pub type PIN_W<'a, const O: u8> = crate::FieldWriter<'a, u32, CLK_SPEC, u8, u8, 5, O>; -#[doc = "Field `CONNECT` reader - Connection"] -pub type CONNECT_R = crate::BitReader; -#[doc = "Connection\n\nValue on reset: 1"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum CONNECT_A { - #[doc = "1: Disconnect"] - DISCONNECTED = 1, - #[doc = "0: Connect"] - CONNECTED = 0, -} -impl From for bool { - #[inline(always)] - fn from(variant: CONNECT_A) -> Self { - variant as u8 != 0 - } -} -impl CONNECT_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> CONNECT_A { - match self.bits { - true => CONNECT_A::DISCONNECTED, - false => CONNECT_A::CONNECTED, - } - } - #[doc = "Checks if the value of the field is `DISCONNECTED`"] - #[inline(always)] - pub fn is_disconnected(&self) -> bool { - *self == CONNECT_A::DISCONNECTED - } - #[doc = "Checks if the value of the field is `CONNECTED`"] - #[inline(always)] - pub fn is_connected(&self) -> bool { - *self == CONNECT_A::CONNECTED - } -} -#[doc = "Field `CONNECT` writer - Connection"] -pub type CONNECT_W<'a, const O: u8> = crate::BitWriter<'a, u32, CLK_SPEC, CONNECT_A, O>; -impl<'a, const O: u8> CONNECT_W<'a, O> { - #[doc = "Disconnect"] - #[inline(always)] - pub fn disconnected(self) -> &'a mut W { - self.variant(CONNECT_A::DISCONNECTED) - } - #[doc = "Connect"] - #[inline(always)] - pub fn connected(self) -> &'a mut W { - self.variant(CONNECT_A::CONNECTED) - } -} -impl R { - #[doc = "Bits 0:4 - Pin number"] - #[inline(always)] - pub fn pin(&self) -> PIN_R { - PIN_R::new((self.bits & 0x1f) as u8) - } - #[doc = "Bit 31 - Connection"] - #[inline(always)] - pub fn connect(&self) -> CONNECT_R { - CONNECT_R::new(((self.bits >> 31) & 1) != 0) - } -} -impl W { - #[doc = "Bits 0:4 - Pin number"] - #[inline(always)] - #[must_use] - pub fn pin(&mut self) -> PIN_W<0> { - PIN_W::new(self) - } - #[doc = "Bit 31 - Connection"] - #[inline(always)] - #[must_use] - pub fn connect(&mut self) -> CONNECT_W<31> { - CONNECT_W::new(self) - } - #[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 = "Pin number configuration for PDM CLK signal\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 [clk](index.html) module"] -pub struct CLK_SPEC; -impl crate::RegisterSpec for CLK_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [clk::R](R) reader structure"] -impl crate::Readable for CLK_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [clk::W](W) writer structure"] -impl crate::Writable for CLK_SPEC { - type 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 to value 0xffff_ffff"] -impl crate::Resettable for CLK_SPEC { - const RESET_VALUE: Self::Ux = 0xffff_ffff; -} diff --git a/down-the-stack/dk_pac/src/pdm/psel/din.rs b/down-the-stack/dk_pac/src/pdm/psel/din.rs deleted file mode 100644 index b85777a..0000000 --- a/down-the-stack/dk_pac/src/pdm/psel/din.rs +++ /dev/null @@ -1,141 +0,0 @@ -#[doc = "Register `DIN` 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 `DIN` 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 `PIN` reader - Pin number"] -pub type PIN_R = crate::FieldReader; -#[doc = "Field `PIN` writer - Pin number"] -pub type PIN_W<'a, const O: u8> = crate::FieldWriter<'a, u32, DIN_SPEC, u8, u8, 5, O>; -#[doc = "Field `CONNECT` reader - Connection"] -pub type CONNECT_R = crate::BitReader; -#[doc = "Connection\n\nValue on reset: 1"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum CONNECT_A { - #[doc = "1: Disconnect"] - DISCONNECTED = 1, - #[doc = "0: Connect"] - CONNECTED = 0, -} -impl From for bool { - #[inline(always)] - fn from(variant: CONNECT_A) -> Self { - variant as u8 != 0 - } -} -impl CONNECT_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> CONNECT_A { - match self.bits { - true => CONNECT_A::DISCONNECTED, - false => CONNECT_A::CONNECTED, - } - } - #[doc = "Checks if the value of the field is `DISCONNECTED`"] - #[inline(always)] - pub fn is_disconnected(&self) -> bool { - *self == CONNECT_A::DISCONNECTED - } - #[doc = "Checks if the value of the field is `CONNECTED`"] - #[inline(always)] - pub fn is_connected(&self) -> bool { - *self == CONNECT_A::CONNECTED - } -} -#[doc = "Field `CONNECT` writer - Connection"] -pub type CONNECT_W<'a, const O: u8> = crate::BitWriter<'a, u32, DIN_SPEC, CONNECT_A, O>; -impl<'a, const O: u8> CONNECT_W<'a, O> { - #[doc = "Disconnect"] - #[inline(always)] - pub fn disconnected(self) -> &'a mut W { - self.variant(CONNECT_A::DISCONNECTED) - } - #[doc = "Connect"] - #[inline(always)] - pub fn connected(self) -> &'a mut W { - self.variant(CONNECT_A::CONNECTED) - } -} -impl R { - #[doc = "Bits 0:4 - Pin number"] - #[inline(always)] - pub fn pin(&self) -> PIN_R { - PIN_R::new((self.bits & 0x1f) as u8) - } - #[doc = "Bit 31 - Connection"] - #[inline(always)] - pub fn connect(&self) -> CONNECT_R { - CONNECT_R::new(((self.bits >> 31) & 1) != 0) - } -} -impl W { - #[doc = "Bits 0:4 - Pin number"] - #[inline(always)] - #[must_use] - pub fn pin(&mut self) -> PIN_W<0> { - PIN_W::new(self) - } - #[doc = "Bit 31 - Connection"] - #[inline(always)] - #[must_use] - pub fn connect(&mut self) -> CONNECT_W<31> { - CONNECT_W::new(self) - } - #[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 = "Pin number configuration for PDM DIN signal\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 [din](index.html) module"] -pub struct DIN_SPEC; -impl crate::RegisterSpec for DIN_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [din::R](R) reader structure"] -impl crate::Readable for DIN_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [din::W](W) writer structure"] -impl crate::Writable for DIN_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets DIN to value 0xffff_ffff"] -impl crate::Resettable for DIN_SPEC { - const RESET_VALUE: Self::Ux = 0xffff_ffff; -} diff --git a/down-the-stack/dk_pac/src/pdm/sample.rs b/down-the-stack/dk_pac/src/pdm/sample.rs deleted file mode 100644 index f8bc956..0000000 --- a/down-the-stack/dk_pac/src/pdm/sample.rs +++ /dev/null @@ -1,16 +0,0 @@ -#[doc = r"Register block"] -#[repr(C)] -pub struct SAMPLE { - #[doc = "0x00 - RAM address pointer to write samples to with EasyDMA"] - pub ptr: PTR, - #[doc = "0x04 - Number of samples to allocate memory for in EasyDMA mode"] - pub maxcnt: MAXCNT, -} -#[doc = "PTR (rw) register accessor: an alias for `Reg`"] -pub type PTR = crate::Reg; -#[doc = "RAM address pointer to write samples to with EasyDMA"] -pub mod ptr; -#[doc = "MAXCNT (rw) register accessor: an alias for `Reg`"] -pub type MAXCNT = crate::Reg; -#[doc = "Number of samples to allocate memory for in EasyDMA mode"] -pub mod maxcnt; diff --git a/down-the-stack/dk_pac/src/pdm/sample/maxcnt.rs b/down-the-stack/dk_pac/src/pdm/sample/maxcnt.rs deleted file mode 100644 index 73a698b..0000000 --- a/down-the-stack/dk_pac/src/pdm/sample/maxcnt.rs +++ /dev/null @@ -1,80 +0,0 @@ -#[doc = "Register `MAXCNT` 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 `MAXCNT` 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 `BUFFSIZE` reader - Length of DMA RAM allocation in number of samples"] -pub type BUFFSIZE_R = crate::FieldReader; -#[doc = "Field `BUFFSIZE` writer - Length of DMA RAM allocation in number of samples"] -pub type BUFFSIZE_W<'a, const O: u8> = crate::FieldWriter<'a, u32, MAXCNT_SPEC, u16, u16, 15, O>; -impl R { - #[doc = "Bits 0:14 - Length of DMA RAM allocation in number of samples"] - #[inline(always)] - pub fn buffsize(&self) -> BUFFSIZE_R { - BUFFSIZE_R::new((self.bits & 0x7fff) as u16) - } -} -impl W { - #[doc = "Bits 0:14 - Length of DMA RAM allocation in number of samples"] - #[inline(always)] - #[must_use] - pub fn buffsize(&mut self) -> BUFFSIZE_W<0> { - BUFFSIZE_W::new(self) - } - #[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 = "Number of samples to allocate memory for in EasyDMA mode\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 [maxcnt](index.html) module"] -pub struct MAXCNT_SPEC; -impl crate::RegisterSpec for MAXCNT_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [maxcnt::R](R) reader structure"] -impl crate::Readable for MAXCNT_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [maxcnt::W](W) writer structure"] -impl crate::Writable for MAXCNT_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets MAXCNT to value 0"] -impl crate::Resettable for MAXCNT_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/pdm/sample/ptr.rs b/down-the-stack/dk_pac/src/pdm/sample/ptr.rs deleted file mode 100644 index 7db84ec..0000000 --- a/down-the-stack/dk_pac/src/pdm/sample/ptr.rs +++ /dev/null @@ -1,80 +0,0 @@ -#[doc = "Register `PTR` 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 `PTR` 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 `SAMPLEPTR` reader - Address to write PDM samples to over DMA"] -pub type SAMPLEPTR_R = crate::FieldReader; -#[doc = "Field `SAMPLEPTR` writer - Address to write PDM samples to over DMA"] -pub type SAMPLEPTR_W<'a, const O: u8> = crate::FieldWriter<'a, u32, PTR_SPEC, u32, u32, 32, O>; -impl R { - #[doc = "Bits 0:31 - Address to write PDM samples to over DMA"] - #[inline(always)] - pub fn sampleptr(&self) -> SAMPLEPTR_R { - SAMPLEPTR_R::new(self.bits) - } -} -impl W { - #[doc = "Bits 0:31 - Address to write PDM samples to over DMA"] - #[inline(always)] - #[must_use] - pub fn sampleptr(&mut self) -> SAMPLEPTR_W<0> { - SAMPLEPTR_W::new(self) - } - #[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 = "RAM address pointer to write samples to with EasyDMA\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 [ptr](index.html) module"] -pub struct PTR_SPEC; -impl crate::RegisterSpec for PTR_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [ptr::R](R) reader structure"] -impl crate::Readable for PTR_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [ptr::W](W) writer structure"] -impl crate::Writable for PTR_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets PTR to value 0"] -impl crate::Resettable for PTR_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/pdm/tasks_start.rs b/down-the-stack/dk_pac/src/pdm/tasks_start.rs deleted file mode 100644 index 89fbc4e..0000000 --- a/down-the-stack/dk_pac/src/pdm/tasks_start.rs +++ /dev/null @@ -1,72 +0,0 @@ -#[doc = "Register `TASKS_START` 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 = "Starts continuous PDM transfer\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum TASKS_START_AW { - #[doc = "1: Trigger task"] - TRIGGER = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: TASKS_START_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `TASKS_START` writer - Starts continuous PDM transfer"] -pub type TASKS_START_W<'a, const O: u8> = - crate::BitWriter<'a, u32, TASKS_START_SPEC, TASKS_START_AW, O>; -impl<'a, const O: u8> TASKS_START_W<'a, O> { - #[doc = "Trigger task"] - #[inline(always)] - pub fn trigger(self) -> &'a mut W { - self.variant(TASKS_START_AW::TRIGGER) - } -} -impl W { - #[doc = "Bit 0 - Starts continuous PDM transfer"] - #[inline(always)] - #[must_use] - pub fn tasks_start(&mut self) -> TASKS_START_W<0> { - TASKS_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 - } -} -#[doc = "Starts continuous PDM transfer\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 [tasks_start](index.html) module"] -pub struct TASKS_START_SPEC; -impl crate::RegisterSpec for TASKS_START_SPEC { - type Ux = u32; -} -#[doc = "`write(|w| ..)` method takes [tasks_start::W](W) writer structure"] -impl crate::Writable for TASKS_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 TASKS_START to value 0"] -impl crate::Resettable for TASKS_START_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/pdm/tasks_stop.rs b/down-the-stack/dk_pac/src/pdm/tasks_stop.rs deleted file mode 100644 index ce006c3..0000000 --- a/down-the-stack/dk_pac/src/pdm/tasks_stop.rs +++ /dev/null @@ -1,72 +0,0 @@ -#[doc = "Register `TASKS_STOP` 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 = "Stops PDM transfer\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum TASKS_STOP_AW { - #[doc = "1: Trigger task"] - TRIGGER = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: TASKS_STOP_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `TASKS_STOP` writer - Stops PDM transfer"] -pub type TASKS_STOP_W<'a, const O: u8> = - crate::BitWriter<'a, u32, TASKS_STOP_SPEC, TASKS_STOP_AW, O>; -impl<'a, const O: u8> TASKS_STOP_W<'a, O> { - #[doc = "Trigger task"] - #[inline(always)] - pub fn trigger(self) -> &'a mut W { - self.variant(TASKS_STOP_AW::TRIGGER) - } -} -impl W { - #[doc = "Bit 0 - Stops PDM transfer"] - #[inline(always)] - #[must_use] - pub fn tasks_stop(&mut self) -> TASKS_STOP_W<0> { - TASKS_STOP_W::new(self) - } - #[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 = "Stops PDM transfer\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 [tasks_stop](index.html) module"] -pub struct TASKS_STOP_SPEC; -impl crate::RegisterSpec for TASKS_STOP_SPEC { - type Ux = u32; -} -#[doc = "`write(|w| ..)` method takes [tasks_stop::W](W) writer structure"] -impl crate::Writable for TASKS_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 TASKS_STOP to value 0"] -impl crate::Resettable for TASKS_STOP_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/power.rs b/down-the-stack/dk_pac/src/power.rs deleted file mode 100644 index 3bffcb2..0000000 --- a/down-the-stack/dk_pac/src/power.rs +++ /dev/null @@ -1,140 +0,0 @@ -#[doc = r"Register block"] -#[repr(C)] -pub struct RegisterBlock { - _reserved0: [u8; 0x78], - #[doc = "0x78 - Enable constant latency mode"] - pub tasks_constlat: TASKS_CONSTLAT, - #[doc = "0x7c - Enable low power mode (variable latency)"] - pub tasks_lowpwr: TASKS_LOWPWR, - _reserved2: [u8; 0x88], - #[doc = "0x108 - Power failure warning"] - pub events_pofwarn: EVENTS_POFWARN, - _reserved3: [u8; 0x08], - #[doc = "0x114 - CPU entered WFI/WFE sleep"] - pub events_sleepenter: EVENTS_SLEEPENTER, - #[doc = "0x118 - CPU exited WFI/WFE sleep"] - pub events_sleepexit: EVENTS_SLEEPEXIT, - _reserved5: [u8; 0x01e8], - #[doc = "0x304 - Enable interrupt"] - pub intenset: INTENSET, - #[doc = "0x308 - Disable interrupt"] - pub intenclr: INTENCLR, - _reserved7: [u8; 0xf4], - #[doc = "0x400 - Reset reason"] - pub resetreas: RESETREAS, - _reserved8: [u8; 0x24], - #[doc = "0x428 - Deprecated register - RAM status register"] - pub ramstatus: RAMSTATUS, - _reserved9: [u8; 0xd4], - #[doc = "0x500 - System OFF register"] - pub systemoff: SYSTEMOFF, - _reserved10: [u8; 0x0c], - #[doc = "0x510 - Power failure comparator configuration"] - pub pofcon: POFCON, - _reserved11: [u8; 0x08], - #[doc = "0x51c - General purpose retention register"] - pub gpregret: GPREGRET, - #[doc = "0x520 - General purpose retention register"] - pub gpregret2: GPREGRET2, - #[doc = "0x524 - Deprecated register - RAM on/off register (this register is retained)"] - pub ramon: RAMON, - _reserved14: [u8; 0x2c], - #[doc = "0x554 - Deprecated register - RAM on/off register (this register is retained)"] - pub ramonb: RAMONB, - _reserved15: [u8; 0x20], - #[doc = "0x578 - DC/DC enable register"] - pub dcdcen: DCDCEN, - _reserved16: [u8; 0x0384], - #[doc = "0x900..0x90c - Unspecified"] - pub ram0: RAM, - _reserved17: [u8; 0x04], - #[doc = "0x910..0x91c - Unspecified"] - pub ram1: RAM, - _reserved18: [u8; 0x04], - #[doc = "0x920..0x92c - Unspecified"] - pub ram2: RAM, - _reserved19: [u8; 0x04], - #[doc = "0x930..0x93c - Unspecified"] - pub ram3: RAM, - _reserved20: [u8; 0x04], - #[doc = "0x940..0x94c - Unspecified"] - pub ram4: RAM, - _reserved21: [u8; 0x04], - #[doc = "0x950..0x95c - Unspecified"] - pub ram5: RAM, - _reserved22: [u8; 0x04], - #[doc = "0x960..0x96c - Unspecified"] - pub ram6: RAM, - _reserved23: [u8; 0x04], - #[doc = "0x970..0x97c - Unspecified"] - pub ram7: RAM, -} -#[doc = "TASKS_CONSTLAT (w) register accessor: an alias for `Reg`"] -pub type TASKS_CONSTLAT = crate::Reg; -#[doc = "Enable constant latency mode"] -pub mod tasks_constlat; -#[doc = "TASKS_LOWPWR (w) register accessor: an alias for `Reg`"] -pub type TASKS_LOWPWR = crate::Reg; -#[doc = "Enable low power mode (variable latency)"] -pub mod tasks_lowpwr; -#[doc = "EVENTS_POFWARN (rw) register accessor: an alias for `Reg`"] -pub type EVENTS_POFWARN = crate::Reg; -#[doc = "Power failure warning"] -pub mod events_pofwarn; -#[doc = "EVENTS_SLEEPENTER (rw) register accessor: an alias for `Reg`"] -pub type EVENTS_SLEEPENTER = crate::Reg; -#[doc = "CPU entered WFI/WFE sleep"] -pub mod events_sleepenter; -#[doc = "EVENTS_SLEEPEXIT (rw) register accessor: an alias for `Reg`"] -pub type EVENTS_SLEEPEXIT = crate::Reg; -#[doc = "CPU exited WFI/WFE sleep"] -pub mod events_sleepexit; -#[doc = "INTENSET (rw) register accessor: an alias for `Reg`"] -pub type INTENSET = crate::Reg; -#[doc = "Enable interrupt"] -pub mod intenset; -#[doc = "INTENCLR (rw) register accessor: an alias for `Reg`"] -pub type INTENCLR = crate::Reg; -#[doc = "Disable interrupt"] -pub mod intenclr; -#[doc = "RESETREAS (rw) register accessor: an alias for `Reg`"] -pub type RESETREAS = crate::Reg; -#[doc = "Reset reason"] -pub mod resetreas; -#[doc = "RAMSTATUS (r) register accessor: an alias for `Reg`"] -pub type RAMSTATUS = crate::Reg; -#[doc = "Deprecated register - RAM status register"] -pub mod ramstatus; -#[doc = "SYSTEMOFF (w) register accessor: an alias for `Reg`"] -pub type SYSTEMOFF = crate::Reg; -#[doc = "System OFF register"] -pub mod systemoff; -#[doc = "POFCON (rw) register accessor: an alias for `Reg`"] -pub type POFCON = crate::Reg; -#[doc = "Power failure comparator configuration"] -pub mod pofcon; -#[doc = "GPREGRET (rw) register accessor: an alias for `Reg`"] -pub type GPREGRET = crate::Reg; -#[doc = "General purpose retention register"] -pub mod gpregret; -#[doc = "GPREGRET2 (rw) register accessor: an alias for `Reg`"] -pub type GPREGRET2 = crate::Reg; -#[doc = "General purpose retention register"] -pub mod gpregret2; -#[doc = "RAMON (rw) register accessor: an alias for `Reg`"] -pub type RAMON = crate::Reg; -#[doc = "Deprecated register - RAM on/off register (this register is retained)"] -pub mod ramon; -#[doc = "RAMONB (rw) register accessor: an alias for `Reg`"] -pub type RAMONB = crate::Reg; -#[doc = "Deprecated register - RAM on/off register (this register is retained)"] -pub mod ramonb; -#[doc = "DCDCEN (rw) register accessor: an alias for `Reg`"] -pub type DCDCEN = crate::Reg; -#[doc = "DC/DC enable register"] -pub mod dcdcen; -#[doc = "Unspecified"] -pub use self::ram::RAM; -#[doc = r"Cluster"] -#[doc = "Unspecified"] -pub mod ram; diff --git a/down-the-stack/dk_pac/src/power/dcdcen.rs b/down-the-stack/dk_pac/src/power/dcdcen.rs deleted file mode 100644 index cd6ae62..0000000 --- a/down-the-stack/dk_pac/src/power/dcdcen.rs +++ /dev/null @@ -1,126 +0,0 @@ -#[doc = "Register `DCDCEN` 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 `DCDCEN` 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 `DCDCEN` reader - Enable or disable DC/DC converter"] -pub type DCDCEN_R = crate::BitReader; -#[doc = "Enable or disable DC/DC converter\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum DCDCEN_A { - #[doc = "0: Disable"] - DISABLED = 0, - #[doc = "1: Enable"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: DCDCEN_A) -> Self { - variant as u8 != 0 - } -} -impl DCDCEN_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> DCDCEN_A { - match self.bits { - false => DCDCEN_A::DISABLED, - true => DCDCEN_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == DCDCEN_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == DCDCEN_A::ENABLED - } -} -#[doc = "Field `DCDCEN` writer - Enable or disable DC/DC converter"] -pub type DCDCEN_W<'a, const O: u8> = crate::BitWriter<'a, u32, DCDCEN_SPEC, DCDCEN_A, O>; -impl<'a, const O: u8> DCDCEN_W<'a, O> { - #[doc = "Disable"] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(DCDCEN_A::DISABLED) - } - #[doc = "Enable"] - #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(DCDCEN_A::ENABLED) - } -} -impl R { - #[doc = "Bit 0 - Enable or disable DC/DC converter"] - #[inline(always)] - pub fn dcdcen(&self) -> DCDCEN_R { - DCDCEN_R::new((self.bits & 1) != 0) - } -} -impl W { - #[doc = "Bit 0 - Enable or disable DC/DC converter"] - #[inline(always)] - #[must_use] - pub fn dcdcen(&mut self) -> DCDCEN_W<0> { - DCDCEN_W::new(self) - } - #[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 = "DC/DC enable register\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 [dcdcen](index.html) module"] -pub struct DCDCEN_SPEC; -impl crate::RegisterSpec for DCDCEN_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [dcdcen::R](R) reader structure"] -impl crate::Readable for DCDCEN_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [dcdcen::W](W) writer structure"] -impl crate::Writable for DCDCEN_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets DCDCEN to value 0"] -impl crate::Resettable for DCDCEN_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/power/events_pofwarn.rs b/down-the-stack/dk_pac/src/power/events_pofwarn.rs deleted file mode 100644 index 99d48d8..0000000 --- a/down-the-stack/dk_pac/src/power/events_pofwarn.rs +++ /dev/null @@ -1,127 +0,0 @@ -#[doc = "Register `EVENTS_POFWARN` 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 `EVENTS_POFWARN` 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 `EVENTS_POFWARN` reader - Power failure warning"] -pub type EVENTS_POFWARN_R = crate::BitReader; -#[doc = "Power failure warning\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum EVENTS_POFWARN_A { - #[doc = "0: Event not generated"] - NOT_GENERATED = 0, - #[doc = "1: Event generated"] - GENERATED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: EVENTS_POFWARN_A) -> Self { - variant as u8 != 0 - } -} -impl EVENTS_POFWARN_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> EVENTS_POFWARN_A { - match self.bits { - false => EVENTS_POFWARN_A::NOT_GENERATED, - true => EVENTS_POFWARN_A::GENERATED, - } - } - #[doc = "Checks if the value of the field is `NOT_GENERATED`"] - #[inline(always)] - pub fn is_not_generated(&self) -> bool { - *self == EVENTS_POFWARN_A::NOT_GENERATED - } - #[doc = "Checks if the value of the field is `GENERATED`"] - #[inline(always)] - pub fn is_generated(&self) -> bool { - *self == EVENTS_POFWARN_A::GENERATED - } -} -#[doc = "Field `EVENTS_POFWARN` writer - Power failure warning"] -pub type EVENTS_POFWARN_W<'a, const O: u8> = - crate::BitWriter<'a, u32, EVENTS_POFWARN_SPEC, EVENTS_POFWARN_A, O>; -impl<'a, const O: u8> EVENTS_POFWARN_W<'a, O> { - #[doc = "Event not generated"] - #[inline(always)] - pub fn not_generated(self) -> &'a mut W { - self.variant(EVENTS_POFWARN_A::NOT_GENERATED) - } - #[doc = "Event generated"] - #[inline(always)] - pub fn generated(self) -> &'a mut W { - self.variant(EVENTS_POFWARN_A::GENERATED) - } -} -impl R { - #[doc = "Bit 0 - Power failure warning"] - #[inline(always)] - pub fn events_pofwarn(&self) -> EVENTS_POFWARN_R { - EVENTS_POFWARN_R::new((self.bits & 1) != 0) - } -} -impl W { - #[doc = "Bit 0 - Power failure warning"] - #[inline(always)] - #[must_use] - pub fn events_pofwarn(&mut self) -> EVENTS_POFWARN_W<0> { - EVENTS_POFWARN_W::new(self) - } - #[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 = "Power failure warning\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 [events_pofwarn](index.html) module"] -pub struct EVENTS_POFWARN_SPEC; -impl crate::RegisterSpec for EVENTS_POFWARN_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [events_pofwarn::R](R) reader structure"] -impl crate::Readable for EVENTS_POFWARN_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [events_pofwarn::W](W) writer structure"] -impl crate::Writable for EVENTS_POFWARN_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets EVENTS_POFWARN to value 0"] -impl crate::Resettable for EVENTS_POFWARN_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/power/events_sleepenter.rs b/down-the-stack/dk_pac/src/power/events_sleepenter.rs deleted file mode 100644 index 4c49f01..0000000 --- a/down-the-stack/dk_pac/src/power/events_sleepenter.rs +++ /dev/null @@ -1,127 +0,0 @@ -#[doc = "Register `EVENTS_SLEEPENTER` 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 `EVENTS_SLEEPENTER` 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 `EVENTS_SLEEPENTER` reader - CPU entered WFI/WFE sleep"] -pub type EVENTS_SLEEPENTER_R = crate::BitReader; -#[doc = "CPU entered WFI/WFE sleep\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum EVENTS_SLEEPENTER_A { - #[doc = "0: Event not generated"] - NOT_GENERATED = 0, - #[doc = "1: Event generated"] - GENERATED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: EVENTS_SLEEPENTER_A) -> Self { - variant as u8 != 0 - } -} -impl EVENTS_SLEEPENTER_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> EVENTS_SLEEPENTER_A { - match self.bits { - false => EVENTS_SLEEPENTER_A::NOT_GENERATED, - true => EVENTS_SLEEPENTER_A::GENERATED, - } - } - #[doc = "Checks if the value of the field is `NOT_GENERATED`"] - #[inline(always)] - pub fn is_not_generated(&self) -> bool { - *self == EVENTS_SLEEPENTER_A::NOT_GENERATED - } - #[doc = "Checks if the value of the field is `GENERATED`"] - #[inline(always)] - pub fn is_generated(&self) -> bool { - *self == EVENTS_SLEEPENTER_A::GENERATED - } -} -#[doc = "Field `EVENTS_SLEEPENTER` writer - CPU entered WFI/WFE sleep"] -pub type EVENTS_SLEEPENTER_W<'a, const O: u8> = - crate::BitWriter<'a, u32, EVENTS_SLEEPENTER_SPEC, EVENTS_SLEEPENTER_A, O>; -impl<'a, const O: u8> EVENTS_SLEEPENTER_W<'a, O> { - #[doc = "Event not generated"] - #[inline(always)] - pub fn not_generated(self) -> &'a mut W { - self.variant(EVENTS_SLEEPENTER_A::NOT_GENERATED) - } - #[doc = "Event generated"] - #[inline(always)] - pub fn generated(self) -> &'a mut W { - self.variant(EVENTS_SLEEPENTER_A::GENERATED) - } -} -impl R { - #[doc = "Bit 0 - CPU entered WFI/WFE sleep"] - #[inline(always)] - pub fn events_sleepenter(&self) -> EVENTS_SLEEPENTER_R { - EVENTS_SLEEPENTER_R::new((self.bits & 1) != 0) - } -} -impl W { - #[doc = "Bit 0 - CPU entered WFI/WFE sleep"] - #[inline(always)] - #[must_use] - pub fn events_sleepenter(&mut self) -> EVENTS_SLEEPENTER_W<0> { - EVENTS_SLEEPENTER_W::new(self) - } - #[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 = "CPU entered WFI/WFE sleep\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 [events_sleepenter](index.html) module"] -pub struct EVENTS_SLEEPENTER_SPEC; -impl crate::RegisterSpec for EVENTS_SLEEPENTER_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [events_sleepenter::R](R) reader structure"] -impl crate::Readable for EVENTS_SLEEPENTER_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [events_sleepenter::W](W) writer structure"] -impl crate::Writable for EVENTS_SLEEPENTER_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets EVENTS_SLEEPENTER to value 0"] -impl crate::Resettable for EVENTS_SLEEPENTER_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/power/events_sleepexit.rs b/down-the-stack/dk_pac/src/power/events_sleepexit.rs deleted file mode 100644 index 52a0d9c..0000000 --- a/down-the-stack/dk_pac/src/power/events_sleepexit.rs +++ /dev/null @@ -1,127 +0,0 @@ -#[doc = "Register `EVENTS_SLEEPEXIT` 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 `EVENTS_SLEEPEXIT` 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 `EVENTS_SLEEPEXIT` reader - CPU exited WFI/WFE sleep"] -pub type EVENTS_SLEEPEXIT_R = crate::BitReader; -#[doc = "CPU exited WFI/WFE sleep\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum EVENTS_SLEEPEXIT_A { - #[doc = "0: Event not generated"] - NOT_GENERATED = 0, - #[doc = "1: Event generated"] - GENERATED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: EVENTS_SLEEPEXIT_A) -> Self { - variant as u8 != 0 - } -} -impl EVENTS_SLEEPEXIT_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> EVENTS_SLEEPEXIT_A { - match self.bits { - false => EVENTS_SLEEPEXIT_A::NOT_GENERATED, - true => EVENTS_SLEEPEXIT_A::GENERATED, - } - } - #[doc = "Checks if the value of the field is `NOT_GENERATED`"] - #[inline(always)] - pub fn is_not_generated(&self) -> bool { - *self == EVENTS_SLEEPEXIT_A::NOT_GENERATED - } - #[doc = "Checks if the value of the field is `GENERATED`"] - #[inline(always)] - pub fn is_generated(&self) -> bool { - *self == EVENTS_SLEEPEXIT_A::GENERATED - } -} -#[doc = "Field `EVENTS_SLEEPEXIT` writer - CPU exited WFI/WFE sleep"] -pub type EVENTS_SLEEPEXIT_W<'a, const O: u8> = - crate::BitWriter<'a, u32, EVENTS_SLEEPEXIT_SPEC, EVENTS_SLEEPEXIT_A, O>; -impl<'a, const O: u8> EVENTS_SLEEPEXIT_W<'a, O> { - #[doc = "Event not generated"] - #[inline(always)] - pub fn not_generated(self) -> &'a mut W { - self.variant(EVENTS_SLEEPEXIT_A::NOT_GENERATED) - } - #[doc = "Event generated"] - #[inline(always)] - pub fn generated(self) -> &'a mut W { - self.variant(EVENTS_SLEEPEXIT_A::GENERATED) - } -} -impl R { - #[doc = "Bit 0 - CPU exited WFI/WFE sleep"] - #[inline(always)] - pub fn events_sleepexit(&self) -> EVENTS_SLEEPEXIT_R { - EVENTS_SLEEPEXIT_R::new((self.bits & 1) != 0) - } -} -impl W { - #[doc = "Bit 0 - CPU exited WFI/WFE sleep"] - #[inline(always)] - #[must_use] - pub fn events_sleepexit(&mut self) -> EVENTS_SLEEPEXIT_W<0> { - EVENTS_SLEEPEXIT_W::new(self) - } - #[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 = "CPU exited WFI/WFE sleep\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 [events_sleepexit](index.html) module"] -pub struct EVENTS_SLEEPEXIT_SPEC; -impl crate::RegisterSpec for EVENTS_SLEEPEXIT_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [events_sleepexit::R](R) reader structure"] -impl crate::Readable for EVENTS_SLEEPEXIT_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [events_sleepexit::W](W) writer structure"] -impl crate::Writable for EVENTS_SLEEPEXIT_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets EVENTS_SLEEPEXIT to value 0"] -impl crate::Resettable for EVENTS_SLEEPEXIT_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/power/gpregret.rs b/down-the-stack/dk_pac/src/power/gpregret.rs deleted file mode 100644 index e15dd9f..0000000 --- a/down-the-stack/dk_pac/src/power/gpregret.rs +++ /dev/null @@ -1,80 +0,0 @@ -#[doc = "Register `GPREGRET` 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 `GPREGRET` 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 `GPREGRET` reader - General purpose retention register"] -pub type GPREGRET_R = crate::FieldReader; -#[doc = "Field `GPREGRET` writer - General purpose retention register"] -pub type GPREGRET_W<'a, const O: u8> = crate::FieldWriter<'a, u32, GPREGRET_SPEC, u8, u8, 8, O>; -impl R { - #[doc = "Bits 0:7 - General purpose retention register"] - #[inline(always)] - pub fn gpregret(&self) -> GPREGRET_R { - GPREGRET_R::new((self.bits & 0xff) as u8) - } -} -impl W { - #[doc = "Bits 0:7 - General purpose retention register"] - #[inline(always)] - #[must_use] - pub fn gpregret(&mut self) -> GPREGRET_W<0> { - GPREGRET_W::new(self) - } - #[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 = "General purpose retention register\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 [gpregret](index.html) module"] -pub struct GPREGRET_SPEC; -impl crate::RegisterSpec for GPREGRET_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [gpregret::R](R) reader structure"] -impl crate::Readable for GPREGRET_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [gpregret::W](W) writer structure"] -impl crate::Writable for GPREGRET_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets GPREGRET to value 0"] -impl crate::Resettable for GPREGRET_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/power/gpregret2.rs b/down-the-stack/dk_pac/src/power/gpregret2.rs deleted file mode 100644 index 7f7355a..0000000 --- a/down-the-stack/dk_pac/src/power/gpregret2.rs +++ /dev/null @@ -1,80 +0,0 @@ -#[doc = "Register `GPREGRET2` 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 `GPREGRET2` 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 `GPREGRET` reader - General purpose retention register"] -pub type GPREGRET_R = crate::FieldReader; -#[doc = "Field `GPREGRET` writer - General purpose retention register"] -pub type GPREGRET_W<'a, const O: u8> = crate::FieldWriter<'a, u32, GPREGRET2_SPEC, u8, u8, 8, O>; -impl R { - #[doc = "Bits 0:7 - General purpose retention register"] - #[inline(always)] - pub fn gpregret(&self) -> GPREGRET_R { - GPREGRET_R::new((self.bits & 0xff) as u8) - } -} -impl W { - #[doc = "Bits 0:7 - General purpose retention register"] - #[inline(always)] - #[must_use] - pub fn gpregret(&mut self) -> GPREGRET_W<0> { - GPREGRET_W::new(self) - } - #[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 = "General purpose retention register\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 [gpregret2](index.html) module"] -pub struct GPREGRET2_SPEC; -impl crate::RegisterSpec for GPREGRET2_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [gpregret2::R](R) reader structure"] -impl crate::Readable for GPREGRET2_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [gpregret2::W](W) writer structure"] -impl crate::Writable for GPREGRET2_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets GPREGRET2 to value 0"] -impl crate::Resettable for GPREGRET2_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/power/intenclr.rs b/down-the-stack/dk_pac/src/power/intenclr.rs deleted file mode 100644 index 2bf379c..0000000 --- a/down-the-stack/dk_pac/src/power/intenclr.rs +++ /dev/null @@ -1,269 +0,0 @@ -#[doc = "Register `INTENCLR` 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 `INTENCLR` 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 `POFWARN` reader - Write '1' to disable interrupt for event POFWARN"] -pub type POFWARN_R = crate::BitReader; -#[doc = "Write '1' to disable interrupt for event POFWARN\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum POFWARN_A { - #[doc = "0: Read: Disabled"] - DISABLED = 0, - #[doc = "1: Read: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: POFWARN_A) -> Self { - variant as u8 != 0 - } -} -impl POFWARN_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> POFWARN_A { - match self.bits { - false => POFWARN_A::DISABLED, - true => POFWARN_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == POFWARN_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == POFWARN_A::ENABLED - } -} -#[doc = "Write '1' to disable interrupt for event POFWARN\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum POFWARN_AW { - #[doc = "1: Disable"] - CLEAR = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: POFWARN_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `POFWARN` writer - Write '1' to disable interrupt for event POFWARN"] -pub type POFWARN_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENCLR_SPEC, POFWARN_AW, O>; -impl<'a, const O: u8> POFWARN_W<'a, O> { - #[doc = "Disable"] - #[inline(always)] - pub fn clear(self) -> &'a mut W { - self.variant(POFWARN_AW::CLEAR) - } -} -#[doc = "Field `SLEEPENTER` reader - Write '1' to disable interrupt for event SLEEPENTER"] -pub type SLEEPENTER_R = crate::BitReader; -#[doc = "Write '1' to disable interrupt for event SLEEPENTER\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum SLEEPENTER_A { - #[doc = "0: Read: Disabled"] - DISABLED = 0, - #[doc = "1: Read: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: SLEEPENTER_A) -> Self { - variant as u8 != 0 - } -} -impl SLEEPENTER_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> SLEEPENTER_A { - match self.bits { - false => SLEEPENTER_A::DISABLED, - true => SLEEPENTER_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == SLEEPENTER_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == SLEEPENTER_A::ENABLED - } -} -#[doc = "Write '1' to disable interrupt for event SLEEPENTER\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum SLEEPENTER_AW { - #[doc = "1: Disable"] - CLEAR = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: SLEEPENTER_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `SLEEPENTER` writer - Write '1' to disable interrupt for event SLEEPENTER"] -pub type SLEEPENTER_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENCLR_SPEC, SLEEPENTER_AW, O>; -impl<'a, const O: u8> SLEEPENTER_W<'a, O> { - #[doc = "Disable"] - #[inline(always)] - pub fn clear(self) -> &'a mut W { - self.variant(SLEEPENTER_AW::CLEAR) - } -} -#[doc = "Field `SLEEPEXIT` reader - Write '1' to disable interrupt for event SLEEPEXIT"] -pub type SLEEPEXIT_R = crate::BitReader; -#[doc = "Write '1' to disable interrupt for event SLEEPEXIT\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum SLEEPEXIT_A { - #[doc = "0: Read: Disabled"] - DISABLED = 0, - #[doc = "1: Read: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: SLEEPEXIT_A) -> Self { - variant as u8 != 0 - } -} -impl SLEEPEXIT_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> SLEEPEXIT_A { - match self.bits { - false => SLEEPEXIT_A::DISABLED, - true => SLEEPEXIT_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == SLEEPEXIT_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == SLEEPEXIT_A::ENABLED - } -} -#[doc = "Write '1' to disable interrupt for event SLEEPEXIT\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum SLEEPEXIT_AW { - #[doc = "1: Disable"] - CLEAR = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: SLEEPEXIT_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `SLEEPEXIT` writer - Write '1' to disable interrupt for event SLEEPEXIT"] -pub type SLEEPEXIT_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENCLR_SPEC, SLEEPEXIT_AW, O>; -impl<'a, const O: u8> SLEEPEXIT_W<'a, O> { - #[doc = "Disable"] - #[inline(always)] - pub fn clear(self) -> &'a mut W { - self.variant(SLEEPEXIT_AW::CLEAR) - } -} -impl R { - #[doc = "Bit 2 - Write '1' to disable interrupt for event POFWARN"] - #[inline(always)] - pub fn pofwarn(&self) -> POFWARN_R { - POFWARN_R::new(((self.bits >> 2) & 1) != 0) - } - #[doc = "Bit 5 - Write '1' to disable interrupt for event SLEEPENTER"] - #[inline(always)] - pub fn sleepenter(&self) -> SLEEPENTER_R { - SLEEPENTER_R::new(((self.bits >> 5) & 1) != 0) - } - #[doc = "Bit 6 - Write '1' to disable interrupt for event SLEEPEXIT"] - #[inline(always)] - pub fn sleepexit(&self) -> SLEEPEXIT_R { - SLEEPEXIT_R::new(((self.bits >> 6) & 1) != 0) - } -} -impl W { - #[doc = "Bit 2 - Write '1' to disable interrupt for event POFWARN"] - #[inline(always)] - #[must_use] - pub fn pofwarn(&mut self) -> POFWARN_W<2> { - POFWARN_W::new(self) - } - #[doc = "Bit 5 - Write '1' to disable interrupt for event SLEEPENTER"] - #[inline(always)] - #[must_use] - pub fn sleepenter(&mut self) -> SLEEPENTER_W<5> { - SLEEPENTER_W::new(self) - } - #[doc = "Bit 6 - Write '1' to disable interrupt for event SLEEPEXIT"] - #[inline(always)] - #[must_use] - pub fn sleepexit(&mut self) -> SLEEPEXIT_W<6> { - SLEEPEXIT_W::new(self) - } - #[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 = "Disable interrupt\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 [intenclr](index.html) module"] -pub struct INTENCLR_SPEC; -impl crate::RegisterSpec for INTENCLR_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [intenclr::R](R) reader structure"] -impl crate::Readable for INTENCLR_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [intenclr::W](W) writer structure"] -impl crate::Writable for INTENCLR_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets INTENCLR to value 0"] -impl crate::Resettable for INTENCLR_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/power/intenset.rs b/down-the-stack/dk_pac/src/power/intenset.rs deleted file mode 100644 index fc29bd4..0000000 --- a/down-the-stack/dk_pac/src/power/intenset.rs +++ /dev/null @@ -1,269 +0,0 @@ -#[doc = "Register `INTENSET` 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 `INTENSET` 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 `POFWARN` reader - Write '1' to enable interrupt for event POFWARN"] -pub type POFWARN_R = crate::BitReader; -#[doc = "Write '1' to enable interrupt for event POFWARN\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum POFWARN_A { - #[doc = "0: Read: Disabled"] - DISABLED = 0, - #[doc = "1: Read: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: POFWARN_A) -> Self { - variant as u8 != 0 - } -} -impl POFWARN_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> POFWARN_A { - match self.bits { - false => POFWARN_A::DISABLED, - true => POFWARN_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == POFWARN_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == POFWARN_A::ENABLED - } -} -#[doc = "Write '1' to enable interrupt for event POFWARN\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum POFWARN_AW { - #[doc = "1: Enable"] - SET = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: POFWARN_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `POFWARN` writer - Write '1' to enable interrupt for event POFWARN"] -pub type POFWARN_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENSET_SPEC, POFWARN_AW, O>; -impl<'a, const O: u8> POFWARN_W<'a, O> { - #[doc = "Enable"] - #[inline(always)] - pub fn set(self) -> &'a mut W { - self.variant(POFWARN_AW::SET) - } -} -#[doc = "Field `SLEEPENTER` reader - Write '1' to enable interrupt for event SLEEPENTER"] -pub type SLEEPENTER_R = crate::BitReader; -#[doc = "Write '1' to enable interrupt for event SLEEPENTER\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum SLEEPENTER_A { - #[doc = "0: Read: Disabled"] - DISABLED = 0, - #[doc = "1: Read: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: SLEEPENTER_A) -> Self { - variant as u8 != 0 - } -} -impl SLEEPENTER_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> SLEEPENTER_A { - match self.bits { - false => SLEEPENTER_A::DISABLED, - true => SLEEPENTER_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == SLEEPENTER_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == SLEEPENTER_A::ENABLED - } -} -#[doc = "Write '1' to enable interrupt for event SLEEPENTER\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum SLEEPENTER_AW { - #[doc = "1: Enable"] - SET = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: SLEEPENTER_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `SLEEPENTER` writer - Write '1' to enable interrupt for event SLEEPENTER"] -pub type SLEEPENTER_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENSET_SPEC, SLEEPENTER_AW, O>; -impl<'a, const O: u8> SLEEPENTER_W<'a, O> { - #[doc = "Enable"] - #[inline(always)] - pub fn set(self) -> &'a mut W { - self.variant(SLEEPENTER_AW::SET) - } -} -#[doc = "Field `SLEEPEXIT` reader - Write '1' to enable interrupt for event SLEEPEXIT"] -pub type SLEEPEXIT_R = crate::BitReader; -#[doc = "Write '1' to enable interrupt for event SLEEPEXIT\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum SLEEPEXIT_A { - #[doc = "0: Read: Disabled"] - DISABLED = 0, - #[doc = "1: Read: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: SLEEPEXIT_A) -> Self { - variant as u8 != 0 - } -} -impl SLEEPEXIT_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> SLEEPEXIT_A { - match self.bits { - false => SLEEPEXIT_A::DISABLED, - true => SLEEPEXIT_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == SLEEPEXIT_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == SLEEPEXIT_A::ENABLED - } -} -#[doc = "Write '1' to enable interrupt for event SLEEPEXIT\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum SLEEPEXIT_AW { - #[doc = "1: Enable"] - SET = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: SLEEPEXIT_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `SLEEPEXIT` writer - Write '1' to enable interrupt for event SLEEPEXIT"] -pub type SLEEPEXIT_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENSET_SPEC, SLEEPEXIT_AW, O>; -impl<'a, const O: u8> SLEEPEXIT_W<'a, O> { - #[doc = "Enable"] - #[inline(always)] - pub fn set(self) -> &'a mut W { - self.variant(SLEEPEXIT_AW::SET) - } -} -impl R { - #[doc = "Bit 2 - Write '1' to enable interrupt for event POFWARN"] - #[inline(always)] - pub fn pofwarn(&self) -> POFWARN_R { - POFWARN_R::new(((self.bits >> 2) & 1) != 0) - } - #[doc = "Bit 5 - Write '1' to enable interrupt for event SLEEPENTER"] - #[inline(always)] - pub fn sleepenter(&self) -> SLEEPENTER_R { - SLEEPENTER_R::new(((self.bits >> 5) & 1) != 0) - } - #[doc = "Bit 6 - Write '1' to enable interrupt for event SLEEPEXIT"] - #[inline(always)] - pub fn sleepexit(&self) -> SLEEPEXIT_R { - SLEEPEXIT_R::new(((self.bits >> 6) & 1) != 0) - } -} -impl W { - #[doc = "Bit 2 - Write '1' to enable interrupt for event POFWARN"] - #[inline(always)] - #[must_use] - pub fn pofwarn(&mut self) -> POFWARN_W<2> { - POFWARN_W::new(self) - } - #[doc = "Bit 5 - Write '1' to enable interrupt for event SLEEPENTER"] - #[inline(always)] - #[must_use] - pub fn sleepenter(&mut self) -> SLEEPENTER_W<5> { - SLEEPENTER_W::new(self) - } - #[doc = "Bit 6 - Write '1' to enable interrupt for event SLEEPEXIT"] - #[inline(always)] - #[must_use] - pub fn sleepexit(&mut self) -> SLEEPEXIT_W<6> { - SLEEPEXIT_W::new(self) - } - #[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 = "Enable interrupt\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 [intenset](index.html) module"] -pub struct INTENSET_SPEC; -impl crate::RegisterSpec for INTENSET_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [intenset::R](R) reader structure"] -impl crate::Readable for INTENSET_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [intenset::W](W) writer structure"] -impl crate::Writable for INTENSET_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets INTENSET to value 0"] -impl crate::Resettable for INTENSET_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/power/pofcon.rs b/down-the-stack/dk_pac/src/power/pofcon.rs deleted file mode 100644 index c98b460..0000000 --- a/down-the-stack/dk_pac/src/power/pofcon.rs +++ /dev/null @@ -1,320 +0,0 @@ -#[doc = "Register `POFCON` 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 `POFCON` 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 `POF` reader - Enable or disable power failure comparator"] -pub type POF_R = crate::BitReader; -#[doc = "Enable or disable power failure comparator\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum POF_A { - #[doc = "0: Disable"] - DISABLED = 0, - #[doc = "1: Enable"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: POF_A) -> Self { - variant as u8 != 0 - } -} -impl POF_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> POF_A { - match self.bits { - false => POF_A::DISABLED, - true => POF_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == POF_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == POF_A::ENABLED - } -} -#[doc = "Field `POF` writer - Enable or disable power failure comparator"] -pub type POF_W<'a, const O: u8> = crate::BitWriter<'a, u32, POFCON_SPEC, POF_A, O>; -impl<'a, const O: u8> POF_W<'a, O> { - #[doc = "Disable"] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(POF_A::DISABLED) - } - #[doc = "Enable"] - #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(POF_A::ENABLED) - } -} -#[doc = "Field `THRESHOLD` reader - Power failure comparator threshold setting"] -pub type THRESHOLD_R = crate::FieldReader; -#[doc = "Power failure comparator threshold setting\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -#[repr(u8)] -pub enum THRESHOLD_A { - #[doc = "4: Set threshold to 1.7 V"] - V17 = 4, - #[doc = "5: Set threshold to 1.8 V"] - V18 = 5, - #[doc = "6: Set threshold to 1.9 V"] - V19 = 6, - #[doc = "7: Set threshold to 2.0 V"] - V20 = 7, - #[doc = "8: Set threshold to 2.1 V"] - V21 = 8, - #[doc = "9: Set threshold to 2.2 V"] - V22 = 9, - #[doc = "10: Set threshold to 2.3 V"] - V23 = 10, - #[doc = "11: Set threshold to 2.4 V"] - V24 = 11, - #[doc = "12: Set threshold to 2.5 V"] - V25 = 12, - #[doc = "13: Set threshold to 2.6 V"] - V26 = 13, - #[doc = "14: Set threshold to 2.7 V"] - V27 = 14, - #[doc = "15: Set threshold to 2.8 V"] - V28 = 15, -} -impl From for u8 { - #[inline(always)] - fn from(variant: THRESHOLD_A) -> Self { - variant as _ - } -} -impl THRESHOLD_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> Option { - match self.bits { - 4 => Some(THRESHOLD_A::V17), - 5 => Some(THRESHOLD_A::V18), - 6 => Some(THRESHOLD_A::V19), - 7 => Some(THRESHOLD_A::V20), - 8 => Some(THRESHOLD_A::V21), - 9 => Some(THRESHOLD_A::V22), - 10 => Some(THRESHOLD_A::V23), - 11 => Some(THRESHOLD_A::V24), - 12 => Some(THRESHOLD_A::V25), - 13 => Some(THRESHOLD_A::V26), - 14 => Some(THRESHOLD_A::V27), - 15 => Some(THRESHOLD_A::V28), - _ => None, - } - } - #[doc = "Checks if the value of the field is `V17`"] - #[inline(always)] - pub fn is_v17(&self) -> bool { - *self == THRESHOLD_A::V17 - } - #[doc = "Checks if the value of the field is `V18`"] - #[inline(always)] - pub fn is_v18(&self) -> bool { - *self == THRESHOLD_A::V18 - } - #[doc = "Checks if the value of the field is `V19`"] - #[inline(always)] - pub fn is_v19(&self) -> bool { - *self == THRESHOLD_A::V19 - } - #[doc = "Checks if the value of the field is `V20`"] - #[inline(always)] - pub fn is_v20(&self) -> bool { - *self == THRESHOLD_A::V20 - } - #[doc = "Checks if the value of the field is `V21`"] - #[inline(always)] - pub fn is_v21(&self) -> bool { - *self == THRESHOLD_A::V21 - } - #[doc = "Checks if the value of the field is `V22`"] - #[inline(always)] - pub fn is_v22(&self) -> bool { - *self == THRESHOLD_A::V22 - } - #[doc = "Checks if the value of the field is `V23`"] - #[inline(always)] - pub fn is_v23(&self) -> bool { - *self == THRESHOLD_A::V23 - } - #[doc = "Checks if the value of the field is `V24`"] - #[inline(always)] - pub fn is_v24(&self) -> bool { - *self == THRESHOLD_A::V24 - } - #[doc = "Checks if the value of the field is `V25`"] - #[inline(always)] - pub fn is_v25(&self) -> bool { - *self == THRESHOLD_A::V25 - } - #[doc = "Checks if the value of the field is `V26`"] - #[inline(always)] - pub fn is_v26(&self) -> bool { - *self == THRESHOLD_A::V26 - } - #[doc = "Checks if the value of the field is `V27`"] - #[inline(always)] - pub fn is_v27(&self) -> bool { - *self == THRESHOLD_A::V27 - } - #[doc = "Checks if the value of the field is `V28`"] - #[inline(always)] - pub fn is_v28(&self) -> bool { - *self == THRESHOLD_A::V28 - } -} -#[doc = "Field `THRESHOLD` writer - Power failure comparator threshold setting"] -pub type THRESHOLD_W<'a, const O: u8> = - crate::FieldWriter<'a, u32, POFCON_SPEC, u8, THRESHOLD_A, 4, O>; -impl<'a, const O: u8> THRESHOLD_W<'a, O> { - #[doc = "Set threshold to 1.7 V"] - #[inline(always)] - pub fn v17(self) -> &'a mut W { - self.variant(THRESHOLD_A::V17) - } - #[doc = "Set threshold to 1.8 V"] - #[inline(always)] - pub fn v18(self) -> &'a mut W { - self.variant(THRESHOLD_A::V18) - } - #[doc = "Set threshold to 1.9 V"] - #[inline(always)] - pub fn v19(self) -> &'a mut W { - self.variant(THRESHOLD_A::V19) - } - #[doc = "Set threshold to 2.0 V"] - #[inline(always)] - pub fn v20(self) -> &'a mut W { - self.variant(THRESHOLD_A::V20) - } - #[doc = "Set threshold to 2.1 V"] - #[inline(always)] - pub fn v21(self) -> &'a mut W { - self.variant(THRESHOLD_A::V21) - } - #[doc = "Set threshold to 2.2 V"] - #[inline(always)] - pub fn v22(self) -> &'a mut W { - self.variant(THRESHOLD_A::V22) - } - #[doc = "Set threshold to 2.3 V"] - #[inline(always)] - pub fn v23(self) -> &'a mut W { - self.variant(THRESHOLD_A::V23) - } - #[doc = "Set threshold to 2.4 V"] - #[inline(always)] - pub fn v24(self) -> &'a mut W { - self.variant(THRESHOLD_A::V24) - } - #[doc = "Set threshold to 2.5 V"] - #[inline(always)] - pub fn v25(self) -> &'a mut W { - self.variant(THRESHOLD_A::V25) - } - #[doc = "Set threshold to 2.6 V"] - #[inline(always)] - pub fn v26(self) -> &'a mut W { - self.variant(THRESHOLD_A::V26) - } - #[doc = "Set threshold to 2.7 V"] - #[inline(always)] - pub fn v27(self) -> &'a mut W { - self.variant(THRESHOLD_A::V27) - } - #[doc = "Set threshold to 2.8 V"] - #[inline(always)] - pub fn v28(self) -> &'a mut W { - self.variant(THRESHOLD_A::V28) - } -} -impl R { - #[doc = "Bit 0 - Enable or disable power failure comparator"] - #[inline(always)] - pub fn pof(&self) -> POF_R { - POF_R::new((self.bits & 1) != 0) - } - #[doc = "Bits 1:4 - Power failure comparator threshold setting"] - #[inline(always)] - pub fn threshold(&self) -> THRESHOLD_R { - THRESHOLD_R::new(((self.bits >> 1) & 0x0f) as u8) - } -} -impl W { - #[doc = "Bit 0 - Enable or disable power failure comparator"] - #[inline(always)] - #[must_use] - pub fn pof(&mut self) -> POF_W<0> { - POF_W::new(self) - } - #[doc = "Bits 1:4 - Power failure comparator threshold setting"] - #[inline(always)] - #[must_use] - pub fn threshold(&mut self) -> THRESHOLD_W<1> { - THRESHOLD_W::new(self) - } - #[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 = "Power failure comparator configuration\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 [pofcon](index.html) module"] -pub struct POFCON_SPEC; -impl crate::RegisterSpec for POFCON_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [pofcon::R](R) reader structure"] -impl crate::Readable for POFCON_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [pofcon::W](W) writer structure"] -impl crate::Writable for POFCON_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets POFCON to value 0"] -impl crate::Resettable for POFCON_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/power/ram.rs b/down-the-stack/dk_pac/src/power/ram.rs deleted file mode 100644 index 4a7baf8..0000000 --- a/down-the-stack/dk_pac/src/power/ram.rs +++ /dev/null @@ -1,22 +0,0 @@ -#[doc = r"Register block"] -#[repr(C)] -pub struct RAM { - #[doc = "0x00 - Description cluster: RAMn power control register"] - pub power: POWER, - #[doc = "0x04 - Description cluster: RAMn power control set register"] - pub powerset: POWERSET, - #[doc = "0x08 - Description cluster: RAMn power control clear register"] - pub powerclr: POWERCLR, -} -#[doc = "POWER (rw) register accessor: an alias for `Reg`"] -pub type POWER = crate::Reg; -#[doc = "Description cluster: RAMn power control register"] -pub mod power; -#[doc = "POWERSET (w) register accessor: an alias for `Reg`"] -pub type POWERSET = crate::Reg; -#[doc = "Description cluster: RAMn power control set register"] -pub mod powerset; -#[doc = "POWERCLR (w) register accessor: an alias for `Reg`"] -pub type POWERCLR = crate::Reg; -#[doc = "Description cluster: RAMn power control clear register"] -pub mod powerclr; diff --git a/down-the-stack/dk_pac/src/power/ram/power.rs b/down-the-stack/dk_pac/src/power/ram/power.rs deleted file mode 100644 index e47bc3b..0000000 --- a/down-the-stack/dk_pac/src/power/ram/power.rs +++ /dev/null @@ -1,309 +0,0 @@ -#[doc = "Register `POWER` 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 `POWER` 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 `S0POWER` reader - Keep RAM section S0 ON or OFF in System ON mode."] -pub type S0POWER_R = crate::BitReader; -#[doc = "Keep RAM section S0 ON or OFF in System ON mode.\n\nValue on reset: 1"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum S0POWER_A { - #[doc = "0: Off"] - OFF = 0, - #[doc = "1: On"] - ON = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: S0POWER_A) -> Self { - variant as u8 != 0 - } -} -impl S0POWER_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> S0POWER_A { - match self.bits { - false => S0POWER_A::OFF, - true => S0POWER_A::ON, - } - } - #[doc = "Checks if the value of the field is `OFF`"] - #[inline(always)] - pub fn is_off(&self) -> bool { - *self == S0POWER_A::OFF - } - #[doc = "Checks if the value of the field is `ON`"] - #[inline(always)] - pub fn is_on(&self) -> bool { - *self == S0POWER_A::ON - } -} -#[doc = "Field `S0POWER` writer - Keep RAM section S0 ON or OFF in System ON mode."] -pub type S0POWER_W<'a, const O: u8> = crate::BitWriter<'a, u32, POWER_SPEC, S0POWER_A, O>; -impl<'a, const O: u8> S0POWER_W<'a, O> { - #[doc = "Off"] - #[inline(always)] - pub fn off(self) -> &'a mut W { - self.variant(S0POWER_A::OFF) - } - #[doc = "On"] - #[inline(always)] - pub fn on(self) -> &'a mut W { - self.variant(S0POWER_A::ON) - } -} -#[doc = "Field `S1POWER` reader - Keep RAM section S1 ON or OFF in System ON mode."] -pub type S1POWER_R = crate::BitReader; -#[doc = "Keep RAM section S1 ON or OFF in System ON mode.\n\nValue on reset: 1"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum S1POWER_A { - #[doc = "0: Off"] - OFF = 0, - #[doc = "1: On"] - ON = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: S1POWER_A) -> Self { - variant as u8 != 0 - } -} -impl S1POWER_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> S1POWER_A { - match self.bits { - false => S1POWER_A::OFF, - true => S1POWER_A::ON, - } - } - #[doc = "Checks if the value of the field is `OFF`"] - #[inline(always)] - pub fn is_off(&self) -> bool { - *self == S1POWER_A::OFF - } - #[doc = "Checks if the value of the field is `ON`"] - #[inline(always)] - pub fn is_on(&self) -> bool { - *self == S1POWER_A::ON - } -} -#[doc = "Field `S1POWER` writer - Keep RAM section S1 ON or OFF in System ON mode."] -pub type S1POWER_W<'a, const O: u8> = crate::BitWriter<'a, u32, POWER_SPEC, S1POWER_A, O>; -impl<'a, const O: u8> S1POWER_W<'a, O> { - #[doc = "Off"] - #[inline(always)] - pub fn off(self) -> &'a mut W { - self.variant(S1POWER_A::OFF) - } - #[doc = "On"] - #[inline(always)] - pub fn on(self) -> &'a mut W { - self.variant(S1POWER_A::ON) - } -} -#[doc = "Field `S0RETENTION` reader - Keep retention on RAM section S0 when RAM section is in OFF"] -pub type S0RETENTION_R = crate::BitReader; -#[doc = "Keep retention on RAM section S0 when RAM section is in OFF\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum S0RETENTION_A { - #[doc = "0: Off"] - OFF = 0, - #[doc = "1: On"] - ON = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: S0RETENTION_A) -> Self { - variant as u8 != 0 - } -} -impl S0RETENTION_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> S0RETENTION_A { - match self.bits { - false => S0RETENTION_A::OFF, - true => S0RETENTION_A::ON, - } - } - #[doc = "Checks if the value of the field is `OFF`"] - #[inline(always)] - pub fn is_off(&self) -> bool { - *self == S0RETENTION_A::OFF - } - #[doc = "Checks if the value of the field is `ON`"] - #[inline(always)] - pub fn is_on(&self) -> bool { - *self == S0RETENTION_A::ON - } -} -#[doc = "Field `S0RETENTION` writer - Keep retention on RAM section S0 when RAM section is in OFF"] -pub type S0RETENTION_W<'a, const O: u8> = crate::BitWriter<'a, u32, POWER_SPEC, S0RETENTION_A, O>; -impl<'a, const O: u8> S0RETENTION_W<'a, O> { - #[doc = "Off"] - #[inline(always)] - pub fn off(self) -> &'a mut W { - self.variant(S0RETENTION_A::OFF) - } - #[doc = "On"] - #[inline(always)] - pub fn on(self) -> &'a mut W { - self.variant(S0RETENTION_A::ON) - } -} -#[doc = "Field `S1RETENTION` reader - Keep retention on RAM section S1 when RAM section is in OFF"] -pub type S1RETENTION_R = crate::BitReader; -#[doc = "Keep retention on RAM section S1 when RAM section is in OFF\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum S1RETENTION_A { - #[doc = "0: Off"] - OFF = 0, - #[doc = "1: On"] - ON = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: S1RETENTION_A) -> Self { - variant as u8 != 0 - } -} -impl S1RETENTION_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> S1RETENTION_A { - match self.bits { - false => S1RETENTION_A::OFF, - true => S1RETENTION_A::ON, - } - } - #[doc = "Checks if the value of the field is `OFF`"] - #[inline(always)] - pub fn is_off(&self) -> bool { - *self == S1RETENTION_A::OFF - } - #[doc = "Checks if the value of the field is `ON`"] - #[inline(always)] - pub fn is_on(&self) -> bool { - *self == S1RETENTION_A::ON - } -} -#[doc = "Field `S1RETENTION` writer - Keep retention on RAM section S1 when RAM section is in OFF"] -pub type S1RETENTION_W<'a, const O: u8> = crate::BitWriter<'a, u32, POWER_SPEC, S1RETENTION_A, O>; -impl<'a, const O: u8> S1RETENTION_W<'a, O> { - #[doc = "Off"] - #[inline(always)] - pub fn off(self) -> &'a mut W { - self.variant(S1RETENTION_A::OFF) - } - #[doc = "On"] - #[inline(always)] - pub fn on(self) -> &'a mut W { - self.variant(S1RETENTION_A::ON) - } -} -impl R { - #[doc = "Bit 0 - Keep RAM section S0 ON or OFF in System ON mode."] - #[inline(always)] - pub fn s0power(&self) -> S0POWER_R { - S0POWER_R::new((self.bits & 1) != 0) - } - #[doc = "Bit 1 - Keep RAM section S1 ON or OFF in System ON mode."] - #[inline(always)] - pub fn s1power(&self) -> S1POWER_R { - S1POWER_R::new(((self.bits >> 1) & 1) != 0) - } - #[doc = "Bit 16 - Keep retention on RAM section S0 when RAM section is in OFF"] - #[inline(always)] - pub fn s0retention(&self) -> S0RETENTION_R { - S0RETENTION_R::new(((self.bits >> 16) & 1) != 0) - } - #[doc = "Bit 17 - Keep retention on RAM section S1 when RAM section is in OFF"] - #[inline(always)] - pub fn s1retention(&self) -> S1RETENTION_R { - S1RETENTION_R::new(((self.bits >> 17) & 1) != 0) - } -} -impl W { - #[doc = "Bit 0 - Keep RAM section S0 ON or OFF in System ON mode."] - #[inline(always)] - #[must_use] - pub fn s0power(&mut self) -> S0POWER_W<0> { - S0POWER_W::new(self) - } - #[doc = "Bit 1 - Keep RAM section S1 ON or OFF in System ON mode."] - #[inline(always)] - #[must_use] - pub fn s1power(&mut self) -> S1POWER_W<1> { - S1POWER_W::new(self) - } - #[doc = "Bit 16 - Keep retention on RAM section S0 when RAM section is in OFF"] - #[inline(always)] - #[must_use] - pub fn s0retention(&mut self) -> S0RETENTION_W<16> { - S0RETENTION_W::new(self) - } - #[doc = "Bit 17 - Keep retention on RAM section S1 when RAM section is in OFF"] - #[inline(always)] - #[must_use] - pub fn s1retention(&mut self) -> S1RETENTION_W<17> { - S1RETENTION_W::new(self) - } - #[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 = "Description cluster: RAMn power control register\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 [power](index.html) module"] -pub struct POWER_SPEC; -impl crate::RegisterSpec for POWER_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [power::R](R) reader structure"] -impl crate::Readable for POWER_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [power::W](W) writer structure"] -impl crate::Writable for POWER_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets POWER to value 0xffff"] -impl crate::Resettable for POWER_SPEC { - const RESET_VALUE: Self::Ux = 0xffff; -} diff --git a/down-the-stack/dk_pac/src/power/ram/powerclr.rs b/down-the-stack/dk_pac/src/power/ram/powerclr.rs deleted file mode 100644 index bd22ead..0000000 --- a/down-the-stack/dk_pac/src/power/ram/powerclr.rs +++ /dev/null @@ -1,154 +0,0 @@ -#[doc = "Register `POWERCLR` 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 = "Keep RAM section S0 of RAMn on or off in System ON mode\n\nValue on reset: 1"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum S0POWER_AW { - #[doc = "1: Off"] - OFF = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: S0POWER_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `S0POWER` writer - Keep RAM section S0 of RAMn on or off in System ON mode"] -pub type S0POWER_W<'a, const O: u8> = crate::BitWriter<'a, u32, POWERCLR_SPEC, S0POWER_AW, O>; -impl<'a, const O: u8> S0POWER_W<'a, O> { - #[doc = "Off"] - #[inline(always)] - pub fn off(self) -> &'a mut W { - self.variant(S0POWER_AW::OFF) - } -} -#[doc = "Keep RAM section S1 of RAMn on or off in System ON mode\n\nValue on reset: 1"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum S1POWER_AW { - #[doc = "1: Off"] - OFF = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: S1POWER_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `S1POWER` writer - Keep RAM section S1 of RAMn on or off in System ON mode"] -pub type S1POWER_W<'a, const O: u8> = crate::BitWriter<'a, u32, POWERCLR_SPEC, S1POWER_AW, O>; -impl<'a, const O: u8> S1POWER_W<'a, O> { - #[doc = "Off"] - #[inline(always)] - pub fn off(self) -> &'a mut W { - self.variant(S1POWER_AW::OFF) - } -} -#[doc = "Keep retention on RAM section S0 when RAM section is switched off\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum S0RETENTION_AW { - #[doc = "1: Off"] - OFF = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: S0RETENTION_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `S0RETENTION` writer - Keep retention on RAM section S0 when RAM section is switched off"] -pub type S0RETENTION_W<'a, const O: u8> = - crate::BitWriter<'a, u32, POWERCLR_SPEC, S0RETENTION_AW, O>; -impl<'a, const O: u8> S0RETENTION_W<'a, O> { - #[doc = "Off"] - #[inline(always)] - pub fn off(self) -> &'a mut W { - self.variant(S0RETENTION_AW::OFF) - } -} -#[doc = "Keep retention on RAM section S1 when RAM section is switched off\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum S1RETENTION_AW { - #[doc = "1: Off"] - OFF = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: S1RETENTION_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `S1RETENTION` writer - Keep retention on RAM section S1 when RAM section is switched off"] -pub type S1RETENTION_W<'a, const O: u8> = - crate::BitWriter<'a, u32, POWERCLR_SPEC, S1RETENTION_AW, O>; -impl<'a, const O: u8> S1RETENTION_W<'a, O> { - #[doc = "Off"] - #[inline(always)] - pub fn off(self) -> &'a mut W { - self.variant(S1RETENTION_AW::OFF) - } -} -impl W { - #[doc = "Bit 0 - Keep RAM section S0 of RAMn on or off in System ON mode"] - #[inline(always)] - #[must_use] - pub fn s0power(&mut self) -> S0POWER_W<0> { - S0POWER_W::new(self) - } - #[doc = "Bit 1 - Keep RAM section S1 of RAMn on or off in System ON mode"] - #[inline(always)] - #[must_use] - pub fn s1power(&mut self) -> S1POWER_W<1> { - S1POWER_W::new(self) - } - #[doc = "Bit 16 - Keep retention on RAM section S0 when RAM section is switched off"] - #[inline(always)] - #[must_use] - pub fn s0retention(&mut self) -> S0RETENTION_W<16> { - S0RETENTION_W::new(self) - } - #[doc = "Bit 17 - Keep retention on RAM section S1 when RAM section is switched off"] - #[inline(always)] - #[must_use] - pub fn s1retention(&mut self) -> S1RETENTION_W<17> { - S1RETENTION_W::new(self) - } - #[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 = "Description cluster: RAMn power control clear register\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 [powerclr](index.html) module"] -pub struct POWERCLR_SPEC; -impl crate::RegisterSpec for POWERCLR_SPEC { - type Ux = u32; -} -#[doc = "`write(|w| ..)` method takes [powerclr::W](W) writer structure"] -impl crate::Writable for POWERCLR_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets POWERCLR to value 0xffff"] -impl crate::Resettable for POWERCLR_SPEC { - const RESET_VALUE: Self::Ux = 0xffff; -} diff --git a/down-the-stack/dk_pac/src/power/ram/powerset.rs b/down-the-stack/dk_pac/src/power/ram/powerset.rs deleted file mode 100644 index 83b8e2e..0000000 --- a/down-the-stack/dk_pac/src/power/ram/powerset.rs +++ /dev/null @@ -1,154 +0,0 @@ -#[doc = "Register `POWERSET` 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 = "Keep RAM section S0 of RAMn on or off in System ON mode\n\nValue on reset: 1"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum S0POWER_AW { - #[doc = "1: On"] - ON = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: S0POWER_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `S0POWER` writer - Keep RAM section S0 of RAMn on or off in System ON mode"] -pub type S0POWER_W<'a, const O: u8> = crate::BitWriter<'a, u32, POWERSET_SPEC, S0POWER_AW, O>; -impl<'a, const O: u8> S0POWER_W<'a, O> { - #[doc = "On"] - #[inline(always)] - pub fn on(self) -> &'a mut W { - self.variant(S0POWER_AW::ON) - } -} -#[doc = "Keep RAM section S1 of RAMn on or off in System ON mode\n\nValue on reset: 1"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum S1POWER_AW { - #[doc = "1: On"] - ON = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: S1POWER_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `S1POWER` writer - Keep RAM section S1 of RAMn on or off in System ON mode"] -pub type S1POWER_W<'a, const O: u8> = crate::BitWriter<'a, u32, POWERSET_SPEC, S1POWER_AW, O>; -impl<'a, const O: u8> S1POWER_W<'a, O> { - #[doc = "On"] - #[inline(always)] - pub fn on(self) -> &'a mut W { - self.variant(S1POWER_AW::ON) - } -} -#[doc = "Keep retention on RAM section S0 when RAM section is switched off\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum S0RETENTION_AW { - #[doc = "1: On"] - ON = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: S0RETENTION_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `S0RETENTION` writer - Keep retention on RAM section S0 when RAM section is switched off"] -pub type S0RETENTION_W<'a, const O: u8> = - crate::BitWriter<'a, u32, POWERSET_SPEC, S0RETENTION_AW, O>; -impl<'a, const O: u8> S0RETENTION_W<'a, O> { - #[doc = "On"] - #[inline(always)] - pub fn on(self) -> &'a mut W { - self.variant(S0RETENTION_AW::ON) - } -} -#[doc = "Keep retention on RAM section S1 when RAM section is switched off\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum S1RETENTION_AW { - #[doc = "1: On"] - ON = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: S1RETENTION_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `S1RETENTION` writer - Keep retention on RAM section S1 when RAM section is switched off"] -pub type S1RETENTION_W<'a, const O: u8> = - crate::BitWriter<'a, u32, POWERSET_SPEC, S1RETENTION_AW, O>; -impl<'a, const O: u8> S1RETENTION_W<'a, O> { - #[doc = "On"] - #[inline(always)] - pub fn on(self) -> &'a mut W { - self.variant(S1RETENTION_AW::ON) - } -} -impl W { - #[doc = "Bit 0 - Keep RAM section S0 of RAMn on or off in System ON mode"] - #[inline(always)] - #[must_use] - pub fn s0power(&mut self) -> S0POWER_W<0> { - S0POWER_W::new(self) - } - #[doc = "Bit 1 - Keep RAM section S1 of RAMn on or off in System ON mode"] - #[inline(always)] - #[must_use] - pub fn s1power(&mut self) -> S1POWER_W<1> { - S1POWER_W::new(self) - } - #[doc = "Bit 16 - Keep retention on RAM section S0 when RAM section is switched off"] - #[inline(always)] - #[must_use] - pub fn s0retention(&mut self) -> S0RETENTION_W<16> { - S0RETENTION_W::new(self) - } - #[doc = "Bit 17 - Keep retention on RAM section S1 when RAM section is switched off"] - #[inline(always)] - #[must_use] - pub fn s1retention(&mut self) -> S1RETENTION_W<17> { - S1RETENTION_W::new(self) - } - #[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 = "Description cluster: RAMn power control set register\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 [powerset](index.html) module"] -pub struct POWERSET_SPEC; -impl crate::RegisterSpec for POWERSET_SPEC { - type Ux = u32; -} -#[doc = "`write(|w| ..)` method takes [powerset::W](W) writer structure"] -impl crate::Writable for POWERSET_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets POWERSET to value 0xffff"] -impl crate::Resettable for POWERSET_SPEC { - const RESET_VALUE: Self::Ux = 0xffff; -} diff --git a/down-the-stack/dk_pac/src/power/ramon.rs b/down-the-stack/dk_pac/src/power/ramon.rs deleted file mode 100644 index a8262bc..0000000 --- a/down-the-stack/dk_pac/src/power/ramon.rs +++ /dev/null @@ -1,309 +0,0 @@ -#[doc = "Register `RAMON` 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 `RAMON` 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 `ONRAM0` reader - Keep RAM block 0 on or off in system ON Mode"] -pub type ONRAM0_R = crate::BitReader; -#[doc = "Keep RAM block 0 on or off in system ON Mode\n\nValue on reset: 1"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum ONRAM0_A { - #[doc = "0: Off"] - RAM0OFF = 0, - #[doc = "1: On"] - RAM0ON = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: ONRAM0_A) -> Self { - variant as u8 != 0 - } -} -impl ONRAM0_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> ONRAM0_A { - match self.bits { - false => ONRAM0_A::RAM0OFF, - true => ONRAM0_A::RAM0ON, - } - } - #[doc = "Checks if the value of the field is `RAM0OFF`"] - #[inline(always)] - pub fn is_ram0off(&self) -> bool { - *self == ONRAM0_A::RAM0OFF - } - #[doc = "Checks if the value of the field is `RAM0ON`"] - #[inline(always)] - pub fn is_ram0on(&self) -> bool { - *self == ONRAM0_A::RAM0ON - } -} -#[doc = "Field `ONRAM0` writer - Keep RAM block 0 on or off in system ON Mode"] -pub type ONRAM0_W<'a, const O: u8> = crate::BitWriter<'a, u32, RAMON_SPEC, ONRAM0_A, O>; -impl<'a, const O: u8> ONRAM0_W<'a, O> { - #[doc = "Off"] - #[inline(always)] - pub fn ram0off(self) -> &'a mut W { - self.variant(ONRAM0_A::RAM0OFF) - } - #[doc = "On"] - #[inline(always)] - pub fn ram0on(self) -> &'a mut W { - self.variant(ONRAM0_A::RAM0ON) - } -} -#[doc = "Field `ONRAM1` reader - Keep RAM block 1 on or off in system ON Mode"] -pub type ONRAM1_R = crate::BitReader; -#[doc = "Keep RAM block 1 on or off in system ON Mode\n\nValue on reset: 1"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum ONRAM1_A { - #[doc = "0: Off"] - RAM1OFF = 0, - #[doc = "1: On"] - RAM1ON = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: ONRAM1_A) -> Self { - variant as u8 != 0 - } -} -impl ONRAM1_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> ONRAM1_A { - match self.bits { - false => ONRAM1_A::RAM1OFF, - true => ONRAM1_A::RAM1ON, - } - } - #[doc = "Checks if the value of the field is `RAM1OFF`"] - #[inline(always)] - pub fn is_ram1off(&self) -> bool { - *self == ONRAM1_A::RAM1OFF - } - #[doc = "Checks if the value of the field is `RAM1ON`"] - #[inline(always)] - pub fn is_ram1on(&self) -> bool { - *self == ONRAM1_A::RAM1ON - } -} -#[doc = "Field `ONRAM1` writer - Keep RAM block 1 on or off in system ON Mode"] -pub type ONRAM1_W<'a, const O: u8> = crate::BitWriter<'a, u32, RAMON_SPEC, ONRAM1_A, O>; -impl<'a, const O: u8> ONRAM1_W<'a, O> { - #[doc = "Off"] - #[inline(always)] - pub fn ram1off(self) -> &'a mut W { - self.variant(ONRAM1_A::RAM1OFF) - } - #[doc = "On"] - #[inline(always)] - pub fn ram1on(self) -> &'a mut W { - self.variant(ONRAM1_A::RAM1ON) - } -} -#[doc = "Field `OFFRAM0` reader - Keep retention on RAM block 0 when RAM block is switched off"] -pub type OFFRAM0_R = crate::BitReader; -#[doc = "Keep retention on RAM block 0 when RAM block is switched off\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum OFFRAM0_A { - #[doc = "0: Off"] - RAM0OFF = 0, - #[doc = "1: On"] - RAM0ON = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: OFFRAM0_A) -> Self { - variant as u8 != 0 - } -} -impl OFFRAM0_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> OFFRAM0_A { - match self.bits { - false => OFFRAM0_A::RAM0OFF, - true => OFFRAM0_A::RAM0ON, - } - } - #[doc = "Checks if the value of the field is `RAM0OFF`"] - #[inline(always)] - pub fn is_ram0off(&self) -> bool { - *self == OFFRAM0_A::RAM0OFF - } - #[doc = "Checks if the value of the field is `RAM0ON`"] - #[inline(always)] - pub fn is_ram0on(&self) -> bool { - *self == OFFRAM0_A::RAM0ON - } -} -#[doc = "Field `OFFRAM0` writer - Keep retention on RAM block 0 when RAM block is switched off"] -pub type OFFRAM0_W<'a, const O: u8> = crate::BitWriter<'a, u32, RAMON_SPEC, OFFRAM0_A, O>; -impl<'a, const O: u8> OFFRAM0_W<'a, O> { - #[doc = "Off"] - #[inline(always)] - pub fn ram0off(self) -> &'a mut W { - self.variant(OFFRAM0_A::RAM0OFF) - } - #[doc = "On"] - #[inline(always)] - pub fn ram0on(self) -> &'a mut W { - self.variant(OFFRAM0_A::RAM0ON) - } -} -#[doc = "Field `OFFRAM1` reader - Keep retention on RAM block 1 when RAM block is switched off"] -pub type OFFRAM1_R = crate::BitReader; -#[doc = "Keep retention on RAM block 1 when RAM block is switched off\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum OFFRAM1_A { - #[doc = "0: Off"] - RAM1OFF = 0, - #[doc = "1: On"] - RAM1ON = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: OFFRAM1_A) -> Self { - variant as u8 != 0 - } -} -impl OFFRAM1_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> OFFRAM1_A { - match self.bits { - false => OFFRAM1_A::RAM1OFF, - true => OFFRAM1_A::RAM1ON, - } - } - #[doc = "Checks if the value of the field is `RAM1OFF`"] - #[inline(always)] - pub fn is_ram1off(&self) -> bool { - *self == OFFRAM1_A::RAM1OFF - } - #[doc = "Checks if the value of the field is `RAM1ON`"] - #[inline(always)] - pub fn is_ram1on(&self) -> bool { - *self == OFFRAM1_A::RAM1ON - } -} -#[doc = "Field `OFFRAM1` writer - Keep retention on RAM block 1 when RAM block is switched off"] -pub type OFFRAM1_W<'a, const O: u8> = crate::BitWriter<'a, u32, RAMON_SPEC, OFFRAM1_A, O>; -impl<'a, const O: u8> OFFRAM1_W<'a, O> { - #[doc = "Off"] - #[inline(always)] - pub fn ram1off(self) -> &'a mut W { - self.variant(OFFRAM1_A::RAM1OFF) - } - #[doc = "On"] - #[inline(always)] - pub fn ram1on(self) -> &'a mut W { - self.variant(OFFRAM1_A::RAM1ON) - } -} -impl R { - #[doc = "Bit 0 - Keep RAM block 0 on or off in system ON Mode"] - #[inline(always)] - pub fn onram0(&self) -> ONRAM0_R { - ONRAM0_R::new((self.bits & 1) != 0) - } - #[doc = "Bit 1 - Keep RAM block 1 on or off in system ON Mode"] - #[inline(always)] - pub fn onram1(&self) -> ONRAM1_R { - ONRAM1_R::new(((self.bits >> 1) & 1) != 0) - } - #[doc = "Bit 16 - Keep retention on RAM block 0 when RAM block is switched off"] - #[inline(always)] - pub fn offram0(&self) -> OFFRAM0_R { - OFFRAM0_R::new(((self.bits >> 16) & 1) != 0) - } - #[doc = "Bit 17 - Keep retention on RAM block 1 when RAM block is switched off"] - #[inline(always)] - pub fn offram1(&self) -> OFFRAM1_R { - OFFRAM1_R::new(((self.bits >> 17) & 1) != 0) - } -} -impl W { - #[doc = "Bit 0 - Keep RAM block 0 on or off in system ON Mode"] - #[inline(always)] - #[must_use] - pub fn onram0(&mut self) -> ONRAM0_W<0> { - ONRAM0_W::new(self) - } - #[doc = "Bit 1 - Keep RAM block 1 on or off in system ON Mode"] - #[inline(always)] - #[must_use] - pub fn onram1(&mut self) -> ONRAM1_W<1> { - ONRAM1_W::new(self) - } - #[doc = "Bit 16 - Keep retention on RAM block 0 when RAM block is switched off"] - #[inline(always)] - #[must_use] - pub fn offram0(&mut self) -> OFFRAM0_W<16> { - OFFRAM0_W::new(self) - } - #[doc = "Bit 17 - Keep retention on RAM block 1 when RAM block is switched off"] - #[inline(always)] - #[must_use] - pub fn offram1(&mut self) -> OFFRAM1_W<17> { - OFFRAM1_W::new(self) - } - #[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 = "Deprecated register - RAM on/off register (this register is retained)\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 [ramon](index.html) module"] -pub struct RAMON_SPEC; -impl crate::RegisterSpec for RAMON_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [ramon::R](R) reader structure"] -impl crate::Readable for RAMON_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [ramon::W](W) writer structure"] -impl crate::Writable for RAMON_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets RAMON to value 0x03"] -impl crate::Resettable for RAMON_SPEC { - const RESET_VALUE: Self::Ux = 0x03; -} diff --git a/down-the-stack/dk_pac/src/power/ramonb.rs b/down-the-stack/dk_pac/src/power/ramonb.rs deleted file mode 100644 index 2577003..0000000 --- a/down-the-stack/dk_pac/src/power/ramonb.rs +++ /dev/null @@ -1,309 +0,0 @@ -#[doc = "Register `RAMONB` 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 `RAMONB` 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 `ONRAM2` reader - Keep RAM block 2 on or off in system ON Mode"] -pub type ONRAM2_R = crate::BitReader; -#[doc = "Keep RAM block 2 on or off in system ON Mode\n\nValue on reset: 1"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum ONRAM2_A { - #[doc = "0: Off"] - RAM2OFF = 0, - #[doc = "1: On"] - RAM2ON = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: ONRAM2_A) -> Self { - variant as u8 != 0 - } -} -impl ONRAM2_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> ONRAM2_A { - match self.bits { - false => ONRAM2_A::RAM2OFF, - true => ONRAM2_A::RAM2ON, - } - } - #[doc = "Checks if the value of the field is `RAM2OFF`"] - #[inline(always)] - pub fn is_ram2off(&self) -> bool { - *self == ONRAM2_A::RAM2OFF - } - #[doc = "Checks if the value of the field is `RAM2ON`"] - #[inline(always)] - pub fn is_ram2on(&self) -> bool { - *self == ONRAM2_A::RAM2ON - } -} -#[doc = "Field `ONRAM2` writer - Keep RAM block 2 on or off in system ON Mode"] -pub type ONRAM2_W<'a, const O: u8> = crate::BitWriter<'a, u32, RAMONB_SPEC, ONRAM2_A, O>; -impl<'a, const O: u8> ONRAM2_W<'a, O> { - #[doc = "Off"] - #[inline(always)] - pub fn ram2off(self) -> &'a mut W { - self.variant(ONRAM2_A::RAM2OFF) - } - #[doc = "On"] - #[inline(always)] - pub fn ram2on(self) -> &'a mut W { - self.variant(ONRAM2_A::RAM2ON) - } -} -#[doc = "Field `ONRAM3` reader - Keep RAM block 3 on or off in system ON Mode"] -pub type ONRAM3_R = crate::BitReader; -#[doc = "Keep RAM block 3 on or off in system ON Mode\n\nValue on reset: 1"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum ONRAM3_A { - #[doc = "0: Off"] - RAM3OFF = 0, - #[doc = "1: On"] - RAM3ON = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: ONRAM3_A) -> Self { - variant as u8 != 0 - } -} -impl ONRAM3_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> ONRAM3_A { - match self.bits { - false => ONRAM3_A::RAM3OFF, - true => ONRAM3_A::RAM3ON, - } - } - #[doc = "Checks if the value of the field is `RAM3OFF`"] - #[inline(always)] - pub fn is_ram3off(&self) -> bool { - *self == ONRAM3_A::RAM3OFF - } - #[doc = "Checks if the value of the field is `RAM3ON`"] - #[inline(always)] - pub fn is_ram3on(&self) -> bool { - *self == ONRAM3_A::RAM3ON - } -} -#[doc = "Field `ONRAM3` writer - Keep RAM block 3 on or off in system ON Mode"] -pub type ONRAM3_W<'a, const O: u8> = crate::BitWriter<'a, u32, RAMONB_SPEC, ONRAM3_A, O>; -impl<'a, const O: u8> ONRAM3_W<'a, O> { - #[doc = "Off"] - #[inline(always)] - pub fn ram3off(self) -> &'a mut W { - self.variant(ONRAM3_A::RAM3OFF) - } - #[doc = "On"] - #[inline(always)] - pub fn ram3on(self) -> &'a mut W { - self.variant(ONRAM3_A::RAM3ON) - } -} -#[doc = "Field `OFFRAM2` reader - Keep retention on RAM block 2 when RAM block is switched off"] -pub type OFFRAM2_R = crate::BitReader; -#[doc = "Keep retention on RAM block 2 when RAM block is switched off\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum OFFRAM2_A { - #[doc = "0: Off"] - RAM2OFF = 0, - #[doc = "1: On"] - RAM2ON = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: OFFRAM2_A) -> Self { - variant as u8 != 0 - } -} -impl OFFRAM2_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> OFFRAM2_A { - match self.bits { - false => OFFRAM2_A::RAM2OFF, - true => OFFRAM2_A::RAM2ON, - } - } - #[doc = "Checks if the value of the field is `RAM2OFF`"] - #[inline(always)] - pub fn is_ram2off(&self) -> bool { - *self == OFFRAM2_A::RAM2OFF - } - #[doc = "Checks if the value of the field is `RAM2ON`"] - #[inline(always)] - pub fn is_ram2on(&self) -> bool { - *self == OFFRAM2_A::RAM2ON - } -} -#[doc = "Field `OFFRAM2` writer - Keep retention on RAM block 2 when RAM block is switched off"] -pub type OFFRAM2_W<'a, const O: u8> = crate::BitWriter<'a, u32, RAMONB_SPEC, OFFRAM2_A, O>; -impl<'a, const O: u8> OFFRAM2_W<'a, O> { - #[doc = "Off"] - #[inline(always)] - pub fn ram2off(self) -> &'a mut W { - self.variant(OFFRAM2_A::RAM2OFF) - } - #[doc = "On"] - #[inline(always)] - pub fn ram2on(self) -> &'a mut W { - self.variant(OFFRAM2_A::RAM2ON) - } -} -#[doc = "Field `OFFRAM3` reader - Keep retention on RAM block 3 when RAM block is switched off"] -pub type OFFRAM3_R = crate::BitReader; -#[doc = "Keep retention on RAM block 3 when RAM block is switched off\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum OFFRAM3_A { - #[doc = "0: Off"] - RAM3OFF = 0, - #[doc = "1: On"] - RAM3ON = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: OFFRAM3_A) -> Self { - variant as u8 != 0 - } -} -impl OFFRAM3_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> OFFRAM3_A { - match self.bits { - false => OFFRAM3_A::RAM3OFF, - true => OFFRAM3_A::RAM3ON, - } - } - #[doc = "Checks if the value of the field is `RAM3OFF`"] - #[inline(always)] - pub fn is_ram3off(&self) -> bool { - *self == OFFRAM3_A::RAM3OFF - } - #[doc = "Checks if the value of the field is `RAM3ON`"] - #[inline(always)] - pub fn is_ram3on(&self) -> bool { - *self == OFFRAM3_A::RAM3ON - } -} -#[doc = "Field `OFFRAM3` writer - Keep retention on RAM block 3 when RAM block is switched off"] -pub type OFFRAM3_W<'a, const O: u8> = crate::BitWriter<'a, u32, RAMONB_SPEC, OFFRAM3_A, O>; -impl<'a, const O: u8> OFFRAM3_W<'a, O> { - #[doc = "Off"] - #[inline(always)] - pub fn ram3off(self) -> &'a mut W { - self.variant(OFFRAM3_A::RAM3OFF) - } - #[doc = "On"] - #[inline(always)] - pub fn ram3on(self) -> &'a mut W { - self.variant(OFFRAM3_A::RAM3ON) - } -} -impl R { - #[doc = "Bit 0 - Keep RAM block 2 on or off in system ON Mode"] - #[inline(always)] - pub fn onram2(&self) -> ONRAM2_R { - ONRAM2_R::new((self.bits & 1) != 0) - } - #[doc = "Bit 1 - Keep RAM block 3 on or off in system ON Mode"] - #[inline(always)] - pub fn onram3(&self) -> ONRAM3_R { - ONRAM3_R::new(((self.bits >> 1) & 1) != 0) - } - #[doc = "Bit 16 - Keep retention on RAM block 2 when RAM block is switched off"] - #[inline(always)] - pub fn offram2(&self) -> OFFRAM2_R { - OFFRAM2_R::new(((self.bits >> 16) & 1) != 0) - } - #[doc = "Bit 17 - Keep retention on RAM block 3 when RAM block is switched off"] - #[inline(always)] - pub fn offram3(&self) -> OFFRAM3_R { - OFFRAM3_R::new(((self.bits >> 17) & 1) != 0) - } -} -impl W { - #[doc = "Bit 0 - Keep RAM block 2 on or off in system ON Mode"] - #[inline(always)] - #[must_use] - pub fn onram2(&mut self) -> ONRAM2_W<0> { - ONRAM2_W::new(self) - } - #[doc = "Bit 1 - Keep RAM block 3 on or off in system ON Mode"] - #[inline(always)] - #[must_use] - pub fn onram3(&mut self) -> ONRAM3_W<1> { - ONRAM3_W::new(self) - } - #[doc = "Bit 16 - Keep retention on RAM block 2 when RAM block is switched off"] - #[inline(always)] - #[must_use] - pub fn offram2(&mut self) -> OFFRAM2_W<16> { - OFFRAM2_W::new(self) - } - #[doc = "Bit 17 - Keep retention on RAM block 3 when RAM block is switched off"] - #[inline(always)] - #[must_use] - pub fn offram3(&mut self) -> OFFRAM3_W<17> { - OFFRAM3_W::new(self) - } - #[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 = "Deprecated register - RAM on/off register (this register is retained)\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 [ramonb](index.html) module"] -pub struct RAMONB_SPEC; -impl crate::RegisterSpec for RAMONB_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [ramonb::R](R) reader structure"] -impl crate::Readable for RAMONB_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [ramonb::W](W) writer structure"] -impl crate::Writable for RAMONB_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets RAMONB to value 0x03"] -impl crate::Resettable for RAMONB_SPEC { - const RESET_VALUE: Self::Ux = 0x03; -} diff --git a/down-the-stack/dk_pac/src/power/ramstatus.rs b/down-the-stack/dk_pac/src/power/ramstatus.rs deleted file mode 100644 index ea360fd..0000000 --- a/down-the-stack/dk_pac/src/power/ramstatus.rs +++ /dev/null @@ -1,194 +0,0 @@ -#[doc = "Register `RAMSTATUS` 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 = "Field `RAMBLOCK0` reader - RAM block 0 is on or off/powering up"] -pub type RAMBLOCK0_R = crate::BitReader; -#[doc = "RAM block 0 is on or off/powering up\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum RAMBLOCK0_A { - #[doc = "0: Off"] - OFF = 0, - #[doc = "1: On"] - ON = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: RAMBLOCK0_A) -> Self { - variant as u8 != 0 - } -} -impl RAMBLOCK0_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> RAMBLOCK0_A { - match self.bits { - false => RAMBLOCK0_A::OFF, - true => RAMBLOCK0_A::ON, - } - } - #[doc = "Checks if the value of the field is `OFF`"] - #[inline(always)] - pub fn is_off(&self) -> bool { - *self == RAMBLOCK0_A::OFF - } - #[doc = "Checks if the value of the field is `ON`"] - #[inline(always)] - pub fn is_on(&self) -> bool { - *self == RAMBLOCK0_A::ON - } -} -#[doc = "Field `RAMBLOCK1` reader - RAM block 1 is on or off/powering up"] -pub type RAMBLOCK1_R = crate::BitReader; -#[doc = "RAM block 1 is on or off/powering up\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum RAMBLOCK1_A { - #[doc = "0: Off"] - OFF = 0, - #[doc = "1: On"] - ON = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: RAMBLOCK1_A) -> Self { - variant as u8 != 0 - } -} -impl RAMBLOCK1_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> RAMBLOCK1_A { - match self.bits { - false => RAMBLOCK1_A::OFF, - true => RAMBLOCK1_A::ON, - } - } - #[doc = "Checks if the value of the field is `OFF`"] - #[inline(always)] - pub fn is_off(&self) -> bool { - *self == RAMBLOCK1_A::OFF - } - #[doc = "Checks if the value of the field is `ON`"] - #[inline(always)] - pub fn is_on(&self) -> bool { - *self == RAMBLOCK1_A::ON - } -} -#[doc = "Field `RAMBLOCK2` reader - RAM block 2 is on or off/powering up"] -pub type RAMBLOCK2_R = crate::BitReader; -#[doc = "RAM block 2 is on or off/powering up\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum RAMBLOCK2_A { - #[doc = "0: Off"] - OFF = 0, - #[doc = "1: On"] - ON = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: RAMBLOCK2_A) -> Self { - variant as u8 != 0 - } -} -impl RAMBLOCK2_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> RAMBLOCK2_A { - match self.bits { - false => RAMBLOCK2_A::OFF, - true => RAMBLOCK2_A::ON, - } - } - #[doc = "Checks if the value of the field is `OFF`"] - #[inline(always)] - pub fn is_off(&self) -> bool { - *self == RAMBLOCK2_A::OFF - } - #[doc = "Checks if the value of the field is `ON`"] - #[inline(always)] - pub fn is_on(&self) -> bool { - *self == RAMBLOCK2_A::ON - } -} -#[doc = "Field `RAMBLOCK3` reader - RAM block 3 is on or off/powering up"] -pub type RAMBLOCK3_R = crate::BitReader; -#[doc = "RAM block 3 is on or off/powering up\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum RAMBLOCK3_A { - #[doc = "0: Off"] - OFF = 0, - #[doc = "1: On"] - ON = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: RAMBLOCK3_A) -> Self { - variant as u8 != 0 - } -} -impl RAMBLOCK3_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> RAMBLOCK3_A { - match self.bits { - false => RAMBLOCK3_A::OFF, - true => RAMBLOCK3_A::ON, - } - } - #[doc = "Checks if the value of the field is `OFF`"] - #[inline(always)] - pub fn is_off(&self) -> bool { - *self == RAMBLOCK3_A::OFF - } - #[doc = "Checks if the value of the field is `ON`"] - #[inline(always)] - pub fn is_on(&self) -> bool { - *self == RAMBLOCK3_A::ON - } -} -impl R { - #[doc = "Bit 0 - RAM block 0 is on or off/powering up"] - #[inline(always)] - pub fn ramblock0(&self) -> RAMBLOCK0_R { - RAMBLOCK0_R::new((self.bits & 1) != 0) - } - #[doc = "Bit 1 - RAM block 1 is on or off/powering up"] - #[inline(always)] - pub fn ramblock1(&self) -> RAMBLOCK1_R { - RAMBLOCK1_R::new(((self.bits >> 1) & 1) != 0) - } - #[doc = "Bit 2 - RAM block 2 is on or off/powering up"] - #[inline(always)] - pub fn ramblock2(&self) -> RAMBLOCK2_R { - RAMBLOCK2_R::new(((self.bits >> 2) & 1) != 0) - } - #[doc = "Bit 3 - RAM block 3 is on or off/powering up"] - #[inline(always)] - pub fn ramblock3(&self) -> RAMBLOCK3_R { - RAMBLOCK3_R::new(((self.bits >> 3) & 1) != 0) - } -} -#[doc = "Deprecated register - RAM status register\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 [ramstatus](index.html) module"] -pub struct RAMSTATUS_SPEC; -impl crate::RegisterSpec for RAMSTATUS_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [ramstatus::R](R) reader structure"] -impl crate::Readable for RAMSTATUS_SPEC { - type Reader = R; -} -#[doc = "`reset()` method sets RAMSTATUS to value 0"] -impl crate::Resettable for RAMSTATUS_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/power/resetreas.rs b/down-the-stack/dk_pac/src/power/resetreas.rs deleted file mode 100644 index e8bd328..0000000 --- a/down-the-stack/dk_pac/src/power/resetreas.rs +++ /dev/null @@ -1,553 +0,0 @@ -#[doc = "Register `RESETREAS` 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 `RESETREAS` 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 `RESETPIN` reader - Reset from pin-reset detected"] -pub type RESETPIN_R = crate::BitReader; -#[doc = "Reset from pin-reset detected\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum RESETPIN_A { - #[doc = "0: Not detected"] - NOT_DETECTED = 0, - #[doc = "1: Detected"] - DETECTED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: RESETPIN_A) -> Self { - variant as u8 != 0 - } -} -impl RESETPIN_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> RESETPIN_A { - match self.bits { - false => RESETPIN_A::NOT_DETECTED, - true => RESETPIN_A::DETECTED, - } - } - #[doc = "Checks if the value of the field is `NOT_DETECTED`"] - #[inline(always)] - pub fn is_not_detected(&self) -> bool { - *self == RESETPIN_A::NOT_DETECTED - } - #[doc = "Checks if the value of the field is `DETECTED`"] - #[inline(always)] - pub fn is_detected(&self) -> bool { - *self == RESETPIN_A::DETECTED - } -} -#[doc = "Field `RESETPIN` writer - Reset from pin-reset detected"] -pub type RESETPIN_W<'a, const O: u8> = crate::BitWriter<'a, u32, RESETREAS_SPEC, RESETPIN_A, O>; -impl<'a, const O: u8> RESETPIN_W<'a, O> { - #[doc = "Not detected"] - #[inline(always)] - pub fn not_detected(self) -> &'a mut W { - self.variant(RESETPIN_A::NOT_DETECTED) - } - #[doc = "Detected"] - #[inline(always)] - pub fn detected(self) -> &'a mut W { - self.variant(RESETPIN_A::DETECTED) - } -} -#[doc = "Field `DOG` reader - Reset from watchdog detected"] -pub type DOG_R = crate::BitReader; -#[doc = "Reset from watchdog detected\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum DOG_A { - #[doc = "0: Not detected"] - NOT_DETECTED = 0, - #[doc = "1: Detected"] - DETECTED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: DOG_A) -> Self { - variant as u8 != 0 - } -} -impl DOG_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> DOG_A { - match self.bits { - false => DOG_A::NOT_DETECTED, - true => DOG_A::DETECTED, - } - } - #[doc = "Checks if the value of the field is `NOT_DETECTED`"] - #[inline(always)] - pub fn is_not_detected(&self) -> bool { - *self == DOG_A::NOT_DETECTED - } - #[doc = "Checks if the value of the field is `DETECTED`"] - #[inline(always)] - pub fn is_detected(&self) -> bool { - *self == DOG_A::DETECTED - } -} -#[doc = "Field `DOG` writer - Reset from watchdog detected"] -pub type DOG_W<'a, const O: u8> = crate::BitWriter<'a, u32, RESETREAS_SPEC, DOG_A, O>; -impl<'a, const O: u8> DOG_W<'a, O> { - #[doc = "Not detected"] - #[inline(always)] - pub fn not_detected(self) -> &'a mut W { - self.variant(DOG_A::NOT_DETECTED) - } - #[doc = "Detected"] - #[inline(always)] - pub fn detected(self) -> &'a mut W { - self.variant(DOG_A::DETECTED) - } -} -#[doc = "Field `SREQ` reader - Reset from soft reset detected"] -pub type SREQ_R = crate::BitReader; -#[doc = "Reset from soft reset detected\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum SREQ_A { - #[doc = "0: Not detected"] - NOT_DETECTED = 0, - #[doc = "1: Detected"] - DETECTED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: SREQ_A) -> Self { - variant as u8 != 0 - } -} -impl SREQ_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> SREQ_A { - match self.bits { - false => SREQ_A::NOT_DETECTED, - true => SREQ_A::DETECTED, - } - } - #[doc = "Checks if the value of the field is `NOT_DETECTED`"] - #[inline(always)] - pub fn is_not_detected(&self) -> bool { - *self == SREQ_A::NOT_DETECTED - } - #[doc = "Checks if the value of the field is `DETECTED`"] - #[inline(always)] - pub fn is_detected(&self) -> bool { - *self == SREQ_A::DETECTED - } -} -#[doc = "Field `SREQ` writer - Reset from soft reset detected"] -pub type SREQ_W<'a, const O: u8> = crate::BitWriter<'a, u32, RESETREAS_SPEC, SREQ_A, O>; -impl<'a, const O: u8> SREQ_W<'a, O> { - #[doc = "Not detected"] - #[inline(always)] - pub fn not_detected(self) -> &'a mut W { - self.variant(SREQ_A::NOT_DETECTED) - } - #[doc = "Detected"] - #[inline(always)] - pub fn detected(self) -> &'a mut W { - self.variant(SREQ_A::DETECTED) - } -} -#[doc = "Field `LOCKUP` reader - Reset from CPU lock-up detected"] -pub type LOCKUP_R = crate::BitReader; -#[doc = "Reset from CPU lock-up detected\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum LOCKUP_A { - #[doc = "0: Not detected"] - NOT_DETECTED = 0, - #[doc = "1: Detected"] - DETECTED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: LOCKUP_A) -> Self { - variant as u8 != 0 - } -} -impl LOCKUP_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> LOCKUP_A { - match self.bits { - false => LOCKUP_A::NOT_DETECTED, - true => LOCKUP_A::DETECTED, - } - } - #[doc = "Checks if the value of the field is `NOT_DETECTED`"] - #[inline(always)] - pub fn is_not_detected(&self) -> bool { - *self == LOCKUP_A::NOT_DETECTED - } - #[doc = "Checks if the value of the field is `DETECTED`"] - #[inline(always)] - pub fn is_detected(&self) -> bool { - *self == LOCKUP_A::DETECTED - } -} -#[doc = "Field `LOCKUP` writer - Reset from CPU lock-up detected"] -pub type LOCKUP_W<'a, const O: u8> = crate::BitWriter<'a, u32, RESETREAS_SPEC, LOCKUP_A, O>; -impl<'a, const O: u8> LOCKUP_W<'a, O> { - #[doc = "Not detected"] - #[inline(always)] - pub fn not_detected(self) -> &'a mut W { - self.variant(LOCKUP_A::NOT_DETECTED) - } - #[doc = "Detected"] - #[inline(always)] - pub fn detected(self) -> &'a mut W { - self.variant(LOCKUP_A::DETECTED) - } -} -#[doc = "Field `OFF` reader - Reset due to wake up from System OFF mode when wakeup is triggered from DETECT signal from GPIO"] -pub type OFF_R = crate::BitReader; -#[doc = "Reset due to wake up from System OFF mode when wakeup is triggered from DETECT signal from GPIO\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum OFF_A { - #[doc = "0: Not detected"] - NOT_DETECTED = 0, - #[doc = "1: Detected"] - DETECTED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: OFF_A) -> Self { - variant as u8 != 0 - } -} -impl OFF_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> OFF_A { - match self.bits { - false => OFF_A::NOT_DETECTED, - true => OFF_A::DETECTED, - } - } - #[doc = "Checks if the value of the field is `NOT_DETECTED`"] - #[inline(always)] - pub fn is_not_detected(&self) -> bool { - *self == OFF_A::NOT_DETECTED - } - #[doc = "Checks if the value of the field is `DETECTED`"] - #[inline(always)] - pub fn is_detected(&self) -> bool { - *self == OFF_A::DETECTED - } -} -#[doc = "Field `OFF` writer - Reset due to wake up from System OFF mode when wakeup is triggered from DETECT signal from GPIO"] -pub type OFF_W<'a, const O: u8> = crate::BitWriter<'a, u32, RESETREAS_SPEC, OFF_A, O>; -impl<'a, const O: u8> OFF_W<'a, O> { - #[doc = "Not detected"] - #[inline(always)] - pub fn not_detected(self) -> &'a mut W { - self.variant(OFF_A::NOT_DETECTED) - } - #[doc = "Detected"] - #[inline(always)] - pub fn detected(self) -> &'a mut W { - self.variant(OFF_A::DETECTED) - } -} -#[doc = "Field `LPCOMP` reader - Reset due to wake up from System OFF mode when wakeup is triggered from ANADETECT signal from LPCOMP"] -pub type LPCOMP_R = crate::BitReader; -#[doc = "Reset due to wake up from System OFF mode when wakeup is triggered from ANADETECT signal from LPCOMP\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum LPCOMP_A { - #[doc = "0: Not detected"] - NOT_DETECTED = 0, - #[doc = "1: Detected"] - DETECTED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: LPCOMP_A) -> Self { - variant as u8 != 0 - } -} -impl LPCOMP_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> LPCOMP_A { - match self.bits { - false => LPCOMP_A::NOT_DETECTED, - true => LPCOMP_A::DETECTED, - } - } - #[doc = "Checks if the value of the field is `NOT_DETECTED`"] - #[inline(always)] - pub fn is_not_detected(&self) -> bool { - *self == LPCOMP_A::NOT_DETECTED - } - #[doc = "Checks if the value of the field is `DETECTED`"] - #[inline(always)] - pub fn is_detected(&self) -> bool { - *self == LPCOMP_A::DETECTED - } -} -#[doc = "Field `LPCOMP` writer - Reset due to wake up from System OFF mode when wakeup is triggered from ANADETECT signal from LPCOMP"] -pub type LPCOMP_W<'a, const O: u8> = crate::BitWriter<'a, u32, RESETREAS_SPEC, LPCOMP_A, O>; -impl<'a, const O: u8> LPCOMP_W<'a, O> { - #[doc = "Not detected"] - #[inline(always)] - pub fn not_detected(self) -> &'a mut W { - self.variant(LPCOMP_A::NOT_DETECTED) - } - #[doc = "Detected"] - #[inline(always)] - pub fn detected(self) -> &'a mut W { - self.variant(LPCOMP_A::DETECTED) - } -} -#[doc = "Field `DIF` reader - Reset due to wake up from System OFF mode when wakeup is triggered from entering into debug interface mode"] -pub type DIF_R = crate::BitReader; -#[doc = "Reset due to wake up from System OFF mode when wakeup is triggered from entering into debug interface mode\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum DIF_A { - #[doc = "0: Not detected"] - NOT_DETECTED = 0, - #[doc = "1: Detected"] - DETECTED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: DIF_A) -> Self { - variant as u8 != 0 - } -} -impl DIF_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> DIF_A { - match self.bits { - false => DIF_A::NOT_DETECTED, - true => DIF_A::DETECTED, - } - } - #[doc = "Checks if the value of the field is `NOT_DETECTED`"] - #[inline(always)] - pub fn is_not_detected(&self) -> bool { - *self == DIF_A::NOT_DETECTED - } - #[doc = "Checks if the value of the field is `DETECTED`"] - #[inline(always)] - pub fn is_detected(&self) -> bool { - *self == DIF_A::DETECTED - } -} -#[doc = "Field `DIF` writer - Reset due to wake up from System OFF mode when wakeup is triggered from entering into debug interface mode"] -pub type DIF_W<'a, const O: u8> = crate::BitWriter<'a, u32, RESETREAS_SPEC, DIF_A, O>; -impl<'a, const O: u8> DIF_W<'a, O> { - #[doc = "Not detected"] - #[inline(always)] - pub fn not_detected(self) -> &'a mut W { - self.variant(DIF_A::NOT_DETECTED) - } - #[doc = "Detected"] - #[inline(always)] - pub fn detected(self) -> &'a mut W { - self.variant(DIF_A::DETECTED) - } -} -#[doc = "Field `NFC` reader - Reset due to wake up from System OFF mode by NFC field detect"] -pub type NFC_R = crate::BitReader; -#[doc = "Reset due to wake up from System OFF mode by NFC field detect\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum NFC_A { - #[doc = "0: Not detected"] - NOT_DETECTED = 0, - #[doc = "1: Detected"] - DETECTED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: NFC_A) -> Self { - variant as u8 != 0 - } -} -impl NFC_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> NFC_A { - match self.bits { - false => NFC_A::NOT_DETECTED, - true => NFC_A::DETECTED, - } - } - #[doc = "Checks if the value of the field is `NOT_DETECTED`"] - #[inline(always)] - pub fn is_not_detected(&self) -> bool { - *self == NFC_A::NOT_DETECTED - } - #[doc = "Checks if the value of the field is `DETECTED`"] - #[inline(always)] - pub fn is_detected(&self) -> bool { - *self == NFC_A::DETECTED - } -} -#[doc = "Field `NFC` writer - Reset due to wake up from System OFF mode by NFC field detect"] -pub type NFC_W<'a, const O: u8> = crate::BitWriter<'a, u32, RESETREAS_SPEC, NFC_A, O>; -impl<'a, const O: u8> NFC_W<'a, O> { - #[doc = "Not detected"] - #[inline(always)] - pub fn not_detected(self) -> &'a mut W { - self.variant(NFC_A::NOT_DETECTED) - } - #[doc = "Detected"] - #[inline(always)] - pub fn detected(self) -> &'a mut W { - self.variant(NFC_A::DETECTED) - } -} -impl R { - #[doc = "Bit 0 - Reset from pin-reset detected"] - #[inline(always)] - pub fn resetpin(&self) -> RESETPIN_R { - RESETPIN_R::new((self.bits & 1) != 0) - } - #[doc = "Bit 1 - Reset from watchdog detected"] - #[inline(always)] - pub fn dog(&self) -> DOG_R { - DOG_R::new(((self.bits >> 1) & 1) != 0) - } - #[doc = "Bit 2 - Reset from soft reset detected"] - #[inline(always)] - pub fn sreq(&self) -> SREQ_R { - SREQ_R::new(((self.bits >> 2) & 1) != 0) - } - #[doc = "Bit 3 - Reset from CPU lock-up detected"] - #[inline(always)] - pub fn lockup(&self) -> LOCKUP_R { - LOCKUP_R::new(((self.bits >> 3) & 1) != 0) - } - #[doc = "Bit 16 - Reset due to wake up from System OFF mode when wakeup is triggered from DETECT signal from GPIO"] - #[inline(always)] - pub fn off(&self) -> OFF_R { - OFF_R::new(((self.bits >> 16) & 1) != 0) - } - #[doc = "Bit 17 - Reset due to wake up from System OFF mode when wakeup is triggered from ANADETECT signal from LPCOMP"] - #[inline(always)] - pub fn lpcomp(&self) -> LPCOMP_R { - LPCOMP_R::new(((self.bits >> 17) & 1) != 0) - } - #[doc = "Bit 18 - Reset due to wake up from System OFF mode when wakeup is triggered from entering into debug interface mode"] - #[inline(always)] - pub fn dif(&self) -> DIF_R { - DIF_R::new(((self.bits >> 18) & 1) != 0) - } - #[doc = "Bit 19 - Reset due to wake up from System OFF mode by NFC field detect"] - #[inline(always)] - pub fn nfc(&self) -> NFC_R { - NFC_R::new(((self.bits >> 19) & 1) != 0) - } -} -impl W { - #[doc = "Bit 0 - Reset from pin-reset detected"] - #[inline(always)] - #[must_use] - pub fn resetpin(&mut self) -> RESETPIN_W<0> { - RESETPIN_W::new(self) - } - #[doc = "Bit 1 - Reset from watchdog detected"] - #[inline(always)] - #[must_use] - pub fn dog(&mut self) -> DOG_W<1> { - DOG_W::new(self) - } - #[doc = "Bit 2 - Reset from soft reset detected"] - #[inline(always)] - #[must_use] - pub fn sreq(&mut self) -> SREQ_W<2> { - SREQ_W::new(self) - } - #[doc = "Bit 3 - Reset from CPU lock-up detected"] - #[inline(always)] - #[must_use] - pub fn lockup(&mut self) -> LOCKUP_W<3> { - LOCKUP_W::new(self) - } - #[doc = "Bit 16 - Reset due to wake up from System OFF mode when wakeup is triggered from DETECT signal from GPIO"] - #[inline(always)] - #[must_use] - pub fn off(&mut self) -> OFF_W<16> { - OFF_W::new(self) - } - #[doc = "Bit 17 - Reset due to wake up from System OFF mode when wakeup is triggered from ANADETECT signal from LPCOMP"] - #[inline(always)] - #[must_use] - pub fn lpcomp(&mut self) -> LPCOMP_W<17> { - LPCOMP_W::new(self) - } - #[doc = "Bit 18 - Reset due to wake up from System OFF mode when wakeup is triggered from entering into debug interface mode"] - #[inline(always)] - #[must_use] - pub fn dif(&mut self) -> DIF_W<18> { - DIF_W::new(self) - } - #[doc = "Bit 19 - Reset due to wake up from System OFF mode by NFC field detect"] - #[inline(always)] - #[must_use] - pub fn nfc(&mut self) -> NFC_W<19> { - NFC_W::new(self) - } - #[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 = "Reset reason\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 [resetreas](index.html) module"] -pub struct RESETREAS_SPEC; -impl crate::RegisterSpec for RESETREAS_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [resetreas::R](R) reader structure"] -impl crate::Readable for RESETREAS_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [resetreas::W](W) writer structure"] -impl crate::Writable for RESETREAS_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets RESETREAS to value 0"] -impl crate::Resettable for RESETREAS_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/power/systemoff.rs b/down-the-stack/dk_pac/src/power/systemoff.rs deleted file mode 100644 index fd324aa..0000000 --- a/down-the-stack/dk_pac/src/power/systemoff.rs +++ /dev/null @@ -1,71 +0,0 @@ -#[doc = "Register `SYSTEMOFF` 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 = "Enable System OFF mode\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum SYSTEMOFF_AW { - #[doc = "1: Enable System OFF mode"] - ENTER = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: SYSTEMOFF_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `SYSTEMOFF` writer - Enable System OFF mode"] -pub type SYSTEMOFF_W<'a, const O: u8> = crate::BitWriter<'a, u32, SYSTEMOFF_SPEC, SYSTEMOFF_AW, O>; -impl<'a, const O: u8> SYSTEMOFF_W<'a, O> { - #[doc = "Enable System OFF mode"] - #[inline(always)] - pub fn enter(self) -> &'a mut W { - self.variant(SYSTEMOFF_AW::ENTER) - } -} -impl W { - #[doc = "Bit 0 - Enable System OFF mode"] - #[inline(always)] - #[must_use] - pub fn systemoff(&mut self) -> SYSTEMOFF_W<0> { - SYSTEMOFF_W::new(self) - } - #[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 = "System OFF register\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 [systemoff](index.html) module"] -pub struct SYSTEMOFF_SPEC; -impl crate::RegisterSpec for SYSTEMOFF_SPEC { - type Ux = u32; -} -#[doc = "`write(|w| ..)` method takes [systemoff::W](W) writer structure"] -impl crate::Writable for SYSTEMOFF_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets SYSTEMOFF to value 0"] -impl crate::Resettable for SYSTEMOFF_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/power/tasks_constlat.rs b/down-the-stack/dk_pac/src/power/tasks_constlat.rs deleted file mode 100644 index d08bf92..0000000 --- a/down-the-stack/dk_pac/src/power/tasks_constlat.rs +++ /dev/null @@ -1,72 +0,0 @@ -#[doc = "Register `TASKS_CONSTLAT` 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 = "Enable constant latency mode\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum TASKS_CONSTLAT_AW { - #[doc = "1: Trigger task"] - TRIGGER = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: TASKS_CONSTLAT_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `TASKS_CONSTLAT` writer - Enable constant latency mode"] -pub type TASKS_CONSTLAT_W<'a, const O: u8> = - crate::BitWriter<'a, u32, TASKS_CONSTLAT_SPEC, TASKS_CONSTLAT_AW, O>; -impl<'a, const O: u8> TASKS_CONSTLAT_W<'a, O> { - #[doc = "Trigger task"] - #[inline(always)] - pub fn trigger(self) -> &'a mut W { - self.variant(TASKS_CONSTLAT_AW::TRIGGER) - } -} -impl W { - #[doc = "Bit 0 - Enable constant latency mode"] - #[inline(always)] - #[must_use] - pub fn tasks_constlat(&mut self) -> TASKS_CONSTLAT_W<0> { - TASKS_CONSTLAT_W::new(self) - } - #[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 = "Enable constant latency mode\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 [tasks_constlat](index.html) module"] -pub struct TASKS_CONSTLAT_SPEC; -impl crate::RegisterSpec for TASKS_CONSTLAT_SPEC { - type Ux = u32; -} -#[doc = "`write(|w| ..)` method takes [tasks_constlat::W](W) writer structure"] -impl crate::Writable for TASKS_CONSTLAT_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets TASKS_CONSTLAT to value 0"] -impl crate::Resettable for TASKS_CONSTLAT_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/power/tasks_lowpwr.rs b/down-the-stack/dk_pac/src/power/tasks_lowpwr.rs deleted file mode 100644 index 7bab379..0000000 --- a/down-the-stack/dk_pac/src/power/tasks_lowpwr.rs +++ /dev/null @@ -1,72 +0,0 @@ -#[doc = "Register `TASKS_LOWPWR` 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 = "Enable low power mode (variable latency)\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum TASKS_LOWPWR_AW { - #[doc = "1: Trigger task"] - TRIGGER = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: TASKS_LOWPWR_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `TASKS_LOWPWR` writer - Enable low power mode (variable latency)"] -pub type TASKS_LOWPWR_W<'a, const O: u8> = - crate::BitWriter<'a, u32, TASKS_LOWPWR_SPEC, TASKS_LOWPWR_AW, O>; -impl<'a, const O: u8> TASKS_LOWPWR_W<'a, O> { - #[doc = "Trigger task"] - #[inline(always)] - pub fn trigger(self) -> &'a mut W { - self.variant(TASKS_LOWPWR_AW::TRIGGER) - } -} -impl W { - #[doc = "Bit 0 - Enable low power mode (variable latency)"] - #[inline(always)] - #[must_use] - pub fn tasks_lowpwr(&mut self) -> TASKS_LOWPWR_W<0> { - TASKS_LOWPWR_W::new(self) - } - #[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 = "Enable low power mode (variable latency)\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 [tasks_lowpwr](index.html) module"] -pub struct TASKS_LOWPWR_SPEC; -impl crate::RegisterSpec for TASKS_LOWPWR_SPEC { - type Ux = u32; -} -#[doc = "`write(|w| ..)` method takes [tasks_lowpwr::W](W) writer structure"] -impl crate::Writable for TASKS_LOWPWR_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets TASKS_LOWPWR to value 0"] -impl crate::Resettable for TASKS_LOWPWR_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/ppi.rs b/down-the-stack/dk_pac/src/ppi.rs deleted file mode 100644 index ca3c6d0..0000000 --- a/down-the-stack/dk_pac/src/ppi.rs +++ /dev/null @@ -1,53 +0,0 @@ -#[doc = r"Register block"] -#[repr(C)] -pub struct RegisterBlock { - #[doc = "0x00..0x30 - Channel group tasks"] - pub tasks_chg: [TASKS_CHG; 6], - _reserved1: [u8; 0x04d0], - #[doc = "0x500 - Channel enable register"] - pub chen: CHEN, - #[doc = "0x504 - Channel enable set register"] - pub chenset: CHENSET, - #[doc = "0x508 - Channel enable clear register"] - pub chenclr: CHENCLR, - _reserved4: [u8; 0x04], - #[doc = "0x510..0x5b0 - PPI Channel"] - pub ch: [CH; 20], - _reserved5: [u8; 0x0250], - #[doc = "0x800..0x818 - Description collection: Channel group n"] - pub chg: [CHG; 6], - _reserved6: [u8; 0xf8], - #[doc = "0x910..0x990 - Fork"] - pub fork: [FORK; 32], -} -#[doc = "Channel group tasks"] -pub use self::tasks_chg::TASKS_CHG; -#[doc = r"Cluster"] -#[doc = "Channel group tasks"] -pub mod tasks_chg; -#[doc = "CHEN (rw) register accessor: an alias for `Reg`"] -pub type CHEN = crate::Reg; -#[doc = "Channel enable register"] -pub mod chen; -#[doc = "CHENSET (rw) register accessor: an alias for `Reg`"] -pub type CHENSET = crate::Reg; -#[doc = "Channel enable set register"] -pub mod chenset; -#[doc = "CHENCLR (rw) register accessor: an alias for `Reg`"] -pub type CHENCLR = crate::Reg; -#[doc = "Channel enable clear register"] -pub mod chenclr; -#[doc = "PPI Channel"] -pub use self::ch::CH; -#[doc = r"Cluster"] -#[doc = "PPI Channel"] -pub mod ch; -#[doc = "CHG (rw) register accessor: an alias for `Reg`"] -pub type CHG = crate::Reg; -#[doc = "Description collection: Channel group n"] -pub mod chg; -#[doc = "Fork"] -pub use self::fork::FORK; -#[doc = r"Cluster"] -#[doc = "Fork"] -pub mod fork; diff --git a/down-the-stack/dk_pac/src/ppi/ch.rs b/down-the-stack/dk_pac/src/ppi/ch.rs deleted file mode 100644 index eb0d5b3..0000000 --- a/down-the-stack/dk_pac/src/ppi/ch.rs +++ /dev/null @@ -1,16 +0,0 @@ -#[doc = r"Register block"] -#[repr(C)] -pub struct CH { - #[doc = "0x00 - Description cluster: Channel n event end-point"] - pub eep: EEP, - #[doc = "0x04 - Description cluster: Channel n task end-point"] - pub tep: TEP, -} -#[doc = "EEP (rw) register accessor: an alias for `Reg`"] -pub type EEP = crate::Reg; -#[doc = "Description cluster: Channel n event end-point"] -pub mod eep; -#[doc = "TEP (rw) register accessor: an alias for `Reg`"] -pub type TEP = crate::Reg; -#[doc = "Description cluster: Channel n task end-point"] -pub mod tep; diff --git a/down-the-stack/dk_pac/src/ppi/ch/eep.rs b/down-the-stack/dk_pac/src/ppi/ch/eep.rs deleted file mode 100644 index 8376aaf..0000000 --- a/down-the-stack/dk_pac/src/ppi/ch/eep.rs +++ /dev/null @@ -1,80 +0,0 @@ -#[doc = "Register `EEP` 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 `EEP` 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 `EEP` reader - Pointer to event register. Accepts only addresses to registers from the Event group."] -pub type EEP_R = crate::FieldReader; -#[doc = "Field `EEP` writer - Pointer to event register. Accepts only addresses to registers from the Event group."] -pub type EEP_W<'a, const O: u8> = crate::FieldWriter<'a, u32, EEP_SPEC, u32, u32, 32, O>; -impl R { - #[doc = "Bits 0:31 - Pointer to event register. Accepts only addresses to registers from the Event group."] - #[inline(always)] - pub fn eep(&self) -> EEP_R { - EEP_R::new(self.bits) - } -} -impl W { - #[doc = "Bits 0:31 - Pointer to event register. Accepts only addresses to registers from the Event group."] - #[inline(always)] - #[must_use] - pub fn eep(&mut self) -> EEP_W<0> { - EEP_W::new(self) - } - #[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 = "Description cluster: Channel n event end-point\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 [eep](index.html) module"] -pub struct EEP_SPEC; -impl crate::RegisterSpec for EEP_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [eep::R](R) reader structure"] -impl crate::Readable for EEP_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [eep::W](W) writer structure"] -impl crate::Writable for EEP_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets EEP to value 0"] -impl crate::Resettable for EEP_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/ppi/ch/tep.rs b/down-the-stack/dk_pac/src/ppi/ch/tep.rs deleted file mode 100644 index 67e5124..0000000 --- a/down-the-stack/dk_pac/src/ppi/ch/tep.rs +++ /dev/null @@ -1,80 +0,0 @@ -#[doc = "Register `TEP` 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 `TEP` 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 `TEP` reader - Pointer to task register. Accepts only addresses to registers from the Task group."] -pub type TEP_R = crate::FieldReader; -#[doc = "Field `TEP` writer - Pointer to task register. Accepts only addresses to registers from the Task group."] -pub type TEP_W<'a, const O: u8> = crate::FieldWriter<'a, u32, TEP_SPEC, u32, u32, 32, O>; -impl R { - #[doc = "Bits 0:31 - Pointer to task register. Accepts only addresses to registers from the Task group."] - #[inline(always)] - pub fn tep(&self) -> TEP_R { - TEP_R::new(self.bits) - } -} -impl W { - #[doc = "Bits 0:31 - Pointer to task register. Accepts only addresses to registers from the Task group."] - #[inline(always)] - #[must_use] - pub fn tep(&mut self) -> TEP_W<0> { - TEP_W::new(self) - } - #[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 = "Description cluster: Channel n task end-point\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 [tep](index.html) module"] -pub struct TEP_SPEC; -impl crate::RegisterSpec for TEP_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [tep::R](R) reader structure"] -impl crate::Readable for TEP_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [tep::W](W) writer structure"] -impl crate::Writable for TEP_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets TEP to value 0"] -impl crate::Resettable for TEP_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/ppi/chen.rs b/down-the-stack/dk_pac/src/ppi/chen.rs deleted file mode 100644 index 4dc2358..0000000 --- a/down-the-stack/dk_pac/src/ppi/chen.rs +++ /dev/null @@ -1,2017 +0,0 @@ -#[doc = "Register `CHEN` 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 `CHEN` 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 `CH0` reader - Enable or disable channel 0"] -pub type CH0_R = crate::BitReader; -#[doc = "Enable or disable channel 0\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum CH0_A { - #[doc = "0: Disable channel"] - DISABLED = 0, - #[doc = "1: Enable channel"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: CH0_A) -> Self { - variant as u8 != 0 - } -} -impl CH0_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> CH0_A { - match self.bits { - false => CH0_A::DISABLED, - true => CH0_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == CH0_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == CH0_A::ENABLED - } -} -#[doc = "Field `CH0` writer - Enable or disable channel 0"] -pub type CH0_W<'a, const O: u8> = crate::BitWriter<'a, u32, CHEN_SPEC, CH0_A, O>; -impl<'a, const O: u8> CH0_W<'a, O> { - #[doc = "Disable channel"] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(CH0_A::DISABLED) - } - #[doc = "Enable channel"] - #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(CH0_A::ENABLED) - } -} -#[doc = "Field `CH1` reader - Enable or disable channel 1"] -pub type CH1_R = crate::BitReader; -#[doc = "Enable or disable channel 1\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum CH1_A { - #[doc = "0: Disable channel"] - DISABLED = 0, - #[doc = "1: Enable channel"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: CH1_A) -> Self { - variant as u8 != 0 - } -} -impl CH1_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> CH1_A { - match self.bits { - false => CH1_A::DISABLED, - true => CH1_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == CH1_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == CH1_A::ENABLED - } -} -#[doc = "Field `CH1` writer - Enable or disable channel 1"] -pub type CH1_W<'a, const O: u8> = crate::BitWriter<'a, u32, CHEN_SPEC, CH1_A, O>; -impl<'a, const O: u8> CH1_W<'a, O> { - #[doc = "Disable channel"] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(CH1_A::DISABLED) - } - #[doc = "Enable channel"] - #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(CH1_A::ENABLED) - } -} -#[doc = "Field `CH2` reader - Enable or disable channel 2"] -pub type CH2_R = crate::BitReader; -#[doc = "Enable or disable channel 2\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum CH2_A { - #[doc = "0: Disable channel"] - DISABLED = 0, - #[doc = "1: Enable channel"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: CH2_A) -> Self { - variant as u8 != 0 - } -} -impl CH2_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> CH2_A { - match self.bits { - false => CH2_A::DISABLED, - true => CH2_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == CH2_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == CH2_A::ENABLED - } -} -#[doc = "Field `CH2` writer - Enable or disable channel 2"] -pub type CH2_W<'a, const O: u8> = crate::BitWriter<'a, u32, CHEN_SPEC, CH2_A, O>; -impl<'a, const O: u8> CH2_W<'a, O> { - #[doc = "Disable channel"] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(CH2_A::DISABLED) - } - #[doc = "Enable channel"] - #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(CH2_A::ENABLED) - } -} -#[doc = "Field `CH3` reader - Enable or disable channel 3"] -pub type CH3_R = crate::BitReader; -#[doc = "Enable or disable channel 3\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum CH3_A { - #[doc = "0: Disable channel"] - DISABLED = 0, - #[doc = "1: Enable channel"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: CH3_A) -> Self { - variant as u8 != 0 - } -} -impl CH3_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> CH3_A { - match self.bits { - false => CH3_A::DISABLED, - true => CH3_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == CH3_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == CH3_A::ENABLED - } -} -#[doc = "Field `CH3` writer - Enable or disable channel 3"] -pub type CH3_W<'a, const O: u8> = crate::BitWriter<'a, u32, CHEN_SPEC, CH3_A, O>; -impl<'a, const O: u8> CH3_W<'a, O> { - #[doc = "Disable channel"] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(CH3_A::DISABLED) - } - #[doc = "Enable channel"] - #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(CH3_A::ENABLED) - } -} -#[doc = "Field `CH4` reader - Enable or disable channel 4"] -pub type CH4_R = crate::BitReader; -#[doc = "Enable or disable channel 4\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum CH4_A { - #[doc = "0: Disable channel"] - DISABLED = 0, - #[doc = "1: Enable channel"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: CH4_A) -> Self { - variant as u8 != 0 - } -} -impl CH4_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> CH4_A { - match self.bits { - false => CH4_A::DISABLED, - true => CH4_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == CH4_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == CH4_A::ENABLED - } -} -#[doc = "Field `CH4` writer - Enable or disable channel 4"] -pub type CH4_W<'a, const O: u8> = crate::BitWriter<'a, u32, CHEN_SPEC, CH4_A, O>; -impl<'a, const O: u8> CH4_W<'a, O> { - #[doc = "Disable channel"] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(CH4_A::DISABLED) - } - #[doc = "Enable channel"] - #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(CH4_A::ENABLED) - } -} -#[doc = "Field `CH5` reader - Enable or disable channel 5"] -pub type CH5_R = crate::BitReader; -#[doc = "Enable or disable channel 5\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum CH5_A { - #[doc = "0: Disable channel"] - DISABLED = 0, - #[doc = "1: Enable channel"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: CH5_A) -> Self { - variant as u8 != 0 - } -} -impl CH5_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> CH5_A { - match self.bits { - false => CH5_A::DISABLED, - true => CH5_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == CH5_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == CH5_A::ENABLED - } -} -#[doc = "Field `CH5` writer - Enable or disable channel 5"] -pub type CH5_W<'a, const O: u8> = crate::BitWriter<'a, u32, CHEN_SPEC, CH5_A, O>; -impl<'a, const O: u8> CH5_W<'a, O> { - #[doc = "Disable channel"] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(CH5_A::DISABLED) - } - #[doc = "Enable channel"] - #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(CH5_A::ENABLED) - } -} -#[doc = "Field `CH6` reader - Enable or disable channel 6"] -pub type CH6_R = crate::BitReader; -#[doc = "Enable or disable channel 6\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum CH6_A { - #[doc = "0: Disable channel"] - DISABLED = 0, - #[doc = "1: Enable channel"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: CH6_A) -> Self { - variant as u8 != 0 - } -} -impl CH6_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> CH6_A { - match self.bits { - false => CH6_A::DISABLED, - true => CH6_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == CH6_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == CH6_A::ENABLED - } -} -#[doc = "Field `CH6` writer - Enable or disable channel 6"] -pub type CH6_W<'a, const O: u8> = crate::BitWriter<'a, u32, CHEN_SPEC, CH6_A, O>; -impl<'a, const O: u8> CH6_W<'a, O> { - #[doc = "Disable channel"] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(CH6_A::DISABLED) - } - #[doc = "Enable channel"] - #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(CH6_A::ENABLED) - } -} -#[doc = "Field `CH7` reader - Enable or disable channel 7"] -pub type CH7_R = crate::BitReader; -#[doc = "Enable or disable channel 7\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum CH7_A { - #[doc = "0: Disable channel"] - DISABLED = 0, - #[doc = "1: Enable channel"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: CH7_A) -> Self { - variant as u8 != 0 - } -} -impl CH7_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> CH7_A { - match self.bits { - false => CH7_A::DISABLED, - true => CH7_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == CH7_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == CH7_A::ENABLED - } -} -#[doc = "Field `CH7` writer - Enable or disable channel 7"] -pub type CH7_W<'a, const O: u8> = crate::BitWriter<'a, u32, CHEN_SPEC, CH7_A, O>; -impl<'a, const O: u8> CH7_W<'a, O> { - #[doc = "Disable channel"] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(CH7_A::DISABLED) - } - #[doc = "Enable channel"] - #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(CH7_A::ENABLED) - } -} -#[doc = "Field `CH8` reader - Enable or disable channel 8"] -pub type CH8_R = crate::BitReader; -#[doc = "Enable or disable channel 8\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum CH8_A { - #[doc = "0: Disable channel"] - DISABLED = 0, - #[doc = "1: Enable channel"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: CH8_A) -> Self { - variant as u8 != 0 - } -} -impl CH8_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> CH8_A { - match self.bits { - false => CH8_A::DISABLED, - true => CH8_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == CH8_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == CH8_A::ENABLED - } -} -#[doc = "Field `CH8` writer - Enable or disable channel 8"] -pub type CH8_W<'a, const O: u8> = crate::BitWriter<'a, u32, CHEN_SPEC, CH8_A, O>; -impl<'a, const O: u8> CH8_W<'a, O> { - #[doc = "Disable channel"] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(CH8_A::DISABLED) - } - #[doc = "Enable channel"] - #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(CH8_A::ENABLED) - } -} -#[doc = "Field `CH9` reader - Enable or disable channel 9"] -pub type CH9_R = crate::BitReader; -#[doc = "Enable or disable channel 9\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum CH9_A { - #[doc = "0: Disable channel"] - DISABLED = 0, - #[doc = "1: Enable channel"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: CH9_A) -> Self { - variant as u8 != 0 - } -} -impl CH9_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> CH9_A { - match self.bits { - false => CH9_A::DISABLED, - true => CH9_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == CH9_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == CH9_A::ENABLED - } -} -#[doc = "Field `CH9` writer - Enable or disable channel 9"] -pub type CH9_W<'a, const O: u8> = crate::BitWriter<'a, u32, CHEN_SPEC, CH9_A, O>; -impl<'a, const O: u8> CH9_W<'a, O> { - #[doc = "Disable channel"] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(CH9_A::DISABLED) - } - #[doc = "Enable channel"] - #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(CH9_A::ENABLED) - } -} -#[doc = "Field `CH10` reader - Enable or disable channel 10"] -pub type CH10_R = crate::BitReader; -#[doc = "Enable or disable channel 10\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum CH10_A { - #[doc = "0: Disable channel"] - DISABLED = 0, - #[doc = "1: Enable channel"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: CH10_A) -> Self { - variant as u8 != 0 - } -} -impl CH10_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> CH10_A { - match self.bits { - false => CH10_A::DISABLED, - true => CH10_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == CH10_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == CH10_A::ENABLED - } -} -#[doc = "Field `CH10` writer - Enable or disable channel 10"] -pub type CH10_W<'a, const O: u8> = crate::BitWriter<'a, u32, CHEN_SPEC, CH10_A, O>; -impl<'a, const O: u8> CH10_W<'a, O> { - #[doc = "Disable channel"] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(CH10_A::DISABLED) - } - #[doc = "Enable channel"] - #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(CH10_A::ENABLED) - } -} -#[doc = "Field `CH11` reader - Enable or disable channel 11"] -pub type CH11_R = crate::BitReader; -#[doc = "Enable or disable channel 11\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum CH11_A { - #[doc = "0: Disable channel"] - DISABLED = 0, - #[doc = "1: Enable channel"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: CH11_A) -> Self { - variant as u8 != 0 - } -} -impl CH11_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> CH11_A { - match self.bits { - false => CH11_A::DISABLED, - true => CH11_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == CH11_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == CH11_A::ENABLED - } -} -#[doc = "Field `CH11` writer - Enable or disable channel 11"] -pub type CH11_W<'a, const O: u8> = crate::BitWriter<'a, u32, CHEN_SPEC, CH11_A, O>; -impl<'a, const O: u8> CH11_W<'a, O> { - #[doc = "Disable channel"] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(CH11_A::DISABLED) - } - #[doc = "Enable channel"] - #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(CH11_A::ENABLED) - } -} -#[doc = "Field `CH12` reader - Enable or disable channel 12"] -pub type CH12_R = crate::BitReader; -#[doc = "Enable or disable channel 12\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum CH12_A { - #[doc = "0: Disable channel"] - DISABLED = 0, - #[doc = "1: Enable channel"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: CH12_A) -> Self { - variant as u8 != 0 - } -} -impl CH12_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> CH12_A { - match self.bits { - false => CH12_A::DISABLED, - true => CH12_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == CH12_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == CH12_A::ENABLED - } -} -#[doc = "Field `CH12` writer - Enable or disable channel 12"] -pub type CH12_W<'a, const O: u8> = crate::BitWriter<'a, u32, CHEN_SPEC, CH12_A, O>; -impl<'a, const O: u8> CH12_W<'a, O> { - #[doc = "Disable channel"] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(CH12_A::DISABLED) - } - #[doc = "Enable channel"] - #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(CH12_A::ENABLED) - } -} -#[doc = "Field `CH13` reader - Enable or disable channel 13"] -pub type CH13_R = crate::BitReader; -#[doc = "Enable or disable channel 13\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum CH13_A { - #[doc = "0: Disable channel"] - DISABLED = 0, - #[doc = "1: Enable channel"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: CH13_A) -> Self { - variant as u8 != 0 - } -} -impl CH13_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> CH13_A { - match self.bits { - false => CH13_A::DISABLED, - true => CH13_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == CH13_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == CH13_A::ENABLED - } -} -#[doc = "Field `CH13` writer - Enable or disable channel 13"] -pub type CH13_W<'a, const O: u8> = crate::BitWriter<'a, u32, CHEN_SPEC, CH13_A, O>; -impl<'a, const O: u8> CH13_W<'a, O> { - #[doc = "Disable channel"] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(CH13_A::DISABLED) - } - #[doc = "Enable channel"] - #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(CH13_A::ENABLED) - } -} -#[doc = "Field `CH14` reader - Enable or disable channel 14"] -pub type CH14_R = crate::BitReader; -#[doc = "Enable or disable channel 14\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum CH14_A { - #[doc = "0: Disable channel"] - DISABLED = 0, - #[doc = "1: Enable channel"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: CH14_A) -> Self { - variant as u8 != 0 - } -} -impl CH14_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> CH14_A { - match self.bits { - false => CH14_A::DISABLED, - true => CH14_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == CH14_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == CH14_A::ENABLED - } -} -#[doc = "Field `CH14` writer - Enable or disable channel 14"] -pub type CH14_W<'a, const O: u8> = crate::BitWriter<'a, u32, CHEN_SPEC, CH14_A, O>; -impl<'a, const O: u8> CH14_W<'a, O> { - #[doc = "Disable channel"] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(CH14_A::DISABLED) - } - #[doc = "Enable channel"] - #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(CH14_A::ENABLED) - } -} -#[doc = "Field `CH15` reader - Enable or disable channel 15"] -pub type CH15_R = crate::BitReader; -#[doc = "Enable or disable channel 15\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum CH15_A { - #[doc = "0: Disable channel"] - DISABLED = 0, - #[doc = "1: Enable channel"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: CH15_A) -> Self { - variant as u8 != 0 - } -} -impl CH15_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> CH15_A { - match self.bits { - false => CH15_A::DISABLED, - true => CH15_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == CH15_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == CH15_A::ENABLED - } -} -#[doc = "Field `CH15` writer - Enable or disable channel 15"] -pub type CH15_W<'a, const O: u8> = crate::BitWriter<'a, u32, CHEN_SPEC, CH15_A, O>; -impl<'a, const O: u8> CH15_W<'a, O> { - #[doc = "Disable channel"] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(CH15_A::DISABLED) - } - #[doc = "Enable channel"] - #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(CH15_A::ENABLED) - } -} -#[doc = "Field `CH16` reader - Enable or disable channel 16"] -pub type CH16_R = crate::BitReader; -#[doc = "Enable or disable channel 16\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum CH16_A { - #[doc = "0: Disable channel"] - DISABLED = 0, - #[doc = "1: Enable channel"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: CH16_A) -> Self { - variant as u8 != 0 - } -} -impl CH16_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> CH16_A { - match self.bits { - false => CH16_A::DISABLED, - true => CH16_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == CH16_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == CH16_A::ENABLED - } -} -#[doc = "Field `CH16` writer - Enable or disable channel 16"] -pub type CH16_W<'a, const O: u8> = crate::BitWriter<'a, u32, CHEN_SPEC, CH16_A, O>; -impl<'a, const O: u8> CH16_W<'a, O> { - #[doc = "Disable channel"] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(CH16_A::DISABLED) - } - #[doc = "Enable channel"] - #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(CH16_A::ENABLED) - } -} -#[doc = "Field `CH17` reader - Enable or disable channel 17"] -pub type CH17_R = crate::BitReader; -#[doc = "Enable or disable channel 17\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum CH17_A { - #[doc = "0: Disable channel"] - DISABLED = 0, - #[doc = "1: Enable channel"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: CH17_A) -> Self { - variant as u8 != 0 - } -} -impl CH17_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> CH17_A { - match self.bits { - false => CH17_A::DISABLED, - true => CH17_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == CH17_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == CH17_A::ENABLED - } -} -#[doc = "Field `CH17` writer - Enable or disable channel 17"] -pub type CH17_W<'a, const O: u8> = crate::BitWriter<'a, u32, CHEN_SPEC, CH17_A, O>; -impl<'a, const O: u8> CH17_W<'a, O> { - #[doc = "Disable channel"] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(CH17_A::DISABLED) - } - #[doc = "Enable channel"] - #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(CH17_A::ENABLED) - } -} -#[doc = "Field `CH18` reader - Enable or disable channel 18"] -pub type CH18_R = crate::BitReader; -#[doc = "Enable or disable channel 18\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum CH18_A { - #[doc = "0: Disable channel"] - DISABLED = 0, - #[doc = "1: Enable channel"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: CH18_A) -> Self { - variant as u8 != 0 - } -} -impl CH18_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> CH18_A { - match self.bits { - false => CH18_A::DISABLED, - true => CH18_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == CH18_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == CH18_A::ENABLED - } -} -#[doc = "Field `CH18` writer - Enable or disable channel 18"] -pub type CH18_W<'a, const O: u8> = crate::BitWriter<'a, u32, CHEN_SPEC, CH18_A, O>; -impl<'a, const O: u8> CH18_W<'a, O> { - #[doc = "Disable channel"] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(CH18_A::DISABLED) - } - #[doc = "Enable channel"] - #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(CH18_A::ENABLED) - } -} -#[doc = "Field `CH19` reader - Enable or disable channel 19"] -pub type CH19_R = crate::BitReader; -#[doc = "Enable or disable channel 19\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum CH19_A { - #[doc = "0: Disable channel"] - DISABLED = 0, - #[doc = "1: Enable channel"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: CH19_A) -> Self { - variant as u8 != 0 - } -} -impl CH19_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> CH19_A { - match self.bits { - false => CH19_A::DISABLED, - true => CH19_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == CH19_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == CH19_A::ENABLED - } -} -#[doc = "Field `CH19` writer - Enable or disable channel 19"] -pub type CH19_W<'a, const O: u8> = crate::BitWriter<'a, u32, CHEN_SPEC, CH19_A, O>; -impl<'a, const O: u8> CH19_W<'a, O> { - #[doc = "Disable channel"] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(CH19_A::DISABLED) - } - #[doc = "Enable channel"] - #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(CH19_A::ENABLED) - } -} -#[doc = "Field `CH20` reader - Enable or disable channel 20"] -pub type CH20_R = crate::BitReader; -#[doc = "Enable or disable channel 20\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum CH20_A { - #[doc = "0: Disable channel"] - DISABLED = 0, - #[doc = "1: Enable channel"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: CH20_A) -> Self { - variant as u8 != 0 - } -} -impl CH20_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> CH20_A { - match self.bits { - false => CH20_A::DISABLED, - true => CH20_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == CH20_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == CH20_A::ENABLED - } -} -#[doc = "Field `CH20` writer - Enable or disable channel 20"] -pub type CH20_W<'a, const O: u8> = crate::BitWriter<'a, u32, CHEN_SPEC, CH20_A, O>; -impl<'a, const O: u8> CH20_W<'a, O> { - #[doc = "Disable channel"] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(CH20_A::DISABLED) - } - #[doc = "Enable channel"] - #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(CH20_A::ENABLED) - } -} -#[doc = "Field `CH21` reader - Enable or disable channel 21"] -pub type CH21_R = crate::BitReader; -#[doc = "Enable or disable channel 21\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum CH21_A { - #[doc = "0: Disable channel"] - DISABLED = 0, - #[doc = "1: Enable channel"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: CH21_A) -> Self { - variant as u8 != 0 - } -} -impl CH21_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> CH21_A { - match self.bits { - false => CH21_A::DISABLED, - true => CH21_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == CH21_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == CH21_A::ENABLED - } -} -#[doc = "Field `CH21` writer - Enable or disable channel 21"] -pub type CH21_W<'a, const O: u8> = crate::BitWriter<'a, u32, CHEN_SPEC, CH21_A, O>; -impl<'a, const O: u8> CH21_W<'a, O> { - #[doc = "Disable channel"] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(CH21_A::DISABLED) - } - #[doc = "Enable channel"] - #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(CH21_A::ENABLED) - } -} -#[doc = "Field `CH22` reader - Enable or disable channel 22"] -pub type CH22_R = crate::BitReader; -#[doc = "Enable or disable channel 22\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum CH22_A { - #[doc = "0: Disable channel"] - DISABLED = 0, - #[doc = "1: Enable channel"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: CH22_A) -> Self { - variant as u8 != 0 - } -} -impl CH22_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> CH22_A { - match self.bits { - false => CH22_A::DISABLED, - true => CH22_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == CH22_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == CH22_A::ENABLED - } -} -#[doc = "Field `CH22` writer - Enable or disable channel 22"] -pub type CH22_W<'a, const O: u8> = crate::BitWriter<'a, u32, CHEN_SPEC, CH22_A, O>; -impl<'a, const O: u8> CH22_W<'a, O> { - #[doc = "Disable channel"] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(CH22_A::DISABLED) - } - #[doc = "Enable channel"] - #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(CH22_A::ENABLED) - } -} -#[doc = "Field `CH23` reader - Enable or disable channel 23"] -pub type CH23_R = crate::BitReader; -#[doc = "Enable or disable channel 23\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum CH23_A { - #[doc = "0: Disable channel"] - DISABLED = 0, - #[doc = "1: Enable channel"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: CH23_A) -> Self { - variant as u8 != 0 - } -} -impl CH23_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> CH23_A { - match self.bits { - false => CH23_A::DISABLED, - true => CH23_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == CH23_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == CH23_A::ENABLED - } -} -#[doc = "Field `CH23` writer - Enable or disable channel 23"] -pub type CH23_W<'a, const O: u8> = crate::BitWriter<'a, u32, CHEN_SPEC, CH23_A, O>; -impl<'a, const O: u8> CH23_W<'a, O> { - #[doc = "Disable channel"] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(CH23_A::DISABLED) - } - #[doc = "Enable channel"] - #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(CH23_A::ENABLED) - } -} -#[doc = "Field `CH24` reader - Enable or disable channel 24"] -pub type CH24_R = crate::BitReader; -#[doc = "Enable or disable channel 24\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum CH24_A { - #[doc = "0: Disable channel"] - DISABLED = 0, - #[doc = "1: Enable channel"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: CH24_A) -> Self { - variant as u8 != 0 - } -} -impl CH24_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> CH24_A { - match self.bits { - false => CH24_A::DISABLED, - true => CH24_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == CH24_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == CH24_A::ENABLED - } -} -#[doc = "Field `CH24` writer - Enable or disable channel 24"] -pub type CH24_W<'a, const O: u8> = crate::BitWriter<'a, u32, CHEN_SPEC, CH24_A, O>; -impl<'a, const O: u8> CH24_W<'a, O> { - #[doc = "Disable channel"] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(CH24_A::DISABLED) - } - #[doc = "Enable channel"] - #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(CH24_A::ENABLED) - } -} -#[doc = "Field `CH25` reader - Enable or disable channel 25"] -pub type CH25_R = crate::BitReader; -#[doc = "Enable or disable channel 25\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum CH25_A { - #[doc = "0: Disable channel"] - DISABLED = 0, - #[doc = "1: Enable channel"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: CH25_A) -> Self { - variant as u8 != 0 - } -} -impl CH25_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> CH25_A { - match self.bits { - false => CH25_A::DISABLED, - true => CH25_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == CH25_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == CH25_A::ENABLED - } -} -#[doc = "Field `CH25` writer - Enable or disable channel 25"] -pub type CH25_W<'a, const O: u8> = crate::BitWriter<'a, u32, CHEN_SPEC, CH25_A, O>; -impl<'a, const O: u8> CH25_W<'a, O> { - #[doc = "Disable channel"] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(CH25_A::DISABLED) - } - #[doc = "Enable channel"] - #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(CH25_A::ENABLED) - } -} -#[doc = "Field `CH26` reader - Enable or disable channel 26"] -pub type CH26_R = crate::BitReader; -#[doc = "Enable or disable channel 26\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum CH26_A { - #[doc = "0: Disable channel"] - DISABLED = 0, - #[doc = "1: Enable channel"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: CH26_A) -> Self { - variant as u8 != 0 - } -} -impl CH26_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> CH26_A { - match self.bits { - false => CH26_A::DISABLED, - true => CH26_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == CH26_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == CH26_A::ENABLED - } -} -#[doc = "Field `CH26` writer - Enable or disable channel 26"] -pub type CH26_W<'a, const O: u8> = crate::BitWriter<'a, u32, CHEN_SPEC, CH26_A, O>; -impl<'a, const O: u8> CH26_W<'a, O> { - #[doc = "Disable channel"] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(CH26_A::DISABLED) - } - #[doc = "Enable channel"] - #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(CH26_A::ENABLED) - } -} -#[doc = "Field `CH27` reader - Enable or disable channel 27"] -pub type CH27_R = crate::BitReader; -#[doc = "Enable or disable channel 27\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum CH27_A { - #[doc = "0: Disable channel"] - DISABLED = 0, - #[doc = "1: Enable channel"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: CH27_A) -> Self { - variant as u8 != 0 - } -} -impl CH27_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> CH27_A { - match self.bits { - false => CH27_A::DISABLED, - true => CH27_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == CH27_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == CH27_A::ENABLED - } -} -#[doc = "Field `CH27` writer - Enable or disable channel 27"] -pub type CH27_W<'a, const O: u8> = crate::BitWriter<'a, u32, CHEN_SPEC, CH27_A, O>; -impl<'a, const O: u8> CH27_W<'a, O> { - #[doc = "Disable channel"] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(CH27_A::DISABLED) - } - #[doc = "Enable channel"] - #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(CH27_A::ENABLED) - } -} -#[doc = "Field `CH28` reader - Enable or disable channel 28"] -pub type CH28_R = crate::BitReader; -#[doc = "Enable or disable channel 28\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum CH28_A { - #[doc = "0: Disable channel"] - DISABLED = 0, - #[doc = "1: Enable channel"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: CH28_A) -> Self { - variant as u8 != 0 - } -} -impl CH28_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> CH28_A { - match self.bits { - false => CH28_A::DISABLED, - true => CH28_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == CH28_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == CH28_A::ENABLED - } -} -#[doc = "Field `CH28` writer - Enable or disable channel 28"] -pub type CH28_W<'a, const O: u8> = crate::BitWriter<'a, u32, CHEN_SPEC, CH28_A, O>; -impl<'a, const O: u8> CH28_W<'a, O> { - #[doc = "Disable channel"] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(CH28_A::DISABLED) - } - #[doc = "Enable channel"] - #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(CH28_A::ENABLED) - } -} -#[doc = "Field `CH29` reader - Enable or disable channel 29"] -pub type CH29_R = crate::BitReader; -#[doc = "Enable or disable channel 29\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum CH29_A { - #[doc = "0: Disable channel"] - DISABLED = 0, - #[doc = "1: Enable channel"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: CH29_A) -> Self { - variant as u8 != 0 - } -} -impl CH29_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> CH29_A { - match self.bits { - false => CH29_A::DISABLED, - true => CH29_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == CH29_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == CH29_A::ENABLED - } -} -#[doc = "Field `CH29` writer - Enable or disable channel 29"] -pub type CH29_W<'a, const O: u8> = crate::BitWriter<'a, u32, CHEN_SPEC, CH29_A, O>; -impl<'a, const O: u8> CH29_W<'a, O> { - #[doc = "Disable channel"] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(CH29_A::DISABLED) - } - #[doc = "Enable channel"] - #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(CH29_A::ENABLED) - } -} -#[doc = "Field `CH30` reader - Enable or disable channel 30"] -pub type CH30_R = crate::BitReader; -#[doc = "Enable or disable channel 30\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum CH30_A { - #[doc = "0: Disable channel"] - DISABLED = 0, - #[doc = "1: Enable channel"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: CH30_A) -> Self { - variant as u8 != 0 - } -} -impl CH30_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> CH30_A { - match self.bits { - false => CH30_A::DISABLED, - true => CH30_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == CH30_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == CH30_A::ENABLED - } -} -#[doc = "Field `CH30` writer - Enable or disable channel 30"] -pub type CH30_W<'a, const O: u8> = crate::BitWriter<'a, u32, CHEN_SPEC, CH30_A, O>; -impl<'a, const O: u8> CH30_W<'a, O> { - #[doc = "Disable channel"] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(CH30_A::DISABLED) - } - #[doc = "Enable channel"] - #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(CH30_A::ENABLED) - } -} -#[doc = "Field `CH31` reader - Enable or disable channel 31"] -pub type CH31_R = crate::BitReader; -#[doc = "Enable or disable channel 31\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum CH31_A { - #[doc = "0: Disable channel"] - DISABLED = 0, - #[doc = "1: Enable channel"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: CH31_A) -> Self { - variant as u8 != 0 - } -} -impl CH31_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> CH31_A { - match self.bits { - false => CH31_A::DISABLED, - true => CH31_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == CH31_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == CH31_A::ENABLED - } -} -#[doc = "Field `CH31` writer - Enable or disable channel 31"] -pub type CH31_W<'a, const O: u8> = crate::BitWriter<'a, u32, CHEN_SPEC, CH31_A, O>; -impl<'a, const O: u8> CH31_W<'a, O> { - #[doc = "Disable channel"] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(CH31_A::DISABLED) - } - #[doc = "Enable channel"] - #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(CH31_A::ENABLED) - } -} -impl R { - #[doc = "Bit 0 - Enable or disable channel 0"] - #[inline(always)] - pub fn ch0(&self) -> CH0_R { - CH0_R::new((self.bits & 1) != 0) - } - #[doc = "Bit 1 - Enable or disable channel 1"] - #[inline(always)] - pub fn ch1(&self) -> CH1_R { - CH1_R::new(((self.bits >> 1) & 1) != 0) - } - #[doc = "Bit 2 - Enable or disable channel 2"] - #[inline(always)] - pub fn ch2(&self) -> CH2_R { - CH2_R::new(((self.bits >> 2) & 1) != 0) - } - #[doc = "Bit 3 - Enable or disable channel 3"] - #[inline(always)] - pub fn ch3(&self) -> CH3_R { - CH3_R::new(((self.bits >> 3) & 1) != 0) - } - #[doc = "Bit 4 - Enable or disable channel 4"] - #[inline(always)] - pub fn ch4(&self) -> CH4_R { - CH4_R::new(((self.bits >> 4) & 1) != 0) - } - #[doc = "Bit 5 - Enable or disable channel 5"] - #[inline(always)] - pub fn ch5(&self) -> CH5_R { - CH5_R::new(((self.bits >> 5) & 1) != 0) - } - #[doc = "Bit 6 - Enable or disable channel 6"] - #[inline(always)] - pub fn ch6(&self) -> CH6_R { - CH6_R::new(((self.bits >> 6) & 1) != 0) - } - #[doc = "Bit 7 - Enable or disable channel 7"] - #[inline(always)] - pub fn ch7(&self) -> CH7_R { - CH7_R::new(((self.bits >> 7) & 1) != 0) - } - #[doc = "Bit 8 - Enable or disable channel 8"] - #[inline(always)] - pub fn ch8(&self) -> CH8_R { - CH8_R::new(((self.bits >> 8) & 1) != 0) - } - #[doc = "Bit 9 - Enable or disable channel 9"] - #[inline(always)] - pub fn ch9(&self) -> CH9_R { - CH9_R::new(((self.bits >> 9) & 1) != 0) - } - #[doc = "Bit 10 - Enable or disable channel 10"] - #[inline(always)] - pub fn ch10(&self) -> CH10_R { - CH10_R::new(((self.bits >> 10) & 1) != 0) - } - #[doc = "Bit 11 - Enable or disable channel 11"] - #[inline(always)] - pub fn ch11(&self) -> CH11_R { - CH11_R::new(((self.bits >> 11) & 1) != 0) - } - #[doc = "Bit 12 - Enable or disable channel 12"] - #[inline(always)] - pub fn ch12(&self) -> CH12_R { - CH12_R::new(((self.bits >> 12) & 1) != 0) - } - #[doc = "Bit 13 - Enable or disable channel 13"] - #[inline(always)] - pub fn ch13(&self) -> CH13_R { - CH13_R::new(((self.bits >> 13) & 1) != 0) - } - #[doc = "Bit 14 - Enable or disable channel 14"] - #[inline(always)] - pub fn ch14(&self) -> CH14_R { - CH14_R::new(((self.bits >> 14) & 1) != 0) - } - #[doc = "Bit 15 - Enable or disable channel 15"] - #[inline(always)] - pub fn ch15(&self) -> CH15_R { - CH15_R::new(((self.bits >> 15) & 1) != 0) - } - #[doc = "Bit 16 - Enable or disable channel 16"] - #[inline(always)] - pub fn ch16(&self) -> CH16_R { - CH16_R::new(((self.bits >> 16) & 1) != 0) - } - #[doc = "Bit 17 - Enable or disable channel 17"] - #[inline(always)] - pub fn ch17(&self) -> CH17_R { - CH17_R::new(((self.bits >> 17) & 1) != 0) - } - #[doc = "Bit 18 - Enable or disable channel 18"] - #[inline(always)] - pub fn ch18(&self) -> CH18_R { - CH18_R::new(((self.bits >> 18) & 1) != 0) - } - #[doc = "Bit 19 - Enable or disable channel 19"] - #[inline(always)] - pub fn ch19(&self) -> CH19_R { - CH19_R::new(((self.bits >> 19) & 1) != 0) - } - #[doc = "Bit 20 - Enable or disable channel 20"] - #[inline(always)] - pub fn ch20(&self) -> CH20_R { - CH20_R::new(((self.bits >> 20) & 1) != 0) - } - #[doc = "Bit 21 - Enable or disable channel 21"] - #[inline(always)] - pub fn ch21(&self) -> CH21_R { - CH21_R::new(((self.bits >> 21) & 1) != 0) - } - #[doc = "Bit 22 - Enable or disable channel 22"] - #[inline(always)] - pub fn ch22(&self) -> CH22_R { - CH22_R::new(((self.bits >> 22) & 1) != 0) - } - #[doc = "Bit 23 - Enable or disable channel 23"] - #[inline(always)] - pub fn ch23(&self) -> CH23_R { - CH23_R::new(((self.bits >> 23) & 1) != 0) - } - #[doc = "Bit 24 - Enable or disable channel 24"] - #[inline(always)] - pub fn ch24(&self) -> CH24_R { - CH24_R::new(((self.bits >> 24) & 1) != 0) - } - #[doc = "Bit 25 - Enable or disable channel 25"] - #[inline(always)] - pub fn ch25(&self) -> CH25_R { - CH25_R::new(((self.bits >> 25) & 1) != 0) - } - #[doc = "Bit 26 - Enable or disable channel 26"] - #[inline(always)] - pub fn ch26(&self) -> CH26_R { - CH26_R::new(((self.bits >> 26) & 1) != 0) - } - #[doc = "Bit 27 - Enable or disable channel 27"] - #[inline(always)] - pub fn ch27(&self) -> CH27_R { - CH27_R::new(((self.bits >> 27) & 1) != 0) - } - #[doc = "Bit 28 - Enable or disable channel 28"] - #[inline(always)] - pub fn ch28(&self) -> CH28_R { - CH28_R::new(((self.bits >> 28) & 1) != 0) - } - #[doc = "Bit 29 - Enable or disable channel 29"] - #[inline(always)] - pub fn ch29(&self) -> CH29_R { - CH29_R::new(((self.bits >> 29) & 1) != 0) - } - #[doc = "Bit 30 - Enable or disable channel 30"] - #[inline(always)] - pub fn ch30(&self) -> CH30_R { - CH30_R::new(((self.bits >> 30) & 1) != 0) - } - #[doc = "Bit 31 - Enable or disable channel 31"] - #[inline(always)] - pub fn ch31(&self) -> CH31_R { - CH31_R::new(((self.bits >> 31) & 1) != 0) - } -} -impl W { - #[doc = "Bit 0 - Enable or disable channel 0"] - #[inline(always)] - #[must_use] - pub fn ch0(&mut self) -> CH0_W<0> { - CH0_W::new(self) - } - #[doc = "Bit 1 - Enable or disable channel 1"] - #[inline(always)] - #[must_use] - pub fn ch1(&mut self) -> CH1_W<1> { - CH1_W::new(self) - } - #[doc = "Bit 2 - Enable or disable channel 2"] - #[inline(always)] - #[must_use] - pub fn ch2(&mut self) -> CH2_W<2> { - CH2_W::new(self) - } - #[doc = "Bit 3 - Enable or disable channel 3"] - #[inline(always)] - #[must_use] - pub fn ch3(&mut self) -> CH3_W<3> { - CH3_W::new(self) - } - #[doc = "Bit 4 - Enable or disable channel 4"] - #[inline(always)] - #[must_use] - pub fn ch4(&mut self) -> CH4_W<4> { - CH4_W::new(self) - } - #[doc = "Bit 5 - Enable or disable channel 5"] - #[inline(always)] - #[must_use] - pub fn ch5(&mut self) -> CH5_W<5> { - CH5_W::new(self) - } - #[doc = "Bit 6 - Enable or disable channel 6"] - #[inline(always)] - #[must_use] - pub fn ch6(&mut self) -> CH6_W<6> { - CH6_W::new(self) - } - #[doc = "Bit 7 - Enable or disable channel 7"] - #[inline(always)] - #[must_use] - pub fn ch7(&mut self) -> CH7_W<7> { - CH7_W::new(self) - } - #[doc = "Bit 8 - Enable or disable channel 8"] - #[inline(always)] - #[must_use] - pub fn ch8(&mut self) -> CH8_W<8> { - CH8_W::new(self) - } - #[doc = "Bit 9 - Enable or disable channel 9"] - #[inline(always)] - #[must_use] - pub fn ch9(&mut self) -> CH9_W<9> { - CH9_W::new(self) - } - #[doc = "Bit 10 - Enable or disable channel 10"] - #[inline(always)] - #[must_use] - pub fn ch10(&mut self) -> CH10_W<10> { - CH10_W::new(self) - } - #[doc = "Bit 11 - Enable or disable channel 11"] - #[inline(always)] - #[must_use] - pub fn ch11(&mut self) -> CH11_W<11> { - CH11_W::new(self) - } - #[doc = "Bit 12 - Enable or disable channel 12"] - #[inline(always)] - #[must_use] - pub fn ch12(&mut self) -> CH12_W<12> { - CH12_W::new(self) - } - #[doc = "Bit 13 - Enable or disable channel 13"] - #[inline(always)] - #[must_use] - pub fn ch13(&mut self) -> CH13_W<13> { - CH13_W::new(self) - } - #[doc = "Bit 14 - Enable or disable channel 14"] - #[inline(always)] - #[must_use] - pub fn ch14(&mut self) -> CH14_W<14> { - CH14_W::new(self) - } - #[doc = "Bit 15 - Enable or disable channel 15"] - #[inline(always)] - #[must_use] - pub fn ch15(&mut self) -> CH15_W<15> { - CH15_W::new(self) - } - #[doc = "Bit 16 - Enable or disable channel 16"] - #[inline(always)] - #[must_use] - pub fn ch16(&mut self) -> CH16_W<16> { - CH16_W::new(self) - } - #[doc = "Bit 17 - Enable or disable channel 17"] - #[inline(always)] - #[must_use] - pub fn ch17(&mut self) -> CH17_W<17> { - CH17_W::new(self) - } - #[doc = "Bit 18 - Enable or disable channel 18"] - #[inline(always)] - #[must_use] - pub fn ch18(&mut self) -> CH18_W<18> { - CH18_W::new(self) - } - #[doc = "Bit 19 - Enable or disable channel 19"] - #[inline(always)] - #[must_use] - pub fn ch19(&mut self) -> CH19_W<19> { - CH19_W::new(self) - } - #[doc = "Bit 20 - Enable or disable channel 20"] - #[inline(always)] - #[must_use] - pub fn ch20(&mut self) -> CH20_W<20> { - CH20_W::new(self) - } - #[doc = "Bit 21 - Enable or disable channel 21"] - #[inline(always)] - #[must_use] - pub fn ch21(&mut self) -> CH21_W<21> { - CH21_W::new(self) - } - #[doc = "Bit 22 - Enable or disable channel 22"] - #[inline(always)] - #[must_use] - pub fn ch22(&mut self) -> CH22_W<22> { - CH22_W::new(self) - } - #[doc = "Bit 23 - Enable or disable channel 23"] - #[inline(always)] - #[must_use] - pub fn ch23(&mut self) -> CH23_W<23> { - CH23_W::new(self) - } - #[doc = "Bit 24 - Enable or disable channel 24"] - #[inline(always)] - #[must_use] - pub fn ch24(&mut self) -> CH24_W<24> { - CH24_W::new(self) - } - #[doc = "Bit 25 - Enable or disable channel 25"] - #[inline(always)] - #[must_use] - pub fn ch25(&mut self) -> CH25_W<25> { - CH25_W::new(self) - } - #[doc = "Bit 26 - Enable or disable channel 26"] - #[inline(always)] - #[must_use] - pub fn ch26(&mut self) -> CH26_W<26> { - CH26_W::new(self) - } - #[doc = "Bit 27 - Enable or disable channel 27"] - #[inline(always)] - #[must_use] - pub fn ch27(&mut self) -> CH27_W<27> { - CH27_W::new(self) - } - #[doc = "Bit 28 - Enable or disable channel 28"] - #[inline(always)] - #[must_use] - pub fn ch28(&mut self) -> CH28_W<28> { - CH28_W::new(self) - } - #[doc = "Bit 29 - Enable or disable channel 29"] - #[inline(always)] - #[must_use] - pub fn ch29(&mut self) -> CH29_W<29> { - CH29_W::new(self) - } - #[doc = "Bit 30 - Enable or disable channel 30"] - #[inline(always)] - #[must_use] - pub fn ch30(&mut self) -> CH30_W<30> { - CH30_W::new(self) - } - #[doc = "Bit 31 - Enable or disable channel 31"] - #[inline(always)] - #[must_use] - pub fn ch31(&mut self) -> CH31_W<31> { - CH31_W::new(self) - } - #[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 = "Channel enable register\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 [chen](index.html) module"] -pub struct CHEN_SPEC; -impl crate::RegisterSpec for CHEN_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [chen::R](R) reader structure"] -impl crate::Readable for CHEN_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [chen::W](W) writer structure"] -impl crate::Writable for CHEN_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets CHEN to value 0"] -impl crate::Resettable for CHEN_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/ppi/chenclr.rs b/down-the-stack/dk_pac/src/ppi/chenclr.rs deleted file mode 100644 index ebe4de0..0000000 --- a/down-the-stack/dk_pac/src/ppi/chenclr.rs +++ /dev/null @@ -1,2241 +0,0 @@ -#[doc = "Register `CHENCLR` 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 `CHENCLR` 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 `CH0` reader - Channel 0 enable clear register. Writing '0' has no effect"] -pub type CH0_R = crate::BitReader; -#[doc = "Channel 0 enable clear register. Writing '0' has no effect\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum CH0_A { - #[doc = "0: Read: channel disabled"] - DISABLED = 0, - #[doc = "1: Read: channel enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: CH0_A) -> Self { - variant as u8 != 0 - } -} -impl CH0_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> CH0_A { - match self.bits { - false => CH0_A::DISABLED, - true => CH0_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == CH0_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == CH0_A::ENABLED - } -} -#[doc = "Channel 0 enable clear register. Writing '0' has no effect\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum CH0_AW { - #[doc = "1: Write: disable channel"] - CLEAR = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: CH0_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `CH0` writer - Channel 0 enable clear register. Writing '0' has no effect"] -pub type CH0_W<'a, const O: u8> = crate::BitWriter1C<'a, u32, CHENCLR_SPEC, CH0_AW, O>; -impl<'a, const O: u8> CH0_W<'a, O> { - #[doc = "Write: disable channel"] - #[inline(always)] - pub fn clear(self) -> &'a mut W { - self.variant(CH0_AW::CLEAR) - } -} -#[doc = "Field `CH1` reader - Channel 1 enable clear register. Writing '0' has no effect"] -pub type CH1_R = crate::BitReader; -#[doc = "Channel 1 enable clear register. Writing '0' has no effect\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum CH1_A { - #[doc = "0: Read: channel disabled"] - DISABLED = 0, - #[doc = "1: Read: channel enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: CH1_A) -> Self { - variant as u8 != 0 - } -} -impl CH1_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> CH1_A { - match self.bits { - false => CH1_A::DISABLED, - true => CH1_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == CH1_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == CH1_A::ENABLED - } -} -#[doc = "Channel 1 enable clear register. Writing '0' has no effect\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum CH1_AW { - #[doc = "1: Write: disable channel"] - CLEAR = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: CH1_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `CH1` writer - Channel 1 enable clear register. Writing '0' has no effect"] -pub type CH1_W<'a, const O: u8> = crate::BitWriter1C<'a, u32, CHENCLR_SPEC, CH1_AW, O>; -impl<'a, const O: u8> CH1_W<'a, O> { - #[doc = "Write: disable channel"] - #[inline(always)] - pub fn clear(self) -> &'a mut W { - self.variant(CH1_AW::CLEAR) - } -} -#[doc = "Field `CH2` reader - Channel 2 enable clear register. Writing '0' has no effect"] -pub type CH2_R = crate::BitReader; -#[doc = "Channel 2 enable clear register. Writing '0' has no effect\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum CH2_A { - #[doc = "0: Read: channel disabled"] - DISABLED = 0, - #[doc = "1: Read: channel enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: CH2_A) -> Self { - variant as u8 != 0 - } -} -impl CH2_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> CH2_A { - match self.bits { - false => CH2_A::DISABLED, - true => CH2_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == CH2_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == CH2_A::ENABLED - } -} -#[doc = "Channel 2 enable clear register. Writing '0' has no effect\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum CH2_AW { - #[doc = "1: Write: disable channel"] - CLEAR = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: CH2_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `CH2` writer - Channel 2 enable clear register. Writing '0' has no effect"] -pub type CH2_W<'a, const O: u8> = crate::BitWriter1C<'a, u32, CHENCLR_SPEC, CH2_AW, O>; -impl<'a, const O: u8> CH2_W<'a, O> { - #[doc = "Write: disable channel"] - #[inline(always)] - pub fn clear(self) -> &'a mut W { - self.variant(CH2_AW::CLEAR) - } -} -#[doc = "Field `CH3` reader - Channel 3 enable clear register. Writing '0' has no effect"] -pub type CH3_R = crate::BitReader; -#[doc = "Channel 3 enable clear register. Writing '0' has no effect\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum CH3_A { - #[doc = "0: Read: channel disabled"] - DISABLED = 0, - #[doc = "1: Read: channel enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: CH3_A) -> Self { - variant as u8 != 0 - } -} -impl CH3_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> CH3_A { - match self.bits { - false => CH3_A::DISABLED, - true => CH3_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == CH3_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == CH3_A::ENABLED - } -} -#[doc = "Channel 3 enable clear register. Writing '0' has no effect\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum CH3_AW { - #[doc = "1: Write: disable channel"] - CLEAR = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: CH3_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `CH3` writer - Channel 3 enable clear register. Writing '0' has no effect"] -pub type CH3_W<'a, const O: u8> = crate::BitWriter1C<'a, u32, CHENCLR_SPEC, CH3_AW, O>; -impl<'a, const O: u8> CH3_W<'a, O> { - #[doc = "Write: disable channel"] - #[inline(always)] - pub fn clear(self) -> &'a mut W { - self.variant(CH3_AW::CLEAR) - } -} -#[doc = "Field `CH4` reader - Channel 4 enable clear register. Writing '0' has no effect"] -pub type CH4_R = crate::BitReader; -#[doc = "Channel 4 enable clear register. Writing '0' has no effect\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum CH4_A { - #[doc = "0: Read: channel disabled"] - DISABLED = 0, - #[doc = "1: Read: channel enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: CH4_A) -> Self { - variant as u8 != 0 - } -} -impl CH4_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> CH4_A { - match self.bits { - false => CH4_A::DISABLED, - true => CH4_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == CH4_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == CH4_A::ENABLED - } -} -#[doc = "Channel 4 enable clear register. Writing '0' has no effect\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum CH4_AW { - #[doc = "1: Write: disable channel"] - CLEAR = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: CH4_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `CH4` writer - Channel 4 enable clear register. Writing '0' has no effect"] -pub type CH4_W<'a, const O: u8> = crate::BitWriter1C<'a, u32, CHENCLR_SPEC, CH4_AW, O>; -impl<'a, const O: u8> CH4_W<'a, O> { - #[doc = "Write: disable channel"] - #[inline(always)] - pub fn clear(self) -> &'a mut W { - self.variant(CH4_AW::CLEAR) - } -} -#[doc = "Field `CH5` reader - Channel 5 enable clear register. Writing '0' has no effect"] -pub type CH5_R = crate::BitReader; -#[doc = "Channel 5 enable clear register. Writing '0' has no effect\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum CH5_A { - #[doc = "0: Read: channel disabled"] - DISABLED = 0, - #[doc = "1: Read: channel enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: CH5_A) -> Self { - variant as u8 != 0 - } -} -impl CH5_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> CH5_A { - match self.bits { - false => CH5_A::DISABLED, - true => CH5_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == CH5_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == CH5_A::ENABLED - } -} -#[doc = "Channel 5 enable clear register. Writing '0' has no effect\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum CH5_AW { - #[doc = "1: Write: disable channel"] - CLEAR = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: CH5_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `CH5` writer - Channel 5 enable clear register. Writing '0' has no effect"] -pub type CH5_W<'a, const O: u8> = crate::BitWriter1C<'a, u32, CHENCLR_SPEC, CH5_AW, O>; -impl<'a, const O: u8> CH5_W<'a, O> { - #[doc = "Write: disable channel"] - #[inline(always)] - pub fn clear(self) -> &'a mut W { - self.variant(CH5_AW::CLEAR) - } -} -#[doc = "Field `CH6` reader - Channel 6 enable clear register. Writing '0' has no effect"] -pub type CH6_R = crate::BitReader; -#[doc = "Channel 6 enable clear register. Writing '0' has no effect\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum CH6_A { - #[doc = "0: Read: channel disabled"] - DISABLED = 0, - #[doc = "1: Read: channel enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: CH6_A) -> Self { - variant as u8 != 0 - } -} -impl CH6_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> CH6_A { - match self.bits { - false => CH6_A::DISABLED, - true => CH6_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == CH6_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == CH6_A::ENABLED - } -} -#[doc = "Channel 6 enable clear register. Writing '0' has no effect\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum CH6_AW { - #[doc = "1: Write: disable channel"] - CLEAR = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: CH6_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `CH6` writer - Channel 6 enable clear register. Writing '0' has no effect"] -pub type CH6_W<'a, const O: u8> = crate::BitWriter1C<'a, u32, CHENCLR_SPEC, CH6_AW, O>; -impl<'a, const O: u8> CH6_W<'a, O> { - #[doc = "Write: disable channel"] - #[inline(always)] - pub fn clear(self) -> &'a mut W { - self.variant(CH6_AW::CLEAR) - } -} -#[doc = "Field `CH7` reader - Channel 7 enable clear register. Writing '0' has no effect"] -pub type CH7_R = crate::BitReader; -#[doc = "Channel 7 enable clear register. Writing '0' has no effect\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum CH7_A { - #[doc = "0: Read: channel disabled"] - DISABLED = 0, - #[doc = "1: Read: channel enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: CH7_A) -> Self { - variant as u8 != 0 - } -} -impl CH7_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> CH7_A { - match self.bits { - false => CH7_A::DISABLED, - true => CH7_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == CH7_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == CH7_A::ENABLED - } -} -#[doc = "Channel 7 enable clear register. Writing '0' has no effect\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum CH7_AW { - #[doc = "1: Write: disable channel"] - CLEAR = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: CH7_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `CH7` writer - Channel 7 enable clear register. Writing '0' has no effect"] -pub type CH7_W<'a, const O: u8> = crate::BitWriter1C<'a, u32, CHENCLR_SPEC, CH7_AW, O>; -impl<'a, const O: u8> CH7_W<'a, O> { - #[doc = "Write: disable channel"] - #[inline(always)] - pub fn clear(self) -> &'a mut W { - self.variant(CH7_AW::CLEAR) - } -} -#[doc = "Field `CH8` reader - Channel 8 enable clear register. Writing '0' has no effect"] -pub type CH8_R = crate::BitReader; -#[doc = "Channel 8 enable clear register. Writing '0' has no effect\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum CH8_A { - #[doc = "0: Read: channel disabled"] - DISABLED = 0, - #[doc = "1: Read: channel enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: CH8_A) -> Self { - variant as u8 != 0 - } -} -impl CH8_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> CH8_A { - match self.bits { - false => CH8_A::DISABLED, - true => CH8_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == CH8_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == CH8_A::ENABLED - } -} -#[doc = "Channel 8 enable clear register. Writing '0' has no effect\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum CH8_AW { - #[doc = "1: Write: disable channel"] - CLEAR = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: CH8_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `CH8` writer - Channel 8 enable clear register. Writing '0' has no effect"] -pub type CH8_W<'a, const O: u8> = crate::BitWriter1C<'a, u32, CHENCLR_SPEC, CH8_AW, O>; -impl<'a, const O: u8> CH8_W<'a, O> { - #[doc = "Write: disable channel"] - #[inline(always)] - pub fn clear(self) -> &'a mut W { - self.variant(CH8_AW::CLEAR) - } -} -#[doc = "Field `CH9` reader - Channel 9 enable clear register. Writing '0' has no effect"] -pub type CH9_R = crate::BitReader; -#[doc = "Channel 9 enable clear register. Writing '0' has no effect\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum CH9_A { - #[doc = "0: Read: channel disabled"] - DISABLED = 0, - #[doc = "1: Read: channel enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: CH9_A) -> Self { - variant as u8 != 0 - } -} -impl CH9_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> CH9_A { - match self.bits { - false => CH9_A::DISABLED, - true => CH9_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == CH9_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == CH9_A::ENABLED - } -} -#[doc = "Channel 9 enable clear register. Writing '0' has no effect\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum CH9_AW { - #[doc = "1: Write: disable channel"] - CLEAR = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: CH9_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `CH9` writer - Channel 9 enable clear register. Writing '0' has no effect"] -pub type CH9_W<'a, const O: u8> = crate::BitWriter1C<'a, u32, CHENCLR_SPEC, CH9_AW, O>; -impl<'a, const O: u8> CH9_W<'a, O> { - #[doc = "Write: disable channel"] - #[inline(always)] - pub fn clear(self) -> &'a mut W { - self.variant(CH9_AW::CLEAR) - } -} -#[doc = "Field `CH10` reader - Channel 10 enable clear register. Writing '0' has no effect"] -pub type CH10_R = crate::BitReader; -#[doc = "Channel 10 enable clear register. Writing '0' has no effect\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum CH10_A { - #[doc = "0: Read: channel disabled"] - DISABLED = 0, - #[doc = "1: Read: channel enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: CH10_A) -> Self { - variant as u8 != 0 - } -} -impl CH10_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> CH10_A { - match self.bits { - false => CH10_A::DISABLED, - true => CH10_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == CH10_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == CH10_A::ENABLED - } -} -#[doc = "Channel 10 enable clear register. Writing '0' has no effect\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum CH10_AW { - #[doc = "1: Write: disable channel"] - CLEAR = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: CH10_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `CH10` writer - Channel 10 enable clear register. Writing '0' has no effect"] -pub type CH10_W<'a, const O: u8> = crate::BitWriter1C<'a, u32, CHENCLR_SPEC, CH10_AW, O>; -impl<'a, const O: u8> CH10_W<'a, O> { - #[doc = "Write: disable channel"] - #[inline(always)] - pub fn clear(self) -> &'a mut W { - self.variant(CH10_AW::CLEAR) - } -} -#[doc = "Field `CH11` reader - Channel 11 enable clear register. Writing '0' has no effect"] -pub type CH11_R = crate::BitReader; -#[doc = "Channel 11 enable clear register. Writing '0' has no effect\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum CH11_A { - #[doc = "0: Read: channel disabled"] - DISABLED = 0, - #[doc = "1: Read: channel enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: CH11_A) -> Self { - variant as u8 != 0 - } -} -impl CH11_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> CH11_A { - match self.bits { - false => CH11_A::DISABLED, - true => CH11_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == CH11_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == CH11_A::ENABLED - } -} -#[doc = "Channel 11 enable clear register. Writing '0' has no effect\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum CH11_AW { - #[doc = "1: Write: disable channel"] - CLEAR = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: CH11_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `CH11` writer - Channel 11 enable clear register. Writing '0' has no effect"] -pub type CH11_W<'a, const O: u8> = crate::BitWriter1C<'a, u32, CHENCLR_SPEC, CH11_AW, O>; -impl<'a, const O: u8> CH11_W<'a, O> { - #[doc = "Write: disable channel"] - #[inline(always)] - pub fn clear(self) -> &'a mut W { - self.variant(CH11_AW::CLEAR) - } -} -#[doc = "Field `CH12` reader - Channel 12 enable clear register. Writing '0' has no effect"] -pub type CH12_R = crate::BitReader; -#[doc = "Channel 12 enable clear register. Writing '0' has no effect\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum CH12_A { - #[doc = "0: Read: channel disabled"] - DISABLED = 0, - #[doc = "1: Read: channel enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: CH12_A) -> Self { - variant as u8 != 0 - } -} -impl CH12_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> CH12_A { - match self.bits { - false => CH12_A::DISABLED, - true => CH12_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == CH12_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == CH12_A::ENABLED - } -} -#[doc = "Channel 12 enable clear register. Writing '0' has no effect\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum CH12_AW { - #[doc = "1: Write: disable channel"] - CLEAR = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: CH12_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `CH12` writer - Channel 12 enable clear register. Writing '0' has no effect"] -pub type CH12_W<'a, const O: u8> = crate::BitWriter1C<'a, u32, CHENCLR_SPEC, CH12_AW, O>; -impl<'a, const O: u8> CH12_W<'a, O> { - #[doc = "Write: disable channel"] - #[inline(always)] - pub fn clear(self) -> &'a mut W { - self.variant(CH12_AW::CLEAR) - } -} -#[doc = "Field `CH13` reader - Channel 13 enable clear register. Writing '0' has no effect"] -pub type CH13_R = crate::BitReader; -#[doc = "Channel 13 enable clear register. Writing '0' has no effect\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum CH13_A { - #[doc = "0: Read: channel disabled"] - DISABLED = 0, - #[doc = "1: Read: channel enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: CH13_A) -> Self { - variant as u8 != 0 - } -} -impl CH13_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> CH13_A { - match self.bits { - false => CH13_A::DISABLED, - true => CH13_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == CH13_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == CH13_A::ENABLED - } -} -#[doc = "Channel 13 enable clear register. Writing '0' has no effect\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum CH13_AW { - #[doc = "1: Write: disable channel"] - CLEAR = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: CH13_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `CH13` writer - Channel 13 enable clear register. Writing '0' has no effect"] -pub type CH13_W<'a, const O: u8> = crate::BitWriter1C<'a, u32, CHENCLR_SPEC, CH13_AW, O>; -impl<'a, const O: u8> CH13_W<'a, O> { - #[doc = "Write: disable channel"] - #[inline(always)] - pub fn clear(self) -> &'a mut W { - self.variant(CH13_AW::CLEAR) - } -} -#[doc = "Field `CH14` reader - Channel 14 enable clear register. Writing '0' has no effect"] -pub type CH14_R = crate::BitReader; -#[doc = "Channel 14 enable clear register. Writing '0' has no effect\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum CH14_A { - #[doc = "0: Read: channel disabled"] - DISABLED = 0, - #[doc = "1: Read: channel enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: CH14_A) -> Self { - variant as u8 != 0 - } -} -impl CH14_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> CH14_A { - match self.bits { - false => CH14_A::DISABLED, - true => CH14_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == CH14_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == CH14_A::ENABLED - } -} -#[doc = "Channel 14 enable clear register. Writing '0' has no effect\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum CH14_AW { - #[doc = "1: Write: disable channel"] - CLEAR = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: CH14_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `CH14` writer - Channel 14 enable clear register. Writing '0' has no effect"] -pub type CH14_W<'a, const O: u8> = crate::BitWriter1C<'a, u32, CHENCLR_SPEC, CH14_AW, O>; -impl<'a, const O: u8> CH14_W<'a, O> { - #[doc = "Write: disable channel"] - #[inline(always)] - pub fn clear(self) -> &'a mut W { - self.variant(CH14_AW::CLEAR) - } -} -#[doc = "Field `CH15` reader - Channel 15 enable clear register. Writing '0' has no effect"] -pub type CH15_R = crate::BitReader; -#[doc = "Channel 15 enable clear register. Writing '0' has no effect\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum CH15_A { - #[doc = "0: Read: channel disabled"] - DISABLED = 0, - #[doc = "1: Read: channel enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: CH15_A) -> Self { - variant as u8 != 0 - } -} -impl CH15_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> CH15_A { - match self.bits { - false => CH15_A::DISABLED, - true => CH15_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == CH15_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == CH15_A::ENABLED - } -} -#[doc = "Channel 15 enable clear register. Writing '0' has no effect\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum CH15_AW { - #[doc = "1: Write: disable channel"] - CLEAR = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: CH15_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `CH15` writer - Channel 15 enable clear register. Writing '0' has no effect"] -pub type CH15_W<'a, const O: u8> = crate::BitWriter1C<'a, u32, CHENCLR_SPEC, CH15_AW, O>; -impl<'a, const O: u8> CH15_W<'a, O> { - #[doc = "Write: disable channel"] - #[inline(always)] - pub fn clear(self) -> &'a mut W { - self.variant(CH15_AW::CLEAR) - } -} -#[doc = "Field `CH16` reader - Channel 16 enable clear register. Writing '0' has no effect"] -pub type CH16_R = crate::BitReader; -#[doc = "Channel 16 enable clear register. Writing '0' has no effect\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum CH16_A { - #[doc = "0: Read: channel disabled"] - DISABLED = 0, - #[doc = "1: Read: channel enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: CH16_A) -> Self { - variant as u8 != 0 - } -} -impl CH16_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> CH16_A { - match self.bits { - false => CH16_A::DISABLED, - true => CH16_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == CH16_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == CH16_A::ENABLED - } -} -#[doc = "Channel 16 enable clear register. Writing '0' has no effect\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum CH16_AW { - #[doc = "1: Write: disable channel"] - CLEAR = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: CH16_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `CH16` writer - Channel 16 enable clear register. Writing '0' has no effect"] -pub type CH16_W<'a, const O: u8> = crate::BitWriter1C<'a, u32, CHENCLR_SPEC, CH16_AW, O>; -impl<'a, const O: u8> CH16_W<'a, O> { - #[doc = "Write: disable channel"] - #[inline(always)] - pub fn clear(self) -> &'a mut W { - self.variant(CH16_AW::CLEAR) - } -} -#[doc = "Field `CH17` reader - Channel 17 enable clear register. Writing '0' has no effect"] -pub type CH17_R = crate::BitReader; -#[doc = "Channel 17 enable clear register. Writing '0' has no effect\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum CH17_A { - #[doc = "0: Read: channel disabled"] - DISABLED = 0, - #[doc = "1: Read: channel enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: CH17_A) -> Self { - variant as u8 != 0 - } -} -impl CH17_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> CH17_A { - match self.bits { - false => CH17_A::DISABLED, - true => CH17_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == CH17_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == CH17_A::ENABLED - } -} -#[doc = "Channel 17 enable clear register. Writing '0' has no effect\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum CH17_AW { - #[doc = "1: Write: disable channel"] - CLEAR = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: CH17_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `CH17` writer - Channel 17 enable clear register. Writing '0' has no effect"] -pub type CH17_W<'a, const O: u8> = crate::BitWriter1C<'a, u32, CHENCLR_SPEC, CH17_AW, O>; -impl<'a, const O: u8> CH17_W<'a, O> { - #[doc = "Write: disable channel"] - #[inline(always)] - pub fn clear(self) -> &'a mut W { - self.variant(CH17_AW::CLEAR) - } -} -#[doc = "Field `CH18` reader - Channel 18 enable clear register. Writing '0' has no effect"] -pub type CH18_R = crate::BitReader; -#[doc = "Channel 18 enable clear register. Writing '0' has no effect\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum CH18_A { - #[doc = "0: Read: channel disabled"] - DISABLED = 0, - #[doc = "1: Read: channel enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: CH18_A) -> Self { - variant as u8 != 0 - } -} -impl CH18_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> CH18_A { - match self.bits { - false => CH18_A::DISABLED, - true => CH18_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == CH18_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == CH18_A::ENABLED - } -} -#[doc = "Channel 18 enable clear register. Writing '0' has no effect\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum CH18_AW { - #[doc = "1: Write: disable channel"] - CLEAR = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: CH18_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `CH18` writer - Channel 18 enable clear register. Writing '0' has no effect"] -pub type CH18_W<'a, const O: u8> = crate::BitWriter1C<'a, u32, CHENCLR_SPEC, CH18_AW, O>; -impl<'a, const O: u8> CH18_W<'a, O> { - #[doc = "Write: disable channel"] - #[inline(always)] - pub fn clear(self) -> &'a mut W { - self.variant(CH18_AW::CLEAR) - } -} -#[doc = "Field `CH19` reader - Channel 19 enable clear register. Writing '0' has no effect"] -pub type CH19_R = crate::BitReader; -#[doc = "Channel 19 enable clear register. Writing '0' has no effect\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum CH19_A { - #[doc = "0: Read: channel disabled"] - DISABLED = 0, - #[doc = "1: Read: channel enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: CH19_A) -> Self { - variant as u8 != 0 - } -} -impl CH19_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> CH19_A { - match self.bits { - false => CH19_A::DISABLED, - true => CH19_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == CH19_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == CH19_A::ENABLED - } -} -#[doc = "Channel 19 enable clear register. Writing '0' has no effect\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum CH19_AW { - #[doc = "1: Write: disable channel"] - CLEAR = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: CH19_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `CH19` writer - Channel 19 enable clear register. Writing '0' has no effect"] -pub type CH19_W<'a, const O: u8> = crate::BitWriter1C<'a, u32, CHENCLR_SPEC, CH19_AW, O>; -impl<'a, const O: u8> CH19_W<'a, O> { - #[doc = "Write: disable channel"] - #[inline(always)] - pub fn clear(self) -> &'a mut W { - self.variant(CH19_AW::CLEAR) - } -} -#[doc = "Field `CH20` reader - Channel 20 enable clear register. Writing '0' has no effect"] -pub type CH20_R = crate::BitReader; -#[doc = "Channel 20 enable clear register. Writing '0' has no effect\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum CH20_A { - #[doc = "0: Read: channel disabled"] - DISABLED = 0, - #[doc = "1: Read: channel enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: CH20_A) -> Self { - variant as u8 != 0 - } -} -impl CH20_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> CH20_A { - match self.bits { - false => CH20_A::DISABLED, - true => CH20_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == CH20_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == CH20_A::ENABLED - } -} -#[doc = "Channel 20 enable clear register. Writing '0' has no effect\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum CH20_AW { - #[doc = "1: Write: disable channel"] - CLEAR = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: CH20_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `CH20` writer - Channel 20 enable clear register. Writing '0' has no effect"] -pub type CH20_W<'a, const O: u8> = crate::BitWriter1C<'a, u32, CHENCLR_SPEC, CH20_AW, O>; -impl<'a, const O: u8> CH20_W<'a, O> { - #[doc = "Write: disable channel"] - #[inline(always)] - pub fn clear(self) -> &'a mut W { - self.variant(CH20_AW::CLEAR) - } -} -#[doc = "Field `CH21` reader - Channel 21 enable clear register. Writing '0' has no effect"] -pub type CH21_R = crate::BitReader; -#[doc = "Channel 21 enable clear register. Writing '0' has no effect\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum CH21_A { - #[doc = "0: Read: channel disabled"] - DISABLED = 0, - #[doc = "1: Read: channel enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: CH21_A) -> Self { - variant as u8 != 0 - } -} -impl CH21_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> CH21_A { - match self.bits { - false => CH21_A::DISABLED, - true => CH21_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == CH21_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == CH21_A::ENABLED - } -} -#[doc = "Channel 21 enable clear register. Writing '0' has no effect\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum CH21_AW { - #[doc = "1: Write: disable channel"] - CLEAR = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: CH21_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `CH21` writer - Channel 21 enable clear register. Writing '0' has no effect"] -pub type CH21_W<'a, const O: u8> = crate::BitWriter1C<'a, u32, CHENCLR_SPEC, CH21_AW, O>; -impl<'a, const O: u8> CH21_W<'a, O> { - #[doc = "Write: disable channel"] - #[inline(always)] - pub fn clear(self) -> &'a mut W { - self.variant(CH21_AW::CLEAR) - } -} -#[doc = "Field `CH22` reader - Channel 22 enable clear register. Writing '0' has no effect"] -pub type CH22_R = crate::BitReader; -#[doc = "Channel 22 enable clear register. Writing '0' has no effect\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum CH22_A { - #[doc = "0: Read: channel disabled"] - DISABLED = 0, - #[doc = "1: Read: channel enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: CH22_A) -> Self { - variant as u8 != 0 - } -} -impl CH22_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> CH22_A { - match self.bits { - false => CH22_A::DISABLED, - true => CH22_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == CH22_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == CH22_A::ENABLED - } -} -#[doc = "Channel 22 enable clear register. Writing '0' has no effect\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum CH22_AW { - #[doc = "1: Write: disable channel"] - CLEAR = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: CH22_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `CH22` writer - Channel 22 enable clear register. Writing '0' has no effect"] -pub type CH22_W<'a, const O: u8> = crate::BitWriter1C<'a, u32, CHENCLR_SPEC, CH22_AW, O>; -impl<'a, const O: u8> CH22_W<'a, O> { - #[doc = "Write: disable channel"] - #[inline(always)] - pub fn clear(self) -> &'a mut W { - self.variant(CH22_AW::CLEAR) - } -} -#[doc = "Field `CH23` reader - Channel 23 enable clear register. Writing '0' has no effect"] -pub type CH23_R = crate::BitReader; -#[doc = "Channel 23 enable clear register. Writing '0' has no effect\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum CH23_A { - #[doc = "0: Read: channel disabled"] - DISABLED = 0, - #[doc = "1: Read: channel enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: CH23_A) -> Self { - variant as u8 != 0 - } -} -impl CH23_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> CH23_A { - match self.bits { - false => CH23_A::DISABLED, - true => CH23_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == CH23_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == CH23_A::ENABLED - } -} -#[doc = "Channel 23 enable clear register. Writing '0' has no effect\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum CH23_AW { - #[doc = "1: Write: disable channel"] - CLEAR = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: CH23_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `CH23` writer - Channel 23 enable clear register. Writing '0' has no effect"] -pub type CH23_W<'a, const O: u8> = crate::BitWriter1C<'a, u32, CHENCLR_SPEC, CH23_AW, O>; -impl<'a, const O: u8> CH23_W<'a, O> { - #[doc = "Write: disable channel"] - #[inline(always)] - pub fn clear(self) -> &'a mut W { - self.variant(CH23_AW::CLEAR) - } -} -#[doc = "Field `CH24` reader - Channel 24 enable clear register. Writing '0' has no effect"] -pub type CH24_R = crate::BitReader; -#[doc = "Channel 24 enable clear register. Writing '0' has no effect\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum CH24_A { - #[doc = "0: Read: channel disabled"] - DISABLED = 0, - #[doc = "1: Read: channel enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: CH24_A) -> Self { - variant as u8 != 0 - } -} -impl CH24_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> CH24_A { - match self.bits { - false => CH24_A::DISABLED, - true => CH24_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == CH24_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == CH24_A::ENABLED - } -} -#[doc = "Channel 24 enable clear register. Writing '0' has no effect\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum CH24_AW { - #[doc = "1: Write: disable channel"] - CLEAR = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: CH24_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `CH24` writer - Channel 24 enable clear register. Writing '0' has no effect"] -pub type CH24_W<'a, const O: u8> = crate::BitWriter1C<'a, u32, CHENCLR_SPEC, CH24_AW, O>; -impl<'a, const O: u8> CH24_W<'a, O> { - #[doc = "Write: disable channel"] - #[inline(always)] - pub fn clear(self) -> &'a mut W { - self.variant(CH24_AW::CLEAR) - } -} -#[doc = "Field `CH25` reader - Channel 25 enable clear register. Writing '0' has no effect"] -pub type CH25_R = crate::BitReader; -#[doc = "Channel 25 enable clear register. Writing '0' has no effect\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum CH25_A { - #[doc = "0: Read: channel disabled"] - DISABLED = 0, - #[doc = "1: Read: channel enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: CH25_A) -> Self { - variant as u8 != 0 - } -} -impl CH25_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> CH25_A { - match self.bits { - false => CH25_A::DISABLED, - true => CH25_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == CH25_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == CH25_A::ENABLED - } -} -#[doc = "Channel 25 enable clear register. Writing '0' has no effect\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum CH25_AW { - #[doc = "1: Write: disable channel"] - CLEAR = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: CH25_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `CH25` writer - Channel 25 enable clear register. Writing '0' has no effect"] -pub type CH25_W<'a, const O: u8> = crate::BitWriter1C<'a, u32, CHENCLR_SPEC, CH25_AW, O>; -impl<'a, const O: u8> CH25_W<'a, O> { - #[doc = "Write: disable channel"] - #[inline(always)] - pub fn clear(self) -> &'a mut W { - self.variant(CH25_AW::CLEAR) - } -} -#[doc = "Field `CH26` reader - Channel 26 enable clear register. Writing '0' has no effect"] -pub type CH26_R = crate::BitReader; -#[doc = "Channel 26 enable clear register. Writing '0' has no effect\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum CH26_A { - #[doc = "0: Read: channel disabled"] - DISABLED = 0, - #[doc = "1: Read: channel enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: CH26_A) -> Self { - variant as u8 != 0 - } -} -impl CH26_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> CH26_A { - match self.bits { - false => CH26_A::DISABLED, - true => CH26_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == CH26_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == CH26_A::ENABLED - } -} -#[doc = "Channel 26 enable clear register. Writing '0' has no effect\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum CH26_AW { - #[doc = "1: Write: disable channel"] - CLEAR = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: CH26_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `CH26` writer - Channel 26 enable clear register. Writing '0' has no effect"] -pub type CH26_W<'a, const O: u8> = crate::BitWriter1C<'a, u32, CHENCLR_SPEC, CH26_AW, O>; -impl<'a, const O: u8> CH26_W<'a, O> { - #[doc = "Write: disable channel"] - #[inline(always)] - pub fn clear(self) -> &'a mut W { - self.variant(CH26_AW::CLEAR) - } -} -#[doc = "Field `CH27` reader - Channel 27 enable clear register. Writing '0' has no effect"] -pub type CH27_R = crate::BitReader; -#[doc = "Channel 27 enable clear register. Writing '0' has no effect\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum CH27_A { - #[doc = "0: Read: channel disabled"] - DISABLED = 0, - #[doc = "1: Read: channel enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: CH27_A) -> Self { - variant as u8 != 0 - } -} -impl CH27_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> CH27_A { - match self.bits { - false => CH27_A::DISABLED, - true => CH27_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == CH27_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == CH27_A::ENABLED - } -} -#[doc = "Channel 27 enable clear register. Writing '0' has no effect\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum CH27_AW { - #[doc = "1: Write: disable channel"] - CLEAR = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: CH27_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `CH27` writer - Channel 27 enable clear register. Writing '0' has no effect"] -pub type CH27_W<'a, const O: u8> = crate::BitWriter1C<'a, u32, CHENCLR_SPEC, CH27_AW, O>; -impl<'a, const O: u8> CH27_W<'a, O> { - #[doc = "Write: disable channel"] - #[inline(always)] - pub fn clear(self) -> &'a mut W { - self.variant(CH27_AW::CLEAR) - } -} -#[doc = "Field `CH28` reader - Channel 28 enable clear register. Writing '0' has no effect"] -pub type CH28_R = crate::BitReader; -#[doc = "Channel 28 enable clear register. Writing '0' has no effect\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum CH28_A { - #[doc = "0: Read: channel disabled"] - DISABLED = 0, - #[doc = "1: Read: channel enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: CH28_A) -> Self { - variant as u8 != 0 - } -} -impl CH28_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> CH28_A { - match self.bits { - false => CH28_A::DISABLED, - true => CH28_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == CH28_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == CH28_A::ENABLED - } -} -#[doc = "Channel 28 enable clear register. Writing '0' has no effect\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum CH28_AW { - #[doc = "1: Write: disable channel"] - CLEAR = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: CH28_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `CH28` writer - Channel 28 enable clear register. Writing '0' has no effect"] -pub type CH28_W<'a, const O: u8> = crate::BitWriter1C<'a, u32, CHENCLR_SPEC, CH28_AW, O>; -impl<'a, const O: u8> CH28_W<'a, O> { - #[doc = "Write: disable channel"] - #[inline(always)] - pub fn clear(self) -> &'a mut W { - self.variant(CH28_AW::CLEAR) - } -} -#[doc = "Field `CH29` reader - Channel 29 enable clear register. Writing '0' has no effect"] -pub type CH29_R = crate::BitReader; -#[doc = "Channel 29 enable clear register. Writing '0' has no effect\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum CH29_A { - #[doc = "0: Read: channel disabled"] - DISABLED = 0, - #[doc = "1: Read: channel enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: CH29_A) -> Self { - variant as u8 != 0 - } -} -impl CH29_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> CH29_A { - match self.bits { - false => CH29_A::DISABLED, - true => CH29_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == CH29_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == CH29_A::ENABLED - } -} -#[doc = "Channel 29 enable clear register. Writing '0' has no effect\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum CH29_AW { - #[doc = "1: Write: disable channel"] - CLEAR = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: CH29_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `CH29` writer - Channel 29 enable clear register. Writing '0' has no effect"] -pub type CH29_W<'a, const O: u8> = crate::BitWriter1C<'a, u32, CHENCLR_SPEC, CH29_AW, O>; -impl<'a, const O: u8> CH29_W<'a, O> { - #[doc = "Write: disable channel"] - #[inline(always)] - pub fn clear(self) -> &'a mut W { - self.variant(CH29_AW::CLEAR) - } -} -#[doc = "Field `CH30` reader - Channel 30 enable clear register. Writing '0' has no effect"] -pub type CH30_R = crate::BitReader; -#[doc = "Channel 30 enable clear register. Writing '0' has no effect\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum CH30_A { - #[doc = "0: Read: channel disabled"] - DISABLED = 0, - #[doc = "1: Read: channel enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: CH30_A) -> Self { - variant as u8 != 0 - } -} -impl CH30_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> CH30_A { - match self.bits { - false => CH30_A::DISABLED, - true => CH30_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == CH30_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == CH30_A::ENABLED - } -} -#[doc = "Channel 30 enable clear register. Writing '0' has no effect\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum CH30_AW { - #[doc = "1: Write: disable channel"] - CLEAR = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: CH30_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `CH30` writer - Channel 30 enable clear register. Writing '0' has no effect"] -pub type CH30_W<'a, const O: u8> = crate::BitWriter1C<'a, u32, CHENCLR_SPEC, CH30_AW, O>; -impl<'a, const O: u8> CH30_W<'a, O> { - #[doc = "Write: disable channel"] - #[inline(always)] - pub fn clear(self) -> &'a mut W { - self.variant(CH30_AW::CLEAR) - } -} -#[doc = "Field `CH31` reader - Channel 31 enable clear register. Writing '0' has no effect"] -pub type CH31_R = crate::BitReader; -#[doc = "Channel 31 enable clear register. Writing '0' has no effect\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum CH31_A { - #[doc = "0: Read: channel disabled"] - DISABLED = 0, - #[doc = "1: Read: channel enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: CH31_A) -> Self { - variant as u8 != 0 - } -} -impl CH31_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> CH31_A { - match self.bits { - false => CH31_A::DISABLED, - true => CH31_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == CH31_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == CH31_A::ENABLED - } -} -#[doc = "Channel 31 enable clear register. Writing '0' has no effect\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum CH31_AW { - #[doc = "1: Write: disable channel"] - CLEAR = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: CH31_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `CH31` writer - Channel 31 enable clear register. Writing '0' has no effect"] -pub type CH31_W<'a, const O: u8> = crate::BitWriter1C<'a, u32, CHENCLR_SPEC, CH31_AW, O>; -impl<'a, const O: u8> CH31_W<'a, O> { - #[doc = "Write: disable channel"] - #[inline(always)] - pub fn clear(self) -> &'a mut W { - self.variant(CH31_AW::CLEAR) - } -} -impl R { - #[doc = "Bit 0 - Channel 0 enable clear register. Writing '0' has no effect"] - #[inline(always)] - pub fn ch0(&self) -> CH0_R { - CH0_R::new((self.bits & 1) != 0) - } - #[doc = "Bit 1 - Channel 1 enable clear register. Writing '0' has no effect"] - #[inline(always)] - pub fn ch1(&self) -> CH1_R { - CH1_R::new(((self.bits >> 1) & 1) != 0) - } - #[doc = "Bit 2 - Channel 2 enable clear register. Writing '0' has no effect"] - #[inline(always)] - pub fn ch2(&self) -> CH2_R { - CH2_R::new(((self.bits >> 2) & 1) != 0) - } - #[doc = "Bit 3 - Channel 3 enable clear register. Writing '0' has no effect"] - #[inline(always)] - pub fn ch3(&self) -> CH3_R { - CH3_R::new(((self.bits >> 3) & 1) != 0) - } - #[doc = "Bit 4 - Channel 4 enable clear register. Writing '0' has no effect"] - #[inline(always)] - pub fn ch4(&self) -> CH4_R { - CH4_R::new(((self.bits >> 4) & 1) != 0) - } - #[doc = "Bit 5 - Channel 5 enable clear register. Writing '0' has no effect"] - #[inline(always)] - pub fn ch5(&self) -> CH5_R { - CH5_R::new(((self.bits >> 5) & 1) != 0) - } - #[doc = "Bit 6 - Channel 6 enable clear register. Writing '0' has no effect"] - #[inline(always)] - pub fn ch6(&self) -> CH6_R { - CH6_R::new(((self.bits >> 6) & 1) != 0) - } - #[doc = "Bit 7 - Channel 7 enable clear register. Writing '0' has no effect"] - #[inline(always)] - pub fn ch7(&self) -> CH7_R { - CH7_R::new(((self.bits >> 7) & 1) != 0) - } - #[doc = "Bit 8 - Channel 8 enable clear register. Writing '0' has no effect"] - #[inline(always)] - pub fn ch8(&self) -> CH8_R { - CH8_R::new(((self.bits >> 8) & 1) != 0) - } - #[doc = "Bit 9 - Channel 9 enable clear register. Writing '0' has no effect"] - #[inline(always)] - pub fn ch9(&self) -> CH9_R { - CH9_R::new(((self.bits >> 9) & 1) != 0) - } - #[doc = "Bit 10 - Channel 10 enable clear register. Writing '0' has no effect"] - #[inline(always)] - pub fn ch10(&self) -> CH10_R { - CH10_R::new(((self.bits >> 10) & 1) != 0) - } - #[doc = "Bit 11 - Channel 11 enable clear register. Writing '0' has no effect"] - #[inline(always)] - pub fn ch11(&self) -> CH11_R { - CH11_R::new(((self.bits >> 11) & 1) != 0) - } - #[doc = "Bit 12 - Channel 12 enable clear register. Writing '0' has no effect"] - #[inline(always)] - pub fn ch12(&self) -> CH12_R { - CH12_R::new(((self.bits >> 12) & 1) != 0) - } - #[doc = "Bit 13 - Channel 13 enable clear register. Writing '0' has no effect"] - #[inline(always)] - pub fn ch13(&self) -> CH13_R { - CH13_R::new(((self.bits >> 13) & 1) != 0) - } - #[doc = "Bit 14 - Channel 14 enable clear register. Writing '0' has no effect"] - #[inline(always)] - pub fn ch14(&self) -> CH14_R { - CH14_R::new(((self.bits >> 14) & 1) != 0) - } - #[doc = "Bit 15 - Channel 15 enable clear register. Writing '0' has no effect"] - #[inline(always)] - pub fn ch15(&self) -> CH15_R { - CH15_R::new(((self.bits >> 15) & 1) != 0) - } - #[doc = "Bit 16 - Channel 16 enable clear register. Writing '0' has no effect"] - #[inline(always)] - pub fn ch16(&self) -> CH16_R { - CH16_R::new(((self.bits >> 16) & 1) != 0) - } - #[doc = "Bit 17 - Channel 17 enable clear register. Writing '0' has no effect"] - #[inline(always)] - pub fn ch17(&self) -> CH17_R { - CH17_R::new(((self.bits >> 17) & 1) != 0) - } - #[doc = "Bit 18 - Channel 18 enable clear register. Writing '0' has no effect"] - #[inline(always)] - pub fn ch18(&self) -> CH18_R { - CH18_R::new(((self.bits >> 18) & 1) != 0) - } - #[doc = "Bit 19 - Channel 19 enable clear register. Writing '0' has no effect"] - #[inline(always)] - pub fn ch19(&self) -> CH19_R { - CH19_R::new(((self.bits >> 19) & 1) != 0) - } - #[doc = "Bit 20 - Channel 20 enable clear register. Writing '0' has no effect"] - #[inline(always)] - pub fn ch20(&self) -> CH20_R { - CH20_R::new(((self.bits >> 20) & 1) != 0) - } - #[doc = "Bit 21 - Channel 21 enable clear register. Writing '0' has no effect"] - #[inline(always)] - pub fn ch21(&self) -> CH21_R { - CH21_R::new(((self.bits >> 21) & 1) != 0) - } - #[doc = "Bit 22 - Channel 22 enable clear register. Writing '0' has no effect"] - #[inline(always)] - pub fn ch22(&self) -> CH22_R { - CH22_R::new(((self.bits >> 22) & 1) != 0) - } - #[doc = "Bit 23 - Channel 23 enable clear register. Writing '0' has no effect"] - #[inline(always)] - pub fn ch23(&self) -> CH23_R { - CH23_R::new(((self.bits >> 23) & 1) != 0) - } - #[doc = "Bit 24 - Channel 24 enable clear register. Writing '0' has no effect"] - #[inline(always)] - pub fn ch24(&self) -> CH24_R { - CH24_R::new(((self.bits >> 24) & 1) != 0) - } - #[doc = "Bit 25 - Channel 25 enable clear register. Writing '0' has no effect"] - #[inline(always)] - pub fn ch25(&self) -> CH25_R { - CH25_R::new(((self.bits >> 25) & 1) != 0) - } - #[doc = "Bit 26 - Channel 26 enable clear register. Writing '0' has no effect"] - #[inline(always)] - pub fn ch26(&self) -> CH26_R { - CH26_R::new(((self.bits >> 26) & 1) != 0) - } - #[doc = "Bit 27 - Channel 27 enable clear register. Writing '0' has no effect"] - #[inline(always)] - pub fn ch27(&self) -> CH27_R { - CH27_R::new(((self.bits >> 27) & 1) != 0) - } - #[doc = "Bit 28 - Channel 28 enable clear register. Writing '0' has no effect"] - #[inline(always)] - pub fn ch28(&self) -> CH28_R { - CH28_R::new(((self.bits >> 28) & 1) != 0) - } - #[doc = "Bit 29 - Channel 29 enable clear register. Writing '0' has no effect"] - #[inline(always)] - pub fn ch29(&self) -> CH29_R { - CH29_R::new(((self.bits >> 29) & 1) != 0) - } - #[doc = "Bit 30 - Channel 30 enable clear register. Writing '0' has no effect"] - #[inline(always)] - pub fn ch30(&self) -> CH30_R { - CH30_R::new(((self.bits >> 30) & 1) != 0) - } - #[doc = "Bit 31 - Channel 31 enable clear register. Writing '0' has no effect"] - #[inline(always)] - pub fn ch31(&self) -> CH31_R { - CH31_R::new(((self.bits >> 31) & 1) != 0) - } -} -impl W { - #[doc = "Bit 0 - Channel 0 enable clear register. Writing '0' has no effect"] - #[inline(always)] - #[must_use] - pub fn ch0(&mut self) -> CH0_W<0> { - CH0_W::new(self) - } - #[doc = "Bit 1 - Channel 1 enable clear register. Writing '0' has no effect"] - #[inline(always)] - #[must_use] - pub fn ch1(&mut self) -> CH1_W<1> { - CH1_W::new(self) - } - #[doc = "Bit 2 - Channel 2 enable clear register. Writing '0' has no effect"] - #[inline(always)] - #[must_use] - pub fn ch2(&mut self) -> CH2_W<2> { - CH2_W::new(self) - } - #[doc = "Bit 3 - Channel 3 enable clear register. Writing '0' has no effect"] - #[inline(always)] - #[must_use] - pub fn ch3(&mut self) -> CH3_W<3> { - CH3_W::new(self) - } - #[doc = "Bit 4 - Channel 4 enable clear register. Writing '0' has no effect"] - #[inline(always)] - #[must_use] - pub fn ch4(&mut self) -> CH4_W<4> { - CH4_W::new(self) - } - #[doc = "Bit 5 - Channel 5 enable clear register. Writing '0' has no effect"] - #[inline(always)] - #[must_use] - pub fn ch5(&mut self) -> CH5_W<5> { - CH5_W::new(self) - } - #[doc = "Bit 6 - Channel 6 enable clear register. Writing '0' has no effect"] - #[inline(always)] - #[must_use] - pub fn ch6(&mut self) -> CH6_W<6> { - CH6_W::new(self) - } - #[doc = "Bit 7 - Channel 7 enable clear register. Writing '0' has no effect"] - #[inline(always)] - #[must_use] - pub fn ch7(&mut self) -> CH7_W<7> { - CH7_W::new(self) - } - #[doc = "Bit 8 - Channel 8 enable clear register. Writing '0' has no effect"] - #[inline(always)] - #[must_use] - pub fn ch8(&mut self) -> CH8_W<8> { - CH8_W::new(self) - } - #[doc = "Bit 9 - Channel 9 enable clear register. Writing '0' has no effect"] - #[inline(always)] - #[must_use] - pub fn ch9(&mut self) -> CH9_W<9> { - CH9_W::new(self) - } - #[doc = "Bit 10 - Channel 10 enable clear register. Writing '0' has no effect"] - #[inline(always)] - #[must_use] - pub fn ch10(&mut self) -> CH10_W<10> { - CH10_W::new(self) - } - #[doc = "Bit 11 - Channel 11 enable clear register. Writing '0' has no effect"] - #[inline(always)] - #[must_use] - pub fn ch11(&mut self) -> CH11_W<11> { - CH11_W::new(self) - } - #[doc = "Bit 12 - Channel 12 enable clear register. Writing '0' has no effect"] - #[inline(always)] - #[must_use] - pub fn ch12(&mut self) -> CH12_W<12> { - CH12_W::new(self) - } - #[doc = "Bit 13 - Channel 13 enable clear register. Writing '0' has no effect"] - #[inline(always)] - #[must_use] - pub fn ch13(&mut self) -> CH13_W<13> { - CH13_W::new(self) - } - #[doc = "Bit 14 - Channel 14 enable clear register. Writing '0' has no effect"] - #[inline(always)] - #[must_use] - pub fn ch14(&mut self) -> CH14_W<14> { - CH14_W::new(self) - } - #[doc = "Bit 15 - Channel 15 enable clear register. Writing '0' has no effect"] - #[inline(always)] - #[must_use] - pub fn ch15(&mut self) -> CH15_W<15> { - CH15_W::new(self) - } - #[doc = "Bit 16 - Channel 16 enable clear register. Writing '0' has no effect"] - #[inline(always)] - #[must_use] - pub fn ch16(&mut self) -> CH16_W<16> { - CH16_W::new(self) - } - #[doc = "Bit 17 - Channel 17 enable clear register. Writing '0' has no effect"] - #[inline(always)] - #[must_use] - pub fn ch17(&mut self) -> CH17_W<17> { - CH17_W::new(self) - } - #[doc = "Bit 18 - Channel 18 enable clear register. Writing '0' has no effect"] - #[inline(always)] - #[must_use] - pub fn ch18(&mut self) -> CH18_W<18> { - CH18_W::new(self) - } - #[doc = "Bit 19 - Channel 19 enable clear register. Writing '0' has no effect"] - #[inline(always)] - #[must_use] - pub fn ch19(&mut self) -> CH19_W<19> { - CH19_W::new(self) - } - #[doc = "Bit 20 - Channel 20 enable clear register. Writing '0' has no effect"] - #[inline(always)] - #[must_use] - pub fn ch20(&mut self) -> CH20_W<20> { - CH20_W::new(self) - } - #[doc = "Bit 21 - Channel 21 enable clear register. Writing '0' has no effect"] - #[inline(always)] - #[must_use] - pub fn ch21(&mut self) -> CH21_W<21> { - CH21_W::new(self) - } - #[doc = "Bit 22 - Channel 22 enable clear register. Writing '0' has no effect"] - #[inline(always)] - #[must_use] - pub fn ch22(&mut self) -> CH22_W<22> { - CH22_W::new(self) - } - #[doc = "Bit 23 - Channel 23 enable clear register. Writing '0' has no effect"] - #[inline(always)] - #[must_use] - pub fn ch23(&mut self) -> CH23_W<23> { - CH23_W::new(self) - } - #[doc = "Bit 24 - Channel 24 enable clear register. Writing '0' has no effect"] - #[inline(always)] - #[must_use] - pub fn ch24(&mut self) -> CH24_W<24> { - CH24_W::new(self) - } - #[doc = "Bit 25 - Channel 25 enable clear register. Writing '0' has no effect"] - #[inline(always)] - #[must_use] - pub fn ch25(&mut self) -> CH25_W<25> { - CH25_W::new(self) - } - #[doc = "Bit 26 - Channel 26 enable clear register. Writing '0' has no effect"] - #[inline(always)] - #[must_use] - pub fn ch26(&mut self) -> CH26_W<26> { - CH26_W::new(self) - } - #[doc = "Bit 27 - Channel 27 enable clear register. Writing '0' has no effect"] - #[inline(always)] - #[must_use] - pub fn ch27(&mut self) -> CH27_W<27> { - CH27_W::new(self) - } - #[doc = "Bit 28 - Channel 28 enable clear register. Writing '0' has no effect"] - #[inline(always)] - #[must_use] - pub fn ch28(&mut self) -> CH28_W<28> { - CH28_W::new(self) - } - #[doc = "Bit 29 - Channel 29 enable clear register. Writing '0' has no effect"] - #[inline(always)] - #[must_use] - pub fn ch29(&mut self) -> CH29_W<29> { - CH29_W::new(self) - } - #[doc = "Bit 30 - Channel 30 enable clear register. Writing '0' has no effect"] - #[inline(always)] - #[must_use] - pub fn ch30(&mut self) -> CH30_W<30> { - CH30_W::new(self) - } - #[doc = "Bit 31 - Channel 31 enable clear register. Writing '0' has no effect"] - #[inline(always)] - #[must_use] - pub fn ch31(&mut self) -> CH31_W<31> { - CH31_W::new(self) - } - #[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 = "Channel enable clear register\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 [chenclr](index.html) module"] -pub struct CHENCLR_SPEC; -impl crate::RegisterSpec for CHENCLR_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [chenclr::R](R) reader structure"] -impl crate::Readable for CHENCLR_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [chenclr::W](W) writer structure"] -impl crate::Writable for CHENCLR_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0xffff_ffff; -} -#[doc = "`reset()` method sets CHENCLR to value 0"] -impl crate::Resettable for CHENCLR_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/ppi/chenset.rs b/down-the-stack/dk_pac/src/ppi/chenset.rs deleted file mode 100644 index 900a667..0000000 --- a/down-the-stack/dk_pac/src/ppi/chenset.rs +++ /dev/null @@ -1,2241 +0,0 @@ -#[doc = "Register `CHENSET` 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 `CHENSET` 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 `CH0` reader - Channel 0 enable set register. Writing '0' has no effect"] -pub type CH0_R = crate::BitReader; -#[doc = "Channel 0 enable set register. Writing '0' has no effect\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum CH0_A { - #[doc = "0: Read: channel disabled"] - DISABLED = 0, - #[doc = "1: Read: channel enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: CH0_A) -> Self { - variant as u8 != 0 - } -} -impl CH0_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> CH0_A { - match self.bits { - false => CH0_A::DISABLED, - true => CH0_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == CH0_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == CH0_A::ENABLED - } -} -#[doc = "Channel 0 enable set register. Writing '0' has no effect\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum CH0_AW { - #[doc = "1: Write: Enable channel"] - SET = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: CH0_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `CH0` writer - Channel 0 enable set register. Writing '0' has no effect"] -pub type CH0_W<'a, const O: u8> = crate::BitWriter1S<'a, u32, CHENSET_SPEC, CH0_AW, O>; -impl<'a, const O: u8> CH0_W<'a, O> { - #[doc = "Write: Enable channel"] - #[inline(always)] - pub fn set(self) -> &'a mut W { - self.variant(CH0_AW::SET) - } -} -#[doc = "Field `CH1` reader - Channel 1 enable set register. Writing '0' has no effect"] -pub type CH1_R = crate::BitReader; -#[doc = "Channel 1 enable set register. Writing '0' has no effect\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum CH1_A { - #[doc = "0: Read: channel disabled"] - DISABLED = 0, - #[doc = "1: Read: channel enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: CH1_A) -> Self { - variant as u8 != 0 - } -} -impl CH1_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> CH1_A { - match self.bits { - false => CH1_A::DISABLED, - true => CH1_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == CH1_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == CH1_A::ENABLED - } -} -#[doc = "Channel 1 enable set register. Writing '0' has no effect\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum CH1_AW { - #[doc = "1: Write: Enable channel"] - SET = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: CH1_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `CH1` writer - Channel 1 enable set register. Writing '0' has no effect"] -pub type CH1_W<'a, const O: u8> = crate::BitWriter1S<'a, u32, CHENSET_SPEC, CH1_AW, O>; -impl<'a, const O: u8> CH1_W<'a, O> { - #[doc = "Write: Enable channel"] - #[inline(always)] - pub fn set(self) -> &'a mut W { - self.variant(CH1_AW::SET) - } -} -#[doc = "Field `CH2` reader - Channel 2 enable set register. Writing '0' has no effect"] -pub type CH2_R = crate::BitReader; -#[doc = "Channel 2 enable set register. Writing '0' has no effect\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum CH2_A { - #[doc = "0: Read: channel disabled"] - DISABLED = 0, - #[doc = "1: Read: channel enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: CH2_A) -> Self { - variant as u8 != 0 - } -} -impl CH2_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> CH2_A { - match self.bits { - false => CH2_A::DISABLED, - true => CH2_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == CH2_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == CH2_A::ENABLED - } -} -#[doc = "Channel 2 enable set register. Writing '0' has no effect\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum CH2_AW { - #[doc = "1: Write: Enable channel"] - SET = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: CH2_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `CH2` writer - Channel 2 enable set register. Writing '0' has no effect"] -pub type CH2_W<'a, const O: u8> = crate::BitWriter1S<'a, u32, CHENSET_SPEC, CH2_AW, O>; -impl<'a, const O: u8> CH2_W<'a, O> { - #[doc = "Write: Enable channel"] - #[inline(always)] - pub fn set(self) -> &'a mut W { - self.variant(CH2_AW::SET) - } -} -#[doc = "Field `CH3` reader - Channel 3 enable set register. Writing '0' has no effect"] -pub type CH3_R = crate::BitReader; -#[doc = "Channel 3 enable set register. Writing '0' has no effect\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum CH3_A { - #[doc = "0: Read: channel disabled"] - DISABLED = 0, - #[doc = "1: Read: channel enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: CH3_A) -> Self { - variant as u8 != 0 - } -} -impl CH3_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> CH3_A { - match self.bits { - false => CH3_A::DISABLED, - true => CH3_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == CH3_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == CH3_A::ENABLED - } -} -#[doc = "Channel 3 enable set register. Writing '0' has no effect\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum CH3_AW { - #[doc = "1: Write: Enable channel"] - SET = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: CH3_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `CH3` writer - Channel 3 enable set register. Writing '0' has no effect"] -pub type CH3_W<'a, const O: u8> = crate::BitWriter1S<'a, u32, CHENSET_SPEC, CH3_AW, O>; -impl<'a, const O: u8> CH3_W<'a, O> { - #[doc = "Write: Enable channel"] - #[inline(always)] - pub fn set(self) -> &'a mut W { - self.variant(CH3_AW::SET) - } -} -#[doc = "Field `CH4` reader - Channel 4 enable set register. Writing '0' has no effect"] -pub type CH4_R = crate::BitReader; -#[doc = "Channel 4 enable set register. Writing '0' has no effect\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum CH4_A { - #[doc = "0: Read: channel disabled"] - DISABLED = 0, - #[doc = "1: Read: channel enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: CH4_A) -> Self { - variant as u8 != 0 - } -} -impl CH4_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> CH4_A { - match self.bits { - false => CH4_A::DISABLED, - true => CH4_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == CH4_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == CH4_A::ENABLED - } -} -#[doc = "Channel 4 enable set register. Writing '0' has no effect\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum CH4_AW { - #[doc = "1: Write: Enable channel"] - SET = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: CH4_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `CH4` writer - Channel 4 enable set register. Writing '0' has no effect"] -pub type CH4_W<'a, const O: u8> = crate::BitWriter1S<'a, u32, CHENSET_SPEC, CH4_AW, O>; -impl<'a, const O: u8> CH4_W<'a, O> { - #[doc = "Write: Enable channel"] - #[inline(always)] - pub fn set(self) -> &'a mut W { - self.variant(CH4_AW::SET) - } -} -#[doc = "Field `CH5` reader - Channel 5 enable set register. Writing '0' has no effect"] -pub type CH5_R = crate::BitReader; -#[doc = "Channel 5 enable set register. Writing '0' has no effect\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum CH5_A { - #[doc = "0: Read: channel disabled"] - DISABLED = 0, - #[doc = "1: Read: channel enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: CH5_A) -> Self { - variant as u8 != 0 - } -} -impl CH5_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> CH5_A { - match self.bits { - false => CH5_A::DISABLED, - true => CH5_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == CH5_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == CH5_A::ENABLED - } -} -#[doc = "Channel 5 enable set register. Writing '0' has no effect\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum CH5_AW { - #[doc = "1: Write: Enable channel"] - SET = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: CH5_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `CH5` writer - Channel 5 enable set register. Writing '0' has no effect"] -pub type CH5_W<'a, const O: u8> = crate::BitWriter1S<'a, u32, CHENSET_SPEC, CH5_AW, O>; -impl<'a, const O: u8> CH5_W<'a, O> { - #[doc = "Write: Enable channel"] - #[inline(always)] - pub fn set(self) -> &'a mut W { - self.variant(CH5_AW::SET) - } -} -#[doc = "Field `CH6` reader - Channel 6 enable set register. Writing '0' has no effect"] -pub type CH6_R = crate::BitReader; -#[doc = "Channel 6 enable set register. Writing '0' has no effect\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum CH6_A { - #[doc = "0: Read: channel disabled"] - DISABLED = 0, - #[doc = "1: Read: channel enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: CH6_A) -> Self { - variant as u8 != 0 - } -} -impl CH6_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> CH6_A { - match self.bits { - false => CH6_A::DISABLED, - true => CH6_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == CH6_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == CH6_A::ENABLED - } -} -#[doc = "Channel 6 enable set register. Writing '0' has no effect\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum CH6_AW { - #[doc = "1: Write: Enable channel"] - SET = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: CH6_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `CH6` writer - Channel 6 enable set register. Writing '0' has no effect"] -pub type CH6_W<'a, const O: u8> = crate::BitWriter1S<'a, u32, CHENSET_SPEC, CH6_AW, O>; -impl<'a, const O: u8> CH6_W<'a, O> { - #[doc = "Write: Enable channel"] - #[inline(always)] - pub fn set(self) -> &'a mut W { - self.variant(CH6_AW::SET) - } -} -#[doc = "Field `CH7` reader - Channel 7 enable set register. Writing '0' has no effect"] -pub type CH7_R = crate::BitReader; -#[doc = "Channel 7 enable set register. Writing '0' has no effect\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum CH7_A { - #[doc = "0: Read: channel disabled"] - DISABLED = 0, - #[doc = "1: Read: channel enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: CH7_A) -> Self { - variant as u8 != 0 - } -} -impl CH7_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> CH7_A { - match self.bits { - false => CH7_A::DISABLED, - true => CH7_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == CH7_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == CH7_A::ENABLED - } -} -#[doc = "Channel 7 enable set register. Writing '0' has no effect\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum CH7_AW { - #[doc = "1: Write: Enable channel"] - SET = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: CH7_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `CH7` writer - Channel 7 enable set register. Writing '0' has no effect"] -pub type CH7_W<'a, const O: u8> = crate::BitWriter1S<'a, u32, CHENSET_SPEC, CH7_AW, O>; -impl<'a, const O: u8> CH7_W<'a, O> { - #[doc = "Write: Enable channel"] - #[inline(always)] - pub fn set(self) -> &'a mut W { - self.variant(CH7_AW::SET) - } -} -#[doc = "Field `CH8` reader - Channel 8 enable set register. Writing '0' has no effect"] -pub type CH8_R = crate::BitReader; -#[doc = "Channel 8 enable set register. Writing '0' has no effect\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum CH8_A { - #[doc = "0: Read: channel disabled"] - DISABLED = 0, - #[doc = "1: Read: channel enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: CH8_A) -> Self { - variant as u8 != 0 - } -} -impl CH8_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> CH8_A { - match self.bits { - false => CH8_A::DISABLED, - true => CH8_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == CH8_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == CH8_A::ENABLED - } -} -#[doc = "Channel 8 enable set register. Writing '0' has no effect\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum CH8_AW { - #[doc = "1: Write: Enable channel"] - SET = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: CH8_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `CH8` writer - Channel 8 enable set register. Writing '0' has no effect"] -pub type CH8_W<'a, const O: u8> = crate::BitWriter1S<'a, u32, CHENSET_SPEC, CH8_AW, O>; -impl<'a, const O: u8> CH8_W<'a, O> { - #[doc = "Write: Enable channel"] - #[inline(always)] - pub fn set(self) -> &'a mut W { - self.variant(CH8_AW::SET) - } -} -#[doc = "Field `CH9` reader - Channel 9 enable set register. Writing '0' has no effect"] -pub type CH9_R = crate::BitReader; -#[doc = "Channel 9 enable set register. Writing '0' has no effect\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum CH9_A { - #[doc = "0: Read: channel disabled"] - DISABLED = 0, - #[doc = "1: Read: channel enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: CH9_A) -> Self { - variant as u8 != 0 - } -} -impl CH9_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> CH9_A { - match self.bits { - false => CH9_A::DISABLED, - true => CH9_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == CH9_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == CH9_A::ENABLED - } -} -#[doc = "Channel 9 enable set register. Writing '0' has no effect\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum CH9_AW { - #[doc = "1: Write: Enable channel"] - SET = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: CH9_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `CH9` writer - Channel 9 enable set register. Writing '0' has no effect"] -pub type CH9_W<'a, const O: u8> = crate::BitWriter1S<'a, u32, CHENSET_SPEC, CH9_AW, O>; -impl<'a, const O: u8> CH9_W<'a, O> { - #[doc = "Write: Enable channel"] - #[inline(always)] - pub fn set(self) -> &'a mut W { - self.variant(CH9_AW::SET) - } -} -#[doc = "Field `CH10` reader - Channel 10 enable set register. Writing '0' has no effect"] -pub type CH10_R = crate::BitReader; -#[doc = "Channel 10 enable set register. Writing '0' has no effect\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum CH10_A { - #[doc = "0: Read: channel disabled"] - DISABLED = 0, - #[doc = "1: Read: channel enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: CH10_A) -> Self { - variant as u8 != 0 - } -} -impl CH10_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> CH10_A { - match self.bits { - false => CH10_A::DISABLED, - true => CH10_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == CH10_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == CH10_A::ENABLED - } -} -#[doc = "Channel 10 enable set register. Writing '0' has no effect\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum CH10_AW { - #[doc = "1: Write: Enable channel"] - SET = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: CH10_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `CH10` writer - Channel 10 enable set register. Writing '0' has no effect"] -pub type CH10_W<'a, const O: u8> = crate::BitWriter1S<'a, u32, CHENSET_SPEC, CH10_AW, O>; -impl<'a, const O: u8> CH10_W<'a, O> { - #[doc = "Write: Enable channel"] - #[inline(always)] - pub fn set(self) -> &'a mut W { - self.variant(CH10_AW::SET) - } -} -#[doc = "Field `CH11` reader - Channel 11 enable set register. Writing '0' has no effect"] -pub type CH11_R = crate::BitReader; -#[doc = "Channel 11 enable set register. Writing '0' has no effect\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum CH11_A { - #[doc = "0: Read: channel disabled"] - DISABLED = 0, - #[doc = "1: Read: channel enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: CH11_A) -> Self { - variant as u8 != 0 - } -} -impl CH11_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> CH11_A { - match self.bits { - false => CH11_A::DISABLED, - true => CH11_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == CH11_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == CH11_A::ENABLED - } -} -#[doc = "Channel 11 enable set register. Writing '0' has no effect\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum CH11_AW { - #[doc = "1: Write: Enable channel"] - SET = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: CH11_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `CH11` writer - Channel 11 enable set register. Writing '0' has no effect"] -pub type CH11_W<'a, const O: u8> = crate::BitWriter1S<'a, u32, CHENSET_SPEC, CH11_AW, O>; -impl<'a, const O: u8> CH11_W<'a, O> { - #[doc = "Write: Enable channel"] - #[inline(always)] - pub fn set(self) -> &'a mut W { - self.variant(CH11_AW::SET) - } -} -#[doc = "Field `CH12` reader - Channel 12 enable set register. Writing '0' has no effect"] -pub type CH12_R = crate::BitReader; -#[doc = "Channel 12 enable set register. Writing '0' has no effect\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum CH12_A { - #[doc = "0: Read: channel disabled"] - DISABLED = 0, - #[doc = "1: Read: channel enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: CH12_A) -> Self { - variant as u8 != 0 - } -} -impl CH12_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> CH12_A { - match self.bits { - false => CH12_A::DISABLED, - true => CH12_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == CH12_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == CH12_A::ENABLED - } -} -#[doc = "Channel 12 enable set register. Writing '0' has no effect\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum CH12_AW { - #[doc = "1: Write: Enable channel"] - SET = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: CH12_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `CH12` writer - Channel 12 enable set register. Writing '0' has no effect"] -pub type CH12_W<'a, const O: u8> = crate::BitWriter1S<'a, u32, CHENSET_SPEC, CH12_AW, O>; -impl<'a, const O: u8> CH12_W<'a, O> { - #[doc = "Write: Enable channel"] - #[inline(always)] - pub fn set(self) -> &'a mut W { - self.variant(CH12_AW::SET) - } -} -#[doc = "Field `CH13` reader - Channel 13 enable set register. Writing '0' has no effect"] -pub type CH13_R = crate::BitReader; -#[doc = "Channel 13 enable set register. Writing '0' has no effect\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum CH13_A { - #[doc = "0: Read: channel disabled"] - DISABLED = 0, - #[doc = "1: Read: channel enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: CH13_A) -> Self { - variant as u8 != 0 - } -} -impl CH13_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> CH13_A { - match self.bits { - false => CH13_A::DISABLED, - true => CH13_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == CH13_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == CH13_A::ENABLED - } -} -#[doc = "Channel 13 enable set register. Writing '0' has no effect\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum CH13_AW { - #[doc = "1: Write: Enable channel"] - SET = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: CH13_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `CH13` writer - Channel 13 enable set register. Writing '0' has no effect"] -pub type CH13_W<'a, const O: u8> = crate::BitWriter1S<'a, u32, CHENSET_SPEC, CH13_AW, O>; -impl<'a, const O: u8> CH13_W<'a, O> { - #[doc = "Write: Enable channel"] - #[inline(always)] - pub fn set(self) -> &'a mut W { - self.variant(CH13_AW::SET) - } -} -#[doc = "Field `CH14` reader - Channel 14 enable set register. Writing '0' has no effect"] -pub type CH14_R = crate::BitReader; -#[doc = "Channel 14 enable set register. Writing '0' has no effect\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum CH14_A { - #[doc = "0: Read: channel disabled"] - DISABLED = 0, - #[doc = "1: Read: channel enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: CH14_A) -> Self { - variant as u8 != 0 - } -} -impl CH14_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> CH14_A { - match self.bits { - false => CH14_A::DISABLED, - true => CH14_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == CH14_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == CH14_A::ENABLED - } -} -#[doc = "Channel 14 enable set register. Writing '0' has no effect\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum CH14_AW { - #[doc = "1: Write: Enable channel"] - SET = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: CH14_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `CH14` writer - Channel 14 enable set register. Writing '0' has no effect"] -pub type CH14_W<'a, const O: u8> = crate::BitWriter1S<'a, u32, CHENSET_SPEC, CH14_AW, O>; -impl<'a, const O: u8> CH14_W<'a, O> { - #[doc = "Write: Enable channel"] - #[inline(always)] - pub fn set(self) -> &'a mut W { - self.variant(CH14_AW::SET) - } -} -#[doc = "Field `CH15` reader - Channel 15 enable set register. Writing '0' has no effect"] -pub type CH15_R = crate::BitReader; -#[doc = "Channel 15 enable set register. Writing '0' has no effect\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum CH15_A { - #[doc = "0: Read: channel disabled"] - DISABLED = 0, - #[doc = "1: Read: channel enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: CH15_A) -> Self { - variant as u8 != 0 - } -} -impl CH15_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> CH15_A { - match self.bits { - false => CH15_A::DISABLED, - true => CH15_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == CH15_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == CH15_A::ENABLED - } -} -#[doc = "Channel 15 enable set register. Writing '0' has no effect\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum CH15_AW { - #[doc = "1: Write: Enable channel"] - SET = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: CH15_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `CH15` writer - Channel 15 enable set register. Writing '0' has no effect"] -pub type CH15_W<'a, const O: u8> = crate::BitWriter1S<'a, u32, CHENSET_SPEC, CH15_AW, O>; -impl<'a, const O: u8> CH15_W<'a, O> { - #[doc = "Write: Enable channel"] - #[inline(always)] - pub fn set(self) -> &'a mut W { - self.variant(CH15_AW::SET) - } -} -#[doc = "Field `CH16` reader - Channel 16 enable set register. Writing '0' has no effect"] -pub type CH16_R = crate::BitReader; -#[doc = "Channel 16 enable set register. Writing '0' has no effect\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum CH16_A { - #[doc = "0: Read: channel disabled"] - DISABLED = 0, - #[doc = "1: Read: channel enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: CH16_A) -> Self { - variant as u8 != 0 - } -} -impl CH16_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> CH16_A { - match self.bits { - false => CH16_A::DISABLED, - true => CH16_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == CH16_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == CH16_A::ENABLED - } -} -#[doc = "Channel 16 enable set register. Writing '0' has no effect\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum CH16_AW { - #[doc = "1: Write: Enable channel"] - SET = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: CH16_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `CH16` writer - Channel 16 enable set register. Writing '0' has no effect"] -pub type CH16_W<'a, const O: u8> = crate::BitWriter1S<'a, u32, CHENSET_SPEC, CH16_AW, O>; -impl<'a, const O: u8> CH16_W<'a, O> { - #[doc = "Write: Enable channel"] - #[inline(always)] - pub fn set(self) -> &'a mut W { - self.variant(CH16_AW::SET) - } -} -#[doc = "Field `CH17` reader - Channel 17 enable set register. Writing '0' has no effect"] -pub type CH17_R = crate::BitReader; -#[doc = "Channel 17 enable set register. Writing '0' has no effect\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum CH17_A { - #[doc = "0: Read: channel disabled"] - DISABLED = 0, - #[doc = "1: Read: channel enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: CH17_A) -> Self { - variant as u8 != 0 - } -} -impl CH17_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> CH17_A { - match self.bits { - false => CH17_A::DISABLED, - true => CH17_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == CH17_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == CH17_A::ENABLED - } -} -#[doc = "Channel 17 enable set register. Writing '0' has no effect\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum CH17_AW { - #[doc = "1: Write: Enable channel"] - SET = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: CH17_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `CH17` writer - Channel 17 enable set register. Writing '0' has no effect"] -pub type CH17_W<'a, const O: u8> = crate::BitWriter1S<'a, u32, CHENSET_SPEC, CH17_AW, O>; -impl<'a, const O: u8> CH17_W<'a, O> { - #[doc = "Write: Enable channel"] - #[inline(always)] - pub fn set(self) -> &'a mut W { - self.variant(CH17_AW::SET) - } -} -#[doc = "Field `CH18` reader - Channel 18 enable set register. Writing '0' has no effect"] -pub type CH18_R = crate::BitReader; -#[doc = "Channel 18 enable set register. Writing '0' has no effect\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum CH18_A { - #[doc = "0: Read: channel disabled"] - DISABLED = 0, - #[doc = "1: Read: channel enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: CH18_A) -> Self { - variant as u8 != 0 - } -} -impl CH18_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> CH18_A { - match self.bits { - false => CH18_A::DISABLED, - true => CH18_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == CH18_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == CH18_A::ENABLED - } -} -#[doc = "Channel 18 enable set register. Writing '0' has no effect\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum CH18_AW { - #[doc = "1: Write: Enable channel"] - SET = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: CH18_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `CH18` writer - Channel 18 enable set register. Writing '0' has no effect"] -pub type CH18_W<'a, const O: u8> = crate::BitWriter1S<'a, u32, CHENSET_SPEC, CH18_AW, O>; -impl<'a, const O: u8> CH18_W<'a, O> { - #[doc = "Write: Enable channel"] - #[inline(always)] - pub fn set(self) -> &'a mut W { - self.variant(CH18_AW::SET) - } -} -#[doc = "Field `CH19` reader - Channel 19 enable set register. Writing '0' has no effect"] -pub type CH19_R = crate::BitReader; -#[doc = "Channel 19 enable set register. Writing '0' has no effect\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum CH19_A { - #[doc = "0: Read: channel disabled"] - DISABLED = 0, - #[doc = "1: Read: channel enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: CH19_A) -> Self { - variant as u8 != 0 - } -} -impl CH19_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> CH19_A { - match self.bits { - false => CH19_A::DISABLED, - true => CH19_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == CH19_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == CH19_A::ENABLED - } -} -#[doc = "Channel 19 enable set register. Writing '0' has no effect\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum CH19_AW { - #[doc = "1: Write: Enable channel"] - SET = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: CH19_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `CH19` writer - Channel 19 enable set register. Writing '0' has no effect"] -pub type CH19_W<'a, const O: u8> = crate::BitWriter1S<'a, u32, CHENSET_SPEC, CH19_AW, O>; -impl<'a, const O: u8> CH19_W<'a, O> { - #[doc = "Write: Enable channel"] - #[inline(always)] - pub fn set(self) -> &'a mut W { - self.variant(CH19_AW::SET) - } -} -#[doc = "Field `CH20` reader - Channel 20 enable set register. Writing '0' has no effect"] -pub type CH20_R = crate::BitReader; -#[doc = "Channel 20 enable set register. Writing '0' has no effect\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum CH20_A { - #[doc = "0: Read: channel disabled"] - DISABLED = 0, - #[doc = "1: Read: channel enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: CH20_A) -> Self { - variant as u8 != 0 - } -} -impl CH20_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> CH20_A { - match self.bits { - false => CH20_A::DISABLED, - true => CH20_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == CH20_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == CH20_A::ENABLED - } -} -#[doc = "Channel 20 enable set register. Writing '0' has no effect\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum CH20_AW { - #[doc = "1: Write: Enable channel"] - SET = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: CH20_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `CH20` writer - Channel 20 enable set register. Writing '0' has no effect"] -pub type CH20_W<'a, const O: u8> = crate::BitWriter1S<'a, u32, CHENSET_SPEC, CH20_AW, O>; -impl<'a, const O: u8> CH20_W<'a, O> { - #[doc = "Write: Enable channel"] - #[inline(always)] - pub fn set(self) -> &'a mut W { - self.variant(CH20_AW::SET) - } -} -#[doc = "Field `CH21` reader - Channel 21 enable set register. Writing '0' has no effect"] -pub type CH21_R = crate::BitReader; -#[doc = "Channel 21 enable set register. Writing '0' has no effect\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum CH21_A { - #[doc = "0: Read: channel disabled"] - DISABLED = 0, - #[doc = "1: Read: channel enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: CH21_A) -> Self { - variant as u8 != 0 - } -} -impl CH21_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> CH21_A { - match self.bits { - false => CH21_A::DISABLED, - true => CH21_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == CH21_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == CH21_A::ENABLED - } -} -#[doc = "Channel 21 enable set register. Writing '0' has no effect\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum CH21_AW { - #[doc = "1: Write: Enable channel"] - SET = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: CH21_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `CH21` writer - Channel 21 enable set register. Writing '0' has no effect"] -pub type CH21_W<'a, const O: u8> = crate::BitWriter1S<'a, u32, CHENSET_SPEC, CH21_AW, O>; -impl<'a, const O: u8> CH21_W<'a, O> { - #[doc = "Write: Enable channel"] - #[inline(always)] - pub fn set(self) -> &'a mut W { - self.variant(CH21_AW::SET) - } -} -#[doc = "Field `CH22` reader - Channel 22 enable set register. Writing '0' has no effect"] -pub type CH22_R = crate::BitReader; -#[doc = "Channel 22 enable set register. Writing '0' has no effect\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum CH22_A { - #[doc = "0: Read: channel disabled"] - DISABLED = 0, - #[doc = "1: Read: channel enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: CH22_A) -> Self { - variant as u8 != 0 - } -} -impl CH22_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> CH22_A { - match self.bits { - false => CH22_A::DISABLED, - true => CH22_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == CH22_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == CH22_A::ENABLED - } -} -#[doc = "Channel 22 enable set register. Writing '0' has no effect\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum CH22_AW { - #[doc = "1: Write: Enable channel"] - SET = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: CH22_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `CH22` writer - Channel 22 enable set register. Writing '0' has no effect"] -pub type CH22_W<'a, const O: u8> = crate::BitWriter1S<'a, u32, CHENSET_SPEC, CH22_AW, O>; -impl<'a, const O: u8> CH22_W<'a, O> { - #[doc = "Write: Enable channel"] - #[inline(always)] - pub fn set(self) -> &'a mut W { - self.variant(CH22_AW::SET) - } -} -#[doc = "Field `CH23` reader - Channel 23 enable set register. Writing '0' has no effect"] -pub type CH23_R = crate::BitReader; -#[doc = "Channel 23 enable set register. Writing '0' has no effect\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum CH23_A { - #[doc = "0: Read: channel disabled"] - DISABLED = 0, - #[doc = "1: Read: channel enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: CH23_A) -> Self { - variant as u8 != 0 - } -} -impl CH23_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> CH23_A { - match self.bits { - false => CH23_A::DISABLED, - true => CH23_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == CH23_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == CH23_A::ENABLED - } -} -#[doc = "Channel 23 enable set register. Writing '0' has no effect\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum CH23_AW { - #[doc = "1: Write: Enable channel"] - SET = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: CH23_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `CH23` writer - Channel 23 enable set register. Writing '0' has no effect"] -pub type CH23_W<'a, const O: u8> = crate::BitWriter1S<'a, u32, CHENSET_SPEC, CH23_AW, O>; -impl<'a, const O: u8> CH23_W<'a, O> { - #[doc = "Write: Enable channel"] - #[inline(always)] - pub fn set(self) -> &'a mut W { - self.variant(CH23_AW::SET) - } -} -#[doc = "Field `CH24` reader - Channel 24 enable set register. Writing '0' has no effect"] -pub type CH24_R = crate::BitReader; -#[doc = "Channel 24 enable set register. Writing '0' has no effect\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum CH24_A { - #[doc = "0: Read: channel disabled"] - DISABLED = 0, - #[doc = "1: Read: channel enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: CH24_A) -> Self { - variant as u8 != 0 - } -} -impl CH24_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> CH24_A { - match self.bits { - false => CH24_A::DISABLED, - true => CH24_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == CH24_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == CH24_A::ENABLED - } -} -#[doc = "Channel 24 enable set register. Writing '0' has no effect\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum CH24_AW { - #[doc = "1: Write: Enable channel"] - SET = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: CH24_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `CH24` writer - Channel 24 enable set register. Writing '0' has no effect"] -pub type CH24_W<'a, const O: u8> = crate::BitWriter1S<'a, u32, CHENSET_SPEC, CH24_AW, O>; -impl<'a, const O: u8> CH24_W<'a, O> { - #[doc = "Write: Enable channel"] - #[inline(always)] - pub fn set(self) -> &'a mut W { - self.variant(CH24_AW::SET) - } -} -#[doc = "Field `CH25` reader - Channel 25 enable set register. Writing '0' has no effect"] -pub type CH25_R = crate::BitReader; -#[doc = "Channel 25 enable set register. Writing '0' has no effect\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum CH25_A { - #[doc = "0: Read: channel disabled"] - DISABLED = 0, - #[doc = "1: Read: channel enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: CH25_A) -> Self { - variant as u8 != 0 - } -} -impl CH25_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> CH25_A { - match self.bits { - false => CH25_A::DISABLED, - true => CH25_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == CH25_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == CH25_A::ENABLED - } -} -#[doc = "Channel 25 enable set register. Writing '0' has no effect\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum CH25_AW { - #[doc = "1: Write: Enable channel"] - SET = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: CH25_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `CH25` writer - Channel 25 enable set register. Writing '0' has no effect"] -pub type CH25_W<'a, const O: u8> = crate::BitWriter1S<'a, u32, CHENSET_SPEC, CH25_AW, O>; -impl<'a, const O: u8> CH25_W<'a, O> { - #[doc = "Write: Enable channel"] - #[inline(always)] - pub fn set(self) -> &'a mut W { - self.variant(CH25_AW::SET) - } -} -#[doc = "Field `CH26` reader - Channel 26 enable set register. Writing '0' has no effect"] -pub type CH26_R = crate::BitReader; -#[doc = "Channel 26 enable set register. Writing '0' has no effect\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum CH26_A { - #[doc = "0: Read: channel disabled"] - DISABLED = 0, - #[doc = "1: Read: channel enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: CH26_A) -> Self { - variant as u8 != 0 - } -} -impl CH26_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> CH26_A { - match self.bits { - false => CH26_A::DISABLED, - true => CH26_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == CH26_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == CH26_A::ENABLED - } -} -#[doc = "Channel 26 enable set register. Writing '0' has no effect\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum CH26_AW { - #[doc = "1: Write: Enable channel"] - SET = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: CH26_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `CH26` writer - Channel 26 enable set register. Writing '0' has no effect"] -pub type CH26_W<'a, const O: u8> = crate::BitWriter1S<'a, u32, CHENSET_SPEC, CH26_AW, O>; -impl<'a, const O: u8> CH26_W<'a, O> { - #[doc = "Write: Enable channel"] - #[inline(always)] - pub fn set(self) -> &'a mut W { - self.variant(CH26_AW::SET) - } -} -#[doc = "Field `CH27` reader - Channel 27 enable set register. Writing '0' has no effect"] -pub type CH27_R = crate::BitReader; -#[doc = "Channel 27 enable set register. Writing '0' has no effect\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum CH27_A { - #[doc = "0: Read: channel disabled"] - DISABLED = 0, - #[doc = "1: Read: channel enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: CH27_A) -> Self { - variant as u8 != 0 - } -} -impl CH27_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> CH27_A { - match self.bits { - false => CH27_A::DISABLED, - true => CH27_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == CH27_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == CH27_A::ENABLED - } -} -#[doc = "Channel 27 enable set register. Writing '0' has no effect\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum CH27_AW { - #[doc = "1: Write: Enable channel"] - SET = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: CH27_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `CH27` writer - Channel 27 enable set register. Writing '0' has no effect"] -pub type CH27_W<'a, const O: u8> = crate::BitWriter1S<'a, u32, CHENSET_SPEC, CH27_AW, O>; -impl<'a, const O: u8> CH27_W<'a, O> { - #[doc = "Write: Enable channel"] - #[inline(always)] - pub fn set(self) -> &'a mut W { - self.variant(CH27_AW::SET) - } -} -#[doc = "Field `CH28` reader - Channel 28 enable set register. Writing '0' has no effect"] -pub type CH28_R = crate::BitReader; -#[doc = "Channel 28 enable set register. Writing '0' has no effect\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum CH28_A { - #[doc = "0: Read: channel disabled"] - DISABLED = 0, - #[doc = "1: Read: channel enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: CH28_A) -> Self { - variant as u8 != 0 - } -} -impl CH28_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> CH28_A { - match self.bits { - false => CH28_A::DISABLED, - true => CH28_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == CH28_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == CH28_A::ENABLED - } -} -#[doc = "Channel 28 enable set register. Writing '0' has no effect\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum CH28_AW { - #[doc = "1: Write: Enable channel"] - SET = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: CH28_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `CH28` writer - Channel 28 enable set register. Writing '0' has no effect"] -pub type CH28_W<'a, const O: u8> = crate::BitWriter1S<'a, u32, CHENSET_SPEC, CH28_AW, O>; -impl<'a, const O: u8> CH28_W<'a, O> { - #[doc = "Write: Enable channel"] - #[inline(always)] - pub fn set(self) -> &'a mut W { - self.variant(CH28_AW::SET) - } -} -#[doc = "Field `CH29` reader - Channel 29 enable set register. Writing '0' has no effect"] -pub type CH29_R = crate::BitReader; -#[doc = "Channel 29 enable set register. Writing '0' has no effect\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum CH29_A { - #[doc = "0: Read: channel disabled"] - DISABLED = 0, - #[doc = "1: Read: channel enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: CH29_A) -> Self { - variant as u8 != 0 - } -} -impl CH29_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> CH29_A { - match self.bits { - false => CH29_A::DISABLED, - true => CH29_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == CH29_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == CH29_A::ENABLED - } -} -#[doc = "Channel 29 enable set register. Writing '0' has no effect\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum CH29_AW { - #[doc = "1: Write: Enable channel"] - SET = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: CH29_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `CH29` writer - Channel 29 enable set register. Writing '0' has no effect"] -pub type CH29_W<'a, const O: u8> = crate::BitWriter1S<'a, u32, CHENSET_SPEC, CH29_AW, O>; -impl<'a, const O: u8> CH29_W<'a, O> { - #[doc = "Write: Enable channel"] - #[inline(always)] - pub fn set(self) -> &'a mut W { - self.variant(CH29_AW::SET) - } -} -#[doc = "Field `CH30` reader - Channel 30 enable set register. Writing '0' has no effect"] -pub type CH30_R = crate::BitReader; -#[doc = "Channel 30 enable set register. Writing '0' has no effect\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum CH30_A { - #[doc = "0: Read: channel disabled"] - DISABLED = 0, - #[doc = "1: Read: channel enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: CH30_A) -> Self { - variant as u8 != 0 - } -} -impl CH30_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> CH30_A { - match self.bits { - false => CH30_A::DISABLED, - true => CH30_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == CH30_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == CH30_A::ENABLED - } -} -#[doc = "Channel 30 enable set register. Writing '0' has no effect\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum CH30_AW { - #[doc = "1: Write: Enable channel"] - SET = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: CH30_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `CH30` writer - Channel 30 enable set register. Writing '0' has no effect"] -pub type CH30_W<'a, const O: u8> = crate::BitWriter1S<'a, u32, CHENSET_SPEC, CH30_AW, O>; -impl<'a, const O: u8> CH30_W<'a, O> { - #[doc = "Write: Enable channel"] - #[inline(always)] - pub fn set(self) -> &'a mut W { - self.variant(CH30_AW::SET) - } -} -#[doc = "Field `CH31` reader - Channel 31 enable set register. Writing '0' has no effect"] -pub type CH31_R = crate::BitReader; -#[doc = "Channel 31 enable set register. Writing '0' has no effect\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum CH31_A { - #[doc = "0: Read: channel disabled"] - DISABLED = 0, - #[doc = "1: Read: channel enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: CH31_A) -> Self { - variant as u8 != 0 - } -} -impl CH31_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> CH31_A { - match self.bits { - false => CH31_A::DISABLED, - true => CH31_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == CH31_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == CH31_A::ENABLED - } -} -#[doc = "Channel 31 enable set register. Writing '0' has no effect\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum CH31_AW { - #[doc = "1: Write: Enable channel"] - SET = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: CH31_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `CH31` writer - Channel 31 enable set register. Writing '0' has no effect"] -pub type CH31_W<'a, const O: u8> = crate::BitWriter1S<'a, u32, CHENSET_SPEC, CH31_AW, O>; -impl<'a, const O: u8> CH31_W<'a, O> { - #[doc = "Write: Enable channel"] - #[inline(always)] - pub fn set(self) -> &'a mut W { - self.variant(CH31_AW::SET) - } -} -impl R { - #[doc = "Bit 0 - Channel 0 enable set register. Writing '0' has no effect"] - #[inline(always)] - pub fn ch0(&self) -> CH0_R { - CH0_R::new((self.bits & 1) != 0) - } - #[doc = "Bit 1 - Channel 1 enable set register. Writing '0' has no effect"] - #[inline(always)] - pub fn ch1(&self) -> CH1_R { - CH1_R::new(((self.bits >> 1) & 1) != 0) - } - #[doc = "Bit 2 - Channel 2 enable set register. Writing '0' has no effect"] - #[inline(always)] - pub fn ch2(&self) -> CH2_R { - CH2_R::new(((self.bits >> 2) & 1) != 0) - } - #[doc = "Bit 3 - Channel 3 enable set register. Writing '0' has no effect"] - #[inline(always)] - pub fn ch3(&self) -> CH3_R { - CH3_R::new(((self.bits >> 3) & 1) != 0) - } - #[doc = "Bit 4 - Channel 4 enable set register. Writing '0' has no effect"] - #[inline(always)] - pub fn ch4(&self) -> CH4_R { - CH4_R::new(((self.bits >> 4) & 1) != 0) - } - #[doc = "Bit 5 - Channel 5 enable set register. Writing '0' has no effect"] - #[inline(always)] - pub fn ch5(&self) -> CH5_R { - CH5_R::new(((self.bits >> 5) & 1) != 0) - } - #[doc = "Bit 6 - Channel 6 enable set register. Writing '0' has no effect"] - #[inline(always)] - pub fn ch6(&self) -> CH6_R { - CH6_R::new(((self.bits >> 6) & 1) != 0) - } - #[doc = "Bit 7 - Channel 7 enable set register. Writing '0' has no effect"] - #[inline(always)] - pub fn ch7(&self) -> CH7_R { - CH7_R::new(((self.bits >> 7) & 1) != 0) - } - #[doc = "Bit 8 - Channel 8 enable set register. Writing '0' has no effect"] - #[inline(always)] - pub fn ch8(&self) -> CH8_R { - CH8_R::new(((self.bits >> 8) & 1) != 0) - } - #[doc = "Bit 9 - Channel 9 enable set register. Writing '0' has no effect"] - #[inline(always)] - pub fn ch9(&self) -> CH9_R { - CH9_R::new(((self.bits >> 9) & 1) != 0) - } - #[doc = "Bit 10 - Channel 10 enable set register. Writing '0' has no effect"] - #[inline(always)] - pub fn ch10(&self) -> CH10_R { - CH10_R::new(((self.bits >> 10) & 1) != 0) - } - #[doc = "Bit 11 - Channel 11 enable set register. Writing '0' has no effect"] - #[inline(always)] - pub fn ch11(&self) -> CH11_R { - CH11_R::new(((self.bits >> 11) & 1) != 0) - } - #[doc = "Bit 12 - Channel 12 enable set register. Writing '0' has no effect"] - #[inline(always)] - pub fn ch12(&self) -> CH12_R { - CH12_R::new(((self.bits >> 12) & 1) != 0) - } - #[doc = "Bit 13 - Channel 13 enable set register. Writing '0' has no effect"] - #[inline(always)] - pub fn ch13(&self) -> CH13_R { - CH13_R::new(((self.bits >> 13) & 1) != 0) - } - #[doc = "Bit 14 - Channel 14 enable set register. Writing '0' has no effect"] - #[inline(always)] - pub fn ch14(&self) -> CH14_R { - CH14_R::new(((self.bits >> 14) & 1) != 0) - } - #[doc = "Bit 15 - Channel 15 enable set register. Writing '0' has no effect"] - #[inline(always)] - pub fn ch15(&self) -> CH15_R { - CH15_R::new(((self.bits >> 15) & 1) != 0) - } - #[doc = "Bit 16 - Channel 16 enable set register. Writing '0' has no effect"] - #[inline(always)] - pub fn ch16(&self) -> CH16_R { - CH16_R::new(((self.bits >> 16) & 1) != 0) - } - #[doc = "Bit 17 - Channel 17 enable set register. Writing '0' has no effect"] - #[inline(always)] - pub fn ch17(&self) -> CH17_R { - CH17_R::new(((self.bits >> 17) & 1) != 0) - } - #[doc = "Bit 18 - Channel 18 enable set register. Writing '0' has no effect"] - #[inline(always)] - pub fn ch18(&self) -> CH18_R { - CH18_R::new(((self.bits >> 18) & 1) != 0) - } - #[doc = "Bit 19 - Channel 19 enable set register. Writing '0' has no effect"] - #[inline(always)] - pub fn ch19(&self) -> CH19_R { - CH19_R::new(((self.bits >> 19) & 1) != 0) - } - #[doc = "Bit 20 - Channel 20 enable set register. Writing '0' has no effect"] - #[inline(always)] - pub fn ch20(&self) -> CH20_R { - CH20_R::new(((self.bits >> 20) & 1) != 0) - } - #[doc = "Bit 21 - Channel 21 enable set register. Writing '0' has no effect"] - #[inline(always)] - pub fn ch21(&self) -> CH21_R { - CH21_R::new(((self.bits >> 21) & 1) != 0) - } - #[doc = "Bit 22 - Channel 22 enable set register. Writing '0' has no effect"] - #[inline(always)] - pub fn ch22(&self) -> CH22_R { - CH22_R::new(((self.bits >> 22) & 1) != 0) - } - #[doc = "Bit 23 - Channel 23 enable set register. Writing '0' has no effect"] - #[inline(always)] - pub fn ch23(&self) -> CH23_R { - CH23_R::new(((self.bits >> 23) & 1) != 0) - } - #[doc = "Bit 24 - Channel 24 enable set register. Writing '0' has no effect"] - #[inline(always)] - pub fn ch24(&self) -> CH24_R { - CH24_R::new(((self.bits >> 24) & 1) != 0) - } - #[doc = "Bit 25 - Channel 25 enable set register. Writing '0' has no effect"] - #[inline(always)] - pub fn ch25(&self) -> CH25_R { - CH25_R::new(((self.bits >> 25) & 1) != 0) - } - #[doc = "Bit 26 - Channel 26 enable set register. Writing '0' has no effect"] - #[inline(always)] - pub fn ch26(&self) -> CH26_R { - CH26_R::new(((self.bits >> 26) & 1) != 0) - } - #[doc = "Bit 27 - Channel 27 enable set register. Writing '0' has no effect"] - #[inline(always)] - pub fn ch27(&self) -> CH27_R { - CH27_R::new(((self.bits >> 27) & 1) != 0) - } - #[doc = "Bit 28 - Channel 28 enable set register. Writing '0' has no effect"] - #[inline(always)] - pub fn ch28(&self) -> CH28_R { - CH28_R::new(((self.bits >> 28) & 1) != 0) - } - #[doc = "Bit 29 - Channel 29 enable set register. Writing '0' has no effect"] - #[inline(always)] - pub fn ch29(&self) -> CH29_R { - CH29_R::new(((self.bits >> 29) & 1) != 0) - } - #[doc = "Bit 30 - Channel 30 enable set register. Writing '0' has no effect"] - #[inline(always)] - pub fn ch30(&self) -> CH30_R { - CH30_R::new(((self.bits >> 30) & 1) != 0) - } - #[doc = "Bit 31 - Channel 31 enable set register. Writing '0' has no effect"] - #[inline(always)] - pub fn ch31(&self) -> CH31_R { - CH31_R::new(((self.bits >> 31) & 1) != 0) - } -} -impl W { - #[doc = "Bit 0 - Channel 0 enable set register. Writing '0' has no effect"] - #[inline(always)] - #[must_use] - pub fn ch0(&mut self) -> CH0_W<0> { - CH0_W::new(self) - } - #[doc = "Bit 1 - Channel 1 enable set register. Writing '0' has no effect"] - #[inline(always)] - #[must_use] - pub fn ch1(&mut self) -> CH1_W<1> { - CH1_W::new(self) - } - #[doc = "Bit 2 - Channel 2 enable set register. Writing '0' has no effect"] - #[inline(always)] - #[must_use] - pub fn ch2(&mut self) -> CH2_W<2> { - CH2_W::new(self) - } - #[doc = "Bit 3 - Channel 3 enable set register. Writing '0' has no effect"] - #[inline(always)] - #[must_use] - pub fn ch3(&mut self) -> CH3_W<3> { - CH3_W::new(self) - } - #[doc = "Bit 4 - Channel 4 enable set register. Writing '0' has no effect"] - #[inline(always)] - #[must_use] - pub fn ch4(&mut self) -> CH4_W<4> { - CH4_W::new(self) - } - #[doc = "Bit 5 - Channel 5 enable set register. Writing '0' has no effect"] - #[inline(always)] - #[must_use] - pub fn ch5(&mut self) -> CH5_W<5> { - CH5_W::new(self) - } - #[doc = "Bit 6 - Channel 6 enable set register. Writing '0' has no effect"] - #[inline(always)] - #[must_use] - pub fn ch6(&mut self) -> CH6_W<6> { - CH6_W::new(self) - } - #[doc = "Bit 7 - Channel 7 enable set register. Writing '0' has no effect"] - #[inline(always)] - #[must_use] - pub fn ch7(&mut self) -> CH7_W<7> { - CH7_W::new(self) - } - #[doc = "Bit 8 - Channel 8 enable set register. Writing '0' has no effect"] - #[inline(always)] - #[must_use] - pub fn ch8(&mut self) -> CH8_W<8> { - CH8_W::new(self) - } - #[doc = "Bit 9 - Channel 9 enable set register. Writing '0' has no effect"] - #[inline(always)] - #[must_use] - pub fn ch9(&mut self) -> CH9_W<9> { - CH9_W::new(self) - } - #[doc = "Bit 10 - Channel 10 enable set register. Writing '0' has no effect"] - #[inline(always)] - #[must_use] - pub fn ch10(&mut self) -> CH10_W<10> { - CH10_W::new(self) - } - #[doc = "Bit 11 - Channel 11 enable set register. Writing '0' has no effect"] - #[inline(always)] - #[must_use] - pub fn ch11(&mut self) -> CH11_W<11> { - CH11_W::new(self) - } - #[doc = "Bit 12 - Channel 12 enable set register. Writing '0' has no effect"] - #[inline(always)] - #[must_use] - pub fn ch12(&mut self) -> CH12_W<12> { - CH12_W::new(self) - } - #[doc = "Bit 13 - Channel 13 enable set register. Writing '0' has no effect"] - #[inline(always)] - #[must_use] - pub fn ch13(&mut self) -> CH13_W<13> { - CH13_W::new(self) - } - #[doc = "Bit 14 - Channel 14 enable set register. Writing '0' has no effect"] - #[inline(always)] - #[must_use] - pub fn ch14(&mut self) -> CH14_W<14> { - CH14_W::new(self) - } - #[doc = "Bit 15 - Channel 15 enable set register. Writing '0' has no effect"] - #[inline(always)] - #[must_use] - pub fn ch15(&mut self) -> CH15_W<15> { - CH15_W::new(self) - } - #[doc = "Bit 16 - Channel 16 enable set register. Writing '0' has no effect"] - #[inline(always)] - #[must_use] - pub fn ch16(&mut self) -> CH16_W<16> { - CH16_W::new(self) - } - #[doc = "Bit 17 - Channel 17 enable set register. Writing '0' has no effect"] - #[inline(always)] - #[must_use] - pub fn ch17(&mut self) -> CH17_W<17> { - CH17_W::new(self) - } - #[doc = "Bit 18 - Channel 18 enable set register. Writing '0' has no effect"] - #[inline(always)] - #[must_use] - pub fn ch18(&mut self) -> CH18_W<18> { - CH18_W::new(self) - } - #[doc = "Bit 19 - Channel 19 enable set register. Writing '0' has no effect"] - #[inline(always)] - #[must_use] - pub fn ch19(&mut self) -> CH19_W<19> { - CH19_W::new(self) - } - #[doc = "Bit 20 - Channel 20 enable set register. Writing '0' has no effect"] - #[inline(always)] - #[must_use] - pub fn ch20(&mut self) -> CH20_W<20> { - CH20_W::new(self) - } - #[doc = "Bit 21 - Channel 21 enable set register. Writing '0' has no effect"] - #[inline(always)] - #[must_use] - pub fn ch21(&mut self) -> CH21_W<21> { - CH21_W::new(self) - } - #[doc = "Bit 22 - Channel 22 enable set register. Writing '0' has no effect"] - #[inline(always)] - #[must_use] - pub fn ch22(&mut self) -> CH22_W<22> { - CH22_W::new(self) - } - #[doc = "Bit 23 - Channel 23 enable set register. Writing '0' has no effect"] - #[inline(always)] - #[must_use] - pub fn ch23(&mut self) -> CH23_W<23> { - CH23_W::new(self) - } - #[doc = "Bit 24 - Channel 24 enable set register. Writing '0' has no effect"] - #[inline(always)] - #[must_use] - pub fn ch24(&mut self) -> CH24_W<24> { - CH24_W::new(self) - } - #[doc = "Bit 25 - Channel 25 enable set register. Writing '0' has no effect"] - #[inline(always)] - #[must_use] - pub fn ch25(&mut self) -> CH25_W<25> { - CH25_W::new(self) - } - #[doc = "Bit 26 - Channel 26 enable set register. Writing '0' has no effect"] - #[inline(always)] - #[must_use] - pub fn ch26(&mut self) -> CH26_W<26> { - CH26_W::new(self) - } - #[doc = "Bit 27 - Channel 27 enable set register. Writing '0' has no effect"] - #[inline(always)] - #[must_use] - pub fn ch27(&mut self) -> CH27_W<27> { - CH27_W::new(self) - } - #[doc = "Bit 28 - Channel 28 enable set register. Writing '0' has no effect"] - #[inline(always)] - #[must_use] - pub fn ch28(&mut self) -> CH28_W<28> { - CH28_W::new(self) - } - #[doc = "Bit 29 - Channel 29 enable set register. Writing '0' has no effect"] - #[inline(always)] - #[must_use] - pub fn ch29(&mut self) -> CH29_W<29> { - CH29_W::new(self) - } - #[doc = "Bit 30 - Channel 30 enable set register. Writing '0' has no effect"] - #[inline(always)] - #[must_use] - pub fn ch30(&mut self) -> CH30_W<30> { - CH30_W::new(self) - } - #[doc = "Bit 31 - Channel 31 enable set register. Writing '0' has no effect"] - #[inline(always)] - #[must_use] - pub fn ch31(&mut self) -> CH31_W<31> { - CH31_W::new(self) - } - #[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 = "Channel enable set register\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 [chenset](index.html) module"] -pub struct CHENSET_SPEC; -impl crate::RegisterSpec for CHENSET_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [chenset::R](R) reader structure"] -impl crate::Readable for CHENSET_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [chenset::W](W) writer structure"] -impl crate::Writable for CHENSET_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0xffff_ffff; -} -#[doc = "`reset()` method sets CHENSET to value 0"] -impl crate::Resettable for CHENSET_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/ppi/chg.rs b/down-the-stack/dk_pac/src/ppi/chg.rs deleted file mode 100644 index 43eccf4..0000000 --- a/down-the-stack/dk_pac/src/ppi/chg.rs +++ /dev/null @@ -1,2018 +0,0 @@ -#[doc = "Register `CHG[%s]` 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 `CHG[%s]` 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 `CH0` reader - Include or exclude channel 0"] -pub type CH0_R = crate::BitReader; -#[doc = "Include or exclude channel 0\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum CH0_A { - #[doc = "0: Exclude"] - EXCLUDED = 0, - #[doc = "1: Include"] - INCLUDED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: CH0_A) -> Self { - variant as u8 != 0 - } -} -impl CH0_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> CH0_A { - match self.bits { - false => CH0_A::EXCLUDED, - true => CH0_A::INCLUDED, - } - } - #[doc = "Checks if the value of the field is `EXCLUDED`"] - #[inline(always)] - pub fn is_excluded(&self) -> bool { - *self == CH0_A::EXCLUDED - } - #[doc = "Checks if the value of the field is `INCLUDED`"] - #[inline(always)] - pub fn is_included(&self) -> bool { - *self == CH0_A::INCLUDED - } -} -#[doc = "Field `CH0` writer - Include or exclude channel 0"] -pub type CH0_W<'a, const O: u8> = crate::BitWriter<'a, u32, CHG_SPEC, CH0_A, O>; -impl<'a, const O: u8> CH0_W<'a, O> { - #[doc = "Exclude"] - #[inline(always)] - pub fn excluded(self) -> &'a mut W { - self.variant(CH0_A::EXCLUDED) - } - #[doc = "Include"] - #[inline(always)] - pub fn included(self) -> &'a mut W { - self.variant(CH0_A::INCLUDED) - } -} -#[doc = "Field `CH1` reader - Include or exclude channel 1"] -pub type CH1_R = crate::BitReader; -#[doc = "Include or exclude channel 1\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum CH1_A { - #[doc = "0: Exclude"] - EXCLUDED = 0, - #[doc = "1: Include"] - INCLUDED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: CH1_A) -> Self { - variant as u8 != 0 - } -} -impl CH1_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> CH1_A { - match self.bits { - false => CH1_A::EXCLUDED, - true => CH1_A::INCLUDED, - } - } - #[doc = "Checks if the value of the field is `EXCLUDED`"] - #[inline(always)] - pub fn is_excluded(&self) -> bool { - *self == CH1_A::EXCLUDED - } - #[doc = "Checks if the value of the field is `INCLUDED`"] - #[inline(always)] - pub fn is_included(&self) -> bool { - *self == CH1_A::INCLUDED - } -} -#[doc = "Field `CH1` writer - Include or exclude channel 1"] -pub type CH1_W<'a, const O: u8> = crate::BitWriter<'a, u32, CHG_SPEC, CH1_A, O>; -impl<'a, const O: u8> CH1_W<'a, O> { - #[doc = "Exclude"] - #[inline(always)] - pub fn excluded(self) -> &'a mut W { - self.variant(CH1_A::EXCLUDED) - } - #[doc = "Include"] - #[inline(always)] - pub fn included(self) -> &'a mut W { - self.variant(CH1_A::INCLUDED) - } -} -#[doc = "Field `CH2` reader - Include or exclude channel 2"] -pub type CH2_R = crate::BitReader; -#[doc = "Include or exclude channel 2\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum CH2_A { - #[doc = "0: Exclude"] - EXCLUDED = 0, - #[doc = "1: Include"] - INCLUDED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: CH2_A) -> Self { - variant as u8 != 0 - } -} -impl CH2_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> CH2_A { - match self.bits { - false => CH2_A::EXCLUDED, - true => CH2_A::INCLUDED, - } - } - #[doc = "Checks if the value of the field is `EXCLUDED`"] - #[inline(always)] - pub fn is_excluded(&self) -> bool { - *self == CH2_A::EXCLUDED - } - #[doc = "Checks if the value of the field is `INCLUDED`"] - #[inline(always)] - pub fn is_included(&self) -> bool { - *self == CH2_A::INCLUDED - } -} -#[doc = "Field `CH2` writer - Include or exclude channel 2"] -pub type CH2_W<'a, const O: u8> = crate::BitWriter<'a, u32, CHG_SPEC, CH2_A, O>; -impl<'a, const O: u8> CH2_W<'a, O> { - #[doc = "Exclude"] - #[inline(always)] - pub fn excluded(self) -> &'a mut W { - self.variant(CH2_A::EXCLUDED) - } - #[doc = "Include"] - #[inline(always)] - pub fn included(self) -> &'a mut W { - self.variant(CH2_A::INCLUDED) - } -} -#[doc = "Field `CH3` reader - Include or exclude channel 3"] -pub type CH3_R = crate::BitReader; -#[doc = "Include or exclude channel 3\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum CH3_A { - #[doc = "0: Exclude"] - EXCLUDED = 0, - #[doc = "1: Include"] - INCLUDED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: CH3_A) -> Self { - variant as u8 != 0 - } -} -impl CH3_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> CH3_A { - match self.bits { - false => CH3_A::EXCLUDED, - true => CH3_A::INCLUDED, - } - } - #[doc = "Checks if the value of the field is `EXCLUDED`"] - #[inline(always)] - pub fn is_excluded(&self) -> bool { - *self == CH3_A::EXCLUDED - } - #[doc = "Checks if the value of the field is `INCLUDED`"] - #[inline(always)] - pub fn is_included(&self) -> bool { - *self == CH3_A::INCLUDED - } -} -#[doc = "Field `CH3` writer - Include or exclude channel 3"] -pub type CH3_W<'a, const O: u8> = crate::BitWriter<'a, u32, CHG_SPEC, CH3_A, O>; -impl<'a, const O: u8> CH3_W<'a, O> { - #[doc = "Exclude"] - #[inline(always)] - pub fn excluded(self) -> &'a mut W { - self.variant(CH3_A::EXCLUDED) - } - #[doc = "Include"] - #[inline(always)] - pub fn included(self) -> &'a mut W { - self.variant(CH3_A::INCLUDED) - } -} -#[doc = "Field `CH4` reader - Include or exclude channel 4"] -pub type CH4_R = crate::BitReader; -#[doc = "Include or exclude channel 4\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum CH4_A { - #[doc = "0: Exclude"] - EXCLUDED = 0, - #[doc = "1: Include"] - INCLUDED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: CH4_A) -> Self { - variant as u8 != 0 - } -} -impl CH4_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> CH4_A { - match self.bits { - false => CH4_A::EXCLUDED, - true => CH4_A::INCLUDED, - } - } - #[doc = "Checks if the value of the field is `EXCLUDED`"] - #[inline(always)] - pub fn is_excluded(&self) -> bool { - *self == CH4_A::EXCLUDED - } - #[doc = "Checks if the value of the field is `INCLUDED`"] - #[inline(always)] - pub fn is_included(&self) -> bool { - *self == CH4_A::INCLUDED - } -} -#[doc = "Field `CH4` writer - Include or exclude channel 4"] -pub type CH4_W<'a, const O: u8> = crate::BitWriter<'a, u32, CHG_SPEC, CH4_A, O>; -impl<'a, const O: u8> CH4_W<'a, O> { - #[doc = "Exclude"] - #[inline(always)] - pub fn excluded(self) -> &'a mut W { - self.variant(CH4_A::EXCLUDED) - } - #[doc = "Include"] - #[inline(always)] - pub fn included(self) -> &'a mut W { - self.variant(CH4_A::INCLUDED) - } -} -#[doc = "Field `CH5` reader - Include or exclude channel 5"] -pub type CH5_R = crate::BitReader; -#[doc = "Include or exclude channel 5\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum CH5_A { - #[doc = "0: Exclude"] - EXCLUDED = 0, - #[doc = "1: Include"] - INCLUDED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: CH5_A) -> Self { - variant as u8 != 0 - } -} -impl CH5_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> CH5_A { - match self.bits { - false => CH5_A::EXCLUDED, - true => CH5_A::INCLUDED, - } - } - #[doc = "Checks if the value of the field is `EXCLUDED`"] - #[inline(always)] - pub fn is_excluded(&self) -> bool { - *self == CH5_A::EXCLUDED - } - #[doc = "Checks if the value of the field is `INCLUDED`"] - #[inline(always)] - pub fn is_included(&self) -> bool { - *self == CH5_A::INCLUDED - } -} -#[doc = "Field `CH5` writer - Include or exclude channel 5"] -pub type CH5_W<'a, const O: u8> = crate::BitWriter<'a, u32, CHG_SPEC, CH5_A, O>; -impl<'a, const O: u8> CH5_W<'a, O> { - #[doc = "Exclude"] - #[inline(always)] - pub fn excluded(self) -> &'a mut W { - self.variant(CH5_A::EXCLUDED) - } - #[doc = "Include"] - #[inline(always)] - pub fn included(self) -> &'a mut W { - self.variant(CH5_A::INCLUDED) - } -} -#[doc = "Field `CH6` reader - Include or exclude channel 6"] -pub type CH6_R = crate::BitReader; -#[doc = "Include or exclude channel 6\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum CH6_A { - #[doc = "0: Exclude"] - EXCLUDED = 0, - #[doc = "1: Include"] - INCLUDED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: CH6_A) -> Self { - variant as u8 != 0 - } -} -impl CH6_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> CH6_A { - match self.bits { - false => CH6_A::EXCLUDED, - true => CH6_A::INCLUDED, - } - } - #[doc = "Checks if the value of the field is `EXCLUDED`"] - #[inline(always)] - pub fn is_excluded(&self) -> bool { - *self == CH6_A::EXCLUDED - } - #[doc = "Checks if the value of the field is `INCLUDED`"] - #[inline(always)] - pub fn is_included(&self) -> bool { - *self == CH6_A::INCLUDED - } -} -#[doc = "Field `CH6` writer - Include or exclude channel 6"] -pub type CH6_W<'a, const O: u8> = crate::BitWriter<'a, u32, CHG_SPEC, CH6_A, O>; -impl<'a, const O: u8> CH6_W<'a, O> { - #[doc = "Exclude"] - #[inline(always)] - pub fn excluded(self) -> &'a mut W { - self.variant(CH6_A::EXCLUDED) - } - #[doc = "Include"] - #[inline(always)] - pub fn included(self) -> &'a mut W { - self.variant(CH6_A::INCLUDED) - } -} -#[doc = "Field `CH7` reader - Include or exclude channel 7"] -pub type CH7_R = crate::BitReader; -#[doc = "Include or exclude channel 7\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum CH7_A { - #[doc = "0: Exclude"] - EXCLUDED = 0, - #[doc = "1: Include"] - INCLUDED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: CH7_A) -> Self { - variant as u8 != 0 - } -} -impl CH7_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> CH7_A { - match self.bits { - false => CH7_A::EXCLUDED, - true => CH7_A::INCLUDED, - } - } - #[doc = "Checks if the value of the field is `EXCLUDED`"] - #[inline(always)] - pub fn is_excluded(&self) -> bool { - *self == CH7_A::EXCLUDED - } - #[doc = "Checks if the value of the field is `INCLUDED`"] - #[inline(always)] - pub fn is_included(&self) -> bool { - *self == CH7_A::INCLUDED - } -} -#[doc = "Field `CH7` writer - Include or exclude channel 7"] -pub type CH7_W<'a, const O: u8> = crate::BitWriter<'a, u32, CHG_SPEC, CH7_A, O>; -impl<'a, const O: u8> CH7_W<'a, O> { - #[doc = "Exclude"] - #[inline(always)] - pub fn excluded(self) -> &'a mut W { - self.variant(CH7_A::EXCLUDED) - } - #[doc = "Include"] - #[inline(always)] - pub fn included(self) -> &'a mut W { - self.variant(CH7_A::INCLUDED) - } -} -#[doc = "Field `CH8` reader - Include or exclude channel 8"] -pub type CH8_R = crate::BitReader; -#[doc = "Include or exclude channel 8\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum CH8_A { - #[doc = "0: Exclude"] - EXCLUDED = 0, - #[doc = "1: Include"] - INCLUDED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: CH8_A) -> Self { - variant as u8 != 0 - } -} -impl CH8_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> CH8_A { - match self.bits { - false => CH8_A::EXCLUDED, - true => CH8_A::INCLUDED, - } - } - #[doc = "Checks if the value of the field is `EXCLUDED`"] - #[inline(always)] - pub fn is_excluded(&self) -> bool { - *self == CH8_A::EXCLUDED - } - #[doc = "Checks if the value of the field is `INCLUDED`"] - #[inline(always)] - pub fn is_included(&self) -> bool { - *self == CH8_A::INCLUDED - } -} -#[doc = "Field `CH8` writer - Include or exclude channel 8"] -pub type CH8_W<'a, const O: u8> = crate::BitWriter<'a, u32, CHG_SPEC, CH8_A, O>; -impl<'a, const O: u8> CH8_W<'a, O> { - #[doc = "Exclude"] - #[inline(always)] - pub fn excluded(self) -> &'a mut W { - self.variant(CH8_A::EXCLUDED) - } - #[doc = "Include"] - #[inline(always)] - pub fn included(self) -> &'a mut W { - self.variant(CH8_A::INCLUDED) - } -} -#[doc = "Field `CH9` reader - Include or exclude channel 9"] -pub type CH9_R = crate::BitReader; -#[doc = "Include or exclude channel 9\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum CH9_A { - #[doc = "0: Exclude"] - EXCLUDED = 0, - #[doc = "1: Include"] - INCLUDED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: CH9_A) -> Self { - variant as u8 != 0 - } -} -impl CH9_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> CH9_A { - match self.bits { - false => CH9_A::EXCLUDED, - true => CH9_A::INCLUDED, - } - } - #[doc = "Checks if the value of the field is `EXCLUDED`"] - #[inline(always)] - pub fn is_excluded(&self) -> bool { - *self == CH9_A::EXCLUDED - } - #[doc = "Checks if the value of the field is `INCLUDED`"] - #[inline(always)] - pub fn is_included(&self) -> bool { - *self == CH9_A::INCLUDED - } -} -#[doc = "Field `CH9` writer - Include or exclude channel 9"] -pub type CH9_W<'a, const O: u8> = crate::BitWriter<'a, u32, CHG_SPEC, CH9_A, O>; -impl<'a, const O: u8> CH9_W<'a, O> { - #[doc = "Exclude"] - #[inline(always)] - pub fn excluded(self) -> &'a mut W { - self.variant(CH9_A::EXCLUDED) - } - #[doc = "Include"] - #[inline(always)] - pub fn included(self) -> &'a mut W { - self.variant(CH9_A::INCLUDED) - } -} -#[doc = "Field `CH10` reader - Include or exclude channel 10"] -pub type CH10_R = crate::BitReader; -#[doc = "Include or exclude channel 10\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum CH10_A { - #[doc = "0: Exclude"] - EXCLUDED = 0, - #[doc = "1: Include"] - INCLUDED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: CH10_A) -> Self { - variant as u8 != 0 - } -} -impl CH10_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> CH10_A { - match self.bits { - false => CH10_A::EXCLUDED, - true => CH10_A::INCLUDED, - } - } - #[doc = "Checks if the value of the field is `EXCLUDED`"] - #[inline(always)] - pub fn is_excluded(&self) -> bool { - *self == CH10_A::EXCLUDED - } - #[doc = "Checks if the value of the field is `INCLUDED`"] - #[inline(always)] - pub fn is_included(&self) -> bool { - *self == CH10_A::INCLUDED - } -} -#[doc = "Field `CH10` writer - Include or exclude channel 10"] -pub type CH10_W<'a, const O: u8> = crate::BitWriter<'a, u32, CHG_SPEC, CH10_A, O>; -impl<'a, const O: u8> CH10_W<'a, O> { - #[doc = "Exclude"] - #[inline(always)] - pub fn excluded(self) -> &'a mut W { - self.variant(CH10_A::EXCLUDED) - } - #[doc = "Include"] - #[inline(always)] - pub fn included(self) -> &'a mut W { - self.variant(CH10_A::INCLUDED) - } -} -#[doc = "Field `CH11` reader - Include or exclude channel 11"] -pub type CH11_R = crate::BitReader; -#[doc = "Include or exclude channel 11\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum CH11_A { - #[doc = "0: Exclude"] - EXCLUDED = 0, - #[doc = "1: Include"] - INCLUDED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: CH11_A) -> Self { - variant as u8 != 0 - } -} -impl CH11_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> CH11_A { - match self.bits { - false => CH11_A::EXCLUDED, - true => CH11_A::INCLUDED, - } - } - #[doc = "Checks if the value of the field is `EXCLUDED`"] - #[inline(always)] - pub fn is_excluded(&self) -> bool { - *self == CH11_A::EXCLUDED - } - #[doc = "Checks if the value of the field is `INCLUDED`"] - #[inline(always)] - pub fn is_included(&self) -> bool { - *self == CH11_A::INCLUDED - } -} -#[doc = "Field `CH11` writer - Include or exclude channel 11"] -pub type CH11_W<'a, const O: u8> = crate::BitWriter<'a, u32, CHG_SPEC, CH11_A, O>; -impl<'a, const O: u8> CH11_W<'a, O> { - #[doc = "Exclude"] - #[inline(always)] - pub fn excluded(self) -> &'a mut W { - self.variant(CH11_A::EXCLUDED) - } - #[doc = "Include"] - #[inline(always)] - pub fn included(self) -> &'a mut W { - self.variant(CH11_A::INCLUDED) - } -} -#[doc = "Field `CH12` reader - Include or exclude channel 12"] -pub type CH12_R = crate::BitReader; -#[doc = "Include or exclude channel 12\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum CH12_A { - #[doc = "0: Exclude"] - EXCLUDED = 0, - #[doc = "1: Include"] - INCLUDED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: CH12_A) -> Self { - variant as u8 != 0 - } -} -impl CH12_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> CH12_A { - match self.bits { - false => CH12_A::EXCLUDED, - true => CH12_A::INCLUDED, - } - } - #[doc = "Checks if the value of the field is `EXCLUDED`"] - #[inline(always)] - pub fn is_excluded(&self) -> bool { - *self == CH12_A::EXCLUDED - } - #[doc = "Checks if the value of the field is `INCLUDED`"] - #[inline(always)] - pub fn is_included(&self) -> bool { - *self == CH12_A::INCLUDED - } -} -#[doc = "Field `CH12` writer - Include or exclude channel 12"] -pub type CH12_W<'a, const O: u8> = crate::BitWriter<'a, u32, CHG_SPEC, CH12_A, O>; -impl<'a, const O: u8> CH12_W<'a, O> { - #[doc = "Exclude"] - #[inline(always)] - pub fn excluded(self) -> &'a mut W { - self.variant(CH12_A::EXCLUDED) - } - #[doc = "Include"] - #[inline(always)] - pub fn included(self) -> &'a mut W { - self.variant(CH12_A::INCLUDED) - } -} -#[doc = "Field `CH13` reader - Include or exclude channel 13"] -pub type CH13_R = crate::BitReader; -#[doc = "Include or exclude channel 13\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum CH13_A { - #[doc = "0: Exclude"] - EXCLUDED = 0, - #[doc = "1: Include"] - INCLUDED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: CH13_A) -> Self { - variant as u8 != 0 - } -} -impl CH13_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> CH13_A { - match self.bits { - false => CH13_A::EXCLUDED, - true => CH13_A::INCLUDED, - } - } - #[doc = "Checks if the value of the field is `EXCLUDED`"] - #[inline(always)] - pub fn is_excluded(&self) -> bool { - *self == CH13_A::EXCLUDED - } - #[doc = "Checks if the value of the field is `INCLUDED`"] - #[inline(always)] - pub fn is_included(&self) -> bool { - *self == CH13_A::INCLUDED - } -} -#[doc = "Field `CH13` writer - Include or exclude channel 13"] -pub type CH13_W<'a, const O: u8> = crate::BitWriter<'a, u32, CHG_SPEC, CH13_A, O>; -impl<'a, const O: u8> CH13_W<'a, O> { - #[doc = "Exclude"] - #[inline(always)] - pub fn excluded(self) -> &'a mut W { - self.variant(CH13_A::EXCLUDED) - } - #[doc = "Include"] - #[inline(always)] - pub fn included(self) -> &'a mut W { - self.variant(CH13_A::INCLUDED) - } -} -#[doc = "Field `CH14` reader - Include or exclude channel 14"] -pub type CH14_R = crate::BitReader; -#[doc = "Include or exclude channel 14\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum CH14_A { - #[doc = "0: Exclude"] - EXCLUDED = 0, - #[doc = "1: Include"] - INCLUDED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: CH14_A) -> Self { - variant as u8 != 0 - } -} -impl CH14_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> CH14_A { - match self.bits { - false => CH14_A::EXCLUDED, - true => CH14_A::INCLUDED, - } - } - #[doc = "Checks if the value of the field is `EXCLUDED`"] - #[inline(always)] - pub fn is_excluded(&self) -> bool { - *self == CH14_A::EXCLUDED - } - #[doc = "Checks if the value of the field is `INCLUDED`"] - #[inline(always)] - pub fn is_included(&self) -> bool { - *self == CH14_A::INCLUDED - } -} -#[doc = "Field `CH14` writer - Include or exclude channel 14"] -pub type CH14_W<'a, const O: u8> = crate::BitWriter<'a, u32, CHG_SPEC, CH14_A, O>; -impl<'a, const O: u8> CH14_W<'a, O> { - #[doc = "Exclude"] - #[inline(always)] - pub fn excluded(self) -> &'a mut W { - self.variant(CH14_A::EXCLUDED) - } - #[doc = "Include"] - #[inline(always)] - pub fn included(self) -> &'a mut W { - self.variant(CH14_A::INCLUDED) - } -} -#[doc = "Field `CH15` reader - Include or exclude channel 15"] -pub type CH15_R = crate::BitReader; -#[doc = "Include or exclude channel 15\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum CH15_A { - #[doc = "0: Exclude"] - EXCLUDED = 0, - #[doc = "1: Include"] - INCLUDED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: CH15_A) -> Self { - variant as u8 != 0 - } -} -impl CH15_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> CH15_A { - match self.bits { - false => CH15_A::EXCLUDED, - true => CH15_A::INCLUDED, - } - } - #[doc = "Checks if the value of the field is `EXCLUDED`"] - #[inline(always)] - pub fn is_excluded(&self) -> bool { - *self == CH15_A::EXCLUDED - } - #[doc = "Checks if the value of the field is `INCLUDED`"] - #[inline(always)] - pub fn is_included(&self) -> bool { - *self == CH15_A::INCLUDED - } -} -#[doc = "Field `CH15` writer - Include or exclude channel 15"] -pub type CH15_W<'a, const O: u8> = crate::BitWriter<'a, u32, CHG_SPEC, CH15_A, O>; -impl<'a, const O: u8> CH15_W<'a, O> { - #[doc = "Exclude"] - #[inline(always)] - pub fn excluded(self) -> &'a mut W { - self.variant(CH15_A::EXCLUDED) - } - #[doc = "Include"] - #[inline(always)] - pub fn included(self) -> &'a mut W { - self.variant(CH15_A::INCLUDED) - } -} -#[doc = "Field `CH16` reader - Include or exclude channel 16"] -pub type CH16_R = crate::BitReader; -#[doc = "Include or exclude channel 16\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum CH16_A { - #[doc = "0: Exclude"] - EXCLUDED = 0, - #[doc = "1: Include"] - INCLUDED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: CH16_A) -> Self { - variant as u8 != 0 - } -} -impl CH16_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> CH16_A { - match self.bits { - false => CH16_A::EXCLUDED, - true => CH16_A::INCLUDED, - } - } - #[doc = "Checks if the value of the field is `EXCLUDED`"] - #[inline(always)] - pub fn is_excluded(&self) -> bool { - *self == CH16_A::EXCLUDED - } - #[doc = "Checks if the value of the field is `INCLUDED`"] - #[inline(always)] - pub fn is_included(&self) -> bool { - *self == CH16_A::INCLUDED - } -} -#[doc = "Field `CH16` writer - Include or exclude channel 16"] -pub type CH16_W<'a, const O: u8> = crate::BitWriter<'a, u32, CHG_SPEC, CH16_A, O>; -impl<'a, const O: u8> CH16_W<'a, O> { - #[doc = "Exclude"] - #[inline(always)] - pub fn excluded(self) -> &'a mut W { - self.variant(CH16_A::EXCLUDED) - } - #[doc = "Include"] - #[inline(always)] - pub fn included(self) -> &'a mut W { - self.variant(CH16_A::INCLUDED) - } -} -#[doc = "Field `CH17` reader - Include or exclude channel 17"] -pub type CH17_R = crate::BitReader; -#[doc = "Include or exclude channel 17\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum CH17_A { - #[doc = "0: Exclude"] - EXCLUDED = 0, - #[doc = "1: Include"] - INCLUDED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: CH17_A) -> Self { - variant as u8 != 0 - } -} -impl CH17_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> CH17_A { - match self.bits { - false => CH17_A::EXCLUDED, - true => CH17_A::INCLUDED, - } - } - #[doc = "Checks if the value of the field is `EXCLUDED`"] - #[inline(always)] - pub fn is_excluded(&self) -> bool { - *self == CH17_A::EXCLUDED - } - #[doc = "Checks if the value of the field is `INCLUDED`"] - #[inline(always)] - pub fn is_included(&self) -> bool { - *self == CH17_A::INCLUDED - } -} -#[doc = "Field `CH17` writer - Include or exclude channel 17"] -pub type CH17_W<'a, const O: u8> = crate::BitWriter<'a, u32, CHG_SPEC, CH17_A, O>; -impl<'a, const O: u8> CH17_W<'a, O> { - #[doc = "Exclude"] - #[inline(always)] - pub fn excluded(self) -> &'a mut W { - self.variant(CH17_A::EXCLUDED) - } - #[doc = "Include"] - #[inline(always)] - pub fn included(self) -> &'a mut W { - self.variant(CH17_A::INCLUDED) - } -} -#[doc = "Field `CH18` reader - Include or exclude channel 18"] -pub type CH18_R = crate::BitReader; -#[doc = "Include or exclude channel 18\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum CH18_A { - #[doc = "0: Exclude"] - EXCLUDED = 0, - #[doc = "1: Include"] - INCLUDED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: CH18_A) -> Self { - variant as u8 != 0 - } -} -impl CH18_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> CH18_A { - match self.bits { - false => CH18_A::EXCLUDED, - true => CH18_A::INCLUDED, - } - } - #[doc = "Checks if the value of the field is `EXCLUDED`"] - #[inline(always)] - pub fn is_excluded(&self) -> bool { - *self == CH18_A::EXCLUDED - } - #[doc = "Checks if the value of the field is `INCLUDED`"] - #[inline(always)] - pub fn is_included(&self) -> bool { - *self == CH18_A::INCLUDED - } -} -#[doc = "Field `CH18` writer - Include or exclude channel 18"] -pub type CH18_W<'a, const O: u8> = crate::BitWriter<'a, u32, CHG_SPEC, CH18_A, O>; -impl<'a, const O: u8> CH18_W<'a, O> { - #[doc = "Exclude"] - #[inline(always)] - pub fn excluded(self) -> &'a mut W { - self.variant(CH18_A::EXCLUDED) - } - #[doc = "Include"] - #[inline(always)] - pub fn included(self) -> &'a mut W { - self.variant(CH18_A::INCLUDED) - } -} -#[doc = "Field `CH19` reader - Include or exclude channel 19"] -pub type CH19_R = crate::BitReader; -#[doc = "Include or exclude channel 19\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum CH19_A { - #[doc = "0: Exclude"] - EXCLUDED = 0, - #[doc = "1: Include"] - INCLUDED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: CH19_A) -> Self { - variant as u8 != 0 - } -} -impl CH19_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> CH19_A { - match self.bits { - false => CH19_A::EXCLUDED, - true => CH19_A::INCLUDED, - } - } - #[doc = "Checks if the value of the field is `EXCLUDED`"] - #[inline(always)] - pub fn is_excluded(&self) -> bool { - *self == CH19_A::EXCLUDED - } - #[doc = "Checks if the value of the field is `INCLUDED`"] - #[inline(always)] - pub fn is_included(&self) -> bool { - *self == CH19_A::INCLUDED - } -} -#[doc = "Field `CH19` writer - Include or exclude channel 19"] -pub type CH19_W<'a, const O: u8> = crate::BitWriter<'a, u32, CHG_SPEC, CH19_A, O>; -impl<'a, const O: u8> CH19_W<'a, O> { - #[doc = "Exclude"] - #[inline(always)] - pub fn excluded(self) -> &'a mut W { - self.variant(CH19_A::EXCLUDED) - } - #[doc = "Include"] - #[inline(always)] - pub fn included(self) -> &'a mut W { - self.variant(CH19_A::INCLUDED) - } -} -#[doc = "Field `CH20` reader - Include or exclude channel 20"] -pub type CH20_R = crate::BitReader; -#[doc = "Include or exclude channel 20\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum CH20_A { - #[doc = "0: Exclude"] - EXCLUDED = 0, - #[doc = "1: Include"] - INCLUDED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: CH20_A) -> Self { - variant as u8 != 0 - } -} -impl CH20_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> CH20_A { - match self.bits { - false => CH20_A::EXCLUDED, - true => CH20_A::INCLUDED, - } - } - #[doc = "Checks if the value of the field is `EXCLUDED`"] - #[inline(always)] - pub fn is_excluded(&self) -> bool { - *self == CH20_A::EXCLUDED - } - #[doc = "Checks if the value of the field is `INCLUDED`"] - #[inline(always)] - pub fn is_included(&self) -> bool { - *self == CH20_A::INCLUDED - } -} -#[doc = "Field `CH20` writer - Include or exclude channel 20"] -pub type CH20_W<'a, const O: u8> = crate::BitWriter<'a, u32, CHG_SPEC, CH20_A, O>; -impl<'a, const O: u8> CH20_W<'a, O> { - #[doc = "Exclude"] - #[inline(always)] - pub fn excluded(self) -> &'a mut W { - self.variant(CH20_A::EXCLUDED) - } - #[doc = "Include"] - #[inline(always)] - pub fn included(self) -> &'a mut W { - self.variant(CH20_A::INCLUDED) - } -} -#[doc = "Field `CH21` reader - Include or exclude channel 21"] -pub type CH21_R = crate::BitReader; -#[doc = "Include or exclude channel 21\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum CH21_A { - #[doc = "0: Exclude"] - EXCLUDED = 0, - #[doc = "1: Include"] - INCLUDED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: CH21_A) -> Self { - variant as u8 != 0 - } -} -impl CH21_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> CH21_A { - match self.bits { - false => CH21_A::EXCLUDED, - true => CH21_A::INCLUDED, - } - } - #[doc = "Checks if the value of the field is `EXCLUDED`"] - #[inline(always)] - pub fn is_excluded(&self) -> bool { - *self == CH21_A::EXCLUDED - } - #[doc = "Checks if the value of the field is `INCLUDED`"] - #[inline(always)] - pub fn is_included(&self) -> bool { - *self == CH21_A::INCLUDED - } -} -#[doc = "Field `CH21` writer - Include or exclude channel 21"] -pub type CH21_W<'a, const O: u8> = crate::BitWriter<'a, u32, CHG_SPEC, CH21_A, O>; -impl<'a, const O: u8> CH21_W<'a, O> { - #[doc = "Exclude"] - #[inline(always)] - pub fn excluded(self) -> &'a mut W { - self.variant(CH21_A::EXCLUDED) - } - #[doc = "Include"] - #[inline(always)] - pub fn included(self) -> &'a mut W { - self.variant(CH21_A::INCLUDED) - } -} -#[doc = "Field `CH22` reader - Include or exclude channel 22"] -pub type CH22_R = crate::BitReader; -#[doc = "Include or exclude channel 22\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum CH22_A { - #[doc = "0: Exclude"] - EXCLUDED = 0, - #[doc = "1: Include"] - INCLUDED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: CH22_A) -> Self { - variant as u8 != 0 - } -} -impl CH22_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> CH22_A { - match self.bits { - false => CH22_A::EXCLUDED, - true => CH22_A::INCLUDED, - } - } - #[doc = "Checks if the value of the field is `EXCLUDED`"] - #[inline(always)] - pub fn is_excluded(&self) -> bool { - *self == CH22_A::EXCLUDED - } - #[doc = "Checks if the value of the field is `INCLUDED`"] - #[inline(always)] - pub fn is_included(&self) -> bool { - *self == CH22_A::INCLUDED - } -} -#[doc = "Field `CH22` writer - Include or exclude channel 22"] -pub type CH22_W<'a, const O: u8> = crate::BitWriter<'a, u32, CHG_SPEC, CH22_A, O>; -impl<'a, const O: u8> CH22_W<'a, O> { - #[doc = "Exclude"] - #[inline(always)] - pub fn excluded(self) -> &'a mut W { - self.variant(CH22_A::EXCLUDED) - } - #[doc = "Include"] - #[inline(always)] - pub fn included(self) -> &'a mut W { - self.variant(CH22_A::INCLUDED) - } -} -#[doc = "Field `CH23` reader - Include or exclude channel 23"] -pub type CH23_R = crate::BitReader; -#[doc = "Include or exclude channel 23\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum CH23_A { - #[doc = "0: Exclude"] - EXCLUDED = 0, - #[doc = "1: Include"] - INCLUDED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: CH23_A) -> Self { - variant as u8 != 0 - } -} -impl CH23_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> CH23_A { - match self.bits { - false => CH23_A::EXCLUDED, - true => CH23_A::INCLUDED, - } - } - #[doc = "Checks if the value of the field is `EXCLUDED`"] - #[inline(always)] - pub fn is_excluded(&self) -> bool { - *self == CH23_A::EXCLUDED - } - #[doc = "Checks if the value of the field is `INCLUDED`"] - #[inline(always)] - pub fn is_included(&self) -> bool { - *self == CH23_A::INCLUDED - } -} -#[doc = "Field `CH23` writer - Include or exclude channel 23"] -pub type CH23_W<'a, const O: u8> = crate::BitWriter<'a, u32, CHG_SPEC, CH23_A, O>; -impl<'a, const O: u8> CH23_W<'a, O> { - #[doc = "Exclude"] - #[inline(always)] - pub fn excluded(self) -> &'a mut W { - self.variant(CH23_A::EXCLUDED) - } - #[doc = "Include"] - #[inline(always)] - pub fn included(self) -> &'a mut W { - self.variant(CH23_A::INCLUDED) - } -} -#[doc = "Field `CH24` reader - Include or exclude channel 24"] -pub type CH24_R = crate::BitReader; -#[doc = "Include or exclude channel 24\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum CH24_A { - #[doc = "0: Exclude"] - EXCLUDED = 0, - #[doc = "1: Include"] - INCLUDED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: CH24_A) -> Self { - variant as u8 != 0 - } -} -impl CH24_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> CH24_A { - match self.bits { - false => CH24_A::EXCLUDED, - true => CH24_A::INCLUDED, - } - } - #[doc = "Checks if the value of the field is `EXCLUDED`"] - #[inline(always)] - pub fn is_excluded(&self) -> bool { - *self == CH24_A::EXCLUDED - } - #[doc = "Checks if the value of the field is `INCLUDED`"] - #[inline(always)] - pub fn is_included(&self) -> bool { - *self == CH24_A::INCLUDED - } -} -#[doc = "Field `CH24` writer - Include or exclude channel 24"] -pub type CH24_W<'a, const O: u8> = crate::BitWriter<'a, u32, CHG_SPEC, CH24_A, O>; -impl<'a, const O: u8> CH24_W<'a, O> { - #[doc = "Exclude"] - #[inline(always)] - pub fn excluded(self) -> &'a mut W { - self.variant(CH24_A::EXCLUDED) - } - #[doc = "Include"] - #[inline(always)] - pub fn included(self) -> &'a mut W { - self.variant(CH24_A::INCLUDED) - } -} -#[doc = "Field `CH25` reader - Include or exclude channel 25"] -pub type CH25_R = crate::BitReader; -#[doc = "Include or exclude channel 25\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum CH25_A { - #[doc = "0: Exclude"] - EXCLUDED = 0, - #[doc = "1: Include"] - INCLUDED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: CH25_A) -> Self { - variant as u8 != 0 - } -} -impl CH25_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> CH25_A { - match self.bits { - false => CH25_A::EXCLUDED, - true => CH25_A::INCLUDED, - } - } - #[doc = "Checks if the value of the field is `EXCLUDED`"] - #[inline(always)] - pub fn is_excluded(&self) -> bool { - *self == CH25_A::EXCLUDED - } - #[doc = "Checks if the value of the field is `INCLUDED`"] - #[inline(always)] - pub fn is_included(&self) -> bool { - *self == CH25_A::INCLUDED - } -} -#[doc = "Field `CH25` writer - Include or exclude channel 25"] -pub type CH25_W<'a, const O: u8> = crate::BitWriter<'a, u32, CHG_SPEC, CH25_A, O>; -impl<'a, const O: u8> CH25_W<'a, O> { - #[doc = "Exclude"] - #[inline(always)] - pub fn excluded(self) -> &'a mut W { - self.variant(CH25_A::EXCLUDED) - } - #[doc = "Include"] - #[inline(always)] - pub fn included(self) -> &'a mut W { - self.variant(CH25_A::INCLUDED) - } -} -#[doc = "Field `CH26` reader - Include or exclude channel 26"] -pub type CH26_R = crate::BitReader; -#[doc = "Include or exclude channel 26\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum CH26_A { - #[doc = "0: Exclude"] - EXCLUDED = 0, - #[doc = "1: Include"] - INCLUDED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: CH26_A) -> Self { - variant as u8 != 0 - } -} -impl CH26_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> CH26_A { - match self.bits { - false => CH26_A::EXCLUDED, - true => CH26_A::INCLUDED, - } - } - #[doc = "Checks if the value of the field is `EXCLUDED`"] - #[inline(always)] - pub fn is_excluded(&self) -> bool { - *self == CH26_A::EXCLUDED - } - #[doc = "Checks if the value of the field is `INCLUDED`"] - #[inline(always)] - pub fn is_included(&self) -> bool { - *self == CH26_A::INCLUDED - } -} -#[doc = "Field `CH26` writer - Include or exclude channel 26"] -pub type CH26_W<'a, const O: u8> = crate::BitWriter<'a, u32, CHG_SPEC, CH26_A, O>; -impl<'a, const O: u8> CH26_W<'a, O> { - #[doc = "Exclude"] - #[inline(always)] - pub fn excluded(self) -> &'a mut W { - self.variant(CH26_A::EXCLUDED) - } - #[doc = "Include"] - #[inline(always)] - pub fn included(self) -> &'a mut W { - self.variant(CH26_A::INCLUDED) - } -} -#[doc = "Field `CH27` reader - Include or exclude channel 27"] -pub type CH27_R = crate::BitReader; -#[doc = "Include or exclude channel 27\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum CH27_A { - #[doc = "0: Exclude"] - EXCLUDED = 0, - #[doc = "1: Include"] - INCLUDED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: CH27_A) -> Self { - variant as u8 != 0 - } -} -impl CH27_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> CH27_A { - match self.bits { - false => CH27_A::EXCLUDED, - true => CH27_A::INCLUDED, - } - } - #[doc = "Checks if the value of the field is `EXCLUDED`"] - #[inline(always)] - pub fn is_excluded(&self) -> bool { - *self == CH27_A::EXCLUDED - } - #[doc = "Checks if the value of the field is `INCLUDED`"] - #[inline(always)] - pub fn is_included(&self) -> bool { - *self == CH27_A::INCLUDED - } -} -#[doc = "Field `CH27` writer - Include or exclude channel 27"] -pub type CH27_W<'a, const O: u8> = crate::BitWriter<'a, u32, CHG_SPEC, CH27_A, O>; -impl<'a, const O: u8> CH27_W<'a, O> { - #[doc = "Exclude"] - #[inline(always)] - pub fn excluded(self) -> &'a mut W { - self.variant(CH27_A::EXCLUDED) - } - #[doc = "Include"] - #[inline(always)] - pub fn included(self) -> &'a mut W { - self.variant(CH27_A::INCLUDED) - } -} -#[doc = "Field `CH28` reader - Include or exclude channel 28"] -pub type CH28_R = crate::BitReader; -#[doc = "Include or exclude channel 28\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum CH28_A { - #[doc = "0: Exclude"] - EXCLUDED = 0, - #[doc = "1: Include"] - INCLUDED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: CH28_A) -> Self { - variant as u8 != 0 - } -} -impl CH28_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> CH28_A { - match self.bits { - false => CH28_A::EXCLUDED, - true => CH28_A::INCLUDED, - } - } - #[doc = "Checks if the value of the field is `EXCLUDED`"] - #[inline(always)] - pub fn is_excluded(&self) -> bool { - *self == CH28_A::EXCLUDED - } - #[doc = "Checks if the value of the field is `INCLUDED`"] - #[inline(always)] - pub fn is_included(&self) -> bool { - *self == CH28_A::INCLUDED - } -} -#[doc = "Field `CH28` writer - Include or exclude channel 28"] -pub type CH28_W<'a, const O: u8> = crate::BitWriter<'a, u32, CHG_SPEC, CH28_A, O>; -impl<'a, const O: u8> CH28_W<'a, O> { - #[doc = "Exclude"] - #[inline(always)] - pub fn excluded(self) -> &'a mut W { - self.variant(CH28_A::EXCLUDED) - } - #[doc = "Include"] - #[inline(always)] - pub fn included(self) -> &'a mut W { - self.variant(CH28_A::INCLUDED) - } -} -#[doc = "Field `CH29` reader - Include or exclude channel 29"] -pub type CH29_R = crate::BitReader; -#[doc = "Include or exclude channel 29\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum CH29_A { - #[doc = "0: Exclude"] - EXCLUDED = 0, - #[doc = "1: Include"] - INCLUDED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: CH29_A) -> Self { - variant as u8 != 0 - } -} -impl CH29_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> CH29_A { - match self.bits { - false => CH29_A::EXCLUDED, - true => CH29_A::INCLUDED, - } - } - #[doc = "Checks if the value of the field is `EXCLUDED`"] - #[inline(always)] - pub fn is_excluded(&self) -> bool { - *self == CH29_A::EXCLUDED - } - #[doc = "Checks if the value of the field is `INCLUDED`"] - #[inline(always)] - pub fn is_included(&self) -> bool { - *self == CH29_A::INCLUDED - } -} -#[doc = "Field `CH29` writer - Include or exclude channel 29"] -pub type CH29_W<'a, const O: u8> = crate::BitWriter<'a, u32, CHG_SPEC, CH29_A, O>; -impl<'a, const O: u8> CH29_W<'a, O> { - #[doc = "Exclude"] - #[inline(always)] - pub fn excluded(self) -> &'a mut W { - self.variant(CH29_A::EXCLUDED) - } - #[doc = "Include"] - #[inline(always)] - pub fn included(self) -> &'a mut W { - self.variant(CH29_A::INCLUDED) - } -} -#[doc = "Field `CH30` reader - Include or exclude channel 30"] -pub type CH30_R = crate::BitReader; -#[doc = "Include or exclude channel 30\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum CH30_A { - #[doc = "0: Exclude"] - EXCLUDED = 0, - #[doc = "1: Include"] - INCLUDED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: CH30_A) -> Self { - variant as u8 != 0 - } -} -impl CH30_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> CH30_A { - match self.bits { - false => CH30_A::EXCLUDED, - true => CH30_A::INCLUDED, - } - } - #[doc = "Checks if the value of the field is `EXCLUDED`"] - #[inline(always)] - pub fn is_excluded(&self) -> bool { - *self == CH30_A::EXCLUDED - } - #[doc = "Checks if the value of the field is `INCLUDED`"] - #[inline(always)] - pub fn is_included(&self) -> bool { - *self == CH30_A::INCLUDED - } -} -#[doc = "Field `CH30` writer - Include or exclude channel 30"] -pub type CH30_W<'a, const O: u8> = crate::BitWriter<'a, u32, CHG_SPEC, CH30_A, O>; -impl<'a, const O: u8> CH30_W<'a, O> { - #[doc = "Exclude"] - #[inline(always)] - pub fn excluded(self) -> &'a mut W { - self.variant(CH30_A::EXCLUDED) - } - #[doc = "Include"] - #[inline(always)] - pub fn included(self) -> &'a mut W { - self.variant(CH30_A::INCLUDED) - } -} -#[doc = "Field `CH31` reader - Include or exclude channel 31"] -pub type CH31_R = crate::BitReader; -#[doc = "Include or exclude channel 31\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum CH31_A { - #[doc = "0: Exclude"] - EXCLUDED = 0, - #[doc = "1: Include"] - INCLUDED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: CH31_A) -> Self { - variant as u8 != 0 - } -} -impl CH31_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> CH31_A { - match self.bits { - false => CH31_A::EXCLUDED, - true => CH31_A::INCLUDED, - } - } - #[doc = "Checks if the value of the field is `EXCLUDED`"] - #[inline(always)] - pub fn is_excluded(&self) -> bool { - *self == CH31_A::EXCLUDED - } - #[doc = "Checks if the value of the field is `INCLUDED`"] - #[inline(always)] - pub fn is_included(&self) -> bool { - *self == CH31_A::INCLUDED - } -} -#[doc = "Field `CH31` writer - Include or exclude channel 31"] -pub type CH31_W<'a, const O: u8> = crate::BitWriter<'a, u32, CHG_SPEC, CH31_A, O>; -impl<'a, const O: u8> CH31_W<'a, O> { - #[doc = "Exclude"] - #[inline(always)] - pub fn excluded(self) -> &'a mut W { - self.variant(CH31_A::EXCLUDED) - } - #[doc = "Include"] - #[inline(always)] - pub fn included(self) -> &'a mut W { - self.variant(CH31_A::INCLUDED) - } -} -impl R { - #[doc = "Bit 0 - Include or exclude channel 0"] - #[inline(always)] - pub fn ch0(&self) -> CH0_R { - CH0_R::new((self.bits & 1) != 0) - } - #[doc = "Bit 1 - Include or exclude channel 1"] - #[inline(always)] - pub fn ch1(&self) -> CH1_R { - CH1_R::new(((self.bits >> 1) & 1) != 0) - } - #[doc = "Bit 2 - Include or exclude channel 2"] - #[inline(always)] - pub fn ch2(&self) -> CH2_R { - CH2_R::new(((self.bits >> 2) & 1) != 0) - } - #[doc = "Bit 3 - Include or exclude channel 3"] - #[inline(always)] - pub fn ch3(&self) -> CH3_R { - CH3_R::new(((self.bits >> 3) & 1) != 0) - } - #[doc = "Bit 4 - Include or exclude channel 4"] - #[inline(always)] - pub fn ch4(&self) -> CH4_R { - CH4_R::new(((self.bits >> 4) & 1) != 0) - } - #[doc = "Bit 5 - Include or exclude channel 5"] - #[inline(always)] - pub fn ch5(&self) -> CH5_R { - CH5_R::new(((self.bits >> 5) & 1) != 0) - } - #[doc = "Bit 6 - Include or exclude channel 6"] - #[inline(always)] - pub fn ch6(&self) -> CH6_R { - CH6_R::new(((self.bits >> 6) & 1) != 0) - } - #[doc = "Bit 7 - Include or exclude channel 7"] - #[inline(always)] - pub fn ch7(&self) -> CH7_R { - CH7_R::new(((self.bits >> 7) & 1) != 0) - } - #[doc = "Bit 8 - Include or exclude channel 8"] - #[inline(always)] - pub fn ch8(&self) -> CH8_R { - CH8_R::new(((self.bits >> 8) & 1) != 0) - } - #[doc = "Bit 9 - Include or exclude channel 9"] - #[inline(always)] - pub fn ch9(&self) -> CH9_R { - CH9_R::new(((self.bits >> 9) & 1) != 0) - } - #[doc = "Bit 10 - Include or exclude channel 10"] - #[inline(always)] - pub fn ch10(&self) -> CH10_R { - CH10_R::new(((self.bits >> 10) & 1) != 0) - } - #[doc = "Bit 11 - Include or exclude channel 11"] - #[inline(always)] - pub fn ch11(&self) -> CH11_R { - CH11_R::new(((self.bits >> 11) & 1) != 0) - } - #[doc = "Bit 12 - Include or exclude channel 12"] - #[inline(always)] - pub fn ch12(&self) -> CH12_R { - CH12_R::new(((self.bits >> 12) & 1) != 0) - } - #[doc = "Bit 13 - Include or exclude channel 13"] - #[inline(always)] - pub fn ch13(&self) -> CH13_R { - CH13_R::new(((self.bits >> 13) & 1) != 0) - } - #[doc = "Bit 14 - Include or exclude channel 14"] - #[inline(always)] - pub fn ch14(&self) -> CH14_R { - CH14_R::new(((self.bits >> 14) & 1) != 0) - } - #[doc = "Bit 15 - Include or exclude channel 15"] - #[inline(always)] - pub fn ch15(&self) -> CH15_R { - CH15_R::new(((self.bits >> 15) & 1) != 0) - } - #[doc = "Bit 16 - Include or exclude channel 16"] - #[inline(always)] - pub fn ch16(&self) -> CH16_R { - CH16_R::new(((self.bits >> 16) & 1) != 0) - } - #[doc = "Bit 17 - Include or exclude channel 17"] - #[inline(always)] - pub fn ch17(&self) -> CH17_R { - CH17_R::new(((self.bits >> 17) & 1) != 0) - } - #[doc = "Bit 18 - Include or exclude channel 18"] - #[inline(always)] - pub fn ch18(&self) -> CH18_R { - CH18_R::new(((self.bits >> 18) & 1) != 0) - } - #[doc = "Bit 19 - Include or exclude channel 19"] - #[inline(always)] - pub fn ch19(&self) -> CH19_R { - CH19_R::new(((self.bits >> 19) & 1) != 0) - } - #[doc = "Bit 20 - Include or exclude channel 20"] - #[inline(always)] - pub fn ch20(&self) -> CH20_R { - CH20_R::new(((self.bits >> 20) & 1) != 0) - } - #[doc = "Bit 21 - Include or exclude channel 21"] - #[inline(always)] - pub fn ch21(&self) -> CH21_R { - CH21_R::new(((self.bits >> 21) & 1) != 0) - } - #[doc = "Bit 22 - Include or exclude channel 22"] - #[inline(always)] - pub fn ch22(&self) -> CH22_R { - CH22_R::new(((self.bits >> 22) & 1) != 0) - } - #[doc = "Bit 23 - Include or exclude channel 23"] - #[inline(always)] - pub fn ch23(&self) -> CH23_R { - CH23_R::new(((self.bits >> 23) & 1) != 0) - } - #[doc = "Bit 24 - Include or exclude channel 24"] - #[inline(always)] - pub fn ch24(&self) -> CH24_R { - CH24_R::new(((self.bits >> 24) & 1) != 0) - } - #[doc = "Bit 25 - Include or exclude channel 25"] - #[inline(always)] - pub fn ch25(&self) -> CH25_R { - CH25_R::new(((self.bits >> 25) & 1) != 0) - } - #[doc = "Bit 26 - Include or exclude channel 26"] - #[inline(always)] - pub fn ch26(&self) -> CH26_R { - CH26_R::new(((self.bits >> 26) & 1) != 0) - } - #[doc = "Bit 27 - Include or exclude channel 27"] - #[inline(always)] - pub fn ch27(&self) -> CH27_R { - CH27_R::new(((self.bits >> 27) & 1) != 0) - } - #[doc = "Bit 28 - Include or exclude channel 28"] - #[inline(always)] - pub fn ch28(&self) -> CH28_R { - CH28_R::new(((self.bits >> 28) & 1) != 0) - } - #[doc = "Bit 29 - Include or exclude channel 29"] - #[inline(always)] - pub fn ch29(&self) -> CH29_R { - CH29_R::new(((self.bits >> 29) & 1) != 0) - } - #[doc = "Bit 30 - Include or exclude channel 30"] - #[inline(always)] - pub fn ch30(&self) -> CH30_R { - CH30_R::new(((self.bits >> 30) & 1) != 0) - } - #[doc = "Bit 31 - Include or exclude channel 31"] - #[inline(always)] - pub fn ch31(&self) -> CH31_R { - CH31_R::new(((self.bits >> 31) & 1) != 0) - } -} -impl W { - #[doc = "Bit 0 - Include or exclude channel 0"] - #[inline(always)] - #[must_use] - pub fn ch0(&mut self) -> CH0_W<0> { - CH0_W::new(self) - } - #[doc = "Bit 1 - Include or exclude channel 1"] - #[inline(always)] - #[must_use] - pub fn ch1(&mut self) -> CH1_W<1> { - CH1_W::new(self) - } - #[doc = "Bit 2 - Include or exclude channel 2"] - #[inline(always)] - #[must_use] - pub fn ch2(&mut self) -> CH2_W<2> { - CH2_W::new(self) - } - #[doc = "Bit 3 - Include or exclude channel 3"] - #[inline(always)] - #[must_use] - pub fn ch3(&mut self) -> CH3_W<3> { - CH3_W::new(self) - } - #[doc = "Bit 4 - Include or exclude channel 4"] - #[inline(always)] - #[must_use] - pub fn ch4(&mut self) -> CH4_W<4> { - CH4_W::new(self) - } - #[doc = "Bit 5 - Include or exclude channel 5"] - #[inline(always)] - #[must_use] - pub fn ch5(&mut self) -> CH5_W<5> { - CH5_W::new(self) - } - #[doc = "Bit 6 - Include or exclude channel 6"] - #[inline(always)] - #[must_use] - pub fn ch6(&mut self) -> CH6_W<6> { - CH6_W::new(self) - } - #[doc = "Bit 7 - Include or exclude channel 7"] - #[inline(always)] - #[must_use] - pub fn ch7(&mut self) -> CH7_W<7> { - CH7_W::new(self) - } - #[doc = "Bit 8 - Include or exclude channel 8"] - #[inline(always)] - #[must_use] - pub fn ch8(&mut self) -> CH8_W<8> { - CH8_W::new(self) - } - #[doc = "Bit 9 - Include or exclude channel 9"] - #[inline(always)] - #[must_use] - pub fn ch9(&mut self) -> CH9_W<9> { - CH9_W::new(self) - } - #[doc = "Bit 10 - Include or exclude channel 10"] - #[inline(always)] - #[must_use] - pub fn ch10(&mut self) -> CH10_W<10> { - CH10_W::new(self) - } - #[doc = "Bit 11 - Include or exclude channel 11"] - #[inline(always)] - #[must_use] - pub fn ch11(&mut self) -> CH11_W<11> { - CH11_W::new(self) - } - #[doc = "Bit 12 - Include or exclude channel 12"] - #[inline(always)] - #[must_use] - pub fn ch12(&mut self) -> CH12_W<12> { - CH12_W::new(self) - } - #[doc = "Bit 13 - Include or exclude channel 13"] - #[inline(always)] - #[must_use] - pub fn ch13(&mut self) -> CH13_W<13> { - CH13_W::new(self) - } - #[doc = "Bit 14 - Include or exclude channel 14"] - #[inline(always)] - #[must_use] - pub fn ch14(&mut self) -> CH14_W<14> { - CH14_W::new(self) - } - #[doc = "Bit 15 - Include or exclude channel 15"] - #[inline(always)] - #[must_use] - pub fn ch15(&mut self) -> CH15_W<15> { - CH15_W::new(self) - } - #[doc = "Bit 16 - Include or exclude channel 16"] - #[inline(always)] - #[must_use] - pub fn ch16(&mut self) -> CH16_W<16> { - CH16_W::new(self) - } - #[doc = "Bit 17 - Include or exclude channel 17"] - #[inline(always)] - #[must_use] - pub fn ch17(&mut self) -> CH17_W<17> { - CH17_W::new(self) - } - #[doc = "Bit 18 - Include or exclude channel 18"] - #[inline(always)] - #[must_use] - pub fn ch18(&mut self) -> CH18_W<18> { - CH18_W::new(self) - } - #[doc = "Bit 19 - Include or exclude channel 19"] - #[inline(always)] - #[must_use] - pub fn ch19(&mut self) -> CH19_W<19> { - CH19_W::new(self) - } - #[doc = "Bit 20 - Include or exclude channel 20"] - #[inline(always)] - #[must_use] - pub fn ch20(&mut self) -> CH20_W<20> { - CH20_W::new(self) - } - #[doc = "Bit 21 - Include or exclude channel 21"] - #[inline(always)] - #[must_use] - pub fn ch21(&mut self) -> CH21_W<21> { - CH21_W::new(self) - } - #[doc = "Bit 22 - Include or exclude channel 22"] - #[inline(always)] - #[must_use] - pub fn ch22(&mut self) -> CH22_W<22> { - CH22_W::new(self) - } - #[doc = "Bit 23 - Include or exclude channel 23"] - #[inline(always)] - #[must_use] - pub fn ch23(&mut self) -> CH23_W<23> { - CH23_W::new(self) - } - #[doc = "Bit 24 - Include or exclude channel 24"] - #[inline(always)] - #[must_use] - pub fn ch24(&mut self) -> CH24_W<24> { - CH24_W::new(self) - } - #[doc = "Bit 25 - Include or exclude channel 25"] - #[inline(always)] - #[must_use] - pub fn ch25(&mut self) -> CH25_W<25> { - CH25_W::new(self) - } - #[doc = "Bit 26 - Include or exclude channel 26"] - #[inline(always)] - #[must_use] - pub fn ch26(&mut self) -> CH26_W<26> { - CH26_W::new(self) - } - #[doc = "Bit 27 - Include or exclude channel 27"] - #[inline(always)] - #[must_use] - pub fn ch27(&mut self) -> CH27_W<27> { - CH27_W::new(self) - } - #[doc = "Bit 28 - Include or exclude channel 28"] - #[inline(always)] - #[must_use] - pub fn ch28(&mut self) -> CH28_W<28> { - CH28_W::new(self) - } - #[doc = "Bit 29 - Include or exclude channel 29"] - #[inline(always)] - #[must_use] - pub fn ch29(&mut self) -> CH29_W<29> { - CH29_W::new(self) - } - #[doc = "Bit 30 - Include or exclude channel 30"] - #[inline(always)] - #[must_use] - pub fn ch30(&mut self) -> CH30_W<30> { - CH30_W::new(self) - } - #[doc = "Bit 31 - Include or exclude channel 31"] - #[inline(always)] - #[must_use] - pub fn ch31(&mut self) -> CH31_W<31> { - CH31_W::new(self) - } - #[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 = "Description collection: Channel group n\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 [chg](index.html) module"] -pub struct CHG_SPEC; -impl crate::RegisterSpec for CHG_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [chg::R](R) reader structure"] -impl crate::Readable for CHG_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [chg::W](W) writer structure"] -impl crate::Writable for CHG_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets CHG[%s] -to value 0"] -impl crate::Resettable for CHG_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/ppi/fork.rs b/down-the-stack/dk_pac/src/ppi/fork.rs deleted file mode 100644 index 7baf9bb..0000000 --- a/down-the-stack/dk_pac/src/ppi/fork.rs +++ /dev/null @@ -1,10 +0,0 @@ -#[doc = r"Register block"] -#[repr(C)] -pub struct FORK { - #[doc = "0x00 - Description cluster: Channel n task end-point"] - pub tep: TEP, -} -#[doc = "TEP (rw) register accessor: an alias for `Reg`"] -pub type TEP = crate::Reg; -#[doc = "Description cluster: Channel n task end-point"] -pub mod tep; diff --git a/down-the-stack/dk_pac/src/ppi/fork/tep.rs b/down-the-stack/dk_pac/src/ppi/fork/tep.rs deleted file mode 100644 index bffc901..0000000 --- a/down-the-stack/dk_pac/src/ppi/fork/tep.rs +++ /dev/null @@ -1,80 +0,0 @@ -#[doc = "Register `TEP` 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 `TEP` 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 `TEP` reader - Pointer to task register"] -pub type TEP_R = crate::FieldReader; -#[doc = "Field `TEP` writer - Pointer to task register"] -pub type TEP_W<'a, const O: u8> = crate::FieldWriter<'a, u32, TEP_SPEC, u32, u32, 32, O>; -impl R { - #[doc = "Bits 0:31 - Pointer to task register"] - #[inline(always)] - pub fn tep(&self) -> TEP_R { - TEP_R::new(self.bits) - } -} -impl W { - #[doc = "Bits 0:31 - Pointer to task register"] - #[inline(always)] - #[must_use] - pub fn tep(&mut self) -> TEP_W<0> { - TEP_W::new(self) - } - #[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 = "Description cluster: Channel n task end-point\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 [tep](index.html) module"] -pub struct TEP_SPEC; -impl crate::RegisterSpec for TEP_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [tep::R](R) reader structure"] -impl crate::Readable for TEP_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [tep::W](W) writer structure"] -impl crate::Writable for TEP_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets TEP to value 0"] -impl crate::Resettable for TEP_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/ppi/tasks_chg.rs b/down-the-stack/dk_pac/src/ppi/tasks_chg.rs deleted file mode 100644 index 9915b80..0000000 --- a/down-the-stack/dk_pac/src/ppi/tasks_chg.rs +++ /dev/null @@ -1,16 +0,0 @@ -#[doc = r"Register block"] -#[repr(C)] -pub struct TASKS_CHG { - #[doc = "0x00 - Description cluster: Enable channel group n"] - pub en: EN, - #[doc = "0x04 - Description cluster: Disable channel group n"] - pub dis: DIS, -} -#[doc = "EN (w) register accessor: an alias for `Reg`"] -pub type EN = crate::Reg; -#[doc = "Description cluster: Enable channel group n"] -pub mod en; -#[doc = "DIS (w) register accessor: an alias for `Reg`"] -pub type DIS = crate::Reg; -#[doc = "Description cluster: Disable channel group n"] -pub mod dis; diff --git a/down-the-stack/dk_pac/src/ppi/tasks_chg/dis.rs b/down-the-stack/dk_pac/src/ppi/tasks_chg/dis.rs deleted file mode 100644 index 83eabf7..0000000 --- a/down-the-stack/dk_pac/src/ppi/tasks_chg/dis.rs +++ /dev/null @@ -1,71 +0,0 @@ -#[doc = "Register `DIS` 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 = "Disable channel group n\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum DIS_AW { - #[doc = "1: Trigger task"] - TRIGGER = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: DIS_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `DIS` writer - Disable channel group n"] -pub type DIS_W<'a, const O: u8> = crate::BitWriter<'a, u32, DIS_SPEC, DIS_AW, O>; -impl<'a, const O: u8> DIS_W<'a, O> { - #[doc = "Trigger task"] - #[inline(always)] - pub fn trigger(self) -> &'a mut W { - self.variant(DIS_AW::TRIGGER) - } -} -impl W { - #[doc = "Bit 0 - Disable channel group n"] - #[inline(always)] - #[must_use] - pub fn dis(&mut self) -> DIS_W<0> { - 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 - } -} -#[doc = "Description cluster: Disable channel group n\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 [dis](index.html) module"] -pub struct DIS_SPEC; -impl crate::RegisterSpec for DIS_SPEC { - type Ux = u32; -} -#[doc = "`write(|w| ..)` method takes [dis::W](W) writer structure"] -impl crate::Writable for DIS_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets DIS to value 0"] -impl crate::Resettable for DIS_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/ppi/tasks_chg/en.rs b/down-the-stack/dk_pac/src/ppi/tasks_chg/en.rs deleted file mode 100644 index 254b30c..0000000 --- a/down-the-stack/dk_pac/src/ppi/tasks_chg/en.rs +++ /dev/null @@ -1,71 +0,0 @@ -#[doc = "Register `EN` 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 = "Enable channel group n\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum EN_AW { - #[doc = "1: Trigger task"] - TRIGGER = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: EN_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `EN` writer - Enable channel group n"] -pub type EN_W<'a, const O: u8> = crate::BitWriter<'a, u32, EN_SPEC, EN_AW, O>; -impl<'a, const O: u8> EN_W<'a, O> { - #[doc = "Trigger task"] - #[inline(always)] - pub fn trigger(self) -> &'a mut W { - self.variant(EN_AW::TRIGGER) - } -} -impl W { - #[doc = "Bit 0 - Enable channel group n"] - #[inline(always)] - #[must_use] - pub fn en(&mut self) -> EN_W<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 - } -} -#[doc = "Description cluster: Enable channel group n\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 [en](index.html) module"] -pub struct EN_SPEC; -impl crate::RegisterSpec for EN_SPEC { - type Ux = u32; -} -#[doc = "`write(|w| ..)` method takes [en::W](W) writer structure"] -impl crate::Writable for 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 EN to value 0"] -impl crate::Resettable for EN_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/pwm0.rs b/down-the-stack/dk_pac/src/pwm0.rs deleted file mode 100644 index 1be4941..0000000 --- a/down-the-stack/dk_pac/src/pwm0.rs +++ /dev/null @@ -1,136 +0,0 @@ -#[doc = r"Register block"] -#[repr(C)] -pub struct RegisterBlock { - _reserved0: [u8; 0x04], - #[doc = "0x04 - Stops PWM pulse generation on all channels at the end of current PWM period, and stops sequence playback"] - pub tasks_stop: TASKS_STOP, - #[doc = "0x08..0x10 - Description collection: Loads the first PWM value on all enabled channels from sequence n, and starts playing that sequence at the rate defined in SEQ\\[n\\]REFRESH and/or DECODER.MODE. Causes PWM generation to start it was not running."] - pub tasks_seqstart: [TASKS_SEQSTART; 2], - #[doc = "0x10 - Steps by one value in the current sequence on all enabled channels if DECODER.MODE=NextStep. Does not cause PWM generation to start it was not running."] - pub tasks_nextstep: TASKS_NEXTSTEP, - _reserved3: [u8; 0xf0], - #[doc = "0x104 - Response to STOP task, emitted when PWM pulses are no longer generated"] - pub events_stopped: EVENTS_STOPPED, - #[doc = "0x108..0x110 - Description collection: First PWM period started on sequence n"] - pub events_seqstarted: [EVENTS_SEQSTARTED; 2], - #[doc = "0x110..0x118 - Description collection: Emitted at end of every sequence n, when last value from RAM has been applied to wave counter"] - pub events_seqend: [EVENTS_SEQEND; 2], - #[doc = "0x118 - Emitted at the end of each PWM period"] - pub events_pwmperiodend: EVENTS_PWMPERIODEND, - #[doc = "0x11c - Concatenated sequences have been played the amount of times defined in LOOP.CNT"] - pub events_loopsdone: EVENTS_LOOPSDONE, - _reserved8: [u8; 0xe0], - #[doc = "0x200 - Shortcuts between local events and tasks"] - pub shorts: SHORTS, - _reserved9: [u8; 0xfc], - #[doc = "0x300 - Enable or disable interrupt"] - pub inten: INTEN, - #[doc = "0x304 - Enable interrupt"] - pub intenset: INTENSET, - #[doc = "0x308 - Disable interrupt"] - pub intenclr: INTENCLR, - _reserved12: [u8; 0x01f4], - #[doc = "0x500 - PWM module enable register"] - pub enable: ENABLE, - #[doc = "0x504 - Selects operating mode of the wave counter"] - pub mode: MODE, - #[doc = "0x508 - Value up to which the pulse generator counter counts"] - pub countertop: COUNTERTOP, - #[doc = "0x50c - Configuration for PWM_CLK"] - pub prescaler: PRESCALER, - #[doc = "0x510 - Configuration of the decoder"] - pub decoder: DECODER, - #[doc = "0x514 - Amount of playback of a loop"] - pub loop_: LOOP, - _reserved18: [u8; 0x08], - #[doc = "0x520..0x530 - Unspecified"] - pub seq0: SEQ, - _reserved19: [u8; 0x10], - #[doc = "0x540..0x550 - Unspecified"] - pub seq1: SEQ, - _reserved20: [u8; 0x10], - #[doc = "0x560..0x570 - Unspecified"] - pub psel: PSEL, -} -#[doc = "TASKS_STOP (w) register accessor: an alias for `Reg`"] -pub type TASKS_STOP = crate::Reg; -#[doc = "Stops PWM pulse generation on all channels at the end of current PWM period, and stops sequence playback"] -pub mod tasks_stop; -#[doc = "TASKS_SEQSTART (w) register accessor: an alias for `Reg`"] -pub type TASKS_SEQSTART = crate::Reg; -#[doc = "Description collection: Loads the first PWM value on all enabled channels from sequence n, and starts playing that sequence at the rate defined in SEQ\\[n\\]REFRESH and/or DECODER.MODE. Causes PWM generation to start it was not running."] -pub mod tasks_seqstart; -#[doc = "TASKS_NEXTSTEP (w) register accessor: an alias for `Reg`"] -pub type TASKS_NEXTSTEP = crate::Reg; -#[doc = "Steps by one value in the current sequence on all enabled channels if DECODER.MODE=NextStep. Does not cause PWM generation to start it was not running."] -pub mod tasks_nextstep; -#[doc = "EVENTS_STOPPED (rw) register accessor: an alias for `Reg`"] -pub type EVENTS_STOPPED = crate::Reg; -#[doc = "Response to STOP task, emitted when PWM pulses are no longer generated"] -pub mod events_stopped; -#[doc = "EVENTS_SEQSTARTED (rw) register accessor: an alias for `Reg`"] -pub type EVENTS_SEQSTARTED = crate::Reg; -#[doc = "Description collection: First PWM period started on sequence n"] -pub mod events_seqstarted; -#[doc = "EVENTS_SEQEND (rw) register accessor: an alias for `Reg`"] -pub type EVENTS_SEQEND = crate::Reg; -#[doc = "Description collection: Emitted at end of every sequence n, when last value from RAM has been applied to wave counter"] -pub mod events_seqend; -#[doc = "EVENTS_PWMPERIODEND (rw) register accessor: an alias for `Reg`"] -pub type EVENTS_PWMPERIODEND = crate::Reg; -#[doc = "Emitted at the end of each PWM period"] -pub mod events_pwmperiodend; -#[doc = "EVENTS_LOOPSDONE (rw) register accessor: an alias for `Reg`"] -pub type EVENTS_LOOPSDONE = crate::Reg; -#[doc = "Concatenated sequences have been played the amount of times defined in LOOP.CNT"] -pub mod events_loopsdone; -#[doc = "SHORTS (rw) register accessor: an alias for `Reg`"] -pub type SHORTS = crate::Reg; -#[doc = "Shortcuts between local events and tasks"] -pub mod shorts; -#[doc = "INTEN (rw) register accessor: an alias for `Reg`"] -pub type INTEN = crate::Reg; -#[doc = "Enable or disable interrupt"] -pub mod inten; -#[doc = "INTENSET (rw) register accessor: an alias for `Reg`"] -pub type INTENSET = crate::Reg; -#[doc = "Enable interrupt"] -pub mod intenset; -#[doc = "INTENCLR (rw) register accessor: an alias for `Reg`"] -pub type INTENCLR = crate::Reg; -#[doc = "Disable interrupt"] -pub mod intenclr; -#[doc = "ENABLE (rw) register accessor: an alias for `Reg`"] -pub type ENABLE = crate::Reg; -#[doc = "PWM module enable register"] -pub mod enable; -#[doc = "MODE (rw) register accessor: an alias for `Reg`"] -pub type MODE = crate::Reg; -#[doc = "Selects operating mode of the wave counter"] -pub mod mode; -#[doc = "COUNTERTOP (rw) register accessor: an alias for `Reg`"] -pub type COUNTERTOP = crate::Reg; -#[doc = "Value up to which the pulse generator counter counts"] -pub mod countertop; -#[doc = "PRESCALER (rw) register accessor: an alias for `Reg`"] -pub type PRESCALER = crate::Reg; -#[doc = "Configuration for PWM_CLK"] -pub mod prescaler; -#[doc = "DECODER (rw) register accessor: an alias for `Reg`"] -pub type DECODER = crate::Reg; -#[doc = "Configuration of the decoder"] -pub mod decoder; -#[doc = "LOOP (rw) register accessor: an alias for `Reg`"] -pub type LOOP = crate::Reg; -#[doc = "Amount of playback of a loop"] -pub mod loop_; -#[doc = "Unspecified"] -pub use self::seq::SEQ; -#[doc = r"Cluster"] -#[doc = "Unspecified"] -pub mod seq; -#[doc = "Unspecified"] -pub use self::psel::PSEL; -#[doc = r"Cluster"] -#[doc = "Unspecified"] -pub mod psel; diff --git a/down-the-stack/dk_pac/src/pwm0/countertop.rs b/down-the-stack/dk_pac/src/pwm0/countertop.rs deleted file mode 100644 index dea3500..0000000 --- a/down-the-stack/dk_pac/src/pwm0/countertop.rs +++ /dev/null @@ -1,81 +0,0 @@ -#[doc = "Register `COUNTERTOP` 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 `COUNTERTOP` 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 `COUNTERTOP` reader - Value up to which the pulse generator counter counts. This register is ignored when DECODER.MODE=WaveForm and only values from RAM will be used."] -pub type COUNTERTOP_R = crate::FieldReader; -#[doc = "Field `COUNTERTOP` writer - Value up to which the pulse generator counter counts. This register is ignored when DECODER.MODE=WaveForm and only values from RAM will be used."] -pub type COUNTERTOP_W<'a, const O: u8> = - crate::FieldWriter<'a, u32, COUNTERTOP_SPEC, u16, u16, 15, O>; -impl R { - #[doc = "Bits 0:14 - Value up to which the pulse generator counter counts. This register is ignored when DECODER.MODE=WaveForm and only values from RAM will be used."] - #[inline(always)] - pub fn countertop(&self) -> COUNTERTOP_R { - COUNTERTOP_R::new((self.bits & 0x7fff) as u16) - } -} -impl W { - #[doc = "Bits 0:14 - Value up to which the pulse generator counter counts. This register is ignored when DECODER.MODE=WaveForm and only values from RAM will be used."] - #[inline(always)] - #[must_use] - pub fn countertop(&mut self) -> COUNTERTOP_W<0> { - COUNTERTOP_W::new(self) - } - #[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 = "Value up to which the pulse generator counter counts\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 [countertop](index.html) module"] -pub struct COUNTERTOP_SPEC; -impl crate::RegisterSpec for COUNTERTOP_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [countertop::R](R) reader structure"] -impl crate::Readable for COUNTERTOP_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [countertop::W](W) writer structure"] -impl crate::Writable for COUNTERTOP_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets COUNTERTOP to value 0x03ff"] -impl crate::Resettable for COUNTERTOP_SPEC { - const RESET_VALUE: Self::Ux = 0x03ff; -} diff --git a/down-the-stack/dk_pac/src/pwm0/decoder.rs b/down-the-stack/dk_pac/src/pwm0/decoder.rs deleted file mode 100644 index a2523d3..0000000 --- a/down-the-stack/dk_pac/src/pwm0/decoder.rs +++ /dev/null @@ -1,215 +0,0 @@ -#[doc = "Register `DECODER` 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 `DECODER` 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 `LOAD` reader - How a sequence is read from RAM and spread to the compare register"] -pub type LOAD_R = crate::FieldReader; -#[doc = "How a sequence is read from RAM and spread to the compare register\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -#[repr(u8)] -pub enum LOAD_A { - #[doc = "0: 1st half word (16-bit) used in all PWM channels 0..3"] - COMMON = 0, - #[doc = "1: 1st half word (16-bit) used in channel 0..1; 2nd word in channel 2..3"] - GROUPED = 1, - #[doc = "2: 1st half word (16-bit) in ch.0; 2nd in ch.1; ...; 4th in ch.3"] - INDIVIDUAL = 2, - #[doc = "3: 1st half word (16-bit) in ch.0; 2nd in ch.1; ...; 4th in COUNTERTOP"] - WAVE_FORM = 3, -} -impl From for u8 { - #[inline(always)] - fn from(variant: LOAD_A) -> Self { - variant as _ - } -} -impl LOAD_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> LOAD_A { - match self.bits { - 0 => LOAD_A::COMMON, - 1 => LOAD_A::GROUPED, - 2 => LOAD_A::INDIVIDUAL, - 3 => LOAD_A::WAVE_FORM, - _ => unreachable!(), - } - } - #[doc = "Checks if the value of the field is `COMMON`"] - #[inline(always)] - pub fn is_common(&self) -> bool { - *self == LOAD_A::COMMON - } - #[doc = "Checks if the value of the field is `GROUPED`"] - #[inline(always)] - pub fn is_grouped(&self) -> bool { - *self == LOAD_A::GROUPED - } - #[doc = "Checks if the value of the field is `INDIVIDUAL`"] - #[inline(always)] - pub fn is_individual(&self) -> bool { - *self == LOAD_A::INDIVIDUAL - } - #[doc = "Checks if the value of the field is `WAVE_FORM`"] - #[inline(always)] - pub fn is_wave_form(&self) -> bool { - *self == LOAD_A::WAVE_FORM - } -} -#[doc = "Field `LOAD` writer - How a sequence is read from RAM and spread to the compare register"] -pub type LOAD_W<'a, const O: u8> = crate::FieldWriterSafe<'a, u32, DECODER_SPEC, u8, LOAD_A, 2, O>; -impl<'a, const O: u8> LOAD_W<'a, O> { - #[doc = "1st half word (16-bit) used in all PWM channels 0..3"] - #[inline(always)] - pub fn common(self) -> &'a mut W { - self.variant(LOAD_A::COMMON) - } - #[doc = "1st half word (16-bit) used in channel 0..1; 2nd word in channel 2..3"] - #[inline(always)] - pub fn grouped(self) -> &'a mut W { - self.variant(LOAD_A::GROUPED) - } - #[doc = "1st half word (16-bit) in ch.0; 2nd in ch.1; ...; 4th in ch.3"] - #[inline(always)] - pub fn individual(self) -> &'a mut W { - self.variant(LOAD_A::INDIVIDUAL) - } - #[doc = "1st half word (16-bit) in ch.0; 2nd in ch.1; ...; 4th in COUNTERTOP"] - #[inline(always)] - pub fn wave_form(self) -> &'a mut W { - self.variant(LOAD_A::WAVE_FORM) - } -} -#[doc = "Field `MODE` reader - Selects source for advancing the active sequence"] -pub type MODE_R = crate::BitReader; -#[doc = "Selects source for advancing the active sequence\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum MODE_A { - #[doc = "0: SEQ\\[n\\].REFRESH is used to determine loading internal compare registers"] - REFRESH_COUNT = 0, - #[doc = "1: NEXTSTEP task causes a new value to be loaded to internal compare registers"] - NEXT_STEP = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: MODE_A) -> Self { - variant as u8 != 0 - } -} -impl MODE_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> MODE_A { - match self.bits { - false => MODE_A::REFRESH_COUNT, - true => MODE_A::NEXT_STEP, - } - } - #[doc = "Checks if the value of the field is `REFRESH_COUNT`"] - #[inline(always)] - pub fn is_refresh_count(&self) -> bool { - *self == MODE_A::REFRESH_COUNT - } - #[doc = "Checks if the value of the field is `NEXT_STEP`"] - #[inline(always)] - pub fn is_next_step(&self) -> bool { - *self == MODE_A::NEXT_STEP - } -} -#[doc = "Field `MODE` writer - Selects source for advancing the active sequence"] -pub type MODE_W<'a, const O: u8> = crate::BitWriter<'a, u32, DECODER_SPEC, MODE_A, O>; -impl<'a, const O: u8> MODE_W<'a, O> { - #[doc = "SEQ\\[n\\].REFRESH is used to determine loading internal compare registers"] - #[inline(always)] - pub fn refresh_count(self) -> &'a mut W { - self.variant(MODE_A::REFRESH_COUNT) - } - #[doc = "NEXTSTEP task causes a new value to be loaded to internal compare registers"] - #[inline(always)] - pub fn next_step(self) -> &'a mut W { - self.variant(MODE_A::NEXT_STEP) - } -} -impl R { - #[doc = "Bits 0:1 - How a sequence is read from RAM and spread to the compare register"] - #[inline(always)] - pub fn load(&self) -> LOAD_R { - LOAD_R::new((self.bits & 3) as u8) - } - #[doc = "Bit 8 - Selects source for advancing the active sequence"] - #[inline(always)] - pub fn mode(&self) -> MODE_R { - MODE_R::new(((self.bits >> 8) & 1) != 0) - } -} -impl W { - #[doc = "Bits 0:1 - How a sequence is read from RAM and spread to the compare register"] - #[inline(always)] - #[must_use] - pub fn load(&mut self) -> LOAD_W<0> { - LOAD_W::new(self) - } - #[doc = "Bit 8 - Selects source for advancing the active sequence"] - #[inline(always)] - #[must_use] - pub fn mode(&mut self) -> MODE_W<8> { - 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 - } -} -#[doc = "Configuration of the decoder\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 [decoder](index.html) module"] -pub struct DECODER_SPEC; -impl crate::RegisterSpec for DECODER_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [decoder::R](R) reader structure"] -impl crate::Readable for DECODER_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [decoder::W](W) writer structure"] -impl crate::Writable for DECODER_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets DECODER to value 0"] -impl crate::Resettable for DECODER_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/pwm0/enable.rs b/down-the-stack/dk_pac/src/pwm0/enable.rs deleted file mode 100644 index 6ed543e..0000000 --- a/down-the-stack/dk_pac/src/pwm0/enable.rs +++ /dev/null @@ -1,126 +0,0 @@ -#[doc = "Register `ENABLE` 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 `ENABLE` 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 `ENABLE` reader - Enable or disable PWM module"] -pub type ENABLE_R = crate::BitReader; -#[doc = "Enable or disable PWM module\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum ENABLE_A { - #[doc = "0: Disabled"] - DISABLED = 0, - #[doc = "1: Enable"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: ENABLE_A) -> Self { - variant as u8 != 0 - } -} -impl ENABLE_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> ENABLE_A { - match self.bits { - false => ENABLE_A::DISABLED, - true => ENABLE_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == ENABLE_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == ENABLE_A::ENABLED - } -} -#[doc = "Field `ENABLE` writer - Enable or disable PWM module"] -pub type ENABLE_W<'a, const O: u8> = crate::BitWriter<'a, u32, ENABLE_SPEC, ENABLE_A, O>; -impl<'a, const O: u8> ENABLE_W<'a, O> { - #[doc = "Disabled"] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(ENABLE_A::DISABLED) - } - #[doc = "Enable"] - #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(ENABLE_A::ENABLED) - } -} -impl R { - #[doc = "Bit 0 - Enable or disable PWM module"] - #[inline(always)] - pub fn enable(&self) -> ENABLE_R { - ENABLE_R::new((self.bits & 1) != 0) - } -} -impl W { - #[doc = "Bit 0 - Enable or disable PWM module"] - #[inline(always)] - #[must_use] - pub fn enable(&mut self) -> ENABLE_W<0> { - 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 - } -} -#[doc = "PWM module enable register\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 [enable](index.html) module"] -pub struct ENABLE_SPEC; -impl crate::RegisterSpec for ENABLE_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [enable::R](R) reader structure"] -impl crate::Readable for ENABLE_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [enable::W](W) writer structure"] -impl crate::Writable for ENABLE_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets ENABLE to value 0"] -impl crate::Resettable for ENABLE_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/pwm0/events_loopsdone.rs b/down-the-stack/dk_pac/src/pwm0/events_loopsdone.rs deleted file mode 100644 index ef2265b..0000000 --- a/down-the-stack/dk_pac/src/pwm0/events_loopsdone.rs +++ /dev/null @@ -1,127 +0,0 @@ -#[doc = "Register `EVENTS_LOOPSDONE` 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 `EVENTS_LOOPSDONE` 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 `EVENTS_LOOPSDONE` reader - Concatenated sequences have been played the amount of times defined in LOOP.CNT"] -pub type EVENTS_LOOPSDONE_R = crate::BitReader; -#[doc = "Concatenated sequences have been played the amount of times defined in LOOP.CNT\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum EVENTS_LOOPSDONE_A { - #[doc = "0: Event not generated"] - NOT_GENERATED = 0, - #[doc = "1: Event generated"] - GENERATED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: EVENTS_LOOPSDONE_A) -> Self { - variant as u8 != 0 - } -} -impl EVENTS_LOOPSDONE_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> EVENTS_LOOPSDONE_A { - match self.bits { - false => EVENTS_LOOPSDONE_A::NOT_GENERATED, - true => EVENTS_LOOPSDONE_A::GENERATED, - } - } - #[doc = "Checks if the value of the field is `NOT_GENERATED`"] - #[inline(always)] - pub fn is_not_generated(&self) -> bool { - *self == EVENTS_LOOPSDONE_A::NOT_GENERATED - } - #[doc = "Checks if the value of the field is `GENERATED`"] - #[inline(always)] - pub fn is_generated(&self) -> bool { - *self == EVENTS_LOOPSDONE_A::GENERATED - } -} -#[doc = "Field `EVENTS_LOOPSDONE` writer - Concatenated sequences have been played the amount of times defined in LOOP.CNT"] -pub type EVENTS_LOOPSDONE_W<'a, const O: u8> = - crate::BitWriter<'a, u32, EVENTS_LOOPSDONE_SPEC, EVENTS_LOOPSDONE_A, O>; -impl<'a, const O: u8> EVENTS_LOOPSDONE_W<'a, O> { - #[doc = "Event not generated"] - #[inline(always)] - pub fn not_generated(self) -> &'a mut W { - self.variant(EVENTS_LOOPSDONE_A::NOT_GENERATED) - } - #[doc = "Event generated"] - #[inline(always)] - pub fn generated(self) -> &'a mut W { - self.variant(EVENTS_LOOPSDONE_A::GENERATED) - } -} -impl R { - #[doc = "Bit 0 - Concatenated sequences have been played the amount of times defined in LOOP.CNT"] - #[inline(always)] - pub fn events_loopsdone(&self) -> EVENTS_LOOPSDONE_R { - EVENTS_LOOPSDONE_R::new((self.bits & 1) != 0) - } -} -impl W { - #[doc = "Bit 0 - Concatenated sequences have been played the amount of times defined in LOOP.CNT"] - #[inline(always)] - #[must_use] - pub fn events_loopsdone(&mut self) -> EVENTS_LOOPSDONE_W<0> { - EVENTS_LOOPSDONE_W::new(self) - } - #[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 = "Concatenated sequences have been played the amount of times defined in LOOP.CNT\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 [events_loopsdone](index.html) module"] -pub struct EVENTS_LOOPSDONE_SPEC; -impl crate::RegisterSpec for EVENTS_LOOPSDONE_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [events_loopsdone::R](R) reader structure"] -impl crate::Readable for EVENTS_LOOPSDONE_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [events_loopsdone::W](W) writer structure"] -impl crate::Writable for EVENTS_LOOPSDONE_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets EVENTS_LOOPSDONE to value 0"] -impl crate::Resettable for EVENTS_LOOPSDONE_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/pwm0/events_pwmperiodend.rs b/down-the-stack/dk_pac/src/pwm0/events_pwmperiodend.rs deleted file mode 100644 index 241f508..0000000 --- a/down-the-stack/dk_pac/src/pwm0/events_pwmperiodend.rs +++ /dev/null @@ -1,127 +0,0 @@ -#[doc = "Register `EVENTS_PWMPERIODEND` 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 `EVENTS_PWMPERIODEND` 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 `EVENTS_PWMPERIODEND` reader - Emitted at the end of each PWM period"] -pub type EVENTS_PWMPERIODEND_R = crate::BitReader; -#[doc = "Emitted at the end of each PWM period\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum EVENTS_PWMPERIODEND_A { - #[doc = "0: Event not generated"] - NOT_GENERATED = 0, - #[doc = "1: Event generated"] - GENERATED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: EVENTS_PWMPERIODEND_A) -> Self { - variant as u8 != 0 - } -} -impl EVENTS_PWMPERIODEND_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> EVENTS_PWMPERIODEND_A { - match self.bits { - false => EVENTS_PWMPERIODEND_A::NOT_GENERATED, - true => EVENTS_PWMPERIODEND_A::GENERATED, - } - } - #[doc = "Checks if the value of the field is `NOT_GENERATED`"] - #[inline(always)] - pub fn is_not_generated(&self) -> bool { - *self == EVENTS_PWMPERIODEND_A::NOT_GENERATED - } - #[doc = "Checks if the value of the field is `GENERATED`"] - #[inline(always)] - pub fn is_generated(&self) -> bool { - *self == EVENTS_PWMPERIODEND_A::GENERATED - } -} -#[doc = "Field `EVENTS_PWMPERIODEND` writer - Emitted at the end of each PWM period"] -pub type EVENTS_PWMPERIODEND_W<'a, const O: u8> = - crate::BitWriter<'a, u32, EVENTS_PWMPERIODEND_SPEC, EVENTS_PWMPERIODEND_A, O>; -impl<'a, const O: u8> EVENTS_PWMPERIODEND_W<'a, O> { - #[doc = "Event not generated"] - #[inline(always)] - pub fn not_generated(self) -> &'a mut W { - self.variant(EVENTS_PWMPERIODEND_A::NOT_GENERATED) - } - #[doc = "Event generated"] - #[inline(always)] - pub fn generated(self) -> &'a mut W { - self.variant(EVENTS_PWMPERIODEND_A::GENERATED) - } -} -impl R { - #[doc = "Bit 0 - Emitted at the end of each PWM period"] - #[inline(always)] - pub fn events_pwmperiodend(&self) -> EVENTS_PWMPERIODEND_R { - EVENTS_PWMPERIODEND_R::new((self.bits & 1) != 0) - } -} -impl W { - #[doc = "Bit 0 - Emitted at the end of each PWM period"] - #[inline(always)] - #[must_use] - pub fn events_pwmperiodend(&mut self) -> EVENTS_PWMPERIODEND_W<0> { - EVENTS_PWMPERIODEND_W::new(self) - } - #[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 = "Emitted at the end of each PWM period\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 [events_pwmperiodend](index.html) module"] -pub struct EVENTS_PWMPERIODEND_SPEC; -impl crate::RegisterSpec for EVENTS_PWMPERIODEND_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [events_pwmperiodend::R](R) reader structure"] -impl crate::Readable for EVENTS_PWMPERIODEND_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [events_pwmperiodend::W](W) writer structure"] -impl crate::Writable for EVENTS_PWMPERIODEND_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets EVENTS_PWMPERIODEND to value 0"] -impl crate::Resettable for EVENTS_PWMPERIODEND_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/pwm0/events_seqend.rs b/down-the-stack/dk_pac/src/pwm0/events_seqend.rs deleted file mode 100644 index 8ada4a4..0000000 --- a/down-the-stack/dk_pac/src/pwm0/events_seqend.rs +++ /dev/null @@ -1,128 +0,0 @@ -#[doc = "Register `EVENTS_SEQEND[%s]` 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 `EVENTS_SEQEND[%s]` 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 `EVENTS_SEQEND` reader - Emitted at end of every sequence n, when last value from RAM has been applied to wave counter"] -pub type EVENTS_SEQEND_R = crate::BitReader; -#[doc = "Emitted at end of every sequence n, when last value from RAM has been applied to wave counter\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum EVENTS_SEQEND_A { - #[doc = "0: Event not generated"] - NOT_GENERATED = 0, - #[doc = "1: Event generated"] - GENERATED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: EVENTS_SEQEND_A) -> Self { - variant as u8 != 0 - } -} -impl EVENTS_SEQEND_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> EVENTS_SEQEND_A { - match self.bits { - false => EVENTS_SEQEND_A::NOT_GENERATED, - true => EVENTS_SEQEND_A::GENERATED, - } - } - #[doc = "Checks if the value of the field is `NOT_GENERATED`"] - #[inline(always)] - pub fn is_not_generated(&self) -> bool { - *self == EVENTS_SEQEND_A::NOT_GENERATED - } - #[doc = "Checks if the value of the field is `GENERATED`"] - #[inline(always)] - pub fn is_generated(&self) -> bool { - *self == EVENTS_SEQEND_A::GENERATED - } -} -#[doc = "Field `EVENTS_SEQEND` writer - Emitted at end of every sequence n, when last value from RAM has been applied to wave counter"] -pub type EVENTS_SEQEND_W<'a, const O: u8> = - crate::BitWriter<'a, u32, EVENTS_SEQEND_SPEC, EVENTS_SEQEND_A, O>; -impl<'a, const O: u8> EVENTS_SEQEND_W<'a, O> { - #[doc = "Event not generated"] - #[inline(always)] - pub fn not_generated(self) -> &'a mut W { - self.variant(EVENTS_SEQEND_A::NOT_GENERATED) - } - #[doc = "Event generated"] - #[inline(always)] - pub fn generated(self) -> &'a mut W { - self.variant(EVENTS_SEQEND_A::GENERATED) - } -} -impl R { - #[doc = "Bit 0 - Emitted at end of every sequence n, when last value from RAM has been applied to wave counter"] - #[inline(always)] - pub fn events_seqend(&self) -> EVENTS_SEQEND_R { - EVENTS_SEQEND_R::new((self.bits & 1) != 0) - } -} -impl W { - #[doc = "Bit 0 - Emitted at end of every sequence n, when last value from RAM has been applied to wave counter"] - #[inline(always)] - #[must_use] - pub fn events_seqend(&mut self) -> EVENTS_SEQEND_W<0> { - EVENTS_SEQEND_W::new(self) - } - #[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 = "Description collection: Emitted at end of every sequence n, when last value from RAM has been applied to wave counter\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 [events_seqend](index.html) module"] -pub struct EVENTS_SEQEND_SPEC; -impl crate::RegisterSpec for EVENTS_SEQEND_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [events_seqend::R](R) reader structure"] -impl crate::Readable for EVENTS_SEQEND_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [events_seqend::W](W) writer structure"] -impl crate::Writable for EVENTS_SEQEND_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets EVENTS_SEQEND[%s] -to value 0"] -impl crate::Resettable for EVENTS_SEQEND_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/pwm0/events_seqstarted.rs b/down-the-stack/dk_pac/src/pwm0/events_seqstarted.rs deleted file mode 100644 index 92f7a4b..0000000 --- a/down-the-stack/dk_pac/src/pwm0/events_seqstarted.rs +++ /dev/null @@ -1,128 +0,0 @@ -#[doc = "Register `EVENTS_SEQSTARTED[%s]` 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 `EVENTS_SEQSTARTED[%s]` 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 `EVENTS_SEQSTARTED` reader - First PWM period started on sequence n"] -pub type EVENTS_SEQSTARTED_R = crate::BitReader; -#[doc = "First PWM period started on sequence n\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum EVENTS_SEQSTARTED_A { - #[doc = "0: Event not generated"] - NOT_GENERATED = 0, - #[doc = "1: Event generated"] - GENERATED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: EVENTS_SEQSTARTED_A) -> Self { - variant as u8 != 0 - } -} -impl EVENTS_SEQSTARTED_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> EVENTS_SEQSTARTED_A { - match self.bits { - false => EVENTS_SEQSTARTED_A::NOT_GENERATED, - true => EVENTS_SEQSTARTED_A::GENERATED, - } - } - #[doc = "Checks if the value of the field is `NOT_GENERATED`"] - #[inline(always)] - pub fn is_not_generated(&self) -> bool { - *self == EVENTS_SEQSTARTED_A::NOT_GENERATED - } - #[doc = "Checks if the value of the field is `GENERATED`"] - #[inline(always)] - pub fn is_generated(&self) -> bool { - *self == EVENTS_SEQSTARTED_A::GENERATED - } -} -#[doc = "Field `EVENTS_SEQSTARTED` writer - First PWM period started on sequence n"] -pub type EVENTS_SEQSTARTED_W<'a, const O: u8> = - crate::BitWriter<'a, u32, EVENTS_SEQSTARTED_SPEC, EVENTS_SEQSTARTED_A, O>; -impl<'a, const O: u8> EVENTS_SEQSTARTED_W<'a, O> { - #[doc = "Event not generated"] - #[inline(always)] - pub fn not_generated(self) -> &'a mut W { - self.variant(EVENTS_SEQSTARTED_A::NOT_GENERATED) - } - #[doc = "Event generated"] - #[inline(always)] - pub fn generated(self) -> &'a mut W { - self.variant(EVENTS_SEQSTARTED_A::GENERATED) - } -} -impl R { - #[doc = "Bit 0 - First PWM period started on sequence n"] - #[inline(always)] - pub fn events_seqstarted(&self) -> EVENTS_SEQSTARTED_R { - EVENTS_SEQSTARTED_R::new((self.bits & 1) != 0) - } -} -impl W { - #[doc = "Bit 0 - First PWM period started on sequence n"] - #[inline(always)] - #[must_use] - pub fn events_seqstarted(&mut self) -> EVENTS_SEQSTARTED_W<0> { - EVENTS_SEQSTARTED_W::new(self) - } - #[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 = "Description collection: First PWM period started on sequence n\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 [events_seqstarted](index.html) module"] -pub struct EVENTS_SEQSTARTED_SPEC; -impl crate::RegisterSpec for EVENTS_SEQSTARTED_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [events_seqstarted::R](R) reader structure"] -impl crate::Readable for EVENTS_SEQSTARTED_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [events_seqstarted::W](W) writer structure"] -impl crate::Writable for EVENTS_SEQSTARTED_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets EVENTS_SEQSTARTED[%s] -to value 0"] -impl crate::Resettable for EVENTS_SEQSTARTED_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/pwm0/events_stopped.rs b/down-the-stack/dk_pac/src/pwm0/events_stopped.rs deleted file mode 100644 index 0e27fa7..0000000 --- a/down-the-stack/dk_pac/src/pwm0/events_stopped.rs +++ /dev/null @@ -1,127 +0,0 @@ -#[doc = "Register `EVENTS_STOPPED` 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 `EVENTS_STOPPED` 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 `EVENTS_STOPPED` reader - Response to STOP task, emitted when PWM pulses are no longer generated"] -pub type EVENTS_STOPPED_R = crate::BitReader; -#[doc = "Response to STOP task, emitted when PWM pulses are no longer generated\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum EVENTS_STOPPED_A { - #[doc = "0: Event not generated"] - NOT_GENERATED = 0, - #[doc = "1: Event generated"] - GENERATED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: EVENTS_STOPPED_A) -> Self { - variant as u8 != 0 - } -} -impl EVENTS_STOPPED_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> EVENTS_STOPPED_A { - match self.bits { - false => EVENTS_STOPPED_A::NOT_GENERATED, - true => EVENTS_STOPPED_A::GENERATED, - } - } - #[doc = "Checks if the value of the field is `NOT_GENERATED`"] - #[inline(always)] - pub fn is_not_generated(&self) -> bool { - *self == EVENTS_STOPPED_A::NOT_GENERATED - } - #[doc = "Checks if the value of the field is `GENERATED`"] - #[inline(always)] - pub fn is_generated(&self) -> bool { - *self == EVENTS_STOPPED_A::GENERATED - } -} -#[doc = "Field `EVENTS_STOPPED` writer - Response to STOP task, emitted when PWM pulses are no longer generated"] -pub type EVENTS_STOPPED_W<'a, const O: u8> = - crate::BitWriter<'a, u32, EVENTS_STOPPED_SPEC, EVENTS_STOPPED_A, O>; -impl<'a, const O: u8> EVENTS_STOPPED_W<'a, O> { - #[doc = "Event not generated"] - #[inline(always)] - pub fn not_generated(self) -> &'a mut W { - self.variant(EVENTS_STOPPED_A::NOT_GENERATED) - } - #[doc = "Event generated"] - #[inline(always)] - pub fn generated(self) -> &'a mut W { - self.variant(EVENTS_STOPPED_A::GENERATED) - } -} -impl R { - #[doc = "Bit 0 - Response to STOP task, emitted when PWM pulses are no longer generated"] - #[inline(always)] - pub fn events_stopped(&self) -> EVENTS_STOPPED_R { - EVENTS_STOPPED_R::new((self.bits & 1) != 0) - } -} -impl W { - #[doc = "Bit 0 - Response to STOP task, emitted when PWM pulses are no longer generated"] - #[inline(always)] - #[must_use] - pub fn events_stopped(&mut self) -> EVENTS_STOPPED_W<0> { - EVENTS_STOPPED_W::new(self) - } - #[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 = "Response to STOP task, emitted when PWM pulses are no longer generated\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 [events_stopped](index.html) module"] -pub struct EVENTS_STOPPED_SPEC; -impl crate::RegisterSpec for EVENTS_STOPPED_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [events_stopped::R](R) reader structure"] -impl crate::Readable for EVENTS_STOPPED_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [events_stopped::W](W) writer structure"] -impl crate::Writable for EVENTS_STOPPED_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets EVENTS_STOPPED to value 0"] -impl crate::Resettable for EVENTS_STOPPED_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/pwm0/inten.rs b/down-the-stack/dk_pac/src/pwm0/inten.rs deleted file mode 100644 index 64391b5..0000000 --- a/down-the-stack/dk_pac/src/pwm0/inten.rs +++ /dev/null @@ -1,492 +0,0 @@ -#[doc = "Register `INTEN` 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 `INTEN` 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 `STOPPED` reader - Enable or disable interrupt for event STOPPED"] -pub type STOPPED_R = crate::BitReader; -#[doc = "Enable or disable interrupt for event STOPPED\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum STOPPED_A { - #[doc = "0: Disable"] - DISABLED = 0, - #[doc = "1: Enable"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: STOPPED_A) -> Self { - variant as u8 != 0 - } -} -impl STOPPED_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> STOPPED_A { - match self.bits { - false => STOPPED_A::DISABLED, - true => STOPPED_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == STOPPED_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == STOPPED_A::ENABLED - } -} -#[doc = "Field `STOPPED` writer - Enable or disable interrupt for event STOPPED"] -pub type STOPPED_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTEN_SPEC, STOPPED_A, O>; -impl<'a, const O: u8> STOPPED_W<'a, O> { - #[doc = "Disable"] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(STOPPED_A::DISABLED) - } - #[doc = "Enable"] - #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(STOPPED_A::ENABLED) - } -} -#[doc = "Field `SEQSTARTED0` reader - Enable or disable interrupt for event SEQSTARTED\\[0\\]"] -pub type SEQSTARTED0_R = crate::BitReader; -#[doc = "Enable or disable interrupt for event SEQSTARTED\\[0\\]\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum SEQSTARTED0_A { - #[doc = "0: Disable"] - DISABLED = 0, - #[doc = "1: Enable"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: SEQSTARTED0_A) -> Self { - variant as u8 != 0 - } -} -impl SEQSTARTED0_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> SEQSTARTED0_A { - match self.bits { - false => SEQSTARTED0_A::DISABLED, - true => SEQSTARTED0_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == SEQSTARTED0_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == SEQSTARTED0_A::ENABLED - } -} -#[doc = "Field `SEQSTARTED0` writer - Enable or disable interrupt for event SEQSTARTED\\[0\\]"] -pub type SEQSTARTED0_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTEN_SPEC, SEQSTARTED0_A, O>; -impl<'a, const O: u8> SEQSTARTED0_W<'a, O> { - #[doc = "Disable"] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(SEQSTARTED0_A::DISABLED) - } - #[doc = "Enable"] - #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(SEQSTARTED0_A::ENABLED) - } -} -#[doc = "Field `SEQSTARTED1` reader - Enable or disable interrupt for event SEQSTARTED\\[1\\]"] -pub type SEQSTARTED1_R = crate::BitReader; -#[doc = "Enable or disable interrupt for event SEQSTARTED\\[1\\]\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum SEQSTARTED1_A { - #[doc = "0: Disable"] - DISABLED = 0, - #[doc = "1: Enable"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: SEQSTARTED1_A) -> Self { - variant as u8 != 0 - } -} -impl SEQSTARTED1_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> SEQSTARTED1_A { - match self.bits { - false => SEQSTARTED1_A::DISABLED, - true => SEQSTARTED1_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == SEQSTARTED1_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == SEQSTARTED1_A::ENABLED - } -} -#[doc = "Field `SEQSTARTED1` writer - Enable or disable interrupt for event SEQSTARTED\\[1\\]"] -pub type SEQSTARTED1_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTEN_SPEC, SEQSTARTED1_A, O>; -impl<'a, const O: u8> SEQSTARTED1_W<'a, O> { - #[doc = "Disable"] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(SEQSTARTED1_A::DISABLED) - } - #[doc = "Enable"] - #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(SEQSTARTED1_A::ENABLED) - } -} -#[doc = "Field `SEQEND0` reader - Enable or disable interrupt for event SEQEND\\[0\\]"] -pub type SEQEND0_R = crate::BitReader; -#[doc = "Enable or disable interrupt for event SEQEND\\[0\\]\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum SEQEND0_A { - #[doc = "0: Disable"] - DISABLED = 0, - #[doc = "1: Enable"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: SEQEND0_A) -> Self { - variant as u8 != 0 - } -} -impl SEQEND0_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> SEQEND0_A { - match self.bits { - false => SEQEND0_A::DISABLED, - true => SEQEND0_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == SEQEND0_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == SEQEND0_A::ENABLED - } -} -#[doc = "Field `SEQEND0` writer - Enable or disable interrupt for event SEQEND\\[0\\]"] -pub type SEQEND0_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTEN_SPEC, SEQEND0_A, O>; -impl<'a, const O: u8> SEQEND0_W<'a, O> { - #[doc = "Disable"] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(SEQEND0_A::DISABLED) - } - #[doc = "Enable"] - #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(SEQEND0_A::ENABLED) - } -} -#[doc = "Field `SEQEND1` reader - Enable or disable interrupt for event SEQEND\\[1\\]"] -pub type SEQEND1_R = crate::BitReader; -#[doc = "Enable or disable interrupt for event SEQEND\\[1\\]\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum SEQEND1_A { - #[doc = "0: Disable"] - DISABLED = 0, - #[doc = "1: Enable"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: SEQEND1_A) -> Self { - variant as u8 != 0 - } -} -impl SEQEND1_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> SEQEND1_A { - match self.bits { - false => SEQEND1_A::DISABLED, - true => SEQEND1_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == SEQEND1_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == SEQEND1_A::ENABLED - } -} -#[doc = "Field `SEQEND1` writer - Enable or disable interrupt for event SEQEND\\[1\\]"] -pub type SEQEND1_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTEN_SPEC, SEQEND1_A, O>; -impl<'a, const O: u8> SEQEND1_W<'a, O> { - #[doc = "Disable"] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(SEQEND1_A::DISABLED) - } - #[doc = "Enable"] - #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(SEQEND1_A::ENABLED) - } -} -#[doc = "Field `PWMPERIODEND` reader - Enable or disable interrupt for event PWMPERIODEND"] -pub type PWMPERIODEND_R = crate::BitReader; -#[doc = "Enable or disable interrupt for event PWMPERIODEND\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PWMPERIODEND_A { - #[doc = "0: Disable"] - DISABLED = 0, - #[doc = "1: Enable"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PWMPERIODEND_A) -> Self { - variant as u8 != 0 - } -} -impl PWMPERIODEND_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> PWMPERIODEND_A { - match self.bits { - false => PWMPERIODEND_A::DISABLED, - true => PWMPERIODEND_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == PWMPERIODEND_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == PWMPERIODEND_A::ENABLED - } -} -#[doc = "Field `PWMPERIODEND` writer - Enable or disable interrupt for event PWMPERIODEND"] -pub type PWMPERIODEND_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTEN_SPEC, PWMPERIODEND_A, O>; -impl<'a, const O: u8> PWMPERIODEND_W<'a, O> { - #[doc = "Disable"] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(PWMPERIODEND_A::DISABLED) - } - #[doc = "Enable"] - #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(PWMPERIODEND_A::ENABLED) - } -} -#[doc = "Field `LOOPSDONE` reader - Enable or disable interrupt for event LOOPSDONE"] -pub type LOOPSDONE_R = crate::BitReader; -#[doc = "Enable or disable interrupt for event LOOPSDONE\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum LOOPSDONE_A { - #[doc = "0: Disable"] - DISABLED = 0, - #[doc = "1: Enable"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: LOOPSDONE_A) -> Self { - variant as u8 != 0 - } -} -impl LOOPSDONE_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> LOOPSDONE_A { - match self.bits { - false => LOOPSDONE_A::DISABLED, - true => LOOPSDONE_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == LOOPSDONE_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == LOOPSDONE_A::ENABLED - } -} -#[doc = "Field `LOOPSDONE` writer - Enable or disable interrupt for event LOOPSDONE"] -pub type LOOPSDONE_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTEN_SPEC, LOOPSDONE_A, O>; -impl<'a, const O: u8> LOOPSDONE_W<'a, O> { - #[doc = "Disable"] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(LOOPSDONE_A::DISABLED) - } - #[doc = "Enable"] - #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(LOOPSDONE_A::ENABLED) - } -} -impl R { - #[doc = "Bit 1 - Enable or disable interrupt for event STOPPED"] - #[inline(always)] - pub fn stopped(&self) -> STOPPED_R { - STOPPED_R::new(((self.bits >> 1) & 1) != 0) - } - #[doc = "Bit 2 - Enable or disable interrupt for event SEQSTARTED\\[0\\]"] - #[inline(always)] - pub fn seqstarted0(&self) -> SEQSTARTED0_R { - SEQSTARTED0_R::new(((self.bits >> 2) & 1) != 0) - } - #[doc = "Bit 3 - Enable or disable interrupt for event SEQSTARTED\\[1\\]"] - #[inline(always)] - pub fn seqstarted1(&self) -> SEQSTARTED1_R { - SEQSTARTED1_R::new(((self.bits >> 3) & 1) != 0) - } - #[doc = "Bit 4 - Enable or disable interrupt for event SEQEND\\[0\\]"] - #[inline(always)] - pub fn seqend0(&self) -> SEQEND0_R { - SEQEND0_R::new(((self.bits >> 4) & 1) != 0) - } - #[doc = "Bit 5 - Enable or disable interrupt for event SEQEND\\[1\\]"] - #[inline(always)] - pub fn seqend1(&self) -> SEQEND1_R { - SEQEND1_R::new(((self.bits >> 5) & 1) != 0) - } - #[doc = "Bit 6 - Enable or disable interrupt for event PWMPERIODEND"] - #[inline(always)] - pub fn pwmperiodend(&self) -> PWMPERIODEND_R { - PWMPERIODEND_R::new(((self.bits >> 6) & 1) != 0) - } - #[doc = "Bit 7 - Enable or disable interrupt for event LOOPSDONE"] - #[inline(always)] - pub fn loopsdone(&self) -> LOOPSDONE_R { - LOOPSDONE_R::new(((self.bits >> 7) & 1) != 0) - } -} -impl W { - #[doc = "Bit 1 - Enable or disable interrupt for event STOPPED"] - #[inline(always)] - #[must_use] - pub fn stopped(&mut self) -> STOPPED_W<1> { - STOPPED_W::new(self) - } - #[doc = "Bit 2 - Enable or disable interrupt for event SEQSTARTED\\[0\\]"] - #[inline(always)] - #[must_use] - pub fn seqstarted0(&mut self) -> SEQSTARTED0_W<2> { - SEQSTARTED0_W::new(self) - } - #[doc = "Bit 3 - Enable or disable interrupt for event SEQSTARTED\\[1\\]"] - #[inline(always)] - #[must_use] - pub fn seqstarted1(&mut self) -> SEQSTARTED1_W<3> { - SEQSTARTED1_W::new(self) - } - #[doc = "Bit 4 - Enable or disable interrupt for event SEQEND\\[0\\]"] - #[inline(always)] - #[must_use] - pub fn seqend0(&mut self) -> SEQEND0_W<4> { - SEQEND0_W::new(self) - } - #[doc = "Bit 5 - Enable or disable interrupt for event SEQEND\\[1\\]"] - #[inline(always)] - #[must_use] - pub fn seqend1(&mut self) -> SEQEND1_W<5> { - SEQEND1_W::new(self) - } - #[doc = "Bit 6 - Enable or disable interrupt for event PWMPERIODEND"] - #[inline(always)] - #[must_use] - pub fn pwmperiodend(&mut self) -> PWMPERIODEND_W<6> { - PWMPERIODEND_W::new(self) - } - #[doc = "Bit 7 - Enable or disable interrupt for event LOOPSDONE"] - #[inline(always)] - #[must_use] - pub fn loopsdone(&mut self) -> LOOPSDONE_W<7> { - LOOPSDONE_W::new(self) - } - #[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 = "Enable or disable interrupt\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 [inten](index.html) module"] -pub struct INTEN_SPEC; -impl crate::RegisterSpec for INTEN_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [inten::R](R) reader structure"] -impl crate::Readable for INTEN_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [inten::W](W) writer structure"] -impl crate::Writable for INTEN_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets INTEN to value 0"] -impl crate::Resettable for INTEN_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/pwm0/intenclr.rs b/down-the-stack/dk_pac/src/pwm0/intenclr.rs deleted file mode 100644 index 00a96a6..0000000 --- a/down-the-stack/dk_pac/src/pwm0/intenclr.rs +++ /dev/null @@ -1,544 +0,0 @@ -#[doc = "Register `INTENCLR` 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 `INTENCLR` 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 `STOPPED` reader - Write '1' to disable interrupt for event STOPPED"] -pub type STOPPED_R = crate::BitReader; -#[doc = "Write '1' to disable interrupt for event STOPPED\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum STOPPED_A { - #[doc = "0: Read: Disabled"] - DISABLED = 0, - #[doc = "1: Read: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: STOPPED_A) -> Self { - variant as u8 != 0 - } -} -impl STOPPED_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> STOPPED_A { - match self.bits { - false => STOPPED_A::DISABLED, - true => STOPPED_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == STOPPED_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == STOPPED_A::ENABLED - } -} -#[doc = "Write '1' to disable interrupt for event STOPPED\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum STOPPED_AW { - #[doc = "1: Disable"] - CLEAR = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: STOPPED_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `STOPPED` writer - Write '1' to disable interrupt for event STOPPED"] -pub type STOPPED_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENCLR_SPEC, STOPPED_AW, O>; -impl<'a, const O: u8> STOPPED_W<'a, O> { - #[doc = "Disable"] - #[inline(always)] - pub fn clear(self) -> &'a mut W { - self.variant(STOPPED_AW::CLEAR) - } -} -#[doc = "Field `SEQSTARTED0` reader - Write '1' to disable interrupt for event SEQSTARTED\\[0\\]"] -pub type SEQSTARTED0_R = crate::BitReader; -#[doc = "Write '1' to disable interrupt for event SEQSTARTED\\[0\\]\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum SEQSTARTED0_A { - #[doc = "0: Read: Disabled"] - DISABLED = 0, - #[doc = "1: Read: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: SEQSTARTED0_A) -> Self { - variant as u8 != 0 - } -} -impl SEQSTARTED0_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> SEQSTARTED0_A { - match self.bits { - false => SEQSTARTED0_A::DISABLED, - true => SEQSTARTED0_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == SEQSTARTED0_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == SEQSTARTED0_A::ENABLED - } -} -#[doc = "Write '1' to disable interrupt for event SEQSTARTED\\[0\\]\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum SEQSTARTED0_AW { - #[doc = "1: Disable"] - CLEAR = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: SEQSTARTED0_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `SEQSTARTED0` writer - Write '1' to disable interrupt for event SEQSTARTED\\[0\\]"] -pub type SEQSTARTED0_W<'a, const O: u8> = - crate::BitWriter<'a, u32, INTENCLR_SPEC, SEQSTARTED0_AW, O>; -impl<'a, const O: u8> SEQSTARTED0_W<'a, O> { - #[doc = "Disable"] - #[inline(always)] - pub fn clear(self) -> &'a mut W { - self.variant(SEQSTARTED0_AW::CLEAR) - } -} -#[doc = "Field `SEQSTARTED1` reader - Write '1' to disable interrupt for event SEQSTARTED\\[1\\]"] -pub type SEQSTARTED1_R = crate::BitReader; -#[doc = "Write '1' to disable interrupt for event SEQSTARTED\\[1\\]\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum SEQSTARTED1_A { - #[doc = "0: Read: Disabled"] - DISABLED = 0, - #[doc = "1: Read: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: SEQSTARTED1_A) -> Self { - variant as u8 != 0 - } -} -impl SEQSTARTED1_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> SEQSTARTED1_A { - match self.bits { - false => SEQSTARTED1_A::DISABLED, - true => SEQSTARTED1_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == SEQSTARTED1_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == SEQSTARTED1_A::ENABLED - } -} -#[doc = "Write '1' to disable interrupt for event SEQSTARTED\\[1\\]\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum SEQSTARTED1_AW { - #[doc = "1: Disable"] - CLEAR = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: SEQSTARTED1_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `SEQSTARTED1` writer - Write '1' to disable interrupt for event SEQSTARTED\\[1\\]"] -pub type SEQSTARTED1_W<'a, const O: u8> = - crate::BitWriter<'a, u32, INTENCLR_SPEC, SEQSTARTED1_AW, O>; -impl<'a, const O: u8> SEQSTARTED1_W<'a, O> { - #[doc = "Disable"] - #[inline(always)] - pub fn clear(self) -> &'a mut W { - self.variant(SEQSTARTED1_AW::CLEAR) - } -} -#[doc = "Field `SEQEND0` reader - Write '1' to disable interrupt for event SEQEND\\[0\\]"] -pub type SEQEND0_R = crate::BitReader; -#[doc = "Write '1' to disable interrupt for event SEQEND\\[0\\]\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum SEQEND0_A { - #[doc = "0: Read: Disabled"] - DISABLED = 0, - #[doc = "1: Read: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: SEQEND0_A) -> Self { - variant as u8 != 0 - } -} -impl SEQEND0_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> SEQEND0_A { - match self.bits { - false => SEQEND0_A::DISABLED, - true => SEQEND0_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == SEQEND0_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == SEQEND0_A::ENABLED - } -} -#[doc = "Write '1' to disable interrupt for event SEQEND\\[0\\]\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum SEQEND0_AW { - #[doc = "1: Disable"] - CLEAR = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: SEQEND0_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `SEQEND0` writer - Write '1' to disable interrupt for event SEQEND\\[0\\]"] -pub type SEQEND0_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENCLR_SPEC, SEQEND0_AW, O>; -impl<'a, const O: u8> SEQEND0_W<'a, O> { - #[doc = "Disable"] - #[inline(always)] - pub fn clear(self) -> &'a mut W { - self.variant(SEQEND0_AW::CLEAR) - } -} -#[doc = "Field `SEQEND1` reader - Write '1' to disable interrupt for event SEQEND\\[1\\]"] -pub type SEQEND1_R = crate::BitReader; -#[doc = "Write '1' to disable interrupt for event SEQEND\\[1\\]\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum SEQEND1_A { - #[doc = "0: Read: Disabled"] - DISABLED = 0, - #[doc = "1: Read: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: SEQEND1_A) -> Self { - variant as u8 != 0 - } -} -impl SEQEND1_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> SEQEND1_A { - match self.bits { - false => SEQEND1_A::DISABLED, - true => SEQEND1_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == SEQEND1_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == SEQEND1_A::ENABLED - } -} -#[doc = "Write '1' to disable interrupt for event SEQEND\\[1\\]\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum SEQEND1_AW { - #[doc = "1: Disable"] - CLEAR = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: SEQEND1_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `SEQEND1` writer - Write '1' to disable interrupt for event SEQEND\\[1\\]"] -pub type SEQEND1_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENCLR_SPEC, SEQEND1_AW, O>; -impl<'a, const O: u8> SEQEND1_W<'a, O> { - #[doc = "Disable"] - #[inline(always)] - pub fn clear(self) -> &'a mut W { - self.variant(SEQEND1_AW::CLEAR) - } -} -#[doc = "Field `PWMPERIODEND` reader - Write '1' to disable interrupt for event PWMPERIODEND"] -pub type PWMPERIODEND_R = crate::BitReader; -#[doc = "Write '1' to disable interrupt for event PWMPERIODEND\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PWMPERIODEND_A { - #[doc = "0: Read: Disabled"] - DISABLED = 0, - #[doc = "1: Read: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PWMPERIODEND_A) -> Self { - variant as u8 != 0 - } -} -impl PWMPERIODEND_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> PWMPERIODEND_A { - match self.bits { - false => PWMPERIODEND_A::DISABLED, - true => PWMPERIODEND_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == PWMPERIODEND_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == PWMPERIODEND_A::ENABLED - } -} -#[doc = "Write '1' to disable interrupt for event PWMPERIODEND\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PWMPERIODEND_AW { - #[doc = "1: Disable"] - CLEAR = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PWMPERIODEND_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `PWMPERIODEND` writer - Write '1' to disable interrupt for event PWMPERIODEND"] -pub type PWMPERIODEND_W<'a, const O: u8> = - crate::BitWriter<'a, u32, INTENCLR_SPEC, PWMPERIODEND_AW, O>; -impl<'a, const O: u8> PWMPERIODEND_W<'a, O> { - #[doc = "Disable"] - #[inline(always)] - pub fn clear(self) -> &'a mut W { - self.variant(PWMPERIODEND_AW::CLEAR) - } -} -#[doc = "Field `LOOPSDONE` reader - Write '1' to disable interrupt for event LOOPSDONE"] -pub type LOOPSDONE_R = crate::BitReader; -#[doc = "Write '1' to disable interrupt for event LOOPSDONE\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum LOOPSDONE_A { - #[doc = "0: Read: Disabled"] - DISABLED = 0, - #[doc = "1: Read: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: LOOPSDONE_A) -> Self { - variant as u8 != 0 - } -} -impl LOOPSDONE_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> LOOPSDONE_A { - match self.bits { - false => LOOPSDONE_A::DISABLED, - true => LOOPSDONE_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == LOOPSDONE_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == LOOPSDONE_A::ENABLED - } -} -#[doc = "Write '1' to disable interrupt for event LOOPSDONE\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum LOOPSDONE_AW { - #[doc = "1: Disable"] - CLEAR = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: LOOPSDONE_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `LOOPSDONE` writer - Write '1' to disable interrupt for event LOOPSDONE"] -pub type LOOPSDONE_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENCLR_SPEC, LOOPSDONE_AW, O>; -impl<'a, const O: u8> LOOPSDONE_W<'a, O> { - #[doc = "Disable"] - #[inline(always)] - pub fn clear(self) -> &'a mut W { - self.variant(LOOPSDONE_AW::CLEAR) - } -} -impl R { - #[doc = "Bit 1 - Write '1' to disable interrupt for event STOPPED"] - #[inline(always)] - pub fn stopped(&self) -> STOPPED_R { - STOPPED_R::new(((self.bits >> 1) & 1) != 0) - } - #[doc = "Bit 2 - Write '1' to disable interrupt for event SEQSTARTED\\[0\\]"] - #[inline(always)] - pub fn seqstarted0(&self) -> SEQSTARTED0_R { - SEQSTARTED0_R::new(((self.bits >> 2) & 1) != 0) - } - #[doc = "Bit 3 - Write '1' to disable interrupt for event SEQSTARTED\\[1\\]"] - #[inline(always)] - pub fn seqstarted1(&self) -> SEQSTARTED1_R { - SEQSTARTED1_R::new(((self.bits >> 3) & 1) != 0) - } - #[doc = "Bit 4 - Write '1' to disable interrupt for event SEQEND\\[0\\]"] - #[inline(always)] - pub fn seqend0(&self) -> SEQEND0_R { - SEQEND0_R::new(((self.bits >> 4) & 1) != 0) - } - #[doc = "Bit 5 - Write '1' to disable interrupt for event SEQEND\\[1\\]"] - #[inline(always)] - pub fn seqend1(&self) -> SEQEND1_R { - SEQEND1_R::new(((self.bits >> 5) & 1) != 0) - } - #[doc = "Bit 6 - Write '1' to disable interrupt for event PWMPERIODEND"] - #[inline(always)] - pub fn pwmperiodend(&self) -> PWMPERIODEND_R { - PWMPERIODEND_R::new(((self.bits >> 6) & 1) != 0) - } - #[doc = "Bit 7 - Write '1' to disable interrupt for event LOOPSDONE"] - #[inline(always)] - pub fn loopsdone(&self) -> LOOPSDONE_R { - LOOPSDONE_R::new(((self.bits >> 7) & 1) != 0) - } -} -impl W { - #[doc = "Bit 1 - Write '1' to disable interrupt for event STOPPED"] - #[inline(always)] - #[must_use] - pub fn stopped(&mut self) -> STOPPED_W<1> { - STOPPED_W::new(self) - } - #[doc = "Bit 2 - Write '1' to disable interrupt for event SEQSTARTED\\[0\\]"] - #[inline(always)] - #[must_use] - pub fn seqstarted0(&mut self) -> SEQSTARTED0_W<2> { - SEQSTARTED0_W::new(self) - } - #[doc = "Bit 3 - Write '1' to disable interrupt for event SEQSTARTED\\[1\\]"] - #[inline(always)] - #[must_use] - pub fn seqstarted1(&mut self) -> SEQSTARTED1_W<3> { - SEQSTARTED1_W::new(self) - } - #[doc = "Bit 4 - Write '1' to disable interrupt for event SEQEND\\[0\\]"] - #[inline(always)] - #[must_use] - pub fn seqend0(&mut self) -> SEQEND0_W<4> { - SEQEND0_W::new(self) - } - #[doc = "Bit 5 - Write '1' to disable interrupt for event SEQEND\\[1\\]"] - #[inline(always)] - #[must_use] - pub fn seqend1(&mut self) -> SEQEND1_W<5> { - SEQEND1_W::new(self) - } - #[doc = "Bit 6 - Write '1' to disable interrupt for event PWMPERIODEND"] - #[inline(always)] - #[must_use] - pub fn pwmperiodend(&mut self) -> PWMPERIODEND_W<6> { - PWMPERIODEND_W::new(self) - } - #[doc = "Bit 7 - Write '1' to disable interrupt for event LOOPSDONE"] - #[inline(always)] - #[must_use] - pub fn loopsdone(&mut self) -> LOOPSDONE_W<7> { - LOOPSDONE_W::new(self) - } - #[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 = "Disable interrupt\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 [intenclr](index.html) module"] -pub struct INTENCLR_SPEC; -impl crate::RegisterSpec for INTENCLR_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [intenclr::R](R) reader structure"] -impl crate::Readable for INTENCLR_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [intenclr::W](W) writer structure"] -impl crate::Writable for INTENCLR_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets INTENCLR to value 0"] -impl crate::Resettable for INTENCLR_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/pwm0/intenset.rs b/down-the-stack/dk_pac/src/pwm0/intenset.rs deleted file mode 100644 index d1fac66..0000000 --- a/down-the-stack/dk_pac/src/pwm0/intenset.rs +++ /dev/null @@ -1,544 +0,0 @@ -#[doc = "Register `INTENSET` 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 `INTENSET` 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 `STOPPED` reader - Write '1' to enable interrupt for event STOPPED"] -pub type STOPPED_R = crate::BitReader; -#[doc = "Write '1' to enable interrupt for event STOPPED\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum STOPPED_A { - #[doc = "0: Read: Disabled"] - DISABLED = 0, - #[doc = "1: Read: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: STOPPED_A) -> Self { - variant as u8 != 0 - } -} -impl STOPPED_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> STOPPED_A { - match self.bits { - false => STOPPED_A::DISABLED, - true => STOPPED_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == STOPPED_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == STOPPED_A::ENABLED - } -} -#[doc = "Write '1' to enable interrupt for event STOPPED\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum STOPPED_AW { - #[doc = "1: Enable"] - SET = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: STOPPED_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `STOPPED` writer - Write '1' to enable interrupt for event STOPPED"] -pub type STOPPED_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENSET_SPEC, STOPPED_AW, O>; -impl<'a, const O: u8> STOPPED_W<'a, O> { - #[doc = "Enable"] - #[inline(always)] - pub fn set(self) -> &'a mut W { - self.variant(STOPPED_AW::SET) - } -} -#[doc = "Field `SEQSTARTED0` reader - Write '1' to enable interrupt for event SEQSTARTED\\[0\\]"] -pub type SEQSTARTED0_R = crate::BitReader; -#[doc = "Write '1' to enable interrupt for event SEQSTARTED\\[0\\]\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum SEQSTARTED0_A { - #[doc = "0: Read: Disabled"] - DISABLED = 0, - #[doc = "1: Read: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: SEQSTARTED0_A) -> Self { - variant as u8 != 0 - } -} -impl SEQSTARTED0_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> SEQSTARTED0_A { - match self.bits { - false => SEQSTARTED0_A::DISABLED, - true => SEQSTARTED0_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == SEQSTARTED0_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == SEQSTARTED0_A::ENABLED - } -} -#[doc = "Write '1' to enable interrupt for event SEQSTARTED\\[0\\]\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum SEQSTARTED0_AW { - #[doc = "1: Enable"] - SET = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: SEQSTARTED0_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `SEQSTARTED0` writer - Write '1' to enable interrupt for event SEQSTARTED\\[0\\]"] -pub type SEQSTARTED0_W<'a, const O: u8> = - crate::BitWriter<'a, u32, INTENSET_SPEC, SEQSTARTED0_AW, O>; -impl<'a, const O: u8> SEQSTARTED0_W<'a, O> { - #[doc = "Enable"] - #[inline(always)] - pub fn set(self) -> &'a mut W { - self.variant(SEQSTARTED0_AW::SET) - } -} -#[doc = "Field `SEQSTARTED1` reader - Write '1' to enable interrupt for event SEQSTARTED\\[1\\]"] -pub type SEQSTARTED1_R = crate::BitReader; -#[doc = "Write '1' to enable interrupt for event SEQSTARTED\\[1\\]\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum SEQSTARTED1_A { - #[doc = "0: Read: Disabled"] - DISABLED = 0, - #[doc = "1: Read: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: SEQSTARTED1_A) -> Self { - variant as u8 != 0 - } -} -impl SEQSTARTED1_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> SEQSTARTED1_A { - match self.bits { - false => SEQSTARTED1_A::DISABLED, - true => SEQSTARTED1_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == SEQSTARTED1_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == SEQSTARTED1_A::ENABLED - } -} -#[doc = "Write '1' to enable interrupt for event SEQSTARTED\\[1\\]\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum SEQSTARTED1_AW { - #[doc = "1: Enable"] - SET = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: SEQSTARTED1_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `SEQSTARTED1` writer - Write '1' to enable interrupt for event SEQSTARTED\\[1\\]"] -pub type SEQSTARTED1_W<'a, const O: u8> = - crate::BitWriter<'a, u32, INTENSET_SPEC, SEQSTARTED1_AW, O>; -impl<'a, const O: u8> SEQSTARTED1_W<'a, O> { - #[doc = "Enable"] - #[inline(always)] - pub fn set(self) -> &'a mut W { - self.variant(SEQSTARTED1_AW::SET) - } -} -#[doc = "Field `SEQEND0` reader - Write '1' to enable interrupt for event SEQEND\\[0\\]"] -pub type SEQEND0_R = crate::BitReader; -#[doc = "Write '1' to enable interrupt for event SEQEND\\[0\\]\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum SEQEND0_A { - #[doc = "0: Read: Disabled"] - DISABLED = 0, - #[doc = "1: Read: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: SEQEND0_A) -> Self { - variant as u8 != 0 - } -} -impl SEQEND0_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> SEQEND0_A { - match self.bits { - false => SEQEND0_A::DISABLED, - true => SEQEND0_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == SEQEND0_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == SEQEND0_A::ENABLED - } -} -#[doc = "Write '1' to enable interrupt for event SEQEND\\[0\\]\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum SEQEND0_AW { - #[doc = "1: Enable"] - SET = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: SEQEND0_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `SEQEND0` writer - Write '1' to enable interrupt for event SEQEND\\[0\\]"] -pub type SEQEND0_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENSET_SPEC, SEQEND0_AW, O>; -impl<'a, const O: u8> SEQEND0_W<'a, O> { - #[doc = "Enable"] - #[inline(always)] - pub fn set(self) -> &'a mut W { - self.variant(SEQEND0_AW::SET) - } -} -#[doc = "Field `SEQEND1` reader - Write '1' to enable interrupt for event SEQEND\\[1\\]"] -pub type SEQEND1_R = crate::BitReader; -#[doc = "Write '1' to enable interrupt for event SEQEND\\[1\\]\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum SEQEND1_A { - #[doc = "0: Read: Disabled"] - DISABLED = 0, - #[doc = "1: Read: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: SEQEND1_A) -> Self { - variant as u8 != 0 - } -} -impl SEQEND1_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> SEQEND1_A { - match self.bits { - false => SEQEND1_A::DISABLED, - true => SEQEND1_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == SEQEND1_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == SEQEND1_A::ENABLED - } -} -#[doc = "Write '1' to enable interrupt for event SEQEND\\[1\\]\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum SEQEND1_AW { - #[doc = "1: Enable"] - SET = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: SEQEND1_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `SEQEND1` writer - Write '1' to enable interrupt for event SEQEND\\[1\\]"] -pub type SEQEND1_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENSET_SPEC, SEQEND1_AW, O>; -impl<'a, const O: u8> SEQEND1_W<'a, O> { - #[doc = "Enable"] - #[inline(always)] - pub fn set(self) -> &'a mut W { - self.variant(SEQEND1_AW::SET) - } -} -#[doc = "Field `PWMPERIODEND` reader - Write '1' to enable interrupt for event PWMPERIODEND"] -pub type PWMPERIODEND_R = crate::BitReader; -#[doc = "Write '1' to enable interrupt for event PWMPERIODEND\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PWMPERIODEND_A { - #[doc = "0: Read: Disabled"] - DISABLED = 0, - #[doc = "1: Read: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PWMPERIODEND_A) -> Self { - variant as u8 != 0 - } -} -impl PWMPERIODEND_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> PWMPERIODEND_A { - match self.bits { - false => PWMPERIODEND_A::DISABLED, - true => PWMPERIODEND_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == PWMPERIODEND_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == PWMPERIODEND_A::ENABLED - } -} -#[doc = "Write '1' to enable interrupt for event PWMPERIODEND\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PWMPERIODEND_AW { - #[doc = "1: Enable"] - SET = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PWMPERIODEND_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `PWMPERIODEND` writer - Write '1' to enable interrupt for event PWMPERIODEND"] -pub type PWMPERIODEND_W<'a, const O: u8> = - crate::BitWriter<'a, u32, INTENSET_SPEC, PWMPERIODEND_AW, O>; -impl<'a, const O: u8> PWMPERIODEND_W<'a, O> { - #[doc = "Enable"] - #[inline(always)] - pub fn set(self) -> &'a mut W { - self.variant(PWMPERIODEND_AW::SET) - } -} -#[doc = "Field `LOOPSDONE` reader - Write '1' to enable interrupt for event LOOPSDONE"] -pub type LOOPSDONE_R = crate::BitReader; -#[doc = "Write '1' to enable interrupt for event LOOPSDONE\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum LOOPSDONE_A { - #[doc = "0: Read: Disabled"] - DISABLED = 0, - #[doc = "1: Read: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: LOOPSDONE_A) -> Self { - variant as u8 != 0 - } -} -impl LOOPSDONE_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> LOOPSDONE_A { - match self.bits { - false => LOOPSDONE_A::DISABLED, - true => LOOPSDONE_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == LOOPSDONE_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == LOOPSDONE_A::ENABLED - } -} -#[doc = "Write '1' to enable interrupt for event LOOPSDONE\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum LOOPSDONE_AW { - #[doc = "1: Enable"] - SET = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: LOOPSDONE_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `LOOPSDONE` writer - Write '1' to enable interrupt for event LOOPSDONE"] -pub type LOOPSDONE_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENSET_SPEC, LOOPSDONE_AW, O>; -impl<'a, const O: u8> LOOPSDONE_W<'a, O> { - #[doc = "Enable"] - #[inline(always)] - pub fn set(self) -> &'a mut W { - self.variant(LOOPSDONE_AW::SET) - } -} -impl R { - #[doc = "Bit 1 - Write '1' to enable interrupt for event STOPPED"] - #[inline(always)] - pub fn stopped(&self) -> STOPPED_R { - STOPPED_R::new(((self.bits >> 1) & 1) != 0) - } - #[doc = "Bit 2 - Write '1' to enable interrupt for event SEQSTARTED\\[0\\]"] - #[inline(always)] - pub fn seqstarted0(&self) -> SEQSTARTED0_R { - SEQSTARTED0_R::new(((self.bits >> 2) & 1) != 0) - } - #[doc = "Bit 3 - Write '1' to enable interrupt for event SEQSTARTED\\[1\\]"] - #[inline(always)] - pub fn seqstarted1(&self) -> SEQSTARTED1_R { - SEQSTARTED1_R::new(((self.bits >> 3) & 1) != 0) - } - #[doc = "Bit 4 - Write '1' to enable interrupt for event SEQEND\\[0\\]"] - #[inline(always)] - pub fn seqend0(&self) -> SEQEND0_R { - SEQEND0_R::new(((self.bits >> 4) & 1) != 0) - } - #[doc = "Bit 5 - Write '1' to enable interrupt for event SEQEND\\[1\\]"] - #[inline(always)] - pub fn seqend1(&self) -> SEQEND1_R { - SEQEND1_R::new(((self.bits >> 5) & 1) != 0) - } - #[doc = "Bit 6 - Write '1' to enable interrupt for event PWMPERIODEND"] - #[inline(always)] - pub fn pwmperiodend(&self) -> PWMPERIODEND_R { - PWMPERIODEND_R::new(((self.bits >> 6) & 1) != 0) - } - #[doc = "Bit 7 - Write '1' to enable interrupt for event LOOPSDONE"] - #[inline(always)] - pub fn loopsdone(&self) -> LOOPSDONE_R { - LOOPSDONE_R::new(((self.bits >> 7) & 1) != 0) - } -} -impl W { - #[doc = "Bit 1 - Write '1' to enable interrupt for event STOPPED"] - #[inline(always)] - #[must_use] - pub fn stopped(&mut self) -> STOPPED_W<1> { - STOPPED_W::new(self) - } - #[doc = "Bit 2 - Write '1' to enable interrupt for event SEQSTARTED\\[0\\]"] - #[inline(always)] - #[must_use] - pub fn seqstarted0(&mut self) -> SEQSTARTED0_W<2> { - SEQSTARTED0_W::new(self) - } - #[doc = "Bit 3 - Write '1' to enable interrupt for event SEQSTARTED\\[1\\]"] - #[inline(always)] - #[must_use] - pub fn seqstarted1(&mut self) -> SEQSTARTED1_W<3> { - SEQSTARTED1_W::new(self) - } - #[doc = "Bit 4 - Write '1' to enable interrupt for event SEQEND\\[0\\]"] - #[inline(always)] - #[must_use] - pub fn seqend0(&mut self) -> SEQEND0_W<4> { - SEQEND0_W::new(self) - } - #[doc = "Bit 5 - Write '1' to enable interrupt for event SEQEND\\[1\\]"] - #[inline(always)] - #[must_use] - pub fn seqend1(&mut self) -> SEQEND1_W<5> { - SEQEND1_W::new(self) - } - #[doc = "Bit 6 - Write '1' to enable interrupt for event PWMPERIODEND"] - #[inline(always)] - #[must_use] - pub fn pwmperiodend(&mut self) -> PWMPERIODEND_W<6> { - PWMPERIODEND_W::new(self) - } - #[doc = "Bit 7 - Write '1' to enable interrupt for event LOOPSDONE"] - #[inline(always)] - #[must_use] - pub fn loopsdone(&mut self) -> LOOPSDONE_W<7> { - LOOPSDONE_W::new(self) - } - #[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 = "Enable interrupt\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 [intenset](index.html) module"] -pub struct INTENSET_SPEC; -impl crate::RegisterSpec for INTENSET_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [intenset::R](R) reader structure"] -impl crate::Readable for INTENSET_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [intenset::W](W) writer structure"] -impl crate::Writable for INTENSET_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets INTENSET to value 0"] -impl crate::Resettable for INTENSET_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/pwm0/loop_.rs b/down-the-stack/dk_pac/src/pwm0/loop_.rs deleted file mode 100644 index cd5f68e..0000000 --- a/down-the-stack/dk_pac/src/pwm0/loop_.rs +++ /dev/null @@ -1,115 +0,0 @@ -#[doc = "Register `LOOP` 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 `LOOP` 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 `CNT` reader - Amount of playback of pattern cycles"] -pub type CNT_R = crate::FieldReader; -#[doc = "Amount of playback of pattern cycles\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -#[repr(u16)] -pub enum CNT_A { - #[doc = "0: Looping disabled (stop at the end of the sequence)"] - DISABLED = 0, -} -impl From for u16 { - #[inline(always)] - fn from(variant: CNT_A) -> Self { - variant as _ - } -} -impl CNT_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> Option { - match self.bits { - 0 => Some(CNT_A::DISABLED), - _ => None, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == CNT_A::DISABLED - } -} -#[doc = "Field `CNT` writer - Amount of playback of pattern cycles"] -pub type CNT_W<'a, const O: u8> = crate::FieldWriter<'a, u32, LOOP_SPEC, u16, CNT_A, 16, O>; -impl<'a, const O: u8> CNT_W<'a, O> { - #[doc = "Looping disabled (stop at the end of the sequence)"] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(CNT_A::DISABLED) - } -} -impl R { - #[doc = "Bits 0:15 - Amount of playback of pattern cycles"] - #[inline(always)] - pub fn cnt(&self) -> CNT_R { - CNT_R::new((self.bits & 0xffff) as u16) - } -} -impl W { - #[doc = "Bits 0:15 - Amount of playback of pattern cycles"] - #[inline(always)] - #[must_use] - pub fn cnt(&mut self) -> CNT_W<0> { - 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 - } -} -#[doc = "Amount of playback of a loop\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 [loop_](index.html) module"] -pub struct LOOP_SPEC; -impl crate::RegisterSpec for LOOP_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [loop_::R](R) reader structure"] -impl crate::Readable for LOOP_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [loop_::W](W) writer structure"] -impl crate::Writable for LOOP_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets LOOP to value 0"] -impl crate::Resettable for LOOP_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/pwm0/mode.rs b/down-the-stack/dk_pac/src/pwm0/mode.rs deleted file mode 100644 index 4d4c80f..0000000 --- a/down-the-stack/dk_pac/src/pwm0/mode.rs +++ /dev/null @@ -1,126 +0,0 @@ -#[doc = "Register `MODE` 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 `MODE` 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 `UPDOWN` reader - Selects up or up and down as wave counter mode"] -pub type UPDOWN_R = crate::BitReader; -#[doc = "Selects up or up and down as wave counter mode\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum UPDOWN_A { - #[doc = "0: Up counter - edge aligned PWM duty-cycle"] - UP = 0, - #[doc = "1: Up and down counter - center aligned PWM duty cycle"] - UP_AND_DOWN = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: UPDOWN_A) -> Self { - variant as u8 != 0 - } -} -impl UPDOWN_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> UPDOWN_A { - match self.bits { - false => UPDOWN_A::UP, - true => UPDOWN_A::UP_AND_DOWN, - } - } - #[doc = "Checks if the value of the field is `UP`"] - #[inline(always)] - pub fn is_up(&self) -> bool { - *self == UPDOWN_A::UP - } - #[doc = "Checks if the value of the field is `UP_AND_DOWN`"] - #[inline(always)] - pub fn is_up_and_down(&self) -> bool { - *self == UPDOWN_A::UP_AND_DOWN - } -} -#[doc = "Field `UPDOWN` writer - Selects up or up and down as wave counter mode"] -pub type UPDOWN_W<'a, const O: u8> = crate::BitWriter<'a, u32, MODE_SPEC, UPDOWN_A, O>; -impl<'a, const O: u8> UPDOWN_W<'a, O> { - #[doc = "Up counter - edge aligned PWM duty-cycle"] - #[inline(always)] - pub fn up(self) -> &'a mut W { - self.variant(UPDOWN_A::UP) - } - #[doc = "Up and down counter - center aligned PWM duty cycle"] - #[inline(always)] - pub fn up_and_down(self) -> &'a mut W { - self.variant(UPDOWN_A::UP_AND_DOWN) - } -} -impl R { - #[doc = "Bit 0 - Selects up or up and down as wave counter mode"] - #[inline(always)] - pub fn updown(&self) -> UPDOWN_R { - UPDOWN_R::new((self.bits & 1) != 0) - } -} -impl W { - #[doc = "Bit 0 - Selects up or up and down as wave counter mode"] - #[inline(always)] - #[must_use] - pub fn updown(&mut self) -> UPDOWN_W<0> { - UPDOWN_W::new(self) - } - #[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 = "Selects operating mode of the wave counter\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 [mode](index.html) module"] -pub struct MODE_SPEC; -impl crate::RegisterSpec for MODE_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [mode::R](R) reader structure"] -impl crate::Readable for MODE_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [mode::W](W) writer structure"] -impl crate::Writable for 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 MODE to value 0"] -impl crate::Resettable for MODE_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/pwm0/prescaler.rs b/down-the-stack/dk_pac/src/pwm0/prescaler.rs deleted file mode 100644 index bb0fa67..0000000 --- a/down-the-stack/dk_pac/src/pwm0/prescaler.rs +++ /dev/null @@ -1,207 +0,0 @@ -#[doc = "Register `PRESCALER` 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 `PRESCALER` 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 `PRESCALER` reader - Pre-scaler of PWM_CLK"] -pub type PRESCALER_R = crate::FieldReader; -#[doc = "Pre-scaler of PWM_CLK\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -#[repr(u8)] -pub enum PRESCALER_A { - #[doc = "0: Divide by 1 (16MHz)"] - DIV_1 = 0, - #[doc = "1: Divide by 2 ( 8MHz)"] - DIV_2 = 1, - #[doc = "2: Divide by 4 ( 4MHz)"] - DIV_4 = 2, - #[doc = "3: Divide by 8 ( 2MHz)"] - DIV_8 = 3, - #[doc = "4: Divide by 16 ( 1MHz)"] - DIV_16 = 4, - #[doc = "5: Divide by 32 ( 500kHz)"] - DIV_32 = 5, - #[doc = "6: Divide by 64 ( 250kHz)"] - DIV_64 = 6, - #[doc = "7: Divide by 128 ( 125kHz)"] - DIV_128 = 7, -} -impl From for u8 { - #[inline(always)] - fn from(variant: PRESCALER_A) -> Self { - variant as _ - } -} -impl PRESCALER_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> PRESCALER_A { - match self.bits { - 0 => PRESCALER_A::DIV_1, - 1 => PRESCALER_A::DIV_2, - 2 => PRESCALER_A::DIV_4, - 3 => PRESCALER_A::DIV_8, - 4 => PRESCALER_A::DIV_16, - 5 => PRESCALER_A::DIV_32, - 6 => PRESCALER_A::DIV_64, - 7 => PRESCALER_A::DIV_128, - _ => unreachable!(), - } - } - #[doc = "Checks if the value of the field is `DIV_1`"] - #[inline(always)] - pub fn is_div_1(&self) -> bool { - *self == PRESCALER_A::DIV_1 - } - #[doc = "Checks if the value of the field is `DIV_2`"] - #[inline(always)] - pub fn is_div_2(&self) -> bool { - *self == PRESCALER_A::DIV_2 - } - #[doc = "Checks if the value of the field is `DIV_4`"] - #[inline(always)] - pub fn is_div_4(&self) -> bool { - *self == PRESCALER_A::DIV_4 - } - #[doc = "Checks if the value of the field is `DIV_8`"] - #[inline(always)] - pub fn is_div_8(&self) -> bool { - *self == PRESCALER_A::DIV_8 - } - #[doc = "Checks if the value of the field is `DIV_16`"] - #[inline(always)] - pub fn is_div_16(&self) -> bool { - *self == PRESCALER_A::DIV_16 - } - #[doc = "Checks if the value of the field is `DIV_32`"] - #[inline(always)] - pub fn is_div_32(&self) -> bool { - *self == PRESCALER_A::DIV_32 - } - #[doc = "Checks if the value of the field is `DIV_64`"] - #[inline(always)] - pub fn is_div_64(&self) -> bool { - *self == PRESCALER_A::DIV_64 - } - #[doc = "Checks if the value of the field is `DIV_128`"] - #[inline(always)] - pub fn is_div_128(&self) -> bool { - *self == PRESCALER_A::DIV_128 - } -} -#[doc = "Field `PRESCALER` writer - Pre-scaler of PWM_CLK"] -pub type PRESCALER_W<'a, const O: u8> = - crate::FieldWriterSafe<'a, u32, PRESCALER_SPEC, u8, PRESCALER_A, 3, O>; -impl<'a, const O: u8> PRESCALER_W<'a, O> { - #[doc = "Divide by 1 (16MHz)"] - #[inline(always)] - pub fn div_1(self) -> &'a mut W { - self.variant(PRESCALER_A::DIV_1) - } - #[doc = "Divide by 2 ( 8MHz)"] - #[inline(always)] - pub fn div_2(self) -> &'a mut W { - self.variant(PRESCALER_A::DIV_2) - } - #[doc = "Divide by 4 ( 4MHz)"] - #[inline(always)] - pub fn div_4(self) -> &'a mut W { - self.variant(PRESCALER_A::DIV_4) - } - #[doc = "Divide by 8 ( 2MHz)"] - #[inline(always)] - pub fn div_8(self) -> &'a mut W { - self.variant(PRESCALER_A::DIV_8) - } - #[doc = "Divide by 16 ( 1MHz)"] - #[inline(always)] - pub fn div_16(self) -> &'a mut W { - self.variant(PRESCALER_A::DIV_16) - } - #[doc = "Divide by 32 ( 500kHz)"] - #[inline(always)] - pub fn div_32(self) -> &'a mut W { - self.variant(PRESCALER_A::DIV_32) - } - #[doc = "Divide by 64 ( 250kHz)"] - #[inline(always)] - pub fn div_64(self) -> &'a mut W { - self.variant(PRESCALER_A::DIV_64) - } - #[doc = "Divide by 128 ( 125kHz)"] - #[inline(always)] - pub fn div_128(self) -> &'a mut W { - self.variant(PRESCALER_A::DIV_128) - } -} -impl R { - #[doc = "Bits 0:2 - Pre-scaler of PWM_CLK"] - #[inline(always)] - pub fn prescaler(&self) -> PRESCALER_R { - PRESCALER_R::new((self.bits & 7) as u8) - } -} -impl W { - #[doc = "Bits 0:2 - Pre-scaler of PWM_CLK"] - #[inline(always)] - #[must_use] - pub fn prescaler(&mut self) -> PRESCALER_W<0> { - PRESCALER_W::new(self) - } - #[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 = "Configuration for PWM_CLK\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 [prescaler](index.html) module"] -pub struct PRESCALER_SPEC; -impl crate::RegisterSpec for PRESCALER_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [prescaler::R](R) reader structure"] -impl crate::Readable for PRESCALER_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [prescaler::W](W) writer structure"] -impl crate::Writable for PRESCALER_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets PRESCALER to value 0"] -impl crate::Resettable for PRESCALER_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/pwm0/psel.rs b/down-the-stack/dk_pac/src/pwm0/psel.rs deleted file mode 100644 index 600585b..0000000 --- a/down-the-stack/dk_pac/src/pwm0/psel.rs +++ /dev/null @@ -1,10 +0,0 @@ -#[doc = r"Register block"] -#[repr(C)] -pub struct PSEL { - #[doc = "0x00..0x10 - Description collection: Output pin select for PWM channel n"] - pub out: [OUT; 4], -} -#[doc = "OUT (rw) register accessor: an alias for `Reg`"] -pub type OUT = crate::Reg; -#[doc = "Description collection: Output pin select for PWM channel n"] -pub mod out; diff --git a/down-the-stack/dk_pac/src/pwm0/psel/out.rs b/down-the-stack/dk_pac/src/pwm0/psel/out.rs deleted file mode 100644 index 7e35b70..0000000 --- a/down-the-stack/dk_pac/src/pwm0/psel/out.rs +++ /dev/null @@ -1,142 +0,0 @@ -#[doc = "Register `OUT[%s]` 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 `OUT[%s]` 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 `PIN` reader - Pin number"] -pub type PIN_R = crate::FieldReader; -#[doc = "Field `PIN` writer - Pin number"] -pub type PIN_W<'a, const O: u8> = crate::FieldWriter<'a, u32, OUT_SPEC, u8, u8, 5, O>; -#[doc = "Field `CONNECT` reader - Connection"] -pub type CONNECT_R = crate::BitReader; -#[doc = "Connection\n\nValue on reset: 1"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum CONNECT_A { - #[doc = "1: Disconnect"] - DISCONNECTED = 1, - #[doc = "0: Connect"] - CONNECTED = 0, -} -impl From for bool { - #[inline(always)] - fn from(variant: CONNECT_A) -> Self { - variant as u8 != 0 - } -} -impl CONNECT_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> CONNECT_A { - match self.bits { - true => CONNECT_A::DISCONNECTED, - false => CONNECT_A::CONNECTED, - } - } - #[doc = "Checks if the value of the field is `DISCONNECTED`"] - #[inline(always)] - pub fn is_disconnected(&self) -> bool { - *self == CONNECT_A::DISCONNECTED - } - #[doc = "Checks if the value of the field is `CONNECTED`"] - #[inline(always)] - pub fn is_connected(&self) -> bool { - *self == CONNECT_A::CONNECTED - } -} -#[doc = "Field `CONNECT` writer - Connection"] -pub type CONNECT_W<'a, const O: u8> = crate::BitWriter<'a, u32, OUT_SPEC, CONNECT_A, O>; -impl<'a, const O: u8> CONNECT_W<'a, O> { - #[doc = "Disconnect"] - #[inline(always)] - pub fn disconnected(self) -> &'a mut W { - self.variant(CONNECT_A::DISCONNECTED) - } - #[doc = "Connect"] - #[inline(always)] - pub fn connected(self) -> &'a mut W { - self.variant(CONNECT_A::CONNECTED) - } -} -impl R { - #[doc = "Bits 0:4 - Pin number"] - #[inline(always)] - pub fn pin(&self) -> PIN_R { - PIN_R::new((self.bits & 0x1f) as u8) - } - #[doc = "Bit 31 - Connection"] - #[inline(always)] - pub fn connect(&self) -> CONNECT_R { - CONNECT_R::new(((self.bits >> 31) & 1) != 0) - } -} -impl W { - #[doc = "Bits 0:4 - Pin number"] - #[inline(always)] - #[must_use] - pub fn pin(&mut self) -> PIN_W<0> { - PIN_W::new(self) - } - #[doc = "Bit 31 - Connection"] - #[inline(always)] - #[must_use] - pub fn connect(&mut self) -> CONNECT_W<31> { - CONNECT_W::new(self) - } - #[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 = "Description collection: Output pin select for PWM channel n\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 [out](index.html) module"] -pub struct OUT_SPEC; -impl crate::RegisterSpec for OUT_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [out::R](R) reader structure"] -impl crate::Readable for OUT_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [out::W](W) writer structure"] -impl crate::Writable for 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 OUT[%s] -to value 0xffff_ffff"] -impl crate::Resettable for OUT_SPEC { - const RESET_VALUE: Self::Ux = 0xffff_ffff; -} diff --git a/down-the-stack/dk_pac/src/pwm0/seq.rs b/down-the-stack/dk_pac/src/pwm0/seq.rs deleted file mode 100644 index aa84faf..0000000 --- a/down-the-stack/dk_pac/src/pwm0/seq.rs +++ /dev/null @@ -1,28 +0,0 @@ -#[doc = r"Register block"] -#[repr(C)] -pub struct SEQ { - #[doc = "0x00 - Description cluster: Beginning address in Data RAM of this sequence"] - pub ptr: PTR, - #[doc = "0x04 - Description cluster: Amount of values (duty cycles) in this sequence"] - pub cnt: CNT, - #[doc = "0x08 - Description cluster: Amount of additional PWM periods between samples loaded into compare register"] - pub refresh: REFRESH, - #[doc = "0x0c - Description cluster: Time added after the sequence"] - pub enddelay: ENDDELAY, -} -#[doc = "PTR (rw) register accessor: an alias for `Reg`"] -pub type PTR = crate::Reg; -#[doc = "Description cluster: Beginning address in Data RAM of this sequence"] -pub mod ptr; -#[doc = "CNT (rw) register accessor: an alias for `Reg`"] -pub type CNT = crate::Reg; -#[doc = "Description cluster: Amount of values (duty cycles) in this sequence"] -pub mod cnt; -#[doc = "REFRESH (rw) register accessor: an alias for `Reg`"] -pub type REFRESH = crate::Reg; -#[doc = "Description cluster: Amount of additional PWM periods between samples loaded into compare register"] -pub mod refresh; -#[doc = "ENDDELAY (rw) register accessor: an alias for `Reg`"] -pub type ENDDELAY = crate::Reg; -#[doc = "Description cluster: Time added after the sequence"] -pub mod enddelay; diff --git a/down-the-stack/dk_pac/src/pwm0/seq/cnt.rs b/down-the-stack/dk_pac/src/pwm0/seq/cnt.rs deleted file mode 100644 index 9dc473a..0000000 --- a/down-the-stack/dk_pac/src/pwm0/seq/cnt.rs +++ /dev/null @@ -1,115 +0,0 @@ -#[doc = "Register `CNT` 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 `CNT` 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 `CNT` reader - Amount of values (duty cycles) in this sequence"] -pub type CNT_R = crate::FieldReader; -#[doc = "Amount of values (duty cycles) in this sequence\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -#[repr(u16)] -pub enum CNT_A { - #[doc = "0: Sequence is disabled, and shall not be started as it is empty"] - DISABLED = 0, -} -impl From for u16 { - #[inline(always)] - fn from(variant: CNT_A) -> Self { - variant as _ - } -} -impl CNT_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> Option { - match self.bits { - 0 => Some(CNT_A::DISABLED), - _ => None, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == CNT_A::DISABLED - } -} -#[doc = "Field `CNT` writer - Amount of values (duty cycles) in this sequence"] -pub type CNT_W<'a, const O: u8> = crate::FieldWriter<'a, u32, CNT_SPEC, u16, CNT_A, 15, O>; -impl<'a, const O: u8> CNT_W<'a, O> { - #[doc = "Sequence is disabled, and shall not be started as it is empty"] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(CNT_A::DISABLED) - } -} -impl R { - #[doc = "Bits 0:14 - Amount of values (duty cycles) in this sequence"] - #[inline(always)] - pub fn cnt(&self) -> CNT_R { - CNT_R::new((self.bits & 0x7fff) as u16) - } -} -impl W { - #[doc = "Bits 0:14 - Amount of values (duty cycles) in this sequence"] - #[inline(always)] - #[must_use] - pub fn cnt(&mut self) -> CNT_W<0> { - 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 - } -} -#[doc = "Description cluster: Amount of values (duty cycles) in this sequence\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 [cnt](index.html) module"] -pub struct CNT_SPEC; -impl crate::RegisterSpec for CNT_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [cnt::R](R) reader structure"] -impl crate::Readable for CNT_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [cnt::W](W) writer structure"] -impl crate::Writable for CNT_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets CNT to value 0"] -impl crate::Resettable for CNT_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/pwm0/seq/enddelay.rs b/down-the-stack/dk_pac/src/pwm0/seq/enddelay.rs deleted file mode 100644 index 968faa8..0000000 --- a/down-the-stack/dk_pac/src/pwm0/seq/enddelay.rs +++ /dev/null @@ -1,80 +0,0 @@ -#[doc = "Register `ENDDELAY` 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 `ENDDELAY` 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 `CNT` reader - Time added after the sequence in PWM periods"] -pub type CNT_R = crate::FieldReader; -#[doc = "Field `CNT` writer - Time added after the sequence in PWM periods"] -pub type CNT_W<'a, const O: u8> = crate::FieldWriter<'a, u32, ENDDELAY_SPEC, u32, u32, 24, O>; -impl R { - #[doc = "Bits 0:23 - Time added after the sequence in PWM periods"] - #[inline(always)] - pub fn cnt(&self) -> CNT_R { - CNT_R::new(self.bits & 0x00ff_ffff) - } -} -impl W { - #[doc = "Bits 0:23 - Time added after the sequence in PWM periods"] - #[inline(always)] - #[must_use] - pub fn cnt(&mut self) -> CNT_W<0> { - 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 - } -} -#[doc = "Description cluster: Time added after the sequence\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 [enddelay](index.html) module"] -pub struct ENDDELAY_SPEC; -impl crate::RegisterSpec for ENDDELAY_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [enddelay::R](R) reader structure"] -impl crate::Readable for ENDDELAY_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [enddelay::W](W) writer structure"] -impl crate::Writable for ENDDELAY_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets ENDDELAY to value 0"] -impl crate::Resettable for ENDDELAY_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/pwm0/seq/ptr.rs b/down-the-stack/dk_pac/src/pwm0/seq/ptr.rs deleted file mode 100644 index 7234f22..0000000 --- a/down-the-stack/dk_pac/src/pwm0/seq/ptr.rs +++ /dev/null @@ -1,80 +0,0 @@ -#[doc = "Register `PTR` 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 `PTR` 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 `PTR` reader - Beginning address in Data RAM of this sequence"] -pub type PTR_R = crate::FieldReader; -#[doc = "Field `PTR` writer - Beginning address in Data RAM of this sequence"] -pub type PTR_W<'a, const O: u8> = crate::FieldWriter<'a, u32, PTR_SPEC, u32, u32, 32, O>; -impl R { - #[doc = "Bits 0:31 - Beginning address in Data RAM of this sequence"] - #[inline(always)] - pub fn ptr(&self) -> PTR_R { - PTR_R::new(self.bits) - } -} -impl W { - #[doc = "Bits 0:31 - Beginning address in Data RAM of this sequence"] - #[inline(always)] - #[must_use] - pub fn ptr(&mut self) -> PTR_W<0> { - PTR_W::new(self) - } - #[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 = "Description cluster: Beginning address in Data RAM of this sequence\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 [ptr](index.html) module"] -pub struct PTR_SPEC; -impl crate::RegisterSpec for PTR_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [ptr::R](R) reader structure"] -impl crate::Readable for PTR_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [ptr::W](W) writer structure"] -impl crate::Writable for PTR_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets PTR to value 0"] -impl crate::Resettable for PTR_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/pwm0/seq/refresh.rs b/down-the-stack/dk_pac/src/pwm0/seq/refresh.rs deleted file mode 100644 index 8d465c2..0000000 --- a/down-the-stack/dk_pac/src/pwm0/seq/refresh.rs +++ /dev/null @@ -1,115 +0,0 @@ -#[doc = "Register `REFRESH` 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 `REFRESH` 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 `CNT` reader - Amount of additional PWM periods between samples loaded into compare register (load every REFRESH.CNT+1 PWM periods)"] -pub type CNT_R = crate::FieldReader; -#[doc = "Amount of additional PWM periods between samples loaded into compare register (load every REFRESH.CNT+1 PWM periods)\n\nValue on reset: 1"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -#[repr(u32)] -pub enum CNT_A { - #[doc = "0: Update every PWM period"] - CONTINUOUS = 0, -} -impl From for u32 { - #[inline(always)] - fn from(variant: CNT_A) -> Self { - variant as _ - } -} -impl CNT_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> Option { - match self.bits { - 0 => Some(CNT_A::CONTINUOUS), - _ => None, - } - } - #[doc = "Checks if the value of the field is `CONTINUOUS`"] - #[inline(always)] - pub fn is_continuous(&self) -> bool { - *self == CNT_A::CONTINUOUS - } -} -#[doc = "Field `CNT` writer - Amount of additional PWM periods between samples loaded into compare register (load every REFRESH.CNT+1 PWM periods)"] -pub type CNT_W<'a, const O: u8> = crate::FieldWriter<'a, u32, REFRESH_SPEC, u32, CNT_A, 24, O>; -impl<'a, const O: u8> CNT_W<'a, O> { - #[doc = "Update every PWM period"] - #[inline(always)] - pub fn continuous(self) -> &'a mut W { - self.variant(CNT_A::CONTINUOUS) - } -} -impl R { - #[doc = "Bits 0:23 - Amount of additional PWM periods between samples loaded into compare register (load every REFRESH.CNT+1 PWM periods)"] - #[inline(always)] - pub fn cnt(&self) -> CNT_R { - CNT_R::new(self.bits & 0x00ff_ffff) - } -} -impl W { - #[doc = "Bits 0:23 - Amount of additional PWM periods between samples loaded into compare register (load every REFRESH.CNT+1 PWM periods)"] - #[inline(always)] - #[must_use] - pub fn cnt(&mut self) -> CNT_W<0> { - 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 - } -} -#[doc = "Description cluster: Amount of additional PWM periods between samples loaded into compare register\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 [refresh](index.html) module"] -pub struct REFRESH_SPEC; -impl crate::RegisterSpec for REFRESH_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [refresh::R](R) reader structure"] -impl crate::Readable for REFRESH_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [refresh::W](W) writer structure"] -impl crate::Writable for REFRESH_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets REFRESH to value 0x01"] -impl crate::Resettable for REFRESH_SPEC { - const RESET_VALUE: Self::Ux = 0x01; -} diff --git a/down-the-stack/dk_pac/src/pwm0/shorts.rs b/down-the-stack/dk_pac/src/pwm0/shorts.rs deleted file mode 100644 index d81cbf1..0000000 --- a/down-the-stack/dk_pac/src/pwm0/shorts.rs +++ /dev/null @@ -1,385 +0,0 @@ -#[doc = "Register `SHORTS` 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 `SHORTS` 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 `SEQEND0_STOP` reader - Shortcut between event SEQEND\\[0\\] -and task STOP"] -pub type SEQEND0_STOP_R = crate::BitReader; -#[doc = "Shortcut between event SEQEND\\[0\\] -and task STOP\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum SEQEND0_STOP_A { - #[doc = "0: Disable shortcut"] - DISABLED = 0, - #[doc = "1: Enable shortcut"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: SEQEND0_STOP_A) -> Self { - variant as u8 != 0 - } -} -impl SEQEND0_STOP_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> SEQEND0_STOP_A { - match self.bits { - false => SEQEND0_STOP_A::DISABLED, - true => SEQEND0_STOP_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == SEQEND0_STOP_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == SEQEND0_STOP_A::ENABLED - } -} -#[doc = "Field `SEQEND0_STOP` writer - Shortcut between event SEQEND\\[0\\] -and task STOP"] -pub type SEQEND0_STOP_W<'a, const O: u8> = - crate::BitWriter<'a, u32, SHORTS_SPEC, SEQEND0_STOP_A, O>; -impl<'a, const O: u8> SEQEND0_STOP_W<'a, O> { - #[doc = "Disable shortcut"] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(SEQEND0_STOP_A::DISABLED) - } - #[doc = "Enable shortcut"] - #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(SEQEND0_STOP_A::ENABLED) - } -} -#[doc = "Field `SEQEND1_STOP` reader - Shortcut between event SEQEND\\[1\\] -and task STOP"] -pub type SEQEND1_STOP_R = crate::BitReader; -#[doc = "Shortcut between event SEQEND\\[1\\] -and task STOP\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum SEQEND1_STOP_A { - #[doc = "0: Disable shortcut"] - DISABLED = 0, - #[doc = "1: Enable shortcut"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: SEQEND1_STOP_A) -> Self { - variant as u8 != 0 - } -} -impl SEQEND1_STOP_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> SEQEND1_STOP_A { - match self.bits { - false => SEQEND1_STOP_A::DISABLED, - true => SEQEND1_STOP_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == SEQEND1_STOP_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == SEQEND1_STOP_A::ENABLED - } -} -#[doc = "Field `SEQEND1_STOP` writer - Shortcut between event SEQEND\\[1\\] -and task STOP"] -pub type SEQEND1_STOP_W<'a, const O: u8> = - crate::BitWriter<'a, u32, SHORTS_SPEC, SEQEND1_STOP_A, O>; -impl<'a, const O: u8> SEQEND1_STOP_W<'a, O> { - #[doc = "Disable shortcut"] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(SEQEND1_STOP_A::DISABLED) - } - #[doc = "Enable shortcut"] - #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(SEQEND1_STOP_A::ENABLED) - } -} -#[doc = "Field `LOOPSDONE_SEQSTART0` reader - Shortcut between event LOOPSDONE and task SEQSTART\\[0\\]"] -pub type LOOPSDONE_SEQSTART0_R = crate::BitReader; -#[doc = "Shortcut between event LOOPSDONE and task SEQSTART\\[0\\]\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum LOOPSDONE_SEQSTART0_A { - #[doc = "0: Disable shortcut"] - DISABLED = 0, - #[doc = "1: Enable shortcut"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: LOOPSDONE_SEQSTART0_A) -> Self { - variant as u8 != 0 - } -} -impl LOOPSDONE_SEQSTART0_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> LOOPSDONE_SEQSTART0_A { - match self.bits { - false => LOOPSDONE_SEQSTART0_A::DISABLED, - true => LOOPSDONE_SEQSTART0_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == LOOPSDONE_SEQSTART0_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == LOOPSDONE_SEQSTART0_A::ENABLED - } -} -#[doc = "Field `LOOPSDONE_SEQSTART0` writer - Shortcut between event LOOPSDONE and task SEQSTART\\[0\\]"] -pub type LOOPSDONE_SEQSTART0_W<'a, const O: u8> = - crate::BitWriter<'a, u32, SHORTS_SPEC, LOOPSDONE_SEQSTART0_A, O>; -impl<'a, const O: u8> LOOPSDONE_SEQSTART0_W<'a, O> { - #[doc = "Disable shortcut"] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(LOOPSDONE_SEQSTART0_A::DISABLED) - } - #[doc = "Enable shortcut"] - #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(LOOPSDONE_SEQSTART0_A::ENABLED) - } -} -#[doc = "Field `LOOPSDONE_SEQSTART1` reader - Shortcut between event LOOPSDONE and task SEQSTART\\[1\\]"] -pub type LOOPSDONE_SEQSTART1_R = crate::BitReader; -#[doc = "Shortcut between event LOOPSDONE and task SEQSTART\\[1\\]\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum LOOPSDONE_SEQSTART1_A { - #[doc = "0: Disable shortcut"] - DISABLED = 0, - #[doc = "1: Enable shortcut"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: LOOPSDONE_SEQSTART1_A) -> Self { - variant as u8 != 0 - } -} -impl LOOPSDONE_SEQSTART1_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> LOOPSDONE_SEQSTART1_A { - match self.bits { - false => LOOPSDONE_SEQSTART1_A::DISABLED, - true => LOOPSDONE_SEQSTART1_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == LOOPSDONE_SEQSTART1_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == LOOPSDONE_SEQSTART1_A::ENABLED - } -} -#[doc = "Field `LOOPSDONE_SEQSTART1` writer - Shortcut between event LOOPSDONE and task SEQSTART\\[1\\]"] -pub type LOOPSDONE_SEQSTART1_W<'a, const O: u8> = - crate::BitWriter<'a, u32, SHORTS_SPEC, LOOPSDONE_SEQSTART1_A, O>; -impl<'a, const O: u8> LOOPSDONE_SEQSTART1_W<'a, O> { - #[doc = "Disable shortcut"] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(LOOPSDONE_SEQSTART1_A::DISABLED) - } - #[doc = "Enable shortcut"] - #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(LOOPSDONE_SEQSTART1_A::ENABLED) - } -} -#[doc = "Field `LOOPSDONE_STOP` reader - Shortcut between event LOOPSDONE and task STOP"] -pub type LOOPSDONE_STOP_R = crate::BitReader; -#[doc = "Shortcut between event LOOPSDONE and task STOP\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum LOOPSDONE_STOP_A { - #[doc = "0: Disable shortcut"] - DISABLED = 0, - #[doc = "1: Enable shortcut"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: LOOPSDONE_STOP_A) -> Self { - variant as u8 != 0 - } -} -impl LOOPSDONE_STOP_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> LOOPSDONE_STOP_A { - match self.bits { - false => LOOPSDONE_STOP_A::DISABLED, - true => LOOPSDONE_STOP_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == LOOPSDONE_STOP_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == LOOPSDONE_STOP_A::ENABLED - } -} -#[doc = "Field `LOOPSDONE_STOP` writer - Shortcut between event LOOPSDONE and task STOP"] -pub type LOOPSDONE_STOP_W<'a, const O: u8> = - crate::BitWriter<'a, u32, SHORTS_SPEC, LOOPSDONE_STOP_A, O>; -impl<'a, const O: u8> LOOPSDONE_STOP_W<'a, O> { - #[doc = "Disable shortcut"] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(LOOPSDONE_STOP_A::DISABLED) - } - #[doc = "Enable shortcut"] - #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(LOOPSDONE_STOP_A::ENABLED) - } -} -impl R { - #[doc = "Bit 0 - Shortcut between event SEQEND\\[0\\] -and task STOP"] - #[inline(always)] - pub fn seqend0_stop(&self) -> SEQEND0_STOP_R { - SEQEND0_STOP_R::new((self.bits & 1) != 0) - } - #[doc = "Bit 1 - Shortcut between event SEQEND\\[1\\] -and task STOP"] - #[inline(always)] - pub fn seqend1_stop(&self) -> SEQEND1_STOP_R { - SEQEND1_STOP_R::new(((self.bits >> 1) & 1) != 0) - } - #[doc = "Bit 2 - Shortcut between event LOOPSDONE and task SEQSTART\\[0\\]"] - #[inline(always)] - pub fn loopsdone_seqstart0(&self) -> LOOPSDONE_SEQSTART0_R { - LOOPSDONE_SEQSTART0_R::new(((self.bits >> 2) & 1) != 0) - } - #[doc = "Bit 3 - Shortcut between event LOOPSDONE and task SEQSTART\\[1\\]"] - #[inline(always)] - pub fn loopsdone_seqstart1(&self) -> LOOPSDONE_SEQSTART1_R { - LOOPSDONE_SEQSTART1_R::new(((self.bits >> 3) & 1) != 0) - } - #[doc = "Bit 4 - Shortcut between event LOOPSDONE and task STOP"] - #[inline(always)] - pub fn loopsdone_stop(&self) -> LOOPSDONE_STOP_R { - LOOPSDONE_STOP_R::new(((self.bits >> 4) & 1) != 0) - } -} -impl W { - #[doc = "Bit 0 - Shortcut between event SEQEND\\[0\\] -and task STOP"] - #[inline(always)] - #[must_use] - pub fn seqend0_stop(&mut self) -> SEQEND0_STOP_W<0> { - SEQEND0_STOP_W::new(self) - } - #[doc = "Bit 1 - Shortcut between event SEQEND\\[1\\] -and task STOP"] - #[inline(always)] - #[must_use] - pub fn seqend1_stop(&mut self) -> SEQEND1_STOP_W<1> { - SEQEND1_STOP_W::new(self) - } - #[doc = "Bit 2 - Shortcut between event LOOPSDONE and task SEQSTART\\[0\\]"] - #[inline(always)] - #[must_use] - pub fn loopsdone_seqstart0(&mut self) -> LOOPSDONE_SEQSTART0_W<2> { - LOOPSDONE_SEQSTART0_W::new(self) - } - #[doc = "Bit 3 - Shortcut between event LOOPSDONE and task SEQSTART\\[1\\]"] - #[inline(always)] - #[must_use] - pub fn loopsdone_seqstart1(&mut self) -> LOOPSDONE_SEQSTART1_W<3> { - LOOPSDONE_SEQSTART1_W::new(self) - } - #[doc = "Bit 4 - Shortcut between event LOOPSDONE and task STOP"] - #[inline(always)] - #[must_use] - pub fn loopsdone_stop(&mut self) -> LOOPSDONE_STOP_W<4> { - LOOPSDONE_STOP_W::new(self) - } - #[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 = "Shortcuts between local events and tasks\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 [shorts](index.html) module"] -pub struct SHORTS_SPEC; -impl crate::RegisterSpec for SHORTS_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [shorts::R](R) reader structure"] -impl crate::Readable for SHORTS_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [shorts::W](W) writer structure"] -impl crate::Writable for SHORTS_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets SHORTS to value 0"] -impl crate::Resettable for SHORTS_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/pwm0/tasks_nextstep.rs b/down-the-stack/dk_pac/src/pwm0/tasks_nextstep.rs deleted file mode 100644 index cc81fe5..0000000 --- a/down-the-stack/dk_pac/src/pwm0/tasks_nextstep.rs +++ /dev/null @@ -1,72 +0,0 @@ -#[doc = "Register `TASKS_NEXTSTEP` 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 = "Steps by one value in the current sequence on all enabled channels if DECODER.MODE=NextStep. Does not cause PWM generation to start it was not running.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum TASKS_NEXTSTEP_AW { - #[doc = "1: Trigger task"] - TRIGGER = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: TASKS_NEXTSTEP_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `TASKS_NEXTSTEP` writer - Steps by one value in the current sequence on all enabled channels if DECODER.MODE=NextStep. Does not cause PWM generation to start it was not running."] -pub type TASKS_NEXTSTEP_W<'a, const O: u8> = - crate::BitWriter<'a, u32, TASKS_NEXTSTEP_SPEC, TASKS_NEXTSTEP_AW, O>; -impl<'a, const O: u8> TASKS_NEXTSTEP_W<'a, O> { - #[doc = "Trigger task"] - #[inline(always)] - pub fn trigger(self) -> &'a mut W { - self.variant(TASKS_NEXTSTEP_AW::TRIGGER) - } -} -impl W { - #[doc = "Bit 0 - Steps by one value in the current sequence on all enabled channels if DECODER.MODE=NextStep. Does not cause PWM generation to start it was not running."] - #[inline(always)] - #[must_use] - pub fn tasks_nextstep(&mut self) -> TASKS_NEXTSTEP_W<0> { - TASKS_NEXTSTEP_W::new(self) - } - #[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 = "Steps by one value in the current sequence on all enabled channels if DECODER.MODE=NextStep. Does not cause PWM generation to start it was not running.\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 [tasks_nextstep](index.html) module"] -pub struct TASKS_NEXTSTEP_SPEC; -impl crate::RegisterSpec for TASKS_NEXTSTEP_SPEC { - type Ux = u32; -} -#[doc = "`write(|w| ..)` method takes [tasks_nextstep::W](W) writer structure"] -impl crate::Writable for TASKS_NEXTSTEP_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets TASKS_NEXTSTEP to value 0"] -impl crate::Resettable for TASKS_NEXTSTEP_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/pwm0/tasks_seqstart.rs b/down-the-stack/dk_pac/src/pwm0/tasks_seqstart.rs deleted file mode 100644 index f70db5f..0000000 --- a/down-the-stack/dk_pac/src/pwm0/tasks_seqstart.rs +++ /dev/null @@ -1,73 +0,0 @@ -#[doc = "Register `TASKS_SEQSTART[%s]` 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 = "Loads the first PWM value on all enabled channels from sequence n, and starts playing that sequence at the rate defined in SEQ\\[n\\]REFRESH and/or DECODER.MODE. Causes PWM generation to start it was not running.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum TASKS_SEQSTART_AW { - #[doc = "1: Trigger task"] - TRIGGER = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: TASKS_SEQSTART_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `TASKS_SEQSTART` writer - Loads the first PWM value on all enabled channels from sequence n, and starts playing that sequence at the rate defined in SEQ\\[n\\]REFRESH and/or DECODER.MODE. Causes PWM generation to start it was not running."] -pub type TASKS_SEQSTART_W<'a, const O: u8> = - crate::BitWriter<'a, u32, TASKS_SEQSTART_SPEC, TASKS_SEQSTART_AW, O>; -impl<'a, const O: u8> TASKS_SEQSTART_W<'a, O> { - #[doc = "Trigger task"] - #[inline(always)] - pub fn trigger(self) -> &'a mut W { - self.variant(TASKS_SEQSTART_AW::TRIGGER) - } -} -impl W { - #[doc = "Bit 0 - Loads the first PWM value on all enabled channels from sequence n, and starts playing that sequence at the rate defined in SEQ\\[n\\]REFRESH and/or DECODER.MODE. Causes PWM generation to start it was not running."] - #[inline(always)] - #[must_use] - pub fn tasks_seqstart(&mut self) -> TASKS_SEQSTART_W<0> { - TASKS_SEQSTART_W::new(self) - } - #[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 = "Description collection: Loads the first PWM value on all enabled channels from sequence n, and starts playing that sequence at the rate defined in SEQ\\[n\\]REFRESH and/or DECODER.MODE. Causes PWM generation to start it was not running.\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 [tasks_seqstart](index.html) module"] -pub struct TASKS_SEQSTART_SPEC; -impl crate::RegisterSpec for TASKS_SEQSTART_SPEC { - type Ux = u32; -} -#[doc = "`write(|w| ..)` method takes [tasks_seqstart::W](W) writer structure"] -impl crate::Writable for TASKS_SEQSTART_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets TASKS_SEQSTART[%s] -to value 0"] -impl crate::Resettable for TASKS_SEQSTART_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/pwm0/tasks_stop.rs b/down-the-stack/dk_pac/src/pwm0/tasks_stop.rs deleted file mode 100644 index b0052f1..0000000 --- a/down-the-stack/dk_pac/src/pwm0/tasks_stop.rs +++ /dev/null @@ -1,72 +0,0 @@ -#[doc = "Register `TASKS_STOP` 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 = "Stops PWM pulse generation on all channels at the end of current PWM period, and stops sequence playback\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum TASKS_STOP_AW { - #[doc = "1: Trigger task"] - TRIGGER = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: TASKS_STOP_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `TASKS_STOP` writer - Stops PWM pulse generation on all channels at the end of current PWM period, and stops sequence playback"] -pub type TASKS_STOP_W<'a, const O: u8> = - crate::BitWriter<'a, u32, TASKS_STOP_SPEC, TASKS_STOP_AW, O>; -impl<'a, const O: u8> TASKS_STOP_W<'a, O> { - #[doc = "Trigger task"] - #[inline(always)] - pub fn trigger(self) -> &'a mut W { - self.variant(TASKS_STOP_AW::TRIGGER) - } -} -impl W { - #[doc = "Bit 0 - Stops PWM pulse generation on all channels at the end of current PWM period, and stops sequence playback"] - #[inline(always)] - #[must_use] - pub fn tasks_stop(&mut self) -> TASKS_STOP_W<0> { - TASKS_STOP_W::new(self) - } - #[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 = "Stops PWM pulse generation on all channels at the end of current PWM period, and stops sequence playback\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 [tasks_stop](index.html) module"] -pub struct TASKS_STOP_SPEC; -impl crate::RegisterSpec for TASKS_STOP_SPEC { - type Ux = u32; -} -#[doc = "`write(|w| ..)` method takes [tasks_stop::W](W) writer structure"] -impl crate::Writable for TASKS_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 TASKS_STOP to value 0"] -impl crate::Resettable for TASKS_STOP_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/qdec.rs b/down-the-stack/dk_pac/src/qdec.rs deleted file mode 100644 index 23e38e6..0000000 --- a/down-the-stack/dk_pac/src/qdec.rs +++ /dev/null @@ -1,160 +0,0 @@ -#[doc = r"Register block"] -#[repr(C)] -pub struct RegisterBlock { - #[doc = "0x00 - Task starting the quadrature decoder"] - pub tasks_start: TASKS_START, - #[doc = "0x04 - Task stopping the quadrature decoder"] - pub tasks_stop: TASKS_STOP, - #[doc = "0x08 - Read and clear ACC and ACCDBL"] - pub tasks_readclracc: TASKS_READCLRACC, - #[doc = "0x0c - Read and clear ACC"] - pub tasks_rdclracc: TASKS_RDCLRACC, - #[doc = "0x10 - Read and clear ACCDBL"] - pub tasks_rdclrdbl: TASKS_RDCLRDBL, - _reserved5: [u8; 0xec], - #[doc = "0x100 - Event being generated for every new sample value written to the SAMPLE register"] - pub events_samplerdy: EVENTS_SAMPLERDY, - #[doc = "0x104 - Non-null report ready"] - pub events_reportrdy: EVENTS_REPORTRDY, - #[doc = "0x108 - ACC or ACCDBL register overflow"] - pub events_accof: EVENTS_ACCOF, - #[doc = "0x10c - Double displacement(s) detected"] - pub events_dblrdy: EVENTS_DBLRDY, - #[doc = "0x110 - QDEC has been stopped"] - pub events_stopped: EVENTS_STOPPED, - _reserved10: [u8; 0xec], - #[doc = "0x200 - Shortcuts between local events and tasks"] - pub shorts: SHORTS, - _reserved11: [u8; 0x0100], - #[doc = "0x304 - Enable interrupt"] - pub intenset: INTENSET, - #[doc = "0x308 - Disable interrupt"] - pub intenclr: INTENCLR, - _reserved13: [u8; 0x01f4], - #[doc = "0x500 - Enable the quadrature decoder"] - pub enable: ENABLE, - #[doc = "0x504 - LED output pin polarity"] - pub ledpol: LEDPOL, - #[doc = "0x508 - Sample period"] - pub sampleper: SAMPLEPER, - #[doc = "0x50c - Motion sample value"] - pub sample: SAMPLE, - #[doc = "0x510 - Number of samples to be taken before REPORTRDY and DBLRDY events can be generated"] - pub reportper: REPORTPER, - #[doc = "0x514 - Register accumulating the valid transitions"] - pub acc: ACC, - #[doc = "0x518 - Snapshot of the ACC register, updated by the READCLRACC or RDCLRACC task"] - pub accread: ACCREAD, - #[doc = "0x51c..0x528 - Unspecified"] - pub psel: PSEL, - #[doc = "0x528 - Enable input debounce filters"] - pub dbfen: DBFEN, - _reserved22: [u8; 0x14], - #[doc = "0x540 - Time period the LED is switched ON prior to sampling"] - pub ledpre: LEDPRE, - #[doc = "0x544 - Register accumulating the number of detected double transitions"] - pub accdbl: ACCDBL, - #[doc = "0x548 - Snapshot of the ACCDBL, updated by the READCLRACC or RDCLRDBL task"] - pub accdblread: ACCDBLREAD, -} -#[doc = "TASKS_START (w) register accessor: an alias for `Reg`"] -pub type TASKS_START = crate::Reg; -#[doc = "Task starting the quadrature decoder"] -pub mod tasks_start; -#[doc = "TASKS_STOP (w) register accessor: an alias for `Reg`"] -pub type TASKS_STOP = crate::Reg; -#[doc = "Task stopping the quadrature decoder"] -pub mod tasks_stop; -#[doc = "TASKS_READCLRACC (w) register accessor: an alias for `Reg`"] -pub type TASKS_READCLRACC = crate::Reg; -#[doc = "Read and clear ACC and ACCDBL"] -pub mod tasks_readclracc; -#[doc = "TASKS_RDCLRACC (w) register accessor: an alias for `Reg`"] -pub type TASKS_RDCLRACC = crate::Reg; -#[doc = "Read and clear ACC"] -pub mod tasks_rdclracc; -#[doc = "TASKS_RDCLRDBL (w) register accessor: an alias for `Reg`"] -pub type TASKS_RDCLRDBL = crate::Reg; -#[doc = "Read and clear ACCDBL"] -pub mod tasks_rdclrdbl; -#[doc = "EVENTS_SAMPLERDY (rw) register accessor: an alias for `Reg`"] -pub type EVENTS_SAMPLERDY = crate::Reg; -#[doc = "Event being generated for every new sample value written to the SAMPLE register"] -pub mod events_samplerdy; -#[doc = "EVENTS_REPORTRDY (rw) register accessor: an alias for `Reg`"] -pub type EVENTS_REPORTRDY = crate::Reg; -#[doc = "Non-null report ready"] -pub mod events_reportrdy; -#[doc = "EVENTS_ACCOF (rw) register accessor: an alias for `Reg`"] -pub type EVENTS_ACCOF = crate::Reg; -#[doc = "ACC or ACCDBL register overflow"] -pub mod events_accof; -#[doc = "EVENTS_DBLRDY (rw) register accessor: an alias for `Reg`"] -pub type EVENTS_DBLRDY = crate::Reg; -#[doc = "Double displacement(s) detected"] -pub mod events_dblrdy; -#[doc = "EVENTS_STOPPED (rw) register accessor: an alias for `Reg`"] -pub type EVENTS_STOPPED = crate::Reg; -#[doc = "QDEC has been stopped"] -pub mod events_stopped; -#[doc = "SHORTS (rw) register accessor: an alias for `Reg`"] -pub type SHORTS = crate::Reg; -#[doc = "Shortcuts between local events and tasks"] -pub mod shorts; -#[doc = "INTENSET (rw) register accessor: an alias for `Reg`"] -pub type INTENSET = crate::Reg; -#[doc = "Enable interrupt"] -pub mod intenset; -#[doc = "INTENCLR (rw) register accessor: an alias for `Reg`"] -pub type INTENCLR = crate::Reg; -#[doc = "Disable interrupt"] -pub mod intenclr; -#[doc = "ENABLE (rw) register accessor: an alias for `Reg`"] -pub type ENABLE = crate::Reg; -#[doc = "Enable the quadrature decoder"] -pub mod enable; -#[doc = "LEDPOL (rw) register accessor: an alias for `Reg`"] -pub type LEDPOL = crate::Reg; -#[doc = "LED output pin polarity"] -pub mod ledpol; -#[doc = "SAMPLEPER (rw) register accessor: an alias for `Reg`"] -pub type SAMPLEPER = crate::Reg; -#[doc = "Sample period"] -pub mod sampleper; -#[doc = "SAMPLE (r) register accessor: an alias for `Reg`"] -pub type SAMPLE = crate::Reg; -#[doc = "Motion sample value"] -pub mod sample; -#[doc = "REPORTPER (rw) register accessor: an alias for `Reg`"] -pub type REPORTPER = crate::Reg; -#[doc = "Number of samples to be taken before REPORTRDY and DBLRDY events can be generated"] -pub mod reportper; -#[doc = "ACC (r) register accessor: an alias for `Reg`"] -pub type ACC = crate::Reg; -#[doc = "Register accumulating the valid transitions"] -pub mod acc; -#[doc = "ACCREAD (r) register accessor: an alias for `Reg`"] -pub type ACCREAD = crate::Reg; -#[doc = "Snapshot of the ACC register, updated by the READCLRACC or RDCLRACC task"] -pub mod accread; -#[doc = "Unspecified"] -pub use self::psel::PSEL; -#[doc = r"Cluster"] -#[doc = "Unspecified"] -pub mod psel; -#[doc = "DBFEN (rw) register accessor: an alias for `Reg`"] -pub type DBFEN = crate::Reg; -#[doc = "Enable input debounce filters"] -pub mod dbfen; -#[doc = "LEDPRE (rw) register accessor: an alias for `Reg`"] -pub type LEDPRE = crate::Reg; -#[doc = "Time period the LED is switched ON prior to sampling"] -pub mod ledpre; -#[doc = "ACCDBL (r) register accessor: an alias for `Reg`"] -pub type ACCDBL = crate::Reg; -#[doc = "Register accumulating the number of detected double transitions"] -pub mod accdbl; -#[doc = "ACCDBLREAD (r) register accessor: an alias for `Reg`"] -pub type ACCDBLREAD = crate::Reg; -#[doc = "Snapshot of the ACCDBL, updated by the READCLRACC or RDCLRDBL task"] -pub mod accdblread; diff --git a/down-the-stack/dk_pac/src/qdec/acc.rs b/down-the-stack/dk_pac/src/qdec/acc.rs deleted file mode 100644 index 680db42..0000000 --- a/down-the-stack/dk_pac/src/qdec/acc.rs +++ /dev/null @@ -1,37 +0,0 @@ -#[doc = "Register `ACC` 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 = "Field `ACC` reader - Register accumulating all valid samples (not double transition) read from the SAMPLE register"] -pub type ACC_R = crate::FieldReader; -impl R { - #[doc = "Bits 0:31 - Register accumulating all valid samples (not double transition) read from the SAMPLE register"] - #[inline(always)] - pub fn acc(&self) -> ACC_R { - ACC_R::new(self.bits) - } -} -#[doc = "Register accumulating the valid transitions\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 [acc](index.html) module"] -pub struct ACC_SPEC; -impl crate::RegisterSpec for ACC_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [acc::R](R) reader structure"] -impl crate::Readable for ACC_SPEC { - type Reader = R; -} -#[doc = "`reset()` method sets ACC to value 0"] -impl crate::Resettable for ACC_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/qdec/accdbl.rs b/down-the-stack/dk_pac/src/qdec/accdbl.rs deleted file mode 100644 index c3a2cc5..0000000 --- a/down-the-stack/dk_pac/src/qdec/accdbl.rs +++ /dev/null @@ -1,37 +0,0 @@ -#[doc = "Register `ACCDBL` 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 = "Field `ACCDBL` reader - Register accumulating the number of detected double or illegal transitions. ( SAMPLE = 2 )."] -pub type ACCDBL_R = crate::FieldReader; -impl R { - #[doc = "Bits 0:3 - Register accumulating the number of detected double or illegal transitions. ( SAMPLE = 2 )."] - #[inline(always)] - pub fn accdbl(&self) -> ACCDBL_R { - ACCDBL_R::new((self.bits & 0x0f) as u8) - } -} -#[doc = "Register accumulating the number of detected double transitions\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 [accdbl](index.html) module"] -pub struct ACCDBL_SPEC; -impl crate::RegisterSpec for ACCDBL_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [accdbl::R](R) reader structure"] -impl crate::Readable for ACCDBL_SPEC { - type Reader = R; -} -#[doc = "`reset()` method sets ACCDBL to value 0"] -impl crate::Resettable for ACCDBL_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/qdec/accdblread.rs b/down-the-stack/dk_pac/src/qdec/accdblread.rs deleted file mode 100644 index 9d6e17f..0000000 --- a/down-the-stack/dk_pac/src/qdec/accdblread.rs +++ /dev/null @@ -1,37 +0,0 @@ -#[doc = "Register `ACCDBLREAD` 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 = "Field `ACCDBLREAD` reader - Snapshot of the ACCDBL register. This field is updated when the READCLRACC or RDCLRDBL task is triggered."] -pub type ACCDBLREAD_R = crate::FieldReader; -impl R { - #[doc = "Bits 0:3 - Snapshot of the ACCDBL register. This field is updated when the READCLRACC or RDCLRDBL task is triggered."] - #[inline(always)] - pub fn accdblread(&self) -> ACCDBLREAD_R { - ACCDBLREAD_R::new((self.bits & 0x0f) as u8) - } -} -#[doc = "Snapshot of the ACCDBL, updated by the READCLRACC or RDCLRDBL task\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 [accdblread](index.html) module"] -pub struct ACCDBLREAD_SPEC; -impl crate::RegisterSpec for ACCDBLREAD_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [accdblread::R](R) reader structure"] -impl crate::Readable for ACCDBLREAD_SPEC { - type Reader = R; -} -#[doc = "`reset()` method sets ACCDBLREAD to value 0"] -impl crate::Resettable for ACCDBLREAD_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/qdec/accread.rs b/down-the-stack/dk_pac/src/qdec/accread.rs deleted file mode 100644 index 4722c14..0000000 --- a/down-the-stack/dk_pac/src/qdec/accread.rs +++ /dev/null @@ -1,37 +0,0 @@ -#[doc = "Register `ACCREAD` 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 = "Field `ACCREAD` reader - Snapshot of the ACC register."] -pub type ACCREAD_R = crate::FieldReader; -impl R { - #[doc = "Bits 0:31 - Snapshot of the ACC register."] - #[inline(always)] - pub fn accread(&self) -> ACCREAD_R { - ACCREAD_R::new(self.bits) - } -} -#[doc = "Snapshot of the ACC register, updated by the READCLRACC or RDCLRACC task\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 [accread](index.html) module"] -pub struct ACCREAD_SPEC; -impl crate::RegisterSpec for ACCREAD_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [accread::R](R) reader structure"] -impl crate::Readable for ACCREAD_SPEC { - type Reader = R; -} -#[doc = "`reset()` method sets ACCREAD to value 0"] -impl crate::Resettable for ACCREAD_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/qdec/dbfen.rs b/down-the-stack/dk_pac/src/qdec/dbfen.rs deleted file mode 100644 index 36d577a..0000000 --- a/down-the-stack/dk_pac/src/qdec/dbfen.rs +++ /dev/null @@ -1,126 +0,0 @@ -#[doc = "Register `DBFEN` 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 `DBFEN` 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 `DBFEN` reader - Enable input debounce filters"] -pub type DBFEN_R = crate::BitReader; -#[doc = "Enable input debounce filters\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum DBFEN_A { - #[doc = "0: Debounce input filters disabled"] - DISABLED = 0, - #[doc = "1: Debounce input filters enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: DBFEN_A) -> Self { - variant as u8 != 0 - } -} -impl DBFEN_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> DBFEN_A { - match self.bits { - false => DBFEN_A::DISABLED, - true => DBFEN_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == DBFEN_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == DBFEN_A::ENABLED - } -} -#[doc = "Field `DBFEN` writer - Enable input debounce filters"] -pub type DBFEN_W<'a, const O: u8> = crate::BitWriter<'a, u32, DBFEN_SPEC, DBFEN_A, O>; -impl<'a, const O: u8> DBFEN_W<'a, O> { - #[doc = "Debounce input filters disabled"] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(DBFEN_A::DISABLED) - } - #[doc = "Debounce input filters enabled"] - #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(DBFEN_A::ENABLED) - } -} -impl R { - #[doc = "Bit 0 - Enable input debounce filters"] - #[inline(always)] - pub fn dbfen(&self) -> DBFEN_R { - DBFEN_R::new((self.bits & 1) != 0) - } -} -impl W { - #[doc = "Bit 0 - Enable input debounce filters"] - #[inline(always)] - #[must_use] - pub fn dbfen(&mut self) -> DBFEN_W<0> { - DBFEN_W::new(self) - } - #[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 = "Enable input debounce filters\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 [dbfen](index.html) module"] -pub struct DBFEN_SPEC; -impl crate::RegisterSpec for DBFEN_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [dbfen::R](R) reader structure"] -impl crate::Readable for DBFEN_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [dbfen::W](W) writer structure"] -impl crate::Writable for DBFEN_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets DBFEN to value 0"] -impl crate::Resettable for DBFEN_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/qdec/enable.rs b/down-the-stack/dk_pac/src/qdec/enable.rs deleted file mode 100644 index 7862405..0000000 --- a/down-the-stack/dk_pac/src/qdec/enable.rs +++ /dev/null @@ -1,126 +0,0 @@ -#[doc = "Register `ENABLE` 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 `ENABLE` 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 `ENABLE` reader - Enable or disable the quadrature decoder"] -pub type ENABLE_R = crate::BitReader; -#[doc = "Enable or disable the quadrature decoder\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum ENABLE_A { - #[doc = "0: Disable"] - DISABLED = 0, - #[doc = "1: Enable"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: ENABLE_A) -> Self { - variant as u8 != 0 - } -} -impl ENABLE_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> ENABLE_A { - match self.bits { - false => ENABLE_A::DISABLED, - true => ENABLE_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == ENABLE_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == ENABLE_A::ENABLED - } -} -#[doc = "Field `ENABLE` writer - Enable or disable the quadrature decoder"] -pub type ENABLE_W<'a, const O: u8> = crate::BitWriter<'a, u32, ENABLE_SPEC, ENABLE_A, O>; -impl<'a, const O: u8> ENABLE_W<'a, O> { - #[doc = "Disable"] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(ENABLE_A::DISABLED) - } - #[doc = "Enable"] - #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(ENABLE_A::ENABLED) - } -} -impl R { - #[doc = "Bit 0 - Enable or disable the quadrature decoder"] - #[inline(always)] - pub fn enable(&self) -> ENABLE_R { - ENABLE_R::new((self.bits & 1) != 0) - } -} -impl W { - #[doc = "Bit 0 - Enable or disable the quadrature decoder"] - #[inline(always)] - #[must_use] - pub fn enable(&mut self) -> ENABLE_W<0> { - 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 - } -} -#[doc = "Enable the quadrature decoder\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 [enable](index.html) module"] -pub struct ENABLE_SPEC; -impl crate::RegisterSpec for ENABLE_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [enable::R](R) reader structure"] -impl crate::Readable for ENABLE_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [enable::W](W) writer structure"] -impl crate::Writable for ENABLE_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets ENABLE to value 0"] -impl crate::Resettable for ENABLE_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/qdec/events_accof.rs b/down-the-stack/dk_pac/src/qdec/events_accof.rs deleted file mode 100644 index 580e1fe..0000000 --- a/down-the-stack/dk_pac/src/qdec/events_accof.rs +++ /dev/null @@ -1,127 +0,0 @@ -#[doc = "Register `EVENTS_ACCOF` 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 `EVENTS_ACCOF` 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 `EVENTS_ACCOF` reader - ACC or ACCDBL register overflow"] -pub type EVENTS_ACCOF_R = crate::BitReader; -#[doc = "ACC or ACCDBL register overflow\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum EVENTS_ACCOF_A { - #[doc = "0: Event not generated"] - NOT_GENERATED = 0, - #[doc = "1: Event generated"] - GENERATED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: EVENTS_ACCOF_A) -> Self { - variant as u8 != 0 - } -} -impl EVENTS_ACCOF_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> EVENTS_ACCOF_A { - match self.bits { - false => EVENTS_ACCOF_A::NOT_GENERATED, - true => EVENTS_ACCOF_A::GENERATED, - } - } - #[doc = "Checks if the value of the field is `NOT_GENERATED`"] - #[inline(always)] - pub fn is_not_generated(&self) -> bool { - *self == EVENTS_ACCOF_A::NOT_GENERATED - } - #[doc = "Checks if the value of the field is `GENERATED`"] - #[inline(always)] - pub fn is_generated(&self) -> bool { - *self == EVENTS_ACCOF_A::GENERATED - } -} -#[doc = "Field `EVENTS_ACCOF` writer - ACC or ACCDBL register overflow"] -pub type EVENTS_ACCOF_W<'a, const O: u8> = - crate::BitWriter<'a, u32, EVENTS_ACCOF_SPEC, EVENTS_ACCOF_A, O>; -impl<'a, const O: u8> EVENTS_ACCOF_W<'a, O> { - #[doc = "Event not generated"] - #[inline(always)] - pub fn not_generated(self) -> &'a mut W { - self.variant(EVENTS_ACCOF_A::NOT_GENERATED) - } - #[doc = "Event generated"] - #[inline(always)] - pub fn generated(self) -> &'a mut W { - self.variant(EVENTS_ACCOF_A::GENERATED) - } -} -impl R { - #[doc = "Bit 0 - ACC or ACCDBL register overflow"] - #[inline(always)] - pub fn events_accof(&self) -> EVENTS_ACCOF_R { - EVENTS_ACCOF_R::new((self.bits & 1) != 0) - } -} -impl W { - #[doc = "Bit 0 - ACC or ACCDBL register overflow"] - #[inline(always)] - #[must_use] - pub fn events_accof(&mut self) -> EVENTS_ACCOF_W<0> { - EVENTS_ACCOF_W::new(self) - } - #[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 = "ACC or ACCDBL register overflow\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 [events_accof](index.html) module"] -pub struct EVENTS_ACCOF_SPEC; -impl crate::RegisterSpec for EVENTS_ACCOF_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [events_accof::R](R) reader structure"] -impl crate::Readable for EVENTS_ACCOF_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [events_accof::W](W) writer structure"] -impl crate::Writable for EVENTS_ACCOF_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets EVENTS_ACCOF to value 0"] -impl crate::Resettable for EVENTS_ACCOF_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/qdec/events_dblrdy.rs b/down-the-stack/dk_pac/src/qdec/events_dblrdy.rs deleted file mode 100644 index 3bbacfc..0000000 --- a/down-the-stack/dk_pac/src/qdec/events_dblrdy.rs +++ /dev/null @@ -1,127 +0,0 @@ -#[doc = "Register `EVENTS_DBLRDY` 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 `EVENTS_DBLRDY` 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 `EVENTS_DBLRDY` reader - Double displacement(s) detected"] -pub type EVENTS_DBLRDY_R = crate::BitReader; -#[doc = "Double displacement(s) detected\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum EVENTS_DBLRDY_A { - #[doc = "0: Event not generated"] - NOT_GENERATED = 0, - #[doc = "1: Event generated"] - GENERATED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: EVENTS_DBLRDY_A) -> Self { - variant as u8 != 0 - } -} -impl EVENTS_DBLRDY_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> EVENTS_DBLRDY_A { - match self.bits { - false => EVENTS_DBLRDY_A::NOT_GENERATED, - true => EVENTS_DBLRDY_A::GENERATED, - } - } - #[doc = "Checks if the value of the field is `NOT_GENERATED`"] - #[inline(always)] - pub fn is_not_generated(&self) -> bool { - *self == EVENTS_DBLRDY_A::NOT_GENERATED - } - #[doc = "Checks if the value of the field is `GENERATED`"] - #[inline(always)] - pub fn is_generated(&self) -> bool { - *self == EVENTS_DBLRDY_A::GENERATED - } -} -#[doc = "Field `EVENTS_DBLRDY` writer - Double displacement(s) detected"] -pub type EVENTS_DBLRDY_W<'a, const O: u8> = - crate::BitWriter<'a, u32, EVENTS_DBLRDY_SPEC, EVENTS_DBLRDY_A, O>; -impl<'a, const O: u8> EVENTS_DBLRDY_W<'a, O> { - #[doc = "Event not generated"] - #[inline(always)] - pub fn not_generated(self) -> &'a mut W { - self.variant(EVENTS_DBLRDY_A::NOT_GENERATED) - } - #[doc = "Event generated"] - #[inline(always)] - pub fn generated(self) -> &'a mut W { - self.variant(EVENTS_DBLRDY_A::GENERATED) - } -} -impl R { - #[doc = "Bit 0 - Double displacement(s) detected"] - #[inline(always)] - pub fn events_dblrdy(&self) -> EVENTS_DBLRDY_R { - EVENTS_DBLRDY_R::new((self.bits & 1) != 0) - } -} -impl W { - #[doc = "Bit 0 - Double displacement(s) detected"] - #[inline(always)] - #[must_use] - pub fn events_dblrdy(&mut self) -> EVENTS_DBLRDY_W<0> { - EVENTS_DBLRDY_W::new(self) - } - #[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 = "Double displacement(s) detected\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 [events_dblrdy](index.html) module"] -pub struct EVENTS_DBLRDY_SPEC; -impl crate::RegisterSpec for EVENTS_DBLRDY_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [events_dblrdy::R](R) reader structure"] -impl crate::Readable for EVENTS_DBLRDY_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [events_dblrdy::W](W) writer structure"] -impl crate::Writable for EVENTS_DBLRDY_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets EVENTS_DBLRDY to value 0"] -impl crate::Resettable for EVENTS_DBLRDY_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/qdec/events_reportrdy.rs b/down-the-stack/dk_pac/src/qdec/events_reportrdy.rs deleted file mode 100644 index fd8ef54..0000000 --- a/down-the-stack/dk_pac/src/qdec/events_reportrdy.rs +++ /dev/null @@ -1,127 +0,0 @@ -#[doc = "Register `EVENTS_REPORTRDY` 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 `EVENTS_REPORTRDY` 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 `EVENTS_REPORTRDY` reader - Non-null report ready"] -pub type EVENTS_REPORTRDY_R = crate::BitReader; -#[doc = "Non-null report ready\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum EVENTS_REPORTRDY_A { - #[doc = "0: Event not generated"] - NOT_GENERATED = 0, - #[doc = "1: Event generated"] - GENERATED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: EVENTS_REPORTRDY_A) -> Self { - variant as u8 != 0 - } -} -impl EVENTS_REPORTRDY_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> EVENTS_REPORTRDY_A { - match self.bits { - false => EVENTS_REPORTRDY_A::NOT_GENERATED, - true => EVENTS_REPORTRDY_A::GENERATED, - } - } - #[doc = "Checks if the value of the field is `NOT_GENERATED`"] - #[inline(always)] - pub fn is_not_generated(&self) -> bool { - *self == EVENTS_REPORTRDY_A::NOT_GENERATED - } - #[doc = "Checks if the value of the field is `GENERATED`"] - #[inline(always)] - pub fn is_generated(&self) -> bool { - *self == EVENTS_REPORTRDY_A::GENERATED - } -} -#[doc = "Field `EVENTS_REPORTRDY` writer - Non-null report ready"] -pub type EVENTS_REPORTRDY_W<'a, const O: u8> = - crate::BitWriter<'a, u32, EVENTS_REPORTRDY_SPEC, EVENTS_REPORTRDY_A, O>; -impl<'a, const O: u8> EVENTS_REPORTRDY_W<'a, O> { - #[doc = "Event not generated"] - #[inline(always)] - pub fn not_generated(self) -> &'a mut W { - self.variant(EVENTS_REPORTRDY_A::NOT_GENERATED) - } - #[doc = "Event generated"] - #[inline(always)] - pub fn generated(self) -> &'a mut W { - self.variant(EVENTS_REPORTRDY_A::GENERATED) - } -} -impl R { - #[doc = "Bit 0 - Non-null report ready"] - #[inline(always)] - pub fn events_reportrdy(&self) -> EVENTS_REPORTRDY_R { - EVENTS_REPORTRDY_R::new((self.bits & 1) != 0) - } -} -impl W { - #[doc = "Bit 0 - Non-null report ready"] - #[inline(always)] - #[must_use] - pub fn events_reportrdy(&mut self) -> EVENTS_REPORTRDY_W<0> { - EVENTS_REPORTRDY_W::new(self) - } - #[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 = "Non-null report ready\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 [events_reportrdy](index.html) module"] -pub struct EVENTS_REPORTRDY_SPEC; -impl crate::RegisterSpec for EVENTS_REPORTRDY_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [events_reportrdy::R](R) reader structure"] -impl crate::Readable for EVENTS_REPORTRDY_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [events_reportrdy::W](W) writer structure"] -impl crate::Writable for EVENTS_REPORTRDY_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets EVENTS_REPORTRDY to value 0"] -impl crate::Resettable for EVENTS_REPORTRDY_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/qdec/events_samplerdy.rs b/down-the-stack/dk_pac/src/qdec/events_samplerdy.rs deleted file mode 100644 index 4c5fe71..0000000 --- a/down-the-stack/dk_pac/src/qdec/events_samplerdy.rs +++ /dev/null @@ -1,127 +0,0 @@ -#[doc = "Register `EVENTS_SAMPLERDY` 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 `EVENTS_SAMPLERDY` 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 `EVENTS_SAMPLERDY` reader - Event being generated for every new sample value written to the SAMPLE register"] -pub type EVENTS_SAMPLERDY_R = crate::BitReader; -#[doc = "Event being generated for every new sample value written to the SAMPLE register\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum EVENTS_SAMPLERDY_A { - #[doc = "0: Event not generated"] - NOT_GENERATED = 0, - #[doc = "1: Event generated"] - GENERATED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: EVENTS_SAMPLERDY_A) -> Self { - variant as u8 != 0 - } -} -impl EVENTS_SAMPLERDY_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> EVENTS_SAMPLERDY_A { - match self.bits { - false => EVENTS_SAMPLERDY_A::NOT_GENERATED, - true => EVENTS_SAMPLERDY_A::GENERATED, - } - } - #[doc = "Checks if the value of the field is `NOT_GENERATED`"] - #[inline(always)] - pub fn is_not_generated(&self) -> bool { - *self == EVENTS_SAMPLERDY_A::NOT_GENERATED - } - #[doc = "Checks if the value of the field is `GENERATED`"] - #[inline(always)] - pub fn is_generated(&self) -> bool { - *self == EVENTS_SAMPLERDY_A::GENERATED - } -} -#[doc = "Field `EVENTS_SAMPLERDY` writer - Event being generated for every new sample value written to the SAMPLE register"] -pub type EVENTS_SAMPLERDY_W<'a, const O: u8> = - crate::BitWriter<'a, u32, EVENTS_SAMPLERDY_SPEC, EVENTS_SAMPLERDY_A, O>; -impl<'a, const O: u8> EVENTS_SAMPLERDY_W<'a, O> { - #[doc = "Event not generated"] - #[inline(always)] - pub fn not_generated(self) -> &'a mut W { - self.variant(EVENTS_SAMPLERDY_A::NOT_GENERATED) - } - #[doc = "Event generated"] - #[inline(always)] - pub fn generated(self) -> &'a mut W { - self.variant(EVENTS_SAMPLERDY_A::GENERATED) - } -} -impl R { - #[doc = "Bit 0 - Event being generated for every new sample value written to the SAMPLE register"] - #[inline(always)] - pub fn events_samplerdy(&self) -> EVENTS_SAMPLERDY_R { - EVENTS_SAMPLERDY_R::new((self.bits & 1) != 0) - } -} -impl W { - #[doc = "Bit 0 - Event being generated for every new sample value written to the SAMPLE register"] - #[inline(always)] - #[must_use] - pub fn events_samplerdy(&mut self) -> EVENTS_SAMPLERDY_W<0> { - EVENTS_SAMPLERDY_W::new(self) - } - #[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 = "Event being generated for every new sample value written to the SAMPLE register\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 [events_samplerdy](index.html) module"] -pub struct EVENTS_SAMPLERDY_SPEC; -impl crate::RegisterSpec for EVENTS_SAMPLERDY_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [events_samplerdy::R](R) reader structure"] -impl crate::Readable for EVENTS_SAMPLERDY_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [events_samplerdy::W](W) writer structure"] -impl crate::Writable for EVENTS_SAMPLERDY_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets EVENTS_SAMPLERDY to value 0"] -impl crate::Resettable for EVENTS_SAMPLERDY_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/qdec/events_stopped.rs b/down-the-stack/dk_pac/src/qdec/events_stopped.rs deleted file mode 100644 index 85c4108..0000000 --- a/down-the-stack/dk_pac/src/qdec/events_stopped.rs +++ /dev/null @@ -1,127 +0,0 @@ -#[doc = "Register `EVENTS_STOPPED` 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 `EVENTS_STOPPED` 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 `EVENTS_STOPPED` reader - QDEC has been stopped"] -pub type EVENTS_STOPPED_R = crate::BitReader; -#[doc = "QDEC has been stopped\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum EVENTS_STOPPED_A { - #[doc = "0: Event not generated"] - NOT_GENERATED = 0, - #[doc = "1: Event generated"] - GENERATED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: EVENTS_STOPPED_A) -> Self { - variant as u8 != 0 - } -} -impl EVENTS_STOPPED_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> EVENTS_STOPPED_A { - match self.bits { - false => EVENTS_STOPPED_A::NOT_GENERATED, - true => EVENTS_STOPPED_A::GENERATED, - } - } - #[doc = "Checks if the value of the field is `NOT_GENERATED`"] - #[inline(always)] - pub fn is_not_generated(&self) -> bool { - *self == EVENTS_STOPPED_A::NOT_GENERATED - } - #[doc = "Checks if the value of the field is `GENERATED`"] - #[inline(always)] - pub fn is_generated(&self) -> bool { - *self == EVENTS_STOPPED_A::GENERATED - } -} -#[doc = "Field `EVENTS_STOPPED` writer - QDEC has been stopped"] -pub type EVENTS_STOPPED_W<'a, const O: u8> = - crate::BitWriter<'a, u32, EVENTS_STOPPED_SPEC, EVENTS_STOPPED_A, O>; -impl<'a, const O: u8> EVENTS_STOPPED_W<'a, O> { - #[doc = "Event not generated"] - #[inline(always)] - pub fn not_generated(self) -> &'a mut W { - self.variant(EVENTS_STOPPED_A::NOT_GENERATED) - } - #[doc = "Event generated"] - #[inline(always)] - pub fn generated(self) -> &'a mut W { - self.variant(EVENTS_STOPPED_A::GENERATED) - } -} -impl R { - #[doc = "Bit 0 - QDEC has been stopped"] - #[inline(always)] - pub fn events_stopped(&self) -> EVENTS_STOPPED_R { - EVENTS_STOPPED_R::new((self.bits & 1) != 0) - } -} -impl W { - #[doc = "Bit 0 - QDEC has been stopped"] - #[inline(always)] - #[must_use] - pub fn events_stopped(&mut self) -> EVENTS_STOPPED_W<0> { - EVENTS_STOPPED_W::new(self) - } - #[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 = "QDEC has been stopped\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 [events_stopped](index.html) module"] -pub struct EVENTS_STOPPED_SPEC; -impl crate::RegisterSpec for EVENTS_STOPPED_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [events_stopped::R](R) reader structure"] -impl crate::Readable for EVENTS_STOPPED_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [events_stopped::W](W) writer structure"] -impl crate::Writable for EVENTS_STOPPED_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets EVENTS_STOPPED to value 0"] -impl crate::Resettable for EVENTS_STOPPED_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/qdec/intenclr.rs b/down-the-stack/dk_pac/src/qdec/intenclr.rs deleted file mode 100644 index aba2150..0000000 --- a/down-the-stack/dk_pac/src/qdec/intenclr.rs +++ /dev/null @@ -1,405 +0,0 @@ -#[doc = "Register `INTENCLR` 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 `INTENCLR` 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 `SAMPLERDY` reader - Write '1' to disable interrupt for event SAMPLERDY"] -pub type SAMPLERDY_R = crate::BitReader; -#[doc = "Write '1' to disable interrupt for event SAMPLERDY\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum SAMPLERDY_A { - #[doc = "0: Read: Disabled"] - DISABLED = 0, - #[doc = "1: Read: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: SAMPLERDY_A) -> Self { - variant as u8 != 0 - } -} -impl SAMPLERDY_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> SAMPLERDY_A { - match self.bits { - false => SAMPLERDY_A::DISABLED, - true => SAMPLERDY_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == SAMPLERDY_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == SAMPLERDY_A::ENABLED - } -} -#[doc = "Write '1' to disable interrupt for event SAMPLERDY\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum SAMPLERDY_AW { - #[doc = "1: Disable"] - CLEAR = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: SAMPLERDY_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `SAMPLERDY` writer - Write '1' to disable interrupt for event SAMPLERDY"] -pub type SAMPLERDY_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENCLR_SPEC, SAMPLERDY_AW, O>; -impl<'a, const O: u8> SAMPLERDY_W<'a, O> { - #[doc = "Disable"] - #[inline(always)] - pub fn clear(self) -> &'a mut W { - self.variant(SAMPLERDY_AW::CLEAR) - } -} -#[doc = "Field `REPORTRDY` reader - Write '1' to disable interrupt for event REPORTRDY"] -pub type REPORTRDY_R = crate::BitReader; -#[doc = "Write '1' to disable interrupt for event REPORTRDY\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum REPORTRDY_A { - #[doc = "0: Read: Disabled"] - DISABLED = 0, - #[doc = "1: Read: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: REPORTRDY_A) -> Self { - variant as u8 != 0 - } -} -impl REPORTRDY_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> REPORTRDY_A { - match self.bits { - false => REPORTRDY_A::DISABLED, - true => REPORTRDY_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == REPORTRDY_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == REPORTRDY_A::ENABLED - } -} -#[doc = "Write '1' to disable interrupt for event REPORTRDY\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum REPORTRDY_AW { - #[doc = "1: Disable"] - CLEAR = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: REPORTRDY_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `REPORTRDY` writer - Write '1' to disable interrupt for event REPORTRDY"] -pub type REPORTRDY_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENCLR_SPEC, REPORTRDY_AW, O>; -impl<'a, const O: u8> REPORTRDY_W<'a, O> { - #[doc = "Disable"] - #[inline(always)] - pub fn clear(self) -> &'a mut W { - self.variant(REPORTRDY_AW::CLEAR) - } -} -#[doc = "Field `ACCOF` reader - Write '1' to disable interrupt for event ACCOF"] -pub type ACCOF_R = crate::BitReader; -#[doc = "Write '1' to disable interrupt for event ACCOF\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum ACCOF_A { - #[doc = "0: Read: Disabled"] - DISABLED = 0, - #[doc = "1: Read: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: ACCOF_A) -> Self { - variant as u8 != 0 - } -} -impl ACCOF_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> ACCOF_A { - match self.bits { - false => ACCOF_A::DISABLED, - true => ACCOF_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == ACCOF_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == ACCOF_A::ENABLED - } -} -#[doc = "Write '1' to disable interrupt for event ACCOF\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum ACCOF_AW { - #[doc = "1: Disable"] - CLEAR = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: ACCOF_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `ACCOF` writer - Write '1' to disable interrupt for event ACCOF"] -pub type ACCOF_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENCLR_SPEC, ACCOF_AW, O>; -impl<'a, const O: u8> ACCOF_W<'a, O> { - #[doc = "Disable"] - #[inline(always)] - pub fn clear(self) -> &'a mut W { - self.variant(ACCOF_AW::CLEAR) - } -} -#[doc = "Field `DBLRDY` reader - Write '1' to disable interrupt for event DBLRDY"] -pub type DBLRDY_R = crate::BitReader; -#[doc = "Write '1' to disable interrupt for event DBLRDY\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum DBLRDY_A { - #[doc = "0: Read: Disabled"] - DISABLED = 0, - #[doc = "1: Read: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: DBLRDY_A) -> Self { - variant as u8 != 0 - } -} -impl DBLRDY_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> DBLRDY_A { - match self.bits { - false => DBLRDY_A::DISABLED, - true => DBLRDY_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == DBLRDY_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == DBLRDY_A::ENABLED - } -} -#[doc = "Write '1' to disable interrupt for event DBLRDY\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum DBLRDY_AW { - #[doc = "1: Disable"] - CLEAR = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: DBLRDY_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `DBLRDY` writer - Write '1' to disable interrupt for event DBLRDY"] -pub type DBLRDY_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENCLR_SPEC, DBLRDY_AW, O>; -impl<'a, const O: u8> DBLRDY_W<'a, O> { - #[doc = "Disable"] - #[inline(always)] - pub fn clear(self) -> &'a mut W { - self.variant(DBLRDY_AW::CLEAR) - } -} -#[doc = "Field `STOPPED` reader - Write '1' to disable interrupt for event STOPPED"] -pub type STOPPED_R = crate::BitReader; -#[doc = "Write '1' to disable interrupt for event STOPPED\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum STOPPED_A { - #[doc = "0: Read: Disabled"] - DISABLED = 0, - #[doc = "1: Read: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: STOPPED_A) -> Self { - variant as u8 != 0 - } -} -impl STOPPED_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> STOPPED_A { - match self.bits { - false => STOPPED_A::DISABLED, - true => STOPPED_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == STOPPED_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == STOPPED_A::ENABLED - } -} -#[doc = "Write '1' to disable interrupt for event STOPPED\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum STOPPED_AW { - #[doc = "1: Disable"] - CLEAR = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: STOPPED_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `STOPPED` writer - Write '1' to disable interrupt for event STOPPED"] -pub type STOPPED_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENCLR_SPEC, STOPPED_AW, O>; -impl<'a, const O: u8> STOPPED_W<'a, O> { - #[doc = "Disable"] - #[inline(always)] - pub fn clear(self) -> &'a mut W { - self.variant(STOPPED_AW::CLEAR) - } -} -impl R { - #[doc = "Bit 0 - Write '1' to disable interrupt for event SAMPLERDY"] - #[inline(always)] - pub fn samplerdy(&self) -> SAMPLERDY_R { - SAMPLERDY_R::new((self.bits & 1) != 0) - } - #[doc = "Bit 1 - Write '1' to disable interrupt for event REPORTRDY"] - #[inline(always)] - pub fn reportrdy(&self) -> REPORTRDY_R { - REPORTRDY_R::new(((self.bits >> 1) & 1) != 0) - } - #[doc = "Bit 2 - Write '1' to disable interrupt for event ACCOF"] - #[inline(always)] - pub fn accof(&self) -> ACCOF_R { - ACCOF_R::new(((self.bits >> 2) & 1) != 0) - } - #[doc = "Bit 3 - Write '1' to disable interrupt for event DBLRDY"] - #[inline(always)] - pub fn dblrdy(&self) -> DBLRDY_R { - DBLRDY_R::new(((self.bits >> 3) & 1) != 0) - } - #[doc = "Bit 4 - Write '1' to disable interrupt for event STOPPED"] - #[inline(always)] - pub fn stopped(&self) -> STOPPED_R { - STOPPED_R::new(((self.bits >> 4) & 1) != 0) - } -} -impl W { - #[doc = "Bit 0 - Write '1' to disable interrupt for event SAMPLERDY"] - #[inline(always)] - #[must_use] - pub fn samplerdy(&mut self) -> SAMPLERDY_W<0> { - SAMPLERDY_W::new(self) - } - #[doc = "Bit 1 - Write '1' to disable interrupt for event REPORTRDY"] - #[inline(always)] - #[must_use] - pub fn reportrdy(&mut self) -> REPORTRDY_W<1> { - REPORTRDY_W::new(self) - } - #[doc = "Bit 2 - Write '1' to disable interrupt for event ACCOF"] - #[inline(always)] - #[must_use] - pub fn accof(&mut self) -> ACCOF_W<2> { - ACCOF_W::new(self) - } - #[doc = "Bit 3 - Write '1' to disable interrupt for event DBLRDY"] - #[inline(always)] - #[must_use] - pub fn dblrdy(&mut self) -> DBLRDY_W<3> { - DBLRDY_W::new(self) - } - #[doc = "Bit 4 - Write '1' to disable interrupt for event STOPPED"] - #[inline(always)] - #[must_use] - pub fn stopped(&mut self) -> STOPPED_W<4> { - STOPPED_W::new(self) - } - #[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 = "Disable interrupt\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 [intenclr](index.html) module"] -pub struct INTENCLR_SPEC; -impl crate::RegisterSpec for INTENCLR_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [intenclr::R](R) reader structure"] -impl crate::Readable for INTENCLR_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [intenclr::W](W) writer structure"] -impl crate::Writable for INTENCLR_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets INTENCLR to value 0"] -impl crate::Resettable for INTENCLR_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/qdec/intenset.rs b/down-the-stack/dk_pac/src/qdec/intenset.rs deleted file mode 100644 index 2231d6c..0000000 --- a/down-the-stack/dk_pac/src/qdec/intenset.rs +++ /dev/null @@ -1,405 +0,0 @@ -#[doc = "Register `INTENSET` 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 `INTENSET` 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 `SAMPLERDY` reader - Write '1' to enable interrupt for event SAMPLERDY"] -pub type SAMPLERDY_R = crate::BitReader; -#[doc = "Write '1' to enable interrupt for event SAMPLERDY\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum SAMPLERDY_A { - #[doc = "0: Read: Disabled"] - DISABLED = 0, - #[doc = "1: Read: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: SAMPLERDY_A) -> Self { - variant as u8 != 0 - } -} -impl SAMPLERDY_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> SAMPLERDY_A { - match self.bits { - false => SAMPLERDY_A::DISABLED, - true => SAMPLERDY_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == SAMPLERDY_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == SAMPLERDY_A::ENABLED - } -} -#[doc = "Write '1' to enable interrupt for event SAMPLERDY\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum SAMPLERDY_AW { - #[doc = "1: Enable"] - SET = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: SAMPLERDY_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `SAMPLERDY` writer - Write '1' to enable interrupt for event SAMPLERDY"] -pub type SAMPLERDY_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENSET_SPEC, SAMPLERDY_AW, O>; -impl<'a, const O: u8> SAMPLERDY_W<'a, O> { - #[doc = "Enable"] - #[inline(always)] - pub fn set(self) -> &'a mut W { - self.variant(SAMPLERDY_AW::SET) - } -} -#[doc = "Field `REPORTRDY` reader - Write '1' to enable interrupt for event REPORTRDY"] -pub type REPORTRDY_R = crate::BitReader; -#[doc = "Write '1' to enable interrupt for event REPORTRDY\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum REPORTRDY_A { - #[doc = "0: Read: Disabled"] - DISABLED = 0, - #[doc = "1: Read: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: REPORTRDY_A) -> Self { - variant as u8 != 0 - } -} -impl REPORTRDY_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> REPORTRDY_A { - match self.bits { - false => REPORTRDY_A::DISABLED, - true => REPORTRDY_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == REPORTRDY_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == REPORTRDY_A::ENABLED - } -} -#[doc = "Write '1' to enable interrupt for event REPORTRDY\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum REPORTRDY_AW { - #[doc = "1: Enable"] - SET = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: REPORTRDY_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `REPORTRDY` writer - Write '1' to enable interrupt for event REPORTRDY"] -pub type REPORTRDY_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENSET_SPEC, REPORTRDY_AW, O>; -impl<'a, const O: u8> REPORTRDY_W<'a, O> { - #[doc = "Enable"] - #[inline(always)] - pub fn set(self) -> &'a mut W { - self.variant(REPORTRDY_AW::SET) - } -} -#[doc = "Field `ACCOF` reader - Write '1' to enable interrupt for event ACCOF"] -pub type ACCOF_R = crate::BitReader; -#[doc = "Write '1' to enable interrupt for event ACCOF\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum ACCOF_A { - #[doc = "0: Read: Disabled"] - DISABLED = 0, - #[doc = "1: Read: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: ACCOF_A) -> Self { - variant as u8 != 0 - } -} -impl ACCOF_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> ACCOF_A { - match self.bits { - false => ACCOF_A::DISABLED, - true => ACCOF_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == ACCOF_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == ACCOF_A::ENABLED - } -} -#[doc = "Write '1' to enable interrupt for event ACCOF\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum ACCOF_AW { - #[doc = "1: Enable"] - SET = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: ACCOF_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `ACCOF` writer - Write '1' to enable interrupt for event ACCOF"] -pub type ACCOF_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENSET_SPEC, ACCOF_AW, O>; -impl<'a, const O: u8> ACCOF_W<'a, O> { - #[doc = "Enable"] - #[inline(always)] - pub fn set(self) -> &'a mut W { - self.variant(ACCOF_AW::SET) - } -} -#[doc = "Field `DBLRDY` reader - Write '1' to enable interrupt for event DBLRDY"] -pub type DBLRDY_R = crate::BitReader; -#[doc = "Write '1' to enable interrupt for event DBLRDY\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum DBLRDY_A { - #[doc = "0: Read: Disabled"] - DISABLED = 0, - #[doc = "1: Read: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: DBLRDY_A) -> Self { - variant as u8 != 0 - } -} -impl DBLRDY_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> DBLRDY_A { - match self.bits { - false => DBLRDY_A::DISABLED, - true => DBLRDY_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == DBLRDY_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == DBLRDY_A::ENABLED - } -} -#[doc = "Write '1' to enable interrupt for event DBLRDY\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum DBLRDY_AW { - #[doc = "1: Enable"] - SET = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: DBLRDY_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `DBLRDY` writer - Write '1' to enable interrupt for event DBLRDY"] -pub type DBLRDY_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENSET_SPEC, DBLRDY_AW, O>; -impl<'a, const O: u8> DBLRDY_W<'a, O> { - #[doc = "Enable"] - #[inline(always)] - pub fn set(self) -> &'a mut W { - self.variant(DBLRDY_AW::SET) - } -} -#[doc = "Field `STOPPED` reader - Write '1' to enable interrupt for event STOPPED"] -pub type STOPPED_R = crate::BitReader; -#[doc = "Write '1' to enable interrupt for event STOPPED\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum STOPPED_A { - #[doc = "0: Read: Disabled"] - DISABLED = 0, - #[doc = "1: Read: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: STOPPED_A) -> Self { - variant as u8 != 0 - } -} -impl STOPPED_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> STOPPED_A { - match self.bits { - false => STOPPED_A::DISABLED, - true => STOPPED_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == STOPPED_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == STOPPED_A::ENABLED - } -} -#[doc = "Write '1' to enable interrupt for event STOPPED\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum STOPPED_AW { - #[doc = "1: Enable"] - SET = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: STOPPED_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `STOPPED` writer - Write '1' to enable interrupt for event STOPPED"] -pub type STOPPED_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENSET_SPEC, STOPPED_AW, O>; -impl<'a, const O: u8> STOPPED_W<'a, O> { - #[doc = "Enable"] - #[inline(always)] - pub fn set(self) -> &'a mut W { - self.variant(STOPPED_AW::SET) - } -} -impl R { - #[doc = "Bit 0 - Write '1' to enable interrupt for event SAMPLERDY"] - #[inline(always)] - pub fn samplerdy(&self) -> SAMPLERDY_R { - SAMPLERDY_R::new((self.bits & 1) != 0) - } - #[doc = "Bit 1 - Write '1' to enable interrupt for event REPORTRDY"] - #[inline(always)] - pub fn reportrdy(&self) -> REPORTRDY_R { - REPORTRDY_R::new(((self.bits >> 1) & 1) != 0) - } - #[doc = "Bit 2 - Write '1' to enable interrupt for event ACCOF"] - #[inline(always)] - pub fn accof(&self) -> ACCOF_R { - ACCOF_R::new(((self.bits >> 2) & 1) != 0) - } - #[doc = "Bit 3 - Write '1' to enable interrupt for event DBLRDY"] - #[inline(always)] - pub fn dblrdy(&self) -> DBLRDY_R { - DBLRDY_R::new(((self.bits >> 3) & 1) != 0) - } - #[doc = "Bit 4 - Write '1' to enable interrupt for event STOPPED"] - #[inline(always)] - pub fn stopped(&self) -> STOPPED_R { - STOPPED_R::new(((self.bits >> 4) & 1) != 0) - } -} -impl W { - #[doc = "Bit 0 - Write '1' to enable interrupt for event SAMPLERDY"] - #[inline(always)] - #[must_use] - pub fn samplerdy(&mut self) -> SAMPLERDY_W<0> { - SAMPLERDY_W::new(self) - } - #[doc = "Bit 1 - Write '1' to enable interrupt for event REPORTRDY"] - #[inline(always)] - #[must_use] - pub fn reportrdy(&mut self) -> REPORTRDY_W<1> { - REPORTRDY_W::new(self) - } - #[doc = "Bit 2 - Write '1' to enable interrupt for event ACCOF"] - #[inline(always)] - #[must_use] - pub fn accof(&mut self) -> ACCOF_W<2> { - ACCOF_W::new(self) - } - #[doc = "Bit 3 - Write '1' to enable interrupt for event DBLRDY"] - #[inline(always)] - #[must_use] - pub fn dblrdy(&mut self) -> DBLRDY_W<3> { - DBLRDY_W::new(self) - } - #[doc = "Bit 4 - Write '1' to enable interrupt for event STOPPED"] - #[inline(always)] - #[must_use] - pub fn stopped(&mut self) -> STOPPED_W<4> { - STOPPED_W::new(self) - } - #[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 = "Enable interrupt\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 [intenset](index.html) module"] -pub struct INTENSET_SPEC; -impl crate::RegisterSpec for INTENSET_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [intenset::R](R) reader structure"] -impl crate::Readable for INTENSET_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [intenset::W](W) writer structure"] -impl crate::Writable for INTENSET_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets INTENSET to value 0"] -impl crate::Resettable for INTENSET_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/qdec/ledpol.rs b/down-the-stack/dk_pac/src/qdec/ledpol.rs deleted file mode 100644 index 6f0b8c8..0000000 --- a/down-the-stack/dk_pac/src/qdec/ledpol.rs +++ /dev/null @@ -1,126 +0,0 @@ -#[doc = "Register `LEDPOL` 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 `LEDPOL` 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 `LEDPOL` reader - LED output pin polarity"] -pub type LEDPOL_R = crate::BitReader; -#[doc = "LED output pin polarity\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum LEDPOL_A { - #[doc = "0: Led active on output pin low"] - ACTIVE_LOW = 0, - #[doc = "1: Led active on output pin high"] - ACTIVE_HIGH = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: LEDPOL_A) -> Self { - variant as u8 != 0 - } -} -impl LEDPOL_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> LEDPOL_A { - match self.bits { - false => LEDPOL_A::ACTIVE_LOW, - true => LEDPOL_A::ACTIVE_HIGH, - } - } - #[doc = "Checks if the value of the field is `ACTIVE_LOW`"] - #[inline(always)] - pub fn is_active_low(&self) -> bool { - *self == LEDPOL_A::ACTIVE_LOW - } - #[doc = "Checks if the value of the field is `ACTIVE_HIGH`"] - #[inline(always)] - pub fn is_active_high(&self) -> bool { - *self == LEDPOL_A::ACTIVE_HIGH - } -} -#[doc = "Field `LEDPOL` writer - LED output pin polarity"] -pub type LEDPOL_W<'a, const O: u8> = crate::BitWriter<'a, u32, LEDPOL_SPEC, LEDPOL_A, O>; -impl<'a, const O: u8> LEDPOL_W<'a, O> { - #[doc = "Led active on output pin low"] - #[inline(always)] - pub fn active_low(self) -> &'a mut W { - self.variant(LEDPOL_A::ACTIVE_LOW) - } - #[doc = "Led active on output pin high"] - #[inline(always)] - pub fn active_high(self) -> &'a mut W { - self.variant(LEDPOL_A::ACTIVE_HIGH) - } -} -impl R { - #[doc = "Bit 0 - LED output pin polarity"] - #[inline(always)] - pub fn ledpol(&self) -> LEDPOL_R { - LEDPOL_R::new((self.bits & 1) != 0) - } -} -impl W { - #[doc = "Bit 0 - LED output pin polarity"] - #[inline(always)] - #[must_use] - pub fn ledpol(&mut self) -> LEDPOL_W<0> { - LEDPOL_W::new(self) - } - #[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 = "LED output pin polarity\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 [ledpol](index.html) module"] -pub struct LEDPOL_SPEC; -impl crate::RegisterSpec for LEDPOL_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [ledpol::R](R) reader structure"] -impl crate::Readable for LEDPOL_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [ledpol::W](W) writer structure"] -impl crate::Writable for LEDPOL_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets LEDPOL to value 0"] -impl crate::Resettable for LEDPOL_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/qdec/ledpre.rs b/down-the-stack/dk_pac/src/qdec/ledpre.rs deleted file mode 100644 index f4a8e8c..0000000 --- a/down-the-stack/dk_pac/src/qdec/ledpre.rs +++ /dev/null @@ -1,80 +0,0 @@ -#[doc = "Register `LEDPRE` 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 `LEDPRE` 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 `LEDPRE` reader - Period in us the LED is switched on prior to sampling"] -pub type LEDPRE_R = crate::FieldReader; -#[doc = "Field `LEDPRE` writer - Period in us the LED is switched on prior to sampling"] -pub type LEDPRE_W<'a, const O: u8> = crate::FieldWriter<'a, u32, LEDPRE_SPEC, u16, u16, 9, O>; -impl R { - #[doc = "Bits 0:8 - Period in us the LED is switched on prior to sampling"] - #[inline(always)] - pub fn ledpre(&self) -> LEDPRE_R { - LEDPRE_R::new((self.bits & 0x01ff) as u16) - } -} -impl W { - #[doc = "Bits 0:8 - Period in us the LED is switched on prior to sampling"] - #[inline(always)] - #[must_use] - pub fn ledpre(&mut self) -> LEDPRE_W<0> { - LEDPRE_W::new(self) - } - #[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 = "Time period the LED is switched ON prior to sampling\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 [ledpre](index.html) module"] -pub struct LEDPRE_SPEC; -impl crate::RegisterSpec for LEDPRE_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [ledpre::R](R) reader structure"] -impl crate::Readable for LEDPRE_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [ledpre::W](W) writer structure"] -impl crate::Writable for LEDPRE_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets LEDPRE to value 0x10"] -impl crate::Resettable for LEDPRE_SPEC { - const RESET_VALUE: Self::Ux = 0x10; -} diff --git a/down-the-stack/dk_pac/src/qdec/psel.rs b/down-the-stack/dk_pac/src/qdec/psel.rs deleted file mode 100644 index c4f60bd..0000000 --- a/down-the-stack/dk_pac/src/qdec/psel.rs +++ /dev/null @@ -1,22 +0,0 @@ -#[doc = r"Register block"] -#[repr(C)] -pub struct PSEL { - #[doc = "0x00 - Pin select for LED signal"] - pub led: LED, - #[doc = "0x04 - Pin select for A signal"] - pub a: A, - #[doc = "0x08 - Pin select for B signal"] - pub b: B, -} -#[doc = "LED (rw) register accessor: an alias for `Reg`"] -pub type LED = crate::Reg; -#[doc = "Pin select for LED signal"] -pub mod led; -#[doc = "A (rw) register accessor: an alias for `Reg`"] -pub type A = crate::Reg; -#[doc = "Pin select for A signal"] -pub mod a; -#[doc = "B (rw) register accessor: an alias for `Reg`"] -pub type B = crate::Reg; -#[doc = "Pin select for B signal"] -pub mod b; diff --git a/down-the-stack/dk_pac/src/qdec/psel/a.rs b/down-the-stack/dk_pac/src/qdec/psel/a.rs deleted file mode 100644 index dd71ddb..0000000 --- a/down-the-stack/dk_pac/src/qdec/psel/a.rs +++ /dev/null @@ -1,141 +0,0 @@ -#[doc = "Register `A` 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 `A` 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 `PIN` reader - Pin number"] -pub type PIN_R = crate::FieldReader; -#[doc = "Field `PIN` writer - Pin number"] -pub type PIN_W<'a, const O: u8> = crate::FieldWriter<'a, u32, A_SPEC, u8, u8, 5, O>; -#[doc = "Field `CONNECT` reader - Connection"] -pub type CONNECT_R = crate::BitReader; -#[doc = "Connection\n\nValue on reset: 1"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum CONNECT_A { - #[doc = "1: Disconnect"] - DISCONNECTED = 1, - #[doc = "0: Connect"] - CONNECTED = 0, -} -impl From for bool { - #[inline(always)] - fn from(variant: CONNECT_A) -> Self { - variant as u8 != 0 - } -} -impl CONNECT_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> CONNECT_A { - match self.bits { - true => CONNECT_A::DISCONNECTED, - false => CONNECT_A::CONNECTED, - } - } - #[doc = "Checks if the value of the field is `DISCONNECTED`"] - #[inline(always)] - pub fn is_disconnected(&self) -> bool { - *self == CONNECT_A::DISCONNECTED - } - #[doc = "Checks if the value of the field is `CONNECTED`"] - #[inline(always)] - pub fn is_connected(&self) -> bool { - *self == CONNECT_A::CONNECTED - } -} -#[doc = "Field `CONNECT` writer - Connection"] -pub type CONNECT_W<'a, const O: u8> = crate::BitWriter<'a, u32, A_SPEC, CONNECT_A, O>; -impl<'a, const O: u8> CONNECT_W<'a, O> { - #[doc = "Disconnect"] - #[inline(always)] - pub fn disconnected(self) -> &'a mut W { - self.variant(CONNECT_A::DISCONNECTED) - } - #[doc = "Connect"] - #[inline(always)] - pub fn connected(self) -> &'a mut W { - self.variant(CONNECT_A::CONNECTED) - } -} -impl R { - #[doc = "Bits 0:4 - Pin number"] - #[inline(always)] - pub fn pin(&self) -> PIN_R { - PIN_R::new((self.bits & 0x1f) as u8) - } - #[doc = "Bit 31 - Connection"] - #[inline(always)] - pub fn connect(&self) -> CONNECT_R { - CONNECT_R::new(((self.bits >> 31) & 1) != 0) - } -} -impl W { - #[doc = "Bits 0:4 - Pin number"] - #[inline(always)] - #[must_use] - pub fn pin(&mut self) -> PIN_W<0> { - PIN_W::new(self) - } - #[doc = "Bit 31 - Connection"] - #[inline(always)] - #[must_use] - pub fn connect(&mut self) -> CONNECT_W<31> { - CONNECT_W::new(self) - } - #[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 = "Pin select for A signal\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 [a](index.html) module"] -pub struct A_SPEC; -impl crate::RegisterSpec for A_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [a::R](R) reader structure"] -impl crate::Readable for A_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [a::W](W) writer structure"] -impl crate::Writable for A_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets A to value 0xffff_ffff"] -impl crate::Resettable for A_SPEC { - const RESET_VALUE: Self::Ux = 0xffff_ffff; -} diff --git a/down-the-stack/dk_pac/src/qdec/psel/b.rs b/down-the-stack/dk_pac/src/qdec/psel/b.rs deleted file mode 100644 index c038aa4..0000000 --- a/down-the-stack/dk_pac/src/qdec/psel/b.rs +++ /dev/null @@ -1,141 +0,0 @@ -#[doc = "Register `B` 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 `B` 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 `PIN` reader - Pin number"] -pub type PIN_R = crate::FieldReader; -#[doc = "Field `PIN` writer - Pin number"] -pub type PIN_W<'a, const O: u8> = crate::FieldWriter<'a, u32, B_SPEC, u8, u8, 5, O>; -#[doc = "Field `CONNECT` reader - Connection"] -pub type CONNECT_R = crate::BitReader; -#[doc = "Connection\n\nValue on reset: 1"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum CONNECT_A { - #[doc = "1: Disconnect"] - DISCONNECTED = 1, - #[doc = "0: Connect"] - CONNECTED = 0, -} -impl From for bool { - #[inline(always)] - fn from(variant: CONNECT_A) -> Self { - variant as u8 != 0 - } -} -impl CONNECT_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> CONNECT_A { - match self.bits { - true => CONNECT_A::DISCONNECTED, - false => CONNECT_A::CONNECTED, - } - } - #[doc = "Checks if the value of the field is `DISCONNECTED`"] - #[inline(always)] - pub fn is_disconnected(&self) -> bool { - *self == CONNECT_A::DISCONNECTED - } - #[doc = "Checks if the value of the field is `CONNECTED`"] - #[inline(always)] - pub fn is_connected(&self) -> bool { - *self == CONNECT_A::CONNECTED - } -} -#[doc = "Field `CONNECT` writer - Connection"] -pub type CONNECT_W<'a, const O: u8> = crate::BitWriter<'a, u32, B_SPEC, CONNECT_A, O>; -impl<'a, const O: u8> CONNECT_W<'a, O> { - #[doc = "Disconnect"] - #[inline(always)] - pub fn disconnected(self) -> &'a mut W { - self.variant(CONNECT_A::DISCONNECTED) - } - #[doc = "Connect"] - #[inline(always)] - pub fn connected(self) -> &'a mut W { - self.variant(CONNECT_A::CONNECTED) - } -} -impl R { - #[doc = "Bits 0:4 - Pin number"] - #[inline(always)] - pub fn pin(&self) -> PIN_R { - PIN_R::new((self.bits & 0x1f) as u8) - } - #[doc = "Bit 31 - Connection"] - #[inline(always)] - pub fn connect(&self) -> CONNECT_R { - CONNECT_R::new(((self.bits >> 31) & 1) != 0) - } -} -impl W { - #[doc = "Bits 0:4 - Pin number"] - #[inline(always)] - #[must_use] - pub fn pin(&mut self) -> PIN_W<0> { - PIN_W::new(self) - } - #[doc = "Bit 31 - Connection"] - #[inline(always)] - #[must_use] - pub fn connect(&mut self) -> CONNECT_W<31> { - CONNECT_W::new(self) - } - #[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 = "Pin select for B signal\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 [b](index.html) module"] -pub struct B_SPEC; -impl crate::RegisterSpec for B_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [b::R](R) reader structure"] -impl crate::Readable for B_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [b::W](W) writer structure"] -impl crate::Writable for B_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets B to value 0xffff_ffff"] -impl crate::Resettable for B_SPEC { - const RESET_VALUE: Self::Ux = 0xffff_ffff; -} diff --git a/down-the-stack/dk_pac/src/qdec/psel/led.rs b/down-the-stack/dk_pac/src/qdec/psel/led.rs deleted file mode 100644 index 7d0038f..0000000 --- a/down-the-stack/dk_pac/src/qdec/psel/led.rs +++ /dev/null @@ -1,141 +0,0 @@ -#[doc = "Register `LED` 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 `LED` 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 `PIN` reader - Pin number"] -pub type PIN_R = crate::FieldReader; -#[doc = "Field `PIN` writer - Pin number"] -pub type PIN_W<'a, const O: u8> = crate::FieldWriter<'a, u32, LED_SPEC, u8, u8, 5, O>; -#[doc = "Field `CONNECT` reader - Connection"] -pub type CONNECT_R = crate::BitReader; -#[doc = "Connection\n\nValue on reset: 1"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum CONNECT_A { - #[doc = "1: Disconnect"] - DISCONNECTED = 1, - #[doc = "0: Connect"] - CONNECTED = 0, -} -impl From for bool { - #[inline(always)] - fn from(variant: CONNECT_A) -> Self { - variant as u8 != 0 - } -} -impl CONNECT_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> CONNECT_A { - match self.bits { - true => CONNECT_A::DISCONNECTED, - false => CONNECT_A::CONNECTED, - } - } - #[doc = "Checks if the value of the field is `DISCONNECTED`"] - #[inline(always)] - pub fn is_disconnected(&self) -> bool { - *self == CONNECT_A::DISCONNECTED - } - #[doc = "Checks if the value of the field is `CONNECTED`"] - #[inline(always)] - pub fn is_connected(&self) -> bool { - *self == CONNECT_A::CONNECTED - } -} -#[doc = "Field `CONNECT` writer - Connection"] -pub type CONNECT_W<'a, const O: u8> = crate::BitWriter<'a, u32, LED_SPEC, CONNECT_A, O>; -impl<'a, const O: u8> CONNECT_W<'a, O> { - #[doc = "Disconnect"] - #[inline(always)] - pub fn disconnected(self) -> &'a mut W { - self.variant(CONNECT_A::DISCONNECTED) - } - #[doc = "Connect"] - #[inline(always)] - pub fn connected(self) -> &'a mut W { - self.variant(CONNECT_A::CONNECTED) - } -} -impl R { - #[doc = "Bits 0:4 - Pin number"] - #[inline(always)] - pub fn pin(&self) -> PIN_R { - PIN_R::new((self.bits & 0x1f) as u8) - } - #[doc = "Bit 31 - Connection"] - #[inline(always)] - pub fn connect(&self) -> CONNECT_R { - CONNECT_R::new(((self.bits >> 31) & 1) != 0) - } -} -impl W { - #[doc = "Bits 0:4 - Pin number"] - #[inline(always)] - #[must_use] - pub fn pin(&mut self) -> PIN_W<0> { - PIN_W::new(self) - } - #[doc = "Bit 31 - Connection"] - #[inline(always)] - #[must_use] - pub fn connect(&mut self) -> CONNECT_W<31> { - CONNECT_W::new(self) - } - #[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 = "Pin select for LED signal\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 [led](index.html) module"] -pub struct LED_SPEC; -impl crate::RegisterSpec for LED_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [led::R](R) reader structure"] -impl crate::Readable for LED_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [led::W](W) writer structure"] -impl crate::Writable for LED_SPEC { - type 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 to value 0xffff_ffff"] -impl crate::Resettable for LED_SPEC { - const RESET_VALUE: Self::Ux = 0xffff_ffff; -} diff --git a/down-the-stack/dk_pac/src/qdec/reportper.rs b/down-the-stack/dk_pac/src/qdec/reportper.rs deleted file mode 100644 index b88fe65..0000000 --- a/down-the-stack/dk_pac/src/qdec/reportper.rs +++ /dev/null @@ -1,220 +0,0 @@ -#[doc = "Register `REPORTPER` 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 `REPORTPER` 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 `REPORTPER` reader - Specifies the number of samples to be accumulated in the ACC register before the REPORTRDY and DBLRDY events can be generated"] -pub type REPORTPER_R = crate::FieldReader; -#[doc = "Specifies the number of samples to be accumulated in the ACC register before the REPORTRDY and DBLRDY events can be generated\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -#[repr(u8)] -pub enum REPORTPER_A { - #[doc = "0: 10 samples / report"] - _10SMPL = 0, - #[doc = "1: 40 samples / report"] - _40SMPL = 1, - #[doc = "2: 80 samples / report"] - _80SMPL = 2, - #[doc = "3: 120 samples / report"] - _120SMPL = 3, - #[doc = "4: 160 samples / report"] - _160SMPL = 4, - #[doc = "5: 200 samples / report"] - _200SMPL = 5, - #[doc = "6: 240 samples / report"] - _240SMPL = 6, - #[doc = "7: 280 samples / report"] - _280SMPL = 7, - #[doc = "8: 1 sample / report"] - _1SMPL = 8, -} -impl From for u8 { - #[inline(always)] - fn from(variant: REPORTPER_A) -> Self { - variant as _ - } -} -impl REPORTPER_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> Option { - match self.bits { - 0 => Some(REPORTPER_A::_10SMPL), - 1 => Some(REPORTPER_A::_40SMPL), - 2 => Some(REPORTPER_A::_80SMPL), - 3 => Some(REPORTPER_A::_120SMPL), - 4 => Some(REPORTPER_A::_160SMPL), - 5 => Some(REPORTPER_A::_200SMPL), - 6 => Some(REPORTPER_A::_240SMPL), - 7 => Some(REPORTPER_A::_280SMPL), - 8 => Some(REPORTPER_A::_1SMPL), - _ => None, - } - } - #[doc = "Checks if the value of the field is `_10SMPL`"] - #[inline(always)] - pub fn is_10smpl(&self) -> bool { - *self == REPORTPER_A::_10SMPL - } - #[doc = "Checks if the value of the field is `_40SMPL`"] - #[inline(always)] - pub fn is_40smpl(&self) -> bool { - *self == REPORTPER_A::_40SMPL - } - #[doc = "Checks if the value of the field is `_80SMPL`"] - #[inline(always)] - pub fn is_80smpl(&self) -> bool { - *self == REPORTPER_A::_80SMPL - } - #[doc = "Checks if the value of the field is `_120SMPL`"] - #[inline(always)] - pub fn is_120smpl(&self) -> bool { - *self == REPORTPER_A::_120SMPL - } - #[doc = "Checks if the value of the field is `_160SMPL`"] - #[inline(always)] - pub fn is_160smpl(&self) -> bool { - *self == REPORTPER_A::_160SMPL - } - #[doc = "Checks if the value of the field is `_200SMPL`"] - #[inline(always)] - pub fn is_200smpl(&self) -> bool { - *self == REPORTPER_A::_200SMPL - } - #[doc = "Checks if the value of the field is `_240SMPL`"] - #[inline(always)] - pub fn is_240smpl(&self) -> bool { - *self == REPORTPER_A::_240SMPL - } - #[doc = "Checks if the value of the field is `_280SMPL`"] - #[inline(always)] - pub fn is_280smpl(&self) -> bool { - *self == REPORTPER_A::_280SMPL - } - #[doc = "Checks if the value of the field is `_1SMPL`"] - #[inline(always)] - pub fn is_1smpl(&self) -> bool { - *self == REPORTPER_A::_1SMPL - } -} -#[doc = "Field `REPORTPER` writer - Specifies the number of samples to be accumulated in the ACC register before the REPORTRDY and DBLRDY events can be generated"] -pub type REPORTPER_W<'a, const O: u8> = - crate::FieldWriter<'a, u32, REPORTPER_SPEC, u8, REPORTPER_A, 4, O>; -impl<'a, const O: u8> REPORTPER_W<'a, O> { - #[doc = "10 samples / report"] - #[inline(always)] - pub fn _10smpl(self) -> &'a mut W { - self.variant(REPORTPER_A::_10SMPL) - } - #[doc = "40 samples / report"] - #[inline(always)] - pub fn _40smpl(self) -> &'a mut W { - self.variant(REPORTPER_A::_40SMPL) - } - #[doc = "80 samples / report"] - #[inline(always)] - pub fn _80smpl(self) -> &'a mut W { - self.variant(REPORTPER_A::_80SMPL) - } - #[doc = "120 samples / report"] - #[inline(always)] - pub fn _120smpl(self) -> &'a mut W { - self.variant(REPORTPER_A::_120SMPL) - } - #[doc = "160 samples / report"] - #[inline(always)] - pub fn _160smpl(self) -> &'a mut W { - self.variant(REPORTPER_A::_160SMPL) - } - #[doc = "200 samples / report"] - #[inline(always)] - pub fn _200smpl(self) -> &'a mut W { - self.variant(REPORTPER_A::_200SMPL) - } - #[doc = "240 samples / report"] - #[inline(always)] - pub fn _240smpl(self) -> &'a mut W { - self.variant(REPORTPER_A::_240SMPL) - } - #[doc = "280 samples / report"] - #[inline(always)] - pub fn _280smpl(self) -> &'a mut W { - self.variant(REPORTPER_A::_280SMPL) - } - #[doc = "1 sample / report"] - #[inline(always)] - pub fn _1smpl(self) -> &'a mut W { - self.variant(REPORTPER_A::_1SMPL) - } -} -impl R { - #[doc = "Bits 0:3 - Specifies the number of samples to be accumulated in the ACC register before the REPORTRDY and DBLRDY events can be generated"] - #[inline(always)] - pub fn reportper(&self) -> REPORTPER_R { - REPORTPER_R::new((self.bits & 0x0f) as u8) - } -} -impl W { - #[doc = "Bits 0:3 - Specifies the number of samples to be accumulated in the ACC register before the REPORTRDY and DBLRDY events can be generated"] - #[inline(always)] - #[must_use] - pub fn reportper(&mut self) -> REPORTPER_W<0> { - REPORTPER_W::new(self) - } - #[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 = "Number of samples to be taken before REPORTRDY and DBLRDY events can be generated\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 [reportper](index.html) module"] -pub struct REPORTPER_SPEC; -impl crate::RegisterSpec for REPORTPER_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [reportper::R](R) reader structure"] -impl crate::Readable for REPORTPER_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [reportper::W](W) writer structure"] -impl crate::Writable for REPORTPER_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets REPORTPER to value 0"] -impl crate::Resettable for REPORTPER_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/qdec/sample.rs b/down-the-stack/dk_pac/src/qdec/sample.rs deleted file mode 100644 index 631284b..0000000 --- a/down-the-stack/dk_pac/src/qdec/sample.rs +++ /dev/null @@ -1,37 +0,0 @@ -#[doc = "Register `SAMPLE` 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 = "Field `SAMPLE` reader - Last motion sample"] -pub type SAMPLE_R = crate::FieldReader; -impl R { - #[doc = "Bits 0:31 - Last motion sample"] - #[inline(always)] - pub fn sample(&self) -> SAMPLE_R { - SAMPLE_R::new(self.bits) - } -} -#[doc = "Motion sample value\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 [sample](index.html) module"] -pub struct SAMPLE_SPEC; -impl crate::RegisterSpec for SAMPLE_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [sample::R](R) reader structure"] -impl crate::Readable for SAMPLE_SPEC { - type Reader = R; -} -#[doc = "`reset()` method sets SAMPLE to value 0"] -impl crate::Resettable for SAMPLE_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/qdec/sampleper.rs b/down-the-stack/dk_pac/src/qdec/sampleper.rs deleted file mode 100644 index ddabca6..0000000 --- a/down-the-stack/dk_pac/src/qdec/sampleper.rs +++ /dev/null @@ -1,246 +0,0 @@ -#[doc = "Register `SAMPLEPER` 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 `SAMPLEPER` 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 `SAMPLEPER` reader - Sample period. The SAMPLE register will be updated for every new sample"] -pub type SAMPLEPER_R = crate::FieldReader; -#[doc = "Sample period. The SAMPLE register will be updated for every new sample\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -#[repr(u8)] -pub enum SAMPLEPER_A { - #[doc = "0: 128 us"] - _128US = 0, - #[doc = "1: 256 us"] - _256US = 1, - #[doc = "2: 512 us"] - _512US = 2, - #[doc = "3: 1024 us"] - _1024US = 3, - #[doc = "4: 2048 us"] - _2048US = 4, - #[doc = "5: 4096 us"] - _4096US = 5, - #[doc = "6: 8192 us"] - _8192US = 6, - #[doc = "7: 16384 us"] - _16384US = 7, - #[doc = "8: 32768 us"] - _32MS = 8, - #[doc = "9: 65536 us"] - _65MS = 9, - #[doc = "10: 131072 us"] - _131MS = 10, -} -impl From for u8 { - #[inline(always)] - fn from(variant: SAMPLEPER_A) -> Self { - variant as _ - } -} -impl SAMPLEPER_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> Option { - match self.bits { - 0 => Some(SAMPLEPER_A::_128US), - 1 => Some(SAMPLEPER_A::_256US), - 2 => Some(SAMPLEPER_A::_512US), - 3 => Some(SAMPLEPER_A::_1024US), - 4 => Some(SAMPLEPER_A::_2048US), - 5 => Some(SAMPLEPER_A::_4096US), - 6 => Some(SAMPLEPER_A::_8192US), - 7 => Some(SAMPLEPER_A::_16384US), - 8 => Some(SAMPLEPER_A::_32MS), - 9 => Some(SAMPLEPER_A::_65MS), - 10 => Some(SAMPLEPER_A::_131MS), - _ => None, - } - } - #[doc = "Checks if the value of the field is `_128US`"] - #[inline(always)] - pub fn is_128us(&self) -> bool { - *self == SAMPLEPER_A::_128US - } - #[doc = "Checks if the value of the field is `_256US`"] - #[inline(always)] - pub fn is_256us(&self) -> bool { - *self == SAMPLEPER_A::_256US - } - #[doc = "Checks if the value of the field is `_512US`"] - #[inline(always)] - pub fn is_512us(&self) -> bool { - *self == SAMPLEPER_A::_512US - } - #[doc = "Checks if the value of the field is `_1024US`"] - #[inline(always)] - pub fn is_1024us(&self) -> bool { - *self == SAMPLEPER_A::_1024US - } - #[doc = "Checks if the value of the field is `_2048US`"] - #[inline(always)] - pub fn is_2048us(&self) -> bool { - *self == SAMPLEPER_A::_2048US - } - #[doc = "Checks if the value of the field is `_4096US`"] - #[inline(always)] - pub fn is_4096us(&self) -> bool { - *self == SAMPLEPER_A::_4096US - } - #[doc = "Checks if the value of the field is `_8192US`"] - #[inline(always)] - pub fn is_8192us(&self) -> bool { - *self == SAMPLEPER_A::_8192US - } - #[doc = "Checks if the value of the field is `_16384US`"] - #[inline(always)] - pub fn is_16384us(&self) -> bool { - *self == SAMPLEPER_A::_16384US - } - #[doc = "Checks if the value of the field is `_32MS`"] - #[inline(always)] - pub fn is_32ms(&self) -> bool { - *self == SAMPLEPER_A::_32MS - } - #[doc = "Checks if the value of the field is `_65MS`"] - #[inline(always)] - pub fn is_65ms(&self) -> bool { - *self == SAMPLEPER_A::_65MS - } - #[doc = "Checks if the value of the field is `_131MS`"] - #[inline(always)] - pub fn is_131ms(&self) -> bool { - *self == SAMPLEPER_A::_131MS - } -} -#[doc = "Field `SAMPLEPER` writer - Sample period. The SAMPLE register will be updated for every new sample"] -pub type SAMPLEPER_W<'a, const O: u8> = - crate::FieldWriter<'a, u32, SAMPLEPER_SPEC, u8, SAMPLEPER_A, 4, O>; -impl<'a, const O: u8> SAMPLEPER_W<'a, O> { - #[doc = "128 us"] - #[inline(always)] - pub fn _128us(self) -> &'a mut W { - self.variant(SAMPLEPER_A::_128US) - } - #[doc = "256 us"] - #[inline(always)] - pub fn _256us(self) -> &'a mut W { - self.variant(SAMPLEPER_A::_256US) - } - #[doc = "512 us"] - #[inline(always)] - pub fn _512us(self) -> &'a mut W { - self.variant(SAMPLEPER_A::_512US) - } - #[doc = "1024 us"] - #[inline(always)] - pub fn _1024us(self) -> &'a mut W { - self.variant(SAMPLEPER_A::_1024US) - } - #[doc = "2048 us"] - #[inline(always)] - pub fn _2048us(self) -> &'a mut W { - self.variant(SAMPLEPER_A::_2048US) - } - #[doc = "4096 us"] - #[inline(always)] - pub fn _4096us(self) -> &'a mut W { - self.variant(SAMPLEPER_A::_4096US) - } - #[doc = "8192 us"] - #[inline(always)] - pub fn _8192us(self) -> &'a mut W { - self.variant(SAMPLEPER_A::_8192US) - } - #[doc = "16384 us"] - #[inline(always)] - pub fn _16384us(self) -> &'a mut W { - self.variant(SAMPLEPER_A::_16384US) - } - #[doc = "32768 us"] - #[inline(always)] - pub fn _32ms(self) -> &'a mut W { - self.variant(SAMPLEPER_A::_32MS) - } - #[doc = "65536 us"] - #[inline(always)] - pub fn _65ms(self) -> &'a mut W { - self.variant(SAMPLEPER_A::_65MS) - } - #[doc = "131072 us"] - #[inline(always)] - pub fn _131ms(self) -> &'a mut W { - self.variant(SAMPLEPER_A::_131MS) - } -} -impl R { - #[doc = "Bits 0:3 - Sample period. The SAMPLE register will be updated for every new sample"] - #[inline(always)] - pub fn sampleper(&self) -> SAMPLEPER_R { - SAMPLEPER_R::new((self.bits & 0x0f) as u8) - } -} -impl W { - #[doc = "Bits 0:3 - Sample period. The SAMPLE register will be updated for every new sample"] - #[inline(always)] - #[must_use] - pub fn sampleper(&mut self) -> SAMPLEPER_W<0> { - SAMPLEPER_W::new(self) - } - #[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 = "Sample period\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 [sampleper](index.html) module"] -pub struct SAMPLEPER_SPEC; -impl crate::RegisterSpec for SAMPLEPER_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [sampleper::R](R) reader structure"] -impl crate::Readable for SAMPLEPER_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [sampleper::W](W) writer structure"] -impl crate::Writable for SAMPLEPER_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets SAMPLEPER to value 0"] -impl crate::Resettable for SAMPLEPER_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/qdec/shorts.rs b/down-the-stack/dk_pac/src/qdec/shorts.rs deleted file mode 100644 index a10bbdc..0000000 --- a/down-the-stack/dk_pac/src/qdec/shorts.rs +++ /dev/null @@ -1,498 +0,0 @@ -#[doc = "Register `SHORTS` 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 `SHORTS` 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 `REPORTRDY_READCLRACC` reader - Shortcut between event REPORTRDY and task READCLRACC"] -pub type REPORTRDY_READCLRACC_R = crate::BitReader; -#[doc = "Shortcut between event REPORTRDY and task READCLRACC\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum REPORTRDY_READCLRACC_A { - #[doc = "0: Disable shortcut"] - DISABLED = 0, - #[doc = "1: Enable shortcut"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: REPORTRDY_READCLRACC_A) -> Self { - variant as u8 != 0 - } -} -impl REPORTRDY_READCLRACC_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> REPORTRDY_READCLRACC_A { - match self.bits { - false => REPORTRDY_READCLRACC_A::DISABLED, - true => REPORTRDY_READCLRACC_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == REPORTRDY_READCLRACC_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == REPORTRDY_READCLRACC_A::ENABLED - } -} -#[doc = "Field `REPORTRDY_READCLRACC` writer - Shortcut between event REPORTRDY and task READCLRACC"] -pub type REPORTRDY_READCLRACC_W<'a, const O: u8> = - crate::BitWriter<'a, u32, SHORTS_SPEC, REPORTRDY_READCLRACC_A, O>; -impl<'a, const O: u8> REPORTRDY_READCLRACC_W<'a, O> { - #[doc = "Disable shortcut"] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(REPORTRDY_READCLRACC_A::DISABLED) - } - #[doc = "Enable shortcut"] - #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(REPORTRDY_READCLRACC_A::ENABLED) - } -} -#[doc = "Field `SAMPLERDY_STOP` reader - Shortcut between event SAMPLERDY and task STOP"] -pub type SAMPLERDY_STOP_R = crate::BitReader; -#[doc = "Shortcut between event SAMPLERDY and task STOP\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum SAMPLERDY_STOP_A { - #[doc = "0: Disable shortcut"] - DISABLED = 0, - #[doc = "1: Enable shortcut"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: SAMPLERDY_STOP_A) -> Self { - variant as u8 != 0 - } -} -impl SAMPLERDY_STOP_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> SAMPLERDY_STOP_A { - match self.bits { - false => SAMPLERDY_STOP_A::DISABLED, - true => SAMPLERDY_STOP_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == SAMPLERDY_STOP_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == SAMPLERDY_STOP_A::ENABLED - } -} -#[doc = "Field `SAMPLERDY_STOP` writer - Shortcut between event SAMPLERDY and task STOP"] -pub type SAMPLERDY_STOP_W<'a, const O: u8> = - crate::BitWriter<'a, u32, SHORTS_SPEC, SAMPLERDY_STOP_A, O>; -impl<'a, const O: u8> SAMPLERDY_STOP_W<'a, O> { - #[doc = "Disable shortcut"] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(SAMPLERDY_STOP_A::DISABLED) - } - #[doc = "Enable shortcut"] - #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(SAMPLERDY_STOP_A::ENABLED) - } -} -#[doc = "Field `REPORTRDY_RDCLRACC` reader - Shortcut between event REPORTRDY and task RDCLRACC"] -pub type REPORTRDY_RDCLRACC_R = crate::BitReader; -#[doc = "Shortcut between event REPORTRDY and task RDCLRACC\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum REPORTRDY_RDCLRACC_A { - #[doc = "0: Disable shortcut"] - DISABLED = 0, - #[doc = "1: Enable shortcut"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: REPORTRDY_RDCLRACC_A) -> Self { - variant as u8 != 0 - } -} -impl REPORTRDY_RDCLRACC_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> REPORTRDY_RDCLRACC_A { - match self.bits { - false => REPORTRDY_RDCLRACC_A::DISABLED, - true => REPORTRDY_RDCLRACC_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == REPORTRDY_RDCLRACC_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == REPORTRDY_RDCLRACC_A::ENABLED - } -} -#[doc = "Field `REPORTRDY_RDCLRACC` writer - Shortcut between event REPORTRDY and task RDCLRACC"] -pub type REPORTRDY_RDCLRACC_W<'a, const O: u8> = - crate::BitWriter<'a, u32, SHORTS_SPEC, REPORTRDY_RDCLRACC_A, O>; -impl<'a, const O: u8> REPORTRDY_RDCLRACC_W<'a, O> { - #[doc = "Disable shortcut"] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(REPORTRDY_RDCLRACC_A::DISABLED) - } - #[doc = "Enable shortcut"] - #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(REPORTRDY_RDCLRACC_A::ENABLED) - } -} -#[doc = "Field `REPORTRDY_STOP` reader - Shortcut between event REPORTRDY and task STOP"] -pub type REPORTRDY_STOP_R = crate::BitReader; -#[doc = "Shortcut between event REPORTRDY and task STOP\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum REPORTRDY_STOP_A { - #[doc = "0: Disable shortcut"] - DISABLED = 0, - #[doc = "1: Enable shortcut"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: REPORTRDY_STOP_A) -> Self { - variant as u8 != 0 - } -} -impl REPORTRDY_STOP_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> REPORTRDY_STOP_A { - match self.bits { - false => REPORTRDY_STOP_A::DISABLED, - true => REPORTRDY_STOP_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == REPORTRDY_STOP_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == REPORTRDY_STOP_A::ENABLED - } -} -#[doc = "Field `REPORTRDY_STOP` writer - Shortcut between event REPORTRDY and task STOP"] -pub type REPORTRDY_STOP_W<'a, const O: u8> = - crate::BitWriter<'a, u32, SHORTS_SPEC, REPORTRDY_STOP_A, O>; -impl<'a, const O: u8> REPORTRDY_STOP_W<'a, O> { - #[doc = "Disable shortcut"] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(REPORTRDY_STOP_A::DISABLED) - } - #[doc = "Enable shortcut"] - #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(REPORTRDY_STOP_A::ENABLED) - } -} -#[doc = "Field `DBLRDY_RDCLRDBL` reader - Shortcut between event DBLRDY and task RDCLRDBL"] -pub type DBLRDY_RDCLRDBL_R = crate::BitReader; -#[doc = "Shortcut between event DBLRDY and task RDCLRDBL\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum DBLRDY_RDCLRDBL_A { - #[doc = "0: Disable shortcut"] - DISABLED = 0, - #[doc = "1: Enable shortcut"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: DBLRDY_RDCLRDBL_A) -> Self { - variant as u8 != 0 - } -} -impl DBLRDY_RDCLRDBL_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> DBLRDY_RDCLRDBL_A { - match self.bits { - false => DBLRDY_RDCLRDBL_A::DISABLED, - true => DBLRDY_RDCLRDBL_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == DBLRDY_RDCLRDBL_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == DBLRDY_RDCLRDBL_A::ENABLED - } -} -#[doc = "Field `DBLRDY_RDCLRDBL` writer - Shortcut between event DBLRDY and task RDCLRDBL"] -pub type DBLRDY_RDCLRDBL_W<'a, const O: u8> = - crate::BitWriter<'a, u32, SHORTS_SPEC, DBLRDY_RDCLRDBL_A, O>; -impl<'a, const O: u8> DBLRDY_RDCLRDBL_W<'a, O> { - #[doc = "Disable shortcut"] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(DBLRDY_RDCLRDBL_A::DISABLED) - } - #[doc = "Enable shortcut"] - #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(DBLRDY_RDCLRDBL_A::ENABLED) - } -} -#[doc = "Field `DBLRDY_STOP` reader - Shortcut between event DBLRDY and task STOP"] -pub type DBLRDY_STOP_R = crate::BitReader; -#[doc = "Shortcut between event DBLRDY and task STOP\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum DBLRDY_STOP_A { - #[doc = "0: Disable shortcut"] - DISABLED = 0, - #[doc = "1: Enable shortcut"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: DBLRDY_STOP_A) -> Self { - variant as u8 != 0 - } -} -impl DBLRDY_STOP_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> DBLRDY_STOP_A { - match self.bits { - false => DBLRDY_STOP_A::DISABLED, - true => DBLRDY_STOP_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == DBLRDY_STOP_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == DBLRDY_STOP_A::ENABLED - } -} -#[doc = "Field `DBLRDY_STOP` writer - Shortcut between event DBLRDY and task STOP"] -pub type DBLRDY_STOP_W<'a, const O: u8> = crate::BitWriter<'a, u32, SHORTS_SPEC, DBLRDY_STOP_A, O>; -impl<'a, const O: u8> DBLRDY_STOP_W<'a, O> { - #[doc = "Disable shortcut"] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(DBLRDY_STOP_A::DISABLED) - } - #[doc = "Enable shortcut"] - #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(DBLRDY_STOP_A::ENABLED) - } -} -#[doc = "Field `SAMPLERDY_READCLRACC` reader - Shortcut between event SAMPLERDY and task READCLRACC"] -pub type SAMPLERDY_READCLRACC_R = crate::BitReader; -#[doc = "Shortcut between event SAMPLERDY and task READCLRACC\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum SAMPLERDY_READCLRACC_A { - #[doc = "0: Disable shortcut"] - DISABLED = 0, - #[doc = "1: Enable shortcut"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: SAMPLERDY_READCLRACC_A) -> Self { - variant as u8 != 0 - } -} -impl SAMPLERDY_READCLRACC_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> SAMPLERDY_READCLRACC_A { - match self.bits { - false => SAMPLERDY_READCLRACC_A::DISABLED, - true => SAMPLERDY_READCLRACC_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == SAMPLERDY_READCLRACC_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == SAMPLERDY_READCLRACC_A::ENABLED - } -} -#[doc = "Field `SAMPLERDY_READCLRACC` writer - Shortcut between event SAMPLERDY and task READCLRACC"] -pub type SAMPLERDY_READCLRACC_W<'a, const O: u8> = - crate::BitWriter<'a, u32, SHORTS_SPEC, SAMPLERDY_READCLRACC_A, O>; -impl<'a, const O: u8> SAMPLERDY_READCLRACC_W<'a, O> { - #[doc = "Disable shortcut"] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(SAMPLERDY_READCLRACC_A::DISABLED) - } - #[doc = "Enable shortcut"] - #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(SAMPLERDY_READCLRACC_A::ENABLED) - } -} -impl R { - #[doc = "Bit 0 - Shortcut between event REPORTRDY and task READCLRACC"] - #[inline(always)] - pub fn reportrdy_readclracc(&self) -> REPORTRDY_READCLRACC_R { - REPORTRDY_READCLRACC_R::new((self.bits & 1) != 0) - } - #[doc = "Bit 1 - Shortcut between event SAMPLERDY and task STOP"] - #[inline(always)] - pub fn samplerdy_stop(&self) -> SAMPLERDY_STOP_R { - SAMPLERDY_STOP_R::new(((self.bits >> 1) & 1) != 0) - } - #[doc = "Bit 2 - Shortcut between event REPORTRDY and task RDCLRACC"] - #[inline(always)] - pub fn reportrdy_rdclracc(&self) -> REPORTRDY_RDCLRACC_R { - REPORTRDY_RDCLRACC_R::new(((self.bits >> 2) & 1) != 0) - } - #[doc = "Bit 3 - Shortcut between event REPORTRDY and task STOP"] - #[inline(always)] - pub fn reportrdy_stop(&self) -> REPORTRDY_STOP_R { - REPORTRDY_STOP_R::new(((self.bits >> 3) & 1) != 0) - } - #[doc = "Bit 4 - Shortcut between event DBLRDY and task RDCLRDBL"] - #[inline(always)] - pub fn dblrdy_rdclrdbl(&self) -> DBLRDY_RDCLRDBL_R { - DBLRDY_RDCLRDBL_R::new(((self.bits >> 4) & 1) != 0) - } - #[doc = "Bit 5 - Shortcut between event DBLRDY and task STOP"] - #[inline(always)] - pub fn dblrdy_stop(&self) -> DBLRDY_STOP_R { - DBLRDY_STOP_R::new(((self.bits >> 5) & 1) != 0) - } - #[doc = "Bit 6 - Shortcut between event SAMPLERDY and task READCLRACC"] - #[inline(always)] - pub fn samplerdy_readclracc(&self) -> SAMPLERDY_READCLRACC_R { - SAMPLERDY_READCLRACC_R::new(((self.bits >> 6) & 1) != 0) - } -} -impl W { - #[doc = "Bit 0 - Shortcut between event REPORTRDY and task READCLRACC"] - #[inline(always)] - #[must_use] - pub fn reportrdy_readclracc(&mut self) -> REPORTRDY_READCLRACC_W<0> { - REPORTRDY_READCLRACC_W::new(self) - } - #[doc = "Bit 1 - Shortcut between event SAMPLERDY and task STOP"] - #[inline(always)] - #[must_use] - pub fn samplerdy_stop(&mut self) -> SAMPLERDY_STOP_W<1> { - SAMPLERDY_STOP_W::new(self) - } - #[doc = "Bit 2 - Shortcut between event REPORTRDY and task RDCLRACC"] - #[inline(always)] - #[must_use] - pub fn reportrdy_rdclracc(&mut self) -> REPORTRDY_RDCLRACC_W<2> { - REPORTRDY_RDCLRACC_W::new(self) - } - #[doc = "Bit 3 - Shortcut between event REPORTRDY and task STOP"] - #[inline(always)] - #[must_use] - pub fn reportrdy_stop(&mut self) -> REPORTRDY_STOP_W<3> { - REPORTRDY_STOP_W::new(self) - } - #[doc = "Bit 4 - Shortcut between event DBLRDY and task RDCLRDBL"] - #[inline(always)] - #[must_use] - pub fn dblrdy_rdclrdbl(&mut self) -> DBLRDY_RDCLRDBL_W<4> { - DBLRDY_RDCLRDBL_W::new(self) - } - #[doc = "Bit 5 - Shortcut between event DBLRDY and task STOP"] - #[inline(always)] - #[must_use] - pub fn dblrdy_stop(&mut self) -> DBLRDY_STOP_W<5> { - DBLRDY_STOP_W::new(self) - } - #[doc = "Bit 6 - Shortcut between event SAMPLERDY and task READCLRACC"] - #[inline(always)] - #[must_use] - pub fn samplerdy_readclracc(&mut self) -> SAMPLERDY_READCLRACC_W<6> { - SAMPLERDY_READCLRACC_W::new(self) - } - #[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 = "Shortcuts between local events and tasks\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 [shorts](index.html) module"] -pub struct SHORTS_SPEC; -impl crate::RegisterSpec for SHORTS_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [shorts::R](R) reader structure"] -impl crate::Readable for SHORTS_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [shorts::W](W) writer structure"] -impl crate::Writable for SHORTS_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets SHORTS to value 0"] -impl crate::Resettable for SHORTS_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/qdec/tasks_rdclracc.rs b/down-the-stack/dk_pac/src/qdec/tasks_rdclracc.rs deleted file mode 100644 index ca63abf..0000000 --- a/down-the-stack/dk_pac/src/qdec/tasks_rdclracc.rs +++ /dev/null @@ -1,72 +0,0 @@ -#[doc = "Register `TASKS_RDCLRACC` 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 = "Read and clear ACC\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum TASKS_RDCLRACC_AW { - #[doc = "1: Trigger task"] - TRIGGER = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: TASKS_RDCLRACC_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `TASKS_RDCLRACC` writer - Read and clear ACC"] -pub type TASKS_RDCLRACC_W<'a, const O: u8> = - crate::BitWriter<'a, u32, TASKS_RDCLRACC_SPEC, TASKS_RDCLRACC_AW, O>; -impl<'a, const O: u8> TASKS_RDCLRACC_W<'a, O> { - #[doc = "Trigger task"] - #[inline(always)] - pub fn trigger(self) -> &'a mut W { - self.variant(TASKS_RDCLRACC_AW::TRIGGER) - } -} -impl W { - #[doc = "Bit 0 - Read and clear ACC"] - #[inline(always)] - #[must_use] - pub fn tasks_rdclracc(&mut self) -> TASKS_RDCLRACC_W<0> { - TASKS_RDCLRACC_W::new(self) - } - #[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 = "Read and clear ACC\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 [tasks_rdclracc](index.html) module"] -pub struct TASKS_RDCLRACC_SPEC; -impl crate::RegisterSpec for TASKS_RDCLRACC_SPEC { - type Ux = u32; -} -#[doc = "`write(|w| ..)` method takes [tasks_rdclracc::W](W) writer structure"] -impl crate::Writable for TASKS_RDCLRACC_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets TASKS_RDCLRACC to value 0"] -impl crate::Resettable for TASKS_RDCLRACC_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/qdec/tasks_rdclrdbl.rs b/down-the-stack/dk_pac/src/qdec/tasks_rdclrdbl.rs deleted file mode 100644 index 57b2f78..0000000 --- a/down-the-stack/dk_pac/src/qdec/tasks_rdclrdbl.rs +++ /dev/null @@ -1,72 +0,0 @@ -#[doc = "Register `TASKS_RDCLRDBL` 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 = "Read and clear ACCDBL\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum TASKS_RDCLRDBL_AW { - #[doc = "1: Trigger task"] - TRIGGER = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: TASKS_RDCLRDBL_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `TASKS_RDCLRDBL` writer - Read and clear ACCDBL"] -pub type TASKS_RDCLRDBL_W<'a, const O: u8> = - crate::BitWriter<'a, u32, TASKS_RDCLRDBL_SPEC, TASKS_RDCLRDBL_AW, O>; -impl<'a, const O: u8> TASKS_RDCLRDBL_W<'a, O> { - #[doc = "Trigger task"] - #[inline(always)] - pub fn trigger(self) -> &'a mut W { - self.variant(TASKS_RDCLRDBL_AW::TRIGGER) - } -} -impl W { - #[doc = "Bit 0 - Read and clear ACCDBL"] - #[inline(always)] - #[must_use] - pub fn tasks_rdclrdbl(&mut self) -> TASKS_RDCLRDBL_W<0> { - TASKS_RDCLRDBL_W::new(self) - } - #[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 = "Read and clear ACCDBL\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 [tasks_rdclrdbl](index.html) module"] -pub struct TASKS_RDCLRDBL_SPEC; -impl crate::RegisterSpec for TASKS_RDCLRDBL_SPEC { - type Ux = u32; -} -#[doc = "`write(|w| ..)` method takes [tasks_rdclrdbl::W](W) writer structure"] -impl crate::Writable for TASKS_RDCLRDBL_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets TASKS_RDCLRDBL to value 0"] -impl crate::Resettable for TASKS_RDCLRDBL_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/qdec/tasks_readclracc.rs b/down-the-stack/dk_pac/src/qdec/tasks_readclracc.rs deleted file mode 100644 index a3f8425..0000000 --- a/down-the-stack/dk_pac/src/qdec/tasks_readclracc.rs +++ /dev/null @@ -1,72 +0,0 @@ -#[doc = "Register `TASKS_READCLRACC` 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 = "Read and clear ACC and ACCDBL\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum TASKS_READCLRACC_AW { - #[doc = "1: Trigger task"] - TRIGGER = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: TASKS_READCLRACC_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `TASKS_READCLRACC` writer - Read and clear ACC and ACCDBL"] -pub type TASKS_READCLRACC_W<'a, const O: u8> = - crate::BitWriter<'a, u32, TASKS_READCLRACC_SPEC, TASKS_READCLRACC_AW, O>; -impl<'a, const O: u8> TASKS_READCLRACC_W<'a, O> { - #[doc = "Trigger task"] - #[inline(always)] - pub fn trigger(self) -> &'a mut W { - self.variant(TASKS_READCLRACC_AW::TRIGGER) - } -} -impl W { - #[doc = "Bit 0 - Read and clear ACC and ACCDBL"] - #[inline(always)] - #[must_use] - pub fn tasks_readclracc(&mut self) -> TASKS_READCLRACC_W<0> { - TASKS_READCLRACC_W::new(self) - } - #[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 = "Read and clear ACC and ACCDBL\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 [tasks_readclracc](index.html) module"] -pub struct TASKS_READCLRACC_SPEC; -impl crate::RegisterSpec for TASKS_READCLRACC_SPEC { - type Ux = u32; -} -#[doc = "`write(|w| ..)` method takes [tasks_readclracc::W](W) writer structure"] -impl crate::Writable for TASKS_READCLRACC_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets TASKS_READCLRACC to value 0"] -impl crate::Resettable for TASKS_READCLRACC_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/qdec/tasks_start.rs b/down-the-stack/dk_pac/src/qdec/tasks_start.rs deleted file mode 100644 index 6a4f6f6..0000000 --- a/down-the-stack/dk_pac/src/qdec/tasks_start.rs +++ /dev/null @@ -1,72 +0,0 @@ -#[doc = "Register `TASKS_START` 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 = "Task starting the quadrature decoder\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum TASKS_START_AW { - #[doc = "1: Trigger task"] - TRIGGER = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: TASKS_START_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `TASKS_START` writer - Task starting the quadrature decoder"] -pub type TASKS_START_W<'a, const O: u8> = - crate::BitWriter<'a, u32, TASKS_START_SPEC, TASKS_START_AW, O>; -impl<'a, const O: u8> TASKS_START_W<'a, O> { - #[doc = "Trigger task"] - #[inline(always)] - pub fn trigger(self) -> &'a mut W { - self.variant(TASKS_START_AW::TRIGGER) - } -} -impl W { - #[doc = "Bit 0 - Task starting the quadrature decoder"] - #[inline(always)] - #[must_use] - pub fn tasks_start(&mut self) -> TASKS_START_W<0> { - TASKS_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 - } -} -#[doc = "Task starting the quadrature decoder\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 [tasks_start](index.html) module"] -pub struct TASKS_START_SPEC; -impl crate::RegisterSpec for TASKS_START_SPEC { - type Ux = u32; -} -#[doc = "`write(|w| ..)` method takes [tasks_start::W](W) writer structure"] -impl crate::Writable for TASKS_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 TASKS_START to value 0"] -impl crate::Resettable for TASKS_START_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/qdec/tasks_stop.rs b/down-the-stack/dk_pac/src/qdec/tasks_stop.rs deleted file mode 100644 index cd81652..0000000 --- a/down-the-stack/dk_pac/src/qdec/tasks_stop.rs +++ /dev/null @@ -1,72 +0,0 @@ -#[doc = "Register `TASKS_STOP` 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 = "Task stopping the quadrature decoder\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum TASKS_STOP_AW { - #[doc = "1: Trigger task"] - TRIGGER = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: TASKS_STOP_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `TASKS_STOP` writer - Task stopping the quadrature decoder"] -pub type TASKS_STOP_W<'a, const O: u8> = - crate::BitWriter<'a, u32, TASKS_STOP_SPEC, TASKS_STOP_AW, O>; -impl<'a, const O: u8> TASKS_STOP_W<'a, O> { - #[doc = "Trigger task"] - #[inline(always)] - pub fn trigger(self) -> &'a mut W { - self.variant(TASKS_STOP_AW::TRIGGER) - } -} -impl W { - #[doc = "Bit 0 - Task stopping the quadrature decoder"] - #[inline(always)] - #[must_use] - pub fn tasks_stop(&mut self) -> TASKS_STOP_W<0> { - TASKS_STOP_W::new(self) - } - #[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 = "Task stopping the quadrature decoder\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 [tasks_stop](index.html) module"] -pub struct TASKS_STOP_SPEC; -impl crate::RegisterSpec for TASKS_STOP_SPEC { - type Ux = u32; -} -#[doc = "`write(|w| ..)` method takes [tasks_stop::W](W) writer structure"] -impl crate::Writable for TASKS_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 TASKS_STOP to value 0"] -impl crate::Resettable for TASKS_STOP_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/radio.rs b/down-the-stack/dk_pac/src/radio.rs deleted file mode 100644 index 12f9c2f..0000000 --- a/down-the-stack/dk_pac/src/radio.rs +++ /dev/null @@ -1,330 +0,0 @@ -#[doc = r"Register block"] -#[repr(C)] -pub struct RegisterBlock { - #[doc = "0x00 - Enable RADIO in TX mode"] - pub tasks_txen: TASKS_TXEN, - #[doc = "0x04 - Enable RADIO in RX mode"] - pub tasks_rxen: TASKS_RXEN, - #[doc = "0x08 - Start RADIO"] - pub tasks_start: TASKS_START, - #[doc = "0x0c - Stop RADIO"] - pub tasks_stop: TASKS_STOP, - #[doc = "0x10 - Disable RADIO"] - pub tasks_disable: TASKS_DISABLE, - #[doc = "0x14 - Start the RSSI and take one single sample of the receive signal strength."] - pub tasks_rssistart: TASKS_RSSISTART, - #[doc = "0x18 - Stop the RSSI measurement"] - pub tasks_rssistop: TASKS_RSSISTOP, - #[doc = "0x1c - Start the bit counter"] - pub tasks_bcstart: TASKS_BCSTART, - #[doc = "0x20 - Stop the bit counter"] - pub tasks_bcstop: TASKS_BCSTOP, - _reserved9: [u8; 0xdc], - #[doc = "0x100 - RADIO has ramped up and is ready to be started"] - pub events_ready: EVENTS_READY, - #[doc = "0x104 - Address sent or received"] - pub events_address: EVENTS_ADDRESS, - #[doc = "0x108 - Packet payload sent or received"] - pub events_payload: EVENTS_PAYLOAD, - #[doc = "0x10c - Packet sent or received"] - pub events_end: EVENTS_END, - #[doc = "0x110 - RADIO has been disabled"] - pub events_disabled: EVENTS_DISABLED, - #[doc = "0x114 - A device address match occurred on the last received packet"] - pub events_devmatch: EVENTS_DEVMATCH, - #[doc = "0x118 - No device address match occurred on the last received packet"] - pub events_devmiss: EVENTS_DEVMISS, - #[doc = "0x11c - Sampling of receive signal strength complete."] - pub events_rssiend: EVENTS_RSSIEND, - _reserved17: [u8; 0x08], - #[doc = "0x128 - Bit counter reached bit count value."] - pub events_bcmatch: EVENTS_BCMATCH, - _reserved18: [u8; 0x04], - #[doc = "0x130 - Packet received with CRC ok"] - pub events_crcok: EVENTS_CRCOK, - #[doc = "0x134 - Packet received with CRC error"] - pub events_crcerror: EVENTS_CRCERROR, - _reserved20: [u8; 0xc8], - #[doc = "0x200 - Shortcuts between local events and tasks"] - pub shorts: SHORTS, - _reserved21: [u8; 0x0100], - #[doc = "0x304 - Enable interrupt"] - pub intenset: INTENSET, - #[doc = "0x308 - Disable interrupt"] - pub intenclr: INTENCLR, - _reserved23: [u8; 0xf4], - #[doc = "0x400 - CRC status"] - pub crcstatus: CRCSTATUS, - _reserved24: [u8; 0x04], - #[doc = "0x408 - Received address"] - pub rxmatch: RXMATCH, - #[doc = "0x40c - CRC field of previously received packet"] - pub rxcrc: RXCRC, - #[doc = "0x410 - Device address match index"] - pub dai: DAI, - _reserved27: [u8; 0xf0], - #[doc = "0x504 - Packet pointer"] - pub packetptr: PACKETPTR, - #[doc = "0x508 - Frequency"] - pub frequency: FREQUENCY, - #[doc = "0x50c - Output power"] - pub txpower: TXPOWER, - #[doc = "0x510 - Data rate and modulation"] - pub mode: MODE, - #[doc = "0x514 - Packet configuration register 0"] - pub pcnf0: PCNF0, - #[doc = "0x518 - Packet configuration register 1"] - pub pcnf1: PCNF1, - #[doc = "0x51c - Base address 0"] - pub base0: BASE0, - #[doc = "0x520 - Base address 1"] - pub base1: BASE1, - #[doc = "0x524 - Prefixes bytes for logical addresses 0-3"] - pub prefix0: PREFIX0, - #[doc = "0x528 - Prefixes bytes for logical addresses 4-7"] - pub prefix1: PREFIX1, - #[doc = "0x52c - Transmit address select"] - pub txaddress: TXADDRESS, - #[doc = "0x530 - Receive address select"] - pub rxaddresses: RXADDRESSES, - #[doc = "0x534 - CRC configuration"] - pub crccnf: CRCCNF, - #[doc = "0x538 - CRC polynomial"] - pub crcpoly: CRCPOLY, - #[doc = "0x53c - CRC initial value"] - pub crcinit: CRCINIT, - _reserved42: [u8; 0x04], - #[doc = "0x544 - Inter Frame Spacing in us"] - pub tifs: TIFS, - #[doc = "0x548 - RSSI sample"] - pub rssisample: RSSISAMPLE, - _reserved44: [u8; 0x04], - #[doc = "0x550 - Current radio state"] - pub state: STATE, - #[doc = "0x554 - Data whitening initial value"] - pub datawhiteiv: DATAWHITEIV, - _reserved46: [u8; 0x08], - #[doc = "0x560 - Bit counter compare"] - pub bcc: BCC, - _reserved47: [u8; 0x9c], - #[doc = "0x600..0x620 - Description collection: Device address base segment n"] - pub dab: [DAB; 8], - #[doc = "0x620..0x640 - Description collection: Device address prefix n"] - pub dap: [DAP; 8], - #[doc = "0x640 - Device address match configuration"] - pub dacnf: DACNF, - _reserved50: [u8; 0x0c], - #[doc = "0x650 - Radio mode configuration register 0"] - pub modecnf0: MODECNF0, - _reserved51: [u8; 0x09a8], - #[doc = "0xffc - Peripheral power control"] - pub power: POWER, -} -#[doc = "TASKS_TXEN (w) register accessor: an alias for `Reg`"] -pub type TASKS_TXEN = crate::Reg; -#[doc = "Enable RADIO in TX mode"] -pub mod tasks_txen; -#[doc = "TASKS_RXEN (w) register accessor: an alias for `Reg`"] -pub type TASKS_RXEN = crate::Reg; -#[doc = "Enable RADIO in RX mode"] -pub mod tasks_rxen; -#[doc = "TASKS_START (w) register accessor: an alias for `Reg`"] -pub type TASKS_START = crate::Reg; -#[doc = "Start RADIO"] -pub mod tasks_start; -#[doc = "TASKS_STOP (w) register accessor: an alias for `Reg`"] -pub type TASKS_STOP = crate::Reg; -#[doc = "Stop RADIO"] -pub mod tasks_stop; -#[doc = "TASKS_DISABLE (w) register accessor: an alias for `Reg`"] -pub type TASKS_DISABLE = crate::Reg; -#[doc = "Disable RADIO"] -pub mod tasks_disable; -#[doc = "TASKS_RSSISTART (w) register accessor: an alias for `Reg`"] -pub type TASKS_RSSISTART = crate::Reg; -#[doc = "Start the RSSI and take one single sample of the receive signal strength."] -pub mod tasks_rssistart; -#[doc = "TASKS_RSSISTOP (w) register accessor: an alias for `Reg`"] -pub type TASKS_RSSISTOP = crate::Reg; -#[doc = "Stop the RSSI measurement"] -pub mod tasks_rssistop; -#[doc = "TASKS_BCSTART (w) register accessor: an alias for `Reg`"] -pub type TASKS_BCSTART = crate::Reg; -#[doc = "Start the bit counter"] -pub mod tasks_bcstart; -#[doc = "TASKS_BCSTOP (w) register accessor: an alias for `Reg`"] -pub type TASKS_BCSTOP = crate::Reg; -#[doc = "Stop the bit counter"] -pub mod tasks_bcstop; -#[doc = "EVENTS_READY (rw) register accessor: an alias for `Reg`"] -pub type EVENTS_READY = crate::Reg; -#[doc = "RADIO has ramped up and is ready to be started"] -pub mod events_ready; -#[doc = "EVENTS_ADDRESS (rw) register accessor: an alias for `Reg`"] -pub type EVENTS_ADDRESS = crate::Reg; -#[doc = "Address sent or received"] -pub mod events_address; -#[doc = "EVENTS_PAYLOAD (rw) register accessor: an alias for `Reg`"] -pub type EVENTS_PAYLOAD = crate::Reg; -#[doc = "Packet payload sent or received"] -pub mod events_payload; -#[doc = "EVENTS_END (rw) register accessor: an alias for `Reg`"] -pub type EVENTS_END = crate::Reg; -#[doc = "Packet sent or received"] -pub mod events_end; -#[doc = "EVENTS_DISABLED (rw) register accessor: an alias for `Reg`"] -pub type EVENTS_DISABLED = crate::Reg; -#[doc = "RADIO has been disabled"] -pub mod events_disabled; -#[doc = "EVENTS_DEVMATCH (rw) register accessor: an alias for `Reg`"] -pub type EVENTS_DEVMATCH = crate::Reg; -#[doc = "A device address match occurred on the last received packet"] -pub mod events_devmatch; -#[doc = "EVENTS_DEVMISS (rw) register accessor: an alias for `Reg`"] -pub type EVENTS_DEVMISS = crate::Reg; -#[doc = "No device address match occurred on the last received packet"] -pub mod events_devmiss; -#[doc = "EVENTS_RSSIEND (rw) register accessor: an alias for `Reg`"] -pub type EVENTS_RSSIEND = crate::Reg; -#[doc = "Sampling of receive signal strength complete."] -pub mod events_rssiend; -#[doc = "EVENTS_BCMATCH (rw) register accessor: an alias for `Reg`"] -pub type EVENTS_BCMATCH = crate::Reg; -#[doc = "Bit counter reached bit count value."] -pub mod events_bcmatch; -#[doc = "EVENTS_CRCOK (rw) register accessor: an alias for `Reg`"] -pub type EVENTS_CRCOK = crate::Reg; -#[doc = "Packet received with CRC ok"] -pub mod events_crcok; -#[doc = "EVENTS_CRCERROR (rw) register accessor: an alias for `Reg`"] -pub type EVENTS_CRCERROR = crate::Reg; -#[doc = "Packet received with CRC error"] -pub mod events_crcerror; -#[doc = "SHORTS (rw) register accessor: an alias for `Reg`"] -pub type SHORTS = crate::Reg; -#[doc = "Shortcuts between local events and tasks"] -pub mod shorts; -#[doc = "INTENSET (rw) register accessor: an alias for `Reg`"] -pub type INTENSET = crate::Reg; -#[doc = "Enable interrupt"] -pub mod intenset; -#[doc = "INTENCLR (rw) register accessor: an alias for `Reg`"] -pub type INTENCLR = crate::Reg; -#[doc = "Disable interrupt"] -pub mod intenclr; -#[doc = "CRCSTATUS (r) register accessor: an alias for `Reg`"] -pub type CRCSTATUS = crate::Reg; -#[doc = "CRC status"] -pub mod crcstatus; -#[doc = "RXMATCH (r) register accessor: an alias for `Reg`"] -pub type RXMATCH = crate::Reg; -#[doc = "Received address"] -pub mod rxmatch; -#[doc = "RXCRC (r) register accessor: an alias for `Reg`"] -pub type RXCRC = crate::Reg; -#[doc = "CRC field of previously received packet"] -pub mod rxcrc; -#[doc = "DAI (r) register accessor: an alias for `Reg`"] -pub type DAI = crate::Reg; -#[doc = "Device address match index"] -pub mod dai; -#[doc = "PACKETPTR (rw) register accessor: an alias for `Reg`"] -pub type PACKETPTR = crate::Reg; -#[doc = "Packet pointer"] -pub mod packetptr; -#[doc = "FREQUENCY (rw) register accessor: an alias for `Reg`"] -pub type FREQUENCY = crate::Reg; -#[doc = "Frequency"] -pub mod frequency; -#[doc = "TXPOWER (rw) register accessor: an alias for `Reg`"] -pub type TXPOWER = crate::Reg; -#[doc = "Output power"] -pub mod txpower; -#[doc = "MODE (rw) register accessor: an alias for `Reg`"] -pub type MODE = crate::Reg; -#[doc = "Data rate and modulation"] -pub mod mode; -#[doc = "PCNF0 (rw) register accessor: an alias for `Reg`"] -pub type PCNF0 = crate::Reg; -#[doc = "Packet configuration register 0"] -pub mod pcnf0; -#[doc = "PCNF1 (rw) register accessor: an alias for `Reg`"] -pub type PCNF1 = crate::Reg; -#[doc = "Packet configuration register 1"] -pub mod pcnf1; -#[doc = "BASE0 (rw) register accessor: an alias for `Reg`"] -pub type BASE0 = crate::Reg; -#[doc = "Base address 0"] -pub mod base0; -#[doc = "BASE1 (rw) register accessor: an alias for `Reg`"] -pub type BASE1 = crate::Reg; -#[doc = "Base address 1"] -pub mod base1; -#[doc = "PREFIX0 (rw) register accessor: an alias for `Reg`"] -pub type PREFIX0 = crate::Reg; -#[doc = "Prefixes bytes for logical addresses 0-3"] -pub mod prefix0; -#[doc = "PREFIX1 (rw) register accessor: an alias for `Reg`"] -pub type PREFIX1 = crate::Reg; -#[doc = "Prefixes bytes for logical addresses 4-7"] -pub mod prefix1; -#[doc = "TXADDRESS (rw) register accessor: an alias for `Reg`"] -pub type TXADDRESS = crate::Reg; -#[doc = "Transmit address select"] -pub mod txaddress; -#[doc = "RXADDRESSES (rw) register accessor: an alias for `Reg`"] -pub type RXADDRESSES = crate::Reg; -#[doc = "Receive address select"] -pub mod rxaddresses; -#[doc = "CRCCNF (rw) register accessor: an alias for `Reg`"] -pub type CRCCNF = crate::Reg; -#[doc = "CRC configuration"] -pub mod crccnf; -#[doc = "CRCPOLY (rw) register accessor: an alias for `Reg`"] -pub type CRCPOLY = crate::Reg; -#[doc = "CRC polynomial"] -pub mod crcpoly; -#[doc = "CRCINIT (rw) register accessor: an alias for `Reg`"] -pub type CRCINIT = crate::Reg; -#[doc = "CRC initial value"] -pub mod crcinit; -#[doc = "TIFS (rw) register accessor: an alias for `Reg`"] -pub type TIFS = crate::Reg; -#[doc = "Inter Frame Spacing in us"] -pub mod tifs; -#[doc = "RSSISAMPLE (r) register accessor: an alias for `Reg`"] -pub type RSSISAMPLE = crate::Reg; -#[doc = "RSSI sample"] -pub mod rssisample; -#[doc = "STATE (r) register accessor: an alias for `Reg`"] -pub type STATE = crate::Reg; -#[doc = "Current radio state"] -pub mod state; -#[doc = "DATAWHITEIV (rw) register accessor: an alias for `Reg`"] -pub type DATAWHITEIV = crate::Reg; -#[doc = "Data whitening initial value"] -pub mod datawhiteiv; -#[doc = "BCC (rw) register accessor: an alias for `Reg`"] -pub type BCC = crate::Reg; -#[doc = "Bit counter compare"] -pub mod bcc; -#[doc = "DAB (rw) register accessor: an alias for `Reg`"] -pub type DAB = crate::Reg; -#[doc = "Description collection: Device address base segment n"] -pub mod dab; -#[doc = "DAP (rw) register accessor: an alias for `Reg`"] -pub type DAP = crate::Reg; -#[doc = "Description collection: Device address prefix n"] -pub mod dap; -#[doc = "DACNF (rw) register accessor: an alias for `Reg`"] -pub type DACNF = crate::Reg; -#[doc = "Device address match configuration"] -pub mod dacnf; -#[doc = "MODECNF0 (rw) register accessor: an alias for `Reg`"] -pub type MODECNF0 = crate::Reg; -#[doc = "Radio mode configuration register 0"] -pub mod modecnf0; -#[doc = "POWER (rw) register accessor: an alias for `Reg`"] -pub type POWER = crate::Reg; -#[doc = "Peripheral power control"] -pub mod power; diff --git a/down-the-stack/dk_pac/src/radio/base0.rs b/down-the-stack/dk_pac/src/radio/base0.rs deleted file mode 100644 index 7f8c523..0000000 --- a/down-the-stack/dk_pac/src/radio/base0.rs +++ /dev/null @@ -1,80 +0,0 @@ -#[doc = "Register `BASE0` 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 `BASE0` 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 `BASE0` reader - Base address 0"] -pub type BASE0_R = crate::FieldReader; -#[doc = "Field `BASE0` writer - Base address 0"] -pub type BASE0_W<'a, const O: u8> = crate::FieldWriter<'a, u32, BASE0_SPEC, u32, u32, 32, O>; -impl R { - #[doc = "Bits 0:31 - Base address 0"] - #[inline(always)] - pub fn base0(&self) -> BASE0_R { - BASE0_R::new(self.bits) - } -} -impl W { - #[doc = "Bits 0:31 - Base address 0"] - #[inline(always)] - #[must_use] - pub fn base0(&mut self) -> BASE0_W<0> { - BASE0_W::new(self) - } - #[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 = "Base address 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 [base0](index.html) module"] -pub struct BASE0_SPEC; -impl crate::RegisterSpec for BASE0_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [base0::R](R) reader structure"] -impl crate::Readable for BASE0_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [base0::W](W) writer structure"] -impl crate::Writable for BASE0_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets BASE0 to value 0"] -impl crate::Resettable for BASE0_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/radio/base1.rs b/down-the-stack/dk_pac/src/radio/base1.rs deleted file mode 100644 index 0aa2e94..0000000 --- a/down-the-stack/dk_pac/src/radio/base1.rs +++ /dev/null @@ -1,80 +0,0 @@ -#[doc = "Register `BASE1` 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 `BASE1` 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 `BASE1` reader - Base address 1"] -pub type BASE1_R = crate::FieldReader; -#[doc = "Field `BASE1` writer - Base address 1"] -pub type BASE1_W<'a, const O: u8> = crate::FieldWriter<'a, u32, BASE1_SPEC, u32, u32, 32, O>; -impl R { - #[doc = "Bits 0:31 - Base address 1"] - #[inline(always)] - pub fn base1(&self) -> BASE1_R { - BASE1_R::new(self.bits) - } -} -impl W { - #[doc = "Bits 0:31 - Base address 1"] - #[inline(always)] - #[must_use] - pub fn base1(&mut self) -> BASE1_W<0> { - BASE1_W::new(self) - } - #[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 = "Base address 1\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 [base1](index.html) module"] -pub struct BASE1_SPEC; -impl crate::RegisterSpec for BASE1_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [base1::R](R) reader structure"] -impl crate::Readable for BASE1_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [base1::W](W) writer structure"] -impl crate::Writable for BASE1_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets BASE1 to value 0"] -impl crate::Resettable for BASE1_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/radio/bcc.rs b/down-the-stack/dk_pac/src/radio/bcc.rs deleted file mode 100644 index bee2639..0000000 --- a/down-the-stack/dk_pac/src/radio/bcc.rs +++ /dev/null @@ -1,80 +0,0 @@ -#[doc = "Register `BCC` 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 `BCC` 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 `BCC` reader - Bit counter compare"] -pub type BCC_R = crate::FieldReader; -#[doc = "Field `BCC` writer - Bit counter compare"] -pub type BCC_W<'a, const O: u8> = crate::FieldWriter<'a, u32, BCC_SPEC, u32, u32, 32, O>; -impl R { - #[doc = "Bits 0:31 - Bit counter compare"] - #[inline(always)] - pub fn bcc(&self) -> BCC_R { - BCC_R::new(self.bits) - } -} -impl W { - #[doc = "Bits 0:31 - Bit counter compare"] - #[inline(always)] - #[must_use] - pub fn bcc(&mut self) -> BCC_W<0> { - BCC_W::new(self) - } - #[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 = "Bit counter compare\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 [bcc](index.html) module"] -pub struct BCC_SPEC; -impl crate::RegisterSpec for BCC_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [bcc::R](R) reader structure"] -impl crate::Readable for BCC_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [bcc::W](W) writer structure"] -impl crate::Writable for BCC_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets BCC to value 0"] -impl crate::Resettable for BCC_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/radio/crccnf.rs b/down-the-stack/dk_pac/src/radio/crccnf.rs deleted file mode 100644 index f3a7e89..0000000 --- a/down-the-stack/dk_pac/src/radio/crccnf.rs +++ /dev/null @@ -1,215 +0,0 @@ -#[doc = "Register `CRCCNF` 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 `CRCCNF` 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 `LEN` reader - CRC length in number of bytes."] -pub type LEN_R = crate::FieldReader; -#[doc = "CRC length in number of bytes.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -#[repr(u8)] -pub enum LEN_A { - #[doc = "0: CRC length is zero and CRC calculation is disabled"] - DISABLED = 0, - #[doc = "1: CRC length is one byte and CRC calculation is enabled"] - ONE = 1, - #[doc = "2: CRC length is two bytes and CRC calculation is enabled"] - TWO = 2, - #[doc = "3: CRC length is three bytes and CRC calculation is enabled"] - THREE = 3, -} -impl From for u8 { - #[inline(always)] - fn from(variant: LEN_A) -> Self { - variant as _ - } -} -impl LEN_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> LEN_A { - match self.bits { - 0 => LEN_A::DISABLED, - 1 => LEN_A::ONE, - 2 => LEN_A::TWO, - 3 => LEN_A::THREE, - _ => unreachable!(), - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == LEN_A::DISABLED - } - #[doc = "Checks if the value of the field is `ONE`"] - #[inline(always)] - pub fn is_one(&self) -> bool { - *self == LEN_A::ONE - } - #[doc = "Checks if the value of the field is `TWO`"] - #[inline(always)] - pub fn is_two(&self) -> bool { - *self == LEN_A::TWO - } - #[doc = "Checks if the value of the field is `THREE`"] - #[inline(always)] - pub fn is_three(&self) -> bool { - *self == LEN_A::THREE - } -} -#[doc = "Field `LEN` writer - CRC length in number of bytes."] -pub type LEN_W<'a, const O: u8> = crate::FieldWriterSafe<'a, u32, CRCCNF_SPEC, u8, LEN_A, 2, O>; -impl<'a, const O: u8> LEN_W<'a, O> { - #[doc = "CRC length is zero and CRC calculation is disabled"] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(LEN_A::DISABLED) - } - #[doc = "CRC length is one byte and CRC calculation is enabled"] - #[inline(always)] - pub fn one(self) -> &'a mut W { - self.variant(LEN_A::ONE) - } - #[doc = "CRC length is two bytes and CRC calculation is enabled"] - #[inline(always)] - pub fn two(self) -> &'a mut W { - self.variant(LEN_A::TWO) - } - #[doc = "CRC length is three bytes and CRC calculation is enabled"] - #[inline(always)] - pub fn three(self) -> &'a mut W { - self.variant(LEN_A::THREE) - } -} -#[doc = "Field `SKIPADDR` reader - Include or exclude packet address field out of CRC calculation."] -pub type SKIPADDR_R = crate::BitReader; -#[doc = "Include or exclude packet address field out of CRC calculation.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum SKIPADDR_A { - #[doc = "0: CRC calculation includes address field"] - INCLUDE = 0, - #[doc = "1: CRC calculation does not include address field. The CRC calculation will start at the first byte after the address."] - SKIP = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: SKIPADDR_A) -> Self { - variant as u8 != 0 - } -} -impl SKIPADDR_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> SKIPADDR_A { - match self.bits { - false => SKIPADDR_A::INCLUDE, - true => SKIPADDR_A::SKIP, - } - } - #[doc = "Checks if the value of the field is `INCLUDE`"] - #[inline(always)] - pub fn is_include(&self) -> bool { - *self == SKIPADDR_A::INCLUDE - } - #[doc = "Checks if the value of the field is `SKIP`"] - #[inline(always)] - pub fn is_skip(&self) -> bool { - *self == SKIPADDR_A::SKIP - } -} -#[doc = "Field `SKIPADDR` writer - Include or exclude packet address field out of CRC calculation."] -pub type SKIPADDR_W<'a, const O: u8> = crate::BitWriter<'a, u32, CRCCNF_SPEC, SKIPADDR_A, O>; -impl<'a, const O: u8> SKIPADDR_W<'a, O> { - #[doc = "CRC calculation includes address field"] - #[inline(always)] - pub fn include(self) -> &'a mut W { - self.variant(SKIPADDR_A::INCLUDE) - } - #[doc = "CRC calculation does not include address field. The CRC calculation will start at the first byte after the address."] - #[inline(always)] - pub fn skip(self) -> &'a mut W { - self.variant(SKIPADDR_A::SKIP) - } -} -impl R { - #[doc = "Bits 0:1 - CRC length in number of bytes."] - #[inline(always)] - pub fn len(&self) -> LEN_R { - LEN_R::new((self.bits & 3) as u8) - } - #[doc = "Bit 8 - Include or exclude packet address field out of CRC calculation."] - #[inline(always)] - pub fn skipaddr(&self) -> SKIPADDR_R { - SKIPADDR_R::new(((self.bits >> 8) & 1) != 0) - } -} -impl W { - #[doc = "Bits 0:1 - CRC length in number of bytes."] - #[inline(always)] - #[must_use] - pub fn len(&mut self) -> LEN_W<0> { - LEN_W::new(self) - } - #[doc = "Bit 8 - Include or exclude packet address field out of CRC calculation."] - #[inline(always)] - #[must_use] - pub fn skipaddr(&mut self) -> SKIPADDR_W<8> { - SKIPADDR_W::new(self) - } - #[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 = "CRC configuration\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 [crccnf](index.html) module"] -pub struct CRCCNF_SPEC; -impl crate::RegisterSpec for CRCCNF_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [crccnf::R](R) reader structure"] -impl crate::Readable for CRCCNF_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [crccnf::W](W) writer structure"] -impl crate::Writable for CRCCNF_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets CRCCNF to value 0"] -impl crate::Resettable for CRCCNF_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/radio/crcinit.rs b/down-the-stack/dk_pac/src/radio/crcinit.rs deleted file mode 100644 index 9ec8854..0000000 --- a/down-the-stack/dk_pac/src/radio/crcinit.rs +++ /dev/null @@ -1,80 +0,0 @@ -#[doc = "Register `CRCINIT` 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 `CRCINIT` 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 `CRCINIT` reader - CRC initial value"] -pub type CRCINIT_R = crate::FieldReader; -#[doc = "Field `CRCINIT` writer - CRC initial value"] -pub type CRCINIT_W<'a, const O: u8> = crate::FieldWriter<'a, u32, CRCINIT_SPEC, u32, u32, 24, O>; -impl R { - #[doc = "Bits 0:23 - CRC initial value"] - #[inline(always)] - pub fn crcinit(&self) -> CRCINIT_R { - CRCINIT_R::new(self.bits & 0x00ff_ffff) - } -} -impl W { - #[doc = "Bits 0:23 - CRC initial value"] - #[inline(always)] - #[must_use] - pub fn crcinit(&mut self) -> CRCINIT_W<0> { - CRCINIT_W::new(self) - } - #[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 = "CRC initial value\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 [crcinit](index.html) module"] -pub struct CRCINIT_SPEC; -impl crate::RegisterSpec for CRCINIT_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [crcinit::R](R) reader structure"] -impl crate::Readable for CRCINIT_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [crcinit::W](W) writer structure"] -impl crate::Writable for CRCINIT_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets CRCINIT to value 0"] -impl crate::Resettable for CRCINIT_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/radio/crcpoly.rs b/down-the-stack/dk_pac/src/radio/crcpoly.rs deleted file mode 100644 index 70d8e6c..0000000 --- a/down-the-stack/dk_pac/src/radio/crcpoly.rs +++ /dev/null @@ -1,80 +0,0 @@ -#[doc = "Register `CRCPOLY` 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 `CRCPOLY` 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 `CRCPOLY` reader - CRC polynomial"] -pub type CRCPOLY_R = crate::FieldReader; -#[doc = "Field `CRCPOLY` writer - CRC polynomial"] -pub type CRCPOLY_W<'a, const O: u8> = crate::FieldWriter<'a, u32, CRCPOLY_SPEC, u32, u32, 24, O>; -impl R { - #[doc = "Bits 0:23 - CRC polynomial"] - #[inline(always)] - pub fn crcpoly(&self) -> CRCPOLY_R { - CRCPOLY_R::new(self.bits & 0x00ff_ffff) - } -} -impl W { - #[doc = "Bits 0:23 - CRC polynomial"] - #[inline(always)] - #[must_use] - pub fn crcpoly(&mut self) -> CRCPOLY_W<0> { - CRCPOLY_W::new(self) - } - #[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 = "CRC polynomial\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 [crcpoly](index.html) module"] -pub struct CRCPOLY_SPEC; -impl crate::RegisterSpec for CRCPOLY_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [crcpoly::R](R) reader structure"] -impl crate::Readable for CRCPOLY_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [crcpoly::W](W) writer structure"] -impl crate::Writable for CRCPOLY_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets CRCPOLY to value 0"] -impl crate::Resettable for CRCPOLY_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/radio/crcstatus.rs b/down-the-stack/dk_pac/src/radio/crcstatus.rs deleted file mode 100644 index fad14e8..0000000 --- a/down-the-stack/dk_pac/src/radio/crcstatus.rs +++ /dev/null @@ -1,71 +0,0 @@ -#[doc = "Register `CRCSTATUS` 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 = "Field `CRCSTATUS` reader - CRC status of packet received"] -pub type CRCSTATUS_R = crate::BitReader; -#[doc = "CRC status of packet received\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum CRCSTATUS_A { - #[doc = "0: Packet received with CRC error"] - CRCERROR = 0, - #[doc = "1: Packet received with CRC ok"] - CRCOK = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: CRCSTATUS_A) -> Self { - variant as u8 != 0 - } -} -impl CRCSTATUS_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> CRCSTATUS_A { - match self.bits { - false => CRCSTATUS_A::CRCERROR, - true => CRCSTATUS_A::CRCOK, - } - } - #[doc = "Checks if the value of the field is `CRCERROR`"] - #[inline(always)] - pub fn is_crcerror(&self) -> bool { - *self == CRCSTATUS_A::CRCERROR - } - #[doc = "Checks if the value of the field is `CRCOK`"] - #[inline(always)] - pub fn is_crcok(&self) -> bool { - *self == CRCSTATUS_A::CRCOK - } -} -impl R { - #[doc = "Bit 0 - CRC status of packet received"] - #[inline(always)] - pub fn crcstatus(&self) -> CRCSTATUS_R { - CRCSTATUS_R::new((self.bits & 1) != 0) - } -} -#[doc = "CRC 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 [crcstatus](index.html) module"] -pub struct CRCSTATUS_SPEC; -impl crate::RegisterSpec for CRCSTATUS_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [crcstatus::R](R) reader structure"] -impl crate::Readable for CRCSTATUS_SPEC { - type Reader = R; -} -#[doc = "`reset()` method sets CRCSTATUS to value 0"] -impl crate::Resettable for CRCSTATUS_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/radio/dab.rs b/down-the-stack/dk_pac/src/radio/dab.rs deleted file mode 100644 index feb65c0..0000000 --- a/down-the-stack/dk_pac/src/radio/dab.rs +++ /dev/null @@ -1,81 +0,0 @@ -#[doc = "Register `DAB[%s]` 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 `DAB[%s]` 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 `DAB` reader - Device address base segment n"] -pub type DAB_R = crate::FieldReader; -#[doc = "Field `DAB` writer - Device address base segment n"] -pub type DAB_W<'a, const O: u8> = crate::FieldWriter<'a, u32, DAB_SPEC, u32, u32, 32, O>; -impl R { - #[doc = "Bits 0:31 - Device address base segment n"] - #[inline(always)] - pub fn dab(&self) -> DAB_R { - DAB_R::new(self.bits) - } -} -impl W { - #[doc = "Bits 0:31 - Device address base segment n"] - #[inline(always)] - #[must_use] - pub fn dab(&mut self) -> DAB_W<0> { - DAB_W::new(self) - } - #[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 = "Description collection: Device address base segment n\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 [dab](index.html) module"] -pub struct DAB_SPEC; -impl crate::RegisterSpec for DAB_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [dab::R](R) reader structure"] -impl crate::Readable for DAB_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [dab::W](W) writer structure"] -impl crate::Writable for DAB_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets DAB[%s] -to value 0"] -impl crate::Resettable for DAB_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/radio/dacnf.rs b/down-the-stack/dk_pac/src/radio/dacnf.rs deleted file mode 100644 index 12af1a3..0000000 --- a/down-the-stack/dk_pac/src/radio/dacnf.rs +++ /dev/null @@ -1,673 +0,0 @@ -#[doc = "Register `DACNF` 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 `DACNF` 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 `ENA0` reader - Enable or disable device address matching using device address 0"] -pub type ENA0_R = crate::BitReader; -#[doc = "Enable or disable device address matching using device address 0\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum ENA0_A { - #[doc = "0: Disabled"] - DISABLED = 0, - #[doc = "1: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: ENA0_A) -> Self { - variant as u8 != 0 - } -} -impl ENA0_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> ENA0_A { - match self.bits { - false => ENA0_A::DISABLED, - true => ENA0_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == ENA0_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == ENA0_A::ENABLED - } -} -#[doc = "Field `ENA0` writer - Enable or disable device address matching using device address 0"] -pub type ENA0_W<'a, const O: u8> = crate::BitWriter<'a, u32, DACNF_SPEC, ENA0_A, O>; -impl<'a, const O: u8> ENA0_W<'a, O> { - #[doc = "Disabled"] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(ENA0_A::DISABLED) - } - #[doc = "Enabled"] - #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(ENA0_A::ENABLED) - } -} -#[doc = "Field `ENA1` reader - Enable or disable device address matching using device address 1"] -pub type ENA1_R = crate::BitReader; -#[doc = "Enable or disable device address matching using device address 1\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum ENA1_A { - #[doc = "0: Disabled"] - DISABLED = 0, - #[doc = "1: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: ENA1_A) -> Self { - variant as u8 != 0 - } -} -impl ENA1_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> ENA1_A { - match self.bits { - false => ENA1_A::DISABLED, - true => ENA1_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == ENA1_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == ENA1_A::ENABLED - } -} -#[doc = "Field `ENA1` writer - Enable or disable device address matching using device address 1"] -pub type ENA1_W<'a, const O: u8> = crate::BitWriter<'a, u32, DACNF_SPEC, ENA1_A, O>; -impl<'a, const O: u8> ENA1_W<'a, O> { - #[doc = "Disabled"] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(ENA1_A::DISABLED) - } - #[doc = "Enabled"] - #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(ENA1_A::ENABLED) - } -} -#[doc = "Field `ENA2` reader - Enable or disable device address matching using device address 2"] -pub type ENA2_R = crate::BitReader; -#[doc = "Enable or disable device address matching using device address 2\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum ENA2_A { - #[doc = "0: Disabled"] - DISABLED = 0, - #[doc = "1: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: ENA2_A) -> Self { - variant as u8 != 0 - } -} -impl ENA2_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> ENA2_A { - match self.bits { - false => ENA2_A::DISABLED, - true => ENA2_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == ENA2_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == ENA2_A::ENABLED - } -} -#[doc = "Field `ENA2` writer - Enable or disable device address matching using device address 2"] -pub type ENA2_W<'a, const O: u8> = crate::BitWriter<'a, u32, DACNF_SPEC, ENA2_A, O>; -impl<'a, const O: u8> ENA2_W<'a, O> { - #[doc = "Disabled"] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(ENA2_A::DISABLED) - } - #[doc = "Enabled"] - #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(ENA2_A::ENABLED) - } -} -#[doc = "Field `ENA3` reader - Enable or disable device address matching using device address 3"] -pub type ENA3_R = crate::BitReader; -#[doc = "Enable or disable device address matching using device address 3\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum ENA3_A { - #[doc = "0: Disabled"] - DISABLED = 0, - #[doc = "1: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: ENA3_A) -> Self { - variant as u8 != 0 - } -} -impl ENA3_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> ENA3_A { - match self.bits { - false => ENA3_A::DISABLED, - true => ENA3_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == ENA3_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == ENA3_A::ENABLED - } -} -#[doc = "Field `ENA3` writer - Enable or disable device address matching using device address 3"] -pub type ENA3_W<'a, const O: u8> = crate::BitWriter<'a, u32, DACNF_SPEC, ENA3_A, O>; -impl<'a, const O: u8> ENA3_W<'a, O> { - #[doc = "Disabled"] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(ENA3_A::DISABLED) - } - #[doc = "Enabled"] - #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(ENA3_A::ENABLED) - } -} -#[doc = "Field `ENA4` reader - Enable or disable device address matching using device address 4"] -pub type ENA4_R = crate::BitReader; -#[doc = "Enable or disable device address matching using device address 4\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum ENA4_A { - #[doc = "0: Disabled"] - DISABLED = 0, - #[doc = "1: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: ENA4_A) -> Self { - variant as u8 != 0 - } -} -impl ENA4_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> ENA4_A { - match self.bits { - false => ENA4_A::DISABLED, - true => ENA4_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == ENA4_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == ENA4_A::ENABLED - } -} -#[doc = "Field `ENA4` writer - Enable or disable device address matching using device address 4"] -pub type ENA4_W<'a, const O: u8> = crate::BitWriter<'a, u32, DACNF_SPEC, ENA4_A, O>; -impl<'a, const O: u8> ENA4_W<'a, O> { - #[doc = "Disabled"] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(ENA4_A::DISABLED) - } - #[doc = "Enabled"] - #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(ENA4_A::ENABLED) - } -} -#[doc = "Field `ENA5` reader - Enable or disable device address matching using device address 5"] -pub type ENA5_R = crate::BitReader; -#[doc = "Enable or disable device address matching using device address 5\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum ENA5_A { - #[doc = "0: Disabled"] - DISABLED = 0, - #[doc = "1: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: ENA5_A) -> Self { - variant as u8 != 0 - } -} -impl ENA5_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> ENA5_A { - match self.bits { - false => ENA5_A::DISABLED, - true => ENA5_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == ENA5_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == ENA5_A::ENABLED - } -} -#[doc = "Field `ENA5` writer - Enable or disable device address matching using device address 5"] -pub type ENA5_W<'a, const O: u8> = crate::BitWriter<'a, u32, DACNF_SPEC, ENA5_A, O>; -impl<'a, const O: u8> ENA5_W<'a, O> { - #[doc = "Disabled"] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(ENA5_A::DISABLED) - } - #[doc = "Enabled"] - #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(ENA5_A::ENABLED) - } -} -#[doc = "Field `ENA6` reader - Enable or disable device address matching using device address 6"] -pub type ENA6_R = crate::BitReader; -#[doc = "Enable or disable device address matching using device address 6\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum ENA6_A { - #[doc = "0: Disabled"] - DISABLED = 0, - #[doc = "1: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: ENA6_A) -> Self { - variant as u8 != 0 - } -} -impl ENA6_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> ENA6_A { - match self.bits { - false => ENA6_A::DISABLED, - true => ENA6_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == ENA6_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == ENA6_A::ENABLED - } -} -#[doc = "Field `ENA6` writer - Enable or disable device address matching using device address 6"] -pub type ENA6_W<'a, const O: u8> = crate::BitWriter<'a, u32, DACNF_SPEC, ENA6_A, O>; -impl<'a, const O: u8> ENA6_W<'a, O> { - #[doc = "Disabled"] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(ENA6_A::DISABLED) - } - #[doc = "Enabled"] - #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(ENA6_A::ENABLED) - } -} -#[doc = "Field `ENA7` reader - Enable or disable device address matching using device address 7"] -pub type ENA7_R = crate::BitReader; -#[doc = "Enable or disable device address matching using device address 7\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum ENA7_A { - #[doc = "0: Disabled"] - DISABLED = 0, - #[doc = "1: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: ENA7_A) -> Self { - variant as u8 != 0 - } -} -impl ENA7_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> ENA7_A { - match self.bits { - false => ENA7_A::DISABLED, - true => ENA7_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == ENA7_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == ENA7_A::ENABLED - } -} -#[doc = "Field `ENA7` writer - Enable or disable device address matching using device address 7"] -pub type ENA7_W<'a, const O: u8> = crate::BitWriter<'a, u32, DACNF_SPEC, ENA7_A, O>; -impl<'a, const O: u8> ENA7_W<'a, O> { - #[doc = "Disabled"] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(ENA7_A::DISABLED) - } - #[doc = "Enabled"] - #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(ENA7_A::ENABLED) - } -} -#[doc = "Field `TXADD0` reader - TxAdd for device address 0"] -pub type TXADD0_R = crate::BitReader; -#[doc = "Field `TXADD0` writer - TxAdd for device address 0"] -pub type TXADD0_W<'a, const O: u8> = crate::BitWriter<'a, u32, DACNF_SPEC, bool, O>; -#[doc = "Field `TXADD1` reader - TxAdd for device address 1"] -pub type TXADD1_R = crate::BitReader; -#[doc = "Field `TXADD1` writer - TxAdd for device address 1"] -pub type TXADD1_W<'a, const O: u8> = crate::BitWriter<'a, u32, DACNF_SPEC, bool, O>; -#[doc = "Field `TXADD2` reader - TxAdd for device address 2"] -pub type TXADD2_R = crate::BitReader; -#[doc = "Field `TXADD2` writer - TxAdd for device address 2"] -pub type TXADD2_W<'a, const O: u8> = crate::BitWriter<'a, u32, DACNF_SPEC, bool, O>; -#[doc = "Field `TXADD3` reader - TxAdd for device address 3"] -pub type TXADD3_R = crate::BitReader; -#[doc = "Field `TXADD3` writer - TxAdd for device address 3"] -pub type TXADD3_W<'a, const O: u8> = crate::BitWriter<'a, u32, DACNF_SPEC, bool, O>; -#[doc = "Field `TXADD4` reader - TxAdd for device address 4"] -pub type TXADD4_R = crate::BitReader; -#[doc = "Field `TXADD4` writer - TxAdd for device address 4"] -pub type TXADD4_W<'a, const O: u8> = crate::BitWriter<'a, u32, DACNF_SPEC, bool, O>; -#[doc = "Field `TXADD5` reader - TxAdd for device address 5"] -pub type TXADD5_R = crate::BitReader; -#[doc = "Field `TXADD5` writer - TxAdd for device address 5"] -pub type TXADD5_W<'a, const O: u8> = crate::BitWriter<'a, u32, DACNF_SPEC, bool, O>; -#[doc = "Field `TXADD6` reader - TxAdd for device address 6"] -pub type TXADD6_R = crate::BitReader; -#[doc = "Field `TXADD6` writer - TxAdd for device address 6"] -pub type TXADD6_W<'a, const O: u8> = crate::BitWriter<'a, u32, DACNF_SPEC, bool, O>; -#[doc = "Field `TXADD7` reader - TxAdd for device address 7"] -pub type TXADD7_R = crate::BitReader; -#[doc = "Field `TXADD7` writer - TxAdd for device address 7"] -pub type TXADD7_W<'a, const O: u8> = crate::BitWriter<'a, u32, DACNF_SPEC, bool, O>; -impl R { - #[doc = "Bit 0 - Enable or disable device address matching using device address 0"] - #[inline(always)] - pub fn ena0(&self) -> ENA0_R { - ENA0_R::new((self.bits & 1) != 0) - } - #[doc = "Bit 1 - Enable or disable device address matching using device address 1"] - #[inline(always)] - pub fn ena1(&self) -> ENA1_R { - ENA1_R::new(((self.bits >> 1) & 1) != 0) - } - #[doc = "Bit 2 - Enable or disable device address matching using device address 2"] - #[inline(always)] - pub fn ena2(&self) -> ENA2_R { - ENA2_R::new(((self.bits >> 2) & 1) != 0) - } - #[doc = "Bit 3 - Enable or disable device address matching using device address 3"] - #[inline(always)] - pub fn ena3(&self) -> ENA3_R { - ENA3_R::new(((self.bits >> 3) & 1) != 0) - } - #[doc = "Bit 4 - Enable or disable device address matching using device address 4"] - #[inline(always)] - pub fn ena4(&self) -> ENA4_R { - ENA4_R::new(((self.bits >> 4) & 1) != 0) - } - #[doc = "Bit 5 - Enable or disable device address matching using device address 5"] - #[inline(always)] - pub fn ena5(&self) -> ENA5_R { - ENA5_R::new(((self.bits >> 5) & 1) != 0) - } - #[doc = "Bit 6 - Enable or disable device address matching using device address 6"] - #[inline(always)] - pub fn ena6(&self) -> ENA6_R { - ENA6_R::new(((self.bits >> 6) & 1) != 0) - } - #[doc = "Bit 7 - Enable or disable device address matching using device address 7"] - #[inline(always)] - pub fn ena7(&self) -> ENA7_R { - ENA7_R::new(((self.bits >> 7) & 1) != 0) - } - #[doc = "Bit 8 - TxAdd for device address 0"] - #[inline(always)] - pub fn txadd0(&self) -> TXADD0_R { - TXADD0_R::new(((self.bits >> 8) & 1) != 0) - } - #[doc = "Bit 9 - TxAdd for device address 1"] - #[inline(always)] - pub fn txadd1(&self) -> TXADD1_R { - TXADD1_R::new(((self.bits >> 9) & 1) != 0) - } - #[doc = "Bit 10 - TxAdd for device address 2"] - #[inline(always)] - pub fn txadd2(&self) -> TXADD2_R { - TXADD2_R::new(((self.bits >> 10) & 1) != 0) - } - #[doc = "Bit 11 - TxAdd for device address 3"] - #[inline(always)] - pub fn txadd3(&self) -> TXADD3_R { - TXADD3_R::new(((self.bits >> 11) & 1) != 0) - } - #[doc = "Bit 12 - TxAdd for device address 4"] - #[inline(always)] - pub fn txadd4(&self) -> TXADD4_R { - TXADD4_R::new(((self.bits >> 12) & 1) != 0) - } - #[doc = "Bit 13 - TxAdd for device address 5"] - #[inline(always)] - pub fn txadd5(&self) -> TXADD5_R { - TXADD5_R::new(((self.bits >> 13) & 1) != 0) - } - #[doc = "Bit 14 - TxAdd for device address 6"] - #[inline(always)] - pub fn txadd6(&self) -> TXADD6_R { - TXADD6_R::new(((self.bits >> 14) & 1) != 0) - } - #[doc = "Bit 15 - TxAdd for device address 7"] - #[inline(always)] - pub fn txadd7(&self) -> TXADD7_R { - TXADD7_R::new(((self.bits >> 15) & 1) != 0) - } -} -impl W { - #[doc = "Bit 0 - Enable or disable device address matching using device address 0"] - #[inline(always)] - #[must_use] - pub fn ena0(&mut self) -> ENA0_W<0> { - ENA0_W::new(self) - } - #[doc = "Bit 1 - Enable or disable device address matching using device address 1"] - #[inline(always)] - #[must_use] - pub fn ena1(&mut self) -> ENA1_W<1> { - ENA1_W::new(self) - } - #[doc = "Bit 2 - Enable or disable device address matching using device address 2"] - #[inline(always)] - #[must_use] - pub fn ena2(&mut self) -> ENA2_W<2> { - ENA2_W::new(self) - } - #[doc = "Bit 3 - Enable or disable device address matching using device address 3"] - #[inline(always)] - #[must_use] - pub fn ena3(&mut self) -> ENA3_W<3> { - ENA3_W::new(self) - } - #[doc = "Bit 4 - Enable or disable device address matching using device address 4"] - #[inline(always)] - #[must_use] - pub fn ena4(&mut self) -> ENA4_W<4> { - ENA4_W::new(self) - } - #[doc = "Bit 5 - Enable or disable device address matching using device address 5"] - #[inline(always)] - #[must_use] - pub fn ena5(&mut self) -> ENA5_W<5> { - ENA5_W::new(self) - } - #[doc = "Bit 6 - Enable or disable device address matching using device address 6"] - #[inline(always)] - #[must_use] - pub fn ena6(&mut self) -> ENA6_W<6> { - ENA6_W::new(self) - } - #[doc = "Bit 7 - Enable or disable device address matching using device address 7"] - #[inline(always)] - #[must_use] - pub fn ena7(&mut self) -> ENA7_W<7> { - ENA7_W::new(self) - } - #[doc = "Bit 8 - TxAdd for device address 0"] - #[inline(always)] - #[must_use] - pub fn txadd0(&mut self) -> TXADD0_W<8> { - TXADD0_W::new(self) - } - #[doc = "Bit 9 - TxAdd for device address 1"] - #[inline(always)] - #[must_use] - pub fn txadd1(&mut self) -> TXADD1_W<9> { - TXADD1_W::new(self) - } - #[doc = "Bit 10 - TxAdd for device address 2"] - #[inline(always)] - #[must_use] - pub fn txadd2(&mut self) -> TXADD2_W<10> { - TXADD2_W::new(self) - } - #[doc = "Bit 11 - TxAdd for device address 3"] - #[inline(always)] - #[must_use] - pub fn txadd3(&mut self) -> TXADD3_W<11> { - TXADD3_W::new(self) - } - #[doc = "Bit 12 - TxAdd for device address 4"] - #[inline(always)] - #[must_use] - pub fn txadd4(&mut self) -> TXADD4_W<12> { - TXADD4_W::new(self) - } - #[doc = "Bit 13 - TxAdd for device address 5"] - #[inline(always)] - #[must_use] - pub fn txadd5(&mut self) -> TXADD5_W<13> { - TXADD5_W::new(self) - } - #[doc = "Bit 14 - TxAdd for device address 6"] - #[inline(always)] - #[must_use] - pub fn txadd6(&mut self) -> TXADD6_W<14> { - TXADD6_W::new(self) - } - #[doc = "Bit 15 - TxAdd for device address 7"] - #[inline(always)] - #[must_use] - pub fn txadd7(&mut self) -> TXADD7_W<15> { - TXADD7_W::new(self) - } - #[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 = "Device address match configuration\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 [dacnf](index.html) module"] -pub struct DACNF_SPEC; -impl crate::RegisterSpec for DACNF_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [dacnf::R](R) reader structure"] -impl crate::Readable for DACNF_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [dacnf::W](W) writer structure"] -impl crate::Writable for DACNF_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets DACNF to value 0"] -impl crate::Resettable for DACNF_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/radio/dai.rs b/down-the-stack/dk_pac/src/radio/dai.rs deleted file mode 100644 index 6cdd197..0000000 --- a/down-the-stack/dk_pac/src/radio/dai.rs +++ /dev/null @@ -1,37 +0,0 @@ -#[doc = "Register `DAI` 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 = "Field `DAI` reader - Device address match index"] -pub type DAI_R = crate::FieldReader; -impl R { - #[doc = "Bits 0:2 - Device address match index"] - #[inline(always)] - pub fn dai(&self) -> DAI_R { - DAI_R::new((self.bits & 7) as u8) - } -} -#[doc = "Device address match index\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 [dai](index.html) module"] -pub struct DAI_SPEC; -impl crate::RegisterSpec for DAI_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [dai::R](R) reader structure"] -impl crate::Readable for DAI_SPEC { - type Reader = R; -} -#[doc = "`reset()` method sets DAI to value 0"] -impl crate::Resettable for DAI_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/radio/dap.rs b/down-the-stack/dk_pac/src/radio/dap.rs deleted file mode 100644 index f1e40a9..0000000 --- a/down-the-stack/dk_pac/src/radio/dap.rs +++ /dev/null @@ -1,81 +0,0 @@ -#[doc = "Register `DAP[%s]` 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 `DAP[%s]` 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 `DAP` reader - Device address prefix n"] -pub type DAP_R = crate::FieldReader; -#[doc = "Field `DAP` writer - Device address prefix n"] -pub type DAP_W<'a, const O: u8> = crate::FieldWriter<'a, u32, DAP_SPEC, u16, u16, 16, O>; -impl R { - #[doc = "Bits 0:15 - Device address prefix n"] - #[inline(always)] - pub fn dap(&self) -> DAP_R { - DAP_R::new((self.bits & 0xffff) as u16) - } -} -impl W { - #[doc = "Bits 0:15 - Device address prefix n"] - #[inline(always)] - #[must_use] - pub fn dap(&mut self) -> DAP_W<0> { - DAP_W::new(self) - } - #[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 = "Description collection: Device address prefix n\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 [dap](index.html) module"] -pub struct DAP_SPEC; -impl crate::RegisterSpec for DAP_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [dap::R](R) reader structure"] -impl crate::Readable for DAP_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [dap::W](W) writer structure"] -impl crate::Writable for DAP_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets DAP[%s] -to value 0"] -impl crate::Resettable for DAP_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/radio/datawhiteiv.rs b/down-the-stack/dk_pac/src/radio/datawhiteiv.rs deleted file mode 100644 index 0d572c1..0000000 --- a/down-the-stack/dk_pac/src/radio/datawhiteiv.rs +++ /dev/null @@ -1,81 +0,0 @@ -#[doc = "Register `DATAWHITEIV` 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 `DATAWHITEIV` 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 `DATAWHITEIV` reader - Data whitening initial value. Bit 6 is hard-wired to '1', writing '0' to it has no effect, and it will always be read back and used by the device as '1'."] -pub type DATAWHITEIV_R = crate::FieldReader; -#[doc = "Field `DATAWHITEIV` writer - Data whitening initial value. Bit 6 is hard-wired to '1', writing '0' to it has no effect, and it will always be read back and used by the device as '1'."] -pub type DATAWHITEIV_W<'a, const O: u8> = - crate::FieldWriter<'a, u32, DATAWHITEIV_SPEC, u8, u8, 7, O>; -impl R { - #[doc = "Bits 0:6 - Data whitening initial value. Bit 6 is hard-wired to '1', writing '0' to it has no effect, and it will always be read back and used by the device as '1'."] - #[inline(always)] - pub fn datawhiteiv(&self) -> DATAWHITEIV_R { - DATAWHITEIV_R::new((self.bits & 0x7f) as u8) - } -} -impl W { - #[doc = "Bits 0:6 - Data whitening initial value. Bit 6 is hard-wired to '1', writing '0' to it has no effect, and it will always be read back and used by the device as '1'."] - #[inline(always)] - #[must_use] - pub fn datawhiteiv(&mut self) -> DATAWHITEIV_W<0> { - DATAWHITEIV_W::new(self) - } - #[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 = "Data whitening initial value\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 [datawhiteiv](index.html) module"] -pub struct DATAWHITEIV_SPEC; -impl crate::RegisterSpec for DATAWHITEIV_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [datawhiteiv::R](R) reader structure"] -impl crate::Readable for DATAWHITEIV_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [datawhiteiv::W](W) writer structure"] -impl crate::Writable for DATAWHITEIV_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets DATAWHITEIV to value 0x40"] -impl crate::Resettable for DATAWHITEIV_SPEC { - const RESET_VALUE: Self::Ux = 0x40; -} diff --git a/down-the-stack/dk_pac/src/radio/events_address.rs b/down-the-stack/dk_pac/src/radio/events_address.rs deleted file mode 100644 index 6f0e928..0000000 --- a/down-the-stack/dk_pac/src/radio/events_address.rs +++ /dev/null @@ -1,127 +0,0 @@ -#[doc = "Register `EVENTS_ADDRESS` 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 `EVENTS_ADDRESS` 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 `EVENTS_ADDRESS` reader - Address sent or received"] -pub type EVENTS_ADDRESS_R = crate::BitReader; -#[doc = "Address sent or received\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum EVENTS_ADDRESS_A { - #[doc = "0: Event not generated"] - NOT_GENERATED = 0, - #[doc = "1: Event generated"] - GENERATED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: EVENTS_ADDRESS_A) -> Self { - variant as u8 != 0 - } -} -impl EVENTS_ADDRESS_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> EVENTS_ADDRESS_A { - match self.bits { - false => EVENTS_ADDRESS_A::NOT_GENERATED, - true => EVENTS_ADDRESS_A::GENERATED, - } - } - #[doc = "Checks if the value of the field is `NOT_GENERATED`"] - #[inline(always)] - pub fn is_not_generated(&self) -> bool { - *self == EVENTS_ADDRESS_A::NOT_GENERATED - } - #[doc = "Checks if the value of the field is `GENERATED`"] - #[inline(always)] - pub fn is_generated(&self) -> bool { - *self == EVENTS_ADDRESS_A::GENERATED - } -} -#[doc = "Field `EVENTS_ADDRESS` writer - Address sent or received"] -pub type EVENTS_ADDRESS_W<'a, const O: u8> = - crate::BitWriter<'a, u32, EVENTS_ADDRESS_SPEC, EVENTS_ADDRESS_A, O>; -impl<'a, const O: u8> EVENTS_ADDRESS_W<'a, O> { - #[doc = "Event not generated"] - #[inline(always)] - pub fn not_generated(self) -> &'a mut W { - self.variant(EVENTS_ADDRESS_A::NOT_GENERATED) - } - #[doc = "Event generated"] - #[inline(always)] - pub fn generated(self) -> &'a mut W { - self.variant(EVENTS_ADDRESS_A::GENERATED) - } -} -impl R { - #[doc = "Bit 0 - Address sent or received"] - #[inline(always)] - pub fn events_address(&self) -> EVENTS_ADDRESS_R { - EVENTS_ADDRESS_R::new((self.bits & 1) != 0) - } -} -impl W { - #[doc = "Bit 0 - Address sent or received"] - #[inline(always)] - #[must_use] - pub fn events_address(&mut self) -> EVENTS_ADDRESS_W<0> { - EVENTS_ADDRESS_W::new(self) - } - #[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 = "Address sent or received\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 [events_address](index.html) module"] -pub struct EVENTS_ADDRESS_SPEC; -impl crate::RegisterSpec for EVENTS_ADDRESS_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [events_address::R](R) reader structure"] -impl crate::Readable for EVENTS_ADDRESS_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [events_address::W](W) writer structure"] -impl crate::Writable for EVENTS_ADDRESS_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets EVENTS_ADDRESS to value 0"] -impl crate::Resettable for EVENTS_ADDRESS_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/radio/events_bcmatch.rs b/down-the-stack/dk_pac/src/radio/events_bcmatch.rs deleted file mode 100644 index 4d459a1..0000000 --- a/down-the-stack/dk_pac/src/radio/events_bcmatch.rs +++ /dev/null @@ -1,127 +0,0 @@ -#[doc = "Register `EVENTS_BCMATCH` 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 `EVENTS_BCMATCH` 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 `EVENTS_BCMATCH` reader - Bit counter reached bit count value."] -pub type EVENTS_BCMATCH_R = crate::BitReader; -#[doc = "Bit counter reached bit count value.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum EVENTS_BCMATCH_A { - #[doc = "0: Event not generated"] - NOT_GENERATED = 0, - #[doc = "1: Event generated"] - GENERATED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: EVENTS_BCMATCH_A) -> Self { - variant as u8 != 0 - } -} -impl EVENTS_BCMATCH_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> EVENTS_BCMATCH_A { - match self.bits { - false => EVENTS_BCMATCH_A::NOT_GENERATED, - true => EVENTS_BCMATCH_A::GENERATED, - } - } - #[doc = "Checks if the value of the field is `NOT_GENERATED`"] - #[inline(always)] - pub fn is_not_generated(&self) -> bool { - *self == EVENTS_BCMATCH_A::NOT_GENERATED - } - #[doc = "Checks if the value of the field is `GENERATED`"] - #[inline(always)] - pub fn is_generated(&self) -> bool { - *self == EVENTS_BCMATCH_A::GENERATED - } -} -#[doc = "Field `EVENTS_BCMATCH` writer - Bit counter reached bit count value."] -pub type EVENTS_BCMATCH_W<'a, const O: u8> = - crate::BitWriter<'a, u32, EVENTS_BCMATCH_SPEC, EVENTS_BCMATCH_A, O>; -impl<'a, const O: u8> EVENTS_BCMATCH_W<'a, O> { - #[doc = "Event not generated"] - #[inline(always)] - pub fn not_generated(self) -> &'a mut W { - self.variant(EVENTS_BCMATCH_A::NOT_GENERATED) - } - #[doc = "Event generated"] - #[inline(always)] - pub fn generated(self) -> &'a mut W { - self.variant(EVENTS_BCMATCH_A::GENERATED) - } -} -impl R { - #[doc = "Bit 0 - Bit counter reached bit count value."] - #[inline(always)] - pub fn events_bcmatch(&self) -> EVENTS_BCMATCH_R { - EVENTS_BCMATCH_R::new((self.bits & 1) != 0) - } -} -impl W { - #[doc = "Bit 0 - Bit counter reached bit count value."] - #[inline(always)] - #[must_use] - pub fn events_bcmatch(&mut self) -> EVENTS_BCMATCH_W<0> { - EVENTS_BCMATCH_W::new(self) - } - #[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 = "Bit counter reached bit count value.\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 [events_bcmatch](index.html) module"] -pub struct EVENTS_BCMATCH_SPEC; -impl crate::RegisterSpec for EVENTS_BCMATCH_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [events_bcmatch::R](R) reader structure"] -impl crate::Readable for EVENTS_BCMATCH_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [events_bcmatch::W](W) writer structure"] -impl crate::Writable for EVENTS_BCMATCH_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets EVENTS_BCMATCH to value 0"] -impl crate::Resettable for EVENTS_BCMATCH_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/radio/events_crcerror.rs b/down-the-stack/dk_pac/src/radio/events_crcerror.rs deleted file mode 100644 index c6f3da0..0000000 --- a/down-the-stack/dk_pac/src/radio/events_crcerror.rs +++ /dev/null @@ -1,127 +0,0 @@ -#[doc = "Register `EVENTS_CRCERROR` 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 `EVENTS_CRCERROR` 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 `EVENTS_CRCERROR` reader - Packet received with CRC error"] -pub type EVENTS_CRCERROR_R = crate::BitReader; -#[doc = "Packet received with CRC error\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum EVENTS_CRCERROR_A { - #[doc = "0: Event not generated"] - NOT_GENERATED = 0, - #[doc = "1: Event generated"] - GENERATED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: EVENTS_CRCERROR_A) -> Self { - variant as u8 != 0 - } -} -impl EVENTS_CRCERROR_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> EVENTS_CRCERROR_A { - match self.bits { - false => EVENTS_CRCERROR_A::NOT_GENERATED, - true => EVENTS_CRCERROR_A::GENERATED, - } - } - #[doc = "Checks if the value of the field is `NOT_GENERATED`"] - #[inline(always)] - pub fn is_not_generated(&self) -> bool { - *self == EVENTS_CRCERROR_A::NOT_GENERATED - } - #[doc = "Checks if the value of the field is `GENERATED`"] - #[inline(always)] - pub fn is_generated(&self) -> bool { - *self == EVENTS_CRCERROR_A::GENERATED - } -} -#[doc = "Field `EVENTS_CRCERROR` writer - Packet received with CRC error"] -pub type EVENTS_CRCERROR_W<'a, const O: u8> = - crate::BitWriter<'a, u32, EVENTS_CRCERROR_SPEC, EVENTS_CRCERROR_A, O>; -impl<'a, const O: u8> EVENTS_CRCERROR_W<'a, O> { - #[doc = "Event not generated"] - #[inline(always)] - pub fn not_generated(self) -> &'a mut W { - self.variant(EVENTS_CRCERROR_A::NOT_GENERATED) - } - #[doc = "Event generated"] - #[inline(always)] - pub fn generated(self) -> &'a mut W { - self.variant(EVENTS_CRCERROR_A::GENERATED) - } -} -impl R { - #[doc = "Bit 0 - Packet received with CRC error"] - #[inline(always)] - pub fn events_crcerror(&self) -> EVENTS_CRCERROR_R { - EVENTS_CRCERROR_R::new((self.bits & 1) != 0) - } -} -impl W { - #[doc = "Bit 0 - Packet received with CRC error"] - #[inline(always)] - #[must_use] - pub fn events_crcerror(&mut self) -> EVENTS_CRCERROR_W<0> { - EVENTS_CRCERROR_W::new(self) - } - #[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 = "Packet received with CRC error\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 [events_crcerror](index.html) module"] -pub struct EVENTS_CRCERROR_SPEC; -impl crate::RegisterSpec for EVENTS_CRCERROR_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [events_crcerror::R](R) reader structure"] -impl crate::Readable for EVENTS_CRCERROR_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [events_crcerror::W](W) writer structure"] -impl crate::Writable for EVENTS_CRCERROR_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets EVENTS_CRCERROR to value 0"] -impl crate::Resettable for EVENTS_CRCERROR_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/radio/events_crcok.rs b/down-the-stack/dk_pac/src/radio/events_crcok.rs deleted file mode 100644 index 964d355..0000000 --- a/down-the-stack/dk_pac/src/radio/events_crcok.rs +++ /dev/null @@ -1,127 +0,0 @@ -#[doc = "Register `EVENTS_CRCOK` 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 `EVENTS_CRCOK` 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 `EVENTS_CRCOK` reader - Packet received with CRC ok"] -pub type EVENTS_CRCOK_R = crate::BitReader; -#[doc = "Packet received with CRC ok\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum EVENTS_CRCOK_A { - #[doc = "0: Event not generated"] - NOT_GENERATED = 0, - #[doc = "1: Event generated"] - GENERATED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: EVENTS_CRCOK_A) -> Self { - variant as u8 != 0 - } -} -impl EVENTS_CRCOK_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> EVENTS_CRCOK_A { - match self.bits { - false => EVENTS_CRCOK_A::NOT_GENERATED, - true => EVENTS_CRCOK_A::GENERATED, - } - } - #[doc = "Checks if the value of the field is `NOT_GENERATED`"] - #[inline(always)] - pub fn is_not_generated(&self) -> bool { - *self == EVENTS_CRCOK_A::NOT_GENERATED - } - #[doc = "Checks if the value of the field is `GENERATED`"] - #[inline(always)] - pub fn is_generated(&self) -> bool { - *self == EVENTS_CRCOK_A::GENERATED - } -} -#[doc = "Field `EVENTS_CRCOK` writer - Packet received with CRC ok"] -pub type EVENTS_CRCOK_W<'a, const O: u8> = - crate::BitWriter<'a, u32, EVENTS_CRCOK_SPEC, EVENTS_CRCOK_A, O>; -impl<'a, const O: u8> EVENTS_CRCOK_W<'a, O> { - #[doc = "Event not generated"] - #[inline(always)] - pub fn not_generated(self) -> &'a mut W { - self.variant(EVENTS_CRCOK_A::NOT_GENERATED) - } - #[doc = "Event generated"] - #[inline(always)] - pub fn generated(self) -> &'a mut W { - self.variant(EVENTS_CRCOK_A::GENERATED) - } -} -impl R { - #[doc = "Bit 0 - Packet received with CRC ok"] - #[inline(always)] - pub fn events_crcok(&self) -> EVENTS_CRCOK_R { - EVENTS_CRCOK_R::new((self.bits & 1) != 0) - } -} -impl W { - #[doc = "Bit 0 - Packet received with CRC ok"] - #[inline(always)] - #[must_use] - pub fn events_crcok(&mut self) -> EVENTS_CRCOK_W<0> { - EVENTS_CRCOK_W::new(self) - } - #[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 = "Packet received with CRC ok\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 [events_crcok](index.html) module"] -pub struct EVENTS_CRCOK_SPEC; -impl crate::RegisterSpec for EVENTS_CRCOK_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [events_crcok::R](R) reader structure"] -impl crate::Readable for EVENTS_CRCOK_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [events_crcok::W](W) writer structure"] -impl crate::Writable for EVENTS_CRCOK_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets EVENTS_CRCOK to value 0"] -impl crate::Resettable for EVENTS_CRCOK_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/radio/events_devmatch.rs b/down-the-stack/dk_pac/src/radio/events_devmatch.rs deleted file mode 100644 index 79669e6..0000000 --- a/down-the-stack/dk_pac/src/radio/events_devmatch.rs +++ /dev/null @@ -1,127 +0,0 @@ -#[doc = "Register `EVENTS_DEVMATCH` 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 `EVENTS_DEVMATCH` 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 `EVENTS_DEVMATCH` reader - A device address match occurred on the last received packet"] -pub type EVENTS_DEVMATCH_R = crate::BitReader; -#[doc = "A device address match occurred on the last received packet\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum EVENTS_DEVMATCH_A { - #[doc = "0: Event not generated"] - NOT_GENERATED = 0, - #[doc = "1: Event generated"] - GENERATED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: EVENTS_DEVMATCH_A) -> Self { - variant as u8 != 0 - } -} -impl EVENTS_DEVMATCH_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> EVENTS_DEVMATCH_A { - match self.bits { - false => EVENTS_DEVMATCH_A::NOT_GENERATED, - true => EVENTS_DEVMATCH_A::GENERATED, - } - } - #[doc = "Checks if the value of the field is `NOT_GENERATED`"] - #[inline(always)] - pub fn is_not_generated(&self) -> bool { - *self == EVENTS_DEVMATCH_A::NOT_GENERATED - } - #[doc = "Checks if the value of the field is `GENERATED`"] - #[inline(always)] - pub fn is_generated(&self) -> bool { - *self == EVENTS_DEVMATCH_A::GENERATED - } -} -#[doc = "Field `EVENTS_DEVMATCH` writer - A device address match occurred on the last received packet"] -pub type EVENTS_DEVMATCH_W<'a, const O: u8> = - crate::BitWriter<'a, u32, EVENTS_DEVMATCH_SPEC, EVENTS_DEVMATCH_A, O>; -impl<'a, const O: u8> EVENTS_DEVMATCH_W<'a, O> { - #[doc = "Event not generated"] - #[inline(always)] - pub fn not_generated(self) -> &'a mut W { - self.variant(EVENTS_DEVMATCH_A::NOT_GENERATED) - } - #[doc = "Event generated"] - #[inline(always)] - pub fn generated(self) -> &'a mut W { - self.variant(EVENTS_DEVMATCH_A::GENERATED) - } -} -impl R { - #[doc = "Bit 0 - A device address match occurred on the last received packet"] - #[inline(always)] - pub fn events_devmatch(&self) -> EVENTS_DEVMATCH_R { - EVENTS_DEVMATCH_R::new((self.bits & 1) != 0) - } -} -impl W { - #[doc = "Bit 0 - A device address match occurred on the last received packet"] - #[inline(always)] - #[must_use] - pub fn events_devmatch(&mut self) -> EVENTS_DEVMATCH_W<0> { - EVENTS_DEVMATCH_W::new(self) - } - #[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 = "A device address match occurred on the last received packet\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 [events_devmatch](index.html) module"] -pub struct EVENTS_DEVMATCH_SPEC; -impl crate::RegisterSpec for EVENTS_DEVMATCH_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [events_devmatch::R](R) reader structure"] -impl crate::Readable for EVENTS_DEVMATCH_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [events_devmatch::W](W) writer structure"] -impl crate::Writable for EVENTS_DEVMATCH_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets EVENTS_DEVMATCH to value 0"] -impl crate::Resettable for EVENTS_DEVMATCH_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/radio/events_devmiss.rs b/down-the-stack/dk_pac/src/radio/events_devmiss.rs deleted file mode 100644 index 6d3a774..0000000 --- a/down-the-stack/dk_pac/src/radio/events_devmiss.rs +++ /dev/null @@ -1,127 +0,0 @@ -#[doc = "Register `EVENTS_DEVMISS` 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 `EVENTS_DEVMISS` 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 `EVENTS_DEVMISS` reader - No device address match occurred on the last received packet"] -pub type EVENTS_DEVMISS_R = crate::BitReader; -#[doc = "No device address match occurred on the last received packet\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum EVENTS_DEVMISS_A { - #[doc = "0: Event not generated"] - NOT_GENERATED = 0, - #[doc = "1: Event generated"] - GENERATED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: EVENTS_DEVMISS_A) -> Self { - variant as u8 != 0 - } -} -impl EVENTS_DEVMISS_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> EVENTS_DEVMISS_A { - match self.bits { - false => EVENTS_DEVMISS_A::NOT_GENERATED, - true => EVENTS_DEVMISS_A::GENERATED, - } - } - #[doc = "Checks if the value of the field is `NOT_GENERATED`"] - #[inline(always)] - pub fn is_not_generated(&self) -> bool { - *self == EVENTS_DEVMISS_A::NOT_GENERATED - } - #[doc = "Checks if the value of the field is `GENERATED`"] - #[inline(always)] - pub fn is_generated(&self) -> bool { - *self == EVENTS_DEVMISS_A::GENERATED - } -} -#[doc = "Field `EVENTS_DEVMISS` writer - No device address match occurred on the last received packet"] -pub type EVENTS_DEVMISS_W<'a, const O: u8> = - crate::BitWriter<'a, u32, EVENTS_DEVMISS_SPEC, EVENTS_DEVMISS_A, O>; -impl<'a, const O: u8> EVENTS_DEVMISS_W<'a, O> { - #[doc = "Event not generated"] - #[inline(always)] - pub fn not_generated(self) -> &'a mut W { - self.variant(EVENTS_DEVMISS_A::NOT_GENERATED) - } - #[doc = "Event generated"] - #[inline(always)] - pub fn generated(self) -> &'a mut W { - self.variant(EVENTS_DEVMISS_A::GENERATED) - } -} -impl R { - #[doc = "Bit 0 - No device address match occurred on the last received packet"] - #[inline(always)] - pub fn events_devmiss(&self) -> EVENTS_DEVMISS_R { - EVENTS_DEVMISS_R::new((self.bits & 1) != 0) - } -} -impl W { - #[doc = "Bit 0 - No device address match occurred on the last received packet"] - #[inline(always)] - #[must_use] - pub fn events_devmiss(&mut self) -> EVENTS_DEVMISS_W<0> { - EVENTS_DEVMISS_W::new(self) - } - #[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 = "No device address match occurred on the last received packet\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 [events_devmiss](index.html) module"] -pub struct EVENTS_DEVMISS_SPEC; -impl crate::RegisterSpec for EVENTS_DEVMISS_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [events_devmiss::R](R) reader structure"] -impl crate::Readable for EVENTS_DEVMISS_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [events_devmiss::W](W) writer structure"] -impl crate::Writable for EVENTS_DEVMISS_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets EVENTS_DEVMISS to value 0"] -impl crate::Resettable for EVENTS_DEVMISS_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/radio/events_disabled.rs b/down-the-stack/dk_pac/src/radio/events_disabled.rs deleted file mode 100644 index 277376d..0000000 --- a/down-the-stack/dk_pac/src/radio/events_disabled.rs +++ /dev/null @@ -1,127 +0,0 @@ -#[doc = "Register `EVENTS_DISABLED` 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 `EVENTS_DISABLED` 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 `EVENTS_DISABLED` reader - RADIO has been disabled"] -pub type EVENTS_DISABLED_R = crate::BitReader; -#[doc = "RADIO has been disabled\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum EVENTS_DISABLED_A { - #[doc = "0: Event not generated"] - NOT_GENERATED = 0, - #[doc = "1: Event generated"] - GENERATED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: EVENTS_DISABLED_A) -> Self { - variant as u8 != 0 - } -} -impl EVENTS_DISABLED_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> EVENTS_DISABLED_A { - match self.bits { - false => EVENTS_DISABLED_A::NOT_GENERATED, - true => EVENTS_DISABLED_A::GENERATED, - } - } - #[doc = "Checks if the value of the field is `NOT_GENERATED`"] - #[inline(always)] - pub fn is_not_generated(&self) -> bool { - *self == EVENTS_DISABLED_A::NOT_GENERATED - } - #[doc = "Checks if the value of the field is `GENERATED`"] - #[inline(always)] - pub fn is_generated(&self) -> bool { - *self == EVENTS_DISABLED_A::GENERATED - } -} -#[doc = "Field `EVENTS_DISABLED` writer - RADIO has been disabled"] -pub type EVENTS_DISABLED_W<'a, const O: u8> = - crate::BitWriter<'a, u32, EVENTS_DISABLED_SPEC, EVENTS_DISABLED_A, O>; -impl<'a, const O: u8> EVENTS_DISABLED_W<'a, O> { - #[doc = "Event not generated"] - #[inline(always)] - pub fn not_generated(self) -> &'a mut W { - self.variant(EVENTS_DISABLED_A::NOT_GENERATED) - } - #[doc = "Event generated"] - #[inline(always)] - pub fn generated(self) -> &'a mut W { - self.variant(EVENTS_DISABLED_A::GENERATED) - } -} -impl R { - #[doc = "Bit 0 - RADIO has been disabled"] - #[inline(always)] - pub fn events_disabled(&self) -> EVENTS_DISABLED_R { - EVENTS_DISABLED_R::new((self.bits & 1) != 0) - } -} -impl W { - #[doc = "Bit 0 - RADIO has been disabled"] - #[inline(always)] - #[must_use] - pub fn events_disabled(&mut self) -> EVENTS_DISABLED_W<0> { - EVENTS_DISABLED_W::new(self) - } - #[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 = "RADIO has been disabled\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 [events_disabled](index.html) module"] -pub struct EVENTS_DISABLED_SPEC; -impl crate::RegisterSpec for EVENTS_DISABLED_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [events_disabled::R](R) reader structure"] -impl crate::Readable for EVENTS_DISABLED_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [events_disabled::W](W) writer structure"] -impl crate::Writable for EVENTS_DISABLED_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets EVENTS_DISABLED to value 0"] -impl crate::Resettable for EVENTS_DISABLED_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/radio/events_end.rs b/down-the-stack/dk_pac/src/radio/events_end.rs deleted file mode 100644 index 5a3a924..0000000 --- a/down-the-stack/dk_pac/src/radio/events_end.rs +++ /dev/null @@ -1,127 +0,0 @@ -#[doc = "Register `EVENTS_END` 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 `EVENTS_END` 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 `EVENTS_END` reader - Packet sent or received"] -pub type EVENTS_END_R = crate::BitReader; -#[doc = "Packet sent or received\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum EVENTS_END_A { - #[doc = "0: Event not generated"] - NOT_GENERATED = 0, - #[doc = "1: Event generated"] - GENERATED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: EVENTS_END_A) -> Self { - variant as u8 != 0 - } -} -impl EVENTS_END_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> EVENTS_END_A { - match self.bits { - false => EVENTS_END_A::NOT_GENERATED, - true => EVENTS_END_A::GENERATED, - } - } - #[doc = "Checks if the value of the field is `NOT_GENERATED`"] - #[inline(always)] - pub fn is_not_generated(&self) -> bool { - *self == EVENTS_END_A::NOT_GENERATED - } - #[doc = "Checks if the value of the field is `GENERATED`"] - #[inline(always)] - pub fn is_generated(&self) -> bool { - *self == EVENTS_END_A::GENERATED - } -} -#[doc = "Field `EVENTS_END` writer - Packet sent or received"] -pub type EVENTS_END_W<'a, const O: u8> = - crate::BitWriter<'a, u32, EVENTS_END_SPEC, EVENTS_END_A, O>; -impl<'a, const O: u8> EVENTS_END_W<'a, O> { - #[doc = "Event not generated"] - #[inline(always)] - pub fn not_generated(self) -> &'a mut W { - self.variant(EVENTS_END_A::NOT_GENERATED) - } - #[doc = "Event generated"] - #[inline(always)] - pub fn generated(self) -> &'a mut W { - self.variant(EVENTS_END_A::GENERATED) - } -} -impl R { - #[doc = "Bit 0 - Packet sent or received"] - #[inline(always)] - pub fn events_end(&self) -> EVENTS_END_R { - EVENTS_END_R::new((self.bits & 1) != 0) - } -} -impl W { - #[doc = "Bit 0 - Packet sent or received"] - #[inline(always)] - #[must_use] - pub fn events_end(&mut self) -> EVENTS_END_W<0> { - EVENTS_END_W::new(self) - } - #[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 = "Packet sent or received\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 [events_end](index.html) module"] -pub struct EVENTS_END_SPEC; -impl crate::RegisterSpec for EVENTS_END_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [events_end::R](R) reader structure"] -impl crate::Readable for EVENTS_END_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [events_end::W](W) writer structure"] -impl crate::Writable for EVENTS_END_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets EVENTS_END to value 0"] -impl crate::Resettable for EVENTS_END_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/radio/events_payload.rs b/down-the-stack/dk_pac/src/radio/events_payload.rs deleted file mode 100644 index a9055e5..0000000 --- a/down-the-stack/dk_pac/src/radio/events_payload.rs +++ /dev/null @@ -1,127 +0,0 @@ -#[doc = "Register `EVENTS_PAYLOAD` 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 `EVENTS_PAYLOAD` 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 `EVENTS_PAYLOAD` reader - Packet payload sent or received"] -pub type EVENTS_PAYLOAD_R = crate::BitReader; -#[doc = "Packet payload sent or received\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum EVENTS_PAYLOAD_A { - #[doc = "0: Event not generated"] - NOT_GENERATED = 0, - #[doc = "1: Event generated"] - GENERATED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: EVENTS_PAYLOAD_A) -> Self { - variant as u8 != 0 - } -} -impl EVENTS_PAYLOAD_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> EVENTS_PAYLOAD_A { - match self.bits { - false => EVENTS_PAYLOAD_A::NOT_GENERATED, - true => EVENTS_PAYLOAD_A::GENERATED, - } - } - #[doc = "Checks if the value of the field is `NOT_GENERATED`"] - #[inline(always)] - pub fn is_not_generated(&self) -> bool { - *self == EVENTS_PAYLOAD_A::NOT_GENERATED - } - #[doc = "Checks if the value of the field is `GENERATED`"] - #[inline(always)] - pub fn is_generated(&self) -> bool { - *self == EVENTS_PAYLOAD_A::GENERATED - } -} -#[doc = "Field `EVENTS_PAYLOAD` writer - Packet payload sent or received"] -pub type EVENTS_PAYLOAD_W<'a, const O: u8> = - crate::BitWriter<'a, u32, EVENTS_PAYLOAD_SPEC, EVENTS_PAYLOAD_A, O>; -impl<'a, const O: u8> EVENTS_PAYLOAD_W<'a, O> { - #[doc = "Event not generated"] - #[inline(always)] - pub fn not_generated(self) -> &'a mut W { - self.variant(EVENTS_PAYLOAD_A::NOT_GENERATED) - } - #[doc = "Event generated"] - #[inline(always)] - pub fn generated(self) -> &'a mut W { - self.variant(EVENTS_PAYLOAD_A::GENERATED) - } -} -impl R { - #[doc = "Bit 0 - Packet payload sent or received"] - #[inline(always)] - pub fn events_payload(&self) -> EVENTS_PAYLOAD_R { - EVENTS_PAYLOAD_R::new((self.bits & 1) != 0) - } -} -impl W { - #[doc = "Bit 0 - Packet payload sent or received"] - #[inline(always)] - #[must_use] - pub fn events_payload(&mut self) -> EVENTS_PAYLOAD_W<0> { - EVENTS_PAYLOAD_W::new(self) - } - #[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 = "Packet payload sent or received\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 [events_payload](index.html) module"] -pub struct EVENTS_PAYLOAD_SPEC; -impl crate::RegisterSpec for EVENTS_PAYLOAD_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [events_payload::R](R) reader structure"] -impl crate::Readable for EVENTS_PAYLOAD_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [events_payload::W](W) writer structure"] -impl crate::Writable for EVENTS_PAYLOAD_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets EVENTS_PAYLOAD to value 0"] -impl crate::Resettable for EVENTS_PAYLOAD_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/radio/events_ready.rs b/down-the-stack/dk_pac/src/radio/events_ready.rs deleted file mode 100644 index 2f692af..0000000 --- a/down-the-stack/dk_pac/src/radio/events_ready.rs +++ /dev/null @@ -1,127 +0,0 @@ -#[doc = "Register `EVENTS_READY` 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 `EVENTS_READY` 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 `EVENTS_READY` reader - RADIO has ramped up and is ready to be started"] -pub type EVENTS_READY_R = crate::BitReader; -#[doc = "RADIO has ramped up and is ready to be started\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum EVENTS_READY_A { - #[doc = "0: Event not generated"] - NOT_GENERATED = 0, - #[doc = "1: Event generated"] - GENERATED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: EVENTS_READY_A) -> Self { - variant as u8 != 0 - } -} -impl EVENTS_READY_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> EVENTS_READY_A { - match self.bits { - false => EVENTS_READY_A::NOT_GENERATED, - true => EVENTS_READY_A::GENERATED, - } - } - #[doc = "Checks if the value of the field is `NOT_GENERATED`"] - #[inline(always)] - pub fn is_not_generated(&self) -> bool { - *self == EVENTS_READY_A::NOT_GENERATED - } - #[doc = "Checks if the value of the field is `GENERATED`"] - #[inline(always)] - pub fn is_generated(&self) -> bool { - *self == EVENTS_READY_A::GENERATED - } -} -#[doc = "Field `EVENTS_READY` writer - RADIO has ramped up and is ready to be started"] -pub type EVENTS_READY_W<'a, const O: u8> = - crate::BitWriter<'a, u32, EVENTS_READY_SPEC, EVENTS_READY_A, O>; -impl<'a, const O: u8> EVENTS_READY_W<'a, O> { - #[doc = "Event not generated"] - #[inline(always)] - pub fn not_generated(self) -> &'a mut W { - self.variant(EVENTS_READY_A::NOT_GENERATED) - } - #[doc = "Event generated"] - #[inline(always)] - pub fn generated(self) -> &'a mut W { - self.variant(EVENTS_READY_A::GENERATED) - } -} -impl R { - #[doc = "Bit 0 - RADIO has ramped up and is ready to be started"] - #[inline(always)] - pub fn events_ready(&self) -> EVENTS_READY_R { - EVENTS_READY_R::new((self.bits & 1) != 0) - } -} -impl W { - #[doc = "Bit 0 - RADIO has ramped up and is ready to be started"] - #[inline(always)] - #[must_use] - pub fn events_ready(&mut self) -> EVENTS_READY_W<0> { - EVENTS_READY_W::new(self) - } - #[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 = "RADIO has ramped up and is ready to be started\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 [events_ready](index.html) module"] -pub struct EVENTS_READY_SPEC; -impl crate::RegisterSpec for EVENTS_READY_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [events_ready::R](R) reader structure"] -impl crate::Readable for EVENTS_READY_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [events_ready::W](W) writer structure"] -impl crate::Writable for EVENTS_READY_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets EVENTS_READY to value 0"] -impl crate::Resettable for EVENTS_READY_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/radio/events_rssiend.rs b/down-the-stack/dk_pac/src/radio/events_rssiend.rs deleted file mode 100644 index b32fb39..0000000 --- a/down-the-stack/dk_pac/src/radio/events_rssiend.rs +++ /dev/null @@ -1,127 +0,0 @@ -#[doc = "Register `EVENTS_RSSIEND` 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 `EVENTS_RSSIEND` 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 `EVENTS_RSSIEND` reader - Sampling of receive signal strength complete."] -pub type EVENTS_RSSIEND_R = crate::BitReader; -#[doc = "Sampling of receive signal strength complete.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum EVENTS_RSSIEND_A { - #[doc = "0: Event not generated"] - NOT_GENERATED = 0, - #[doc = "1: Event generated"] - GENERATED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: EVENTS_RSSIEND_A) -> Self { - variant as u8 != 0 - } -} -impl EVENTS_RSSIEND_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> EVENTS_RSSIEND_A { - match self.bits { - false => EVENTS_RSSIEND_A::NOT_GENERATED, - true => EVENTS_RSSIEND_A::GENERATED, - } - } - #[doc = "Checks if the value of the field is `NOT_GENERATED`"] - #[inline(always)] - pub fn is_not_generated(&self) -> bool { - *self == EVENTS_RSSIEND_A::NOT_GENERATED - } - #[doc = "Checks if the value of the field is `GENERATED`"] - #[inline(always)] - pub fn is_generated(&self) -> bool { - *self == EVENTS_RSSIEND_A::GENERATED - } -} -#[doc = "Field `EVENTS_RSSIEND` writer - Sampling of receive signal strength complete."] -pub type EVENTS_RSSIEND_W<'a, const O: u8> = - crate::BitWriter<'a, u32, EVENTS_RSSIEND_SPEC, EVENTS_RSSIEND_A, O>; -impl<'a, const O: u8> EVENTS_RSSIEND_W<'a, O> { - #[doc = "Event not generated"] - #[inline(always)] - pub fn not_generated(self) -> &'a mut W { - self.variant(EVENTS_RSSIEND_A::NOT_GENERATED) - } - #[doc = "Event generated"] - #[inline(always)] - pub fn generated(self) -> &'a mut W { - self.variant(EVENTS_RSSIEND_A::GENERATED) - } -} -impl R { - #[doc = "Bit 0 - Sampling of receive signal strength complete."] - #[inline(always)] - pub fn events_rssiend(&self) -> EVENTS_RSSIEND_R { - EVENTS_RSSIEND_R::new((self.bits & 1) != 0) - } -} -impl W { - #[doc = "Bit 0 - Sampling of receive signal strength complete."] - #[inline(always)] - #[must_use] - pub fn events_rssiend(&mut self) -> EVENTS_RSSIEND_W<0> { - EVENTS_RSSIEND_W::new(self) - } - #[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 = "Sampling of receive signal strength complete.\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 [events_rssiend](index.html) module"] -pub struct EVENTS_RSSIEND_SPEC; -impl crate::RegisterSpec for EVENTS_RSSIEND_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [events_rssiend::R](R) reader structure"] -impl crate::Readable for EVENTS_RSSIEND_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [events_rssiend::W](W) writer structure"] -impl crate::Writable for EVENTS_RSSIEND_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets EVENTS_RSSIEND to value 0"] -impl crate::Resettable for EVENTS_RSSIEND_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/radio/frequency.rs b/down-the-stack/dk_pac/src/radio/frequency.rs deleted file mode 100644 index 6c09456..0000000 --- a/down-the-stack/dk_pac/src/radio/frequency.rs +++ /dev/null @@ -1,141 +0,0 @@ -#[doc = "Register `FREQUENCY` 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 `FREQUENCY` 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 `FREQUENCY` reader - Radio channel frequency"] -pub type FREQUENCY_R = crate::FieldReader; -#[doc = "Field `FREQUENCY` writer - Radio channel frequency"] -pub type FREQUENCY_W<'a, const O: u8> = crate::FieldWriter<'a, u32, FREQUENCY_SPEC, u8, u8, 7, O>; -#[doc = "Field `MAP` reader - Channel map selection."] -pub type MAP_R = crate::BitReader; -#[doc = "Channel map selection.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum MAP_A { - #[doc = "0: Channel map between 2400 MHZ .. 2500 MHz"] - DEFAULT = 0, - #[doc = "1: Channel map between 2360 MHZ .. 2460 MHz"] - LOW = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: MAP_A) -> Self { - variant as u8 != 0 - } -} -impl MAP_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> MAP_A { - match self.bits { - false => MAP_A::DEFAULT, - true => MAP_A::LOW, - } - } - #[doc = "Checks if the value of the field is `DEFAULT`"] - #[inline(always)] - pub fn is_default(&self) -> bool { - *self == MAP_A::DEFAULT - } - #[doc = "Checks if the value of the field is `LOW`"] - #[inline(always)] - pub fn is_low(&self) -> bool { - *self == MAP_A::LOW - } -} -#[doc = "Field `MAP` writer - Channel map selection."] -pub type MAP_W<'a, const O: u8> = crate::BitWriter<'a, u32, FREQUENCY_SPEC, MAP_A, O>; -impl<'a, const O: u8> MAP_W<'a, O> { - #[doc = "Channel map between 2400 MHZ .. 2500 MHz"] - #[inline(always)] - pub fn default(self) -> &'a mut W { - self.variant(MAP_A::DEFAULT) - } - #[doc = "Channel map between 2360 MHZ .. 2460 MHz"] - #[inline(always)] - pub fn low(self) -> &'a mut W { - self.variant(MAP_A::LOW) - } -} -impl R { - #[doc = "Bits 0:6 - Radio channel frequency"] - #[inline(always)] - pub fn frequency(&self) -> FREQUENCY_R { - FREQUENCY_R::new((self.bits & 0x7f) as u8) - } - #[doc = "Bit 8 - Channel map selection."] - #[inline(always)] - pub fn map(&self) -> MAP_R { - MAP_R::new(((self.bits >> 8) & 1) != 0) - } -} -impl W { - #[doc = "Bits 0:6 - Radio channel frequency"] - #[inline(always)] - #[must_use] - pub fn frequency(&mut self) -> FREQUENCY_W<0> { - FREQUENCY_W::new(self) - } - #[doc = "Bit 8 - Channel map selection."] - #[inline(always)] - #[must_use] - pub fn map(&mut self) -> MAP_W<8> { - MAP_W::new(self) - } - #[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 = "Frequency\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 [frequency](index.html) module"] -pub struct FREQUENCY_SPEC; -impl crate::RegisterSpec for FREQUENCY_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [frequency::R](R) reader structure"] -impl crate::Readable for FREQUENCY_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [frequency::W](W) writer structure"] -impl crate::Writable for FREQUENCY_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets FREQUENCY to value 0x02"] -impl crate::Resettable for FREQUENCY_SPEC { - const RESET_VALUE: Self::Ux = 0x02; -} diff --git a/down-the-stack/dk_pac/src/radio/intenclr.rs b/down-the-stack/dk_pac/src/radio/intenclr.rs deleted file mode 100644 index 7dbc7d0..0000000 --- a/down-the-stack/dk_pac/src/radio/intenclr.rs +++ /dev/null @@ -1,813 +0,0 @@ -#[doc = "Register `INTENCLR` 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 `INTENCLR` 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 `READY` reader - Write '1' to disable interrupt for event READY"] -pub type READY_R = crate::BitReader; -#[doc = "Write '1' to disable interrupt for event READY\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum READY_A { - #[doc = "0: Read: Disabled"] - DISABLED = 0, - #[doc = "1: Read: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: READY_A) -> Self { - variant as u8 != 0 - } -} -impl READY_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> READY_A { - match self.bits { - false => READY_A::DISABLED, - true => READY_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == READY_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == READY_A::ENABLED - } -} -#[doc = "Write '1' to disable interrupt for event READY\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum READY_AW { - #[doc = "1: Disable"] - CLEAR = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: READY_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `READY` writer - Write '1' to disable interrupt for event READY"] -pub type READY_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENCLR_SPEC, READY_AW, O>; -impl<'a, const O: u8> READY_W<'a, O> { - #[doc = "Disable"] - #[inline(always)] - pub fn clear(self) -> &'a mut W { - self.variant(READY_AW::CLEAR) - } -} -#[doc = "Field `ADDRESS` reader - Write '1' to disable interrupt for event ADDRESS"] -pub type ADDRESS_R = crate::BitReader; -#[doc = "Write '1' to disable interrupt for event ADDRESS\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum ADDRESS_A { - #[doc = "0: Read: Disabled"] - DISABLED = 0, - #[doc = "1: Read: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: ADDRESS_A) -> Self { - variant as u8 != 0 - } -} -impl ADDRESS_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> ADDRESS_A { - match self.bits { - false => ADDRESS_A::DISABLED, - true => ADDRESS_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == ADDRESS_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == ADDRESS_A::ENABLED - } -} -#[doc = "Write '1' to disable interrupt for event ADDRESS\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum ADDRESS_AW { - #[doc = "1: Disable"] - CLEAR = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: ADDRESS_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `ADDRESS` writer - Write '1' to disable interrupt for event ADDRESS"] -pub type ADDRESS_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENCLR_SPEC, ADDRESS_AW, O>; -impl<'a, const O: u8> ADDRESS_W<'a, O> { - #[doc = "Disable"] - #[inline(always)] - pub fn clear(self) -> &'a mut W { - self.variant(ADDRESS_AW::CLEAR) - } -} -#[doc = "Field `PAYLOAD` reader - Write '1' to disable interrupt for event PAYLOAD"] -pub type PAYLOAD_R = crate::BitReader; -#[doc = "Write '1' to disable interrupt for event PAYLOAD\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PAYLOAD_A { - #[doc = "0: Read: Disabled"] - DISABLED = 0, - #[doc = "1: Read: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PAYLOAD_A) -> Self { - variant as u8 != 0 - } -} -impl PAYLOAD_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> PAYLOAD_A { - match self.bits { - false => PAYLOAD_A::DISABLED, - true => PAYLOAD_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == PAYLOAD_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == PAYLOAD_A::ENABLED - } -} -#[doc = "Write '1' to disable interrupt for event PAYLOAD\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PAYLOAD_AW { - #[doc = "1: Disable"] - CLEAR = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PAYLOAD_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `PAYLOAD` writer - Write '1' to disable interrupt for event PAYLOAD"] -pub type PAYLOAD_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENCLR_SPEC, PAYLOAD_AW, O>; -impl<'a, const O: u8> PAYLOAD_W<'a, O> { - #[doc = "Disable"] - #[inline(always)] - pub fn clear(self) -> &'a mut W { - self.variant(PAYLOAD_AW::CLEAR) - } -} -#[doc = "Field `END` reader - Write '1' to disable interrupt for event END"] -pub type END_R = crate::BitReader; -#[doc = "Write '1' to disable interrupt for event END\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum END_A { - #[doc = "0: Read: Disabled"] - DISABLED = 0, - #[doc = "1: Read: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: END_A) -> Self { - variant as u8 != 0 - } -} -impl END_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> END_A { - match self.bits { - false => END_A::DISABLED, - true => END_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == END_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == END_A::ENABLED - } -} -#[doc = "Write '1' to disable interrupt for event END\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum END_AW { - #[doc = "1: Disable"] - CLEAR = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: END_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `END` writer - Write '1' to disable interrupt for event END"] -pub type END_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENCLR_SPEC, END_AW, O>; -impl<'a, const O: u8> END_W<'a, O> { - #[doc = "Disable"] - #[inline(always)] - pub fn clear(self) -> &'a mut W { - self.variant(END_AW::CLEAR) - } -} -#[doc = "Field `DISABLED` reader - Write '1' to disable interrupt for event DISABLED"] -pub type DISABLED_R = crate::BitReader; -#[doc = "Write '1' to disable interrupt for event DISABLED\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum DISABLED_A { - #[doc = "0: Read: Disabled"] - DISABLED = 0, - #[doc = "1: Read: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: DISABLED_A) -> Self { - variant as u8 != 0 - } -} -impl DISABLED_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> DISABLED_A { - match self.bits { - false => DISABLED_A::DISABLED, - true => DISABLED_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == DISABLED_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == DISABLED_A::ENABLED - } -} -#[doc = "Write '1' to disable interrupt for event DISABLED\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum DISABLED_AW { - #[doc = "1: Disable"] - CLEAR = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: DISABLED_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `DISABLED` writer - Write '1' to disable interrupt for event DISABLED"] -pub type DISABLED_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENCLR_SPEC, DISABLED_AW, O>; -impl<'a, const O: u8> DISABLED_W<'a, O> { - #[doc = "Disable"] - #[inline(always)] - pub fn clear(self) -> &'a mut W { - self.variant(DISABLED_AW::CLEAR) - } -} -#[doc = "Field `DEVMATCH` reader - Write '1' to disable interrupt for event DEVMATCH"] -pub type DEVMATCH_R = crate::BitReader; -#[doc = "Write '1' to disable interrupt for event DEVMATCH\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum DEVMATCH_A { - #[doc = "0: Read: Disabled"] - DISABLED = 0, - #[doc = "1: Read: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: DEVMATCH_A) -> Self { - variant as u8 != 0 - } -} -impl DEVMATCH_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> DEVMATCH_A { - match self.bits { - false => DEVMATCH_A::DISABLED, - true => DEVMATCH_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == DEVMATCH_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == DEVMATCH_A::ENABLED - } -} -#[doc = "Write '1' to disable interrupt for event DEVMATCH\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum DEVMATCH_AW { - #[doc = "1: Disable"] - CLEAR = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: DEVMATCH_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `DEVMATCH` writer - Write '1' to disable interrupt for event DEVMATCH"] -pub type DEVMATCH_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENCLR_SPEC, DEVMATCH_AW, O>; -impl<'a, const O: u8> DEVMATCH_W<'a, O> { - #[doc = "Disable"] - #[inline(always)] - pub fn clear(self) -> &'a mut W { - self.variant(DEVMATCH_AW::CLEAR) - } -} -#[doc = "Field `DEVMISS` reader - Write '1' to disable interrupt for event DEVMISS"] -pub type DEVMISS_R = crate::BitReader; -#[doc = "Write '1' to disable interrupt for event DEVMISS\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum DEVMISS_A { - #[doc = "0: Read: Disabled"] - DISABLED = 0, - #[doc = "1: Read: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: DEVMISS_A) -> Self { - variant as u8 != 0 - } -} -impl DEVMISS_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> DEVMISS_A { - match self.bits { - false => DEVMISS_A::DISABLED, - true => DEVMISS_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == DEVMISS_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == DEVMISS_A::ENABLED - } -} -#[doc = "Write '1' to disable interrupt for event DEVMISS\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum DEVMISS_AW { - #[doc = "1: Disable"] - CLEAR = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: DEVMISS_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `DEVMISS` writer - Write '1' to disable interrupt for event DEVMISS"] -pub type DEVMISS_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENCLR_SPEC, DEVMISS_AW, O>; -impl<'a, const O: u8> DEVMISS_W<'a, O> { - #[doc = "Disable"] - #[inline(always)] - pub fn clear(self) -> &'a mut W { - self.variant(DEVMISS_AW::CLEAR) - } -} -#[doc = "Field `RSSIEND` reader - Write '1' to disable interrupt for event RSSIEND"] -pub type RSSIEND_R = crate::BitReader; -#[doc = "Write '1' to disable interrupt for event RSSIEND\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum RSSIEND_A { - #[doc = "0: Read: Disabled"] - DISABLED = 0, - #[doc = "1: Read: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: RSSIEND_A) -> Self { - variant as u8 != 0 - } -} -impl RSSIEND_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> RSSIEND_A { - match self.bits { - false => RSSIEND_A::DISABLED, - true => RSSIEND_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == RSSIEND_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == RSSIEND_A::ENABLED - } -} -#[doc = "Write '1' to disable interrupt for event RSSIEND\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum RSSIEND_AW { - #[doc = "1: Disable"] - CLEAR = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: RSSIEND_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `RSSIEND` writer - Write '1' to disable interrupt for event RSSIEND"] -pub type RSSIEND_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENCLR_SPEC, RSSIEND_AW, O>; -impl<'a, const O: u8> RSSIEND_W<'a, O> { - #[doc = "Disable"] - #[inline(always)] - pub fn clear(self) -> &'a mut W { - self.variant(RSSIEND_AW::CLEAR) - } -} -#[doc = "Field `BCMATCH` reader - Write '1' to disable interrupt for event BCMATCH"] -pub type BCMATCH_R = crate::BitReader; -#[doc = "Write '1' to disable interrupt for event BCMATCH\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum BCMATCH_A { - #[doc = "0: Read: Disabled"] - DISABLED = 0, - #[doc = "1: Read: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: BCMATCH_A) -> Self { - variant as u8 != 0 - } -} -impl BCMATCH_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> BCMATCH_A { - match self.bits { - false => BCMATCH_A::DISABLED, - true => BCMATCH_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == BCMATCH_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == BCMATCH_A::ENABLED - } -} -#[doc = "Write '1' to disable interrupt for event BCMATCH\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum BCMATCH_AW { - #[doc = "1: Disable"] - CLEAR = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: BCMATCH_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `BCMATCH` writer - Write '1' to disable interrupt for event BCMATCH"] -pub type BCMATCH_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENCLR_SPEC, BCMATCH_AW, O>; -impl<'a, const O: u8> BCMATCH_W<'a, O> { - #[doc = "Disable"] - #[inline(always)] - pub fn clear(self) -> &'a mut W { - self.variant(BCMATCH_AW::CLEAR) - } -} -#[doc = "Field `CRCOK` reader - Write '1' to disable interrupt for event CRCOK"] -pub type CRCOK_R = crate::BitReader; -#[doc = "Write '1' to disable interrupt for event CRCOK\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum CRCOK_A { - #[doc = "0: Read: Disabled"] - DISABLED = 0, - #[doc = "1: Read: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: CRCOK_A) -> Self { - variant as u8 != 0 - } -} -impl CRCOK_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> CRCOK_A { - match self.bits { - false => CRCOK_A::DISABLED, - true => CRCOK_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == CRCOK_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == CRCOK_A::ENABLED - } -} -#[doc = "Write '1' to disable interrupt for event CRCOK\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum CRCOK_AW { - #[doc = "1: Disable"] - CLEAR = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: CRCOK_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `CRCOK` writer - Write '1' to disable interrupt for event CRCOK"] -pub type CRCOK_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENCLR_SPEC, CRCOK_AW, O>; -impl<'a, const O: u8> CRCOK_W<'a, O> { - #[doc = "Disable"] - #[inline(always)] - pub fn clear(self) -> &'a mut W { - self.variant(CRCOK_AW::CLEAR) - } -} -#[doc = "Field `CRCERROR` reader - Write '1' to disable interrupt for event CRCERROR"] -pub type CRCERROR_R = crate::BitReader; -#[doc = "Write '1' to disable interrupt for event CRCERROR\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum CRCERROR_A { - #[doc = "0: Read: Disabled"] - DISABLED = 0, - #[doc = "1: Read: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: CRCERROR_A) -> Self { - variant as u8 != 0 - } -} -impl CRCERROR_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> CRCERROR_A { - match self.bits { - false => CRCERROR_A::DISABLED, - true => CRCERROR_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == CRCERROR_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == CRCERROR_A::ENABLED - } -} -#[doc = "Write '1' to disable interrupt for event CRCERROR\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum CRCERROR_AW { - #[doc = "1: Disable"] - CLEAR = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: CRCERROR_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `CRCERROR` writer - Write '1' to disable interrupt for event CRCERROR"] -pub type CRCERROR_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENCLR_SPEC, CRCERROR_AW, O>; -impl<'a, const O: u8> CRCERROR_W<'a, O> { - #[doc = "Disable"] - #[inline(always)] - pub fn clear(self) -> &'a mut W { - self.variant(CRCERROR_AW::CLEAR) - } -} -impl R { - #[doc = "Bit 0 - Write '1' to disable interrupt for event READY"] - #[inline(always)] - pub fn ready(&self) -> READY_R { - READY_R::new((self.bits & 1) != 0) - } - #[doc = "Bit 1 - Write '1' to disable interrupt for event ADDRESS"] - #[inline(always)] - pub fn address(&self) -> ADDRESS_R { - ADDRESS_R::new(((self.bits >> 1) & 1) != 0) - } - #[doc = "Bit 2 - Write '1' to disable interrupt for event PAYLOAD"] - #[inline(always)] - pub fn payload(&self) -> PAYLOAD_R { - PAYLOAD_R::new(((self.bits >> 2) & 1) != 0) - } - #[doc = "Bit 3 - Write '1' to disable interrupt for event END"] - #[inline(always)] - pub fn end(&self) -> END_R { - END_R::new(((self.bits >> 3) & 1) != 0) - } - #[doc = "Bit 4 - Write '1' to disable interrupt for event DISABLED"] - #[inline(always)] - pub fn disabled(&self) -> DISABLED_R { - DISABLED_R::new(((self.bits >> 4) & 1) != 0) - } - #[doc = "Bit 5 - Write '1' to disable interrupt for event DEVMATCH"] - #[inline(always)] - pub fn devmatch(&self) -> DEVMATCH_R { - DEVMATCH_R::new(((self.bits >> 5) & 1) != 0) - } - #[doc = "Bit 6 - Write '1' to disable interrupt for event DEVMISS"] - #[inline(always)] - pub fn devmiss(&self) -> DEVMISS_R { - DEVMISS_R::new(((self.bits >> 6) & 1) != 0) - } - #[doc = "Bit 7 - Write '1' to disable interrupt for event RSSIEND"] - #[inline(always)] - pub fn rssiend(&self) -> RSSIEND_R { - RSSIEND_R::new(((self.bits >> 7) & 1) != 0) - } - #[doc = "Bit 10 - Write '1' to disable interrupt for event BCMATCH"] - #[inline(always)] - pub fn bcmatch(&self) -> BCMATCH_R { - BCMATCH_R::new(((self.bits >> 10) & 1) != 0) - } - #[doc = "Bit 12 - Write '1' to disable interrupt for event CRCOK"] - #[inline(always)] - pub fn crcok(&self) -> CRCOK_R { - CRCOK_R::new(((self.bits >> 12) & 1) != 0) - } - #[doc = "Bit 13 - Write '1' to disable interrupt for event CRCERROR"] - #[inline(always)] - pub fn crcerror(&self) -> CRCERROR_R { - CRCERROR_R::new(((self.bits >> 13) & 1) != 0) - } -} -impl W { - #[doc = "Bit 0 - Write '1' to disable interrupt for event READY"] - #[inline(always)] - #[must_use] - pub fn ready(&mut self) -> READY_W<0> { - READY_W::new(self) - } - #[doc = "Bit 1 - Write '1' to disable interrupt for event ADDRESS"] - #[inline(always)] - #[must_use] - pub fn address(&mut self) -> ADDRESS_W<1> { - ADDRESS_W::new(self) - } - #[doc = "Bit 2 - Write '1' to disable interrupt for event PAYLOAD"] - #[inline(always)] - #[must_use] - pub fn payload(&mut self) -> PAYLOAD_W<2> { - PAYLOAD_W::new(self) - } - #[doc = "Bit 3 - Write '1' to disable interrupt for event END"] - #[inline(always)] - #[must_use] - pub fn end(&mut self) -> END_W<3> { - END_W::new(self) - } - #[doc = "Bit 4 - Write '1' to disable interrupt for event DISABLED"] - #[inline(always)] - #[must_use] - pub fn disabled(&mut self) -> DISABLED_W<4> { - DISABLED_W::new(self) - } - #[doc = "Bit 5 - Write '1' to disable interrupt for event DEVMATCH"] - #[inline(always)] - #[must_use] - pub fn devmatch(&mut self) -> DEVMATCH_W<5> { - DEVMATCH_W::new(self) - } - #[doc = "Bit 6 - Write '1' to disable interrupt for event DEVMISS"] - #[inline(always)] - #[must_use] - pub fn devmiss(&mut self) -> DEVMISS_W<6> { - DEVMISS_W::new(self) - } - #[doc = "Bit 7 - Write '1' to disable interrupt for event RSSIEND"] - #[inline(always)] - #[must_use] - pub fn rssiend(&mut self) -> RSSIEND_W<7> { - RSSIEND_W::new(self) - } - #[doc = "Bit 10 - Write '1' to disable interrupt for event BCMATCH"] - #[inline(always)] - #[must_use] - pub fn bcmatch(&mut self) -> BCMATCH_W<10> { - BCMATCH_W::new(self) - } - #[doc = "Bit 12 - Write '1' to disable interrupt for event CRCOK"] - #[inline(always)] - #[must_use] - pub fn crcok(&mut self) -> CRCOK_W<12> { - CRCOK_W::new(self) - } - #[doc = "Bit 13 - Write '1' to disable interrupt for event CRCERROR"] - #[inline(always)] - #[must_use] - pub fn crcerror(&mut self) -> CRCERROR_W<13> { - CRCERROR_W::new(self) - } - #[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 = "Disable interrupt\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 [intenclr](index.html) module"] -pub struct INTENCLR_SPEC; -impl crate::RegisterSpec for INTENCLR_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [intenclr::R](R) reader structure"] -impl crate::Readable for INTENCLR_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [intenclr::W](W) writer structure"] -impl crate::Writable for INTENCLR_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets INTENCLR to value 0"] -impl crate::Resettable for INTENCLR_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/radio/intenset.rs b/down-the-stack/dk_pac/src/radio/intenset.rs deleted file mode 100644 index 0e943c9..0000000 --- a/down-the-stack/dk_pac/src/radio/intenset.rs +++ /dev/null @@ -1,813 +0,0 @@ -#[doc = "Register `INTENSET` 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 `INTENSET` 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 `READY` reader - Write '1' to enable interrupt for event READY"] -pub type READY_R = crate::BitReader; -#[doc = "Write '1' to enable interrupt for event READY\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum READY_A { - #[doc = "0: Read: Disabled"] - DISABLED = 0, - #[doc = "1: Read: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: READY_A) -> Self { - variant as u8 != 0 - } -} -impl READY_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> READY_A { - match self.bits { - false => READY_A::DISABLED, - true => READY_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == READY_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == READY_A::ENABLED - } -} -#[doc = "Write '1' to enable interrupt for event READY\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum READY_AW { - #[doc = "1: Enable"] - SET = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: READY_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `READY` writer - Write '1' to enable interrupt for event READY"] -pub type READY_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENSET_SPEC, READY_AW, O>; -impl<'a, const O: u8> READY_W<'a, O> { - #[doc = "Enable"] - #[inline(always)] - pub fn set(self) -> &'a mut W { - self.variant(READY_AW::SET) - } -} -#[doc = "Field `ADDRESS` reader - Write '1' to enable interrupt for event ADDRESS"] -pub type ADDRESS_R = crate::BitReader; -#[doc = "Write '1' to enable interrupt for event ADDRESS\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum ADDRESS_A { - #[doc = "0: Read: Disabled"] - DISABLED = 0, - #[doc = "1: Read: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: ADDRESS_A) -> Self { - variant as u8 != 0 - } -} -impl ADDRESS_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> ADDRESS_A { - match self.bits { - false => ADDRESS_A::DISABLED, - true => ADDRESS_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == ADDRESS_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == ADDRESS_A::ENABLED - } -} -#[doc = "Write '1' to enable interrupt for event ADDRESS\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum ADDRESS_AW { - #[doc = "1: Enable"] - SET = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: ADDRESS_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `ADDRESS` writer - Write '1' to enable interrupt for event ADDRESS"] -pub type ADDRESS_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENSET_SPEC, ADDRESS_AW, O>; -impl<'a, const O: u8> ADDRESS_W<'a, O> { - #[doc = "Enable"] - #[inline(always)] - pub fn set(self) -> &'a mut W { - self.variant(ADDRESS_AW::SET) - } -} -#[doc = "Field `PAYLOAD` reader - Write '1' to enable interrupt for event PAYLOAD"] -pub type PAYLOAD_R = crate::BitReader; -#[doc = "Write '1' to enable interrupt for event PAYLOAD\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PAYLOAD_A { - #[doc = "0: Read: Disabled"] - DISABLED = 0, - #[doc = "1: Read: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PAYLOAD_A) -> Self { - variant as u8 != 0 - } -} -impl PAYLOAD_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> PAYLOAD_A { - match self.bits { - false => PAYLOAD_A::DISABLED, - true => PAYLOAD_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == PAYLOAD_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == PAYLOAD_A::ENABLED - } -} -#[doc = "Write '1' to enable interrupt for event PAYLOAD\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PAYLOAD_AW { - #[doc = "1: Enable"] - SET = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PAYLOAD_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `PAYLOAD` writer - Write '1' to enable interrupt for event PAYLOAD"] -pub type PAYLOAD_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENSET_SPEC, PAYLOAD_AW, O>; -impl<'a, const O: u8> PAYLOAD_W<'a, O> { - #[doc = "Enable"] - #[inline(always)] - pub fn set(self) -> &'a mut W { - self.variant(PAYLOAD_AW::SET) - } -} -#[doc = "Field `END` reader - Write '1' to enable interrupt for event END"] -pub type END_R = crate::BitReader; -#[doc = "Write '1' to enable interrupt for event END\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum END_A { - #[doc = "0: Read: Disabled"] - DISABLED = 0, - #[doc = "1: Read: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: END_A) -> Self { - variant as u8 != 0 - } -} -impl END_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> END_A { - match self.bits { - false => END_A::DISABLED, - true => END_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == END_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == END_A::ENABLED - } -} -#[doc = "Write '1' to enable interrupt for event END\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum END_AW { - #[doc = "1: Enable"] - SET = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: END_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `END` writer - Write '1' to enable interrupt for event END"] -pub type END_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENSET_SPEC, END_AW, O>; -impl<'a, const O: u8> END_W<'a, O> { - #[doc = "Enable"] - #[inline(always)] - pub fn set(self) -> &'a mut W { - self.variant(END_AW::SET) - } -} -#[doc = "Field `DISABLED` reader - Write '1' to enable interrupt for event DISABLED"] -pub type DISABLED_R = crate::BitReader; -#[doc = "Write '1' to enable interrupt for event DISABLED\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum DISABLED_A { - #[doc = "0: Read: Disabled"] - DISABLED = 0, - #[doc = "1: Read: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: DISABLED_A) -> Self { - variant as u8 != 0 - } -} -impl DISABLED_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> DISABLED_A { - match self.bits { - false => DISABLED_A::DISABLED, - true => DISABLED_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == DISABLED_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == DISABLED_A::ENABLED - } -} -#[doc = "Write '1' to enable interrupt for event DISABLED\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum DISABLED_AW { - #[doc = "1: Enable"] - SET = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: DISABLED_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `DISABLED` writer - Write '1' to enable interrupt for event DISABLED"] -pub type DISABLED_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENSET_SPEC, DISABLED_AW, O>; -impl<'a, const O: u8> DISABLED_W<'a, O> { - #[doc = "Enable"] - #[inline(always)] - pub fn set(self) -> &'a mut W { - self.variant(DISABLED_AW::SET) - } -} -#[doc = "Field `DEVMATCH` reader - Write '1' to enable interrupt for event DEVMATCH"] -pub type DEVMATCH_R = crate::BitReader; -#[doc = "Write '1' to enable interrupt for event DEVMATCH\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum DEVMATCH_A { - #[doc = "0: Read: Disabled"] - DISABLED = 0, - #[doc = "1: Read: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: DEVMATCH_A) -> Self { - variant as u8 != 0 - } -} -impl DEVMATCH_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> DEVMATCH_A { - match self.bits { - false => DEVMATCH_A::DISABLED, - true => DEVMATCH_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == DEVMATCH_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == DEVMATCH_A::ENABLED - } -} -#[doc = "Write '1' to enable interrupt for event DEVMATCH\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum DEVMATCH_AW { - #[doc = "1: Enable"] - SET = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: DEVMATCH_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `DEVMATCH` writer - Write '1' to enable interrupt for event DEVMATCH"] -pub type DEVMATCH_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENSET_SPEC, DEVMATCH_AW, O>; -impl<'a, const O: u8> DEVMATCH_W<'a, O> { - #[doc = "Enable"] - #[inline(always)] - pub fn set(self) -> &'a mut W { - self.variant(DEVMATCH_AW::SET) - } -} -#[doc = "Field `DEVMISS` reader - Write '1' to enable interrupt for event DEVMISS"] -pub type DEVMISS_R = crate::BitReader; -#[doc = "Write '1' to enable interrupt for event DEVMISS\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum DEVMISS_A { - #[doc = "0: Read: Disabled"] - DISABLED = 0, - #[doc = "1: Read: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: DEVMISS_A) -> Self { - variant as u8 != 0 - } -} -impl DEVMISS_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> DEVMISS_A { - match self.bits { - false => DEVMISS_A::DISABLED, - true => DEVMISS_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == DEVMISS_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == DEVMISS_A::ENABLED - } -} -#[doc = "Write '1' to enable interrupt for event DEVMISS\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum DEVMISS_AW { - #[doc = "1: Enable"] - SET = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: DEVMISS_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `DEVMISS` writer - Write '1' to enable interrupt for event DEVMISS"] -pub type DEVMISS_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENSET_SPEC, DEVMISS_AW, O>; -impl<'a, const O: u8> DEVMISS_W<'a, O> { - #[doc = "Enable"] - #[inline(always)] - pub fn set(self) -> &'a mut W { - self.variant(DEVMISS_AW::SET) - } -} -#[doc = "Field `RSSIEND` reader - Write '1' to enable interrupt for event RSSIEND"] -pub type RSSIEND_R = crate::BitReader; -#[doc = "Write '1' to enable interrupt for event RSSIEND\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum RSSIEND_A { - #[doc = "0: Read: Disabled"] - DISABLED = 0, - #[doc = "1: Read: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: RSSIEND_A) -> Self { - variant as u8 != 0 - } -} -impl RSSIEND_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> RSSIEND_A { - match self.bits { - false => RSSIEND_A::DISABLED, - true => RSSIEND_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == RSSIEND_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == RSSIEND_A::ENABLED - } -} -#[doc = "Write '1' to enable interrupt for event RSSIEND\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum RSSIEND_AW { - #[doc = "1: Enable"] - SET = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: RSSIEND_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `RSSIEND` writer - Write '1' to enable interrupt for event RSSIEND"] -pub type RSSIEND_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENSET_SPEC, RSSIEND_AW, O>; -impl<'a, const O: u8> RSSIEND_W<'a, O> { - #[doc = "Enable"] - #[inline(always)] - pub fn set(self) -> &'a mut W { - self.variant(RSSIEND_AW::SET) - } -} -#[doc = "Field `BCMATCH` reader - Write '1' to enable interrupt for event BCMATCH"] -pub type BCMATCH_R = crate::BitReader; -#[doc = "Write '1' to enable interrupt for event BCMATCH\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum BCMATCH_A { - #[doc = "0: Read: Disabled"] - DISABLED = 0, - #[doc = "1: Read: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: BCMATCH_A) -> Self { - variant as u8 != 0 - } -} -impl BCMATCH_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> BCMATCH_A { - match self.bits { - false => BCMATCH_A::DISABLED, - true => BCMATCH_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == BCMATCH_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == BCMATCH_A::ENABLED - } -} -#[doc = "Write '1' to enable interrupt for event BCMATCH\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum BCMATCH_AW { - #[doc = "1: Enable"] - SET = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: BCMATCH_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `BCMATCH` writer - Write '1' to enable interrupt for event BCMATCH"] -pub type BCMATCH_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENSET_SPEC, BCMATCH_AW, O>; -impl<'a, const O: u8> BCMATCH_W<'a, O> { - #[doc = "Enable"] - #[inline(always)] - pub fn set(self) -> &'a mut W { - self.variant(BCMATCH_AW::SET) - } -} -#[doc = "Field `CRCOK` reader - Write '1' to enable interrupt for event CRCOK"] -pub type CRCOK_R = crate::BitReader; -#[doc = "Write '1' to enable interrupt for event CRCOK\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum CRCOK_A { - #[doc = "0: Read: Disabled"] - DISABLED = 0, - #[doc = "1: Read: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: CRCOK_A) -> Self { - variant as u8 != 0 - } -} -impl CRCOK_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> CRCOK_A { - match self.bits { - false => CRCOK_A::DISABLED, - true => CRCOK_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == CRCOK_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == CRCOK_A::ENABLED - } -} -#[doc = "Write '1' to enable interrupt for event CRCOK\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum CRCOK_AW { - #[doc = "1: Enable"] - SET = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: CRCOK_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `CRCOK` writer - Write '1' to enable interrupt for event CRCOK"] -pub type CRCOK_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENSET_SPEC, CRCOK_AW, O>; -impl<'a, const O: u8> CRCOK_W<'a, O> { - #[doc = "Enable"] - #[inline(always)] - pub fn set(self) -> &'a mut W { - self.variant(CRCOK_AW::SET) - } -} -#[doc = "Field `CRCERROR` reader - Write '1' to enable interrupt for event CRCERROR"] -pub type CRCERROR_R = crate::BitReader; -#[doc = "Write '1' to enable interrupt for event CRCERROR\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum CRCERROR_A { - #[doc = "0: Read: Disabled"] - DISABLED = 0, - #[doc = "1: Read: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: CRCERROR_A) -> Self { - variant as u8 != 0 - } -} -impl CRCERROR_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> CRCERROR_A { - match self.bits { - false => CRCERROR_A::DISABLED, - true => CRCERROR_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == CRCERROR_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == CRCERROR_A::ENABLED - } -} -#[doc = "Write '1' to enable interrupt for event CRCERROR\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum CRCERROR_AW { - #[doc = "1: Enable"] - SET = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: CRCERROR_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `CRCERROR` writer - Write '1' to enable interrupt for event CRCERROR"] -pub type CRCERROR_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENSET_SPEC, CRCERROR_AW, O>; -impl<'a, const O: u8> CRCERROR_W<'a, O> { - #[doc = "Enable"] - #[inline(always)] - pub fn set(self) -> &'a mut W { - self.variant(CRCERROR_AW::SET) - } -} -impl R { - #[doc = "Bit 0 - Write '1' to enable interrupt for event READY"] - #[inline(always)] - pub fn ready(&self) -> READY_R { - READY_R::new((self.bits & 1) != 0) - } - #[doc = "Bit 1 - Write '1' to enable interrupt for event ADDRESS"] - #[inline(always)] - pub fn address(&self) -> ADDRESS_R { - ADDRESS_R::new(((self.bits >> 1) & 1) != 0) - } - #[doc = "Bit 2 - Write '1' to enable interrupt for event PAYLOAD"] - #[inline(always)] - pub fn payload(&self) -> PAYLOAD_R { - PAYLOAD_R::new(((self.bits >> 2) & 1) != 0) - } - #[doc = "Bit 3 - Write '1' to enable interrupt for event END"] - #[inline(always)] - pub fn end(&self) -> END_R { - END_R::new(((self.bits >> 3) & 1) != 0) - } - #[doc = "Bit 4 - Write '1' to enable interrupt for event DISABLED"] - #[inline(always)] - pub fn disabled(&self) -> DISABLED_R { - DISABLED_R::new(((self.bits >> 4) & 1) != 0) - } - #[doc = "Bit 5 - Write '1' to enable interrupt for event DEVMATCH"] - #[inline(always)] - pub fn devmatch(&self) -> DEVMATCH_R { - DEVMATCH_R::new(((self.bits >> 5) & 1) != 0) - } - #[doc = "Bit 6 - Write '1' to enable interrupt for event DEVMISS"] - #[inline(always)] - pub fn devmiss(&self) -> DEVMISS_R { - DEVMISS_R::new(((self.bits >> 6) & 1) != 0) - } - #[doc = "Bit 7 - Write '1' to enable interrupt for event RSSIEND"] - #[inline(always)] - pub fn rssiend(&self) -> RSSIEND_R { - RSSIEND_R::new(((self.bits >> 7) & 1) != 0) - } - #[doc = "Bit 10 - Write '1' to enable interrupt for event BCMATCH"] - #[inline(always)] - pub fn bcmatch(&self) -> BCMATCH_R { - BCMATCH_R::new(((self.bits >> 10) & 1) != 0) - } - #[doc = "Bit 12 - Write '1' to enable interrupt for event CRCOK"] - #[inline(always)] - pub fn crcok(&self) -> CRCOK_R { - CRCOK_R::new(((self.bits >> 12) & 1) != 0) - } - #[doc = "Bit 13 - Write '1' to enable interrupt for event CRCERROR"] - #[inline(always)] - pub fn crcerror(&self) -> CRCERROR_R { - CRCERROR_R::new(((self.bits >> 13) & 1) != 0) - } -} -impl W { - #[doc = "Bit 0 - Write '1' to enable interrupt for event READY"] - #[inline(always)] - #[must_use] - pub fn ready(&mut self) -> READY_W<0> { - READY_W::new(self) - } - #[doc = "Bit 1 - Write '1' to enable interrupt for event ADDRESS"] - #[inline(always)] - #[must_use] - pub fn address(&mut self) -> ADDRESS_W<1> { - ADDRESS_W::new(self) - } - #[doc = "Bit 2 - Write '1' to enable interrupt for event PAYLOAD"] - #[inline(always)] - #[must_use] - pub fn payload(&mut self) -> PAYLOAD_W<2> { - PAYLOAD_W::new(self) - } - #[doc = "Bit 3 - Write '1' to enable interrupt for event END"] - #[inline(always)] - #[must_use] - pub fn end(&mut self) -> END_W<3> { - END_W::new(self) - } - #[doc = "Bit 4 - Write '1' to enable interrupt for event DISABLED"] - #[inline(always)] - #[must_use] - pub fn disabled(&mut self) -> DISABLED_W<4> { - DISABLED_W::new(self) - } - #[doc = "Bit 5 - Write '1' to enable interrupt for event DEVMATCH"] - #[inline(always)] - #[must_use] - pub fn devmatch(&mut self) -> DEVMATCH_W<5> { - DEVMATCH_W::new(self) - } - #[doc = "Bit 6 - Write '1' to enable interrupt for event DEVMISS"] - #[inline(always)] - #[must_use] - pub fn devmiss(&mut self) -> DEVMISS_W<6> { - DEVMISS_W::new(self) - } - #[doc = "Bit 7 - Write '1' to enable interrupt for event RSSIEND"] - #[inline(always)] - #[must_use] - pub fn rssiend(&mut self) -> RSSIEND_W<7> { - RSSIEND_W::new(self) - } - #[doc = "Bit 10 - Write '1' to enable interrupt for event BCMATCH"] - #[inline(always)] - #[must_use] - pub fn bcmatch(&mut self) -> BCMATCH_W<10> { - BCMATCH_W::new(self) - } - #[doc = "Bit 12 - Write '1' to enable interrupt for event CRCOK"] - #[inline(always)] - #[must_use] - pub fn crcok(&mut self) -> CRCOK_W<12> { - CRCOK_W::new(self) - } - #[doc = "Bit 13 - Write '1' to enable interrupt for event CRCERROR"] - #[inline(always)] - #[must_use] - pub fn crcerror(&mut self) -> CRCERROR_W<13> { - CRCERROR_W::new(self) - } - #[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 = "Enable interrupt\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 [intenset](index.html) module"] -pub struct INTENSET_SPEC; -impl crate::RegisterSpec for INTENSET_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [intenset::R](R) reader structure"] -impl crate::Readable for INTENSET_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [intenset::W](W) writer structure"] -impl crate::Writable for INTENSET_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets INTENSET to value 0"] -impl crate::Resettable for INTENSET_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/radio/mode.rs b/down-the-stack/dk_pac/src/radio/mode.rs deleted file mode 100644 index 1533b00..0000000 --- a/down-the-stack/dk_pac/src/radio/mode.rs +++ /dev/null @@ -1,167 +0,0 @@ -#[doc = "Register `MODE` 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 `MODE` 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 `MODE` reader - Radio data rate and modulation setting. The radio supports Frequency-shift Keying (FSK) modulation."] -pub type MODE_R = crate::FieldReader; -#[doc = "Radio data rate and modulation setting. The radio supports Frequency-shift Keying (FSK) modulation.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -#[repr(u8)] -pub enum MODE_A { - #[doc = "0: 1 Mbit/s Nordic proprietary radio mode"] - NRF_1MBIT = 0, - #[doc = "1: 2 Mbit/s Nordic proprietary radio mode"] - NRF_2MBIT = 1, - #[doc = "2: Deprecated enumerator - 250 kbit/s Nordic proprietary radio mode"] - NRF_250KBIT = 2, - #[doc = "3: 1 Mbit/s Bluetooth Low Energy"] - BLE_1MBIT = 3, - #[doc = "4: 2 Mbit/s Bluetooth Low Energy"] - BLE_2MBIT = 4, -} -impl From for u8 { - #[inline(always)] - fn from(variant: MODE_A) -> Self { - variant as _ - } -} -impl MODE_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> Option { - match self.bits { - 0 => Some(MODE_A::NRF_1MBIT), - 1 => Some(MODE_A::NRF_2MBIT), - 2 => Some(MODE_A::NRF_250KBIT), - 3 => Some(MODE_A::BLE_1MBIT), - 4 => Some(MODE_A::BLE_2MBIT), - _ => None, - } - } - #[doc = "Checks if the value of the field is `NRF_1MBIT`"] - #[inline(always)] - pub fn is_nrf_1mbit(&self) -> bool { - *self == MODE_A::NRF_1MBIT - } - #[doc = "Checks if the value of the field is `NRF_2MBIT`"] - #[inline(always)] - pub fn is_nrf_2mbit(&self) -> bool { - *self == MODE_A::NRF_2MBIT - } - #[doc = "Checks if the value of the field is `NRF_250KBIT`"] - #[inline(always)] - pub fn is_nrf_250kbit(&self) -> bool { - *self == MODE_A::NRF_250KBIT - } - #[doc = "Checks if the value of the field is `BLE_1MBIT`"] - #[inline(always)] - pub fn is_ble_1mbit(&self) -> bool { - *self == MODE_A::BLE_1MBIT - } - #[doc = "Checks if the value of the field is `BLE_2MBIT`"] - #[inline(always)] - pub fn is_ble_2mbit(&self) -> bool { - *self == MODE_A::BLE_2MBIT - } -} -#[doc = "Field `MODE` writer - Radio data rate and modulation setting. The radio supports Frequency-shift Keying (FSK) modulation."] -pub type MODE_W<'a, const O: u8> = crate::FieldWriter<'a, u32, MODE_SPEC, u8, MODE_A, 4, O>; -impl<'a, const O: u8> MODE_W<'a, O> { - #[doc = "1 Mbit/s Nordic proprietary radio mode"] - #[inline(always)] - pub fn nrf_1mbit(self) -> &'a mut W { - self.variant(MODE_A::NRF_1MBIT) - } - #[doc = "2 Mbit/s Nordic proprietary radio mode"] - #[inline(always)] - pub fn nrf_2mbit(self) -> &'a mut W { - self.variant(MODE_A::NRF_2MBIT) - } - #[doc = "Deprecated enumerator - 250 kbit/s Nordic proprietary radio mode"] - #[inline(always)] - pub fn nrf_250kbit(self) -> &'a mut W { - self.variant(MODE_A::NRF_250KBIT) - } - #[doc = "1 Mbit/s Bluetooth Low Energy"] - #[inline(always)] - pub fn ble_1mbit(self) -> &'a mut W { - self.variant(MODE_A::BLE_1MBIT) - } - #[doc = "2 Mbit/s Bluetooth Low Energy"] - #[inline(always)] - pub fn ble_2mbit(self) -> &'a mut W { - self.variant(MODE_A::BLE_2MBIT) - } -} -impl R { - #[doc = "Bits 0:3 - Radio data rate and modulation setting. The radio supports Frequency-shift Keying (FSK) modulation."] - #[inline(always)] - pub fn mode(&self) -> MODE_R { - MODE_R::new((self.bits & 0x0f) as u8) - } -} -impl W { - #[doc = "Bits 0:3 - Radio data rate and modulation setting. The radio supports Frequency-shift Keying (FSK) modulation."] - #[inline(always)] - #[must_use] - pub fn mode(&mut self) -> MODE_W<0> { - 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 - } -} -#[doc = "Data rate and modulation\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 [mode](index.html) module"] -pub struct MODE_SPEC; -impl crate::RegisterSpec for MODE_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [mode::R](R) reader structure"] -impl crate::Readable for MODE_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [mode::W](W) writer structure"] -impl crate::Writable for 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 MODE to value 0"] -impl crate::Resettable for MODE_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/radio/modecnf0.rs b/down-the-stack/dk_pac/src/radio/modecnf0.rs deleted file mode 100644 index 8197a57..0000000 --- a/down-the-stack/dk_pac/src/radio/modecnf0.rs +++ /dev/null @@ -1,202 +0,0 @@ -#[doc = "Register `MODECNF0` 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 `MODECNF0` 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 `RU` reader - Radio ramp-up time"] -pub type RU_R = crate::BitReader; -#[doc = "Radio ramp-up time\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum RU_A { - #[doc = "0: Default ramp-up time (tRXEN), compatible with firmware written for nRF51"] - DEFAULT = 0, - #[doc = "1: Fast ramp-up (tRXEN,FAST), see electrical specification for more information"] - FAST = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: RU_A) -> Self { - variant as u8 != 0 - } -} -impl RU_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> RU_A { - match self.bits { - false => RU_A::DEFAULT, - true => RU_A::FAST, - } - } - #[doc = "Checks if the value of the field is `DEFAULT`"] - #[inline(always)] - pub fn is_default(&self) -> bool { - *self == RU_A::DEFAULT - } - #[doc = "Checks if the value of the field is `FAST`"] - #[inline(always)] - pub fn is_fast(&self) -> bool { - *self == RU_A::FAST - } -} -#[doc = "Field `RU` writer - Radio ramp-up time"] -pub type RU_W<'a, const O: u8> = crate::BitWriter<'a, u32, MODECNF0_SPEC, RU_A, O>; -impl<'a, const O: u8> RU_W<'a, O> { - #[doc = "Default ramp-up time (tRXEN), compatible with firmware written for nRF51"] - #[inline(always)] - pub fn default(self) -> &'a mut W { - self.variant(RU_A::DEFAULT) - } - #[doc = "Fast ramp-up (tRXEN,FAST), see electrical specification for more information"] - #[inline(always)] - pub fn fast(self) -> &'a mut W { - self.variant(RU_A::FAST) - } -} -#[doc = "Field `DTX` reader - Default TX value"] -pub type DTX_R = crate::FieldReader; -#[doc = "Default TX value\n\nValue on reset: 2"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -#[repr(u8)] -pub enum DTX_A { - #[doc = "0: Transmit '1'"] - B1 = 0, - #[doc = "1: Transmit '0'"] - B0 = 1, - #[doc = "2: Transmit center frequency"] - CENTER = 2, -} -impl From for u8 { - #[inline(always)] - fn from(variant: DTX_A) -> Self { - variant as _ - } -} -impl DTX_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> Option { - match self.bits { - 0 => Some(DTX_A::B1), - 1 => Some(DTX_A::B0), - 2 => Some(DTX_A::CENTER), - _ => None, - } - } - #[doc = "Checks if the value of the field is `B1`"] - #[inline(always)] - pub fn is_b1(&self) -> bool { - *self == DTX_A::B1 - } - #[doc = "Checks if the value of the field is `B0`"] - #[inline(always)] - pub fn is_b0(&self) -> bool { - *self == DTX_A::B0 - } - #[doc = "Checks if the value of the field is `CENTER`"] - #[inline(always)] - pub fn is_center(&self) -> bool { - *self == DTX_A::CENTER - } -} -#[doc = "Field `DTX` writer - Default TX value"] -pub type DTX_W<'a, const O: u8> = crate::FieldWriter<'a, u32, MODECNF0_SPEC, u8, DTX_A, 2, O>; -impl<'a, const O: u8> DTX_W<'a, O> { - #[doc = "Transmit '1'"] - #[inline(always)] - pub fn b1(self) -> &'a mut W { - self.variant(DTX_A::B1) - } - #[doc = "Transmit '0'"] - #[inline(always)] - pub fn b0(self) -> &'a mut W { - self.variant(DTX_A::B0) - } - #[doc = "Transmit center frequency"] - #[inline(always)] - pub fn center(self) -> &'a mut W { - self.variant(DTX_A::CENTER) - } -} -impl R { - #[doc = "Bit 0 - Radio ramp-up time"] - #[inline(always)] - pub fn ru(&self) -> RU_R { - RU_R::new((self.bits & 1) != 0) - } - #[doc = "Bits 8:9 - Default TX value"] - #[inline(always)] - pub fn dtx(&self) -> DTX_R { - DTX_R::new(((self.bits >> 8) & 3) as u8) - } -} -impl W { - #[doc = "Bit 0 - Radio ramp-up time"] - #[inline(always)] - #[must_use] - pub fn ru(&mut self) -> RU_W<0> { - RU_W::new(self) - } - #[doc = "Bits 8:9 - Default TX value"] - #[inline(always)] - #[must_use] - pub fn dtx(&mut self) -> DTX_W<8> { - DTX_W::new(self) - } - #[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 = "Radio mode configuration register 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 [modecnf0](index.html) module"] -pub struct MODECNF0_SPEC; -impl crate::RegisterSpec for MODECNF0_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [modecnf0::R](R) reader structure"] -impl crate::Readable for MODECNF0_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [modecnf0::W](W) writer structure"] -impl crate::Writable for MODECNF0_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets MODECNF0 to value 0x0200"] -impl crate::Resettable for MODECNF0_SPEC { - const RESET_VALUE: Self::Ux = 0x0200; -} diff --git a/down-the-stack/dk_pac/src/radio/packetptr.rs b/down-the-stack/dk_pac/src/radio/packetptr.rs deleted file mode 100644 index 6bde097..0000000 --- a/down-the-stack/dk_pac/src/radio/packetptr.rs +++ /dev/null @@ -1,81 +0,0 @@ -#[doc = "Register `PACKETPTR` 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 `PACKETPTR` 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 `PACKETPTR` reader - Packet pointer"] -pub type PACKETPTR_R = crate::FieldReader; -#[doc = "Field `PACKETPTR` writer - Packet pointer"] -pub type PACKETPTR_W<'a, const O: u8> = - crate::FieldWriter<'a, u32, PACKETPTR_SPEC, u32, u32, 32, O>; -impl R { - #[doc = "Bits 0:31 - Packet pointer"] - #[inline(always)] - pub fn packetptr(&self) -> PACKETPTR_R { - PACKETPTR_R::new(self.bits) - } -} -impl W { - #[doc = "Bits 0:31 - Packet pointer"] - #[inline(always)] - #[must_use] - pub fn packetptr(&mut self) -> PACKETPTR_W<0> { - PACKETPTR_W::new(self) - } - #[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 = "Packet pointer\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 [packetptr](index.html) module"] -pub struct PACKETPTR_SPEC; -impl crate::RegisterSpec for PACKETPTR_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [packetptr::R](R) reader structure"] -impl crate::Readable for PACKETPTR_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [packetptr::W](W) writer structure"] -impl crate::Writable for PACKETPTR_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets PACKETPTR to value 0"] -impl crate::Resettable for PACKETPTR_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/radio/pcnf0.rs b/down-the-stack/dk_pac/src/radio/pcnf0.rs deleted file mode 100644 index 21035f7..0000000 --- a/down-the-stack/dk_pac/src/radio/pcnf0.rs +++ /dev/null @@ -1,232 +0,0 @@ -#[doc = "Register `PCNF0` 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 `PCNF0` 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 `LFLEN` reader - Length on air of LENGTH field in number of bits."] -pub type LFLEN_R = crate::FieldReader; -#[doc = "Field `LFLEN` writer - Length on air of LENGTH field in number of bits."] -pub type LFLEN_W<'a, const O: u8> = crate::FieldWriter<'a, u32, PCNF0_SPEC, u8, u8, 4, O>; -#[doc = "Field `S0LEN` reader - Length on air of S0 field in number of bytes."] -pub type S0LEN_R = crate::BitReader; -#[doc = "Field `S0LEN` writer - Length on air of S0 field in number of bytes."] -pub type S0LEN_W<'a, const O: u8> = crate::BitWriter<'a, u32, PCNF0_SPEC, bool, O>; -#[doc = "Field `S1LEN` reader - Length on air of S1 field in number of bits."] -pub type S1LEN_R = crate::FieldReader; -#[doc = "Field `S1LEN` writer - Length on air of S1 field in number of bits."] -pub type S1LEN_W<'a, const O: u8> = crate::FieldWriter<'a, u32, PCNF0_SPEC, u8, u8, 4, O>; -#[doc = "Field `S1INCL` reader - Include or exclude S1 field in RAM"] -pub type S1INCL_R = crate::BitReader; -#[doc = "Include or exclude S1 field in RAM\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum S1INCL_A { - #[doc = "0: Include S1 field in RAM only if S1LEN > 0"] - AUTOMATIC = 0, - #[doc = "1: Always include S1 field in RAM independent of S1LEN"] - INCLUDE = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: S1INCL_A) -> Self { - variant as u8 != 0 - } -} -impl S1INCL_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> S1INCL_A { - match self.bits { - false => S1INCL_A::AUTOMATIC, - true => S1INCL_A::INCLUDE, - } - } - #[doc = "Checks if the value of the field is `AUTOMATIC`"] - #[inline(always)] - pub fn is_automatic(&self) -> bool { - *self == S1INCL_A::AUTOMATIC - } - #[doc = "Checks if the value of the field is `INCLUDE`"] - #[inline(always)] - pub fn is_include(&self) -> bool { - *self == S1INCL_A::INCLUDE - } -} -#[doc = "Field `S1INCL` writer - Include or exclude S1 field in RAM"] -pub type S1INCL_W<'a, const O: u8> = crate::BitWriter<'a, u32, PCNF0_SPEC, S1INCL_A, O>; -impl<'a, const O: u8> S1INCL_W<'a, O> { - #[doc = "Include S1 field in RAM only if S1LEN > 0"] - #[inline(always)] - pub fn automatic(self) -> &'a mut W { - self.variant(S1INCL_A::AUTOMATIC) - } - #[doc = "Always include S1 field in RAM independent of S1LEN"] - #[inline(always)] - pub fn include(self) -> &'a mut W { - self.variant(S1INCL_A::INCLUDE) - } -} -#[doc = "Field `PLEN` reader - Length of preamble on air. Decision point: TASKS_START task"] -pub type PLEN_R = crate::BitReader; -#[doc = "Length of preamble on air. Decision point: TASKS_START task\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PLEN_A { - #[doc = "0: 8-bit preamble"] - _8BIT = 0, - #[doc = "1: 16-bit preamble"] - _16BIT = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PLEN_A) -> Self { - variant as u8 != 0 - } -} -impl PLEN_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> PLEN_A { - match self.bits { - false => PLEN_A::_8BIT, - true => PLEN_A::_16BIT, - } - } - #[doc = "Checks if the value of the field is `_8BIT`"] - #[inline(always)] - pub fn is_8bit(&self) -> bool { - *self == PLEN_A::_8BIT - } - #[doc = "Checks if the value of the field is `_16BIT`"] - #[inline(always)] - pub fn is_16bit(&self) -> bool { - *self == PLEN_A::_16BIT - } -} -#[doc = "Field `PLEN` writer - Length of preamble on air. Decision point: TASKS_START task"] -pub type PLEN_W<'a, const O: u8> = crate::BitWriter<'a, u32, PCNF0_SPEC, PLEN_A, O>; -impl<'a, const O: u8> PLEN_W<'a, O> { - #[doc = "8-bit preamble"] - #[inline(always)] - pub fn _8bit(self) -> &'a mut W { - self.variant(PLEN_A::_8BIT) - } - #[doc = "16-bit preamble"] - #[inline(always)] - pub fn _16bit(self) -> &'a mut W { - self.variant(PLEN_A::_16BIT) - } -} -impl R { - #[doc = "Bits 0:3 - Length on air of LENGTH field in number of bits."] - #[inline(always)] - pub fn lflen(&self) -> LFLEN_R { - LFLEN_R::new((self.bits & 0x0f) as u8) - } - #[doc = "Bit 8 - Length on air of S0 field in number of bytes."] - #[inline(always)] - pub fn s0len(&self) -> S0LEN_R { - S0LEN_R::new(((self.bits >> 8) & 1) != 0) - } - #[doc = "Bits 16:19 - Length on air of S1 field in number of bits."] - #[inline(always)] - pub fn s1len(&self) -> S1LEN_R { - S1LEN_R::new(((self.bits >> 16) & 0x0f) as u8) - } - #[doc = "Bit 20 - Include or exclude S1 field in RAM"] - #[inline(always)] - pub fn s1incl(&self) -> S1INCL_R { - S1INCL_R::new(((self.bits >> 20) & 1) != 0) - } - #[doc = "Bit 24 - Length of preamble on air. Decision point: TASKS_START task"] - #[inline(always)] - pub fn plen(&self) -> PLEN_R { - PLEN_R::new(((self.bits >> 24) & 1) != 0) - } -} -impl W { - #[doc = "Bits 0:3 - Length on air of LENGTH field in number of bits."] - #[inline(always)] - #[must_use] - pub fn lflen(&mut self) -> LFLEN_W<0> { - LFLEN_W::new(self) - } - #[doc = "Bit 8 - Length on air of S0 field in number of bytes."] - #[inline(always)] - #[must_use] - pub fn s0len(&mut self) -> S0LEN_W<8> { - S0LEN_W::new(self) - } - #[doc = "Bits 16:19 - Length on air of S1 field in number of bits."] - #[inline(always)] - #[must_use] - pub fn s1len(&mut self) -> S1LEN_W<16> { - S1LEN_W::new(self) - } - #[doc = "Bit 20 - Include or exclude S1 field in RAM"] - #[inline(always)] - #[must_use] - pub fn s1incl(&mut self) -> S1INCL_W<20> { - S1INCL_W::new(self) - } - #[doc = "Bit 24 - Length of preamble on air. Decision point: TASKS_START task"] - #[inline(always)] - #[must_use] - pub fn plen(&mut self) -> PLEN_W<24> { - PLEN_W::new(self) - } - #[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 = "Packet configuration register 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 [pcnf0](index.html) module"] -pub struct PCNF0_SPEC; -impl crate::RegisterSpec for PCNF0_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [pcnf0::R](R) reader structure"] -impl crate::Readable for PCNF0_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [pcnf0::W](W) writer structure"] -impl crate::Writable for PCNF0_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets PCNF0 to value 0"] -impl crate::Resettable for PCNF0_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/radio/pcnf1.rs b/down-the-stack/dk_pac/src/radio/pcnf1.rs deleted file mode 100644 index 7e60f07..0000000 --- a/down-the-stack/dk_pac/src/radio/pcnf1.rs +++ /dev/null @@ -1,232 +0,0 @@ -#[doc = "Register `PCNF1` 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 `PCNF1` 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 `MAXLEN` reader - Maximum length of packet payload. If the packet payload is larger than MAXLEN, the radio will truncate the payload to MAXLEN."] -pub type MAXLEN_R = crate::FieldReader; -#[doc = "Field `MAXLEN` writer - Maximum length of packet payload. If the packet payload is larger than MAXLEN, the radio will truncate the payload to MAXLEN."] -pub type MAXLEN_W<'a, const O: u8> = crate::FieldWriter<'a, u32, PCNF1_SPEC, u8, u8, 8, O>; -#[doc = "Field `STATLEN` reader - Static length in number of bytes"] -pub type STATLEN_R = crate::FieldReader; -#[doc = "Field `STATLEN` writer - Static length in number of bytes"] -pub type STATLEN_W<'a, const O: u8> = crate::FieldWriter<'a, u32, PCNF1_SPEC, u8, u8, 8, O>; -#[doc = "Field `BALEN` reader - Base address length in number of bytes"] -pub type BALEN_R = crate::FieldReader; -#[doc = "Field `BALEN` writer - Base address length in number of bytes"] -pub type BALEN_W<'a, const O: u8> = crate::FieldWriter<'a, u32, PCNF1_SPEC, u8, u8, 3, O>; -#[doc = "Field `ENDIAN` reader - On air endianness of packet, this applies to the S0, LENGTH, S1 and the PAYLOAD fields."] -pub type ENDIAN_R = crate::BitReader; -#[doc = "On air endianness of packet, this applies to the S0, LENGTH, S1 and the PAYLOAD fields.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum ENDIAN_A { - #[doc = "0: Least Significant bit on air first"] - LITTLE = 0, - #[doc = "1: Most significant bit on air first"] - BIG = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: ENDIAN_A) -> Self { - variant as u8 != 0 - } -} -impl ENDIAN_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> ENDIAN_A { - match self.bits { - false => ENDIAN_A::LITTLE, - true => ENDIAN_A::BIG, - } - } - #[doc = "Checks if the value of the field is `LITTLE`"] - #[inline(always)] - pub fn is_little(&self) -> bool { - *self == ENDIAN_A::LITTLE - } - #[doc = "Checks if the value of the field is `BIG`"] - #[inline(always)] - pub fn is_big(&self) -> bool { - *self == ENDIAN_A::BIG - } -} -#[doc = "Field `ENDIAN` writer - On air endianness of packet, this applies to the S0, LENGTH, S1 and the PAYLOAD fields."] -pub type ENDIAN_W<'a, const O: u8> = crate::BitWriter<'a, u32, PCNF1_SPEC, ENDIAN_A, O>; -impl<'a, const O: u8> ENDIAN_W<'a, O> { - #[doc = "Least Significant bit on air first"] - #[inline(always)] - pub fn little(self) -> &'a mut W { - self.variant(ENDIAN_A::LITTLE) - } - #[doc = "Most significant bit on air first"] - #[inline(always)] - pub fn big(self) -> &'a mut W { - self.variant(ENDIAN_A::BIG) - } -} -#[doc = "Field `WHITEEN` reader - Enable or disable packet whitening"] -pub type WHITEEN_R = crate::BitReader; -#[doc = "Enable or disable packet whitening\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum WHITEEN_A { - #[doc = "0: Disable"] - DISABLED = 0, - #[doc = "1: Enable"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: WHITEEN_A) -> Self { - variant as u8 != 0 - } -} -impl WHITEEN_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> WHITEEN_A { - match self.bits { - false => WHITEEN_A::DISABLED, - true => WHITEEN_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == WHITEEN_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == WHITEEN_A::ENABLED - } -} -#[doc = "Field `WHITEEN` writer - Enable or disable packet whitening"] -pub type WHITEEN_W<'a, const O: u8> = crate::BitWriter<'a, u32, PCNF1_SPEC, WHITEEN_A, O>; -impl<'a, const O: u8> WHITEEN_W<'a, O> { - #[doc = "Disable"] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(WHITEEN_A::DISABLED) - } - #[doc = "Enable"] - #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(WHITEEN_A::ENABLED) - } -} -impl R { - #[doc = "Bits 0:7 - Maximum length of packet payload. If the packet payload is larger than MAXLEN, the radio will truncate the payload to MAXLEN."] - #[inline(always)] - pub fn maxlen(&self) -> MAXLEN_R { - MAXLEN_R::new((self.bits & 0xff) as u8) - } - #[doc = "Bits 8:15 - Static length in number of bytes"] - #[inline(always)] - pub fn statlen(&self) -> STATLEN_R { - STATLEN_R::new(((self.bits >> 8) & 0xff) as u8) - } - #[doc = "Bits 16:18 - Base address length in number of bytes"] - #[inline(always)] - pub fn balen(&self) -> BALEN_R { - BALEN_R::new(((self.bits >> 16) & 7) as u8) - } - #[doc = "Bit 24 - On air endianness of packet, this applies to the S0, LENGTH, S1 and the PAYLOAD fields."] - #[inline(always)] - pub fn endian(&self) -> ENDIAN_R { - ENDIAN_R::new(((self.bits >> 24) & 1) != 0) - } - #[doc = "Bit 25 - Enable or disable packet whitening"] - #[inline(always)] - pub fn whiteen(&self) -> WHITEEN_R { - WHITEEN_R::new(((self.bits >> 25) & 1) != 0) - } -} -impl W { - #[doc = "Bits 0:7 - Maximum length of packet payload. If the packet payload is larger than MAXLEN, the radio will truncate the payload to MAXLEN."] - #[inline(always)] - #[must_use] - pub fn maxlen(&mut self) -> MAXLEN_W<0> { - MAXLEN_W::new(self) - } - #[doc = "Bits 8:15 - Static length in number of bytes"] - #[inline(always)] - #[must_use] - pub fn statlen(&mut self) -> STATLEN_W<8> { - STATLEN_W::new(self) - } - #[doc = "Bits 16:18 - Base address length in number of bytes"] - #[inline(always)] - #[must_use] - pub fn balen(&mut self) -> BALEN_W<16> { - BALEN_W::new(self) - } - #[doc = "Bit 24 - On air endianness of packet, this applies to the S0, LENGTH, S1 and the PAYLOAD fields."] - #[inline(always)] - #[must_use] - pub fn endian(&mut self) -> ENDIAN_W<24> { - ENDIAN_W::new(self) - } - #[doc = "Bit 25 - Enable or disable packet whitening"] - #[inline(always)] - #[must_use] - pub fn whiteen(&mut self) -> WHITEEN_W<25> { - WHITEEN_W::new(self) - } - #[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 = "Packet configuration register 1\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 [pcnf1](index.html) module"] -pub struct PCNF1_SPEC; -impl crate::RegisterSpec for PCNF1_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [pcnf1::R](R) reader structure"] -impl crate::Readable for PCNF1_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [pcnf1::W](W) writer structure"] -impl crate::Writable for PCNF1_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets PCNF1 to value 0"] -impl crate::Resettable for PCNF1_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/radio/power.rs b/down-the-stack/dk_pac/src/radio/power.rs deleted file mode 100644 index 1e13d44..0000000 --- a/down-the-stack/dk_pac/src/radio/power.rs +++ /dev/null @@ -1,126 +0,0 @@ -#[doc = "Register `POWER` 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 `POWER` 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 `POWER` reader - Peripheral power control. The peripheral and its registers will be reset to its initial state by switching the peripheral off and then back on again."] -pub type POWER_R = crate::BitReader; -#[doc = "Peripheral power control. The peripheral and its registers will be reset to its initial state by switching the peripheral off and then back on again.\n\nValue on reset: 1"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum POWER_A { - #[doc = "0: Peripheral is powered off"] - DISABLED = 0, - #[doc = "1: Peripheral is powered on"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: POWER_A) -> Self { - variant as u8 != 0 - } -} -impl POWER_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> POWER_A { - match self.bits { - false => POWER_A::DISABLED, - true => POWER_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == POWER_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == POWER_A::ENABLED - } -} -#[doc = "Field `POWER` writer - Peripheral power control. The peripheral and its registers will be reset to its initial state by switching the peripheral off and then back on again."] -pub type POWER_W<'a, const O: u8> = crate::BitWriter<'a, u32, POWER_SPEC, POWER_A, O>; -impl<'a, const O: u8> POWER_W<'a, O> { - #[doc = "Peripheral is powered off"] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(POWER_A::DISABLED) - } - #[doc = "Peripheral is powered on"] - #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(POWER_A::ENABLED) - } -} -impl R { - #[doc = "Bit 0 - Peripheral power control. The peripheral and its registers will be reset to its initial state by switching the peripheral off and then back on again."] - #[inline(always)] - pub fn power(&self) -> POWER_R { - POWER_R::new((self.bits & 1) != 0) - } -} -impl W { - #[doc = "Bit 0 - Peripheral power control. The peripheral and its registers will be reset to its initial state by switching the peripheral off and then back on again."] - #[inline(always)] - #[must_use] - pub fn power(&mut self) -> POWER_W<0> { - POWER_W::new(self) - } - #[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 = "Peripheral power control\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 [power](index.html) module"] -pub struct POWER_SPEC; -impl crate::RegisterSpec for POWER_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [power::R](R) reader structure"] -impl crate::Readable for POWER_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [power::W](W) writer structure"] -impl crate::Writable for POWER_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets POWER to value 0x01"] -impl crate::Resettable for POWER_SPEC { - const RESET_VALUE: Self::Ux = 0x01; -} diff --git a/down-the-stack/dk_pac/src/radio/prefix0.rs b/down-the-stack/dk_pac/src/radio/prefix0.rs deleted file mode 100644 index 40e993a..0000000 --- a/down-the-stack/dk_pac/src/radio/prefix0.rs +++ /dev/null @@ -1,125 +0,0 @@ -#[doc = "Register `PREFIX0` 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 `PREFIX0` 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 `AP0` reader - Address prefix 0."] -pub type AP0_R = crate::FieldReader; -#[doc = "Field `AP0` writer - Address prefix 0."] -pub type AP0_W<'a, const O: u8> = crate::FieldWriter<'a, u32, PREFIX0_SPEC, u8, u8, 8, O>; -#[doc = "Field `AP1` reader - Address prefix 1."] -pub type AP1_R = crate::FieldReader; -#[doc = "Field `AP1` writer - Address prefix 1."] -pub type AP1_W<'a, const O: u8> = crate::FieldWriter<'a, u32, PREFIX0_SPEC, u8, u8, 8, O>; -#[doc = "Field `AP2` reader - Address prefix 2."] -pub type AP2_R = crate::FieldReader; -#[doc = "Field `AP2` writer - Address prefix 2."] -pub type AP2_W<'a, const O: u8> = crate::FieldWriter<'a, u32, PREFIX0_SPEC, u8, u8, 8, O>; -#[doc = "Field `AP3` reader - Address prefix 3."] -pub type AP3_R = crate::FieldReader; -#[doc = "Field `AP3` writer - Address prefix 3."] -pub type AP3_W<'a, const O: u8> = crate::FieldWriter<'a, u32, PREFIX0_SPEC, u8, u8, 8, O>; -impl R { - #[doc = "Bits 0:7 - Address prefix 0."] - #[inline(always)] - pub fn ap0(&self) -> AP0_R { - AP0_R::new((self.bits & 0xff) as u8) - } - #[doc = "Bits 8:15 - Address prefix 1."] - #[inline(always)] - pub fn ap1(&self) -> AP1_R { - AP1_R::new(((self.bits >> 8) & 0xff) as u8) - } - #[doc = "Bits 16:23 - Address prefix 2."] - #[inline(always)] - pub fn ap2(&self) -> AP2_R { - AP2_R::new(((self.bits >> 16) & 0xff) as u8) - } - #[doc = "Bits 24:31 - Address prefix 3."] - #[inline(always)] - pub fn ap3(&self) -> AP3_R { - AP3_R::new(((self.bits >> 24) & 0xff) as u8) - } -} -impl W { - #[doc = "Bits 0:7 - Address prefix 0."] - #[inline(always)] - #[must_use] - pub fn ap0(&mut self) -> AP0_W<0> { - AP0_W::new(self) - } - #[doc = "Bits 8:15 - Address prefix 1."] - #[inline(always)] - #[must_use] - pub fn ap1(&mut self) -> AP1_W<8> { - AP1_W::new(self) - } - #[doc = "Bits 16:23 - Address prefix 2."] - #[inline(always)] - #[must_use] - pub fn ap2(&mut self) -> AP2_W<16> { - AP2_W::new(self) - } - #[doc = "Bits 24:31 - Address prefix 3."] - #[inline(always)] - #[must_use] - pub fn ap3(&mut self) -> AP3_W<24> { - AP3_W::new(self) - } - #[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 = "Prefixes bytes for logical addresses 0-3\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 [prefix0](index.html) module"] -pub struct PREFIX0_SPEC; -impl crate::RegisterSpec for PREFIX0_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [prefix0::R](R) reader structure"] -impl crate::Readable for PREFIX0_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [prefix0::W](W) writer structure"] -impl crate::Writable for PREFIX0_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets PREFIX0 to value 0"] -impl crate::Resettable for PREFIX0_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/radio/prefix1.rs b/down-the-stack/dk_pac/src/radio/prefix1.rs deleted file mode 100644 index 7302f62..0000000 --- a/down-the-stack/dk_pac/src/radio/prefix1.rs +++ /dev/null @@ -1,125 +0,0 @@ -#[doc = "Register `PREFIX1` 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 `PREFIX1` 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 `AP4` reader - Address prefix 4."] -pub type AP4_R = crate::FieldReader; -#[doc = "Field `AP4` writer - Address prefix 4."] -pub type AP4_W<'a, const O: u8> = crate::FieldWriter<'a, u32, PREFIX1_SPEC, u8, u8, 8, O>; -#[doc = "Field `AP5` reader - Address prefix 5."] -pub type AP5_R = crate::FieldReader; -#[doc = "Field `AP5` writer - Address prefix 5."] -pub type AP5_W<'a, const O: u8> = crate::FieldWriter<'a, u32, PREFIX1_SPEC, u8, u8, 8, O>; -#[doc = "Field `AP6` reader - Address prefix 6."] -pub type AP6_R = crate::FieldReader; -#[doc = "Field `AP6` writer - Address prefix 6."] -pub type AP6_W<'a, const O: u8> = crate::FieldWriter<'a, u32, PREFIX1_SPEC, u8, u8, 8, O>; -#[doc = "Field `AP7` reader - Address prefix 7."] -pub type AP7_R = crate::FieldReader; -#[doc = "Field `AP7` writer - Address prefix 7."] -pub type AP7_W<'a, const O: u8> = crate::FieldWriter<'a, u32, PREFIX1_SPEC, u8, u8, 8, O>; -impl R { - #[doc = "Bits 0:7 - Address prefix 4."] - #[inline(always)] - pub fn ap4(&self) -> AP4_R { - AP4_R::new((self.bits & 0xff) as u8) - } - #[doc = "Bits 8:15 - Address prefix 5."] - #[inline(always)] - pub fn ap5(&self) -> AP5_R { - AP5_R::new(((self.bits >> 8) & 0xff) as u8) - } - #[doc = "Bits 16:23 - Address prefix 6."] - #[inline(always)] - pub fn ap6(&self) -> AP6_R { - AP6_R::new(((self.bits >> 16) & 0xff) as u8) - } - #[doc = "Bits 24:31 - Address prefix 7."] - #[inline(always)] - pub fn ap7(&self) -> AP7_R { - AP7_R::new(((self.bits >> 24) & 0xff) as u8) - } -} -impl W { - #[doc = "Bits 0:7 - Address prefix 4."] - #[inline(always)] - #[must_use] - pub fn ap4(&mut self) -> AP4_W<0> { - AP4_W::new(self) - } - #[doc = "Bits 8:15 - Address prefix 5."] - #[inline(always)] - #[must_use] - pub fn ap5(&mut self) -> AP5_W<8> { - AP5_W::new(self) - } - #[doc = "Bits 16:23 - Address prefix 6."] - #[inline(always)] - #[must_use] - pub fn ap6(&mut self) -> AP6_W<16> { - AP6_W::new(self) - } - #[doc = "Bits 24:31 - Address prefix 7."] - #[inline(always)] - #[must_use] - pub fn ap7(&mut self) -> AP7_W<24> { - AP7_W::new(self) - } - #[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 = "Prefixes bytes for logical addresses 4-7\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 [prefix1](index.html) module"] -pub struct PREFIX1_SPEC; -impl crate::RegisterSpec for PREFIX1_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [prefix1::R](R) reader structure"] -impl crate::Readable for PREFIX1_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [prefix1::W](W) writer structure"] -impl crate::Writable for PREFIX1_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets PREFIX1 to value 0"] -impl crate::Resettable for PREFIX1_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/radio/rssisample.rs b/down-the-stack/dk_pac/src/radio/rssisample.rs deleted file mode 100644 index 6aebe34..0000000 --- a/down-the-stack/dk_pac/src/radio/rssisample.rs +++ /dev/null @@ -1,37 +0,0 @@ -#[doc = "Register `RSSISAMPLE` 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 = "Field `RSSISAMPLE` reader - RSSI sample"] -pub type RSSISAMPLE_R = crate::FieldReader; -impl R { - #[doc = "Bits 0:6 - RSSI sample"] - #[inline(always)] - pub fn rssisample(&self) -> RSSISAMPLE_R { - RSSISAMPLE_R::new((self.bits & 0x7f) as u8) - } -} -#[doc = "RSSI sample\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 [rssisample](index.html) module"] -pub struct RSSISAMPLE_SPEC; -impl crate::RegisterSpec for RSSISAMPLE_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [rssisample::R](R) reader structure"] -impl crate::Readable for RSSISAMPLE_SPEC { - type Reader = R; -} -#[doc = "`reset()` method sets RSSISAMPLE to value 0"] -impl crate::Resettable for RSSISAMPLE_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/radio/rxaddresses.rs b/down-the-stack/dk_pac/src/radio/rxaddresses.rs deleted file mode 100644 index b20ccde..0000000 --- a/down-the-stack/dk_pac/src/radio/rxaddresses.rs +++ /dev/null @@ -1,553 +0,0 @@ -#[doc = "Register `RXADDRESSES` 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 `RXADDRESSES` 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 `ADDR0` reader - Enable or disable reception on logical address 0."] -pub type ADDR0_R = crate::BitReader; -#[doc = "Enable or disable reception on logical address 0.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum ADDR0_A { - #[doc = "0: Disable"] - DISABLED = 0, - #[doc = "1: Enable"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: ADDR0_A) -> Self { - variant as u8 != 0 - } -} -impl ADDR0_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> ADDR0_A { - match self.bits { - false => ADDR0_A::DISABLED, - true => ADDR0_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == ADDR0_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == ADDR0_A::ENABLED - } -} -#[doc = "Field `ADDR0` writer - Enable or disable reception on logical address 0."] -pub type ADDR0_W<'a, const O: u8> = crate::BitWriter<'a, u32, RXADDRESSES_SPEC, ADDR0_A, O>; -impl<'a, const O: u8> ADDR0_W<'a, O> { - #[doc = "Disable"] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(ADDR0_A::DISABLED) - } - #[doc = "Enable"] - #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(ADDR0_A::ENABLED) - } -} -#[doc = "Field `ADDR1` reader - Enable or disable reception on logical address 1."] -pub type ADDR1_R = crate::BitReader; -#[doc = "Enable or disable reception on logical address 1.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum ADDR1_A { - #[doc = "0: Disable"] - DISABLED = 0, - #[doc = "1: Enable"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: ADDR1_A) -> Self { - variant as u8 != 0 - } -} -impl ADDR1_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> ADDR1_A { - match self.bits { - false => ADDR1_A::DISABLED, - true => ADDR1_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == ADDR1_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == ADDR1_A::ENABLED - } -} -#[doc = "Field `ADDR1` writer - Enable or disable reception on logical address 1."] -pub type ADDR1_W<'a, const O: u8> = crate::BitWriter<'a, u32, RXADDRESSES_SPEC, ADDR1_A, O>; -impl<'a, const O: u8> ADDR1_W<'a, O> { - #[doc = "Disable"] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(ADDR1_A::DISABLED) - } - #[doc = "Enable"] - #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(ADDR1_A::ENABLED) - } -} -#[doc = "Field `ADDR2` reader - Enable or disable reception on logical address 2."] -pub type ADDR2_R = crate::BitReader; -#[doc = "Enable or disable reception on logical address 2.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum ADDR2_A { - #[doc = "0: Disable"] - DISABLED = 0, - #[doc = "1: Enable"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: ADDR2_A) -> Self { - variant as u8 != 0 - } -} -impl ADDR2_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> ADDR2_A { - match self.bits { - false => ADDR2_A::DISABLED, - true => ADDR2_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == ADDR2_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == ADDR2_A::ENABLED - } -} -#[doc = "Field `ADDR2` writer - Enable or disable reception on logical address 2."] -pub type ADDR2_W<'a, const O: u8> = crate::BitWriter<'a, u32, RXADDRESSES_SPEC, ADDR2_A, O>; -impl<'a, const O: u8> ADDR2_W<'a, O> { - #[doc = "Disable"] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(ADDR2_A::DISABLED) - } - #[doc = "Enable"] - #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(ADDR2_A::ENABLED) - } -} -#[doc = "Field `ADDR3` reader - Enable or disable reception on logical address 3."] -pub type ADDR3_R = crate::BitReader; -#[doc = "Enable or disable reception on logical address 3.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum ADDR3_A { - #[doc = "0: Disable"] - DISABLED = 0, - #[doc = "1: Enable"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: ADDR3_A) -> Self { - variant as u8 != 0 - } -} -impl ADDR3_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> ADDR3_A { - match self.bits { - false => ADDR3_A::DISABLED, - true => ADDR3_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == ADDR3_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == ADDR3_A::ENABLED - } -} -#[doc = "Field `ADDR3` writer - Enable or disable reception on logical address 3."] -pub type ADDR3_W<'a, const O: u8> = crate::BitWriter<'a, u32, RXADDRESSES_SPEC, ADDR3_A, O>; -impl<'a, const O: u8> ADDR3_W<'a, O> { - #[doc = "Disable"] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(ADDR3_A::DISABLED) - } - #[doc = "Enable"] - #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(ADDR3_A::ENABLED) - } -} -#[doc = "Field `ADDR4` reader - Enable or disable reception on logical address 4."] -pub type ADDR4_R = crate::BitReader; -#[doc = "Enable or disable reception on logical address 4.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum ADDR4_A { - #[doc = "0: Disable"] - DISABLED = 0, - #[doc = "1: Enable"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: ADDR4_A) -> Self { - variant as u8 != 0 - } -} -impl ADDR4_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> ADDR4_A { - match self.bits { - false => ADDR4_A::DISABLED, - true => ADDR4_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == ADDR4_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == ADDR4_A::ENABLED - } -} -#[doc = "Field `ADDR4` writer - Enable or disable reception on logical address 4."] -pub type ADDR4_W<'a, const O: u8> = crate::BitWriter<'a, u32, RXADDRESSES_SPEC, ADDR4_A, O>; -impl<'a, const O: u8> ADDR4_W<'a, O> { - #[doc = "Disable"] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(ADDR4_A::DISABLED) - } - #[doc = "Enable"] - #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(ADDR4_A::ENABLED) - } -} -#[doc = "Field `ADDR5` reader - Enable or disable reception on logical address 5."] -pub type ADDR5_R = crate::BitReader; -#[doc = "Enable or disable reception on logical address 5.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum ADDR5_A { - #[doc = "0: Disable"] - DISABLED = 0, - #[doc = "1: Enable"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: ADDR5_A) -> Self { - variant as u8 != 0 - } -} -impl ADDR5_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> ADDR5_A { - match self.bits { - false => ADDR5_A::DISABLED, - true => ADDR5_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == ADDR5_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == ADDR5_A::ENABLED - } -} -#[doc = "Field `ADDR5` writer - Enable or disable reception on logical address 5."] -pub type ADDR5_W<'a, const O: u8> = crate::BitWriter<'a, u32, RXADDRESSES_SPEC, ADDR5_A, O>; -impl<'a, const O: u8> ADDR5_W<'a, O> { - #[doc = "Disable"] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(ADDR5_A::DISABLED) - } - #[doc = "Enable"] - #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(ADDR5_A::ENABLED) - } -} -#[doc = "Field `ADDR6` reader - Enable or disable reception on logical address 6."] -pub type ADDR6_R = crate::BitReader; -#[doc = "Enable or disable reception on logical address 6.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum ADDR6_A { - #[doc = "0: Disable"] - DISABLED = 0, - #[doc = "1: Enable"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: ADDR6_A) -> Self { - variant as u8 != 0 - } -} -impl ADDR6_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> ADDR6_A { - match self.bits { - false => ADDR6_A::DISABLED, - true => ADDR6_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == ADDR6_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == ADDR6_A::ENABLED - } -} -#[doc = "Field `ADDR6` writer - Enable or disable reception on logical address 6."] -pub type ADDR6_W<'a, const O: u8> = crate::BitWriter<'a, u32, RXADDRESSES_SPEC, ADDR6_A, O>; -impl<'a, const O: u8> ADDR6_W<'a, O> { - #[doc = "Disable"] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(ADDR6_A::DISABLED) - } - #[doc = "Enable"] - #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(ADDR6_A::ENABLED) - } -} -#[doc = "Field `ADDR7` reader - Enable or disable reception on logical address 7."] -pub type ADDR7_R = crate::BitReader; -#[doc = "Enable or disable reception on logical address 7.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum ADDR7_A { - #[doc = "0: Disable"] - DISABLED = 0, - #[doc = "1: Enable"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: ADDR7_A) -> Self { - variant as u8 != 0 - } -} -impl ADDR7_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> ADDR7_A { - match self.bits { - false => ADDR7_A::DISABLED, - true => ADDR7_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == ADDR7_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == ADDR7_A::ENABLED - } -} -#[doc = "Field `ADDR7` writer - Enable or disable reception on logical address 7."] -pub type ADDR7_W<'a, const O: u8> = crate::BitWriter<'a, u32, RXADDRESSES_SPEC, ADDR7_A, O>; -impl<'a, const O: u8> ADDR7_W<'a, O> { - #[doc = "Disable"] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(ADDR7_A::DISABLED) - } - #[doc = "Enable"] - #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(ADDR7_A::ENABLED) - } -} -impl R { - #[doc = "Bit 0 - Enable or disable reception on logical address 0."] - #[inline(always)] - pub fn addr0(&self) -> ADDR0_R { - ADDR0_R::new((self.bits & 1) != 0) - } - #[doc = "Bit 1 - Enable or disable reception on logical address 1."] - #[inline(always)] - pub fn addr1(&self) -> ADDR1_R { - ADDR1_R::new(((self.bits >> 1) & 1) != 0) - } - #[doc = "Bit 2 - Enable or disable reception on logical address 2."] - #[inline(always)] - pub fn addr2(&self) -> ADDR2_R { - ADDR2_R::new(((self.bits >> 2) & 1) != 0) - } - #[doc = "Bit 3 - Enable or disable reception on logical address 3."] - #[inline(always)] - pub fn addr3(&self) -> ADDR3_R { - ADDR3_R::new(((self.bits >> 3) & 1) != 0) - } - #[doc = "Bit 4 - Enable or disable reception on logical address 4."] - #[inline(always)] - pub fn addr4(&self) -> ADDR4_R { - ADDR4_R::new(((self.bits >> 4) & 1) != 0) - } - #[doc = "Bit 5 - Enable or disable reception on logical address 5."] - #[inline(always)] - pub fn addr5(&self) -> ADDR5_R { - ADDR5_R::new(((self.bits >> 5) & 1) != 0) - } - #[doc = "Bit 6 - Enable or disable reception on logical address 6."] - #[inline(always)] - pub fn addr6(&self) -> ADDR6_R { - ADDR6_R::new(((self.bits >> 6) & 1) != 0) - } - #[doc = "Bit 7 - Enable or disable reception on logical address 7."] - #[inline(always)] - pub fn addr7(&self) -> ADDR7_R { - ADDR7_R::new(((self.bits >> 7) & 1) != 0) - } -} -impl W { - #[doc = "Bit 0 - Enable or disable reception on logical address 0."] - #[inline(always)] - #[must_use] - pub fn addr0(&mut self) -> ADDR0_W<0> { - ADDR0_W::new(self) - } - #[doc = "Bit 1 - Enable or disable reception on logical address 1."] - #[inline(always)] - #[must_use] - pub fn addr1(&mut self) -> ADDR1_W<1> { - ADDR1_W::new(self) - } - #[doc = "Bit 2 - Enable or disable reception on logical address 2."] - #[inline(always)] - #[must_use] - pub fn addr2(&mut self) -> ADDR2_W<2> { - ADDR2_W::new(self) - } - #[doc = "Bit 3 - Enable or disable reception on logical address 3."] - #[inline(always)] - #[must_use] - pub fn addr3(&mut self) -> ADDR3_W<3> { - ADDR3_W::new(self) - } - #[doc = "Bit 4 - Enable or disable reception on logical address 4."] - #[inline(always)] - #[must_use] - pub fn addr4(&mut self) -> ADDR4_W<4> { - ADDR4_W::new(self) - } - #[doc = "Bit 5 - Enable or disable reception on logical address 5."] - #[inline(always)] - #[must_use] - pub fn addr5(&mut self) -> ADDR5_W<5> { - ADDR5_W::new(self) - } - #[doc = "Bit 6 - Enable or disable reception on logical address 6."] - #[inline(always)] - #[must_use] - pub fn addr6(&mut self) -> ADDR6_W<6> { - ADDR6_W::new(self) - } - #[doc = "Bit 7 - Enable or disable reception on logical address 7."] - #[inline(always)] - #[must_use] - pub fn addr7(&mut self) -> ADDR7_W<7> { - ADDR7_W::new(self) - } - #[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 = "Receive address select\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 [rxaddresses](index.html) module"] -pub struct RXADDRESSES_SPEC; -impl crate::RegisterSpec for RXADDRESSES_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [rxaddresses::R](R) reader structure"] -impl crate::Readable for RXADDRESSES_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [rxaddresses::W](W) writer structure"] -impl crate::Writable for RXADDRESSES_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets RXADDRESSES to value 0"] -impl crate::Resettable for RXADDRESSES_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/radio/rxcrc.rs b/down-the-stack/dk_pac/src/radio/rxcrc.rs deleted file mode 100644 index 32dcdc1..0000000 --- a/down-the-stack/dk_pac/src/radio/rxcrc.rs +++ /dev/null @@ -1,37 +0,0 @@ -#[doc = "Register `RXCRC` 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 = "Field `RXCRC` reader - CRC field of previously received packet"] -pub type RXCRC_R = crate::FieldReader; -impl R { - #[doc = "Bits 0:23 - CRC field of previously received packet"] - #[inline(always)] - pub fn rxcrc(&self) -> RXCRC_R { - RXCRC_R::new(self.bits & 0x00ff_ffff) - } -} -#[doc = "CRC field of previously received packet\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 [rxcrc](index.html) module"] -pub struct RXCRC_SPEC; -impl crate::RegisterSpec for RXCRC_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [rxcrc::R](R) reader structure"] -impl crate::Readable for RXCRC_SPEC { - type Reader = R; -} -#[doc = "`reset()` method sets RXCRC to value 0"] -impl crate::Resettable for RXCRC_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/radio/rxmatch.rs b/down-the-stack/dk_pac/src/radio/rxmatch.rs deleted file mode 100644 index 66b9d78..0000000 --- a/down-the-stack/dk_pac/src/radio/rxmatch.rs +++ /dev/null @@ -1,37 +0,0 @@ -#[doc = "Register `RXMATCH` 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 = "Field `RXMATCH` reader - Received address"] -pub type RXMATCH_R = crate::FieldReader; -impl R { - #[doc = "Bits 0:2 - Received address"] - #[inline(always)] - pub fn rxmatch(&self) -> RXMATCH_R { - RXMATCH_R::new((self.bits & 7) as u8) - } -} -#[doc = "Received address\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 [rxmatch](index.html) module"] -pub struct RXMATCH_SPEC; -impl crate::RegisterSpec for RXMATCH_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [rxmatch::R](R) reader structure"] -impl crate::Readable for RXMATCH_SPEC { - type Reader = R; -} -#[doc = "`reset()` method sets RXMATCH to value 0"] -impl crate::Resettable for RXMATCH_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/radio/shorts.rs b/down-the-stack/dk_pac/src/radio/shorts.rs deleted file mode 100644 index f297e6a..0000000 --- a/down-the-stack/dk_pac/src/radio/shorts.rs +++ /dev/null @@ -1,558 +0,0 @@ -#[doc = "Register `SHORTS` 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 `SHORTS` 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 `READY_START` reader - Shortcut between event READY and task START"] -pub type READY_START_R = crate::BitReader; -#[doc = "Shortcut between event READY and task START\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum READY_START_A { - #[doc = "0: Disable shortcut"] - DISABLED = 0, - #[doc = "1: Enable shortcut"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: READY_START_A) -> Self { - variant as u8 != 0 - } -} -impl READY_START_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> READY_START_A { - match self.bits { - false => READY_START_A::DISABLED, - true => READY_START_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == READY_START_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == READY_START_A::ENABLED - } -} -#[doc = "Field `READY_START` writer - Shortcut between event READY and task START"] -pub type READY_START_W<'a, const O: u8> = crate::BitWriter<'a, u32, SHORTS_SPEC, READY_START_A, O>; -impl<'a, const O: u8> READY_START_W<'a, O> { - #[doc = "Disable shortcut"] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(READY_START_A::DISABLED) - } - #[doc = "Enable shortcut"] - #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(READY_START_A::ENABLED) - } -} -#[doc = "Field `END_DISABLE` reader - Shortcut between event END and task DISABLE"] -pub type END_DISABLE_R = crate::BitReader; -#[doc = "Shortcut between event END and task DISABLE\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum END_DISABLE_A { - #[doc = "0: Disable shortcut"] - DISABLED = 0, - #[doc = "1: Enable shortcut"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: END_DISABLE_A) -> Self { - variant as u8 != 0 - } -} -impl END_DISABLE_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> END_DISABLE_A { - match self.bits { - false => END_DISABLE_A::DISABLED, - true => END_DISABLE_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == END_DISABLE_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == END_DISABLE_A::ENABLED - } -} -#[doc = "Field `END_DISABLE` writer - Shortcut between event END and task DISABLE"] -pub type END_DISABLE_W<'a, const O: u8> = crate::BitWriter<'a, u32, SHORTS_SPEC, END_DISABLE_A, O>; -impl<'a, const O: u8> END_DISABLE_W<'a, O> { - #[doc = "Disable shortcut"] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(END_DISABLE_A::DISABLED) - } - #[doc = "Enable shortcut"] - #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(END_DISABLE_A::ENABLED) - } -} -#[doc = "Field `DISABLED_TXEN` reader - Shortcut between event DISABLED and task TXEN"] -pub type DISABLED_TXEN_R = crate::BitReader; -#[doc = "Shortcut between event DISABLED and task TXEN\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum DISABLED_TXEN_A { - #[doc = "0: Disable shortcut"] - DISABLED = 0, - #[doc = "1: Enable shortcut"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: DISABLED_TXEN_A) -> Self { - variant as u8 != 0 - } -} -impl DISABLED_TXEN_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> DISABLED_TXEN_A { - match self.bits { - false => DISABLED_TXEN_A::DISABLED, - true => DISABLED_TXEN_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == DISABLED_TXEN_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == DISABLED_TXEN_A::ENABLED - } -} -#[doc = "Field `DISABLED_TXEN` writer - Shortcut between event DISABLED and task TXEN"] -pub type DISABLED_TXEN_W<'a, const O: u8> = - crate::BitWriter<'a, u32, SHORTS_SPEC, DISABLED_TXEN_A, O>; -impl<'a, const O: u8> DISABLED_TXEN_W<'a, O> { - #[doc = "Disable shortcut"] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(DISABLED_TXEN_A::DISABLED) - } - #[doc = "Enable shortcut"] - #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(DISABLED_TXEN_A::ENABLED) - } -} -#[doc = "Field `DISABLED_RXEN` reader - Shortcut between event DISABLED and task RXEN"] -pub type DISABLED_RXEN_R = crate::BitReader; -#[doc = "Shortcut between event DISABLED and task RXEN\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum DISABLED_RXEN_A { - #[doc = "0: Disable shortcut"] - DISABLED = 0, - #[doc = "1: Enable shortcut"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: DISABLED_RXEN_A) -> Self { - variant as u8 != 0 - } -} -impl DISABLED_RXEN_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> DISABLED_RXEN_A { - match self.bits { - false => DISABLED_RXEN_A::DISABLED, - true => DISABLED_RXEN_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == DISABLED_RXEN_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == DISABLED_RXEN_A::ENABLED - } -} -#[doc = "Field `DISABLED_RXEN` writer - Shortcut between event DISABLED and task RXEN"] -pub type DISABLED_RXEN_W<'a, const O: u8> = - crate::BitWriter<'a, u32, SHORTS_SPEC, DISABLED_RXEN_A, O>; -impl<'a, const O: u8> DISABLED_RXEN_W<'a, O> { - #[doc = "Disable shortcut"] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(DISABLED_RXEN_A::DISABLED) - } - #[doc = "Enable shortcut"] - #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(DISABLED_RXEN_A::ENABLED) - } -} -#[doc = "Field `ADDRESS_RSSISTART` reader - Shortcut between event ADDRESS and task RSSISTART"] -pub type ADDRESS_RSSISTART_R = crate::BitReader; -#[doc = "Shortcut between event ADDRESS and task RSSISTART\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum ADDRESS_RSSISTART_A { - #[doc = "0: Disable shortcut"] - DISABLED = 0, - #[doc = "1: Enable shortcut"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: ADDRESS_RSSISTART_A) -> Self { - variant as u8 != 0 - } -} -impl ADDRESS_RSSISTART_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> ADDRESS_RSSISTART_A { - match self.bits { - false => ADDRESS_RSSISTART_A::DISABLED, - true => ADDRESS_RSSISTART_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == ADDRESS_RSSISTART_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == ADDRESS_RSSISTART_A::ENABLED - } -} -#[doc = "Field `ADDRESS_RSSISTART` writer - Shortcut between event ADDRESS and task RSSISTART"] -pub type ADDRESS_RSSISTART_W<'a, const O: u8> = - crate::BitWriter<'a, u32, SHORTS_SPEC, ADDRESS_RSSISTART_A, O>; -impl<'a, const O: u8> ADDRESS_RSSISTART_W<'a, O> { - #[doc = "Disable shortcut"] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(ADDRESS_RSSISTART_A::DISABLED) - } - #[doc = "Enable shortcut"] - #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(ADDRESS_RSSISTART_A::ENABLED) - } -} -#[doc = "Field `END_START` reader - Shortcut between event END and task START"] -pub type END_START_R = crate::BitReader; -#[doc = "Shortcut between event END and task START\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum END_START_A { - #[doc = "0: Disable shortcut"] - DISABLED = 0, - #[doc = "1: Enable shortcut"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: END_START_A) -> Self { - variant as u8 != 0 - } -} -impl END_START_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> END_START_A { - match self.bits { - false => END_START_A::DISABLED, - true => END_START_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == END_START_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == END_START_A::ENABLED - } -} -#[doc = "Field `END_START` writer - Shortcut between event END and task START"] -pub type END_START_W<'a, const O: u8> = crate::BitWriter<'a, u32, SHORTS_SPEC, END_START_A, O>; -impl<'a, const O: u8> END_START_W<'a, O> { - #[doc = "Disable shortcut"] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(END_START_A::DISABLED) - } - #[doc = "Enable shortcut"] - #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(END_START_A::ENABLED) - } -} -#[doc = "Field `ADDRESS_BCSTART` reader - Shortcut between event ADDRESS and task BCSTART"] -pub type ADDRESS_BCSTART_R = crate::BitReader; -#[doc = "Shortcut between event ADDRESS and task BCSTART\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum ADDRESS_BCSTART_A { - #[doc = "0: Disable shortcut"] - DISABLED = 0, - #[doc = "1: Enable shortcut"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: ADDRESS_BCSTART_A) -> Self { - variant as u8 != 0 - } -} -impl ADDRESS_BCSTART_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> ADDRESS_BCSTART_A { - match self.bits { - false => ADDRESS_BCSTART_A::DISABLED, - true => ADDRESS_BCSTART_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == ADDRESS_BCSTART_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == ADDRESS_BCSTART_A::ENABLED - } -} -#[doc = "Field `ADDRESS_BCSTART` writer - Shortcut between event ADDRESS and task BCSTART"] -pub type ADDRESS_BCSTART_W<'a, const O: u8> = - crate::BitWriter<'a, u32, SHORTS_SPEC, ADDRESS_BCSTART_A, O>; -impl<'a, const O: u8> ADDRESS_BCSTART_W<'a, O> { - #[doc = "Disable shortcut"] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(ADDRESS_BCSTART_A::DISABLED) - } - #[doc = "Enable shortcut"] - #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(ADDRESS_BCSTART_A::ENABLED) - } -} -#[doc = "Field `DISABLED_RSSISTOP` reader - Shortcut between event DISABLED and task RSSISTOP"] -pub type DISABLED_RSSISTOP_R = crate::BitReader; -#[doc = "Shortcut between event DISABLED and task RSSISTOP\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum DISABLED_RSSISTOP_A { - #[doc = "0: Disable shortcut"] - DISABLED = 0, - #[doc = "1: Enable shortcut"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: DISABLED_RSSISTOP_A) -> Self { - variant as u8 != 0 - } -} -impl DISABLED_RSSISTOP_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> DISABLED_RSSISTOP_A { - match self.bits { - false => DISABLED_RSSISTOP_A::DISABLED, - true => DISABLED_RSSISTOP_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == DISABLED_RSSISTOP_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == DISABLED_RSSISTOP_A::ENABLED - } -} -#[doc = "Field `DISABLED_RSSISTOP` writer - Shortcut between event DISABLED and task RSSISTOP"] -pub type DISABLED_RSSISTOP_W<'a, const O: u8> = - crate::BitWriter<'a, u32, SHORTS_SPEC, DISABLED_RSSISTOP_A, O>; -impl<'a, const O: u8> DISABLED_RSSISTOP_W<'a, O> { - #[doc = "Disable shortcut"] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(DISABLED_RSSISTOP_A::DISABLED) - } - #[doc = "Enable shortcut"] - #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(DISABLED_RSSISTOP_A::ENABLED) - } -} -impl R { - #[doc = "Bit 0 - Shortcut between event READY and task START"] - #[inline(always)] - pub fn ready_start(&self) -> READY_START_R { - READY_START_R::new((self.bits & 1) != 0) - } - #[doc = "Bit 1 - Shortcut between event END and task DISABLE"] - #[inline(always)] - pub fn end_disable(&self) -> END_DISABLE_R { - END_DISABLE_R::new(((self.bits >> 1) & 1) != 0) - } - #[doc = "Bit 2 - Shortcut between event DISABLED and task TXEN"] - #[inline(always)] - pub fn disabled_txen(&self) -> DISABLED_TXEN_R { - DISABLED_TXEN_R::new(((self.bits >> 2) & 1) != 0) - } - #[doc = "Bit 3 - Shortcut between event DISABLED and task RXEN"] - #[inline(always)] - pub fn disabled_rxen(&self) -> DISABLED_RXEN_R { - DISABLED_RXEN_R::new(((self.bits >> 3) & 1) != 0) - } - #[doc = "Bit 4 - Shortcut between event ADDRESS and task RSSISTART"] - #[inline(always)] - pub fn address_rssistart(&self) -> ADDRESS_RSSISTART_R { - ADDRESS_RSSISTART_R::new(((self.bits >> 4) & 1) != 0) - } - #[doc = "Bit 5 - Shortcut between event END and task START"] - #[inline(always)] - pub fn end_start(&self) -> END_START_R { - END_START_R::new(((self.bits >> 5) & 1) != 0) - } - #[doc = "Bit 6 - Shortcut between event ADDRESS and task BCSTART"] - #[inline(always)] - pub fn address_bcstart(&self) -> ADDRESS_BCSTART_R { - ADDRESS_BCSTART_R::new(((self.bits >> 6) & 1) != 0) - } - #[doc = "Bit 8 - Shortcut between event DISABLED and task RSSISTOP"] - #[inline(always)] - pub fn disabled_rssistop(&self) -> DISABLED_RSSISTOP_R { - DISABLED_RSSISTOP_R::new(((self.bits >> 8) & 1) != 0) - } -} -impl W { - #[doc = "Bit 0 - Shortcut between event READY and task START"] - #[inline(always)] - #[must_use] - pub fn ready_start(&mut self) -> READY_START_W<0> { - READY_START_W::new(self) - } - #[doc = "Bit 1 - Shortcut between event END and task DISABLE"] - #[inline(always)] - #[must_use] - pub fn end_disable(&mut self) -> END_DISABLE_W<1> { - END_DISABLE_W::new(self) - } - #[doc = "Bit 2 - Shortcut between event DISABLED and task TXEN"] - #[inline(always)] - #[must_use] - pub fn disabled_txen(&mut self) -> DISABLED_TXEN_W<2> { - DISABLED_TXEN_W::new(self) - } - #[doc = "Bit 3 - Shortcut between event DISABLED and task RXEN"] - #[inline(always)] - #[must_use] - pub fn disabled_rxen(&mut self) -> DISABLED_RXEN_W<3> { - DISABLED_RXEN_W::new(self) - } - #[doc = "Bit 4 - Shortcut between event ADDRESS and task RSSISTART"] - #[inline(always)] - #[must_use] - pub fn address_rssistart(&mut self) -> ADDRESS_RSSISTART_W<4> { - ADDRESS_RSSISTART_W::new(self) - } - #[doc = "Bit 5 - Shortcut between event END and task START"] - #[inline(always)] - #[must_use] - pub fn end_start(&mut self) -> END_START_W<5> { - END_START_W::new(self) - } - #[doc = "Bit 6 - Shortcut between event ADDRESS and task BCSTART"] - #[inline(always)] - #[must_use] - pub fn address_bcstart(&mut self) -> ADDRESS_BCSTART_W<6> { - ADDRESS_BCSTART_W::new(self) - } - #[doc = "Bit 8 - Shortcut between event DISABLED and task RSSISTOP"] - #[inline(always)] - #[must_use] - pub fn disabled_rssistop(&mut self) -> DISABLED_RSSISTOP_W<8> { - DISABLED_RSSISTOP_W::new(self) - } - #[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 = "Shortcuts between local events and tasks\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 [shorts](index.html) module"] -pub struct SHORTS_SPEC; -impl crate::RegisterSpec for SHORTS_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [shorts::R](R) reader structure"] -impl crate::Readable for SHORTS_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [shorts::W](W) writer structure"] -impl crate::Writable for SHORTS_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets SHORTS to value 0"] -impl crate::Resettable for SHORTS_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/radio/state.rs b/down-the-stack/dk_pac/src/radio/state.rs deleted file mode 100644 index bec33b1..0000000 --- a/down-the-stack/dk_pac/src/radio/state.rs +++ /dev/null @@ -1,129 +0,0 @@ -#[doc = "Register `STATE` 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 = "Field `STATE` reader - Current radio state"] -pub type STATE_R = crate::FieldReader; -#[doc = "Current radio state\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -#[repr(u8)] -pub enum STATE_A { - #[doc = "0: RADIO is in the Disabled state"] - DISABLED = 0, - #[doc = "1: RADIO is in the RXRU state"] - RX_RU = 1, - #[doc = "2: RADIO is in the RXIDLE state"] - RX_IDLE = 2, - #[doc = "3: RADIO is in the RX state"] - RX = 3, - #[doc = "4: RADIO is in the RXDISABLED state"] - RX_DISABLE = 4, - #[doc = "9: RADIO is in the TXRU state"] - TX_RU = 9, - #[doc = "10: RADIO is in the TXIDLE state"] - TX_IDLE = 10, - #[doc = "11: RADIO is in the TX state"] - TX = 11, - #[doc = "12: RADIO is in the TXDISABLED state"] - TX_DISABLE = 12, -} -impl From for u8 { - #[inline(always)] - fn from(variant: STATE_A) -> Self { - variant as _ - } -} -impl STATE_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> Option { - match self.bits { - 0 => Some(STATE_A::DISABLED), - 1 => Some(STATE_A::RX_RU), - 2 => Some(STATE_A::RX_IDLE), - 3 => Some(STATE_A::RX), - 4 => Some(STATE_A::RX_DISABLE), - 9 => Some(STATE_A::TX_RU), - 10 => Some(STATE_A::TX_IDLE), - 11 => Some(STATE_A::TX), - 12 => Some(STATE_A::TX_DISABLE), - _ => None, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == STATE_A::DISABLED - } - #[doc = "Checks if the value of the field is `RX_RU`"] - #[inline(always)] - pub fn is_rx_ru(&self) -> bool { - *self == STATE_A::RX_RU - } - #[doc = "Checks if the value of the field is `RX_IDLE`"] - #[inline(always)] - pub fn is_rx_idle(&self) -> bool { - *self == STATE_A::RX_IDLE - } - #[doc = "Checks if the value of the field is `RX`"] - #[inline(always)] - pub fn is_rx(&self) -> bool { - *self == STATE_A::RX - } - #[doc = "Checks if the value of the field is `RX_DISABLE`"] - #[inline(always)] - pub fn is_rx_disable(&self) -> bool { - *self == STATE_A::RX_DISABLE - } - #[doc = "Checks if the value of the field is `TX_RU`"] - #[inline(always)] - pub fn is_tx_ru(&self) -> bool { - *self == STATE_A::TX_RU - } - #[doc = "Checks if the value of the field is `TX_IDLE`"] - #[inline(always)] - pub fn is_tx_idle(&self) -> bool { - *self == STATE_A::TX_IDLE - } - #[doc = "Checks if the value of the field is `TX`"] - #[inline(always)] - pub fn is_tx(&self) -> bool { - *self == STATE_A::TX - } - #[doc = "Checks if the value of the field is `TX_DISABLE`"] - #[inline(always)] - pub fn is_tx_disable(&self) -> bool { - *self == STATE_A::TX_DISABLE - } -} -impl R { - #[doc = "Bits 0:3 - Current radio state"] - #[inline(always)] - pub fn state(&self) -> STATE_R { - STATE_R::new((self.bits & 0x0f) as u8) - } -} -#[doc = "Current radio state\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 [state](index.html) module"] -pub struct STATE_SPEC; -impl crate::RegisterSpec for STATE_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [state::R](R) reader structure"] -impl crate::Readable for STATE_SPEC { - type Reader = R; -} -#[doc = "`reset()` method sets STATE to value 0"] -impl crate::Resettable for STATE_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/radio/tasks_bcstart.rs b/down-the-stack/dk_pac/src/radio/tasks_bcstart.rs deleted file mode 100644 index 9a23f33..0000000 --- a/down-the-stack/dk_pac/src/radio/tasks_bcstart.rs +++ /dev/null @@ -1,72 +0,0 @@ -#[doc = "Register `TASKS_BCSTART` 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 = "Start the bit counter\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum TASKS_BCSTART_AW { - #[doc = "1: Trigger task"] - TRIGGER = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: TASKS_BCSTART_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `TASKS_BCSTART` writer - Start the bit counter"] -pub type TASKS_BCSTART_W<'a, const O: u8> = - crate::BitWriter<'a, u32, TASKS_BCSTART_SPEC, TASKS_BCSTART_AW, O>; -impl<'a, const O: u8> TASKS_BCSTART_W<'a, O> { - #[doc = "Trigger task"] - #[inline(always)] - pub fn trigger(self) -> &'a mut W { - self.variant(TASKS_BCSTART_AW::TRIGGER) - } -} -impl W { - #[doc = "Bit 0 - Start the bit counter"] - #[inline(always)] - #[must_use] - pub fn tasks_bcstart(&mut self) -> TASKS_BCSTART_W<0> { - TASKS_BCSTART_W::new(self) - } - #[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 = "Start the bit counter\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 [tasks_bcstart](index.html) module"] -pub struct TASKS_BCSTART_SPEC; -impl crate::RegisterSpec for TASKS_BCSTART_SPEC { - type Ux = u32; -} -#[doc = "`write(|w| ..)` method takes [tasks_bcstart::W](W) writer structure"] -impl crate::Writable for TASKS_BCSTART_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets TASKS_BCSTART to value 0"] -impl crate::Resettable for TASKS_BCSTART_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/radio/tasks_bcstop.rs b/down-the-stack/dk_pac/src/radio/tasks_bcstop.rs deleted file mode 100644 index 525274d..0000000 --- a/down-the-stack/dk_pac/src/radio/tasks_bcstop.rs +++ /dev/null @@ -1,72 +0,0 @@ -#[doc = "Register `TASKS_BCSTOP` 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 = "Stop the bit counter\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum TASKS_BCSTOP_AW { - #[doc = "1: Trigger task"] - TRIGGER = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: TASKS_BCSTOP_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `TASKS_BCSTOP` writer - Stop the bit counter"] -pub type TASKS_BCSTOP_W<'a, const O: u8> = - crate::BitWriter<'a, u32, TASKS_BCSTOP_SPEC, TASKS_BCSTOP_AW, O>; -impl<'a, const O: u8> TASKS_BCSTOP_W<'a, O> { - #[doc = "Trigger task"] - #[inline(always)] - pub fn trigger(self) -> &'a mut W { - self.variant(TASKS_BCSTOP_AW::TRIGGER) - } -} -impl W { - #[doc = "Bit 0 - Stop the bit counter"] - #[inline(always)] - #[must_use] - pub fn tasks_bcstop(&mut self) -> TASKS_BCSTOP_W<0> { - TASKS_BCSTOP_W::new(self) - } - #[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 = "Stop the bit counter\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 [tasks_bcstop](index.html) module"] -pub struct TASKS_BCSTOP_SPEC; -impl crate::RegisterSpec for TASKS_BCSTOP_SPEC { - type Ux = u32; -} -#[doc = "`write(|w| ..)` method takes [tasks_bcstop::W](W) writer structure"] -impl crate::Writable for TASKS_BCSTOP_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets TASKS_BCSTOP to value 0"] -impl crate::Resettable for TASKS_BCSTOP_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/radio/tasks_disable.rs b/down-the-stack/dk_pac/src/radio/tasks_disable.rs deleted file mode 100644 index 0749c75..0000000 --- a/down-the-stack/dk_pac/src/radio/tasks_disable.rs +++ /dev/null @@ -1,72 +0,0 @@ -#[doc = "Register `TASKS_DISABLE` 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 = "Disable RADIO\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum TASKS_DISABLE_AW { - #[doc = "1: Trigger task"] - TRIGGER = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: TASKS_DISABLE_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `TASKS_DISABLE` writer - Disable RADIO"] -pub type TASKS_DISABLE_W<'a, const O: u8> = - crate::BitWriter<'a, u32, TASKS_DISABLE_SPEC, TASKS_DISABLE_AW, O>; -impl<'a, const O: u8> TASKS_DISABLE_W<'a, O> { - #[doc = "Trigger task"] - #[inline(always)] - pub fn trigger(self) -> &'a mut W { - self.variant(TASKS_DISABLE_AW::TRIGGER) - } -} -impl W { - #[doc = "Bit 0 - Disable RADIO"] - #[inline(always)] - #[must_use] - pub fn tasks_disable(&mut self) -> TASKS_DISABLE_W<0> { - TASKS_DISABLE_W::new(self) - } - #[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 = "Disable RADIO\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 [tasks_disable](index.html) module"] -pub struct TASKS_DISABLE_SPEC; -impl crate::RegisterSpec for TASKS_DISABLE_SPEC { - type Ux = u32; -} -#[doc = "`write(|w| ..)` method takes [tasks_disable::W](W) writer structure"] -impl crate::Writable for TASKS_DISABLE_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets TASKS_DISABLE to value 0"] -impl crate::Resettable for TASKS_DISABLE_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/radio/tasks_rssistart.rs b/down-the-stack/dk_pac/src/radio/tasks_rssistart.rs deleted file mode 100644 index b2de30d..0000000 --- a/down-the-stack/dk_pac/src/radio/tasks_rssistart.rs +++ /dev/null @@ -1,72 +0,0 @@ -#[doc = "Register `TASKS_RSSISTART` 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 = "Start the RSSI and take one single sample of the receive signal strength.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum TASKS_RSSISTART_AW { - #[doc = "1: Trigger task"] - TRIGGER = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: TASKS_RSSISTART_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `TASKS_RSSISTART` writer - Start the RSSI and take one single sample of the receive signal strength."] -pub type TASKS_RSSISTART_W<'a, const O: u8> = - crate::BitWriter<'a, u32, TASKS_RSSISTART_SPEC, TASKS_RSSISTART_AW, O>; -impl<'a, const O: u8> TASKS_RSSISTART_W<'a, O> { - #[doc = "Trigger task"] - #[inline(always)] - pub fn trigger(self) -> &'a mut W { - self.variant(TASKS_RSSISTART_AW::TRIGGER) - } -} -impl W { - #[doc = "Bit 0 - Start the RSSI and take one single sample of the receive signal strength."] - #[inline(always)] - #[must_use] - pub fn tasks_rssistart(&mut self) -> TASKS_RSSISTART_W<0> { - TASKS_RSSISTART_W::new(self) - } - #[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 = "Start the RSSI and take one single sample of the receive signal strength.\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 [tasks_rssistart](index.html) module"] -pub struct TASKS_RSSISTART_SPEC; -impl crate::RegisterSpec for TASKS_RSSISTART_SPEC { - type Ux = u32; -} -#[doc = "`write(|w| ..)` method takes [tasks_rssistart::W](W) writer structure"] -impl crate::Writable for TASKS_RSSISTART_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets TASKS_RSSISTART to value 0"] -impl crate::Resettable for TASKS_RSSISTART_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/radio/tasks_rssistop.rs b/down-the-stack/dk_pac/src/radio/tasks_rssistop.rs deleted file mode 100644 index c08cc51..0000000 --- a/down-the-stack/dk_pac/src/radio/tasks_rssistop.rs +++ /dev/null @@ -1,72 +0,0 @@ -#[doc = "Register `TASKS_RSSISTOP` 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 = "Stop the RSSI measurement\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum TASKS_RSSISTOP_AW { - #[doc = "1: Trigger task"] - TRIGGER = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: TASKS_RSSISTOP_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `TASKS_RSSISTOP` writer - Stop the RSSI measurement"] -pub type TASKS_RSSISTOP_W<'a, const O: u8> = - crate::BitWriter<'a, u32, TASKS_RSSISTOP_SPEC, TASKS_RSSISTOP_AW, O>; -impl<'a, const O: u8> TASKS_RSSISTOP_W<'a, O> { - #[doc = "Trigger task"] - #[inline(always)] - pub fn trigger(self) -> &'a mut W { - self.variant(TASKS_RSSISTOP_AW::TRIGGER) - } -} -impl W { - #[doc = "Bit 0 - Stop the RSSI measurement"] - #[inline(always)] - #[must_use] - pub fn tasks_rssistop(&mut self) -> TASKS_RSSISTOP_W<0> { - TASKS_RSSISTOP_W::new(self) - } - #[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 = "Stop the RSSI measurement\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 [tasks_rssistop](index.html) module"] -pub struct TASKS_RSSISTOP_SPEC; -impl crate::RegisterSpec for TASKS_RSSISTOP_SPEC { - type Ux = u32; -} -#[doc = "`write(|w| ..)` method takes [tasks_rssistop::W](W) writer structure"] -impl crate::Writable for TASKS_RSSISTOP_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets TASKS_RSSISTOP to value 0"] -impl crate::Resettable for TASKS_RSSISTOP_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/radio/tasks_rxen.rs b/down-the-stack/dk_pac/src/radio/tasks_rxen.rs deleted file mode 100644 index 6bdc5cb..0000000 --- a/down-the-stack/dk_pac/src/radio/tasks_rxen.rs +++ /dev/null @@ -1,72 +0,0 @@ -#[doc = "Register `TASKS_RXEN` 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 = "Enable RADIO in RX mode\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum TASKS_RXEN_AW { - #[doc = "1: Trigger task"] - TRIGGER = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: TASKS_RXEN_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `TASKS_RXEN` writer - Enable RADIO in RX mode"] -pub type TASKS_RXEN_W<'a, const O: u8> = - crate::BitWriter<'a, u32, TASKS_RXEN_SPEC, TASKS_RXEN_AW, O>; -impl<'a, const O: u8> TASKS_RXEN_W<'a, O> { - #[doc = "Trigger task"] - #[inline(always)] - pub fn trigger(self) -> &'a mut W { - self.variant(TASKS_RXEN_AW::TRIGGER) - } -} -impl W { - #[doc = "Bit 0 - Enable RADIO in RX mode"] - #[inline(always)] - #[must_use] - pub fn tasks_rxen(&mut self) -> TASKS_RXEN_W<0> { - TASKS_RXEN_W::new(self) - } - #[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 = "Enable RADIO in RX mode\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 [tasks_rxen](index.html) module"] -pub struct TASKS_RXEN_SPEC; -impl crate::RegisterSpec for TASKS_RXEN_SPEC { - type Ux = u32; -} -#[doc = "`write(|w| ..)` method takes [tasks_rxen::W](W) writer structure"] -impl crate::Writable for TASKS_RXEN_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets TASKS_RXEN to value 0"] -impl crate::Resettable for TASKS_RXEN_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/radio/tasks_start.rs b/down-the-stack/dk_pac/src/radio/tasks_start.rs deleted file mode 100644 index 8e61a6f..0000000 --- a/down-the-stack/dk_pac/src/radio/tasks_start.rs +++ /dev/null @@ -1,72 +0,0 @@ -#[doc = "Register `TASKS_START` 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 = "Start RADIO\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum TASKS_START_AW { - #[doc = "1: Trigger task"] - TRIGGER = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: TASKS_START_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `TASKS_START` writer - Start RADIO"] -pub type TASKS_START_W<'a, const O: u8> = - crate::BitWriter<'a, u32, TASKS_START_SPEC, TASKS_START_AW, O>; -impl<'a, const O: u8> TASKS_START_W<'a, O> { - #[doc = "Trigger task"] - #[inline(always)] - pub fn trigger(self) -> &'a mut W { - self.variant(TASKS_START_AW::TRIGGER) - } -} -impl W { - #[doc = "Bit 0 - Start RADIO"] - #[inline(always)] - #[must_use] - pub fn tasks_start(&mut self) -> TASKS_START_W<0> { - TASKS_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 - } -} -#[doc = "Start RADIO\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 [tasks_start](index.html) module"] -pub struct TASKS_START_SPEC; -impl crate::RegisterSpec for TASKS_START_SPEC { - type Ux = u32; -} -#[doc = "`write(|w| ..)` method takes [tasks_start::W](W) writer structure"] -impl crate::Writable for TASKS_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 TASKS_START to value 0"] -impl crate::Resettable for TASKS_START_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/radio/tasks_stop.rs b/down-the-stack/dk_pac/src/radio/tasks_stop.rs deleted file mode 100644 index 4769b3e..0000000 --- a/down-the-stack/dk_pac/src/radio/tasks_stop.rs +++ /dev/null @@ -1,72 +0,0 @@ -#[doc = "Register `TASKS_STOP` 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 = "Stop RADIO\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum TASKS_STOP_AW { - #[doc = "1: Trigger task"] - TRIGGER = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: TASKS_STOP_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `TASKS_STOP` writer - Stop RADIO"] -pub type TASKS_STOP_W<'a, const O: u8> = - crate::BitWriter<'a, u32, TASKS_STOP_SPEC, TASKS_STOP_AW, O>; -impl<'a, const O: u8> TASKS_STOP_W<'a, O> { - #[doc = "Trigger task"] - #[inline(always)] - pub fn trigger(self) -> &'a mut W { - self.variant(TASKS_STOP_AW::TRIGGER) - } -} -impl W { - #[doc = "Bit 0 - Stop RADIO"] - #[inline(always)] - #[must_use] - pub fn tasks_stop(&mut self) -> TASKS_STOP_W<0> { - TASKS_STOP_W::new(self) - } - #[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 = "Stop RADIO\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 [tasks_stop](index.html) module"] -pub struct TASKS_STOP_SPEC; -impl crate::RegisterSpec for TASKS_STOP_SPEC { - type Ux = u32; -} -#[doc = "`write(|w| ..)` method takes [tasks_stop::W](W) writer structure"] -impl crate::Writable for TASKS_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 TASKS_STOP to value 0"] -impl crate::Resettable for TASKS_STOP_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/radio/tasks_txen.rs b/down-the-stack/dk_pac/src/radio/tasks_txen.rs deleted file mode 100644 index bf90d5c..0000000 --- a/down-the-stack/dk_pac/src/radio/tasks_txen.rs +++ /dev/null @@ -1,72 +0,0 @@ -#[doc = "Register `TASKS_TXEN` 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 = "Enable RADIO in TX mode\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum TASKS_TXEN_AW { - #[doc = "1: Trigger task"] - TRIGGER = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: TASKS_TXEN_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `TASKS_TXEN` writer - Enable RADIO in TX mode"] -pub type TASKS_TXEN_W<'a, const O: u8> = - crate::BitWriter<'a, u32, TASKS_TXEN_SPEC, TASKS_TXEN_AW, O>; -impl<'a, const O: u8> TASKS_TXEN_W<'a, O> { - #[doc = "Trigger task"] - #[inline(always)] - pub fn trigger(self) -> &'a mut W { - self.variant(TASKS_TXEN_AW::TRIGGER) - } -} -impl W { - #[doc = "Bit 0 - Enable RADIO in TX mode"] - #[inline(always)] - #[must_use] - pub fn tasks_txen(&mut self) -> TASKS_TXEN_W<0> { - TASKS_TXEN_W::new(self) - } - #[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 = "Enable RADIO in TX mode\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 [tasks_txen](index.html) module"] -pub struct TASKS_TXEN_SPEC; -impl crate::RegisterSpec for TASKS_TXEN_SPEC { - type Ux = u32; -} -#[doc = "`write(|w| ..)` method takes [tasks_txen::W](W) writer structure"] -impl crate::Writable for TASKS_TXEN_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets TASKS_TXEN to value 0"] -impl crate::Resettable for TASKS_TXEN_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/radio/tifs.rs b/down-the-stack/dk_pac/src/radio/tifs.rs deleted file mode 100644 index 7173ca6..0000000 --- a/down-the-stack/dk_pac/src/radio/tifs.rs +++ /dev/null @@ -1,80 +0,0 @@ -#[doc = "Register `TIFS` 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 `TIFS` 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 `TIFS` reader - Inter Frame Spacing in us"] -pub type TIFS_R = crate::FieldReader; -#[doc = "Field `TIFS` writer - Inter Frame Spacing in us"] -pub type TIFS_W<'a, const O: u8> = crate::FieldWriter<'a, u32, TIFS_SPEC, u8, u8, 8, O>; -impl R { - #[doc = "Bits 0:7 - Inter Frame Spacing in us"] - #[inline(always)] - pub fn tifs(&self) -> TIFS_R { - TIFS_R::new((self.bits & 0xff) as u8) - } -} -impl W { - #[doc = "Bits 0:7 - Inter Frame Spacing in us"] - #[inline(always)] - #[must_use] - pub fn tifs(&mut self) -> TIFS_W<0> { - TIFS_W::new(self) - } - #[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 = "Inter Frame Spacing in us\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 [tifs](index.html) module"] -pub struct TIFS_SPEC; -impl crate::RegisterSpec for TIFS_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [tifs::R](R) reader structure"] -impl crate::Readable for TIFS_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [tifs::W](W) writer structure"] -impl crate::Writable for TIFS_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets TIFS to value 0"] -impl crate::Resettable for TIFS_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/radio/txaddress.rs b/down-the-stack/dk_pac/src/radio/txaddress.rs deleted file mode 100644 index 996809b..0000000 --- a/down-the-stack/dk_pac/src/radio/txaddress.rs +++ /dev/null @@ -1,80 +0,0 @@ -#[doc = "Register `TXADDRESS` 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 `TXADDRESS` 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 `TXADDRESS` reader - Transmit address select"] -pub type TXADDRESS_R = crate::FieldReader; -#[doc = "Field `TXADDRESS` writer - Transmit address select"] -pub type TXADDRESS_W<'a, const O: u8> = crate::FieldWriter<'a, u32, TXADDRESS_SPEC, u8, u8, 3, O>; -impl R { - #[doc = "Bits 0:2 - Transmit address select"] - #[inline(always)] - pub fn txaddress(&self) -> TXADDRESS_R { - TXADDRESS_R::new((self.bits & 7) as u8) - } -} -impl W { - #[doc = "Bits 0:2 - Transmit address select"] - #[inline(always)] - #[must_use] - pub fn txaddress(&mut self) -> TXADDRESS_W<0> { - TXADDRESS_W::new(self) - } - #[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 = "Transmit address select\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 [txaddress](index.html) module"] -pub struct TXADDRESS_SPEC; -impl crate::RegisterSpec for TXADDRESS_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [txaddress::R](R) reader structure"] -impl crate::Readable for TXADDRESS_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [txaddress::W](W) writer structure"] -impl crate::Writable for TXADDRESS_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets TXADDRESS to value 0"] -impl crate::Resettable for TXADDRESS_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/radio/txpower.rs b/down-the-stack/dk_pac/src/radio/txpower.rs deleted file mode 100644 index abadae5..0000000 --- a/down-the-stack/dk_pac/src/radio/txpower.rs +++ /dev/null @@ -1,233 +0,0 @@ -#[doc = "Register `TXPOWER` 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 `TXPOWER` 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 `TXPOWER` reader - RADIO output power."] -pub type TXPOWER_R = crate::FieldReader; -#[doc = "RADIO output power.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -#[repr(u8)] -pub enum TXPOWER_A { - #[doc = "4: +4 dBm"] - POS4D_BM = 4, - #[doc = "3: +3 dBm"] - POS3D_BM = 3, - #[doc = "0: 0 dBm"] - _0D_BM = 0, - #[doc = "252: -4 dBm"] - NEG4D_BM = 252, - #[doc = "248: -8 dBm"] - NEG8D_BM = 248, - #[doc = "244: -12 dBm"] - NEG12D_BM = 244, - #[doc = "240: -16 dBm"] - NEG16D_BM = 240, - #[doc = "236: -20 dBm"] - NEG20D_BM = 236, - #[doc = "255: Deprecated enumerator - -40 dBm"] - NEG30D_BM = 255, - #[doc = "216: -40 dBm"] - NEG40D_BM = 216, -} -impl From for u8 { - #[inline(always)] - fn from(variant: TXPOWER_A) -> Self { - variant as _ - } -} -impl TXPOWER_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> Option { - match self.bits { - 4 => Some(TXPOWER_A::POS4D_BM), - 3 => Some(TXPOWER_A::POS3D_BM), - 0 => Some(TXPOWER_A::_0D_BM), - 252 => Some(TXPOWER_A::NEG4D_BM), - 248 => Some(TXPOWER_A::NEG8D_BM), - 244 => Some(TXPOWER_A::NEG12D_BM), - 240 => Some(TXPOWER_A::NEG16D_BM), - 236 => Some(TXPOWER_A::NEG20D_BM), - 255 => Some(TXPOWER_A::NEG30D_BM), - 216 => Some(TXPOWER_A::NEG40D_BM), - _ => None, - } - } - #[doc = "Checks if the value of the field is `POS4D_BM`"] - #[inline(always)] - pub fn is_pos4d_bm(&self) -> bool { - *self == TXPOWER_A::POS4D_BM - } - #[doc = "Checks if the value of the field is `POS3D_BM`"] - #[inline(always)] - pub fn is_pos3d_bm(&self) -> bool { - *self == TXPOWER_A::POS3D_BM - } - #[doc = "Checks if the value of the field is `_0D_BM`"] - #[inline(always)] - pub fn is_0d_bm(&self) -> bool { - *self == TXPOWER_A::_0D_BM - } - #[doc = "Checks if the value of the field is `NEG4D_BM`"] - #[inline(always)] - pub fn is_neg4d_bm(&self) -> bool { - *self == TXPOWER_A::NEG4D_BM - } - #[doc = "Checks if the value of the field is `NEG8D_BM`"] - #[inline(always)] - pub fn is_neg8d_bm(&self) -> bool { - *self == TXPOWER_A::NEG8D_BM - } - #[doc = "Checks if the value of the field is `NEG12D_BM`"] - #[inline(always)] - pub fn is_neg12d_bm(&self) -> bool { - *self == TXPOWER_A::NEG12D_BM - } - #[doc = "Checks if the value of the field is `NEG16D_BM`"] - #[inline(always)] - pub fn is_neg16d_bm(&self) -> bool { - *self == TXPOWER_A::NEG16D_BM - } - #[doc = "Checks if the value of the field is `NEG20D_BM`"] - #[inline(always)] - pub fn is_neg20d_bm(&self) -> bool { - *self == TXPOWER_A::NEG20D_BM - } - #[doc = "Checks if the value of the field is `NEG30D_BM`"] - #[inline(always)] - pub fn is_neg30d_bm(&self) -> bool { - *self == TXPOWER_A::NEG30D_BM - } - #[doc = "Checks if the value of the field is `NEG40D_BM`"] - #[inline(always)] - pub fn is_neg40d_bm(&self) -> bool { - *self == TXPOWER_A::NEG40D_BM - } -} -#[doc = "Field `TXPOWER` writer - RADIO output power."] -pub type TXPOWER_W<'a, const O: u8> = - crate::FieldWriter<'a, u32, TXPOWER_SPEC, u8, TXPOWER_A, 8, O>; -impl<'a, const O: u8> TXPOWER_W<'a, O> { - #[doc = "+4 dBm"] - #[inline(always)] - pub fn pos4d_bm(self) -> &'a mut W { - self.variant(TXPOWER_A::POS4D_BM) - } - #[doc = "+3 dBm"] - #[inline(always)] - pub fn pos3d_bm(self) -> &'a mut W { - self.variant(TXPOWER_A::POS3D_BM) - } - #[doc = "0 dBm"] - #[inline(always)] - pub fn _0d_bm(self) -> &'a mut W { - self.variant(TXPOWER_A::_0D_BM) - } - #[doc = "-4 dBm"] - #[inline(always)] - pub fn neg4d_bm(self) -> &'a mut W { - self.variant(TXPOWER_A::NEG4D_BM) - } - #[doc = "-8 dBm"] - #[inline(always)] - pub fn neg8d_bm(self) -> &'a mut W { - self.variant(TXPOWER_A::NEG8D_BM) - } - #[doc = "-12 dBm"] - #[inline(always)] - pub fn neg12d_bm(self) -> &'a mut W { - self.variant(TXPOWER_A::NEG12D_BM) - } - #[doc = "-16 dBm"] - #[inline(always)] - pub fn neg16d_bm(self) -> &'a mut W { - self.variant(TXPOWER_A::NEG16D_BM) - } - #[doc = "-20 dBm"] - #[inline(always)] - pub fn neg20d_bm(self) -> &'a mut W { - self.variant(TXPOWER_A::NEG20D_BM) - } - #[doc = "Deprecated enumerator - -40 dBm"] - #[inline(always)] - pub fn neg30d_bm(self) -> &'a mut W { - self.variant(TXPOWER_A::NEG30D_BM) - } - #[doc = "-40 dBm"] - #[inline(always)] - pub fn neg40d_bm(self) -> &'a mut W { - self.variant(TXPOWER_A::NEG40D_BM) - } -} -impl R { - #[doc = "Bits 0:7 - RADIO output power."] - #[inline(always)] - pub fn txpower(&self) -> TXPOWER_R { - TXPOWER_R::new((self.bits & 0xff) as u8) - } -} -impl W { - #[doc = "Bits 0:7 - RADIO output power."] - #[inline(always)] - #[must_use] - pub fn txpower(&mut self) -> TXPOWER_W<0> { - TXPOWER_W::new(self) - } - #[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 = "Output power\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 [txpower](index.html) module"] -pub struct TXPOWER_SPEC; -impl crate::RegisterSpec for TXPOWER_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [txpower::R](R) reader structure"] -impl crate::Readable for TXPOWER_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [txpower::W](W) writer structure"] -impl crate::Writable for TXPOWER_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets TXPOWER to value 0"] -impl crate::Resettable for TXPOWER_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/rng.rs b/down-the-stack/dk_pac/src/rng.rs deleted file mode 100644 index b13112e..0000000 --- a/down-the-stack/dk_pac/src/rng.rs +++ /dev/null @@ -1,56 +0,0 @@ -#[doc = r"Register block"] -#[repr(C)] -pub struct RegisterBlock { - #[doc = "0x00 - Task starting the random number generator"] - pub tasks_start: TASKS_START, - #[doc = "0x04 - Task stopping the random number generator"] - pub tasks_stop: TASKS_STOP, - _reserved2: [u8; 0xf8], - #[doc = "0x100 - Event being generated for every new random number written to the VALUE register"] - pub events_valrdy: EVENTS_VALRDY, - _reserved3: [u8; 0xfc], - #[doc = "0x200 - Shortcuts between local events and tasks"] - pub shorts: SHORTS, - _reserved4: [u8; 0x0100], - #[doc = "0x304 - Enable interrupt"] - pub intenset: INTENSET, - #[doc = "0x308 - Disable interrupt"] - pub intenclr: INTENCLR, - _reserved6: [u8; 0x01f8], - #[doc = "0x504 - Configuration register"] - pub config: CONFIG, - #[doc = "0x508 - Output random number"] - pub value: VALUE, -} -#[doc = "TASKS_START (w) register accessor: an alias for `Reg`"] -pub type TASKS_START = crate::Reg; -#[doc = "Task starting the random number generator"] -pub mod tasks_start; -#[doc = "TASKS_STOP (w) register accessor: an alias for `Reg`"] -pub type TASKS_STOP = crate::Reg; -#[doc = "Task stopping the random number generator"] -pub mod tasks_stop; -#[doc = "EVENTS_VALRDY (rw) register accessor: an alias for `Reg`"] -pub type EVENTS_VALRDY = crate::Reg; -#[doc = "Event being generated for every new random number written to the VALUE register"] -pub mod events_valrdy; -#[doc = "SHORTS (rw) register accessor: an alias for `Reg`"] -pub type SHORTS = crate::Reg; -#[doc = "Shortcuts between local events and tasks"] -pub mod shorts; -#[doc = "INTENSET (rw) register accessor: an alias for `Reg`"] -pub type INTENSET = crate::Reg; -#[doc = "Enable interrupt"] -pub mod intenset; -#[doc = "INTENCLR (rw) register accessor: an alias for `Reg`"] -pub type INTENCLR = crate::Reg; -#[doc = "Disable interrupt"] -pub mod intenclr; -#[doc = "CONFIG (rw) register accessor: an alias for `Reg`"] -pub type CONFIG = crate::Reg; -#[doc = "Configuration register"] -pub mod config; -#[doc = "VALUE (r) register accessor: an alias for `Reg`"] -pub type VALUE = crate::Reg; -#[doc = "Output random number"] -pub mod value; diff --git a/down-the-stack/dk_pac/src/rng/config.rs b/down-the-stack/dk_pac/src/rng/config.rs deleted file mode 100644 index 7d36f9e..0000000 --- a/down-the-stack/dk_pac/src/rng/config.rs +++ /dev/null @@ -1,126 +0,0 @@ -#[doc = "Register `CONFIG` 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 `CONFIG` 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 `DERCEN` reader - Bias correction"] -pub type DERCEN_R = crate::BitReader; -#[doc = "Bias correction\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum DERCEN_A { - #[doc = "0: Disabled"] - DISABLED = 0, - #[doc = "1: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: DERCEN_A) -> Self { - variant as u8 != 0 - } -} -impl DERCEN_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> DERCEN_A { - match self.bits { - false => DERCEN_A::DISABLED, - true => DERCEN_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == DERCEN_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == DERCEN_A::ENABLED - } -} -#[doc = "Field `DERCEN` writer - Bias correction"] -pub type DERCEN_W<'a, const O: u8> = crate::BitWriter<'a, u32, CONFIG_SPEC, DERCEN_A, O>; -impl<'a, const O: u8> DERCEN_W<'a, O> { - #[doc = "Disabled"] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(DERCEN_A::DISABLED) - } - #[doc = "Enabled"] - #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(DERCEN_A::ENABLED) - } -} -impl R { - #[doc = "Bit 0 - Bias correction"] - #[inline(always)] - pub fn dercen(&self) -> DERCEN_R { - DERCEN_R::new((self.bits & 1) != 0) - } -} -impl W { - #[doc = "Bit 0 - Bias correction"] - #[inline(always)] - #[must_use] - pub fn dercen(&mut self) -> DERCEN_W<0> { - DERCEN_W::new(self) - } - #[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 = "Configuration register\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 [config](index.html) module"] -pub struct CONFIG_SPEC; -impl crate::RegisterSpec for CONFIG_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [config::R](R) reader structure"] -impl crate::Readable for CONFIG_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [config::W](W) writer structure"] -impl crate::Writable for 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 CONFIG to value 0"] -impl crate::Resettable for CONFIG_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/rng/events_valrdy.rs b/down-the-stack/dk_pac/src/rng/events_valrdy.rs deleted file mode 100644 index 406796e..0000000 --- a/down-the-stack/dk_pac/src/rng/events_valrdy.rs +++ /dev/null @@ -1,127 +0,0 @@ -#[doc = "Register `EVENTS_VALRDY` 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 `EVENTS_VALRDY` 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 `EVENTS_VALRDY` reader - Event being generated for every new random number written to the VALUE register"] -pub type EVENTS_VALRDY_R = crate::BitReader; -#[doc = "Event being generated for every new random number written to the VALUE register\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum EVENTS_VALRDY_A { - #[doc = "0: Event not generated"] - NOT_GENERATED = 0, - #[doc = "1: Event generated"] - GENERATED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: EVENTS_VALRDY_A) -> Self { - variant as u8 != 0 - } -} -impl EVENTS_VALRDY_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> EVENTS_VALRDY_A { - match self.bits { - false => EVENTS_VALRDY_A::NOT_GENERATED, - true => EVENTS_VALRDY_A::GENERATED, - } - } - #[doc = "Checks if the value of the field is `NOT_GENERATED`"] - #[inline(always)] - pub fn is_not_generated(&self) -> bool { - *self == EVENTS_VALRDY_A::NOT_GENERATED - } - #[doc = "Checks if the value of the field is `GENERATED`"] - #[inline(always)] - pub fn is_generated(&self) -> bool { - *self == EVENTS_VALRDY_A::GENERATED - } -} -#[doc = "Field `EVENTS_VALRDY` writer - Event being generated for every new random number written to the VALUE register"] -pub type EVENTS_VALRDY_W<'a, const O: u8> = - crate::BitWriter<'a, u32, EVENTS_VALRDY_SPEC, EVENTS_VALRDY_A, O>; -impl<'a, const O: u8> EVENTS_VALRDY_W<'a, O> { - #[doc = "Event not generated"] - #[inline(always)] - pub fn not_generated(self) -> &'a mut W { - self.variant(EVENTS_VALRDY_A::NOT_GENERATED) - } - #[doc = "Event generated"] - #[inline(always)] - pub fn generated(self) -> &'a mut W { - self.variant(EVENTS_VALRDY_A::GENERATED) - } -} -impl R { - #[doc = "Bit 0 - Event being generated for every new random number written to the VALUE register"] - #[inline(always)] - pub fn events_valrdy(&self) -> EVENTS_VALRDY_R { - EVENTS_VALRDY_R::new((self.bits & 1) != 0) - } -} -impl W { - #[doc = "Bit 0 - Event being generated for every new random number written to the VALUE register"] - #[inline(always)] - #[must_use] - pub fn events_valrdy(&mut self) -> EVENTS_VALRDY_W<0> { - EVENTS_VALRDY_W::new(self) - } - #[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 = "Event being generated for every new random number written to the VALUE register\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 [events_valrdy](index.html) module"] -pub struct EVENTS_VALRDY_SPEC; -impl crate::RegisterSpec for EVENTS_VALRDY_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [events_valrdy::R](R) reader structure"] -impl crate::Readable for EVENTS_VALRDY_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [events_valrdy::W](W) writer structure"] -impl crate::Writable for EVENTS_VALRDY_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets EVENTS_VALRDY to value 0"] -impl crate::Resettable for EVENTS_VALRDY_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/rng/intenclr.rs b/down-the-stack/dk_pac/src/rng/intenclr.rs deleted file mode 100644 index 5ef1411..0000000 --- a/down-the-stack/dk_pac/src/rng/intenclr.rs +++ /dev/null @@ -1,133 +0,0 @@ -#[doc = "Register `INTENCLR` 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 `INTENCLR` 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 `VALRDY` reader - Write '1' to disable interrupt for event VALRDY"] -pub type VALRDY_R = crate::BitReader; -#[doc = "Write '1' to disable interrupt for event VALRDY\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum VALRDY_A { - #[doc = "0: Read: Disabled"] - DISABLED = 0, - #[doc = "1: Read: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: VALRDY_A) -> Self { - variant as u8 != 0 - } -} -impl VALRDY_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> VALRDY_A { - match self.bits { - false => VALRDY_A::DISABLED, - true => VALRDY_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == VALRDY_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == VALRDY_A::ENABLED - } -} -#[doc = "Write '1' to disable interrupt for event VALRDY\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum VALRDY_AW { - #[doc = "1: Disable"] - CLEAR = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: VALRDY_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `VALRDY` writer - Write '1' to disable interrupt for event VALRDY"] -pub type VALRDY_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENCLR_SPEC, VALRDY_AW, O>; -impl<'a, const O: u8> VALRDY_W<'a, O> { - #[doc = "Disable"] - #[inline(always)] - pub fn clear(self) -> &'a mut W { - self.variant(VALRDY_AW::CLEAR) - } -} -impl R { - #[doc = "Bit 0 - Write '1' to disable interrupt for event VALRDY"] - #[inline(always)] - pub fn valrdy(&self) -> VALRDY_R { - VALRDY_R::new((self.bits & 1) != 0) - } -} -impl W { - #[doc = "Bit 0 - Write '1' to disable interrupt for event VALRDY"] - #[inline(always)] - #[must_use] - pub fn valrdy(&mut self) -> VALRDY_W<0> { - VALRDY_W::new(self) - } - #[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 = "Disable interrupt\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 [intenclr](index.html) module"] -pub struct INTENCLR_SPEC; -impl crate::RegisterSpec for INTENCLR_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [intenclr::R](R) reader structure"] -impl crate::Readable for INTENCLR_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [intenclr::W](W) writer structure"] -impl crate::Writable for INTENCLR_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets INTENCLR to value 0"] -impl crate::Resettable for INTENCLR_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/rng/intenset.rs b/down-the-stack/dk_pac/src/rng/intenset.rs deleted file mode 100644 index 0a9f5b9..0000000 --- a/down-the-stack/dk_pac/src/rng/intenset.rs +++ /dev/null @@ -1,133 +0,0 @@ -#[doc = "Register `INTENSET` 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 `INTENSET` 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 `VALRDY` reader - Write '1' to enable interrupt for event VALRDY"] -pub type VALRDY_R = crate::BitReader; -#[doc = "Write '1' to enable interrupt for event VALRDY\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum VALRDY_A { - #[doc = "0: Read: Disabled"] - DISABLED = 0, - #[doc = "1: Read: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: VALRDY_A) -> Self { - variant as u8 != 0 - } -} -impl VALRDY_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> VALRDY_A { - match self.bits { - false => VALRDY_A::DISABLED, - true => VALRDY_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == VALRDY_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == VALRDY_A::ENABLED - } -} -#[doc = "Write '1' to enable interrupt for event VALRDY\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum VALRDY_AW { - #[doc = "1: Enable"] - SET = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: VALRDY_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `VALRDY` writer - Write '1' to enable interrupt for event VALRDY"] -pub type VALRDY_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENSET_SPEC, VALRDY_AW, O>; -impl<'a, const O: u8> VALRDY_W<'a, O> { - #[doc = "Enable"] - #[inline(always)] - pub fn set(self) -> &'a mut W { - self.variant(VALRDY_AW::SET) - } -} -impl R { - #[doc = "Bit 0 - Write '1' to enable interrupt for event VALRDY"] - #[inline(always)] - pub fn valrdy(&self) -> VALRDY_R { - VALRDY_R::new((self.bits & 1) != 0) - } -} -impl W { - #[doc = "Bit 0 - Write '1' to enable interrupt for event VALRDY"] - #[inline(always)] - #[must_use] - pub fn valrdy(&mut self) -> VALRDY_W<0> { - VALRDY_W::new(self) - } - #[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 = "Enable interrupt\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 [intenset](index.html) module"] -pub struct INTENSET_SPEC; -impl crate::RegisterSpec for INTENSET_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [intenset::R](R) reader structure"] -impl crate::Readable for INTENSET_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [intenset::W](W) writer structure"] -impl crate::Writable for INTENSET_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets INTENSET to value 0"] -impl crate::Resettable for INTENSET_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/rng/shorts.rs b/down-the-stack/dk_pac/src/rng/shorts.rs deleted file mode 100644 index fefe5b4..0000000 --- a/down-the-stack/dk_pac/src/rng/shorts.rs +++ /dev/null @@ -1,126 +0,0 @@ -#[doc = "Register `SHORTS` 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 `SHORTS` 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 `VALRDY_STOP` reader - Shortcut between event VALRDY and task STOP"] -pub type VALRDY_STOP_R = crate::BitReader; -#[doc = "Shortcut between event VALRDY and task STOP\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum VALRDY_STOP_A { - #[doc = "0: Disable shortcut"] - DISABLED = 0, - #[doc = "1: Enable shortcut"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: VALRDY_STOP_A) -> Self { - variant as u8 != 0 - } -} -impl VALRDY_STOP_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> VALRDY_STOP_A { - match self.bits { - false => VALRDY_STOP_A::DISABLED, - true => VALRDY_STOP_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == VALRDY_STOP_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == VALRDY_STOP_A::ENABLED - } -} -#[doc = "Field `VALRDY_STOP` writer - Shortcut between event VALRDY and task STOP"] -pub type VALRDY_STOP_W<'a, const O: u8> = crate::BitWriter<'a, u32, SHORTS_SPEC, VALRDY_STOP_A, O>; -impl<'a, const O: u8> VALRDY_STOP_W<'a, O> { - #[doc = "Disable shortcut"] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(VALRDY_STOP_A::DISABLED) - } - #[doc = "Enable shortcut"] - #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(VALRDY_STOP_A::ENABLED) - } -} -impl R { - #[doc = "Bit 0 - Shortcut between event VALRDY and task STOP"] - #[inline(always)] - pub fn valrdy_stop(&self) -> VALRDY_STOP_R { - VALRDY_STOP_R::new((self.bits & 1) != 0) - } -} -impl W { - #[doc = "Bit 0 - Shortcut between event VALRDY and task STOP"] - #[inline(always)] - #[must_use] - pub fn valrdy_stop(&mut self) -> VALRDY_STOP_W<0> { - VALRDY_STOP_W::new(self) - } - #[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 = "Shortcuts between local events and tasks\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 [shorts](index.html) module"] -pub struct SHORTS_SPEC; -impl crate::RegisterSpec for SHORTS_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [shorts::R](R) reader structure"] -impl crate::Readable for SHORTS_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [shorts::W](W) writer structure"] -impl crate::Writable for SHORTS_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets SHORTS to value 0"] -impl crate::Resettable for SHORTS_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/rng/tasks_start.rs b/down-the-stack/dk_pac/src/rng/tasks_start.rs deleted file mode 100644 index d148251..0000000 --- a/down-the-stack/dk_pac/src/rng/tasks_start.rs +++ /dev/null @@ -1,72 +0,0 @@ -#[doc = "Register `TASKS_START` 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 = "Task starting the random number generator\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum TASKS_START_AW { - #[doc = "1: Trigger task"] - TRIGGER = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: TASKS_START_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `TASKS_START` writer - Task starting the random number generator"] -pub type TASKS_START_W<'a, const O: u8> = - crate::BitWriter<'a, u32, TASKS_START_SPEC, TASKS_START_AW, O>; -impl<'a, const O: u8> TASKS_START_W<'a, O> { - #[doc = "Trigger task"] - #[inline(always)] - pub fn trigger(self) -> &'a mut W { - self.variant(TASKS_START_AW::TRIGGER) - } -} -impl W { - #[doc = "Bit 0 - Task starting the random number generator"] - #[inline(always)] - #[must_use] - pub fn tasks_start(&mut self) -> TASKS_START_W<0> { - TASKS_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 - } -} -#[doc = "Task starting the random number generator\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 [tasks_start](index.html) module"] -pub struct TASKS_START_SPEC; -impl crate::RegisterSpec for TASKS_START_SPEC { - type Ux = u32; -} -#[doc = "`write(|w| ..)` method takes [tasks_start::W](W) writer structure"] -impl crate::Writable for TASKS_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 TASKS_START to value 0"] -impl crate::Resettable for TASKS_START_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/rng/tasks_stop.rs b/down-the-stack/dk_pac/src/rng/tasks_stop.rs deleted file mode 100644 index e4e0c51..0000000 --- a/down-the-stack/dk_pac/src/rng/tasks_stop.rs +++ /dev/null @@ -1,72 +0,0 @@ -#[doc = "Register `TASKS_STOP` 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 = "Task stopping the random number generator\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum TASKS_STOP_AW { - #[doc = "1: Trigger task"] - TRIGGER = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: TASKS_STOP_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `TASKS_STOP` writer - Task stopping the random number generator"] -pub type TASKS_STOP_W<'a, const O: u8> = - crate::BitWriter<'a, u32, TASKS_STOP_SPEC, TASKS_STOP_AW, O>; -impl<'a, const O: u8> TASKS_STOP_W<'a, O> { - #[doc = "Trigger task"] - #[inline(always)] - pub fn trigger(self) -> &'a mut W { - self.variant(TASKS_STOP_AW::TRIGGER) - } -} -impl W { - #[doc = "Bit 0 - Task stopping the random number generator"] - #[inline(always)] - #[must_use] - pub fn tasks_stop(&mut self) -> TASKS_STOP_W<0> { - TASKS_STOP_W::new(self) - } - #[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 = "Task stopping the random number generator\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 [tasks_stop](index.html) module"] -pub struct TASKS_STOP_SPEC; -impl crate::RegisterSpec for TASKS_STOP_SPEC { - type Ux = u32; -} -#[doc = "`write(|w| ..)` method takes [tasks_stop::W](W) writer structure"] -impl crate::Writable for TASKS_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 TASKS_STOP to value 0"] -impl crate::Resettable for TASKS_STOP_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/rng/value.rs b/down-the-stack/dk_pac/src/rng/value.rs deleted file mode 100644 index c794f82..0000000 --- a/down-the-stack/dk_pac/src/rng/value.rs +++ /dev/null @@ -1,37 +0,0 @@ -#[doc = "Register `VALUE` 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 = "Field `VALUE` reader - Generated random number"] -pub type VALUE_R = crate::FieldReader; -impl R { - #[doc = "Bits 0:7 - Generated random number"] - #[inline(always)] - pub fn value(&self) -> VALUE_R { - VALUE_R::new((self.bits & 0xff) as u8) - } -} -#[doc = "Output random number\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 [value](index.html) module"] -pub struct VALUE_SPEC; -impl crate::RegisterSpec for VALUE_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [value::R](R) reader structure"] -impl crate::Readable for VALUE_SPEC { - type Reader = R; -} -#[doc = "`reset()` method sets VALUE to value 0"] -impl crate::Resettable for VALUE_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/rtc0.rs b/down-the-stack/dk_pac/src/rtc0.rs deleted file mode 100644 index 738e94f..0000000 --- a/down-the-stack/dk_pac/src/rtc0.rs +++ /dev/null @@ -1,102 +0,0 @@ -#[doc = r"Register block"] -#[repr(C)] -pub struct RegisterBlock { - #[doc = "0x00 - Start RTC COUNTER"] - pub tasks_start: TASKS_START, - #[doc = "0x04 - Stop RTC COUNTER"] - pub tasks_stop: TASKS_STOP, - #[doc = "0x08 - Clear RTC COUNTER"] - pub tasks_clear: TASKS_CLEAR, - #[doc = "0x0c - Set COUNTER to 0xFFFFF0"] - pub tasks_trigovrflw: TASKS_TRIGOVRFLW, - _reserved4: [u8; 0xf0], - #[doc = "0x100 - Event on COUNTER increment"] - pub events_tick: EVENTS_TICK, - #[doc = "0x104 - Event on COUNTER overflow"] - pub events_ovrflw: EVENTS_OVRFLW, - _reserved6: [u8; 0x38], - #[doc = "0x140..0x150 - Description collection: Compare event on CC\\[n\\] -match"] - pub events_compare: [EVENTS_COMPARE; 4], - _reserved7: [u8; 0x01b4], - #[doc = "0x304 - Enable interrupt"] - pub intenset: INTENSET, - #[doc = "0x308 - Disable interrupt"] - pub intenclr: INTENCLR, - _reserved9: [u8; 0x34], - #[doc = "0x340 - Enable or disable event routing"] - pub evten: EVTEN, - #[doc = "0x344 - Enable event routing"] - pub evtenset: EVTENSET, - #[doc = "0x348 - Disable event routing"] - pub evtenclr: EVTENCLR, - _reserved12: [u8; 0x01b8], - #[doc = "0x504 - Current COUNTER value"] - pub counter: COUNTER, - #[doc = "0x508 - 12 bit prescaler for COUNTER frequency (32768/(PRESCALER+1)).Must be written when RTC is stopped"] - pub prescaler: PRESCALER, - _reserved14: [u8; 0x34], - #[doc = "0x540..0x550 - Description collection: Compare register n"] - pub cc: [CC; 4], -} -#[doc = "TASKS_START (w) register accessor: an alias for `Reg`"] -pub type TASKS_START = crate::Reg; -#[doc = "Start RTC COUNTER"] -pub mod tasks_start; -#[doc = "TASKS_STOP (w) register accessor: an alias for `Reg`"] -pub type TASKS_STOP = crate::Reg; -#[doc = "Stop RTC COUNTER"] -pub mod tasks_stop; -#[doc = "TASKS_CLEAR (w) register accessor: an alias for `Reg`"] -pub type TASKS_CLEAR = crate::Reg; -#[doc = "Clear RTC COUNTER"] -pub mod tasks_clear; -#[doc = "TASKS_TRIGOVRFLW (w) register accessor: an alias for `Reg`"] -pub type TASKS_TRIGOVRFLW = crate::Reg; -#[doc = "Set COUNTER to 0xFFFFF0"] -pub mod tasks_trigovrflw; -#[doc = "EVENTS_TICK (rw) register accessor: an alias for `Reg`"] -pub type EVENTS_TICK = crate::Reg; -#[doc = "Event on COUNTER increment"] -pub mod events_tick; -#[doc = "EVENTS_OVRFLW (rw) register accessor: an alias for `Reg`"] -pub type EVENTS_OVRFLW = crate::Reg; -#[doc = "Event on COUNTER overflow"] -pub mod events_ovrflw; -#[doc = "EVENTS_COMPARE (rw) register accessor: an alias for `Reg`"] -pub type EVENTS_COMPARE = crate::Reg; -#[doc = "Description collection: Compare event on CC\\[n\\] -match"] -pub mod events_compare; -#[doc = "INTENSET (rw) register accessor: an alias for `Reg`"] -pub type INTENSET = crate::Reg; -#[doc = "Enable interrupt"] -pub mod intenset; -#[doc = "INTENCLR (rw) register accessor: an alias for `Reg`"] -pub type INTENCLR = crate::Reg; -#[doc = "Disable interrupt"] -pub mod intenclr; -#[doc = "EVTEN (rw) register accessor: an alias for `Reg`"] -pub type EVTEN = crate::Reg; -#[doc = "Enable or disable event routing"] -pub mod evten; -#[doc = "EVTENSET (rw) register accessor: an alias for `Reg`"] -pub type EVTENSET = crate::Reg; -#[doc = "Enable event routing"] -pub mod evtenset; -#[doc = "EVTENCLR (rw) register accessor: an alias for `Reg`"] -pub type EVTENCLR = crate::Reg; -#[doc = "Disable event routing"] -pub mod evtenclr; -#[doc = "COUNTER (r) register accessor: an alias for `Reg`"] -pub type COUNTER = crate::Reg; -#[doc = "Current COUNTER value"] -pub mod counter; -#[doc = "PRESCALER (rw) register accessor: an alias for `Reg`"] -pub type PRESCALER = crate::Reg; -#[doc = "12 bit prescaler for COUNTER frequency (32768/(PRESCALER+1)).Must be written when RTC is stopped"] -pub mod prescaler; -#[doc = "CC (rw) register accessor: an alias for `Reg`"] -pub type CC = crate::Reg; -#[doc = "Description collection: Compare register n"] -pub mod cc; diff --git a/down-the-stack/dk_pac/src/rtc0/cc.rs b/down-the-stack/dk_pac/src/rtc0/cc.rs deleted file mode 100644 index e8d5b31..0000000 --- a/down-the-stack/dk_pac/src/rtc0/cc.rs +++ /dev/null @@ -1,81 +0,0 @@ -#[doc = "Register `CC[%s]` 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 `CC[%s]` 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 `COMPARE` reader - Compare value"] -pub type COMPARE_R = crate::FieldReader; -#[doc = "Field `COMPARE` writer - Compare value"] -pub type COMPARE_W<'a, const O: u8> = crate::FieldWriter<'a, u32, CC_SPEC, u32, u32, 24, O>; -impl R { - #[doc = "Bits 0:23 - Compare value"] - #[inline(always)] - pub fn compare(&self) -> COMPARE_R { - COMPARE_R::new(self.bits & 0x00ff_ffff) - } -} -impl W { - #[doc = "Bits 0:23 - Compare value"] - #[inline(always)] - #[must_use] - pub fn compare(&mut self) -> COMPARE_W<0> { - COMPARE_W::new(self) - } - #[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 = "Description collection: Compare register n\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 [cc](index.html) module"] -pub struct CC_SPEC; -impl crate::RegisterSpec for CC_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [cc::R](R) reader structure"] -impl crate::Readable for CC_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [cc::W](W) writer structure"] -impl crate::Writable for CC_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets CC[%s] -to value 0"] -impl crate::Resettable for CC_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/rtc0/counter.rs b/down-the-stack/dk_pac/src/rtc0/counter.rs deleted file mode 100644 index a4525ea..0000000 --- a/down-the-stack/dk_pac/src/rtc0/counter.rs +++ /dev/null @@ -1,37 +0,0 @@ -#[doc = "Register `COUNTER` 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 = "Field `COUNTER` reader - Counter value"] -pub type COUNTER_R = crate::FieldReader; -impl R { - #[doc = "Bits 0:23 - Counter value"] - #[inline(always)] - pub fn counter(&self) -> COUNTER_R { - COUNTER_R::new(self.bits & 0x00ff_ffff) - } -} -#[doc = "Current COUNTER value\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 [counter](index.html) module"] -pub struct COUNTER_SPEC; -impl crate::RegisterSpec for COUNTER_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [counter::R](R) reader structure"] -impl crate::Readable for COUNTER_SPEC { - type Reader = R; -} -#[doc = "`reset()` method sets COUNTER to value 0"] -impl crate::Resettable for COUNTER_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/rtc0/events_compare.rs b/down-the-stack/dk_pac/src/rtc0/events_compare.rs deleted file mode 100644 index c7e1693..0000000 --- a/down-the-stack/dk_pac/src/rtc0/events_compare.rs +++ /dev/null @@ -1,134 +0,0 @@ -#[doc = "Register `EVENTS_COMPARE[%s]` 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 `EVENTS_COMPARE[%s]` 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 `EVENTS_COMPARE` reader - Compare event on CC\\[n\\] -match"] -pub type EVENTS_COMPARE_R = crate::BitReader; -#[doc = "Compare event on CC\\[n\\] -match\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum EVENTS_COMPARE_A { - #[doc = "0: Event not generated"] - NOT_GENERATED = 0, - #[doc = "1: Event generated"] - GENERATED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: EVENTS_COMPARE_A) -> Self { - variant as u8 != 0 - } -} -impl EVENTS_COMPARE_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> EVENTS_COMPARE_A { - match self.bits { - false => EVENTS_COMPARE_A::NOT_GENERATED, - true => EVENTS_COMPARE_A::GENERATED, - } - } - #[doc = "Checks if the value of the field is `NOT_GENERATED`"] - #[inline(always)] - pub fn is_not_generated(&self) -> bool { - *self == EVENTS_COMPARE_A::NOT_GENERATED - } - #[doc = "Checks if the value of the field is `GENERATED`"] - #[inline(always)] - pub fn is_generated(&self) -> bool { - *self == EVENTS_COMPARE_A::GENERATED - } -} -#[doc = "Field `EVENTS_COMPARE` writer - Compare event on CC\\[n\\] -match"] -pub type EVENTS_COMPARE_W<'a, const O: u8> = - crate::BitWriter<'a, u32, EVENTS_COMPARE_SPEC, EVENTS_COMPARE_A, O>; -impl<'a, const O: u8> EVENTS_COMPARE_W<'a, O> { - #[doc = "Event not generated"] - #[inline(always)] - pub fn not_generated(self) -> &'a mut W { - self.variant(EVENTS_COMPARE_A::NOT_GENERATED) - } - #[doc = "Event generated"] - #[inline(always)] - pub fn generated(self) -> &'a mut W { - self.variant(EVENTS_COMPARE_A::GENERATED) - } -} -impl R { - #[doc = "Bit 0 - Compare event on CC\\[n\\] -match"] - #[inline(always)] - pub fn events_compare(&self) -> EVENTS_COMPARE_R { - EVENTS_COMPARE_R::new((self.bits & 1) != 0) - } -} -impl W { - #[doc = "Bit 0 - Compare event on CC\\[n\\] -match"] - #[inline(always)] - #[must_use] - pub fn events_compare(&mut self) -> EVENTS_COMPARE_W<0> { - EVENTS_COMPARE_W::new(self) - } - #[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 = "Description collection: Compare event on CC\\[n\\] -match\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 [events_compare](index.html) module"] -pub struct EVENTS_COMPARE_SPEC; -impl crate::RegisterSpec for EVENTS_COMPARE_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [events_compare::R](R) reader structure"] -impl crate::Readable for EVENTS_COMPARE_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [events_compare::W](W) writer structure"] -impl crate::Writable for EVENTS_COMPARE_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets EVENTS_COMPARE[%s] -to value 0"] -impl crate::Resettable for EVENTS_COMPARE_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/rtc0/events_ovrflw.rs b/down-the-stack/dk_pac/src/rtc0/events_ovrflw.rs deleted file mode 100644 index dbc2c37..0000000 --- a/down-the-stack/dk_pac/src/rtc0/events_ovrflw.rs +++ /dev/null @@ -1,127 +0,0 @@ -#[doc = "Register `EVENTS_OVRFLW` 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 `EVENTS_OVRFLW` 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 `EVENTS_OVRFLW` reader - Event on COUNTER overflow"] -pub type EVENTS_OVRFLW_R = crate::BitReader; -#[doc = "Event on COUNTER overflow\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum EVENTS_OVRFLW_A { - #[doc = "0: Event not generated"] - NOT_GENERATED = 0, - #[doc = "1: Event generated"] - GENERATED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: EVENTS_OVRFLW_A) -> Self { - variant as u8 != 0 - } -} -impl EVENTS_OVRFLW_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> EVENTS_OVRFLW_A { - match self.bits { - false => EVENTS_OVRFLW_A::NOT_GENERATED, - true => EVENTS_OVRFLW_A::GENERATED, - } - } - #[doc = "Checks if the value of the field is `NOT_GENERATED`"] - #[inline(always)] - pub fn is_not_generated(&self) -> bool { - *self == EVENTS_OVRFLW_A::NOT_GENERATED - } - #[doc = "Checks if the value of the field is `GENERATED`"] - #[inline(always)] - pub fn is_generated(&self) -> bool { - *self == EVENTS_OVRFLW_A::GENERATED - } -} -#[doc = "Field `EVENTS_OVRFLW` writer - Event on COUNTER overflow"] -pub type EVENTS_OVRFLW_W<'a, const O: u8> = - crate::BitWriter<'a, u32, EVENTS_OVRFLW_SPEC, EVENTS_OVRFLW_A, O>; -impl<'a, const O: u8> EVENTS_OVRFLW_W<'a, O> { - #[doc = "Event not generated"] - #[inline(always)] - pub fn not_generated(self) -> &'a mut W { - self.variant(EVENTS_OVRFLW_A::NOT_GENERATED) - } - #[doc = "Event generated"] - #[inline(always)] - pub fn generated(self) -> &'a mut W { - self.variant(EVENTS_OVRFLW_A::GENERATED) - } -} -impl R { - #[doc = "Bit 0 - Event on COUNTER overflow"] - #[inline(always)] - pub fn events_ovrflw(&self) -> EVENTS_OVRFLW_R { - EVENTS_OVRFLW_R::new((self.bits & 1) != 0) - } -} -impl W { - #[doc = "Bit 0 - Event on COUNTER overflow"] - #[inline(always)] - #[must_use] - pub fn events_ovrflw(&mut self) -> EVENTS_OVRFLW_W<0> { - EVENTS_OVRFLW_W::new(self) - } - #[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 = "Event on COUNTER overflow\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 [events_ovrflw](index.html) module"] -pub struct EVENTS_OVRFLW_SPEC; -impl crate::RegisterSpec for EVENTS_OVRFLW_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [events_ovrflw::R](R) reader structure"] -impl crate::Readable for EVENTS_OVRFLW_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [events_ovrflw::W](W) writer structure"] -impl crate::Writable for EVENTS_OVRFLW_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets EVENTS_OVRFLW to value 0"] -impl crate::Resettable for EVENTS_OVRFLW_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/rtc0/events_tick.rs b/down-the-stack/dk_pac/src/rtc0/events_tick.rs deleted file mode 100644 index 871d4e8..0000000 --- a/down-the-stack/dk_pac/src/rtc0/events_tick.rs +++ /dev/null @@ -1,127 +0,0 @@ -#[doc = "Register `EVENTS_TICK` 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 `EVENTS_TICK` 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 `EVENTS_TICK` reader - Event on COUNTER increment"] -pub type EVENTS_TICK_R = crate::BitReader; -#[doc = "Event on COUNTER increment\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum EVENTS_TICK_A { - #[doc = "0: Event not generated"] - NOT_GENERATED = 0, - #[doc = "1: Event generated"] - GENERATED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: EVENTS_TICK_A) -> Self { - variant as u8 != 0 - } -} -impl EVENTS_TICK_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> EVENTS_TICK_A { - match self.bits { - false => EVENTS_TICK_A::NOT_GENERATED, - true => EVENTS_TICK_A::GENERATED, - } - } - #[doc = "Checks if the value of the field is `NOT_GENERATED`"] - #[inline(always)] - pub fn is_not_generated(&self) -> bool { - *self == EVENTS_TICK_A::NOT_GENERATED - } - #[doc = "Checks if the value of the field is `GENERATED`"] - #[inline(always)] - pub fn is_generated(&self) -> bool { - *self == EVENTS_TICK_A::GENERATED - } -} -#[doc = "Field `EVENTS_TICK` writer - Event on COUNTER increment"] -pub type EVENTS_TICK_W<'a, const O: u8> = - crate::BitWriter<'a, u32, EVENTS_TICK_SPEC, EVENTS_TICK_A, O>; -impl<'a, const O: u8> EVENTS_TICK_W<'a, O> { - #[doc = "Event not generated"] - #[inline(always)] - pub fn not_generated(self) -> &'a mut W { - self.variant(EVENTS_TICK_A::NOT_GENERATED) - } - #[doc = "Event generated"] - #[inline(always)] - pub fn generated(self) -> &'a mut W { - self.variant(EVENTS_TICK_A::GENERATED) - } -} -impl R { - #[doc = "Bit 0 - Event on COUNTER increment"] - #[inline(always)] - pub fn events_tick(&self) -> EVENTS_TICK_R { - EVENTS_TICK_R::new((self.bits & 1) != 0) - } -} -impl W { - #[doc = "Bit 0 - Event on COUNTER increment"] - #[inline(always)] - #[must_use] - pub fn events_tick(&mut self) -> EVENTS_TICK_W<0> { - EVENTS_TICK_W::new(self) - } - #[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 = "Event on COUNTER increment\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 [events_tick](index.html) module"] -pub struct EVENTS_TICK_SPEC; -impl crate::RegisterSpec for EVENTS_TICK_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [events_tick::R](R) reader structure"] -impl crate::Readable for EVENTS_TICK_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [events_tick::W](W) writer structure"] -impl crate::Writable for EVENTS_TICK_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets EVENTS_TICK to value 0"] -impl crate::Resettable for EVENTS_TICK_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/rtc0/evten.rs b/down-the-stack/dk_pac/src/rtc0/evten.rs deleted file mode 100644 index 97d58c2..0000000 --- a/down-the-stack/dk_pac/src/rtc0/evten.rs +++ /dev/null @@ -1,431 +0,0 @@ -#[doc = "Register `EVTEN` 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 `EVTEN` 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 `TICK` reader - Enable or disable event routing for event TICK"] -pub type TICK_R = crate::BitReader; -#[doc = "Enable or disable event routing for event TICK\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum TICK_A { - #[doc = "0: Disable"] - DISABLED = 0, - #[doc = "1: Enable"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: TICK_A) -> Self { - variant as u8 != 0 - } -} -impl TICK_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> TICK_A { - match self.bits { - false => TICK_A::DISABLED, - true => TICK_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == TICK_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == TICK_A::ENABLED - } -} -#[doc = "Field `TICK` writer - Enable or disable event routing for event TICK"] -pub type TICK_W<'a, const O: u8> = crate::BitWriter<'a, u32, EVTEN_SPEC, TICK_A, O>; -impl<'a, const O: u8> TICK_W<'a, O> { - #[doc = "Disable"] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(TICK_A::DISABLED) - } - #[doc = "Enable"] - #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(TICK_A::ENABLED) - } -} -#[doc = "Field `OVRFLW` reader - Enable or disable event routing for event OVRFLW"] -pub type OVRFLW_R = crate::BitReader; -#[doc = "Enable or disable event routing for event OVRFLW\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum OVRFLW_A { - #[doc = "0: Disable"] - DISABLED = 0, - #[doc = "1: Enable"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: OVRFLW_A) -> Self { - variant as u8 != 0 - } -} -impl OVRFLW_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> OVRFLW_A { - match self.bits { - false => OVRFLW_A::DISABLED, - true => OVRFLW_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == OVRFLW_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == OVRFLW_A::ENABLED - } -} -#[doc = "Field `OVRFLW` writer - Enable or disable event routing for event OVRFLW"] -pub type OVRFLW_W<'a, const O: u8> = crate::BitWriter<'a, u32, EVTEN_SPEC, OVRFLW_A, O>; -impl<'a, const O: u8> OVRFLW_W<'a, O> { - #[doc = "Disable"] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(OVRFLW_A::DISABLED) - } - #[doc = "Enable"] - #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(OVRFLW_A::ENABLED) - } -} -#[doc = "Field `COMPARE0` reader - Enable or disable event routing for event COMPARE\\[0\\]"] -pub type COMPARE0_R = crate::BitReader; -#[doc = "Enable or disable event routing for event COMPARE\\[0\\]\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum COMPARE0_A { - #[doc = "0: Disable"] - DISABLED = 0, - #[doc = "1: Enable"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: COMPARE0_A) -> Self { - variant as u8 != 0 - } -} -impl COMPARE0_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> COMPARE0_A { - match self.bits { - false => COMPARE0_A::DISABLED, - true => COMPARE0_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == COMPARE0_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == COMPARE0_A::ENABLED - } -} -#[doc = "Field `COMPARE0` writer - Enable or disable event routing for event COMPARE\\[0\\]"] -pub type COMPARE0_W<'a, const O: u8> = crate::BitWriter<'a, u32, EVTEN_SPEC, COMPARE0_A, O>; -impl<'a, const O: u8> COMPARE0_W<'a, O> { - #[doc = "Disable"] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(COMPARE0_A::DISABLED) - } - #[doc = "Enable"] - #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(COMPARE0_A::ENABLED) - } -} -#[doc = "Field `COMPARE1` reader - Enable or disable event routing for event COMPARE\\[1\\]"] -pub type COMPARE1_R = crate::BitReader; -#[doc = "Enable or disable event routing for event COMPARE\\[1\\]\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum COMPARE1_A { - #[doc = "0: Disable"] - DISABLED = 0, - #[doc = "1: Enable"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: COMPARE1_A) -> Self { - variant as u8 != 0 - } -} -impl COMPARE1_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> COMPARE1_A { - match self.bits { - false => COMPARE1_A::DISABLED, - true => COMPARE1_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == COMPARE1_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == COMPARE1_A::ENABLED - } -} -#[doc = "Field `COMPARE1` writer - Enable or disable event routing for event COMPARE\\[1\\]"] -pub type COMPARE1_W<'a, const O: u8> = crate::BitWriter<'a, u32, EVTEN_SPEC, COMPARE1_A, O>; -impl<'a, const O: u8> COMPARE1_W<'a, O> { - #[doc = "Disable"] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(COMPARE1_A::DISABLED) - } - #[doc = "Enable"] - #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(COMPARE1_A::ENABLED) - } -} -#[doc = "Field `COMPARE2` reader - Enable or disable event routing for event COMPARE\\[2\\]"] -pub type COMPARE2_R = crate::BitReader; -#[doc = "Enable or disable event routing for event COMPARE\\[2\\]\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum COMPARE2_A { - #[doc = "0: Disable"] - DISABLED = 0, - #[doc = "1: Enable"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: COMPARE2_A) -> Self { - variant as u8 != 0 - } -} -impl COMPARE2_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> COMPARE2_A { - match self.bits { - false => COMPARE2_A::DISABLED, - true => COMPARE2_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == COMPARE2_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == COMPARE2_A::ENABLED - } -} -#[doc = "Field `COMPARE2` writer - Enable or disable event routing for event COMPARE\\[2\\]"] -pub type COMPARE2_W<'a, const O: u8> = crate::BitWriter<'a, u32, EVTEN_SPEC, COMPARE2_A, O>; -impl<'a, const O: u8> COMPARE2_W<'a, O> { - #[doc = "Disable"] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(COMPARE2_A::DISABLED) - } - #[doc = "Enable"] - #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(COMPARE2_A::ENABLED) - } -} -#[doc = "Field `COMPARE3` reader - Enable or disable event routing for event COMPARE\\[3\\]"] -pub type COMPARE3_R = crate::BitReader; -#[doc = "Enable or disable event routing for event COMPARE\\[3\\]\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum COMPARE3_A { - #[doc = "0: Disable"] - DISABLED = 0, - #[doc = "1: Enable"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: COMPARE3_A) -> Self { - variant as u8 != 0 - } -} -impl COMPARE3_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> COMPARE3_A { - match self.bits { - false => COMPARE3_A::DISABLED, - true => COMPARE3_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == COMPARE3_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == COMPARE3_A::ENABLED - } -} -#[doc = "Field `COMPARE3` writer - Enable or disable event routing for event COMPARE\\[3\\]"] -pub type COMPARE3_W<'a, const O: u8> = crate::BitWriter<'a, u32, EVTEN_SPEC, COMPARE3_A, O>; -impl<'a, const O: u8> COMPARE3_W<'a, O> { - #[doc = "Disable"] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(COMPARE3_A::DISABLED) - } - #[doc = "Enable"] - #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(COMPARE3_A::ENABLED) - } -} -impl R { - #[doc = "Bit 0 - Enable or disable event routing for event TICK"] - #[inline(always)] - pub fn tick(&self) -> TICK_R { - TICK_R::new((self.bits & 1) != 0) - } - #[doc = "Bit 1 - Enable or disable event routing for event OVRFLW"] - #[inline(always)] - pub fn ovrflw(&self) -> OVRFLW_R { - OVRFLW_R::new(((self.bits >> 1) & 1) != 0) - } - #[doc = "Bit 16 - Enable or disable event routing for event COMPARE\\[0\\]"] - #[inline(always)] - pub fn compare0(&self) -> COMPARE0_R { - COMPARE0_R::new(((self.bits >> 16) & 1) != 0) - } - #[doc = "Bit 17 - Enable or disable event routing for event COMPARE\\[1\\]"] - #[inline(always)] - pub fn compare1(&self) -> COMPARE1_R { - COMPARE1_R::new(((self.bits >> 17) & 1) != 0) - } - #[doc = "Bit 18 - Enable or disable event routing for event COMPARE\\[2\\]"] - #[inline(always)] - pub fn compare2(&self) -> COMPARE2_R { - COMPARE2_R::new(((self.bits >> 18) & 1) != 0) - } - #[doc = "Bit 19 - Enable or disable event routing for event COMPARE\\[3\\]"] - #[inline(always)] - pub fn compare3(&self) -> COMPARE3_R { - COMPARE3_R::new(((self.bits >> 19) & 1) != 0) - } -} -impl W { - #[doc = "Bit 0 - Enable or disable event routing for event TICK"] - #[inline(always)] - #[must_use] - pub fn tick(&mut self) -> TICK_W<0> { - TICK_W::new(self) - } - #[doc = "Bit 1 - Enable or disable event routing for event OVRFLW"] - #[inline(always)] - #[must_use] - pub fn ovrflw(&mut self) -> OVRFLW_W<1> { - OVRFLW_W::new(self) - } - #[doc = "Bit 16 - Enable or disable event routing for event COMPARE\\[0\\]"] - #[inline(always)] - #[must_use] - pub fn compare0(&mut self) -> COMPARE0_W<16> { - COMPARE0_W::new(self) - } - #[doc = "Bit 17 - Enable or disable event routing for event COMPARE\\[1\\]"] - #[inline(always)] - #[must_use] - pub fn compare1(&mut self) -> COMPARE1_W<17> { - COMPARE1_W::new(self) - } - #[doc = "Bit 18 - Enable or disable event routing for event COMPARE\\[2\\]"] - #[inline(always)] - #[must_use] - pub fn compare2(&mut self) -> COMPARE2_W<18> { - COMPARE2_W::new(self) - } - #[doc = "Bit 19 - Enable or disable event routing for event COMPARE\\[3\\]"] - #[inline(always)] - #[must_use] - pub fn compare3(&mut self) -> COMPARE3_W<19> { - COMPARE3_W::new(self) - } - #[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 = "Enable or disable event routing\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 [evten](index.html) module"] -pub struct EVTEN_SPEC; -impl crate::RegisterSpec for EVTEN_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [evten::R](R) reader structure"] -impl crate::Readable for EVTEN_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [evten::W](W) writer structure"] -impl crate::Writable for EVTEN_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets EVTEN to value 0"] -impl crate::Resettable for EVTEN_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/rtc0/evtenclr.rs b/down-the-stack/dk_pac/src/rtc0/evtenclr.rs deleted file mode 100644 index bead5c5..0000000 --- a/down-the-stack/dk_pac/src/rtc0/evtenclr.rs +++ /dev/null @@ -1,473 +0,0 @@ -#[doc = "Register `EVTENCLR` 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 `EVTENCLR` 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 `TICK` reader - Write '1' to disable event routing for event TICK"] -pub type TICK_R = crate::BitReader; -#[doc = "Write '1' to disable event routing for event TICK\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum TICK_A { - #[doc = "0: Read: Disabled"] - DISABLED = 0, - #[doc = "1: Read: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: TICK_A) -> Self { - variant as u8 != 0 - } -} -impl TICK_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> TICK_A { - match self.bits { - false => TICK_A::DISABLED, - true => TICK_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == TICK_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == TICK_A::ENABLED - } -} -#[doc = "Write '1' to disable event routing for event TICK\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum TICK_AW { - #[doc = "1: Disable"] - CLEAR = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: TICK_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `TICK` writer - Write '1' to disable event routing for event TICK"] -pub type TICK_W<'a, const O: u8> = crate::BitWriter<'a, u32, EVTENCLR_SPEC, TICK_AW, O>; -impl<'a, const O: u8> TICK_W<'a, O> { - #[doc = "Disable"] - #[inline(always)] - pub fn clear(self) -> &'a mut W { - self.variant(TICK_AW::CLEAR) - } -} -#[doc = "Field `OVRFLW` reader - Write '1' to disable event routing for event OVRFLW"] -pub type OVRFLW_R = crate::BitReader; -#[doc = "Write '1' to disable event routing for event OVRFLW\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum OVRFLW_A { - #[doc = "0: Read: Disabled"] - DISABLED = 0, - #[doc = "1: Read: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: OVRFLW_A) -> Self { - variant as u8 != 0 - } -} -impl OVRFLW_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> OVRFLW_A { - match self.bits { - false => OVRFLW_A::DISABLED, - true => OVRFLW_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == OVRFLW_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == OVRFLW_A::ENABLED - } -} -#[doc = "Write '1' to disable event routing for event OVRFLW\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum OVRFLW_AW { - #[doc = "1: Disable"] - CLEAR = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: OVRFLW_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `OVRFLW` writer - Write '1' to disable event routing for event OVRFLW"] -pub type OVRFLW_W<'a, const O: u8> = crate::BitWriter<'a, u32, EVTENCLR_SPEC, OVRFLW_AW, O>; -impl<'a, const O: u8> OVRFLW_W<'a, O> { - #[doc = "Disable"] - #[inline(always)] - pub fn clear(self) -> &'a mut W { - self.variant(OVRFLW_AW::CLEAR) - } -} -#[doc = "Field `COMPARE0` reader - Write '1' to disable event routing for event COMPARE\\[0\\]"] -pub type COMPARE0_R = crate::BitReader; -#[doc = "Write '1' to disable event routing for event COMPARE\\[0\\]\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum COMPARE0_A { - #[doc = "0: Read: Disabled"] - DISABLED = 0, - #[doc = "1: Read: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: COMPARE0_A) -> Self { - variant as u8 != 0 - } -} -impl COMPARE0_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> COMPARE0_A { - match self.bits { - false => COMPARE0_A::DISABLED, - true => COMPARE0_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == COMPARE0_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == COMPARE0_A::ENABLED - } -} -#[doc = "Write '1' to disable event routing for event COMPARE\\[0\\]\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum COMPARE0_AW { - #[doc = "1: Disable"] - CLEAR = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: COMPARE0_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `COMPARE0` writer - Write '1' to disable event routing for event COMPARE\\[0\\]"] -pub type COMPARE0_W<'a, const O: u8> = crate::BitWriter<'a, u32, EVTENCLR_SPEC, COMPARE0_AW, O>; -impl<'a, const O: u8> COMPARE0_W<'a, O> { - #[doc = "Disable"] - #[inline(always)] - pub fn clear(self) -> &'a mut W { - self.variant(COMPARE0_AW::CLEAR) - } -} -#[doc = "Field `COMPARE1` reader - Write '1' to disable event routing for event COMPARE\\[1\\]"] -pub type COMPARE1_R = crate::BitReader; -#[doc = "Write '1' to disable event routing for event COMPARE\\[1\\]\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum COMPARE1_A { - #[doc = "0: Read: Disabled"] - DISABLED = 0, - #[doc = "1: Read: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: COMPARE1_A) -> Self { - variant as u8 != 0 - } -} -impl COMPARE1_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> COMPARE1_A { - match self.bits { - false => COMPARE1_A::DISABLED, - true => COMPARE1_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == COMPARE1_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == COMPARE1_A::ENABLED - } -} -#[doc = "Write '1' to disable event routing for event COMPARE\\[1\\]\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum COMPARE1_AW { - #[doc = "1: Disable"] - CLEAR = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: COMPARE1_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `COMPARE1` writer - Write '1' to disable event routing for event COMPARE\\[1\\]"] -pub type COMPARE1_W<'a, const O: u8> = crate::BitWriter<'a, u32, EVTENCLR_SPEC, COMPARE1_AW, O>; -impl<'a, const O: u8> COMPARE1_W<'a, O> { - #[doc = "Disable"] - #[inline(always)] - pub fn clear(self) -> &'a mut W { - self.variant(COMPARE1_AW::CLEAR) - } -} -#[doc = "Field `COMPARE2` reader - Write '1' to disable event routing for event COMPARE\\[2\\]"] -pub type COMPARE2_R = crate::BitReader; -#[doc = "Write '1' to disable event routing for event COMPARE\\[2\\]\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum COMPARE2_A { - #[doc = "0: Read: Disabled"] - DISABLED = 0, - #[doc = "1: Read: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: COMPARE2_A) -> Self { - variant as u8 != 0 - } -} -impl COMPARE2_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> COMPARE2_A { - match self.bits { - false => COMPARE2_A::DISABLED, - true => COMPARE2_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == COMPARE2_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == COMPARE2_A::ENABLED - } -} -#[doc = "Write '1' to disable event routing for event COMPARE\\[2\\]\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum COMPARE2_AW { - #[doc = "1: Disable"] - CLEAR = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: COMPARE2_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `COMPARE2` writer - Write '1' to disable event routing for event COMPARE\\[2\\]"] -pub type COMPARE2_W<'a, const O: u8> = crate::BitWriter<'a, u32, EVTENCLR_SPEC, COMPARE2_AW, O>; -impl<'a, const O: u8> COMPARE2_W<'a, O> { - #[doc = "Disable"] - #[inline(always)] - pub fn clear(self) -> &'a mut W { - self.variant(COMPARE2_AW::CLEAR) - } -} -#[doc = "Field `COMPARE3` reader - Write '1' to disable event routing for event COMPARE\\[3\\]"] -pub type COMPARE3_R = crate::BitReader; -#[doc = "Write '1' to disable event routing for event COMPARE\\[3\\]\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum COMPARE3_A { - #[doc = "0: Read: Disabled"] - DISABLED = 0, - #[doc = "1: Read: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: COMPARE3_A) -> Self { - variant as u8 != 0 - } -} -impl COMPARE3_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> COMPARE3_A { - match self.bits { - false => COMPARE3_A::DISABLED, - true => COMPARE3_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == COMPARE3_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == COMPARE3_A::ENABLED - } -} -#[doc = "Write '1' to disable event routing for event COMPARE\\[3\\]\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum COMPARE3_AW { - #[doc = "1: Disable"] - CLEAR = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: COMPARE3_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `COMPARE3` writer - Write '1' to disable event routing for event COMPARE\\[3\\]"] -pub type COMPARE3_W<'a, const O: u8> = crate::BitWriter<'a, u32, EVTENCLR_SPEC, COMPARE3_AW, O>; -impl<'a, const O: u8> COMPARE3_W<'a, O> { - #[doc = "Disable"] - #[inline(always)] - pub fn clear(self) -> &'a mut W { - self.variant(COMPARE3_AW::CLEAR) - } -} -impl R { - #[doc = "Bit 0 - Write '1' to disable event routing for event TICK"] - #[inline(always)] - pub fn tick(&self) -> TICK_R { - TICK_R::new((self.bits & 1) != 0) - } - #[doc = "Bit 1 - Write '1' to disable event routing for event OVRFLW"] - #[inline(always)] - pub fn ovrflw(&self) -> OVRFLW_R { - OVRFLW_R::new(((self.bits >> 1) & 1) != 0) - } - #[doc = "Bit 16 - Write '1' to disable event routing for event COMPARE\\[0\\]"] - #[inline(always)] - pub fn compare0(&self) -> COMPARE0_R { - COMPARE0_R::new(((self.bits >> 16) & 1) != 0) - } - #[doc = "Bit 17 - Write '1' to disable event routing for event COMPARE\\[1\\]"] - #[inline(always)] - pub fn compare1(&self) -> COMPARE1_R { - COMPARE1_R::new(((self.bits >> 17) & 1) != 0) - } - #[doc = "Bit 18 - Write '1' to disable event routing for event COMPARE\\[2\\]"] - #[inline(always)] - pub fn compare2(&self) -> COMPARE2_R { - COMPARE2_R::new(((self.bits >> 18) & 1) != 0) - } - #[doc = "Bit 19 - Write '1' to disable event routing for event COMPARE\\[3\\]"] - #[inline(always)] - pub fn compare3(&self) -> COMPARE3_R { - COMPARE3_R::new(((self.bits >> 19) & 1) != 0) - } -} -impl W { - #[doc = "Bit 0 - Write '1' to disable event routing for event TICK"] - #[inline(always)] - #[must_use] - pub fn tick(&mut self) -> TICK_W<0> { - TICK_W::new(self) - } - #[doc = "Bit 1 - Write '1' to disable event routing for event OVRFLW"] - #[inline(always)] - #[must_use] - pub fn ovrflw(&mut self) -> OVRFLW_W<1> { - OVRFLW_W::new(self) - } - #[doc = "Bit 16 - Write '1' to disable event routing for event COMPARE\\[0\\]"] - #[inline(always)] - #[must_use] - pub fn compare0(&mut self) -> COMPARE0_W<16> { - COMPARE0_W::new(self) - } - #[doc = "Bit 17 - Write '1' to disable event routing for event COMPARE\\[1\\]"] - #[inline(always)] - #[must_use] - pub fn compare1(&mut self) -> COMPARE1_W<17> { - COMPARE1_W::new(self) - } - #[doc = "Bit 18 - Write '1' to disable event routing for event COMPARE\\[2\\]"] - #[inline(always)] - #[must_use] - pub fn compare2(&mut self) -> COMPARE2_W<18> { - COMPARE2_W::new(self) - } - #[doc = "Bit 19 - Write '1' to disable event routing for event COMPARE\\[3\\]"] - #[inline(always)] - #[must_use] - pub fn compare3(&mut self) -> COMPARE3_W<19> { - COMPARE3_W::new(self) - } - #[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 = "Disable event routing\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 [evtenclr](index.html) module"] -pub struct EVTENCLR_SPEC; -impl crate::RegisterSpec for EVTENCLR_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [evtenclr::R](R) reader structure"] -impl crate::Readable for EVTENCLR_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [evtenclr::W](W) writer structure"] -impl crate::Writable for EVTENCLR_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets EVTENCLR to value 0"] -impl crate::Resettable for EVTENCLR_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/rtc0/evtenset.rs b/down-the-stack/dk_pac/src/rtc0/evtenset.rs deleted file mode 100644 index 38b11e9..0000000 --- a/down-the-stack/dk_pac/src/rtc0/evtenset.rs +++ /dev/null @@ -1,473 +0,0 @@ -#[doc = "Register `EVTENSET` 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 `EVTENSET` 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 `TICK` reader - Write '1' to enable event routing for event TICK"] -pub type TICK_R = crate::BitReader; -#[doc = "Write '1' to enable event routing for event TICK\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum TICK_A { - #[doc = "0: Read: Disabled"] - DISABLED = 0, - #[doc = "1: Read: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: TICK_A) -> Self { - variant as u8 != 0 - } -} -impl TICK_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> TICK_A { - match self.bits { - false => TICK_A::DISABLED, - true => TICK_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == TICK_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == TICK_A::ENABLED - } -} -#[doc = "Write '1' to enable event routing for event TICK\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum TICK_AW { - #[doc = "1: Enable"] - SET = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: TICK_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `TICK` writer - Write '1' to enable event routing for event TICK"] -pub type TICK_W<'a, const O: u8> = crate::BitWriter<'a, u32, EVTENSET_SPEC, TICK_AW, O>; -impl<'a, const O: u8> TICK_W<'a, O> { - #[doc = "Enable"] - #[inline(always)] - pub fn set(self) -> &'a mut W { - self.variant(TICK_AW::SET) - } -} -#[doc = "Field `OVRFLW` reader - Write '1' to enable event routing for event OVRFLW"] -pub type OVRFLW_R = crate::BitReader; -#[doc = "Write '1' to enable event routing for event OVRFLW\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum OVRFLW_A { - #[doc = "0: Read: Disabled"] - DISABLED = 0, - #[doc = "1: Read: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: OVRFLW_A) -> Self { - variant as u8 != 0 - } -} -impl OVRFLW_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> OVRFLW_A { - match self.bits { - false => OVRFLW_A::DISABLED, - true => OVRFLW_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == OVRFLW_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == OVRFLW_A::ENABLED - } -} -#[doc = "Write '1' to enable event routing for event OVRFLW\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum OVRFLW_AW { - #[doc = "1: Enable"] - SET = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: OVRFLW_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `OVRFLW` writer - Write '1' to enable event routing for event OVRFLW"] -pub type OVRFLW_W<'a, const O: u8> = crate::BitWriter<'a, u32, EVTENSET_SPEC, OVRFLW_AW, O>; -impl<'a, const O: u8> OVRFLW_W<'a, O> { - #[doc = "Enable"] - #[inline(always)] - pub fn set(self) -> &'a mut W { - self.variant(OVRFLW_AW::SET) - } -} -#[doc = "Field `COMPARE0` reader - Write '1' to enable event routing for event COMPARE\\[0\\]"] -pub type COMPARE0_R = crate::BitReader; -#[doc = "Write '1' to enable event routing for event COMPARE\\[0\\]\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum COMPARE0_A { - #[doc = "0: Read: Disabled"] - DISABLED = 0, - #[doc = "1: Read: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: COMPARE0_A) -> Self { - variant as u8 != 0 - } -} -impl COMPARE0_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> COMPARE0_A { - match self.bits { - false => COMPARE0_A::DISABLED, - true => COMPARE0_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == COMPARE0_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == COMPARE0_A::ENABLED - } -} -#[doc = "Write '1' to enable event routing for event COMPARE\\[0\\]\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum COMPARE0_AW { - #[doc = "1: Enable"] - SET = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: COMPARE0_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `COMPARE0` writer - Write '1' to enable event routing for event COMPARE\\[0\\]"] -pub type COMPARE0_W<'a, const O: u8> = crate::BitWriter<'a, u32, EVTENSET_SPEC, COMPARE0_AW, O>; -impl<'a, const O: u8> COMPARE0_W<'a, O> { - #[doc = "Enable"] - #[inline(always)] - pub fn set(self) -> &'a mut W { - self.variant(COMPARE0_AW::SET) - } -} -#[doc = "Field `COMPARE1` reader - Write '1' to enable event routing for event COMPARE\\[1\\]"] -pub type COMPARE1_R = crate::BitReader; -#[doc = "Write '1' to enable event routing for event COMPARE\\[1\\]\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum COMPARE1_A { - #[doc = "0: Read: Disabled"] - DISABLED = 0, - #[doc = "1: Read: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: COMPARE1_A) -> Self { - variant as u8 != 0 - } -} -impl COMPARE1_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> COMPARE1_A { - match self.bits { - false => COMPARE1_A::DISABLED, - true => COMPARE1_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == COMPARE1_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == COMPARE1_A::ENABLED - } -} -#[doc = "Write '1' to enable event routing for event COMPARE\\[1\\]\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum COMPARE1_AW { - #[doc = "1: Enable"] - SET = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: COMPARE1_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `COMPARE1` writer - Write '1' to enable event routing for event COMPARE\\[1\\]"] -pub type COMPARE1_W<'a, const O: u8> = crate::BitWriter<'a, u32, EVTENSET_SPEC, COMPARE1_AW, O>; -impl<'a, const O: u8> COMPARE1_W<'a, O> { - #[doc = "Enable"] - #[inline(always)] - pub fn set(self) -> &'a mut W { - self.variant(COMPARE1_AW::SET) - } -} -#[doc = "Field `COMPARE2` reader - Write '1' to enable event routing for event COMPARE\\[2\\]"] -pub type COMPARE2_R = crate::BitReader; -#[doc = "Write '1' to enable event routing for event COMPARE\\[2\\]\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum COMPARE2_A { - #[doc = "0: Read: Disabled"] - DISABLED = 0, - #[doc = "1: Read: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: COMPARE2_A) -> Self { - variant as u8 != 0 - } -} -impl COMPARE2_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> COMPARE2_A { - match self.bits { - false => COMPARE2_A::DISABLED, - true => COMPARE2_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == COMPARE2_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == COMPARE2_A::ENABLED - } -} -#[doc = "Write '1' to enable event routing for event COMPARE\\[2\\]\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum COMPARE2_AW { - #[doc = "1: Enable"] - SET = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: COMPARE2_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `COMPARE2` writer - Write '1' to enable event routing for event COMPARE\\[2\\]"] -pub type COMPARE2_W<'a, const O: u8> = crate::BitWriter<'a, u32, EVTENSET_SPEC, COMPARE2_AW, O>; -impl<'a, const O: u8> COMPARE2_W<'a, O> { - #[doc = "Enable"] - #[inline(always)] - pub fn set(self) -> &'a mut W { - self.variant(COMPARE2_AW::SET) - } -} -#[doc = "Field `COMPARE3` reader - Write '1' to enable event routing for event COMPARE\\[3\\]"] -pub type COMPARE3_R = crate::BitReader; -#[doc = "Write '1' to enable event routing for event COMPARE\\[3\\]\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum COMPARE3_A { - #[doc = "0: Read: Disabled"] - DISABLED = 0, - #[doc = "1: Read: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: COMPARE3_A) -> Self { - variant as u8 != 0 - } -} -impl COMPARE3_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> COMPARE3_A { - match self.bits { - false => COMPARE3_A::DISABLED, - true => COMPARE3_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == COMPARE3_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == COMPARE3_A::ENABLED - } -} -#[doc = "Write '1' to enable event routing for event COMPARE\\[3\\]\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum COMPARE3_AW { - #[doc = "1: Enable"] - SET = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: COMPARE3_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `COMPARE3` writer - Write '1' to enable event routing for event COMPARE\\[3\\]"] -pub type COMPARE3_W<'a, const O: u8> = crate::BitWriter<'a, u32, EVTENSET_SPEC, COMPARE3_AW, O>; -impl<'a, const O: u8> COMPARE3_W<'a, O> { - #[doc = "Enable"] - #[inline(always)] - pub fn set(self) -> &'a mut W { - self.variant(COMPARE3_AW::SET) - } -} -impl R { - #[doc = "Bit 0 - Write '1' to enable event routing for event TICK"] - #[inline(always)] - pub fn tick(&self) -> TICK_R { - TICK_R::new((self.bits & 1) != 0) - } - #[doc = "Bit 1 - Write '1' to enable event routing for event OVRFLW"] - #[inline(always)] - pub fn ovrflw(&self) -> OVRFLW_R { - OVRFLW_R::new(((self.bits >> 1) & 1) != 0) - } - #[doc = "Bit 16 - Write '1' to enable event routing for event COMPARE\\[0\\]"] - #[inline(always)] - pub fn compare0(&self) -> COMPARE0_R { - COMPARE0_R::new(((self.bits >> 16) & 1) != 0) - } - #[doc = "Bit 17 - Write '1' to enable event routing for event COMPARE\\[1\\]"] - #[inline(always)] - pub fn compare1(&self) -> COMPARE1_R { - COMPARE1_R::new(((self.bits >> 17) & 1) != 0) - } - #[doc = "Bit 18 - Write '1' to enable event routing for event COMPARE\\[2\\]"] - #[inline(always)] - pub fn compare2(&self) -> COMPARE2_R { - COMPARE2_R::new(((self.bits >> 18) & 1) != 0) - } - #[doc = "Bit 19 - Write '1' to enable event routing for event COMPARE\\[3\\]"] - #[inline(always)] - pub fn compare3(&self) -> COMPARE3_R { - COMPARE3_R::new(((self.bits >> 19) & 1) != 0) - } -} -impl W { - #[doc = "Bit 0 - Write '1' to enable event routing for event TICK"] - #[inline(always)] - #[must_use] - pub fn tick(&mut self) -> TICK_W<0> { - TICK_W::new(self) - } - #[doc = "Bit 1 - Write '1' to enable event routing for event OVRFLW"] - #[inline(always)] - #[must_use] - pub fn ovrflw(&mut self) -> OVRFLW_W<1> { - OVRFLW_W::new(self) - } - #[doc = "Bit 16 - Write '1' to enable event routing for event COMPARE\\[0\\]"] - #[inline(always)] - #[must_use] - pub fn compare0(&mut self) -> COMPARE0_W<16> { - COMPARE0_W::new(self) - } - #[doc = "Bit 17 - Write '1' to enable event routing for event COMPARE\\[1\\]"] - #[inline(always)] - #[must_use] - pub fn compare1(&mut self) -> COMPARE1_W<17> { - COMPARE1_W::new(self) - } - #[doc = "Bit 18 - Write '1' to enable event routing for event COMPARE\\[2\\]"] - #[inline(always)] - #[must_use] - pub fn compare2(&mut self) -> COMPARE2_W<18> { - COMPARE2_W::new(self) - } - #[doc = "Bit 19 - Write '1' to enable event routing for event COMPARE\\[3\\]"] - #[inline(always)] - #[must_use] - pub fn compare3(&mut self) -> COMPARE3_W<19> { - COMPARE3_W::new(self) - } - #[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 = "Enable event routing\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 [evtenset](index.html) module"] -pub struct EVTENSET_SPEC; -impl crate::RegisterSpec for EVTENSET_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [evtenset::R](R) reader structure"] -impl crate::Readable for EVTENSET_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [evtenset::W](W) writer structure"] -impl crate::Writable for EVTENSET_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets EVTENSET to value 0"] -impl crate::Resettable for EVTENSET_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/rtc0/intenclr.rs b/down-the-stack/dk_pac/src/rtc0/intenclr.rs deleted file mode 100644 index e3774cc..0000000 --- a/down-the-stack/dk_pac/src/rtc0/intenclr.rs +++ /dev/null @@ -1,473 +0,0 @@ -#[doc = "Register `INTENCLR` 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 `INTENCLR` 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 `TICK` reader - Write '1' to disable interrupt for event TICK"] -pub type TICK_R = crate::BitReader; -#[doc = "Write '1' to disable interrupt for event TICK\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum TICK_A { - #[doc = "0: Read: Disabled"] - DISABLED = 0, - #[doc = "1: Read: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: TICK_A) -> Self { - variant as u8 != 0 - } -} -impl TICK_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> TICK_A { - match self.bits { - false => TICK_A::DISABLED, - true => TICK_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == TICK_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == TICK_A::ENABLED - } -} -#[doc = "Write '1' to disable interrupt for event TICK\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum TICK_AW { - #[doc = "1: Disable"] - CLEAR = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: TICK_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `TICK` writer - Write '1' to disable interrupt for event TICK"] -pub type TICK_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENCLR_SPEC, TICK_AW, O>; -impl<'a, const O: u8> TICK_W<'a, O> { - #[doc = "Disable"] - #[inline(always)] - pub fn clear(self) -> &'a mut W { - self.variant(TICK_AW::CLEAR) - } -} -#[doc = "Field `OVRFLW` reader - Write '1' to disable interrupt for event OVRFLW"] -pub type OVRFLW_R = crate::BitReader; -#[doc = "Write '1' to disable interrupt for event OVRFLW\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum OVRFLW_A { - #[doc = "0: Read: Disabled"] - DISABLED = 0, - #[doc = "1: Read: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: OVRFLW_A) -> Self { - variant as u8 != 0 - } -} -impl OVRFLW_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> OVRFLW_A { - match self.bits { - false => OVRFLW_A::DISABLED, - true => OVRFLW_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == OVRFLW_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == OVRFLW_A::ENABLED - } -} -#[doc = "Write '1' to disable interrupt for event OVRFLW\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum OVRFLW_AW { - #[doc = "1: Disable"] - CLEAR = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: OVRFLW_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `OVRFLW` writer - Write '1' to disable interrupt for event OVRFLW"] -pub type OVRFLW_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENCLR_SPEC, OVRFLW_AW, O>; -impl<'a, const O: u8> OVRFLW_W<'a, O> { - #[doc = "Disable"] - #[inline(always)] - pub fn clear(self) -> &'a mut W { - self.variant(OVRFLW_AW::CLEAR) - } -} -#[doc = "Field `COMPARE0` reader - Write '1' to disable interrupt for event COMPARE\\[0\\]"] -pub type COMPARE0_R = crate::BitReader; -#[doc = "Write '1' to disable interrupt for event COMPARE\\[0\\]\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum COMPARE0_A { - #[doc = "0: Read: Disabled"] - DISABLED = 0, - #[doc = "1: Read: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: COMPARE0_A) -> Self { - variant as u8 != 0 - } -} -impl COMPARE0_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> COMPARE0_A { - match self.bits { - false => COMPARE0_A::DISABLED, - true => COMPARE0_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == COMPARE0_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == COMPARE0_A::ENABLED - } -} -#[doc = "Write '1' to disable interrupt for event COMPARE\\[0\\]\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum COMPARE0_AW { - #[doc = "1: Disable"] - CLEAR = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: COMPARE0_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `COMPARE0` writer - Write '1' to disable interrupt for event COMPARE\\[0\\]"] -pub type COMPARE0_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENCLR_SPEC, COMPARE0_AW, O>; -impl<'a, const O: u8> COMPARE0_W<'a, O> { - #[doc = "Disable"] - #[inline(always)] - pub fn clear(self) -> &'a mut W { - self.variant(COMPARE0_AW::CLEAR) - } -} -#[doc = "Field `COMPARE1` reader - Write '1' to disable interrupt for event COMPARE\\[1\\]"] -pub type COMPARE1_R = crate::BitReader; -#[doc = "Write '1' to disable interrupt for event COMPARE\\[1\\]\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum COMPARE1_A { - #[doc = "0: Read: Disabled"] - DISABLED = 0, - #[doc = "1: Read: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: COMPARE1_A) -> Self { - variant as u8 != 0 - } -} -impl COMPARE1_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> COMPARE1_A { - match self.bits { - false => COMPARE1_A::DISABLED, - true => COMPARE1_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == COMPARE1_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == COMPARE1_A::ENABLED - } -} -#[doc = "Write '1' to disable interrupt for event COMPARE\\[1\\]\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum COMPARE1_AW { - #[doc = "1: Disable"] - CLEAR = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: COMPARE1_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `COMPARE1` writer - Write '1' to disable interrupt for event COMPARE\\[1\\]"] -pub type COMPARE1_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENCLR_SPEC, COMPARE1_AW, O>; -impl<'a, const O: u8> COMPARE1_W<'a, O> { - #[doc = "Disable"] - #[inline(always)] - pub fn clear(self) -> &'a mut W { - self.variant(COMPARE1_AW::CLEAR) - } -} -#[doc = "Field `COMPARE2` reader - Write '1' to disable interrupt for event COMPARE\\[2\\]"] -pub type COMPARE2_R = crate::BitReader; -#[doc = "Write '1' to disable interrupt for event COMPARE\\[2\\]\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum COMPARE2_A { - #[doc = "0: Read: Disabled"] - DISABLED = 0, - #[doc = "1: Read: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: COMPARE2_A) -> Self { - variant as u8 != 0 - } -} -impl COMPARE2_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> COMPARE2_A { - match self.bits { - false => COMPARE2_A::DISABLED, - true => COMPARE2_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == COMPARE2_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == COMPARE2_A::ENABLED - } -} -#[doc = "Write '1' to disable interrupt for event COMPARE\\[2\\]\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum COMPARE2_AW { - #[doc = "1: Disable"] - CLEAR = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: COMPARE2_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `COMPARE2` writer - Write '1' to disable interrupt for event COMPARE\\[2\\]"] -pub type COMPARE2_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENCLR_SPEC, COMPARE2_AW, O>; -impl<'a, const O: u8> COMPARE2_W<'a, O> { - #[doc = "Disable"] - #[inline(always)] - pub fn clear(self) -> &'a mut W { - self.variant(COMPARE2_AW::CLEAR) - } -} -#[doc = "Field `COMPARE3` reader - Write '1' to disable interrupt for event COMPARE\\[3\\]"] -pub type COMPARE3_R = crate::BitReader; -#[doc = "Write '1' to disable interrupt for event COMPARE\\[3\\]\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum COMPARE3_A { - #[doc = "0: Read: Disabled"] - DISABLED = 0, - #[doc = "1: Read: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: COMPARE3_A) -> Self { - variant as u8 != 0 - } -} -impl COMPARE3_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> COMPARE3_A { - match self.bits { - false => COMPARE3_A::DISABLED, - true => COMPARE3_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == COMPARE3_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == COMPARE3_A::ENABLED - } -} -#[doc = "Write '1' to disable interrupt for event COMPARE\\[3\\]\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum COMPARE3_AW { - #[doc = "1: Disable"] - CLEAR = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: COMPARE3_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `COMPARE3` writer - Write '1' to disable interrupt for event COMPARE\\[3\\]"] -pub type COMPARE3_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENCLR_SPEC, COMPARE3_AW, O>; -impl<'a, const O: u8> COMPARE3_W<'a, O> { - #[doc = "Disable"] - #[inline(always)] - pub fn clear(self) -> &'a mut W { - self.variant(COMPARE3_AW::CLEAR) - } -} -impl R { - #[doc = "Bit 0 - Write '1' to disable interrupt for event TICK"] - #[inline(always)] - pub fn tick(&self) -> TICK_R { - TICK_R::new((self.bits & 1) != 0) - } - #[doc = "Bit 1 - Write '1' to disable interrupt for event OVRFLW"] - #[inline(always)] - pub fn ovrflw(&self) -> OVRFLW_R { - OVRFLW_R::new(((self.bits >> 1) & 1) != 0) - } - #[doc = "Bit 16 - Write '1' to disable interrupt for event COMPARE\\[0\\]"] - #[inline(always)] - pub fn compare0(&self) -> COMPARE0_R { - COMPARE0_R::new(((self.bits >> 16) & 1) != 0) - } - #[doc = "Bit 17 - Write '1' to disable interrupt for event COMPARE\\[1\\]"] - #[inline(always)] - pub fn compare1(&self) -> COMPARE1_R { - COMPARE1_R::new(((self.bits >> 17) & 1) != 0) - } - #[doc = "Bit 18 - Write '1' to disable interrupt for event COMPARE\\[2\\]"] - #[inline(always)] - pub fn compare2(&self) -> COMPARE2_R { - COMPARE2_R::new(((self.bits >> 18) & 1) != 0) - } - #[doc = "Bit 19 - Write '1' to disable interrupt for event COMPARE\\[3\\]"] - #[inline(always)] - pub fn compare3(&self) -> COMPARE3_R { - COMPARE3_R::new(((self.bits >> 19) & 1) != 0) - } -} -impl W { - #[doc = "Bit 0 - Write '1' to disable interrupt for event TICK"] - #[inline(always)] - #[must_use] - pub fn tick(&mut self) -> TICK_W<0> { - TICK_W::new(self) - } - #[doc = "Bit 1 - Write '1' to disable interrupt for event OVRFLW"] - #[inline(always)] - #[must_use] - pub fn ovrflw(&mut self) -> OVRFLW_W<1> { - OVRFLW_W::new(self) - } - #[doc = "Bit 16 - Write '1' to disable interrupt for event COMPARE\\[0\\]"] - #[inline(always)] - #[must_use] - pub fn compare0(&mut self) -> COMPARE0_W<16> { - COMPARE0_W::new(self) - } - #[doc = "Bit 17 - Write '1' to disable interrupt for event COMPARE\\[1\\]"] - #[inline(always)] - #[must_use] - pub fn compare1(&mut self) -> COMPARE1_W<17> { - COMPARE1_W::new(self) - } - #[doc = "Bit 18 - Write '1' to disable interrupt for event COMPARE\\[2\\]"] - #[inline(always)] - #[must_use] - pub fn compare2(&mut self) -> COMPARE2_W<18> { - COMPARE2_W::new(self) - } - #[doc = "Bit 19 - Write '1' to disable interrupt for event COMPARE\\[3\\]"] - #[inline(always)] - #[must_use] - pub fn compare3(&mut self) -> COMPARE3_W<19> { - COMPARE3_W::new(self) - } - #[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 = "Disable interrupt\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 [intenclr](index.html) module"] -pub struct INTENCLR_SPEC; -impl crate::RegisterSpec for INTENCLR_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [intenclr::R](R) reader structure"] -impl crate::Readable for INTENCLR_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [intenclr::W](W) writer structure"] -impl crate::Writable for INTENCLR_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets INTENCLR to value 0"] -impl crate::Resettable for INTENCLR_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/rtc0/intenset.rs b/down-the-stack/dk_pac/src/rtc0/intenset.rs deleted file mode 100644 index d7f253a..0000000 --- a/down-the-stack/dk_pac/src/rtc0/intenset.rs +++ /dev/null @@ -1,473 +0,0 @@ -#[doc = "Register `INTENSET` 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 `INTENSET` 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 `TICK` reader - Write '1' to enable interrupt for event TICK"] -pub type TICK_R = crate::BitReader; -#[doc = "Write '1' to enable interrupt for event TICK\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum TICK_A { - #[doc = "0: Read: Disabled"] - DISABLED = 0, - #[doc = "1: Read: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: TICK_A) -> Self { - variant as u8 != 0 - } -} -impl TICK_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> TICK_A { - match self.bits { - false => TICK_A::DISABLED, - true => TICK_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == TICK_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == TICK_A::ENABLED - } -} -#[doc = "Write '1' to enable interrupt for event TICK\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum TICK_AW { - #[doc = "1: Enable"] - SET = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: TICK_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `TICK` writer - Write '1' to enable interrupt for event TICK"] -pub type TICK_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENSET_SPEC, TICK_AW, O>; -impl<'a, const O: u8> TICK_W<'a, O> { - #[doc = "Enable"] - #[inline(always)] - pub fn set(self) -> &'a mut W { - self.variant(TICK_AW::SET) - } -} -#[doc = "Field `OVRFLW` reader - Write '1' to enable interrupt for event OVRFLW"] -pub type OVRFLW_R = crate::BitReader; -#[doc = "Write '1' to enable interrupt for event OVRFLW\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum OVRFLW_A { - #[doc = "0: Read: Disabled"] - DISABLED = 0, - #[doc = "1: Read: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: OVRFLW_A) -> Self { - variant as u8 != 0 - } -} -impl OVRFLW_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> OVRFLW_A { - match self.bits { - false => OVRFLW_A::DISABLED, - true => OVRFLW_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == OVRFLW_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == OVRFLW_A::ENABLED - } -} -#[doc = "Write '1' to enable interrupt for event OVRFLW\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum OVRFLW_AW { - #[doc = "1: Enable"] - SET = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: OVRFLW_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `OVRFLW` writer - Write '1' to enable interrupt for event OVRFLW"] -pub type OVRFLW_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENSET_SPEC, OVRFLW_AW, O>; -impl<'a, const O: u8> OVRFLW_W<'a, O> { - #[doc = "Enable"] - #[inline(always)] - pub fn set(self) -> &'a mut W { - self.variant(OVRFLW_AW::SET) - } -} -#[doc = "Field `COMPARE0` reader - Write '1' to enable interrupt for event COMPARE\\[0\\]"] -pub type COMPARE0_R = crate::BitReader; -#[doc = "Write '1' to enable interrupt for event COMPARE\\[0\\]\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum COMPARE0_A { - #[doc = "0: Read: Disabled"] - DISABLED = 0, - #[doc = "1: Read: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: COMPARE0_A) -> Self { - variant as u8 != 0 - } -} -impl COMPARE0_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> COMPARE0_A { - match self.bits { - false => COMPARE0_A::DISABLED, - true => COMPARE0_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == COMPARE0_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == COMPARE0_A::ENABLED - } -} -#[doc = "Write '1' to enable interrupt for event COMPARE\\[0\\]\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum COMPARE0_AW { - #[doc = "1: Enable"] - SET = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: COMPARE0_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `COMPARE0` writer - Write '1' to enable interrupt for event COMPARE\\[0\\]"] -pub type COMPARE0_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENSET_SPEC, COMPARE0_AW, O>; -impl<'a, const O: u8> COMPARE0_W<'a, O> { - #[doc = "Enable"] - #[inline(always)] - pub fn set(self) -> &'a mut W { - self.variant(COMPARE0_AW::SET) - } -} -#[doc = "Field `COMPARE1` reader - Write '1' to enable interrupt for event COMPARE\\[1\\]"] -pub type COMPARE1_R = crate::BitReader; -#[doc = "Write '1' to enable interrupt for event COMPARE\\[1\\]\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum COMPARE1_A { - #[doc = "0: Read: Disabled"] - DISABLED = 0, - #[doc = "1: Read: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: COMPARE1_A) -> Self { - variant as u8 != 0 - } -} -impl COMPARE1_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> COMPARE1_A { - match self.bits { - false => COMPARE1_A::DISABLED, - true => COMPARE1_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == COMPARE1_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == COMPARE1_A::ENABLED - } -} -#[doc = "Write '1' to enable interrupt for event COMPARE\\[1\\]\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum COMPARE1_AW { - #[doc = "1: Enable"] - SET = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: COMPARE1_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `COMPARE1` writer - Write '1' to enable interrupt for event COMPARE\\[1\\]"] -pub type COMPARE1_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENSET_SPEC, COMPARE1_AW, O>; -impl<'a, const O: u8> COMPARE1_W<'a, O> { - #[doc = "Enable"] - #[inline(always)] - pub fn set(self) -> &'a mut W { - self.variant(COMPARE1_AW::SET) - } -} -#[doc = "Field `COMPARE2` reader - Write '1' to enable interrupt for event COMPARE\\[2\\]"] -pub type COMPARE2_R = crate::BitReader; -#[doc = "Write '1' to enable interrupt for event COMPARE\\[2\\]\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum COMPARE2_A { - #[doc = "0: Read: Disabled"] - DISABLED = 0, - #[doc = "1: Read: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: COMPARE2_A) -> Self { - variant as u8 != 0 - } -} -impl COMPARE2_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> COMPARE2_A { - match self.bits { - false => COMPARE2_A::DISABLED, - true => COMPARE2_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == COMPARE2_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == COMPARE2_A::ENABLED - } -} -#[doc = "Write '1' to enable interrupt for event COMPARE\\[2\\]\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum COMPARE2_AW { - #[doc = "1: Enable"] - SET = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: COMPARE2_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `COMPARE2` writer - Write '1' to enable interrupt for event COMPARE\\[2\\]"] -pub type COMPARE2_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENSET_SPEC, COMPARE2_AW, O>; -impl<'a, const O: u8> COMPARE2_W<'a, O> { - #[doc = "Enable"] - #[inline(always)] - pub fn set(self) -> &'a mut W { - self.variant(COMPARE2_AW::SET) - } -} -#[doc = "Field `COMPARE3` reader - Write '1' to enable interrupt for event COMPARE\\[3\\]"] -pub type COMPARE3_R = crate::BitReader; -#[doc = "Write '1' to enable interrupt for event COMPARE\\[3\\]\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum COMPARE3_A { - #[doc = "0: Read: Disabled"] - DISABLED = 0, - #[doc = "1: Read: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: COMPARE3_A) -> Self { - variant as u8 != 0 - } -} -impl COMPARE3_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> COMPARE3_A { - match self.bits { - false => COMPARE3_A::DISABLED, - true => COMPARE3_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == COMPARE3_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == COMPARE3_A::ENABLED - } -} -#[doc = "Write '1' to enable interrupt for event COMPARE\\[3\\]\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum COMPARE3_AW { - #[doc = "1: Enable"] - SET = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: COMPARE3_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `COMPARE3` writer - Write '1' to enable interrupt for event COMPARE\\[3\\]"] -pub type COMPARE3_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENSET_SPEC, COMPARE3_AW, O>; -impl<'a, const O: u8> COMPARE3_W<'a, O> { - #[doc = "Enable"] - #[inline(always)] - pub fn set(self) -> &'a mut W { - self.variant(COMPARE3_AW::SET) - } -} -impl R { - #[doc = "Bit 0 - Write '1' to enable interrupt for event TICK"] - #[inline(always)] - pub fn tick(&self) -> TICK_R { - TICK_R::new((self.bits & 1) != 0) - } - #[doc = "Bit 1 - Write '1' to enable interrupt for event OVRFLW"] - #[inline(always)] - pub fn ovrflw(&self) -> OVRFLW_R { - OVRFLW_R::new(((self.bits >> 1) & 1) != 0) - } - #[doc = "Bit 16 - Write '1' to enable interrupt for event COMPARE\\[0\\]"] - #[inline(always)] - pub fn compare0(&self) -> COMPARE0_R { - COMPARE0_R::new(((self.bits >> 16) & 1) != 0) - } - #[doc = "Bit 17 - Write '1' to enable interrupt for event COMPARE\\[1\\]"] - #[inline(always)] - pub fn compare1(&self) -> COMPARE1_R { - COMPARE1_R::new(((self.bits >> 17) & 1) != 0) - } - #[doc = "Bit 18 - Write '1' to enable interrupt for event COMPARE\\[2\\]"] - #[inline(always)] - pub fn compare2(&self) -> COMPARE2_R { - COMPARE2_R::new(((self.bits >> 18) & 1) != 0) - } - #[doc = "Bit 19 - Write '1' to enable interrupt for event COMPARE\\[3\\]"] - #[inline(always)] - pub fn compare3(&self) -> COMPARE3_R { - COMPARE3_R::new(((self.bits >> 19) & 1) != 0) - } -} -impl W { - #[doc = "Bit 0 - Write '1' to enable interrupt for event TICK"] - #[inline(always)] - #[must_use] - pub fn tick(&mut self) -> TICK_W<0> { - TICK_W::new(self) - } - #[doc = "Bit 1 - Write '1' to enable interrupt for event OVRFLW"] - #[inline(always)] - #[must_use] - pub fn ovrflw(&mut self) -> OVRFLW_W<1> { - OVRFLW_W::new(self) - } - #[doc = "Bit 16 - Write '1' to enable interrupt for event COMPARE\\[0\\]"] - #[inline(always)] - #[must_use] - pub fn compare0(&mut self) -> COMPARE0_W<16> { - COMPARE0_W::new(self) - } - #[doc = "Bit 17 - Write '1' to enable interrupt for event COMPARE\\[1\\]"] - #[inline(always)] - #[must_use] - pub fn compare1(&mut self) -> COMPARE1_W<17> { - COMPARE1_W::new(self) - } - #[doc = "Bit 18 - Write '1' to enable interrupt for event COMPARE\\[2\\]"] - #[inline(always)] - #[must_use] - pub fn compare2(&mut self) -> COMPARE2_W<18> { - COMPARE2_W::new(self) - } - #[doc = "Bit 19 - Write '1' to enable interrupt for event COMPARE\\[3\\]"] - #[inline(always)] - #[must_use] - pub fn compare3(&mut self) -> COMPARE3_W<19> { - COMPARE3_W::new(self) - } - #[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 = "Enable interrupt\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 [intenset](index.html) module"] -pub struct INTENSET_SPEC; -impl crate::RegisterSpec for INTENSET_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [intenset::R](R) reader structure"] -impl crate::Readable for INTENSET_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [intenset::W](W) writer structure"] -impl crate::Writable for INTENSET_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets INTENSET to value 0"] -impl crate::Resettable for INTENSET_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/rtc0/prescaler.rs b/down-the-stack/dk_pac/src/rtc0/prescaler.rs deleted file mode 100644 index 9f104ce..0000000 --- a/down-the-stack/dk_pac/src/rtc0/prescaler.rs +++ /dev/null @@ -1,81 +0,0 @@ -#[doc = "Register `PRESCALER` 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 `PRESCALER` 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 `PRESCALER` reader - Prescaler value"] -pub type PRESCALER_R = crate::FieldReader; -#[doc = "Field `PRESCALER` writer - Prescaler value"] -pub type PRESCALER_W<'a, const O: u8> = - crate::FieldWriter<'a, u32, PRESCALER_SPEC, u16, u16, 12, O>; -impl R { - #[doc = "Bits 0:11 - Prescaler value"] - #[inline(always)] - pub fn prescaler(&self) -> PRESCALER_R { - PRESCALER_R::new((self.bits & 0x0fff) as u16) - } -} -impl W { - #[doc = "Bits 0:11 - Prescaler value"] - #[inline(always)] - #[must_use] - pub fn prescaler(&mut self) -> PRESCALER_W<0> { - PRESCALER_W::new(self) - } - #[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 = "12 bit prescaler for COUNTER frequency (32768/(PRESCALER+1)).Must be written when RTC is stopped\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 [prescaler](index.html) module"] -pub struct PRESCALER_SPEC; -impl crate::RegisterSpec for PRESCALER_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [prescaler::R](R) reader structure"] -impl crate::Readable for PRESCALER_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [prescaler::W](W) writer structure"] -impl crate::Writable for PRESCALER_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets PRESCALER to value 0"] -impl crate::Resettable for PRESCALER_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/rtc0/tasks_clear.rs b/down-the-stack/dk_pac/src/rtc0/tasks_clear.rs deleted file mode 100644 index 0b44170..0000000 --- a/down-the-stack/dk_pac/src/rtc0/tasks_clear.rs +++ /dev/null @@ -1,72 +0,0 @@ -#[doc = "Register `TASKS_CLEAR` 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 = "Clear RTC COUNTER\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum TASKS_CLEAR_AW { - #[doc = "1: Trigger task"] - TRIGGER = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: TASKS_CLEAR_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `TASKS_CLEAR` writer - Clear RTC COUNTER"] -pub type TASKS_CLEAR_W<'a, const O: u8> = - crate::BitWriter<'a, u32, TASKS_CLEAR_SPEC, TASKS_CLEAR_AW, O>; -impl<'a, const O: u8> TASKS_CLEAR_W<'a, O> { - #[doc = "Trigger task"] - #[inline(always)] - pub fn trigger(self) -> &'a mut W { - self.variant(TASKS_CLEAR_AW::TRIGGER) - } -} -impl W { - #[doc = "Bit 0 - Clear RTC COUNTER"] - #[inline(always)] - #[must_use] - pub fn tasks_clear(&mut self) -> TASKS_CLEAR_W<0> { - TASKS_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 - } -} -#[doc = "Clear RTC COUNTER\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 [tasks_clear](index.html) module"] -pub struct TASKS_CLEAR_SPEC; -impl crate::RegisterSpec for TASKS_CLEAR_SPEC { - type Ux = u32; -} -#[doc = "`write(|w| ..)` method takes [tasks_clear::W](W) writer structure"] -impl crate::Writable for TASKS_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 TASKS_CLEAR to value 0"] -impl crate::Resettable for TASKS_CLEAR_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/rtc0/tasks_start.rs b/down-the-stack/dk_pac/src/rtc0/tasks_start.rs deleted file mode 100644 index 1043541..0000000 --- a/down-the-stack/dk_pac/src/rtc0/tasks_start.rs +++ /dev/null @@ -1,72 +0,0 @@ -#[doc = "Register `TASKS_START` 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 = "Start RTC COUNTER\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum TASKS_START_AW { - #[doc = "1: Trigger task"] - TRIGGER = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: TASKS_START_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `TASKS_START` writer - Start RTC COUNTER"] -pub type TASKS_START_W<'a, const O: u8> = - crate::BitWriter<'a, u32, TASKS_START_SPEC, TASKS_START_AW, O>; -impl<'a, const O: u8> TASKS_START_W<'a, O> { - #[doc = "Trigger task"] - #[inline(always)] - pub fn trigger(self) -> &'a mut W { - self.variant(TASKS_START_AW::TRIGGER) - } -} -impl W { - #[doc = "Bit 0 - Start RTC COUNTER"] - #[inline(always)] - #[must_use] - pub fn tasks_start(&mut self) -> TASKS_START_W<0> { - TASKS_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 - } -} -#[doc = "Start RTC COUNTER\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 [tasks_start](index.html) module"] -pub struct TASKS_START_SPEC; -impl crate::RegisterSpec for TASKS_START_SPEC { - type Ux = u32; -} -#[doc = "`write(|w| ..)` method takes [tasks_start::W](W) writer structure"] -impl crate::Writable for TASKS_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 TASKS_START to value 0"] -impl crate::Resettable for TASKS_START_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/rtc0/tasks_stop.rs b/down-the-stack/dk_pac/src/rtc0/tasks_stop.rs deleted file mode 100644 index 5f1e92a..0000000 --- a/down-the-stack/dk_pac/src/rtc0/tasks_stop.rs +++ /dev/null @@ -1,72 +0,0 @@ -#[doc = "Register `TASKS_STOP` 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 = "Stop RTC COUNTER\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum TASKS_STOP_AW { - #[doc = "1: Trigger task"] - TRIGGER = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: TASKS_STOP_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `TASKS_STOP` writer - Stop RTC COUNTER"] -pub type TASKS_STOP_W<'a, const O: u8> = - crate::BitWriter<'a, u32, TASKS_STOP_SPEC, TASKS_STOP_AW, O>; -impl<'a, const O: u8> TASKS_STOP_W<'a, O> { - #[doc = "Trigger task"] - #[inline(always)] - pub fn trigger(self) -> &'a mut W { - self.variant(TASKS_STOP_AW::TRIGGER) - } -} -impl W { - #[doc = "Bit 0 - Stop RTC COUNTER"] - #[inline(always)] - #[must_use] - pub fn tasks_stop(&mut self) -> TASKS_STOP_W<0> { - TASKS_STOP_W::new(self) - } - #[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 = "Stop RTC COUNTER\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 [tasks_stop](index.html) module"] -pub struct TASKS_STOP_SPEC; -impl crate::RegisterSpec for TASKS_STOP_SPEC { - type Ux = u32; -} -#[doc = "`write(|w| ..)` method takes [tasks_stop::W](W) writer structure"] -impl crate::Writable for TASKS_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 TASKS_STOP to value 0"] -impl crate::Resettable for TASKS_STOP_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/rtc0/tasks_trigovrflw.rs b/down-the-stack/dk_pac/src/rtc0/tasks_trigovrflw.rs deleted file mode 100644 index 86de501..0000000 --- a/down-the-stack/dk_pac/src/rtc0/tasks_trigovrflw.rs +++ /dev/null @@ -1,72 +0,0 @@ -#[doc = "Register `TASKS_TRIGOVRFLW` 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 = "Set COUNTER to 0xFFFFF0\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum TASKS_TRIGOVRFLW_AW { - #[doc = "1: Trigger task"] - TRIGGER = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: TASKS_TRIGOVRFLW_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `TASKS_TRIGOVRFLW` writer - Set COUNTER to 0xFFFFF0"] -pub type TASKS_TRIGOVRFLW_W<'a, const O: u8> = - crate::BitWriter<'a, u32, TASKS_TRIGOVRFLW_SPEC, TASKS_TRIGOVRFLW_AW, O>; -impl<'a, const O: u8> TASKS_TRIGOVRFLW_W<'a, O> { - #[doc = "Trigger task"] - #[inline(always)] - pub fn trigger(self) -> &'a mut W { - self.variant(TASKS_TRIGOVRFLW_AW::TRIGGER) - } -} -impl W { - #[doc = "Bit 0 - Set COUNTER to 0xFFFFF0"] - #[inline(always)] - #[must_use] - pub fn tasks_trigovrflw(&mut self) -> TASKS_TRIGOVRFLW_W<0> { - TASKS_TRIGOVRFLW_W::new(self) - } - #[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 = "Set COUNTER to 0xFFFFF0\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 [tasks_trigovrflw](index.html) module"] -pub struct TASKS_TRIGOVRFLW_SPEC; -impl crate::RegisterSpec for TASKS_TRIGOVRFLW_SPEC { - type Ux = u32; -} -#[doc = "`write(|w| ..)` method takes [tasks_trigovrflw::W](W) writer structure"] -impl crate::Writable for TASKS_TRIGOVRFLW_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets TASKS_TRIGOVRFLW to value 0"] -impl crate::Resettable for TASKS_TRIGOVRFLW_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/saadc.rs b/down-the-stack/dk_pac/src/saadc.rs deleted file mode 100644 index 444ad43..0000000 --- a/down-the-stack/dk_pac/src/saadc.rs +++ /dev/null @@ -1,140 +0,0 @@ -#[doc = r"Register block"] -#[repr(C)] -pub struct RegisterBlock { - #[doc = "0x00 - Start the ADC and prepare the result buffer in RAM"] - pub tasks_start: TASKS_START, - #[doc = "0x04 - Take one ADC sample, if scan is enabled all channels are sampled"] - pub tasks_sample: TASKS_SAMPLE, - #[doc = "0x08 - Stop the ADC and terminate any on-going conversion"] - pub tasks_stop: TASKS_STOP, - #[doc = "0x0c - Starts offset auto-calibration"] - pub tasks_calibrateoffset: TASKS_CALIBRATEOFFSET, - _reserved4: [u8; 0xf0], - #[doc = "0x100 - The ADC has started"] - pub events_started: EVENTS_STARTED, - #[doc = "0x104 - The ADC has filled up the Result buffer"] - pub events_end: EVENTS_END, - #[doc = "0x108 - A conversion task has been completed. Depending on the mode, multiple conversions might be needed for a result to be transferred to RAM."] - pub events_done: EVENTS_DONE, - #[doc = "0x10c - A result is ready to get transferred to RAM."] - pub events_resultdone: EVENTS_RESULTDONE, - #[doc = "0x110 - Calibration is complete"] - pub events_calibratedone: EVENTS_CALIBRATEDONE, - #[doc = "0x114 - The ADC has stopped"] - pub events_stopped: EVENTS_STOPPED, - #[doc = "0x118..0x158 - Peripheral events."] - pub events_ch: [EVENTS_CH; 8], - _reserved11: [u8; 0x01a8], - #[doc = "0x300 - Enable or disable interrupt"] - pub inten: INTEN, - #[doc = "0x304 - Enable interrupt"] - pub intenset: INTENSET, - #[doc = "0x308 - Disable interrupt"] - pub intenclr: INTENCLR, - _reserved14: [u8; 0xf4], - #[doc = "0x400 - Status"] - pub status: STATUS, - _reserved15: [u8; 0xfc], - #[doc = "0x500 - Enable or disable ADC"] - pub enable: ENABLE, - _reserved16: [u8; 0x0c], - #[doc = "0x510..0x590 - Unspecified"] - pub ch: [CH; 8], - _reserved17: [u8; 0x60], - #[doc = "0x5f0 - Resolution configuration"] - pub resolution: RESOLUTION, - #[doc = "0x5f4 - Oversampling configuration. OVERSAMPLE should not be combined with SCAN. The RESOLUTION is applied before averaging, thus for high OVERSAMPLE a higher RESOLUTION should be used."] - pub oversample: OVERSAMPLE, - #[doc = "0x5f8 - Controls normal or continuous sample rate"] - pub samplerate: SAMPLERATE, - _reserved20: [u8; 0x30], - #[doc = "0x62c..0x638 - RESULT EasyDMA channel"] - pub result: RESULT, -} -#[doc = "TASKS_START (w) register accessor: an alias for `Reg`"] -pub type TASKS_START = crate::Reg; -#[doc = "Start the ADC and prepare the result buffer in RAM"] -pub mod tasks_start; -#[doc = "TASKS_SAMPLE (w) register accessor: an alias for `Reg`"] -pub type TASKS_SAMPLE = crate::Reg; -#[doc = "Take one ADC sample, if scan is enabled all channels are sampled"] -pub mod tasks_sample; -#[doc = "TASKS_STOP (w) register accessor: an alias for `Reg`"] -pub type TASKS_STOP = crate::Reg; -#[doc = "Stop the ADC and terminate any on-going conversion"] -pub mod tasks_stop; -#[doc = "TASKS_CALIBRATEOFFSET (w) register accessor: an alias for `Reg`"] -pub type TASKS_CALIBRATEOFFSET = crate::Reg; -#[doc = "Starts offset auto-calibration"] -pub mod tasks_calibrateoffset; -#[doc = "EVENTS_STARTED (rw) register accessor: an alias for `Reg`"] -pub type EVENTS_STARTED = crate::Reg; -#[doc = "The ADC has started"] -pub mod events_started; -#[doc = "EVENTS_END (rw) register accessor: an alias for `Reg`"] -pub type EVENTS_END = crate::Reg; -#[doc = "The ADC has filled up the Result buffer"] -pub mod events_end; -#[doc = "EVENTS_DONE (rw) register accessor: an alias for `Reg`"] -pub type EVENTS_DONE = crate::Reg; -#[doc = "A conversion task has been completed. Depending on the mode, multiple conversions might be needed for a result to be transferred to RAM."] -pub mod events_done; -#[doc = "EVENTS_RESULTDONE (rw) register accessor: an alias for `Reg`"] -pub type EVENTS_RESULTDONE = crate::Reg; -#[doc = "A result is ready to get transferred to RAM."] -pub mod events_resultdone; -#[doc = "EVENTS_CALIBRATEDONE (rw) register accessor: an alias for `Reg`"] -pub type EVENTS_CALIBRATEDONE = crate::Reg; -#[doc = "Calibration is complete"] -pub mod events_calibratedone; -#[doc = "EVENTS_STOPPED (rw) register accessor: an alias for `Reg`"] -pub type EVENTS_STOPPED = crate::Reg; -#[doc = "The ADC has stopped"] -pub mod events_stopped; -#[doc = "Peripheral events."] -pub use self::events_ch::EVENTS_CH; -#[doc = r"Cluster"] -#[doc = "Peripheral events."] -pub mod events_ch; -#[doc = "INTEN (rw) register accessor: an alias for `Reg`"] -pub type INTEN = crate::Reg; -#[doc = "Enable or disable interrupt"] -pub mod inten; -#[doc = "INTENSET (rw) register accessor: an alias for `Reg`"] -pub type INTENSET = crate::Reg; -#[doc = "Enable interrupt"] -pub mod intenset; -#[doc = "INTENCLR (rw) register accessor: an alias for `Reg`"] -pub type INTENCLR = crate::Reg; -#[doc = "Disable interrupt"] -pub mod intenclr; -#[doc = "STATUS (r) register accessor: an alias for `Reg`"] -pub type STATUS = crate::Reg; -#[doc = "Status"] -pub mod status; -#[doc = "ENABLE (rw) register accessor: an alias for `Reg`"] -pub type ENABLE = crate::Reg; -#[doc = "Enable or disable ADC"] -pub mod enable; -#[doc = "Unspecified"] -pub use self::ch::CH; -#[doc = r"Cluster"] -#[doc = "Unspecified"] -pub mod ch; -#[doc = "RESOLUTION (rw) register accessor: an alias for `Reg`"] -pub type RESOLUTION = crate::Reg; -#[doc = "Resolution configuration"] -pub mod resolution; -#[doc = "OVERSAMPLE (rw) register accessor: an alias for `Reg`"] -pub type OVERSAMPLE = crate::Reg; -#[doc = "Oversampling configuration. OVERSAMPLE should not be combined with SCAN. The RESOLUTION is applied before averaging, thus for high OVERSAMPLE a higher RESOLUTION should be used."] -pub mod oversample; -#[doc = "SAMPLERATE (rw) register accessor: an alias for `Reg`"] -pub type SAMPLERATE = crate::Reg; -#[doc = "Controls normal or continuous sample rate"] -pub mod samplerate; -#[doc = "RESULT EasyDMA channel"] -pub use self::result::RESULT; -#[doc = r"Cluster"] -#[doc = "RESULT EasyDMA channel"] -pub mod result; diff --git a/down-the-stack/dk_pac/src/saadc/ch.rs b/down-the-stack/dk_pac/src/saadc/ch.rs deleted file mode 100644 index 63b5159..0000000 --- a/down-the-stack/dk_pac/src/saadc/ch.rs +++ /dev/null @@ -1,28 +0,0 @@ -#[doc = r"Register block"] -#[repr(C)] -pub struct CH { - #[doc = "0x00 - Description cluster: Input positive pin selection for CH\\[n\\]"] - pub pselp: PSELP, - #[doc = "0x04 - Description cluster: Input negative pin selection for CH\\[n\\]"] - pub pseln: PSELN, - #[doc = "0x08 - Description cluster: Input configuration for CH\\[n\\]"] - pub config: CONFIG, - #[doc = "0x0c - Description cluster: High/low limits for event monitoring a channel"] - pub limit: LIMIT, -} -#[doc = "PSELP (rw) register accessor: an alias for `Reg`"] -pub type PSELP = crate::Reg; -#[doc = "Description cluster: Input positive pin selection for CH\\[n\\]"] -pub mod pselp; -#[doc = "PSELN (rw) register accessor: an alias for `Reg`"] -pub type PSELN = crate::Reg; -#[doc = "Description cluster: Input negative pin selection for CH\\[n\\]"] -pub mod pseln; -#[doc = "CONFIG (rw) register accessor: an alias for `Reg`"] -pub type CONFIG = crate::Reg; -#[doc = "Description cluster: Input configuration for CH\\[n\\]"] -pub mod config; -#[doc = "LIMIT (rw) register accessor: an alias for `Reg`"] -pub type LIMIT = crate::Reg; -#[doc = "Description cluster: High/low limits for event monitoring a channel"] -pub mod limit; diff --git a/down-the-stack/dk_pac/src/saadc/ch/config.rs b/down-the-stack/dk_pac/src/saadc/ch/config.rs deleted file mode 100644 index 4f31f9e..0000000 --- a/down-the-stack/dk_pac/src/saadc/ch/config.rs +++ /dev/null @@ -1,682 +0,0 @@ -#[doc = "Register `CONFIG` 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 `CONFIG` 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 `RESP` reader - Positive channel resistor control"] -pub type RESP_R = crate::FieldReader; -#[doc = "Positive channel resistor control\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -#[repr(u8)] -pub enum RESP_A { - #[doc = "0: Bypass resistor ladder"] - BYPASS = 0, - #[doc = "1: Pull-down to GND"] - PULLDOWN = 1, - #[doc = "2: Pull-up to VDD"] - PULLUP = 2, - #[doc = "3: Set input at VDD/2"] - VDD1_2 = 3, -} -impl From for u8 { - #[inline(always)] - fn from(variant: RESP_A) -> Self { - variant as _ - } -} -impl RESP_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> RESP_A { - match self.bits { - 0 => RESP_A::BYPASS, - 1 => RESP_A::PULLDOWN, - 2 => RESP_A::PULLUP, - 3 => RESP_A::VDD1_2, - _ => unreachable!(), - } - } - #[doc = "Checks if the value of the field is `BYPASS`"] - #[inline(always)] - pub fn is_bypass(&self) -> bool { - *self == RESP_A::BYPASS - } - #[doc = "Checks if the value of the field is `PULLDOWN`"] - #[inline(always)] - pub fn is_pulldown(&self) -> bool { - *self == RESP_A::PULLDOWN - } - #[doc = "Checks if the value of the field is `PULLUP`"] - #[inline(always)] - pub fn is_pullup(&self) -> bool { - *self == RESP_A::PULLUP - } - #[doc = "Checks if the value of the field is `VDD1_2`"] - #[inline(always)] - pub fn is_vdd1_2(&self) -> bool { - *self == RESP_A::VDD1_2 - } -} -#[doc = "Field `RESP` writer - Positive channel resistor control"] -pub type RESP_W<'a, const O: u8> = crate::FieldWriterSafe<'a, u32, CONFIG_SPEC, u8, RESP_A, 2, O>; -impl<'a, const O: u8> RESP_W<'a, O> { - #[doc = "Bypass resistor ladder"] - #[inline(always)] - pub fn bypass(self) -> &'a mut W { - self.variant(RESP_A::BYPASS) - } - #[doc = "Pull-down to GND"] - #[inline(always)] - pub fn pulldown(self) -> &'a mut W { - self.variant(RESP_A::PULLDOWN) - } - #[doc = "Pull-up to VDD"] - #[inline(always)] - pub fn pullup(self) -> &'a mut W { - self.variant(RESP_A::PULLUP) - } - #[doc = "Set input at VDD/2"] - #[inline(always)] - pub fn vdd1_2(self) -> &'a mut W { - self.variant(RESP_A::VDD1_2) - } -} -#[doc = "Field `RESN` reader - Negative channel resistor control"] -pub type RESN_R = crate::FieldReader; -#[doc = "Negative channel resistor control\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -#[repr(u8)] -pub enum RESN_A { - #[doc = "0: Bypass resistor ladder"] - BYPASS = 0, - #[doc = "1: Pull-down to GND"] - PULLDOWN = 1, - #[doc = "2: Pull-up to VDD"] - PULLUP = 2, - #[doc = "3: Set input at VDD/2"] - VDD1_2 = 3, -} -impl From for u8 { - #[inline(always)] - fn from(variant: RESN_A) -> Self { - variant as _ - } -} -impl RESN_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> RESN_A { - match self.bits { - 0 => RESN_A::BYPASS, - 1 => RESN_A::PULLDOWN, - 2 => RESN_A::PULLUP, - 3 => RESN_A::VDD1_2, - _ => unreachable!(), - } - } - #[doc = "Checks if the value of the field is `BYPASS`"] - #[inline(always)] - pub fn is_bypass(&self) -> bool { - *self == RESN_A::BYPASS - } - #[doc = "Checks if the value of the field is `PULLDOWN`"] - #[inline(always)] - pub fn is_pulldown(&self) -> bool { - *self == RESN_A::PULLDOWN - } - #[doc = "Checks if the value of the field is `PULLUP`"] - #[inline(always)] - pub fn is_pullup(&self) -> bool { - *self == RESN_A::PULLUP - } - #[doc = "Checks if the value of the field is `VDD1_2`"] - #[inline(always)] - pub fn is_vdd1_2(&self) -> bool { - *self == RESN_A::VDD1_2 - } -} -#[doc = "Field `RESN` writer - Negative channel resistor control"] -pub type RESN_W<'a, const O: u8> = crate::FieldWriterSafe<'a, u32, CONFIG_SPEC, u8, RESN_A, 2, O>; -impl<'a, const O: u8> RESN_W<'a, O> { - #[doc = "Bypass resistor ladder"] - #[inline(always)] - pub fn bypass(self) -> &'a mut W { - self.variant(RESN_A::BYPASS) - } - #[doc = "Pull-down to GND"] - #[inline(always)] - pub fn pulldown(self) -> &'a mut W { - self.variant(RESN_A::PULLDOWN) - } - #[doc = "Pull-up to VDD"] - #[inline(always)] - pub fn pullup(self) -> &'a mut W { - self.variant(RESN_A::PULLUP) - } - #[doc = "Set input at VDD/2"] - #[inline(always)] - pub fn vdd1_2(self) -> &'a mut W { - self.variant(RESN_A::VDD1_2) - } -} -#[doc = "Field `GAIN` reader - Gain control"] -pub type GAIN_R = crate::FieldReader; -#[doc = "Gain control\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -#[repr(u8)] -pub enum GAIN_A { - #[doc = "0: 1/6"] - GAIN1_6 = 0, - #[doc = "1: 1/5"] - GAIN1_5 = 1, - #[doc = "2: 1/4"] - GAIN1_4 = 2, - #[doc = "3: 1/3"] - GAIN1_3 = 3, - #[doc = "4: 1/2"] - GAIN1_2 = 4, - #[doc = "5: 1"] - GAIN1 = 5, - #[doc = "6: 2"] - GAIN2 = 6, - #[doc = "7: 4"] - GAIN4 = 7, -} -impl From for u8 { - #[inline(always)] - fn from(variant: GAIN_A) -> Self { - variant as _ - } -} -impl GAIN_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> GAIN_A { - match self.bits { - 0 => GAIN_A::GAIN1_6, - 1 => GAIN_A::GAIN1_5, - 2 => GAIN_A::GAIN1_4, - 3 => GAIN_A::GAIN1_3, - 4 => GAIN_A::GAIN1_2, - 5 => GAIN_A::GAIN1, - 6 => GAIN_A::GAIN2, - 7 => GAIN_A::GAIN4, - _ => unreachable!(), - } - } - #[doc = "Checks if the value of the field is `GAIN1_6`"] - #[inline(always)] - pub fn is_gain1_6(&self) -> bool { - *self == GAIN_A::GAIN1_6 - } - #[doc = "Checks if the value of the field is `GAIN1_5`"] - #[inline(always)] - pub fn is_gain1_5(&self) -> bool { - *self == GAIN_A::GAIN1_5 - } - #[doc = "Checks if the value of the field is `GAIN1_4`"] - #[inline(always)] - pub fn is_gain1_4(&self) -> bool { - *self == GAIN_A::GAIN1_4 - } - #[doc = "Checks if the value of the field is `GAIN1_3`"] - #[inline(always)] - pub fn is_gain1_3(&self) -> bool { - *self == GAIN_A::GAIN1_3 - } - #[doc = "Checks if the value of the field is `GAIN1_2`"] - #[inline(always)] - pub fn is_gain1_2(&self) -> bool { - *self == GAIN_A::GAIN1_2 - } - #[doc = "Checks if the value of the field is `GAIN1`"] - #[inline(always)] - pub fn is_gain1(&self) -> bool { - *self == GAIN_A::GAIN1 - } - #[doc = "Checks if the value of the field is `GAIN2`"] - #[inline(always)] - pub fn is_gain2(&self) -> bool { - *self == GAIN_A::GAIN2 - } - #[doc = "Checks if the value of the field is `GAIN4`"] - #[inline(always)] - pub fn is_gain4(&self) -> bool { - *self == GAIN_A::GAIN4 - } -} -#[doc = "Field `GAIN` writer - Gain control"] -pub type GAIN_W<'a, const O: u8> = crate::FieldWriterSafe<'a, u32, CONFIG_SPEC, u8, GAIN_A, 3, O>; -impl<'a, const O: u8> GAIN_W<'a, O> { - #[doc = "1/6"] - #[inline(always)] - pub fn gain1_6(self) -> &'a mut W { - self.variant(GAIN_A::GAIN1_6) - } - #[doc = "1/5"] - #[inline(always)] - pub fn gain1_5(self) -> &'a mut W { - self.variant(GAIN_A::GAIN1_5) - } - #[doc = "1/4"] - #[inline(always)] - pub fn gain1_4(self) -> &'a mut W { - self.variant(GAIN_A::GAIN1_4) - } - #[doc = "1/3"] - #[inline(always)] - pub fn gain1_3(self) -> &'a mut W { - self.variant(GAIN_A::GAIN1_3) - } - #[doc = "1/2"] - #[inline(always)] - pub fn gain1_2(self) -> &'a mut W { - self.variant(GAIN_A::GAIN1_2) - } - #[doc = "1"] - #[inline(always)] - pub fn gain1(self) -> &'a mut W { - self.variant(GAIN_A::GAIN1) - } - #[doc = "2"] - #[inline(always)] - pub fn gain2(self) -> &'a mut W { - self.variant(GAIN_A::GAIN2) - } - #[doc = "4"] - #[inline(always)] - pub fn gain4(self) -> &'a mut W { - self.variant(GAIN_A::GAIN4) - } -} -#[doc = "Field `REFSEL` reader - Reference control"] -pub type REFSEL_R = crate::BitReader; -#[doc = "Reference control\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum REFSEL_A { - #[doc = "0: Internal reference (0.6 V)"] - INTERNAL = 0, - #[doc = "1: VDD/4 as reference"] - VDD1_4 = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: REFSEL_A) -> Self { - variant as u8 != 0 - } -} -impl REFSEL_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> REFSEL_A { - match self.bits { - false => REFSEL_A::INTERNAL, - true => REFSEL_A::VDD1_4, - } - } - #[doc = "Checks if the value of the field is `INTERNAL`"] - #[inline(always)] - pub fn is_internal(&self) -> bool { - *self == REFSEL_A::INTERNAL - } - #[doc = "Checks if the value of the field is `VDD1_4`"] - #[inline(always)] - pub fn is_vdd1_4(&self) -> bool { - *self == REFSEL_A::VDD1_4 - } -} -#[doc = "Field `REFSEL` writer - Reference control"] -pub type REFSEL_W<'a, const O: u8> = crate::BitWriter<'a, u32, CONFIG_SPEC, REFSEL_A, O>; -impl<'a, const O: u8> REFSEL_W<'a, O> { - #[doc = "Internal reference (0.6 V)"] - #[inline(always)] - pub fn internal(self) -> &'a mut W { - self.variant(REFSEL_A::INTERNAL) - } - #[doc = "VDD/4 as reference"] - #[inline(always)] - pub fn vdd1_4(self) -> &'a mut W { - self.variant(REFSEL_A::VDD1_4) - } -} -#[doc = "Field `TACQ` reader - Acquisition time, the time the ADC uses to sample the input voltage"] -pub type TACQ_R = crate::FieldReader; -#[doc = "Acquisition time, the time the ADC uses to sample the input voltage\n\nValue on reset: 2"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -#[repr(u8)] -pub enum TACQ_A { - #[doc = "0: 3 us"] - _3US = 0, - #[doc = "1: 5 us"] - _5US = 1, - #[doc = "2: 10 us"] - _10US = 2, - #[doc = "3: 15 us"] - _15US = 3, - #[doc = "4: 20 us"] - _20US = 4, - #[doc = "5: 40 us"] - _40US = 5, -} -impl From for u8 { - #[inline(always)] - fn from(variant: TACQ_A) -> Self { - variant as _ - } -} -impl TACQ_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> Option { - match self.bits { - 0 => Some(TACQ_A::_3US), - 1 => Some(TACQ_A::_5US), - 2 => Some(TACQ_A::_10US), - 3 => Some(TACQ_A::_15US), - 4 => Some(TACQ_A::_20US), - 5 => Some(TACQ_A::_40US), - _ => None, - } - } - #[doc = "Checks if the value of the field is `_3US`"] - #[inline(always)] - pub fn is_3us(&self) -> bool { - *self == TACQ_A::_3US - } - #[doc = "Checks if the value of the field is `_5US`"] - #[inline(always)] - pub fn is_5us(&self) -> bool { - *self == TACQ_A::_5US - } - #[doc = "Checks if the value of the field is `_10US`"] - #[inline(always)] - pub fn is_10us(&self) -> bool { - *self == TACQ_A::_10US - } - #[doc = "Checks if the value of the field is `_15US`"] - #[inline(always)] - pub fn is_15us(&self) -> bool { - *self == TACQ_A::_15US - } - #[doc = "Checks if the value of the field is `_20US`"] - #[inline(always)] - pub fn is_20us(&self) -> bool { - *self == TACQ_A::_20US - } - #[doc = "Checks if the value of the field is `_40US`"] - #[inline(always)] - pub fn is_40us(&self) -> bool { - *self == TACQ_A::_40US - } -} -#[doc = "Field `TACQ` writer - Acquisition time, the time the ADC uses to sample the input voltage"] -pub type TACQ_W<'a, const O: u8> = crate::FieldWriter<'a, u32, CONFIG_SPEC, u8, TACQ_A, 3, O>; -impl<'a, const O: u8> TACQ_W<'a, O> { - #[doc = "3 us"] - #[inline(always)] - pub fn _3us(self) -> &'a mut W { - self.variant(TACQ_A::_3US) - } - #[doc = "5 us"] - #[inline(always)] - pub fn _5us(self) -> &'a mut W { - self.variant(TACQ_A::_5US) - } - #[doc = "10 us"] - #[inline(always)] - pub fn _10us(self) -> &'a mut W { - self.variant(TACQ_A::_10US) - } - #[doc = "15 us"] - #[inline(always)] - pub fn _15us(self) -> &'a mut W { - self.variant(TACQ_A::_15US) - } - #[doc = "20 us"] - #[inline(always)] - pub fn _20us(self) -> &'a mut W { - self.variant(TACQ_A::_20US) - } - #[doc = "40 us"] - #[inline(always)] - pub fn _40us(self) -> &'a mut W { - self.variant(TACQ_A::_40US) - } -} -#[doc = "Field `MODE` reader - Enable differential mode"] -pub type MODE_R = crate::BitReader; -#[doc = "Enable differential mode\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum MODE_A { - #[doc = "0: Single ended, PSELN will be ignored, negative input to ADC shorted to GND"] - SE = 0, - #[doc = "1: Differential"] - DIFF = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: MODE_A) -> Self { - variant as u8 != 0 - } -} -impl MODE_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> MODE_A { - match self.bits { - false => MODE_A::SE, - true => MODE_A::DIFF, - } - } - #[doc = "Checks if the value of the field is `SE`"] - #[inline(always)] - pub fn is_se(&self) -> bool { - *self == MODE_A::SE - } - #[doc = "Checks if the value of the field is `DIFF`"] - #[inline(always)] - pub fn is_diff(&self) -> bool { - *self == MODE_A::DIFF - } -} -#[doc = "Field `MODE` writer - Enable differential mode"] -pub type MODE_W<'a, const O: u8> = crate::BitWriter<'a, u32, CONFIG_SPEC, MODE_A, O>; -impl<'a, const O: u8> MODE_W<'a, O> { - #[doc = "Single ended, PSELN will be ignored, negative input to ADC shorted to GND"] - #[inline(always)] - pub fn se(self) -> &'a mut W { - self.variant(MODE_A::SE) - } - #[doc = "Differential"] - #[inline(always)] - pub fn diff(self) -> &'a mut W { - self.variant(MODE_A::DIFF) - } -} -#[doc = "Field `BURST` reader - Enable burst mode"] -pub type BURST_R = crate::BitReader; -#[doc = "Enable burst mode\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum BURST_A { - #[doc = "0: Burst mode is disabled (normal operation)"] - DISABLED = 0, - #[doc = "1: Burst mode is enabled. SAADC takes 2^OVERSAMPLE number of samples as fast as it can, and sends the average to Data RAM."] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: BURST_A) -> Self { - variant as u8 != 0 - } -} -impl BURST_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> BURST_A { - match self.bits { - false => BURST_A::DISABLED, - true => BURST_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == BURST_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == BURST_A::ENABLED - } -} -#[doc = "Field `BURST` writer - Enable burst mode"] -pub type BURST_W<'a, const O: u8> = crate::BitWriter<'a, u32, CONFIG_SPEC, BURST_A, O>; -impl<'a, const O: u8> BURST_W<'a, O> { - #[doc = "Burst mode is disabled (normal operation)"] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(BURST_A::DISABLED) - } - #[doc = "Burst mode is enabled. SAADC takes 2^OVERSAMPLE number of samples as fast as it can, and sends the average to Data RAM."] - #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(BURST_A::ENABLED) - } -} -impl R { - #[doc = "Bits 0:1 - Positive channel resistor control"] - #[inline(always)] - pub fn resp(&self) -> RESP_R { - RESP_R::new((self.bits & 3) as u8) - } - #[doc = "Bits 4:5 - Negative channel resistor control"] - #[inline(always)] - pub fn resn(&self) -> RESN_R { - RESN_R::new(((self.bits >> 4) & 3) as u8) - } - #[doc = "Bits 8:10 - Gain control"] - #[inline(always)] - pub fn gain(&self) -> GAIN_R { - GAIN_R::new(((self.bits >> 8) & 7) as u8) - } - #[doc = "Bit 12 - Reference control"] - #[inline(always)] - pub fn refsel(&self) -> REFSEL_R { - REFSEL_R::new(((self.bits >> 12) & 1) != 0) - } - #[doc = "Bits 16:18 - Acquisition time, the time the ADC uses to sample the input voltage"] - #[inline(always)] - pub fn tacq(&self) -> TACQ_R { - TACQ_R::new(((self.bits >> 16) & 7) as u8) - } - #[doc = "Bit 20 - Enable differential mode"] - #[inline(always)] - pub fn mode(&self) -> MODE_R { - MODE_R::new(((self.bits >> 20) & 1) != 0) - } - #[doc = "Bit 24 - Enable burst mode"] - #[inline(always)] - pub fn burst(&self) -> BURST_R { - BURST_R::new(((self.bits >> 24) & 1) != 0) - } -} -impl W { - #[doc = "Bits 0:1 - Positive channel resistor control"] - #[inline(always)] - #[must_use] - pub fn resp(&mut self) -> RESP_W<0> { - RESP_W::new(self) - } - #[doc = "Bits 4:5 - Negative channel resistor control"] - #[inline(always)] - #[must_use] - pub fn resn(&mut self) -> RESN_W<4> { - RESN_W::new(self) - } - #[doc = "Bits 8:10 - Gain control"] - #[inline(always)] - #[must_use] - pub fn gain(&mut self) -> GAIN_W<8> { - GAIN_W::new(self) - } - #[doc = "Bit 12 - Reference control"] - #[inline(always)] - #[must_use] - pub fn refsel(&mut self) -> REFSEL_W<12> { - REFSEL_W::new(self) - } - #[doc = "Bits 16:18 - Acquisition time, the time the ADC uses to sample the input voltage"] - #[inline(always)] - #[must_use] - pub fn tacq(&mut self) -> TACQ_W<16> { - TACQ_W::new(self) - } - #[doc = "Bit 20 - Enable differential mode"] - #[inline(always)] - #[must_use] - pub fn mode(&mut self) -> MODE_W<20> { - MODE_W::new(self) - } - #[doc = "Bit 24 - Enable burst mode"] - #[inline(always)] - #[must_use] - pub fn burst(&mut self) -> BURST_W<24> { - BURST_W::new(self) - } - #[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 = "Description cluster: Input configuration for CH\\[n\\]\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 [config](index.html) module"] -pub struct CONFIG_SPEC; -impl crate::RegisterSpec for CONFIG_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [config::R](R) reader structure"] -impl crate::Readable for CONFIG_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [config::W](W) writer structure"] -impl crate::Writable for 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 CONFIG to value 0x0002_0000"] -impl crate::Resettable for CONFIG_SPEC { - const RESET_VALUE: Self::Ux = 0x0002_0000; -} diff --git a/down-the-stack/dk_pac/src/saadc/ch/limit.rs b/down-the-stack/dk_pac/src/saadc/ch/limit.rs deleted file mode 100644 index 5ffedc3..0000000 --- a/down-the-stack/dk_pac/src/saadc/ch/limit.rs +++ /dev/null @@ -1,95 +0,0 @@ -#[doc = "Register `LIMIT` 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 `LIMIT` 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 `LOW` reader - Low level limit"] -pub type LOW_R = crate::FieldReader; -#[doc = "Field `LOW` writer - Low level limit"] -pub type LOW_W<'a, const O: u8> = crate::FieldWriter<'a, u32, LIMIT_SPEC, u16, u16, 16, O>; -#[doc = "Field `HIGH` reader - High level limit"] -pub type HIGH_R = crate::FieldReader; -#[doc = "Field `HIGH` writer - High level limit"] -pub type HIGH_W<'a, const O: u8> = crate::FieldWriter<'a, u32, LIMIT_SPEC, u16, u16, 16, O>; -impl R { - #[doc = "Bits 0:15 - Low level limit"] - #[inline(always)] - pub fn low(&self) -> LOW_R { - LOW_R::new((self.bits & 0xffff) as u16) - } - #[doc = "Bits 16:31 - High level limit"] - #[inline(always)] - pub fn high(&self) -> HIGH_R { - HIGH_R::new(((self.bits >> 16) & 0xffff) as u16) - } -} -impl W { - #[doc = "Bits 0:15 - Low level limit"] - #[inline(always)] - #[must_use] - pub fn low(&mut self) -> LOW_W<0> { - LOW_W::new(self) - } - #[doc = "Bits 16:31 - High level limit"] - #[inline(always)] - #[must_use] - pub fn high(&mut self) -> HIGH_W<16> { - 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 - } -} -#[doc = "Description cluster: High/low limits for event monitoring a channel\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 [limit](index.html) module"] -pub struct LIMIT_SPEC; -impl crate::RegisterSpec for LIMIT_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [limit::R](R) reader structure"] -impl crate::Readable for LIMIT_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [limit::W](W) writer structure"] -impl crate::Writable for LIMIT_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets LIMIT to value 0x7fff_8000"] -impl crate::Resettable for LIMIT_SPEC { - const RESET_VALUE: Self::Ux = 0x7fff_8000; -} diff --git a/down-the-stack/dk_pac/src/saadc/ch/pseln.rs b/down-the-stack/dk_pac/src/saadc/ch/pseln.rs deleted file mode 100644 index 2834daa..0000000 --- a/down-the-stack/dk_pac/src/saadc/ch/pseln.rs +++ /dev/null @@ -1,232 +0,0 @@ -#[doc = "Register `PSELN` 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 `PSELN` 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 `PSELN` reader - Analog negative input, enables differential channel"] -pub type PSELN_R = crate::FieldReader; -#[doc = "Analog negative input, enables differential channel\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -#[repr(u8)] -pub enum PSELN_A { - #[doc = "0: Not connected"] - NC = 0, - #[doc = "1: AIN0"] - ANALOG_INPUT0 = 1, - #[doc = "2: AIN1"] - ANALOG_INPUT1 = 2, - #[doc = "3: AIN2"] - ANALOG_INPUT2 = 3, - #[doc = "4: AIN3"] - ANALOG_INPUT3 = 4, - #[doc = "5: AIN4"] - ANALOG_INPUT4 = 5, - #[doc = "6: AIN5"] - ANALOG_INPUT5 = 6, - #[doc = "7: AIN6"] - ANALOG_INPUT6 = 7, - #[doc = "8: AIN7"] - ANALOG_INPUT7 = 8, - #[doc = "9: VDD"] - VDD = 9, -} -impl From for u8 { - #[inline(always)] - fn from(variant: PSELN_A) -> Self { - variant as _ - } -} -impl PSELN_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> Option { - match self.bits { - 0 => Some(PSELN_A::NC), - 1 => Some(PSELN_A::ANALOG_INPUT0), - 2 => Some(PSELN_A::ANALOG_INPUT1), - 3 => Some(PSELN_A::ANALOG_INPUT2), - 4 => Some(PSELN_A::ANALOG_INPUT3), - 5 => Some(PSELN_A::ANALOG_INPUT4), - 6 => Some(PSELN_A::ANALOG_INPUT5), - 7 => Some(PSELN_A::ANALOG_INPUT6), - 8 => Some(PSELN_A::ANALOG_INPUT7), - 9 => Some(PSELN_A::VDD), - _ => None, - } - } - #[doc = "Checks if the value of the field is `NC`"] - #[inline(always)] - pub fn is_nc(&self) -> bool { - *self == PSELN_A::NC - } - #[doc = "Checks if the value of the field is `ANALOG_INPUT0`"] - #[inline(always)] - pub fn is_analog_input0(&self) -> bool { - *self == PSELN_A::ANALOG_INPUT0 - } - #[doc = "Checks if the value of the field is `ANALOG_INPUT1`"] - #[inline(always)] - pub fn is_analog_input1(&self) -> bool { - *self == PSELN_A::ANALOG_INPUT1 - } - #[doc = "Checks if the value of the field is `ANALOG_INPUT2`"] - #[inline(always)] - pub fn is_analog_input2(&self) -> bool { - *self == PSELN_A::ANALOG_INPUT2 - } - #[doc = "Checks if the value of the field is `ANALOG_INPUT3`"] - #[inline(always)] - pub fn is_analog_input3(&self) -> bool { - *self == PSELN_A::ANALOG_INPUT3 - } - #[doc = "Checks if the value of the field is `ANALOG_INPUT4`"] - #[inline(always)] - pub fn is_analog_input4(&self) -> bool { - *self == PSELN_A::ANALOG_INPUT4 - } - #[doc = "Checks if the value of the field is `ANALOG_INPUT5`"] - #[inline(always)] - pub fn is_analog_input5(&self) -> bool { - *self == PSELN_A::ANALOG_INPUT5 - } - #[doc = "Checks if the value of the field is `ANALOG_INPUT6`"] - #[inline(always)] - pub fn is_analog_input6(&self) -> bool { - *self == PSELN_A::ANALOG_INPUT6 - } - #[doc = "Checks if the value of the field is `ANALOG_INPUT7`"] - #[inline(always)] - pub fn is_analog_input7(&self) -> bool { - *self == PSELN_A::ANALOG_INPUT7 - } - #[doc = "Checks if the value of the field is `VDD`"] - #[inline(always)] - pub fn is_vdd(&self) -> bool { - *self == PSELN_A::VDD - } -} -#[doc = "Field `PSELN` writer - Analog negative input, enables differential channel"] -pub type PSELN_W<'a, const O: u8> = crate::FieldWriter<'a, u32, PSELN_SPEC, u8, PSELN_A, 5, O>; -impl<'a, const O: u8> PSELN_W<'a, O> { - #[doc = "Not connected"] - #[inline(always)] - pub fn nc(self) -> &'a mut W { - self.variant(PSELN_A::NC) - } - #[doc = "AIN0"] - #[inline(always)] - pub fn analog_input0(self) -> &'a mut W { - self.variant(PSELN_A::ANALOG_INPUT0) - } - #[doc = "AIN1"] - #[inline(always)] - pub fn analog_input1(self) -> &'a mut W { - self.variant(PSELN_A::ANALOG_INPUT1) - } - #[doc = "AIN2"] - #[inline(always)] - pub fn analog_input2(self) -> &'a mut W { - self.variant(PSELN_A::ANALOG_INPUT2) - } - #[doc = "AIN3"] - #[inline(always)] - pub fn analog_input3(self) -> &'a mut W { - self.variant(PSELN_A::ANALOG_INPUT3) - } - #[doc = "AIN4"] - #[inline(always)] - pub fn analog_input4(self) -> &'a mut W { - self.variant(PSELN_A::ANALOG_INPUT4) - } - #[doc = "AIN5"] - #[inline(always)] - pub fn analog_input5(self) -> &'a mut W { - self.variant(PSELN_A::ANALOG_INPUT5) - } - #[doc = "AIN6"] - #[inline(always)] - pub fn analog_input6(self) -> &'a mut W { - self.variant(PSELN_A::ANALOG_INPUT6) - } - #[doc = "AIN7"] - #[inline(always)] - pub fn analog_input7(self) -> &'a mut W { - self.variant(PSELN_A::ANALOG_INPUT7) - } - #[doc = "VDD"] - #[inline(always)] - pub fn vdd(self) -> &'a mut W { - self.variant(PSELN_A::VDD) - } -} -impl R { - #[doc = "Bits 0:4 - Analog negative input, enables differential channel"] - #[inline(always)] - pub fn pseln(&self) -> PSELN_R { - PSELN_R::new((self.bits & 0x1f) as u8) - } -} -impl W { - #[doc = "Bits 0:4 - Analog negative input, enables differential channel"] - #[inline(always)] - #[must_use] - pub fn pseln(&mut self) -> PSELN_W<0> { - PSELN_W::new(self) - } - #[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 = "Description cluster: Input negative pin selection for CH\\[n\\]\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 [pseln](index.html) module"] -pub struct PSELN_SPEC; -impl crate::RegisterSpec for PSELN_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [pseln::R](R) reader structure"] -impl crate::Readable for PSELN_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [pseln::W](W) writer structure"] -impl crate::Writable for PSELN_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets PSELN to value 0"] -impl crate::Resettable for PSELN_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/saadc/ch/pselp.rs b/down-the-stack/dk_pac/src/saadc/ch/pselp.rs deleted file mode 100644 index e8a9413..0000000 --- a/down-the-stack/dk_pac/src/saadc/ch/pselp.rs +++ /dev/null @@ -1,232 +0,0 @@ -#[doc = "Register `PSELP` 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 `PSELP` 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 `PSELP` reader - Analog positive input channel"] -pub type PSELP_R = crate::FieldReader; -#[doc = "Analog positive input channel\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -#[repr(u8)] -pub enum PSELP_A { - #[doc = "0: Not connected"] - NC = 0, - #[doc = "1: AIN0"] - ANALOG_INPUT0 = 1, - #[doc = "2: AIN1"] - ANALOG_INPUT1 = 2, - #[doc = "3: AIN2"] - ANALOG_INPUT2 = 3, - #[doc = "4: AIN3"] - ANALOG_INPUT3 = 4, - #[doc = "5: AIN4"] - ANALOG_INPUT4 = 5, - #[doc = "6: AIN5"] - ANALOG_INPUT5 = 6, - #[doc = "7: AIN6"] - ANALOG_INPUT6 = 7, - #[doc = "8: AIN7"] - ANALOG_INPUT7 = 8, - #[doc = "9: VDD"] - VDD = 9, -} -impl From for u8 { - #[inline(always)] - fn from(variant: PSELP_A) -> Self { - variant as _ - } -} -impl PSELP_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> Option { - match self.bits { - 0 => Some(PSELP_A::NC), - 1 => Some(PSELP_A::ANALOG_INPUT0), - 2 => Some(PSELP_A::ANALOG_INPUT1), - 3 => Some(PSELP_A::ANALOG_INPUT2), - 4 => Some(PSELP_A::ANALOG_INPUT3), - 5 => Some(PSELP_A::ANALOG_INPUT4), - 6 => Some(PSELP_A::ANALOG_INPUT5), - 7 => Some(PSELP_A::ANALOG_INPUT6), - 8 => Some(PSELP_A::ANALOG_INPUT7), - 9 => Some(PSELP_A::VDD), - _ => None, - } - } - #[doc = "Checks if the value of the field is `NC`"] - #[inline(always)] - pub fn is_nc(&self) -> bool { - *self == PSELP_A::NC - } - #[doc = "Checks if the value of the field is `ANALOG_INPUT0`"] - #[inline(always)] - pub fn is_analog_input0(&self) -> bool { - *self == PSELP_A::ANALOG_INPUT0 - } - #[doc = "Checks if the value of the field is `ANALOG_INPUT1`"] - #[inline(always)] - pub fn is_analog_input1(&self) -> bool { - *self == PSELP_A::ANALOG_INPUT1 - } - #[doc = "Checks if the value of the field is `ANALOG_INPUT2`"] - #[inline(always)] - pub fn is_analog_input2(&self) -> bool { - *self == PSELP_A::ANALOG_INPUT2 - } - #[doc = "Checks if the value of the field is `ANALOG_INPUT3`"] - #[inline(always)] - pub fn is_analog_input3(&self) -> bool { - *self == PSELP_A::ANALOG_INPUT3 - } - #[doc = "Checks if the value of the field is `ANALOG_INPUT4`"] - #[inline(always)] - pub fn is_analog_input4(&self) -> bool { - *self == PSELP_A::ANALOG_INPUT4 - } - #[doc = "Checks if the value of the field is `ANALOG_INPUT5`"] - #[inline(always)] - pub fn is_analog_input5(&self) -> bool { - *self == PSELP_A::ANALOG_INPUT5 - } - #[doc = "Checks if the value of the field is `ANALOG_INPUT6`"] - #[inline(always)] - pub fn is_analog_input6(&self) -> bool { - *self == PSELP_A::ANALOG_INPUT6 - } - #[doc = "Checks if the value of the field is `ANALOG_INPUT7`"] - #[inline(always)] - pub fn is_analog_input7(&self) -> bool { - *self == PSELP_A::ANALOG_INPUT7 - } - #[doc = "Checks if the value of the field is `VDD`"] - #[inline(always)] - pub fn is_vdd(&self) -> bool { - *self == PSELP_A::VDD - } -} -#[doc = "Field `PSELP` writer - Analog positive input channel"] -pub type PSELP_W<'a, const O: u8> = crate::FieldWriter<'a, u32, PSELP_SPEC, u8, PSELP_A, 5, O>; -impl<'a, const O: u8> PSELP_W<'a, O> { - #[doc = "Not connected"] - #[inline(always)] - pub fn nc(self) -> &'a mut W { - self.variant(PSELP_A::NC) - } - #[doc = "AIN0"] - #[inline(always)] - pub fn analog_input0(self) -> &'a mut W { - self.variant(PSELP_A::ANALOG_INPUT0) - } - #[doc = "AIN1"] - #[inline(always)] - pub fn analog_input1(self) -> &'a mut W { - self.variant(PSELP_A::ANALOG_INPUT1) - } - #[doc = "AIN2"] - #[inline(always)] - pub fn analog_input2(self) -> &'a mut W { - self.variant(PSELP_A::ANALOG_INPUT2) - } - #[doc = "AIN3"] - #[inline(always)] - pub fn analog_input3(self) -> &'a mut W { - self.variant(PSELP_A::ANALOG_INPUT3) - } - #[doc = "AIN4"] - #[inline(always)] - pub fn analog_input4(self) -> &'a mut W { - self.variant(PSELP_A::ANALOG_INPUT4) - } - #[doc = "AIN5"] - #[inline(always)] - pub fn analog_input5(self) -> &'a mut W { - self.variant(PSELP_A::ANALOG_INPUT5) - } - #[doc = "AIN6"] - #[inline(always)] - pub fn analog_input6(self) -> &'a mut W { - self.variant(PSELP_A::ANALOG_INPUT6) - } - #[doc = "AIN7"] - #[inline(always)] - pub fn analog_input7(self) -> &'a mut W { - self.variant(PSELP_A::ANALOG_INPUT7) - } - #[doc = "VDD"] - #[inline(always)] - pub fn vdd(self) -> &'a mut W { - self.variant(PSELP_A::VDD) - } -} -impl R { - #[doc = "Bits 0:4 - Analog positive input channel"] - #[inline(always)] - pub fn pselp(&self) -> PSELP_R { - PSELP_R::new((self.bits & 0x1f) as u8) - } -} -impl W { - #[doc = "Bits 0:4 - Analog positive input channel"] - #[inline(always)] - #[must_use] - pub fn pselp(&mut self) -> PSELP_W<0> { - PSELP_W::new(self) - } - #[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 = "Description cluster: Input positive pin selection for CH\\[n\\]\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 [pselp](index.html) module"] -pub struct PSELP_SPEC; -impl crate::RegisterSpec for PSELP_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [pselp::R](R) reader structure"] -impl crate::Readable for PSELP_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [pselp::W](W) writer structure"] -impl crate::Writable for PSELP_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets PSELP to value 0"] -impl crate::Resettable for PSELP_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/saadc/enable.rs b/down-the-stack/dk_pac/src/saadc/enable.rs deleted file mode 100644 index 566f8b9..0000000 --- a/down-the-stack/dk_pac/src/saadc/enable.rs +++ /dev/null @@ -1,126 +0,0 @@ -#[doc = "Register `ENABLE` 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 `ENABLE` 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 `ENABLE` reader - Enable or disable ADC"] -pub type ENABLE_R = crate::BitReader; -#[doc = "Enable or disable ADC\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum ENABLE_A { - #[doc = "0: Disable ADC"] - DISABLED = 0, - #[doc = "1: Enable ADC"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: ENABLE_A) -> Self { - variant as u8 != 0 - } -} -impl ENABLE_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> ENABLE_A { - match self.bits { - false => ENABLE_A::DISABLED, - true => ENABLE_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == ENABLE_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == ENABLE_A::ENABLED - } -} -#[doc = "Field `ENABLE` writer - Enable or disable ADC"] -pub type ENABLE_W<'a, const O: u8> = crate::BitWriter<'a, u32, ENABLE_SPEC, ENABLE_A, O>; -impl<'a, const O: u8> ENABLE_W<'a, O> { - #[doc = "Disable ADC"] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(ENABLE_A::DISABLED) - } - #[doc = "Enable ADC"] - #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(ENABLE_A::ENABLED) - } -} -impl R { - #[doc = "Bit 0 - Enable or disable ADC"] - #[inline(always)] - pub fn enable(&self) -> ENABLE_R { - ENABLE_R::new((self.bits & 1) != 0) - } -} -impl W { - #[doc = "Bit 0 - Enable or disable ADC"] - #[inline(always)] - #[must_use] - pub fn enable(&mut self) -> ENABLE_W<0> { - 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 - } -} -#[doc = "Enable or disable ADC\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 [enable](index.html) module"] -pub struct ENABLE_SPEC; -impl crate::RegisterSpec for ENABLE_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [enable::R](R) reader structure"] -impl crate::Readable for ENABLE_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [enable::W](W) writer structure"] -impl crate::Writable for ENABLE_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets ENABLE to value 0"] -impl crate::Resettable for ENABLE_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/saadc/events_calibratedone.rs b/down-the-stack/dk_pac/src/saadc/events_calibratedone.rs deleted file mode 100644 index 9af7317..0000000 --- a/down-the-stack/dk_pac/src/saadc/events_calibratedone.rs +++ /dev/null @@ -1,127 +0,0 @@ -#[doc = "Register `EVENTS_CALIBRATEDONE` 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 `EVENTS_CALIBRATEDONE` 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 `EVENTS_CALIBRATEDONE` reader - Calibration is complete"] -pub type EVENTS_CALIBRATEDONE_R = crate::BitReader; -#[doc = "Calibration is complete\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum EVENTS_CALIBRATEDONE_A { - #[doc = "0: Event not generated"] - NOT_GENERATED = 0, - #[doc = "1: Event generated"] - GENERATED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: EVENTS_CALIBRATEDONE_A) -> Self { - variant as u8 != 0 - } -} -impl EVENTS_CALIBRATEDONE_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> EVENTS_CALIBRATEDONE_A { - match self.bits { - false => EVENTS_CALIBRATEDONE_A::NOT_GENERATED, - true => EVENTS_CALIBRATEDONE_A::GENERATED, - } - } - #[doc = "Checks if the value of the field is `NOT_GENERATED`"] - #[inline(always)] - pub fn is_not_generated(&self) -> bool { - *self == EVENTS_CALIBRATEDONE_A::NOT_GENERATED - } - #[doc = "Checks if the value of the field is `GENERATED`"] - #[inline(always)] - pub fn is_generated(&self) -> bool { - *self == EVENTS_CALIBRATEDONE_A::GENERATED - } -} -#[doc = "Field `EVENTS_CALIBRATEDONE` writer - Calibration is complete"] -pub type EVENTS_CALIBRATEDONE_W<'a, const O: u8> = - crate::BitWriter<'a, u32, EVENTS_CALIBRATEDONE_SPEC, EVENTS_CALIBRATEDONE_A, O>; -impl<'a, const O: u8> EVENTS_CALIBRATEDONE_W<'a, O> { - #[doc = "Event not generated"] - #[inline(always)] - pub fn not_generated(self) -> &'a mut W { - self.variant(EVENTS_CALIBRATEDONE_A::NOT_GENERATED) - } - #[doc = "Event generated"] - #[inline(always)] - pub fn generated(self) -> &'a mut W { - self.variant(EVENTS_CALIBRATEDONE_A::GENERATED) - } -} -impl R { - #[doc = "Bit 0 - Calibration is complete"] - #[inline(always)] - pub fn events_calibratedone(&self) -> EVENTS_CALIBRATEDONE_R { - EVENTS_CALIBRATEDONE_R::new((self.bits & 1) != 0) - } -} -impl W { - #[doc = "Bit 0 - Calibration is complete"] - #[inline(always)] - #[must_use] - pub fn events_calibratedone(&mut self) -> EVENTS_CALIBRATEDONE_W<0> { - EVENTS_CALIBRATEDONE_W::new(self) - } - #[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 = "Calibration is complete\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 [events_calibratedone](index.html) module"] -pub struct EVENTS_CALIBRATEDONE_SPEC; -impl crate::RegisterSpec for EVENTS_CALIBRATEDONE_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [events_calibratedone::R](R) reader structure"] -impl crate::Readable for EVENTS_CALIBRATEDONE_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [events_calibratedone::W](W) writer structure"] -impl crate::Writable for EVENTS_CALIBRATEDONE_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets EVENTS_CALIBRATEDONE to value 0"] -impl crate::Resettable for EVENTS_CALIBRATEDONE_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/saadc/events_ch.rs b/down-the-stack/dk_pac/src/saadc/events_ch.rs deleted file mode 100644 index e1e19cf..0000000 --- a/down-the-stack/dk_pac/src/saadc/events_ch.rs +++ /dev/null @@ -1,16 +0,0 @@ -#[doc = r"Register block"] -#[repr(C)] -pub struct EVENTS_CH { - #[doc = "0x00 - Description cluster: Last results is equal or above CH\\[n\\].LIMIT.HIGH"] - pub limith: LIMITH, - #[doc = "0x04 - Description cluster: Last results is equal or below CH\\[n\\].LIMIT.LOW"] - pub limitl: LIMITL, -} -#[doc = "LIMITH (rw) register accessor: an alias for `Reg`"] -pub type LIMITH = crate::Reg; -#[doc = "Description cluster: Last results is equal or above CH\\[n\\].LIMIT.HIGH"] -pub mod limith; -#[doc = "LIMITL (rw) register accessor: an alias for `Reg`"] -pub type LIMITL = crate::Reg; -#[doc = "Description cluster: Last results is equal or below CH\\[n\\].LIMIT.LOW"] -pub mod limitl; diff --git a/down-the-stack/dk_pac/src/saadc/events_ch/limith.rs b/down-the-stack/dk_pac/src/saadc/events_ch/limith.rs deleted file mode 100644 index 5358d40..0000000 --- a/down-the-stack/dk_pac/src/saadc/events_ch/limith.rs +++ /dev/null @@ -1,126 +0,0 @@ -#[doc = "Register `LIMITH` 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 `LIMITH` 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 `LIMITH` reader - Last results is equal or above CH\\[n\\].LIMIT.HIGH"] -pub type LIMITH_R = crate::BitReader; -#[doc = "Last results is equal or above CH\\[n\\].LIMIT.HIGH\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum LIMITH_A { - #[doc = "0: Event not generated"] - NOT_GENERATED = 0, - #[doc = "1: Event generated"] - GENERATED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: LIMITH_A) -> Self { - variant as u8 != 0 - } -} -impl LIMITH_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> LIMITH_A { - match self.bits { - false => LIMITH_A::NOT_GENERATED, - true => LIMITH_A::GENERATED, - } - } - #[doc = "Checks if the value of the field is `NOT_GENERATED`"] - #[inline(always)] - pub fn is_not_generated(&self) -> bool { - *self == LIMITH_A::NOT_GENERATED - } - #[doc = "Checks if the value of the field is `GENERATED`"] - #[inline(always)] - pub fn is_generated(&self) -> bool { - *self == LIMITH_A::GENERATED - } -} -#[doc = "Field `LIMITH` writer - Last results is equal or above CH\\[n\\].LIMIT.HIGH"] -pub type LIMITH_W<'a, const O: u8> = crate::BitWriter<'a, u32, LIMITH_SPEC, LIMITH_A, O>; -impl<'a, const O: u8> LIMITH_W<'a, O> { - #[doc = "Event not generated"] - #[inline(always)] - pub fn not_generated(self) -> &'a mut W { - self.variant(LIMITH_A::NOT_GENERATED) - } - #[doc = "Event generated"] - #[inline(always)] - pub fn generated(self) -> &'a mut W { - self.variant(LIMITH_A::GENERATED) - } -} -impl R { - #[doc = "Bit 0 - Last results is equal or above CH\\[n\\].LIMIT.HIGH"] - #[inline(always)] - pub fn limith(&self) -> LIMITH_R { - LIMITH_R::new((self.bits & 1) != 0) - } -} -impl W { - #[doc = "Bit 0 - Last results is equal or above CH\\[n\\].LIMIT.HIGH"] - #[inline(always)] - #[must_use] - pub fn limith(&mut self) -> LIMITH_W<0> { - LIMITH_W::new(self) - } - #[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 = "Description cluster: Last results is equal or above CH\\[n\\].LIMIT.HIGH\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 [limith](index.html) module"] -pub struct LIMITH_SPEC; -impl crate::RegisterSpec for LIMITH_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [limith::R](R) reader structure"] -impl crate::Readable for LIMITH_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [limith::W](W) writer structure"] -impl crate::Writable for LIMITH_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets LIMITH to value 0"] -impl crate::Resettable for LIMITH_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/saadc/events_ch/limitl.rs b/down-the-stack/dk_pac/src/saadc/events_ch/limitl.rs deleted file mode 100644 index d5ce555..0000000 --- a/down-the-stack/dk_pac/src/saadc/events_ch/limitl.rs +++ /dev/null @@ -1,126 +0,0 @@ -#[doc = "Register `LIMITL` 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 `LIMITL` 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 `LIMITL` reader - Last results is equal or below CH\\[n\\].LIMIT.LOW"] -pub type LIMITL_R = crate::BitReader; -#[doc = "Last results is equal or below CH\\[n\\].LIMIT.LOW\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum LIMITL_A { - #[doc = "0: Event not generated"] - NOT_GENERATED = 0, - #[doc = "1: Event generated"] - GENERATED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: LIMITL_A) -> Self { - variant as u8 != 0 - } -} -impl LIMITL_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> LIMITL_A { - match self.bits { - false => LIMITL_A::NOT_GENERATED, - true => LIMITL_A::GENERATED, - } - } - #[doc = "Checks if the value of the field is `NOT_GENERATED`"] - #[inline(always)] - pub fn is_not_generated(&self) -> bool { - *self == LIMITL_A::NOT_GENERATED - } - #[doc = "Checks if the value of the field is `GENERATED`"] - #[inline(always)] - pub fn is_generated(&self) -> bool { - *self == LIMITL_A::GENERATED - } -} -#[doc = "Field `LIMITL` writer - Last results is equal or below CH\\[n\\].LIMIT.LOW"] -pub type LIMITL_W<'a, const O: u8> = crate::BitWriter<'a, u32, LIMITL_SPEC, LIMITL_A, O>; -impl<'a, const O: u8> LIMITL_W<'a, O> { - #[doc = "Event not generated"] - #[inline(always)] - pub fn not_generated(self) -> &'a mut W { - self.variant(LIMITL_A::NOT_GENERATED) - } - #[doc = "Event generated"] - #[inline(always)] - pub fn generated(self) -> &'a mut W { - self.variant(LIMITL_A::GENERATED) - } -} -impl R { - #[doc = "Bit 0 - Last results is equal or below CH\\[n\\].LIMIT.LOW"] - #[inline(always)] - pub fn limitl(&self) -> LIMITL_R { - LIMITL_R::new((self.bits & 1) != 0) - } -} -impl W { - #[doc = "Bit 0 - Last results is equal or below CH\\[n\\].LIMIT.LOW"] - #[inline(always)] - #[must_use] - pub fn limitl(&mut self) -> LIMITL_W<0> { - LIMITL_W::new(self) - } - #[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 = "Description cluster: Last results is equal or below CH\\[n\\].LIMIT.LOW\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 [limitl](index.html) module"] -pub struct LIMITL_SPEC; -impl crate::RegisterSpec for LIMITL_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [limitl::R](R) reader structure"] -impl crate::Readable for LIMITL_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [limitl::W](W) writer structure"] -impl crate::Writable for LIMITL_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets LIMITL to value 0"] -impl crate::Resettable for LIMITL_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/saadc/events_done.rs b/down-the-stack/dk_pac/src/saadc/events_done.rs deleted file mode 100644 index 69b2599..0000000 --- a/down-the-stack/dk_pac/src/saadc/events_done.rs +++ /dev/null @@ -1,127 +0,0 @@ -#[doc = "Register `EVENTS_DONE` 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 `EVENTS_DONE` 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 `EVENTS_DONE` reader - A conversion task has been completed. Depending on the mode, multiple conversions might be needed for a result to be transferred to RAM."] -pub type EVENTS_DONE_R = crate::BitReader; -#[doc = "A conversion task has been completed. Depending on the mode, multiple conversions might be needed for a result to be transferred to RAM.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum EVENTS_DONE_A { - #[doc = "0: Event not generated"] - NOT_GENERATED = 0, - #[doc = "1: Event generated"] - GENERATED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: EVENTS_DONE_A) -> Self { - variant as u8 != 0 - } -} -impl EVENTS_DONE_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> EVENTS_DONE_A { - match self.bits { - false => EVENTS_DONE_A::NOT_GENERATED, - true => EVENTS_DONE_A::GENERATED, - } - } - #[doc = "Checks if the value of the field is `NOT_GENERATED`"] - #[inline(always)] - pub fn is_not_generated(&self) -> bool { - *self == EVENTS_DONE_A::NOT_GENERATED - } - #[doc = "Checks if the value of the field is `GENERATED`"] - #[inline(always)] - pub fn is_generated(&self) -> bool { - *self == EVENTS_DONE_A::GENERATED - } -} -#[doc = "Field `EVENTS_DONE` writer - A conversion task has been completed. Depending on the mode, multiple conversions might be needed for a result to be transferred to RAM."] -pub type EVENTS_DONE_W<'a, const O: u8> = - crate::BitWriter<'a, u32, EVENTS_DONE_SPEC, EVENTS_DONE_A, O>; -impl<'a, const O: u8> EVENTS_DONE_W<'a, O> { - #[doc = "Event not generated"] - #[inline(always)] - pub fn not_generated(self) -> &'a mut W { - self.variant(EVENTS_DONE_A::NOT_GENERATED) - } - #[doc = "Event generated"] - #[inline(always)] - pub fn generated(self) -> &'a mut W { - self.variant(EVENTS_DONE_A::GENERATED) - } -} -impl R { - #[doc = "Bit 0 - A conversion task has been completed. Depending on the mode, multiple conversions might be needed for a result to be transferred to RAM."] - #[inline(always)] - pub fn events_done(&self) -> EVENTS_DONE_R { - EVENTS_DONE_R::new((self.bits & 1) != 0) - } -} -impl W { - #[doc = "Bit 0 - A conversion task has been completed. Depending on the mode, multiple conversions might be needed for a result to be transferred to RAM."] - #[inline(always)] - #[must_use] - pub fn events_done(&mut self) -> EVENTS_DONE_W<0> { - EVENTS_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 - } -} -#[doc = "A conversion task has been completed. Depending on the mode, multiple conversions might be needed for a result to be transferred to RAM.\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 [events_done](index.html) module"] -pub struct EVENTS_DONE_SPEC; -impl crate::RegisterSpec for EVENTS_DONE_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [events_done::R](R) reader structure"] -impl crate::Readable for EVENTS_DONE_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [events_done::W](W) writer structure"] -impl crate::Writable for EVENTS_DONE_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets EVENTS_DONE to value 0"] -impl crate::Resettable for EVENTS_DONE_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/saadc/events_end.rs b/down-the-stack/dk_pac/src/saadc/events_end.rs deleted file mode 100644 index a62595a..0000000 --- a/down-the-stack/dk_pac/src/saadc/events_end.rs +++ /dev/null @@ -1,127 +0,0 @@ -#[doc = "Register `EVENTS_END` 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 `EVENTS_END` 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 `EVENTS_END` reader - The ADC has filled up the Result buffer"] -pub type EVENTS_END_R = crate::BitReader; -#[doc = "The ADC has filled up the Result buffer\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum EVENTS_END_A { - #[doc = "0: Event not generated"] - NOT_GENERATED = 0, - #[doc = "1: Event generated"] - GENERATED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: EVENTS_END_A) -> Self { - variant as u8 != 0 - } -} -impl EVENTS_END_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> EVENTS_END_A { - match self.bits { - false => EVENTS_END_A::NOT_GENERATED, - true => EVENTS_END_A::GENERATED, - } - } - #[doc = "Checks if the value of the field is `NOT_GENERATED`"] - #[inline(always)] - pub fn is_not_generated(&self) -> bool { - *self == EVENTS_END_A::NOT_GENERATED - } - #[doc = "Checks if the value of the field is `GENERATED`"] - #[inline(always)] - pub fn is_generated(&self) -> bool { - *self == EVENTS_END_A::GENERATED - } -} -#[doc = "Field `EVENTS_END` writer - The ADC has filled up the Result buffer"] -pub type EVENTS_END_W<'a, const O: u8> = - crate::BitWriter<'a, u32, EVENTS_END_SPEC, EVENTS_END_A, O>; -impl<'a, const O: u8> EVENTS_END_W<'a, O> { - #[doc = "Event not generated"] - #[inline(always)] - pub fn not_generated(self) -> &'a mut W { - self.variant(EVENTS_END_A::NOT_GENERATED) - } - #[doc = "Event generated"] - #[inline(always)] - pub fn generated(self) -> &'a mut W { - self.variant(EVENTS_END_A::GENERATED) - } -} -impl R { - #[doc = "Bit 0 - The ADC has filled up the Result buffer"] - #[inline(always)] - pub fn events_end(&self) -> EVENTS_END_R { - EVENTS_END_R::new((self.bits & 1) != 0) - } -} -impl W { - #[doc = "Bit 0 - The ADC has filled up the Result buffer"] - #[inline(always)] - #[must_use] - pub fn events_end(&mut self) -> EVENTS_END_W<0> { - EVENTS_END_W::new(self) - } - #[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 = "The ADC has filled up the Result buffer\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 [events_end](index.html) module"] -pub struct EVENTS_END_SPEC; -impl crate::RegisterSpec for EVENTS_END_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [events_end::R](R) reader structure"] -impl crate::Readable for EVENTS_END_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [events_end::W](W) writer structure"] -impl crate::Writable for EVENTS_END_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets EVENTS_END to value 0"] -impl crate::Resettable for EVENTS_END_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/saadc/events_resultdone.rs b/down-the-stack/dk_pac/src/saadc/events_resultdone.rs deleted file mode 100644 index 745445e..0000000 --- a/down-the-stack/dk_pac/src/saadc/events_resultdone.rs +++ /dev/null @@ -1,127 +0,0 @@ -#[doc = "Register `EVENTS_RESULTDONE` 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 `EVENTS_RESULTDONE` 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 `EVENTS_RESULTDONE` reader - A result is ready to get transferred to RAM."] -pub type EVENTS_RESULTDONE_R = crate::BitReader; -#[doc = "A result is ready to get transferred to RAM.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum EVENTS_RESULTDONE_A { - #[doc = "0: Event not generated"] - NOT_GENERATED = 0, - #[doc = "1: Event generated"] - GENERATED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: EVENTS_RESULTDONE_A) -> Self { - variant as u8 != 0 - } -} -impl EVENTS_RESULTDONE_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> EVENTS_RESULTDONE_A { - match self.bits { - false => EVENTS_RESULTDONE_A::NOT_GENERATED, - true => EVENTS_RESULTDONE_A::GENERATED, - } - } - #[doc = "Checks if the value of the field is `NOT_GENERATED`"] - #[inline(always)] - pub fn is_not_generated(&self) -> bool { - *self == EVENTS_RESULTDONE_A::NOT_GENERATED - } - #[doc = "Checks if the value of the field is `GENERATED`"] - #[inline(always)] - pub fn is_generated(&self) -> bool { - *self == EVENTS_RESULTDONE_A::GENERATED - } -} -#[doc = "Field `EVENTS_RESULTDONE` writer - A result is ready to get transferred to RAM."] -pub type EVENTS_RESULTDONE_W<'a, const O: u8> = - crate::BitWriter<'a, u32, EVENTS_RESULTDONE_SPEC, EVENTS_RESULTDONE_A, O>; -impl<'a, const O: u8> EVENTS_RESULTDONE_W<'a, O> { - #[doc = "Event not generated"] - #[inline(always)] - pub fn not_generated(self) -> &'a mut W { - self.variant(EVENTS_RESULTDONE_A::NOT_GENERATED) - } - #[doc = "Event generated"] - #[inline(always)] - pub fn generated(self) -> &'a mut W { - self.variant(EVENTS_RESULTDONE_A::GENERATED) - } -} -impl R { - #[doc = "Bit 0 - A result is ready to get transferred to RAM."] - #[inline(always)] - pub fn events_resultdone(&self) -> EVENTS_RESULTDONE_R { - EVENTS_RESULTDONE_R::new((self.bits & 1) != 0) - } -} -impl W { - #[doc = "Bit 0 - A result is ready to get transferred to RAM."] - #[inline(always)] - #[must_use] - pub fn events_resultdone(&mut self) -> EVENTS_RESULTDONE_W<0> { - EVENTS_RESULTDONE_W::new(self) - } - #[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 = "A result is ready to get transferred to RAM.\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 [events_resultdone](index.html) module"] -pub struct EVENTS_RESULTDONE_SPEC; -impl crate::RegisterSpec for EVENTS_RESULTDONE_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [events_resultdone::R](R) reader structure"] -impl crate::Readable for EVENTS_RESULTDONE_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [events_resultdone::W](W) writer structure"] -impl crate::Writable for EVENTS_RESULTDONE_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets EVENTS_RESULTDONE to value 0"] -impl crate::Resettable for EVENTS_RESULTDONE_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/saadc/events_started.rs b/down-the-stack/dk_pac/src/saadc/events_started.rs deleted file mode 100644 index 94b9862..0000000 --- a/down-the-stack/dk_pac/src/saadc/events_started.rs +++ /dev/null @@ -1,127 +0,0 @@ -#[doc = "Register `EVENTS_STARTED` 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 `EVENTS_STARTED` 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 `EVENTS_STARTED` reader - The ADC has started"] -pub type EVENTS_STARTED_R = crate::BitReader; -#[doc = "The ADC has started\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum EVENTS_STARTED_A { - #[doc = "0: Event not generated"] - NOT_GENERATED = 0, - #[doc = "1: Event generated"] - GENERATED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: EVENTS_STARTED_A) -> Self { - variant as u8 != 0 - } -} -impl EVENTS_STARTED_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> EVENTS_STARTED_A { - match self.bits { - false => EVENTS_STARTED_A::NOT_GENERATED, - true => EVENTS_STARTED_A::GENERATED, - } - } - #[doc = "Checks if the value of the field is `NOT_GENERATED`"] - #[inline(always)] - pub fn is_not_generated(&self) -> bool { - *self == EVENTS_STARTED_A::NOT_GENERATED - } - #[doc = "Checks if the value of the field is `GENERATED`"] - #[inline(always)] - pub fn is_generated(&self) -> bool { - *self == EVENTS_STARTED_A::GENERATED - } -} -#[doc = "Field `EVENTS_STARTED` writer - The ADC has started"] -pub type EVENTS_STARTED_W<'a, const O: u8> = - crate::BitWriter<'a, u32, EVENTS_STARTED_SPEC, EVENTS_STARTED_A, O>; -impl<'a, const O: u8> EVENTS_STARTED_W<'a, O> { - #[doc = "Event not generated"] - #[inline(always)] - pub fn not_generated(self) -> &'a mut W { - self.variant(EVENTS_STARTED_A::NOT_GENERATED) - } - #[doc = "Event generated"] - #[inline(always)] - pub fn generated(self) -> &'a mut W { - self.variant(EVENTS_STARTED_A::GENERATED) - } -} -impl R { - #[doc = "Bit 0 - The ADC has started"] - #[inline(always)] - pub fn events_started(&self) -> EVENTS_STARTED_R { - EVENTS_STARTED_R::new((self.bits & 1) != 0) - } -} -impl W { - #[doc = "Bit 0 - The ADC has started"] - #[inline(always)] - #[must_use] - pub fn events_started(&mut self) -> EVENTS_STARTED_W<0> { - EVENTS_STARTED_W::new(self) - } - #[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 = "The ADC has started\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 [events_started](index.html) module"] -pub struct EVENTS_STARTED_SPEC; -impl crate::RegisterSpec for EVENTS_STARTED_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [events_started::R](R) reader structure"] -impl crate::Readable for EVENTS_STARTED_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [events_started::W](W) writer structure"] -impl crate::Writable for EVENTS_STARTED_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets EVENTS_STARTED to value 0"] -impl crate::Resettable for EVENTS_STARTED_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/saadc/events_stopped.rs b/down-the-stack/dk_pac/src/saadc/events_stopped.rs deleted file mode 100644 index 30dfcc6..0000000 --- a/down-the-stack/dk_pac/src/saadc/events_stopped.rs +++ /dev/null @@ -1,127 +0,0 @@ -#[doc = "Register `EVENTS_STOPPED` 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 `EVENTS_STOPPED` 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 `EVENTS_STOPPED` reader - The ADC has stopped"] -pub type EVENTS_STOPPED_R = crate::BitReader; -#[doc = "The ADC has stopped\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum EVENTS_STOPPED_A { - #[doc = "0: Event not generated"] - NOT_GENERATED = 0, - #[doc = "1: Event generated"] - GENERATED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: EVENTS_STOPPED_A) -> Self { - variant as u8 != 0 - } -} -impl EVENTS_STOPPED_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> EVENTS_STOPPED_A { - match self.bits { - false => EVENTS_STOPPED_A::NOT_GENERATED, - true => EVENTS_STOPPED_A::GENERATED, - } - } - #[doc = "Checks if the value of the field is `NOT_GENERATED`"] - #[inline(always)] - pub fn is_not_generated(&self) -> bool { - *self == EVENTS_STOPPED_A::NOT_GENERATED - } - #[doc = "Checks if the value of the field is `GENERATED`"] - #[inline(always)] - pub fn is_generated(&self) -> bool { - *self == EVENTS_STOPPED_A::GENERATED - } -} -#[doc = "Field `EVENTS_STOPPED` writer - The ADC has stopped"] -pub type EVENTS_STOPPED_W<'a, const O: u8> = - crate::BitWriter<'a, u32, EVENTS_STOPPED_SPEC, EVENTS_STOPPED_A, O>; -impl<'a, const O: u8> EVENTS_STOPPED_W<'a, O> { - #[doc = "Event not generated"] - #[inline(always)] - pub fn not_generated(self) -> &'a mut W { - self.variant(EVENTS_STOPPED_A::NOT_GENERATED) - } - #[doc = "Event generated"] - #[inline(always)] - pub fn generated(self) -> &'a mut W { - self.variant(EVENTS_STOPPED_A::GENERATED) - } -} -impl R { - #[doc = "Bit 0 - The ADC has stopped"] - #[inline(always)] - pub fn events_stopped(&self) -> EVENTS_STOPPED_R { - EVENTS_STOPPED_R::new((self.bits & 1) != 0) - } -} -impl W { - #[doc = "Bit 0 - The ADC has stopped"] - #[inline(always)] - #[must_use] - pub fn events_stopped(&mut self) -> EVENTS_STOPPED_W<0> { - EVENTS_STOPPED_W::new(self) - } - #[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 = "The ADC has stopped\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 [events_stopped](index.html) module"] -pub struct EVENTS_STOPPED_SPEC; -impl crate::RegisterSpec for EVENTS_STOPPED_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [events_stopped::R](R) reader structure"] -impl crate::Readable for EVENTS_STOPPED_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [events_stopped::W](W) writer structure"] -impl crate::Writable for EVENTS_STOPPED_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets EVENTS_STOPPED to value 0"] -impl crate::Resettable for EVENTS_STOPPED_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/saadc/inten.rs b/down-the-stack/dk_pac/src/saadc/inten.rs deleted file mode 100644 index 11102a9..0000000 --- a/down-the-stack/dk_pac/src/saadc/inten.rs +++ /dev/null @@ -1,1408 +0,0 @@ -#[doc = "Register `INTEN` 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 `INTEN` 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 `STARTED` reader - Enable or disable interrupt for event STARTED"] -pub type STARTED_R = crate::BitReader; -#[doc = "Enable or disable interrupt for event STARTED\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum STARTED_A { - #[doc = "0: Disable"] - DISABLED = 0, - #[doc = "1: Enable"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: STARTED_A) -> Self { - variant as u8 != 0 - } -} -impl STARTED_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> STARTED_A { - match self.bits { - false => STARTED_A::DISABLED, - true => STARTED_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == STARTED_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == STARTED_A::ENABLED - } -} -#[doc = "Field `STARTED` writer - Enable or disable interrupt for event STARTED"] -pub type STARTED_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTEN_SPEC, STARTED_A, O>; -impl<'a, const O: u8> STARTED_W<'a, O> { - #[doc = "Disable"] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(STARTED_A::DISABLED) - } - #[doc = "Enable"] - #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(STARTED_A::ENABLED) - } -} -#[doc = "Field `END` reader - Enable or disable interrupt for event END"] -pub type END_R = crate::BitReader; -#[doc = "Enable or disable interrupt for event END\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum END_A { - #[doc = "0: Disable"] - DISABLED = 0, - #[doc = "1: Enable"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: END_A) -> Self { - variant as u8 != 0 - } -} -impl END_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> END_A { - match self.bits { - false => END_A::DISABLED, - true => END_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == END_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == END_A::ENABLED - } -} -#[doc = "Field `END` writer - Enable or disable interrupt for event END"] -pub type END_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTEN_SPEC, END_A, O>; -impl<'a, const O: u8> END_W<'a, O> { - #[doc = "Disable"] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(END_A::DISABLED) - } - #[doc = "Enable"] - #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(END_A::ENABLED) - } -} -#[doc = "Field `DONE` reader - Enable or disable interrupt for event DONE"] -pub type DONE_R = crate::BitReader; -#[doc = "Enable or disable interrupt for event DONE\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum DONE_A { - #[doc = "0: Disable"] - DISABLED = 0, - #[doc = "1: Enable"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: DONE_A) -> Self { - variant as u8 != 0 - } -} -impl DONE_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> DONE_A { - match self.bits { - false => DONE_A::DISABLED, - true => DONE_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == DONE_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == DONE_A::ENABLED - } -} -#[doc = "Field `DONE` writer - Enable or disable interrupt for event DONE"] -pub type DONE_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTEN_SPEC, DONE_A, O>; -impl<'a, const O: u8> DONE_W<'a, O> { - #[doc = "Disable"] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(DONE_A::DISABLED) - } - #[doc = "Enable"] - #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(DONE_A::ENABLED) - } -} -#[doc = "Field `RESULTDONE` reader - Enable or disable interrupt for event RESULTDONE"] -pub type RESULTDONE_R = crate::BitReader; -#[doc = "Enable or disable interrupt for event RESULTDONE\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum RESULTDONE_A { - #[doc = "0: Disable"] - DISABLED = 0, - #[doc = "1: Enable"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: RESULTDONE_A) -> Self { - variant as u8 != 0 - } -} -impl RESULTDONE_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> RESULTDONE_A { - match self.bits { - false => RESULTDONE_A::DISABLED, - true => RESULTDONE_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == RESULTDONE_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == RESULTDONE_A::ENABLED - } -} -#[doc = "Field `RESULTDONE` writer - Enable or disable interrupt for event RESULTDONE"] -pub type RESULTDONE_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTEN_SPEC, RESULTDONE_A, O>; -impl<'a, const O: u8> RESULTDONE_W<'a, O> { - #[doc = "Disable"] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(RESULTDONE_A::DISABLED) - } - #[doc = "Enable"] - #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(RESULTDONE_A::ENABLED) - } -} -#[doc = "Field `CALIBRATEDONE` reader - Enable or disable interrupt for event CALIBRATEDONE"] -pub type CALIBRATEDONE_R = crate::BitReader; -#[doc = "Enable or disable interrupt for event CALIBRATEDONE\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum CALIBRATEDONE_A { - #[doc = "0: Disable"] - DISABLED = 0, - #[doc = "1: Enable"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: CALIBRATEDONE_A) -> Self { - variant as u8 != 0 - } -} -impl CALIBRATEDONE_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> CALIBRATEDONE_A { - match self.bits { - false => CALIBRATEDONE_A::DISABLED, - true => CALIBRATEDONE_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == CALIBRATEDONE_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == CALIBRATEDONE_A::ENABLED - } -} -#[doc = "Field `CALIBRATEDONE` writer - Enable or disable interrupt for event CALIBRATEDONE"] -pub type CALIBRATEDONE_W<'a, const O: u8> = - crate::BitWriter<'a, u32, INTEN_SPEC, CALIBRATEDONE_A, O>; -impl<'a, const O: u8> CALIBRATEDONE_W<'a, O> { - #[doc = "Disable"] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(CALIBRATEDONE_A::DISABLED) - } - #[doc = "Enable"] - #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(CALIBRATEDONE_A::ENABLED) - } -} -#[doc = "Field `STOPPED` reader - Enable or disable interrupt for event STOPPED"] -pub type STOPPED_R = crate::BitReader; -#[doc = "Enable or disable interrupt for event STOPPED\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum STOPPED_A { - #[doc = "0: Disable"] - DISABLED = 0, - #[doc = "1: Enable"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: STOPPED_A) -> Self { - variant as u8 != 0 - } -} -impl STOPPED_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> STOPPED_A { - match self.bits { - false => STOPPED_A::DISABLED, - true => STOPPED_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == STOPPED_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == STOPPED_A::ENABLED - } -} -#[doc = "Field `STOPPED` writer - Enable or disable interrupt for event STOPPED"] -pub type STOPPED_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTEN_SPEC, STOPPED_A, O>; -impl<'a, const O: u8> STOPPED_W<'a, O> { - #[doc = "Disable"] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(STOPPED_A::DISABLED) - } - #[doc = "Enable"] - #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(STOPPED_A::ENABLED) - } -} -#[doc = "Field `CH0LIMITH` reader - Enable or disable interrupt for event CH0LIMITH"] -pub type CH0LIMITH_R = crate::BitReader; -#[doc = "Enable or disable interrupt for event CH0LIMITH\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum CH0LIMITH_A { - #[doc = "0: Disable"] - DISABLED = 0, - #[doc = "1: Enable"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: CH0LIMITH_A) -> Self { - variant as u8 != 0 - } -} -impl CH0LIMITH_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> CH0LIMITH_A { - match self.bits { - false => CH0LIMITH_A::DISABLED, - true => CH0LIMITH_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == CH0LIMITH_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == CH0LIMITH_A::ENABLED - } -} -#[doc = "Field `CH0LIMITH` writer - Enable or disable interrupt for event CH0LIMITH"] -pub type CH0LIMITH_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTEN_SPEC, CH0LIMITH_A, O>; -impl<'a, const O: u8> CH0LIMITH_W<'a, O> { - #[doc = "Disable"] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(CH0LIMITH_A::DISABLED) - } - #[doc = "Enable"] - #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(CH0LIMITH_A::ENABLED) - } -} -#[doc = "Field `CH0LIMITL` reader - Enable or disable interrupt for event CH0LIMITL"] -pub type CH0LIMITL_R = crate::BitReader; -#[doc = "Enable or disable interrupt for event CH0LIMITL\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum CH0LIMITL_A { - #[doc = "0: Disable"] - DISABLED = 0, - #[doc = "1: Enable"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: CH0LIMITL_A) -> Self { - variant as u8 != 0 - } -} -impl CH0LIMITL_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> CH0LIMITL_A { - match self.bits { - false => CH0LIMITL_A::DISABLED, - true => CH0LIMITL_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == CH0LIMITL_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == CH0LIMITL_A::ENABLED - } -} -#[doc = "Field `CH0LIMITL` writer - Enable or disable interrupt for event CH0LIMITL"] -pub type CH0LIMITL_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTEN_SPEC, CH0LIMITL_A, O>; -impl<'a, const O: u8> CH0LIMITL_W<'a, O> { - #[doc = "Disable"] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(CH0LIMITL_A::DISABLED) - } - #[doc = "Enable"] - #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(CH0LIMITL_A::ENABLED) - } -} -#[doc = "Field `CH1LIMITH` reader - Enable or disable interrupt for event CH1LIMITH"] -pub type CH1LIMITH_R = crate::BitReader; -#[doc = "Enable or disable interrupt for event CH1LIMITH\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum CH1LIMITH_A { - #[doc = "0: Disable"] - DISABLED = 0, - #[doc = "1: Enable"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: CH1LIMITH_A) -> Self { - variant as u8 != 0 - } -} -impl CH1LIMITH_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> CH1LIMITH_A { - match self.bits { - false => CH1LIMITH_A::DISABLED, - true => CH1LIMITH_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == CH1LIMITH_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == CH1LIMITH_A::ENABLED - } -} -#[doc = "Field `CH1LIMITH` writer - Enable or disable interrupt for event CH1LIMITH"] -pub type CH1LIMITH_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTEN_SPEC, CH1LIMITH_A, O>; -impl<'a, const O: u8> CH1LIMITH_W<'a, O> { - #[doc = "Disable"] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(CH1LIMITH_A::DISABLED) - } - #[doc = "Enable"] - #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(CH1LIMITH_A::ENABLED) - } -} -#[doc = "Field `CH1LIMITL` reader - Enable or disable interrupt for event CH1LIMITL"] -pub type CH1LIMITL_R = crate::BitReader; -#[doc = "Enable or disable interrupt for event CH1LIMITL\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum CH1LIMITL_A { - #[doc = "0: Disable"] - DISABLED = 0, - #[doc = "1: Enable"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: CH1LIMITL_A) -> Self { - variant as u8 != 0 - } -} -impl CH1LIMITL_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> CH1LIMITL_A { - match self.bits { - false => CH1LIMITL_A::DISABLED, - true => CH1LIMITL_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == CH1LIMITL_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == CH1LIMITL_A::ENABLED - } -} -#[doc = "Field `CH1LIMITL` writer - Enable or disable interrupt for event CH1LIMITL"] -pub type CH1LIMITL_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTEN_SPEC, CH1LIMITL_A, O>; -impl<'a, const O: u8> CH1LIMITL_W<'a, O> { - #[doc = "Disable"] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(CH1LIMITL_A::DISABLED) - } - #[doc = "Enable"] - #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(CH1LIMITL_A::ENABLED) - } -} -#[doc = "Field `CH2LIMITH` reader - Enable or disable interrupt for event CH2LIMITH"] -pub type CH2LIMITH_R = crate::BitReader; -#[doc = "Enable or disable interrupt for event CH2LIMITH\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum CH2LIMITH_A { - #[doc = "0: Disable"] - DISABLED = 0, - #[doc = "1: Enable"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: CH2LIMITH_A) -> Self { - variant as u8 != 0 - } -} -impl CH2LIMITH_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> CH2LIMITH_A { - match self.bits { - false => CH2LIMITH_A::DISABLED, - true => CH2LIMITH_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == CH2LIMITH_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == CH2LIMITH_A::ENABLED - } -} -#[doc = "Field `CH2LIMITH` writer - Enable or disable interrupt for event CH2LIMITH"] -pub type CH2LIMITH_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTEN_SPEC, CH2LIMITH_A, O>; -impl<'a, const O: u8> CH2LIMITH_W<'a, O> { - #[doc = "Disable"] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(CH2LIMITH_A::DISABLED) - } - #[doc = "Enable"] - #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(CH2LIMITH_A::ENABLED) - } -} -#[doc = "Field `CH2LIMITL` reader - Enable or disable interrupt for event CH2LIMITL"] -pub type CH2LIMITL_R = crate::BitReader; -#[doc = "Enable or disable interrupt for event CH2LIMITL\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum CH2LIMITL_A { - #[doc = "0: Disable"] - DISABLED = 0, - #[doc = "1: Enable"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: CH2LIMITL_A) -> Self { - variant as u8 != 0 - } -} -impl CH2LIMITL_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> CH2LIMITL_A { - match self.bits { - false => CH2LIMITL_A::DISABLED, - true => CH2LIMITL_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == CH2LIMITL_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == CH2LIMITL_A::ENABLED - } -} -#[doc = "Field `CH2LIMITL` writer - Enable or disable interrupt for event CH2LIMITL"] -pub type CH2LIMITL_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTEN_SPEC, CH2LIMITL_A, O>; -impl<'a, const O: u8> CH2LIMITL_W<'a, O> { - #[doc = "Disable"] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(CH2LIMITL_A::DISABLED) - } - #[doc = "Enable"] - #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(CH2LIMITL_A::ENABLED) - } -} -#[doc = "Field `CH3LIMITH` reader - Enable or disable interrupt for event CH3LIMITH"] -pub type CH3LIMITH_R = crate::BitReader; -#[doc = "Enable or disable interrupt for event CH3LIMITH\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum CH3LIMITH_A { - #[doc = "0: Disable"] - DISABLED = 0, - #[doc = "1: Enable"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: CH3LIMITH_A) -> Self { - variant as u8 != 0 - } -} -impl CH3LIMITH_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> CH3LIMITH_A { - match self.bits { - false => CH3LIMITH_A::DISABLED, - true => CH3LIMITH_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == CH3LIMITH_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == CH3LIMITH_A::ENABLED - } -} -#[doc = "Field `CH3LIMITH` writer - Enable or disable interrupt for event CH3LIMITH"] -pub type CH3LIMITH_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTEN_SPEC, CH3LIMITH_A, O>; -impl<'a, const O: u8> CH3LIMITH_W<'a, O> { - #[doc = "Disable"] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(CH3LIMITH_A::DISABLED) - } - #[doc = "Enable"] - #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(CH3LIMITH_A::ENABLED) - } -} -#[doc = "Field `CH3LIMITL` reader - Enable or disable interrupt for event CH3LIMITL"] -pub type CH3LIMITL_R = crate::BitReader; -#[doc = "Enable or disable interrupt for event CH3LIMITL\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum CH3LIMITL_A { - #[doc = "0: Disable"] - DISABLED = 0, - #[doc = "1: Enable"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: CH3LIMITL_A) -> Self { - variant as u8 != 0 - } -} -impl CH3LIMITL_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> CH3LIMITL_A { - match self.bits { - false => CH3LIMITL_A::DISABLED, - true => CH3LIMITL_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == CH3LIMITL_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == CH3LIMITL_A::ENABLED - } -} -#[doc = "Field `CH3LIMITL` writer - Enable or disable interrupt for event CH3LIMITL"] -pub type CH3LIMITL_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTEN_SPEC, CH3LIMITL_A, O>; -impl<'a, const O: u8> CH3LIMITL_W<'a, O> { - #[doc = "Disable"] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(CH3LIMITL_A::DISABLED) - } - #[doc = "Enable"] - #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(CH3LIMITL_A::ENABLED) - } -} -#[doc = "Field `CH4LIMITH` reader - Enable or disable interrupt for event CH4LIMITH"] -pub type CH4LIMITH_R = crate::BitReader; -#[doc = "Enable or disable interrupt for event CH4LIMITH\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum CH4LIMITH_A { - #[doc = "0: Disable"] - DISABLED = 0, - #[doc = "1: Enable"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: CH4LIMITH_A) -> Self { - variant as u8 != 0 - } -} -impl CH4LIMITH_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> CH4LIMITH_A { - match self.bits { - false => CH4LIMITH_A::DISABLED, - true => CH4LIMITH_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == CH4LIMITH_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == CH4LIMITH_A::ENABLED - } -} -#[doc = "Field `CH4LIMITH` writer - Enable or disable interrupt for event CH4LIMITH"] -pub type CH4LIMITH_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTEN_SPEC, CH4LIMITH_A, O>; -impl<'a, const O: u8> CH4LIMITH_W<'a, O> { - #[doc = "Disable"] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(CH4LIMITH_A::DISABLED) - } - #[doc = "Enable"] - #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(CH4LIMITH_A::ENABLED) - } -} -#[doc = "Field `CH4LIMITL` reader - Enable or disable interrupt for event CH4LIMITL"] -pub type CH4LIMITL_R = crate::BitReader; -#[doc = "Enable or disable interrupt for event CH4LIMITL\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum CH4LIMITL_A { - #[doc = "0: Disable"] - DISABLED = 0, - #[doc = "1: Enable"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: CH4LIMITL_A) -> Self { - variant as u8 != 0 - } -} -impl CH4LIMITL_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> CH4LIMITL_A { - match self.bits { - false => CH4LIMITL_A::DISABLED, - true => CH4LIMITL_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == CH4LIMITL_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == CH4LIMITL_A::ENABLED - } -} -#[doc = "Field `CH4LIMITL` writer - Enable or disable interrupt for event CH4LIMITL"] -pub type CH4LIMITL_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTEN_SPEC, CH4LIMITL_A, O>; -impl<'a, const O: u8> CH4LIMITL_W<'a, O> { - #[doc = "Disable"] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(CH4LIMITL_A::DISABLED) - } - #[doc = "Enable"] - #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(CH4LIMITL_A::ENABLED) - } -} -#[doc = "Field `CH5LIMITH` reader - Enable or disable interrupt for event CH5LIMITH"] -pub type CH5LIMITH_R = crate::BitReader; -#[doc = "Enable or disable interrupt for event CH5LIMITH\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum CH5LIMITH_A { - #[doc = "0: Disable"] - DISABLED = 0, - #[doc = "1: Enable"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: CH5LIMITH_A) -> Self { - variant as u8 != 0 - } -} -impl CH5LIMITH_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> CH5LIMITH_A { - match self.bits { - false => CH5LIMITH_A::DISABLED, - true => CH5LIMITH_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == CH5LIMITH_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == CH5LIMITH_A::ENABLED - } -} -#[doc = "Field `CH5LIMITH` writer - Enable or disable interrupt for event CH5LIMITH"] -pub type CH5LIMITH_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTEN_SPEC, CH5LIMITH_A, O>; -impl<'a, const O: u8> CH5LIMITH_W<'a, O> { - #[doc = "Disable"] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(CH5LIMITH_A::DISABLED) - } - #[doc = "Enable"] - #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(CH5LIMITH_A::ENABLED) - } -} -#[doc = "Field `CH5LIMITL` reader - Enable or disable interrupt for event CH5LIMITL"] -pub type CH5LIMITL_R = crate::BitReader; -#[doc = "Enable or disable interrupt for event CH5LIMITL\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum CH5LIMITL_A { - #[doc = "0: Disable"] - DISABLED = 0, - #[doc = "1: Enable"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: CH5LIMITL_A) -> Self { - variant as u8 != 0 - } -} -impl CH5LIMITL_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> CH5LIMITL_A { - match self.bits { - false => CH5LIMITL_A::DISABLED, - true => CH5LIMITL_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == CH5LIMITL_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == CH5LIMITL_A::ENABLED - } -} -#[doc = "Field `CH5LIMITL` writer - Enable or disable interrupt for event CH5LIMITL"] -pub type CH5LIMITL_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTEN_SPEC, CH5LIMITL_A, O>; -impl<'a, const O: u8> CH5LIMITL_W<'a, O> { - #[doc = "Disable"] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(CH5LIMITL_A::DISABLED) - } - #[doc = "Enable"] - #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(CH5LIMITL_A::ENABLED) - } -} -#[doc = "Field `CH6LIMITH` reader - Enable or disable interrupt for event CH6LIMITH"] -pub type CH6LIMITH_R = crate::BitReader; -#[doc = "Enable or disable interrupt for event CH6LIMITH\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum CH6LIMITH_A { - #[doc = "0: Disable"] - DISABLED = 0, - #[doc = "1: Enable"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: CH6LIMITH_A) -> Self { - variant as u8 != 0 - } -} -impl CH6LIMITH_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> CH6LIMITH_A { - match self.bits { - false => CH6LIMITH_A::DISABLED, - true => CH6LIMITH_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == CH6LIMITH_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == CH6LIMITH_A::ENABLED - } -} -#[doc = "Field `CH6LIMITH` writer - Enable or disable interrupt for event CH6LIMITH"] -pub type CH6LIMITH_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTEN_SPEC, CH6LIMITH_A, O>; -impl<'a, const O: u8> CH6LIMITH_W<'a, O> { - #[doc = "Disable"] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(CH6LIMITH_A::DISABLED) - } - #[doc = "Enable"] - #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(CH6LIMITH_A::ENABLED) - } -} -#[doc = "Field `CH6LIMITL` reader - Enable or disable interrupt for event CH6LIMITL"] -pub type CH6LIMITL_R = crate::BitReader; -#[doc = "Enable or disable interrupt for event CH6LIMITL\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum CH6LIMITL_A { - #[doc = "0: Disable"] - DISABLED = 0, - #[doc = "1: Enable"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: CH6LIMITL_A) -> Self { - variant as u8 != 0 - } -} -impl CH6LIMITL_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> CH6LIMITL_A { - match self.bits { - false => CH6LIMITL_A::DISABLED, - true => CH6LIMITL_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == CH6LIMITL_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == CH6LIMITL_A::ENABLED - } -} -#[doc = "Field `CH6LIMITL` writer - Enable or disable interrupt for event CH6LIMITL"] -pub type CH6LIMITL_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTEN_SPEC, CH6LIMITL_A, O>; -impl<'a, const O: u8> CH6LIMITL_W<'a, O> { - #[doc = "Disable"] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(CH6LIMITL_A::DISABLED) - } - #[doc = "Enable"] - #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(CH6LIMITL_A::ENABLED) - } -} -#[doc = "Field `CH7LIMITH` reader - Enable or disable interrupt for event CH7LIMITH"] -pub type CH7LIMITH_R = crate::BitReader; -#[doc = "Enable or disable interrupt for event CH7LIMITH\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum CH7LIMITH_A { - #[doc = "0: Disable"] - DISABLED = 0, - #[doc = "1: Enable"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: CH7LIMITH_A) -> Self { - variant as u8 != 0 - } -} -impl CH7LIMITH_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> CH7LIMITH_A { - match self.bits { - false => CH7LIMITH_A::DISABLED, - true => CH7LIMITH_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == CH7LIMITH_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == CH7LIMITH_A::ENABLED - } -} -#[doc = "Field `CH7LIMITH` writer - Enable or disable interrupt for event CH7LIMITH"] -pub type CH7LIMITH_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTEN_SPEC, CH7LIMITH_A, O>; -impl<'a, const O: u8> CH7LIMITH_W<'a, O> { - #[doc = "Disable"] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(CH7LIMITH_A::DISABLED) - } - #[doc = "Enable"] - #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(CH7LIMITH_A::ENABLED) - } -} -#[doc = "Field `CH7LIMITL` reader - Enable or disable interrupt for event CH7LIMITL"] -pub type CH7LIMITL_R = crate::BitReader; -#[doc = "Enable or disable interrupt for event CH7LIMITL\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum CH7LIMITL_A { - #[doc = "0: Disable"] - DISABLED = 0, - #[doc = "1: Enable"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: CH7LIMITL_A) -> Self { - variant as u8 != 0 - } -} -impl CH7LIMITL_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> CH7LIMITL_A { - match self.bits { - false => CH7LIMITL_A::DISABLED, - true => CH7LIMITL_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == CH7LIMITL_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == CH7LIMITL_A::ENABLED - } -} -#[doc = "Field `CH7LIMITL` writer - Enable or disable interrupt for event CH7LIMITL"] -pub type CH7LIMITL_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTEN_SPEC, CH7LIMITL_A, O>; -impl<'a, const O: u8> CH7LIMITL_W<'a, O> { - #[doc = "Disable"] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(CH7LIMITL_A::DISABLED) - } - #[doc = "Enable"] - #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(CH7LIMITL_A::ENABLED) - } -} -impl R { - #[doc = "Bit 0 - Enable or disable interrupt for event STARTED"] - #[inline(always)] - pub fn started(&self) -> STARTED_R { - STARTED_R::new((self.bits & 1) != 0) - } - #[doc = "Bit 1 - Enable or disable interrupt for event END"] - #[inline(always)] - pub fn end(&self) -> END_R { - END_R::new(((self.bits >> 1) & 1) != 0) - } - #[doc = "Bit 2 - Enable or disable interrupt for event DONE"] - #[inline(always)] - pub fn done(&self) -> DONE_R { - DONE_R::new(((self.bits >> 2) & 1) != 0) - } - #[doc = "Bit 3 - Enable or disable interrupt for event RESULTDONE"] - #[inline(always)] - pub fn resultdone(&self) -> RESULTDONE_R { - RESULTDONE_R::new(((self.bits >> 3) & 1) != 0) - } - #[doc = "Bit 4 - Enable or disable interrupt for event CALIBRATEDONE"] - #[inline(always)] - pub fn calibratedone(&self) -> CALIBRATEDONE_R { - CALIBRATEDONE_R::new(((self.bits >> 4) & 1) != 0) - } - #[doc = "Bit 5 - Enable or disable interrupt for event STOPPED"] - #[inline(always)] - pub fn stopped(&self) -> STOPPED_R { - STOPPED_R::new(((self.bits >> 5) & 1) != 0) - } - #[doc = "Bit 6 - Enable or disable interrupt for event CH0LIMITH"] - #[inline(always)] - pub fn ch0limith(&self) -> CH0LIMITH_R { - CH0LIMITH_R::new(((self.bits >> 6) & 1) != 0) - } - #[doc = "Bit 7 - Enable or disable interrupt for event CH0LIMITL"] - #[inline(always)] - pub fn ch0limitl(&self) -> CH0LIMITL_R { - CH0LIMITL_R::new(((self.bits >> 7) & 1) != 0) - } - #[doc = "Bit 8 - Enable or disable interrupt for event CH1LIMITH"] - #[inline(always)] - pub fn ch1limith(&self) -> CH1LIMITH_R { - CH1LIMITH_R::new(((self.bits >> 8) & 1) != 0) - } - #[doc = "Bit 9 - Enable or disable interrupt for event CH1LIMITL"] - #[inline(always)] - pub fn ch1limitl(&self) -> CH1LIMITL_R { - CH1LIMITL_R::new(((self.bits >> 9) & 1) != 0) - } - #[doc = "Bit 10 - Enable or disable interrupt for event CH2LIMITH"] - #[inline(always)] - pub fn ch2limith(&self) -> CH2LIMITH_R { - CH2LIMITH_R::new(((self.bits >> 10) & 1) != 0) - } - #[doc = "Bit 11 - Enable or disable interrupt for event CH2LIMITL"] - #[inline(always)] - pub fn ch2limitl(&self) -> CH2LIMITL_R { - CH2LIMITL_R::new(((self.bits >> 11) & 1) != 0) - } - #[doc = "Bit 12 - Enable or disable interrupt for event CH3LIMITH"] - #[inline(always)] - pub fn ch3limith(&self) -> CH3LIMITH_R { - CH3LIMITH_R::new(((self.bits >> 12) & 1) != 0) - } - #[doc = "Bit 13 - Enable or disable interrupt for event CH3LIMITL"] - #[inline(always)] - pub fn ch3limitl(&self) -> CH3LIMITL_R { - CH3LIMITL_R::new(((self.bits >> 13) & 1) != 0) - } - #[doc = "Bit 14 - Enable or disable interrupt for event CH4LIMITH"] - #[inline(always)] - pub fn ch4limith(&self) -> CH4LIMITH_R { - CH4LIMITH_R::new(((self.bits >> 14) & 1) != 0) - } - #[doc = "Bit 15 - Enable or disable interrupt for event CH4LIMITL"] - #[inline(always)] - pub fn ch4limitl(&self) -> CH4LIMITL_R { - CH4LIMITL_R::new(((self.bits >> 15) & 1) != 0) - } - #[doc = "Bit 16 - Enable or disable interrupt for event CH5LIMITH"] - #[inline(always)] - pub fn ch5limith(&self) -> CH5LIMITH_R { - CH5LIMITH_R::new(((self.bits >> 16) & 1) != 0) - } - #[doc = "Bit 17 - Enable or disable interrupt for event CH5LIMITL"] - #[inline(always)] - pub fn ch5limitl(&self) -> CH5LIMITL_R { - CH5LIMITL_R::new(((self.bits >> 17) & 1) != 0) - } - #[doc = "Bit 18 - Enable or disable interrupt for event CH6LIMITH"] - #[inline(always)] - pub fn ch6limith(&self) -> CH6LIMITH_R { - CH6LIMITH_R::new(((self.bits >> 18) & 1) != 0) - } - #[doc = "Bit 19 - Enable or disable interrupt for event CH6LIMITL"] - #[inline(always)] - pub fn ch6limitl(&self) -> CH6LIMITL_R { - CH6LIMITL_R::new(((self.bits >> 19) & 1) != 0) - } - #[doc = "Bit 20 - Enable or disable interrupt for event CH7LIMITH"] - #[inline(always)] - pub fn ch7limith(&self) -> CH7LIMITH_R { - CH7LIMITH_R::new(((self.bits >> 20) & 1) != 0) - } - #[doc = "Bit 21 - Enable or disable interrupt for event CH7LIMITL"] - #[inline(always)] - pub fn ch7limitl(&self) -> CH7LIMITL_R { - CH7LIMITL_R::new(((self.bits >> 21) & 1) != 0) - } -} -impl W { - #[doc = "Bit 0 - Enable or disable interrupt for event STARTED"] - #[inline(always)] - #[must_use] - pub fn started(&mut self) -> STARTED_W<0> { - STARTED_W::new(self) - } - #[doc = "Bit 1 - Enable or disable interrupt for event END"] - #[inline(always)] - #[must_use] - pub fn end(&mut self) -> END_W<1> { - END_W::new(self) - } - #[doc = "Bit 2 - Enable or disable interrupt for event DONE"] - #[inline(always)] - #[must_use] - pub fn done(&mut self) -> DONE_W<2> { - DONE_W::new(self) - } - #[doc = "Bit 3 - Enable or disable interrupt for event RESULTDONE"] - #[inline(always)] - #[must_use] - pub fn resultdone(&mut self) -> RESULTDONE_W<3> { - RESULTDONE_W::new(self) - } - #[doc = "Bit 4 - Enable or disable interrupt for event CALIBRATEDONE"] - #[inline(always)] - #[must_use] - pub fn calibratedone(&mut self) -> CALIBRATEDONE_W<4> { - CALIBRATEDONE_W::new(self) - } - #[doc = "Bit 5 - Enable or disable interrupt for event STOPPED"] - #[inline(always)] - #[must_use] - pub fn stopped(&mut self) -> STOPPED_W<5> { - STOPPED_W::new(self) - } - #[doc = "Bit 6 - Enable or disable interrupt for event CH0LIMITH"] - #[inline(always)] - #[must_use] - pub fn ch0limith(&mut self) -> CH0LIMITH_W<6> { - CH0LIMITH_W::new(self) - } - #[doc = "Bit 7 - Enable or disable interrupt for event CH0LIMITL"] - #[inline(always)] - #[must_use] - pub fn ch0limitl(&mut self) -> CH0LIMITL_W<7> { - CH0LIMITL_W::new(self) - } - #[doc = "Bit 8 - Enable or disable interrupt for event CH1LIMITH"] - #[inline(always)] - #[must_use] - pub fn ch1limith(&mut self) -> CH1LIMITH_W<8> { - CH1LIMITH_W::new(self) - } - #[doc = "Bit 9 - Enable or disable interrupt for event CH1LIMITL"] - #[inline(always)] - #[must_use] - pub fn ch1limitl(&mut self) -> CH1LIMITL_W<9> { - CH1LIMITL_W::new(self) - } - #[doc = "Bit 10 - Enable or disable interrupt for event CH2LIMITH"] - #[inline(always)] - #[must_use] - pub fn ch2limith(&mut self) -> CH2LIMITH_W<10> { - CH2LIMITH_W::new(self) - } - #[doc = "Bit 11 - Enable or disable interrupt for event CH2LIMITL"] - #[inline(always)] - #[must_use] - pub fn ch2limitl(&mut self) -> CH2LIMITL_W<11> { - CH2LIMITL_W::new(self) - } - #[doc = "Bit 12 - Enable or disable interrupt for event CH3LIMITH"] - #[inline(always)] - #[must_use] - pub fn ch3limith(&mut self) -> CH3LIMITH_W<12> { - CH3LIMITH_W::new(self) - } - #[doc = "Bit 13 - Enable or disable interrupt for event CH3LIMITL"] - #[inline(always)] - #[must_use] - pub fn ch3limitl(&mut self) -> CH3LIMITL_W<13> { - CH3LIMITL_W::new(self) - } - #[doc = "Bit 14 - Enable or disable interrupt for event CH4LIMITH"] - #[inline(always)] - #[must_use] - pub fn ch4limith(&mut self) -> CH4LIMITH_W<14> { - CH4LIMITH_W::new(self) - } - #[doc = "Bit 15 - Enable or disable interrupt for event CH4LIMITL"] - #[inline(always)] - #[must_use] - pub fn ch4limitl(&mut self) -> CH4LIMITL_W<15> { - CH4LIMITL_W::new(self) - } - #[doc = "Bit 16 - Enable or disable interrupt for event CH5LIMITH"] - #[inline(always)] - #[must_use] - pub fn ch5limith(&mut self) -> CH5LIMITH_W<16> { - CH5LIMITH_W::new(self) - } - #[doc = "Bit 17 - Enable or disable interrupt for event CH5LIMITL"] - #[inline(always)] - #[must_use] - pub fn ch5limitl(&mut self) -> CH5LIMITL_W<17> { - CH5LIMITL_W::new(self) - } - #[doc = "Bit 18 - Enable or disable interrupt for event CH6LIMITH"] - #[inline(always)] - #[must_use] - pub fn ch6limith(&mut self) -> CH6LIMITH_W<18> { - CH6LIMITH_W::new(self) - } - #[doc = "Bit 19 - Enable or disable interrupt for event CH6LIMITL"] - #[inline(always)] - #[must_use] - pub fn ch6limitl(&mut self) -> CH6LIMITL_W<19> { - CH6LIMITL_W::new(self) - } - #[doc = "Bit 20 - Enable or disable interrupt for event CH7LIMITH"] - #[inline(always)] - #[must_use] - pub fn ch7limith(&mut self) -> CH7LIMITH_W<20> { - CH7LIMITH_W::new(self) - } - #[doc = "Bit 21 - Enable or disable interrupt for event CH7LIMITL"] - #[inline(always)] - #[must_use] - pub fn ch7limitl(&mut self) -> CH7LIMITL_W<21> { - CH7LIMITL_W::new(self) - } - #[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 = "Enable or disable interrupt\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 [inten](index.html) module"] -pub struct INTEN_SPEC; -impl crate::RegisterSpec for INTEN_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [inten::R](R) reader structure"] -impl crate::Readable for INTEN_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [inten::W](W) writer structure"] -impl crate::Writable for INTEN_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets INTEN to value 0"] -impl crate::Resettable for INTEN_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/saadc/intenclr.rs b/down-the-stack/dk_pac/src/saadc/intenclr.rs deleted file mode 100644 index 9c97ef6..0000000 --- a/down-the-stack/dk_pac/src/saadc/intenclr.rs +++ /dev/null @@ -1,1562 +0,0 @@ -#[doc = "Register `INTENCLR` 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 `INTENCLR` 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 `STARTED` reader - Write '1' to disable interrupt for event STARTED"] -pub type STARTED_R = crate::BitReader; -#[doc = "Write '1' to disable interrupt for event STARTED\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum STARTED_A { - #[doc = "0: Read: Disabled"] - DISABLED = 0, - #[doc = "1: Read: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: STARTED_A) -> Self { - variant as u8 != 0 - } -} -impl STARTED_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> STARTED_A { - match self.bits { - false => STARTED_A::DISABLED, - true => STARTED_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == STARTED_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == STARTED_A::ENABLED - } -} -#[doc = "Write '1' to disable interrupt for event STARTED\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum STARTED_AW { - #[doc = "1: Disable"] - CLEAR = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: STARTED_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `STARTED` writer - Write '1' to disable interrupt for event STARTED"] -pub type STARTED_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENCLR_SPEC, STARTED_AW, O>; -impl<'a, const O: u8> STARTED_W<'a, O> { - #[doc = "Disable"] - #[inline(always)] - pub fn clear(self) -> &'a mut W { - self.variant(STARTED_AW::CLEAR) - } -} -#[doc = "Field `END` reader - Write '1' to disable interrupt for event END"] -pub type END_R = crate::BitReader; -#[doc = "Write '1' to disable interrupt for event END\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum END_A { - #[doc = "0: Read: Disabled"] - DISABLED = 0, - #[doc = "1: Read: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: END_A) -> Self { - variant as u8 != 0 - } -} -impl END_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> END_A { - match self.bits { - false => END_A::DISABLED, - true => END_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == END_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == END_A::ENABLED - } -} -#[doc = "Write '1' to disable interrupt for event END\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum END_AW { - #[doc = "1: Disable"] - CLEAR = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: END_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `END` writer - Write '1' to disable interrupt for event END"] -pub type END_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENCLR_SPEC, END_AW, O>; -impl<'a, const O: u8> END_W<'a, O> { - #[doc = "Disable"] - #[inline(always)] - pub fn clear(self) -> &'a mut W { - self.variant(END_AW::CLEAR) - } -} -#[doc = "Field `DONE` reader - Write '1' to disable interrupt for event DONE"] -pub type DONE_R = crate::BitReader; -#[doc = "Write '1' to disable interrupt for event DONE\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum DONE_A { - #[doc = "0: Read: Disabled"] - DISABLED = 0, - #[doc = "1: Read: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: DONE_A) -> Self { - variant as u8 != 0 - } -} -impl DONE_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> DONE_A { - match self.bits { - false => DONE_A::DISABLED, - true => DONE_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == DONE_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == DONE_A::ENABLED - } -} -#[doc = "Write '1' to disable interrupt for event DONE\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum DONE_AW { - #[doc = "1: Disable"] - CLEAR = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: DONE_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `DONE` writer - Write '1' to disable interrupt for event DONE"] -pub type DONE_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENCLR_SPEC, DONE_AW, O>; -impl<'a, const O: u8> DONE_W<'a, O> { - #[doc = "Disable"] - #[inline(always)] - pub fn clear(self) -> &'a mut W { - self.variant(DONE_AW::CLEAR) - } -} -#[doc = "Field `RESULTDONE` reader - Write '1' to disable interrupt for event RESULTDONE"] -pub type RESULTDONE_R = crate::BitReader; -#[doc = "Write '1' to disable interrupt for event RESULTDONE\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum RESULTDONE_A { - #[doc = "0: Read: Disabled"] - DISABLED = 0, - #[doc = "1: Read: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: RESULTDONE_A) -> Self { - variant as u8 != 0 - } -} -impl RESULTDONE_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> RESULTDONE_A { - match self.bits { - false => RESULTDONE_A::DISABLED, - true => RESULTDONE_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == RESULTDONE_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == RESULTDONE_A::ENABLED - } -} -#[doc = "Write '1' to disable interrupt for event RESULTDONE\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum RESULTDONE_AW { - #[doc = "1: Disable"] - CLEAR = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: RESULTDONE_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `RESULTDONE` writer - Write '1' to disable interrupt for event RESULTDONE"] -pub type RESULTDONE_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENCLR_SPEC, RESULTDONE_AW, O>; -impl<'a, const O: u8> RESULTDONE_W<'a, O> { - #[doc = "Disable"] - #[inline(always)] - pub fn clear(self) -> &'a mut W { - self.variant(RESULTDONE_AW::CLEAR) - } -} -#[doc = "Field `CALIBRATEDONE` reader - Write '1' to disable interrupt for event CALIBRATEDONE"] -pub type CALIBRATEDONE_R = crate::BitReader; -#[doc = "Write '1' to disable interrupt for event CALIBRATEDONE\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum CALIBRATEDONE_A { - #[doc = "0: Read: Disabled"] - DISABLED = 0, - #[doc = "1: Read: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: CALIBRATEDONE_A) -> Self { - variant as u8 != 0 - } -} -impl CALIBRATEDONE_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> CALIBRATEDONE_A { - match self.bits { - false => CALIBRATEDONE_A::DISABLED, - true => CALIBRATEDONE_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == CALIBRATEDONE_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == CALIBRATEDONE_A::ENABLED - } -} -#[doc = "Write '1' to disable interrupt for event CALIBRATEDONE\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum CALIBRATEDONE_AW { - #[doc = "1: Disable"] - CLEAR = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: CALIBRATEDONE_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `CALIBRATEDONE` writer - Write '1' to disable interrupt for event CALIBRATEDONE"] -pub type CALIBRATEDONE_W<'a, const O: u8> = - crate::BitWriter<'a, u32, INTENCLR_SPEC, CALIBRATEDONE_AW, O>; -impl<'a, const O: u8> CALIBRATEDONE_W<'a, O> { - #[doc = "Disable"] - #[inline(always)] - pub fn clear(self) -> &'a mut W { - self.variant(CALIBRATEDONE_AW::CLEAR) - } -} -#[doc = "Field `STOPPED` reader - Write '1' to disable interrupt for event STOPPED"] -pub type STOPPED_R = crate::BitReader; -#[doc = "Write '1' to disable interrupt for event STOPPED\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum STOPPED_A { - #[doc = "0: Read: Disabled"] - DISABLED = 0, - #[doc = "1: Read: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: STOPPED_A) -> Self { - variant as u8 != 0 - } -} -impl STOPPED_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> STOPPED_A { - match self.bits { - false => STOPPED_A::DISABLED, - true => STOPPED_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == STOPPED_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == STOPPED_A::ENABLED - } -} -#[doc = "Write '1' to disable interrupt for event STOPPED\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum STOPPED_AW { - #[doc = "1: Disable"] - CLEAR = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: STOPPED_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `STOPPED` writer - Write '1' to disable interrupt for event STOPPED"] -pub type STOPPED_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENCLR_SPEC, STOPPED_AW, O>; -impl<'a, const O: u8> STOPPED_W<'a, O> { - #[doc = "Disable"] - #[inline(always)] - pub fn clear(self) -> &'a mut W { - self.variant(STOPPED_AW::CLEAR) - } -} -#[doc = "Field `CH0LIMITH` reader - Write '1' to disable interrupt for event CH0LIMITH"] -pub type CH0LIMITH_R = crate::BitReader; -#[doc = "Write '1' to disable interrupt for event CH0LIMITH\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum CH0LIMITH_A { - #[doc = "0: Read: Disabled"] - DISABLED = 0, - #[doc = "1: Read: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: CH0LIMITH_A) -> Self { - variant as u8 != 0 - } -} -impl CH0LIMITH_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> CH0LIMITH_A { - match self.bits { - false => CH0LIMITH_A::DISABLED, - true => CH0LIMITH_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == CH0LIMITH_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == CH0LIMITH_A::ENABLED - } -} -#[doc = "Write '1' to disable interrupt for event CH0LIMITH\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum CH0LIMITH_AW { - #[doc = "1: Disable"] - CLEAR = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: CH0LIMITH_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `CH0LIMITH` writer - Write '1' to disable interrupt for event CH0LIMITH"] -pub type CH0LIMITH_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENCLR_SPEC, CH0LIMITH_AW, O>; -impl<'a, const O: u8> CH0LIMITH_W<'a, O> { - #[doc = "Disable"] - #[inline(always)] - pub fn clear(self) -> &'a mut W { - self.variant(CH0LIMITH_AW::CLEAR) - } -} -#[doc = "Field `CH0LIMITL` reader - Write '1' to disable interrupt for event CH0LIMITL"] -pub type CH0LIMITL_R = crate::BitReader; -#[doc = "Write '1' to disable interrupt for event CH0LIMITL\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum CH0LIMITL_A { - #[doc = "0: Read: Disabled"] - DISABLED = 0, - #[doc = "1: Read: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: CH0LIMITL_A) -> Self { - variant as u8 != 0 - } -} -impl CH0LIMITL_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> CH0LIMITL_A { - match self.bits { - false => CH0LIMITL_A::DISABLED, - true => CH0LIMITL_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == CH0LIMITL_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == CH0LIMITL_A::ENABLED - } -} -#[doc = "Write '1' to disable interrupt for event CH0LIMITL\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum CH0LIMITL_AW { - #[doc = "1: Disable"] - CLEAR = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: CH0LIMITL_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `CH0LIMITL` writer - Write '1' to disable interrupt for event CH0LIMITL"] -pub type CH0LIMITL_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENCLR_SPEC, CH0LIMITL_AW, O>; -impl<'a, const O: u8> CH0LIMITL_W<'a, O> { - #[doc = "Disable"] - #[inline(always)] - pub fn clear(self) -> &'a mut W { - self.variant(CH0LIMITL_AW::CLEAR) - } -} -#[doc = "Field `CH1LIMITH` reader - Write '1' to disable interrupt for event CH1LIMITH"] -pub type CH1LIMITH_R = crate::BitReader; -#[doc = "Write '1' to disable interrupt for event CH1LIMITH\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum CH1LIMITH_A { - #[doc = "0: Read: Disabled"] - DISABLED = 0, - #[doc = "1: Read: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: CH1LIMITH_A) -> Self { - variant as u8 != 0 - } -} -impl CH1LIMITH_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> CH1LIMITH_A { - match self.bits { - false => CH1LIMITH_A::DISABLED, - true => CH1LIMITH_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == CH1LIMITH_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == CH1LIMITH_A::ENABLED - } -} -#[doc = "Write '1' to disable interrupt for event CH1LIMITH\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum CH1LIMITH_AW { - #[doc = "1: Disable"] - CLEAR = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: CH1LIMITH_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `CH1LIMITH` writer - Write '1' to disable interrupt for event CH1LIMITH"] -pub type CH1LIMITH_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENCLR_SPEC, CH1LIMITH_AW, O>; -impl<'a, const O: u8> CH1LIMITH_W<'a, O> { - #[doc = "Disable"] - #[inline(always)] - pub fn clear(self) -> &'a mut W { - self.variant(CH1LIMITH_AW::CLEAR) - } -} -#[doc = "Field `CH1LIMITL` reader - Write '1' to disable interrupt for event CH1LIMITL"] -pub type CH1LIMITL_R = crate::BitReader; -#[doc = "Write '1' to disable interrupt for event CH1LIMITL\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum CH1LIMITL_A { - #[doc = "0: Read: Disabled"] - DISABLED = 0, - #[doc = "1: Read: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: CH1LIMITL_A) -> Self { - variant as u8 != 0 - } -} -impl CH1LIMITL_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> CH1LIMITL_A { - match self.bits { - false => CH1LIMITL_A::DISABLED, - true => CH1LIMITL_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == CH1LIMITL_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == CH1LIMITL_A::ENABLED - } -} -#[doc = "Write '1' to disable interrupt for event CH1LIMITL\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum CH1LIMITL_AW { - #[doc = "1: Disable"] - CLEAR = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: CH1LIMITL_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `CH1LIMITL` writer - Write '1' to disable interrupt for event CH1LIMITL"] -pub type CH1LIMITL_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENCLR_SPEC, CH1LIMITL_AW, O>; -impl<'a, const O: u8> CH1LIMITL_W<'a, O> { - #[doc = "Disable"] - #[inline(always)] - pub fn clear(self) -> &'a mut W { - self.variant(CH1LIMITL_AW::CLEAR) - } -} -#[doc = "Field `CH2LIMITH` reader - Write '1' to disable interrupt for event CH2LIMITH"] -pub type CH2LIMITH_R = crate::BitReader; -#[doc = "Write '1' to disable interrupt for event CH2LIMITH\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum CH2LIMITH_A { - #[doc = "0: Read: Disabled"] - DISABLED = 0, - #[doc = "1: Read: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: CH2LIMITH_A) -> Self { - variant as u8 != 0 - } -} -impl CH2LIMITH_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> CH2LIMITH_A { - match self.bits { - false => CH2LIMITH_A::DISABLED, - true => CH2LIMITH_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == CH2LIMITH_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == CH2LIMITH_A::ENABLED - } -} -#[doc = "Write '1' to disable interrupt for event CH2LIMITH\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum CH2LIMITH_AW { - #[doc = "1: Disable"] - CLEAR = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: CH2LIMITH_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `CH2LIMITH` writer - Write '1' to disable interrupt for event CH2LIMITH"] -pub type CH2LIMITH_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENCLR_SPEC, CH2LIMITH_AW, O>; -impl<'a, const O: u8> CH2LIMITH_W<'a, O> { - #[doc = "Disable"] - #[inline(always)] - pub fn clear(self) -> &'a mut W { - self.variant(CH2LIMITH_AW::CLEAR) - } -} -#[doc = "Field `CH2LIMITL` reader - Write '1' to disable interrupt for event CH2LIMITL"] -pub type CH2LIMITL_R = crate::BitReader; -#[doc = "Write '1' to disable interrupt for event CH2LIMITL\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum CH2LIMITL_A { - #[doc = "0: Read: Disabled"] - DISABLED = 0, - #[doc = "1: Read: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: CH2LIMITL_A) -> Self { - variant as u8 != 0 - } -} -impl CH2LIMITL_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> CH2LIMITL_A { - match self.bits { - false => CH2LIMITL_A::DISABLED, - true => CH2LIMITL_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == CH2LIMITL_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == CH2LIMITL_A::ENABLED - } -} -#[doc = "Write '1' to disable interrupt for event CH2LIMITL\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum CH2LIMITL_AW { - #[doc = "1: Disable"] - CLEAR = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: CH2LIMITL_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `CH2LIMITL` writer - Write '1' to disable interrupt for event CH2LIMITL"] -pub type CH2LIMITL_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENCLR_SPEC, CH2LIMITL_AW, O>; -impl<'a, const O: u8> CH2LIMITL_W<'a, O> { - #[doc = "Disable"] - #[inline(always)] - pub fn clear(self) -> &'a mut W { - self.variant(CH2LIMITL_AW::CLEAR) - } -} -#[doc = "Field `CH3LIMITH` reader - Write '1' to disable interrupt for event CH3LIMITH"] -pub type CH3LIMITH_R = crate::BitReader; -#[doc = "Write '1' to disable interrupt for event CH3LIMITH\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum CH3LIMITH_A { - #[doc = "0: Read: Disabled"] - DISABLED = 0, - #[doc = "1: Read: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: CH3LIMITH_A) -> Self { - variant as u8 != 0 - } -} -impl CH3LIMITH_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> CH3LIMITH_A { - match self.bits { - false => CH3LIMITH_A::DISABLED, - true => CH3LIMITH_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == CH3LIMITH_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == CH3LIMITH_A::ENABLED - } -} -#[doc = "Write '1' to disable interrupt for event CH3LIMITH\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum CH3LIMITH_AW { - #[doc = "1: Disable"] - CLEAR = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: CH3LIMITH_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `CH3LIMITH` writer - Write '1' to disable interrupt for event CH3LIMITH"] -pub type CH3LIMITH_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENCLR_SPEC, CH3LIMITH_AW, O>; -impl<'a, const O: u8> CH3LIMITH_W<'a, O> { - #[doc = "Disable"] - #[inline(always)] - pub fn clear(self) -> &'a mut W { - self.variant(CH3LIMITH_AW::CLEAR) - } -} -#[doc = "Field `CH3LIMITL` reader - Write '1' to disable interrupt for event CH3LIMITL"] -pub type CH3LIMITL_R = crate::BitReader; -#[doc = "Write '1' to disable interrupt for event CH3LIMITL\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum CH3LIMITL_A { - #[doc = "0: Read: Disabled"] - DISABLED = 0, - #[doc = "1: Read: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: CH3LIMITL_A) -> Self { - variant as u8 != 0 - } -} -impl CH3LIMITL_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> CH3LIMITL_A { - match self.bits { - false => CH3LIMITL_A::DISABLED, - true => CH3LIMITL_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == CH3LIMITL_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == CH3LIMITL_A::ENABLED - } -} -#[doc = "Write '1' to disable interrupt for event CH3LIMITL\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum CH3LIMITL_AW { - #[doc = "1: Disable"] - CLEAR = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: CH3LIMITL_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `CH3LIMITL` writer - Write '1' to disable interrupt for event CH3LIMITL"] -pub type CH3LIMITL_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENCLR_SPEC, CH3LIMITL_AW, O>; -impl<'a, const O: u8> CH3LIMITL_W<'a, O> { - #[doc = "Disable"] - #[inline(always)] - pub fn clear(self) -> &'a mut W { - self.variant(CH3LIMITL_AW::CLEAR) - } -} -#[doc = "Field `CH4LIMITH` reader - Write '1' to disable interrupt for event CH4LIMITH"] -pub type CH4LIMITH_R = crate::BitReader; -#[doc = "Write '1' to disable interrupt for event CH4LIMITH\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum CH4LIMITH_A { - #[doc = "0: Read: Disabled"] - DISABLED = 0, - #[doc = "1: Read: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: CH4LIMITH_A) -> Self { - variant as u8 != 0 - } -} -impl CH4LIMITH_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> CH4LIMITH_A { - match self.bits { - false => CH4LIMITH_A::DISABLED, - true => CH4LIMITH_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == CH4LIMITH_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == CH4LIMITH_A::ENABLED - } -} -#[doc = "Write '1' to disable interrupt for event CH4LIMITH\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum CH4LIMITH_AW { - #[doc = "1: Disable"] - CLEAR = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: CH4LIMITH_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `CH4LIMITH` writer - Write '1' to disable interrupt for event CH4LIMITH"] -pub type CH4LIMITH_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENCLR_SPEC, CH4LIMITH_AW, O>; -impl<'a, const O: u8> CH4LIMITH_W<'a, O> { - #[doc = "Disable"] - #[inline(always)] - pub fn clear(self) -> &'a mut W { - self.variant(CH4LIMITH_AW::CLEAR) - } -} -#[doc = "Field `CH4LIMITL` reader - Write '1' to disable interrupt for event CH4LIMITL"] -pub type CH4LIMITL_R = crate::BitReader; -#[doc = "Write '1' to disable interrupt for event CH4LIMITL\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum CH4LIMITL_A { - #[doc = "0: Read: Disabled"] - DISABLED = 0, - #[doc = "1: Read: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: CH4LIMITL_A) -> Self { - variant as u8 != 0 - } -} -impl CH4LIMITL_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> CH4LIMITL_A { - match self.bits { - false => CH4LIMITL_A::DISABLED, - true => CH4LIMITL_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == CH4LIMITL_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == CH4LIMITL_A::ENABLED - } -} -#[doc = "Write '1' to disable interrupt for event CH4LIMITL\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum CH4LIMITL_AW { - #[doc = "1: Disable"] - CLEAR = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: CH4LIMITL_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `CH4LIMITL` writer - Write '1' to disable interrupt for event CH4LIMITL"] -pub type CH4LIMITL_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENCLR_SPEC, CH4LIMITL_AW, O>; -impl<'a, const O: u8> CH4LIMITL_W<'a, O> { - #[doc = "Disable"] - #[inline(always)] - pub fn clear(self) -> &'a mut W { - self.variant(CH4LIMITL_AW::CLEAR) - } -} -#[doc = "Field `CH5LIMITH` reader - Write '1' to disable interrupt for event CH5LIMITH"] -pub type CH5LIMITH_R = crate::BitReader; -#[doc = "Write '1' to disable interrupt for event CH5LIMITH\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum CH5LIMITH_A { - #[doc = "0: Read: Disabled"] - DISABLED = 0, - #[doc = "1: Read: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: CH5LIMITH_A) -> Self { - variant as u8 != 0 - } -} -impl CH5LIMITH_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> CH5LIMITH_A { - match self.bits { - false => CH5LIMITH_A::DISABLED, - true => CH5LIMITH_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == CH5LIMITH_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == CH5LIMITH_A::ENABLED - } -} -#[doc = "Write '1' to disable interrupt for event CH5LIMITH\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum CH5LIMITH_AW { - #[doc = "1: Disable"] - CLEAR = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: CH5LIMITH_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `CH5LIMITH` writer - Write '1' to disable interrupt for event CH5LIMITH"] -pub type CH5LIMITH_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENCLR_SPEC, CH5LIMITH_AW, O>; -impl<'a, const O: u8> CH5LIMITH_W<'a, O> { - #[doc = "Disable"] - #[inline(always)] - pub fn clear(self) -> &'a mut W { - self.variant(CH5LIMITH_AW::CLEAR) - } -} -#[doc = "Field `CH5LIMITL` reader - Write '1' to disable interrupt for event CH5LIMITL"] -pub type CH5LIMITL_R = crate::BitReader; -#[doc = "Write '1' to disable interrupt for event CH5LIMITL\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum CH5LIMITL_A { - #[doc = "0: Read: Disabled"] - DISABLED = 0, - #[doc = "1: Read: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: CH5LIMITL_A) -> Self { - variant as u8 != 0 - } -} -impl CH5LIMITL_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> CH5LIMITL_A { - match self.bits { - false => CH5LIMITL_A::DISABLED, - true => CH5LIMITL_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == CH5LIMITL_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == CH5LIMITL_A::ENABLED - } -} -#[doc = "Write '1' to disable interrupt for event CH5LIMITL\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum CH5LIMITL_AW { - #[doc = "1: Disable"] - CLEAR = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: CH5LIMITL_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `CH5LIMITL` writer - Write '1' to disable interrupt for event CH5LIMITL"] -pub type CH5LIMITL_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENCLR_SPEC, CH5LIMITL_AW, O>; -impl<'a, const O: u8> CH5LIMITL_W<'a, O> { - #[doc = "Disable"] - #[inline(always)] - pub fn clear(self) -> &'a mut W { - self.variant(CH5LIMITL_AW::CLEAR) - } -} -#[doc = "Field `CH6LIMITH` reader - Write '1' to disable interrupt for event CH6LIMITH"] -pub type CH6LIMITH_R = crate::BitReader; -#[doc = "Write '1' to disable interrupt for event CH6LIMITH\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum CH6LIMITH_A { - #[doc = "0: Read: Disabled"] - DISABLED = 0, - #[doc = "1: Read: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: CH6LIMITH_A) -> Self { - variant as u8 != 0 - } -} -impl CH6LIMITH_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> CH6LIMITH_A { - match self.bits { - false => CH6LIMITH_A::DISABLED, - true => CH6LIMITH_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == CH6LIMITH_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == CH6LIMITH_A::ENABLED - } -} -#[doc = "Write '1' to disable interrupt for event CH6LIMITH\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum CH6LIMITH_AW { - #[doc = "1: Disable"] - CLEAR = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: CH6LIMITH_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `CH6LIMITH` writer - Write '1' to disable interrupt for event CH6LIMITH"] -pub type CH6LIMITH_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENCLR_SPEC, CH6LIMITH_AW, O>; -impl<'a, const O: u8> CH6LIMITH_W<'a, O> { - #[doc = "Disable"] - #[inline(always)] - pub fn clear(self) -> &'a mut W { - self.variant(CH6LIMITH_AW::CLEAR) - } -} -#[doc = "Field `CH6LIMITL` reader - Write '1' to disable interrupt for event CH6LIMITL"] -pub type CH6LIMITL_R = crate::BitReader; -#[doc = "Write '1' to disable interrupt for event CH6LIMITL\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum CH6LIMITL_A { - #[doc = "0: Read: Disabled"] - DISABLED = 0, - #[doc = "1: Read: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: CH6LIMITL_A) -> Self { - variant as u8 != 0 - } -} -impl CH6LIMITL_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> CH6LIMITL_A { - match self.bits { - false => CH6LIMITL_A::DISABLED, - true => CH6LIMITL_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == CH6LIMITL_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == CH6LIMITL_A::ENABLED - } -} -#[doc = "Write '1' to disable interrupt for event CH6LIMITL\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum CH6LIMITL_AW { - #[doc = "1: Disable"] - CLEAR = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: CH6LIMITL_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `CH6LIMITL` writer - Write '1' to disable interrupt for event CH6LIMITL"] -pub type CH6LIMITL_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENCLR_SPEC, CH6LIMITL_AW, O>; -impl<'a, const O: u8> CH6LIMITL_W<'a, O> { - #[doc = "Disable"] - #[inline(always)] - pub fn clear(self) -> &'a mut W { - self.variant(CH6LIMITL_AW::CLEAR) - } -} -#[doc = "Field `CH7LIMITH` reader - Write '1' to disable interrupt for event CH7LIMITH"] -pub type CH7LIMITH_R = crate::BitReader; -#[doc = "Write '1' to disable interrupt for event CH7LIMITH\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum CH7LIMITH_A { - #[doc = "0: Read: Disabled"] - DISABLED = 0, - #[doc = "1: Read: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: CH7LIMITH_A) -> Self { - variant as u8 != 0 - } -} -impl CH7LIMITH_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> CH7LIMITH_A { - match self.bits { - false => CH7LIMITH_A::DISABLED, - true => CH7LIMITH_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == CH7LIMITH_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == CH7LIMITH_A::ENABLED - } -} -#[doc = "Write '1' to disable interrupt for event CH7LIMITH\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum CH7LIMITH_AW { - #[doc = "1: Disable"] - CLEAR = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: CH7LIMITH_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `CH7LIMITH` writer - Write '1' to disable interrupt for event CH7LIMITH"] -pub type CH7LIMITH_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENCLR_SPEC, CH7LIMITH_AW, O>; -impl<'a, const O: u8> CH7LIMITH_W<'a, O> { - #[doc = "Disable"] - #[inline(always)] - pub fn clear(self) -> &'a mut W { - self.variant(CH7LIMITH_AW::CLEAR) - } -} -#[doc = "Field `CH7LIMITL` reader - Write '1' to disable interrupt for event CH7LIMITL"] -pub type CH7LIMITL_R = crate::BitReader; -#[doc = "Write '1' to disable interrupt for event CH7LIMITL\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum CH7LIMITL_A { - #[doc = "0: Read: Disabled"] - DISABLED = 0, - #[doc = "1: Read: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: CH7LIMITL_A) -> Self { - variant as u8 != 0 - } -} -impl CH7LIMITL_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> CH7LIMITL_A { - match self.bits { - false => CH7LIMITL_A::DISABLED, - true => CH7LIMITL_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == CH7LIMITL_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == CH7LIMITL_A::ENABLED - } -} -#[doc = "Write '1' to disable interrupt for event CH7LIMITL\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum CH7LIMITL_AW { - #[doc = "1: Disable"] - CLEAR = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: CH7LIMITL_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `CH7LIMITL` writer - Write '1' to disable interrupt for event CH7LIMITL"] -pub type CH7LIMITL_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENCLR_SPEC, CH7LIMITL_AW, O>; -impl<'a, const O: u8> CH7LIMITL_W<'a, O> { - #[doc = "Disable"] - #[inline(always)] - pub fn clear(self) -> &'a mut W { - self.variant(CH7LIMITL_AW::CLEAR) - } -} -impl R { - #[doc = "Bit 0 - Write '1' to disable interrupt for event STARTED"] - #[inline(always)] - pub fn started(&self) -> STARTED_R { - STARTED_R::new((self.bits & 1) != 0) - } - #[doc = "Bit 1 - Write '1' to disable interrupt for event END"] - #[inline(always)] - pub fn end(&self) -> END_R { - END_R::new(((self.bits >> 1) & 1) != 0) - } - #[doc = "Bit 2 - Write '1' to disable interrupt for event DONE"] - #[inline(always)] - pub fn done(&self) -> DONE_R { - DONE_R::new(((self.bits >> 2) & 1) != 0) - } - #[doc = "Bit 3 - Write '1' to disable interrupt for event RESULTDONE"] - #[inline(always)] - pub fn resultdone(&self) -> RESULTDONE_R { - RESULTDONE_R::new(((self.bits >> 3) & 1) != 0) - } - #[doc = "Bit 4 - Write '1' to disable interrupt for event CALIBRATEDONE"] - #[inline(always)] - pub fn calibratedone(&self) -> CALIBRATEDONE_R { - CALIBRATEDONE_R::new(((self.bits >> 4) & 1) != 0) - } - #[doc = "Bit 5 - Write '1' to disable interrupt for event STOPPED"] - #[inline(always)] - pub fn stopped(&self) -> STOPPED_R { - STOPPED_R::new(((self.bits >> 5) & 1) != 0) - } - #[doc = "Bit 6 - Write '1' to disable interrupt for event CH0LIMITH"] - #[inline(always)] - pub fn ch0limith(&self) -> CH0LIMITH_R { - CH0LIMITH_R::new(((self.bits >> 6) & 1) != 0) - } - #[doc = "Bit 7 - Write '1' to disable interrupt for event CH0LIMITL"] - #[inline(always)] - pub fn ch0limitl(&self) -> CH0LIMITL_R { - CH0LIMITL_R::new(((self.bits >> 7) & 1) != 0) - } - #[doc = "Bit 8 - Write '1' to disable interrupt for event CH1LIMITH"] - #[inline(always)] - pub fn ch1limith(&self) -> CH1LIMITH_R { - CH1LIMITH_R::new(((self.bits >> 8) & 1) != 0) - } - #[doc = "Bit 9 - Write '1' to disable interrupt for event CH1LIMITL"] - #[inline(always)] - pub fn ch1limitl(&self) -> CH1LIMITL_R { - CH1LIMITL_R::new(((self.bits >> 9) & 1) != 0) - } - #[doc = "Bit 10 - Write '1' to disable interrupt for event CH2LIMITH"] - #[inline(always)] - pub fn ch2limith(&self) -> CH2LIMITH_R { - CH2LIMITH_R::new(((self.bits >> 10) & 1) != 0) - } - #[doc = "Bit 11 - Write '1' to disable interrupt for event CH2LIMITL"] - #[inline(always)] - pub fn ch2limitl(&self) -> CH2LIMITL_R { - CH2LIMITL_R::new(((self.bits >> 11) & 1) != 0) - } - #[doc = "Bit 12 - Write '1' to disable interrupt for event CH3LIMITH"] - #[inline(always)] - pub fn ch3limith(&self) -> CH3LIMITH_R { - CH3LIMITH_R::new(((self.bits >> 12) & 1) != 0) - } - #[doc = "Bit 13 - Write '1' to disable interrupt for event CH3LIMITL"] - #[inline(always)] - pub fn ch3limitl(&self) -> CH3LIMITL_R { - CH3LIMITL_R::new(((self.bits >> 13) & 1) != 0) - } - #[doc = "Bit 14 - Write '1' to disable interrupt for event CH4LIMITH"] - #[inline(always)] - pub fn ch4limith(&self) -> CH4LIMITH_R { - CH4LIMITH_R::new(((self.bits >> 14) & 1) != 0) - } - #[doc = "Bit 15 - Write '1' to disable interrupt for event CH4LIMITL"] - #[inline(always)] - pub fn ch4limitl(&self) -> CH4LIMITL_R { - CH4LIMITL_R::new(((self.bits >> 15) & 1) != 0) - } - #[doc = "Bit 16 - Write '1' to disable interrupt for event CH5LIMITH"] - #[inline(always)] - pub fn ch5limith(&self) -> CH5LIMITH_R { - CH5LIMITH_R::new(((self.bits >> 16) & 1) != 0) - } - #[doc = "Bit 17 - Write '1' to disable interrupt for event CH5LIMITL"] - #[inline(always)] - pub fn ch5limitl(&self) -> CH5LIMITL_R { - CH5LIMITL_R::new(((self.bits >> 17) & 1) != 0) - } - #[doc = "Bit 18 - Write '1' to disable interrupt for event CH6LIMITH"] - #[inline(always)] - pub fn ch6limith(&self) -> CH6LIMITH_R { - CH6LIMITH_R::new(((self.bits >> 18) & 1) != 0) - } - #[doc = "Bit 19 - Write '1' to disable interrupt for event CH6LIMITL"] - #[inline(always)] - pub fn ch6limitl(&self) -> CH6LIMITL_R { - CH6LIMITL_R::new(((self.bits >> 19) & 1) != 0) - } - #[doc = "Bit 20 - Write '1' to disable interrupt for event CH7LIMITH"] - #[inline(always)] - pub fn ch7limith(&self) -> CH7LIMITH_R { - CH7LIMITH_R::new(((self.bits >> 20) & 1) != 0) - } - #[doc = "Bit 21 - Write '1' to disable interrupt for event CH7LIMITL"] - #[inline(always)] - pub fn ch7limitl(&self) -> CH7LIMITL_R { - CH7LIMITL_R::new(((self.bits >> 21) & 1) != 0) - } -} -impl W { - #[doc = "Bit 0 - Write '1' to disable interrupt for event STARTED"] - #[inline(always)] - #[must_use] - pub fn started(&mut self) -> STARTED_W<0> { - STARTED_W::new(self) - } - #[doc = "Bit 1 - Write '1' to disable interrupt for event END"] - #[inline(always)] - #[must_use] - pub fn end(&mut self) -> END_W<1> { - END_W::new(self) - } - #[doc = "Bit 2 - Write '1' to disable interrupt for event DONE"] - #[inline(always)] - #[must_use] - pub fn done(&mut self) -> DONE_W<2> { - DONE_W::new(self) - } - #[doc = "Bit 3 - Write '1' to disable interrupt for event RESULTDONE"] - #[inline(always)] - #[must_use] - pub fn resultdone(&mut self) -> RESULTDONE_W<3> { - RESULTDONE_W::new(self) - } - #[doc = "Bit 4 - Write '1' to disable interrupt for event CALIBRATEDONE"] - #[inline(always)] - #[must_use] - pub fn calibratedone(&mut self) -> CALIBRATEDONE_W<4> { - CALIBRATEDONE_W::new(self) - } - #[doc = "Bit 5 - Write '1' to disable interrupt for event STOPPED"] - #[inline(always)] - #[must_use] - pub fn stopped(&mut self) -> STOPPED_W<5> { - STOPPED_W::new(self) - } - #[doc = "Bit 6 - Write '1' to disable interrupt for event CH0LIMITH"] - #[inline(always)] - #[must_use] - pub fn ch0limith(&mut self) -> CH0LIMITH_W<6> { - CH0LIMITH_W::new(self) - } - #[doc = "Bit 7 - Write '1' to disable interrupt for event CH0LIMITL"] - #[inline(always)] - #[must_use] - pub fn ch0limitl(&mut self) -> CH0LIMITL_W<7> { - CH0LIMITL_W::new(self) - } - #[doc = "Bit 8 - Write '1' to disable interrupt for event CH1LIMITH"] - #[inline(always)] - #[must_use] - pub fn ch1limith(&mut self) -> CH1LIMITH_W<8> { - CH1LIMITH_W::new(self) - } - #[doc = "Bit 9 - Write '1' to disable interrupt for event CH1LIMITL"] - #[inline(always)] - #[must_use] - pub fn ch1limitl(&mut self) -> CH1LIMITL_W<9> { - CH1LIMITL_W::new(self) - } - #[doc = "Bit 10 - Write '1' to disable interrupt for event CH2LIMITH"] - #[inline(always)] - #[must_use] - pub fn ch2limith(&mut self) -> CH2LIMITH_W<10> { - CH2LIMITH_W::new(self) - } - #[doc = "Bit 11 - Write '1' to disable interrupt for event CH2LIMITL"] - #[inline(always)] - #[must_use] - pub fn ch2limitl(&mut self) -> CH2LIMITL_W<11> { - CH2LIMITL_W::new(self) - } - #[doc = "Bit 12 - Write '1' to disable interrupt for event CH3LIMITH"] - #[inline(always)] - #[must_use] - pub fn ch3limith(&mut self) -> CH3LIMITH_W<12> { - CH3LIMITH_W::new(self) - } - #[doc = "Bit 13 - Write '1' to disable interrupt for event CH3LIMITL"] - #[inline(always)] - #[must_use] - pub fn ch3limitl(&mut self) -> CH3LIMITL_W<13> { - CH3LIMITL_W::new(self) - } - #[doc = "Bit 14 - Write '1' to disable interrupt for event CH4LIMITH"] - #[inline(always)] - #[must_use] - pub fn ch4limith(&mut self) -> CH4LIMITH_W<14> { - CH4LIMITH_W::new(self) - } - #[doc = "Bit 15 - Write '1' to disable interrupt for event CH4LIMITL"] - #[inline(always)] - #[must_use] - pub fn ch4limitl(&mut self) -> CH4LIMITL_W<15> { - CH4LIMITL_W::new(self) - } - #[doc = "Bit 16 - Write '1' to disable interrupt for event CH5LIMITH"] - #[inline(always)] - #[must_use] - pub fn ch5limith(&mut self) -> CH5LIMITH_W<16> { - CH5LIMITH_W::new(self) - } - #[doc = "Bit 17 - Write '1' to disable interrupt for event CH5LIMITL"] - #[inline(always)] - #[must_use] - pub fn ch5limitl(&mut self) -> CH5LIMITL_W<17> { - CH5LIMITL_W::new(self) - } - #[doc = "Bit 18 - Write '1' to disable interrupt for event CH6LIMITH"] - #[inline(always)] - #[must_use] - pub fn ch6limith(&mut self) -> CH6LIMITH_W<18> { - CH6LIMITH_W::new(self) - } - #[doc = "Bit 19 - Write '1' to disable interrupt for event CH6LIMITL"] - #[inline(always)] - #[must_use] - pub fn ch6limitl(&mut self) -> CH6LIMITL_W<19> { - CH6LIMITL_W::new(self) - } - #[doc = "Bit 20 - Write '1' to disable interrupt for event CH7LIMITH"] - #[inline(always)] - #[must_use] - pub fn ch7limith(&mut self) -> CH7LIMITH_W<20> { - CH7LIMITH_W::new(self) - } - #[doc = "Bit 21 - Write '1' to disable interrupt for event CH7LIMITL"] - #[inline(always)] - #[must_use] - pub fn ch7limitl(&mut self) -> CH7LIMITL_W<21> { - CH7LIMITL_W::new(self) - } - #[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 = "Disable interrupt\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 [intenclr](index.html) module"] -pub struct INTENCLR_SPEC; -impl crate::RegisterSpec for INTENCLR_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [intenclr::R](R) reader structure"] -impl crate::Readable for INTENCLR_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [intenclr::W](W) writer structure"] -impl crate::Writable for INTENCLR_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets INTENCLR to value 0"] -impl crate::Resettable for INTENCLR_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/saadc/intenset.rs b/down-the-stack/dk_pac/src/saadc/intenset.rs deleted file mode 100644 index a415f27..0000000 --- a/down-the-stack/dk_pac/src/saadc/intenset.rs +++ /dev/null @@ -1,1562 +0,0 @@ -#[doc = "Register `INTENSET` 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 `INTENSET` 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 `STARTED` reader - Write '1' to enable interrupt for event STARTED"] -pub type STARTED_R = crate::BitReader; -#[doc = "Write '1' to enable interrupt for event STARTED\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum STARTED_A { - #[doc = "0: Read: Disabled"] - DISABLED = 0, - #[doc = "1: Read: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: STARTED_A) -> Self { - variant as u8 != 0 - } -} -impl STARTED_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> STARTED_A { - match self.bits { - false => STARTED_A::DISABLED, - true => STARTED_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == STARTED_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == STARTED_A::ENABLED - } -} -#[doc = "Write '1' to enable interrupt for event STARTED\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum STARTED_AW { - #[doc = "1: Enable"] - SET = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: STARTED_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `STARTED` writer - Write '1' to enable interrupt for event STARTED"] -pub type STARTED_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENSET_SPEC, STARTED_AW, O>; -impl<'a, const O: u8> STARTED_W<'a, O> { - #[doc = "Enable"] - #[inline(always)] - pub fn set(self) -> &'a mut W { - self.variant(STARTED_AW::SET) - } -} -#[doc = "Field `END` reader - Write '1' to enable interrupt for event END"] -pub type END_R = crate::BitReader; -#[doc = "Write '1' to enable interrupt for event END\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum END_A { - #[doc = "0: Read: Disabled"] - DISABLED = 0, - #[doc = "1: Read: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: END_A) -> Self { - variant as u8 != 0 - } -} -impl END_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> END_A { - match self.bits { - false => END_A::DISABLED, - true => END_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == END_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == END_A::ENABLED - } -} -#[doc = "Write '1' to enable interrupt for event END\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum END_AW { - #[doc = "1: Enable"] - SET = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: END_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `END` writer - Write '1' to enable interrupt for event END"] -pub type END_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENSET_SPEC, END_AW, O>; -impl<'a, const O: u8> END_W<'a, O> { - #[doc = "Enable"] - #[inline(always)] - pub fn set(self) -> &'a mut W { - self.variant(END_AW::SET) - } -} -#[doc = "Field `DONE` reader - Write '1' to enable interrupt for event DONE"] -pub type DONE_R = crate::BitReader; -#[doc = "Write '1' to enable interrupt for event DONE\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum DONE_A { - #[doc = "0: Read: Disabled"] - DISABLED = 0, - #[doc = "1: Read: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: DONE_A) -> Self { - variant as u8 != 0 - } -} -impl DONE_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> DONE_A { - match self.bits { - false => DONE_A::DISABLED, - true => DONE_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == DONE_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == DONE_A::ENABLED - } -} -#[doc = "Write '1' to enable interrupt for event DONE\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum DONE_AW { - #[doc = "1: Enable"] - SET = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: DONE_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `DONE` writer - Write '1' to enable interrupt for event DONE"] -pub type DONE_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENSET_SPEC, DONE_AW, O>; -impl<'a, const O: u8> DONE_W<'a, O> { - #[doc = "Enable"] - #[inline(always)] - pub fn set(self) -> &'a mut W { - self.variant(DONE_AW::SET) - } -} -#[doc = "Field `RESULTDONE` reader - Write '1' to enable interrupt for event RESULTDONE"] -pub type RESULTDONE_R = crate::BitReader; -#[doc = "Write '1' to enable interrupt for event RESULTDONE\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum RESULTDONE_A { - #[doc = "0: Read: Disabled"] - DISABLED = 0, - #[doc = "1: Read: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: RESULTDONE_A) -> Self { - variant as u8 != 0 - } -} -impl RESULTDONE_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> RESULTDONE_A { - match self.bits { - false => RESULTDONE_A::DISABLED, - true => RESULTDONE_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == RESULTDONE_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == RESULTDONE_A::ENABLED - } -} -#[doc = "Write '1' to enable interrupt for event RESULTDONE\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum RESULTDONE_AW { - #[doc = "1: Enable"] - SET = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: RESULTDONE_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `RESULTDONE` writer - Write '1' to enable interrupt for event RESULTDONE"] -pub type RESULTDONE_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENSET_SPEC, RESULTDONE_AW, O>; -impl<'a, const O: u8> RESULTDONE_W<'a, O> { - #[doc = "Enable"] - #[inline(always)] - pub fn set(self) -> &'a mut W { - self.variant(RESULTDONE_AW::SET) - } -} -#[doc = "Field `CALIBRATEDONE` reader - Write '1' to enable interrupt for event CALIBRATEDONE"] -pub type CALIBRATEDONE_R = crate::BitReader; -#[doc = "Write '1' to enable interrupt for event CALIBRATEDONE\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum CALIBRATEDONE_A { - #[doc = "0: Read: Disabled"] - DISABLED = 0, - #[doc = "1: Read: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: CALIBRATEDONE_A) -> Self { - variant as u8 != 0 - } -} -impl CALIBRATEDONE_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> CALIBRATEDONE_A { - match self.bits { - false => CALIBRATEDONE_A::DISABLED, - true => CALIBRATEDONE_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == CALIBRATEDONE_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == CALIBRATEDONE_A::ENABLED - } -} -#[doc = "Write '1' to enable interrupt for event CALIBRATEDONE\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum CALIBRATEDONE_AW { - #[doc = "1: Enable"] - SET = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: CALIBRATEDONE_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `CALIBRATEDONE` writer - Write '1' to enable interrupt for event CALIBRATEDONE"] -pub type CALIBRATEDONE_W<'a, const O: u8> = - crate::BitWriter<'a, u32, INTENSET_SPEC, CALIBRATEDONE_AW, O>; -impl<'a, const O: u8> CALIBRATEDONE_W<'a, O> { - #[doc = "Enable"] - #[inline(always)] - pub fn set(self) -> &'a mut W { - self.variant(CALIBRATEDONE_AW::SET) - } -} -#[doc = "Field `STOPPED` reader - Write '1' to enable interrupt for event STOPPED"] -pub type STOPPED_R = crate::BitReader; -#[doc = "Write '1' to enable interrupt for event STOPPED\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum STOPPED_A { - #[doc = "0: Read: Disabled"] - DISABLED = 0, - #[doc = "1: Read: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: STOPPED_A) -> Self { - variant as u8 != 0 - } -} -impl STOPPED_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> STOPPED_A { - match self.bits { - false => STOPPED_A::DISABLED, - true => STOPPED_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == STOPPED_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == STOPPED_A::ENABLED - } -} -#[doc = "Write '1' to enable interrupt for event STOPPED\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum STOPPED_AW { - #[doc = "1: Enable"] - SET = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: STOPPED_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `STOPPED` writer - Write '1' to enable interrupt for event STOPPED"] -pub type STOPPED_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENSET_SPEC, STOPPED_AW, O>; -impl<'a, const O: u8> STOPPED_W<'a, O> { - #[doc = "Enable"] - #[inline(always)] - pub fn set(self) -> &'a mut W { - self.variant(STOPPED_AW::SET) - } -} -#[doc = "Field `CH0LIMITH` reader - Write '1' to enable interrupt for event CH0LIMITH"] -pub type CH0LIMITH_R = crate::BitReader; -#[doc = "Write '1' to enable interrupt for event CH0LIMITH\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum CH0LIMITH_A { - #[doc = "0: Read: Disabled"] - DISABLED = 0, - #[doc = "1: Read: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: CH0LIMITH_A) -> Self { - variant as u8 != 0 - } -} -impl CH0LIMITH_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> CH0LIMITH_A { - match self.bits { - false => CH0LIMITH_A::DISABLED, - true => CH0LIMITH_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == CH0LIMITH_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == CH0LIMITH_A::ENABLED - } -} -#[doc = "Write '1' to enable interrupt for event CH0LIMITH\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum CH0LIMITH_AW { - #[doc = "1: Enable"] - SET = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: CH0LIMITH_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `CH0LIMITH` writer - Write '1' to enable interrupt for event CH0LIMITH"] -pub type CH0LIMITH_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENSET_SPEC, CH0LIMITH_AW, O>; -impl<'a, const O: u8> CH0LIMITH_W<'a, O> { - #[doc = "Enable"] - #[inline(always)] - pub fn set(self) -> &'a mut W { - self.variant(CH0LIMITH_AW::SET) - } -} -#[doc = "Field `CH0LIMITL` reader - Write '1' to enable interrupt for event CH0LIMITL"] -pub type CH0LIMITL_R = crate::BitReader; -#[doc = "Write '1' to enable interrupt for event CH0LIMITL\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum CH0LIMITL_A { - #[doc = "0: Read: Disabled"] - DISABLED = 0, - #[doc = "1: Read: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: CH0LIMITL_A) -> Self { - variant as u8 != 0 - } -} -impl CH0LIMITL_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> CH0LIMITL_A { - match self.bits { - false => CH0LIMITL_A::DISABLED, - true => CH0LIMITL_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == CH0LIMITL_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == CH0LIMITL_A::ENABLED - } -} -#[doc = "Write '1' to enable interrupt for event CH0LIMITL\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum CH0LIMITL_AW { - #[doc = "1: Enable"] - SET = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: CH0LIMITL_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `CH0LIMITL` writer - Write '1' to enable interrupt for event CH0LIMITL"] -pub type CH0LIMITL_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENSET_SPEC, CH0LIMITL_AW, O>; -impl<'a, const O: u8> CH0LIMITL_W<'a, O> { - #[doc = "Enable"] - #[inline(always)] - pub fn set(self) -> &'a mut W { - self.variant(CH0LIMITL_AW::SET) - } -} -#[doc = "Field `CH1LIMITH` reader - Write '1' to enable interrupt for event CH1LIMITH"] -pub type CH1LIMITH_R = crate::BitReader; -#[doc = "Write '1' to enable interrupt for event CH1LIMITH\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum CH1LIMITH_A { - #[doc = "0: Read: Disabled"] - DISABLED = 0, - #[doc = "1: Read: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: CH1LIMITH_A) -> Self { - variant as u8 != 0 - } -} -impl CH1LIMITH_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> CH1LIMITH_A { - match self.bits { - false => CH1LIMITH_A::DISABLED, - true => CH1LIMITH_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == CH1LIMITH_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == CH1LIMITH_A::ENABLED - } -} -#[doc = "Write '1' to enable interrupt for event CH1LIMITH\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum CH1LIMITH_AW { - #[doc = "1: Enable"] - SET = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: CH1LIMITH_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `CH1LIMITH` writer - Write '1' to enable interrupt for event CH1LIMITH"] -pub type CH1LIMITH_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENSET_SPEC, CH1LIMITH_AW, O>; -impl<'a, const O: u8> CH1LIMITH_W<'a, O> { - #[doc = "Enable"] - #[inline(always)] - pub fn set(self) -> &'a mut W { - self.variant(CH1LIMITH_AW::SET) - } -} -#[doc = "Field `CH1LIMITL` reader - Write '1' to enable interrupt for event CH1LIMITL"] -pub type CH1LIMITL_R = crate::BitReader; -#[doc = "Write '1' to enable interrupt for event CH1LIMITL\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum CH1LIMITL_A { - #[doc = "0: Read: Disabled"] - DISABLED = 0, - #[doc = "1: Read: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: CH1LIMITL_A) -> Self { - variant as u8 != 0 - } -} -impl CH1LIMITL_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> CH1LIMITL_A { - match self.bits { - false => CH1LIMITL_A::DISABLED, - true => CH1LIMITL_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == CH1LIMITL_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == CH1LIMITL_A::ENABLED - } -} -#[doc = "Write '1' to enable interrupt for event CH1LIMITL\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum CH1LIMITL_AW { - #[doc = "1: Enable"] - SET = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: CH1LIMITL_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `CH1LIMITL` writer - Write '1' to enable interrupt for event CH1LIMITL"] -pub type CH1LIMITL_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENSET_SPEC, CH1LIMITL_AW, O>; -impl<'a, const O: u8> CH1LIMITL_W<'a, O> { - #[doc = "Enable"] - #[inline(always)] - pub fn set(self) -> &'a mut W { - self.variant(CH1LIMITL_AW::SET) - } -} -#[doc = "Field `CH2LIMITH` reader - Write '1' to enable interrupt for event CH2LIMITH"] -pub type CH2LIMITH_R = crate::BitReader; -#[doc = "Write '1' to enable interrupt for event CH2LIMITH\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum CH2LIMITH_A { - #[doc = "0: Read: Disabled"] - DISABLED = 0, - #[doc = "1: Read: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: CH2LIMITH_A) -> Self { - variant as u8 != 0 - } -} -impl CH2LIMITH_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> CH2LIMITH_A { - match self.bits { - false => CH2LIMITH_A::DISABLED, - true => CH2LIMITH_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == CH2LIMITH_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == CH2LIMITH_A::ENABLED - } -} -#[doc = "Write '1' to enable interrupt for event CH2LIMITH\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum CH2LIMITH_AW { - #[doc = "1: Enable"] - SET = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: CH2LIMITH_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `CH2LIMITH` writer - Write '1' to enable interrupt for event CH2LIMITH"] -pub type CH2LIMITH_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENSET_SPEC, CH2LIMITH_AW, O>; -impl<'a, const O: u8> CH2LIMITH_W<'a, O> { - #[doc = "Enable"] - #[inline(always)] - pub fn set(self) -> &'a mut W { - self.variant(CH2LIMITH_AW::SET) - } -} -#[doc = "Field `CH2LIMITL` reader - Write '1' to enable interrupt for event CH2LIMITL"] -pub type CH2LIMITL_R = crate::BitReader; -#[doc = "Write '1' to enable interrupt for event CH2LIMITL\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum CH2LIMITL_A { - #[doc = "0: Read: Disabled"] - DISABLED = 0, - #[doc = "1: Read: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: CH2LIMITL_A) -> Self { - variant as u8 != 0 - } -} -impl CH2LIMITL_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> CH2LIMITL_A { - match self.bits { - false => CH2LIMITL_A::DISABLED, - true => CH2LIMITL_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == CH2LIMITL_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == CH2LIMITL_A::ENABLED - } -} -#[doc = "Write '1' to enable interrupt for event CH2LIMITL\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum CH2LIMITL_AW { - #[doc = "1: Enable"] - SET = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: CH2LIMITL_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `CH2LIMITL` writer - Write '1' to enable interrupt for event CH2LIMITL"] -pub type CH2LIMITL_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENSET_SPEC, CH2LIMITL_AW, O>; -impl<'a, const O: u8> CH2LIMITL_W<'a, O> { - #[doc = "Enable"] - #[inline(always)] - pub fn set(self) -> &'a mut W { - self.variant(CH2LIMITL_AW::SET) - } -} -#[doc = "Field `CH3LIMITH` reader - Write '1' to enable interrupt for event CH3LIMITH"] -pub type CH3LIMITH_R = crate::BitReader; -#[doc = "Write '1' to enable interrupt for event CH3LIMITH\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum CH3LIMITH_A { - #[doc = "0: Read: Disabled"] - DISABLED = 0, - #[doc = "1: Read: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: CH3LIMITH_A) -> Self { - variant as u8 != 0 - } -} -impl CH3LIMITH_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> CH3LIMITH_A { - match self.bits { - false => CH3LIMITH_A::DISABLED, - true => CH3LIMITH_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == CH3LIMITH_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == CH3LIMITH_A::ENABLED - } -} -#[doc = "Write '1' to enable interrupt for event CH3LIMITH\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum CH3LIMITH_AW { - #[doc = "1: Enable"] - SET = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: CH3LIMITH_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `CH3LIMITH` writer - Write '1' to enable interrupt for event CH3LIMITH"] -pub type CH3LIMITH_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENSET_SPEC, CH3LIMITH_AW, O>; -impl<'a, const O: u8> CH3LIMITH_W<'a, O> { - #[doc = "Enable"] - #[inline(always)] - pub fn set(self) -> &'a mut W { - self.variant(CH3LIMITH_AW::SET) - } -} -#[doc = "Field `CH3LIMITL` reader - Write '1' to enable interrupt for event CH3LIMITL"] -pub type CH3LIMITL_R = crate::BitReader; -#[doc = "Write '1' to enable interrupt for event CH3LIMITL\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum CH3LIMITL_A { - #[doc = "0: Read: Disabled"] - DISABLED = 0, - #[doc = "1: Read: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: CH3LIMITL_A) -> Self { - variant as u8 != 0 - } -} -impl CH3LIMITL_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> CH3LIMITL_A { - match self.bits { - false => CH3LIMITL_A::DISABLED, - true => CH3LIMITL_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == CH3LIMITL_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == CH3LIMITL_A::ENABLED - } -} -#[doc = "Write '1' to enable interrupt for event CH3LIMITL\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum CH3LIMITL_AW { - #[doc = "1: Enable"] - SET = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: CH3LIMITL_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `CH3LIMITL` writer - Write '1' to enable interrupt for event CH3LIMITL"] -pub type CH3LIMITL_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENSET_SPEC, CH3LIMITL_AW, O>; -impl<'a, const O: u8> CH3LIMITL_W<'a, O> { - #[doc = "Enable"] - #[inline(always)] - pub fn set(self) -> &'a mut W { - self.variant(CH3LIMITL_AW::SET) - } -} -#[doc = "Field `CH4LIMITH` reader - Write '1' to enable interrupt for event CH4LIMITH"] -pub type CH4LIMITH_R = crate::BitReader; -#[doc = "Write '1' to enable interrupt for event CH4LIMITH\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum CH4LIMITH_A { - #[doc = "0: Read: Disabled"] - DISABLED = 0, - #[doc = "1: Read: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: CH4LIMITH_A) -> Self { - variant as u8 != 0 - } -} -impl CH4LIMITH_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> CH4LIMITH_A { - match self.bits { - false => CH4LIMITH_A::DISABLED, - true => CH4LIMITH_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == CH4LIMITH_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == CH4LIMITH_A::ENABLED - } -} -#[doc = "Write '1' to enable interrupt for event CH4LIMITH\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum CH4LIMITH_AW { - #[doc = "1: Enable"] - SET = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: CH4LIMITH_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `CH4LIMITH` writer - Write '1' to enable interrupt for event CH4LIMITH"] -pub type CH4LIMITH_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENSET_SPEC, CH4LIMITH_AW, O>; -impl<'a, const O: u8> CH4LIMITH_W<'a, O> { - #[doc = "Enable"] - #[inline(always)] - pub fn set(self) -> &'a mut W { - self.variant(CH4LIMITH_AW::SET) - } -} -#[doc = "Field `CH4LIMITL` reader - Write '1' to enable interrupt for event CH4LIMITL"] -pub type CH4LIMITL_R = crate::BitReader; -#[doc = "Write '1' to enable interrupt for event CH4LIMITL\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum CH4LIMITL_A { - #[doc = "0: Read: Disabled"] - DISABLED = 0, - #[doc = "1: Read: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: CH4LIMITL_A) -> Self { - variant as u8 != 0 - } -} -impl CH4LIMITL_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> CH4LIMITL_A { - match self.bits { - false => CH4LIMITL_A::DISABLED, - true => CH4LIMITL_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == CH4LIMITL_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == CH4LIMITL_A::ENABLED - } -} -#[doc = "Write '1' to enable interrupt for event CH4LIMITL\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum CH4LIMITL_AW { - #[doc = "1: Enable"] - SET = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: CH4LIMITL_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `CH4LIMITL` writer - Write '1' to enable interrupt for event CH4LIMITL"] -pub type CH4LIMITL_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENSET_SPEC, CH4LIMITL_AW, O>; -impl<'a, const O: u8> CH4LIMITL_W<'a, O> { - #[doc = "Enable"] - #[inline(always)] - pub fn set(self) -> &'a mut W { - self.variant(CH4LIMITL_AW::SET) - } -} -#[doc = "Field `CH5LIMITH` reader - Write '1' to enable interrupt for event CH5LIMITH"] -pub type CH5LIMITH_R = crate::BitReader; -#[doc = "Write '1' to enable interrupt for event CH5LIMITH\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum CH5LIMITH_A { - #[doc = "0: Read: Disabled"] - DISABLED = 0, - #[doc = "1: Read: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: CH5LIMITH_A) -> Self { - variant as u8 != 0 - } -} -impl CH5LIMITH_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> CH5LIMITH_A { - match self.bits { - false => CH5LIMITH_A::DISABLED, - true => CH5LIMITH_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == CH5LIMITH_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == CH5LIMITH_A::ENABLED - } -} -#[doc = "Write '1' to enable interrupt for event CH5LIMITH\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum CH5LIMITH_AW { - #[doc = "1: Enable"] - SET = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: CH5LIMITH_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `CH5LIMITH` writer - Write '1' to enable interrupt for event CH5LIMITH"] -pub type CH5LIMITH_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENSET_SPEC, CH5LIMITH_AW, O>; -impl<'a, const O: u8> CH5LIMITH_W<'a, O> { - #[doc = "Enable"] - #[inline(always)] - pub fn set(self) -> &'a mut W { - self.variant(CH5LIMITH_AW::SET) - } -} -#[doc = "Field `CH5LIMITL` reader - Write '1' to enable interrupt for event CH5LIMITL"] -pub type CH5LIMITL_R = crate::BitReader; -#[doc = "Write '1' to enable interrupt for event CH5LIMITL\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum CH5LIMITL_A { - #[doc = "0: Read: Disabled"] - DISABLED = 0, - #[doc = "1: Read: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: CH5LIMITL_A) -> Self { - variant as u8 != 0 - } -} -impl CH5LIMITL_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> CH5LIMITL_A { - match self.bits { - false => CH5LIMITL_A::DISABLED, - true => CH5LIMITL_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == CH5LIMITL_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == CH5LIMITL_A::ENABLED - } -} -#[doc = "Write '1' to enable interrupt for event CH5LIMITL\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum CH5LIMITL_AW { - #[doc = "1: Enable"] - SET = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: CH5LIMITL_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `CH5LIMITL` writer - Write '1' to enable interrupt for event CH5LIMITL"] -pub type CH5LIMITL_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENSET_SPEC, CH5LIMITL_AW, O>; -impl<'a, const O: u8> CH5LIMITL_W<'a, O> { - #[doc = "Enable"] - #[inline(always)] - pub fn set(self) -> &'a mut W { - self.variant(CH5LIMITL_AW::SET) - } -} -#[doc = "Field `CH6LIMITH` reader - Write '1' to enable interrupt for event CH6LIMITH"] -pub type CH6LIMITH_R = crate::BitReader; -#[doc = "Write '1' to enable interrupt for event CH6LIMITH\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum CH6LIMITH_A { - #[doc = "0: Read: Disabled"] - DISABLED = 0, - #[doc = "1: Read: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: CH6LIMITH_A) -> Self { - variant as u8 != 0 - } -} -impl CH6LIMITH_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> CH6LIMITH_A { - match self.bits { - false => CH6LIMITH_A::DISABLED, - true => CH6LIMITH_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == CH6LIMITH_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == CH6LIMITH_A::ENABLED - } -} -#[doc = "Write '1' to enable interrupt for event CH6LIMITH\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum CH6LIMITH_AW { - #[doc = "1: Enable"] - SET = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: CH6LIMITH_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `CH6LIMITH` writer - Write '1' to enable interrupt for event CH6LIMITH"] -pub type CH6LIMITH_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENSET_SPEC, CH6LIMITH_AW, O>; -impl<'a, const O: u8> CH6LIMITH_W<'a, O> { - #[doc = "Enable"] - #[inline(always)] - pub fn set(self) -> &'a mut W { - self.variant(CH6LIMITH_AW::SET) - } -} -#[doc = "Field `CH6LIMITL` reader - Write '1' to enable interrupt for event CH6LIMITL"] -pub type CH6LIMITL_R = crate::BitReader; -#[doc = "Write '1' to enable interrupt for event CH6LIMITL\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum CH6LIMITL_A { - #[doc = "0: Read: Disabled"] - DISABLED = 0, - #[doc = "1: Read: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: CH6LIMITL_A) -> Self { - variant as u8 != 0 - } -} -impl CH6LIMITL_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> CH6LIMITL_A { - match self.bits { - false => CH6LIMITL_A::DISABLED, - true => CH6LIMITL_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == CH6LIMITL_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == CH6LIMITL_A::ENABLED - } -} -#[doc = "Write '1' to enable interrupt for event CH6LIMITL\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum CH6LIMITL_AW { - #[doc = "1: Enable"] - SET = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: CH6LIMITL_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `CH6LIMITL` writer - Write '1' to enable interrupt for event CH6LIMITL"] -pub type CH6LIMITL_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENSET_SPEC, CH6LIMITL_AW, O>; -impl<'a, const O: u8> CH6LIMITL_W<'a, O> { - #[doc = "Enable"] - #[inline(always)] - pub fn set(self) -> &'a mut W { - self.variant(CH6LIMITL_AW::SET) - } -} -#[doc = "Field `CH7LIMITH` reader - Write '1' to enable interrupt for event CH7LIMITH"] -pub type CH7LIMITH_R = crate::BitReader; -#[doc = "Write '1' to enable interrupt for event CH7LIMITH\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum CH7LIMITH_A { - #[doc = "0: Read: Disabled"] - DISABLED = 0, - #[doc = "1: Read: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: CH7LIMITH_A) -> Self { - variant as u8 != 0 - } -} -impl CH7LIMITH_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> CH7LIMITH_A { - match self.bits { - false => CH7LIMITH_A::DISABLED, - true => CH7LIMITH_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == CH7LIMITH_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == CH7LIMITH_A::ENABLED - } -} -#[doc = "Write '1' to enable interrupt for event CH7LIMITH\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum CH7LIMITH_AW { - #[doc = "1: Enable"] - SET = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: CH7LIMITH_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `CH7LIMITH` writer - Write '1' to enable interrupt for event CH7LIMITH"] -pub type CH7LIMITH_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENSET_SPEC, CH7LIMITH_AW, O>; -impl<'a, const O: u8> CH7LIMITH_W<'a, O> { - #[doc = "Enable"] - #[inline(always)] - pub fn set(self) -> &'a mut W { - self.variant(CH7LIMITH_AW::SET) - } -} -#[doc = "Field `CH7LIMITL` reader - Write '1' to enable interrupt for event CH7LIMITL"] -pub type CH7LIMITL_R = crate::BitReader; -#[doc = "Write '1' to enable interrupt for event CH7LIMITL\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum CH7LIMITL_A { - #[doc = "0: Read: Disabled"] - DISABLED = 0, - #[doc = "1: Read: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: CH7LIMITL_A) -> Self { - variant as u8 != 0 - } -} -impl CH7LIMITL_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> CH7LIMITL_A { - match self.bits { - false => CH7LIMITL_A::DISABLED, - true => CH7LIMITL_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == CH7LIMITL_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == CH7LIMITL_A::ENABLED - } -} -#[doc = "Write '1' to enable interrupt for event CH7LIMITL\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum CH7LIMITL_AW { - #[doc = "1: Enable"] - SET = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: CH7LIMITL_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `CH7LIMITL` writer - Write '1' to enable interrupt for event CH7LIMITL"] -pub type CH7LIMITL_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENSET_SPEC, CH7LIMITL_AW, O>; -impl<'a, const O: u8> CH7LIMITL_W<'a, O> { - #[doc = "Enable"] - #[inline(always)] - pub fn set(self) -> &'a mut W { - self.variant(CH7LIMITL_AW::SET) - } -} -impl R { - #[doc = "Bit 0 - Write '1' to enable interrupt for event STARTED"] - #[inline(always)] - pub fn started(&self) -> STARTED_R { - STARTED_R::new((self.bits & 1) != 0) - } - #[doc = "Bit 1 - Write '1' to enable interrupt for event END"] - #[inline(always)] - pub fn end(&self) -> END_R { - END_R::new(((self.bits >> 1) & 1) != 0) - } - #[doc = "Bit 2 - Write '1' to enable interrupt for event DONE"] - #[inline(always)] - pub fn done(&self) -> DONE_R { - DONE_R::new(((self.bits >> 2) & 1) != 0) - } - #[doc = "Bit 3 - Write '1' to enable interrupt for event RESULTDONE"] - #[inline(always)] - pub fn resultdone(&self) -> RESULTDONE_R { - RESULTDONE_R::new(((self.bits >> 3) & 1) != 0) - } - #[doc = "Bit 4 - Write '1' to enable interrupt for event CALIBRATEDONE"] - #[inline(always)] - pub fn calibratedone(&self) -> CALIBRATEDONE_R { - CALIBRATEDONE_R::new(((self.bits >> 4) & 1) != 0) - } - #[doc = "Bit 5 - Write '1' to enable interrupt for event STOPPED"] - #[inline(always)] - pub fn stopped(&self) -> STOPPED_R { - STOPPED_R::new(((self.bits >> 5) & 1) != 0) - } - #[doc = "Bit 6 - Write '1' to enable interrupt for event CH0LIMITH"] - #[inline(always)] - pub fn ch0limith(&self) -> CH0LIMITH_R { - CH0LIMITH_R::new(((self.bits >> 6) & 1) != 0) - } - #[doc = "Bit 7 - Write '1' to enable interrupt for event CH0LIMITL"] - #[inline(always)] - pub fn ch0limitl(&self) -> CH0LIMITL_R { - CH0LIMITL_R::new(((self.bits >> 7) & 1) != 0) - } - #[doc = "Bit 8 - Write '1' to enable interrupt for event CH1LIMITH"] - #[inline(always)] - pub fn ch1limith(&self) -> CH1LIMITH_R { - CH1LIMITH_R::new(((self.bits >> 8) & 1) != 0) - } - #[doc = "Bit 9 - Write '1' to enable interrupt for event CH1LIMITL"] - #[inline(always)] - pub fn ch1limitl(&self) -> CH1LIMITL_R { - CH1LIMITL_R::new(((self.bits >> 9) & 1) != 0) - } - #[doc = "Bit 10 - Write '1' to enable interrupt for event CH2LIMITH"] - #[inline(always)] - pub fn ch2limith(&self) -> CH2LIMITH_R { - CH2LIMITH_R::new(((self.bits >> 10) & 1) != 0) - } - #[doc = "Bit 11 - Write '1' to enable interrupt for event CH2LIMITL"] - #[inline(always)] - pub fn ch2limitl(&self) -> CH2LIMITL_R { - CH2LIMITL_R::new(((self.bits >> 11) & 1) != 0) - } - #[doc = "Bit 12 - Write '1' to enable interrupt for event CH3LIMITH"] - #[inline(always)] - pub fn ch3limith(&self) -> CH3LIMITH_R { - CH3LIMITH_R::new(((self.bits >> 12) & 1) != 0) - } - #[doc = "Bit 13 - Write '1' to enable interrupt for event CH3LIMITL"] - #[inline(always)] - pub fn ch3limitl(&self) -> CH3LIMITL_R { - CH3LIMITL_R::new(((self.bits >> 13) & 1) != 0) - } - #[doc = "Bit 14 - Write '1' to enable interrupt for event CH4LIMITH"] - #[inline(always)] - pub fn ch4limith(&self) -> CH4LIMITH_R { - CH4LIMITH_R::new(((self.bits >> 14) & 1) != 0) - } - #[doc = "Bit 15 - Write '1' to enable interrupt for event CH4LIMITL"] - #[inline(always)] - pub fn ch4limitl(&self) -> CH4LIMITL_R { - CH4LIMITL_R::new(((self.bits >> 15) & 1) != 0) - } - #[doc = "Bit 16 - Write '1' to enable interrupt for event CH5LIMITH"] - #[inline(always)] - pub fn ch5limith(&self) -> CH5LIMITH_R { - CH5LIMITH_R::new(((self.bits >> 16) & 1) != 0) - } - #[doc = "Bit 17 - Write '1' to enable interrupt for event CH5LIMITL"] - #[inline(always)] - pub fn ch5limitl(&self) -> CH5LIMITL_R { - CH5LIMITL_R::new(((self.bits >> 17) & 1) != 0) - } - #[doc = "Bit 18 - Write '1' to enable interrupt for event CH6LIMITH"] - #[inline(always)] - pub fn ch6limith(&self) -> CH6LIMITH_R { - CH6LIMITH_R::new(((self.bits >> 18) & 1) != 0) - } - #[doc = "Bit 19 - Write '1' to enable interrupt for event CH6LIMITL"] - #[inline(always)] - pub fn ch6limitl(&self) -> CH6LIMITL_R { - CH6LIMITL_R::new(((self.bits >> 19) & 1) != 0) - } - #[doc = "Bit 20 - Write '1' to enable interrupt for event CH7LIMITH"] - #[inline(always)] - pub fn ch7limith(&self) -> CH7LIMITH_R { - CH7LIMITH_R::new(((self.bits >> 20) & 1) != 0) - } - #[doc = "Bit 21 - Write '1' to enable interrupt for event CH7LIMITL"] - #[inline(always)] - pub fn ch7limitl(&self) -> CH7LIMITL_R { - CH7LIMITL_R::new(((self.bits >> 21) & 1) != 0) - } -} -impl W { - #[doc = "Bit 0 - Write '1' to enable interrupt for event STARTED"] - #[inline(always)] - #[must_use] - pub fn started(&mut self) -> STARTED_W<0> { - STARTED_W::new(self) - } - #[doc = "Bit 1 - Write '1' to enable interrupt for event END"] - #[inline(always)] - #[must_use] - pub fn end(&mut self) -> END_W<1> { - END_W::new(self) - } - #[doc = "Bit 2 - Write '1' to enable interrupt for event DONE"] - #[inline(always)] - #[must_use] - pub fn done(&mut self) -> DONE_W<2> { - DONE_W::new(self) - } - #[doc = "Bit 3 - Write '1' to enable interrupt for event RESULTDONE"] - #[inline(always)] - #[must_use] - pub fn resultdone(&mut self) -> RESULTDONE_W<3> { - RESULTDONE_W::new(self) - } - #[doc = "Bit 4 - Write '1' to enable interrupt for event CALIBRATEDONE"] - #[inline(always)] - #[must_use] - pub fn calibratedone(&mut self) -> CALIBRATEDONE_W<4> { - CALIBRATEDONE_W::new(self) - } - #[doc = "Bit 5 - Write '1' to enable interrupt for event STOPPED"] - #[inline(always)] - #[must_use] - pub fn stopped(&mut self) -> STOPPED_W<5> { - STOPPED_W::new(self) - } - #[doc = "Bit 6 - Write '1' to enable interrupt for event CH0LIMITH"] - #[inline(always)] - #[must_use] - pub fn ch0limith(&mut self) -> CH0LIMITH_W<6> { - CH0LIMITH_W::new(self) - } - #[doc = "Bit 7 - Write '1' to enable interrupt for event CH0LIMITL"] - #[inline(always)] - #[must_use] - pub fn ch0limitl(&mut self) -> CH0LIMITL_W<7> { - CH0LIMITL_W::new(self) - } - #[doc = "Bit 8 - Write '1' to enable interrupt for event CH1LIMITH"] - #[inline(always)] - #[must_use] - pub fn ch1limith(&mut self) -> CH1LIMITH_W<8> { - CH1LIMITH_W::new(self) - } - #[doc = "Bit 9 - Write '1' to enable interrupt for event CH1LIMITL"] - #[inline(always)] - #[must_use] - pub fn ch1limitl(&mut self) -> CH1LIMITL_W<9> { - CH1LIMITL_W::new(self) - } - #[doc = "Bit 10 - Write '1' to enable interrupt for event CH2LIMITH"] - #[inline(always)] - #[must_use] - pub fn ch2limith(&mut self) -> CH2LIMITH_W<10> { - CH2LIMITH_W::new(self) - } - #[doc = "Bit 11 - Write '1' to enable interrupt for event CH2LIMITL"] - #[inline(always)] - #[must_use] - pub fn ch2limitl(&mut self) -> CH2LIMITL_W<11> { - CH2LIMITL_W::new(self) - } - #[doc = "Bit 12 - Write '1' to enable interrupt for event CH3LIMITH"] - #[inline(always)] - #[must_use] - pub fn ch3limith(&mut self) -> CH3LIMITH_W<12> { - CH3LIMITH_W::new(self) - } - #[doc = "Bit 13 - Write '1' to enable interrupt for event CH3LIMITL"] - #[inline(always)] - #[must_use] - pub fn ch3limitl(&mut self) -> CH3LIMITL_W<13> { - CH3LIMITL_W::new(self) - } - #[doc = "Bit 14 - Write '1' to enable interrupt for event CH4LIMITH"] - #[inline(always)] - #[must_use] - pub fn ch4limith(&mut self) -> CH4LIMITH_W<14> { - CH4LIMITH_W::new(self) - } - #[doc = "Bit 15 - Write '1' to enable interrupt for event CH4LIMITL"] - #[inline(always)] - #[must_use] - pub fn ch4limitl(&mut self) -> CH4LIMITL_W<15> { - CH4LIMITL_W::new(self) - } - #[doc = "Bit 16 - Write '1' to enable interrupt for event CH5LIMITH"] - #[inline(always)] - #[must_use] - pub fn ch5limith(&mut self) -> CH5LIMITH_W<16> { - CH5LIMITH_W::new(self) - } - #[doc = "Bit 17 - Write '1' to enable interrupt for event CH5LIMITL"] - #[inline(always)] - #[must_use] - pub fn ch5limitl(&mut self) -> CH5LIMITL_W<17> { - CH5LIMITL_W::new(self) - } - #[doc = "Bit 18 - Write '1' to enable interrupt for event CH6LIMITH"] - #[inline(always)] - #[must_use] - pub fn ch6limith(&mut self) -> CH6LIMITH_W<18> { - CH6LIMITH_W::new(self) - } - #[doc = "Bit 19 - Write '1' to enable interrupt for event CH6LIMITL"] - #[inline(always)] - #[must_use] - pub fn ch6limitl(&mut self) -> CH6LIMITL_W<19> { - CH6LIMITL_W::new(self) - } - #[doc = "Bit 20 - Write '1' to enable interrupt for event CH7LIMITH"] - #[inline(always)] - #[must_use] - pub fn ch7limith(&mut self) -> CH7LIMITH_W<20> { - CH7LIMITH_W::new(self) - } - #[doc = "Bit 21 - Write '1' to enable interrupt for event CH7LIMITL"] - #[inline(always)] - #[must_use] - pub fn ch7limitl(&mut self) -> CH7LIMITL_W<21> { - CH7LIMITL_W::new(self) - } - #[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 = "Enable interrupt\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 [intenset](index.html) module"] -pub struct INTENSET_SPEC; -impl crate::RegisterSpec for INTENSET_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [intenset::R](R) reader structure"] -impl crate::Readable for INTENSET_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [intenset::W](W) writer structure"] -impl crate::Writable for INTENSET_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets INTENSET to value 0"] -impl crate::Resettable for INTENSET_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/saadc/oversample.rs b/down-the-stack/dk_pac/src/saadc/oversample.rs deleted file mode 100644 index 7162dcf..0000000 --- a/down-the-stack/dk_pac/src/saadc/oversample.rs +++ /dev/null @@ -1,220 +0,0 @@ -#[doc = "Register `OVERSAMPLE` 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 `OVERSAMPLE` 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 `OVERSAMPLE` reader - Oversample control"] -pub type OVERSAMPLE_R = crate::FieldReader; -#[doc = "Oversample control\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -#[repr(u8)] -pub enum OVERSAMPLE_A { - #[doc = "0: Bypass oversampling"] - BYPASS = 0, - #[doc = "1: Oversample 2x"] - OVER2X = 1, - #[doc = "2: Oversample 4x"] - OVER4X = 2, - #[doc = "3: Oversample 8x"] - OVER8X = 3, - #[doc = "4: Oversample 16x"] - OVER16X = 4, - #[doc = "5: Oversample 32x"] - OVER32X = 5, - #[doc = "6: Oversample 64x"] - OVER64X = 6, - #[doc = "7: Oversample 128x"] - OVER128X = 7, - #[doc = "8: Oversample 256x"] - OVER256X = 8, -} -impl From for u8 { - #[inline(always)] - fn from(variant: OVERSAMPLE_A) -> Self { - variant as _ - } -} -impl OVERSAMPLE_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> Option { - match self.bits { - 0 => Some(OVERSAMPLE_A::BYPASS), - 1 => Some(OVERSAMPLE_A::OVER2X), - 2 => Some(OVERSAMPLE_A::OVER4X), - 3 => Some(OVERSAMPLE_A::OVER8X), - 4 => Some(OVERSAMPLE_A::OVER16X), - 5 => Some(OVERSAMPLE_A::OVER32X), - 6 => Some(OVERSAMPLE_A::OVER64X), - 7 => Some(OVERSAMPLE_A::OVER128X), - 8 => Some(OVERSAMPLE_A::OVER256X), - _ => None, - } - } - #[doc = "Checks if the value of the field is `BYPASS`"] - #[inline(always)] - pub fn is_bypass(&self) -> bool { - *self == OVERSAMPLE_A::BYPASS - } - #[doc = "Checks if the value of the field is `OVER2X`"] - #[inline(always)] - pub fn is_over2x(&self) -> bool { - *self == OVERSAMPLE_A::OVER2X - } - #[doc = "Checks if the value of the field is `OVER4X`"] - #[inline(always)] - pub fn is_over4x(&self) -> bool { - *self == OVERSAMPLE_A::OVER4X - } - #[doc = "Checks if the value of the field is `OVER8X`"] - #[inline(always)] - pub fn is_over8x(&self) -> bool { - *self == OVERSAMPLE_A::OVER8X - } - #[doc = "Checks if the value of the field is `OVER16X`"] - #[inline(always)] - pub fn is_over16x(&self) -> bool { - *self == OVERSAMPLE_A::OVER16X - } - #[doc = "Checks if the value of the field is `OVER32X`"] - #[inline(always)] - pub fn is_over32x(&self) -> bool { - *self == OVERSAMPLE_A::OVER32X - } - #[doc = "Checks if the value of the field is `OVER64X`"] - #[inline(always)] - pub fn is_over64x(&self) -> bool { - *self == OVERSAMPLE_A::OVER64X - } - #[doc = "Checks if the value of the field is `OVER128X`"] - #[inline(always)] - pub fn is_over128x(&self) -> bool { - *self == OVERSAMPLE_A::OVER128X - } - #[doc = "Checks if the value of the field is `OVER256X`"] - #[inline(always)] - pub fn is_over256x(&self) -> bool { - *self == OVERSAMPLE_A::OVER256X - } -} -#[doc = "Field `OVERSAMPLE` writer - Oversample control"] -pub type OVERSAMPLE_W<'a, const O: u8> = - crate::FieldWriter<'a, u32, OVERSAMPLE_SPEC, u8, OVERSAMPLE_A, 4, O>; -impl<'a, const O: u8> OVERSAMPLE_W<'a, O> { - #[doc = "Bypass oversampling"] - #[inline(always)] - pub fn bypass(self) -> &'a mut W { - self.variant(OVERSAMPLE_A::BYPASS) - } - #[doc = "Oversample 2x"] - #[inline(always)] - pub fn over2x(self) -> &'a mut W { - self.variant(OVERSAMPLE_A::OVER2X) - } - #[doc = "Oversample 4x"] - #[inline(always)] - pub fn over4x(self) -> &'a mut W { - self.variant(OVERSAMPLE_A::OVER4X) - } - #[doc = "Oversample 8x"] - #[inline(always)] - pub fn over8x(self) -> &'a mut W { - self.variant(OVERSAMPLE_A::OVER8X) - } - #[doc = "Oversample 16x"] - #[inline(always)] - pub fn over16x(self) -> &'a mut W { - self.variant(OVERSAMPLE_A::OVER16X) - } - #[doc = "Oversample 32x"] - #[inline(always)] - pub fn over32x(self) -> &'a mut W { - self.variant(OVERSAMPLE_A::OVER32X) - } - #[doc = "Oversample 64x"] - #[inline(always)] - pub fn over64x(self) -> &'a mut W { - self.variant(OVERSAMPLE_A::OVER64X) - } - #[doc = "Oversample 128x"] - #[inline(always)] - pub fn over128x(self) -> &'a mut W { - self.variant(OVERSAMPLE_A::OVER128X) - } - #[doc = "Oversample 256x"] - #[inline(always)] - pub fn over256x(self) -> &'a mut W { - self.variant(OVERSAMPLE_A::OVER256X) - } -} -impl R { - #[doc = "Bits 0:3 - Oversample control"] - #[inline(always)] - pub fn oversample(&self) -> OVERSAMPLE_R { - OVERSAMPLE_R::new((self.bits & 0x0f) as u8) - } -} -impl W { - #[doc = "Bits 0:3 - Oversample control"] - #[inline(always)] - #[must_use] - pub fn oversample(&mut self) -> OVERSAMPLE_W<0> { - OVERSAMPLE_W::new(self) - } - #[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 = "Oversampling configuration. OVERSAMPLE should not be combined with SCAN. The RESOLUTION is applied before averaging, thus for high OVERSAMPLE a higher RESOLUTION should be used.\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 [oversample](index.html) module"] -pub struct OVERSAMPLE_SPEC; -impl crate::RegisterSpec for OVERSAMPLE_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [oversample::R](R) reader structure"] -impl crate::Readable for OVERSAMPLE_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [oversample::W](W) writer structure"] -impl crate::Writable for OVERSAMPLE_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets OVERSAMPLE to value 0"] -impl crate::Resettable for OVERSAMPLE_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/saadc/resolution.rs b/down-the-stack/dk_pac/src/saadc/resolution.rs deleted file mode 100644 index b811b06..0000000 --- a/down-the-stack/dk_pac/src/saadc/resolution.rs +++ /dev/null @@ -1,154 +0,0 @@ -#[doc = "Register `RESOLUTION` 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 `RESOLUTION` 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 `VAL` reader - Set the resolution"] -pub type VAL_R = crate::FieldReader; -#[doc = "Set the resolution\n\nValue on reset: 1"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -#[repr(u8)] -pub enum VAL_A { - #[doc = "0: 8 bit"] - _8BIT = 0, - #[doc = "1: 10 bit"] - _10BIT = 1, - #[doc = "2: 12 bit"] - _12BIT = 2, - #[doc = "3: 14 bit"] - _14BIT = 3, -} -impl From for u8 { - #[inline(always)] - fn from(variant: VAL_A) -> Self { - variant as _ - } -} -impl VAL_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> Option { - match self.bits { - 0 => Some(VAL_A::_8BIT), - 1 => Some(VAL_A::_10BIT), - 2 => Some(VAL_A::_12BIT), - 3 => Some(VAL_A::_14BIT), - _ => None, - } - } - #[doc = "Checks if the value of the field is `_8BIT`"] - #[inline(always)] - pub fn is_8bit(&self) -> bool { - *self == VAL_A::_8BIT - } - #[doc = "Checks if the value of the field is `_10BIT`"] - #[inline(always)] - pub fn is_10bit(&self) -> bool { - *self == VAL_A::_10BIT - } - #[doc = "Checks if the value of the field is `_12BIT`"] - #[inline(always)] - pub fn is_12bit(&self) -> bool { - *self == VAL_A::_12BIT - } - #[doc = "Checks if the value of the field is `_14BIT`"] - #[inline(always)] - pub fn is_14bit(&self) -> bool { - *self == VAL_A::_14BIT - } -} -#[doc = "Field `VAL` writer - Set the resolution"] -pub type VAL_W<'a, const O: u8> = crate::FieldWriter<'a, u32, RESOLUTION_SPEC, u8, VAL_A, 3, O>; -impl<'a, const O: u8> VAL_W<'a, O> { - #[doc = "8 bit"] - #[inline(always)] - pub fn _8bit(self) -> &'a mut W { - self.variant(VAL_A::_8BIT) - } - #[doc = "10 bit"] - #[inline(always)] - pub fn _10bit(self) -> &'a mut W { - self.variant(VAL_A::_10BIT) - } - #[doc = "12 bit"] - #[inline(always)] - pub fn _12bit(self) -> &'a mut W { - self.variant(VAL_A::_12BIT) - } - #[doc = "14 bit"] - #[inline(always)] - pub fn _14bit(self) -> &'a mut W { - self.variant(VAL_A::_14BIT) - } -} -impl R { - #[doc = "Bits 0:2 - Set the resolution"] - #[inline(always)] - pub fn val(&self) -> VAL_R { - VAL_R::new((self.bits & 7) as u8) - } -} -impl W { - #[doc = "Bits 0:2 - Set the resolution"] - #[inline(always)] - #[must_use] - pub fn val(&mut self) -> VAL_W<0> { - VAL_W::new(self) - } - #[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 = "Resolution configuration\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 [resolution](index.html) module"] -pub struct RESOLUTION_SPEC; -impl crate::RegisterSpec for RESOLUTION_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [resolution::R](R) reader structure"] -impl crate::Readable for RESOLUTION_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [resolution::W](W) writer structure"] -impl crate::Writable for RESOLUTION_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets RESOLUTION to value 0x01"] -impl crate::Resettable for RESOLUTION_SPEC { - const RESET_VALUE: Self::Ux = 0x01; -} diff --git a/down-the-stack/dk_pac/src/saadc/result.rs b/down-the-stack/dk_pac/src/saadc/result.rs deleted file mode 100644 index 719c5f5..0000000 --- a/down-the-stack/dk_pac/src/saadc/result.rs +++ /dev/null @@ -1,22 +0,0 @@ -#[doc = r"Register block"] -#[repr(C)] -pub struct RESULT { - #[doc = "0x00 - Data pointer"] - pub ptr: PTR, - #[doc = "0x04 - Maximum number of buffer words to transfer"] - pub maxcnt: MAXCNT, - #[doc = "0x08 - Number of buffer words transferred since last START"] - pub amount: AMOUNT, -} -#[doc = "PTR (rw) register accessor: an alias for `Reg`"] -pub type PTR = crate::Reg; -#[doc = "Data pointer"] -pub mod ptr; -#[doc = "MAXCNT (rw) register accessor: an alias for `Reg`"] -pub type MAXCNT = crate::Reg; -#[doc = "Maximum number of buffer words to transfer"] -pub mod maxcnt; -#[doc = "AMOUNT (r) register accessor: an alias for `Reg`"] -pub type AMOUNT = crate::Reg; -#[doc = "Number of buffer words transferred since last START"] -pub mod amount; diff --git a/down-the-stack/dk_pac/src/saadc/result/amount.rs b/down-the-stack/dk_pac/src/saadc/result/amount.rs deleted file mode 100644 index cdb00bd..0000000 --- a/down-the-stack/dk_pac/src/saadc/result/amount.rs +++ /dev/null @@ -1,37 +0,0 @@ -#[doc = "Register `AMOUNT` 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 = "Field `AMOUNT` reader - Number of buffer words transferred since last START. This register can be read after an END or STOPPED event."] -pub type AMOUNT_R = crate::FieldReader; -impl R { - #[doc = "Bits 0:14 - Number of buffer words transferred since last START. This register can be read after an END or STOPPED event."] - #[inline(always)] - pub fn amount(&self) -> AMOUNT_R { - AMOUNT_R::new((self.bits & 0x7fff) as u16) - } -} -#[doc = "Number of buffer words transferred since last START\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 [amount](index.html) module"] -pub struct AMOUNT_SPEC; -impl crate::RegisterSpec for AMOUNT_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [amount::R](R) reader structure"] -impl crate::Readable for AMOUNT_SPEC { - type Reader = R; -} -#[doc = "`reset()` method sets AMOUNT to value 0"] -impl crate::Resettable for AMOUNT_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/saadc/result/maxcnt.rs b/down-the-stack/dk_pac/src/saadc/result/maxcnt.rs deleted file mode 100644 index 4f55922..0000000 --- a/down-the-stack/dk_pac/src/saadc/result/maxcnt.rs +++ /dev/null @@ -1,80 +0,0 @@ -#[doc = "Register `MAXCNT` 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 `MAXCNT` 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 `MAXCNT` reader - Maximum number of buffer words to transfer"] -pub type MAXCNT_R = crate::FieldReader; -#[doc = "Field `MAXCNT` writer - Maximum number of buffer words to transfer"] -pub type MAXCNT_W<'a, const O: u8> = crate::FieldWriter<'a, u32, MAXCNT_SPEC, u16, u16, 15, O>; -impl R { - #[doc = "Bits 0:14 - Maximum number of buffer words to transfer"] - #[inline(always)] - pub fn maxcnt(&self) -> MAXCNT_R { - MAXCNT_R::new((self.bits & 0x7fff) as u16) - } -} -impl W { - #[doc = "Bits 0:14 - Maximum number of buffer words to transfer"] - #[inline(always)] - #[must_use] - pub fn maxcnt(&mut self) -> MAXCNT_W<0> { - MAXCNT_W::new(self) - } - #[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 = "Maximum number of buffer words to transfer\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 [maxcnt](index.html) module"] -pub struct MAXCNT_SPEC; -impl crate::RegisterSpec for MAXCNT_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [maxcnt::R](R) reader structure"] -impl crate::Readable for MAXCNT_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [maxcnt::W](W) writer structure"] -impl crate::Writable for MAXCNT_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets MAXCNT to value 0"] -impl crate::Resettable for MAXCNT_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/saadc/result/ptr.rs b/down-the-stack/dk_pac/src/saadc/result/ptr.rs deleted file mode 100644 index 2f2c926..0000000 --- a/down-the-stack/dk_pac/src/saadc/result/ptr.rs +++ /dev/null @@ -1,80 +0,0 @@ -#[doc = "Register `PTR` 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 `PTR` 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 `PTR` reader - Data pointer"] -pub type PTR_R = crate::FieldReader; -#[doc = "Field `PTR` writer - Data pointer"] -pub type PTR_W<'a, const O: u8> = crate::FieldWriter<'a, u32, PTR_SPEC, u32, u32, 32, O>; -impl R { - #[doc = "Bits 0:31 - Data pointer"] - #[inline(always)] - pub fn ptr(&self) -> PTR_R { - PTR_R::new(self.bits) - } -} -impl W { - #[doc = "Bits 0:31 - Data pointer"] - #[inline(always)] - #[must_use] - pub fn ptr(&mut self) -> PTR_W<0> { - PTR_W::new(self) - } - #[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 = "Data pointer\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 [ptr](index.html) module"] -pub struct PTR_SPEC; -impl crate::RegisterSpec for PTR_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [ptr::R](R) reader structure"] -impl crate::Readable for PTR_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [ptr::W](W) writer structure"] -impl crate::Writable for PTR_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets PTR to value 0"] -impl crate::Resettable for PTR_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/saadc/samplerate.rs b/down-the-stack/dk_pac/src/saadc/samplerate.rs deleted file mode 100644 index 403aa98..0000000 --- a/down-the-stack/dk_pac/src/saadc/samplerate.rs +++ /dev/null @@ -1,141 +0,0 @@ -#[doc = "Register `SAMPLERATE` 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 `SAMPLERATE` 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 `CC` reader - Capture and compare value. Sample rate is 16 MHz/CC"] -pub type CC_R = crate::FieldReader; -#[doc = "Field `CC` writer - Capture and compare value. Sample rate is 16 MHz/CC"] -pub type CC_W<'a, const O: u8> = crate::FieldWriter<'a, u32, SAMPLERATE_SPEC, u16, u16, 11, O>; -#[doc = "Field `MODE` reader - Select mode for sample rate control"] -pub type MODE_R = crate::BitReader; -#[doc = "Select mode for sample rate control\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum MODE_A { - #[doc = "0: Rate is controlled from SAMPLE task"] - TASK = 0, - #[doc = "1: Rate is controlled from local timer (use CC to control the rate)"] - TIMERS = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: MODE_A) -> Self { - variant as u8 != 0 - } -} -impl MODE_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> MODE_A { - match self.bits { - false => MODE_A::TASK, - true => MODE_A::TIMERS, - } - } - #[doc = "Checks if the value of the field is `TASK`"] - #[inline(always)] - pub fn is_task(&self) -> bool { - *self == MODE_A::TASK - } - #[doc = "Checks if the value of the field is `TIMERS`"] - #[inline(always)] - pub fn is_timers(&self) -> bool { - *self == MODE_A::TIMERS - } -} -#[doc = "Field `MODE` writer - Select mode for sample rate control"] -pub type MODE_W<'a, const O: u8> = crate::BitWriter<'a, u32, SAMPLERATE_SPEC, MODE_A, O>; -impl<'a, const O: u8> MODE_W<'a, O> { - #[doc = "Rate is controlled from SAMPLE task"] - #[inline(always)] - pub fn task(self) -> &'a mut W { - self.variant(MODE_A::TASK) - } - #[doc = "Rate is controlled from local timer (use CC to control the rate)"] - #[inline(always)] - pub fn timers(self) -> &'a mut W { - self.variant(MODE_A::TIMERS) - } -} -impl R { - #[doc = "Bits 0:10 - Capture and compare value. Sample rate is 16 MHz/CC"] - #[inline(always)] - pub fn cc(&self) -> CC_R { - CC_R::new((self.bits & 0x07ff) as u16) - } - #[doc = "Bit 12 - Select mode for sample rate control"] - #[inline(always)] - pub fn mode(&self) -> MODE_R { - MODE_R::new(((self.bits >> 12) & 1) != 0) - } -} -impl W { - #[doc = "Bits 0:10 - Capture and compare value. Sample rate is 16 MHz/CC"] - #[inline(always)] - #[must_use] - pub fn cc(&mut self) -> CC_W<0> { - CC_W::new(self) - } - #[doc = "Bit 12 - Select mode for sample rate control"] - #[inline(always)] - #[must_use] - pub fn mode(&mut self) -> MODE_W<12> { - 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 - } -} -#[doc = "Controls normal or continuous sample rate\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 [samplerate](index.html) module"] -pub struct SAMPLERATE_SPEC; -impl crate::RegisterSpec for SAMPLERATE_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [samplerate::R](R) reader structure"] -impl crate::Readable for SAMPLERATE_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [samplerate::W](W) writer structure"] -impl crate::Writable for SAMPLERATE_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets SAMPLERATE to value 0"] -impl crate::Resettable for SAMPLERATE_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/saadc/status.rs b/down-the-stack/dk_pac/src/saadc/status.rs deleted file mode 100644 index 467cf57..0000000 --- a/down-the-stack/dk_pac/src/saadc/status.rs +++ /dev/null @@ -1,71 +0,0 @@ -#[doc = "Register `STATUS` 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 = "Field `STATUS` reader - Status"] -pub type STATUS_R = crate::BitReader; -#[doc = "Status\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum STATUS_A { - #[doc = "0: ADC is ready. No on-going conversion."] - READY = 0, - #[doc = "1: ADC is busy. Conversion in progress."] - BUSY = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: STATUS_A) -> Self { - variant as u8 != 0 - } -} -impl STATUS_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> STATUS_A { - match self.bits { - false => STATUS_A::READY, - true => STATUS_A::BUSY, - } - } - #[doc = "Checks if the value of the field is `READY`"] - #[inline(always)] - pub fn is_ready(&self) -> bool { - *self == STATUS_A::READY - } - #[doc = "Checks if the value of the field is `BUSY`"] - #[inline(always)] - pub fn is_busy(&self) -> bool { - *self == STATUS_A::BUSY - } -} -impl R { - #[doc = "Bit 0 - Status"] - #[inline(always)] - pub fn status(&self) -> STATUS_R { - STATUS_R::new((self.bits & 1) != 0) - } -} -#[doc = "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 [status](index.html) module"] -pub struct STATUS_SPEC; -impl crate::RegisterSpec for STATUS_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [status::R](R) reader structure"] -impl crate::Readable for STATUS_SPEC { - type Reader = R; -} -#[doc = "`reset()` method sets STATUS to value 0"] -impl crate::Resettable for STATUS_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/saadc/tasks_calibrateoffset.rs b/down-the-stack/dk_pac/src/saadc/tasks_calibrateoffset.rs deleted file mode 100644 index e616dab..0000000 --- a/down-the-stack/dk_pac/src/saadc/tasks_calibrateoffset.rs +++ /dev/null @@ -1,72 +0,0 @@ -#[doc = "Register `TASKS_CALIBRATEOFFSET` 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 = "Starts offset auto-calibration\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum TASKS_CALIBRATEOFFSET_AW { - #[doc = "1: Trigger task"] - TRIGGER = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: TASKS_CALIBRATEOFFSET_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `TASKS_CALIBRATEOFFSET` writer - Starts offset auto-calibration"] -pub type TASKS_CALIBRATEOFFSET_W<'a, const O: u8> = - crate::BitWriter<'a, u32, TASKS_CALIBRATEOFFSET_SPEC, TASKS_CALIBRATEOFFSET_AW, O>; -impl<'a, const O: u8> TASKS_CALIBRATEOFFSET_W<'a, O> { - #[doc = "Trigger task"] - #[inline(always)] - pub fn trigger(self) -> &'a mut W { - self.variant(TASKS_CALIBRATEOFFSET_AW::TRIGGER) - } -} -impl W { - #[doc = "Bit 0 - Starts offset auto-calibration"] - #[inline(always)] - #[must_use] - pub fn tasks_calibrateoffset(&mut self) -> TASKS_CALIBRATEOFFSET_W<0> { - TASKS_CALIBRATEOFFSET_W::new(self) - } - #[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 = "Starts offset auto-calibration\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 [tasks_calibrateoffset](index.html) module"] -pub struct TASKS_CALIBRATEOFFSET_SPEC; -impl crate::RegisterSpec for TASKS_CALIBRATEOFFSET_SPEC { - type Ux = u32; -} -#[doc = "`write(|w| ..)` method takes [tasks_calibrateoffset::W](W) writer structure"] -impl crate::Writable for TASKS_CALIBRATEOFFSET_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets TASKS_CALIBRATEOFFSET to value 0"] -impl crate::Resettable for TASKS_CALIBRATEOFFSET_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/saadc/tasks_sample.rs b/down-the-stack/dk_pac/src/saadc/tasks_sample.rs deleted file mode 100644 index 8e802ca..0000000 --- a/down-the-stack/dk_pac/src/saadc/tasks_sample.rs +++ /dev/null @@ -1,72 +0,0 @@ -#[doc = "Register `TASKS_SAMPLE` 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 = "Take one ADC sample, if scan is enabled all channels are sampled\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum TASKS_SAMPLE_AW { - #[doc = "1: Trigger task"] - TRIGGER = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: TASKS_SAMPLE_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `TASKS_SAMPLE` writer - Take one ADC sample, if scan is enabled all channels are sampled"] -pub type TASKS_SAMPLE_W<'a, const O: u8> = - crate::BitWriter<'a, u32, TASKS_SAMPLE_SPEC, TASKS_SAMPLE_AW, O>; -impl<'a, const O: u8> TASKS_SAMPLE_W<'a, O> { - #[doc = "Trigger task"] - #[inline(always)] - pub fn trigger(self) -> &'a mut W { - self.variant(TASKS_SAMPLE_AW::TRIGGER) - } -} -impl W { - #[doc = "Bit 0 - Take one ADC sample, if scan is enabled all channels are sampled"] - #[inline(always)] - #[must_use] - pub fn tasks_sample(&mut self) -> TASKS_SAMPLE_W<0> { - TASKS_SAMPLE_W::new(self) - } - #[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 = "Take one ADC sample, if scan is enabled all channels are sampled\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 [tasks_sample](index.html) module"] -pub struct TASKS_SAMPLE_SPEC; -impl crate::RegisterSpec for TASKS_SAMPLE_SPEC { - type Ux = u32; -} -#[doc = "`write(|w| ..)` method takes [tasks_sample::W](W) writer structure"] -impl crate::Writable for TASKS_SAMPLE_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets TASKS_SAMPLE to value 0"] -impl crate::Resettable for TASKS_SAMPLE_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/saadc/tasks_start.rs b/down-the-stack/dk_pac/src/saadc/tasks_start.rs deleted file mode 100644 index 5a628b3..0000000 --- a/down-the-stack/dk_pac/src/saadc/tasks_start.rs +++ /dev/null @@ -1,72 +0,0 @@ -#[doc = "Register `TASKS_START` 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 = "Start the ADC and prepare the result buffer in RAM\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum TASKS_START_AW { - #[doc = "1: Trigger task"] - TRIGGER = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: TASKS_START_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `TASKS_START` writer - Start the ADC and prepare the result buffer in RAM"] -pub type TASKS_START_W<'a, const O: u8> = - crate::BitWriter<'a, u32, TASKS_START_SPEC, TASKS_START_AW, O>; -impl<'a, const O: u8> TASKS_START_W<'a, O> { - #[doc = "Trigger task"] - #[inline(always)] - pub fn trigger(self) -> &'a mut W { - self.variant(TASKS_START_AW::TRIGGER) - } -} -impl W { - #[doc = "Bit 0 - Start the ADC and prepare the result buffer in RAM"] - #[inline(always)] - #[must_use] - pub fn tasks_start(&mut self) -> TASKS_START_W<0> { - TASKS_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 - } -} -#[doc = "Start the ADC and prepare the result buffer in RAM\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 [tasks_start](index.html) module"] -pub struct TASKS_START_SPEC; -impl crate::RegisterSpec for TASKS_START_SPEC { - type Ux = u32; -} -#[doc = "`write(|w| ..)` method takes [tasks_start::W](W) writer structure"] -impl crate::Writable for TASKS_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 TASKS_START to value 0"] -impl crate::Resettable for TASKS_START_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/saadc/tasks_stop.rs b/down-the-stack/dk_pac/src/saadc/tasks_stop.rs deleted file mode 100644 index 4c4d298..0000000 --- a/down-the-stack/dk_pac/src/saadc/tasks_stop.rs +++ /dev/null @@ -1,72 +0,0 @@ -#[doc = "Register `TASKS_STOP` 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 = "Stop the ADC and terminate any on-going conversion\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum TASKS_STOP_AW { - #[doc = "1: Trigger task"] - TRIGGER = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: TASKS_STOP_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `TASKS_STOP` writer - Stop the ADC and terminate any on-going conversion"] -pub type TASKS_STOP_W<'a, const O: u8> = - crate::BitWriter<'a, u32, TASKS_STOP_SPEC, TASKS_STOP_AW, O>; -impl<'a, const O: u8> TASKS_STOP_W<'a, O> { - #[doc = "Trigger task"] - #[inline(always)] - pub fn trigger(self) -> &'a mut W { - self.variant(TASKS_STOP_AW::TRIGGER) - } -} -impl W { - #[doc = "Bit 0 - Stop the ADC and terminate any on-going conversion"] - #[inline(always)] - #[must_use] - pub fn tasks_stop(&mut self) -> TASKS_STOP_W<0> { - TASKS_STOP_W::new(self) - } - #[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 = "Stop the ADC and terminate any on-going conversion\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 [tasks_stop](index.html) module"] -pub struct TASKS_STOP_SPEC; -impl crate::RegisterSpec for TASKS_STOP_SPEC { - type Ux = u32; -} -#[doc = "`write(|w| ..)` method takes [tasks_stop::W](W) writer structure"] -impl crate::Writable for TASKS_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 TASKS_STOP to value 0"] -impl crate::Resettable for TASKS_STOP_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/spi0.rs b/down-the-stack/dk_pac/src/spi0.rs deleted file mode 100644 index 1a1b3d0..0000000 --- a/down-the-stack/dk_pac/src/spi0.rs +++ /dev/null @@ -1,66 +0,0 @@ -#[doc = r"Register block"] -#[repr(C)] -pub struct RegisterBlock { - _reserved0: [u8; 0x0108], - #[doc = "0x108 - TXD byte sent and RXD byte received"] - pub events_ready: EVENTS_READY, - _reserved1: [u8; 0x01f8], - #[doc = "0x304 - Enable interrupt"] - pub intenset: INTENSET, - #[doc = "0x308 - Disable interrupt"] - pub intenclr: INTENCLR, - _reserved3: [u8; 0x01f4], - #[doc = "0x500 - Enable SPI"] - pub enable: ENABLE, - _reserved4: [u8; 0x04], - #[doc = "0x508..0x514 - Unspecified"] - pub psel: PSEL, - _reserved5: [u8; 0x04], - #[doc = "0x518 - RXD register"] - pub rxd: RXD, - #[doc = "0x51c - TXD register"] - pub txd: TXD, - _reserved7: [u8; 0x04], - #[doc = "0x524 - SPI frequency"] - pub frequency: FREQUENCY, - _reserved8: [u8; 0x2c], - #[doc = "0x554 - Configuration register"] - pub config: CONFIG, -} -#[doc = "EVENTS_READY (rw) register accessor: an alias for `Reg`"] -pub type EVENTS_READY = crate::Reg; -#[doc = "TXD byte sent and RXD byte received"] -pub mod events_ready; -#[doc = "INTENSET (rw) register accessor: an alias for `Reg`"] -pub type INTENSET = crate::Reg; -#[doc = "Enable interrupt"] -pub mod intenset; -#[doc = "INTENCLR (rw) register accessor: an alias for `Reg`"] -pub type INTENCLR = crate::Reg; -#[doc = "Disable interrupt"] -pub mod intenclr; -#[doc = "ENABLE (rw) register accessor: an alias for `Reg`"] -pub type ENABLE = crate::Reg; -#[doc = "Enable SPI"] -pub mod enable; -#[doc = "Unspecified"] -pub use self::psel::PSEL; -#[doc = r"Cluster"] -#[doc = "Unspecified"] -pub mod psel; -#[doc = "RXD (r) register accessor: an alias for `Reg`"] -pub type RXD = crate::Reg; -#[doc = "RXD register"] -pub mod rxd; -#[doc = "TXD (rw) register accessor: an alias for `Reg`"] -pub type TXD = crate::Reg; -#[doc = "TXD register"] -pub mod txd; -#[doc = "FREQUENCY (rw) register accessor: an alias for `Reg`"] -pub type FREQUENCY = crate::Reg; -#[doc = "SPI frequency"] -pub mod frequency; -#[doc = "CONFIG (rw) register accessor: an alias for `Reg`"] -pub type CONFIG = crate::Reg; -#[doc = "Configuration register"] -pub mod config; diff --git a/down-the-stack/dk_pac/src/spi0/config.rs b/down-the-stack/dk_pac/src/spi0/config.rs deleted file mode 100644 index daad954..0000000 --- a/down-the-stack/dk_pac/src/spi0/config.rs +++ /dev/null @@ -1,248 +0,0 @@ -#[doc = "Register `CONFIG` 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 `CONFIG` 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 `ORDER` reader - Bit order"] -pub type ORDER_R = crate::BitReader; -#[doc = "Bit order\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum ORDER_A { - #[doc = "0: Most significant bit shifted out first"] - MSB_FIRST = 0, - #[doc = "1: Least significant bit shifted out first"] - LSB_FIRST = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: ORDER_A) -> Self { - variant as u8 != 0 - } -} -impl ORDER_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> ORDER_A { - match self.bits { - false => ORDER_A::MSB_FIRST, - true => ORDER_A::LSB_FIRST, - } - } - #[doc = "Checks if the value of the field is `MSB_FIRST`"] - #[inline(always)] - pub fn is_msb_first(&self) -> bool { - *self == ORDER_A::MSB_FIRST - } - #[doc = "Checks if the value of the field is `LSB_FIRST`"] - #[inline(always)] - pub fn is_lsb_first(&self) -> bool { - *self == ORDER_A::LSB_FIRST - } -} -#[doc = "Field `ORDER` writer - Bit order"] -pub type ORDER_W<'a, const O: u8> = crate::BitWriter<'a, u32, CONFIG_SPEC, ORDER_A, O>; -impl<'a, const O: u8> ORDER_W<'a, O> { - #[doc = "Most significant bit shifted out first"] - #[inline(always)] - pub fn msb_first(self) -> &'a mut W { - self.variant(ORDER_A::MSB_FIRST) - } - #[doc = "Least significant bit shifted out first"] - #[inline(always)] - pub fn lsb_first(self) -> &'a mut W { - self.variant(ORDER_A::LSB_FIRST) - } -} -#[doc = "Field `CPHA` reader - Serial clock (SCK) phase"] -pub type CPHA_R = crate::BitReader; -#[doc = "Serial clock (SCK) phase\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum CPHA_A { - #[doc = "0: Sample on leading edge of clock, shift serial data on trailing edge"] - LEADING = 0, - #[doc = "1: Sample on trailing edge of clock, shift serial data on leading edge"] - TRAILING = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: CPHA_A) -> Self { - variant as u8 != 0 - } -} -impl CPHA_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> CPHA_A { - match self.bits { - false => CPHA_A::LEADING, - true => CPHA_A::TRAILING, - } - } - #[doc = "Checks if the value of the field is `LEADING`"] - #[inline(always)] - pub fn is_leading(&self) -> bool { - *self == CPHA_A::LEADING - } - #[doc = "Checks if the value of the field is `TRAILING`"] - #[inline(always)] - pub fn is_trailing(&self) -> bool { - *self == CPHA_A::TRAILING - } -} -#[doc = "Field `CPHA` writer - Serial clock (SCK) phase"] -pub type CPHA_W<'a, const O: u8> = crate::BitWriter<'a, u32, CONFIG_SPEC, CPHA_A, O>; -impl<'a, const O: u8> CPHA_W<'a, O> { - #[doc = "Sample on leading edge of clock, shift serial data on trailing edge"] - #[inline(always)] - pub fn leading(self) -> &'a mut W { - self.variant(CPHA_A::LEADING) - } - #[doc = "Sample on trailing edge of clock, shift serial data on leading edge"] - #[inline(always)] - pub fn trailing(self) -> &'a mut W { - self.variant(CPHA_A::TRAILING) - } -} -#[doc = "Field `CPOL` reader - Serial clock (SCK) polarity"] -pub type CPOL_R = crate::BitReader; -#[doc = "Serial clock (SCK) polarity\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum CPOL_A { - #[doc = "0: Active high"] - ACTIVE_HIGH = 0, - #[doc = "1: Active low"] - ACTIVE_LOW = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: CPOL_A) -> Self { - variant as u8 != 0 - } -} -impl CPOL_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> CPOL_A { - match self.bits { - false => CPOL_A::ACTIVE_HIGH, - true => CPOL_A::ACTIVE_LOW, - } - } - #[doc = "Checks if the value of the field is `ACTIVE_HIGH`"] - #[inline(always)] - pub fn is_active_high(&self) -> bool { - *self == CPOL_A::ACTIVE_HIGH - } - #[doc = "Checks if the value of the field is `ACTIVE_LOW`"] - #[inline(always)] - pub fn is_active_low(&self) -> bool { - *self == CPOL_A::ACTIVE_LOW - } -} -#[doc = "Field `CPOL` writer - Serial clock (SCK) polarity"] -pub type CPOL_W<'a, const O: u8> = crate::BitWriter<'a, u32, CONFIG_SPEC, CPOL_A, O>; -impl<'a, const O: u8> CPOL_W<'a, O> { - #[doc = "Active high"] - #[inline(always)] - pub fn active_high(self) -> &'a mut W { - self.variant(CPOL_A::ACTIVE_HIGH) - } - #[doc = "Active low"] - #[inline(always)] - pub fn active_low(self) -> &'a mut W { - self.variant(CPOL_A::ACTIVE_LOW) - } -} -impl R { - #[doc = "Bit 0 - Bit order"] - #[inline(always)] - pub fn order(&self) -> ORDER_R { - ORDER_R::new((self.bits & 1) != 0) - } - #[doc = "Bit 1 - Serial clock (SCK) phase"] - #[inline(always)] - pub fn cpha(&self) -> CPHA_R { - CPHA_R::new(((self.bits >> 1) & 1) != 0) - } - #[doc = "Bit 2 - Serial clock (SCK) polarity"] - #[inline(always)] - pub fn cpol(&self) -> CPOL_R { - CPOL_R::new(((self.bits >> 2) & 1) != 0) - } -} -impl W { - #[doc = "Bit 0 - Bit order"] - #[inline(always)] - #[must_use] - pub fn order(&mut self) -> ORDER_W<0> { - ORDER_W::new(self) - } - #[doc = "Bit 1 - Serial clock (SCK) phase"] - #[inline(always)] - #[must_use] - pub fn cpha(&mut self) -> CPHA_W<1> { - CPHA_W::new(self) - } - #[doc = "Bit 2 - Serial clock (SCK) polarity"] - #[inline(always)] - #[must_use] - pub fn cpol(&mut self) -> CPOL_W<2> { - CPOL_W::new(self) - } - #[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 = "Configuration register\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 [config](index.html) module"] -pub struct CONFIG_SPEC; -impl crate::RegisterSpec for CONFIG_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [config::R](R) reader structure"] -impl crate::Readable for CONFIG_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [config::W](W) writer structure"] -impl crate::Writable for 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 CONFIG to value 0"] -impl crate::Resettable for CONFIG_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/spi0/enable.rs b/down-the-stack/dk_pac/src/spi0/enable.rs deleted file mode 100644 index 838a827..0000000 --- a/down-the-stack/dk_pac/src/spi0/enable.rs +++ /dev/null @@ -1,128 +0,0 @@ -#[doc = "Register `ENABLE` 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 `ENABLE` 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 `ENABLE` reader - Enable or disable SPI"] -pub type ENABLE_R = crate::FieldReader; -#[doc = "Enable or disable SPI\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -#[repr(u8)] -pub enum ENABLE_A { - #[doc = "0: Disable SPI"] - DISABLED = 0, - #[doc = "1: Enable SPI"] - ENABLED = 1, -} -impl From for u8 { - #[inline(always)] - fn from(variant: ENABLE_A) -> Self { - variant as _ - } -} -impl ENABLE_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> Option { - match self.bits { - 0 => Some(ENABLE_A::DISABLED), - 1 => Some(ENABLE_A::ENABLED), - _ => None, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == ENABLE_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == ENABLE_A::ENABLED - } -} -#[doc = "Field `ENABLE` writer - Enable or disable SPI"] -pub type ENABLE_W<'a, const O: u8> = crate::FieldWriter<'a, u32, ENABLE_SPEC, u8, ENABLE_A, 4, O>; -impl<'a, const O: u8> ENABLE_W<'a, O> { - #[doc = "Disable SPI"] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(ENABLE_A::DISABLED) - } - #[doc = "Enable SPI"] - #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(ENABLE_A::ENABLED) - } -} -impl R { - #[doc = "Bits 0:3 - Enable or disable SPI"] - #[inline(always)] - pub fn enable(&self) -> ENABLE_R { - ENABLE_R::new((self.bits & 0x0f) as u8) - } -} -impl W { - #[doc = "Bits 0:3 - Enable or disable SPI"] - #[inline(always)] - #[must_use] - pub fn enable(&mut self) -> ENABLE_W<0> { - 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 - } -} -#[doc = "Enable SPI\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 [enable](index.html) module"] -pub struct ENABLE_SPEC; -impl crate::RegisterSpec for ENABLE_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [enable::R](R) reader structure"] -impl crate::Readable for ENABLE_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [enable::W](W) writer structure"] -impl crate::Writable for ENABLE_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets ENABLE to value 0"] -impl crate::Resettable for ENABLE_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/spi0/events_ready.rs b/down-the-stack/dk_pac/src/spi0/events_ready.rs deleted file mode 100644 index a04a158..0000000 --- a/down-the-stack/dk_pac/src/spi0/events_ready.rs +++ /dev/null @@ -1,127 +0,0 @@ -#[doc = "Register `EVENTS_READY` 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 `EVENTS_READY` 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 `EVENTS_READY` reader - TXD byte sent and RXD byte received"] -pub type EVENTS_READY_R = crate::BitReader; -#[doc = "TXD byte sent and RXD byte received\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum EVENTS_READY_A { - #[doc = "0: Event not generated"] - NOT_GENERATED = 0, - #[doc = "1: Event generated"] - GENERATED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: EVENTS_READY_A) -> Self { - variant as u8 != 0 - } -} -impl EVENTS_READY_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> EVENTS_READY_A { - match self.bits { - false => EVENTS_READY_A::NOT_GENERATED, - true => EVENTS_READY_A::GENERATED, - } - } - #[doc = "Checks if the value of the field is `NOT_GENERATED`"] - #[inline(always)] - pub fn is_not_generated(&self) -> bool { - *self == EVENTS_READY_A::NOT_GENERATED - } - #[doc = "Checks if the value of the field is `GENERATED`"] - #[inline(always)] - pub fn is_generated(&self) -> bool { - *self == EVENTS_READY_A::GENERATED - } -} -#[doc = "Field `EVENTS_READY` writer - TXD byte sent and RXD byte received"] -pub type EVENTS_READY_W<'a, const O: u8> = - crate::BitWriter<'a, u32, EVENTS_READY_SPEC, EVENTS_READY_A, O>; -impl<'a, const O: u8> EVENTS_READY_W<'a, O> { - #[doc = "Event not generated"] - #[inline(always)] - pub fn not_generated(self) -> &'a mut W { - self.variant(EVENTS_READY_A::NOT_GENERATED) - } - #[doc = "Event generated"] - #[inline(always)] - pub fn generated(self) -> &'a mut W { - self.variant(EVENTS_READY_A::GENERATED) - } -} -impl R { - #[doc = "Bit 0 - TXD byte sent and RXD byte received"] - #[inline(always)] - pub fn events_ready(&self) -> EVENTS_READY_R { - EVENTS_READY_R::new((self.bits & 1) != 0) - } -} -impl W { - #[doc = "Bit 0 - TXD byte sent and RXD byte received"] - #[inline(always)] - #[must_use] - pub fn events_ready(&mut self) -> EVENTS_READY_W<0> { - EVENTS_READY_W::new(self) - } - #[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 = "TXD byte sent and RXD byte received\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 [events_ready](index.html) module"] -pub struct EVENTS_READY_SPEC; -impl crate::RegisterSpec for EVENTS_READY_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [events_ready::R](R) reader structure"] -impl crate::Readable for EVENTS_READY_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [events_ready::W](W) writer structure"] -impl crate::Writable for EVENTS_READY_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets EVENTS_READY to value 0"] -impl crate::Resettable for EVENTS_READY_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/spi0/frequency.rs b/down-the-stack/dk_pac/src/spi0/frequency.rs deleted file mode 100644 index 939a363..0000000 --- a/down-the-stack/dk_pac/src/spi0/frequency.rs +++ /dev/null @@ -1,194 +0,0 @@ -#[doc = "Register `FREQUENCY` 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 `FREQUENCY` 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 `FREQUENCY` reader - SPI master data rate"] -pub type FREQUENCY_R = crate::FieldReader; -#[doc = "SPI master data rate\n\nValue on reset: 67108864"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -#[repr(u32)] -pub enum FREQUENCY_A { - #[doc = "33554432: 125 kbps"] - K125 = 33554432, - #[doc = "67108864: 250 kbps"] - K250 = 67108864, - #[doc = "134217728: 500 kbps"] - K500 = 134217728, - #[doc = "268435456: 1 Mbps"] - M1 = 268435456, - #[doc = "536870912: 2 Mbps"] - M2 = 536870912, - #[doc = "1073741824: 4 Mbps"] - M4 = 1073741824, - #[doc = "2147483648: 8 Mbps"] - M8 = 2147483648, -} -impl From for u32 { - #[inline(always)] - fn from(variant: FREQUENCY_A) -> Self { - variant as _ - } -} -impl FREQUENCY_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> Option { - match self.bits { - 33554432 => Some(FREQUENCY_A::K125), - 67108864 => Some(FREQUENCY_A::K250), - 134217728 => Some(FREQUENCY_A::K500), - 268435456 => Some(FREQUENCY_A::M1), - 536870912 => Some(FREQUENCY_A::M2), - 1073741824 => Some(FREQUENCY_A::M4), - 2147483648 => Some(FREQUENCY_A::M8), - _ => None, - } - } - #[doc = "Checks if the value of the field is `K125`"] - #[inline(always)] - pub fn is_k125(&self) -> bool { - *self == FREQUENCY_A::K125 - } - #[doc = "Checks if the value of the field is `K250`"] - #[inline(always)] - pub fn is_k250(&self) -> bool { - *self == FREQUENCY_A::K250 - } - #[doc = "Checks if the value of the field is `K500`"] - #[inline(always)] - pub fn is_k500(&self) -> bool { - *self == FREQUENCY_A::K500 - } - #[doc = "Checks if the value of the field is `M1`"] - #[inline(always)] - pub fn is_m1(&self) -> bool { - *self == FREQUENCY_A::M1 - } - #[doc = "Checks if the value of the field is `M2`"] - #[inline(always)] - pub fn is_m2(&self) -> bool { - *self == FREQUENCY_A::M2 - } - #[doc = "Checks if the value of the field is `M4`"] - #[inline(always)] - pub fn is_m4(&self) -> bool { - *self == FREQUENCY_A::M4 - } - #[doc = "Checks if the value of the field is `M8`"] - #[inline(always)] - pub fn is_m8(&self) -> bool { - *self == FREQUENCY_A::M8 - } -} -#[doc = "Field `FREQUENCY` writer - SPI master data rate"] -pub type FREQUENCY_W<'a, const O: u8> = - crate::FieldWriter<'a, u32, FREQUENCY_SPEC, u32, FREQUENCY_A, 32, O>; -impl<'a, const O: u8> FREQUENCY_W<'a, O> { - #[doc = "125 kbps"] - #[inline(always)] - pub fn k125(self) -> &'a mut W { - self.variant(FREQUENCY_A::K125) - } - #[doc = "250 kbps"] - #[inline(always)] - pub fn k250(self) -> &'a mut W { - self.variant(FREQUENCY_A::K250) - } - #[doc = "500 kbps"] - #[inline(always)] - pub fn k500(self) -> &'a mut W { - self.variant(FREQUENCY_A::K500) - } - #[doc = "1 Mbps"] - #[inline(always)] - pub fn m1(self) -> &'a mut W { - self.variant(FREQUENCY_A::M1) - } - #[doc = "2 Mbps"] - #[inline(always)] - pub fn m2(self) -> &'a mut W { - self.variant(FREQUENCY_A::M2) - } - #[doc = "4 Mbps"] - #[inline(always)] - pub fn m4(self) -> &'a mut W { - self.variant(FREQUENCY_A::M4) - } - #[doc = "8 Mbps"] - #[inline(always)] - pub fn m8(self) -> &'a mut W { - self.variant(FREQUENCY_A::M8) - } -} -impl R { - #[doc = "Bits 0:31 - SPI master data rate"] - #[inline(always)] - pub fn frequency(&self) -> FREQUENCY_R { - FREQUENCY_R::new(self.bits) - } -} -impl W { - #[doc = "Bits 0:31 - SPI master data rate"] - #[inline(always)] - #[must_use] - pub fn frequency(&mut self) -> FREQUENCY_W<0> { - FREQUENCY_W::new(self) - } - #[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 = "SPI frequency\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 [frequency](index.html) module"] -pub struct FREQUENCY_SPEC; -impl crate::RegisterSpec for FREQUENCY_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [frequency::R](R) reader structure"] -impl crate::Readable for FREQUENCY_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [frequency::W](W) writer structure"] -impl crate::Writable for FREQUENCY_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets FREQUENCY to value 0x0400_0000"] -impl crate::Resettable for FREQUENCY_SPEC { - const RESET_VALUE: Self::Ux = 0x0400_0000; -} diff --git a/down-the-stack/dk_pac/src/spi0/intenclr.rs b/down-the-stack/dk_pac/src/spi0/intenclr.rs deleted file mode 100644 index 60a9995..0000000 --- a/down-the-stack/dk_pac/src/spi0/intenclr.rs +++ /dev/null @@ -1,133 +0,0 @@ -#[doc = "Register `INTENCLR` 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 `INTENCLR` 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 `READY` reader - Write '1' to disable interrupt for event READY"] -pub type READY_R = crate::BitReader; -#[doc = "Write '1' to disable interrupt for event READY\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum READY_A { - #[doc = "0: Read: Disabled"] - DISABLED = 0, - #[doc = "1: Read: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: READY_A) -> Self { - variant as u8 != 0 - } -} -impl READY_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> READY_A { - match self.bits { - false => READY_A::DISABLED, - true => READY_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == READY_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == READY_A::ENABLED - } -} -#[doc = "Write '1' to disable interrupt for event READY\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum READY_AW { - #[doc = "1: Disable"] - CLEAR = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: READY_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `READY` writer - Write '1' to disable interrupt for event READY"] -pub type READY_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENCLR_SPEC, READY_AW, O>; -impl<'a, const O: u8> READY_W<'a, O> { - #[doc = "Disable"] - #[inline(always)] - pub fn clear(self) -> &'a mut W { - self.variant(READY_AW::CLEAR) - } -} -impl R { - #[doc = "Bit 2 - Write '1' to disable interrupt for event READY"] - #[inline(always)] - pub fn ready(&self) -> READY_R { - READY_R::new(((self.bits >> 2) & 1) != 0) - } -} -impl W { - #[doc = "Bit 2 - Write '1' to disable interrupt for event READY"] - #[inline(always)] - #[must_use] - pub fn ready(&mut self) -> READY_W<2> { - READY_W::new(self) - } - #[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 = "Disable interrupt\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 [intenclr](index.html) module"] -pub struct INTENCLR_SPEC; -impl crate::RegisterSpec for INTENCLR_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [intenclr::R](R) reader structure"] -impl crate::Readable for INTENCLR_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [intenclr::W](W) writer structure"] -impl crate::Writable for INTENCLR_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets INTENCLR to value 0"] -impl crate::Resettable for INTENCLR_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/spi0/intenset.rs b/down-the-stack/dk_pac/src/spi0/intenset.rs deleted file mode 100644 index 584992b..0000000 --- a/down-the-stack/dk_pac/src/spi0/intenset.rs +++ /dev/null @@ -1,133 +0,0 @@ -#[doc = "Register `INTENSET` 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 `INTENSET` 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 `READY` reader - Write '1' to enable interrupt for event READY"] -pub type READY_R = crate::BitReader; -#[doc = "Write '1' to enable interrupt for event READY\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum READY_A { - #[doc = "0: Read: Disabled"] - DISABLED = 0, - #[doc = "1: Read: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: READY_A) -> Self { - variant as u8 != 0 - } -} -impl READY_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> READY_A { - match self.bits { - false => READY_A::DISABLED, - true => READY_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == READY_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == READY_A::ENABLED - } -} -#[doc = "Write '1' to enable interrupt for event READY\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum READY_AW { - #[doc = "1: Enable"] - SET = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: READY_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `READY` writer - Write '1' to enable interrupt for event READY"] -pub type READY_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENSET_SPEC, READY_AW, O>; -impl<'a, const O: u8> READY_W<'a, O> { - #[doc = "Enable"] - #[inline(always)] - pub fn set(self) -> &'a mut W { - self.variant(READY_AW::SET) - } -} -impl R { - #[doc = "Bit 2 - Write '1' to enable interrupt for event READY"] - #[inline(always)] - pub fn ready(&self) -> READY_R { - READY_R::new(((self.bits >> 2) & 1) != 0) - } -} -impl W { - #[doc = "Bit 2 - Write '1' to enable interrupt for event READY"] - #[inline(always)] - #[must_use] - pub fn ready(&mut self) -> READY_W<2> { - READY_W::new(self) - } - #[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 = "Enable interrupt\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 [intenset](index.html) module"] -pub struct INTENSET_SPEC; -impl crate::RegisterSpec for INTENSET_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [intenset::R](R) reader structure"] -impl crate::Readable for INTENSET_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [intenset::W](W) writer structure"] -impl crate::Writable for INTENSET_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets INTENSET to value 0"] -impl crate::Resettable for INTENSET_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/spi0/psel.rs b/down-the-stack/dk_pac/src/spi0/psel.rs deleted file mode 100644 index 560166b..0000000 --- a/down-the-stack/dk_pac/src/spi0/psel.rs +++ /dev/null @@ -1,22 +0,0 @@ -#[doc = r"Register block"] -#[repr(C)] -pub struct PSEL { - #[doc = "0x00 - Pin select for SCK"] - pub sck: SCK, - #[doc = "0x04 - Pin select for MOSI"] - pub mosi: MOSI, - #[doc = "0x08 - Pin select for MISO"] - pub miso: MISO, -} -#[doc = "SCK (rw) register accessor: an alias for `Reg`"] -pub type SCK = crate::Reg; -#[doc = "Pin select for SCK"] -pub mod sck; -#[doc = "MOSI (rw) register accessor: an alias for `Reg`"] -pub type MOSI = crate::Reg; -#[doc = "Pin select for MOSI"] -pub mod mosi; -#[doc = "MISO (rw) register accessor: an alias for `Reg`"] -pub type MISO = crate::Reg; -#[doc = "Pin select for MISO"] -pub mod miso; diff --git a/down-the-stack/dk_pac/src/spi0/psel/miso.rs b/down-the-stack/dk_pac/src/spi0/psel/miso.rs deleted file mode 100644 index 0d76016..0000000 --- a/down-the-stack/dk_pac/src/spi0/psel/miso.rs +++ /dev/null @@ -1,116 +0,0 @@ -#[doc = "Register `MISO` 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 `MISO` 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 `PSELMISO` reader - Pin number configuration for SPI MISO signal"] -pub type PSELMISO_R = crate::FieldReader; -#[doc = "Pin number configuration for SPI MISO signal\n\nValue on reset: 4294967295"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -#[repr(u32)] -pub enum PSELMISO_A { - #[doc = "4294967295: Disconnect"] - DISCONNECTED = 4294967295, -} -impl From for u32 { - #[inline(always)] - fn from(variant: PSELMISO_A) -> Self { - variant as _ - } -} -impl PSELMISO_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> Option { - match self.bits { - 4294967295 => Some(PSELMISO_A::DISCONNECTED), - _ => None, - } - } - #[doc = "Checks if the value of the field is `DISCONNECTED`"] - #[inline(always)] - pub fn is_disconnected(&self) -> bool { - *self == PSELMISO_A::DISCONNECTED - } -} -#[doc = "Field `PSELMISO` writer - Pin number configuration for SPI MISO signal"] -pub type PSELMISO_W<'a, const O: u8> = - crate::FieldWriter<'a, u32, MISO_SPEC, u32, PSELMISO_A, 32, O>; -impl<'a, const O: u8> PSELMISO_W<'a, O> { - #[doc = "Disconnect"] - #[inline(always)] - pub fn disconnected(self) -> &'a mut W { - self.variant(PSELMISO_A::DISCONNECTED) - } -} -impl R { - #[doc = "Bits 0:31 - Pin number configuration for SPI MISO signal"] - #[inline(always)] - pub fn pselmiso(&self) -> PSELMISO_R { - PSELMISO_R::new(self.bits) - } -} -impl W { - #[doc = "Bits 0:31 - Pin number configuration for SPI MISO signal"] - #[inline(always)] - #[must_use] - pub fn pselmiso(&mut self) -> PSELMISO_W<0> { - PSELMISO_W::new(self) - } - #[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 = "Pin select for MISO\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 [miso](index.html) module"] -pub struct MISO_SPEC; -impl crate::RegisterSpec for MISO_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [miso::R](R) reader structure"] -impl crate::Readable for MISO_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [miso::W](W) writer structure"] -impl crate::Writable for MISO_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets MISO to value 0xffff_ffff"] -impl crate::Resettable for MISO_SPEC { - const RESET_VALUE: Self::Ux = 0xffff_ffff; -} diff --git a/down-the-stack/dk_pac/src/spi0/psel/mosi.rs b/down-the-stack/dk_pac/src/spi0/psel/mosi.rs deleted file mode 100644 index 956ae3b..0000000 --- a/down-the-stack/dk_pac/src/spi0/psel/mosi.rs +++ /dev/null @@ -1,116 +0,0 @@ -#[doc = "Register `MOSI` 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 `MOSI` 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 `PSELMOSI` reader - Pin number configuration for SPI MOSI signal"] -pub type PSELMOSI_R = crate::FieldReader; -#[doc = "Pin number configuration for SPI MOSI signal\n\nValue on reset: 4294967295"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -#[repr(u32)] -pub enum PSELMOSI_A { - #[doc = "4294967295: Disconnect"] - DISCONNECTED = 4294967295, -} -impl From for u32 { - #[inline(always)] - fn from(variant: PSELMOSI_A) -> Self { - variant as _ - } -} -impl PSELMOSI_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> Option { - match self.bits { - 4294967295 => Some(PSELMOSI_A::DISCONNECTED), - _ => None, - } - } - #[doc = "Checks if the value of the field is `DISCONNECTED`"] - #[inline(always)] - pub fn is_disconnected(&self) -> bool { - *self == PSELMOSI_A::DISCONNECTED - } -} -#[doc = "Field `PSELMOSI` writer - Pin number configuration for SPI MOSI signal"] -pub type PSELMOSI_W<'a, const O: u8> = - crate::FieldWriter<'a, u32, MOSI_SPEC, u32, PSELMOSI_A, 32, O>; -impl<'a, const O: u8> PSELMOSI_W<'a, O> { - #[doc = "Disconnect"] - #[inline(always)] - pub fn disconnected(self) -> &'a mut W { - self.variant(PSELMOSI_A::DISCONNECTED) - } -} -impl R { - #[doc = "Bits 0:31 - Pin number configuration for SPI MOSI signal"] - #[inline(always)] - pub fn pselmosi(&self) -> PSELMOSI_R { - PSELMOSI_R::new(self.bits) - } -} -impl W { - #[doc = "Bits 0:31 - Pin number configuration for SPI MOSI signal"] - #[inline(always)] - #[must_use] - pub fn pselmosi(&mut self) -> PSELMOSI_W<0> { - PSELMOSI_W::new(self) - } - #[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 = "Pin select for MOSI\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 [mosi](index.html) module"] -pub struct MOSI_SPEC; -impl crate::RegisterSpec for MOSI_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [mosi::R](R) reader structure"] -impl crate::Readable for MOSI_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [mosi::W](W) writer structure"] -impl crate::Writable for MOSI_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets MOSI to value 0xffff_ffff"] -impl crate::Resettable for MOSI_SPEC { - const RESET_VALUE: Self::Ux = 0xffff_ffff; -} diff --git a/down-the-stack/dk_pac/src/spi0/psel/sck.rs b/down-the-stack/dk_pac/src/spi0/psel/sck.rs deleted file mode 100644 index fccfad4..0000000 --- a/down-the-stack/dk_pac/src/spi0/psel/sck.rs +++ /dev/null @@ -1,115 +0,0 @@ -#[doc = "Register `SCK` 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 `SCK` 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 `PSELSCK` reader - Pin number configuration for SPI SCK signal"] -pub type PSELSCK_R = crate::FieldReader; -#[doc = "Pin number configuration for SPI SCK signal\n\nValue on reset: 4294967295"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -#[repr(u32)] -pub enum PSELSCK_A { - #[doc = "4294967295: Disconnect"] - DISCONNECTED = 4294967295, -} -impl From for u32 { - #[inline(always)] - fn from(variant: PSELSCK_A) -> Self { - variant as _ - } -} -impl PSELSCK_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> Option { - match self.bits { - 4294967295 => Some(PSELSCK_A::DISCONNECTED), - _ => None, - } - } - #[doc = "Checks if the value of the field is `DISCONNECTED`"] - #[inline(always)] - pub fn is_disconnected(&self) -> bool { - *self == PSELSCK_A::DISCONNECTED - } -} -#[doc = "Field `PSELSCK` writer - Pin number configuration for SPI SCK signal"] -pub type PSELSCK_W<'a, const O: u8> = crate::FieldWriter<'a, u32, SCK_SPEC, u32, PSELSCK_A, 32, O>; -impl<'a, const O: u8> PSELSCK_W<'a, O> { - #[doc = "Disconnect"] - #[inline(always)] - pub fn disconnected(self) -> &'a mut W { - self.variant(PSELSCK_A::DISCONNECTED) - } -} -impl R { - #[doc = "Bits 0:31 - Pin number configuration for SPI SCK signal"] - #[inline(always)] - pub fn pselsck(&self) -> PSELSCK_R { - PSELSCK_R::new(self.bits) - } -} -impl W { - #[doc = "Bits 0:31 - Pin number configuration for SPI SCK signal"] - #[inline(always)] - #[must_use] - pub fn pselsck(&mut self) -> PSELSCK_W<0> { - PSELSCK_W::new(self) - } - #[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 = "Pin select for SCK\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 [sck](index.html) module"] -pub struct SCK_SPEC; -impl crate::RegisterSpec for SCK_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [sck::R](R) reader structure"] -impl crate::Readable for SCK_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [sck::W](W) writer structure"] -impl crate::Writable for SCK_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets SCK to value 0xffff_ffff"] -impl crate::Resettable for SCK_SPEC { - const RESET_VALUE: Self::Ux = 0xffff_ffff; -} diff --git a/down-the-stack/dk_pac/src/spi0/rxd.rs b/down-the-stack/dk_pac/src/spi0/rxd.rs deleted file mode 100644 index 3e3de6d..0000000 --- a/down-the-stack/dk_pac/src/spi0/rxd.rs +++ /dev/null @@ -1,37 +0,0 @@ -#[doc = "Register `RXD` 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 = "Field `RXD` reader - RX data received. Double buffered"] -pub type RXD_R = crate::FieldReader; -impl R { - #[doc = "Bits 0:7 - RX data received. Double buffered"] - #[inline(always)] - pub fn rxd(&self) -> RXD_R { - RXD_R::new((self.bits & 0xff) as u8) - } -} -#[doc = "RXD register\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 [rxd](index.html) module"] -pub struct RXD_SPEC; -impl crate::RegisterSpec for RXD_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [rxd::R](R) reader structure"] -impl crate::Readable for RXD_SPEC { - type Reader = R; -} -#[doc = "`reset()` method sets RXD to value 0"] -impl crate::Resettable for RXD_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/spi0/txd.rs b/down-the-stack/dk_pac/src/spi0/txd.rs deleted file mode 100644 index ef270ad..0000000 --- a/down-the-stack/dk_pac/src/spi0/txd.rs +++ /dev/null @@ -1,80 +0,0 @@ -#[doc = "Register `TXD` 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 `TXD` 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 `TXD` reader - TX data to send. Double buffered"] -pub type TXD_R = crate::FieldReader; -#[doc = "Field `TXD` writer - TX data to send. Double buffered"] -pub type TXD_W<'a, const O: u8> = crate::FieldWriter<'a, u32, TXD_SPEC, u8, u8, 8, O>; -impl R { - #[doc = "Bits 0:7 - TX data to send. Double buffered"] - #[inline(always)] - pub fn txd(&self) -> TXD_R { - TXD_R::new((self.bits & 0xff) as u8) - } -} -impl W { - #[doc = "Bits 0:7 - TX data to send. Double buffered"] - #[inline(always)] - #[must_use] - pub fn txd(&mut self) -> TXD_W<0> { - TXD_W::new(self) - } - #[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 = "TXD register\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 [txd](index.html) module"] -pub struct TXD_SPEC; -impl crate::RegisterSpec for TXD_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [txd::R](R) reader structure"] -impl crate::Readable for TXD_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [txd::W](W) writer structure"] -impl crate::Writable for TXD_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets TXD to value 0"] -impl crate::Resettable for TXD_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/spim0.rs b/down-the-stack/dk_pac/src/spim0.rs deleted file mode 100644 index 45ec0da..0000000 --- a/down-the-stack/dk_pac/src/spim0.rs +++ /dev/null @@ -1,135 +0,0 @@ -#[doc = r"Register block"] -#[repr(C)] -pub struct RegisterBlock { - _reserved0: [u8; 0x10], - #[doc = "0x10 - Start SPI transaction"] - pub tasks_start: TASKS_START, - #[doc = "0x14 - Stop SPI transaction"] - pub tasks_stop: TASKS_STOP, - _reserved2: [u8; 0x04], - #[doc = "0x1c - Suspend SPI transaction"] - pub tasks_suspend: TASKS_SUSPEND, - #[doc = "0x20 - Resume SPI transaction"] - pub tasks_resume: TASKS_RESUME, - _reserved4: [u8; 0xe0], - #[doc = "0x104 - SPI transaction has stopped"] - pub events_stopped: EVENTS_STOPPED, - _reserved5: [u8; 0x08], - #[doc = "0x110 - End of RXD buffer reached"] - pub events_endrx: EVENTS_ENDRX, - _reserved6: [u8; 0x04], - #[doc = "0x118 - End of RXD buffer and TXD buffer reached"] - pub events_end: EVENTS_END, - _reserved7: [u8; 0x04], - #[doc = "0x120 - End of TXD buffer reached"] - pub events_endtx: EVENTS_ENDTX, - _reserved8: [u8; 0x28], - #[doc = "0x14c - Transaction started"] - pub events_started: EVENTS_STARTED, - _reserved9: [u8; 0xb0], - #[doc = "0x200 - Shortcuts between local events and tasks"] - pub shorts: SHORTS, - _reserved10: [u8; 0x0100], - #[doc = "0x304 - Enable interrupt"] - pub intenset: INTENSET, - #[doc = "0x308 - Disable interrupt"] - pub intenclr: INTENCLR, - _reserved12: [u8; 0x01f4], - #[doc = "0x500 - Enable SPIM"] - pub enable: ENABLE, - _reserved13: [u8; 0x04], - #[doc = "0x508..0x514 - Unspecified"] - pub psel: PSEL, - _reserved14: [u8; 0x10], - #[doc = "0x524 - SPI frequency. Accuracy depends on the HFCLK source selected."] - pub frequency: FREQUENCY, - _reserved15: [u8; 0x0c], - #[doc = "0x534..0x544 - RXD EasyDMA channel"] - pub rxd: RXD, - #[doc = "0x544..0x554 - TXD EasyDMA channel"] - pub txd: TXD, - #[doc = "0x554 - Configuration register"] - pub config: CONFIG, - _reserved18: [u8; 0x68], - #[doc = "0x5c0 - Over-read character. Character clocked out in case and over-read of the TXD buffer."] - pub orc: ORC, -} -#[doc = "TASKS_START (w) register accessor: an alias for `Reg`"] -pub type TASKS_START = crate::Reg; -#[doc = "Start SPI transaction"] -pub mod tasks_start; -#[doc = "TASKS_STOP (w) register accessor: an alias for `Reg`"] -pub type TASKS_STOP = crate::Reg; -#[doc = "Stop SPI transaction"] -pub mod tasks_stop; -#[doc = "TASKS_SUSPEND (w) register accessor: an alias for `Reg`"] -pub type TASKS_SUSPEND = crate::Reg; -#[doc = "Suspend SPI transaction"] -pub mod tasks_suspend; -#[doc = "TASKS_RESUME (w) register accessor: an alias for `Reg`"] -pub type TASKS_RESUME = crate::Reg; -#[doc = "Resume SPI transaction"] -pub mod tasks_resume; -#[doc = "EVENTS_STOPPED (rw) register accessor: an alias for `Reg`"] -pub type EVENTS_STOPPED = crate::Reg; -#[doc = "SPI transaction has stopped"] -pub mod events_stopped; -#[doc = "EVENTS_ENDRX (rw) register accessor: an alias for `Reg`"] -pub type EVENTS_ENDRX = crate::Reg; -#[doc = "End of RXD buffer reached"] -pub mod events_endrx; -#[doc = "EVENTS_END (rw) register accessor: an alias for `Reg`"] -pub type EVENTS_END = crate::Reg; -#[doc = "End of RXD buffer and TXD buffer reached"] -pub mod events_end; -#[doc = "EVENTS_ENDTX (rw) register accessor: an alias for `Reg`"] -pub type EVENTS_ENDTX = crate::Reg; -#[doc = "End of TXD buffer reached"] -pub mod events_endtx; -#[doc = "EVENTS_STARTED (rw) register accessor: an alias for `Reg`"] -pub type EVENTS_STARTED = crate::Reg; -#[doc = "Transaction started"] -pub mod events_started; -#[doc = "SHORTS (rw) register accessor: an alias for `Reg`"] -pub type SHORTS = crate::Reg; -#[doc = "Shortcuts between local events and tasks"] -pub mod shorts; -#[doc = "INTENSET (rw) register accessor: an alias for `Reg`"] -pub type INTENSET = crate::Reg; -#[doc = "Enable interrupt"] -pub mod intenset; -#[doc = "INTENCLR (rw) register accessor: an alias for `Reg`"] -pub type INTENCLR = crate::Reg; -#[doc = "Disable interrupt"] -pub mod intenclr; -#[doc = "ENABLE (rw) register accessor: an alias for `Reg`"] -pub type ENABLE = crate::Reg; -#[doc = "Enable SPIM"] -pub mod enable; -#[doc = "Unspecified"] -pub use self::psel::PSEL; -#[doc = r"Cluster"] -#[doc = "Unspecified"] -pub mod psel; -#[doc = "FREQUENCY (rw) register accessor: an alias for `Reg`"] -pub type FREQUENCY = crate::Reg; -#[doc = "SPI frequency. Accuracy depends on the HFCLK source selected."] -pub mod frequency; -#[doc = "RXD EasyDMA channel"] -pub use self::rxd::RXD; -#[doc = r"Cluster"] -#[doc = "RXD EasyDMA channel"] -pub mod rxd; -#[doc = "TXD EasyDMA channel"] -pub use self::txd::TXD; -#[doc = r"Cluster"] -#[doc = "TXD EasyDMA channel"] -pub mod txd; -#[doc = "CONFIG (rw) register accessor: an alias for `Reg`"] -pub type CONFIG = crate::Reg; -#[doc = "Configuration register"] -pub mod config; -#[doc = "ORC (rw) register accessor: an alias for `Reg`"] -pub type ORC = crate::Reg; -#[doc = "Over-read character. Character clocked out in case and over-read of the TXD buffer."] -pub mod orc; diff --git a/down-the-stack/dk_pac/src/spim0/config.rs b/down-the-stack/dk_pac/src/spim0/config.rs deleted file mode 100644 index daad954..0000000 --- a/down-the-stack/dk_pac/src/spim0/config.rs +++ /dev/null @@ -1,248 +0,0 @@ -#[doc = "Register `CONFIG` 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 `CONFIG` 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 `ORDER` reader - Bit order"] -pub type ORDER_R = crate::BitReader; -#[doc = "Bit order\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum ORDER_A { - #[doc = "0: Most significant bit shifted out first"] - MSB_FIRST = 0, - #[doc = "1: Least significant bit shifted out first"] - LSB_FIRST = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: ORDER_A) -> Self { - variant as u8 != 0 - } -} -impl ORDER_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> ORDER_A { - match self.bits { - false => ORDER_A::MSB_FIRST, - true => ORDER_A::LSB_FIRST, - } - } - #[doc = "Checks if the value of the field is `MSB_FIRST`"] - #[inline(always)] - pub fn is_msb_first(&self) -> bool { - *self == ORDER_A::MSB_FIRST - } - #[doc = "Checks if the value of the field is `LSB_FIRST`"] - #[inline(always)] - pub fn is_lsb_first(&self) -> bool { - *self == ORDER_A::LSB_FIRST - } -} -#[doc = "Field `ORDER` writer - Bit order"] -pub type ORDER_W<'a, const O: u8> = crate::BitWriter<'a, u32, CONFIG_SPEC, ORDER_A, O>; -impl<'a, const O: u8> ORDER_W<'a, O> { - #[doc = "Most significant bit shifted out first"] - #[inline(always)] - pub fn msb_first(self) -> &'a mut W { - self.variant(ORDER_A::MSB_FIRST) - } - #[doc = "Least significant bit shifted out first"] - #[inline(always)] - pub fn lsb_first(self) -> &'a mut W { - self.variant(ORDER_A::LSB_FIRST) - } -} -#[doc = "Field `CPHA` reader - Serial clock (SCK) phase"] -pub type CPHA_R = crate::BitReader; -#[doc = "Serial clock (SCK) phase\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum CPHA_A { - #[doc = "0: Sample on leading edge of clock, shift serial data on trailing edge"] - LEADING = 0, - #[doc = "1: Sample on trailing edge of clock, shift serial data on leading edge"] - TRAILING = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: CPHA_A) -> Self { - variant as u8 != 0 - } -} -impl CPHA_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> CPHA_A { - match self.bits { - false => CPHA_A::LEADING, - true => CPHA_A::TRAILING, - } - } - #[doc = "Checks if the value of the field is `LEADING`"] - #[inline(always)] - pub fn is_leading(&self) -> bool { - *self == CPHA_A::LEADING - } - #[doc = "Checks if the value of the field is `TRAILING`"] - #[inline(always)] - pub fn is_trailing(&self) -> bool { - *self == CPHA_A::TRAILING - } -} -#[doc = "Field `CPHA` writer - Serial clock (SCK) phase"] -pub type CPHA_W<'a, const O: u8> = crate::BitWriter<'a, u32, CONFIG_SPEC, CPHA_A, O>; -impl<'a, const O: u8> CPHA_W<'a, O> { - #[doc = "Sample on leading edge of clock, shift serial data on trailing edge"] - #[inline(always)] - pub fn leading(self) -> &'a mut W { - self.variant(CPHA_A::LEADING) - } - #[doc = "Sample on trailing edge of clock, shift serial data on leading edge"] - #[inline(always)] - pub fn trailing(self) -> &'a mut W { - self.variant(CPHA_A::TRAILING) - } -} -#[doc = "Field `CPOL` reader - Serial clock (SCK) polarity"] -pub type CPOL_R = crate::BitReader; -#[doc = "Serial clock (SCK) polarity\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum CPOL_A { - #[doc = "0: Active high"] - ACTIVE_HIGH = 0, - #[doc = "1: Active low"] - ACTIVE_LOW = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: CPOL_A) -> Self { - variant as u8 != 0 - } -} -impl CPOL_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> CPOL_A { - match self.bits { - false => CPOL_A::ACTIVE_HIGH, - true => CPOL_A::ACTIVE_LOW, - } - } - #[doc = "Checks if the value of the field is `ACTIVE_HIGH`"] - #[inline(always)] - pub fn is_active_high(&self) -> bool { - *self == CPOL_A::ACTIVE_HIGH - } - #[doc = "Checks if the value of the field is `ACTIVE_LOW`"] - #[inline(always)] - pub fn is_active_low(&self) -> bool { - *self == CPOL_A::ACTIVE_LOW - } -} -#[doc = "Field `CPOL` writer - Serial clock (SCK) polarity"] -pub type CPOL_W<'a, const O: u8> = crate::BitWriter<'a, u32, CONFIG_SPEC, CPOL_A, O>; -impl<'a, const O: u8> CPOL_W<'a, O> { - #[doc = "Active high"] - #[inline(always)] - pub fn active_high(self) -> &'a mut W { - self.variant(CPOL_A::ACTIVE_HIGH) - } - #[doc = "Active low"] - #[inline(always)] - pub fn active_low(self) -> &'a mut W { - self.variant(CPOL_A::ACTIVE_LOW) - } -} -impl R { - #[doc = "Bit 0 - Bit order"] - #[inline(always)] - pub fn order(&self) -> ORDER_R { - ORDER_R::new((self.bits & 1) != 0) - } - #[doc = "Bit 1 - Serial clock (SCK) phase"] - #[inline(always)] - pub fn cpha(&self) -> CPHA_R { - CPHA_R::new(((self.bits >> 1) & 1) != 0) - } - #[doc = "Bit 2 - Serial clock (SCK) polarity"] - #[inline(always)] - pub fn cpol(&self) -> CPOL_R { - CPOL_R::new(((self.bits >> 2) & 1) != 0) - } -} -impl W { - #[doc = "Bit 0 - Bit order"] - #[inline(always)] - #[must_use] - pub fn order(&mut self) -> ORDER_W<0> { - ORDER_W::new(self) - } - #[doc = "Bit 1 - Serial clock (SCK) phase"] - #[inline(always)] - #[must_use] - pub fn cpha(&mut self) -> CPHA_W<1> { - CPHA_W::new(self) - } - #[doc = "Bit 2 - Serial clock (SCK) polarity"] - #[inline(always)] - #[must_use] - pub fn cpol(&mut self) -> CPOL_W<2> { - CPOL_W::new(self) - } - #[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 = "Configuration register\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 [config](index.html) module"] -pub struct CONFIG_SPEC; -impl crate::RegisterSpec for CONFIG_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [config::R](R) reader structure"] -impl crate::Readable for CONFIG_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [config::W](W) writer structure"] -impl crate::Writable for 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 CONFIG to value 0"] -impl crate::Resettable for CONFIG_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/spim0/enable.rs b/down-the-stack/dk_pac/src/spim0/enable.rs deleted file mode 100644 index ec04164..0000000 --- a/down-the-stack/dk_pac/src/spim0/enable.rs +++ /dev/null @@ -1,128 +0,0 @@ -#[doc = "Register `ENABLE` 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 `ENABLE` 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 `ENABLE` reader - Enable or disable SPIM"] -pub type ENABLE_R = crate::FieldReader; -#[doc = "Enable or disable SPIM\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -#[repr(u8)] -pub enum ENABLE_A { - #[doc = "0: Disable SPIM"] - DISABLED = 0, - #[doc = "7: Enable SPIM"] - ENABLED = 7, -} -impl From for u8 { - #[inline(always)] - fn from(variant: ENABLE_A) -> Self { - variant as _ - } -} -impl ENABLE_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> Option { - match self.bits { - 0 => Some(ENABLE_A::DISABLED), - 7 => Some(ENABLE_A::ENABLED), - _ => None, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == ENABLE_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == ENABLE_A::ENABLED - } -} -#[doc = "Field `ENABLE` writer - Enable or disable SPIM"] -pub type ENABLE_W<'a, const O: u8> = crate::FieldWriter<'a, u32, ENABLE_SPEC, u8, ENABLE_A, 4, O>; -impl<'a, const O: u8> ENABLE_W<'a, O> { - #[doc = "Disable SPIM"] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(ENABLE_A::DISABLED) - } - #[doc = "Enable SPIM"] - #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(ENABLE_A::ENABLED) - } -} -impl R { - #[doc = "Bits 0:3 - Enable or disable SPIM"] - #[inline(always)] - pub fn enable(&self) -> ENABLE_R { - ENABLE_R::new((self.bits & 0x0f) as u8) - } -} -impl W { - #[doc = "Bits 0:3 - Enable or disable SPIM"] - #[inline(always)] - #[must_use] - pub fn enable(&mut self) -> ENABLE_W<0> { - 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 - } -} -#[doc = "Enable SPIM\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 [enable](index.html) module"] -pub struct ENABLE_SPEC; -impl crate::RegisterSpec for ENABLE_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [enable::R](R) reader structure"] -impl crate::Readable for ENABLE_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [enable::W](W) writer structure"] -impl crate::Writable for ENABLE_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets ENABLE to value 0"] -impl crate::Resettable for ENABLE_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/spim0/events_end.rs b/down-the-stack/dk_pac/src/spim0/events_end.rs deleted file mode 100644 index 81510b5..0000000 --- a/down-the-stack/dk_pac/src/spim0/events_end.rs +++ /dev/null @@ -1,127 +0,0 @@ -#[doc = "Register `EVENTS_END` 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 `EVENTS_END` 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 `EVENTS_END` reader - End of RXD buffer and TXD buffer reached"] -pub type EVENTS_END_R = crate::BitReader; -#[doc = "End of RXD buffer and TXD buffer reached\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum EVENTS_END_A { - #[doc = "0: Event not generated"] - NOT_GENERATED = 0, - #[doc = "1: Event generated"] - GENERATED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: EVENTS_END_A) -> Self { - variant as u8 != 0 - } -} -impl EVENTS_END_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> EVENTS_END_A { - match self.bits { - false => EVENTS_END_A::NOT_GENERATED, - true => EVENTS_END_A::GENERATED, - } - } - #[doc = "Checks if the value of the field is `NOT_GENERATED`"] - #[inline(always)] - pub fn is_not_generated(&self) -> bool { - *self == EVENTS_END_A::NOT_GENERATED - } - #[doc = "Checks if the value of the field is `GENERATED`"] - #[inline(always)] - pub fn is_generated(&self) -> bool { - *self == EVENTS_END_A::GENERATED - } -} -#[doc = "Field `EVENTS_END` writer - End of RXD buffer and TXD buffer reached"] -pub type EVENTS_END_W<'a, const O: u8> = - crate::BitWriter<'a, u32, EVENTS_END_SPEC, EVENTS_END_A, O>; -impl<'a, const O: u8> EVENTS_END_W<'a, O> { - #[doc = "Event not generated"] - #[inline(always)] - pub fn not_generated(self) -> &'a mut W { - self.variant(EVENTS_END_A::NOT_GENERATED) - } - #[doc = "Event generated"] - #[inline(always)] - pub fn generated(self) -> &'a mut W { - self.variant(EVENTS_END_A::GENERATED) - } -} -impl R { - #[doc = "Bit 0 - End of RXD buffer and TXD buffer reached"] - #[inline(always)] - pub fn events_end(&self) -> EVENTS_END_R { - EVENTS_END_R::new((self.bits & 1) != 0) - } -} -impl W { - #[doc = "Bit 0 - End of RXD buffer and TXD buffer reached"] - #[inline(always)] - #[must_use] - pub fn events_end(&mut self) -> EVENTS_END_W<0> { - EVENTS_END_W::new(self) - } - #[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 = "End of RXD buffer and TXD buffer reached\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 [events_end](index.html) module"] -pub struct EVENTS_END_SPEC; -impl crate::RegisterSpec for EVENTS_END_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [events_end::R](R) reader structure"] -impl crate::Readable for EVENTS_END_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [events_end::W](W) writer structure"] -impl crate::Writable for EVENTS_END_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets EVENTS_END to value 0"] -impl crate::Resettable for EVENTS_END_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/spim0/events_endrx.rs b/down-the-stack/dk_pac/src/spim0/events_endrx.rs deleted file mode 100644 index 0bafc6a..0000000 --- a/down-the-stack/dk_pac/src/spim0/events_endrx.rs +++ /dev/null @@ -1,127 +0,0 @@ -#[doc = "Register `EVENTS_ENDRX` 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 `EVENTS_ENDRX` 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 `EVENTS_ENDRX` reader - End of RXD buffer reached"] -pub type EVENTS_ENDRX_R = crate::BitReader; -#[doc = "End of RXD buffer reached\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum EVENTS_ENDRX_A { - #[doc = "0: Event not generated"] - NOT_GENERATED = 0, - #[doc = "1: Event generated"] - GENERATED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: EVENTS_ENDRX_A) -> Self { - variant as u8 != 0 - } -} -impl EVENTS_ENDRX_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> EVENTS_ENDRX_A { - match self.bits { - false => EVENTS_ENDRX_A::NOT_GENERATED, - true => EVENTS_ENDRX_A::GENERATED, - } - } - #[doc = "Checks if the value of the field is `NOT_GENERATED`"] - #[inline(always)] - pub fn is_not_generated(&self) -> bool { - *self == EVENTS_ENDRX_A::NOT_GENERATED - } - #[doc = "Checks if the value of the field is `GENERATED`"] - #[inline(always)] - pub fn is_generated(&self) -> bool { - *self == EVENTS_ENDRX_A::GENERATED - } -} -#[doc = "Field `EVENTS_ENDRX` writer - End of RXD buffer reached"] -pub type EVENTS_ENDRX_W<'a, const O: u8> = - crate::BitWriter<'a, u32, EVENTS_ENDRX_SPEC, EVENTS_ENDRX_A, O>; -impl<'a, const O: u8> EVENTS_ENDRX_W<'a, O> { - #[doc = "Event not generated"] - #[inline(always)] - pub fn not_generated(self) -> &'a mut W { - self.variant(EVENTS_ENDRX_A::NOT_GENERATED) - } - #[doc = "Event generated"] - #[inline(always)] - pub fn generated(self) -> &'a mut W { - self.variant(EVENTS_ENDRX_A::GENERATED) - } -} -impl R { - #[doc = "Bit 0 - End of RXD buffer reached"] - #[inline(always)] - pub fn events_endrx(&self) -> EVENTS_ENDRX_R { - EVENTS_ENDRX_R::new((self.bits & 1) != 0) - } -} -impl W { - #[doc = "Bit 0 - End of RXD buffer reached"] - #[inline(always)] - #[must_use] - pub fn events_endrx(&mut self) -> EVENTS_ENDRX_W<0> { - EVENTS_ENDRX_W::new(self) - } - #[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 = "End of RXD buffer reached\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 [events_endrx](index.html) module"] -pub struct EVENTS_ENDRX_SPEC; -impl crate::RegisterSpec for EVENTS_ENDRX_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [events_endrx::R](R) reader structure"] -impl crate::Readable for EVENTS_ENDRX_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [events_endrx::W](W) writer structure"] -impl crate::Writable for EVENTS_ENDRX_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets EVENTS_ENDRX to value 0"] -impl crate::Resettable for EVENTS_ENDRX_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/spim0/events_endtx.rs b/down-the-stack/dk_pac/src/spim0/events_endtx.rs deleted file mode 100644 index 1302da9..0000000 --- a/down-the-stack/dk_pac/src/spim0/events_endtx.rs +++ /dev/null @@ -1,127 +0,0 @@ -#[doc = "Register `EVENTS_ENDTX` 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 `EVENTS_ENDTX` 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 `EVENTS_ENDTX` reader - End of TXD buffer reached"] -pub type EVENTS_ENDTX_R = crate::BitReader; -#[doc = "End of TXD buffer reached\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum EVENTS_ENDTX_A { - #[doc = "0: Event not generated"] - NOT_GENERATED = 0, - #[doc = "1: Event generated"] - GENERATED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: EVENTS_ENDTX_A) -> Self { - variant as u8 != 0 - } -} -impl EVENTS_ENDTX_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> EVENTS_ENDTX_A { - match self.bits { - false => EVENTS_ENDTX_A::NOT_GENERATED, - true => EVENTS_ENDTX_A::GENERATED, - } - } - #[doc = "Checks if the value of the field is `NOT_GENERATED`"] - #[inline(always)] - pub fn is_not_generated(&self) -> bool { - *self == EVENTS_ENDTX_A::NOT_GENERATED - } - #[doc = "Checks if the value of the field is `GENERATED`"] - #[inline(always)] - pub fn is_generated(&self) -> bool { - *self == EVENTS_ENDTX_A::GENERATED - } -} -#[doc = "Field `EVENTS_ENDTX` writer - End of TXD buffer reached"] -pub type EVENTS_ENDTX_W<'a, const O: u8> = - crate::BitWriter<'a, u32, EVENTS_ENDTX_SPEC, EVENTS_ENDTX_A, O>; -impl<'a, const O: u8> EVENTS_ENDTX_W<'a, O> { - #[doc = "Event not generated"] - #[inline(always)] - pub fn not_generated(self) -> &'a mut W { - self.variant(EVENTS_ENDTX_A::NOT_GENERATED) - } - #[doc = "Event generated"] - #[inline(always)] - pub fn generated(self) -> &'a mut W { - self.variant(EVENTS_ENDTX_A::GENERATED) - } -} -impl R { - #[doc = "Bit 0 - End of TXD buffer reached"] - #[inline(always)] - pub fn events_endtx(&self) -> EVENTS_ENDTX_R { - EVENTS_ENDTX_R::new((self.bits & 1) != 0) - } -} -impl W { - #[doc = "Bit 0 - End of TXD buffer reached"] - #[inline(always)] - #[must_use] - pub fn events_endtx(&mut self) -> EVENTS_ENDTX_W<0> { - EVENTS_ENDTX_W::new(self) - } - #[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 = "End of TXD buffer reached\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 [events_endtx](index.html) module"] -pub struct EVENTS_ENDTX_SPEC; -impl crate::RegisterSpec for EVENTS_ENDTX_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [events_endtx::R](R) reader structure"] -impl crate::Readable for EVENTS_ENDTX_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [events_endtx::W](W) writer structure"] -impl crate::Writable for EVENTS_ENDTX_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets EVENTS_ENDTX to value 0"] -impl crate::Resettable for EVENTS_ENDTX_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/spim0/events_started.rs b/down-the-stack/dk_pac/src/spim0/events_started.rs deleted file mode 100644 index 34ea6b2..0000000 --- a/down-the-stack/dk_pac/src/spim0/events_started.rs +++ /dev/null @@ -1,127 +0,0 @@ -#[doc = "Register `EVENTS_STARTED` 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 `EVENTS_STARTED` 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 `EVENTS_STARTED` reader - Transaction started"] -pub type EVENTS_STARTED_R = crate::BitReader; -#[doc = "Transaction started\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum EVENTS_STARTED_A { - #[doc = "0: Event not generated"] - NOT_GENERATED = 0, - #[doc = "1: Event generated"] - GENERATED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: EVENTS_STARTED_A) -> Self { - variant as u8 != 0 - } -} -impl EVENTS_STARTED_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> EVENTS_STARTED_A { - match self.bits { - false => EVENTS_STARTED_A::NOT_GENERATED, - true => EVENTS_STARTED_A::GENERATED, - } - } - #[doc = "Checks if the value of the field is `NOT_GENERATED`"] - #[inline(always)] - pub fn is_not_generated(&self) -> bool { - *self == EVENTS_STARTED_A::NOT_GENERATED - } - #[doc = "Checks if the value of the field is `GENERATED`"] - #[inline(always)] - pub fn is_generated(&self) -> bool { - *self == EVENTS_STARTED_A::GENERATED - } -} -#[doc = "Field `EVENTS_STARTED` writer - Transaction started"] -pub type EVENTS_STARTED_W<'a, const O: u8> = - crate::BitWriter<'a, u32, EVENTS_STARTED_SPEC, EVENTS_STARTED_A, O>; -impl<'a, const O: u8> EVENTS_STARTED_W<'a, O> { - #[doc = "Event not generated"] - #[inline(always)] - pub fn not_generated(self) -> &'a mut W { - self.variant(EVENTS_STARTED_A::NOT_GENERATED) - } - #[doc = "Event generated"] - #[inline(always)] - pub fn generated(self) -> &'a mut W { - self.variant(EVENTS_STARTED_A::GENERATED) - } -} -impl R { - #[doc = "Bit 0 - Transaction started"] - #[inline(always)] - pub fn events_started(&self) -> EVENTS_STARTED_R { - EVENTS_STARTED_R::new((self.bits & 1) != 0) - } -} -impl W { - #[doc = "Bit 0 - Transaction started"] - #[inline(always)] - #[must_use] - pub fn events_started(&mut self) -> EVENTS_STARTED_W<0> { - EVENTS_STARTED_W::new(self) - } - #[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 = "Transaction started\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 [events_started](index.html) module"] -pub struct EVENTS_STARTED_SPEC; -impl crate::RegisterSpec for EVENTS_STARTED_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [events_started::R](R) reader structure"] -impl crate::Readable for EVENTS_STARTED_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [events_started::W](W) writer structure"] -impl crate::Writable for EVENTS_STARTED_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets EVENTS_STARTED to value 0"] -impl crate::Resettable for EVENTS_STARTED_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/spim0/events_stopped.rs b/down-the-stack/dk_pac/src/spim0/events_stopped.rs deleted file mode 100644 index a7d323b..0000000 --- a/down-the-stack/dk_pac/src/spim0/events_stopped.rs +++ /dev/null @@ -1,127 +0,0 @@ -#[doc = "Register `EVENTS_STOPPED` 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 `EVENTS_STOPPED` 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 `EVENTS_STOPPED` reader - SPI transaction has stopped"] -pub type EVENTS_STOPPED_R = crate::BitReader; -#[doc = "SPI transaction has stopped\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum EVENTS_STOPPED_A { - #[doc = "0: Event not generated"] - NOT_GENERATED = 0, - #[doc = "1: Event generated"] - GENERATED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: EVENTS_STOPPED_A) -> Self { - variant as u8 != 0 - } -} -impl EVENTS_STOPPED_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> EVENTS_STOPPED_A { - match self.bits { - false => EVENTS_STOPPED_A::NOT_GENERATED, - true => EVENTS_STOPPED_A::GENERATED, - } - } - #[doc = "Checks if the value of the field is `NOT_GENERATED`"] - #[inline(always)] - pub fn is_not_generated(&self) -> bool { - *self == EVENTS_STOPPED_A::NOT_GENERATED - } - #[doc = "Checks if the value of the field is `GENERATED`"] - #[inline(always)] - pub fn is_generated(&self) -> bool { - *self == EVENTS_STOPPED_A::GENERATED - } -} -#[doc = "Field `EVENTS_STOPPED` writer - SPI transaction has stopped"] -pub type EVENTS_STOPPED_W<'a, const O: u8> = - crate::BitWriter<'a, u32, EVENTS_STOPPED_SPEC, EVENTS_STOPPED_A, O>; -impl<'a, const O: u8> EVENTS_STOPPED_W<'a, O> { - #[doc = "Event not generated"] - #[inline(always)] - pub fn not_generated(self) -> &'a mut W { - self.variant(EVENTS_STOPPED_A::NOT_GENERATED) - } - #[doc = "Event generated"] - #[inline(always)] - pub fn generated(self) -> &'a mut W { - self.variant(EVENTS_STOPPED_A::GENERATED) - } -} -impl R { - #[doc = "Bit 0 - SPI transaction has stopped"] - #[inline(always)] - pub fn events_stopped(&self) -> EVENTS_STOPPED_R { - EVENTS_STOPPED_R::new((self.bits & 1) != 0) - } -} -impl W { - #[doc = "Bit 0 - SPI transaction has stopped"] - #[inline(always)] - #[must_use] - pub fn events_stopped(&mut self) -> EVENTS_STOPPED_W<0> { - EVENTS_STOPPED_W::new(self) - } - #[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 = "SPI transaction has stopped\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 [events_stopped](index.html) module"] -pub struct EVENTS_STOPPED_SPEC; -impl crate::RegisterSpec for EVENTS_STOPPED_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [events_stopped::R](R) reader structure"] -impl crate::Readable for EVENTS_STOPPED_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [events_stopped::W](W) writer structure"] -impl crate::Writable for EVENTS_STOPPED_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets EVENTS_STOPPED to value 0"] -impl crate::Resettable for EVENTS_STOPPED_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/spim0/frequency.rs b/down-the-stack/dk_pac/src/spim0/frequency.rs deleted file mode 100644 index 78619a3..0000000 --- a/down-the-stack/dk_pac/src/spim0/frequency.rs +++ /dev/null @@ -1,194 +0,0 @@ -#[doc = "Register `FREQUENCY` 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 `FREQUENCY` 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 `FREQUENCY` reader - SPI master data rate"] -pub type FREQUENCY_R = crate::FieldReader; -#[doc = "SPI master data rate\n\nValue on reset: 67108864"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -#[repr(u32)] -pub enum FREQUENCY_A { - #[doc = "33554432: 125 kbps"] - K125 = 33554432, - #[doc = "67108864: 250 kbps"] - K250 = 67108864, - #[doc = "134217728: 500 kbps"] - K500 = 134217728, - #[doc = "268435456: 1 Mbps"] - M1 = 268435456, - #[doc = "536870912: 2 Mbps"] - M2 = 536870912, - #[doc = "1073741824: 4 Mbps"] - M4 = 1073741824, - #[doc = "2147483648: 8 Mbps"] - M8 = 2147483648, -} -impl From for u32 { - #[inline(always)] - fn from(variant: FREQUENCY_A) -> Self { - variant as _ - } -} -impl FREQUENCY_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> Option { - match self.bits { - 33554432 => Some(FREQUENCY_A::K125), - 67108864 => Some(FREQUENCY_A::K250), - 134217728 => Some(FREQUENCY_A::K500), - 268435456 => Some(FREQUENCY_A::M1), - 536870912 => Some(FREQUENCY_A::M2), - 1073741824 => Some(FREQUENCY_A::M4), - 2147483648 => Some(FREQUENCY_A::M8), - _ => None, - } - } - #[doc = "Checks if the value of the field is `K125`"] - #[inline(always)] - pub fn is_k125(&self) -> bool { - *self == FREQUENCY_A::K125 - } - #[doc = "Checks if the value of the field is `K250`"] - #[inline(always)] - pub fn is_k250(&self) -> bool { - *self == FREQUENCY_A::K250 - } - #[doc = "Checks if the value of the field is `K500`"] - #[inline(always)] - pub fn is_k500(&self) -> bool { - *self == FREQUENCY_A::K500 - } - #[doc = "Checks if the value of the field is `M1`"] - #[inline(always)] - pub fn is_m1(&self) -> bool { - *self == FREQUENCY_A::M1 - } - #[doc = "Checks if the value of the field is `M2`"] - #[inline(always)] - pub fn is_m2(&self) -> bool { - *self == FREQUENCY_A::M2 - } - #[doc = "Checks if the value of the field is `M4`"] - #[inline(always)] - pub fn is_m4(&self) -> bool { - *self == FREQUENCY_A::M4 - } - #[doc = "Checks if the value of the field is `M8`"] - #[inline(always)] - pub fn is_m8(&self) -> bool { - *self == FREQUENCY_A::M8 - } -} -#[doc = "Field `FREQUENCY` writer - SPI master data rate"] -pub type FREQUENCY_W<'a, const O: u8> = - crate::FieldWriter<'a, u32, FREQUENCY_SPEC, u32, FREQUENCY_A, 32, O>; -impl<'a, const O: u8> FREQUENCY_W<'a, O> { - #[doc = "125 kbps"] - #[inline(always)] - pub fn k125(self) -> &'a mut W { - self.variant(FREQUENCY_A::K125) - } - #[doc = "250 kbps"] - #[inline(always)] - pub fn k250(self) -> &'a mut W { - self.variant(FREQUENCY_A::K250) - } - #[doc = "500 kbps"] - #[inline(always)] - pub fn k500(self) -> &'a mut W { - self.variant(FREQUENCY_A::K500) - } - #[doc = "1 Mbps"] - #[inline(always)] - pub fn m1(self) -> &'a mut W { - self.variant(FREQUENCY_A::M1) - } - #[doc = "2 Mbps"] - #[inline(always)] - pub fn m2(self) -> &'a mut W { - self.variant(FREQUENCY_A::M2) - } - #[doc = "4 Mbps"] - #[inline(always)] - pub fn m4(self) -> &'a mut W { - self.variant(FREQUENCY_A::M4) - } - #[doc = "8 Mbps"] - #[inline(always)] - pub fn m8(self) -> &'a mut W { - self.variant(FREQUENCY_A::M8) - } -} -impl R { - #[doc = "Bits 0:31 - SPI master data rate"] - #[inline(always)] - pub fn frequency(&self) -> FREQUENCY_R { - FREQUENCY_R::new(self.bits) - } -} -impl W { - #[doc = "Bits 0:31 - SPI master data rate"] - #[inline(always)] - #[must_use] - pub fn frequency(&mut self) -> FREQUENCY_W<0> { - FREQUENCY_W::new(self) - } - #[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 = "SPI frequency. Accuracy depends on the HFCLK source selected.\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 [frequency](index.html) module"] -pub struct FREQUENCY_SPEC; -impl crate::RegisterSpec for FREQUENCY_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [frequency::R](R) reader structure"] -impl crate::Readable for FREQUENCY_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [frequency::W](W) writer structure"] -impl crate::Writable for FREQUENCY_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets FREQUENCY to value 0x0400_0000"] -impl crate::Resettable for FREQUENCY_SPEC { - const RESET_VALUE: Self::Ux = 0x0400_0000; -} diff --git a/down-the-stack/dk_pac/src/spim0/intenclr.rs b/down-the-stack/dk_pac/src/spim0/intenclr.rs deleted file mode 100644 index 46a7141..0000000 --- a/down-the-stack/dk_pac/src/spim0/intenclr.rs +++ /dev/null @@ -1,405 +0,0 @@ -#[doc = "Register `INTENCLR` 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 `INTENCLR` 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 `STOPPED` reader - Write '1' to disable interrupt for event STOPPED"] -pub type STOPPED_R = crate::BitReader; -#[doc = "Write '1' to disable interrupt for event STOPPED\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum STOPPED_A { - #[doc = "0: Read: Disabled"] - DISABLED = 0, - #[doc = "1: Read: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: STOPPED_A) -> Self { - variant as u8 != 0 - } -} -impl STOPPED_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> STOPPED_A { - match self.bits { - false => STOPPED_A::DISABLED, - true => STOPPED_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == STOPPED_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == STOPPED_A::ENABLED - } -} -#[doc = "Write '1' to disable interrupt for event STOPPED\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum STOPPED_AW { - #[doc = "1: Disable"] - CLEAR = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: STOPPED_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `STOPPED` writer - Write '1' to disable interrupt for event STOPPED"] -pub type STOPPED_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENCLR_SPEC, STOPPED_AW, O>; -impl<'a, const O: u8> STOPPED_W<'a, O> { - #[doc = "Disable"] - #[inline(always)] - pub fn clear(self) -> &'a mut W { - self.variant(STOPPED_AW::CLEAR) - } -} -#[doc = "Field `ENDRX` reader - Write '1' to disable interrupt for event ENDRX"] -pub type ENDRX_R = crate::BitReader; -#[doc = "Write '1' to disable interrupt for event ENDRX\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum ENDRX_A { - #[doc = "0: Read: Disabled"] - DISABLED = 0, - #[doc = "1: Read: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: ENDRX_A) -> Self { - variant as u8 != 0 - } -} -impl ENDRX_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> ENDRX_A { - match self.bits { - false => ENDRX_A::DISABLED, - true => ENDRX_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == ENDRX_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == ENDRX_A::ENABLED - } -} -#[doc = "Write '1' to disable interrupt for event ENDRX\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum ENDRX_AW { - #[doc = "1: Disable"] - CLEAR = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: ENDRX_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `ENDRX` writer - Write '1' to disable interrupt for event ENDRX"] -pub type ENDRX_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENCLR_SPEC, ENDRX_AW, O>; -impl<'a, const O: u8> ENDRX_W<'a, O> { - #[doc = "Disable"] - #[inline(always)] - pub fn clear(self) -> &'a mut W { - self.variant(ENDRX_AW::CLEAR) - } -} -#[doc = "Field `END` reader - Write '1' to disable interrupt for event END"] -pub type END_R = crate::BitReader; -#[doc = "Write '1' to disable interrupt for event END\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum END_A { - #[doc = "0: Read: Disabled"] - DISABLED = 0, - #[doc = "1: Read: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: END_A) -> Self { - variant as u8 != 0 - } -} -impl END_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> END_A { - match self.bits { - false => END_A::DISABLED, - true => END_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == END_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == END_A::ENABLED - } -} -#[doc = "Write '1' to disable interrupt for event END\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum END_AW { - #[doc = "1: Disable"] - CLEAR = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: END_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `END` writer - Write '1' to disable interrupt for event END"] -pub type END_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENCLR_SPEC, END_AW, O>; -impl<'a, const O: u8> END_W<'a, O> { - #[doc = "Disable"] - #[inline(always)] - pub fn clear(self) -> &'a mut W { - self.variant(END_AW::CLEAR) - } -} -#[doc = "Field `ENDTX` reader - Write '1' to disable interrupt for event ENDTX"] -pub type ENDTX_R = crate::BitReader; -#[doc = "Write '1' to disable interrupt for event ENDTX\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum ENDTX_A { - #[doc = "0: Read: Disabled"] - DISABLED = 0, - #[doc = "1: Read: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: ENDTX_A) -> Self { - variant as u8 != 0 - } -} -impl ENDTX_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> ENDTX_A { - match self.bits { - false => ENDTX_A::DISABLED, - true => ENDTX_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == ENDTX_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == ENDTX_A::ENABLED - } -} -#[doc = "Write '1' to disable interrupt for event ENDTX\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum ENDTX_AW { - #[doc = "1: Disable"] - CLEAR = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: ENDTX_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `ENDTX` writer - Write '1' to disable interrupt for event ENDTX"] -pub type ENDTX_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENCLR_SPEC, ENDTX_AW, O>; -impl<'a, const O: u8> ENDTX_W<'a, O> { - #[doc = "Disable"] - #[inline(always)] - pub fn clear(self) -> &'a mut W { - self.variant(ENDTX_AW::CLEAR) - } -} -#[doc = "Field `STARTED` reader - Write '1' to disable interrupt for event STARTED"] -pub type STARTED_R = crate::BitReader; -#[doc = "Write '1' to disable interrupt for event STARTED\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum STARTED_A { - #[doc = "0: Read: Disabled"] - DISABLED = 0, - #[doc = "1: Read: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: STARTED_A) -> Self { - variant as u8 != 0 - } -} -impl STARTED_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> STARTED_A { - match self.bits { - false => STARTED_A::DISABLED, - true => STARTED_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == STARTED_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == STARTED_A::ENABLED - } -} -#[doc = "Write '1' to disable interrupt for event STARTED\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum STARTED_AW { - #[doc = "1: Disable"] - CLEAR = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: STARTED_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `STARTED` writer - Write '1' to disable interrupt for event STARTED"] -pub type STARTED_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENCLR_SPEC, STARTED_AW, O>; -impl<'a, const O: u8> STARTED_W<'a, O> { - #[doc = "Disable"] - #[inline(always)] - pub fn clear(self) -> &'a mut W { - self.variant(STARTED_AW::CLEAR) - } -} -impl R { - #[doc = "Bit 1 - Write '1' to disable interrupt for event STOPPED"] - #[inline(always)] - pub fn stopped(&self) -> STOPPED_R { - STOPPED_R::new(((self.bits >> 1) & 1) != 0) - } - #[doc = "Bit 4 - Write '1' to disable interrupt for event ENDRX"] - #[inline(always)] - pub fn endrx(&self) -> ENDRX_R { - ENDRX_R::new(((self.bits >> 4) & 1) != 0) - } - #[doc = "Bit 6 - Write '1' to disable interrupt for event END"] - #[inline(always)] - pub fn end(&self) -> END_R { - END_R::new(((self.bits >> 6) & 1) != 0) - } - #[doc = "Bit 8 - Write '1' to disable interrupt for event ENDTX"] - #[inline(always)] - pub fn endtx(&self) -> ENDTX_R { - ENDTX_R::new(((self.bits >> 8) & 1) != 0) - } - #[doc = "Bit 19 - Write '1' to disable interrupt for event STARTED"] - #[inline(always)] - pub fn started(&self) -> STARTED_R { - STARTED_R::new(((self.bits >> 19) & 1) != 0) - } -} -impl W { - #[doc = "Bit 1 - Write '1' to disable interrupt for event STOPPED"] - #[inline(always)] - #[must_use] - pub fn stopped(&mut self) -> STOPPED_W<1> { - STOPPED_W::new(self) - } - #[doc = "Bit 4 - Write '1' to disable interrupt for event ENDRX"] - #[inline(always)] - #[must_use] - pub fn endrx(&mut self) -> ENDRX_W<4> { - ENDRX_W::new(self) - } - #[doc = "Bit 6 - Write '1' to disable interrupt for event END"] - #[inline(always)] - #[must_use] - pub fn end(&mut self) -> END_W<6> { - END_W::new(self) - } - #[doc = "Bit 8 - Write '1' to disable interrupt for event ENDTX"] - #[inline(always)] - #[must_use] - pub fn endtx(&mut self) -> ENDTX_W<8> { - ENDTX_W::new(self) - } - #[doc = "Bit 19 - Write '1' to disable interrupt for event STARTED"] - #[inline(always)] - #[must_use] - pub fn started(&mut self) -> STARTED_W<19> { - STARTED_W::new(self) - } - #[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 = "Disable interrupt\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 [intenclr](index.html) module"] -pub struct INTENCLR_SPEC; -impl crate::RegisterSpec for INTENCLR_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [intenclr::R](R) reader structure"] -impl crate::Readable for INTENCLR_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [intenclr::W](W) writer structure"] -impl crate::Writable for INTENCLR_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets INTENCLR to value 0"] -impl crate::Resettable for INTENCLR_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/spim0/intenset.rs b/down-the-stack/dk_pac/src/spim0/intenset.rs deleted file mode 100644 index 423b165..0000000 --- a/down-the-stack/dk_pac/src/spim0/intenset.rs +++ /dev/null @@ -1,405 +0,0 @@ -#[doc = "Register `INTENSET` 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 `INTENSET` 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 `STOPPED` reader - Write '1' to enable interrupt for event STOPPED"] -pub type STOPPED_R = crate::BitReader; -#[doc = "Write '1' to enable interrupt for event STOPPED\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum STOPPED_A { - #[doc = "0: Read: Disabled"] - DISABLED = 0, - #[doc = "1: Read: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: STOPPED_A) -> Self { - variant as u8 != 0 - } -} -impl STOPPED_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> STOPPED_A { - match self.bits { - false => STOPPED_A::DISABLED, - true => STOPPED_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == STOPPED_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == STOPPED_A::ENABLED - } -} -#[doc = "Write '1' to enable interrupt for event STOPPED\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum STOPPED_AW { - #[doc = "1: Enable"] - SET = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: STOPPED_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `STOPPED` writer - Write '1' to enable interrupt for event STOPPED"] -pub type STOPPED_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENSET_SPEC, STOPPED_AW, O>; -impl<'a, const O: u8> STOPPED_W<'a, O> { - #[doc = "Enable"] - #[inline(always)] - pub fn set(self) -> &'a mut W { - self.variant(STOPPED_AW::SET) - } -} -#[doc = "Field `ENDRX` reader - Write '1' to enable interrupt for event ENDRX"] -pub type ENDRX_R = crate::BitReader; -#[doc = "Write '1' to enable interrupt for event ENDRX\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum ENDRX_A { - #[doc = "0: Read: Disabled"] - DISABLED = 0, - #[doc = "1: Read: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: ENDRX_A) -> Self { - variant as u8 != 0 - } -} -impl ENDRX_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> ENDRX_A { - match self.bits { - false => ENDRX_A::DISABLED, - true => ENDRX_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == ENDRX_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == ENDRX_A::ENABLED - } -} -#[doc = "Write '1' to enable interrupt for event ENDRX\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum ENDRX_AW { - #[doc = "1: Enable"] - SET = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: ENDRX_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `ENDRX` writer - Write '1' to enable interrupt for event ENDRX"] -pub type ENDRX_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENSET_SPEC, ENDRX_AW, O>; -impl<'a, const O: u8> ENDRX_W<'a, O> { - #[doc = "Enable"] - #[inline(always)] - pub fn set(self) -> &'a mut W { - self.variant(ENDRX_AW::SET) - } -} -#[doc = "Field `END` reader - Write '1' to enable interrupt for event END"] -pub type END_R = crate::BitReader; -#[doc = "Write '1' to enable interrupt for event END\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum END_A { - #[doc = "0: Read: Disabled"] - DISABLED = 0, - #[doc = "1: Read: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: END_A) -> Self { - variant as u8 != 0 - } -} -impl END_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> END_A { - match self.bits { - false => END_A::DISABLED, - true => END_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == END_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == END_A::ENABLED - } -} -#[doc = "Write '1' to enable interrupt for event END\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum END_AW { - #[doc = "1: Enable"] - SET = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: END_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `END` writer - Write '1' to enable interrupt for event END"] -pub type END_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENSET_SPEC, END_AW, O>; -impl<'a, const O: u8> END_W<'a, O> { - #[doc = "Enable"] - #[inline(always)] - pub fn set(self) -> &'a mut W { - self.variant(END_AW::SET) - } -} -#[doc = "Field `ENDTX` reader - Write '1' to enable interrupt for event ENDTX"] -pub type ENDTX_R = crate::BitReader; -#[doc = "Write '1' to enable interrupt for event ENDTX\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum ENDTX_A { - #[doc = "0: Read: Disabled"] - DISABLED = 0, - #[doc = "1: Read: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: ENDTX_A) -> Self { - variant as u8 != 0 - } -} -impl ENDTX_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> ENDTX_A { - match self.bits { - false => ENDTX_A::DISABLED, - true => ENDTX_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == ENDTX_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == ENDTX_A::ENABLED - } -} -#[doc = "Write '1' to enable interrupt for event ENDTX\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum ENDTX_AW { - #[doc = "1: Enable"] - SET = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: ENDTX_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `ENDTX` writer - Write '1' to enable interrupt for event ENDTX"] -pub type ENDTX_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENSET_SPEC, ENDTX_AW, O>; -impl<'a, const O: u8> ENDTX_W<'a, O> { - #[doc = "Enable"] - #[inline(always)] - pub fn set(self) -> &'a mut W { - self.variant(ENDTX_AW::SET) - } -} -#[doc = "Field `STARTED` reader - Write '1' to enable interrupt for event STARTED"] -pub type STARTED_R = crate::BitReader; -#[doc = "Write '1' to enable interrupt for event STARTED\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum STARTED_A { - #[doc = "0: Read: Disabled"] - DISABLED = 0, - #[doc = "1: Read: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: STARTED_A) -> Self { - variant as u8 != 0 - } -} -impl STARTED_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> STARTED_A { - match self.bits { - false => STARTED_A::DISABLED, - true => STARTED_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == STARTED_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == STARTED_A::ENABLED - } -} -#[doc = "Write '1' to enable interrupt for event STARTED\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum STARTED_AW { - #[doc = "1: Enable"] - SET = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: STARTED_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `STARTED` writer - Write '1' to enable interrupt for event STARTED"] -pub type STARTED_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENSET_SPEC, STARTED_AW, O>; -impl<'a, const O: u8> STARTED_W<'a, O> { - #[doc = "Enable"] - #[inline(always)] - pub fn set(self) -> &'a mut W { - self.variant(STARTED_AW::SET) - } -} -impl R { - #[doc = "Bit 1 - Write '1' to enable interrupt for event STOPPED"] - #[inline(always)] - pub fn stopped(&self) -> STOPPED_R { - STOPPED_R::new(((self.bits >> 1) & 1) != 0) - } - #[doc = "Bit 4 - Write '1' to enable interrupt for event ENDRX"] - #[inline(always)] - pub fn endrx(&self) -> ENDRX_R { - ENDRX_R::new(((self.bits >> 4) & 1) != 0) - } - #[doc = "Bit 6 - Write '1' to enable interrupt for event END"] - #[inline(always)] - pub fn end(&self) -> END_R { - END_R::new(((self.bits >> 6) & 1) != 0) - } - #[doc = "Bit 8 - Write '1' to enable interrupt for event ENDTX"] - #[inline(always)] - pub fn endtx(&self) -> ENDTX_R { - ENDTX_R::new(((self.bits >> 8) & 1) != 0) - } - #[doc = "Bit 19 - Write '1' to enable interrupt for event STARTED"] - #[inline(always)] - pub fn started(&self) -> STARTED_R { - STARTED_R::new(((self.bits >> 19) & 1) != 0) - } -} -impl W { - #[doc = "Bit 1 - Write '1' to enable interrupt for event STOPPED"] - #[inline(always)] - #[must_use] - pub fn stopped(&mut self) -> STOPPED_W<1> { - STOPPED_W::new(self) - } - #[doc = "Bit 4 - Write '1' to enable interrupt for event ENDRX"] - #[inline(always)] - #[must_use] - pub fn endrx(&mut self) -> ENDRX_W<4> { - ENDRX_W::new(self) - } - #[doc = "Bit 6 - Write '1' to enable interrupt for event END"] - #[inline(always)] - #[must_use] - pub fn end(&mut self) -> END_W<6> { - END_W::new(self) - } - #[doc = "Bit 8 - Write '1' to enable interrupt for event ENDTX"] - #[inline(always)] - #[must_use] - pub fn endtx(&mut self) -> ENDTX_W<8> { - ENDTX_W::new(self) - } - #[doc = "Bit 19 - Write '1' to enable interrupt for event STARTED"] - #[inline(always)] - #[must_use] - pub fn started(&mut self) -> STARTED_W<19> { - STARTED_W::new(self) - } - #[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 = "Enable interrupt\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 [intenset](index.html) module"] -pub struct INTENSET_SPEC; -impl crate::RegisterSpec for INTENSET_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [intenset::R](R) reader structure"] -impl crate::Readable for INTENSET_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [intenset::W](W) writer structure"] -impl crate::Writable for INTENSET_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets INTENSET to value 0"] -impl crate::Resettable for INTENSET_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/spim0/orc.rs b/down-the-stack/dk_pac/src/spim0/orc.rs deleted file mode 100644 index e6471a8..0000000 --- a/down-the-stack/dk_pac/src/spim0/orc.rs +++ /dev/null @@ -1,80 +0,0 @@ -#[doc = "Register `ORC` 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 `ORC` 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 `ORC` reader - Over-read character. Character clocked out in case and over-read of the TXD buffer."] -pub type ORC_R = crate::FieldReader; -#[doc = "Field `ORC` writer - Over-read character. Character clocked out in case and over-read of the TXD buffer."] -pub type ORC_W<'a, const O: u8> = crate::FieldWriter<'a, u32, ORC_SPEC, u8, u8, 8, O>; -impl R { - #[doc = "Bits 0:7 - Over-read character. Character clocked out in case and over-read of the TXD buffer."] - #[inline(always)] - pub fn orc(&self) -> ORC_R { - ORC_R::new((self.bits & 0xff) as u8) - } -} -impl W { - #[doc = "Bits 0:7 - Over-read character. Character clocked out in case and over-read of the TXD buffer."] - #[inline(always)] - #[must_use] - pub fn orc(&mut self) -> ORC_W<0> { - ORC_W::new(self) - } - #[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 = "Over-read character. Character clocked out in case and over-read of the TXD buffer.\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 [orc](index.html) module"] -pub struct ORC_SPEC; -impl crate::RegisterSpec for ORC_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [orc::R](R) reader structure"] -impl crate::Readable for ORC_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [orc::W](W) writer structure"] -impl crate::Writable for ORC_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets ORC to value 0"] -impl crate::Resettable for ORC_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/spim0/psel.rs b/down-the-stack/dk_pac/src/spim0/psel.rs deleted file mode 100644 index fc62a65..0000000 --- a/down-the-stack/dk_pac/src/spim0/psel.rs +++ /dev/null @@ -1,22 +0,0 @@ -#[doc = r"Register block"] -#[repr(C)] -pub struct PSEL { - #[doc = "0x00 - Pin select for SCK"] - pub sck: SCK, - #[doc = "0x04 - Pin select for MOSI signal"] - pub mosi: MOSI, - #[doc = "0x08 - Pin select for MISO signal"] - pub miso: MISO, -} -#[doc = "SCK (rw) register accessor: an alias for `Reg`"] -pub type SCK = crate::Reg; -#[doc = "Pin select for SCK"] -pub mod sck; -#[doc = "MOSI (rw) register accessor: an alias for `Reg`"] -pub type MOSI = crate::Reg; -#[doc = "Pin select for MOSI signal"] -pub mod mosi; -#[doc = "MISO (rw) register accessor: an alias for `Reg`"] -pub type MISO = crate::Reg; -#[doc = "Pin select for MISO signal"] -pub mod miso; diff --git a/down-the-stack/dk_pac/src/spim0/psel/miso.rs b/down-the-stack/dk_pac/src/spim0/psel/miso.rs deleted file mode 100644 index d04a28b..0000000 --- a/down-the-stack/dk_pac/src/spim0/psel/miso.rs +++ /dev/null @@ -1,141 +0,0 @@ -#[doc = "Register `MISO` 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 `MISO` 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 `PIN` reader - Pin number"] -pub type PIN_R = crate::FieldReader; -#[doc = "Field `PIN` writer - Pin number"] -pub type PIN_W<'a, const O: u8> = crate::FieldWriter<'a, u32, MISO_SPEC, u8, u8, 5, O>; -#[doc = "Field `CONNECT` reader - Connection"] -pub type CONNECT_R = crate::BitReader; -#[doc = "Connection\n\nValue on reset: 1"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum CONNECT_A { - #[doc = "1: Disconnect"] - DISCONNECTED = 1, - #[doc = "0: Connect"] - CONNECTED = 0, -} -impl From for bool { - #[inline(always)] - fn from(variant: CONNECT_A) -> Self { - variant as u8 != 0 - } -} -impl CONNECT_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> CONNECT_A { - match self.bits { - true => CONNECT_A::DISCONNECTED, - false => CONNECT_A::CONNECTED, - } - } - #[doc = "Checks if the value of the field is `DISCONNECTED`"] - #[inline(always)] - pub fn is_disconnected(&self) -> bool { - *self == CONNECT_A::DISCONNECTED - } - #[doc = "Checks if the value of the field is `CONNECTED`"] - #[inline(always)] - pub fn is_connected(&self) -> bool { - *self == CONNECT_A::CONNECTED - } -} -#[doc = "Field `CONNECT` writer - Connection"] -pub type CONNECT_W<'a, const O: u8> = crate::BitWriter<'a, u32, MISO_SPEC, CONNECT_A, O>; -impl<'a, const O: u8> CONNECT_W<'a, O> { - #[doc = "Disconnect"] - #[inline(always)] - pub fn disconnected(self) -> &'a mut W { - self.variant(CONNECT_A::DISCONNECTED) - } - #[doc = "Connect"] - #[inline(always)] - pub fn connected(self) -> &'a mut W { - self.variant(CONNECT_A::CONNECTED) - } -} -impl R { - #[doc = "Bits 0:4 - Pin number"] - #[inline(always)] - pub fn pin(&self) -> PIN_R { - PIN_R::new((self.bits & 0x1f) as u8) - } - #[doc = "Bit 31 - Connection"] - #[inline(always)] - pub fn connect(&self) -> CONNECT_R { - CONNECT_R::new(((self.bits >> 31) & 1) != 0) - } -} -impl W { - #[doc = "Bits 0:4 - Pin number"] - #[inline(always)] - #[must_use] - pub fn pin(&mut self) -> PIN_W<0> { - PIN_W::new(self) - } - #[doc = "Bit 31 - Connection"] - #[inline(always)] - #[must_use] - pub fn connect(&mut self) -> CONNECT_W<31> { - CONNECT_W::new(self) - } - #[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 = "Pin select for MISO signal\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 [miso](index.html) module"] -pub struct MISO_SPEC; -impl crate::RegisterSpec for MISO_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [miso::R](R) reader structure"] -impl crate::Readable for MISO_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [miso::W](W) writer structure"] -impl crate::Writable for MISO_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets MISO to value 0xffff_ffff"] -impl crate::Resettable for MISO_SPEC { - const RESET_VALUE: Self::Ux = 0xffff_ffff; -} diff --git a/down-the-stack/dk_pac/src/spim0/psel/mosi.rs b/down-the-stack/dk_pac/src/spim0/psel/mosi.rs deleted file mode 100644 index 8c4f76f..0000000 --- a/down-the-stack/dk_pac/src/spim0/psel/mosi.rs +++ /dev/null @@ -1,141 +0,0 @@ -#[doc = "Register `MOSI` 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 `MOSI` 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 `PIN` reader - Pin number"] -pub type PIN_R = crate::FieldReader; -#[doc = "Field `PIN` writer - Pin number"] -pub type PIN_W<'a, const O: u8> = crate::FieldWriter<'a, u32, MOSI_SPEC, u8, u8, 5, O>; -#[doc = "Field `CONNECT` reader - Connection"] -pub type CONNECT_R = crate::BitReader; -#[doc = "Connection\n\nValue on reset: 1"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum CONNECT_A { - #[doc = "1: Disconnect"] - DISCONNECTED = 1, - #[doc = "0: Connect"] - CONNECTED = 0, -} -impl From for bool { - #[inline(always)] - fn from(variant: CONNECT_A) -> Self { - variant as u8 != 0 - } -} -impl CONNECT_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> CONNECT_A { - match self.bits { - true => CONNECT_A::DISCONNECTED, - false => CONNECT_A::CONNECTED, - } - } - #[doc = "Checks if the value of the field is `DISCONNECTED`"] - #[inline(always)] - pub fn is_disconnected(&self) -> bool { - *self == CONNECT_A::DISCONNECTED - } - #[doc = "Checks if the value of the field is `CONNECTED`"] - #[inline(always)] - pub fn is_connected(&self) -> bool { - *self == CONNECT_A::CONNECTED - } -} -#[doc = "Field `CONNECT` writer - Connection"] -pub type CONNECT_W<'a, const O: u8> = crate::BitWriter<'a, u32, MOSI_SPEC, CONNECT_A, O>; -impl<'a, const O: u8> CONNECT_W<'a, O> { - #[doc = "Disconnect"] - #[inline(always)] - pub fn disconnected(self) -> &'a mut W { - self.variant(CONNECT_A::DISCONNECTED) - } - #[doc = "Connect"] - #[inline(always)] - pub fn connected(self) -> &'a mut W { - self.variant(CONNECT_A::CONNECTED) - } -} -impl R { - #[doc = "Bits 0:4 - Pin number"] - #[inline(always)] - pub fn pin(&self) -> PIN_R { - PIN_R::new((self.bits & 0x1f) as u8) - } - #[doc = "Bit 31 - Connection"] - #[inline(always)] - pub fn connect(&self) -> CONNECT_R { - CONNECT_R::new(((self.bits >> 31) & 1) != 0) - } -} -impl W { - #[doc = "Bits 0:4 - Pin number"] - #[inline(always)] - #[must_use] - pub fn pin(&mut self) -> PIN_W<0> { - PIN_W::new(self) - } - #[doc = "Bit 31 - Connection"] - #[inline(always)] - #[must_use] - pub fn connect(&mut self) -> CONNECT_W<31> { - CONNECT_W::new(self) - } - #[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 = "Pin select for MOSI signal\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 [mosi](index.html) module"] -pub struct MOSI_SPEC; -impl crate::RegisterSpec for MOSI_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [mosi::R](R) reader structure"] -impl crate::Readable for MOSI_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [mosi::W](W) writer structure"] -impl crate::Writable for MOSI_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets MOSI to value 0xffff_ffff"] -impl crate::Resettable for MOSI_SPEC { - const RESET_VALUE: Self::Ux = 0xffff_ffff; -} diff --git a/down-the-stack/dk_pac/src/spim0/psel/sck.rs b/down-the-stack/dk_pac/src/spim0/psel/sck.rs deleted file mode 100644 index d1b7a9e..0000000 --- a/down-the-stack/dk_pac/src/spim0/psel/sck.rs +++ /dev/null @@ -1,141 +0,0 @@ -#[doc = "Register `SCK` 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 `SCK` 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 `PIN` reader - Pin number"] -pub type PIN_R = crate::FieldReader; -#[doc = "Field `PIN` writer - Pin number"] -pub type PIN_W<'a, const O: u8> = crate::FieldWriter<'a, u32, SCK_SPEC, u8, u8, 5, O>; -#[doc = "Field `CONNECT` reader - Connection"] -pub type CONNECT_R = crate::BitReader; -#[doc = "Connection\n\nValue on reset: 1"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum CONNECT_A { - #[doc = "1: Disconnect"] - DISCONNECTED = 1, - #[doc = "0: Connect"] - CONNECTED = 0, -} -impl From for bool { - #[inline(always)] - fn from(variant: CONNECT_A) -> Self { - variant as u8 != 0 - } -} -impl CONNECT_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> CONNECT_A { - match self.bits { - true => CONNECT_A::DISCONNECTED, - false => CONNECT_A::CONNECTED, - } - } - #[doc = "Checks if the value of the field is `DISCONNECTED`"] - #[inline(always)] - pub fn is_disconnected(&self) -> bool { - *self == CONNECT_A::DISCONNECTED - } - #[doc = "Checks if the value of the field is `CONNECTED`"] - #[inline(always)] - pub fn is_connected(&self) -> bool { - *self == CONNECT_A::CONNECTED - } -} -#[doc = "Field `CONNECT` writer - Connection"] -pub type CONNECT_W<'a, const O: u8> = crate::BitWriter<'a, u32, SCK_SPEC, CONNECT_A, O>; -impl<'a, const O: u8> CONNECT_W<'a, O> { - #[doc = "Disconnect"] - #[inline(always)] - pub fn disconnected(self) -> &'a mut W { - self.variant(CONNECT_A::DISCONNECTED) - } - #[doc = "Connect"] - #[inline(always)] - pub fn connected(self) -> &'a mut W { - self.variant(CONNECT_A::CONNECTED) - } -} -impl R { - #[doc = "Bits 0:4 - Pin number"] - #[inline(always)] - pub fn pin(&self) -> PIN_R { - PIN_R::new((self.bits & 0x1f) as u8) - } - #[doc = "Bit 31 - Connection"] - #[inline(always)] - pub fn connect(&self) -> CONNECT_R { - CONNECT_R::new(((self.bits >> 31) & 1) != 0) - } -} -impl W { - #[doc = "Bits 0:4 - Pin number"] - #[inline(always)] - #[must_use] - pub fn pin(&mut self) -> PIN_W<0> { - PIN_W::new(self) - } - #[doc = "Bit 31 - Connection"] - #[inline(always)] - #[must_use] - pub fn connect(&mut self) -> CONNECT_W<31> { - CONNECT_W::new(self) - } - #[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 = "Pin select for SCK\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 [sck](index.html) module"] -pub struct SCK_SPEC; -impl crate::RegisterSpec for SCK_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [sck::R](R) reader structure"] -impl crate::Readable for SCK_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [sck::W](W) writer structure"] -impl crate::Writable for SCK_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets SCK to value 0xffff_ffff"] -impl crate::Resettable for SCK_SPEC { - const RESET_VALUE: Self::Ux = 0xffff_ffff; -} diff --git a/down-the-stack/dk_pac/src/spim0/rxd.rs b/down-the-stack/dk_pac/src/spim0/rxd.rs deleted file mode 100644 index 6a26418..0000000 --- a/down-the-stack/dk_pac/src/spim0/rxd.rs +++ /dev/null @@ -1,28 +0,0 @@ -#[doc = r"Register block"] -#[repr(C)] -pub struct RXD { - #[doc = "0x00 - Data pointer"] - pub ptr: PTR, - #[doc = "0x04 - Maximum number of bytes in receive buffer"] - pub maxcnt: MAXCNT, - #[doc = "0x08 - Number of bytes transferred in the last transaction"] - pub amount: AMOUNT, - #[doc = "0x0c - EasyDMA list type"] - pub list: LIST, -} -#[doc = "PTR (rw) register accessor: an alias for `Reg`"] -pub type PTR = crate::Reg; -#[doc = "Data pointer"] -pub mod ptr; -#[doc = "MAXCNT (rw) register accessor: an alias for `Reg`"] -pub type MAXCNT = crate::Reg; -#[doc = "Maximum number of bytes in receive buffer"] -pub mod maxcnt; -#[doc = "AMOUNT (r) register accessor: an alias for `Reg`"] -pub type AMOUNT = crate::Reg; -#[doc = "Number of bytes transferred in the last transaction"] -pub mod amount; -#[doc = "LIST (rw) register accessor: an alias for `Reg`"] -pub type LIST = crate::Reg; -#[doc = "EasyDMA list type"] -pub mod list; diff --git a/down-the-stack/dk_pac/src/spim0/rxd/amount.rs b/down-the-stack/dk_pac/src/spim0/rxd/amount.rs deleted file mode 100644 index b48d827..0000000 --- a/down-the-stack/dk_pac/src/spim0/rxd/amount.rs +++ /dev/null @@ -1,37 +0,0 @@ -#[doc = "Register `AMOUNT` 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 = "Field `AMOUNT` reader - Number of bytes transferred in the last transaction"] -pub type AMOUNT_R = crate::FieldReader; -impl R { - #[doc = "Bits 0:7 - Number of bytes transferred in the last transaction"] - #[inline(always)] - pub fn amount(&self) -> AMOUNT_R { - AMOUNT_R::new((self.bits & 0xff) as u8) - } -} -#[doc = "Number of bytes transferred in the last transaction\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 [amount](index.html) module"] -pub struct AMOUNT_SPEC; -impl crate::RegisterSpec for AMOUNT_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [amount::R](R) reader structure"] -impl crate::Readable for AMOUNT_SPEC { - type Reader = R; -} -#[doc = "`reset()` method sets AMOUNT to value 0"] -impl crate::Resettable for AMOUNT_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/spim0/rxd/list.rs b/down-the-stack/dk_pac/src/spim0/rxd/list.rs deleted file mode 100644 index 05243a5..0000000 --- a/down-the-stack/dk_pac/src/spim0/rxd/list.rs +++ /dev/null @@ -1,128 +0,0 @@ -#[doc = "Register `LIST` 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 `LIST` 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 `LIST` reader - List type"] -pub type LIST_R = crate::FieldReader; -#[doc = "List type\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -#[repr(u8)] -pub enum LIST_A { - #[doc = "0: Disable EasyDMA list"] - DISABLED = 0, - #[doc = "1: Use array list"] - ARRAY_LIST = 1, -} -impl From for u8 { - #[inline(always)] - fn from(variant: LIST_A) -> Self { - variant as _ - } -} -impl LIST_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> Option { - match self.bits { - 0 => Some(LIST_A::DISABLED), - 1 => Some(LIST_A::ARRAY_LIST), - _ => None, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == LIST_A::DISABLED - } - #[doc = "Checks if the value of the field is `ARRAY_LIST`"] - #[inline(always)] - pub fn is_array_list(&self) -> bool { - *self == LIST_A::ARRAY_LIST - } -} -#[doc = "Field `LIST` writer - List type"] -pub type LIST_W<'a, const O: u8> = crate::FieldWriter<'a, u32, LIST_SPEC, u8, LIST_A, 3, O>; -impl<'a, const O: u8> LIST_W<'a, O> { - #[doc = "Disable EasyDMA list"] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(LIST_A::DISABLED) - } - #[doc = "Use array list"] - #[inline(always)] - pub fn array_list(self) -> &'a mut W { - self.variant(LIST_A::ARRAY_LIST) - } -} -impl R { - #[doc = "Bits 0:2 - List type"] - #[inline(always)] - pub fn list(&self) -> LIST_R { - LIST_R::new((self.bits & 7) as u8) - } -} -impl W { - #[doc = "Bits 0:2 - List type"] - #[inline(always)] - #[must_use] - pub fn list(&mut self) -> LIST_W<0> { - LIST_W::new(self) - } - #[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 = "EasyDMA list type\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 [list](index.html) module"] -pub struct LIST_SPEC; -impl crate::RegisterSpec for LIST_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [list::R](R) reader structure"] -impl crate::Readable for LIST_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [list::W](W) writer structure"] -impl crate::Writable for LIST_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets LIST to value 0"] -impl crate::Resettable for LIST_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/spim0/rxd/maxcnt.rs b/down-the-stack/dk_pac/src/spim0/rxd/maxcnt.rs deleted file mode 100644 index 7d9b79c..0000000 --- a/down-the-stack/dk_pac/src/spim0/rxd/maxcnt.rs +++ /dev/null @@ -1,80 +0,0 @@ -#[doc = "Register `MAXCNT` 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 `MAXCNT` 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 `MAXCNT` reader - Maximum number of bytes in receive buffer"] -pub type MAXCNT_R = crate::FieldReader; -#[doc = "Field `MAXCNT` writer - Maximum number of bytes in receive buffer"] -pub type MAXCNT_W<'a, const O: u8> = crate::FieldWriter<'a, u32, MAXCNT_SPEC, u8, u8, 8, O>; -impl R { - #[doc = "Bits 0:7 - Maximum number of bytes in receive buffer"] - #[inline(always)] - pub fn maxcnt(&self) -> MAXCNT_R { - MAXCNT_R::new((self.bits & 0xff) as u8) - } -} -impl W { - #[doc = "Bits 0:7 - Maximum number of bytes in receive buffer"] - #[inline(always)] - #[must_use] - pub fn maxcnt(&mut self) -> MAXCNT_W<0> { - MAXCNT_W::new(self) - } - #[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 = "Maximum number of bytes in receive buffer\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 [maxcnt](index.html) module"] -pub struct MAXCNT_SPEC; -impl crate::RegisterSpec for MAXCNT_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [maxcnt::R](R) reader structure"] -impl crate::Readable for MAXCNT_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [maxcnt::W](W) writer structure"] -impl crate::Writable for MAXCNT_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets MAXCNT to value 0"] -impl crate::Resettable for MAXCNT_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/spim0/rxd/ptr.rs b/down-the-stack/dk_pac/src/spim0/rxd/ptr.rs deleted file mode 100644 index 2f2c926..0000000 --- a/down-the-stack/dk_pac/src/spim0/rxd/ptr.rs +++ /dev/null @@ -1,80 +0,0 @@ -#[doc = "Register `PTR` 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 `PTR` 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 `PTR` reader - Data pointer"] -pub type PTR_R = crate::FieldReader; -#[doc = "Field `PTR` writer - Data pointer"] -pub type PTR_W<'a, const O: u8> = crate::FieldWriter<'a, u32, PTR_SPEC, u32, u32, 32, O>; -impl R { - #[doc = "Bits 0:31 - Data pointer"] - #[inline(always)] - pub fn ptr(&self) -> PTR_R { - PTR_R::new(self.bits) - } -} -impl W { - #[doc = "Bits 0:31 - Data pointer"] - #[inline(always)] - #[must_use] - pub fn ptr(&mut self) -> PTR_W<0> { - PTR_W::new(self) - } - #[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 = "Data pointer\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 [ptr](index.html) module"] -pub struct PTR_SPEC; -impl crate::RegisterSpec for PTR_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [ptr::R](R) reader structure"] -impl crate::Readable for PTR_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [ptr::W](W) writer structure"] -impl crate::Writable for PTR_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets PTR to value 0"] -impl crate::Resettable for PTR_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/spim0/shorts.rs b/down-the-stack/dk_pac/src/spim0/shorts.rs deleted file mode 100644 index b1ca2e3..0000000 --- a/down-the-stack/dk_pac/src/spim0/shorts.rs +++ /dev/null @@ -1,126 +0,0 @@ -#[doc = "Register `SHORTS` 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 `SHORTS` 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 `END_START` reader - Shortcut between event END and task START"] -pub type END_START_R = crate::BitReader; -#[doc = "Shortcut between event END and task START\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum END_START_A { - #[doc = "0: Disable shortcut"] - DISABLED = 0, - #[doc = "1: Enable shortcut"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: END_START_A) -> Self { - variant as u8 != 0 - } -} -impl END_START_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> END_START_A { - match self.bits { - false => END_START_A::DISABLED, - true => END_START_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == END_START_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == END_START_A::ENABLED - } -} -#[doc = "Field `END_START` writer - Shortcut between event END and task START"] -pub type END_START_W<'a, const O: u8> = crate::BitWriter<'a, u32, SHORTS_SPEC, END_START_A, O>; -impl<'a, const O: u8> END_START_W<'a, O> { - #[doc = "Disable shortcut"] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(END_START_A::DISABLED) - } - #[doc = "Enable shortcut"] - #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(END_START_A::ENABLED) - } -} -impl R { - #[doc = "Bit 17 - Shortcut between event END and task START"] - #[inline(always)] - pub fn end_start(&self) -> END_START_R { - END_START_R::new(((self.bits >> 17) & 1) != 0) - } -} -impl W { - #[doc = "Bit 17 - Shortcut between event END and task START"] - #[inline(always)] - #[must_use] - pub fn end_start(&mut self) -> END_START_W<17> { - END_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 - } -} -#[doc = "Shortcuts between local events and tasks\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 [shorts](index.html) module"] -pub struct SHORTS_SPEC; -impl crate::RegisterSpec for SHORTS_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [shorts::R](R) reader structure"] -impl crate::Readable for SHORTS_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [shorts::W](W) writer structure"] -impl crate::Writable for SHORTS_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets SHORTS to value 0"] -impl crate::Resettable for SHORTS_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/spim0/tasks_resume.rs b/down-the-stack/dk_pac/src/spim0/tasks_resume.rs deleted file mode 100644 index 2a2e100..0000000 --- a/down-the-stack/dk_pac/src/spim0/tasks_resume.rs +++ /dev/null @@ -1,72 +0,0 @@ -#[doc = "Register `TASKS_RESUME` 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 = "Resume SPI transaction\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum TASKS_RESUME_AW { - #[doc = "1: Trigger task"] - TRIGGER = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: TASKS_RESUME_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `TASKS_RESUME` writer - Resume SPI transaction"] -pub type TASKS_RESUME_W<'a, const O: u8> = - crate::BitWriter<'a, u32, TASKS_RESUME_SPEC, TASKS_RESUME_AW, O>; -impl<'a, const O: u8> TASKS_RESUME_W<'a, O> { - #[doc = "Trigger task"] - #[inline(always)] - pub fn trigger(self) -> &'a mut W { - self.variant(TASKS_RESUME_AW::TRIGGER) - } -} -impl W { - #[doc = "Bit 0 - Resume SPI transaction"] - #[inline(always)] - #[must_use] - pub fn tasks_resume(&mut self) -> TASKS_RESUME_W<0> { - TASKS_RESUME_W::new(self) - } - #[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 = "Resume SPI transaction\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 [tasks_resume](index.html) module"] -pub struct TASKS_RESUME_SPEC; -impl crate::RegisterSpec for TASKS_RESUME_SPEC { - type Ux = u32; -} -#[doc = "`write(|w| ..)` method takes [tasks_resume::W](W) writer structure"] -impl crate::Writable for TASKS_RESUME_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets TASKS_RESUME to value 0"] -impl crate::Resettable for TASKS_RESUME_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/spim0/tasks_start.rs b/down-the-stack/dk_pac/src/spim0/tasks_start.rs deleted file mode 100644 index 7a7f0a4..0000000 --- a/down-the-stack/dk_pac/src/spim0/tasks_start.rs +++ /dev/null @@ -1,72 +0,0 @@ -#[doc = "Register `TASKS_START` 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 = "Start SPI transaction\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum TASKS_START_AW { - #[doc = "1: Trigger task"] - TRIGGER = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: TASKS_START_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `TASKS_START` writer - Start SPI transaction"] -pub type TASKS_START_W<'a, const O: u8> = - crate::BitWriter<'a, u32, TASKS_START_SPEC, TASKS_START_AW, O>; -impl<'a, const O: u8> TASKS_START_W<'a, O> { - #[doc = "Trigger task"] - #[inline(always)] - pub fn trigger(self) -> &'a mut W { - self.variant(TASKS_START_AW::TRIGGER) - } -} -impl W { - #[doc = "Bit 0 - Start SPI transaction"] - #[inline(always)] - #[must_use] - pub fn tasks_start(&mut self) -> TASKS_START_W<0> { - TASKS_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 - } -} -#[doc = "Start SPI transaction\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 [tasks_start](index.html) module"] -pub struct TASKS_START_SPEC; -impl crate::RegisterSpec for TASKS_START_SPEC { - type Ux = u32; -} -#[doc = "`write(|w| ..)` method takes [tasks_start::W](W) writer structure"] -impl crate::Writable for TASKS_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 TASKS_START to value 0"] -impl crate::Resettable for TASKS_START_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/spim0/tasks_stop.rs b/down-the-stack/dk_pac/src/spim0/tasks_stop.rs deleted file mode 100644 index 02996d2..0000000 --- a/down-the-stack/dk_pac/src/spim0/tasks_stop.rs +++ /dev/null @@ -1,72 +0,0 @@ -#[doc = "Register `TASKS_STOP` 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 = "Stop SPI transaction\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum TASKS_STOP_AW { - #[doc = "1: Trigger task"] - TRIGGER = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: TASKS_STOP_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `TASKS_STOP` writer - Stop SPI transaction"] -pub type TASKS_STOP_W<'a, const O: u8> = - crate::BitWriter<'a, u32, TASKS_STOP_SPEC, TASKS_STOP_AW, O>; -impl<'a, const O: u8> TASKS_STOP_W<'a, O> { - #[doc = "Trigger task"] - #[inline(always)] - pub fn trigger(self) -> &'a mut W { - self.variant(TASKS_STOP_AW::TRIGGER) - } -} -impl W { - #[doc = "Bit 0 - Stop SPI transaction"] - #[inline(always)] - #[must_use] - pub fn tasks_stop(&mut self) -> TASKS_STOP_W<0> { - TASKS_STOP_W::new(self) - } - #[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 = "Stop SPI transaction\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 [tasks_stop](index.html) module"] -pub struct TASKS_STOP_SPEC; -impl crate::RegisterSpec for TASKS_STOP_SPEC { - type Ux = u32; -} -#[doc = "`write(|w| ..)` method takes [tasks_stop::W](W) writer structure"] -impl crate::Writable for TASKS_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 TASKS_STOP to value 0"] -impl crate::Resettable for TASKS_STOP_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/spim0/tasks_suspend.rs b/down-the-stack/dk_pac/src/spim0/tasks_suspend.rs deleted file mode 100644 index cc4b6ee..0000000 --- a/down-the-stack/dk_pac/src/spim0/tasks_suspend.rs +++ /dev/null @@ -1,72 +0,0 @@ -#[doc = "Register `TASKS_SUSPEND` 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 = "Suspend SPI transaction\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum TASKS_SUSPEND_AW { - #[doc = "1: Trigger task"] - TRIGGER = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: TASKS_SUSPEND_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `TASKS_SUSPEND` writer - Suspend SPI transaction"] -pub type TASKS_SUSPEND_W<'a, const O: u8> = - crate::BitWriter<'a, u32, TASKS_SUSPEND_SPEC, TASKS_SUSPEND_AW, O>; -impl<'a, const O: u8> TASKS_SUSPEND_W<'a, O> { - #[doc = "Trigger task"] - #[inline(always)] - pub fn trigger(self) -> &'a mut W { - self.variant(TASKS_SUSPEND_AW::TRIGGER) - } -} -impl W { - #[doc = "Bit 0 - Suspend SPI transaction"] - #[inline(always)] - #[must_use] - pub fn tasks_suspend(&mut self) -> TASKS_SUSPEND_W<0> { - TASKS_SUSPEND_W::new(self) - } - #[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 = "Suspend SPI transaction\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 [tasks_suspend](index.html) module"] -pub struct TASKS_SUSPEND_SPEC; -impl crate::RegisterSpec for TASKS_SUSPEND_SPEC { - type Ux = u32; -} -#[doc = "`write(|w| ..)` method takes [tasks_suspend::W](W) writer structure"] -impl crate::Writable for TASKS_SUSPEND_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets TASKS_SUSPEND to value 0"] -impl crate::Resettable for TASKS_SUSPEND_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/spim0/txd.rs b/down-the-stack/dk_pac/src/spim0/txd.rs deleted file mode 100644 index 19ea101..0000000 --- a/down-the-stack/dk_pac/src/spim0/txd.rs +++ /dev/null @@ -1,28 +0,0 @@ -#[doc = r"Register block"] -#[repr(C)] -pub struct TXD { - #[doc = "0x00 - Data pointer"] - pub ptr: PTR, - #[doc = "0x04 - Maximum number of bytes in transmit buffer"] - pub maxcnt: MAXCNT, - #[doc = "0x08 - Number of bytes transferred in the last transaction"] - pub amount: AMOUNT, - #[doc = "0x0c - EasyDMA list type"] - pub list: LIST, -} -#[doc = "PTR (rw) register accessor: an alias for `Reg`"] -pub type PTR = crate::Reg; -#[doc = "Data pointer"] -pub mod ptr; -#[doc = "MAXCNT (rw) register accessor: an alias for `Reg`"] -pub type MAXCNT = crate::Reg; -#[doc = "Maximum number of bytes in transmit buffer"] -pub mod maxcnt; -#[doc = "AMOUNT (r) register accessor: an alias for `Reg`"] -pub type AMOUNT = crate::Reg; -#[doc = "Number of bytes transferred in the last transaction"] -pub mod amount; -#[doc = "LIST (rw) register accessor: an alias for `Reg`"] -pub type LIST = crate::Reg; -#[doc = "EasyDMA list type"] -pub mod list; diff --git a/down-the-stack/dk_pac/src/spim0/txd/amount.rs b/down-the-stack/dk_pac/src/spim0/txd/amount.rs deleted file mode 100644 index b48d827..0000000 --- a/down-the-stack/dk_pac/src/spim0/txd/amount.rs +++ /dev/null @@ -1,37 +0,0 @@ -#[doc = "Register `AMOUNT` 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 = "Field `AMOUNT` reader - Number of bytes transferred in the last transaction"] -pub type AMOUNT_R = crate::FieldReader; -impl R { - #[doc = "Bits 0:7 - Number of bytes transferred in the last transaction"] - #[inline(always)] - pub fn amount(&self) -> AMOUNT_R { - AMOUNT_R::new((self.bits & 0xff) as u8) - } -} -#[doc = "Number of bytes transferred in the last transaction\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 [amount](index.html) module"] -pub struct AMOUNT_SPEC; -impl crate::RegisterSpec for AMOUNT_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [amount::R](R) reader structure"] -impl crate::Readable for AMOUNT_SPEC { - type Reader = R; -} -#[doc = "`reset()` method sets AMOUNT to value 0"] -impl crate::Resettable for AMOUNT_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/spim0/txd/list.rs b/down-the-stack/dk_pac/src/spim0/txd/list.rs deleted file mode 100644 index 05243a5..0000000 --- a/down-the-stack/dk_pac/src/spim0/txd/list.rs +++ /dev/null @@ -1,128 +0,0 @@ -#[doc = "Register `LIST` 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 `LIST` 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 `LIST` reader - List type"] -pub type LIST_R = crate::FieldReader; -#[doc = "List type\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -#[repr(u8)] -pub enum LIST_A { - #[doc = "0: Disable EasyDMA list"] - DISABLED = 0, - #[doc = "1: Use array list"] - ARRAY_LIST = 1, -} -impl From for u8 { - #[inline(always)] - fn from(variant: LIST_A) -> Self { - variant as _ - } -} -impl LIST_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> Option { - match self.bits { - 0 => Some(LIST_A::DISABLED), - 1 => Some(LIST_A::ARRAY_LIST), - _ => None, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == LIST_A::DISABLED - } - #[doc = "Checks if the value of the field is `ARRAY_LIST`"] - #[inline(always)] - pub fn is_array_list(&self) -> bool { - *self == LIST_A::ARRAY_LIST - } -} -#[doc = "Field `LIST` writer - List type"] -pub type LIST_W<'a, const O: u8> = crate::FieldWriter<'a, u32, LIST_SPEC, u8, LIST_A, 3, O>; -impl<'a, const O: u8> LIST_W<'a, O> { - #[doc = "Disable EasyDMA list"] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(LIST_A::DISABLED) - } - #[doc = "Use array list"] - #[inline(always)] - pub fn array_list(self) -> &'a mut W { - self.variant(LIST_A::ARRAY_LIST) - } -} -impl R { - #[doc = "Bits 0:2 - List type"] - #[inline(always)] - pub fn list(&self) -> LIST_R { - LIST_R::new((self.bits & 7) as u8) - } -} -impl W { - #[doc = "Bits 0:2 - List type"] - #[inline(always)] - #[must_use] - pub fn list(&mut self) -> LIST_W<0> { - LIST_W::new(self) - } - #[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 = "EasyDMA list type\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 [list](index.html) module"] -pub struct LIST_SPEC; -impl crate::RegisterSpec for LIST_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [list::R](R) reader structure"] -impl crate::Readable for LIST_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [list::W](W) writer structure"] -impl crate::Writable for LIST_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets LIST to value 0"] -impl crate::Resettable for LIST_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/spim0/txd/maxcnt.rs b/down-the-stack/dk_pac/src/spim0/txd/maxcnt.rs deleted file mode 100644 index 084733c..0000000 --- a/down-the-stack/dk_pac/src/spim0/txd/maxcnt.rs +++ /dev/null @@ -1,80 +0,0 @@ -#[doc = "Register `MAXCNT` 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 `MAXCNT` 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 `MAXCNT` reader - Maximum number of bytes in transmit buffer"] -pub type MAXCNT_R = crate::FieldReader; -#[doc = "Field `MAXCNT` writer - Maximum number of bytes in transmit buffer"] -pub type MAXCNT_W<'a, const O: u8> = crate::FieldWriter<'a, u32, MAXCNT_SPEC, u8, u8, 8, O>; -impl R { - #[doc = "Bits 0:7 - Maximum number of bytes in transmit buffer"] - #[inline(always)] - pub fn maxcnt(&self) -> MAXCNT_R { - MAXCNT_R::new((self.bits & 0xff) as u8) - } -} -impl W { - #[doc = "Bits 0:7 - Maximum number of bytes in transmit buffer"] - #[inline(always)] - #[must_use] - pub fn maxcnt(&mut self) -> MAXCNT_W<0> { - MAXCNT_W::new(self) - } - #[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 = "Maximum number of bytes in transmit buffer\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 [maxcnt](index.html) module"] -pub struct MAXCNT_SPEC; -impl crate::RegisterSpec for MAXCNT_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [maxcnt::R](R) reader structure"] -impl crate::Readable for MAXCNT_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [maxcnt::W](W) writer structure"] -impl crate::Writable for MAXCNT_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets MAXCNT to value 0"] -impl crate::Resettable for MAXCNT_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/spim0/txd/ptr.rs b/down-the-stack/dk_pac/src/spim0/txd/ptr.rs deleted file mode 100644 index 2f2c926..0000000 --- a/down-the-stack/dk_pac/src/spim0/txd/ptr.rs +++ /dev/null @@ -1,80 +0,0 @@ -#[doc = "Register `PTR` 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 `PTR` 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 `PTR` reader - Data pointer"] -pub type PTR_R = crate::FieldReader; -#[doc = "Field `PTR` writer - Data pointer"] -pub type PTR_W<'a, const O: u8> = crate::FieldWriter<'a, u32, PTR_SPEC, u32, u32, 32, O>; -impl R { - #[doc = "Bits 0:31 - Data pointer"] - #[inline(always)] - pub fn ptr(&self) -> PTR_R { - PTR_R::new(self.bits) - } -} -impl W { - #[doc = "Bits 0:31 - Data pointer"] - #[inline(always)] - #[must_use] - pub fn ptr(&mut self) -> PTR_W<0> { - PTR_W::new(self) - } - #[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 = "Data pointer\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 [ptr](index.html) module"] -pub struct PTR_SPEC; -impl crate::RegisterSpec for PTR_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [ptr::R](R) reader structure"] -impl crate::Readable for PTR_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [ptr::W](W) writer structure"] -impl crate::Writable for PTR_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets PTR to value 0"] -impl crate::Resettable for PTR_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/spis0.rs b/down-the-stack/dk_pac/src/spis0.rs deleted file mode 100644 index 95c21b0..0000000 --- a/down-the-stack/dk_pac/src/spis0.rs +++ /dev/null @@ -1,124 +0,0 @@ -#[doc = r"Register block"] -#[repr(C)] -pub struct RegisterBlock { - _reserved0: [u8; 0x24], - #[doc = "0x24 - Acquire SPI semaphore"] - pub tasks_acquire: TASKS_ACQUIRE, - #[doc = "0x28 - Release SPI semaphore, enabling the SPI slave to acquire it"] - pub tasks_release: TASKS_RELEASE, - _reserved2: [u8; 0xd8], - #[doc = "0x104 - Granted transaction completed"] - pub events_end: EVENTS_END, - _reserved3: [u8; 0x08], - #[doc = "0x110 - End of RXD buffer reached"] - pub events_endrx: EVENTS_ENDRX, - _reserved4: [u8; 0x14], - #[doc = "0x128 - Semaphore acquired"] - pub events_acquired: EVENTS_ACQUIRED, - _reserved5: [u8; 0xd4], - #[doc = "0x200 - Shortcuts between local events and tasks"] - pub shorts: SHORTS, - _reserved6: [u8; 0x0100], - #[doc = "0x304 - Enable interrupt"] - pub intenset: INTENSET, - #[doc = "0x308 - Disable interrupt"] - pub intenclr: INTENCLR, - _reserved8: [u8; 0xf4], - #[doc = "0x400 - Semaphore status register"] - pub semstat: SEMSTAT, - _reserved9: [u8; 0x3c], - #[doc = "0x440 - Status from last transaction"] - pub status: STATUS, - _reserved10: [u8; 0xbc], - #[doc = "0x500 - Enable SPI slave"] - pub enable: ENABLE, - _reserved11: [u8; 0x04], - #[doc = "0x508..0x518 - Unspecified"] - pub psel: PSEL, - _reserved12: [u8; 0x1c], - #[doc = "0x534..0x540 - Unspecified"] - pub rxd: RXD, - _reserved13: [u8; 0x04], - #[doc = "0x544..0x550 - Unspecified"] - pub txd: TXD, - _reserved14: [u8; 0x04], - #[doc = "0x554 - Configuration register"] - pub config: CONFIG, - _reserved15: [u8; 0x04], - #[doc = "0x55c - Default character. Character clocked out in case of an ignored transaction."] - pub def: DEF, - _reserved16: [u8; 0x60], - #[doc = "0x5c0 - Over-read character"] - pub orc: ORC, -} -#[doc = "TASKS_ACQUIRE (w) register accessor: an alias for `Reg`"] -pub type TASKS_ACQUIRE = crate::Reg; -#[doc = "Acquire SPI semaphore"] -pub mod tasks_acquire; -#[doc = "TASKS_RELEASE (w) register accessor: an alias for `Reg`"] -pub type TASKS_RELEASE = crate::Reg; -#[doc = "Release SPI semaphore, enabling the SPI slave to acquire it"] -pub mod tasks_release; -#[doc = "EVENTS_END (rw) register accessor: an alias for `Reg`"] -pub type EVENTS_END = crate::Reg; -#[doc = "Granted transaction completed"] -pub mod events_end; -#[doc = "EVENTS_ENDRX (rw) register accessor: an alias for `Reg`"] -pub type EVENTS_ENDRX = crate::Reg; -#[doc = "End of RXD buffer reached"] -pub mod events_endrx; -#[doc = "EVENTS_ACQUIRED (rw) register accessor: an alias for `Reg`"] -pub type EVENTS_ACQUIRED = crate::Reg; -#[doc = "Semaphore acquired"] -pub mod events_acquired; -#[doc = "SHORTS (rw) register accessor: an alias for `Reg`"] -pub type SHORTS = crate::Reg; -#[doc = "Shortcuts between local events and tasks"] -pub mod shorts; -#[doc = "INTENSET (rw) register accessor: an alias for `Reg`"] -pub type INTENSET = crate::Reg; -#[doc = "Enable interrupt"] -pub mod intenset; -#[doc = "INTENCLR (rw) register accessor: an alias for `Reg`"] -pub type INTENCLR = crate::Reg; -#[doc = "Disable interrupt"] -pub mod intenclr; -#[doc = "SEMSTAT (r) register accessor: an alias for `Reg`"] -pub type SEMSTAT = crate::Reg; -#[doc = "Semaphore status register"] -pub mod semstat; -#[doc = "STATUS (rw) register accessor: an alias for `Reg`"] -pub type STATUS = crate::Reg; -#[doc = "Status from last transaction"] -pub mod status; -#[doc = "ENABLE (rw) register accessor: an alias for `Reg`"] -pub type ENABLE = crate::Reg; -#[doc = "Enable SPI slave"] -pub mod enable; -#[doc = "Unspecified"] -pub use self::psel::PSEL; -#[doc = r"Cluster"] -#[doc = "Unspecified"] -pub mod psel; -#[doc = "Unspecified"] -pub use self::rxd::RXD; -#[doc = r"Cluster"] -#[doc = "Unspecified"] -pub mod rxd; -#[doc = "Unspecified"] -pub use self::txd::TXD; -#[doc = r"Cluster"] -#[doc = "Unspecified"] -pub mod txd; -#[doc = "CONFIG (rw) register accessor: an alias for `Reg`"] -pub type CONFIG = crate::Reg; -#[doc = "Configuration register"] -pub mod config; -#[doc = "DEF (rw) register accessor: an alias for `Reg`"] -pub type DEF = crate::Reg; -#[doc = "Default character. Character clocked out in case of an ignored transaction."] -pub mod def; -#[doc = "ORC (rw) register accessor: an alias for `Reg`"] -pub type ORC = crate::Reg; -#[doc = "Over-read character"] -pub mod orc; diff --git a/down-the-stack/dk_pac/src/spis0/config.rs b/down-the-stack/dk_pac/src/spis0/config.rs deleted file mode 100644 index daad954..0000000 --- a/down-the-stack/dk_pac/src/spis0/config.rs +++ /dev/null @@ -1,248 +0,0 @@ -#[doc = "Register `CONFIG` 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 `CONFIG` 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 `ORDER` reader - Bit order"] -pub type ORDER_R = crate::BitReader; -#[doc = "Bit order\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum ORDER_A { - #[doc = "0: Most significant bit shifted out first"] - MSB_FIRST = 0, - #[doc = "1: Least significant bit shifted out first"] - LSB_FIRST = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: ORDER_A) -> Self { - variant as u8 != 0 - } -} -impl ORDER_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> ORDER_A { - match self.bits { - false => ORDER_A::MSB_FIRST, - true => ORDER_A::LSB_FIRST, - } - } - #[doc = "Checks if the value of the field is `MSB_FIRST`"] - #[inline(always)] - pub fn is_msb_first(&self) -> bool { - *self == ORDER_A::MSB_FIRST - } - #[doc = "Checks if the value of the field is `LSB_FIRST`"] - #[inline(always)] - pub fn is_lsb_first(&self) -> bool { - *self == ORDER_A::LSB_FIRST - } -} -#[doc = "Field `ORDER` writer - Bit order"] -pub type ORDER_W<'a, const O: u8> = crate::BitWriter<'a, u32, CONFIG_SPEC, ORDER_A, O>; -impl<'a, const O: u8> ORDER_W<'a, O> { - #[doc = "Most significant bit shifted out first"] - #[inline(always)] - pub fn msb_first(self) -> &'a mut W { - self.variant(ORDER_A::MSB_FIRST) - } - #[doc = "Least significant bit shifted out first"] - #[inline(always)] - pub fn lsb_first(self) -> &'a mut W { - self.variant(ORDER_A::LSB_FIRST) - } -} -#[doc = "Field `CPHA` reader - Serial clock (SCK) phase"] -pub type CPHA_R = crate::BitReader; -#[doc = "Serial clock (SCK) phase\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum CPHA_A { - #[doc = "0: Sample on leading edge of clock, shift serial data on trailing edge"] - LEADING = 0, - #[doc = "1: Sample on trailing edge of clock, shift serial data on leading edge"] - TRAILING = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: CPHA_A) -> Self { - variant as u8 != 0 - } -} -impl CPHA_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> CPHA_A { - match self.bits { - false => CPHA_A::LEADING, - true => CPHA_A::TRAILING, - } - } - #[doc = "Checks if the value of the field is `LEADING`"] - #[inline(always)] - pub fn is_leading(&self) -> bool { - *self == CPHA_A::LEADING - } - #[doc = "Checks if the value of the field is `TRAILING`"] - #[inline(always)] - pub fn is_trailing(&self) -> bool { - *self == CPHA_A::TRAILING - } -} -#[doc = "Field `CPHA` writer - Serial clock (SCK) phase"] -pub type CPHA_W<'a, const O: u8> = crate::BitWriter<'a, u32, CONFIG_SPEC, CPHA_A, O>; -impl<'a, const O: u8> CPHA_W<'a, O> { - #[doc = "Sample on leading edge of clock, shift serial data on trailing edge"] - #[inline(always)] - pub fn leading(self) -> &'a mut W { - self.variant(CPHA_A::LEADING) - } - #[doc = "Sample on trailing edge of clock, shift serial data on leading edge"] - #[inline(always)] - pub fn trailing(self) -> &'a mut W { - self.variant(CPHA_A::TRAILING) - } -} -#[doc = "Field `CPOL` reader - Serial clock (SCK) polarity"] -pub type CPOL_R = crate::BitReader; -#[doc = "Serial clock (SCK) polarity\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum CPOL_A { - #[doc = "0: Active high"] - ACTIVE_HIGH = 0, - #[doc = "1: Active low"] - ACTIVE_LOW = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: CPOL_A) -> Self { - variant as u8 != 0 - } -} -impl CPOL_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> CPOL_A { - match self.bits { - false => CPOL_A::ACTIVE_HIGH, - true => CPOL_A::ACTIVE_LOW, - } - } - #[doc = "Checks if the value of the field is `ACTIVE_HIGH`"] - #[inline(always)] - pub fn is_active_high(&self) -> bool { - *self == CPOL_A::ACTIVE_HIGH - } - #[doc = "Checks if the value of the field is `ACTIVE_LOW`"] - #[inline(always)] - pub fn is_active_low(&self) -> bool { - *self == CPOL_A::ACTIVE_LOW - } -} -#[doc = "Field `CPOL` writer - Serial clock (SCK) polarity"] -pub type CPOL_W<'a, const O: u8> = crate::BitWriter<'a, u32, CONFIG_SPEC, CPOL_A, O>; -impl<'a, const O: u8> CPOL_W<'a, O> { - #[doc = "Active high"] - #[inline(always)] - pub fn active_high(self) -> &'a mut W { - self.variant(CPOL_A::ACTIVE_HIGH) - } - #[doc = "Active low"] - #[inline(always)] - pub fn active_low(self) -> &'a mut W { - self.variant(CPOL_A::ACTIVE_LOW) - } -} -impl R { - #[doc = "Bit 0 - Bit order"] - #[inline(always)] - pub fn order(&self) -> ORDER_R { - ORDER_R::new((self.bits & 1) != 0) - } - #[doc = "Bit 1 - Serial clock (SCK) phase"] - #[inline(always)] - pub fn cpha(&self) -> CPHA_R { - CPHA_R::new(((self.bits >> 1) & 1) != 0) - } - #[doc = "Bit 2 - Serial clock (SCK) polarity"] - #[inline(always)] - pub fn cpol(&self) -> CPOL_R { - CPOL_R::new(((self.bits >> 2) & 1) != 0) - } -} -impl W { - #[doc = "Bit 0 - Bit order"] - #[inline(always)] - #[must_use] - pub fn order(&mut self) -> ORDER_W<0> { - ORDER_W::new(self) - } - #[doc = "Bit 1 - Serial clock (SCK) phase"] - #[inline(always)] - #[must_use] - pub fn cpha(&mut self) -> CPHA_W<1> { - CPHA_W::new(self) - } - #[doc = "Bit 2 - Serial clock (SCK) polarity"] - #[inline(always)] - #[must_use] - pub fn cpol(&mut self) -> CPOL_W<2> { - CPOL_W::new(self) - } - #[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 = "Configuration register\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 [config](index.html) module"] -pub struct CONFIG_SPEC; -impl crate::RegisterSpec for CONFIG_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [config::R](R) reader structure"] -impl crate::Readable for CONFIG_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [config::W](W) writer structure"] -impl crate::Writable for 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 CONFIG to value 0"] -impl crate::Resettable for CONFIG_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/spis0/def.rs b/down-the-stack/dk_pac/src/spis0/def.rs deleted file mode 100644 index f868e92..0000000 --- a/down-the-stack/dk_pac/src/spis0/def.rs +++ /dev/null @@ -1,80 +0,0 @@ -#[doc = "Register `DEF` 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 `DEF` 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 `DEF` reader - Default character. Character clocked out in case of an ignored transaction."] -pub type DEF_R = crate::FieldReader; -#[doc = "Field `DEF` writer - Default character. Character clocked out in case of an ignored transaction."] -pub type DEF_W<'a, const O: u8> = crate::FieldWriter<'a, u32, DEF_SPEC, u8, u8, 8, O>; -impl R { - #[doc = "Bits 0:7 - Default character. Character clocked out in case of an ignored transaction."] - #[inline(always)] - pub fn def(&self) -> DEF_R { - DEF_R::new((self.bits & 0xff) as u8) - } -} -impl W { - #[doc = "Bits 0:7 - Default character. Character clocked out in case of an ignored transaction."] - #[inline(always)] - #[must_use] - pub fn def(&mut self) -> DEF_W<0> { - DEF_W::new(self) - } - #[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 = "Default character. Character clocked out in case of an ignored transaction.\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 [def](index.html) module"] -pub struct DEF_SPEC; -impl crate::RegisterSpec for DEF_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [def::R](R) reader structure"] -impl crate::Readable for DEF_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [def::W](W) writer structure"] -impl crate::Writable for DEF_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets DEF to value 0"] -impl crate::Resettable for DEF_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/spis0/enable.rs b/down-the-stack/dk_pac/src/spis0/enable.rs deleted file mode 100644 index 83a999f..0000000 --- a/down-the-stack/dk_pac/src/spis0/enable.rs +++ /dev/null @@ -1,128 +0,0 @@ -#[doc = "Register `ENABLE` 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 `ENABLE` 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 `ENABLE` reader - Enable or disable SPI slave"] -pub type ENABLE_R = crate::FieldReader; -#[doc = "Enable or disable SPI slave\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -#[repr(u8)] -pub enum ENABLE_A { - #[doc = "0: Disable SPI slave"] - DISABLED = 0, - #[doc = "2: Enable SPI slave"] - ENABLED = 2, -} -impl From for u8 { - #[inline(always)] - fn from(variant: ENABLE_A) -> Self { - variant as _ - } -} -impl ENABLE_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> Option { - match self.bits { - 0 => Some(ENABLE_A::DISABLED), - 2 => Some(ENABLE_A::ENABLED), - _ => None, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == ENABLE_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == ENABLE_A::ENABLED - } -} -#[doc = "Field `ENABLE` writer - Enable or disable SPI slave"] -pub type ENABLE_W<'a, const O: u8> = crate::FieldWriter<'a, u32, ENABLE_SPEC, u8, ENABLE_A, 4, O>; -impl<'a, const O: u8> ENABLE_W<'a, O> { - #[doc = "Disable SPI slave"] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(ENABLE_A::DISABLED) - } - #[doc = "Enable SPI slave"] - #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(ENABLE_A::ENABLED) - } -} -impl R { - #[doc = "Bits 0:3 - Enable or disable SPI slave"] - #[inline(always)] - pub fn enable(&self) -> ENABLE_R { - ENABLE_R::new((self.bits & 0x0f) as u8) - } -} -impl W { - #[doc = "Bits 0:3 - Enable or disable SPI slave"] - #[inline(always)] - #[must_use] - pub fn enable(&mut self) -> ENABLE_W<0> { - 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 - } -} -#[doc = "Enable SPI slave\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 [enable](index.html) module"] -pub struct ENABLE_SPEC; -impl crate::RegisterSpec for ENABLE_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [enable::R](R) reader structure"] -impl crate::Readable for ENABLE_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [enable::W](W) writer structure"] -impl crate::Writable for ENABLE_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets ENABLE to value 0"] -impl crate::Resettable for ENABLE_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/spis0/events_acquired.rs b/down-the-stack/dk_pac/src/spis0/events_acquired.rs deleted file mode 100644 index ccd9ca2..0000000 --- a/down-the-stack/dk_pac/src/spis0/events_acquired.rs +++ /dev/null @@ -1,127 +0,0 @@ -#[doc = "Register `EVENTS_ACQUIRED` 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 `EVENTS_ACQUIRED` 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 `EVENTS_ACQUIRED` reader - Semaphore acquired"] -pub type EVENTS_ACQUIRED_R = crate::BitReader; -#[doc = "Semaphore acquired\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum EVENTS_ACQUIRED_A { - #[doc = "0: Event not generated"] - NOT_GENERATED = 0, - #[doc = "1: Event generated"] - GENERATED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: EVENTS_ACQUIRED_A) -> Self { - variant as u8 != 0 - } -} -impl EVENTS_ACQUIRED_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> EVENTS_ACQUIRED_A { - match self.bits { - false => EVENTS_ACQUIRED_A::NOT_GENERATED, - true => EVENTS_ACQUIRED_A::GENERATED, - } - } - #[doc = "Checks if the value of the field is `NOT_GENERATED`"] - #[inline(always)] - pub fn is_not_generated(&self) -> bool { - *self == EVENTS_ACQUIRED_A::NOT_GENERATED - } - #[doc = "Checks if the value of the field is `GENERATED`"] - #[inline(always)] - pub fn is_generated(&self) -> bool { - *self == EVENTS_ACQUIRED_A::GENERATED - } -} -#[doc = "Field `EVENTS_ACQUIRED` writer - Semaphore acquired"] -pub type EVENTS_ACQUIRED_W<'a, const O: u8> = - crate::BitWriter<'a, u32, EVENTS_ACQUIRED_SPEC, EVENTS_ACQUIRED_A, O>; -impl<'a, const O: u8> EVENTS_ACQUIRED_W<'a, O> { - #[doc = "Event not generated"] - #[inline(always)] - pub fn not_generated(self) -> &'a mut W { - self.variant(EVENTS_ACQUIRED_A::NOT_GENERATED) - } - #[doc = "Event generated"] - #[inline(always)] - pub fn generated(self) -> &'a mut W { - self.variant(EVENTS_ACQUIRED_A::GENERATED) - } -} -impl R { - #[doc = "Bit 0 - Semaphore acquired"] - #[inline(always)] - pub fn events_acquired(&self) -> EVENTS_ACQUIRED_R { - EVENTS_ACQUIRED_R::new((self.bits & 1) != 0) - } -} -impl W { - #[doc = "Bit 0 - Semaphore acquired"] - #[inline(always)] - #[must_use] - pub fn events_acquired(&mut self) -> EVENTS_ACQUIRED_W<0> { - EVENTS_ACQUIRED_W::new(self) - } - #[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 = "Semaphore acquired\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 [events_acquired](index.html) module"] -pub struct EVENTS_ACQUIRED_SPEC; -impl crate::RegisterSpec for EVENTS_ACQUIRED_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [events_acquired::R](R) reader structure"] -impl crate::Readable for EVENTS_ACQUIRED_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [events_acquired::W](W) writer structure"] -impl crate::Writable for EVENTS_ACQUIRED_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets EVENTS_ACQUIRED to value 0"] -impl crate::Resettable for EVENTS_ACQUIRED_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/spis0/events_end.rs b/down-the-stack/dk_pac/src/spis0/events_end.rs deleted file mode 100644 index 82f180c..0000000 --- a/down-the-stack/dk_pac/src/spis0/events_end.rs +++ /dev/null @@ -1,127 +0,0 @@ -#[doc = "Register `EVENTS_END` 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 `EVENTS_END` 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 `EVENTS_END` reader - Granted transaction completed"] -pub type EVENTS_END_R = crate::BitReader; -#[doc = "Granted transaction completed\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum EVENTS_END_A { - #[doc = "0: Event not generated"] - NOT_GENERATED = 0, - #[doc = "1: Event generated"] - GENERATED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: EVENTS_END_A) -> Self { - variant as u8 != 0 - } -} -impl EVENTS_END_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> EVENTS_END_A { - match self.bits { - false => EVENTS_END_A::NOT_GENERATED, - true => EVENTS_END_A::GENERATED, - } - } - #[doc = "Checks if the value of the field is `NOT_GENERATED`"] - #[inline(always)] - pub fn is_not_generated(&self) -> bool { - *self == EVENTS_END_A::NOT_GENERATED - } - #[doc = "Checks if the value of the field is `GENERATED`"] - #[inline(always)] - pub fn is_generated(&self) -> bool { - *self == EVENTS_END_A::GENERATED - } -} -#[doc = "Field `EVENTS_END` writer - Granted transaction completed"] -pub type EVENTS_END_W<'a, const O: u8> = - crate::BitWriter<'a, u32, EVENTS_END_SPEC, EVENTS_END_A, O>; -impl<'a, const O: u8> EVENTS_END_W<'a, O> { - #[doc = "Event not generated"] - #[inline(always)] - pub fn not_generated(self) -> &'a mut W { - self.variant(EVENTS_END_A::NOT_GENERATED) - } - #[doc = "Event generated"] - #[inline(always)] - pub fn generated(self) -> &'a mut W { - self.variant(EVENTS_END_A::GENERATED) - } -} -impl R { - #[doc = "Bit 0 - Granted transaction completed"] - #[inline(always)] - pub fn events_end(&self) -> EVENTS_END_R { - EVENTS_END_R::new((self.bits & 1) != 0) - } -} -impl W { - #[doc = "Bit 0 - Granted transaction completed"] - #[inline(always)] - #[must_use] - pub fn events_end(&mut self) -> EVENTS_END_W<0> { - EVENTS_END_W::new(self) - } - #[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 = "Granted transaction completed\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 [events_end](index.html) module"] -pub struct EVENTS_END_SPEC; -impl crate::RegisterSpec for EVENTS_END_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [events_end::R](R) reader structure"] -impl crate::Readable for EVENTS_END_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [events_end::W](W) writer structure"] -impl crate::Writable for EVENTS_END_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets EVENTS_END to value 0"] -impl crate::Resettable for EVENTS_END_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/spis0/events_endrx.rs b/down-the-stack/dk_pac/src/spis0/events_endrx.rs deleted file mode 100644 index 0bafc6a..0000000 --- a/down-the-stack/dk_pac/src/spis0/events_endrx.rs +++ /dev/null @@ -1,127 +0,0 @@ -#[doc = "Register `EVENTS_ENDRX` 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 `EVENTS_ENDRX` 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 `EVENTS_ENDRX` reader - End of RXD buffer reached"] -pub type EVENTS_ENDRX_R = crate::BitReader; -#[doc = "End of RXD buffer reached\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum EVENTS_ENDRX_A { - #[doc = "0: Event not generated"] - NOT_GENERATED = 0, - #[doc = "1: Event generated"] - GENERATED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: EVENTS_ENDRX_A) -> Self { - variant as u8 != 0 - } -} -impl EVENTS_ENDRX_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> EVENTS_ENDRX_A { - match self.bits { - false => EVENTS_ENDRX_A::NOT_GENERATED, - true => EVENTS_ENDRX_A::GENERATED, - } - } - #[doc = "Checks if the value of the field is `NOT_GENERATED`"] - #[inline(always)] - pub fn is_not_generated(&self) -> bool { - *self == EVENTS_ENDRX_A::NOT_GENERATED - } - #[doc = "Checks if the value of the field is `GENERATED`"] - #[inline(always)] - pub fn is_generated(&self) -> bool { - *self == EVENTS_ENDRX_A::GENERATED - } -} -#[doc = "Field `EVENTS_ENDRX` writer - End of RXD buffer reached"] -pub type EVENTS_ENDRX_W<'a, const O: u8> = - crate::BitWriter<'a, u32, EVENTS_ENDRX_SPEC, EVENTS_ENDRX_A, O>; -impl<'a, const O: u8> EVENTS_ENDRX_W<'a, O> { - #[doc = "Event not generated"] - #[inline(always)] - pub fn not_generated(self) -> &'a mut W { - self.variant(EVENTS_ENDRX_A::NOT_GENERATED) - } - #[doc = "Event generated"] - #[inline(always)] - pub fn generated(self) -> &'a mut W { - self.variant(EVENTS_ENDRX_A::GENERATED) - } -} -impl R { - #[doc = "Bit 0 - End of RXD buffer reached"] - #[inline(always)] - pub fn events_endrx(&self) -> EVENTS_ENDRX_R { - EVENTS_ENDRX_R::new((self.bits & 1) != 0) - } -} -impl W { - #[doc = "Bit 0 - End of RXD buffer reached"] - #[inline(always)] - #[must_use] - pub fn events_endrx(&mut self) -> EVENTS_ENDRX_W<0> { - EVENTS_ENDRX_W::new(self) - } - #[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 = "End of RXD buffer reached\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 [events_endrx](index.html) module"] -pub struct EVENTS_ENDRX_SPEC; -impl crate::RegisterSpec for EVENTS_ENDRX_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [events_endrx::R](R) reader structure"] -impl crate::Readable for EVENTS_ENDRX_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [events_endrx::W](W) writer structure"] -impl crate::Writable for EVENTS_ENDRX_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets EVENTS_ENDRX to value 0"] -impl crate::Resettable for EVENTS_ENDRX_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/spis0/intenclr.rs b/down-the-stack/dk_pac/src/spis0/intenclr.rs deleted file mode 100644 index 1804274..0000000 --- a/down-the-stack/dk_pac/src/spis0/intenclr.rs +++ /dev/null @@ -1,269 +0,0 @@ -#[doc = "Register `INTENCLR` 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 `INTENCLR` 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 `END` reader - Write '1' to disable interrupt for event END"] -pub type END_R = crate::BitReader; -#[doc = "Write '1' to disable interrupt for event END\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum END_A { - #[doc = "0: Read: Disabled"] - DISABLED = 0, - #[doc = "1: Read: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: END_A) -> Self { - variant as u8 != 0 - } -} -impl END_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> END_A { - match self.bits { - false => END_A::DISABLED, - true => END_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == END_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == END_A::ENABLED - } -} -#[doc = "Write '1' to disable interrupt for event END\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum END_AW { - #[doc = "1: Disable"] - CLEAR = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: END_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `END` writer - Write '1' to disable interrupt for event END"] -pub type END_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENCLR_SPEC, END_AW, O>; -impl<'a, const O: u8> END_W<'a, O> { - #[doc = "Disable"] - #[inline(always)] - pub fn clear(self) -> &'a mut W { - self.variant(END_AW::CLEAR) - } -} -#[doc = "Field `ENDRX` reader - Write '1' to disable interrupt for event ENDRX"] -pub type ENDRX_R = crate::BitReader; -#[doc = "Write '1' to disable interrupt for event ENDRX\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum ENDRX_A { - #[doc = "0: Read: Disabled"] - DISABLED = 0, - #[doc = "1: Read: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: ENDRX_A) -> Self { - variant as u8 != 0 - } -} -impl ENDRX_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> ENDRX_A { - match self.bits { - false => ENDRX_A::DISABLED, - true => ENDRX_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == ENDRX_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == ENDRX_A::ENABLED - } -} -#[doc = "Write '1' to disable interrupt for event ENDRX\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum ENDRX_AW { - #[doc = "1: Disable"] - CLEAR = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: ENDRX_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `ENDRX` writer - Write '1' to disable interrupt for event ENDRX"] -pub type ENDRX_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENCLR_SPEC, ENDRX_AW, O>; -impl<'a, const O: u8> ENDRX_W<'a, O> { - #[doc = "Disable"] - #[inline(always)] - pub fn clear(self) -> &'a mut W { - self.variant(ENDRX_AW::CLEAR) - } -} -#[doc = "Field `ACQUIRED` reader - Write '1' to disable interrupt for event ACQUIRED"] -pub type ACQUIRED_R = crate::BitReader; -#[doc = "Write '1' to disable interrupt for event ACQUIRED\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum ACQUIRED_A { - #[doc = "0: Read: Disabled"] - DISABLED = 0, - #[doc = "1: Read: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: ACQUIRED_A) -> Self { - variant as u8 != 0 - } -} -impl ACQUIRED_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> ACQUIRED_A { - match self.bits { - false => ACQUIRED_A::DISABLED, - true => ACQUIRED_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == ACQUIRED_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == ACQUIRED_A::ENABLED - } -} -#[doc = "Write '1' to disable interrupt for event ACQUIRED\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum ACQUIRED_AW { - #[doc = "1: Disable"] - CLEAR = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: ACQUIRED_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `ACQUIRED` writer - Write '1' to disable interrupt for event ACQUIRED"] -pub type ACQUIRED_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENCLR_SPEC, ACQUIRED_AW, O>; -impl<'a, const O: u8> ACQUIRED_W<'a, O> { - #[doc = "Disable"] - #[inline(always)] - pub fn clear(self) -> &'a mut W { - self.variant(ACQUIRED_AW::CLEAR) - } -} -impl R { - #[doc = "Bit 1 - Write '1' to disable interrupt for event END"] - #[inline(always)] - pub fn end(&self) -> END_R { - END_R::new(((self.bits >> 1) & 1) != 0) - } - #[doc = "Bit 4 - Write '1' to disable interrupt for event ENDRX"] - #[inline(always)] - pub fn endrx(&self) -> ENDRX_R { - ENDRX_R::new(((self.bits >> 4) & 1) != 0) - } - #[doc = "Bit 10 - Write '1' to disable interrupt for event ACQUIRED"] - #[inline(always)] - pub fn acquired(&self) -> ACQUIRED_R { - ACQUIRED_R::new(((self.bits >> 10) & 1) != 0) - } -} -impl W { - #[doc = "Bit 1 - Write '1' to disable interrupt for event END"] - #[inline(always)] - #[must_use] - pub fn end(&mut self) -> END_W<1> { - END_W::new(self) - } - #[doc = "Bit 4 - Write '1' to disable interrupt for event ENDRX"] - #[inline(always)] - #[must_use] - pub fn endrx(&mut self) -> ENDRX_W<4> { - ENDRX_W::new(self) - } - #[doc = "Bit 10 - Write '1' to disable interrupt for event ACQUIRED"] - #[inline(always)] - #[must_use] - pub fn acquired(&mut self) -> ACQUIRED_W<10> { - ACQUIRED_W::new(self) - } - #[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 = "Disable interrupt\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 [intenclr](index.html) module"] -pub struct INTENCLR_SPEC; -impl crate::RegisterSpec for INTENCLR_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [intenclr::R](R) reader structure"] -impl crate::Readable for INTENCLR_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [intenclr::W](W) writer structure"] -impl crate::Writable for INTENCLR_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets INTENCLR to value 0"] -impl crate::Resettable for INTENCLR_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/spis0/intenset.rs b/down-the-stack/dk_pac/src/spis0/intenset.rs deleted file mode 100644 index 4cacb4c..0000000 --- a/down-the-stack/dk_pac/src/spis0/intenset.rs +++ /dev/null @@ -1,269 +0,0 @@ -#[doc = "Register `INTENSET` 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 `INTENSET` 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 `END` reader - Write '1' to enable interrupt for event END"] -pub type END_R = crate::BitReader; -#[doc = "Write '1' to enable interrupt for event END\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum END_A { - #[doc = "0: Read: Disabled"] - DISABLED = 0, - #[doc = "1: Read: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: END_A) -> Self { - variant as u8 != 0 - } -} -impl END_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> END_A { - match self.bits { - false => END_A::DISABLED, - true => END_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == END_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == END_A::ENABLED - } -} -#[doc = "Write '1' to enable interrupt for event END\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum END_AW { - #[doc = "1: Enable"] - SET = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: END_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `END` writer - Write '1' to enable interrupt for event END"] -pub type END_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENSET_SPEC, END_AW, O>; -impl<'a, const O: u8> END_W<'a, O> { - #[doc = "Enable"] - #[inline(always)] - pub fn set(self) -> &'a mut W { - self.variant(END_AW::SET) - } -} -#[doc = "Field `ENDRX` reader - Write '1' to enable interrupt for event ENDRX"] -pub type ENDRX_R = crate::BitReader; -#[doc = "Write '1' to enable interrupt for event ENDRX\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum ENDRX_A { - #[doc = "0: Read: Disabled"] - DISABLED = 0, - #[doc = "1: Read: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: ENDRX_A) -> Self { - variant as u8 != 0 - } -} -impl ENDRX_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> ENDRX_A { - match self.bits { - false => ENDRX_A::DISABLED, - true => ENDRX_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == ENDRX_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == ENDRX_A::ENABLED - } -} -#[doc = "Write '1' to enable interrupt for event ENDRX\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum ENDRX_AW { - #[doc = "1: Enable"] - SET = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: ENDRX_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `ENDRX` writer - Write '1' to enable interrupt for event ENDRX"] -pub type ENDRX_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENSET_SPEC, ENDRX_AW, O>; -impl<'a, const O: u8> ENDRX_W<'a, O> { - #[doc = "Enable"] - #[inline(always)] - pub fn set(self) -> &'a mut W { - self.variant(ENDRX_AW::SET) - } -} -#[doc = "Field `ACQUIRED` reader - Write '1' to enable interrupt for event ACQUIRED"] -pub type ACQUIRED_R = crate::BitReader; -#[doc = "Write '1' to enable interrupt for event ACQUIRED\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum ACQUIRED_A { - #[doc = "0: Read: Disabled"] - DISABLED = 0, - #[doc = "1: Read: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: ACQUIRED_A) -> Self { - variant as u8 != 0 - } -} -impl ACQUIRED_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> ACQUIRED_A { - match self.bits { - false => ACQUIRED_A::DISABLED, - true => ACQUIRED_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == ACQUIRED_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == ACQUIRED_A::ENABLED - } -} -#[doc = "Write '1' to enable interrupt for event ACQUIRED\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum ACQUIRED_AW { - #[doc = "1: Enable"] - SET = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: ACQUIRED_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `ACQUIRED` writer - Write '1' to enable interrupt for event ACQUIRED"] -pub type ACQUIRED_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENSET_SPEC, ACQUIRED_AW, O>; -impl<'a, const O: u8> ACQUIRED_W<'a, O> { - #[doc = "Enable"] - #[inline(always)] - pub fn set(self) -> &'a mut W { - self.variant(ACQUIRED_AW::SET) - } -} -impl R { - #[doc = "Bit 1 - Write '1' to enable interrupt for event END"] - #[inline(always)] - pub fn end(&self) -> END_R { - END_R::new(((self.bits >> 1) & 1) != 0) - } - #[doc = "Bit 4 - Write '1' to enable interrupt for event ENDRX"] - #[inline(always)] - pub fn endrx(&self) -> ENDRX_R { - ENDRX_R::new(((self.bits >> 4) & 1) != 0) - } - #[doc = "Bit 10 - Write '1' to enable interrupt for event ACQUIRED"] - #[inline(always)] - pub fn acquired(&self) -> ACQUIRED_R { - ACQUIRED_R::new(((self.bits >> 10) & 1) != 0) - } -} -impl W { - #[doc = "Bit 1 - Write '1' to enable interrupt for event END"] - #[inline(always)] - #[must_use] - pub fn end(&mut self) -> END_W<1> { - END_W::new(self) - } - #[doc = "Bit 4 - Write '1' to enable interrupt for event ENDRX"] - #[inline(always)] - #[must_use] - pub fn endrx(&mut self) -> ENDRX_W<4> { - ENDRX_W::new(self) - } - #[doc = "Bit 10 - Write '1' to enable interrupt for event ACQUIRED"] - #[inline(always)] - #[must_use] - pub fn acquired(&mut self) -> ACQUIRED_W<10> { - ACQUIRED_W::new(self) - } - #[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 = "Enable interrupt\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 [intenset](index.html) module"] -pub struct INTENSET_SPEC; -impl crate::RegisterSpec for INTENSET_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [intenset::R](R) reader structure"] -impl crate::Readable for INTENSET_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [intenset::W](W) writer structure"] -impl crate::Writable for INTENSET_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets INTENSET to value 0"] -impl crate::Resettable for INTENSET_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/spis0/orc.rs b/down-the-stack/dk_pac/src/spis0/orc.rs deleted file mode 100644 index 53d213c..0000000 --- a/down-the-stack/dk_pac/src/spis0/orc.rs +++ /dev/null @@ -1,80 +0,0 @@ -#[doc = "Register `ORC` 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 `ORC` 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 `ORC` reader - Over-read character. Character clocked out after an over-read of the transmit buffer."] -pub type ORC_R = crate::FieldReader; -#[doc = "Field `ORC` writer - Over-read character. Character clocked out after an over-read of the transmit buffer."] -pub type ORC_W<'a, const O: u8> = crate::FieldWriter<'a, u32, ORC_SPEC, u8, u8, 8, O>; -impl R { - #[doc = "Bits 0:7 - Over-read character. Character clocked out after an over-read of the transmit buffer."] - #[inline(always)] - pub fn orc(&self) -> ORC_R { - ORC_R::new((self.bits & 0xff) as u8) - } -} -impl W { - #[doc = "Bits 0:7 - Over-read character. Character clocked out after an over-read of the transmit buffer."] - #[inline(always)] - #[must_use] - pub fn orc(&mut self) -> ORC_W<0> { - ORC_W::new(self) - } - #[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 = "Over-read character\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 [orc](index.html) module"] -pub struct ORC_SPEC; -impl crate::RegisterSpec for ORC_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [orc::R](R) reader structure"] -impl crate::Readable for ORC_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [orc::W](W) writer structure"] -impl crate::Writable for ORC_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets ORC to value 0"] -impl crate::Resettable for ORC_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/spis0/psel.rs b/down-the-stack/dk_pac/src/spis0/psel.rs deleted file mode 100644 index e4b4d4b..0000000 --- a/down-the-stack/dk_pac/src/spis0/psel.rs +++ /dev/null @@ -1,28 +0,0 @@ -#[doc = r"Register block"] -#[repr(C)] -pub struct PSEL { - #[doc = "0x00 - Pin select for SCK"] - pub sck: SCK, - #[doc = "0x04 - Pin select for MISO signal"] - pub miso: MISO, - #[doc = "0x08 - Pin select for MOSI signal"] - pub mosi: MOSI, - #[doc = "0x0c - Pin select for CSN signal"] - pub csn: CSN, -} -#[doc = "SCK (rw) register accessor: an alias for `Reg`"] -pub type SCK = crate::Reg; -#[doc = "Pin select for SCK"] -pub mod sck; -#[doc = "MISO (rw) register accessor: an alias for `Reg`"] -pub type MISO = crate::Reg; -#[doc = "Pin select for MISO signal"] -pub mod miso; -#[doc = "MOSI (rw) register accessor: an alias for `Reg`"] -pub type MOSI = crate::Reg; -#[doc = "Pin select for MOSI signal"] -pub mod mosi; -#[doc = "CSN (rw) register accessor: an alias for `Reg`"] -pub type CSN = crate::Reg; -#[doc = "Pin select for CSN signal"] -pub mod csn; diff --git a/down-the-stack/dk_pac/src/spis0/psel/csn.rs b/down-the-stack/dk_pac/src/spis0/psel/csn.rs deleted file mode 100644 index 9c6f484..0000000 --- a/down-the-stack/dk_pac/src/spis0/psel/csn.rs +++ /dev/null @@ -1,141 +0,0 @@ -#[doc = "Register `CSN` 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 `CSN` 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 `PIN` reader - Pin number"] -pub type PIN_R = crate::FieldReader; -#[doc = "Field `PIN` writer - Pin number"] -pub type PIN_W<'a, const O: u8> = crate::FieldWriter<'a, u32, CSN_SPEC, u8, u8, 5, O>; -#[doc = "Field `CONNECT` reader - Connection"] -pub type CONNECT_R = crate::BitReader; -#[doc = "Connection\n\nValue on reset: 1"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum CONNECT_A { - #[doc = "1: Disconnect"] - DISCONNECTED = 1, - #[doc = "0: Connect"] - CONNECTED = 0, -} -impl From for bool { - #[inline(always)] - fn from(variant: CONNECT_A) -> Self { - variant as u8 != 0 - } -} -impl CONNECT_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> CONNECT_A { - match self.bits { - true => CONNECT_A::DISCONNECTED, - false => CONNECT_A::CONNECTED, - } - } - #[doc = "Checks if the value of the field is `DISCONNECTED`"] - #[inline(always)] - pub fn is_disconnected(&self) -> bool { - *self == CONNECT_A::DISCONNECTED - } - #[doc = "Checks if the value of the field is `CONNECTED`"] - #[inline(always)] - pub fn is_connected(&self) -> bool { - *self == CONNECT_A::CONNECTED - } -} -#[doc = "Field `CONNECT` writer - Connection"] -pub type CONNECT_W<'a, const O: u8> = crate::BitWriter<'a, u32, CSN_SPEC, CONNECT_A, O>; -impl<'a, const O: u8> CONNECT_W<'a, O> { - #[doc = "Disconnect"] - #[inline(always)] - pub fn disconnected(self) -> &'a mut W { - self.variant(CONNECT_A::DISCONNECTED) - } - #[doc = "Connect"] - #[inline(always)] - pub fn connected(self) -> &'a mut W { - self.variant(CONNECT_A::CONNECTED) - } -} -impl R { - #[doc = "Bits 0:4 - Pin number"] - #[inline(always)] - pub fn pin(&self) -> PIN_R { - PIN_R::new((self.bits & 0x1f) as u8) - } - #[doc = "Bit 31 - Connection"] - #[inline(always)] - pub fn connect(&self) -> CONNECT_R { - CONNECT_R::new(((self.bits >> 31) & 1) != 0) - } -} -impl W { - #[doc = "Bits 0:4 - Pin number"] - #[inline(always)] - #[must_use] - pub fn pin(&mut self) -> PIN_W<0> { - PIN_W::new(self) - } - #[doc = "Bit 31 - Connection"] - #[inline(always)] - #[must_use] - pub fn connect(&mut self) -> CONNECT_W<31> { - CONNECT_W::new(self) - } - #[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 = "Pin select for CSN signal\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 [csn](index.html) module"] -pub struct CSN_SPEC; -impl crate::RegisterSpec for CSN_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [csn::R](R) reader structure"] -impl crate::Readable for CSN_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [csn::W](W) writer structure"] -impl crate::Writable for CSN_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets CSN to value 0xffff_ffff"] -impl crate::Resettable for CSN_SPEC { - const RESET_VALUE: Self::Ux = 0xffff_ffff; -} diff --git a/down-the-stack/dk_pac/src/spis0/psel/miso.rs b/down-the-stack/dk_pac/src/spis0/psel/miso.rs deleted file mode 100644 index d04a28b..0000000 --- a/down-the-stack/dk_pac/src/spis0/psel/miso.rs +++ /dev/null @@ -1,141 +0,0 @@ -#[doc = "Register `MISO` 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 `MISO` 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 `PIN` reader - Pin number"] -pub type PIN_R = crate::FieldReader; -#[doc = "Field `PIN` writer - Pin number"] -pub type PIN_W<'a, const O: u8> = crate::FieldWriter<'a, u32, MISO_SPEC, u8, u8, 5, O>; -#[doc = "Field `CONNECT` reader - Connection"] -pub type CONNECT_R = crate::BitReader; -#[doc = "Connection\n\nValue on reset: 1"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum CONNECT_A { - #[doc = "1: Disconnect"] - DISCONNECTED = 1, - #[doc = "0: Connect"] - CONNECTED = 0, -} -impl From for bool { - #[inline(always)] - fn from(variant: CONNECT_A) -> Self { - variant as u8 != 0 - } -} -impl CONNECT_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> CONNECT_A { - match self.bits { - true => CONNECT_A::DISCONNECTED, - false => CONNECT_A::CONNECTED, - } - } - #[doc = "Checks if the value of the field is `DISCONNECTED`"] - #[inline(always)] - pub fn is_disconnected(&self) -> bool { - *self == CONNECT_A::DISCONNECTED - } - #[doc = "Checks if the value of the field is `CONNECTED`"] - #[inline(always)] - pub fn is_connected(&self) -> bool { - *self == CONNECT_A::CONNECTED - } -} -#[doc = "Field `CONNECT` writer - Connection"] -pub type CONNECT_W<'a, const O: u8> = crate::BitWriter<'a, u32, MISO_SPEC, CONNECT_A, O>; -impl<'a, const O: u8> CONNECT_W<'a, O> { - #[doc = "Disconnect"] - #[inline(always)] - pub fn disconnected(self) -> &'a mut W { - self.variant(CONNECT_A::DISCONNECTED) - } - #[doc = "Connect"] - #[inline(always)] - pub fn connected(self) -> &'a mut W { - self.variant(CONNECT_A::CONNECTED) - } -} -impl R { - #[doc = "Bits 0:4 - Pin number"] - #[inline(always)] - pub fn pin(&self) -> PIN_R { - PIN_R::new((self.bits & 0x1f) as u8) - } - #[doc = "Bit 31 - Connection"] - #[inline(always)] - pub fn connect(&self) -> CONNECT_R { - CONNECT_R::new(((self.bits >> 31) & 1) != 0) - } -} -impl W { - #[doc = "Bits 0:4 - Pin number"] - #[inline(always)] - #[must_use] - pub fn pin(&mut self) -> PIN_W<0> { - PIN_W::new(self) - } - #[doc = "Bit 31 - Connection"] - #[inline(always)] - #[must_use] - pub fn connect(&mut self) -> CONNECT_W<31> { - CONNECT_W::new(self) - } - #[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 = "Pin select for MISO signal\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 [miso](index.html) module"] -pub struct MISO_SPEC; -impl crate::RegisterSpec for MISO_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [miso::R](R) reader structure"] -impl crate::Readable for MISO_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [miso::W](W) writer structure"] -impl crate::Writable for MISO_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets MISO to value 0xffff_ffff"] -impl crate::Resettable for MISO_SPEC { - const RESET_VALUE: Self::Ux = 0xffff_ffff; -} diff --git a/down-the-stack/dk_pac/src/spis0/psel/mosi.rs b/down-the-stack/dk_pac/src/spis0/psel/mosi.rs deleted file mode 100644 index 8c4f76f..0000000 --- a/down-the-stack/dk_pac/src/spis0/psel/mosi.rs +++ /dev/null @@ -1,141 +0,0 @@ -#[doc = "Register `MOSI` 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 `MOSI` 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 `PIN` reader - Pin number"] -pub type PIN_R = crate::FieldReader; -#[doc = "Field `PIN` writer - Pin number"] -pub type PIN_W<'a, const O: u8> = crate::FieldWriter<'a, u32, MOSI_SPEC, u8, u8, 5, O>; -#[doc = "Field `CONNECT` reader - Connection"] -pub type CONNECT_R = crate::BitReader; -#[doc = "Connection\n\nValue on reset: 1"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum CONNECT_A { - #[doc = "1: Disconnect"] - DISCONNECTED = 1, - #[doc = "0: Connect"] - CONNECTED = 0, -} -impl From for bool { - #[inline(always)] - fn from(variant: CONNECT_A) -> Self { - variant as u8 != 0 - } -} -impl CONNECT_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> CONNECT_A { - match self.bits { - true => CONNECT_A::DISCONNECTED, - false => CONNECT_A::CONNECTED, - } - } - #[doc = "Checks if the value of the field is `DISCONNECTED`"] - #[inline(always)] - pub fn is_disconnected(&self) -> bool { - *self == CONNECT_A::DISCONNECTED - } - #[doc = "Checks if the value of the field is `CONNECTED`"] - #[inline(always)] - pub fn is_connected(&self) -> bool { - *self == CONNECT_A::CONNECTED - } -} -#[doc = "Field `CONNECT` writer - Connection"] -pub type CONNECT_W<'a, const O: u8> = crate::BitWriter<'a, u32, MOSI_SPEC, CONNECT_A, O>; -impl<'a, const O: u8> CONNECT_W<'a, O> { - #[doc = "Disconnect"] - #[inline(always)] - pub fn disconnected(self) -> &'a mut W { - self.variant(CONNECT_A::DISCONNECTED) - } - #[doc = "Connect"] - #[inline(always)] - pub fn connected(self) -> &'a mut W { - self.variant(CONNECT_A::CONNECTED) - } -} -impl R { - #[doc = "Bits 0:4 - Pin number"] - #[inline(always)] - pub fn pin(&self) -> PIN_R { - PIN_R::new((self.bits & 0x1f) as u8) - } - #[doc = "Bit 31 - Connection"] - #[inline(always)] - pub fn connect(&self) -> CONNECT_R { - CONNECT_R::new(((self.bits >> 31) & 1) != 0) - } -} -impl W { - #[doc = "Bits 0:4 - Pin number"] - #[inline(always)] - #[must_use] - pub fn pin(&mut self) -> PIN_W<0> { - PIN_W::new(self) - } - #[doc = "Bit 31 - Connection"] - #[inline(always)] - #[must_use] - pub fn connect(&mut self) -> CONNECT_W<31> { - CONNECT_W::new(self) - } - #[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 = "Pin select for MOSI signal\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 [mosi](index.html) module"] -pub struct MOSI_SPEC; -impl crate::RegisterSpec for MOSI_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [mosi::R](R) reader structure"] -impl crate::Readable for MOSI_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [mosi::W](W) writer structure"] -impl crate::Writable for MOSI_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets MOSI to value 0xffff_ffff"] -impl crate::Resettable for MOSI_SPEC { - const RESET_VALUE: Self::Ux = 0xffff_ffff; -} diff --git a/down-the-stack/dk_pac/src/spis0/psel/sck.rs b/down-the-stack/dk_pac/src/spis0/psel/sck.rs deleted file mode 100644 index d1b7a9e..0000000 --- a/down-the-stack/dk_pac/src/spis0/psel/sck.rs +++ /dev/null @@ -1,141 +0,0 @@ -#[doc = "Register `SCK` 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 `SCK` 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 `PIN` reader - Pin number"] -pub type PIN_R = crate::FieldReader; -#[doc = "Field `PIN` writer - Pin number"] -pub type PIN_W<'a, const O: u8> = crate::FieldWriter<'a, u32, SCK_SPEC, u8, u8, 5, O>; -#[doc = "Field `CONNECT` reader - Connection"] -pub type CONNECT_R = crate::BitReader; -#[doc = "Connection\n\nValue on reset: 1"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum CONNECT_A { - #[doc = "1: Disconnect"] - DISCONNECTED = 1, - #[doc = "0: Connect"] - CONNECTED = 0, -} -impl From for bool { - #[inline(always)] - fn from(variant: CONNECT_A) -> Self { - variant as u8 != 0 - } -} -impl CONNECT_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> CONNECT_A { - match self.bits { - true => CONNECT_A::DISCONNECTED, - false => CONNECT_A::CONNECTED, - } - } - #[doc = "Checks if the value of the field is `DISCONNECTED`"] - #[inline(always)] - pub fn is_disconnected(&self) -> bool { - *self == CONNECT_A::DISCONNECTED - } - #[doc = "Checks if the value of the field is `CONNECTED`"] - #[inline(always)] - pub fn is_connected(&self) -> bool { - *self == CONNECT_A::CONNECTED - } -} -#[doc = "Field `CONNECT` writer - Connection"] -pub type CONNECT_W<'a, const O: u8> = crate::BitWriter<'a, u32, SCK_SPEC, CONNECT_A, O>; -impl<'a, const O: u8> CONNECT_W<'a, O> { - #[doc = "Disconnect"] - #[inline(always)] - pub fn disconnected(self) -> &'a mut W { - self.variant(CONNECT_A::DISCONNECTED) - } - #[doc = "Connect"] - #[inline(always)] - pub fn connected(self) -> &'a mut W { - self.variant(CONNECT_A::CONNECTED) - } -} -impl R { - #[doc = "Bits 0:4 - Pin number"] - #[inline(always)] - pub fn pin(&self) -> PIN_R { - PIN_R::new((self.bits & 0x1f) as u8) - } - #[doc = "Bit 31 - Connection"] - #[inline(always)] - pub fn connect(&self) -> CONNECT_R { - CONNECT_R::new(((self.bits >> 31) & 1) != 0) - } -} -impl W { - #[doc = "Bits 0:4 - Pin number"] - #[inline(always)] - #[must_use] - pub fn pin(&mut self) -> PIN_W<0> { - PIN_W::new(self) - } - #[doc = "Bit 31 - Connection"] - #[inline(always)] - #[must_use] - pub fn connect(&mut self) -> CONNECT_W<31> { - CONNECT_W::new(self) - } - #[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 = "Pin select for SCK\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 [sck](index.html) module"] -pub struct SCK_SPEC; -impl crate::RegisterSpec for SCK_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [sck::R](R) reader structure"] -impl crate::Readable for SCK_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [sck::W](W) writer structure"] -impl crate::Writable for SCK_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets SCK to value 0xffff_ffff"] -impl crate::Resettable for SCK_SPEC { - const RESET_VALUE: Self::Ux = 0xffff_ffff; -} diff --git a/down-the-stack/dk_pac/src/spis0/rxd.rs b/down-the-stack/dk_pac/src/spis0/rxd.rs deleted file mode 100644 index 87f3461..0000000 --- a/down-the-stack/dk_pac/src/spis0/rxd.rs +++ /dev/null @@ -1,22 +0,0 @@ -#[doc = r"Register block"] -#[repr(C)] -pub struct RXD { - #[doc = "0x00 - RXD data pointer"] - pub ptr: PTR, - #[doc = "0x04 - Maximum number of bytes in receive buffer"] - pub maxcnt: MAXCNT, - #[doc = "0x08 - Number of bytes received in last granted transaction"] - pub amount: AMOUNT, -} -#[doc = "PTR (rw) register accessor: an alias for `Reg`"] -pub type PTR = crate::Reg; -#[doc = "RXD data pointer"] -pub mod ptr; -#[doc = "MAXCNT (rw) register accessor: an alias for `Reg`"] -pub type MAXCNT = crate::Reg; -#[doc = "Maximum number of bytes in receive buffer"] -pub mod maxcnt; -#[doc = "AMOUNT (r) register accessor: an alias for `Reg`"] -pub type AMOUNT = crate::Reg; -#[doc = "Number of bytes received in last granted transaction"] -pub mod amount; diff --git a/down-the-stack/dk_pac/src/spis0/rxd/amount.rs b/down-the-stack/dk_pac/src/spis0/rxd/amount.rs deleted file mode 100644 index 71b50d7..0000000 --- a/down-the-stack/dk_pac/src/spis0/rxd/amount.rs +++ /dev/null @@ -1,37 +0,0 @@ -#[doc = "Register `AMOUNT` 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 = "Field `AMOUNT` reader - Number of bytes received in the last granted transaction"] -pub type AMOUNT_R = crate::FieldReader; -impl R { - #[doc = "Bits 0:7 - Number of bytes received in the last granted transaction"] - #[inline(always)] - pub fn amount(&self) -> AMOUNT_R { - AMOUNT_R::new((self.bits & 0xff) as u8) - } -} -#[doc = "Number of bytes received in last granted transaction\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 [amount](index.html) module"] -pub struct AMOUNT_SPEC; -impl crate::RegisterSpec for AMOUNT_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [amount::R](R) reader structure"] -impl crate::Readable for AMOUNT_SPEC { - type Reader = R; -} -#[doc = "`reset()` method sets AMOUNT to value 0"] -impl crate::Resettable for AMOUNT_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/spis0/rxd/maxcnt.rs b/down-the-stack/dk_pac/src/spis0/rxd/maxcnt.rs deleted file mode 100644 index 7d9b79c..0000000 --- a/down-the-stack/dk_pac/src/spis0/rxd/maxcnt.rs +++ /dev/null @@ -1,80 +0,0 @@ -#[doc = "Register `MAXCNT` 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 `MAXCNT` 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 `MAXCNT` reader - Maximum number of bytes in receive buffer"] -pub type MAXCNT_R = crate::FieldReader; -#[doc = "Field `MAXCNT` writer - Maximum number of bytes in receive buffer"] -pub type MAXCNT_W<'a, const O: u8> = crate::FieldWriter<'a, u32, MAXCNT_SPEC, u8, u8, 8, O>; -impl R { - #[doc = "Bits 0:7 - Maximum number of bytes in receive buffer"] - #[inline(always)] - pub fn maxcnt(&self) -> MAXCNT_R { - MAXCNT_R::new((self.bits & 0xff) as u8) - } -} -impl W { - #[doc = "Bits 0:7 - Maximum number of bytes in receive buffer"] - #[inline(always)] - #[must_use] - pub fn maxcnt(&mut self) -> MAXCNT_W<0> { - MAXCNT_W::new(self) - } - #[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 = "Maximum number of bytes in receive buffer\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 [maxcnt](index.html) module"] -pub struct MAXCNT_SPEC; -impl crate::RegisterSpec for MAXCNT_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [maxcnt::R](R) reader structure"] -impl crate::Readable for MAXCNT_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [maxcnt::W](W) writer structure"] -impl crate::Writable for MAXCNT_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets MAXCNT to value 0"] -impl crate::Resettable for MAXCNT_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/spis0/rxd/ptr.rs b/down-the-stack/dk_pac/src/spis0/rxd/ptr.rs deleted file mode 100644 index 296dff7..0000000 --- a/down-the-stack/dk_pac/src/spis0/rxd/ptr.rs +++ /dev/null @@ -1,80 +0,0 @@ -#[doc = "Register `PTR` 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 `PTR` 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 `PTR` reader - RXD data pointer"] -pub type PTR_R = crate::FieldReader; -#[doc = "Field `PTR` writer - RXD data pointer"] -pub type PTR_W<'a, const O: u8> = crate::FieldWriter<'a, u32, PTR_SPEC, u32, u32, 32, O>; -impl R { - #[doc = "Bits 0:31 - RXD data pointer"] - #[inline(always)] - pub fn ptr(&self) -> PTR_R { - PTR_R::new(self.bits) - } -} -impl W { - #[doc = "Bits 0:31 - RXD data pointer"] - #[inline(always)] - #[must_use] - pub fn ptr(&mut self) -> PTR_W<0> { - PTR_W::new(self) - } - #[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 = "RXD data pointer\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 [ptr](index.html) module"] -pub struct PTR_SPEC; -impl crate::RegisterSpec for PTR_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [ptr::R](R) reader structure"] -impl crate::Readable for PTR_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [ptr::W](W) writer structure"] -impl crate::Writable for PTR_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets PTR to value 0"] -impl crate::Resettable for PTR_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/spis0/semstat.rs b/down-the-stack/dk_pac/src/spis0/semstat.rs deleted file mode 100644 index 83debf7..0000000 --- a/down-the-stack/dk_pac/src/spis0/semstat.rs +++ /dev/null @@ -1,89 +0,0 @@ -#[doc = "Register `SEMSTAT` 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 = "Field `SEMSTAT` reader - Semaphore status"] -pub type SEMSTAT_R = crate::FieldReader; -#[doc = "Semaphore status\n\nValue on reset: 1"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -#[repr(u8)] -pub enum SEMSTAT_A { - #[doc = "0: Semaphore is free"] - FREE = 0, - #[doc = "1: Semaphore is assigned to CPU"] - CPU = 1, - #[doc = "2: Semaphore is assigned to SPI slave"] - SPIS = 2, - #[doc = "3: Semaphore is assigned to SPI but a handover to the CPU is pending"] - CPUPENDING = 3, -} -impl From for u8 { - #[inline(always)] - fn from(variant: SEMSTAT_A) -> Self { - variant as _ - } -} -impl SEMSTAT_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> SEMSTAT_A { - match self.bits { - 0 => SEMSTAT_A::FREE, - 1 => SEMSTAT_A::CPU, - 2 => SEMSTAT_A::SPIS, - 3 => SEMSTAT_A::CPUPENDING, - _ => unreachable!(), - } - } - #[doc = "Checks if the value of the field is `FREE`"] - #[inline(always)] - pub fn is_free(&self) -> bool { - *self == SEMSTAT_A::FREE - } - #[doc = "Checks if the value of the field is `CPU`"] - #[inline(always)] - pub fn is_cpu(&self) -> bool { - *self == SEMSTAT_A::CPU - } - #[doc = "Checks if the value of the field is `SPIS`"] - #[inline(always)] - pub fn is_spis(&self) -> bool { - *self == SEMSTAT_A::SPIS - } - #[doc = "Checks if the value of the field is `CPUPENDING`"] - #[inline(always)] - pub fn is_cpupending(&self) -> bool { - *self == SEMSTAT_A::CPUPENDING - } -} -impl R { - #[doc = "Bits 0:1 - Semaphore status"] - #[inline(always)] - pub fn semstat(&self) -> SEMSTAT_R { - SEMSTAT_R::new((self.bits & 3) as u8) - } -} -#[doc = "Semaphore status register\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 [semstat](index.html) module"] -pub struct SEMSTAT_SPEC; -impl crate::RegisterSpec for SEMSTAT_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [semstat::R](R) reader structure"] -impl crate::Readable for SEMSTAT_SPEC { - type Reader = R; -} -#[doc = "`reset()` method sets SEMSTAT to value 0x01"] -impl crate::Resettable for SEMSTAT_SPEC { - const RESET_VALUE: Self::Ux = 0x01; -} diff --git a/down-the-stack/dk_pac/src/spis0/shorts.rs b/down-the-stack/dk_pac/src/spis0/shorts.rs deleted file mode 100644 index ddb1580..0000000 --- a/down-the-stack/dk_pac/src/spis0/shorts.rs +++ /dev/null @@ -1,126 +0,0 @@ -#[doc = "Register `SHORTS` 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 `SHORTS` 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 `END_ACQUIRE` reader - Shortcut between event END and task ACQUIRE"] -pub type END_ACQUIRE_R = crate::BitReader; -#[doc = "Shortcut between event END and task ACQUIRE\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum END_ACQUIRE_A { - #[doc = "0: Disable shortcut"] - DISABLED = 0, - #[doc = "1: Enable shortcut"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: END_ACQUIRE_A) -> Self { - variant as u8 != 0 - } -} -impl END_ACQUIRE_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> END_ACQUIRE_A { - match self.bits { - false => END_ACQUIRE_A::DISABLED, - true => END_ACQUIRE_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == END_ACQUIRE_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == END_ACQUIRE_A::ENABLED - } -} -#[doc = "Field `END_ACQUIRE` writer - Shortcut between event END and task ACQUIRE"] -pub type END_ACQUIRE_W<'a, const O: u8> = crate::BitWriter<'a, u32, SHORTS_SPEC, END_ACQUIRE_A, O>; -impl<'a, const O: u8> END_ACQUIRE_W<'a, O> { - #[doc = "Disable shortcut"] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(END_ACQUIRE_A::DISABLED) - } - #[doc = "Enable shortcut"] - #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(END_ACQUIRE_A::ENABLED) - } -} -impl R { - #[doc = "Bit 2 - Shortcut between event END and task ACQUIRE"] - #[inline(always)] - pub fn end_acquire(&self) -> END_ACQUIRE_R { - END_ACQUIRE_R::new(((self.bits >> 2) & 1) != 0) - } -} -impl W { - #[doc = "Bit 2 - Shortcut between event END and task ACQUIRE"] - #[inline(always)] - #[must_use] - pub fn end_acquire(&mut self) -> END_ACQUIRE_W<2> { - END_ACQUIRE_W::new(self) - } - #[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 = "Shortcuts between local events and tasks\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 [shorts](index.html) module"] -pub struct SHORTS_SPEC; -impl crate::RegisterSpec for SHORTS_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [shorts::R](R) reader structure"] -impl crate::Readable for SHORTS_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [shorts::W](W) writer structure"] -impl crate::Writable for SHORTS_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets SHORTS to value 0"] -impl crate::Resettable for SHORTS_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/spis0/status.rs b/down-the-stack/dk_pac/src/spis0/status.rs deleted file mode 100644 index a63036f..0000000 --- a/down-the-stack/dk_pac/src/spis0/status.rs +++ /dev/null @@ -1,201 +0,0 @@ -#[doc = "Register `STATUS` 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 `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 `OVERREAD` reader - TX buffer over-read detected, and prevented"] -pub type OVERREAD_R = crate::BitReader; -#[doc = "TX buffer over-read detected, and prevented\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum OVERREAD_A { - #[doc = "0: Read: error not present"] - NOT_PRESENT = 0, - #[doc = "1: Read: error present"] - PRESENT = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: OVERREAD_A) -> Self { - variant as u8 != 0 - } -} -impl OVERREAD_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> OVERREAD_A { - match self.bits { - false => OVERREAD_A::NOT_PRESENT, - true => OVERREAD_A::PRESENT, - } - } - #[doc = "Checks if the value of the field is `NOT_PRESENT`"] - #[inline(always)] - pub fn is_not_present(&self) -> bool { - *self == OVERREAD_A::NOT_PRESENT - } - #[doc = "Checks if the value of the field is `PRESENT`"] - #[inline(always)] - pub fn is_present(&self) -> bool { - *self == OVERREAD_A::PRESENT - } -} -#[doc = "TX buffer over-read detected, and prevented\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum OVERREAD_AW { - #[doc = "1: Write: clear error on writing '1'"] - CLEAR = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: OVERREAD_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `OVERREAD` writer - TX buffer over-read detected, and prevented"] -pub type OVERREAD_W<'a, const O: u8> = crate::BitWriter<'a, u32, STATUS_SPEC, OVERREAD_AW, O>; -impl<'a, const O: u8> OVERREAD_W<'a, O> { - #[doc = "Write: clear error on writing '1'"] - #[inline(always)] - pub fn clear(self) -> &'a mut W { - self.variant(OVERREAD_AW::CLEAR) - } -} -#[doc = "Field `OVERFLOW` reader - RX buffer overflow detected, and prevented"] -pub type OVERFLOW_R = crate::BitReader; -#[doc = "RX buffer overflow detected, and prevented\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum OVERFLOW_A { - #[doc = "0: Read: error not present"] - NOT_PRESENT = 0, - #[doc = "1: Read: error present"] - PRESENT = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: OVERFLOW_A) -> Self { - variant as u8 != 0 - } -} -impl OVERFLOW_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> OVERFLOW_A { - match self.bits { - false => OVERFLOW_A::NOT_PRESENT, - true => OVERFLOW_A::PRESENT, - } - } - #[doc = "Checks if the value of the field is `NOT_PRESENT`"] - #[inline(always)] - pub fn is_not_present(&self) -> bool { - *self == OVERFLOW_A::NOT_PRESENT - } - #[doc = "Checks if the value of the field is `PRESENT`"] - #[inline(always)] - pub fn is_present(&self) -> bool { - *self == OVERFLOW_A::PRESENT - } -} -#[doc = "RX buffer overflow detected, and prevented\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum OVERFLOW_AW { - #[doc = "1: Write: clear error on writing '1'"] - CLEAR = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: OVERFLOW_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `OVERFLOW` writer - RX buffer overflow detected, and prevented"] -pub type OVERFLOW_W<'a, const O: u8> = crate::BitWriter<'a, u32, STATUS_SPEC, OVERFLOW_AW, O>; -impl<'a, const O: u8> OVERFLOW_W<'a, O> { - #[doc = "Write: clear error on writing '1'"] - #[inline(always)] - pub fn clear(self) -> &'a mut W { - self.variant(OVERFLOW_AW::CLEAR) - } -} -impl R { - #[doc = "Bit 0 - TX buffer over-read detected, and prevented"] - #[inline(always)] - pub fn overread(&self) -> OVERREAD_R { - OVERREAD_R::new((self.bits & 1) != 0) - } - #[doc = "Bit 1 - RX buffer overflow detected, and prevented"] - #[inline(always)] - pub fn overflow(&self) -> OVERFLOW_R { - OVERFLOW_R::new(((self.bits >> 1) & 1) != 0) - } -} -impl W { - #[doc = "Bit 0 - TX buffer over-read detected, and prevented"] - #[inline(always)] - #[must_use] - pub fn overread(&mut self) -> OVERREAD_W<0> { - OVERREAD_W::new(self) - } - #[doc = "Bit 1 - RX buffer overflow detected, and prevented"] - #[inline(always)] - #[must_use] - pub fn overflow(&mut self) -> OVERFLOW_W<1> { - OVERFLOW_W::new(self) - } - #[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 = "Status from last transaction\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 [status](index.html) module"] -pub struct STATUS_SPEC; -impl crate::RegisterSpec for STATUS_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [status::R](R) reader structure"] -impl crate::Readable for STATUS_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [status::W](W) writer structure"] -impl crate::Writable for 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 STATUS to value 0"] -impl crate::Resettable for STATUS_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/spis0/tasks_acquire.rs b/down-the-stack/dk_pac/src/spis0/tasks_acquire.rs deleted file mode 100644 index 62e0268..0000000 --- a/down-the-stack/dk_pac/src/spis0/tasks_acquire.rs +++ /dev/null @@ -1,72 +0,0 @@ -#[doc = "Register `TASKS_ACQUIRE` 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 = "Acquire SPI semaphore\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum TASKS_ACQUIRE_AW { - #[doc = "1: Trigger task"] - TRIGGER = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: TASKS_ACQUIRE_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `TASKS_ACQUIRE` writer - Acquire SPI semaphore"] -pub type TASKS_ACQUIRE_W<'a, const O: u8> = - crate::BitWriter<'a, u32, TASKS_ACQUIRE_SPEC, TASKS_ACQUIRE_AW, O>; -impl<'a, const O: u8> TASKS_ACQUIRE_W<'a, O> { - #[doc = "Trigger task"] - #[inline(always)] - pub fn trigger(self) -> &'a mut W { - self.variant(TASKS_ACQUIRE_AW::TRIGGER) - } -} -impl W { - #[doc = "Bit 0 - Acquire SPI semaphore"] - #[inline(always)] - #[must_use] - pub fn tasks_acquire(&mut self) -> TASKS_ACQUIRE_W<0> { - TASKS_ACQUIRE_W::new(self) - } - #[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 = "Acquire SPI semaphore\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 [tasks_acquire](index.html) module"] -pub struct TASKS_ACQUIRE_SPEC; -impl crate::RegisterSpec for TASKS_ACQUIRE_SPEC { - type Ux = u32; -} -#[doc = "`write(|w| ..)` method takes [tasks_acquire::W](W) writer structure"] -impl crate::Writable for TASKS_ACQUIRE_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets TASKS_ACQUIRE to value 0"] -impl crate::Resettable for TASKS_ACQUIRE_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/spis0/tasks_release.rs b/down-the-stack/dk_pac/src/spis0/tasks_release.rs deleted file mode 100644 index e700f5e..0000000 --- a/down-the-stack/dk_pac/src/spis0/tasks_release.rs +++ /dev/null @@ -1,72 +0,0 @@ -#[doc = "Register `TASKS_RELEASE` 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 = "Release SPI semaphore, enabling the SPI slave to acquire it\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum TASKS_RELEASE_AW { - #[doc = "1: Trigger task"] - TRIGGER = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: TASKS_RELEASE_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `TASKS_RELEASE` writer - Release SPI semaphore, enabling the SPI slave to acquire it"] -pub type TASKS_RELEASE_W<'a, const O: u8> = - crate::BitWriter<'a, u32, TASKS_RELEASE_SPEC, TASKS_RELEASE_AW, O>; -impl<'a, const O: u8> TASKS_RELEASE_W<'a, O> { - #[doc = "Trigger task"] - #[inline(always)] - pub fn trigger(self) -> &'a mut W { - self.variant(TASKS_RELEASE_AW::TRIGGER) - } -} -impl W { - #[doc = "Bit 0 - Release SPI semaphore, enabling the SPI slave to acquire it"] - #[inline(always)] - #[must_use] - pub fn tasks_release(&mut self) -> TASKS_RELEASE_W<0> { - TASKS_RELEASE_W::new(self) - } - #[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 = "Release SPI semaphore, enabling the SPI slave to acquire it\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 [tasks_release](index.html) module"] -pub struct TASKS_RELEASE_SPEC; -impl crate::RegisterSpec for TASKS_RELEASE_SPEC { - type Ux = u32; -} -#[doc = "`write(|w| ..)` method takes [tasks_release::W](W) writer structure"] -impl crate::Writable for TASKS_RELEASE_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets TASKS_RELEASE to value 0"] -impl crate::Resettable for TASKS_RELEASE_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/spis0/txd.rs b/down-the-stack/dk_pac/src/spis0/txd.rs deleted file mode 100644 index a3ec194..0000000 --- a/down-the-stack/dk_pac/src/spis0/txd.rs +++ /dev/null @@ -1,22 +0,0 @@ -#[doc = r"Register block"] -#[repr(C)] -pub struct TXD { - #[doc = "0x00 - TXD data pointer"] - pub ptr: PTR, - #[doc = "0x04 - Maximum number of bytes in transmit buffer"] - pub maxcnt: MAXCNT, - #[doc = "0x08 - Number of bytes transmitted in last granted transaction"] - pub amount: AMOUNT, -} -#[doc = "PTR (rw) register accessor: an alias for `Reg`"] -pub type PTR = crate::Reg; -#[doc = "TXD data pointer"] -pub mod ptr; -#[doc = "MAXCNT (rw) register accessor: an alias for `Reg`"] -pub type MAXCNT = crate::Reg; -#[doc = "Maximum number of bytes in transmit buffer"] -pub mod maxcnt; -#[doc = "AMOUNT (r) register accessor: an alias for `Reg`"] -pub type AMOUNT = crate::Reg; -#[doc = "Number of bytes transmitted in last granted transaction"] -pub mod amount; diff --git a/down-the-stack/dk_pac/src/spis0/txd/amount.rs b/down-the-stack/dk_pac/src/spis0/txd/amount.rs deleted file mode 100644 index d931113..0000000 --- a/down-the-stack/dk_pac/src/spis0/txd/amount.rs +++ /dev/null @@ -1,37 +0,0 @@ -#[doc = "Register `AMOUNT` 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 = "Field `AMOUNT` reader - Number of bytes transmitted in last granted transaction"] -pub type AMOUNT_R = crate::FieldReader; -impl R { - #[doc = "Bits 0:7 - Number of bytes transmitted in last granted transaction"] - #[inline(always)] - pub fn amount(&self) -> AMOUNT_R { - AMOUNT_R::new((self.bits & 0xff) as u8) - } -} -#[doc = "Number of bytes transmitted in last granted transaction\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 [amount](index.html) module"] -pub struct AMOUNT_SPEC; -impl crate::RegisterSpec for AMOUNT_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [amount::R](R) reader structure"] -impl crate::Readable for AMOUNT_SPEC { - type Reader = R; -} -#[doc = "`reset()` method sets AMOUNT to value 0"] -impl crate::Resettable for AMOUNT_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/spis0/txd/maxcnt.rs b/down-the-stack/dk_pac/src/spis0/txd/maxcnt.rs deleted file mode 100644 index 084733c..0000000 --- a/down-the-stack/dk_pac/src/spis0/txd/maxcnt.rs +++ /dev/null @@ -1,80 +0,0 @@ -#[doc = "Register `MAXCNT` 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 `MAXCNT` 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 `MAXCNT` reader - Maximum number of bytes in transmit buffer"] -pub type MAXCNT_R = crate::FieldReader; -#[doc = "Field `MAXCNT` writer - Maximum number of bytes in transmit buffer"] -pub type MAXCNT_W<'a, const O: u8> = crate::FieldWriter<'a, u32, MAXCNT_SPEC, u8, u8, 8, O>; -impl R { - #[doc = "Bits 0:7 - Maximum number of bytes in transmit buffer"] - #[inline(always)] - pub fn maxcnt(&self) -> MAXCNT_R { - MAXCNT_R::new((self.bits & 0xff) as u8) - } -} -impl W { - #[doc = "Bits 0:7 - Maximum number of bytes in transmit buffer"] - #[inline(always)] - #[must_use] - pub fn maxcnt(&mut self) -> MAXCNT_W<0> { - MAXCNT_W::new(self) - } - #[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 = "Maximum number of bytes in transmit buffer\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 [maxcnt](index.html) module"] -pub struct MAXCNT_SPEC; -impl crate::RegisterSpec for MAXCNT_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [maxcnt::R](R) reader structure"] -impl crate::Readable for MAXCNT_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [maxcnt::W](W) writer structure"] -impl crate::Writable for MAXCNT_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets MAXCNT to value 0"] -impl crate::Resettable for MAXCNT_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/spis0/txd/ptr.rs b/down-the-stack/dk_pac/src/spis0/txd/ptr.rs deleted file mode 100644 index 1d9af4a..0000000 --- a/down-the-stack/dk_pac/src/spis0/txd/ptr.rs +++ /dev/null @@ -1,80 +0,0 @@ -#[doc = "Register `PTR` 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 `PTR` 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 `PTR` reader - TXD data pointer"] -pub type PTR_R = crate::FieldReader; -#[doc = "Field `PTR` writer - TXD data pointer"] -pub type PTR_W<'a, const O: u8> = crate::FieldWriter<'a, u32, PTR_SPEC, u32, u32, 32, O>; -impl R { - #[doc = "Bits 0:31 - TXD data pointer"] - #[inline(always)] - pub fn ptr(&self) -> PTR_R { - PTR_R::new(self.bits) - } -} -impl W { - #[doc = "Bits 0:31 - TXD data pointer"] - #[inline(always)] - #[must_use] - pub fn ptr(&mut self) -> PTR_W<0> { - PTR_W::new(self) - } - #[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 = "TXD data pointer\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 [ptr](index.html) module"] -pub struct PTR_SPEC; -impl crate::RegisterSpec for PTR_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [ptr::R](R) reader structure"] -impl crate::Readable for PTR_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [ptr::W](W) writer structure"] -impl crate::Writable for PTR_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets PTR to value 0"] -impl crate::Resettable for PTR_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/swi0.rs b/down-the-stack/dk_pac/src/swi0.rs deleted file mode 100644 index ad42ba6..0000000 --- a/down-the-stack/dk_pac/src/swi0.rs +++ /dev/null @@ -1,10 +0,0 @@ -#[doc = r"Register block"] -#[repr(C)] -pub struct RegisterBlock { - #[doc = "0x00 - Unused."] - pub unused: UNUSED, -} -#[doc = "UNUSED (r) register accessor: an alias for `Reg`"] -pub type UNUSED = crate::Reg; -#[doc = "Unused."] -pub mod unused; diff --git a/down-the-stack/dk_pac/src/swi0/unused.rs b/down-the-stack/dk_pac/src/swi0/unused.rs deleted file mode 100644 index 4f087aa..0000000 --- a/down-the-stack/dk_pac/src/swi0/unused.rs +++ /dev/null @@ -1,28 +0,0 @@ -#[doc = "Register `UNUSED` 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 = "Unused.\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 [unused](index.html) module"] -pub struct UNUSED_SPEC; -impl crate::RegisterSpec for UNUSED_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [unused::R](R) reader structure"] -impl crate::Readable for UNUSED_SPEC { - type Reader = R; -} -#[doc = "`reset()` method sets UNUSED to value 0"] -impl crate::Resettable for UNUSED_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/temp.rs b/down-the-stack/dk_pac/src/temp.rs deleted file mode 100644 index eaca138..0000000 --- a/down-the-stack/dk_pac/src/temp.rs +++ /dev/null @@ -1,148 +0,0 @@ -#[doc = r"Register block"] -#[repr(C)] -pub struct RegisterBlock { - #[doc = "0x00 - Start temperature measurement"] - pub tasks_start: TASKS_START, - #[doc = "0x04 - Stop temperature measurement"] - pub tasks_stop: TASKS_STOP, - _reserved2: [u8; 0xf8], - #[doc = "0x100 - Temperature measurement complete, data ready"] - pub events_datardy: EVENTS_DATARDY, - _reserved3: [u8; 0x0200], - #[doc = "0x304 - Enable interrupt"] - pub intenset: INTENSET, - #[doc = "0x308 - Disable interrupt"] - pub intenclr: INTENCLR, - _reserved5: [u8; 0x01fc], - #[doc = "0x508 - Temperature in degC (0.25deg steps)"] - pub temp: TEMP, - _reserved6: [u8; 0x14], - #[doc = "0x520 - Slope of 1st piece wise linear function"] - pub a0: A0, - #[doc = "0x524 - Slope of 2nd piece wise linear function"] - pub a1: A1, - #[doc = "0x528 - Slope of 3rd piece wise linear function"] - pub a2: A2, - #[doc = "0x52c - Slope of 4th piece wise linear function"] - pub a3: A3, - #[doc = "0x530 - Slope of 5th piece wise linear function"] - pub a4: A4, - #[doc = "0x534 - Slope of 6th piece wise linear function"] - pub a5: A5, - _reserved12: [u8; 0x08], - #[doc = "0x540 - y-intercept of 1st piece wise linear function"] - pub b0: B0, - #[doc = "0x544 - y-intercept of 2nd piece wise linear function"] - pub b1: B1, - #[doc = "0x548 - y-intercept of 3rd piece wise linear function"] - pub b2: B2, - #[doc = "0x54c - y-intercept of 4th piece wise linear function"] - pub b3: B3, - #[doc = "0x550 - y-intercept of 5th piece wise linear function"] - pub b4: B4, - #[doc = "0x554 - y-intercept of 6th piece wise linear function"] - pub b5: B5, - _reserved18: [u8; 0x08], - #[doc = "0x560 - End point of 1st piece wise linear function"] - pub t0: T0, - #[doc = "0x564 - End point of 2nd piece wise linear function"] - pub t1: T1, - #[doc = "0x568 - End point of 3rd piece wise linear function"] - pub t2: T2, - #[doc = "0x56c - End point of 4th piece wise linear function"] - pub t3: T3, - #[doc = "0x570 - End point of 5th piece wise linear function"] - pub t4: T4, -} -#[doc = "TASKS_START (w) register accessor: an alias for `Reg`"] -pub type TASKS_START = crate::Reg; -#[doc = "Start temperature measurement"] -pub mod tasks_start; -#[doc = "TASKS_STOP (w) register accessor: an alias for `Reg`"] -pub type TASKS_STOP = crate::Reg; -#[doc = "Stop temperature measurement"] -pub mod tasks_stop; -#[doc = "EVENTS_DATARDY (rw) register accessor: an alias for `Reg`"] -pub type EVENTS_DATARDY = crate::Reg; -#[doc = "Temperature measurement complete, data ready"] -pub mod events_datardy; -#[doc = "INTENSET (rw) register accessor: an alias for `Reg`"] -pub type INTENSET = crate::Reg; -#[doc = "Enable interrupt"] -pub mod intenset; -#[doc = "INTENCLR (rw) register accessor: an alias for `Reg`"] -pub type INTENCLR = crate::Reg; -#[doc = "Disable interrupt"] -pub mod intenclr; -#[doc = "TEMP (r) register accessor: an alias for `Reg`"] -pub type TEMP = crate::Reg; -#[doc = "Temperature in degC (0.25deg steps)"] -pub mod temp; -#[doc = "A0 (rw) register accessor: an alias for `Reg`"] -pub type A0 = crate::Reg; -#[doc = "Slope of 1st piece wise linear function"] -pub mod a0; -#[doc = "A1 (rw) register accessor: an alias for `Reg`"] -pub type A1 = crate::Reg; -#[doc = "Slope of 2nd piece wise linear function"] -pub mod a1; -#[doc = "A2 (rw) register accessor: an alias for `Reg`"] -pub type A2 = crate::Reg; -#[doc = "Slope of 3rd piece wise linear function"] -pub mod a2; -#[doc = "A3 (rw) register accessor: an alias for `Reg`"] -pub type A3 = crate::Reg; -#[doc = "Slope of 4th piece wise linear function"] -pub mod a3; -#[doc = "A4 (rw) register accessor: an alias for `Reg`"] -pub type A4 = crate::Reg; -#[doc = "Slope of 5th piece wise linear function"] -pub mod a4; -#[doc = "A5 (rw) register accessor: an alias for `Reg`"] -pub type A5 = crate::Reg; -#[doc = "Slope of 6th piece wise linear function"] -pub mod a5; -#[doc = "B0 (rw) register accessor: an alias for `Reg`"] -pub type B0 = crate::Reg; -#[doc = "y-intercept of 1st piece wise linear function"] -pub mod b0; -#[doc = "B1 (rw) register accessor: an alias for `Reg`"] -pub type B1 = crate::Reg; -#[doc = "y-intercept of 2nd piece wise linear function"] -pub mod b1; -#[doc = "B2 (rw) register accessor: an alias for `Reg`"] -pub type B2 = crate::Reg; -#[doc = "y-intercept of 3rd piece wise linear function"] -pub mod b2; -#[doc = "B3 (rw) register accessor: an alias for `Reg`"] -pub type B3 = crate::Reg; -#[doc = "y-intercept of 4th piece wise linear function"] -pub mod b3; -#[doc = "B4 (rw) register accessor: an alias for `Reg`"] -pub type B4 = crate::Reg; -#[doc = "y-intercept of 5th piece wise linear function"] -pub mod b4; -#[doc = "B5 (rw) register accessor: an alias for `Reg`"] -pub type B5 = crate::Reg; -#[doc = "y-intercept of 6th piece wise linear function"] -pub mod b5; -#[doc = "T0 (rw) register accessor: an alias for `Reg`"] -pub type T0 = crate::Reg; -#[doc = "End point of 1st piece wise linear function"] -pub mod t0; -#[doc = "T1 (rw) register accessor: an alias for `Reg`"] -pub type T1 = crate::Reg; -#[doc = "End point of 2nd piece wise linear function"] -pub mod t1; -#[doc = "T2 (rw) register accessor: an alias for `Reg`"] -pub type T2 = crate::Reg; -#[doc = "End point of 3rd piece wise linear function"] -pub mod t2; -#[doc = "T3 (rw) register accessor: an alias for `Reg`"] -pub type T3 = crate::Reg; -#[doc = "End point of 4th piece wise linear function"] -pub mod t3; -#[doc = "T4 (rw) register accessor: an alias for `Reg`"] -pub type T4 = crate::Reg; -#[doc = "End point of 5th piece wise linear function"] -pub mod t4; diff --git a/down-the-stack/dk_pac/src/temp/a0.rs b/down-the-stack/dk_pac/src/temp/a0.rs deleted file mode 100644 index 90efb41..0000000 --- a/down-the-stack/dk_pac/src/temp/a0.rs +++ /dev/null @@ -1,80 +0,0 @@ -#[doc = "Register `A0` 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 `A0` 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 `A0` reader - Slope of 1st piece wise linear function"] -pub type A0_R = crate::FieldReader; -#[doc = "Field `A0` writer - Slope of 1st piece wise linear function"] -pub type A0_W<'a, const O: u8> = crate::FieldWriter<'a, u32, A0_SPEC, u16, u16, 12, O>; -impl R { - #[doc = "Bits 0:11 - Slope of 1st piece wise linear function"] - #[inline(always)] - pub fn a0(&self) -> A0_R { - A0_R::new((self.bits & 0x0fff) as u16) - } -} -impl W { - #[doc = "Bits 0:11 - Slope of 1st piece wise linear function"] - #[inline(always)] - #[must_use] - pub fn a0(&mut self) -> A0_W<0> { - A0_W::new(self) - } - #[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 = "Slope of 1st piece wise linear function\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 [a0](index.html) module"] -pub struct A0_SPEC; -impl crate::RegisterSpec for A0_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [a0::R](R) reader structure"] -impl crate::Readable for A0_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [a0::W](W) writer structure"] -impl crate::Writable for A0_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets A0 to value 0x0320"] -impl crate::Resettable for A0_SPEC { - const RESET_VALUE: Self::Ux = 0x0320; -} diff --git a/down-the-stack/dk_pac/src/temp/a1.rs b/down-the-stack/dk_pac/src/temp/a1.rs deleted file mode 100644 index 298c3b1..0000000 --- a/down-the-stack/dk_pac/src/temp/a1.rs +++ /dev/null @@ -1,80 +0,0 @@ -#[doc = "Register `A1` 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 `A1` 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 `A1` reader - Slope of 2nd piece wise linear function"] -pub type A1_R = crate::FieldReader; -#[doc = "Field `A1` writer - Slope of 2nd piece wise linear function"] -pub type A1_W<'a, const O: u8> = crate::FieldWriter<'a, u32, A1_SPEC, u16, u16, 12, O>; -impl R { - #[doc = "Bits 0:11 - Slope of 2nd piece wise linear function"] - #[inline(always)] - pub fn a1(&self) -> A1_R { - A1_R::new((self.bits & 0x0fff) as u16) - } -} -impl W { - #[doc = "Bits 0:11 - Slope of 2nd piece wise linear function"] - #[inline(always)] - #[must_use] - pub fn a1(&mut self) -> A1_W<0> { - A1_W::new(self) - } - #[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 = "Slope of 2nd piece wise linear function\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 [a1](index.html) module"] -pub struct A1_SPEC; -impl crate::RegisterSpec for A1_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [a1::R](R) reader structure"] -impl crate::Readable for A1_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [a1::W](W) writer structure"] -impl crate::Writable for A1_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets A1 to value 0x0343"] -impl crate::Resettable for A1_SPEC { - const RESET_VALUE: Self::Ux = 0x0343; -} diff --git a/down-the-stack/dk_pac/src/temp/a2.rs b/down-the-stack/dk_pac/src/temp/a2.rs deleted file mode 100644 index a495f9b..0000000 --- a/down-the-stack/dk_pac/src/temp/a2.rs +++ /dev/null @@ -1,80 +0,0 @@ -#[doc = "Register `A2` 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 `A2` 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 `A2` reader - Slope of 3rd piece wise linear function"] -pub type A2_R = crate::FieldReader; -#[doc = "Field `A2` writer - Slope of 3rd piece wise linear function"] -pub type A2_W<'a, const O: u8> = crate::FieldWriter<'a, u32, A2_SPEC, u16, u16, 12, O>; -impl R { - #[doc = "Bits 0:11 - Slope of 3rd piece wise linear function"] - #[inline(always)] - pub fn a2(&self) -> A2_R { - A2_R::new((self.bits & 0x0fff) as u16) - } -} -impl W { - #[doc = "Bits 0:11 - Slope of 3rd piece wise linear function"] - #[inline(always)] - #[must_use] - pub fn a2(&mut self) -> A2_W<0> { - A2_W::new(self) - } - #[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 = "Slope of 3rd piece wise linear function\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 [a2](index.html) module"] -pub struct A2_SPEC; -impl crate::RegisterSpec for A2_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [a2::R](R) reader structure"] -impl crate::Readable for A2_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [a2::W](W) writer structure"] -impl crate::Writable for A2_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets A2 to value 0x035d"] -impl crate::Resettable for A2_SPEC { - const RESET_VALUE: Self::Ux = 0x035d; -} diff --git a/down-the-stack/dk_pac/src/temp/a3.rs b/down-the-stack/dk_pac/src/temp/a3.rs deleted file mode 100644 index b879c53..0000000 --- a/down-the-stack/dk_pac/src/temp/a3.rs +++ /dev/null @@ -1,80 +0,0 @@ -#[doc = "Register `A3` 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 `A3` 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 `A3` reader - Slope of 4th piece wise linear function"] -pub type A3_R = crate::FieldReader; -#[doc = "Field `A3` writer - Slope of 4th piece wise linear function"] -pub type A3_W<'a, const O: u8> = crate::FieldWriter<'a, u32, A3_SPEC, u16, u16, 12, O>; -impl R { - #[doc = "Bits 0:11 - Slope of 4th piece wise linear function"] - #[inline(always)] - pub fn a3(&self) -> A3_R { - A3_R::new((self.bits & 0x0fff) as u16) - } -} -impl W { - #[doc = "Bits 0:11 - Slope of 4th piece wise linear function"] - #[inline(always)] - #[must_use] - pub fn a3(&mut self) -> A3_W<0> { - A3_W::new(self) - } - #[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 = "Slope of 4th piece wise linear function\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 [a3](index.html) module"] -pub struct A3_SPEC; -impl crate::RegisterSpec for A3_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [a3::R](R) reader structure"] -impl crate::Readable for A3_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [a3::W](W) writer structure"] -impl crate::Writable for A3_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets A3 to value 0x0400"] -impl crate::Resettable for A3_SPEC { - const RESET_VALUE: Self::Ux = 0x0400; -} diff --git a/down-the-stack/dk_pac/src/temp/a4.rs b/down-the-stack/dk_pac/src/temp/a4.rs deleted file mode 100644 index 7fee010..0000000 --- a/down-the-stack/dk_pac/src/temp/a4.rs +++ /dev/null @@ -1,80 +0,0 @@ -#[doc = "Register `A4` 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 `A4` 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 `A4` reader - Slope of 5th piece wise linear function"] -pub type A4_R = crate::FieldReader; -#[doc = "Field `A4` writer - Slope of 5th piece wise linear function"] -pub type A4_W<'a, const O: u8> = crate::FieldWriter<'a, u32, A4_SPEC, u16, u16, 12, O>; -impl R { - #[doc = "Bits 0:11 - Slope of 5th piece wise linear function"] - #[inline(always)] - pub fn a4(&self) -> A4_R { - A4_R::new((self.bits & 0x0fff) as u16) - } -} -impl W { - #[doc = "Bits 0:11 - Slope of 5th piece wise linear function"] - #[inline(always)] - #[must_use] - pub fn a4(&mut self) -> A4_W<0> { - A4_W::new(self) - } - #[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 = "Slope of 5th piece wise linear function\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 [a4](index.html) module"] -pub struct A4_SPEC; -impl crate::RegisterSpec for A4_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [a4::R](R) reader structure"] -impl crate::Readable for A4_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [a4::W](W) writer structure"] -impl crate::Writable for A4_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets A4 to value 0x047f"] -impl crate::Resettable for A4_SPEC { - const RESET_VALUE: Self::Ux = 0x047f; -} diff --git a/down-the-stack/dk_pac/src/temp/a5.rs b/down-the-stack/dk_pac/src/temp/a5.rs deleted file mode 100644 index 96c32eb..0000000 --- a/down-the-stack/dk_pac/src/temp/a5.rs +++ /dev/null @@ -1,80 +0,0 @@ -#[doc = "Register `A5` 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 `A5` 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 `A5` reader - Slope of 6th piece wise linear function"] -pub type A5_R = crate::FieldReader; -#[doc = "Field `A5` writer - Slope of 6th piece wise linear function"] -pub type A5_W<'a, const O: u8> = crate::FieldWriter<'a, u32, A5_SPEC, u16, u16, 12, O>; -impl R { - #[doc = "Bits 0:11 - Slope of 6th piece wise linear function"] - #[inline(always)] - pub fn a5(&self) -> A5_R { - A5_R::new((self.bits & 0x0fff) as u16) - } -} -impl W { - #[doc = "Bits 0:11 - Slope of 6th piece wise linear function"] - #[inline(always)] - #[must_use] - pub fn a5(&mut self) -> A5_W<0> { - A5_W::new(self) - } - #[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 = "Slope of 6th piece wise linear function\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 [a5](index.html) module"] -pub struct A5_SPEC; -impl crate::RegisterSpec for A5_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [a5::R](R) reader structure"] -impl crate::Readable for A5_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [a5::W](W) writer structure"] -impl crate::Writable for A5_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets A5 to value 0x037b"] -impl crate::Resettable for A5_SPEC { - const RESET_VALUE: Self::Ux = 0x037b; -} diff --git a/down-the-stack/dk_pac/src/temp/b0.rs b/down-the-stack/dk_pac/src/temp/b0.rs deleted file mode 100644 index bfe0db2..0000000 --- a/down-the-stack/dk_pac/src/temp/b0.rs +++ /dev/null @@ -1,80 +0,0 @@ -#[doc = "Register `B0` 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 `B0` 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 `B0` reader - y-intercept of 1st piece wise linear function"] -pub type B0_R = crate::FieldReader; -#[doc = "Field `B0` writer - y-intercept of 1st piece wise linear function"] -pub type B0_W<'a, const O: u8> = crate::FieldWriter<'a, u32, B0_SPEC, u16, u16, 14, O>; -impl R { - #[doc = "Bits 0:13 - y-intercept of 1st piece wise linear function"] - #[inline(always)] - pub fn b0(&self) -> B0_R { - B0_R::new((self.bits & 0x3fff) as u16) - } -} -impl W { - #[doc = "Bits 0:13 - y-intercept of 1st piece wise linear function"] - #[inline(always)] - #[must_use] - pub fn b0(&mut self) -> B0_W<0> { - B0_W::new(self) - } - #[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 = "y-intercept of 1st piece wise linear function\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 [b0](index.html) module"] -pub struct B0_SPEC; -impl crate::RegisterSpec for B0_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [b0::R](R) reader structure"] -impl crate::Readable for B0_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [b0::W](W) writer structure"] -impl crate::Writable for B0_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets B0 to value 0x3fcc"] -impl crate::Resettable for B0_SPEC { - const RESET_VALUE: Self::Ux = 0x3fcc; -} diff --git a/down-the-stack/dk_pac/src/temp/b1.rs b/down-the-stack/dk_pac/src/temp/b1.rs deleted file mode 100644 index 10d8a60..0000000 --- a/down-the-stack/dk_pac/src/temp/b1.rs +++ /dev/null @@ -1,80 +0,0 @@ -#[doc = "Register `B1` 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 `B1` 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 `B1` reader - y-intercept of 2nd piece wise linear function"] -pub type B1_R = crate::FieldReader; -#[doc = "Field `B1` writer - y-intercept of 2nd piece wise linear function"] -pub type B1_W<'a, const O: u8> = crate::FieldWriter<'a, u32, B1_SPEC, u16, u16, 14, O>; -impl R { - #[doc = "Bits 0:13 - y-intercept of 2nd piece wise linear function"] - #[inline(always)] - pub fn b1(&self) -> B1_R { - B1_R::new((self.bits & 0x3fff) as u16) - } -} -impl W { - #[doc = "Bits 0:13 - y-intercept of 2nd piece wise linear function"] - #[inline(always)] - #[must_use] - pub fn b1(&mut self) -> B1_W<0> { - B1_W::new(self) - } - #[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 = "y-intercept of 2nd piece wise linear function\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 [b1](index.html) module"] -pub struct B1_SPEC; -impl crate::RegisterSpec for B1_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [b1::R](R) reader structure"] -impl crate::Readable for B1_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [b1::W](W) writer structure"] -impl crate::Writable for B1_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets B1 to value 0x3f98"] -impl crate::Resettable for B1_SPEC { - const RESET_VALUE: Self::Ux = 0x3f98; -} diff --git a/down-the-stack/dk_pac/src/temp/b2.rs b/down-the-stack/dk_pac/src/temp/b2.rs deleted file mode 100644 index b72512d..0000000 --- a/down-the-stack/dk_pac/src/temp/b2.rs +++ /dev/null @@ -1,80 +0,0 @@ -#[doc = "Register `B2` 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 `B2` 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 `B2` reader - y-intercept of 3rd piece wise linear function"] -pub type B2_R = crate::FieldReader; -#[doc = "Field `B2` writer - y-intercept of 3rd piece wise linear function"] -pub type B2_W<'a, const O: u8> = crate::FieldWriter<'a, u32, B2_SPEC, u16, u16, 14, O>; -impl R { - #[doc = "Bits 0:13 - y-intercept of 3rd piece wise linear function"] - #[inline(always)] - pub fn b2(&self) -> B2_R { - B2_R::new((self.bits & 0x3fff) as u16) - } -} -impl W { - #[doc = "Bits 0:13 - y-intercept of 3rd piece wise linear function"] - #[inline(always)] - #[must_use] - pub fn b2(&mut self) -> B2_W<0> { - B2_W::new(self) - } - #[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 = "y-intercept of 3rd piece wise linear function\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 [b2](index.html) module"] -pub struct B2_SPEC; -impl crate::RegisterSpec for B2_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [b2::R](R) reader structure"] -impl crate::Readable for B2_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [b2::W](W) writer structure"] -impl crate::Writable for B2_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets B2 to value 0x3f98"] -impl crate::Resettable for B2_SPEC { - const RESET_VALUE: Self::Ux = 0x3f98; -} diff --git a/down-the-stack/dk_pac/src/temp/b3.rs b/down-the-stack/dk_pac/src/temp/b3.rs deleted file mode 100644 index 3c93bdd..0000000 --- a/down-the-stack/dk_pac/src/temp/b3.rs +++ /dev/null @@ -1,80 +0,0 @@ -#[doc = "Register `B3` 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 `B3` 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 `B3` reader - y-intercept of 4th piece wise linear function"] -pub type B3_R = crate::FieldReader; -#[doc = "Field `B3` writer - y-intercept of 4th piece wise linear function"] -pub type B3_W<'a, const O: u8> = crate::FieldWriter<'a, u32, B3_SPEC, u16, u16, 14, O>; -impl R { - #[doc = "Bits 0:13 - y-intercept of 4th piece wise linear function"] - #[inline(always)] - pub fn b3(&self) -> B3_R { - B3_R::new((self.bits & 0x3fff) as u16) - } -} -impl W { - #[doc = "Bits 0:13 - y-intercept of 4th piece wise linear function"] - #[inline(always)] - #[must_use] - pub fn b3(&mut self) -> B3_W<0> { - 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 - } -} -#[doc = "y-intercept of 4th piece wise linear function\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 [b3](index.html) module"] -pub struct B3_SPEC; -impl crate::RegisterSpec for B3_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [b3::R](R) reader structure"] -impl crate::Readable for B3_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [b3::W](W) writer structure"] -impl crate::Writable for B3_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets B3 to value 0x12"] -impl crate::Resettable for B3_SPEC { - const RESET_VALUE: Self::Ux = 0x12; -} diff --git a/down-the-stack/dk_pac/src/temp/b4.rs b/down-the-stack/dk_pac/src/temp/b4.rs deleted file mode 100644 index 41026aa..0000000 --- a/down-the-stack/dk_pac/src/temp/b4.rs +++ /dev/null @@ -1,80 +0,0 @@ -#[doc = "Register `B4` 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 `B4` 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 `B4` reader - y-intercept of 5th piece wise linear function"] -pub type B4_R = crate::FieldReader; -#[doc = "Field `B4` writer - y-intercept of 5th piece wise linear function"] -pub type B4_W<'a, const O: u8> = crate::FieldWriter<'a, u32, B4_SPEC, u16, u16, 14, O>; -impl R { - #[doc = "Bits 0:13 - y-intercept of 5th piece wise linear function"] - #[inline(always)] - pub fn b4(&self) -> B4_R { - B4_R::new((self.bits & 0x3fff) as u16) - } -} -impl W { - #[doc = "Bits 0:13 - y-intercept of 5th piece wise linear function"] - #[inline(always)] - #[must_use] - pub fn b4(&mut self) -> B4_W<0> { - B4_W::new(self) - } - #[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 = "y-intercept of 5th piece wise linear function\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 [b4](index.html) module"] -pub struct B4_SPEC; -impl crate::RegisterSpec for B4_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [b4::R](R) reader structure"] -impl crate::Readable for B4_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [b4::W](W) writer structure"] -impl crate::Writable for B4_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets B4 to value 0x6a"] -impl crate::Resettable for B4_SPEC { - const RESET_VALUE: Self::Ux = 0x6a; -} diff --git a/down-the-stack/dk_pac/src/temp/b5.rs b/down-the-stack/dk_pac/src/temp/b5.rs deleted file mode 100644 index 7e89f39..0000000 --- a/down-the-stack/dk_pac/src/temp/b5.rs +++ /dev/null @@ -1,80 +0,0 @@ -#[doc = "Register `B5` 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 `B5` 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 `B5` reader - y-intercept of 6th piece wise linear function"] -pub type B5_R = crate::FieldReader; -#[doc = "Field `B5` writer - y-intercept of 6th piece wise linear function"] -pub type B5_W<'a, const O: u8> = crate::FieldWriter<'a, u32, B5_SPEC, u16, u16, 14, O>; -impl R { - #[doc = "Bits 0:13 - y-intercept of 6th piece wise linear function"] - #[inline(always)] - pub fn b5(&self) -> B5_R { - B5_R::new((self.bits & 0x3fff) as u16) - } -} -impl W { - #[doc = "Bits 0:13 - y-intercept of 6th piece wise linear function"] - #[inline(always)] - #[must_use] - pub fn b5(&mut self) -> B5_W<0> { - B5_W::new(self) - } - #[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 = "y-intercept of 6th piece wise linear function\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 [b5](index.html) module"] -pub struct B5_SPEC; -impl crate::RegisterSpec for B5_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [b5::R](R) reader structure"] -impl crate::Readable for B5_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [b5::W](W) writer structure"] -impl crate::Writable for B5_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets B5 to value 0x3dd0"] -impl crate::Resettable for B5_SPEC { - const RESET_VALUE: Self::Ux = 0x3dd0; -} diff --git a/down-the-stack/dk_pac/src/temp/events_datardy.rs b/down-the-stack/dk_pac/src/temp/events_datardy.rs deleted file mode 100644 index 742b352..0000000 --- a/down-the-stack/dk_pac/src/temp/events_datardy.rs +++ /dev/null @@ -1,127 +0,0 @@ -#[doc = "Register `EVENTS_DATARDY` 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 `EVENTS_DATARDY` 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 `EVENTS_DATARDY` reader - Temperature measurement complete, data ready"] -pub type EVENTS_DATARDY_R = crate::BitReader; -#[doc = "Temperature measurement complete, data ready\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum EVENTS_DATARDY_A { - #[doc = "0: Event not generated"] - NOT_GENERATED = 0, - #[doc = "1: Event generated"] - GENERATED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: EVENTS_DATARDY_A) -> Self { - variant as u8 != 0 - } -} -impl EVENTS_DATARDY_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> EVENTS_DATARDY_A { - match self.bits { - false => EVENTS_DATARDY_A::NOT_GENERATED, - true => EVENTS_DATARDY_A::GENERATED, - } - } - #[doc = "Checks if the value of the field is `NOT_GENERATED`"] - #[inline(always)] - pub fn is_not_generated(&self) -> bool { - *self == EVENTS_DATARDY_A::NOT_GENERATED - } - #[doc = "Checks if the value of the field is `GENERATED`"] - #[inline(always)] - pub fn is_generated(&self) -> bool { - *self == EVENTS_DATARDY_A::GENERATED - } -} -#[doc = "Field `EVENTS_DATARDY` writer - Temperature measurement complete, data ready"] -pub type EVENTS_DATARDY_W<'a, const O: u8> = - crate::BitWriter<'a, u32, EVENTS_DATARDY_SPEC, EVENTS_DATARDY_A, O>; -impl<'a, const O: u8> EVENTS_DATARDY_W<'a, O> { - #[doc = "Event not generated"] - #[inline(always)] - pub fn not_generated(self) -> &'a mut W { - self.variant(EVENTS_DATARDY_A::NOT_GENERATED) - } - #[doc = "Event generated"] - #[inline(always)] - pub fn generated(self) -> &'a mut W { - self.variant(EVENTS_DATARDY_A::GENERATED) - } -} -impl R { - #[doc = "Bit 0 - Temperature measurement complete, data ready"] - #[inline(always)] - pub fn events_datardy(&self) -> EVENTS_DATARDY_R { - EVENTS_DATARDY_R::new((self.bits & 1) != 0) - } -} -impl W { - #[doc = "Bit 0 - Temperature measurement complete, data ready"] - #[inline(always)] - #[must_use] - pub fn events_datardy(&mut self) -> EVENTS_DATARDY_W<0> { - EVENTS_DATARDY_W::new(self) - } - #[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 = "Temperature measurement complete, data ready\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 [events_datardy](index.html) module"] -pub struct EVENTS_DATARDY_SPEC; -impl crate::RegisterSpec for EVENTS_DATARDY_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [events_datardy::R](R) reader structure"] -impl crate::Readable for EVENTS_DATARDY_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [events_datardy::W](W) writer structure"] -impl crate::Writable for EVENTS_DATARDY_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets EVENTS_DATARDY to value 0"] -impl crate::Resettable for EVENTS_DATARDY_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/temp/intenclr.rs b/down-the-stack/dk_pac/src/temp/intenclr.rs deleted file mode 100644 index 96826ae..0000000 --- a/down-the-stack/dk_pac/src/temp/intenclr.rs +++ /dev/null @@ -1,133 +0,0 @@ -#[doc = "Register `INTENCLR` 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 `INTENCLR` 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 `DATARDY` reader - Write '1' to disable interrupt for event DATARDY"] -pub type DATARDY_R = crate::BitReader; -#[doc = "Write '1' to disable interrupt for event DATARDY\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum DATARDY_A { - #[doc = "0: Read: Disabled"] - DISABLED = 0, - #[doc = "1: Read: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: DATARDY_A) -> Self { - variant as u8 != 0 - } -} -impl DATARDY_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> DATARDY_A { - match self.bits { - false => DATARDY_A::DISABLED, - true => DATARDY_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == DATARDY_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == DATARDY_A::ENABLED - } -} -#[doc = "Write '1' to disable interrupt for event DATARDY\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum DATARDY_AW { - #[doc = "1: Disable"] - CLEAR = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: DATARDY_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `DATARDY` writer - Write '1' to disable interrupt for event DATARDY"] -pub type DATARDY_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENCLR_SPEC, DATARDY_AW, O>; -impl<'a, const O: u8> DATARDY_W<'a, O> { - #[doc = "Disable"] - #[inline(always)] - pub fn clear(self) -> &'a mut W { - self.variant(DATARDY_AW::CLEAR) - } -} -impl R { - #[doc = "Bit 0 - Write '1' to disable interrupt for event DATARDY"] - #[inline(always)] - pub fn datardy(&self) -> DATARDY_R { - DATARDY_R::new((self.bits & 1) != 0) - } -} -impl W { - #[doc = "Bit 0 - Write '1' to disable interrupt for event DATARDY"] - #[inline(always)] - #[must_use] - pub fn datardy(&mut self) -> DATARDY_W<0> { - DATARDY_W::new(self) - } - #[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 = "Disable interrupt\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 [intenclr](index.html) module"] -pub struct INTENCLR_SPEC; -impl crate::RegisterSpec for INTENCLR_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [intenclr::R](R) reader structure"] -impl crate::Readable for INTENCLR_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [intenclr::W](W) writer structure"] -impl crate::Writable for INTENCLR_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets INTENCLR to value 0"] -impl crate::Resettable for INTENCLR_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/temp/intenset.rs b/down-the-stack/dk_pac/src/temp/intenset.rs deleted file mode 100644 index e9fae65..0000000 --- a/down-the-stack/dk_pac/src/temp/intenset.rs +++ /dev/null @@ -1,133 +0,0 @@ -#[doc = "Register `INTENSET` 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 `INTENSET` 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 `DATARDY` reader - Write '1' to enable interrupt for event DATARDY"] -pub type DATARDY_R = crate::BitReader; -#[doc = "Write '1' to enable interrupt for event DATARDY\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum DATARDY_A { - #[doc = "0: Read: Disabled"] - DISABLED = 0, - #[doc = "1: Read: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: DATARDY_A) -> Self { - variant as u8 != 0 - } -} -impl DATARDY_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> DATARDY_A { - match self.bits { - false => DATARDY_A::DISABLED, - true => DATARDY_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == DATARDY_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == DATARDY_A::ENABLED - } -} -#[doc = "Write '1' to enable interrupt for event DATARDY\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum DATARDY_AW { - #[doc = "1: Enable"] - SET = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: DATARDY_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `DATARDY` writer - Write '1' to enable interrupt for event DATARDY"] -pub type DATARDY_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENSET_SPEC, DATARDY_AW, O>; -impl<'a, const O: u8> DATARDY_W<'a, O> { - #[doc = "Enable"] - #[inline(always)] - pub fn set(self) -> &'a mut W { - self.variant(DATARDY_AW::SET) - } -} -impl R { - #[doc = "Bit 0 - Write '1' to enable interrupt for event DATARDY"] - #[inline(always)] - pub fn datardy(&self) -> DATARDY_R { - DATARDY_R::new((self.bits & 1) != 0) - } -} -impl W { - #[doc = "Bit 0 - Write '1' to enable interrupt for event DATARDY"] - #[inline(always)] - #[must_use] - pub fn datardy(&mut self) -> DATARDY_W<0> { - DATARDY_W::new(self) - } - #[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 = "Enable interrupt\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 [intenset](index.html) module"] -pub struct INTENSET_SPEC; -impl crate::RegisterSpec for INTENSET_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [intenset::R](R) reader structure"] -impl crate::Readable for INTENSET_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [intenset::W](W) writer structure"] -impl crate::Writable for INTENSET_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets INTENSET to value 0"] -impl crate::Resettable for INTENSET_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/temp/t0.rs b/down-the-stack/dk_pac/src/temp/t0.rs deleted file mode 100644 index 59f688a..0000000 --- a/down-the-stack/dk_pac/src/temp/t0.rs +++ /dev/null @@ -1,80 +0,0 @@ -#[doc = "Register `T0` 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 `T0` 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 `T0` reader - End point of 1st piece wise linear function"] -pub type T0_R = crate::FieldReader; -#[doc = "Field `T0` writer - End point of 1st piece wise linear function"] -pub type T0_W<'a, const O: u8> = crate::FieldWriter<'a, u32, T0_SPEC, u8, u8, 8, O>; -impl R { - #[doc = "Bits 0:7 - End point of 1st piece wise linear function"] - #[inline(always)] - pub fn t0(&self) -> T0_R { - T0_R::new((self.bits & 0xff) as u8) - } -} -impl W { - #[doc = "Bits 0:7 - End point of 1st piece wise linear function"] - #[inline(always)] - #[must_use] - pub fn t0(&mut self) -> T0_W<0> { - T0_W::new(self) - } - #[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 = "End point of 1st piece wise linear function\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 [t0](index.html) module"] -pub struct T0_SPEC; -impl crate::RegisterSpec for T0_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [t0::R](R) reader structure"] -impl crate::Readable for T0_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [t0::W](W) writer structure"] -impl crate::Writable for T0_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets T0 to value 0xe2"] -impl crate::Resettable for T0_SPEC { - const RESET_VALUE: Self::Ux = 0xe2; -} diff --git a/down-the-stack/dk_pac/src/temp/t1.rs b/down-the-stack/dk_pac/src/temp/t1.rs deleted file mode 100644 index 3d44362..0000000 --- a/down-the-stack/dk_pac/src/temp/t1.rs +++ /dev/null @@ -1,80 +0,0 @@ -#[doc = "Register `T1` 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 `T1` 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 `T1` reader - End point of 2nd piece wise linear function"] -pub type T1_R = crate::FieldReader; -#[doc = "Field `T1` writer - End point of 2nd piece wise linear function"] -pub type T1_W<'a, const O: u8> = crate::FieldWriter<'a, u32, T1_SPEC, u8, u8, 8, O>; -impl R { - #[doc = "Bits 0:7 - End point of 2nd piece wise linear function"] - #[inline(always)] - pub fn t1(&self) -> T1_R { - T1_R::new((self.bits & 0xff) as u8) - } -} -impl W { - #[doc = "Bits 0:7 - End point of 2nd piece wise linear function"] - #[inline(always)] - #[must_use] - pub fn t1(&mut self) -> T1_W<0> { - T1_W::new(self) - } - #[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 = "End point of 2nd piece wise linear function\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 [t1](index.html) module"] -pub struct T1_SPEC; -impl crate::RegisterSpec for T1_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [t1::R](R) reader structure"] -impl crate::Readable for T1_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [t1::W](W) writer structure"] -impl crate::Writable for T1_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets T1 to value 0"] -impl crate::Resettable for T1_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/temp/t2.rs b/down-the-stack/dk_pac/src/temp/t2.rs deleted file mode 100644 index 31f7884..0000000 --- a/down-the-stack/dk_pac/src/temp/t2.rs +++ /dev/null @@ -1,80 +0,0 @@ -#[doc = "Register `T2` 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 `T2` 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 `T2` reader - End point of 3rd piece wise linear function"] -pub type T2_R = crate::FieldReader; -#[doc = "Field `T2` writer - End point of 3rd piece wise linear function"] -pub type T2_W<'a, const O: u8> = crate::FieldWriter<'a, u32, T2_SPEC, u8, u8, 8, O>; -impl R { - #[doc = "Bits 0:7 - End point of 3rd piece wise linear function"] - #[inline(always)] - pub fn t2(&self) -> T2_R { - T2_R::new((self.bits & 0xff) as u8) - } -} -impl W { - #[doc = "Bits 0:7 - End point of 3rd piece wise linear function"] - #[inline(always)] - #[must_use] - pub fn t2(&mut self) -> T2_W<0> { - T2_W::new(self) - } - #[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 = "End point of 3rd piece wise linear function\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 [t2](index.html) module"] -pub struct T2_SPEC; -impl crate::RegisterSpec for T2_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [t2::R](R) reader structure"] -impl crate::Readable for T2_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [t2::W](W) writer structure"] -impl crate::Writable for T2_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets T2 to value 0x14"] -impl crate::Resettable for T2_SPEC { - const RESET_VALUE: Self::Ux = 0x14; -} diff --git a/down-the-stack/dk_pac/src/temp/t3.rs b/down-the-stack/dk_pac/src/temp/t3.rs deleted file mode 100644 index e7a3e57..0000000 --- a/down-the-stack/dk_pac/src/temp/t3.rs +++ /dev/null @@ -1,80 +0,0 @@ -#[doc = "Register `T3` 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 `T3` 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 `T3` reader - End point of 4th piece wise linear function"] -pub type T3_R = crate::FieldReader; -#[doc = "Field `T3` writer - End point of 4th piece wise linear function"] -pub type T3_W<'a, const O: u8> = crate::FieldWriter<'a, u32, T3_SPEC, u8, u8, 8, O>; -impl R { - #[doc = "Bits 0:7 - End point of 4th piece wise linear function"] - #[inline(always)] - pub fn t3(&self) -> T3_R { - T3_R::new((self.bits & 0xff) as u8) - } -} -impl W { - #[doc = "Bits 0:7 - End point of 4th piece wise linear function"] - #[inline(always)] - #[must_use] - pub fn t3(&mut self) -> T3_W<0> { - T3_W::new(self) - } - #[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 = "End point of 4th piece wise linear function\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 [t3](index.html) module"] -pub struct T3_SPEC; -impl crate::RegisterSpec for T3_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [t3::R](R) reader structure"] -impl crate::Readable for T3_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [t3::W](W) writer structure"] -impl crate::Writable for T3_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets T3 to value 0x19"] -impl crate::Resettable for T3_SPEC { - const RESET_VALUE: Self::Ux = 0x19; -} diff --git a/down-the-stack/dk_pac/src/temp/t4.rs b/down-the-stack/dk_pac/src/temp/t4.rs deleted file mode 100644 index dd1faf8..0000000 --- a/down-the-stack/dk_pac/src/temp/t4.rs +++ /dev/null @@ -1,80 +0,0 @@ -#[doc = "Register `T4` 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 `T4` 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 `T4` reader - End point of 5th piece wise linear function"] -pub type T4_R = crate::FieldReader; -#[doc = "Field `T4` writer - End point of 5th piece wise linear function"] -pub type T4_W<'a, const O: u8> = crate::FieldWriter<'a, u32, T4_SPEC, u8, u8, 8, O>; -impl R { - #[doc = "Bits 0:7 - End point of 5th piece wise linear function"] - #[inline(always)] - pub fn t4(&self) -> T4_R { - T4_R::new((self.bits & 0xff) as u8) - } -} -impl W { - #[doc = "Bits 0:7 - End point of 5th piece wise linear function"] - #[inline(always)] - #[must_use] - pub fn t4(&mut self) -> T4_W<0> { - T4_W::new(self) - } - #[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 = "End point of 5th piece wise linear function\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 [t4](index.html) module"] -pub struct T4_SPEC; -impl crate::RegisterSpec for T4_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [t4::R](R) reader structure"] -impl crate::Readable for T4_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [t4::W](W) writer structure"] -impl crate::Writable for T4_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets T4 to value 0x50"] -impl crate::Resettable for T4_SPEC { - const RESET_VALUE: Self::Ux = 0x50; -} diff --git a/down-the-stack/dk_pac/src/temp/tasks_start.rs b/down-the-stack/dk_pac/src/temp/tasks_start.rs deleted file mode 100644 index 1e08486..0000000 --- a/down-the-stack/dk_pac/src/temp/tasks_start.rs +++ /dev/null @@ -1,72 +0,0 @@ -#[doc = "Register `TASKS_START` 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 = "Start temperature measurement\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum TASKS_START_AW { - #[doc = "1: Trigger task"] - TRIGGER = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: TASKS_START_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `TASKS_START` writer - Start temperature measurement"] -pub type TASKS_START_W<'a, const O: u8> = - crate::BitWriter<'a, u32, TASKS_START_SPEC, TASKS_START_AW, O>; -impl<'a, const O: u8> TASKS_START_W<'a, O> { - #[doc = "Trigger task"] - #[inline(always)] - pub fn trigger(self) -> &'a mut W { - self.variant(TASKS_START_AW::TRIGGER) - } -} -impl W { - #[doc = "Bit 0 - Start temperature measurement"] - #[inline(always)] - #[must_use] - pub fn tasks_start(&mut self) -> TASKS_START_W<0> { - TASKS_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 - } -} -#[doc = "Start temperature measurement\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 [tasks_start](index.html) module"] -pub struct TASKS_START_SPEC; -impl crate::RegisterSpec for TASKS_START_SPEC { - type Ux = u32; -} -#[doc = "`write(|w| ..)` method takes [tasks_start::W](W) writer structure"] -impl crate::Writable for TASKS_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 TASKS_START to value 0"] -impl crate::Resettable for TASKS_START_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/temp/tasks_stop.rs b/down-the-stack/dk_pac/src/temp/tasks_stop.rs deleted file mode 100644 index 15f4883..0000000 --- a/down-the-stack/dk_pac/src/temp/tasks_stop.rs +++ /dev/null @@ -1,72 +0,0 @@ -#[doc = "Register `TASKS_STOP` 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 = "Stop temperature measurement\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum TASKS_STOP_AW { - #[doc = "1: Trigger task"] - TRIGGER = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: TASKS_STOP_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `TASKS_STOP` writer - Stop temperature measurement"] -pub type TASKS_STOP_W<'a, const O: u8> = - crate::BitWriter<'a, u32, TASKS_STOP_SPEC, TASKS_STOP_AW, O>; -impl<'a, const O: u8> TASKS_STOP_W<'a, O> { - #[doc = "Trigger task"] - #[inline(always)] - pub fn trigger(self) -> &'a mut W { - self.variant(TASKS_STOP_AW::TRIGGER) - } -} -impl W { - #[doc = "Bit 0 - Stop temperature measurement"] - #[inline(always)] - #[must_use] - pub fn tasks_stop(&mut self) -> TASKS_STOP_W<0> { - TASKS_STOP_W::new(self) - } - #[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 = "Stop temperature measurement\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 [tasks_stop](index.html) module"] -pub struct TASKS_STOP_SPEC; -impl crate::RegisterSpec for TASKS_STOP_SPEC { - type Ux = u32; -} -#[doc = "`write(|w| ..)` method takes [tasks_stop::W](W) writer structure"] -impl crate::Writable for TASKS_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 TASKS_STOP to value 0"] -impl crate::Resettable for TASKS_STOP_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/temp/temp.rs b/down-the-stack/dk_pac/src/temp/temp.rs deleted file mode 100644 index b62d49e..0000000 --- a/down-the-stack/dk_pac/src/temp/temp.rs +++ /dev/null @@ -1,37 +0,0 @@ -#[doc = "Register `TEMP` 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 = "Field `TEMP` reader - Temperature in degC (0.25deg steps)"] -pub type TEMP_R = crate::FieldReader; -impl R { - #[doc = "Bits 0:31 - Temperature in degC (0.25deg steps)"] - #[inline(always)] - pub fn temp(&self) -> TEMP_R { - TEMP_R::new(self.bits) - } -} -#[doc = "Temperature in degC (0.25deg steps)\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 [temp](index.html) module"] -pub struct TEMP_SPEC; -impl crate::RegisterSpec for TEMP_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [temp::R](R) reader structure"] -impl crate::Readable for TEMP_SPEC { - type Reader = R; -} -#[doc = "`reset()` method sets TEMP to value 0"] -impl crate::Resettable for TEMP_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/timer0.rs b/down-the-stack/dk_pac/src/timer0.rs deleted file mode 100644 index 8f355c6..0000000 --- a/down-the-stack/dk_pac/src/timer0.rs +++ /dev/null @@ -1,99 +0,0 @@ -#[doc = r"Register block"] -#[repr(C)] -pub struct RegisterBlock { - #[doc = "0x00 - Start Timer"] - pub tasks_start: TASKS_START, - #[doc = "0x04 - Stop Timer"] - pub tasks_stop: TASKS_STOP, - #[doc = "0x08 - Increment Timer (Counter mode only)"] - pub tasks_count: TASKS_COUNT, - #[doc = "0x0c - Clear time"] - pub tasks_clear: TASKS_CLEAR, - #[doc = "0x10 - Deprecated register - Shut down timer"] - pub tasks_shutdown: TASKS_SHUTDOWN, - _reserved5: [u8; 0x2c], - #[doc = "0x40..0x58 - Description collection: Capture Timer value to CC\\[n\\] -register"] - pub tasks_capture: [TASKS_CAPTURE; 6], - _reserved6: [u8; 0xe8], - #[doc = "0x140..0x158 - Description collection: Compare event on CC\\[n\\] -match"] - pub events_compare: [EVENTS_COMPARE; 6], - _reserved7: [u8; 0xa8], - #[doc = "0x200 - Shortcuts between local events and tasks"] - pub shorts: SHORTS, - _reserved8: [u8; 0x0100], - #[doc = "0x304 - Enable interrupt"] - pub intenset: INTENSET, - #[doc = "0x308 - Disable interrupt"] - pub intenclr: INTENCLR, - _reserved10: [u8; 0x01f8], - #[doc = "0x504 - Timer mode selection"] - pub mode: MODE, - #[doc = "0x508 - Configure the number of bits used by the TIMER"] - pub bitmode: BITMODE, - _reserved12: [u8; 0x04], - #[doc = "0x510 - Timer prescaler register"] - pub prescaler: PRESCALER, - _reserved13: [u8; 0x2c], - #[doc = "0x540..0x558 - Description collection: Capture/Compare register n"] - pub cc: [CC; 6], -} -#[doc = "TASKS_START (w) register accessor: an alias for `Reg`"] -pub type TASKS_START = crate::Reg; -#[doc = "Start Timer"] -pub mod tasks_start; -#[doc = "TASKS_STOP (w) register accessor: an alias for `Reg`"] -pub type TASKS_STOP = crate::Reg; -#[doc = "Stop Timer"] -pub mod tasks_stop; -#[doc = "TASKS_COUNT (w) register accessor: an alias for `Reg`"] -pub type TASKS_COUNT = crate::Reg; -#[doc = "Increment Timer (Counter mode only)"] -pub mod tasks_count; -#[doc = "TASKS_CLEAR (w) register accessor: an alias for `Reg`"] -pub type TASKS_CLEAR = crate::Reg; -#[doc = "Clear time"] -pub mod tasks_clear; -#[doc = "TASKS_SHUTDOWN (w) register accessor: an alias for `Reg`"] -pub type TASKS_SHUTDOWN = crate::Reg; -#[doc = "Deprecated register - Shut down timer"] -pub mod tasks_shutdown; -#[doc = "TASKS_CAPTURE (w) register accessor: an alias for `Reg`"] -pub type TASKS_CAPTURE = crate::Reg; -#[doc = "Description collection: Capture Timer value to CC\\[n\\] -register"] -pub mod tasks_capture; -#[doc = "EVENTS_COMPARE (rw) register accessor: an alias for `Reg`"] -pub type EVENTS_COMPARE = crate::Reg; -#[doc = "Description collection: Compare event on CC\\[n\\] -match"] -pub mod events_compare; -#[doc = "SHORTS (rw) register accessor: an alias for `Reg`"] -pub type SHORTS = crate::Reg; -#[doc = "Shortcuts between local events and tasks"] -pub mod shorts; -#[doc = "INTENSET (rw) register accessor: an alias for `Reg`"] -pub type INTENSET = crate::Reg; -#[doc = "Enable interrupt"] -pub mod intenset; -#[doc = "INTENCLR (rw) register accessor: an alias for `Reg`"] -pub type INTENCLR = crate::Reg; -#[doc = "Disable interrupt"] -pub mod intenclr; -#[doc = "MODE (rw) register accessor: an alias for `Reg`"] -pub type MODE = crate::Reg; -#[doc = "Timer mode selection"] -pub mod mode; -#[doc = "BITMODE (rw) register accessor: an alias for `Reg`"] -pub type BITMODE = crate::Reg; -#[doc = "Configure the number of bits used by the TIMER"] -pub mod bitmode; -#[doc = "PRESCALER (rw) register accessor: an alias for `Reg`"] -pub type PRESCALER = crate::Reg; -#[doc = "Timer prescaler register"] -pub mod prescaler; -#[doc = "CC (rw) register accessor: an alias for `Reg`"] -pub type CC = crate::Reg; -#[doc = "Description collection: Capture/Compare register n"] -pub mod cc; diff --git a/down-the-stack/dk_pac/src/timer0/bitmode.rs b/down-the-stack/dk_pac/src/timer0/bitmode.rs deleted file mode 100644 index ec3fa7e..0000000 --- a/down-the-stack/dk_pac/src/timer0/bitmode.rs +++ /dev/null @@ -1,155 +0,0 @@ -#[doc = "Register `BITMODE` 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 `BITMODE` 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 `BITMODE` reader - Timer bit width"] -pub type BITMODE_R = crate::FieldReader; -#[doc = "Timer bit width\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -#[repr(u8)] -pub enum BITMODE_A { - #[doc = "0: 16 bit timer bit width"] - _16BIT = 0, - #[doc = "1: 8 bit timer bit width"] - _08BIT = 1, - #[doc = "2: 24 bit timer bit width"] - _24BIT = 2, - #[doc = "3: 32 bit timer bit width"] - _32BIT = 3, -} -impl From for u8 { - #[inline(always)] - fn from(variant: BITMODE_A) -> Self { - variant as _ - } -} -impl BITMODE_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> BITMODE_A { - match self.bits { - 0 => BITMODE_A::_16BIT, - 1 => BITMODE_A::_08BIT, - 2 => BITMODE_A::_24BIT, - 3 => BITMODE_A::_32BIT, - _ => unreachable!(), - } - } - #[doc = "Checks if the value of the field is `_16BIT`"] - #[inline(always)] - pub fn is_16bit(&self) -> bool { - *self == BITMODE_A::_16BIT - } - #[doc = "Checks if the value of the field is `_08BIT`"] - #[inline(always)] - pub fn is_08bit(&self) -> bool { - *self == BITMODE_A::_08BIT - } - #[doc = "Checks if the value of the field is `_24BIT`"] - #[inline(always)] - pub fn is_24bit(&self) -> bool { - *self == BITMODE_A::_24BIT - } - #[doc = "Checks if the value of the field is `_32BIT`"] - #[inline(always)] - pub fn is_32bit(&self) -> bool { - *self == BITMODE_A::_32BIT - } -} -#[doc = "Field `BITMODE` writer - Timer bit width"] -pub type BITMODE_W<'a, const O: u8> = - crate::FieldWriterSafe<'a, u32, BITMODE_SPEC, u8, BITMODE_A, 2, O>; -impl<'a, const O: u8> BITMODE_W<'a, O> { - #[doc = "16 bit timer bit width"] - #[inline(always)] - pub fn _16bit(self) -> &'a mut W { - self.variant(BITMODE_A::_16BIT) - } - #[doc = "8 bit timer bit width"] - #[inline(always)] - pub fn _08bit(self) -> &'a mut W { - self.variant(BITMODE_A::_08BIT) - } - #[doc = "24 bit timer bit width"] - #[inline(always)] - pub fn _24bit(self) -> &'a mut W { - self.variant(BITMODE_A::_24BIT) - } - #[doc = "32 bit timer bit width"] - #[inline(always)] - pub fn _32bit(self) -> &'a mut W { - self.variant(BITMODE_A::_32BIT) - } -} -impl R { - #[doc = "Bits 0:1 - Timer bit width"] - #[inline(always)] - pub fn bitmode(&self) -> BITMODE_R { - BITMODE_R::new((self.bits & 3) as u8) - } -} -impl W { - #[doc = "Bits 0:1 - Timer bit width"] - #[inline(always)] - #[must_use] - pub fn bitmode(&mut self) -> BITMODE_W<0> { - BITMODE_W::new(self) - } - #[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 = "Configure the number of bits used by the TIMER\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 [bitmode](index.html) module"] -pub struct BITMODE_SPEC; -impl crate::RegisterSpec for BITMODE_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [bitmode::R](R) reader structure"] -impl crate::Readable for BITMODE_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [bitmode::W](W) writer structure"] -impl crate::Writable for BITMODE_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets BITMODE to value 0"] -impl crate::Resettable for BITMODE_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/timer0/cc.rs b/down-the-stack/dk_pac/src/timer0/cc.rs deleted file mode 100644 index 1482919..0000000 --- a/down-the-stack/dk_pac/src/timer0/cc.rs +++ /dev/null @@ -1,81 +0,0 @@ -#[doc = "Register `CC[%s]` 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 `CC[%s]` 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 `CC` reader - Capture/Compare value"] -pub type CC_R = crate::FieldReader; -#[doc = "Field `CC` writer - Capture/Compare value"] -pub type CC_W<'a, const O: u8> = crate::FieldWriter<'a, u32, CC_SPEC, u32, u32, 32, O>; -impl R { - #[doc = "Bits 0:31 - Capture/Compare value"] - #[inline(always)] - pub fn cc(&self) -> CC_R { - CC_R::new(self.bits) - } -} -impl W { - #[doc = "Bits 0:31 - Capture/Compare value"] - #[inline(always)] - #[must_use] - pub fn cc(&mut self) -> CC_W<0> { - CC_W::new(self) - } - #[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 = "Description collection: Capture/Compare register n\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 [cc](index.html) module"] -pub struct CC_SPEC; -impl crate::RegisterSpec for CC_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [cc::R](R) reader structure"] -impl crate::Readable for CC_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [cc::W](W) writer structure"] -impl crate::Writable for CC_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets CC[%s] -to value 0"] -impl crate::Resettable for CC_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/timer0/events_compare.rs b/down-the-stack/dk_pac/src/timer0/events_compare.rs deleted file mode 100644 index c7e1693..0000000 --- a/down-the-stack/dk_pac/src/timer0/events_compare.rs +++ /dev/null @@ -1,134 +0,0 @@ -#[doc = "Register `EVENTS_COMPARE[%s]` 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 `EVENTS_COMPARE[%s]` 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 `EVENTS_COMPARE` reader - Compare event on CC\\[n\\] -match"] -pub type EVENTS_COMPARE_R = crate::BitReader; -#[doc = "Compare event on CC\\[n\\] -match\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum EVENTS_COMPARE_A { - #[doc = "0: Event not generated"] - NOT_GENERATED = 0, - #[doc = "1: Event generated"] - GENERATED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: EVENTS_COMPARE_A) -> Self { - variant as u8 != 0 - } -} -impl EVENTS_COMPARE_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> EVENTS_COMPARE_A { - match self.bits { - false => EVENTS_COMPARE_A::NOT_GENERATED, - true => EVENTS_COMPARE_A::GENERATED, - } - } - #[doc = "Checks if the value of the field is `NOT_GENERATED`"] - #[inline(always)] - pub fn is_not_generated(&self) -> bool { - *self == EVENTS_COMPARE_A::NOT_GENERATED - } - #[doc = "Checks if the value of the field is `GENERATED`"] - #[inline(always)] - pub fn is_generated(&self) -> bool { - *self == EVENTS_COMPARE_A::GENERATED - } -} -#[doc = "Field `EVENTS_COMPARE` writer - Compare event on CC\\[n\\] -match"] -pub type EVENTS_COMPARE_W<'a, const O: u8> = - crate::BitWriter<'a, u32, EVENTS_COMPARE_SPEC, EVENTS_COMPARE_A, O>; -impl<'a, const O: u8> EVENTS_COMPARE_W<'a, O> { - #[doc = "Event not generated"] - #[inline(always)] - pub fn not_generated(self) -> &'a mut W { - self.variant(EVENTS_COMPARE_A::NOT_GENERATED) - } - #[doc = "Event generated"] - #[inline(always)] - pub fn generated(self) -> &'a mut W { - self.variant(EVENTS_COMPARE_A::GENERATED) - } -} -impl R { - #[doc = "Bit 0 - Compare event on CC\\[n\\] -match"] - #[inline(always)] - pub fn events_compare(&self) -> EVENTS_COMPARE_R { - EVENTS_COMPARE_R::new((self.bits & 1) != 0) - } -} -impl W { - #[doc = "Bit 0 - Compare event on CC\\[n\\] -match"] - #[inline(always)] - #[must_use] - pub fn events_compare(&mut self) -> EVENTS_COMPARE_W<0> { - EVENTS_COMPARE_W::new(self) - } - #[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 = "Description collection: Compare event on CC\\[n\\] -match\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 [events_compare](index.html) module"] -pub struct EVENTS_COMPARE_SPEC; -impl crate::RegisterSpec for EVENTS_COMPARE_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [events_compare::R](R) reader structure"] -impl crate::Readable for EVENTS_COMPARE_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [events_compare::W](W) writer structure"] -impl crate::Writable for EVENTS_COMPARE_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets EVENTS_COMPARE[%s] -to value 0"] -impl crate::Resettable for EVENTS_COMPARE_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/timer0/intenclr.rs b/down-the-stack/dk_pac/src/timer0/intenclr.rs deleted file mode 100644 index f750764..0000000 --- a/down-the-stack/dk_pac/src/timer0/intenclr.rs +++ /dev/null @@ -1,473 +0,0 @@ -#[doc = "Register `INTENCLR` 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 `INTENCLR` 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 `COMPARE0` reader - Write '1' to disable interrupt for event COMPARE\\[0\\]"] -pub type COMPARE0_R = crate::BitReader; -#[doc = "Write '1' to disable interrupt for event COMPARE\\[0\\]\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum COMPARE0_A { - #[doc = "0: Read: Disabled"] - DISABLED = 0, - #[doc = "1: Read: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: COMPARE0_A) -> Self { - variant as u8 != 0 - } -} -impl COMPARE0_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> COMPARE0_A { - match self.bits { - false => COMPARE0_A::DISABLED, - true => COMPARE0_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == COMPARE0_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == COMPARE0_A::ENABLED - } -} -#[doc = "Write '1' to disable interrupt for event COMPARE\\[0\\]\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum COMPARE0_AW { - #[doc = "1: Disable"] - CLEAR = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: COMPARE0_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `COMPARE0` writer - Write '1' to disable interrupt for event COMPARE\\[0\\]"] -pub type COMPARE0_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENCLR_SPEC, COMPARE0_AW, O>; -impl<'a, const O: u8> COMPARE0_W<'a, O> { - #[doc = "Disable"] - #[inline(always)] - pub fn clear(self) -> &'a mut W { - self.variant(COMPARE0_AW::CLEAR) - } -} -#[doc = "Field `COMPARE1` reader - Write '1' to disable interrupt for event COMPARE\\[1\\]"] -pub type COMPARE1_R = crate::BitReader; -#[doc = "Write '1' to disable interrupt for event COMPARE\\[1\\]\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum COMPARE1_A { - #[doc = "0: Read: Disabled"] - DISABLED = 0, - #[doc = "1: Read: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: COMPARE1_A) -> Self { - variant as u8 != 0 - } -} -impl COMPARE1_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> COMPARE1_A { - match self.bits { - false => COMPARE1_A::DISABLED, - true => COMPARE1_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == COMPARE1_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == COMPARE1_A::ENABLED - } -} -#[doc = "Write '1' to disable interrupt for event COMPARE\\[1\\]\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum COMPARE1_AW { - #[doc = "1: Disable"] - CLEAR = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: COMPARE1_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `COMPARE1` writer - Write '1' to disable interrupt for event COMPARE\\[1\\]"] -pub type COMPARE1_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENCLR_SPEC, COMPARE1_AW, O>; -impl<'a, const O: u8> COMPARE1_W<'a, O> { - #[doc = "Disable"] - #[inline(always)] - pub fn clear(self) -> &'a mut W { - self.variant(COMPARE1_AW::CLEAR) - } -} -#[doc = "Field `COMPARE2` reader - Write '1' to disable interrupt for event COMPARE\\[2\\]"] -pub type COMPARE2_R = crate::BitReader; -#[doc = "Write '1' to disable interrupt for event COMPARE\\[2\\]\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum COMPARE2_A { - #[doc = "0: Read: Disabled"] - DISABLED = 0, - #[doc = "1: Read: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: COMPARE2_A) -> Self { - variant as u8 != 0 - } -} -impl COMPARE2_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> COMPARE2_A { - match self.bits { - false => COMPARE2_A::DISABLED, - true => COMPARE2_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == COMPARE2_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == COMPARE2_A::ENABLED - } -} -#[doc = "Write '1' to disable interrupt for event COMPARE\\[2\\]\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum COMPARE2_AW { - #[doc = "1: Disable"] - CLEAR = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: COMPARE2_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `COMPARE2` writer - Write '1' to disable interrupt for event COMPARE\\[2\\]"] -pub type COMPARE2_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENCLR_SPEC, COMPARE2_AW, O>; -impl<'a, const O: u8> COMPARE2_W<'a, O> { - #[doc = "Disable"] - #[inline(always)] - pub fn clear(self) -> &'a mut W { - self.variant(COMPARE2_AW::CLEAR) - } -} -#[doc = "Field `COMPARE3` reader - Write '1' to disable interrupt for event COMPARE\\[3\\]"] -pub type COMPARE3_R = crate::BitReader; -#[doc = "Write '1' to disable interrupt for event COMPARE\\[3\\]\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum COMPARE3_A { - #[doc = "0: Read: Disabled"] - DISABLED = 0, - #[doc = "1: Read: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: COMPARE3_A) -> Self { - variant as u8 != 0 - } -} -impl COMPARE3_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> COMPARE3_A { - match self.bits { - false => COMPARE3_A::DISABLED, - true => COMPARE3_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == COMPARE3_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == COMPARE3_A::ENABLED - } -} -#[doc = "Write '1' to disable interrupt for event COMPARE\\[3\\]\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum COMPARE3_AW { - #[doc = "1: Disable"] - CLEAR = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: COMPARE3_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `COMPARE3` writer - Write '1' to disable interrupt for event COMPARE\\[3\\]"] -pub type COMPARE3_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENCLR_SPEC, COMPARE3_AW, O>; -impl<'a, const O: u8> COMPARE3_W<'a, O> { - #[doc = "Disable"] - #[inline(always)] - pub fn clear(self) -> &'a mut W { - self.variant(COMPARE3_AW::CLEAR) - } -} -#[doc = "Field `COMPARE4` reader - Write '1' to disable interrupt for event COMPARE\\[4\\]"] -pub type COMPARE4_R = crate::BitReader; -#[doc = "Write '1' to disable interrupt for event COMPARE\\[4\\]\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum COMPARE4_A { - #[doc = "0: Read: Disabled"] - DISABLED = 0, - #[doc = "1: Read: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: COMPARE4_A) -> Self { - variant as u8 != 0 - } -} -impl COMPARE4_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> COMPARE4_A { - match self.bits { - false => COMPARE4_A::DISABLED, - true => COMPARE4_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == COMPARE4_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == COMPARE4_A::ENABLED - } -} -#[doc = "Write '1' to disable interrupt for event COMPARE\\[4\\]\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum COMPARE4_AW { - #[doc = "1: Disable"] - CLEAR = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: COMPARE4_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `COMPARE4` writer - Write '1' to disable interrupt for event COMPARE\\[4\\]"] -pub type COMPARE4_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENCLR_SPEC, COMPARE4_AW, O>; -impl<'a, const O: u8> COMPARE4_W<'a, O> { - #[doc = "Disable"] - #[inline(always)] - pub fn clear(self) -> &'a mut W { - self.variant(COMPARE4_AW::CLEAR) - } -} -#[doc = "Field `COMPARE5` reader - Write '1' to disable interrupt for event COMPARE\\[5\\]"] -pub type COMPARE5_R = crate::BitReader; -#[doc = "Write '1' to disable interrupt for event COMPARE\\[5\\]\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum COMPARE5_A { - #[doc = "0: Read: Disabled"] - DISABLED = 0, - #[doc = "1: Read: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: COMPARE5_A) -> Self { - variant as u8 != 0 - } -} -impl COMPARE5_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> COMPARE5_A { - match self.bits { - false => COMPARE5_A::DISABLED, - true => COMPARE5_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == COMPARE5_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == COMPARE5_A::ENABLED - } -} -#[doc = "Write '1' to disable interrupt for event COMPARE\\[5\\]\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum COMPARE5_AW { - #[doc = "1: Disable"] - CLEAR = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: COMPARE5_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `COMPARE5` writer - Write '1' to disable interrupt for event COMPARE\\[5\\]"] -pub type COMPARE5_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENCLR_SPEC, COMPARE5_AW, O>; -impl<'a, const O: u8> COMPARE5_W<'a, O> { - #[doc = "Disable"] - #[inline(always)] - pub fn clear(self) -> &'a mut W { - self.variant(COMPARE5_AW::CLEAR) - } -} -impl R { - #[doc = "Bit 16 - Write '1' to disable interrupt for event COMPARE\\[0\\]"] - #[inline(always)] - pub fn compare0(&self) -> COMPARE0_R { - COMPARE0_R::new(((self.bits >> 16) & 1) != 0) - } - #[doc = "Bit 17 - Write '1' to disable interrupt for event COMPARE\\[1\\]"] - #[inline(always)] - pub fn compare1(&self) -> COMPARE1_R { - COMPARE1_R::new(((self.bits >> 17) & 1) != 0) - } - #[doc = "Bit 18 - Write '1' to disable interrupt for event COMPARE\\[2\\]"] - #[inline(always)] - pub fn compare2(&self) -> COMPARE2_R { - COMPARE2_R::new(((self.bits >> 18) & 1) != 0) - } - #[doc = "Bit 19 - Write '1' to disable interrupt for event COMPARE\\[3\\]"] - #[inline(always)] - pub fn compare3(&self) -> COMPARE3_R { - COMPARE3_R::new(((self.bits >> 19) & 1) != 0) - } - #[doc = "Bit 20 - Write '1' to disable interrupt for event COMPARE\\[4\\]"] - #[inline(always)] - pub fn compare4(&self) -> COMPARE4_R { - COMPARE4_R::new(((self.bits >> 20) & 1) != 0) - } - #[doc = "Bit 21 - Write '1' to disable interrupt for event COMPARE\\[5\\]"] - #[inline(always)] - pub fn compare5(&self) -> COMPARE5_R { - COMPARE5_R::new(((self.bits >> 21) & 1) != 0) - } -} -impl W { - #[doc = "Bit 16 - Write '1' to disable interrupt for event COMPARE\\[0\\]"] - #[inline(always)] - #[must_use] - pub fn compare0(&mut self) -> COMPARE0_W<16> { - COMPARE0_W::new(self) - } - #[doc = "Bit 17 - Write '1' to disable interrupt for event COMPARE\\[1\\]"] - #[inline(always)] - #[must_use] - pub fn compare1(&mut self) -> COMPARE1_W<17> { - COMPARE1_W::new(self) - } - #[doc = "Bit 18 - Write '1' to disable interrupt for event COMPARE\\[2\\]"] - #[inline(always)] - #[must_use] - pub fn compare2(&mut self) -> COMPARE2_W<18> { - COMPARE2_W::new(self) - } - #[doc = "Bit 19 - Write '1' to disable interrupt for event COMPARE\\[3\\]"] - #[inline(always)] - #[must_use] - pub fn compare3(&mut self) -> COMPARE3_W<19> { - COMPARE3_W::new(self) - } - #[doc = "Bit 20 - Write '1' to disable interrupt for event COMPARE\\[4\\]"] - #[inline(always)] - #[must_use] - pub fn compare4(&mut self) -> COMPARE4_W<20> { - COMPARE4_W::new(self) - } - #[doc = "Bit 21 - Write '1' to disable interrupt for event COMPARE\\[5\\]"] - #[inline(always)] - #[must_use] - pub fn compare5(&mut self) -> COMPARE5_W<21> { - COMPARE5_W::new(self) - } - #[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 = "Disable interrupt\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 [intenclr](index.html) module"] -pub struct INTENCLR_SPEC; -impl crate::RegisterSpec for INTENCLR_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [intenclr::R](R) reader structure"] -impl crate::Readable for INTENCLR_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [intenclr::W](W) writer structure"] -impl crate::Writable for INTENCLR_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets INTENCLR to value 0"] -impl crate::Resettable for INTENCLR_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/timer0/intenset.rs b/down-the-stack/dk_pac/src/timer0/intenset.rs deleted file mode 100644 index fb5e522..0000000 --- a/down-the-stack/dk_pac/src/timer0/intenset.rs +++ /dev/null @@ -1,473 +0,0 @@ -#[doc = "Register `INTENSET` 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 `INTENSET` 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 `COMPARE0` reader - Write '1' to enable interrupt for event COMPARE\\[0\\]"] -pub type COMPARE0_R = crate::BitReader; -#[doc = "Write '1' to enable interrupt for event COMPARE\\[0\\]\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum COMPARE0_A { - #[doc = "0: Read: Disabled"] - DISABLED = 0, - #[doc = "1: Read: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: COMPARE0_A) -> Self { - variant as u8 != 0 - } -} -impl COMPARE0_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> COMPARE0_A { - match self.bits { - false => COMPARE0_A::DISABLED, - true => COMPARE0_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == COMPARE0_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == COMPARE0_A::ENABLED - } -} -#[doc = "Write '1' to enable interrupt for event COMPARE\\[0\\]\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum COMPARE0_AW { - #[doc = "1: Enable"] - SET = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: COMPARE0_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `COMPARE0` writer - Write '1' to enable interrupt for event COMPARE\\[0\\]"] -pub type COMPARE0_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENSET_SPEC, COMPARE0_AW, O>; -impl<'a, const O: u8> COMPARE0_W<'a, O> { - #[doc = "Enable"] - #[inline(always)] - pub fn set(self) -> &'a mut W { - self.variant(COMPARE0_AW::SET) - } -} -#[doc = "Field `COMPARE1` reader - Write '1' to enable interrupt for event COMPARE\\[1\\]"] -pub type COMPARE1_R = crate::BitReader; -#[doc = "Write '1' to enable interrupt for event COMPARE\\[1\\]\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum COMPARE1_A { - #[doc = "0: Read: Disabled"] - DISABLED = 0, - #[doc = "1: Read: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: COMPARE1_A) -> Self { - variant as u8 != 0 - } -} -impl COMPARE1_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> COMPARE1_A { - match self.bits { - false => COMPARE1_A::DISABLED, - true => COMPARE1_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == COMPARE1_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == COMPARE1_A::ENABLED - } -} -#[doc = "Write '1' to enable interrupt for event COMPARE\\[1\\]\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum COMPARE1_AW { - #[doc = "1: Enable"] - SET = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: COMPARE1_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `COMPARE1` writer - Write '1' to enable interrupt for event COMPARE\\[1\\]"] -pub type COMPARE1_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENSET_SPEC, COMPARE1_AW, O>; -impl<'a, const O: u8> COMPARE1_W<'a, O> { - #[doc = "Enable"] - #[inline(always)] - pub fn set(self) -> &'a mut W { - self.variant(COMPARE1_AW::SET) - } -} -#[doc = "Field `COMPARE2` reader - Write '1' to enable interrupt for event COMPARE\\[2\\]"] -pub type COMPARE2_R = crate::BitReader; -#[doc = "Write '1' to enable interrupt for event COMPARE\\[2\\]\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum COMPARE2_A { - #[doc = "0: Read: Disabled"] - DISABLED = 0, - #[doc = "1: Read: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: COMPARE2_A) -> Self { - variant as u8 != 0 - } -} -impl COMPARE2_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> COMPARE2_A { - match self.bits { - false => COMPARE2_A::DISABLED, - true => COMPARE2_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == COMPARE2_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == COMPARE2_A::ENABLED - } -} -#[doc = "Write '1' to enable interrupt for event COMPARE\\[2\\]\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum COMPARE2_AW { - #[doc = "1: Enable"] - SET = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: COMPARE2_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `COMPARE2` writer - Write '1' to enable interrupt for event COMPARE\\[2\\]"] -pub type COMPARE2_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENSET_SPEC, COMPARE2_AW, O>; -impl<'a, const O: u8> COMPARE2_W<'a, O> { - #[doc = "Enable"] - #[inline(always)] - pub fn set(self) -> &'a mut W { - self.variant(COMPARE2_AW::SET) - } -} -#[doc = "Field `COMPARE3` reader - Write '1' to enable interrupt for event COMPARE\\[3\\]"] -pub type COMPARE3_R = crate::BitReader; -#[doc = "Write '1' to enable interrupt for event COMPARE\\[3\\]\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum COMPARE3_A { - #[doc = "0: Read: Disabled"] - DISABLED = 0, - #[doc = "1: Read: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: COMPARE3_A) -> Self { - variant as u8 != 0 - } -} -impl COMPARE3_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> COMPARE3_A { - match self.bits { - false => COMPARE3_A::DISABLED, - true => COMPARE3_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == COMPARE3_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == COMPARE3_A::ENABLED - } -} -#[doc = "Write '1' to enable interrupt for event COMPARE\\[3\\]\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum COMPARE3_AW { - #[doc = "1: Enable"] - SET = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: COMPARE3_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `COMPARE3` writer - Write '1' to enable interrupt for event COMPARE\\[3\\]"] -pub type COMPARE3_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENSET_SPEC, COMPARE3_AW, O>; -impl<'a, const O: u8> COMPARE3_W<'a, O> { - #[doc = "Enable"] - #[inline(always)] - pub fn set(self) -> &'a mut W { - self.variant(COMPARE3_AW::SET) - } -} -#[doc = "Field `COMPARE4` reader - Write '1' to enable interrupt for event COMPARE\\[4\\]"] -pub type COMPARE4_R = crate::BitReader; -#[doc = "Write '1' to enable interrupt for event COMPARE\\[4\\]\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum COMPARE4_A { - #[doc = "0: Read: Disabled"] - DISABLED = 0, - #[doc = "1: Read: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: COMPARE4_A) -> Self { - variant as u8 != 0 - } -} -impl COMPARE4_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> COMPARE4_A { - match self.bits { - false => COMPARE4_A::DISABLED, - true => COMPARE4_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == COMPARE4_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == COMPARE4_A::ENABLED - } -} -#[doc = "Write '1' to enable interrupt for event COMPARE\\[4\\]\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum COMPARE4_AW { - #[doc = "1: Enable"] - SET = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: COMPARE4_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `COMPARE4` writer - Write '1' to enable interrupt for event COMPARE\\[4\\]"] -pub type COMPARE4_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENSET_SPEC, COMPARE4_AW, O>; -impl<'a, const O: u8> COMPARE4_W<'a, O> { - #[doc = "Enable"] - #[inline(always)] - pub fn set(self) -> &'a mut W { - self.variant(COMPARE4_AW::SET) - } -} -#[doc = "Field `COMPARE5` reader - Write '1' to enable interrupt for event COMPARE\\[5\\]"] -pub type COMPARE5_R = crate::BitReader; -#[doc = "Write '1' to enable interrupt for event COMPARE\\[5\\]\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum COMPARE5_A { - #[doc = "0: Read: Disabled"] - DISABLED = 0, - #[doc = "1: Read: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: COMPARE5_A) -> Self { - variant as u8 != 0 - } -} -impl COMPARE5_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> COMPARE5_A { - match self.bits { - false => COMPARE5_A::DISABLED, - true => COMPARE5_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == COMPARE5_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == COMPARE5_A::ENABLED - } -} -#[doc = "Write '1' to enable interrupt for event COMPARE\\[5\\]\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum COMPARE5_AW { - #[doc = "1: Enable"] - SET = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: COMPARE5_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `COMPARE5` writer - Write '1' to enable interrupt for event COMPARE\\[5\\]"] -pub type COMPARE5_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENSET_SPEC, COMPARE5_AW, O>; -impl<'a, const O: u8> COMPARE5_W<'a, O> { - #[doc = "Enable"] - #[inline(always)] - pub fn set(self) -> &'a mut W { - self.variant(COMPARE5_AW::SET) - } -} -impl R { - #[doc = "Bit 16 - Write '1' to enable interrupt for event COMPARE\\[0\\]"] - #[inline(always)] - pub fn compare0(&self) -> COMPARE0_R { - COMPARE0_R::new(((self.bits >> 16) & 1) != 0) - } - #[doc = "Bit 17 - Write '1' to enable interrupt for event COMPARE\\[1\\]"] - #[inline(always)] - pub fn compare1(&self) -> COMPARE1_R { - COMPARE1_R::new(((self.bits >> 17) & 1) != 0) - } - #[doc = "Bit 18 - Write '1' to enable interrupt for event COMPARE\\[2\\]"] - #[inline(always)] - pub fn compare2(&self) -> COMPARE2_R { - COMPARE2_R::new(((self.bits >> 18) & 1) != 0) - } - #[doc = "Bit 19 - Write '1' to enable interrupt for event COMPARE\\[3\\]"] - #[inline(always)] - pub fn compare3(&self) -> COMPARE3_R { - COMPARE3_R::new(((self.bits >> 19) & 1) != 0) - } - #[doc = "Bit 20 - Write '1' to enable interrupt for event COMPARE\\[4\\]"] - #[inline(always)] - pub fn compare4(&self) -> COMPARE4_R { - COMPARE4_R::new(((self.bits >> 20) & 1) != 0) - } - #[doc = "Bit 21 - Write '1' to enable interrupt for event COMPARE\\[5\\]"] - #[inline(always)] - pub fn compare5(&self) -> COMPARE5_R { - COMPARE5_R::new(((self.bits >> 21) & 1) != 0) - } -} -impl W { - #[doc = "Bit 16 - Write '1' to enable interrupt for event COMPARE\\[0\\]"] - #[inline(always)] - #[must_use] - pub fn compare0(&mut self) -> COMPARE0_W<16> { - COMPARE0_W::new(self) - } - #[doc = "Bit 17 - Write '1' to enable interrupt for event COMPARE\\[1\\]"] - #[inline(always)] - #[must_use] - pub fn compare1(&mut self) -> COMPARE1_W<17> { - COMPARE1_W::new(self) - } - #[doc = "Bit 18 - Write '1' to enable interrupt for event COMPARE\\[2\\]"] - #[inline(always)] - #[must_use] - pub fn compare2(&mut self) -> COMPARE2_W<18> { - COMPARE2_W::new(self) - } - #[doc = "Bit 19 - Write '1' to enable interrupt for event COMPARE\\[3\\]"] - #[inline(always)] - #[must_use] - pub fn compare3(&mut self) -> COMPARE3_W<19> { - COMPARE3_W::new(self) - } - #[doc = "Bit 20 - Write '1' to enable interrupt for event COMPARE\\[4\\]"] - #[inline(always)] - #[must_use] - pub fn compare4(&mut self) -> COMPARE4_W<20> { - COMPARE4_W::new(self) - } - #[doc = "Bit 21 - Write '1' to enable interrupt for event COMPARE\\[5\\]"] - #[inline(always)] - #[must_use] - pub fn compare5(&mut self) -> COMPARE5_W<21> { - COMPARE5_W::new(self) - } - #[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 = "Enable interrupt\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 [intenset](index.html) module"] -pub struct INTENSET_SPEC; -impl crate::RegisterSpec for INTENSET_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [intenset::R](R) reader structure"] -impl crate::Readable for INTENSET_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [intenset::W](W) writer structure"] -impl crate::Writable for INTENSET_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets INTENSET to value 0"] -impl crate::Resettable for INTENSET_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/timer0/mode.rs b/down-the-stack/dk_pac/src/timer0/mode.rs deleted file mode 100644 index 1b18118..0000000 --- a/down-the-stack/dk_pac/src/timer0/mode.rs +++ /dev/null @@ -1,141 +0,0 @@ -#[doc = "Register `MODE` 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 `MODE` 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 `MODE` reader - Timer mode"] -pub type MODE_R = crate::FieldReader; -#[doc = "Timer mode\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -#[repr(u8)] -pub enum MODE_A { - #[doc = "0: Select Timer mode"] - TIMER = 0, - #[doc = "1: Deprecated enumerator - Select Counter mode"] - COUNTER = 1, - #[doc = "2: Select Low Power Counter mode"] - LOW_POWER_COUNTER = 2, -} -impl From for u8 { - #[inline(always)] - fn from(variant: MODE_A) -> Self { - variant as _ - } -} -impl MODE_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> Option { - match self.bits { - 0 => Some(MODE_A::TIMER), - 1 => Some(MODE_A::COUNTER), - 2 => Some(MODE_A::LOW_POWER_COUNTER), - _ => None, - } - } - #[doc = "Checks if the value of the field is `TIMER`"] - #[inline(always)] - pub fn is_timer(&self) -> bool { - *self == MODE_A::TIMER - } - #[doc = "Checks if the value of the field is `COUNTER`"] - #[inline(always)] - pub fn is_counter(&self) -> bool { - *self == MODE_A::COUNTER - } - #[doc = "Checks if the value of the field is `LOW_POWER_COUNTER`"] - #[inline(always)] - pub fn is_low_power_counter(&self) -> bool { - *self == MODE_A::LOW_POWER_COUNTER - } -} -#[doc = "Field `MODE` writer - Timer mode"] -pub type MODE_W<'a, const O: u8> = crate::FieldWriter<'a, u32, MODE_SPEC, u8, MODE_A, 2, O>; -impl<'a, const O: u8> MODE_W<'a, O> { - #[doc = "Select Timer mode"] - #[inline(always)] - pub fn timer(self) -> &'a mut W { - self.variant(MODE_A::TIMER) - } - #[doc = "Deprecated enumerator - Select Counter mode"] - #[inline(always)] - pub fn counter(self) -> &'a mut W { - self.variant(MODE_A::COUNTER) - } - #[doc = "Select Low Power Counter mode"] - #[inline(always)] - pub fn low_power_counter(self) -> &'a mut W { - self.variant(MODE_A::LOW_POWER_COUNTER) - } -} -impl R { - #[doc = "Bits 0:1 - Timer mode"] - #[inline(always)] - pub fn mode(&self) -> MODE_R { - MODE_R::new((self.bits & 3) as u8) - } -} -impl W { - #[doc = "Bits 0:1 - Timer mode"] - #[inline(always)] - #[must_use] - pub fn mode(&mut self) -> MODE_W<0> { - 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 - } -} -#[doc = "Timer mode selection\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 [mode](index.html) module"] -pub struct MODE_SPEC; -impl crate::RegisterSpec for MODE_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [mode::R](R) reader structure"] -impl crate::Readable for MODE_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [mode::W](W) writer structure"] -impl crate::Writable for 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 MODE to value 0"] -impl crate::Resettable for MODE_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/timer0/prescaler.rs b/down-the-stack/dk_pac/src/timer0/prescaler.rs deleted file mode 100644 index 4ceca84..0000000 --- a/down-the-stack/dk_pac/src/timer0/prescaler.rs +++ /dev/null @@ -1,80 +0,0 @@ -#[doc = "Register `PRESCALER` 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 `PRESCALER` 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 `PRESCALER` reader - Prescaler value"] -pub type PRESCALER_R = crate::FieldReader; -#[doc = "Field `PRESCALER` writer - Prescaler value"] -pub type PRESCALER_W<'a, const O: u8> = crate::FieldWriter<'a, u32, PRESCALER_SPEC, u8, u8, 4, O>; -impl R { - #[doc = "Bits 0:3 - Prescaler value"] - #[inline(always)] - pub fn prescaler(&self) -> PRESCALER_R { - PRESCALER_R::new((self.bits & 0x0f) as u8) - } -} -impl W { - #[doc = "Bits 0:3 - Prescaler value"] - #[inline(always)] - #[must_use] - pub fn prescaler(&mut self) -> PRESCALER_W<0> { - PRESCALER_W::new(self) - } - #[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 = "Timer prescaler register\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 [prescaler](index.html) module"] -pub struct PRESCALER_SPEC; -impl crate::RegisterSpec for PRESCALER_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [prescaler::R](R) reader structure"] -impl crate::Readable for PRESCALER_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [prescaler::W](W) writer structure"] -impl crate::Writable for PRESCALER_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets PRESCALER to value 0x04"] -impl crate::Resettable for PRESCALER_SPEC { - const RESET_VALUE: Self::Ux = 0x04; -} diff --git a/down-the-stack/dk_pac/src/timer0/shorts.rs b/down-the-stack/dk_pac/src/timer0/shorts.rs deleted file mode 100644 index 33ca413..0000000 --- a/down-the-stack/dk_pac/src/timer0/shorts.rs +++ /dev/null @@ -1,869 +0,0 @@ -#[doc = "Register `SHORTS` 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 `SHORTS` 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 `COMPARE0_CLEAR` reader - Shortcut between event COMPARE\\[0\\] -and task CLEAR"] -pub type COMPARE0_CLEAR_R = crate::BitReader; -#[doc = "Shortcut between event COMPARE\\[0\\] -and task CLEAR\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum COMPARE0_CLEAR_A { - #[doc = "0: Disable shortcut"] - DISABLED = 0, - #[doc = "1: Enable shortcut"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: COMPARE0_CLEAR_A) -> Self { - variant as u8 != 0 - } -} -impl COMPARE0_CLEAR_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> COMPARE0_CLEAR_A { - match self.bits { - false => COMPARE0_CLEAR_A::DISABLED, - true => COMPARE0_CLEAR_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == COMPARE0_CLEAR_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == COMPARE0_CLEAR_A::ENABLED - } -} -#[doc = "Field `COMPARE0_CLEAR` writer - Shortcut between event COMPARE\\[0\\] -and task CLEAR"] -pub type COMPARE0_CLEAR_W<'a, const O: u8> = - crate::BitWriter<'a, u32, SHORTS_SPEC, COMPARE0_CLEAR_A, O>; -impl<'a, const O: u8> COMPARE0_CLEAR_W<'a, O> { - #[doc = "Disable shortcut"] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(COMPARE0_CLEAR_A::DISABLED) - } - #[doc = "Enable shortcut"] - #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(COMPARE0_CLEAR_A::ENABLED) - } -} -#[doc = "Field `COMPARE1_CLEAR` reader - Shortcut between event COMPARE\\[1\\] -and task CLEAR"] -pub type COMPARE1_CLEAR_R = crate::BitReader; -#[doc = "Shortcut between event COMPARE\\[1\\] -and task CLEAR\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum COMPARE1_CLEAR_A { - #[doc = "0: Disable shortcut"] - DISABLED = 0, - #[doc = "1: Enable shortcut"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: COMPARE1_CLEAR_A) -> Self { - variant as u8 != 0 - } -} -impl COMPARE1_CLEAR_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> COMPARE1_CLEAR_A { - match self.bits { - false => COMPARE1_CLEAR_A::DISABLED, - true => COMPARE1_CLEAR_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == COMPARE1_CLEAR_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == COMPARE1_CLEAR_A::ENABLED - } -} -#[doc = "Field `COMPARE1_CLEAR` writer - Shortcut between event COMPARE\\[1\\] -and task CLEAR"] -pub type COMPARE1_CLEAR_W<'a, const O: u8> = - crate::BitWriter<'a, u32, SHORTS_SPEC, COMPARE1_CLEAR_A, O>; -impl<'a, const O: u8> COMPARE1_CLEAR_W<'a, O> { - #[doc = "Disable shortcut"] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(COMPARE1_CLEAR_A::DISABLED) - } - #[doc = "Enable shortcut"] - #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(COMPARE1_CLEAR_A::ENABLED) - } -} -#[doc = "Field `COMPARE2_CLEAR` reader - Shortcut between event COMPARE\\[2\\] -and task CLEAR"] -pub type COMPARE2_CLEAR_R = crate::BitReader; -#[doc = "Shortcut between event COMPARE\\[2\\] -and task CLEAR\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum COMPARE2_CLEAR_A { - #[doc = "0: Disable shortcut"] - DISABLED = 0, - #[doc = "1: Enable shortcut"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: COMPARE2_CLEAR_A) -> Self { - variant as u8 != 0 - } -} -impl COMPARE2_CLEAR_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> COMPARE2_CLEAR_A { - match self.bits { - false => COMPARE2_CLEAR_A::DISABLED, - true => COMPARE2_CLEAR_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == COMPARE2_CLEAR_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == COMPARE2_CLEAR_A::ENABLED - } -} -#[doc = "Field `COMPARE2_CLEAR` writer - Shortcut between event COMPARE\\[2\\] -and task CLEAR"] -pub type COMPARE2_CLEAR_W<'a, const O: u8> = - crate::BitWriter<'a, u32, SHORTS_SPEC, COMPARE2_CLEAR_A, O>; -impl<'a, const O: u8> COMPARE2_CLEAR_W<'a, O> { - #[doc = "Disable shortcut"] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(COMPARE2_CLEAR_A::DISABLED) - } - #[doc = "Enable shortcut"] - #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(COMPARE2_CLEAR_A::ENABLED) - } -} -#[doc = "Field `COMPARE3_CLEAR` reader - Shortcut between event COMPARE\\[3\\] -and task CLEAR"] -pub type COMPARE3_CLEAR_R = crate::BitReader; -#[doc = "Shortcut between event COMPARE\\[3\\] -and task CLEAR\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum COMPARE3_CLEAR_A { - #[doc = "0: Disable shortcut"] - DISABLED = 0, - #[doc = "1: Enable shortcut"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: COMPARE3_CLEAR_A) -> Self { - variant as u8 != 0 - } -} -impl COMPARE3_CLEAR_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> COMPARE3_CLEAR_A { - match self.bits { - false => COMPARE3_CLEAR_A::DISABLED, - true => COMPARE3_CLEAR_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == COMPARE3_CLEAR_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == COMPARE3_CLEAR_A::ENABLED - } -} -#[doc = "Field `COMPARE3_CLEAR` writer - Shortcut between event COMPARE\\[3\\] -and task CLEAR"] -pub type COMPARE3_CLEAR_W<'a, const O: u8> = - crate::BitWriter<'a, u32, SHORTS_SPEC, COMPARE3_CLEAR_A, O>; -impl<'a, const O: u8> COMPARE3_CLEAR_W<'a, O> { - #[doc = "Disable shortcut"] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(COMPARE3_CLEAR_A::DISABLED) - } - #[doc = "Enable shortcut"] - #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(COMPARE3_CLEAR_A::ENABLED) - } -} -#[doc = "Field `COMPARE4_CLEAR` reader - Shortcut between event COMPARE\\[4\\] -and task CLEAR"] -pub type COMPARE4_CLEAR_R = crate::BitReader; -#[doc = "Shortcut between event COMPARE\\[4\\] -and task CLEAR\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum COMPARE4_CLEAR_A { - #[doc = "0: Disable shortcut"] - DISABLED = 0, - #[doc = "1: Enable shortcut"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: COMPARE4_CLEAR_A) -> Self { - variant as u8 != 0 - } -} -impl COMPARE4_CLEAR_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> COMPARE4_CLEAR_A { - match self.bits { - false => COMPARE4_CLEAR_A::DISABLED, - true => COMPARE4_CLEAR_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == COMPARE4_CLEAR_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == COMPARE4_CLEAR_A::ENABLED - } -} -#[doc = "Field `COMPARE4_CLEAR` writer - Shortcut between event COMPARE\\[4\\] -and task CLEAR"] -pub type COMPARE4_CLEAR_W<'a, const O: u8> = - crate::BitWriter<'a, u32, SHORTS_SPEC, COMPARE4_CLEAR_A, O>; -impl<'a, const O: u8> COMPARE4_CLEAR_W<'a, O> { - #[doc = "Disable shortcut"] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(COMPARE4_CLEAR_A::DISABLED) - } - #[doc = "Enable shortcut"] - #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(COMPARE4_CLEAR_A::ENABLED) - } -} -#[doc = "Field `COMPARE5_CLEAR` reader - Shortcut between event COMPARE\\[5\\] -and task CLEAR"] -pub type COMPARE5_CLEAR_R = crate::BitReader; -#[doc = "Shortcut between event COMPARE\\[5\\] -and task CLEAR\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum COMPARE5_CLEAR_A { - #[doc = "0: Disable shortcut"] - DISABLED = 0, - #[doc = "1: Enable shortcut"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: COMPARE5_CLEAR_A) -> Self { - variant as u8 != 0 - } -} -impl COMPARE5_CLEAR_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> COMPARE5_CLEAR_A { - match self.bits { - false => COMPARE5_CLEAR_A::DISABLED, - true => COMPARE5_CLEAR_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == COMPARE5_CLEAR_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == COMPARE5_CLEAR_A::ENABLED - } -} -#[doc = "Field `COMPARE5_CLEAR` writer - Shortcut between event COMPARE\\[5\\] -and task CLEAR"] -pub type COMPARE5_CLEAR_W<'a, const O: u8> = - crate::BitWriter<'a, u32, SHORTS_SPEC, COMPARE5_CLEAR_A, O>; -impl<'a, const O: u8> COMPARE5_CLEAR_W<'a, O> { - #[doc = "Disable shortcut"] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(COMPARE5_CLEAR_A::DISABLED) - } - #[doc = "Enable shortcut"] - #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(COMPARE5_CLEAR_A::ENABLED) - } -} -#[doc = "Field `COMPARE0_STOP` reader - Shortcut between event COMPARE\\[0\\] -and task STOP"] -pub type COMPARE0_STOP_R = crate::BitReader; -#[doc = "Shortcut between event COMPARE\\[0\\] -and task STOP\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum COMPARE0_STOP_A { - #[doc = "0: Disable shortcut"] - DISABLED = 0, - #[doc = "1: Enable shortcut"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: COMPARE0_STOP_A) -> Self { - variant as u8 != 0 - } -} -impl COMPARE0_STOP_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> COMPARE0_STOP_A { - match self.bits { - false => COMPARE0_STOP_A::DISABLED, - true => COMPARE0_STOP_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == COMPARE0_STOP_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == COMPARE0_STOP_A::ENABLED - } -} -#[doc = "Field `COMPARE0_STOP` writer - Shortcut between event COMPARE\\[0\\] -and task STOP"] -pub type COMPARE0_STOP_W<'a, const O: u8> = - crate::BitWriter<'a, u32, SHORTS_SPEC, COMPARE0_STOP_A, O>; -impl<'a, const O: u8> COMPARE0_STOP_W<'a, O> { - #[doc = "Disable shortcut"] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(COMPARE0_STOP_A::DISABLED) - } - #[doc = "Enable shortcut"] - #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(COMPARE0_STOP_A::ENABLED) - } -} -#[doc = "Field `COMPARE1_STOP` reader - Shortcut between event COMPARE\\[1\\] -and task STOP"] -pub type COMPARE1_STOP_R = crate::BitReader; -#[doc = "Shortcut between event COMPARE\\[1\\] -and task STOP\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum COMPARE1_STOP_A { - #[doc = "0: Disable shortcut"] - DISABLED = 0, - #[doc = "1: Enable shortcut"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: COMPARE1_STOP_A) -> Self { - variant as u8 != 0 - } -} -impl COMPARE1_STOP_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> COMPARE1_STOP_A { - match self.bits { - false => COMPARE1_STOP_A::DISABLED, - true => COMPARE1_STOP_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == COMPARE1_STOP_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == COMPARE1_STOP_A::ENABLED - } -} -#[doc = "Field `COMPARE1_STOP` writer - Shortcut between event COMPARE\\[1\\] -and task STOP"] -pub type COMPARE1_STOP_W<'a, const O: u8> = - crate::BitWriter<'a, u32, SHORTS_SPEC, COMPARE1_STOP_A, O>; -impl<'a, const O: u8> COMPARE1_STOP_W<'a, O> { - #[doc = "Disable shortcut"] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(COMPARE1_STOP_A::DISABLED) - } - #[doc = "Enable shortcut"] - #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(COMPARE1_STOP_A::ENABLED) - } -} -#[doc = "Field `COMPARE2_STOP` reader - Shortcut between event COMPARE\\[2\\] -and task STOP"] -pub type COMPARE2_STOP_R = crate::BitReader; -#[doc = "Shortcut between event COMPARE\\[2\\] -and task STOP\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum COMPARE2_STOP_A { - #[doc = "0: Disable shortcut"] - DISABLED = 0, - #[doc = "1: Enable shortcut"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: COMPARE2_STOP_A) -> Self { - variant as u8 != 0 - } -} -impl COMPARE2_STOP_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> COMPARE2_STOP_A { - match self.bits { - false => COMPARE2_STOP_A::DISABLED, - true => COMPARE2_STOP_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == COMPARE2_STOP_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == COMPARE2_STOP_A::ENABLED - } -} -#[doc = "Field `COMPARE2_STOP` writer - Shortcut between event COMPARE\\[2\\] -and task STOP"] -pub type COMPARE2_STOP_W<'a, const O: u8> = - crate::BitWriter<'a, u32, SHORTS_SPEC, COMPARE2_STOP_A, O>; -impl<'a, const O: u8> COMPARE2_STOP_W<'a, O> { - #[doc = "Disable shortcut"] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(COMPARE2_STOP_A::DISABLED) - } - #[doc = "Enable shortcut"] - #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(COMPARE2_STOP_A::ENABLED) - } -} -#[doc = "Field `COMPARE3_STOP` reader - Shortcut between event COMPARE\\[3\\] -and task STOP"] -pub type COMPARE3_STOP_R = crate::BitReader; -#[doc = "Shortcut between event COMPARE\\[3\\] -and task STOP\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum COMPARE3_STOP_A { - #[doc = "0: Disable shortcut"] - DISABLED = 0, - #[doc = "1: Enable shortcut"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: COMPARE3_STOP_A) -> Self { - variant as u8 != 0 - } -} -impl COMPARE3_STOP_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> COMPARE3_STOP_A { - match self.bits { - false => COMPARE3_STOP_A::DISABLED, - true => COMPARE3_STOP_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == COMPARE3_STOP_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == COMPARE3_STOP_A::ENABLED - } -} -#[doc = "Field `COMPARE3_STOP` writer - Shortcut between event COMPARE\\[3\\] -and task STOP"] -pub type COMPARE3_STOP_W<'a, const O: u8> = - crate::BitWriter<'a, u32, SHORTS_SPEC, COMPARE3_STOP_A, O>; -impl<'a, const O: u8> COMPARE3_STOP_W<'a, O> { - #[doc = "Disable shortcut"] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(COMPARE3_STOP_A::DISABLED) - } - #[doc = "Enable shortcut"] - #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(COMPARE3_STOP_A::ENABLED) - } -} -#[doc = "Field `COMPARE4_STOP` reader - Shortcut between event COMPARE\\[4\\] -and task STOP"] -pub type COMPARE4_STOP_R = crate::BitReader; -#[doc = "Shortcut between event COMPARE\\[4\\] -and task STOP\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum COMPARE4_STOP_A { - #[doc = "0: Disable shortcut"] - DISABLED = 0, - #[doc = "1: Enable shortcut"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: COMPARE4_STOP_A) -> Self { - variant as u8 != 0 - } -} -impl COMPARE4_STOP_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> COMPARE4_STOP_A { - match self.bits { - false => COMPARE4_STOP_A::DISABLED, - true => COMPARE4_STOP_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == COMPARE4_STOP_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == COMPARE4_STOP_A::ENABLED - } -} -#[doc = "Field `COMPARE4_STOP` writer - Shortcut between event COMPARE\\[4\\] -and task STOP"] -pub type COMPARE4_STOP_W<'a, const O: u8> = - crate::BitWriter<'a, u32, SHORTS_SPEC, COMPARE4_STOP_A, O>; -impl<'a, const O: u8> COMPARE4_STOP_W<'a, O> { - #[doc = "Disable shortcut"] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(COMPARE4_STOP_A::DISABLED) - } - #[doc = "Enable shortcut"] - #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(COMPARE4_STOP_A::ENABLED) - } -} -#[doc = "Field `COMPARE5_STOP` reader - Shortcut between event COMPARE\\[5\\] -and task STOP"] -pub type COMPARE5_STOP_R = crate::BitReader; -#[doc = "Shortcut between event COMPARE\\[5\\] -and task STOP\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum COMPARE5_STOP_A { - #[doc = "0: Disable shortcut"] - DISABLED = 0, - #[doc = "1: Enable shortcut"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: COMPARE5_STOP_A) -> Self { - variant as u8 != 0 - } -} -impl COMPARE5_STOP_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> COMPARE5_STOP_A { - match self.bits { - false => COMPARE5_STOP_A::DISABLED, - true => COMPARE5_STOP_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == COMPARE5_STOP_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == COMPARE5_STOP_A::ENABLED - } -} -#[doc = "Field `COMPARE5_STOP` writer - Shortcut between event COMPARE\\[5\\] -and task STOP"] -pub type COMPARE5_STOP_W<'a, const O: u8> = - crate::BitWriter<'a, u32, SHORTS_SPEC, COMPARE5_STOP_A, O>; -impl<'a, const O: u8> COMPARE5_STOP_W<'a, O> { - #[doc = "Disable shortcut"] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(COMPARE5_STOP_A::DISABLED) - } - #[doc = "Enable shortcut"] - #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(COMPARE5_STOP_A::ENABLED) - } -} -impl R { - #[doc = "Bit 0 - Shortcut between event COMPARE\\[0\\] -and task CLEAR"] - #[inline(always)] - pub fn compare0_clear(&self) -> COMPARE0_CLEAR_R { - COMPARE0_CLEAR_R::new((self.bits & 1) != 0) - } - #[doc = "Bit 1 - Shortcut between event COMPARE\\[1\\] -and task CLEAR"] - #[inline(always)] - pub fn compare1_clear(&self) -> COMPARE1_CLEAR_R { - COMPARE1_CLEAR_R::new(((self.bits >> 1) & 1) != 0) - } - #[doc = "Bit 2 - Shortcut between event COMPARE\\[2\\] -and task CLEAR"] - #[inline(always)] - pub fn compare2_clear(&self) -> COMPARE2_CLEAR_R { - COMPARE2_CLEAR_R::new(((self.bits >> 2) & 1) != 0) - } - #[doc = "Bit 3 - Shortcut between event COMPARE\\[3\\] -and task CLEAR"] - #[inline(always)] - pub fn compare3_clear(&self) -> COMPARE3_CLEAR_R { - COMPARE3_CLEAR_R::new(((self.bits >> 3) & 1) != 0) - } - #[doc = "Bit 4 - Shortcut between event COMPARE\\[4\\] -and task CLEAR"] - #[inline(always)] - pub fn compare4_clear(&self) -> COMPARE4_CLEAR_R { - COMPARE4_CLEAR_R::new(((self.bits >> 4) & 1) != 0) - } - #[doc = "Bit 5 - Shortcut between event COMPARE\\[5\\] -and task CLEAR"] - #[inline(always)] - pub fn compare5_clear(&self) -> COMPARE5_CLEAR_R { - COMPARE5_CLEAR_R::new(((self.bits >> 5) & 1) != 0) - } - #[doc = "Bit 8 - Shortcut between event COMPARE\\[0\\] -and task STOP"] - #[inline(always)] - pub fn compare0_stop(&self) -> COMPARE0_STOP_R { - COMPARE0_STOP_R::new(((self.bits >> 8) & 1) != 0) - } - #[doc = "Bit 9 - Shortcut between event COMPARE\\[1\\] -and task STOP"] - #[inline(always)] - pub fn compare1_stop(&self) -> COMPARE1_STOP_R { - COMPARE1_STOP_R::new(((self.bits >> 9) & 1) != 0) - } - #[doc = "Bit 10 - Shortcut between event COMPARE\\[2\\] -and task STOP"] - #[inline(always)] - pub fn compare2_stop(&self) -> COMPARE2_STOP_R { - COMPARE2_STOP_R::new(((self.bits >> 10) & 1) != 0) - } - #[doc = "Bit 11 - Shortcut between event COMPARE\\[3\\] -and task STOP"] - #[inline(always)] - pub fn compare3_stop(&self) -> COMPARE3_STOP_R { - COMPARE3_STOP_R::new(((self.bits >> 11) & 1) != 0) - } - #[doc = "Bit 12 - Shortcut between event COMPARE\\[4\\] -and task STOP"] - #[inline(always)] - pub fn compare4_stop(&self) -> COMPARE4_STOP_R { - COMPARE4_STOP_R::new(((self.bits >> 12) & 1) != 0) - } - #[doc = "Bit 13 - Shortcut between event COMPARE\\[5\\] -and task STOP"] - #[inline(always)] - pub fn compare5_stop(&self) -> COMPARE5_STOP_R { - COMPARE5_STOP_R::new(((self.bits >> 13) & 1) != 0) - } -} -impl W { - #[doc = "Bit 0 - Shortcut between event COMPARE\\[0\\] -and task CLEAR"] - #[inline(always)] - #[must_use] - pub fn compare0_clear(&mut self) -> COMPARE0_CLEAR_W<0> { - COMPARE0_CLEAR_W::new(self) - } - #[doc = "Bit 1 - Shortcut between event COMPARE\\[1\\] -and task CLEAR"] - #[inline(always)] - #[must_use] - pub fn compare1_clear(&mut self) -> COMPARE1_CLEAR_W<1> { - COMPARE1_CLEAR_W::new(self) - } - #[doc = "Bit 2 - Shortcut between event COMPARE\\[2\\] -and task CLEAR"] - #[inline(always)] - #[must_use] - pub fn compare2_clear(&mut self) -> COMPARE2_CLEAR_W<2> { - COMPARE2_CLEAR_W::new(self) - } - #[doc = "Bit 3 - Shortcut between event COMPARE\\[3\\] -and task CLEAR"] - #[inline(always)] - #[must_use] - pub fn compare3_clear(&mut self) -> COMPARE3_CLEAR_W<3> { - COMPARE3_CLEAR_W::new(self) - } - #[doc = "Bit 4 - Shortcut between event COMPARE\\[4\\] -and task CLEAR"] - #[inline(always)] - #[must_use] - pub fn compare4_clear(&mut self) -> COMPARE4_CLEAR_W<4> { - COMPARE4_CLEAR_W::new(self) - } - #[doc = "Bit 5 - Shortcut between event COMPARE\\[5\\] -and task CLEAR"] - #[inline(always)] - #[must_use] - pub fn compare5_clear(&mut self) -> COMPARE5_CLEAR_W<5> { - COMPARE5_CLEAR_W::new(self) - } - #[doc = "Bit 8 - Shortcut between event COMPARE\\[0\\] -and task STOP"] - #[inline(always)] - #[must_use] - pub fn compare0_stop(&mut self) -> COMPARE0_STOP_W<8> { - COMPARE0_STOP_W::new(self) - } - #[doc = "Bit 9 - Shortcut between event COMPARE\\[1\\] -and task STOP"] - #[inline(always)] - #[must_use] - pub fn compare1_stop(&mut self) -> COMPARE1_STOP_W<9> { - COMPARE1_STOP_W::new(self) - } - #[doc = "Bit 10 - Shortcut between event COMPARE\\[2\\] -and task STOP"] - #[inline(always)] - #[must_use] - pub fn compare2_stop(&mut self) -> COMPARE2_STOP_W<10> { - COMPARE2_STOP_W::new(self) - } - #[doc = "Bit 11 - Shortcut between event COMPARE\\[3\\] -and task STOP"] - #[inline(always)] - #[must_use] - pub fn compare3_stop(&mut self) -> COMPARE3_STOP_W<11> { - COMPARE3_STOP_W::new(self) - } - #[doc = "Bit 12 - Shortcut between event COMPARE\\[4\\] -and task STOP"] - #[inline(always)] - #[must_use] - pub fn compare4_stop(&mut self) -> COMPARE4_STOP_W<12> { - COMPARE4_STOP_W::new(self) - } - #[doc = "Bit 13 - Shortcut between event COMPARE\\[5\\] -and task STOP"] - #[inline(always)] - #[must_use] - pub fn compare5_stop(&mut self) -> COMPARE5_STOP_W<13> { - COMPARE5_STOP_W::new(self) - } - #[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 = "Shortcuts between local events and tasks\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 [shorts](index.html) module"] -pub struct SHORTS_SPEC; -impl crate::RegisterSpec for SHORTS_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [shorts::R](R) reader structure"] -impl crate::Readable for SHORTS_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [shorts::W](W) writer structure"] -impl crate::Writable for SHORTS_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets SHORTS to value 0"] -impl crate::Resettable for SHORTS_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/timer0/tasks_capture.rs b/down-the-stack/dk_pac/src/timer0/tasks_capture.rs deleted file mode 100644 index 46e516e..0000000 --- a/down-the-stack/dk_pac/src/timer0/tasks_capture.rs +++ /dev/null @@ -1,77 +0,0 @@ -#[doc = "Register `TASKS_CAPTURE[%s]` 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 = "Capture Timer value to CC\\[n\\] -register\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum TASKS_CAPTURE_AW { - #[doc = "1: Trigger task"] - TRIGGER = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: TASKS_CAPTURE_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `TASKS_CAPTURE` writer - Capture Timer value to CC\\[n\\] -register"] -pub type TASKS_CAPTURE_W<'a, const O: u8> = - crate::BitWriter<'a, u32, TASKS_CAPTURE_SPEC, TASKS_CAPTURE_AW, O>; -impl<'a, const O: u8> TASKS_CAPTURE_W<'a, O> { - #[doc = "Trigger task"] - #[inline(always)] - pub fn trigger(self) -> &'a mut W { - self.variant(TASKS_CAPTURE_AW::TRIGGER) - } -} -impl W { - #[doc = "Bit 0 - Capture Timer value to CC\\[n\\] -register"] - #[inline(always)] - #[must_use] - pub fn tasks_capture(&mut self) -> TASKS_CAPTURE_W<0> { - TASKS_CAPTURE_W::new(self) - } - #[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 = "Description collection: Capture Timer value to CC\\[n\\] -register\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 [tasks_capture](index.html) module"] -pub struct TASKS_CAPTURE_SPEC; -impl crate::RegisterSpec for TASKS_CAPTURE_SPEC { - type Ux = u32; -} -#[doc = "`write(|w| ..)` method takes [tasks_capture::W](W) writer structure"] -impl crate::Writable for TASKS_CAPTURE_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets TASKS_CAPTURE[%s] -to value 0"] -impl crate::Resettable for TASKS_CAPTURE_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/timer0/tasks_clear.rs b/down-the-stack/dk_pac/src/timer0/tasks_clear.rs deleted file mode 100644 index 99de385..0000000 --- a/down-the-stack/dk_pac/src/timer0/tasks_clear.rs +++ /dev/null @@ -1,72 +0,0 @@ -#[doc = "Register `TASKS_CLEAR` 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 = "Clear time\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum TASKS_CLEAR_AW { - #[doc = "1: Trigger task"] - TRIGGER = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: TASKS_CLEAR_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `TASKS_CLEAR` writer - Clear time"] -pub type TASKS_CLEAR_W<'a, const O: u8> = - crate::BitWriter<'a, u32, TASKS_CLEAR_SPEC, TASKS_CLEAR_AW, O>; -impl<'a, const O: u8> TASKS_CLEAR_W<'a, O> { - #[doc = "Trigger task"] - #[inline(always)] - pub fn trigger(self) -> &'a mut W { - self.variant(TASKS_CLEAR_AW::TRIGGER) - } -} -impl W { - #[doc = "Bit 0 - Clear time"] - #[inline(always)] - #[must_use] - pub fn tasks_clear(&mut self) -> TASKS_CLEAR_W<0> { - TASKS_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 - } -} -#[doc = "Clear time\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 [tasks_clear](index.html) module"] -pub struct TASKS_CLEAR_SPEC; -impl crate::RegisterSpec for TASKS_CLEAR_SPEC { - type Ux = u32; -} -#[doc = "`write(|w| ..)` method takes [tasks_clear::W](W) writer structure"] -impl crate::Writable for TASKS_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 TASKS_CLEAR to value 0"] -impl crate::Resettable for TASKS_CLEAR_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/timer0/tasks_count.rs b/down-the-stack/dk_pac/src/timer0/tasks_count.rs deleted file mode 100644 index 9da0f92..0000000 --- a/down-the-stack/dk_pac/src/timer0/tasks_count.rs +++ /dev/null @@ -1,72 +0,0 @@ -#[doc = "Register `TASKS_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 = "Increment Timer (Counter mode only)\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum TASKS_COUNT_AW { - #[doc = "1: Trigger task"] - TRIGGER = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: TASKS_COUNT_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `TASKS_COUNT` writer - Increment Timer (Counter mode only)"] -pub type TASKS_COUNT_W<'a, const O: u8> = - crate::BitWriter<'a, u32, TASKS_COUNT_SPEC, TASKS_COUNT_AW, O>; -impl<'a, const O: u8> TASKS_COUNT_W<'a, O> { - #[doc = "Trigger task"] - #[inline(always)] - pub fn trigger(self) -> &'a mut W { - self.variant(TASKS_COUNT_AW::TRIGGER) - } -} -impl W { - #[doc = "Bit 0 - Increment Timer (Counter mode only)"] - #[inline(always)] - #[must_use] - pub fn tasks_count(&mut self) -> TASKS_COUNT_W<0> { - TASKS_COUNT_W::new(self) - } - #[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 = "Increment Timer (Counter mode only)\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 [tasks_count](index.html) module"] -pub struct TASKS_COUNT_SPEC; -impl crate::RegisterSpec for TASKS_COUNT_SPEC { - type Ux = u32; -} -#[doc = "`write(|w| ..)` method takes [tasks_count::W](W) writer structure"] -impl crate::Writable for TASKS_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 TASKS_COUNT to value 0"] -impl crate::Resettable for TASKS_COUNT_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/timer0/tasks_shutdown.rs b/down-the-stack/dk_pac/src/timer0/tasks_shutdown.rs deleted file mode 100644 index a711658..0000000 --- a/down-the-stack/dk_pac/src/timer0/tasks_shutdown.rs +++ /dev/null @@ -1,72 +0,0 @@ -#[doc = "Register `TASKS_SHUTDOWN` 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 = "Deprecated field - Shut down timer\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum TASKS_SHUTDOWN_AW { - #[doc = "1: Trigger task"] - TRIGGER = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: TASKS_SHUTDOWN_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `TASKS_SHUTDOWN` writer - Deprecated field - Shut down timer"] -pub type TASKS_SHUTDOWN_W<'a, const O: u8> = - crate::BitWriter<'a, u32, TASKS_SHUTDOWN_SPEC, TASKS_SHUTDOWN_AW, O>; -impl<'a, const O: u8> TASKS_SHUTDOWN_W<'a, O> { - #[doc = "Trigger task"] - #[inline(always)] - pub fn trigger(self) -> &'a mut W { - self.variant(TASKS_SHUTDOWN_AW::TRIGGER) - } -} -impl W { - #[doc = "Bit 0 - Deprecated field - Shut down timer"] - #[inline(always)] - #[must_use] - pub fn tasks_shutdown(&mut self) -> TASKS_SHUTDOWN_W<0> { - TASKS_SHUTDOWN_W::new(self) - } - #[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 = "Deprecated register - Shut down timer\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 [tasks_shutdown](index.html) module"] -pub struct TASKS_SHUTDOWN_SPEC; -impl crate::RegisterSpec for TASKS_SHUTDOWN_SPEC { - type Ux = u32; -} -#[doc = "`write(|w| ..)` method takes [tasks_shutdown::W](W) writer structure"] -impl crate::Writable for TASKS_SHUTDOWN_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets TASKS_SHUTDOWN to value 0"] -impl crate::Resettable for TASKS_SHUTDOWN_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/timer0/tasks_start.rs b/down-the-stack/dk_pac/src/timer0/tasks_start.rs deleted file mode 100644 index 594c6bb..0000000 --- a/down-the-stack/dk_pac/src/timer0/tasks_start.rs +++ /dev/null @@ -1,72 +0,0 @@ -#[doc = "Register `TASKS_START` 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 = "Start Timer\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum TASKS_START_AW { - #[doc = "1: Trigger task"] - TRIGGER = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: TASKS_START_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `TASKS_START` writer - Start Timer"] -pub type TASKS_START_W<'a, const O: u8> = - crate::BitWriter<'a, u32, TASKS_START_SPEC, TASKS_START_AW, O>; -impl<'a, const O: u8> TASKS_START_W<'a, O> { - #[doc = "Trigger task"] - #[inline(always)] - pub fn trigger(self) -> &'a mut W { - self.variant(TASKS_START_AW::TRIGGER) - } -} -impl W { - #[doc = "Bit 0 - Start Timer"] - #[inline(always)] - #[must_use] - pub fn tasks_start(&mut self) -> TASKS_START_W<0> { - TASKS_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 - } -} -#[doc = "Start Timer\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 [tasks_start](index.html) module"] -pub struct TASKS_START_SPEC; -impl crate::RegisterSpec for TASKS_START_SPEC { - type Ux = u32; -} -#[doc = "`write(|w| ..)` method takes [tasks_start::W](W) writer structure"] -impl crate::Writable for TASKS_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 TASKS_START to value 0"] -impl crate::Resettable for TASKS_START_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/timer0/tasks_stop.rs b/down-the-stack/dk_pac/src/timer0/tasks_stop.rs deleted file mode 100644 index 2b7608c..0000000 --- a/down-the-stack/dk_pac/src/timer0/tasks_stop.rs +++ /dev/null @@ -1,72 +0,0 @@ -#[doc = "Register `TASKS_STOP` 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 = "Stop Timer\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum TASKS_STOP_AW { - #[doc = "1: Trigger task"] - TRIGGER = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: TASKS_STOP_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `TASKS_STOP` writer - Stop Timer"] -pub type TASKS_STOP_W<'a, const O: u8> = - crate::BitWriter<'a, u32, TASKS_STOP_SPEC, TASKS_STOP_AW, O>; -impl<'a, const O: u8> TASKS_STOP_W<'a, O> { - #[doc = "Trigger task"] - #[inline(always)] - pub fn trigger(self) -> &'a mut W { - self.variant(TASKS_STOP_AW::TRIGGER) - } -} -impl W { - #[doc = "Bit 0 - Stop Timer"] - #[inline(always)] - #[must_use] - pub fn tasks_stop(&mut self) -> TASKS_STOP_W<0> { - TASKS_STOP_W::new(self) - } - #[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 = "Stop Timer\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 [tasks_stop](index.html) module"] -pub struct TASKS_STOP_SPEC; -impl crate::RegisterSpec for TASKS_STOP_SPEC { - type Ux = u32; -} -#[doc = "`write(|w| ..)` method takes [tasks_stop::W](W) writer structure"] -impl crate::Writable for TASKS_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 TASKS_STOP to value 0"] -impl crate::Resettable for TASKS_STOP_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/twi0.rs b/down-the-stack/dk_pac/src/twi0.rs deleted file mode 100644 index 01da6fb..0000000 --- a/down-the-stack/dk_pac/src/twi0.rs +++ /dev/null @@ -1,152 +0,0 @@ -#[doc = r"Register block"] -#[repr(C)] -pub struct RegisterBlock { - #[doc = "0x00 - Start TWI receive sequence"] - pub tasks_startrx: TASKS_STARTRX, - _reserved1: [u8; 0x04], - #[doc = "0x08 - Start TWI transmit sequence"] - pub tasks_starttx: TASKS_STARTTX, - _reserved2: [u8; 0x08], - #[doc = "0x14 - Stop TWI transaction"] - pub tasks_stop: TASKS_STOP, - _reserved3: [u8; 0x04], - #[doc = "0x1c - Suspend TWI transaction"] - pub tasks_suspend: TASKS_SUSPEND, - #[doc = "0x20 - Resume TWI transaction"] - pub tasks_resume: TASKS_RESUME, - _reserved5: [u8; 0xe0], - #[doc = "0x104 - TWI stopped"] - pub events_stopped: EVENTS_STOPPED, - #[doc = "0x108 - TWI RXD byte received"] - pub events_rxdready: EVENTS_RXDREADY, - _reserved7: [u8; 0x10], - #[doc = "0x11c - TWI TXD byte sent"] - pub events_txdsent: EVENTS_TXDSENT, - _reserved8: [u8; 0x04], - #[doc = "0x124 - TWI error"] - pub events_error: EVENTS_ERROR, - _reserved9: [u8; 0x10], - #[doc = "0x138 - TWI byte boundary, generated before each byte that is sent or received"] - pub events_bb: EVENTS_BB, - _reserved10: [u8; 0x0c], - #[doc = "0x148 - TWI entered the suspended state"] - pub events_suspended: EVENTS_SUSPENDED, - _reserved11: [u8; 0xb4], - #[doc = "0x200 - Shortcuts between local events and tasks"] - pub shorts: SHORTS, - _reserved12: [u8; 0x0100], - #[doc = "0x304 - Enable interrupt"] - pub intenset: INTENSET, - #[doc = "0x308 - Disable interrupt"] - pub intenclr: INTENCLR, - _reserved14: [u8; 0x01b8], - #[doc = "0x4c4 - Error source"] - pub errorsrc: ERRORSRC, - _reserved15: [u8; 0x38], - #[doc = "0x500 - Enable TWI"] - pub enable: ENABLE, - _reserved16: [u8; 0x04], - #[doc = "0x508 - Pin select for SCL"] - pub pselscl: PSELSCL, - #[doc = "0x50c - Pin select for SDA"] - pub pselsda: PSELSDA, - _reserved18: [u8; 0x08], - #[doc = "0x518 - RXD register"] - pub rxd: RXD, - #[doc = "0x51c - TXD register"] - pub txd: TXD, - _reserved20: [u8; 0x04], - #[doc = "0x524 - TWI frequency"] - pub frequency: FREQUENCY, - _reserved21: [u8; 0x60], - #[doc = "0x588 - Address used in the TWI transfer"] - pub address: ADDRESS, -} -#[doc = "TASKS_STARTRX (w) register accessor: an alias for `Reg`"] -pub type TASKS_STARTRX = crate::Reg; -#[doc = "Start TWI receive sequence"] -pub mod tasks_startrx; -#[doc = "TASKS_STARTTX (w) register accessor: an alias for `Reg`"] -pub type TASKS_STARTTX = crate::Reg; -#[doc = "Start TWI transmit sequence"] -pub mod tasks_starttx; -#[doc = "TASKS_STOP (w) register accessor: an alias for `Reg`"] -pub type TASKS_STOP = crate::Reg; -#[doc = "Stop TWI transaction"] -pub mod tasks_stop; -#[doc = "TASKS_SUSPEND (w) register accessor: an alias for `Reg`"] -pub type TASKS_SUSPEND = crate::Reg; -#[doc = "Suspend TWI transaction"] -pub mod tasks_suspend; -#[doc = "TASKS_RESUME (w) register accessor: an alias for `Reg`"] -pub type TASKS_RESUME = crate::Reg; -#[doc = "Resume TWI transaction"] -pub mod tasks_resume; -#[doc = "EVENTS_STOPPED (rw) register accessor: an alias for `Reg`"] -pub type EVENTS_STOPPED = crate::Reg; -#[doc = "TWI stopped"] -pub mod events_stopped; -#[doc = "EVENTS_RXDREADY (rw) register accessor: an alias for `Reg`"] -pub type EVENTS_RXDREADY = crate::Reg; -#[doc = "TWI RXD byte received"] -pub mod events_rxdready; -#[doc = "EVENTS_TXDSENT (rw) register accessor: an alias for `Reg`"] -pub type EVENTS_TXDSENT = crate::Reg; -#[doc = "TWI TXD byte sent"] -pub mod events_txdsent; -#[doc = "EVENTS_ERROR (rw) register accessor: an alias for `Reg`"] -pub type EVENTS_ERROR = crate::Reg; -#[doc = "TWI error"] -pub mod events_error; -#[doc = "EVENTS_BB (rw) register accessor: an alias for `Reg`"] -pub type EVENTS_BB = crate::Reg; -#[doc = "TWI byte boundary, generated before each byte that is sent or received"] -pub mod events_bb; -#[doc = "EVENTS_SUSPENDED (rw) register accessor: an alias for `Reg`"] -pub type EVENTS_SUSPENDED = crate::Reg; -#[doc = "TWI entered the suspended state"] -pub mod events_suspended; -#[doc = "SHORTS (rw) register accessor: an alias for `Reg`"] -pub type SHORTS = crate::Reg; -#[doc = "Shortcuts between local events and tasks"] -pub mod shorts; -#[doc = "INTENSET (rw) register accessor: an alias for `Reg`"] -pub type INTENSET = crate::Reg; -#[doc = "Enable interrupt"] -pub mod intenset; -#[doc = "INTENCLR (rw) register accessor: an alias for `Reg`"] -pub type INTENCLR = crate::Reg; -#[doc = "Disable interrupt"] -pub mod intenclr; -#[doc = "ERRORSRC (rw) register accessor: an alias for `Reg`"] -pub type ERRORSRC = crate::Reg; -#[doc = "Error source"] -pub mod errorsrc; -#[doc = "ENABLE (rw) register accessor: an alias for `Reg`"] -pub type ENABLE = crate::Reg; -#[doc = "Enable TWI"] -pub mod enable; -#[doc = "PSELSCL (rw) register accessor: an alias for `Reg`"] -pub type PSELSCL = crate::Reg; -#[doc = "Pin select for SCL"] -pub mod pselscl; -#[doc = "PSELSDA (rw) register accessor: an alias for `Reg`"] -pub type PSELSDA = crate::Reg; -#[doc = "Pin select for SDA"] -pub mod pselsda; -#[doc = "RXD (r) register accessor: an alias for `Reg`"] -pub type RXD = crate::Reg; -#[doc = "RXD register"] -pub mod rxd; -#[doc = "TXD (rw) register accessor: an alias for `Reg`"] -pub type TXD = crate::Reg; -#[doc = "TXD register"] -pub mod txd; -#[doc = "FREQUENCY (rw) register accessor: an alias for `Reg`"] -pub type FREQUENCY = crate::Reg; -#[doc = "TWI frequency"] -pub mod frequency; -#[doc = "ADDRESS (rw) register accessor: an alias for `Reg`"] -pub type ADDRESS = crate::Reg; -#[doc = "Address used in the TWI transfer"] -pub mod address; diff --git a/down-the-stack/dk_pac/src/twi0/address.rs b/down-the-stack/dk_pac/src/twi0/address.rs deleted file mode 100644 index 67780ec..0000000 --- a/down-the-stack/dk_pac/src/twi0/address.rs +++ /dev/null @@ -1,80 +0,0 @@ -#[doc = "Register `ADDRESS` 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 `ADDRESS` 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 `ADDRESS` reader - Address used in the TWI transfer"] -pub type ADDRESS_R = crate::FieldReader; -#[doc = "Field `ADDRESS` writer - Address used in the TWI transfer"] -pub type ADDRESS_W<'a, const O: u8> = crate::FieldWriter<'a, u32, ADDRESS_SPEC, u8, u8, 7, O>; -impl R { - #[doc = "Bits 0:6 - Address used in the TWI transfer"] - #[inline(always)] - pub fn address(&self) -> ADDRESS_R { - ADDRESS_R::new((self.bits & 0x7f) as u8) - } -} -impl W { - #[doc = "Bits 0:6 - Address used in the TWI transfer"] - #[inline(always)] - #[must_use] - pub fn address(&mut self) -> ADDRESS_W<0> { - ADDRESS_W::new(self) - } - #[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 = "Address used in the TWI transfer\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 [address](index.html) module"] -pub struct ADDRESS_SPEC; -impl crate::RegisterSpec for ADDRESS_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [address::R](R) reader structure"] -impl crate::Readable for ADDRESS_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [address::W](W) writer structure"] -impl crate::Writable for ADDRESS_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets ADDRESS to value 0"] -impl crate::Resettable for ADDRESS_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/twi0/enable.rs b/down-the-stack/dk_pac/src/twi0/enable.rs deleted file mode 100644 index 018a158..0000000 --- a/down-the-stack/dk_pac/src/twi0/enable.rs +++ /dev/null @@ -1,128 +0,0 @@ -#[doc = "Register `ENABLE` 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 `ENABLE` 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 `ENABLE` reader - Enable or disable TWI"] -pub type ENABLE_R = crate::FieldReader; -#[doc = "Enable or disable TWI\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -#[repr(u8)] -pub enum ENABLE_A { - #[doc = "0: Disable TWI"] - DISABLED = 0, - #[doc = "5: Enable TWI"] - ENABLED = 5, -} -impl From for u8 { - #[inline(always)] - fn from(variant: ENABLE_A) -> Self { - variant as _ - } -} -impl ENABLE_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> Option { - match self.bits { - 0 => Some(ENABLE_A::DISABLED), - 5 => Some(ENABLE_A::ENABLED), - _ => None, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == ENABLE_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == ENABLE_A::ENABLED - } -} -#[doc = "Field `ENABLE` writer - Enable or disable TWI"] -pub type ENABLE_W<'a, const O: u8> = crate::FieldWriter<'a, u32, ENABLE_SPEC, u8, ENABLE_A, 4, O>; -impl<'a, const O: u8> ENABLE_W<'a, O> { - #[doc = "Disable TWI"] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(ENABLE_A::DISABLED) - } - #[doc = "Enable TWI"] - #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(ENABLE_A::ENABLED) - } -} -impl R { - #[doc = "Bits 0:3 - Enable or disable TWI"] - #[inline(always)] - pub fn enable(&self) -> ENABLE_R { - ENABLE_R::new((self.bits & 0x0f) as u8) - } -} -impl W { - #[doc = "Bits 0:3 - Enable or disable TWI"] - #[inline(always)] - #[must_use] - pub fn enable(&mut self) -> ENABLE_W<0> { - 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 - } -} -#[doc = "Enable TWI\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 [enable](index.html) module"] -pub struct ENABLE_SPEC; -impl crate::RegisterSpec for ENABLE_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [enable::R](R) reader structure"] -impl crate::Readable for ENABLE_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [enable::W](W) writer structure"] -impl crate::Writable for ENABLE_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets ENABLE to value 0"] -impl crate::Resettable for ENABLE_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/twi0/errorsrc.rs b/down-the-stack/dk_pac/src/twi0/errorsrc.rs deleted file mode 100644 index 30cf388..0000000 --- a/down-the-stack/dk_pac/src/twi0/errorsrc.rs +++ /dev/null @@ -1,269 +0,0 @@ -#[doc = "Register `ERRORSRC` 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 `ERRORSRC` 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 `OVERRUN` reader - Overrun error"] -pub type OVERRUN_R = crate::BitReader; -#[doc = "Overrun error\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum OVERRUN_A { - #[doc = "0: Read: no overrun occured"] - NOT_PRESENT = 0, - #[doc = "1: Read: overrun occured"] - PRESENT = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: OVERRUN_A) -> Self { - variant as u8 != 0 - } -} -impl OVERRUN_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> OVERRUN_A { - match self.bits { - false => OVERRUN_A::NOT_PRESENT, - true => OVERRUN_A::PRESENT, - } - } - #[doc = "Checks if the value of the field is `NOT_PRESENT`"] - #[inline(always)] - pub fn is_not_present(&self) -> bool { - *self == OVERRUN_A::NOT_PRESENT - } - #[doc = "Checks if the value of the field is `PRESENT`"] - #[inline(always)] - pub fn is_present(&self) -> bool { - *self == OVERRUN_A::PRESENT - } -} -#[doc = "Overrun error\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum OVERRUN_AW { - #[doc = "1: Write: clear error on writing '1'"] - CLEAR = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: OVERRUN_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `OVERRUN` writer - Overrun error"] -pub type OVERRUN_W<'a, const O: u8> = crate::BitWriter1C<'a, u32, ERRORSRC_SPEC, OVERRUN_AW, O>; -impl<'a, const O: u8> OVERRUN_W<'a, O> { - #[doc = "Write: clear error on writing '1'"] - #[inline(always)] - pub fn clear(self) -> &'a mut W { - self.variant(OVERRUN_AW::CLEAR) - } -} -#[doc = "Field `ANACK` reader - NACK received after sending the address (write '1' to clear)"] -pub type ANACK_R = crate::BitReader; -#[doc = "NACK received after sending the address (write '1' to clear)\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum ANACK_A { - #[doc = "0: Read: error not present"] - NOT_PRESENT = 0, - #[doc = "1: Read: error present"] - PRESENT = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: ANACK_A) -> Self { - variant as u8 != 0 - } -} -impl ANACK_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> ANACK_A { - match self.bits { - false => ANACK_A::NOT_PRESENT, - true => ANACK_A::PRESENT, - } - } - #[doc = "Checks if the value of the field is `NOT_PRESENT`"] - #[inline(always)] - pub fn is_not_present(&self) -> bool { - *self == ANACK_A::NOT_PRESENT - } - #[doc = "Checks if the value of the field is `PRESENT`"] - #[inline(always)] - pub fn is_present(&self) -> bool { - *self == ANACK_A::PRESENT - } -} -#[doc = "NACK received after sending the address (write '1' to clear)\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum ANACK_AW { - #[doc = "1: Write: clear error on writing '1'"] - CLEAR = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: ANACK_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `ANACK` writer - NACK received after sending the address (write '1' to clear)"] -pub type ANACK_W<'a, const O: u8> = crate::BitWriter1C<'a, u32, ERRORSRC_SPEC, ANACK_AW, O>; -impl<'a, const O: u8> ANACK_W<'a, O> { - #[doc = "Write: clear error on writing '1'"] - #[inline(always)] - pub fn clear(self) -> &'a mut W { - self.variant(ANACK_AW::CLEAR) - } -} -#[doc = "Field `DNACK` reader - NACK received after sending a data byte (write '1' to clear)"] -pub type DNACK_R = crate::BitReader; -#[doc = "NACK received after sending a data byte (write '1' to clear)\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum DNACK_A { - #[doc = "0: Read: error not present"] - NOT_PRESENT = 0, - #[doc = "1: Read: error present"] - PRESENT = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: DNACK_A) -> Self { - variant as u8 != 0 - } -} -impl DNACK_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> DNACK_A { - match self.bits { - false => DNACK_A::NOT_PRESENT, - true => DNACK_A::PRESENT, - } - } - #[doc = "Checks if the value of the field is `NOT_PRESENT`"] - #[inline(always)] - pub fn is_not_present(&self) -> bool { - *self == DNACK_A::NOT_PRESENT - } - #[doc = "Checks if the value of the field is `PRESENT`"] - #[inline(always)] - pub fn is_present(&self) -> bool { - *self == DNACK_A::PRESENT - } -} -#[doc = "NACK received after sending a data byte (write '1' to clear)\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum DNACK_AW { - #[doc = "1: Write: clear error on writing '1'"] - CLEAR = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: DNACK_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `DNACK` writer - NACK received after sending a data byte (write '1' to clear)"] -pub type DNACK_W<'a, const O: u8> = crate::BitWriter1C<'a, u32, ERRORSRC_SPEC, DNACK_AW, O>; -impl<'a, const O: u8> DNACK_W<'a, O> { - #[doc = "Write: clear error on writing '1'"] - #[inline(always)] - pub fn clear(self) -> &'a mut W { - self.variant(DNACK_AW::CLEAR) - } -} -impl R { - #[doc = "Bit 0 - Overrun error"] - #[inline(always)] - pub fn overrun(&self) -> OVERRUN_R { - OVERRUN_R::new((self.bits & 1) != 0) - } - #[doc = "Bit 1 - NACK received after sending the address (write '1' to clear)"] - #[inline(always)] - pub fn anack(&self) -> ANACK_R { - ANACK_R::new(((self.bits >> 1) & 1) != 0) - } - #[doc = "Bit 2 - NACK received after sending a data byte (write '1' to clear)"] - #[inline(always)] - pub fn dnack(&self) -> DNACK_R { - DNACK_R::new(((self.bits >> 2) & 1) != 0) - } -} -impl W { - #[doc = "Bit 0 - Overrun error"] - #[inline(always)] - #[must_use] - pub fn overrun(&mut self) -> OVERRUN_W<0> { - OVERRUN_W::new(self) - } - #[doc = "Bit 1 - NACK received after sending the address (write '1' to clear)"] - #[inline(always)] - #[must_use] - pub fn anack(&mut self) -> ANACK_W<1> { - ANACK_W::new(self) - } - #[doc = "Bit 2 - NACK received after sending a data byte (write '1' to clear)"] - #[inline(always)] - #[must_use] - pub fn dnack(&mut self) -> DNACK_W<2> { - DNACK_W::new(self) - } - #[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 = "Error source\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 [errorsrc](index.html) module"] -pub struct ERRORSRC_SPEC; -impl crate::RegisterSpec for ERRORSRC_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [errorsrc::R](R) reader structure"] -impl crate::Readable for ERRORSRC_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [errorsrc::W](W) writer structure"] -impl crate::Writable for ERRORSRC_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0x07; -} -#[doc = "`reset()` method sets ERRORSRC to value 0"] -impl crate::Resettable for ERRORSRC_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/twi0/events_bb.rs b/down-the-stack/dk_pac/src/twi0/events_bb.rs deleted file mode 100644 index a470a52..0000000 --- a/down-the-stack/dk_pac/src/twi0/events_bb.rs +++ /dev/null @@ -1,126 +0,0 @@ -#[doc = "Register `EVENTS_BB` 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 `EVENTS_BB` 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 `EVENTS_BB` reader - TWI byte boundary, generated before each byte that is sent or received"] -pub type EVENTS_BB_R = crate::BitReader; -#[doc = "TWI byte boundary, generated before each byte that is sent or received\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum EVENTS_BB_A { - #[doc = "0: Event not generated"] - NOT_GENERATED = 0, - #[doc = "1: Event generated"] - GENERATED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: EVENTS_BB_A) -> Self { - variant as u8 != 0 - } -} -impl EVENTS_BB_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> EVENTS_BB_A { - match self.bits { - false => EVENTS_BB_A::NOT_GENERATED, - true => EVENTS_BB_A::GENERATED, - } - } - #[doc = "Checks if the value of the field is `NOT_GENERATED`"] - #[inline(always)] - pub fn is_not_generated(&self) -> bool { - *self == EVENTS_BB_A::NOT_GENERATED - } - #[doc = "Checks if the value of the field is `GENERATED`"] - #[inline(always)] - pub fn is_generated(&self) -> bool { - *self == EVENTS_BB_A::GENERATED - } -} -#[doc = "Field `EVENTS_BB` writer - TWI byte boundary, generated before each byte that is sent or received"] -pub type EVENTS_BB_W<'a, const O: u8> = crate::BitWriter<'a, u32, EVENTS_BB_SPEC, EVENTS_BB_A, O>; -impl<'a, const O: u8> EVENTS_BB_W<'a, O> { - #[doc = "Event not generated"] - #[inline(always)] - pub fn not_generated(self) -> &'a mut W { - self.variant(EVENTS_BB_A::NOT_GENERATED) - } - #[doc = "Event generated"] - #[inline(always)] - pub fn generated(self) -> &'a mut W { - self.variant(EVENTS_BB_A::GENERATED) - } -} -impl R { - #[doc = "Bit 0 - TWI byte boundary, generated before each byte that is sent or received"] - #[inline(always)] - pub fn events_bb(&self) -> EVENTS_BB_R { - EVENTS_BB_R::new((self.bits & 1) != 0) - } -} -impl W { - #[doc = "Bit 0 - TWI byte boundary, generated before each byte that is sent or received"] - #[inline(always)] - #[must_use] - pub fn events_bb(&mut self) -> EVENTS_BB_W<0> { - EVENTS_BB_W::new(self) - } - #[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 = "TWI byte boundary, generated before each byte that is sent or received\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 [events_bb](index.html) module"] -pub struct EVENTS_BB_SPEC; -impl crate::RegisterSpec for EVENTS_BB_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [events_bb::R](R) reader structure"] -impl crate::Readable for EVENTS_BB_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [events_bb::W](W) writer structure"] -impl crate::Writable for EVENTS_BB_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets EVENTS_BB to value 0"] -impl crate::Resettable for EVENTS_BB_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/twi0/events_error.rs b/down-the-stack/dk_pac/src/twi0/events_error.rs deleted file mode 100644 index 05b214c..0000000 --- a/down-the-stack/dk_pac/src/twi0/events_error.rs +++ /dev/null @@ -1,127 +0,0 @@ -#[doc = "Register `EVENTS_ERROR` 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 `EVENTS_ERROR` 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 `EVENTS_ERROR` reader - TWI error"] -pub type EVENTS_ERROR_R = crate::BitReader; -#[doc = "TWI error\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum EVENTS_ERROR_A { - #[doc = "0: Event not generated"] - NOT_GENERATED = 0, - #[doc = "1: Event generated"] - GENERATED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: EVENTS_ERROR_A) -> Self { - variant as u8 != 0 - } -} -impl EVENTS_ERROR_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> EVENTS_ERROR_A { - match self.bits { - false => EVENTS_ERROR_A::NOT_GENERATED, - true => EVENTS_ERROR_A::GENERATED, - } - } - #[doc = "Checks if the value of the field is `NOT_GENERATED`"] - #[inline(always)] - pub fn is_not_generated(&self) -> bool { - *self == EVENTS_ERROR_A::NOT_GENERATED - } - #[doc = "Checks if the value of the field is `GENERATED`"] - #[inline(always)] - pub fn is_generated(&self) -> bool { - *self == EVENTS_ERROR_A::GENERATED - } -} -#[doc = "Field `EVENTS_ERROR` writer - TWI error"] -pub type EVENTS_ERROR_W<'a, const O: u8> = - crate::BitWriter<'a, u32, EVENTS_ERROR_SPEC, EVENTS_ERROR_A, O>; -impl<'a, const O: u8> EVENTS_ERROR_W<'a, O> { - #[doc = "Event not generated"] - #[inline(always)] - pub fn not_generated(self) -> &'a mut W { - self.variant(EVENTS_ERROR_A::NOT_GENERATED) - } - #[doc = "Event generated"] - #[inline(always)] - pub fn generated(self) -> &'a mut W { - self.variant(EVENTS_ERROR_A::GENERATED) - } -} -impl R { - #[doc = "Bit 0 - TWI error"] - #[inline(always)] - pub fn events_error(&self) -> EVENTS_ERROR_R { - EVENTS_ERROR_R::new((self.bits & 1) != 0) - } -} -impl W { - #[doc = "Bit 0 - TWI error"] - #[inline(always)] - #[must_use] - pub fn events_error(&mut self) -> EVENTS_ERROR_W<0> { - EVENTS_ERROR_W::new(self) - } - #[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 = "TWI error\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 [events_error](index.html) module"] -pub struct EVENTS_ERROR_SPEC; -impl crate::RegisterSpec for EVENTS_ERROR_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [events_error::R](R) reader structure"] -impl crate::Readable for EVENTS_ERROR_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [events_error::W](W) writer structure"] -impl crate::Writable for EVENTS_ERROR_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets EVENTS_ERROR to value 0"] -impl crate::Resettable for EVENTS_ERROR_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/twi0/events_rxdready.rs b/down-the-stack/dk_pac/src/twi0/events_rxdready.rs deleted file mode 100644 index 807e9d4..0000000 --- a/down-the-stack/dk_pac/src/twi0/events_rxdready.rs +++ /dev/null @@ -1,127 +0,0 @@ -#[doc = "Register `EVENTS_RXDREADY` 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 `EVENTS_RXDREADY` 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 `EVENTS_RXDREADY` reader - TWI RXD byte received"] -pub type EVENTS_RXDREADY_R = crate::BitReader; -#[doc = "TWI RXD byte received\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum EVENTS_RXDREADY_A { - #[doc = "0: Event not generated"] - NOT_GENERATED = 0, - #[doc = "1: Event generated"] - GENERATED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: EVENTS_RXDREADY_A) -> Self { - variant as u8 != 0 - } -} -impl EVENTS_RXDREADY_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> EVENTS_RXDREADY_A { - match self.bits { - false => EVENTS_RXDREADY_A::NOT_GENERATED, - true => EVENTS_RXDREADY_A::GENERATED, - } - } - #[doc = "Checks if the value of the field is `NOT_GENERATED`"] - #[inline(always)] - pub fn is_not_generated(&self) -> bool { - *self == EVENTS_RXDREADY_A::NOT_GENERATED - } - #[doc = "Checks if the value of the field is `GENERATED`"] - #[inline(always)] - pub fn is_generated(&self) -> bool { - *self == EVENTS_RXDREADY_A::GENERATED - } -} -#[doc = "Field `EVENTS_RXDREADY` writer - TWI RXD byte received"] -pub type EVENTS_RXDREADY_W<'a, const O: u8> = - crate::BitWriter<'a, u32, EVENTS_RXDREADY_SPEC, EVENTS_RXDREADY_A, O>; -impl<'a, const O: u8> EVENTS_RXDREADY_W<'a, O> { - #[doc = "Event not generated"] - #[inline(always)] - pub fn not_generated(self) -> &'a mut W { - self.variant(EVENTS_RXDREADY_A::NOT_GENERATED) - } - #[doc = "Event generated"] - #[inline(always)] - pub fn generated(self) -> &'a mut W { - self.variant(EVENTS_RXDREADY_A::GENERATED) - } -} -impl R { - #[doc = "Bit 0 - TWI RXD byte received"] - #[inline(always)] - pub fn events_rxdready(&self) -> EVENTS_RXDREADY_R { - EVENTS_RXDREADY_R::new((self.bits & 1) != 0) - } -} -impl W { - #[doc = "Bit 0 - TWI RXD byte received"] - #[inline(always)] - #[must_use] - pub fn events_rxdready(&mut self) -> EVENTS_RXDREADY_W<0> { - EVENTS_RXDREADY_W::new(self) - } - #[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 = "TWI RXD byte received\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 [events_rxdready](index.html) module"] -pub struct EVENTS_RXDREADY_SPEC; -impl crate::RegisterSpec for EVENTS_RXDREADY_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [events_rxdready::R](R) reader structure"] -impl crate::Readable for EVENTS_RXDREADY_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [events_rxdready::W](W) writer structure"] -impl crate::Writable for EVENTS_RXDREADY_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets EVENTS_RXDREADY to value 0"] -impl crate::Resettable for EVENTS_RXDREADY_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/twi0/events_stopped.rs b/down-the-stack/dk_pac/src/twi0/events_stopped.rs deleted file mode 100644 index 4663646..0000000 --- a/down-the-stack/dk_pac/src/twi0/events_stopped.rs +++ /dev/null @@ -1,127 +0,0 @@ -#[doc = "Register `EVENTS_STOPPED` 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 `EVENTS_STOPPED` 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 `EVENTS_STOPPED` reader - TWI stopped"] -pub type EVENTS_STOPPED_R = crate::BitReader; -#[doc = "TWI stopped\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum EVENTS_STOPPED_A { - #[doc = "0: Event not generated"] - NOT_GENERATED = 0, - #[doc = "1: Event generated"] - GENERATED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: EVENTS_STOPPED_A) -> Self { - variant as u8 != 0 - } -} -impl EVENTS_STOPPED_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> EVENTS_STOPPED_A { - match self.bits { - false => EVENTS_STOPPED_A::NOT_GENERATED, - true => EVENTS_STOPPED_A::GENERATED, - } - } - #[doc = "Checks if the value of the field is `NOT_GENERATED`"] - #[inline(always)] - pub fn is_not_generated(&self) -> bool { - *self == EVENTS_STOPPED_A::NOT_GENERATED - } - #[doc = "Checks if the value of the field is `GENERATED`"] - #[inline(always)] - pub fn is_generated(&self) -> bool { - *self == EVENTS_STOPPED_A::GENERATED - } -} -#[doc = "Field `EVENTS_STOPPED` writer - TWI stopped"] -pub type EVENTS_STOPPED_W<'a, const O: u8> = - crate::BitWriter<'a, u32, EVENTS_STOPPED_SPEC, EVENTS_STOPPED_A, O>; -impl<'a, const O: u8> EVENTS_STOPPED_W<'a, O> { - #[doc = "Event not generated"] - #[inline(always)] - pub fn not_generated(self) -> &'a mut W { - self.variant(EVENTS_STOPPED_A::NOT_GENERATED) - } - #[doc = "Event generated"] - #[inline(always)] - pub fn generated(self) -> &'a mut W { - self.variant(EVENTS_STOPPED_A::GENERATED) - } -} -impl R { - #[doc = "Bit 0 - TWI stopped"] - #[inline(always)] - pub fn events_stopped(&self) -> EVENTS_STOPPED_R { - EVENTS_STOPPED_R::new((self.bits & 1) != 0) - } -} -impl W { - #[doc = "Bit 0 - TWI stopped"] - #[inline(always)] - #[must_use] - pub fn events_stopped(&mut self) -> EVENTS_STOPPED_W<0> { - EVENTS_STOPPED_W::new(self) - } - #[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 = "TWI stopped\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 [events_stopped](index.html) module"] -pub struct EVENTS_STOPPED_SPEC; -impl crate::RegisterSpec for EVENTS_STOPPED_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [events_stopped::R](R) reader structure"] -impl crate::Readable for EVENTS_STOPPED_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [events_stopped::W](W) writer structure"] -impl crate::Writable for EVENTS_STOPPED_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets EVENTS_STOPPED to value 0"] -impl crate::Resettable for EVENTS_STOPPED_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/twi0/events_suspended.rs b/down-the-stack/dk_pac/src/twi0/events_suspended.rs deleted file mode 100644 index 9118d91..0000000 --- a/down-the-stack/dk_pac/src/twi0/events_suspended.rs +++ /dev/null @@ -1,127 +0,0 @@ -#[doc = "Register `EVENTS_SUSPENDED` 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 `EVENTS_SUSPENDED` 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 `EVENTS_SUSPENDED` reader - TWI entered the suspended state"] -pub type EVENTS_SUSPENDED_R = crate::BitReader; -#[doc = "TWI entered the suspended state\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum EVENTS_SUSPENDED_A { - #[doc = "0: Event not generated"] - NOT_GENERATED = 0, - #[doc = "1: Event generated"] - GENERATED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: EVENTS_SUSPENDED_A) -> Self { - variant as u8 != 0 - } -} -impl EVENTS_SUSPENDED_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> EVENTS_SUSPENDED_A { - match self.bits { - false => EVENTS_SUSPENDED_A::NOT_GENERATED, - true => EVENTS_SUSPENDED_A::GENERATED, - } - } - #[doc = "Checks if the value of the field is `NOT_GENERATED`"] - #[inline(always)] - pub fn is_not_generated(&self) -> bool { - *self == EVENTS_SUSPENDED_A::NOT_GENERATED - } - #[doc = "Checks if the value of the field is `GENERATED`"] - #[inline(always)] - pub fn is_generated(&self) -> bool { - *self == EVENTS_SUSPENDED_A::GENERATED - } -} -#[doc = "Field `EVENTS_SUSPENDED` writer - TWI entered the suspended state"] -pub type EVENTS_SUSPENDED_W<'a, const O: u8> = - crate::BitWriter<'a, u32, EVENTS_SUSPENDED_SPEC, EVENTS_SUSPENDED_A, O>; -impl<'a, const O: u8> EVENTS_SUSPENDED_W<'a, O> { - #[doc = "Event not generated"] - #[inline(always)] - pub fn not_generated(self) -> &'a mut W { - self.variant(EVENTS_SUSPENDED_A::NOT_GENERATED) - } - #[doc = "Event generated"] - #[inline(always)] - pub fn generated(self) -> &'a mut W { - self.variant(EVENTS_SUSPENDED_A::GENERATED) - } -} -impl R { - #[doc = "Bit 0 - TWI entered the suspended state"] - #[inline(always)] - pub fn events_suspended(&self) -> EVENTS_SUSPENDED_R { - EVENTS_SUSPENDED_R::new((self.bits & 1) != 0) - } -} -impl W { - #[doc = "Bit 0 - TWI entered the suspended state"] - #[inline(always)] - #[must_use] - pub fn events_suspended(&mut self) -> EVENTS_SUSPENDED_W<0> { - EVENTS_SUSPENDED_W::new(self) - } - #[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 = "TWI entered the suspended state\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 [events_suspended](index.html) module"] -pub struct EVENTS_SUSPENDED_SPEC; -impl crate::RegisterSpec for EVENTS_SUSPENDED_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [events_suspended::R](R) reader structure"] -impl crate::Readable for EVENTS_SUSPENDED_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [events_suspended::W](W) writer structure"] -impl crate::Writable for EVENTS_SUSPENDED_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets EVENTS_SUSPENDED to value 0"] -impl crate::Resettable for EVENTS_SUSPENDED_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/twi0/events_txdsent.rs b/down-the-stack/dk_pac/src/twi0/events_txdsent.rs deleted file mode 100644 index 6341bc8..0000000 --- a/down-the-stack/dk_pac/src/twi0/events_txdsent.rs +++ /dev/null @@ -1,127 +0,0 @@ -#[doc = "Register `EVENTS_TXDSENT` 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 `EVENTS_TXDSENT` 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 `EVENTS_TXDSENT` reader - TWI TXD byte sent"] -pub type EVENTS_TXDSENT_R = crate::BitReader; -#[doc = "TWI TXD byte sent\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum EVENTS_TXDSENT_A { - #[doc = "0: Event not generated"] - NOT_GENERATED = 0, - #[doc = "1: Event generated"] - GENERATED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: EVENTS_TXDSENT_A) -> Self { - variant as u8 != 0 - } -} -impl EVENTS_TXDSENT_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> EVENTS_TXDSENT_A { - match self.bits { - false => EVENTS_TXDSENT_A::NOT_GENERATED, - true => EVENTS_TXDSENT_A::GENERATED, - } - } - #[doc = "Checks if the value of the field is `NOT_GENERATED`"] - #[inline(always)] - pub fn is_not_generated(&self) -> bool { - *self == EVENTS_TXDSENT_A::NOT_GENERATED - } - #[doc = "Checks if the value of the field is `GENERATED`"] - #[inline(always)] - pub fn is_generated(&self) -> bool { - *self == EVENTS_TXDSENT_A::GENERATED - } -} -#[doc = "Field `EVENTS_TXDSENT` writer - TWI TXD byte sent"] -pub type EVENTS_TXDSENT_W<'a, const O: u8> = - crate::BitWriter<'a, u32, EVENTS_TXDSENT_SPEC, EVENTS_TXDSENT_A, O>; -impl<'a, const O: u8> EVENTS_TXDSENT_W<'a, O> { - #[doc = "Event not generated"] - #[inline(always)] - pub fn not_generated(self) -> &'a mut W { - self.variant(EVENTS_TXDSENT_A::NOT_GENERATED) - } - #[doc = "Event generated"] - #[inline(always)] - pub fn generated(self) -> &'a mut W { - self.variant(EVENTS_TXDSENT_A::GENERATED) - } -} -impl R { - #[doc = "Bit 0 - TWI TXD byte sent"] - #[inline(always)] - pub fn events_txdsent(&self) -> EVENTS_TXDSENT_R { - EVENTS_TXDSENT_R::new((self.bits & 1) != 0) - } -} -impl W { - #[doc = "Bit 0 - TWI TXD byte sent"] - #[inline(always)] - #[must_use] - pub fn events_txdsent(&mut self) -> EVENTS_TXDSENT_W<0> { - EVENTS_TXDSENT_W::new(self) - } - #[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 = "TWI TXD byte sent\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 [events_txdsent](index.html) module"] -pub struct EVENTS_TXDSENT_SPEC; -impl crate::RegisterSpec for EVENTS_TXDSENT_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [events_txdsent::R](R) reader structure"] -impl crate::Readable for EVENTS_TXDSENT_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [events_txdsent::W](W) writer structure"] -impl crate::Writable for EVENTS_TXDSENT_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets EVENTS_TXDSENT to value 0"] -impl crate::Resettable for EVENTS_TXDSENT_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/twi0/frequency.rs b/down-the-stack/dk_pac/src/twi0/frequency.rs deleted file mode 100644 index e1a368e..0000000 --- a/down-the-stack/dk_pac/src/twi0/frequency.rs +++ /dev/null @@ -1,142 +0,0 @@ -#[doc = "Register `FREQUENCY` 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 `FREQUENCY` 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 `FREQUENCY` reader - TWI master clock frequency"] -pub type FREQUENCY_R = crate::FieldReader; -#[doc = "TWI master clock frequency\n\nValue on reset: 67108864"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -#[repr(u32)] -pub enum FREQUENCY_A { - #[doc = "26738688: 100 kbps"] - K100 = 26738688, - #[doc = "67108864: 250 kbps"] - K250 = 67108864, - #[doc = "107479040: 400 kbps (actual rate 410.256 kbps)"] - K400 = 107479040, -} -impl From for u32 { - #[inline(always)] - fn from(variant: FREQUENCY_A) -> Self { - variant as _ - } -} -impl FREQUENCY_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> Option { - match self.bits { - 26738688 => Some(FREQUENCY_A::K100), - 67108864 => Some(FREQUENCY_A::K250), - 107479040 => Some(FREQUENCY_A::K400), - _ => None, - } - } - #[doc = "Checks if the value of the field is `K100`"] - #[inline(always)] - pub fn is_k100(&self) -> bool { - *self == FREQUENCY_A::K100 - } - #[doc = "Checks if the value of the field is `K250`"] - #[inline(always)] - pub fn is_k250(&self) -> bool { - *self == FREQUENCY_A::K250 - } - #[doc = "Checks if the value of the field is `K400`"] - #[inline(always)] - pub fn is_k400(&self) -> bool { - *self == FREQUENCY_A::K400 - } -} -#[doc = "Field `FREQUENCY` writer - TWI master clock frequency"] -pub type FREQUENCY_W<'a, const O: u8> = - crate::FieldWriter<'a, u32, FREQUENCY_SPEC, u32, FREQUENCY_A, 32, O>; -impl<'a, const O: u8> FREQUENCY_W<'a, O> { - #[doc = "100 kbps"] - #[inline(always)] - pub fn k100(self) -> &'a mut W { - self.variant(FREQUENCY_A::K100) - } - #[doc = "250 kbps"] - #[inline(always)] - pub fn k250(self) -> &'a mut W { - self.variant(FREQUENCY_A::K250) - } - #[doc = "400 kbps (actual rate 410.256 kbps)"] - #[inline(always)] - pub fn k400(self) -> &'a mut W { - self.variant(FREQUENCY_A::K400) - } -} -impl R { - #[doc = "Bits 0:31 - TWI master clock frequency"] - #[inline(always)] - pub fn frequency(&self) -> FREQUENCY_R { - FREQUENCY_R::new(self.bits) - } -} -impl W { - #[doc = "Bits 0:31 - TWI master clock frequency"] - #[inline(always)] - #[must_use] - pub fn frequency(&mut self) -> FREQUENCY_W<0> { - FREQUENCY_W::new(self) - } - #[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 = "TWI frequency\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 [frequency](index.html) module"] -pub struct FREQUENCY_SPEC; -impl crate::RegisterSpec for FREQUENCY_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [frequency::R](R) reader structure"] -impl crate::Readable for FREQUENCY_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [frequency::W](W) writer structure"] -impl crate::Writable for FREQUENCY_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets FREQUENCY to value 0x0400_0000"] -impl crate::Resettable for FREQUENCY_SPEC { - const RESET_VALUE: Self::Ux = 0x0400_0000; -} diff --git a/down-the-stack/dk_pac/src/twi0/intenclr.rs b/down-the-stack/dk_pac/src/twi0/intenclr.rs deleted file mode 100644 index a99d52f..0000000 --- a/down-the-stack/dk_pac/src/twi0/intenclr.rs +++ /dev/null @@ -1,473 +0,0 @@ -#[doc = "Register `INTENCLR` 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 `INTENCLR` 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 `STOPPED` reader - Write '1' to disable interrupt for event STOPPED"] -pub type STOPPED_R = crate::BitReader; -#[doc = "Write '1' to disable interrupt for event STOPPED\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum STOPPED_A { - #[doc = "0: Read: Disabled"] - DISABLED = 0, - #[doc = "1: Read: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: STOPPED_A) -> Self { - variant as u8 != 0 - } -} -impl STOPPED_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> STOPPED_A { - match self.bits { - false => STOPPED_A::DISABLED, - true => STOPPED_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == STOPPED_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == STOPPED_A::ENABLED - } -} -#[doc = "Write '1' to disable interrupt for event STOPPED\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum STOPPED_AW { - #[doc = "1: Disable"] - CLEAR = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: STOPPED_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `STOPPED` writer - Write '1' to disable interrupt for event STOPPED"] -pub type STOPPED_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENCLR_SPEC, STOPPED_AW, O>; -impl<'a, const O: u8> STOPPED_W<'a, O> { - #[doc = "Disable"] - #[inline(always)] - pub fn clear(self) -> &'a mut W { - self.variant(STOPPED_AW::CLEAR) - } -} -#[doc = "Field `RXDREADY` reader - Write '1' to disable interrupt for event RXDREADY"] -pub type RXDREADY_R = crate::BitReader; -#[doc = "Write '1' to disable interrupt for event RXDREADY\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum RXDREADY_A { - #[doc = "0: Read: Disabled"] - DISABLED = 0, - #[doc = "1: Read: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: RXDREADY_A) -> Self { - variant as u8 != 0 - } -} -impl RXDREADY_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> RXDREADY_A { - match self.bits { - false => RXDREADY_A::DISABLED, - true => RXDREADY_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == RXDREADY_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == RXDREADY_A::ENABLED - } -} -#[doc = "Write '1' to disable interrupt for event RXDREADY\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum RXDREADY_AW { - #[doc = "1: Disable"] - CLEAR = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: RXDREADY_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `RXDREADY` writer - Write '1' to disable interrupt for event RXDREADY"] -pub type RXDREADY_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENCLR_SPEC, RXDREADY_AW, O>; -impl<'a, const O: u8> RXDREADY_W<'a, O> { - #[doc = "Disable"] - #[inline(always)] - pub fn clear(self) -> &'a mut W { - self.variant(RXDREADY_AW::CLEAR) - } -} -#[doc = "Field `TXDSENT` reader - Write '1' to disable interrupt for event TXDSENT"] -pub type TXDSENT_R = crate::BitReader; -#[doc = "Write '1' to disable interrupt for event TXDSENT\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum TXDSENT_A { - #[doc = "0: Read: Disabled"] - DISABLED = 0, - #[doc = "1: Read: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: TXDSENT_A) -> Self { - variant as u8 != 0 - } -} -impl TXDSENT_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> TXDSENT_A { - match self.bits { - false => TXDSENT_A::DISABLED, - true => TXDSENT_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == TXDSENT_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == TXDSENT_A::ENABLED - } -} -#[doc = "Write '1' to disable interrupt for event TXDSENT\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum TXDSENT_AW { - #[doc = "1: Disable"] - CLEAR = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: TXDSENT_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `TXDSENT` writer - Write '1' to disable interrupt for event TXDSENT"] -pub type TXDSENT_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENCLR_SPEC, TXDSENT_AW, O>; -impl<'a, const O: u8> TXDSENT_W<'a, O> { - #[doc = "Disable"] - #[inline(always)] - pub fn clear(self) -> &'a mut W { - self.variant(TXDSENT_AW::CLEAR) - } -} -#[doc = "Field `ERROR` reader - Write '1' to disable interrupt for event ERROR"] -pub type ERROR_R = crate::BitReader; -#[doc = "Write '1' to disable interrupt for event ERROR\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum ERROR_A { - #[doc = "0: Read: Disabled"] - DISABLED = 0, - #[doc = "1: Read: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: ERROR_A) -> Self { - variant as u8 != 0 - } -} -impl ERROR_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> ERROR_A { - match self.bits { - false => ERROR_A::DISABLED, - true => ERROR_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == ERROR_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == ERROR_A::ENABLED - } -} -#[doc = "Write '1' to disable interrupt for event ERROR\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum ERROR_AW { - #[doc = "1: Disable"] - CLEAR = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: ERROR_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `ERROR` writer - Write '1' to disable interrupt for event ERROR"] -pub type ERROR_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENCLR_SPEC, ERROR_AW, O>; -impl<'a, const O: u8> ERROR_W<'a, O> { - #[doc = "Disable"] - #[inline(always)] - pub fn clear(self) -> &'a mut W { - self.variant(ERROR_AW::CLEAR) - } -} -#[doc = "Field `BB` reader - Write '1' to disable interrupt for event BB"] -pub type BB_R = crate::BitReader; -#[doc = "Write '1' to disable interrupt for event BB\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum BB_A { - #[doc = "0: Read: Disabled"] - DISABLED = 0, - #[doc = "1: Read: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: BB_A) -> Self { - variant as u8 != 0 - } -} -impl BB_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> BB_A { - match self.bits { - false => BB_A::DISABLED, - true => BB_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == BB_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == BB_A::ENABLED - } -} -#[doc = "Write '1' to disable interrupt for event BB\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum BB_AW { - #[doc = "1: Disable"] - CLEAR = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: BB_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `BB` writer - Write '1' to disable interrupt for event BB"] -pub type BB_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENCLR_SPEC, BB_AW, O>; -impl<'a, const O: u8> BB_W<'a, O> { - #[doc = "Disable"] - #[inline(always)] - pub fn clear(self) -> &'a mut W { - self.variant(BB_AW::CLEAR) - } -} -#[doc = "Field `SUSPENDED` reader - Write '1' to disable interrupt for event SUSPENDED"] -pub type SUSPENDED_R = crate::BitReader; -#[doc = "Write '1' to disable interrupt for event SUSPENDED\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum SUSPENDED_A { - #[doc = "0: Read: Disabled"] - DISABLED = 0, - #[doc = "1: Read: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: SUSPENDED_A) -> Self { - variant as u8 != 0 - } -} -impl SUSPENDED_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> SUSPENDED_A { - match self.bits { - false => SUSPENDED_A::DISABLED, - true => SUSPENDED_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == SUSPENDED_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == SUSPENDED_A::ENABLED - } -} -#[doc = "Write '1' to disable interrupt for event SUSPENDED\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum SUSPENDED_AW { - #[doc = "1: Disable"] - CLEAR = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: SUSPENDED_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `SUSPENDED` writer - Write '1' to disable interrupt for event SUSPENDED"] -pub type SUSPENDED_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENCLR_SPEC, SUSPENDED_AW, O>; -impl<'a, const O: u8> SUSPENDED_W<'a, O> { - #[doc = "Disable"] - #[inline(always)] - pub fn clear(self) -> &'a mut W { - self.variant(SUSPENDED_AW::CLEAR) - } -} -impl R { - #[doc = "Bit 1 - Write '1' to disable interrupt for event STOPPED"] - #[inline(always)] - pub fn stopped(&self) -> STOPPED_R { - STOPPED_R::new(((self.bits >> 1) & 1) != 0) - } - #[doc = "Bit 2 - Write '1' to disable interrupt for event RXDREADY"] - #[inline(always)] - pub fn rxdready(&self) -> RXDREADY_R { - RXDREADY_R::new(((self.bits >> 2) & 1) != 0) - } - #[doc = "Bit 7 - Write '1' to disable interrupt for event TXDSENT"] - #[inline(always)] - pub fn txdsent(&self) -> TXDSENT_R { - TXDSENT_R::new(((self.bits >> 7) & 1) != 0) - } - #[doc = "Bit 9 - Write '1' to disable interrupt for event ERROR"] - #[inline(always)] - pub fn error(&self) -> ERROR_R { - ERROR_R::new(((self.bits >> 9) & 1) != 0) - } - #[doc = "Bit 14 - Write '1' to disable interrupt for event BB"] - #[inline(always)] - pub fn bb(&self) -> BB_R { - BB_R::new(((self.bits >> 14) & 1) != 0) - } - #[doc = "Bit 18 - Write '1' to disable interrupt for event SUSPENDED"] - #[inline(always)] - pub fn suspended(&self) -> SUSPENDED_R { - SUSPENDED_R::new(((self.bits >> 18) & 1) != 0) - } -} -impl W { - #[doc = "Bit 1 - Write '1' to disable interrupt for event STOPPED"] - #[inline(always)] - #[must_use] - pub fn stopped(&mut self) -> STOPPED_W<1> { - STOPPED_W::new(self) - } - #[doc = "Bit 2 - Write '1' to disable interrupt for event RXDREADY"] - #[inline(always)] - #[must_use] - pub fn rxdready(&mut self) -> RXDREADY_W<2> { - RXDREADY_W::new(self) - } - #[doc = "Bit 7 - Write '1' to disable interrupt for event TXDSENT"] - #[inline(always)] - #[must_use] - pub fn txdsent(&mut self) -> TXDSENT_W<7> { - TXDSENT_W::new(self) - } - #[doc = "Bit 9 - Write '1' to disable interrupt for event ERROR"] - #[inline(always)] - #[must_use] - pub fn error(&mut self) -> ERROR_W<9> { - ERROR_W::new(self) - } - #[doc = "Bit 14 - Write '1' to disable interrupt for event BB"] - #[inline(always)] - #[must_use] - pub fn bb(&mut self) -> BB_W<14> { - BB_W::new(self) - } - #[doc = "Bit 18 - Write '1' to disable interrupt for event SUSPENDED"] - #[inline(always)] - #[must_use] - pub fn suspended(&mut self) -> SUSPENDED_W<18> { - SUSPENDED_W::new(self) - } - #[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 = "Disable interrupt\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 [intenclr](index.html) module"] -pub struct INTENCLR_SPEC; -impl crate::RegisterSpec for INTENCLR_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [intenclr::R](R) reader structure"] -impl crate::Readable for INTENCLR_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [intenclr::W](W) writer structure"] -impl crate::Writable for INTENCLR_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets INTENCLR to value 0"] -impl crate::Resettable for INTENCLR_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/twi0/intenset.rs b/down-the-stack/dk_pac/src/twi0/intenset.rs deleted file mode 100644 index 8624808..0000000 --- a/down-the-stack/dk_pac/src/twi0/intenset.rs +++ /dev/null @@ -1,473 +0,0 @@ -#[doc = "Register `INTENSET` 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 `INTENSET` 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 `STOPPED` reader - Write '1' to enable interrupt for event STOPPED"] -pub type STOPPED_R = crate::BitReader; -#[doc = "Write '1' to enable interrupt for event STOPPED\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum STOPPED_A { - #[doc = "0: Read: Disabled"] - DISABLED = 0, - #[doc = "1: Read: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: STOPPED_A) -> Self { - variant as u8 != 0 - } -} -impl STOPPED_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> STOPPED_A { - match self.bits { - false => STOPPED_A::DISABLED, - true => STOPPED_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == STOPPED_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == STOPPED_A::ENABLED - } -} -#[doc = "Write '1' to enable interrupt for event STOPPED\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum STOPPED_AW { - #[doc = "1: Enable"] - SET = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: STOPPED_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `STOPPED` writer - Write '1' to enable interrupt for event STOPPED"] -pub type STOPPED_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENSET_SPEC, STOPPED_AW, O>; -impl<'a, const O: u8> STOPPED_W<'a, O> { - #[doc = "Enable"] - #[inline(always)] - pub fn set(self) -> &'a mut W { - self.variant(STOPPED_AW::SET) - } -} -#[doc = "Field `RXDREADY` reader - Write '1' to enable interrupt for event RXDREADY"] -pub type RXDREADY_R = crate::BitReader; -#[doc = "Write '1' to enable interrupt for event RXDREADY\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum RXDREADY_A { - #[doc = "0: Read: Disabled"] - DISABLED = 0, - #[doc = "1: Read: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: RXDREADY_A) -> Self { - variant as u8 != 0 - } -} -impl RXDREADY_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> RXDREADY_A { - match self.bits { - false => RXDREADY_A::DISABLED, - true => RXDREADY_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == RXDREADY_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == RXDREADY_A::ENABLED - } -} -#[doc = "Write '1' to enable interrupt for event RXDREADY\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum RXDREADY_AW { - #[doc = "1: Enable"] - SET = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: RXDREADY_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `RXDREADY` writer - Write '1' to enable interrupt for event RXDREADY"] -pub type RXDREADY_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENSET_SPEC, RXDREADY_AW, O>; -impl<'a, const O: u8> RXDREADY_W<'a, O> { - #[doc = "Enable"] - #[inline(always)] - pub fn set(self) -> &'a mut W { - self.variant(RXDREADY_AW::SET) - } -} -#[doc = "Field `TXDSENT` reader - Write '1' to enable interrupt for event TXDSENT"] -pub type TXDSENT_R = crate::BitReader; -#[doc = "Write '1' to enable interrupt for event TXDSENT\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum TXDSENT_A { - #[doc = "0: Read: Disabled"] - DISABLED = 0, - #[doc = "1: Read: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: TXDSENT_A) -> Self { - variant as u8 != 0 - } -} -impl TXDSENT_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> TXDSENT_A { - match self.bits { - false => TXDSENT_A::DISABLED, - true => TXDSENT_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == TXDSENT_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == TXDSENT_A::ENABLED - } -} -#[doc = "Write '1' to enable interrupt for event TXDSENT\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum TXDSENT_AW { - #[doc = "1: Enable"] - SET = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: TXDSENT_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `TXDSENT` writer - Write '1' to enable interrupt for event TXDSENT"] -pub type TXDSENT_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENSET_SPEC, TXDSENT_AW, O>; -impl<'a, const O: u8> TXDSENT_W<'a, O> { - #[doc = "Enable"] - #[inline(always)] - pub fn set(self) -> &'a mut W { - self.variant(TXDSENT_AW::SET) - } -} -#[doc = "Field `ERROR` reader - Write '1' to enable interrupt for event ERROR"] -pub type ERROR_R = crate::BitReader; -#[doc = "Write '1' to enable interrupt for event ERROR\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum ERROR_A { - #[doc = "0: Read: Disabled"] - DISABLED = 0, - #[doc = "1: Read: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: ERROR_A) -> Self { - variant as u8 != 0 - } -} -impl ERROR_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> ERROR_A { - match self.bits { - false => ERROR_A::DISABLED, - true => ERROR_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == ERROR_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == ERROR_A::ENABLED - } -} -#[doc = "Write '1' to enable interrupt for event ERROR\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum ERROR_AW { - #[doc = "1: Enable"] - SET = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: ERROR_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `ERROR` writer - Write '1' to enable interrupt for event ERROR"] -pub type ERROR_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENSET_SPEC, ERROR_AW, O>; -impl<'a, const O: u8> ERROR_W<'a, O> { - #[doc = "Enable"] - #[inline(always)] - pub fn set(self) -> &'a mut W { - self.variant(ERROR_AW::SET) - } -} -#[doc = "Field `BB` reader - Write '1' to enable interrupt for event BB"] -pub type BB_R = crate::BitReader; -#[doc = "Write '1' to enable interrupt for event BB\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum BB_A { - #[doc = "0: Read: Disabled"] - DISABLED = 0, - #[doc = "1: Read: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: BB_A) -> Self { - variant as u8 != 0 - } -} -impl BB_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> BB_A { - match self.bits { - false => BB_A::DISABLED, - true => BB_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == BB_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == BB_A::ENABLED - } -} -#[doc = "Write '1' to enable interrupt for event BB\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum BB_AW { - #[doc = "1: Enable"] - SET = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: BB_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `BB` writer - Write '1' to enable interrupt for event BB"] -pub type BB_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENSET_SPEC, BB_AW, O>; -impl<'a, const O: u8> BB_W<'a, O> { - #[doc = "Enable"] - #[inline(always)] - pub fn set(self) -> &'a mut W { - self.variant(BB_AW::SET) - } -} -#[doc = "Field `SUSPENDED` reader - Write '1' to enable interrupt for event SUSPENDED"] -pub type SUSPENDED_R = crate::BitReader; -#[doc = "Write '1' to enable interrupt for event SUSPENDED\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum SUSPENDED_A { - #[doc = "0: Read: Disabled"] - DISABLED = 0, - #[doc = "1: Read: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: SUSPENDED_A) -> Self { - variant as u8 != 0 - } -} -impl SUSPENDED_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> SUSPENDED_A { - match self.bits { - false => SUSPENDED_A::DISABLED, - true => SUSPENDED_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == SUSPENDED_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == SUSPENDED_A::ENABLED - } -} -#[doc = "Write '1' to enable interrupt for event SUSPENDED\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum SUSPENDED_AW { - #[doc = "1: Enable"] - SET = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: SUSPENDED_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `SUSPENDED` writer - Write '1' to enable interrupt for event SUSPENDED"] -pub type SUSPENDED_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENSET_SPEC, SUSPENDED_AW, O>; -impl<'a, const O: u8> SUSPENDED_W<'a, O> { - #[doc = "Enable"] - #[inline(always)] - pub fn set(self) -> &'a mut W { - self.variant(SUSPENDED_AW::SET) - } -} -impl R { - #[doc = "Bit 1 - Write '1' to enable interrupt for event STOPPED"] - #[inline(always)] - pub fn stopped(&self) -> STOPPED_R { - STOPPED_R::new(((self.bits >> 1) & 1) != 0) - } - #[doc = "Bit 2 - Write '1' to enable interrupt for event RXDREADY"] - #[inline(always)] - pub fn rxdready(&self) -> RXDREADY_R { - RXDREADY_R::new(((self.bits >> 2) & 1) != 0) - } - #[doc = "Bit 7 - Write '1' to enable interrupt for event TXDSENT"] - #[inline(always)] - pub fn txdsent(&self) -> TXDSENT_R { - TXDSENT_R::new(((self.bits >> 7) & 1) != 0) - } - #[doc = "Bit 9 - Write '1' to enable interrupt for event ERROR"] - #[inline(always)] - pub fn error(&self) -> ERROR_R { - ERROR_R::new(((self.bits >> 9) & 1) != 0) - } - #[doc = "Bit 14 - Write '1' to enable interrupt for event BB"] - #[inline(always)] - pub fn bb(&self) -> BB_R { - BB_R::new(((self.bits >> 14) & 1) != 0) - } - #[doc = "Bit 18 - Write '1' to enable interrupt for event SUSPENDED"] - #[inline(always)] - pub fn suspended(&self) -> SUSPENDED_R { - SUSPENDED_R::new(((self.bits >> 18) & 1) != 0) - } -} -impl W { - #[doc = "Bit 1 - Write '1' to enable interrupt for event STOPPED"] - #[inline(always)] - #[must_use] - pub fn stopped(&mut self) -> STOPPED_W<1> { - STOPPED_W::new(self) - } - #[doc = "Bit 2 - Write '1' to enable interrupt for event RXDREADY"] - #[inline(always)] - #[must_use] - pub fn rxdready(&mut self) -> RXDREADY_W<2> { - RXDREADY_W::new(self) - } - #[doc = "Bit 7 - Write '1' to enable interrupt for event TXDSENT"] - #[inline(always)] - #[must_use] - pub fn txdsent(&mut self) -> TXDSENT_W<7> { - TXDSENT_W::new(self) - } - #[doc = "Bit 9 - Write '1' to enable interrupt for event ERROR"] - #[inline(always)] - #[must_use] - pub fn error(&mut self) -> ERROR_W<9> { - ERROR_W::new(self) - } - #[doc = "Bit 14 - Write '1' to enable interrupt for event BB"] - #[inline(always)] - #[must_use] - pub fn bb(&mut self) -> BB_W<14> { - BB_W::new(self) - } - #[doc = "Bit 18 - Write '1' to enable interrupt for event SUSPENDED"] - #[inline(always)] - #[must_use] - pub fn suspended(&mut self) -> SUSPENDED_W<18> { - SUSPENDED_W::new(self) - } - #[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 = "Enable interrupt\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 [intenset](index.html) module"] -pub struct INTENSET_SPEC; -impl crate::RegisterSpec for INTENSET_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [intenset::R](R) reader structure"] -impl crate::Readable for INTENSET_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [intenset::W](W) writer structure"] -impl crate::Writable for INTENSET_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets INTENSET to value 0"] -impl crate::Resettable for INTENSET_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/twi0/pselscl.rs b/down-the-stack/dk_pac/src/twi0/pselscl.rs deleted file mode 100644 index a358a88..0000000 --- a/down-the-stack/dk_pac/src/twi0/pselscl.rs +++ /dev/null @@ -1,116 +0,0 @@ -#[doc = "Register `PSELSCL` 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 `PSELSCL` 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 `PSELSCL` reader - Pin number configuration for TWI SCL signal"] -pub type PSELSCL_R = crate::FieldReader; -#[doc = "Pin number configuration for TWI SCL signal\n\nValue on reset: 4294967295"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -#[repr(u32)] -pub enum PSELSCL_A { - #[doc = "4294967295: Disconnect"] - DISCONNECTED = 4294967295, -} -impl From for u32 { - #[inline(always)] - fn from(variant: PSELSCL_A) -> Self { - variant as _ - } -} -impl PSELSCL_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> Option { - match self.bits { - 4294967295 => Some(PSELSCL_A::DISCONNECTED), - _ => None, - } - } - #[doc = "Checks if the value of the field is `DISCONNECTED`"] - #[inline(always)] - pub fn is_disconnected(&self) -> bool { - *self == PSELSCL_A::DISCONNECTED - } -} -#[doc = "Field `PSELSCL` writer - Pin number configuration for TWI SCL signal"] -pub type PSELSCL_W<'a, const O: u8> = - crate::FieldWriter<'a, u32, PSELSCL_SPEC, u32, PSELSCL_A, 32, O>; -impl<'a, const O: u8> PSELSCL_W<'a, O> { - #[doc = "Disconnect"] - #[inline(always)] - pub fn disconnected(self) -> &'a mut W { - self.variant(PSELSCL_A::DISCONNECTED) - } -} -impl R { - #[doc = "Bits 0:31 - Pin number configuration for TWI SCL signal"] - #[inline(always)] - pub fn pselscl(&self) -> PSELSCL_R { - PSELSCL_R::new(self.bits) - } -} -impl W { - #[doc = "Bits 0:31 - Pin number configuration for TWI SCL signal"] - #[inline(always)] - #[must_use] - pub fn pselscl(&mut self) -> PSELSCL_W<0> { - PSELSCL_W::new(self) - } - #[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 = "Pin select for SCL\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 [pselscl](index.html) module"] -pub struct PSELSCL_SPEC; -impl crate::RegisterSpec for PSELSCL_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [pselscl::R](R) reader structure"] -impl crate::Readable for PSELSCL_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [pselscl::W](W) writer structure"] -impl crate::Writable for PSELSCL_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets PSELSCL to value 0xffff_ffff"] -impl crate::Resettable for PSELSCL_SPEC { - const RESET_VALUE: Self::Ux = 0xffff_ffff; -} diff --git a/down-the-stack/dk_pac/src/twi0/pselsda.rs b/down-the-stack/dk_pac/src/twi0/pselsda.rs deleted file mode 100644 index c8b2a71..0000000 --- a/down-the-stack/dk_pac/src/twi0/pselsda.rs +++ /dev/null @@ -1,116 +0,0 @@ -#[doc = "Register `PSELSDA` 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 `PSELSDA` 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 `PSELSDA` reader - Pin number configuration for TWI SDA signal"] -pub type PSELSDA_R = crate::FieldReader; -#[doc = "Pin number configuration for TWI SDA signal\n\nValue on reset: 4294967295"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -#[repr(u32)] -pub enum PSELSDA_A { - #[doc = "4294967295: Disconnect"] - DISCONNECTED = 4294967295, -} -impl From for u32 { - #[inline(always)] - fn from(variant: PSELSDA_A) -> Self { - variant as _ - } -} -impl PSELSDA_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> Option { - match self.bits { - 4294967295 => Some(PSELSDA_A::DISCONNECTED), - _ => None, - } - } - #[doc = "Checks if the value of the field is `DISCONNECTED`"] - #[inline(always)] - pub fn is_disconnected(&self) -> bool { - *self == PSELSDA_A::DISCONNECTED - } -} -#[doc = "Field `PSELSDA` writer - Pin number configuration for TWI SDA signal"] -pub type PSELSDA_W<'a, const O: u8> = - crate::FieldWriter<'a, u32, PSELSDA_SPEC, u32, PSELSDA_A, 32, O>; -impl<'a, const O: u8> PSELSDA_W<'a, O> { - #[doc = "Disconnect"] - #[inline(always)] - pub fn disconnected(self) -> &'a mut W { - self.variant(PSELSDA_A::DISCONNECTED) - } -} -impl R { - #[doc = "Bits 0:31 - Pin number configuration for TWI SDA signal"] - #[inline(always)] - pub fn pselsda(&self) -> PSELSDA_R { - PSELSDA_R::new(self.bits) - } -} -impl W { - #[doc = "Bits 0:31 - Pin number configuration for TWI SDA signal"] - #[inline(always)] - #[must_use] - pub fn pselsda(&mut self) -> PSELSDA_W<0> { - PSELSDA_W::new(self) - } - #[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 = "Pin select for SDA\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 [pselsda](index.html) module"] -pub struct PSELSDA_SPEC; -impl crate::RegisterSpec for PSELSDA_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [pselsda::R](R) reader structure"] -impl crate::Readable for PSELSDA_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [pselsda::W](W) writer structure"] -impl crate::Writable for PSELSDA_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets PSELSDA to value 0xffff_ffff"] -impl crate::Resettable for PSELSDA_SPEC { - const RESET_VALUE: Self::Ux = 0xffff_ffff; -} diff --git a/down-the-stack/dk_pac/src/twi0/rxd.rs b/down-the-stack/dk_pac/src/twi0/rxd.rs deleted file mode 100644 index 627ab0d..0000000 --- a/down-the-stack/dk_pac/src/twi0/rxd.rs +++ /dev/null @@ -1,37 +0,0 @@ -#[doc = "Register `RXD` 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 = "Field `RXD` reader - RXD register"] -pub type RXD_R = crate::FieldReader; -impl R { - #[doc = "Bits 0:7 - RXD register"] - #[inline(always)] - pub fn rxd(&self) -> RXD_R { - RXD_R::new((self.bits & 0xff) as u8) - } -} -#[doc = "RXD register\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 [rxd](index.html) module"] -pub struct RXD_SPEC; -impl crate::RegisterSpec for RXD_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [rxd::R](R) reader structure"] -impl crate::Readable for RXD_SPEC { - type Reader = R; -} -#[doc = "`reset()` method sets RXD to value 0"] -impl crate::Resettable for RXD_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/twi0/shorts.rs b/down-the-stack/dk_pac/src/twi0/shorts.rs deleted file mode 100644 index 62d4477..0000000 --- a/down-the-stack/dk_pac/src/twi0/shorts.rs +++ /dev/null @@ -1,187 +0,0 @@ -#[doc = "Register `SHORTS` 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 `SHORTS` 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 `BB_SUSPEND` reader - Shortcut between event BB and task SUSPEND"] -pub type BB_SUSPEND_R = crate::BitReader; -#[doc = "Shortcut between event BB and task SUSPEND\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum BB_SUSPEND_A { - #[doc = "0: Disable shortcut"] - DISABLED = 0, - #[doc = "1: Enable shortcut"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: BB_SUSPEND_A) -> Self { - variant as u8 != 0 - } -} -impl BB_SUSPEND_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> BB_SUSPEND_A { - match self.bits { - false => BB_SUSPEND_A::DISABLED, - true => BB_SUSPEND_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == BB_SUSPEND_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == BB_SUSPEND_A::ENABLED - } -} -#[doc = "Field `BB_SUSPEND` writer - Shortcut between event BB and task SUSPEND"] -pub type BB_SUSPEND_W<'a, const O: u8> = crate::BitWriter<'a, u32, SHORTS_SPEC, BB_SUSPEND_A, O>; -impl<'a, const O: u8> BB_SUSPEND_W<'a, O> { - #[doc = "Disable shortcut"] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(BB_SUSPEND_A::DISABLED) - } - #[doc = "Enable shortcut"] - #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(BB_SUSPEND_A::ENABLED) - } -} -#[doc = "Field `BB_STOP` reader - Shortcut between event BB and task STOP"] -pub type BB_STOP_R = crate::BitReader; -#[doc = "Shortcut between event BB and task STOP\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum BB_STOP_A { - #[doc = "0: Disable shortcut"] - DISABLED = 0, - #[doc = "1: Enable shortcut"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: BB_STOP_A) -> Self { - variant as u8 != 0 - } -} -impl BB_STOP_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> BB_STOP_A { - match self.bits { - false => BB_STOP_A::DISABLED, - true => BB_STOP_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == BB_STOP_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == BB_STOP_A::ENABLED - } -} -#[doc = "Field `BB_STOP` writer - Shortcut between event BB and task STOP"] -pub type BB_STOP_W<'a, const O: u8> = crate::BitWriter<'a, u32, SHORTS_SPEC, BB_STOP_A, O>; -impl<'a, const O: u8> BB_STOP_W<'a, O> { - #[doc = "Disable shortcut"] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(BB_STOP_A::DISABLED) - } - #[doc = "Enable shortcut"] - #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(BB_STOP_A::ENABLED) - } -} -impl R { - #[doc = "Bit 0 - Shortcut between event BB and task SUSPEND"] - #[inline(always)] - pub fn bb_suspend(&self) -> BB_SUSPEND_R { - BB_SUSPEND_R::new((self.bits & 1) != 0) - } - #[doc = "Bit 1 - Shortcut between event BB and task STOP"] - #[inline(always)] - pub fn bb_stop(&self) -> BB_STOP_R { - BB_STOP_R::new(((self.bits >> 1) & 1) != 0) - } -} -impl W { - #[doc = "Bit 0 - Shortcut between event BB and task SUSPEND"] - #[inline(always)] - #[must_use] - pub fn bb_suspend(&mut self) -> BB_SUSPEND_W<0> { - BB_SUSPEND_W::new(self) - } - #[doc = "Bit 1 - Shortcut between event BB and task STOP"] - #[inline(always)] - #[must_use] - pub fn bb_stop(&mut self) -> BB_STOP_W<1> { - BB_STOP_W::new(self) - } - #[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 = "Shortcuts between local events and tasks\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 [shorts](index.html) module"] -pub struct SHORTS_SPEC; -impl crate::RegisterSpec for SHORTS_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [shorts::R](R) reader structure"] -impl crate::Readable for SHORTS_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [shorts::W](W) writer structure"] -impl crate::Writable for SHORTS_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets SHORTS to value 0"] -impl crate::Resettable for SHORTS_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/twi0/tasks_resume.rs b/down-the-stack/dk_pac/src/twi0/tasks_resume.rs deleted file mode 100644 index 47f0633..0000000 --- a/down-the-stack/dk_pac/src/twi0/tasks_resume.rs +++ /dev/null @@ -1,72 +0,0 @@ -#[doc = "Register `TASKS_RESUME` 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 = "Resume TWI transaction\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum TASKS_RESUME_AW { - #[doc = "1: Trigger task"] - TRIGGER = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: TASKS_RESUME_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `TASKS_RESUME` writer - Resume TWI transaction"] -pub type TASKS_RESUME_W<'a, const O: u8> = - crate::BitWriter<'a, u32, TASKS_RESUME_SPEC, TASKS_RESUME_AW, O>; -impl<'a, const O: u8> TASKS_RESUME_W<'a, O> { - #[doc = "Trigger task"] - #[inline(always)] - pub fn trigger(self) -> &'a mut W { - self.variant(TASKS_RESUME_AW::TRIGGER) - } -} -impl W { - #[doc = "Bit 0 - Resume TWI transaction"] - #[inline(always)] - #[must_use] - pub fn tasks_resume(&mut self) -> TASKS_RESUME_W<0> { - TASKS_RESUME_W::new(self) - } - #[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 = "Resume TWI transaction\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 [tasks_resume](index.html) module"] -pub struct TASKS_RESUME_SPEC; -impl crate::RegisterSpec for TASKS_RESUME_SPEC { - type Ux = u32; -} -#[doc = "`write(|w| ..)` method takes [tasks_resume::W](W) writer structure"] -impl crate::Writable for TASKS_RESUME_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets TASKS_RESUME to value 0"] -impl crate::Resettable for TASKS_RESUME_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/twi0/tasks_startrx.rs b/down-the-stack/dk_pac/src/twi0/tasks_startrx.rs deleted file mode 100644 index c090f10..0000000 --- a/down-the-stack/dk_pac/src/twi0/tasks_startrx.rs +++ /dev/null @@ -1,72 +0,0 @@ -#[doc = "Register `TASKS_STARTRX` 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 = "Start TWI receive sequence\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum TASKS_STARTRX_AW { - #[doc = "1: Trigger task"] - TRIGGER = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: TASKS_STARTRX_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `TASKS_STARTRX` writer - Start TWI receive sequence"] -pub type TASKS_STARTRX_W<'a, const O: u8> = - crate::BitWriter<'a, u32, TASKS_STARTRX_SPEC, TASKS_STARTRX_AW, O>; -impl<'a, const O: u8> TASKS_STARTRX_W<'a, O> { - #[doc = "Trigger task"] - #[inline(always)] - pub fn trigger(self) -> &'a mut W { - self.variant(TASKS_STARTRX_AW::TRIGGER) - } -} -impl W { - #[doc = "Bit 0 - Start TWI receive sequence"] - #[inline(always)] - #[must_use] - pub fn tasks_startrx(&mut self) -> TASKS_STARTRX_W<0> { - TASKS_STARTRX_W::new(self) - } - #[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 = "Start TWI receive sequence\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 [tasks_startrx](index.html) module"] -pub struct TASKS_STARTRX_SPEC; -impl crate::RegisterSpec for TASKS_STARTRX_SPEC { - type Ux = u32; -} -#[doc = "`write(|w| ..)` method takes [tasks_startrx::W](W) writer structure"] -impl crate::Writable for TASKS_STARTRX_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets TASKS_STARTRX to value 0"] -impl crate::Resettable for TASKS_STARTRX_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/twi0/tasks_starttx.rs b/down-the-stack/dk_pac/src/twi0/tasks_starttx.rs deleted file mode 100644 index a012c7b..0000000 --- a/down-the-stack/dk_pac/src/twi0/tasks_starttx.rs +++ /dev/null @@ -1,72 +0,0 @@ -#[doc = "Register `TASKS_STARTTX` 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 = "Start TWI transmit sequence\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum TASKS_STARTTX_AW { - #[doc = "1: Trigger task"] - TRIGGER = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: TASKS_STARTTX_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `TASKS_STARTTX` writer - Start TWI transmit sequence"] -pub type TASKS_STARTTX_W<'a, const O: u8> = - crate::BitWriter<'a, u32, TASKS_STARTTX_SPEC, TASKS_STARTTX_AW, O>; -impl<'a, const O: u8> TASKS_STARTTX_W<'a, O> { - #[doc = "Trigger task"] - #[inline(always)] - pub fn trigger(self) -> &'a mut W { - self.variant(TASKS_STARTTX_AW::TRIGGER) - } -} -impl W { - #[doc = "Bit 0 - Start TWI transmit sequence"] - #[inline(always)] - #[must_use] - pub fn tasks_starttx(&mut self) -> TASKS_STARTTX_W<0> { - TASKS_STARTTX_W::new(self) - } - #[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 = "Start TWI transmit sequence\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 [tasks_starttx](index.html) module"] -pub struct TASKS_STARTTX_SPEC; -impl crate::RegisterSpec for TASKS_STARTTX_SPEC { - type Ux = u32; -} -#[doc = "`write(|w| ..)` method takes [tasks_starttx::W](W) writer structure"] -impl crate::Writable for TASKS_STARTTX_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets TASKS_STARTTX to value 0"] -impl crate::Resettable for TASKS_STARTTX_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/twi0/tasks_stop.rs b/down-the-stack/dk_pac/src/twi0/tasks_stop.rs deleted file mode 100644 index 7358178..0000000 --- a/down-the-stack/dk_pac/src/twi0/tasks_stop.rs +++ /dev/null @@ -1,72 +0,0 @@ -#[doc = "Register `TASKS_STOP` 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 = "Stop TWI transaction\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum TASKS_STOP_AW { - #[doc = "1: Trigger task"] - TRIGGER = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: TASKS_STOP_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `TASKS_STOP` writer - Stop TWI transaction"] -pub type TASKS_STOP_W<'a, const O: u8> = - crate::BitWriter<'a, u32, TASKS_STOP_SPEC, TASKS_STOP_AW, O>; -impl<'a, const O: u8> TASKS_STOP_W<'a, O> { - #[doc = "Trigger task"] - #[inline(always)] - pub fn trigger(self) -> &'a mut W { - self.variant(TASKS_STOP_AW::TRIGGER) - } -} -impl W { - #[doc = "Bit 0 - Stop TWI transaction"] - #[inline(always)] - #[must_use] - pub fn tasks_stop(&mut self) -> TASKS_STOP_W<0> { - TASKS_STOP_W::new(self) - } - #[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 = "Stop TWI transaction\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 [tasks_stop](index.html) module"] -pub struct TASKS_STOP_SPEC; -impl crate::RegisterSpec for TASKS_STOP_SPEC { - type Ux = u32; -} -#[doc = "`write(|w| ..)` method takes [tasks_stop::W](W) writer structure"] -impl crate::Writable for TASKS_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 TASKS_STOP to value 0"] -impl crate::Resettable for TASKS_STOP_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/twi0/tasks_suspend.rs b/down-the-stack/dk_pac/src/twi0/tasks_suspend.rs deleted file mode 100644 index ae6f325..0000000 --- a/down-the-stack/dk_pac/src/twi0/tasks_suspend.rs +++ /dev/null @@ -1,72 +0,0 @@ -#[doc = "Register `TASKS_SUSPEND` 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 = "Suspend TWI transaction\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum TASKS_SUSPEND_AW { - #[doc = "1: Trigger task"] - TRIGGER = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: TASKS_SUSPEND_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `TASKS_SUSPEND` writer - Suspend TWI transaction"] -pub type TASKS_SUSPEND_W<'a, const O: u8> = - crate::BitWriter<'a, u32, TASKS_SUSPEND_SPEC, TASKS_SUSPEND_AW, O>; -impl<'a, const O: u8> TASKS_SUSPEND_W<'a, O> { - #[doc = "Trigger task"] - #[inline(always)] - pub fn trigger(self) -> &'a mut W { - self.variant(TASKS_SUSPEND_AW::TRIGGER) - } -} -impl W { - #[doc = "Bit 0 - Suspend TWI transaction"] - #[inline(always)] - #[must_use] - pub fn tasks_suspend(&mut self) -> TASKS_SUSPEND_W<0> { - TASKS_SUSPEND_W::new(self) - } - #[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 = "Suspend TWI transaction\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 [tasks_suspend](index.html) module"] -pub struct TASKS_SUSPEND_SPEC; -impl crate::RegisterSpec for TASKS_SUSPEND_SPEC { - type Ux = u32; -} -#[doc = "`write(|w| ..)` method takes [tasks_suspend::W](W) writer structure"] -impl crate::Writable for TASKS_SUSPEND_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets TASKS_SUSPEND to value 0"] -impl crate::Resettable for TASKS_SUSPEND_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/twi0/txd.rs b/down-the-stack/dk_pac/src/twi0/txd.rs deleted file mode 100644 index 4e9ee52..0000000 --- a/down-the-stack/dk_pac/src/twi0/txd.rs +++ /dev/null @@ -1,80 +0,0 @@ -#[doc = "Register `TXD` 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 `TXD` 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 `TXD` reader - TXD register"] -pub type TXD_R = crate::FieldReader; -#[doc = "Field `TXD` writer - TXD register"] -pub type TXD_W<'a, const O: u8> = crate::FieldWriter<'a, u32, TXD_SPEC, u8, u8, 8, O>; -impl R { - #[doc = "Bits 0:7 - TXD register"] - #[inline(always)] - pub fn txd(&self) -> TXD_R { - TXD_R::new((self.bits & 0xff) as u8) - } -} -impl W { - #[doc = "Bits 0:7 - TXD register"] - #[inline(always)] - #[must_use] - pub fn txd(&mut self) -> TXD_W<0> { - TXD_W::new(self) - } - #[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 = "TXD register\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 [txd](index.html) module"] -pub struct TXD_SPEC; -impl crate::RegisterSpec for TXD_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [txd::R](R) reader structure"] -impl crate::Readable for TXD_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [txd::W](W) writer structure"] -impl crate::Writable for TXD_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets TXD to value 0"] -impl crate::Resettable for TXD_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/twim0.rs b/down-the-stack/dk_pac/src/twim0.rs deleted file mode 100644 index 66fed19..0000000 --- a/down-the-stack/dk_pac/src/twim0.rs +++ /dev/null @@ -1,160 +0,0 @@ -#[doc = r"Register block"] -#[repr(C)] -pub struct RegisterBlock { - #[doc = "0x00 - Start TWI receive sequence"] - pub tasks_startrx: TASKS_STARTRX, - _reserved1: [u8; 0x04], - #[doc = "0x08 - Start TWI transmit sequence"] - pub tasks_starttx: TASKS_STARTTX, - _reserved2: [u8; 0x08], - #[doc = "0x14 - Stop TWI transaction. Must be issued while the TWI master is not suspended."] - pub tasks_stop: TASKS_STOP, - _reserved3: [u8; 0x04], - #[doc = "0x1c - Suspend TWI transaction"] - pub tasks_suspend: TASKS_SUSPEND, - #[doc = "0x20 - Resume TWI transaction"] - pub tasks_resume: TASKS_RESUME, - _reserved5: [u8; 0xe0], - #[doc = "0x104 - TWI stopped"] - pub events_stopped: EVENTS_STOPPED, - _reserved6: [u8; 0x1c], - #[doc = "0x124 - TWI error"] - pub events_error: EVENTS_ERROR, - _reserved7: [u8; 0x20], - #[doc = "0x148 - Last byte has been sent out after the SUSPEND task has been issued, TWI traffic is now suspended."] - pub events_suspended: EVENTS_SUSPENDED, - #[doc = "0x14c - Receive sequence started"] - pub events_rxstarted: EVENTS_RXSTARTED, - #[doc = "0x150 - Transmit sequence started"] - pub events_txstarted: EVENTS_TXSTARTED, - _reserved10: [u8; 0x08], - #[doc = "0x15c - Byte boundary, starting to receive the last byte"] - pub events_lastrx: EVENTS_LASTRX, - #[doc = "0x160 - Byte boundary, starting to transmit the last byte"] - pub events_lasttx: EVENTS_LASTTX, - _reserved12: [u8; 0x9c], - #[doc = "0x200 - Shortcuts between local events and tasks"] - pub shorts: SHORTS, - _reserved13: [u8; 0xfc], - #[doc = "0x300 - Enable or disable interrupt"] - pub inten: INTEN, - #[doc = "0x304 - Enable interrupt"] - pub intenset: INTENSET, - #[doc = "0x308 - Disable interrupt"] - pub intenclr: INTENCLR, - _reserved16: [u8; 0x01b8], - #[doc = "0x4c4 - Error source"] - pub errorsrc: ERRORSRC, - _reserved17: [u8; 0x38], - #[doc = "0x500 - Enable TWIM"] - pub enable: ENABLE, - _reserved18: [u8; 0x04], - #[doc = "0x508..0x510 - Unspecified"] - pub psel: PSEL, - _reserved19: [u8; 0x14], - #[doc = "0x524 - TWI frequency"] - pub frequency: FREQUENCY, - _reserved20: [u8; 0x0c], - #[doc = "0x534..0x544 - RXD EasyDMA channel"] - pub rxd: RXD, - #[doc = "0x544..0x554 - TXD EasyDMA channel"] - pub txd: TXD, - _reserved22: [u8; 0x34], - #[doc = "0x588 - Address used in the TWI transfer"] - pub address: ADDRESS, -} -#[doc = "TASKS_STARTRX (w) register accessor: an alias for `Reg`"] -pub type TASKS_STARTRX = crate::Reg; -#[doc = "Start TWI receive sequence"] -pub mod tasks_startrx; -#[doc = "TASKS_STARTTX (w) register accessor: an alias for `Reg`"] -pub type TASKS_STARTTX = crate::Reg; -#[doc = "Start TWI transmit sequence"] -pub mod tasks_starttx; -#[doc = "TASKS_STOP (w) register accessor: an alias for `Reg`"] -pub type TASKS_STOP = crate::Reg; -#[doc = "Stop TWI transaction. Must be issued while the TWI master is not suspended."] -pub mod tasks_stop; -#[doc = "TASKS_SUSPEND (w) register accessor: an alias for `Reg`"] -pub type TASKS_SUSPEND = crate::Reg; -#[doc = "Suspend TWI transaction"] -pub mod tasks_suspend; -#[doc = "TASKS_RESUME (w) register accessor: an alias for `Reg`"] -pub type TASKS_RESUME = crate::Reg; -#[doc = "Resume TWI transaction"] -pub mod tasks_resume; -#[doc = "EVENTS_STOPPED (rw) register accessor: an alias for `Reg`"] -pub type EVENTS_STOPPED = crate::Reg; -#[doc = "TWI stopped"] -pub mod events_stopped; -#[doc = "EVENTS_ERROR (rw) register accessor: an alias for `Reg`"] -pub type EVENTS_ERROR = crate::Reg; -#[doc = "TWI error"] -pub mod events_error; -#[doc = "EVENTS_SUSPENDED (rw) register accessor: an alias for `Reg`"] -pub type EVENTS_SUSPENDED = crate::Reg; -#[doc = "Last byte has been sent out after the SUSPEND task has been issued, TWI traffic is now suspended."] -pub mod events_suspended; -#[doc = "EVENTS_RXSTARTED (rw) register accessor: an alias for `Reg`"] -pub type EVENTS_RXSTARTED = crate::Reg; -#[doc = "Receive sequence started"] -pub mod events_rxstarted; -#[doc = "EVENTS_TXSTARTED (rw) register accessor: an alias for `Reg`"] -pub type EVENTS_TXSTARTED = crate::Reg; -#[doc = "Transmit sequence started"] -pub mod events_txstarted; -#[doc = "EVENTS_LASTRX (rw) register accessor: an alias for `Reg`"] -pub type EVENTS_LASTRX = crate::Reg; -#[doc = "Byte boundary, starting to receive the last byte"] -pub mod events_lastrx; -#[doc = "EVENTS_LASTTX (rw) register accessor: an alias for `Reg`"] -pub type EVENTS_LASTTX = crate::Reg; -#[doc = "Byte boundary, starting to transmit the last byte"] -pub mod events_lasttx; -#[doc = "SHORTS (rw) register accessor: an alias for `Reg`"] -pub type SHORTS = crate::Reg; -#[doc = "Shortcuts between local events and tasks"] -pub mod shorts; -#[doc = "INTEN (rw) register accessor: an alias for `Reg`"] -pub type INTEN = crate::Reg; -#[doc = "Enable or disable interrupt"] -pub mod inten; -#[doc = "INTENSET (rw) register accessor: an alias for `Reg`"] -pub type INTENSET = crate::Reg; -#[doc = "Enable interrupt"] -pub mod intenset; -#[doc = "INTENCLR (rw) register accessor: an alias for `Reg`"] -pub type INTENCLR = crate::Reg; -#[doc = "Disable interrupt"] -pub mod intenclr; -#[doc = "ERRORSRC (rw) register accessor: an alias for `Reg`"] -pub type ERRORSRC = crate::Reg; -#[doc = "Error source"] -pub mod errorsrc; -#[doc = "ENABLE (rw) register accessor: an alias for `Reg`"] -pub type ENABLE = crate::Reg; -#[doc = "Enable TWIM"] -pub mod enable; -#[doc = "Unspecified"] -pub use self::psel::PSEL; -#[doc = r"Cluster"] -#[doc = "Unspecified"] -pub mod psel; -#[doc = "FREQUENCY (rw) register accessor: an alias for `Reg`"] -pub type FREQUENCY = crate::Reg; -#[doc = "TWI frequency"] -pub mod frequency; -#[doc = "RXD EasyDMA channel"] -pub use self::rxd::RXD; -#[doc = r"Cluster"] -#[doc = "RXD EasyDMA channel"] -pub mod rxd; -#[doc = "TXD EasyDMA channel"] -pub use self::txd::TXD; -#[doc = r"Cluster"] -#[doc = "TXD EasyDMA channel"] -pub mod txd; -#[doc = "ADDRESS (rw) register accessor: an alias for `Reg`"] -pub type ADDRESS = crate::Reg; -#[doc = "Address used in the TWI transfer"] -pub mod address; diff --git a/down-the-stack/dk_pac/src/twim0/address.rs b/down-the-stack/dk_pac/src/twim0/address.rs deleted file mode 100644 index 67780ec..0000000 --- a/down-the-stack/dk_pac/src/twim0/address.rs +++ /dev/null @@ -1,80 +0,0 @@ -#[doc = "Register `ADDRESS` 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 `ADDRESS` 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 `ADDRESS` reader - Address used in the TWI transfer"] -pub type ADDRESS_R = crate::FieldReader; -#[doc = "Field `ADDRESS` writer - Address used in the TWI transfer"] -pub type ADDRESS_W<'a, const O: u8> = crate::FieldWriter<'a, u32, ADDRESS_SPEC, u8, u8, 7, O>; -impl R { - #[doc = "Bits 0:6 - Address used in the TWI transfer"] - #[inline(always)] - pub fn address(&self) -> ADDRESS_R { - ADDRESS_R::new((self.bits & 0x7f) as u8) - } -} -impl W { - #[doc = "Bits 0:6 - Address used in the TWI transfer"] - #[inline(always)] - #[must_use] - pub fn address(&mut self) -> ADDRESS_W<0> { - ADDRESS_W::new(self) - } - #[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 = "Address used in the TWI transfer\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 [address](index.html) module"] -pub struct ADDRESS_SPEC; -impl crate::RegisterSpec for ADDRESS_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [address::R](R) reader structure"] -impl crate::Readable for ADDRESS_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [address::W](W) writer structure"] -impl crate::Writable for ADDRESS_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets ADDRESS to value 0"] -impl crate::Resettable for ADDRESS_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/twim0/enable.rs b/down-the-stack/dk_pac/src/twim0/enable.rs deleted file mode 100644 index 27e5ed6..0000000 --- a/down-the-stack/dk_pac/src/twim0/enable.rs +++ /dev/null @@ -1,128 +0,0 @@ -#[doc = "Register `ENABLE` 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 `ENABLE` 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 `ENABLE` reader - Enable or disable TWIM"] -pub type ENABLE_R = crate::FieldReader; -#[doc = "Enable or disable TWIM\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -#[repr(u8)] -pub enum ENABLE_A { - #[doc = "0: Disable TWIM"] - DISABLED = 0, - #[doc = "6: Enable TWIM"] - ENABLED = 6, -} -impl From for u8 { - #[inline(always)] - fn from(variant: ENABLE_A) -> Self { - variant as _ - } -} -impl ENABLE_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> Option { - match self.bits { - 0 => Some(ENABLE_A::DISABLED), - 6 => Some(ENABLE_A::ENABLED), - _ => None, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == ENABLE_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == ENABLE_A::ENABLED - } -} -#[doc = "Field `ENABLE` writer - Enable or disable TWIM"] -pub type ENABLE_W<'a, const O: u8> = crate::FieldWriter<'a, u32, ENABLE_SPEC, u8, ENABLE_A, 4, O>; -impl<'a, const O: u8> ENABLE_W<'a, O> { - #[doc = "Disable TWIM"] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(ENABLE_A::DISABLED) - } - #[doc = "Enable TWIM"] - #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(ENABLE_A::ENABLED) - } -} -impl R { - #[doc = "Bits 0:3 - Enable or disable TWIM"] - #[inline(always)] - pub fn enable(&self) -> ENABLE_R { - ENABLE_R::new((self.bits & 0x0f) as u8) - } -} -impl W { - #[doc = "Bits 0:3 - Enable or disable TWIM"] - #[inline(always)] - #[must_use] - pub fn enable(&mut self) -> ENABLE_W<0> { - 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 - } -} -#[doc = "Enable TWIM\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 [enable](index.html) module"] -pub struct ENABLE_SPEC; -impl crate::RegisterSpec for ENABLE_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [enable::R](R) reader structure"] -impl crate::Readable for ENABLE_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [enable::W](W) writer structure"] -impl crate::Writable for ENABLE_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets ENABLE to value 0"] -impl crate::Resettable for ENABLE_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/twim0/errorsrc.rs b/down-the-stack/dk_pac/src/twim0/errorsrc.rs deleted file mode 100644 index 0a10452..0000000 --- a/down-the-stack/dk_pac/src/twim0/errorsrc.rs +++ /dev/null @@ -1,248 +0,0 @@ -#[doc = "Register `ERRORSRC` 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 `ERRORSRC` 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 `OVERRUN` reader - Overrun error"] -pub type OVERRUN_R = crate::BitReader; -#[doc = "Overrun error\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum OVERRUN_A { - #[doc = "0: Error did not occur"] - NOT_RECEIVED = 0, - #[doc = "1: Error occurred"] - RECEIVED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: OVERRUN_A) -> Self { - variant as u8 != 0 - } -} -impl OVERRUN_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> OVERRUN_A { - match self.bits { - false => OVERRUN_A::NOT_RECEIVED, - true => OVERRUN_A::RECEIVED, - } - } - #[doc = "Checks if the value of the field is `NOT_RECEIVED`"] - #[inline(always)] - pub fn is_not_received(&self) -> bool { - *self == OVERRUN_A::NOT_RECEIVED - } - #[doc = "Checks if the value of the field is `RECEIVED`"] - #[inline(always)] - pub fn is_received(&self) -> bool { - *self == OVERRUN_A::RECEIVED - } -} -#[doc = "Field `OVERRUN` writer - Overrun error"] -pub type OVERRUN_W<'a, const O: u8> = crate::BitWriter1C<'a, u32, ERRORSRC_SPEC, OVERRUN_A, O>; -impl<'a, const O: u8> OVERRUN_W<'a, O> { - #[doc = "Error did not occur"] - #[inline(always)] - pub fn not_received(self) -> &'a mut W { - self.variant(OVERRUN_A::NOT_RECEIVED) - } - #[doc = "Error occurred"] - #[inline(always)] - pub fn received(self) -> &'a mut W { - self.variant(OVERRUN_A::RECEIVED) - } -} -#[doc = "Field `ANACK` reader - NACK received after sending the address (write '1' to clear)"] -pub type ANACK_R = crate::BitReader; -#[doc = "NACK received after sending the address (write '1' to clear)\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum ANACK_A { - #[doc = "0: Error did not occur"] - NOT_RECEIVED = 0, - #[doc = "1: Error occurred"] - RECEIVED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: ANACK_A) -> Self { - variant as u8 != 0 - } -} -impl ANACK_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> ANACK_A { - match self.bits { - false => ANACK_A::NOT_RECEIVED, - true => ANACK_A::RECEIVED, - } - } - #[doc = "Checks if the value of the field is `NOT_RECEIVED`"] - #[inline(always)] - pub fn is_not_received(&self) -> bool { - *self == ANACK_A::NOT_RECEIVED - } - #[doc = "Checks if the value of the field is `RECEIVED`"] - #[inline(always)] - pub fn is_received(&self) -> bool { - *self == ANACK_A::RECEIVED - } -} -#[doc = "Field `ANACK` writer - NACK received after sending the address (write '1' to clear)"] -pub type ANACK_W<'a, const O: u8> = crate::BitWriter1C<'a, u32, ERRORSRC_SPEC, ANACK_A, O>; -impl<'a, const O: u8> ANACK_W<'a, O> { - #[doc = "Error did not occur"] - #[inline(always)] - pub fn not_received(self) -> &'a mut W { - self.variant(ANACK_A::NOT_RECEIVED) - } - #[doc = "Error occurred"] - #[inline(always)] - pub fn received(self) -> &'a mut W { - self.variant(ANACK_A::RECEIVED) - } -} -#[doc = "Field `DNACK` reader - NACK received after sending a data byte (write '1' to clear)"] -pub type DNACK_R = crate::BitReader; -#[doc = "NACK received after sending a data byte (write '1' to clear)\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum DNACK_A { - #[doc = "0: Error did not occur"] - NOT_RECEIVED = 0, - #[doc = "1: Error occurred"] - RECEIVED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: DNACK_A) -> Self { - variant as u8 != 0 - } -} -impl DNACK_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> DNACK_A { - match self.bits { - false => DNACK_A::NOT_RECEIVED, - true => DNACK_A::RECEIVED, - } - } - #[doc = "Checks if the value of the field is `NOT_RECEIVED`"] - #[inline(always)] - pub fn is_not_received(&self) -> bool { - *self == DNACK_A::NOT_RECEIVED - } - #[doc = "Checks if the value of the field is `RECEIVED`"] - #[inline(always)] - pub fn is_received(&self) -> bool { - *self == DNACK_A::RECEIVED - } -} -#[doc = "Field `DNACK` writer - NACK received after sending a data byte (write '1' to clear)"] -pub type DNACK_W<'a, const O: u8> = crate::BitWriter1C<'a, u32, ERRORSRC_SPEC, DNACK_A, O>; -impl<'a, const O: u8> DNACK_W<'a, O> { - #[doc = "Error did not occur"] - #[inline(always)] - pub fn not_received(self) -> &'a mut W { - self.variant(DNACK_A::NOT_RECEIVED) - } - #[doc = "Error occurred"] - #[inline(always)] - pub fn received(self) -> &'a mut W { - self.variant(DNACK_A::RECEIVED) - } -} -impl R { - #[doc = "Bit 0 - Overrun error"] - #[inline(always)] - pub fn overrun(&self) -> OVERRUN_R { - OVERRUN_R::new((self.bits & 1) != 0) - } - #[doc = "Bit 1 - NACK received after sending the address (write '1' to clear)"] - #[inline(always)] - pub fn anack(&self) -> ANACK_R { - ANACK_R::new(((self.bits >> 1) & 1) != 0) - } - #[doc = "Bit 2 - NACK received after sending a data byte (write '1' to clear)"] - #[inline(always)] - pub fn dnack(&self) -> DNACK_R { - DNACK_R::new(((self.bits >> 2) & 1) != 0) - } -} -impl W { - #[doc = "Bit 0 - Overrun error"] - #[inline(always)] - #[must_use] - pub fn overrun(&mut self) -> OVERRUN_W<0> { - OVERRUN_W::new(self) - } - #[doc = "Bit 1 - NACK received after sending the address (write '1' to clear)"] - #[inline(always)] - #[must_use] - pub fn anack(&mut self) -> ANACK_W<1> { - ANACK_W::new(self) - } - #[doc = "Bit 2 - NACK received after sending a data byte (write '1' to clear)"] - #[inline(always)] - #[must_use] - pub fn dnack(&mut self) -> DNACK_W<2> { - DNACK_W::new(self) - } - #[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 = "Error source\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 [errorsrc](index.html) module"] -pub struct ERRORSRC_SPEC; -impl crate::RegisterSpec for ERRORSRC_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [errorsrc::R](R) reader structure"] -impl crate::Readable for ERRORSRC_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [errorsrc::W](W) writer structure"] -impl crate::Writable for ERRORSRC_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0x07; -} -#[doc = "`reset()` method sets ERRORSRC to value 0"] -impl crate::Resettable for ERRORSRC_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/twim0/events_error.rs b/down-the-stack/dk_pac/src/twim0/events_error.rs deleted file mode 100644 index 05b214c..0000000 --- a/down-the-stack/dk_pac/src/twim0/events_error.rs +++ /dev/null @@ -1,127 +0,0 @@ -#[doc = "Register `EVENTS_ERROR` 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 `EVENTS_ERROR` 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 `EVENTS_ERROR` reader - TWI error"] -pub type EVENTS_ERROR_R = crate::BitReader; -#[doc = "TWI error\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum EVENTS_ERROR_A { - #[doc = "0: Event not generated"] - NOT_GENERATED = 0, - #[doc = "1: Event generated"] - GENERATED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: EVENTS_ERROR_A) -> Self { - variant as u8 != 0 - } -} -impl EVENTS_ERROR_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> EVENTS_ERROR_A { - match self.bits { - false => EVENTS_ERROR_A::NOT_GENERATED, - true => EVENTS_ERROR_A::GENERATED, - } - } - #[doc = "Checks if the value of the field is `NOT_GENERATED`"] - #[inline(always)] - pub fn is_not_generated(&self) -> bool { - *self == EVENTS_ERROR_A::NOT_GENERATED - } - #[doc = "Checks if the value of the field is `GENERATED`"] - #[inline(always)] - pub fn is_generated(&self) -> bool { - *self == EVENTS_ERROR_A::GENERATED - } -} -#[doc = "Field `EVENTS_ERROR` writer - TWI error"] -pub type EVENTS_ERROR_W<'a, const O: u8> = - crate::BitWriter<'a, u32, EVENTS_ERROR_SPEC, EVENTS_ERROR_A, O>; -impl<'a, const O: u8> EVENTS_ERROR_W<'a, O> { - #[doc = "Event not generated"] - #[inline(always)] - pub fn not_generated(self) -> &'a mut W { - self.variant(EVENTS_ERROR_A::NOT_GENERATED) - } - #[doc = "Event generated"] - #[inline(always)] - pub fn generated(self) -> &'a mut W { - self.variant(EVENTS_ERROR_A::GENERATED) - } -} -impl R { - #[doc = "Bit 0 - TWI error"] - #[inline(always)] - pub fn events_error(&self) -> EVENTS_ERROR_R { - EVENTS_ERROR_R::new((self.bits & 1) != 0) - } -} -impl W { - #[doc = "Bit 0 - TWI error"] - #[inline(always)] - #[must_use] - pub fn events_error(&mut self) -> EVENTS_ERROR_W<0> { - EVENTS_ERROR_W::new(self) - } - #[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 = "TWI error\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 [events_error](index.html) module"] -pub struct EVENTS_ERROR_SPEC; -impl crate::RegisterSpec for EVENTS_ERROR_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [events_error::R](R) reader structure"] -impl crate::Readable for EVENTS_ERROR_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [events_error::W](W) writer structure"] -impl crate::Writable for EVENTS_ERROR_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets EVENTS_ERROR to value 0"] -impl crate::Resettable for EVENTS_ERROR_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/twim0/events_lastrx.rs b/down-the-stack/dk_pac/src/twim0/events_lastrx.rs deleted file mode 100644 index c647dd9..0000000 --- a/down-the-stack/dk_pac/src/twim0/events_lastrx.rs +++ /dev/null @@ -1,127 +0,0 @@ -#[doc = "Register `EVENTS_LASTRX` 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 `EVENTS_LASTRX` 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 `EVENTS_LASTRX` reader - Byte boundary, starting to receive the last byte"] -pub type EVENTS_LASTRX_R = crate::BitReader; -#[doc = "Byte boundary, starting to receive the last byte\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum EVENTS_LASTRX_A { - #[doc = "0: Event not generated"] - NOT_GENERATED = 0, - #[doc = "1: Event generated"] - GENERATED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: EVENTS_LASTRX_A) -> Self { - variant as u8 != 0 - } -} -impl EVENTS_LASTRX_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> EVENTS_LASTRX_A { - match self.bits { - false => EVENTS_LASTRX_A::NOT_GENERATED, - true => EVENTS_LASTRX_A::GENERATED, - } - } - #[doc = "Checks if the value of the field is `NOT_GENERATED`"] - #[inline(always)] - pub fn is_not_generated(&self) -> bool { - *self == EVENTS_LASTRX_A::NOT_GENERATED - } - #[doc = "Checks if the value of the field is `GENERATED`"] - #[inline(always)] - pub fn is_generated(&self) -> bool { - *self == EVENTS_LASTRX_A::GENERATED - } -} -#[doc = "Field `EVENTS_LASTRX` writer - Byte boundary, starting to receive the last byte"] -pub type EVENTS_LASTRX_W<'a, const O: u8> = - crate::BitWriter<'a, u32, EVENTS_LASTRX_SPEC, EVENTS_LASTRX_A, O>; -impl<'a, const O: u8> EVENTS_LASTRX_W<'a, O> { - #[doc = "Event not generated"] - #[inline(always)] - pub fn not_generated(self) -> &'a mut W { - self.variant(EVENTS_LASTRX_A::NOT_GENERATED) - } - #[doc = "Event generated"] - #[inline(always)] - pub fn generated(self) -> &'a mut W { - self.variant(EVENTS_LASTRX_A::GENERATED) - } -} -impl R { - #[doc = "Bit 0 - Byte boundary, starting to receive the last byte"] - #[inline(always)] - pub fn events_lastrx(&self) -> EVENTS_LASTRX_R { - EVENTS_LASTRX_R::new((self.bits & 1) != 0) - } -} -impl W { - #[doc = "Bit 0 - Byte boundary, starting to receive the last byte"] - #[inline(always)] - #[must_use] - pub fn events_lastrx(&mut self) -> EVENTS_LASTRX_W<0> { - EVENTS_LASTRX_W::new(self) - } - #[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 = "Byte boundary, starting to receive the last byte\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 [events_lastrx](index.html) module"] -pub struct EVENTS_LASTRX_SPEC; -impl crate::RegisterSpec for EVENTS_LASTRX_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [events_lastrx::R](R) reader structure"] -impl crate::Readable for EVENTS_LASTRX_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [events_lastrx::W](W) writer structure"] -impl crate::Writable for EVENTS_LASTRX_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets EVENTS_LASTRX to value 0"] -impl crate::Resettable for EVENTS_LASTRX_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/twim0/events_lasttx.rs b/down-the-stack/dk_pac/src/twim0/events_lasttx.rs deleted file mode 100644 index 8092a94..0000000 --- a/down-the-stack/dk_pac/src/twim0/events_lasttx.rs +++ /dev/null @@ -1,127 +0,0 @@ -#[doc = "Register `EVENTS_LASTTX` 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 `EVENTS_LASTTX` 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 `EVENTS_LASTTX` reader - Byte boundary, starting to transmit the last byte"] -pub type EVENTS_LASTTX_R = crate::BitReader; -#[doc = "Byte boundary, starting to transmit the last byte\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum EVENTS_LASTTX_A { - #[doc = "0: Event not generated"] - NOT_GENERATED = 0, - #[doc = "1: Event generated"] - GENERATED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: EVENTS_LASTTX_A) -> Self { - variant as u8 != 0 - } -} -impl EVENTS_LASTTX_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> EVENTS_LASTTX_A { - match self.bits { - false => EVENTS_LASTTX_A::NOT_GENERATED, - true => EVENTS_LASTTX_A::GENERATED, - } - } - #[doc = "Checks if the value of the field is `NOT_GENERATED`"] - #[inline(always)] - pub fn is_not_generated(&self) -> bool { - *self == EVENTS_LASTTX_A::NOT_GENERATED - } - #[doc = "Checks if the value of the field is `GENERATED`"] - #[inline(always)] - pub fn is_generated(&self) -> bool { - *self == EVENTS_LASTTX_A::GENERATED - } -} -#[doc = "Field `EVENTS_LASTTX` writer - Byte boundary, starting to transmit the last byte"] -pub type EVENTS_LASTTX_W<'a, const O: u8> = - crate::BitWriter<'a, u32, EVENTS_LASTTX_SPEC, EVENTS_LASTTX_A, O>; -impl<'a, const O: u8> EVENTS_LASTTX_W<'a, O> { - #[doc = "Event not generated"] - #[inline(always)] - pub fn not_generated(self) -> &'a mut W { - self.variant(EVENTS_LASTTX_A::NOT_GENERATED) - } - #[doc = "Event generated"] - #[inline(always)] - pub fn generated(self) -> &'a mut W { - self.variant(EVENTS_LASTTX_A::GENERATED) - } -} -impl R { - #[doc = "Bit 0 - Byte boundary, starting to transmit the last byte"] - #[inline(always)] - pub fn events_lasttx(&self) -> EVENTS_LASTTX_R { - EVENTS_LASTTX_R::new((self.bits & 1) != 0) - } -} -impl W { - #[doc = "Bit 0 - Byte boundary, starting to transmit the last byte"] - #[inline(always)] - #[must_use] - pub fn events_lasttx(&mut self) -> EVENTS_LASTTX_W<0> { - EVENTS_LASTTX_W::new(self) - } - #[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 = "Byte boundary, starting to transmit the last byte\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 [events_lasttx](index.html) module"] -pub struct EVENTS_LASTTX_SPEC; -impl crate::RegisterSpec for EVENTS_LASTTX_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [events_lasttx::R](R) reader structure"] -impl crate::Readable for EVENTS_LASTTX_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [events_lasttx::W](W) writer structure"] -impl crate::Writable for EVENTS_LASTTX_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets EVENTS_LASTTX to value 0"] -impl crate::Resettable for EVENTS_LASTTX_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/twim0/events_rxstarted.rs b/down-the-stack/dk_pac/src/twim0/events_rxstarted.rs deleted file mode 100644 index 194b098..0000000 --- a/down-the-stack/dk_pac/src/twim0/events_rxstarted.rs +++ /dev/null @@ -1,127 +0,0 @@ -#[doc = "Register `EVENTS_RXSTARTED` 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 `EVENTS_RXSTARTED` 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 `EVENTS_RXSTARTED` reader - Receive sequence started"] -pub type EVENTS_RXSTARTED_R = crate::BitReader; -#[doc = "Receive sequence started\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum EVENTS_RXSTARTED_A { - #[doc = "0: Event not generated"] - NOT_GENERATED = 0, - #[doc = "1: Event generated"] - GENERATED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: EVENTS_RXSTARTED_A) -> Self { - variant as u8 != 0 - } -} -impl EVENTS_RXSTARTED_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> EVENTS_RXSTARTED_A { - match self.bits { - false => EVENTS_RXSTARTED_A::NOT_GENERATED, - true => EVENTS_RXSTARTED_A::GENERATED, - } - } - #[doc = "Checks if the value of the field is `NOT_GENERATED`"] - #[inline(always)] - pub fn is_not_generated(&self) -> bool { - *self == EVENTS_RXSTARTED_A::NOT_GENERATED - } - #[doc = "Checks if the value of the field is `GENERATED`"] - #[inline(always)] - pub fn is_generated(&self) -> bool { - *self == EVENTS_RXSTARTED_A::GENERATED - } -} -#[doc = "Field `EVENTS_RXSTARTED` writer - Receive sequence started"] -pub type EVENTS_RXSTARTED_W<'a, const O: u8> = - crate::BitWriter<'a, u32, EVENTS_RXSTARTED_SPEC, EVENTS_RXSTARTED_A, O>; -impl<'a, const O: u8> EVENTS_RXSTARTED_W<'a, O> { - #[doc = "Event not generated"] - #[inline(always)] - pub fn not_generated(self) -> &'a mut W { - self.variant(EVENTS_RXSTARTED_A::NOT_GENERATED) - } - #[doc = "Event generated"] - #[inline(always)] - pub fn generated(self) -> &'a mut W { - self.variant(EVENTS_RXSTARTED_A::GENERATED) - } -} -impl R { - #[doc = "Bit 0 - Receive sequence started"] - #[inline(always)] - pub fn events_rxstarted(&self) -> EVENTS_RXSTARTED_R { - EVENTS_RXSTARTED_R::new((self.bits & 1) != 0) - } -} -impl W { - #[doc = "Bit 0 - Receive sequence started"] - #[inline(always)] - #[must_use] - pub fn events_rxstarted(&mut self) -> EVENTS_RXSTARTED_W<0> { - EVENTS_RXSTARTED_W::new(self) - } - #[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 = "Receive sequence started\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 [events_rxstarted](index.html) module"] -pub struct EVENTS_RXSTARTED_SPEC; -impl crate::RegisterSpec for EVENTS_RXSTARTED_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [events_rxstarted::R](R) reader structure"] -impl crate::Readable for EVENTS_RXSTARTED_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [events_rxstarted::W](W) writer structure"] -impl crate::Writable for EVENTS_RXSTARTED_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets EVENTS_RXSTARTED to value 0"] -impl crate::Resettable for EVENTS_RXSTARTED_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/twim0/events_stopped.rs b/down-the-stack/dk_pac/src/twim0/events_stopped.rs deleted file mode 100644 index 4663646..0000000 --- a/down-the-stack/dk_pac/src/twim0/events_stopped.rs +++ /dev/null @@ -1,127 +0,0 @@ -#[doc = "Register `EVENTS_STOPPED` 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 `EVENTS_STOPPED` 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 `EVENTS_STOPPED` reader - TWI stopped"] -pub type EVENTS_STOPPED_R = crate::BitReader; -#[doc = "TWI stopped\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum EVENTS_STOPPED_A { - #[doc = "0: Event not generated"] - NOT_GENERATED = 0, - #[doc = "1: Event generated"] - GENERATED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: EVENTS_STOPPED_A) -> Self { - variant as u8 != 0 - } -} -impl EVENTS_STOPPED_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> EVENTS_STOPPED_A { - match self.bits { - false => EVENTS_STOPPED_A::NOT_GENERATED, - true => EVENTS_STOPPED_A::GENERATED, - } - } - #[doc = "Checks if the value of the field is `NOT_GENERATED`"] - #[inline(always)] - pub fn is_not_generated(&self) -> bool { - *self == EVENTS_STOPPED_A::NOT_GENERATED - } - #[doc = "Checks if the value of the field is `GENERATED`"] - #[inline(always)] - pub fn is_generated(&self) -> bool { - *self == EVENTS_STOPPED_A::GENERATED - } -} -#[doc = "Field `EVENTS_STOPPED` writer - TWI stopped"] -pub type EVENTS_STOPPED_W<'a, const O: u8> = - crate::BitWriter<'a, u32, EVENTS_STOPPED_SPEC, EVENTS_STOPPED_A, O>; -impl<'a, const O: u8> EVENTS_STOPPED_W<'a, O> { - #[doc = "Event not generated"] - #[inline(always)] - pub fn not_generated(self) -> &'a mut W { - self.variant(EVENTS_STOPPED_A::NOT_GENERATED) - } - #[doc = "Event generated"] - #[inline(always)] - pub fn generated(self) -> &'a mut W { - self.variant(EVENTS_STOPPED_A::GENERATED) - } -} -impl R { - #[doc = "Bit 0 - TWI stopped"] - #[inline(always)] - pub fn events_stopped(&self) -> EVENTS_STOPPED_R { - EVENTS_STOPPED_R::new((self.bits & 1) != 0) - } -} -impl W { - #[doc = "Bit 0 - TWI stopped"] - #[inline(always)] - #[must_use] - pub fn events_stopped(&mut self) -> EVENTS_STOPPED_W<0> { - EVENTS_STOPPED_W::new(self) - } - #[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 = "TWI stopped\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 [events_stopped](index.html) module"] -pub struct EVENTS_STOPPED_SPEC; -impl crate::RegisterSpec for EVENTS_STOPPED_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [events_stopped::R](R) reader structure"] -impl crate::Readable for EVENTS_STOPPED_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [events_stopped::W](W) writer structure"] -impl crate::Writable for EVENTS_STOPPED_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets EVENTS_STOPPED to value 0"] -impl crate::Resettable for EVENTS_STOPPED_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/twim0/events_suspended.rs b/down-the-stack/dk_pac/src/twim0/events_suspended.rs deleted file mode 100644 index 1c45ba4..0000000 --- a/down-the-stack/dk_pac/src/twim0/events_suspended.rs +++ /dev/null @@ -1,127 +0,0 @@ -#[doc = "Register `EVENTS_SUSPENDED` 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 `EVENTS_SUSPENDED` 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 `EVENTS_SUSPENDED` reader - Last byte has been sent out after the SUSPEND task has been issued, TWI traffic is now suspended."] -pub type EVENTS_SUSPENDED_R = crate::BitReader; -#[doc = "Last byte has been sent out after the SUSPEND task has been issued, TWI traffic is now suspended.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum EVENTS_SUSPENDED_A { - #[doc = "0: Event not generated"] - NOT_GENERATED = 0, - #[doc = "1: Event generated"] - GENERATED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: EVENTS_SUSPENDED_A) -> Self { - variant as u8 != 0 - } -} -impl EVENTS_SUSPENDED_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> EVENTS_SUSPENDED_A { - match self.bits { - false => EVENTS_SUSPENDED_A::NOT_GENERATED, - true => EVENTS_SUSPENDED_A::GENERATED, - } - } - #[doc = "Checks if the value of the field is `NOT_GENERATED`"] - #[inline(always)] - pub fn is_not_generated(&self) -> bool { - *self == EVENTS_SUSPENDED_A::NOT_GENERATED - } - #[doc = "Checks if the value of the field is `GENERATED`"] - #[inline(always)] - pub fn is_generated(&self) -> bool { - *self == EVENTS_SUSPENDED_A::GENERATED - } -} -#[doc = "Field `EVENTS_SUSPENDED` writer - Last byte has been sent out after the SUSPEND task has been issued, TWI traffic is now suspended."] -pub type EVENTS_SUSPENDED_W<'a, const O: u8> = - crate::BitWriter<'a, u32, EVENTS_SUSPENDED_SPEC, EVENTS_SUSPENDED_A, O>; -impl<'a, const O: u8> EVENTS_SUSPENDED_W<'a, O> { - #[doc = "Event not generated"] - #[inline(always)] - pub fn not_generated(self) -> &'a mut W { - self.variant(EVENTS_SUSPENDED_A::NOT_GENERATED) - } - #[doc = "Event generated"] - #[inline(always)] - pub fn generated(self) -> &'a mut W { - self.variant(EVENTS_SUSPENDED_A::GENERATED) - } -} -impl R { - #[doc = "Bit 0 - Last byte has been sent out after the SUSPEND task has been issued, TWI traffic is now suspended."] - #[inline(always)] - pub fn events_suspended(&self) -> EVENTS_SUSPENDED_R { - EVENTS_SUSPENDED_R::new((self.bits & 1) != 0) - } -} -impl W { - #[doc = "Bit 0 - Last byte has been sent out after the SUSPEND task has been issued, TWI traffic is now suspended."] - #[inline(always)] - #[must_use] - pub fn events_suspended(&mut self) -> EVENTS_SUSPENDED_W<0> { - EVENTS_SUSPENDED_W::new(self) - } - #[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 = "Last byte has been sent out after the SUSPEND task has been issued, TWI traffic is now suspended.\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 [events_suspended](index.html) module"] -pub struct EVENTS_SUSPENDED_SPEC; -impl crate::RegisterSpec for EVENTS_SUSPENDED_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [events_suspended::R](R) reader structure"] -impl crate::Readable for EVENTS_SUSPENDED_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [events_suspended::W](W) writer structure"] -impl crate::Writable for EVENTS_SUSPENDED_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets EVENTS_SUSPENDED to value 0"] -impl crate::Resettable for EVENTS_SUSPENDED_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/twim0/events_txstarted.rs b/down-the-stack/dk_pac/src/twim0/events_txstarted.rs deleted file mode 100644 index 0cb2e84..0000000 --- a/down-the-stack/dk_pac/src/twim0/events_txstarted.rs +++ /dev/null @@ -1,127 +0,0 @@ -#[doc = "Register `EVENTS_TXSTARTED` 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 `EVENTS_TXSTARTED` 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 `EVENTS_TXSTARTED` reader - Transmit sequence started"] -pub type EVENTS_TXSTARTED_R = crate::BitReader; -#[doc = "Transmit sequence started\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum EVENTS_TXSTARTED_A { - #[doc = "0: Event not generated"] - NOT_GENERATED = 0, - #[doc = "1: Event generated"] - GENERATED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: EVENTS_TXSTARTED_A) -> Self { - variant as u8 != 0 - } -} -impl EVENTS_TXSTARTED_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> EVENTS_TXSTARTED_A { - match self.bits { - false => EVENTS_TXSTARTED_A::NOT_GENERATED, - true => EVENTS_TXSTARTED_A::GENERATED, - } - } - #[doc = "Checks if the value of the field is `NOT_GENERATED`"] - #[inline(always)] - pub fn is_not_generated(&self) -> bool { - *self == EVENTS_TXSTARTED_A::NOT_GENERATED - } - #[doc = "Checks if the value of the field is `GENERATED`"] - #[inline(always)] - pub fn is_generated(&self) -> bool { - *self == EVENTS_TXSTARTED_A::GENERATED - } -} -#[doc = "Field `EVENTS_TXSTARTED` writer - Transmit sequence started"] -pub type EVENTS_TXSTARTED_W<'a, const O: u8> = - crate::BitWriter<'a, u32, EVENTS_TXSTARTED_SPEC, EVENTS_TXSTARTED_A, O>; -impl<'a, const O: u8> EVENTS_TXSTARTED_W<'a, O> { - #[doc = "Event not generated"] - #[inline(always)] - pub fn not_generated(self) -> &'a mut W { - self.variant(EVENTS_TXSTARTED_A::NOT_GENERATED) - } - #[doc = "Event generated"] - #[inline(always)] - pub fn generated(self) -> &'a mut W { - self.variant(EVENTS_TXSTARTED_A::GENERATED) - } -} -impl R { - #[doc = "Bit 0 - Transmit sequence started"] - #[inline(always)] - pub fn events_txstarted(&self) -> EVENTS_TXSTARTED_R { - EVENTS_TXSTARTED_R::new((self.bits & 1) != 0) - } -} -impl W { - #[doc = "Bit 0 - Transmit sequence started"] - #[inline(always)] - #[must_use] - pub fn events_txstarted(&mut self) -> EVENTS_TXSTARTED_W<0> { - EVENTS_TXSTARTED_W::new(self) - } - #[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 = "Transmit sequence started\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 [events_txstarted](index.html) module"] -pub struct EVENTS_TXSTARTED_SPEC; -impl crate::RegisterSpec for EVENTS_TXSTARTED_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [events_txstarted::R](R) reader structure"] -impl crate::Readable for EVENTS_TXSTARTED_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [events_txstarted::W](W) writer structure"] -impl crate::Writable for EVENTS_TXSTARTED_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets EVENTS_TXSTARTED to value 0"] -impl crate::Resettable for EVENTS_TXSTARTED_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/twim0/frequency.rs b/down-the-stack/dk_pac/src/twim0/frequency.rs deleted file mode 100644 index b0e1cc8..0000000 --- a/down-the-stack/dk_pac/src/twim0/frequency.rs +++ /dev/null @@ -1,142 +0,0 @@ -#[doc = "Register `FREQUENCY` 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 `FREQUENCY` 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 `FREQUENCY` reader - TWI master clock frequency"] -pub type FREQUENCY_R = crate::FieldReader; -#[doc = "TWI master clock frequency\n\nValue on reset: 67108864"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -#[repr(u32)] -pub enum FREQUENCY_A { - #[doc = "26738688: 100 kbps"] - K100 = 26738688, - #[doc = "67108864: 250 kbps"] - K250 = 67108864, - #[doc = "104857600: 400 kbps"] - K400 = 104857600, -} -impl From for u32 { - #[inline(always)] - fn from(variant: FREQUENCY_A) -> Self { - variant as _ - } -} -impl FREQUENCY_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> Option { - match self.bits { - 26738688 => Some(FREQUENCY_A::K100), - 67108864 => Some(FREQUENCY_A::K250), - 104857600 => Some(FREQUENCY_A::K400), - _ => None, - } - } - #[doc = "Checks if the value of the field is `K100`"] - #[inline(always)] - pub fn is_k100(&self) -> bool { - *self == FREQUENCY_A::K100 - } - #[doc = "Checks if the value of the field is `K250`"] - #[inline(always)] - pub fn is_k250(&self) -> bool { - *self == FREQUENCY_A::K250 - } - #[doc = "Checks if the value of the field is `K400`"] - #[inline(always)] - pub fn is_k400(&self) -> bool { - *self == FREQUENCY_A::K400 - } -} -#[doc = "Field `FREQUENCY` writer - TWI master clock frequency"] -pub type FREQUENCY_W<'a, const O: u8> = - crate::FieldWriter<'a, u32, FREQUENCY_SPEC, u32, FREQUENCY_A, 32, O>; -impl<'a, const O: u8> FREQUENCY_W<'a, O> { - #[doc = "100 kbps"] - #[inline(always)] - pub fn k100(self) -> &'a mut W { - self.variant(FREQUENCY_A::K100) - } - #[doc = "250 kbps"] - #[inline(always)] - pub fn k250(self) -> &'a mut W { - self.variant(FREQUENCY_A::K250) - } - #[doc = "400 kbps"] - #[inline(always)] - pub fn k400(self) -> &'a mut W { - self.variant(FREQUENCY_A::K400) - } -} -impl R { - #[doc = "Bits 0:31 - TWI master clock frequency"] - #[inline(always)] - pub fn frequency(&self) -> FREQUENCY_R { - FREQUENCY_R::new(self.bits) - } -} -impl W { - #[doc = "Bits 0:31 - TWI master clock frequency"] - #[inline(always)] - #[must_use] - pub fn frequency(&mut self) -> FREQUENCY_W<0> { - FREQUENCY_W::new(self) - } - #[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 = "TWI frequency\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 [frequency](index.html) module"] -pub struct FREQUENCY_SPEC; -impl crate::RegisterSpec for FREQUENCY_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [frequency::R](R) reader structure"] -impl crate::Readable for FREQUENCY_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [frequency::W](W) writer structure"] -impl crate::Writable for FREQUENCY_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets FREQUENCY to value 0x0400_0000"] -impl crate::Resettable for FREQUENCY_SPEC { - const RESET_VALUE: Self::Ux = 0x0400_0000; -} diff --git a/down-the-stack/dk_pac/src/twim0/inten.rs b/down-the-stack/dk_pac/src/twim0/inten.rs deleted file mode 100644 index 3014cdb..0000000 --- a/down-the-stack/dk_pac/src/twim0/inten.rs +++ /dev/null @@ -1,492 +0,0 @@ -#[doc = "Register `INTEN` 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 `INTEN` 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 `STOPPED` reader - Enable or disable interrupt for event STOPPED"] -pub type STOPPED_R = crate::BitReader; -#[doc = "Enable or disable interrupt for event STOPPED\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum STOPPED_A { - #[doc = "0: Disable"] - DISABLED = 0, - #[doc = "1: Enable"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: STOPPED_A) -> Self { - variant as u8 != 0 - } -} -impl STOPPED_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> STOPPED_A { - match self.bits { - false => STOPPED_A::DISABLED, - true => STOPPED_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == STOPPED_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == STOPPED_A::ENABLED - } -} -#[doc = "Field `STOPPED` writer - Enable or disable interrupt for event STOPPED"] -pub type STOPPED_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTEN_SPEC, STOPPED_A, O>; -impl<'a, const O: u8> STOPPED_W<'a, O> { - #[doc = "Disable"] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(STOPPED_A::DISABLED) - } - #[doc = "Enable"] - #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(STOPPED_A::ENABLED) - } -} -#[doc = "Field `ERROR` reader - Enable or disable interrupt for event ERROR"] -pub type ERROR_R = crate::BitReader; -#[doc = "Enable or disable interrupt for event ERROR\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum ERROR_A { - #[doc = "0: Disable"] - DISABLED = 0, - #[doc = "1: Enable"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: ERROR_A) -> Self { - variant as u8 != 0 - } -} -impl ERROR_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> ERROR_A { - match self.bits { - false => ERROR_A::DISABLED, - true => ERROR_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == ERROR_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == ERROR_A::ENABLED - } -} -#[doc = "Field `ERROR` writer - Enable or disable interrupt for event ERROR"] -pub type ERROR_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTEN_SPEC, ERROR_A, O>; -impl<'a, const O: u8> ERROR_W<'a, O> { - #[doc = "Disable"] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(ERROR_A::DISABLED) - } - #[doc = "Enable"] - #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(ERROR_A::ENABLED) - } -} -#[doc = "Field `SUSPENDED` reader - Enable or disable interrupt for event SUSPENDED"] -pub type SUSPENDED_R = crate::BitReader; -#[doc = "Enable or disable interrupt for event SUSPENDED\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum SUSPENDED_A { - #[doc = "0: Disable"] - DISABLED = 0, - #[doc = "1: Enable"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: SUSPENDED_A) -> Self { - variant as u8 != 0 - } -} -impl SUSPENDED_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> SUSPENDED_A { - match self.bits { - false => SUSPENDED_A::DISABLED, - true => SUSPENDED_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == SUSPENDED_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == SUSPENDED_A::ENABLED - } -} -#[doc = "Field `SUSPENDED` writer - Enable or disable interrupt for event SUSPENDED"] -pub type SUSPENDED_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTEN_SPEC, SUSPENDED_A, O>; -impl<'a, const O: u8> SUSPENDED_W<'a, O> { - #[doc = "Disable"] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(SUSPENDED_A::DISABLED) - } - #[doc = "Enable"] - #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(SUSPENDED_A::ENABLED) - } -} -#[doc = "Field `RXSTARTED` reader - Enable or disable interrupt for event RXSTARTED"] -pub type RXSTARTED_R = crate::BitReader; -#[doc = "Enable or disable interrupt for event RXSTARTED\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum RXSTARTED_A { - #[doc = "0: Disable"] - DISABLED = 0, - #[doc = "1: Enable"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: RXSTARTED_A) -> Self { - variant as u8 != 0 - } -} -impl RXSTARTED_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> RXSTARTED_A { - match self.bits { - false => RXSTARTED_A::DISABLED, - true => RXSTARTED_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == RXSTARTED_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == RXSTARTED_A::ENABLED - } -} -#[doc = "Field `RXSTARTED` writer - Enable or disable interrupt for event RXSTARTED"] -pub type RXSTARTED_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTEN_SPEC, RXSTARTED_A, O>; -impl<'a, const O: u8> RXSTARTED_W<'a, O> { - #[doc = "Disable"] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(RXSTARTED_A::DISABLED) - } - #[doc = "Enable"] - #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(RXSTARTED_A::ENABLED) - } -} -#[doc = "Field `TXSTARTED` reader - Enable or disable interrupt for event TXSTARTED"] -pub type TXSTARTED_R = crate::BitReader; -#[doc = "Enable or disable interrupt for event TXSTARTED\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum TXSTARTED_A { - #[doc = "0: Disable"] - DISABLED = 0, - #[doc = "1: Enable"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: TXSTARTED_A) -> Self { - variant as u8 != 0 - } -} -impl TXSTARTED_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> TXSTARTED_A { - match self.bits { - false => TXSTARTED_A::DISABLED, - true => TXSTARTED_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == TXSTARTED_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == TXSTARTED_A::ENABLED - } -} -#[doc = "Field `TXSTARTED` writer - Enable or disable interrupt for event TXSTARTED"] -pub type TXSTARTED_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTEN_SPEC, TXSTARTED_A, O>; -impl<'a, const O: u8> TXSTARTED_W<'a, O> { - #[doc = "Disable"] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(TXSTARTED_A::DISABLED) - } - #[doc = "Enable"] - #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(TXSTARTED_A::ENABLED) - } -} -#[doc = "Field `LASTRX` reader - Enable or disable interrupt for event LASTRX"] -pub type LASTRX_R = crate::BitReader; -#[doc = "Enable or disable interrupt for event LASTRX\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum LASTRX_A { - #[doc = "0: Disable"] - DISABLED = 0, - #[doc = "1: Enable"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: LASTRX_A) -> Self { - variant as u8 != 0 - } -} -impl LASTRX_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> LASTRX_A { - match self.bits { - false => LASTRX_A::DISABLED, - true => LASTRX_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == LASTRX_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == LASTRX_A::ENABLED - } -} -#[doc = "Field `LASTRX` writer - Enable or disable interrupt for event LASTRX"] -pub type LASTRX_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTEN_SPEC, LASTRX_A, O>; -impl<'a, const O: u8> LASTRX_W<'a, O> { - #[doc = "Disable"] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(LASTRX_A::DISABLED) - } - #[doc = "Enable"] - #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(LASTRX_A::ENABLED) - } -} -#[doc = "Field `LASTTX` reader - Enable or disable interrupt for event LASTTX"] -pub type LASTTX_R = crate::BitReader; -#[doc = "Enable or disable interrupt for event LASTTX\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum LASTTX_A { - #[doc = "0: Disable"] - DISABLED = 0, - #[doc = "1: Enable"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: LASTTX_A) -> Self { - variant as u8 != 0 - } -} -impl LASTTX_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> LASTTX_A { - match self.bits { - false => LASTTX_A::DISABLED, - true => LASTTX_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == LASTTX_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == LASTTX_A::ENABLED - } -} -#[doc = "Field `LASTTX` writer - Enable or disable interrupt for event LASTTX"] -pub type LASTTX_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTEN_SPEC, LASTTX_A, O>; -impl<'a, const O: u8> LASTTX_W<'a, O> { - #[doc = "Disable"] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(LASTTX_A::DISABLED) - } - #[doc = "Enable"] - #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(LASTTX_A::ENABLED) - } -} -impl R { - #[doc = "Bit 1 - Enable or disable interrupt for event STOPPED"] - #[inline(always)] - pub fn stopped(&self) -> STOPPED_R { - STOPPED_R::new(((self.bits >> 1) & 1) != 0) - } - #[doc = "Bit 9 - Enable or disable interrupt for event ERROR"] - #[inline(always)] - pub fn error(&self) -> ERROR_R { - ERROR_R::new(((self.bits >> 9) & 1) != 0) - } - #[doc = "Bit 18 - Enable or disable interrupt for event SUSPENDED"] - #[inline(always)] - pub fn suspended(&self) -> SUSPENDED_R { - SUSPENDED_R::new(((self.bits >> 18) & 1) != 0) - } - #[doc = "Bit 19 - Enable or disable interrupt for event RXSTARTED"] - #[inline(always)] - pub fn rxstarted(&self) -> RXSTARTED_R { - RXSTARTED_R::new(((self.bits >> 19) & 1) != 0) - } - #[doc = "Bit 20 - Enable or disable interrupt for event TXSTARTED"] - #[inline(always)] - pub fn txstarted(&self) -> TXSTARTED_R { - TXSTARTED_R::new(((self.bits >> 20) & 1) != 0) - } - #[doc = "Bit 23 - Enable or disable interrupt for event LASTRX"] - #[inline(always)] - pub fn lastrx(&self) -> LASTRX_R { - LASTRX_R::new(((self.bits >> 23) & 1) != 0) - } - #[doc = "Bit 24 - Enable or disable interrupt for event LASTTX"] - #[inline(always)] - pub fn lasttx(&self) -> LASTTX_R { - LASTTX_R::new(((self.bits >> 24) & 1) != 0) - } -} -impl W { - #[doc = "Bit 1 - Enable or disable interrupt for event STOPPED"] - #[inline(always)] - #[must_use] - pub fn stopped(&mut self) -> STOPPED_W<1> { - STOPPED_W::new(self) - } - #[doc = "Bit 9 - Enable or disable interrupt for event ERROR"] - #[inline(always)] - #[must_use] - pub fn error(&mut self) -> ERROR_W<9> { - ERROR_W::new(self) - } - #[doc = "Bit 18 - Enable or disable interrupt for event SUSPENDED"] - #[inline(always)] - #[must_use] - pub fn suspended(&mut self) -> SUSPENDED_W<18> { - SUSPENDED_W::new(self) - } - #[doc = "Bit 19 - Enable or disable interrupt for event RXSTARTED"] - #[inline(always)] - #[must_use] - pub fn rxstarted(&mut self) -> RXSTARTED_W<19> { - RXSTARTED_W::new(self) - } - #[doc = "Bit 20 - Enable or disable interrupt for event TXSTARTED"] - #[inline(always)] - #[must_use] - pub fn txstarted(&mut self) -> TXSTARTED_W<20> { - TXSTARTED_W::new(self) - } - #[doc = "Bit 23 - Enable or disable interrupt for event LASTRX"] - #[inline(always)] - #[must_use] - pub fn lastrx(&mut self) -> LASTRX_W<23> { - LASTRX_W::new(self) - } - #[doc = "Bit 24 - Enable or disable interrupt for event LASTTX"] - #[inline(always)] - #[must_use] - pub fn lasttx(&mut self) -> LASTTX_W<24> { - LASTTX_W::new(self) - } - #[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 = "Enable or disable interrupt\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 [inten](index.html) module"] -pub struct INTEN_SPEC; -impl crate::RegisterSpec for INTEN_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [inten::R](R) reader structure"] -impl crate::Readable for INTEN_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [inten::W](W) writer structure"] -impl crate::Writable for INTEN_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets INTEN to value 0"] -impl crate::Resettable for INTEN_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/twim0/intenclr.rs b/down-the-stack/dk_pac/src/twim0/intenclr.rs deleted file mode 100644 index 13706aa..0000000 --- a/down-the-stack/dk_pac/src/twim0/intenclr.rs +++ /dev/null @@ -1,541 +0,0 @@ -#[doc = "Register `INTENCLR` 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 `INTENCLR` 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 `STOPPED` reader - Write '1' to disable interrupt for event STOPPED"] -pub type STOPPED_R = crate::BitReader; -#[doc = "Write '1' to disable interrupt for event STOPPED\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum STOPPED_A { - #[doc = "0: Read: Disabled"] - DISABLED = 0, - #[doc = "1: Read: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: STOPPED_A) -> Self { - variant as u8 != 0 - } -} -impl STOPPED_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> STOPPED_A { - match self.bits { - false => STOPPED_A::DISABLED, - true => STOPPED_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == STOPPED_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == STOPPED_A::ENABLED - } -} -#[doc = "Write '1' to disable interrupt for event STOPPED\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum STOPPED_AW { - #[doc = "1: Disable"] - CLEAR = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: STOPPED_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `STOPPED` writer - Write '1' to disable interrupt for event STOPPED"] -pub type STOPPED_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENCLR_SPEC, STOPPED_AW, O>; -impl<'a, const O: u8> STOPPED_W<'a, O> { - #[doc = "Disable"] - #[inline(always)] - pub fn clear(self) -> &'a mut W { - self.variant(STOPPED_AW::CLEAR) - } -} -#[doc = "Field `ERROR` reader - Write '1' to disable interrupt for event ERROR"] -pub type ERROR_R = crate::BitReader; -#[doc = "Write '1' to disable interrupt for event ERROR\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum ERROR_A { - #[doc = "0: Read: Disabled"] - DISABLED = 0, - #[doc = "1: Read: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: ERROR_A) -> Self { - variant as u8 != 0 - } -} -impl ERROR_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> ERROR_A { - match self.bits { - false => ERROR_A::DISABLED, - true => ERROR_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == ERROR_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == ERROR_A::ENABLED - } -} -#[doc = "Write '1' to disable interrupt for event ERROR\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum ERROR_AW { - #[doc = "1: Disable"] - CLEAR = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: ERROR_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `ERROR` writer - Write '1' to disable interrupt for event ERROR"] -pub type ERROR_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENCLR_SPEC, ERROR_AW, O>; -impl<'a, const O: u8> ERROR_W<'a, O> { - #[doc = "Disable"] - #[inline(always)] - pub fn clear(self) -> &'a mut W { - self.variant(ERROR_AW::CLEAR) - } -} -#[doc = "Field `SUSPENDED` reader - Write '1' to disable interrupt for event SUSPENDED"] -pub type SUSPENDED_R = crate::BitReader; -#[doc = "Write '1' to disable interrupt for event SUSPENDED\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum SUSPENDED_A { - #[doc = "0: Read: Disabled"] - DISABLED = 0, - #[doc = "1: Read: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: SUSPENDED_A) -> Self { - variant as u8 != 0 - } -} -impl SUSPENDED_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> SUSPENDED_A { - match self.bits { - false => SUSPENDED_A::DISABLED, - true => SUSPENDED_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == SUSPENDED_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == SUSPENDED_A::ENABLED - } -} -#[doc = "Write '1' to disable interrupt for event SUSPENDED\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum SUSPENDED_AW { - #[doc = "1: Disable"] - CLEAR = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: SUSPENDED_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `SUSPENDED` writer - Write '1' to disable interrupt for event SUSPENDED"] -pub type SUSPENDED_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENCLR_SPEC, SUSPENDED_AW, O>; -impl<'a, const O: u8> SUSPENDED_W<'a, O> { - #[doc = "Disable"] - #[inline(always)] - pub fn clear(self) -> &'a mut W { - self.variant(SUSPENDED_AW::CLEAR) - } -} -#[doc = "Field `RXSTARTED` reader - Write '1' to disable interrupt for event RXSTARTED"] -pub type RXSTARTED_R = crate::BitReader; -#[doc = "Write '1' to disable interrupt for event RXSTARTED\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum RXSTARTED_A { - #[doc = "0: Read: Disabled"] - DISABLED = 0, - #[doc = "1: Read: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: RXSTARTED_A) -> Self { - variant as u8 != 0 - } -} -impl RXSTARTED_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> RXSTARTED_A { - match self.bits { - false => RXSTARTED_A::DISABLED, - true => RXSTARTED_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == RXSTARTED_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == RXSTARTED_A::ENABLED - } -} -#[doc = "Write '1' to disable interrupt for event RXSTARTED\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum RXSTARTED_AW { - #[doc = "1: Disable"] - CLEAR = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: RXSTARTED_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `RXSTARTED` writer - Write '1' to disable interrupt for event RXSTARTED"] -pub type RXSTARTED_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENCLR_SPEC, RXSTARTED_AW, O>; -impl<'a, const O: u8> RXSTARTED_W<'a, O> { - #[doc = "Disable"] - #[inline(always)] - pub fn clear(self) -> &'a mut W { - self.variant(RXSTARTED_AW::CLEAR) - } -} -#[doc = "Field `TXSTARTED` reader - Write '1' to disable interrupt for event TXSTARTED"] -pub type TXSTARTED_R = crate::BitReader; -#[doc = "Write '1' to disable interrupt for event TXSTARTED\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum TXSTARTED_A { - #[doc = "0: Read: Disabled"] - DISABLED = 0, - #[doc = "1: Read: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: TXSTARTED_A) -> Self { - variant as u8 != 0 - } -} -impl TXSTARTED_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> TXSTARTED_A { - match self.bits { - false => TXSTARTED_A::DISABLED, - true => TXSTARTED_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == TXSTARTED_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == TXSTARTED_A::ENABLED - } -} -#[doc = "Write '1' to disable interrupt for event TXSTARTED\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum TXSTARTED_AW { - #[doc = "1: Disable"] - CLEAR = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: TXSTARTED_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `TXSTARTED` writer - Write '1' to disable interrupt for event TXSTARTED"] -pub type TXSTARTED_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENCLR_SPEC, TXSTARTED_AW, O>; -impl<'a, const O: u8> TXSTARTED_W<'a, O> { - #[doc = "Disable"] - #[inline(always)] - pub fn clear(self) -> &'a mut W { - self.variant(TXSTARTED_AW::CLEAR) - } -} -#[doc = "Field `LASTRX` reader - Write '1' to disable interrupt for event LASTRX"] -pub type LASTRX_R = crate::BitReader; -#[doc = "Write '1' to disable interrupt for event LASTRX\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum LASTRX_A { - #[doc = "0: Read: Disabled"] - DISABLED = 0, - #[doc = "1: Read: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: LASTRX_A) -> Self { - variant as u8 != 0 - } -} -impl LASTRX_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> LASTRX_A { - match self.bits { - false => LASTRX_A::DISABLED, - true => LASTRX_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == LASTRX_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == LASTRX_A::ENABLED - } -} -#[doc = "Write '1' to disable interrupt for event LASTRX\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum LASTRX_AW { - #[doc = "1: Disable"] - CLEAR = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: LASTRX_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `LASTRX` writer - Write '1' to disable interrupt for event LASTRX"] -pub type LASTRX_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENCLR_SPEC, LASTRX_AW, O>; -impl<'a, const O: u8> LASTRX_W<'a, O> { - #[doc = "Disable"] - #[inline(always)] - pub fn clear(self) -> &'a mut W { - self.variant(LASTRX_AW::CLEAR) - } -} -#[doc = "Field `LASTTX` reader - Write '1' to disable interrupt for event LASTTX"] -pub type LASTTX_R = crate::BitReader; -#[doc = "Write '1' to disable interrupt for event LASTTX\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum LASTTX_A { - #[doc = "0: Read: Disabled"] - DISABLED = 0, - #[doc = "1: Read: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: LASTTX_A) -> Self { - variant as u8 != 0 - } -} -impl LASTTX_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> LASTTX_A { - match self.bits { - false => LASTTX_A::DISABLED, - true => LASTTX_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == LASTTX_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == LASTTX_A::ENABLED - } -} -#[doc = "Write '1' to disable interrupt for event LASTTX\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum LASTTX_AW { - #[doc = "1: Disable"] - CLEAR = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: LASTTX_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `LASTTX` writer - Write '1' to disable interrupt for event LASTTX"] -pub type LASTTX_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENCLR_SPEC, LASTTX_AW, O>; -impl<'a, const O: u8> LASTTX_W<'a, O> { - #[doc = "Disable"] - #[inline(always)] - pub fn clear(self) -> &'a mut W { - self.variant(LASTTX_AW::CLEAR) - } -} -impl R { - #[doc = "Bit 1 - Write '1' to disable interrupt for event STOPPED"] - #[inline(always)] - pub fn stopped(&self) -> STOPPED_R { - STOPPED_R::new(((self.bits >> 1) & 1) != 0) - } - #[doc = "Bit 9 - Write '1' to disable interrupt for event ERROR"] - #[inline(always)] - pub fn error(&self) -> ERROR_R { - ERROR_R::new(((self.bits >> 9) & 1) != 0) - } - #[doc = "Bit 18 - Write '1' to disable interrupt for event SUSPENDED"] - #[inline(always)] - pub fn suspended(&self) -> SUSPENDED_R { - SUSPENDED_R::new(((self.bits >> 18) & 1) != 0) - } - #[doc = "Bit 19 - Write '1' to disable interrupt for event RXSTARTED"] - #[inline(always)] - pub fn rxstarted(&self) -> RXSTARTED_R { - RXSTARTED_R::new(((self.bits >> 19) & 1) != 0) - } - #[doc = "Bit 20 - Write '1' to disable interrupt for event TXSTARTED"] - #[inline(always)] - pub fn txstarted(&self) -> TXSTARTED_R { - TXSTARTED_R::new(((self.bits >> 20) & 1) != 0) - } - #[doc = "Bit 23 - Write '1' to disable interrupt for event LASTRX"] - #[inline(always)] - pub fn lastrx(&self) -> LASTRX_R { - LASTRX_R::new(((self.bits >> 23) & 1) != 0) - } - #[doc = "Bit 24 - Write '1' to disable interrupt for event LASTTX"] - #[inline(always)] - pub fn lasttx(&self) -> LASTTX_R { - LASTTX_R::new(((self.bits >> 24) & 1) != 0) - } -} -impl W { - #[doc = "Bit 1 - Write '1' to disable interrupt for event STOPPED"] - #[inline(always)] - #[must_use] - pub fn stopped(&mut self) -> STOPPED_W<1> { - STOPPED_W::new(self) - } - #[doc = "Bit 9 - Write '1' to disable interrupt for event ERROR"] - #[inline(always)] - #[must_use] - pub fn error(&mut self) -> ERROR_W<9> { - ERROR_W::new(self) - } - #[doc = "Bit 18 - Write '1' to disable interrupt for event SUSPENDED"] - #[inline(always)] - #[must_use] - pub fn suspended(&mut self) -> SUSPENDED_W<18> { - SUSPENDED_W::new(self) - } - #[doc = "Bit 19 - Write '1' to disable interrupt for event RXSTARTED"] - #[inline(always)] - #[must_use] - pub fn rxstarted(&mut self) -> RXSTARTED_W<19> { - RXSTARTED_W::new(self) - } - #[doc = "Bit 20 - Write '1' to disable interrupt for event TXSTARTED"] - #[inline(always)] - #[must_use] - pub fn txstarted(&mut self) -> TXSTARTED_W<20> { - TXSTARTED_W::new(self) - } - #[doc = "Bit 23 - Write '1' to disable interrupt for event LASTRX"] - #[inline(always)] - #[must_use] - pub fn lastrx(&mut self) -> LASTRX_W<23> { - LASTRX_W::new(self) - } - #[doc = "Bit 24 - Write '1' to disable interrupt for event LASTTX"] - #[inline(always)] - #[must_use] - pub fn lasttx(&mut self) -> LASTTX_W<24> { - LASTTX_W::new(self) - } - #[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 = "Disable interrupt\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 [intenclr](index.html) module"] -pub struct INTENCLR_SPEC; -impl crate::RegisterSpec for INTENCLR_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [intenclr::R](R) reader structure"] -impl crate::Readable for INTENCLR_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [intenclr::W](W) writer structure"] -impl crate::Writable for INTENCLR_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets INTENCLR to value 0"] -impl crate::Resettable for INTENCLR_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/twim0/intenset.rs b/down-the-stack/dk_pac/src/twim0/intenset.rs deleted file mode 100644 index c34fd92..0000000 --- a/down-the-stack/dk_pac/src/twim0/intenset.rs +++ /dev/null @@ -1,541 +0,0 @@ -#[doc = "Register `INTENSET` 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 `INTENSET` 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 `STOPPED` reader - Write '1' to enable interrupt for event STOPPED"] -pub type STOPPED_R = crate::BitReader; -#[doc = "Write '1' to enable interrupt for event STOPPED\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum STOPPED_A { - #[doc = "0: Read: Disabled"] - DISABLED = 0, - #[doc = "1: Read: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: STOPPED_A) -> Self { - variant as u8 != 0 - } -} -impl STOPPED_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> STOPPED_A { - match self.bits { - false => STOPPED_A::DISABLED, - true => STOPPED_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == STOPPED_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == STOPPED_A::ENABLED - } -} -#[doc = "Write '1' to enable interrupt for event STOPPED\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum STOPPED_AW { - #[doc = "1: Enable"] - SET = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: STOPPED_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `STOPPED` writer - Write '1' to enable interrupt for event STOPPED"] -pub type STOPPED_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENSET_SPEC, STOPPED_AW, O>; -impl<'a, const O: u8> STOPPED_W<'a, O> { - #[doc = "Enable"] - #[inline(always)] - pub fn set(self) -> &'a mut W { - self.variant(STOPPED_AW::SET) - } -} -#[doc = "Field `ERROR` reader - Write '1' to enable interrupt for event ERROR"] -pub type ERROR_R = crate::BitReader; -#[doc = "Write '1' to enable interrupt for event ERROR\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum ERROR_A { - #[doc = "0: Read: Disabled"] - DISABLED = 0, - #[doc = "1: Read: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: ERROR_A) -> Self { - variant as u8 != 0 - } -} -impl ERROR_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> ERROR_A { - match self.bits { - false => ERROR_A::DISABLED, - true => ERROR_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == ERROR_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == ERROR_A::ENABLED - } -} -#[doc = "Write '1' to enable interrupt for event ERROR\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum ERROR_AW { - #[doc = "1: Enable"] - SET = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: ERROR_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `ERROR` writer - Write '1' to enable interrupt for event ERROR"] -pub type ERROR_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENSET_SPEC, ERROR_AW, O>; -impl<'a, const O: u8> ERROR_W<'a, O> { - #[doc = "Enable"] - #[inline(always)] - pub fn set(self) -> &'a mut W { - self.variant(ERROR_AW::SET) - } -} -#[doc = "Field `SUSPENDED` reader - Write '1' to enable interrupt for event SUSPENDED"] -pub type SUSPENDED_R = crate::BitReader; -#[doc = "Write '1' to enable interrupt for event SUSPENDED\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum SUSPENDED_A { - #[doc = "0: Read: Disabled"] - DISABLED = 0, - #[doc = "1: Read: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: SUSPENDED_A) -> Self { - variant as u8 != 0 - } -} -impl SUSPENDED_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> SUSPENDED_A { - match self.bits { - false => SUSPENDED_A::DISABLED, - true => SUSPENDED_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == SUSPENDED_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == SUSPENDED_A::ENABLED - } -} -#[doc = "Write '1' to enable interrupt for event SUSPENDED\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum SUSPENDED_AW { - #[doc = "1: Enable"] - SET = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: SUSPENDED_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `SUSPENDED` writer - Write '1' to enable interrupt for event SUSPENDED"] -pub type SUSPENDED_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENSET_SPEC, SUSPENDED_AW, O>; -impl<'a, const O: u8> SUSPENDED_W<'a, O> { - #[doc = "Enable"] - #[inline(always)] - pub fn set(self) -> &'a mut W { - self.variant(SUSPENDED_AW::SET) - } -} -#[doc = "Field `RXSTARTED` reader - Write '1' to enable interrupt for event RXSTARTED"] -pub type RXSTARTED_R = crate::BitReader; -#[doc = "Write '1' to enable interrupt for event RXSTARTED\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum RXSTARTED_A { - #[doc = "0: Read: Disabled"] - DISABLED = 0, - #[doc = "1: Read: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: RXSTARTED_A) -> Self { - variant as u8 != 0 - } -} -impl RXSTARTED_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> RXSTARTED_A { - match self.bits { - false => RXSTARTED_A::DISABLED, - true => RXSTARTED_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == RXSTARTED_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == RXSTARTED_A::ENABLED - } -} -#[doc = "Write '1' to enable interrupt for event RXSTARTED\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum RXSTARTED_AW { - #[doc = "1: Enable"] - SET = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: RXSTARTED_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `RXSTARTED` writer - Write '1' to enable interrupt for event RXSTARTED"] -pub type RXSTARTED_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENSET_SPEC, RXSTARTED_AW, O>; -impl<'a, const O: u8> RXSTARTED_W<'a, O> { - #[doc = "Enable"] - #[inline(always)] - pub fn set(self) -> &'a mut W { - self.variant(RXSTARTED_AW::SET) - } -} -#[doc = "Field `TXSTARTED` reader - Write '1' to enable interrupt for event TXSTARTED"] -pub type TXSTARTED_R = crate::BitReader; -#[doc = "Write '1' to enable interrupt for event TXSTARTED\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum TXSTARTED_A { - #[doc = "0: Read: Disabled"] - DISABLED = 0, - #[doc = "1: Read: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: TXSTARTED_A) -> Self { - variant as u8 != 0 - } -} -impl TXSTARTED_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> TXSTARTED_A { - match self.bits { - false => TXSTARTED_A::DISABLED, - true => TXSTARTED_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == TXSTARTED_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == TXSTARTED_A::ENABLED - } -} -#[doc = "Write '1' to enable interrupt for event TXSTARTED\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum TXSTARTED_AW { - #[doc = "1: Enable"] - SET = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: TXSTARTED_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `TXSTARTED` writer - Write '1' to enable interrupt for event TXSTARTED"] -pub type TXSTARTED_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENSET_SPEC, TXSTARTED_AW, O>; -impl<'a, const O: u8> TXSTARTED_W<'a, O> { - #[doc = "Enable"] - #[inline(always)] - pub fn set(self) -> &'a mut W { - self.variant(TXSTARTED_AW::SET) - } -} -#[doc = "Field `LASTRX` reader - Write '1' to enable interrupt for event LASTRX"] -pub type LASTRX_R = crate::BitReader; -#[doc = "Write '1' to enable interrupt for event LASTRX\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum LASTRX_A { - #[doc = "0: Read: Disabled"] - DISABLED = 0, - #[doc = "1: Read: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: LASTRX_A) -> Self { - variant as u8 != 0 - } -} -impl LASTRX_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> LASTRX_A { - match self.bits { - false => LASTRX_A::DISABLED, - true => LASTRX_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == LASTRX_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == LASTRX_A::ENABLED - } -} -#[doc = "Write '1' to enable interrupt for event LASTRX\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum LASTRX_AW { - #[doc = "1: Enable"] - SET = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: LASTRX_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `LASTRX` writer - Write '1' to enable interrupt for event LASTRX"] -pub type LASTRX_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENSET_SPEC, LASTRX_AW, O>; -impl<'a, const O: u8> LASTRX_W<'a, O> { - #[doc = "Enable"] - #[inline(always)] - pub fn set(self) -> &'a mut W { - self.variant(LASTRX_AW::SET) - } -} -#[doc = "Field `LASTTX` reader - Write '1' to enable interrupt for event LASTTX"] -pub type LASTTX_R = crate::BitReader; -#[doc = "Write '1' to enable interrupt for event LASTTX\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum LASTTX_A { - #[doc = "0: Read: Disabled"] - DISABLED = 0, - #[doc = "1: Read: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: LASTTX_A) -> Self { - variant as u8 != 0 - } -} -impl LASTTX_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> LASTTX_A { - match self.bits { - false => LASTTX_A::DISABLED, - true => LASTTX_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == LASTTX_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == LASTTX_A::ENABLED - } -} -#[doc = "Write '1' to enable interrupt for event LASTTX\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum LASTTX_AW { - #[doc = "1: Enable"] - SET = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: LASTTX_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `LASTTX` writer - Write '1' to enable interrupt for event LASTTX"] -pub type LASTTX_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENSET_SPEC, LASTTX_AW, O>; -impl<'a, const O: u8> LASTTX_W<'a, O> { - #[doc = "Enable"] - #[inline(always)] - pub fn set(self) -> &'a mut W { - self.variant(LASTTX_AW::SET) - } -} -impl R { - #[doc = "Bit 1 - Write '1' to enable interrupt for event STOPPED"] - #[inline(always)] - pub fn stopped(&self) -> STOPPED_R { - STOPPED_R::new(((self.bits >> 1) & 1) != 0) - } - #[doc = "Bit 9 - Write '1' to enable interrupt for event ERROR"] - #[inline(always)] - pub fn error(&self) -> ERROR_R { - ERROR_R::new(((self.bits >> 9) & 1) != 0) - } - #[doc = "Bit 18 - Write '1' to enable interrupt for event SUSPENDED"] - #[inline(always)] - pub fn suspended(&self) -> SUSPENDED_R { - SUSPENDED_R::new(((self.bits >> 18) & 1) != 0) - } - #[doc = "Bit 19 - Write '1' to enable interrupt for event RXSTARTED"] - #[inline(always)] - pub fn rxstarted(&self) -> RXSTARTED_R { - RXSTARTED_R::new(((self.bits >> 19) & 1) != 0) - } - #[doc = "Bit 20 - Write '1' to enable interrupt for event TXSTARTED"] - #[inline(always)] - pub fn txstarted(&self) -> TXSTARTED_R { - TXSTARTED_R::new(((self.bits >> 20) & 1) != 0) - } - #[doc = "Bit 23 - Write '1' to enable interrupt for event LASTRX"] - #[inline(always)] - pub fn lastrx(&self) -> LASTRX_R { - LASTRX_R::new(((self.bits >> 23) & 1) != 0) - } - #[doc = "Bit 24 - Write '1' to enable interrupt for event LASTTX"] - #[inline(always)] - pub fn lasttx(&self) -> LASTTX_R { - LASTTX_R::new(((self.bits >> 24) & 1) != 0) - } -} -impl W { - #[doc = "Bit 1 - Write '1' to enable interrupt for event STOPPED"] - #[inline(always)] - #[must_use] - pub fn stopped(&mut self) -> STOPPED_W<1> { - STOPPED_W::new(self) - } - #[doc = "Bit 9 - Write '1' to enable interrupt for event ERROR"] - #[inline(always)] - #[must_use] - pub fn error(&mut self) -> ERROR_W<9> { - ERROR_W::new(self) - } - #[doc = "Bit 18 - Write '1' to enable interrupt for event SUSPENDED"] - #[inline(always)] - #[must_use] - pub fn suspended(&mut self) -> SUSPENDED_W<18> { - SUSPENDED_W::new(self) - } - #[doc = "Bit 19 - Write '1' to enable interrupt for event RXSTARTED"] - #[inline(always)] - #[must_use] - pub fn rxstarted(&mut self) -> RXSTARTED_W<19> { - RXSTARTED_W::new(self) - } - #[doc = "Bit 20 - Write '1' to enable interrupt for event TXSTARTED"] - #[inline(always)] - #[must_use] - pub fn txstarted(&mut self) -> TXSTARTED_W<20> { - TXSTARTED_W::new(self) - } - #[doc = "Bit 23 - Write '1' to enable interrupt for event LASTRX"] - #[inline(always)] - #[must_use] - pub fn lastrx(&mut self) -> LASTRX_W<23> { - LASTRX_W::new(self) - } - #[doc = "Bit 24 - Write '1' to enable interrupt for event LASTTX"] - #[inline(always)] - #[must_use] - pub fn lasttx(&mut self) -> LASTTX_W<24> { - LASTTX_W::new(self) - } - #[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 = "Enable interrupt\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 [intenset](index.html) module"] -pub struct INTENSET_SPEC; -impl crate::RegisterSpec for INTENSET_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [intenset::R](R) reader structure"] -impl crate::Readable for INTENSET_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [intenset::W](W) writer structure"] -impl crate::Writable for INTENSET_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets INTENSET to value 0"] -impl crate::Resettable for INTENSET_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/twim0/psel.rs b/down-the-stack/dk_pac/src/twim0/psel.rs deleted file mode 100644 index 6d71cdf..0000000 --- a/down-the-stack/dk_pac/src/twim0/psel.rs +++ /dev/null @@ -1,16 +0,0 @@ -#[doc = r"Register block"] -#[repr(C)] -pub struct PSEL { - #[doc = "0x00 - Pin select for SCL signal"] - pub scl: SCL, - #[doc = "0x04 - Pin select for SDA signal"] - pub sda: SDA, -} -#[doc = "SCL (rw) register accessor: an alias for `Reg`"] -pub type SCL = crate::Reg; -#[doc = "Pin select for SCL signal"] -pub mod scl; -#[doc = "SDA (rw) register accessor: an alias for `Reg`"] -pub type SDA = crate::Reg; -#[doc = "Pin select for SDA signal"] -pub mod sda; diff --git a/down-the-stack/dk_pac/src/twim0/psel/scl.rs b/down-the-stack/dk_pac/src/twim0/psel/scl.rs deleted file mode 100644 index 05b9f95..0000000 --- a/down-the-stack/dk_pac/src/twim0/psel/scl.rs +++ /dev/null @@ -1,141 +0,0 @@ -#[doc = "Register `SCL` 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 `SCL` 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 `PIN` reader - Pin number"] -pub type PIN_R = crate::FieldReader; -#[doc = "Field `PIN` writer - Pin number"] -pub type PIN_W<'a, const O: u8> = crate::FieldWriter<'a, u32, SCL_SPEC, u8, u8, 5, O>; -#[doc = "Field `CONNECT` reader - Connection"] -pub type CONNECT_R = crate::BitReader; -#[doc = "Connection\n\nValue on reset: 1"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum CONNECT_A { - #[doc = "1: Disconnect"] - DISCONNECTED = 1, - #[doc = "0: Connect"] - CONNECTED = 0, -} -impl From for bool { - #[inline(always)] - fn from(variant: CONNECT_A) -> Self { - variant as u8 != 0 - } -} -impl CONNECT_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> CONNECT_A { - match self.bits { - true => CONNECT_A::DISCONNECTED, - false => CONNECT_A::CONNECTED, - } - } - #[doc = "Checks if the value of the field is `DISCONNECTED`"] - #[inline(always)] - pub fn is_disconnected(&self) -> bool { - *self == CONNECT_A::DISCONNECTED - } - #[doc = "Checks if the value of the field is `CONNECTED`"] - #[inline(always)] - pub fn is_connected(&self) -> bool { - *self == CONNECT_A::CONNECTED - } -} -#[doc = "Field `CONNECT` writer - Connection"] -pub type CONNECT_W<'a, const O: u8> = crate::BitWriter<'a, u32, SCL_SPEC, CONNECT_A, O>; -impl<'a, const O: u8> CONNECT_W<'a, O> { - #[doc = "Disconnect"] - #[inline(always)] - pub fn disconnected(self) -> &'a mut W { - self.variant(CONNECT_A::DISCONNECTED) - } - #[doc = "Connect"] - #[inline(always)] - pub fn connected(self) -> &'a mut W { - self.variant(CONNECT_A::CONNECTED) - } -} -impl R { - #[doc = "Bits 0:4 - Pin number"] - #[inline(always)] - pub fn pin(&self) -> PIN_R { - PIN_R::new((self.bits & 0x1f) as u8) - } - #[doc = "Bit 31 - Connection"] - #[inline(always)] - pub fn connect(&self) -> CONNECT_R { - CONNECT_R::new(((self.bits >> 31) & 1) != 0) - } -} -impl W { - #[doc = "Bits 0:4 - Pin number"] - #[inline(always)] - #[must_use] - pub fn pin(&mut self) -> PIN_W<0> { - PIN_W::new(self) - } - #[doc = "Bit 31 - Connection"] - #[inline(always)] - #[must_use] - pub fn connect(&mut self) -> CONNECT_W<31> { - CONNECT_W::new(self) - } - #[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 = "Pin select for SCL signal\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 [scl](index.html) module"] -pub struct SCL_SPEC; -impl crate::RegisterSpec for SCL_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [scl::R](R) reader structure"] -impl crate::Readable for SCL_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [scl::W](W) writer structure"] -impl crate::Writable for SCL_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets SCL to value 0xffff_ffff"] -impl crate::Resettable for SCL_SPEC { - const RESET_VALUE: Self::Ux = 0xffff_ffff; -} diff --git a/down-the-stack/dk_pac/src/twim0/psel/sda.rs b/down-the-stack/dk_pac/src/twim0/psel/sda.rs deleted file mode 100644 index 705af21..0000000 --- a/down-the-stack/dk_pac/src/twim0/psel/sda.rs +++ /dev/null @@ -1,141 +0,0 @@ -#[doc = "Register `SDA` 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 `SDA` 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 `PIN` reader - Pin number"] -pub type PIN_R = crate::FieldReader; -#[doc = "Field `PIN` writer - Pin number"] -pub type PIN_W<'a, const O: u8> = crate::FieldWriter<'a, u32, SDA_SPEC, u8, u8, 5, O>; -#[doc = "Field `CONNECT` reader - Connection"] -pub type CONNECT_R = crate::BitReader; -#[doc = "Connection\n\nValue on reset: 1"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum CONNECT_A { - #[doc = "1: Disconnect"] - DISCONNECTED = 1, - #[doc = "0: Connect"] - CONNECTED = 0, -} -impl From for bool { - #[inline(always)] - fn from(variant: CONNECT_A) -> Self { - variant as u8 != 0 - } -} -impl CONNECT_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> CONNECT_A { - match self.bits { - true => CONNECT_A::DISCONNECTED, - false => CONNECT_A::CONNECTED, - } - } - #[doc = "Checks if the value of the field is `DISCONNECTED`"] - #[inline(always)] - pub fn is_disconnected(&self) -> bool { - *self == CONNECT_A::DISCONNECTED - } - #[doc = "Checks if the value of the field is `CONNECTED`"] - #[inline(always)] - pub fn is_connected(&self) -> bool { - *self == CONNECT_A::CONNECTED - } -} -#[doc = "Field `CONNECT` writer - Connection"] -pub type CONNECT_W<'a, const O: u8> = crate::BitWriter<'a, u32, SDA_SPEC, CONNECT_A, O>; -impl<'a, const O: u8> CONNECT_W<'a, O> { - #[doc = "Disconnect"] - #[inline(always)] - pub fn disconnected(self) -> &'a mut W { - self.variant(CONNECT_A::DISCONNECTED) - } - #[doc = "Connect"] - #[inline(always)] - pub fn connected(self) -> &'a mut W { - self.variant(CONNECT_A::CONNECTED) - } -} -impl R { - #[doc = "Bits 0:4 - Pin number"] - #[inline(always)] - pub fn pin(&self) -> PIN_R { - PIN_R::new((self.bits & 0x1f) as u8) - } - #[doc = "Bit 31 - Connection"] - #[inline(always)] - pub fn connect(&self) -> CONNECT_R { - CONNECT_R::new(((self.bits >> 31) & 1) != 0) - } -} -impl W { - #[doc = "Bits 0:4 - Pin number"] - #[inline(always)] - #[must_use] - pub fn pin(&mut self) -> PIN_W<0> { - PIN_W::new(self) - } - #[doc = "Bit 31 - Connection"] - #[inline(always)] - #[must_use] - pub fn connect(&mut self) -> CONNECT_W<31> { - CONNECT_W::new(self) - } - #[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 = "Pin select for SDA signal\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 [sda](index.html) module"] -pub struct SDA_SPEC; -impl crate::RegisterSpec for SDA_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [sda::R](R) reader structure"] -impl crate::Readable for SDA_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [sda::W](W) writer structure"] -impl crate::Writable for SDA_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets SDA to value 0xffff_ffff"] -impl crate::Resettable for SDA_SPEC { - const RESET_VALUE: Self::Ux = 0xffff_ffff; -} diff --git a/down-the-stack/dk_pac/src/twim0/rxd.rs b/down-the-stack/dk_pac/src/twim0/rxd.rs deleted file mode 100644 index 6a26418..0000000 --- a/down-the-stack/dk_pac/src/twim0/rxd.rs +++ /dev/null @@ -1,28 +0,0 @@ -#[doc = r"Register block"] -#[repr(C)] -pub struct RXD { - #[doc = "0x00 - Data pointer"] - pub ptr: PTR, - #[doc = "0x04 - Maximum number of bytes in receive buffer"] - pub maxcnt: MAXCNT, - #[doc = "0x08 - Number of bytes transferred in the last transaction"] - pub amount: AMOUNT, - #[doc = "0x0c - EasyDMA list type"] - pub list: LIST, -} -#[doc = "PTR (rw) register accessor: an alias for `Reg`"] -pub type PTR = crate::Reg; -#[doc = "Data pointer"] -pub mod ptr; -#[doc = "MAXCNT (rw) register accessor: an alias for `Reg`"] -pub type MAXCNT = crate::Reg; -#[doc = "Maximum number of bytes in receive buffer"] -pub mod maxcnt; -#[doc = "AMOUNT (r) register accessor: an alias for `Reg`"] -pub type AMOUNT = crate::Reg; -#[doc = "Number of bytes transferred in the last transaction"] -pub mod amount; -#[doc = "LIST (rw) register accessor: an alias for `Reg`"] -pub type LIST = crate::Reg; -#[doc = "EasyDMA list type"] -pub mod list; diff --git a/down-the-stack/dk_pac/src/twim0/rxd/amount.rs b/down-the-stack/dk_pac/src/twim0/rxd/amount.rs deleted file mode 100644 index f149407..0000000 --- a/down-the-stack/dk_pac/src/twim0/rxd/amount.rs +++ /dev/null @@ -1,37 +0,0 @@ -#[doc = "Register `AMOUNT` 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 = "Field `AMOUNT` reader - Number of bytes transferred in the last transaction. In case of NACK error, includes the NACK'ed byte."] -pub type AMOUNT_R = crate::FieldReader; -impl R { - #[doc = "Bits 0:7 - Number of bytes transferred in the last transaction. In case of NACK error, includes the NACK'ed byte."] - #[inline(always)] - pub fn amount(&self) -> AMOUNT_R { - AMOUNT_R::new((self.bits & 0xff) as u8) - } -} -#[doc = "Number of bytes transferred in the last transaction\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 [amount](index.html) module"] -pub struct AMOUNT_SPEC; -impl crate::RegisterSpec for AMOUNT_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [amount::R](R) reader structure"] -impl crate::Readable for AMOUNT_SPEC { - type Reader = R; -} -#[doc = "`reset()` method sets AMOUNT to value 0"] -impl crate::Resettable for AMOUNT_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/twim0/rxd/list.rs b/down-the-stack/dk_pac/src/twim0/rxd/list.rs deleted file mode 100644 index 05243a5..0000000 --- a/down-the-stack/dk_pac/src/twim0/rxd/list.rs +++ /dev/null @@ -1,128 +0,0 @@ -#[doc = "Register `LIST` 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 `LIST` 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 `LIST` reader - List type"] -pub type LIST_R = crate::FieldReader; -#[doc = "List type\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -#[repr(u8)] -pub enum LIST_A { - #[doc = "0: Disable EasyDMA list"] - DISABLED = 0, - #[doc = "1: Use array list"] - ARRAY_LIST = 1, -} -impl From for u8 { - #[inline(always)] - fn from(variant: LIST_A) -> Self { - variant as _ - } -} -impl LIST_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> Option { - match self.bits { - 0 => Some(LIST_A::DISABLED), - 1 => Some(LIST_A::ARRAY_LIST), - _ => None, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == LIST_A::DISABLED - } - #[doc = "Checks if the value of the field is `ARRAY_LIST`"] - #[inline(always)] - pub fn is_array_list(&self) -> bool { - *self == LIST_A::ARRAY_LIST - } -} -#[doc = "Field `LIST` writer - List type"] -pub type LIST_W<'a, const O: u8> = crate::FieldWriter<'a, u32, LIST_SPEC, u8, LIST_A, 3, O>; -impl<'a, const O: u8> LIST_W<'a, O> { - #[doc = "Disable EasyDMA list"] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(LIST_A::DISABLED) - } - #[doc = "Use array list"] - #[inline(always)] - pub fn array_list(self) -> &'a mut W { - self.variant(LIST_A::ARRAY_LIST) - } -} -impl R { - #[doc = "Bits 0:2 - List type"] - #[inline(always)] - pub fn list(&self) -> LIST_R { - LIST_R::new((self.bits & 7) as u8) - } -} -impl W { - #[doc = "Bits 0:2 - List type"] - #[inline(always)] - #[must_use] - pub fn list(&mut self) -> LIST_W<0> { - LIST_W::new(self) - } - #[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 = "EasyDMA list type\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 [list](index.html) module"] -pub struct LIST_SPEC; -impl crate::RegisterSpec for LIST_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [list::R](R) reader structure"] -impl crate::Readable for LIST_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [list::W](W) writer structure"] -impl crate::Writable for LIST_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets LIST to value 0"] -impl crate::Resettable for LIST_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/twim0/rxd/maxcnt.rs b/down-the-stack/dk_pac/src/twim0/rxd/maxcnt.rs deleted file mode 100644 index 7d9b79c..0000000 --- a/down-the-stack/dk_pac/src/twim0/rxd/maxcnt.rs +++ /dev/null @@ -1,80 +0,0 @@ -#[doc = "Register `MAXCNT` 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 `MAXCNT` 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 `MAXCNT` reader - Maximum number of bytes in receive buffer"] -pub type MAXCNT_R = crate::FieldReader; -#[doc = "Field `MAXCNT` writer - Maximum number of bytes in receive buffer"] -pub type MAXCNT_W<'a, const O: u8> = crate::FieldWriter<'a, u32, MAXCNT_SPEC, u8, u8, 8, O>; -impl R { - #[doc = "Bits 0:7 - Maximum number of bytes in receive buffer"] - #[inline(always)] - pub fn maxcnt(&self) -> MAXCNT_R { - MAXCNT_R::new((self.bits & 0xff) as u8) - } -} -impl W { - #[doc = "Bits 0:7 - Maximum number of bytes in receive buffer"] - #[inline(always)] - #[must_use] - pub fn maxcnt(&mut self) -> MAXCNT_W<0> { - MAXCNT_W::new(self) - } - #[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 = "Maximum number of bytes in receive buffer\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 [maxcnt](index.html) module"] -pub struct MAXCNT_SPEC; -impl crate::RegisterSpec for MAXCNT_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [maxcnt::R](R) reader structure"] -impl crate::Readable for MAXCNT_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [maxcnt::W](W) writer structure"] -impl crate::Writable for MAXCNT_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets MAXCNT to value 0"] -impl crate::Resettable for MAXCNT_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/twim0/rxd/ptr.rs b/down-the-stack/dk_pac/src/twim0/rxd/ptr.rs deleted file mode 100644 index 2f2c926..0000000 --- a/down-the-stack/dk_pac/src/twim0/rxd/ptr.rs +++ /dev/null @@ -1,80 +0,0 @@ -#[doc = "Register `PTR` 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 `PTR` 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 `PTR` reader - Data pointer"] -pub type PTR_R = crate::FieldReader; -#[doc = "Field `PTR` writer - Data pointer"] -pub type PTR_W<'a, const O: u8> = crate::FieldWriter<'a, u32, PTR_SPEC, u32, u32, 32, O>; -impl R { - #[doc = "Bits 0:31 - Data pointer"] - #[inline(always)] - pub fn ptr(&self) -> PTR_R { - PTR_R::new(self.bits) - } -} -impl W { - #[doc = "Bits 0:31 - Data pointer"] - #[inline(always)] - #[must_use] - pub fn ptr(&mut self) -> PTR_W<0> { - PTR_W::new(self) - } - #[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 = "Data pointer\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 [ptr](index.html) module"] -pub struct PTR_SPEC; -impl crate::RegisterSpec for PTR_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [ptr::R](R) reader structure"] -impl crate::Readable for PTR_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [ptr::W](W) writer structure"] -impl crate::Writable for PTR_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets PTR to value 0"] -impl crate::Resettable for PTR_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/twim0/shorts.rs b/down-the-stack/dk_pac/src/twim0/shorts.rs deleted file mode 100644 index 8f20d6a..0000000 --- a/down-the-stack/dk_pac/src/twim0/shorts.rs +++ /dev/null @@ -1,373 +0,0 @@ -#[doc = "Register `SHORTS` 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 `SHORTS` 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 `LASTTX_STARTRX` reader - Shortcut between event LASTTX and task STARTRX"] -pub type LASTTX_STARTRX_R = crate::BitReader; -#[doc = "Shortcut between event LASTTX and task STARTRX\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum LASTTX_STARTRX_A { - #[doc = "0: Disable shortcut"] - DISABLED = 0, - #[doc = "1: Enable shortcut"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: LASTTX_STARTRX_A) -> Self { - variant as u8 != 0 - } -} -impl LASTTX_STARTRX_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> LASTTX_STARTRX_A { - match self.bits { - false => LASTTX_STARTRX_A::DISABLED, - true => LASTTX_STARTRX_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == LASTTX_STARTRX_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == LASTTX_STARTRX_A::ENABLED - } -} -#[doc = "Field `LASTTX_STARTRX` writer - Shortcut between event LASTTX and task STARTRX"] -pub type LASTTX_STARTRX_W<'a, const O: u8> = - crate::BitWriter<'a, u32, SHORTS_SPEC, LASTTX_STARTRX_A, O>; -impl<'a, const O: u8> LASTTX_STARTRX_W<'a, O> { - #[doc = "Disable shortcut"] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(LASTTX_STARTRX_A::DISABLED) - } - #[doc = "Enable shortcut"] - #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(LASTTX_STARTRX_A::ENABLED) - } -} -#[doc = "Field `LASTTX_SUSPEND` reader - Shortcut between event LASTTX and task SUSPEND"] -pub type LASTTX_SUSPEND_R = crate::BitReader; -#[doc = "Shortcut between event LASTTX and task SUSPEND\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum LASTTX_SUSPEND_A { - #[doc = "0: Disable shortcut"] - DISABLED = 0, - #[doc = "1: Enable shortcut"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: LASTTX_SUSPEND_A) -> Self { - variant as u8 != 0 - } -} -impl LASTTX_SUSPEND_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> LASTTX_SUSPEND_A { - match self.bits { - false => LASTTX_SUSPEND_A::DISABLED, - true => LASTTX_SUSPEND_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == LASTTX_SUSPEND_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == LASTTX_SUSPEND_A::ENABLED - } -} -#[doc = "Field `LASTTX_SUSPEND` writer - Shortcut between event LASTTX and task SUSPEND"] -pub type LASTTX_SUSPEND_W<'a, const O: u8> = - crate::BitWriter<'a, u32, SHORTS_SPEC, LASTTX_SUSPEND_A, O>; -impl<'a, const O: u8> LASTTX_SUSPEND_W<'a, O> { - #[doc = "Disable shortcut"] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(LASTTX_SUSPEND_A::DISABLED) - } - #[doc = "Enable shortcut"] - #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(LASTTX_SUSPEND_A::ENABLED) - } -} -#[doc = "Field `LASTTX_STOP` reader - Shortcut between event LASTTX and task STOP"] -pub type LASTTX_STOP_R = crate::BitReader; -#[doc = "Shortcut between event LASTTX and task STOP\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum LASTTX_STOP_A { - #[doc = "0: Disable shortcut"] - DISABLED = 0, - #[doc = "1: Enable shortcut"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: LASTTX_STOP_A) -> Self { - variant as u8 != 0 - } -} -impl LASTTX_STOP_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> LASTTX_STOP_A { - match self.bits { - false => LASTTX_STOP_A::DISABLED, - true => LASTTX_STOP_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == LASTTX_STOP_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == LASTTX_STOP_A::ENABLED - } -} -#[doc = "Field `LASTTX_STOP` writer - Shortcut between event LASTTX and task STOP"] -pub type LASTTX_STOP_W<'a, const O: u8> = crate::BitWriter<'a, u32, SHORTS_SPEC, LASTTX_STOP_A, O>; -impl<'a, const O: u8> LASTTX_STOP_W<'a, O> { - #[doc = "Disable shortcut"] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(LASTTX_STOP_A::DISABLED) - } - #[doc = "Enable shortcut"] - #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(LASTTX_STOP_A::ENABLED) - } -} -#[doc = "Field `LASTRX_STARTTX` reader - Shortcut between event LASTRX and task STARTTX"] -pub type LASTRX_STARTTX_R = crate::BitReader; -#[doc = "Shortcut between event LASTRX and task STARTTX\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum LASTRX_STARTTX_A { - #[doc = "0: Disable shortcut"] - DISABLED = 0, - #[doc = "1: Enable shortcut"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: LASTRX_STARTTX_A) -> Self { - variant as u8 != 0 - } -} -impl LASTRX_STARTTX_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> LASTRX_STARTTX_A { - match self.bits { - false => LASTRX_STARTTX_A::DISABLED, - true => LASTRX_STARTTX_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == LASTRX_STARTTX_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == LASTRX_STARTTX_A::ENABLED - } -} -#[doc = "Field `LASTRX_STARTTX` writer - Shortcut between event LASTRX and task STARTTX"] -pub type LASTRX_STARTTX_W<'a, const O: u8> = - crate::BitWriter<'a, u32, SHORTS_SPEC, LASTRX_STARTTX_A, O>; -impl<'a, const O: u8> LASTRX_STARTTX_W<'a, O> { - #[doc = "Disable shortcut"] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(LASTRX_STARTTX_A::DISABLED) - } - #[doc = "Enable shortcut"] - #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(LASTRX_STARTTX_A::ENABLED) - } -} -#[doc = "Field `LASTRX_STOP` reader - Shortcut between event LASTRX and task STOP"] -pub type LASTRX_STOP_R = crate::BitReader; -#[doc = "Shortcut between event LASTRX and task STOP\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum LASTRX_STOP_A { - #[doc = "0: Disable shortcut"] - DISABLED = 0, - #[doc = "1: Enable shortcut"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: LASTRX_STOP_A) -> Self { - variant as u8 != 0 - } -} -impl LASTRX_STOP_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> LASTRX_STOP_A { - match self.bits { - false => LASTRX_STOP_A::DISABLED, - true => LASTRX_STOP_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == LASTRX_STOP_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == LASTRX_STOP_A::ENABLED - } -} -#[doc = "Field `LASTRX_STOP` writer - Shortcut between event LASTRX and task STOP"] -pub type LASTRX_STOP_W<'a, const O: u8> = crate::BitWriter<'a, u32, SHORTS_SPEC, LASTRX_STOP_A, O>; -impl<'a, const O: u8> LASTRX_STOP_W<'a, O> { - #[doc = "Disable shortcut"] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(LASTRX_STOP_A::DISABLED) - } - #[doc = "Enable shortcut"] - #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(LASTRX_STOP_A::ENABLED) - } -} -impl R { - #[doc = "Bit 7 - Shortcut between event LASTTX and task STARTRX"] - #[inline(always)] - pub fn lasttx_startrx(&self) -> LASTTX_STARTRX_R { - LASTTX_STARTRX_R::new(((self.bits >> 7) & 1) != 0) - } - #[doc = "Bit 8 - Shortcut between event LASTTX and task SUSPEND"] - #[inline(always)] - pub fn lasttx_suspend(&self) -> LASTTX_SUSPEND_R { - LASTTX_SUSPEND_R::new(((self.bits >> 8) & 1) != 0) - } - #[doc = "Bit 9 - Shortcut between event LASTTX and task STOP"] - #[inline(always)] - pub fn lasttx_stop(&self) -> LASTTX_STOP_R { - LASTTX_STOP_R::new(((self.bits >> 9) & 1) != 0) - } - #[doc = "Bit 10 - Shortcut between event LASTRX and task STARTTX"] - #[inline(always)] - pub fn lastrx_starttx(&self) -> LASTRX_STARTTX_R { - LASTRX_STARTTX_R::new(((self.bits >> 10) & 1) != 0) - } - #[doc = "Bit 12 - Shortcut between event LASTRX and task STOP"] - #[inline(always)] - pub fn lastrx_stop(&self) -> LASTRX_STOP_R { - LASTRX_STOP_R::new(((self.bits >> 12) & 1) != 0) - } -} -impl W { - #[doc = "Bit 7 - Shortcut between event LASTTX and task STARTRX"] - #[inline(always)] - #[must_use] - pub fn lasttx_startrx(&mut self) -> LASTTX_STARTRX_W<7> { - LASTTX_STARTRX_W::new(self) - } - #[doc = "Bit 8 - Shortcut between event LASTTX and task SUSPEND"] - #[inline(always)] - #[must_use] - pub fn lasttx_suspend(&mut self) -> LASTTX_SUSPEND_W<8> { - LASTTX_SUSPEND_W::new(self) - } - #[doc = "Bit 9 - Shortcut between event LASTTX and task STOP"] - #[inline(always)] - #[must_use] - pub fn lasttx_stop(&mut self) -> LASTTX_STOP_W<9> { - LASTTX_STOP_W::new(self) - } - #[doc = "Bit 10 - Shortcut between event LASTRX and task STARTTX"] - #[inline(always)] - #[must_use] - pub fn lastrx_starttx(&mut self) -> LASTRX_STARTTX_W<10> { - LASTRX_STARTTX_W::new(self) - } - #[doc = "Bit 12 - Shortcut between event LASTRX and task STOP"] - #[inline(always)] - #[must_use] - pub fn lastrx_stop(&mut self) -> LASTRX_STOP_W<12> { - LASTRX_STOP_W::new(self) - } - #[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 = "Shortcuts between local events and tasks\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 [shorts](index.html) module"] -pub struct SHORTS_SPEC; -impl crate::RegisterSpec for SHORTS_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [shorts::R](R) reader structure"] -impl crate::Readable for SHORTS_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [shorts::W](W) writer structure"] -impl crate::Writable for SHORTS_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets SHORTS to value 0"] -impl crate::Resettable for SHORTS_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/twim0/tasks_resume.rs b/down-the-stack/dk_pac/src/twim0/tasks_resume.rs deleted file mode 100644 index 47f0633..0000000 --- a/down-the-stack/dk_pac/src/twim0/tasks_resume.rs +++ /dev/null @@ -1,72 +0,0 @@ -#[doc = "Register `TASKS_RESUME` 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 = "Resume TWI transaction\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum TASKS_RESUME_AW { - #[doc = "1: Trigger task"] - TRIGGER = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: TASKS_RESUME_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `TASKS_RESUME` writer - Resume TWI transaction"] -pub type TASKS_RESUME_W<'a, const O: u8> = - crate::BitWriter<'a, u32, TASKS_RESUME_SPEC, TASKS_RESUME_AW, O>; -impl<'a, const O: u8> TASKS_RESUME_W<'a, O> { - #[doc = "Trigger task"] - #[inline(always)] - pub fn trigger(self) -> &'a mut W { - self.variant(TASKS_RESUME_AW::TRIGGER) - } -} -impl W { - #[doc = "Bit 0 - Resume TWI transaction"] - #[inline(always)] - #[must_use] - pub fn tasks_resume(&mut self) -> TASKS_RESUME_W<0> { - TASKS_RESUME_W::new(self) - } - #[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 = "Resume TWI transaction\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 [tasks_resume](index.html) module"] -pub struct TASKS_RESUME_SPEC; -impl crate::RegisterSpec for TASKS_RESUME_SPEC { - type Ux = u32; -} -#[doc = "`write(|w| ..)` method takes [tasks_resume::W](W) writer structure"] -impl crate::Writable for TASKS_RESUME_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets TASKS_RESUME to value 0"] -impl crate::Resettable for TASKS_RESUME_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/twim0/tasks_startrx.rs b/down-the-stack/dk_pac/src/twim0/tasks_startrx.rs deleted file mode 100644 index c090f10..0000000 --- a/down-the-stack/dk_pac/src/twim0/tasks_startrx.rs +++ /dev/null @@ -1,72 +0,0 @@ -#[doc = "Register `TASKS_STARTRX` 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 = "Start TWI receive sequence\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum TASKS_STARTRX_AW { - #[doc = "1: Trigger task"] - TRIGGER = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: TASKS_STARTRX_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `TASKS_STARTRX` writer - Start TWI receive sequence"] -pub type TASKS_STARTRX_W<'a, const O: u8> = - crate::BitWriter<'a, u32, TASKS_STARTRX_SPEC, TASKS_STARTRX_AW, O>; -impl<'a, const O: u8> TASKS_STARTRX_W<'a, O> { - #[doc = "Trigger task"] - #[inline(always)] - pub fn trigger(self) -> &'a mut W { - self.variant(TASKS_STARTRX_AW::TRIGGER) - } -} -impl W { - #[doc = "Bit 0 - Start TWI receive sequence"] - #[inline(always)] - #[must_use] - pub fn tasks_startrx(&mut self) -> TASKS_STARTRX_W<0> { - TASKS_STARTRX_W::new(self) - } - #[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 = "Start TWI receive sequence\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 [tasks_startrx](index.html) module"] -pub struct TASKS_STARTRX_SPEC; -impl crate::RegisterSpec for TASKS_STARTRX_SPEC { - type Ux = u32; -} -#[doc = "`write(|w| ..)` method takes [tasks_startrx::W](W) writer structure"] -impl crate::Writable for TASKS_STARTRX_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets TASKS_STARTRX to value 0"] -impl crate::Resettable for TASKS_STARTRX_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/twim0/tasks_starttx.rs b/down-the-stack/dk_pac/src/twim0/tasks_starttx.rs deleted file mode 100644 index a012c7b..0000000 --- a/down-the-stack/dk_pac/src/twim0/tasks_starttx.rs +++ /dev/null @@ -1,72 +0,0 @@ -#[doc = "Register `TASKS_STARTTX` 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 = "Start TWI transmit sequence\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum TASKS_STARTTX_AW { - #[doc = "1: Trigger task"] - TRIGGER = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: TASKS_STARTTX_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `TASKS_STARTTX` writer - Start TWI transmit sequence"] -pub type TASKS_STARTTX_W<'a, const O: u8> = - crate::BitWriter<'a, u32, TASKS_STARTTX_SPEC, TASKS_STARTTX_AW, O>; -impl<'a, const O: u8> TASKS_STARTTX_W<'a, O> { - #[doc = "Trigger task"] - #[inline(always)] - pub fn trigger(self) -> &'a mut W { - self.variant(TASKS_STARTTX_AW::TRIGGER) - } -} -impl W { - #[doc = "Bit 0 - Start TWI transmit sequence"] - #[inline(always)] - #[must_use] - pub fn tasks_starttx(&mut self) -> TASKS_STARTTX_W<0> { - TASKS_STARTTX_W::new(self) - } - #[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 = "Start TWI transmit sequence\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 [tasks_starttx](index.html) module"] -pub struct TASKS_STARTTX_SPEC; -impl crate::RegisterSpec for TASKS_STARTTX_SPEC { - type Ux = u32; -} -#[doc = "`write(|w| ..)` method takes [tasks_starttx::W](W) writer structure"] -impl crate::Writable for TASKS_STARTTX_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets TASKS_STARTTX to value 0"] -impl crate::Resettable for TASKS_STARTTX_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/twim0/tasks_stop.rs b/down-the-stack/dk_pac/src/twim0/tasks_stop.rs deleted file mode 100644 index 2fc8b5a..0000000 --- a/down-the-stack/dk_pac/src/twim0/tasks_stop.rs +++ /dev/null @@ -1,72 +0,0 @@ -#[doc = "Register `TASKS_STOP` 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 = "Stop TWI transaction. Must be issued while the TWI master is not suspended.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum TASKS_STOP_AW { - #[doc = "1: Trigger task"] - TRIGGER = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: TASKS_STOP_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `TASKS_STOP` writer - Stop TWI transaction. Must be issued while the TWI master is not suspended."] -pub type TASKS_STOP_W<'a, const O: u8> = - crate::BitWriter<'a, u32, TASKS_STOP_SPEC, TASKS_STOP_AW, O>; -impl<'a, const O: u8> TASKS_STOP_W<'a, O> { - #[doc = "Trigger task"] - #[inline(always)] - pub fn trigger(self) -> &'a mut W { - self.variant(TASKS_STOP_AW::TRIGGER) - } -} -impl W { - #[doc = "Bit 0 - Stop TWI transaction. Must be issued while the TWI master is not suspended."] - #[inline(always)] - #[must_use] - pub fn tasks_stop(&mut self) -> TASKS_STOP_W<0> { - TASKS_STOP_W::new(self) - } - #[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 = "Stop TWI transaction. Must be issued while the TWI master is not suspended.\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 [tasks_stop](index.html) module"] -pub struct TASKS_STOP_SPEC; -impl crate::RegisterSpec for TASKS_STOP_SPEC { - type Ux = u32; -} -#[doc = "`write(|w| ..)` method takes [tasks_stop::W](W) writer structure"] -impl crate::Writable for TASKS_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 TASKS_STOP to value 0"] -impl crate::Resettable for TASKS_STOP_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/twim0/tasks_suspend.rs b/down-the-stack/dk_pac/src/twim0/tasks_suspend.rs deleted file mode 100644 index ae6f325..0000000 --- a/down-the-stack/dk_pac/src/twim0/tasks_suspend.rs +++ /dev/null @@ -1,72 +0,0 @@ -#[doc = "Register `TASKS_SUSPEND` 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 = "Suspend TWI transaction\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum TASKS_SUSPEND_AW { - #[doc = "1: Trigger task"] - TRIGGER = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: TASKS_SUSPEND_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `TASKS_SUSPEND` writer - Suspend TWI transaction"] -pub type TASKS_SUSPEND_W<'a, const O: u8> = - crate::BitWriter<'a, u32, TASKS_SUSPEND_SPEC, TASKS_SUSPEND_AW, O>; -impl<'a, const O: u8> TASKS_SUSPEND_W<'a, O> { - #[doc = "Trigger task"] - #[inline(always)] - pub fn trigger(self) -> &'a mut W { - self.variant(TASKS_SUSPEND_AW::TRIGGER) - } -} -impl W { - #[doc = "Bit 0 - Suspend TWI transaction"] - #[inline(always)] - #[must_use] - pub fn tasks_suspend(&mut self) -> TASKS_SUSPEND_W<0> { - TASKS_SUSPEND_W::new(self) - } - #[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 = "Suspend TWI transaction\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 [tasks_suspend](index.html) module"] -pub struct TASKS_SUSPEND_SPEC; -impl crate::RegisterSpec for TASKS_SUSPEND_SPEC { - type Ux = u32; -} -#[doc = "`write(|w| ..)` method takes [tasks_suspend::W](W) writer structure"] -impl crate::Writable for TASKS_SUSPEND_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets TASKS_SUSPEND to value 0"] -impl crate::Resettable for TASKS_SUSPEND_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/twim0/txd.rs b/down-the-stack/dk_pac/src/twim0/txd.rs deleted file mode 100644 index 19ea101..0000000 --- a/down-the-stack/dk_pac/src/twim0/txd.rs +++ /dev/null @@ -1,28 +0,0 @@ -#[doc = r"Register block"] -#[repr(C)] -pub struct TXD { - #[doc = "0x00 - Data pointer"] - pub ptr: PTR, - #[doc = "0x04 - Maximum number of bytes in transmit buffer"] - pub maxcnt: MAXCNT, - #[doc = "0x08 - Number of bytes transferred in the last transaction"] - pub amount: AMOUNT, - #[doc = "0x0c - EasyDMA list type"] - pub list: LIST, -} -#[doc = "PTR (rw) register accessor: an alias for `Reg`"] -pub type PTR = crate::Reg; -#[doc = "Data pointer"] -pub mod ptr; -#[doc = "MAXCNT (rw) register accessor: an alias for `Reg`"] -pub type MAXCNT = crate::Reg; -#[doc = "Maximum number of bytes in transmit buffer"] -pub mod maxcnt; -#[doc = "AMOUNT (r) register accessor: an alias for `Reg`"] -pub type AMOUNT = crate::Reg; -#[doc = "Number of bytes transferred in the last transaction"] -pub mod amount; -#[doc = "LIST (rw) register accessor: an alias for `Reg`"] -pub type LIST = crate::Reg; -#[doc = "EasyDMA list type"] -pub mod list; diff --git a/down-the-stack/dk_pac/src/twim0/txd/amount.rs b/down-the-stack/dk_pac/src/twim0/txd/amount.rs deleted file mode 100644 index f149407..0000000 --- a/down-the-stack/dk_pac/src/twim0/txd/amount.rs +++ /dev/null @@ -1,37 +0,0 @@ -#[doc = "Register `AMOUNT` 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 = "Field `AMOUNT` reader - Number of bytes transferred in the last transaction. In case of NACK error, includes the NACK'ed byte."] -pub type AMOUNT_R = crate::FieldReader; -impl R { - #[doc = "Bits 0:7 - Number of bytes transferred in the last transaction. In case of NACK error, includes the NACK'ed byte."] - #[inline(always)] - pub fn amount(&self) -> AMOUNT_R { - AMOUNT_R::new((self.bits & 0xff) as u8) - } -} -#[doc = "Number of bytes transferred in the last transaction\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 [amount](index.html) module"] -pub struct AMOUNT_SPEC; -impl crate::RegisterSpec for AMOUNT_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [amount::R](R) reader structure"] -impl crate::Readable for AMOUNT_SPEC { - type Reader = R; -} -#[doc = "`reset()` method sets AMOUNT to value 0"] -impl crate::Resettable for AMOUNT_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/twim0/txd/list.rs b/down-the-stack/dk_pac/src/twim0/txd/list.rs deleted file mode 100644 index 05243a5..0000000 --- a/down-the-stack/dk_pac/src/twim0/txd/list.rs +++ /dev/null @@ -1,128 +0,0 @@ -#[doc = "Register `LIST` 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 `LIST` 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 `LIST` reader - List type"] -pub type LIST_R = crate::FieldReader; -#[doc = "List type\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -#[repr(u8)] -pub enum LIST_A { - #[doc = "0: Disable EasyDMA list"] - DISABLED = 0, - #[doc = "1: Use array list"] - ARRAY_LIST = 1, -} -impl From for u8 { - #[inline(always)] - fn from(variant: LIST_A) -> Self { - variant as _ - } -} -impl LIST_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> Option { - match self.bits { - 0 => Some(LIST_A::DISABLED), - 1 => Some(LIST_A::ARRAY_LIST), - _ => None, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == LIST_A::DISABLED - } - #[doc = "Checks if the value of the field is `ARRAY_LIST`"] - #[inline(always)] - pub fn is_array_list(&self) -> bool { - *self == LIST_A::ARRAY_LIST - } -} -#[doc = "Field `LIST` writer - List type"] -pub type LIST_W<'a, const O: u8> = crate::FieldWriter<'a, u32, LIST_SPEC, u8, LIST_A, 3, O>; -impl<'a, const O: u8> LIST_W<'a, O> { - #[doc = "Disable EasyDMA list"] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(LIST_A::DISABLED) - } - #[doc = "Use array list"] - #[inline(always)] - pub fn array_list(self) -> &'a mut W { - self.variant(LIST_A::ARRAY_LIST) - } -} -impl R { - #[doc = "Bits 0:2 - List type"] - #[inline(always)] - pub fn list(&self) -> LIST_R { - LIST_R::new((self.bits & 7) as u8) - } -} -impl W { - #[doc = "Bits 0:2 - List type"] - #[inline(always)] - #[must_use] - pub fn list(&mut self) -> LIST_W<0> { - LIST_W::new(self) - } - #[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 = "EasyDMA list type\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 [list](index.html) module"] -pub struct LIST_SPEC; -impl crate::RegisterSpec for LIST_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [list::R](R) reader structure"] -impl crate::Readable for LIST_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [list::W](W) writer structure"] -impl crate::Writable for LIST_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets LIST to value 0"] -impl crate::Resettable for LIST_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/twim0/txd/maxcnt.rs b/down-the-stack/dk_pac/src/twim0/txd/maxcnt.rs deleted file mode 100644 index 084733c..0000000 --- a/down-the-stack/dk_pac/src/twim0/txd/maxcnt.rs +++ /dev/null @@ -1,80 +0,0 @@ -#[doc = "Register `MAXCNT` 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 `MAXCNT` 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 `MAXCNT` reader - Maximum number of bytes in transmit buffer"] -pub type MAXCNT_R = crate::FieldReader; -#[doc = "Field `MAXCNT` writer - Maximum number of bytes in transmit buffer"] -pub type MAXCNT_W<'a, const O: u8> = crate::FieldWriter<'a, u32, MAXCNT_SPEC, u8, u8, 8, O>; -impl R { - #[doc = "Bits 0:7 - Maximum number of bytes in transmit buffer"] - #[inline(always)] - pub fn maxcnt(&self) -> MAXCNT_R { - MAXCNT_R::new((self.bits & 0xff) as u8) - } -} -impl W { - #[doc = "Bits 0:7 - Maximum number of bytes in transmit buffer"] - #[inline(always)] - #[must_use] - pub fn maxcnt(&mut self) -> MAXCNT_W<0> { - MAXCNT_W::new(self) - } - #[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 = "Maximum number of bytes in transmit buffer\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 [maxcnt](index.html) module"] -pub struct MAXCNT_SPEC; -impl crate::RegisterSpec for MAXCNT_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [maxcnt::R](R) reader structure"] -impl crate::Readable for MAXCNT_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [maxcnt::W](W) writer structure"] -impl crate::Writable for MAXCNT_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets MAXCNT to value 0"] -impl crate::Resettable for MAXCNT_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/twim0/txd/ptr.rs b/down-the-stack/dk_pac/src/twim0/txd/ptr.rs deleted file mode 100644 index 2f2c926..0000000 --- a/down-the-stack/dk_pac/src/twim0/txd/ptr.rs +++ /dev/null @@ -1,80 +0,0 @@ -#[doc = "Register `PTR` 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 `PTR` 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 `PTR` reader - Data pointer"] -pub type PTR_R = crate::FieldReader; -#[doc = "Field `PTR` writer - Data pointer"] -pub type PTR_W<'a, const O: u8> = crate::FieldWriter<'a, u32, PTR_SPEC, u32, u32, 32, O>; -impl R { - #[doc = "Bits 0:31 - Data pointer"] - #[inline(always)] - pub fn ptr(&self) -> PTR_R { - PTR_R::new(self.bits) - } -} -impl W { - #[doc = "Bits 0:31 - Data pointer"] - #[inline(always)] - #[must_use] - pub fn ptr(&mut self) -> PTR_W<0> { - PTR_W::new(self) - } - #[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 = "Data pointer\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 [ptr](index.html) module"] -pub struct PTR_SPEC; -impl crate::RegisterSpec for PTR_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [ptr::R](R) reader structure"] -impl crate::Readable for PTR_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [ptr::W](W) writer structure"] -impl crate::Writable for PTR_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets PTR to value 0"] -impl crate::Resettable for PTR_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/twis0.rs b/down-the-stack/dk_pac/src/twis0.rs deleted file mode 100644 index a5197ac..0000000 --- a/down-the-stack/dk_pac/src/twis0.rs +++ /dev/null @@ -1,168 +0,0 @@ -#[doc = r"Register block"] -#[repr(C)] -pub struct RegisterBlock { - _reserved0: [u8; 0x14], - #[doc = "0x14 - Stop TWI transaction"] - pub tasks_stop: TASKS_STOP, - _reserved1: [u8; 0x04], - #[doc = "0x1c - Suspend TWI transaction"] - pub tasks_suspend: TASKS_SUSPEND, - #[doc = "0x20 - Resume TWI transaction"] - pub tasks_resume: TASKS_RESUME, - _reserved3: [u8; 0x0c], - #[doc = "0x30 - Prepare the TWI slave to respond to a write command"] - pub tasks_preparerx: TASKS_PREPARERX, - #[doc = "0x34 - Prepare the TWI slave to respond to a read command"] - pub tasks_preparetx: TASKS_PREPARETX, - _reserved5: [u8; 0xcc], - #[doc = "0x104 - TWI stopped"] - pub events_stopped: EVENTS_STOPPED, - _reserved6: [u8; 0x1c], - #[doc = "0x124 - TWI error"] - pub events_error: EVENTS_ERROR, - _reserved7: [u8; 0x24], - #[doc = "0x14c - Receive sequence started"] - pub events_rxstarted: EVENTS_RXSTARTED, - #[doc = "0x150 - Transmit sequence started"] - pub events_txstarted: EVENTS_TXSTARTED, - _reserved9: [u8; 0x10], - #[doc = "0x164 - Write command received"] - pub events_write: EVENTS_WRITE, - #[doc = "0x168 - Read command received"] - pub events_read: EVENTS_READ, - _reserved11: [u8; 0x94], - #[doc = "0x200 - Shortcuts between local events and tasks"] - pub shorts: SHORTS, - _reserved12: [u8; 0xfc], - #[doc = "0x300 - Enable or disable interrupt"] - pub inten: INTEN, - #[doc = "0x304 - Enable interrupt"] - pub intenset: INTENSET, - #[doc = "0x308 - Disable interrupt"] - pub intenclr: INTENCLR, - _reserved15: [u8; 0x01c4], - #[doc = "0x4d0 - Error source"] - pub errorsrc: ERRORSRC, - #[doc = "0x4d4 - Status register indicating which address had a match"] - pub match_: MATCH, - _reserved17: [u8; 0x28], - #[doc = "0x500 - Enable TWIS"] - pub enable: ENABLE, - _reserved18: [u8; 0x04], - #[doc = "0x508..0x510 - Unspecified"] - pub psel: PSEL, - _reserved19: [u8; 0x24], - #[doc = "0x534..0x540 - RXD EasyDMA channel"] - pub rxd: RXD, - _reserved20: [u8; 0x04], - #[doc = "0x544..0x550 - TXD EasyDMA channel"] - pub txd: TXD, - _reserved21: [u8; 0x38], - #[doc = "0x588..0x590 - Description collection: TWI slave address n"] - pub address: [ADDRESS; 2], - _reserved22: [u8; 0x04], - #[doc = "0x594 - Configuration register for the address match mechanism"] - pub config: CONFIG, - _reserved23: [u8; 0x28], - #[doc = "0x5c0 - Over-read character. Character sent out in case of an over-read of the transmit buffer."] - pub orc: ORC, -} -#[doc = "TASKS_STOP (w) register accessor: an alias for `Reg`"] -pub type TASKS_STOP = crate::Reg; -#[doc = "Stop TWI transaction"] -pub mod tasks_stop; -#[doc = "TASKS_SUSPEND (w) register accessor: an alias for `Reg`"] -pub type TASKS_SUSPEND = crate::Reg; -#[doc = "Suspend TWI transaction"] -pub mod tasks_suspend; -#[doc = "TASKS_RESUME (w) register accessor: an alias for `Reg`"] -pub type TASKS_RESUME = crate::Reg; -#[doc = "Resume TWI transaction"] -pub mod tasks_resume; -#[doc = "TASKS_PREPARERX (w) register accessor: an alias for `Reg`"] -pub type TASKS_PREPARERX = crate::Reg; -#[doc = "Prepare the TWI slave to respond to a write command"] -pub mod tasks_preparerx; -#[doc = "TASKS_PREPARETX (w) register accessor: an alias for `Reg`"] -pub type TASKS_PREPARETX = crate::Reg; -#[doc = "Prepare the TWI slave to respond to a read command"] -pub mod tasks_preparetx; -#[doc = "EVENTS_STOPPED (rw) register accessor: an alias for `Reg`"] -pub type EVENTS_STOPPED = crate::Reg; -#[doc = "TWI stopped"] -pub mod events_stopped; -#[doc = "EVENTS_ERROR (rw) register accessor: an alias for `Reg`"] -pub type EVENTS_ERROR = crate::Reg; -#[doc = "TWI error"] -pub mod events_error; -#[doc = "EVENTS_RXSTARTED (rw) register accessor: an alias for `Reg`"] -pub type EVENTS_RXSTARTED = crate::Reg; -#[doc = "Receive sequence started"] -pub mod events_rxstarted; -#[doc = "EVENTS_TXSTARTED (rw) register accessor: an alias for `Reg`"] -pub type EVENTS_TXSTARTED = crate::Reg; -#[doc = "Transmit sequence started"] -pub mod events_txstarted; -#[doc = "EVENTS_WRITE (rw) register accessor: an alias for `Reg`"] -pub type EVENTS_WRITE = crate::Reg; -#[doc = "Write command received"] -pub mod events_write; -#[doc = "EVENTS_READ (rw) register accessor: an alias for `Reg`"] -pub type EVENTS_READ = crate::Reg; -#[doc = "Read command received"] -pub mod events_read; -#[doc = "SHORTS (rw) register accessor: an alias for `Reg`"] -pub type SHORTS = crate::Reg; -#[doc = "Shortcuts between local events and tasks"] -pub mod shorts; -#[doc = "INTEN (rw) register accessor: an alias for `Reg`"] -pub type INTEN = crate::Reg; -#[doc = "Enable or disable interrupt"] -pub mod inten; -#[doc = "INTENSET (rw) register accessor: an alias for `Reg`"] -pub type INTENSET = crate::Reg; -#[doc = "Enable interrupt"] -pub mod intenset; -#[doc = "INTENCLR (rw) register accessor: an alias for `Reg`"] -pub type INTENCLR = crate::Reg; -#[doc = "Disable interrupt"] -pub mod intenclr; -#[doc = "ERRORSRC (rw) register accessor: an alias for `Reg`"] -pub type ERRORSRC = crate::Reg; -#[doc = "Error source"] -pub mod errorsrc; -#[doc = "MATCH (r) register accessor: an alias for `Reg`"] -pub type MATCH = crate::Reg; -#[doc = "Status register indicating which address had a match"] -pub mod match_; -#[doc = "ENABLE (rw) register accessor: an alias for `Reg`"] -pub type ENABLE = crate::Reg; -#[doc = "Enable TWIS"] -pub mod enable; -#[doc = "Unspecified"] -pub use self::psel::PSEL; -#[doc = r"Cluster"] -#[doc = "Unspecified"] -pub mod psel; -#[doc = "RXD EasyDMA channel"] -pub use self::rxd::RXD; -#[doc = r"Cluster"] -#[doc = "RXD EasyDMA channel"] -pub mod rxd; -#[doc = "TXD EasyDMA channel"] -pub use self::txd::TXD; -#[doc = r"Cluster"] -#[doc = "TXD EasyDMA channel"] -pub mod txd; -#[doc = "ADDRESS (rw) register accessor: an alias for `Reg`"] -pub type ADDRESS = crate::Reg; -#[doc = "Description collection: TWI slave address n"] -pub mod address; -#[doc = "CONFIG (rw) register accessor: an alias for `Reg`"] -pub type CONFIG = crate::Reg; -#[doc = "Configuration register for the address match mechanism"] -pub mod config; -#[doc = "ORC (rw) register accessor: an alias for `Reg`"] -pub type ORC = crate::Reg; -#[doc = "Over-read character. Character sent out in case of an over-read of the transmit buffer."] -pub mod orc; diff --git a/down-the-stack/dk_pac/src/twis0/address.rs b/down-the-stack/dk_pac/src/twis0/address.rs deleted file mode 100644 index 9cbf33e..0000000 --- a/down-the-stack/dk_pac/src/twis0/address.rs +++ /dev/null @@ -1,81 +0,0 @@ -#[doc = "Register `ADDRESS[%s]` 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 `ADDRESS[%s]` 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 `ADDRESS` reader - TWI slave address"] -pub type ADDRESS_R = crate::FieldReader; -#[doc = "Field `ADDRESS` writer - TWI slave address"] -pub type ADDRESS_W<'a, const O: u8> = crate::FieldWriter<'a, u32, ADDRESS_SPEC, u8, u8, 7, O>; -impl R { - #[doc = "Bits 0:6 - TWI slave address"] - #[inline(always)] - pub fn address(&self) -> ADDRESS_R { - ADDRESS_R::new((self.bits & 0x7f) as u8) - } -} -impl W { - #[doc = "Bits 0:6 - TWI slave address"] - #[inline(always)] - #[must_use] - pub fn address(&mut self) -> ADDRESS_W<0> { - ADDRESS_W::new(self) - } - #[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 = "Description collection: TWI slave address n\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 [address](index.html) module"] -pub struct ADDRESS_SPEC; -impl crate::RegisterSpec for ADDRESS_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [address::R](R) reader structure"] -impl crate::Readable for ADDRESS_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [address::W](W) writer structure"] -impl crate::Writable for ADDRESS_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets ADDRESS[%s] -to value 0"] -impl crate::Resettable for ADDRESS_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/twis0/config.rs b/down-the-stack/dk_pac/src/twis0/config.rs deleted file mode 100644 index 9be61fb..0000000 --- a/down-the-stack/dk_pac/src/twis0/config.rs +++ /dev/null @@ -1,187 +0,0 @@ -#[doc = "Register `CONFIG` 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 `CONFIG` 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 `ADDRESS0` reader - Enable or disable address matching on ADDRESS\\[0\\]"] -pub type ADDRESS0_R = crate::BitReader; -#[doc = "Enable or disable address matching on ADDRESS\\[0\\]\n\nValue on reset: 1"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum ADDRESS0_A { - #[doc = "0: Disabled"] - DISABLED = 0, - #[doc = "1: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: ADDRESS0_A) -> Self { - variant as u8 != 0 - } -} -impl ADDRESS0_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> ADDRESS0_A { - match self.bits { - false => ADDRESS0_A::DISABLED, - true => ADDRESS0_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == ADDRESS0_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == ADDRESS0_A::ENABLED - } -} -#[doc = "Field `ADDRESS0` writer - Enable or disable address matching on ADDRESS\\[0\\]"] -pub type ADDRESS0_W<'a, const O: u8> = crate::BitWriter<'a, u32, CONFIG_SPEC, ADDRESS0_A, O>; -impl<'a, const O: u8> ADDRESS0_W<'a, O> { - #[doc = "Disabled"] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(ADDRESS0_A::DISABLED) - } - #[doc = "Enabled"] - #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(ADDRESS0_A::ENABLED) - } -} -#[doc = "Field `ADDRESS1` reader - Enable or disable address matching on ADDRESS\\[1\\]"] -pub type ADDRESS1_R = crate::BitReader; -#[doc = "Enable or disable address matching on ADDRESS\\[1\\]\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum ADDRESS1_A { - #[doc = "0: Disabled"] - DISABLED = 0, - #[doc = "1: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: ADDRESS1_A) -> Self { - variant as u8 != 0 - } -} -impl ADDRESS1_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> ADDRESS1_A { - match self.bits { - false => ADDRESS1_A::DISABLED, - true => ADDRESS1_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == ADDRESS1_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == ADDRESS1_A::ENABLED - } -} -#[doc = "Field `ADDRESS1` writer - Enable or disable address matching on ADDRESS\\[1\\]"] -pub type ADDRESS1_W<'a, const O: u8> = crate::BitWriter<'a, u32, CONFIG_SPEC, ADDRESS1_A, O>; -impl<'a, const O: u8> ADDRESS1_W<'a, O> { - #[doc = "Disabled"] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(ADDRESS1_A::DISABLED) - } - #[doc = "Enabled"] - #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(ADDRESS1_A::ENABLED) - } -} -impl R { - #[doc = "Bit 0 - Enable or disable address matching on ADDRESS\\[0\\]"] - #[inline(always)] - pub fn address0(&self) -> ADDRESS0_R { - ADDRESS0_R::new((self.bits & 1) != 0) - } - #[doc = "Bit 1 - Enable or disable address matching on ADDRESS\\[1\\]"] - #[inline(always)] - pub fn address1(&self) -> ADDRESS1_R { - ADDRESS1_R::new(((self.bits >> 1) & 1) != 0) - } -} -impl W { - #[doc = "Bit 0 - Enable or disable address matching on ADDRESS\\[0\\]"] - #[inline(always)] - #[must_use] - pub fn address0(&mut self) -> ADDRESS0_W<0> { - ADDRESS0_W::new(self) - } - #[doc = "Bit 1 - Enable or disable address matching on ADDRESS\\[1\\]"] - #[inline(always)] - #[must_use] - pub fn address1(&mut self) -> ADDRESS1_W<1> { - ADDRESS1_W::new(self) - } - #[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 = "Configuration register for the address match mechanism\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 [config](index.html) module"] -pub struct CONFIG_SPEC; -impl crate::RegisterSpec for CONFIG_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [config::R](R) reader structure"] -impl crate::Readable for CONFIG_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [config::W](W) writer structure"] -impl crate::Writable for 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 CONFIG to value 0x01"] -impl crate::Resettable for CONFIG_SPEC { - const RESET_VALUE: Self::Ux = 0x01; -} diff --git a/down-the-stack/dk_pac/src/twis0/enable.rs b/down-the-stack/dk_pac/src/twis0/enable.rs deleted file mode 100644 index 9f34186..0000000 --- a/down-the-stack/dk_pac/src/twis0/enable.rs +++ /dev/null @@ -1,128 +0,0 @@ -#[doc = "Register `ENABLE` 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 `ENABLE` 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 `ENABLE` reader - Enable or disable TWIS"] -pub type ENABLE_R = crate::FieldReader; -#[doc = "Enable or disable TWIS\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -#[repr(u8)] -pub enum ENABLE_A { - #[doc = "0: Disable TWIS"] - DISABLED = 0, - #[doc = "9: Enable TWIS"] - ENABLED = 9, -} -impl From for u8 { - #[inline(always)] - fn from(variant: ENABLE_A) -> Self { - variant as _ - } -} -impl ENABLE_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> Option { - match self.bits { - 0 => Some(ENABLE_A::DISABLED), - 9 => Some(ENABLE_A::ENABLED), - _ => None, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == ENABLE_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == ENABLE_A::ENABLED - } -} -#[doc = "Field `ENABLE` writer - Enable or disable TWIS"] -pub type ENABLE_W<'a, const O: u8> = crate::FieldWriter<'a, u32, ENABLE_SPEC, u8, ENABLE_A, 4, O>; -impl<'a, const O: u8> ENABLE_W<'a, O> { - #[doc = "Disable TWIS"] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(ENABLE_A::DISABLED) - } - #[doc = "Enable TWIS"] - #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(ENABLE_A::ENABLED) - } -} -impl R { - #[doc = "Bits 0:3 - Enable or disable TWIS"] - #[inline(always)] - pub fn enable(&self) -> ENABLE_R { - ENABLE_R::new((self.bits & 0x0f) as u8) - } -} -impl W { - #[doc = "Bits 0:3 - Enable or disable TWIS"] - #[inline(always)] - #[must_use] - pub fn enable(&mut self) -> ENABLE_W<0> { - 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 - } -} -#[doc = "Enable TWIS\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 [enable](index.html) module"] -pub struct ENABLE_SPEC; -impl crate::RegisterSpec for ENABLE_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [enable::R](R) reader structure"] -impl crate::Readable for ENABLE_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [enable::W](W) writer structure"] -impl crate::Writable for ENABLE_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets ENABLE to value 0"] -impl crate::Resettable for ENABLE_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/twis0/errorsrc.rs b/down-the-stack/dk_pac/src/twis0/errorsrc.rs deleted file mode 100644 index 322f6bc..0000000 --- a/down-the-stack/dk_pac/src/twis0/errorsrc.rs +++ /dev/null @@ -1,248 +0,0 @@ -#[doc = "Register `ERRORSRC` 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 `ERRORSRC` 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 `OVERFLOW` reader - RX buffer overflow detected, and prevented"] -pub type OVERFLOW_R = crate::BitReader; -#[doc = "RX buffer overflow detected, and prevented\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum OVERFLOW_A { - #[doc = "0: Error did not occur"] - NOT_DETECTED = 0, - #[doc = "1: Error occurred"] - DETECTED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: OVERFLOW_A) -> Self { - variant as u8 != 0 - } -} -impl OVERFLOW_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> OVERFLOW_A { - match self.bits { - false => OVERFLOW_A::NOT_DETECTED, - true => OVERFLOW_A::DETECTED, - } - } - #[doc = "Checks if the value of the field is `NOT_DETECTED`"] - #[inline(always)] - pub fn is_not_detected(&self) -> bool { - *self == OVERFLOW_A::NOT_DETECTED - } - #[doc = "Checks if the value of the field is `DETECTED`"] - #[inline(always)] - pub fn is_detected(&self) -> bool { - *self == OVERFLOW_A::DETECTED - } -} -#[doc = "Field `OVERFLOW` writer - RX buffer overflow detected, and prevented"] -pub type OVERFLOW_W<'a, const O: u8> = crate::BitWriter1C<'a, u32, ERRORSRC_SPEC, OVERFLOW_A, O>; -impl<'a, const O: u8> OVERFLOW_W<'a, O> { - #[doc = "Error did not occur"] - #[inline(always)] - pub fn not_detected(self) -> &'a mut W { - self.variant(OVERFLOW_A::NOT_DETECTED) - } - #[doc = "Error occurred"] - #[inline(always)] - pub fn detected(self) -> &'a mut W { - self.variant(OVERFLOW_A::DETECTED) - } -} -#[doc = "Field `DNACK` reader - NACK sent after receiving a data byte"] -pub type DNACK_R = crate::BitReader; -#[doc = "NACK sent after receiving a data byte\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum DNACK_A { - #[doc = "0: Error did not occur"] - NOT_RECEIVED = 0, - #[doc = "1: Error occurred"] - RECEIVED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: DNACK_A) -> Self { - variant as u8 != 0 - } -} -impl DNACK_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> DNACK_A { - match self.bits { - false => DNACK_A::NOT_RECEIVED, - true => DNACK_A::RECEIVED, - } - } - #[doc = "Checks if the value of the field is `NOT_RECEIVED`"] - #[inline(always)] - pub fn is_not_received(&self) -> bool { - *self == DNACK_A::NOT_RECEIVED - } - #[doc = "Checks if the value of the field is `RECEIVED`"] - #[inline(always)] - pub fn is_received(&self) -> bool { - *self == DNACK_A::RECEIVED - } -} -#[doc = "Field `DNACK` writer - NACK sent after receiving a data byte"] -pub type DNACK_W<'a, const O: u8> = crate::BitWriter1C<'a, u32, ERRORSRC_SPEC, DNACK_A, O>; -impl<'a, const O: u8> DNACK_W<'a, O> { - #[doc = "Error did not occur"] - #[inline(always)] - pub fn not_received(self) -> &'a mut W { - self.variant(DNACK_A::NOT_RECEIVED) - } - #[doc = "Error occurred"] - #[inline(always)] - pub fn received(self) -> &'a mut W { - self.variant(DNACK_A::RECEIVED) - } -} -#[doc = "Field `OVERREAD` reader - TX buffer over-read detected, and prevented"] -pub type OVERREAD_R = crate::BitReader; -#[doc = "TX buffer over-read detected, and prevented\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum OVERREAD_A { - #[doc = "0: Error did not occur"] - NOT_DETECTED = 0, - #[doc = "1: Error occurred"] - DETECTED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: OVERREAD_A) -> Self { - variant as u8 != 0 - } -} -impl OVERREAD_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> OVERREAD_A { - match self.bits { - false => OVERREAD_A::NOT_DETECTED, - true => OVERREAD_A::DETECTED, - } - } - #[doc = "Checks if the value of the field is `NOT_DETECTED`"] - #[inline(always)] - pub fn is_not_detected(&self) -> bool { - *self == OVERREAD_A::NOT_DETECTED - } - #[doc = "Checks if the value of the field is `DETECTED`"] - #[inline(always)] - pub fn is_detected(&self) -> bool { - *self == OVERREAD_A::DETECTED - } -} -#[doc = "Field `OVERREAD` writer - TX buffer over-read detected, and prevented"] -pub type OVERREAD_W<'a, const O: u8> = crate::BitWriter1C<'a, u32, ERRORSRC_SPEC, OVERREAD_A, O>; -impl<'a, const O: u8> OVERREAD_W<'a, O> { - #[doc = "Error did not occur"] - #[inline(always)] - pub fn not_detected(self) -> &'a mut W { - self.variant(OVERREAD_A::NOT_DETECTED) - } - #[doc = "Error occurred"] - #[inline(always)] - pub fn detected(self) -> &'a mut W { - self.variant(OVERREAD_A::DETECTED) - } -} -impl R { - #[doc = "Bit 0 - RX buffer overflow detected, and prevented"] - #[inline(always)] - pub fn overflow(&self) -> OVERFLOW_R { - OVERFLOW_R::new((self.bits & 1) != 0) - } - #[doc = "Bit 2 - NACK sent after receiving a data byte"] - #[inline(always)] - pub fn dnack(&self) -> DNACK_R { - DNACK_R::new(((self.bits >> 2) & 1) != 0) - } - #[doc = "Bit 3 - TX buffer over-read detected, and prevented"] - #[inline(always)] - pub fn overread(&self) -> OVERREAD_R { - OVERREAD_R::new(((self.bits >> 3) & 1) != 0) - } -} -impl W { - #[doc = "Bit 0 - RX buffer overflow detected, and prevented"] - #[inline(always)] - #[must_use] - pub fn overflow(&mut self) -> OVERFLOW_W<0> { - OVERFLOW_W::new(self) - } - #[doc = "Bit 2 - NACK sent after receiving a data byte"] - #[inline(always)] - #[must_use] - pub fn dnack(&mut self) -> DNACK_W<2> { - DNACK_W::new(self) - } - #[doc = "Bit 3 - TX buffer over-read detected, and prevented"] - #[inline(always)] - #[must_use] - pub fn overread(&mut self) -> OVERREAD_W<3> { - OVERREAD_W::new(self) - } - #[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 = "Error source\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 [errorsrc](index.html) module"] -pub struct ERRORSRC_SPEC; -impl crate::RegisterSpec for ERRORSRC_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [errorsrc::R](R) reader structure"] -impl crate::Readable for ERRORSRC_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [errorsrc::W](W) writer structure"] -impl crate::Writable for ERRORSRC_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0x0d; -} -#[doc = "`reset()` method sets ERRORSRC to value 0"] -impl crate::Resettable for ERRORSRC_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/twis0/events_error.rs b/down-the-stack/dk_pac/src/twis0/events_error.rs deleted file mode 100644 index 05b214c..0000000 --- a/down-the-stack/dk_pac/src/twis0/events_error.rs +++ /dev/null @@ -1,127 +0,0 @@ -#[doc = "Register `EVENTS_ERROR` 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 `EVENTS_ERROR` 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 `EVENTS_ERROR` reader - TWI error"] -pub type EVENTS_ERROR_R = crate::BitReader; -#[doc = "TWI error\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum EVENTS_ERROR_A { - #[doc = "0: Event not generated"] - NOT_GENERATED = 0, - #[doc = "1: Event generated"] - GENERATED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: EVENTS_ERROR_A) -> Self { - variant as u8 != 0 - } -} -impl EVENTS_ERROR_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> EVENTS_ERROR_A { - match self.bits { - false => EVENTS_ERROR_A::NOT_GENERATED, - true => EVENTS_ERROR_A::GENERATED, - } - } - #[doc = "Checks if the value of the field is `NOT_GENERATED`"] - #[inline(always)] - pub fn is_not_generated(&self) -> bool { - *self == EVENTS_ERROR_A::NOT_GENERATED - } - #[doc = "Checks if the value of the field is `GENERATED`"] - #[inline(always)] - pub fn is_generated(&self) -> bool { - *self == EVENTS_ERROR_A::GENERATED - } -} -#[doc = "Field `EVENTS_ERROR` writer - TWI error"] -pub type EVENTS_ERROR_W<'a, const O: u8> = - crate::BitWriter<'a, u32, EVENTS_ERROR_SPEC, EVENTS_ERROR_A, O>; -impl<'a, const O: u8> EVENTS_ERROR_W<'a, O> { - #[doc = "Event not generated"] - #[inline(always)] - pub fn not_generated(self) -> &'a mut W { - self.variant(EVENTS_ERROR_A::NOT_GENERATED) - } - #[doc = "Event generated"] - #[inline(always)] - pub fn generated(self) -> &'a mut W { - self.variant(EVENTS_ERROR_A::GENERATED) - } -} -impl R { - #[doc = "Bit 0 - TWI error"] - #[inline(always)] - pub fn events_error(&self) -> EVENTS_ERROR_R { - EVENTS_ERROR_R::new((self.bits & 1) != 0) - } -} -impl W { - #[doc = "Bit 0 - TWI error"] - #[inline(always)] - #[must_use] - pub fn events_error(&mut self) -> EVENTS_ERROR_W<0> { - EVENTS_ERROR_W::new(self) - } - #[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 = "TWI error\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 [events_error](index.html) module"] -pub struct EVENTS_ERROR_SPEC; -impl crate::RegisterSpec for EVENTS_ERROR_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [events_error::R](R) reader structure"] -impl crate::Readable for EVENTS_ERROR_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [events_error::W](W) writer structure"] -impl crate::Writable for EVENTS_ERROR_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets EVENTS_ERROR to value 0"] -impl crate::Resettable for EVENTS_ERROR_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/twis0/events_read.rs b/down-the-stack/dk_pac/src/twis0/events_read.rs deleted file mode 100644 index e7cba96..0000000 --- a/down-the-stack/dk_pac/src/twis0/events_read.rs +++ /dev/null @@ -1,127 +0,0 @@ -#[doc = "Register `EVENTS_READ` 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 `EVENTS_READ` 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 `EVENTS_READ` reader - Read command received"] -pub type EVENTS_READ_R = crate::BitReader; -#[doc = "Read command received\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum EVENTS_READ_A { - #[doc = "0: Event not generated"] - NOT_GENERATED = 0, - #[doc = "1: Event generated"] - GENERATED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: EVENTS_READ_A) -> Self { - variant as u8 != 0 - } -} -impl EVENTS_READ_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> EVENTS_READ_A { - match self.bits { - false => EVENTS_READ_A::NOT_GENERATED, - true => EVENTS_READ_A::GENERATED, - } - } - #[doc = "Checks if the value of the field is `NOT_GENERATED`"] - #[inline(always)] - pub fn is_not_generated(&self) -> bool { - *self == EVENTS_READ_A::NOT_GENERATED - } - #[doc = "Checks if the value of the field is `GENERATED`"] - #[inline(always)] - pub fn is_generated(&self) -> bool { - *self == EVENTS_READ_A::GENERATED - } -} -#[doc = "Field `EVENTS_READ` writer - Read command received"] -pub type EVENTS_READ_W<'a, const O: u8> = - crate::BitWriter<'a, u32, EVENTS_READ_SPEC, EVENTS_READ_A, O>; -impl<'a, const O: u8> EVENTS_READ_W<'a, O> { - #[doc = "Event not generated"] - #[inline(always)] - pub fn not_generated(self) -> &'a mut W { - self.variant(EVENTS_READ_A::NOT_GENERATED) - } - #[doc = "Event generated"] - #[inline(always)] - pub fn generated(self) -> &'a mut W { - self.variant(EVENTS_READ_A::GENERATED) - } -} -impl R { - #[doc = "Bit 0 - Read command received"] - #[inline(always)] - pub fn events_read(&self) -> EVENTS_READ_R { - EVENTS_READ_R::new((self.bits & 1) != 0) - } -} -impl W { - #[doc = "Bit 0 - Read command received"] - #[inline(always)] - #[must_use] - pub fn events_read(&mut self) -> EVENTS_READ_W<0> { - EVENTS_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 - } -} -#[doc = "Read command received\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 [events_read](index.html) module"] -pub struct EVENTS_READ_SPEC; -impl crate::RegisterSpec for EVENTS_READ_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [events_read::R](R) reader structure"] -impl crate::Readable for EVENTS_READ_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [events_read::W](W) writer structure"] -impl crate::Writable for EVENTS_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 EVENTS_READ to value 0"] -impl crate::Resettable for EVENTS_READ_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/twis0/events_rxstarted.rs b/down-the-stack/dk_pac/src/twis0/events_rxstarted.rs deleted file mode 100644 index 194b098..0000000 --- a/down-the-stack/dk_pac/src/twis0/events_rxstarted.rs +++ /dev/null @@ -1,127 +0,0 @@ -#[doc = "Register `EVENTS_RXSTARTED` 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 `EVENTS_RXSTARTED` 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 `EVENTS_RXSTARTED` reader - Receive sequence started"] -pub type EVENTS_RXSTARTED_R = crate::BitReader; -#[doc = "Receive sequence started\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum EVENTS_RXSTARTED_A { - #[doc = "0: Event not generated"] - NOT_GENERATED = 0, - #[doc = "1: Event generated"] - GENERATED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: EVENTS_RXSTARTED_A) -> Self { - variant as u8 != 0 - } -} -impl EVENTS_RXSTARTED_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> EVENTS_RXSTARTED_A { - match self.bits { - false => EVENTS_RXSTARTED_A::NOT_GENERATED, - true => EVENTS_RXSTARTED_A::GENERATED, - } - } - #[doc = "Checks if the value of the field is `NOT_GENERATED`"] - #[inline(always)] - pub fn is_not_generated(&self) -> bool { - *self == EVENTS_RXSTARTED_A::NOT_GENERATED - } - #[doc = "Checks if the value of the field is `GENERATED`"] - #[inline(always)] - pub fn is_generated(&self) -> bool { - *self == EVENTS_RXSTARTED_A::GENERATED - } -} -#[doc = "Field `EVENTS_RXSTARTED` writer - Receive sequence started"] -pub type EVENTS_RXSTARTED_W<'a, const O: u8> = - crate::BitWriter<'a, u32, EVENTS_RXSTARTED_SPEC, EVENTS_RXSTARTED_A, O>; -impl<'a, const O: u8> EVENTS_RXSTARTED_W<'a, O> { - #[doc = "Event not generated"] - #[inline(always)] - pub fn not_generated(self) -> &'a mut W { - self.variant(EVENTS_RXSTARTED_A::NOT_GENERATED) - } - #[doc = "Event generated"] - #[inline(always)] - pub fn generated(self) -> &'a mut W { - self.variant(EVENTS_RXSTARTED_A::GENERATED) - } -} -impl R { - #[doc = "Bit 0 - Receive sequence started"] - #[inline(always)] - pub fn events_rxstarted(&self) -> EVENTS_RXSTARTED_R { - EVENTS_RXSTARTED_R::new((self.bits & 1) != 0) - } -} -impl W { - #[doc = "Bit 0 - Receive sequence started"] - #[inline(always)] - #[must_use] - pub fn events_rxstarted(&mut self) -> EVENTS_RXSTARTED_W<0> { - EVENTS_RXSTARTED_W::new(self) - } - #[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 = "Receive sequence started\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 [events_rxstarted](index.html) module"] -pub struct EVENTS_RXSTARTED_SPEC; -impl crate::RegisterSpec for EVENTS_RXSTARTED_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [events_rxstarted::R](R) reader structure"] -impl crate::Readable for EVENTS_RXSTARTED_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [events_rxstarted::W](W) writer structure"] -impl crate::Writable for EVENTS_RXSTARTED_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets EVENTS_RXSTARTED to value 0"] -impl crate::Resettable for EVENTS_RXSTARTED_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/twis0/events_stopped.rs b/down-the-stack/dk_pac/src/twis0/events_stopped.rs deleted file mode 100644 index 4663646..0000000 --- a/down-the-stack/dk_pac/src/twis0/events_stopped.rs +++ /dev/null @@ -1,127 +0,0 @@ -#[doc = "Register `EVENTS_STOPPED` 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 `EVENTS_STOPPED` 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 `EVENTS_STOPPED` reader - TWI stopped"] -pub type EVENTS_STOPPED_R = crate::BitReader; -#[doc = "TWI stopped\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum EVENTS_STOPPED_A { - #[doc = "0: Event not generated"] - NOT_GENERATED = 0, - #[doc = "1: Event generated"] - GENERATED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: EVENTS_STOPPED_A) -> Self { - variant as u8 != 0 - } -} -impl EVENTS_STOPPED_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> EVENTS_STOPPED_A { - match self.bits { - false => EVENTS_STOPPED_A::NOT_GENERATED, - true => EVENTS_STOPPED_A::GENERATED, - } - } - #[doc = "Checks if the value of the field is `NOT_GENERATED`"] - #[inline(always)] - pub fn is_not_generated(&self) -> bool { - *self == EVENTS_STOPPED_A::NOT_GENERATED - } - #[doc = "Checks if the value of the field is `GENERATED`"] - #[inline(always)] - pub fn is_generated(&self) -> bool { - *self == EVENTS_STOPPED_A::GENERATED - } -} -#[doc = "Field `EVENTS_STOPPED` writer - TWI stopped"] -pub type EVENTS_STOPPED_W<'a, const O: u8> = - crate::BitWriter<'a, u32, EVENTS_STOPPED_SPEC, EVENTS_STOPPED_A, O>; -impl<'a, const O: u8> EVENTS_STOPPED_W<'a, O> { - #[doc = "Event not generated"] - #[inline(always)] - pub fn not_generated(self) -> &'a mut W { - self.variant(EVENTS_STOPPED_A::NOT_GENERATED) - } - #[doc = "Event generated"] - #[inline(always)] - pub fn generated(self) -> &'a mut W { - self.variant(EVENTS_STOPPED_A::GENERATED) - } -} -impl R { - #[doc = "Bit 0 - TWI stopped"] - #[inline(always)] - pub fn events_stopped(&self) -> EVENTS_STOPPED_R { - EVENTS_STOPPED_R::new((self.bits & 1) != 0) - } -} -impl W { - #[doc = "Bit 0 - TWI stopped"] - #[inline(always)] - #[must_use] - pub fn events_stopped(&mut self) -> EVENTS_STOPPED_W<0> { - EVENTS_STOPPED_W::new(self) - } - #[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 = "TWI stopped\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 [events_stopped](index.html) module"] -pub struct EVENTS_STOPPED_SPEC; -impl crate::RegisterSpec for EVENTS_STOPPED_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [events_stopped::R](R) reader structure"] -impl crate::Readable for EVENTS_STOPPED_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [events_stopped::W](W) writer structure"] -impl crate::Writable for EVENTS_STOPPED_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets EVENTS_STOPPED to value 0"] -impl crate::Resettable for EVENTS_STOPPED_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/twis0/events_txstarted.rs b/down-the-stack/dk_pac/src/twis0/events_txstarted.rs deleted file mode 100644 index 0cb2e84..0000000 --- a/down-the-stack/dk_pac/src/twis0/events_txstarted.rs +++ /dev/null @@ -1,127 +0,0 @@ -#[doc = "Register `EVENTS_TXSTARTED` 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 `EVENTS_TXSTARTED` 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 `EVENTS_TXSTARTED` reader - Transmit sequence started"] -pub type EVENTS_TXSTARTED_R = crate::BitReader; -#[doc = "Transmit sequence started\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum EVENTS_TXSTARTED_A { - #[doc = "0: Event not generated"] - NOT_GENERATED = 0, - #[doc = "1: Event generated"] - GENERATED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: EVENTS_TXSTARTED_A) -> Self { - variant as u8 != 0 - } -} -impl EVENTS_TXSTARTED_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> EVENTS_TXSTARTED_A { - match self.bits { - false => EVENTS_TXSTARTED_A::NOT_GENERATED, - true => EVENTS_TXSTARTED_A::GENERATED, - } - } - #[doc = "Checks if the value of the field is `NOT_GENERATED`"] - #[inline(always)] - pub fn is_not_generated(&self) -> bool { - *self == EVENTS_TXSTARTED_A::NOT_GENERATED - } - #[doc = "Checks if the value of the field is `GENERATED`"] - #[inline(always)] - pub fn is_generated(&self) -> bool { - *self == EVENTS_TXSTARTED_A::GENERATED - } -} -#[doc = "Field `EVENTS_TXSTARTED` writer - Transmit sequence started"] -pub type EVENTS_TXSTARTED_W<'a, const O: u8> = - crate::BitWriter<'a, u32, EVENTS_TXSTARTED_SPEC, EVENTS_TXSTARTED_A, O>; -impl<'a, const O: u8> EVENTS_TXSTARTED_W<'a, O> { - #[doc = "Event not generated"] - #[inline(always)] - pub fn not_generated(self) -> &'a mut W { - self.variant(EVENTS_TXSTARTED_A::NOT_GENERATED) - } - #[doc = "Event generated"] - #[inline(always)] - pub fn generated(self) -> &'a mut W { - self.variant(EVENTS_TXSTARTED_A::GENERATED) - } -} -impl R { - #[doc = "Bit 0 - Transmit sequence started"] - #[inline(always)] - pub fn events_txstarted(&self) -> EVENTS_TXSTARTED_R { - EVENTS_TXSTARTED_R::new((self.bits & 1) != 0) - } -} -impl W { - #[doc = "Bit 0 - Transmit sequence started"] - #[inline(always)] - #[must_use] - pub fn events_txstarted(&mut self) -> EVENTS_TXSTARTED_W<0> { - EVENTS_TXSTARTED_W::new(self) - } - #[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 = "Transmit sequence started\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 [events_txstarted](index.html) module"] -pub struct EVENTS_TXSTARTED_SPEC; -impl crate::RegisterSpec for EVENTS_TXSTARTED_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [events_txstarted::R](R) reader structure"] -impl crate::Readable for EVENTS_TXSTARTED_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [events_txstarted::W](W) writer structure"] -impl crate::Writable for EVENTS_TXSTARTED_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets EVENTS_TXSTARTED to value 0"] -impl crate::Resettable for EVENTS_TXSTARTED_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/twis0/events_write.rs b/down-the-stack/dk_pac/src/twis0/events_write.rs deleted file mode 100644 index c3c4d1f..0000000 --- a/down-the-stack/dk_pac/src/twis0/events_write.rs +++ /dev/null @@ -1,127 +0,0 @@ -#[doc = "Register `EVENTS_WRITE` 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 `EVENTS_WRITE` 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 `EVENTS_WRITE` reader - Write command received"] -pub type EVENTS_WRITE_R = crate::BitReader; -#[doc = "Write command received\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum EVENTS_WRITE_A { - #[doc = "0: Event not generated"] - NOT_GENERATED = 0, - #[doc = "1: Event generated"] - GENERATED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: EVENTS_WRITE_A) -> Self { - variant as u8 != 0 - } -} -impl EVENTS_WRITE_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> EVENTS_WRITE_A { - match self.bits { - false => EVENTS_WRITE_A::NOT_GENERATED, - true => EVENTS_WRITE_A::GENERATED, - } - } - #[doc = "Checks if the value of the field is `NOT_GENERATED`"] - #[inline(always)] - pub fn is_not_generated(&self) -> bool { - *self == EVENTS_WRITE_A::NOT_GENERATED - } - #[doc = "Checks if the value of the field is `GENERATED`"] - #[inline(always)] - pub fn is_generated(&self) -> bool { - *self == EVENTS_WRITE_A::GENERATED - } -} -#[doc = "Field `EVENTS_WRITE` writer - Write command received"] -pub type EVENTS_WRITE_W<'a, const O: u8> = - crate::BitWriter<'a, u32, EVENTS_WRITE_SPEC, EVENTS_WRITE_A, O>; -impl<'a, const O: u8> EVENTS_WRITE_W<'a, O> { - #[doc = "Event not generated"] - #[inline(always)] - pub fn not_generated(self) -> &'a mut W { - self.variant(EVENTS_WRITE_A::NOT_GENERATED) - } - #[doc = "Event generated"] - #[inline(always)] - pub fn generated(self) -> &'a mut W { - self.variant(EVENTS_WRITE_A::GENERATED) - } -} -impl R { - #[doc = "Bit 0 - Write command received"] - #[inline(always)] - pub fn events_write(&self) -> EVENTS_WRITE_R { - EVENTS_WRITE_R::new((self.bits & 1) != 0) - } -} -impl W { - #[doc = "Bit 0 - Write command received"] - #[inline(always)] - #[must_use] - pub fn events_write(&mut self) -> EVENTS_WRITE_W<0> { - EVENTS_WRITE_W::new(self) - } - #[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 = "Write command received\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 [events_write](index.html) module"] -pub struct EVENTS_WRITE_SPEC; -impl crate::RegisterSpec for EVENTS_WRITE_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [events_write::R](R) reader structure"] -impl crate::Readable for EVENTS_WRITE_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [events_write::W](W) writer structure"] -impl crate::Writable for EVENTS_WRITE_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets EVENTS_WRITE to value 0"] -impl crate::Resettable for EVENTS_WRITE_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/twis0/inten.rs b/down-the-stack/dk_pac/src/twis0/inten.rs deleted file mode 100644 index e66c7e5..0000000 --- a/down-the-stack/dk_pac/src/twis0/inten.rs +++ /dev/null @@ -1,431 +0,0 @@ -#[doc = "Register `INTEN` 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 `INTEN` 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 `STOPPED` reader - Enable or disable interrupt for event STOPPED"] -pub type STOPPED_R = crate::BitReader; -#[doc = "Enable or disable interrupt for event STOPPED\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum STOPPED_A { - #[doc = "0: Disable"] - DISABLED = 0, - #[doc = "1: Enable"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: STOPPED_A) -> Self { - variant as u8 != 0 - } -} -impl STOPPED_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> STOPPED_A { - match self.bits { - false => STOPPED_A::DISABLED, - true => STOPPED_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == STOPPED_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == STOPPED_A::ENABLED - } -} -#[doc = "Field `STOPPED` writer - Enable or disable interrupt for event STOPPED"] -pub type STOPPED_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTEN_SPEC, STOPPED_A, O>; -impl<'a, const O: u8> STOPPED_W<'a, O> { - #[doc = "Disable"] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(STOPPED_A::DISABLED) - } - #[doc = "Enable"] - #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(STOPPED_A::ENABLED) - } -} -#[doc = "Field `ERROR` reader - Enable or disable interrupt for event ERROR"] -pub type ERROR_R = crate::BitReader; -#[doc = "Enable or disable interrupt for event ERROR\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum ERROR_A { - #[doc = "0: Disable"] - DISABLED = 0, - #[doc = "1: Enable"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: ERROR_A) -> Self { - variant as u8 != 0 - } -} -impl ERROR_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> ERROR_A { - match self.bits { - false => ERROR_A::DISABLED, - true => ERROR_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == ERROR_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == ERROR_A::ENABLED - } -} -#[doc = "Field `ERROR` writer - Enable or disable interrupt for event ERROR"] -pub type ERROR_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTEN_SPEC, ERROR_A, O>; -impl<'a, const O: u8> ERROR_W<'a, O> { - #[doc = "Disable"] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(ERROR_A::DISABLED) - } - #[doc = "Enable"] - #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(ERROR_A::ENABLED) - } -} -#[doc = "Field `RXSTARTED` reader - Enable or disable interrupt for event RXSTARTED"] -pub type RXSTARTED_R = crate::BitReader; -#[doc = "Enable or disable interrupt for event RXSTARTED\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum RXSTARTED_A { - #[doc = "0: Disable"] - DISABLED = 0, - #[doc = "1: Enable"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: RXSTARTED_A) -> Self { - variant as u8 != 0 - } -} -impl RXSTARTED_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> RXSTARTED_A { - match self.bits { - false => RXSTARTED_A::DISABLED, - true => RXSTARTED_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == RXSTARTED_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == RXSTARTED_A::ENABLED - } -} -#[doc = "Field `RXSTARTED` writer - Enable or disable interrupt for event RXSTARTED"] -pub type RXSTARTED_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTEN_SPEC, RXSTARTED_A, O>; -impl<'a, const O: u8> RXSTARTED_W<'a, O> { - #[doc = "Disable"] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(RXSTARTED_A::DISABLED) - } - #[doc = "Enable"] - #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(RXSTARTED_A::ENABLED) - } -} -#[doc = "Field `TXSTARTED` reader - Enable or disable interrupt for event TXSTARTED"] -pub type TXSTARTED_R = crate::BitReader; -#[doc = "Enable or disable interrupt for event TXSTARTED\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum TXSTARTED_A { - #[doc = "0: Disable"] - DISABLED = 0, - #[doc = "1: Enable"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: TXSTARTED_A) -> Self { - variant as u8 != 0 - } -} -impl TXSTARTED_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> TXSTARTED_A { - match self.bits { - false => TXSTARTED_A::DISABLED, - true => TXSTARTED_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == TXSTARTED_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == TXSTARTED_A::ENABLED - } -} -#[doc = "Field `TXSTARTED` writer - Enable or disable interrupt for event TXSTARTED"] -pub type TXSTARTED_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTEN_SPEC, TXSTARTED_A, O>; -impl<'a, const O: u8> TXSTARTED_W<'a, O> { - #[doc = "Disable"] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(TXSTARTED_A::DISABLED) - } - #[doc = "Enable"] - #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(TXSTARTED_A::ENABLED) - } -} -#[doc = "Field `WRITE` reader - Enable or disable interrupt for event WRITE"] -pub type WRITE_R = crate::BitReader; -#[doc = "Enable or disable interrupt for event WRITE\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum WRITE_A { - #[doc = "0: Disable"] - DISABLED = 0, - #[doc = "1: Enable"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: WRITE_A) -> Self { - variant as u8 != 0 - } -} -impl WRITE_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> WRITE_A { - match self.bits { - false => WRITE_A::DISABLED, - true => WRITE_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == WRITE_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == WRITE_A::ENABLED - } -} -#[doc = "Field `WRITE` writer - Enable or disable interrupt for event WRITE"] -pub type WRITE_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTEN_SPEC, WRITE_A, O>; -impl<'a, const O: u8> WRITE_W<'a, O> { - #[doc = "Disable"] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(WRITE_A::DISABLED) - } - #[doc = "Enable"] - #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(WRITE_A::ENABLED) - } -} -#[doc = "Field `READ` reader - Enable or disable interrupt for event READ"] -pub type READ_R = crate::BitReader; -#[doc = "Enable or disable interrupt for event READ\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum READ_A { - #[doc = "0: Disable"] - DISABLED = 0, - #[doc = "1: Enable"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: READ_A) -> Self { - variant as u8 != 0 - } -} -impl READ_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> READ_A { - match self.bits { - false => READ_A::DISABLED, - true => READ_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == READ_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == READ_A::ENABLED - } -} -#[doc = "Field `READ` writer - Enable or disable interrupt for event READ"] -pub type READ_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTEN_SPEC, READ_A, O>; -impl<'a, const O: u8> READ_W<'a, O> { - #[doc = "Disable"] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(READ_A::DISABLED) - } - #[doc = "Enable"] - #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(READ_A::ENABLED) - } -} -impl R { - #[doc = "Bit 1 - Enable or disable interrupt for event STOPPED"] - #[inline(always)] - pub fn stopped(&self) -> STOPPED_R { - STOPPED_R::new(((self.bits >> 1) & 1) != 0) - } - #[doc = "Bit 9 - Enable or disable interrupt for event ERROR"] - #[inline(always)] - pub fn error(&self) -> ERROR_R { - ERROR_R::new(((self.bits >> 9) & 1) != 0) - } - #[doc = "Bit 19 - Enable or disable interrupt for event RXSTARTED"] - #[inline(always)] - pub fn rxstarted(&self) -> RXSTARTED_R { - RXSTARTED_R::new(((self.bits >> 19) & 1) != 0) - } - #[doc = "Bit 20 - Enable or disable interrupt for event TXSTARTED"] - #[inline(always)] - pub fn txstarted(&self) -> TXSTARTED_R { - TXSTARTED_R::new(((self.bits >> 20) & 1) != 0) - } - #[doc = "Bit 25 - Enable or disable interrupt for event WRITE"] - #[inline(always)] - pub fn write(&self) -> WRITE_R { - WRITE_R::new(((self.bits >> 25) & 1) != 0) - } - #[doc = "Bit 26 - Enable or disable interrupt for event READ"] - #[inline(always)] - pub fn read(&self) -> READ_R { - READ_R::new(((self.bits >> 26) & 1) != 0) - } -} -impl W { - #[doc = "Bit 1 - Enable or disable interrupt for event STOPPED"] - #[inline(always)] - #[must_use] - pub fn stopped(&mut self) -> STOPPED_W<1> { - STOPPED_W::new(self) - } - #[doc = "Bit 9 - Enable or disable interrupt for event ERROR"] - #[inline(always)] - #[must_use] - pub fn error(&mut self) -> ERROR_W<9> { - ERROR_W::new(self) - } - #[doc = "Bit 19 - Enable or disable interrupt for event RXSTARTED"] - #[inline(always)] - #[must_use] - pub fn rxstarted(&mut self) -> RXSTARTED_W<19> { - RXSTARTED_W::new(self) - } - #[doc = "Bit 20 - Enable or disable interrupt for event TXSTARTED"] - #[inline(always)] - #[must_use] - pub fn txstarted(&mut self) -> TXSTARTED_W<20> { - TXSTARTED_W::new(self) - } - #[doc = "Bit 25 - Enable or disable interrupt for event WRITE"] - #[inline(always)] - #[must_use] - pub fn write(&mut self) -> WRITE_W<25> { - WRITE_W::new(self) - } - #[doc = "Bit 26 - Enable or disable interrupt for event READ"] - #[inline(always)] - #[must_use] - pub fn read(&mut self) -> READ_W<26> { - 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 - } -} -#[doc = "Enable or disable interrupt\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 [inten](index.html) module"] -pub struct INTEN_SPEC; -impl crate::RegisterSpec for INTEN_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [inten::R](R) reader structure"] -impl crate::Readable for INTEN_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [inten::W](W) writer structure"] -impl crate::Writable for INTEN_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets INTEN to value 0"] -impl crate::Resettable for INTEN_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/twis0/intenclr.rs b/down-the-stack/dk_pac/src/twis0/intenclr.rs deleted file mode 100644 index 2176e3d..0000000 --- a/down-the-stack/dk_pac/src/twis0/intenclr.rs +++ /dev/null @@ -1,473 +0,0 @@ -#[doc = "Register `INTENCLR` 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 `INTENCLR` 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 `STOPPED` reader - Write '1' to disable interrupt for event STOPPED"] -pub type STOPPED_R = crate::BitReader; -#[doc = "Write '1' to disable interrupt for event STOPPED\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum STOPPED_A { - #[doc = "0: Read: Disabled"] - DISABLED = 0, - #[doc = "1: Read: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: STOPPED_A) -> Self { - variant as u8 != 0 - } -} -impl STOPPED_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> STOPPED_A { - match self.bits { - false => STOPPED_A::DISABLED, - true => STOPPED_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == STOPPED_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == STOPPED_A::ENABLED - } -} -#[doc = "Write '1' to disable interrupt for event STOPPED\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum STOPPED_AW { - #[doc = "1: Disable"] - CLEAR = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: STOPPED_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `STOPPED` writer - Write '1' to disable interrupt for event STOPPED"] -pub type STOPPED_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENCLR_SPEC, STOPPED_AW, O>; -impl<'a, const O: u8> STOPPED_W<'a, O> { - #[doc = "Disable"] - #[inline(always)] - pub fn clear(self) -> &'a mut W { - self.variant(STOPPED_AW::CLEAR) - } -} -#[doc = "Field `ERROR` reader - Write '1' to disable interrupt for event ERROR"] -pub type ERROR_R = crate::BitReader; -#[doc = "Write '1' to disable interrupt for event ERROR\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum ERROR_A { - #[doc = "0: Read: Disabled"] - DISABLED = 0, - #[doc = "1: Read: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: ERROR_A) -> Self { - variant as u8 != 0 - } -} -impl ERROR_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> ERROR_A { - match self.bits { - false => ERROR_A::DISABLED, - true => ERROR_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == ERROR_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == ERROR_A::ENABLED - } -} -#[doc = "Write '1' to disable interrupt for event ERROR\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum ERROR_AW { - #[doc = "1: Disable"] - CLEAR = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: ERROR_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `ERROR` writer - Write '1' to disable interrupt for event ERROR"] -pub type ERROR_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENCLR_SPEC, ERROR_AW, O>; -impl<'a, const O: u8> ERROR_W<'a, O> { - #[doc = "Disable"] - #[inline(always)] - pub fn clear(self) -> &'a mut W { - self.variant(ERROR_AW::CLEAR) - } -} -#[doc = "Field `RXSTARTED` reader - Write '1' to disable interrupt for event RXSTARTED"] -pub type RXSTARTED_R = crate::BitReader; -#[doc = "Write '1' to disable interrupt for event RXSTARTED\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum RXSTARTED_A { - #[doc = "0: Read: Disabled"] - DISABLED = 0, - #[doc = "1: Read: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: RXSTARTED_A) -> Self { - variant as u8 != 0 - } -} -impl RXSTARTED_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> RXSTARTED_A { - match self.bits { - false => RXSTARTED_A::DISABLED, - true => RXSTARTED_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == RXSTARTED_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == RXSTARTED_A::ENABLED - } -} -#[doc = "Write '1' to disable interrupt for event RXSTARTED\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum RXSTARTED_AW { - #[doc = "1: Disable"] - CLEAR = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: RXSTARTED_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `RXSTARTED` writer - Write '1' to disable interrupt for event RXSTARTED"] -pub type RXSTARTED_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENCLR_SPEC, RXSTARTED_AW, O>; -impl<'a, const O: u8> RXSTARTED_W<'a, O> { - #[doc = "Disable"] - #[inline(always)] - pub fn clear(self) -> &'a mut W { - self.variant(RXSTARTED_AW::CLEAR) - } -} -#[doc = "Field `TXSTARTED` reader - Write '1' to disable interrupt for event TXSTARTED"] -pub type TXSTARTED_R = crate::BitReader; -#[doc = "Write '1' to disable interrupt for event TXSTARTED\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum TXSTARTED_A { - #[doc = "0: Read: Disabled"] - DISABLED = 0, - #[doc = "1: Read: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: TXSTARTED_A) -> Self { - variant as u8 != 0 - } -} -impl TXSTARTED_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> TXSTARTED_A { - match self.bits { - false => TXSTARTED_A::DISABLED, - true => TXSTARTED_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == TXSTARTED_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == TXSTARTED_A::ENABLED - } -} -#[doc = "Write '1' to disable interrupt for event TXSTARTED\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum TXSTARTED_AW { - #[doc = "1: Disable"] - CLEAR = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: TXSTARTED_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `TXSTARTED` writer - Write '1' to disable interrupt for event TXSTARTED"] -pub type TXSTARTED_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENCLR_SPEC, TXSTARTED_AW, O>; -impl<'a, const O: u8> TXSTARTED_W<'a, O> { - #[doc = "Disable"] - #[inline(always)] - pub fn clear(self) -> &'a mut W { - self.variant(TXSTARTED_AW::CLEAR) - } -} -#[doc = "Field `WRITE` reader - Write '1' to disable interrupt for event WRITE"] -pub type WRITE_R = crate::BitReader; -#[doc = "Write '1' to disable interrupt for event WRITE\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum WRITE_A { - #[doc = "0: Read: Disabled"] - DISABLED = 0, - #[doc = "1: Read: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: WRITE_A) -> Self { - variant as u8 != 0 - } -} -impl WRITE_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> WRITE_A { - match self.bits { - false => WRITE_A::DISABLED, - true => WRITE_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == WRITE_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == WRITE_A::ENABLED - } -} -#[doc = "Write '1' to disable interrupt for event WRITE\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum WRITE_AW { - #[doc = "1: Disable"] - CLEAR = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: WRITE_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `WRITE` writer - Write '1' to disable interrupt for event WRITE"] -pub type WRITE_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENCLR_SPEC, WRITE_AW, O>; -impl<'a, const O: u8> WRITE_W<'a, O> { - #[doc = "Disable"] - #[inline(always)] - pub fn clear(self) -> &'a mut W { - self.variant(WRITE_AW::CLEAR) - } -} -#[doc = "Field `READ` reader - Write '1' to disable interrupt for event READ"] -pub type READ_R = crate::BitReader; -#[doc = "Write '1' to disable interrupt for event READ\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum READ_A { - #[doc = "0: Read: Disabled"] - DISABLED = 0, - #[doc = "1: Read: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: READ_A) -> Self { - variant as u8 != 0 - } -} -impl READ_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> READ_A { - match self.bits { - false => READ_A::DISABLED, - true => READ_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == READ_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == READ_A::ENABLED - } -} -#[doc = "Write '1' to disable interrupt for event READ\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum READ_AW { - #[doc = "1: Disable"] - CLEAR = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: READ_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `READ` writer - Write '1' to disable interrupt for event READ"] -pub type READ_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENCLR_SPEC, READ_AW, O>; -impl<'a, const O: u8> READ_W<'a, O> { - #[doc = "Disable"] - #[inline(always)] - pub fn clear(self) -> &'a mut W { - self.variant(READ_AW::CLEAR) - } -} -impl R { - #[doc = "Bit 1 - Write '1' to disable interrupt for event STOPPED"] - #[inline(always)] - pub fn stopped(&self) -> STOPPED_R { - STOPPED_R::new(((self.bits >> 1) & 1) != 0) - } - #[doc = "Bit 9 - Write '1' to disable interrupt for event ERROR"] - #[inline(always)] - pub fn error(&self) -> ERROR_R { - ERROR_R::new(((self.bits >> 9) & 1) != 0) - } - #[doc = "Bit 19 - Write '1' to disable interrupt for event RXSTARTED"] - #[inline(always)] - pub fn rxstarted(&self) -> RXSTARTED_R { - RXSTARTED_R::new(((self.bits >> 19) & 1) != 0) - } - #[doc = "Bit 20 - Write '1' to disable interrupt for event TXSTARTED"] - #[inline(always)] - pub fn txstarted(&self) -> TXSTARTED_R { - TXSTARTED_R::new(((self.bits >> 20) & 1) != 0) - } - #[doc = "Bit 25 - Write '1' to disable interrupt for event WRITE"] - #[inline(always)] - pub fn write(&self) -> WRITE_R { - WRITE_R::new(((self.bits >> 25) & 1) != 0) - } - #[doc = "Bit 26 - Write '1' to disable interrupt for event READ"] - #[inline(always)] - pub fn read(&self) -> READ_R { - READ_R::new(((self.bits >> 26) & 1) != 0) - } -} -impl W { - #[doc = "Bit 1 - Write '1' to disable interrupt for event STOPPED"] - #[inline(always)] - #[must_use] - pub fn stopped(&mut self) -> STOPPED_W<1> { - STOPPED_W::new(self) - } - #[doc = "Bit 9 - Write '1' to disable interrupt for event ERROR"] - #[inline(always)] - #[must_use] - pub fn error(&mut self) -> ERROR_W<9> { - ERROR_W::new(self) - } - #[doc = "Bit 19 - Write '1' to disable interrupt for event RXSTARTED"] - #[inline(always)] - #[must_use] - pub fn rxstarted(&mut self) -> RXSTARTED_W<19> { - RXSTARTED_W::new(self) - } - #[doc = "Bit 20 - Write '1' to disable interrupt for event TXSTARTED"] - #[inline(always)] - #[must_use] - pub fn txstarted(&mut self) -> TXSTARTED_W<20> { - TXSTARTED_W::new(self) - } - #[doc = "Bit 25 - Write '1' to disable interrupt for event WRITE"] - #[inline(always)] - #[must_use] - pub fn write(&mut self) -> WRITE_W<25> { - WRITE_W::new(self) - } - #[doc = "Bit 26 - Write '1' to disable interrupt for event READ"] - #[inline(always)] - #[must_use] - pub fn read(&mut self) -> READ_W<26> { - 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 - } -} -#[doc = "Disable interrupt\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 [intenclr](index.html) module"] -pub struct INTENCLR_SPEC; -impl crate::RegisterSpec for INTENCLR_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [intenclr::R](R) reader structure"] -impl crate::Readable for INTENCLR_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [intenclr::W](W) writer structure"] -impl crate::Writable for INTENCLR_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets INTENCLR to value 0"] -impl crate::Resettable for INTENCLR_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/twis0/intenset.rs b/down-the-stack/dk_pac/src/twis0/intenset.rs deleted file mode 100644 index 8e4518a..0000000 --- a/down-the-stack/dk_pac/src/twis0/intenset.rs +++ /dev/null @@ -1,473 +0,0 @@ -#[doc = "Register `INTENSET` 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 `INTENSET` 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 `STOPPED` reader - Write '1' to enable interrupt for event STOPPED"] -pub type STOPPED_R = crate::BitReader; -#[doc = "Write '1' to enable interrupt for event STOPPED\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum STOPPED_A { - #[doc = "0: Read: Disabled"] - DISABLED = 0, - #[doc = "1: Read: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: STOPPED_A) -> Self { - variant as u8 != 0 - } -} -impl STOPPED_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> STOPPED_A { - match self.bits { - false => STOPPED_A::DISABLED, - true => STOPPED_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == STOPPED_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == STOPPED_A::ENABLED - } -} -#[doc = "Write '1' to enable interrupt for event STOPPED\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum STOPPED_AW { - #[doc = "1: Enable"] - SET = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: STOPPED_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `STOPPED` writer - Write '1' to enable interrupt for event STOPPED"] -pub type STOPPED_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENSET_SPEC, STOPPED_AW, O>; -impl<'a, const O: u8> STOPPED_W<'a, O> { - #[doc = "Enable"] - #[inline(always)] - pub fn set(self) -> &'a mut W { - self.variant(STOPPED_AW::SET) - } -} -#[doc = "Field `ERROR` reader - Write '1' to enable interrupt for event ERROR"] -pub type ERROR_R = crate::BitReader; -#[doc = "Write '1' to enable interrupt for event ERROR\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum ERROR_A { - #[doc = "0: Read: Disabled"] - DISABLED = 0, - #[doc = "1: Read: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: ERROR_A) -> Self { - variant as u8 != 0 - } -} -impl ERROR_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> ERROR_A { - match self.bits { - false => ERROR_A::DISABLED, - true => ERROR_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == ERROR_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == ERROR_A::ENABLED - } -} -#[doc = "Write '1' to enable interrupt for event ERROR\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum ERROR_AW { - #[doc = "1: Enable"] - SET = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: ERROR_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `ERROR` writer - Write '1' to enable interrupt for event ERROR"] -pub type ERROR_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENSET_SPEC, ERROR_AW, O>; -impl<'a, const O: u8> ERROR_W<'a, O> { - #[doc = "Enable"] - #[inline(always)] - pub fn set(self) -> &'a mut W { - self.variant(ERROR_AW::SET) - } -} -#[doc = "Field `RXSTARTED` reader - Write '1' to enable interrupt for event RXSTARTED"] -pub type RXSTARTED_R = crate::BitReader; -#[doc = "Write '1' to enable interrupt for event RXSTARTED\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum RXSTARTED_A { - #[doc = "0: Read: Disabled"] - DISABLED = 0, - #[doc = "1: Read: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: RXSTARTED_A) -> Self { - variant as u8 != 0 - } -} -impl RXSTARTED_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> RXSTARTED_A { - match self.bits { - false => RXSTARTED_A::DISABLED, - true => RXSTARTED_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == RXSTARTED_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == RXSTARTED_A::ENABLED - } -} -#[doc = "Write '1' to enable interrupt for event RXSTARTED\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum RXSTARTED_AW { - #[doc = "1: Enable"] - SET = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: RXSTARTED_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `RXSTARTED` writer - Write '1' to enable interrupt for event RXSTARTED"] -pub type RXSTARTED_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENSET_SPEC, RXSTARTED_AW, O>; -impl<'a, const O: u8> RXSTARTED_W<'a, O> { - #[doc = "Enable"] - #[inline(always)] - pub fn set(self) -> &'a mut W { - self.variant(RXSTARTED_AW::SET) - } -} -#[doc = "Field `TXSTARTED` reader - Write '1' to enable interrupt for event TXSTARTED"] -pub type TXSTARTED_R = crate::BitReader; -#[doc = "Write '1' to enable interrupt for event TXSTARTED\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum TXSTARTED_A { - #[doc = "0: Read: Disabled"] - DISABLED = 0, - #[doc = "1: Read: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: TXSTARTED_A) -> Self { - variant as u8 != 0 - } -} -impl TXSTARTED_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> TXSTARTED_A { - match self.bits { - false => TXSTARTED_A::DISABLED, - true => TXSTARTED_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == TXSTARTED_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == TXSTARTED_A::ENABLED - } -} -#[doc = "Write '1' to enable interrupt for event TXSTARTED\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum TXSTARTED_AW { - #[doc = "1: Enable"] - SET = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: TXSTARTED_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `TXSTARTED` writer - Write '1' to enable interrupt for event TXSTARTED"] -pub type TXSTARTED_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENSET_SPEC, TXSTARTED_AW, O>; -impl<'a, const O: u8> TXSTARTED_W<'a, O> { - #[doc = "Enable"] - #[inline(always)] - pub fn set(self) -> &'a mut W { - self.variant(TXSTARTED_AW::SET) - } -} -#[doc = "Field `WRITE` reader - Write '1' to enable interrupt for event WRITE"] -pub type WRITE_R = crate::BitReader; -#[doc = "Write '1' to enable interrupt for event WRITE\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum WRITE_A { - #[doc = "0: Read: Disabled"] - DISABLED = 0, - #[doc = "1: Read: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: WRITE_A) -> Self { - variant as u8 != 0 - } -} -impl WRITE_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> WRITE_A { - match self.bits { - false => WRITE_A::DISABLED, - true => WRITE_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == WRITE_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == WRITE_A::ENABLED - } -} -#[doc = "Write '1' to enable interrupt for event WRITE\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum WRITE_AW { - #[doc = "1: Enable"] - SET = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: WRITE_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `WRITE` writer - Write '1' to enable interrupt for event WRITE"] -pub type WRITE_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENSET_SPEC, WRITE_AW, O>; -impl<'a, const O: u8> WRITE_W<'a, O> { - #[doc = "Enable"] - #[inline(always)] - pub fn set(self) -> &'a mut W { - self.variant(WRITE_AW::SET) - } -} -#[doc = "Field `READ` reader - Write '1' to enable interrupt for event READ"] -pub type READ_R = crate::BitReader; -#[doc = "Write '1' to enable interrupt for event READ\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum READ_A { - #[doc = "0: Read: Disabled"] - DISABLED = 0, - #[doc = "1: Read: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: READ_A) -> Self { - variant as u8 != 0 - } -} -impl READ_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> READ_A { - match self.bits { - false => READ_A::DISABLED, - true => READ_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == READ_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == READ_A::ENABLED - } -} -#[doc = "Write '1' to enable interrupt for event READ\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum READ_AW { - #[doc = "1: Enable"] - SET = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: READ_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `READ` writer - Write '1' to enable interrupt for event READ"] -pub type READ_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENSET_SPEC, READ_AW, O>; -impl<'a, const O: u8> READ_W<'a, O> { - #[doc = "Enable"] - #[inline(always)] - pub fn set(self) -> &'a mut W { - self.variant(READ_AW::SET) - } -} -impl R { - #[doc = "Bit 1 - Write '1' to enable interrupt for event STOPPED"] - #[inline(always)] - pub fn stopped(&self) -> STOPPED_R { - STOPPED_R::new(((self.bits >> 1) & 1) != 0) - } - #[doc = "Bit 9 - Write '1' to enable interrupt for event ERROR"] - #[inline(always)] - pub fn error(&self) -> ERROR_R { - ERROR_R::new(((self.bits >> 9) & 1) != 0) - } - #[doc = "Bit 19 - Write '1' to enable interrupt for event RXSTARTED"] - #[inline(always)] - pub fn rxstarted(&self) -> RXSTARTED_R { - RXSTARTED_R::new(((self.bits >> 19) & 1) != 0) - } - #[doc = "Bit 20 - Write '1' to enable interrupt for event TXSTARTED"] - #[inline(always)] - pub fn txstarted(&self) -> TXSTARTED_R { - TXSTARTED_R::new(((self.bits >> 20) & 1) != 0) - } - #[doc = "Bit 25 - Write '1' to enable interrupt for event WRITE"] - #[inline(always)] - pub fn write(&self) -> WRITE_R { - WRITE_R::new(((self.bits >> 25) & 1) != 0) - } - #[doc = "Bit 26 - Write '1' to enable interrupt for event READ"] - #[inline(always)] - pub fn read(&self) -> READ_R { - READ_R::new(((self.bits >> 26) & 1) != 0) - } -} -impl W { - #[doc = "Bit 1 - Write '1' to enable interrupt for event STOPPED"] - #[inline(always)] - #[must_use] - pub fn stopped(&mut self) -> STOPPED_W<1> { - STOPPED_W::new(self) - } - #[doc = "Bit 9 - Write '1' to enable interrupt for event ERROR"] - #[inline(always)] - #[must_use] - pub fn error(&mut self) -> ERROR_W<9> { - ERROR_W::new(self) - } - #[doc = "Bit 19 - Write '1' to enable interrupt for event RXSTARTED"] - #[inline(always)] - #[must_use] - pub fn rxstarted(&mut self) -> RXSTARTED_W<19> { - RXSTARTED_W::new(self) - } - #[doc = "Bit 20 - Write '1' to enable interrupt for event TXSTARTED"] - #[inline(always)] - #[must_use] - pub fn txstarted(&mut self) -> TXSTARTED_W<20> { - TXSTARTED_W::new(self) - } - #[doc = "Bit 25 - Write '1' to enable interrupt for event WRITE"] - #[inline(always)] - #[must_use] - pub fn write(&mut self) -> WRITE_W<25> { - WRITE_W::new(self) - } - #[doc = "Bit 26 - Write '1' to enable interrupt for event READ"] - #[inline(always)] - #[must_use] - pub fn read(&mut self) -> READ_W<26> { - 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 - } -} -#[doc = "Enable interrupt\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 [intenset](index.html) module"] -pub struct INTENSET_SPEC; -impl crate::RegisterSpec for INTENSET_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [intenset::R](R) reader structure"] -impl crate::Readable for INTENSET_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [intenset::W](W) writer structure"] -impl crate::Writable for INTENSET_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets INTENSET to value 0"] -impl crate::Resettable for INTENSET_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/twis0/match_.rs b/down-the-stack/dk_pac/src/twis0/match_.rs deleted file mode 100644 index 1e3cbd9..0000000 --- a/down-the-stack/dk_pac/src/twis0/match_.rs +++ /dev/null @@ -1,37 +0,0 @@ -#[doc = "Register `MATCH` 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 = "Field `MATCH` reader - Which of the addresses in {ADDRESS} matched the incoming address"] -pub type MATCH_R = crate::BitReader; -impl R { - #[doc = "Bit 0 - Which of the addresses in {ADDRESS} matched the incoming address"] - #[inline(always)] - pub fn match_(&self) -> MATCH_R { - MATCH_R::new((self.bits & 1) != 0) - } -} -#[doc = "Status register indicating which address had a match\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 [match_](index.html) module"] -pub struct MATCH_SPEC; -impl crate::RegisterSpec for MATCH_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [match_::R](R) reader structure"] -impl crate::Readable for MATCH_SPEC { - type Reader = R; -} -#[doc = "`reset()` method sets MATCH to value 0"] -impl crate::Resettable for MATCH_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/twis0/orc.rs b/down-the-stack/dk_pac/src/twis0/orc.rs deleted file mode 100644 index b0e9a09..0000000 --- a/down-the-stack/dk_pac/src/twis0/orc.rs +++ /dev/null @@ -1,80 +0,0 @@ -#[doc = "Register `ORC` 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 `ORC` 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 `ORC` reader - Over-read character. Character sent out in case of an over-read of the transmit buffer."] -pub type ORC_R = crate::FieldReader; -#[doc = "Field `ORC` writer - Over-read character. Character sent out in case of an over-read of the transmit buffer."] -pub type ORC_W<'a, const O: u8> = crate::FieldWriter<'a, u32, ORC_SPEC, u8, u8, 8, O>; -impl R { - #[doc = "Bits 0:7 - Over-read character. Character sent out in case of an over-read of the transmit buffer."] - #[inline(always)] - pub fn orc(&self) -> ORC_R { - ORC_R::new((self.bits & 0xff) as u8) - } -} -impl W { - #[doc = "Bits 0:7 - Over-read character. Character sent out in case of an over-read of the transmit buffer."] - #[inline(always)] - #[must_use] - pub fn orc(&mut self) -> ORC_W<0> { - ORC_W::new(self) - } - #[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 = "Over-read character. Character sent out in case of an over-read of the transmit buffer.\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 [orc](index.html) module"] -pub struct ORC_SPEC; -impl crate::RegisterSpec for ORC_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [orc::R](R) reader structure"] -impl crate::Readable for ORC_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [orc::W](W) writer structure"] -impl crate::Writable for ORC_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets ORC to value 0"] -impl crate::Resettable for ORC_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/twis0/psel.rs b/down-the-stack/dk_pac/src/twis0/psel.rs deleted file mode 100644 index 6d71cdf..0000000 --- a/down-the-stack/dk_pac/src/twis0/psel.rs +++ /dev/null @@ -1,16 +0,0 @@ -#[doc = r"Register block"] -#[repr(C)] -pub struct PSEL { - #[doc = "0x00 - Pin select for SCL signal"] - pub scl: SCL, - #[doc = "0x04 - Pin select for SDA signal"] - pub sda: SDA, -} -#[doc = "SCL (rw) register accessor: an alias for `Reg`"] -pub type SCL = crate::Reg; -#[doc = "Pin select for SCL signal"] -pub mod scl; -#[doc = "SDA (rw) register accessor: an alias for `Reg`"] -pub type SDA = crate::Reg; -#[doc = "Pin select for SDA signal"] -pub mod sda; diff --git a/down-the-stack/dk_pac/src/twis0/psel/scl.rs b/down-the-stack/dk_pac/src/twis0/psel/scl.rs deleted file mode 100644 index 05b9f95..0000000 --- a/down-the-stack/dk_pac/src/twis0/psel/scl.rs +++ /dev/null @@ -1,141 +0,0 @@ -#[doc = "Register `SCL` 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 `SCL` 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 `PIN` reader - Pin number"] -pub type PIN_R = crate::FieldReader; -#[doc = "Field `PIN` writer - Pin number"] -pub type PIN_W<'a, const O: u8> = crate::FieldWriter<'a, u32, SCL_SPEC, u8, u8, 5, O>; -#[doc = "Field `CONNECT` reader - Connection"] -pub type CONNECT_R = crate::BitReader; -#[doc = "Connection\n\nValue on reset: 1"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum CONNECT_A { - #[doc = "1: Disconnect"] - DISCONNECTED = 1, - #[doc = "0: Connect"] - CONNECTED = 0, -} -impl From for bool { - #[inline(always)] - fn from(variant: CONNECT_A) -> Self { - variant as u8 != 0 - } -} -impl CONNECT_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> CONNECT_A { - match self.bits { - true => CONNECT_A::DISCONNECTED, - false => CONNECT_A::CONNECTED, - } - } - #[doc = "Checks if the value of the field is `DISCONNECTED`"] - #[inline(always)] - pub fn is_disconnected(&self) -> bool { - *self == CONNECT_A::DISCONNECTED - } - #[doc = "Checks if the value of the field is `CONNECTED`"] - #[inline(always)] - pub fn is_connected(&self) -> bool { - *self == CONNECT_A::CONNECTED - } -} -#[doc = "Field `CONNECT` writer - Connection"] -pub type CONNECT_W<'a, const O: u8> = crate::BitWriter<'a, u32, SCL_SPEC, CONNECT_A, O>; -impl<'a, const O: u8> CONNECT_W<'a, O> { - #[doc = "Disconnect"] - #[inline(always)] - pub fn disconnected(self) -> &'a mut W { - self.variant(CONNECT_A::DISCONNECTED) - } - #[doc = "Connect"] - #[inline(always)] - pub fn connected(self) -> &'a mut W { - self.variant(CONNECT_A::CONNECTED) - } -} -impl R { - #[doc = "Bits 0:4 - Pin number"] - #[inline(always)] - pub fn pin(&self) -> PIN_R { - PIN_R::new((self.bits & 0x1f) as u8) - } - #[doc = "Bit 31 - Connection"] - #[inline(always)] - pub fn connect(&self) -> CONNECT_R { - CONNECT_R::new(((self.bits >> 31) & 1) != 0) - } -} -impl W { - #[doc = "Bits 0:4 - Pin number"] - #[inline(always)] - #[must_use] - pub fn pin(&mut self) -> PIN_W<0> { - PIN_W::new(self) - } - #[doc = "Bit 31 - Connection"] - #[inline(always)] - #[must_use] - pub fn connect(&mut self) -> CONNECT_W<31> { - CONNECT_W::new(self) - } - #[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 = "Pin select for SCL signal\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 [scl](index.html) module"] -pub struct SCL_SPEC; -impl crate::RegisterSpec for SCL_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [scl::R](R) reader structure"] -impl crate::Readable for SCL_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [scl::W](W) writer structure"] -impl crate::Writable for SCL_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets SCL to value 0xffff_ffff"] -impl crate::Resettable for SCL_SPEC { - const RESET_VALUE: Self::Ux = 0xffff_ffff; -} diff --git a/down-the-stack/dk_pac/src/twis0/psel/sda.rs b/down-the-stack/dk_pac/src/twis0/psel/sda.rs deleted file mode 100644 index 705af21..0000000 --- a/down-the-stack/dk_pac/src/twis0/psel/sda.rs +++ /dev/null @@ -1,141 +0,0 @@ -#[doc = "Register `SDA` 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 `SDA` 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 `PIN` reader - Pin number"] -pub type PIN_R = crate::FieldReader; -#[doc = "Field `PIN` writer - Pin number"] -pub type PIN_W<'a, const O: u8> = crate::FieldWriter<'a, u32, SDA_SPEC, u8, u8, 5, O>; -#[doc = "Field `CONNECT` reader - Connection"] -pub type CONNECT_R = crate::BitReader; -#[doc = "Connection\n\nValue on reset: 1"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum CONNECT_A { - #[doc = "1: Disconnect"] - DISCONNECTED = 1, - #[doc = "0: Connect"] - CONNECTED = 0, -} -impl From for bool { - #[inline(always)] - fn from(variant: CONNECT_A) -> Self { - variant as u8 != 0 - } -} -impl CONNECT_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> CONNECT_A { - match self.bits { - true => CONNECT_A::DISCONNECTED, - false => CONNECT_A::CONNECTED, - } - } - #[doc = "Checks if the value of the field is `DISCONNECTED`"] - #[inline(always)] - pub fn is_disconnected(&self) -> bool { - *self == CONNECT_A::DISCONNECTED - } - #[doc = "Checks if the value of the field is `CONNECTED`"] - #[inline(always)] - pub fn is_connected(&self) -> bool { - *self == CONNECT_A::CONNECTED - } -} -#[doc = "Field `CONNECT` writer - Connection"] -pub type CONNECT_W<'a, const O: u8> = crate::BitWriter<'a, u32, SDA_SPEC, CONNECT_A, O>; -impl<'a, const O: u8> CONNECT_W<'a, O> { - #[doc = "Disconnect"] - #[inline(always)] - pub fn disconnected(self) -> &'a mut W { - self.variant(CONNECT_A::DISCONNECTED) - } - #[doc = "Connect"] - #[inline(always)] - pub fn connected(self) -> &'a mut W { - self.variant(CONNECT_A::CONNECTED) - } -} -impl R { - #[doc = "Bits 0:4 - Pin number"] - #[inline(always)] - pub fn pin(&self) -> PIN_R { - PIN_R::new((self.bits & 0x1f) as u8) - } - #[doc = "Bit 31 - Connection"] - #[inline(always)] - pub fn connect(&self) -> CONNECT_R { - CONNECT_R::new(((self.bits >> 31) & 1) != 0) - } -} -impl W { - #[doc = "Bits 0:4 - Pin number"] - #[inline(always)] - #[must_use] - pub fn pin(&mut self) -> PIN_W<0> { - PIN_W::new(self) - } - #[doc = "Bit 31 - Connection"] - #[inline(always)] - #[must_use] - pub fn connect(&mut self) -> CONNECT_W<31> { - CONNECT_W::new(self) - } - #[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 = "Pin select for SDA signal\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 [sda](index.html) module"] -pub struct SDA_SPEC; -impl crate::RegisterSpec for SDA_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [sda::R](R) reader structure"] -impl crate::Readable for SDA_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [sda::W](W) writer structure"] -impl crate::Writable for SDA_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets SDA to value 0xffff_ffff"] -impl crate::Resettable for SDA_SPEC { - const RESET_VALUE: Self::Ux = 0xffff_ffff; -} diff --git a/down-the-stack/dk_pac/src/twis0/rxd.rs b/down-the-stack/dk_pac/src/twis0/rxd.rs deleted file mode 100644 index 54e95f7..0000000 --- a/down-the-stack/dk_pac/src/twis0/rxd.rs +++ /dev/null @@ -1,22 +0,0 @@ -#[doc = r"Register block"] -#[repr(C)] -pub struct RXD { - #[doc = "0x00 - RXD Data pointer"] - pub ptr: PTR, - #[doc = "0x04 - Maximum number of bytes in RXD buffer"] - pub maxcnt: MAXCNT, - #[doc = "0x08 - Number of bytes transferred in the last RXD transaction"] - pub amount: AMOUNT, -} -#[doc = "PTR (rw) register accessor: an alias for `Reg`"] -pub type PTR = crate::Reg; -#[doc = "RXD Data pointer"] -pub mod ptr; -#[doc = "MAXCNT (rw) register accessor: an alias for `Reg`"] -pub type MAXCNT = crate::Reg; -#[doc = "Maximum number of bytes in RXD buffer"] -pub mod maxcnt; -#[doc = "AMOUNT (r) register accessor: an alias for `Reg`"] -pub type AMOUNT = crate::Reg; -#[doc = "Number of bytes transferred in the last RXD transaction"] -pub mod amount; diff --git a/down-the-stack/dk_pac/src/twis0/rxd/amount.rs b/down-the-stack/dk_pac/src/twis0/rxd/amount.rs deleted file mode 100644 index 1e549d3..0000000 --- a/down-the-stack/dk_pac/src/twis0/rxd/amount.rs +++ /dev/null @@ -1,37 +0,0 @@ -#[doc = "Register `AMOUNT` 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 = "Field `AMOUNT` reader - Number of bytes transferred in the last RXD transaction"] -pub type AMOUNT_R = crate::FieldReader; -impl R { - #[doc = "Bits 0:7 - Number of bytes transferred in the last RXD transaction"] - #[inline(always)] - pub fn amount(&self) -> AMOUNT_R { - AMOUNT_R::new((self.bits & 0xff) as u8) - } -} -#[doc = "Number of bytes transferred in the last RXD transaction\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 [amount](index.html) module"] -pub struct AMOUNT_SPEC; -impl crate::RegisterSpec for AMOUNT_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [amount::R](R) reader structure"] -impl crate::Readable for AMOUNT_SPEC { - type Reader = R; -} -#[doc = "`reset()` method sets AMOUNT to value 0"] -impl crate::Resettable for AMOUNT_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/twis0/rxd/maxcnt.rs b/down-the-stack/dk_pac/src/twis0/rxd/maxcnt.rs deleted file mode 100644 index be0bf29..0000000 --- a/down-the-stack/dk_pac/src/twis0/rxd/maxcnt.rs +++ /dev/null @@ -1,80 +0,0 @@ -#[doc = "Register `MAXCNT` 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 `MAXCNT` 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 `MAXCNT` reader - Maximum number of bytes in RXD buffer"] -pub type MAXCNT_R = crate::FieldReader; -#[doc = "Field `MAXCNT` writer - Maximum number of bytes in RXD buffer"] -pub type MAXCNT_W<'a, const O: u8> = crate::FieldWriter<'a, u32, MAXCNT_SPEC, u8, u8, 8, O>; -impl R { - #[doc = "Bits 0:7 - Maximum number of bytes in RXD buffer"] - #[inline(always)] - pub fn maxcnt(&self) -> MAXCNT_R { - MAXCNT_R::new((self.bits & 0xff) as u8) - } -} -impl W { - #[doc = "Bits 0:7 - Maximum number of bytes in RXD buffer"] - #[inline(always)] - #[must_use] - pub fn maxcnt(&mut self) -> MAXCNT_W<0> { - MAXCNT_W::new(self) - } - #[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 = "Maximum number of bytes in RXD buffer\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 [maxcnt](index.html) module"] -pub struct MAXCNT_SPEC; -impl crate::RegisterSpec for MAXCNT_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [maxcnt::R](R) reader structure"] -impl crate::Readable for MAXCNT_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [maxcnt::W](W) writer structure"] -impl crate::Writable for MAXCNT_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets MAXCNT to value 0"] -impl crate::Resettable for MAXCNT_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/twis0/rxd/ptr.rs b/down-the-stack/dk_pac/src/twis0/rxd/ptr.rs deleted file mode 100644 index b5afe91..0000000 --- a/down-the-stack/dk_pac/src/twis0/rxd/ptr.rs +++ /dev/null @@ -1,80 +0,0 @@ -#[doc = "Register `PTR` 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 `PTR` 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 `PTR` reader - RXD Data pointer"] -pub type PTR_R = crate::FieldReader; -#[doc = "Field `PTR` writer - RXD Data pointer"] -pub type PTR_W<'a, const O: u8> = crate::FieldWriter<'a, u32, PTR_SPEC, u32, u32, 32, O>; -impl R { - #[doc = "Bits 0:31 - RXD Data pointer"] - #[inline(always)] - pub fn ptr(&self) -> PTR_R { - PTR_R::new(self.bits) - } -} -impl W { - #[doc = "Bits 0:31 - RXD Data pointer"] - #[inline(always)] - #[must_use] - pub fn ptr(&mut self) -> PTR_W<0> { - PTR_W::new(self) - } - #[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 = "RXD Data pointer\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 [ptr](index.html) module"] -pub struct PTR_SPEC; -impl crate::RegisterSpec for PTR_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [ptr::R](R) reader structure"] -impl crate::Readable for PTR_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [ptr::W](W) writer structure"] -impl crate::Writable for PTR_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets PTR to value 0"] -impl crate::Resettable for PTR_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/twis0/shorts.rs b/down-the-stack/dk_pac/src/twis0/shorts.rs deleted file mode 100644 index 7bdf6b0..0000000 --- a/down-the-stack/dk_pac/src/twis0/shorts.rs +++ /dev/null @@ -1,189 +0,0 @@ -#[doc = "Register `SHORTS` 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 `SHORTS` 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 `WRITE_SUSPEND` reader - Shortcut between event WRITE and task SUSPEND"] -pub type WRITE_SUSPEND_R = crate::BitReader; -#[doc = "Shortcut between event WRITE and task SUSPEND\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum WRITE_SUSPEND_A { - #[doc = "0: Disable shortcut"] - DISABLED = 0, - #[doc = "1: Enable shortcut"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: WRITE_SUSPEND_A) -> Self { - variant as u8 != 0 - } -} -impl WRITE_SUSPEND_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> WRITE_SUSPEND_A { - match self.bits { - false => WRITE_SUSPEND_A::DISABLED, - true => WRITE_SUSPEND_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == WRITE_SUSPEND_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == WRITE_SUSPEND_A::ENABLED - } -} -#[doc = "Field `WRITE_SUSPEND` writer - Shortcut between event WRITE and task SUSPEND"] -pub type WRITE_SUSPEND_W<'a, const O: u8> = - crate::BitWriter<'a, u32, SHORTS_SPEC, WRITE_SUSPEND_A, O>; -impl<'a, const O: u8> WRITE_SUSPEND_W<'a, O> { - #[doc = "Disable shortcut"] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(WRITE_SUSPEND_A::DISABLED) - } - #[doc = "Enable shortcut"] - #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(WRITE_SUSPEND_A::ENABLED) - } -} -#[doc = "Field `READ_SUSPEND` reader - Shortcut between event READ and task SUSPEND"] -pub type READ_SUSPEND_R = crate::BitReader; -#[doc = "Shortcut between event READ and task SUSPEND\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum READ_SUSPEND_A { - #[doc = "0: Disable shortcut"] - DISABLED = 0, - #[doc = "1: Enable shortcut"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: READ_SUSPEND_A) -> Self { - variant as u8 != 0 - } -} -impl READ_SUSPEND_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> READ_SUSPEND_A { - match self.bits { - false => READ_SUSPEND_A::DISABLED, - true => READ_SUSPEND_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == READ_SUSPEND_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == READ_SUSPEND_A::ENABLED - } -} -#[doc = "Field `READ_SUSPEND` writer - Shortcut between event READ and task SUSPEND"] -pub type READ_SUSPEND_W<'a, const O: u8> = - crate::BitWriter<'a, u32, SHORTS_SPEC, READ_SUSPEND_A, O>; -impl<'a, const O: u8> READ_SUSPEND_W<'a, O> { - #[doc = "Disable shortcut"] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(READ_SUSPEND_A::DISABLED) - } - #[doc = "Enable shortcut"] - #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(READ_SUSPEND_A::ENABLED) - } -} -impl R { - #[doc = "Bit 13 - Shortcut between event WRITE and task SUSPEND"] - #[inline(always)] - pub fn write_suspend(&self) -> WRITE_SUSPEND_R { - WRITE_SUSPEND_R::new(((self.bits >> 13) & 1) != 0) - } - #[doc = "Bit 14 - Shortcut between event READ and task SUSPEND"] - #[inline(always)] - pub fn read_suspend(&self) -> READ_SUSPEND_R { - READ_SUSPEND_R::new(((self.bits >> 14) & 1) != 0) - } -} -impl W { - #[doc = "Bit 13 - Shortcut between event WRITE and task SUSPEND"] - #[inline(always)] - #[must_use] - pub fn write_suspend(&mut self) -> WRITE_SUSPEND_W<13> { - WRITE_SUSPEND_W::new(self) - } - #[doc = "Bit 14 - Shortcut between event READ and task SUSPEND"] - #[inline(always)] - #[must_use] - pub fn read_suspend(&mut self) -> READ_SUSPEND_W<14> { - READ_SUSPEND_W::new(self) - } - #[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 = "Shortcuts between local events and tasks\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 [shorts](index.html) module"] -pub struct SHORTS_SPEC; -impl crate::RegisterSpec for SHORTS_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [shorts::R](R) reader structure"] -impl crate::Readable for SHORTS_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [shorts::W](W) writer structure"] -impl crate::Writable for SHORTS_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets SHORTS to value 0"] -impl crate::Resettable for SHORTS_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/twis0/tasks_preparerx.rs b/down-the-stack/dk_pac/src/twis0/tasks_preparerx.rs deleted file mode 100644 index 7487c89..0000000 --- a/down-the-stack/dk_pac/src/twis0/tasks_preparerx.rs +++ /dev/null @@ -1,72 +0,0 @@ -#[doc = "Register `TASKS_PREPARERX` 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 = "Prepare the TWI slave to respond to a write command\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum TASKS_PREPARERX_AW { - #[doc = "1: Trigger task"] - TRIGGER = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: TASKS_PREPARERX_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `TASKS_PREPARERX` writer - Prepare the TWI slave to respond to a write command"] -pub type TASKS_PREPARERX_W<'a, const O: u8> = - crate::BitWriter<'a, u32, TASKS_PREPARERX_SPEC, TASKS_PREPARERX_AW, O>; -impl<'a, const O: u8> TASKS_PREPARERX_W<'a, O> { - #[doc = "Trigger task"] - #[inline(always)] - pub fn trigger(self) -> &'a mut W { - self.variant(TASKS_PREPARERX_AW::TRIGGER) - } -} -impl W { - #[doc = "Bit 0 - Prepare the TWI slave to respond to a write command"] - #[inline(always)] - #[must_use] - pub fn tasks_preparerx(&mut self) -> TASKS_PREPARERX_W<0> { - TASKS_PREPARERX_W::new(self) - } - #[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 = "Prepare the TWI slave to respond to a write command\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 [tasks_preparerx](index.html) module"] -pub struct TASKS_PREPARERX_SPEC; -impl crate::RegisterSpec for TASKS_PREPARERX_SPEC { - type Ux = u32; -} -#[doc = "`write(|w| ..)` method takes [tasks_preparerx::W](W) writer structure"] -impl crate::Writable for TASKS_PREPARERX_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets TASKS_PREPARERX to value 0"] -impl crate::Resettable for TASKS_PREPARERX_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/twis0/tasks_preparetx.rs b/down-the-stack/dk_pac/src/twis0/tasks_preparetx.rs deleted file mode 100644 index c20a0b8..0000000 --- a/down-the-stack/dk_pac/src/twis0/tasks_preparetx.rs +++ /dev/null @@ -1,72 +0,0 @@ -#[doc = "Register `TASKS_PREPARETX` 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 = "Prepare the TWI slave to respond to a read command\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum TASKS_PREPARETX_AW { - #[doc = "1: Trigger task"] - TRIGGER = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: TASKS_PREPARETX_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `TASKS_PREPARETX` writer - Prepare the TWI slave to respond to a read command"] -pub type TASKS_PREPARETX_W<'a, const O: u8> = - crate::BitWriter<'a, u32, TASKS_PREPARETX_SPEC, TASKS_PREPARETX_AW, O>; -impl<'a, const O: u8> TASKS_PREPARETX_W<'a, O> { - #[doc = "Trigger task"] - #[inline(always)] - pub fn trigger(self) -> &'a mut W { - self.variant(TASKS_PREPARETX_AW::TRIGGER) - } -} -impl W { - #[doc = "Bit 0 - Prepare the TWI slave to respond to a read command"] - #[inline(always)] - #[must_use] - pub fn tasks_preparetx(&mut self) -> TASKS_PREPARETX_W<0> { - TASKS_PREPARETX_W::new(self) - } - #[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 = "Prepare the TWI slave to respond to a read command\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 [tasks_preparetx](index.html) module"] -pub struct TASKS_PREPARETX_SPEC; -impl crate::RegisterSpec for TASKS_PREPARETX_SPEC { - type Ux = u32; -} -#[doc = "`write(|w| ..)` method takes [tasks_preparetx::W](W) writer structure"] -impl crate::Writable for TASKS_PREPARETX_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets TASKS_PREPARETX to value 0"] -impl crate::Resettable for TASKS_PREPARETX_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/twis0/tasks_resume.rs b/down-the-stack/dk_pac/src/twis0/tasks_resume.rs deleted file mode 100644 index 47f0633..0000000 --- a/down-the-stack/dk_pac/src/twis0/tasks_resume.rs +++ /dev/null @@ -1,72 +0,0 @@ -#[doc = "Register `TASKS_RESUME` 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 = "Resume TWI transaction\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum TASKS_RESUME_AW { - #[doc = "1: Trigger task"] - TRIGGER = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: TASKS_RESUME_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `TASKS_RESUME` writer - Resume TWI transaction"] -pub type TASKS_RESUME_W<'a, const O: u8> = - crate::BitWriter<'a, u32, TASKS_RESUME_SPEC, TASKS_RESUME_AW, O>; -impl<'a, const O: u8> TASKS_RESUME_W<'a, O> { - #[doc = "Trigger task"] - #[inline(always)] - pub fn trigger(self) -> &'a mut W { - self.variant(TASKS_RESUME_AW::TRIGGER) - } -} -impl W { - #[doc = "Bit 0 - Resume TWI transaction"] - #[inline(always)] - #[must_use] - pub fn tasks_resume(&mut self) -> TASKS_RESUME_W<0> { - TASKS_RESUME_W::new(self) - } - #[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 = "Resume TWI transaction\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 [tasks_resume](index.html) module"] -pub struct TASKS_RESUME_SPEC; -impl crate::RegisterSpec for TASKS_RESUME_SPEC { - type Ux = u32; -} -#[doc = "`write(|w| ..)` method takes [tasks_resume::W](W) writer structure"] -impl crate::Writable for TASKS_RESUME_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets TASKS_RESUME to value 0"] -impl crate::Resettable for TASKS_RESUME_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/twis0/tasks_stop.rs b/down-the-stack/dk_pac/src/twis0/tasks_stop.rs deleted file mode 100644 index 7358178..0000000 --- a/down-the-stack/dk_pac/src/twis0/tasks_stop.rs +++ /dev/null @@ -1,72 +0,0 @@ -#[doc = "Register `TASKS_STOP` 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 = "Stop TWI transaction\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum TASKS_STOP_AW { - #[doc = "1: Trigger task"] - TRIGGER = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: TASKS_STOP_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `TASKS_STOP` writer - Stop TWI transaction"] -pub type TASKS_STOP_W<'a, const O: u8> = - crate::BitWriter<'a, u32, TASKS_STOP_SPEC, TASKS_STOP_AW, O>; -impl<'a, const O: u8> TASKS_STOP_W<'a, O> { - #[doc = "Trigger task"] - #[inline(always)] - pub fn trigger(self) -> &'a mut W { - self.variant(TASKS_STOP_AW::TRIGGER) - } -} -impl W { - #[doc = "Bit 0 - Stop TWI transaction"] - #[inline(always)] - #[must_use] - pub fn tasks_stop(&mut self) -> TASKS_STOP_W<0> { - TASKS_STOP_W::new(self) - } - #[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 = "Stop TWI transaction\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 [tasks_stop](index.html) module"] -pub struct TASKS_STOP_SPEC; -impl crate::RegisterSpec for TASKS_STOP_SPEC { - type Ux = u32; -} -#[doc = "`write(|w| ..)` method takes [tasks_stop::W](W) writer structure"] -impl crate::Writable for TASKS_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 TASKS_STOP to value 0"] -impl crate::Resettable for TASKS_STOP_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/twis0/tasks_suspend.rs b/down-the-stack/dk_pac/src/twis0/tasks_suspend.rs deleted file mode 100644 index ae6f325..0000000 --- a/down-the-stack/dk_pac/src/twis0/tasks_suspend.rs +++ /dev/null @@ -1,72 +0,0 @@ -#[doc = "Register `TASKS_SUSPEND` 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 = "Suspend TWI transaction\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum TASKS_SUSPEND_AW { - #[doc = "1: Trigger task"] - TRIGGER = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: TASKS_SUSPEND_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `TASKS_SUSPEND` writer - Suspend TWI transaction"] -pub type TASKS_SUSPEND_W<'a, const O: u8> = - crate::BitWriter<'a, u32, TASKS_SUSPEND_SPEC, TASKS_SUSPEND_AW, O>; -impl<'a, const O: u8> TASKS_SUSPEND_W<'a, O> { - #[doc = "Trigger task"] - #[inline(always)] - pub fn trigger(self) -> &'a mut W { - self.variant(TASKS_SUSPEND_AW::TRIGGER) - } -} -impl W { - #[doc = "Bit 0 - Suspend TWI transaction"] - #[inline(always)] - #[must_use] - pub fn tasks_suspend(&mut self) -> TASKS_SUSPEND_W<0> { - TASKS_SUSPEND_W::new(self) - } - #[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 = "Suspend TWI transaction\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 [tasks_suspend](index.html) module"] -pub struct TASKS_SUSPEND_SPEC; -impl crate::RegisterSpec for TASKS_SUSPEND_SPEC { - type Ux = u32; -} -#[doc = "`write(|w| ..)` method takes [tasks_suspend::W](W) writer structure"] -impl crate::Writable for TASKS_SUSPEND_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets TASKS_SUSPEND to value 0"] -impl crate::Resettable for TASKS_SUSPEND_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/twis0/txd.rs b/down-the-stack/dk_pac/src/twis0/txd.rs deleted file mode 100644 index 7cf9d2e..0000000 --- a/down-the-stack/dk_pac/src/twis0/txd.rs +++ /dev/null @@ -1,22 +0,0 @@ -#[doc = r"Register block"] -#[repr(C)] -pub struct TXD { - #[doc = "0x00 - TXD Data pointer"] - pub ptr: PTR, - #[doc = "0x04 - Maximum number of bytes in TXD buffer"] - pub maxcnt: MAXCNT, - #[doc = "0x08 - Number of bytes transferred in the last TXD transaction"] - pub amount: AMOUNT, -} -#[doc = "PTR (rw) register accessor: an alias for `Reg`"] -pub type PTR = crate::Reg; -#[doc = "TXD Data pointer"] -pub mod ptr; -#[doc = "MAXCNT (rw) register accessor: an alias for `Reg`"] -pub type MAXCNT = crate::Reg; -#[doc = "Maximum number of bytes in TXD buffer"] -pub mod maxcnt; -#[doc = "AMOUNT (r) register accessor: an alias for `Reg`"] -pub type AMOUNT = crate::Reg; -#[doc = "Number of bytes transferred in the last TXD transaction"] -pub mod amount; diff --git a/down-the-stack/dk_pac/src/twis0/txd/amount.rs b/down-the-stack/dk_pac/src/twis0/txd/amount.rs deleted file mode 100644 index 8fa817c..0000000 --- a/down-the-stack/dk_pac/src/twis0/txd/amount.rs +++ /dev/null @@ -1,37 +0,0 @@ -#[doc = "Register `AMOUNT` 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 = "Field `AMOUNT` reader - Number of bytes transferred in the last TXD transaction"] -pub type AMOUNT_R = crate::FieldReader; -impl R { - #[doc = "Bits 0:7 - Number of bytes transferred in the last TXD transaction"] - #[inline(always)] - pub fn amount(&self) -> AMOUNT_R { - AMOUNT_R::new((self.bits & 0xff) as u8) - } -} -#[doc = "Number of bytes transferred in the last TXD transaction\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 [amount](index.html) module"] -pub struct AMOUNT_SPEC; -impl crate::RegisterSpec for AMOUNT_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [amount::R](R) reader structure"] -impl crate::Readable for AMOUNT_SPEC { - type Reader = R; -} -#[doc = "`reset()` method sets AMOUNT to value 0"] -impl crate::Resettable for AMOUNT_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/twis0/txd/maxcnt.rs b/down-the-stack/dk_pac/src/twis0/txd/maxcnt.rs deleted file mode 100644 index d39bad8..0000000 --- a/down-the-stack/dk_pac/src/twis0/txd/maxcnt.rs +++ /dev/null @@ -1,80 +0,0 @@ -#[doc = "Register `MAXCNT` 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 `MAXCNT` 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 `MAXCNT` reader - Maximum number of bytes in TXD buffer"] -pub type MAXCNT_R = crate::FieldReader; -#[doc = "Field `MAXCNT` writer - Maximum number of bytes in TXD buffer"] -pub type MAXCNT_W<'a, const O: u8> = crate::FieldWriter<'a, u32, MAXCNT_SPEC, u8, u8, 8, O>; -impl R { - #[doc = "Bits 0:7 - Maximum number of bytes in TXD buffer"] - #[inline(always)] - pub fn maxcnt(&self) -> MAXCNT_R { - MAXCNT_R::new((self.bits & 0xff) as u8) - } -} -impl W { - #[doc = "Bits 0:7 - Maximum number of bytes in TXD buffer"] - #[inline(always)] - #[must_use] - pub fn maxcnt(&mut self) -> MAXCNT_W<0> { - MAXCNT_W::new(self) - } - #[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 = "Maximum number of bytes in TXD buffer\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 [maxcnt](index.html) module"] -pub struct MAXCNT_SPEC; -impl crate::RegisterSpec for MAXCNT_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [maxcnt::R](R) reader structure"] -impl crate::Readable for MAXCNT_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [maxcnt::W](W) writer structure"] -impl crate::Writable for MAXCNT_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets MAXCNT to value 0"] -impl crate::Resettable for MAXCNT_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/twis0/txd/ptr.rs b/down-the-stack/dk_pac/src/twis0/txd/ptr.rs deleted file mode 100644 index 065ecb4..0000000 --- a/down-the-stack/dk_pac/src/twis0/txd/ptr.rs +++ /dev/null @@ -1,80 +0,0 @@ -#[doc = "Register `PTR` 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 `PTR` 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 `PTR` reader - TXD Data pointer"] -pub type PTR_R = crate::FieldReader; -#[doc = "Field `PTR` writer - TXD Data pointer"] -pub type PTR_W<'a, const O: u8> = crate::FieldWriter<'a, u32, PTR_SPEC, u32, u32, 32, O>; -impl R { - #[doc = "Bits 0:31 - TXD Data pointer"] - #[inline(always)] - pub fn ptr(&self) -> PTR_R { - PTR_R::new(self.bits) - } -} -impl W { - #[doc = "Bits 0:31 - TXD Data pointer"] - #[inline(always)] - #[must_use] - pub fn ptr(&mut self) -> PTR_W<0> { - PTR_W::new(self) - } - #[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 = "TXD Data pointer\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 [ptr](index.html) module"] -pub struct PTR_SPEC; -impl crate::RegisterSpec for PTR_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [ptr::R](R) reader structure"] -impl crate::Readable for PTR_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [ptr::W](W) writer structure"] -impl crate::Writable for PTR_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets PTR to value 0"] -impl crate::Resettable for PTR_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/uart0.rs b/down-the-stack/dk_pac/src/uart0.rs deleted file mode 100644 index 1d2aecc..0000000 --- a/down-the-stack/dk_pac/src/uart0.rs +++ /dev/null @@ -1,160 +0,0 @@ -#[doc = r"Register block"] -#[repr(C)] -pub struct RegisterBlock { - #[doc = "0x00 - Start UART receiver"] - pub tasks_startrx: TASKS_STARTRX, - #[doc = "0x04 - Stop UART receiver"] - pub tasks_stoprx: TASKS_STOPRX, - #[doc = "0x08 - Start UART transmitter"] - pub tasks_starttx: TASKS_STARTTX, - #[doc = "0x0c - Stop UART transmitter"] - pub tasks_stoptx: TASKS_STOPTX, - _reserved4: [u8; 0x0c], - #[doc = "0x1c - Suspend UART"] - pub tasks_suspend: TASKS_SUSPEND, - _reserved5: [u8; 0xe0], - #[doc = "0x100 - CTS is activated (set low). Clear To Send."] - pub events_cts: EVENTS_CTS, - #[doc = "0x104 - CTS is deactivated (set high). Not Clear To Send."] - pub events_ncts: EVENTS_NCTS, - #[doc = "0x108 - Data received in RXD"] - pub events_rxdrdy: EVENTS_RXDRDY, - _reserved8: [u8; 0x10], - #[doc = "0x11c - Data sent from TXD"] - pub events_txdrdy: EVENTS_TXDRDY, - _reserved9: [u8; 0x04], - #[doc = "0x124 - Error detected"] - pub events_error: EVENTS_ERROR, - _reserved10: [u8; 0x1c], - #[doc = "0x144 - Receiver timeout"] - pub events_rxto: EVENTS_RXTO, - _reserved11: [u8; 0xb8], - #[doc = "0x200 - Shortcuts between local events and tasks"] - pub shorts: SHORTS, - _reserved12: [u8; 0x0100], - #[doc = "0x304 - Enable interrupt"] - pub intenset: INTENSET, - #[doc = "0x308 - Disable interrupt"] - pub intenclr: INTENCLR, - _reserved14: [u8; 0x0174], - #[doc = "0x480 - Error source"] - pub errorsrc: ERRORSRC, - _reserved15: [u8; 0x7c], - #[doc = "0x500 - Enable UART"] - pub enable: ENABLE, - _reserved16: [u8; 0x04], - #[doc = "0x508 - Pin select for RTS"] - pub pselrts: PSELRTS, - #[doc = "0x50c - Pin select for TXD"] - pub pseltxd: PSELTXD, - #[doc = "0x510 - Pin select for CTS"] - pub pselcts: PSELCTS, - #[doc = "0x514 - Pin select for RXD"] - pub pselrxd: PSELRXD, - #[doc = "0x518 - RXD register"] - pub rxd: RXD, - #[doc = "0x51c - TXD register"] - pub txd: TXD, - _reserved22: [u8; 0x04], - #[doc = "0x524 - Baud rate"] - pub baudrate: BAUDRATE, - _reserved23: [u8; 0x44], - #[doc = "0x56c - Configuration of parity and hardware flow control"] - pub config: CONFIG, -} -#[doc = "TASKS_STARTRX (w) register accessor: an alias for `Reg`"] -pub type TASKS_STARTRX = crate::Reg; -#[doc = "Start UART receiver"] -pub mod tasks_startrx; -#[doc = "TASKS_STOPRX (w) register accessor: an alias for `Reg`"] -pub type TASKS_STOPRX = crate::Reg; -#[doc = "Stop UART receiver"] -pub mod tasks_stoprx; -#[doc = "TASKS_STARTTX (w) register accessor: an alias for `Reg`"] -pub type TASKS_STARTTX = crate::Reg; -#[doc = "Start UART transmitter"] -pub mod tasks_starttx; -#[doc = "TASKS_STOPTX (w) register accessor: an alias for `Reg`"] -pub type TASKS_STOPTX = crate::Reg; -#[doc = "Stop UART transmitter"] -pub mod tasks_stoptx; -#[doc = "TASKS_SUSPEND (w) register accessor: an alias for `Reg`"] -pub type TASKS_SUSPEND = crate::Reg; -#[doc = "Suspend UART"] -pub mod tasks_suspend; -#[doc = "EVENTS_CTS (rw) register accessor: an alias for `Reg`"] -pub type EVENTS_CTS = crate::Reg; -#[doc = "CTS is activated (set low). Clear To Send."] -pub mod events_cts; -#[doc = "EVENTS_NCTS (rw) register accessor: an alias for `Reg`"] -pub type EVENTS_NCTS = crate::Reg; -#[doc = "CTS is deactivated (set high). Not Clear To Send."] -pub mod events_ncts; -#[doc = "EVENTS_RXDRDY (rw) register accessor: an alias for `Reg`"] -pub type EVENTS_RXDRDY = crate::Reg; -#[doc = "Data received in RXD"] -pub mod events_rxdrdy; -#[doc = "EVENTS_TXDRDY (rw) register accessor: an alias for `Reg`"] -pub type EVENTS_TXDRDY = crate::Reg; -#[doc = "Data sent from TXD"] -pub mod events_txdrdy; -#[doc = "EVENTS_ERROR (rw) register accessor: an alias for `Reg`"] -pub type EVENTS_ERROR = crate::Reg; -#[doc = "Error detected"] -pub mod events_error; -#[doc = "EVENTS_RXTO (rw) register accessor: an alias for `Reg`"] -pub type EVENTS_RXTO = crate::Reg; -#[doc = "Receiver timeout"] -pub mod events_rxto; -#[doc = "SHORTS (rw) register accessor: an alias for `Reg`"] -pub type SHORTS = crate::Reg; -#[doc = "Shortcuts between local events and tasks"] -pub mod shorts; -#[doc = "INTENSET (rw) register accessor: an alias for `Reg`"] -pub type INTENSET = crate::Reg; -#[doc = "Enable interrupt"] -pub mod intenset; -#[doc = "INTENCLR (rw) register accessor: an alias for `Reg`"] -pub type INTENCLR = crate::Reg; -#[doc = "Disable interrupt"] -pub mod intenclr; -#[doc = "ERRORSRC (rw) register accessor: an alias for `Reg`"] -pub type ERRORSRC = crate::Reg; -#[doc = "Error source"] -pub mod errorsrc; -#[doc = "ENABLE (rw) register accessor: an alias for `Reg`"] -pub type ENABLE = crate::Reg; -#[doc = "Enable UART"] -pub mod enable; -#[doc = "PSELRTS (rw) register accessor: an alias for `Reg`"] -pub type PSELRTS = crate::Reg; -#[doc = "Pin select for RTS"] -pub mod pselrts; -#[doc = "PSELTXD (rw) register accessor: an alias for `Reg`"] -pub type PSELTXD = crate::Reg; -#[doc = "Pin select for TXD"] -pub mod pseltxd; -#[doc = "PSELCTS (rw) register accessor: an alias for `Reg`"] -pub type PSELCTS = crate::Reg; -#[doc = "Pin select for CTS"] -pub mod pselcts; -#[doc = "PSELRXD (rw) register accessor: an alias for `Reg`"] -pub type PSELRXD = crate::Reg; -#[doc = "Pin select for RXD"] -pub mod pselrxd; -#[doc = "RXD (r) register accessor: an alias for `Reg`"] -pub type RXD = crate::Reg; -#[doc = "RXD register"] -pub mod rxd; -#[doc = "TXD (w) register accessor: an alias for `Reg`"] -pub type TXD = crate::Reg; -#[doc = "TXD register"] -pub mod txd; -#[doc = "BAUDRATE (rw) register accessor: an alias for `Reg`"] -pub type BAUDRATE = crate::Reg; -#[doc = "Baud rate"] -pub mod baudrate; -#[doc = "CONFIG (rw) register accessor: an alias for `Reg`"] -pub type CONFIG = crate::Reg; -#[doc = "Configuration of parity and hardware flow control"] -pub mod config; diff --git a/down-the-stack/dk_pac/src/uart0/baudrate.rs b/down-the-stack/dk_pac/src/uart0/baudrate.rs deleted file mode 100644 index 9f0dc06..0000000 --- a/down-the-stack/dk_pac/src/uart0/baudrate.rs +++ /dev/null @@ -1,337 +0,0 @@ -#[doc = "Register `BAUDRATE` 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 `BAUDRATE` 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 `BAUDRATE` reader - Baud rate"] -pub type BAUDRATE_R = crate::FieldReader; -#[doc = "Baud rate\n\nValue on reset: 67108864"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -#[repr(u32)] -pub enum BAUDRATE_A { - #[doc = "323584: 1200 baud (actual rate: 1205)"] - BAUD1200 = 323584, - #[doc = "643072: 2400 baud (actual rate: 2396)"] - BAUD2400 = 643072, - #[doc = "1290240: 4800 baud (actual rate: 4808)"] - BAUD4800 = 1290240, - #[doc = "2576384: 9600 baud (actual rate: 9598)"] - BAUD9600 = 2576384, - #[doc = "3866624: 14400 baud (actual rate: 14414)"] - BAUD14400 = 3866624, - #[doc = "5152768: 19200 baud (actual rate: 19208)"] - BAUD19200 = 5152768, - #[doc = "7729152: 28800 baud (actual rate: 28829)"] - BAUD28800 = 7729152, - #[doc = "8388608: 31250 baud"] - BAUD31250 = 8388608, - #[doc = "10309632: 38400 baud (actual rate: 38462)"] - BAUD38400 = 10309632, - #[doc = "15007744: 56000 baud (actual rate: 55944)"] - BAUD56000 = 15007744, - #[doc = "15462400: 57600 baud (actual rate: 57762)"] - BAUD57600 = 15462400, - #[doc = "20615168: 76800 baud (actual rate: 76923)"] - BAUD76800 = 20615168, - #[doc = "30924800: 115200 baud (actual rate: 115942)"] - BAUD115200 = 30924800, - #[doc = "61845504: 230400 baud (actual rate: 231884)"] - BAUD230400 = 61845504, - #[doc = "67108864: 250000 baud"] - BAUD250000 = 67108864, - #[doc = "123695104: 460800 baud (actual rate: 470588)"] - BAUD460800 = 123695104, - #[doc = "247386112: 921600 baud (actual rate: 941176)"] - BAUD921600 = 247386112, - #[doc = "268435456: 1Mega baud"] - BAUD1M = 268435456, -} -impl From for u32 { - #[inline(always)] - fn from(variant: BAUDRATE_A) -> Self { - variant as _ - } -} -impl BAUDRATE_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> Option { - match self.bits { - 323584 => Some(BAUDRATE_A::BAUD1200), - 643072 => Some(BAUDRATE_A::BAUD2400), - 1290240 => Some(BAUDRATE_A::BAUD4800), - 2576384 => Some(BAUDRATE_A::BAUD9600), - 3866624 => Some(BAUDRATE_A::BAUD14400), - 5152768 => Some(BAUDRATE_A::BAUD19200), - 7729152 => Some(BAUDRATE_A::BAUD28800), - 8388608 => Some(BAUDRATE_A::BAUD31250), - 10309632 => Some(BAUDRATE_A::BAUD38400), - 15007744 => Some(BAUDRATE_A::BAUD56000), - 15462400 => Some(BAUDRATE_A::BAUD57600), - 20615168 => Some(BAUDRATE_A::BAUD76800), - 30924800 => Some(BAUDRATE_A::BAUD115200), - 61845504 => Some(BAUDRATE_A::BAUD230400), - 67108864 => Some(BAUDRATE_A::BAUD250000), - 123695104 => Some(BAUDRATE_A::BAUD460800), - 247386112 => Some(BAUDRATE_A::BAUD921600), - 268435456 => Some(BAUDRATE_A::BAUD1M), - _ => None, - } - } - #[doc = "Checks if the value of the field is `BAUD1200`"] - #[inline(always)] - pub fn is_baud1200(&self) -> bool { - *self == BAUDRATE_A::BAUD1200 - } - #[doc = "Checks if the value of the field is `BAUD2400`"] - #[inline(always)] - pub fn is_baud2400(&self) -> bool { - *self == BAUDRATE_A::BAUD2400 - } - #[doc = "Checks if the value of the field is `BAUD4800`"] - #[inline(always)] - pub fn is_baud4800(&self) -> bool { - *self == BAUDRATE_A::BAUD4800 - } - #[doc = "Checks if the value of the field is `BAUD9600`"] - #[inline(always)] - pub fn is_baud9600(&self) -> bool { - *self == BAUDRATE_A::BAUD9600 - } - #[doc = "Checks if the value of the field is `BAUD14400`"] - #[inline(always)] - pub fn is_baud14400(&self) -> bool { - *self == BAUDRATE_A::BAUD14400 - } - #[doc = "Checks if the value of the field is `BAUD19200`"] - #[inline(always)] - pub fn is_baud19200(&self) -> bool { - *self == BAUDRATE_A::BAUD19200 - } - #[doc = "Checks if the value of the field is `BAUD28800`"] - #[inline(always)] - pub fn is_baud28800(&self) -> bool { - *self == BAUDRATE_A::BAUD28800 - } - #[doc = "Checks if the value of the field is `BAUD31250`"] - #[inline(always)] - pub fn is_baud31250(&self) -> bool { - *self == BAUDRATE_A::BAUD31250 - } - #[doc = "Checks if the value of the field is `BAUD38400`"] - #[inline(always)] - pub fn is_baud38400(&self) -> bool { - *self == BAUDRATE_A::BAUD38400 - } - #[doc = "Checks if the value of the field is `BAUD56000`"] - #[inline(always)] - pub fn is_baud56000(&self) -> bool { - *self == BAUDRATE_A::BAUD56000 - } - #[doc = "Checks if the value of the field is `BAUD57600`"] - #[inline(always)] - pub fn is_baud57600(&self) -> bool { - *self == BAUDRATE_A::BAUD57600 - } - #[doc = "Checks if the value of the field is `BAUD76800`"] - #[inline(always)] - pub fn is_baud76800(&self) -> bool { - *self == BAUDRATE_A::BAUD76800 - } - #[doc = "Checks if the value of the field is `BAUD115200`"] - #[inline(always)] - pub fn is_baud115200(&self) -> bool { - *self == BAUDRATE_A::BAUD115200 - } - #[doc = "Checks if the value of the field is `BAUD230400`"] - #[inline(always)] - pub fn is_baud230400(&self) -> bool { - *self == BAUDRATE_A::BAUD230400 - } - #[doc = "Checks if the value of the field is `BAUD250000`"] - #[inline(always)] - pub fn is_baud250000(&self) -> bool { - *self == BAUDRATE_A::BAUD250000 - } - #[doc = "Checks if the value of the field is `BAUD460800`"] - #[inline(always)] - pub fn is_baud460800(&self) -> bool { - *self == BAUDRATE_A::BAUD460800 - } - #[doc = "Checks if the value of the field is `BAUD921600`"] - #[inline(always)] - pub fn is_baud921600(&self) -> bool { - *self == BAUDRATE_A::BAUD921600 - } - #[doc = "Checks if the value of the field is `BAUD1M`"] - #[inline(always)] - pub fn is_baud1m(&self) -> bool { - *self == BAUDRATE_A::BAUD1M - } -} -#[doc = "Field `BAUDRATE` writer - Baud rate"] -pub type BAUDRATE_W<'a, const O: u8> = - crate::FieldWriter<'a, u32, BAUDRATE_SPEC, u32, BAUDRATE_A, 32, O>; -impl<'a, const O: u8> BAUDRATE_W<'a, O> { - #[doc = "1200 baud (actual rate: 1205)"] - #[inline(always)] - pub fn baud1200(self) -> &'a mut W { - self.variant(BAUDRATE_A::BAUD1200) - } - #[doc = "2400 baud (actual rate: 2396)"] - #[inline(always)] - pub fn baud2400(self) -> &'a mut W { - self.variant(BAUDRATE_A::BAUD2400) - } - #[doc = "4800 baud (actual rate: 4808)"] - #[inline(always)] - pub fn baud4800(self) -> &'a mut W { - self.variant(BAUDRATE_A::BAUD4800) - } - #[doc = "9600 baud (actual rate: 9598)"] - #[inline(always)] - pub fn baud9600(self) -> &'a mut W { - self.variant(BAUDRATE_A::BAUD9600) - } - #[doc = "14400 baud (actual rate: 14414)"] - #[inline(always)] - pub fn baud14400(self) -> &'a mut W { - self.variant(BAUDRATE_A::BAUD14400) - } - #[doc = "19200 baud (actual rate: 19208)"] - #[inline(always)] - pub fn baud19200(self) -> &'a mut W { - self.variant(BAUDRATE_A::BAUD19200) - } - #[doc = "28800 baud (actual rate: 28829)"] - #[inline(always)] - pub fn baud28800(self) -> &'a mut W { - self.variant(BAUDRATE_A::BAUD28800) - } - #[doc = "31250 baud"] - #[inline(always)] - pub fn baud31250(self) -> &'a mut W { - self.variant(BAUDRATE_A::BAUD31250) - } - #[doc = "38400 baud (actual rate: 38462)"] - #[inline(always)] - pub fn baud38400(self) -> &'a mut W { - self.variant(BAUDRATE_A::BAUD38400) - } - #[doc = "56000 baud (actual rate: 55944)"] - #[inline(always)] - pub fn baud56000(self) -> &'a mut W { - self.variant(BAUDRATE_A::BAUD56000) - } - #[doc = "57600 baud (actual rate: 57762)"] - #[inline(always)] - pub fn baud57600(self) -> &'a mut W { - self.variant(BAUDRATE_A::BAUD57600) - } - #[doc = "76800 baud (actual rate: 76923)"] - #[inline(always)] - pub fn baud76800(self) -> &'a mut W { - self.variant(BAUDRATE_A::BAUD76800) - } - #[doc = "115200 baud (actual rate: 115942)"] - #[inline(always)] - pub fn baud115200(self) -> &'a mut W { - self.variant(BAUDRATE_A::BAUD115200) - } - #[doc = "230400 baud (actual rate: 231884)"] - #[inline(always)] - pub fn baud230400(self) -> &'a mut W { - self.variant(BAUDRATE_A::BAUD230400) - } - #[doc = "250000 baud"] - #[inline(always)] - pub fn baud250000(self) -> &'a mut W { - self.variant(BAUDRATE_A::BAUD250000) - } - #[doc = "460800 baud (actual rate: 470588)"] - #[inline(always)] - pub fn baud460800(self) -> &'a mut W { - self.variant(BAUDRATE_A::BAUD460800) - } - #[doc = "921600 baud (actual rate: 941176)"] - #[inline(always)] - pub fn baud921600(self) -> &'a mut W { - self.variant(BAUDRATE_A::BAUD921600) - } - #[doc = "1Mega baud"] - #[inline(always)] - pub fn baud1m(self) -> &'a mut W { - self.variant(BAUDRATE_A::BAUD1M) - } -} -impl R { - #[doc = "Bits 0:31 - Baud rate"] - #[inline(always)] - pub fn baudrate(&self) -> BAUDRATE_R { - BAUDRATE_R::new(self.bits) - } -} -impl W { - #[doc = "Bits 0:31 - Baud rate"] - #[inline(always)] - #[must_use] - pub fn baudrate(&mut self) -> BAUDRATE_W<0> { - BAUDRATE_W::new(self) - } - #[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 = "Baud rate\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 [baudrate](index.html) module"] -pub struct BAUDRATE_SPEC; -impl crate::RegisterSpec for BAUDRATE_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [baudrate::R](R) reader structure"] -impl crate::Readable for BAUDRATE_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [baudrate::W](W) writer structure"] -impl crate::Writable for BAUDRATE_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets BAUDRATE to value 0x0400_0000"] -impl crate::Resettable for BAUDRATE_SPEC { - const RESET_VALUE: Self::Ux = 0x0400_0000; -} diff --git a/down-the-stack/dk_pac/src/uart0/config.rs b/down-the-stack/dk_pac/src/uart0/config.rs deleted file mode 100644 index 87a5585..0000000 --- a/down-the-stack/dk_pac/src/uart0/config.rs +++ /dev/null @@ -1,189 +0,0 @@ -#[doc = "Register `CONFIG` 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 `CONFIG` 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 `HWFC` reader - Hardware flow control"] -pub type HWFC_R = crate::BitReader; -#[doc = "Hardware flow control\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum HWFC_A { - #[doc = "0: Disabled"] - DISABLED = 0, - #[doc = "1: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: HWFC_A) -> Self { - variant as u8 != 0 - } -} -impl HWFC_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> HWFC_A { - match self.bits { - false => HWFC_A::DISABLED, - true => HWFC_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == HWFC_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == HWFC_A::ENABLED - } -} -#[doc = "Field `HWFC` writer - Hardware flow control"] -pub type HWFC_W<'a, const O: u8> = crate::BitWriter<'a, u32, CONFIG_SPEC, HWFC_A, O>; -impl<'a, const O: u8> HWFC_W<'a, O> { - #[doc = "Disabled"] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(HWFC_A::DISABLED) - } - #[doc = "Enabled"] - #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(HWFC_A::ENABLED) - } -} -#[doc = "Field `PARITY` reader - Parity"] -pub type PARITY_R = crate::FieldReader; -#[doc = "Parity\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -#[repr(u8)] -pub enum PARITY_A { - #[doc = "0: Exclude parity bit"] - EXCLUDED = 0, - #[doc = "7: Include parity bit"] - INCLUDED = 7, -} -impl From for u8 { - #[inline(always)] - fn from(variant: PARITY_A) -> Self { - variant as _ - } -} -impl PARITY_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> Option { - match self.bits { - 0 => Some(PARITY_A::EXCLUDED), - 7 => Some(PARITY_A::INCLUDED), - _ => None, - } - } - #[doc = "Checks if the value of the field is `EXCLUDED`"] - #[inline(always)] - pub fn is_excluded(&self) -> bool { - *self == PARITY_A::EXCLUDED - } - #[doc = "Checks if the value of the field is `INCLUDED`"] - #[inline(always)] - pub fn is_included(&self) -> bool { - *self == PARITY_A::INCLUDED - } -} -#[doc = "Field `PARITY` writer - Parity"] -pub type PARITY_W<'a, const O: u8> = crate::FieldWriter<'a, u32, CONFIG_SPEC, u8, PARITY_A, 3, O>; -impl<'a, const O: u8> PARITY_W<'a, O> { - #[doc = "Exclude parity bit"] - #[inline(always)] - pub fn excluded(self) -> &'a mut W { - self.variant(PARITY_A::EXCLUDED) - } - #[doc = "Include parity bit"] - #[inline(always)] - pub fn included(self) -> &'a mut W { - self.variant(PARITY_A::INCLUDED) - } -} -impl R { - #[doc = "Bit 0 - Hardware flow control"] - #[inline(always)] - pub fn hwfc(&self) -> HWFC_R { - HWFC_R::new((self.bits & 1) != 0) - } - #[doc = "Bits 1:3 - Parity"] - #[inline(always)] - pub fn parity(&self) -> PARITY_R { - PARITY_R::new(((self.bits >> 1) & 7) as u8) - } -} -impl W { - #[doc = "Bit 0 - Hardware flow control"] - #[inline(always)] - #[must_use] - pub fn hwfc(&mut self) -> HWFC_W<0> { - HWFC_W::new(self) - } - #[doc = "Bits 1:3 - Parity"] - #[inline(always)] - #[must_use] - pub fn parity(&mut self) -> PARITY_W<1> { - PARITY_W::new(self) - } - #[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 = "Configuration of parity and hardware flow control\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 [config](index.html) module"] -pub struct CONFIG_SPEC; -impl crate::RegisterSpec for CONFIG_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [config::R](R) reader structure"] -impl crate::Readable for CONFIG_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [config::W](W) writer structure"] -impl crate::Writable for 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 CONFIG to value 0"] -impl crate::Resettable for CONFIG_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/uart0/enable.rs b/down-the-stack/dk_pac/src/uart0/enable.rs deleted file mode 100644 index f5ba7e9..0000000 --- a/down-the-stack/dk_pac/src/uart0/enable.rs +++ /dev/null @@ -1,128 +0,0 @@ -#[doc = "Register `ENABLE` 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 `ENABLE` 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 `ENABLE` reader - Enable or disable UART"] -pub type ENABLE_R = crate::FieldReader; -#[doc = "Enable or disable UART\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -#[repr(u8)] -pub enum ENABLE_A { - #[doc = "0: Disable UART"] - DISABLED = 0, - #[doc = "4: Enable UART"] - ENABLED = 4, -} -impl From for u8 { - #[inline(always)] - fn from(variant: ENABLE_A) -> Self { - variant as _ - } -} -impl ENABLE_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> Option { - match self.bits { - 0 => Some(ENABLE_A::DISABLED), - 4 => Some(ENABLE_A::ENABLED), - _ => None, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == ENABLE_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == ENABLE_A::ENABLED - } -} -#[doc = "Field `ENABLE` writer - Enable or disable UART"] -pub type ENABLE_W<'a, const O: u8> = crate::FieldWriter<'a, u32, ENABLE_SPEC, u8, ENABLE_A, 4, O>; -impl<'a, const O: u8> ENABLE_W<'a, O> { - #[doc = "Disable UART"] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(ENABLE_A::DISABLED) - } - #[doc = "Enable UART"] - #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(ENABLE_A::ENABLED) - } -} -impl R { - #[doc = "Bits 0:3 - Enable or disable UART"] - #[inline(always)] - pub fn enable(&self) -> ENABLE_R { - ENABLE_R::new((self.bits & 0x0f) as u8) - } -} -impl W { - #[doc = "Bits 0:3 - Enable or disable UART"] - #[inline(always)] - #[must_use] - pub fn enable(&mut self) -> ENABLE_W<0> { - 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 - } -} -#[doc = "Enable UART\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 [enable](index.html) module"] -pub struct ENABLE_SPEC; -impl crate::RegisterSpec for ENABLE_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [enable::R](R) reader structure"] -impl crate::Readable for ENABLE_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [enable::W](W) writer structure"] -impl crate::Writable for ENABLE_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets ENABLE to value 0"] -impl crate::Resettable for ENABLE_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/uart0/errorsrc.rs b/down-the-stack/dk_pac/src/uart0/errorsrc.rs deleted file mode 100644 index 8a78d5a..0000000 --- a/down-the-stack/dk_pac/src/uart0/errorsrc.rs +++ /dev/null @@ -1,309 +0,0 @@ -#[doc = "Register `ERRORSRC` 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 `ERRORSRC` 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 `OVERRUN` reader - Overrun error"] -pub type OVERRUN_R = crate::BitReader; -#[doc = "Overrun error\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum OVERRUN_A { - #[doc = "0: Read: error not present"] - NOT_PRESENT = 0, - #[doc = "1: Read: error present"] - PRESENT = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: OVERRUN_A) -> Self { - variant as u8 != 0 - } -} -impl OVERRUN_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> OVERRUN_A { - match self.bits { - false => OVERRUN_A::NOT_PRESENT, - true => OVERRUN_A::PRESENT, - } - } - #[doc = "Checks if the value of the field is `NOT_PRESENT`"] - #[inline(always)] - pub fn is_not_present(&self) -> bool { - *self == OVERRUN_A::NOT_PRESENT - } - #[doc = "Checks if the value of the field is `PRESENT`"] - #[inline(always)] - pub fn is_present(&self) -> bool { - *self == OVERRUN_A::PRESENT - } -} -#[doc = "Field `OVERRUN` writer - Overrun error"] -pub type OVERRUN_W<'a, const O: u8> = crate::BitWriter1C<'a, u32, ERRORSRC_SPEC, OVERRUN_A, O>; -impl<'a, const O: u8> OVERRUN_W<'a, O> { - #[doc = "Read: error not present"] - #[inline(always)] - pub fn not_present(self) -> &'a mut W { - self.variant(OVERRUN_A::NOT_PRESENT) - } - #[doc = "Read: error present"] - #[inline(always)] - pub fn present(self) -> &'a mut W { - self.variant(OVERRUN_A::PRESENT) - } -} -#[doc = "Field `PARITY` reader - Parity error"] -pub type PARITY_R = crate::BitReader; -#[doc = "Parity error\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PARITY_A { - #[doc = "0: Read: error not present"] - NOT_PRESENT = 0, - #[doc = "1: Read: error present"] - PRESENT = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PARITY_A) -> Self { - variant as u8 != 0 - } -} -impl PARITY_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> PARITY_A { - match self.bits { - false => PARITY_A::NOT_PRESENT, - true => PARITY_A::PRESENT, - } - } - #[doc = "Checks if the value of the field is `NOT_PRESENT`"] - #[inline(always)] - pub fn is_not_present(&self) -> bool { - *self == PARITY_A::NOT_PRESENT - } - #[doc = "Checks if the value of the field is `PRESENT`"] - #[inline(always)] - pub fn is_present(&self) -> bool { - *self == PARITY_A::PRESENT - } -} -#[doc = "Field `PARITY` writer - Parity error"] -pub type PARITY_W<'a, const O: u8> = crate::BitWriter1C<'a, u32, ERRORSRC_SPEC, PARITY_A, O>; -impl<'a, const O: u8> PARITY_W<'a, O> { - #[doc = "Read: error not present"] - #[inline(always)] - pub fn not_present(self) -> &'a mut W { - self.variant(PARITY_A::NOT_PRESENT) - } - #[doc = "Read: error present"] - #[inline(always)] - pub fn present(self) -> &'a mut W { - self.variant(PARITY_A::PRESENT) - } -} -#[doc = "Field `FRAMING` reader - Framing error occurred"] -pub type FRAMING_R = crate::BitReader; -#[doc = "Framing error occurred\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum FRAMING_A { - #[doc = "0: Read: error not present"] - NOT_PRESENT = 0, - #[doc = "1: Read: error present"] - PRESENT = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: FRAMING_A) -> Self { - variant as u8 != 0 - } -} -impl FRAMING_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> FRAMING_A { - match self.bits { - false => FRAMING_A::NOT_PRESENT, - true => FRAMING_A::PRESENT, - } - } - #[doc = "Checks if the value of the field is `NOT_PRESENT`"] - #[inline(always)] - pub fn is_not_present(&self) -> bool { - *self == FRAMING_A::NOT_PRESENT - } - #[doc = "Checks if the value of the field is `PRESENT`"] - #[inline(always)] - pub fn is_present(&self) -> bool { - *self == FRAMING_A::PRESENT - } -} -#[doc = "Field `FRAMING` writer - Framing error occurred"] -pub type FRAMING_W<'a, const O: u8> = crate::BitWriter1C<'a, u32, ERRORSRC_SPEC, FRAMING_A, O>; -impl<'a, const O: u8> FRAMING_W<'a, O> { - #[doc = "Read: error not present"] - #[inline(always)] - pub fn not_present(self) -> &'a mut W { - self.variant(FRAMING_A::NOT_PRESENT) - } - #[doc = "Read: error present"] - #[inline(always)] - pub fn present(self) -> &'a mut W { - self.variant(FRAMING_A::PRESENT) - } -} -#[doc = "Field `BREAK` reader - Break condition"] -pub type BREAK_R = crate::BitReader; -#[doc = "Break condition\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum BREAK_A { - #[doc = "0: Read: error not present"] - NOT_PRESENT = 0, - #[doc = "1: Read: error present"] - PRESENT = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: BREAK_A) -> Self { - variant as u8 != 0 - } -} -impl BREAK_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> BREAK_A { - match self.bits { - false => BREAK_A::NOT_PRESENT, - true => BREAK_A::PRESENT, - } - } - #[doc = "Checks if the value of the field is `NOT_PRESENT`"] - #[inline(always)] - pub fn is_not_present(&self) -> bool { - *self == BREAK_A::NOT_PRESENT - } - #[doc = "Checks if the value of the field is `PRESENT`"] - #[inline(always)] - pub fn is_present(&self) -> bool { - *self == BREAK_A::PRESENT - } -} -#[doc = "Field `BREAK` writer - Break condition"] -pub type BREAK_W<'a, const O: u8> = crate::BitWriter1C<'a, u32, ERRORSRC_SPEC, BREAK_A, O>; -impl<'a, const O: u8> BREAK_W<'a, O> { - #[doc = "Read: error not present"] - #[inline(always)] - pub fn not_present(self) -> &'a mut W { - self.variant(BREAK_A::NOT_PRESENT) - } - #[doc = "Read: error present"] - #[inline(always)] - pub fn present(self) -> &'a mut W { - self.variant(BREAK_A::PRESENT) - } -} -impl R { - #[doc = "Bit 0 - Overrun error"] - #[inline(always)] - pub fn overrun(&self) -> OVERRUN_R { - OVERRUN_R::new((self.bits & 1) != 0) - } - #[doc = "Bit 1 - Parity error"] - #[inline(always)] - pub fn parity(&self) -> PARITY_R { - PARITY_R::new(((self.bits >> 1) & 1) != 0) - } - #[doc = "Bit 2 - Framing error occurred"] - #[inline(always)] - pub fn framing(&self) -> FRAMING_R { - FRAMING_R::new(((self.bits >> 2) & 1) != 0) - } - #[doc = "Bit 3 - Break condition"] - #[inline(always)] - pub fn break_(&self) -> BREAK_R { - BREAK_R::new(((self.bits >> 3) & 1) != 0) - } -} -impl W { - #[doc = "Bit 0 - Overrun error"] - #[inline(always)] - #[must_use] - pub fn overrun(&mut self) -> OVERRUN_W<0> { - OVERRUN_W::new(self) - } - #[doc = "Bit 1 - Parity error"] - #[inline(always)] - #[must_use] - pub fn parity(&mut self) -> PARITY_W<1> { - PARITY_W::new(self) - } - #[doc = "Bit 2 - Framing error occurred"] - #[inline(always)] - #[must_use] - pub fn framing(&mut self) -> FRAMING_W<2> { - FRAMING_W::new(self) - } - #[doc = "Bit 3 - Break condition"] - #[inline(always)] - #[must_use] - pub fn break_(&mut self) -> BREAK_W<3> { - BREAK_W::new(self) - } - #[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 = "Error source\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 [errorsrc](index.html) module"] -pub struct ERRORSRC_SPEC; -impl crate::RegisterSpec for ERRORSRC_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [errorsrc::R](R) reader structure"] -impl crate::Readable for ERRORSRC_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [errorsrc::W](W) writer structure"] -impl crate::Writable for ERRORSRC_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0x0f; -} -#[doc = "`reset()` method sets ERRORSRC to value 0"] -impl crate::Resettable for ERRORSRC_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/uart0/events_cts.rs b/down-the-stack/dk_pac/src/uart0/events_cts.rs deleted file mode 100644 index b3589f3..0000000 --- a/down-the-stack/dk_pac/src/uart0/events_cts.rs +++ /dev/null @@ -1,127 +0,0 @@ -#[doc = "Register `EVENTS_CTS` 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 `EVENTS_CTS` 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 `EVENTS_CTS` reader - CTS is activated (set low). Clear To Send."] -pub type EVENTS_CTS_R = crate::BitReader; -#[doc = "CTS is activated (set low). Clear To Send.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum EVENTS_CTS_A { - #[doc = "0: Event not generated"] - NOT_GENERATED = 0, - #[doc = "1: Event generated"] - GENERATED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: EVENTS_CTS_A) -> Self { - variant as u8 != 0 - } -} -impl EVENTS_CTS_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> EVENTS_CTS_A { - match self.bits { - false => EVENTS_CTS_A::NOT_GENERATED, - true => EVENTS_CTS_A::GENERATED, - } - } - #[doc = "Checks if the value of the field is `NOT_GENERATED`"] - #[inline(always)] - pub fn is_not_generated(&self) -> bool { - *self == EVENTS_CTS_A::NOT_GENERATED - } - #[doc = "Checks if the value of the field is `GENERATED`"] - #[inline(always)] - pub fn is_generated(&self) -> bool { - *self == EVENTS_CTS_A::GENERATED - } -} -#[doc = "Field `EVENTS_CTS` writer - CTS is activated (set low). Clear To Send."] -pub type EVENTS_CTS_W<'a, const O: u8> = - crate::BitWriter<'a, u32, EVENTS_CTS_SPEC, EVENTS_CTS_A, O>; -impl<'a, const O: u8> EVENTS_CTS_W<'a, O> { - #[doc = "Event not generated"] - #[inline(always)] - pub fn not_generated(self) -> &'a mut W { - self.variant(EVENTS_CTS_A::NOT_GENERATED) - } - #[doc = "Event generated"] - #[inline(always)] - pub fn generated(self) -> &'a mut W { - self.variant(EVENTS_CTS_A::GENERATED) - } -} -impl R { - #[doc = "Bit 0 - CTS is activated (set low). Clear To Send."] - #[inline(always)] - pub fn events_cts(&self) -> EVENTS_CTS_R { - EVENTS_CTS_R::new((self.bits & 1) != 0) - } -} -impl W { - #[doc = "Bit 0 - CTS is activated (set low). Clear To Send."] - #[inline(always)] - #[must_use] - pub fn events_cts(&mut self) -> EVENTS_CTS_W<0> { - EVENTS_CTS_W::new(self) - } - #[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 = "CTS is activated (set low). Clear To Send.\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 [events_cts](index.html) module"] -pub struct EVENTS_CTS_SPEC; -impl crate::RegisterSpec for EVENTS_CTS_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [events_cts::R](R) reader structure"] -impl crate::Readable for EVENTS_CTS_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [events_cts::W](W) writer structure"] -impl crate::Writable for EVENTS_CTS_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets EVENTS_CTS to value 0"] -impl crate::Resettable for EVENTS_CTS_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/uart0/events_error.rs b/down-the-stack/dk_pac/src/uart0/events_error.rs deleted file mode 100644 index ea836b3..0000000 --- a/down-the-stack/dk_pac/src/uart0/events_error.rs +++ /dev/null @@ -1,127 +0,0 @@ -#[doc = "Register `EVENTS_ERROR` 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 `EVENTS_ERROR` 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 `EVENTS_ERROR` reader - Error detected"] -pub type EVENTS_ERROR_R = crate::BitReader; -#[doc = "Error detected\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum EVENTS_ERROR_A { - #[doc = "0: Event not generated"] - NOT_GENERATED = 0, - #[doc = "1: Event generated"] - GENERATED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: EVENTS_ERROR_A) -> Self { - variant as u8 != 0 - } -} -impl EVENTS_ERROR_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> EVENTS_ERROR_A { - match self.bits { - false => EVENTS_ERROR_A::NOT_GENERATED, - true => EVENTS_ERROR_A::GENERATED, - } - } - #[doc = "Checks if the value of the field is `NOT_GENERATED`"] - #[inline(always)] - pub fn is_not_generated(&self) -> bool { - *self == EVENTS_ERROR_A::NOT_GENERATED - } - #[doc = "Checks if the value of the field is `GENERATED`"] - #[inline(always)] - pub fn is_generated(&self) -> bool { - *self == EVENTS_ERROR_A::GENERATED - } -} -#[doc = "Field `EVENTS_ERROR` writer - Error detected"] -pub type EVENTS_ERROR_W<'a, const O: u8> = - crate::BitWriter<'a, u32, EVENTS_ERROR_SPEC, EVENTS_ERROR_A, O>; -impl<'a, const O: u8> EVENTS_ERROR_W<'a, O> { - #[doc = "Event not generated"] - #[inline(always)] - pub fn not_generated(self) -> &'a mut W { - self.variant(EVENTS_ERROR_A::NOT_GENERATED) - } - #[doc = "Event generated"] - #[inline(always)] - pub fn generated(self) -> &'a mut W { - self.variant(EVENTS_ERROR_A::GENERATED) - } -} -impl R { - #[doc = "Bit 0 - Error detected"] - #[inline(always)] - pub fn events_error(&self) -> EVENTS_ERROR_R { - EVENTS_ERROR_R::new((self.bits & 1) != 0) - } -} -impl W { - #[doc = "Bit 0 - Error detected"] - #[inline(always)] - #[must_use] - pub fn events_error(&mut self) -> EVENTS_ERROR_W<0> { - EVENTS_ERROR_W::new(self) - } - #[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 = "Error detected\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 [events_error](index.html) module"] -pub struct EVENTS_ERROR_SPEC; -impl crate::RegisterSpec for EVENTS_ERROR_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [events_error::R](R) reader structure"] -impl crate::Readable for EVENTS_ERROR_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [events_error::W](W) writer structure"] -impl crate::Writable for EVENTS_ERROR_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets EVENTS_ERROR to value 0"] -impl crate::Resettable for EVENTS_ERROR_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/uart0/events_ncts.rs b/down-the-stack/dk_pac/src/uart0/events_ncts.rs deleted file mode 100644 index 4596a0a..0000000 --- a/down-the-stack/dk_pac/src/uart0/events_ncts.rs +++ /dev/null @@ -1,127 +0,0 @@ -#[doc = "Register `EVENTS_NCTS` 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 `EVENTS_NCTS` 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 `EVENTS_NCTS` reader - CTS is deactivated (set high). Not Clear To Send."] -pub type EVENTS_NCTS_R = crate::BitReader; -#[doc = "CTS is deactivated (set high). Not Clear To Send.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum EVENTS_NCTS_A { - #[doc = "0: Event not generated"] - NOT_GENERATED = 0, - #[doc = "1: Event generated"] - GENERATED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: EVENTS_NCTS_A) -> Self { - variant as u8 != 0 - } -} -impl EVENTS_NCTS_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> EVENTS_NCTS_A { - match self.bits { - false => EVENTS_NCTS_A::NOT_GENERATED, - true => EVENTS_NCTS_A::GENERATED, - } - } - #[doc = "Checks if the value of the field is `NOT_GENERATED`"] - #[inline(always)] - pub fn is_not_generated(&self) -> bool { - *self == EVENTS_NCTS_A::NOT_GENERATED - } - #[doc = "Checks if the value of the field is `GENERATED`"] - #[inline(always)] - pub fn is_generated(&self) -> bool { - *self == EVENTS_NCTS_A::GENERATED - } -} -#[doc = "Field `EVENTS_NCTS` writer - CTS is deactivated (set high). Not Clear To Send."] -pub type EVENTS_NCTS_W<'a, const O: u8> = - crate::BitWriter<'a, u32, EVENTS_NCTS_SPEC, EVENTS_NCTS_A, O>; -impl<'a, const O: u8> EVENTS_NCTS_W<'a, O> { - #[doc = "Event not generated"] - #[inline(always)] - pub fn not_generated(self) -> &'a mut W { - self.variant(EVENTS_NCTS_A::NOT_GENERATED) - } - #[doc = "Event generated"] - #[inline(always)] - pub fn generated(self) -> &'a mut W { - self.variant(EVENTS_NCTS_A::GENERATED) - } -} -impl R { - #[doc = "Bit 0 - CTS is deactivated (set high). Not Clear To Send."] - #[inline(always)] - pub fn events_ncts(&self) -> EVENTS_NCTS_R { - EVENTS_NCTS_R::new((self.bits & 1) != 0) - } -} -impl W { - #[doc = "Bit 0 - CTS is deactivated (set high). Not Clear To Send."] - #[inline(always)] - #[must_use] - pub fn events_ncts(&mut self) -> EVENTS_NCTS_W<0> { - EVENTS_NCTS_W::new(self) - } - #[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 = "CTS is deactivated (set high). Not Clear To Send.\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 [events_ncts](index.html) module"] -pub struct EVENTS_NCTS_SPEC; -impl crate::RegisterSpec for EVENTS_NCTS_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [events_ncts::R](R) reader structure"] -impl crate::Readable for EVENTS_NCTS_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [events_ncts::W](W) writer structure"] -impl crate::Writable for EVENTS_NCTS_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets EVENTS_NCTS to value 0"] -impl crate::Resettable for EVENTS_NCTS_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/uart0/events_rxdrdy.rs b/down-the-stack/dk_pac/src/uart0/events_rxdrdy.rs deleted file mode 100644 index c26d9ec..0000000 --- a/down-the-stack/dk_pac/src/uart0/events_rxdrdy.rs +++ /dev/null @@ -1,127 +0,0 @@ -#[doc = "Register `EVENTS_RXDRDY` 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 `EVENTS_RXDRDY` 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 `EVENTS_RXDRDY` reader - Data received in RXD"] -pub type EVENTS_RXDRDY_R = crate::BitReader; -#[doc = "Data received in RXD\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum EVENTS_RXDRDY_A { - #[doc = "0: Event not generated"] - NOT_GENERATED = 0, - #[doc = "1: Event generated"] - GENERATED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: EVENTS_RXDRDY_A) -> Self { - variant as u8 != 0 - } -} -impl EVENTS_RXDRDY_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> EVENTS_RXDRDY_A { - match self.bits { - false => EVENTS_RXDRDY_A::NOT_GENERATED, - true => EVENTS_RXDRDY_A::GENERATED, - } - } - #[doc = "Checks if the value of the field is `NOT_GENERATED`"] - #[inline(always)] - pub fn is_not_generated(&self) -> bool { - *self == EVENTS_RXDRDY_A::NOT_GENERATED - } - #[doc = "Checks if the value of the field is `GENERATED`"] - #[inline(always)] - pub fn is_generated(&self) -> bool { - *self == EVENTS_RXDRDY_A::GENERATED - } -} -#[doc = "Field `EVENTS_RXDRDY` writer - Data received in RXD"] -pub type EVENTS_RXDRDY_W<'a, const O: u8> = - crate::BitWriter<'a, u32, EVENTS_RXDRDY_SPEC, EVENTS_RXDRDY_A, O>; -impl<'a, const O: u8> EVENTS_RXDRDY_W<'a, O> { - #[doc = "Event not generated"] - #[inline(always)] - pub fn not_generated(self) -> &'a mut W { - self.variant(EVENTS_RXDRDY_A::NOT_GENERATED) - } - #[doc = "Event generated"] - #[inline(always)] - pub fn generated(self) -> &'a mut W { - self.variant(EVENTS_RXDRDY_A::GENERATED) - } -} -impl R { - #[doc = "Bit 0 - Data received in RXD"] - #[inline(always)] - pub fn events_rxdrdy(&self) -> EVENTS_RXDRDY_R { - EVENTS_RXDRDY_R::new((self.bits & 1) != 0) - } -} -impl W { - #[doc = "Bit 0 - Data received in RXD"] - #[inline(always)] - #[must_use] - pub fn events_rxdrdy(&mut self) -> EVENTS_RXDRDY_W<0> { - EVENTS_RXDRDY_W::new(self) - } - #[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 = "Data received in RXD\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 [events_rxdrdy](index.html) module"] -pub struct EVENTS_RXDRDY_SPEC; -impl crate::RegisterSpec for EVENTS_RXDRDY_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [events_rxdrdy::R](R) reader structure"] -impl crate::Readable for EVENTS_RXDRDY_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [events_rxdrdy::W](W) writer structure"] -impl crate::Writable for EVENTS_RXDRDY_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets EVENTS_RXDRDY to value 0"] -impl crate::Resettable for EVENTS_RXDRDY_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/uart0/events_rxto.rs b/down-the-stack/dk_pac/src/uart0/events_rxto.rs deleted file mode 100644 index f3a1380..0000000 --- a/down-the-stack/dk_pac/src/uart0/events_rxto.rs +++ /dev/null @@ -1,127 +0,0 @@ -#[doc = "Register `EVENTS_RXTO` 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 `EVENTS_RXTO` 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 `EVENTS_RXTO` reader - Receiver timeout"] -pub type EVENTS_RXTO_R = crate::BitReader; -#[doc = "Receiver timeout\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum EVENTS_RXTO_A { - #[doc = "0: Event not generated"] - NOT_GENERATED = 0, - #[doc = "1: Event generated"] - GENERATED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: EVENTS_RXTO_A) -> Self { - variant as u8 != 0 - } -} -impl EVENTS_RXTO_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> EVENTS_RXTO_A { - match self.bits { - false => EVENTS_RXTO_A::NOT_GENERATED, - true => EVENTS_RXTO_A::GENERATED, - } - } - #[doc = "Checks if the value of the field is `NOT_GENERATED`"] - #[inline(always)] - pub fn is_not_generated(&self) -> bool { - *self == EVENTS_RXTO_A::NOT_GENERATED - } - #[doc = "Checks if the value of the field is `GENERATED`"] - #[inline(always)] - pub fn is_generated(&self) -> bool { - *self == EVENTS_RXTO_A::GENERATED - } -} -#[doc = "Field `EVENTS_RXTO` writer - Receiver timeout"] -pub type EVENTS_RXTO_W<'a, const O: u8> = - crate::BitWriter<'a, u32, EVENTS_RXTO_SPEC, EVENTS_RXTO_A, O>; -impl<'a, const O: u8> EVENTS_RXTO_W<'a, O> { - #[doc = "Event not generated"] - #[inline(always)] - pub fn not_generated(self) -> &'a mut W { - self.variant(EVENTS_RXTO_A::NOT_GENERATED) - } - #[doc = "Event generated"] - #[inline(always)] - pub fn generated(self) -> &'a mut W { - self.variant(EVENTS_RXTO_A::GENERATED) - } -} -impl R { - #[doc = "Bit 0 - Receiver timeout"] - #[inline(always)] - pub fn events_rxto(&self) -> EVENTS_RXTO_R { - EVENTS_RXTO_R::new((self.bits & 1) != 0) - } -} -impl W { - #[doc = "Bit 0 - Receiver timeout"] - #[inline(always)] - #[must_use] - pub fn events_rxto(&mut self) -> EVENTS_RXTO_W<0> { - EVENTS_RXTO_W::new(self) - } - #[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 = "Receiver timeout\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 [events_rxto](index.html) module"] -pub struct EVENTS_RXTO_SPEC; -impl crate::RegisterSpec for EVENTS_RXTO_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [events_rxto::R](R) reader structure"] -impl crate::Readable for EVENTS_RXTO_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [events_rxto::W](W) writer structure"] -impl crate::Writable for EVENTS_RXTO_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets EVENTS_RXTO to value 0"] -impl crate::Resettable for EVENTS_RXTO_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/uart0/events_txdrdy.rs b/down-the-stack/dk_pac/src/uart0/events_txdrdy.rs deleted file mode 100644 index b5a9b5b..0000000 --- a/down-the-stack/dk_pac/src/uart0/events_txdrdy.rs +++ /dev/null @@ -1,127 +0,0 @@ -#[doc = "Register `EVENTS_TXDRDY` 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 `EVENTS_TXDRDY` 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 `EVENTS_TXDRDY` reader - Data sent from TXD"] -pub type EVENTS_TXDRDY_R = crate::BitReader; -#[doc = "Data sent from TXD\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum EVENTS_TXDRDY_A { - #[doc = "0: Event not generated"] - NOT_GENERATED = 0, - #[doc = "1: Event generated"] - GENERATED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: EVENTS_TXDRDY_A) -> Self { - variant as u8 != 0 - } -} -impl EVENTS_TXDRDY_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> EVENTS_TXDRDY_A { - match self.bits { - false => EVENTS_TXDRDY_A::NOT_GENERATED, - true => EVENTS_TXDRDY_A::GENERATED, - } - } - #[doc = "Checks if the value of the field is `NOT_GENERATED`"] - #[inline(always)] - pub fn is_not_generated(&self) -> bool { - *self == EVENTS_TXDRDY_A::NOT_GENERATED - } - #[doc = "Checks if the value of the field is `GENERATED`"] - #[inline(always)] - pub fn is_generated(&self) -> bool { - *self == EVENTS_TXDRDY_A::GENERATED - } -} -#[doc = "Field `EVENTS_TXDRDY` writer - Data sent from TXD"] -pub type EVENTS_TXDRDY_W<'a, const O: u8> = - crate::BitWriter<'a, u32, EVENTS_TXDRDY_SPEC, EVENTS_TXDRDY_A, O>; -impl<'a, const O: u8> EVENTS_TXDRDY_W<'a, O> { - #[doc = "Event not generated"] - #[inline(always)] - pub fn not_generated(self) -> &'a mut W { - self.variant(EVENTS_TXDRDY_A::NOT_GENERATED) - } - #[doc = "Event generated"] - #[inline(always)] - pub fn generated(self) -> &'a mut W { - self.variant(EVENTS_TXDRDY_A::GENERATED) - } -} -impl R { - #[doc = "Bit 0 - Data sent from TXD"] - #[inline(always)] - pub fn events_txdrdy(&self) -> EVENTS_TXDRDY_R { - EVENTS_TXDRDY_R::new((self.bits & 1) != 0) - } -} -impl W { - #[doc = "Bit 0 - Data sent from TXD"] - #[inline(always)] - #[must_use] - pub fn events_txdrdy(&mut self) -> EVENTS_TXDRDY_W<0> { - EVENTS_TXDRDY_W::new(self) - } - #[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 = "Data sent from TXD\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 [events_txdrdy](index.html) module"] -pub struct EVENTS_TXDRDY_SPEC; -impl crate::RegisterSpec for EVENTS_TXDRDY_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [events_txdrdy::R](R) reader structure"] -impl crate::Readable for EVENTS_TXDRDY_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [events_txdrdy::W](W) writer structure"] -impl crate::Writable for EVENTS_TXDRDY_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets EVENTS_TXDRDY to value 0"] -impl crate::Resettable for EVENTS_TXDRDY_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/uart0/intenclr.rs b/down-the-stack/dk_pac/src/uart0/intenclr.rs deleted file mode 100644 index bb90331..0000000 --- a/down-the-stack/dk_pac/src/uart0/intenclr.rs +++ /dev/null @@ -1,473 +0,0 @@ -#[doc = "Register `INTENCLR` 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 `INTENCLR` 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 `CTS` reader - Write '1' to disable interrupt for event CTS"] -pub type CTS_R = crate::BitReader; -#[doc = "Write '1' to disable interrupt for event CTS\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum CTS_A { - #[doc = "0: Read: Disabled"] - DISABLED = 0, - #[doc = "1: Read: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: CTS_A) -> Self { - variant as u8 != 0 - } -} -impl CTS_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> CTS_A { - match self.bits { - false => CTS_A::DISABLED, - true => CTS_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == CTS_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == CTS_A::ENABLED - } -} -#[doc = "Write '1' to disable interrupt for event CTS\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum CTS_AW { - #[doc = "1: Disable"] - CLEAR = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: CTS_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `CTS` writer - Write '1' to disable interrupt for event CTS"] -pub type CTS_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENCLR_SPEC, CTS_AW, O>; -impl<'a, const O: u8> CTS_W<'a, O> { - #[doc = "Disable"] - #[inline(always)] - pub fn clear(self) -> &'a mut W { - self.variant(CTS_AW::CLEAR) - } -} -#[doc = "Field `NCTS` reader - Write '1' to disable interrupt for event NCTS"] -pub type NCTS_R = crate::BitReader; -#[doc = "Write '1' to disable interrupt for event NCTS\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum NCTS_A { - #[doc = "0: Read: Disabled"] - DISABLED = 0, - #[doc = "1: Read: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: NCTS_A) -> Self { - variant as u8 != 0 - } -} -impl NCTS_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> NCTS_A { - match self.bits { - false => NCTS_A::DISABLED, - true => NCTS_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == NCTS_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == NCTS_A::ENABLED - } -} -#[doc = "Write '1' to disable interrupt for event NCTS\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum NCTS_AW { - #[doc = "1: Disable"] - CLEAR = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: NCTS_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `NCTS` writer - Write '1' to disable interrupt for event NCTS"] -pub type NCTS_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENCLR_SPEC, NCTS_AW, O>; -impl<'a, const O: u8> NCTS_W<'a, O> { - #[doc = "Disable"] - #[inline(always)] - pub fn clear(self) -> &'a mut W { - self.variant(NCTS_AW::CLEAR) - } -} -#[doc = "Field `RXDRDY` reader - Write '1' to disable interrupt for event RXDRDY"] -pub type RXDRDY_R = crate::BitReader; -#[doc = "Write '1' to disable interrupt for event RXDRDY\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum RXDRDY_A { - #[doc = "0: Read: Disabled"] - DISABLED = 0, - #[doc = "1: Read: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: RXDRDY_A) -> Self { - variant as u8 != 0 - } -} -impl RXDRDY_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> RXDRDY_A { - match self.bits { - false => RXDRDY_A::DISABLED, - true => RXDRDY_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == RXDRDY_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == RXDRDY_A::ENABLED - } -} -#[doc = "Write '1' to disable interrupt for event RXDRDY\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum RXDRDY_AW { - #[doc = "1: Disable"] - CLEAR = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: RXDRDY_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `RXDRDY` writer - Write '1' to disable interrupt for event RXDRDY"] -pub type RXDRDY_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENCLR_SPEC, RXDRDY_AW, O>; -impl<'a, const O: u8> RXDRDY_W<'a, O> { - #[doc = "Disable"] - #[inline(always)] - pub fn clear(self) -> &'a mut W { - self.variant(RXDRDY_AW::CLEAR) - } -} -#[doc = "Field `TXDRDY` reader - Write '1' to disable interrupt for event TXDRDY"] -pub type TXDRDY_R = crate::BitReader; -#[doc = "Write '1' to disable interrupt for event TXDRDY\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum TXDRDY_A { - #[doc = "0: Read: Disabled"] - DISABLED = 0, - #[doc = "1: Read: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: TXDRDY_A) -> Self { - variant as u8 != 0 - } -} -impl TXDRDY_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> TXDRDY_A { - match self.bits { - false => TXDRDY_A::DISABLED, - true => TXDRDY_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == TXDRDY_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == TXDRDY_A::ENABLED - } -} -#[doc = "Write '1' to disable interrupt for event TXDRDY\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum TXDRDY_AW { - #[doc = "1: Disable"] - CLEAR = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: TXDRDY_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `TXDRDY` writer - Write '1' to disable interrupt for event TXDRDY"] -pub type TXDRDY_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENCLR_SPEC, TXDRDY_AW, O>; -impl<'a, const O: u8> TXDRDY_W<'a, O> { - #[doc = "Disable"] - #[inline(always)] - pub fn clear(self) -> &'a mut W { - self.variant(TXDRDY_AW::CLEAR) - } -} -#[doc = "Field `ERROR` reader - Write '1' to disable interrupt for event ERROR"] -pub type ERROR_R = crate::BitReader; -#[doc = "Write '1' to disable interrupt for event ERROR\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum ERROR_A { - #[doc = "0: Read: Disabled"] - DISABLED = 0, - #[doc = "1: Read: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: ERROR_A) -> Self { - variant as u8 != 0 - } -} -impl ERROR_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> ERROR_A { - match self.bits { - false => ERROR_A::DISABLED, - true => ERROR_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == ERROR_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == ERROR_A::ENABLED - } -} -#[doc = "Write '1' to disable interrupt for event ERROR\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum ERROR_AW { - #[doc = "1: Disable"] - CLEAR = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: ERROR_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `ERROR` writer - Write '1' to disable interrupt for event ERROR"] -pub type ERROR_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENCLR_SPEC, ERROR_AW, O>; -impl<'a, const O: u8> ERROR_W<'a, O> { - #[doc = "Disable"] - #[inline(always)] - pub fn clear(self) -> &'a mut W { - self.variant(ERROR_AW::CLEAR) - } -} -#[doc = "Field `RXTO` reader - Write '1' to disable interrupt for event RXTO"] -pub type RXTO_R = crate::BitReader; -#[doc = "Write '1' to disable interrupt for event RXTO\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum RXTO_A { - #[doc = "0: Read: Disabled"] - DISABLED = 0, - #[doc = "1: Read: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: RXTO_A) -> Self { - variant as u8 != 0 - } -} -impl RXTO_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> RXTO_A { - match self.bits { - false => RXTO_A::DISABLED, - true => RXTO_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == RXTO_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == RXTO_A::ENABLED - } -} -#[doc = "Write '1' to disable interrupt for event RXTO\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum RXTO_AW { - #[doc = "1: Disable"] - CLEAR = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: RXTO_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `RXTO` writer - Write '1' to disable interrupt for event RXTO"] -pub type RXTO_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENCLR_SPEC, RXTO_AW, O>; -impl<'a, const O: u8> RXTO_W<'a, O> { - #[doc = "Disable"] - #[inline(always)] - pub fn clear(self) -> &'a mut W { - self.variant(RXTO_AW::CLEAR) - } -} -impl R { - #[doc = "Bit 0 - Write '1' to disable interrupt for event CTS"] - #[inline(always)] - pub fn cts(&self) -> CTS_R { - CTS_R::new((self.bits & 1) != 0) - } - #[doc = "Bit 1 - Write '1' to disable interrupt for event NCTS"] - #[inline(always)] - pub fn ncts(&self) -> NCTS_R { - NCTS_R::new(((self.bits >> 1) & 1) != 0) - } - #[doc = "Bit 2 - Write '1' to disable interrupt for event RXDRDY"] - #[inline(always)] - pub fn rxdrdy(&self) -> RXDRDY_R { - RXDRDY_R::new(((self.bits >> 2) & 1) != 0) - } - #[doc = "Bit 7 - Write '1' to disable interrupt for event TXDRDY"] - #[inline(always)] - pub fn txdrdy(&self) -> TXDRDY_R { - TXDRDY_R::new(((self.bits >> 7) & 1) != 0) - } - #[doc = "Bit 9 - Write '1' to disable interrupt for event ERROR"] - #[inline(always)] - pub fn error(&self) -> ERROR_R { - ERROR_R::new(((self.bits >> 9) & 1) != 0) - } - #[doc = "Bit 17 - Write '1' to disable interrupt for event RXTO"] - #[inline(always)] - pub fn rxto(&self) -> RXTO_R { - RXTO_R::new(((self.bits >> 17) & 1) != 0) - } -} -impl W { - #[doc = "Bit 0 - Write '1' to disable interrupt for event CTS"] - #[inline(always)] - #[must_use] - pub fn cts(&mut self) -> CTS_W<0> { - CTS_W::new(self) - } - #[doc = "Bit 1 - Write '1' to disable interrupt for event NCTS"] - #[inline(always)] - #[must_use] - pub fn ncts(&mut self) -> NCTS_W<1> { - NCTS_W::new(self) - } - #[doc = "Bit 2 - Write '1' to disable interrupt for event RXDRDY"] - #[inline(always)] - #[must_use] - pub fn rxdrdy(&mut self) -> RXDRDY_W<2> { - RXDRDY_W::new(self) - } - #[doc = "Bit 7 - Write '1' to disable interrupt for event TXDRDY"] - #[inline(always)] - #[must_use] - pub fn txdrdy(&mut self) -> TXDRDY_W<7> { - TXDRDY_W::new(self) - } - #[doc = "Bit 9 - Write '1' to disable interrupt for event ERROR"] - #[inline(always)] - #[must_use] - pub fn error(&mut self) -> ERROR_W<9> { - ERROR_W::new(self) - } - #[doc = "Bit 17 - Write '1' to disable interrupt for event RXTO"] - #[inline(always)] - #[must_use] - pub fn rxto(&mut self) -> RXTO_W<17> { - RXTO_W::new(self) - } - #[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 = "Disable interrupt\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 [intenclr](index.html) module"] -pub struct INTENCLR_SPEC; -impl crate::RegisterSpec for INTENCLR_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [intenclr::R](R) reader structure"] -impl crate::Readable for INTENCLR_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [intenclr::W](W) writer structure"] -impl crate::Writable for INTENCLR_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets INTENCLR to value 0"] -impl crate::Resettable for INTENCLR_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/uart0/intenset.rs b/down-the-stack/dk_pac/src/uart0/intenset.rs deleted file mode 100644 index 4a2ddfc..0000000 --- a/down-the-stack/dk_pac/src/uart0/intenset.rs +++ /dev/null @@ -1,473 +0,0 @@ -#[doc = "Register `INTENSET` 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 `INTENSET` 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 `CTS` reader - Write '1' to enable interrupt for event CTS"] -pub type CTS_R = crate::BitReader; -#[doc = "Write '1' to enable interrupt for event CTS\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum CTS_A { - #[doc = "0: Read: Disabled"] - DISABLED = 0, - #[doc = "1: Read: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: CTS_A) -> Self { - variant as u8 != 0 - } -} -impl CTS_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> CTS_A { - match self.bits { - false => CTS_A::DISABLED, - true => CTS_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == CTS_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == CTS_A::ENABLED - } -} -#[doc = "Write '1' to enable interrupt for event CTS\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum CTS_AW { - #[doc = "1: Enable"] - SET = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: CTS_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `CTS` writer - Write '1' to enable interrupt for event CTS"] -pub type CTS_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENSET_SPEC, CTS_AW, O>; -impl<'a, const O: u8> CTS_W<'a, O> { - #[doc = "Enable"] - #[inline(always)] - pub fn set(self) -> &'a mut W { - self.variant(CTS_AW::SET) - } -} -#[doc = "Field `NCTS` reader - Write '1' to enable interrupt for event NCTS"] -pub type NCTS_R = crate::BitReader; -#[doc = "Write '1' to enable interrupt for event NCTS\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum NCTS_A { - #[doc = "0: Read: Disabled"] - DISABLED = 0, - #[doc = "1: Read: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: NCTS_A) -> Self { - variant as u8 != 0 - } -} -impl NCTS_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> NCTS_A { - match self.bits { - false => NCTS_A::DISABLED, - true => NCTS_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == NCTS_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == NCTS_A::ENABLED - } -} -#[doc = "Write '1' to enable interrupt for event NCTS\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum NCTS_AW { - #[doc = "1: Enable"] - SET = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: NCTS_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `NCTS` writer - Write '1' to enable interrupt for event NCTS"] -pub type NCTS_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENSET_SPEC, NCTS_AW, O>; -impl<'a, const O: u8> NCTS_W<'a, O> { - #[doc = "Enable"] - #[inline(always)] - pub fn set(self) -> &'a mut W { - self.variant(NCTS_AW::SET) - } -} -#[doc = "Field `RXDRDY` reader - Write '1' to enable interrupt for event RXDRDY"] -pub type RXDRDY_R = crate::BitReader; -#[doc = "Write '1' to enable interrupt for event RXDRDY\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum RXDRDY_A { - #[doc = "0: Read: Disabled"] - DISABLED = 0, - #[doc = "1: Read: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: RXDRDY_A) -> Self { - variant as u8 != 0 - } -} -impl RXDRDY_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> RXDRDY_A { - match self.bits { - false => RXDRDY_A::DISABLED, - true => RXDRDY_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == RXDRDY_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == RXDRDY_A::ENABLED - } -} -#[doc = "Write '1' to enable interrupt for event RXDRDY\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum RXDRDY_AW { - #[doc = "1: Enable"] - SET = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: RXDRDY_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `RXDRDY` writer - Write '1' to enable interrupt for event RXDRDY"] -pub type RXDRDY_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENSET_SPEC, RXDRDY_AW, O>; -impl<'a, const O: u8> RXDRDY_W<'a, O> { - #[doc = "Enable"] - #[inline(always)] - pub fn set(self) -> &'a mut W { - self.variant(RXDRDY_AW::SET) - } -} -#[doc = "Field `TXDRDY` reader - Write '1' to enable interrupt for event TXDRDY"] -pub type TXDRDY_R = crate::BitReader; -#[doc = "Write '1' to enable interrupt for event TXDRDY\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum TXDRDY_A { - #[doc = "0: Read: Disabled"] - DISABLED = 0, - #[doc = "1: Read: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: TXDRDY_A) -> Self { - variant as u8 != 0 - } -} -impl TXDRDY_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> TXDRDY_A { - match self.bits { - false => TXDRDY_A::DISABLED, - true => TXDRDY_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == TXDRDY_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == TXDRDY_A::ENABLED - } -} -#[doc = "Write '1' to enable interrupt for event TXDRDY\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum TXDRDY_AW { - #[doc = "1: Enable"] - SET = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: TXDRDY_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `TXDRDY` writer - Write '1' to enable interrupt for event TXDRDY"] -pub type TXDRDY_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENSET_SPEC, TXDRDY_AW, O>; -impl<'a, const O: u8> TXDRDY_W<'a, O> { - #[doc = "Enable"] - #[inline(always)] - pub fn set(self) -> &'a mut W { - self.variant(TXDRDY_AW::SET) - } -} -#[doc = "Field `ERROR` reader - Write '1' to enable interrupt for event ERROR"] -pub type ERROR_R = crate::BitReader; -#[doc = "Write '1' to enable interrupt for event ERROR\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum ERROR_A { - #[doc = "0: Read: Disabled"] - DISABLED = 0, - #[doc = "1: Read: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: ERROR_A) -> Self { - variant as u8 != 0 - } -} -impl ERROR_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> ERROR_A { - match self.bits { - false => ERROR_A::DISABLED, - true => ERROR_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == ERROR_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == ERROR_A::ENABLED - } -} -#[doc = "Write '1' to enable interrupt for event ERROR\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum ERROR_AW { - #[doc = "1: Enable"] - SET = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: ERROR_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `ERROR` writer - Write '1' to enable interrupt for event ERROR"] -pub type ERROR_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENSET_SPEC, ERROR_AW, O>; -impl<'a, const O: u8> ERROR_W<'a, O> { - #[doc = "Enable"] - #[inline(always)] - pub fn set(self) -> &'a mut W { - self.variant(ERROR_AW::SET) - } -} -#[doc = "Field `RXTO` reader - Write '1' to enable interrupt for event RXTO"] -pub type RXTO_R = crate::BitReader; -#[doc = "Write '1' to enable interrupt for event RXTO\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum RXTO_A { - #[doc = "0: Read: Disabled"] - DISABLED = 0, - #[doc = "1: Read: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: RXTO_A) -> Self { - variant as u8 != 0 - } -} -impl RXTO_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> RXTO_A { - match self.bits { - false => RXTO_A::DISABLED, - true => RXTO_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == RXTO_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == RXTO_A::ENABLED - } -} -#[doc = "Write '1' to enable interrupt for event RXTO\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum RXTO_AW { - #[doc = "1: Enable"] - SET = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: RXTO_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `RXTO` writer - Write '1' to enable interrupt for event RXTO"] -pub type RXTO_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENSET_SPEC, RXTO_AW, O>; -impl<'a, const O: u8> RXTO_W<'a, O> { - #[doc = "Enable"] - #[inline(always)] - pub fn set(self) -> &'a mut W { - self.variant(RXTO_AW::SET) - } -} -impl R { - #[doc = "Bit 0 - Write '1' to enable interrupt for event CTS"] - #[inline(always)] - pub fn cts(&self) -> CTS_R { - CTS_R::new((self.bits & 1) != 0) - } - #[doc = "Bit 1 - Write '1' to enable interrupt for event NCTS"] - #[inline(always)] - pub fn ncts(&self) -> NCTS_R { - NCTS_R::new(((self.bits >> 1) & 1) != 0) - } - #[doc = "Bit 2 - Write '1' to enable interrupt for event RXDRDY"] - #[inline(always)] - pub fn rxdrdy(&self) -> RXDRDY_R { - RXDRDY_R::new(((self.bits >> 2) & 1) != 0) - } - #[doc = "Bit 7 - Write '1' to enable interrupt for event TXDRDY"] - #[inline(always)] - pub fn txdrdy(&self) -> TXDRDY_R { - TXDRDY_R::new(((self.bits >> 7) & 1) != 0) - } - #[doc = "Bit 9 - Write '1' to enable interrupt for event ERROR"] - #[inline(always)] - pub fn error(&self) -> ERROR_R { - ERROR_R::new(((self.bits >> 9) & 1) != 0) - } - #[doc = "Bit 17 - Write '1' to enable interrupt for event RXTO"] - #[inline(always)] - pub fn rxto(&self) -> RXTO_R { - RXTO_R::new(((self.bits >> 17) & 1) != 0) - } -} -impl W { - #[doc = "Bit 0 - Write '1' to enable interrupt for event CTS"] - #[inline(always)] - #[must_use] - pub fn cts(&mut self) -> CTS_W<0> { - CTS_W::new(self) - } - #[doc = "Bit 1 - Write '1' to enable interrupt for event NCTS"] - #[inline(always)] - #[must_use] - pub fn ncts(&mut self) -> NCTS_W<1> { - NCTS_W::new(self) - } - #[doc = "Bit 2 - Write '1' to enable interrupt for event RXDRDY"] - #[inline(always)] - #[must_use] - pub fn rxdrdy(&mut self) -> RXDRDY_W<2> { - RXDRDY_W::new(self) - } - #[doc = "Bit 7 - Write '1' to enable interrupt for event TXDRDY"] - #[inline(always)] - #[must_use] - pub fn txdrdy(&mut self) -> TXDRDY_W<7> { - TXDRDY_W::new(self) - } - #[doc = "Bit 9 - Write '1' to enable interrupt for event ERROR"] - #[inline(always)] - #[must_use] - pub fn error(&mut self) -> ERROR_W<9> { - ERROR_W::new(self) - } - #[doc = "Bit 17 - Write '1' to enable interrupt for event RXTO"] - #[inline(always)] - #[must_use] - pub fn rxto(&mut self) -> RXTO_W<17> { - RXTO_W::new(self) - } - #[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 = "Enable interrupt\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 [intenset](index.html) module"] -pub struct INTENSET_SPEC; -impl crate::RegisterSpec for INTENSET_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [intenset::R](R) reader structure"] -impl crate::Readable for INTENSET_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [intenset::W](W) writer structure"] -impl crate::Writable for INTENSET_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets INTENSET to value 0"] -impl crate::Resettable for INTENSET_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/uart0/pselcts.rs b/down-the-stack/dk_pac/src/uart0/pselcts.rs deleted file mode 100644 index 572b752..0000000 --- a/down-the-stack/dk_pac/src/uart0/pselcts.rs +++ /dev/null @@ -1,116 +0,0 @@ -#[doc = "Register `PSELCTS` 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 `PSELCTS` 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 `PSELCTS` reader - Pin number configuration for UART CTS signal"] -pub type PSELCTS_R = crate::FieldReader; -#[doc = "Pin number configuration for UART CTS signal\n\nValue on reset: 4294967295"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -#[repr(u32)] -pub enum PSELCTS_A { - #[doc = "4294967295: Disconnect"] - DISCONNECTED = 4294967295, -} -impl From for u32 { - #[inline(always)] - fn from(variant: PSELCTS_A) -> Self { - variant as _ - } -} -impl PSELCTS_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> Option { - match self.bits { - 4294967295 => Some(PSELCTS_A::DISCONNECTED), - _ => None, - } - } - #[doc = "Checks if the value of the field is `DISCONNECTED`"] - #[inline(always)] - pub fn is_disconnected(&self) -> bool { - *self == PSELCTS_A::DISCONNECTED - } -} -#[doc = "Field `PSELCTS` writer - Pin number configuration for UART CTS signal"] -pub type PSELCTS_W<'a, const O: u8> = - crate::FieldWriter<'a, u32, PSELCTS_SPEC, u32, PSELCTS_A, 32, O>; -impl<'a, const O: u8> PSELCTS_W<'a, O> { - #[doc = "Disconnect"] - #[inline(always)] - pub fn disconnected(self) -> &'a mut W { - self.variant(PSELCTS_A::DISCONNECTED) - } -} -impl R { - #[doc = "Bits 0:31 - Pin number configuration for UART CTS signal"] - #[inline(always)] - pub fn pselcts(&self) -> PSELCTS_R { - PSELCTS_R::new(self.bits) - } -} -impl W { - #[doc = "Bits 0:31 - Pin number configuration for UART CTS signal"] - #[inline(always)] - #[must_use] - pub fn pselcts(&mut self) -> PSELCTS_W<0> { - PSELCTS_W::new(self) - } - #[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 = "Pin select for CTS\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 [pselcts](index.html) module"] -pub struct PSELCTS_SPEC; -impl crate::RegisterSpec for PSELCTS_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [pselcts::R](R) reader structure"] -impl crate::Readable for PSELCTS_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [pselcts::W](W) writer structure"] -impl crate::Writable for PSELCTS_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets PSELCTS to value 0xffff_ffff"] -impl crate::Resettable for PSELCTS_SPEC { - const RESET_VALUE: Self::Ux = 0xffff_ffff; -} diff --git a/down-the-stack/dk_pac/src/uart0/pselrts.rs b/down-the-stack/dk_pac/src/uart0/pselrts.rs deleted file mode 100644 index 8f7d403..0000000 --- a/down-the-stack/dk_pac/src/uart0/pselrts.rs +++ /dev/null @@ -1,116 +0,0 @@ -#[doc = "Register `PSELRTS` 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 `PSELRTS` 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 `PSELRTS` reader - Pin number configuration for UART RTS signal"] -pub type PSELRTS_R = crate::FieldReader; -#[doc = "Pin number configuration for UART RTS signal\n\nValue on reset: 4294967295"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -#[repr(u32)] -pub enum PSELRTS_A { - #[doc = "4294967295: Disconnect"] - DISCONNECTED = 4294967295, -} -impl From for u32 { - #[inline(always)] - fn from(variant: PSELRTS_A) -> Self { - variant as _ - } -} -impl PSELRTS_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> Option { - match self.bits { - 4294967295 => Some(PSELRTS_A::DISCONNECTED), - _ => None, - } - } - #[doc = "Checks if the value of the field is `DISCONNECTED`"] - #[inline(always)] - pub fn is_disconnected(&self) -> bool { - *self == PSELRTS_A::DISCONNECTED - } -} -#[doc = "Field `PSELRTS` writer - Pin number configuration for UART RTS signal"] -pub type PSELRTS_W<'a, const O: u8> = - crate::FieldWriter<'a, u32, PSELRTS_SPEC, u32, PSELRTS_A, 32, O>; -impl<'a, const O: u8> PSELRTS_W<'a, O> { - #[doc = "Disconnect"] - #[inline(always)] - pub fn disconnected(self) -> &'a mut W { - self.variant(PSELRTS_A::DISCONNECTED) - } -} -impl R { - #[doc = "Bits 0:31 - Pin number configuration for UART RTS signal"] - #[inline(always)] - pub fn pselrts(&self) -> PSELRTS_R { - PSELRTS_R::new(self.bits) - } -} -impl W { - #[doc = "Bits 0:31 - Pin number configuration for UART RTS signal"] - #[inline(always)] - #[must_use] - pub fn pselrts(&mut self) -> PSELRTS_W<0> { - PSELRTS_W::new(self) - } - #[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 = "Pin select for RTS\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 [pselrts](index.html) module"] -pub struct PSELRTS_SPEC; -impl crate::RegisterSpec for PSELRTS_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [pselrts::R](R) reader structure"] -impl crate::Readable for PSELRTS_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [pselrts::W](W) writer structure"] -impl crate::Writable for PSELRTS_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets PSELRTS to value 0xffff_ffff"] -impl crate::Resettable for PSELRTS_SPEC { - const RESET_VALUE: Self::Ux = 0xffff_ffff; -} diff --git a/down-the-stack/dk_pac/src/uart0/pselrxd.rs b/down-the-stack/dk_pac/src/uart0/pselrxd.rs deleted file mode 100644 index 9915569..0000000 --- a/down-the-stack/dk_pac/src/uart0/pselrxd.rs +++ /dev/null @@ -1,116 +0,0 @@ -#[doc = "Register `PSELRXD` 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 `PSELRXD` 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 `PSELRXD` reader - Pin number configuration for UART RXD signal"] -pub type PSELRXD_R = crate::FieldReader; -#[doc = "Pin number configuration for UART RXD signal\n\nValue on reset: 4294967295"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -#[repr(u32)] -pub enum PSELRXD_A { - #[doc = "4294967295: Disconnect"] - DISCONNECTED = 4294967295, -} -impl From for u32 { - #[inline(always)] - fn from(variant: PSELRXD_A) -> Self { - variant as _ - } -} -impl PSELRXD_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> Option { - match self.bits { - 4294967295 => Some(PSELRXD_A::DISCONNECTED), - _ => None, - } - } - #[doc = "Checks if the value of the field is `DISCONNECTED`"] - #[inline(always)] - pub fn is_disconnected(&self) -> bool { - *self == PSELRXD_A::DISCONNECTED - } -} -#[doc = "Field `PSELRXD` writer - Pin number configuration for UART RXD signal"] -pub type PSELRXD_W<'a, const O: u8> = - crate::FieldWriter<'a, u32, PSELRXD_SPEC, u32, PSELRXD_A, 32, O>; -impl<'a, const O: u8> PSELRXD_W<'a, O> { - #[doc = "Disconnect"] - #[inline(always)] - pub fn disconnected(self) -> &'a mut W { - self.variant(PSELRXD_A::DISCONNECTED) - } -} -impl R { - #[doc = "Bits 0:31 - Pin number configuration for UART RXD signal"] - #[inline(always)] - pub fn pselrxd(&self) -> PSELRXD_R { - PSELRXD_R::new(self.bits) - } -} -impl W { - #[doc = "Bits 0:31 - Pin number configuration for UART RXD signal"] - #[inline(always)] - #[must_use] - pub fn pselrxd(&mut self) -> PSELRXD_W<0> { - PSELRXD_W::new(self) - } - #[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 = "Pin select for RXD\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 [pselrxd](index.html) module"] -pub struct PSELRXD_SPEC; -impl crate::RegisterSpec for PSELRXD_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [pselrxd::R](R) reader structure"] -impl crate::Readable for PSELRXD_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [pselrxd::W](W) writer structure"] -impl crate::Writable for PSELRXD_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets PSELRXD to value 0xffff_ffff"] -impl crate::Resettable for PSELRXD_SPEC { - const RESET_VALUE: Self::Ux = 0xffff_ffff; -} diff --git a/down-the-stack/dk_pac/src/uart0/pseltxd.rs b/down-the-stack/dk_pac/src/uart0/pseltxd.rs deleted file mode 100644 index f4262fc..0000000 --- a/down-the-stack/dk_pac/src/uart0/pseltxd.rs +++ /dev/null @@ -1,116 +0,0 @@ -#[doc = "Register `PSELTXD` 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 `PSELTXD` 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 `PSELTXD` reader - Pin number configuration for UART TXD signal"] -pub type PSELTXD_R = crate::FieldReader; -#[doc = "Pin number configuration for UART TXD signal\n\nValue on reset: 4294967295"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -#[repr(u32)] -pub enum PSELTXD_A { - #[doc = "4294967295: Disconnect"] - DISCONNECTED = 4294967295, -} -impl From for u32 { - #[inline(always)] - fn from(variant: PSELTXD_A) -> Self { - variant as _ - } -} -impl PSELTXD_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> Option { - match self.bits { - 4294967295 => Some(PSELTXD_A::DISCONNECTED), - _ => None, - } - } - #[doc = "Checks if the value of the field is `DISCONNECTED`"] - #[inline(always)] - pub fn is_disconnected(&self) -> bool { - *self == PSELTXD_A::DISCONNECTED - } -} -#[doc = "Field `PSELTXD` writer - Pin number configuration for UART TXD signal"] -pub type PSELTXD_W<'a, const O: u8> = - crate::FieldWriter<'a, u32, PSELTXD_SPEC, u32, PSELTXD_A, 32, O>; -impl<'a, const O: u8> PSELTXD_W<'a, O> { - #[doc = "Disconnect"] - #[inline(always)] - pub fn disconnected(self) -> &'a mut W { - self.variant(PSELTXD_A::DISCONNECTED) - } -} -impl R { - #[doc = "Bits 0:31 - Pin number configuration for UART TXD signal"] - #[inline(always)] - pub fn pseltxd(&self) -> PSELTXD_R { - PSELTXD_R::new(self.bits) - } -} -impl W { - #[doc = "Bits 0:31 - Pin number configuration for UART TXD signal"] - #[inline(always)] - #[must_use] - pub fn pseltxd(&mut self) -> PSELTXD_W<0> { - PSELTXD_W::new(self) - } - #[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 = "Pin select for TXD\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 [pseltxd](index.html) module"] -pub struct PSELTXD_SPEC; -impl crate::RegisterSpec for PSELTXD_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [pseltxd::R](R) reader structure"] -impl crate::Readable for PSELTXD_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [pseltxd::W](W) writer structure"] -impl crate::Writable for PSELTXD_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets PSELTXD to value 0xffff_ffff"] -impl crate::Resettable for PSELTXD_SPEC { - const RESET_VALUE: Self::Ux = 0xffff_ffff; -} diff --git a/down-the-stack/dk_pac/src/uart0/rxd.rs b/down-the-stack/dk_pac/src/uart0/rxd.rs deleted file mode 100644 index d638f3e..0000000 --- a/down-the-stack/dk_pac/src/uart0/rxd.rs +++ /dev/null @@ -1,37 +0,0 @@ -#[doc = "Register `RXD` 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 = "Field `RXD` reader - RX data received in previous transfers, double buffered"] -pub type RXD_R = crate::FieldReader; -impl R { - #[doc = "Bits 0:7 - RX data received in previous transfers, double buffered"] - #[inline(always)] - pub fn rxd(&self) -> RXD_R { - RXD_R::new((self.bits & 0xff) as u8) - } -} -#[doc = "RXD register\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 [rxd](index.html) module"] -pub struct RXD_SPEC; -impl crate::RegisterSpec for RXD_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [rxd::R](R) reader structure"] -impl crate::Readable for RXD_SPEC { - type Reader = R; -} -#[doc = "`reset()` method sets RXD to value 0"] -impl crate::Resettable for RXD_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/uart0/shorts.rs b/down-the-stack/dk_pac/src/uart0/shorts.rs deleted file mode 100644 index a2cd872..0000000 --- a/down-the-stack/dk_pac/src/uart0/shorts.rs +++ /dev/null @@ -1,187 +0,0 @@ -#[doc = "Register `SHORTS` 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 `SHORTS` 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 `CTS_STARTRX` reader - Shortcut between event CTS and task STARTRX"] -pub type CTS_STARTRX_R = crate::BitReader; -#[doc = "Shortcut between event CTS and task STARTRX\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum CTS_STARTRX_A { - #[doc = "0: Disable shortcut"] - DISABLED = 0, - #[doc = "1: Enable shortcut"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: CTS_STARTRX_A) -> Self { - variant as u8 != 0 - } -} -impl CTS_STARTRX_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> CTS_STARTRX_A { - match self.bits { - false => CTS_STARTRX_A::DISABLED, - true => CTS_STARTRX_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == CTS_STARTRX_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == CTS_STARTRX_A::ENABLED - } -} -#[doc = "Field `CTS_STARTRX` writer - Shortcut between event CTS and task STARTRX"] -pub type CTS_STARTRX_W<'a, const O: u8> = crate::BitWriter<'a, u32, SHORTS_SPEC, CTS_STARTRX_A, O>; -impl<'a, const O: u8> CTS_STARTRX_W<'a, O> { - #[doc = "Disable shortcut"] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(CTS_STARTRX_A::DISABLED) - } - #[doc = "Enable shortcut"] - #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(CTS_STARTRX_A::ENABLED) - } -} -#[doc = "Field `NCTS_STOPRX` reader - Shortcut between event NCTS and task STOPRX"] -pub type NCTS_STOPRX_R = crate::BitReader; -#[doc = "Shortcut between event NCTS and task STOPRX\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum NCTS_STOPRX_A { - #[doc = "0: Disable shortcut"] - DISABLED = 0, - #[doc = "1: Enable shortcut"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: NCTS_STOPRX_A) -> Self { - variant as u8 != 0 - } -} -impl NCTS_STOPRX_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> NCTS_STOPRX_A { - match self.bits { - false => NCTS_STOPRX_A::DISABLED, - true => NCTS_STOPRX_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == NCTS_STOPRX_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == NCTS_STOPRX_A::ENABLED - } -} -#[doc = "Field `NCTS_STOPRX` writer - Shortcut between event NCTS and task STOPRX"] -pub type NCTS_STOPRX_W<'a, const O: u8> = crate::BitWriter<'a, u32, SHORTS_SPEC, NCTS_STOPRX_A, O>; -impl<'a, const O: u8> NCTS_STOPRX_W<'a, O> { - #[doc = "Disable shortcut"] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(NCTS_STOPRX_A::DISABLED) - } - #[doc = "Enable shortcut"] - #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(NCTS_STOPRX_A::ENABLED) - } -} -impl R { - #[doc = "Bit 3 - Shortcut between event CTS and task STARTRX"] - #[inline(always)] - pub fn cts_startrx(&self) -> CTS_STARTRX_R { - CTS_STARTRX_R::new(((self.bits >> 3) & 1) != 0) - } - #[doc = "Bit 4 - Shortcut between event NCTS and task STOPRX"] - #[inline(always)] - pub fn ncts_stoprx(&self) -> NCTS_STOPRX_R { - NCTS_STOPRX_R::new(((self.bits >> 4) & 1) != 0) - } -} -impl W { - #[doc = "Bit 3 - Shortcut between event CTS and task STARTRX"] - #[inline(always)] - #[must_use] - pub fn cts_startrx(&mut self) -> CTS_STARTRX_W<3> { - CTS_STARTRX_W::new(self) - } - #[doc = "Bit 4 - Shortcut between event NCTS and task STOPRX"] - #[inline(always)] - #[must_use] - pub fn ncts_stoprx(&mut self) -> NCTS_STOPRX_W<4> { - NCTS_STOPRX_W::new(self) - } - #[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 = "Shortcuts between local events and tasks\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 [shorts](index.html) module"] -pub struct SHORTS_SPEC; -impl crate::RegisterSpec for SHORTS_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [shorts::R](R) reader structure"] -impl crate::Readable for SHORTS_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [shorts::W](W) writer structure"] -impl crate::Writable for SHORTS_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets SHORTS to value 0"] -impl crate::Resettable for SHORTS_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/uart0/tasks_startrx.rs b/down-the-stack/dk_pac/src/uart0/tasks_startrx.rs deleted file mode 100644 index ec611e2..0000000 --- a/down-the-stack/dk_pac/src/uart0/tasks_startrx.rs +++ /dev/null @@ -1,72 +0,0 @@ -#[doc = "Register `TASKS_STARTRX` 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 = "Start UART receiver\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum TASKS_STARTRX_AW { - #[doc = "1: Trigger task"] - TRIGGER = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: TASKS_STARTRX_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `TASKS_STARTRX` writer - Start UART receiver"] -pub type TASKS_STARTRX_W<'a, const O: u8> = - crate::BitWriter<'a, u32, TASKS_STARTRX_SPEC, TASKS_STARTRX_AW, O>; -impl<'a, const O: u8> TASKS_STARTRX_W<'a, O> { - #[doc = "Trigger task"] - #[inline(always)] - pub fn trigger(self) -> &'a mut W { - self.variant(TASKS_STARTRX_AW::TRIGGER) - } -} -impl W { - #[doc = "Bit 0 - Start UART receiver"] - #[inline(always)] - #[must_use] - pub fn tasks_startrx(&mut self) -> TASKS_STARTRX_W<0> { - TASKS_STARTRX_W::new(self) - } - #[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 = "Start UART receiver\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 [tasks_startrx](index.html) module"] -pub struct TASKS_STARTRX_SPEC; -impl crate::RegisterSpec for TASKS_STARTRX_SPEC { - type Ux = u32; -} -#[doc = "`write(|w| ..)` method takes [tasks_startrx::W](W) writer structure"] -impl crate::Writable for TASKS_STARTRX_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets TASKS_STARTRX to value 0"] -impl crate::Resettable for TASKS_STARTRX_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/uart0/tasks_starttx.rs b/down-the-stack/dk_pac/src/uart0/tasks_starttx.rs deleted file mode 100644 index de5aa37..0000000 --- a/down-the-stack/dk_pac/src/uart0/tasks_starttx.rs +++ /dev/null @@ -1,72 +0,0 @@ -#[doc = "Register `TASKS_STARTTX` 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 = "Start UART transmitter\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum TASKS_STARTTX_AW { - #[doc = "1: Trigger task"] - TRIGGER = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: TASKS_STARTTX_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `TASKS_STARTTX` writer - Start UART transmitter"] -pub type TASKS_STARTTX_W<'a, const O: u8> = - crate::BitWriter<'a, u32, TASKS_STARTTX_SPEC, TASKS_STARTTX_AW, O>; -impl<'a, const O: u8> TASKS_STARTTX_W<'a, O> { - #[doc = "Trigger task"] - #[inline(always)] - pub fn trigger(self) -> &'a mut W { - self.variant(TASKS_STARTTX_AW::TRIGGER) - } -} -impl W { - #[doc = "Bit 0 - Start UART transmitter"] - #[inline(always)] - #[must_use] - pub fn tasks_starttx(&mut self) -> TASKS_STARTTX_W<0> { - TASKS_STARTTX_W::new(self) - } - #[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 = "Start UART transmitter\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 [tasks_starttx](index.html) module"] -pub struct TASKS_STARTTX_SPEC; -impl crate::RegisterSpec for TASKS_STARTTX_SPEC { - type Ux = u32; -} -#[doc = "`write(|w| ..)` method takes [tasks_starttx::W](W) writer structure"] -impl crate::Writable for TASKS_STARTTX_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets TASKS_STARTTX to value 0"] -impl crate::Resettable for TASKS_STARTTX_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/uart0/tasks_stoprx.rs b/down-the-stack/dk_pac/src/uart0/tasks_stoprx.rs deleted file mode 100644 index 306c0e0..0000000 --- a/down-the-stack/dk_pac/src/uart0/tasks_stoprx.rs +++ /dev/null @@ -1,72 +0,0 @@ -#[doc = "Register `TASKS_STOPRX` 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 = "Stop UART receiver\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum TASKS_STOPRX_AW { - #[doc = "1: Trigger task"] - TRIGGER = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: TASKS_STOPRX_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `TASKS_STOPRX` writer - Stop UART receiver"] -pub type TASKS_STOPRX_W<'a, const O: u8> = - crate::BitWriter<'a, u32, TASKS_STOPRX_SPEC, TASKS_STOPRX_AW, O>; -impl<'a, const O: u8> TASKS_STOPRX_W<'a, O> { - #[doc = "Trigger task"] - #[inline(always)] - pub fn trigger(self) -> &'a mut W { - self.variant(TASKS_STOPRX_AW::TRIGGER) - } -} -impl W { - #[doc = "Bit 0 - Stop UART receiver"] - #[inline(always)] - #[must_use] - pub fn tasks_stoprx(&mut self) -> TASKS_STOPRX_W<0> { - TASKS_STOPRX_W::new(self) - } - #[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 = "Stop UART receiver\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 [tasks_stoprx](index.html) module"] -pub struct TASKS_STOPRX_SPEC; -impl crate::RegisterSpec for TASKS_STOPRX_SPEC { - type Ux = u32; -} -#[doc = "`write(|w| ..)` method takes [tasks_stoprx::W](W) writer structure"] -impl crate::Writable for TASKS_STOPRX_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets TASKS_STOPRX to value 0"] -impl crate::Resettable for TASKS_STOPRX_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/uart0/tasks_stoptx.rs b/down-the-stack/dk_pac/src/uart0/tasks_stoptx.rs deleted file mode 100644 index 5c99eef..0000000 --- a/down-the-stack/dk_pac/src/uart0/tasks_stoptx.rs +++ /dev/null @@ -1,72 +0,0 @@ -#[doc = "Register `TASKS_STOPTX` 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 = "Stop UART transmitter\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum TASKS_STOPTX_AW { - #[doc = "1: Trigger task"] - TRIGGER = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: TASKS_STOPTX_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `TASKS_STOPTX` writer - Stop UART transmitter"] -pub type TASKS_STOPTX_W<'a, const O: u8> = - crate::BitWriter<'a, u32, TASKS_STOPTX_SPEC, TASKS_STOPTX_AW, O>; -impl<'a, const O: u8> TASKS_STOPTX_W<'a, O> { - #[doc = "Trigger task"] - #[inline(always)] - pub fn trigger(self) -> &'a mut W { - self.variant(TASKS_STOPTX_AW::TRIGGER) - } -} -impl W { - #[doc = "Bit 0 - Stop UART transmitter"] - #[inline(always)] - #[must_use] - pub fn tasks_stoptx(&mut self) -> TASKS_STOPTX_W<0> { - TASKS_STOPTX_W::new(self) - } - #[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 = "Stop UART transmitter\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 [tasks_stoptx](index.html) module"] -pub struct TASKS_STOPTX_SPEC; -impl crate::RegisterSpec for TASKS_STOPTX_SPEC { - type Ux = u32; -} -#[doc = "`write(|w| ..)` method takes [tasks_stoptx::W](W) writer structure"] -impl crate::Writable for TASKS_STOPTX_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets TASKS_STOPTX to value 0"] -impl crate::Resettable for TASKS_STOPTX_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/uart0/tasks_suspend.rs b/down-the-stack/dk_pac/src/uart0/tasks_suspend.rs deleted file mode 100644 index c088472..0000000 --- a/down-the-stack/dk_pac/src/uart0/tasks_suspend.rs +++ /dev/null @@ -1,72 +0,0 @@ -#[doc = "Register `TASKS_SUSPEND` 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 = "Suspend UART\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum TASKS_SUSPEND_AW { - #[doc = "1: Trigger task"] - TRIGGER = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: TASKS_SUSPEND_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `TASKS_SUSPEND` writer - Suspend UART"] -pub type TASKS_SUSPEND_W<'a, const O: u8> = - crate::BitWriter<'a, u32, TASKS_SUSPEND_SPEC, TASKS_SUSPEND_AW, O>; -impl<'a, const O: u8> TASKS_SUSPEND_W<'a, O> { - #[doc = "Trigger task"] - #[inline(always)] - pub fn trigger(self) -> &'a mut W { - self.variant(TASKS_SUSPEND_AW::TRIGGER) - } -} -impl W { - #[doc = "Bit 0 - Suspend UART"] - #[inline(always)] - #[must_use] - pub fn tasks_suspend(&mut self) -> TASKS_SUSPEND_W<0> { - TASKS_SUSPEND_W::new(self) - } - #[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 = "Suspend UART\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 [tasks_suspend](index.html) module"] -pub struct TASKS_SUSPEND_SPEC; -impl crate::RegisterSpec for TASKS_SUSPEND_SPEC { - type Ux = u32; -} -#[doc = "`write(|w| ..)` method takes [tasks_suspend::W](W) writer structure"] -impl crate::Writable for TASKS_SUSPEND_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets TASKS_SUSPEND to value 0"] -impl crate::Resettable for TASKS_SUSPEND_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/uart0/txd.rs b/down-the-stack/dk_pac/src/uart0/txd.rs deleted file mode 100644 index 9a3dba8..0000000 --- a/down-the-stack/dk_pac/src/uart0/txd.rs +++ /dev/null @@ -1,52 +0,0 @@ -#[doc = "Register `TXD` 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 `TXD` writer - TX data to be transferred"] -pub type TXD_W<'a, const O: u8> = crate::FieldWriter<'a, u32, TXD_SPEC, u8, u8, 8, O>; -impl W { - #[doc = "Bits 0:7 - TX data to be transferred"] - #[inline(always)] - #[must_use] - pub fn txd(&mut self) -> TXD_W<0> { - TXD_W::new(self) - } - #[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 = "TXD register\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 [txd](index.html) module"] -pub struct TXD_SPEC; -impl crate::RegisterSpec for TXD_SPEC { - type Ux = u32; -} -#[doc = "`write(|w| ..)` method takes [txd::W](W) writer structure"] -impl crate::Writable for TXD_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets TXD to value 0"] -impl crate::Resettable for TXD_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/uarte0.rs b/down-the-stack/dk_pac/src/uarte0.rs deleted file mode 100644 index cd61441..0000000 --- a/down-the-stack/dk_pac/src/uarte0.rs +++ /dev/null @@ -1,185 +0,0 @@ -#[doc = r"Register block"] -#[repr(C)] -pub struct RegisterBlock { - #[doc = "0x00 - Start UART receiver"] - pub tasks_startrx: TASKS_STARTRX, - #[doc = "0x04 - Stop UART receiver"] - pub tasks_stoprx: TASKS_STOPRX, - #[doc = "0x08 - Start UART transmitter"] - pub tasks_starttx: TASKS_STARTTX, - #[doc = "0x0c - Stop UART transmitter"] - pub tasks_stoptx: TASKS_STOPTX, - _reserved4: [u8; 0x1c], - #[doc = "0x2c - Flush RX FIFO into RX buffer"] - pub tasks_flushrx: TASKS_FLUSHRX, - _reserved5: [u8; 0xd0], - #[doc = "0x100 - CTS is activated (set low). Clear To Send."] - pub events_cts: EVENTS_CTS, - #[doc = "0x104 - CTS is deactivated (set high). Not Clear To Send."] - pub events_ncts: EVENTS_NCTS, - #[doc = "0x108 - Data received in RXD (but potentially not yet transferred to Data RAM)"] - pub events_rxdrdy: EVENTS_RXDRDY, - _reserved8: [u8; 0x04], - #[doc = "0x110 - Receive buffer is filled up"] - pub events_endrx: EVENTS_ENDRX, - _reserved9: [u8; 0x08], - #[doc = "0x11c - Data sent from TXD"] - pub events_txdrdy: EVENTS_TXDRDY, - #[doc = "0x120 - Last TX byte transmitted"] - pub events_endtx: EVENTS_ENDTX, - #[doc = "0x124 - Error detected"] - pub events_error: EVENTS_ERROR, - _reserved12: [u8; 0x1c], - #[doc = "0x144 - Receiver timeout"] - pub events_rxto: EVENTS_RXTO, - _reserved13: [u8; 0x04], - #[doc = "0x14c - UART receiver has started"] - pub events_rxstarted: EVENTS_RXSTARTED, - #[doc = "0x150 - UART transmitter has started"] - pub events_txstarted: EVENTS_TXSTARTED, - _reserved15: [u8; 0x04], - #[doc = "0x158 - Transmitter stopped"] - pub events_txstopped: EVENTS_TXSTOPPED, - _reserved16: [u8; 0xa4], - #[doc = "0x200 - Shortcuts between local events and tasks"] - pub shorts: SHORTS, - _reserved17: [u8; 0xfc], - #[doc = "0x300 - Enable or disable interrupt"] - pub inten: INTEN, - #[doc = "0x304 - Enable interrupt"] - pub intenset: INTENSET, - #[doc = "0x308 - Disable interrupt"] - pub intenclr: INTENCLR, - _reserved20: [u8; 0x0174], - #[doc = "0x480 - Error source"] - pub errorsrc: ERRORSRC, - _reserved21: [u8; 0x7c], - #[doc = "0x500 - Enable UART"] - pub enable: ENABLE, - _reserved22: [u8; 0x04], - #[doc = "0x508..0x518 - Unspecified"] - pub psel: PSEL, - _reserved23: [u8; 0x0c], - #[doc = "0x524 - Baud rate. Accuracy depends on the HFCLK source selected."] - pub baudrate: BAUDRATE, - _reserved24: [u8; 0x0c], - #[doc = "0x534..0x540 - RXD EasyDMA channel"] - pub rxd: RXD, - _reserved25: [u8; 0x04], - #[doc = "0x544..0x550 - TXD EasyDMA channel"] - pub txd: TXD, - _reserved26: [u8; 0x1c], - #[doc = "0x56c - Configuration of parity and hardware flow control"] - pub config: CONFIG, -} -#[doc = "TASKS_STARTRX (w) register accessor: an alias for `Reg`"] -pub type TASKS_STARTRX = crate::Reg; -#[doc = "Start UART receiver"] -pub mod tasks_startrx; -#[doc = "TASKS_STOPRX (w) register accessor: an alias for `Reg`"] -pub type TASKS_STOPRX = crate::Reg; -#[doc = "Stop UART receiver"] -pub mod tasks_stoprx; -#[doc = "TASKS_STARTTX (w) register accessor: an alias for `Reg`"] -pub type TASKS_STARTTX = crate::Reg; -#[doc = "Start UART transmitter"] -pub mod tasks_starttx; -#[doc = "TASKS_STOPTX (w) register accessor: an alias for `Reg`"] -pub type TASKS_STOPTX = crate::Reg; -#[doc = "Stop UART transmitter"] -pub mod tasks_stoptx; -#[doc = "TASKS_FLUSHRX (w) register accessor: an alias for `Reg`"] -pub type TASKS_FLUSHRX = crate::Reg; -#[doc = "Flush RX FIFO into RX buffer"] -pub mod tasks_flushrx; -#[doc = "EVENTS_CTS (rw) register accessor: an alias for `Reg`"] -pub type EVENTS_CTS = crate::Reg; -#[doc = "CTS is activated (set low). Clear To Send."] -pub mod events_cts; -#[doc = "EVENTS_NCTS (rw) register accessor: an alias for `Reg`"] -pub type EVENTS_NCTS = crate::Reg; -#[doc = "CTS is deactivated (set high). Not Clear To Send."] -pub mod events_ncts; -#[doc = "EVENTS_RXDRDY (rw) register accessor: an alias for `Reg`"] -pub type EVENTS_RXDRDY = crate::Reg; -#[doc = "Data received in RXD (but potentially not yet transferred to Data RAM)"] -pub mod events_rxdrdy; -#[doc = "EVENTS_ENDRX (rw) register accessor: an alias for `Reg`"] -pub type EVENTS_ENDRX = crate::Reg; -#[doc = "Receive buffer is filled up"] -pub mod events_endrx; -#[doc = "EVENTS_TXDRDY (rw) register accessor: an alias for `Reg`"] -pub type EVENTS_TXDRDY = crate::Reg; -#[doc = "Data sent from TXD"] -pub mod events_txdrdy; -#[doc = "EVENTS_ENDTX (rw) register accessor: an alias for `Reg`"] -pub type EVENTS_ENDTX = crate::Reg; -#[doc = "Last TX byte transmitted"] -pub mod events_endtx; -#[doc = "EVENTS_ERROR (rw) register accessor: an alias for `Reg`"] -pub type EVENTS_ERROR = crate::Reg; -#[doc = "Error detected"] -pub mod events_error; -#[doc = "EVENTS_RXTO (rw) register accessor: an alias for `Reg`"] -pub type EVENTS_RXTO = crate::Reg; -#[doc = "Receiver timeout"] -pub mod events_rxto; -#[doc = "EVENTS_RXSTARTED (rw) register accessor: an alias for `Reg`"] -pub type EVENTS_RXSTARTED = crate::Reg; -#[doc = "UART receiver has started"] -pub mod events_rxstarted; -#[doc = "EVENTS_TXSTARTED (rw) register accessor: an alias for `Reg`"] -pub type EVENTS_TXSTARTED = crate::Reg; -#[doc = "UART transmitter has started"] -pub mod events_txstarted; -#[doc = "EVENTS_TXSTOPPED (rw) register accessor: an alias for `Reg`"] -pub type EVENTS_TXSTOPPED = crate::Reg; -#[doc = "Transmitter stopped"] -pub mod events_txstopped; -#[doc = "SHORTS (rw) register accessor: an alias for `Reg`"] -pub type SHORTS = crate::Reg; -#[doc = "Shortcuts between local events and tasks"] -pub mod shorts; -#[doc = "INTEN (rw) register accessor: an alias for `Reg`"] -pub type INTEN = crate::Reg; -#[doc = "Enable or disable interrupt"] -pub mod inten; -#[doc = "INTENSET (rw) register accessor: an alias for `Reg`"] -pub type INTENSET = crate::Reg; -#[doc = "Enable interrupt"] -pub mod intenset; -#[doc = "INTENCLR (rw) register accessor: an alias for `Reg`"] -pub type INTENCLR = crate::Reg; -#[doc = "Disable interrupt"] -pub mod intenclr; -#[doc = "ERRORSRC (rw) register accessor: an alias for `Reg`"] -pub type ERRORSRC = crate::Reg; -#[doc = "Error source"] -pub mod errorsrc; -#[doc = "ENABLE (rw) register accessor: an alias for `Reg`"] -pub type ENABLE = crate::Reg; -#[doc = "Enable UART"] -pub mod enable; -#[doc = "Unspecified"] -pub use self::psel::PSEL; -#[doc = r"Cluster"] -#[doc = "Unspecified"] -pub mod psel; -#[doc = "BAUDRATE (rw) register accessor: an alias for `Reg`"] -pub type BAUDRATE = crate::Reg; -#[doc = "Baud rate. Accuracy depends on the HFCLK source selected."] -pub mod baudrate; -#[doc = "RXD EasyDMA channel"] -pub use self::rxd::RXD; -#[doc = r"Cluster"] -#[doc = "RXD EasyDMA channel"] -pub mod rxd; -#[doc = "TXD EasyDMA channel"] -pub use self::txd::TXD; -#[doc = r"Cluster"] -#[doc = "TXD EasyDMA channel"] -pub mod txd; -#[doc = "CONFIG (rw) register accessor: an alias for `Reg`"] -pub type CONFIG = crate::Reg; -#[doc = "Configuration of parity and hardware flow control"] -pub mod config; diff --git a/down-the-stack/dk_pac/src/uarte0/baudrate.rs b/down-the-stack/dk_pac/src/uarte0/baudrate.rs deleted file mode 100644 index 8df3583..0000000 --- a/down-the-stack/dk_pac/src/uarte0/baudrate.rs +++ /dev/null @@ -1,337 +0,0 @@ -#[doc = "Register `BAUDRATE` 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 `BAUDRATE` 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 `BAUDRATE` reader - Baud rate"] -pub type BAUDRATE_R = crate::FieldReader; -#[doc = "Baud rate\n\nValue on reset: 67108864"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -#[repr(u32)] -pub enum BAUDRATE_A { - #[doc = "323584: 1200 baud (actual rate: 1205)"] - BAUD1200 = 323584, - #[doc = "643072: 2400 baud (actual rate: 2396)"] - BAUD2400 = 643072, - #[doc = "1290240: 4800 baud (actual rate: 4808)"] - BAUD4800 = 1290240, - #[doc = "2576384: 9600 baud (actual rate: 9598)"] - BAUD9600 = 2576384, - #[doc = "3862528: 14400 baud (actual rate: 14401)"] - BAUD14400 = 3862528, - #[doc = "5152768: 19200 baud (actual rate: 19208)"] - BAUD19200 = 5152768, - #[doc = "7716864: 28800 baud (actual rate: 28777)"] - BAUD28800 = 7716864, - #[doc = "8388608: 31250 baud"] - BAUD31250 = 8388608, - #[doc = "10289152: 38400 baud (actual rate: 38369)"] - BAUD38400 = 10289152, - #[doc = "15007744: 56000 baud (actual rate: 55944)"] - BAUD56000 = 15007744, - #[doc = "15400960: 57600 baud (actual rate: 57554)"] - BAUD57600 = 15400960, - #[doc = "20615168: 76800 baud (actual rate: 76923)"] - BAUD76800 = 20615168, - #[doc = "30801920: 115200 baud (actual rate: 115108)"] - BAUD115200 = 30801920, - #[doc = "61865984: 230400 baud (actual rate: 231884)"] - BAUD230400 = 61865984, - #[doc = "67108864: 250000 baud"] - BAUD250000 = 67108864, - #[doc = "121634816: 460800 baud (actual rate: 457143)"] - BAUD460800 = 121634816, - #[doc = "251658240: 921600 baud (actual rate: 941176)"] - BAUD921600 = 251658240, - #[doc = "268435456: 1Mega baud"] - BAUD1M = 268435456, -} -impl From for u32 { - #[inline(always)] - fn from(variant: BAUDRATE_A) -> Self { - variant as _ - } -} -impl BAUDRATE_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> Option { - match self.bits { - 323584 => Some(BAUDRATE_A::BAUD1200), - 643072 => Some(BAUDRATE_A::BAUD2400), - 1290240 => Some(BAUDRATE_A::BAUD4800), - 2576384 => Some(BAUDRATE_A::BAUD9600), - 3862528 => Some(BAUDRATE_A::BAUD14400), - 5152768 => Some(BAUDRATE_A::BAUD19200), - 7716864 => Some(BAUDRATE_A::BAUD28800), - 8388608 => Some(BAUDRATE_A::BAUD31250), - 10289152 => Some(BAUDRATE_A::BAUD38400), - 15007744 => Some(BAUDRATE_A::BAUD56000), - 15400960 => Some(BAUDRATE_A::BAUD57600), - 20615168 => Some(BAUDRATE_A::BAUD76800), - 30801920 => Some(BAUDRATE_A::BAUD115200), - 61865984 => Some(BAUDRATE_A::BAUD230400), - 67108864 => Some(BAUDRATE_A::BAUD250000), - 121634816 => Some(BAUDRATE_A::BAUD460800), - 251658240 => Some(BAUDRATE_A::BAUD921600), - 268435456 => Some(BAUDRATE_A::BAUD1M), - _ => None, - } - } - #[doc = "Checks if the value of the field is `BAUD1200`"] - #[inline(always)] - pub fn is_baud1200(&self) -> bool { - *self == BAUDRATE_A::BAUD1200 - } - #[doc = "Checks if the value of the field is `BAUD2400`"] - #[inline(always)] - pub fn is_baud2400(&self) -> bool { - *self == BAUDRATE_A::BAUD2400 - } - #[doc = "Checks if the value of the field is `BAUD4800`"] - #[inline(always)] - pub fn is_baud4800(&self) -> bool { - *self == BAUDRATE_A::BAUD4800 - } - #[doc = "Checks if the value of the field is `BAUD9600`"] - #[inline(always)] - pub fn is_baud9600(&self) -> bool { - *self == BAUDRATE_A::BAUD9600 - } - #[doc = "Checks if the value of the field is `BAUD14400`"] - #[inline(always)] - pub fn is_baud14400(&self) -> bool { - *self == BAUDRATE_A::BAUD14400 - } - #[doc = "Checks if the value of the field is `BAUD19200`"] - #[inline(always)] - pub fn is_baud19200(&self) -> bool { - *self == BAUDRATE_A::BAUD19200 - } - #[doc = "Checks if the value of the field is `BAUD28800`"] - #[inline(always)] - pub fn is_baud28800(&self) -> bool { - *self == BAUDRATE_A::BAUD28800 - } - #[doc = "Checks if the value of the field is `BAUD31250`"] - #[inline(always)] - pub fn is_baud31250(&self) -> bool { - *self == BAUDRATE_A::BAUD31250 - } - #[doc = "Checks if the value of the field is `BAUD38400`"] - #[inline(always)] - pub fn is_baud38400(&self) -> bool { - *self == BAUDRATE_A::BAUD38400 - } - #[doc = "Checks if the value of the field is `BAUD56000`"] - #[inline(always)] - pub fn is_baud56000(&self) -> bool { - *self == BAUDRATE_A::BAUD56000 - } - #[doc = "Checks if the value of the field is `BAUD57600`"] - #[inline(always)] - pub fn is_baud57600(&self) -> bool { - *self == BAUDRATE_A::BAUD57600 - } - #[doc = "Checks if the value of the field is `BAUD76800`"] - #[inline(always)] - pub fn is_baud76800(&self) -> bool { - *self == BAUDRATE_A::BAUD76800 - } - #[doc = "Checks if the value of the field is `BAUD115200`"] - #[inline(always)] - pub fn is_baud115200(&self) -> bool { - *self == BAUDRATE_A::BAUD115200 - } - #[doc = "Checks if the value of the field is `BAUD230400`"] - #[inline(always)] - pub fn is_baud230400(&self) -> bool { - *self == BAUDRATE_A::BAUD230400 - } - #[doc = "Checks if the value of the field is `BAUD250000`"] - #[inline(always)] - pub fn is_baud250000(&self) -> bool { - *self == BAUDRATE_A::BAUD250000 - } - #[doc = "Checks if the value of the field is `BAUD460800`"] - #[inline(always)] - pub fn is_baud460800(&self) -> bool { - *self == BAUDRATE_A::BAUD460800 - } - #[doc = "Checks if the value of the field is `BAUD921600`"] - #[inline(always)] - pub fn is_baud921600(&self) -> bool { - *self == BAUDRATE_A::BAUD921600 - } - #[doc = "Checks if the value of the field is `BAUD1M`"] - #[inline(always)] - pub fn is_baud1m(&self) -> bool { - *self == BAUDRATE_A::BAUD1M - } -} -#[doc = "Field `BAUDRATE` writer - Baud rate"] -pub type BAUDRATE_W<'a, const O: u8> = - crate::FieldWriter<'a, u32, BAUDRATE_SPEC, u32, BAUDRATE_A, 32, O>; -impl<'a, const O: u8> BAUDRATE_W<'a, O> { - #[doc = "1200 baud (actual rate: 1205)"] - #[inline(always)] - pub fn baud1200(self) -> &'a mut W { - self.variant(BAUDRATE_A::BAUD1200) - } - #[doc = "2400 baud (actual rate: 2396)"] - #[inline(always)] - pub fn baud2400(self) -> &'a mut W { - self.variant(BAUDRATE_A::BAUD2400) - } - #[doc = "4800 baud (actual rate: 4808)"] - #[inline(always)] - pub fn baud4800(self) -> &'a mut W { - self.variant(BAUDRATE_A::BAUD4800) - } - #[doc = "9600 baud (actual rate: 9598)"] - #[inline(always)] - pub fn baud9600(self) -> &'a mut W { - self.variant(BAUDRATE_A::BAUD9600) - } - #[doc = "14400 baud (actual rate: 14401)"] - #[inline(always)] - pub fn baud14400(self) -> &'a mut W { - self.variant(BAUDRATE_A::BAUD14400) - } - #[doc = "19200 baud (actual rate: 19208)"] - #[inline(always)] - pub fn baud19200(self) -> &'a mut W { - self.variant(BAUDRATE_A::BAUD19200) - } - #[doc = "28800 baud (actual rate: 28777)"] - #[inline(always)] - pub fn baud28800(self) -> &'a mut W { - self.variant(BAUDRATE_A::BAUD28800) - } - #[doc = "31250 baud"] - #[inline(always)] - pub fn baud31250(self) -> &'a mut W { - self.variant(BAUDRATE_A::BAUD31250) - } - #[doc = "38400 baud (actual rate: 38369)"] - #[inline(always)] - pub fn baud38400(self) -> &'a mut W { - self.variant(BAUDRATE_A::BAUD38400) - } - #[doc = "56000 baud (actual rate: 55944)"] - #[inline(always)] - pub fn baud56000(self) -> &'a mut W { - self.variant(BAUDRATE_A::BAUD56000) - } - #[doc = "57600 baud (actual rate: 57554)"] - #[inline(always)] - pub fn baud57600(self) -> &'a mut W { - self.variant(BAUDRATE_A::BAUD57600) - } - #[doc = "76800 baud (actual rate: 76923)"] - #[inline(always)] - pub fn baud76800(self) -> &'a mut W { - self.variant(BAUDRATE_A::BAUD76800) - } - #[doc = "115200 baud (actual rate: 115108)"] - #[inline(always)] - pub fn baud115200(self) -> &'a mut W { - self.variant(BAUDRATE_A::BAUD115200) - } - #[doc = "230400 baud (actual rate: 231884)"] - #[inline(always)] - pub fn baud230400(self) -> &'a mut W { - self.variant(BAUDRATE_A::BAUD230400) - } - #[doc = "250000 baud"] - #[inline(always)] - pub fn baud250000(self) -> &'a mut W { - self.variant(BAUDRATE_A::BAUD250000) - } - #[doc = "460800 baud (actual rate: 457143)"] - #[inline(always)] - pub fn baud460800(self) -> &'a mut W { - self.variant(BAUDRATE_A::BAUD460800) - } - #[doc = "921600 baud (actual rate: 941176)"] - #[inline(always)] - pub fn baud921600(self) -> &'a mut W { - self.variant(BAUDRATE_A::BAUD921600) - } - #[doc = "1Mega baud"] - #[inline(always)] - pub fn baud1m(self) -> &'a mut W { - self.variant(BAUDRATE_A::BAUD1M) - } -} -impl R { - #[doc = "Bits 0:31 - Baud rate"] - #[inline(always)] - pub fn baudrate(&self) -> BAUDRATE_R { - BAUDRATE_R::new(self.bits) - } -} -impl W { - #[doc = "Bits 0:31 - Baud rate"] - #[inline(always)] - #[must_use] - pub fn baudrate(&mut self) -> BAUDRATE_W<0> { - BAUDRATE_W::new(self) - } - #[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 = "Baud rate. Accuracy depends on the HFCLK source selected.\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 [baudrate](index.html) module"] -pub struct BAUDRATE_SPEC; -impl crate::RegisterSpec for BAUDRATE_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [baudrate::R](R) reader structure"] -impl crate::Readable for BAUDRATE_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [baudrate::W](W) writer structure"] -impl crate::Writable for BAUDRATE_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets BAUDRATE to value 0x0400_0000"] -impl crate::Resettable for BAUDRATE_SPEC { - const RESET_VALUE: Self::Ux = 0x0400_0000; -} diff --git a/down-the-stack/dk_pac/src/uarte0/config.rs b/down-the-stack/dk_pac/src/uarte0/config.rs deleted file mode 100644 index 87a5585..0000000 --- a/down-the-stack/dk_pac/src/uarte0/config.rs +++ /dev/null @@ -1,189 +0,0 @@ -#[doc = "Register `CONFIG` 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 `CONFIG` 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 `HWFC` reader - Hardware flow control"] -pub type HWFC_R = crate::BitReader; -#[doc = "Hardware flow control\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum HWFC_A { - #[doc = "0: Disabled"] - DISABLED = 0, - #[doc = "1: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: HWFC_A) -> Self { - variant as u8 != 0 - } -} -impl HWFC_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> HWFC_A { - match self.bits { - false => HWFC_A::DISABLED, - true => HWFC_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == HWFC_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == HWFC_A::ENABLED - } -} -#[doc = "Field `HWFC` writer - Hardware flow control"] -pub type HWFC_W<'a, const O: u8> = crate::BitWriter<'a, u32, CONFIG_SPEC, HWFC_A, O>; -impl<'a, const O: u8> HWFC_W<'a, O> { - #[doc = "Disabled"] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(HWFC_A::DISABLED) - } - #[doc = "Enabled"] - #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(HWFC_A::ENABLED) - } -} -#[doc = "Field `PARITY` reader - Parity"] -pub type PARITY_R = crate::FieldReader; -#[doc = "Parity\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -#[repr(u8)] -pub enum PARITY_A { - #[doc = "0: Exclude parity bit"] - EXCLUDED = 0, - #[doc = "7: Include parity bit"] - INCLUDED = 7, -} -impl From for u8 { - #[inline(always)] - fn from(variant: PARITY_A) -> Self { - variant as _ - } -} -impl PARITY_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> Option { - match self.bits { - 0 => Some(PARITY_A::EXCLUDED), - 7 => Some(PARITY_A::INCLUDED), - _ => None, - } - } - #[doc = "Checks if the value of the field is `EXCLUDED`"] - #[inline(always)] - pub fn is_excluded(&self) -> bool { - *self == PARITY_A::EXCLUDED - } - #[doc = "Checks if the value of the field is `INCLUDED`"] - #[inline(always)] - pub fn is_included(&self) -> bool { - *self == PARITY_A::INCLUDED - } -} -#[doc = "Field `PARITY` writer - Parity"] -pub type PARITY_W<'a, const O: u8> = crate::FieldWriter<'a, u32, CONFIG_SPEC, u8, PARITY_A, 3, O>; -impl<'a, const O: u8> PARITY_W<'a, O> { - #[doc = "Exclude parity bit"] - #[inline(always)] - pub fn excluded(self) -> &'a mut W { - self.variant(PARITY_A::EXCLUDED) - } - #[doc = "Include parity bit"] - #[inline(always)] - pub fn included(self) -> &'a mut W { - self.variant(PARITY_A::INCLUDED) - } -} -impl R { - #[doc = "Bit 0 - Hardware flow control"] - #[inline(always)] - pub fn hwfc(&self) -> HWFC_R { - HWFC_R::new((self.bits & 1) != 0) - } - #[doc = "Bits 1:3 - Parity"] - #[inline(always)] - pub fn parity(&self) -> PARITY_R { - PARITY_R::new(((self.bits >> 1) & 7) as u8) - } -} -impl W { - #[doc = "Bit 0 - Hardware flow control"] - #[inline(always)] - #[must_use] - pub fn hwfc(&mut self) -> HWFC_W<0> { - HWFC_W::new(self) - } - #[doc = "Bits 1:3 - Parity"] - #[inline(always)] - #[must_use] - pub fn parity(&mut self) -> PARITY_W<1> { - PARITY_W::new(self) - } - #[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 = "Configuration of parity and hardware flow control\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 [config](index.html) module"] -pub struct CONFIG_SPEC; -impl crate::RegisterSpec for CONFIG_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [config::R](R) reader structure"] -impl crate::Readable for CONFIG_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [config::W](W) writer structure"] -impl crate::Writable for 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 CONFIG to value 0"] -impl crate::Resettable for CONFIG_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/uarte0/enable.rs b/down-the-stack/dk_pac/src/uarte0/enable.rs deleted file mode 100644 index 4785b88..0000000 --- a/down-the-stack/dk_pac/src/uarte0/enable.rs +++ /dev/null @@ -1,128 +0,0 @@ -#[doc = "Register `ENABLE` 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 `ENABLE` 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 `ENABLE` reader - Enable or disable UARTE"] -pub type ENABLE_R = crate::FieldReader; -#[doc = "Enable or disable UARTE\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -#[repr(u8)] -pub enum ENABLE_A { - #[doc = "0: Disable UARTE"] - DISABLED = 0, - #[doc = "8: Enable UARTE"] - ENABLED = 8, -} -impl From for u8 { - #[inline(always)] - fn from(variant: ENABLE_A) -> Self { - variant as _ - } -} -impl ENABLE_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> Option { - match self.bits { - 0 => Some(ENABLE_A::DISABLED), - 8 => Some(ENABLE_A::ENABLED), - _ => None, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == ENABLE_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == ENABLE_A::ENABLED - } -} -#[doc = "Field `ENABLE` writer - Enable or disable UARTE"] -pub type ENABLE_W<'a, const O: u8> = crate::FieldWriter<'a, u32, ENABLE_SPEC, u8, ENABLE_A, 4, O>; -impl<'a, const O: u8> ENABLE_W<'a, O> { - #[doc = "Disable UARTE"] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(ENABLE_A::DISABLED) - } - #[doc = "Enable UARTE"] - #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(ENABLE_A::ENABLED) - } -} -impl R { - #[doc = "Bits 0:3 - Enable or disable UARTE"] - #[inline(always)] - pub fn enable(&self) -> ENABLE_R { - ENABLE_R::new((self.bits & 0x0f) as u8) - } -} -impl W { - #[doc = "Bits 0:3 - Enable or disable UARTE"] - #[inline(always)] - #[must_use] - pub fn enable(&mut self) -> ENABLE_W<0> { - 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 - } -} -#[doc = "Enable UART\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 [enable](index.html) module"] -pub struct ENABLE_SPEC; -impl crate::RegisterSpec for ENABLE_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [enable::R](R) reader structure"] -impl crate::Readable for ENABLE_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [enable::W](W) writer structure"] -impl crate::Writable for ENABLE_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets ENABLE to value 0"] -impl crate::Resettable for ENABLE_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/uarte0/errorsrc.rs b/down-the-stack/dk_pac/src/uarte0/errorsrc.rs deleted file mode 100644 index 8a78d5a..0000000 --- a/down-the-stack/dk_pac/src/uarte0/errorsrc.rs +++ /dev/null @@ -1,309 +0,0 @@ -#[doc = "Register `ERRORSRC` 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 `ERRORSRC` 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 `OVERRUN` reader - Overrun error"] -pub type OVERRUN_R = crate::BitReader; -#[doc = "Overrun error\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum OVERRUN_A { - #[doc = "0: Read: error not present"] - NOT_PRESENT = 0, - #[doc = "1: Read: error present"] - PRESENT = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: OVERRUN_A) -> Self { - variant as u8 != 0 - } -} -impl OVERRUN_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> OVERRUN_A { - match self.bits { - false => OVERRUN_A::NOT_PRESENT, - true => OVERRUN_A::PRESENT, - } - } - #[doc = "Checks if the value of the field is `NOT_PRESENT`"] - #[inline(always)] - pub fn is_not_present(&self) -> bool { - *self == OVERRUN_A::NOT_PRESENT - } - #[doc = "Checks if the value of the field is `PRESENT`"] - #[inline(always)] - pub fn is_present(&self) -> bool { - *self == OVERRUN_A::PRESENT - } -} -#[doc = "Field `OVERRUN` writer - Overrun error"] -pub type OVERRUN_W<'a, const O: u8> = crate::BitWriter1C<'a, u32, ERRORSRC_SPEC, OVERRUN_A, O>; -impl<'a, const O: u8> OVERRUN_W<'a, O> { - #[doc = "Read: error not present"] - #[inline(always)] - pub fn not_present(self) -> &'a mut W { - self.variant(OVERRUN_A::NOT_PRESENT) - } - #[doc = "Read: error present"] - #[inline(always)] - pub fn present(self) -> &'a mut W { - self.variant(OVERRUN_A::PRESENT) - } -} -#[doc = "Field `PARITY` reader - Parity error"] -pub type PARITY_R = crate::BitReader; -#[doc = "Parity error\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PARITY_A { - #[doc = "0: Read: error not present"] - NOT_PRESENT = 0, - #[doc = "1: Read: error present"] - PRESENT = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PARITY_A) -> Self { - variant as u8 != 0 - } -} -impl PARITY_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> PARITY_A { - match self.bits { - false => PARITY_A::NOT_PRESENT, - true => PARITY_A::PRESENT, - } - } - #[doc = "Checks if the value of the field is `NOT_PRESENT`"] - #[inline(always)] - pub fn is_not_present(&self) -> bool { - *self == PARITY_A::NOT_PRESENT - } - #[doc = "Checks if the value of the field is `PRESENT`"] - #[inline(always)] - pub fn is_present(&self) -> bool { - *self == PARITY_A::PRESENT - } -} -#[doc = "Field `PARITY` writer - Parity error"] -pub type PARITY_W<'a, const O: u8> = crate::BitWriter1C<'a, u32, ERRORSRC_SPEC, PARITY_A, O>; -impl<'a, const O: u8> PARITY_W<'a, O> { - #[doc = "Read: error not present"] - #[inline(always)] - pub fn not_present(self) -> &'a mut W { - self.variant(PARITY_A::NOT_PRESENT) - } - #[doc = "Read: error present"] - #[inline(always)] - pub fn present(self) -> &'a mut W { - self.variant(PARITY_A::PRESENT) - } -} -#[doc = "Field `FRAMING` reader - Framing error occurred"] -pub type FRAMING_R = crate::BitReader; -#[doc = "Framing error occurred\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum FRAMING_A { - #[doc = "0: Read: error not present"] - NOT_PRESENT = 0, - #[doc = "1: Read: error present"] - PRESENT = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: FRAMING_A) -> Self { - variant as u8 != 0 - } -} -impl FRAMING_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> FRAMING_A { - match self.bits { - false => FRAMING_A::NOT_PRESENT, - true => FRAMING_A::PRESENT, - } - } - #[doc = "Checks if the value of the field is `NOT_PRESENT`"] - #[inline(always)] - pub fn is_not_present(&self) -> bool { - *self == FRAMING_A::NOT_PRESENT - } - #[doc = "Checks if the value of the field is `PRESENT`"] - #[inline(always)] - pub fn is_present(&self) -> bool { - *self == FRAMING_A::PRESENT - } -} -#[doc = "Field `FRAMING` writer - Framing error occurred"] -pub type FRAMING_W<'a, const O: u8> = crate::BitWriter1C<'a, u32, ERRORSRC_SPEC, FRAMING_A, O>; -impl<'a, const O: u8> FRAMING_W<'a, O> { - #[doc = "Read: error not present"] - #[inline(always)] - pub fn not_present(self) -> &'a mut W { - self.variant(FRAMING_A::NOT_PRESENT) - } - #[doc = "Read: error present"] - #[inline(always)] - pub fn present(self) -> &'a mut W { - self.variant(FRAMING_A::PRESENT) - } -} -#[doc = "Field `BREAK` reader - Break condition"] -pub type BREAK_R = crate::BitReader; -#[doc = "Break condition\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum BREAK_A { - #[doc = "0: Read: error not present"] - NOT_PRESENT = 0, - #[doc = "1: Read: error present"] - PRESENT = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: BREAK_A) -> Self { - variant as u8 != 0 - } -} -impl BREAK_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> BREAK_A { - match self.bits { - false => BREAK_A::NOT_PRESENT, - true => BREAK_A::PRESENT, - } - } - #[doc = "Checks if the value of the field is `NOT_PRESENT`"] - #[inline(always)] - pub fn is_not_present(&self) -> bool { - *self == BREAK_A::NOT_PRESENT - } - #[doc = "Checks if the value of the field is `PRESENT`"] - #[inline(always)] - pub fn is_present(&self) -> bool { - *self == BREAK_A::PRESENT - } -} -#[doc = "Field `BREAK` writer - Break condition"] -pub type BREAK_W<'a, const O: u8> = crate::BitWriter1C<'a, u32, ERRORSRC_SPEC, BREAK_A, O>; -impl<'a, const O: u8> BREAK_W<'a, O> { - #[doc = "Read: error not present"] - #[inline(always)] - pub fn not_present(self) -> &'a mut W { - self.variant(BREAK_A::NOT_PRESENT) - } - #[doc = "Read: error present"] - #[inline(always)] - pub fn present(self) -> &'a mut W { - self.variant(BREAK_A::PRESENT) - } -} -impl R { - #[doc = "Bit 0 - Overrun error"] - #[inline(always)] - pub fn overrun(&self) -> OVERRUN_R { - OVERRUN_R::new((self.bits & 1) != 0) - } - #[doc = "Bit 1 - Parity error"] - #[inline(always)] - pub fn parity(&self) -> PARITY_R { - PARITY_R::new(((self.bits >> 1) & 1) != 0) - } - #[doc = "Bit 2 - Framing error occurred"] - #[inline(always)] - pub fn framing(&self) -> FRAMING_R { - FRAMING_R::new(((self.bits >> 2) & 1) != 0) - } - #[doc = "Bit 3 - Break condition"] - #[inline(always)] - pub fn break_(&self) -> BREAK_R { - BREAK_R::new(((self.bits >> 3) & 1) != 0) - } -} -impl W { - #[doc = "Bit 0 - Overrun error"] - #[inline(always)] - #[must_use] - pub fn overrun(&mut self) -> OVERRUN_W<0> { - OVERRUN_W::new(self) - } - #[doc = "Bit 1 - Parity error"] - #[inline(always)] - #[must_use] - pub fn parity(&mut self) -> PARITY_W<1> { - PARITY_W::new(self) - } - #[doc = "Bit 2 - Framing error occurred"] - #[inline(always)] - #[must_use] - pub fn framing(&mut self) -> FRAMING_W<2> { - FRAMING_W::new(self) - } - #[doc = "Bit 3 - Break condition"] - #[inline(always)] - #[must_use] - pub fn break_(&mut self) -> BREAK_W<3> { - BREAK_W::new(self) - } - #[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 = "Error source\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 [errorsrc](index.html) module"] -pub struct ERRORSRC_SPEC; -impl crate::RegisterSpec for ERRORSRC_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [errorsrc::R](R) reader structure"] -impl crate::Readable for ERRORSRC_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [errorsrc::W](W) writer structure"] -impl crate::Writable for ERRORSRC_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0x0f; -} -#[doc = "`reset()` method sets ERRORSRC to value 0"] -impl crate::Resettable for ERRORSRC_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/uarte0/events_cts.rs b/down-the-stack/dk_pac/src/uarte0/events_cts.rs deleted file mode 100644 index b3589f3..0000000 --- a/down-the-stack/dk_pac/src/uarte0/events_cts.rs +++ /dev/null @@ -1,127 +0,0 @@ -#[doc = "Register `EVENTS_CTS` 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 `EVENTS_CTS` 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 `EVENTS_CTS` reader - CTS is activated (set low). Clear To Send."] -pub type EVENTS_CTS_R = crate::BitReader; -#[doc = "CTS is activated (set low). Clear To Send.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum EVENTS_CTS_A { - #[doc = "0: Event not generated"] - NOT_GENERATED = 0, - #[doc = "1: Event generated"] - GENERATED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: EVENTS_CTS_A) -> Self { - variant as u8 != 0 - } -} -impl EVENTS_CTS_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> EVENTS_CTS_A { - match self.bits { - false => EVENTS_CTS_A::NOT_GENERATED, - true => EVENTS_CTS_A::GENERATED, - } - } - #[doc = "Checks if the value of the field is `NOT_GENERATED`"] - #[inline(always)] - pub fn is_not_generated(&self) -> bool { - *self == EVENTS_CTS_A::NOT_GENERATED - } - #[doc = "Checks if the value of the field is `GENERATED`"] - #[inline(always)] - pub fn is_generated(&self) -> bool { - *self == EVENTS_CTS_A::GENERATED - } -} -#[doc = "Field `EVENTS_CTS` writer - CTS is activated (set low). Clear To Send."] -pub type EVENTS_CTS_W<'a, const O: u8> = - crate::BitWriter<'a, u32, EVENTS_CTS_SPEC, EVENTS_CTS_A, O>; -impl<'a, const O: u8> EVENTS_CTS_W<'a, O> { - #[doc = "Event not generated"] - #[inline(always)] - pub fn not_generated(self) -> &'a mut W { - self.variant(EVENTS_CTS_A::NOT_GENERATED) - } - #[doc = "Event generated"] - #[inline(always)] - pub fn generated(self) -> &'a mut W { - self.variant(EVENTS_CTS_A::GENERATED) - } -} -impl R { - #[doc = "Bit 0 - CTS is activated (set low). Clear To Send."] - #[inline(always)] - pub fn events_cts(&self) -> EVENTS_CTS_R { - EVENTS_CTS_R::new((self.bits & 1) != 0) - } -} -impl W { - #[doc = "Bit 0 - CTS is activated (set low). Clear To Send."] - #[inline(always)] - #[must_use] - pub fn events_cts(&mut self) -> EVENTS_CTS_W<0> { - EVENTS_CTS_W::new(self) - } - #[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 = "CTS is activated (set low). Clear To Send.\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 [events_cts](index.html) module"] -pub struct EVENTS_CTS_SPEC; -impl crate::RegisterSpec for EVENTS_CTS_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [events_cts::R](R) reader structure"] -impl crate::Readable for EVENTS_CTS_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [events_cts::W](W) writer structure"] -impl crate::Writable for EVENTS_CTS_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets EVENTS_CTS to value 0"] -impl crate::Resettable for EVENTS_CTS_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/uarte0/events_endrx.rs b/down-the-stack/dk_pac/src/uarte0/events_endrx.rs deleted file mode 100644 index 96e1adb..0000000 --- a/down-the-stack/dk_pac/src/uarte0/events_endrx.rs +++ /dev/null @@ -1,127 +0,0 @@ -#[doc = "Register `EVENTS_ENDRX` 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 `EVENTS_ENDRX` 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 `EVENTS_ENDRX` reader - Receive buffer is filled up"] -pub type EVENTS_ENDRX_R = crate::BitReader; -#[doc = "Receive buffer is filled up\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum EVENTS_ENDRX_A { - #[doc = "0: Event not generated"] - NOT_GENERATED = 0, - #[doc = "1: Event generated"] - GENERATED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: EVENTS_ENDRX_A) -> Self { - variant as u8 != 0 - } -} -impl EVENTS_ENDRX_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> EVENTS_ENDRX_A { - match self.bits { - false => EVENTS_ENDRX_A::NOT_GENERATED, - true => EVENTS_ENDRX_A::GENERATED, - } - } - #[doc = "Checks if the value of the field is `NOT_GENERATED`"] - #[inline(always)] - pub fn is_not_generated(&self) -> bool { - *self == EVENTS_ENDRX_A::NOT_GENERATED - } - #[doc = "Checks if the value of the field is `GENERATED`"] - #[inline(always)] - pub fn is_generated(&self) -> bool { - *self == EVENTS_ENDRX_A::GENERATED - } -} -#[doc = "Field `EVENTS_ENDRX` writer - Receive buffer is filled up"] -pub type EVENTS_ENDRX_W<'a, const O: u8> = - crate::BitWriter<'a, u32, EVENTS_ENDRX_SPEC, EVENTS_ENDRX_A, O>; -impl<'a, const O: u8> EVENTS_ENDRX_W<'a, O> { - #[doc = "Event not generated"] - #[inline(always)] - pub fn not_generated(self) -> &'a mut W { - self.variant(EVENTS_ENDRX_A::NOT_GENERATED) - } - #[doc = "Event generated"] - #[inline(always)] - pub fn generated(self) -> &'a mut W { - self.variant(EVENTS_ENDRX_A::GENERATED) - } -} -impl R { - #[doc = "Bit 0 - Receive buffer is filled up"] - #[inline(always)] - pub fn events_endrx(&self) -> EVENTS_ENDRX_R { - EVENTS_ENDRX_R::new((self.bits & 1) != 0) - } -} -impl W { - #[doc = "Bit 0 - Receive buffer is filled up"] - #[inline(always)] - #[must_use] - pub fn events_endrx(&mut self) -> EVENTS_ENDRX_W<0> { - EVENTS_ENDRX_W::new(self) - } - #[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 = "Receive buffer is filled up\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 [events_endrx](index.html) module"] -pub struct EVENTS_ENDRX_SPEC; -impl crate::RegisterSpec for EVENTS_ENDRX_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [events_endrx::R](R) reader structure"] -impl crate::Readable for EVENTS_ENDRX_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [events_endrx::W](W) writer structure"] -impl crate::Writable for EVENTS_ENDRX_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets EVENTS_ENDRX to value 0"] -impl crate::Resettable for EVENTS_ENDRX_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/uarte0/events_endtx.rs b/down-the-stack/dk_pac/src/uarte0/events_endtx.rs deleted file mode 100644 index 3108439..0000000 --- a/down-the-stack/dk_pac/src/uarte0/events_endtx.rs +++ /dev/null @@ -1,127 +0,0 @@ -#[doc = "Register `EVENTS_ENDTX` 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 `EVENTS_ENDTX` 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 `EVENTS_ENDTX` reader - Last TX byte transmitted"] -pub type EVENTS_ENDTX_R = crate::BitReader; -#[doc = "Last TX byte transmitted\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum EVENTS_ENDTX_A { - #[doc = "0: Event not generated"] - NOT_GENERATED = 0, - #[doc = "1: Event generated"] - GENERATED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: EVENTS_ENDTX_A) -> Self { - variant as u8 != 0 - } -} -impl EVENTS_ENDTX_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> EVENTS_ENDTX_A { - match self.bits { - false => EVENTS_ENDTX_A::NOT_GENERATED, - true => EVENTS_ENDTX_A::GENERATED, - } - } - #[doc = "Checks if the value of the field is `NOT_GENERATED`"] - #[inline(always)] - pub fn is_not_generated(&self) -> bool { - *self == EVENTS_ENDTX_A::NOT_GENERATED - } - #[doc = "Checks if the value of the field is `GENERATED`"] - #[inline(always)] - pub fn is_generated(&self) -> bool { - *self == EVENTS_ENDTX_A::GENERATED - } -} -#[doc = "Field `EVENTS_ENDTX` writer - Last TX byte transmitted"] -pub type EVENTS_ENDTX_W<'a, const O: u8> = - crate::BitWriter<'a, u32, EVENTS_ENDTX_SPEC, EVENTS_ENDTX_A, O>; -impl<'a, const O: u8> EVENTS_ENDTX_W<'a, O> { - #[doc = "Event not generated"] - #[inline(always)] - pub fn not_generated(self) -> &'a mut W { - self.variant(EVENTS_ENDTX_A::NOT_GENERATED) - } - #[doc = "Event generated"] - #[inline(always)] - pub fn generated(self) -> &'a mut W { - self.variant(EVENTS_ENDTX_A::GENERATED) - } -} -impl R { - #[doc = "Bit 0 - Last TX byte transmitted"] - #[inline(always)] - pub fn events_endtx(&self) -> EVENTS_ENDTX_R { - EVENTS_ENDTX_R::new((self.bits & 1) != 0) - } -} -impl W { - #[doc = "Bit 0 - Last TX byte transmitted"] - #[inline(always)] - #[must_use] - pub fn events_endtx(&mut self) -> EVENTS_ENDTX_W<0> { - EVENTS_ENDTX_W::new(self) - } - #[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 = "Last TX byte transmitted\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 [events_endtx](index.html) module"] -pub struct EVENTS_ENDTX_SPEC; -impl crate::RegisterSpec for EVENTS_ENDTX_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [events_endtx::R](R) reader structure"] -impl crate::Readable for EVENTS_ENDTX_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [events_endtx::W](W) writer structure"] -impl crate::Writable for EVENTS_ENDTX_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets EVENTS_ENDTX to value 0"] -impl crate::Resettable for EVENTS_ENDTX_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/uarte0/events_error.rs b/down-the-stack/dk_pac/src/uarte0/events_error.rs deleted file mode 100644 index ea836b3..0000000 --- a/down-the-stack/dk_pac/src/uarte0/events_error.rs +++ /dev/null @@ -1,127 +0,0 @@ -#[doc = "Register `EVENTS_ERROR` 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 `EVENTS_ERROR` 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 `EVENTS_ERROR` reader - Error detected"] -pub type EVENTS_ERROR_R = crate::BitReader; -#[doc = "Error detected\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum EVENTS_ERROR_A { - #[doc = "0: Event not generated"] - NOT_GENERATED = 0, - #[doc = "1: Event generated"] - GENERATED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: EVENTS_ERROR_A) -> Self { - variant as u8 != 0 - } -} -impl EVENTS_ERROR_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> EVENTS_ERROR_A { - match self.bits { - false => EVENTS_ERROR_A::NOT_GENERATED, - true => EVENTS_ERROR_A::GENERATED, - } - } - #[doc = "Checks if the value of the field is `NOT_GENERATED`"] - #[inline(always)] - pub fn is_not_generated(&self) -> bool { - *self == EVENTS_ERROR_A::NOT_GENERATED - } - #[doc = "Checks if the value of the field is `GENERATED`"] - #[inline(always)] - pub fn is_generated(&self) -> bool { - *self == EVENTS_ERROR_A::GENERATED - } -} -#[doc = "Field `EVENTS_ERROR` writer - Error detected"] -pub type EVENTS_ERROR_W<'a, const O: u8> = - crate::BitWriter<'a, u32, EVENTS_ERROR_SPEC, EVENTS_ERROR_A, O>; -impl<'a, const O: u8> EVENTS_ERROR_W<'a, O> { - #[doc = "Event not generated"] - #[inline(always)] - pub fn not_generated(self) -> &'a mut W { - self.variant(EVENTS_ERROR_A::NOT_GENERATED) - } - #[doc = "Event generated"] - #[inline(always)] - pub fn generated(self) -> &'a mut W { - self.variant(EVENTS_ERROR_A::GENERATED) - } -} -impl R { - #[doc = "Bit 0 - Error detected"] - #[inline(always)] - pub fn events_error(&self) -> EVENTS_ERROR_R { - EVENTS_ERROR_R::new((self.bits & 1) != 0) - } -} -impl W { - #[doc = "Bit 0 - Error detected"] - #[inline(always)] - #[must_use] - pub fn events_error(&mut self) -> EVENTS_ERROR_W<0> { - EVENTS_ERROR_W::new(self) - } - #[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 = "Error detected\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 [events_error](index.html) module"] -pub struct EVENTS_ERROR_SPEC; -impl crate::RegisterSpec for EVENTS_ERROR_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [events_error::R](R) reader structure"] -impl crate::Readable for EVENTS_ERROR_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [events_error::W](W) writer structure"] -impl crate::Writable for EVENTS_ERROR_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets EVENTS_ERROR to value 0"] -impl crate::Resettable for EVENTS_ERROR_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/uarte0/events_ncts.rs b/down-the-stack/dk_pac/src/uarte0/events_ncts.rs deleted file mode 100644 index 4596a0a..0000000 --- a/down-the-stack/dk_pac/src/uarte0/events_ncts.rs +++ /dev/null @@ -1,127 +0,0 @@ -#[doc = "Register `EVENTS_NCTS` 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 `EVENTS_NCTS` 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 `EVENTS_NCTS` reader - CTS is deactivated (set high). Not Clear To Send."] -pub type EVENTS_NCTS_R = crate::BitReader; -#[doc = "CTS is deactivated (set high). Not Clear To Send.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum EVENTS_NCTS_A { - #[doc = "0: Event not generated"] - NOT_GENERATED = 0, - #[doc = "1: Event generated"] - GENERATED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: EVENTS_NCTS_A) -> Self { - variant as u8 != 0 - } -} -impl EVENTS_NCTS_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> EVENTS_NCTS_A { - match self.bits { - false => EVENTS_NCTS_A::NOT_GENERATED, - true => EVENTS_NCTS_A::GENERATED, - } - } - #[doc = "Checks if the value of the field is `NOT_GENERATED`"] - #[inline(always)] - pub fn is_not_generated(&self) -> bool { - *self == EVENTS_NCTS_A::NOT_GENERATED - } - #[doc = "Checks if the value of the field is `GENERATED`"] - #[inline(always)] - pub fn is_generated(&self) -> bool { - *self == EVENTS_NCTS_A::GENERATED - } -} -#[doc = "Field `EVENTS_NCTS` writer - CTS is deactivated (set high). Not Clear To Send."] -pub type EVENTS_NCTS_W<'a, const O: u8> = - crate::BitWriter<'a, u32, EVENTS_NCTS_SPEC, EVENTS_NCTS_A, O>; -impl<'a, const O: u8> EVENTS_NCTS_W<'a, O> { - #[doc = "Event not generated"] - #[inline(always)] - pub fn not_generated(self) -> &'a mut W { - self.variant(EVENTS_NCTS_A::NOT_GENERATED) - } - #[doc = "Event generated"] - #[inline(always)] - pub fn generated(self) -> &'a mut W { - self.variant(EVENTS_NCTS_A::GENERATED) - } -} -impl R { - #[doc = "Bit 0 - CTS is deactivated (set high). Not Clear To Send."] - #[inline(always)] - pub fn events_ncts(&self) -> EVENTS_NCTS_R { - EVENTS_NCTS_R::new((self.bits & 1) != 0) - } -} -impl W { - #[doc = "Bit 0 - CTS is deactivated (set high). Not Clear To Send."] - #[inline(always)] - #[must_use] - pub fn events_ncts(&mut self) -> EVENTS_NCTS_W<0> { - EVENTS_NCTS_W::new(self) - } - #[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 = "CTS is deactivated (set high). Not Clear To Send.\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 [events_ncts](index.html) module"] -pub struct EVENTS_NCTS_SPEC; -impl crate::RegisterSpec for EVENTS_NCTS_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [events_ncts::R](R) reader structure"] -impl crate::Readable for EVENTS_NCTS_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [events_ncts::W](W) writer structure"] -impl crate::Writable for EVENTS_NCTS_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets EVENTS_NCTS to value 0"] -impl crate::Resettable for EVENTS_NCTS_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/uarte0/events_rxdrdy.rs b/down-the-stack/dk_pac/src/uarte0/events_rxdrdy.rs deleted file mode 100644 index 2360e9c..0000000 --- a/down-the-stack/dk_pac/src/uarte0/events_rxdrdy.rs +++ /dev/null @@ -1,127 +0,0 @@ -#[doc = "Register `EVENTS_RXDRDY` 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 `EVENTS_RXDRDY` 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 `EVENTS_RXDRDY` reader - Data received in RXD (but potentially not yet transferred to Data RAM)"] -pub type EVENTS_RXDRDY_R = crate::BitReader; -#[doc = "Data received in RXD (but potentially not yet transferred to Data RAM)\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum EVENTS_RXDRDY_A { - #[doc = "0: Event not generated"] - NOT_GENERATED = 0, - #[doc = "1: Event generated"] - GENERATED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: EVENTS_RXDRDY_A) -> Self { - variant as u8 != 0 - } -} -impl EVENTS_RXDRDY_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> EVENTS_RXDRDY_A { - match self.bits { - false => EVENTS_RXDRDY_A::NOT_GENERATED, - true => EVENTS_RXDRDY_A::GENERATED, - } - } - #[doc = "Checks if the value of the field is `NOT_GENERATED`"] - #[inline(always)] - pub fn is_not_generated(&self) -> bool { - *self == EVENTS_RXDRDY_A::NOT_GENERATED - } - #[doc = "Checks if the value of the field is `GENERATED`"] - #[inline(always)] - pub fn is_generated(&self) -> bool { - *self == EVENTS_RXDRDY_A::GENERATED - } -} -#[doc = "Field `EVENTS_RXDRDY` writer - Data received in RXD (but potentially not yet transferred to Data RAM)"] -pub type EVENTS_RXDRDY_W<'a, const O: u8> = - crate::BitWriter<'a, u32, EVENTS_RXDRDY_SPEC, EVENTS_RXDRDY_A, O>; -impl<'a, const O: u8> EVENTS_RXDRDY_W<'a, O> { - #[doc = "Event not generated"] - #[inline(always)] - pub fn not_generated(self) -> &'a mut W { - self.variant(EVENTS_RXDRDY_A::NOT_GENERATED) - } - #[doc = "Event generated"] - #[inline(always)] - pub fn generated(self) -> &'a mut W { - self.variant(EVENTS_RXDRDY_A::GENERATED) - } -} -impl R { - #[doc = "Bit 0 - Data received in RXD (but potentially not yet transferred to Data RAM)"] - #[inline(always)] - pub fn events_rxdrdy(&self) -> EVENTS_RXDRDY_R { - EVENTS_RXDRDY_R::new((self.bits & 1) != 0) - } -} -impl W { - #[doc = "Bit 0 - Data received in RXD (but potentially not yet transferred to Data RAM)"] - #[inline(always)] - #[must_use] - pub fn events_rxdrdy(&mut self) -> EVENTS_RXDRDY_W<0> { - EVENTS_RXDRDY_W::new(self) - } - #[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 = "Data received in RXD (but potentially not yet transferred to Data RAM)\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 [events_rxdrdy](index.html) module"] -pub struct EVENTS_RXDRDY_SPEC; -impl crate::RegisterSpec for EVENTS_RXDRDY_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [events_rxdrdy::R](R) reader structure"] -impl crate::Readable for EVENTS_RXDRDY_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [events_rxdrdy::W](W) writer structure"] -impl crate::Writable for EVENTS_RXDRDY_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets EVENTS_RXDRDY to value 0"] -impl crate::Resettable for EVENTS_RXDRDY_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/uarte0/events_rxstarted.rs b/down-the-stack/dk_pac/src/uarte0/events_rxstarted.rs deleted file mode 100644 index 0542517..0000000 --- a/down-the-stack/dk_pac/src/uarte0/events_rxstarted.rs +++ /dev/null @@ -1,127 +0,0 @@ -#[doc = "Register `EVENTS_RXSTARTED` 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 `EVENTS_RXSTARTED` 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 `EVENTS_RXSTARTED` reader - UART receiver has started"] -pub type EVENTS_RXSTARTED_R = crate::BitReader; -#[doc = "UART receiver has started\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum EVENTS_RXSTARTED_A { - #[doc = "0: Event not generated"] - NOT_GENERATED = 0, - #[doc = "1: Event generated"] - GENERATED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: EVENTS_RXSTARTED_A) -> Self { - variant as u8 != 0 - } -} -impl EVENTS_RXSTARTED_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> EVENTS_RXSTARTED_A { - match self.bits { - false => EVENTS_RXSTARTED_A::NOT_GENERATED, - true => EVENTS_RXSTARTED_A::GENERATED, - } - } - #[doc = "Checks if the value of the field is `NOT_GENERATED`"] - #[inline(always)] - pub fn is_not_generated(&self) -> bool { - *self == EVENTS_RXSTARTED_A::NOT_GENERATED - } - #[doc = "Checks if the value of the field is `GENERATED`"] - #[inline(always)] - pub fn is_generated(&self) -> bool { - *self == EVENTS_RXSTARTED_A::GENERATED - } -} -#[doc = "Field `EVENTS_RXSTARTED` writer - UART receiver has started"] -pub type EVENTS_RXSTARTED_W<'a, const O: u8> = - crate::BitWriter<'a, u32, EVENTS_RXSTARTED_SPEC, EVENTS_RXSTARTED_A, O>; -impl<'a, const O: u8> EVENTS_RXSTARTED_W<'a, O> { - #[doc = "Event not generated"] - #[inline(always)] - pub fn not_generated(self) -> &'a mut W { - self.variant(EVENTS_RXSTARTED_A::NOT_GENERATED) - } - #[doc = "Event generated"] - #[inline(always)] - pub fn generated(self) -> &'a mut W { - self.variant(EVENTS_RXSTARTED_A::GENERATED) - } -} -impl R { - #[doc = "Bit 0 - UART receiver has started"] - #[inline(always)] - pub fn events_rxstarted(&self) -> EVENTS_RXSTARTED_R { - EVENTS_RXSTARTED_R::new((self.bits & 1) != 0) - } -} -impl W { - #[doc = "Bit 0 - UART receiver has started"] - #[inline(always)] - #[must_use] - pub fn events_rxstarted(&mut self) -> EVENTS_RXSTARTED_W<0> { - EVENTS_RXSTARTED_W::new(self) - } - #[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 = "UART receiver has started\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 [events_rxstarted](index.html) module"] -pub struct EVENTS_RXSTARTED_SPEC; -impl crate::RegisterSpec for EVENTS_RXSTARTED_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [events_rxstarted::R](R) reader structure"] -impl crate::Readable for EVENTS_RXSTARTED_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [events_rxstarted::W](W) writer structure"] -impl crate::Writable for EVENTS_RXSTARTED_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets EVENTS_RXSTARTED to value 0"] -impl crate::Resettable for EVENTS_RXSTARTED_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/uarte0/events_rxto.rs b/down-the-stack/dk_pac/src/uarte0/events_rxto.rs deleted file mode 100644 index f3a1380..0000000 --- a/down-the-stack/dk_pac/src/uarte0/events_rxto.rs +++ /dev/null @@ -1,127 +0,0 @@ -#[doc = "Register `EVENTS_RXTO` 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 `EVENTS_RXTO` 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 `EVENTS_RXTO` reader - Receiver timeout"] -pub type EVENTS_RXTO_R = crate::BitReader; -#[doc = "Receiver timeout\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum EVENTS_RXTO_A { - #[doc = "0: Event not generated"] - NOT_GENERATED = 0, - #[doc = "1: Event generated"] - GENERATED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: EVENTS_RXTO_A) -> Self { - variant as u8 != 0 - } -} -impl EVENTS_RXTO_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> EVENTS_RXTO_A { - match self.bits { - false => EVENTS_RXTO_A::NOT_GENERATED, - true => EVENTS_RXTO_A::GENERATED, - } - } - #[doc = "Checks if the value of the field is `NOT_GENERATED`"] - #[inline(always)] - pub fn is_not_generated(&self) -> bool { - *self == EVENTS_RXTO_A::NOT_GENERATED - } - #[doc = "Checks if the value of the field is `GENERATED`"] - #[inline(always)] - pub fn is_generated(&self) -> bool { - *self == EVENTS_RXTO_A::GENERATED - } -} -#[doc = "Field `EVENTS_RXTO` writer - Receiver timeout"] -pub type EVENTS_RXTO_W<'a, const O: u8> = - crate::BitWriter<'a, u32, EVENTS_RXTO_SPEC, EVENTS_RXTO_A, O>; -impl<'a, const O: u8> EVENTS_RXTO_W<'a, O> { - #[doc = "Event not generated"] - #[inline(always)] - pub fn not_generated(self) -> &'a mut W { - self.variant(EVENTS_RXTO_A::NOT_GENERATED) - } - #[doc = "Event generated"] - #[inline(always)] - pub fn generated(self) -> &'a mut W { - self.variant(EVENTS_RXTO_A::GENERATED) - } -} -impl R { - #[doc = "Bit 0 - Receiver timeout"] - #[inline(always)] - pub fn events_rxto(&self) -> EVENTS_RXTO_R { - EVENTS_RXTO_R::new((self.bits & 1) != 0) - } -} -impl W { - #[doc = "Bit 0 - Receiver timeout"] - #[inline(always)] - #[must_use] - pub fn events_rxto(&mut self) -> EVENTS_RXTO_W<0> { - EVENTS_RXTO_W::new(self) - } - #[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 = "Receiver timeout\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 [events_rxto](index.html) module"] -pub struct EVENTS_RXTO_SPEC; -impl crate::RegisterSpec for EVENTS_RXTO_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [events_rxto::R](R) reader structure"] -impl crate::Readable for EVENTS_RXTO_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [events_rxto::W](W) writer structure"] -impl crate::Writable for EVENTS_RXTO_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets EVENTS_RXTO to value 0"] -impl crate::Resettable for EVENTS_RXTO_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/uarte0/events_txdrdy.rs b/down-the-stack/dk_pac/src/uarte0/events_txdrdy.rs deleted file mode 100644 index b5a9b5b..0000000 --- a/down-the-stack/dk_pac/src/uarte0/events_txdrdy.rs +++ /dev/null @@ -1,127 +0,0 @@ -#[doc = "Register `EVENTS_TXDRDY` 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 `EVENTS_TXDRDY` 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 `EVENTS_TXDRDY` reader - Data sent from TXD"] -pub type EVENTS_TXDRDY_R = crate::BitReader; -#[doc = "Data sent from TXD\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum EVENTS_TXDRDY_A { - #[doc = "0: Event not generated"] - NOT_GENERATED = 0, - #[doc = "1: Event generated"] - GENERATED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: EVENTS_TXDRDY_A) -> Self { - variant as u8 != 0 - } -} -impl EVENTS_TXDRDY_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> EVENTS_TXDRDY_A { - match self.bits { - false => EVENTS_TXDRDY_A::NOT_GENERATED, - true => EVENTS_TXDRDY_A::GENERATED, - } - } - #[doc = "Checks if the value of the field is `NOT_GENERATED`"] - #[inline(always)] - pub fn is_not_generated(&self) -> bool { - *self == EVENTS_TXDRDY_A::NOT_GENERATED - } - #[doc = "Checks if the value of the field is `GENERATED`"] - #[inline(always)] - pub fn is_generated(&self) -> bool { - *self == EVENTS_TXDRDY_A::GENERATED - } -} -#[doc = "Field `EVENTS_TXDRDY` writer - Data sent from TXD"] -pub type EVENTS_TXDRDY_W<'a, const O: u8> = - crate::BitWriter<'a, u32, EVENTS_TXDRDY_SPEC, EVENTS_TXDRDY_A, O>; -impl<'a, const O: u8> EVENTS_TXDRDY_W<'a, O> { - #[doc = "Event not generated"] - #[inline(always)] - pub fn not_generated(self) -> &'a mut W { - self.variant(EVENTS_TXDRDY_A::NOT_GENERATED) - } - #[doc = "Event generated"] - #[inline(always)] - pub fn generated(self) -> &'a mut W { - self.variant(EVENTS_TXDRDY_A::GENERATED) - } -} -impl R { - #[doc = "Bit 0 - Data sent from TXD"] - #[inline(always)] - pub fn events_txdrdy(&self) -> EVENTS_TXDRDY_R { - EVENTS_TXDRDY_R::new((self.bits & 1) != 0) - } -} -impl W { - #[doc = "Bit 0 - Data sent from TXD"] - #[inline(always)] - #[must_use] - pub fn events_txdrdy(&mut self) -> EVENTS_TXDRDY_W<0> { - EVENTS_TXDRDY_W::new(self) - } - #[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 = "Data sent from TXD\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 [events_txdrdy](index.html) module"] -pub struct EVENTS_TXDRDY_SPEC; -impl crate::RegisterSpec for EVENTS_TXDRDY_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [events_txdrdy::R](R) reader structure"] -impl crate::Readable for EVENTS_TXDRDY_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [events_txdrdy::W](W) writer structure"] -impl crate::Writable for EVENTS_TXDRDY_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets EVENTS_TXDRDY to value 0"] -impl crate::Resettable for EVENTS_TXDRDY_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/uarte0/events_txstarted.rs b/down-the-stack/dk_pac/src/uarte0/events_txstarted.rs deleted file mode 100644 index 2f21b79..0000000 --- a/down-the-stack/dk_pac/src/uarte0/events_txstarted.rs +++ /dev/null @@ -1,127 +0,0 @@ -#[doc = "Register `EVENTS_TXSTARTED` 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 `EVENTS_TXSTARTED` 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 `EVENTS_TXSTARTED` reader - UART transmitter has started"] -pub type EVENTS_TXSTARTED_R = crate::BitReader; -#[doc = "UART transmitter has started\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum EVENTS_TXSTARTED_A { - #[doc = "0: Event not generated"] - NOT_GENERATED = 0, - #[doc = "1: Event generated"] - GENERATED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: EVENTS_TXSTARTED_A) -> Self { - variant as u8 != 0 - } -} -impl EVENTS_TXSTARTED_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> EVENTS_TXSTARTED_A { - match self.bits { - false => EVENTS_TXSTARTED_A::NOT_GENERATED, - true => EVENTS_TXSTARTED_A::GENERATED, - } - } - #[doc = "Checks if the value of the field is `NOT_GENERATED`"] - #[inline(always)] - pub fn is_not_generated(&self) -> bool { - *self == EVENTS_TXSTARTED_A::NOT_GENERATED - } - #[doc = "Checks if the value of the field is `GENERATED`"] - #[inline(always)] - pub fn is_generated(&self) -> bool { - *self == EVENTS_TXSTARTED_A::GENERATED - } -} -#[doc = "Field `EVENTS_TXSTARTED` writer - UART transmitter has started"] -pub type EVENTS_TXSTARTED_W<'a, const O: u8> = - crate::BitWriter<'a, u32, EVENTS_TXSTARTED_SPEC, EVENTS_TXSTARTED_A, O>; -impl<'a, const O: u8> EVENTS_TXSTARTED_W<'a, O> { - #[doc = "Event not generated"] - #[inline(always)] - pub fn not_generated(self) -> &'a mut W { - self.variant(EVENTS_TXSTARTED_A::NOT_GENERATED) - } - #[doc = "Event generated"] - #[inline(always)] - pub fn generated(self) -> &'a mut W { - self.variant(EVENTS_TXSTARTED_A::GENERATED) - } -} -impl R { - #[doc = "Bit 0 - UART transmitter has started"] - #[inline(always)] - pub fn events_txstarted(&self) -> EVENTS_TXSTARTED_R { - EVENTS_TXSTARTED_R::new((self.bits & 1) != 0) - } -} -impl W { - #[doc = "Bit 0 - UART transmitter has started"] - #[inline(always)] - #[must_use] - pub fn events_txstarted(&mut self) -> EVENTS_TXSTARTED_W<0> { - EVENTS_TXSTARTED_W::new(self) - } - #[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 = "UART transmitter has started\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 [events_txstarted](index.html) module"] -pub struct EVENTS_TXSTARTED_SPEC; -impl crate::RegisterSpec for EVENTS_TXSTARTED_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [events_txstarted::R](R) reader structure"] -impl crate::Readable for EVENTS_TXSTARTED_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [events_txstarted::W](W) writer structure"] -impl crate::Writable for EVENTS_TXSTARTED_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets EVENTS_TXSTARTED to value 0"] -impl crate::Resettable for EVENTS_TXSTARTED_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/uarte0/events_txstopped.rs b/down-the-stack/dk_pac/src/uarte0/events_txstopped.rs deleted file mode 100644 index 6b37024..0000000 --- a/down-the-stack/dk_pac/src/uarte0/events_txstopped.rs +++ /dev/null @@ -1,127 +0,0 @@ -#[doc = "Register `EVENTS_TXSTOPPED` 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 `EVENTS_TXSTOPPED` 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 `EVENTS_TXSTOPPED` reader - Transmitter stopped"] -pub type EVENTS_TXSTOPPED_R = crate::BitReader; -#[doc = "Transmitter stopped\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum EVENTS_TXSTOPPED_A { - #[doc = "0: Event not generated"] - NOT_GENERATED = 0, - #[doc = "1: Event generated"] - GENERATED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: EVENTS_TXSTOPPED_A) -> Self { - variant as u8 != 0 - } -} -impl EVENTS_TXSTOPPED_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> EVENTS_TXSTOPPED_A { - match self.bits { - false => EVENTS_TXSTOPPED_A::NOT_GENERATED, - true => EVENTS_TXSTOPPED_A::GENERATED, - } - } - #[doc = "Checks if the value of the field is `NOT_GENERATED`"] - #[inline(always)] - pub fn is_not_generated(&self) -> bool { - *self == EVENTS_TXSTOPPED_A::NOT_GENERATED - } - #[doc = "Checks if the value of the field is `GENERATED`"] - #[inline(always)] - pub fn is_generated(&self) -> bool { - *self == EVENTS_TXSTOPPED_A::GENERATED - } -} -#[doc = "Field `EVENTS_TXSTOPPED` writer - Transmitter stopped"] -pub type EVENTS_TXSTOPPED_W<'a, const O: u8> = - crate::BitWriter<'a, u32, EVENTS_TXSTOPPED_SPEC, EVENTS_TXSTOPPED_A, O>; -impl<'a, const O: u8> EVENTS_TXSTOPPED_W<'a, O> { - #[doc = "Event not generated"] - #[inline(always)] - pub fn not_generated(self) -> &'a mut W { - self.variant(EVENTS_TXSTOPPED_A::NOT_GENERATED) - } - #[doc = "Event generated"] - #[inline(always)] - pub fn generated(self) -> &'a mut W { - self.variant(EVENTS_TXSTOPPED_A::GENERATED) - } -} -impl R { - #[doc = "Bit 0 - Transmitter stopped"] - #[inline(always)] - pub fn events_txstopped(&self) -> EVENTS_TXSTOPPED_R { - EVENTS_TXSTOPPED_R::new((self.bits & 1) != 0) - } -} -impl W { - #[doc = "Bit 0 - Transmitter stopped"] - #[inline(always)] - #[must_use] - pub fn events_txstopped(&mut self) -> EVENTS_TXSTOPPED_W<0> { - EVENTS_TXSTOPPED_W::new(self) - } - #[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 = "Transmitter stopped\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 [events_txstopped](index.html) module"] -pub struct EVENTS_TXSTOPPED_SPEC; -impl crate::RegisterSpec for EVENTS_TXSTOPPED_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [events_txstopped::R](R) reader structure"] -impl crate::Readable for EVENTS_TXSTOPPED_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [events_txstopped::W](W) writer structure"] -impl crate::Writable for EVENTS_TXSTOPPED_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets EVENTS_TXSTOPPED to value 0"] -impl crate::Resettable for EVENTS_TXSTOPPED_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/uarte0/inten.rs b/down-the-stack/dk_pac/src/uarte0/inten.rs deleted file mode 100644 index a747107..0000000 --- a/down-the-stack/dk_pac/src/uarte0/inten.rs +++ /dev/null @@ -1,736 +0,0 @@ -#[doc = "Register `INTEN` 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 `INTEN` 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 `CTS` reader - Enable or disable interrupt for event CTS"] -pub type CTS_R = crate::BitReader; -#[doc = "Enable or disable interrupt for event CTS\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum CTS_A { - #[doc = "0: Disable"] - DISABLED = 0, - #[doc = "1: Enable"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: CTS_A) -> Self { - variant as u8 != 0 - } -} -impl CTS_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> CTS_A { - match self.bits { - false => CTS_A::DISABLED, - true => CTS_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == CTS_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == CTS_A::ENABLED - } -} -#[doc = "Field `CTS` writer - Enable or disable interrupt for event CTS"] -pub type CTS_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTEN_SPEC, CTS_A, O>; -impl<'a, const O: u8> CTS_W<'a, O> { - #[doc = "Disable"] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(CTS_A::DISABLED) - } - #[doc = "Enable"] - #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(CTS_A::ENABLED) - } -} -#[doc = "Field `NCTS` reader - Enable or disable interrupt for event NCTS"] -pub type NCTS_R = crate::BitReader; -#[doc = "Enable or disable interrupt for event NCTS\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum NCTS_A { - #[doc = "0: Disable"] - DISABLED = 0, - #[doc = "1: Enable"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: NCTS_A) -> Self { - variant as u8 != 0 - } -} -impl NCTS_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> NCTS_A { - match self.bits { - false => NCTS_A::DISABLED, - true => NCTS_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == NCTS_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == NCTS_A::ENABLED - } -} -#[doc = "Field `NCTS` writer - Enable or disable interrupt for event NCTS"] -pub type NCTS_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTEN_SPEC, NCTS_A, O>; -impl<'a, const O: u8> NCTS_W<'a, O> { - #[doc = "Disable"] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(NCTS_A::DISABLED) - } - #[doc = "Enable"] - #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(NCTS_A::ENABLED) - } -} -#[doc = "Field `RXDRDY` reader - Enable or disable interrupt for event RXDRDY"] -pub type RXDRDY_R = crate::BitReader; -#[doc = "Enable or disable interrupt for event RXDRDY\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum RXDRDY_A { - #[doc = "0: Disable"] - DISABLED = 0, - #[doc = "1: Enable"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: RXDRDY_A) -> Self { - variant as u8 != 0 - } -} -impl RXDRDY_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> RXDRDY_A { - match self.bits { - false => RXDRDY_A::DISABLED, - true => RXDRDY_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == RXDRDY_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == RXDRDY_A::ENABLED - } -} -#[doc = "Field `RXDRDY` writer - Enable or disable interrupt for event RXDRDY"] -pub type RXDRDY_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTEN_SPEC, RXDRDY_A, O>; -impl<'a, const O: u8> RXDRDY_W<'a, O> { - #[doc = "Disable"] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(RXDRDY_A::DISABLED) - } - #[doc = "Enable"] - #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(RXDRDY_A::ENABLED) - } -} -#[doc = "Field `ENDRX` reader - Enable or disable interrupt for event ENDRX"] -pub type ENDRX_R = crate::BitReader; -#[doc = "Enable or disable interrupt for event ENDRX\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum ENDRX_A { - #[doc = "0: Disable"] - DISABLED = 0, - #[doc = "1: Enable"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: ENDRX_A) -> Self { - variant as u8 != 0 - } -} -impl ENDRX_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> ENDRX_A { - match self.bits { - false => ENDRX_A::DISABLED, - true => ENDRX_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == ENDRX_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == ENDRX_A::ENABLED - } -} -#[doc = "Field `ENDRX` writer - Enable or disable interrupt for event ENDRX"] -pub type ENDRX_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTEN_SPEC, ENDRX_A, O>; -impl<'a, const O: u8> ENDRX_W<'a, O> { - #[doc = "Disable"] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(ENDRX_A::DISABLED) - } - #[doc = "Enable"] - #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(ENDRX_A::ENABLED) - } -} -#[doc = "Field `TXDRDY` reader - Enable or disable interrupt for event TXDRDY"] -pub type TXDRDY_R = crate::BitReader; -#[doc = "Enable or disable interrupt for event TXDRDY\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum TXDRDY_A { - #[doc = "0: Disable"] - DISABLED = 0, - #[doc = "1: Enable"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: TXDRDY_A) -> Self { - variant as u8 != 0 - } -} -impl TXDRDY_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> TXDRDY_A { - match self.bits { - false => TXDRDY_A::DISABLED, - true => TXDRDY_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == TXDRDY_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == TXDRDY_A::ENABLED - } -} -#[doc = "Field `TXDRDY` writer - Enable or disable interrupt for event TXDRDY"] -pub type TXDRDY_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTEN_SPEC, TXDRDY_A, O>; -impl<'a, const O: u8> TXDRDY_W<'a, O> { - #[doc = "Disable"] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(TXDRDY_A::DISABLED) - } - #[doc = "Enable"] - #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(TXDRDY_A::ENABLED) - } -} -#[doc = "Field `ENDTX` reader - Enable or disable interrupt for event ENDTX"] -pub type ENDTX_R = crate::BitReader; -#[doc = "Enable or disable interrupt for event ENDTX\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum ENDTX_A { - #[doc = "0: Disable"] - DISABLED = 0, - #[doc = "1: Enable"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: ENDTX_A) -> Self { - variant as u8 != 0 - } -} -impl ENDTX_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> ENDTX_A { - match self.bits { - false => ENDTX_A::DISABLED, - true => ENDTX_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == ENDTX_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == ENDTX_A::ENABLED - } -} -#[doc = "Field `ENDTX` writer - Enable or disable interrupt for event ENDTX"] -pub type ENDTX_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTEN_SPEC, ENDTX_A, O>; -impl<'a, const O: u8> ENDTX_W<'a, O> { - #[doc = "Disable"] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(ENDTX_A::DISABLED) - } - #[doc = "Enable"] - #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(ENDTX_A::ENABLED) - } -} -#[doc = "Field `ERROR` reader - Enable or disable interrupt for event ERROR"] -pub type ERROR_R = crate::BitReader; -#[doc = "Enable or disable interrupt for event ERROR\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum ERROR_A { - #[doc = "0: Disable"] - DISABLED = 0, - #[doc = "1: Enable"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: ERROR_A) -> Self { - variant as u8 != 0 - } -} -impl ERROR_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> ERROR_A { - match self.bits { - false => ERROR_A::DISABLED, - true => ERROR_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == ERROR_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == ERROR_A::ENABLED - } -} -#[doc = "Field `ERROR` writer - Enable or disable interrupt for event ERROR"] -pub type ERROR_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTEN_SPEC, ERROR_A, O>; -impl<'a, const O: u8> ERROR_W<'a, O> { - #[doc = "Disable"] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(ERROR_A::DISABLED) - } - #[doc = "Enable"] - #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(ERROR_A::ENABLED) - } -} -#[doc = "Field `RXTO` reader - Enable or disable interrupt for event RXTO"] -pub type RXTO_R = crate::BitReader; -#[doc = "Enable or disable interrupt for event RXTO\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum RXTO_A { - #[doc = "0: Disable"] - DISABLED = 0, - #[doc = "1: Enable"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: RXTO_A) -> Self { - variant as u8 != 0 - } -} -impl RXTO_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> RXTO_A { - match self.bits { - false => RXTO_A::DISABLED, - true => RXTO_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == RXTO_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == RXTO_A::ENABLED - } -} -#[doc = "Field `RXTO` writer - Enable or disable interrupt for event RXTO"] -pub type RXTO_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTEN_SPEC, RXTO_A, O>; -impl<'a, const O: u8> RXTO_W<'a, O> { - #[doc = "Disable"] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(RXTO_A::DISABLED) - } - #[doc = "Enable"] - #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(RXTO_A::ENABLED) - } -} -#[doc = "Field `RXSTARTED` reader - Enable or disable interrupt for event RXSTARTED"] -pub type RXSTARTED_R = crate::BitReader; -#[doc = "Enable or disable interrupt for event RXSTARTED\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum RXSTARTED_A { - #[doc = "0: Disable"] - DISABLED = 0, - #[doc = "1: Enable"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: RXSTARTED_A) -> Self { - variant as u8 != 0 - } -} -impl RXSTARTED_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> RXSTARTED_A { - match self.bits { - false => RXSTARTED_A::DISABLED, - true => RXSTARTED_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == RXSTARTED_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == RXSTARTED_A::ENABLED - } -} -#[doc = "Field `RXSTARTED` writer - Enable or disable interrupt for event RXSTARTED"] -pub type RXSTARTED_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTEN_SPEC, RXSTARTED_A, O>; -impl<'a, const O: u8> RXSTARTED_W<'a, O> { - #[doc = "Disable"] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(RXSTARTED_A::DISABLED) - } - #[doc = "Enable"] - #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(RXSTARTED_A::ENABLED) - } -} -#[doc = "Field `TXSTARTED` reader - Enable or disable interrupt for event TXSTARTED"] -pub type TXSTARTED_R = crate::BitReader; -#[doc = "Enable or disable interrupt for event TXSTARTED\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum TXSTARTED_A { - #[doc = "0: Disable"] - DISABLED = 0, - #[doc = "1: Enable"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: TXSTARTED_A) -> Self { - variant as u8 != 0 - } -} -impl TXSTARTED_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> TXSTARTED_A { - match self.bits { - false => TXSTARTED_A::DISABLED, - true => TXSTARTED_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == TXSTARTED_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == TXSTARTED_A::ENABLED - } -} -#[doc = "Field `TXSTARTED` writer - Enable or disable interrupt for event TXSTARTED"] -pub type TXSTARTED_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTEN_SPEC, TXSTARTED_A, O>; -impl<'a, const O: u8> TXSTARTED_W<'a, O> { - #[doc = "Disable"] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(TXSTARTED_A::DISABLED) - } - #[doc = "Enable"] - #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(TXSTARTED_A::ENABLED) - } -} -#[doc = "Field `TXSTOPPED` reader - Enable or disable interrupt for event TXSTOPPED"] -pub type TXSTOPPED_R = crate::BitReader; -#[doc = "Enable or disable interrupt for event TXSTOPPED\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum TXSTOPPED_A { - #[doc = "0: Disable"] - DISABLED = 0, - #[doc = "1: Enable"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: TXSTOPPED_A) -> Self { - variant as u8 != 0 - } -} -impl TXSTOPPED_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> TXSTOPPED_A { - match self.bits { - false => TXSTOPPED_A::DISABLED, - true => TXSTOPPED_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == TXSTOPPED_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == TXSTOPPED_A::ENABLED - } -} -#[doc = "Field `TXSTOPPED` writer - Enable or disable interrupt for event TXSTOPPED"] -pub type TXSTOPPED_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTEN_SPEC, TXSTOPPED_A, O>; -impl<'a, const O: u8> TXSTOPPED_W<'a, O> { - #[doc = "Disable"] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(TXSTOPPED_A::DISABLED) - } - #[doc = "Enable"] - #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(TXSTOPPED_A::ENABLED) - } -} -impl R { - #[doc = "Bit 0 - Enable or disable interrupt for event CTS"] - #[inline(always)] - pub fn cts(&self) -> CTS_R { - CTS_R::new((self.bits & 1) != 0) - } - #[doc = "Bit 1 - Enable or disable interrupt for event NCTS"] - #[inline(always)] - pub fn ncts(&self) -> NCTS_R { - NCTS_R::new(((self.bits >> 1) & 1) != 0) - } - #[doc = "Bit 2 - Enable or disable interrupt for event RXDRDY"] - #[inline(always)] - pub fn rxdrdy(&self) -> RXDRDY_R { - RXDRDY_R::new(((self.bits >> 2) & 1) != 0) - } - #[doc = "Bit 4 - Enable or disable interrupt for event ENDRX"] - #[inline(always)] - pub fn endrx(&self) -> ENDRX_R { - ENDRX_R::new(((self.bits >> 4) & 1) != 0) - } - #[doc = "Bit 7 - Enable or disable interrupt for event TXDRDY"] - #[inline(always)] - pub fn txdrdy(&self) -> TXDRDY_R { - TXDRDY_R::new(((self.bits >> 7) & 1) != 0) - } - #[doc = "Bit 8 - Enable or disable interrupt for event ENDTX"] - #[inline(always)] - pub fn endtx(&self) -> ENDTX_R { - ENDTX_R::new(((self.bits >> 8) & 1) != 0) - } - #[doc = "Bit 9 - Enable or disable interrupt for event ERROR"] - #[inline(always)] - pub fn error(&self) -> ERROR_R { - ERROR_R::new(((self.bits >> 9) & 1) != 0) - } - #[doc = "Bit 17 - Enable or disable interrupt for event RXTO"] - #[inline(always)] - pub fn rxto(&self) -> RXTO_R { - RXTO_R::new(((self.bits >> 17) & 1) != 0) - } - #[doc = "Bit 19 - Enable or disable interrupt for event RXSTARTED"] - #[inline(always)] - pub fn rxstarted(&self) -> RXSTARTED_R { - RXSTARTED_R::new(((self.bits >> 19) & 1) != 0) - } - #[doc = "Bit 20 - Enable or disable interrupt for event TXSTARTED"] - #[inline(always)] - pub fn txstarted(&self) -> TXSTARTED_R { - TXSTARTED_R::new(((self.bits >> 20) & 1) != 0) - } - #[doc = "Bit 22 - Enable or disable interrupt for event TXSTOPPED"] - #[inline(always)] - pub fn txstopped(&self) -> TXSTOPPED_R { - TXSTOPPED_R::new(((self.bits >> 22) & 1) != 0) - } -} -impl W { - #[doc = "Bit 0 - Enable or disable interrupt for event CTS"] - #[inline(always)] - #[must_use] - pub fn cts(&mut self) -> CTS_W<0> { - CTS_W::new(self) - } - #[doc = "Bit 1 - Enable or disable interrupt for event NCTS"] - #[inline(always)] - #[must_use] - pub fn ncts(&mut self) -> NCTS_W<1> { - NCTS_W::new(self) - } - #[doc = "Bit 2 - Enable or disable interrupt for event RXDRDY"] - #[inline(always)] - #[must_use] - pub fn rxdrdy(&mut self) -> RXDRDY_W<2> { - RXDRDY_W::new(self) - } - #[doc = "Bit 4 - Enable or disable interrupt for event ENDRX"] - #[inline(always)] - #[must_use] - pub fn endrx(&mut self) -> ENDRX_W<4> { - ENDRX_W::new(self) - } - #[doc = "Bit 7 - Enable or disable interrupt for event TXDRDY"] - #[inline(always)] - #[must_use] - pub fn txdrdy(&mut self) -> TXDRDY_W<7> { - TXDRDY_W::new(self) - } - #[doc = "Bit 8 - Enable or disable interrupt for event ENDTX"] - #[inline(always)] - #[must_use] - pub fn endtx(&mut self) -> ENDTX_W<8> { - ENDTX_W::new(self) - } - #[doc = "Bit 9 - Enable or disable interrupt for event ERROR"] - #[inline(always)] - #[must_use] - pub fn error(&mut self) -> ERROR_W<9> { - ERROR_W::new(self) - } - #[doc = "Bit 17 - Enable or disable interrupt for event RXTO"] - #[inline(always)] - #[must_use] - pub fn rxto(&mut self) -> RXTO_W<17> { - RXTO_W::new(self) - } - #[doc = "Bit 19 - Enable or disable interrupt for event RXSTARTED"] - #[inline(always)] - #[must_use] - pub fn rxstarted(&mut self) -> RXSTARTED_W<19> { - RXSTARTED_W::new(self) - } - #[doc = "Bit 20 - Enable or disable interrupt for event TXSTARTED"] - #[inline(always)] - #[must_use] - pub fn txstarted(&mut self) -> TXSTARTED_W<20> { - TXSTARTED_W::new(self) - } - #[doc = "Bit 22 - Enable or disable interrupt for event TXSTOPPED"] - #[inline(always)] - #[must_use] - pub fn txstopped(&mut self) -> TXSTOPPED_W<22> { - TXSTOPPED_W::new(self) - } - #[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 = "Enable or disable interrupt\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 [inten](index.html) module"] -pub struct INTEN_SPEC; -impl crate::RegisterSpec for INTEN_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [inten::R](R) reader structure"] -impl crate::Readable for INTEN_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [inten::W](W) writer structure"] -impl crate::Writable for INTEN_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets INTEN to value 0"] -impl crate::Resettable for INTEN_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/uarte0/intenclr.rs b/down-the-stack/dk_pac/src/uarte0/intenclr.rs deleted file mode 100644 index 0acfd42..0000000 --- a/down-the-stack/dk_pac/src/uarte0/intenclr.rs +++ /dev/null @@ -1,813 +0,0 @@ -#[doc = "Register `INTENCLR` 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 `INTENCLR` 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 `CTS` reader - Write '1' to disable interrupt for event CTS"] -pub type CTS_R = crate::BitReader; -#[doc = "Write '1' to disable interrupt for event CTS\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum CTS_A { - #[doc = "0: Read: Disabled"] - DISABLED = 0, - #[doc = "1: Read: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: CTS_A) -> Self { - variant as u8 != 0 - } -} -impl CTS_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> CTS_A { - match self.bits { - false => CTS_A::DISABLED, - true => CTS_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == CTS_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == CTS_A::ENABLED - } -} -#[doc = "Write '1' to disable interrupt for event CTS\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum CTS_AW { - #[doc = "1: Disable"] - CLEAR = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: CTS_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `CTS` writer - Write '1' to disable interrupt for event CTS"] -pub type CTS_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENCLR_SPEC, CTS_AW, O>; -impl<'a, const O: u8> CTS_W<'a, O> { - #[doc = "Disable"] - #[inline(always)] - pub fn clear(self) -> &'a mut W { - self.variant(CTS_AW::CLEAR) - } -} -#[doc = "Field `NCTS` reader - Write '1' to disable interrupt for event NCTS"] -pub type NCTS_R = crate::BitReader; -#[doc = "Write '1' to disable interrupt for event NCTS\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum NCTS_A { - #[doc = "0: Read: Disabled"] - DISABLED = 0, - #[doc = "1: Read: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: NCTS_A) -> Self { - variant as u8 != 0 - } -} -impl NCTS_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> NCTS_A { - match self.bits { - false => NCTS_A::DISABLED, - true => NCTS_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == NCTS_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == NCTS_A::ENABLED - } -} -#[doc = "Write '1' to disable interrupt for event NCTS\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum NCTS_AW { - #[doc = "1: Disable"] - CLEAR = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: NCTS_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `NCTS` writer - Write '1' to disable interrupt for event NCTS"] -pub type NCTS_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENCLR_SPEC, NCTS_AW, O>; -impl<'a, const O: u8> NCTS_W<'a, O> { - #[doc = "Disable"] - #[inline(always)] - pub fn clear(self) -> &'a mut W { - self.variant(NCTS_AW::CLEAR) - } -} -#[doc = "Field `RXDRDY` reader - Write '1' to disable interrupt for event RXDRDY"] -pub type RXDRDY_R = crate::BitReader; -#[doc = "Write '1' to disable interrupt for event RXDRDY\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum RXDRDY_A { - #[doc = "0: Read: Disabled"] - DISABLED = 0, - #[doc = "1: Read: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: RXDRDY_A) -> Self { - variant as u8 != 0 - } -} -impl RXDRDY_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> RXDRDY_A { - match self.bits { - false => RXDRDY_A::DISABLED, - true => RXDRDY_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == RXDRDY_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == RXDRDY_A::ENABLED - } -} -#[doc = "Write '1' to disable interrupt for event RXDRDY\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum RXDRDY_AW { - #[doc = "1: Disable"] - CLEAR = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: RXDRDY_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `RXDRDY` writer - Write '1' to disable interrupt for event RXDRDY"] -pub type RXDRDY_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENCLR_SPEC, RXDRDY_AW, O>; -impl<'a, const O: u8> RXDRDY_W<'a, O> { - #[doc = "Disable"] - #[inline(always)] - pub fn clear(self) -> &'a mut W { - self.variant(RXDRDY_AW::CLEAR) - } -} -#[doc = "Field `ENDRX` reader - Write '1' to disable interrupt for event ENDRX"] -pub type ENDRX_R = crate::BitReader; -#[doc = "Write '1' to disable interrupt for event ENDRX\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum ENDRX_A { - #[doc = "0: Read: Disabled"] - DISABLED = 0, - #[doc = "1: Read: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: ENDRX_A) -> Self { - variant as u8 != 0 - } -} -impl ENDRX_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> ENDRX_A { - match self.bits { - false => ENDRX_A::DISABLED, - true => ENDRX_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == ENDRX_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == ENDRX_A::ENABLED - } -} -#[doc = "Write '1' to disable interrupt for event ENDRX\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum ENDRX_AW { - #[doc = "1: Disable"] - CLEAR = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: ENDRX_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `ENDRX` writer - Write '1' to disable interrupt for event ENDRX"] -pub type ENDRX_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENCLR_SPEC, ENDRX_AW, O>; -impl<'a, const O: u8> ENDRX_W<'a, O> { - #[doc = "Disable"] - #[inline(always)] - pub fn clear(self) -> &'a mut W { - self.variant(ENDRX_AW::CLEAR) - } -} -#[doc = "Field `TXDRDY` reader - Write '1' to disable interrupt for event TXDRDY"] -pub type TXDRDY_R = crate::BitReader; -#[doc = "Write '1' to disable interrupt for event TXDRDY\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum TXDRDY_A { - #[doc = "0: Read: Disabled"] - DISABLED = 0, - #[doc = "1: Read: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: TXDRDY_A) -> Self { - variant as u8 != 0 - } -} -impl TXDRDY_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> TXDRDY_A { - match self.bits { - false => TXDRDY_A::DISABLED, - true => TXDRDY_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == TXDRDY_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == TXDRDY_A::ENABLED - } -} -#[doc = "Write '1' to disable interrupt for event TXDRDY\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum TXDRDY_AW { - #[doc = "1: Disable"] - CLEAR = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: TXDRDY_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `TXDRDY` writer - Write '1' to disable interrupt for event TXDRDY"] -pub type TXDRDY_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENCLR_SPEC, TXDRDY_AW, O>; -impl<'a, const O: u8> TXDRDY_W<'a, O> { - #[doc = "Disable"] - #[inline(always)] - pub fn clear(self) -> &'a mut W { - self.variant(TXDRDY_AW::CLEAR) - } -} -#[doc = "Field `ENDTX` reader - Write '1' to disable interrupt for event ENDTX"] -pub type ENDTX_R = crate::BitReader; -#[doc = "Write '1' to disable interrupt for event ENDTX\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum ENDTX_A { - #[doc = "0: Read: Disabled"] - DISABLED = 0, - #[doc = "1: Read: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: ENDTX_A) -> Self { - variant as u8 != 0 - } -} -impl ENDTX_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> ENDTX_A { - match self.bits { - false => ENDTX_A::DISABLED, - true => ENDTX_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == ENDTX_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == ENDTX_A::ENABLED - } -} -#[doc = "Write '1' to disable interrupt for event ENDTX\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum ENDTX_AW { - #[doc = "1: Disable"] - CLEAR = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: ENDTX_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `ENDTX` writer - Write '1' to disable interrupt for event ENDTX"] -pub type ENDTX_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENCLR_SPEC, ENDTX_AW, O>; -impl<'a, const O: u8> ENDTX_W<'a, O> { - #[doc = "Disable"] - #[inline(always)] - pub fn clear(self) -> &'a mut W { - self.variant(ENDTX_AW::CLEAR) - } -} -#[doc = "Field `ERROR` reader - Write '1' to disable interrupt for event ERROR"] -pub type ERROR_R = crate::BitReader; -#[doc = "Write '1' to disable interrupt for event ERROR\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum ERROR_A { - #[doc = "0: Read: Disabled"] - DISABLED = 0, - #[doc = "1: Read: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: ERROR_A) -> Self { - variant as u8 != 0 - } -} -impl ERROR_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> ERROR_A { - match self.bits { - false => ERROR_A::DISABLED, - true => ERROR_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == ERROR_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == ERROR_A::ENABLED - } -} -#[doc = "Write '1' to disable interrupt for event ERROR\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum ERROR_AW { - #[doc = "1: Disable"] - CLEAR = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: ERROR_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `ERROR` writer - Write '1' to disable interrupt for event ERROR"] -pub type ERROR_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENCLR_SPEC, ERROR_AW, O>; -impl<'a, const O: u8> ERROR_W<'a, O> { - #[doc = "Disable"] - #[inline(always)] - pub fn clear(self) -> &'a mut W { - self.variant(ERROR_AW::CLEAR) - } -} -#[doc = "Field `RXTO` reader - Write '1' to disable interrupt for event RXTO"] -pub type RXTO_R = crate::BitReader; -#[doc = "Write '1' to disable interrupt for event RXTO\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum RXTO_A { - #[doc = "0: Read: Disabled"] - DISABLED = 0, - #[doc = "1: Read: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: RXTO_A) -> Self { - variant as u8 != 0 - } -} -impl RXTO_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> RXTO_A { - match self.bits { - false => RXTO_A::DISABLED, - true => RXTO_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == RXTO_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == RXTO_A::ENABLED - } -} -#[doc = "Write '1' to disable interrupt for event RXTO\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum RXTO_AW { - #[doc = "1: Disable"] - CLEAR = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: RXTO_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `RXTO` writer - Write '1' to disable interrupt for event RXTO"] -pub type RXTO_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENCLR_SPEC, RXTO_AW, O>; -impl<'a, const O: u8> RXTO_W<'a, O> { - #[doc = "Disable"] - #[inline(always)] - pub fn clear(self) -> &'a mut W { - self.variant(RXTO_AW::CLEAR) - } -} -#[doc = "Field `RXSTARTED` reader - Write '1' to disable interrupt for event RXSTARTED"] -pub type RXSTARTED_R = crate::BitReader; -#[doc = "Write '1' to disable interrupt for event RXSTARTED\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum RXSTARTED_A { - #[doc = "0: Read: Disabled"] - DISABLED = 0, - #[doc = "1: Read: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: RXSTARTED_A) -> Self { - variant as u8 != 0 - } -} -impl RXSTARTED_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> RXSTARTED_A { - match self.bits { - false => RXSTARTED_A::DISABLED, - true => RXSTARTED_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == RXSTARTED_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == RXSTARTED_A::ENABLED - } -} -#[doc = "Write '1' to disable interrupt for event RXSTARTED\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum RXSTARTED_AW { - #[doc = "1: Disable"] - CLEAR = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: RXSTARTED_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `RXSTARTED` writer - Write '1' to disable interrupt for event RXSTARTED"] -pub type RXSTARTED_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENCLR_SPEC, RXSTARTED_AW, O>; -impl<'a, const O: u8> RXSTARTED_W<'a, O> { - #[doc = "Disable"] - #[inline(always)] - pub fn clear(self) -> &'a mut W { - self.variant(RXSTARTED_AW::CLEAR) - } -} -#[doc = "Field `TXSTARTED` reader - Write '1' to disable interrupt for event TXSTARTED"] -pub type TXSTARTED_R = crate::BitReader; -#[doc = "Write '1' to disable interrupt for event TXSTARTED\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum TXSTARTED_A { - #[doc = "0: Read: Disabled"] - DISABLED = 0, - #[doc = "1: Read: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: TXSTARTED_A) -> Self { - variant as u8 != 0 - } -} -impl TXSTARTED_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> TXSTARTED_A { - match self.bits { - false => TXSTARTED_A::DISABLED, - true => TXSTARTED_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == TXSTARTED_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == TXSTARTED_A::ENABLED - } -} -#[doc = "Write '1' to disable interrupt for event TXSTARTED\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum TXSTARTED_AW { - #[doc = "1: Disable"] - CLEAR = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: TXSTARTED_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `TXSTARTED` writer - Write '1' to disable interrupt for event TXSTARTED"] -pub type TXSTARTED_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENCLR_SPEC, TXSTARTED_AW, O>; -impl<'a, const O: u8> TXSTARTED_W<'a, O> { - #[doc = "Disable"] - #[inline(always)] - pub fn clear(self) -> &'a mut W { - self.variant(TXSTARTED_AW::CLEAR) - } -} -#[doc = "Field `TXSTOPPED` reader - Write '1' to disable interrupt for event TXSTOPPED"] -pub type TXSTOPPED_R = crate::BitReader; -#[doc = "Write '1' to disable interrupt for event TXSTOPPED\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum TXSTOPPED_A { - #[doc = "0: Read: Disabled"] - DISABLED = 0, - #[doc = "1: Read: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: TXSTOPPED_A) -> Self { - variant as u8 != 0 - } -} -impl TXSTOPPED_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> TXSTOPPED_A { - match self.bits { - false => TXSTOPPED_A::DISABLED, - true => TXSTOPPED_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == TXSTOPPED_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == TXSTOPPED_A::ENABLED - } -} -#[doc = "Write '1' to disable interrupt for event TXSTOPPED\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum TXSTOPPED_AW { - #[doc = "1: Disable"] - CLEAR = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: TXSTOPPED_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `TXSTOPPED` writer - Write '1' to disable interrupt for event TXSTOPPED"] -pub type TXSTOPPED_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENCLR_SPEC, TXSTOPPED_AW, O>; -impl<'a, const O: u8> TXSTOPPED_W<'a, O> { - #[doc = "Disable"] - #[inline(always)] - pub fn clear(self) -> &'a mut W { - self.variant(TXSTOPPED_AW::CLEAR) - } -} -impl R { - #[doc = "Bit 0 - Write '1' to disable interrupt for event CTS"] - #[inline(always)] - pub fn cts(&self) -> CTS_R { - CTS_R::new((self.bits & 1) != 0) - } - #[doc = "Bit 1 - Write '1' to disable interrupt for event NCTS"] - #[inline(always)] - pub fn ncts(&self) -> NCTS_R { - NCTS_R::new(((self.bits >> 1) & 1) != 0) - } - #[doc = "Bit 2 - Write '1' to disable interrupt for event RXDRDY"] - #[inline(always)] - pub fn rxdrdy(&self) -> RXDRDY_R { - RXDRDY_R::new(((self.bits >> 2) & 1) != 0) - } - #[doc = "Bit 4 - Write '1' to disable interrupt for event ENDRX"] - #[inline(always)] - pub fn endrx(&self) -> ENDRX_R { - ENDRX_R::new(((self.bits >> 4) & 1) != 0) - } - #[doc = "Bit 7 - Write '1' to disable interrupt for event TXDRDY"] - #[inline(always)] - pub fn txdrdy(&self) -> TXDRDY_R { - TXDRDY_R::new(((self.bits >> 7) & 1) != 0) - } - #[doc = "Bit 8 - Write '1' to disable interrupt for event ENDTX"] - #[inline(always)] - pub fn endtx(&self) -> ENDTX_R { - ENDTX_R::new(((self.bits >> 8) & 1) != 0) - } - #[doc = "Bit 9 - Write '1' to disable interrupt for event ERROR"] - #[inline(always)] - pub fn error(&self) -> ERROR_R { - ERROR_R::new(((self.bits >> 9) & 1) != 0) - } - #[doc = "Bit 17 - Write '1' to disable interrupt for event RXTO"] - #[inline(always)] - pub fn rxto(&self) -> RXTO_R { - RXTO_R::new(((self.bits >> 17) & 1) != 0) - } - #[doc = "Bit 19 - Write '1' to disable interrupt for event RXSTARTED"] - #[inline(always)] - pub fn rxstarted(&self) -> RXSTARTED_R { - RXSTARTED_R::new(((self.bits >> 19) & 1) != 0) - } - #[doc = "Bit 20 - Write '1' to disable interrupt for event TXSTARTED"] - #[inline(always)] - pub fn txstarted(&self) -> TXSTARTED_R { - TXSTARTED_R::new(((self.bits >> 20) & 1) != 0) - } - #[doc = "Bit 22 - Write '1' to disable interrupt for event TXSTOPPED"] - #[inline(always)] - pub fn txstopped(&self) -> TXSTOPPED_R { - TXSTOPPED_R::new(((self.bits >> 22) & 1) != 0) - } -} -impl W { - #[doc = "Bit 0 - Write '1' to disable interrupt for event CTS"] - #[inline(always)] - #[must_use] - pub fn cts(&mut self) -> CTS_W<0> { - CTS_W::new(self) - } - #[doc = "Bit 1 - Write '1' to disable interrupt for event NCTS"] - #[inline(always)] - #[must_use] - pub fn ncts(&mut self) -> NCTS_W<1> { - NCTS_W::new(self) - } - #[doc = "Bit 2 - Write '1' to disable interrupt for event RXDRDY"] - #[inline(always)] - #[must_use] - pub fn rxdrdy(&mut self) -> RXDRDY_W<2> { - RXDRDY_W::new(self) - } - #[doc = "Bit 4 - Write '1' to disable interrupt for event ENDRX"] - #[inline(always)] - #[must_use] - pub fn endrx(&mut self) -> ENDRX_W<4> { - ENDRX_W::new(self) - } - #[doc = "Bit 7 - Write '1' to disable interrupt for event TXDRDY"] - #[inline(always)] - #[must_use] - pub fn txdrdy(&mut self) -> TXDRDY_W<7> { - TXDRDY_W::new(self) - } - #[doc = "Bit 8 - Write '1' to disable interrupt for event ENDTX"] - #[inline(always)] - #[must_use] - pub fn endtx(&mut self) -> ENDTX_W<8> { - ENDTX_W::new(self) - } - #[doc = "Bit 9 - Write '1' to disable interrupt for event ERROR"] - #[inline(always)] - #[must_use] - pub fn error(&mut self) -> ERROR_W<9> { - ERROR_W::new(self) - } - #[doc = "Bit 17 - Write '1' to disable interrupt for event RXTO"] - #[inline(always)] - #[must_use] - pub fn rxto(&mut self) -> RXTO_W<17> { - RXTO_W::new(self) - } - #[doc = "Bit 19 - Write '1' to disable interrupt for event RXSTARTED"] - #[inline(always)] - #[must_use] - pub fn rxstarted(&mut self) -> RXSTARTED_W<19> { - RXSTARTED_W::new(self) - } - #[doc = "Bit 20 - Write '1' to disable interrupt for event TXSTARTED"] - #[inline(always)] - #[must_use] - pub fn txstarted(&mut self) -> TXSTARTED_W<20> { - TXSTARTED_W::new(self) - } - #[doc = "Bit 22 - Write '1' to disable interrupt for event TXSTOPPED"] - #[inline(always)] - #[must_use] - pub fn txstopped(&mut self) -> TXSTOPPED_W<22> { - TXSTOPPED_W::new(self) - } - #[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 = "Disable interrupt\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 [intenclr](index.html) module"] -pub struct INTENCLR_SPEC; -impl crate::RegisterSpec for INTENCLR_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [intenclr::R](R) reader structure"] -impl crate::Readable for INTENCLR_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [intenclr::W](W) writer structure"] -impl crate::Writable for INTENCLR_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets INTENCLR to value 0"] -impl crate::Resettable for INTENCLR_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/uarte0/intenset.rs b/down-the-stack/dk_pac/src/uarte0/intenset.rs deleted file mode 100644 index 8e53bc8..0000000 --- a/down-the-stack/dk_pac/src/uarte0/intenset.rs +++ /dev/null @@ -1,813 +0,0 @@ -#[doc = "Register `INTENSET` 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 `INTENSET` 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 `CTS` reader - Write '1' to enable interrupt for event CTS"] -pub type CTS_R = crate::BitReader; -#[doc = "Write '1' to enable interrupt for event CTS\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum CTS_A { - #[doc = "0: Read: Disabled"] - DISABLED = 0, - #[doc = "1: Read: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: CTS_A) -> Self { - variant as u8 != 0 - } -} -impl CTS_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> CTS_A { - match self.bits { - false => CTS_A::DISABLED, - true => CTS_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == CTS_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == CTS_A::ENABLED - } -} -#[doc = "Write '1' to enable interrupt for event CTS\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum CTS_AW { - #[doc = "1: Enable"] - SET = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: CTS_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `CTS` writer - Write '1' to enable interrupt for event CTS"] -pub type CTS_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENSET_SPEC, CTS_AW, O>; -impl<'a, const O: u8> CTS_W<'a, O> { - #[doc = "Enable"] - #[inline(always)] - pub fn set(self) -> &'a mut W { - self.variant(CTS_AW::SET) - } -} -#[doc = "Field `NCTS` reader - Write '1' to enable interrupt for event NCTS"] -pub type NCTS_R = crate::BitReader; -#[doc = "Write '1' to enable interrupt for event NCTS\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum NCTS_A { - #[doc = "0: Read: Disabled"] - DISABLED = 0, - #[doc = "1: Read: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: NCTS_A) -> Self { - variant as u8 != 0 - } -} -impl NCTS_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> NCTS_A { - match self.bits { - false => NCTS_A::DISABLED, - true => NCTS_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == NCTS_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == NCTS_A::ENABLED - } -} -#[doc = "Write '1' to enable interrupt for event NCTS\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum NCTS_AW { - #[doc = "1: Enable"] - SET = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: NCTS_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `NCTS` writer - Write '1' to enable interrupt for event NCTS"] -pub type NCTS_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENSET_SPEC, NCTS_AW, O>; -impl<'a, const O: u8> NCTS_W<'a, O> { - #[doc = "Enable"] - #[inline(always)] - pub fn set(self) -> &'a mut W { - self.variant(NCTS_AW::SET) - } -} -#[doc = "Field `RXDRDY` reader - Write '1' to enable interrupt for event RXDRDY"] -pub type RXDRDY_R = crate::BitReader; -#[doc = "Write '1' to enable interrupt for event RXDRDY\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum RXDRDY_A { - #[doc = "0: Read: Disabled"] - DISABLED = 0, - #[doc = "1: Read: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: RXDRDY_A) -> Self { - variant as u8 != 0 - } -} -impl RXDRDY_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> RXDRDY_A { - match self.bits { - false => RXDRDY_A::DISABLED, - true => RXDRDY_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == RXDRDY_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == RXDRDY_A::ENABLED - } -} -#[doc = "Write '1' to enable interrupt for event RXDRDY\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum RXDRDY_AW { - #[doc = "1: Enable"] - SET = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: RXDRDY_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `RXDRDY` writer - Write '1' to enable interrupt for event RXDRDY"] -pub type RXDRDY_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENSET_SPEC, RXDRDY_AW, O>; -impl<'a, const O: u8> RXDRDY_W<'a, O> { - #[doc = "Enable"] - #[inline(always)] - pub fn set(self) -> &'a mut W { - self.variant(RXDRDY_AW::SET) - } -} -#[doc = "Field `ENDRX` reader - Write '1' to enable interrupt for event ENDRX"] -pub type ENDRX_R = crate::BitReader; -#[doc = "Write '1' to enable interrupt for event ENDRX\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum ENDRX_A { - #[doc = "0: Read: Disabled"] - DISABLED = 0, - #[doc = "1: Read: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: ENDRX_A) -> Self { - variant as u8 != 0 - } -} -impl ENDRX_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> ENDRX_A { - match self.bits { - false => ENDRX_A::DISABLED, - true => ENDRX_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == ENDRX_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == ENDRX_A::ENABLED - } -} -#[doc = "Write '1' to enable interrupt for event ENDRX\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum ENDRX_AW { - #[doc = "1: Enable"] - SET = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: ENDRX_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `ENDRX` writer - Write '1' to enable interrupt for event ENDRX"] -pub type ENDRX_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENSET_SPEC, ENDRX_AW, O>; -impl<'a, const O: u8> ENDRX_W<'a, O> { - #[doc = "Enable"] - #[inline(always)] - pub fn set(self) -> &'a mut W { - self.variant(ENDRX_AW::SET) - } -} -#[doc = "Field `TXDRDY` reader - Write '1' to enable interrupt for event TXDRDY"] -pub type TXDRDY_R = crate::BitReader; -#[doc = "Write '1' to enable interrupt for event TXDRDY\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum TXDRDY_A { - #[doc = "0: Read: Disabled"] - DISABLED = 0, - #[doc = "1: Read: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: TXDRDY_A) -> Self { - variant as u8 != 0 - } -} -impl TXDRDY_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> TXDRDY_A { - match self.bits { - false => TXDRDY_A::DISABLED, - true => TXDRDY_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == TXDRDY_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == TXDRDY_A::ENABLED - } -} -#[doc = "Write '1' to enable interrupt for event TXDRDY\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum TXDRDY_AW { - #[doc = "1: Enable"] - SET = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: TXDRDY_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `TXDRDY` writer - Write '1' to enable interrupt for event TXDRDY"] -pub type TXDRDY_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENSET_SPEC, TXDRDY_AW, O>; -impl<'a, const O: u8> TXDRDY_W<'a, O> { - #[doc = "Enable"] - #[inline(always)] - pub fn set(self) -> &'a mut W { - self.variant(TXDRDY_AW::SET) - } -} -#[doc = "Field `ENDTX` reader - Write '1' to enable interrupt for event ENDTX"] -pub type ENDTX_R = crate::BitReader; -#[doc = "Write '1' to enable interrupt for event ENDTX\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum ENDTX_A { - #[doc = "0: Read: Disabled"] - DISABLED = 0, - #[doc = "1: Read: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: ENDTX_A) -> Self { - variant as u8 != 0 - } -} -impl ENDTX_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> ENDTX_A { - match self.bits { - false => ENDTX_A::DISABLED, - true => ENDTX_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == ENDTX_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == ENDTX_A::ENABLED - } -} -#[doc = "Write '1' to enable interrupt for event ENDTX\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum ENDTX_AW { - #[doc = "1: Enable"] - SET = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: ENDTX_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `ENDTX` writer - Write '1' to enable interrupt for event ENDTX"] -pub type ENDTX_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENSET_SPEC, ENDTX_AW, O>; -impl<'a, const O: u8> ENDTX_W<'a, O> { - #[doc = "Enable"] - #[inline(always)] - pub fn set(self) -> &'a mut W { - self.variant(ENDTX_AW::SET) - } -} -#[doc = "Field `ERROR` reader - Write '1' to enable interrupt for event ERROR"] -pub type ERROR_R = crate::BitReader; -#[doc = "Write '1' to enable interrupt for event ERROR\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum ERROR_A { - #[doc = "0: Read: Disabled"] - DISABLED = 0, - #[doc = "1: Read: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: ERROR_A) -> Self { - variant as u8 != 0 - } -} -impl ERROR_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> ERROR_A { - match self.bits { - false => ERROR_A::DISABLED, - true => ERROR_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == ERROR_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == ERROR_A::ENABLED - } -} -#[doc = "Write '1' to enable interrupt for event ERROR\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum ERROR_AW { - #[doc = "1: Enable"] - SET = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: ERROR_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `ERROR` writer - Write '1' to enable interrupt for event ERROR"] -pub type ERROR_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENSET_SPEC, ERROR_AW, O>; -impl<'a, const O: u8> ERROR_W<'a, O> { - #[doc = "Enable"] - #[inline(always)] - pub fn set(self) -> &'a mut W { - self.variant(ERROR_AW::SET) - } -} -#[doc = "Field `RXTO` reader - Write '1' to enable interrupt for event RXTO"] -pub type RXTO_R = crate::BitReader; -#[doc = "Write '1' to enable interrupt for event RXTO\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum RXTO_A { - #[doc = "0: Read: Disabled"] - DISABLED = 0, - #[doc = "1: Read: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: RXTO_A) -> Self { - variant as u8 != 0 - } -} -impl RXTO_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> RXTO_A { - match self.bits { - false => RXTO_A::DISABLED, - true => RXTO_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == RXTO_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == RXTO_A::ENABLED - } -} -#[doc = "Write '1' to enable interrupt for event RXTO\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum RXTO_AW { - #[doc = "1: Enable"] - SET = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: RXTO_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `RXTO` writer - Write '1' to enable interrupt for event RXTO"] -pub type RXTO_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENSET_SPEC, RXTO_AW, O>; -impl<'a, const O: u8> RXTO_W<'a, O> { - #[doc = "Enable"] - #[inline(always)] - pub fn set(self) -> &'a mut W { - self.variant(RXTO_AW::SET) - } -} -#[doc = "Field `RXSTARTED` reader - Write '1' to enable interrupt for event RXSTARTED"] -pub type RXSTARTED_R = crate::BitReader; -#[doc = "Write '1' to enable interrupt for event RXSTARTED\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum RXSTARTED_A { - #[doc = "0: Read: Disabled"] - DISABLED = 0, - #[doc = "1: Read: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: RXSTARTED_A) -> Self { - variant as u8 != 0 - } -} -impl RXSTARTED_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> RXSTARTED_A { - match self.bits { - false => RXSTARTED_A::DISABLED, - true => RXSTARTED_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == RXSTARTED_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == RXSTARTED_A::ENABLED - } -} -#[doc = "Write '1' to enable interrupt for event RXSTARTED\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum RXSTARTED_AW { - #[doc = "1: Enable"] - SET = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: RXSTARTED_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `RXSTARTED` writer - Write '1' to enable interrupt for event RXSTARTED"] -pub type RXSTARTED_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENSET_SPEC, RXSTARTED_AW, O>; -impl<'a, const O: u8> RXSTARTED_W<'a, O> { - #[doc = "Enable"] - #[inline(always)] - pub fn set(self) -> &'a mut W { - self.variant(RXSTARTED_AW::SET) - } -} -#[doc = "Field `TXSTARTED` reader - Write '1' to enable interrupt for event TXSTARTED"] -pub type TXSTARTED_R = crate::BitReader; -#[doc = "Write '1' to enable interrupt for event TXSTARTED\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum TXSTARTED_A { - #[doc = "0: Read: Disabled"] - DISABLED = 0, - #[doc = "1: Read: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: TXSTARTED_A) -> Self { - variant as u8 != 0 - } -} -impl TXSTARTED_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> TXSTARTED_A { - match self.bits { - false => TXSTARTED_A::DISABLED, - true => TXSTARTED_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == TXSTARTED_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == TXSTARTED_A::ENABLED - } -} -#[doc = "Write '1' to enable interrupt for event TXSTARTED\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum TXSTARTED_AW { - #[doc = "1: Enable"] - SET = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: TXSTARTED_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `TXSTARTED` writer - Write '1' to enable interrupt for event TXSTARTED"] -pub type TXSTARTED_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENSET_SPEC, TXSTARTED_AW, O>; -impl<'a, const O: u8> TXSTARTED_W<'a, O> { - #[doc = "Enable"] - #[inline(always)] - pub fn set(self) -> &'a mut W { - self.variant(TXSTARTED_AW::SET) - } -} -#[doc = "Field `TXSTOPPED` reader - Write '1' to enable interrupt for event TXSTOPPED"] -pub type TXSTOPPED_R = crate::BitReader; -#[doc = "Write '1' to enable interrupt for event TXSTOPPED\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum TXSTOPPED_A { - #[doc = "0: Read: Disabled"] - DISABLED = 0, - #[doc = "1: Read: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: TXSTOPPED_A) -> Self { - variant as u8 != 0 - } -} -impl TXSTOPPED_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> TXSTOPPED_A { - match self.bits { - false => TXSTOPPED_A::DISABLED, - true => TXSTOPPED_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == TXSTOPPED_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == TXSTOPPED_A::ENABLED - } -} -#[doc = "Write '1' to enable interrupt for event TXSTOPPED\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum TXSTOPPED_AW { - #[doc = "1: Enable"] - SET = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: TXSTOPPED_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `TXSTOPPED` writer - Write '1' to enable interrupt for event TXSTOPPED"] -pub type TXSTOPPED_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENSET_SPEC, TXSTOPPED_AW, O>; -impl<'a, const O: u8> TXSTOPPED_W<'a, O> { - #[doc = "Enable"] - #[inline(always)] - pub fn set(self) -> &'a mut W { - self.variant(TXSTOPPED_AW::SET) - } -} -impl R { - #[doc = "Bit 0 - Write '1' to enable interrupt for event CTS"] - #[inline(always)] - pub fn cts(&self) -> CTS_R { - CTS_R::new((self.bits & 1) != 0) - } - #[doc = "Bit 1 - Write '1' to enable interrupt for event NCTS"] - #[inline(always)] - pub fn ncts(&self) -> NCTS_R { - NCTS_R::new(((self.bits >> 1) & 1) != 0) - } - #[doc = "Bit 2 - Write '1' to enable interrupt for event RXDRDY"] - #[inline(always)] - pub fn rxdrdy(&self) -> RXDRDY_R { - RXDRDY_R::new(((self.bits >> 2) & 1) != 0) - } - #[doc = "Bit 4 - Write '1' to enable interrupt for event ENDRX"] - #[inline(always)] - pub fn endrx(&self) -> ENDRX_R { - ENDRX_R::new(((self.bits >> 4) & 1) != 0) - } - #[doc = "Bit 7 - Write '1' to enable interrupt for event TXDRDY"] - #[inline(always)] - pub fn txdrdy(&self) -> TXDRDY_R { - TXDRDY_R::new(((self.bits >> 7) & 1) != 0) - } - #[doc = "Bit 8 - Write '1' to enable interrupt for event ENDTX"] - #[inline(always)] - pub fn endtx(&self) -> ENDTX_R { - ENDTX_R::new(((self.bits >> 8) & 1) != 0) - } - #[doc = "Bit 9 - Write '1' to enable interrupt for event ERROR"] - #[inline(always)] - pub fn error(&self) -> ERROR_R { - ERROR_R::new(((self.bits >> 9) & 1) != 0) - } - #[doc = "Bit 17 - Write '1' to enable interrupt for event RXTO"] - #[inline(always)] - pub fn rxto(&self) -> RXTO_R { - RXTO_R::new(((self.bits >> 17) & 1) != 0) - } - #[doc = "Bit 19 - Write '1' to enable interrupt for event RXSTARTED"] - #[inline(always)] - pub fn rxstarted(&self) -> RXSTARTED_R { - RXSTARTED_R::new(((self.bits >> 19) & 1) != 0) - } - #[doc = "Bit 20 - Write '1' to enable interrupt for event TXSTARTED"] - #[inline(always)] - pub fn txstarted(&self) -> TXSTARTED_R { - TXSTARTED_R::new(((self.bits >> 20) & 1) != 0) - } - #[doc = "Bit 22 - Write '1' to enable interrupt for event TXSTOPPED"] - #[inline(always)] - pub fn txstopped(&self) -> TXSTOPPED_R { - TXSTOPPED_R::new(((self.bits >> 22) & 1) != 0) - } -} -impl W { - #[doc = "Bit 0 - Write '1' to enable interrupt for event CTS"] - #[inline(always)] - #[must_use] - pub fn cts(&mut self) -> CTS_W<0> { - CTS_W::new(self) - } - #[doc = "Bit 1 - Write '1' to enable interrupt for event NCTS"] - #[inline(always)] - #[must_use] - pub fn ncts(&mut self) -> NCTS_W<1> { - NCTS_W::new(self) - } - #[doc = "Bit 2 - Write '1' to enable interrupt for event RXDRDY"] - #[inline(always)] - #[must_use] - pub fn rxdrdy(&mut self) -> RXDRDY_W<2> { - RXDRDY_W::new(self) - } - #[doc = "Bit 4 - Write '1' to enable interrupt for event ENDRX"] - #[inline(always)] - #[must_use] - pub fn endrx(&mut self) -> ENDRX_W<4> { - ENDRX_W::new(self) - } - #[doc = "Bit 7 - Write '1' to enable interrupt for event TXDRDY"] - #[inline(always)] - #[must_use] - pub fn txdrdy(&mut self) -> TXDRDY_W<7> { - TXDRDY_W::new(self) - } - #[doc = "Bit 8 - Write '1' to enable interrupt for event ENDTX"] - #[inline(always)] - #[must_use] - pub fn endtx(&mut self) -> ENDTX_W<8> { - ENDTX_W::new(self) - } - #[doc = "Bit 9 - Write '1' to enable interrupt for event ERROR"] - #[inline(always)] - #[must_use] - pub fn error(&mut self) -> ERROR_W<9> { - ERROR_W::new(self) - } - #[doc = "Bit 17 - Write '1' to enable interrupt for event RXTO"] - #[inline(always)] - #[must_use] - pub fn rxto(&mut self) -> RXTO_W<17> { - RXTO_W::new(self) - } - #[doc = "Bit 19 - Write '1' to enable interrupt for event RXSTARTED"] - #[inline(always)] - #[must_use] - pub fn rxstarted(&mut self) -> RXSTARTED_W<19> { - RXSTARTED_W::new(self) - } - #[doc = "Bit 20 - Write '1' to enable interrupt for event TXSTARTED"] - #[inline(always)] - #[must_use] - pub fn txstarted(&mut self) -> TXSTARTED_W<20> { - TXSTARTED_W::new(self) - } - #[doc = "Bit 22 - Write '1' to enable interrupt for event TXSTOPPED"] - #[inline(always)] - #[must_use] - pub fn txstopped(&mut self) -> TXSTOPPED_W<22> { - TXSTOPPED_W::new(self) - } - #[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 = "Enable interrupt\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 [intenset](index.html) module"] -pub struct INTENSET_SPEC; -impl crate::RegisterSpec for INTENSET_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [intenset::R](R) reader structure"] -impl crate::Readable for INTENSET_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [intenset::W](W) writer structure"] -impl crate::Writable for INTENSET_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets INTENSET to value 0"] -impl crate::Resettable for INTENSET_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/uarte0/psel.rs b/down-the-stack/dk_pac/src/uarte0/psel.rs deleted file mode 100644 index c25260e..0000000 --- a/down-the-stack/dk_pac/src/uarte0/psel.rs +++ /dev/null @@ -1,28 +0,0 @@ -#[doc = r"Register block"] -#[repr(C)] -pub struct PSEL { - #[doc = "0x00 - Pin select for RTS signal"] - pub rts: RTS, - #[doc = "0x04 - Pin select for TXD signal"] - pub txd: TXD, - #[doc = "0x08 - Pin select for CTS signal"] - pub cts: CTS, - #[doc = "0x0c - Pin select for RXD signal"] - pub rxd: RXD, -} -#[doc = "RTS (rw) register accessor: an alias for `Reg`"] -pub type RTS = crate::Reg; -#[doc = "Pin select for RTS signal"] -pub mod rts; -#[doc = "TXD (rw) register accessor: an alias for `Reg`"] -pub type TXD = crate::Reg; -#[doc = "Pin select for TXD signal"] -pub mod txd; -#[doc = "CTS (rw) register accessor: an alias for `Reg`"] -pub type CTS = crate::Reg; -#[doc = "Pin select for CTS signal"] -pub mod cts; -#[doc = "RXD (rw) register accessor: an alias for `Reg`"] -pub type RXD = crate::Reg; -#[doc = "Pin select for RXD signal"] -pub mod rxd; diff --git a/down-the-stack/dk_pac/src/uarte0/psel/cts.rs b/down-the-stack/dk_pac/src/uarte0/psel/cts.rs deleted file mode 100644 index 0c48d3c..0000000 --- a/down-the-stack/dk_pac/src/uarte0/psel/cts.rs +++ /dev/null @@ -1,141 +0,0 @@ -#[doc = "Register `CTS` 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 `CTS` 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 `PIN` reader - Pin number"] -pub type PIN_R = crate::FieldReader; -#[doc = "Field `PIN` writer - Pin number"] -pub type PIN_W<'a, const O: u8> = crate::FieldWriter<'a, u32, CTS_SPEC, u8, u8, 5, O>; -#[doc = "Field `CONNECT` reader - Connection"] -pub type CONNECT_R = crate::BitReader; -#[doc = "Connection\n\nValue on reset: 1"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum CONNECT_A { - #[doc = "1: Disconnect"] - DISCONNECTED = 1, - #[doc = "0: Connect"] - CONNECTED = 0, -} -impl From for bool { - #[inline(always)] - fn from(variant: CONNECT_A) -> Self { - variant as u8 != 0 - } -} -impl CONNECT_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> CONNECT_A { - match self.bits { - true => CONNECT_A::DISCONNECTED, - false => CONNECT_A::CONNECTED, - } - } - #[doc = "Checks if the value of the field is `DISCONNECTED`"] - #[inline(always)] - pub fn is_disconnected(&self) -> bool { - *self == CONNECT_A::DISCONNECTED - } - #[doc = "Checks if the value of the field is `CONNECTED`"] - #[inline(always)] - pub fn is_connected(&self) -> bool { - *self == CONNECT_A::CONNECTED - } -} -#[doc = "Field `CONNECT` writer - Connection"] -pub type CONNECT_W<'a, const O: u8> = crate::BitWriter<'a, u32, CTS_SPEC, CONNECT_A, O>; -impl<'a, const O: u8> CONNECT_W<'a, O> { - #[doc = "Disconnect"] - #[inline(always)] - pub fn disconnected(self) -> &'a mut W { - self.variant(CONNECT_A::DISCONNECTED) - } - #[doc = "Connect"] - #[inline(always)] - pub fn connected(self) -> &'a mut W { - self.variant(CONNECT_A::CONNECTED) - } -} -impl R { - #[doc = "Bits 0:4 - Pin number"] - #[inline(always)] - pub fn pin(&self) -> PIN_R { - PIN_R::new((self.bits & 0x1f) as u8) - } - #[doc = "Bit 31 - Connection"] - #[inline(always)] - pub fn connect(&self) -> CONNECT_R { - CONNECT_R::new(((self.bits >> 31) & 1) != 0) - } -} -impl W { - #[doc = "Bits 0:4 - Pin number"] - #[inline(always)] - #[must_use] - pub fn pin(&mut self) -> PIN_W<0> { - PIN_W::new(self) - } - #[doc = "Bit 31 - Connection"] - #[inline(always)] - #[must_use] - pub fn connect(&mut self) -> CONNECT_W<31> { - CONNECT_W::new(self) - } - #[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 = "Pin select for CTS signal\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 [cts](index.html) module"] -pub struct CTS_SPEC; -impl crate::RegisterSpec for CTS_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [cts::R](R) reader structure"] -impl crate::Readable for CTS_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [cts::W](W) writer structure"] -impl crate::Writable for CTS_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets CTS to value 0xffff_ffff"] -impl crate::Resettable for CTS_SPEC { - const RESET_VALUE: Self::Ux = 0xffff_ffff; -} diff --git a/down-the-stack/dk_pac/src/uarte0/psel/rts.rs b/down-the-stack/dk_pac/src/uarte0/psel/rts.rs deleted file mode 100644 index 1c6231f..0000000 --- a/down-the-stack/dk_pac/src/uarte0/psel/rts.rs +++ /dev/null @@ -1,141 +0,0 @@ -#[doc = "Register `RTS` 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 `RTS` 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 `PIN` reader - Pin number"] -pub type PIN_R = crate::FieldReader; -#[doc = "Field `PIN` writer - Pin number"] -pub type PIN_W<'a, const O: u8> = crate::FieldWriter<'a, u32, RTS_SPEC, u8, u8, 5, O>; -#[doc = "Field `CONNECT` reader - Connection"] -pub type CONNECT_R = crate::BitReader; -#[doc = "Connection\n\nValue on reset: 1"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum CONNECT_A { - #[doc = "1: Disconnect"] - DISCONNECTED = 1, - #[doc = "0: Connect"] - CONNECTED = 0, -} -impl From for bool { - #[inline(always)] - fn from(variant: CONNECT_A) -> Self { - variant as u8 != 0 - } -} -impl CONNECT_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> CONNECT_A { - match self.bits { - true => CONNECT_A::DISCONNECTED, - false => CONNECT_A::CONNECTED, - } - } - #[doc = "Checks if the value of the field is `DISCONNECTED`"] - #[inline(always)] - pub fn is_disconnected(&self) -> bool { - *self == CONNECT_A::DISCONNECTED - } - #[doc = "Checks if the value of the field is `CONNECTED`"] - #[inline(always)] - pub fn is_connected(&self) -> bool { - *self == CONNECT_A::CONNECTED - } -} -#[doc = "Field `CONNECT` writer - Connection"] -pub type CONNECT_W<'a, const O: u8> = crate::BitWriter<'a, u32, RTS_SPEC, CONNECT_A, O>; -impl<'a, const O: u8> CONNECT_W<'a, O> { - #[doc = "Disconnect"] - #[inline(always)] - pub fn disconnected(self) -> &'a mut W { - self.variant(CONNECT_A::DISCONNECTED) - } - #[doc = "Connect"] - #[inline(always)] - pub fn connected(self) -> &'a mut W { - self.variant(CONNECT_A::CONNECTED) - } -} -impl R { - #[doc = "Bits 0:4 - Pin number"] - #[inline(always)] - pub fn pin(&self) -> PIN_R { - PIN_R::new((self.bits & 0x1f) as u8) - } - #[doc = "Bit 31 - Connection"] - #[inline(always)] - pub fn connect(&self) -> CONNECT_R { - CONNECT_R::new(((self.bits >> 31) & 1) != 0) - } -} -impl W { - #[doc = "Bits 0:4 - Pin number"] - #[inline(always)] - #[must_use] - pub fn pin(&mut self) -> PIN_W<0> { - PIN_W::new(self) - } - #[doc = "Bit 31 - Connection"] - #[inline(always)] - #[must_use] - pub fn connect(&mut self) -> CONNECT_W<31> { - CONNECT_W::new(self) - } - #[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 = "Pin select for RTS signal\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 [rts](index.html) module"] -pub struct RTS_SPEC; -impl crate::RegisterSpec for RTS_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [rts::R](R) reader structure"] -impl crate::Readable for RTS_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [rts::W](W) writer structure"] -impl crate::Writable for RTS_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets RTS to value 0xffff_ffff"] -impl crate::Resettable for RTS_SPEC { - const RESET_VALUE: Self::Ux = 0xffff_ffff; -} diff --git a/down-the-stack/dk_pac/src/uarte0/psel/rxd.rs b/down-the-stack/dk_pac/src/uarte0/psel/rxd.rs deleted file mode 100644 index 4b18dde..0000000 --- a/down-the-stack/dk_pac/src/uarte0/psel/rxd.rs +++ /dev/null @@ -1,141 +0,0 @@ -#[doc = "Register `RXD` 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 `RXD` 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 `PIN` reader - Pin number"] -pub type PIN_R = crate::FieldReader; -#[doc = "Field `PIN` writer - Pin number"] -pub type PIN_W<'a, const O: u8> = crate::FieldWriter<'a, u32, RXD_SPEC, u8, u8, 5, O>; -#[doc = "Field `CONNECT` reader - Connection"] -pub type CONNECT_R = crate::BitReader; -#[doc = "Connection\n\nValue on reset: 1"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum CONNECT_A { - #[doc = "1: Disconnect"] - DISCONNECTED = 1, - #[doc = "0: Connect"] - CONNECTED = 0, -} -impl From for bool { - #[inline(always)] - fn from(variant: CONNECT_A) -> Self { - variant as u8 != 0 - } -} -impl CONNECT_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> CONNECT_A { - match self.bits { - true => CONNECT_A::DISCONNECTED, - false => CONNECT_A::CONNECTED, - } - } - #[doc = "Checks if the value of the field is `DISCONNECTED`"] - #[inline(always)] - pub fn is_disconnected(&self) -> bool { - *self == CONNECT_A::DISCONNECTED - } - #[doc = "Checks if the value of the field is `CONNECTED`"] - #[inline(always)] - pub fn is_connected(&self) -> bool { - *self == CONNECT_A::CONNECTED - } -} -#[doc = "Field `CONNECT` writer - Connection"] -pub type CONNECT_W<'a, const O: u8> = crate::BitWriter<'a, u32, RXD_SPEC, CONNECT_A, O>; -impl<'a, const O: u8> CONNECT_W<'a, O> { - #[doc = "Disconnect"] - #[inline(always)] - pub fn disconnected(self) -> &'a mut W { - self.variant(CONNECT_A::DISCONNECTED) - } - #[doc = "Connect"] - #[inline(always)] - pub fn connected(self) -> &'a mut W { - self.variant(CONNECT_A::CONNECTED) - } -} -impl R { - #[doc = "Bits 0:4 - Pin number"] - #[inline(always)] - pub fn pin(&self) -> PIN_R { - PIN_R::new((self.bits & 0x1f) as u8) - } - #[doc = "Bit 31 - Connection"] - #[inline(always)] - pub fn connect(&self) -> CONNECT_R { - CONNECT_R::new(((self.bits >> 31) & 1) != 0) - } -} -impl W { - #[doc = "Bits 0:4 - Pin number"] - #[inline(always)] - #[must_use] - pub fn pin(&mut self) -> PIN_W<0> { - PIN_W::new(self) - } - #[doc = "Bit 31 - Connection"] - #[inline(always)] - #[must_use] - pub fn connect(&mut self) -> CONNECT_W<31> { - CONNECT_W::new(self) - } - #[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 = "Pin select for RXD signal\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 [rxd](index.html) module"] -pub struct RXD_SPEC; -impl crate::RegisterSpec for RXD_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [rxd::R](R) reader structure"] -impl crate::Readable for RXD_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [rxd::W](W) writer structure"] -impl crate::Writable for RXD_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets RXD to value 0xffff_ffff"] -impl crate::Resettable for RXD_SPEC { - const RESET_VALUE: Self::Ux = 0xffff_ffff; -} diff --git a/down-the-stack/dk_pac/src/uarte0/psel/txd.rs b/down-the-stack/dk_pac/src/uarte0/psel/txd.rs deleted file mode 100644 index db6909d..0000000 --- a/down-the-stack/dk_pac/src/uarte0/psel/txd.rs +++ /dev/null @@ -1,141 +0,0 @@ -#[doc = "Register `TXD` 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 `TXD` 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 `PIN` reader - Pin number"] -pub type PIN_R = crate::FieldReader; -#[doc = "Field `PIN` writer - Pin number"] -pub type PIN_W<'a, const O: u8> = crate::FieldWriter<'a, u32, TXD_SPEC, u8, u8, 5, O>; -#[doc = "Field `CONNECT` reader - Connection"] -pub type CONNECT_R = crate::BitReader; -#[doc = "Connection\n\nValue on reset: 1"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum CONNECT_A { - #[doc = "1: Disconnect"] - DISCONNECTED = 1, - #[doc = "0: Connect"] - CONNECTED = 0, -} -impl From for bool { - #[inline(always)] - fn from(variant: CONNECT_A) -> Self { - variant as u8 != 0 - } -} -impl CONNECT_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> CONNECT_A { - match self.bits { - true => CONNECT_A::DISCONNECTED, - false => CONNECT_A::CONNECTED, - } - } - #[doc = "Checks if the value of the field is `DISCONNECTED`"] - #[inline(always)] - pub fn is_disconnected(&self) -> bool { - *self == CONNECT_A::DISCONNECTED - } - #[doc = "Checks if the value of the field is `CONNECTED`"] - #[inline(always)] - pub fn is_connected(&self) -> bool { - *self == CONNECT_A::CONNECTED - } -} -#[doc = "Field `CONNECT` writer - Connection"] -pub type CONNECT_W<'a, const O: u8> = crate::BitWriter<'a, u32, TXD_SPEC, CONNECT_A, O>; -impl<'a, const O: u8> CONNECT_W<'a, O> { - #[doc = "Disconnect"] - #[inline(always)] - pub fn disconnected(self) -> &'a mut W { - self.variant(CONNECT_A::DISCONNECTED) - } - #[doc = "Connect"] - #[inline(always)] - pub fn connected(self) -> &'a mut W { - self.variant(CONNECT_A::CONNECTED) - } -} -impl R { - #[doc = "Bits 0:4 - Pin number"] - #[inline(always)] - pub fn pin(&self) -> PIN_R { - PIN_R::new((self.bits & 0x1f) as u8) - } - #[doc = "Bit 31 - Connection"] - #[inline(always)] - pub fn connect(&self) -> CONNECT_R { - CONNECT_R::new(((self.bits >> 31) & 1) != 0) - } -} -impl W { - #[doc = "Bits 0:4 - Pin number"] - #[inline(always)] - #[must_use] - pub fn pin(&mut self) -> PIN_W<0> { - PIN_W::new(self) - } - #[doc = "Bit 31 - Connection"] - #[inline(always)] - #[must_use] - pub fn connect(&mut self) -> CONNECT_W<31> { - CONNECT_W::new(self) - } - #[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 = "Pin select for TXD signal\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 [txd](index.html) module"] -pub struct TXD_SPEC; -impl crate::RegisterSpec for TXD_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [txd::R](R) reader structure"] -impl crate::Readable for TXD_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [txd::W](W) writer structure"] -impl crate::Writable for TXD_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets TXD to value 0xffff_ffff"] -impl crate::Resettable for TXD_SPEC { - const RESET_VALUE: Self::Ux = 0xffff_ffff; -} diff --git a/down-the-stack/dk_pac/src/uarte0/rxd.rs b/down-the-stack/dk_pac/src/uarte0/rxd.rs deleted file mode 100644 index e4c73ce..0000000 --- a/down-the-stack/dk_pac/src/uarte0/rxd.rs +++ /dev/null @@ -1,22 +0,0 @@ -#[doc = r"Register block"] -#[repr(C)] -pub struct RXD { - #[doc = "0x00 - Data pointer"] - pub ptr: PTR, - #[doc = "0x04 - Maximum number of bytes in receive buffer"] - pub maxcnt: MAXCNT, - #[doc = "0x08 - Number of bytes transferred in the last transaction"] - pub amount: AMOUNT, -} -#[doc = "PTR (rw) register accessor: an alias for `Reg`"] -pub type PTR = crate::Reg; -#[doc = "Data pointer"] -pub mod ptr; -#[doc = "MAXCNT (rw) register accessor: an alias for `Reg`"] -pub type MAXCNT = crate::Reg; -#[doc = "Maximum number of bytes in receive buffer"] -pub mod maxcnt; -#[doc = "AMOUNT (r) register accessor: an alias for `Reg`"] -pub type AMOUNT = crate::Reg; -#[doc = "Number of bytes transferred in the last transaction"] -pub mod amount; diff --git a/down-the-stack/dk_pac/src/uarte0/rxd/amount.rs b/down-the-stack/dk_pac/src/uarte0/rxd/amount.rs deleted file mode 100644 index b48d827..0000000 --- a/down-the-stack/dk_pac/src/uarte0/rxd/amount.rs +++ /dev/null @@ -1,37 +0,0 @@ -#[doc = "Register `AMOUNT` 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 = "Field `AMOUNT` reader - Number of bytes transferred in the last transaction"] -pub type AMOUNT_R = crate::FieldReader; -impl R { - #[doc = "Bits 0:7 - Number of bytes transferred in the last transaction"] - #[inline(always)] - pub fn amount(&self) -> AMOUNT_R { - AMOUNT_R::new((self.bits & 0xff) as u8) - } -} -#[doc = "Number of bytes transferred in the last transaction\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 [amount](index.html) module"] -pub struct AMOUNT_SPEC; -impl crate::RegisterSpec for AMOUNT_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [amount::R](R) reader structure"] -impl crate::Readable for AMOUNT_SPEC { - type Reader = R; -} -#[doc = "`reset()` method sets AMOUNT to value 0"] -impl crate::Resettable for AMOUNT_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/uarte0/rxd/maxcnt.rs b/down-the-stack/dk_pac/src/uarte0/rxd/maxcnt.rs deleted file mode 100644 index 7d9b79c..0000000 --- a/down-the-stack/dk_pac/src/uarte0/rxd/maxcnt.rs +++ /dev/null @@ -1,80 +0,0 @@ -#[doc = "Register `MAXCNT` 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 `MAXCNT` 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 `MAXCNT` reader - Maximum number of bytes in receive buffer"] -pub type MAXCNT_R = crate::FieldReader; -#[doc = "Field `MAXCNT` writer - Maximum number of bytes in receive buffer"] -pub type MAXCNT_W<'a, const O: u8> = crate::FieldWriter<'a, u32, MAXCNT_SPEC, u8, u8, 8, O>; -impl R { - #[doc = "Bits 0:7 - Maximum number of bytes in receive buffer"] - #[inline(always)] - pub fn maxcnt(&self) -> MAXCNT_R { - MAXCNT_R::new((self.bits & 0xff) as u8) - } -} -impl W { - #[doc = "Bits 0:7 - Maximum number of bytes in receive buffer"] - #[inline(always)] - #[must_use] - pub fn maxcnt(&mut self) -> MAXCNT_W<0> { - MAXCNT_W::new(self) - } - #[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 = "Maximum number of bytes in receive buffer\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 [maxcnt](index.html) module"] -pub struct MAXCNT_SPEC; -impl crate::RegisterSpec for MAXCNT_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [maxcnt::R](R) reader structure"] -impl crate::Readable for MAXCNT_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [maxcnt::W](W) writer structure"] -impl crate::Writable for MAXCNT_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets MAXCNT to value 0"] -impl crate::Resettable for MAXCNT_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/uarte0/rxd/ptr.rs b/down-the-stack/dk_pac/src/uarte0/rxd/ptr.rs deleted file mode 100644 index 2f2c926..0000000 --- a/down-the-stack/dk_pac/src/uarte0/rxd/ptr.rs +++ /dev/null @@ -1,80 +0,0 @@ -#[doc = "Register `PTR` 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 `PTR` 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 `PTR` reader - Data pointer"] -pub type PTR_R = crate::FieldReader; -#[doc = "Field `PTR` writer - Data pointer"] -pub type PTR_W<'a, const O: u8> = crate::FieldWriter<'a, u32, PTR_SPEC, u32, u32, 32, O>; -impl R { - #[doc = "Bits 0:31 - Data pointer"] - #[inline(always)] - pub fn ptr(&self) -> PTR_R { - PTR_R::new(self.bits) - } -} -impl W { - #[doc = "Bits 0:31 - Data pointer"] - #[inline(always)] - #[must_use] - pub fn ptr(&mut self) -> PTR_W<0> { - PTR_W::new(self) - } - #[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 = "Data pointer\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 [ptr](index.html) module"] -pub struct PTR_SPEC; -impl crate::RegisterSpec for PTR_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [ptr::R](R) reader structure"] -impl crate::Readable for PTR_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [ptr::W](W) writer structure"] -impl crate::Writable for PTR_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets PTR to value 0"] -impl crate::Resettable for PTR_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/uarte0/shorts.rs b/down-the-stack/dk_pac/src/uarte0/shorts.rs deleted file mode 100644 index 6e9bc2f..0000000 --- a/down-the-stack/dk_pac/src/uarte0/shorts.rs +++ /dev/null @@ -1,189 +0,0 @@ -#[doc = "Register `SHORTS` 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 `SHORTS` 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 `ENDRX_STARTRX` reader - Shortcut between event ENDRX and task STARTRX"] -pub type ENDRX_STARTRX_R = crate::BitReader; -#[doc = "Shortcut between event ENDRX and task STARTRX\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum ENDRX_STARTRX_A { - #[doc = "0: Disable shortcut"] - DISABLED = 0, - #[doc = "1: Enable shortcut"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: ENDRX_STARTRX_A) -> Self { - variant as u8 != 0 - } -} -impl ENDRX_STARTRX_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> ENDRX_STARTRX_A { - match self.bits { - false => ENDRX_STARTRX_A::DISABLED, - true => ENDRX_STARTRX_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == ENDRX_STARTRX_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == ENDRX_STARTRX_A::ENABLED - } -} -#[doc = "Field `ENDRX_STARTRX` writer - Shortcut between event ENDRX and task STARTRX"] -pub type ENDRX_STARTRX_W<'a, const O: u8> = - crate::BitWriter<'a, u32, SHORTS_SPEC, ENDRX_STARTRX_A, O>; -impl<'a, const O: u8> ENDRX_STARTRX_W<'a, O> { - #[doc = "Disable shortcut"] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(ENDRX_STARTRX_A::DISABLED) - } - #[doc = "Enable shortcut"] - #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(ENDRX_STARTRX_A::ENABLED) - } -} -#[doc = "Field `ENDRX_STOPRX` reader - Shortcut between event ENDRX and task STOPRX"] -pub type ENDRX_STOPRX_R = crate::BitReader; -#[doc = "Shortcut between event ENDRX and task STOPRX\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum ENDRX_STOPRX_A { - #[doc = "0: Disable shortcut"] - DISABLED = 0, - #[doc = "1: Enable shortcut"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: ENDRX_STOPRX_A) -> Self { - variant as u8 != 0 - } -} -impl ENDRX_STOPRX_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> ENDRX_STOPRX_A { - match self.bits { - false => ENDRX_STOPRX_A::DISABLED, - true => ENDRX_STOPRX_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == ENDRX_STOPRX_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == ENDRX_STOPRX_A::ENABLED - } -} -#[doc = "Field `ENDRX_STOPRX` writer - Shortcut between event ENDRX and task STOPRX"] -pub type ENDRX_STOPRX_W<'a, const O: u8> = - crate::BitWriter<'a, u32, SHORTS_SPEC, ENDRX_STOPRX_A, O>; -impl<'a, const O: u8> ENDRX_STOPRX_W<'a, O> { - #[doc = "Disable shortcut"] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(ENDRX_STOPRX_A::DISABLED) - } - #[doc = "Enable shortcut"] - #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(ENDRX_STOPRX_A::ENABLED) - } -} -impl R { - #[doc = "Bit 5 - Shortcut between event ENDRX and task STARTRX"] - #[inline(always)] - pub fn endrx_startrx(&self) -> ENDRX_STARTRX_R { - ENDRX_STARTRX_R::new(((self.bits >> 5) & 1) != 0) - } - #[doc = "Bit 6 - Shortcut between event ENDRX and task STOPRX"] - #[inline(always)] - pub fn endrx_stoprx(&self) -> ENDRX_STOPRX_R { - ENDRX_STOPRX_R::new(((self.bits >> 6) & 1) != 0) - } -} -impl W { - #[doc = "Bit 5 - Shortcut between event ENDRX and task STARTRX"] - #[inline(always)] - #[must_use] - pub fn endrx_startrx(&mut self) -> ENDRX_STARTRX_W<5> { - ENDRX_STARTRX_W::new(self) - } - #[doc = "Bit 6 - Shortcut between event ENDRX and task STOPRX"] - #[inline(always)] - #[must_use] - pub fn endrx_stoprx(&mut self) -> ENDRX_STOPRX_W<6> { - ENDRX_STOPRX_W::new(self) - } - #[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 = "Shortcuts between local events and tasks\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 [shorts](index.html) module"] -pub struct SHORTS_SPEC; -impl crate::RegisterSpec for SHORTS_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [shorts::R](R) reader structure"] -impl crate::Readable for SHORTS_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [shorts::W](W) writer structure"] -impl crate::Writable for SHORTS_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets SHORTS to value 0"] -impl crate::Resettable for SHORTS_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/uarte0/tasks_flushrx.rs b/down-the-stack/dk_pac/src/uarte0/tasks_flushrx.rs deleted file mode 100644 index 0d045d7..0000000 --- a/down-the-stack/dk_pac/src/uarte0/tasks_flushrx.rs +++ /dev/null @@ -1,72 +0,0 @@ -#[doc = "Register `TASKS_FLUSHRX` 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 = "Flush RX FIFO into RX buffer\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum TASKS_FLUSHRX_AW { - #[doc = "1: Trigger task"] - TRIGGER = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: TASKS_FLUSHRX_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `TASKS_FLUSHRX` writer - Flush RX FIFO into RX buffer"] -pub type TASKS_FLUSHRX_W<'a, const O: u8> = - crate::BitWriter<'a, u32, TASKS_FLUSHRX_SPEC, TASKS_FLUSHRX_AW, O>; -impl<'a, const O: u8> TASKS_FLUSHRX_W<'a, O> { - #[doc = "Trigger task"] - #[inline(always)] - pub fn trigger(self) -> &'a mut W { - self.variant(TASKS_FLUSHRX_AW::TRIGGER) - } -} -impl W { - #[doc = "Bit 0 - Flush RX FIFO into RX buffer"] - #[inline(always)] - #[must_use] - pub fn tasks_flushrx(&mut self) -> TASKS_FLUSHRX_W<0> { - TASKS_FLUSHRX_W::new(self) - } - #[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 = "Flush RX FIFO into RX buffer\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 [tasks_flushrx](index.html) module"] -pub struct TASKS_FLUSHRX_SPEC; -impl crate::RegisterSpec for TASKS_FLUSHRX_SPEC { - type Ux = u32; -} -#[doc = "`write(|w| ..)` method takes [tasks_flushrx::W](W) writer structure"] -impl crate::Writable for TASKS_FLUSHRX_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets TASKS_FLUSHRX to value 0"] -impl crate::Resettable for TASKS_FLUSHRX_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/uarte0/tasks_startrx.rs b/down-the-stack/dk_pac/src/uarte0/tasks_startrx.rs deleted file mode 100644 index ec611e2..0000000 --- a/down-the-stack/dk_pac/src/uarte0/tasks_startrx.rs +++ /dev/null @@ -1,72 +0,0 @@ -#[doc = "Register `TASKS_STARTRX` 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 = "Start UART receiver\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum TASKS_STARTRX_AW { - #[doc = "1: Trigger task"] - TRIGGER = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: TASKS_STARTRX_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `TASKS_STARTRX` writer - Start UART receiver"] -pub type TASKS_STARTRX_W<'a, const O: u8> = - crate::BitWriter<'a, u32, TASKS_STARTRX_SPEC, TASKS_STARTRX_AW, O>; -impl<'a, const O: u8> TASKS_STARTRX_W<'a, O> { - #[doc = "Trigger task"] - #[inline(always)] - pub fn trigger(self) -> &'a mut W { - self.variant(TASKS_STARTRX_AW::TRIGGER) - } -} -impl W { - #[doc = "Bit 0 - Start UART receiver"] - #[inline(always)] - #[must_use] - pub fn tasks_startrx(&mut self) -> TASKS_STARTRX_W<0> { - TASKS_STARTRX_W::new(self) - } - #[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 = "Start UART receiver\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 [tasks_startrx](index.html) module"] -pub struct TASKS_STARTRX_SPEC; -impl crate::RegisterSpec for TASKS_STARTRX_SPEC { - type Ux = u32; -} -#[doc = "`write(|w| ..)` method takes [tasks_startrx::W](W) writer structure"] -impl crate::Writable for TASKS_STARTRX_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets TASKS_STARTRX to value 0"] -impl crate::Resettable for TASKS_STARTRX_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/uarte0/tasks_starttx.rs b/down-the-stack/dk_pac/src/uarte0/tasks_starttx.rs deleted file mode 100644 index de5aa37..0000000 --- a/down-the-stack/dk_pac/src/uarte0/tasks_starttx.rs +++ /dev/null @@ -1,72 +0,0 @@ -#[doc = "Register `TASKS_STARTTX` 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 = "Start UART transmitter\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum TASKS_STARTTX_AW { - #[doc = "1: Trigger task"] - TRIGGER = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: TASKS_STARTTX_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `TASKS_STARTTX` writer - Start UART transmitter"] -pub type TASKS_STARTTX_W<'a, const O: u8> = - crate::BitWriter<'a, u32, TASKS_STARTTX_SPEC, TASKS_STARTTX_AW, O>; -impl<'a, const O: u8> TASKS_STARTTX_W<'a, O> { - #[doc = "Trigger task"] - #[inline(always)] - pub fn trigger(self) -> &'a mut W { - self.variant(TASKS_STARTTX_AW::TRIGGER) - } -} -impl W { - #[doc = "Bit 0 - Start UART transmitter"] - #[inline(always)] - #[must_use] - pub fn tasks_starttx(&mut self) -> TASKS_STARTTX_W<0> { - TASKS_STARTTX_W::new(self) - } - #[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 = "Start UART transmitter\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 [tasks_starttx](index.html) module"] -pub struct TASKS_STARTTX_SPEC; -impl crate::RegisterSpec for TASKS_STARTTX_SPEC { - type Ux = u32; -} -#[doc = "`write(|w| ..)` method takes [tasks_starttx::W](W) writer structure"] -impl crate::Writable for TASKS_STARTTX_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets TASKS_STARTTX to value 0"] -impl crate::Resettable for TASKS_STARTTX_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/uarte0/tasks_stoprx.rs b/down-the-stack/dk_pac/src/uarte0/tasks_stoprx.rs deleted file mode 100644 index 306c0e0..0000000 --- a/down-the-stack/dk_pac/src/uarte0/tasks_stoprx.rs +++ /dev/null @@ -1,72 +0,0 @@ -#[doc = "Register `TASKS_STOPRX` 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 = "Stop UART receiver\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum TASKS_STOPRX_AW { - #[doc = "1: Trigger task"] - TRIGGER = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: TASKS_STOPRX_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `TASKS_STOPRX` writer - Stop UART receiver"] -pub type TASKS_STOPRX_W<'a, const O: u8> = - crate::BitWriter<'a, u32, TASKS_STOPRX_SPEC, TASKS_STOPRX_AW, O>; -impl<'a, const O: u8> TASKS_STOPRX_W<'a, O> { - #[doc = "Trigger task"] - #[inline(always)] - pub fn trigger(self) -> &'a mut W { - self.variant(TASKS_STOPRX_AW::TRIGGER) - } -} -impl W { - #[doc = "Bit 0 - Stop UART receiver"] - #[inline(always)] - #[must_use] - pub fn tasks_stoprx(&mut self) -> TASKS_STOPRX_W<0> { - TASKS_STOPRX_W::new(self) - } - #[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 = "Stop UART receiver\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 [tasks_stoprx](index.html) module"] -pub struct TASKS_STOPRX_SPEC; -impl crate::RegisterSpec for TASKS_STOPRX_SPEC { - type Ux = u32; -} -#[doc = "`write(|w| ..)` method takes [tasks_stoprx::W](W) writer structure"] -impl crate::Writable for TASKS_STOPRX_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets TASKS_STOPRX to value 0"] -impl crate::Resettable for TASKS_STOPRX_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/uarte0/tasks_stoptx.rs b/down-the-stack/dk_pac/src/uarte0/tasks_stoptx.rs deleted file mode 100644 index 5c99eef..0000000 --- a/down-the-stack/dk_pac/src/uarte0/tasks_stoptx.rs +++ /dev/null @@ -1,72 +0,0 @@ -#[doc = "Register `TASKS_STOPTX` 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 = "Stop UART transmitter\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum TASKS_STOPTX_AW { - #[doc = "1: Trigger task"] - TRIGGER = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: TASKS_STOPTX_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `TASKS_STOPTX` writer - Stop UART transmitter"] -pub type TASKS_STOPTX_W<'a, const O: u8> = - crate::BitWriter<'a, u32, TASKS_STOPTX_SPEC, TASKS_STOPTX_AW, O>; -impl<'a, const O: u8> TASKS_STOPTX_W<'a, O> { - #[doc = "Trigger task"] - #[inline(always)] - pub fn trigger(self) -> &'a mut W { - self.variant(TASKS_STOPTX_AW::TRIGGER) - } -} -impl W { - #[doc = "Bit 0 - Stop UART transmitter"] - #[inline(always)] - #[must_use] - pub fn tasks_stoptx(&mut self) -> TASKS_STOPTX_W<0> { - TASKS_STOPTX_W::new(self) - } - #[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 = "Stop UART transmitter\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 [tasks_stoptx](index.html) module"] -pub struct TASKS_STOPTX_SPEC; -impl crate::RegisterSpec for TASKS_STOPTX_SPEC { - type Ux = u32; -} -#[doc = "`write(|w| ..)` method takes [tasks_stoptx::W](W) writer structure"] -impl crate::Writable for TASKS_STOPTX_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets TASKS_STOPTX to value 0"] -impl crate::Resettable for TASKS_STOPTX_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/uarte0/txd.rs b/down-the-stack/dk_pac/src/uarte0/txd.rs deleted file mode 100644 index 8a19551..0000000 --- a/down-the-stack/dk_pac/src/uarte0/txd.rs +++ /dev/null @@ -1,22 +0,0 @@ -#[doc = r"Register block"] -#[repr(C)] -pub struct TXD { - #[doc = "0x00 - Data pointer"] - pub ptr: PTR, - #[doc = "0x04 - Maximum number of bytes in transmit buffer"] - pub maxcnt: MAXCNT, - #[doc = "0x08 - Number of bytes transferred in the last transaction"] - pub amount: AMOUNT, -} -#[doc = "PTR (rw) register accessor: an alias for `Reg`"] -pub type PTR = crate::Reg; -#[doc = "Data pointer"] -pub mod ptr; -#[doc = "MAXCNT (rw) register accessor: an alias for `Reg`"] -pub type MAXCNT = crate::Reg; -#[doc = "Maximum number of bytes in transmit buffer"] -pub mod maxcnt; -#[doc = "AMOUNT (r) register accessor: an alias for `Reg`"] -pub type AMOUNT = crate::Reg; -#[doc = "Number of bytes transferred in the last transaction"] -pub mod amount; diff --git a/down-the-stack/dk_pac/src/uarte0/txd/amount.rs b/down-the-stack/dk_pac/src/uarte0/txd/amount.rs deleted file mode 100644 index b48d827..0000000 --- a/down-the-stack/dk_pac/src/uarte0/txd/amount.rs +++ /dev/null @@ -1,37 +0,0 @@ -#[doc = "Register `AMOUNT` 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 = "Field `AMOUNT` reader - Number of bytes transferred in the last transaction"] -pub type AMOUNT_R = crate::FieldReader; -impl R { - #[doc = "Bits 0:7 - Number of bytes transferred in the last transaction"] - #[inline(always)] - pub fn amount(&self) -> AMOUNT_R { - AMOUNT_R::new((self.bits & 0xff) as u8) - } -} -#[doc = "Number of bytes transferred in the last transaction\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 [amount](index.html) module"] -pub struct AMOUNT_SPEC; -impl crate::RegisterSpec for AMOUNT_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [amount::R](R) reader structure"] -impl crate::Readable for AMOUNT_SPEC { - type Reader = R; -} -#[doc = "`reset()` method sets AMOUNT to value 0"] -impl crate::Resettable for AMOUNT_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/uarte0/txd/maxcnt.rs b/down-the-stack/dk_pac/src/uarte0/txd/maxcnt.rs deleted file mode 100644 index 084733c..0000000 --- a/down-the-stack/dk_pac/src/uarte0/txd/maxcnt.rs +++ /dev/null @@ -1,80 +0,0 @@ -#[doc = "Register `MAXCNT` 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 `MAXCNT` 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 `MAXCNT` reader - Maximum number of bytes in transmit buffer"] -pub type MAXCNT_R = crate::FieldReader; -#[doc = "Field `MAXCNT` writer - Maximum number of bytes in transmit buffer"] -pub type MAXCNT_W<'a, const O: u8> = crate::FieldWriter<'a, u32, MAXCNT_SPEC, u8, u8, 8, O>; -impl R { - #[doc = "Bits 0:7 - Maximum number of bytes in transmit buffer"] - #[inline(always)] - pub fn maxcnt(&self) -> MAXCNT_R { - MAXCNT_R::new((self.bits & 0xff) as u8) - } -} -impl W { - #[doc = "Bits 0:7 - Maximum number of bytes in transmit buffer"] - #[inline(always)] - #[must_use] - pub fn maxcnt(&mut self) -> MAXCNT_W<0> { - MAXCNT_W::new(self) - } - #[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 = "Maximum number of bytes in transmit buffer\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 [maxcnt](index.html) module"] -pub struct MAXCNT_SPEC; -impl crate::RegisterSpec for MAXCNT_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [maxcnt::R](R) reader structure"] -impl crate::Readable for MAXCNT_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [maxcnt::W](W) writer structure"] -impl crate::Writable for MAXCNT_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets MAXCNT to value 0"] -impl crate::Resettable for MAXCNT_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/uarte0/txd/ptr.rs b/down-the-stack/dk_pac/src/uarte0/txd/ptr.rs deleted file mode 100644 index 2f2c926..0000000 --- a/down-the-stack/dk_pac/src/uarte0/txd/ptr.rs +++ /dev/null @@ -1,80 +0,0 @@ -#[doc = "Register `PTR` 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 `PTR` 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 `PTR` reader - Data pointer"] -pub type PTR_R = crate::FieldReader; -#[doc = "Field `PTR` writer - Data pointer"] -pub type PTR_W<'a, const O: u8> = crate::FieldWriter<'a, u32, PTR_SPEC, u32, u32, 32, O>; -impl R { - #[doc = "Bits 0:31 - Data pointer"] - #[inline(always)] - pub fn ptr(&self) -> PTR_R { - PTR_R::new(self.bits) - } -} -impl W { - #[doc = "Bits 0:31 - Data pointer"] - #[inline(always)] - #[must_use] - pub fn ptr(&mut self) -> PTR_W<0> { - PTR_W::new(self) - } - #[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 = "Data pointer\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 [ptr](index.html) module"] -pub struct PTR_SPEC; -impl crate::RegisterSpec for PTR_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [ptr::R](R) reader structure"] -impl crate::Readable for PTR_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [ptr::W](W) writer structure"] -impl crate::Writable for PTR_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets PTR to value 0"] -impl crate::Resettable for PTR_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/uicr.rs b/down-the-stack/dk_pac/src/uicr.rs deleted file mode 100644 index 4ffaec6..0000000 --- a/down-the-stack/dk_pac/src/uicr.rs +++ /dev/null @@ -1,42 +0,0 @@ -#[doc = r"Register block"] -#[repr(C)] -pub struct RegisterBlock { - _reserved0: [u8; 0x14], - #[doc = "0x14..0x50 - Description collection: Reserved for Nordic firmware design"] - pub nrffw: [NRFFW; 15], - #[doc = "0x50..0x80 - Description collection: Reserved for Nordic hardware design"] - pub nrfhw: [NRFHW; 12], - #[doc = "0x80..0x100 - Description collection: Reserved for customer"] - pub customer: [CUSTOMER; 32], - _reserved3: [u8; 0x0100], - #[doc = "0x200..0x208 - Description collection: Mapping of the nRESET function (see POWER chapter for details)"] - pub pselreset: [PSELRESET; 2], - #[doc = "0x208 - Access port protection"] - pub approtect: APPROTECT, - #[doc = "0x20c - Setting of pins dedicated to NFC functionality: NFC antenna or GPIO"] - pub nfcpins: NFCPINS, -} -#[doc = "NRFFW (rw) register accessor: an alias for `Reg`"] -pub type NRFFW = crate::Reg; -#[doc = "Description collection: Reserved for Nordic firmware design"] -pub mod nrffw; -#[doc = "NRFHW (rw) register accessor: an alias for `Reg`"] -pub type NRFHW = crate::Reg; -#[doc = "Description collection: Reserved for Nordic hardware design"] -pub mod nrfhw; -#[doc = "CUSTOMER (rw) register accessor: an alias for `Reg`"] -pub type CUSTOMER = crate::Reg; -#[doc = "Description collection: Reserved for customer"] -pub mod customer; -#[doc = "PSELRESET (rw) register accessor: an alias for `Reg`"] -pub type PSELRESET = crate::Reg; -#[doc = "Description collection: Mapping of the nRESET function (see POWER chapter for details)"] -pub mod pselreset; -#[doc = "APPROTECT (rw) register accessor: an alias for `Reg`"] -pub type APPROTECT = crate::Reg; -#[doc = "Access port protection"] -pub mod approtect; -#[doc = "NFCPINS (rw) register accessor: an alias for `Reg`"] -pub type NFCPINS = crate::Reg; -#[doc = "Setting of pins dedicated to NFC functionality: NFC antenna or GPIO"] -pub mod nfcpins; diff --git a/down-the-stack/dk_pac/src/uicr/approtect.rs b/down-the-stack/dk_pac/src/uicr/approtect.rs deleted file mode 100644 index df212ec..0000000 --- a/down-the-stack/dk_pac/src/uicr/approtect.rs +++ /dev/null @@ -1,141 +0,0 @@ -#[doc = "Register `APPROTECT` 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 `APPROTECT` 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 `PALL` reader - Enable or disable access port protection."] -pub type PALL_R = crate::FieldReader; -#[doc = "Enable or disable access port protection.\n\nValue on reset: 255"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -#[repr(u8)] -pub enum PALL_A { - #[doc = "255: Hardware disable of access port protection for devices where access port protection is controlled by hardware"] - DISABLED = 255, - #[doc = "90: Hardware disable of access port protection for devices where access port protection is controlled by hardware and software"] - HW_DISABLED = 90, - #[doc = "0: Enable"] - ENABLED = 0, -} -impl From for u8 { - #[inline(always)] - fn from(variant: PALL_A) -> Self { - variant as _ - } -} -impl PALL_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> Option { - match self.bits { - 255 => Some(PALL_A::DISABLED), - 90 => Some(PALL_A::HW_DISABLED), - 0 => Some(PALL_A::ENABLED), - _ => None, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == PALL_A::DISABLED - } - #[doc = "Checks if the value of the field is `HW_DISABLED`"] - #[inline(always)] - pub fn is_hw_disabled(&self) -> bool { - *self == PALL_A::HW_DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == PALL_A::ENABLED - } -} -#[doc = "Field `PALL` writer - Enable or disable access port protection."] -pub type PALL_W<'a, const O: u8> = crate::FieldWriter<'a, u32, APPROTECT_SPEC, u8, PALL_A, 8, O>; -impl<'a, const O: u8> PALL_W<'a, O> { - #[doc = "Hardware disable of access port protection for devices where access port protection is controlled by hardware"] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(PALL_A::DISABLED) - } - #[doc = "Hardware disable of access port protection for devices where access port protection is controlled by hardware and software"] - #[inline(always)] - pub fn hw_disabled(self) -> &'a mut W { - self.variant(PALL_A::HW_DISABLED) - } - #[doc = "Enable"] - #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(PALL_A::ENABLED) - } -} -impl R { - #[doc = "Bits 0:7 - Enable or disable access port protection."] - #[inline(always)] - pub fn pall(&self) -> PALL_R { - PALL_R::new((self.bits & 0xff) as u8) - } -} -impl W { - #[doc = "Bits 0:7 - Enable or disable access port protection."] - #[inline(always)] - #[must_use] - pub fn pall(&mut self) -> PALL_W<0> { - PALL_W::new(self) - } - #[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 = "Access port protection\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 [approtect](index.html) module"] -pub struct APPROTECT_SPEC; -impl crate::RegisterSpec for APPROTECT_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [approtect::R](R) reader structure"] -impl crate::Readable for APPROTECT_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [approtect::W](W) writer structure"] -impl crate::Writable for APPROTECT_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets APPROTECT to value 0xffff_ffff"] -impl crate::Resettable for APPROTECT_SPEC { - const RESET_VALUE: Self::Ux = 0xffff_ffff; -} diff --git a/down-the-stack/dk_pac/src/uicr/customer.rs b/down-the-stack/dk_pac/src/uicr/customer.rs deleted file mode 100644 index 0142ff9..0000000 --- a/down-the-stack/dk_pac/src/uicr/customer.rs +++ /dev/null @@ -1,81 +0,0 @@ -#[doc = "Register `CUSTOMER[%s]` 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 `CUSTOMER[%s]` 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 `CUSTOMER` reader - Reserved for customer"] -pub type CUSTOMER_R = crate::FieldReader; -#[doc = "Field `CUSTOMER` writer - Reserved for customer"] -pub type CUSTOMER_W<'a, const O: u8> = crate::FieldWriter<'a, u32, CUSTOMER_SPEC, u32, u32, 32, O>; -impl R { - #[doc = "Bits 0:31 - Reserved for customer"] - #[inline(always)] - pub fn customer(&self) -> CUSTOMER_R { - CUSTOMER_R::new(self.bits) - } -} -impl W { - #[doc = "Bits 0:31 - Reserved for customer"] - #[inline(always)] - #[must_use] - pub fn customer(&mut self) -> CUSTOMER_W<0> { - CUSTOMER_W::new(self) - } - #[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 = "Description collection: Reserved for customer\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 [customer](index.html) module"] -pub struct CUSTOMER_SPEC; -impl crate::RegisterSpec for CUSTOMER_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [customer::R](R) reader structure"] -impl crate::Readable for CUSTOMER_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [customer::W](W) writer structure"] -impl crate::Writable for CUSTOMER_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets CUSTOMER[%s] -to value 0xffff_ffff"] -impl crate::Resettable for CUSTOMER_SPEC { - const RESET_VALUE: Self::Ux = 0xffff_ffff; -} diff --git a/down-the-stack/dk_pac/src/uicr/nfcpins.rs b/down-the-stack/dk_pac/src/uicr/nfcpins.rs deleted file mode 100644 index 57d421e..0000000 --- a/down-the-stack/dk_pac/src/uicr/nfcpins.rs +++ /dev/null @@ -1,126 +0,0 @@ -#[doc = "Register `NFCPINS` 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 `NFCPINS` 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 `PROTECT` reader - Setting of pins dedicated to NFC functionality"] -pub type PROTECT_R = crate::BitReader; -#[doc = "Setting of pins dedicated to NFC functionality\n\nValue on reset: 1"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum PROTECT_A { - #[doc = "0: Operation as GPIO pins. Same protection as normal GPIO pins."] - DISABLED = 0, - #[doc = "1: Operation as NFC antenna pins. Configures the protection for NFC operation."] - NFC = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: PROTECT_A) -> Self { - variant as u8 != 0 - } -} -impl PROTECT_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> PROTECT_A { - match self.bits { - false => PROTECT_A::DISABLED, - true => PROTECT_A::NFC, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == PROTECT_A::DISABLED - } - #[doc = "Checks if the value of the field is `NFC`"] - #[inline(always)] - pub fn is_nfc(&self) -> bool { - *self == PROTECT_A::NFC - } -} -#[doc = "Field `PROTECT` writer - Setting of pins dedicated to NFC functionality"] -pub type PROTECT_W<'a, const O: u8> = crate::BitWriter<'a, u32, NFCPINS_SPEC, PROTECT_A, O>; -impl<'a, const O: u8> PROTECT_W<'a, O> { - #[doc = "Operation as GPIO pins. Same protection as normal GPIO pins."] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(PROTECT_A::DISABLED) - } - #[doc = "Operation as NFC antenna pins. Configures the protection for NFC operation."] - #[inline(always)] - pub fn nfc(self) -> &'a mut W { - self.variant(PROTECT_A::NFC) - } -} -impl R { - #[doc = "Bit 0 - Setting of pins dedicated to NFC functionality"] - #[inline(always)] - pub fn protect(&self) -> PROTECT_R { - PROTECT_R::new((self.bits & 1) != 0) - } -} -impl W { - #[doc = "Bit 0 - Setting of pins dedicated to NFC functionality"] - #[inline(always)] - #[must_use] - pub fn protect(&mut self) -> PROTECT_W<0> { - PROTECT_W::new(self) - } - #[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 = "Setting of pins dedicated to NFC functionality: NFC antenna or GPIO\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 [nfcpins](index.html) module"] -pub struct NFCPINS_SPEC; -impl crate::RegisterSpec for NFCPINS_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [nfcpins::R](R) reader structure"] -impl crate::Readable for NFCPINS_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [nfcpins::W](W) writer structure"] -impl crate::Writable for NFCPINS_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets NFCPINS to value 0xffff_ffff"] -impl crate::Resettable for NFCPINS_SPEC { - const RESET_VALUE: Self::Ux = 0xffff_ffff; -} diff --git a/down-the-stack/dk_pac/src/uicr/nrffw.rs b/down-the-stack/dk_pac/src/uicr/nrffw.rs deleted file mode 100644 index 4f313db..0000000 --- a/down-the-stack/dk_pac/src/uicr/nrffw.rs +++ /dev/null @@ -1,81 +0,0 @@ -#[doc = "Register `NRFFW[%s]` 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 `NRFFW[%s]` 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 `NRFFW` reader - Reserved for Nordic firmware design"] -pub type NRFFW_R = crate::FieldReader; -#[doc = "Field `NRFFW` writer - Reserved for Nordic firmware design"] -pub type NRFFW_W<'a, const O: u8> = crate::FieldWriter<'a, u32, NRFFW_SPEC, u32, u32, 32, O>; -impl R { - #[doc = "Bits 0:31 - Reserved for Nordic firmware design"] - #[inline(always)] - pub fn nrffw(&self) -> NRFFW_R { - NRFFW_R::new(self.bits) - } -} -impl W { - #[doc = "Bits 0:31 - Reserved for Nordic firmware design"] - #[inline(always)] - #[must_use] - pub fn nrffw(&mut self) -> NRFFW_W<0> { - NRFFW_W::new(self) - } - #[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 = "Description collection: Reserved for Nordic firmware design\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 [nrffw](index.html) module"] -pub struct NRFFW_SPEC; -impl crate::RegisterSpec for NRFFW_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [nrffw::R](R) reader structure"] -impl crate::Readable for NRFFW_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [nrffw::W](W) writer structure"] -impl crate::Writable for NRFFW_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets NRFFW[%s] -to value 0xffff_ffff"] -impl crate::Resettable for NRFFW_SPEC { - const RESET_VALUE: Self::Ux = 0xffff_ffff; -} diff --git a/down-the-stack/dk_pac/src/uicr/nrfhw.rs b/down-the-stack/dk_pac/src/uicr/nrfhw.rs deleted file mode 100644 index 99f3f49..0000000 --- a/down-the-stack/dk_pac/src/uicr/nrfhw.rs +++ /dev/null @@ -1,81 +0,0 @@ -#[doc = "Register `NRFHW[%s]` 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 `NRFHW[%s]` 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 `NRFHW` reader - Reserved for Nordic hardware design"] -pub type NRFHW_R = crate::FieldReader; -#[doc = "Field `NRFHW` writer - Reserved for Nordic hardware design"] -pub type NRFHW_W<'a, const O: u8> = crate::FieldWriter<'a, u32, NRFHW_SPEC, u32, u32, 32, O>; -impl R { - #[doc = "Bits 0:31 - Reserved for Nordic hardware design"] - #[inline(always)] - pub fn nrfhw(&self) -> NRFHW_R { - NRFHW_R::new(self.bits) - } -} -impl W { - #[doc = "Bits 0:31 - Reserved for Nordic hardware design"] - #[inline(always)] - #[must_use] - pub fn nrfhw(&mut self) -> NRFHW_W<0> { - NRFHW_W::new(self) - } - #[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 = "Description collection: Reserved for Nordic hardware design\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 [nrfhw](index.html) module"] -pub struct NRFHW_SPEC; -impl crate::RegisterSpec for NRFHW_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [nrfhw::R](R) reader structure"] -impl crate::Readable for NRFHW_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [nrfhw::W](W) writer structure"] -impl crate::Writable for NRFHW_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets NRFHW[%s] -to value 0xffff_ffff"] -impl crate::Resettable for NRFHW_SPEC { - const RESET_VALUE: Self::Ux = 0xffff_ffff; -} diff --git a/down-the-stack/dk_pac/src/uicr/pselreset.rs b/down-the-stack/dk_pac/src/uicr/pselreset.rs deleted file mode 100644 index 7150cff..0000000 --- a/down-the-stack/dk_pac/src/uicr/pselreset.rs +++ /dev/null @@ -1,142 +0,0 @@ -#[doc = "Register `PSELRESET[%s]` 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 `PSELRESET[%s]` 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 `PIN` reader - GPIO number P0.n onto which Reset is exposed"] -pub type PIN_R = crate::FieldReader; -#[doc = "Field `PIN` writer - GPIO number P0.n onto which Reset is exposed"] -pub type PIN_W<'a, const O: u8> = crate::FieldWriter<'a, u32, PSELRESET_SPEC, u8, u8, 6, O>; -#[doc = "Field `CONNECT` reader - Connection"] -pub type CONNECT_R = crate::BitReader; -#[doc = "Connection\n\nValue on reset: 1"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum CONNECT_A { - #[doc = "1: Disconnect"] - DISCONNECTED = 1, - #[doc = "0: Connect"] - CONNECTED = 0, -} -impl From for bool { - #[inline(always)] - fn from(variant: CONNECT_A) -> Self { - variant as u8 != 0 - } -} -impl CONNECT_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> CONNECT_A { - match self.bits { - true => CONNECT_A::DISCONNECTED, - false => CONNECT_A::CONNECTED, - } - } - #[doc = "Checks if the value of the field is `DISCONNECTED`"] - #[inline(always)] - pub fn is_disconnected(&self) -> bool { - *self == CONNECT_A::DISCONNECTED - } - #[doc = "Checks if the value of the field is `CONNECTED`"] - #[inline(always)] - pub fn is_connected(&self) -> bool { - *self == CONNECT_A::CONNECTED - } -} -#[doc = "Field `CONNECT` writer - Connection"] -pub type CONNECT_W<'a, const O: u8> = crate::BitWriter<'a, u32, PSELRESET_SPEC, CONNECT_A, O>; -impl<'a, const O: u8> CONNECT_W<'a, O> { - #[doc = "Disconnect"] - #[inline(always)] - pub fn disconnected(self) -> &'a mut W { - self.variant(CONNECT_A::DISCONNECTED) - } - #[doc = "Connect"] - #[inline(always)] - pub fn connected(self) -> &'a mut W { - self.variant(CONNECT_A::CONNECTED) - } -} -impl R { - #[doc = "Bits 0:5 - GPIO number P0.n onto which Reset is exposed"] - #[inline(always)] - pub fn pin(&self) -> PIN_R { - PIN_R::new((self.bits & 0x3f) as u8) - } - #[doc = "Bit 31 - Connection"] - #[inline(always)] - pub fn connect(&self) -> CONNECT_R { - CONNECT_R::new(((self.bits >> 31) & 1) != 0) - } -} -impl W { - #[doc = "Bits 0:5 - GPIO number P0.n onto which Reset is exposed"] - #[inline(always)] - #[must_use] - pub fn pin(&mut self) -> PIN_W<0> { - PIN_W::new(self) - } - #[doc = "Bit 31 - Connection"] - #[inline(always)] - #[must_use] - pub fn connect(&mut self) -> CONNECT_W<31> { - CONNECT_W::new(self) - } - #[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 = "Description collection: Mapping of the nRESET function (see POWER chapter for details)\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 [pselreset](index.html) module"] -pub struct PSELRESET_SPEC; -impl crate::RegisterSpec for PSELRESET_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [pselreset::R](R) reader structure"] -impl crate::Readable for PSELRESET_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [pselreset::W](W) writer structure"] -impl crate::Writable for PSELRESET_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets PSELRESET[%s] -to value 0xffff_ffff"] -impl crate::Resettable for PSELRESET_SPEC { - const RESET_VALUE: Self::Ux = 0xffff_ffff; -} diff --git a/down-the-stack/dk_pac/src/wdt.rs b/down-the-stack/dk_pac/src/wdt.rs deleted file mode 100644 index e912d40..0000000 --- a/down-the-stack/dk_pac/src/wdt.rs +++ /dev/null @@ -1,69 +0,0 @@ -#[doc = r"Register block"] -#[repr(C)] -pub struct RegisterBlock { - #[doc = "0x00 - Start the watchdog"] - pub tasks_start: TASKS_START, - _reserved1: [u8; 0xfc], - #[doc = "0x100 - Watchdog timeout"] - pub events_timeout: EVENTS_TIMEOUT, - _reserved2: [u8; 0x0200], - #[doc = "0x304 - Enable interrupt"] - pub intenset: INTENSET, - #[doc = "0x308 - Disable interrupt"] - pub intenclr: INTENCLR, - _reserved4: [u8; 0xf4], - #[doc = "0x400 - Run status"] - pub runstatus: RUNSTATUS, - #[doc = "0x404 - Request status"] - pub reqstatus: REQSTATUS, - _reserved6: [u8; 0xfc], - #[doc = "0x504 - Counter reload value"] - pub crv: CRV, - #[doc = "0x508 - Enable register for reload request registers"] - pub rren: RREN, - #[doc = "0x50c - Configuration register"] - pub config: CONFIG, - _reserved9: [u8; 0xf0], - #[doc = "0x600..0x620 - Description collection: Reload request n"] - pub rr: [RR; 8], -} -#[doc = "TASKS_START (w) register accessor: an alias for `Reg`"] -pub type TASKS_START = crate::Reg; -#[doc = "Start the watchdog"] -pub mod tasks_start; -#[doc = "EVENTS_TIMEOUT (rw) register accessor: an alias for `Reg`"] -pub type EVENTS_TIMEOUT = crate::Reg; -#[doc = "Watchdog timeout"] -pub mod events_timeout; -#[doc = "INTENSET (rw) register accessor: an alias for `Reg`"] -pub type INTENSET = crate::Reg; -#[doc = "Enable interrupt"] -pub mod intenset; -#[doc = "INTENCLR (rw) register accessor: an alias for `Reg`"] -pub type INTENCLR = crate::Reg; -#[doc = "Disable interrupt"] -pub mod intenclr; -#[doc = "RUNSTATUS (r) register accessor: an alias for `Reg`"] -pub type RUNSTATUS = crate::Reg; -#[doc = "Run status"] -pub mod runstatus; -#[doc = "REQSTATUS (r) register accessor: an alias for `Reg`"] -pub type REQSTATUS = crate::Reg; -#[doc = "Request status"] -pub mod reqstatus; -#[doc = "CRV (rw) register accessor: an alias for `Reg`"] -pub type CRV = crate::Reg; -#[doc = "Counter reload value"] -pub mod crv; -#[doc = "RREN (rw) register accessor: an alias for `Reg`"] -pub type RREN = crate::Reg; -#[doc = "Enable register for reload request registers"] -pub mod rren; -#[doc = "CONFIG (rw) register accessor: an alias for `Reg`"] -pub type CONFIG = crate::Reg; -#[doc = "Configuration register"] -pub mod config; -#[doc = "RR (w) register accessor: an alias for `Reg`"] -pub type RR = crate::Reg; -#[doc = "Description collection: Reload request n"] -pub mod rr; diff --git a/down-the-stack/dk_pac/src/wdt/config.rs b/down-the-stack/dk_pac/src/wdt/config.rs deleted file mode 100644 index e29a9c8..0000000 --- a/down-the-stack/dk_pac/src/wdt/config.rs +++ /dev/null @@ -1,187 +0,0 @@ -#[doc = "Register `CONFIG` 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 `CONFIG` 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 `SLEEP` reader - Configure the watchdog to either be paused, or kept running, while the CPU is sleeping"] -pub type SLEEP_R = crate::BitReader; -#[doc = "Configure the watchdog to either be paused, or kept running, while the CPU is sleeping\n\nValue on reset: 1"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum SLEEP_A { - #[doc = "0: Pause watchdog while the CPU is sleeping"] - PAUSE = 0, - #[doc = "1: Keep the watchdog running while the CPU is sleeping"] - RUN = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: SLEEP_A) -> Self { - variant as u8 != 0 - } -} -impl SLEEP_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> SLEEP_A { - match self.bits { - false => SLEEP_A::PAUSE, - true => SLEEP_A::RUN, - } - } - #[doc = "Checks if the value of the field is `PAUSE`"] - #[inline(always)] - pub fn is_pause(&self) -> bool { - *self == SLEEP_A::PAUSE - } - #[doc = "Checks if the value of the field is `RUN`"] - #[inline(always)] - pub fn is_run(&self) -> bool { - *self == SLEEP_A::RUN - } -} -#[doc = "Field `SLEEP` writer - Configure the watchdog to either be paused, or kept running, while the CPU is sleeping"] -pub type SLEEP_W<'a, const O: u8> = crate::BitWriter<'a, u32, CONFIG_SPEC, SLEEP_A, O>; -impl<'a, const O: u8> SLEEP_W<'a, O> { - #[doc = "Pause watchdog while the CPU is sleeping"] - #[inline(always)] - pub fn pause(self) -> &'a mut W { - self.variant(SLEEP_A::PAUSE) - } - #[doc = "Keep the watchdog running while the CPU is sleeping"] - #[inline(always)] - pub fn run(self) -> &'a mut W { - self.variant(SLEEP_A::RUN) - } -} -#[doc = "Field `HALT` reader - Configure the watchdog to either be paused, or kept running, while the CPU is halted by the debugger"] -pub type HALT_R = crate::BitReader; -#[doc = "Configure the watchdog to either be paused, or kept running, while the CPU is halted by the debugger\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum HALT_A { - #[doc = "0: Pause watchdog while the CPU is halted by the debugger"] - PAUSE = 0, - #[doc = "1: Keep the watchdog running while the CPU is halted by the debugger"] - RUN = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: HALT_A) -> Self { - variant as u8 != 0 - } -} -impl HALT_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> HALT_A { - match self.bits { - false => HALT_A::PAUSE, - true => HALT_A::RUN, - } - } - #[doc = "Checks if the value of the field is `PAUSE`"] - #[inline(always)] - pub fn is_pause(&self) -> bool { - *self == HALT_A::PAUSE - } - #[doc = "Checks if the value of the field is `RUN`"] - #[inline(always)] - pub fn is_run(&self) -> bool { - *self == HALT_A::RUN - } -} -#[doc = "Field `HALT` writer - Configure the watchdog to either be paused, or kept running, while the CPU is halted by the debugger"] -pub type HALT_W<'a, const O: u8> = crate::BitWriter<'a, u32, CONFIG_SPEC, HALT_A, O>; -impl<'a, const O: u8> HALT_W<'a, O> { - #[doc = "Pause watchdog while the CPU is halted by the debugger"] - #[inline(always)] - pub fn pause(self) -> &'a mut W { - self.variant(HALT_A::PAUSE) - } - #[doc = "Keep the watchdog running while the CPU is halted by the debugger"] - #[inline(always)] - pub fn run(self) -> &'a mut W { - self.variant(HALT_A::RUN) - } -} -impl R { - #[doc = "Bit 0 - Configure the watchdog to either be paused, or kept running, while the CPU is sleeping"] - #[inline(always)] - pub fn sleep(&self) -> SLEEP_R { - SLEEP_R::new((self.bits & 1) != 0) - } - #[doc = "Bit 3 - Configure the watchdog to either be paused, or kept running, while the CPU is halted by the debugger"] - #[inline(always)] - pub fn halt(&self) -> HALT_R { - HALT_R::new(((self.bits >> 3) & 1) != 0) - } -} -impl W { - #[doc = "Bit 0 - Configure the watchdog to either be paused, or kept running, while the CPU is sleeping"] - #[inline(always)] - #[must_use] - pub fn sleep(&mut self) -> SLEEP_W<0> { - SLEEP_W::new(self) - } - #[doc = "Bit 3 - Configure the watchdog to either be paused, or kept running, while the CPU is halted by the debugger"] - #[inline(always)] - #[must_use] - pub fn halt(&mut self) -> HALT_W<3> { - HALT_W::new(self) - } - #[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 = "Configuration register\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 [config](index.html) module"] -pub struct CONFIG_SPEC; -impl crate::RegisterSpec for CONFIG_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [config::R](R) reader structure"] -impl crate::Readable for CONFIG_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [config::W](W) writer structure"] -impl crate::Writable for 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 CONFIG to value 0x01"] -impl crate::Resettable for CONFIG_SPEC { - const RESET_VALUE: Self::Ux = 0x01; -} diff --git a/down-the-stack/dk_pac/src/wdt/crv.rs b/down-the-stack/dk_pac/src/wdt/crv.rs deleted file mode 100644 index 320c57b..0000000 --- a/down-the-stack/dk_pac/src/wdt/crv.rs +++ /dev/null @@ -1,80 +0,0 @@ -#[doc = "Register `CRV` 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 `CRV` 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 `CRV` reader - Counter reload value in number of cycles of the 32.768 kHz clock"] -pub type CRV_R = crate::FieldReader; -#[doc = "Field `CRV` writer - Counter reload value in number of cycles of the 32.768 kHz clock"] -pub type CRV_W<'a, const O: u8> = crate::FieldWriter<'a, u32, CRV_SPEC, u32, u32, 32, O>; -impl R { - #[doc = "Bits 0:31 - Counter reload value in number of cycles of the 32.768 kHz clock"] - #[inline(always)] - pub fn crv(&self) -> CRV_R { - CRV_R::new(self.bits) - } -} -impl W { - #[doc = "Bits 0:31 - Counter reload value in number of cycles of the 32.768 kHz clock"] - #[inline(always)] - #[must_use] - pub fn crv(&mut self) -> CRV_W<0> { - CRV_W::new(self) - } - #[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 = "Counter reload value\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 [crv](index.html) module"] -pub struct CRV_SPEC; -impl crate::RegisterSpec for CRV_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [crv::R](R) reader structure"] -impl crate::Readable for CRV_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [crv::W](W) writer structure"] -impl crate::Writable for CRV_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets CRV to value 0xffff_ffff"] -impl crate::Resettable for CRV_SPEC { - const RESET_VALUE: Self::Ux = 0xffff_ffff; -} diff --git a/down-the-stack/dk_pac/src/wdt/events_timeout.rs b/down-the-stack/dk_pac/src/wdt/events_timeout.rs deleted file mode 100644 index bd35395..0000000 --- a/down-the-stack/dk_pac/src/wdt/events_timeout.rs +++ /dev/null @@ -1,127 +0,0 @@ -#[doc = "Register `EVENTS_TIMEOUT` 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 `EVENTS_TIMEOUT` 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 `EVENTS_TIMEOUT` reader - Watchdog timeout"] -pub type EVENTS_TIMEOUT_R = crate::BitReader; -#[doc = "Watchdog timeout\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum EVENTS_TIMEOUT_A { - #[doc = "0: Event not generated"] - NOT_GENERATED = 0, - #[doc = "1: Event generated"] - GENERATED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: EVENTS_TIMEOUT_A) -> Self { - variant as u8 != 0 - } -} -impl EVENTS_TIMEOUT_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> EVENTS_TIMEOUT_A { - match self.bits { - false => EVENTS_TIMEOUT_A::NOT_GENERATED, - true => EVENTS_TIMEOUT_A::GENERATED, - } - } - #[doc = "Checks if the value of the field is `NOT_GENERATED`"] - #[inline(always)] - pub fn is_not_generated(&self) -> bool { - *self == EVENTS_TIMEOUT_A::NOT_GENERATED - } - #[doc = "Checks if the value of the field is `GENERATED`"] - #[inline(always)] - pub fn is_generated(&self) -> bool { - *self == EVENTS_TIMEOUT_A::GENERATED - } -} -#[doc = "Field `EVENTS_TIMEOUT` writer - Watchdog timeout"] -pub type EVENTS_TIMEOUT_W<'a, const O: u8> = - crate::BitWriter<'a, u32, EVENTS_TIMEOUT_SPEC, EVENTS_TIMEOUT_A, O>; -impl<'a, const O: u8> EVENTS_TIMEOUT_W<'a, O> { - #[doc = "Event not generated"] - #[inline(always)] - pub fn not_generated(self) -> &'a mut W { - self.variant(EVENTS_TIMEOUT_A::NOT_GENERATED) - } - #[doc = "Event generated"] - #[inline(always)] - pub fn generated(self) -> &'a mut W { - self.variant(EVENTS_TIMEOUT_A::GENERATED) - } -} -impl R { - #[doc = "Bit 0 - Watchdog timeout"] - #[inline(always)] - pub fn events_timeout(&self) -> EVENTS_TIMEOUT_R { - EVENTS_TIMEOUT_R::new((self.bits & 1) != 0) - } -} -impl W { - #[doc = "Bit 0 - Watchdog timeout"] - #[inline(always)] - #[must_use] - pub fn events_timeout(&mut self) -> EVENTS_TIMEOUT_W<0> { - EVENTS_TIMEOUT_W::new(self) - } - #[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 = "Watchdog timeout\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 [events_timeout](index.html) module"] -pub struct EVENTS_TIMEOUT_SPEC; -impl crate::RegisterSpec for EVENTS_TIMEOUT_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [events_timeout::R](R) reader structure"] -impl crate::Readable for EVENTS_TIMEOUT_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [events_timeout::W](W) writer structure"] -impl crate::Writable for EVENTS_TIMEOUT_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets EVENTS_TIMEOUT to value 0"] -impl crate::Resettable for EVENTS_TIMEOUT_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/wdt/intenclr.rs b/down-the-stack/dk_pac/src/wdt/intenclr.rs deleted file mode 100644 index a6e662e..0000000 --- a/down-the-stack/dk_pac/src/wdt/intenclr.rs +++ /dev/null @@ -1,133 +0,0 @@ -#[doc = "Register `INTENCLR` 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 `INTENCLR` 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 `TIMEOUT` reader - Write '1' to disable interrupt for event TIMEOUT"] -pub type TIMEOUT_R = crate::BitReader; -#[doc = "Write '1' to disable interrupt for event TIMEOUT\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum TIMEOUT_A { - #[doc = "0: Read: Disabled"] - DISABLED = 0, - #[doc = "1: Read: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: TIMEOUT_A) -> Self { - variant as u8 != 0 - } -} -impl TIMEOUT_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> TIMEOUT_A { - match self.bits { - false => TIMEOUT_A::DISABLED, - true => TIMEOUT_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == TIMEOUT_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == TIMEOUT_A::ENABLED - } -} -#[doc = "Write '1' to disable interrupt for event TIMEOUT\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum TIMEOUT_AW { - #[doc = "1: Disable"] - CLEAR = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: TIMEOUT_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `TIMEOUT` writer - Write '1' to disable interrupt for event TIMEOUT"] -pub type TIMEOUT_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENCLR_SPEC, TIMEOUT_AW, O>; -impl<'a, const O: u8> TIMEOUT_W<'a, O> { - #[doc = "Disable"] - #[inline(always)] - pub fn clear(self) -> &'a mut W { - self.variant(TIMEOUT_AW::CLEAR) - } -} -impl R { - #[doc = "Bit 0 - Write '1' to disable interrupt for event TIMEOUT"] - #[inline(always)] - pub fn timeout(&self) -> TIMEOUT_R { - TIMEOUT_R::new((self.bits & 1) != 0) - } -} -impl W { - #[doc = "Bit 0 - Write '1' to disable interrupt for event TIMEOUT"] - #[inline(always)] - #[must_use] - pub fn timeout(&mut self) -> TIMEOUT_W<0> { - TIMEOUT_W::new(self) - } - #[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 = "Disable interrupt\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 [intenclr](index.html) module"] -pub struct INTENCLR_SPEC; -impl crate::RegisterSpec for INTENCLR_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [intenclr::R](R) reader structure"] -impl crate::Readable for INTENCLR_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [intenclr::W](W) writer structure"] -impl crate::Writable for INTENCLR_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets INTENCLR to value 0"] -impl crate::Resettable for INTENCLR_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/wdt/intenset.rs b/down-the-stack/dk_pac/src/wdt/intenset.rs deleted file mode 100644 index 7059933..0000000 --- a/down-the-stack/dk_pac/src/wdt/intenset.rs +++ /dev/null @@ -1,133 +0,0 @@ -#[doc = "Register `INTENSET` 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 `INTENSET` 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 `TIMEOUT` reader - Write '1' to enable interrupt for event TIMEOUT"] -pub type TIMEOUT_R = crate::BitReader; -#[doc = "Write '1' to enable interrupt for event TIMEOUT\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum TIMEOUT_A { - #[doc = "0: Read: Disabled"] - DISABLED = 0, - #[doc = "1: Read: Enabled"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: TIMEOUT_A) -> Self { - variant as u8 != 0 - } -} -impl TIMEOUT_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> TIMEOUT_A { - match self.bits { - false => TIMEOUT_A::DISABLED, - true => TIMEOUT_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == TIMEOUT_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == TIMEOUT_A::ENABLED - } -} -#[doc = "Write '1' to enable interrupt for event TIMEOUT\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum TIMEOUT_AW { - #[doc = "1: Enable"] - SET = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: TIMEOUT_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `TIMEOUT` writer - Write '1' to enable interrupt for event TIMEOUT"] -pub type TIMEOUT_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENSET_SPEC, TIMEOUT_AW, O>; -impl<'a, const O: u8> TIMEOUT_W<'a, O> { - #[doc = "Enable"] - #[inline(always)] - pub fn set(self) -> &'a mut W { - self.variant(TIMEOUT_AW::SET) - } -} -impl R { - #[doc = "Bit 0 - Write '1' to enable interrupt for event TIMEOUT"] - #[inline(always)] - pub fn timeout(&self) -> TIMEOUT_R { - TIMEOUT_R::new((self.bits & 1) != 0) - } -} -impl W { - #[doc = "Bit 0 - Write '1' to enable interrupt for event TIMEOUT"] - #[inline(always)] - #[must_use] - pub fn timeout(&mut self) -> TIMEOUT_W<0> { - TIMEOUT_W::new(self) - } - #[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 = "Enable interrupt\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 [intenset](index.html) module"] -pub struct INTENSET_SPEC; -impl crate::RegisterSpec for INTENSET_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [intenset::R](R) reader structure"] -impl crate::Readable for INTENSET_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [intenset::W](W) writer structure"] -impl crate::Writable for INTENSET_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets INTENSET to value 0"] -impl crate::Resettable for INTENSET_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/wdt/reqstatus.rs b/down-the-stack/dk_pac/src/wdt/reqstatus.rs deleted file mode 100644 index ea23e10..0000000 --- a/down-the-stack/dk_pac/src/wdt/reqstatus.rs +++ /dev/null @@ -1,398 +0,0 @@ -#[doc = "Register `REQSTATUS` 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 = "Field `RR0` reader - Request status for RR\\[0\\] -register"] -pub type RR0_R = crate::BitReader; -#[doc = "Request status for RR\\[0\\] -register\n\nValue on reset: 1"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum RR0_A { - #[doc = "0: RR\\[0\\] -register is not enabled, or are already requesting reload"] - DISABLED_OR_REQUESTED = 0, - #[doc = "1: RR\\[0\\] -register is enabled, and are not yet requesting reload"] - ENABLED_AND_UNREQUESTED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: RR0_A) -> Self { - variant as u8 != 0 - } -} -impl RR0_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> RR0_A { - match self.bits { - false => RR0_A::DISABLED_OR_REQUESTED, - true => RR0_A::ENABLED_AND_UNREQUESTED, - } - } - #[doc = "Checks if the value of the field is `DISABLED_OR_REQUESTED`"] - #[inline(always)] - pub fn is_disabled_or_requested(&self) -> bool { - *self == RR0_A::DISABLED_OR_REQUESTED - } - #[doc = "Checks if the value of the field is `ENABLED_AND_UNREQUESTED`"] - #[inline(always)] - pub fn is_enabled_and_unrequested(&self) -> bool { - *self == RR0_A::ENABLED_AND_UNREQUESTED - } -} -#[doc = "Field `RR1` reader - Request status for RR\\[1\\] -register"] -pub type RR1_R = crate::BitReader; -#[doc = "Request status for RR\\[1\\] -register\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum RR1_A { - #[doc = "0: RR\\[1\\] -register is not enabled, or are already requesting reload"] - DISABLED_OR_REQUESTED = 0, - #[doc = "1: RR\\[1\\] -register is enabled, and are not yet requesting reload"] - ENABLED_AND_UNREQUESTED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: RR1_A) -> Self { - variant as u8 != 0 - } -} -impl RR1_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> RR1_A { - match self.bits { - false => RR1_A::DISABLED_OR_REQUESTED, - true => RR1_A::ENABLED_AND_UNREQUESTED, - } - } - #[doc = "Checks if the value of the field is `DISABLED_OR_REQUESTED`"] - #[inline(always)] - pub fn is_disabled_or_requested(&self) -> bool { - *self == RR1_A::DISABLED_OR_REQUESTED - } - #[doc = "Checks if the value of the field is `ENABLED_AND_UNREQUESTED`"] - #[inline(always)] - pub fn is_enabled_and_unrequested(&self) -> bool { - *self == RR1_A::ENABLED_AND_UNREQUESTED - } -} -#[doc = "Field `RR2` reader - Request status for RR\\[2\\] -register"] -pub type RR2_R = crate::BitReader; -#[doc = "Request status for RR\\[2\\] -register\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum RR2_A { - #[doc = "0: RR\\[2\\] -register is not enabled, or are already requesting reload"] - DISABLED_OR_REQUESTED = 0, - #[doc = "1: RR\\[2\\] -register is enabled, and are not yet requesting reload"] - ENABLED_AND_UNREQUESTED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: RR2_A) -> Self { - variant as u8 != 0 - } -} -impl RR2_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> RR2_A { - match self.bits { - false => RR2_A::DISABLED_OR_REQUESTED, - true => RR2_A::ENABLED_AND_UNREQUESTED, - } - } - #[doc = "Checks if the value of the field is `DISABLED_OR_REQUESTED`"] - #[inline(always)] - pub fn is_disabled_or_requested(&self) -> bool { - *self == RR2_A::DISABLED_OR_REQUESTED - } - #[doc = "Checks if the value of the field is `ENABLED_AND_UNREQUESTED`"] - #[inline(always)] - pub fn is_enabled_and_unrequested(&self) -> bool { - *self == RR2_A::ENABLED_AND_UNREQUESTED - } -} -#[doc = "Field `RR3` reader - Request status for RR\\[3\\] -register"] -pub type RR3_R = crate::BitReader; -#[doc = "Request status for RR\\[3\\] -register\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum RR3_A { - #[doc = "0: RR\\[3\\] -register is not enabled, or are already requesting reload"] - DISABLED_OR_REQUESTED = 0, - #[doc = "1: RR\\[3\\] -register is enabled, and are not yet requesting reload"] - ENABLED_AND_UNREQUESTED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: RR3_A) -> Self { - variant as u8 != 0 - } -} -impl RR3_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> RR3_A { - match self.bits { - false => RR3_A::DISABLED_OR_REQUESTED, - true => RR3_A::ENABLED_AND_UNREQUESTED, - } - } - #[doc = "Checks if the value of the field is `DISABLED_OR_REQUESTED`"] - #[inline(always)] - pub fn is_disabled_or_requested(&self) -> bool { - *self == RR3_A::DISABLED_OR_REQUESTED - } - #[doc = "Checks if the value of the field is `ENABLED_AND_UNREQUESTED`"] - #[inline(always)] - pub fn is_enabled_and_unrequested(&self) -> bool { - *self == RR3_A::ENABLED_AND_UNREQUESTED - } -} -#[doc = "Field `RR4` reader - Request status for RR\\[4\\] -register"] -pub type RR4_R = crate::BitReader; -#[doc = "Request status for RR\\[4\\] -register\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum RR4_A { - #[doc = "0: RR\\[4\\] -register is not enabled, or are already requesting reload"] - DISABLED_OR_REQUESTED = 0, - #[doc = "1: RR\\[4\\] -register is enabled, and are not yet requesting reload"] - ENABLED_AND_UNREQUESTED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: RR4_A) -> Self { - variant as u8 != 0 - } -} -impl RR4_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> RR4_A { - match self.bits { - false => RR4_A::DISABLED_OR_REQUESTED, - true => RR4_A::ENABLED_AND_UNREQUESTED, - } - } - #[doc = "Checks if the value of the field is `DISABLED_OR_REQUESTED`"] - #[inline(always)] - pub fn is_disabled_or_requested(&self) -> bool { - *self == RR4_A::DISABLED_OR_REQUESTED - } - #[doc = "Checks if the value of the field is `ENABLED_AND_UNREQUESTED`"] - #[inline(always)] - pub fn is_enabled_and_unrequested(&self) -> bool { - *self == RR4_A::ENABLED_AND_UNREQUESTED - } -} -#[doc = "Field `RR5` reader - Request status for RR\\[5\\] -register"] -pub type RR5_R = crate::BitReader; -#[doc = "Request status for RR\\[5\\] -register\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum RR5_A { - #[doc = "0: RR\\[5\\] -register is not enabled, or are already requesting reload"] - DISABLED_OR_REQUESTED = 0, - #[doc = "1: RR\\[5\\] -register is enabled, and are not yet requesting reload"] - ENABLED_AND_UNREQUESTED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: RR5_A) -> Self { - variant as u8 != 0 - } -} -impl RR5_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> RR5_A { - match self.bits { - false => RR5_A::DISABLED_OR_REQUESTED, - true => RR5_A::ENABLED_AND_UNREQUESTED, - } - } - #[doc = "Checks if the value of the field is `DISABLED_OR_REQUESTED`"] - #[inline(always)] - pub fn is_disabled_or_requested(&self) -> bool { - *self == RR5_A::DISABLED_OR_REQUESTED - } - #[doc = "Checks if the value of the field is `ENABLED_AND_UNREQUESTED`"] - #[inline(always)] - pub fn is_enabled_and_unrequested(&self) -> bool { - *self == RR5_A::ENABLED_AND_UNREQUESTED - } -} -#[doc = "Field `RR6` reader - Request status for RR\\[6\\] -register"] -pub type RR6_R = crate::BitReader; -#[doc = "Request status for RR\\[6\\] -register\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum RR6_A { - #[doc = "0: RR\\[6\\] -register is not enabled, or are already requesting reload"] - DISABLED_OR_REQUESTED = 0, - #[doc = "1: RR\\[6\\] -register is enabled, and are not yet requesting reload"] - ENABLED_AND_UNREQUESTED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: RR6_A) -> Self { - variant as u8 != 0 - } -} -impl RR6_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> RR6_A { - match self.bits { - false => RR6_A::DISABLED_OR_REQUESTED, - true => RR6_A::ENABLED_AND_UNREQUESTED, - } - } - #[doc = "Checks if the value of the field is `DISABLED_OR_REQUESTED`"] - #[inline(always)] - pub fn is_disabled_or_requested(&self) -> bool { - *self == RR6_A::DISABLED_OR_REQUESTED - } - #[doc = "Checks if the value of the field is `ENABLED_AND_UNREQUESTED`"] - #[inline(always)] - pub fn is_enabled_and_unrequested(&self) -> bool { - *self == RR6_A::ENABLED_AND_UNREQUESTED - } -} -#[doc = "Field `RR7` reader - Request status for RR\\[7\\] -register"] -pub type RR7_R = crate::BitReader; -#[doc = "Request status for RR\\[7\\] -register\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum RR7_A { - #[doc = "0: RR\\[7\\] -register is not enabled, or are already requesting reload"] - DISABLED_OR_REQUESTED = 0, - #[doc = "1: RR\\[7\\] -register is enabled, and are not yet requesting reload"] - ENABLED_AND_UNREQUESTED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: RR7_A) -> Self { - variant as u8 != 0 - } -} -impl RR7_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> RR7_A { - match self.bits { - false => RR7_A::DISABLED_OR_REQUESTED, - true => RR7_A::ENABLED_AND_UNREQUESTED, - } - } - #[doc = "Checks if the value of the field is `DISABLED_OR_REQUESTED`"] - #[inline(always)] - pub fn is_disabled_or_requested(&self) -> bool { - *self == RR7_A::DISABLED_OR_REQUESTED - } - #[doc = "Checks if the value of the field is `ENABLED_AND_UNREQUESTED`"] - #[inline(always)] - pub fn is_enabled_and_unrequested(&self) -> bool { - *self == RR7_A::ENABLED_AND_UNREQUESTED - } -} -impl R { - #[doc = "Bit 0 - Request status for RR\\[0\\] -register"] - #[inline(always)] - pub fn rr0(&self) -> RR0_R { - RR0_R::new((self.bits & 1) != 0) - } - #[doc = "Bit 1 - Request status for RR\\[1\\] -register"] - #[inline(always)] - pub fn rr1(&self) -> RR1_R { - RR1_R::new(((self.bits >> 1) & 1) != 0) - } - #[doc = "Bit 2 - Request status for RR\\[2\\] -register"] - #[inline(always)] - pub fn rr2(&self) -> RR2_R { - RR2_R::new(((self.bits >> 2) & 1) != 0) - } - #[doc = "Bit 3 - Request status for RR\\[3\\] -register"] - #[inline(always)] - pub fn rr3(&self) -> RR3_R { - RR3_R::new(((self.bits >> 3) & 1) != 0) - } - #[doc = "Bit 4 - Request status for RR\\[4\\] -register"] - #[inline(always)] - pub fn rr4(&self) -> RR4_R { - RR4_R::new(((self.bits >> 4) & 1) != 0) - } - #[doc = "Bit 5 - Request status for RR\\[5\\] -register"] - #[inline(always)] - pub fn rr5(&self) -> RR5_R { - RR5_R::new(((self.bits >> 5) & 1) != 0) - } - #[doc = "Bit 6 - Request status for RR\\[6\\] -register"] - #[inline(always)] - pub fn rr6(&self) -> RR6_R { - RR6_R::new(((self.bits >> 6) & 1) != 0) - } - #[doc = "Bit 7 - Request status for RR\\[7\\] -register"] - #[inline(always)] - pub fn rr7(&self) -> RR7_R { - RR7_R::new(((self.bits >> 7) & 1) != 0) - } -} -#[doc = "Request 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 [reqstatus](index.html) module"] -pub struct REQSTATUS_SPEC; -impl crate::RegisterSpec for REQSTATUS_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [reqstatus::R](R) reader structure"] -impl crate::Readable for REQSTATUS_SPEC { - type Reader = R; -} -#[doc = "`reset()` method sets REQSTATUS to value 0x01"] -impl crate::Resettable for REQSTATUS_SPEC { - const RESET_VALUE: Self::Ux = 0x01; -} diff --git a/down-the-stack/dk_pac/src/wdt/rr.rs b/down-the-stack/dk_pac/src/wdt/rr.rs deleted file mode 100644 index 10722df..0000000 --- a/down-the-stack/dk_pac/src/wdt/rr.rs +++ /dev/null @@ -1,73 +0,0 @@ -#[doc = "Register `RR[%s]` 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 = "Reload request register\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -#[repr(u32)] -pub enum RR_AW { - #[doc = "1850885685: Value to request a reload of the watchdog timer"] - RELOAD = 1850885685, -} -impl From for u32 { - #[inline(always)] - fn from(variant: RR_AW) -> Self { - variant as _ - } -} -#[doc = "Field `RR` writer - Reload request register"] -pub type RR_W<'a, const O: u8> = crate::FieldWriter<'a, u32, RR_SPEC, u32, RR_AW, 32, O>; -impl<'a, const O: u8> RR_W<'a, O> { - #[doc = "Value to request a reload of the watchdog timer"] - #[inline(always)] - pub fn reload(self) -> &'a mut W { - self.variant(RR_AW::RELOAD) - } -} -impl W { - #[doc = "Bits 0:31 - Reload request register"] - #[inline(always)] - #[must_use] - pub fn rr(&mut self) -> RR_W<0> { - RR_W::new(self) - } - #[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 = "Description collection: Reload request n\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 [rr](index.html) module"] -pub struct RR_SPEC; -impl crate::RegisterSpec for RR_SPEC { - type Ux = u32; -} -#[doc = "`write(|w| ..)` method takes [rr::W](W) writer structure"] -impl crate::Writable for RR_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets RR[%s] -to value 0"] -impl crate::Resettable for RR_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/wdt/rren.rs b/down-the-stack/dk_pac/src/wdt/rren.rs deleted file mode 100644 index 101a4e6..0000000 --- a/down-the-stack/dk_pac/src/wdt/rren.rs +++ /dev/null @@ -1,625 +0,0 @@ -#[doc = "Register `RREN` 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 `RREN` 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 `RR0` reader - Enable or disable RR\\[0\\] -register"] -pub type RR0_R = crate::BitReader; -#[doc = "Enable or disable RR\\[0\\] -register\n\nValue on reset: 1"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum RR0_A { - #[doc = "0: Disable RR\\[0\\] -register"] - DISABLED = 0, - #[doc = "1: Enable RR\\[0\\] -register"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: RR0_A) -> Self { - variant as u8 != 0 - } -} -impl RR0_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> RR0_A { - match self.bits { - false => RR0_A::DISABLED, - true => RR0_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == RR0_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == RR0_A::ENABLED - } -} -#[doc = "Field `RR0` writer - Enable or disable RR\\[0\\] -register"] -pub type RR0_W<'a, const O: u8> = crate::BitWriter<'a, u32, RREN_SPEC, RR0_A, O>; -impl<'a, const O: u8> RR0_W<'a, O> { - #[doc = "Disable RR\\[0\\] -register"] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(RR0_A::DISABLED) - } - #[doc = "Enable RR\\[0\\] -register"] - #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(RR0_A::ENABLED) - } -} -#[doc = "Field `RR1` reader - Enable or disable RR\\[1\\] -register"] -pub type RR1_R = crate::BitReader; -#[doc = "Enable or disable RR\\[1\\] -register\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum RR1_A { - #[doc = "0: Disable RR\\[1\\] -register"] - DISABLED = 0, - #[doc = "1: Enable RR\\[1\\] -register"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: RR1_A) -> Self { - variant as u8 != 0 - } -} -impl RR1_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> RR1_A { - match self.bits { - false => RR1_A::DISABLED, - true => RR1_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == RR1_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == RR1_A::ENABLED - } -} -#[doc = "Field `RR1` writer - Enable or disable RR\\[1\\] -register"] -pub type RR1_W<'a, const O: u8> = crate::BitWriter<'a, u32, RREN_SPEC, RR1_A, O>; -impl<'a, const O: u8> RR1_W<'a, O> { - #[doc = "Disable RR\\[1\\] -register"] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(RR1_A::DISABLED) - } - #[doc = "Enable RR\\[1\\] -register"] - #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(RR1_A::ENABLED) - } -} -#[doc = "Field `RR2` reader - Enable or disable RR\\[2\\] -register"] -pub type RR2_R = crate::BitReader; -#[doc = "Enable or disable RR\\[2\\] -register\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum RR2_A { - #[doc = "0: Disable RR\\[2\\] -register"] - DISABLED = 0, - #[doc = "1: Enable RR\\[2\\] -register"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: RR2_A) -> Self { - variant as u8 != 0 - } -} -impl RR2_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> RR2_A { - match self.bits { - false => RR2_A::DISABLED, - true => RR2_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == RR2_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == RR2_A::ENABLED - } -} -#[doc = "Field `RR2` writer - Enable or disable RR\\[2\\] -register"] -pub type RR2_W<'a, const O: u8> = crate::BitWriter<'a, u32, RREN_SPEC, RR2_A, O>; -impl<'a, const O: u8> RR2_W<'a, O> { - #[doc = "Disable RR\\[2\\] -register"] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(RR2_A::DISABLED) - } - #[doc = "Enable RR\\[2\\] -register"] - #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(RR2_A::ENABLED) - } -} -#[doc = "Field `RR3` reader - Enable or disable RR\\[3\\] -register"] -pub type RR3_R = crate::BitReader; -#[doc = "Enable or disable RR\\[3\\] -register\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum RR3_A { - #[doc = "0: Disable RR\\[3\\] -register"] - DISABLED = 0, - #[doc = "1: Enable RR\\[3\\] -register"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: RR3_A) -> Self { - variant as u8 != 0 - } -} -impl RR3_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> RR3_A { - match self.bits { - false => RR3_A::DISABLED, - true => RR3_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == RR3_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == RR3_A::ENABLED - } -} -#[doc = "Field `RR3` writer - Enable or disable RR\\[3\\] -register"] -pub type RR3_W<'a, const O: u8> = crate::BitWriter<'a, u32, RREN_SPEC, RR3_A, O>; -impl<'a, const O: u8> RR3_W<'a, O> { - #[doc = "Disable RR\\[3\\] -register"] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(RR3_A::DISABLED) - } - #[doc = "Enable RR\\[3\\] -register"] - #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(RR3_A::ENABLED) - } -} -#[doc = "Field `RR4` reader - Enable or disable RR\\[4\\] -register"] -pub type RR4_R = crate::BitReader; -#[doc = "Enable or disable RR\\[4\\] -register\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum RR4_A { - #[doc = "0: Disable RR\\[4\\] -register"] - DISABLED = 0, - #[doc = "1: Enable RR\\[4\\] -register"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: RR4_A) -> Self { - variant as u8 != 0 - } -} -impl RR4_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> RR4_A { - match self.bits { - false => RR4_A::DISABLED, - true => RR4_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == RR4_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == RR4_A::ENABLED - } -} -#[doc = "Field `RR4` writer - Enable or disable RR\\[4\\] -register"] -pub type RR4_W<'a, const O: u8> = crate::BitWriter<'a, u32, RREN_SPEC, RR4_A, O>; -impl<'a, const O: u8> RR4_W<'a, O> { - #[doc = "Disable RR\\[4\\] -register"] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(RR4_A::DISABLED) - } - #[doc = "Enable RR\\[4\\] -register"] - #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(RR4_A::ENABLED) - } -} -#[doc = "Field `RR5` reader - Enable or disable RR\\[5\\] -register"] -pub type RR5_R = crate::BitReader; -#[doc = "Enable or disable RR\\[5\\] -register\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum RR5_A { - #[doc = "0: Disable RR\\[5\\] -register"] - DISABLED = 0, - #[doc = "1: Enable RR\\[5\\] -register"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: RR5_A) -> Self { - variant as u8 != 0 - } -} -impl RR5_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> RR5_A { - match self.bits { - false => RR5_A::DISABLED, - true => RR5_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == RR5_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == RR5_A::ENABLED - } -} -#[doc = "Field `RR5` writer - Enable or disable RR\\[5\\] -register"] -pub type RR5_W<'a, const O: u8> = crate::BitWriter<'a, u32, RREN_SPEC, RR5_A, O>; -impl<'a, const O: u8> RR5_W<'a, O> { - #[doc = "Disable RR\\[5\\] -register"] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(RR5_A::DISABLED) - } - #[doc = "Enable RR\\[5\\] -register"] - #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(RR5_A::ENABLED) - } -} -#[doc = "Field `RR6` reader - Enable or disable RR\\[6\\] -register"] -pub type RR6_R = crate::BitReader; -#[doc = "Enable or disable RR\\[6\\] -register\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum RR6_A { - #[doc = "0: Disable RR\\[6\\] -register"] - DISABLED = 0, - #[doc = "1: Enable RR\\[6\\] -register"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: RR6_A) -> Self { - variant as u8 != 0 - } -} -impl RR6_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> RR6_A { - match self.bits { - false => RR6_A::DISABLED, - true => RR6_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == RR6_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == RR6_A::ENABLED - } -} -#[doc = "Field `RR6` writer - Enable or disable RR\\[6\\] -register"] -pub type RR6_W<'a, const O: u8> = crate::BitWriter<'a, u32, RREN_SPEC, RR6_A, O>; -impl<'a, const O: u8> RR6_W<'a, O> { - #[doc = "Disable RR\\[6\\] -register"] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(RR6_A::DISABLED) - } - #[doc = "Enable RR\\[6\\] -register"] - #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(RR6_A::ENABLED) - } -} -#[doc = "Field `RR7` reader - Enable or disable RR\\[7\\] -register"] -pub type RR7_R = crate::BitReader; -#[doc = "Enable or disable RR\\[7\\] -register\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum RR7_A { - #[doc = "0: Disable RR\\[7\\] -register"] - DISABLED = 0, - #[doc = "1: Enable RR\\[7\\] -register"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: RR7_A) -> Self { - variant as u8 != 0 - } -} -impl RR7_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> RR7_A { - match self.bits { - false => RR7_A::DISABLED, - true => RR7_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - *self == RR7_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - *self == RR7_A::ENABLED - } -} -#[doc = "Field `RR7` writer - Enable or disable RR\\[7\\] -register"] -pub type RR7_W<'a, const O: u8> = crate::BitWriter<'a, u32, RREN_SPEC, RR7_A, O>; -impl<'a, const O: u8> RR7_W<'a, O> { - #[doc = "Disable RR\\[7\\] -register"] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(RR7_A::DISABLED) - } - #[doc = "Enable RR\\[7\\] -register"] - #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(RR7_A::ENABLED) - } -} -impl R { - #[doc = "Bit 0 - Enable or disable RR\\[0\\] -register"] - #[inline(always)] - pub fn rr0(&self) -> RR0_R { - RR0_R::new((self.bits & 1) != 0) - } - #[doc = "Bit 1 - Enable or disable RR\\[1\\] -register"] - #[inline(always)] - pub fn rr1(&self) -> RR1_R { - RR1_R::new(((self.bits >> 1) & 1) != 0) - } - #[doc = "Bit 2 - Enable or disable RR\\[2\\] -register"] - #[inline(always)] - pub fn rr2(&self) -> RR2_R { - RR2_R::new(((self.bits >> 2) & 1) != 0) - } - #[doc = "Bit 3 - Enable or disable RR\\[3\\] -register"] - #[inline(always)] - pub fn rr3(&self) -> RR3_R { - RR3_R::new(((self.bits >> 3) & 1) != 0) - } - #[doc = "Bit 4 - Enable or disable RR\\[4\\] -register"] - #[inline(always)] - pub fn rr4(&self) -> RR4_R { - RR4_R::new(((self.bits >> 4) & 1) != 0) - } - #[doc = "Bit 5 - Enable or disable RR\\[5\\] -register"] - #[inline(always)] - pub fn rr5(&self) -> RR5_R { - RR5_R::new(((self.bits >> 5) & 1) != 0) - } - #[doc = "Bit 6 - Enable or disable RR\\[6\\] -register"] - #[inline(always)] - pub fn rr6(&self) -> RR6_R { - RR6_R::new(((self.bits >> 6) & 1) != 0) - } - #[doc = "Bit 7 - Enable or disable RR\\[7\\] -register"] - #[inline(always)] - pub fn rr7(&self) -> RR7_R { - RR7_R::new(((self.bits >> 7) & 1) != 0) - } -} -impl W { - #[doc = "Bit 0 - Enable or disable RR\\[0\\] -register"] - #[inline(always)] - #[must_use] - pub fn rr0(&mut self) -> RR0_W<0> { - RR0_W::new(self) - } - #[doc = "Bit 1 - Enable or disable RR\\[1\\] -register"] - #[inline(always)] - #[must_use] - pub fn rr1(&mut self) -> RR1_W<1> { - RR1_W::new(self) - } - #[doc = "Bit 2 - Enable or disable RR\\[2\\] -register"] - #[inline(always)] - #[must_use] - pub fn rr2(&mut self) -> RR2_W<2> { - RR2_W::new(self) - } - #[doc = "Bit 3 - Enable or disable RR\\[3\\] -register"] - #[inline(always)] - #[must_use] - pub fn rr3(&mut self) -> RR3_W<3> { - RR3_W::new(self) - } - #[doc = "Bit 4 - Enable or disable RR\\[4\\] -register"] - #[inline(always)] - #[must_use] - pub fn rr4(&mut self) -> RR4_W<4> { - RR4_W::new(self) - } - #[doc = "Bit 5 - Enable or disable RR\\[5\\] -register"] - #[inline(always)] - #[must_use] - pub fn rr5(&mut self) -> RR5_W<5> { - RR5_W::new(self) - } - #[doc = "Bit 6 - Enable or disable RR\\[6\\] -register"] - #[inline(always)] - #[must_use] - pub fn rr6(&mut self) -> RR6_W<6> { - RR6_W::new(self) - } - #[doc = "Bit 7 - Enable or disable RR\\[7\\] -register"] - #[inline(always)] - #[must_use] - pub fn rr7(&mut self) -> RR7_W<7> { - RR7_W::new(self) - } - #[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 = "Enable register for reload request registers\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 [rren](index.html) module"] -pub struct RREN_SPEC; -impl crate::RegisterSpec for RREN_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [rren::R](R) reader structure"] -impl crate::Readable for RREN_SPEC { - type Reader = R; -} -#[doc = "`write(|w| ..)` method takes [rren::W](W) writer structure"] -impl crate::Writable for RREN_SPEC { - type Writer = W; - const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; - const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; -} -#[doc = "`reset()` method sets RREN to value 0x01"] -impl crate::Resettable for RREN_SPEC { - const RESET_VALUE: Self::Ux = 0x01; -} diff --git a/down-the-stack/dk_pac/src/wdt/runstatus.rs b/down-the-stack/dk_pac/src/wdt/runstatus.rs deleted file mode 100644 index 9340f16..0000000 --- a/down-the-stack/dk_pac/src/wdt/runstatus.rs +++ /dev/null @@ -1,71 +0,0 @@ -#[doc = "Register `RUNSTATUS` 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 = "Field `RUNSTATUS` reader - Indicates whether or not the watchdog is running"] -pub type RUNSTATUS_R = crate::BitReader; -#[doc = "Indicates whether or not the watchdog is running\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum RUNSTATUS_A { - #[doc = "0: Watchdog not running"] - NOT_RUNNING = 0, - #[doc = "1: Watchdog is running"] - RUNNING = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: RUNSTATUS_A) -> Self { - variant as u8 != 0 - } -} -impl RUNSTATUS_R { - #[doc = "Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> RUNSTATUS_A { - match self.bits { - false => RUNSTATUS_A::NOT_RUNNING, - true => RUNSTATUS_A::RUNNING, - } - } - #[doc = "Checks if the value of the field is `NOT_RUNNING`"] - #[inline(always)] - pub fn is_not_running(&self) -> bool { - *self == RUNSTATUS_A::NOT_RUNNING - } - #[doc = "Checks if the value of the field is `RUNNING`"] - #[inline(always)] - pub fn is_running(&self) -> bool { - *self == RUNSTATUS_A::RUNNING - } -} -impl R { - #[doc = "Bit 0 - Indicates whether or not the watchdog is running"] - #[inline(always)] - pub fn runstatus(&self) -> RUNSTATUS_R { - RUNSTATUS_R::new((self.bits & 1) != 0) - } -} -#[doc = "Run 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 [runstatus](index.html) module"] -pub struct RUNSTATUS_SPEC; -impl crate::RegisterSpec for RUNSTATUS_SPEC { - type Ux = u32; -} -#[doc = "`read()` method returns [runstatus::R](R) reader structure"] -impl crate::Readable for RUNSTATUS_SPEC { - type Reader = R; -} -#[doc = "`reset()` method sets RUNSTATUS to value 0"] -impl crate::Resettable for RUNSTATUS_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/down-the-stack/dk_pac/src/wdt/tasks_start.rs b/down-the-stack/dk_pac/src/wdt/tasks_start.rs deleted file mode 100644 index e2ee469..0000000 --- a/down-the-stack/dk_pac/src/wdt/tasks_start.rs +++ /dev/null @@ -1,72 +0,0 @@ -#[doc = "Register `TASKS_START` 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 = "Start the watchdog\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum TASKS_START_AW { - #[doc = "1: Trigger task"] - TRIGGER = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: TASKS_START_AW) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `TASKS_START` writer - Start the watchdog"] -pub type TASKS_START_W<'a, const O: u8> = - crate::BitWriter<'a, u32, TASKS_START_SPEC, TASKS_START_AW, O>; -impl<'a, const O: u8> TASKS_START_W<'a, O> { - #[doc = "Trigger task"] - #[inline(always)] - pub fn trigger(self) -> &'a mut W { - self.variant(TASKS_START_AW::TRIGGER) - } -} -impl W { - #[doc = "Bit 0 - Start the watchdog"] - #[inline(always)] - #[must_use] - pub fn tasks_start(&mut self) -> TASKS_START_W<0> { - TASKS_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 - } -} -#[doc = "Start the watchdog\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 [tasks_start](index.html) module"] -pub struct TASKS_START_SPEC; -impl crate::RegisterSpec for TASKS_START_SPEC { - type Ux = u32; -} -#[doc = "`write(|w| ..)` method takes [tasks_start::W](W) writer structure"] -impl crate::Writable for TASKS_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 TASKS_START to value 0"] -impl crate::Resettable for TASKS_START_SPEC { - const RESET_VALUE: Self::Ux = 0; -} diff --git a/embedded-workshop-book/src/enabling-uarte.md b/embedded-workshop-book/src/enabling-uarte.md index 014fbdd..90e93cb 100644 --- a/embedded-workshop-book/src/enabling-uarte.md +++ b/embedded-workshop-book/src/enabling-uarte.md @@ -94,7 +94,7 @@ uarte.enable.write(|w| w.enable().enabled()); ### Step 6: Disable the peripheral unsafely by writing raw bits into the register. -Write 0 into the register to disable it. Call the helper function once more and run your code. Compare your output with the expected output on top of this page. +Write 0 into the register to disable it by passing the closure `|w| w.bits(0x00 as u32)` to the `write()` method. This action is unsafe, so it needs to be in an unsafe block. Call the helper function once more and run your code. Compare your output with the expected output on top of this page. ```rust unsafe { From 2c2358a333d4e78f5135333ef28d784aa2c3057e Mon Sep 17 00:00:00 2001 From: Mirabellensaft Date: Tue, 14 Mar 2023 14:33:18 +0100 Subject: [PATCH 15/42] corrections --- embedded-workshop-book/src/enabling-uarte.md | 6 +++--- embedded-workshop-book/src/pac-docs.md | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/embedded-workshop-book/src/enabling-uarte.md b/embedded-workshop-book/src/enabling-uarte.md index 90e93cb..8926582 100644 --- a/embedded-workshop-book/src/enabling-uarte.md +++ b/embedded-workshop-book/src/enabling-uarte.md @@ -1,10 +1,10 @@ # Enabling the UARTE0 peripheral -Write a simple program which uses the PAC to enable the UART. See how writing arbitrary values to the ENABLE field in the ENABLE register is unsafe, because only values 0 or 8 should be used. +Write a simple program which uses the PAC to enable the UARTE0. See how writing arbitrary values to the ENABLE field in the ENABLE register is unsafe, because only values 0 or 8 should be used. ## In this exercise you will learn how to: * to safely write into a register -* how to unsafely write into a register +* how to write raw bits into a register * how to read a register ## Prerequisites @@ -27,7 +27,7 @@ Uarte0 is disabled. ``` Find the starter code in `down-the-stack/apps/uarte_enable.rs` -Find the full solution in `down-the-stack/apps/uarte_enable_solution.rs` +Find the full solution in `down-the-stack/solutions/uarte_enable.rs` ## Step-by-Step Solution diff --git a/embedded-workshop-book/src/pac-docs.md b/embedded-workshop-book/src/pac-docs.md index 4d208bc..b5e10bd 100644 --- a/embedded-workshop-book/src/pac-docs.md +++ b/embedded-workshop-book/src/pac-docs.md @@ -33,7 +33,7 @@ Note the difference between the struct field `UARTE0` in `Peripherals` and the m ## Finding corresponding sections in the PAC -* `dk_pac/src/lib.rs` defines the single peripherals with their register block addresses and contains a struct defintion for the `struct Peripherals`. There are two methods for this struct: `take()` and `steal()`. `take()` assures, that only one instance of this can exist. Hence, it's safe. Note that `take()` is only available with the `critical-section` feature enabled. +* `dk_pac/src/lib.rs` defines the single peripherals with their register block addresses and contains a struct definition for the `struct Peripherals`. There are two methods for this struct: `take()` and `steal()`. `take()` assures, that only one instance of this can exist. Hence, it's safe. Note that `take()` is only available with the `critical-section` feature enabled. * `dk_pac/src/uarte0.rs` defines a struct that contains all the registers of the `UARTE0` register block. The `enable` field represents the register of the same name. From 3e1dca1d4b0f6d69a87f2525eb48b97989ae64eb Mon Sep 17 00:00:00 2001 From: Mirabellensaft Date: Tue, 14 Mar 2023 18:15:53 +0100 Subject: [PATCH 16/42] address review issues --- embedded-workshop-book/src/generating-pac.md | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/embedded-workshop-book/src/generating-pac.md b/embedded-workshop-book/src/generating-pac.md index ae22952..cc68c3d 100644 --- a/embedded-workshop-book/src/generating-pac.md +++ b/embedded-workshop-book/src/generating-pac.md @@ -13,8 +13,8 @@ Generate your own PAC from an SVD file. ## Tasks * Install `svd2rust` and `form` via cargo. -* Download the [nrf-svd] file and place it into `down-the-stack/dk-pac`. -* Run svd2rust on the file using the `cortex-m` flag. +* Download the [nrf-svd][svd] file and place it into `down-the-stack/dk-pac`. +* Run `svd2rust` on the file using the `cortex-m` flag. * Format the generated file to make it readable. * Split the file into its modules using `form`. * Check the documentation. @@ -29,7 +29,7 @@ cargo install svd2rust cargo install form ``` -✅ Download https://github.com/NordicSemiconductor/nrfx/blob/master/mdk/nrf52.svd (This version has an error: writeonce needs to be changed to writeOnce) +✅ Download [nrf-svd][svd](This version has an error: writeonce needs to be changed to writeOnce) Place the file into `down-the-stack/dk-pac`. Note how we provide a `Cargo.toml` file, as it will not be generated by svd2rust. ✅ In the terminal, go to the file's location. Run `svd2rust` with the SVD file to generate a PAC using the `cortex-m` flag. @@ -42,6 +42,8 @@ If you check the folder `down-the-stack/dk-pac` now, you see three new files: * device.x - linker sections(?) * build.rs - linker script +✅ Make an `/src` and move the generated `lib.rs` into it. + ✅ Open the generated `lib.rs` with an editor. Notice how it's barely correctly formatted. @@ -54,14 +56,12 @@ cargo doc --open ✅ Format the crate using `cargo fmt`. This does not change to the docs, but `lib.rs` is a bit more readable. - ✅ Use form to process the `lib.rs` to split it into modules, so that each module in in it's own file. ```terminal form -i src/lib.rs -o src/ ``` -✅ Re-run `cargo fmt`. +✅ Re-run `cargo fmt`. - -[nrf svd]: (https://github.com/NordicSemiconductor/nrfx/blob/master/mdk/nrf52.svd ) \ No newline at end of file +[svd]: (https://github.com/NordicSemiconductor/nrfx/blob/master/mdk/nrf52.svd ) \ No newline at end of file From 3e62747e71009dca8ce4e8cc1ce210bdc1952b3b Mon Sep 17 00:00:00 2001 From: Mirabellensaft Date: Tue, 21 Mar 2023 18:05:19 +0100 Subject: [PATCH 17/42] add readme --- down-the-stack/README.md | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 down-the-stack/README.md diff --git a/down-the-stack/README.md b/down-the-stack/README.md new file mode 100644 index 0000000..27c054b --- /dev/null +++ b/down-the-stack/README.md @@ -0,0 +1,22 @@ +# Down the Stack + +This folder contains all relevant exercise templates, demo code and solutions for the exercises in the `Down the Stack` session. + +## `apps` package +* `button.rs` - demo code for the BSC exercise +* `hello.rs` - for testing as described in the BSC exercise +* `uarte_print.rs` - demo code for the BSC exercise +* `uarte_enable.rs` - exercise template for PAC exercise + +## `dk_bsc` package +* `lib.rs` - exercise template for the BSC exercise +* `lib_solution.rs` - solution code to the BSC exercise + +## `dk_pac` package +* `Cargo.toml` - a `Cargo.toml` file for the to be generated PAC +* `nrf52.svd` - an SVD file for generating the PAC + +You will generate the remaining files during the training + +## `solutions` package +* `uarte_enable.rs` - contains the solution for the PAC exercise \ No newline at end of file From da3ef096430cdca79087b2c0db255886707a48c0 Mon Sep 17 00:00:00 2001 From: Mirabellensaft Date: Tue, 21 Mar 2023 18:11:31 +0100 Subject: [PATCH 18/42] rename package --- down-the-stack/solutions/Cargo.toml | 2 +- down-the-stack/solutions/src/bin/uarte_enable.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/down-the-stack/solutions/Cargo.toml b/down-the-stack/solutions/Cargo.toml index 06950f5..b728c4e 100644 --- a/down-the-stack/solutions/Cargo.toml +++ b/down-the-stack/solutions/Cargo.toml @@ -2,7 +2,7 @@ authors = ["Tanks Transfeld "] edition = "2018" license = "MIT OR Apache-2.0" -name = "uarte_enable_solution" +name = "solutions" version = "0.0.0" [dependencies] diff --git a/down-the-stack/solutions/src/bin/uarte_enable.rs b/down-the-stack/solutions/src/bin/uarte_enable.rs index 010d0d4..794235d 100644 --- a/down-the-stack/solutions/src/bin/uarte_enable.rs +++ b/down-the-stack/solutions/src/bin/uarte_enable.rs @@ -6,7 +6,7 @@ use cortex_m_rt::entry; use dk_pac::UARTE0; // this imports `down-the-stack/apps/lib.rs` to retrieve our global logger + panicking-behavior -use uarte_enable_solution as _; +use solutions as _; use defmt; use defmt_rtt as _; // global logger From 14247f51e7767488ac3113a723c7489f77011556 Mon Sep 17 00:00:00 2001 From: Mirabellensaft Date: Tue, 21 Mar 2023 18:13:13 +0100 Subject: [PATCH 19/42] add warning --- down-the-stack/solutions/src/lib.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/down-the-stack/solutions/src/lib.rs b/down-the-stack/solutions/src/lib.rs index 3446a8d..83c2b23 100644 --- a/down-the-stack/solutions/src/lib.rs +++ b/down-the-stack/solutions/src/lib.rs @@ -1,5 +1,6 @@ #![no_std] +// ⚠️ ⚠️ ⚠️ Don't change this file! ⚠️ ⚠️ ⚠️ so it's exactly like apps/src/lib.rs use panic_probe as _; // same panicking *behavior* as `panic-probe` but doesn't print a panic message From 747edc5cb64837ac88c08a021365efbdd63f91a9 Mon Sep 17 00:00:00 2001 From: Tanks Transfeld Date: Tue, 21 Mar 2023 18:13:45 +0100 Subject: [PATCH 20/42] Update down-the-stack/solutions/src/bin/uarte_enable.rs Co-authored-by: Jonathan Pallant --- down-the-stack/solutions/src/bin/uarte_enable.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/down-the-stack/solutions/src/bin/uarte_enable.rs b/down-the-stack/solutions/src/bin/uarte_enable.rs index 794235d..8e7fa08 100644 --- a/down-the-stack/solutions/src/bin/uarte_enable.rs +++ b/down-the-stack/solutions/src/bin/uarte_enable.rs @@ -28,7 +28,7 @@ fn main() -> ! { // disable the UART0 peripheral by writing 0 directly into the register -- the unsafe way unsafe { - uarte.enable.write(|w| w.bits(0x00 as u32)); + uarte.enable.write(|w| w.bits(0x00u32)); } is_uarte_enabled(&uarte); From ab0e10661e9f79072908cd3fdd9a2a1b15761ecd Mon Sep 17 00:00:00 2001 From: Tanks Transfeld Date: Tue, 21 Mar 2023 18:13:56 +0100 Subject: [PATCH 21/42] Update embedded-workshop-book/src/enabling-uarte.md Co-authored-by: Jonathan Pallant --- embedded-workshop-book/src/enabling-uarte.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/embedded-workshop-book/src/enabling-uarte.md b/embedded-workshop-book/src/enabling-uarte.md index 8926582..afcbfeb 100644 --- a/embedded-workshop-book/src/enabling-uarte.md +++ b/embedded-workshop-book/src/enabling-uarte.md @@ -13,7 +13,7 @@ Write a simple program which uses the PAC to enable the UARTE0. See how writing ## Tasks * Find out which values can be written into the `enable` register. -* Take ownership of the boards peripherals +* Take ownership of the board's peripherals * Write a helper function that reads the UARTE0's `enable` register and print's status. * Enable the UARTE0 peripheral using a safe method. * Disable the UARTE0 peripheral by writing raw bits in it (unsafe). From baa572a98d79c8c263252f40c269ae78b73947c9 Mon Sep 17 00:00:00 2001 From: Tanks Transfeld Date: Tue, 21 Mar 2023 18:14:11 +0100 Subject: [PATCH 22/42] Update embedded-workshop-book/src/enabling-uarte.md Co-authored-by: Jonathan Pallant --- embedded-workshop-book/src/enabling-uarte.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/embedded-workshop-book/src/enabling-uarte.md b/embedded-workshop-book/src/enabling-uarte.md index afcbfeb..31ab6d4 100644 --- a/embedded-workshop-book/src/enabling-uarte.md +++ b/embedded-workshop-book/src/enabling-uarte.md @@ -14,7 +14,7 @@ Write a simple program which uses the PAC to enable the UARTE0. See how writing ## Tasks * Find out which values can be written into the `enable` register. * Take ownership of the board's peripherals -* Write a helper function that reads the UARTE0's `enable` register and print's status. +* Write a helper function that reads `UARTE0`'s `enable` register and prints the enable status. * Enable the UARTE0 peripheral using a safe method. * Disable the UARTE0 peripheral by writing raw bits in it (unsafe). From 8b58405628ce19aac89d1875bdff82f3e111b862 Mon Sep 17 00:00:00 2001 From: Tanks Transfeld Date: Tue, 21 Mar 2023 18:15:34 +0100 Subject: [PATCH 23/42] Update embedded-workshop-book/src/enabling-uarte.md Co-authored-by: Jonathan Pallant --- embedded-workshop-book/src/enabling-uarte.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/embedded-workshop-book/src/enabling-uarte.md b/embedded-workshop-book/src/enabling-uarte.md index 31ab6d4..fc26371 100644 --- a/embedded-workshop-book/src/enabling-uarte.md +++ b/embedded-workshop-book/src/enabling-uarte.md @@ -26,7 +26,7 @@ Uarte0 is ensabled. Uarte0 is disabled. ``` -Find the starter code in `down-the-stack/apps/uarte_enable.rs` +Find the starter code in `down-the-stack/apps/src/bin/uarte_enable.rs` Find the full solution in `down-the-stack/solutions/uarte_enable.rs` From c7576cfc058b1a28475293f82eb59c6f8d4f20c3 Mon Sep 17 00:00:00 2001 From: Tanks Transfeld Date: Tue, 21 Mar 2023 18:15:44 +0100 Subject: [PATCH 24/42] Update embedded-workshop-book/src/enabling-uarte.md Co-authored-by: Jonathan Pallant --- embedded-workshop-book/src/enabling-uarte.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/embedded-workshop-book/src/enabling-uarte.md b/embedded-workshop-book/src/enabling-uarte.md index fc26371..7275a57 100644 --- a/embedded-workshop-book/src/enabling-uarte.md +++ b/embedded-workshop-book/src/enabling-uarte.md @@ -27,7 +27,7 @@ Uarte0 is disabled. ``` Find the starter code in `down-the-stack/apps/src/bin/uarte_enable.rs` -Find the full solution in `down-the-stack/solutions/uarte_enable.rs` +Find the full solution in `down-the-stack/solutions/src/bin/uarte_enable.rs` ## Step-by-Step Solution From 00c20e69b0e6f818e60ae4eb373aa9cb3f3000f0 Mon Sep 17 00:00:00 2001 From: Tanks Transfeld Date: Tue, 21 Mar 2023 18:16:02 +0100 Subject: [PATCH 25/42] Update embedded-workshop-book/src/enabling-uarte.md Co-authored-by: Jonathan Pallant --- embedded-workshop-book/src/enabling-uarte.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/embedded-workshop-book/src/enabling-uarte.md b/embedded-workshop-book/src/enabling-uarte.md index 7275a57..57835d7 100644 --- a/embedded-workshop-book/src/enabling-uarte.md +++ b/embedded-workshop-book/src/enabling-uarte.md @@ -39,7 +39,7 @@ Find the full solution in `down-the-stack/solutions/src/bin/uarte_enable.rs` ### Step 2: Import the PAC -In `down-the-stack/apps/Cargo.toml` add: +In the Cargo configuration file for the `apps` package, `down-the-stack/apps/Cargo.toml`, add: ``` dk_pac = { path = "../dk_pac", features = ["critical-section"]} From f93eb74acdd3f7706e0202d01b205f6ac5e80e52 Mon Sep 17 00:00:00 2001 From: Tanks Transfeld Date: Tue, 21 Mar 2023 18:16:17 +0100 Subject: [PATCH 26/42] Update embedded-workshop-book/src/enabling-uarte.md Co-authored-by: Jonathan Pallant --- embedded-workshop-book/src/enabling-uarte.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/embedded-workshop-book/src/enabling-uarte.md b/embedded-workshop-book/src/enabling-uarte.md index 57835d7..de03814 100644 --- a/embedded-workshop-book/src/enabling-uarte.md +++ b/embedded-workshop-book/src/enabling-uarte.md @@ -44,7 +44,7 @@ In the Cargo configuration file for the `apps` package, `down-the-stack/apps/Car ``` dk_pac = { path = "../dk_pac", features = ["critical-section"]} ``` -In `apps/bin/uarte_enable.rs` add: +In the main source file for the `uarte_enable` binary, `apps/bin/uarte_enable.rs`, add: ```rust use dk_pac::UARTE0; From 7e9bf1bbc6ad3df006f0639b86c50aad49b46b96 Mon Sep 17 00:00:00 2001 From: Tanks Transfeld Date: Tue, 21 Mar 2023 18:16:38 +0100 Subject: [PATCH 27/42] Update embedded-workshop-book/src/enabling-uarte.md Co-authored-by: Jonathan Pallant --- embedded-workshop-book/src/enabling-uarte.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/embedded-workshop-book/src/enabling-uarte.md b/embedded-workshop-book/src/enabling-uarte.md index de03814..c959fe6 100644 --- a/embedded-workshop-book/src/enabling-uarte.md +++ b/embedded-workshop-book/src/enabling-uarte.md @@ -52,7 +52,7 @@ use dk_pac::UARTE0; ### Step 3: Take ownership of the peripherals with `take()` -Take ownership of the peripherals with `take()`. Take note, the take returns an `Option` so that needs to be taken care of. Bind the `UARTE0` peripheral to it's own variable. +Take ownership of the peripherals with `take()`. Be aware, the take returns an `Option` so that needs to be taken care of. Bind the `UARTE0` peripheral to its own variable. ```rust let periph = dk_pac::Peripherals::take().unwrap(); From 2355def66b4882a3c3bd2c297b3a6a13be739207 Mon Sep 17 00:00:00 2001 From: Tanks Transfeld Date: Tue, 21 Mar 2023 18:16:57 +0100 Subject: [PATCH 28/42] Update embedded-workshop-book/src/enabling-uarte.md Co-authored-by: Jonathan Pallant --- embedded-workshop-book/src/enabling-uarte.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/embedded-workshop-book/src/enabling-uarte.md b/embedded-workshop-book/src/enabling-uarte.md index c959fe6..bc6188e 100644 --- a/embedded-workshop-book/src/enabling-uarte.md +++ b/embedded-workshop-book/src/enabling-uarte.md @@ -79,7 +79,7 @@ fn is_uarte_enabled(uarte: &UARTE0) { ### Step 5: Enable the peripheral safely. -Enable the peripheral safely by passing `w.enable().enabled()` in the closure of `write()`. Call the helper function after this new line and run your code. +Enable the peripheral safely by passing `w.enable().enabled()` in the closure of a call to `write()` on the `enable` field of our UARTE object. Call the helper function after this new line and run your code. It should print: From a80583fb3e26e4ede954b4e730d0c9a9d8095bb0 Mon Sep 17 00:00:00 2001 From: Tanks Transfeld Date: Tue, 21 Mar 2023 18:17:16 +0100 Subject: [PATCH 29/42] Update embedded-workshop-book/src/enabling-uarte.md Co-authored-by: Jonathan Pallant --- embedded-workshop-book/src/enabling-uarte.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/embedded-workshop-book/src/enabling-uarte.md b/embedded-workshop-book/src/enabling-uarte.md index bc6188e..10eebb4 100644 --- a/embedded-workshop-book/src/enabling-uarte.md +++ b/embedded-workshop-book/src/enabling-uarte.md @@ -94,7 +94,7 @@ uarte.enable.write(|w| w.enable().enabled()); ### Step 6: Disable the peripheral unsafely by writing raw bits into the register. -Write 0 into the register to disable it by passing the closure `|w| w.bits(0x00 as u32)` to the `write()` method. This action is unsafe, so it needs to be in an unsafe block. Call the helper function once more and run your code. Compare your output with the expected output on top of this page. +Write 0 into the register to disable it by passing the closure `|w| w.bits(0u32)` to the `write()` method. This action is unsafe, so it needs to be in an unsafe block. Call the helper function once more and run your code. Compare your output with the expected output on top of this page. ```rust unsafe { From 6c513bd4d1966003fcfb3099d708758a93bb7046 Mon Sep 17 00:00:00 2001 From: Tanks Transfeld Date: Tue, 21 Mar 2023 18:17:33 +0100 Subject: [PATCH 30/42] Update embedded-workshop-book/src/generating-pac.md Co-authored-by: Jonathan Pallant --- embedded-workshop-book/src/generating-pac.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/embedded-workshop-book/src/generating-pac.md b/embedded-workshop-book/src/generating-pac.md index cc68c3d..7649cf9 100644 --- a/embedded-workshop-book/src/generating-pac.md +++ b/embedded-workshop-book/src/generating-pac.md @@ -5,7 +5,7 @@ Generate your own PAC from an SVD file. ## In this exercise you will learn how to * generate a PAC from an SVD file. * format the generated code. -* split the single PAC file into it's modules. +* split the single PAC file into one file per module. ## Prerequisites * usage of cargo install From d84cc58db99013d9281bbd35a90707971f6418a9 Mon Sep 17 00:00:00 2001 From: Tanks Transfeld Date: Tue, 21 Mar 2023 18:21:41 +0100 Subject: [PATCH 31/42] Update embedded-workshop-book/src/generating-pac.md Co-authored-by: Jonathan Pallant --- embedded-workshop-book/src/generating-pac.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/embedded-workshop-book/src/generating-pac.md b/embedded-workshop-book/src/generating-pac.md index 7649cf9..a65642d 100644 --- a/embedded-workshop-book/src/generating-pac.md +++ b/embedded-workshop-book/src/generating-pac.md @@ -14,7 +14,7 @@ Generate your own PAC from an SVD file. ## Tasks * Install `svd2rust` and `form` via cargo. * Download the [nrf-svd][svd] file and place it into `down-the-stack/dk-pac`. -* Run `svd2rust` on the file using the `cortex-m` flag. +* Run `svd2rust` on the file using the `cortex-m` target. * Format the generated file to make it readable. * Split the file into its modules using `form`. * Check the documentation. From 19cf5c291224680b22ad509d95174d50c879e6be Mon Sep 17 00:00:00 2001 From: Tanks Transfeld Date: Tue, 21 Mar 2023 18:23:03 +0100 Subject: [PATCH 32/42] Update embedded-workshop-book/src/generating-pac.md Co-authored-by: Jonathan Pallant --- embedded-workshop-book/src/generating-pac.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/embedded-workshop-book/src/generating-pac.md b/embedded-workshop-book/src/generating-pac.md index a65642d..ddc7bcd 100644 --- a/embedded-workshop-book/src/generating-pac.md +++ b/embedded-workshop-book/src/generating-pac.md @@ -32,7 +32,7 @@ cargo install form ✅ Download [nrf-svd][svd](This version has an error: writeonce needs to be changed to writeOnce) Place the file into `down-the-stack/dk-pac`. Note how we provide a `Cargo.toml` file, as it will not be generated by svd2rust. -✅ In the terminal, go to the file's location. Run `svd2rust` with the SVD file to generate a PAC using the `cortex-m` flag. +✅ In the terminal, go to the file's location. Run `svd2rust` with the SVD file to generate a PAC using the `cortex-m` target. ``` svd2rust --target cortex-m -i nrf52.svd From de261dcbed9d20d86c3924b2923caedf11e28d49 Mon Sep 17 00:00:00 2001 From: Tanks Transfeld Date: Tue, 21 Mar 2023 18:23:21 +0100 Subject: [PATCH 33/42] Update embedded-workshop-book/src/generating-pac.md Co-authored-by: Jonathan Pallant --- embedded-workshop-book/src/generating-pac.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/embedded-workshop-book/src/generating-pac.md b/embedded-workshop-book/src/generating-pac.md index ddc7bcd..144b805 100644 --- a/embedded-workshop-book/src/generating-pac.md +++ b/embedded-workshop-book/src/generating-pac.md @@ -39,7 +39,7 @@ svd2rust --target cortex-m -i nrf52.svd ``` If you check the folder `down-the-stack/dk-pac` now, you see three new files: * lib.rs - the file that contains the generated code for the pac -* device.x - linker sections(?) +* device.x - linker script that weakly aliases all the interrupt handlers to the default exception handler (DefaultHandler). * build.rs - linker script ✅ Make an `/src` and move the generated `lib.rs` into it. From a74ae1af44072ed63b0cc34c942307c8541af059 Mon Sep 17 00:00:00 2001 From: Tanks Transfeld Date: Tue, 21 Mar 2023 18:24:47 +0100 Subject: [PATCH 34/42] Update embedded-workshop-book/src/generating-pac.md Co-authored-by: Jonathan Pallant --- embedded-workshop-book/src/generating-pac.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/embedded-workshop-book/src/generating-pac.md b/embedded-workshop-book/src/generating-pac.md index 144b805..a46d20f 100644 --- a/embedded-workshop-book/src/generating-pac.md +++ b/embedded-workshop-book/src/generating-pac.md @@ -40,7 +40,7 @@ svd2rust --target cortex-m -i nrf52.svd If you check the folder `down-the-stack/dk-pac` now, you see three new files: * lib.rs - the file that contains the generated code for the pac * device.x - linker script that weakly aliases all the interrupt handlers to the default exception handler (DefaultHandler). -* build.rs - linker script +* build.rs - build script that places device.x somewhere the linker can find. ✅ Make an `/src` and move the generated `lib.rs` into it. From aa93c990c1b59dbf9f36a61db0b717c6f2ecbb1d Mon Sep 17 00:00:00 2001 From: Tanks Transfeld Date: Tue, 21 Mar 2023 18:25:10 +0100 Subject: [PATCH 35/42] Update embedded-workshop-book/src/pac-docs.md Co-authored-by: Jonathan Pallant --- embedded-workshop-book/src/pac-docs.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/embedded-workshop-book/src/pac-docs.md b/embedded-workshop-book/src/pac-docs.md index b5e10bd..ef1f6c8 100644 --- a/embedded-workshop-book/src/pac-docs.md +++ b/embedded-workshop-book/src/pac-docs.md @@ -11,7 +11,7 @@ In the `Structs` section look for the `struct Peripherals`. Taking ownership of In the `modules` section, look for the `uarte0` module. It is divided into submodules. `enable` is the register we are concerned about. Clicking on it shows the associated type definitions. -* `W` - the register ENABLE writer with the following methods: +* `W` - the writer proxy for the ENABLE register, with the following methods: * `enable()` returns the field ENABLE writer `ENABLE_W`. * `unsafe bits()` writes raw bits into the register. * `R` - the register ENABLE reader writer with the following methods: From e85a98b137fcbd238ef1bcd67260dd9eeca38da0 Mon Sep 17 00:00:00 2001 From: Tanks Transfeld Date: Tue, 21 Mar 2023 18:26:01 +0100 Subject: [PATCH 36/42] Update embedded-workshop-book/src/pac-docs.md Co-authored-by: Jonathan Pallant --- embedded-workshop-book/src/pac-docs.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/embedded-workshop-book/src/pac-docs.md b/embedded-workshop-book/src/pac-docs.md index ef1f6c8..eab8190 100644 --- a/embedded-workshop-book/src/pac-docs.md +++ b/embedded-workshop-book/src/pac-docs.md @@ -33,7 +33,7 @@ Note the difference between the struct field `UARTE0` in `Peripherals` and the m ## Finding corresponding sections in the PAC -* `dk_pac/src/lib.rs` defines the single peripherals with their register block addresses and contains a struct definition for the `struct Peripherals`. There are two methods for this struct: `take()` and `steal()`. `take()` assures, that only one instance of this can exist. Hence, it's safe. Note that `take()` is only available with the `critical-section` feature enabled. +* `dk_pac/src/lib.rs` defines the singleton peripherals as part of a larger `struct Peripherals`. There are two methods for this struct: `take()` and `steal()`. `take()` assures, that only one instance of this can exist. Hence, it's safe. Note that `take()` is only available with the `critical-section` feature enabled. * `dk_pac/src/uarte0.rs` defines a struct that contains all the registers of the `UARTE0` register block. The `enable` field represents the register of the same name. From 8900ace37830d5563ae22bdac6fe46053a2990a3 Mon Sep 17 00:00:00 2001 From: Tanks Transfeld Date: Tue, 21 Mar 2023 18:28:38 +0100 Subject: [PATCH 37/42] Update embedded-workshop-book/src/pac-exercise.md Co-authored-by: Jonathan Pallant --- embedded-workshop-book/src/pac-exercise.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/embedded-workshop-book/src/pac-exercise.md b/embedded-workshop-book/src/pac-exercise.md index 7f66e4a..8f30861 100644 --- a/embedded-workshop-book/src/pac-exercise.md +++ b/embedded-workshop-book/src/pac-exercise.md @@ -1,5 +1,5 @@ # Generating and Using a PAC -In this module you will learn how to generate a PAC (Peripheral Access Crate) from an SVD file, read it's documentation and write a small program that enables the UARTE0 register. +In this module you will learn how to generate a PAC (Peripheral Access Crate) from an SVD file, read its documentation and write a small program that enables the UARTE0 peripheral. From ef6f61c62b40c35ca3128e6eb33396e9209ccdc5 Mon Sep 17 00:00:00 2001 From: Tanks Transfeld Date: Tue, 21 Mar 2023 18:29:23 +0100 Subject: [PATCH 38/42] Update embedded-workshop-book/src/pac-docs.md Co-authored-by: Jonathan Pallant --- embedded-workshop-book/src/pac-docs.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/embedded-workshop-book/src/pac-docs.md b/embedded-workshop-book/src/pac-docs.md index eab8190..77ac8f4 100644 --- a/embedded-workshop-book/src/pac-docs.md +++ b/embedded-workshop-book/src/pac-docs.md @@ -14,7 +14,7 @@ In the `modules` section, look for the `uarte0` module. It is divided into submo * `W` - the writer proxy for the ENABLE register, with the following methods: * `enable()` returns the field ENABLE writer `ENABLE_W`. * `unsafe bits()` writes raw bits into the register. -* `R` - the register ENABLE reader writer with the following methods: +* `R` - the reader proxy for the ENABLE register, with the following methods: * `enable()` returns the field ENABLE reader `ENABLE_R`. * `bits()` reads raw bits from the register. From 3689d0daff257f5a90cb64b09922ed4e6161db38 Mon Sep 17 00:00:00 2001 From: Tanks Transfeld Date: Tue, 21 Mar 2023 18:29:47 +0100 Subject: [PATCH 39/42] Update embedded-workshop-book/src/pac-docs.md Co-authored-by: Jonathan Pallant --- embedded-workshop-book/src/pac-docs.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/embedded-workshop-book/src/pac-docs.md b/embedded-workshop-book/src/pac-docs.md index 77ac8f4..eebb896 100644 --- a/embedded-workshop-book/src/pac-docs.md +++ b/embedded-workshop-book/src/pac-docs.md @@ -35,7 +35,7 @@ Note the difference between the struct field `UARTE0` in `Peripherals` and the m * `dk_pac/src/lib.rs` defines the singleton peripherals as part of a larger `struct Peripherals`. There are two methods for this struct: `take()` and `steal()`. `take()` assures, that only one instance of this can exist. Hence, it's safe. Note that `take()` is only available with the `critical-section` feature enabled. -* `dk_pac/src/uarte0.rs` defines a struct that contains all the registers of the `UARTE0` register block. The `enable` field represents the register of the same name. +* `dk_pac/src/uarte0.rs` defines a struct that contains all the registers of the `UARTE0` peripheral. The `enable` field represents the register of the same name. * `dk_pac/src/uarte0/enable.rs` defines the types associated with this register that you already saw in the docs. From a5f4ebee56556beab08fc3e25d0b5a0818619cb7 Mon Sep 17 00:00:00 2001 From: Mirabellensaft Date: Tue, 21 Mar 2023 18:43:42 +0100 Subject: [PATCH 40/42] address issues --- embedded-workshop-book/src/generating-pac.md | 2 +- embedded-workshop-book/src/pac-docs.md | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/embedded-workshop-book/src/generating-pac.md b/embedded-workshop-book/src/generating-pac.md index a46d20f..936fb02 100644 --- a/embedded-workshop-book/src/generating-pac.md +++ b/embedded-workshop-book/src/generating-pac.md @@ -15,8 +15,8 @@ Generate your own PAC from an SVD file. * Install `svd2rust` and `form` via cargo. * Download the [nrf-svd][svd] file and place it into `down-the-stack/dk-pac`. * Run `svd2rust` on the file using the `cortex-m` target. -* Format the generated file to make it readable. * Split the file into its modules using `form`. +* Format the generated file to make it readable. * Check the documentation. ## Step-by-Step Solution diff --git a/embedded-workshop-book/src/pac-docs.md b/embedded-workshop-book/src/pac-docs.md index eebb896..f3b9182 100644 --- a/embedded-workshop-book/src/pac-docs.md +++ b/embedded-workshop-book/src/pac-docs.md @@ -35,6 +35,12 @@ Note the difference between the struct field `UARTE0` in `Peripherals` and the m * `dk_pac/src/lib.rs` defines the singleton peripherals as part of a larger `struct Peripherals`. There are two methods for this struct: `take()` and `steal()`. `take()` assures, that only one instance of this can exist. Hence, it's safe. Note that `take()` is only available with the `critical-section` feature enabled. +To generate documentation that includes `take()`, pass the `critical-section` feature flag when generating the docs: + +``` +cargo doc --open --features critical-section +``` + * `dk_pac/src/uarte0.rs` defines a struct that contains all the registers of the `UARTE0` peripheral. The `enable` field represents the register of the same name. * `dk_pac/src/uarte0/enable.rs` defines the types associated with this register that you already saw in the docs. From fbda1d9c2a818e009c8ff9f8a49c02d0c00475ce Mon Sep 17 00:00:00 2001 From: Mirabellensaft Date: Tue, 21 Mar 2023 19:13:34 +0100 Subject: [PATCH 41/42] fixing issue with form, rm download link --- embedded-workshop-book/src/generating-pac.md | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/embedded-workshop-book/src/generating-pac.md b/embedded-workshop-book/src/generating-pac.md index 936fb02..5cdff32 100644 --- a/embedded-workshop-book/src/generating-pac.md +++ b/embedded-workshop-book/src/generating-pac.md @@ -13,8 +13,7 @@ Generate your own PAC from an SVD file. ## Tasks * Install `svd2rust` and `form` via cargo. -* Download the [nrf-svd][svd] file and place it into `down-the-stack/dk-pac`. -* Run `svd2rust` on the file using the `cortex-m` target. +* Run `svd2rust` on `nrf52.svd` using the `cortex-m` target. * Split the file into its modules using `form`. * Format the generated file to make it readable. * Check the documentation. @@ -29,10 +28,9 @@ cargo install svd2rust cargo install form ``` -✅ Download [nrf-svd][svd](This version has an error: writeonce needs to be changed to writeOnce) -Place the file into `down-the-stack/dk-pac`. Note how we provide a `Cargo.toml` file, as it will not be generated by svd2rust. +✅ Go `down-the-stack/dk-pac`. The folder contains the SVD file `nrf52.svd`. We also provide a `Cargo.toml` file, as it will not be generated by svd2rust. -✅ In the terminal, go to the file's location. Run `svd2rust` with the SVD file to generate a PAC using the `cortex-m` target. +✅ In the terminal, go to the SVD file's location. Run `svd2rust` with the SVD file to generate a PAC using the `cortex-m` target. ``` svd2rust --target cortex-m -i nrf52.svd @@ -62,6 +60,14 @@ This does not change to the docs, but `lib.rs` is a bit more readable. form -i src/lib.rs -o src/ ``` -✅ Re-run `cargo fmt`. +In case this last command causes problems try this instead: -[svd]: (https://github.com/NordicSemiconductor/nrfx/blob/master/mdk/nrf52.svd ) \ No newline at end of file +Move `lib.rs` out of `/src`. + +Run the following command: + +```terminal +form -i ./lib.rs -o ./src +``` + +✅ Re-run `cargo fmt`. From 971ec397f5ee048c1b78f4d146bf12ae4a5666b6 Mon Sep 17 00:00:00 2001 From: Mirabellensaft Date: Tue, 21 Mar 2023 19:26:04 +0100 Subject: [PATCH 42/42] add troubleshooting --- embedded-workshop-book/src/generating-pac.md | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/embedded-workshop-book/src/generating-pac.md b/embedded-workshop-book/src/generating-pac.md index 5cdff32..9f81789 100644 --- a/embedded-workshop-book/src/generating-pac.md +++ b/embedded-workshop-book/src/generating-pac.md @@ -60,14 +60,20 @@ This does not change to the docs, but `lib.rs` is a bit more readable. form -i src/lib.rs -o src/ ``` -In case this last command causes problems try this instead: +✅ Re-run `cargo fmt`. -Move `lib.rs` out of `/src`. -Run the following command: + +## Troubleshooting + +### `form` + +In case the `form` command above causes problems, try this instead: + +1. Move `lib.rs` out of `/src`. + +2. Run the following command: ```terminal form -i ./lib.rs -o ./src -``` - -✅ Re-run `cargo fmt`. +``` \ No newline at end of file